From a71ba5b314b9bf4f8aab4c9499383c069333fb85 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 15 Nov 2023 19:48:35 -0800 Subject: [PATCH 01/33] Remove test matrix for out of support node version(14, 16) and update dependencies (#4794) --- .default-eslintrc.yaml | 1 + .vscode/settings.json | 1 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-16-42.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-16-42.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-16-42.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-16-42.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-17-04.json | 10 + ...e-node-14-16-support_2023-11-15-16-42.json | 10 + common/config/rush/pnpm-lock.yaml | 7480 +++++++++-------- common/scripts/install-run-rush-pnpm.js | 28 + common/scripts/install-run-rush.js | 180 +- common/scripts/install-run-rushx.js | 44 +- common/scripts/install-run.js | 545 +- cspell.yaml | 1 + eng/pipelines/ci.yaml | 16 +- eng/pipelines/templates/build.yaml | 2 +- eng/pipelines/templates/regression-tests.yaml | 20 +- packages/apps/autorest/package.json | 38 +- packages/apps/autorest/src/app.ts | 2 +- packages/apps/autorest/test/failure.e2e.ts | 3 +- packages/extensions/cadl/package.json | 24 +- .../extensions/cadl/src/module-resolver.ts | 5 +- packages/extensions/core/package.json | 44 +- .../extensions/core/src/lib/autorest-core.ts | 4 +- .../core/src/lib/pipeline/pipeline.ts | 8 +- .../src/lib/plugins/components-cleaner.ts | 2 +- .../core/src/lib/plugins/emitter.ts | 4 +- .../enum-deduplication/enum-deduplicator.ts | 2 +- .../loaders/referenced-file-resolver.ts | 4 +- .../extensions/core/src/lib/plugins/merger.ts | 2 +- .../core/src/lib/plugins/new-composer.ts | 6 +- .../lib/plugins/tree-shaker/tree-shaker.ts | 9 +- packages/extensions/modelerfour/package.json | 31 +- .../modelerfour/src/modeler/modelerfour.ts | 4 +- .../src/modeler/security-processor.ts | 5 +- .../modelerfour/src/prenamer/naming-utils.ts | 5 +- .../duplicate-schema-merger.ts | 5 +- .../test/quality-precheck/prechecker.test.ts | 5 +- .../extensions/openapi-to-cadl/package.json | 48 +- .../src/emiters/emit-cadl-config.ts | 2 +- .../openapi-to-cadl/src/emiters/emit-main.ts | 2 +- .../src/emiters/emit-models.ts | 2 +- .../src/emiters/emit-package.ts | 2 +- .../src/emiters/emit-routes.ts | 2 +- .../openapi-to-cadl/src/utils/format.ts | 6 +- .../test/anomalyDetector/tsp-output/main.tsp | 1 + .../anomalyDetector/tsp-output/models.tsp | 6 + .../test/arm-compute/tsp-output/models.tsp | 5 + .../test/arm-compute/tsp-output/routes.tsp | 5 + .../test/bodyComplex/tsp-output/models.tsp | 10 +- .../test/keyvault/tsp-output/models.tsp | 2 + .../test/nh/tsp-output/routes.tsp | 2 + .../openapi-to-cadl/test/openAI/openai.md | 2 +- .../test/openAI/tsp-output/routes.tsp | 1 + .../test/qnaAuthoring/tsp-output/models.tsp | 4 +- .../test/utils/check-clean-tree.js | 2 +- .../test/utils/generate-cadl.ts | 21 +- .../openapi-to-cadl/test/utils/printer.ts | 2 +- .../test/webpubsub/tsp-output/main.tsp | 10 +- .../test/webpubsub/tsp-output/models.tsp | 22 +- .../test/webpubsub/tsp-output/routes.tsp | 82 +- packages/libs/codegen/package.json | 20 +- .../libs/codegen/src/formatter/formatter.ts | 4 +- packages/libs/codegen/src/initializer.ts | 56 +- .../libs/codegen/src/text-manipulation.ts | 8 +- .../all-in-one/json/code-model.json | 92 +- .../.resources/model/json/master.json | 92 +- packages/libs/codemodel/package.json | 20 +- .../model/common/external-documentation.ts | 5 +- .../libs/codemodel/src/model/common/info.ts | 10 +- .../codemodel/src/model/common/security.ts | 5 +- .../libs/codemodel/src/model/http/http.ts | 6 +- .../libs/codemodel/src/model/http/security.ts | 36 +- packages/libs/common/package.json | 18 +- .../libs/common/src/exceptions/exceptions.ts | 10 +- packages/libs/configuration/package.json | 20 +- .../configuration-manager.ts | 5 +- packages/libs/configuration/src/utils.ts | 8 +- packages/libs/datastore/package.json | 20 +- .../datastore/src/data-store/data-handle.ts | 10 +- .../src/data-store/quick-data-source.ts | 5 +- .../data-store/read-through-data-source.ts | 5 +- .../libs/datastore/src/file-system/errors.ts | 5 +- .../src/mapping-tree/mapping-tree.ts | 4 +- .../src/source-map/source-map-data.ts | 5 +- packages/libs/deduplication/package.json | 20 +- packages/libs/deduplication/src/main.ts | 7 +- packages/libs/extension-base/package.json | 20 +- .../libs/extension-base/src/extension-host.ts | 5 +- packages/libs/extension/package.json | 22 +- .../libs/extension/src/extension/extension.ts | 5 +- .../src/extension/local-extension.ts | 5 +- packages/libs/json/package.json | 21 +- packages/libs/jsonschema/package.json | 21 +- packages/libs/oai2-to-oai3/package.json | 20 +- packages/libs/openapi/package.json | 18 +- .../libs/system-requirements/package.json | 18 +- packages/libs/yaml/package.json | 20 +- packages/libs/yaml/src/parser.ts | 4 +- .../testing/test-public-packages/package.json | 10 +- packages/testing/test-utils/package.json | 8 +- packages/tools/compare/package.json | 25 +- packages/tools/fixer/package.json | 20 +- regression-tests/regression-compare.yaml | 4 +- rush.json | 4 +- 121 files changed, 5579 insertions(+), 4158 deletions(-) create mode 100644 common/changes/@autorest/cadl/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@autorest/codemodel/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@autorest/common/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@autorest/compare/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@autorest/configuration/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@autorest/core/remove-node-14-16-support_2023-11-15-16-42.json create mode 100644 common/changes/@autorest/extension-base/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@autorest/fixer/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@autorest/modelerfour/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@autorest/openapi-to-cadl/remove-node-14-16-support_2023-11-15-16-42.json create mode 100644 common/changes/@autorest/system-requirements/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@autorest/test-utils/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@azure-tools/codegen/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@azure-tools/datastore/remove-node-14-16-support_2023-11-15-16-42.json create mode 100644 common/changes/@azure-tools/deduplication/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@azure-tools/extension/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@azure-tools/json/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@azure-tools/jsonschema/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@azure-tools/oai2-to-oai3/remove-node-14-16-support_2023-11-15-16-42.json create mode 100644 common/changes/@azure-tools/openapi/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/@azure-tools/yaml/remove-node-14-16-support_2023-11-15-17-04.json create mode 100644 common/changes/autorest/remove-node-14-16-support_2023-11-15-16-42.json create mode 100644 common/scripts/install-run-rush-pnpm.js diff --git a/.default-eslintrc.yaml b/.default-eslintrc.yaml index f688483aaa..26c4736ba5 100644 --- a/.default-eslintrc.yaml +++ b/.default-eslintrc.yaml @@ -31,6 +31,7 @@ parserOptions: project: ./tsconfig.json rules: + "@typescript-eslint/no-unsafe-declaration-merging": off "@typescript-eslint/no-this-alias": off "@typescript-eslint/interface-name-prefix": off "@typescript-eslint/explicit-function-return-type": off diff --git a/.vscode/settings.json b/.vscode/settings.json index 918fa629e3..e737e6c57e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,6 +15,7 @@ }, "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", + "prettier.prettierPath": "./packages/extensions/core/node_modules/prettier/index.cjs", "files.associations": { "rush.json": "jsonc", "command-line.json": "jsonc", diff --git a/common/changes/@autorest/cadl/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/cadl/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..4237d3abc3 --- /dev/null +++ b/common/changes/@autorest/cadl/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/cadl", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@autorest/cadl" +} \ No newline at end of file diff --git a/common/changes/@autorest/codemodel/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/codemodel/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..a5f6e7b12a --- /dev/null +++ b/common/changes/@autorest/codemodel/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/codemodel", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@autorest/codemodel" +} \ No newline at end of file diff --git a/common/changes/@autorest/common/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/common/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..9d45764135 --- /dev/null +++ b/common/changes/@autorest/common/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/common", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@autorest/common" +} \ No newline at end of file diff --git a/common/changes/@autorest/compare/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/compare/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..25b8fa2bee --- /dev/null +++ b/common/changes/@autorest/compare/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/compare", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@autorest/compare" +} \ No newline at end of file diff --git a/common/changes/@autorest/configuration/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/configuration/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..d67a978f2c --- /dev/null +++ b/common/changes/@autorest/configuration/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/configuration", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@autorest/configuration" +} \ No newline at end of file diff --git a/common/changes/@autorest/core/remove-node-14-16-support_2023-11-15-16-42.json b/common/changes/@autorest/core/remove-node-14-16-support_2023-11-15-16-42.json new file mode 100644 index 0000000000..0bfeaa932a --- /dev/null +++ b/common/changes/@autorest/core/remove-node-14-16-support_2023-11-15-16-42.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/core", + "comment": "Update dependencies", + "type": "minor" + } + ], + "packageName": "@autorest/core" +} \ No newline at end of file diff --git a/common/changes/@autorest/extension-base/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/extension-base/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..c70ee70bd9 --- /dev/null +++ b/common/changes/@autorest/extension-base/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/extension-base", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@autorest/extension-base" +} \ No newline at end of file diff --git a/common/changes/@autorest/fixer/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/fixer/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..d36aea384a --- /dev/null +++ b/common/changes/@autorest/fixer/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/fixer", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@autorest/fixer" +} \ No newline at end of file diff --git a/common/changes/@autorest/modelerfour/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/modelerfour/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..d0240d1d27 --- /dev/null +++ b/common/changes/@autorest/modelerfour/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/modelerfour", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@autorest/modelerfour" +} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-cadl/remove-node-14-16-support_2023-11-15-16-42.json b/common/changes/@autorest/openapi-to-cadl/remove-node-14-16-support_2023-11-15-16-42.json new file mode 100644 index 0000000000..d653a11a4b --- /dev/null +++ b/common/changes/@autorest/openapi-to-cadl/remove-node-14-16-support_2023-11-15-16-42.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-cadl", + "comment": "Update dependencies", + "type": "minor" + } + ], + "packageName": "@autorest/openapi-to-cadl" +} \ No newline at end of file diff --git a/common/changes/@autorest/system-requirements/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/system-requirements/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..7075a5c8e7 --- /dev/null +++ b/common/changes/@autorest/system-requirements/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/system-requirements", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@autorest/system-requirements" +} \ No newline at end of file diff --git a/common/changes/@autorest/test-utils/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/test-utils/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..f930621cc5 --- /dev/null +++ b/common/changes/@autorest/test-utils/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/test-utils", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@autorest/test-utils" +} \ No newline at end of file diff --git a/common/changes/@azure-tools/codegen/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@azure-tools/codegen/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..a23e57e31f --- /dev/null +++ b/common/changes/@azure-tools/codegen/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@azure-tools/codegen", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@azure-tools/codegen" +} \ No newline at end of file diff --git a/common/changes/@azure-tools/datastore/remove-node-14-16-support_2023-11-15-16-42.json b/common/changes/@azure-tools/datastore/remove-node-14-16-support_2023-11-15-16-42.json new file mode 100644 index 0000000000..15503c91d5 --- /dev/null +++ b/common/changes/@azure-tools/datastore/remove-node-14-16-support_2023-11-15-16-42.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@azure-tools/datastore", + "comment": "Update dependencies", + "type": "minor" + } + ], + "packageName": "@azure-tools/datastore" +} \ No newline at end of file diff --git a/common/changes/@azure-tools/deduplication/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@azure-tools/deduplication/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..d9912da8d9 --- /dev/null +++ b/common/changes/@azure-tools/deduplication/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@azure-tools/deduplication", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@azure-tools/deduplication" +} \ No newline at end of file diff --git a/common/changes/@azure-tools/extension/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@azure-tools/extension/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..538a239f41 --- /dev/null +++ b/common/changes/@azure-tools/extension/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@azure-tools/extension", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@azure-tools/extension" +} \ No newline at end of file diff --git a/common/changes/@azure-tools/json/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@azure-tools/json/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..8141031878 --- /dev/null +++ b/common/changes/@azure-tools/json/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@azure-tools/json", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@azure-tools/json" +} \ No newline at end of file diff --git a/common/changes/@azure-tools/jsonschema/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@azure-tools/jsonschema/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..f06d023c92 --- /dev/null +++ b/common/changes/@azure-tools/jsonschema/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@azure-tools/jsonschema", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@azure-tools/jsonschema" +} \ No newline at end of file diff --git a/common/changes/@azure-tools/oai2-to-oai3/remove-node-14-16-support_2023-11-15-16-42.json b/common/changes/@azure-tools/oai2-to-oai3/remove-node-14-16-support_2023-11-15-16-42.json new file mode 100644 index 0000000000..d1150c99a3 --- /dev/null +++ b/common/changes/@azure-tools/oai2-to-oai3/remove-node-14-16-support_2023-11-15-16-42.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@azure-tools/oai2-to-oai3", + "comment": "Update dependencies", + "type": "minor" + } + ], + "packageName": "@azure-tools/oai2-to-oai3" +} \ No newline at end of file diff --git a/common/changes/@azure-tools/openapi/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@azure-tools/openapi/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..c0d0152239 --- /dev/null +++ b/common/changes/@azure-tools/openapi/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@azure-tools/openapi", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@azure-tools/openapi" +} \ No newline at end of file diff --git a/common/changes/@azure-tools/yaml/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@azure-tools/yaml/remove-node-14-16-support_2023-11-15-17-04.json new file mode 100644 index 0000000000..045d950b76 --- /dev/null +++ b/common/changes/@azure-tools/yaml/remove-node-14-16-support_2023-11-15-17-04.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@azure-tools/yaml", + "comment": "Upgrade dependencies", + "type": "minor" + } + ], + "packageName": "@azure-tools/yaml" +} \ No newline at end of file diff --git a/common/changes/autorest/remove-node-14-16-support_2023-11-15-16-42.json b/common/changes/autorest/remove-node-14-16-support_2023-11-15-16-42.json new file mode 100644 index 0000000000..b6d6965598 --- /dev/null +++ b/common/changes/autorest/remove-node-14-16-support_2023-11-15-16-42.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "autorest", + "comment": "Update dependencies", + "type": "minor" + } + ], + "packageName": "autorest" +} \ No newline at end of file diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 0f59b99308..32826214e9 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1,246 +1,369 @@ -lockfileVersion: 5.3 - -specifiers: - '@azure-tools/async-io': ~3.0.0 - '@azure-tools/object-comparison': ~3.0.0 - '@azure-tools/tasks': ~3.0.0 - '@azure-tools/typespec-autorest': ^0.30.0 - '@azure-tools/typespec-azure-core': ^0.30.0 - '@azure-tools/uri': ~3.1.1 - '@azure/logger': ^1.0.2 - '@cadl-lang/compiler': ^0.37.0 - '@rush-temp/autorest': file:./projects/autorest.tgz - '@rush-temp/cadl': file:./projects/cadl.tgz - '@rush-temp/codegen': file:./projects/codegen.tgz - '@rush-temp/codemodel': file:./projects/codemodel.tgz - '@rush-temp/common': file:./projects/common.tgz - '@rush-temp/compare': file:./projects/compare.tgz - '@rush-temp/configuration': file:./projects/configuration.tgz - '@rush-temp/core': file:./projects/core.tgz - '@rush-temp/datastore': file:./projects/datastore.tgz - '@rush-temp/deduplication': file:./projects/deduplication.tgz - '@rush-temp/extension': file:./projects/extension.tgz - '@rush-temp/extension-base': file:./projects/extension-base.tgz - '@rush-temp/fixer': file:./projects/fixer.tgz - '@rush-temp/json': file:./projects/json.tgz - '@rush-temp/jsonschema': file:./projects/jsonschema.tgz - '@rush-temp/modelerfour': file:./projects/modelerfour.tgz - '@rush-temp/oai2-to-oai3': file:./projects/oai2-to-oai3.tgz - '@rush-temp/openapi': file:./projects/openapi.tgz - '@rush-temp/openapi-to-cadl': file:./projects/openapi-to-cadl.tgz - '@rush-temp/schemas': file:./projects/schemas.tgz - '@rush-temp/system-requirements': file:./projects/system-requirements.tgz - '@rush-temp/test-public-packages': file:./projects/test-public-packages.tgz - '@rush-temp/test-utils': file:./projects/test-utils.tgz - '@rush-temp/yaml': file:./projects/yaml.tgz - '@types/cli-progress': ~3.9.2 - '@types/command-exists': ~1.2.0 - '@types/commonmark': ^0.27.0 - '@types/diff': ^4.0.2 - '@types/fs-extra': ^9.0.13 - '@types/glob': ^7.1.3 - '@types/jest': ^29.2.3 - '@types/js-yaml': ~4.0.0 - '@types/lodash': ~4.14.168 - '@types/node': ~14.14.20 - '@types/npm-package-arg': ^6.1.0 - '@types/pacote': 11.1.3 - '@types/prettier': ^2.7.0 - '@types/semver': 5.5.0 - '@types/source-map-support': ^0.5.3 - '@types/webpack': ~4.41.26 - '@types/yargs': ~17.0.4 - '@typescript-eslint/eslint-plugin': ^5.27.0 - '@typescript-eslint/parser': ^5.27.0 - '@typespec/compiler': ^0.44.0 - '@typespec/http': ^0.44.0 - '@typespec/openapi': ^0.44.0 - '@typespec/openapi3': ^0.44.0 - '@typespec/prettier-plugin-typespec': ^0.44.0 - '@typespec/rest': ^0.44.0 - '@typespec/versioning': ^0.44.0 - ajv: ^8.6.0 - ajv-errors: ^3.0.0 - ajv-formats: ^2.1.0 - chalk: ^4.1.0 - cli-progress: ~3.10.0 - command-exists: ~1.2.9 - commonmark: ^0.27.0 - compare-versions: ^3.4.0 - copy-webpack-plugin: ^7.0.0 - cpy-cli: ~4.1.0 - diff: ^4.0.1 - eslint: ^8.28.0 - eslint-plugin-import: ~2.26.0 - eslint-plugin-jest: ~27.1.5 - eslint-plugin-node: ~11.1.0 - eslint-plugin-prettier: ~4.2.1 - eslint-plugin-unicorn: ~44.0.2 - expect: ~26.6.2 - fs-extra: ^10.1.0 - glob: ~7.1.4 - jest: ^29.3.1 - jest-snapshot: ~26.6.2 - js-yaml: ~4.0.0 - jsonpath-plus: ~6.0.1 - lodash: ~4.17.20 - mkdirp: ~0.5.1 - npm: ~8.12.1 - npm-package-arg: ^9.0.0 - pacote: ~9.5.12 - prettier: ~2.7.1 - recursive-diff: ~1.0.6 - rimraf: ^3.0.2 - safe-buffer: 5.2.0 - semver: ^7.3.5 - source-map: 0.7.3 - source-map-support: ^0.5.19 - tree-sitter: ^0.20.1 - tree-sitter-python: 0.20.1 - tree-sitter-typescript: ~0.20.1 - ts-jest: ^29.0.3 - ts-loader: ~9.2.3 - ts-morph: ~13.0.3 - ts-node: ^10.9.1 - typescript: ~4.9.3 - typescript-json-schema: ~0.53.0 - untildify: ^4.0.0 - vscode-jsonrpc: ^3.5.0 - vscode-languageserver: 3.5.1 - webpack: ~5.40.0 - webpack-cli: ~4.7.2 - webpack-node-externals: ~3.0.0 - winston: ~3.7.2 - yaml-ast-parser: 0.0.43 - yargs: 17.2.1 - yarn: 1.22.17 +lockfileVersion: '6.0' + +settings: + autoInstallPeers: false + excludeLinksFromLockfile: false dependencies: - '@azure-tools/async-io': 3.0.254 - '@azure-tools/object-comparison': 3.0.253 - '@azure-tools/tasks': 3.0.255 - '@azure-tools/typespec-autorest': 0.30.1_91e9bc237b09edab58fb41bba362839f - '@azure-tools/typespec-azure-core': 0.30.1_b20eabafba7aacdb8b5d08356213191f - '@azure-tools/uri': 3.1.1 - '@azure/logger': 1.0.3 - '@cadl-lang/compiler': 0.37.0 - '@rush-temp/autorest': file:projects/autorest.tgz_ts-node@10.9.1 - '@rush-temp/cadl': file:projects/cadl.tgz_ts-node@10.9.1+webpack@5.40.0 - '@rush-temp/codegen': file:projects/codegen.tgz_prettier@2.7.1+ts-node@10.9.1 - '@rush-temp/codemodel': file:projects/codemodel.tgz_jest@29.4.3+prettier@2.7.1 - '@rush-temp/common': file:projects/common.tgz_prettier@2.7.1+ts-node@10.9.1 - '@rush-temp/compare': file:projects/compare.tgz_prettier@2.7.1 - '@rush-temp/configuration': file:projects/configuration.tgz_prettier@2.7.1+ts-node@10.9.1 - '@rush-temp/core': file:projects/core.tgz_ts-node@10.9.1 - '@rush-temp/datastore': file:projects/datastore.tgz_prettier@2.7.1+ts-node@10.9.1 - '@rush-temp/deduplication': file:projects/deduplication.tgz_prettier@2.7.1+ts-node@10.9.1 - '@rush-temp/extension': file:projects/extension.tgz_prettier@2.7.1+ts-node@10.9.1 - '@rush-temp/extension-base': file:projects/extension-base.tgz_jest@29.4.3+prettier@2.7.1 - '@rush-temp/fixer': file:projects/fixer.tgz_ts-node@10.9.1 - '@rush-temp/json': file:projects/json.tgz_prettier@2.7.1+ts-node@10.9.1 - '@rush-temp/jsonschema': file:projects/jsonschema.tgz_prettier@2.7.1+ts-node@10.9.1 - '@rush-temp/modelerfour': file:projects/modelerfour.tgz_ts-node@10.9.1 - '@rush-temp/oai2-to-oai3': file:projects/oai2-to-oai3.tgz_prettier@2.7.1+ts-node@10.9.1 - '@rush-temp/openapi': file:projects/openapi.tgz_prettier@2.7.1+ts-node@10.9.1 - '@rush-temp/openapi-to-cadl': file:projects/openapi-to-cadl.tgz_jest@29.4.3 - '@rush-temp/schemas': file:projects/schemas.tgz - '@rush-temp/system-requirements': file:projects/system-requirements.tgz_prettier@2.7.1+ts-node@10.9.1 - '@rush-temp/test-public-packages': file:projects/test-public-packages.tgz_prettier@2.7.1 - '@rush-temp/test-utils': file:projects/test-utils.tgz_1ebd90c6d335d7d97a346a0f4e26ad19 - '@rush-temp/yaml': file:projects/yaml.tgz_prettier@2.7.1+ts-node@10.9.1 - '@types/cli-progress': 3.9.2 - '@types/command-exists': 1.2.0 - '@types/commonmark': 0.27.5 - '@types/diff': 4.0.2 - '@types/fs-extra': 9.0.13 - '@types/glob': 7.2.0 - '@types/jest': 29.4.0 - '@types/js-yaml': 4.0.5 - '@types/lodash': 4.14.191 - '@types/node': 14.14.45 - '@types/npm-package-arg': 6.1.1 - '@types/pacote': 11.1.3 - '@types/prettier': 2.7.2 - '@types/semver': 5.5.0 - '@types/source-map-support': 0.5.6 - '@types/webpack': 4.41.33 - '@types/yargs': 17.0.22 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 - '@typespec/compiler': 0.44.0 - '@typespec/http': 0.44.0_@typespec+compiler@0.44.0 - '@typespec/openapi': 0.44.0_b20eabafba7aacdb8b5d08356213191f - '@typespec/openapi3': 0.44.0_056565a5c07ce759d753359b526dd68c - '@typespec/prettier-plugin-typespec': 0.44.0 - '@typespec/rest': 0.44.0_@typespec+compiler@0.44.0 - '@typespec/versioning': 0.44.0_@typespec+compiler@0.44.0 - ajv: 8.12.0 - ajv-errors: 3.0.0_ajv@8.12.0 - ajv-formats: 2.1.1 - chalk: 4.1.2 - cli-progress: 3.10.0 - command-exists: 1.2.9 - commonmark: 0.27.0 - compare-versions: 3.6.0 - copy-webpack-plugin: 7.0.0_webpack@5.40.0 - cpy-cli: 4.1.0 - diff: 4.0.2 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - expect: 26.6.2 - fs-extra: 10.1.0 - glob: 7.1.7 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c - jest-snapshot: 26.6.2 - js-yaml: 4.0.0 - jsonpath-plus: 6.0.1 - lodash: 4.17.21 - mkdirp: 0.5.6 - npm: 8.12.2 - npm-package-arg: 9.1.2 - pacote: 9.5.12 - prettier: 2.7.1 - recursive-diff: 1.0.9 - rimraf: 3.0.2 - safe-buffer: 5.2.0 - semver: 7.3.8 - source-map: 0.7.3 - source-map-support: 0.5.21 - tree-sitter: 0.20.1 - tree-sitter-python: 0.20.1 - tree-sitter-typescript: 0.20.1 - ts-jest: 29.0.5_jest@29.4.3+typescript@4.9.5 - ts-loader: 9.2.9_typescript@4.9.5+webpack@5.40.0 - ts-morph: 13.0.3 - ts-node: 10.9.1_40e6fc09aee2c476d0f03e8841c5b8df - typescript: 4.9.5 - typescript-json-schema: 0.53.1 - untildify: 4.0.0 - vscode-jsonrpc: 3.6.2 - vscode-languageserver: 3.5.1 - webpack: 5.40.0_webpack-cli@4.7.2 - webpack-cli: 4.7.2_webpack@5.40.0 - webpack-node-externals: 3.0.0 - winston: 3.7.2 - yaml-ast-parser: 0.0.43 - yargs: 17.2.1 - yarn: 1.22.17 + '@azure-tools/async-io': + specifier: ~3.0.0 + version: 3.0.254 + '@azure-tools/object-comparison': + specifier: ~3.0.0 + version: 3.0.253 + '@azure-tools/tasks': + specifier: ~3.0.0 + version: 3.0.255 + '@azure-tools/typespec-autorest': + specifier: ^0.36.0 + version: 0.36.1(@azure-tools/typespec-azure-core@0.36.0)(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.50.0)(@typespec/versioning@0.50.0) + '@azure-tools/typespec-azure-core': + specifier: ^0.36.0 + version: 0.36.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/rest@0.50.0) + '@azure-tools/uri': + specifier: ~3.1.1 + version: 3.1.1 + '@azure/logger': + specifier: ^1.0.2 + version: 1.0.4 + '@cadl-lang/compiler': + specifier: ^0.37.0 + version: 0.37.0 + '@rush-temp/autorest': + specifier: file:./projects/autorest.tgz + version: file:projects/autorest.tgz(ts-node@10.9.1) + '@rush-temp/cadl': + specifier: file:./projects/cadl.tgz + version: file:projects/cadl.tgz(ts-node@10.9.1)(webpack-cli@5.1.4)(webpack@5.89.0) + '@rush-temp/codegen': + specifier: file:./projects/codegen.tgz + version: file:projects/codegen.tgz(prettier@3.1.0)(ts-node@10.9.1) + '@rush-temp/codemodel': + specifier: file:./projects/codemodel.tgz + version: file:projects/codemodel.tgz(jest@29.7.0)(prettier@3.1.0) + '@rush-temp/common': + specifier: file:./projects/common.tgz + version: file:projects/common.tgz(prettier@3.1.0)(ts-node@10.9.1) + '@rush-temp/compare': + specifier: file:./projects/compare.tgz + version: file:projects/compare.tgz(prettier@3.1.0) + '@rush-temp/configuration': + specifier: file:./projects/configuration.tgz + version: file:projects/configuration.tgz(prettier@3.1.0)(ts-node@10.9.1) + '@rush-temp/core': + specifier: file:./projects/core.tgz + version: file:projects/core.tgz(ts-node@10.9.1) + '@rush-temp/datastore': + specifier: file:./projects/datastore.tgz + version: file:projects/datastore.tgz(prettier@3.1.0)(ts-node@10.9.1) + '@rush-temp/deduplication': + specifier: file:./projects/deduplication.tgz + version: file:projects/deduplication.tgz(prettier@3.1.0)(ts-node@10.9.1) + '@rush-temp/extension': + specifier: file:./projects/extension.tgz + version: file:projects/extension.tgz(prettier@3.1.0)(ts-node@10.9.1) + '@rush-temp/extension-base': + specifier: file:./projects/extension-base.tgz + version: file:projects/extension-base.tgz(jest@29.7.0)(prettier@3.1.0) + '@rush-temp/fixer': + specifier: file:./projects/fixer.tgz + version: file:projects/fixer.tgz(ts-node@10.9.1) + '@rush-temp/json': + specifier: file:./projects/json.tgz + version: file:projects/json.tgz(prettier@3.1.0)(ts-node@10.9.1) + '@rush-temp/jsonschema': + specifier: file:./projects/jsonschema.tgz + version: file:projects/jsonschema.tgz(prettier@3.1.0)(ts-node@10.9.1) + '@rush-temp/modelerfour': + specifier: file:./projects/modelerfour.tgz + version: file:projects/modelerfour.tgz(ts-node@10.9.1) + '@rush-temp/oai2-to-oai3': + specifier: file:./projects/oai2-to-oai3.tgz + version: file:projects/oai2-to-oai3.tgz(prettier@3.1.0)(ts-node@10.9.1) + '@rush-temp/openapi': + specifier: file:./projects/openapi.tgz + version: file:projects/openapi.tgz(prettier@3.1.0)(ts-node@10.9.1) + '@rush-temp/openapi-to-cadl': + specifier: file:./projects/openapi-to-cadl.tgz + version: file:projects/openapi-to-cadl.tgz(jest@29.7.0) + '@rush-temp/schemas': + specifier: file:./projects/schemas.tgz + version: file:projects/schemas.tgz + '@rush-temp/system-requirements': + specifier: file:./projects/system-requirements.tgz + version: file:projects/system-requirements.tgz(prettier@3.1.0)(ts-node@10.9.1) + '@rush-temp/test-public-packages': + specifier: file:./projects/test-public-packages.tgz + version: file:projects/test-public-packages.tgz(prettier@3.1.0) + '@rush-temp/test-utils': + specifier: file:./projects/test-utils.tgz + version: file:projects/test-utils.tgz(@types/node@20.9.0)(prettier@3.1.0)(ts-node@10.9.1) + '@rush-temp/yaml': + specifier: file:./projects/yaml.tgz + version: file:projects/yaml.tgz(prettier@3.1.0)(ts-node@10.9.1) + '@types/cli-progress': + specifier: ~3.9.2 + version: 3.9.2 + '@types/command-exists': + specifier: ~1.2.0 + version: 1.2.3 + '@types/commonmark': + specifier: ^0.27.0 + version: 0.27.9 + '@types/diff': + specifier: ^5.0.8 + version: 5.0.8 + '@types/fs-extra': + specifier: ^9.0.13 + version: 9.0.13 + '@types/glob': + specifier: ^7.1.3 + version: 7.2.0 + '@types/jest': + specifier: ^29.2.3 + version: 29.5.8 + '@types/js-yaml': + specifier: ~4.0.0 + version: 4.0.9 + '@types/lodash': + specifier: ~4.14.168 + version: 4.14.201 + '@types/node': + specifier: ~20.9.0 + version: 20.9.0 + '@types/npm-package-arg': + specifier: ^6.1.0 + version: 6.1.4 + '@types/pacote': + specifier: 11.1.3 + version: 11.1.3 + '@types/prettier': + specifier: ^2.7.0 + version: 2.7.3 + '@types/semver': + specifier: 5.5.0 + version: 5.5.0 + '@types/source-map-support': + specifier: ^0.5.3 + version: 0.5.10 + '@types/webpack': + specifier: ~5.28.5 + version: 5.28.5(webpack-cli@5.1.4) + '@types/yargs': + specifier: ~17.0.4 + version: 17.0.31 + '@typescript-eslint/eslint-plugin': + specifier: ^6.11.0 + version: 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': + specifier: ^6.11.0 + version: 6.11.0(eslint@8.53.0)(typescript@5.2.2) + '@typespec/compiler': + specifier: ^0.50.0 + version: 0.50.0 + '@typespec/http': + specifier: ^0.50.0 + version: 0.50.0(@typespec/compiler@0.50.0) + '@typespec/openapi': + specifier: ^0.50.0 + version: 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) + '@typespec/openapi3': + specifier: ^0.50.0 + version: 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/openapi@0.50.0)(@typespec/versioning@0.50.0) + '@typespec/prettier-plugin-typespec': + specifier: ^0.50.0 + version: 0.50.0 + '@typespec/rest': + specifier: ^0.50.0 + version: 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) + '@typespec/versioning': + specifier: ^0.50.0 + version: 0.50.0(@typespec/compiler@0.50.0) + ajv: + specifier: ^8.6.0 + version: 8.12.0 + ajv-errors: + specifier: ^3.0.0 + version: 3.0.0(ajv@8.12.0) + ajv-formats: + specifier: ^2.1.0 + version: 2.1.1(ajv@8.12.0) + chalk: + specifier: ^4.1.0 + version: 4.1.2 + cli-progress: + specifier: ~3.10.0 + version: 3.10.0 + command-exists: + specifier: ~1.2.9 + version: 1.2.9 + commonmark: + specifier: ^0.30.0 + version: 0.30.0 + compare-versions: + specifier: ^6.1.0 + version: 6.1.0 + copy-webpack-plugin: + specifier: ^11.0.0 + version: 11.0.0(webpack@5.89.0) + cpy-cli: + specifier: ~5.0.0 + version: 5.0.0 + diff: + specifier: ^5.1.0 + version: 5.1.0 + eslint: + specifier: ^8.28.0 + version: 8.53.0 + eslint-plugin-import: + specifier: ~2.29.0 + version: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: + specifier: ~27.6.0 + version: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: + specifier: ~11.1.0 + version: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: + specifier: ~5.0.1 + version: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: + specifier: ~49.0.0 + version: 49.0.0(eslint@8.53.0) + expect: + specifier: ~26.6.2 + version: 26.6.2 + fs-extra: + specifier: ^10.1.0 + version: 10.1.0 + glob: + specifier: ~7.1.4 + version: 7.1.7 + jest: + specifier: ^29.3.1 + version: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + jest-snapshot: + specifier: ~26.6.2 + version: 26.6.2 + js-yaml: + specifier: ~4.1.0 + version: 4.1.0 + jsonpath-plus: + specifier: ~6.0.1 + version: 6.0.1 + lodash: + specifier: ~4.17.20 + version: 4.17.21 + mkdirp: + specifier: ~3.0.1 + version: 3.0.1 + node-gyp: + specifier: ^10.0.1 + version: 10.0.1 + npm: + specifier: ~8.12.1 + version: 8.12.2 + npm-package-arg: + specifier: ^9.0.0 + version: 9.1.2 + pacote: + specifier: ~9.5.12 + version: 9.5.12 + prettier: + specifier: ~3.1.0 + version: 3.1.0 + recursive-diff: + specifier: ~1.0.6 + version: 1.0.9 + rimraf: + specifier: ^5.0.5 + version: 5.0.5 + safe-buffer: + specifier: 5.2.1 + version: 5.2.1 + semver: + specifier: ^7.3.5 + version: 7.5.4 + source-map: + specifier: ^0.8.0-beta.0 + version: 0.8.0-beta.0 + source-map-support: + specifier: ^0.5.19 + version: 0.5.21 + tree-sitter: + specifier: ^0.20.1 + version: 0.20.6 + tree-sitter-python: + specifier: 0.20.4 + version: 0.20.4 + tree-sitter-typescript: + specifier: ~0.20.1 + version: 0.20.3 + ts-jest: + specifier: ^29.0.3 + version: 29.1.1(jest@29.7.0)(typescript@5.2.2) + ts-loader: + specifier: ~9.5.1 + version: 9.5.1(typescript@5.2.2)(webpack@5.89.0) + ts-morph: + specifier: ~13.0.3 + version: 13.0.3 + ts-node: + specifier: ^10.9.1 + version: 10.9.1(@types/node@20.9.0)(typescript@5.2.2) + typescript: + specifier: ~5.2.2 + version: 5.2.2 + typescript-json-schema: + specifier: ~0.53.0 + version: 0.53.1 + untildify: + specifier: ^4.0.0 + version: 4.0.0 + vscode-jsonrpc: + specifier: ^3.5.0 + version: 3.6.2 + vscode-languageserver: + specifier: 9.0.1 + version: 9.0.1 + webpack: + specifier: ~5.89.0 + version: 5.89.0(webpack-cli@5.1.4) + webpack-cli: + specifier: ~5.1.4 + version: 5.1.4(webpack@5.89.0) + webpack-node-externals: + specifier: ~3.0.0 + version: 3.0.0 + winston: + specifier: ~3.7.2 + version: 3.7.2 + yaml-ast-parser: + specifier: 0.0.43 + version: 0.0.43 + yargs: + specifier: 17.2.1 + version: 17.2.1 + yarn: + specifier: 1.22.17 + version: 1.22.17 packages: - /@ampproject/remapping/2.2.0: - resolution: {integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==} + /@aashutoshrathi/word-wrap@1.2.6: + resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} + engines: {node: '>=0.10.0'} + dev: false + + /@ampproject/remapping@2.2.1: + resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} dependencies: - '@jridgewell/gen-mapping': 0.1.1 - '@jridgewell/trace-mapping': 0.3.17 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.20 dev: false - /@azure-tools/async-io/3.0.254: + /@azure-tools/async-io@3.0.254: resolution: {integrity: sha512-X1C7XdyCuo50ch9FzKtTvmK18FgDxxf1Bbt3cSoknQqeDaRegHSSCO+zByq2YA4NvUzKXeZ1engh29IDxZXgpQ==} engines: {node: '>=10.12.0'} dependencies: @@ -248,79 +371,49 @@ packages: proper-lockfile: 2.0.1 dev: false - /@azure-tools/cadl-autorest/0.26.0_f5ff21551b215835b7e99a28886af080: - resolution: {integrity: sha512-CoMddqhtZ7lP6O3hbX7Qxq3QeOou64IBmuf4Iz8dcTHOaLfrSoiJshbczEgO/mV62sY5kTmdamWEIi5ZRUpvWA==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@azure-tools/cadl-azure-core': ~0.26.0 - '@cadl-lang/compiler': ~0.40.0 - '@cadl-lang/openapi': ~0.40.0 - '@cadl-lang/rest': ~0.40.0 - '@cadl-lang/versioning': ~0.40.0 - dependencies: - '@azure-tools/cadl-azure-core': 0.26.0_3be7190ba2f4450e60a8695259029fc7 - '@cadl-lang/compiler': 0.40.0 - '@cadl-lang/openapi': 0.11.0_3be7190ba2f4450e60a8695259029fc7 - '@cadl-lang/rest': 0.40.0_@cadl-lang+compiler@0.40.0 - '@cadl-lang/versioning': 0.40.0 - dev: false - - /@azure-tools/cadl-azure-core/0.26.0_3be7190ba2f4450e60a8695259029fc7: - resolution: {integrity: sha512-PYmG/cp+QhyjuQa0jwTkkPp487d500FmPUB5rhjjx+OG080322d+uLeS9tx25dEq3GRoehEnF80qkupBjZBr1g==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@cadl-lang/compiler': ~0.40.0 - '@cadl-lang/rest': ~0.40.0 - dependencies: - '@cadl-lang/compiler': 0.40.0 - '@cadl-lang/lint': 0.40.0_@cadl-lang+compiler@0.40.0 - '@cadl-lang/rest': 0.40.0_@cadl-lang+compiler@0.40.0 - dev: false - - /@azure-tools/object-comparison/3.0.253: + /@azure-tools/object-comparison@3.0.253: resolution: {integrity: sha512-lpsO1TJmHvcXO8aDWyLeGx9H37AjGXyH0tMa56JbqV2xZRDzzJ5IuAcTjweP9g5WTShLGBvzp/nbODeQkakTjQ==} engines: {node: '>=10.12.0'} dev: false - /@azure-tools/tasks/3.0.255: + /@azure-tools/tasks@3.0.255: resolution: {integrity: sha512-GjALNLz7kWMEdRVbaN5g0cJHNAr3XVTbP0611Mv2UzMgGL6FOhNZJK+oPHJKLDR8EEDZNnkwPlyi7B+INXUSQA==} engines: {node: '>=10.12.0'} dev: false - /@azure-tools/typespec-autorest/0.30.1_91e9bc237b09edab58fb41bba362839f: - resolution: {integrity: sha512-AIYRhurwNFtoIYxJDEWLl5xB3sg+8a7pUdpahsxHmy0dGd3Dwrwm0OT1eJNjtBhNbdKLKgnmbEJ+sbPL47VnCQ==} - engines: {node: '>=16.0.0'} + /@azure-tools/typespec-autorest@0.36.1(@azure-tools/typespec-azure-core@0.36.0)(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.50.0)(@typespec/versioning@0.50.0): + resolution: {integrity: sha512-huNjjIVVToSfU04ABdlpGJUfA+fI8BsyJP/wAzl3FIJij/vwqMPQp9ioHXlTQGfxmpReyKreDQgCmyCxN5+6aA==} + engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-azure-core': ~0.30.1 - '@typespec/compiler': ~0.44.0 - '@typespec/http': ~0.44.0 - '@typespec/openapi': ~0.44.0 - '@typespec/rest': ~0.44.0 - '@typespec/versioning': ~0.44.0 - dependencies: - '@azure-tools/typespec-azure-core': 0.30.1_b20eabafba7aacdb8b5d08356213191f - '@typespec/compiler': 0.44.0 - '@typespec/http': 0.44.0_@typespec+compiler@0.44.0 - '@typespec/openapi': 0.44.0_b20eabafba7aacdb8b5d08356213191f - '@typespec/rest': 0.44.0_@typespec+compiler@0.44.0 - '@typespec/versioning': 0.44.0_@typespec+compiler@0.44.0 - dev: false - - /@azure-tools/typespec-azure-core/0.30.1_b20eabafba7aacdb8b5d08356213191f: - resolution: {integrity: sha512-FvdsQrxyAxBfC0lmF2qdWmQklFO/CDpuCWTNfPjiVnokkZM9IDiln3YA2SeZjrQXQR4tSLaJVlUTm7ML7S/65Q==} - engines: {node: '>=16.0.0'} + '@azure-tools/typespec-azure-core': ~0.36.0 + '@typespec/compiler': ~0.50.0 + '@typespec/http': ~0.50.0 + '@typespec/openapi': ~0.50.0 + '@typespec/rest': ~0.50.0 + '@typespec/versioning': ~0.50.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.36.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/rest@0.50.0) + '@typespec/compiler': 0.50.0 + '@typespec/http': 0.50.0(@typespec/compiler@0.50.0) + '@typespec/openapi': 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) + '@typespec/rest': 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) + '@typespec/versioning': 0.50.0(@typespec/compiler@0.50.0) + dev: false + + /@azure-tools/typespec-azure-core@0.36.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/rest@0.50.0): + resolution: {integrity: sha512-qyUSHJSDM4ftD1Z0nvkk0FrC86vLyYuYrPdi3wQVj+ReJZJts+7l9PVOXor05pfD9GT5ocRINndpGF7jokiqhg==} + engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.44.0 - '@typespec/http': ~0.44.0 - '@typespec/rest': ~0.44.0 + '@typespec/compiler': ~0.50.0 + '@typespec/http': ~0.50.0 + '@typespec/rest': ~0.50.0 dependencies: - '@typespec/compiler': 0.44.0 - '@typespec/http': 0.44.0_@typespec+compiler@0.44.0 - '@typespec/lint': 0.44.0_@typespec+compiler@0.44.0 - '@typespec/rest': 0.44.0_@typespec+compiler@0.44.0 + '@typespec/compiler': 0.50.0 + '@typespec/http': 0.50.0(@typespec/compiler@0.50.0) + '@typespec/rest': 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) dev: false - /@azure-tools/uri/3.1.1: + /@azure-tools/uri@3.1.1: resolution: {integrity: sha512-UgPgD+qVtm4ASYqoTDazjowimrmMGGEQqPnNk9K/8CZdi2oSLtGqX9S1++2+NDaHlq74VyxbcNMKoxgO+2CCUQ==} engines: {node: '>=10.12.0'} dependencies: @@ -332,359 +425,348 @@ packages: - supports-color dev: false - /@azure/logger/1.0.3: - resolution: {integrity: sha512-aK4s3Xxjrx3daZr3VylxejK3vG5ExXck5WOHDJ8in/k9AqlfIyFMMT1uG7u8mNjX+QRILTIn0/Xgschfh/dQ9g==} - engines: {node: '>=12.0.0'} + /@azure/logger@1.0.4: + resolution: {integrity: sha512-ustrPY8MryhloQj7OWGe+HrYx+aoiOxzbXTtgblbV3xwCqpzUK36phH3XNHQKj3EPonyFUuDTfR3qFhTEAuZEg==} + engines: {node: '>=14.0.0'} dependencies: - tslib: 2.5.0 + tslib: 2.6.2 dev: false - /@babel/code-frame/7.16.7: + /@babel/code-frame@7.16.7: resolution: {integrity: sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.18.6 - dev: false - - /@babel/code-frame/7.18.6: - resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.18.6 + '@babel/highlight': 7.22.20 dev: false - /@babel/code-frame/7.21.4: - resolution: {integrity: sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==} + /@babel/code-frame@7.22.13: + resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.18.6 + '@babel/highlight': 7.22.20 + chalk: 2.4.2 dev: false - /@babel/compat-data/7.21.0: - resolution: {integrity: sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g==} + /@babel/compat-data@7.23.3: + resolution: {integrity: sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==} engines: {node: '>=6.9.0'} dev: false - /@babel/core/7.21.0: - resolution: {integrity: sha512-PuxUbxcW6ZYe656yL3EAhpy7qXKq0DmYsrJLpbB8XrsCP9Nm+XCg9XFMb5vIDliPD7+U/+M+QJlH17XOcB7eXA==} + /@babel/core@7.23.3: + resolution: {integrity: sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==} engines: {node: '>=6.9.0'} dependencies: - '@ampproject/remapping': 2.2.0 - '@babel/code-frame': 7.18.6 - '@babel/generator': 7.21.1 - '@babel/helper-compilation-targets': 7.20.7_@babel+core@7.21.0 - '@babel/helper-module-transforms': 7.21.0 - '@babel/helpers': 7.21.0 - '@babel/parser': 7.21.1 - '@babel/template': 7.20.7 - '@babel/traverse': 7.21.0 - '@babel/types': 7.21.0 - convert-source-map: 1.9.0 + '@ampproject/remapping': 2.2.1 + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.23.3 + '@babel/helper-compilation-targets': 7.22.15 + '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.3) + '@babel/helpers': 7.23.2 + '@babel/parser': 7.23.3 + '@babel/template': 7.22.15 + '@babel/traverse': 7.23.3 + '@babel/types': 7.23.3 + convert-source-map: 2.0.0 debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.3 - semver: 6.3.0 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: false - /@babel/generator/7.21.1: - resolution: {integrity: sha512-1lT45bAYlQhFn/BHivJs43AiW2rg3/UbLyShGfF3C0KmHvO5fSghWd5kBJy30kpRRucGzXStvnnCFniCR2kXAA==} + /@babel/generator@7.23.3: + resolution: {integrity: sha512-keeZWAV4LU3tW0qRi19HRpabC/ilM0HRBBzf9/k8FFiG4KVpiv0FIy4hHfLfFQZNhziCTPTmd59zoyv6DNISzg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.0 - '@jridgewell/gen-mapping': 0.3.2 - '@jridgewell/trace-mapping': 0.3.17 + '@babel/types': 7.23.3 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.20 jsesc: 2.5.2 dev: false - /@babel/helper-compilation-targets/7.20.7_@babel+core@7.21.0: - resolution: {integrity: sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==} + /@babel/helper-compilation-targets@7.22.15: + resolution: {integrity: sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==} engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 dependencies: - '@babel/compat-data': 7.21.0 - '@babel/core': 7.21.0 - '@babel/helper-validator-option': 7.21.0 - browserslist: 4.21.5 + '@babel/compat-data': 7.23.3 + '@babel/helper-validator-option': 7.22.15 + browserslist: 4.22.1 lru-cache: 5.1.1 - semver: 6.3.0 + semver: 6.3.1 dev: false - /@babel/helper-environment-visitor/7.18.9: - resolution: {integrity: sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==} + /@babel/helper-environment-visitor@7.22.20: + resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} engines: {node: '>=6.9.0'} dev: false - /@babel/helper-function-name/7.21.0: - resolution: {integrity: sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==} + /@babel/helper-function-name@7.23.0: + resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.20.7 - '@babel/types': 7.21.0 + '@babel/template': 7.22.15 + '@babel/types': 7.23.3 dev: false - /@babel/helper-hoist-variables/7.18.6: - resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} + /@babel/helper-hoist-variables@7.22.5: + resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.0 + '@babel/types': 7.23.3 dev: false - /@babel/helper-module-imports/7.18.6: - resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} + /@babel/helper-module-imports@7.22.15: + resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.0 + '@babel/types': 7.23.3 dev: false - /@babel/helper-module-transforms/7.21.0: - resolution: {integrity: sha512-eD/JQ21IG2i1FraJnTMbUarAUkA7G988ofehG5MDCRXaUU91rEBJuCeSoou2Sk1y4RbLYXzqEg1QLwEmRU4qcQ==} + /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.3): + resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 dependencies: - '@babel/helper-environment-visitor': 7.18.9 - '@babel/helper-module-imports': 7.18.6 - '@babel/helper-simple-access': 7.20.2 - '@babel/helper-split-export-declaration': 7.18.6 - '@babel/helper-validator-identifier': 7.19.1 - '@babel/template': 7.20.7 - '@babel/traverse': 7.21.0 - '@babel/types': 7.21.0 - transitivePeerDependencies: - - supports-color + '@babel/core': 7.23.3 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-module-imports': 7.22.15 + '@babel/helper-simple-access': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/helper-validator-identifier': 7.22.20 dev: false - /@babel/helper-plugin-utils/7.20.2: - resolution: {integrity: sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==} + /@babel/helper-plugin-utils@7.22.5: + resolution: {integrity: sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==} engines: {node: '>=6.9.0'} dev: false - /@babel/helper-simple-access/7.20.2: - resolution: {integrity: sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==} + /@babel/helper-simple-access@7.22.5: + resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.0 + '@babel/types': 7.23.3 dev: false - /@babel/helper-split-export-declaration/7.18.6: - resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} + /@babel/helper-split-export-declaration@7.22.6: + resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.21.0 + '@babel/types': 7.23.3 dev: false - /@babel/helper-string-parser/7.19.4: - resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==} + /@babel/helper-string-parser@7.22.5: + resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} engines: {node: '>=6.9.0'} dev: false - /@babel/helper-validator-identifier/7.19.1: - resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} + /@babel/helper-validator-identifier@7.22.20: + resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} dev: false - /@babel/helper-validator-option/7.21.0: - resolution: {integrity: sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==} + /@babel/helper-validator-option@7.22.15: + resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} engines: {node: '>=6.9.0'} dev: false - /@babel/helpers/7.21.0: - resolution: {integrity: sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==} + /@babel/helpers@7.23.2: + resolution: {integrity: sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.20.7 - '@babel/traverse': 7.21.0 - '@babel/types': 7.21.0 + '@babel/template': 7.22.15 + '@babel/traverse': 7.23.3 + '@babel/types': 7.23.3 transitivePeerDependencies: - supports-color dev: false - /@babel/highlight/7.18.6: - resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} + /@babel/highlight@7.22.20: + resolution: {integrity: sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.19.1 + '@babel/helper-validator-identifier': 7.22.20 chalk: 2.4.2 js-tokens: 4.0.0 dev: false - /@babel/parser/7.21.1: - resolution: {integrity: sha512-JzhBFpkuhBNYUY7qs+wTzNmyCWUHEaAFpQQD2YfU1rPL38/L43Wvid0fFkiOCnHvsGncRZgEPyGnltABLcVDTg==} + /@babel/parser@7.23.3: + resolution: {integrity: sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==} engines: {node: '>=6.0.0'} hasBin: true dev: false - /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.21.0: + /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.23.3): resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.0 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/core': 7.23.3 + '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/plugin-syntax-bigint/7.8.3_@babel+core@7.21.0: + /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.23.3): resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.0 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/core': 7.23.3 + '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/plugin-syntax-class-properties/7.12.13_@babel+core@7.21.0: + /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.23.3): resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.0 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/core': 7.23.3 + '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.21.0: + /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.23.3): resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.0 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/core': 7.23.3 + '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/plugin-syntax-json-strings/7.8.3_@babel+core@7.21.0: + /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.23.3): resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.0 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/core': 7.23.3 + '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.21.0: - resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} + /@babel/plugin-syntax-jsx@7.23.3(@babel/core@7.23.3): + resolution: {integrity: sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.0 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/core': 7.23.3 + '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/plugin-syntax-logical-assignment-operators/7.10.4_@babel+core@7.21.0: + /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.23.3): resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.0 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/core': 7.23.3 + '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@babel+core@7.21.0: + /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.23.3): resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.0 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/core': 7.23.3 + '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/plugin-syntax-numeric-separator/7.10.4_@babel+core@7.21.0: + /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.23.3): resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.0 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/core': 7.23.3 + '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/plugin-syntax-object-rest-spread/7.8.3_@babel+core@7.21.0: + /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.23.3): resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.0 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/core': 7.23.3 + '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/plugin-syntax-optional-catch-binding/7.8.3_@babel+core@7.21.0: + /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.23.3): resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.0 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/core': 7.23.3 + '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/plugin-syntax-optional-chaining/7.8.3_@babel+core@7.21.0: + /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.23.3): resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.0 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/core': 7.23.3 + '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/plugin-syntax-top-level-await/7.14.5_@babel+core@7.21.0: + /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.23.3): resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.0 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/core': 7.23.3 + '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/plugin-syntax-typescript/7.20.0_@babel+core@7.21.0: - resolution: {integrity: sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==} + /@babel/plugin-syntax-typescript@7.23.3(@babel/core@7.23.3): + resolution: {integrity: sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.21.0 - '@babel/helper-plugin-utils': 7.20.2 + '@babel/core': 7.23.3 + '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/template/7.20.7: - resolution: {integrity: sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==} + /@babel/template@7.22.15: + resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.18.6 - '@babel/parser': 7.21.1 - '@babel/types': 7.21.0 + '@babel/code-frame': 7.22.13 + '@babel/parser': 7.23.3 + '@babel/types': 7.23.3 dev: false - /@babel/traverse/7.21.0: - resolution: {integrity: sha512-Xdt2P1H4LKTO8ApPfnO1KmzYMFpp7D/EinoXzLYN/cHcBNrVCAkAtGUcXnHXrl/VGktureU6fkQrHSBE2URfoA==} + /@babel/traverse@7.23.3: + resolution: {integrity: sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.18.6 - '@babel/generator': 7.21.1 - '@babel/helper-environment-visitor': 7.18.9 - '@babel/helper-function-name': 7.21.0 - '@babel/helper-hoist-variables': 7.18.6 - '@babel/helper-split-export-declaration': 7.18.6 - '@babel/parser': 7.21.1 - '@babel/types': 7.21.0 + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.23.3 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.23.0 + '@babel/helper-hoist-variables': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/parser': 7.23.3 + '@babel/types': 7.23.3 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color dev: false - /@babel/types/7.21.0: - resolution: {integrity: sha512-uR7NWq2VNFnDi7EYqiRz2Jv/VQIu38tu64Zy8TX2nQFQ6etJ9V/Rr2msW8BS132mum2rL645qpDrLtAJtVpuow==} + /@babel/types@7.23.3: + resolution: {integrity: sha512-OZnvoH2l8PK5eUvEcUyCt/sXgr/h+UWpVuBbOljwcrAgUl6lpchoQ++PHGyQy1AtYnVA6CEq3y5xeEI10brpXw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-string-parser': 7.19.4 - '@babel/helper-validator-identifier': 7.19.1 + '@babel/helper-string-parser': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 dev: false - /@bcoe/v8-coverage/0.2.3: + /@bcoe/v8-coverage@0.2.3: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: false - /@cadl-lang/compiler/0.37.0: + /@cadl-lang/compiler@0.37.0: resolution: {integrity: sha512-jHMqPZmM4evQlu7oY9vj6PEM+f+OhnfPqAdwxALrU2gwsLcwYG1h8rkjX/iK2KfeewCbXuRT/hztOTo3pcbYWA==} engines: {node: '>=16.0.0'} hasBin: true @@ -692,100 +774,21 @@ packages: '@babel/code-frame': 7.16.7 ajv: 8.9.0 change-case: 4.1.2 - globby: 13.1.3 + globby: 13.1.4 js-yaml: 4.1.0 mkdirp: 1.0.4 mustache: 4.2.0 node-fetch: 3.2.8 - node-watch: 0.7.3 + node-watch: 0.7.4 picocolors: 1.0.0 prettier: 2.7.1 prompts: 2.4.2 vscode-languageserver: 7.0.0 - vscode-languageserver-textdocument: 1.0.8 + vscode-languageserver-textdocument: 1.0.11 yargs: 17.3.1 dev: false - /@cadl-lang/compiler/0.40.0: - resolution: {integrity: sha512-4u/Dnm39Ma+8wH0SDu7ya1+2oBRDiNByiRoijwyScHRec26UWLyWvHMvvU89ISU6O8Vwtq0bpmbD7FeJTnlbHw==} - engines: {node: '>=16.0.0'} - hasBin: true - dependencies: - '@babel/code-frame': 7.18.6 - ajv: 8.11.2 - change-case: 4.1.2 - globby: 13.1.3 - js-yaml: 4.1.0 - mkdirp: 1.0.4 - mustache: 4.2.0 - node-fetch: 3.2.8 - node-watch: 0.7.3 - picocolors: 1.0.0 - prettier: 2.8.4 - prompts: 2.4.2 - vscode-languageserver: 8.0.2 - vscode-languageserver-textdocument: 1.0.8 - yargs: 17.6.2 - dev: false - - /@cadl-lang/lint/0.40.0_@cadl-lang+compiler@0.40.0: - resolution: {integrity: sha512-V/V5Msuurhb7kVZsvuAKVAHq4twmC5YC5k/t7YJWETOowFXepgIneWJPH2TDyyzO9WqJjqRJVRXPTrTuKuNFsA==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@cadl-lang/compiler': ~0.40.0 - dependencies: - '@cadl-lang/compiler': 0.40.0 - dev: false - - /@cadl-lang/openapi/0.11.0_3be7190ba2f4450e60a8695259029fc7: - resolution: {integrity: sha512-miVNnGNq1VOdirTEStKIi00AMxPi/C53bGizrdqBUS7ZJ1vDQR7pq9hbPNYX8K7qAjMMSrJQykZc0xTOB/Jlow==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@cadl-lang/compiler': ~0.34.0 - '@cadl-lang/rest': ~0.16.0 - dependencies: - '@cadl-lang/compiler': 0.40.0 - '@cadl-lang/rest': 0.40.0_@cadl-lang+compiler@0.40.0 - dev: false - - /@cadl-lang/openapi3/0.14.0_62b7473d9f647402d044da26a5647f70: - resolution: {integrity: sha512-NLNeVIBFmpy3KNy1T8coftynVLOUOk4HBWYtqsaciEkrbAGRbJrNfzbC42mRGqr/yBD6Iyo03B5V3H1pKcAyEA==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@cadl-lang/compiler': ~0.34.0 - '@cadl-lang/openapi': ~0.11.0 - '@cadl-lang/rest': ~0.16.0 - '@cadl-lang/versioning': ~0.7.0 - dependencies: - '@cadl-lang/compiler': 0.40.0 - '@cadl-lang/openapi': 0.11.0_3be7190ba2f4450e60a8695259029fc7 - '@cadl-lang/rest': 0.40.0_@cadl-lang+compiler@0.40.0 - '@cadl-lang/versioning': 0.40.0 - dev: false - - /@cadl-lang/prettier-plugin-cadl/0.40.0: - resolution: {integrity: sha512-ZCO2UKVo4sz4J3JCEsC5po2HPZh2Ctc0S5IS9QZaRc6GsvKY29lYedFXGU5l4NBlsrRDRTt0svHjd8zuVtre9w==} - dependencies: - prettier: 2.8.4 - dev: false - - /@cadl-lang/rest/0.40.0_@cadl-lang+compiler@0.40.0: - resolution: {integrity: sha512-WfGq6lN87adRKsKd3XtztvOLXHzyFlDRQiEcXKfnwXia37zVwK355KX39P1RimQ9mpDsmXaGG4ETkdUSWvXe7w==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@cadl-lang/compiler': ~0.40.0 - dependencies: - '@cadl-lang/compiler': 0.40.0 - dev: false - - /@cadl-lang/versioning/0.40.0: - resolution: {integrity: sha512-HK/jw0kxo/6RwbnR7nPyCj2kJ94uZbBhEmS08ms+fX4UB4nDNBXqXFwMwgftVZ2qdS9xEkRhLqpVYfEPzlFBJw==} - engines: {node: '>=16.0.0'} - dependencies: - '@cadl-lang/compiler': 0.40.0 - dev: false - - /@cnakazawa/watch/1.0.4: + /@cnakazawa/watch@1.0.4: resolution: {integrity: sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==} engines: {node: '>=0.1.95'} hasBin: true @@ -794,19 +797,19 @@ packages: minimist: 1.2.8 dev: false - /@colors/colors/1.5.0: - resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} + /@colors/colors@1.6.0: + resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} engines: {node: '>=0.1.90'} dev: false - /@cspotcode/source-map-support/0.8.1: + /@cspotcode/source-map-support@0.8.1: resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} dependencies: '@jridgewell/trace-mapping': 0.3.9 dev: false - /@dabh/diagnostics/2.0.3: + /@dabh/diagnostics@2.0.3: resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} dependencies: colorspace: 1.1.4 @@ -814,19 +817,34 @@ packages: kuler: 2.0.0 dev: false - /@discoveryjs/json-ext/0.5.7: + /@discoveryjs/json-ext@0.5.7: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} dev: false - /@eslint/eslintrc/1.4.1: - resolution: {integrity: sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==} + /@eslint-community/eslint-utils@4.4.0(eslint@8.53.0): + resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + dependencies: + eslint: 8.53.0 + eslint-visitor-keys: 3.4.3 + dev: false + + /@eslint-community/regexpp@4.10.0: + resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dev: false + + /@eslint/eslintrc@2.1.3: + resolution: {integrity: sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4 - espree: 9.4.1 - globals: 13.20.0 + espree: 9.6.1 + globals: 13.23.0 ignore: 5.2.4 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -836,27 +854,44 @@ packages: - supports-color dev: false - /@humanwhocodes/config-array/0.11.8: - resolution: {integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==} + /@eslint/js@8.53.0: + resolution: {integrity: sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: false + + /@humanwhocodes/config-array@0.11.13: + resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 1.2.1 + '@humanwhocodes/object-schema': 2.0.1 debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: - supports-color dev: false - /@humanwhocodes/module-importer/1.0.1: + /@humanwhocodes/module-importer@1.0.1: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} dev: false - /@humanwhocodes/object-schema/1.2.1: - resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + /@humanwhocodes/object-schema@2.0.1: + resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} dev: false - /@istanbuljs/load-nyc-config/1.1.0: + /@isaacs/cliui@8.0.2: + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + dependencies: + string-width: 5.1.2 + string-width-cjs: /string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: /strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: /wrap-ansi@7.0.0 + dev: false + + /@istanbuljs/load-nyc-config@1.1.0: resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} dependencies: @@ -867,25 +902,25 @@ packages: resolve-from: 5.0.0 dev: false - /@istanbuljs/schema/0.1.3: + /@istanbuljs/schema@0.1.3: resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} engines: {node: '>=8'} dev: false - /@jest/console/29.4.3: - resolution: {integrity: sha512-W/o/34+wQuXlgqlPYTansOSiBnuxrTv61dEVkA6HNmpcgHLUjfaUbdqt6oVvOzaawwo9IdW9QOtMgQ1ScSZC4A==} + /@jest/console@29.7.0: + resolution: {integrity: sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.4.3 - '@types/node': 16.18.12 + '@jest/types': 29.6.3 + '@types/node': 20.9.0 chalk: 4.1.2 - jest-message-util: 29.4.3 - jest-util: 29.4.3 + jest-message-util: 29.7.0 + jest-util: 29.7.0 slash: 3.0.0 dev: false - /@jest/core/29.4.3_ts-node@10.9.1: - resolution: {integrity: sha512-56QvBq60fS4SPZCuM7T+7scNrkGIe7Mr6PVIXUpu48ouvRaWOFqRPV91eifvFM0ay2HmfswXiGf97NGUN5KofQ==} + /@jest/core@29.7.0(ts-node@10.9.1): + resolution: {integrity: sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 @@ -893,92 +928,93 @@ packages: node-notifier: optional: true dependencies: - '@jest/console': 29.4.3 - '@jest/reporters': 29.4.3 - '@jest/test-result': 29.4.3 - '@jest/transform': 29.4.3 - '@jest/types': 29.4.3 - '@types/node': 16.18.12 + '@jest/console': 29.7.0 + '@jest/reporters': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.9.0 ansi-escapes: 4.3.2 chalk: 4.1.2 - ci-info: 3.8.0 + ci-info: 3.9.0 exit: 0.1.2 - graceful-fs: 4.2.10 - jest-changed-files: 29.4.3 - jest-config: 29.4.3_31ebacd0d2b6f293762e37627c281d48 - jest-haste-map: 29.4.3 - jest-message-util: 29.4.3 - jest-regex-util: 29.4.3 - jest-resolve: 29.4.3 - jest-resolve-dependencies: 29.4.3 - jest-runner: 29.4.3 - jest-runtime: 29.4.3 - jest-snapshot: 29.4.3 - jest-util: 29.4.3 - jest-validate: 29.4.3 - jest-watcher: 29.4.3 + graceful-fs: 4.2.11 + jest-changed-files: 29.7.0 + jest-config: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-resolve-dependencies: 29.7.0 + jest-runner: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 + jest-watcher: 29.7.0 micromatch: 4.0.5 - pretty-format: 29.4.3 + pretty-format: 29.7.0 slash: 3.0.0 strip-ansi: 6.0.1 transitivePeerDependencies: + - babel-plugin-macros - supports-color - ts-node dev: false - /@jest/environment/29.4.3: - resolution: {integrity: sha512-dq5S6408IxIa+lr54zeqce+QgI+CJT4nmmA+1yzFgtcsGK8c/EyiUb9XQOgz3BMKrRDfKseeOaxj2eO8LlD3lA==} + /@jest/environment@29.7.0: + resolution: {integrity: sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/fake-timers': 29.4.3 - '@jest/types': 29.4.3 - '@types/node': 16.18.12 - jest-mock: 29.4.3 + '@jest/fake-timers': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.9.0 + jest-mock: 29.7.0 dev: false - /@jest/expect-utils/29.4.3: - resolution: {integrity: sha512-/6JWbkxHOP8EoS8jeeTd9dTfc9Uawi+43oLKHfp6zzux3U2hqOOVnV3ai4RpDYHOccL6g+5nrxpoc8DmJxtXVQ==} + /@jest/expect-utils@29.7.0: + resolution: {integrity: sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - jest-get-type: 29.4.3 + jest-get-type: 29.6.3 dev: false - /@jest/expect/29.4.3: - resolution: {integrity: sha512-iktRU/YsxEtumI9zsPctYUk7ptpC+AVLLk1Ax3AsA4g1C+8OOnKDkIQBDHtD5hA/+VtgMd5AWI5gNlcAlt2vxQ==} + /@jest/expect@29.7.0: + resolution: {integrity: sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - expect: 29.4.3 - jest-snapshot: 29.4.3 + expect: 29.7.0 + jest-snapshot: 29.7.0 transitivePeerDependencies: - supports-color dev: false - /@jest/fake-timers/29.4.3: - resolution: {integrity: sha512-4Hote2MGcCTWSD2gwl0dwbCpBRHhE6olYEuTj8FMowdg3oQWNKr2YuxenPQYZ7+PfqPY1k98wKDU4Z+Hvd4Tiw==} + /@jest/fake-timers@29.7.0: + resolution: {integrity: sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.4.3 - '@sinonjs/fake-timers': 10.0.2 - '@types/node': 16.18.12 - jest-message-util: 29.4.3 - jest-mock: 29.4.3 - jest-util: 29.4.3 + '@jest/types': 29.6.3 + '@sinonjs/fake-timers': 10.3.0 + '@types/node': 20.9.0 + jest-message-util: 29.7.0 + jest-mock: 29.7.0 + jest-util: 29.7.0 dev: false - /@jest/globals/29.4.3: - resolution: {integrity: sha512-8BQ/5EzfOLG7AaMcDh7yFCbfRLtsc+09E1RQmRBI4D6QQk4m6NSK/MXo+3bJrBN0yU8A2/VIcqhvsOLFmziioA==} + /@jest/globals@29.7.0: + resolution: {integrity: sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/environment': 29.4.3 - '@jest/expect': 29.4.3 - '@jest/types': 29.4.3 - jest-mock: 29.4.3 + '@jest/environment': 29.7.0 + '@jest/expect': 29.7.0 + '@jest/types': 29.6.3 + jest-mock: 29.7.0 transitivePeerDependencies: - supports-color dev: false - /@jest/reporters/29.4.3: - resolution: {integrity: sha512-sr2I7BmOjJhyqj9ANC6CTLsL4emMoka7HkQpcoMRlhCbQJjz2zsRzw0BDPiPyEFDXAbxKgGFYuQZiSJ1Y6YoTg==} + /@jest/reporters@29.7.0: + resolution: {integrity: sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 @@ -987,168 +1023,160 @@ packages: optional: true dependencies: '@bcoe/v8-coverage': 0.2.3 - '@jest/console': 29.4.3 - '@jest/test-result': 29.4.3 - '@jest/transform': 29.4.3 - '@jest/types': 29.4.3 - '@jridgewell/trace-mapping': 0.3.17 - '@types/node': 16.18.12 + '@jest/console': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.20 + '@types/node': 20.9.0 chalk: 4.1.2 - collect-v8-coverage: 1.0.1 + collect-v8-coverage: 1.0.2 exit: 0.1.2 glob: 7.1.7 - graceful-fs: 4.2.10 - istanbul-lib-coverage: 3.2.0 - istanbul-lib-instrument: 5.2.1 - istanbul-lib-report: 3.0.0 + graceful-fs: 4.2.11 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-instrument: 6.0.1 + istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 4.0.1 - istanbul-reports: 3.1.5 - jest-message-util: 29.4.3 - jest-util: 29.4.3 - jest-worker: 29.4.3 + istanbul-reports: 3.1.6 + jest-message-util: 29.7.0 + jest-util: 29.7.0 + jest-worker: 29.7.0 slash: 3.0.0 string-length: 4.0.2 strip-ansi: 6.0.1 - v8-to-istanbul: 9.1.0 + v8-to-istanbul: 9.1.3 transitivePeerDependencies: - supports-color dev: false - /@jest/schemas/29.4.3: - resolution: {integrity: sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==} + /@jest/schemas@29.6.3: + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@sinclair/typebox': 0.25.23 + '@sinclair/typebox': 0.27.8 dev: false - /@jest/source-map/29.4.3: - resolution: {integrity: sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w==} + /@jest/source-map@29.6.3: + resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jridgewell/trace-mapping': 0.3.17 + '@jridgewell/trace-mapping': 0.3.20 callsites: 3.1.0 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 dev: false - /@jest/test-result/29.4.3: - resolution: {integrity: sha512-Oi4u9NfBolMq9MASPwuWTlC5WvmNRwI4S8YrQg5R5Gi47DYlBe3sh7ILTqi/LGrK1XUE4XY9KZcQJTH1WJCLLA==} + /@jest/test-result@29.7.0: + resolution: {integrity: sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/console': 29.4.3 - '@jest/types': 29.4.3 - '@types/istanbul-lib-coverage': 2.0.4 - collect-v8-coverage: 1.0.1 + '@jest/console': 29.7.0 + '@jest/types': 29.6.3 + '@types/istanbul-lib-coverage': 2.0.6 + collect-v8-coverage: 1.0.2 dev: false - /@jest/test-sequencer/29.4.3: - resolution: {integrity: sha512-yi/t2nES4GB4G0mjLc0RInCq/cNr9dNwJxcGg8sslajua5Kb4kmozAc+qPLzplhBgfw1vLItbjyHzUN92UXicw==} + /@jest/test-sequencer@29.7.0: + resolution: {integrity: sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/test-result': 29.4.3 - graceful-fs: 4.2.10 - jest-haste-map: 29.4.3 + '@jest/test-result': 29.7.0 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 slash: 3.0.0 dev: false - /@jest/transform/29.4.3: - resolution: {integrity: sha512-8u0+fBGWolDshsFgPQJESkDa72da/EVwvL+II0trN2DR66wMwiQ9/CihaGfHdlLGFzbBZwMykFtxuwFdZqlKwg==} + /@jest/transform@29.7.0: + resolution: {integrity: sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/core': 7.21.0 - '@jest/types': 29.4.3 - '@jridgewell/trace-mapping': 0.3.17 + '@babel/core': 7.23.3 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.20 babel-plugin-istanbul: 6.1.1 chalk: 4.1.2 convert-source-map: 2.0.0 fast-json-stable-stringify: 2.1.0 - graceful-fs: 4.2.10 - jest-haste-map: 29.4.3 - jest-regex-util: 29.4.3 - jest-util: 29.4.3 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + jest-regex-util: 29.6.3 + jest-util: 29.7.0 micromatch: 4.0.5 - pirates: 4.0.5 + pirates: 4.0.6 slash: 3.0.0 write-file-atomic: 4.0.2 transitivePeerDependencies: - supports-color dev: false - /@jest/types/26.6.2: + /@jest/types@26.6.2: resolution: {integrity: sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==} engines: {node: '>= 10.14.2'} dependencies: - '@types/istanbul-lib-coverage': 2.0.4 - '@types/istanbul-reports': 3.0.1 - '@types/node': 16.18.12 - '@types/yargs': 15.0.15 + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports': 3.0.4 + '@types/node': 20.9.0 + '@types/yargs': 15.0.18 chalk: 4.1.2 dev: false - /@jest/types/29.4.3: - resolution: {integrity: sha512-bPYfw8V65v17m2Od1cv44FH+SiKW7w2Xu7trhcdTLUmSv85rfKsP+qXSjO4KGJr4dtPSzl/gvslZBXctf1qGEA==} + /@jest/types@29.6.3: + resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/schemas': 29.4.3 - '@types/istanbul-lib-coverage': 2.0.4 - '@types/istanbul-reports': 3.0.1 - '@types/node': 16.18.12 - '@types/yargs': 17.0.22 + '@jest/schemas': 29.6.3 + '@types/istanbul-lib-coverage': 2.0.6 + '@types/istanbul-reports': 3.0.4 + '@types/node': 20.9.0 + '@types/yargs': 17.0.31 chalk: 4.1.2 dev: false - /@jridgewell/gen-mapping/0.1.1: - resolution: {integrity: sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==} + /@jridgewell/gen-mapping@0.3.3: + resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} engines: {node: '>=6.0.0'} dependencies: '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping': 0.3.20 dev: false - /@jridgewell/gen-mapping/0.3.2: - resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==} + /@jridgewell/resolve-uri@3.1.1: + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.14 - '@jridgewell/trace-mapping': 0.3.17 dev: false - /@jridgewell/resolve-uri/3.1.0: - resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} - engines: {node: '>=6.0.0'} - dev: false - - /@jridgewell/set-array/1.1.2: + /@jridgewell/set-array@1.1.2: resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} engines: {node: '>=6.0.0'} dev: false - /@jridgewell/source-map/0.3.2: - resolution: {integrity: sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==} + /@jridgewell/source-map@0.3.5: + resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==} dependencies: - '@jridgewell/gen-mapping': 0.3.2 - '@jridgewell/trace-mapping': 0.3.17 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.20 dev: false - /@jridgewell/sourcemap-codec/1.4.14: - resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} + /@jridgewell/sourcemap-codec@1.4.15: + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} dev: false - /@jridgewell/trace-mapping/0.3.17: - resolution: {integrity: sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==} + /@jridgewell/trace-mapping@0.3.20: + resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==} dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 dev: false - /@jridgewell/trace-mapping/0.3.9: + /@jridgewell/trace-mapping@0.3.9: resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 dev: false - /@nodelib/fs.scandir/2.1.5: + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} dependencies: @@ -1156,12 +1184,12 @@ packages: run-parallel: 1.2.0 dev: false - /@nodelib/fs.stat/2.0.5: + /@nodelib/fs.stat@2.0.5: resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} engines: {node: '>= 8'} dev: false - /@nodelib/fs.walk/1.2.8: + /@nodelib/fs.walk@1.2.8: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} dependencies: @@ -1169,393 +1197,427 @@ packages: fastq: 1.15.0 dev: false - /@sinclair/typebox/0.25.23: - resolution: {integrity: sha512-VEB8ygeP42CFLWyAJhN5OklpxUliqdNEUcXb4xZ/CINqtYGTjL5ukluKdKzQ0iWdUxyQ7B0539PAUhHKrCNWSQ==} + /@npmcli/agent@2.2.0: + resolution: {integrity: sha512-2yThA1Es98orMkpSLVqlDZAMPK3jHJhifP2gnNUdk1754uZ8yI5c+ulCoVG+WlntQA6MzhrURMXjSd9Z7dJ2/Q==} + engines: {node: ^16.14.0 || >=18.0.0} + dependencies: + agent-base: 7.1.0 + http-proxy-agent: 7.0.0 + https-proxy-agent: 7.0.2 + lru-cache: 10.0.2 + socks-proxy-agent: 8.0.2 + transitivePeerDependencies: + - supports-color + dev: false + + /@npmcli/fs@3.1.0: + resolution: {integrity: sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + semver: 7.5.4 + dev: false + + /@pkgjs/parseargs@0.11.0: + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + requiresBuild: true + dev: false + optional: true + + /@pkgr/utils@2.4.2: + resolution: {integrity: sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + dependencies: + cross-spawn: 7.0.3 + fast-glob: 3.3.2 + is-glob: 4.0.3 + open: 9.1.0 + picocolors: 1.0.0 + tslib: 2.6.2 + dev: false + + /@sinclair/typebox@0.27.8: + resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: false - /@sinonjs/commons/2.0.0: - resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} + /@sinonjs/commons@3.0.0: + resolution: {integrity: sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==} dependencies: type-detect: 4.0.8 dev: false - /@sinonjs/fake-timers/10.0.2: - resolution: {integrity: sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw==} + /@sinonjs/fake-timers@10.3.0: + resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} dependencies: - '@sinonjs/commons': 2.0.0 + '@sinonjs/commons': 3.0.0 dev: false - /@tootallnate/once/1.1.2: + /@tootallnate/once@1.1.2: resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==} engines: {node: '>= 6'} dev: false - /@ts-morph/common/0.12.3: + /@ts-morph/common@0.12.3: resolution: {integrity: sha512-4tUmeLyXJnJWvTFOKtcNJ1yh0a3SsTLi2MUoyj8iUNznFRN1ZquaNe7Oukqrnki2FzZkm0J9adCNLDZxUzvj+w==} dependencies: - fast-glob: 3.2.12 + fast-glob: 3.3.2 minimatch: 3.1.2 mkdirp: 1.0.4 path-browserify: 1.0.1 dev: false - /@tsconfig/node10/1.0.9: + /@tsconfig/node10@1.0.9: resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} dev: false - /@tsconfig/node12/1.0.11: + /@tsconfig/node12@1.0.11: resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} dev: false - /@tsconfig/node14/1.0.3: + /@tsconfig/node14@1.0.3: resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} dev: false - /@tsconfig/node16/1.0.3: - resolution: {integrity: sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==} + /@tsconfig/node16@1.0.4: + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} dev: false - /@types/babel__core/7.20.0: - resolution: {integrity: sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ==} + /@types/babel__core@7.20.4: + resolution: {integrity: sha512-mLnSC22IC4vcWiuObSRjrLd9XcBTGf59vUSoq2jkQDJ/QQ8PMI9rSuzE+aEV8karUMbskw07bKYoUJCKTUaygg==} dependencies: - '@babel/parser': 7.21.1 - '@babel/types': 7.21.0 - '@types/babel__generator': 7.6.4 - '@types/babel__template': 7.4.1 - '@types/babel__traverse': 7.18.3 + '@babel/parser': 7.23.3 + '@babel/types': 7.23.3 + '@types/babel__generator': 7.6.7 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.20.4 dev: false - /@types/babel__generator/7.6.4: - resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} + /@types/babel__generator@7.6.7: + resolution: {integrity: sha512-6Sfsq+EaaLrw4RmdFWE9Onp63TOUue71AWb4Gpa6JxzgTYtimbM086WnYTy2U67AofR++QKCo08ZP6pwx8YFHQ==} dependencies: - '@babel/types': 7.21.0 + '@babel/types': 7.23.3 dev: false - /@types/babel__template/7.4.1: - resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} + /@types/babel__template@7.4.4: + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} dependencies: - '@babel/parser': 7.21.1 - '@babel/types': 7.21.0 + '@babel/parser': 7.23.3 + '@babel/types': 7.23.3 dev: false - /@types/babel__traverse/7.18.3: - resolution: {integrity: sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w==} + /@types/babel__traverse@7.20.4: + resolution: {integrity: sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA==} dependencies: - '@babel/types': 7.21.0 + '@babel/types': 7.23.3 dev: false - /@types/cli-progress/3.9.2: + /@types/cli-progress@3.9.2: resolution: {integrity: sha512-VO5/X5Ij+oVgEVjg5u0IXVe3JQSKJX+Ev8C5x+0hPy0AuWyW+bF8tbajR7cPFnDGhs7pidztcac+ccrDtk5teA==} dependencies: - '@types/node': 14.14.45 + '@types/node': 20.9.0 dev: false - /@types/command-exists/1.2.0: - resolution: {integrity: sha512-ugsxEJfsCuqMLSuCD4PIJkp5Uk2z6TCMRCgYVuhRo5cYQY3+1xXTQkSlPtkpGHuvWMjS2KTeVQXxkXRACMbM6A==} + /@types/command-exists@1.2.3: + resolution: {integrity: sha512-PpbaE2XWLaWYboXD6k70TcXO/OdOyyRFq5TVpmlUELNxdkkmXU9fkImNosmXU1DtsNrqdUgWd/nJQYXgwmtdXQ==} dev: false - /@types/commonmark/0.27.5: - resolution: {integrity: sha512-vIqgmHyLsc8Or3EWLz6QkhI8/v61FNeH0yxRupA7VqSbA2eFMoHHJAhZSHudplAV89wqg1CKSmShE016ziRXuw==} + /@types/commonmark@0.27.9: + resolution: {integrity: sha512-d3+57WgyPCcIc6oshmcPkmP4+JqRRot9eeZLsBsutWtIxwWivpoyc2wEcolOp8MyO3ZWN846mMdoR02kdHSMCw==} dev: false - /@types/diff/4.0.2: - resolution: {integrity: sha512-mIenTfsIe586/yzsyfql69KRnA75S8SVXQbTLpDejRrjH0QSJcpu3AUOi/Vjnt9IOsXKxPhJfGpQUNMueIU1fQ==} + /@types/diff@5.0.8: + resolution: {integrity: sha512-kR0gRf0wMwpxQq6ME5s+tWk9zVCfJUl98eRkD05HWWRbhPB/eu4V1IbyZAsvzC1Gn4znBJ0HN01M4DGXdBEV8Q==} dev: false - /@types/eslint-scope/3.7.4: - resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==} + /@types/eslint-scope@3.7.7: + resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==} dependencies: - '@types/eslint': 8.21.1 - '@types/estree': 0.0.47 + '@types/eslint': 8.44.7 + '@types/estree': 1.0.5 dev: false - /@types/eslint/8.21.1: - resolution: {integrity: sha512-rc9K8ZpVjNcLs8Fp0dkozd5Pt2Apk1glO4Vgz8ix1u6yFByxfqo5Yavpy65o+93TAe24jr7v+eSBtFLvOQtCRQ==} + /@types/eslint@8.44.7: + resolution: {integrity: sha512-f5ORu2hcBbKei97U73mf+l9t4zTGl74IqZ0GQk4oVea/VS8tQZYkUveSYojk+frraAVYId0V2WC9O4PTNru2FQ==} dependencies: - '@types/estree': 0.0.47 - '@types/json-schema': 7.0.11 + '@types/estree': 1.0.5 + '@types/json-schema': 7.0.15 dev: false - /@types/estree/0.0.47: - resolution: {integrity: sha512-c5ciR06jK8u9BstrmJyO97m+klJrrhCf9u3rLu3DEAJBirxRqSCvDQoYKmxuYwQI5SZChAWu+tq9oVlGRuzPAg==} + /@types/estree@1.0.5: + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} dev: false - /@types/fs-extra/9.0.13: + /@types/fs-extra@9.0.13: resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} dependencies: - '@types/node': 14.14.45 + '@types/node': 20.9.0 dev: false - /@types/glob/7.2.0: + /@types/glob@7.2.0: resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} dependencies: '@types/minimatch': 5.1.2 - '@types/node': 14.14.45 + '@types/node': 20.9.0 dev: false - /@types/graceful-fs/4.1.6: - resolution: {integrity: sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==} + /@types/graceful-fs@4.1.9: + resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} dependencies: - '@types/node': 16.18.12 + '@types/node': 20.9.0 dev: false - /@types/istanbul-lib-coverage/2.0.4: - resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} + /@types/istanbul-lib-coverage@2.0.6: + resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} dev: false - /@types/istanbul-lib-report/3.0.0: - resolution: {integrity: sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==} + /@types/istanbul-lib-report@3.0.3: + resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} dependencies: - '@types/istanbul-lib-coverage': 2.0.4 + '@types/istanbul-lib-coverage': 2.0.6 dev: false - /@types/istanbul-reports/3.0.1: - resolution: {integrity: sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==} + /@types/istanbul-reports@3.0.4: + resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} dependencies: - '@types/istanbul-lib-report': 3.0.0 + '@types/istanbul-lib-report': 3.0.3 dev: false - /@types/jest/29.4.0: - resolution: {integrity: sha512-VaywcGQ9tPorCX/Jkkni7RWGFfI11whqzs8dvxF41P17Z+z872thvEvlIbznjPJ02kl1HMX3LmLOonsj2n7HeQ==} + /@types/jest@29.5.8: + resolution: {integrity: sha512-fXEFTxMV2Co8ZF5aYFJv+YeA08RTYJfhtN5c9JSv/mFEMe+xxjufCb+PHL+bJcMs/ebPUsBu+UNTEz+ydXrR6g==} dependencies: - expect: 29.4.3 - pretty-format: 29.4.3 + expect: 29.7.0 + pretty-format: 29.7.0 dev: false - /@types/js-yaml/4.0.5: - resolution: {integrity: sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA==} + /@types/js-yaml@4.0.9: + resolution: {integrity: sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==} dev: false - /@types/json-schema/7.0.11: - resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} + /@types/json-schema@7.0.15: + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: false - /@types/json5/0.0.29: + /@types/json5@0.0.29: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: false - /@types/lodash/4.14.191: - resolution: {integrity: sha512-BdZ5BCCvho3EIXw6wUCXHe7rS53AIDPLE+JzwgT+OsJk53oBfbSmZZ7CX4VaRoN78N+TJpFi9QPlfIVNmJYWxQ==} + /@types/lodash@4.14.201: + resolution: {integrity: sha512-y9euML0cim1JrykNxADLfaG0FgD1g/yTHwUs/Jg9ZIU7WKj2/4IW9Lbb1WZbvck78W/lfGXFfe+u2EGfIJXdLQ==} dev: false - /@types/minimatch/5.1.2: + /@types/minimatch@5.1.2: resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} dev: false - /@types/minimist/1.2.2: - resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} - dev: false - - /@types/node-fetch/2.6.2: - resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} + /@types/node-fetch@2.6.9: + resolution: {integrity: sha512-bQVlnMLFJ2d35DkPNjEPmd9ueO/rh5EiaZt2bhqiSarPjZIuIV6bPQVqcrEyvNo+AfTrRGVazle1tl597w3gfA==} dependencies: - '@types/node': 16.18.12 - form-data: 3.0.1 + '@types/node': 20.9.0 + form-data: 4.0.0 dev: false - /@types/node/14.14.45: - resolution: {integrity: sha512-DssMqTV9UnnoxDWu959sDLZzfvqCF0qDNRjaWeYSui9xkFe61kKo4l1TWNTQONpuXEm+gLMRvdlzvNHBamzmEw==} + /@types/node@16.18.61: + resolution: {integrity: sha512-k0N7BqGhJoJzdh6MuQg1V1ragJiXTh8VUBAZTWjJ9cUq23SG0F0xavOwZbhiP4J3y20xd6jxKx+xNUhkMAi76Q==} dev: false - /@types/node/16.18.12: - resolution: {integrity: sha512-vzLe5NaNMjIE3mcddFVGlAXN1LEWueUsMsOJWaT6wWMJGyljHAWHznqfnKUQWGzu7TLPrGvWdNAsvQYW+C0xtw==} + /@types/node@20.9.0: + resolution: {integrity: sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==} + dependencies: + undici-types: 5.26.5 dev: false - /@types/normalize-package-data/2.4.1: - resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} + /@types/normalize-package-data@2.4.4: + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} dev: false - /@types/npm-package-arg/6.1.1: - resolution: {integrity: sha512-452/1Kp9IdM/oR10AyqAgZOxUt7eLbm+EMJ194L6oarMYdZNiFIFAOJ7IIr0OrZXTySgfHjJezh2oiyk2kc3ag==} + /@types/npm-package-arg@6.1.4: + resolution: {integrity: sha512-vDgdbMy2QXHnAruzlv68pUtXCjmqUk3WrBAsRboRovsOmxbfn/WiYCjmecyKjGztnMps5dWp4Uq2prp+Ilo17Q==} dev: false - /@types/npm-registry-fetch/8.0.4: - resolution: {integrity: sha512-R9yEj6+NDmXLpKNS19cIaMyaHfV0aHjy/1qbo8K9jiHyjyaYg0CEmuOV/L0Q91DZDi3SuxlYY+2XYwh9TbB+eQ==} + /@types/npm-registry-fetch@8.0.7: + resolution: {integrity: sha512-db9iBh7kDDg4lRT4k4XZ6IiecTEgFCID4qk+VDVPbtzU855q3KZLCn08ATr4H27ntRJVhulQ7GWjl24H42x96w==} dependencies: - '@types/node': 16.18.12 - '@types/node-fetch': 2.6.2 - '@types/npm-package-arg': 6.1.1 - '@types/npmlog': 4.1.4 - '@types/ssri': 7.1.1 + '@types/node': 20.9.0 + '@types/node-fetch': 2.6.9 + '@types/npm-package-arg': 6.1.4 + '@types/npmlog': 4.1.6 + '@types/ssri': 7.1.4 dev: false - /@types/npmlog/4.1.4: - resolution: {integrity: sha512-WKG4gTr8przEZBiJ5r3s8ZIAoMXNbOgQ+j/d5O4X3x6kZJRLNvyUJuUK/KoG3+8BaOHPhp2m7WC6JKKeovDSzQ==} + /@types/npmlog@4.1.6: + resolution: {integrity: sha512-0l3z16vnlJGl2Mi/rgJFrdwfLZ4jfNYgE6ZShEpjqhHuGTqdEzNles03NpYHwUMVYZa+Tj46UxKIEpE78lQ3DQ==} + dependencies: + '@types/node': 20.9.0 dev: false - /@types/pacote/11.1.3: + /@types/pacote@11.1.3: resolution: {integrity: sha512-1SN4uFKLEcuZwWXCMQUOnJWk+8cL6aRaToAn3+IZtkWBG3i2R3BTyW/BimfCHn9OTzrfrQAX0+InKBurX6ZTuQ==} dependencies: - '@types/node': 14.14.45 - '@types/npm-registry-fetch': 8.0.4 - '@types/npmlog': 4.1.4 - '@types/ssri': 7.1.1 + '@types/node': 20.9.0 + '@types/npm-registry-fetch': 8.0.7 + '@types/npmlog': 4.1.6 + '@types/ssri': 7.1.4 dev: false - /@types/prettier/2.7.2: - resolution: {integrity: sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==} + /@types/prettier@2.7.3: + resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} dev: false - /@types/semver/5.5.0: + /@types/semver@5.5.0: resolution: {integrity: sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==} dev: false - /@types/semver/7.3.13: - resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} + /@types/semver@7.5.5: + resolution: {integrity: sha512-+d+WYC1BxJ6yVOgUgzK8gWvp5qF8ssV5r4nsDcZWKRWcDQLQ619tvWAxJQYGgBrO1MnLJC7a5GtiYsAoQ47dJg==} dev: false - /@types/source-list-map/0.1.2: - resolution: {integrity: sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==} - dev: false - - /@types/source-map-support/0.5.6: - resolution: {integrity: sha512-b2nJ9YyXmkhGaa2b8VLM0kJ04xxwNyijcq12/kDoomCt43qbHBeK2SLNJ9iJmETaAj+bKUT05PQUu3Q66GvLhQ==} + /@types/source-map-support@0.5.10: + resolution: {integrity: sha512-tgVP2H469x9zq34Z0m/fgPewGhg/MLClalNOiPIzQlXrSS2YrKu/xCdSCKnEDwkFha51VKEKB6A9wW26/ZNwzA==} dependencies: source-map: 0.6.1 dev: false - /@types/ssri/7.1.1: - resolution: {integrity: sha512-DPP/jkDaqGiyU75MyMURxLWyYLwKSjnAuGe9ZCsLp9QZOpXmDfuevk769F0BS86TmRuD5krnp06qw9nSoNO+0g==} + /@types/ssri@7.1.4: + resolution: {integrity: sha512-K2Ys8+BVrgGFY0cVwf55rIS4fa2ZN+4Y/w2h4BnYIf8kvUdmdKT6l6VUpC3uL9HKG8I8EkD5CXIgRUXHOLHcLw==} dependencies: - '@types/node': 16.18.12 - dev: false - - /@types/stack-utils/2.0.1: - resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} - dev: false - - /@types/tapable/1.0.8: - resolution: {integrity: sha512-ipixuVrh2OdNmauvtT51o3d8z12p6LtFW9in7U79der/kwejjdNchQC5UMn5u/KxNoM7VHHOs/l8KS8uHxhODQ==} - dev: false - - /@types/triple-beam/1.3.2: - resolution: {integrity: sha512-txGIh+0eDFzKGC25zORnswy+br1Ha7hj5cMVwKIU7+s0U2AxxJru/jZSMU6OC9MJWP6+pc/hc6ZjyZShpsyY2g==} + '@types/node': 20.9.0 dev: false - /@types/uglify-js/3.17.1: - resolution: {integrity: sha512-GkewRA4i5oXacU/n4MA9+bLgt5/L3F1mKrYvFGm7r2ouLXhRKjuWwo9XHNnbx6WF3vlGW21S3fCvgqxvxXXc5g==} - dependencies: - source-map: 0.6.1 + /@types/stack-utils@2.0.3: + resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} dev: false - /@types/webpack-sources/3.2.0: - resolution: {integrity: sha512-Ft7YH3lEVRQ6ls8k4Ff1oB4jN6oy/XmU6tQISKdhfh+1mR+viZFphS6WL0IrtDOzvefmJg5a0s7ZQoRXwqTEFg==} - dependencies: - '@types/node': 16.18.12 - '@types/source-list-map': 0.1.2 - source-map: 0.7.3 + /@types/triple-beam@1.3.5: + resolution: {integrity: sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==} dev: false - /@types/webpack/4.41.33: - resolution: {integrity: sha512-PPajH64Ft2vWevkerISMtnZ8rTs4YmRbs+23c402J0INmxDKCrhZNvwZYtzx96gY2wAtXdrK1BS2fiC8MlLr3g==} + /@types/webpack@5.28.5(webpack-cli@5.1.4): + resolution: {integrity: sha512-wR87cgvxj3p6D0Crt1r5avwqffqPXUkNlnQ1mjU93G7gCuFjufZR4I6j8cz5g1F1tTYpfOOFvly+cmIQwL9wvw==} dependencies: - '@types/node': 14.14.45 - '@types/tapable': 1.0.8 - '@types/uglify-js': 3.17.1 - '@types/webpack-sources': 3.2.0 - anymatch: 3.1.3 - source-map: 0.6.1 + '@types/node': 20.9.0 + tapable: 2.2.1 + webpack: 5.89.0(webpack-cli@5.1.4) + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + - webpack-cli dev: false - /@types/yargs-parser/21.0.0: - resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} + /@types/yargs-parser@21.0.3: + resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} dev: false - /@types/yargs/15.0.15: - resolution: {integrity: sha512-IziEYMU9XoVj8hWg7k+UJrXALkGFjWJhn5QFEv9q4p+v40oZhSuC135M38st8XPjICL7Ey4TV64ferBGUoJhBg==} + /@types/yargs@15.0.18: + resolution: {integrity: sha512-DDi2KmvAnNsT/EvU8jp1UR7pOJojBtJ3GLZ/uw1MUq4VbbESppPWoHUY4h0OB4BbEbGJiyEsmUcuZDZtoR+ZwQ==} dependencies: - '@types/yargs-parser': 21.0.0 + '@types/yargs-parser': 21.0.3 dev: false - /@types/yargs/17.0.22: - resolution: {integrity: sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g==} + /@types/yargs@17.0.31: + resolution: {integrity: sha512-bocYSx4DI8TmdlvxqGpVNXOgCNR1Jj0gNPhhAY+iz1rgKDAaYrAYdFYnhDV1IFuiuVc9HkOwyDcFxaTElF3/wg==} dependencies: - '@types/yargs-parser': 21.0.0 + '@types/yargs-parser': 21.0.3 dev: false - /@typescript-eslint/eslint-plugin/5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce: - resolution: {integrity: sha512-alFpFWNucPLdUOySmXCJpzr6HKC3bu7XooShWM+3w/EL6J2HIoB2PFxpLnq4JauWVk6DiVeNKzQlFEaE+X9sGw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/eslint-plugin@6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2): + resolution: {integrity: sha512-uXnpZDc4VRjY4iuypDBKzW1rz9T5YBBK0snMn8MaTSNd2kMlj50LnLBABELjJiOL5YHk7ZD8hbSpI9ubzqYI0w==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 - '@typescript-eslint/scope-manager': 5.53.0 - '@typescript-eslint/type-utils': 5.53.0_eslint@8.34.0+typescript@4.9.5 - '@typescript-eslint/utils': 5.53.0_eslint@8.34.0+typescript@4.9.5 + '@eslint-community/regexpp': 4.10.0 + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.11.0 + '@typescript-eslint/type-utils': 6.11.0(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.11.0(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.11.0 debug: 4.3.4 - eslint: 8.34.0 - grapheme-splitter: 1.0.4 + eslint: 8.53.0 + graphemer: 1.4.0 ignore: 5.2.4 - natural-compare-lite: 1.4.0 - regexpp: 3.2.0 - semver: 7.3.8 - tsutils: 3.21.0_typescript@4.9.5 - typescript: 4.9.5 + natural-compare: 1.4.0 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/parser/5.53.0_eslint@8.34.0+typescript@4.9.5: - resolution: {integrity: sha512-MKBw9i0DLYlmdOb3Oq/526+al20AJZpANdT6Ct9ffxcV8nKCHz63t/S0IhlTFNsBIHJv+GY5SFJ0XfqVeydQrQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/parser@6.11.0(eslint@8.53.0)(typescript@5.2.2): + resolution: {integrity: sha512-+whEdjk+d5do5nxfxx73oanLL9ghKO3EwM9kBCkUtWMRwWuPaFv9ScuqlYfQ6pAD6ZiJhky7TZ2ZYhrMsfMxVQ==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.53.0 - '@typescript-eslint/types': 5.53.0 - '@typescript-eslint/typescript-estree': 5.53.0_typescript@4.9.5 + '@typescript-eslint/scope-manager': 6.11.0 + '@typescript-eslint/types': 6.11.0 + '@typescript-eslint/typescript-estree': 6.11.0(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.11.0 debug: 4.3.4 - eslint: 8.34.0 - typescript: 4.9.5 + eslint: 8.53.0 + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/scope-manager/5.53.0: - resolution: {integrity: sha512-Opy3dqNsp/9kBBeCPhkCNR7fmdSQqA+47r21hr9a14Bx0xnkElEQmhoHga+VoaoQ6uDHjDKmQPIYcUcKJifS7w==} + /@typescript-eslint/scope-manager@5.62.0: + resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.53.0 - '@typescript-eslint/visitor-keys': 5.53.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 dev: false - /@typescript-eslint/type-utils/5.53.0_eslint@8.34.0+typescript@4.9.5: - resolution: {integrity: sha512-HO2hh0fmtqNLzTAme/KnND5uFNwbsdYhCZghK2SoxGp3Ifn2emv+hi0PBUjzzSh0dstUIFqOj3bp0AwQlK4OWw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@typescript-eslint/scope-manager@6.11.0: + resolution: {integrity: sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.11.0 + '@typescript-eslint/visitor-keys': 6.11.0 + dev: false + + /@typescript-eslint/type-utils@6.11.0(eslint@8.53.0)(typescript@5.2.2): + resolution: {integrity: sha512-nA4IOXwZtqBjIoYrJcYxLRO+F9ri+leVGoJcMW1uqr4r1Hq7vW5cyWrA43lFbpRvQ9XgNrnfLpIkO3i1emDBIA==} + engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: - eslint: '*' + eslint: ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.53.0_typescript@4.9.5 - '@typescript-eslint/utils': 5.53.0_eslint@8.34.0+typescript@4.9.5 + '@typescript-eslint/typescript-estree': 6.11.0(typescript@5.2.2) + '@typescript-eslint/utils': 6.11.0(eslint@8.53.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.34.0 - tsutils: 3.21.0_typescript@4.9.5 - typescript: 4.9.5 + eslint: 8.53.0 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/types/5.53.0: - resolution: {integrity: sha512-5kcDL9ZUIP756K6+QOAfPkigJmCPHcLN7Zjdz76lQWWDdzfOhZDTj1irs6gPBKiXx5/6O3L0+AvupAut3z7D2A==} + /@typescript-eslint/types@5.62.0: + resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: false - /@typescript-eslint/typescript-estree/5.53.0_typescript@4.9.5: - resolution: {integrity: sha512-eKmipH7QyScpHSkhbptBBYh9v8FxtngLquq292YTEQ1pxVs39yFBlLC1xeIZcPPz1RWGqb7YgERJRGkjw8ZV7w==} + /@typescript-eslint/types@6.11.0: + resolution: {integrity: sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: false + + /@typescript-eslint/typescript-estree@5.62.0(typescript@5.2.2): + resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -1563,287 +1625,332 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.53.0 - '@typescript-eslint/visitor-keys': 5.53.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/visitor-keys': 5.62.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + tsutils: 3.21.0(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: false + + /@typescript-eslint/typescript-estree@6.11.0(typescript@5.2.2): + resolution: {integrity: sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.11.0 + '@typescript-eslint/visitor-keys': 6.11.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.3.8 - tsutils: 3.21.0_typescript@4.9.5 - typescript: 4.9.5 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/utils/5.53.0_eslint@8.34.0+typescript@4.9.5: - resolution: {integrity: sha512-VUOOtPv27UNWLxFwQK/8+7kvxVC+hPHNsJjzlJyotlaHjLSIgOCKj9I0DBUjwOOA64qjBwx5afAPjksqOxMO0g==} + /@typescript-eslint/utils@5.62.0(eslint@8.53.0)(typescript@5.2.2): + resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@types/json-schema': 7.0.11 - '@types/semver': 7.3.13 - '@typescript-eslint/scope-manager': 5.53.0 - '@typescript-eslint/types': 5.53.0 - '@typescript-eslint/typescript-estree': 5.53.0_typescript@4.9.5 - eslint: 8.34.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.5 + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) + eslint: 8.53.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.34.0 - semver: 7.3.8 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: false + + /@typescript-eslint/utils@6.11.0(eslint@8.53.0)(typescript@5.2.2): + resolution: {integrity: sha512-p23ibf68fxoZy605dc0dQAEoUsoiNoP3MD9WQGiHLDuTSOuqoTsa4oAy+h3KDkTcxbbfOtUjb9h3Ta0gT4ug2g==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.5 + '@typescript-eslint/scope-manager': 6.11.0 + '@typescript-eslint/types': 6.11.0 + '@typescript-eslint/typescript-estree': 6.11.0(typescript@5.2.2) + eslint: 8.53.0 + semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript dev: false - /@typescript-eslint/visitor-keys/5.53.0: - resolution: {integrity: sha512-JqNLnX3leaHFZEN0gCh81sIvgrp/2GOACZNgO4+Tkf64u51kTpAyWFOY8XHx8XuXr3N2C9zgPPHtcpMg6z1g0w==} + /@typescript-eslint/visitor-keys@5.62.0: + resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.53.0 - eslint-visitor-keys: 3.3.0 + '@typescript-eslint/types': 5.62.0 + eslint-visitor-keys: 3.4.3 dev: false - /@typespec/compiler/0.44.0: - resolution: {integrity: sha512-NESRujXwHHhJZsHn+Bf4zOlJ2eTJB/oYRIFMqV7lAOut3OILngQfmO3iVLpTVrHjwgrUdetU1GXt1Ref3rmATA==} - engines: {node: '>=16.0.0'} + /@typescript-eslint/visitor-keys@6.11.0: + resolution: {integrity: sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.11.0 + eslint-visitor-keys: 3.4.3 + dev: false + + /@typespec/compiler@0.50.0: + resolution: {integrity: sha512-CLNPxyGahfdxPPvtHdexwFXCPzfjeN7qjCiRjJmUeJV2Qd+nf8Sps+mwyqflw1v7q1GTpgB9kURMsWV/+NgTdw==} + engines: {node: '>=18.0.0'} hasBin: true dependencies: - '@babel/code-frame': 7.21.4 + '@babel/code-frame': 7.22.13 ajv: 8.12.0 change-case: 4.1.2 - globby: 13.1.3 - js-yaml: 4.1.0 - mkdirp: 2.1.6 + globby: 13.2.2 mustache: 4.2.0 - node-fetch: 3.2.8 - node-watch: 0.7.3 picocolors: 1.0.0 - prettier: 2.8.8 + prettier: 3.0.3 prompts: 2.4.2 - vscode-languageserver: 8.1.0 - vscode-languageserver-textdocument: 1.0.8 + semver: 7.5.4 + vscode-languageserver: 9.0.1 + vscode-languageserver-textdocument: 1.0.11 + yaml: 2.3.4 yargs: 17.7.2 dev: false - /@typespec/http/0.44.0_@typespec+compiler@0.44.0: - resolution: {integrity: sha512-isIcg0/fidnbUeSp9qX1ir5XXThrKrdhwXle1Y4f+sR0DcTf4gJSEesjiZkV+Ea7u5nHjJ3/f+/Stp6XyuwOZw==} - engines: {node: '>=16.0.0'} + /@typespec/http@0.50.0(@typespec/compiler@0.50.0): + resolution: {integrity: sha512-kTRg/TXo2Pn2qZZ/xvjBuA75w3zLk6MIcLMEqQhXDRVhpVCSqPStReZtKBV/YCJ1DvMVnu3mcA7+HqQ4PxrZhQ==} + engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.44.0 + '@typespec/compiler': ~0.50.0 dependencies: - '@typespec/compiler': 0.44.0 + '@typespec/compiler': 0.50.0 dev: false - /@typespec/lint/0.44.0_@typespec+compiler@0.44.0: - resolution: {integrity: sha512-IEmaP7+PLDQOeZPqwH0XZe+Llt1P/SUzIj4zLEARBaAbBSGmekwUrXRlwrrDyZEPmmsnuIRuZNuXolG+REUh5g==} - engines: {node: '>=16.0.0'} + /@typespec/openapi3@0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/openapi@0.50.0)(@typespec/versioning@0.50.0): + resolution: {integrity: sha512-R3YOEpRZoABrTrglLClesknhsl1AqXRt0lzZLttATal6w4V0XTGFsc3gyD0muoUTy1e1vPfQixpUTY2CHFqIQA==} + engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.44.0 + '@typespec/compiler': ~0.50.0 + '@typespec/http': ~0.50.0 + '@typespec/openapi': ~0.50.0 + '@typespec/versioning': ~0.50.0 dependencies: - '@typespec/compiler': 0.44.0 + '@typespec/compiler': 0.50.0 + '@typespec/http': 0.50.0(@typespec/compiler@0.50.0) + '@typespec/openapi': 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) + '@typespec/versioning': 0.50.0(@typespec/compiler@0.50.0) + yaml: 2.3.4 dev: false - /@typespec/openapi/0.44.0_b20eabafba7aacdb8b5d08356213191f: - resolution: {integrity: sha512-uZ8rZ4cIWDsBKGbmUODu5HjAimnePmajQ5xO5QJGji9E/nK8LuEsJEnQA/qXaahEbiZTwZCH5J+ooPFLbEzXEA==} - engines: {node: '>=16.0.0'} + /@typespec/openapi@0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0): + resolution: {integrity: sha512-aOg3y4XxRl6bI/DR+OR1GFZD+1s9ygH0Z8jarHc3wSNnh4gLmAZ8RYmPFPzwULhvck/EYw+P9R0kcYpX8iC+Lw==} + engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.44.0 - '@typespec/http': ~0.44.0 - '@typespec/rest': ~0.44.0 + '@typespec/compiler': ~0.50.0 + '@typespec/http': ~0.50.0 dependencies: - '@typespec/compiler': 0.44.0 - '@typespec/http': 0.44.0_@typespec+compiler@0.44.0 - '@typespec/rest': 0.44.0_@typespec+compiler@0.44.0 + '@typespec/compiler': 0.50.0 + '@typespec/http': 0.50.0(@typespec/compiler@0.50.0) dev: false - /@typespec/openapi3/0.44.0_056565a5c07ce759d753359b526dd68c: - resolution: {integrity: sha512-VhjwPFFgBPY1eSn3OoerinxLGDldmHVp2NzQLMIT48n1/7MXTzxzggoKNRt3NXjkqM/C3YvoE0kYzpQLUa5JFQ==} - engines: {node: '>=16.0.0'} - peerDependencies: - '@typespec/compiler': ~0.44.0 - '@typespec/http': ~0.44.0 - '@typespec/openapi': ~0.44.0 - '@typespec/rest': ~0.44.0 - '@typespec/versioning': ~0.44.0 - dependencies: - '@typespec/compiler': 0.44.0 - '@typespec/http': 0.44.0_@typespec+compiler@0.44.0 - '@typespec/openapi': 0.44.0_b20eabafba7aacdb8b5d08356213191f - '@typespec/rest': 0.44.0_@typespec+compiler@0.44.0 - '@typespec/versioning': 0.44.0_@typespec+compiler@0.44.0 - js-yaml: 4.1.0 - dev: false - - /@typespec/prettier-plugin-typespec/0.44.0: - resolution: {integrity: sha512-dDvvW446FcqOkDuLV8wepTpyZT5y0sI2Crhmp7kUbqpU2GznKd8hkxLVRXQxlUtga63vqiEYuZwvFd109OWttQ==} + /@typespec/prettier-plugin-typespec@0.50.0: + resolution: {integrity: sha512-fo5+UMkounO/p2zz5aSUbxw4krKKB8GAcVfrDK3UdE9SAxtl92d1kEGNOG9fKjmuAMwmzPHNGZZy/tZw+iyvew==} dependencies: - prettier: 2.8.8 + prettier: 3.0.3 dev: false - /@typespec/rest/0.44.0_@typespec+compiler@0.44.0: - resolution: {integrity: sha512-frHx0cKyvrtB3CST4x/38QevoSWj+anSmCDW2mvdUwV7PEkTzC5b3d0O3LDbCECT/WHp09PCkKqMEODe03xBlQ==} - engines: {node: '>=16.0.0'} + /@typespec/rest@0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0): + resolution: {integrity: sha512-nkFfPh4z9z2a46f6HgjuZM7e2+k5bgPDshuwQjjo82mEuSqrMUaeaUs5nx63L2FmacvIvhAvRrd3f8kMpBD5vw==} + engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.44.0 + '@typespec/compiler': ~0.50.0 + '@typespec/http': ~0.50.0 dependencies: - '@typespec/compiler': 0.44.0 + '@typespec/compiler': 0.50.0 + '@typespec/http': 0.50.0(@typespec/compiler@0.50.0) dev: false - /@typespec/versioning/0.44.0_@typespec+compiler@0.44.0: - resolution: {integrity: sha512-7Z+1wV3XM4W+QbkWFVyOsoQXtS9y4aUcpq5rbLtUCUTvI26IcTOv94b2+HbPJl2x7j3o+KYfvVLVj8fiCqxXJg==} - engines: {node: '>=16.0.0'} + /@typespec/versioning@0.50.0(@typespec/compiler@0.50.0): + resolution: {integrity: sha512-lEJUBMFqhLWTL2eqnOEwFSnopWs06YmS6Fo3SI3UtGHiTU2EneWHk+BnhSplbOmFEQ7XTVlj0QxZ4/TaE0GgPw==} + engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.44.0 + '@typespec/compiler': ~0.50.0 dependencies: - '@typespec/compiler': 0.44.0 + '@typespec/compiler': 0.50.0 dev: false - /@webassemblyjs/ast/1.11.0: - resolution: {integrity: sha512-kX2W49LWsbthrmIRMbQZuQDhGtjyqXfEmmHyEi4XWnSZtPmxY0+3anPIzsnRb45VH/J55zlOfWvZuY47aJZTJg==} + /@ungap/structured-clone@1.2.0: + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + dev: false + + /@webassemblyjs/ast@1.11.6: + resolution: {integrity: sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==} dependencies: - '@webassemblyjs/helper-numbers': 1.11.0 - '@webassemblyjs/helper-wasm-bytecode': 1.11.0 + '@webassemblyjs/helper-numbers': 1.11.6 + '@webassemblyjs/helper-wasm-bytecode': 1.11.6 dev: false - /@webassemblyjs/floating-point-hex-parser/1.11.0: - resolution: {integrity: sha512-Q/aVYs/VnPDVYvsCBL/gSgwmfjeCb4LW8+TMrO3cSzJImgv8lxxEPM2JA5jMrivE7LSz3V+PFqtMbls3m1exDA==} + /@webassemblyjs/floating-point-hex-parser@1.11.6: + resolution: {integrity: sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==} dev: false - /@webassemblyjs/helper-api-error/1.11.0: - resolution: {integrity: sha512-baT/va95eXiXb2QflSx95QGT5ClzWpGaa8L7JnJbgzoYeaA27FCvuBXU758l+KXWRndEmUXjP0Q5fibhavIn8w==} + /@webassemblyjs/helper-api-error@1.11.6: + resolution: {integrity: sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==} dev: false - /@webassemblyjs/helper-buffer/1.11.0: - resolution: {integrity: sha512-u9HPBEl4DS+vA8qLQdEQ6N/eJQ7gT7aNvMIo8AAWvAl/xMrcOSiI2M0MAnMCy3jIFke7bEee/JwdX1nUpCtdyA==} + /@webassemblyjs/helper-buffer@1.11.6: + resolution: {integrity: sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==} dev: false - /@webassemblyjs/helper-numbers/1.11.0: - resolution: {integrity: sha512-DhRQKelIj01s5IgdsOJMKLppI+4zpmcMQ3XboFPLwCpSNH6Hqo1ritgHgD0nqHeSYqofA6aBN/NmXuGjM1jEfQ==} + /@webassemblyjs/helper-numbers@1.11.6: + resolution: {integrity: sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==} dependencies: - '@webassemblyjs/floating-point-hex-parser': 1.11.0 - '@webassemblyjs/helper-api-error': 1.11.0 + '@webassemblyjs/floating-point-hex-parser': 1.11.6 + '@webassemblyjs/helper-api-error': 1.11.6 '@xtuc/long': 4.2.2 dev: false - /@webassemblyjs/helper-wasm-bytecode/1.11.0: - resolution: {integrity: sha512-MbmhvxXExm542tWREgSFnOVo07fDpsBJg3sIl6fSp9xuu75eGz5lz31q7wTLffwL3Za7XNRCMZy210+tnsUSEA==} + /@webassemblyjs/helper-wasm-bytecode@1.11.6: + resolution: {integrity: sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==} dev: false - /@webassemblyjs/helper-wasm-section/1.11.0: - resolution: {integrity: sha512-3Eb88hcbfY/FCukrg6i3EH8H2UsD7x8Vy47iVJrP967A9JGqgBVL9aH71SETPx1JrGsOUVLo0c7vMCN22ytJew==} + /@webassemblyjs/helper-wasm-section@1.11.6: + resolution: {integrity: sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==} dependencies: - '@webassemblyjs/ast': 1.11.0 - '@webassemblyjs/helper-buffer': 1.11.0 - '@webassemblyjs/helper-wasm-bytecode': 1.11.0 - '@webassemblyjs/wasm-gen': 1.11.0 + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/helper-buffer': 1.11.6 + '@webassemblyjs/helper-wasm-bytecode': 1.11.6 + '@webassemblyjs/wasm-gen': 1.11.6 dev: false - /@webassemblyjs/ieee754/1.11.0: - resolution: {integrity: sha512-KXzOqpcYQwAfeQ6WbF6HXo+0udBNmw0iXDmEK5sFlmQdmND+tr773Ti8/5T/M6Tl/413ArSJErATd8In3B+WBA==} + /@webassemblyjs/ieee754@1.11.6: + resolution: {integrity: sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==} dependencies: '@xtuc/ieee754': 1.2.0 dev: false - /@webassemblyjs/leb128/1.11.0: - resolution: {integrity: sha512-aqbsHa1mSQAbeeNcl38un6qVY++hh8OpCOzxhixSYgbRfNWcxJNJQwe2rezK9XEcssJbbWIkblaJRwGMS9zp+g==} + /@webassemblyjs/leb128@1.11.6: + resolution: {integrity: sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==} dependencies: '@xtuc/long': 4.2.2 dev: false - /@webassemblyjs/utf8/1.11.0: - resolution: {integrity: sha512-A/lclGxH6SpSLSyFowMzO/+aDEPU4hvEiooCMXQPcQFPPJaYcPQNKGOCLUySJsYJ4trbpr+Fs08n4jelkVTGVw==} + /@webassemblyjs/utf8@1.11.6: + resolution: {integrity: sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==} dev: false - /@webassemblyjs/wasm-edit/1.11.0: - resolution: {integrity: sha512-JHQ0damXy0G6J9ucyKVXO2j08JVJ2ntkdJlq1UTiUrIgfGMmA7Ik5VdC/L8hBK46kVJgujkBIoMtT8yVr+yVOQ==} + /@webassemblyjs/wasm-edit@1.11.6: + resolution: {integrity: sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==} dependencies: - '@webassemblyjs/ast': 1.11.0 - '@webassemblyjs/helper-buffer': 1.11.0 - '@webassemblyjs/helper-wasm-bytecode': 1.11.0 - '@webassemblyjs/helper-wasm-section': 1.11.0 - '@webassemblyjs/wasm-gen': 1.11.0 - '@webassemblyjs/wasm-opt': 1.11.0 - '@webassemblyjs/wasm-parser': 1.11.0 - '@webassemblyjs/wast-printer': 1.11.0 + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/helper-buffer': 1.11.6 + '@webassemblyjs/helper-wasm-bytecode': 1.11.6 + '@webassemblyjs/helper-wasm-section': 1.11.6 + '@webassemblyjs/wasm-gen': 1.11.6 + '@webassemblyjs/wasm-opt': 1.11.6 + '@webassemblyjs/wasm-parser': 1.11.6 + '@webassemblyjs/wast-printer': 1.11.6 dev: false - /@webassemblyjs/wasm-gen/1.11.0: - resolution: {integrity: sha512-BEUv1aj0WptCZ9kIS30th5ILASUnAPEvE3tVMTrItnZRT9tXCLW2LEXT8ezLw59rqPP9klh9LPmpU+WmRQmCPQ==} + /@webassemblyjs/wasm-gen@1.11.6: + resolution: {integrity: sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==} dependencies: - '@webassemblyjs/ast': 1.11.0 - '@webassemblyjs/helper-wasm-bytecode': 1.11.0 - '@webassemblyjs/ieee754': 1.11.0 - '@webassemblyjs/leb128': 1.11.0 - '@webassemblyjs/utf8': 1.11.0 + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/helper-wasm-bytecode': 1.11.6 + '@webassemblyjs/ieee754': 1.11.6 + '@webassemblyjs/leb128': 1.11.6 + '@webassemblyjs/utf8': 1.11.6 dev: false - /@webassemblyjs/wasm-opt/1.11.0: - resolution: {integrity: sha512-tHUSP5F4ywyh3hZ0+fDQuWxKx3mJiPeFufg+9gwTpYp324mPCQgnuVKwzLTZVqj0duRDovnPaZqDwoyhIO8kYg==} + /@webassemblyjs/wasm-opt@1.11.6: + resolution: {integrity: sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==} dependencies: - '@webassemblyjs/ast': 1.11.0 - '@webassemblyjs/helper-buffer': 1.11.0 - '@webassemblyjs/wasm-gen': 1.11.0 - '@webassemblyjs/wasm-parser': 1.11.0 + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/helper-buffer': 1.11.6 + '@webassemblyjs/wasm-gen': 1.11.6 + '@webassemblyjs/wasm-parser': 1.11.6 dev: false - /@webassemblyjs/wasm-parser/1.11.0: - resolution: {integrity: sha512-6L285Sgu9gphrcpDXINvm0M9BskznnzJTE7gYkjDbxET28shDqp27wpruyx3C2S/dvEwiigBwLA1cz7lNUi0kw==} + /@webassemblyjs/wasm-parser@1.11.6: + resolution: {integrity: sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==} dependencies: - '@webassemblyjs/ast': 1.11.0 - '@webassemblyjs/helper-api-error': 1.11.0 - '@webassemblyjs/helper-wasm-bytecode': 1.11.0 - '@webassemblyjs/ieee754': 1.11.0 - '@webassemblyjs/leb128': 1.11.0 - '@webassemblyjs/utf8': 1.11.0 + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/helper-api-error': 1.11.6 + '@webassemblyjs/helper-wasm-bytecode': 1.11.6 + '@webassemblyjs/ieee754': 1.11.6 + '@webassemblyjs/leb128': 1.11.6 + '@webassemblyjs/utf8': 1.11.6 dev: false - /@webassemblyjs/wast-printer/1.11.0: - resolution: {integrity: sha512-Fg5OX46pRdTgB7rKIUojkh9vXaVN6sGYCnEiJN1GYkb0RPwShZXp6KTDqmoMdQPKhcroOXh3fEzmkWmCYaKYhQ==} + /@webassemblyjs/wast-printer@1.11.6: + resolution: {integrity: sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==} dependencies: - '@webassemblyjs/ast': 1.11.0 + '@webassemblyjs/ast': 1.11.6 '@xtuc/long': 4.2.2 dev: false - /@webpack-cli/configtest/1.2.0_webpack-cli@4.7.2+webpack@5.40.0: - resolution: {integrity: sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==} + /@webpack-cli/configtest@2.1.1(webpack-cli@5.1.4)(webpack@5.89.0): + resolution: {integrity: sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==} + engines: {node: '>=14.15.0'} peerDependencies: - webpack: 4.x.x || 5.x.x - webpack-cli: 4.x.x + webpack: 5.x.x + webpack-cli: 5.x.x dependencies: - webpack: 5.40.0_webpack-cli@4.7.2 - webpack-cli: 4.7.2_webpack@5.40.0 + webpack: 5.89.0(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.89.0) dev: false - /@webpack-cli/info/1.5.0_webpack-cli@4.7.2: - resolution: {integrity: sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==} + /@webpack-cli/info@2.0.2(webpack-cli@5.1.4)(webpack@5.89.0): + resolution: {integrity: sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==} + engines: {node: '>=14.15.0'} peerDependencies: - webpack-cli: 4.x.x + webpack: 5.x.x + webpack-cli: 5.x.x dependencies: - envinfo: 7.8.1 - webpack-cli: 4.7.2_webpack@5.40.0 + webpack: 5.89.0(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.89.0) dev: false - /@webpack-cli/serve/1.7.0_webpack-cli@4.7.2: - resolution: {integrity: sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==} + /@webpack-cli/serve@2.0.5(webpack-cli@5.1.4)(webpack@5.89.0): + resolution: {integrity: sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==} + engines: {node: '>=14.15.0'} peerDependencies: - webpack-cli: 4.x.x + webpack: 5.x.x + webpack-cli: 5.x.x webpack-dev-server: '*' peerDependenciesMeta: webpack-dev-server: optional: true dependencies: - webpack-cli: 4.7.2_webpack@5.40.0 + webpack: 5.89.0(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.89.0) dev: false - /@xtuc/ieee754/1.2.0: + /@xtuc/ieee754@1.2.0: resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} dev: false - /@xtuc/long/4.2.2: + /@xtuc/long@4.2.2: resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} dev: false - /JSONStream/1.3.5: + /JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true dependencies: @@ -1851,47 +1958,77 @@ packages: through: 2.3.8 dev: false - /acorn-jsx/5.3.2_acorn@8.8.2: + /abbrev@2.0.0: + resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: false + + /acorn-import-assertions@1.9.0(acorn@8.11.2): + resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} + peerDependencies: + acorn: ^8 + dependencies: + acorn: 8.11.2 + dev: false + + /acorn-jsx@5.3.2(acorn@8.11.2): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.8.2 + acorn: 8.11.2 dev: false - /acorn-walk/8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} + /acorn-walk@8.3.0: + resolution: {integrity: sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==} engines: {node: '>=0.4.0'} dev: false - /acorn/8.8.2: - resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==} + /acorn@8.11.2: + resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==} engines: {node: '>=0.4.0'} hasBin: true dev: false - /agent-base/4.2.1: + /agent-base@4.2.1: resolution: {integrity: sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==} engines: {node: '>= 4.0.0'} dependencies: es6-promisify: 5.0.0 dev: false - /agent-base/4.3.0: + /agent-base@4.3.0: resolution: {integrity: sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==} engines: {node: '>= 4.0.0'} dependencies: es6-promisify: 5.0.0 dev: false - /agentkeepalive/3.5.2: + /agent-base@7.1.0: + resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} + engines: {node: '>= 14'} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: false + + /agentkeepalive@3.5.2: resolution: {integrity: sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==} engines: {node: '>= 4.0.0'} dependencies: humanize-ms: 1.2.1 dev: false - /aggregate-error/4.0.1: + /aggregate-error@3.1.0: + resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + engines: {node: '>=8'} + dependencies: + clean-stack: 2.2.0 + indent-string: 4.0.0 + dev: false + + /aggregate-error@4.0.1: resolution: {integrity: sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==} engines: {node: '>=12'} dependencies: @@ -1899,7 +2036,7 @@ packages: indent-string: 5.0.0 dev: false - /ajv-errors/3.0.0_ajv@8.12.0: + /ajv-errors@3.0.0(ajv@8.12.0): resolution: {integrity: sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==} peerDependencies: ajv: ^8.0.1 @@ -1907,8 +2044,10 @@ packages: ajv: 8.12.0 dev: false - /ajv-formats/2.1.1: + /ajv-formats@2.1.1(ajv@8.12.0): resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} + peerDependencies: + ajv: ^8.0.0 peerDependenciesMeta: ajv: optional: true @@ -1916,7 +2055,7 @@ packages: ajv: 8.12.0 dev: false - /ajv-keywords/3.5.2_ajv@6.12.6: + /ajv-keywords@3.5.2(ajv@6.12.6): resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} peerDependencies: ajv: ^6.9.1 @@ -1924,25 +2063,25 @@ packages: ajv: 6.12.6 dev: false - /ajv/6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + /ajv-keywords@5.1.0(ajv@8.12.0): + resolution: {integrity: sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==} + peerDependencies: + ajv: ^8.8.2 dependencies: + ajv: 8.12.0 fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 dev: false - /ajv/8.11.2: - resolution: {integrity: sha512-E4bfmKAhGiSTvMfL1Myyycaub+cUEU2/IvpylXkUu7CHBkBj1f/ikdzbD7YQ6FKUbixDxeYvB/xY4fvyroDlQg==} + /ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: fast-deep-equal: 3.1.3 - json-schema-traverse: 1.0.0 - require-from-string: 2.0.2 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 uri-js: 4.4.1 dev: false - /ajv/8.12.0: + /ajv@8.12.0: resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} dependencies: fast-deep-equal: 3.1.3 @@ -1951,7 +2090,7 @@ packages: uri-js: 4.4.1 dev: false - /ajv/8.9.0: + /ajv@8.9.0: resolution: {integrity: sha512-qOKJyNj/h+OWx7s5DePL6Zu1KeM9jPZhwBqs+7DzP6bGOvqzVCSf0xueYmVuaC/oQ/VtS2zLMLHdQFbkka+XDQ==} dependencies: fast-deep-equal: 3.1.3 @@ -1960,50 +2099,55 @@ packages: uri-js: 4.4.1 dev: false - /ansi-escapes/4.3.2: + /ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} dependencies: type-fest: 0.21.3 dev: false - /ansi-regex/2.1.1: - resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} - engines: {node: '>=0.10.0'} - dev: false - - /ansi-regex/5.0.1: + /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} dev: false - /ansi-styles/3.2.1: + /ansi-regex@6.0.1: + resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + engines: {node: '>=12'} + dev: false + + /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} dependencies: color-convert: 1.9.3 dev: false - /ansi-styles/4.3.0: + /ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} dependencies: color-convert: 2.0.1 dev: false - /ansi-styles/5.2.0: + /ansi-styles@5.2.0: resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} engines: {node: '>=10'} dev: false - /anymatch/2.0.0: + /ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + dev: false + + /anymatch@2.0.0: resolution: {integrity: sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==} dependencies: micromatch: 3.1.10 normalize-path: 2.1.1 dev: false - /anymatch/3.1.3: + /anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} dependencies: @@ -2011,134 +2155,163 @@ packages: picomatch: 2.3.1 dev: false - /aproba/1.2.0: + /aproba@1.2.0: resolution: {integrity: sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==} dev: false - /are-we-there-yet/1.1.7: - resolution: {integrity: sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==} - dependencies: - delegates: 1.0.0 - readable-stream: 2.3.7 - dev: false - - /arg/4.1.3: + /arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} dev: false - /argparse/1.0.10: + /argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} dependencies: sprintf-js: 1.0.3 dev: false - /argparse/2.0.1: + /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: false - /arr-diff/4.0.0: + /arr-diff@4.0.0: resolution: {integrity: sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==} engines: {node: '>=0.10.0'} dev: false - /arr-flatten/1.1.0: + /arr-flatten@1.1.0: resolution: {integrity: sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==} engines: {node: '>=0.10.0'} dev: false - /arr-union/3.1.0: + /arr-union@3.1.0: resolution: {integrity: sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==} engines: {node: '>=0.10.0'} dev: false - /array-includes/3.1.6: - resolution: {integrity: sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==} + /array-buffer-byte-length@1.0.0: + resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} + dependencies: + call-bind: 1.0.5 + is-array-buffer: 3.0.2 + dev: false + + /array-includes@3.1.7: + resolution: {integrity: sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 - get-intrinsic: 1.2.0 + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + get-intrinsic: 1.2.2 is-string: 1.0.7 dev: false - /array-union/2.1.0: + /array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} dev: false - /array-unique/0.3.2: + /array-unique@0.3.2: resolution: {integrity: sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==} engines: {node: '>=0.10.0'} dev: false - /array.prototype.flat/1.3.1: - resolution: {integrity: sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==} + /array.prototype.findlastindex@1.2.3: + resolution: {integrity: sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 - es-shim-unscopables: 1.0.0 + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + es-shim-unscopables: 1.0.2 + get-intrinsic: 1.2.2 dev: false - /arrify/1.0.1: - resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} - engines: {node: '>=0.10.0'} + /array.prototype.flat@1.3.2: + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + es-shim-unscopables: 1.0.2 + dev: false + + /array.prototype.flatmap@1.3.2: + resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + es-shim-unscopables: 1.0.2 + dev: false + + /arraybuffer.prototype.slice@1.0.2: + resolution: {integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.0 + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + get-intrinsic: 1.2.2 + is-array-buffer: 3.0.2 + is-shared-array-buffer: 1.0.2 dev: false - /arrify/3.0.0: + /arrify@3.0.0: resolution: {integrity: sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==} engines: {node: '>=12'} dev: false - /assign-symbols/1.0.0: + /assign-symbols@1.0.0: resolution: {integrity: sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==} engines: {node: '>=0.10.0'} dev: false - /async/3.2.4: - resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} + /async@3.2.5: + resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} dev: false - /asynckit/0.4.0: + /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: false - /atob/2.1.2: + /atob@2.1.2: resolution: {integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==} engines: {node: '>= 4.5.0'} hasBin: true dev: false - /available-typed-arrays/1.0.5: + /available-typed-arrays@1.0.5: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} dev: false - /babel-jest/29.4.3_@babel+core@7.21.0: - resolution: {integrity: sha512-o45Wyn32svZE+LnMVWv/Z4x0SwtLbh4FyGcYtR20kIWd+rdrDZ9Fzq8Ml3MYLD+mZvEdzCjZsCnYZ2jpJyQ+Nw==} + /babel-jest@29.7.0(@babel/core@7.23.3): + resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@babel/core': ^7.8.0 dependencies: - '@babel/core': 7.21.0 - '@jest/transform': 29.4.3 - '@types/babel__core': 7.20.0 + '@babel/core': 7.23.3 + '@jest/transform': 29.7.0 + '@types/babel__core': 7.20.4 babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 29.4.3_@babel+core@7.21.0 + babel-preset-jest: 29.6.3(@babel/core@7.23.3) chalk: 4.1.2 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 slash: 3.0.0 transitivePeerDependencies: - supports-color dev: false - /babel-plugin-istanbul/6.1.1: + /babel-plugin-istanbul@6.1.1: resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} engines: {node: '>=8'} dependencies: - '@babel/helper-plugin-utils': 7.20.2 + '@babel/helper-plugin-utils': 7.22.5 '@istanbuljs/load-nyc-config': 1.1.0 '@istanbuljs/schema': 0.1.3 istanbul-lib-instrument: 5.2.1 @@ -2147,52 +2320,56 @@ packages: - supports-color dev: false - /babel-plugin-jest-hoist/29.4.3: - resolution: {integrity: sha512-mB6q2q3oahKphy5V7CpnNqZOCkxxZ9aokf1eh82Dy3jQmg4xvM1tGrh5y6BQUJh4a3Pj9+eLfwvAZ7VNKg7H8Q==} + /babel-plugin-jest-hoist@29.6.3: + resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/template': 7.20.7 - '@babel/types': 7.21.0 - '@types/babel__core': 7.20.0 - '@types/babel__traverse': 7.18.3 + '@babel/template': 7.22.15 + '@babel/types': 7.23.3 + '@types/babel__core': 7.20.4 + '@types/babel__traverse': 7.20.4 dev: false - /babel-preset-current-node-syntax/1.0.1_@babel+core@7.21.0: + /babel-preset-current-node-syntax@1.0.1(@babel/core@7.23.3): resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.21.0 - '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.21.0 - '@babel/plugin-syntax-bigint': 7.8.3_@babel+core@7.21.0 - '@babel/plugin-syntax-class-properties': 7.12.13_@babel+core@7.21.0 - '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.21.0 - '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.21.0 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.21.0 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.21.0 - '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.21.0 - '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.21.0 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.21.0 - '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.21.0 - '@babel/plugin-syntax-top-level-await': 7.14.5_@babel+core@7.21.0 - dev: false - - /babel-preset-jest/29.4.3_@babel+core@7.21.0: - resolution: {integrity: sha512-gWx6COtSuma6n9bw+8/F+2PCXrIgxV/D1TJFnp6OyBK2cxPWg0K9p/sriNYeifKjpUkMViWQ09DSWtzJQRETsw==} + '@babel/core': 7.23.3 + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.23.3) + '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.23.3) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.23.3) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.23.3) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.23.3) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.23.3) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.23.3) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.23.3) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.23.3) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.23.3) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.23.3) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.23.3) + dev: false + + /babel-preset-jest@29.6.3(@babel/core@7.23.3): + resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.21.0 - babel-plugin-jest-hoist: 29.4.3 - babel-preset-current-node-syntax: 1.0.1_@babel+core@7.21.0 + '@babel/core': 7.23.3 + babel-plugin-jest-hoist: 29.6.3 + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.23.3) dev: false - /balanced-match/1.0.2: + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: false - /base/0.11.2: + /base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + dev: false + + /base@0.11.2: resolution: {integrity: sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==} engines: {node: '>=0.10.0'} dependencies: @@ -2205,34 +2382,44 @@ packages: pascalcase: 0.1.1 dev: false - /base64-js/1.5.1: - resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - dev: false - - /big.js/5.2.2: - resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} + /big-integer@1.6.51: + resolution: {integrity: sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==} + engines: {node: '>=0.6'} dev: false - /bl/4.1.0: + /bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} dependencies: buffer: 5.7.1 inherits: 2.0.4 - readable-stream: 3.6.0 + readable-stream: 3.6.2 dev: false - /bluebird/3.7.2: + /bluebird@3.7.2: resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} dev: false - /brace-expansion/1.1.11: + /bplist-parser@0.2.0: + resolution: {integrity: sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==} + engines: {node: '>= 5.10.0'} + dependencies: + big-integer: 1.6.51 + dev: false + + /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 dev: false - /braces/2.3.2: + /brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: false + + /braces@2.3.2: resolution: {integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==} engines: {node: '>=0.10.0'} dependencies: @@ -2248,71 +2435,78 @@ packages: to-regex: 3.0.2 dev: false - /braces/3.0.2: + /braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} dependencies: fill-range: 7.0.1 dev: false - /browserslist/4.21.5: - resolution: {integrity: sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==} + /browserslist@4.22.1: + resolution: {integrity: sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001457 - electron-to-chromium: 1.4.306 - node-releases: 2.0.10 - update-browserslist-db: 1.0.10_browserslist@4.21.5 + caniuse-lite: 1.0.30001562 + electron-to-chromium: 1.4.583 + node-releases: 2.0.13 + update-browserslist-db: 1.0.13(browserslist@4.22.1) dev: false - /bs-logger/0.2.6: + /bs-logger@0.2.6: resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} engines: {node: '>= 6'} dependencies: fast-json-stable-stringify: 2.1.0 dev: false - /bser/2.1.1: + /bser@2.1.1: resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} dependencies: node-int64: 0.4.0 dev: false - /buffer-from/1.1.2: + /buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} dev: false - /buffer/5.7.1: + /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} dependencies: base64-js: 1.5.1 ieee754: 1.2.1 dev: false - /builtin-modules/3.3.0: + /builtin-modules@3.3.0: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} dev: false - /builtins/1.0.3: + /builtins@1.0.3: resolution: {integrity: sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==} dev: false - /builtins/5.0.1: + /builtins@5.0.1: resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: - semver: 7.3.8 + semver: 7.5.4 dev: false - /cacache/12.0.4: + /bundle-name@3.0.0: + resolution: {integrity: sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==} + engines: {node: '>=12'} + dependencies: + run-applescript: 5.0.0 + dev: false + + /cacache@12.0.4: resolution: {integrity: sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==} dependencies: bluebird: 3.7.2 chownr: 1.1.4 figgy-pudding: 3.5.2 glob: 7.1.7 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 infer-owner: 1.0.4 lru-cache: 5.1.1 mississippi: 3.0.0 @@ -2325,7 +2519,25 @@ packages: y18n: 4.0.3 dev: false - /cache-base/1.0.1: + /cacache@18.0.0: + resolution: {integrity: sha512-I7mVOPl3PUCeRub1U8YoGz2Lqv9WOBpobZ8RyWFXmReuILz+3OAyTa5oH3QPdtKZD7N0Yk00aLfzn0qvp8dZ1w==} + engines: {node: ^16.14.0 || >=18.0.0} + dependencies: + '@npmcli/fs': 3.1.0 + fs-minipass: 3.0.3 + glob: 10.3.10 + lru-cache: 10.0.2 + minipass: 7.0.4 + minipass-collect: 1.0.2 + minipass-flush: 1.0.5 + minipass-pipeline: 1.2.4 + p-map: 4.0.0 + ssri: 10.0.5 + tar: 6.2.0 + unique-filename: 3.0.0 + dev: false + + /cache-base@1.0.1: resolution: {integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==} engines: {node: '>=0.10.0'} dependencies: @@ -2340,65 +2552,56 @@ packages: unset-value: 1.0.0 dev: false - /call-bind/1.0.2: - resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} + /call-bind@1.0.5: + resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} dependencies: - function-bind: 1.1.1 - get-intrinsic: 1.2.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.2 + set-function-length: 1.1.1 dev: false - /callsites/3.1.0: + /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} dev: false - /camel-case/4.1.2: + /camel-case@4.1.2: resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} dependencies: pascal-case: 3.1.2 - tslib: 2.5.0 - dev: false - - /camelcase-keys/7.0.2: - resolution: {integrity: sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==} - engines: {node: '>=12'} - dependencies: - camelcase: 6.3.0 - map-obj: 4.3.0 - quick-lru: 5.1.1 - type-fest: 1.4.0 + tslib: 2.6.2 dev: false - /camelcase/5.3.1: + /camelcase@5.3.1: resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} engines: {node: '>=6'} dev: false - /camelcase/6.3.0: + /camelcase@6.3.0: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} dev: false - /caniuse-lite/1.0.30001457: - resolution: {integrity: sha512-SDIV6bgE1aVbK6XyxdURbUE89zY7+k1BBBaOwYwkNCglXlel/E7mELiHC64HQ+W0xSKlqWhV9Wh7iHxUjMs4fA==} + /caniuse-lite@1.0.30001562: + resolution: {integrity: sha512-kfte3Hym//51EdX4239i+Rmp20EsLIYGdPkERegTgU19hQWCRhsRFGKHTliUlsry53tv17K7n077Kqa0WJU4ng==} dev: false - /capital-case/1.0.4: + /capital-case@1.0.4: resolution: {integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==} dependencies: no-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.2 upper-case-first: 2.0.2 dev: false - /capture-exit/2.0.0: + /capture-exit@2.0.0: resolution: {integrity: sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==} engines: {node: 6.* || 8.* || >= 10.*} dependencies: rsvp: 4.8.5 dev: false - /chalk/2.4.2: + /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} dependencies: @@ -2407,7 +2610,7 @@ packages: supports-color: 5.5.0 dev: false - /chalk/4.1.2: + /chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} dependencies: @@ -2415,7 +2618,7 @@ packages: supports-color: 7.2.0 dev: false - /change-case/4.1.2: + /change-case@4.1.2: resolution: {integrity: sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==} dependencies: camel-case: 4.1.2 @@ -2429,37 +2632,42 @@ packages: path-case: 3.0.4 sentence-case: 3.0.4 snake-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.2 dev: false - /char-regex/1.0.2: + /char-regex@1.0.2: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} dev: false - /chownr/1.1.4: + /chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} dev: false - /chrome-trace-event/1.0.3: + /chownr@2.0.0: + resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} + engines: {node: '>=10'} + dev: false + + /chrome-trace-event@1.0.3: resolution: {integrity: sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==} engines: {node: '>=6.0'} dev: false - /ci-info/2.0.0: + /ci-info@2.0.0: resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} dev: false - /ci-info/3.8.0: - resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} + /ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} dev: false - /cjs-module-lexer/1.2.2: - resolution: {integrity: sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==} + /cjs-module-lexer@1.2.3: + resolution: {integrity: sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==} dev: false - /class-utils/0.3.6: + /class-utils@0.3.6: resolution: {integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==} engines: {node: '>=0.10.0'} dependencies: @@ -2469,28 +2677,33 @@ packages: static-extend: 0.1.2 dev: false - /clean-regexp/1.0.0: + /clean-regexp@1.0.0: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} engines: {node: '>=4'} dependencies: escape-string-regexp: 1.0.5 dev: false - /clean-stack/4.2.0: + /clean-stack@2.2.0: + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} + dev: false + + /clean-stack@4.2.0: resolution: {integrity: sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==} engines: {node: '>=12'} dependencies: escape-string-regexp: 5.0.0 dev: false - /cli-progress/3.10.0: + /cli-progress@3.10.0: resolution: {integrity: sha512-kLORQrhYCAtUPLZxqsAt2YJGOvRdt34+O6jl5cQGb7iF3dM55FQZlTR+rQyIK9JUcO9bBMwZsTlND+3dmFU2Cw==} engines: {node: '>=4'} dependencies: string-width: 4.2.3 dev: false - /cliui/7.0.4: + /cliui@7.0.4: resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} dependencies: string-width: 4.2.3 @@ -2498,7 +2711,7 @@ packages: wrap-ansi: 7.0.0 dev: false - /cliui/8.0.1: + /cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} dependencies: @@ -2507,7 +2720,7 @@ packages: wrap-ansi: 7.0.0 dev: false - /clone-deep/4.0.1: + /clone-deep@4.0.1: resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} engines: {node: '>=6'} dependencies: @@ -2516,25 +2729,20 @@ packages: shallow-clone: 3.0.1 dev: false - /co/4.6.0: + /co@4.6.0: resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} dev: false - /code-block-writer/11.0.3: + /code-block-writer@11.0.3: resolution: {integrity: sha512-NiujjUFB4SwScJq2bwbYUtXbZhBSlY6vYzm++3Q6oC+U+injTqfPYFK8wS9COOmb2lueqp0ZRB4nK1VYeHgNyw==} dev: false - /code-point-at/1.1.0: - resolution: {integrity: sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==} - engines: {node: '>=0.10.0'} - dev: false - - /collect-v8-coverage/1.0.1: - resolution: {integrity: sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==} + /collect-v8-coverage@1.0.2: + resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} dev: false - /collection-visit/1.0.0: + /collection-visit@1.0.0: resolution: {integrity: sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==} engines: {node: '>=0.10.0'} dependencies: @@ -2542,125 +2750,117 @@ packages: object-visit: 1.0.1 dev: false - /color-convert/1.9.3: + /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: color-name: 1.1.3 dev: false - /color-convert/2.0.1: + /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} dependencies: color-name: 1.1.4 dev: false - /color-name/1.1.3: + /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} dev: false - /color-name/1.1.4: + /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: false - /color-string/1.9.1: + /color-string@1.9.1: resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} dependencies: color-name: 1.1.4 simple-swizzle: 0.2.2 dev: false - /color/3.2.1: + /color@3.2.1: resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==} dependencies: color-convert: 1.9.3 color-string: 1.9.1 dev: false - /colorette/1.4.0: - resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==} + /colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} dev: false - /colorspace/1.1.4: + /colorspace@1.1.4: resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} dependencies: color: 3.2.1 text-hex: 1.0.0 dev: false - /combined-stream/1.0.8: + /combined-stream@1.0.8: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} dependencies: delayed-stream: 1.0.0 dev: false - /command-exists/1.2.9: + /command-exists@1.2.9: resolution: {integrity: sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==} dev: false - /commander/2.20.3: - resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + /commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} dev: false - /commander/7.2.0: - resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} - engines: {node: '>= 10'} + /commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} dev: false - /commonmark/0.27.0: - resolution: {integrity: sha512-nHdZE2hDhygZgTuuIAD4+Q5cAa2zRzhZyG3e1Jt8I1RSRVarZhJosLMW+tzyCg2frndTKOgQlmjH/iRe4Giqhw==} + /commonmark@0.30.0: + resolution: {integrity: sha512-j1yoUo4gxPND1JWV9xj5ELih0yMv1iCWDG6eEQIPLSWLxzCXiFoyS7kvB+WwU+tZMf4snwJMMtaubV0laFpiBA==} hasBin: true dependencies: - entities: 1.1.2 + entities: 2.0.3 mdurl: 1.0.1 minimist: 1.2.8 string.prototype.repeat: 0.2.0 dev: false - /compare-versions/3.6.0: - resolution: {integrity: sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==} + /compare-versions@6.1.0: + resolution: {integrity: sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==} dev: false - /component-emitter/1.3.0: + /component-emitter@1.3.0: resolution: {integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==} dev: false - /concat-map/0.0.1: + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: false - /concat-stream/1.6.2: + /concat-stream@1.6.2: resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} engines: {'0': node >= 0.8} dependencies: buffer-from: 1.1.2 inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 typedarray: 0.0.6 dev: false - /console-control-strings/1.1.0: - resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} - dev: false - - /constant-case/3.0.4: + /constant-case@3.0.4: resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} dependencies: no-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.2 upper-case: 2.0.2 dev: false - /convert-source-map/1.9.0: - resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} - dev: false - - /convert-source-map/2.0.0: + /convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: false - /copy-concurrently/1.0.5: + /copy-concurrently@1.0.5: resolution: {integrity: sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==} dependencies: aproba: 1.2.0 @@ -2671,81 +2871,97 @@ packages: run-queue: 1.0.3 dev: false - /copy-descriptor/0.1.1: + /copy-descriptor@0.1.1: resolution: {integrity: sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==} engines: {node: '>=0.10.0'} dev: false - /copy-webpack-plugin/7.0.0_webpack@5.40.0: - resolution: {integrity: sha512-SLjQNa5iE3BoCP76ESU9qYo9ZkEWtXoZxDurHoqPchAFRblJ9g96xTeC560UXBMre1Nx6ixIIUfiY3VcjpJw3g==} - engines: {node: '>= 10.13.0'} + /copy-webpack-plugin@11.0.0(webpack@5.89.0): + resolution: {integrity: sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==} + engines: {node: '>= 14.15.0'} peerDependencies: webpack: ^5.1.0 dependencies: - fast-glob: 3.2.12 - glob-parent: 5.1.2 - globby: 11.1.0 - loader-utils: 2.0.4 + fast-glob: 3.3.2 + glob-parent: 6.0.2 + globby: 13.2.2 normalize-path: 3.0.0 - p-limit: 3.1.0 - schema-utils: 3.1.1 - serialize-javascript: 5.0.1 - webpack: 5.40.0_webpack-cli@4.7.2 + schema-utils: 4.2.0 + serialize-javascript: 6.0.1 + webpack: 5.89.0(webpack-cli@5.1.4) dev: false - /core-util-is/1.0.3: + /core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} dev: false - /cp-file/9.1.0: - resolution: {integrity: sha512-3scnzFj/94eb7y4wyXRWwvzLFaQp87yyfTnChIjlfYrVqp5lVO3E2hIJMeQIltUT0K2ZAB3An1qXcBmwGyvuwA==} - engines: {node: '>=10'} + /cp-file@10.0.0: + resolution: {integrity: sha512-vy2Vi1r2epK5WqxOLnskeKeZkdZvTKfFZQCplE3XWsP+SUJyd5XAUFC9lFgTjjXJF2GMne/UML14iEmkAaDfFg==} + engines: {node: '>=14.16'} dependencies: - graceful-fs: 4.2.10 - make-dir: 3.1.0 + graceful-fs: 4.2.11 nested-error-stacks: 2.1.1 - p-event: 4.2.0 + p-event: 5.0.1 dev: false - /cpy-cli/4.1.0: - resolution: {integrity: sha512-JA6bth6/mxPCa19SrWkIuPEBrea8vO9g1v0qhmCLnAKOfTcsNk5/X3W1o9aZuOHgugRcxdyR67rO4Gw/DA+4Qg==} - engines: {node: '>=12.20'} + /cpy-cli@5.0.0: + resolution: {integrity: sha512-fb+DZYbL9KHc0BC4NYqGRrDIJZPXUmjjtqdw4XRRg8iV8dIfghUX/WiL+q4/B/KFTy3sK6jsbUhBaz0/Hxg7IQ==} + engines: {node: '>=16'} hasBin: true dependencies: - cpy: 9.0.1 - meow: 10.1.5 + cpy: 10.1.0 + meow: 12.1.1 dev: false - /cpy/9.0.1: - resolution: {integrity: sha512-D9U0DR5FjTCN3oMTcFGktanHnAG5l020yvOCR1zKILmAyPP7I/9pl6NFgRbDcmSENtbK1sQLBz1p9HIOlroiNg==} - engines: {node: ^12.20.0 || ^14.17.0 || >=16.0.0} + /cpy@10.1.0: + resolution: {integrity: sha512-VC2Gs20JcTyeQob6UViBLnyP0bYHkBh6EiKzot9vi2DmeGlFT9Wd7VG3NBrkNx/jYvFBeyDOMMHdHQhbtKLgHQ==} + engines: {node: '>=16'} dependencies: arrify: 3.0.0 - cp-file: 9.1.0 - globby: 13.1.3 - junk: 4.0.0 + cp-file: 10.0.0 + globby: 13.2.2 + junk: 4.0.1 micromatch: 4.0.5 nested-error-stacks: 2.1.1 p-filter: 3.0.0 - p-map: 5.5.0 + p-map: 6.0.0 + dev: false + + /create-jest@29.7.0(@types/node@20.9.0)(ts-node@10.9.1): + resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + dependencies: + '@jest/types': 29.6.3 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.11 + jest-config: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + jest-util: 29.7.0 + prompts: 2.4.2 + transitivePeerDependencies: + - '@types/node' + - babel-plugin-macros + - supports-color + - ts-node dev: false - /create-require/1.1.1: + /create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} dev: false - /cross-spawn/6.0.5: + /cross-spawn@6.0.5: resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} engines: {node: '>=4.8'} dependencies: nice-try: 1.0.5 path-key: 2.0.1 - semver: 5.7.1 + semver: 5.7.2 shebang-command: 1.2.0 which: 1.3.1 dev: false - /cross-spawn/7.0.3: + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} dependencies: @@ -2754,39 +2970,39 @@ packages: which: 2.0.2 dev: false - /cyclist/1.0.1: - resolution: {integrity: sha512-NJGVKPS81XejHcLhaLJS7plab0fK3slPh11mESeeDq2W4ZI5kUKK/LRRdVDvjJseojbPB7ZwjnyOybg3Igea/A==} + /cyclist@1.0.2: + resolution: {integrity: sha512-0sVXIohTfLqVIW3kb/0n6IiWF3Ifj5nm2XaSrLq2DI6fKIGa2fYAZdk917rUneaeLVpYfFcyXE2ft0fe3remsA==} dev: false - /data-uri-to-buffer/3.0.1: + /data-uri-to-buffer@3.0.1: resolution: {integrity: sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==} engines: {node: '>= 6'} dev: false - /data-uri-to-buffer/4.0.1: + /data-uri-to-buffer@4.0.1: resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} engines: {node: '>= 12'} dev: false - /debug/2.6.9: + /debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} dependencies: ms: 2.0.0 dev: false - /debug/3.1.0: + /debug@3.1.0: resolution: {integrity: sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==} dependencies: ms: 2.0.0 dev: false - /debug/3.2.7: + /debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} dependencies: ms: 2.1.3 dev: false - /debug/4.3.4: + /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} peerDependencies: @@ -2798,277 +3014,315 @@ packages: ms: 2.1.2 dev: false - /decamelize-keys/1.1.1: - resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} - engines: {node: '>=0.10.0'} - dependencies: - decamelize: 1.2.0 - map-obj: 1.0.1 - dev: false - - /decamelize/1.2.0: - resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} - engines: {node: '>=0.10.0'} - dev: false - - /decamelize/5.0.1: - resolution: {integrity: sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==} - engines: {node: '>=10'} - dev: false - - /decode-uri-component/0.2.2: + /decode-uri-component@0.2.2: resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} engines: {node: '>=0.10'} dev: false - /decompress-response/4.2.1: - resolution: {integrity: sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==} - engines: {node: '>=8'} + /decompress-response@6.0.0: + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} + engines: {node: '>=10'} dependencies: - mimic-response: 2.1.0 + mimic-response: 3.1.0 dev: false - /dedent/0.7.0: - resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} + /dedent@1.5.1: + resolution: {integrity: sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==} + peerDependencies: + babel-plugin-macros: ^3.1.0 + peerDependenciesMeta: + babel-plugin-macros: + optional: true dev: false - /deep-extend/0.6.0: + /deep-extend@0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} dev: false - /deep-is/0.1.4: + /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: false - /deepmerge/4.3.0: - resolution: {integrity: sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==} + /deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} dev: false - /define-properties/1.2.0: - resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} + /default-browser-id@3.0.0: + resolution: {integrity: sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==} + engines: {node: '>=12'} + dependencies: + bplist-parser: 0.2.0 + untildify: 4.0.0 + dev: false + + /default-browser@4.0.0: + resolution: {integrity: sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==} + engines: {node: '>=14.16'} + dependencies: + bundle-name: 3.0.0 + default-browser-id: 3.0.0 + execa: 7.2.0 + titleize: 3.0.0 + dev: false + + /define-data-property@1.1.1: + resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} engines: {node: '>= 0.4'} dependencies: - has-property-descriptors: 1.0.0 + get-intrinsic: 1.2.2 + gopd: 1.0.1 + has-property-descriptors: 1.0.1 + dev: false + + /define-lazy-prop@3.0.0: + resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} + engines: {node: '>=12'} + dev: false + + /define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.1 + has-property-descriptors: 1.0.1 object-keys: 1.1.1 dev: false - /define-property/0.2.5: + /define-property@0.2.5: resolution: {integrity: sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==} engines: {node: '>=0.10.0'} dependencies: - is-descriptor: 0.1.6 + is-descriptor: 0.1.7 dev: false - /define-property/1.0.0: + /define-property@1.0.0: resolution: {integrity: sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==} engines: {node: '>=0.10.0'} dependencies: - is-descriptor: 1.0.2 + is-descriptor: 1.0.3 dev: false - /define-property/2.0.2: + /define-property@2.0.2: resolution: {integrity: sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==} engines: {node: '>=0.10.0'} dependencies: - is-descriptor: 1.0.2 + is-descriptor: 1.0.3 isobject: 3.0.1 dev: false - /delayed-stream/1.0.0: + /delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} dev: false - /delegates/1.0.0: - resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} - dev: false - - /detect-libc/1.0.3: - resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} - engines: {node: '>=0.10'} - hasBin: true + /detect-libc@2.0.2: + resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} + engines: {node: '>=8'} dev: false - /detect-newline/3.1.0: + /detect-newline@3.1.0: resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} engines: {node: '>=8'} dev: false - /diff-sequences/26.6.2: + /diff-sequences@26.6.2: resolution: {integrity: sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==} engines: {node: '>= 10.14.2'} dev: false - /diff-sequences/29.4.3: - resolution: {integrity: sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==} + /diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: false - /diff/4.0.2: + /diff@4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} dev: false - /dir-glob/3.0.1: + /diff@5.1.0: + resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} + engines: {node: '>=0.3.1'} + dev: false + + /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} dependencies: path-type: 4.0.0 dev: false - /doctrine/2.1.0: + /doctrine@2.1.0: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} dependencies: esutils: 2.0.3 dev: false - /doctrine/3.0.0: + /doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} dependencies: esutils: 2.0.3 dev: false - /dot-case/3.0.4: + /dot-case@3.0.4: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} dependencies: no-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.2 dev: false - /duplexify/3.7.1: + /duplexify@3.7.1: resolution: {integrity: sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==} dependencies: end-of-stream: 1.4.4 inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 stream-shift: 1.0.1 dev: false - /electron-to-chromium/1.4.306: - resolution: {integrity: sha512-1zGmLFfpcs2v7ELt/1HgLZF6Gm2CCHaAdNKxd9Ge4INSU/HDYWjs7fcWU6eVMmhkpwmh+52ZrGCUU+Ji9OJihA==} + /eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: false - /emittery/0.13.1: + /electron-to-chromium@1.4.583: + resolution: {integrity: sha512-93y1gcONABZ7uqYe/JWDVQP/Pj/sQSunF0HVAPdlg/pfBnOyBMLlQUxWvkqcljJg1+W6cjvPuYD+r1Th9Tn8mA==} + dev: false + + /emittery@0.13.1: resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} engines: {node: '>=12'} dev: false - /emoji-regex/8.0.0: + /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: false - /emojis-list/3.0.0: - resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} - engines: {node: '>= 4'} + /emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: false - /enabled/2.0.0: + /enabled@2.0.0: resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} dev: false - /encoding/0.1.13: + /encoding@0.1.13: resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} dependencies: iconv-lite: 0.6.3 dev: false - /end-of-stream/1.4.4: + /end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} dependencies: once: 1.4.0 dev: false - /enhanced-resolve/5.12.0: - resolution: {integrity: sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==} + /enhanced-resolve@5.15.0: + resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} engines: {node: '>=10.13.0'} dependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 tapable: 2.2.1 dev: false - /entities/1.1.2: - resolution: {integrity: sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==} + /entities@2.0.3: + resolution: {integrity: sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==} dev: false - /envinfo/7.8.1: - resolution: {integrity: sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==} + /env-paths@2.2.1: + resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} + engines: {node: '>=6'} + dev: false + + /envinfo@7.11.0: + resolution: {integrity: sha512-G9/6xF1FPbIw0TtalAMaVPpiq2aDEuKLXM314jPVAO9r2fo2a4BLqMNkmRS7O/xPPZ+COAhGIz3ETvHEV3eUcg==} engines: {node: '>=4'} hasBin: true dev: false - /err-code/1.1.2: + /err-code@1.1.2: resolution: {integrity: sha512-CJAN+O0/yA1CKfRn9SXOGctSpEM7DCon/r/5r2eXFMY2zCCJBasFhcM5I+1kh3Ap11FsQCX+vGHceNPvpWKhoA==} dev: false - /error-ex/1.3.2: + /err-code@2.0.3: + resolution: {integrity: sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==} + dev: false + + /error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: is-arrayish: 0.2.1 dev: false - /es-abstract/1.21.1: - resolution: {integrity: sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==} + /es-abstract@1.22.3: + resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} engines: {node: '>= 0.4'} dependencies: + array-buffer-byte-length: 1.0.0 + arraybuffer.prototype.slice: 1.0.2 available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - es-set-tostringtag: 2.0.1 + call-bind: 1.0.5 + es-set-tostringtag: 2.0.2 es-to-primitive: 1.2.1 - function-bind: 1.1.1 - function.prototype.name: 1.1.5 - get-intrinsic: 1.2.0 + function.prototype.name: 1.1.6 + get-intrinsic: 1.2.2 get-symbol-description: 1.0.0 globalthis: 1.0.3 gopd: 1.0.1 - has: 1.0.3 - has-property-descriptors: 1.0.0 + has-property-descriptors: 1.0.1 has-proto: 1.0.1 has-symbols: 1.0.3 - internal-slot: 1.0.5 - is-array-buffer: 3.0.1 + hasown: 2.0.0 + internal-slot: 1.0.6 + is-array-buffer: 3.0.2 is-callable: 1.2.7 is-negative-zero: 2.0.2 is-regex: 1.1.4 is-shared-array-buffer: 1.0.2 is-string: 1.0.7 - is-typed-array: 1.1.10 + is-typed-array: 1.1.12 is-weakref: 1.0.2 - object-inspect: 1.12.3 + object-inspect: 1.13.1 object-keys: 1.1.1 object.assign: 4.1.4 - regexp.prototype.flags: 1.4.3 + regexp.prototype.flags: 1.5.1 + safe-array-concat: 1.0.1 safe-regex-test: 1.0.0 - string.prototype.trimend: 1.0.6 - string.prototype.trimstart: 1.0.6 + string.prototype.trim: 1.2.8 + string.prototype.trimend: 1.0.7 + string.prototype.trimstart: 1.0.7 + typed-array-buffer: 1.0.0 + typed-array-byte-length: 1.0.0 + typed-array-byte-offset: 1.0.0 typed-array-length: 1.0.4 unbox-primitive: 1.0.2 - which-typed-array: 1.1.9 + which-typed-array: 1.1.13 dev: false - /es-module-lexer/0.6.0: - resolution: {integrity: sha512-f8kcHX1ArhllUtb/wVSyvygoKCznIjnxhLxy7TCvIiMdT7fL4ZDTIKaadMe6eLvOXg6Wk02UeoFgUoZ2EKZZUA==} + /es-module-lexer@1.4.1: + resolution: {integrity: sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==} dev: false - /es-set-tostringtag/2.0.1: - resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} + /es-set-tostringtag@2.0.2: + resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.0 - has: 1.0.3 + get-intrinsic: 1.2.2 has-tostringtag: 1.0.0 + hasown: 2.0.0 dev: false - /es-shim-unscopables/1.0.0: - resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} + /es-shim-unscopables@1.0.2: + resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} dependencies: - has: 1.0.3 + hasown: 2.0.0 dev: false - /es-to-primitive/1.2.1: + /es-to-primitive@1.2.1: resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} engines: {node: '>= 0.4'} dependencies: @@ -3077,51 +3331,51 @@ packages: is-symbol: 1.0.4 dev: false - /es6-promise/4.2.8: + /es6-promise@4.2.8: resolution: {integrity: sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==} dev: false - /es6-promisify/5.0.0: + /es6-promisify@5.0.0: resolution: {integrity: sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==} dependencies: es6-promise: 4.2.8 dev: false - /escalade/3.1.1: + /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} dev: false - /escape-string-regexp/1.0.5: + /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} dev: false - /escape-string-regexp/2.0.0: + /escape-string-regexp@2.0.0: resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} engines: {node: '>=8'} dev: false - /escape-string-regexp/4.0.0: + /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} dev: false - /escape-string-regexp/5.0.0: + /escape-string-regexp@5.0.0: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} dev: false - /eslint-import-resolver-node/0.3.7: - resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} + /eslint-import-resolver-node@0.3.9: + resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} dependencies: debug: 3.2.7 - is-core-module: 2.11.0 - resolve: 1.22.1 + is-core-module: 2.13.1 + resolve: 1.22.8 dev: false - /eslint-module-utils/2.7.4_eslint@8.34.0: - resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} + /eslint-module-utils@2.8.0(eslint@8.53.0): + resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: eslint: '*' @@ -3130,47 +3384,51 @@ packages: optional: true dependencies: debug: 3.2.7 - eslint: 8.34.0 + eslint: 8.53.0 dev: false - /eslint-plugin-es/3.0.1_eslint@8.34.0: + /eslint-plugin-es@3.0.1(eslint@8.53.0): resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.34.0 + eslint: 8.53.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: false - /eslint-plugin-import/2.26.0_eslint@8.34.0: - resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} + /eslint-plugin-import@2.29.0(eslint@8.53.0): + resolution: {integrity: sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==} engines: {node: '>=4'} peerDependencies: eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 dependencies: - array-includes: 3.1.6 - array.prototype.flat: 1.3.1 - debug: 2.6.9 + array-includes: 3.1.7 + array.prototype.findlastindex: 1.2.3 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.34.0 - eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4_eslint@8.34.0 - has: 1.0.3 - is-core-module: 2.11.0 + eslint: 8.53.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.0(eslint@8.53.0) + hasown: 2.0.0 + is-core-module: 2.13.1 is-glob: 4.0.3 minimatch: 3.1.2 - object.values: 1.1.6 - resolve: 1.22.1 - tsconfig-paths: 3.14.1 + object.fromentries: 2.0.7 + object.groupby: 1.0.1 + object.values: 1.1.7 + semver: 6.3.1 + tsconfig-paths: 3.14.2 dev: false - /eslint-plugin-jest/27.1.7_82000cc1a3d3e332373f4ec375f6ab25: - resolution: {integrity: sha512-0QVzf+og4YI1Qr3UoprkqqhezAZjFffdi62b0IurkCXMqPtRW84/UT4CKsYT80h/D82LA9avjO/80Ou1LdgbaQ==} + /eslint-plugin-jest@27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2): + resolution: {integrity: sha512-MTlusnnDMChbElsszJvrwD1dN3x6nZl//s4JD23BxB6MgR66TZlL064su24xEIS3VACfAoHV1vgyMgPw8nkdng==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: - '@typescript-eslint/eslint-plugin': ^5.0.0 + '@typescript-eslint/eslint-plugin': ^5.0.0 || ^6.0.0 eslint: ^7.0.0 || ^8.0.0 jest: '*' peerDependenciesMeta: @@ -3179,70 +3437,74 @@ packages: jest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/utils': 5.53.0_eslint@8.34.0+typescript@4.9.5 - eslint: 8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/utils': 5.62.0(eslint@8.53.0)(typescript@5.2.2) + eslint: 8.53.0 + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) transitivePeerDependencies: - supports-color - typescript dev: false - /eslint-plugin-node/11.1.0_eslint@8.34.0: + /eslint-plugin-node@11.1.0(eslint@8.53.0): resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=5.16.0' dependencies: - eslint: 8.34.0 - eslint-plugin-es: 3.0.1_eslint@8.34.0 + eslint: 8.53.0 + eslint-plugin-es: 3.0.1(eslint@8.53.0) eslint-utils: 2.1.0 ignore: 5.2.4 minimatch: 3.1.2 - resolve: 1.22.1 - semver: 6.3.0 + resolve: 1.22.8 + semver: 6.3.1 dev: false - /eslint-plugin-prettier/4.2.1_eslint@8.34.0+prettier@2.7.1: - resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} - engines: {node: '>=12.0.0'} + /eslint-plugin-prettier@5.0.1(eslint@8.53.0)(prettier@3.1.0): + resolution: {integrity: sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==} + engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: - eslint: '>=7.28.0' + '@types/eslint': '>=8.0.0' + eslint: '>=8.0.0' eslint-config-prettier: '*' - prettier: '>=2.0.0' + prettier: '>=3.0.0' peerDependenciesMeta: + '@types/eslint': + optional: true eslint-config-prettier: optional: true dependencies: - eslint: 8.34.0 - prettier: 2.7.1 + eslint: 8.53.0 + prettier: 3.1.0 prettier-linter-helpers: 1.0.0 + synckit: 0.8.5 dev: false - /eslint-plugin-unicorn/44.0.2_eslint@8.34.0: - resolution: {integrity: sha512-GLIDX1wmeEqpGaKcnMcqRvMVsoabeF0Ton0EX4Th5u6Kmf7RM9WBl705AXFEsns56ESkEs0uyelLuUTvz9Tr0w==} - engines: {node: '>=14.18'} + /eslint-plugin-unicorn@49.0.0(eslint@8.53.0): + resolution: {integrity: sha512-0fHEa/8Pih5cmzFW5L7xMEfUTvI9WKeQtjmKpTUmY+BiFCDxkxrTdnURJOHKykhtwIeyYsxnecbGvDCml++z4Q==} + engines: {node: '>=16'} peerDependencies: - eslint: '>=8.23.1' + eslint: '>=8.52.0' dependencies: - '@babel/helper-validator-identifier': 7.19.1 - ci-info: 3.8.0 + '@babel/helper-validator-identifier': 7.22.20 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0) + ci-info: 3.9.0 clean-regexp: 1.0.0 - eslint: 8.34.0 - eslint-utils: 3.0.0_eslint@8.34.0 - esquery: 1.4.2 + eslint: 8.53.0 + esquery: 1.5.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 - lodash: 4.17.21 + jsesc: 3.0.2 pluralize: 8.0.0 read-pkg-up: 7.0.1 - regexp-tree: 0.1.24 - safe-regex: 2.1.1 - semver: 7.3.8 + regexp-tree: 0.1.27 + regjsparser: 0.10.0 + semver: 7.5.4 strip-indent: 3.0.0 dev: false - /eslint-scope/5.1.1: + /eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} dependencies: @@ -3250,148 +3512,132 @@ packages: estraverse: 4.3.0 dev: false - /eslint-scope/7.1.1: - resolution: {integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==} + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 dev: false - /eslint-utils/2.1.0: + /eslint-utils@2.1.0: resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} engines: {node: '>=6'} dependencies: eslint-visitor-keys: 1.3.0 dev: false - /eslint-utils/3.0.0_eslint@8.34.0: - resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} - engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} - peerDependencies: - eslint: '>=5' - dependencies: - eslint: 8.34.0 - eslint-visitor-keys: 2.1.0 - dev: false - - /eslint-visitor-keys/1.3.0: + /eslint-visitor-keys@1.3.0: resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} engines: {node: '>=4'} dev: false - /eslint-visitor-keys/2.1.0: - resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} - engines: {node: '>=10'} - dev: false - - /eslint-visitor-keys/3.3.0: - resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==} + /eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: false - /eslint/8.34.0: - resolution: {integrity: sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg==} + /eslint@8.53.0: + resolution: {integrity: sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint/eslintrc': 1.4.1 - '@humanwhocodes/config-array': 0.11.8 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0) + '@eslint-community/regexpp': 4.10.0 + '@eslint/eslintrc': 2.1.3 + '@eslint/js': 8.53.0 + '@humanwhocodes/config-array': 0.11.13 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.4 doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.34.0 - eslint-visitor-keys: 3.3.0 - espree: 9.4.1 - esquery: 1.4.2 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.20.0 - grapheme-splitter: 1.0.4 + globals: 13.23.0 + graphemer: 1.4.0 ignore: 5.2.4 - import-fresh: 3.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-sdsl: 4.3.0 js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 - optionator: 0.9.1 - regexpp: 3.2.0 + optionator: 0.9.3 strip-ansi: 6.0.1 - strip-json-comments: 3.1.1 text-table: 0.2.0 transitivePeerDependencies: - supports-color dev: false - /espree/9.4.1: - resolution: {integrity: sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==} + /espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.8.2 - acorn-jsx: 5.3.2_acorn@8.8.2 - eslint-visitor-keys: 3.3.0 + acorn: 8.11.2 + acorn-jsx: 5.3.2(acorn@8.11.2) + eslint-visitor-keys: 3.4.3 dev: false - /esprima/4.0.1: + /esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true dev: false - /esquery/1.4.2: - resolution: {integrity: sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==} + /esquery@1.5.0: + resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} engines: {node: '>=0.10'} dependencies: estraverse: 5.3.0 dev: false - /esrecurse/4.3.0: + /esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} dependencies: estraverse: 5.3.0 dev: false - /estraverse/4.3.0: + /estraverse@4.3.0: resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} engines: {node: '>=4.0'} dev: false - /estraverse/5.3.0: + /estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} dev: false - /esutils/2.0.3: + /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} dev: false - /events/3.3.0: + /events@3.3.0: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} dev: false - /exec-sh/0.3.6: + /exec-sh@0.3.6: resolution: {integrity: sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w==} dev: false - /execa/1.0.0: + /execa@1.0.0: resolution: {integrity: sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==} engines: {node: '>=6'} dependencies: @@ -3404,7 +3650,7 @@ packages: strip-eof: 1.0.0 dev: false - /execa/5.1.1: + /execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} dependencies: @@ -3419,12 +3665,27 @@ packages: strip-final-newline: 2.0.0 dev: false - /exit/0.1.2: + /execa@7.2.0: + resolution: {integrity: sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==} + engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0} + dependencies: + cross-spawn: 7.0.3 + get-stream: 6.0.1 + human-signals: 4.3.1 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.1.0 + onetime: 6.0.0 + signal-exit: 3.0.7 + strip-final-newline: 3.0.0 + dev: false + + /exit@0.1.2: resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} engines: {node: '>= 0.8.0'} dev: false - /expand-brackets/2.1.4: + /expand-brackets@2.1.4: resolution: {integrity: sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==} engines: {node: '>=0.10.0'} dependencies: @@ -3437,12 +3698,12 @@ packages: to-regex: 3.0.2 dev: false - /expand-template/2.0.3: + /expand-template@2.0.3: resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} engines: {node: '>=6'} dev: false - /expect/26.6.2: + /expect@26.6.2: resolution: {integrity: sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA==} engines: {node: '>= 10.14.2'} dependencies: @@ -3454,25 +3715,29 @@ packages: jest-regex-util: 26.0.0 dev: false - /expect/29.4.3: - resolution: {integrity: sha512-uC05+Q7eXECFpgDrHdXA4k2rpMyStAYPItEDLyQDo5Ta7fVkJnNA/4zh/OIVkVVNZ1oOK1PipQoyNjuZ6sz6Dg==} + /expect@29.7.0: + resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/expect-utils': 29.4.3 - jest-get-type: 29.4.3 - jest-matcher-utils: 29.4.3 - jest-message-util: 29.4.3 - jest-util: 29.4.3 + '@jest/expect-utils': 29.7.0 + jest-get-type: 29.6.3 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-util: 29.7.0 dev: false - /extend-shallow/2.0.1: + /exponential-backoff@3.1.1: + resolution: {integrity: sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==} + dev: false + + /extend-shallow@2.0.1: resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} engines: {node: '>=0.10.0'} dependencies: is-extendable: 0.1.1 dev: false - /extend-shallow/3.0.2: + /extend-shallow@3.0.2: resolution: {integrity: sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==} engines: {node: '>=0.10.0'} dependencies: @@ -3480,7 +3745,7 @@ packages: is-extendable: 1.0.1 dev: false - /extglob/2.0.4: + /extglob@2.0.4: resolution: {integrity: sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==} engines: {node: '>=0.10.0'} dependencies: @@ -3494,16 +3759,16 @@ packages: to-regex: 3.0.2 dev: false - /fast-deep-equal/3.1.3: + /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: false - /fast-diff/1.2.0: - resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} + /fast-diff@1.3.0: + resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} dev: false - /fast-glob/3.2.12: - resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} + /fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} dependencies: '@nodelib/fs.stat': 2.0.5 @@ -3513,36 +3778,36 @@ packages: micromatch: 4.0.5 dev: false - /fast-json-stable-stringify/2.1.0: + /fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} dev: false - /fast-levenshtein/2.0.6: + /fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: false - /fastest-levenshtein/1.0.16: + /fastest-levenshtein@1.0.16: resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} engines: {node: '>= 4.9.1'} dev: false - /fastq/1.15.0: + /fastq@1.15.0: resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} dependencies: reusify: 1.0.4 dev: false - /fb-watchman/2.0.2: + /fb-watchman@2.0.2: resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} dependencies: bser: 2.1.1 dev: false - /fecha/4.2.3: + /fecha@4.2.3: resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} dev: false - /fetch-blob/3.2.0: + /fetch-blob@3.2.0: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} dependencies: @@ -3550,28 +3815,28 @@ packages: web-streams-polyfill: 3.2.1 dev: false - /figgy-pudding/3.5.2: + /figgy-pudding@3.5.2: resolution: {integrity: sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==} dev: false - /file-entry-cache/6.0.1: + /file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flat-cache: 3.0.4 + flat-cache: 3.2.0 dev: false - /file-uri-to-path/2.0.0: + /file-uri-to-path@2.0.0: resolution: {integrity: sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg==} engines: {node: '>= 6'} dev: false - /file-url/3.0.0: + /file-url@3.0.0: resolution: {integrity: sha512-g872QGsHexznxkIAdK8UiZRe7SkE6kvylShU4Nsj8NvfvZag7S0QuQ4IgvPDkk75HxgjIVDwycFTDAgIiO4nDA==} engines: {node: '>=8'} dev: false - /fill-range/4.0.0: + /fill-range@4.0.0: resolution: {integrity: sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==} engines: {node: '>=0.10.0'} dependencies: @@ -3581,14 +3846,14 @@ packages: to-regex-range: 2.1.1 dev: false - /fill-range/7.0.1: + /fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} dependencies: to-regex-range: 5.0.1 dev: false - /find-up/4.1.0: + /find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} dependencies: @@ -3596,7 +3861,7 @@ packages: path-exists: 4.0.0 dev: false - /find-up/5.0.0: + /find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} dependencies: @@ -3604,42 +3869,56 @@ packages: path-exists: 4.0.0 dev: false - /flat-cache/3.0.4: - resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} + /flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flatted: 3.2.7 + flatted: 3.2.9 + keyv: 4.5.4 rimraf: 3.0.2 dev: false - /flatted/3.2.7: - resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} + /flat@5.0.2: + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + hasBin: true + dev: false + + /flatted@3.2.9: + resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: false - /flush-write-stream/1.1.1: + /flush-write-stream@1.1.1: resolution: {integrity: sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==} dependencies: inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: false - /fn.name/1.1.0: + /fn.name@1.1.0: resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==} dev: false - /for-each/0.3.3: + /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: is-callable: 1.2.7 dev: false - /for-in/1.0.2: + /for-in@1.0.2: resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} engines: {node: '>=0.10.0'} dev: false - /form-data/3.0.1: - resolution: {integrity: sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==} + /foreground-child@3.1.1: + resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} + engines: {node: '>=14'} + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + dev: false + + /form-data@4.0.0: + resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} dependencies: asynckit: 0.4.0 @@ -3647,77 +3926,91 @@ packages: mime-types: 2.1.35 dev: false - /formdata-polyfill/4.0.10: + /formdata-polyfill@4.0.10: resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} engines: {node: '>=12.20.0'} dependencies: fetch-blob: 3.2.0 dev: false - /fragment-cache/0.2.1: + /fragment-cache@0.2.1: resolution: {integrity: sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==} engines: {node: '>=0.10.0'} dependencies: map-cache: 0.2.2 dev: false - /from2/2.3.0: + /from2@2.3.0: resolution: {integrity: sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==} dependencies: inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: false - /fs-constants/1.0.0: + /fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} dev: false - /fs-extra/10.1.0: + /fs-extra@10.1.0: resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} engines: {node: '>=12'} dependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 jsonfile: 6.1.0 - universalify: 2.0.0 + universalify: 2.0.1 dev: false - /fs-extra/8.1.0: + /fs-extra@8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} dependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 jsonfile: 4.0.0 universalify: 0.1.2 dev: false - /fs-minipass/1.2.7: + /fs-minipass@1.2.7: resolution: {integrity: sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==} dependencies: minipass: 2.9.0 dev: false - /fs-write-stream-atomic/1.0.10: + /fs-minipass@2.1.0: + resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + dev: false + + /fs-minipass@3.0.3: + resolution: {integrity: sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + minipass: 7.0.4 + dev: false + + /fs-write-stream-atomic@1.0.10: resolution: {integrity: sha512-gehEzmPn2nAwr39eay+x3X34Ra+M2QlVUTLhkXPjWdeO8RF9kszk116avgBJM3ZyNHgHXBNx+VmPaFC36k0PzA==} dependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 iferr: 0.1.5 imurmurhash: 0.1.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: false - /fs.realpath/1.0.0: + /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: false - /fsevents/2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true dev: false optional: true - /ftp/0.3.10: + /ftp@0.3.10: resolution: {integrity: sha512-faFVML1aBx2UoDStmLwv2Wptt4vw5x03xxX172nhA5Y5HBshW5JweqQ2W4xL4dezQTG8inJsuYcpPHHU3X5OTQ==} engines: {node: '>=0.8.0'} dependencies: @@ -3725,85 +4018,73 @@ packages: xregexp: 2.0.0 dev: false - /function-bind/1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + /function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} dev: false - /function.prototype.name/1.1.5: - resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} + /function.prototype.name@1.1.6: + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 functions-have-names: 1.2.3 dev: false - /functions-have-names/1.2.3: + /functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: false - /gauge/2.7.4: - resolution: {integrity: sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==} - dependencies: - aproba: 1.2.0 - console-control-strings: 1.1.0 - has-unicode: 2.0.1 - object-assign: 4.1.1 - signal-exit: 3.0.7 - string-width: 1.0.2 - strip-ansi: 3.0.1 - wide-align: 1.1.5 - dev: false - - /genfun/5.0.0: + /genfun@5.0.0: resolution: {integrity: sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==} dev: false - /gensync/1.0.0-beta.2: + /gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} dev: false - /get-caller-file/2.0.5: + /get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} dev: false - /get-intrinsic/1.2.0: - resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==} + /get-intrinsic@1.2.2: + resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==} dependencies: - function-bind: 1.1.1 - has: 1.0.3 + function-bind: 1.1.2 + has-proto: 1.0.1 has-symbols: 1.0.3 + hasown: 2.0.0 dev: false - /get-package-type/0.1.0: + /get-package-type@0.1.0: resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} engines: {node: '>=8.0.0'} dev: false - /get-stream/4.1.0: + /get-stream@4.1.0: resolution: {integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==} engines: {node: '>=6'} dependencies: pump: 3.0.0 dev: false - /get-stream/6.0.1: + /get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} dev: false - /get-symbol-description/1.0.0: + /get-symbol-description@1.0.0: resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 dev: false - /get-uri/3.0.2: + /get-uri@3.0.2: resolution: {integrity: sha512-+5s0SJbGoyiJTZZ2JTpFPLMPSch72KEqGOTvQsBqg0RBWvwhWUSYZFAtz3TPW0GXJuLBJPts1E241iHg+VRfhg==} engines: {node: '>= 6'} dependencies: @@ -3817,34 +4098,46 @@ packages: - supports-color dev: false - /get-value/2.0.6: + /get-value@2.0.6: resolution: {integrity: sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==} engines: {node: '>=0.10.0'} dev: false - /github-from-package/0.0.0: + /github-from-package@0.0.0: resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} dev: false - /glob-parent/5.1.2: + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} dependencies: is-glob: 4.0.3 dev: false - /glob-parent/6.0.2: + /glob-parent@6.0.2: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} dependencies: is-glob: 4.0.3 dev: false - /glob-to-regexp/0.4.1: + /glob-to-regexp@0.4.1: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} dev: false - /glob/7.1.7: + /glob@10.3.10: + resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + dependencies: + foreground-child: 3.1.1 + jackspeak: 2.3.6 + minimatch: 9.0.3 + minipass: 7.0.4 + path-scurry: 1.10.1 + dev: false + + /glob@7.1.7: resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} dependencies: fs.realpath: 1.0.0 @@ -3855,109 +4148,111 @@ packages: path-is-absolute: 1.0.1 dev: false - /globals/11.12.0: + /globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} dev: false - /globals/13.20.0: - resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} + /globals@13.23.0: + resolution: {integrity: sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 dev: false - /globalthis/1.0.3: + /globalthis@1.0.3: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} dependencies: - define-properties: 1.2.0 + define-properties: 1.2.1 dev: false - /globby/11.1.0: + /globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.2.12 + fast-glob: 3.3.2 ignore: 5.2.4 merge2: 1.4.1 slash: 3.0.0 dev: false - /globby/13.1.3: - resolution: {integrity: sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==} + /globby@13.1.4: + resolution: {integrity: sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: dir-glob: 3.0.1 - fast-glob: 3.2.12 + fast-glob: 3.3.2 ignore: 5.2.4 merge2: 1.4.1 slash: 4.0.0 dev: false - /gopd/1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + /globby@13.2.2: + resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: - get-intrinsic: 1.2.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.2.4 + merge2: 1.4.1 + slash: 4.0.0 dev: false - /graceful-fs/4.2.10: - resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} + /gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + dependencies: + get-intrinsic: 1.2.2 dev: false - /grapheme-splitter/1.0.4: - resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} dev: false - /hard-rejection/2.1.0: - resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} - engines: {node: '>=6'} + /graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: false - /has-bigints/1.0.2: + /has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} dev: false - /has-flag/3.0.0: + /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} dev: false - /has-flag/4.0.0: + /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} dev: false - /has-property-descriptors/1.0.0: - resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} + /has-property-descriptors@1.0.1: + resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.2 dev: false - /has-proto/1.0.1: + /has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} dev: false - /has-symbols/1.0.3: + /has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} dev: false - /has-tostringtag/1.0.0: + /has-tostringtag@1.0.0: resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 dev: false - /has-unicode/2.0.1: - resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} - dev: false - - /has-value/0.3.1: + /has-value@0.3.1: resolution: {integrity: sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==} engines: {node: '>=0.10.0'} dependencies: @@ -3966,7 +4261,7 @@ packages: isobject: 2.1.0 dev: false - /has-value/1.0.0: + /has-value@1.0.0: resolution: {integrity: sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==} engines: {node: '>=0.10.0'} dependencies: @@ -3975,12 +4270,12 @@ packages: isobject: 3.0.1 dev: false - /has-values/0.1.4: + /has-values@0.1.4: resolution: {integrity: sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==} engines: {node: '>=0.10.0'} dev: false - /has-values/1.0.0: + /has-values@1.0.0: resolution: {integrity: sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==} engines: {node: '>=0.10.0'} dependencies: @@ -3988,47 +4283,44 @@ packages: kind-of: 4.0.0 dev: false - /has/1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} + /hasown@2.0.0: + resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} + engines: {node: '>= 0.4'} dependencies: - function-bind: 1.1.1 + function-bind: 1.1.2 dev: false - /header-case/2.0.4: + /header-case@2.0.4: resolution: {integrity: sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==} dependencies: capital-case: 1.0.4 - tslib: 2.5.0 + tslib: 2.6.2 dev: false - /hosted-git-info/2.8.9: + /hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: false - /hosted-git-info/4.1.0: - resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} - engines: {node: '>=10'} - dependencies: - lru-cache: 6.0.0 - dev: false - - /hosted-git-info/5.2.1: + /hosted-git-info@5.2.1: resolution: {integrity: sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} dependencies: - lru-cache: 7.17.0 + lru-cache: 7.18.3 dev: false - /html-escaper/2.0.2: + /html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: false - /http-cache-semantics/3.8.1: + /http-cache-semantics@3.8.1: resolution: {integrity: sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==} dev: false - /http-proxy-agent/2.1.0: + /http-cache-semantics@4.1.1: + resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} + dev: false + + /http-proxy-agent@2.1.0: resolution: {integrity: sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==} engines: {node: '>= 4.5.0'} dependencies: @@ -4036,7 +4328,17 @@ packages: debug: 3.1.0 dev: false - /https-proxy-agent/2.2.4: + /http-proxy-agent@7.0.0: + resolution: {integrity: sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.0 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: false + + /https-proxy-agent@2.2.4: resolution: {integrity: sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==} engines: {node: '>= 4.5.0'} dependencies: @@ -4044,44 +4346,60 @@ packages: debug: 3.2.7 dev: false - /human-signals/2.1.0: + /https-proxy-agent@7.0.2: + resolution: {integrity: sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.0 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: false + + /human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} dev: false - /humanize-ms/1.2.1: + /human-signals@4.3.1: + resolution: {integrity: sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==} + engines: {node: '>=14.18.0'} + dev: false + + /humanize-ms@1.2.1: resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} dependencies: ms: 2.1.3 dev: false - /iconv-lite/0.6.3: + /iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: safer-buffer: 2.1.2 dev: false - /ieee754/1.2.1: + /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: false - /iferr/0.1.5: + /iferr@0.1.5: resolution: {integrity: sha512-DUNFN5j7Tln0D+TxzloUjKB+CtVu6myn0JEFak6dG18mNt9YkQ6lzGCdafwofISZ1lLF3xRHJ98VKy9ynkcFaA==} dev: false - /ignore-walk/3.0.4: + /ignore-walk@3.0.4: resolution: {integrity: sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==} dependencies: minimatch: 3.1.2 dev: false - /ignore/5.2.4: + /ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} dev: false - /import-fresh/3.3.0: + /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} dependencies: @@ -4089,7 +4407,7 @@ packages: resolve-from: 4.0.0 dev: false - /import-local/3.1.0: + /import-local@3.1.0: resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} engines: {node: '>=8'} hasBin: true @@ -4098,419 +4416,461 @@ packages: resolve-cwd: 3.0.0 dev: false - /imurmurhash/0.1.4: + /imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} dev: false - /indent-string/4.0.0: + /indent-string@4.0.0: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} dev: false - /indent-string/5.0.0: + /indent-string@5.0.0: resolution: {integrity: sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==} engines: {node: '>=12'} dev: false - /infer-owner/1.0.4: + /infer-owner@1.0.4: resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==} dev: false - /inflight/1.0.6: + /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: once: 1.4.0 wrappy: 1.0.2 dev: false - /inherits/2.0.4: + /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} dev: false - /ini/1.3.8: + /ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} dev: false - /internal-slot/1.0.5: - resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} + /internal-slot@1.0.6: + resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.0 - has: 1.0.3 + get-intrinsic: 1.2.2 + hasown: 2.0.0 side-channel: 1.0.4 dev: false - /interpret/2.2.0: - resolution: {integrity: sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==} - engines: {node: '>= 0.10'} + /interpret@3.1.1: + resolution: {integrity: sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==} + engines: {node: '>=10.13.0'} dev: false - /ip/1.1.5: + /ip@1.1.5: resolution: {integrity: sha512-rBtCAQAJm8A110nbwn6YdveUnuZH3WrC36IwkRXxDnq53JvXA2NVQvB7IHyKomxK1MJ4VDNw3UtFDdXQ+AvLYA==} dev: false - /is-accessor-descriptor/0.1.6: - resolution: {integrity: sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==} - engines: {node: '>=0.10.0'} - dependencies: - kind-of: 3.2.2 + /ip@2.0.0: + resolution: {integrity: sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==} dev: false - /is-accessor-descriptor/1.0.0: - resolution: {integrity: sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==} - engines: {node: '>=0.10.0'} + /is-accessor-descriptor@1.0.1: + resolution: {integrity: sha512-YBUanLI8Yoihw923YeFUS5fs0fF2f5TSFTNiYAAzhhDscDa3lEqYuz1pDOEP5KvX94I9ey3vsqjJcLVFVU+3QA==} + engines: {node: '>= 0.10'} dependencies: - kind-of: 6.0.3 + hasown: 2.0.0 dev: false - /is-array-buffer/3.0.1: - resolution: {integrity: sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==} + /is-array-buffer@3.0.2: + resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 - is-typed-array: 1.1.10 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 + is-typed-array: 1.1.12 dev: false - /is-arrayish/0.2.1: + /is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: false - /is-arrayish/0.3.2: + /is-arrayish@0.3.2: resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} dev: false - /is-bigint/1.0.4: + /is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} dependencies: has-bigints: 1.0.2 dev: false - /is-boolean-object/1.1.2: + /is-boolean-object@1.1.2: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 has-tostringtag: 1.0.0 dev: false - /is-buffer/1.1.6: + /is-buffer@1.1.6: resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} dev: false - /is-builtin-module/3.2.1: + /is-builtin-module@3.2.1: resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} engines: {node: '>=6'} dependencies: builtin-modules: 3.3.0 dev: false - /is-callable/1.2.7: + /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} dev: false - /is-ci/2.0.0: + /is-ci@2.0.0: resolution: {integrity: sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==} - hasBin: true - dependencies: - ci-info: 2.0.0 - dev: false - - /is-core-module/2.11.0: - resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} + hasBin: true dependencies: - has: 1.0.3 + ci-info: 2.0.0 dev: false - /is-data-descriptor/0.1.4: - resolution: {integrity: sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==} - engines: {node: '>=0.10.0'} + /is-core-module@2.13.1: + resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} dependencies: - kind-of: 3.2.2 + hasown: 2.0.0 dev: false - /is-data-descriptor/1.0.0: - resolution: {integrity: sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==} - engines: {node: '>=0.10.0'} + /is-data-descriptor@1.0.1: + resolution: {integrity: sha512-bc4NlCDiCr28U4aEsQ3Qs2491gVq4V8G7MQyws968ImqjKuYtTJXrl7Vq7jsN7Ly/C3xj5KWFrY7sHNeDkAzXw==} + engines: {node: '>= 0.4'} dependencies: - kind-of: 6.0.3 + hasown: 2.0.0 dev: false - /is-date-object/1.0.5: + /is-date-object@1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 dev: false - /is-descriptor/0.1.6: - resolution: {integrity: sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==} - engines: {node: '>=0.10.0'} + /is-descriptor@0.1.7: + resolution: {integrity: sha512-C3grZTvObeN1xud4cRWl366OMXZTj0+HGyk4hvfpx4ZHt1Pb60ANSXqCK7pdOTeUQpRzECBSTphqvD7U+l22Eg==} + engines: {node: '>= 0.4'} dependencies: - is-accessor-descriptor: 0.1.6 - is-data-descriptor: 0.1.4 - kind-of: 5.1.0 + is-accessor-descriptor: 1.0.1 + is-data-descriptor: 1.0.1 dev: false - /is-descriptor/1.0.2: - resolution: {integrity: sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==} - engines: {node: '>=0.10.0'} + /is-descriptor@1.0.3: + resolution: {integrity: sha512-JCNNGbwWZEVaSPtS45mdtrneRWJFp07LLmykxeFV5F6oBvNF8vHSfJuJgoT472pSfk+Mf8VnlrspaFBHWM8JAw==} + engines: {node: '>= 0.4'} dependencies: - is-accessor-descriptor: 1.0.0 - is-data-descriptor: 1.0.0 - kind-of: 6.0.3 + is-accessor-descriptor: 1.0.1 + is-data-descriptor: 1.0.1 + dev: false + + /is-docker@2.2.1: + resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} + engines: {node: '>=8'} + hasBin: true dev: false - /is-extendable/0.1.1: + /is-docker@3.0.0: + resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + hasBin: true + dev: false + + /is-extendable@0.1.1: resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} engines: {node: '>=0.10.0'} dev: false - /is-extendable/1.0.1: + /is-extendable@1.0.1: resolution: {integrity: sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==} engines: {node: '>=0.10.0'} dependencies: is-plain-object: 2.0.4 dev: false - /is-extglob/2.1.1: + /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} dev: false - /is-fullwidth-code-point/1.0.0: - resolution: {integrity: sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==} - engines: {node: '>=0.10.0'} - dependencies: - number-is-nan: 1.0.1 - dev: false - - /is-fullwidth-code-point/3.0.0: + /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} dev: false - /is-generator-fn/2.1.0: + /is-generator-fn@2.1.0: resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} engines: {node: '>=6'} dev: false - /is-glob/4.0.3: + /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} dependencies: is-extglob: 2.1.1 dev: false - /is-negative-zero/2.0.2: + /is-inside-container@1.0.0: + resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} + engines: {node: '>=14.16'} + hasBin: true + dependencies: + is-docker: 3.0.0 + dev: false + + /is-lambda@1.0.1: + resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} + dev: false + + /is-negative-zero@2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} dev: false - /is-number-object/1.0.7: + /is-number-object@1.0.7: resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 dev: false - /is-number/3.0.0: + /is-number@3.0.0: resolution: {integrity: sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==} engines: {node: '>=0.10.0'} dependencies: kind-of: 3.2.2 dev: false - /is-number/7.0.0: + /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} dev: false - /is-path-inside/3.0.3: + /is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} dev: false - /is-plain-obj/1.1.0: - resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} - engines: {node: '>=0.10.0'} - dev: false - - /is-plain-object/2.0.4: + /is-plain-object@2.0.4: resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} engines: {node: '>=0.10.0'} dependencies: isobject: 3.0.1 dev: false - /is-regex/1.1.4: + /is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 has-tostringtag: 1.0.0 dev: false - /is-shared-array-buffer/1.0.2: + /is-shared-array-buffer@1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 dev: false - /is-stream/1.1.0: + /is-stream@1.1.0: resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} engines: {node: '>=0.10.0'} dev: false - /is-stream/2.0.1: + /is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} dev: false - /is-string/1.0.7: + /is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: false + + /is-string@1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 dev: false - /is-symbol/1.0.4: + /is-symbol@1.0.4: resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 dev: false - /is-typed-array/1.1.10: - resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} + /is-typed-array@1.1.12: + resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} engines: {node: '>= 0.4'} dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.0 + which-typed-array: 1.1.13 dev: false - /is-weakref/1.0.2: + /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 dev: false - /is-windows/1.0.2: + /is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} dev: false - /isarray/0.0.1: + /is-wsl@2.2.0: + resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} + engines: {node: '>=8'} + dependencies: + is-docker: 2.2.1 + dev: false + + /isarray@0.0.1: resolution: {integrity: sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==} dev: false - /isarray/1.0.0: + /isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} dev: false - /isexe/2.0.0: + /isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + dev: false + + /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: false - /isobject/2.1.0: + /isexe@3.1.1: + resolution: {integrity: sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==} + engines: {node: '>=16'} + dev: false + + /isobject@2.1.0: resolution: {integrity: sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==} engines: {node: '>=0.10.0'} dependencies: isarray: 1.0.0 dev: false - /isobject/3.0.1: + /isobject@3.0.1: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} dev: false - /istanbul-lib-coverage/3.2.0: - resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} + /istanbul-lib-coverage@3.2.2: + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} engines: {node: '>=8'} dev: false - /istanbul-lib-instrument/5.2.1: + /istanbul-lib-instrument@5.2.1: resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} engines: {node: '>=8'} dependencies: - '@babel/core': 7.21.0 - '@babel/parser': 7.21.1 + '@babel/core': 7.23.3 + '@babel/parser': 7.23.3 '@istanbuljs/schema': 0.1.3 - istanbul-lib-coverage: 3.2.0 - semver: 6.3.0 + istanbul-lib-coverage: 3.2.2 + semver: 6.3.1 transitivePeerDependencies: - supports-color dev: false - /istanbul-lib-report/3.0.0: - resolution: {integrity: sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==} - engines: {node: '>=8'} + /istanbul-lib-instrument@6.0.1: + resolution: {integrity: sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==} + engines: {node: '>=10'} + dependencies: + '@babel/core': 7.23.3 + '@babel/parser': 7.23.3 + '@istanbuljs/schema': 0.1.3 + istanbul-lib-coverage: 3.2.2 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + dev: false + + /istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} dependencies: - istanbul-lib-coverage: 3.2.0 - make-dir: 3.1.0 + istanbul-lib-coverage: 3.2.2 + make-dir: 4.0.0 supports-color: 7.2.0 dev: false - /istanbul-lib-source-maps/4.0.1: + /istanbul-lib-source-maps@4.0.1: resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} engines: {node: '>=10'} dependencies: debug: 4.3.4 - istanbul-lib-coverage: 3.2.0 + istanbul-lib-coverage: 3.2.2 source-map: 0.6.1 transitivePeerDependencies: - supports-color dev: false - /istanbul-reports/3.1.5: - resolution: {integrity: sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==} + /istanbul-reports@3.1.6: + resolution: {integrity: sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==} engines: {node: '>=8'} dependencies: html-escaper: 2.0.2 - istanbul-lib-report: 3.0.0 + istanbul-lib-report: 3.0.1 + dev: false + + /jackspeak@2.3.6: + resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} + engines: {node: '>=14'} + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 dev: false - /jest-changed-files/29.4.3: - resolution: {integrity: sha512-Vn5cLuWuwmi2GNNbokPOEcvrXGSGrqVnPEZV7rC6P7ck07Dyw9RFnvWglnupSh+hGys0ajGtw/bc2ZgweljQoQ==} + /jest-changed-files@29.7.0: + resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: execa: 5.1.1 + jest-util: 29.7.0 p-limit: 3.1.0 dev: false - /jest-circus/29.4.3: - resolution: {integrity: sha512-Vw/bVvcexmdJ7MLmgdT3ZjkJ3LKu8IlpefYokxiqoZy6OCQ2VAm6Vk3t/qHiAGUXbdbJKJWnc8gH3ypTbB/OBw==} + /jest-circus@29.7.0: + resolution: {integrity: sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/environment': 29.4.3 - '@jest/expect': 29.4.3 - '@jest/test-result': 29.4.3 - '@jest/types': 29.4.3 - '@types/node': 16.18.12 + '@jest/environment': 29.7.0 + '@jest/expect': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.9.0 chalk: 4.1.2 co: 4.6.0 - dedent: 0.7.0 + dedent: 1.5.1 is-generator-fn: 2.1.0 - jest-each: 29.4.3 - jest-matcher-utils: 29.4.3 - jest-message-util: 29.4.3 - jest-runtime: 29.4.3 - jest-snapshot: 29.4.3 - jest-util: 29.4.3 + jest-each: 29.7.0 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-runtime: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 p-limit: 3.1.0 - pretty-format: 29.4.3 + pretty-format: 29.7.0 + pure-rand: 6.0.4 slash: 3.0.0 stack-utils: 2.0.6 transitivePeerDependencies: + - babel-plugin-macros - supports-color dev: false - /jest-cli/29.4.3_905ff7f381d7c2725cb1589b742e410c: - resolution: {integrity: sha512-PiiAPuFNfWWolCE6t3ZrDXQc6OsAuM3/tVW0u27UWc1KE+n/HSn5dSE6B2juqN7WP+PP0jAcnKtGmI4u8GMYCg==} + /jest-cli@29.7.0(@types/node@20.9.0)(ts-node@10.9.1): + resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true peerDependencies: @@ -4519,66 +4879,26 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 29.4.3_ts-node@10.9.1 - '@jest/test-result': 29.4.3 - '@jest/types': 29.4.3 + '@jest/core': 29.7.0(ts-node@10.9.1) + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 chalk: 4.1.2 + create-jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) exit: 0.1.2 - graceful-fs: 4.2.10 import-local: 3.1.0 - jest-config: 29.4.3_905ff7f381d7c2725cb1589b742e410c - jest-util: 29.4.3 - jest-validate: 29.4.3 - prompts: 2.4.2 - yargs: 17.6.2 + jest-config: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + jest-util: 29.7.0 + jest-validate: 29.7.0 + yargs: 17.7.2 transitivePeerDependencies: - '@types/node' + - babel-plugin-macros - supports-color - ts-node dev: false - /jest-config/29.4.3_31ebacd0d2b6f293762e37627c281d48: - resolution: {integrity: sha512-eCIpqhGnIjdUCXGtLhz4gdDoxKSWXKjzNcc5r+0S1GKOp2fwOipx5mRcwa9GB/ArsxJ1jlj2lmlD9bZAsBxaWQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@types/node': '*' - ts-node: '>=9.0.0' - peerDependenciesMeta: - '@types/node': - optional: true - ts-node: - optional: true - dependencies: - '@babel/core': 7.21.0 - '@jest/test-sequencer': 29.4.3 - '@jest/types': 29.4.3 - '@types/node': 16.18.12 - babel-jest: 29.4.3_@babel+core@7.21.0 - chalk: 4.1.2 - ci-info: 3.8.0 - deepmerge: 4.3.0 - glob: 7.1.7 - graceful-fs: 4.2.10 - jest-circus: 29.4.3 - jest-environment-node: 29.4.3 - jest-get-type: 29.4.3 - jest-regex-util: 29.4.3 - jest-resolve: 29.4.3 - jest-runner: 29.4.3 - jest-util: 29.4.3 - jest-validate: 29.4.3 - micromatch: 4.0.5 - parse-json: 5.2.0 - pretty-format: 29.4.3 - slash: 3.0.0 - strip-json-comments: 3.1.1 - ts-node: 10.9.1_40e6fc09aee2c476d0f03e8841c5b8df - transitivePeerDependencies: - - supports-color - dev: false - - /jest-config/29.4.3_905ff7f381d7c2725cb1589b742e410c: - resolution: {integrity: sha512-eCIpqhGnIjdUCXGtLhz4gdDoxKSWXKjzNcc5r+0S1GKOp2fwOipx5mRcwa9GB/ArsxJ1jlj2lmlD9bZAsBxaWQ==} + /jest-config@29.7.0(@types/node@20.9.0)(ts-node@10.9.1): + resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: '@types/node': '*' @@ -4589,35 +4909,36 @@ packages: ts-node: optional: true dependencies: - '@babel/core': 7.21.0 - '@jest/test-sequencer': 29.4.3 - '@jest/types': 29.4.3 - '@types/node': 14.14.45 - babel-jest: 29.4.3_@babel+core@7.21.0 + '@babel/core': 7.23.3 + '@jest/test-sequencer': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.9.0 + babel-jest: 29.7.0(@babel/core@7.23.3) chalk: 4.1.2 - ci-info: 3.8.0 - deepmerge: 4.3.0 + ci-info: 3.9.0 + deepmerge: 4.3.1 glob: 7.1.7 - graceful-fs: 4.2.10 - jest-circus: 29.4.3 - jest-environment-node: 29.4.3 - jest-get-type: 29.4.3 - jest-regex-util: 29.4.3 - jest-resolve: 29.4.3 - jest-runner: 29.4.3 - jest-util: 29.4.3 - jest-validate: 29.4.3 + graceful-fs: 4.2.11 + jest-circus: 29.7.0 + jest-environment-node: 29.7.0 + jest-get-type: 29.6.3 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-runner: 29.7.0 + jest-util: 29.7.0 + jest-validate: 29.7.0 micromatch: 4.0.5 parse-json: 5.2.0 - pretty-format: 29.4.3 + pretty-format: 29.7.0 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.1_40e6fc09aee2c476d0f03e8841c5b8df + ts-node: 10.9.1(@types/node@20.9.0)(typescript@5.2.2) transitivePeerDependencies: + - babel-plugin-macros - supports-color dev: false - /jest-diff/26.6.2: + /jest-diff@26.6.2: resolution: {integrity: sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==} engines: {node: '>= 10.14.2'} dependencies: @@ -4627,66 +4948,66 @@ packages: pretty-format: 26.6.2 dev: false - /jest-diff/29.4.3: - resolution: {integrity: sha512-YB+ocenx7FZ3T5O9lMVMeLYV4265socJKtkwgk/6YUz/VsEzYDkiMuMhWzZmxm3wDRQvayJu/PjkjjSkjoHsCA==} + /jest-diff@29.7.0: + resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 - diff-sequences: 29.4.3 - jest-get-type: 29.4.3 - pretty-format: 29.4.3 + diff-sequences: 29.6.3 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 dev: false - /jest-docblock/29.4.3: - resolution: {integrity: sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==} + /jest-docblock@29.7.0: + resolution: {integrity: sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: detect-newline: 3.1.0 dev: false - /jest-each/29.4.3: - resolution: {integrity: sha512-1ElHNAnKcbJb/b+L+7j0/w7bDvljw4gTv1wL9fYOczeJrbTbkMGQ5iQPFJ3eFQH19VPTx1IyfePdqSpePKss7Q==} + /jest-each@29.7.0: + resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.4.3 + '@jest/types': 29.6.3 chalk: 4.1.2 - jest-get-type: 29.4.3 - jest-util: 29.4.3 - pretty-format: 29.4.3 + jest-get-type: 29.6.3 + jest-util: 29.7.0 + pretty-format: 29.7.0 dev: false - /jest-environment-node/29.4.3: - resolution: {integrity: sha512-gAiEnSKF104fsGDXNkwk49jD/0N0Bqu2K9+aMQXA6avzsA9H3Fiv1PW2D+gzbOSR705bWd2wJZRFEFpV0tXISg==} + /jest-environment-node@29.7.0: + resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/environment': 29.4.3 - '@jest/fake-timers': 29.4.3 - '@jest/types': 29.4.3 - '@types/node': 16.18.12 - jest-mock: 29.4.3 - jest-util: 29.4.3 + '@jest/environment': 29.7.0 + '@jest/fake-timers': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.9.0 + jest-mock: 29.7.0 + jest-util: 29.7.0 dev: false - /jest-get-type/26.3.0: + /jest-get-type@26.3.0: resolution: {integrity: sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==} engines: {node: '>= 10.14.2'} dev: false - /jest-get-type/29.4.3: - resolution: {integrity: sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==} + /jest-get-type@29.6.3: + resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: false - /jest-haste-map/26.6.2: + /jest-haste-map@26.6.2: resolution: {integrity: sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==} engines: {node: '>= 10.14.2'} dependencies: '@jest/types': 26.6.2 - '@types/graceful-fs': 4.1.6 - '@types/node': 16.18.12 + '@types/graceful-fs': 4.1.9 + '@types/node': 20.9.0 anymatch: 3.1.3 fb-watchman: 2.0.2 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 jest-regex-util: 26.0.0 jest-serializer: 26.6.2 jest-util: 26.6.2 @@ -4695,37 +5016,37 @@ packages: sane: 4.1.0 walker: 1.0.8 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: false - /jest-haste-map/29.4.3: - resolution: {integrity: sha512-eZIgAS8tvm5IZMtKlR8Y+feEOMfo2pSQkmNbufdbMzMSn9nitgGxF1waM/+LbryO3OkMcKS98SUb+j/cQxp/vQ==} + /jest-haste-map@29.7.0: + resolution: {integrity: sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.4.3 - '@types/graceful-fs': 4.1.6 - '@types/node': 16.18.12 + '@jest/types': 29.6.3 + '@types/graceful-fs': 4.1.9 + '@types/node': 20.9.0 anymatch: 3.1.3 fb-watchman: 2.0.2 - graceful-fs: 4.2.10 - jest-regex-util: 29.4.3 - jest-util: 29.4.3 - jest-worker: 29.4.3 + graceful-fs: 4.2.11 + jest-regex-util: 29.6.3 + jest-util: 29.7.0 + jest-worker: 29.7.0 micromatch: 4.0.5 walker: 1.0.8 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: false - /jest-leak-detector/29.4.3: - resolution: {integrity: sha512-9yw4VC1v2NspMMeV3daQ1yXPNxMgCzwq9BocCwYrRgXe4uaEJPAN0ZK37nFBhcy3cUwEVstFecFLaTHpF7NiGA==} + /jest-leak-detector@29.7.0: + resolution: {integrity: sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - jest-get-type: 29.4.3 - pretty-format: 29.4.3 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 dev: false - /jest-matcher-utils/26.6.2: + /jest-matcher-utils@26.6.2: resolution: {integrity: sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==} engines: {node: '>= 10.14.2'} dependencies: @@ -4735,56 +5056,56 @@ packages: pretty-format: 26.6.2 dev: false - /jest-matcher-utils/29.4.3: - resolution: {integrity: sha512-TTciiXEONycZ03h6R6pYiZlSkvYgT0l8aa49z/DLSGYjex4orMUcafuLXYyyEDWB1RKglq00jzwY00Ei7yFNVg==} + /jest-matcher-utils@29.7.0: + resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 - jest-diff: 29.4.3 - jest-get-type: 29.4.3 - pretty-format: 29.4.3 + jest-diff: 29.7.0 + jest-get-type: 29.6.3 + pretty-format: 29.7.0 dev: false - /jest-message-util/26.6.2: + /jest-message-util@26.6.2: resolution: {integrity: sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==} engines: {node: '>= 10.14.2'} dependencies: - '@babel/code-frame': 7.18.6 + '@babel/code-frame': 7.22.13 '@jest/types': 26.6.2 - '@types/stack-utils': 2.0.1 + '@types/stack-utils': 2.0.3 chalk: 4.1.2 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 micromatch: 4.0.5 pretty-format: 26.6.2 slash: 3.0.0 stack-utils: 2.0.6 dev: false - /jest-message-util/29.4.3: - resolution: {integrity: sha512-1Y8Zd4ZCN7o/QnWdMmT76If8LuDv23Z1DRovBj/vcSFNlGCJGoO8D1nJDw1AdyAGUk0myDLFGN5RbNeJyCRGCw==} + /jest-message-util@29.7.0: + resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.18.6 - '@jest/types': 29.4.3 - '@types/stack-utils': 2.0.1 + '@babel/code-frame': 7.22.13 + '@jest/types': 29.6.3 + '@types/stack-utils': 2.0.3 chalk: 4.1.2 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 micromatch: 4.0.5 - pretty-format: 29.4.3 + pretty-format: 29.7.0 slash: 3.0.0 stack-utils: 2.0.6 dev: false - /jest-mock/29.4.3: - resolution: {integrity: sha512-LjFgMg+xed9BdkPMyIJh+r3KeHt1klXPJYBULXVVAkbTaaKjPX1o1uVCAZADMEp/kOxGTwy/Ot8XbvgItOrHEg==} + /jest-mock@29.7.0: + resolution: {integrity: sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.4.3 - '@types/node': 16.18.12 - jest-util: 29.4.3 + '@jest/types': 29.6.3 + '@types/node': 20.9.0 + jest-util: 29.7.0 dev: false - /jest-pnp-resolver/1.2.3_jest-resolve@26.6.2: + /jest-pnp-resolver@1.2.3(jest-resolve@26.6.2): resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} engines: {node: '>=6'} peerDependencies: @@ -4796,7 +5117,7 @@ packages: jest-resolve: 26.6.2 dev: false - /jest-pnp-resolver/1.2.3_jest-resolve@29.4.3: + /jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} engines: {node: '>=6'} peerDependencies: @@ -4805,136 +5126,136 @@ packages: jest-resolve: optional: true dependencies: - jest-resolve: 29.4.3 + jest-resolve: 29.7.0 dev: false - /jest-regex-util/26.0.0: + /jest-regex-util@26.0.0: resolution: {integrity: sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==} engines: {node: '>= 10.14.2'} dev: false - /jest-regex-util/29.4.3: - resolution: {integrity: sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==} + /jest-regex-util@29.6.3: + resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: false - /jest-resolve-dependencies/29.4.3: - resolution: {integrity: sha512-uvKMZAQ3nmXLH7O8WAOhS5l0iWyT3WmnJBdmIHiV5tBbdaDZ1wqtNX04FONGoaFvSOSHBJxnwAVnSn1WHdGVaw==} + /jest-resolve-dependencies@29.7.0: + resolution: {integrity: sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - jest-regex-util: 29.4.3 - jest-snapshot: 29.4.3 + jest-regex-util: 29.6.3 + jest-snapshot: 29.7.0 transitivePeerDependencies: - supports-color dev: false - /jest-resolve/26.6.2: + /jest-resolve@26.6.2: resolution: {integrity: sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ==} engines: {node: '>= 10.14.2'} dependencies: '@jest/types': 26.6.2 chalk: 4.1.2 - graceful-fs: 4.2.10 - jest-pnp-resolver: 1.2.3_jest-resolve@26.6.2 + graceful-fs: 4.2.11 + jest-pnp-resolver: 1.2.3(jest-resolve@26.6.2) jest-util: 26.6.2 read-pkg-up: 7.0.1 - resolve: 1.22.1 + resolve: 1.22.8 slash: 3.0.0 dev: false - /jest-resolve/29.4.3: - resolution: {integrity: sha512-GPokE1tzguRyT7dkxBim4wSx6E45S3bOQ7ZdKEG+Qj0Oac9+6AwJPCk0TZh5Vu0xzeX4afpb+eDmgbmZFFwpOw==} + /jest-resolve@29.7.0: + resolution: {integrity: sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: chalk: 4.1.2 - graceful-fs: 4.2.10 - jest-haste-map: 29.4.3 - jest-pnp-resolver: 1.2.3_jest-resolve@29.4.3 - jest-util: 29.4.3 - jest-validate: 29.4.3 - resolve: 1.22.1 - resolve.exports: 2.0.0 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + jest-pnp-resolver: 1.2.3(jest-resolve@29.7.0) + jest-util: 29.7.0 + jest-validate: 29.7.0 + resolve: 1.22.8 + resolve.exports: 2.0.2 slash: 3.0.0 dev: false - /jest-runner/29.4.3: - resolution: {integrity: sha512-GWPTEiGmtHZv1KKeWlTX9SIFuK19uLXlRQU43ceOQ2hIfA5yPEJC7AMkvFKpdCHx6pNEdOD+2+8zbniEi3v3gA==} + /jest-runner@29.7.0: + resolution: {integrity: sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/console': 29.4.3 - '@jest/environment': 29.4.3 - '@jest/test-result': 29.4.3 - '@jest/transform': 29.4.3 - '@jest/types': 29.4.3 - '@types/node': 16.18.12 + '@jest/console': 29.7.0 + '@jest/environment': 29.7.0 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.9.0 chalk: 4.1.2 emittery: 0.13.1 - graceful-fs: 4.2.10 - jest-docblock: 29.4.3 - jest-environment-node: 29.4.3 - jest-haste-map: 29.4.3 - jest-leak-detector: 29.4.3 - jest-message-util: 29.4.3 - jest-resolve: 29.4.3 - jest-runtime: 29.4.3 - jest-util: 29.4.3 - jest-watcher: 29.4.3 - jest-worker: 29.4.3 + graceful-fs: 4.2.11 + jest-docblock: 29.7.0 + jest-environment-node: 29.7.0 + jest-haste-map: 29.7.0 + jest-leak-detector: 29.7.0 + jest-message-util: 29.7.0 + jest-resolve: 29.7.0 + jest-runtime: 29.7.0 + jest-util: 29.7.0 + jest-watcher: 29.7.0 + jest-worker: 29.7.0 p-limit: 3.1.0 source-map-support: 0.5.13 transitivePeerDependencies: - supports-color dev: false - /jest-runtime/29.4.3: - resolution: {integrity: sha512-F5bHvxSH+LvLV24vVB3L8K467dt3y3dio6V3W89dUz9nzvTpqd/HcT9zfYKL2aZPvD63vQFgLvaUX/UpUhrP6Q==} + /jest-runtime@29.7.0: + resolution: {integrity: sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/environment': 29.4.3 - '@jest/fake-timers': 29.4.3 - '@jest/globals': 29.4.3 - '@jest/source-map': 29.4.3 - '@jest/test-result': 29.4.3 - '@jest/transform': 29.4.3 - '@jest/types': 29.4.3 - '@types/node': 16.18.12 + '@jest/environment': 29.7.0 + '@jest/fake-timers': 29.7.0 + '@jest/globals': 29.7.0 + '@jest/source-map': 29.6.3 + '@jest/test-result': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.9.0 chalk: 4.1.2 - cjs-module-lexer: 1.2.2 - collect-v8-coverage: 1.0.1 + cjs-module-lexer: 1.2.3 + collect-v8-coverage: 1.0.2 glob: 7.1.7 - graceful-fs: 4.2.10 - jest-haste-map: 29.4.3 - jest-message-util: 29.4.3 - jest-mock: 29.4.3 - jest-regex-util: 29.4.3 - jest-resolve: 29.4.3 - jest-snapshot: 29.4.3 - jest-util: 29.4.3 + graceful-fs: 4.2.11 + jest-haste-map: 29.7.0 + jest-message-util: 29.7.0 + jest-mock: 29.7.0 + jest-regex-util: 29.6.3 + jest-resolve: 29.7.0 + jest-snapshot: 29.7.0 + jest-util: 29.7.0 slash: 3.0.0 strip-bom: 4.0.0 transitivePeerDependencies: - supports-color dev: false - /jest-serializer/26.6.2: + /jest-serializer@26.6.2: resolution: {integrity: sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==} engines: {node: '>= 10.14.2'} dependencies: - '@types/node': 16.18.12 - graceful-fs: 4.2.10 + '@types/node': 20.9.0 + graceful-fs: 4.2.11 dev: false - /jest-snapshot/26.6.2: + /jest-snapshot@26.6.2: resolution: {integrity: sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og==} engines: {node: '>= 10.14.2'} dependencies: - '@babel/types': 7.21.0 + '@babel/types': 7.23.3 '@jest/types': 26.6.2 - '@types/babel__traverse': 7.18.3 - '@types/prettier': 2.7.2 + '@types/babel__traverse': 7.20.4 + '@types/prettier': 2.7.3 chalk: 4.1.2 expect: 26.6.2 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 jest-diff: 26.6.2 jest-get-type: 26.3.0 jest-haste-map: 26.6.2 @@ -4943,121 +5264,117 @@ packages: jest-resolve: 26.6.2 natural-compare: 1.4.0 pretty-format: 26.6.2 - semver: 7.3.8 + semver: 7.5.4 dev: false - /jest-snapshot/29.4.3: - resolution: {integrity: sha512-NGlsqL0jLPDW91dz304QTM/SNO99lpcSYYAjNiX0Ou+sSGgkanKBcSjCfp/pqmiiO1nQaOyLp6XQddAzRcx3Xw==} + /jest-snapshot@29.7.0: + resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/core': 7.21.0 - '@babel/generator': 7.21.1 - '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.21.0 - '@babel/plugin-syntax-typescript': 7.20.0_@babel+core@7.21.0 - '@babel/traverse': 7.21.0 - '@babel/types': 7.21.0 - '@jest/expect-utils': 29.4.3 - '@jest/transform': 29.4.3 - '@jest/types': 29.4.3 - '@types/babel__traverse': 7.18.3 - '@types/prettier': 2.7.2 - babel-preset-current-node-syntax: 1.0.1_@babel+core@7.21.0 + '@babel/core': 7.23.3 + '@babel/generator': 7.23.3 + '@babel/plugin-syntax-jsx': 7.23.3(@babel/core@7.23.3) + '@babel/plugin-syntax-typescript': 7.23.3(@babel/core@7.23.3) + '@babel/types': 7.23.3 + '@jest/expect-utils': 29.7.0 + '@jest/transform': 29.7.0 + '@jest/types': 29.6.3 + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.23.3) chalk: 4.1.2 - expect: 29.4.3 - graceful-fs: 4.2.10 - jest-diff: 29.4.3 - jest-get-type: 29.4.3 - jest-haste-map: 29.4.3 - jest-matcher-utils: 29.4.3 - jest-message-util: 29.4.3 - jest-util: 29.4.3 + expect: 29.7.0 + graceful-fs: 4.2.11 + jest-diff: 29.7.0 + jest-get-type: 29.6.3 + jest-matcher-utils: 29.7.0 + jest-message-util: 29.7.0 + jest-util: 29.7.0 natural-compare: 1.4.0 - pretty-format: 29.4.3 - semver: 7.3.8 + pretty-format: 29.7.0 + semver: 7.5.4 transitivePeerDependencies: - supports-color dev: false - /jest-util/26.6.2: + /jest-util@26.6.2: resolution: {integrity: sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==} engines: {node: '>= 10.14.2'} dependencies: '@jest/types': 26.6.2 - '@types/node': 16.18.12 + '@types/node': 20.9.0 chalk: 4.1.2 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 is-ci: 2.0.0 micromatch: 4.0.5 dev: false - /jest-util/29.4.3: - resolution: {integrity: sha512-ToSGORAz4SSSoqxDSylWX8JzkOQR7zoBtNRsA7e+1WUX5F8jrOwaNpuh1YfJHJKDHXLHmObv5eOjejUd+/Ws+Q==} + /jest-util@29.7.0: + resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.4.3 - '@types/node': 16.18.12 + '@jest/types': 29.6.3 + '@types/node': 20.9.0 chalk: 4.1.2 - ci-info: 3.8.0 - graceful-fs: 4.2.10 + ci-info: 3.9.0 + graceful-fs: 4.2.11 picomatch: 2.3.1 dev: false - /jest-validate/29.4.3: - resolution: {integrity: sha512-J3u5v7aPQoXPzaar6GndAVhdQcZr/3osWSgTeKg5v574I9ybX/dTyH0AJFb5XgXIB7faVhf+rS7t4p3lL9qFaw==} + /jest-validate@29.7.0: + resolution: {integrity: sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/types': 29.4.3 + '@jest/types': 29.6.3 camelcase: 6.3.0 chalk: 4.1.2 - jest-get-type: 29.4.3 + jest-get-type: 29.6.3 leven: 3.1.0 - pretty-format: 29.4.3 + pretty-format: 29.7.0 dev: false - /jest-watcher/29.4.3: - resolution: {integrity: sha512-zwlXH3DN3iksoIZNk73etl1HzKyi5FuQdYLnkQKm5BW4n8HpoG59xSwpVdFrnh60iRRaRBGw0gcymIxjJENPcA==} + /jest-watcher@29.7.0: + resolution: {integrity: sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/test-result': 29.4.3 - '@jest/types': 29.4.3 - '@types/node': 16.18.12 + '@jest/test-result': 29.7.0 + '@jest/types': 29.6.3 + '@types/node': 20.9.0 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 - jest-util: 29.4.3 + jest-util: 29.7.0 string-length: 4.0.2 dev: false - /jest-worker/26.6.2: + /jest-worker@26.6.2: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 16.18.12 + '@types/node': 20.9.0 merge-stream: 2.0.0 supports-color: 7.2.0 dev: false - /jest-worker/27.5.1: + /jest-worker@27.5.1: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 16.18.12 + '@types/node': 20.9.0 merge-stream: 2.0.0 supports-color: 8.1.1 dev: false - /jest-worker/29.4.3: - resolution: {integrity: sha512-GLHN/GTAAMEy5BFdvpUfzr9Dr80zQqBrh0fz1mtRMe05hqP45+HfQltu7oTBfduD0UeZs09d+maFtFYAXFWvAA==} + /jest-worker@29.7.0: + resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 16.18.12 - jest-util: 29.4.3 + '@types/node': 20.9.0 + jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 dev: false - /jest/29.4.3_905ff7f381d7c2725cb1589b742e410c: - resolution: {integrity: sha512-XvK65feuEFGZT8OO0fB/QAQS+LGHvQpaadkH5p47/j3Ocqq3xf2pK9R+G0GzgfuhXVxEv76qCOOcMb5efLk6PA==} + /jest@29.7.0(@types/node@20.9.0)(ts-node@10.9.1): + resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true peerDependencies: @@ -5066,25 +5383,22 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 29.4.3_ts-node@10.9.1 - '@jest/types': 29.4.3 + '@jest/core': 29.7.0(ts-node@10.9.1) + '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.4.3_905ff7f381d7c2725cb1589b742e410c + jest-cli: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) transitivePeerDependencies: - '@types/node' + - babel-plugin-macros - supports-color - ts-node dev: false - /js-sdsl/4.3.0: - resolution: {integrity: sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==} - dev: false - - /js-tokens/4.0.0: + /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: false - /js-yaml/3.14.1: + /js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true dependencies: @@ -5092,127 +5406,136 @@ packages: esprima: 4.0.1 dev: false - /js-yaml/4.0.0: - resolution: {integrity: sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==} + /js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true dependencies: argparse: 2.0.1 dev: false - /js-yaml/4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + /jsesc@0.5.0: + resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} hasBin: true - dependencies: - argparse: 2.0.1 dev: false - /jsesc/2.5.2: + /jsesc@2.5.2: resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} engines: {node: '>=4'} hasBin: true dev: false - /json-parse-better-errors/1.0.2: + /jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} + hasBin: true + dev: false + + /json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + dev: false + + /json-parse-better-errors@1.0.2: resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} dev: false - /json-parse-even-better-errors/2.3.1: + /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: false - /json-schema-traverse/0.4.1: + /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: false - /json-schema-traverse/1.0.0: + /json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} dev: false - /json-stable-stringify-without-jsonify/1.0.1: + /json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: false - /json5/1.0.2: + /json5@1.0.2: resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} hasBin: true dependencies: minimist: 1.2.8 dev: false - /json5/2.2.3: + /json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} hasBin: true dev: false - /jsonfile/4.0.0: + /jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} optionalDependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 dev: false - /jsonfile/6.1.0: + /jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} dependencies: - universalify: 2.0.0 + universalify: 2.0.1 optionalDependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 dev: false - /jsonparse/1.3.1: + /jsonparse@1.3.1: resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} engines: {'0': node >= 0.2.0} dev: false - /jsonpath-plus/6.0.1: + /jsonpath-plus@6.0.1: resolution: {integrity: sha512-EvGovdvau6FyLexFH2OeXfIITlgIbgZoAZe3usiySeaIDm5QS+A10DKNpaPBBqqRSZr2HN6HVNXxtwUAr2apEw==} engines: {node: '>=10.0.0'} dev: false - /junk/4.0.0: - resolution: {integrity: sha512-ojtSU++zLJ3jQG9bAYjg94w+/DOJtRyD7nPaerMFrBhmdVmiV5/exYH5t4uHga4G/95nT6hr1OJoKIFbYbrW5w==} + /junk@4.0.1: + resolution: {integrity: sha512-Qush0uP+G8ZScpGMZvHUiRfI0YBWuB3gVBYlI0v0vvOJt5FLicco+IkP0a50LqTTQhmts/m6tP5SWE+USyIvcQ==} engines: {node: '>=12.20'} dev: false - /kind-of/3.2.2: + /keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + dependencies: + json-buffer: 3.0.1 + dev: false + + /kind-of@3.2.2: resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==} engines: {node: '>=0.10.0'} dependencies: is-buffer: 1.1.6 dev: false - /kind-of/4.0.0: + /kind-of@4.0.0: resolution: {integrity: sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==} engines: {node: '>=0.10.0'} dependencies: is-buffer: 1.1.6 dev: false - /kind-of/5.1.0: - resolution: {integrity: sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==} - engines: {node: '>=0.10.0'} - dev: false - - /kind-of/6.0.3: + /kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} dev: false - /kleur/3.0.3: + /kleur@3.0.3: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} dev: false - /kuler/2.0.0: + /kuler@2.0.0: resolution: {integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==} dev: false - /leven/3.1.0: + /leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} dev: false - /levn/0.4.1: + /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} dependencies: @@ -5220,97 +5543,119 @@ packages: type-check: 0.4.0 dev: false - /lines-and-columns/1.2.4: + /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: false - /loader-runner/4.3.0: + /loader-runner@4.3.0: resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} engines: {node: '>=6.11.5'} dev: false - /loader-utils/2.0.4: - resolution: {integrity: sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==} - engines: {node: '>=8.9.0'} - dependencies: - big.js: 5.2.2 - emojis-list: 3.0.0 - json5: 2.2.3 - dev: false - - /locate-path/5.0.0: + /locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} dependencies: p-locate: 4.1.0 dev: false - /locate-path/6.0.0: + /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} dependencies: p-locate: 5.0.0 dev: false - /lodash.memoize/4.1.2: + /lodash.memoize@4.1.2: resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} dev: false - /lodash.merge/4.6.2: + /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: false - /lodash/4.17.21: + /lodash.sortby@4.7.0: + resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} + dev: false + + /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} dev: false - /logform/2.5.1: - resolution: {integrity: sha512-9FyqAm9o9NKKfiAKfZoYo9bGXXuwMkxQiQttkT4YjjVtQVIQtK6LmVtlxmCaFswo6N4AfEkHqZTV0taDtPotNg==} + /logform@2.6.0: + resolution: {integrity: sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==} + engines: {node: '>= 12.0.0'} dependencies: - '@colors/colors': 1.5.0 - '@types/triple-beam': 1.3.2 + '@colors/colors': 1.6.0 + '@types/triple-beam': 1.3.5 fecha: 4.2.3 ms: 2.1.3 - safe-stable-stringify: 2.4.2 - triple-beam: 1.3.0 + safe-stable-stringify: 2.4.3 + triple-beam: 1.4.1 dev: false - /lower-case/2.0.2: + /lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} dependencies: - tslib: 2.5.0 + tslib: 2.6.2 dev: false - /lru-cache/5.1.1: + /lru-cache@10.0.2: + resolution: {integrity: sha512-Yj9mA8fPiVgOUpByoTZO5pNrcl5Yk37FcSHsUINpAsaBIEZIuqcCclDZJCVxqQShDsmYX8QG63svJiTbOATZwg==} + engines: {node: 14 || >=16.14} + dependencies: + semver: 7.5.4 + dev: false + + /lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: yallist: 3.1.1 dev: false - /lru-cache/6.0.0: + /lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} dependencies: yallist: 4.0.0 dev: false - /lru-cache/7.17.0: - resolution: {integrity: sha512-zSxlVVwOabhVyTi6E8gYv2cr6bXK+8ifYz5/uyJb9feXX6NACVDwY4p5Ut3WC3Ivo/QhpARHU3iujx2xGAYHbQ==} + /lru-cache@7.18.3: + resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==} engines: {node: '>=12'} dev: false - /make-dir/3.1.0: - resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} - engines: {node: '>=8'} + /make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} dependencies: - semver: 6.3.0 + semver: 7.5.4 dev: false - /make-error/1.3.6: + /make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: false - /make-fetch-happen/5.0.2: + /make-fetch-happen@13.0.0: + resolution: {integrity: sha512-7ThobcL8brtGo9CavByQrQi+23aIfgYU++wg4B87AIS8Rb2ZBt/MEaDqzA00Xwv/jUjAjYkLHjVolYuTLKda2A==} + engines: {node: ^16.14.0 || >=18.0.0} + dependencies: + '@npmcli/agent': 2.2.0 + cacache: 18.0.0 + http-cache-semantics: 4.1.1 + is-lambda: 1.0.1 + minipass: 7.0.4 + minipass-fetch: 3.0.4 + minipass-flush: 1.0.5 + minipass-pipeline: 1.2.4 + negotiator: 0.6.3 + promise-retry: 2.0.1 + ssri: 10.0.5 + transitivePeerDependencies: + - supports-color + dev: false + + /make-fetch-happen@5.0.2: resolution: {integrity: sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag==} dependencies: agentkeepalive: 3.5.2 @@ -5326,66 +5671,43 @@ packages: ssri: 6.0.2 dev: false - /makeerror/1.0.12: + /makeerror@1.0.12: resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} dependencies: tmpl: 1.0.5 dev: false - /map-cache/0.2.2: + /map-cache@0.2.2: resolution: {integrity: sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==} engines: {node: '>=0.10.0'} dev: false - /map-obj/1.0.1: - resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} - engines: {node: '>=0.10.0'} - dev: false - - /map-obj/4.3.0: - resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} - engines: {node: '>=8'} - dev: false - - /map-visit/1.0.0: + /map-visit@1.0.0: resolution: {integrity: sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==} engines: {node: '>=0.10.0'} dependencies: object-visit: 1.0.1 dev: false - /mdurl/1.0.1: + /mdurl@1.0.1: resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==} dev: false - /meow/10.1.5: - resolution: {integrity: sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - '@types/minimist': 1.2.2 - camelcase-keys: 7.0.2 - decamelize: 5.0.1 - decamelize-keys: 1.1.1 - hard-rejection: 2.1.0 - minimist-options: 4.1.0 - normalize-package-data: 3.0.3 - read-pkg-up: 8.0.0 - redent: 4.0.0 - trim-newlines: 4.0.2 - type-fest: 1.4.0 - yargs-parser: 20.2.9 + /meow@12.1.1: + resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==} + engines: {node: '>=16.10'} dev: false - /merge-stream/2.0.0: + /merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} dev: false - /merge2/1.4.1: + /merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} dev: false - /micromatch/3.1.10: + /micromatch@3.1.10: resolution: {integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==} engines: {node: '>=0.10.0'} dependencies: @@ -5404,7 +5726,7 @@ packages: to-regex: 3.0.2 dev: false - /micromatch/4.0.5: + /micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} dependencies: @@ -5412,66 +5734,133 @@ packages: picomatch: 2.3.1 dev: false - /mime-db/1.52.0: + /mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} dev: false - /mime-types/2.1.35: + /mime-types@2.1.35: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} dependencies: mime-db: 1.52.0 dev: false - /mimic-fn/2.1.0: + /mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} dev: false - /mimic-response/2.1.0: - resolution: {integrity: sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==} - engines: {node: '>=8'} + /mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} dev: false - /min-indent/1.0.1: + /mimic-response@3.1.0: + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} + engines: {node: '>=10'} + dev: false + + /min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} dev: false - /minimatch/3.1.2: + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: brace-expansion: 1.1.11 dev: false - /minimist-options/4.1.0: - resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} - engines: {node: '>= 6'} + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} dependencies: - arrify: 1.0.1 - is-plain-obj: 1.1.0 - kind-of: 6.0.3 + brace-expansion: 2.0.1 dev: false - /minimist/1.2.8: + /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: false - /minipass/2.9.0: + /minipass-collect@1.0.2: + resolution: {integrity: sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + dev: false + + /minipass-fetch@3.0.4: + resolution: {integrity: sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + minipass: 7.0.4 + minipass-sized: 1.0.3 + minizlib: 2.1.2 + optionalDependencies: + encoding: 0.1.13 + dev: false + + /minipass-flush@1.0.5: + resolution: {integrity: sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + dev: false + + /minipass-pipeline@1.2.4: + resolution: {integrity: sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==} + engines: {node: '>=8'} + dependencies: + minipass: 3.3.6 + dev: false + + /minipass-sized@1.0.3: + resolution: {integrity: sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==} + engines: {node: '>=8'} + dependencies: + minipass: 3.3.6 + dev: false + + /minipass@2.9.0: resolution: {integrity: sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==} dependencies: - safe-buffer: 5.2.0 + safe-buffer: 5.2.1 yallist: 3.1.1 dev: false - /minizlib/1.3.3: + /minipass@3.3.6: + resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} + engines: {node: '>=8'} + dependencies: + yallist: 4.0.0 + dev: false + + /minipass@5.0.0: + resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} + engines: {node: '>=8'} + dev: false + + /minipass@7.0.4: + resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} + engines: {node: '>=16 || 14 >=14.17'} + dev: false + + /minizlib@1.3.3: resolution: {integrity: sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==} dependencies: minipass: 2.9.0 dev: false - /mississippi/3.0.0: + /minizlib@2.1.2: + resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} + engines: {node: '>= 8'} + dependencies: + minipass: 3.3.6 + yallist: 4.0.0 + dev: false + + /mississippi@3.0.0: resolution: {integrity: sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==} engines: {node: '>=4.0.0'} dependencies: @@ -5487,7 +5876,7 @@ packages: through2: 2.0.5 dev: false - /mixin-deep/1.3.2: + /mixin-deep@1.3.2: resolution: {integrity: sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==} engines: {node: '>=0.10.0'} dependencies: @@ -5495,30 +5884,30 @@ packages: is-extendable: 1.0.1 dev: false - /mkdirp-classic/0.5.3: + /mkdirp-classic@0.5.3: resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} dev: false - /mkdirp/0.5.6: + /mkdirp@0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true dependencies: minimist: 1.2.8 dev: false - /mkdirp/1.0.4: + /mkdirp@1.0.4: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} hasBin: true dev: false - /mkdirp/2.1.6: - resolution: {integrity: sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==} + /mkdirp@3.0.1: + resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} engines: {node: '>=10'} hasBin: true dev: false - /move-concurrently/1.0.1: + /move-concurrently@1.0.1: resolution: {integrity: sha512-hdrFxZOycD/g6A6SoI2bB5NA/5NEqD0569+S47WZhPvm46sD50ZHdYaFmnua5lndde9rCHGjmfK7Z8BuCt/PcQ==} dependencies: aproba: 1.2.0 @@ -5529,28 +5918,28 @@ packages: run-queue: 1.0.3 dev: false - /ms/2.0.0: + /ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} dev: false - /ms/2.1.2: + /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: false - /ms/2.1.3: + /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} dev: false - /mustache/4.2.0: + /mustache@4.2.0: resolution: {integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==} hasBin: true dev: false - /nan/2.17.0: - resolution: {integrity: sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==} + /nan@2.18.0: + resolution: {integrity: sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==} dev: false - /nanomatch/1.2.13: + /nanomatch@1.2.13: resolution: {integrity: sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==} engines: {node: '>=0.10.0'} dependencies: @@ -5567,49 +5956,51 @@ packages: to-regex: 3.0.2 dev: false - /napi-build-utils/1.0.2: + /napi-build-utils@1.0.2: resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} dev: false - /natural-compare-lite/1.4.0: - resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} + /natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: false - /natural-compare/1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + /negotiator@0.6.3: + resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} + engines: {node: '>= 0.6'} dev: false - /neo-async/2.6.2: + /neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} dev: false - /nested-error-stacks/2.1.1: + /nested-error-stacks@2.1.1: resolution: {integrity: sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==} dev: false - /nice-try/1.0.5: + /nice-try@1.0.5: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} dev: false - /no-case/3.0.4: + /no-case@3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} dependencies: lower-case: 2.0.2 - tslib: 2.5.0 + tslib: 2.6.2 dev: false - /node-abi/2.30.1: - resolution: {integrity: sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==} + /node-abi@3.51.0: + resolution: {integrity: sha512-SQkEP4hmNWjlniS5zdnfIXTk1x7Ome85RDzHlTbBtzE97Gfwz/Ipw4v/Ryk20DWIy3yCNVLVlGKApCnmvYoJbA==} + engines: {node: '>=10'} dependencies: - semver: 5.7.1 + semver: 7.5.4 dev: false - /node-domexception/1.0.0: + /node-domexception@1.0.0: resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} engines: {node: '>=10.5.0'} dev: false - /node-fetch-npm/2.0.4: + /node-fetch-npm@2.0.4: resolution: {integrity: sha512-iOuIQDWDyjhv9qSDrj9aq/klt6F9z1p2otB3AV7v3zBDcL/x+OfGsvGQZZCcMZbUf4Ujw1xGNQkjvGnVT22cKg==} engines: {node: '>=4'} deprecated: This module is not used anymore, npm uses minipass-fetch for its fetch implementation now @@ -5619,7 +6010,7 @@ packages: safe-buffer: 5.2.1 dev: false - /node-fetch/3.2.8: + /node-fetch@3.2.8: resolution: {integrity: sha512-KtpD1YhGszhntMpBDyp5lyagk8KIMopC1LEb7cQUAh7zcosaX5uK8HnbNb2i3NTQK3sIawCItS0uFC3QzcLHdg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: @@ -5628,80 +6019,97 @@ packages: formdata-polyfill: 4.0.10 dev: false - /node-int64/0.4.0: + /node-gyp@10.0.1: + resolution: {integrity: sha512-gg3/bHehQfZivQVfqIyy8wTdSymF9yTyP4CJifK73imyNMU8AIGQE2pUa7dNWfmMeG9cDVF2eehiRMv0LC1iAg==} + engines: {node: ^16.14.0 || >=18.0.0} + hasBin: true + dependencies: + env-paths: 2.2.1 + exponential-backoff: 3.1.1 + glob: 10.3.10 + graceful-fs: 4.2.11 + make-fetch-happen: 13.0.0 + nopt: 7.2.0 + proc-log: 3.0.0 + semver: 7.5.4 + tar: 6.2.0 + which: 4.0.0 + transitivePeerDependencies: + - supports-color + dev: false + + /node-int64@0.4.0: resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} dev: false - /node-releases/2.0.10: - resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} + /node-releases@2.0.13: + resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} dev: false - /node-watch/0.7.3: - resolution: {integrity: sha512-3l4E8uMPY1HdMMryPRUAl+oIHtXtyiTlIiESNSVSNxcPfzAFzeTbXFQkZfAwBbo0B1qMSG8nUABx+Gd+YrbKrQ==} + /node-watch@0.7.4: + resolution: {integrity: sha512-RinNxoz4W1cep1b928fuFhvAQ5ag/+1UlMDV7rbyGthBIgsiEouS4kvRayvvboxii4m8eolKOIBo3OjDqbc+uQ==} engines: {node: '>=6'} dev: false - /normalize-package-data/2.5.0: - resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + /nopt@7.2.0: + resolution: {integrity: sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + hasBin: true dependencies: - hosted-git-info: 2.8.9 - resolve: 1.22.1 - semver: 5.7.1 - validate-npm-package-license: 3.0.4 + abbrev: 2.0.0 dev: false - /normalize-package-data/3.0.3: - resolution: {integrity: sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==} - engines: {node: '>=10'} + /normalize-package-data@2.5.0: + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: - hosted-git-info: 4.1.0 - is-core-module: 2.11.0 - semver: 7.3.8 + hosted-git-info: 2.8.9 + resolve: 1.22.8 + semver: 5.7.2 validate-npm-package-license: 3.0.4 dev: false - /normalize-path/2.1.1: + /normalize-path@2.1.1: resolution: {integrity: sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==} engines: {node: '>=0.10.0'} dependencies: remove-trailing-separator: 1.1.0 dev: false - /normalize-path/3.0.0: + /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} dev: false - /npm-bundled/1.1.2: + /npm-bundled@1.1.2: resolution: {integrity: sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==} dependencies: npm-normalize-package-bin: 1.0.1 dev: false - /npm-normalize-package-bin/1.0.1: + /npm-normalize-package-bin@1.0.1: resolution: {integrity: sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==} dev: false - /npm-package-arg/6.1.1: + /npm-package-arg@6.1.1: resolution: {integrity: sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==} dependencies: hosted-git-info: 2.8.9 osenv: 0.1.5 - semver: 5.7.1 + semver: 5.7.2 validate-npm-package-name: 3.0.0 dev: false - /npm-package-arg/9.1.2: + /npm-package-arg@9.1.2: resolution: {integrity: sha512-pzd9rLEx4TfNJkovvlBSLGhq31gGu2QDexFPWT19yCDh0JgnRhlBLNo5759N0AJmBk+kQ9Y/hXoLnlgFD+ukmg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} dependencies: hosted-git-info: 5.2.1 proc-log: 2.0.1 - semver: 7.3.8 + semver: 7.5.4 validate-npm-package-name: 4.0.0 dev: false - /npm-packlist/1.4.8: + /npm-packlist@1.4.8: resolution: {integrity: sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==} dependencies: ignore-walk: 3.0.4 @@ -5709,41 +6117,48 @@ packages: npm-normalize-package-bin: 1.0.1 dev: false - /npm-pick-manifest/3.0.2: + /npm-pick-manifest@3.0.2: resolution: {integrity: sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw==} dependencies: figgy-pudding: 3.5.2 npm-package-arg: 6.1.1 - semver: 5.7.1 + semver: 5.7.2 dev: false - /npm-registry-fetch/4.0.7: + /npm-registry-fetch@4.0.7: resolution: {integrity: sha512-cny9v0+Mq6Tjz+e0erFAB+RYJ/AVGzkjnISiobqP8OWj9c9FLoZZu8/SPSKJWE17F1tk4018wfjV+ZbIbqC7fQ==} dependencies: + JSONStream: 1.3.5 bluebird: 3.7.2 figgy-pudding: 3.5.2 - JSONStream: 1.3.5 lru-cache: 5.1.1 make-fetch-happen: 5.0.2 npm-package-arg: 6.1.1 - safe-buffer: 5.2.0 + safe-buffer: 5.2.1 dev: false - /npm-run-path/2.0.2: + /npm-run-path@2.0.2: resolution: {integrity: sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==} engines: {node: '>=4'} dependencies: path-key: 2.0.1 dev: false - /npm-run-path/4.0.1: + /npm-run-path@4.0.1: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} dependencies: path-key: 3.1.1 dev: false - /npm/8.12.2: + /npm-run-path@5.1.0: + resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + path-key: 4.0.0 + dev: false + + /npm@8.12.2: resolution: {integrity: sha512-TArexqro9wpl/6wz6t6YdYhOoiy/UArqiSsSsqI7fieEhQEswDQSJcgt/LuCDjl6mfCDi0So7S2UZ979qLYRPg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16} hasBin: true @@ -5820,26 +6235,7 @@ packages: - which - write-file-atomic - /npmlog/4.1.2: - resolution: {integrity: sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==} - dependencies: - are-we-there-yet: 1.1.7 - console-control-strings: 1.1.0 - gauge: 2.7.4 - set-blocking: 2.0.0 - dev: false - - /number-is-nan/1.0.1: - resolution: {integrity: sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==} - engines: {node: '>=0.10.0'} - dev: false - - /object-assign/4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} - dev: false - - /object-copy/0.1.0: + /object-copy@0.1.0: resolution: {integrity: sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==} engines: {node: '>=0.10.0'} dependencies: @@ -5848,163 +6244,208 @@ packages: kind-of: 3.2.2 dev: false - /object-inspect/1.12.3: - resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} + /object-inspect@1.13.1: + resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} dev: false - /object-keys/1.1.1: + /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} dev: false - /object-visit/1.0.1: + /object-visit@1.0.1: resolution: {integrity: sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==} engines: {node: '>=0.10.0'} dependencies: isobject: 3.0.1 dev: false - /object.assign/4.1.4: + /object.assign@4.1.4: resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 + call-bind: 1.0.5 + define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 dev: false - /object.pick/1.3.0: + /object.fromentries@2.0.7: + resolution: {integrity: sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + dev: false + + /object.groupby@1.0.1: + resolution: {integrity: sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + get-intrinsic: 1.2.2 + dev: false + + /object.pick@1.3.0: resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==} engines: {node: '>=0.10.0'} dependencies: isobject: 3.0.1 dev: false - /object.values/1.1.6: - resolution: {integrity: sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==} + /object.values@1.1.7: + resolution: {integrity: sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 dev: false - /once/1.4.0: + /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: wrappy: 1.0.2 dev: false - /one-time/1.0.0: + /one-time@1.0.0: resolution: {integrity: sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==} dependencies: fn.name: 1.1.0 dev: false - /onetime/5.1.2: + /onetime@5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} dependencies: mimic-fn: 2.1.0 dev: false - /optionator/0.9.1: - resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} + /onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + dependencies: + mimic-fn: 4.0.0 + dev: false + + /open@9.1.0: + resolution: {integrity: sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==} + engines: {node: '>=14.16'} + dependencies: + default-browser: 4.0.0 + define-lazy-prop: 3.0.0 + is-inside-container: 1.0.0 + is-wsl: 2.2.0 + dev: false + + /optionator@0.9.3: + resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} dependencies: + '@aashutoshrathi/word-wrap': 1.2.6 deep-is: 0.1.4 fast-levenshtein: 2.0.6 levn: 0.4.1 prelude-ls: 1.2.1 type-check: 0.4.0 - word-wrap: 1.2.3 dev: false - /os-homedir/1.0.2: + /os-homedir@1.0.2: resolution: {integrity: sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==} engines: {node: '>=0.10.0'} dev: false - /os-tmpdir/1.0.2: + /os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} dev: false - /osenv/0.1.5: + /osenv@0.1.5: resolution: {integrity: sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==} dependencies: os-homedir: 1.0.2 os-tmpdir: 1.0.2 dev: false - /p-event/4.2.0: - resolution: {integrity: sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==} - engines: {node: '>=8'} + /p-event@5.0.1: + resolution: {integrity: sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: - p-timeout: 3.2.0 + p-timeout: 5.1.0 dev: false - /p-filter/3.0.0: + /p-filter@3.0.0: resolution: {integrity: sha512-QtoWLjXAW++uTX67HZQz1dbTpqBfiidsB6VtQUC9iR85S120+s0T5sO6s+B5MLzFcZkrEd/DGMmCjR+f2Qpxwg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: p-map: 5.5.0 dev: false - /p-finally/1.0.0: + /p-finally@1.0.0: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} engines: {node: '>=4'} dev: false - /p-limit/2.3.0: + /p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} dependencies: p-try: 2.2.0 dev: false - /p-limit/3.1.0: + /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} dependencies: yocto-queue: 0.1.0 dev: false - /p-locate/4.1.0: + /p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} dependencies: p-limit: 2.3.0 dev: false - /p-locate/5.0.0: + /p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} dependencies: p-limit: 3.1.0 dev: false - /p-map/5.5.0: + /p-map@4.0.0: + resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} + engines: {node: '>=10'} + dependencies: + aggregate-error: 3.1.0 + dev: false + + /p-map@5.5.0: resolution: {integrity: sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==} engines: {node: '>=12'} dependencies: aggregate-error: 4.0.1 dev: false - /p-timeout/3.2.0: - resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==} - engines: {node: '>=8'} - dependencies: - p-finally: 1.0.0 + /p-map@6.0.0: + resolution: {integrity: sha512-T8BatKGY+k5rU+Q/GTYgrEf2r4xRMevAN5mtXc2aPc4rS1j3s+vWTaO2Wag94neXuCAUAs8cxBL9EeB5EA6diw==} + engines: {node: '>=16'} + dev: false + + /p-timeout@5.1.0: + resolution: {integrity: sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==} + engines: {node: '>=12'} dev: false - /p-try/2.2.0: + /p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} dev: false - /pacote/9.5.12: + /pacote@9.5.12: resolution: {integrity: sha512-BUIj/4kKbwWg4RtnBncXPJd15piFSVNpTzY0rysSr3VnMowTYgkGKcaHrbReepAkjTr8lH2CVWRi58Spg2CicQ==} dependencies: bluebird: 3.7.2 @@ -6031,184 +6472,196 @@ packages: promise-retry: 1.1.1 protoduck: 5.0.1 rimraf: 2.7.1 - safe-buffer: 5.2.0 - semver: 5.7.1 + safe-buffer: 5.2.1 + semver: 5.7.2 ssri: 6.0.2 tar: 4.4.19 unique-filename: 1.1.1 which: 1.3.1 dev: false - /parallel-transform/1.2.0: + /parallel-transform@1.2.0: resolution: {integrity: sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==} dependencies: - cyclist: 1.0.1 + cyclist: 1.0.2 inherits: 2.0.4 - readable-stream: 2.3.7 + readable-stream: 2.3.8 dev: false - /param-case/3.0.4: + /param-case@3.0.4: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} dependencies: dot-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.2 dev: false - /parent-module/1.0.1: + /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} dependencies: callsites: 3.1.0 dev: false - /parse-json/5.2.0: + /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.18.6 + '@babel/code-frame': 7.22.13 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 dev: false - /pascal-case/3.1.2: + /pascal-case@3.1.2: resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} dependencies: no-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.2 dev: false - /pascalcase/0.1.1: + /pascalcase@0.1.1: resolution: {integrity: sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==} engines: {node: '>=0.10.0'} dev: false - /path-browserify/1.0.1: + /path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} dev: false - /path-case/3.0.4: + /path-case@3.0.4: resolution: {integrity: sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==} dependencies: dot-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.2 dev: false - /path-equal/1.1.2: + /path-equal@1.1.2: resolution: {integrity: sha512-p5kxPPwCdbf5AdXzT1bUBJomhgBlEjRBavYNr1XUpMFIE4Hnf2roueCMXudZK5tnaAu1tTmp3GPzqwJK45IHEA==} dev: false - /path-exists/4.0.0: + /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} dev: false - /path-is-absolute/1.0.1: + /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} dev: false - /path-key/2.0.1: + /path-key@2.0.1: resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} engines: {node: '>=4'} dev: false - /path-key/3.1.1: + /path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} dev: false - /path-parse/1.0.7: + /path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + dev: false + + /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: false - /path-type/4.0.0: + /path-scurry@1.10.1: + resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + lru-cache: 10.0.2 + minipass: 7.0.4 + dev: false + + /path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} dev: false - /picocolors/1.0.0: + /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: false - /picomatch/2.3.1: + /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} dev: false - /pirates/4.0.5: - resolution: {integrity: sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==} + /pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} dev: false - /pkg-dir/4.2.0: + /pkg-dir@4.2.0: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} dependencies: find-up: 4.1.0 dev: false - /pluralize/8.0.0: + /pluralize@8.0.0: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} engines: {node: '>=4'} dev: false - /posix-character-classes/0.1.1: + /posix-character-classes@0.1.1: resolution: {integrity: sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==} engines: {node: '>=0.10.0'} dev: false - /prebuild-install/6.1.4: - resolution: {integrity: sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==} - engines: {node: '>=6'} + /prebuild-install@7.1.1: + resolution: {integrity: sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==} + engines: {node: '>=10'} hasBin: true dependencies: - detect-libc: 1.0.3 + detect-libc: 2.0.2 expand-template: 2.0.3 github-from-package: 0.0.0 minimist: 1.2.8 mkdirp-classic: 0.5.3 napi-build-utils: 1.0.2 - node-abi: 2.30.1 - npmlog: 4.1.2 + node-abi: 3.51.0 pump: 3.0.0 rc: 1.2.8 - simple-get: 3.1.1 + simple-get: 4.0.1 tar-fs: 2.1.1 tunnel-agent: 0.6.0 dev: false - /prelude-ls/1.2.1: + /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} dev: false - /prettier-linter-helpers/1.0.0: + /prettier-linter-helpers@1.0.0: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} dependencies: - fast-diff: 1.2.0 + fast-diff: 1.3.0 dev: false - /prettier/2.7.1: + /prettier@2.7.1: resolution: {integrity: sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==} engines: {node: '>=10.13.0'} hasBin: true dev: false - /prettier/2.8.4: - resolution: {integrity: sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==} - engines: {node: '>=10.13.0'} + /prettier@3.0.3: + resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==} + engines: {node: '>=14'} hasBin: true dev: false - /prettier/2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} + /prettier@3.1.0: + resolution: {integrity: sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==} + engines: {node: '>=14'} hasBin: true dev: false - /pretty-format/26.6.2: + /pretty-format@26.6.2: resolution: {integrity: sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==} engines: {node: '>= 10'} dependencies: @@ -6218,29 +6671,34 @@ packages: react-is: 17.0.2 dev: false - /pretty-format/29.4.3: - resolution: {integrity: sha512-cvpcHTc42lcsvOOAzd3XuNWTcvk1Jmnzqeu+WsOuiPmxUJTnkbAcFNsRKvEpBEUFVUgy/GTZLulZDcDEi+CIlA==} + /pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/schemas': 29.4.3 + '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 react-is: 18.2.0 dev: false - /proc-log/2.0.1: + /proc-log@2.0.1: resolution: {integrity: sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} dev: false - /process-nextick-args/2.0.1: + /proc-log@3.0.0: + resolution: {integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dev: false + + /process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} dev: false - /promise-inflight/1.0.1: + /promise-inflight@1.0.1: resolution: {integrity: sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==} dev: false - /promise-retry/1.1.1: + /promise-retry@1.1.1: resolution: {integrity: sha512-StEy2osPr28o17bIW776GtwO6+Q+M9zPiZkYfosciUUMYqjhU/ffwRAH0zN2+uvGyUsn8/YICIHRzLbPacpZGw==} engines: {node: '>=0.12'} dependencies: @@ -6248,7 +6706,15 @@ packages: retry: 0.10.1 dev: false - /prompts/2.4.2: + /promise-retry@2.0.1: + resolution: {integrity: sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==} + engines: {node: '>=10'} + dependencies: + err-code: 2.0.3 + retry: 0.12.0 + dev: false + + /prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} dependencies: @@ -6256,35 +6722,35 @@ packages: sisteransi: 1.0.5 dev: false - /proper-lockfile/2.0.1: + /proper-lockfile@2.0.1: resolution: {integrity: sha512-rjaeGbsmhNDcDInmwi4MuI6mRwJu6zq8GjYCLuSuE7GF+4UjgzkL69sVKKJ2T2xH61kK7rXvGYpvaTu909oXaQ==} engines: {node: '>=4.0.0'} dependencies: - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 retry: 0.10.1 dev: false - /protoduck/5.0.1: + /protoduck@5.0.1: resolution: {integrity: sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==} dependencies: genfun: 5.0.0 dev: false - /pump/2.0.1: + /pump@2.0.1: resolution: {integrity: sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==} dependencies: end-of-stream: 1.4.4 once: 1.4.0 dev: false - /pump/3.0.0: + /pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} dependencies: end-of-stream: 1.4.4 once: 1.4.0 dev: false - /pumpify/1.5.1: + /pumpify@1.5.1: resolution: {integrity: sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==} dependencies: duplexify: 3.7.1 @@ -6292,27 +6758,26 @@ packages: pump: 2.0.1 dev: false - /punycode/2.3.0: - resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} + /punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} dev: false - /queue-microtask/1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + /pure-rand@6.0.4: + resolution: {integrity: sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==} dev: false - /quick-lru/5.1.1: - resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} - engines: {node: '>=10'} + /queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: false - /randombytes/2.1.0: + /randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} dependencies: safe-buffer: 5.2.1 dev: false - /rc/1.2.8: + /rc@1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true dependencies: @@ -6322,53 +6787,34 @@ packages: strip-json-comments: 2.0.1 dev: false - /react-is/17.0.2: + /react-is@17.0.2: resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} dev: false - /react-is/18.2.0: + /react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: false - /read-pkg-up/7.0.1: + /read-pkg-up@7.0.1: resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} engines: {node: '>=8'} dependencies: find-up: 4.1.0 - read-pkg: 5.2.0 - type-fest: 0.8.1 - dev: false - - /read-pkg-up/8.0.0: - resolution: {integrity: sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==} - engines: {node: '>=12'} - dependencies: - find-up: 5.0.0 - read-pkg: 6.0.0 - type-fest: 1.4.0 + read-pkg: 5.2.0 + type-fest: 0.8.1 dev: false - /read-pkg/5.2.0: + /read-pkg@5.2.0: resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} engines: {node: '>=8'} dependencies: - '@types/normalize-package-data': 2.4.1 + '@types/normalize-package-data': 2.4.4 normalize-package-data: 2.5.0 parse-json: 5.2.0 type-fest: 0.6.0 dev: false - /read-pkg/6.0.0: - resolution: {integrity: sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==} - engines: {node: '>=12'} - dependencies: - '@types/normalize-package-data': 2.4.1 - normalize-package-data: 3.0.3 - parse-json: 5.2.0 - type-fest: 1.4.0 - dev: false - - /readable-stream/1.1.14: + /readable-stream@1.1.14: resolution: {integrity: sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==} dependencies: core-util-is: 1.0.3 @@ -6377,8 +6823,8 @@ packages: string_decoder: 0.10.31 dev: false - /readable-stream/2.3.7: - resolution: {integrity: sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==} + /readable-stream@2.3.8: + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} dependencies: core-util-is: 1.0.3 inherits: 2.0.4 @@ -6389,8 +6835,8 @@ packages: util-deprecate: 1.0.2 dev: false - /readable-stream/3.6.0: - resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} + /readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} dependencies: inherits: 2.0.4 @@ -6398,26 +6844,18 @@ packages: util-deprecate: 1.0.2 dev: false - /rechoir/0.7.1: - resolution: {integrity: sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==} - engines: {node: '>= 0.10'} + /rechoir@0.8.0: + resolution: {integrity: sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==} + engines: {node: '>= 10.13.0'} dependencies: - resolve: 1.22.1 + resolve: 1.22.8 dev: false - /recursive-diff/1.0.9: + /recursive-diff@1.0.9: resolution: {integrity: sha512-5mqpskzvXDo5Vy29Vj8tH30a0+XBmY11aqWGoN/uB94UHRwndX2EuPvH+WtbqOYkrwAF718/lDo6U4CB1qSSqQ==} dev: false - /redent/4.0.0: - resolution: {integrity: sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==} - engines: {node: '>=12'} - dependencies: - indent-string: 5.0.0 - strip-indent: 4.0.0 - dev: false - - /regex-not/1.0.2: + /regex-not@1.0.2: resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==} engines: {node: '>=0.10.0'} dependencies: @@ -6425,172 +6863,200 @@ packages: safe-regex: 1.1.0 dev: false - /regexp-tree/0.1.24: - resolution: {integrity: sha512-s2aEVuLhvnVJW6s/iPgEGK6R+/xngd2jNQ+xy4bXNDKxZKJH6jpPHY6kVeVv1IeLCHgswRj+Kl3ELaDjG6V1iw==} + /regexp-tree@0.1.27: + resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} hasBin: true dev: false - /regexp.prototype.flags/1.4.3: - resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} + /regexp.prototype.flags@1.5.1: + resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - functions-have-names: 1.2.3 + call-bind: 1.0.5 + define-properties: 1.2.1 + set-function-name: 2.0.1 dev: false - /regexpp/3.2.0: + /regexpp@3.2.0: resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} engines: {node: '>=8'} dev: false - /remove-trailing-separator/1.1.0: + /regjsparser@0.10.0: + resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} + hasBin: true + dependencies: + jsesc: 0.5.0 + dev: false + + /remove-trailing-separator@1.1.0: resolution: {integrity: sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==} dev: false - /repeat-element/1.1.4: + /repeat-element@1.1.4: resolution: {integrity: sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==} engines: {node: '>=0.10.0'} dev: false - /repeat-string/1.6.1: + /repeat-string@1.6.1: resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} engines: {node: '>=0.10'} dev: false - /require-directory/2.1.1: + /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} dev: false - /require-from-string/2.0.2: + /require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} dev: false - /resolve-cwd/3.0.0: + /resolve-cwd@3.0.0: resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} engines: {node: '>=8'} dependencies: resolve-from: 5.0.0 dev: false - /resolve-from/4.0.0: + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} dev: false - /resolve-from/5.0.0: + /resolve-from@5.0.0: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} dev: false - /resolve-url/0.2.1: + /resolve-url@0.2.1: resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} deprecated: https://github.com/lydell/resolve-url#deprecated dev: false - /resolve.exports/2.0.0: - resolution: {integrity: sha512-6K/gDlqgQscOlg9fSRpWstA8sYe8rbELsSTNpx+3kTrsVCzvSl0zIvRErM7fdl9ERWDsKnrLnwB+Ne89918XOg==} + /resolve.exports@2.0.2: + resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} engines: {node: '>=10'} dev: false - /resolve/1.22.1: - resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} + /resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true dependencies: - is-core-module: 2.11.0 + is-core-module: 2.13.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: false - /ret/0.1.15: + /ret@0.1.15: resolution: {integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==} engines: {node: '>=0.12'} dev: false - /retry/0.10.1: + /retry@0.10.1: resolution: {integrity: sha512-ZXUSQYTHdl3uS7IuCehYfMzKyIDBNoAuUblvy5oGO5UJSUTmStUUVPXbA9Qxd173Bgre53yCQczQuHgRWAdvJQ==} dev: false - /reusify/1.0.4: + /retry@0.12.0: + resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} + engines: {node: '>= 4'} + dev: false + + /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} dev: false - /rimraf/2.7.1: + /rimraf@2.7.1: resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} hasBin: true dependencies: glob: 7.1.7 dev: false - /rimraf/3.0.2: + /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true dependencies: glob: 7.1.7 dev: false - /rsvp/4.8.5: + /rimraf@5.0.5: + resolution: {integrity: sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==} + engines: {node: '>=14'} + hasBin: true + dependencies: + glob: 10.3.10 + dev: false + + /rsvp@4.8.5: resolution: {integrity: sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==} engines: {node: 6.* || >= 7.*} dev: false - /run-parallel/1.2.0: + /run-applescript@5.0.0: + resolution: {integrity: sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==} + engines: {node: '>=12'} + dependencies: + execa: 5.1.1 + dev: false + + /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: queue-microtask: 1.2.3 dev: false - /run-queue/1.0.3: + /run-queue@1.0.3: resolution: {integrity: sha512-ntymy489o0/QQplUDnpYAYUsO50K9SBrIVaKCWDOJzYJts0f9WH9RFJkyagebkw5+y1oi00R7ynNW/d12GBumg==} dependencies: aproba: 1.2.0 dev: false - /safe-buffer/5.1.2: - resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + /safe-array-concat@1.0.1: + resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} + engines: {node: '>=0.4'} + dependencies: + call-bind: 1.0.5 + get-intrinsic: 1.2.2 + has-symbols: 1.0.3 + isarray: 2.0.5 dev: false - /safe-buffer/5.2.0: - resolution: {integrity: sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==} + /safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} dev: false - /safe-buffer/5.2.1: + /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} dev: false - /safe-regex-test/1.0.0: + /safe-regex-test@1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 is-regex: 1.1.4 dev: false - /safe-regex/1.1.0: + /safe-regex@1.1.0: resolution: {integrity: sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==} dependencies: ret: 0.1.15 dev: false - /safe-regex/2.1.1: - resolution: {integrity: sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==} - dependencies: - regexp-tree: 0.1.24 - dev: false - - /safe-stable-stringify/2.4.2: - resolution: {integrity: sha512-gMxvPJYhP0O9n2pvcfYfIuYgbledAOJFcqRThtPRmjscaipiwcwPPKLytpVzMkG2HAN87Qmo2d4PtGiri1dSLA==} + /safe-stable-stringify@2.4.3: + resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==} engines: {node: '>=10'} dev: false - /safer-buffer/2.1.2: + /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + requiresBuild: true dev: false - /sane/4.1.0: + /sane@4.1.0: resolution: {integrity: sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==} engines: {node: 6.* || 8.* || >= 10.*} deprecated: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added @@ -6607,58 +7073,77 @@ packages: walker: 1.0.8 dev: false - /schema-utils/3.1.1: - resolution: {integrity: sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==} + /schema-utils@3.3.0: + resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/json-schema': 7.0.11 + '@types/json-schema': 7.0.15 ajv: 6.12.6 - ajv-keywords: 3.5.2_ajv@6.12.6 + ajv-keywords: 3.5.2(ajv@6.12.6) dev: false - /semver/5.7.1: - resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} + /schema-utils@4.2.0: + resolution: {integrity: sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==} + engines: {node: '>= 12.13.0'} + dependencies: + '@types/json-schema': 7.0.15 + ajv: 8.12.0 + ajv-formats: 2.1.1(ajv@8.12.0) + ajv-keywords: 5.1.0(ajv@8.12.0) + dev: false + + /semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true dev: false - /semver/6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} + /semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true dev: false - /semver/7.3.8: - resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} hasBin: true dependencies: lru-cache: 6.0.0 dev: false - /sentence-case/3.0.4: + /sentence-case@3.0.4: resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==} dependencies: no-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.2 upper-case-first: 2.0.2 dev: false - /serialize-javascript/5.0.1: - resolution: {integrity: sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==} + /serialize-javascript@6.0.1: + resolution: {integrity: sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==} dependencies: randombytes: 2.1.0 dev: false - /serialize-javascript/6.0.1: - resolution: {integrity: sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==} + /set-function-length@1.1.1: + resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} + engines: {node: '>= 0.4'} dependencies: - randombytes: 2.1.0 + define-data-property: 1.1.1 + get-intrinsic: 1.2.2 + gopd: 1.0.1 + has-property-descriptors: 1.0.1 dev: false - /set-blocking/2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + /set-function-name@2.0.1: + resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.1 + functions-have-names: 1.2.3 + has-property-descriptors: 1.0.1 dev: false - /set-value/2.0.1: + /set-value@2.0.1: resolution: {integrity: sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==} engines: {node: '>=0.10.0'} dependencies: @@ -6668,94 +7153,99 @@ packages: split-string: 3.1.0 dev: false - /shallow-clone/3.0.1: + /shallow-clone@3.0.1: resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} engines: {node: '>=8'} dependencies: kind-of: 6.0.3 dev: false - /shebang-command/1.2.0: + /shebang-command@1.2.0: resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} engines: {node: '>=0.10.0'} dependencies: shebang-regex: 1.0.0 dev: false - /shebang-command/2.0.0: + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} dependencies: shebang-regex: 3.0.0 dev: false - /shebang-regex/1.0.0: + /shebang-regex@1.0.0: resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} engines: {node: '>=0.10.0'} dev: false - /shebang-regex/3.0.0: + /shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} dev: false - /side-channel/1.0.4: + /side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 - object-inspect: 1.12.3 + call-bind: 1.0.5 + get-intrinsic: 1.2.2 + object-inspect: 1.13.1 dev: false - /signal-exit/3.0.7: + /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: false - /simple-concat/1.0.1: + /signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + dev: false + + /simple-concat@1.0.1: resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} dev: false - /simple-get/3.1.1: - resolution: {integrity: sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==} + /simple-get@4.0.1: + resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} dependencies: - decompress-response: 4.2.1 + decompress-response: 6.0.0 once: 1.4.0 simple-concat: 1.0.1 dev: false - /simple-swizzle/0.2.2: + /simple-swizzle@0.2.2: resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} dependencies: is-arrayish: 0.3.2 dev: false - /sisteransi/1.0.5: + /sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} dev: false - /slash/3.0.0: + /slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} dev: false - /slash/4.0.0: + /slash@4.0.0: resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} engines: {node: '>=12'} dev: false - /smart-buffer/4.2.0: + /smart-buffer@4.2.0: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} dev: false - /snake-case/3.0.4: + /snake-case@3.0.4: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} dependencies: dot-case: 3.0.4 - tslib: 2.5.0 + tslib: 2.6.2 dev: false - /snapdragon-node/2.1.1: + /snapdragon-node@2.1.1: resolution: {integrity: sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==} engines: {node: '>=0.10.0'} dependencies: @@ -6764,14 +7254,14 @@ packages: snapdragon-util: 3.0.1 dev: false - /snapdragon-util/3.0.1: + /snapdragon-util@3.0.1: resolution: {integrity: sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==} engines: {node: '>=0.10.0'} dependencies: kind-of: 3.2.2 dev: false - /snapdragon/0.8.2: + /snapdragon@0.8.2: resolution: {integrity: sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==} engines: {node: '>=0.10.0'} dependencies: @@ -6785,7 +7275,7 @@ packages: use: 3.1.1 dev: false - /socks-proxy-agent/4.0.2: + /socks-proxy-agent@4.0.2: resolution: {integrity: sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==} engines: {node: '>= 6'} dependencies: @@ -6793,7 +7283,18 @@ packages: socks: 2.3.3 dev: false - /socks/2.3.3: + /socks-proxy-agent@8.0.2: + resolution: {integrity: sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.0 + debug: 4.3.4 + socks: 2.7.1 + transitivePeerDependencies: + - supports-color + dev: false + + /socks@2.3.3: resolution: {integrity: sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==} engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} dependencies: @@ -6801,11 +7302,15 @@ packages: smart-buffer: 4.2.0 dev: false - /source-list-map/2.0.1: - resolution: {integrity: sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==} + /socks@2.7.1: + resolution: {integrity: sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==} + engines: {node: '>= 10.13.0', npm: '>= 3.0.0'} + dependencies: + ip: 2.0.0 + smart-buffer: 4.2.0 dev: false - /source-map-resolve/0.5.3: + /source-map-resolve@0.5.3: resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==} deprecated: See https://github.com/lydell/source-map-resolve#deprecated dependencies: @@ -6816,91 +7321,105 @@ packages: urix: 0.1.0 dev: false - /source-map-support/0.5.13: + /source-map-support@0.5.13: resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} dependencies: buffer-from: 1.1.2 source-map: 0.6.1 dev: false - /source-map-support/0.5.21: + /source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} dependencies: buffer-from: 1.1.2 source-map: 0.6.1 dev: false - /source-map-url/0.4.1: + /source-map-url@0.4.1: resolution: {integrity: sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==} deprecated: See https://github.com/lydell/source-map-url#deprecated dev: false - /source-map/0.5.7: + /source-map@0.5.7: resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} engines: {node: '>=0.10.0'} dev: false - /source-map/0.6.1: + /source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} dev: false - /source-map/0.7.3: - resolution: {integrity: sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==} + /source-map@0.7.4: + resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} + engines: {node: '>= 8'} + dev: false + + /source-map@0.8.0-beta.0: + resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} engines: {node: '>= 8'} + dependencies: + whatwg-url: 7.1.0 dev: false - /spdx-correct/3.1.1: - resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} + /spdx-correct@3.2.0: + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} dependencies: spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.12 + spdx-license-ids: 3.0.16 dev: false - /spdx-exceptions/2.3.0: + /spdx-exceptions@2.3.0: resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} dev: false - /spdx-expression-parse/3.0.1: + /spdx-expression-parse@3.0.1: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.12 + spdx-license-ids: 3.0.16 dev: false - /spdx-license-ids/3.0.12: - resolution: {integrity: sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==} + /spdx-license-ids@3.0.16: + resolution: {integrity: sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==} dev: false - /split-string/3.1.0: + /split-string@3.1.0: resolution: {integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==} engines: {node: '>=0.10.0'} dependencies: extend-shallow: 3.0.2 dev: false - /sprintf-js/1.0.3: + /sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: false - /ssri/6.0.2: + /ssri@10.0.5: + resolution: {integrity: sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + minipass: 7.0.4 + dev: false + + /ssri@6.0.2: resolution: {integrity: sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==} dependencies: figgy-pudding: 3.5.2 dev: false - /stack-trace/0.0.10: + /stack-trace@0.0.10: resolution: {integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==} dev: false - /stack-utils/2.0.6: + /stack-utils@2.0.6: resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} engines: {node: '>=10'} dependencies: escape-string-regexp: 2.0.0 dev: false - /static-extend/0.1.2: + /static-extend@0.1.2: resolution: {integrity: sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==} engines: {node: '>=0.10.0'} dependencies: @@ -6908,18 +7427,18 @@ packages: object-copy: 0.1.0 dev: false - /stream-each/1.2.3: + /stream-each@1.2.3: resolution: {integrity: sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==} dependencies: end-of-stream: 1.4.4 stream-shift: 1.0.1 dev: false - /stream-shift/1.0.1: + /stream-shift@1.0.1: resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==} dev: false - /string-length/4.0.2: + /string-length@4.0.2: resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} engines: {node: '>=10'} dependencies: @@ -6927,16 +7446,7 @@ packages: strip-ansi: 6.0.1 dev: false - /string-width/1.0.2: - resolution: {integrity: sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==} - engines: {node: '>=0.10.0'} - dependencies: - code-point-at: 1.1.0 - is-fullwidth-code-point: 1.0.0 - strip-ansi: 3.0.1 - dev: false - - /string-width/4.2.3: + /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} dependencies: @@ -6945,132 +7455,156 @@ packages: strip-ansi: 6.0.1 dev: false - /string.prototype.repeat/0.2.0: + /string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + dev: false + + /string.prototype.repeat@0.2.0: resolution: {integrity: sha512-1BH+X+1hSthZFW+X+JaUkjkkUPwIlLEMJBLANN3hOob3RhEk5snLWNECDnYbgn/m5c5JV7Ersu1Yubaf+05cIA==} dev: false - /string.prototype.trimend/1.0.6: - resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} + /string.prototype.trim@1.2.8: + resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 + dev: false + + /string.prototype.trimend@1.0.7: + resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 dev: false - /string.prototype.trimstart/1.0.6: - resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} + /string.prototype.trimstart@1.0.7: + resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.1 + call-bind: 1.0.5 + define-properties: 1.2.1 + es-abstract: 1.22.3 dev: false - /string_decoder/0.10.31: + /string_decoder@0.10.31: resolution: {integrity: sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==} dev: false - /string_decoder/1.1.1: + /string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: safe-buffer: 5.1.2 dev: false - /string_decoder/1.3.0: + /string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: safe-buffer: 5.2.1 dev: false - /strip-ansi/3.0.1: - resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} - engines: {node: '>=0.10.0'} - dependencies: - ansi-regex: 2.1.1 - dev: false - - /strip-ansi/6.0.1: + /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} dependencies: ansi-regex: 5.0.1 dev: false - /strip-bom/3.0.0: + /strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + dependencies: + ansi-regex: 6.0.1 + dev: false + + /strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} dev: false - /strip-bom/4.0.0: + /strip-bom@4.0.0: resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} engines: {node: '>=8'} dev: false - /strip-eof/1.0.0: + /strip-eof@1.0.0: resolution: {integrity: sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==} engines: {node: '>=0.10.0'} dev: false - /strip-final-newline/2.0.0: + /strip-final-newline@2.0.0: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} dev: false - /strip-indent/3.0.0: - resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} - engines: {node: '>=8'} - dependencies: - min-indent: 1.0.1 + /strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} dev: false - /strip-indent/4.0.0: - resolution: {integrity: sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==} - engines: {node: '>=12'} + /strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} dependencies: min-indent: 1.0.1 dev: false - /strip-json-comments/2.0.1: + /strip-json-comments@2.0.1: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} dev: false - /strip-json-comments/3.1.1: + /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} dev: false - /supports-color/5.5.0: + /supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} dependencies: has-flag: 3.0.0 dev: false - /supports-color/7.2.0: + /supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} dependencies: has-flag: 4.0.0 dev: false - /supports-color/8.1.1: + /supports-color@8.1.1: resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} engines: {node: '>=10'} dependencies: has-flag: 4.0.0 dev: false - /supports-preserve-symlinks-flag/1.0.0: + /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} dev: false - /tapable/2.2.1: + /synckit@0.8.5: + resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==} + engines: {node: ^14.18.0 || >=16.0.0} + dependencies: + '@pkgr/utils': 2.4.2 + tslib: 2.6.2 + dev: false + + /tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} dev: false - /tar-fs/2.1.1: + /tar-fs@2.1.1: resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} dependencies: chownr: 1.1.4 @@ -7079,7 +7613,7 @@ packages: tar-stream: 2.2.0 dev: false - /tar-stream/2.2.0: + /tar-stream@2.2.0: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} engines: {node: '>=6'} dependencies: @@ -7087,10 +7621,10 @@ packages: end-of-stream: 1.4.4 fs-constants: 1.0.0 inherits: 2.0.4 - readable-stream: 3.6.0 + readable-stream: 3.6.2 dev: false - /tar/4.4.19: + /tar@4.4.19: resolution: {integrity: sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==} engines: {node: '>=4.5'} dependencies: @@ -7103,8 +7637,20 @@ packages: yallist: 3.1.1 dev: false - /terser-webpack-plugin/5.3.6_webpack@5.40.0: - resolution: {integrity: sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==} + /tar@6.2.0: + resolution: {integrity: sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==} + engines: {node: '>=10'} + dependencies: + chownr: 2.0.0 + fs-minipass: 2.1.0 + minipass: 5.0.0 + minizlib: 2.1.2 + mkdirp: 1.0.4 + yallist: 4.0.0 + dev: false + + /terser-webpack-plugin@5.3.9(webpack@5.89.0): + resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} engines: {node: '>= 10.13.0'} peerDependencies: '@swc/core': '*' @@ -7119,26 +7665,26 @@ packages: uglify-js: optional: true dependencies: - '@jridgewell/trace-mapping': 0.3.17 + '@jridgewell/trace-mapping': 0.3.20 jest-worker: 27.5.1 - schema-utils: 3.1.1 + schema-utils: 3.3.0 serialize-javascript: 6.0.1 - terser: 5.16.4 - webpack: 5.40.0_webpack-cli@4.7.2 + terser: 5.24.0 + webpack: 5.89.0(webpack-cli@5.1.4) dev: false - /terser/5.16.4: - resolution: {integrity: sha512-5yEGuZ3DZradbogeYQ1NaGz7rXVBDWujWlx1PT8efXO6Txn+eWbfKqB2bTDVmFXmePFkoLU6XI8UektMIEA0ug==} + /terser@5.24.0: + resolution: {integrity: sha512-ZpGR4Hy3+wBEzVEnHvstMvqpD/nABNelQn/z2r0fjVWGQsN3bpOLzQlqDxmb4CDZnXq5lpjnQ+mHQLAOpfM5iw==} engines: {node: '>=10'} hasBin: true dependencies: - '@jridgewell/source-map': 0.3.2 - acorn: 8.8.2 + '@jridgewell/source-map': 0.3.5 + acorn: 8.11.2 commander: 2.20.3 source-map-support: 0.5.21 dev: false - /test-exclude/6.0.0: + /test-exclude@6.0.0: resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} engines: {node: '>=8'} dependencies: @@ -7147,42 +7693,47 @@ packages: minimatch: 3.1.2 dev: false - /text-hex/1.0.0: + /text-hex@1.0.0: resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==} dev: false - /text-table/0.2.0: + /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: false - /through/2.3.8: - resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - dev: false - - /through2/2.0.5: + /through2@2.0.5: resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} dependencies: - readable-stream: 2.3.7 + readable-stream: 2.3.8 xtend: 4.0.2 dev: false - /tmpl/1.0.5: + /through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + dev: false + + /titleize@3.0.0: + resolution: {integrity: sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==} + engines: {node: '>=12'} + dev: false + + /tmpl@1.0.5: resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} dev: false - /to-fast-properties/2.0.0: + /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} dev: false - /to-object-path/0.3.0: + /to-object-path@0.3.0: resolution: {integrity: sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==} engines: {node: '>=0.10.0'} dependencies: kind-of: 3.2.2 dev: false - /to-regex-range/2.1.1: + /to-regex-range@2.1.1: resolution: {integrity: sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==} engines: {node: '>=0.10.0'} dependencies: @@ -7190,14 +7741,14 @@ packages: repeat-string: 1.6.1 dev: false - /to-regex-range/5.0.1: + /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} dependencies: is-number: 7.0.0 dev: false - /to-regex/3.0.2: + /to-regex@3.0.2: resolution: {integrity: sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==} engines: {node: '>=0.10.0'} dependencies: @@ -7207,39 +7758,50 @@ packages: safe-regex: 1.1.0 dev: false - /tree-sitter-python/0.20.1: - resolution: {integrity: sha512-fyoWFw/C3pZG9AdYElUQlFLPQFxeUQZe0nDGv/ksESvedoPw9JBpPga2l9PNBX/QKMpTmVRB0lM2/l0LVMnFbg==} + /tr46@1.0.1: + resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} + dependencies: + punycode: 2.3.1 + dev: false + + /tree-sitter-python@0.20.4: + resolution: {integrity: sha512-F+94q/t9+4J5yaQnmfAqEf4OZFjuhuyniRtb9P2jPaBwHrbyJL44RKFALovZxhF0syLFKpTQ7ODywyiGeB1YMg==} requiresBuild: true dependencies: - nan: 2.17.0 + nan: 2.18.0 dev: false - /tree-sitter-typescript/0.20.1: - resolution: {integrity: sha512-wqpnhdVYX26ATNXeZtprib4+mF2GlYQB1cjRPibYGxDRiugx5OfjWwLE4qPPxEGdp2ZLSmZVesGUjLWzfKo6rA==} + /tree-sitter-typescript@0.20.3: + resolution: {integrity: sha512-5+RZ9G3/VOxxSzyniVc5dfNhfan1eOxQvUdTgXhpsGIYlmSW3HwIuPEJ7r65FWH2WnJWirOu11Pm0usmkx2JOg==} requiresBuild: true dependencies: - nan: 2.17.0 + nan: 2.18.0 dev: false - /tree-sitter/0.20.1: - resolution: {integrity: sha512-Cmb8V0ocamHbgWMVhZIa+78k/7r8VCQ6+ePG8eYEAO7AccwWi06Ct4ATNiI94KwhIkRl0+OwZ42/5nk3GnEMpQ==} + /tree-sitter@0.20.6: + resolution: {integrity: sha512-GxJodajVpfgb3UREzzIbtA1hyRnTxVbWVXrbC6sk4xTMH5ERMBJk9HJNq4c8jOJeUaIOmLcwg+t6mez/PDvGqg==} requiresBuild: true dependencies: - nan: 2.17.0 - prebuild-install: 6.1.4 + nan: 2.18.0 + prebuild-install: 7.1.1 dev: false - /trim-newlines/4.0.2: - resolution: {integrity: sha512-GJtWyq9InR/2HRiLZgpIKv+ufIKrVrvjQWEj7PxAXNc5dwbNJkqhAUoAGgzRmULAnoOM5EIpveYd3J2VeSAIew==} - engines: {node: '>=12'} + /triple-beam@1.4.1: + resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==} + engines: {node: '>= 14.0.0'} dev: false - /triple-beam/1.3.0: - resolution: {integrity: sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==} + /ts-api-utils@1.0.3(typescript@5.2.2): + resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} + engines: {node: '>=16.13.0'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 5.2.2 dev: false - /ts-jest/29.0.5_jest@29.4.3+typescript@4.9.5: - resolution: {integrity: sha512-PL3UciSgIpQ7f6XjVOmbi96vmDHUqAyqDr8YxzopDqX3kfgYtX1cuNeBjP+L9sFXi6nzsGGA6R3fP3DDDJyrxA==} + /ts-jest@29.1.1(jest@29.7.0)(typescript@5.2.2): + resolution: {integrity: sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true peerDependencies: @@ -7248,7 +7810,7 @@ packages: babel-jest: ^29.0.0 esbuild: '*' jest: ^29.0.0 - typescript: '>=4.3' + typescript: '>=4.3 <6' peerDependenciesMeta: '@babel/core': optional: true @@ -7261,39 +7823,40 @@ packages: dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c - jest-util: 29.4.3 + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 make-error: 1.3.6 - semver: 7.3.8 - typescript: 4.9.5 + semver: 7.5.4 + typescript: 5.2.2 yargs-parser: 21.1.1 dev: false - /ts-loader/9.2.9_typescript@4.9.5+webpack@5.40.0: - resolution: {integrity: sha512-b0+vUY2/enb0qYtDQuNlDnJ9900NTiPiJcDJ6sY7ax1CCCwXfYIqPOMm/BwW7jsF1km+Oz8W9s31HLuD+FLIMg==} + /ts-loader@9.5.1(typescript@5.2.2)(webpack@5.89.0): + resolution: {integrity: sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==} engines: {node: '>=12.0.0'} peerDependencies: typescript: '*' webpack: ^5.0.0 dependencies: chalk: 4.1.2 - enhanced-resolve: 5.12.0 + enhanced-resolve: 5.15.0 micromatch: 4.0.5 - semver: 7.3.8 - typescript: 4.9.5 - webpack: 5.40.0_webpack-cli@4.7.2 + semver: 7.5.4 + source-map: 0.7.4 + typescript: 5.2.2 + webpack: 5.89.0(webpack-cli@5.1.4) dev: false - /ts-morph/13.0.3: + /ts-morph@13.0.3: resolution: {integrity: sha512-pSOfUMx8Ld/WUreoSzvMFQG5i9uEiWIsBYjpU9+TTASOeUa89j5HykomeqVULm1oqWtBdleI3KEFRLrlA3zGIw==} dependencies: '@ts-morph/common': 0.12.3 code-block-writer: 11.0.3 dev: false - /ts-node/10.9.1_40e6fc09aee2c476d0f03e8841c5b8df: + /ts-node@10.9.1(@types/node@16.18.61)(typescript@4.6.4): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -7311,20 +7874,20 @@ packages: '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.3 - '@types/node': 14.14.45 - acorn: 8.8.2 - acorn-walk: 8.2.0 + '@tsconfig/node16': 1.0.4 + '@types/node': 16.18.61 + acorn: 8.11.2 + acorn-walk: 8.3.0 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.9.5 + typescript: 4.6.4 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: false - /ts-node/10.9.1_f70930aab4af6c83ac76d1fb5fc28ec5: + /ts-node@10.9.1(@types/node@20.9.0)(typescript@5.2.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -7342,21 +7905,21 @@ packages: '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.3 - '@types/node': 16.18.12 - acorn: 8.8.2 - acorn-walk: 8.2.0 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.9.0 + acorn: 8.11.2 + acorn-walk: 8.3.0 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.6.4 + typescript: 5.2.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: false - /tsconfig-paths/3.14.1: - resolution: {integrity: sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==} + /tsconfig-paths@3.14.2: + resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==} dependencies: '@types/json5': 0.0.29 json5: 1.0.2 @@ -7364,118 +7927,147 @@ packages: strip-bom: 3.0.0 dev: false - /tslib/1.14.1: + /tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: false - /tslib/2.5.0: - resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==} + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} dev: false - /tsutils/3.21.0_typescript@4.9.5: + /tsutils@3.21.0(typescript@5.2.2): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.9.5 + typescript: 5.2.2 dev: false - /tunnel-agent/0.6.0: + /tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} dependencies: safe-buffer: 5.2.1 dev: false - /type-check/0.4.0: + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} dependencies: prelude-ls: 1.2.1 dev: false - /type-detect/4.0.8: + /type-detect@4.0.8: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} dev: false - /type-fest/0.20.2: + /type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} dev: false - /type-fest/0.21.3: + /type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} dev: false - /type-fest/0.6.0: + /type-fest@0.6.0: resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} engines: {node: '>=8'} dev: false - /type-fest/0.8.1: + /type-fest@0.8.1: resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} engines: {node: '>=8'} dev: false - /type-fest/1.4.0: - resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==} - engines: {node: '>=10'} + /typed-array-buffer@1.0.0: + resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + get-intrinsic: 1.2.2 + is-typed-array: 1.1.12 + dev: false + + /typed-array-byte-length@1.0.0: + resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.12 + dev: false + + /typed-array-byte-offset@1.0.0: + resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.5 + for-each: 0.3.3 + has-proto: 1.0.1 + is-typed-array: 1.1.12 dev: false - /typed-array-length/1.0.4: + /typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 for-each: 0.3.3 - is-typed-array: 1.1.10 + is-typed-array: 1.1.12 dev: false - /typedarray/0.0.6: + /typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: false - /typescript-json-schema/0.53.1: + /typescript-json-schema@0.53.1: resolution: {integrity: sha512-Hg+RnOKUd38MOzC0rDft03a8xvwO+gCcj1F77smw2tCoZYQpFoLtrXWBGdvCX+REliko5WYel2kux17HPFqjLQ==} hasBin: true dependencies: - '@types/json-schema': 7.0.11 - '@types/node': 16.18.12 + '@types/json-schema': 7.0.15 + '@types/node': 16.18.61 glob: 7.1.7 path-equal: 1.1.2 - safe-stable-stringify: 2.4.2 - ts-node: 10.9.1_f70930aab4af6c83ac76d1fb5fc28ec5 + safe-stable-stringify: 2.4.3 + ts-node: 10.9.1(@types/node@16.18.61)(typescript@4.6.4) typescript: 4.6.4 - yargs: 17.3.1 + yargs: 17.2.1 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' dev: false - /typescript/4.6.4: + /typescript@4.6.4: resolution: {integrity: sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==} engines: {node: '>=4.2.0'} hasBin: true dev: false - /typescript/4.9.5: - resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} - engines: {node: '>=4.2.0'} + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} + engines: {node: '>=14.17'} hasBin: true dev: false - /unbox-primitive/1.0.2: + /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.5 has-bigints: 1.0.2 has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 dev: false - /union-value/1.0.1: + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + dev: false + + /union-value@1.0.1: resolution: {integrity: sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==} engines: {node: '>=0.10.0'} dependencies: @@ -7485,29 +8077,43 @@ packages: set-value: 2.0.1 dev: false - /unique-filename/1.1.1: + /unique-filename@1.1.1: resolution: {integrity: sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==} dependencies: unique-slug: 2.0.2 dev: false - /unique-slug/2.0.2: + /unique-filename@3.0.0: + resolution: {integrity: sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + unique-slug: 4.0.0 + dev: false + + /unique-slug@2.0.2: resolution: {integrity: sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==} dependencies: imurmurhash: 0.1.4 dev: false - /universalify/0.1.2: + /unique-slug@4.0.0: + resolution: {integrity: sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + dependencies: + imurmurhash: 0.1.4 + dev: false + + /universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} dev: false - /universalify/2.0.0: - resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} + /universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} dev: false - /unset-value/1.0.0: + /unset-value@1.0.0: resolution: {integrity: sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==} engines: {node: '>=0.10.0'} dependencies: @@ -7515,279 +8121,223 @@ packages: isobject: 3.0.1 dev: false - /untildify/4.0.0: + /untildify@4.0.0: resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} engines: {node: '>=8'} dev: false - /update-browserslist-db/1.0.10_browserslist@4.21.5: - resolution: {integrity: sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==} + /update-browserslist-db@1.0.13(browserslist@4.22.1): + resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.21.5 + browserslist: 4.22.1 escalade: 3.1.1 picocolors: 1.0.0 dev: false - /upper-case-first/2.0.2: + /upper-case-first@2.0.2: resolution: {integrity: sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==} dependencies: - tslib: 2.5.0 + tslib: 2.6.2 dev: false - /upper-case/2.0.2: + /upper-case@2.0.2: resolution: {integrity: sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==} dependencies: - tslib: 2.5.0 + tslib: 2.6.2 dev: false - /uri-js/4.4.1: + /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: - punycode: 2.3.0 + punycode: 2.3.1 dev: false - /urijs/1.19.11: + /urijs@1.19.11: resolution: {integrity: sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==} dev: false - /urix/0.1.0: + /urix@0.1.0: resolution: {integrity: sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==} deprecated: Please see https://github.com/lydell/urix#deprecated dev: false - /use/3.1.1: + /use@3.1.1: resolution: {integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==} engines: {node: '>=0.10.0'} dev: false - /util-deprecate/1.0.2: + /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: false - /v8-compile-cache-lib/3.0.1: + /v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} dev: false - /v8-compile-cache/2.3.0: - resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==} - dev: false - - /v8-to-istanbul/9.1.0: - resolution: {integrity: sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==} + /v8-to-istanbul@9.1.3: + resolution: {integrity: sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg==} engines: {node: '>=10.12.0'} dependencies: - '@jridgewell/trace-mapping': 0.3.17 - '@types/istanbul-lib-coverage': 2.0.4 - convert-source-map: 1.9.0 + '@jridgewell/trace-mapping': 0.3.20 + '@types/istanbul-lib-coverage': 2.0.6 + convert-source-map: 2.0.0 dev: false - /validate-npm-package-license/3.0.4: + /validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} dependencies: - spdx-correct: 3.1.1 + spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 dev: false - /validate-npm-package-name/3.0.0: + /validate-npm-package-name@3.0.0: resolution: {integrity: sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw==} dependencies: builtins: 1.0.3 dev: false - /validate-npm-package-name/4.0.0: + /validate-npm-package-name@4.0.0: resolution: {integrity: sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} dependencies: builtins: 5.0.1 dev: false - /vscode-jsonrpc/3.5.0: - resolution: {integrity: sha512-LeE9LS1IOIRDZy5Xugrbk2tKeMa64vkRODrXPZbwyn2l/Q0e/jyYq8ze/Lo96sjOFiRe3HHbTVN39Ta8KN2RpA==} - engines: {node: '>=4.0.0 || >=6.0.0'} - dev: false - - /vscode-jsonrpc/3.6.2: + /vscode-jsonrpc@3.6.2: resolution: {integrity: sha512-T24Jb5V48e4VgYliUXMnZ379ItbrXgOimweKaJshD84z+8q7ZOZjJan0MeDe+Ugb+uqERDVV8SBmemaGMSMugA==} engines: {node: '>=4.0.0 || >=6.0.0'} dev: false - /vscode-jsonrpc/6.0.0: + /vscode-jsonrpc@6.0.0: resolution: {integrity: sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==} engines: {node: '>=8.0.0 || >=10.0.0'} dev: false - /vscode-jsonrpc/8.0.2: - resolution: {integrity: sha512-RY7HwI/ydoC1Wwg4gJ3y6LpU9FJRZAUnTYMXthqhFXXu77ErDd/xkREpGuk4MyYkk4a+XDWAMqe0S3KkelYQEQ==} - engines: {node: '>=14.0.0'} - dev: false - - /vscode-jsonrpc/8.1.0: - resolution: {integrity: sha512-6TDy/abTQk+zDGYazgbIPc+4JoXdwC8NHU9Pbn4UJP1fehUyZmM4RHp5IthX7A6L5KS30PRui+j+tbbMMMafdw==} + /vscode-jsonrpc@8.2.0: + resolution: {integrity: sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==} engines: {node: '>=14.0.0'} dev: false - /vscode-languageserver-protocol/3.16.0: + /vscode-languageserver-protocol@3.16.0: resolution: {integrity: sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A==} dependencies: vscode-jsonrpc: 6.0.0 vscode-languageserver-types: 3.16.0 dev: false - /vscode-languageserver-protocol/3.17.2: - resolution: {integrity: sha512-8kYisQ3z/SQ2kyjlNeQxbkkTNmVFoQCqkmGrzLH6A9ecPlgTbp3wDTnUNqaUxYr4vlAcloxx8zwy7G5WdguYNg==} + /vscode-languageserver-protocol@3.17.5: + resolution: {integrity: sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==} dependencies: - vscode-jsonrpc: 8.0.2 - vscode-languageserver-types: 3.17.2 + vscode-jsonrpc: 8.2.0 + vscode-languageserver-types: 3.17.5 dev: false - /vscode-languageserver-protocol/3.17.3: - resolution: {integrity: sha512-924/h0AqsMtA5yK22GgMtCYiMdCOtWTSGgUOkgEDX+wk2b0x4sAfLiO4NxBxqbiVtz7K7/1/RgVrVI0NClZwqA==} - dependencies: - vscode-jsonrpc: 8.1.0 - vscode-languageserver-types: 3.17.3 - dev: false - - /vscode-languageserver-protocol/3.5.1: - resolution: {integrity: sha512-1fPDIwsAv1difCV+8daOrJEGunClNJWqnUHq/ncWrjhitKWXgGmRCjlwZ3gDUTt54yRcvXz1PXJDaRNvNH6pYA==} - dependencies: - vscode-jsonrpc: 3.5.0 - vscode-languageserver-types: 3.5.0 + /vscode-languageserver-textdocument@1.0.11: + resolution: {integrity: sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==} dev: false - /vscode-languageserver-textdocument/1.0.8: - resolution: {integrity: sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q==} - dev: false - - /vscode-languageserver-types/3.16.0: + /vscode-languageserver-types@3.16.0: resolution: {integrity: sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==} dev: false - /vscode-languageserver-types/3.17.2: - resolution: {integrity: sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA==} - dev: false - - /vscode-languageserver-types/3.17.3: - resolution: {integrity: sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==} + /vscode-languageserver-types@3.17.5: + resolution: {integrity: sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==} dev: false - /vscode-languageserver-types/3.5.0: - resolution: {integrity: sha512-D4rUfu/oKYdc9Tmec0nEfedj+uXO2tZHR+eoHs9rE9G/QpRyZaHuug8ZUNGTGdO+ALLGgenL6bRpY8y3J9acHg==} - dev: false - - /vscode-languageserver/3.5.1: - resolution: {integrity: sha512-RYUKn0DgHTFcS8kS4VaNCjNMaQXYqiXdN9bKrFjXzu5RPKfjIYcoh47oVWwZj4L3R/DPB0Se7HPaDatvYY2XgQ==} - hasBin: true - dependencies: - vscode-languageserver-protocol: 3.5.1 - vscode-uri: 1.0.8 - dev: false - - /vscode-languageserver/7.0.0: + /vscode-languageserver@7.0.0: resolution: {integrity: sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw==} hasBin: true dependencies: vscode-languageserver-protocol: 3.16.0 dev: false - /vscode-languageserver/8.0.2: - resolution: {integrity: sha512-bpEt2ggPxKzsAOZlXmCJ50bV7VrxwCS5BI4+egUmure/oI/t4OlFzi/YNtVvY24A2UDOZAgwFGgnZPwqSJubkA==} - hasBin: true - dependencies: - vscode-languageserver-protocol: 3.17.2 - dev: false - - /vscode-languageserver/8.1.0: - resolution: {integrity: sha512-eUt8f1z2N2IEUDBsKaNapkz7jl5QpskN2Y0G01T/ItMxBxw1fJwvtySGB9QMecatne8jFIWJGWI61dWjyTLQsw==} + /vscode-languageserver@9.0.1: + resolution: {integrity: sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==} hasBin: true dependencies: - vscode-languageserver-protocol: 3.17.3 - dev: false - - /vscode-uri/1.0.8: - resolution: {integrity: sha512-obtSWTlbJ+a+TFRYGaUumtVwb+InIUVI0Lu0VBUAPmj2cU5JutEXg3xUE0c2J5Tcy7h2DEKVJBFi+Y9ZSFzzPQ==} + vscode-languageserver-protocol: 3.17.5 dev: false - /walker/1.0.8: + /walker@1.0.8: resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} dependencies: makeerror: 1.0.12 dev: false - /watchpack/2.4.0: + /watchpack@2.4.0: resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==} engines: {node: '>=10.13.0'} dependencies: glob-to-regexp: 0.4.1 - graceful-fs: 4.2.10 + graceful-fs: 4.2.11 dev: false - /web-streams-polyfill/3.2.1: + /web-streams-polyfill@3.2.1: resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==} engines: {node: '>= 8'} dev: false - /webpack-cli/4.7.2_webpack@5.40.0: - resolution: {integrity: sha512-mEoLmnmOIZQNiRl0ebnjzQ74Hk0iKS5SiEEnpq3dRezoyR3yPaeQZCMCe+db4524pj1Pd5ghZXjT41KLzIhSLw==} - engines: {node: '>=10.13.0'} + /webidl-conversions@4.0.2: + resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} + dev: false + + /webpack-cli@5.1.4(webpack@5.89.0): + resolution: {integrity: sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==} + engines: {node: '>=14.15.0'} hasBin: true peerDependencies: '@webpack-cli/generators': '*' - '@webpack-cli/migrate': '*' - webpack: 4.x.x || 5.x.x + webpack: 5.x.x webpack-bundle-analyzer: '*' webpack-dev-server: '*' peerDependenciesMeta: '@webpack-cli/generators': optional: true - '@webpack-cli/migrate': - optional: true webpack-bundle-analyzer: optional: true webpack-dev-server: optional: true dependencies: '@discoveryjs/json-ext': 0.5.7 - '@webpack-cli/configtest': 1.2.0_webpack-cli@4.7.2+webpack@5.40.0 - '@webpack-cli/info': 1.5.0_webpack-cli@4.7.2 - '@webpack-cli/serve': 1.7.0_webpack-cli@4.7.2 - colorette: 1.4.0 - commander: 7.2.0 - execa: 5.1.1 + '@webpack-cli/configtest': 2.1.1(webpack-cli@5.1.4)(webpack@5.89.0) + '@webpack-cli/info': 2.0.2(webpack-cli@5.1.4)(webpack@5.89.0) + '@webpack-cli/serve': 2.0.5(webpack-cli@5.1.4)(webpack@5.89.0) + colorette: 2.0.20 + commander: 10.0.1 + cross-spawn: 7.0.3 + envinfo: 7.11.0 fastest-levenshtein: 1.0.16 import-local: 3.1.0 - interpret: 2.2.0 - rechoir: 0.7.1 - v8-compile-cache: 2.3.0 - webpack: 5.40.0_webpack-cli@4.7.2 - webpack-merge: 5.8.0 + interpret: 3.1.1 + rechoir: 0.8.0 + webpack: 5.89.0(webpack-cli@5.1.4) + webpack-merge: 5.10.0 dev: false - /webpack-merge/5.8.0: - resolution: {integrity: sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==} + /webpack-merge@5.10.0: + resolution: {integrity: sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==} engines: {node: '>=10.0.0'} dependencies: clone-deep: 4.0.1 - wildcard: 2.0.0 + flat: 5.0.2 + wildcard: 2.0.1 dev: false - /webpack-node-externals/3.0.0: + /webpack-node-externals@3.0.0: resolution: {integrity: sha512-LnL6Z3GGDPht/AigwRh2dvL9PQPFQ8skEpVrWZXLWBYmqcaojHNN0onvHzie6rq7EWKrrBfPYqNEzTJgiwEQDQ==} engines: {node: '>=6'} dev: false - /webpack-sources/2.3.1: - resolution: {integrity: sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA==} + /webpack-sources@3.2.3: + resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} engines: {node: '>=10.13.0'} - dependencies: - source-list-map: 2.0.1 - source-map: 0.6.1 dev: false - /webpack/5.40.0_webpack-cli@4.7.2: - resolution: {integrity: sha512-c7f5e/WWrxXWUzQqTBg54vBs5RgcAgpvKE4F4VegVgfo4x660ZxYUF2/hpMkZUnLjgytVTitjeXaN4IPlXCGIw==} + /webpack@5.89.0(webpack-cli@5.1.4): + resolution: {integrity: sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -7796,37 +8346,46 @@ packages: webpack-cli: optional: true dependencies: - '@types/eslint-scope': 3.7.4 - '@types/estree': 0.0.47 - '@webassemblyjs/ast': 1.11.0 - '@webassemblyjs/wasm-edit': 1.11.0 - '@webassemblyjs/wasm-parser': 1.11.0 - acorn: 8.8.2 - browserslist: 4.21.5 + '@types/eslint-scope': 3.7.7 + '@types/estree': 1.0.5 + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/wasm-edit': 1.11.6 + '@webassemblyjs/wasm-parser': 1.11.6 + acorn: 8.11.2 + acorn-import-assertions: 1.9.0(acorn@8.11.2) + browserslist: 4.22.1 chrome-trace-event: 1.0.3 - enhanced-resolve: 5.12.0 - es-module-lexer: 0.6.0 + enhanced-resolve: 5.15.0 + es-module-lexer: 1.4.1 eslint-scope: 5.1.1 events: 3.3.0 glob-to-regexp: 0.4.1 - graceful-fs: 4.2.10 - json-parse-better-errors: 1.0.2 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 loader-runner: 4.3.0 mime-types: 2.1.35 neo-async: 2.6.2 - schema-utils: 3.1.1 + schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.6_webpack@5.40.0 + terser-webpack-plugin: 5.3.9(webpack@5.89.0) watchpack: 2.4.0 - webpack-cli: 4.7.2_webpack@5.40.0 - webpack-sources: 2.3.1 + webpack-cli: 5.1.4(webpack@5.89.0) + webpack-sources: 3.2.3 transitivePeerDependencies: - '@swc/core' - esbuild - uglify-js dev: false - /which-boxed-primitive/1.0.2: + /whatwg-url@7.1.0: + resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} + dependencies: + lodash.sortby: 4.7.0 + tr46: 1.0.1 + webidl-conversions: 4.0.2 + dev: false + + /which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} dependencies: is-bigint: 1.0.4 @@ -7836,26 +8395,25 @@ packages: is-symbol: 1.0.4 dev: false - /which-typed-array/1.1.9: - resolution: {integrity: sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==} + /which-typed-array@1.1.13: + resolution: {integrity: sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==} engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 - call-bind: 1.0.2 + call-bind: 1.0.5 for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.0 - is-typed-array: 1.1.10 dev: false - /which/1.3.1: + /which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true dependencies: isexe: 2.0.0 dev: false - /which/2.0.2: + /which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} hasBin: true @@ -7863,47 +8421,44 @@ packages: isexe: 2.0.0 dev: false - /wide-align/1.1.5: - resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} + /which@4.0.0: + resolution: {integrity: sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==} + engines: {node: ^16.13.0 || >=18.0.0} + hasBin: true dependencies: - string-width: 1.0.2 + isexe: 3.1.1 dev: false - /wildcard/2.0.0: - resolution: {integrity: sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==} + /wildcard@2.0.1: + resolution: {integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==} dev: false - /winston-transport/4.5.0: - resolution: {integrity: sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==} - engines: {node: '>= 6.4.0'} + /winston-transport@4.6.0: + resolution: {integrity: sha512-wbBA9PbPAHxKiygo7ub7BYRiKxms0tpfU2ljtWzb3SjRjv5yl6Ozuy/TkXf00HTAt+Uylo3gSkNwzc4ME0wiIg==} + engines: {node: '>= 12.0.0'} dependencies: - logform: 2.5.1 - readable-stream: 3.6.0 - triple-beam: 1.3.0 + logform: 2.6.0 + readable-stream: 3.6.2 + triple-beam: 1.4.1 dev: false - /winston/3.7.2: + /winston@3.7.2: resolution: {integrity: sha512-QziIqtojHBoyzUOdQvQiar1DH0Xp9nF1A1y7NVy2DGEsz82SBDtOalS0ulTRGVT14xPX3WRWkCsdcJKqNflKng==} engines: {node: '>= 12.0.0'} dependencies: '@dabh/diagnostics': 2.0.3 - async: 3.2.4 + async: 3.2.5 is-stream: 2.0.1 - logform: 2.5.1 + logform: 2.6.0 one-time: 1.0.0 - readable-stream: 3.6.0 - safe-stable-stringify: 2.4.2 + readable-stream: 3.6.2 + safe-stable-stringify: 2.4.3 stack-trace: 0.0.10 - triple-beam: 1.3.0 - winston-transport: 4.5.0 - dev: false - - /word-wrap/1.2.3: - resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} - engines: {node: '>=0.10.0'} + triple-beam: 1.4.1 + winston-transport: 4.6.0 dev: false - /wrap-ansi/7.0.0: + /wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} dependencies: @@ -7912,11 +8467,20 @@ packages: strip-ansi: 6.0.1 dev: false - /wrappy/1.0.2: + /wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + dev: false + + /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: false - /write-file-atomic/4.0.2: + /write-file-atomic@4.0.2: resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} dependencies: @@ -7924,47 +8488,52 @@ packages: signal-exit: 3.0.7 dev: false - /xregexp/2.0.0: + /xregexp@2.0.0: resolution: {integrity: sha512-xl/50/Cf32VsGq/1R8jJE5ajH1yMCQkpmoS10QbFZWl2Oor4H0Me64Pu2yxvsRWK3m6soJbmGfzSR7BYmDcWAA==} dev: false - /xtend/4.0.2: + /xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} dev: false - /y18n/4.0.3: + /y18n@4.0.3: resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} dev: false - /y18n/5.0.8: + /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} dev: false - /yallist/3.1.1: + /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} dev: false - /yallist/4.0.0: + /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: false - /yaml-ast-parser/0.0.43: + /yaml-ast-parser@0.0.43: resolution: {integrity: sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==} dev: false - /yargs-parser/20.2.9: + /yaml@2.3.4: + resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} + engines: {node: '>= 14'} + dev: false + + /yargs-parser@20.2.9: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} dev: false - /yargs-parser/21.1.1: + /yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} dev: false - /yargs/17.2.1: + /yargs@17.2.1: resolution: {integrity: sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q==} engines: {node: '>=12'} dependencies: @@ -7977,7 +8546,7 @@ packages: yargs-parser: 20.2.9 dev: false - /yargs/17.3.1: + /yargs@17.3.1: resolution: {integrity: sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==} engines: {node: '>=12'} dependencies: @@ -7990,20 +8559,7 @@ packages: yargs-parser: 21.1.1 dev: false - /yargs/17.6.2: - resolution: {integrity: sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==} - engines: {node: '>=12'} - dependencies: - cliui: 8.0.1 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - dev: false - - /yargs/17.7.2: + /yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} dependencies: @@ -8016,25 +8572,25 @@ packages: yargs-parser: 21.1.1 dev: false - /yarn/1.22.17: + /yarn@1.22.17: resolution: {integrity: sha512-H0p241BXaH0UN9IeH//RT82tl5PfNraVpSpEoW+ET7lmopNC61eZ+A+IDvU8FM6Go5vx162SncDL8J1ZjRBriQ==} engines: {node: '>=4.0.0'} hasBin: true requiresBuild: true dev: false - /yn/3.1.1: + /yn@3.1.1: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} dev: false - /yocto-queue/0.1.0: + /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} dev: false - file:projects/autorest.tgz_ts-node@10.9.1: - resolution: {integrity: sha512-JmYLb1FbLy1RpH0j891Bf9JsvuEcYLmxq39jufhI3uloi7EbEBknINl/SNfkdEJT/wgIkdwTMWo+hNDDpnCt0w==, tarball: file:projects/autorest.tgz} + file:projects/autorest.tgz(ts-node@10.9.1): + resolution: {integrity: sha512-//2cS8XUIlZtOY1hMBA64LzgsIIzE8thwpL9ogDZS87akcJR0yaE0Eowjr/noJ1r5jbA5jqHKbCP/m934YXAcw==, tarball: file:projects/autorest.tgz} id: file:projects/autorest.tgz name: '@rush-temp/autorest' version: 0.0.0 @@ -8042,44 +8598,45 @@ packages: '@azure-tools/async-io': 3.0.254 '@azure-tools/tasks': 3.0.255 '@azure-tools/uri': 3.1.1 - '@types/commonmark': 0.27.5 - '@types/jest': 29.4.0 - '@types/node': 14.14.45 + '@types/commonmark': 0.27.9 + '@types/jest': 29.5.8 + '@types/node': 20.9.0 '@types/semver': 5.5.0 - '@types/source-map-support': 0.5.6 - '@types/webpack': 4.41.33 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 + '@types/source-map-support': 0.5.10 + '@types/webpack': 5.28.5(webpack-cli@5.1.4) + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) chalk: 4.1.2 - copy-webpack-plugin: 7.0.0_webpack@5.40.0 - cpy-cli: 4.1.0 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c - mkdirp: 0.5.6 - prettier: 2.7.1 - rimraf: 3.0.2 - safe-buffer: 5.2.0 - semver: 7.3.8 - source-map: 0.7.3 + copy-webpack-plugin: 11.0.0(webpack@5.89.0) + cpy-cli: 5.0.0 + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + mkdirp: 3.0.1 + prettier: 3.1.0 + rimraf: 5.0.5 + safe-buffer: 5.2.1 + semver: 7.5.4 + source-map: 0.8.0-beta.0 source-map-support: 0.5.21 - ts-jest: 29.0.5_jest@29.4.3+typescript@4.9.5 - ts-loader: 9.2.9_typescript@4.9.5+webpack@5.40.0 - typescript: 4.9.5 + ts-jest: 29.1.1(jest@29.7.0)(typescript@5.2.2) + ts-loader: 9.5.1(typescript@5.2.2)(webpack@5.89.0) + typescript: 5.2.2 untildify: 4.0.0 - webpack: 5.40.0_webpack-cli@4.7.2 - webpack-cli: 4.7.2_webpack@5.40.0 + webpack: 5.89.0(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.89.0) transitivePeerDependencies: - '@babel/core' - '@jest/types' - '@swc/core' + - '@types/eslint' - '@webpack-cli/generators' - - '@webpack-cli/migrate' - babel-jest + - babel-plugin-macros - esbuild - eslint-config-prettier - node-notifier @@ -8090,77 +8647,84 @@ packages: - webpack-dev-server dev: false - file:projects/cadl.tgz_ts-node@10.9.1+webpack@5.40.0: - resolution: {integrity: sha512-5gObkeyWZDGOeiYbS//1LEirRrWVXQDre3b3JGbA9hq+rCEFCxLZ3neL8IvVVkIpa/gKJSC6aSyIZXeOv2sDzA==, tarball: file:projects/cadl.tgz} + file:projects/cadl.tgz(ts-node@10.9.1)(webpack-cli@5.1.4)(webpack@5.89.0): + resolution: {integrity: sha512-zClz6G8DJm20ED8N5BqUOlY6BmWQgwH4/kCBVa0qqCyO1ygoyT5FIzWtexfstYdf9aeJ/d2Y8LfD97aDcwlJeg==, tarball: file:projects/cadl.tgz} id: file:projects/cadl.tgz name: '@rush-temp/cadl' version: 0.0.0 dependencies: '@cadl-lang/compiler': 0.37.0 - '@types/jest': 29.4.0 - '@types/lodash': 4.14.191 - '@types/node': 14.14.45 - '@types/source-map-support': 0.5.6 - '@types/webpack': 4.41.33 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 + '@types/jest': 29.5.8 + '@types/lodash': 4.14.201 + '@types/node': 20.9.0 + '@types/source-map-support': 0.5.10 + '@types/webpack': 5.28.5(webpack-cli@5.1.4) + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) chalk: 4.1.2 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) lodash: 4.17.21 - prettier: 2.7.1 - rimraf: 3.0.2 + prettier: 3.1.0 + rimraf: 5.0.5 source-map-support: 0.5.21 - ts-jest: 29.0.5_jest@29.4.3+typescript@4.9.5 - ts-loader: 9.2.9_typescript@4.9.5+webpack@5.40.0 - typescript: 4.9.5 + ts-jest: 29.1.1(jest@29.7.0)(typescript@5.2.2) + ts-loader: 9.5.1(typescript@5.2.2)(webpack@5.89.0) + typescript: 5.2.2 transitivePeerDependencies: - '@babel/core' - '@jest/types' + - '@swc/core' + - '@types/eslint' - babel-jest + - babel-plugin-macros - esbuild - eslint-config-prettier - node-notifier - supports-color - ts-node + - uglify-js - webpack + - webpack-cli dev: false - file:projects/codegen.tgz_prettier@2.7.1+ts-node@10.9.1: - resolution: {integrity: sha512-dhFQ3edn6Uuh05WJRhBkEFy3Db+Ne/T9uTwtOiPdNhS/+AhEvJRS/D/aJUYZb7Yl3loEb7uO+omhH/bpKDkfXg==, tarball: file:projects/codegen.tgz} + file:projects/codegen.tgz(prettier@3.1.0)(ts-node@10.9.1): + resolution: {integrity: sha512-3C8weoCa1kCOKeoOVrLzpSZo5dzm6rUBu6GpSekpssx7TPkHZP/9D2Zk7gaMX3IdLiJe9UHH8mMtNEUZM07QMQ==, tarball: file:projects/codegen.tgz} id: file:projects/codegen.tgz name: '@rush-temp/codegen' version: 0.0.0 dependencies: '@azure-tools/async-io': 3.0.254 - '@types/jest': 29.4.0 - '@types/js-yaml': 4.0.5 - '@types/node': 14.14.45 + '@types/jest': 29.5.8 + '@types/js-yaml': 4.0.9 + '@types/node': 20.9.0 '@types/semver': 5.5.0 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c - js-yaml: 4.0.0 - rimraf: 3.0.2 - semver: 7.3.8 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + js-yaml: 4.1.0 + rimraf: 5.0.5 + semver: 7.5.4 source-map-support: 0.5.21 - ts-jest: 29.0.5_jest@29.4.3+typescript@4.9.5 - typescript: 4.9.5 + ts-jest: 29.1.1(jest@29.7.0)(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - '@babel/core' - '@jest/types' + - '@types/eslint' - babel-jest + - babel-plugin-macros - esbuild - eslint-config-prettier - node-notifier @@ -8169,61 +8733,64 @@ packages: - ts-node dev: false - file:projects/codemodel.tgz_jest@29.4.3+prettier@2.7.1: - resolution: {integrity: sha512-5aBo6VUyEfR60IgtmCI7oPkbLgVyu/OGhWFBk6OABOBGZMehoYqQzMY72c3wdySiAFEMb4pubG8WeUJkA+bXmw==, tarball: file:projects/codemodel.tgz} + file:projects/codemodel.tgz(jest@29.7.0)(prettier@3.1.0): + resolution: {integrity: sha512-ASY+xTdclFU1Ky9fMU391OOmLODsCCuPT5k5lEb1GzuyIOjFhPVEXgkOFxbWmoAmB9Ux0dQ6liAbaGFKVqgUBw==, tarball: file:projects/codemodel.tgz} id: file:projects/codemodel.tgz name: '@rush-temp/codemodel' version: 0.0.0 dependencies: - '@types/js-yaml': 4.0.5 - '@types/node': 14.14.45 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 + '@types/js-yaml': 4.0.9 + '@types/node': 20.9.0 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) glob: 7.1.7 - js-yaml: 4.0.0 - rimraf: 3.0.2 + js-yaml: 4.1.0 + rimraf: 5.0.5 ts-morph: 13.0.3 - typescript: 4.9.5 + typescript: 5.2.2 typescript-json-schema: 0.53.1 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' + - '@types/eslint' - eslint-config-prettier - jest - prettier - supports-color dev: false - file:projects/common.tgz_prettier@2.7.1+ts-node@10.9.1: - resolution: {integrity: sha512-XNZ4HtoBcTHy6DvZIwAV20PQsdAwEvqfGa2FfOHVEQpXsl+G/mkqAcRGTqJuGa/StYA2idypivL+XlwoS0PDFg==, tarball: file:projects/common.tgz} + file:projects/common.tgz(prettier@3.1.0)(ts-node@10.9.1): + resolution: {integrity: sha512-hw8wXu5hGrWCxkbkvbzqFFl138zAYFjv+JaYp8LSGRDoJAkNQ0FLPdWMqzgPPL+ycMTXbVSl4Yrta5as23qyQg==, tarball: file:projects/common.tgz} id: file:projects/common.tgz name: '@rush-temp/common' version: 0.0.0 dependencies: - '@azure/logger': 1.0.3 + '@azure/logger': 1.0.4 '@types/cli-progress': 3.9.2 - '@types/jest': 29.4.0 - '@types/node': 14.14.45 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 + '@types/jest': 29.5.8 + '@types/node': 20.9.0 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) chalk: 4.1.2 cli-progress: 3.10.0 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c - rimraf: 3.0.2 - typescript: 4.9.5 + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + rimraf: 5.0.5 + typescript: 5.2.2 transitivePeerDependencies: + - '@types/eslint' + - babel-plugin-macros - eslint-config-prettier - node-notifier - prettier @@ -8231,42 +8798,45 @@ packages: - ts-node dev: false - file:projects/compare.tgz_prettier@2.7.1: - resolution: {integrity: sha512-4jcSkhDJ8HmedYOH/XcyXhYQ0OKLcXju5l78Qo1fZrdXAzuSPImvEBdL0Yj0CXdCSWET9Hi+I9w7oq2lOg6Alg==, tarball: file:projects/compare.tgz} + file:projects/compare.tgz(prettier@3.1.0): + resolution: {integrity: sha512-q4Lcg1gZwHEmhw7LpQn6ZYkLTNuhpC2jjXokGMdorhsufIhYea9fKOBUZblIBVuUm7K2oLkiuOvL3LtVEesIQQ==, tarball: file:projects/compare.tgz} id: file:projects/compare.tgz name: '@rush-temp/compare' version: 0.0.0 dependencies: - '@types/diff': 4.0.2 - '@types/jest': 29.4.0 - '@types/js-yaml': 4.0.5 - '@types/node': 14.14.45 - '@types/source-map-support': 0.5.6 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 + '@types/diff': 5.0.8 + '@types/jest': 29.5.8 + '@types/js-yaml': 4.0.9 + '@types/node': 20.9.0 + '@types/source-map-support': 0.5.10 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) chalk: 4.1.2 - diff: 4.0.2 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c - js-yaml: 4.0.0 + diff: 5.1.0 + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + js-yaml: 4.1.0 + node-gyp: 10.0.1 source-map-support: 0.5.21 - tree-sitter: 0.20.1 - tree-sitter-python: 0.20.1 - tree-sitter-typescript: 0.20.1 - ts-jest: 29.0.5_jest@29.4.3+typescript@4.9.5 - ts-node: 10.9.1_40e6fc09aee2c476d0f03e8841c5b8df - typescript: 4.9.5 + tree-sitter: 0.20.6 + tree-sitter-python: 0.20.4 + tree-sitter-typescript: 0.20.3 + ts-jest: 29.1.1(jest@29.7.0)(typescript@5.2.2) + ts-node: 10.9.1(@types/node@20.9.0)(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - '@babel/core' - '@jest/types' - '@swc/core' - '@swc/wasm' + - '@types/eslint' - babel-jest + - babel-plugin-macros - esbuild - eslint-config-prettier - node-notifier @@ -8274,37 +8844,39 @@ packages: - supports-color dev: false - file:projects/configuration.tgz_prettier@2.7.1+ts-node@10.9.1: - resolution: {integrity: sha512-VSqXD5vmFvoMgKneN94cR7P637fnHQPWQIj9v0AKWdOqOt1karT/bmLsM0AijWOzJyMyl1DH8Dnqws+vjXmiMA==, tarball: file:projects/configuration.tgz} + file:projects/configuration.tgz(prettier@3.1.0)(ts-node@10.9.1): + resolution: {integrity: sha512-pKbCnEi4Bt0ZQW7T1EOFeQ21RXoEUPLrPO43SyZchXAZ7CtOr78/Y6N6w6dCAH8tG7nEbiP1tNz5j9kX3bNuQw==, tarball: file:projects/configuration.tgz} id: file:projects/configuration.tgz name: '@rush-temp/configuration' version: 0.0.0 dependencies: '@azure-tools/async-io': 3.0.254 '@azure-tools/uri': 3.1.1 - '@types/commonmark': 0.27.5 - '@types/jest': 29.4.0 - '@types/lodash': 4.14.191 - '@types/node': 14.14.45 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 - commonmark: 0.27.0 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c + '@types/commonmark': 0.27.9 + '@types/jest': 29.5.8 + '@types/lodash': 4.14.201 + '@types/node': 20.9.0 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) + commonmark: 0.30.0 + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) lodash: 4.17.21 - rimraf: 3.0.2 - ts-jest: 29.0.5_jest@29.4.3+typescript@4.9.5 - typescript: 4.9.5 + rimraf: 5.0.5 + ts-jest: 29.1.1(jest@29.7.0)(typescript@5.2.2) + typescript: 5.2.2 untildify: 4.0.0 transitivePeerDependencies: - '@babel/core' - '@jest/types' + - '@types/eslint' - babel-jest + - babel-plugin-macros - esbuild - eslint-config-prettier - node-notifier @@ -8313,8 +8885,8 @@ packages: - ts-node dev: false - file:projects/core.tgz_ts-node@10.9.1: - resolution: {integrity: sha512-SaoEfX5yKkUIJLz3WECObKsWrtvl8vAodtRXgEHms0O61CYasUN3jzMZPamKViAg8rcSNslcs4A83cBLM64xKw==, tarball: file:projects/core.tgz} + file:projects/core.tgz(ts-node@10.9.1): + resolution: {integrity: sha512-66XZhmDflvAHVHJSkOiPqQxSjjPAAtn8Ko05fRe80dON8v4o9oI1jKKzV/gt4ActSWshXhsAwE26HKJ6kb1FGw==, tarball: file:projects/core.tgz} id: file:projects/core.tgz name: '@rush-temp/core' version: 0.0.0 @@ -8323,50 +8895,51 @@ packages: '@azure-tools/object-comparison': 3.0.253 '@azure-tools/tasks': 3.0.255 '@azure-tools/uri': 3.1.1 - '@types/commonmark': 0.27.5 - '@types/jest': 29.4.0 - '@types/lodash': 4.14.191 - '@types/node': 14.14.45 - '@types/webpack': 4.41.33 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 + '@types/commonmark': 0.27.9 + '@types/jest': 29.5.8 + '@types/lodash': 4.14.201 + '@types/node': 20.9.0 + '@types/webpack': 5.28.5(webpack-cli@5.1.4) + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) ajv: 8.12.0 - ajv-errors: 3.0.0_ajv@8.12.0 - ajv-formats: 2.1.1 - commonmark: 0.27.0 - compare-versions: 3.6.0 - copy-webpack-plugin: 7.0.0_webpack@5.40.0 - cpy-cli: 4.1.0 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c + ajv-errors: 3.0.0(ajv@8.12.0) + ajv-formats: 2.1.1(ajv@8.12.0) + commonmark: 0.30.0 + compare-versions: 6.1.0 + copy-webpack-plugin: 11.0.0(webpack@5.89.0) + cpy-cli: 5.0.0 + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) lodash: 4.17.21 - mkdirp: 0.5.6 - prettier: 2.7.1 - rimraf: 3.0.2 - safe-buffer: 5.2.0 - source-map: 0.7.3 + mkdirp: 3.0.1 + prettier: 3.1.0 + rimraf: 5.0.5 + safe-buffer: 5.2.1 + source-map: 0.8.0-beta.0 source-map-support: 0.5.21 - ts-jest: 29.0.5_jest@29.4.3+typescript@4.9.5 - ts-loader: 9.2.9_typescript@4.9.5+webpack@5.40.0 - typescript: 4.9.5 + ts-jest: 29.1.1(jest@29.7.0)(typescript@5.2.2) + ts-loader: 9.5.1(typescript@5.2.2)(webpack@5.89.0) + typescript: 5.2.2 vscode-jsonrpc: 3.6.2 - vscode-languageserver: 3.5.1 - webpack: 5.40.0_webpack-cli@4.7.2 - webpack-cli: 4.7.2_webpack@5.40.0 + vscode-languageserver: 9.0.1 + webpack: 5.89.0(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.89.0) webpack-node-externals: 3.0.0 yaml-ast-parser: 0.0.43 transitivePeerDependencies: - '@babel/core' - '@jest/types' - '@swc/core' + - '@types/eslint' - '@webpack-cli/generators' - - '@webpack-cli/migrate' - babel-jest + - babel-plugin-macros - esbuild - eslint-config-prettier - node-notifier @@ -8377,37 +8950,39 @@ packages: - webpack-dev-server dev: false - file:projects/datastore.tgz_prettier@2.7.1+ts-node@10.9.1: - resolution: {integrity: sha512-Q4CafVANlOz/ZYs+raiB2zrQ0Aa3HnU1w72xmshaVIb6tkP/Bfd26p6LJuNL/d/ibl6daAG4uFJF2B+vtko9Aw==, tarball: file:projects/datastore.tgz} + file:projects/datastore.tgz(prettier@3.1.0)(ts-node@10.9.1): + resolution: {integrity: sha512-M5aav5B4PoxJ442If4uWdaQEdn20hJFsnLRr/EBWshm9LPOVi1jHDrviGeaBxDXQ37q6eWdmuXiZoNVj8RKKFA==, tarball: file:projects/datastore.tgz} id: file:projects/datastore.tgz name: '@rush-temp/datastore' version: 0.0.0 dependencies: '@azure-tools/tasks': 3.0.255 '@azure-tools/uri': 3.1.1 - '@azure/logger': 1.0.3 - '@types/jest': 29.4.0 - '@types/lodash': 4.14.191 - '@types/node': 14.14.45 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c + '@azure/logger': 1.0.4 + '@types/jest': 29.5.8 + '@types/lodash': 4.14.201 + '@types/node': 20.9.0 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) jsonpath-plus: 6.0.1 lodash: 4.17.21 - rimraf: 3.0.2 - source-map: 0.7.3 - ts-jest: 29.0.5_jest@29.4.3+typescript@4.9.5 - typescript: 4.9.5 + rimraf: 5.0.5 + source-map: 0.8.0-beta.0 + ts-jest: 29.1.1(jest@29.7.0)(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - '@babel/core' - '@jest/types' + - '@types/eslint' - babel-jest + - babel-plugin-macros - esbuild - eslint-config-prettier - node-notifier @@ -8416,31 +8991,33 @@ packages: - ts-node dev: false - file:projects/deduplication.tgz_prettier@2.7.1+ts-node@10.9.1: - resolution: {integrity: sha512-wXEcEtG/T9l5afYXq2EdVoB6NUHqhszxO4/vZXdtqMcgLfE0iuSgaERGf2Hyg0xBvoGZGLpqdeCkQ6p03QNxdA==, tarball: file:projects/deduplication.tgz} + file:projects/deduplication.tgz(prettier@3.1.0)(ts-node@10.9.1): + resolution: {integrity: sha512-C7sZLOMnJOrOXyKrgIqKZfV4q1WgAjIRpQzKDKk9EMLgVfW4Cyg3RKRqLxa/kzNCn5e4RJS/n/CRFXRCTM1ztA==, tarball: file:projects/deduplication.tgz} id: file:projects/deduplication.tgz name: '@rush-temp/deduplication' version: 0.0.0 dependencies: '@azure-tools/object-comparison': 3.0.253 '@azure-tools/tasks': 3.0.255 - '@types/jest': 29.4.0 - '@types/lodash': 4.14.191 - '@types/node': 14.14.45 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 - compare-versions: 3.6.0 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c + '@types/jest': 29.5.8 + '@types/lodash': 4.14.201 + '@types/node': 20.9.0 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) + compare-versions: 6.1.0 + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) lodash: 4.17.21 - rimraf: 3.0.2 - typescript: 4.9.5 + rimraf: 5.0.5 + typescript: 5.2.2 transitivePeerDependencies: + - '@types/eslint' + - babel-plugin-macros - eslint-config-prettier - node-notifier - prettier @@ -8448,69 +9025,72 @@ packages: - ts-node dev: false - file:projects/extension-base.tgz_jest@29.4.3+prettier@2.7.1: - resolution: {integrity: sha512-X40X0wDqqM10Yd0gW3l5KoGy2V0h5m0q2SNYgrCobeKu+i9wCbrWZPIw31IklEiXmBsxWIqaP75fgvnn40dBlg==, tarball: file:projects/extension-base.tgz} + file:projects/extension-base.tgz(jest@29.7.0)(prettier@3.1.0): + resolution: {integrity: sha512-bFSZk4ikbJca2qQXA0t8K3+2MuTt00rYHQmNgw5bmCzkUsBF4kuYwL/JH4HWRf5osCpD3+DBQVPuchpUOftaPg==, tarball: file:projects/extension-base.tgz} id: file:projects/extension-base.tgz name: '@rush-temp/extension-base' version: 0.0.0 dependencies: - '@types/js-yaml': 4.0.5 - '@types/node': 14.14.45 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - js-yaml: 4.0.0 - rimraf: 3.0.2 - typescript: 4.9.5 + '@types/js-yaml': 4.0.9 + '@types/node': 20.9.0 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + js-yaml: 4.1.0 + rimraf: 5.0.5 + typescript: 5.2.2 vscode-jsonrpc: 3.6.2 transitivePeerDependencies: + - '@types/eslint' - eslint-config-prettier - jest - prettier - supports-color dev: false - file:projects/extension.tgz_prettier@2.7.1+ts-node@10.9.1: - resolution: {integrity: sha512-SKer+LzMY2+3cD2VAHN0PSEO27tvbGjr4KhvJc3Vdm8z1Mqigtl7pegNT6Bmzfu/1UXN7bnao6+Y65qZbwQwbg==, tarball: file:projects/extension.tgz} + file:projects/extension.tgz(prettier@3.1.0)(ts-node@10.9.1): + resolution: {integrity: sha512-w6Ml9a8PDSFkSOOC70NxDbURfUoJ4A+1dE1Fd1bFfrkd+pT+Udy+SuU6oAN9/l5lUBOHfvCyuNqxZ+jXpPfb8g==, tarball: file:projects/extension.tgz} id: file:projects/extension.tgz name: '@rush-temp/extension' version: 0.0.0 dependencies: '@azure-tools/async-io': 3.0.254 '@azure-tools/tasks': 3.0.255 - '@azure/logger': 1.0.3 - '@types/command-exists': 1.2.0 - '@types/jest': 29.4.0 - '@types/node': 14.14.45 - '@types/npm-package-arg': 6.1.1 + '@azure/logger': 1.0.4 + '@types/command-exists': 1.2.3 + '@types/jest': 29.5.8 + '@types/node': 20.9.0 + '@types/npm-package-arg': 6.1.4 '@types/pacote': 11.1.3 '@types/semver': 5.5.0 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) command-exists: 1.2.9 - cpy-cli: 4.1.0 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c - mkdirp: 0.5.6 + cpy-cli: 5.0.0 + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + mkdirp: 3.0.1 npm: 8.12.2 npm-package-arg: 9.1.2 pacote: 9.5.12 - rimraf: 3.0.2 - semver: 7.3.8 + rimraf: 5.0.5 + semver: 7.5.4 source-map-support: 0.5.21 - typescript: 4.9.5 + typescript: 5.2.2 yarn: 1.22.17 transitivePeerDependencies: + - '@types/eslint' + - babel-plugin-macros - eslint-config-prettier - node-notifier - prettier @@ -8518,41 +9098,43 @@ packages: - ts-node dev: false - file:projects/fixer.tgz_ts-node@10.9.1: - resolution: {integrity: sha512-M1ZzAx/OYOaNUlXVFyREeST2f8VnDwWgQVvm8toFPIiCFTZAdLeeUdgRsMhwf5nChSB8K1J8B7wchBUIb+eLSQ==, tarball: file:projects/fixer.tgz} + file:projects/fixer.tgz(ts-node@10.9.1): + resolution: {integrity: sha512-ZyqP7Gub1FyIjYmv7IBtE8jOfK/dp5fTUcRo5WjMCldnLJlqLvZrteccdnVqeKd+TRi3PDnanrW1k6z+CekfQw==, tarball: file:projects/fixer.tgz} id: file:projects/fixer.tgz name: '@rush-temp/fixer' version: 0.0.0 dependencies: '@types/glob': 7.2.0 - '@types/jest': 29.4.0 - '@types/js-yaml': 4.0.5 - '@types/lodash': 4.14.191 - '@types/node': 14.14.45 - '@types/yargs': 17.0.22 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 + '@types/jest': 29.5.8 + '@types/js-yaml': 4.0.9 + '@types/lodash': 4.14.201 + '@types/node': 20.9.0 + '@types/yargs': 17.0.31 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) chalk: 4.1.2 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) glob: 7.1.7 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) lodash: 4.17.21 - prettier: 2.7.1 - rimraf: 3.0.2 + prettier: 3.1.0 + rimraf: 5.0.5 source-map-support: 0.5.21 - ts-jest: 29.0.5_jest@29.4.3+typescript@4.9.5 - typescript: 4.9.5 + ts-jest: 29.1.1(jest@29.7.0)(typescript@5.2.2) + typescript: 5.2.2 winston: 3.7.2 yargs: 17.2.1 transitivePeerDependencies: - '@babel/core' - '@jest/types' + - '@types/eslint' - babel-jest + - babel-plugin-macros - esbuild - eslint-config-prettier - node-notifier @@ -8560,26 +9142,28 @@ packages: - ts-node dev: false - file:projects/json.tgz_prettier@2.7.1+ts-node@10.9.1: - resolution: {integrity: sha512-OgDZwUMO9HiawZc4EuANDskXreZejUmb+D/+8T2j4jxLD0KC4uemfhlSfqhaO7P44u1VLCHHe1+sLgI3ZqhNyg==, tarball: file:projects/json.tgz} + file:projects/json.tgz(prettier@3.1.0)(ts-node@10.9.1): + resolution: {integrity: sha512-TWVpPxmRslYdAtw0qUukBOH0VgsqWuIxh7p1KWAysUa5kQ1OhGT8XqG5+ADb70+RgXFbHGYYN9iqjOAapp4QMw==, tarball: file:projects/json.tgz} id: file:projects/json.tgz name: '@rush-temp/json' version: 0.0.0 dependencies: - '@types/jest': 29.4.0 - '@types/node': 14.14.45 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c - rimraf: 3.0.2 - typescript: 4.9.5 + '@types/jest': 29.5.8 + '@types/node': 20.9.0 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + rimraf: 5.0.5 + typescript: 5.2.2 transitivePeerDependencies: + - '@types/eslint' + - babel-plugin-macros - eslint-config-prettier - node-notifier - prettier @@ -8587,26 +9171,28 @@ packages: - ts-node dev: false - file:projects/jsonschema.tgz_prettier@2.7.1+ts-node@10.9.1: - resolution: {integrity: sha512-QM0ZYTN5eRjWteutD3ouuaW1knJyXOnbMQQNDRiw1GXMRIDAMYdtnPlIyTis0mNAwQ3N0GWlyAJurbr8QMZDEg==, tarball: file:projects/jsonschema.tgz} + file:projects/jsonschema.tgz(prettier@3.1.0)(ts-node@10.9.1): + resolution: {integrity: sha512-w+3HeMxVDFR0oXDmQegTFnxPoC15xfB20qKeGDyhs10ODDeBw3P5+sdokfFu/n/jzUWtyB71vrwaUOzxhr/fbA==, tarball: file:projects/jsonschema.tgz} id: file:projects/jsonschema.tgz name: '@rush-temp/jsonschema' version: 0.0.0 dependencies: - '@types/jest': 29.4.0 - '@types/node': 14.14.45 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c - rimraf: 3.0.2 - typescript: 4.9.5 + '@types/jest': 29.5.8 + '@types/node': 20.9.0 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + rimraf: 5.0.5 + typescript: 5.2.2 transitivePeerDependencies: + - '@types/eslint' + - babel-plugin-macros - eslint-config-prettier - node-notifier - prettier @@ -8614,8 +9200,8 @@ packages: - ts-node dev: false - file:projects/modelerfour.tgz_ts-node@10.9.1: - resolution: {integrity: sha512-QykURIe4BdoKPAeVLHsQTEUaB9DgMM877yCFpmbUDAhvDP4OCG2uWiSgYfuP4LFbfM/3uQEDFQMIRpHtssy6ug==, tarball: file:projects/modelerfour.tgz} + file:projects/modelerfour.tgz(ts-node@10.9.1): + resolution: {integrity: sha512-avJIx/dvoY5laH4G7kKOL/tWLKOhdoYJaOKa8IrCDlzIeqB6c5MiVphrd4X8bqkEhsFyKfEP76bjfPn8dAB/kg==, tarball: file:projects/modelerfour.tgz} id: file:projects/modelerfour.tgz name: '@rush-temp/modelerfour' version: 0.0.0 @@ -8623,37 +9209,38 @@ packages: '@azure-tools/async-io': 3.0.254 '@azure-tools/tasks': 3.0.255 '@azure-tools/uri': 3.1.1 - '@types/jest': 29.4.0 - '@types/lodash': 4.14.191 - '@types/node': 14.14.45 - '@types/webpack': 4.41.33 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 + '@types/jest': 29.5.8 + '@types/lodash': 4.14.201 + '@types/node': 20.9.0 + '@types/webpack': 5.28.5(webpack-cli@5.1.4) + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) chalk: 4.1.2 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) lodash: 4.17.21 - prettier: 2.7.1 + prettier: 3.1.0 recursive-diff: 1.0.9 - rimraf: 3.0.2 + rimraf: 5.0.5 source-map-support: 0.5.21 - ts-jest: 29.0.5_jest@29.4.3+typescript@4.9.5 - ts-loader: 9.2.9_typescript@4.9.5+webpack@5.40.0 - typescript: 4.9.5 - webpack: 5.40.0_webpack-cli@4.7.2 - webpack-cli: 4.7.2_webpack@5.40.0 + ts-jest: 29.1.1(jest@29.7.0)(typescript@5.2.2) + ts-loader: 9.5.1(typescript@5.2.2)(webpack@5.89.0) + typescript: 5.2.2 + webpack: 5.89.0(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.89.0) transitivePeerDependencies: - '@babel/core' - '@jest/types' - '@swc/core' + - '@types/eslint' - '@webpack-cli/generators' - - '@webpack-cli/migrate' - babel-jest + - babel-plugin-macros - esbuild - eslint-config-prettier - node-notifier @@ -8664,33 +9251,35 @@ packages: - webpack-dev-server dev: false - file:projects/oai2-to-oai3.tgz_prettier@2.7.1+ts-node@10.9.1: - resolution: {integrity: sha512-oVOWbuPAzCl6KRixmGuWyjS/qUUdv2aVaV4TzLLpmajUOoDu5hYnjI4TthmqeWnKJkp+P9fV+suPz8auYfJtcA==, tarball: file:projects/oai2-to-oai3.tgz} + file:projects/oai2-to-oai3.tgz(prettier@3.1.0)(ts-node@10.9.1): + resolution: {integrity: sha512-FXX8wdQFeEYc6Df0TNfmRiliQxQb7/yEHQ56wf04FBd6uAO2r4pwjkdm5QwzQYqJorTsW02es71rQnIqQwOyuQ==, tarball: file:projects/oai2-to-oai3.tgz} id: file:projects/oai2-to-oai3.tgz name: '@rush-temp/oai2-to-oai3' version: 0.0.0 dependencies: - '@types/jest': 29.4.0 - '@types/js-yaml': 4.0.5 - '@types/node': 14.14.45 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c - rimraf: 3.0.2 - source-map: 0.7.3 + '@types/jest': 29.5.8 + '@types/js-yaml': 4.0.9 + '@types/node': 20.9.0 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + rimraf: 5.0.5 + source-map: 0.8.0-beta.0 source-map-support: 0.5.21 - ts-jest: 29.0.5_jest@29.4.3+typescript@4.9.5 - typescript: 4.9.5 + ts-jest: 29.1.1(jest@29.7.0)(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - '@babel/core' - '@jest/types' + - '@types/eslint' - babel-jest + - babel-plugin-macros - esbuild - eslint-config-prettier - node-notifier @@ -8699,55 +9288,47 @@ packages: - ts-node dev: false - file:projects/openapi-to-cadl.tgz_jest@29.4.3: - resolution: {integrity: sha512-DfC8AqtjzW8J0cOsR6svMMPVePpLARFGZ/aZFy82AYsYahBB2TDfDMEPLc211PkE4Qgnibpi+TvnF3pqIf60jQ==, tarball: file:projects/openapi-to-cadl.tgz} + file:projects/openapi-to-cadl.tgz(jest@29.7.0): + resolution: {integrity: sha512-mQ276KY/jbYZ/ZkjE0APBuRjs+3XBu1zatcaAKBFhQkt1n6dM5AEuFDht6kkob1vn28RIT5jW/BSEmvL9q1HTQ==, tarball: file:projects/openapi-to-cadl.tgz} id: file:projects/openapi-to-cadl.tgz name: '@rush-temp/openapi-to-cadl' version: 0.0.0 dependencies: - '@azure-tools/cadl-autorest': 0.26.0_f5ff21551b215835b7e99a28886af080 - '@azure-tools/cadl-azure-core': 0.26.0_3be7190ba2f4450e60a8695259029fc7 - '@azure-tools/typespec-autorest': 0.30.1_91e9bc237b09edab58fb41bba362839f - '@azure-tools/typespec-azure-core': 0.30.1_b20eabafba7aacdb8b5d08356213191f - '@cadl-lang/compiler': 0.40.0 - '@cadl-lang/openapi': 0.11.0_3be7190ba2f4450e60a8695259029fc7 - '@cadl-lang/openapi3': 0.14.0_62b7473d9f647402d044da26a5647f70 - '@cadl-lang/prettier-plugin-cadl': 0.40.0 - '@cadl-lang/rest': 0.40.0_@cadl-lang+compiler@0.40.0 - '@cadl-lang/versioning': 0.40.0 + '@azure-tools/typespec-autorest': 0.36.1(@azure-tools/typespec-azure-core@0.36.0)(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.50.0)(@typespec/versioning@0.50.0) + '@azure-tools/typespec-azure-core': 0.36.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/rest@0.50.0) '@types/fs-extra': 9.0.13 - '@types/node': 14.14.45 - '@types/prettier': 2.7.2 - '@types/webpack': 4.41.33 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 - '@typespec/compiler': 0.44.0 - '@typespec/http': 0.44.0_@typespec+compiler@0.44.0 - '@typespec/openapi': 0.44.0_b20eabafba7aacdb8b5d08356213191f - '@typespec/openapi3': 0.44.0_056565a5c07ce759d753359b526dd68c - '@typespec/prettier-plugin-typespec': 0.44.0 - '@typespec/rest': 0.44.0_@typespec+compiler@0.44.0 - '@typespec/versioning': 0.44.0_@typespec+compiler@0.44.0 + '@types/node': 20.9.0 + '@types/prettier': 2.7.3 + '@types/webpack': 5.28.5(webpack-cli@5.1.4) + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) + '@typespec/compiler': 0.50.0 + '@typespec/http': 0.50.0(@typespec/compiler@0.50.0) + '@typespec/openapi': 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) + '@typespec/openapi3': 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/openapi@0.50.0)(@typespec/versioning@0.50.0) + '@typespec/prettier-plugin-typespec': 0.50.0 + '@typespec/rest': 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) + '@typespec/versioning': 0.50.0(@typespec/compiler@0.50.0) chalk: 4.1.2 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) fs-extra: 10.1.0 - prettier: 2.7.1 - rimraf: 3.0.2 - ts-loader: 9.2.9_typescript@4.9.5+webpack@5.40.0 - ts-node: 10.9.1_40e6fc09aee2c476d0f03e8841c5b8df - typescript: 4.9.5 - webpack: 5.40.0_webpack-cli@4.7.2 - webpack-cli: 4.7.2_webpack@5.40.0 + prettier: 3.1.0 + rimraf: 5.0.5 + ts-loader: 9.5.1(typescript@5.2.2)(webpack@5.89.0) + ts-node: 10.9.1(@types/node@20.9.0)(typescript@5.2.2) + typescript: 5.2.2 + webpack: 5.89.0(webpack-cli@5.1.4) + webpack-cli: 5.1.4(webpack@5.89.0) transitivePeerDependencies: - '@swc/core' - '@swc/wasm' + - '@types/eslint' - '@webpack-cli/generators' - - '@webpack-cli/migrate' - esbuild - eslint-config-prettier - jest @@ -8757,26 +9338,28 @@ packages: - webpack-dev-server dev: false - file:projects/openapi.tgz_prettier@2.7.1+ts-node@10.9.1: - resolution: {integrity: sha512-xeLqXeukQGP6AgTK5apSSTZnNyMo8WATtCGUpB7f+NBzIxghuMTpMnWjGR0OE4EvIV4bROREFg7kLiGWnx1atg==, tarball: file:projects/openapi.tgz} + file:projects/openapi.tgz(prettier@3.1.0)(ts-node@10.9.1): + resolution: {integrity: sha512-CJjM9GbxipbeBj7PK4i+9gUWQiOe+JMPScwuefNXAmraXg2vaj5WdsmZ11wpD5Gle2v+Wc6n7/QYclYH8HZ6mA==, tarball: file:projects/openapi.tgz} id: file:projects/openapi.tgz name: '@rush-temp/openapi' version: 0.0.0 dependencies: - '@types/jest': 29.4.0 - '@types/node': 14.14.45 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c - rimraf: 3.0.2 - typescript: 4.9.5 + '@types/jest': 29.5.8 + '@types/node': 20.9.0 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + rimraf: 5.0.5 + typescript: 5.2.2 transitivePeerDependencies: + - '@types/eslint' + - babel-plugin-macros - eslint-config-prettier - node-notifier - prettier @@ -8790,32 +9373,34 @@ packages: version: 0.0.0 dev: false - file:projects/system-requirements.tgz_prettier@2.7.1+ts-node@10.9.1: - resolution: {integrity: sha512-vFAjihFtLBsY7SEmx4OI1DvJxJI6xAeh36VWCkigtM0zIIwXRsWM0JXy84Bufv9mF8/TpveEntVhnJM+Z8MK1g==, tarball: file:projects/system-requirements.tgz} + file:projects/system-requirements.tgz(prettier@3.1.0)(ts-node@10.9.1): + resolution: {integrity: sha512-z9xJ+0SQtAhIFr9wve8giTZZxNxdWfI6JxRdXLqEpRLZHHakvBWugiaIe/sfMbYBz+2tFyvHVmI1g6MqA5w1EA==, tarball: file:projects/system-requirements.tgz} id: file:projects/system-requirements.tgz name: '@rush-temp/system-requirements' version: 0.0.0 dependencies: - '@azure/logger': 1.0.3 - '@types/command-exists': 1.2.0 - '@types/jest': 29.4.0 - '@types/node': 14.14.45 + '@azure/logger': 1.0.4 + '@types/command-exists': 1.2.3 + '@types/jest': 29.5.8 + '@types/node': 20.9.0 '@types/semver': 5.5.0 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) command-exists: 1.2.9 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c - rimraf: 3.0.2 - semver: 7.3.8 + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + rimraf: 5.0.5 + semver: 7.5.4 source-map-support: 0.5.21 - typescript: 4.9.5 + typescript: 5.2.2 transitivePeerDependencies: + - '@types/eslint' + - babel-plugin-macros - eslint-config-prettier - node-notifier - prettier @@ -8823,44 +9408,47 @@ packages: - ts-node dev: false - file:projects/test-public-packages.tgz_prettier@2.7.1: - resolution: {integrity: sha512-bQC8dkvolnkoj1Abm4COZoGOf+UR2qwOfnn2fZHUv0efQeXuAOKSrNRenRv52MIm52XfbuPRExqAxKjWoaKi1Q==, tarball: file:projects/test-public-packages.tgz} + file:projects/test-public-packages.tgz(prettier@3.1.0): + resolution: {integrity: sha512-cdNxs7HlLJjzoMTYPFkbt9bbZ+mYbfyy8QjXeTgdeYgOO+N2HR8Ivc218UbpTb8CzlVSB5qjPiGy+b+z1J+jaQ==, tarball: file:projects/test-public-packages.tgz} id: file:projects/test-public-packages.tgz name: '@rush-temp/test-public-packages' version: 0.0.0 dependencies: - '@types/node': 14.14.45 - '@types/source-map-support': 0.5.6 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - rimraf: 3.0.2 + '@types/node': 20.9.0 + '@types/source-map-support': 0.5.10 + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + rimraf: 5.0.5 source-map-support: 0.5.21 transitivePeerDependencies: + - '@types/eslint' - eslint-config-prettier - prettier - supports-color dev: false - file:projects/test-utils.tgz_1ebd90c6d335d7d97a346a0f4e26ad19: - resolution: {integrity: sha512-dzl0/s9lDZ7rFpACUtdVTjYSQJbsWlW4ZrFKC1QaxCBmH5kobH6J/8g8jSeNCaFLXUrmcaDAoLmgkTSJaXHGow==, tarball: file:projects/test-utils.tgz} + file:projects/test-utils.tgz(@types/node@20.9.0)(prettier@3.1.0)(ts-node@10.9.1): + resolution: {integrity: sha512-HiX3TvOnyb+o3lUEYJX/L7oe0aiqpw8LF8snHphbqXp4NQdbsXj9dnq7LqhKnQByUdLSN19l2OTALFrNRg+aPQ==, tarball: file:projects/test-utils.tgz} id: file:projects/test-utils.tgz name: '@rush-temp/test-utils' version: 0.0.0 dependencies: '@azure-tools/tasks': 3.0.255 - '@types/jest': 29.4.0 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 + '@types/jest': 29.5.8 + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) expect: 26.6.2 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) jest-snapshot: 26.6.2 - rimraf: 3.0.2 + rimraf: 5.0.5 transitivePeerDependencies: + - '@types/eslint' - '@types/node' + - babel-plugin-macros - eslint-config-prettier - node-notifier - prettier @@ -8868,31 +9456,33 @@ packages: - ts-node dev: false - file:projects/yaml.tgz_prettier@2.7.1+ts-node@10.9.1: - resolution: {integrity: sha512-W6B1Bq4tXAd9KMCXxOMvCAeTnl9JRCT2D91uxU5v40rh4FeOQiO4Buyfze9ryDGsuKxlFH0+9cSJbXiGe4IAOQ==, tarball: file:projects/yaml.tgz} + file:projects/yaml.tgz(prettier@3.1.0)(ts-node@10.9.1): + resolution: {integrity: sha512-BKdiJVcGwcy3siN8gBZEoV3uGhFsHHp2cz7xx1bhy7yUgO8mU1utB0CClwHw575UMrMfxJ/2/tOwWZZ6YRzNVA==, tarball: file:projects/yaml.tgz} id: file:projects/yaml.tgz name: '@rush-temp/yaml' version: 0.0.0 dependencies: - '@types/jest': 29.4.0 - '@types/js-yaml': 4.0.5 - '@types/lodash': 4.14.191 - '@types/node': 14.14.45 - '@typescript-eslint/eslint-plugin': 5.53.0_6e392fc05ec1bfc280bb1faf3c69c5ce - '@typescript-eslint/parser': 5.53.0_eslint@8.34.0+typescript@4.9.5 - eslint: 8.34.0 - eslint-plugin-import: 2.26.0_eslint@8.34.0 - eslint-plugin-jest: 27.1.7_82000cc1a3d3e332373f4ec375f6ab25 - eslint-plugin-node: 11.1.0_eslint@8.34.0 - eslint-plugin-prettier: 4.2.1_eslint@8.34.0+prettier@2.7.1 - eslint-plugin-unicorn: 44.0.2_eslint@8.34.0 - jest: 29.4.3_905ff7f381d7c2725cb1589b742e410c - js-yaml: 4.0.0 + '@types/jest': 29.5.8 + '@types/js-yaml': 4.0.9 + '@types/lodash': 4.14.201 + '@types/node': 20.9.0 + '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) + eslint: 8.53.0 + eslint-plugin-import: 2.29.0(eslint@8.53.0) + eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-node: 11.1.0(eslint@8.53.0) + eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) + jest: 29.7.0(@types/node@20.9.0)(ts-node@10.9.1) + js-yaml: 4.1.0 lodash: 4.17.21 - rimraf: 3.0.2 - typescript: 4.9.5 + rimraf: 5.0.5 + typescript: 5.2.2 yaml-ast-parser: 0.0.43 transitivePeerDependencies: + - '@types/eslint' + - babel-plugin-macros - eslint-config-prettier - node-notifier - prettier diff --git a/common/scripts/install-run-rush-pnpm.js b/common/scripts/install-run-rush-pnpm.js new file mode 100644 index 0000000000..72a7bfdf08 --- /dev/null +++ b/common/scripts/install-run-rush-pnpm.js @@ -0,0 +1,28 @@ +// THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED. +// +// This script is intended for usage in an automated build environment where the Rush command may not have +// been preinstalled, or may have an unpredictable version. This script will automatically install the version of Rush +// specified in the rush.json configuration file (if not already installed), and then pass a command-line to the +// rush-pnpm command. +// +// An example usage would be: +// +// node common/scripts/install-run-rush-pnpm.js pnpm-command +// +// For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ + +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +var __webpack_exports__ = {}; +/*!*****************************************************!*\ + !*** ./lib-esnext/scripts/install-run-rush-pnpm.js ***! + \*****************************************************/ + +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +require('./install-run-rush'); +//# sourceMappingURL=install-run-rush-pnpm.js.map +module.exports = __webpack_exports__; +/******/ })() +; +//# sourceMappingURL=install-run-rush-pnpm.js.map \ No newline at end of file diff --git a/common/scripts/install-run-rush.js b/common/scripts/install-run-rush.js index ff569fa92a..fe5101a2ad 100644 --- a/common/scripts/install-run-rush.js +++ b/common/scripts/install-run-rush.js @@ -1,30 +1,3 @@ -"use strict"; -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See the @microsoft/rush package's LICENSE file for license information. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); // THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED. // // This script is intended for usage in an automated build environment where the Rush command may not have @@ -35,21 +8,129 @@ Object.defineProperty(exports, "__esModule", { value: true }); // node common/scripts/install-run-rush.js install // // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ -const path = __importStar(require("path")); -const fs = __importStar(require("fs")); -const install_run_1 = require("./install-run"); + +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 657147: +/*!*********************!*\ + !*** external "fs" ***! + \*********************/ +/***/ ((module) => { + +module.exports = require("fs"); + +/***/ }), + +/***/ 371017: +/*!***********************!*\ + !*** external "path" ***! + \***********************/ +/***/ ((module) => { + +module.exports = require("path"); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +(() => { +/*!************************************************!*\ + !*** ./lib-esnext/scripts/install-run-rush.js ***! + \************************************************/ +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! path */ 371017); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs */ 657147); +/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__); +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +/* eslint-disable no-console */ + + +const { installAndRun, findRushJsonFolder, RUSH_JSON_FILENAME, runWithErrorAndStatusCode } = require('./install-run'); const PACKAGE_NAME = '@microsoft/rush'; const RUSH_PREVIEW_VERSION = 'RUSH_PREVIEW_VERSION'; +const INSTALL_RUN_RUSH_LOCKFILE_PATH_VARIABLE = 'INSTALL_RUN_RUSH_LOCKFILE_PATH'; function _getRushVersion(logger) { const rushPreviewVersion = process.env[RUSH_PREVIEW_VERSION]; if (rushPreviewVersion !== undefined) { logger.info(`Using Rush version from environment variable ${RUSH_PREVIEW_VERSION}=${rushPreviewVersion}`); return rushPreviewVersion; } - const rushJsonFolder = (0, install_run_1.findRushJsonFolder)(); - const rushJsonPath = path.join(rushJsonFolder, install_run_1.RUSH_JSON_FILENAME); + const rushJsonFolder = findRushJsonFolder(); + const rushJsonPath = path__WEBPACK_IMPORTED_MODULE_0__.join(rushJsonFolder, RUSH_JSON_FILENAME); try { - const rushJsonContents = fs.readFileSync(rushJsonPath, 'utf-8'); + const rushJsonContents = fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync(rushJsonPath, 'utf-8'); // Use a regular expression to parse out the rushVersion value because rush.json supports comments, // but JSON.parse does not and we don't want to pull in more dependencies than we need to in this script. const rushJsonMatches = rushJsonContents.match(/\"rushVersion\"\s*\:\s*\"([0-9a-zA-Z.+\-]+)\"/); @@ -61,12 +142,22 @@ function _getRushVersion(logger) { 'using an unexpected syntax.'); } } +function _getBin(scriptName) { + switch (scriptName.toLowerCase()) { + case 'install-run-rush-pnpm.js': + return 'rush-pnpm'; + case 'install-run-rushx.js': + return 'rushx'; + default: + return 'rush'; + } +} function _run() { const [nodePath /* Ex: /bin/node */, scriptPath /* /repo/common/scripts/install-run-rush.js */, ...packageBinArgs /* [build, --to, myproject] */] = process.argv; // Detect if this script was directly invoked, or if the install-run-rushx script was invokved to select the // appropriate binary inside the rush package to run - const scriptName = path.basename(scriptPath); - const bin = scriptName.toLowerCase() === 'install-run-rushx.js' ? 'rushx' : 'rush'; + const scriptName = path__WEBPACK_IMPORTED_MODULE_0__.basename(scriptPath); + const bin = _getBin(scriptName); if (!nodePath || !scriptPath) { throw new Error('Unexpected exception: could not detect node path or script path'); } @@ -93,7 +184,10 @@ function _run() { } if (!commandFound) { console.log(`Usage: ${scriptName} [args...]`); - if (scriptName === 'install-run-rush.js') { + if (scriptName === 'install-run-rush-pnpm.js') { + console.log(`Example: ${scriptName} pnpm-command`); + } + else if (scriptName === 'install-run-rush.js') { console.log(`Example: ${scriptName} build --to myproject`); } else { @@ -101,11 +195,21 @@ function _run() { } process.exit(1); } - (0, install_run_1.runWithErrorAndStatusCode)(logger, () => { + runWithErrorAndStatusCode(logger, () => { const version = _getRushVersion(logger); logger.info(`The rush.json configuration requests Rush version ${version}`); - return (0, install_run_1.installAndRun)(logger, PACKAGE_NAME, version, bin, packageBinArgs); + const lockFilePath = process.env[INSTALL_RUN_RUSH_LOCKFILE_PATH_VARIABLE]; + if (lockFilePath) { + logger.info(`Found ${INSTALL_RUN_RUSH_LOCKFILE_PATH_VARIABLE}="${lockFilePath}", installing with lockfile.`); + } + return installAndRun(logger, PACKAGE_NAME, version, bin, packageBinArgs, lockFilePath); }); } _run(); +//# sourceMappingURL=install-run-rush.js.map +})(); + +module.exports = __webpack_exports__; +/******/ })() +; //# sourceMappingURL=install-run-rush.js.map \ No newline at end of file diff --git a/common/scripts/install-run-rushx.js b/common/scripts/install-run-rushx.js index ddb229717c..0a0235f29a 100644 --- a/common/scripts/install-run-rushx.js +++ b/common/scripts/install-run-rushx.js @@ -1,18 +1,28 @@ -"use strict"; -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See the @microsoft/rush package's LICENSE file for license information. -Object.defineProperty(exports, "__esModule", { value: true }); -// THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED. -// -// This script is intended for usage in an automated build environment where the Rush command may not have -// been preinstalled, or may have an unpredictable version. This script will automatically install the version of Rush -// specified in the rush.json configuration file (if not already installed), and then pass a command-line to the -// rushx command. -// -// An example usage would be: -// -// node common/scripts/install-run-rushx.js custom-command -// -// For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ -require("./install-run-rush"); +// THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED. +// +// This script is intended for usage in an automated build environment where the Rush command may not have +// been preinstalled, or may have an unpredictable version. This script will automatically install the version of Rush +// specified in the rush.json configuration file (if not already installed), and then pass a command-line to the +// rushx command. +// +// An example usage would be: +// +// node common/scripts/install-run-rushx.js custom-command +// +// For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ + +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +var __webpack_exports__ = {}; +/*!*************************************************!*\ + !*** ./lib-esnext/scripts/install-run-rushx.js ***! + \*************************************************/ + +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +require('./install-run-rush'); +//# sourceMappingURL=install-run-rushx.js.map +module.exports = __webpack_exports__; +/******/ })() +; //# sourceMappingURL=install-run-rushx.js.map \ No newline at end of file diff --git a/common/scripts/install-run.js b/common/scripts/install-run.js index 208b99c83c..bf89cd2311 100644 --- a/common/scripts/install-run.js +++ b/common/scripts/install-run.js @@ -1,31 +1,3 @@ -"use strict"; -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See the @microsoft/rush package's LICENSE file for license information. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.runWithErrorAndStatusCode = exports.installAndRun = exports.findRushJsonFolder = exports.getNpmPath = exports.RUSH_JSON_FILENAME = void 0; // THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED. // // This script is intended for usage in an automated build environment where a Node tool may not have @@ -36,57 +8,46 @@ exports.runWithErrorAndStatusCode = exports.installAndRun = exports.findRushJson // node common/scripts/install-run.js qrcode@1.2.2 qrcode https://rushjs.io // // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ -const childProcess = __importStar(require("child_process")); -const fs = __importStar(require("fs")); -const os = __importStar(require("os")); -const path = __importStar(require("path")); -exports.RUSH_JSON_FILENAME = 'rush.json'; -const RUSH_TEMP_FOLDER_ENV_VARIABLE_NAME = 'RUSH_TEMP_FOLDER'; -const INSTALLED_FLAG_FILENAME = 'installed.flag'; -const NODE_MODULES_FOLDER_NAME = 'node_modules'; -const PACKAGE_JSON_FILENAME = 'package.json'; -/** - * Parse a package specifier (in the form of name\@version) into name and version parts. - */ -function _parsePackageSpecifier(rawPackageSpecifier) { - rawPackageSpecifier = (rawPackageSpecifier || '').trim(); - const separatorIndex = rawPackageSpecifier.lastIndexOf('@'); - let name; - let version = undefined; - if (separatorIndex === 0) { - // The specifier starts with a scope and doesn't have a version specified - name = rawPackageSpecifier; - } - else if (separatorIndex === -1) { - // The specifier doesn't have a version - name = rawPackageSpecifier; - } - else { - name = rawPackageSpecifier.substring(0, separatorIndex); - version = rawPackageSpecifier.substring(separatorIndex + 1); - } - if (!name) { - throw new Error(`Invalid package specifier: ${rawPackageSpecifier}`); - } - return { name, version }; -} + +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 679877: +/*!************************************************!*\ + !*** ./lib-esnext/utilities/npmrcUtilities.js ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "isVariableSetInNpmrcFile": () => (/* binding */ isVariableSetInNpmrcFile), +/* harmony export */ "syncNpmrc": () => (/* binding */ syncNpmrc) +/* harmony export */ }); +/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! fs */ 657147); +/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! path */ 371017); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__); +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +// IMPORTANT - do not use any non-built-in libraries in this file + + /** - * As a workaround, copyAndTrimNpmrcFile() copies the .npmrc file to the target folder, and also trims + * This function reads the content for given .npmrc file path, and also trims * unusable lines from the .npmrc file. * - * Why are we trimming the .npmrc lines? NPM allows environment variables to be specified in - * the .npmrc file to provide different authentication tokens for different registry. - * However, if the environment variable is undefined, it expands to an empty string, which - * produces a valid-looking mapping with an invalid URL that causes an error. Instead, - * we'd prefer to skip that line and continue looking in other places such as the user's - * home directory. - * - * IMPORTANT: THIS CODE SHOULD BE KEPT UP TO DATE WITH Utilities.copyAndTrimNpmrcFile() + * @returns + * The text of the the .npmrc. */ -function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) { - logger.info(`Transforming ${sourceNpmrcPath}`); // Verbose - logger.info(` --> "${targetNpmrcPath}"`); - let npmrcFileLines = fs.readFileSync(sourceNpmrcPath).toString().split('\n'); +// create a global _combinedNpmrc for cache purpose +const _combinedNpmrcMap = new Map(); +function _trimNpmrcFile(sourceNpmrcPath) { + const combinedNpmrcFromCache = _combinedNpmrcMap.get(sourceNpmrcPath); + if (combinedNpmrcFromCache !== undefined) { + return combinedNpmrcFromCache; + } + let npmrcFileLines = fs__WEBPACK_IMPORTED_MODULE_0__.readFileSync(sourceNpmrcPath).toString().split('\n'); npmrcFileLines = npmrcFileLines.map((line) => (line || '').trim()); const resultLines = []; // This finds environment variable tokens that look like "${VAR_NAME}" @@ -94,8 +55,13 @@ function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) { // Comment lines start with "#" or ";" const commentRegExp = /^\s*[#;]/; // Trim out lines that reference environment variables that aren't defined - for (const line of npmrcFileLines) { + for (let line of npmrcFileLines) { let lineShouldBeTrimmed = false; + //remove spaces before or after key and value + line = line + .split('=') + .map((lineToTrim) => lineToTrim.trim()) + .join('='); // Ignore comment lines if (!commentRegExp.test(line)) { const environmentVariables = line.match(expansionRegExp); @@ -121,31 +87,247 @@ function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) { resultLines.push(line); } } - fs.writeFileSync(targetNpmrcPath, resultLines.join(os.EOL)); + const combinedNpmrc = resultLines.join('\n'); + //save the cache + _combinedNpmrcMap.set(sourceNpmrcPath, combinedNpmrc); + return combinedNpmrc; +} +/** + * As a workaround, copyAndTrimNpmrcFile() copies the .npmrc file to the target folder, and also trims + * unusable lines from the .npmrc file. + * + * Why are we trimming the .npmrc lines? NPM allows environment variables to be specified in + * the .npmrc file to provide different authentication tokens for different registry. + * However, if the environment variable is undefined, it expands to an empty string, which + * produces a valid-looking mapping with an invalid URL that causes an error. Instead, + * we'd prefer to skip that line and continue looking in other places such as the user's + * home directory. + * + * @returns + * The text of the the .npmrc with lines containing undefined variables commented out. + */ +function _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath) { + logger.info(`Transforming ${sourceNpmrcPath}`); // Verbose + logger.info(` --> "${targetNpmrcPath}"`); + const combinedNpmrc = _trimNpmrcFile(sourceNpmrcPath); + fs__WEBPACK_IMPORTED_MODULE_0__.writeFileSync(targetNpmrcPath, combinedNpmrc); + return combinedNpmrc; } /** * syncNpmrc() copies the .npmrc file to the target folder, and also trims unusable lines from the .npmrc file. * If the source .npmrc file not exist, then syncNpmrc() will delete an .npmrc that is found in the target folder. * * IMPORTANT: THIS CODE SHOULD BE KEPT UP TO DATE WITH Utilities._syncNpmrc() + * + * @returns + * The text of the the synced .npmrc, if one exists. If one does not exist, then undefined is returned. */ -function _syncNpmrc(logger, sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish) { - const sourceNpmrcPath = path.join(sourceNpmrcFolder, !useNpmrcPublish ? '.npmrc' : '.npmrc-publish'); - const targetNpmrcPath = path.join(targetNpmrcFolder, '.npmrc'); +function syncNpmrc(sourceNpmrcFolder, targetNpmrcFolder, useNpmrcPublish, logger = { + // eslint-disable-next-line no-console + info: console.log, + // eslint-disable-next-line no-console + error: console.error +}) { + const sourceNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(sourceNpmrcFolder, !useNpmrcPublish ? '.npmrc' : '.npmrc-publish'); + const targetNpmrcPath = path__WEBPACK_IMPORTED_MODULE_1__.join(targetNpmrcFolder, '.npmrc'); try { - if (fs.existsSync(sourceNpmrcPath)) { - _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath); + if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) { + return _copyAndTrimNpmrcFile(logger, sourceNpmrcPath, targetNpmrcPath); } - else if (fs.existsSync(targetNpmrcPath)) { + else if (fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(targetNpmrcPath)) { // If the source .npmrc doesn't exist and there is one in the target, delete the one in the target logger.info(`Deleting ${targetNpmrcPath}`); // Verbose - fs.unlinkSync(targetNpmrcPath); + fs__WEBPACK_IMPORTED_MODULE_0__.unlinkSync(targetNpmrcPath); } } catch (e) { throw new Error(`Error syncing .npmrc file: ${e}`); } } +function isVariableSetInNpmrcFile(sourceNpmrcFolder, variableKey) { + const sourceNpmrcPath = `${sourceNpmrcFolder}/.npmrc`; + //if .npmrc file does not exist, return false directly + if (!fs__WEBPACK_IMPORTED_MODULE_0__.existsSync(sourceNpmrcPath)) { + return false; + } + const trimmedNpmrcFile = _trimNpmrcFile(sourceNpmrcPath); + const variableKeyRegExp = new RegExp(`^${variableKey}=`, 'm'); + return trimmedNpmrcFile.match(variableKeyRegExp) !== null; +} +//# sourceMappingURL=npmrcUtilities.js.map + +/***/ }), + +/***/ 532081: +/*!********************************!*\ + !*** external "child_process" ***! + \********************************/ +/***/ ((module) => { + +module.exports = require("child_process"); + +/***/ }), + +/***/ 657147: +/*!*********************!*\ + !*** external "fs" ***! + \*********************/ +/***/ ((module) => { + +module.exports = require("fs"); + +/***/ }), + +/***/ 822037: +/*!*********************!*\ + !*** external "os" ***! + \*********************/ +/***/ ((module) => { + +module.exports = require("os"); + +/***/ }), + +/***/ 371017: +/*!***********************!*\ + !*** external "path" ***! + \***********************/ +/***/ ((module) => { + +module.exports = require("path"); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +(() => { +/*!*******************************************!*\ + !*** ./lib-esnext/scripts/install-run.js ***! + \*******************************************/ +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "RUSH_JSON_FILENAME": () => (/* binding */ RUSH_JSON_FILENAME), +/* harmony export */ "findRushJsonFolder": () => (/* binding */ findRushJsonFolder), +/* harmony export */ "getNpmPath": () => (/* binding */ getNpmPath), +/* harmony export */ "installAndRun": () => (/* binding */ installAndRun), +/* harmony export */ "runWithErrorAndStatusCode": () => (/* binding */ runWithErrorAndStatusCode) +/* harmony export */ }); +/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! child_process */ 532081); +/* harmony import */ var child_process__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(child_process__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fs */ 657147); +/* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! os */ 822037); +/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(os__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! path */ 371017); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utilities/npmrcUtilities */ 679877); +// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. +// See LICENSE in the project root for license information. +/* eslint-disable no-console */ + + + + + +const RUSH_JSON_FILENAME = 'rush.json'; +const RUSH_TEMP_FOLDER_ENV_VARIABLE_NAME = 'RUSH_TEMP_FOLDER'; +const INSTALL_RUN_LOCKFILE_PATH_VARIABLE = 'INSTALL_RUN_LOCKFILE_PATH'; +const INSTALLED_FLAG_FILENAME = 'installed.flag'; +const NODE_MODULES_FOLDER_NAME = 'node_modules'; +const PACKAGE_JSON_FILENAME = 'package.json'; +/** + * Parse a package specifier (in the form of name\@version) into name and version parts. + */ +function _parsePackageSpecifier(rawPackageSpecifier) { + rawPackageSpecifier = (rawPackageSpecifier || '').trim(); + const separatorIndex = rawPackageSpecifier.lastIndexOf('@'); + let name; + let version = undefined; + if (separatorIndex === 0) { + // The specifier starts with a scope and doesn't have a version specified + name = rawPackageSpecifier; + } + else if (separatorIndex === -1) { + // The specifier doesn't have a version + name = rawPackageSpecifier; + } + else { + name = rawPackageSpecifier.substring(0, separatorIndex); + version = rawPackageSpecifier.substring(separatorIndex + 1); + } + if (!name) { + throw new Error(`Invalid package specifier: ${rawPackageSpecifier}`); + } + return { name, version }; +} let _npmPath = undefined; /** * Get the absolute path to the npm executable @@ -153,35 +335,34 @@ let _npmPath = undefined; function getNpmPath() { if (!_npmPath) { try { - if (os.platform() === 'win32') { + if (os__WEBPACK_IMPORTED_MODULE_2__.platform() === 'win32') { // We're on Windows - const whereOutput = childProcess.execSync('where npm', { stdio: [] }).toString(); - const lines = whereOutput.split(os.EOL).filter((line) => !!line); + const whereOutput = child_process__WEBPACK_IMPORTED_MODULE_0__.execSync('where npm', { stdio: [] }).toString(); + const lines = whereOutput.split(os__WEBPACK_IMPORTED_MODULE_2__.EOL).filter((line) => !!line); // take the last result, we are looking for a .cmd command // see https://github.com/microsoft/rushstack/issues/759 _npmPath = lines[lines.length - 1]; } else { // We aren't on Windows - assume we're on *NIX or Darwin - _npmPath = childProcess.execSync('command -v npm', { stdio: [] }).toString(); + _npmPath = child_process__WEBPACK_IMPORTED_MODULE_0__.execSync('command -v npm', { stdio: [] }).toString(); } } catch (e) { throw new Error(`Unable to determine the path to the NPM tool: ${e}`); } _npmPath = _npmPath.trim(); - if (!fs.existsSync(_npmPath)) { + if (!fs__WEBPACK_IMPORTED_MODULE_1__.existsSync(_npmPath)) { throw new Error('The NPM executable does not exist'); } } return _npmPath; } -exports.getNpmPath = getNpmPath; function _ensureFolder(folderPath) { - if (!fs.existsSync(folderPath)) { - const parentDir = path.dirname(folderPath); + if (!fs__WEBPACK_IMPORTED_MODULE_1__.existsSync(folderPath)) { + const parentDir = path__WEBPACK_IMPORTED_MODULE_3__.dirname(folderPath); _ensureFolder(parentDir); - fs.mkdirSync(folderPath); + fs__WEBPACK_IMPORTED_MODULE_1__.mkdirSync(folderPath); } } /** @@ -195,14 +376,14 @@ function _ensureAndJoinPath(baseFolder, ...pathSegments) { try { for (let pathSegment of pathSegments) { pathSegment = pathSegment.replace(/[\\\/]/g, '+'); - joinedPath = path.join(joinedPath, pathSegment); - if (!fs.existsSync(joinedPath)) { - fs.mkdirSync(joinedPath); + joinedPath = path__WEBPACK_IMPORTED_MODULE_3__.join(joinedPath, pathSegment); + if (!fs__WEBPACK_IMPORTED_MODULE_1__.existsSync(joinedPath)) { + fs__WEBPACK_IMPORTED_MODULE_1__.mkdirSync(joinedPath); } } } catch (e) { - throw new Error(`Error building local installation folder (${path.join(baseFolder, ...pathSegments)}): ${e}`); + throw new Error(`Error building local installation folder (${path__WEBPACK_IMPORTED_MODULE_3__.join(baseFolder, ...pathSegments)}): ${e}`); } return joinedPath; } @@ -216,6 +397,23 @@ function _getRushTempFolder(rushCommonFolder) { return _ensureAndJoinPath(rushCommonFolder, 'temp'); } } +/** + * Compare version strings according to semantic versioning. + * Returns a positive integer if "a" is a later version than "b", + * a negative integer if "b" is later than "a", + * and 0 otherwise. + */ +function _compareVersionStrings(a, b) { + const aParts = a.split(/[.-]/); + const bParts = b.split(/[.-]/); + const numberOfParts = Math.max(aParts.length, bParts.length); + for (let i = 0; i < numberOfParts; i++) { + if (aParts[i] !== bParts[i]) { + return (Number(aParts[i]) || 0) - (Number(bParts[i]) || 0); + } + } + return 0; +} /** * Resolve a package specifier to a static version */ @@ -232,16 +430,27 @@ function _resolvePackageVersion(logger, rushCommonFolder, { name, version }) { // version resolves to try { const rushTempFolder = _getRushTempFolder(rushCommonFolder); - const sourceNpmrcFolder = path.join(rushCommonFolder, 'config', 'rush'); - _syncNpmrc(logger, sourceNpmrcFolder, rushTempFolder); + const sourceNpmrcFolder = path__WEBPACK_IMPORTED_MODULE_3__.join(rushCommonFolder, 'config', 'rush'); + (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)(sourceNpmrcFolder, rushTempFolder, undefined, logger); const npmPath = getNpmPath(); // This returns something that looks like: - // @microsoft/rush@3.0.0 '3.0.0' - // @microsoft/rush@3.0.1 '3.0.1' - // ... - // @microsoft/rush@3.0.20 '3.0.20' - // - const npmVersionSpawnResult = childProcess.spawnSync(npmPath, ['view', `${name}@${version}`, 'version', '--no-update-notifier'], { + // ``` + // [ + // "3.0.0", + // "3.0.1", + // ... + // "3.0.20" + // ] + // ``` + // + // if multiple versions match the selector, or + // + // ``` + // "3.0.0" + // ``` + // + // if only a single version matches. + const npmVersionSpawnResult = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(npmPath, ['view', `${name}@${version}`, 'version', '--no-update-notifier', '--json'], { cwd: rushTempFolder, stdio: [] }); @@ -249,16 +458,21 @@ function _resolvePackageVersion(logger, rushCommonFolder, { name, version }) { throw new Error(`"npm view" returned error code ${npmVersionSpawnResult.status}`); } const npmViewVersionOutput = npmVersionSpawnResult.stdout.toString(); - const versionLines = npmViewVersionOutput.split('\n').filter((line) => !!line); - const latestVersion = versionLines[versionLines.length - 1]; + const parsedVersionOutput = JSON.parse(npmViewVersionOutput); + const versions = Array.isArray(parsedVersionOutput) + ? parsedVersionOutput + : [parsedVersionOutput]; + let latestVersion = versions[0]; + for (let i = 1; i < versions.length; i++) { + const latestVersionCandidate = versions[i]; + if (_compareVersionStrings(latestVersionCandidate, latestVersion) > 0) { + latestVersion = latestVersionCandidate; + } + } if (!latestVersion) { throw new Error('No versions found for the specified version range.'); } - const versionMatches = latestVersion.match(/^.+\s\'(.+)\'$/); - if (!versionMatches) { - throw new Error(`Invalid npm output ${latestVersion}`); - } - return versionMatches[1]; + return latestVersion; } catch (e) { throw new Error(`Unable to resolve version ${version} of package ${name}: ${e}`); @@ -274,58 +488,72 @@ function findRushJsonFolder() { let basePath = __dirname; let tempPath = __dirname; do { - const testRushJsonPath = path.join(basePath, exports.RUSH_JSON_FILENAME); - if (fs.existsSync(testRushJsonPath)) { + const testRushJsonPath = path__WEBPACK_IMPORTED_MODULE_3__.join(basePath, RUSH_JSON_FILENAME); + if (fs__WEBPACK_IMPORTED_MODULE_1__.existsSync(testRushJsonPath)) { _rushJsonFolder = basePath; break; } else { basePath = tempPath; } - } while (basePath !== (tempPath = path.dirname(basePath))); // Exit the loop when we hit the disk root + } while (basePath !== (tempPath = path__WEBPACK_IMPORTED_MODULE_3__.dirname(basePath))); // Exit the loop when we hit the disk root if (!_rushJsonFolder) { throw new Error('Unable to find rush.json.'); } } return _rushJsonFolder; } -exports.findRushJsonFolder = findRushJsonFolder; /** * Detects if the package in the specified directory is installed */ function _isPackageAlreadyInstalled(packageInstallFolder) { try { - const flagFilePath = path.join(packageInstallFolder, INSTALLED_FLAG_FILENAME); - if (!fs.existsSync(flagFilePath)) { + const flagFilePath = path__WEBPACK_IMPORTED_MODULE_3__.join(packageInstallFolder, INSTALLED_FLAG_FILENAME); + if (!fs__WEBPACK_IMPORTED_MODULE_1__.existsSync(flagFilePath)) { return false; } - const fileContents = fs.readFileSync(flagFilePath).toString(); + const fileContents = fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync(flagFilePath).toString(); return fileContents.trim() === process.version; } catch (e) { return false; } } +/** + * Delete a file. Fail silently if it does not exist. + */ +function _deleteFile(file) { + try { + fs__WEBPACK_IMPORTED_MODULE_1__.unlinkSync(file); + } + catch (err) { + if (err.code !== 'ENOENT' && err.code !== 'ENOTDIR') { + throw err; + } + } +} /** * Removes the following files and directories under the specified folder path: * - installed.flag * - * - node_modules */ -function _cleanInstallFolder(rushTempFolder, packageInstallFolder) { +function _cleanInstallFolder(rushTempFolder, packageInstallFolder, lockFilePath) { try { - const flagFile = path.resolve(packageInstallFolder, INSTALLED_FLAG_FILENAME); - if (fs.existsSync(flagFile)) { - fs.unlinkSync(flagFile); + const flagFile = path__WEBPACK_IMPORTED_MODULE_3__.resolve(packageInstallFolder, INSTALLED_FLAG_FILENAME); + _deleteFile(flagFile); + const packageLockFile = path__WEBPACK_IMPORTED_MODULE_3__.resolve(packageInstallFolder, 'package-lock.json'); + if (lockFilePath) { + fs__WEBPACK_IMPORTED_MODULE_1__.copyFileSync(lockFilePath, packageLockFile); } - const packageLockFile = path.resolve(packageInstallFolder, 'package-lock.json'); - if (fs.existsSync(packageLockFile)) { - fs.unlinkSync(packageLockFile); - } - const nodeModulesFolder = path.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME); - if (fs.existsSync(nodeModulesFolder)) { - const rushRecyclerFolder = _ensureAndJoinPath(rushTempFolder, 'rush-recycler'); - fs.renameSync(nodeModulesFolder, path.join(rushRecyclerFolder, `install-run-${Date.now().toString()}`)); + else { + // Not running `npm ci`, so need to cleanup + _deleteFile(packageLockFile); + const nodeModulesFolder = path__WEBPACK_IMPORTED_MODULE_3__.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME); + if (fs__WEBPACK_IMPORTED_MODULE_1__.existsSync(nodeModulesFolder)) { + const rushRecyclerFolder = _ensureAndJoinPath(rushTempFolder, 'rush-recycler'); + fs__WEBPACK_IMPORTED_MODULE_1__.renameSync(nodeModulesFolder, path__WEBPACK_IMPORTED_MODULE_3__.join(rushRecyclerFolder, `install-run-${Date.now().toString()}`)); + } } } catch (e) { @@ -344,8 +572,8 @@ function _createPackageJson(packageInstallFolder, name, version) { repository: "DON'T WARN", license: 'MIT' }; - const packageJsonPath = path.join(packageInstallFolder, PACKAGE_JSON_FILENAME); - fs.writeFileSync(packageJsonPath, JSON.stringify(packageJsonContents, undefined, 2)); + const packageJsonPath = path__WEBPACK_IMPORTED_MODULE_3__.join(packageInstallFolder, PACKAGE_JSON_FILENAME); + fs__WEBPACK_IMPORTED_MODULE_1__.writeFileSync(packageJsonPath, JSON.stringify(packageJsonContents, undefined, 2)); } catch (e) { throw new Error(`Unable to create package.json: ${e}`); @@ -354,17 +582,17 @@ function _createPackageJson(packageInstallFolder, name, version) { /** * Run "npm install" in the package install folder. */ -function _installPackage(logger, packageInstallFolder, name, version) { +function _installPackage(logger, packageInstallFolder, name, version, command) { try { logger.info(`Installing ${name}...`); const npmPath = getNpmPath(); - const result = childProcess.spawnSync(npmPath, ['install'], { + const result = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(npmPath, [command], { stdio: 'inherit', cwd: packageInstallFolder, env: process.env }); if (result.status !== 0) { - throw new Error('"npm install" encountered an error'); + throw new Error(`"npm ${command}" encountered an error`); } logger.info(`Successfully installed ${name}@${version}`); } @@ -376,41 +604,42 @@ function _installPackage(logger, packageInstallFolder, name, version) { * Get the ".bin" path for the package. */ function _getBinPath(packageInstallFolder, binName) { - const binFolderPath = path.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME, '.bin'); - const resolvedBinName = os.platform() === 'win32' ? `${binName}.cmd` : binName; - return path.resolve(binFolderPath, resolvedBinName); + const binFolderPath = path__WEBPACK_IMPORTED_MODULE_3__.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME, '.bin'); + const resolvedBinName = os__WEBPACK_IMPORTED_MODULE_2__.platform() === 'win32' ? `${binName}.cmd` : binName; + return path__WEBPACK_IMPORTED_MODULE_3__.resolve(binFolderPath, resolvedBinName); } /** * Write a flag file to the package's install directory, signifying that the install was successful. */ function _writeFlagFile(packageInstallFolder) { try { - const flagFilePath = path.join(packageInstallFolder, INSTALLED_FLAG_FILENAME); - fs.writeFileSync(flagFilePath, process.version); + const flagFilePath = path__WEBPACK_IMPORTED_MODULE_3__.join(packageInstallFolder, INSTALLED_FLAG_FILENAME); + fs__WEBPACK_IMPORTED_MODULE_1__.writeFileSync(flagFilePath, process.version); } catch (e) { throw new Error(`Unable to create installed.flag file in ${packageInstallFolder}`); } } -function installAndRun(logger, packageName, packageVersion, packageBinName, packageBinArgs) { +function installAndRun(logger, packageName, packageVersion, packageBinName, packageBinArgs, lockFilePath = process.env[INSTALL_RUN_LOCKFILE_PATH_VARIABLE]) { const rushJsonFolder = findRushJsonFolder(); - const rushCommonFolder = path.join(rushJsonFolder, 'common'); + const rushCommonFolder = path__WEBPACK_IMPORTED_MODULE_3__.join(rushJsonFolder, 'common'); const rushTempFolder = _getRushTempFolder(rushCommonFolder); const packageInstallFolder = _ensureAndJoinPath(rushTempFolder, 'install-run', `${packageName}@${packageVersion}`); if (!_isPackageAlreadyInstalled(packageInstallFolder)) { // The package isn't already installed - _cleanInstallFolder(rushTempFolder, packageInstallFolder); - const sourceNpmrcFolder = path.join(rushCommonFolder, 'config', 'rush'); - _syncNpmrc(logger, sourceNpmrcFolder, packageInstallFolder); + _cleanInstallFolder(rushTempFolder, packageInstallFolder, lockFilePath); + const sourceNpmrcFolder = path__WEBPACK_IMPORTED_MODULE_3__.join(rushCommonFolder, 'config', 'rush'); + (0,_utilities_npmrcUtilities__WEBPACK_IMPORTED_MODULE_4__.syncNpmrc)(sourceNpmrcFolder, packageInstallFolder, undefined, logger); _createPackageJson(packageInstallFolder, packageName, packageVersion); - _installPackage(logger, packageInstallFolder, packageName, packageVersion); + const command = lockFilePath ? 'ci' : 'install'; + _installPackage(logger, packageInstallFolder, packageName, packageVersion, command); _writeFlagFile(packageInstallFolder); } const statusMessage = `Invoking "${packageBinName} ${packageBinArgs.join(' ')}"`; const statusMessageLine = new Array(statusMessage.length + 1).join('-'); - logger.info(os.EOL + statusMessage + os.EOL + statusMessageLine + os.EOL); + logger.info('\n' + statusMessage + '\n' + statusMessageLine + '\n'); const binPath = _getBinPath(packageInstallFolder, packageBinName); - const binFolderPath = path.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME, '.bin'); + const binFolderPath = path__WEBPACK_IMPORTED_MODULE_3__.resolve(packageInstallFolder, NODE_MODULES_FOLDER_NAME, '.bin'); // Windows environment variables are case-insensitive. Instead of using SpawnSyncOptions.env, we need to // assign via the process.env proxy to ensure that we append to the right PATH key. const originalEnvPath = process.env.PATH || ''; @@ -418,10 +647,10 @@ function installAndRun(logger, packageName, packageVersion, packageBinName, pack try { // Node.js on Windows can not spawn a file when the path has a space on it // unless the path gets wrapped in a cmd friendly way and shell mode is used - const shouldUseShell = binPath.includes(' ') && os.platform() === 'win32'; + const shouldUseShell = binPath.includes(' ') && os__WEBPACK_IMPORTED_MODULE_2__.platform() === 'win32'; const platformBinPath = shouldUseShell ? `"${binPath}"` : binPath; - process.env.PATH = [binFolderPath, originalEnvPath].join(path.delimiter); - result = childProcess.spawnSync(platformBinPath, packageBinArgs, { + process.env.PATH = [binFolderPath, originalEnvPath].join(path__WEBPACK_IMPORTED_MODULE_3__.delimiter); + result = child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync(platformBinPath, packageBinArgs, { stdio: 'inherit', windowsVerbatimArguments: false, shell: shouldUseShell, @@ -439,7 +668,6 @@ function installAndRun(logger, packageName, packageVersion, packageBinName, pack throw result.error || new Error('An unknown error occurred.'); } } -exports.installAndRun = installAndRun; function runWithErrorAndStatusCode(logger, fn) { process.exitCode = 1; try { @@ -447,16 +675,15 @@ function runWithErrorAndStatusCode(logger, fn) { process.exitCode = exitCode; } catch (e) { - logger.error(os.EOL + os.EOL + e.toString() + os.EOL + os.EOL); + logger.error('\n\n' + e.toString() + '\n\n'); } } -exports.runWithErrorAndStatusCode = runWithErrorAndStatusCode; function _run() { const [nodePath /* Ex: /bin/node */, scriptPath /* /repo/common/scripts/install-run-rush.js */, rawPackageSpecifier /* qrcode@^1.2.0 */, packageBinName /* qrcode */, ...packageBinArgs /* [-f, myproject/lib] */] = process.argv; if (!nodePath) { throw new Error('Unexpected exception: could not detect node path'); } - if (path.basename(scriptPath).toLowerCase() !== 'install-run.js') { + if (path__WEBPACK_IMPORTED_MODULE_3__.basename(scriptPath).toLowerCase() !== 'install-run.js') { // If install-run.js wasn't directly invoked, don't execute the rest of this function. Return control // to the script that (presumably) imported this file return; @@ -480,4 +707,10 @@ function _run() { }); } _run(); +//# sourceMappingURL=install-run.js.map +})(); + +module.exports = __webpack_exports__; +/******/ })() +; //# sourceMappingURL=install-run.js.map \ No newline at end of file diff --git a/cspell.yaml b/cspell.yaml index 50ee51f466..dddfc70877 100644 --- a/cspell.yaml +++ b/cspell.yaml @@ -8,4 +8,5 @@ words: - arrayify - autorest - codemodel + - Deduplicator - yada diff --git a/eng/pipelines/ci.yaml b/eng/pipelines/ci.yaml index 3efaaba369..fa8ddd39fb 100644 --- a/eng/pipelines/ci.yaml +++ b/eng/pipelines/ci.yaml @@ -66,18 +66,14 @@ stages: displayName: Regression Tests dependsOn: main jobs: - - template: ./templates/regression-tests.yaml - parameters: - name: node14 - nodeVersion: 14.x - - template: ./templates/regression-tests.yaml - parameters: - name: node16 - nodeVersion: 16.x - template: ./templates/regression-tests.yaml parameters: name: node18 nodeVersion: 18.x + - template: ./templates/regression-tests.yaml + parameters: + name: node20 + nodeVersion: 20.x - stage: smoketests displayName: Smoke Tests @@ -85,5 +81,5 @@ stages: jobs: - template: ./templates/smoke-tests.yaml parameters: - name: node14 - nodeVersion: 14.x + name: node20 + nodeVersion: 20.x diff --git a/eng/pipelines/templates/build.yaml b/eng/pipelines/templates/build.yaml index a7ba8a0a41..30f260b5e7 100644 --- a/eng/pipelines/templates/build.yaml +++ b/eng/pipelines/templates/build.yaml @@ -2,7 +2,7 @@ steps: - task: NodeTool@0 inputs: - versionSpec: "14.x" + versionSpec: "18.x" displayName: "Install Node.js" - script: | diff --git a/eng/pipelines/templates/regression-tests.yaml b/eng/pipelines/templates/regression-tests.yaml index 909a6621dd..a01107829e 100644 --- a/eng/pipelines/templates/regression-tests.yaml +++ b/eng/pipelines/templates/regression-tests.yaml @@ -34,15 +34,29 @@ jobs: versionSpec: ${{ parameters.nodeVersion }} displayName: "Install Node.js" + - task: NodeTool@0 + inputs: + versionSpec: ${{ parameters.nodeVersion }} + displayName: "Install Node.js" + - task: UsePythonVersion@0 inputs: - versionSpec: "3.x" - displayName: Install Python 3 + versionSpec: "3.11" + displayName: "Use Python 3.11" - script: | + npm install -g npm npx @microsoft/rush update npx @microsoft/rush rebuild - cd ./packages/tools/compare + displayName: Install and build + + - script: | + echo "Linking autorest-compare" + cd $(Build.SourcesDirectory)/packages/tools/compare + npm link --force + + echo "Linking autorest" + cd $(Build.SourcesDirectory)/packages/apps/autorest npm link --force displayName: Install autorest-compare diff --git a/packages/apps/autorest/package.json b/packages/apps/autorest/package.json index 610cfc1e0a..cdcf305148 100644 --- a/packages/apps/autorest/package.json +++ b/packages/apps/autorest/package.json @@ -52,34 +52,34 @@ "@azure-tools/uri": "~3.1.1", "@types/commonmark": "^0.27.0", "@types/jest": "^29.2.3", - "@types/node": "~14.14.20", + "@types/node": "~20.9.0", "@types/semver": "5.5.0", "@types/source-map-support": "^0.5.3", - "@types/webpack": "~4.41.26", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", + "@types/webpack": "~5.28.5", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", "chalk": "^4.1.0", - "copy-webpack-plugin": "^7.0.0", - "cpy-cli": "~4.1.0", - "eslint-plugin-jest": "~27.1.5", + "copy-webpack-plugin": "^11.0.0", + "cpy-cli": "~5.0.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "jest": "^29.3.1", - "mkdirp": "~0.5.1", - "prettier": "~2.7.1", - "rimraf": "^3.0.2", - "safe-buffer": "5.2.0", + "mkdirp": "~3.0.1", + "prettier": "~3.1.0", + "rimraf": "^5.0.5", + "safe-buffer": "5.2.1", "semver": "^7.3.5", "source-map-support": "^0.5.19", - "source-map": "0.7.3", + "source-map": "^0.8.0-beta.0", "ts-jest": "^29.0.3", - "ts-loader": "~9.2.3", - "typescript": "~4.9.3", + "ts-loader": "~9.5.1", + "typescript": "~5.2.2", "untildify": "^4.0.0", - "webpack-cli": "~4.7.2", - "webpack": "~5.40.0" + "webpack-cli": "~5.1.4", + "webpack": "~5.89.0" } } diff --git a/packages/apps/autorest/src/app.ts b/packages/apps/autorest/src/app.ts index 5d83e55a8c..9e392a87c6 100644 --- a/packages/apps/autorest/src/app.ts +++ b/packages/apps/autorest/src/app.ts @@ -15,7 +15,7 @@ const cwd = process.cwd(); const isDebuggerEnabled = // eslint-disable-next-line node/no-unsupported-features/node-builtins - !!require("inspector").url() || global.v8debug || /--debug|--inspect/.test(process.execArgv.join(" ")); + !!require("inspector").url() || (globalThis as any).v8debug || /--debug|--inspect/.test(process.execArgv.join(" ")); const launchCore = isDebuggerEnabled ? runCoreWithRequire : runCoreOutOfProc; // aliases, round one. diff --git a/packages/apps/autorest/test/failure.e2e.ts b/packages/apps/autorest/test/failure.e2e.ts index 88c1ff0997..1eeb0ed8c4 100644 --- a/packages/apps/autorest/test/failure.e2e.ts +++ b/packages/apps/autorest/test/failure.e2e.ts @@ -14,7 +14,7 @@ interface AutorestResult { async function runAutorest(args: string[]): Promise { return new Promise((resolve, reject) => { execFile("node", [cliEntrypoint, `--version=${coreRoot}`, ...args], (error, stdout, stderr) => { - resolve({ stdout, stderr, exitCode: error?.code ?? 0, error: error === null ? undefined : error }); + resolve({ stdout, stderr, exitCode: (error?.code as any) ?? 0, error: error === null ? undefined : error }); }); }); } @@ -22,7 +22,6 @@ async function runAutorest(args: string[]): Promise { describe("Failures", () => { it("returns zero exit code on success", async () => { const { exitCode, stdout, stderr } = await runAutorest(["--help"]); - console.log(stdout, stderr); expect(exitCode).toEqual(0); }); diff --git a/packages/extensions/cadl/package.json b/packages/extensions/cadl/package.json index 7e6b1614a8..4957c7e528 100644 --- a/packages/extensions/cadl/package.json +++ b/packages/extensions/cadl/package.json @@ -39,26 +39,26 @@ "devDependencies": { "@types/jest": "^29.2.3", "@types/lodash": "~4.14.168", - "@types/node": "~14.14.20", - "@types/webpack": "~4.41.26", + "@types/node": "~20.9.0", + "@types/webpack": "~5.28.5", "@types/source-map-support": "^0.5.3", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", "chalk": "^4.1.0", - "eslint-plugin-jest": "~27.1.5", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "jest": "^29.3.1", "lodash": "~4.17.20", - "prettier": "~2.7.1", - "rimraf": "^3.0.2", + "prettier": "~3.1.0", + "rimraf": "^5.0.5", "source-map-support": "^0.5.19", "ts-jest": "^29.0.3", - "ts-loader": "~9.2.3", - "typescript": "~4.9.3" + "ts-loader": "~9.5.1", + "typescript": "~5.2.2" }, "dependencies": { "@cadl-lang/compiler": "^0.37.0", diff --git a/packages/extensions/cadl/src/module-resolver.ts b/packages/extensions/cadl/src/module-resolver.ts index a5540ae1ec..6e68461e4d 100644 --- a/packages/extensions/cadl/src/module-resolver.ts +++ b/packages/extensions/cadl/src/module-resolver.ts @@ -24,7 +24,10 @@ export interface ResolveModuleHost { type ResolveModuleErrorCode = "MODULE_NOT_FOUND"; export class ResolveModuleError extends Error { - public constructor(public code: ResolveModuleErrorCode, message: string) { + public constructor( + public code: ResolveModuleErrorCode, + message: string, + ) { super(message); } } diff --git a/packages/extensions/core/package.json b/packages/extensions/core/package.json index efbfb30efd..ed2d999048 100644 --- a/packages/extensions/core/package.json +++ b/packages/extensions/core/package.json @@ -62,39 +62,39 @@ "@types/commonmark": "^0.27.0", "@types/jest": "^29.2.3", "@types/lodash": "~4.14.168", - "@types/node": "~14.14.20", - "@types/webpack": "~4.41.26", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", + "@types/node": "~20.9.0", + "@types/webpack": "~5.28.5", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", "ajv": "^8.6.0", "ajv-errors": "^3.0.0", "ajv-formats": "^2.1.0", - "commonmark": "^0.27.0", - "compare-versions": "^3.4.0", - "copy-webpack-plugin": "^7.0.0", - "cpy-cli": "~4.1.0", - "eslint-plugin-jest": "~27.1.5", + "commonmark": "^0.30.0", + "compare-versions": "^6.1.0", + "copy-webpack-plugin": "^11.0.0", + "cpy-cli": "~5.0.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "jest": "^29.3.1", "lodash": "~4.17.20", - "mkdirp": "~0.5.1", - "prettier": "~2.7.1", - "rimraf": "^3.0.2", - "safe-buffer": "5.2.0", + "mkdirp": "~3.0.1", + "prettier": "~3.1.0", + "rimraf": "^5.0.5", + "safe-buffer": "5.2.1", "source-map-support": "^0.5.19", - "source-map": "0.7.3", + "source-map": "^0.8.0-beta.0", "ts-jest": "^29.0.3", - "ts-loader": "~9.2.3", - "typescript": "~4.9.3", + "ts-loader": "~9.5.1", + "typescript": "~5.2.2", "vscode-jsonrpc": "^3.5.0", - "vscode-languageserver": "3.5.1", - "webpack-cli": "~4.7.2", + "vscode-languageserver": "9.0.1", + "webpack-cli": "~5.1.4", "webpack-node-externals": "~3.0.0", - "webpack": "~5.40.0", + "webpack": "~5.89.0", "yaml-ast-parser": "0.0.43" } } diff --git a/packages/extensions/core/src/lib/autorest-core.ts b/packages/extensions/core/src/lib/autorest-core.ts index 66c586d1d0..b102c17058 100644 --- a/packages/extensions/core/src/lib/autorest-core.ts +++ b/packages/extensions/core/src/lib/autorest-core.ts @@ -262,8 +262,8 @@ export async function IdentifyDocument(content: string): Promise { return doc.swagger && doc.swagger === "2.0" ? DocumentType.OpenAPI2 : doc.openapi && doc.openapi === "3.0.0" - ? DocumentType.OpenAPI3 - : DocumentType.Unknown; + ? DocumentType.OpenAPI3 + : DocumentType.Unknown; } } return DocumentType.Unknown; diff --git a/packages/extensions/core/src/lib/pipeline/pipeline.ts b/packages/extensions/core/src/lib/pipeline/pipeline.ts index d133db7fb3..db9a1d2b09 100644 --- a/packages/extensions/core/src/lib/pipeline/pipeline.ts +++ b/packages/extensions/core/src/lib/pipeline/pipeline.ts @@ -145,10 +145,10 @@ export async function runPipeline(configView: AutorestContext, fileSystem: IFile const plugin = usenull ? CORE_PLUGIN_MAP.null : passthru - ? CORE_PLUGIN_MAP.identity - : pluginName === "pipeline-emitter" - ? pipelineEmitterPlugin - : plugins[pluginName]?.plugin; + ? CORE_PLUGIN_MAP.identity + : pluginName === "pipeline-emitter" + ? pipelineEmitterPlugin + : plugins[pluginName]?.plugin; if (!plugin) { throw new Error(`Plugin '${pluginName}' not found.`); diff --git a/packages/extensions/core/src/lib/plugins/components-cleaner.ts b/packages/extensions/core/src/lib/plugins/components-cleaner.ts index 032c6258bb..24d9110eab 100644 --- a/packages/extensions/core/src/lib/plugins/components-cleaner.ts +++ b/packages/extensions/core/src/lib/plugins/components-cleaner.ts @@ -56,7 +56,7 @@ export class ComponentsCleaner extends Transformer { case "components": { const components = targetParent.components || this.newObject(targetParent, "components", pointer); - this.visitComponents(components, children); + this.visitComponents(components as any, children); } break; diff --git a/packages/extensions/core/src/lib/plugins/emitter.ts b/packages/extensions/core/src/lib/plugins/emitter.ts index dff03b6b8a..9ba1da4a9d 100644 --- a/packages/extensions/core/src/lib/plugins/emitter.ts +++ b/packages/extensions/core/src/lib/plugins/emitter.ts @@ -111,8 +111,8 @@ export async function emitArtifacts( ? typeof artifactTypeFilter === "string" ? fileArtifact === artifactTypeFilter // A string filter is a singular type : Array.isArray(artifactTypeFilter) - ? artifactTypeFilter.includes(fileArtifact) // an array is any one of the types - : true // if it's not a string or array, just emit it (no filter) + ? artifactTypeFilter.includes(fileArtifact) // an array is any one of the types + : true // if it's not a string or array, just emit it (no filter) : true; // if it's null, just emit it. if (ok) { diff --git a/packages/extensions/core/src/lib/plugins/enum-deduplication/enum-deduplicator.ts b/packages/extensions/core/src/lib/plugins/enum-deduplication/enum-deduplicator.ts index 4cfdb71663..865e5bb39c 100644 --- a/packages/extensions/core/src/lib/plugins/enum-deduplication/enum-deduplicator.ts +++ b/packages/extensions/core/src/lib/plugins/enum-deduplication/enum-deduplicator.ts @@ -2,7 +2,7 @@ import { toSemver, maximum, pascalCase } from "@azure-tools/codegen"; import { AnyObject, Node, TransformerViaPointer, visit } from "@azure-tools/datastore"; import * as oai3 from "@azure-tools/openapi"; import { includeXDashKeys } from "@azure-tools/openapi"; -import compareVersions from "compare-versions"; +import { compareVersions } from "compare-versions"; import { cloneDeep } from "lodash"; interface EnumEntry { diff --git a/packages/extensions/core/src/lib/plugins/loaders/referenced-file-resolver.ts b/packages/extensions/core/src/lib/plugins/loaders/referenced-file-resolver.ts index 7d2bfb0eab..6864b5a5f7 100644 --- a/packages/extensions/core/src/lib/plugins/loaders/referenced-file-resolver.ts +++ b/packages/extensions/core/src/lib/plugins/loaders/referenced-file-resolver.ts @@ -43,8 +43,8 @@ export async function loadAllReferencedFiles( secondaryFileContent.swagger ? "swagger-document" : secondaryFileContent.openapi - ? "openapi-document" - : file.artifactType, + ? "openapi-document" + : file.artifactType, { pathMappings: [] }, ); diff --git a/packages/extensions/core/src/lib/plugins/merger.ts b/packages/extensions/core/src/lib/plugins/merger.ts index f0dfc30fcf..7bad08d8b6 100644 --- a/packages/extensions/core/src/lib/plugins/merger.ts +++ b/packages/extensions/core/src/lib/plugins/merger.ts @@ -106,7 +106,7 @@ export class MultiAPIMerger extends Transformer { case "components": { const components = target.components || this.newObject(target, "components", pointer); - this.visitComponents(components, children); + this.visitComponents(components as any, children); } break; diff --git a/packages/extensions/core/src/lib/plugins/new-composer.ts b/packages/extensions/core/src/lib/plugins/new-composer.ts index 9a91b0b89a..2172ac1f0a 100644 --- a/packages/extensions/core/src/lib/plugins/new-composer.ts +++ b/packages/extensions/core/src/lib/plugins/new-composer.ts @@ -10,7 +10,7 @@ import { visit, } from "@azure-tools/datastore"; import { areSimilar } from "@azure-tools/object-comparison"; -import compareVersions from "compare-versions"; +import { compareVersions } from "compare-versions"; import { AutorestContext } from "../context"; import { PipelinePlugin } from "../pipeline/common"; @@ -63,8 +63,8 @@ export class NewComposer extends Transformer { return this.components[key] ? this.components[key] : this.current.components && this.current.components[key] - ? this.newObject(this.components, key, `/components/${key}`) - : this.newObject(this.components, key, "/"); + ? this.newObject(this.components, key, `/components/${key}`) + : this.newObject(this.components, key, "/"); } get schemas(): AnyObject { diff --git a/packages/extensions/core/src/lib/plugins/tree-shaker/tree-shaker.ts b/packages/extensions/core/src/lib/plugins/tree-shaker/tree-shaker.ts index be66c156f4..5abe6f3311 100644 --- a/packages/extensions/core/src/lib/plugins/tree-shaker/tree-shaker.ts +++ b/packages/extensions/core/src/lib/plugins/tree-shaker/tree-shaker.ts @@ -49,7 +49,10 @@ export class OAI3Shaker extends Transformer { }, }; - constructor(originalFile: Source, private isSimpleTreeShake: boolean) { + constructor( + originalFile: Source, + private isSimpleTreeShake: boolean, + ) { super([originalFile]); } @@ -78,8 +81,8 @@ export class OAI3Shaker extends Transformer { return this.components[key] ? this.components[key] : this.current.components && this.current.components[key] - ? this.newObject(this.components, key, `/components/${key}`) - : this.newObject(this.components, key, "/"); + ? this.newObject(this.components, key, `/components/${key}`) + : this.newObject(this.components, key, "/"); } get schemas(): AnyObject { diff --git a/packages/extensions/modelerfour/package.json b/packages/extensions/modelerfour/package.json index 3f6eddf71d..3e1f0a95bf 100644 --- a/packages/extensions/modelerfour/package.json +++ b/packages/extensions/modelerfour/package.json @@ -50,28 +50,27 @@ "@azure-tools/uri": "~3.1.1", "@types/jest": "^29.2.3", "@types/lodash": "~4.14.168", - "@types/node": "~14.14.20", - "@types/webpack": "~4.41.26", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", + "@types/node": "~20.9.0", + "@types/webpack": "~5.28.5", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", "chalk": "^4.1.0", - "eslint-plugin-jest": "~27.1.5", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "jest": "^29.3.1", "lodash": "~4.17.20", - "prettier": "~2.7.1", + "prettier": "~3.1.0", "recursive-diff": "~1.0.6", - "rimraf": "^3.0.2", + "rimraf": "^5.0.5", "source-map-support": "^0.5.19", "ts-jest": "^29.0.3", - "ts-loader": "~9.2.3", - "typescript": "~4.9.3", - "webpack-cli": "~4.7.2", - "webpack": "~5.40.0" - }, - "dependencies": {} + "ts-loader": "~9.5.1", + "typescript": "~5.2.2", + "webpack-cli": "~5.1.4", + "webpack": "~5.89.0" + } } diff --git a/packages/extensions/modelerfour/src/modeler/modelerfour.ts b/packages/extensions/modelerfour/src/modeler/modelerfour.ts index 4b0492a749..2e20d05d0e 100644 --- a/packages/extensions/modelerfour/src/modeler/modelerfour.ts +++ b/packages/extensions/modelerfour/src/modeler/modelerfour.ts @@ -2067,8 +2067,8 @@ export class ModelerFour { ? ImplementationLocation.Method : ImplementationLocation.Client : "client" === parameter["x-ms-parameter-location"] - ? ImplementationLocation.Client - : ImplementationLocation.Method; + ? ImplementationLocation.Client + : ImplementationLocation.Method; const preferredName = this.interpret.getPreferredName(parameter, schema["x-ms-client-name"] || parameter.name); if (implementation === ImplementationLocation.Client) { diff --git a/packages/extensions/modelerfour/src/modeler/security-processor.ts b/packages/extensions/modelerfour/src/modeler/security-processor.ts index 430410c272..d9bc713bc2 100644 --- a/packages/extensions/modelerfour/src/modeler/security-processor.ts +++ b/packages/extensions/modelerfour/src/modeler/security-processor.ts @@ -28,7 +28,10 @@ export interface SecurityConfiguration { */ export class SecurityProcessor { private securityConfig!: SecurityConfiguration; - public constructor(private session: Session, private interpret: Interpretations) {} + public constructor( + private session: Session, + private interpret: Interpretations, + ) {} public async init() { this.securityConfig = await this.getSecurityConfig(); diff --git a/packages/extensions/modelerfour/src/prenamer/naming-utils.ts b/packages/extensions/modelerfour/src/prenamer/naming-utils.ts index 69e0a43344..e7817b2681 100644 --- a/packages/extensions/modelerfour/src/prenamer/naming-utils.ts +++ b/packages/extensions/modelerfour/src/prenamer/naming-utils.ts @@ -103,7 +103,10 @@ interface NamerEntry { export class ScopeNamer { private names = new Map(); - public constructor(private session: Session, private options: ScopeNamerOptions) {} + public constructor( + private session: Session, + private options: ScopeNamerOptions, + ) {} /** * Add a nameable entity to be styled and named. diff --git a/packages/extensions/modelerfour/src/quality-precheck/duplicate-schema-merger.ts b/packages/extensions/modelerfour/src/quality-precheck/duplicate-schema-merger.ts index 44b52acc61..ba4ae76a54 100644 --- a/packages/extensions/modelerfour/src/quality-precheck/duplicate-schema-merger.ts +++ b/packages/extensions/modelerfour/src/quality-precheck/duplicate-schema-merger.ts @@ -5,7 +5,10 @@ import { ModelerFourOptions } from "modeler/modelerfour-options"; import { getDiff, rdiffResult } from "recursive-diff"; export class DuplicateSchemaMerger { - public constructor(private session: Session, private options: ModelerFourOptions) {} + public constructor( + private session: Session, + private options: ModelerFourOptions, + ) {} public findDuplicateSchemas(spec: oai3.Model): oai3.Model { if (!spec.components?.schemas) { diff --git a/packages/extensions/modelerfour/test/quality-precheck/prechecker.test.ts b/packages/extensions/modelerfour/test/quality-precheck/prechecker.test.ts index 98e6b6b25b..c26f0498a5 100644 --- a/packages/extensions/modelerfour/test/quality-precheck/prechecker.test.ts +++ b/packages/extensions/modelerfour/test/quality-precheck/prechecker.test.ts @@ -6,7 +6,10 @@ import { QualityPreChecker } from "../../src/quality-precheck/prechecker"; import { addSchema, createTestSessionFromModel, createTestSpec } from "../utils"; class PreCheckerClient { - private constructor(private input: Model, public result: Model) {} + private constructor( + private input: Model, + public result: Model, + ) {} resolve(item: Refable): Dereferenced { return dereference(this.input, item); diff --git a/packages/extensions/openapi-to-cadl/package.json b/packages/extensions/openapi-to-cadl/package.json index bbab07399c..3e504c7972 100644 --- a/packages/extensions/openapi-to-cadl/package.json +++ b/packages/extensions/openapi-to-cadl/package.json @@ -41,38 +41,38 @@ "@azure-tools/codegen": "~2.9.2", "@autorest/extension-base": "~3.5.2", "@autorest/codemodel": "~4.19.3", - "@typespec/compiler": "^0.44.0", - "@typespec/rest": "^0.44.0", - "@typespec/http": "^0.44.0", - "@typespec/versioning": "^0.44.0", - "@typespec/prettier-plugin-typespec": "^0.44.0", - "@azure-tools/typespec-azure-core": "^0.30.0", - "@azure-tools/typespec-autorest": "^0.30.0", - "@typespec/openapi": "^0.44.0", - "@typespec/openapi3": "^0.44.0", - "prettier": "~2.7.1" + "@typespec/compiler": "^0.50.0", + "@typespec/rest": "^0.50.0", + "@typespec/http": "^0.50.0", + "@typespec/versioning": "^0.50.0", + "@typespec/prettier-plugin-typespec": "^0.50.0", + "@azure-tools/typespec-azure-core": "^0.36.0", + "@azure-tools/typespec-autorest": "^0.36.0", + "@typespec/openapi": "^0.50.0", + "@typespec/openapi3": "^0.50.0", + "prettier": "~3.1.0" }, "devDependencies": { - "typescript": "~4.9.3", + "typescript": "~5.2.2", "@types/prettier": "^2.7.0", - "@types/webpack": "~4.41.26", - "rimraf": "^3.0.2", + "@types/webpack": "~5.28.5", + "rimraf": "^5.0.5", "ts-node": "^10.9.1", - "@types/node": "~14.14.20", + "@types/node": "~20.9.0", "fs-extra": "^10.1.0", "@types/fs-extra": "^9.0.13", "chalk": "^4.1.0", - "@azure-tools/typespec-autorest": "^0.30.0", - "webpack-cli": "~4.7.2", - "webpack": "~5.40.0", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", - "eslint-plugin-jest": "~27.1.5", + "@azure-tools/typespec-autorest": "^0.36.0", + "webpack-cli": "~5.1.4", + "webpack": "~5.89.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", - "ts-loader": "~9.2.3" + "ts-loader": "~9.5.1" } } diff --git a/packages/extensions/openapi-to-cadl/src/emiters/emit-cadl-config.ts b/packages/extensions/openapi-to-cadl/src/emiters/emit-cadl-config.ts index 26783bc189..954f4d0a3b 100644 --- a/packages/extensions/openapi-to-cadl/src/emiters/emit-cadl-config.ts +++ b/packages/extensions/openapi-to-cadl/src/emiters/emit-cadl-config.ts @@ -20,5 +20,5 @@ export async function emitCadlConfig(filePath: string): Promise { `; const session = getSession(); - session.writeFile({ filename: filePath, content: formatFile(content, filePath) }); + session.writeFile({ filename: filePath, content: await formatFile(content, filePath) }); } diff --git a/packages/extensions/openapi-to-cadl/src/emiters/emit-main.ts b/packages/extensions/openapi-to-cadl/src/emiters/emit-main.ts index befb9fcfb2..fb7fe509c5 100644 --- a/packages/extensions/openapi-to-cadl/src/emiters/emit-main.ts +++ b/packages/extensions/openapi-to-cadl/src/emiters/emit-main.ts @@ -6,7 +6,7 @@ import { formatCadlFile } from "../utils/format"; export async function emitMain(filePath: string, program: CadlProgram): Promise { const content = getServiceInformation(program); const session = getSession(); - session.writeFile({ filename: filePath, content: formatCadlFile(content, filePath) }); + session.writeFile({ filename: filePath, content: await formatCadlFile(content, filePath) }); } function getServiceInformation(program: CadlProgram) { diff --git a/packages/extensions/openapi-to-cadl/src/emiters/emit-models.ts b/packages/extensions/openapi-to-cadl/src/emiters/emit-models.ts index 5de9f49d53..9775a84f9f 100644 --- a/packages/extensions/openapi-to-cadl/src/emiters/emit-models.ts +++ b/packages/extensions/openapi-to-cadl/src/emiters/emit-models.ts @@ -10,7 +10,7 @@ export async function emitModels(filePath: string, program: CadlProgram): Promis const content = generateModels(program); const session = getSession(); - session.writeFile({ filename: filePath, content: formatCadlFile(content, filePath) }); + session.writeFile({ filename: filePath, content: await formatCadlFile(content, filePath) }); } function generateModels(program: CadlProgram) { diff --git a/packages/extensions/openapi-to-cadl/src/emiters/emit-package.ts b/packages/extensions/openapi-to-cadl/src/emiters/emit-package.ts index 0b3fe1e4e9..6c7338eb6c 100644 --- a/packages/extensions/openapi-to-cadl/src/emiters/emit-package.ts +++ b/packages/extensions/openapi-to-cadl/src/emiters/emit-package.ts @@ -14,7 +14,7 @@ export async function emitPackage(filePath: string, program: CadlProgram): Promi const name = program.serviceInformation.name.toLowerCase().replace(/ /g, "-"); const description = program.serviceInformation.doc; const content = JSON.stringify(getPackage(name, description as string)); - session.writeFile({ filename: filePath, content: formatFile(content, filePath) }); + session.writeFile({ filename: filePath, content: await formatFile(content, filePath) }); } const getPackage = (name: string, description: string) => ({ diff --git a/packages/extensions/openapi-to-cadl/src/emiters/emit-routes.ts b/packages/extensions/openapi-to-cadl/src/emiters/emit-routes.ts index a40df96c4e..ce634fd37f 100644 --- a/packages/extensions/openapi-to-cadl/src/emiters/emit-routes.ts +++ b/packages/extensions/openapi-to-cadl/src/emiters/emit-routes.ts @@ -8,7 +8,7 @@ import { getNamespace } from "../utils/namespace"; export async function emitRoutes(filePath: string, program: CadlProgram): Promise { const content = generateRoutes(program); const session = getSession(); - session.writeFile({ filename: filePath, content: formatCadlFile(content, filePath) }); + session.writeFile({ filename: filePath, content: await formatCadlFile(content, filePath) }); } function generateRoutes(program: CadlProgram) { diff --git a/packages/extensions/openapi-to-cadl/src/utils/format.ts b/packages/extensions/openapi-to-cadl/src/utils/format.ts index 34482fc857..f81c41eb8b 100644 --- a/packages/extensions/openapi-to-cadl/src/utils/format.ts +++ b/packages/extensions/openapi-to-cadl/src/utils/format.ts @@ -1,5 +1,4 @@ import { format } from "prettier"; -import { getLogger } from "./logger"; export function formatFile(content: string, filepath: string) { return format(content, { @@ -7,11 +6,10 @@ export function formatFile(content: string, filepath: string) { }); } -export function formatCadlFile(content: string, filepath: string): string { +export async function formatCadlFile(content: string, filepath: string): Promise { try { - return format(content, { + return await format(content, { plugins: ["@typespec/prettier-plugin-typespec"], - pluginSearchDirs: ["./node_modules"], filepath, }); } catch { diff --git a/packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/main.tsp b/packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/main.tsp index 96f1f63be2..e915c8c180 100644 --- a/packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/main.tsp @@ -13,6 +13,7 @@ using TypeSpec.Http; { @doc("server parameter") $host: string, + Endpoint: string, ApiVersion: string, } diff --git a/packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/models.tsp b/packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/models.tsp index 674eceb45a..3df07a29b7 100644 --- a/packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/models.tsp @@ -358,6 +358,7 @@ model DetectionResultSummary { @doc("Error message when detection is failed.") errors?: ErrorResponse[]; + variableStates?: VariableState[]; @doc("Detection request.") @@ -424,6 +425,7 @@ model AnomalyState { @doc("timestamp") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timestamp: utcDateTime; + value?: AnomalyValue; @doc("Error message for the current timestamp") @@ -442,6 +444,7 @@ significant the anomaly. @doc("Raw score from the model.") score: float32; + interpretation?: AnomalyInterpretation[]; } @@ -467,6 +470,7 @@ columns, `timestamp` and `value`. By default, the file name of the variable will be used as its variable name. """) dataSource: string; + dataSchema?: DataSchema; @doc(""" @@ -530,6 +534,7 @@ model DiagnosticsInfo { model ModelState { @doc("Epoch id") epochIds?: int32[]; + trainLosses?: float32[]; validationLosses?: float32[]; latenciesInSeconds?: float32[]; @@ -570,6 +575,7 @@ model ModelSnapshot { @doc("Model status. One of CREATED, RUNNING, READY, and FAILED.") status: ModelStatus; + displayName?: string; @doc("Total number of variables.") diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/models.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/models.tsp index 74b815a5fe..1fea0698e1 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/models.tsp @@ -1534,6 +1534,7 @@ machines in the scale set.

For more information about disks, see machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). """) dataDisks?: VirtualMachineScaleSetDataDisk[]; + diskControllerType?: string; } @@ -2643,6 +2644,7 @@ model VirtualMachineScaleSetUpdateStorageProfile { @doc("The data disks.") dataDisks?: VirtualMachineScaleSetDataDisk[]; + diskControllerType?: string; } @@ -4139,6 +4141,7 @@ than 1 network interface. @doc("Specifies the IP configurations of the network interface.") ipConfigurations: VirtualMachineNetworkInterfaceIPConfiguration[]; + dscpConfiguration?: SubResource; } @@ -5143,6 +5146,7 @@ MarketPlace. @doc("Contains the os disk image information.") osDiskImage?: OSDiskImage; + dataDiskImages?: DataDiskImage[]; @doc("Describes automatic OS upgrade properties on the image.") @@ -5153,6 +5157,7 @@ MarketPlace. @doc("Specifies disallowed configuration for the VirtualMachine created from the image") disallowed?: DisallowedConfiguration; + features?: VirtualMachineImageFeature[]; @doc("Specifies the Architecture Type") diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/routes.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/routes.tsp index a60f632b1d..1170645791 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/routes.tsp @@ -2556,6 +2556,7 @@ publisher, offer, and SKU. @doc("The expand expression to apply on the operation.") @query $expand: string; + @query $top: int32; @query $orderby: string; @@ -2864,6 +2865,7 @@ interface VirtualMachineExtensionImagesOperations { @doc("The name of a supported Azure region.") @path location: string; + @path publisherName: string; @path type: string; @path version: string; @@ -2886,6 +2888,7 @@ The subscription ID forms part of the URI for every service call. @doc("The name of a supported Azure region.") @path location: string; + @path publisherName: string; @doc(""" @@ -2906,12 +2909,14 @@ The subscription ID forms part of the URI for every service call. @doc("The name of a supported Azure region.") @path location: string; + @path publisherName: string; @path type: string; @doc("The filter to apply on the operation.") @query $filter: string; + @query $top: int32; @query $orderby: string; diff --git a/packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/models.tsp b/packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/models.tsp index 02d4ebc812..be26e84f5c 100644 --- a/packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/models.tsp @@ -34,6 +34,7 @@ Name property with a very long description that does not fit on a single line and a line break. """) name?: string; + color?: CmykColors; } @@ -90,6 +91,7 @@ model DateWrapper { model DatetimeWrapper { // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. field?: utcDateTime; + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. now?: utcDateTime; } @@ -97,6 +99,7 @@ model DatetimeWrapper { model Datetimerfc1123Wrapper { // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. field?: utcDateTime; + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. now?: utcDateTime; } @@ -142,10 +145,11 @@ model Pet { @discriminator("fishtype") model Fish { species?: string; - // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one + // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key length: float32; + siblings?: Fish[]; } @@ -176,6 +180,7 @@ model Salmon extends Fish { model ReadonlyObj { @visibility("read") id?: string; + size?: int32; } @@ -194,12 +199,14 @@ model SmartSalmon extends Salmon { @projectedName("json", "college_degree") collegeDegree?: string; + fishtype: "smart_salmon"; } @discriminator("fishtype") model Shark extends Fish { age?: int32; + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. birthday: utcDateTime; } @@ -214,6 +221,7 @@ model Goblinshark extends Shark { @doc("Colors possible") color?: GoblinSharkColor; + fishtype: "goblin"; } diff --git a/packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/models.tsp b/packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/models.tsp index 17686e5d76..9be7a1ca77 100644 --- a/packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/models.tsp @@ -1241,6 +1241,7 @@ model KeyOperationsParameters { @doc("algorithm identifier") @projectedName("json", "alg") algorithm: JsonWebKeyEncryptionAlgorithm; + value: bytes; @doc(""" @@ -1292,6 +1293,7 @@ algorithm types, see JsonWebKeySignatureAlgorithm. """) @projectedName("json", "alg") algorithm: JsonWebKeySignatureAlgorithm; + value: bytes; } diff --git a/packages/extensions/openapi-to-cadl/test/nh/tsp-output/routes.tsp b/packages/extensions/openapi-to-cadl/test/nh/tsp-output/routes.tsp index e4ca96774b..e4612d2e61 100644 --- a/packages/extensions/openapi-to-cadl/test/nh/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-cadl/test/nh/tsp-output/routes.tsp @@ -71,6 +71,7 @@ op CreateOrUpdateNotificationHub is Azure.Core.Foundations.Operation< @doc("ETag as returned by creation, update, and retrieval, or * (overwrite).") @header `If-Match`: string; + @body body: NotificationHubEntryModel; @doc("Accept header") @@ -278,6 +279,7 @@ op CreateOrUpdateRegistration is Azure.Core.Foundations.Operation< @doc("Authorization Header value") @header Authorization: string; + @body body: RegistrationEntryModel; @doc("Accept header") diff --git a/packages/extensions/openapi-to-cadl/test/openAI/openai.md b/packages/extensions/openapi-to-cadl/test/openAI/openai.md index 8dace5649e..d6b064fafb 100644 --- a/packages/extensions/openapi-to-cadl/test/openAI/openai.md +++ b/packages/extensions/openapi-to-cadl/test/openAI/openai.md @@ -1,6 +1,6 @@ ```yaml input-file: - - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2022-06-01-preview/inference.json + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/0762e82bcccef4a032e29dda5e4c07fd7cc822a6/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2022-06-01-preview/inference.json clear-output-folder: false namespace: "Azure.AI.OpenAI" title: "OpenAI" diff --git a/packages/extensions/openapi-to-cadl/test/openAI/tsp-output/routes.tsp b/packages/extensions/openapi-to-cadl/test/openAI/tsp-output/routes.tsp index 7adc624d3c..66b69ca015 100644 --- a/packages/extensions/openapi-to-cadl/test/openAI/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-cadl/test/openAI/tsp-output/routes.tsp @@ -32,6 +32,7 @@ interface embeddingsOperations { @doc("deployment id of the model which was deployed") @path `deployment-id`: string; + @body body: Paths13PiqocDeploymentsDeploymentIdEmbeddingsPostRequestbodyContentApplicationJsonSchema; }, diff --git a/packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/models.tsp b/packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/models.tsp index 7897a16370..cfc4824eb8 100644 --- a/packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/models.tsp @@ -219,12 +219,14 @@ model JobState { model JobMetadata { // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDateTime: utcDateTime; + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expirationDateTime?: utcDateTime; - // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one + // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key jobId: string; + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdatedDateTime: utcDateTime; diff --git a/packages/extensions/openapi-to-cadl/test/utils/check-clean-tree.js b/packages/extensions/openapi-to-cadl/test/utils/check-clean-tree.js index ffc4c3eef7..78bf1832c6 100644 --- a/packages/extensions/openapi-to-cadl/test/utils/check-clean-tree.js +++ b/packages/extensions/openapi-to-cadl/test/utils/check-clean-tree.js @@ -36,7 +36,7 @@ async function check_tree() { // run git diff again, this time forwarding the stout to present // a readable hint to the user await onExit( - spawn("git", ["diff", "--staged", "--compact-summary"], { + spawn("git", ["diff", "--staged"], { stdio: [process.stdin, process.stdout, process.stderr], }), ); diff --git a/packages/extensions/openapi-to-cadl/test/utils/generate-cadl.ts b/packages/extensions/openapi-to-cadl/test/utils/generate-cadl.ts index 9a67a6ecdf..bdeea82e79 100644 --- a/packages/extensions/openapi-to-cadl/test/utils/generate-cadl.ts +++ b/packages/extensions/openapi-to-cadl/test/utils/generate-cadl.ts @@ -1,10 +1,10 @@ import { spawnSync } from "child_process"; import { readFileSync } from "fs"; import { readdir } from "fs/promises"; -import { join, dirname, extname } from "path"; +import { join, dirname, extname, resolve } from "path"; import { resolveProject } from "./resolve-root"; -export async function generateCadl(folder: string, debug = false) { +export async function generateCadl(repoRoot: string, folder: string, debug = false) { const { path: root } = await resolveProject(__dirname); const path = join(root, "test", folder); const dir = await readdir(path); @@ -21,10 +21,10 @@ export async function generateCadl(folder: string, debug = false) { } const swaggerPath = join(path, firstSwagger); - generate(swaggerPath, debug); + generate(repoRoot, swaggerPath, debug); } -function generate(path: string, debug = false) { +function generate(root: string, path: string, debug = false) { const extension = extname(path); const inputFile = extension === ".json" ? `--input-file=${path}` : `--require=${path}`; @@ -35,6 +35,7 @@ function generate(path: string, debug = false) { } const args = [ + resolve(root, "packages/apps/autorest/entrypoints/app.js"), "--openapi-to-cadl", inputFile, "--use=.", @@ -43,10 +44,12 @@ function generate(path: string, debug = false) { ...(debug ? ["--openapi-to-cadl.debugger"] : []), ...(overrideGuess ? ["--guessResourceKey=false"] : ["--guessResourceKey=true"]), ]; - const spawn = spawnSync("autorest", args, { stdio: "inherit" }); + const spawn = spawnSync("node", args, { stdio: "inherit" }); if (spawn.status !== 0) { - throw new Error(`Generation failed, command:\n autorest ${args.join(" ")}`); + throw new Error( + `Generation failed, command:\n autorest ${args.join(" ")}\nStdout:\n${spawn.stdout}\nStderr:\n${spawn.stderr}`, + ); } } @@ -54,16 +57,16 @@ async function main() { const folder = process.argv[4]; const debug = process.argv[5] === "--debug"; const { path: root } = await resolveProject(__dirname); - + const repoRoot = resolve(root, "..", "..", ".."); const folders: string[] = folder ? [folder as string] : (await readdir(join(root, "test"))).filter((d) => d !== "utils"); for (const folder of folders) { try { - await generateCadl(folder, debug); + await generateCadl(repoRoot, folder, debug); } catch (e) { - throw new Error(`Failed to generate ${folder}`); + throw new Error(`Failed to generate ${folder}, error:\n${e}`); } } } diff --git a/packages/extensions/openapi-to-cadl/test/utils/printer.ts b/packages/extensions/openapi-to-cadl/test/utils/printer.ts index 0c69f5f0af..8a10e1a838 100644 --- a/packages/extensions/openapi-to-cadl/test/utils/printer.ts +++ b/packages/extensions/openapi-to-cadl/test/utils/printer.ts @@ -9,7 +9,7 @@ import * as chalk from "chalk"; const printModes = ["info", "warn", "error", "success", "debug"] as const; export type Fn = (...values: any[]) => T; -export type ModeMap = { [k in typeof printModes[number]]: T }; +export type ModeMap = { [k in (typeof printModes)[number]]: T }; // Compute the base directory of the dev-tool command package // We must do this specially for the printer module because using diff --git a/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/main.tsp b/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/main.tsp index d2c2892127..19882f026d 100644 --- a/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/main.tsp @@ -5,15 +5,15 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; @service({ - title: "AzureMessagingWebPubSubServiceClient", - version: "2022-11-01", + title: "Azure Web PubSub Service REST API", + version: "2023-07-01", }) @server( - "{Endpoint}", + "{endpoint}", "// FIXME: (miissing-service-description) Add service description", { - Endpoint: string, + endpoint: string, } ) @doc("// FIXME: (miissing-service-description) Add service description") -namespace AzureMessagingWebPubSubServiceClient; +namespace AzureWebPubSubServiceRESTAPI; diff --git a/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/models.tsp b/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/models.tsp index 95cafb6b0b..82a59a520d 100644 --- a/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/models.tsp @@ -5,7 +5,7 @@ import "@azure-tools/typespec-azure-core"; using TypeSpec.Rest; using TypeSpec.Http; -namespace AzureMessagingWebPubSubServiceClient; +namespace AzureWebPubSubServiceRESTAPI; enum WebPubSubPermission { sendToGroup, @@ -18,6 +18,15 @@ enum ContentType { @doc("Content Type 'text/plain'") `text/plain`, } +@doc("The request object containing targets groups and a connection filter") +model AddToGroupsRequest { + @doc("A list of groups which target connections will be added into") + groups?: string[]; + + @doc("An OData filter which target connections satisfy") + filter?: string; +} + @doc("The error object.") @error model ErrorDetail { @@ -32,12 +41,14 @@ model ErrorDetail { @doc("An array of details about specific errors that led to this reported error.") details?: ErrorDetail[]; + inner?: InnerError; } model InnerError { @doc("A more specific error code than was provided by the containing error.") code?: string; + inner?: InnerError; } @@ -46,3 +57,12 @@ model ClientTokenResponse { @doc("The token value for the WebSocket client to connect to the service") token: string; } + +@doc("The request object containing targets groups and a connection filter") +model RemoveFromGroupsRequest { + @doc("A list of groups which target connections will be removed from") + groups?: string[]; + + @doc("An OData filter which target connections satisfy") + filter?: string; +} diff --git a/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/routes.tsp b/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/routes.tsp index 0a27755702..a7b9eb4882 100644 --- a/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/routes.tsp @@ -5,7 +5,7 @@ import "./models.tsp"; using TypeSpec.Rest; using TypeSpec.Http; -namespace AzureMessagingWebPubSubServiceClient; +namespace AzureWebPubSubServiceRESTAPI; interface HealthApiOperations { @summary("Get service health status.") @@ -16,6 +16,26 @@ interface HealthApiOperations { } interface WebPubSubOperations { + @summary("Add filtered connections to multiple groups.") + @doc("Add filtered connections to multiple groups.") + @route("/api/hubs/{hub}/:addToGroups") + @post + AddConnectionsToGroups is Azure.Core.Foundations.Operation< + { + @doc(""" +Target hub name, which should start with alphabetic characters and only contain +alpha-numeric characters or underscore. +""") + @path + hub: string; + + @doc("Target groups and connection filter.") + @body + groupsToAdd: AddToGroupsRequest; + }, + void + >; + @summary("Close the connections in the hub.") @doc("Close the connections in the hub.") @route("/api/hubs/{hub}/:closeConnections") @@ -76,6 +96,26 @@ alpha-numeric characters or underscore. ClientTokenResponse >; + @summary("Remove filtered connections from multiple groups.") + @doc("Remove filtered connections from multiple groups.") + @route("/api/hubs/{hub}/:removeFromGroups") + @post + RemoveConnectionsFromGroups is Azure.Core.Foundations.Operation< + { + @doc(""" +Target hub name, which should start with alphabetic characters and only contain +alpha-numeric characters or underscore. +""") + @path + hub: string; + + @doc("Target groups and connection filter.") + @body + groupsToRemove: RemoveFromGroupsRequest; + }, + void + >; + @summary("Broadcast content inside request body to all the connected client connections.") @doc("Broadcast content inside request body to all the connected client connections.") @route("/api/hubs/{hub}/:send") @@ -100,6 +140,16 @@ messages. @query filter: string; + @doc(""" +The time-to-live (TTL) value in seconds for messages sent to the service. 0 is +the default value, which means the message never expires. 300 is the maximum +value. If this parameter is non-zero, messages that are not consumed by the +client within the specified TTL will be dropped by the service. This parameter +can help when the client's bandwidth is limited. +""") + @query + messageTtlSeconds: int32; + @doc("Upload file type") @header `Content-Type`: ContentType; @@ -172,6 +222,16 @@ alpha-numeric characters or underscore. @path connectionId: string; + @doc(""" +The time-to-live (TTL) value in seconds for messages sent to the service. 0 is +the default value, which means the message never expires. 300 is the maximum +value. If this parameter is non-zero, messages that are not consumed by the +client within the specified TTL will be dropped by the service. This parameter +can help when the client's bandwidth is limited. +""") + @query + messageTtlSeconds: int32; + @doc("Upload file type") @header `Content-Type`: ContentType; @@ -279,6 +339,16 @@ messages. @query filter: string; + @doc(""" +The time-to-live (TTL) value in seconds for messages sent to the service. 0 is +the default value, which means the message never expires. 300 is the maximum +value. If this parameter is non-zero, messages that are not consumed by the +client within the specified TTL will be dropped by the service. This parameter +can help when the client's bandwidth is limited. +""") + @query + messageTtlSeconds: int32; + @doc("Upload file type") @header `Content-Type`: ContentType; @@ -506,6 +576,16 @@ messages. @query filter: string; + @doc(""" +The time-to-live (TTL) value in seconds for messages sent to the service. 0 is +the default value, which means the message never expires. 300 is the maximum +value. If this parameter is non-zero, messages that are not consumed by the +client within the specified TTL will be dropped by the service. This parameter +can help when the client's bandwidth is limited. +""") + @query + messageTtlSeconds: int32; + @doc("Upload file type") @header `Content-Type`: ContentType; diff --git a/packages/libs/codegen/package.json b/packages/libs/codegen/package.json index 34ccaf5f3a..54312e96cf 100644 --- a/packages/libs/codegen/package.json +++ b/packages/libs/codegen/package.json @@ -38,25 +38,25 @@ "devDependencies": { "@types/jest": "^29.2.3", "@types/js-yaml": "~4.0.0", - "@types/node": "~14.14.20", + "@types/node": "~20.9.0", "@types/semver": "5.5.0", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", - "eslint-plugin-jest": "~27.1.5", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "jest": "^29.3.1", - "rimraf": "^3.0.2", + "rimraf": "^5.0.5", "source-map-support": "^0.5.19", "ts-jest": "^29.0.3", - "typescript": "~4.9.3" + "typescript": "~5.2.2" }, "dependencies": { "@azure-tools/async-io": "~3.0.0", - "js-yaml": "~4.0.0", + "js-yaml": "~4.1.0", "semver": "^7.3.5" } } diff --git a/packages/libs/codegen/src/formatter/formatter.ts b/packages/libs/codegen/src/formatter/formatter.ts index 535fc0bd16..0721067d0f 100644 --- a/packages/libs/codegen/src/formatter/formatter.ts +++ b/packages/libs/codegen/src/formatter/formatter.ts @@ -96,8 +96,8 @@ function normalize( maxUppercasePreserve, ) : removeDuplicates - ? removeSequentialDuplicates(identifier) - : identifier; + ? removeSequentialDuplicates(identifier) + : identifier; } export class Style { static select(style: any, fallback: Styler, maxUppercasePreserve: number): Styler { diff --git a/packages/libs/codegen/src/initializer.ts b/packages/libs/codegen/src/initializer.ts index 3ef7ca4038..0cf48ce4fa 100644 --- a/packages/libs/codegen/src/initializer.ts +++ b/packages/libs/codegen/src/initializer.ts @@ -10,38 +10,38 @@ export type XDeepPartial = DeepPartial; export type DeepPartial = T extends Primitive | Function | Date ? T : T extends Map - ? DeepPartialMap - : T extends Set - ? DeepPartialSet - : - | { - [P in keyof T]?: T[P] extends Array - ? Array> - : T[P] extends ReadonlyArray - ? ReadonlyArray> - : T[P] extends Primitive - ? T[P] - : DeepPartial; - } - | T; + ? DeepPartialMap + : T extends Set + ? DeepPartialSet + : + | { + [P in keyof T]?: T[P] extends Array + ? Array> + : T[P] extends ReadonlyArray + ? ReadonlyArray> + : T[P] extends Primitive + ? T[P] + : DeepPartial; + } + | T; export type NDeepPartial = T extends Primitive ? T : T extends Function - ? T - : T extends Date - ? T - : T extends Map - ? DeepPartialMap - : T extends Set - ? DeepPartialSet - : T extends {} - ? { - [P in keyof T]?: T[P] extends string | number | boolean | null | undefined // T[P] extends ReadonlyArray ? ReadonlyArray> : // if it's an ReadOnly Array, // use a ReadOnly of DeepPartial // T[P] extends Array ? Array> : // if it is an array then use an Array of DeepPartial - ? T[P] // if it's a primitive use that - : NDeepPartial; // otherwise, it's a DeepPartial of the type. - } - : Partial; + ? T + : T extends Date + ? T + : T extends Map + ? DeepPartialMap + : T extends Set + ? DeepPartialSet + : T extends {} + ? { + [P in keyof T]?: T[P] extends string | number | boolean | null | undefined // T[P] extends ReadonlyArray ? ReadonlyArray> : // if it's an ReadOnly Array, // use a ReadOnly of DeepPartial // T[P] extends Array ? Array> : // if it is an array then use an Array of DeepPartial + ? T[P] // if it's a primitive use that + : NDeepPartial; // otherwise, it's a DeepPartial of the type. + } + : Partial; interface DeepPartialSet extends Set> {} interface DeepPartialMap extends Map, NDeepPartial> {} diff --git a/packages/libs/codegen/src/text-manipulation.ts b/packages/libs/codegen/src/text-manipulation.ts index 9621ef5390..e09008f18f 100644 --- a/packages/libs/codegen/src/text-manipulation.ts +++ b/packages/libs/codegen/src/text-manipulation.ts @@ -302,10 +302,10 @@ export function pascalCase(identifier: string | Array, removeDuplicates return identifier === undefined ? "" : typeof identifier === "string" - ? pascalCase(fixLeadingNumber(deconstruct(identifier)), removeDuplicates) - : (removeDuplicates ? [...removeSequentialDuplicates(identifier)] : identifier) - .map((each) => capitalize(each)) - .join(""); + ? pascalCase(fixLeadingNumber(deconstruct(identifier)), removeDuplicates) + : (removeDuplicates ? [...removeSequentialDuplicates(identifier)] : identifier) + .map((each) => capitalize(each)) + .join(""); } export function camelCase(identifier: string | Array): string { diff --git a/packages/libs/codemodel/.resources/all-in-one/json/code-model.json b/packages/libs/codemodel/.resources/all-in-one/json/code-model.json index 8849284db2..d9de0c7e91 100644 --- a/packages/libs/codemodel/.resources/all-in-one/json/code-model.json +++ b/packages/libs/codemodel/.resources/all-in-one/json/code-model.json @@ -799,22 +799,6 @@ } ] }, - "Response": { - "description": "a response from a service.", - "type": "object", - "properties": {}, - "defaultProperties": [], - "additionalProperties": false, - "required": [ - "language", - "protocol" - ], - "allOf": [ - { - "$ref": "#/definitions/Metadata" - } - ] - }, "BinaryResponse": { "description": "a response where the content should be treated as a binary instead of a value or object", "type": "object", @@ -968,36 +952,6 @@ "protocol" ] }, - "Request": { - "type": "object", - "properties": { - "parameters": { - "description": "the parameter inputs to the operation", - "type": "array", - "items": { - "$ref": "#/definitions/Parameter" - } - }, - "signatureParameters": { - "description": "a filtered list of parameters that is (assumably) the actual method signature parameters", - "type": "array", - "items": { - "$ref": "#/definitions/Parameter" - } - } - }, - "defaultProperties": [], - "additionalProperties": false, - "required": [ - "language", - "protocol" - ], - "allOf": [ - { - "$ref": "#/definitions/Metadata" - } - ] - }, "OperationGroup": { "description": "an operation group represents a container around set of operations", "type": "object", @@ -3168,6 +3122,52 @@ "defaultProperties": [], "additionalProperties": false }, + "Request": { + "type": "object", + "properties": { + "parameters": { + "description": "the parameter inputs to the operation", + "type": "array", + "items": { + "$ref": "#/definitions/Parameter" + } + }, + "signatureParameters": { + "description": "a filtered list of parameters that is (assumably) the actual method signature parameters", + "type": "array", + "items": { + "$ref": "#/definitions/Parameter" + } + } + }, + "defaultProperties": [], + "additionalProperties": false, + "required": [ + "language", + "protocol" + ], + "allOf": [ + { + "$ref": "#/definitions/Metadata" + } + ] + }, + "Response": { + "description": "a response from a service.", + "type": "object", + "properties": {}, + "defaultProperties": [], + "additionalProperties": false, + "required": [ + "language", + "protocol" + ], + "allOf": [ + { + "$ref": "#/definitions/Metadata" + } + ] + }, "Record": { "type": "object", "defaultProperties": [], diff --git a/packages/libs/codemodel/.resources/model/json/master.json b/packages/libs/codemodel/.resources/model/json/master.json index b91c07c9a6..f63a22f03c 100644 --- a/packages/libs/codemodel/.resources/model/json/master.json +++ b/packages/libs/codemodel/.resources/model/json/master.json @@ -537,22 +537,6 @@ } ] }, - "Response": { - "description": "a response from a service.", - "type": "object", - "properties": {}, - "defaultProperties": [], - "additionalProperties": false, - "required": [ - "language", - "protocol" - ], - "allOf": [ - { - "$ref": "./master.json#/definitions/Metadata" - } - ] - }, "BinaryResponse": { "description": "a response where the content should be treated as a binary instead of a value or object", "type": "object", @@ -706,36 +690,6 @@ "protocol" ] }, - "Request": { - "type": "object", - "properties": { - "parameters": { - "description": "the parameter inputs to the operation", - "type": "array", - "items": { - "$ref": "./master.json#/definitions/Parameter" - } - }, - "signatureParameters": { - "description": "a filtered list of parameters that is (assumably) the actual method signature parameters", - "type": "array", - "items": { - "$ref": "./master.json#/definitions/Parameter" - } - } - }, - "defaultProperties": [], - "additionalProperties": false, - "required": [ - "language", - "protocol" - ], - "allOf": [ - { - "$ref": "./master.json#/definitions/Metadata" - } - ] - }, "OperationGroup": { "description": "an operation group represents a container around set of operations", "type": "object", @@ -1045,6 +999,52 @@ "defaultProperties": [], "additionalProperties": false }, + "Request": { + "type": "object", + "properties": { + "parameters": { + "description": "the parameter inputs to the operation", + "type": "array", + "items": { + "$ref": "./master.json#/definitions/Parameter" + } + }, + "signatureParameters": { + "description": "a filtered list of parameters that is (assumably) the actual method signature parameters", + "type": "array", + "items": { + "$ref": "./master.json#/definitions/Parameter" + } + } + }, + "defaultProperties": [], + "additionalProperties": false, + "required": [ + "language", + "protocol" + ], + "allOf": [ + { + "$ref": "./master.json#/definitions/Metadata" + } + ] + }, + "Response": { + "description": "a response from a service.", + "type": "object", + "properties": {}, + "defaultProperties": [], + "additionalProperties": false, + "required": [ + "language", + "protocol" + ], + "allOf": [ + { + "$ref": "./master.json#/definitions/Metadata" + } + ] + }, "Record": { "type": "object", "defaultProperties": [], diff --git a/packages/libs/codemodel/package.json b/packages/libs/codemodel/package.json index 26579e3b88..748384c9c2 100644 --- a/packages/libs/codemodel/package.json +++ b/packages/libs/codemodel/package.json @@ -37,24 +37,24 @@ "readme": "https://github.com/Azure/autorest/tree/main/packages/libs/codemodel/readme.md", "devDependencies": { "@types/js-yaml": "~4.0.0", - "@types/node": "~14.14.20", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", - "eslint-plugin-jest": "~27.1.5", + "@types/node": "~20.9.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "glob": "~7.1.4", - "rimraf": "^3.0.2", + "rimraf": "^5.0.5", "ts-morph": "~13.0.3", "typescript-json-schema": "~0.53.0", - "typescript": "~4.9.3" + "typescript": "~5.2.2" }, "dependencies": { "@azure-tools/codegen": "~2.9.2", - "js-yaml": "~4.0.0" + "js-yaml": "~4.1.0" }, "publishConfig": { "access": "public" diff --git a/packages/libs/codemodel/src/model/common/external-documentation.ts b/packages/libs/codemodel/src/model/common/external-documentation.ts index b749f2af26..34eb969dbf 100644 --- a/packages/libs/codemodel/src/model/common/external-documentation.ts +++ b/packages/libs/codemodel/src/model/common/external-documentation.ts @@ -9,7 +9,10 @@ export interface ExternalDocumentation extends Extensions { } export class ExternalDocumentation extends Initializer implements ExternalDocumentation { - constructor(public url: uri, initializer?: DeepPartial) { + constructor( + public url: uri, + initializer?: DeepPartial, + ) { super(); this.apply(initializer); } diff --git a/packages/libs/codemodel/src/model/common/info.ts b/packages/libs/codemodel/src/model/common/info.ts index d0488967a7..2cb8c35a7a 100644 --- a/packages/libs/codemodel/src/model/common/info.ts +++ b/packages/libs/codemodel/src/model/common/info.ts @@ -55,14 +55,20 @@ export class Contact extends Initializer implements Contact { } export class Info extends Initializer implements Info { - constructor(public title: string, initializer?: DeepPartial) { + constructor( + public title: string, + initializer?: DeepPartial, + ) { super(); this.apply(initializer); } } export class License extends Initializer implements License { - constructor(public name: string, initializer?: DeepPartial) { + constructor( + public name: string, + initializer?: DeepPartial, + ) { super(); this.apply(initializer); } diff --git a/packages/libs/codemodel/src/model/common/security.ts b/packages/libs/codemodel/src/model/common/security.ts index a5ae271a77..ee484ecdf2 100644 --- a/packages/libs/codemodel/src/model/common/security.ts +++ b/packages/libs/codemodel/src/model/common/security.ts @@ -16,7 +16,10 @@ export interface Security { } export class Security extends Initializer implements Security { - constructor(public authenticationRequired: boolean, objectInitializer?: DeepPartial) { + constructor( + public authenticationRequired: boolean, + objectInitializer?: DeepPartial, + ) { super(); this.schemes = []; this.apply(objectInitializer); diff --git a/packages/libs/codemodel/src/model/http/http.ts b/packages/libs/codemodel/src/model/http/http.ts index b72dba7881..38633c87dd 100644 --- a/packages/libs/codemodel/src/model/http/http.ts +++ b/packages/libs/codemodel/src/model/http/http.ts @@ -94,7 +94,11 @@ export interface HttpHeader extends Extensions { } export class HttpHeader extends Initializer implements HttpHeader { - constructor(public header: string, public schema: Schema, objectInitializer?: DeepPartial) { + constructor( + public header: string, + public schema: Schema, + objectInitializer?: DeepPartial, + ) { super(); this.apply(objectInitializer); } diff --git a/packages/libs/codemodel/src/model/http/security.ts b/packages/libs/codemodel/src/model/http/security.ts index c78e0b74a8..5039bff5f3 100644 --- a/packages/libs/codemodel/src/model/http/security.ts +++ b/packages/libs/codemodel/src/model/http/security.ts @@ -79,7 +79,11 @@ export interface APIKeySecurityScheme extends Extensions { } export class APIKeySecurityScheme extends Initializer implements APIKeySecurityScheme { - constructor(public name: string, inWhere: ParameterLocation, initializer?: DeepPartial) { + constructor( + public name: string, + inWhere: ParameterLocation, + initializer?: DeepPartial, + ) { super(); this.in = inWhere; this.type = SecurityType.ApiKey; @@ -100,14 +104,20 @@ export class BearerHTTPSecurityScheme extends Initializer implements BearerHTTPS export class ImplicitOAuthFlow extends Initializer implements ImplicitOAuthFlow { scopes: Record = {}; - constructor(public authorizationUrl: string, initializer?: DeepPartial) { + constructor( + public authorizationUrl: string, + initializer?: DeepPartial, + ) { super(); this.apply(initializer); } } export class NonBearerHTTPSecurityScheme extends Initializer implements NonBearerHTTPSecurityScheme { - constructor(public scheme: string, initializer?: DeepPartial) { + constructor( + public scheme: string, + initializer?: DeepPartial, + ) { super(); this.apply(initializer); this.type = SecurityType.Http; @@ -115,7 +125,10 @@ export class NonBearerHTTPSecurityScheme extends Initializer implements NonBeare } export class OAuth2SecurityScheme extends Initializer implements OAuth2SecurityScheme { - constructor(public flows: OAuthFlows, initializer?: DeepPartial) { + constructor( + public flows: OAuthFlows, + initializer?: DeepPartial, + ) { super(); this.type = SecurityType.OAuth2; this.apply(initializer); @@ -136,7 +149,10 @@ export interface OpenIdConnectSecurityScheme extends Extensions { } export class OpenIdConnectSecurityScheme extends Initializer implements OpenIdConnectSecurityScheme { - constructor(public openIdConnectUrl: string, initializer?: DeepPartial) { + constructor( + public openIdConnectUrl: string, + initializer?: DeepPartial, + ) { super(); this.type = SecurityType.OpenIDConnect; this.apply(initializer); @@ -152,7 +168,10 @@ export interface PasswordOAuthFlow extends Extensions { export class PasswordOAuthFlow extends Initializer implements PasswordOAuthFlow { scopes: Record = {}; - constructor(public tokenUrl: string, initializer?: DeepPartial) { + constructor( + public tokenUrl: string, + initializer?: DeepPartial, + ) { super(); this.apply(initializer); } @@ -171,7 +190,10 @@ export class AuthorizationCodeOAuthFlow extends Initializer implements Authoriza } export class ClientCredentialsFlow extends Initializer implements ClientCredentialsFlow { scopes: Record = {}; - constructor(public tokenUrl: string, initializer?: DeepPartial) { + constructor( + public tokenUrl: string, + initializer?: DeepPartial, + ) { super(); this.apply(initializer); } diff --git a/packages/libs/common/package.json b/packages/libs/common/package.json index 3674b80c8b..edf5329888 100644 --- a/packages/libs/common/package.json +++ b/packages/libs/common/package.json @@ -29,19 +29,19 @@ "homepage": "https://github.com/Azure/autorest/tree/main/packages/libs/common", "devDependencies": { "@types/jest": "^29.2.3", - "@types/node": "~14.14.20", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", + "@types/node": "~20.9.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", "@types/cli-progress": "~3.9.2", - "eslint-plugin-jest": "~27.1.5", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "jest": "^29.3.1", - "rimraf": "^3.0.2", - "typescript": "~4.9.3" + "rimraf": "^5.0.5", + "typescript": "~5.2.2" }, "dependencies": { "@azure-tools/datastore": "~4.7.1", diff --git a/packages/libs/common/src/exceptions/exceptions.ts b/packages/libs/common/src/exceptions/exceptions.ts index cde33106cf..c3f721010a 100644 --- a/packages/libs/common/src/exceptions/exceptions.ts +++ b/packages/libs/common/src/exceptions/exceptions.ts @@ -4,7 +4,10 @@ *--------------------------------------------------------------------------------------------*/ export class Exception extends Error { - constructor(message: string, public exitCode: number = 1) { + constructor( + message: string, + public exitCode: number = 1, + ) { super(message.includes("[") ? message : `[Exception] ${message}`); Object.setPrototypeOf(this, Exception.prototype); @@ -12,7 +15,10 @@ export class Exception extends Error { } export class OperationCanceledException extends Exception { - constructor(message = "Cancelation Requested", public exitCode: number = 1) { + constructor( + message = "Cancelation Requested", + public exitCode: number = 1, + ) { super(`[OperationCanceledException] ${message}`, exitCode); Object.setPrototypeOf(this, OperationCanceledException.prototype); } diff --git a/packages/libs/configuration/package.json b/packages/libs/configuration/package.json index 6b9dd08c91..615e6cd0d2 100644 --- a/packages/libs/configuration/package.json +++ b/packages/libs/configuration/package.json @@ -32,19 +32,19 @@ "@types/commonmark": "^0.27.0", "@types/jest": "^29.2.3", "@types/lodash": "~4.14.168", - "@types/node": "~14.14.20", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", - "eslint-plugin-jest": "~27.1.5", + "@types/node": "~20.9.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "jest": "^29.3.1", - "rimraf": "^3.0.2", + "rimraf": "^5.0.5", "ts-jest": "^29.0.3", - "typescript": "~4.9.3" + "typescript": "~5.2.2" }, "dependencies": { "@autorest/common": "~1.5.6", @@ -54,7 +54,7 @@ "@azure-tools/async-io": "~3.0.0", "@azure-tools/json": "~1.2.3", "@azure-tools/yaml": "~1.1.1", - "commonmark": "^0.27.0", + "commonmark": "^0.30.0", "lodash": "~4.17.20", "untildify": "^4.0.0" } diff --git a/packages/libs/configuration/src/configuration-manager/configuration-manager.ts b/packages/libs/configuration/src/configuration-manager/configuration-manager.ts index 160d6f90aa..c2c103f356 100644 --- a/packages/libs/configuration/src/configuration-manager/configuration-manager.ts +++ b/packages/libs/configuration/src/configuration-manager/configuration-manager.ts @@ -31,7 +31,10 @@ type ConfigurationItem = ConfigurationFile | SimpleConfiguration; export class ConfigurationManager { private configItems: ConfigurationItem[] = []; - public constructor(private configFileOrFolderUri: string, private fileSystem: IFileSystem) {} + public constructor( + private configFileOrFolderUri: string, + private fileSystem: IFileSystem, + ) {} public async addConfig(config: AutorestNormalizedConfiguration) { this.configItems.push({ type: "simple", config: await desugarRawConfig(config) }); diff --git a/packages/libs/configuration/src/utils.ts b/packages/libs/configuration/src/utils.ts index c246e3aa71..772455b15b 100644 --- a/packages/libs/configuration/src/utils.ts +++ b/packages/libs/configuration/src/utils.ts @@ -37,10 +37,10 @@ export function getLogLevel(config: LogOptions): LogLevel { return config.debug ? "debug" : config.verbose - ? "verbose" - : config.level && isValidLogLevel(config.level) - ? config.level - : "information"; + ? "verbose" + : config.level && isValidLogLevel(config.level) + ? config.level + : "information"; } export function isValidLogLevel(level: string): level is LogLevel { diff --git a/packages/libs/datastore/package.json b/packages/libs/datastore/package.json index 9b245ea893..1b00450d1f 100644 --- a/packages/libs/datastore/package.json +++ b/packages/libs/datastore/package.json @@ -38,19 +38,19 @@ "devDependencies": { "@types/jest": "^29.2.3", "@types/lodash": "~4.14.168", - "@types/node": "~14.14.20", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", - "eslint-plugin-jest": "~27.1.5", + "@types/node": "~20.9.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "jest": "^29.3.1", - "rimraf": "^3.0.2", + "rimraf": "^5.0.5", "ts-jest": "^29.0.3", - "typescript": "~4.9.3" + "typescript": "~5.2.2" }, "dependencies": { "@azure-tools/codegen": "~2.9.2", @@ -61,6 +61,6 @@ "@azure/logger": "^1.0.2", "lodash": "~4.17.20", "jsonpath-plus": "~6.0.1", - "source-map": "0.7.3" + "source-map": "^0.8.0-beta.0" } } diff --git a/packages/libs/datastore/src/data-store/data-handle.ts b/packages/libs/datastore/src/data-store/data-handle.ts index 0f74e38389..c2ea0d55e9 100644 --- a/packages/libs/datastore/src/data-store/data-handle.ts +++ b/packages/libs/datastore/src/data-store/data-handle.ts @@ -30,12 +30,16 @@ export interface Data { } export class DataHandle { - private unloadTimer: NodeJS.Timer | undefined; + private unloadTimer: NodeJS.Timeout | undefined; /** - * @param autoUnload If the data unhandle should automatically unload files after they are not used for a while. + * @param autoUnload If the data unhandled should automatically unload files after they are not used for a while. */ - constructor(public readonly key: string, private item: Data, private autoUnload = true) { + constructor( + public readonly key: string, + private item: Data, + private autoUnload = true, + ) { // start the clock once this has been created. // this ensures that the data cache will be flushed if not // used in a reasonable amount of time diff --git a/packages/libs/datastore/src/data-store/quick-data-source.ts b/packages/libs/datastore/src/data-store/quick-data-source.ts index 02c677fce0..3bacda8d04 100644 --- a/packages/libs/datastore/src/data-store/quick-data-source.ts +++ b/packages/libs/datastore/src/data-store/quick-data-source.ts @@ -3,7 +3,10 @@ import { DataSource } from "./data-source"; import { PipeState } from "./misc"; export class QuickDataSource extends DataSource { - public constructor(private handles: Array, pipeState?: PipeState) { + public constructor( + private handles: Array, + pipeState?: PipeState, + ) { super(); this.pipeState = pipeState || {}; } diff --git a/packages/libs/datastore/src/data-store/read-through-data-source.ts b/packages/libs/datastore/src/data-store/read-through-data-source.ts index 2a8ef5734c..da9d8be83f 100644 --- a/packages/libs/datastore/src/data-store/read-through-data-source.ts +++ b/packages/libs/datastore/src/data-store/read-through-data-source.ts @@ -9,7 +9,10 @@ export class ReadThroughDataSource extends DataSource { private uris: Array = []; private cache: { [uri: string]: Promise } = {}; - constructor(private store: DataStore, private fs: IFileSystem) { + constructor( + private store: DataStore, + private fs: IFileSystem, + ) { super(); } diff --git a/packages/libs/datastore/src/file-system/errors.ts b/packages/libs/datastore/src/file-system/errors.ts index e642be8825..932e4ddc83 100644 --- a/packages/libs/datastore/src/file-system/errors.ts +++ b/packages/libs/datastore/src/file-system/errors.ts @@ -4,7 +4,10 @@ export class FileSystemError extends Error {} * Error representing a uri not found. */ export class UriNotFoundError extends FileSystemError { - public constructor(public uri: string, message?: string) { + public constructor( + public uri: string, + message?: string, + ) { super(message ?? `${uri} not found.`); } } diff --git a/packages/libs/datastore/src/mapping-tree/mapping-tree.ts b/packages/libs/datastore/src/mapping-tree/mapping-tree.ts index 4aa295e76a..08dd89eeaf 100644 --- a/packages/libs/datastore/src/mapping-tree/mapping-tree.ts +++ b/packages/libs/datastore/src/mapping-tree/mapping-tree.ts @@ -52,8 +52,8 @@ export interface MappingTreeArray extends ReadonlyArray> { export type MappingTreeItem = T extends Array ? MappingTreeArray : T extends {} - ? MappingTreeObject - : T; + ? MappingTreeObject + : T; /** * Create a proxy tree diff --git a/packages/libs/datastore/src/source-map/source-map-data.ts b/packages/libs/datastore/src/source-map/source-map-data.ts index 2900e97d8d..9946bdfeee 100644 --- a/packages/libs/datastore/src/source-map/source-map-data.ts +++ b/packages/libs/datastore/src/source-map/source-map-data.ts @@ -6,7 +6,10 @@ import fs from "fs"; export abstract class SourceMapData { private data: { value: T; status: "loaded" } | { status: "unloaded" }; - public constructor(private filename: string, value: T) { + public constructor( + private filename: string, + value: T, + ) { this.data = { value, status: "loaded" }; } diff --git a/packages/libs/deduplication/package.json b/packages/libs/deduplication/package.json index 332cbc0ef8..87b8c75779 100644 --- a/packages/libs/deduplication/package.json +++ b/packages/libs/deduplication/package.json @@ -38,25 +38,25 @@ "devDependencies": { "@types/jest": "^29.2.3", "@types/lodash": "~4.14.168", - "@types/node": "~14.14.20", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", - "eslint-plugin-jest": "~27.1.5", + "@types/node": "~20.9.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "jest": "^29.3.1", - "rimraf": "^3.0.2", - "typescript": "~4.9.3" + "rimraf": "^5.0.5", + "typescript": "~5.2.2" }, "dependencies": { "@azure-tools/codegen": "~2.9.2", "@azure-tools/datastore": "~4.7.1", "@azure-tools/object-comparison": "~3.0.0", "@azure-tools/tasks": "~3.0.0", - "compare-versions": "^3.4.0", + "compare-versions": "^6.1.0", "lodash": "~4.17.20" } } diff --git a/packages/libs/deduplication/src/main.ts b/packages/libs/deduplication/src/main.ts index 5da3e9002a..9c0e6c29ec 100644 --- a/packages/libs/deduplication/src/main.ts +++ b/packages/libs/deduplication/src/main.ts @@ -7,7 +7,7 @@ import { toSemver, maximum } from "@azure-tools/codegen"; import { visit } from "@azure-tools/datastore"; import { areSimilar } from "@azure-tools/object-comparison"; import { YieldCPU } from "@azure-tools/tasks"; -import compareVersions from "compare-versions"; +import { compareVersions } from "compare-versions"; import { cloneDeep } from "lodash"; type componentType = @@ -99,7 +99,10 @@ export class Deduplicator { // initially the target is the same as the original object private target: any; - constructor(originalFile: any, protected deduplicateInlineModels = false) { + constructor( + originalFile: any, + protected deduplicateInlineModels = false, + ) { this.target = cloneDeep(originalFile); this.target.info["x-ms-metadata"].deduplicated = true; } diff --git a/packages/libs/extension-base/package.json b/packages/libs/extension-base/package.json index 4b40706f45..c6a5c861bc 100644 --- a/packages/libs/extension-base/package.json +++ b/packages/libs/extension-base/package.json @@ -32,20 +32,20 @@ "license": "MIT", "devDependencies": { "@types/js-yaml": "~4.0.0", - "@types/node": "~14.14.20", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", - "eslint-plugin-jest": "~27.1.5", + "@types/node": "~20.9.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", - "rimraf": "^3.0.2", - "typescript": "~4.9.3" + "rimraf": "^5.0.5", + "typescript": "~5.2.2" }, "dependencies": { - "js-yaml": "~4.0.0", + "js-yaml": "~4.1.0", "vscode-jsonrpc": "^3.5.0", "@azure-tools/codegen": "~2.9.2" } diff --git a/packages/libs/extension-base/src/extension-host.ts b/packages/libs/extension-base/src/extension-host.ts index de6acdbb96..adfef1d093 100644 --- a/packages/libs/extension-base/src/extension-host.ts +++ b/packages/libs/extension-base/src/extension-host.ts @@ -91,7 +91,10 @@ export interface AutorestExtensionHost { export class AutorestExtensionRpcHost implements AutorestExtensionHost { public logger: AutorestExtensionLogger; - public constructor(private channel: MessageConnection, private sessionId: string) { + public constructor( + private channel: MessageConnection, + private sessionId: string, + ) { this.logger = new AutorestExtensionLogger((x) => this.message(x)); } /** diff --git a/packages/libs/extension/package.json b/packages/libs/extension/package.json index 9959772aaa..eb8f8a7ef3 100644 --- a/packages/libs/extension/package.json +++ b/packages/libs/extension/package.json @@ -47,29 +47,29 @@ "npm-package-arg": "^9.0.0", "npm": "~8.12.1", "pacote": "~9.5.12", - "rimraf": "^3.0.2", + "rimraf": "^5.0.5", "semver": "^7.3.5", "yarn": "1.22.17" }, "devDependencies": { "@types/jest": "^29.2.3", "@types/command-exists": "~1.2.0", - "@types/node": "~14.14.20", + "@types/node": "~20.9.0", "@types/npm-package-arg": "^6.1.0", "@types/pacote": "11.1.3", "@types/semver": "5.5.0", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", - "cpy-cli": "~4.1.0", - "eslint-plugin-jest": "~27.1.5", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "cpy-cli": "~5.0.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "jest": "^29.3.1", - "mkdirp": "~0.5.1", + "mkdirp": "~3.0.1", "source-map-support": "^0.5.19", - "typescript": "~4.9.3" + "typescript": "~5.2.2" } } diff --git a/packages/libs/extension/src/extension/extension.ts b/packages/libs/extension/src/extension/extension.ts index 7e9bbf460b..dfadb34463 100644 --- a/packages/libs/extension/src/extension/extension.ts +++ b/packages/libs/extension/src/extension/extension.ts @@ -9,7 +9,10 @@ import { Package } from "./package"; * @extends Package * */ export class Extension extends Package { - /* @internal */ public constructor(pkg: Package, private installationPath: string) { + /* @internal */ public constructor( + pkg: Package, + private installationPath: string, + ) { super(pkg.resolvedInfo, pkg.packageMetadata, pkg.extensionManager); } /** diff --git a/packages/libs/extension/src/extension/local-extension.ts b/packages/libs/extension/src/extension/local-extension.ts index 099c30a927..8d8c4c73df 100644 --- a/packages/libs/extension/src/extension/local-extension.ts +++ b/packages/libs/extension/src/extension/local-extension.ts @@ -6,7 +6,10 @@ import { Package } from "./package"; * @extends Extension * */ export class LocalExtension extends Extension { - public constructor(pkg: Package, private extensionPath: string) { + public constructor( + pkg: Package, + private extensionPath: string, + ) { super(pkg, ""); } diff --git a/packages/libs/json/package.json b/packages/libs/json/package.json index 350d25d787..bc1ea8d4fd 100644 --- a/packages/libs/json/package.json +++ b/packages/libs/json/package.json @@ -29,18 +29,17 @@ "homepage": "https://github.com/Azure/autorest/tree/main/packages/libs/json", "devDependencies": { "@types/jest": "^29.2.3", - "@types/node": "~14.14.20", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", - "eslint-plugin-jest": "~27.1.5", + "@types/node": "~20.9.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "jest": "^29.3.1", - "rimraf": "^3.0.2", - "typescript": "~4.9.3" - }, - "dependencies": {} + "rimraf": "^5.0.5", + "typescript": "~5.2.2" + } } diff --git a/packages/libs/jsonschema/package.json b/packages/libs/jsonschema/package.json index d259ca1770..846fc89314 100644 --- a/packages/libs/jsonschema/package.json +++ b/packages/libs/jsonschema/package.json @@ -29,18 +29,17 @@ "homepage": "https://github.com/Azure/autorest/tree/main/packages/libs/jsonschema", "devDependencies": { "@types/jest": "^29.2.3", - "@types/node": "~14.14.20", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", - "eslint-plugin-jest": "~27.1.5", + "@types/node": "~20.9.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "jest": "^29.3.1", - "rimraf": "^3.0.2", - "typescript": "~4.9.3" - }, - "dependencies": {} + "rimraf": "^5.0.5", + "typescript": "~5.2.2" + } } diff --git a/packages/libs/oai2-to-oai3/package.json b/packages/libs/oai2-to-oai3/package.json index edb8d9f847..128707fcd2 100644 --- a/packages/libs/oai2-to-oai3/package.json +++ b/packages/libs/oai2-to-oai3/package.json @@ -39,25 +39,25 @@ "@autorest/test-utils": "~0.5.3", "@types/jest": "^29.2.3", "@types/js-yaml": "~4.0.0", - "@types/node": "~14.14.20", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", - "eslint-plugin-jest": "~27.1.5", + "@types/node": "~20.9.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "jest": "^29.3.1", - "rimraf": "^3.0.2", + "rimraf": "^5.0.5", "source-map-support": "^0.5.19", "ts-jest": "^29.0.3", - "typescript": "~4.9.3" + "typescript": "~5.2.2" }, "dependencies": { "@azure-tools/datastore": "~4.7.1", "@azure-tools/openapi": "~3.5.0", "@azure-tools/json": "~1.2.3", - "source-map": "0.7.3" + "source-map": "^0.8.0-beta.0" } } diff --git a/packages/libs/openapi/package.json b/packages/libs/openapi/package.json index 2e47d1c979..f7718e4321 100644 --- a/packages/libs/openapi/package.json +++ b/packages/libs/openapi/package.json @@ -55,18 +55,18 @@ "readme": "https://github.com/Azure/autorest/tree/main/packages/libs/openapi/readme.md", "devDependencies": { "@types/jest": "^29.2.3", - "@types/node": "~14.14.20", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", - "eslint-plugin-jest": "~27.1.5", + "@types/node": "~20.9.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "jest": "^29.3.1", - "rimraf": "^3.0.2", - "typescript": "~4.9.3" + "rimraf": "^5.0.5", + "typescript": "~5.2.2" }, "dependencies": { "@azure-tools/json": "~1.2.3", diff --git a/packages/libs/system-requirements/package.json b/packages/libs/system-requirements/package.json index 1eb18899b0..63db102075 100644 --- a/packages/libs/system-requirements/package.json +++ b/packages/libs/system-requirements/package.json @@ -42,19 +42,19 @@ "devDependencies": { "@types/jest": "^29.2.3", "@types/command-exists": "~1.2.0", - "@types/node": "~14.14.20", + "@types/node": "~20.9.0", "@types/semver": "5.5.0", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", - "eslint-plugin-jest": "~27.1.5", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", - "rimraf": "^3.0.2", + "rimraf": "^5.0.5", "jest": "^29.3.1", "source-map-support": "^0.5.19", - "typescript": "~4.9.3" + "typescript": "~5.2.2" } } diff --git a/packages/libs/yaml/package.json b/packages/libs/yaml/package.json index b9f4525070..3c0cd92f16 100644 --- a/packages/libs/yaml/package.json +++ b/packages/libs/yaml/package.json @@ -31,21 +31,21 @@ "@types/jest": "^29.2.3", "@types/js-yaml": "~4.0.0", "@types/lodash": "~4.14.168", - "@types/node": "~14.14.20", - "@typescript-eslint/eslint-plugin": "^5.27.0", - "@typescript-eslint/parser": "^5.27.0", - "eslint-plugin-jest": "~27.1.5", + "@types/node": "~20.9.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-plugin-jest": "~27.6.0", "eslint-plugin-node": "~11.1.0", - "eslint-plugin-prettier": "~4.2.1", - "eslint-plugin-unicorn": "~44.0.2", - "eslint-plugin-import": "~2.26.0", + "eslint-plugin-prettier": "~5.0.1", + "eslint-plugin-unicorn": "~49.0.0", + "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", "jest": "^29.3.1", - "rimraf": "^3.0.2", - "typescript": "~4.9.3" + "rimraf": "^5.0.5", + "typescript": "~5.2.2" }, "dependencies": { - "js-yaml": "~4.0.0", + "js-yaml": "~4.1.0", "lodash": "~4.17.20", "yaml-ast-parser": "0.0.43" } diff --git a/packages/libs/yaml/src/parser.ts b/packages/libs/yaml/src/parser.ts index eaedb48e66..b38a525d9c 100644 --- a/packages/libs/yaml/src/parser.ts +++ b/packages/libs/yaml/src/parser.ts @@ -94,8 +94,8 @@ function computeScalarNodeValue(yamlNodeScalar: YamlScalar, cache: WeakMap=12.0.0", // Disabling this during migration of other repos as it is causing issues. From 980e2f5110cc3e373c5ee2309aa63065ededacf3 Mon Sep 17 00:00:00 2001 From: Xiaogang Date: Thu, 16 Nov 2023 12:38:16 +0800 Subject: [PATCH 02/33] set autorest.powershell v4 as default version loaded by autorest (#4793) * set autorest.powershell v4 as default version loaded by autorest * Add change description for @autorest/configuration --------- Co-authored-by: Timothee Guerin --- .../setv4forpowershell_2023-11-15-04-44.json | 10 ++++++++++ .../libs/configuration/resources/plugin-powershell.md | 4 ++-- .../src/configuration-loader/configuration-loader.ts | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 common/changes/@autorest/configuration/setv4forpowershell_2023-11-15-04-44.json diff --git a/common/changes/@autorest/configuration/setv4forpowershell_2023-11-15-04-44.json b/common/changes/@autorest/configuration/setv4forpowershell_2023-11-15-04-44.json new file mode 100644 index 0000000000..7fe8cbd200 --- /dev/null +++ b/common/changes/@autorest/configuration/setv4forpowershell_2023-11-15-04-44.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/configuration", + "comment": "Set autorest.powershell v4 the default version loaded by autorest", + "type": "minor" + } + ], + "packageName": "@autorest/configuration" +} \ No newline at end of file diff --git a/packages/libs/configuration/resources/plugin-powershell.md b/packages/libs/configuration/resources/plugin-powershell.md index 0bf2a89bae..4d4a74ddf4 100644 --- a/packages/libs/configuration/resources/plugin-powershell.md +++ b/packages/libs/configuration/resources/plugin-powershell.md @@ -12,7 +12,7 @@ try-require: ./readme.powershell.md Note: if the --powershell is mentioned, but they are using autorest.powershell locally, don't try to load the autorest.powershell from npm. ```yaml $(powershell) && !isLoaded('@autorest/powershell') -# load the extension (3.0+) +# load the extension (4.0+) use-extension: - "@autorest/powershell": "~3.0.0" + "@autorest/powershell": "~4.0.0" ``` diff --git a/packages/libs/configuration/src/configuration-loader/configuration-loader.ts b/packages/libs/configuration/src/configuration-loader/configuration-loader.ts index fc2f1aaa2b..25419db62f 100644 --- a/packages/libs/configuration/src/configuration-loader/configuration-loader.ts +++ b/packages/libs/configuration/src/configuration-loader/configuration-loader.ts @@ -268,7 +268,7 @@ export class ConfigurationLoader { // Add a hint here to make legacy users to be aware that the default version has been bumped to 3.0+. if (shortname === "powershell") { this.logger.info( - `\n## The default version of @autorest/powershell has been bumped from 2.1+ to 3.0+.\n > If you still want to use 2.1+ version, please specify it with --use:@autorest/powershell@2.1.{x}, e.g 2.1.401.\n`, + `\n## The default version of @autorest/powershell has been bumped from 3.0+ to 4.0+.\n > If you still want to use 3.0+ version, please specify it with --use:@autorest/powershell@3.0.{x}, e.g 3.0.512.\n`, ); } From 2165e9d3772e1b540a8ec822b62e4daf83b59426 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 15 Nov 2023 21:24:34 -0800 Subject: [PATCH 03/33] Auto release pipeline (#4796) --- .../workflows/prepare-auto-release-branch.yml | 34 +++++++++++++++++++ CONTRIBUTING.md | 4 +++ cspell.yaml | 1 + eng/scripts/publish.mjs | 23 +++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 .github/workflows/prepare-auto-release-branch.yml create mode 100644 eng/scripts/publish.mjs diff --git a/.github/workflows/prepare-auto-release-branch.yml b/.github/workflows/prepare-auto-release-branch.yml new file mode 100644 index 0000000000..b95dc42d6d --- /dev/null +++ b/.github/workflows/prepare-auto-release-branch.yml @@ -0,0 +1,34 @@ +name: Prepare Auto Release Branch + +on: + push: + branches: + - main + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +permissions: + pull-requests: write + contents: write + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v2 + + - name: Setup Node.js 18.x + uses: actions/setup-node@v2 + with: + node-version: 18.x + + - run: node common/scripts/install-run-rush.js install + name: Install dependencies + + - name: Create release branch + run: node ./eng/publish.mjs + + - run: node common/scripts/install-run-rush.js update + name: Regen lock file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bad1645c55..6ba3116501 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,9 @@ # Developping autorest +Branch `publish/auto-release` should be automatically updated with the latest changelog. Give it 5min after merging a PR or check the status of the [Release action](https://github.com/Azure/autorest/actions/workflows/release.yml) + +Then go to https://github.com/Azure/autorest/pull/new/publish/auto-release and create this PR. + ## Requirements - `node` (LTS recommended) diff --git a/cspell.yaml b/cspell.yaml index dddfc70877..701790b3e5 100644 --- a/cspell.yaml +++ b/cspell.yaml @@ -9,4 +9,5 @@ words: - autorest - codemodel - Deduplicator + - Regen - yada diff --git a/eng/scripts/publish.mjs b/eng/scripts/publish.mjs new file mode 100644 index 0000000000..cb10d97295 --- /dev/null +++ b/eng/scripts/publish.mjs @@ -0,0 +1,23 @@ +import { execSync } from "child_process"; + +const branchName = "publish/auto-release"; + +execSync(`node common/scripts/install-run-rush.js publish --apply`); +const stdout = execSync(`git status --porcelain`).toString(); + +if (stdout.trim() !== "") { + console.log("Commiting the following changes:\n", stdout); + + execSync( + `git -c user.email=autochangesetbot@microsoft.com -c user.name="Microsoft Auto Changeset Bot" commit -am "Bump versions"`, + ); + execSync(`git push origin HEAD:${branchName} --force`); + + console.log(); + console.log("-".repeat(160)); + console.log("| Link to create the PR"); + console.log(`| https://github.com/Azure/autorest/pull/new/${branchName} `); + console.log("-".repeat(160)); +} else { + console.log("No changes to publish"); +} From 0ff63ea46efeb4614b506040333fc8b3adda2c41 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Thu, 16 Nov 2023 07:53:45 -0800 Subject: [PATCH 04/33] Fix auto release (#4798) --- .github/workflows/prepare-auto-release-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prepare-auto-release-branch.yml b/.github/workflows/prepare-auto-release-branch.yml index b95dc42d6d..9dea1e1d2b 100644 --- a/.github/workflows/prepare-auto-release-branch.yml +++ b/.github/workflows/prepare-auto-release-branch.yml @@ -28,7 +28,7 @@ jobs: name: Install dependencies - name: Create release branch - run: node ./eng/publish.mjs + run: node ./eng/scripts/publish.mjs - run: node common/scripts/install-run-rush.js update name: Regen lock file From d9a71585ada4e499aa8f494251634c12ed229ebd Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Thu, 16 Nov 2023 07:59:23 -0800 Subject: [PATCH 05/33] Fix changelogs (#4799) --- packages/apps/autorest/CHANGELOG.json | 1 + packages/extensions/core/CHANGELOG.json | 1 + packages/extensions/modelerfour/CHANGELOG.json | 12 ++++++++++++ packages/libs/oai2-to-oai3/CHANGELOG.json | 2 ++ 4 files changed, 16 insertions(+) diff --git a/packages/apps/autorest/CHANGELOG.json b/packages/apps/autorest/CHANGELOG.json index 03d1aa8462..6814b316f7 100644 --- a/packages/apps/autorest/CHANGELOG.json +++ b/packages/apps/autorest/CHANGELOG.json @@ -518,6 +518,7 @@ { "version": "3.0.x", "date": "Mon, 10 Feb 2020 00:00:00 GMT", + "tag": "autorest_v3.0.0", "comments": { "patch": [ { diff --git a/packages/extensions/core/CHANGELOG.json b/packages/extensions/core/CHANGELOG.json index 5945660a58..8fb9bb4408 100644 --- a/packages/extensions/core/CHANGELOG.json +++ b/packages/extensions/core/CHANGELOG.json @@ -1342,6 +1342,7 @@ { "version": "3.0.x", "date": "Tue, 4 Feb 2020 00:00:00 GMT", + "tag": "@autorest/core_v3.0.0", "comments": { "patch": [ { diff --git a/packages/extensions/modelerfour/CHANGELOG.json b/packages/extensions/modelerfour/CHANGELOG.json index 354cadf1d3..58a7028cd8 100644 --- a/packages/extensions/modelerfour/CHANGELOG.json +++ b/packages/extensions/modelerfour/CHANGELOG.json @@ -872,6 +872,7 @@ }, { "version": "4.15.x", + "tag": "@autorest/modelerfour_v4.15.0", "comments": { "patch": [ { @@ -906,6 +907,7 @@ }, { "version": "4.14.x", + "tag": "@autorest/modelerfour_v4.14.0", "comments": { "patch": [ { @@ -919,6 +921,8 @@ }, { "version": "4.13.x", + "tag": "@autorest/modelerfour_v4.13.0", + "comments": { "patch": [ { @@ -941,6 +945,7 @@ }, { "version": "4.12.x", + "tag": "@autorest/modelerfour_v4.12.0", "comments": { "patch": [ { @@ -987,6 +992,7 @@ }, { "version": "4.6.x", + "tag": "@autorest/modelerfour_v4.6.0", "comments": { "patch": [ { @@ -1006,6 +1012,7 @@ }, { "version": "4.5.x", + "tag": "@autorest/modelerfour_v4.5.0", "comments": { "patch": [ { @@ -1025,6 +1032,7 @@ }, { "version": "4.4.x", + "tag": "@autorest/modelerfour_v4.4.0", "comments": { "patch": [ { @@ -1038,6 +1046,7 @@ }, { "version": "4.3.x", + "tag": "@autorest/modelerfour_v4.3.0", "comments": { "patch": [ { @@ -1069,6 +1078,7 @@ }, { "version": "4.2.75", + "tag": "@autorest/modelerfour_v4.2.75", "comments": { "patch": [ { @@ -1097,6 +1107,7 @@ }, { "version": "4.1.60", + "tag": "@autorest/modelerfour_v4.1.60", "comments": { "patch": [ { @@ -1107,6 +1118,7 @@ }, { "version": "4.1.58", + "tag": "@autorest/modelerfour_v4.1.58", "comments": { "patch": [ { diff --git a/packages/libs/oai2-to-oai3/CHANGELOG.json b/packages/libs/oai2-to-oai3/CHANGELOG.json index 3461acda7f..3b58019108 100644 --- a/packages/libs/oai2-to-oai3/CHANGELOG.json +++ b/packages/libs/oai2-to-oai3/CHANGELOG.json @@ -313,6 +313,7 @@ { "version": "4.2.0", "date": "Thu, 04 Feb 2021 19:05:18 GMT", + "tag": "@azure-tools/oai2-to-oai3_v4.2.0", "comments": { "minor": [ { @@ -324,6 +325,7 @@ { "version": "4.1.0", "date": "Thu, 04 Feb 2021 19:05:18 GMT", + "tag":"@azure-tools/oai2-to-oai3_v4.1.0", "comments": { "minor": [ { From fe71a68f5f65dcb48340a6bb350e9f583b838571 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Thu, 16 Nov 2023 08:53:19 -0800 Subject: [PATCH 06/33] Publish auto release (#4797) Co-authored-by: Microsoft Auto Changeset Bot --- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- .../setv4forpowershell_2023-11-15-04-44.json | 10 ---- ...e-node-14-16-support_2023-11-15-16-42.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-16-42.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-16-42.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-16-42.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-17-04.json | 10 ---- ...e-node-14-16-support_2023-11-15-16-42.json | 10 ---- packages/apps/autorest/CHANGELOG.json | 26 ++++++++++ packages/apps/autorest/CHANGELOG.md | 9 +++- packages/apps/autorest/package.json | 10 ++-- packages/extensions/cadl/CHANGELOG.json | 17 +++++++ packages/extensions/cadl/CHANGELOG.md | 9 +++- packages/extensions/cadl/package.json | 4 +- packages/extensions/core/CHANGELOG.json | 50 +++++++++++++++++++ packages/extensions/core/CHANGELOG.md | 9 +++- packages/extensions/core/package.json | 26 +++++----- .../extensions/modelerfour/CHANGELOG.json | 33 +++++++++++- packages/extensions/modelerfour/CHANGELOG.md | 9 +++- packages/extensions/modelerfour/package.json | 14 +++--- .../extensions/openapi-to-cadl/CHANGELOG.json | 23 +++++++++ .../extensions/openapi-to-cadl/CHANGELOG.md | 9 +++- .../extensions/openapi-to-cadl/package.json | 8 +-- packages/libs/codegen/CHANGELOG.json | 12 +++++ packages/libs/codegen/CHANGELOG.md | 9 +++- packages/libs/codegen/package.json | 2 +- packages/libs/codemodel/CHANGELOG.json | 17 +++++++ packages/libs/codemodel/CHANGELOG.md | 9 +++- packages/libs/codemodel/package.json | 4 +- packages/libs/common/CHANGELOG.json | 23 +++++++++ packages/libs/common/CHANGELOG.md | 9 +++- packages/libs/common/package.json | 8 +-- packages/libs/configuration/CHANGELOG.json | 35 +++++++++++++ packages/libs/configuration/CHANGELOG.md | 10 +++- packages/libs/configuration/package.json | 14 +++--- packages/libs/datastore/CHANGELOG.json | 23 +++++++++ packages/libs/datastore/CHANGELOG.md | 9 +++- packages/libs/datastore/package.json | 8 +-- packages/libs/deduplication/CHANGELOG.json | 20 ++++++++ packages/libs/deduplication/CHANGELOG.md | 9 +++- packages/libs/deduplication/package.json | 6 +-- packages/libs/extension-base/CHANGELOG.json | 17 +++++++ packages/libs/extension-base/CHANGELOG.md | 9 +++- packages/libs/extension-base/package.json | 4 +- packages/libs/extension/CHANGELOG.json | 17 +++++++ packages/libs/extension/CHANGELOG.md | 9 +++- packages/libs/extension/package.json | 4 +- packages/libs/json/CHANGELOG.json | 12 +++++ packages/libs/json/CHANGELOG.md | 9 +++- packages/libs/json/package.json | 2 +- packages/libs/jsonschema/CHANGELOG.json | 12 +++++ packages/libs/jsonschema/CHANGELOG.md | 9 +++- packages/libs/jsonschema/package.json | 2 +- packages/libs/oai2-to-oai3/CHANGELOG.json | 28 ++++++++++- packages/libs/oai2-to-oai3/CHANGELOG.md | 9 +++- packages/libs/oai2-to-oai3/package.json | 10 ++-- packages/libs/openapi/CHANGELOG.json | 20 ++++++++ packages/libs/openapi/CHANGELOG.md | 9 +++- packages/libs/openapi/package.json | 6 +-- .../libs/system-requirements/CHANGELOG.json | 12 +++++ .../libs/system-requirements/CHANGELOG.md | 9 +++- .../libs/system-requirements/package.json | 2 +- packages/libs/yaml/CHANGELOG.json | 12 +++++ packages/libs/yaml/CHANGELOG.md | 9 +++- packages/libs/yaml/package.json | 2 +- .../testing/test-public-packages/package.json | 4 +- packages/testing/test-utils/CHANGELOG.json | 20 ++++++++ packages/testing/test-utils/CHANGELOG.md | 9 +++- packages/testing/test-utils/package.json | 6 +-- packages/tools/compare/CHANGELOG.json | 17 +++++++ packages/tools/compare/CHANGELOG.md | 9 +++- packages/tools/compare/package.json | 4 +- packages/tools/fixer/CHANGELOG.json | 12 +++++ packages/tools/fixer/CHANGELOG.md | 9 +++- packages/tools/fixer/package.json | 2 +- 90 files changed, 709 insertions(+), 330 deletions(-) delete mode 100644 common/changes/@autorest/cadl/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@autorest/codemodel/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@autorest/common/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@autorest/compare/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@autorest/configuration/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@autorest/configuration/setv4forpowershell_2023-11-15-04-44.json delete mode 100644 common/changes/@autorest/core/remove-node-14-16-support_2023-11-15-16-42.json delete mode 100644 common/changes/@autorest/extension-base/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@autorest/fixer/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@autorest/modelerfour/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@autorest/openapi-to-cadl/remove-node-14-16-support_2023-11-15-16-42.json delete mode 100644 common/changes/@autorest/system-requirements/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@autorest/test-utils/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@azure-tools/codegen/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@azure-tools/datastore/remove-node-14-16-support_2023-11-15-16-42.json delete mode 100644 common/changes/@azure-tools/deduplication/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@azure-tools/extension/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@azure-tools/json/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@azure-tools/jsonschema/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@azure-tools/oai2-to-oai3/remove-node-14-16-support_2023-11-15-16-42.json delete mode 100644 common/changes/@azure-tools/openapi/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/@azure-tools/yaml/remove-node-14-16-support_2023-11-15-17-04.json delete mode 100644 common/changes/autorest/remove-node-14-16-support_2023-11-15-16-42.json diff --git a/common/changes/@autorest/cadl/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/cadl/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index 4237d3abc3..0000000000 --- a/common/changes/@autorest/cadl/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/cadl", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@autorest/cadl" -} \ No newline at end of file diff --git a/common/changes/@autorest/codemodel/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/codemodel/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index a5f6e7b12a..0000000000 --- a/common/changes/@autorest/codemodel/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/codemodel", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@autorest/codemodel" -} \ No newline at end of file diff --git a/common/changes/@autorest/common/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/common/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index 9d45764135..0000000000 --- a/common/changes/@autorest/common/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/common", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@autorest/common" -} \ No newline at end of file diff --git a/common/changes/@autorest/compare/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/compare/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index 25b8fa2bee..0000000000 --- a/common/changes/@autorest/compare/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/compare", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@autorest/compare" -} \ No newline at end of file diff --git a/common/changes/@autorest/configuration/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/configuration/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index d67a978f2c..0000000000 --- a/common/changes/@autorest/configuration/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/configuration", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@autorest/configuration" -} \ No newline at end of file diff --git a/common/changes/@autorest/configuration/setv4forpowershell_2023-11-15-04-44.json b/common/changes/@autorest/configuration/setv4forpowershell_2023-11-15-04-44.json deleted file mode 100644 index 7fe8cbd200..0000000000 --- a/common/changes/@autorest/configuration/setv4forpowershell_2023-11-15-04-44.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/configuration", - "comment": "Set autorest.powershell v4 the default version loaded by autorest", - "type": "minor" - } - ], - "packageName": "@autorest/configuration" -} \ No newline at end of file diff --git a/common/changes/@autorest/core/remove-node-14-16-support_2023-11-15-16-42.json b/common/changes/@autorest/core/remove-node-14-16-support_2023-11-15-16-42.json deleted file mode 100644 index 0bfeaa932a..0000000000 --- a/common/changes/@autorest/core/remove-node-14-16-support_2023-11-15-16-42.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/core", - "comment": "Update dependencies", - "type": "minor" - } - ], - "packageName": "@autorest/core" -} \ No newline at end of file diff --git a/common/changes/@autorest/extension-base/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/extension-base/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index c70ee70bd9..0000000000 --- a/common/changes/@autorest/extension-base/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/extension-base", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@autorest/extension-base" -} \ No newline at end of file diff --git a/common/changes/@autorest/fixer/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/fixer/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index d36aea384a..0000000000 --- a/common/changes/@autorest/fixer/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/fixer", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@autorest/fixer" -} \ No newline at end of file diff --git a/common/changes/@autorest/modelerfour/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/modelerfour/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index d0240d1d27..0000000000 --- a/common/changes/@autorest/modelerfour/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/modelerfour", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@autorest/modelerfour" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-cadl/remove-node-14-16-support_2023-11-15-16-42.json b/common/changes/@autorest/openapi-to-cadl/remove-node-14-16-support_2023-11-15-16-42.json deleted file mode 100644 index d653a11a4b..0000000000 --- a/common/changes/@autorest/openapi-to-cadl/remove-node-14-16-support_2023-11-15-16-42.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-cadl", - "comment": "Update dependencies", - "type": "minor" - } - ], - "packageName": "@autorest/openapi-to-cadl" -} \ No newline at end of file diff --git a/common/changes/@autorest/system-requirements/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/system-requirements/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index 7075a5c8e7..0000000000 --- a/common/changes/@autorest/system-requirements/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/system-requirements", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@autorest/system-requirements" -} \ No newline at end of file diff --git a/common/changes/@autorest/test-utils/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@autorest/test-utils/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index f930621cc5..0000000000 --- a/common/changes/@autorest/test-utils/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/test-utils", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@autorest/test-utils" -} \ No newline at end of file diff --git a/common/changes/@azure-tools/codegen/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@azure-tools/codegen/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index a23e57e31f..0000000000 --- a/common/changes/@azure-tools/codegen/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@azure-tools/codegen", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@azure-tools/codegen" -} \ No newline at end of file diff --git a/common/changes/@azure-tools/datastore/remove-node-14-16-support_2023-11-15-16-42.json b/common/changes/@azure-tools/datastore/remove-node-14-16-support_2023-11-15-16-42.json deleted file mode 100644 index 15503c91d5..0000000000 --- a/common/changes/@azure-tools/datastore/remove-node-14-16-support_2023-11-15-16-42.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@azure-tools/datastore", - "comment": "Update dependencies", - "type": "minor" - } - ], - "packageName": "@azure-tools/datastore" -} \ No newline at end of file diff --git a/common/changes/@azure-tools/deduplication/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@azure-tools/deduplication/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index d9912da8d9..0000000000 --- a/common/changes/@azure-tools/deduplication/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@azure-tools/deduplication", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@azure-tools/deduplication" -} \ No newline at end of file diff --git a/common/changes/@azure-tools/extension/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@azure-tools/extension/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index 538a239f41..0000000000 --- a/common/changes/@azure-tools/extension/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@azure-tools/extension", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@azure-tools/extension" -} \ No newline at end of file diff --git a/common/changes/@azure-tools/json/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@azure-tools/json/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index 8141031878..0000000000 --- a/common/changes/@azure-tools/json/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@azure-tools/json", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@azure-tools/json" -} \ No newline at end of file diff --git a/common/changes/@azure-tools/jsonschema/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@azure-tools/jsonschema/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index f06d023c92..0000000000 --- a/common/changes/@azure-tools/jsonschema/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@azure-tools/jsonschema", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@azure-tools/jsonschema" -} \ No newline at end of file diff --git a/common/changes/@azure-tools/oai2-to-oai3/remove-node-14-16-support_2023-11-15-16-42.json b/common/changes/@azure-tools/oai2-to-oai3/remove-node-14-16-support_2023-11-15-16-42.json deleted file mode 100644 index d1150c99a3..0000000000 --- a/common/changes/@azure-tools/oai2-to-oai3/remove-node-14-16-support_2023-11-15-16-42.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@azure-tools/oai2-to-oai3", - "comment": "Update dependencies", - "type": "minor" - } - ], - "packageName": "@azure-tools/oai2-to-oai3" -} \ No newline at end of file diff --git a/common/changes/@azure-tools/openapi/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@azure-tools/openapi/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index c0d0152239..0000000000 --- a/common/changes/@azure-tools/openapi/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@azure-tools/openapi", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@azure-tools/openapi" -} \ No newline at end of file diff --git a/common/changes/@azure-tools/yaml/remove-node-14-16-support_2023-11-15-17-04.json b/common/changes/@azure-tools/yaml/remove-node-14-16-support_2023-11-15-17-04.json deleted file mode 100644 index 045d950b76..0000000000 --- a/common/changes/@azure-tools/yaml/remove-node-14-16-support_2023-11-15-17-04.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@azure-tools/yaml", - "comment": "Upgrade dependencies", - "type": "minor" - } - ], - "packageName": "@azure-tools/yaml" -} \ No newline at end of file diff --git a/common/changes/autorest/remove-node-14-16-support_2023-11-15-16-42.json b/common/changes/autorest/remove-node-14-16-support_2023-11-15-16-42.json deleted file mode 100644 index b6d6965598..0000000000 --- a/common/changes/autorest/remove-node-14-16-support_2023-11-15-16-42.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "autorest", - "comment": "Update dependencies", - "type": "minor" - } - ], - "packageName": "autorest" -} \ No newline at end of file diff --git a/packages/apps/autorest/CHANGELOG.json b/packages/apps/autorest/CHANGELOG.json index 6814b316f7..cb7475200c 100644 --- a/packages/apps/autorest/CHANGELOG.json +++ b/packages/apps/autorest/CHANGELOG.json @@ -1,6 +1,32 @@ { "name": "autorest", "entries": [ + { + "version": "3.7.0", + "tag": "autorest_v3.7.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Update dependencies" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@autorest/configuration\" from `~1.11.0` to `~1.12.0`" + }, + { + "comment": "Updating dependency \"@autorest/core\" from `~3.9.7` to `~3.10.0`" + }, + { + "comment": "Updating dependency \"@autorest/common\" from `~1.5.6` to `~1.6.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/extension\" from `~3.6.1` to `~3.7.0`" + } + ] + } + }, { "version": "3.6.3", "tag": "autorest_v3.6.3", diff --git a/packages/apps/autorest/CHANGELOG.md b/packages/apps/autorest/CHANGELOG.md index 7e93c93da1..0b50b045ec 100644 --- a/packages/apps/autorest/CHANGELOG.md +++ b/packages/apps/autorest/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - autorest -This log was last generated on Wed, 07 Dec 2022 22:24:34 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 3.7.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Update dependencies ## 3.6.3 Wed, 07 Dec 2022 22:24:34 GMT diff --git a/packages/apps/autorest/package.json b/packages/apps/autorest/package.json index cdcf305148..0ee74d4a63 100644 --- a/packages/apps/autorest/package.json +++ b/packages/apps/autorest/package.json @@ -1,6 +1,6 @@ { "name": "autorest", - "version": "3.6.3", + "version": "3.7.0", "description": "The AutoRest tool generates client libraries for accessing RESTful web services. Input to AutoRest is an OpenAPI spec that describes the REST API.", "engines": { "node": ">=12.0.0" @@ -43,11 +43,11 @@ }, "typings": "./dist/exports.d.ts", "devDependencies": { - "@autorest/configuration": "~1.11.0", - "@autorest/core": "~3.9.7", - "@autorest/common": "~1.5.6", + "@autorest/configuration": "~1.12.0", + "@autorest/core": "~3.10.0", + "@autorest/common": "~1.6.0", "@azure-tools/async-io": "~3.0.0", - "@azure-tools/extension": "~3.6.1", + "@azure-tools/extension": "~3.7.0", "@azure-tools/tasks": "~3.0.0", "@azure-tools/uri": "~3.1.1", "@types/commonmark": "^0.27.0", diff --git a/packages/extensions/cadl/CHANGELOG.json b/packages/extensions/cadl/CHANGELOG.json index 8285692481..aac11b1273 100644 --- a/packages/extensions/cadl/CHANGELOG.json +++ b/packages/extensions/cadl/CHANGELOG.json @@ -1,6 +1,23 @@ { "name": "@autorest/cadl", "entries": [ + { + "version": "0.3.0", + "tag": "@autorest/cadl_v0.3.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@autorest/extension-base\" from `~3.5.2` to `~3.6.0`" + } + ] + } + }, { "version": "0.2.2", "tag": "@autorest/cadl_v0.2.2", diff --git a/packages/extensions/cadl/CHANGELOG.md b/packages/extensions/cadl/CHANGELOG.md index dcd8a81e9a..8ca5399c28 100644 --- a/packages/extensions/cadl/CHANGELOG.md +++ b/packages/extensions/cadl/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @autorest/cadl -This log was last generated on Wed, 07 Dec 2022 22:24:34 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 0.3.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 0.2.2 Wed, 07 Dec 2022 22:24:34 GMT diff --git a/packages/extensions/cadl/package.json b/packages/extensions/cadl/package.json index 4957c7e528..cab8640ce0 100644 --- a/packages/extensions/cadl/package.json +++ b/packages/extensions/cadl/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/cadl", - "version": "0.2.2", + "version": "0.3.0", "description": "AutoRest Cadl plugin", "engines": { "node": ">=14.0.0" @@ -62,6 +62,6 @@ }, "dependencies": { "@cadl-lang/compiler": "^0.37.0", - "@autorest/extension-base": "~3.5.2" + "@autorest/extension-base": "~3.6.0" } } diff --git a/packages/extensions/core/CHANGELOG.json b/packages/extensions/core/CHANGELOG.json index 8fb9bb4408..575fcd85b9 100644 --- a/packages/extensions/core/CHANGELOG.json +++ b/packages/extensions/core/CHANGELOG.json @@ -1,6 +1,56 @@ { "name": "@autorest/core", "entries": [ + { + "version": "3.10.0", + "tag": "@autorest/core_v3.10.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Update dependencies" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@autorest/common\" from `~1.5.6` to `~1.6.0`" + }, + { + "comment": "Updating dependency \"@autorest/configuration\" from `~1.11.0` to `~1.12.0`" + }, + { + "comment": "Updating dependency \"@autorest/test-utils\" from `~0.5.3` to `~0.6.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/codegen\" from `~2.9.2` to `~2.10.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/datastore\" from `~4.7.1` to `~4.8.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/deduplication\" from `~3.1.6` to `~3.2.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/extension\" from `~3.6.1` to `~3.7.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/json\" from `~1.2.3` to `~1.3.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/jsonschema\" from `~1.2.2` to `~1.3.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/oai2-to-oai3\" from `~4.7.1` to `~4.8.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/openapi\" from `~3.5.0` to `~3.6.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/yaml\" from `~1.1.1` to `~1.2.0`" + } + ] + } + }, { "version": "3.9.7", "tag": "@autorest/core_v3.9.7", diff --git a/packages/extensions/core/CHANGELOG.md b/packages/extensions/core/CHANGELOG.md index 8a47f12178..e750c0ca11 100644 --- a/packages/extensions/core/CHANGELOG.md +++ b/packages/extensions/core/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @autorest/core -This log was last generated on Mon, 31 Jul 2023 14:56:21 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 3.10.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Update dependencies ## 3.9.7 Mon, 31 Jul 2023 14:56:21 GMT diff --git a/packages/extensions/core/package.json b/packages/extensions/core/package.json index ed2d999048..cc52764de6 100644 --- a/packages/extensions/core/package.json +++ b/packages/extensions/core/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/core", - "version": "3.9.7", + "version": "3.10.0", "description": "AutoRest Core Module", "engines": { "node": ">=12.0.0" @@ -42,23 +42,23 @@ }, "typings": "./dist/exports.d.ts", "devDependencies": { - "@autorest/common": "~1.5.6", - "@autorest/configuration": "~1.11.0", + "@autorest/common": "~1.6.0", + "@autorest/configuration": "~1.12.0", "@autorest/schemas": "~1.3.5", - "@autorest/test-utils": "~0.5.3", + "@autorest/test-utils": "~0.6.0", "@azure-tools/async-io": "~3.0.0", - "@azure-tools/codegen": "~2.9.2", - "@azure-tools/datastore": "~4.7.1", - "@azure-tools/deduplication": "~3.1.6", - "@azure-tools/extension": "~3.6.1", - "@azure-tools/json": "~1.2.3", - "@azure-tools/jsonschema": "~1.2.2", - "@azure-tools/oai2-to-oai3": "~4.7.1", + "@azure-tools/codegen": "~2.10.0", + "@azure-tools/datastore": "~4.8.0", + "@azure-tools/deduplication": "~3.2.0", + "@azure-tools/extension": "~3.7.0", + "@azure-tools/json": "~1.3.0", + "@azure-tools/jsonschema": "~1.3.0", + "@azure-tools/oai2-to-oai3": "~4.8.0", "@azure-tools/object-comparison": "~3.0.0", - "@azure-tools/openapi": "~3.5.0", + "@azure-tools/openapi": "~3.6.0", "@azure-tools/tasks": "~3.0.0", "@azure-tools/uri": "~3.1.1", - "@azure-tools/yaml": "~1.1.1", + "@azure-tools/yaml": "~1.2.0", "@types/commonmark": "^0.27.0", "@types/jest": "^29.2.3", "@types/lodash": "~4.14.168", diff --git a/packages/extensions/modelerfour/CHANGELOG.json b/packages/extensions/modelerfour/CHANGELOG.json index 58a7028cd8..20e3f7e4bb 100644 --- a/packages/extensions/modelerfour/CHANGELOG.json +++ b/packages/extensions/modelerfour/CHANGELOG.json @@ -1,6 +1,38 @@ { "name": "@autorest/modelerfour", "entries": [ + { + "version": "4.27.0", + "tag": "@autorest/modelerfour_v4.27.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@autorest/codemodel\" from `~4.19.3` to `~4.20.0`" + }, + { + "comment": "Updating dependency \"@autorest/extension-base\" from `~3.5.2` to `~3.6.0`" + }, + { + "comment": "Updating dependency \"@autorest/test-utils\" from `~0.5.3` to `~0.6.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/codegen\" from `~2.9.2` to `~2.10.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/datastore\" from `~4.7.1` to `~4.8.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/openapi\" from `~3.5.0` to `~3.6.0`" + } + ] + } + }, { "version": "4.26.2", "tag": "@autorest/modelerfour_v4.26.2", @@ -922,7 +954,6 @@ { "version": "4.13.x", "tag": "@autorest/modelerfour_v4.13.0", - "comments": { "patch": [ { diff --git a/packages/extensions/modelerfour/CHANGELOG.md b/packages/extensions/modelerfour/CHANGELOG.md index 4f68145f13..ff23b42e0d 100644 --- a/packages/extensions/modelerfour/CHANGELOG.md +++ b/packages/extensions/modelerfour/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @autorest/modelerfour -This log was last generated on Fri, 26 May 2023 14:12:36 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 4.27.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 4.26.2 Fri, 26 May 2023 14:12:36 GMT diff --git a/packages/extensions/modelerfour/package.json b/packages/extensions/modelerfour/package.json index 3e1f0a95bf..6015dad07d 100644 --- a/packages/extensions/modelerfour/package.json +++ b/packages/extensions/modelerfour/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/modelerfour", - "version": "4.26.2", + "version": "4.27.0", "description": "AutoRest Modeler Version Four (component)", "directories": { "doc": "docs" @@ -39,13 +39,13 @@ "homepage": "https://github.com/Azure/autorest/tree/main/packages/extensions/modelerfour", "readme": "https://github.com/Azure/autorest/tree/main/packages/extensions/modelerfour/readme.md", "devDependencies": { - "@autorest/codemodel": "~4.19.3", - "@autorest/extension-base": "~3.5.2", - "@autorest/test-utils": "~0.5.3", + "@autorest/codemodel": "~4.20.0", + "@autorest/extension-base": "~3.6.0", + "@autorest/test-utils": "~0.6.0", "@azure-tools/async-io": "~3.0.0", - "@azure-tools/codegen": "~2.9.2", - "@azure-tools/datastore": "~4.7.1", - "@azure-tools/openapi": "~3.5.0", + "@azure-tools/codegen": "~2.10.0", + "@azure-tools/datastore": "~4.8.0", + "@azure-tools/openapi": "~3.6.0", "@azure-tools/tasks": "~3.0.0", "@azure-tools/uri": "~3.1.1", "@types/jest": "^29.2.3", diff --git a/packages/extensions/openapi-to-cadl/CHANGELOG.json b/packages/extensions/openapi-to-cadl/CHANGELOG.json index 0a0aa32775..166cb73053 100644 --- a/packages/extensions/openapi-to-cadl/CHANGELOG.json +++ b/packages/extensions/openapi-to-cadl/CHANGELOG.json @@ -1,6 +1,29 @@ { "name": "@autorest/openapi-to-cadl", "entries": [ + { + "version": "0.6.0", + "tag": "@autorest/openapi-to-cadl_v0.6.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Update dependencies" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@azure-tools/codegen\" from `~2.9.2` to `~2.10.0`" + }, + { + "comment": "Updating dependency \"@autorest/extension-base\" from `~3.5.2` to `~3.6.0`" + }, + { + "comment": "Updating dependency \"@autorest/codemodel\" from `~4.19.3` to `~4.20.0`" + } + ] + } + }, { "version": "0.5.0", "tag": "@autorest/openapi-to-cadl_v0.5.0", diff --git a/packages/extensions/openapi-to-cadl/CHANGELOG.md b/packages/extensions/openapi-to-cadl/CHANGELOG.md index 6d343f5720..26a8b27dd9 100644 --- a/packages/extensions/openapi-to-cadl/CHANGELOG.md +++ b/packages/extensions/openapi-to-cadl/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @autorest/openapi-to-cadl -This log was last generated on Fri, 26 May 2023 15:35:37 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 0.6.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Update dependencies ## 0.5.0 Fri, 26 May 2023 15:35:37 GMT diff --git a/packages/extensions/openapi-to-cadl/package.json b/packages/extensions/openapi-to-cadl/package.json index 3e504c7972..bcf09c51d2 100644 --- a/packages/extensions/openapi-to-cadl/package.json +++ b/packages/extensions/openapi-to-cadl/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/openapi-to-cadl", - "version": "0.5.0", + "version": "0.6.0", "description": "Autorest plugin to scaffold a Typespec definition from an OpenAPI document", "main": "dist/main.js", "typings": "dist/main.d.ts", @@ -38,9 +38,9 @@ ], "homepage": "https://github.com/Azure/autorest#readme", "dependencies": { - "@azure-tools/codegen": "~2.9.2", - "@autorest/extension-base": "~3.5.2", - "@autorest/codemodel": "~4.19.3", + "@azure-tools/codegen": "~2.10.0", + "@autorest/extension-base": "~3.6.0", + "@autorest/codemodel": "~4.20.0", "@typespec/compiler": "^0.50.0", "@typespec/rest": "^0.50.0", "@typespec/http": "^0.50.0", diff --git a/packages/libs/codegen/CHANGELOG.json b/packages/libs/codegen/CHANGELOG.json index bbf137cae9..06dc12f3a9 100644 --- a/packages/libs/codegen/CHANGELOG.json +++ b/packages/libs/codegen/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@azure-tools/codegen", "entries": [ + { + "version": "2.10.0", + "tag": "@azure-tools/codegen_v2.10.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ] + } + }, { "version": "2.9.2", "tag": "@azure-tools/codegen_v2.9.2", diff --git a/packages/libs/codegen/CHANGELOG.md b/packages/libs/codegen/CHANGELOG.md index b1a90db921..9a13bd6a04 100644 --- a/packages/libs/codegen/CHANGELOG.md +++ b/packages/libs/codegen/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @azure-tools/codegen -This log was last generated on Wed, 07 Dec 2022 22:24:34 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 2.10.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 2.9.2 Wed, 07 Dec 2022 22:24:34 GMT diff --git a/packages/libs/codegen/package.json b/packages/libs/codegen/package.json index 54312e96cf..3d572c766c 100644 --- a/packages/libs/codegen/package.json +++ b/packages/libs/codegen/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/codegen", - "version": "2.9.2", + "version": "2.10.0", "description": "Autorest Code generator common and base classes", "directories": { "doc": "docs" diff --git a/packages/libs/codemodel/CHANGELOG.json b/packages/libs/codemodel/CHANGELOG.json index cbd126188f..6cf1630d39 100644 --- a/packages/libs/codemodel/CHANGELOG.json +++ b/packages/libs/codemodel/CHANGELOG.json @@ -1,6 +1,23 @@ { "name": "@autorest/codemodel", "entries": [ + { + "version": "4.20.0", + "tag": "@autorest/codemodel_v4.20.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@azure-tools/codegen\" from `~2.9.2` to `~2.10.0`" + } + ] + } + }, { "version": "4.19.3", "tag": "@autorest/codemodel_v4.19.3", diff --git a/packages/libs/codemodel/CHANGELOG.md b/packages/libs/codemodel/CHANGELOG.md index 924e1e084a..b3f8a04174 100644 --- a/packages/libs/codemodel/CHANGELOG.md +++ b/packages/libs/codemodel/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @autorest/codemodel -This log was last generated on Wed, 07 Dec 2022 22:24:34 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 4.20.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 4.19.3 Wed, 07 Dec 2022 22:24:34 GMT diff --git a/packages/libs/codemodel/package.json b/packages/libs/codemodel/package.json index 748384c9c2..19dc7c793b 100644 --- a/packages/libs/codemodel/package.json +++ b/packages/libs/codemodel/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/codemodel", - "version": "4.19.3", + "version": "4.20.0", "description": "AutoRest code model library", "directories": { "doc": "docs" @@ -53,7 +53,7 @@ "typescript": "~5.2.2" }, "dependencies": { - "@azure-tools/codegen": "~2.9.2", + "@azure-tools/codegen": "~2.10.0", "js-yaml": "~4.1.0" }, "publishConfig": { diff --git a/packages/libs/common/CHANGELOG.json b/packages/libs/common/CHANGELOG.json index 14b1d7baed..877ac756c9 100644 --- a/packages/libs/common/CHANGELOG.json +++ b/packages/libs/common/CHANGELOG.json @@ -1,6 +1,29 @@ { "name": "@autorest/common", "entries": [ + { + "version": "1.6.0", + "tag": "@autorest/common_v1.6.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@azure-tools/datastore\" from `~4.7.1` to `~4.8.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/yaml\" from `~1.1.1` to `~1.2.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/json\" from `~1.2.3` to `~1.3.0`" + } + ] + } + }, { "version": "1.5.6", "tag": "@autorest/common_v1.5.6", diff --git a/packages/libs/common/CHANGELOG.md b/packages/libs/common/CHANGELOG.md index 26200f0a7a..1decb60e4e 100644 --- a/packages/libs/common/CHANGELOG.md +++ b/packages/libs/common/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @autorest/common -This log was last generated on Thu, 13 Apr 2023 04:20:09 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 1.6.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 1.5.6 Thu, 13 Apr 2023 04:20:09 GMT diff --git a/packages/libs/common/package.json b/packages/libs/common/package.json index edf5329888..fffdc56f8f 100644 --- a/packages/libs/common/package.json +++ b/packages/libs/common/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/common", - "version": "1.5.6", + "version": "1.6.0", "description": "Autorest common utilities", "main": "dist/index.js", "typings": "dist/index.d.ts", @@ -44,9 +44,9 @@ "typescript": "~5.2.2" }, "dependencies": { - "@azure-tools/datastore": "~4.7.1", - "@azure-tools/yaml": "~1.1.1", - "@azure-tools/json": "~1.2.3", + "@azure-tools/datastore": "~4.8.0", + "@azure-tools/yaml": "~1.2.0", + "@azure-tools/json": "~1.3.0", "@azure/logger": "^1.0.2", "chalk": "^4.1.0", "cli-progress": "~3.10.0" diff --git a/packages/libs/configuration/CHANGELOG.json b/packages/libs/configuration/CHANGELOG.json index ade87efd5b..eb5e92e185 100644 --- a/packages/libs/configuration/CHANGELOG.json +++ b/packages/libs/configuration/CHANGELOG.json @@ -1,6 +1,41 @@ { "name": "@autorest/configuration", "entries": [ + { + "version": "1.12.0", + "tag": "@autorest/configuration_v1.12.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + }, + { + "comment": "Set autorest.powershell v4 the default version loaded by autorest" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@autorest/common\" from `~1.5.6` to `~1.6.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/datastore\" from `~4.7.1` to `~4.8.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/extension\" from `~3.6.1` to `~3.7.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/json\" from `~1.2.3` to `~1.3.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/yaml\" from `~1.1.1` to `~1.2.0`" + }, + { + "comment": "Updating dependency \"@autorest/test-utils\" from `~0.5.3` to `~0.6.0`" + } + ] + } + }, { "version": "1.11.0", "tag": "@autorest/configuration_v1.11.0", diff --git a/packages/libs/configuration/CHANGELOG.md b/packages/libs/configuration/CHANGELOG.md index c6ae671531..5abe32ffff 100644 --- a/packages/libs/configuration/CHANGELOG.md +++ b/packages/libs/configuration/CHANGELOG.md @@ -1,6 +1,14 @@ # Change Log - @autorest/configuration -This log was last generated on Wed, 07 Dec 2022 22:24:34 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 1.12.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies +- Set autorest.powershell v4 the default version loaded by autorest ## 1.11.0 Wed, 07 Dec 2022 22:24:34 GMT diff --git a/packages/libs/configuration/package.json b/packages/libs/configuration/package.json index 615e6cd0d2..3f3acd93bf 100644 --- a/packages/libs/configuration/package.json +++ b/packages/libs/configuration/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/configuration", - "version": "1.11.0", + "version": "1.12.0", "description": "Autorest configuration", "main": "dist/index.js", "typings": "dist/index.d.ts", @@ -28,7 +28,7 @@ }, "homepage": "https://github.com/Azure/autorest#readme", "devDependencies": { - "@autorest/test-utils": "~0.5.3", + "@autorest/test-utils": "~0.6.0", "@types/commonmark": "^0.27.0", "@types/jest": "^29.2.3", "@types/lodash": "~4.14.168", @@ -47,13 +47,13 @@ "typescript": "~5.2.2" }, "dependencies": { - "@autorest/common": "~1.5.6", - "@azure-tools/datastore": "~4.7.1", - "@azure-tools/extension": "~3.6.1", + "@autorest/common": "~1.6.0", + "@azure-tools/datastore": "~4.8.0", + "@azure-tools/extension": "~3.7.0", "@azure-tools/uri": "~3.1.1", "@azure-tools/async-io": "~3.0.0", - "@azure-tools/json": "~1.2.3", - "@azure-tools/yaml": "~1.1.1", + "@azure-tools/json": "~1.3.0", + "@azure-tools/yaml": "~1.2.0", "commonmark": "^0.30.0", "lodash": "~4.17.20", "untildify": "^4.0.0" diff --git a/packages/libs/datastore/CHANGELOG.json b/packages/libs/datastore/CHANGELOG.json index 30e1cdd3cf..146465bef7 100644 --- a/packages/libs/datastore/CHANGELOG.json +++ b/packages/libs/datastore/CHANGELOG.json @@ -1,6 +1,29 @@ { "name": "@azure-tools/datastore", "entries": [ + { + "version": "4.8.0", + "tag": "@azure-tools/datastore_v4.8.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Update dependencies" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@azure-tools/codegen\" from `~2.9.2` to `~2.10.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/json\" from `~1.2.3` to `~1.3.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/yaml\" from `~1.1.1` to `~1.2.0`" + } + ] + } + }, { "version": "4.7.1", "tag": "@azure-tools/datastore_v4.7.1", diff --git a/packages/libs/datastore/CHANGELOG.md b/packages/libs/datastore/CHANGELOG.md index ae690afaf9..f34d832409 100644 --- a/packages/libs/datastore/CHANGELOG.md +++ b/packages/libs/datastore/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @azure-tools/datastore -This log was last generated on Wed, 07 Dec 2022 22:24:34 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 4.8.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Update dependencies ## 4.7.1 Wed, 07 Dec 2022 22:24:34 GMT diff --git a/packages/libs/datastore/package.json b/packages/libs/datastore/package.json index 1b00450d1f..87f5cf51fb 100644 --- a/packages/libs/datastore/package.json +++ b/packages/libs/datastore/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/datastore", - "version": "4.7.1", + "version": "4.8.0", "description": "Virtualized Filesystem with parsing and sourcemaps (AutoRest)", "main": "./dist/main.js", "typings": "./dist/main.d.ts", @@ -53,11 +53,11 @@ "typescript": "~5.2.2" }, "dependencies": { - "@azure-tools/codegen": "~2.9.2", - "@azure-tools/json": "~1.2.3", + "@azure-tools/codegen": "~2.10.0", + "@azure-tools/json": "~1.3.0", "@azure-tools/tasks": "~3.0.0", "@azure-tools/uri": "~3.1.1", - "@azure-tools/yaml": "~1.1.1", + "@azure-tools/yaml": "~1.2.0", "@azure/logger": "^1.0.2", "lodash": "~4.17.20", "jsonpath-plus": "~6.0.1", diff --git a/packages/libs/deduplication/CHANGELOG.json b/packages/libs/deduplication/CHANGELOG.json index 6d6bd873f8..3412149c3d 100644 --- a/packages/libs/deduplication/CHANGELOG.json +++ b/packages/libs/deduplication/CHANGELOG.json @@ -1,6 +1,26 @@ { "name": "@azure-tools/deduplication", "entries": [ + { + "version": "3.2.0", + "tag": "@azure-tools/deduplication_v3.2.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@azure-tools/codegen\" from `~2.9.2` to `~2.10.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/datastore\" from `~4.7.1` to `~4.8.0`" + } + ] + } + }, { "version": "3.1.6", "tag": "@azure-tools/deduplication_v3.1.6", diff --git a/packages/libs/deduplication/CHANGELOG.md b/packages/libs/deduplication/CHANGELOG.md index 3305687d32..b90b174c28 100644 --- a/packages/libs/deduplication/CHANGELOG.md +++ b/packages/libs/deduplication/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @azure-tools/deduplication -This log was last generated on Wed, 07 Dec 2022 22:24:34 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 3.2.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 3.1.6 Wed, 07 Dec 2022 22:24:34 GMT diff --git a/packages/libs/deduplication/package.json b/packages/libs/deduplication/package.json index 87b8c75779..b34f749de0 100644 --- a/packages/libs/deduplication/package.json +++ b/packages/libs/deduplication/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/deduplication", - "version": "3.1.6", + "version": "3.2.0", "description": "Deduplication of elements in OpenAPI 3 documents", "main": "./dist/main.js", "typings": "./dist/main.d.ts", @@ -52,8 +52,8 @@ "typescript": "~5.2.2" }, "dependencies": { - "@azure-tools/codegen": "~2.9.2", - "@azure-tools/datastore": "~4.7.1", + "@azure-tools/codegen": "~2.10.0", + "@azure-tools/datastore": "~4.8.0", "@azure-tools/object-comparison": "~3.0.0", "@azure-tools/tasks": "~3.0.0", "compare-versions": "^6.1.0", diff --git a/packages/libs/extension-base/CHANGELOG.json b/packages/libs/extension-base/CHANGELOG.json index 85deafc0ae..f539583a8b 100644 --- a/packages/libs/extension-base/CHANGELOG.json +++ b/packages/libs/extension-base/CHANGELOG.json @@ -1,6 +1,23 @@ { "name": "@autorest/extension-base", "entries": [ + { + "version": "3.6.0", + "tag": "@autorest/extension-base_v3.6.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@azure-tools/codegen\" from `~2.9.2` to `~2.10.0`" + } + ] + } + }, { "version": "3.5.2", "tag": "@autorest/extension-base_v3.5.2", diff --git a/packages/libs/extension-base/CHANGELOG.md b/packages/libs/extension-base/CHANGELOG.md index 2ff51c54a5..72da74ee33 100644 --- a/packages/libs/extension-base/CHANGELOG.md +++ b/packages/libs/extension-base/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @autorest/extension-base -This log was last generated on Fri, 26 May 2023 14:12:36 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 3.6.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 3.5.2 Fri, 26 May 2023 14:12:36 GMT diff --git a/packages/libs/extension-base/package.json b/packages/libs/extension-base/package.json index c6a5c861bc..f484a7f9fe 100644 --- a/packages/libs/extension-base/package.json +++ b/packages/libs/extension-base/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/extension-base", - "version": "3.5.2", + "version": "3.6.0", "description": "Library for creating AutoRest extensions", "main": "dist/index.js", "exports": { @@ -47,6 +47,6 @@ "dependencies": { "js-yaml": "~4.1.0", "vscode-jsonrpc": "^3.5.0", - "@azure-tools/codegen": "~2.9.2" + "@azure-tools/codegen": "~2.10.0" } } diff --git a/packages/libs/extension/CHANGELOG.json b/packages/libs/extension/CHANGELOG.json index 82917d0d8f..f7a355f930 100644 --- a/packages/libs/extension/CHANGELOG.json +++ b/packages/libs/extension/CHANGELOG.json @@ -1,6 +1,23 @@ { "name": "@azure-tools/extension", "entries": [ + { + "version": "3.7.0", + "tag": "@azure-tools/extension_v3.7.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@autorest/system-requirements\" from `~1.0.2` to `~1.1.0`" + } + ] + } + }, { "version": "3.6.1", "tag": "@azure-tools/extension_v3.6.1", diff --git a/packages/libs/extension/CHANGELOG.md b/packages/libs/extension/CHANGELOG.md index 1226e14b7c..03238e2e3b 100644 --- a/packages/libs/extension/CHANGELOG.md +++ b/packages/libs/extension/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @azure-tools/extension -This log was last generated on Wed, 07 Dec 2022 22:24:34 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 3.7.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 3.6.1 Wed, 07 Dec 2022 22:24:34 GMT diff --git a/packages/libs/extension/package.json b/packages/libs/extension/package.json index eb8f8a7ef3..6c28a83b9b 100644 --- a/packages/libs/extension/package.json +++ b/packages/libs/extension/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/extension", - "version": "3.6.1", + "version": "3.7.0", "description": "Yarn-Based extension aquisition (for Azure Open Source Projects)", "engines": { "node": ">=12.0.0" @@ -39,7 +39,7 @@ "homepage": "https://github.com/Azure/autorest/tree/main/packages/libs/extension", "readme": "https://github.com/Azure/autorest/tree/main/packages/libs/extension/readme.md", "dependencies": { - "@autorest/system-requirements": "~1.0.2", + "@autorest/system-requirements": "~1.1.0", "@azure-tools/async-io": "~3.0.0", "@azure-tools/tasks": "~3.0.0", "@azure/logger": "^1.0.2", diff --git a/packages/libs/json/CHANGELOG.json b/packages/libs/json/CHANGELOG.json index 8c1f76070c..5ade8a377c 100644 --- a/packages/libs/json/CHANGELOG.json +++ b/packages/libs/json/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@azure-tools/json", "entries": [ + { + "version": "1.3.0", + "tag": "@azure-tools/json_v1.3.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ] + } + }, { "version": "1.2.3", "tag": "@azure-tools/json_v1.2.3", diff --git a/packages/libs/json/CHANGELOG.md b/packages/libs/json/CHANGELOG.md index 5b9ed0dcbb..932742ebaf 100644 --- a/packages/libs/json/CHANGELOG.md +++ b/packages/libs/json/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @azure-tools/json -This log was last generated on Wed, 07 Dec 2022 22:24:34 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 1.3.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 1.2.3 Wed, 07 Dec 2022 22:24:34 GMT diff --git a/packages/libs/json/package.json b/packages/libs/json/package.json index bc1ea8d4fd..f0fda2cd1a 100644 --- a/packages/libs/json/package.json +++ b/packages/libs/json/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/json", - "version": "1.2.3", + "version": "1.3.0", "description": "Json objects utilities", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/packages/libs/jsonschema/CHANGELOG.json b/packages/libs/jsonschema/CHANGELOG.json index bf96e4e7ee..4c7a8c692f 100644 --- a/packages/libs/jsonschema/CHANGELOG.json +++ b/packages/libs/jsonschema/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@azure-tools/jsonschema", "entries": [ + { + "version": "1.3.0", + "tag": "@azure-tools/jsonschema_v1.3.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ] + } + }, { "version": "1.2.2", "tag": "@azure-tools/jsonschema_v1.2.2", diff --git a/packages/libs/jsonschema/CHANGELOG.md b/packages/libs/jsonschema/CHANGELOG.md index ed9461bedd..ffe9600bd2 100644 --- a/packages/libs/jsonschema/CHANGELOG.md +++ b/packages/libs/jsonschema/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @azure-tools/jsonschema -This log was last generated on Wed, 07 Dec 2022 22:24:34 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 1.3.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 1.2.2 Wed, 07 Dec 2022 22:24:34 GMT diff --git a/packages/libs/jsonschema/package.json b/packages/libs/jsonschema/package.json index 846fc89314..b3d8eea796 100644 --- a/packages/libs/jsonschema/package.json +++ b/packages/libs/jsonschema/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/jsonschema", - "version": "1.2.2", + "version": "1.3.0", "description": "Json schema utilities", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/packages/libs/oai2-to-oai3/CHANGELOG.json b/packages/libs/oai2-to-oai3/CHANGELOG.json index 3b58019108..b62535fbb4 100644 --- a/packages/libs/oai2-to-oai3/CHANGELOG.json +++ b/packages/libs/oai2-to-oai3/CHANGELOG.json @@ -1,6 +1,32 @@ { "name": "@azure-tools/oai2-to-oai3", "entries": [ + { + "version": "4.8.0", + "tag": "@azure-tools/oai2-to-oai3_v4.8.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Update dependencies" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@azure-tools/datastore\" from `~4.7.1` to `~4.8.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/openapi\" from `~3.5.0` to `~3.6.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/json\" from `~1.2.3` to `~1.3.0`" + }, + { + "comment": "Updating dependency \"@autorest/test-utils\" from `~0.5.3` to `~0.6.0`" + } + ] + } + }, { "version": "4.7.1", "tag": "@azure-tools/oai2-to-oai3_v4.7.1", @@ -325,7 +351,7 @@ { "version": "4.1.0", "date": "Thu, 04 Feb 2021 19:05:18 GMT", - "tag":"@azure-tools/oai2-to-oai3_v4.1.0", + "tag": "@azure-tools/oai2-to-oai3_v4.1.0", "comments": { "minor": [ { diff --git a/packages/libs/oai2-to-oai3/CHANGELOG.md b/packages/libs/oai2-to-oai3/CHANGELOG.md index 8bc6e0f98e..66eb3cf036 100644 --- a/packages/libs/oai2-to-oai3/CHANGELOG.md +++ b/packages/libs/oai2-to-oai3/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @azure-tools/oai2-to-oai3 -This log was last generated on Fri, 26 May 2023 14:12:36 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 4.8.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Update dependencies ## 4.7.1 Fri, 26 May 2023 14:12:36 GMT diff --git a/packages/libs/oai2-to-oai3/package.json b/packages/libs/oai2-to-oai3/package.json index 128707fcd2..9a12424797 100644 --- a/packages/libs/oai2-to-oai3/package.json +++ b/packages/libs/oai2-to-oai3/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/oai2-to-oai3", - "version": "4.7.1", + "version": "4.8.0", "description": "OpenAPI2 to OpenAPI3 conversion library that maintains souremaps for use with AutoRest", "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -36,7 +36,7 @@ "homepage": "https://github.com/Azure/autorest/tree/main/packages/libs/oai2-to-oai3", "readme": "https://github.com/Azure/autorest/tree/main/packages/libs/oai2-to-oai3/readme.md", "devDependencies": { - "@autorest/test-utils": "~0.5.3", + "@autorest/test-utils": "~0.6.0", "@types/jest": "^29.2.3", "@types/js-yaml": "~4.0.0", "@types/node": "~20.9.0", @@ -55,9 +55,9 @@ "typescript": "~5.2.2" }, "dependencies": { - "@azure-tools/datastore": "~4.7.1", - "@azure-tools/openapi": "~3.5.0", - "@azure-tools/json": "~1.2.3", + "@azure-tools/datastore": "~4.8.0", + "@azure-tools/openapi": "~3.6.0", + "@azure-tools/json": "~1.3.0", "source-map": "^0.8.0-beta.0" } } diff --git a/packages/libs/openapi/CHANGELOG.json b/packages/libs/openapi/CHANGELOG.json index ededb29b7b..63a233623a 100644 --- a/packages/libs/openapi/CHANGELOG.json +++ b/packages/libs/openapi/CHANGELOG.json @@ -1,6 +1,26 @@ { "name": "@azure-tools/openapi", "entries": [ + { + "version": "3.6.0", + "tag": "@azure-tools/openapi_v3.6.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@azure-tools/json\" from `~1.2.3` to `~1.3.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/jsonschema\" from `~1.2.2` to `~1.3.0`" + } + ] + } + }, { "version": "3.5.0", "tag": "@azure-tools/openapi_v3.5.0", diff --git a/packages/libs/openapi/CHANGELOG.md b/packages/libs/openapi/CHANGELOG.md index 1ac33e3926..6a586e839a 100644 --- a/packages/libs/openapi/CHANGELOG.md +++ b/packages/libs/openapi/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @azure-tools/openapi -This log was last generated on Fri, 26 May 2023 14:12:36 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 3.6.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 3.5.0 Fri, 26 May 2023 14:12:36 GMT diff --git a/packages/libs/openapi/package.json b/packages/libs/openapi/package.json index f7718e4321..178d46dec8 100644 --- a/packages/libs/openapi/package.json +++ b/packages/libs/openapi/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/openapi", - "version": "3.5.0", + "version": "3.6.0", "description": "OpenAPI common code for Azure Tools.", "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -69,7 +69,7 @@ "typescript": "~5.2.2" }, "dependencies": { - "@azure-tools/json": "~1.2.3", - "@azure-tools/jsonschema": "~1.2.2" + "@azure-tools/json": "~1.3.0", + "@azure-tools/jsonschema": "~1.3.0" } } diff --git a/packages/libs/system-requirements/CHANGELOG.json b/packages/libs/system-requirements/CHANGELOG.json index 467bd79c0e..00b407ea98 100644 --- a/packages/libs/system-requirements/CHANGELOG.json +++ b/packages/libs/system-requirements/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@autorest/system-requirements", "entries": [ + { + "version": "1.1.0", + "tag": "@autorest/system-requirements_v1.1.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ] + } + }, { "version": "1.0.2", "tag": "@autorest/system-requirements_v1.0.2", diff --git a/packages/libs/system-requirements/CHANGELOG.md b/packages/libs/system-requirements/CHANGELOG.md index 77edb8bf47..bd59c5a813 100644 --- a/packages/libs/system-requirements/CHANGELOG.md +++ b/packages/libs/system-requirements/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @autorest/system-requirements -This log was last generated on Wed, 07 Dec 2022 22:24:34 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 1.1.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 1.0.2 Wed, 07 Dec 2022 22:24:34 GMT diff --git a/packages/libs/system-requirements/package.json b/packages/libs/system-requirements/package.json index 63db102075..90114b0033 100644 --- a/packages/libs/system-requirements/package.json +++ b/packages/libs/system-requirements/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/system-requirements", - "version": "1.0.2", + "version": "1.1.0", "description": "System requirement validation and resolution for autorest", "engines": { "node": ">=12.0.0" diff --git a/packages/libs/yaml/CHANGELOG.json b/packages/libs/yaml/CHANGELOG.json index 640de03d39..34ba6ddbbc 100644 --- a/packages/libs/yaml/CHANGELOG.json +++ b/packages/libs/yaml/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@azure-tools/yaml", "entries": [ + { + "version": "1.2.0", + "tag": "@azure-tools/yaml_v1.2.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ] + } + }, { "version": "1.1.1", "tag": "@azure-tools/yaml_v1.1.1", diff --git a/packages/libs/yaml/CHANGELOG.md b/packages/libs/yaml/CHANGELOG.md index dbffeb1a55..619e5b81da 100644 --- a/packages/libs/yaml/CHANGELOG.md +++ b/packages/libs/yaml/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @azure-tools/yaml -This log was last generated on Wed, 07 Dec 2022 22:24:34 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 1.2.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 1.1.1 Wed, 07 Dec 2022 22:24:34 GMT diff --git a/packages/libs/yaml/package.json b/packages/libs/yaml/package.json index 3c0cd92f16..23ec9a6a0d 100644 --- a/packages/libs/yaml/package.json +++ b/packages/libs/yaml/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/yaml", - "version": "1.1.1", + "version": "1.2.0", "description": "Yaml parser and utilities", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/packages/testing/test-public-packages/package.json b/packages/testing/test-public-packages/package.json index 63ec583f8e..fe03bab4e7 100644 --- a/packages/testing/test-public-packages/package.json +++ b/packages/testing/test-public-packages/package.json @@ -30,8 +30,8 @@ }, "homepage": "https://github.com/Azure/autorest#readme", "dependencies": { - "@autorest/core": "~3.9.7", - "autorest": "~3.6.3", + "@autorest/core": "~3.10.0", + "autorest": "~3.7.0", "source-map-support": "^0.5.19" }, "devDependencies": { diff --git a/packages/testing/test-utils/CHANGELOG.json b/packages/testing/test-utils/CHANGELOG.json index 5663fa0cc6..92356d03c0 100644 --- a/packages/testing/test-utils/CHANGELOG.json +++ b/packages/testing/test-utils/CHANGELOG.json @@ -1,6 +1,26 @@ { "name": "@autorest/test-utils", "entries": [ + { + "version": "0.6.0", + "tag": "@autorest/test-utils_v0.6.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@autorest/common\" from `~1.5.6` to `~1.6.0`" + }, + { + "comment": "Updating dependency \"@azure-tools/datastore\" from `~4.7.1` to `~4.8.0`" + } + ] + } + }, { "version": "0.5.3", "tag": "@autorest/test-utils_v0.5.3", diff --git a/packages/testing/test-utils/CHANGELOG.md b/packages/testing/test-utils/CHANGELOG.md index 827c6c1bce..e976dbe7ee 100644 --- a/packages/testing/test-utils/CHANGELOG.md +++ b/packages/testing/test-utils/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @autorest/test-utils -This log was last generated on Wed, 07 Dec 2022 22:24:34 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 0.6.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 0.5.3 Wed, 07 Dec 2022 22:24:34 GMT diff --git a/packages/testing/test-utils/package.json b/packages/testing/test-utils/package.json index c7d0de316b..cf0f613acb 100644 --- a/packages/testing/test-utils/package.json +++ b/packages/testing/test-utils/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/test-utils", - "version": "0.5.3", + "version": "0.6.0", "description": "Set of testing utils that are used across packages", "main": "./dist/index.js", "typings": "./dist/index.d.ts", @@ -30,8 +30,8 @@ }, "homepage": "https://github.com/Azure/autorest#readme", "dependencies": { - "@autorest/common": "~1.5.6", - "@azure-tools/datastore": "~4.7.1", + "@autorest/common": "~1.6.0", + "@azure-tools/datastore": "~4.8.0", "@azure-tools/tasks": "~3.0.0", "expect": "~26.6.2", "jest-snapshot": "~26.6.2", diff --git a/packages/tools/compare/CHANGELOG.json b/packages/tools/compare/CHANGELOG.json index c5e1166308..5752049615 100644 --- a/packages/tools/compare/CHANGELOG.json +++ b/packages/tools/compare/CHANGELOG.json @@ -1,6 +1,23 @@ { "name": "@autorest/compare", "entries": [ + { + "version": "0.5.0", + "tag": "@autorest/compare_v0.5.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"autorest\" from `~3.6.3` to `~3.7.0`" + } + ] + } + }, { "version": "0.4.5", "tag": "@autorest/compare_v0.4.5", diff --git a/packages/tools/compare/CHANGELOG.md b/packages/tools/compare/CHANGELOG.md index 65eb53426c..683bae3052 100644 --- a/packages/tools/compare/CHANGELOG.md +++ b/packages/tools/compare/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @autorest/compare -This log was last generated on Wed, 07 Dec 2022 22:24:34 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 0.5.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 0.4.5 Wed, 07 Dec 2022 22:24:34 GMT diff --git a/packages/tools/compare/package.json b/packages/tools/compare/package.json index 71f81ffa09..233ea56035 100644 --- a/packages/tools/compare/package.json +++ b/packages/tools/compare/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/compare", - "version": "0.4.5", + "version": "0.5.0", "description": "Compares the output between two AutoRest runs to check for material differences.", "main": "dist/index.js", "bin": { @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/Azure/autorest.compare#readme", "dependencies": { - "autorest": "~3.6.3", + "autorest": "~3.7.0", "chalk": "^4.1.0", "diff": "^5.1.0", "js-yaml": "~4.1.0", diff --git a/packages/tools/fixer/CHANGELOG.json b/packages/tools/fixer/CHANGELOG.json index f89a64cb09..69ef28d9b8 100644 --- a/packages/tools/fixer/CHANGELOG.json +++ b/packages/tools/fixer/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@autorest/fixer", "entries": [ + { + "version": "1.2.0", + "tag": "@autorest/fixer_v1.2.0", + "date": "Thu, 16 Nov 2023 16:00:04 GMT", + "comments": { + "minor": [ + { + "comment": "Upgrade dependencies" + } + ] + } + }, { "version": "1.1.1", "tag": "@autorest/fixer_v1.1.1", diff --git a/packages/tools/fixer/CHANGELOG.md b/packages/tools/fixer/CHANGELOG.md index 576b148d05..28330d981a 100644 --- a/packages/tools/fixer/CHANGELOG.md +++ b/packages/tools/fixer/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @autorest/fixer -This log was last generated on Wed, 07 Dec 2022 22:24:34 GMT and should not be manually modified. +This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. + +## 1.2.0 +Thu, 16 Nov 2023 16:00:04 GMT + +### Minor changes + +- Upgrade dependencies ## 1.1.1 Wed, 07 Dec 2022 22:24:34 GMT diff --git a/packages/tools/fixer/package.json b/packages/tools/fixer/package.json index c9842b493c..9bef7058c3 100644 --- a/packages/tools/fixer/package.json +++ b/packages/tools/fixer/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/fixer", - "version": "1.1.1", + "version": "1.2.0", "description": "", "main": "dist/index.js", "bin": { From e9ea42b743fc748982059a66f7edc0a50dc9a34a Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Tue, 28 Nov 2023 11:57:10 -0800 Subject: [PATCH 07/33] Fix pick latest installed (#4810) fix #4785 --- packages/apps/autorest/CHANGELOG.json | 20 +++++++++++++++++++ packages/apps/autorest/CHANGELOG.md | 9 ++++++++- packages/apps/autorest/package.json | 6 +++--- packages/extensions/core/CHANGELOG.json | 17 ++++++++++++++++ packages/extensions/core/CHANGELOG.md | 9 ++++++++- packages/extensions/core/package.json | 4 ++-- packages/libs/configuration/package.json | 2 +- packages/libs/extension/CHANGELOG.json | 12 +++++++++++ packages/libs/extension/CHANGELOG.md | 9 ++++++++- packages/libs/extension/package.json | 2 +- packages/libs/extension/src/main.ts | 6 +++--- .../testing/test-public-packages/package.json | 4 ++-- packages/tools/compare/package.json | 2 +- 13 files changed, 86 insertions(+), 16 deletions(-) diff --git a/packages/apps/autorest/CHANGELOG.json b/packages/apps/autorest/CHANGELOG.json index cb7475200c..e8083ceeed 100644 --- a/packages/apps/autorest/CHANGELOG.json +++ b/packages/apps/autorest/CHANGELOG.json @@ -1,6 +1,26 @@ { "name": "autorest", "entries": [ + { + "version": "3.7.1", + "tag": "autorest_v3.7.1", + "date": "Tue, 28 Nov 2023 19:02:52 GMT", + "comments": { + "patch": [ + { + "comment": "Resolve latest installed instead of first" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@autorest/core\" from `~3.10.0` to `~3.10.1`" + }, + { + "comment": "Updating dependency \"@azure-tools/extension\" from `~3.7.0` to `~3.7.1`" + } + ] + } + }, { "version": "3.7.0", "tag": "autorest_v3.7.0", diff --git a/packages/apps/autorest/CHANGELOG.md b/packages/apps/autorest/CHANGELOG.md index 0b50b045ec..4fcaabb03d 100644 --- a/packages/apps/autorest/CHANGELOG.md +++ b/packages/apps/autorest/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - autorest -This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. +This log was last generated on Tue, 28 Nov 2023 19:02:52 GMT and should not be manually modified. + +## 3.7.1 +Tue, 28 Nov 2023 19:02:52 GMT + +### Patches + +- Resolve latest installed instead of first ## 3.7.0 Thu, 16 Nov 2023 16:00:04 GMT diff --git a/packages/apps/autorest/package.json b/packages/apps/autorest/package.json index 0ee74d4a63..d118aadb68 100644 --- a/packages/apps/autorest/package.json +++ b/packages/apps/autorest/package.json @@ -1,6 +1,6 @@ { "name": "autorest", - "version": "3.7.0", + "version": "3.7.1", "description": "The AutoRest tool generates client libraries for accessing RESTful web services. Input to AutoRest is an OpenAPI spec that describes the REST API.", "engines": { "node": ">=12.0.0" @@ -44,10 +44,10 @@ "typings": "./dist/exports.d.ts", "devDependencies": { "@autorest/configuration": "~1.12.0", - "@autorest/core": "~3.10.0", + "@autorest/core": "~3.10.1", "@autorest/common": "~1.6.0", "@azure-tools/async-io": "~3.0.0", - "@azure-tools/extension": "~3.7.0", + "@azure-tools/extension": "~3.7.1", "@azure-tools/tasks": "~3.0.0", "@azure-tools/uri": "~3.1.1", "@types/commonmark": "^0.27.0", diff --git a/packages/extensions/core/CHANGELOG.json b/packages/extensions/core/CHANGELOG.json index 575fcd85b9..a641f5705c 100644 --- a/packages/extensions/core/CHANGELOG.json +++ b/packages/extensions/core/CHANGELOG.json @@ -1,6 +1,23 @@ { "name": "@autorest/core", "entries": [ + { + "version": "3.10.1", + "tag": "@autorest/core_v3.10.1", + "date": "Tue, 28 Nov 2023 19:02:52 GMT", + "comments": { + "patch": [ + { + "comment": "Resolve latest installed instead of first" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@azure-tools/extension\" from `~3.7.0` to `~3.7.1`" + } + ] + } + }, { "version": "3.10.0", "tag": "@autorest/core_v3.10.0", diff --git a/packages/extensions/core/CHANGELOG.md b/packages/extensions/core/CHANGELOG.md index e750c0ca11..22083f6808 100644 --- a/packages/extensions/core/CHANGELOG.md +++ b/packages/extensions/core/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @autorest/core -This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. +This log was last generated on Tue, 28 Nov 2023 19:02:52 GMT and should not be manually modified. + +## 3.10.1 +Tue, 28 Nov 2023 19:02:52 GMT + +### Patches + +- Resolve latest installed instead of first ## 3.10.0 Thu, 16 Nov 2023 16:00:04 GMT diff --git a/packages/extensions/core/package.json b/packages/extensions/core/package.json index cc52764de6..e4bcf9d8d3 100644 --- a/packages/extensions/core/package.json +++ b/packages/extensions/core/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/core", - "version": "3.10.0", + "version": "3.10.1", "description": "AutoRest Core Module", "engines": { "node": ">=12.0.0" @@ -50,7 +50,7 @@ "@azure-tools/codegen": "~2.10.0", "@azure-tools/datastore": "~4.8.0", "@azure-tools/deduplication": "~3.2.0", - "@azure-tools/extension": "~3.7.0", + "@azure-tools/extension": "~3.7.1", "@azure-tools/json": "~1.3.0", "@azure-tools/jsonschema": "~1.3.0", "@azure-tools/oai2-to-oai3": "~4.8.0", diff --git a/packages/libs/configuration/package.json b/packages/libs/configuration/package.json index 3f3acd93bf..1d7bbc0920 100644 --- a/packages/libs/configuration/package.json +++ b/packages/libs/configuration/package.json @@ -49,7 +49,7 @@ "dependencies": { "@autorest/common": "~1.6.0", "@azure-tools/datastore": "~4.8.0", - "@azure-tools/extension": "~3.7.0", + "@azure-tools/extension": "~3.7.1", "@azure-tools/uri": "~3.1.1", "@azure-tools/async-io": "~3.0.0", "@azure-tools/json": "~1.3.0", diff --git a/packages/libs/extension/CHANGELOG.json b/packages/libs/extension/CHANGELOG.json index f7a355f930..9107adf8f8 100644 --- a/packages/libs/extension/CHANGELOG.json +++ b/packages/libs/extension/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@azure-tools/extension", "entries": [ + { + "version": "3.7.1", + "tag": "@azure-tools/extension_v3.7.1", + "date": "Tue, 28 Nov 2023 19:02:52 GMT", + "comments": { + "patch": [ + { + "comment": "Resolve latest installed instead of first" + } + ] + } + }, { "version": "3.7.0", "tag": "@azure-tools/extension_v3.7.0", diff --git a/packages/libs/extension/CHANGELOG.md b/packages/libs/extension/CHANGELOG.md index 03238e2e3b..f3b1c7729b 100644 --- a/packages/libs/extension/CHANGELOG.md +++ b/packages/libs/extension/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @azure-tools/extension -This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. +This log was last generated on Tue, 28 Nov 2023 19:02:52 GMT and should not be manually modified. + +## 3.7.1 +Tue, 28 Nov 2023 19:02:52 GMT + +### Patches + +- Resolve latest installed instead of first ## 3.7.0 Thu, 16 Nov 2023 16:00:04 GMT diff --git a/packages/libs/extension/package.json b/packages/libs/extension/package.json index 6c28a83b9b..272107fd25 100644 --- a/packages/libs/extension/package.json +++ b/packages/libs/extension/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/extension", - "version": "3.7.0", + "version": "3.7.1", "description": "Yarn-Based extension aquisition (for Azure Open Source Projects)", "engines": { "node": ">=12.0.0" diff --git a/packages/libs/extension/src/main.ts b/packages/libs/extension/src/main.ts index e8e9999518..3f002af112 100644 --- a/packages/libs/extension/src/main.ts +++ b/packages/libs/extension/src/main.ts @@ -279,7 +279,7 @@ export class ExtensionManager { } public async getInstalledExtensions(): Promise> { - const results = new Array(); + const results = new Array<[Extension, string]>(); // iterate thru the folders. // the folder name should have the pattern @ORG#NAME@VER or NAME@VER @@ -305,7 +305,7 @@ export class ExtensionManager { ); continue; } - results.push(ext); + results.push([ext, version]); } catch (e) { // ignore things that don't look right. } @@ -315,7 +315,7 @@ export class ExtensionManager { // each folder will contain a node_modules folder, which should have a folder by // in the node_modules folder there should be a folder by the name of the - return results; + return results.sort((a, b) => semver.compare(b[1], a[1])).map((each) => each[0]); } private static lock = new AsyncLock(); diff --git a/packages/testing/test-public-packages/package.json b/packages/testing/test-public-packages/package.json index fe03bab4e7..f1a7efcfe9 100644 --- a/packages/testing/test-public-packages/package.json +++ b/packages/testing/test-public-packages/package.json @@ -30,8 +30,8 @@ }, "homepage": "https://github.com/Azure/autorest#readme", "dependencies": { - "@autorest/core": "~3.10.0", - "autorest": "~3.7.0", + "@autorest/core": "~3.10.1", + "autorest": "~3.7.1", "source-map-support": "^0.5.19" }, "devDependencies": { diff --git a/packages/tools/compare/package.json b/packages/tools/compare/package.json index 233ea56035..71a081cfc5 100644 --- a/packages/tools/compare/package.json +++ b/packages/tools/compare/package.json @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/Azure/autorest.compare#readme", "dependencies": { - "autorest": "~3.7.0", + "autorest": "~3.7.1", "chalk": "^4.1.0", "diff": "^5.1.0", "js-yaml": "~4.1.0", From 7c01d2e1767a0d099cb99a0572b7be498a5cbe8f Mon Sep 17 00:00:00 2001 From: Tymur Mudzhyri Date: Mon, 11 Dec 2023 19:47:29 +0200 Subject: [PATCH 08/33] Update link to autorest.python changelog (#4818) Just a small documentation fix that makes `@autorest.python` changelog link work --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 1d2f218122..f205b00541 100644 --- a/readme.md +++ b/readme.md @@ -58,7 +58,7 @@ The **AutoRest** tool generates client libraries for accessing RESTful web servi [core_chg]: packages/extensions/core/CHANGELOG.md [modelerfour_chg]: packages/extensions/modelerfour/CHANGELOG.md [csharp_chg]: https://github.com/Azure/autorest.csharp -[python_chg]: https://github.com/Azure/autorest.python/blob/autorestv3/ChangeLog.md +[python_chg]: https://github.com/Azure/autorest.python/blob/main/packages/autorest.python/ChangeLog.md [go_chg]: https://github.com/Azure/autorest.go [java_chg]: https://github.com/Azure/autorest.java/releases [swift_chg]: https://github.com/Azure/autorest.swift From faf5c1168232ba8a1e8fe02fbc28667c00db8c96 Mon Sep 17 00:00:00 2001 From: Jose Manuel Heredia Hidalgo Date: Thu, 21 Dec 2023 21:13:41 -0600 Subject: [PATCH 09/33] Initial Support for ARM in OpenAPI to TypeSpec Conversion (#4777) This PR represents the initial effort to integrate ARM (Azure Resource Manager) support into the OpenAPI to TypeSpec plugin. Utilizing the `@typespec/azure-resource-manager` library, we now generate TypeSpec representations of Azure resources. A subsequent PR will address the definition of Resource operations. **Overview:** 1. **Consuming Resource Metadata (`resources.json`)**: - Originates from C# codegen efforts, reusing their discovery and metadata extraction processes. - A parallel project is ongoing to enhance C# codegen, aiming to output all necessary metadata for this feature. - Currently, the metadata is read from a JSON file located at the project root. Integration into the pipeline will be a focus of future work. 2. **Per-Resource tsp File Generation**: - Files generated will contain model declarations for both the Resources and their subsequent operations. - This is achieved using templates and decorators from `@typespec/azure-resource-manager`. 3. **Reutilizing Data Plane Conversion Logic**: - Efforts have been made to reuse existing components, including model generation, decorator logic, interfaces, and more. **Upcoming Work:** - Inclusion of Resource operations within the Resource file, utilizing templates from `@typespec/azure-resource-manager`. - Removal of extraneous generated models. - For ARM spec conversions, there won't be a need for the `routes.tsp` file, as operations are defined alongside the resources. However, this file remains relevant and necessary for data plane spec conversions. --------- Co-authored-by: tadelesh Co-authored-by: Jose Manuel Heredia Hidalgo --- .prettierignore | 4 +- .vscode/settings.json | 5 +- .../arm-conversion_2023-12-21-09-41.json | 10 + .../arm-conversion_2023-10-02-17-10.json | 10 + common/config/rush/pnpm-lock.yaml | 243 +- eng/pipelines/publish-dev.yaml | 29 + eng/scripts/helpers.js | 2 +- packages/extensions/openapi-to-cadl/README.md | 47 - .../src/emiters/emit-cadl-config.ts | 24 - .../openapi-to-cadl/src/emiters/emit-main.ts | 24 - .../src/generate/generate-object.ts | 55 - .../openapi-to-cadl/src/interfaces.ts | 137 - .../extensions/openapi-to-cadl/src/main.ts | 52 - .../extensions/openapi-to-cadl/src/model.ts | 59 - .../openapi-to-cadl/src/utils/alias.ts | 22 - .../openapi-to-cadl/src/utils/decorators.ts | 110 - .../openapi-to-cadl/test/arm-compute/cl.md | 10 - .../test/arm-compute/tsp-output/main.tsp | 19 - .../test/arm-compute/tsp-output/models.tsp | 6537 ---------------- .../test/arm-compute/tsp-output/routes.tsp | 4961 ------------ .../test/batch/tsp-output/main.tsp | 19 - .../bodyComplex/tsp-output/tspconfig.yaml | 14 - .../complexObject/tsp-output/tspconfig.yaml | 14 - .../tsp-output/tspconfig.yaml | 14 - .../test/keyvault/tsp-output/main.tsp | 22 - .../test/keyvault/tsp-output/tspconfig.yaml | 14 - .../test/loadTest/tsp-output/tspconfig.yaml | 14 - .../test/nh/tsp-output/tspconfig.yaml | 14 - .../test/openAI/tsp-output/tspconfig.yaml | 14 - .../test/pagination/tsp-output/main.tsp | 19 - .../test/pagination/tsp-output/tspconfig.yaml | 14 - .../test/qna/tsp-output/tspconfig.yaml | 14 - .../qnaAuthoring/tsp-output/tspconfig.yaml | 14 - .../test/qnaRuntime/tsp-output/tspconfig.yaml | 14 - .../schemaRegistry/tsp-output/tspconfig.yaml | 14 - .../test/url/tsp-output/tspconfig.yaml | 14 - .../test/webpubsub/tsp-output/tspconfig.yaml | 14 - .../.eslintignore | 0 .../.eslintrc.yaml | 0 .../.npmignore | 0 .../CHANGELOG.json | 2 +- .../CHANGELOG.md | 2 +- .../LICENSE | 0 .../extensions/openapi-to-typespec/README.md | 51 + .../openapi-to-typespec/convert.ps1 | 67 + .../package.json | 31 +- .../src/autorest-session.ts | 9 + .../src/data-types.ts | 4 +- .../src/emiters/emit-arm-resources.ts | 48 + .../src/emiters/emit-main.ts | 63 + .../src/emiters/emit-models.ts | 27 +- .../src/emiters/emit-package.ts | 4 +- .../src/emiters/emit-routes.ts | 13 +- .../src/emiters/emit-typespec-config.ts | 42 + .../src/generate/generate-arm-resource.ts | 88 + .../src/generate/generate-enums.ts | 14 +- .../src/generate/generate-object.ts | 51 + .../src/generate/generate-operations.ts | 35 +- .../src/generate/generate-parameter.ts | 20 + .../generate/generate-service-information.ts | 35 +- .../src/index.ts | 0 .../openapi-to-typespec/src/interfaces.ts | 221 + .../openapi-to-typespec/src/main.ts | 75 + .../openapi-to-typespec/src/model.ts | 79 + .../src/options.ts | 28 +- .../src/paths.ts | 0 .../src/pretransforms/arm-pretransform.ts | 13 + .../src/pretransforms/name-pretransform.ts | 0 .../src/transforms/transform-arm-resources.ts | 760 ++ .../src/transforms/transform-choices.ts | 14 +- .../src/transforms/transform-object.ts | 84 +- .../src/transforms/transform-operations.ts | 37 +- .../transform-service-information.ts | 4 + .../openapi-to-typespec/src/utils/alias.ts | 22 + .../src/utils/decorators.ts | 255 + .../src/utils/discriminator.ts | 4 +- .../src/utils/docs.ts | 4 +- .../src/utils/errors.ts | 0 .../src/utils/format.ts | 6 +- .../src/utils/get-endpoint.ts | 0 .../src/utils/imports.ts | 13 +- .../src/utils/logger.ts | 0 .../src/utils/lro.ts | 0 .../src/utils/metadata.ts | 0 .../src/utils/model-generation.ts | 26 + .../src/utils/namespace.ts | 4 +- .../src/utils/operations.ts | 5 + .../src/utils/paging.ts | 0 .../src/utils/resource-discovery.ts | 186 + .../src/utils/resources.ts | 32 +- .../src/utils/schemas.ts | 15 +- .../src/utils/values.ts | 0 .../test/analyzeText/readme.md | 0 .../test/analyzeText/tsp-output/main.tsp | 7 +- .../test/analyzeText/tsp-output/models.tsp | 28 +- .../test/analyzeText/tsp-output/package.json | 0 .../test/analyzeText/tsp-output/routes.tsp | 107 +- .../analyzeText}/tsp-output/tspconfig.yaml | 2 +- .../test/anomalyDetector/readme.md | 0 .../test/anomalyDetector/tsp-output/main.tsp | 0 .../anomalyDetector/tsp-output/models.tsp | 4 + .../anomalyDetector/tsp-output/routes.tsp | 44 +- .../tsp-output/tspconfig.yaml | 2 +- .../test/arm-agrifood/agrifood.md | 40 + .../test/arm-agrifood/resources.json | 561 ++ .../arm-agrifood/tsp-output/DataConnector.tsp | 55 + .../tsp-output/DataManagerForAgriculture.tsp | 62 + .../DataManagerForAgricultureExtension.tsp | 72 + .../DataManagerForAgricultureSolution.tsp | 58 + .../arm-agrifood/tsp-output/Extension.tsp | 67 + .../tsp-output/PrivateEndpointConnection.tsp | 34 + .../tsp-output/PrivateLinkResource.tsp | 29 + .../test/arm-agrifood/tsp-output/Solution.tsp | 108 + .../test/arm-agrifood/tsp-output/main.tsp | 36 + .../test/arm-agrifood/tsp-output/models.tsp | 492 ++ .../test/arm-agrifood/tsp-output/routes.tsp | 48 + .../arm-agrifood/tsp-output/tspconfig.yaml | 11 + .../test/arm-apimanagement/apimanagement.md | 542 ++ .../test/arm-apimanagement/resources.json | 5068 +++++++++++++ .../tsp-output/AccessInformationContract.tsp | 100 + .../tsp-output/ApiContract.tsp | 241 + .../ApiManagementServiceResource.tsp | 946 +++ .../tsp-output/ApiReleaseContract.tsp | 92 + .../tsp-output/ApiVersionSetContract.tsp | 92 + .../AuthorizationServerContract.tsp | 99 + .../tsp-output/BackendContract.tsp | 96 + .../tsp-output/CacheContract.tsp | 85 + .../tsp-output/CertificateContract.tsp | 90 + .../tsp-output/DeletedServiceContract.tsp | 34 + .../tsp-output/DiagnosticContract.tsp | 92 + .../tsp-output/EmailTemplateContract.tsp | 89 + .../GatewayCertificateAuthorityContract.tsp | 81 + .../tsp-output/GatewayContract.tsp | 149 + .../GatewayHostnameConfigurationContract.tsp | 80 + .../tsp-output/GlobalSchemaContract.tsp | 79 + .../tsp-output/GroupContract.tsp | 133 + .../tsp-output/IdentityProviderContract.tsp | 78 + .../tsp-output/IssueAttachmentContract.tsp | 81 + .../tsp-output/IssueCommentContract.tsp | 80 + .../tsp-output/IssueContract.tsp | 102 + .../tsp-output/LoggerContract.tsp | 91 + .../tsp-output/NamedValueContract.tsp | 107 + .../tsp-output/NotificationContract.tsp | 114 + .../OpenidConnectProviderContract.tsp | 128 + .../tsp-output/OperationContract.tsp | 95 + .../tsp-output/PolicyContract.tsp | 68 + .../tsp-output/PortalDelegationSettings.tsp | 70 + .../tsp-output/PortalRevisionContract.tsp | 80 + .../tsp-output/PortalSigninSettings.tsp | 63 + .../tsp-output/PortalSignupSettings.tsp | 63 + .../tsp-output/PrivateEndpointConnection.tsp | 34 + .../tsp-output/PrivateLinkResource.tsp | 29 + .../tsp-output/ProductContract.tsp | 238 + .../tsp-output/SchemaContract.tsp | 83 + .../tsp-output/SubscriptionContract.tsp | 129 + .../tsp-output/TagContract.tsp | 59 + .../tsp-output/TagDescriptionContract.tsp | 81 + .../tsp-output/TenantSettingsContract.tsp | 39 + .../tsp-output/UserContract.tsp | 213 + .../arm-apimanagement/tsp-output/main.tsp | 77 + .../arm-apimanagement/tsp-output/models.tsp | 3834 ++++++++++ .../arm-apimanagement/tsp-output/routes.tsp | 1522 ++++ .../tsp-output/tspconfig.yaml | 11 + .../azureintegrationspaces.md | 9 + .../arm-azureintegrationspaces/resources.json | 435 ++ .../tsp-output/Application.tsp | 108 + .../tsp-output/BusinessProcess.tsp | 78 + .../tsp-output/BusinessProcessVersion.tsp | 71 + .../tsp-output/InfrastructureResource.tsp | 82 + .../tsp-output/Space.tsp | 78 + .../tsp-output/main.tsp | 33 + .../tsp-output/models.tsp | 314 + .../tsp-output/routes.tsp | 220 + .../tsp-output/tspconfig.yaml | 11 + .../test/arm-compute/compute.md | 373 + .../test/arm-compute/resources.json | 3930 ++++++++++ .../tsp-output/AvailabilitySet.tsp | 56 + .../tsp-output/CapacityReservation.tsp | 52 + .../tsp-output/CapacityReservationGroup.tsp | 60 + .../arm-compute/tsp-output/CloudService.tsp | 116 + .../tsp-output/CloudServiceRole.tsp | 31 + .../tsp-output/CommunityGallery.tsp | 27 + .../tsp-output/CommunityGalleryImage.tsp | 29 + .../CommunityGalleryImageVersion.tsp | 30 + .../arm-compute/tsp-output/DedicatedHost.tsp | 50 + .../tsp-output/DedicatedHostGroup.tsp | 50 + .../test/arm-compute/tsp-output/Disk.tsp | 52 + .../arm-compute/tsp-output/DiskAccess.tsp | 57 + .../tsp-output/DiskEncryptionSet.tsp | 39 + .../tsp-output/DiskRestorePoint.tsp | 73 + .../test/arm-compute/tsp-output/Gallery.tsp | 54 + .../tsp-output/GalleryApplication.tsp | 38 + .../tsp-output/GalleryApplicationVersion.tsp | 48 + .../arm-compute/tsp-output/GalleryImage.tsp | 35 + .../tsp-output/GalleryImageVersion.tsp | 47 + .../test/arm-compute/tsp-output/Image.tsp | 47 + .../test/arm-compute/tsp-output/OSFamily.tsp | 28 + .../test/arm-compute/tsp-output/OSVersion.tsp | 28 + .../tsp-output/PrivateEndpointConnection.tsp | 34 + .../tsp-output/ProximityPlacementGroup.tsp | 52 + .../arm-compute/tsp-output/RestorePoint.tsp | 62 + .../tsp-output/RestorePointCollection.tsp | 77 + .../arm-compute/tsp-output/RoleInstance.tsp | 108 + .../tsp-output/RollingUpgradeStatusInfo.tsp | 36 + .../arm-compute/tsp-output/SharedGallery.tsp | 38 + .../tsp-output/SharedGalleryImage.tsp | 38 + .../tsp-output/SharedGalleryImageVersion.tsp | 39 + .../test/arm-compute/tsp-output/Snapshot.tsp | 45 + .../tsp-output/SshPublicKeyResource.tsp | 44 + .../arm-compute/tsp-output/VirtualMachine.tsp | 216 + .../tsp-output/VirtualMachineExtension.tsp | 57 + .../VirtualMachineExtensionImage.tsp | 28 + .../tsp-output/VirtualMachineRunCommand.tsp | 70 + .../tsp-output/VirtualMachineScaleSet.tsp | 412 + .../VirtualMachineScaleSetExtension.tsp | 86 + .../tsp-output/VirtualMachineScaleSetVM.tsp | 275 + .../VirtualMachineScaleSetVMExtension.tsp | 90 + .../test/arm-compute/tsp-output/main.tsp | 61 + .../test/arm-compute/tsp-output/models.tsp | 6657 +++++++++++++++++ .../test/arm-compute/tsp-output/routes.tsp | 626 ++ .../arm-compute/tsp-output/tspconfig.yaml | 11 + .../arm-networkanalytics/networkanalytics.md | 9 + .../test/arm-networkanalytics/resources.json | 291 + .../tsp-output/DataProduct.tsp | 65 + .../tsp-output/DataProductsCatalog.tsp | 28 + .../tsp-output/DataType.tsp | 49 + .../arm-networkanalytics/tsp-output/main.tsp | 30 + .../tsp-output/models.tsp | 445 ++ .../tsp-output/tspconfig.yaml | 11 + .../playwrighttesting.md | 13 + .../test/arm-playwrighttesting/resources.json | 147 + .../tsp-output/Account.tsp | 38 + .../tsp-output/Quota.tsp | 28 + .../arm-playwrighttesting/tsp-output/main.tsp | 29 + .../tsp-output/models.tsp | 115 + .../tsp-output/tspconfig.yaml | 11 + .../test/arm-servicenetworking/resources.json | 256 + .../servicenetworking.md | 8 + .../tsp-output/Association.tsp | 36 + .../tsp-output/Frontend.tsp | 36 + .../tsp-output/TrafficController.tsp | 36 + .../arm-servicenetworking/tsp-output/main.tsp | 30 + .../tsp-output/models.tsp | 103 + .../tsp-output/tspconfig.yaml | 11 + .../test/arm-sphere/resources.json | 680 ++ .../test/arm-sphere/sphere.md | 8 + .../test/arm-sphere/tsp-output/Catalog.tsp | 138 + .../arm-sphere/tsp-output/Certificate.tsp | 62 + .../test/arm-sphere/tsp-output/Deployment.tsp | 54 + .../test/arm-sphere/tsp-output/Device.tsp | 42 + .../arm-sphere/tsp-output/DeviceGroup.tsp | 64 + .../test/arm-sphere/tsp-output/Image.tsp | 54 + .../test/arm-sphere/tsp-output/Product.tsp | 44 + .../test/arm-sphere/tsp-output/main.tsp | 34 + .../test/arm-sphere/tsp-output/models.tsp | 360 + .../test/arm-sphere/tsp-output/tspconfig.yaml | 11 + .../test/arm-storage/resources.json | 1316 ++++ .../test/arm-storage/storage.md | 319 + .../arm-storage/tsp-output/BlobContainer.tsp | 66 + .../tsp-output/BlobInventoryPolicy.tsp | 32 + .../tsp-output/BlobServiceProperties.tsp | 50 + .../arm-storage/tsp-output/DeletedAccount.tsp | 30 + .../tsp-output/EncryptionScope.tsp | 54 + .../tsp-output/FileServiceProperties.tsp | 50 + .../test/arm-storage/tsp-output/FileShare.tsp | 104 + .../tsp-output/ImmutabilityPolicy.tsp | 95 + .../test/arm-storage/tsp-output/LocalUser.tsp | 43 + .../tsp-output/ManagementPolicy.tsp | 30 + .../tsp-output/ObjectReplicationPolicy.tsp | 35 + .../tsp-output/PrivateEndpointConnection.tsp | 34 + .../tsp-output/QueueServiceProperties.tsp | 49 + .../arm-storage/tsp-output/StorageAccount.tsp | 153 + .../arm-storage/tsp-output/StorageQueue.tsp | 51 + .../test/arm-storage/tsp-output/Table.tsp | 38 + .../tsp-output/TableServiceProperties.tsp | 49 + .../test/arm-storage/tsp-output/main.tsp | 45 + .../test/arm-storage/tsp-output/models.tsp | 2546 +++++++ .../test/arm-storage/tsp-output/routes.tsp | 42 + .../arm-storage/tsp-output/tspconfig.yaml | 11 + .../test/arm-test/resources.json | 181 + .../test/arm-test/swagger/basic.json | 471 ++ .../resource-management/v1/privatelinks.json | 171 + .../resource-management/v1/types.json | 512 ++ .../resource-management/v2/privatelinks.json | 171 + .../resource-management/v2/types.json | 623 ++ .../v3/managedidentity.json | 101 + .../resource-management/v3/privatelinks.json | 171 + .../resource-management/v3/types.json | 607 ++ .../arm-test/swagger/dict-properties.json | 171 + .../test/arm-test/swagger/singleton.json | 110 + .../openapi-to-typespec/test/arm-test/test.md | 16 + .../test/arm-test/tsp-output/DictProperty.tsp | 30 + .../test/arm-test/tsp-output/Employee.tsp | 36 + .../test/arm-test/tsp-output/Enroll.tsp | 26 + .../test/arm-test/tsp-output/main.tsp | 29 + .../test/arm-test/tsp-output/models.tsp | 63 + .../test/arm-test/tsp-output/tspconfig.yaml | 11 + .../test/batch/batch.md | 0 .../test/batch/tsp-output/main.tsp | 22 + .../test/batch/tsp-output/models.tsp | 53 +- .../test/batch/tsp-output/routes.tsp | 1308 ++-- .../test/batch}/tsp-output/tspconfig.yaml | 2 +- .../test/bodyComplex/body-complex.json | 0 .../test/bodyComplex/tsp-output/main.tsp | 7 +- .../test/bodyComplex/tsp-output/models.tsp | 9 +- .../test/bodyComplex/tsp-output/routes.tsp | 366 +- .../bodyComplex}/tsp-output/tspconfig.yaml | 2 +- .../test/complexObject/complexObject.json | 0 .../test/complexObject/tsp-output/main.tsp | 7 +- .../test/complexObject/tsp-output/models.tsp | 0 .../test/complexObject/tsp-output/routes.tsp | 0 .../complexObject/tsp-output/tspconfig.yaml | 14 + .../test/confidentialLedger/cl.md | 0 .../confidentialLedger/tsp-output/main.tsp | 7 +- .../confidentialLedger/tsp-output/models.tsp | 0 .../confidentialLedger/tsp-output/routes.tsp | 24 +- .../tsp-output/tspconfig.yaml | 14 + .../test/keyvault/keyvault.md | 0 .../test/keyvault/tsp-output/main.tsp | 25 + .../test/keyvault/tsp-output/models.tsp | 59 +- .../test/keyvault/tsp-output/routes.tsp | 200 +- .../test/keyvault/tsp-output/tspconfig.yaml | 14 + .../test/loadTest/loadTest.md | 0 .../test/loadTest/tsp-output/main.tsp | 7 +- .../test/loadTest/tsp-output/models.tsp | 10 + .../test/loadTest/tsp-output/routes.tsp | 153 +- .../test/loadTest/tsp-output/tspconfig.yaml | 14 + .../test/nh/nh.json | 0 .../test/nh/tsp-output/main.tsp | 7 +- .../test/nh/tsp-output/models.tsp | 0 .../test/nh/tsp-output/routes.tsp | 100 +- .../test/nh/tsp-output/tspconfig.yaml | 14 + .../test/openAI/openai.md | 0 .../test/openAI/tsp-output/main.tsp | 7 +- .../test/openAI/tsp-output/models.tsp | 7 +- .../test/openAI/tsp-output/routes.tsp | 4 +- .../test/openAI/tsp-output/tspconfig.yaml | 14 + .../test/pagination/paging.json | 0 .../test/pagination/tsp-output/main.tsp | 22 + .../test/pagination/tsp-output/models.tsp | 0 .../test/pagination/tsp-output/routes.tsp | 50 +- .../test/pagination/tsp-output/tspconfig.yaml | 14 + .../test/qna/qna.md | 0 .../test/qna/tsp-output/main.tsp | 7 +- .../test/qna/tsp-output/models.tsp | 12 +- .../test/qna/tsp-output/routes.tsp | 10 +- .../test/qna/tsp-output/tspconfig.yaml | 14 + .../test/qnaAuthoring/qna.md | 0 .../test/qnaAuthoring/tsp-output/main.tsp | 7 +- .../test/qnaAuthoring/tsp-output/models.tsp | 12 +- .../test/qnaAuthoring/tsp-output/routes.tsp | 101 +- .../qnaAuthoring/tsp-output/tspconfig.yaml | 14 + .../test/qnaRuntime/qna.md | 0 .../test/qnaRuntime/tsp-output/main.tsp | 0 .../test/qnaRuntime/tsp-output/models.tsp | 29 +- .../test/qnaRuntime/tsp-output/routes.tsp | 0 .../test/qnaRuntime/tsp-output/tspconfig.yaml | 14 + .../test/schemaRegistry/readme.md | 0 .../test/schemaRegistry/tsp-output/main.tsp | 7 +- .../test/schemaRegistry/tsp-output/models.tsp | 0 .../test/schemaRegistry/tsp-output/routes.tsp | 10 +- .../schemaRegistry/tsp-output/tspconfig.yaml | 14 + .../test/url/tsp-output/main.tsp | 0 .../test/url/tsp-output/models.tsp | 0 .../test/url/tsp-output/routes.tsp | 177 +- .../test/url/tsp-output/tspconfig.yaml | 14 + .../test/url/url.json | 0 .../test/utils/check-clean-tree.js | 0 .../test/utils/generate-typespec.ts} | 14 +- .../test/utils/printer.ts | 0 .../test/utils/resolve-root.ts | 0 .../test/webpubsub/readme.md | 0 .../test/webpubsub/tsp-output/main.tsp | 7 +- .../test/webpubsub/tsp-output/models.tsp | 0 .../test/webpubsub/tsp-output/routes.tsp | 187 +- .../test/webpubsub/tsp-output/tspconfig.yaml | 14 + .../tsconfig.build.json | 0 .../tsconfig.json | 0 .../webpack.config.js | 0 .../resources/default-configuration.md | 2 +- .../resources/plugin-openapi-to-cadl.md | 11 - .../resources/plugin-openapi-to-typespec.md | 11 + rush.json | 4 +- 383 files changed, 49897 insertions(+), 14153 deletions(-) create mode 100644 common/changes/@autorest/configuration/arm-conversion_2023-12-21-09-41.json create mode 100644 common/changes/@autorest/openapi-to-typespec/arm-conversion_2023-10-02-17-10.json create mode 100644 eng/pipelines/publish-dev.yaml delete mode 100644 packages/extensions/openapi-to-cadl/README.md delete mode 100644 packages/extensions/openapi-to-cadl/src/emiters/emit-cadl-config.ts delete mode 100644 packages/extensions/openapi-to-cadl/src/emiters/emit-main.ts delete mode 100644 packages/extensions/openapi-to-cadl/src/generate/generate-object.ts delete mode 100644 packages/extensions/openapi-to-cadl/src/interfaces.ts delete mode 100644 packages/extensions/openapi-to-cadl/src/main.ts delete mode 100644 packages/extensions/openapi-to-cadl/src/model.ts delete mode 100644 packages/extensions/openapi-to-cadl/src/utils/alias.ts delete mode 100644 packages/extensions/openapi-to-cadl/src/utils/decorators.ts delete mode 100644 packages/extensions/openapi-to-cadl/test/arm-compute/cl.md delete mode 100644 packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/main.tsp delete mode 100644 packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/models.tsp delete mode 100644 packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/routes.tsp delete mode 100644 packages/extensions/openapi-to-cadl/test/batch/tsp-output/main.tsp delete mode 100644 packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/tspconfig.yaml delete mode 100644 packages/extensions/openapi-to-cadl/test/complexObject/tsp-output/tspconfig.yaml delete mode 100644 packages/extensions/openapi-to-cadl/test/confidentialLedger/tsp-output/tspconfig.yaml delete mode 100644 packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/main.tsp delete mode 100644 packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/tspconfig.yaml delete mode 100644 packages/extensions/openapi-to-cadl/test/loadTest/tsp-output/tspconfig.yaml delete mode 100644 packages/extensions/openapi-to-cadl/test/nh/tsp-output/tspconfig.yaml delete mode 100644 packages/extensions/openapi-to-cadl/test/openAI/tsp-output/tspconfig.yaml delete mode 100644 packages/extensions/openapi-to-cadl/test/pagination/tsp-output/main.tsp delete mode 100644 packages/extensions/openapi-to-cadl/test/pagination/tsp-output/tspconfig.yaml delete mode 100644 packages/extensions/openapi-to-cadl/test/qna/tsp-output/tspconfig.yaml delete mode 100644 packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/tspconfig.yaml delete mode 100644 packages/extensions/openapi-to-cadl/test/qnaRuntime/tsp-output/tspconfig.yaml delete mode 100644 packages/extensions/openapi-to-cadl/test/schemaRegistry/tsp-output/tspconfig.yaml delete mode 100644 packages/extensions/openapi-to-cadl/test/url/tsp-output/tspconfig.yaml delete mode 100644 packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/tspconfig.yaml rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/.eslintignore (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/.eslintrc.yaml (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/.npmignore (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/CHANGELOG.json (98%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/CHANGELOG.md (93%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/LICENSE (100%) create mode 100644 packages/extensions/openapi-to-typespec/README.md create mode 100644 packages/extensions/openapi-to-typespec/convert.ps1 rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/package.json (72%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/autorest-session.ts (56%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/data-types.ts (68%) create mode 100644 packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts create mode 100644 packages/extensions/openapi-to-typespec/src/emiters/emit-main.ts rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/emiters/emit-models.ts (56%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/emiters/emit-package.ts (88%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/emiters/emit-routes.ts (58%) create mode 100644 packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts create mode 100644 packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/generate/generate-enums.ts (62%) create mode 100644 packages/extensions/openapi-to-typespec/src/generate/generate-object.ts rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/generate/generate-operations.ts (69%) create mode 100644 packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/generate/generate-service-information.ts (58%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/index.ts (100%) create mode 100644 packages/extensions/openapi-to-typespec/src/interfaces.ts create mode 100644 packages/extensions/openapi-to-typespec/src/main.ts create mode 100644 packages/extensions/openapi-to-typespec/src/model.ts rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/options.ts (52%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/paths.ts (100%) create mode 100644 packages/extensions/openapi-to-typespec/src/pretransforms/arm-pretransform.ts rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/pretransforms/name-pretransform.ts (100%) create mode 100644 packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/transforms/transform-choices.ts (80%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/transforms/transform-object.ts (69%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/transforms/transform-operations.ts (81%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/transforms/transform-service-information.ts (94%) create mode 100644 packages/extensions/openapi-to-typespec/src/utils/alias.ts create mode 100644 packages/extensions/openapi-to-typespec/src/utils/decorators.ts rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/utils/discriminator.ts (89%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/utils/docs.ts (91%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/utils/errors.ts (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/utils/format.ts (56%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/utils/get-endpoint.ts (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/utils/imports.ts (77%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/utils/logger.ts (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/utils/lro.ts (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/utils/metadata.ts (100%) create mode 100644 packages/extensions/openapi-to-typespec/src/utils/model-generation.ts rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/utils/namespace.ts (66%) create mode 100644 packages/extensions/openapi-to-typespec/src/utils/operations.ts rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/utils/paging.ts (100%) create mode 100644 packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/utils/resources.ts (93%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/utils/schemas.ts (72%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/src/utils/values.ts (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/analyzeText/readme.md (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/analyzeText/tsp-output/main.tsp (92%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/analyzeText/tsp-output/models.tsp (98%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/analyzeText/tsp-output/package.json (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/analyzeText/tsp-output/routes.tsp (87%) rename packages/extensions/{openapi-to-cadl/test/batch => openapi-to-typespec/test/analyzeText}/tsp-output/tspconfig.yaml (94%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/anomalyDetector/readme.md (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/anomalyDetector/tsp-output/main.tsp (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/anomalyDetector/tsp-output/models.tsp (99%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/anomalyDetector/tsp-output/routes.tsp (85%) rename packages/extensions/{openapi-to-cadl/test/analyzeText => openapi-to-typespec/test/anomalyDetector}/tsp-output/tspconfig.yaml (94%) create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/agrifood.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/apimanagement.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/azureintegrationspaces.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/compute.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/networkanalytics.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/playwrighttesting.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/servicenetworking.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/sphere.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/storage.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/swagger/basic.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v1/privatelinks.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v1/types.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v2/privatelinks.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v2/types.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v3/managedidentity.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v3/privatelinks.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v3/types.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/swagger/dict-properties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/swagger/singleton.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/test.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/tspconfig.yaml rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/batch/batch.md (100%) create mode 100644 packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/batch/tsp-output/models.tsp (99%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/batch/tsp-output/routes.tsp (85%) rename packages/extensions/{openapi-to-cadl/test/anomalyDetector => openapi-to-typespec/test/batch}/tsp-output/tspconfig.yaml (94%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/bodyComplex/body-complex.json (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/bodyComplex/tsp-output/main.tsp (76%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/bodyComplex/tsp-output/models.tsp (98%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/bodyComplex/tsp-output/routes.tsp (55%) rename packages/extensions/{openapi-to-cadl/test/arm-compute => openapi-to-typespec/test/bodyComplex}/tsp-output/tspconfig.yaml (94%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/complexObject/complexObject.json (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/complexObject/tsp-output/main.tsp (71%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/complexObject/tsp-output/models.tsp (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/complexObject/tsp-output/routes.tsp (100%) create mode 100644 packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/tspconfig.yaml rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/confidentialLedger/cl.md (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/confidentialLedger/tsp-output/main.tsp (83%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/confidentialLedger/tsp-output/models.tsp (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/confidentialLedger/tsp-output/routes.tsp (92%) create mode 100644 packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/tspconfig.yaml rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/keyvault/keyvault.md (100%) create mode 100644 packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/keyvault/tsp-output/models.tsp (98%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/keyvault/tsp-output/routes.tsp (95%) create mode 100644 packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/tspconfig.yaml rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/loadTest/loadTest.md (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/loadTest/tsp-output/main.tsp (81%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/loadTest/tsp-output/models.tsp (99%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/loadTest/tsp-output/routes.tsp (83%) create mode 100644 packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/tspconfig.yaml rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/nh/nh.json (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/nh/tsp-output/main.tsp (82%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/nh/tsp-output/models.tsp (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/nh/tsp-output/routes.tsp (84%) create mode 100644 packages/extensions/openapi-to-typespec/test/nh/tsp-output/tspconfig.yaml rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/openAI/openai.md (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/openAI/tsp-output/main.tsp (74%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/openAI/tsp-output/models.tsp (98%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/openAI/tsp-output/routes.tsp (96%) create mode 100644 packages/extensions/openapi-to-typespec/test/openAI/tsp-output/tspconfig.yaml rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/pagination/paging.json (100%) create mode 100644 packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/pagination/tsp-output/models.tsp (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/pagination/tsp-output/routes.tsp (92%) create mode 100644 packages/extensions/openapi-to-typespec/test/pagination/tsp-output/tspconfig.yaml rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/qna/qna.md (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/qna/tsp-output/main.tsp (91%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/qna/tsp-output/models.tsp (98%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/qna/tsp-output/routes.tsp (88%) create mode 100644 packages/extensions/openapi-to-typespec/test/qna/tsp-output/tspconfig.yaml rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/qnaAuthoring/qna.md (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/qnaAuthoring/tsp-output/main.tsp (93%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/qnaAuthoring/tsp-output/models.tsp (98%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/qnaAuthoring/tsp-output/routes.tsp (87%) create mode 100644 packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/tspconfig.yaml rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/qnaRuntime/qna.md (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/qnaRuntime/tsp-output/main.tsp (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/qnaRuntime/tsp-output/models.tsp (94%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/qnaRuntime/tsp-output/routes.tsp (100%) create mode 100644 packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/tspconfig.yaml rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/schemaRegistry/readme.md (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/schemaRegistry/tsp-output/main.tsp (84%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/schemaRegistry/tsp-output/models.tsp (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/schemaRegistry/tsp-output/routes.tsp (92%) create mode 100644 packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/tspconfig.yaml rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/url/tsp-output/main.tsp (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/url/tsp-output/models.tsp (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/url/tsp-output/routes.tsp (89%) create mode 100644 packages/extensions/openapi-to-typespec/test/url/tsp-output/tspconfig.yaml rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/url/url.json (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/utils/check-clean-tree.js (100%) rename packages/extensions/{openapi-to-cadl/test/utils/generate-cadl.ts => openapi-to-typespec/test/utils/generate-typespec.ts} (83%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/utils/printer.ts (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/utils/resolve-root.ts (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/webpubsub/readme.md (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/webpubsub/tsp-output/main.tsp (79%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/webpubsub/tsp-output/models.tsp (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/test/webpubsub/tsp-output/routes.tsp (81%) create mode 100644 packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/tspconfig.yaml rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/tsconfig.build.json (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/tsconfig.json (100%) rename packages/extensions/{openapi-to-cadl => openapi-to-typespec}/webpack.config.js (100%) delete mode 100644 packages/libs/configuration/resources/plugin-openapi-to-cadl.md create mode 100644 packages/libs/configuration/resources/plugin-openapi-to-typespec.md diff --git a/.prettierignore b/.prettierignore index c7bd78a6c0..6ccf146fc2 100644 --- a/.prettierignore +++ b/.prettierignore @@ -338,5 +338,5 @@ packages/extensions/core/test/plugins/*/expected/*.json # MICROSOFT SECURITY.md /SECURITY.md -# Generated cadl -packages/extensions/openapi-to-cadl/test/**/*.tsp \ No newline at end of file +# Generated typespec +packages/extensions/openapi-to-typespec/test/**/*.tsp diff --git a/.vscode/settings.json b/.vscode/settings.json index e737e6c57e..cc5e9a45be 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -24,9 +24,12 @@ "git.ignoreLimitWarning": true, "files.eol": "\n", "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" }, "[typespec]": { "editor.defaultFormatter": "Microsoft.typespec-vscode" + }, + "[powershell]": { + "editor.defaultFormatter": "ms-vscode.powershell" } } diff --git a/common/changes/@autorest/configuration/arm-conversion_2023-12-21-09-41.json b/common/changes/@autorest/configuration/arm-conversion_2023-12-21-09-41.json new file mode 100644 index 0000000000..e8093c1950 --- /dev/null +++ b/common/changes/@autorest/configuration/arm-conversion_2023-12-21-09-41.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/configuration", + "comment": "rename openapi-to-cadl to openapi-to-typespec", + "type": "patch" + } + ], + "packageName": "@autorest/configuration" +} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/arm-conversion_2023-10-02-17-10.json b/common/changes/@autorest/openapi-to-typespec/arm-conversion_2023-10-02-17-10.json new file mode 100644 index 0000000000..875e9bbdfe --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/arm-conversion_2023-10-02-17-10.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Initial Support for ARM in OpenAPI to TypeSpec Conversion", + "type": "minor" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 32826214e9..e384513d3c 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -15,11 +15,14 @@ dependencies: specifier: ~3.0.0 version: 3.0.255 '@azure-tools/typespec-autorest': - specifier: ^0.36.0 - version: 0.36.1(@azure-tools/typespec-azure-core@0.36.0)(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.50.0)(@typespec/versioning@0.50.0) + specifier: ^0.37.2 + version: 0.37.2(@azure-tools/typespec-azure-core@0.37.2)(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.51.0)(@typespec/versioning@0.51.0) '@azure-tools/typespec-azure-core': - specifier: ^0.36.0 - version: 0.36.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/rest@0.50.0) + specifier: ^0.37.2 + version: 0.37.2(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/rest@0.51.0) + '@azure-tools/typespec-azure-resource-manager': + specifier: ^0.37.1 + version: 0.37.1(@azure-tools/typespec-autorest@0.37.2)(@azure-tools/typespec-azure-core@0.37.2)(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.51.0)(@typespec/versioning@0.51.0) '@azure-tools/uri': specifier: ~3.1.1 version: 3.1.1 @@ -83,9 +86,9 @@ dependencies: '@rush-temp/openapi': specifier: file:./projects/openapi.tgz version: file:projects/openapi.tgz(prettier@3.1.0)(ts-node@10.9.1) - '@rush-temp/openapi-to-cadl': - specifier: file:./projects/openapi-to-cadl.tgz - version: file:projects/openapi-to-cadl.tgz(jest@29.7.0) + '@rush-temp/openapi-to-typespec': + specifier: file:./projects/openapi-to-typespec.tgz + version: file:projects/openapi-to-typespec.tgz(jest@29.7.0) '@rush-temp/schemas': specifier: file:./projects/schemas.tgz version: file:projects/schemas.tgz @@ -137,6 +140,9 @@ dependencies: '@types/pacote': specifier: 11.1.3 version: 11.1.3 + '@types/pluralize': + specifier: ^0.0.30 + version: 0.0.30 '@types/prettier': specifier: ^2.7.0 version: 2.7.3 @@ -159,26 +165,26 @@ dependencies: specifier: ^6.11.0 version: 6.11.0(eslint@8.53.0)(typescript@5.2.2) '@typespec/compiler': - specifier: ^0.50.0 - version: 0.50.0 + specifier: ^0.51.0 + version: 0.51.0 '@typespec/http': - specifier: ^0.50.0 - version: 0.50.0(@typespec/compiler@0.50.0) + specifier: ^0.51.0 + version: 0.51.0(@typespec/compiler@0.51.0) '@typespec/openapi': specifier: ^0.50.0 - version: 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) + version: 0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) '@typespec/openapi3': specifier: ^0.50.0 - version: 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/openapi@0.50.0)(@typespec/versioning@0.50.0) + version: 0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/versioning@0.51.0) '@typespec/prettier-plugin-typespec': - specifier: ^0.50.0 - version: 0.50.0 + specifier: ^0.51.0 + version: 0.51.0 '@typespec/rest': - specifier: ^0.50.0 - version: 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) + specifier: ^0.51.0 + version: 0.51.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) '@typespec/versioning': - specifier: ^0.50.0 - version: 0.50.0(@typespec/compiler@0.50.0) + specifier: ^0.51.0 + version: 0.51.0(@typespec/compiler@0.51.0) ajv: specifier: ^8.6.0 version: 8.12.0 @@ -269,6 +275,9 @@ dependencies: pacote: specifier: ~9.5.12 version: 9.5.12 + pluralize: + specifier: ^8.0.0 + version: 8.0.0 prettier: specifier: ~3.1.0 version: 3.1.0 @@ -381,36 +390,57 @@ packages: engines: {node: '>=10.12.0'} dev: false - /@azure-tools/typespec-autorest@0.36.1(@azure-tools/typespec-azure-core@0.36.0)(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.50.0)(@typespec/versioning@0.50.0): - resolution: {integrity: sha512-huNjjIVVToSfU04ABdlpGJUfA+fI8BsyJP/wAzl3FIJij/vwqMPQp9ioHXlTQGfxmpReyKreDQgCmyCxN5+6aA==} + /@azure-tools/typespec-autorest@0.37.2(@azure-tools/typespec-azure-core@0.37.2)(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.51.0)(@typespec/versioning@0.51.0): + resolution: {integrity: sha512-iLNF2tdIET0qVmZ+7LMXGLj9tDI0I8pfDq12kSLQryAp6NzOn6hMz73gUEgIE1Gj6KE4YrQXfHf/F4kNfHpWeA==} engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-azure-core': ~0.36.0 - '@typespec/compiler': ~0.50.0 - '@typespec/http': ~0.50.0 - '@typespec/openapi': ~0.50.0 - '@typespec/rest': ~0.50.0 - '@typespec/versioning': ~0.50.0 + '@azure-tools/typespec-azure-core': ~0.37.1 + '@typespec/compiler': ~0.51.0 + '@typespec/http': ~0.51.0 + '@typespec/openapi': ~0.51.0 + '@typespec/rest': ~0.51.0 + '@typespec/versioning': ~0.51.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.37.2(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/rest@0.51.0) + '@typespec/compiler': 0.51.0 + '@typespec/http': 0.51.0(@typespec/compiler@0.51.0) + '@typespec/openapi': 0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) + '@typespec/rest': 0.51.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) + '@typespec/versioning': 0.51.0(@typespec/compiler@0.51.0) + dev: false + + /@azure-tools/typespec-azure-core@0.37.2(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/rest@0.51.0): + resolution: {integrity: sha512-/503w3jnRnStowsI7etaDynwQcz7ecNqhFKZErBYGbKVZKoEwJIr5d59m52sjJs8cmr2336es6jw2n2TdfotrA==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@typespec/compiler': ~0.51.0 + '@typespec/http': ~0.51.0 + '@typespec/rest': ~0.51.0 dependencies: - '@azure-tools/typespec-azure-core': 0.36.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/rest@0.50.0) - '@typespec/compiler': 0.50.0 - '@typespec/http': 0.50.0(@typespec/compiler@0.50.0) - '@typespec/openapi': 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) - '@typespec/rest': 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) - '@typespec/versioning': 0.50.0(@typespec/compiler@0.50.0) + '@typespec/compiler': 0.51.0 + '@typespec/http': 0.51.0(@typespec/compiler@0.51.0) + '@typespec/rest': 0.51.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) dev: false - /@azure-tools/typespec-azure-core@0.36.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/rest@0.50.0): - resolution: {integrity: sha512-qyUSHJSDM4ftD1Z0nvkk0FrC86vLyYuYrPdi3wQVj+ReJZJts+7l9PVOXor05pfD9GT5ocRINndpGF7jokiqhg==} + /@azure-tools/typespec-azure-resource-manager@0.37.1(@azure-tools/typespec-autorest@0.37.2)(@azure-tools/typespec-azure-core@0.37.2)(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.51.0)(@typespec/versioning@0.51.0): + resolution: {integrity: sha512-1RyFLJeS4lWVne/djKmPHix4UYJIO7o59n0SDlGrK8jx8k6nK4mu9LgSiwyufvBXBwVJ++dO10qRbBngJJquUg==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.50.0 - '@typespec/http': ~0.50.0 - '@typespec/rest': ~0.50.0 - dependencies: - '@typespec/compiler': 0.50.0 - '@typespec/http': 0.50.0(@typespec/compiler@0.50.0) - '@typespec/rest': 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) + '@azure-tools/typespec-autorest': ~0.37.2 + '@azure-tools/typespec-azure-core': ~0.37.2 + '@typespec/compiler': ~0.51.0 + '@typespec/http': ~0.51.0 + '@typespec/openapi': ~0.51.0 + '@typespec/rest': ~0.51.0 + '@typespec/versioning': ~0.51.0 + dependencies: + '@azure-tools/typespec-autorest': 0.37.2(@azure-tools/typespec-azure-core@0.37.2)(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.51.0)(@typespec/versioning@0.51.0) + '@azure-tools/typespec-azure-core': 0.37.2(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/rest@0.51.0) + '@typespec/compiler': 0.51.0 + '@typespec/http': 0.51.0(@typespec/compiler@0.51.0) + '@typespec/openapi': 0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) + '@typespec/rest': 0.51.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) + '@typespec/versioning': 0.51.0(@typespec/compiler@0.51.0) dev: false /@azure-tools/uri@3.1.1: @@ -1459,6 +1489,10 @@ packages: '@types/ssri': 7.1.4 dev: false + /@types/pluralize@0.0.30: + resolution: {integrity: sha512-kVww6xZrW/db5BR9OqiT71J9huRdQ+z/r+LbDuT7/EK50mCmj5FoaIARnVv0rvjUS/YpDox0cDU9lpQT011VBA==} + dev: false + /@types/prettier@2.7.3: resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} dev: false @@ -1713,8 +1747,8 @@ packages: eslint-visitor-keys: 3.4.3 dev: false - /@typespec/compiler@0.50.0: - resolution: {integrity: sha512-CLNPxyGahfdxPPvtHdexwFXCPzfjeN7qjCiRjJmUeJV2Qd+nf8Sps+mwyqflw1v7q1GTpgB9kURMsWV/+NgTdw==} + /@typespec/compiler@0.51.0: + resolution: {integrity: sha512-eGxQG27ovSkmuAyUpYhQzTfENmMV1w/Zm1binmAT/gUF56SE+XGCg8pLaBNlDgRbcGDJaziiop7uBMDbsuBDyg==} engines: {node: '>=18.0.0'} hasBin: true dependencies: @@ -1724,7 +1758,7 @@ packages: globby: 13.2.2 mustache: 4.2.0 picocolors: 1.0.0 - prettier: 3.0.3 + prettier: 3.1.0 prompts: 2.4.2 semver: 7.5.4 vscode-languageserver: 9.0.1 @@ -1733,16 +1767,16 @@ packages: yargs: 17.7.2 dev: false - /@typespec/http@0.50.0(@typespec/compiler@0.50.0): - resolution: {integrity: sha512-kTRg/TXo2Pn2qZZ/xvjBuA75w3zLk6MIcLMEqQhXDRVhpVCSqPStReZtKBV/YCJ1DvMVnu3mcA7+HqQ4PxrZhQ==} + /@typespec/http@0.51.0(@typespec/compiler@0.51.0): + resolution: {integrity: sha512-9YtcIPzUP0ELf/ZFBfhgLCPIyERn+DrYJTtEtaWkcO+qEkdFxO5eahwgh1FPuS6iJrW6pUPBuAfGDOAH1+N/PQ==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.50.0 + '@typespec/compiler': ~0.51.0 dependencies: - '@typespec/compiler': 0.50.0 + '@typespec/compiler': 0.51.0 dev: false - /@typespec/openapi3@0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/openapi@0.50.0)(@typespec/versioning@0.50.0): + /@typespec/openapi3@0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/versioning@0.51.0): resolution: {integrity: sha512-R3YOEpRZoABrTrglLClesknhsl1AqXRt0lzZLttATal6w4V0XTGFsc3gyD0muoUTy1e1vPfQixpUTY2CHFqIQA==} engines: {node: '>=18.0.0'} peerDependencies: @@ -1751,48 +1785,48 @@ packages: '@typespec/openapi': ~0.50.0 '@typespec/versioning': ~0.50.0 dependencies: - '@typespec/compiler': 0.50.0 - '@typespec/http': 0.50.0(@typespec/compiler@0.50.0) - '@typespec/openapi': 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) - '@typespec/versioning': 0.50.0(@typespec/compiler@0.50.0) + '@typespec/compiler': 0.51.0 + '@typespec/http': 0.51.0(@typespec/compiler@0.51.0) + '@typespec/openapi': 0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) + '@typespec/versioning': 0.51.0(@typespec/compiler@0.51.0) yaml: 2.3.4 dev: false - /@typespec/openapi@0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0): + /@typespec/openapi@0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0): resolution: {integrity: sha512-aOg3y4XxRl6bI/DR+OR1GFZD+1s9ygH0Z8jarHc3wSNnh4gLmAZ8RYmPFPzwULhvck/EYw+P9R0kcYpX8iC+Lw==} engines: {node: '>=18.0.0'} peerDependencies: '@typespec/compiler': ~0.50.0 '@typespec/http': ~0.50.0 dependencies: - '@typespec/compiler': 0.50.0 - '@typespec/http': 0.50.0(@typespec/compiler@0.50.0) + '@typespec/compiler': 0.51.0 + '@typespec/http': 0.51.0(@typespec/compiler@0.51.0) dev: false - /@typespec/prettier-plugin-typespec@0.50.0: - resolution: {integrity: sha512-fo5+UMkounO/p2zz5aSUbxw4krKKB8GAcVfrDK3UdE9SAxtl92d1kEGNOG9fKjmuAMwmzPHNGZZy/tZw+iyvew==} + /@typespec/prettier-plugin-typespec@0.51.0: + resolution: {integrity: sha512-byj0Xw+lg6LDa8duSC1iEhGCwOxb1yr4A7/KNL/JzFKPSRgUD4WePba8wxZEeMcRR2LeWlIIm8zxpWG97jkk8g==} dependencies: - prettier: 3.0.3 + prettier: 3.1.0 dev: false - /@typespec/rest@0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0): - resolution: {integrity: sha512-nkFfPh4z9z2a46f6HgjuZM7e2+k5bgPDshuwQjjo82mEuSqrMUaeaUs5nx63L2FmacvIvhAvRrd3f8kMpBD5vw==} + /@typespec/rest@0.51.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0): + resolution: {integrity: sha512-swigbWjdewmKg+DtHj/a2r8jyX810JYkcIcVHkqdnkCq6TqlyNP0VSSUM39BmXmkCHMUumlSm2cOMieESRfNlg==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.50.0 - '@typespec/http': ~0.50.0 + '@typespec/compiler': ~0.51.0 + '@typespec/http': ~0.51.0 dependencies: - '@typespec/compiler': 0.50.0 - '@typespec/http': 0.50.0(@typespec/compiler@0.50.0) + '@typespec/compiler': 0.51.0 + '@typespec/http': 0.51.0(@typespec/compiler@0.51.0) dev: false - /@typespec/versioning@0.50.0(@typespec/compiler@0.50.0): - resolution: {integrity: sha512-lEJUBMFqhLWTL2eqnOEwFSnopWs06YmS6Fo3SI3UtGHiTU2EneWHk+BnhSplbOmFEQ7XTVlj0QxZ4/TaE0GgPw==} + /@typespec/versioning@0.51.0(@typespec/compiler@0.51.0): + resolution: {integrity: sha512-eja0epBhtmJRO+Jq0Zdb2eRcSTsU+uq/X0xgD5SM+KB97nxFtaRkOJYd59QBN+XysvkcfVRrLOGJjzcpNMa0cw==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.50.0 + '@typespec/compiler': ~0.51.0 dependencies: - '@typespec/compiler': 0.50.0 + '@typespec/compiler': 0.51.0 dev: false /@ungap/structured-clone@1.2.0: @@ -6649,12 +6683,6 @@ packages: hasBin: true dev: false - /prettier@3.0.3: - resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==} - engines: {node: '>=14'} - hasBin: true - dev: false - /prettier@3.1.0: resolution: {integrity: sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==} engines: {node: '>=14'} @@ -8590,7 +8618,7 @@ packages: dev: false file:projects/autorest.tgz(ts-node@10.9.1): - resolution: {integrity: sha512-//2cS8XUIlZtOY1hMBA64LzgsIIzE8thwpL9ogDZS87akcJR0yaE0Eowjr/noJ1r5jbA5jqHKbCP/m934YXAcw==, tarball: file:projects/autorest.tgz} + resolution: {integrity: sha512-SvV+cy1y4sDq7SBRVLMMEHxwEenXbnqh2epuL4w/JPstJeAkkSZHZ+zEr7NPa/gKlMcpHLvJAKZclQ7Wxr/Gqw==, tarball: file:projects/autorest.tgz} id: file:projects/autorest.tgz name: '@rush-temp/autorest' version: 0.0.0 @@ -8648,7 +8676,7 @@ packages: dev: false file:projects/cadl.tgz(ts-node@10.9.1)(webpack-cli@5.1.4)(webpack@5.89.0): - resolution: {integrity: sha512-zClz6G8DJm20ED8N5BqUOlY6BmWQgwH4/kCBVa0qqCyO1ygoyT5FIzWtexfstYdf9aeJ/d2Y8LfD97aDcwlJeg==, tarball: file:projects/cadl.tgz} + resolution: {integrity: sha512-av7i43qPFgwFiE7GHT5KJPa4d0FHlFTbx/y04efEF/83afKlgZ5HVMrFi7N/+lYpm1lHBMPZ0aPn4gK6m23EsQ==, tarball: file:projects/cadl.tgz} id: file:projects/cadl.tgz name: '@rush-temp/cadl' version: 0.0.0 @@ -8734,7 +8762,7 @@ packages: dev: false file:projects/codemodel.tgz(jest@29.7.0)(prettier@3.1.0): - resolution: {integrity: sha512-ASY+xTdclFU1Ky9fMU391OOmLODsCCuPT5k5lEb1GzuyIOjFhPVEXgkOFxbWmoAmB9Ux0dQ6liAbaGFKVqgUBw==, tarball: file:projects/codemodel.tgz} + resolution: {integrity: sha512-XU/8wU9Jo2eyvIFEVi22uh9YHNGK2X69RZ3fhSsdx9e6Ccp2ajm3QX++m7rV8b1FthMVeIn3FHFGIC7miuT2/Q==, tarball: file:projects/codemodel.tgz} id: file:projects/codemodel.tgz name: '@rush-temp/codemodel' version: 0.0.0 @@ -8766,7 +8794,7 @@ packages: dev: false file:projects/common.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-hw8wXu5hGrWCxkbkvbzqFFl138zAYFjv+JaYp8LSGRDoJAkNQ0FLPdWMqzgPPL+ycMTXbVSl4Yrta5as23qyQg==, tarball: file:projects/common.tgz} + resolution: {integrity: sha512-dr0VbBpkYbGLe+5tnqwXZcU37okgm1NFocwBAyMKuwD8M7QRNEBSw+CWz04fKcO6bFUc4QZHbNQyM9RiDZs8pg==, tarball: file:projects/common.tgz} id: file:projects/common.tgz name: '@rush-temp/common' version: 0.0.0 @@ -8799,7 +8827,7 @@ packages: dev: false file:projects/compare.tgz(prettier@3.1.0): - resolution: {integrity: sha512-q4Lcg1gZwHEmhw7LpQn6ZYkLTNuhpC2jjXokGMdorhsufIhYea9fKOBUZblIBVuUm7K2oLkiuOvL3LtVEesIQQ==, tarball: file:projects/compare.tgz} + resolution: {integrity: sha512-TdSUwopQGGjakA2XILTfCpdkmPjMt0tg/U2uHdTsRPS3cBco9dE42Lzg2fQWuqo8kpP54tIAQ38w2mIg9IYiLw==, tarball: file:projects/compare.tgz} id: file:projects/compare.tgz name: '@rush-temp/compare' version: 0.0.0 @@ -8845,7 +8873,7 @@ packages: dev: false file:projects/configuration.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-pKbCnEi4Bt0ZQW7T1EOFeQ21RXoEUPLrPO43SyZchXAZ7CtOr78/Y6N6w6dCAH8tG7nEbiP1tNz5j9kX3bNuQw==, tarball: file:projects/configuration.tgz} + resolution: {integrity: sha512-QIvRtuY4X8HzqQc5WSZSnxTEMte4WOqY5CcI2VgvRWeuj9X/BpUwCvUJG7qQc7FhQ/KUlTLC4Qqfsy3DzD+/gA==, tarball: file:projects/configuration.tgz} id: file:projects/configuration.tgz name: '@rush-temp/configuration' version: 0.0.0 @@ -8886,7 +8914,7 @@ packages: dev: false file:projects/core.tgz(ts-node@10.9.1): - resolution: {integrity: sha512-66XZhmDflvAHVHJSkOiPqQxSjjPAAtn8Ko05fRe80dON8v4o9oI1jKKzV/gt4ActSWshXhsAwE26HKJ6kb1FGw==, tarball: file:projects/core.tgz} + resolution: {integrity: sha512-aMmjUxmr7vDPP8vbV0AuWwuyWlv3LFEFe9bDTsoSfQXouygxRsG18vzVWtEXqxLcA2DLLQof9fmHoFR4/IWBrQ==, tarball: file:projects/core.tgz} id: file:projects/core.tgz name: '@rush-temp/core' version: 0.0.0 @@ -8951,7 +8979,7 @@ packages: dev: false file:projects/datastore.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-M5aav5B4PoxJ442If4uWdaQEdn20hJFsnLRr/EBWshm9LPOVi1jHDrviGeaBxDXQ37q6eWdmuXiZoNVj8RKKFA==, tarball: file:projects/datastore.tgz} + resolution: {integrity: sha512-6/wu2bBUSvArdPUcvguk4iP5weUXdYt6po8oTByiu4MOKai2WH6T2elniSQVeNa8i0nspiwRrrKZfBA1LRYNfw==, tarball: file:projects/datastore.tgz} id: file:projects/datastore.tgz name: '@rush-temp/datastore' version: 0.0.0 @@ -8992,7 +9020,7 @@ packages: dev: false file:projects/deduplication.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-C7sZLOMnJOrOXyKrgIqKZfV4q1WgAjIRpQzKDKk9EMLgVfW4Cyg3RKRqLxa/kzNCn5e4RJS/n/CRFXRCTM1ztA==, tarball: file:projects/deduplication.tgz} + resolution: {integrity: sha512-OeYQ73RhcmGwZbW6Ctnuh+q4vIjgRR2880FOuFYSGSAia3/ROZGlAzQqZrHn2/vsOcYXRWZHXy/84HCRcSsIww==, tarball: file:projects/deduplication.tgz} id: file:projects/deduplication.tgz name: '@rush-temp/deduplication' version: 0.0.0 @@ -9026,7 +9054,7 @@ packages: dev: false file:projects/extension-base.tgz(jest@29.7.0)(prettier@3.1.0): - resolution: {integrity: sha512-bFSZk4ikbJca2qQXA0t8K3+2MuTt00rYHQmNgw5bmCzkUsBF4kuYwL/JH4HWRf5osCpD3+DBQVPuchpUOftaPg==, tarball: file:projects/extension-base.tgz} + resolution: {integrity: sha512-tooRuR6QsOAqpII/MvkKbICjhyRxKFNPhT1y05CG5wlgrqTrwok6sYt0M6bGb73apeC0n7MZbPpWvSR7kQKdrQ==, tarball: file:projects/extension-base.tgz} id: file:projects/extension-base.tgz name: '@rush-temp/extension-base' version: 0.0.0 @@ -9054,7 +9082,7 @@ packages: dev: false file:projects/extension.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-w6Ml9a8PDSFkSOOC70NxDbURfUoJ4A+1dE1Fd1bFfrkd+pT+Udy+SuU6oAN9/l5lUBOHfvCyuNqxZ+jXpPfb8g==, tarball: file:projects/extension.tgz} + resolution: {integrity: sha512-YXVy7zorVQE5y0/DwaZobVpgJKsMg8FN2/17G/IXxFH8qzEmEoC6gJPE26mf10HTI0noSGV3NCWCSyzsReEb7w==, tarball: file:projects/extension.tgz} id: file:projects/extension.tgz name: '@rush-temp/extension' version: 0.0.0 @@ -9201,7 +9229,7 @@ packages: dev: false file:projects/modelerfour.tgz(ts-node@10.9.1): - resolution: {integrity: sha512-avJIx/dvoY5laH4G7kKOL/tWLKOhdoYJaOKa8IrCDlzIeqB6c5MiVphrd4X8bqkEhsFyKfEP76bjfPn8dAB/kg==, tarball: file:projects/modelerfour.tgz} + resolution: {integrity: sha512-6jJDUoekbhc7cEhjyadfzwunHkiOCehYPZh/QEEuOzzTJSixWUIle6ejSyptngSe8uxSsVpDJ/4QSTj6UvFoPw==, tarball: file:projects/modelerfour.tgz} id: file:projects/modelerfour.tgz name: '@rush-temp/modelerfour' version: 0.0.0 @@ -9252,7 +9280,7 @@ packages: dev: false file:projects/oai2-to-oai3.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-FXX8wdQFeEYc6Df0TNfmRiliQxQb7/yEHQ56wf04FBd6uAO2r4pwjkdm5QwzQYqJorTsW02es71rQnIqQwOyuQ==, tarball: file:projects/oai2-to-oai3.tgz} + resolution: {integrity: sha512-EmqXeZJWuoXi6p1c9Flme9Km7H1ISlOOEX1rMEhn/G14Fxe2BJujI8iheV/3eN7CyqwhdBr3Zko2CY77132LDQ==, tarball: file:projects/oai2-to-oai3.tgz} id: file:projects/oai2-to-oai3.tgz name: '@rush-temp/oai2-to-oai3' version: 0.0.0 @@ -9288,27 +9316,30 @@ packages: - ts-node dev: false - file:projects/openapi-to-cadl.tgz(jest@29.7.0): - resolution: {integrity: sha512-mQ276KY/jbYZ/ZkjE0APBuRjs+3XBu1zatcaAKBFhQkt1n6dM5AEuFDht6kkob1vn28RIT5jW/BSEmvL9q1HTQ==, tarball: file:projects/openapi-to-cadl.tgz} - id: file:projects/openapi-to-cadl.tgz - name: '@rush-temp/openapi-to-cadl' + file:projects/openapi-to-typespec.tgz(jest@29.7.0): + resolution: {integrity: sha512-RqW7Hnn2Gm4Ytv2iUSt/wcaMZNUG15OZhayym0nAWp4BqpvjnV6UzruHlBu9pth0oZVC0uPK0dqIYZ/rDcLJ6g==, tarball: file:projects/openapi-to-typespec.tgz} + id: file:projects/openapi-to-typespec.tgz + name: '@rush-temp/openapi-to-typespec' version: 0.0.0 dependencies: - '@azure-tools/typespec-autorest': 0.36.1(@azure-tools/typespec-azure-core@0.36.0)(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.50.0)(@typespec/versioning@0.50.0) - '@azure-tools/typespec-azure-core': 0.36.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/rest@0.50.0) + '@azure-tools/typespec-autorest': 0.37.2(@azure-tools/typespec-azure-core@0.37.2)(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.51.0)(@typespec/versioning@0.51.0) + '@azure-tools/typespec-azure-core': 0.37.2(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/rest@0.51.0) + '@azure-tools/typespec-azure-resource-manager': 0.37.1(@azure-tools/typespec-autorest@0.37.2)(@azure-tools/typespec-azure-core@0.37.2)(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.51.0)(@typespec/versioning@0.51.0) '@types/fs-extra': 9.0.13 + '@types/lodash': 4.14.201 '@types/node': 20.9.0 + '@types/pluralize': 0.0.30 '@types/prettier': 2.7.3 '@types/webpack': 5.28.5(webpack-cli@5.1.4) '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) - '@typespec/compiler': 0.50.0 - '@typespec/http': 0.50.0(@typespec/compiler@0.50.0) - '@typespec/openapi': 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) - '@typespec/openapi3': 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0)(@typespec/openapi@0.50.0)(@typespec/versioning@0.50.0) - '@typespec/prettier-plugin-typespec': 0.50.0 - '@typespec/rest': 0.50.0(@typespec/compiler@0.50.0)(@typespec/http@0.50.0) - '@typespec/versioning': 0.50.0(@typespec/compiler@0.50.0) + '@typespec/compiler': 0.51.0 + '@typespec/http': 0.51.0(@typespec/compiler@0.51.0) + '@typespec/openapi': 0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) + '@typespec/openapi3': 0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/versioning@0.51.0) + '@typespec/prettier-plugin-typespec': 0.51.0 + '@typespec/rest': 0.51.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) + '@typespec/versioning': 0.51.0(@typespec/compiler@0.51.0) chalk: 4.1.2 eslint: 8.53.0 eslint-plugin-import: 2.29.0(eslint@8.53.0) @@ -9317,6 +9348,8 @@ packages: eslint-plugin-prettier: 5.0.1(eslint@8.53.0)(prettier@3.1.0) eslint-plugin-unicorn: 49.0.0(eslint@8.53.0) fs-extra: 10.1.0 + lodash: 4.17.21 + pluralize: 8.0.0 prettier: 3.1.0 rimraf: 5.0.5 ts-loader: 9.5.1(typescript@5.2.2)(webpack@5.89.0) @@ -9339,7 +9372,7 @@ packages: dev: false file:projects/openapi.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-CJjM9GbxipbeBj7PK4i+9gUWQiOe+JMPScwuefNXAmraXg2vaj5WdsmZ11wpD5Gle2v+Wc6n7/QYclYH8HZ6mA==, tarball: file:projects/openapi.tgz} + resolution: {integrity: sha512-jeOfewor/wxa+HdeUSgWjhsV4FbhMs9QX8uxqJxh7KZvTBxcvw1XhQkrriRoSEXnBXmHDuAvxKG6gEImlL6c7w==, tarball: file:projects/openapi.tgz} id: file:projects/openapi.tgz name: '@rush-temp/openapi' version: 0.0.0 @@ -9409,7 +9442,7 @@ packages: dev: false file:projects/test-public-packages.tgz(prettier@3.1.0): - resolution: {integrity: sha512-cdNxs7HlLJjzoMTYPFkbt9bbZ+mYbfyy8QjXeTgdeYgOO+N2HR8Ivc218UbpTb8CzlVSB5qjPiGy+b+z1J+jaQ==, tarball: file:projects/test-public-packages.tgz} + resolution: {integrity: sha512-Rn+gH1k+oRn0DDXoRdjqMkiECwfd/KS8aExh8AEAcn3NUKXZlnHbMX//5WYnKgvyH2nRIr02Q0dCui6cxIviNQ==, tarball: file:projects/test-public-packages.tgz} id: file:projects/test-public-packages.tgz name: '@rush-temp/test-public-packages' version: 0.0.0 @@ -9430,7 +9463,7 @@ packages: dev: false file:projects/test-utils.tgz(@types/node@20.9.0)(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-HiX3TvOnyb+o3lUEYJX/L7oe0aiqpw8LF8snHphbqXp4NQdbsXj9dnq7LqhKnQByUdLSN19l2OTALFrNRg+aPQ==, tarball: file:projects/test-utils.tgz} + resolution: {integrity: sha512-PjGDVMkoTdQpgj3j0MSrYPkMoilJ3rXaramucEQu/DXD2iUlUqLbATiDxEeOeeJcbyChAWoj8U/ZPV0UG3JdZg==, tarball: file:projects/test-utils.tgz} id: file:projects/test-utils.tgz name: '@rush-temp/test-utils' version: 0.0.0 diff --git a/eng/pipelines/publish-dev.yaml b/eng/pipelines/publish-dev.yaml new file mode 100644 index 0000000000..3e0a8dec54 --- /dev/null +++ b/eng/pipelines/publish-dev.yaml @@ -0,0 +1,29 @@ +# Node.js +# Build a general Node.js project with npm. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +trigger: none + +pool: + vmImage: "ubuntu-latest" + +stages: + - stage: npm + jobs: + - job: dev + displayName: Publish dev + steps: + - template: ./templates/build.yaml + + - script: | + commitId=$(git rev-parse --short HEAD) + npx @microsoft/rush publish --apply --prerelease-name="ci.$commitId" + displayName: Bump versions + + - script: npx @microsoft/rush publish --publish --pack --include-all + displayName: Pack packages + + - script: | + npx @microsoft/rush publish --publish --registry https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-tools-feeds/npm/registry --npm-auth-token "$(azure-sdk-devops-npm-token)" --include-all --set-access-level public + displayName: Publish packages diff --git a/eng/scripts/helpers.js b/eng/scripts/helpers.js index c1b9bac76a..70111ecd2f 100644 --- a/eng/scripts/helpers.js +++ b/eng/scripts/helpers.js @@ -53,7 +53,7 @@ function runPrettier(...args) { ".prettierrc.yml", "--ignore-path", ".prettierignore", - "**/*.{ts,js,cjs,mjs,json,yml,yaml,cadl,md}", + "**/*.{ts,js,cjs,mjs,json,yml,yaml,cadl,tsp,md}", ], { cwd: repoRoot, diff --git a/packages/extensions/openapi-to-cadl/README.md b/packages/extensions/openapi-to-cadl/README.md deleted file mode 100644 index 98f10d0f21..0000000000 --- a/packages/extensions/openapi-to-cadl/README.md +++ /dev/null @@ -1,47 +0,0 @@ -## Autorest openapi-to-cadl Plugin Configuration - -Autorest extension to scaffold a new TypeSpec definition from an existing OpenApi document. - -To run it - -```bash -autorest --openapi-to-cadl --input-file= --namespace= --title="" --use=@autorest/openapi-to-cadl@next --output-folder=. -``` - -or with a README config file - -```bash -autorest --openapi-to-cadl --require=.md --use=@autorest/openapi-to-cadl@next --output-folder=. -``` - -This plugin will generate the following files - -main.tsp - Entry point of the TypeSpec project, it contains service information -models.tsp - Contains all the model definitions -routes.tsp - Contains all the resource endpoints -tsproject.yaml - Contains configuration for the TypeSpec compiler -package.json - Configuration of the TypeSpec project - -```yaml -version: 3.6.6 -use-extension: - "@autorest/modelerfour": "^4.23.5" - -modelerfour: - # this runs a pre-namer step to clean up names - prenamer: false - -openapi-to-cadl-scope/emitter: - input-artifact: openapi-to-cadl-files - -output-artifact: openapi-to-cadl-files - -pipeline: - openapi-to-cadl: # <- name of plugin - input: modelerfour/identity - output-artifact: openapi-to-cadl-files - - openapi-to-cadl/emitter: - input: openapi-to-cadl - scope: openapi-to-cadl-scope/emitter -``` diff --git a/packages/extensions/openapi-to-cadl/src/emiters/emit-cadl-config.ts b/packages/extensions/openapi-to-cadl/src/emiters/emit-cadl-config.ts deleted file mode 100644 index 954f4d0a3b..0000000000 --- a/packages/extensions/openapi-to-cadl/src/emiters/emit-cadl-config.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { getSession } from "../autorest-session"; -import { formatFile } from "../utils/format"; - -export async function emitCadlConfig(filePath: string): Promise { - const content = ` - emit: - - "@azure-tools/typespec-autorest": - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true -`; - - const session = getSession(); - session.writeFile({ filename: filePath, content: await formatFile(content, filePath) }); -} diff --git a/packages/extensions/openapi-to-cadl/src/emiters/emit-main.ts b/packages/extensions/openapi-to-cadl/src/emiters/emit-main.ts deleted file mode 100644 index fb7fe509c5..0000000000 --- a/packages/extensions/openapi-to-cadl/src/emiters/emit-main.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { getSession } from "../autorest-session"; -import { generateServiceInformation } from "../generate/generate-service-information"; -import { CadlProgram } from "../interfaces"; -import { formatCadlFile } from "../utils/format"; - -export async function emitMain(filePath: string, program: CadlProgram): Promise { - const content = getServiceInformation(program); - const session = getSession(); - session.writeFile({ filename: filePath, content: await formatCadlFile(content, filePath) }); -} - -function getServiceInformation(program: CadlProgram) { - const imports = [ - `import "@typespec/rest";`, - `import "@typespec/http";`, - `import "./routes.tsp";`, - ``, - `using TypeSpec.Rest;`, - `using TypeSpec.Http;`, - ]; - const content = generateServiceInformation(program); - - return [...imports, content].join("\n"); -} diff --git a/packages/extensions/openapi-to-cadl/src/generate/generate-object.ts b/packages/extensions/openapi-to-cadl/src/generate/generate-object.ts deleted file mode 100644 index ff2d7be57e..0000000000 --- a/packages/extensions/openapi-to-cadl/src/generate/generate-object.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { CadlObject, CadlObjectProperty } from "../interfaces"; -import { generateDecorators } from "../utils/decorators"; -import { generateDocs } from "../utils/docs"; - -export function generateObject(cadlObject: CadlObject) { - const definitions: string[] = []; - - const fixme = getFixme(cadlObject); - fixme && definitions.push(fixme); - - const doc = generateDocs(cadlObject); - definitions.push(doc); - - const decorators = generateDecorators(cadlObject.decorators); - decorators && definitions.push(decorators); - - if (cadlObject.extendedParents?.length) { - const firstParent = cadlObject.extendedParents[0]; - definitions.push(`model ${cadlObject.name} extends ${firstParent} {`); - } else if (cadlObject.alias) { - const { alias, params } = cadlObject.alias; - - definitions.push(`model ${cadlObject.name} is ${alias}${params ? `<${params.join(",")}>` : ""} {`); - } else { - definitions.push(`model ${cadlObject.name} {`); - } - - for (const parent of cadlObject.spreadParents ?? []) { - definitions.push(`...${parent};`); - } - - for (const property of cadlObject.properties) { - const propertyDoc = generateDocs(property); - propertyDoc && definitions.push(propertyDoc); - const decorators = generateDecorators(property.decorators); - decorators && definitions.push(decorators); - property.fixMe && property.fixMe.length && definitions.push(property.fixMe.join("\n")); - definitions.push(`"${property.name}"${getOptionalOperator(property)}: ${property.type};`); - } - definitions.push("}"); - - return definitions.join("\n"); -} - -function getFixme(cadlObject: CadlObject): string | undefined { - if (!cadlObject.fixMe) { - return undefined; - } - - return cadlObject.fixMe.join("\n"); -} - -function getOptionalOperator(property: CadlObjectProperty) { - return property.isOptional ? "?" : ""; -} diff --git a/packages/extensions/openapi-to-cadl/src/interfaces.ts b/packages/extensions/openapi-to-cadl/src/interfaces.ts deleted file mode 100644 index 7005e91bae..0000000000 --- a/packages/extensions/openapi-to-cadl/src/interfaces.ts +++ /dev/null @@ -1,137 +0,0 @@ -export interface CadlProgram { - models: Models; - operationGroups: CadlOperationGroup[]; - serviceInformation: ServiceInformation; -} - -export interface CadlOptions { - isAzureSpec: boolean; - namespace?: string; - guessResourceKey: boolean; -} - -export interface CadlChoiceValue extends WithDoc { - name: string; - value: string | number | boolean; -} - -export interface WithDoc { - doc?: string | string[]; -} - -export interface WithSummary { - summary?: string; -} - -export interface CadlOperationGroup extends WithDoc { - name: string; - operations: CadlOperation[]; -} - -export type Extension = "Pageable" | "LRO"; -export interface CadlOperation extends WithDoc, WithSummary, WithFixMe { - name: string; - verb: "get" | "post" | "put" | "delete"; - route: string; - responses: string[]; - parameters: CadlParameter[]; - extensions: Extension[]; - resource?: CadlResource; -} - -export type ResourceKind = - | "ResourceCreateOrUpdate" - | "ResourceCreateOrReplace" - | "ResourceCreateWithServiceProvidedName" - | "ResourceRead" - | "ResourceDelete" - | "ResourceList" - | "NonPagedResourceList" - | "ResourceAction" - | "ResourceCollectionAction" - | "LongRunningResourceCreateOrReplace" - | "LongRunningResourceCreateOrUpdate" - | "LongRunningResourceCreateWithServiceProvidedName" - | "LongRunningResourceDelete"; - -export interface CadlResource { - kind: ResourceKind; - response: CadlDataType; -} - -export interface ServiceInformation extends WithDoc { - name: string; - version?: string; - endpoint?: string; - endpointParameters?: EndpointParameter[]; - produces?: string[]; - consumes?: string[]; -} - -export interface EndpointParameter extends WithDoc { - name: string; -} - -export interface CadlDataType extends WithDoc, WithFixMe { - kind: string; - name: string; -} - -export interface CadlWildcardType extends CadlDataType { - kind: "wildcard"; -} - -export interface CadlEnum extends CadlDataType { - kind: "enum"; - members: CadlChoiceValue[]; - isExtensible: boolean; - decorators?: CadlDecorator[]; -} - -export interface WithFixMe { - fixMe?: string[]; -} - -export type CadlParameterLocation = "path" | "query" | "header" | "body"; -export interface CadlParameter extends CadlDataType { - kind: "parameter"; - isOptional: boolean; - type: string; - location: CadlParameterLocation; -} - -export interface CadlObjectProperty extends CadlDataType { - kind: "property"; - isOptional: boolean; - type: string; - decorators?: CadlDecorator[]; - visibility?: "read"; -} - -export interface CadlDecorator extends WithFixMe { - name: string; - arguments?: string[]; - module?: string; - namespace?: string; -} - -export interface CadlAlias { - alias: string; - params?: string[]; - module?: string; -} - -export interface CadlObject extends CadlDataType { - kind: "object"; - properties: CadlObjectProperty[]; - parents: string[]; - extendedParents?: string[]; - spreadParents?: string[]; - decorators?: CadlDecorator[]; - alias?: CadlAlias; -} - -export interface Models { - enums: CadlEnum[]; - objects: CadlObject[]; -} diff --git a/packages/extensions/openapi-to-cadl/src/main.ts b/packages/extensions/openapi-to-cadl/src/main.ts deleted file mode 100644 index 1ea61822e2..0000000000 --- a/packages/extensions/openapi-to-cadl/src/main.ts +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { join } from "path"; -import { CodeModel, codeModelSchema } from "@autorest/codemodel"; -import { AutoRestExtension, AutorestExtensionHost, Session, startSession } from "@autorest/extension-base"; -import { setSession } from "./autorest-session"; -import { emitCadlConfig } from "./emiters/emit-cadl-config"; -import { emitMain } from "./emiters/emit-main"; - -import { emitModels } from "./emiters/emit-models"; -import { emitPackage } from "./emiters/emit-package"; -import { emitRoutes } from "./emiters/emit-routes"; -import { getModel } from "./model"; -import { pretransformNames } from "./pretransforms/name-pretransform"; -import { markErrorModels } from "./utils/errors"; -import { markPagination } from "./utils/paging"; -import { markResources } from "./utils/resources"; - -export async function processRequest(host: AutorestExtensionHost) { - const session = await startSession(host, codeModelSchema); - setSession(session); - const codeModel = session.model; - pretransformNames(codeModel); - markPagination(codeModel); - markErrorModels(codeModel); - markResources(codeModel); - const cadlProgramDetails = getModel(codeModel); - await emitModels(getFilePath(session, "models.tsp"), cadlProgramDetails); - await emitRoutes(getFilePath(session, "routes.tsp"), cadlProgramDetails); - await emitMain(getFilePath(session, "main.tsp"), cadlProgramDetails); - await emitPackage(getFilePath(session, "package.json"), cadlProgramDetails); - await emitCadlConfig(getFilePath(session, "tspconfig.yaml")); -} - -function getOutuptDirectory(session: Session) { - return session.configuration["src-path"] ?? ""; -} - -function getFilePath(session: Session, fileName: string) { - return join(getOutuptDirectory(session), fileName); -} - -async function main() { - const pluginHost = new AutoRestExtension(); - pluginHost.add("openapi-to-cadl", processRequest); - await pluginHost.run(); -} - -main().catch((e) => { - throw new Error(e); -}); diff --git a/packages/extensions/openapi-to-cadl/src/model.ts b/packages/extensions/openapi-to-cadl/src/model.ts deleted file mode 100644 index 796cea9285..0000000000 --- a/packages/extensions/openapi-to-cadl/src/model.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { CodeModel, isObjectSchema, Schema } from "@autorest/codemodel"; -import { getDataTypes } from "./data-types"; -import { CadlDataType, CadlProgram } from "./interfaces"; -import { transformEnum } from "./transforms/transform-choices"; -import { getCadlType, transformObject } from "./transforms/transform-object"; -import { transformOperationGroup } from "./transforms/transform-operations"; -import { transformServiceInformation } from "./transforms/transform-service-information"; -import { isChoiceSchema } from "./utils/schemas"; - -const models: Map = new Map(); - -export function getModel(codeModel: CodeModel): CadlProgram { - let model = models.get(codeModel); - - if (!model) { - getDataTypes(codeModel); - model = transformModel(codeModel); - models.set(codeModel, model); - } - - return model; -} - -export function transformDataType(schema: Schema, codeModel: CodeModel): CadlDataType { - if (isObjectSchema(schema)) { - return transformObject(schema, codeModel); - } - - if (isChoiceSchema(schema)) { - return transformEnum(schema, codeModel); - } - - return { - name: getCadlType(schema, codeModel), - kind: "wildcard", - doc: schema.language.default.documentation, - }; -} - -function transformModel(codeModel: CodeModel): CadlProgram { - const caldEnums = [...(codeModel.schemas.choices ?? []), ...(codeModel.schemas.sealedChoices ?? [])].map((c) => - transformEnum(c, codeModel), - ); - - const cadlObjects = codeModel.schemas.objects?.map((o) => transformObject(o, codeModel)) ?? []; - - const serviceInformation = transformServiceInformation(codeModel); - - const cadlOperationGroups = codeModel.operationGroups.map((g) => transformOperationGroup(g, codeModel)); - - return { - serviceInformation, - models: { - enums: caldEnums, - objects: cadlObjects, - }, - operationGroups: cadlOperationGroups, - }; -} diff --git a/packages/extensions/openapi-to-cadl/src/utils/alias.ts b/packages/extensions/openapi-to-cadl/src/utils/alias.ts deleted file mode 100644 index be49a49177..0000000000 --- a/packages/extensions/openapi-to-cadl/src/utils/alias.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { CadlAlias, CadlObject } from "../interfaces"; - -export function addCorePageAlias(cadlObject: CadlObject): CadlAlias | undefined { - if (!cadlObject.decorators?.some((d) => d.name === "pagedResult")) { - return; - } - const value = cadlObject.properties.filter((p) => p.name === "value"); - if (!cadlObject.properties.some((p) => p.name === "nextLink") || !value.length) { - return; - } - - cadlObject.decorators = cadlObject.decorators.filter((d) => d.name !== "pagedResult"); - cadlObject.properties = cadlObject.properties.filter((p) => p.name !== "nextLink" && p.name !== "value"); - - cadlObject.alias = { - alias: "Azure.Core.Page", - params: [value[0].type.replace("[]", "")], - module: "@azure-tools/typespec-azure-core", - }; - - return; -} diff --git a/packages/extensions/openapi-to-cadl/src/utils/decorators.ts b/packages/extensions/openapi-to-cadl/src/utils/decorators.ts deleted file mode 100644 index 3790e1b31c..0000000000 --- a/packages/extensions/openapi-to-cadl/src/utils/decorators.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { ChoiceSchema, ObjectSchema, Property, SealedChoiceSchema } from "@autorest/codemodel"; -import { CadlDecorator } from "../interfaces"; -import { getOwnDiscriminator } from "./discriminator"; -import { isSealedChoiceSchema } from "./schemas"; - -export function getModelDecorators(model: ObjectSchema): CadlDecorator[] { - const decorators: CadlDecorator[] = []; - - const paging = model.language.default.paging ?? {}; - if (paging.isPageable) { - decorators.push({ - name: "pagedResult", - module: "@azure-tools/typespec-azure-core", - namespace: "Azure.Core", - }); - } - - const ownDiscriminator = getOwnDiscriminator(model); - - if (ownDiscriminator) { - decorators.push({ - name: "discriminator", - arguments: [ownDiscriminator.serializedName], - }); - } - - if (model.language.default.isError) { - decorators.push({ name: "error" }); - } - - let resource = model.language.default.resource; - if (resource) { - if (resource.startsWith("/")) { - // Remove the leading - resource = resource.slice(1); - } - decorators.push({ - name: "resource", - module: "@azure-tools/typespec-azure-core", - namespace: "Azure.Core", - arguments: [resource], - }); - } - - return decorators; -} - -export function getPropertyDecorators(property: Property): CadlDecorator[] { - const decorators: CadlDecorator[] = []; - - const paging = property.language.default.paging ?? {}; - - if (property.readOnly) { - decorators.push({ name: "visibility", arguments: ["read"] }); - } - - if (paging.isNextLink) { - decorators.push({ name: "nextLink" }); - } - - if (paging.isValue) { - decorators.push({ name: "items" }); - } - - if (property.language.default.isResourceKey) { - decorators.push({ - name: "key", - fixMe: [ - "// FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one", - ], - }); - } - - if (property.serializedName !== property.language.default.name) { - decorators.push({ - name: "projectedName", - arguments: ["json", property.serializedName], - }); - } - - return decorators; -} - -export function getEnumDecorators(enumeration: SealedChoiceSchema | ChoiceSchema): CadlDecorator[] { - const decorators: CadlDecorator[] = []; - - if (isSealedChoiceSchema(enumeration)) { - decorators.push({ - name: "Azure.Core.fixed", - module: "@azure-tools/typespec-azure-core", - }); - } - - return decorators; -} -export function generateDecorators(decorators: CadlDecorator[] = []): string { - const definitions: string[] = []; - for (const decorator of decorators ?? []) { - if (decorator.fixMe) { - definitions.push(decorator.fixMe.join(`\n`)); - } - if (decorator.arguments) { - definitions.push(`@${decorator.name}(${decorator.arguments?.map((a) => `"${a}"`).join(", ")})`); - } else { - definitions.push(`@${decorator.name}`); - } - } - - return definitions.join("\n"); -} diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/cl.md b/packages/extensions/openapi-to-cadl/test/arm-compute/cl.md deleted file mode 100644 index 5ae7141bb4..0000000000 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/cl.md +++ /dev/null @@ -1,10 +0,0 @@ -```yaml -require: - - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/ddca448bd879175a928b990e0f25ca3a0e6c1c33/specification/compute/resource-manager/readme.md -title: Microsoft Azure Compute Management -clear-output-folder: false -guessResourceKey: false -isAzureSpec: true -namespace: "Compute" -tag: package-2022-08-01-only -``` diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/main.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/main.tsp deleted file mode 100644 index 610866f29c..0000000000 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/main.tsp +++ /dev/null @@ -1,19 +0,0 @@ -import "@typespec/rest"; -import "@typespec/http"; -import "./routes.tsp"; - -using TypeSpec.Rest; -using TypeSpec.Http; -@service({ - title: "Microsoft Azure Compute Management", - version: "2022-08-01", -}) -@server( - "{$host}", - "Compute Client", - { - $host: string, - } -) -@doc("Compute Client") -namespace Compute; diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/models.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/models.tsp deleted file mode 100644 index 1fea0698e1..0000000000 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/models.tsp +++ /dev/null @@ -1,6537 +0,0 @@ -import "@typespec/rest"; -import "@typespec/http"; -import "@azure-tools/typespec-azure-core"; - -using TypeSpec.Rest; -using TypeSpec.Http; -using Azure.Core; - -namespace Compute; - -enum RepairAction { - Replace, - Restart, - Reimage, -} - -enum WindowsVMGuestPatchMode { - Manual, - AutomaticByOS, - AutomaticByPlatform, -} - -enum WindowsPatchAssessmentMode { - ImageDefault, - AutomaticByPlatform, -} - -enum WindowsVMGuestPatchAutomaticByPlatformRebootSetting { - Unknown, - IfRequired, - Never, - Always, -} - -enum LinuxVMGuestPatchMode { - ImageDefault, - AutomaticByPlatform, -} - -enum LinuxPatchAssessmentMode { - ImageDefault, - AutomaticByPlatform, -} - -enum LinuxVMGuestPatchAutomaticByPlatformRebootSetting { - Unknown, - IfRequired, - Never, - Always, -} - -enum DiskCreateOptionTypes { - FromImage, - Empty, - Attach, -} - -enum DiffDiskOptions { - Local, -} - -enum DiffDiskPlacement { - CacheDisk, - ResourceDisk, -} - -enum StorageAccountTypes { - Standard_LRS, - Premium_LRS, - StandardSSD_LRS, - UltraSSD_LRS, - Premium_ZRS, - StandardSSD_ZRS, - PremiumV2_LRS, -} - -enum SecurityEncryptionTypes { - VMGuestStateOnly, - DiskWithVMGuestState, -} - -enum DiskDeleteOptionTypes { - Delete, - Detach, -} - -enum IPVersion { - IPv4, - IPv6, -} - -enum DeleteOptions { - Delete, - Detach, -} - -enum PublicIPAddressSkuName { - Basic, - Standard, -} - -enum PublicIPAddressSkuTier { - Regional, - Global, -} - -enum NetworkApiVersion { - `2020-11-01`, -} - -enum SecurityTypes { - TrustedLaunch, - ConfidentialVM, -} - -enum VirtualMachinePriorityTypes { - Regular, - Low, - Spot, -} - -enum VirtualMachineEvictionPolicyTypes { - Deallocate, - Delete, -} - -enum VirtualMachineScaleSetScaleInRules { - Default, - OldestVM, - NewestVM, -} - -enum OrchestrationMode { - Uniform, - Flexible, -} - -enum ExtendedLocationTypes { - EdgeZone, -} - -enum ExpandTypesForGetVMScaleSets { - userData, -} - -enum OrchestrationServiceNames { - AutomaticRepairs, -} - -enum OrchestrationServiceState { - NotRunning, - Running, - Suspended, -} - -enum OrchestrationServiceStateAction { - Resume, - Suspend, -} - -enum VirtualMachineSizeTypes { - Basic_A0, - Basic_A1, - Basic_A2, - Basic_A3, - Basic_A4, - Standard_A0, - Standard_A1, - Standard_A2, - Standard_A3, - Standard_A4, - Standard_A5, - Standard_A6, - Standard_A7, - Standard_A8, - Standard_A9, - Standard_A10, - Standard_A11, - Standard_A1_v2, - Standard_A2_v2, - Standard_A4_v2, - Standard_A8_v2, - Standard_A2m_v2, - Standard_A4m_v2, - Standard_A8m_v2, - Standard_B1s, - Standard_B1ms, - Standard_B2s, - Standard_B2ms, - Standard_B4ms, - Standard_B8ms, - Standard_D1, - Standard_D2, - Standard_D3, - Standard_D4, - Standard_D11, - Standard_D12, - Standard_D13, - Standard_D14, - Standard_D1_v2, - Standard_D2_v2, - Standard_D3_v2, - Standard_D4_v2, - Standard_D5_v2, - Standard_D2_v3, - Standard_D4_v3, - Standard_D8_v3, - Standard_D16_v3, - Standard_D32_v3, - Standard_D64_v3, - Standard_D2s_v3, - Standard_D4s_v3, - Standard_D8s_v3, - Standard_D16s_v3, - Standard_D32s_v3, - Standard_D64s_v3, - Standard_D11_v2, - Standard_D12_v2, - Standard_D13_v2, - Standard_D14_v2, - Standard_D15_v2, - Standard_DS1, - Standard_DS2, - Standard_DS3, - Standard_DS4, - Standard_DS11, - Standard_DS12, - Standard_DS13, - Standard_DS14, - Standard_DS1_v2, - Standard_DS2_v2, - Standard_DS3_v2, - Standard_DS4_v2, - Standard_DS5_v2, - Standard_DS11_v2, - Standard_DS12_v2, - Standard_DS13_v2, - Standard_DS14_v2, - Standard_DS15_v2, - `Standard_DS13-4_v2`, - `Standard_DS13-2_v2`, - `Standard_DS14-8_v2`, - `Standard_DS14-4_v2`, - Standard_E2_v3, - Standard_E4_v3, - Standard_E8_v3, - Standard_E16_v3, - Standard_E32_v3, - Standard_E64_v3, - Standard_E2s_v3, - Standard_E4s_v3, - Standard_E8s_v3, - Standard_E16s_v3, - Standard_E32s_v3, - Standard_E64s_v3, - `Standard_E32-16_v3`, - `Standard_E32-8s_v3`, - `Standard_E64-32s_v3`, - `Standard_E64-16s_v3`, - Standard_F1, - Standard_F2, - Standard_F4, - Standard_F8, - Standard_F16, - Standard_F1s, - Standard_F2s, - Standard_F4s, - Standard_F8s, - Standard_F16s, - Standard_F2s_v2, - Standard_F4s_v2, - Standard_F8s_v2, - Standard_F16s_v2, - Standard_F32s_v2, - Standard_F64s_v2, - Standard_F72s_v2, - Standard_G1, - Standard_G2, - Standard_G3, - Standard_G4, - Standard_G5, - Standard_GS1, - Standard_GS2, - Standard_GS3, - Standard_GS4, - Standard_GS5, - `Standard_GS4-8`, - `Standard_GS4-4`, - `Standard_GS5-16`, - `Standard_GS5-8`, - Standard_H8, - Standard_H16, - Standard_H8m, - Standard_H16m, - Standard_H16r, - Standard_H16mr, - Standard_L4s, - Standard_L8s, - Standard_L16s, - Standard_L32s, - Standard_M64s, - Standard_M64ms, - Standard_M128s, - Standard_M128ms, - `Standard_M64-32ms`, - `Standard_M64-16ms`, - `Standard_M128-64ms`, - `Standard_M128-32ms`, - Standard_NC6, - Standard_NC12, - Standard_NC24, - Standard_NC24r, - Standard_NC6s_v2, - Standard_NC12s_v2, - Standard_NC24s_v2, - Standard_NC24rs_v2, - Standard_NC6s_v3, - Standard_NC12s_v3, - Standard_NC24s_v3, - Standard_NC24rs_v3, - Standard_ND6s, - Standard_ND12s, - Standard_ND24s, - Standard_ND24rs, - Standard_NV6, - Standard_NV12, - Standard_NV24, -} - -enum DiskDetachOptionTypes { - ForceDetach, -} - -enum DiskControllerTypes { - SCSI, - NVMe, -} - -enum IPVersions { - IPv4, - IPv6, -} - -enum PublicIPAllocationMethod { - Dynamic, - Static, -} - -enum HyperVGenerationType { - V1, - V2, -} - -enum PatchOperationStatus { - Unknown, - InProgress, - Failed, - Succeeded, - CompletedWithWarnings, -} - -enum VMGuestPatchRebootBehavior { - Unknown, - NeverReboots, - AlwaysRequiresReboot, - CanRequestReboot, -} - -enum PatchAssessmentState { - Unknown, - Available, -} - -enum VMGuestPatchRebootSetting { - IfRequired, - Never, - Always, -} - -enum VMGuestPatchClassificationWindows { - Critical, - Security, - UpdateRollUp, - FeaturePack, - ServicePack, - Definition, - Tools, - Updates, -} - -enum VMGuestPatchClassificationLinux { - Critical, - Security, - Other, -} - -enum VMGuestPatchRebootStatus { - Unknown, - NotNeeded, - Required, - Started, - Failed, - Completed, -} - -enum PatchInstallationState { - Unknown, - Installed, - Failed, - Excluded, - NotSelected, - Pending, -} - -enum HyperVGenerationTypes { - V1, - V2, -} - -enum VmDiskTypes { - None, - Unmanaged, -} - -enum ArchitectureTypes { - x64, - Arm64, -} - -enum ProximityPlacementGroupType { - Standard, - Ultra, -} - -enum OperatingSystemType { - Windows, - Linux, -} - -enum ConsistencyModeTypes { - CrashConsistent, - FileSystemConsistent, - ApplicationConsistent, -} - -enum RestorePointCollectionExpandOptions { - restorePoints, -} - -enum RestorePointExpandOptions { - instanceView, -} - -enum CapacityReservationGroupInstanceViewTypes { - instanceView, -} - -enum ExpandTypesForGetCapacityReservationGroups { - `virtualMachineScaleSetVMs/$ref`, - `virtualMachines/$ref`, -} - -enum CapacityReservationInstanceViewTypes { - instanceView, -} - -enum ExecutionState { - Unknown, - Pending, - Running, - Failed, - Succeeded, - TimedOut, - Canceled, -} - -enum AvailabilitySetSkuTypes { - Classic, - Aligned, -} -@Azure.Core.fixed -enum UpgradeMode { - Automatic, - Manual, - Rolling, -} -@Azure.Core.fixed -enum SettingNames { - AutoLogon, - FirstLogonCommands, -} -@Azure.Core.fixed -enum ProtocolTypes { - Http, - Https, -} -@Azure.Core.fixed -enum CachingTypes { - None, - ReadOnly, - ReadWrite, -} -@Azure.Core.fixed -enum OperatingSystemTypes { - Windows, - Linux, -} -@Azure.Core.fixed -enum ResourceIdentityType { - SystemAssigned, - UserAssigned, - `SystemAssigned, UserAssigned`, - None, -} -@Azure.Core.fixed -enum StatusLevelTypes { - Info, - Warning, - Error, -} -@Azure.Core.fixed -enum VirtualMachineScaleSetSkuScaleType { - Automatic, - None, -} -@Azure.Core.fixed -enum UpgradeState { - RollingForward, - Cancelled, - Completed, - Faulted, -} -@Azure.Core.fixed -enum UpgradeOperationInvoker { - Unknown, - User, - Platform, -} -@Azure.Core.fixed -enum RollingUpgradeStatusCode { - RollingForward, - Cancelled, - Completed, - Faulted, -} -@Azure.Core.fixed -enum RollingUpgradeActionType { - Start, - Cancel, -} -@Azure.Core.fixed -enum MaintenanceOperationResultCodeTypes { - None, - RetryLater, - MaintenanceAborted, - MaintenanceCompleted, -} -@Azure.Core.fixed -enum InstanceViewTypes { - instanceView, - userData, -} -@Azure.Core.fixed -enum DedicatedHostLicenseTypes { - None, - Windows_Server_Hybrid, - Windows_Server_Perpetual, -} -@Azure.Core.fixed -enum OperatingSystemStateTypes { - @doc("Generalized image. Needs to be provisioned during deployment time.") - Generalized, - @doc("Specialized image. Contains already provisioned OS Disk.") Specialized, -} -@Azure.Core.fixed -enum IntervalInMins { - ThreeMins, - FiveMins, - ThirtyMins, - SixtyMins, -} - -@doc("The List Compute Operation operation response.") -@pagedResult -model ComputeOperationListResult { - @doc("The list of compute operations") - @visibility("read") - @items - value?: ComputeOperationValue[]; -} - -@doc("Describes the properties of a Compute Operation value.") -model ComputeOperationValue { - @doc("The origin of the compute operation.") - @visibility("read") - origin?: string; - - @doc("The name of the compute operation.") - @visibility("read") - name?: string; - - @doc("Describes the properties of a Compute Operation Value Display.") - display?: ComputeOperationValueDisplay; -} - -@doc("Describes the properties of a Compute Operation Value Display.") -model ComputeOperationValueDisplay { - @doc("The display name of the compute operation.") - @visibility("read") - operation?: string; - - @doc("The display name of the resource the operation applies to.") - @visibility("read") - resource?: string; - - @doc("The description of the operation.") - @visibility("read") - description?: string; - - @doc("The resource provider for the operation.") - @visibility("read") - provider?: string; -} - -@doc("An error response from the Compute service.") -@error -model CloudError { - @doc("Api error.") - error?: ApiError; -} - -@doc("Api error.") -model ApiError { - @doc("The Api error details") - details?: ApiErrorBase[]; - - @doc("The Api inner error") - innererror?: InnerError; - - @doc("The error code.") - code?: string; - - @doc("The target of the particular error.") - target?: string; - - @doc("The error message.") - message?: string; -} - -@doc("Api error base.") -model ApiErrorBase { - @doc("The error code.") - code?: string; - - @doc("The target of the particular error.") - target?: string; - - @doc("The error message.") - message?: string; -} - -@doc("Inner error details.") -model InnerError { - @doc("The exception type.") - exceptiontype?: string; - - @doc("The internal error message or exception dump.") - errordetail?: string; -} - -@doc("The List Usages operation response.") -model ListUsagesResult is Azure.Core.Page; - -@doc("Describes Compute Resource Usage.") -model Usage { - @doc("An enum describing the unit of usage measurement.") - unit: "Count"; - - @doc("The current usage of the resource.") - currentValue: int32; - - @doc("The maximum permitted usage of the resource.") - limit: int32; - - @doc("The name of the type of usage.") - name: UsageName; -} - -@doc("The Usage Names.") -model UsageName { - @doc("The name of the resource.") - value?: string; - - @doc("The localized name of the resource.") - localizedValue?: string; -} - -@doc("The List Virtual Machine operation response.") -@pagedResult -model VirtualMachineSizeListResult { - @doc("The list of virtual machine sizes.") - @items - value?: VirtualMachineSize[]; -} - -@doc("Describes the properties of a VM size.") -model VirtualMachineSize { - @doc("The name of the virtual machine size.") - name?: string; - - @doc(""" -The number of cores supported by the virtual machine size. For Constrained vCPU -capable VM sizes, this number represents the total vCPUs of quota that the VM -uses. For accurate vCPU count, please refer to -https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu or -https://docs.microsoft.com/rest/api/compute/resourceskus/list -""") - numberOfCores?: int32; - - @doc("The OS disk size, in MB, allowed by the virtual machine size.") - osDiskSizeInMB?: int32; - - @doc("The resource disk size, in MB, allowed by the virtual machine size.") - resourceDiskSizeInMB?: int32; - - @doc("The amount of memory, in MB, supported by the virtual machine size.") - memoryInMB?: int32; - - @doc(""" -The maximum number of data disks that can be attached to the virtual machine -size. -""") - maxDataDiskCount?: int32; -} - -@doc("The List Virtual Machine operation response.") -model VirtualMachineScaleSetListResult - is Azure.Core.Page; - -@doc("Describes a Virtual Machine Scale Set.") -model VirtualMachineScaleSet { - ...Resource; - - @doc("The virtual machine scale set sku.") - sku?: Sku; - - @doc(""" -Specifies information about the marketplace image used to create the virtual -machine. This element is only used for marketplace images. Before you can use a -marketplace image from an API, you must enable the image for programmatic use. -In the Azure portal, find the marketplace image that you want to use and then -click **Want to deploy programmatically, Get Started ->**. Enter any required -information and then click **Save**. -""") - plan?: Plan; - - @doc("Describes the properties of a Virtual Machine Scale Set.") - properties?: VirtualMachineScaleSetProperties; - - @doc("The identity of the virtual machine scale set, if configured.") - identity?: VirtualMachineScaleSetIdentity; - - @doc(""" -The virtual machine scale set zones. NOTE: Availability zones can only be set -when you create the scale set -""") - zones?: string[]; - - @doc("The extended location of the Virtual Machine Scale Set.") - extendedLocation?: ExtendedLocation; -} - -@doc(""" -Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not -supported on the hardware the scale set is currently on, you need to deallocate -the VMs in the scale set before you modify the SKU name. -""") -model Sku { - @doc("The sku name.") - name?: string; - - @doc(""" -Specifies the tier of virtual machines in a scale set.

Possible -Values:

**Standard**

**Basic** -""") - tier?: string; - - @doc("Specifies the number of virtual machines in the scale set.") - capacity?: int32; -} - -@doc(""" -Specifies information about the marketplace image used to create the virtual -machine. This element is only used for marketplace images. Before you can use a -marketplace image from an API, you must enable the image for programmatic use. -In the Azure portal, find the marketplace image that you want to use and then -click **Want to deploy programmatically, Get Started ->**. Enter any required -information and then click **Save**. -""") -model Plan { - @doc("The plan ID.") - name?: string; - - @doc("The publisher ID.") - publisher?: string; - - @doc(""" -Specifies the product of the image from the marketplace. This is the same value -as Offer under the imageReference element. -""") - product?: string; - - @doc("The promotion code.") - promotionCode?: string; -} - -@doc("Describes the properties of a Virtual Machine Scale Set.") -model VirtualMachineScaleSetProperties { - @doc("The upgrade policy.") - upgradePolicy?: UpgradePolicy; - - @doc("Policy for automatic repairs.") - automaticRepairsPolicy?: AutomaticRepairsPolicy; - - @doc("The virtual machine profile.") - virtualMachineProfile?: VirtualMachineScaleSetVMProfile; - - @doc("The provisioning state, which only appears in the response.") - @visibility("read") - provisioningState?: string; - - @doc("Specifies whether the Virtual Machine Scale Set should be overprovisioned.") - overprovision?: boolean; - - @doc(""" -When Overprovision is enabled, extensions are launched only on the requested -number of VMs which are finally kept. This property will hence ensure that the -extensions do not run on the extra overprovisioned VMs. -""") - doNotRunExtensionsOnOverprovisionedVMs?: boolean; - - @doc("Specifies the ID which uniquely identifies a Virtual Machine Scale Set.") - @visibility("read") - uniqueId?: string; - - @doc(""" -When true this limits the scale set to a single placement group, of max size -100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified -to false. However, if singlePlacementGroup is false, it may not be modified to -true. -""") - singlePlacementGroup?: boolean; - - @doc(""" -Whether to force strictly even Virtual Machine distribution cross x-zones in -case there is zone outage. zoneBalance property can only be set if the zones -property of the scale set contains more than one zone. If there are no zones or -only one zone specified, then zoneBalance property should not be set. -""") - zoneBalance?: boolean; - - @doc("Fault Domain count for each placement group.") - platformFaultDomainCount?: int32; - - @doc(""" -Specifies information about the proximity placement group that the virtual -machine scale set should be assigned to.

Minimum api-version: -2018-04-01. -""") - proximityPlacementGroup?: SubResource; - - @doc(""" -Specifies information about the dedicated host group that the virtual machine -scale set resides in.

Minimum api-version: 2020-06-01. -""") - hostGroup?: SubResource; - - @doc(""" -Specifies additional capabilities enabled or disabled on the Virtual Machines -in the Virtual Machine Scale Set. For instance: whether the Virtual Machines -have the capability to support attaching managed data disks with UltraSSD_LRS -storage account type. -""") - additionalCapabilities?: AdditionalCapabilities; - - @doc(""" -Specifies the policies applied when scaling in Virtual Machines in the Virtual -Machine Scale Set. -""") - scaleInPolicy?: ScaleInPolicy; - - @doc("Specifies the orchestration mode for the virtual machine scale set.") - orchestrationMode?: OrchestrationMode; - - @doc("Specifies the Spot Restore properties for the virtual machine scale set.") - spotRestorePolicy?: SpotRestorePolicy; - - @doc(""" -Specifies the desired targets for mixing Spot and Regular priority VMs within -the same VMSS Flex instance. -""") - priorityMixPolicy?: PriorityMixPolicy; - - @doc(""" -Specifies the time at which the Virtual Machine Scale Set resource was -created.

Minimum api-version: 2021-11-01. -""") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - timeCreated?: utcDateTime; -} - -@doc("Describes an upgrade policy - automatic, manual, or rolling.") -model UpgradePolicy { - @doc(""" -Specifies the mode of an upgrade to virtual machines in the scale set.

Possible values are:

**Manual** - You control the application -of updates to virtual machines in the scale set. You do this by using the -manualUpgrade action.

**Automatic** - All virtual machines in the -scale set are automatically updated at the same time. -""") - mode?: UpgradeMode; - - @doc("The configuration parameters used while performing a rolling upgrade.") - rollingUpgradePolicy?: RollingUpgradePolicy; - - @doc("Configuration parameters used for performing automatic OS Upgrade.") - automaticOSUpgradePolicy?: AutomaticOSUpgradePolicy; -} - -@doc("The configuration parameters used while performing a rolling upgrade.") -model RollingUpgradePolicy { - @doc(""" -The maximum percent of total virtual machine instances that will be upgraded -simultaneously by the rolling upgrade in one batch. As this is a maximum, -unhealthy instances in previous or future batches can cause the percentage of -instances in a batch to decrease to ensure higher reliability. The default -value for this parameter is 20%. -""") - maxBatchInstancePercent?: int32; - - @doc(""" -The maximum percentage of the total virtual machine instances in the scale set -that can be simultaneously unhealthy, either as a result of being upgraded, or -by being found in an unhealthy state by the virtual machine health checks -before the rolling upgrade aborts. This constraint will be checked prior to -starting any batch. The default value for this parameter is 20%. -""") - maxUnhealthyInstancePercent?: int32; - - @doc(""" -The maximum percentage of upgraded virtual machine instances that can be found -to be in an unhealthy state. This check will happen after each batch is -upgraded. If this percentage is ever exceeded, the rolling update aborts. The -default value for this parameter is 20%. -""") - maxUnhealthyUpgradedInstancePercent?: int32; - - @doc(""" -The wait time between completing the update for all virtual machines in one -batch and starting the next batch. The time duration should be specified in ISO -8601 format. The default value is 0 seconds (PT0S). -""") - pauseTimeBetweenBatches?: string; - - @doc(""" -Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into -consideration the Update Domain and maxBatchInstancePercent to determine the -batch size. -""") - enableCrossZoneUpgrade?: boolean; - - @doc("Upgrade all unhealthy instances in a scale set before any healthy instances.") - prioritizeUnhealthyInstances?: boolean; -} - -@doc("The configuration parameters used for performing automatic OS upgrade.") -model AutomaticOSUpgradePolicy { - @doc(""" -Indicates whether OS upgrades should automatically be applied to scale set -instances in a rolling fashion when a newer version of the OS image becomes -available. Default value is false.

If this is set to true for Windows -based scale sets, -[enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) -is automatically set to false and cannot be set to true. -""") - enableAutomaticOSUpgrade?: boolean; - - @doc("Whether OS image rollback feature should be disabled. Default value is false.") - disableAutomaticRollback?: boolean; - - @doc(""" -Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. -Default value is false. Auto OS Upgrade will fallback to the default policy if -no policy is defined on the VMSS. -""") - useRollingUpgradePolicy?: boolean; -} - -@doc(""" -Specifies the configuration parameters for automatic repairs on the virtual -machine scale set. -""") -model AutomaticRepairsPolicy { - @doc(""" -Specifies whether automatic repairs should be enabled on the virtual machine -scale set. The default value is false. -""") - enabled?: boolean; - - @doc(""" -The amount of time for which automatic repairs are suspended due to a state -change on VM. The grace time starts after the state change has completed. This -helps avoid premature or accidental repairs. The time duration should be -specified in ISO 8601 format. The minimum allowed grace period is 10 minutes -(PT10M), which is also the default value. The maximum allowed grace period is -90 minutes (PT90M). -""") - gracePeriod?: string; - - @doc(""" -Type of repair action (replace, restart, reimage) that will be used for -repairing unhealthy virtual machines in the scale set. Default value is -replace. -""") - repairAction?: RepairAction; -} - -@doc("Describes a virtual machine scale set virtual machine profile.") -model VirtualMachineScaleSetVMProfile { - @doc(""" -Specifies the operating system settings for the virtual machines in the scale -set. -""") - osProfile?: VirtualMachineScaleSetOSProfile; - - @doc("Specifies the storage settings for the virtual machine disks.") - storageProfile?: VirtualMachineScaleSetStorageProfile; - - @doc(""" -Specifies properties of the network interfaces of the virtual machines in the -scale set. -""") - networkProfile?: VirtualMachineScaleSetNetworkProfile; - - @doc(""" -Specifies the Security related profile settings for the virtual machines in the -scale set. -""") - securityProfile?: SecurityProfile; - - @doc(""" -Specifies the boot diagnostic settings state.

Minimum api-version: -2015-06-15. -""") - diagnosticsProfile?: DiagnosticsProfile; - - @doc(""" -Specifies a collection of settings for extensions installed on virtual machines -in the scale set. -""") - extensionProfile?: VirtualMachineScaleSetExtensionProfile; - - @doc(""" -Specifies that the image or disk that is being used was licensed on-premises. -

Possible values for Windows Server operating system are:

-Windows_Client

Windows_Server

Possible values for Linux -Server operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS -(for SUSE)

For more information, see [Azure Hybrid Use Benefit for -Windows -Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) -

[Azure Hybrid Use Benefit for Linux -Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) -

Minimum api-version: 2015-06-15 -""") - licenseType?: string; - - @doc(""" -Specifies the priority for the virtual machines in the scale set. -

Minimum api-version: 2017-10-30-preview -""") - priority?: VirtualMachinePriorityTypes; - - @doc(""" -Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot -scale set.

For Azure Spot virtual machines, both 'Deallocate' and -'Delete' are supported and the minimum api-version is 2019-03-01.

For -Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the -minimum api-version is 2017-10-30-preview. -""") - evictionPolicy?: VirtualMachineEvictionPolicyTypes; - - @doc(""" -Specifies the billing related details of a Azure Spot VMSS.

Minimum -api-version: 2019-03-01. -""") - billingProfile?: BillingProfile; - - @doc("Specifies Scheduled Event related configurations.") - scheduledEventsProfile?: ScheduledEventsProfile; - - @doc(""" -UserData for the virtual machines in the scale set, which must be base-64 -encoded. Customer should not pass any secrets in here.

Minimum -api-version: 2021-03-01 -""") - userData?: string; - - @doc(""" -Specifies the capacity reservation related details of a scale set. -

Minimum api-version: 2021-04-01. -""") - capacityReservation?: CapacityReservationProfile; - - @doc("Specifies the gallery applications that should be made available to the VM/VMSS") - applicationProfile?: ApplicationProfile; - - @doc(""" -Specifies the hardware profile related details of a scale set.

Minimum -api-version: 2021-11-01. -""") - hardwareProfile?: VirtualMachineScaleSetHardwareProfile; -} - -@doc("Describes a virtual machine scale set OS profile.") -model VirtualMachineScaleSetOSProfile { - @doc(""" -Specifies the computer name prefix for all of the virtual machines in the scale -set. Computer name prefixes must be 1 to 15 characters long. -""") - computerNamePrefix?: string; - - @doc(""" -Specifies the name of the administrator account.

**Windows-only -restriction:** Cannot end in \".\"

**Disallowed values:** -\"administrator\", \"admin\", \"user\", \"user1\", \"test\", \"user2\", -\"test1\", \"user3\", \"admin1\", \"1\", \"123\", \"a\", \"actuser\", \"adm\", -\"admin2\", \"aspnet\", \"backup\", \"console\", \"david\", \"guest\", -\"john\", \"owner\", \"root\", \"server\", \"sql\", \"support\", -\"support_388945a0\", \"sys\", \"test2\", \"test3\", \"user4\", \"user5\". -

**Minimum-length (Linux):** 1 character

**Max-length -(Linux):** 64 characters

**Max-length (Windows):** 20 characters -""") - adminUsername?: string; - - @doc(""" -Specifies the password of the administrator account.

**Minimum-length -(Windows):** 8 characters

**Minimum-length (Linux):** 6 characters -

**Max-length (Windows):** 123 characters

**Max-length -(Linux):** 72 characters

**Complexity requirements:** 3 out of 4 -conditions below need to be fulfilled
Has lower characters
Has upper -characters
Has a digit
Has a special character (Regex match [\\W_]) -

**Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", -\"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", -\"Password22\", \"iloveyou!\"

For resetting the password, see [How to -reset the Remote Desktop service or its login password in a Windows -VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) -

For resetting root password, see [Manage users, SSH, and check or -repair disks on Azure Linux VMs using the VMAccess -Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) -""") - adminPassword?: string; - - @doc(""" -Specifies a base-64 encoded string of custom data. The base-64 encoded string -is decoded to a binary array that is saved as a file on the Virtual Machine. -The maximum length of the binary array is 65535 bytes.

For using -cloud-init for your VM, see [Using cloud-init to customize a Linux VM during -creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) -""") - customData?: string; - - @doc("Specifies Windows operating system settings on the virtual machine.") - windowsConfiguration?: WindowsConfiguration; - - @doc(""" -Specifies the Linux operating system settings on the virtual machine. -

For a list of supported Linux distributions, see [Linux on -Azure-Endorsed -Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). -""") - linuxConfiguration?: LinuxConfiguration; - - @doc(""" -Specifies set of certificates that should be installed onto the virtual -machines in the scale set. To install certificates on a virtual machine it is -recommended to use the [Azure Key Vault virtual machine extension for -Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) -or the [Azure Key Vault virtual machine extension for -Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). -""") - secrets?: VaultSecretGroup[]; - - @doc(""" -Specifies whether extension operations should be allowed on the virtual machine -scale set.

This may only be set to False when no extensions are present -on the virtual machine scale set. -""") - allowExtensionOperations?: boolean; -} - -@doc("Specifies Windows operating system settings on the virtual machine.") -model WindowsConfiguration { - @doc(""" -Indicates whether virtual machine agent should be provisioned on the virtual -machine.

When this property is not specified in the request body, -default behavior is to set it to true. This will ensure that VM Agent is -installed on the VM so that extensions can be added to the VM later. -""") - provisionVMAgent?: boolean; - - @doc(""" -Indicates whether Automatic Updates is enabled for the Windows virtual machine. -Default value is true.

For virtual machine scale sets, this property -can be updated and updates will take effect on OS reprovisioning. -""") - enableAutomaticUpdates?: boolean; - - @doc(""" -Specifies the time zone of the virtual machine. e.g. \"Pacific Standard Time\". -

Possible values can be -[TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) -value from time zones returned by -[TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). -""") - timeZone?: string; - - @doc(""" -Specifies additional base-64 encoded XML formatted information that can be -included in the Unattend.xml file, which is used by Windows Setup. -""") - additionalUnattendContent?: AdditionalUnattendContent[]; - - @doc("[Preview Feature] Specifies settings related to VM Guest Patching on Windows.") - patchSettings?: PatchSettings; - - @doc(""" -Specifies the Windows Remote Management listeners. This enables remote Windows -PowerShell. -""") - winRM?: WinRMConfiguration; - - @doc(""" -Indicates whether VMAgent Platform Updates is enabled for the Windows virtual -machine. Default value is false. -""") - enableVMAgentPlatformUpdates?: boolean; -} - -@doc(""" -Specifies additional XML formatted information that can be included in the -Unattend.xml file, which is used by Windows Setup. Contents are defined by -setting name, component name, and the pass in which the content is applied. -""") -model AdditionalUnattendContent { - @doc("The pass name. Currently, the only allowable value is OobeSystem.") - passName?: "OobeSystem"; - - @doc(""" -The component name. Currently, the only allowable value is -Microsoft-Windows-Shell-Setup. -""") - componentName?: "Microsoft-Windows-Shell-Setup"; - - @doc(""" -Specifies the name of the setting to which the content applies. Possible values -are: FirstLogonCommands and AutoLogon. -""") - settingName?: SettingNames; - - @doc(""" -Specifies the XML formatted content that is added to the unattend.xml file for -the specified path and component. The XML must be less than 4KB and must -include the root element for the setting or feature that is being inserted. -""") - content?: string; -} - -@doc("Specifies settings related to VM Guest Patching on Windows.") -model PatchSettings { - @doc(""" -Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual -machines associated to virtual machine scale set with OrchestrationMode as -Flexible.

Possible values are:

**Manual** - You -control the application of patches to a virtual machine. You do this by -applying patches manually inside the VM. In this mode, automatic updates are -disabled; the property WindowsConfiguration.enableAutomaticUpdates must be -false

**AutomaticByOS** - The virtual machine will automatically be -updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates -must be true.

**AutomaticByPlatform** - the virtual machine will -automatically updated by the platform. The properties provisionVMAgent and -WindowsConfiguration.enableAutomaticUpdates must be true -""") - patchMode?: WindowsVMGuestPatchMode; - - @doc(""" -Enables customers to patch their Azure VMs without requiring a reboot. For -enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' -must be set to 'AutomaticByPlatform'. -""") - enableHotpatching?: boolean; - - @doc(""" -Specifies the mode of VM Guest patch assessment for the IaaS virtual -machine.

Possible values are:

**ImageDefault** - You -control the timing of patch assessments on a virtual machine.

-**AutomaticByPlatform** - The platform will trigger periodic patch assessments. -The property provisionVMAgent must be true. -""") - assessmentMode?: WindowsPatchAssessmentMode; - - @doc(""" -Specifies additional settings for patch mode AutomaticByPlatform in VM Guest -Patching on Windows. -""") - automaticByPlatformSettings?: WindowsVMGuestPatchAutomaticByPlatformSettings; -} - -@doc(""" -Specifies additional settings to be applied when patch mode AutomaticByPlatform -is selected in Windows patch settings. -""") -model WindowsVMGuestPatchAutomaticByPlatformSettings { - @doc(""" -Specifies the reboot setting for all AutomaticByPlatform patch installation -operations. -""") - rebootSetting?: WindowsVMGuestPatchAutomaticByPlatformRebootSetting; -} - -@doc("Describes Windows Remote Management configuration of the VM") -model WinRMConfiguration { - @doc("The list of Windows Remote Management listeners") - listeners?: WinRMListener[]; -} - -@doc("Describes Protocol and thumbprint of Windows Remote Management listener") -model WinRMListener { - @doc(""" -Specifies the protocol of WinRM listener.

Possible values are: -
**http**

**https** -""") - protocol?: ProtocolTypes; - - @doc(""" -This is the URL of a certificate that has been uploaded to Key Vault as a -secret. For adding a secret to the Key Vault, see [Add a key or secret to the -key -vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). -In this case, your certificate needs to be It is the Base64 encoding of the -following JSON Object which is encoded in UTF-8:

{
-\"data\":\"\",
\"dataType\":\"pfx\",
-\"password\":\"\"
}
To install certificates on a -virtual machine it is recommended to use the [Azure Key Vault virtual machine -extension for -Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) -or the [Azure Key Vault virtual machine extension for -Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). -""") - certificateUrl?: string; -} - -@doc(""" -Specifies the Linux operating system settings on the virtual machine. -

For a list of supported Linux distributions, see [Linux on -Azure-Endorsed -Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). -""") -model LinuxConfiguration { - @doc("Specifies whether password authentication should be disabled.") - disablePasswordAuthentication?: boolean; - - @doc("Specifies the ssh key configuration for a Linux OS.") - ssh?: SshConfiguration; - - @doc(""" -Indicates whether virtual machine agent should be provisioned on the virtual -machine.

When this property is not specified in the request body, -default behavior is to set it to true. This will ensure that VM Agent is -installed on the VM so that extensions can be added to the VM later. -""") - provisionVMAgent?: boolean; - - @doc("[Preview Feature] Specifies settings related to VM Guest Patching on Linux.") - patchSettings?: LinuxPatchSettings; - - @doc(""" -Indicates whether VMAgent Platform Updates is enabled for the Linux virtual -machine. Default value is false. -""") - enableVMAgentPlatformUpdates?: boolean; -} - -@doc("SSH configuration for Linux based VMs running on Azure") -model SshConfiguration { - @doc("The list of SSH public keys used to authenticate with linux based VMs.") - publicKeys?: SshPublicKey[]; -} - -@doc(""" -Contains information about SSH certificate public key and the path on the Linux -VM where the public key is placed. -""") -model SshPublicKey { - @doc(""" -Specifies the full path on the created VM where ssh public key is stored. If -the file already exists, the specified key is appended to the file. Example: -/home/user/.ssh/authorized_keys -""") - path?: string; - - @doc(""" -SSH public key certificate used to authenticate with the VM through ssh. The -key needs to be at least 2048-bit and in ssh-rsa format.

For creating -ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in -Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). -""") - keyData?: string; -} - -@doc("Specifies settings related to VM Guest Patching on Linux.") -model LinuxPatchSettings { - @doc(""" -Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual -machines associated to virtual machine scale set with OrchestrationMode as -Flexible.

Possible values are:

**ImageDefault** - The -virtual machine's default patching configuration is used.

-**AutomaticByPlatform** - The virtual machine will be automatically updated by -the platform. The property provisionVMAgent must be true -""") - patchMode?: LinuxVMGuestPatchMode; - - @doc(""" -Specifies the mode of VM Guest Patch Assessment for the IaaS virtual -machine.

Possible values are:

**ImageDefault** - You -control the timing of patch assessments on a virtual machine.

-**AutomaticByPlatform** - The platform will trigger periodic patch assessments. -The property provisionVMAgent must be true. -""") - assessmentMode?: LinuxPatchAssessmentMode; - - @doc(""" -Specifies additional settings for patch mode AutomaticByPlatform in VM Guest -Patching on Linux. -""") - automaticByPlatformSettings?: LinuxVMGuestPatchAutomaticByPlatformSettings; -} - -@doc(""" -Specifies additional settings to be applied when patch mode AutomaticByPlatform -is selected in Linux patch settings. -""") -model LinuxVMGuestPatchAutomaticByPlatformSettings { - @doc(""" -Specifies the reboot setting for all AutomaticByPlatform patch installation -operations. -""") - rebootSetting?: LinuxVMGuestPatchAutomaticByPlatformRebootSetting; -} - -@doc("Describes a set of certificates which are all in the same Key Vault.") -model VaultSecretGroup { - @doc(""" -The relative URL of the Key Vault containing all of the certificates in -VaultCertificates. -""") - sourceVault?: SubResource; - - @doc("The list of key vault references in SourceVault which contain certificates.") - vaultCertificates?: VaultCertificate[]; -} - -model SubResource { - @doc("Resource Id") - id?: string; -} - -@doc(""" -Describes a single certificate reference in a Key Vault, and where the -certificate should reside on the VM. -""") -model VaultCertificate { - @doc(""" -This is the URL of a certificate that has been uploaded to Key Vault as a -secret. For adding a secret to the Key Vault, see [Add a key or secret to the -key -vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). -In this case, your certificate needs to be It is the Base64 encoding of the -following JSON Object which is encoded in UTF-8:

{
-\"data\":\"\",
\"dataType\":\"pfx\",
-\"password\":\"\"
}
To install certificates on a -virtual machine it is recommended to use the [Azure Key Vault virtual machine -extension for -Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) -or the [Azure Key Vault virtual machine extension for -Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). -""") - certificateUrl?: string; - - @doc(""" -For Windows VMs, specifies the certificate store on the Virtual Machine to -which the certificate should be added. The specified certificate store is -implicitly in the LocalMachine account.

For Linux VMs, the certificate -file is placed under the /var/lib/waagent directory, with the file name -<UppercaseThumbprint>.crt for the X509 certificate file and -<UppercaseThumbprint>.prv for private key. Both of these files are .pem -formatted. -""") - certificateStore?: string; -} - -@doc("Describes a virtual machine scale set storage profile.") -model VirtualMachineScaleSetStorageProfile { - @doc(""" -Specifies information about the image to use. You can specify information about -platform images, marketplace images, or virtual machine images. This element is -required when you want to use a platform image, marketplace image, or virtual -machine image, but is not used in other creation operations. -""") - imageReference?: ImageReference; - - @doc(""" -Specifies information about the operating system disk used by the virtual -machines in the scale set.

For more information about disks, see -[About disks and VHDs for Azure virtual -machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). -""") - osDisk?: VirtualMachineScaleSetOSDisk; - - @doc(""" -Specifies the parameters that are used to add data disks to the virtual -machines in the scale set.

For more information about disks, see -[About disks and VHDs for Azure virtual -machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). -""") - dataDisks?: VirtualMachineScaleSetDataDisk[]; - - diskControllerType?: string; -} - -@doc(""" -Specifies information about the image to use. You can specify information about -platform images, marketplace images, or virtual machine images. This element is -required when you want to use a platform image, marketplace image, or virtual -machine image, but is not used in other creation operations. NOTE: Image -reference publisher and offer can only be set when you create the scale set. -""") -model ImageReference { - ...SubResource; - - @doc("The image publisher.") - publisher?: string; - - @doc(""" -Specifies the offer of the platform image or marketplace image used to create -the virtual machine. -""") - offer?: string; - - @doc("The image SKU.") - sku?: string; - - @doc(""" -Specifies the version of the platform image or marketplace image used to create -the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. -Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest -version of an image available at deploy time. Even if you use 'latest', the VM -image will not automatically update after deploy time even if a new version -becomes available. Please do not use field 'version' for gallery image -deployment, gallery image should always use 'id' field for deployment, to use -'latest' version of gallery image, just set -'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' -in the 'id' field without version input. -""") - version?: string; - - @doc(""" -Specifies in decimal numbers, the version of platform image or marketplace -image used to create the virtual machine. This readonly field differs from -'version', only if the value specified in 'version' field is 'latest'. -""") - @visibility("read") - exactVersion?: string; - - @doc(""" -Specified the shared gallery image unique id for vm deployment. This can be -fetched from shared gallery image GET call. -""") - sharedGalleryImageId?: string; - - @doc(""" -Specified the community gallery image unique id for vm deployment. This can be -fetched from community gallery image GET call. -""") - communityGalleryImageId?: string; -} - -@doc("Describes a virtual machine scale set operating system disk.") -model VirtualMachineScaleSetOSDisk { - @doc("The disk name.") - name?: string; - - @doc(""" -Specifies the caching requirements.

Possible values are:

-**None**

**ReadOnly**

**ReadWrite**

Default: **None -for Standard storage. ReadOnly for Premium storage** -""") - caching?: CachingTypes; - - @doc("Specifies whether writeAccelerator should be enabled or disabled on the disk.") - writeAcceleratorEnabled?: boolean; - - @doc(""" -Specifies how the virtual machines in the scale set should be created.

-The only allowed value is: **FromImage** \\u2013 This value is used when you -are using an image to create the virtual machine. If you are using a platform -image, you also use the imageReference element described above. If you are -using a marketplace image, you also use the plan element previously described. -""") - createOption: DiskCreateOptionTypes; - - @doc(""" -Specifies the ephemeral disk Settings for the operating system disk used by the -virtual machine scale set. -""") - diffDiskSettings?: DiffDiskSettings; - - @doc(""" -Specifies the size of an empty data disk in gigabytes. This element can be used -to overwrite the size of the disk in a virtual machine image.

-diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be -larger than 1023 -""") - diskSizeGB?: int32; - - @doc(""" -This property allows you to specify the type of the OS that is included in the -disk if creating a VM from user-image or a specialized VHD.

Possible -values are:

**Windows**

**Linux** -""") - osType?: OperatingSystemTypes; - - @doc("Specifies information about the unmanaged user image to base the scale set on.") - image?: VirtualHardDisk; - - @doc(""" -Specifies the container urls that are used to store operating system disks for -the scale set. -""") - vhdContainers?: string[]; - - @doc("The managed disk parameters.") - managedDisk?: VirtualMachineScaleSetManagedDiskParameters; - - @doc(""" -Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion -(This feature is available for VMSS with Flexible OrchestrationMode only). -

Possible values:

**Delete** If this value is used, the OS -disk is deleted when VMSS Flex VM is deleted.

**Detach** If this value -is used, the OS disk is retained after VMSS Flex VM is deleted.

The -default value is set to **Delete**. For an Ephemeral OS Disk, the default value -is set to **Delete**. User cannot change the delete option for Ephemeral OS -Disk. -""") - deleteOption?: DiskDeleteOptionTypes; -} - -@doc(""" -Describes the parameters of ephemeral disk settings that can be specified for -operating system disk.

NOTE: The ephemeral disk settings can only be -specified for managed disk. -""") -model DiffDiskSettings { - @doc("Specifies the ephemeral disk settings for operating system disk.") - option?: DiffDiskOptions; - - @doc(""" -Specifies the ephemeral disk placement for operating system disk.

-Possible values are:

**CacheDisk**

**ResourceDisk**

-Default: **CacheDisk** if one is configured for the VM size otherwise -**ResourceDisk** is used.

Refer to VM size documentation for Windows VM -at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM -at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which -VM sizes exposes a cache disk. -""") - placement?: DiffDiskPlacement; -} - -@doc("Describes the uri of a disk.") -model VirtualHardDisk { - @doc("Specifies the virtual hard disk's uri.") - uri?: string; -} - -@doc("Describes the parameters of a ScaleSet managed disk.") -model VirtualMachineScaleSetManagedDiskParameters { - @doc(""" -Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can -only be used with data disks, it cannot be used with OS Disk. -""") - storageAccountType?: StorageAccountTypes; - - @doc(""" -Specifies the customer managed disk encryption set resource id for the managed -disk. -""") - diskEncryptionSet?: DiskEncryptionSetParameters; - - @doc("Specifies the security profile for the managed disk.") - securityProfile?: VMDiskSecurityProfile; -} - -@doc(""" -Describes the parameter of customer managed disk encryption set resource id -that can be specified for disk.

NOTE: The disk encryption set resource -id can only be specified for managed disk. Please refer -https://aka.ms/mdssewithcmkoverview for more details. -""") -model DiskEncryptionSetParameters { - ...SubResource; -} - -@doc(""" -Specifies the security profile settings for the managed disk.

NOTE: It -can only be set for Confidential VMs -""") -model VMDiskSecurityProfile { - @doc(""" -Specifies the EncryptionType of the managed disk.
It is set to -DiskWithVMGuestState for encryption of the managed disk along with VMGuestState -blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. -

NOTE: It can be set for only Confidential VMs. -""") - securityEncryptionType?: SecurityEncryptionTypes; - - @doc(""" -Specifies the customer managed disk encryption set resource id for the managed -disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and -VMGuest blob. -""") - diskEncryptionSet?: DiskEncryptionSetParameters; -} - -@doc("Describes a virtual machine scale set data disk.") -model VirtualMachineScaleSetDataDisk { - @doc("The disk name.") - name?: string; - - @doc(""" -Specifies the logical unit number of the data disk. This value is used to -identify data disks within the VM and therefore must be unique for each data -disk attached to a VM. -""") - lun: int32; - - @doc(""" -Specifies the caching requirements.

Possible values are:

-**None**

**ReadOnly**

**ReadWrite**

Default: **None -for Standard storage. ReadOnly for Premium storage** -""") - caching?: CachingTypes; - - @doc("Specifies whether writeAccelerator should be enabled or disabled on the disk.") - writeAcceleratorEnabled?: boolean; - - @doc("The create option.") - createOption: DiskCreateOptionTypes; - - @doc(""" -Specifies the size of an empty data disk in gigabytes. This element can be used -to overwrite the size of the disk in a virtual machine image.

-diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be -larger than 1023 -""") - diskSizeGB?: int32; - - @doc("The managed disk parameters.") - managedDisk?: VirtualMachineScaleSetManagedDiskParameters; - - @doc(""" -Specifies the Read-Write IOPS for the managed disk. Should be used only when -StorageAccountType is UltraSSD_LRS. If not specified, a default value would be -assigned based on diskSizeGB. -""") - @projectedName("json", "diskIOPSReadWrite") - diskIopsReadWrite?: int32; - - @doc(""" -Specifies the bandwidth in MB per second for the managed disk. Should be used -only when StorageAccountType is UltraSSD_LRS. If not specified, a default value -would be assigned based on diskSizeGB. -""") - diskMBpsReadWrite?: int32; - - @doc(""" -Specifies whether data disk should be deleted or detached upon VMSS Flex -deletion (This feature is available for VMSS with Flexible OrchestrationMode -only).

Possible values:

**Delete** If this value is used, the -data disk is deleted when the VMSS Flex VM is deleted.

**Detach** If -this value is used, the data disk is retained after VMSS Flex VM is -deleted.

The default value is set to **Delete**. -""") - deleteOption?: DiskDeleteOptionTypes; -} - -@doc("Describes a virtual machine scale set network profile.") -model VirtualMachineScaleSetNetworkProfile { - @doc(""" -A reference to a load balancer probe used to determine the health of an -instance in the virtual machine scale set. The reference will be in the form: -'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. -""") - healthProbe?: ApiEntityReference; - - @doc("The list of network configurations.") - networkInterfaceConfigurations?: VirtualMachineScaleSetNetworkConfiguration[]; - - @doc(""" -specifies the Microsoft.Network API version used when creating networking -resources in the Network Interface Configurations for Virtual Machine Scale Set -with orchestration mode 'Flexible' -""") - networkApiVersion?: NetworkApiVersion; -} - -@doc("The API entity reference.") -model ApiEntityReference { - @doc(""" -The ARM resource id in the form of -/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... -""") - id?: string; -} - -@doc("Describes a virtual machine scale set network profile's network configurations.") -model VirtualMachineScaleSetNetworkConfiguration { - ...SubResource; - - @doc("The network configuration name.") - name: string; - - @doc("Describes a virtual machine scale set network profile's IP configuration.") - properties?: VirtualMachineScaleSetNetworkConfigurationProperties; -} - -@doc("Describes a virtual machine scale set network profile's IP configuration.") -model VirtualMachineScaleSetNetworkConfigurationProperties { - @doc(""" -Specifies the primary network interface in case the virtual machine has more -than 1 network interface. -""") - primary?: boolean; - - @doc("Specifies whether the network interface is accelerated networking-enabled.") - enableAcceleratedNetworking?: boolean; - - @doc("Specifies whether the network interface is disabled for tcp state tracking.") - disableTcpStateTracking?: boolean; - - @doc("Specifies whether the network interface is FPGA networking-enabled.") - enableFpga?: boolean; - - @doc("The network security group.") - networkSecurityGroup?: SubResource; - - @doc("The dns settings to be applied on the network interfaces.") - dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; - - @doc("Specifies the IP configurations of the network interface.") - ipConfigurations: VirtualMachineScaleSetIPConfiguration[]; - - @doc("Whether IP forwarding enabled on this NIC.") - enableIPForwarding?: boolean; - - @doc("Specify what happens to the network interface when the VM is deleted") - deleteOption?: DeleteOptions; -} - -@doc("Describes a virtual machines scale sets network configuration's DNS settings.") -model VirtualMachineScaleSetNetworkConfigurationDnsSettings { - @doc("List of DNS servers IP addresses") - dnsServers?: string[]; -} - -@doc("Describes a virtual machine scale set network profile's IP configuration.") -model VirtualMachineScaleSetIPConfiguration { - ...SubResource; - - @doc("The IP configuration name.") - name: string; - - @doc(""" -Describes a virtual machine scale set network profile's IP configuration -properties. -""") - properties?: VirtualMachineScaleSetIPConfigurationProperties; -} - -@doc(""" -Describes a virtual machine scale set network profile's IP configuration -properties. -""") -model VirtualMachineScaleSetIPConfigurationProperties { - @doc("Specifies the identifier of the subnet.") - subnet?: ApiEntityReference; - - @doc(""" -Specifies the primary network interface in case the virtual machine has more -than 1 network interface. -""") - primary?: boolean; - - @doc("The publicIPAddressConfiguration.") - publicIPAddressConfiguration?: VirtualMachineScaleSetPublicIPAddressConfiguration; - - @doc(""" -Available from Api-Version 2017-03-30 onwards, it represents whether the -specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible -values are: 'IPv4' and 'IPv6'. -""") - privateIPAddressVersion?: IPVersion; - - @doc(""" -Specifies an array of references to backend address pools of application -gateways. A scale set can reference backend address pools of multiple -application gateways. Multiple scale sets cannot use the same application -gateway. -""") - applicationGatewayBackendAddressPools?: SubResource[]; - - @doc("Specifies an array of references to application security group.") - applicationSecurityGroups?: SubResource[]; - - @doc(""" -Specifies an array of references to backend address pools of load balancers. A -scale set can reference backend address pools of one public and one internal -load balancer. Multiple scale sets cannot use the same basic sku load balancer. -""") - loadBalancerBackendAddressPools?: SubResource[]; - - @doc(""" -Specifies an array of references to inbound Nat pools of the load balancers. A -scale set can reference inbound nat pools of one public and one internal load -balancer. Multiple scale sets cannot use the same basic sku load balancer. -""") - loadBalancerInboundNatPools?: SubResource[]; -} - -@doc(""" -Describes a virtual machines scale set IP Configuration's PublicIPAddress -configuration -""") -model VirtualMachineScaleSetPublicIPAddressConfiguration { - @doc("The publicIP address configuration name.") - name: string; - - @doc(""" -Describes a virtual machines scale set IP Configuration's PublicIPAddress -configuration -""") - properties?: VirtualMachineScaleSetPublicIPAddressConfigurationProperties; - - @doc(""" -Describes the public IP Sku. It can only be set with OrchestrationMode as -Flexible. -""") - sku?: PublicIPAddressSku; -} - -@doc(""" -Describes a virtual machines scale set IP Configuration's PublicIPAddress -configuration -""") -model VirtualMachineScaleSetPublicIPAddressConfigurationProperties { - @doc("The idle timeout of the public IP address.") - idleTimeoutInMinutes?: int32; - - @doc("The dns settings to be applied on the publicIP addresses .") - dnsSettings?: VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; - - @doc("The list of IP tags associated with the public IP address.") - ipTags?: VirtualMachineScaleSetIpTag[]; - - @doc("The PublicIPPrefix from which to allocate publicIP addresses.") - publicIPPrefix?: SubResource; - - @doc(""" -Available from Api-Version 2019-07-01 onwards, it represents whether the -specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible -values are: 'IPv4' and 'IPv6'. -""") - publicIPAddressVersion?: IPVersion; - - @doc("Specify what happens to the public IP when the VM is deleted") - deleteOption?: DeleteOptions; -} - -@doc("Describes a virtual machines scale sets network configuration's DNS settings.") -model VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings { - @doc(""" -The Domain name label.The concatenation of the domain name label and vm index -will be the domain name labels of the PublicIPAddress resources that will be -created -""") - domainNameLabel: string; -} - -@doc("Contains the IP tag associated with the public IP address.") -model VirtualMachineScaleSetIpTag { - @doc("IP tag type. Example: FirstPartyUsage.") - ipTagType?: string; - - @doc("IP tag associated with the public IP. Example: SQL, Storage etc.") - tag?: string; -} - -@doc(""" -Describes the public IP Sku. It can only be set with OrchestrationMode as -Flexible. -""") -model PublicIPAddressSku { - @doc("Specify public IP sku name") - name?: PublicIPAddressSkuName; - - @doc("Specify public IP sku tier") - tier?: PublicIPAddressSkuTier; -} - -@doc(""" -Specifies the Security profile settings for the virtual machine or virtual -machine scale set. -""") -model SecurityProfile { - @doc(""" -Specifies the security settings like secure boot and vTPM used while creating -the virtual machine.

Minimum api-version: 2020-12-01 -""") - uefiSettings?: UefiSettings; - - @doc(""" -This property can be used by user in the request to enable or disable the Host -Encryption for the virtual machine or virtual machine scale set. This will -enable the encryption for all the disks including Resource/Temp disk at host -itself.

Default: The Encryption at host will be disabled unless this -property is set to true for the resource. -""") - encryptionAtHost?: boolean; - - @doc(""" -Specifies the SecurityType of the virtual machine. It has to be set to any -specified value to enable UefiSettings.

Default: UefiSettings will not -be enabled unless this property is set. -""") - securityType?: SecurityTypes; -} - -@doc(""" -Specifies the security settings like secure boot and vTPM used while creating -the virtual machine.

Minimum api-version: 2020-12-01 -""") -model UefiSettings { - @doc(""" -Specifies whether secure boot should be enabled on the virtual machine. -

Minimum api-version: 2020-12-01 -""") - secureBootEnabled?: boolean; - - @doc(""" -Specifies whether vTPM should be enabled on the virtual machine. -

Minimum api-version: 2020-12-01 -""") - vTpmEnabled?: boolean; -} - -@doc(""" -Specifies the boot diagnostic settings state.

Minimum api-version: -2015-06-15. -""") -model DiagnosticsProfile { - @doc(""" -Boot Diagnostics is a debugging feature which allows you to view Console Output -and Screenshot to diagnose VM status.
**NOTE**: If storageUri is being -specified then ensure that the storage account is in the same region and -subscription as the VM.

You can easily view the output of your console -log.

Azure also enables you to see a screenshot of the VM from the -hypervisor. -""") - bootDiagnostics?: BootDiagnostics; -} - -@doc(""" -Boot Diagnostics is a debugging feature which allows you to view Console Output -and Screenshot to diagnose VM status.

You can easily view the output -of your console log.

Azure also enables you to see a screenshot of the -VM from the hypervisor. -""") -model BootDiagnostics { - @doc("Whether boot diagnostics should be enabled on the Virtual Machine.") - enabled?: boolean; - - @doc(""" -Uri of the storage account to use for placing the console output and -screenshot.

If storageUri is not specified while enabling boot -diagnostics, managed storage will be used. -""") - storageUri?: string; -} - -@doc("Describes a virtual machine scale set extension profile.") -model VirtualMachineScaleSetExtensionProfile { - @doc("The virtual machine scale set child extension resources.") - extensions?: VirtualMachineScaleSetExtension[]; - - @doc(""" -Specifies the time alloted for all extensions to start. The time duration -should be between 15 minutes and 120 minutes (inclusive) and should be -specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). -

Minimum api-version: 2020-06-01 -""") - extensionsTimeBudget?: string; -} - -@doc("Describes a Virtual Machine Scale Set Extension.") -model VirtualMachineScaleSetExtension { - ...SubResourceReadOnly; - - @doc("The name of the extension.") - name?: string; - - @doc("Resource type") - @visibility("read") - type?: string; - - @doc("Describes the properties of a Virtual Machine Scale Set Extension.") - properties?: VirtualMachineScaleSetExtensionProperties; -} - -@doc("Describes the properties of a Virtual Machine Scale Set Extension.") -model VirtualMachineScaleSetExtensionProperties { - @doc(""" -If a value is provided and is different from the previous value, the extension -handler will be forced to update even if the extension configuration has not -changed. -""") - forceUpdateTag?: string; - - @doc("The name of the extension handler publisher.") - publisher?: string; - - @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") - type?: string; - - @doc("Specifies the version of the script handler.") - typeHandlerVersion?: string; - - @doc(""" -Indicates whether the extension should use a newer minor version if one is -available at deployment time. Once deployed, however, the extension will not -upgrade minor versions unless redeployed, even with this property set to true. -""") - autoUpgradeMinorVersion?: boolean; - - @doc(""" -Indicates whether the extension should be automatically upgraded by the -platform if there is a newer version of the extension available. -""") - enableAutomaticUpgrade?: boolean; - - @doc("Json formatted public settings for the extension.") - settings?: unknown; - - @doc(""" -The extension can contain either protectedSettings or -protectedSettingsFromKeyVault or no protected settings at all. -""") - protectedSettings?: unknown; - - @doc("The provisioning state, which only appears in the response.") - @visibility("read") - provisioningState?: string; - - @doc(""" -Collection of extension names after which this extension needs to be -provisioned. -""") - provisionAfterExtensions?: string[]; - - @doc(""" -Indicates whether failures stemming from the extension will be suppressed -(Operational failures such as not connecting to the VM will not be suppressed -regardless of this value). The default is false. -""") - suppressFailures?: boolean; - - @doc(""" -The extensions protected settings that are passed by reference, and consumed -from key vault -""") - protectedSettingsFromKeyVault?: KeyVaultSecretReference; -} - -@doc("Describes a reference to Key Vault Secret") -model KeyVaultSecretReference { - @doc("The URL referencing a secret in a Key Vault.") - secretUrl: string; - - @doc("The relative URL of the Key Vault containing the secret.") - sourceVault: SubResource; -} - -model SubResourceReadOnly { - @doc("Resource Id") - @visibility("read") - id?: string; -} - -@doc(""" -Specifies the billing related details of a Azure Spot VM or VMSS. -

Minimum api-version: 2019-03-01. -""") -model BillingProfile { - @doc(""" -Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. -This price is in US Dollars.

This price will be compared with the -current Azure Spot price for the VM size. Also, the prices are compared at the -time of create/update of Azure Spot VM/VMSS and the operation will only succeed -if the maxPrice is greater than the current Azure Spot price.

The -maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current -Azure Spot price goes beyond the maxPrice after creation of VM/VMSS.

-Possible values are:

- Any decimal value greater than zero. Example: -0.01538

-1 – indicates default price to be up-to on-demand.

-You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should -not be evicted for price reasons. Also, the default max price is -1 if it is -not provided by you.

Minimum api-version: 2019-03-01. -""") - maxPrice?: float32; -} - -model ScheduledEventsProfile { - @doc("Specifies Terminate Scheduled Event related configurations.") - terminateNotificationProfile?: TerminateNotificationProfile; -} - -model TerminateNotificationProfile { - @doc(""" -Configurable length of time a Virtual Machine being deleted will have to -potentially approve the Terminate Scheduled Event before the event is auto -approved (timed out). The configuration must be specified in ISO 8601 format, -the default value is 5 minutes (PT5M) -""") - notBeforeTimeout?: string; - - @doc("Specifies whether the Terminate Scheduled event is enabled or disabled.") - enable?: boolean; -} - -@doc("The parameters of a capacity reservation Profile.") -model CapacityReservationProfile { - @doc(""" -Specifies the capacity reservation group resource id that should be used for -allocating the virtual machine or scaleset vm instances provided enough -capacity has been reserved. Please refer to https://aka.ms/CapacityReservation -for more details. -""") - capacityReservationGroup?: SubResource; -} - -@doc(""" -Contains the list of gallery applications that should be made available to the -VM/VMSS -""") -model ApplicationProfile { - @doc("Specifies the gallery applications that should be made available to the VM/VMSS") - galleryApplications?: VMGalleryApplication[]; -} - -@doc(""" -Specifies the required information to reference a compute gallery application -version -""") -model VMGalleryApplication { - @doc("Optional, Specifies a passthrough value for more generic context.") - tags?: string; - - @doc("Optional, Specifies the order in which the packages have to be installed") - order?: int32; - - @doc(""" -Specifies the GalleryApplicationVersion resource id on the form of -/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version} -""") - packageReferenceId: string; - - @doc(""" -Optional, Specifies the uri to an azure blob that will replace the default -configuration for the package if provided -""") - configurationReference?: string; - - @doc(""" -Optional, If true, any failure for any operation in the VmApplication will fail -the deployment -""") - treatFailureAsDeploymentFailure?: boolean; - - @doc(""" -If set to true, when a new Gallery Application version is available in PIR/SIG, -it will be automatically updated for the VM/VMSS -""") - enableAutomaticUpgrade?: boolean; -} - -@doc("Specifies the hardware settings for the virtual machine scale set.") -model VirtualMachineScaleSetHardwareProfile { - @doc(""" -Specifies the properties for customizing the size of the virtual machine. -Minimum api-version: 2021-11-01.

Please follow the instructions in [VM -Customization](https://aka.ms/vmcustomization) for more details. -""") - vmSizeProperties?: VMSizeProperties; -} - -@doc("Specifies VM Size Property settings on the virtual machine.") -model VMSizeProperties { - @doc(""" -Specifies the number of vCPUs available for the VM.

When this property -is not specified in the request body the default behavior is to set it to the -value of vCPUs available for that VM size exposed in api response of [List all -available virtual machine sizes in a -region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list) . -""") - vCPUsAvailable?: int32; - - @doc(""" -Specifies the vCPU to physical core ratio.

When this property is not -specified in the request body the default behavior is set to the value of -vCPUsPerCore for the VM Size exposed in api response of [List all available -virtual machine sizes in a -region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list) -

Setting this property to 1 also means that hyper-threading is -disabled. -""") - vCPUsPerCore?: int32; -} - -@doc(""" -Enables or disables a capability on the virtual machine or virtual machine -scale set. -""") -model AdditionalCapabilities { - @doc(""" -The flag that enables or disables a capability to have one or more managed data -disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks -with storage account type UltraSSD_LRS can be added to a virtual machine or -virtual machine scale set only if this property is enabled. -""") - ultraSSDEnabled?: boolean; - - @doc("The flag that enables or disables hibernation capability on the VM.") - hibernationEnabled?: boolean; -} - -@doc("Describes a scale-in policy for a virtual machine scale set.") -model ScaleInPolicy { - @doc(""" -The rules to be followed when scaling-in a virtual machine scale set.

-Possible values are:

**Default** When a virtual machine scale set is -scaled in, the scale set will first be balanced across zones if it is a zonal -scale set. Then, it will be balanced across Fault Domains as far as possible. -Within each Fault Domain, the virtual machines chosen for removal will be the -newest ones that are not protected from scale-in.

**OldestVM** When a -virtual machine scale set is being scaled-in, the oldest virtual machines that -are not protected from scale-in will be chosen for removal. For zonal virtual -machine scale sets, the scale set will first be balanced across zones. Within -each zone, the oldest virtual machines that are not protected will be chosen -for removal.

**NewestVM** When a virtual machine scale set is being -scaled-in, the newest virtual machines that are not protected from scale-in -will be chosen for removal. For zonal virtual machine scale sets, the scale set -will first be balanced across zones. Within each zone, the newest virtual -machines that are not protected will be chosen for removal.

-""") - rules?: VirtualMachineScaleSetScaleInRules[]; - - @doc(""" -This property allows you to specify if virtual machines chosen for removal have -to be force deleted when a virtual machine scale set is being -scaled-in.(Feature in Preview) -""") - forceDeletion?: boolean; -} - -@doc(""" -Specifies the Spot-Try-Restore properties for the virtual machine scale set. -

With this property customer can enable or disable automatic restore of -the evicted Spot VMSS VM instances opportunistically based on capacity -availability and pricing constraint. -""") -model SpotRestorePolicy { - @doc(""" -Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be -tried to be restored opportunistically based on capacity availability and -pricing constraints -""") - enabled?: boolean; - - @doc(""" -Timeout value expressed as an ISO 8601 time duration after which the platform -will not try to restore the VMSS SPOT instances -""") - restoreTimeout?: string; -} - -@doc(""" -Specifies the target splits for Spot and Regular priority VMs within a scale -set with flexible orchestration mode.

With this property the customer -is able to specify the base number of regular priority VMs created as the VMSS -flex instance scales out and the split between Spot and Regular priority VMs -after this base target has been reached. -""") -model PriorityMixPolicy { - @doc(""" -The base number of regular priority VMs that will be created in this scale set -as it scales out. -""") - baseRegularPriorityCount?: int32; - - @doc(""" -The percentage of VM instances, after the base regular priority count has been -reached, that are expected to use regular priority. -""") - regularPriorityPercentageAboveBase?: int32; -} - -@doc("Identity for the virtual machine scale set.") -model VirtualMachineScaleSetIdentity { - @doc(""" -The principal id of virtual machine scale set identity. This property will only -be provided for a system assigned identity. -""") - @visibility("read") - principalId?: string; - - @doc(""" -The tenant id associated with the virtual machine scale set. This property will -only be provided for a system assigned identity. -""") - @visibility("read") - tenantId?: string; - - @doc(""" -The type of identity used for the virtual machine scale set. The type -'SystemAssigned, UserAssigned' includes both an implicitly created identity and -a set of user assigned identities. The type 'None' will remove any identities -from the virtual machine scale set. -""") - type?: ResourceIdentityType; - - @doc(""" -The list of user identities associated with the virtual machine scale set. The -user identity dictionary key references will be ARM resource ids in the form: -'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. -""") - userAssignedIdentities?: Record; -} - -model UserAssignedIdentitiesValue { - @doc("The principal id of user assigned identity.") - @visibility("read") - principalId?: string; - - @doc("The client id of user assigned identity.") - @visibility("read") - clientId?: string; -} - -@doc("The complex type of the extended location.") -model ExtendedLocation { - @doc("The name of the extended location.") - name?: string; - - @doc("The type of the extended location.") - type?: ExtendedLocationTypes; -} - -@doc("The Resource model definition.") -model Resource { - @doc("Resource Id") - @visibility("read") - id?: string; - - @doc("Resource name") - @visibility("read") - name?: string; - - @doc("Resource type") - @visibility("read") - type?: string; - - @doc("Resource location") - location: string; - - @doc("Resource tags") - tags?: Record; -} - -@doc("Describes a Virtual Machine Scale Set.") -model VirtualMachineScaleSetUpdate { - ...UpdateResource; - - @doc("The virtual machine scale set sku.") - sku?: Sku; - - @doc(""" -The purchase plan when deploying a virtual machine scale set from VM -Marketplace images. -""") - plan?: Plan; - - @doc("Describes the properties of a Virtual Machine Scale Set.") - properties?: VirtualMachineScaleSetUpdateProperties; - - @doc("The identity of the virtual machine scale set, if configured.") - identity?: VirtualMachineScaleSetIdentity; -} - -@doc("Describes the properties of a Virtual Machine Scale Set.") -model VirtualMachineScaleSetUpdateProperties { - @doc("The upgrade policy.") - upgradePolicy?: UpgradePolicy; - - @doc("Policy for automatic repairs.") - automaticRepairsPolicy?: AutomaticRepairsPolicy; - - @doc("The virtual machine profile.") - virtualMachineProfile?: VirtualMachineScaleSetUpdateVMProfile; - - @doc("Specifies whether the Virtual Machine Scale Set should be overprovisioned.") - overprovision?: boolean; - - @doc(""" -When Overprovision is enabled, extensions are launched only on the requested -number of VMs which are finally kept. This property will hence ensure that the -extensions do not run on the extra overprovisioned VMs. -""") - doNotRunExtensionsOnOverprovisionedVMs?: boolean; - - @doc(""" -When true this limits the scale set to a single placement group, of max size -100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified -to false. However, if singlePlacementGroup is false, it may not be modified to -true. -""") - singlePlacementGroup?: boolean; - - @doc(""" -Specifies additional capabilities enabled or disabled on the Virtual Machines -in the Virtual Machine Scale Set. For instance: whether the Virtual Machines -have the capability to support attaching managed data disks with UltraSSD_LRS -storage account type. -""") - additionalCapabilities?: AdditionalCapabilities; - - @doc(""" -Specifies the policies applied when scaling in Virtual Machines in the Virtual -Machine Scale Set. -""") - scaleInPolicy?: ScaleInPolicy; - - @doc(""" -Specifies information about the proximity placement group that the virtual -machine scale set should be assigned to.

Minimum api-version: -2018-04-01. -""") - proximityPlacementGroup?: SubResource; -} - -@doc("Describes a virtual machine scale set virtual machine profile.") -model VirtualMachineScaleSetUpdateVMProfile { - @doc("The virtual machine scale set OS profile.") - osProfile?: VirtualMachineScaleSetUpdateOSProfile; - - @doc("The virtual machine scale set storage profile.") - storageProfile?: VirtualMachineScaleSetUpdateStorageProfile; - - @doc("The virtual machine scale set network profile.") - networkProfile?: VirtualMachineScaleSetUpdateNetworkProfile; - - @doc("The virtual machine scale set Security profile") - securityProfile?: SecurityProfile; - - @doc("The virtual machine scale set diagnostics profile.") - diagnosticsProfile?: DiagnosticsProfile; - - @doc("The virtual machine scale set extension profile.") - extensionProfile?: VirtualMachineScaleSetExtensionProfile; - - @doc("The license type, which is for bring your own license scenario.") - licenseType?: string; - - @doc(""" -Specifies the billing related details of a Azure Spot VMSS.

Minimum -api-version: 2019-03-01. -""") - billingProfile?: BillingProfile; - - @doc("Specifies Scheduled Event related configurations.") - scheduledEventsProfile?: ScheduledEventsProfile; - - @doc(""" -UserData for the VM, which must be base-64 encoded. Customer should not pass -any secrets in here.

Minimum api-version: 2021-03-01 -""") - userData?: string; - - @doc(""" -Specifies the hardware profile related details of a scale set.

Minimum -api-version: 2021-11-01. -""") - hardwareProfile?: VirtualMachineScaleSetHardwareProfile; -} - -@doc("Describes a virtual machine scale set OS profile.") -model VirtualMachineScaleSetUpdateOSProfile { - @doc("A base-64 encoded string of custom data.") - customData?: string; - - @doc("The Windows Configuration of the OS profile.") - windowsConfiguration?: WindowsConfiguration; - - @doc("The Linux Configuration of the OS profile.") - linuxConfiguration?: LinuxConfiguration; - - @doc("The List of certificates for addition to the VM.") - secrets?: VaultSecretGroup[]; -} - -@doc("Describes a virtual machine scale set storage profile.") -model VirtualMachineScaleSetUpdateStorageProfile { - @doc("The image reference.") - imageReference?: ImageReference; - - @doc("The OS disk.") - osDisk?: VirtualMachineScaleSetUpdateOSDisk; - - @doc("The data disks.") - dataDisks?: VirtualMachineScaleSetDataDisk[]; - - diskControllerType?: string; -} - -@doc(""" -Describes virtual machine scale set operating system disk Update Object. This -should be used for Updating VMSS OS Disk. -""") -model VirtualMachineScaleSetUpdateOSDisk { - @doc("The caching type.") - caching?: CachingTypes; - - @doc("Specifies whether writeAccelerator should be enabled or disabled on the disk.") - writeAcceleratorEnabled?: boolean; - - @doc(""" -Specifies the size of an empty data disk in gigabytes. This element can be used -to overwrite the size of the disk in a virtual machine image.

-diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be -larger than 1023 -""") - diskSizeGB?: int32; - - @doc(""" -The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied -before using it to attach to the Virtual Machine. If SourceImage is provided, -the destination VirtualHardDisk should not exist. -""") - image?: VirtualHardDisk; - - @doc("The list of virtual hard disk container uris.") - vhdContainers?: string[]; - - @doc("The managed disk parameters.") - managedDisk?: VirtualMachineScaleSetManagedDiskParameters; - - @doc(""" -Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion -(This feature is available for VMSS with Flexible OrchestrationMode only). -

Possible values:

**Delete** If this value is used, the OS -disk is deleted when VMSS Flex VM is deleted.

**Detach** If this value -is used, the OS disk is retained after VMSS Flex VM is deleted.

The -default value is set to **Delete**. For an Ephemeral OS Disk, the default value -is set to **Delete**. User cannot change the delete option for Ephemeral OS -Disk. -""") - deleteOption?: DiskDeleteOptionTypes; -} - -@doc("Describes a virtual machine scale set network profile.") -model VirtualMachineScaleSetUpdateNetworkProfile { - @doc(""" -A reference to a load balancer probe used to determine the health of an -instance in the virtual machine scale set. The reference will be in the form: -'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. -""") - healthProbe?: ApiEntityReference; - - @doc("The list of network configurations.") - networkInterfaceConfigurations?: VirtualMachineScaleSetUpdateNetworkConfiguration[]; - - @doc(""" -specifies the Microsoft.Network API version used when creating networking -resources in the Network Interface Configurations for Virtual Machine Scale Set -with orchestration mode 'Flexible' -""") - networkApiVersion?: NetworkApiVersion; -} - -@doc("Describes a virtual machine scale set network profile's network configurations.") -model VirtualMachineScaleSetUpdateNetworkConfiguration { - ...SubResource; - - @doc("The network configuration name.") - name?: string; - - @doc(""" -Describes a virtual machine scale set updatable network profile's IP -configuration.Use this object for updating network profile's IP Configuration. -""") - properties?: VirtualMachineScaleSetUpdateNetworkConfigurationProperties; -} - -@doc(""" -Describes a virtual machine scale set updatable network profile's IP -configuration.Use this object for updating network profile's IP Configuration. -""") -model VirtualMachineScaleSetUpdateNetworkConfigurationProperties { - @doc("Whether this is a primary NIC on a virtual machine.") - primary?: boolean; - - @doc("Specifies whether the network interface is accelerated networking-enabled.") - enableAcceleratedNetworking?: boolean; - - @doc("Specifies whether the network interface is disabled for tcp state tracking.") - disableTcpStateTracking?: boolean; - - @doc("Specifies whether the network interface is FPGA networking-enabled.") - enableFpga?: boolean; - - @doc("The network security group.") - networkSecurityGroup?: SubResource; - - @doc("The dns settings to be applied on the network interfaces.") - dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; - - @doc("The virtual machine scale set IP Configuration.") - ipConfigurations?: VirtualMachineScaleSetUpdateIPConfiguration[]; - - @doc("Whether IP forwarding enabled on this NIC.") - enableIPForwarding?: boolean; - - @doc("Specify what happens to the network interface when the VM is deleted") - deleteOption?: DeleteOptions; -} - -@doc(""" -Describes a virtual machine scale set network profile's IP configuration. NOTE: -The subnet of a scale set may be modified as long as the original subnet and -the new subnet are in the same virtual network -""") -model VirtualMachineScaleSetUpdateIPConfiguration { - ...SubResource; - - @doc("The IP configuration name.") - name?: string; - - @doc(""" -Describes a virtual machine scale set network profile's IP configuration -properties. -""") - properties?: VirtualMachineScaleSetUpdateIPConfigurationProperties; -} - -@doc(""" -Describes a virtual machine scale set network profile's IP configuration -properties. -""") -model VirtualMachineScaleSetUpdateIPConfigurationProperties { - @doc("The subnet.") - subnet?: ApiEntityReference; - - @doc(""" -Specifies the primary IP Configuration in case the network interface has more -than one IP Configuration. -""") - primary?: boolean; - - @doc("The publicIPAddressConfiguration.") - publicIPAddressConfiguration?: VirtualMachineScaleSetUpdatePublicIPAddressConfiguration; - - @doc(""" -Available from Api-Version 2017-03-30 onwards, it represents whether the -specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible -values are: 'IPv4' and 'IPv6'. -""") - privateIPAddressVersion?: IPVersion; - - @doc("The application gateway backend address pools.") - applicationGatewayBackendAddressPools?: SubResource[]; - - @doc("Specifies an array of references to application security group.") - applicationSecurityGroups?: SubResource[]; - - @doc("The load balancer backend address pools.") - loadBalancerBackendAddressPools?: SubResource[]; - - @doc("The load balancer inbound nat pools.") - loadBalancerInboundNatPools?: SubResource[]; -} - -@doc(""" -Describes a virtual machines scale set IP Configuration's PublicIPAddress -configuration -""") -model VirtualMachineScaleSetUpdatePublicIPAddressConfiguration { - @doc("The publicIP address configuration name.") - name?: string; - - @doc(""" -Describes a virtual machines scale set IP Configuration's PublicIPAddress -configuration -""") - properties?: VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties; -} - -@doc(""" -Describes a virtual machines scale set IP Configuration's PublicIPAddress -configuration -""") -model VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties { - @doc("The idle timeout of the public IP address.") - idleTimeoutInMinutes?: int32; - - @doc("The dns settings to be applied on the publicIP addresses .") - dnsSettings?: VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; - - @doc("The PublicIPPrefix from which to allocate publicIP addresses.") - publicIPPrefix?: SubResource; - - @doc("Specify what happens to the public IP when the VM is deleted") - deleteOption?: DeleteOptions; -} - -@doc("The Update Resource model definition.") -model UpdateResource { - @doc("Resource tags") - tags?: Record; -} - -@doc("Specifies a list of virtual machine instance IDs from the VM scale set.") -model VirtualMachineScaleSetVMInstanceIDs { - @doc(""" -The virtual machine scale set instance ids. Omitting the virtual machine scale -set instance ids will result in the operation being performed on all virtual -machines in the virtual machine scale set. -""") - instanceIds?: string[]; -} - -@doc("Specifies a list of virtual machine instance IDs from the VM scale set.") -model VirtualMachineScaleSetVMInstanceRequiredIDs { - @doc("The virtual machine scale set instance ids.") - instanceIds: string[]; -} - -@doc("The instance view of a virtual machine scale set.") -model VirtualMachineScaleSetInstanceView { - @doc("The instance view status summary for the virtual machine scale set.") - @visibility("read") - virtualMachine?: VirtualMachineScaleSetInstanceViewStatusesSummary; - - @doc("The extensions information.") - @visibility("read") - extensions?: VirtualMachineScaleSetVMExtensionsSummary[]; - - @doc("The resource status information.") - statuses?: InstanceViewStatus[]; - - @doc("The orchestration services information.") - @visibility("read") - orchestrationServices?: OrchestrationServiceSummary[]; -} - -@doc(""" -Instance view statuses summary for virtual machines of a virtual machine scale -set. -""") -model VirtualMachineScaleSetInstanceViewStatusesSummary { - @doc("The extensions information.") - @visibility("read") - statusesSummary?: VirtualMachineStatusCodeCount[]; -} - -@doc(""" -The status code and count of the virtual machine scale set instance view status -summary. -""") -model VirtualMachineStatusCodeCount { - @doc("The instance view status code.") - @visibility("read") - code?: string; - - @doc("The number of instances having a particular status code.") - @visibility("read") - count?: int32; -} - -@doc("Extensions summary for virtual machines of a virtual machine scale set.") -model VirtualMachineScaleSetVMExtensionsSummary { - @doc("The extension name.") - @visibility("read") - name?: string; - - @doc("The extensions information.") - @visibility("read") - statusesSummary?: VirtualMachineStatusCodeCount[]; -} - -@doc("Instance view status.") -model InstanceViewStatus { - @doc("The status code.") - code?: string; - - @doc("The level code.") - level?: StatusLevelTypes; - - @doc("The short localizable label for the status.") - displayStatus?: string; - - @doc("The detailed status message, including for alerts and error messages.") - message?: string; - - @doc("The time of the status.") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - time?: utcDateTime; -} - -@doc("Summary for an orchestration service of a virtual machine scale set.") -model OrchestrationServiceSummary { - @doc("The name of the service.") - @visibility("read") - serviceName?: OrchestrationServiceNames; - - @doc("The current state of the service.") - @visibility("read") - serviceState?: OrchestrationServiceState; -} - -@doc("Describes a Virtual Machine Scale Set Extension.") -model VirtualMachineScaleSetExtensionUpdate { - ...SubResourceReadOnly; - - @doc("The name of the extension.") - @visibility("read") - name?: string; - - @doc("Resource type") - @visibility("read") - type?: string; - - @doc("Describes the properties of a Virtual Machine Scale Set Extension.") - properties?: VirtualMachineScaleSetExtensionProperties; -} - -@doc("The List VM scale set extension operation response.") -model VirtualMachineScaleSetExtensionListResult - is Azure.Core.Page; - -@doc("The List Virtual Machine operation response.") -model VirtualMachineScaleSetListWithLinkResult - is Azure.Core.Page; - -@doc("The Virtual Machine Scale Set List Skus operation response.") -model VirtualMachineScaleSetListSkusResult - is Azure.Core.Page; - -@doc("Describes an available virtual machine scale set sku.") -model VirtualMachineScaleSetSku { - @doc("The type of resource the sku applies to.") - @visibility("read") - resourceType?: string; - - @doc("The Sku.") - @visibility("read") - sku?: Sku; - - @doc("Specifies the number of virtual machines in the scale set.") - @visibility("read") - capacity?: VirtualMachineScaleSetSkuCapacity; -} - -@doc("Describes scaling information of a sku.") -model VirtualMachineScaleSetSkuCapacity { - @doc("The minimum capacity.") - @visibility("read") - minimum?: int32; - - @doc("The maximum capacity that can be set.") - @visibility("read") - maximum?: int32; - - @doc("The default capacity.") - @visibility("read") - defaultCapacity?: int32; - - @doc("The scale type applicable to the sku.") - @visibility("read") - scaleType?: VirtualMachineScaleSetSkuScaleType; -} - -@doc("List of Virtual Machine Scale Set OS Upgrade History operation response.") -model VirtualMachineScaleSetListOSUpgradeHistory - is Azure.Core.Page; - -@doc("Virtual Machine Scale Set OS Upgrade History operation response.") -model UpgradeOperationHistoricalStatusInfo { - @doc("Information about the properties of the upgrade operation.") - @visibility("read") - properties?: UpgradeOperationHistoricalStatusInfoProperties; - - @doc("Resource type") - @visibility("read") - type?: string; - - @doc("Resource location") - @visibility("read") - location?: string; -} - -@doc("Describes each OS upgrade on the Virtual Machine Scale Set.") -model UpgradeOperationHistoricalStatusInfoProperties { - @doc("Information about the overall status of the upgrade operation.") - @visibility("read") - runningStatus?: UpgradeOperationHistoryStatus; - - @doc("Counts of the VMs in each state.") - @visibility("read") - progress?: RollingUpgradeProgressInfo; - - @doc("Error Details for this upgrade if there are any.") - @visibility("read") - error?: ApiError; - - @doc("Invoker of the Upgrade Operation") - @visibility("read") - startedBy?: UpgradeOperationInvoker; - - @doc("Image Reference details") - @visibility("read") - targetImageReference?: ImageReference; - - @doc("Information about OS rollback if performed") - @visibility("read") - rollbackInfo?: RollbackStatusInfo; -} - -@doc("Information about the current running state of the overall upgrade.") -model UpgradeOperationHistoryStatus { - @doc("Code indicating the current status of the upgrade.") - @visibility("read") - code?: UpgradeState; - - @doc("Start time of the upgrade.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - startTime?: utcDateTime; - - @doc("End time of the upgrade.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - endTime?: utcDateTime; -} - -@doc("Information about the number of virtual machine instances in each upgrade state.") -model RollingUpgradeProgressInfo { - @doc("The number of instances that have been successfully upgraded.") - @visibility("read") - successfulInstanceCount?: int32; - - @doc("The number of instances that have failed to be upgraded successfully.") - @visibility("read") - failedInstanceCount?: int32; - - @doc("The number of instances that are currently being upgraded.") - @visibility("read") - inProgressInstanceCount?: int32; - - @doc("The number of instances that have not yet begun to be upgraded.") - @visibility("read") - pendingInstanceCount?: int32; -} - -@doc("Information about rollback on failed VM instances after a OS Upgrade operation.") -model RollbackStatusInfo { - @doc("The number of instances which have been successfully rolled back.") - @visibility("read") - successfullyRolledbackInstanceCount?: int32; - - @doc("The number of instances which failed to rollback.") - @visibility("read") - failedRolledbackInstanceCount?: int32; - - @doc("Error details if OS rollback failed.") - @visibility("read") - rollbackError?: ApiError; -} - -@doc("Describes a Virtual Machine Scale Set VM Reimage Parameters.") -model VirtualMachineScaleSetReimageParameters { - ...VirtualMachineScaleSetVMReimageParameters; - - @doc(""" -The virtual machine scale set instance ids. Omitting the virtual machine scale -set instance ids will result in the operation being performed on all virtual -machines in the virtual machine scale set. -""") - instanceIds?: string[]; -} - -@doc("Describes a Virtual Machine Scale Set VM Reimage Parameters.") -model VirtualMachineScaleSetVMReimageParameters { - ...VirtualMachineReimageParameters; -} - -@doc(""" -Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk will -always be reimaged -""") -model VirtualMachineReimageParameters { - @doc(""" -Specifies whether to reimage temp disk. Default value: false. Note: This temp -disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. -""") - tempDisk?: boolean; -} - -@doc("The status of the latest virtual machine scale set rolling upgrade.") -model RollingUpgradeStatusInfo { - ...Resource; - - @doc("The status of the latest virtual machine scale set rolling upgrade.") - properties?: RollingUpgradeStatusInfoProperties; -} - -@doc("The status of the latest virtual machine scale set rolling upgrade.") -model RollingUpgradeStatusInfoProperties { - @doc("The rolling upgrade policies applied for this upgrade.") - @visibility("read") - policy?: RollingUpgradePolicy; - - @doc("Information about the current running state of the overall upgrade.") - @visibility("read") - runningStatus?: RollingUpgradeRunningStatus; - - @doc("Information about the number of virtual machine instances in each upgrade state.") - @visibility("read") - progress?: RollingUpgradeProgressInfo; - - @doc("Error details for this upgrade, if there are any.") - @visibility("read") - error?: ApiError; -} - -@doc("Information about the current running state of the overall upgrade.") -model RollingUpgradeRunningStatus { - @doc("Code indicating the current status of the upgrade.") - @visibility("read") - code?: RollingUpgradeStatusCode; - - @doc("Start time of the upgrade.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - startTime?: utcDateTime; - - @doc("The last action performed on the rolling upgrade.") - @visibility("read") - lastAction?: RollingUpgradeActionType; - - @doc("Last action time of the upgrade.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - lastActionTime?: utcDateTime; -} - -@doc("Response after calling a manual recovery walk") -model RecoveryWalkResponse { - @doc("Whether the recovery walk was performed") - @visibility("read") - walkPerformed?: boolean; - - @doc(""" -The next update domain that needs to be walked. Null means walk spanning all -update domains has been completed -""") - @visibility("read") - nextPlatformUpdateDomain?: int32; -} - -model VMScaleSetConvertToSinglePlacementGroupInput { - @doc(""" -Id of the placement group in which you want future virtual machine instances to -be placed. To query placement group Id, please use Virtual Machine Scale Set -VMs - Get API. If not provided, the platform will choose one with maximum -number of virtual machine instances. -""") - activePlacementGroupId?: string; -} - -@doc("The input for OrchestrationServiceState") -model OrchestrationServiceStateInput { - @doc("The name of the service.") - serviceName: OrchestrationServiceNames; - - @doc("The action to be performed.") - action: OrchestrationServiceStateAction; -} - -@doc("Describes a VMSS VM Extension.") -model VirtualMachineScaleSetVMExtension { - ...SubResourceReadOnly; - - @doc("The name of the extension.") - @visibility("read") - name?: string; - - @doc("Resource type") - @visibility("read") - type?: string; - - @doc("Describes the properties of a Virtual Machine Extension.") - properties?: VirtualMachineExtensionProperties; -} - -@doc("Describes the properties of a Virtual Machine Extension.") -model VirtualMachineExtensionProperties { - @doc(""" -How the extension handler should be forced to update even if the extension -configuration has not changed. -""") - forceUpdateTag?: string; - - @doc("The name of the extension handler publisher.") - publisher?: string; - - @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") - type?: string; - - @doc("Specifies the version of the script handler.") - typeHandlerVersion?: string; - - @doc(""" -Indicates whether the extension should use a newer minor version if one is -available at deployment time. Once deployed, however, the extension will not -upgrade minor versions unless redeployed, even with this property set to true. -""") - autoUpgradeMinorVersion?: boolean; - - @doc(""" -Indicates whether the extension should be automatically upgraded by the -platform if there is a newer version of the extension available. -""") - enableAutomaticUpgrade?: boolean; - - @doc("Json formatted public settings for the extension.") - settings?: unknown; - - @doc(""" -The extension can contain either protectedSettings or -protectedSettingsFromKeyVault or no protected settings at all. -""") - protectedSettings?: unknown; - - @doc("The provisioning state, which only appears in the response.") - @visibility("read") - provisioningState?: string; - - @doc("The virtual machine extension instance view.") - instanceView?: VirtualMachineExtensionInstanceView; - - @doc(""" -Indicates whether failures stemming from the extension will be suppressed -(Operational failures such as not connecting to the VM will not be suppressed -regardless of this value). The default is false. -""") - suppressFailures?: boolean; - - @doc(""" -The extensions protected settings that are passed by reference, and consumed -from key vault -""") - protectedSettingsFromKeyVault?: KeyVaultSecretReference; -} - -@doc("The instance view of a virtual machine extension.") -model VirtualMachineExtensionInstanceView { - @doc("The virtual machine extension name.") - name?: string; - - @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") - type?: string; - - @doc("Specifies the version of the script handler.") - typeHandlerVersion?: string; - - @doc("The resource status information.") - substatuses?: InstanceViewStatus[]; - - @doc("The resource status information.") - statuses?: InstanceViewStatus[]; -} - -@doc("Describes a VMSS VM Extension.") -model VirtualMachineScaleSetVMExtensionUpdate { - ...SubResourceReadOnly; - - @doc("The name of the extension.") - @visibility("read") - name?: string; - - @doc("Resource type") - @visibility("read") - type?: string; - - @doc("Describes the properties of a Virtual Machine Extension.") - properties?: VirtualMachineExtensionUpdateProperties; -} - -@doc("Describes the properties of a Virtual Machine Extension.") -model VirtualMachineExtensionUpdateProperties { - @doc(""" -How the extension handler should be forced to update even if the extension -configuration has not changed. -""") - forceUpdateTag?: string; - - @doc("The name of the extension handler publisher.") - publisher?: string; - - @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") - type?: string; - - @doc("Specifies the version of the script handler.") - typeHandlerVersion?: string; - - @doc(""" -Indicates whether the extension should use a newer minor version if one is -available at deployment time. Once deployed, however, the extension will not -upgrade minor versions unless redeployed, even with this property set to true. -""") - autoUpgradeMinorVersion?: boolean; - - @doc(""" -Indicates whether the extension should be automatically upgraded by the -platform if there is a newer version of the extension available. -""") - enableAutomaticUpgrade?: boolean; - - @doc("Json formatted public settings for the extension.") - settings?: unknown; - - @doc(""" -The extension can contain either protectedSettings or -protectedSettingsFromKeyVault or no protected settings at all. -""") - protectedSettings?: unknown; - - @doc(""" -Indicates whether failures stemming from the extension will be suppressed -(Operational failures such as not connecting to the VM will not be suppressed -regardless of this value). The default is false. -""") - suppressFailures?: boolean; - - @doc(""" -The extensions protected settings that are passed by reference, and consumed -from key vault -""") - protectedSettingsFromKeyVault?: KeyVaultSecretReference; -} - -@doc("The List VMSS VM Extension operation response") -model VirtualMachineScaleSetVMExtensionsListResult { - @doc("The list of VMSS VM extensions") - value?: VirtualMachineScaleSetVMExtension[]; -} - -@doc("Describes a virtual machine scale set virtual machine.") -model VirtualMachineScaleSetVM { - ...Resource; - - @doc("The virtual machine instance ID.") - @visibility("read") - instanceId?: string; - - @doc("The virtual machine SKU.") - @visibility("read") - sku?: Sku; - - @doc("Describes the properties of a virtual machine scale set virtual machine.") - properties?: VirtualMachineScaleSetVMProperties; - - @doc(""" -Specifies information about the marketplace image used to create the virtual -machine. This element is only used for marketplace images. Before you can use a -marketplace image from an API, you must enable the image for programmatic use. -In the Azure portal, find the marketplace image that you want to use and then -click **Want to deploy programmatically, Get Started ->**. Enter any required -information and then click **Save**. -""") - plan?: Plan; - - @doc("The virtual machine child extension resources.") - @visibility("read") - resources?: VirtualMachineExtension[]; - - @doc("The virtual machine zones.") - @visibility("read") - zones?: string[]; - - @doc("The identity of the virtual machine, if configured.") - identity?: VirtualMachineIdentity; -} - -@doc("Describes the properties of a virtual machine scale set virtual machine.") -model VirtualMachineScaleSetVMProperties { - @doc("Specifies whether the latest model has been applied to the virtual machine.") - @visibility("read") - latestModelApplied?: boolean; - - @doc("Azure VM unique ID.") - @visibility("read") - vmId?: string; - - @doc("The virtual machine instance view.") - @visibility("read") - instanceView?: VirtualMachineScaleSetVMInstanceView; - - @doc("Specifies the hardware settings for the virtual machine.") - hardwareProfile?: HardwareProfile; - - @doc("Specifies the storage settings for the virtual machine disks.") - storageProfile?: StorageProfile; - - @doc(""" -Specifies additional capabilities enabled or disabled on the virtual machine in -the scale set. For instance: whether the virtual machine has the capability to -support attaching managed data disks with UltraSSD_LRS storage account type. -""") - additionalCapabilities?: AdditionalCapabilities; - - @doc("Specifies the operating system settings for the virtual machine.") - osProfile?: OSProfile; - - @doc("Specifies the Security related profile settings for the virtual machine.") - securityProfile?: SecurityProfile; - - @doc("Specifies the network interfaces of the virtual machine.") - networkProfile?: NetworkProfile; - - @doc("Specifies the network profile configuration of the virtual machine.") - networkProfileConfiguration?: VirtualMachineScaleSetVMNetworkProfileConfiguration; - - @doc(""" -Specifies the boot diagnostic settings state.

Minimum api-version: -2015-06-15. -""") - diagnosticsProfile?: DiagnosticsProfile; - - @doc(""" -Specifies information about the availability set that the virtual machine -should be assigned to. Virtual machines specified in the same availability set -are allocated to different nodes to maximize availability. For more information -about availability sets, see [Availability sets -overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). -

For more information on Azure planned maintenance, see [Maintenance -and updates for Virtual Machines in -Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates) -

Currently, a VM can only be added to availability set at creation -time. An existing VM cannot be added to an availability set. -""") - availabilitySet?: SubResource; - - @doc("The provisioning state, which only appears in the response.") - @visibility("read") - provisioningState?: string; - - @doc(""" -Specifies that the image or disk that is being used was licensed on-premises. -

Possible values for Windows Server operating system are:

-Windows_Client

Windows_Server

Possible values for Linux -Server operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS -(for SUSE)

For more information, see [Azure Hybrid Use Benefit for -Windows -Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) -

[Azure Hybrid Use Benefit for Linux -Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) -

Minimum api-version: 2015-06-15 -""") - licenseType?: string; - - @doc(""" -Specifies whether the model applied to the virtual machine is the model of the -virtual machine scale set or the customized model for the virtual machine. -""") - @visibility("read") - modelDefinitionApplied?: string; - - @doc("Specifies the protection policy of the virtual machine.") - protectionPolicy?: VirtualMachineScaleSetVMProtectionPolicy; - - @doc(""" -UserData for the VM, which must be base-64 encoded. Customer should not pass -any secrets in here.

Minimum api-version: 2021-03-01 -""") - userData?: string; -} - -@doc("The instance view of a virtual machine scale set VM.") -model VirtualMachineScaleSetVMInstanceView { - @doc("The Update Domain count.") - platformUpdateDomain?: int32; - - @doc("The Fault Domain count.") - platformFaultDomain?: int32; - - @doc("The Remote desktop certificate thumbprint.") - rdpThumbPrint?: string; - - @doc("The VM Agent running on the virtual machine.") - vmAgent?: VirtualMachineAgentInstanceView; - - @doc("The Maintenance Operation status on the virtual machine.") - maintenanceRedeployStatus?: MaintenanceRedeployStatus; - - @doc("The disks information.") - disks?: DiskInstanceView[]; - - @doc("The extensions information.") - extensions?: VirtualMachineExtensionInstanceView[]; - - @doc("The health status for the VM.") - @visibility("read") - vmHealth?: VirtualMachineHealthStatus; - - @doc(""" -Boot Diagnostics is a debugging feature which allows you to view Console Output -and Screenshot to diagnose VM status.

You can easily view the output -of your console log.

Azure also enables you to see a screenshot of the -VM from the hypervisor. -""") - bootDiagnostics?: BootDiagnosticsInstanceView; - - @doc("The resource status information.") - statuses?: InstanceViewStatus[]; - - @doc(""" -Resource id of the dedicated host, on which the virtual machine is allocated -through automatic placement, when the virtual machine is associated with a -dedicated host group that has automatic placement enabled.

Minimum -api-version: 2020-06-01. -""") - @visibility("read") - assignedHost?: string; - - @doc(""" -The placement group in which the VM is running. If the VM is deallocated it -will not have a placementGroupId. -""") - placementGroupId?: string; -} - -@doc("The instance view of the VM Agent running on the virtual machine.") -model VirtualMachineAgentInstanceView { - @doc("The VM Agent full version.") - vmAgentVersion?: string; - - @doc("The virtual machine extension handler instance view.") - extensionHandlers?: VirtualMachineExtensionHandlerInstanceView[]; - - @doc("The resource status information.") - statuses?: InstanceViewStatus[]; -} - -@doc("The instance view of a virtual machine extension handler.") -model VirtualMachineExtensionHandlerInstanceView { - @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") - type?: string; - - @doc("Specifies the version of the script handler.") - typeHandlerVersion?: string; - - @doc("The extension handler status.") - status?: InstanceViewStatus; -} - -@doc("Maintenance Operation Status.") -model MaintenanceRedeployStatus { - @doc("True, if customer is allowed to perform Maintenance.") - isCustomerInitiatedMaintenanceAllowed?: boolean; - - @doc("Start Time for the Pre Maintenance Window.") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - preMaintenanceWindowStartTime?: utcDateTime; - - @doc("End Time for the Pre Maintenance Window.") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - preMaintenanceWindowEndTime?: utcDateTime; - - @doc("Start Time for the Maintenance Window.") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - maintenanceWindowStartTime?: utcDateTime; - - @doc("End Time for the Maintenance Window.") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - maintenanceWindowEndTime?: utcDateTime; - - @doc("The Last Maintenance Operation Result Code.") - lastOperationResultCode?: MaintenanceOperationResultCodeTypes; - - @doc("Message returned for the last Maintenance Operation.") - lastOperationMessage?: string; -} - -@doc("The instance view of the disk.") -model DiskInstanceView { - @doc("The disk name.") - name?: string; - - @doc(""" -Specifies the encryption settings for the OS Disk.

Minimum -api-version: 2015-06-15 -""") - encryptionSettings?: DiskEncryptionSettings[]; - - @doc("The resource status information.") - statuses?: InstanceViewStatus[]; -} - -@doc("Describes a Encryption Settings for a Disk") -model DiskEncryptionSettings { - @doc("Specifies the location of the disk encryption key, which is a Key Vault Secret.") - diskEncryptionKey?: KeyVaultSecretReference; - - @doc("Specifies the location of the key encryption key in Key Vault.") - keyEncryptionKey?: KeyVaultKeyReference; - - @doc("Specifies whether disk encryption should be enabled on the virtual machine.") - enabled?: boolean; -} - -@doc("Describes a reference to Key Vault Key") -model KeyVaultKeyReference { - @doc("The URL referencing a key encryption key in Key Vault.") - keyUrl: string; - - @doc("The relative URL of the Key Vault containing the key.") - sourceVault: SubResource; -} - -@doc("The health status of the VM.") -model VirtualMachineHealthStatus { - @doc("The health status information for the VM.") - @visibility("read") - status?: InstanceViewStatus; -} - -@doc("The instance view of a virtual machine boot diagnostics.") -model BootDiagnosticsInstanceView { - @doc(""" -The console screenshot blob URI.

NOTE: This will **not** be set if boot -diagnostics is currently enabled with managed storage. -""") - @visibility("read") - consoleScreenshotBlobUri?: string; - - @doc(""" -The serial console log blob Uri.

NOTE: This will **not** be set if boot -diagnostics is currently enabled with managed storage. -""") - @visibility("read") - serialConsoleLogBlobUri?: string; - - @doc(""" -The boot diagnostics status information for the VM.

NOTE: It will be -set only if there are errors encountered in enabling boot diagnostics. -""") - @visibility("read") - status?: InstanceViewStatus; -} - -@doc("Specifies the hardware settings for the virtual machine.") -model HardwareProfile { - @doc(""" -Specifies the size of the virtual machine.

The enum data type is -currently deprecated and will be removed by December 23rd 2023.

-Recommended way to get the list of available sizes is using these APIs: -

[List all available virtual machine sizes in an availability -set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) -

[List all available virtual machine sizes in a region]( -https://docs.microsoft.com/rest/api/compute/resourceskus/list)

[List -all available virtual machine sizes for -resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). -For more information about virtual machine sizes, see [Sizes for virtual -machines](https://docs.microsoft.com/azure/virtual-machines/sizes).

-The available VM sizes depend on region and availability set. -""") - vmSize?: VirtualMachineSizeTypes; - - @doc(""" -Specifies the properties for customizing the size of the virtual machine. -Minimum api-version: 2021-07-01.

This feature is still in preview mode -and is not supported for VirtualMachineScaleSet.

Please follow the -instructions in [VM Customization](https://aka.ms/vmcustomization) for more -details. -""") - vmSizeProperties?: VMSizeProperties; -} - -@doc("Specifies the storage settings for the virtual machine disks.") -model StorageProfile { - @doc(""" -Specifies information about the image to use. You can specify information about -platform images, marketplace images, or virtual machine images. This element is -required when you want to use a platform image, marketplace image, or virtual -machine image, but is not used in other creation operations. -""") - imageReference?: ImageReference; - - @doc(""" -Specifies information about the operating system disk used by the virtual -machine.

For more information about disks, see [About disks and VHDs -for Azure virtual -machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). -""") - osDisk?: OSDisk; - - @doc(""" -Specifies the parameters that are used to add a data disk to a virtual machine. -

For more information about disks, see [About disks and VHDs for Azure -virtual -machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). -""") - dataDisks?: DataDisk[]; - - @doc(""" -Specifies the disk controller type configured for the VM.

NOTE: This -property will be set to the default disk controller type if not specified -provided virtual machine is being created as a hyperVGeneration: V2 based on -the capabilities of the operating system disk and VM size from the the -specified minimum api version.
You need to deallocate the VM before -updating its disk controller type unless you are updating the VM size in the VM -configuration which implicitly deallocates and reallocates the VM.

-Minimum api-version: 2022-08-01 -""") - diskControllerType?: DiskControllerTypes; -} - -@doc(""" -Specifies information about the operating system disk used by the virtual -machine.

For more information about disks, see [About disks and VHDs -for Azure virtual -machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). -""") -model OSDisk { - @doc(""" -This property allows you to specify the type of the OS that is included in the -disk if creating a VM from user-image or a specialized VHD.

Possible -values are:

**Windows**

**Linux** -""") - osType?: OperatingSystemTypes; - - @doc(""" -Specifies the encryption settings for the OS Disk.

Minimum -api-version: 2015-06-15 -""") - encryptionSettings?: DiskEncryptionSettings; - - @doc("The disk name.") - name?: string; - - @doc("The virtual hard disk.") - vhd?: VirtualHardDisk; - - @doc(""" -The source user image virtual hard disk. The virtual hard disk will be copied -before being attached to the virtual machine. If SourceImage is provided, the -destination virtual hard drive must not exist. -""") - image?: VirtualHardDisk; - - @doc(""" -Specifies the caching requirements.

Possible values are:

-**None**

**ReadOnly**

**ReadWrite**

Default: -**None** for Standard storage. **ReadOnly** for Premium storage. -""") - caching?: CachingTypes; - - @doc("Specifies whether writeAccelerator should be enabled or disabled on the disk.") - writeAcceleratorEnabled?: boolean; - - @doc(""" -Specifies the ephemeral Disk Settings for the operating system disk used by the -virtual machine. -""") - diffDiskSettings?: DiffDiskSettings; - - @doc(""" -Specifies how the virtual machine should be created.

Possible values -are:

**Attach** \\u2013 This value is used when you are using a -specialized disk to create the virtual machine.

**FromImage** \\u2013 -This value is used when you are using an image to create the virtual machine. -If you are using a platform image, you also use the imageReference element -described above. If you are using a marketplace image, you also use the plan -element previously described. -""") - createOption: DiskCreateOptionTypes; - - @doc(""" -Specifies the size of an empty data disk in gigabytes. This element can be used -to overwrite the size of the disk in a virtual machine image.

-diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be -larger than 1023 -""") - diskSizeGB?: int32; - - @doc("The managed disk parameters.") - managedDisk?: ManagedDiskParameters; - - @doc(""" -Specifies whether OS Disk should be deleted or detached upon VM deletion. -

Possible values:

**Delete** If this value is used, the OS -disk is deleted when VM is deleted.

**Detach** If this value is used, -the os disk is retained after VM is deleted.

The default value is set -to **detach**. For an ephemeral OS Disk, the default value is set to -**Delete**. User cannot change the delete option for ephemeral OS Disk. -""") - deleteOption?: DiskDeleteOptionTypes; -} - -@doc("The parameters of a managed disk.") -model ManagedDiskParameters { - ...SubResource; - - @doc(""" -Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can -only be used with data disks, it cannot be used with OS Disk. -""") - storageAccountType?: StorageAccountTypes; - - @doc(""" -Specifies the customer managed disk encryption set resource id for the managed -disk. -""") - diskEncryptionSet?: DiskEncryptionSetParameters; - - @doc("Specifies the security profile for the managed disk.") - securityProfile?: VMDiskSecurityProfile; -} - -@doc("Describes a data disk.") -model DataDisk { - @doc(""" -Specifies the logical unit number of the data disk. This value is used to -identify data disks within the VM and therefore must be unique for each data -disk attached to a VM. -""") - lun: int32; - - @doc("The disk name.") - name?: string; - - @doc("The virtual hard disk.") - vhd?: VirtualHardDisk; - - @doc(""" -The source user image virtual hard disk. The virtual hard disk will be copied -before being attached to the virtual machine. If SourceImage is provided, the -destination virtual hard drive must not exist. -""") - image?: VirtualHardDisk; - - @doc(""" -Specifies the caching requirements.

Possible values are:

-**None**

**ReadOnly**

**ReadWrite**

Default: **None -for Standard storage. ReadOnly for Premium storage** -""") - caching?: CachingTypes; - - @doc("Specifies whether writeAccelerator should be enabled or disabled on the disk.") - writeAcceleratorEnabled?: boolean; - - @doc(""" -Specifies how the virtual machine should be created.

Possible values -are:

**Attach** \\u2013 This value is used when you are using a -specialized disk to create the virtual machine.

**FromImage** \\u2013 -This value is used when you are using an image to create the virtual machine. -If you are using a platform image, you also use the imageReference element -described above. If you are using a marketplace image, you also use the plan -element previously described. -""") - createOption: DiskCreateOptionTypes; - - @doc(""" -Specifies the size of an empty data disk in gigabytes. This element can be used -to overwrite the size of the disk in a virtual machine image.

-diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be -larger than 1023 -""") - diskSizeGB?: int32; - - @doc("The managed disk parameters.") - managedDisk?: ManagedDiskParameters; - - @doc(""" -Specifies whether the data disk is in process of detachment from the -VirtualMachine/VirtualMachineScaleset -""") - toBeDetached?: boolean; - - @doc(""" -Specifies the Read-Write IOPS for the managed disk when StorageAccountType is -UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be -updated only via updates to the VirtualMachine Scale Set. -""") - @visibility("read") - @projectedName("json", "diskIOPSReadWrite") - diskIopsReadWrite?: int32; - - @doc(""" -Specifies the bandwidth in MB per second for the managed disk when -StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet -VM disks. Can be updated only via updates to the VirtualMachine Scale Set. -""") - @visibility("read") - diskMBpsReadWrite?: int32; - - @doc(""" -Specifies the detach behavior to be used while detaching a disk or which is -already in the process of detachment from the virtual machine. Supported -values: **ForceDetach**.

detachOption: **ForceDetach** is applicable -only for managed data disks. If a previous detachment attempt of the data disk -did not complete due to an unexpected failure from the virtual machine and the -disk is still not released then use force-detach as a last resort option to -detach the disk forcibly from the VM. All writes might not have been flushed -when using this detach behavior.

This feature is still in preview mode -and is not supported for VirtualMachineScaleSet. To force-detach a data disk -update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. -""") - detachOption?: DiskDetachOptionTypes; - - @doc(""" -Specifies whether data disk should be deleted or detached upon VM -deletion.

Possible values:

**Delete** If this value is used, -the data disk is deleted when VM is deleted.

**Detach** If this value -is used, the data disk is retained after VM is deleted.

The default -value is set to **detach** -""") - deleteOption?: DiskDeleteOptionTypes; -} - -@doc(""" -Specifies the operating system settings for the virtual machine. Some of the -settings cannot be changed once VM is provisioned. -""") -model OSProfile { - @doc(""" -Specifies the host OS name of the virtual machine.

This name cannot be -updated after the VM is created.

**Max-length (Windows):** 15 -characters

**Max-length (Linux):** 64 characters.

For naming -conventions and restrictions see [Azure infrastructure services implementation -guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules). -""") - computerName?: string; - - @doc(""" -Specifies the name of the administrator account.

This property cannot -be updated after the VM is created.

**Windows-only restriction:** -Cannot end in \".\"

**Disallowed values:** \"administrator\", -\"admin\", \"user\", \"user1\", \"test\", \"user2\", \"test1\", \"user3\", -\"admin1\", \"1\", \"123\", \"a\", \"actuser\", \"adm\", \"admin2\", -\"aspnet\", \"backup\", \"console\", \"david\", \"guest\", \"john\", \"owner\", -\"root\", \"server\", \"sql\", \"support\", \"support_388945a0\", \"sys\", -\"test2\", \"test3\", \"user4\", \"user5\".

**Minimum-length -(Linux):** 1 character

**Max-length (Linux):** 64 characters

-**Max-length (Windows):** 20 characters. -""") - adminUsername?: string; - - @doc(""" -Specifies the password of the administrator account.

**Minimum-length -(Windows):** 8 characters

**Minimum-length (Linux):** 6 characters -

**Max-length (Windows):** 123 characters

**Max-length -(Linux):** 72 characters

**Complexity requirements:** 3 out of 4 -conditions below need to be fulfilled
Has lower characters
Has upper -characters
Has a digit
Has a special character (Regex match [\\W_]) -

**Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", -\"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", -\"Password22\", \"iloveyou!\"

For resetting the password, see [How to -reset the Remote Desktop service or its login password in a Windows -VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) -

For resetting root password, see [Manage users, SSH, and check or -repair disks on Azure Linux VMs using the VMAccess -Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) -""") - adminPassword?: string; - - @doc(""" -Specifies a base-64 encoded string of custom data. The base-64 encoded string -is decoded to a binary array that is saved as a file on the Virtual Machine. -The maximum length of the binary array is 65535 bytes.

**Note: Do not -pass any secrets or passwords in customData property**

This property -cannot be updated after the VM is created.

customData is passed to the -VM to be saved as a file, for more information see [Custom Data on Azure -VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/) -

For using cloud-init for your Linux VM, see [Using cloud-init to -customize a Linux VM during -creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) -""") - customData?: string; - - @doc("Specifies Windows operating system settings on the virtual machine.") - windowsConfiguration?: WindowsConfiguration; - - @doc(""" -Specifies the Linux operating system settings on the virtual machine. -

For a list of supported Linux distributions, see [Linux on -Azure-Endorsed -Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). -""") - linuxConfiguration?: LinuxConfiguration; - - @doc(""" -Specifies set of certificates that should be installed onto the virtual -machine. To install certificates on a virtual machine it is recommended to use -the [Azure Key Vault virtual machine extension for -Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) -or the [Azure Key Vault virtual machine extension for -Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). -""") - secrets?: VaultSecretGroup[]; - - @doc(""" -Specifies whether extension operations should be allowed on the virtual -machine.

This may only be set to False when no extensions are present -on the virtual machine. -""") - allowExtensionOperations?: boolean; - - @doc("Optional property which must either be set to True or omitted.") - requireGuestProvisionSignal?: boolean; -} - -@doc(""" -Specifies the network interfaces or the networking configuration of the virtual -machine. -""") -model NetworkProfile { - @doc(""" -Specifies the list of resource Ids for the network interfaces associated with -the virtual machine. -""") - networkInterfaces?: NetworkInterfaceReference[]; - - @doc(""" -specifies the Microsoft.Network API version used when creating networking -resources in the Network Interface Configurations -""") - networkApiVersion?: NetworkApiVersion; - - @doc(""" -Specifies the networking configurations that will be used to create the virtual -machine networking resources. -""") - networkInterfaceConfigurations?: VirtualMachineNetworkInterfaceConfiguration[]; -} - -@doc("Describes a network interface reference.") -model NetworkInterfaceReference { - ...SubResource; - - @doc("Describes a network interface reference properties.") - properties?: NetworkInterfaceReferenceProperties; -} - -@doc("Describes a network interface reference properties.") -model NetworkInterfaceReferenceProperties { - @doc(""" -Specifies the primary network interface in case the virtual machine has more -than 1 network interface. -""") - primary?: boolean; - - @doc("Specify what happens to the network interface when the VM is deleted") - deleteOption?: DeleteOptions; -} - -@doc("Describes a virtual machine network interface configurations.") -model VirtualMachineNetworkInterfaceConfiguration { - @doc("The network interface configuration name.") - name: string; - - @doc("Describes a virtual machine network profile's IP configuration.") - properties?: VirtualMachineNetworkInterfaceConfigurationProperties; -} - -@doc("Describes a virtual machine network profile's IP configuration.") -model VirtualMachineNetworkInterfaceConfigurationProperties { - @doc(""" -Specifies the primary network interface in case the virtual machine has more -than 1 network interface. -""") - primary?: boolean; - - @doc("Specify what happens to the network interface when the VM is deleted") - deleteOption?: DeleteOptions; - - @doc("Specifies whether the network interface is accelerated networking-enabled.") - enableAcceleratedNetworking?: boolean; - - @doc("Specifies whether the network interface is disabled for tcp state tracking.") - disableTcpStateTracking?: boolean; - - @doc("Specifies whether the network interface is FPGA networking-enabled.") - enableFpga?: boolean; - - @doc("Whether IP forwarding enabled on this NIC.") - enableIPForwarding?: boolean; - - @doc("The network security group.") - networkSecurityGroup?: SubResource; - - @doc("The dns settings to be applied on the network interfaces.") - dnsSettings?: VirtualMachineNetworkInterfaceDnsSettingsConfiguration; - - @doc("Specifies the IP configurations of the network interface.") - ipConfigurations: VirtualMachineNetworkInterfaceIPConfiguration[]; - - dscpConfiguration?: SubResource; -} - -@doc("Describes a virtual machines network configuration's DNS settings.") -model VirtualMachineNetworkInterfaceDnsSettingsConfiguration { - @doc("List of DNS servers IP addresses") - dnsServers?: string[]; -} - -@doc("Describes a virtual machine network profile's IP configuration.") -model VirtualMachineNetworkInterfaceIPConfiguration { - @doc("The IP configuration name.") - name: string; - - @doc("Describes a virtual machine network interface IP configuration properties.") - properties?: VirtualMachineNetworkInterfaceIPConfigurationProperties; -} - -@doc("Describes a virtual machine network interface IP configuration properties.") -model VirtualMachineNetworkInterfaceIPConfigurationProperties { - @doc("Specifies the identifier of the subnet.") - subnet?: SubResource; - - @doc(""" -Specifies the primary network interface in case the virtual machine has more -than 1 network interface. -""") - primary?: boolean; - - @doc("The publicIPAddressConfiguration.") - publicIPAddressConfiguration?: VirtualMachinePublicIPAddressConfiguration; - - @doc(""" -Available from Api-Version 2017-03-30 onwards, it represents whether the -specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible -values are: 'IPv4' and 'IPv6'. -""") - privateIPAddressVersion?: IPVersions; - - @doc("Specifies an array of references to application security group.") - applicationSecurityGroups?: SubResource[]; - - @doc(""" -Specifies an array of references to backend address pools of application -gateways. A virtual machine can reference backend address pools of multiple -application gateways. Multiple virtual machines cannot use the same application -gateway. -""") - applicationGatewayBackendAddressPools?: SubResource[]; - - @doc(""" -Specifies an array of references to backend address pools of load balancers. A -virtual machine can reference backend address pools of one public and one -internal load balancer. [Multiple virtual machines cannot use the same basic -sku load balancer]. -""") - loadBalancerBackendAddressPools?: SubResource[]; -} - -@doc("Describes a virtual machines IP Configuration's PublicIPAddress configuration") -model VirtualMachinePublicIPAddressConfiguration { - @doc("The publicIP address configuration name.") - name: string; - - @doc("Describes a virtual machines IP Configuration's PublicIPAddress configuration") - properties?: VirtualMachinePublicIPAddressConfigurationProperties; - - @doc(""" -Describes the public IP Sku. It can only be set with OrchestrationMode as -Flexible. -""") - sku?: PublicIPAddressSku; -} - -@doc("Describes a virtual machines IP Configuration's PublicIPAddress configuration") -model VirtualMachinePublicIPAddressConfigurationProperties { - @doc("The idle timeout of the public IP address.") - idleTimeoutInMinutes?: int32; - - @doc("Specify what happens to the public IP address when the VM is deleted") - deleteOption?: DeleteOptions; - - @doc("The dns settings to be applied on the publicIP addresses .") - dnsSettings?: VirtualMachinePublicIPAddressDnsSettingsConfiguration; - - @doc("The list of IP tags associated with the public IP address.") - ipTags?: VirtualMachineIpTag[]; - - @doc("The PublicIPPrefix from which to allocate publicIP addresses.") - publicIPPrefix?: SubResource; - - @doc(""" -Available from Api-Version 2019-07-01 onwards, it represents whether the -specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible -values are: 'IPv4' and 'IPv6'. -""") - publicIPAddressVersion?: IPVersions; - - @doc("Specify the public IP allocation type") - publicIPAllocationMethod?: PublicIPAllocationMethod; -} - -@doc("Describes a virtual machines network configuration's DNS settings.") -model VirtualMachinePublicIPAddressDnsSettingsConfiguration { - @doc(""" -The Domain name label prefix of the PublicIPAddress resources that will be -created. The generated name label is the concatenation of the domain name label -and vm network profile unique ID. -""") - domainNameLabel: string; -} - -@doc("Contains the IP tag associated with the public IP address.") -model VirtualMachineIpTag { - @doc("IP tag type. Example: FirstPartyUsage.") - ipTagType?: string; - - @doc("IP tag associated with the public IP. Example: SQL, Storage etc.") - tag?: string; -} - -@doc("Describes a virtual machine scale set VM network profile.") -model VirtualMachineScaleSetVMNetworkProfileConfiguration { - @doc("The list of network configurations.") - networkInterfaceConfigurations?: VirtualMachineScaleSetNetworkConfiguration[]; -} - -@doc("The protection policy of a virtual machine scale set VM.") -model VirtualMachineScaleSetVMProtectionPolicy { - @doc(""" -Indicates that the virtual machine scale set VM shouldn't be considered for -deletion during a scale-in operation. -""") - protectFromScaleIn?: boolean; - - @doc(""" -Indicates that model updates or actions (including scale-in) initiated on the -virtual machine scale set should not be applied to the virtual machine scale -set VM. -""") - protectFromScaleSetActions?: boolean; -} - -@doc("Describes a Virtual Machine Extension.") -model VirtualMachineExtension { - ...ResourceWithOptionalLocation; - - @doc("Describes the properties of a Virtual Machine Extension.") - properties?: VirtualMachineExtensionProperties; -} - -@doc("The Resource model definition with location property as optional.") -model ResourceWithOptionalLocation { - @doc("Resource location") - location?: string; - - @doc("Resource Id") - @visibility("read") - id?: string; - - @doc("Resource name") - @visibility("read") - name?: string; - - @doc("Resource type") - @visibility("read") - type?: string; - - @doc("Resource tags") - tags?: Record; -} - -@doc("Identity for the virtual machine.") -model VirtualMachineIdentity { - @doc(""" -The principal id of virtual machine identity. This property will only be -provided for a system assigned identity. -""") - @visibility("read") - principalId?: string; - - @doc(""" -The tenant id associated with the virtual machine. This property will only be -provided for a system assigned identity. -""") - @visibility("read") - tenantId?: string; - - @doc(""" -The type of identity used for the virtual machine. The type 'SystemAssigned, -UserAssigned' includes both an implicitly created identity and a set of user -assigned identities. The type 'None' will remove any identities from the -virtual machine. -""") - type?: ResourceIdentityType; - - @doc(""" -The list of user identities associated with the Virtual Machine. The user -identity dictionary key references will be ARM resource ids in the form: -'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. -""") - userAssignedIdentities?: Record; -} - -@doc("The List Virtual Machine Scale Set VMs operation response.") -model VirtualMachineScaleSetVMListResult - is Azure.Core.Page; - -@doc("The SAS URIs of the console screenshot and serial log blobs.") -model RetrieveBootDiagnosticsDataResult { - @doc("The console screenshot blob URI") - @visibility("read") - consoleScreenshotBlobUri?: string; - - @doc("The serial console log blob URI.") - @visibility("read") - serialConsoleLogBlobUri?: string; -} - -@doc("Describes a Virtual Machine Extension.") -model VirtualMachineExtensionUpdate { - ...UpdateResource; - - @doc("Describes the properties of a Virtual Machine Extension.") - properties?: VirtualMachineExtensionUpdateProperties; -} - -@doc("The List Extension operation response") -model VirtualMachineExtensionsListResult { - @doc("The list of extensions") - value?: VirtualMachineExtension[]; -} - -@doc("The List Virtual Machine operation response.") -model VirtualMachineListResult is Azure.Core.Page; - -@doc("Describes a Virtual Machine.") -model VirtualMachine { - ...Resource; - - @doc(""" -Specifies information about the marketplace image used to create the virtual -machine. This element is only used for marketplace images. Before you can use a -marketplace image from an API, you must enable the image for programmatic use. -In the Azure portal, find the marketplace image that you want to use and then -click **Want to deploy programmatically, Get Started ->**. Enter any required -information and then click **Save**. -""") - plan?: Plan; - - @doc("Describes the properties of a Virtual Machine.") - properties?: VirtualMachineProperties; - - @doc("The virtual machine child extension resources.") - @visibility("read") - resources?: VirtualMachineExtension[]; - - @doc("The identity of the virtual machine, if configured.") - identity?: VirtualMachineIdentity; - - @doc("The virtual machine zones.") - zones?: string[]; - - @doc("The extended location of the Virtual Machine.") - extendedLocation?: ExtendedLocation; -} - -@doc("Describes the properties of a Virtual Machine.") -model VirtualMachineProperties { - @doc("Specifies the hardware settings for the virtual machine.") - hardwareProfile?: HardwareProfile; - - @doc("Specifies the storage settings for the virtual machine disks.") - storageProfile?: StorageProfile; - - @doc("Specifies additional capabilities enabled or disabled on the virtual machine.") - additionalCapabilities?: AdditionalCapabilities; - - @doc(""" -Specifies the operating system settings used while creating the virtual -machine. Some of the settings cannot be changed once VM is provisioned. -""") - osProfile?: OSProfile; - - @doc("Specifies the network interfaces of the virtual machine.") - networkProfile?: NetworkProfile; - - @doc("Specifies the Security related profile settings for the virtual machine.") - securityProfile?: SecurityProfile; - - @doc(""" -Specifies the boot diagnostic settings state.

Minimum api-version: -2015-06-15. -""") - diagnosticsProfile?: DiagnosticsProfile; - - @doc(""" -Specifies information about the availability set that the virtual machine -should be assigned to. Virtual machines specified in the same availability set -are allocated to different nodes to maximize availability. For more information -about availability sets, see [Availability sets -overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). -

For more information on Azure planned maintenance, see [Maintenance -and updates for Virtual Machines in -Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates) -

Currently, a VM can only be added to availability set at creation -time. The availability set to which the VM is being added should be under the -same resource group as the availability set resource. An existing VM cannot be -added to an availability set.

This property cannot exist along with a -non-null properties.virtualMachineScaleSet reference. -""") - availabilitySet?: SubResource; - - @doc(""" -Specifies information about the virtual machine scale set that the virtual -machine should be assigned to. Virtual machines specified in the same virtual -machine scale set are allocated to different nodes to maximize availability. -Currently, a VM can only be added to virtual machine scale set at creation -time. An existing VM cannot be added to a virtual machine scale set. -

This property cannot exist along with a non-null -properties.availabilitySet reference.

Minimum api‐version: 2019‐03‐01 -""") - virtualMachineScaleSet?: SubResource; - - @doc(""" -Specifies information about the proximity placement group that the virtual -machine should be assigned to.

Minimum api-version: 2018-04-01. -""") - proximityPlacementGroup?: SubResource; - - @doc(""" -Specifies the priority for the virtual machine.

Minimum api-version: -2019-03-01 -""") - priority?: VirtualMachinePriorityTypes; - - @doc(""" -Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot -scale set.

For Azure Spot virtual machines, both 'Deallocate' and -'Delete' are supported and the minimum api-version is 2019-03-01.

For -Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the -minimum api-version is 2017-10-30-preview. -""") - evictionPolicy?: VirtualMachineEvictionPolicyTypes; - - @doc(""" -Specifies the billing related details of a Azure Spot virtual machine. -

Minimum api-version: 2019-03-01. -""") - billingProfile?: BillingProfile; - - @doc(""" -Specifies information about the dedicated host that the virtual machine resides -in.

Minimum api-version: 2018-10-01. -""") - host?: SubResource; - - @doc(""" -Specifies information about the dedicated host group that the virtual machine -resides in.

Minimum api-version: 2020-06-01.

NOTE: User cannot -specify both host and hostGroup properties. -""") - hostGroup?: SubResource; - - @doc("The provisioning state, which only appears in the response.") - @visibility("read") - provisioningState?: string; - - @doc("The virtual machine instance view.") - @visibility("read") - instanceView?: VirtualMachineInstanceView; - - @doc(""" -Specifies that the image or disk that is being used was licensed on-premises. -

Possible values for Windows Server operating system are:

-Windows_Client

Windows_Server

Possible values for Linux -Server operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS -(for SUSE)

For more information, see [Azure Hybrid Use Benefit for -Windows -Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) -

[Azure Hybrid Use Benefit for Linux -Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) -

Minimum api-version: 2015-06-15 -""") - licenseType?: string; - - @doc(""" -Specifies the VM unique ID which is a 128-bits identifier that is encoded and -stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS -commands. -""") - @visibility("read") - vmId?: string; - - @doc(""" -Specifies the time alloted for all extensions to start. The time duration -should be between 15 minutes and 120 minutes (inclusive) and should be -specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). -

Minimum api-version: 2020-06-01 -""") - extensionsTimeBudget?: string; - - @doc(""" -Specifies the scale set logical fault domain into which the Virtual Machine -will be created. By default, the Virtual Machine will by automatically assigned -to a fault domain that best maintains balance across available fault -domains.
  • This is applicable only if the 'virtualMachineScaleSet' -property of this Virtual Machine is set.
  • The Virtual Machine Scale Set that -is referenced, must have 'platformFaultDomainCount' > 1.
  • This property -cannot be updated once the Virtual Machine is created.
  • Fault domain -assignment can be viewed in the Virtual Machine Instance View.

    Minimum -api‐version: 2020‐12‐01 -""") - platformFaultDomain?: int32; - - @doc("Specifies Scheduled Event related configurations.") - scheduledEventsProfile?: ScheduledEventsProfile; - - @doc(""" -UserData for the VM, which must be base-64 encoded. Customer should not pass -any secrets in here.

    Minimum api-version: 2021-03-01 -""") - userData?: string; - - @doc(""" -Specifies information about the capacity reservation that is used to allocate -virtual machine.

    Minimum api-version: 2021-04-01. -""") - capacityReservation?: CapacityReservationProfile; - - @doc("Specifies the gallery applications that should be made available to the VM/VMSS") - applicationProfile?: ApplicationProfile; - - @doc(""" -Specifies the time at which the Virtual Machine resource was -created.

    Minimum api-version: 2021-11-01. -""") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - timeCreated?: utcDateTime; -} - -@doc("The instance view of a virtual machine.") -model VirtualMachineInstanceView { - @doc("Specifies the update domain of the virtual machine.") - platformUpdateDomain?: int32; - - @doc("Specifies the fault domain of the virtual machine.") - platformFaultDomain?: int32; - - @doc("The computer name assigned to the virtual machine.") - computerName?: string; - - @doc("The Operating System running on the virtual machine.") - osName?: string; - - @doc("The version of Operating System running on the virtual machine.") - osVersion?: string; - - @doc("Specifies the HyperVGeneration Type associated with a resource") - hyperVGeneration?: HyperVGenerationType; - - @doc("The Remote desktop certificate thumbprint.") - rdpThumbPrint?: string; - - @doc("The VM Agent running on the virtual machine.") - vmAgent?: VirtualMachineAgentInstanceView; - - @doc("The Maintenance Operation status on the virtual machine.") - maintenanceRedeployStatus?: MaintenanceRedeployStatus; - - @doc("The virtual machine disk information.") - disks?: DiskInstanceView[]; - - @doc("The extensions information.") - extensions?: VirtualMachineExtensionInstanceView[]; - - @doc("The health status for the VM.") - @visibility("read") - vmHealth?: VirtualMachineHealthStatus; - - @doc(""" -Boot Diagnostics is a debugging feature which allows you to view Console Output -and Screenshot to diagnose VM status.

    You can easily view the output -of your console log.

    Azure also enables you to see a screenshot of the -VM from the hypervisor. -""") - bootDiagnostics?: BootDiagnosticsInstanceView; - - @doc(""" -Resource id of the dedicated host, on which the virtual machine is allocated -through automatic placement, when the virtual machine is associated with a -dedicated host group that has automatic placement enabled.

    Minimum -api-version: 2020-06-01. -""") - @visibility("read") - assignedHost?: string; - - @doc("The resource status information.") - statuses?: InstanceViewStatus[]; - - @doc("[Preview Feature] The status of virtual machine patch operations.") - patchStatus?: VirtualMachinePatchStatus; -} - -@doc("The status of virtual machine patch operations.") -model VirtualMachinePatchStatus { - @doc(""" -The available patch summary of the latest assessment operation for the virtual -machine. -""") - availablePatchSummary?: AvailablePatchSummary; - - @doc(""" -The installation summary of the latest installation operation for the virtual -machine. -""") - lastPatchInstallationSummary?: LastPatchInstallationSummary; - - @doc("The enablement status of the specified patchMode") - @visibility("read") - configurationStatuses?: InstanceViewStatus[]; -} - -@doc(""" -Describes the properties of an virtual machine instance view for available -patch summary. -""") -model AvailablePatchSummary { - @doc(""" -The overall success or failure status of the operation. It remains -\"InProgress\" until the operation completes. At that point it will become -\"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\" -""") - @visibility("read") - status?: PatchOperationStatus; - - @doc(""" -The activity ID of the operation that produced this result. It is used to -correlate across CRP and extension logs. -""") - @visibility("read") - assessmentActivityId?: string; - - @doc(""" -The overall reboot status of the VM. It will be true when partially installed -patches require a reboot to complete installation but the reboot has not yet -occurred. -""") - @visibility("read") - rebootPending?: boolean; - - @doc(""" -The number of critical or security patches that have been detected as available -and not yet installed. -""") - @visibility("read") - criticalAndSecurityPatchCount?: int32; - - @doc("The number of all available patches excluding critical and security.") - @visibility("read") - otherPatchCount?: int32; - - @doc("The UTC timestamp when the operation began.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - startTime?: utcDateTime; - - @doc("The UTC timestamp when the operation began.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - lastModifiedTime?: utcDateTime; - - @doc(""" -The errors that were encountered during execution of the operation. The details -array contains the list of them. -""") - @visibility("read") - error?: ApiError; -} - -@doc("Describes the properties of the last installed patch summary.") -model LastPatchInstallationSummary { - @doc(""" -The overall success or failure status of the operation. It remains -\"InProgress\" until the operation completes. At that point it will become -\"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\" -""") - @visibility("read") - status?: PatchOperationStatus; - - @doc(""" -The activity ID of the operation that produced this result. It is used to -correlate across CRP and extension logs. -""") - @visibility("read") - installationActivityId?: string; - - @doc(""" -Describes whether the operation ran out of time before it completed all its -intended actions -""") - @visibility("read") - maintenanceWindowExceeded?: boolean; - - @doc(""" -The number of all available patches but not going to be installed because it -didn't match a classification or inclusion list entry. -""") - @visibility("read") - notSelectedPatchCount?: int32; - - @doc(""" -The number of all available patches but excluded explicitly by a -customer-specified exclusion list match. -""") - @visibility("read") - excludedPatchCount?: int32; - - @doc(""" -The number of all available patches expected to be installed over the course of -the patch installation operation. -""") - @visibility("read") - pendingPatchCount?: int32; - - @doc("The count of patches that successfully installed.") - @visibility("read") - installedPatchCount?: int32; - - @doc("The count of patches that failed installation.") - @visibility("read") - failedPatchCount?: int32; - - @doc("The UTC timestamp when the operation began.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - startTime?: utcDateTime; - - @doc("The UTC timestamp when the operation began.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - lastModifiedTime?: utcDateTime; - - @doc(""" -The errors that were encountered during execution of the operation. The details -array contains the list of them. -""") - @visibility("read") - error?: ApiError; -} - -@doc("Capture Virtual Machine parameters.") -model VirtualMachineCaptureParameters { - @doc("The captured virtual hard disk's name prefix.") - vhdPrefix: string; - - @doc("The destination container name.") - destinationContainerName: string; - - @doc(""" -Specifies whether to overwrite the destination virtual hard disk, in case of -conflict. -""") - overwriteVhds: boolean; -} - -@doc("Output of virtual machine capture operation.") -model VirtualMachineCaptureResult { - ...SubResource; - - @doc("the schema of the captured virtual machine") - @visibility("read") - @projectedName("json", "$schema") - schema?: string; - - @doc("the version of the content") - @visibility("read") - contentVersion?: string; - - @doc("parameters of the captured virtual machine") - @visibility("read") - parameters?: unknown; - - @doc("a list of resource items of the captured virtual machine") - @visibility("read") - resources?: unknown[]; -} - -@doc("Describes a Virtual Machine Update.") -model VirtualMachineUpdate { - ...UpdateResource; - - @doc(""" -Specifies information about the marketplace image used to create the virtual -machine. This element is only used for marketplace images. Before you can use a -marketplace image from an API, you must enable the image for programmatic use. -In the Azure portal, find the marketplace image that you want to use and then -click **Want to deploy programmatically, Get Started ->**. Enter any required -information and then click **Save**. -""") - plan?: Plan; - - @doc("Describes the properties of a Virtual Machine.") - properties?: VirtualMachineProperties; - - @doc("The identity of the virtual machine, if configured.") - identity?: VirtualMachineIdentity; - - @doc("The virtual machine zones.") - zones?: string[]; -} - -@doc("Describes the properties of an AssessPatches result.") -model VirtualMachineAssessPatchesResult { - @doc(""" -The overall success or failure status of the operation. It remains -\"InProgress\" until the operation completes. At that point it will become -\"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\" -""") - @visibility("read") - status?: PatchOperationStatus; - - @doc(""" -The activity ID of the operation that produced this result. It is used to -correlate across CRP and extension logs. -""") - @visibility("read") - assessmentActivityId?: string; - - @doc(""" -The overall reboot status of the VM. It will be true when partially installed -patches require a reboot to complete installation but the reboot has not yet -occurred. -""") - @visibility("read") - rebootPending?: boolean; - - @doc(""" -The number of critical or security patches that have been detected as available -and not yet installed. -""") - @visibility("read") - criticalAndSecurityPatchCount?: int32; - - @doc("The number of all available patches excluding critical and security.") - @visibility("read") - otherPatchCount?: int32; - - @doc("The UTC timestamp when the operation began.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - startDateTime?: utcDateTime; - - @doc("The list of patches that have been detected as available for installation.") - @visibility("read") - availablePatches?: VirtualMachineSoftwarePatchProperties[]; - - @doc(""" -The errors that were encountered during execution of the operation. The details -array contains the list of them. -""") - @visibility("read") - error?: ApiError; -} - -@doc("Describes the properties of a Virtual Machine software patch.") -model VirtualMachineSoftwarePatchProperties { - @doc("A unique identifier for the patch.") - @visibility("read") - patchId?: string; - - @doc("The friendly name of the patch.") - @visibility("read") - name?: string; - - @doc("The version number of the patch. This property applies only to Linux patches.") - @visibility("read") - version?: string; - - @doc("The KBID of the patch. Only applies to Windows patches.") - @visibility("read") - kbId?: string; - - @doc("The classification(s) of the patch as provided by the patch publisher.") - @visibility("read") - classifications?: string[]; - - @doc("Describes the reboot requirements of the patch.") - @visibility("read") - rebootBehavior?: VMGuestPatchRebootBehavior; - - @doc(""" -The activity ID of the operation that produced this result. It is used to -correlate across CRP and extension logs. -""") - @visibility("read") - activityId?: string; - - @doc("The UTC timestamp when the repository published this patch.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - publishedDate?: utcDateTime; - - @doc("The UTC timestamp of the last update to this patch record.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - lastModifiedDateTime?: utcDateTime; - - @doc("Describes the availability of a given patch.") - @visibility("read") - assessmentState?: PatchAssessmentState; -} - -@doc("Input for InstallPatches as directly received by the API") -model VirtualMachineInstallPatchesParameters { - @doc(""" -Specifies the maximum amount of time that the operation will run. It must be an -ISO 8601-compliant duration string such as PT4H (4 hours) -""") - maximumDuration?: string; - - @doc("Defines when it is acceptable to reboot a VM during a software update operation.") - rebootSetting: VMGuestPatchRebootSetting; - - @doc("Input for InstallPatches on a Windows VM, as directly received by the API") - windowsParameters?: WindowsParameters; - - @doc("Input for InstallPatches on a Linux VM, as directly received by the API") - linuxParameters?: LinuxParameters; -} - -@doc("Input for InstallPatches on a Windows VM, as directly received by the API") -model WindowsParameters { - @doc("The update classifications to select when installing patches for Windows.") - classificationsToInclude?: VMGuestPatchClassificationWindows[]; - - @doc("Kbs to include in the patch operation") - kbNumbersToInclude?: string[]; - - @doc("Kbs to exclude in the patch operation") - kbNumbersToExclude?: string[]; - - @doc(""" -Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' -when this is set to true. -""") - excludeKbsRequiringReboot?: boolean; - - @doc(""" -This is used to install patches that were published on or before this given max -published date. -""") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - maxPatchPublishDate?: utcDateTime; -} - -@doc("Input for InstallPatches on a Linux VM, as directly received by the API") -model LinuxParameters { - @doc("The update classifications to select when installing patches for Linux.") - classificationsToInclude?: VMGuestPatchClassificationLinux[]; - - @doc("packages to include in the patch operation. Format: packageName_packageVersion") - packageNameMasksToInclude?: string[]; - - @doc("packages to exclude in the patch operation. Format: packageName_packageVersion") - packageNameMasksToExclude?: string[]; - - @doc(""" -This is used as a maintenance run identifier for Auto VM Guest Patching in -Linux. -""") - maintenanceRunId?: string; -} - -@doc("The result summary of an installation operation.") -model VirtualMachineInstallPatchesResult { - @doc(""" -The overall success or failure status of the operation. It remains -\"InProgress\" until the operation completes. At that point it will become -\"Failed\", \"Succeeded\", \"Unknown\" or \"CompletedWithWarnings.\" -""") - @visibility("read") - status?: PatchOperationStatus; - - @doc(""" -The activity ID of the operation that produced this result. It is used to -correlate across CRP and extension logs. -""") - @visibility("read") - installationActivityId?: string; - - @doc("The reboot state of the VM following completion of the operation.") - @visibility("read") - rebootStatus?: VMGuestPatchRebootStatus; - - @doc(""" -Whether the operation ran out of time before it completed all its intended -actions. -""") - @visibility("read") - maintenanceWindowExceeded?: boolean; - - @doc(""" -The number of patches that were not installed due to the user blocking their -installation. -""") - @visibility("read") - excludedPatchCount?: int32; - - @doc(""" -The number of patches that were detected as available for install, but did not -meet the operation's criteria. -""") - @visibility("read") - notSelectedPatchCount?: int32; - - @doc(""" -The number of patches that were identified as meeting the installation -criteria, but were not able to be installed. Typically this happens when -maintenanceWindowExceeded == true. -""") - @visibility("read") - pendingPatchCount?: int32; - - @doc("The number of patches successfully installed.") - @visibility("read") - installedPatchCount?: int32; - - @doc(""" -The number of patches that could not be installed due to some issue. See errors -for details. -""") - @visibility("read") - failedPatchCount?: int32; - - @doc("The patches that were installed during the operation.") - @visibility("read") - patches?: PatchInstallationDetail[]; - - @doc("The UTC timestamp when the operation began.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - startDateTime?: utcDateTime; - - @doc(""" -The errors that were encountered during execution of the operation. The details -array contains the list of them. -""") - @visibility("read") - error?: ApiError; -} - -@doc(""" -Information about a specific patch that was encountered during an installation -action. -""") -model PatchInstallationDetail { - @doc("A unique identifier for the patch.") - @visibility("read") - patchId?: string; - - @doc("The friendly name of the patch.") - @visibility("read") - name?: string; - - @doc(""" -The version string of the package. It may conform to Semantic Versioning. Only -applies to Linux. -""") - @visibility("read") - version?: string; - - @doc("The KBID of the patch. Only applies to Windows patches.") - @visibility("read") - kbId?: string; - - @doc("The classification(s) of the patch as provided by the patch publisher.") - @visibility("read") - classifications?: string[]; - - @doc("The state of the patch after the installation operation completed.") - @visibility("read") - installationState?: PatchInstallationState; -} - -@doc("Describes a Virtual Machine Image.") -model VirtualMachineImage { - ...VirtualMachineImageResource; - - @doc("Describes the properties of a Virtual Machine Image.") - properties?: VirtualMachineImageProperties; -} - -@doc("Describes the properties of a Virtual Machine Image.") -model VirtualMachineImageProperties { - @doc(""" -Used for establishing the purchase context of any 3rd Party artifact through -MarketPlace. -""") - plan?: PurchasePlan; - - @doc("Contains the os disk image information.") - osDiskImage?: OSDiskImage; - - dataDiskImages?: DataDiskImage[]; - - @doc("Describes automatic OS upgrade properties on the image.") - automaticOSUpgradeProperties?: AutomaticOSUpgradeProperties; - - @doc("Specifies the HyperVGeneration Type") - hyperVGeneration?: HyperVGenerationTypes; - - @doc("Specifies disallowed configuration for the VirtualMachine created from the image") - disallowed?: DisallowedConfiguration; - - features?: VirtualMachineImageFeature[]; - - @doc("Specifies the Architecture Type") - architecture?: ArchitectureTypes; -} - -@doc(""" -Used for establishing the purchase context of any 3rd Party artifact through -MarketPlace. -""") -model PurchasePlan { - @doc("The publisher ID.") - publisher: string; - - @doc("The plan ID.") - name: string; - - @doc(""" -Specifies the product of the image from the marketplace. This is the same value -as Offer under the imageReference element. -""") - product: string; -} - -@doc("Contains the os disk image information.") -model OSDiskImage { - @doc("The operating system of the osDiskImage.") - operatingSystem: OperatingSystemTypes; -} - -@doc("Contains the data disk images information.") -model DataDiskImage { - @doc(""" -Specifies the logical unit number of the data disk. This value is used to -identify data disks within the VM and therefore must be unique for each data -disk attached to a VM. -""") - @visibility("read") - lun?: int32; -} - -@doc("Describes automatic OS upgrade properties on the image.") -model AutomaticOSUpgradeProperties { - @doc("Specifies whether automatic OS upgrade is supported on the image.") - automaticOSUpgradeSupported: boolean; -} - -@doc("Specifies the disallowed configuration for a virtual machine image.") -model DisallowedConfiguration { - @doc("VM disk types which are disallowed.") - vmDiskType?: VmDiskTypes; -} - -@doc("Specifies additional capabilities supported by the image") -model VirtualMachineImageFeature { - @doc("The name of the feature.") - name?: string; - - @doc("The corresponding value for the feature.") - value?: string; -} - -@doc("Virtual machine image resource information.") -model VirtualMachineImageResource { - ...SubResource; - - @doc("The name of the resource.") - name: string; - - @doc("The supported Azure location of the resource.") - location: string; - - @doc(""" -Specifies the tags that are assigned to the virtual machine. For more -information about using tags, see [Using tags to organize your Azure -resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). -""") - tags?: Record; - - @doc("The extended location of the Virtual Machine.") - extendedLocation?: ExtendedLocation; -} - -@doc("The List VmImages in EdgeZone operation response.") -model VmImagesInEdgeZoneListResult { - @doc("The list of VMImages in EdgeZone") - value?: VirtualMachineImageResource[]; - - @doc(""" -The URI to fetch the next page of VMImages in EdgeZone. Call ListNext() with -this URI to fetch the next page of VmImages. -""") - nextLink?: string; -} - -@doc("Describes a Virtual Machine Extension Image.") -model VirtualMachineExtensionImage { - ...Resource; - - @doc("Describes the properties of a Virtual Machine Extension Image.") - properties?: VirtualMachineExtensionImageProperties; -} - -@doc("Describes the properties of a Virtual Machine Extension Image.") -model VirtualMachineExtensionImageProperties { - @doc("The operating system this extension supports.") - operatingSystem: string; - - @doc("The type of role (IaaS or PaaS) this extension supports.") - computeRole: string; - - @doc(""" -The schema defined by publisher, where extension consumers should provide -settings in a matching schema. -""") - handlerSchema: string; - - @doc(""" -Whether the extension can be used on xRP VMScaleSets. By default existing -extensions are usable on scalesets, but there might be cases where a publisher -wants to explicitly indicate the extension is only enabled for CRP VMs but not -VMSS. -""") - vmScaleSetEnabled?: boolean; - - @doc("Whether the handler can support multiple extensions.") - supportsMultipleExtensions?: boolean; -} - -@doc(""" -Specifies information about the availability set that the virtual machine -should be assigned to. Virtual machines specified in the same availability set -are allocated to different nodes to maximize availability. For more information -about availability sets, see [Availability sets -overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). -

    For more information on Azure planned maintenance, see [Maintenance -and updates for Virtual Machines in -Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates) -

    Currently, a VM can only be added to availability set at creation -time. An existing VM cannot be added to an availability set. -""") -model AvailabilitySet { - ...Resource; - - @doc("The instance view of a resource.") - properties?: AvailabilitySetProperties; - - @doc(""" -Sku of the availability set, only name is required to be set. See -AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual -machines with managed disks and 'Classic' for virtual machines with unmanaged -disks. Default value is 'Classic'. -""") - sku?: Sku; -} - -@doc("The instance view of a resource.") -model AvailabilitySetProperties { - @doc("Update Domain count.") - platformUpdateDomainCount?: int32; - - @doc("Fault Domain count.") - platformFaultDomainCount?: int32; - - @doc("A list of references to all virtual machines in the availability set.") - virtualMachines?: SubResource[]; - - @doc(""" -Specifies information about the proximity placement group that the availability -set should be assigned to.

    Minimum api-version: 2018-04-01. -""") - proximityPlacementGroup?: SubResource; - - @doc("The resource status information.") - @visibility("read") - statuses?: InstanceViewStatus[]; -} - -@doc(""" -Specifies information about the availability set that the virtual machine -should be assigned to. Only tags may be updated. -""") -model AvailabilitySetUpdate { - ...UpdateResource; - - @doc("The instance view of a resource.") - properties?: AvailabilitySetProperties; - - @doc("Sku of the availability set") - sku?: Sku; -} - -@doc("The List Availability Set operation response.") -model AvailabilitySetListResult is Azure.Core.Page; - -@doc("Specifies information about the proximity placement group.") -model ProximityPlacementGroup { - ...Resource; - - @doc("Describes the properties of a Proximity Placement Group.") - properties?: ProximityPlacementGroupProperties; - - @doc(""" -Specifies the Availability Zone where virtual machine, virtual machine scale -set or availability set associated with the proximity placement group can be -created. -""") - zones?: string[]; -} - -@doc("Describes the properties of a Proximity Placement Group.") -model ProximityPlacementGroupProperties { - @doc(""" -Specifies the type of the proximity placement group.

    Possible values -are:

    **Standard** : Co-locate resources within an Azure region or -Availability Zone.

    **Ultra** : For future use. -""") - proximityPlacementGroupType?: ProximityPlacementGroupType; - - @doc("A list of references to all virtual machines in the proximity placement group.") - @visibility("read") - virtualMachines?: SubResourceWithColocationStatus[]; - - @doc(""" -A list of references to all virtual machine scale sets in the proximity -placement group. -""") - @visibility("read") - virtualMachineScaleSets?: SubResourceWithColocationStatus[]; - - @doc("A list of references to all availability sets in the proximity placement group.") - @visibility("read") - availabilitySets?: SubResourceWithColocationStatus[]; - - @doc("Describes colocation status of the Proximity Placement Group.") - colocationStatus?: InstanceViewStatus; - - @doc("Specifies the user intent of the proximity placement group.") - intent?: ProximityPlacementGroupPropertiesIntent; -} - -model SubResourceWithColocationStatus { - ...SubResource; - - @doc("Describes colocation status of a resource in the Proximity Placement Group.") - colocationStatus?: InstanceViewStatus; -} - -@doc("Specifies the user intent of the proximity placement group.") -model ProximityPlacementGroupPropertiesIntent { - @doc(""" -Specifies possible sizes of virtual machines that can be created in the -proximity placement group. -""") - vmSizes?: string[]; -} - -@doc("Specifies information about the proximity placement group.") -model ProximityPlacementGroupUpdate { - ...UpdateResource; -} - -@doc("The List Proximity Placement Group operation response.") -model ProximityPlacementGroupListResult - is Azure.Core.Page; - -@doc(""" -Specifies information about the dedicated host group that the dedicated hosts -should be assigned to.

    Currently, a dedicated host can only be added -to a dedicated host group at creation time. An existing dedicated host cannot -be added to another dedicated host group. -""") -model DedicatedHostGroup { - ...Resource; - - @doc("Dedicated Host Group Properties.") - properties?: DedicatedHostGroupProperties; - - @doc(""" -Availability Zone to use for this host group. Only single zone is supported. -The zone can be assigned only during creation. If not provided, the group -supports all zones in the region. If provided, enforces each host in the group -to be in the same zone. -""") - zones?: string[]; -} - -@doc("Dedicated Host Group Properties.") -model DedicatedHostGroupProperties { - @doc("Number of fault domains that the host group can span.") - platformFaultDomainCount: int32; - - @doc("A list of references to all dedicated hosts in the dedicated host group.") - @visibility("read") - hosts?: SubResourceReadOnly[]; - - @doc(""" -The dedicated host group instance view, which has the list of instance view of -the dedicated hosts under the dedicated host group. -""") - @visibility("read") - instanceView?: DedicatedHostGroupInstanceView; - - @doc(""" -Specifies whether virtual machines or virtual machine scale sets can be placed -automatically on the dedicated host group. Automatic placement means resources -are allocated on dedicated hosts, that are chosen by Azure, under the dedicated -host group. The value is defaulted to 'false' when not provided. -

    Minimum api-version: 2020-06-01. -""") - supportAutomaticPlacement?: boolean; - - @doc(""" -Enables or disables a capability on the dedicated host group.

    Minimum -api-version: 2022-03-01. -""") - additionalCapabilities?: DedicatedHostGroupPropertiesAdditionalCapabilities; -} - -model DedicatedHostGroupInstanceView { - @doc("List of instance view of the dedicated hosts under the dedicated host group.") - hosts?: DedicatedHostInstanceViewWithName[]; -} - -@doc(""" -The instance view of a dedicated host that includes the name of the dedicated -host. It is used for the response to the instance view of a dedicated host -group. -""") -model DedicatedHostInstanceViewWithName { - ...DedicatedHostInstanceView; - - @doc("The name of the dedicated host.") - @visibility("read") - name?: string; -} - -@doc("The instance view of a dedicated host.") -model DedicatedHostInstanceView { - @doc(""" -Specifies the unique id of the dedicated physical machine on which the -dedicated host resides. -""") - @visibility("read") - assetId?: string; - - @doc("Unutilized capacity of the dedicated host.") - availableCapacity?: DedicatedHostAvailableCapacity; - - @doc("The resource status information.") - statuses?: InstanceViewStatus[]; -} - -@doc("Dedicated host unutilized capacity.") -model DedicatedHostAvailableCapacity { - @doc(""" -The unutilized capacity of the dedicated host represented in terms of each VM -size that is allowed to be deployed to the dedicated host. -""") - allocatableVMs?: DedicatedHostAllocatableVM[]; -} - -@doc(""" -Represents the dedicated host unutilized capacity in terms of a specific VM -size. -""") -model DedicatedHostAllocatableVM { - @doc("VM size in terms of which the unutilized capacity is represented.") - vmSize?: string; - - @doc(""" -Maximum number of VMs of size vmSize that can fit in the dedicated host's -remaining capacity. -""") - count?: float32; -} - -@doc(""" -Enables or disables a capability on the dedicated host group.

    Minimum -api-version: 2022-03-01. -""") -model DedicatedHostGroupPropertiesAdditionalCapabilities { - @doc(""" -The flag that enables or disables a capability to have UltraSSD Enabled Virtual -Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual -Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to -be set true as well. The value is defaulted to 'false' when not provided. -Please refer to -https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd -for more details on Ultra SSD feature.

    NOTE: The ultraSSDEnabled -setting can only be enabled for Host Groups that are created as zonal. -

    Minimum api-version: 2022-03-01. -""") - ultraSSDEnabled?: boolean; -} - -@doc(""" -Specifies information about the dedicated host group that the dedicated host -should be assigned to. Only tags may be updated. -""") -model DedicatedHostGroupUpdate { - ...UpdateResource; - - @doc("Dedicated Host Group Properties.") - properties?: DedicatedHostGroupProperties; - - @doc(""" -Availability Zone to use for this host group. Only single zone is supported. -The zone can be assigned only during creation. If not provided, the group -supports all zones in the region. If provided, enforces each host in the group -to be in the same zone. -""") - zones?: string[]; -} - -@doc("The List Dedicated Host Group with resource group response.") -model DedicatedHostGroupListResult is Azure.Core.Page; - -@doc("Specifies information about the Dedicated host.") -model DedicatedHost { - ...Resource; - - @doc("Properties of the dedicated host.") - properties?: DedicatedHostProperties; - - @doc(""" -SKU of the dedicated host for Hardware Generation and VM family. Only name is -required to be set. List Microsoft.Compute SKUs for a list of possible values. -""") - sku: Sku; -} - -@doc("Properties of the dedicated host.") -model DedicatedHostProperties { - @doc("Fault domain of the dedicated host within a dedicated host group.") - platformFaultDomain?: int32; - - @doc(""" -Specifies whether the dedicated host should be replaced automatically in case -of a failure. The value is defaulted to 'true' when not provided. -""") - autoReplaceOnFailure?: boolean; - - @doc(""" -A unique id generated and assigned to the dedicated host by the platform. -

    Does not change throughout the lifetime of the host. -""") - @visibility("read") - hostId?: string; - - @doc("A list of references to all virtual machines in the Dedicated Host.") - @visibility("read") - virtualMachines?: SubResourceReadOnly[]; - - @doc(""" -Specifies the software license type that will be applied to the VMs deployed on -the dedicated host.

    Possible values are:

    **None**

    -**Windows_Server_Hybrid**

    **Windows_Server_Perpetual**

    -Default: **None** -""") - licenseType?: DedicatedHostLicenseTypes; - - @doc("The date when the host was first provisioned.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - provisioningTime?: utcDateTime; - - @doc("The provisioning state, which only appears in the response.") - @visibility("read") - provisioningState?: string; - - @doc("The dedicated host instance view.") - @visibility("read") - instanceView?: DedicatedHostInstanceView; - - @doc(""" -Specifies the time at which the Dedicated Host resource was -created.

    Minimum api-version: 2021-11-01. -""") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - timeCreated?: utcDateTime; -} - -@doc(""" -Specifies information about the dedicated host. Only tags, autoReplaceOnFailure -and licenseType may be updated. -""") -model DedicatedHostUpdate { - ...UpdateResource; - - @doc("Properties of the dedicated host.") - properties?: DedicatedHostProperties; -} - -@doc("The list dedicated host operation response.") -model DedicatedHostListResult is Azure.Core.Page; - -@doc("The list SSH public keys operation response.") -model SshPublicKeysGroupListResult is Azure.Core.Page; - -@doc("Specifies information about the SSH public key.") -model SshPublicKeyResource { - ...Resource; - - @doc("Properties of the SSH public key.") - properties?: SshPublicKeyResourceProperties; -} - -@doc("Properties of the SSH public key.") -model SshPublicKeyResourceProperties { - @doc(""" -SSH public key used to authenticate to a virtual machine through ssh. If this -property is not initially provided when the resource is created, the publicKey -property will be populated when generateKeyPair is called. If the public key is -provided upon resource creation, the provided public key needs to be at least -2048-bit and in ssh-rsa format. -""") - publicKey?: string; -} - -@doc("Specifies information about the SSH public key.") -model SshPublicKeyUpdateResource { - ...UpdateResource; - - @doc("Properties of the SSH public key.") - properties?: SshPublicKeyResourceProperties; -} - -@doc("Response from generation of an SSH key pair.") -model SshPublicKeyGenerateKeyPairResult { - @doc(""" -Private key portion of the key pair used to authenticate to a virtual machine -through ssh. The private key is returned in RFC3447 format and should be -treated as a secret. -""") - privateKey: string; - - @doc(""" -Public key portion of the key pair used to authenticate to a virtual machine -through ssh. The public key is in ssh-rsa format. -""") - publicKey: string; - - @doc(""" -The ARM resource id in the form of -/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName} -""") - id: string; -} - -@doc(""" -The source user image virtual hard disk. The virtual hard disk will be copied -before being attached to the virtual machine. If SourceImage is provided, the -destination virtual hard drive must not exist. -""") -model Image { - ...Resource; - - @doc("Describes the properties of an Image.") - properties?: ImageProperties; - - @doc("The extended location of the Image.") - extendedLocation?: ExtendedLocation; -} - -@doc("Describes the properties of an Image.") -model ImageProperties { - @doc("The source virtual machine from which Image is created.") - sourceVirtualMachine?: SubResource; - - @doc("Specifies the storage settings for the virtual machine disks.") - storageProfile?: ImageStorageProfile; - - @doc("The provisioning state.") - @visibility("read") - provisioningState?: string; - - @doc(""" -Specifies the HyperVGenerationType of the VirtualMachine created from the -image. From API Version 2019-03-01 if the image source is a blob, then we need -the user to specify the value, if the source is managed resource like disk or -snapshot, we may require the user to specify the property if we cannot deduce -it from the source managed resource. -""") - hyperVGeneration?: HyperVGenerationTypes; -} - -@doc("Describes a storage profile.") -model ImageStorageProfile { - @doc(""" -Specifies information about the operating system disk used by the virtual -machine.

    For more information about disks, see [About disks and VHDs -for Azure virtual -machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). -""") - osDisk?: ImageOSDisk; - - @doc(""" -Specifies the parameters that are used to add a data disk to a virtual machine. -

    For more information about disks, see [About disks and VHDs for Azure -virtual -machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). -""") - dataDisks?: ImageDataDisk[]; - - @doc(""" -Specifies whether an image is zone resilient or not. Default is false. Zone -resilient images can be created only in regions that provide Zone Redundant -Storage (ZRS). -""") - zoneResilient?: boolean; -} - -@doc("Describes an Operating System disk.") -model ImageOSDisk { - ...ImageDisk; - - @doc(""" -This property allows you to specify the type of the OS that is included in the -disk if creating a VM from a custom image.

    Possible values are: -

    **Windows**

    **Linux** -""") - osType: OperatingSystemTypes; - - @doc("The OS State. For managed images, use Generalized.") - osState: OperatingSystemStateTypes; -} - -@doc("Describes a image disk.") -model ImageDisk { - @doc("The snapshot.") - snapshot?: SubResource; - - @doc("The managedDisk.") - managedDisk?: SubResource; - - @doc("The Virtual Hard Disk.") - blobUri?: string; - - @doc(""" -Specifies the caching requirements.

    Possible values are:

    -**None**

    **ReadOnly**

    **ReadWrite**

    Default: **None -for Standard storage. ReadOnly for Premium storage** -""") - caching?: CachingTypes; - - @doc(""" -Specifies the size of empty data disks in gigabytes. This element can be used -to overwrite the name of the disk in a virtual machine image.

    This -value cannot be larger than 1023 GB -""") - diskSizeGB?: int32; - - @doc(""" -Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can -only be used with data disks, it cannot be used with OS Disk. -""") - storageAccountType?: StorageAccountTypes; - - @doc(""" -Specifies the customer managed disk encryption set resource id for the managed -image disk. -""") - diskEncryptionSet?: DiskEncryptionSetParameters; -} - -@doc("Describes a data disk.") -model ImageDataDisk { - ...ImageDisk; - - @doc(""" -Specifies the logical unit number of the data disk. This value is used to -identify data disks within the VM and therefore must be unique for each data -disk attached to a VM. -""") - lun: int32; -} - -@doc("The source user image virtual hard disk. Only tags may be updated.") -model ImageUpdate { - ...UpdateResource; - - @doc("Describes the properties of an Image.") - properties?: ImageProperties; -} - -@doc("The List Image operation response.") -model ImageListResult is Azure.Core.Page; - -@doc("Create or update Restore Point collection parameters.") -model RestorePointCollection { - ...Resource; - - @doc("The restore point collection properties.") - properties?: RestorePointCollectionProperties; -} - -@doc("The restore point collection properties.") -model RestorePointCollectionProperties { - @doc(""" -The properties of the source resource that this restore point collection is -created from. -""") - source?: RestorePointCollectionSourceProperties; - - @doc("The provisioning state of the restore point collection.") - @visibility("read") - provisioningState?: string; - - @doc("The unique id of the restore point collection.") - @visibility("read") - restorePointCollectionId?: string; - - @doc(""" -A list containing all restore points created under this restore point -collection. -""") - @visibility("read") - restorePoints?: RestorePoint[]; -} - -@doc(""" -The properties of the source resource that this restore point collection is -created from. -""") -model RestorePointCollectionSourceProperties { - @doc("Location of the source resource used to create this restore point collection.") - @visibility("read") - location?: string; - - @doc("Resource Id of the source resource used to create this restore point collection") - id?: string; -} - -@doc("Restore Point details.") -model RestorePoint { - ...ProxyResource; - - @doc("The restore point properties.") - properties?: RestorePointProperties; -} - -@doc("The restore point properties.") -model RestorePointProperties { - @doc(""" -List of disk resource ids that the customer wishes to exclude from the restore -point. If no disks are specified, all disks will be included. -""") - excludeDisks?: ApiEntityReference[]; - - @doc("Gets the details of the VM captured at the time of the restore point creation.") - @visibility("read") - sourceMetadata?: RestorePointSourceMetadata; - - @doc("Gets the provisioning state of the restore point.") - @visibility("read") - provisioningState?: string; - - @doc(""" -ConsistencyMode of the RestorePoint. Can be specified in the input while -creating a restore point. For now, only CrashConsistent is accepted as a valid -input. Please refer to https://aka.ms/RestorePoints for more details. -""") - consistencyMode?: ConsistencyModeTypes; - - @doc("Gets the creation time of the restore point.") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - timeCreated?: utcDateTime; - - @doc("Resource Id of the source restore point from which a copy needs to be created.") - sourceRestorePoint?: ApiEntityReference; - - @doc("The restore point instance view.") - @visibility("read") - instanceView?: RestorePointInstanceView; -} - -@doc(""" -Describes the properties of the Virtual Machine for which the restore point was -created. The properties provided are a subset and the snapshot of the overall -Virtual Machine properties captured at the time of the restore point creation. -""") -model RestorePointSourceMetadata { - @doc("Gets the hardware profile.") - hardwareProfile?: HardwareProfile; - - @doc("Gets the storage profile.") - storageProfile?: RestorePointSourceVMStorageProfile; - - @doc("Gets the OS profile.") - osProfile?: OSProfile; - - @doc("Gets the diagnostics profile.") - diagnosticsProfile?: DiagnosticsProfile; - - @doc("Gets the license type, which is for bring your own license scenario.") - licenseType?: string; - - @doc("Gets the virtual machine unique id.") - vmId?: string; - - @doc("Gets the security profile.") - securityProfile?: SecurityProfile; - - @doc("Location of the VM from which the restore point was created.") - location?: string; -} - -@doc("Describes the storage profile.") -model RestorePointSourceVMStorageProfile { - @doc("Gets the OS disk of the VM captured at the time of the restore point creation.") - osDisk?: RestorePointSourceVmosDisk; - - @doc(""" -Gets the data disks of the VM captured at the time of the restore point -creation. -""") - dataDisks?: RestorePointSourceVMDataDisk[]; -} - -@doc("Describes an Operating System disk.") -model RestorePointSourceVmosDisk { - @doc("Gets the Operating System type.") - osType?: OperatingSystemType; - - @doc("Gets the disk encryption settings.") - encryptionSettings?: DiskEncryptionSettings; - - @doc("Gets the disk name.") - name?: string; - - @doc("Gets the caching type.") - caching?: CachingTypes; - - @doc("Gets the disk size in GB.") - diskSizeGB?: int32; - - @doc("Gets the managed disk details") - managedDisk?: ManagedDiskParameters; - - @doc("Gets the disk restore point Id.") - diskRestorePoint?: ApiEntityReference; -} - -@doc("Describes a data disk.") -model RestorePointSourceVMDataDisk { - @doc("Gets the logical unit number.") - lun?: int32; - - @doc("Gets the disk name.") - name?: string; - - @doc("Gets the caching type.") - caching?: CachingTypes; - - @doc(""" -Gets the initial disk size in GB for blank data disks, and the new desired size -for existing OS and Data disks. -""") - diskSizeGB?: int32; - - @doc("Gets the managed disk details") - managedDisk?: ManagedDiskParameters; - - @doc("Gets the disk restore point Id.") - diskRestorePoint?: ApiEntityReference; -} - -@doc("The instance view of a restore point.") -model RestorePointInstanceView { - @doc("The disk restore points information.") - diskRestorePoints?: DiskRestorePointInstanceView[]; - - @doc("The resource status information.") - statuses?: InstanceViewStatus[]; -} - -@doc("The instance view of a disk restore point.") -model DiskRestorePointInstanceView { - @doc("Disk restore point Id.") - id?: string; - - @doc("The disk restore point replication status information.") - replicationStatus?: DiskRestorePointReplicationStatus; -} - -@doc("The instance view of a disk restore point.") -model DiskRestorePointReplicationStatus { - @doc("The resource status information.") - status?: InstanceViewStatus; - - @doc("Replication completion percentage.") - completionPercent?: int32; -} - -@doc(""" -The resource model definition for an Azure Resource Manager proxy resource. It -will not have tags and a location -""") -model ProxyResource { - @doc("Resource Id") - @visibility("read") - id?: string; - - @doc("Resource name") - @visibility("read") - name?: string; - - @doc("Resource type") - @visibility("read") - type?: string; -} - -@doc("Update Restore Point collection parameters.") -model RestorePointCollectionUpdate { - ...UpdateResource; - - @doc("The restore point collection properties.") - properties?: RestorePointCollectionProperties; -} - -@doc("The List restore point collection operation response.") -model RestorePointCollectionListResult - is Azure.Core.Page; - -@doc(""" -Specifies information about the capacity reservation group that the capacity -reservations should be assigned to.

    Currently, a capacity reservation -can only be added to a capacity reservation group at creation time. An existing -capacity reservation cannot be added or moved to another capacity reservation -group. -""") -model CapacityReservationGroup { - ...Resource; - - @doc("capacity reservation group Properties.") - properties?: CapacityReservationGroupProperties; - - @doc(""" -Availability Zones to use for this capacity reservation group. The zones can be -assigned only during creation. If not provided, the group supports only -regional resources in the region. If provided, enforces each capacity -reservation in the group to be in one of the zones. -""") - zones?: string[]; -} - -@doc("capacity reservation group Properties.") -model CapacityReservationGroupProperties { - @doc(""" -A list of all capacity reservation resource ids that belong to capacity -reservation group. -""") - @visibility("read") - capacityReservations?: SubResourceReadOnly[]; - - @doc(""" -A list of references to all virtual machines associated to the capacity -reservation group. -""") - @visibility("read") - virtualMachinesAssociated?: SubResourceReadOnly[]; - - @doc(""" -The capacity reservation group instance view which has the list of instance -views for all the capacity reservations that belong to the capacity reservation -group. -""") - @visibility("read") - instanceView?: CapacityReservationGroupInstanceView; -} - -model CapacityReservationGroupInstanceView { - @doc(""" -List of instance view of the capacity reservations under the capacity -reservation group. -""") - @visibility("read") - capacityReservations?: CapacityReservationInstanceViewWithName[]; -} - -@doc(""" -The instance view of a capacity reservation that includes the name of the -capacity reservation. It is used for the response to the instance view of a -capacity reservation group. -""") -model CapacityReservationInstanceViewWithName { - ...CapacityReservationInstanceView; - - @doc("The name of the capacity reservation.") - @visibility("read") - name?: string; -} - -@doc(""" -The instance view of a capacity reservation that provides as snapshot of the -runtime properties of the capacity reservation that is managed by the platform -and can change outside of control plane operations. -""") -model CapacityReservationInstanceView { - @doc("Unutilized capacity of the capacity reservation.") - utilizationInfo?: CapacityReservationUtilization; - - @doc("The resource status information.") - statuses?: InstanceViewStatus[]; -} - -@doc("Represents the capacity reservation utilization in terms of resources allocated.") -model CapacityReservationUtilization { - @doc(""" -The value provides the current capacity of the VM size which was reserved -successfully and for which the customer is getting billed.

    Minimum -api-version: 2022-08-01. -""") - @visibility("read") - currentCapacity?: int32; - - @doc(""" -A list of all virtual machines resource ids allocated against the capacity -reservation. -""") - @visibility("read") - virtualMachinesAllocated?: SubResourceReadOnly[]; -} - -@doc(""" -Specifies information about the capacity reservation group. Only tags can be -updated. -""") -model CapacityReservationGroupUpdate { - ...UpdateResource; - - @doc("capacity reservation group Properties.") - properties?: CapacityReservationGroupProperties; -} - -@doc("The List capacity reservation group with resource group response.") -model CapacityReservationGroupListResult - is Azure.Core.Page; - -@doc("Specifies information about the capacity reservation.") -model CapacityReservation { - ...Resource; - - @doc("Properties of the Capacity reservation.") - properties?: CapacityReservationProperties; - - @doc(""" -SKU of the resource for which capacity needs be reserved. The SKU name and -capacity is required to be set. Currently VM Skus with the capability called -'CapacityReservationSupported' set to true are supported. Refer to List -Microsoft.Compute SKUs in a region -(https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported -values. -""") - sku: Sku; - - @doc(""" -Availability Zone to use for this capacity reservation. The zone has to be -single value and also should be part for the list of zones specified during the -capacity reservation group creation. The zone can be assigned only during -creation. If not provided, the reservation supports only non-zonal deployments. -If provided, enforces VM/VMSS using this capacity reservation to be in same -zone. -""") - zones?: string[]; -} - -@doc("Properties of the Capacity reservation.") -model CapacityReservationProperties { - @doc(""" -A unique id generated and assigned to the capacity reservation by the platform -which does not change throughout the lifetime of the resource. -""") - @visibility("read") - reservationId?: string; - - @doc(""" -Specifies the value of fault domain count that Capacity Reservation supports -for requested VM size.
    NOTE: The fault domain count specified for a resource -(like virtual machines scale set) must be less than or equal to this value if -it deploys using capacity reservation.

    Minimum api-version: 2022-08-01. -""") - @visibility("read") - platformFaultDomainCount?: int32; - - @doc(""" -A list of all virtual machine resource ids that are associated with the -capacity reservation. -""") - @visibility("read") - virtualMachinesAssociated?: SubResourceReadOnly[]; - - @doc("The date time when the capacity reservation was last updated.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - provisioningTime?: utcDateTime; - - @doc("The provisioning state, which only appears in the response.") - @visibility("read") - provisioningState?: string; - - @doc("The Capacity reservation instance view.") - @visibility("read") - instanceView?: CapacityReservationInstanceView; - - @doc(""" -Specifies the time at which the Capacity Reservation resource was -created.

    Minimum api-version: 2021-11-01. -""") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - timeCreated?: utcDateTime; -} - -@doc(""" -Specifies information about the capacity reservation. Only tags and -sku.capacity can be updated. -""") -model CapacityReservationUpdate { - ...UpdateResource; - - @doc("Properties of the Capacity reservation.") - properties?: CapacityReservationProperties; - - @doc(""" -SKU of the resource for which capacity needs be reserved. The SKU name and -capacity is required to be set. Currently VM Skus with the capability called -'CapacityReservationSupported' set to true are supported. Refer to List -Microsoft.Compute SKUs in a region -(https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported -values. -""") - sku?: Sku; -} - -@doc("The list capacity reservation operation response.") -model CapacityReservationListResult is Azure.Core.Page; - -@doc("Api request input for LogAnalytics getRequestRateByInterval Api.") -model RequestRateByIntervalInput { - ...LogAnalyticsInputBase; - - @doc("Interval value in minutes used to create LogAnalytics call rate logs.") - intervalLength: IntervalInMins; -} - -@doc("Api input base class for LogAnalytics Api.") -model LogAnalyticsInputBase { - @doc(""" -SAS Uri of the logging blob container to which LogAnalytics Api writes output -logs to. -""") - blobContainerSasUri: string; - - @doc("From time of the query") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - fromTime: utcDateTime; - - @doc("To time of the query") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - toTime: utcDateTime; - - @doc("Group query result by Throttle Policy applied.") - groupByThrottlePolicy?: boolean; - - @doc("Group query result by Operation Name.") - groupByOperationName?: boolean; - - @doc("Group query result by Resource Name.") - groupByResourceName?: boolean; - - @doc("Group query result by Client Application ID.") - groupByClientApplicationId?: boolean; - - @doc("Group query result by User Agent.") - groupByUserAgent?: boolean; -} - -@doc("LogAnalytics operation status response") -model LogAnalyticsOperationResult { - @doc("LogAnalyticsOutput") - @visibility("read") - properties?: LogAnalyticsOutput; -} - -@doc("LogAnalytics output properties") -model LogAnalyticsOutput { - @doc("Output file Uri path to blob container.") - @visibility("read") - output?: string; -} - -@doc("Api request input for LogAnalytics getThrottledRequests Api.") -model ThrottledRequestsInput { - ...LogAnalyticsInputBase; -} - -@doc("The List Virtual Machine operation response.") -model RunCommandListResult is Azure.Core.Page; - -@doc("Describes the properties of a Run Command metadata.") -model RunCommandDocumentBase { - @doc("The VM run command schema.") - @projectedName("json", "$schema") - schema: string; - - @doc("The VM run command id.") - id: string; - - @doc("The Operating System type.") - osType: OperatingSystemTypes; - - @doc("The VM run command label.") - label: string; - - @doc("The VM run command description.") - description: string; -} - -@doc("Describes the properties of a Run Command.") -model RunCommandDocument { - ...RunCommandDocumentBase; - - @doc("The script to be executed.") - script: string[]; - - @doc("The parameters used by the script.") - parameters?: RunCommandParameterDefinition[]; -} - -@doc("Describes the properties of a run command parameter.") -model RunCommandParameterDefinition { - @doc("The run command parameter name.") - name: string; - - @doc("The run command parameter type.") - type: string; - - @doc("The run command parameter default value.") - defaultValue?: string; - - @doc("The run command parameter required.") - required?: boolean; -} - -@doc("Capture Virtual Machine parameters.") -model RunCommandInput { - @doc("The run command id.") - commandId: string; - - @doc(""" -Optional. The script to be executed. When this value is given, the given -script will override the default script of the command. -""") - script?: string[]; - - @doc("The run command parameters.") - parameters?: RunCommandInputParameter[]; -} - -@doc("Describes the properties of a run command parameter.") -model RunCommandInputParameter { - @doc("The run command parameter name.") - name: string; - - @doc("The run command parameter value.") - value: string; -} - -model RunCommandResult { - @doc("Run command operation response.") - value?: InstanceViewStatus[]; -} - -@doc("Describes a Virtual Machine run command.") -model VirtualMachineRunCommand { - ...Resource; - - @doc("Describes the properties of a Virtual Machine run command.") - properties?: VirtualMachineRunCommandProperties; -} - -@doc("Describes the properties of a Virtual Machine run command.") -model VirtualMachineRunCommandProperties { - @doc("The source of the run command script.") - source?: VirtualMachineRunCommandScriptSource; - - @doc("The parameters used by the script.") - parameters?: RunCommandInputParameter[]; - - @doc("The parameters used by the script.") - protectedParameters?: RunCommandInputParameter[]; - - @doc(""" -Optional. If set to true, provisioning will complete as soon as the script -starts and will not wait for script to complete. -""") - asyncExecution?: boolean; - - @doc("Specifies the user account on the VM when executing the run command.") - runAsUser?: string; - - @doc("Specifies the user account password on the VM when executing the run command.") - runAsPassword?: string; - - @doc("The timeout in seconds to execute the run command.") - timeoutInSeconds?: int32; - - @doc("Specifies the Azure storage blob where script output stream will be uploaded.") - outputBlobUri?: string; - - @doc("Specifies the Azure storage blob where script error stream will be uploaded.") - errorBlobUri?: string; - - @doc("The provisioning state, which only appears in the response.") - @visibility("read") - provisioningState?: string; - - @doc("The virtual machine run command instance view.") - @visibility("read") - instanceView?: VirtualMachineRunCommandInstanceView; -} - -@doc("Describes the script sources for run command.") -model VirtualMachineRunCommandScriptSource { - @doc("Specifies the script content to be executed on the VM.") - script?: string; - - @doc("Specifies the script download location.") - scriptUri?: string; - - @doc("Specifies a commandId of predefined built-in script.") - commandId?: string; -} - -@doc("The instance view of a virtual machine run command.") -model VirtualMachineRunCommandInstanceView { - @doc("Script execution status.") - executionState?: ExecutionState; - - @doc("Communicate script configuration errors or execution messages.") - executionMessage?: string; - - @doc("Exit code returned from script execution.") - exitCode?: int32; - - @doc("Script output stream.") - output?: string; - - @doc("Script error stream.") - error?: string; - - @doc("Script start time.") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - startTime?: utcDateTime; - - @doc("Script end time.") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - endTime?: utcDateTime; - - @doc("The resource status information.") - statuses?: InstanceViewStatus[]; -} - -@doc("Describes a Virtual Machine run command.") -model VirtualMachineRunCommandUpdate { - ...UpdateResource; - - @doc("Describes the properties of a Virtual Machine run command.") - properties?: VirtualMachineRunCommandProperties; -} - -@doc("The List run command operation response") -model VirtualMachineRunCommandsListResult - is Azure.Core.Page; diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/routes.tsp b/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/routes.tsp deleted file mode 100644 index 1170645791..0000000000 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/routes.tsp +++ /dev/null @@ -1,4961 +0,0 @@ -import "@azure-tools/typespec-azure-core"; -import "@typespec/rest"; -import "./models.tsp"; - -using TypeSpec.Rest; -using TypeSpec.Http; - -namespace Compute; - -interface OperationsOperations { - @doc("Gets a list of compute operations.") - @route("/providers/Microsoft.Compute/operations") - @get - List is Azure.Core.Foundations.Operation<{}, ComputeOperationListResult>; -} - -interface UsageOperations { - @doc(""" -Gets, for the specified location, the current compute resource usage -information as well as the limits for compute resources under the subscription. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages") - @get - List is Azure.Core.Foundations.Operation< - { - @doc("The location for which resource usage is queried.") - @path - location: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - ListUsagesResult - >; -} - -interface VirtualMachineSizesOperations { - @doc(""" -This API is deprecated. Use [Resources -Skus](https://docs.microsoft.com/rest/api/compute/resourceskus/list) -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes") - @get - List is Azure.Core.Foundations.Operation< - { - @doc("The location upon which virtual-machine-sizes is queried.") - @path - location: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineSizeListResult - >; -} - -interface VirtualMachineScaleSetsOperations { - @doc(""" -Gets all the VM scale sets under the specified subscription for the specified -location. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachineScaleSets") - @get - ListByLocation is Azure.Core.Foundations.Operation< - { - @doc("The location for which VM scale sets under the subscription are queried.") - @path - location: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineScaleSetListResult - >; - - @doc("Create or update a VM scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}") - @put - CreateOrUpdate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set to create or update.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("The scale set object.") - @body - parameters: VirtualMachineScaleSet; - }, - VirtualMachineScaleSet - >; - - @doc("Update a VM scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set to create or update.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("The scale set object.") - @body - parameters: VirtualMachineScaleSetUpdate; - }, - VirtualMachineScaleSet - >; - - @doc("Deletes a VM scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("Optional parameter to force delete a VM scale set. (Feature in Preview)") - @query - forceDeletion: boolean; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Display information about a virtual machine scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc(""" -The expand expression to apply on the operation. 'UserData' retrieves the -UserData property of the VM scale set that was provided by the user during the -VM scale set Create/Update operation -""") - @query - $expand: ExpandTypesForGetVMScaleSets; - }, - VirtualMachineScaleSet - >; - - @doc(""" -Deallocates specific virtual machines in a VM scale set. Shuts down the virtual -machines and releases the compute resources. You are not billed for the compute -resources that this virtual machine scale set deallocates. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate") - @post - Deallocate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("A list of virtual machine instance IDs from the VM scale set.") - @body - vmInstanceIDs: VirtualMachineScaleSetVMInstanceIDs; - }, - void - >; - - @doc("Deletes virtual machines in a VM scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete") - @post - DeleteInstances is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Optional parameter to force delete virtual machines from the VM scale set. -(Feature in Preview) -""") - @query - forceDeletion: boolean; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("A list of virtual machine instance IDs from the VM scale set.") - @body - vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs; - }, - void - >; - - @doc("Gets the status of a VM scale set instance.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView") - @get - GetInstanceView is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineScaleSetInstanceView - >; - - @doc("Gets a list of all VM scale sets under a resource group.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets") - @get - List is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineScaleSetListResult - >; - - @doc(""" -Gets a list of all VM Scale Sets in the subscription, regardless of the -associated resource group. Use nextLink property in the response to get the -next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM -Scale Sets. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets") - @get - ListAll is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineScaleSetListWithLinkResult - >; - - @doc(""" -Gets a list of SKUs available for your VM scale set, including the minimum and -maximum VM instances allowed for each SKU. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus") - @get - ListSkus is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineScaleSetListSkusResult - >; - - @doc("Gets list of OS upgrades on a VM scale set instance.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory") - @get - GetOSUpgradeHistory is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineScaleSetListOSUpgradeHistory - >; - - @doc(""" -Power off (stop) one or more virtual machines in a VM scale set. Note that -resources are still attached and you are getting charged for the resources. -Instead, use deallocate to release resources and avoid charges. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff") - @post - PowerOff is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -The parameter to request non-graceful VM shutdown. True value for this flag -indicates non-graceful shutdown whereas false indicates otherwise. Default -value for this flag is false if not specified -""") - @query - skipShutdown: boolean; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("A list of virtual machine instance IDs from the VM scale set.") - @body - vmInstanceIDs: VirtualMachineScaleSetVMInstanceIDs; - }, - void - >; - - @doc("Restarts one or more virtual machines in a VM scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart") - @post - Restart is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("A list of virtual machine instance IDs from the VM scale set.") - @body - vmInstanceIDs: VirtualMachineScaleSetVMInstanceIDs; - }, - void - >; - - @doc("Starts one or more virtual machines in a VM scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start") - @post - Start is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("A list of virtual machine instance IDs from the VM scale set.") - @body - vmInstanceIDs: VirtualMachineScaleSetVMInstanceIDs; - }, - void - >; - - @doc(""" -Shuts down all the virtual machines in the virtual machine scale set, moves -them to a new node, and powers them back on. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy") - @post - Redeploy is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("A list of virtual machine instance IDs from the VM scale set.") - @body - vmInstanceIDs: VirtualMachineScaleSetVMInstanceIDs; - }, - void - >; - - @doc(""" -Perform maintenance on one or more virtual machines in a VM scale set. -Operation on instances which are not eligible for perform maintenance will be -failed. Please refer to best practices for more details: -https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance") - @post - PerformMaintenance is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("A list of virtual machine instance IDs from the VM scale set.") - @body - vmInstanceIDs: VirtualMachineScaleSetVMInstanceIDs; - }, - void - >; - - @doc(""" -Upgrades one or more virtual machines to the latest SKU set in the VM scale set -model. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade") - @post - UpdateInstances is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("A list of virtual machine instance IDs from the VM scale set.") - @body - vmInstanceIDs: VirtualMachineScaleSetVMInstanceRequiredIDs; - }, - void - >; - - @doc(""" -Reimages (upgrade the operating system) one or more virtual machines in a VM -scale set which don't have a ephemeral OS disk, for virtual machines who have a -ephemeral OS disk the virtual machine is reset to initial state. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage") - @post - Reimage is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters for Reimaging VM ScaleSet.") - @body - vmScaleSetReimageInput: VirtualMachineScaleSetReimageParameters; - }, - void - >; - - @doc(""" -Reimages all the disks ( including data disks ) in the virtual machines in a VM -scale set. This operation is only supported for managed disks. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall") - @post - ReimageAll is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("A list of virtual machine instance IDs from the VM scale set.") - @body - vmInstanceIDs: VirtualMachineScaleSetVMInstanceIDs; - }, - void - >; - - @doc(""" -Manual platform update domain walk to update virtual machines in a service -fabric virtual machine scale set. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk") - @post - ForceRecoveryServiceFabricPlatformUpdateDomainWalk is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("The platform update domain for which a manual recovery walk is requested") - @query - platformUpdateDomain: int32; - - @doc(""" -The zone in which the manual recovery walk is requested for cross zone virtual -machine scale set -""") - @query - zone: string; - - @doc("The placement group id for which the manual recovery walk is requested.") - @query - placementGroupId: string; - }, - RecoveryWalkResponse - >; - - @doc(""" -Converts SinglePlacementGroup property to false for a existing virtual machine -scale set. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/convertToSinglePlacementGroup") - @post - ConvertToSinglePlacementGroup is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine scale set to create or update.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("The input object for ConvertToSinglePlacementGroup API.") - @body - parameters: VMScaleSetConvertToSinglePlacementGroupInput; - }, - void - >; - - @doc("Changes ServiceState property for a given service") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/setOrchestrationServiceState") - @post - SetOrchestrationServiceState is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine scale set to create or update.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("The input object for SetOrchestrationServiceState API.") - @body - parameters: OrchestrationServiceStateInput; - }, - void - >; -} - -interface VirtualMachineScaleSetExtensionsOperations { - @doc("The operation to create or update an extension.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}") - @put - CreateOrUpdate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set where the extension should be create or updated.") - @path - vmScaleSetName: string; - - @doc("The name of the VM scale set extension.") - @path - vmssExtensionName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Create VM scale set Extension operation.") - @body - extensionParameters: VirtualMachineScaleSetExtension; - }, - VirtualMachineScaleSetExtension - >; - - @doc("The operation to update an extension.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set where the extension should be updated.") - @path - vmScaleSetName: string; - - @doc("The name of the VM scale set extension.") - @path - vmssExtensionName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Update VM scale set Extension operation.") - @body - extensionParameters: VirtualMachineScaleSetExtensionUpdate; - }, - VirtualMachineScaleSetExtension - >; - - @doc("The operation to delete the extension.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set where the extension should be deleted.") - @path - vmScaleSetName: string; - - @doc("The name of the VM scale set extension.") - @path - vmssExtensionName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("The operation to get the extension.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set containing the extension.") - @path - vmScaleSetName: string; - - @doc("The name of the VM scale set extension.") - @path - vmssExtensionName: string; - - @doc("The expand expression to apply on the operation.") - @query - $expand: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineScaleSetExtension - >; - - @doc("Gets a list of all extensions in a VM scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions") - @get - List is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set containing the extension.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineScaleSetExtensionListResult - >; -} - -interface VirtualMachineScaleSetRollingUpgradesOperations { - @doc("Cancels the current virtual machine scale set rolling upgrade.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel") - @post - Cancel is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -Starts a rolling upgrade to move all virtual machine scale set instances to the -latest available Platform Image OS version. Instances which are already running -the latest available OS version are not affected. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade") - @post - StartOSUpgrade is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -Starts a rolling upgrade to move all extensions for all virtual machine scale -set instances to the latest available extension version. Instances which are -already running the latest extension versions are not affected. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade") - @post - StartExtensionUpgrade is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Gets the status of the latest virtual machine scale set rolling upgrade.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest") - @get - GetLatest is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - RollingUpgradeStatusInfo - >; -} - -interface VirtualMachineScaleSetVMExtensionsOperations { - @doc("The operation to create or update the VMSS VM extension.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}") - @put - CreateOrUpdate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc("The name of the virtual machine extension.") - @path - vmExtensionName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Create Virtual Machine Extension operation.") - @body - extensionParameters: VirtualMachineScaleSetVMExtension; - }, - VirtualMachineScaleSetVMExtension - >; - - @doc("The operation to update the VMSS VM extension.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc("The name of the virtual machine extension.") - @path - vmExtensionName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Update Virtual Machine Extension operation.") - @body - extensionParameters: VirtualMachineScaleSetVMExtensionUpdate; - }, - VirtualMachineScaleSetVMExtension - >; - - @doc("The operation to delete the VMSS VM extension.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc("The name of the virtual machine extension.") - @path - vmExtensionName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("The operation to get the VMSS VM extension.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc("The name of the virtual machine extension.") - @path - vmExtensionName: string; - - @doc("The expand expression to apply on the operation.") - @query - $expand: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineScaleSetVMExtension - >; - - @doc("The operation to get all extensions of an instance in Virtual Machine Scaleset.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions") - @get - List is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc("The expand expression to apply on the operation.") - @query - $expand: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineScaleSetVMExtensionsListResult - >; -} - -interface VirtualMachineScaleSetVMsOperations { - @doc(""" -Reimages (upgrade the operating system) a specific virtual machine in a VM -scale set. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/reimage") - @post - Reimage is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters for the Reimaging Virtual machine in ScaleSet.") - @body - vmScaleSetVMReimageInput: VirtualMachineScaleSetVMReimageParameters; - }, - void - >; - - @doc(""" -Allows you to re-image all the disks ( including data disks ) in the a VM scale -set instance. This operation is only supported for managed disks. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/reimageall") - @post - ReimageAll is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -Deallocates a specific virtual machine in a VM scale set. Shuts down the -virtual machine and releases the compute resources it uses. You are not billed -for the compute resources of this virtual machine once it is deallocated. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/deallocate") - @post - Deallocate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Updates a virtual machine of a VM scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}") - @put - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set where the extension should be create or updated.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Update Virtual Machine Scale Sets VM operation.") - @body - parameters: VirtualMachineScaleSetVM; - }, - VirtualMachineScaleSetVM - >; - - @doc("Deletes a virtual machine from a VM scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc(""" -Optional parameter to force delete a virtual machine from a VM scale set. -(Feature in Preview) -""") - @query - forceDeletion: boolean; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Gets a virtual machine from a VM scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc(""" -The expand expression to apply on the operation. 'InstanceView' will retrieve -the instance view of the virtual machine. 'UserData' will retrieve the UserData -of the virtual machine. -""") - @query - $expand: InstanceViewTypes; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineScaleSetVM - >; - - @doc("Gets the status of a virtual machine from a VM scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/instanceView") - @get - GetInstanceView is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineScaleSetVMInstanceView - >; - - @doc("Gets a list of all virtual machines in a VM scale sets.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines") - @get - List is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - virtualMachineScaleSetName: string; - - @doc(""" -The filter to apply to the operation. Allowed values are -'startswith(instanceView/statuses/code, 'PowerState') eq true', -'properties/latestModelApplied eq true', 'properties/latestModelApplied eq -false'. -""") - @query - $filter: string; - - @doc("The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'.") - @query - $select: string; - - @doc(""" -The expand expression to apply to the operation. Allowed values are -'instanceView'. -""") - @query - $expand: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineScaleSetVMListResult - >; - - @doc(""" -Power off (stop) a virtual machine in a VM scale set. Note that resources are -still attached and you are getting charged for the resources. Instead, use -deallocate to release resources and avoid charges. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff") - @post - PowerOff is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc(""" -The parameter to request non-graceful VM shutdown. True value for this flag -indicates non-graceful shutdown whereas false indicates otherwise. Default -value for this flag is false if not specified -""") - @query - skipShutdown: boolean; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Restarts a virtual machine in a VM scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart") - @post - Restart is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Starts a virtual machine in a VM scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start") - @post - Start is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -Shuts down the virtual machine in the virtual machine scale set, moves it to a -new node, and powers it back on. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy") - @post - Redeploy is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -The operation to retrieve SAS URIs of boot diagnostic logs for a virtual -machine in a VM scale set. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/retrieveBootDiagnosticsData") - @post - RetrieveBootDiagnosticsData is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc(""" -Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 -minutes.

    NOTE: If not specified, SAS URIs will be generated with a -default expiration duration of 120 minutes. -""") - @query - sasUriExpirationTimeInMinutes: int32; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - RetrieveBootDiagnosticsDataResult - >; - - @doc("Performs maintenance on a virtual machine in a VM scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance") - @post - PerformMaintenance is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -The operation to simulate the eviction of spot virtual machine in a VM scale -set. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/simulateEviction") - @post - SimulateEviction is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Run command on a virtual machine in a VM scale set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand") - @post - RunCommand is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Run command operation.") - @body - parameters: RunCommandInput; - - @doc("Accept header") - @header - Accept: "application/json, text/json"; - }, - RunCommandResult | void - >; -} - -interface VirtualMachineExtensionsOperations { - @doc("The operation to create or update the extension.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}") - @put - CreateOrUpdate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc(""" -The name of the virtual machine where the extension should be created or -updated. -""") - @path - vmName: string; - - @doc("The name of the virtual machine extension.") - @path - vmExtensionName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Create Virtual Machine Extension operation.") - @body - extensionParameters: VirtualMachineExtension; - }, - VirtualMachineExtension - >; - - @doc("The operation to update the extension.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine where the extension should be updated.") - @path - vmName: string; - - @doc("The name of the virtual machine extension.") - @path - vmExtensionName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Update Virtual Machine Extension operation.") - @body - extensionParameters: VirtualMachineExtensionUpdate; - }, - VirtualMachineExtension - >; - - @doc("The operation to delete the extension.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine where the extension should be deleted.") - @path - vmName: string; - - @doc("The name of the virtual machine extension.") - @path - vmExtensionName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("The operation to get the extension.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine containing the extension.") - @path - vmName: string; - - @doc("The name of the virtual machine extension.") - @path - vmExtensionName: string; - - @doc("The expand expression to apply on the operation.") - @query - $expand: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineExtension - >; - - @doc("The operation to get all extensions of a Virtual Machine.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions") - @get - List is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine containing the extension.") - @path - vmName: string; - - @doc("The expand expression to apply on the operation.") - @query - $expand: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineExtensionsListResult - >; -} - -interface VirtualMachinesOperations { - @doc(""" -Gets all the virtual machines under the specified subscription for the -specified location. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines") - @get - ListByLocation is Azure.Core.Foundations.Operation< - { - @doc("The location for which virtual machines under the subscription are queried.") - @path - location: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineListResult - >; - - @doc(""" -Captures the VM by copying virtual hard disks of the VM and outputs a template -that can be used to create similar VMs. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture") - @post - Capture is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Capture Virtual Machine operation.") - @body - parameters: VirtualMachineCaptureParameters; - }, - VirtualMachineCaptureResult | void - >; - - @doc(""" -The operation to create or update a virtual machine. Please note some -properties can be set only during virtual machine creation. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") - @put - CreateOrUpdate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Create Virtual Machine operation.") - @body - parameters: VirtualMachine; - }, - VirtualMachine - >; - - @doc("The operation to update a virtual machine.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Update Virtual Machine operation.") - @body - parameters: VirtualMachineUpdate; - }, - VirtualMachine - >; - - @doc("The operation to delete a virtual machine.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc("Optional parameter to force delete virtual machines.") - @query - forceDeletion: boolean; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -Retrieves information about the model view or the instance view of a virtual -machine. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -The expand expression to apply on the operation. 'InstanceView' retrieves a -snapshot of the runtime properties of the virtual machine that is managed by -the platform and can change outside of control plane operations. 'UserData' -retrieves the UserData property as part of the VM model view that was provided -by the user during the VM Create/Update operation. -""") - @query - $expand: InstanceViewTypes; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachine - >; - - @doc("Retrieves information about the run-time state of a virtual machine.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView") - @get - InstanceView is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineInstanceView - >; - - @doc(""" -Converts virtual machine disks from blob-based to managed disks. Virtual -machine must be stop-deallocated before invoking this operation. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks") - @post - ConvertToManagedDisks is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -Shuts down the virtual machine and releases the compute resources. You are not -billed for the compute resources that this virtual machine uses. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate") - @post - Deallocate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc("Optional parameter to hibernate a virtual machine. (Feature in Preview)") - @query - hibernate: boolean; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -Sets the OS state of the virtual machine to generalized. It is recommended to -sysprep the virtual machine before performing this operation.
    For Windows, -please refer to [Create a managed image of a generalized VM in -Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource).
    For -Linux, please refer to [How to create an image of a virtual machine or -VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize") - @post - Generalize is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -Lists all of the virtual machines in the specified resource group. Use the -nextLink property in the response to get the next page of virtual machines. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines") - @get - List is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc(""" -The system query option to filter VMs returned in the response. Allowed value -is 'virtualMachineScaleSet/id' eq -/subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}' -""") - @query - $filter: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineListResult - >; - - @doc(""" -Lists all of the virtual machines in the specified subscription. Use the -nextLink property in the response to get the next page of virtual machines. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines") - @get - ListAll is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc(""" -statusOnly=true enables fetching run time status of all Virtual Machines in the -subscription. -""") - @query - statusOnly: string; - - @doc(""" -The system query option to filter VMs returned in the response. Allowed value -is 'virtualMachineScaleSet/id' eq -/subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}' -""") - @query - $filter: string; - }, - VirtualMachineListResult - >; - - @doc(""" -Lists all available virtual machine sizes to which the specified virtual -machine can be resized. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes") - @get - ListAvailableSizes is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineSizeListResult - >; - - @doc(""" -The operation to power off (stop) a virtual machine. The virtual machine can be -restarted with the same provisioned resources. You are still charged for this -virtual machine. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff") - @post - PowerOff is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -The parameter to request non-graceful VM shutdown. True value for this flag -indicates non-graceful shutdown whereas false indicates otherwise. Default -value for this flag is false if not specified -""") - @query - skipShutdown: boolean; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("The operation to reapply a virtual machine's state.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reapply") - @post - Reapply is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("The operation to restart a virtual machine.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart") - @post - Restart is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("The operation to start a virtual machine.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start") - @post - Start is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Shuts down the virtual machine, moves it to a new node, and powers it back on.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy") - @post - Redeploy is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -Reimages the virtual machine which has an ephemeral OS disk back to its initial -state. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage") - @post - Reimage is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Reimage Virtual Machine operation.") - @body - parameters: VirtualMachineReimageParameters; - }, - void - >; - - @doc("The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/retrieveBootDiagnosticsData") - @post - RetrieveBootDiagnosticsData is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 -minutes.

    NOTE: If not specified, SAS URIs will be generated with a -default expiration duration of 120 minutes. -""") - @query - sasUriExpirationTimeInMinutes: int32; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - RetrieveBootDiagnosticsDataResult - >; - - @doc("The operation to perform maintenance on a virtual machine.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance") - @post - PerformMaintenance is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("The operation to simulate the eviction of spot virtual machine.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/simulateEviction") - @post - SimulateEviction is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Assess patches on the VM.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/assessPatches") - @post - AssessPatches is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineAssessPatchesResult | void - >; - - @doc("Installs patches on the VM.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/installPatches") - @post - InstallPatches is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Input for InstallPatches as directly received by the API") - @body - installPatchesInput: VirtualMachineInstallPatchesParameters; - }, - VirtualMachineInstallPatchesResult | void - >; - - @doc("Run command on the VM.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand") - @post - RunCommand is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine.") - @path - vmName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Run command operation.") - @body - parameters: RunCommandInput; - - @doc("Accept header") - @header - Accept: "application/json, text/json"; - }, - RunCommandResult | void - >; -} - -interface VirtualMachineImagesOperations { - @doc("Gets a virtual machine image.") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of a supported Azure region.") - @path - location: string; - - @doc("A valid image publisher.") - @path - publisherName: string; - - @doc("A valid image publisher offer.") - @path - offer: string; - - @doc("A valid image SKU.") - @path - skus: string; - - @doc("A valid image SKU version.") - @path - version: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineImage - >; - - @doc(""" -Gets a list of all virtual machine image versions for the specified location, -publisher, offer, and SKU. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions") - @get - List is Azure.Core.Foundations.Operation< - { - @doc("The name of a supported Azure region.") - @path - location: string; - - @doc("A valid image publisher.") - @path - publisherName: string; - - @doc("A valid image publisher offer.") - @path - offer: string; - - @doc("A valid image SKU.") - @path - skus: string; - - @doc("The expand expression to apply on the operation.") - @query - $expand: string; - - @query $top: int32; - @query $orderby: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -Gets a list of virtual machine image offers for the specified location and -publisher. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers") - @get - ListOffers is Azure.Core.Foundations.Operation< - { - @doc("The name of a supported Azure region.") - @path - location: string; - - @doc("A valid image publisher.") - @path - publisherName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -Gets a list of virtual machine image publishers for the specified Azure -location. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers") - @get - ListPublishers is Azure.Core.Foundations.Operation< - { - @doc("The name of a supported Azure region.") - @path - location: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -Gets a list of virtual machine image SKUs for the specified location, -publisher, and offer. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus") - @get - ListSkus is Azure.Core.Foundations.Operation< - { - @doc("The name of a supported Azure region.") - @path - location: string; - - @doc("A valid image publisher.") - @path - publisherName: string; - - @doc("A valid image publisher offer.") - @path - offer: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Gets a list of all virtual machine image versions for the specified edge zone") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/vmimages") - @get - ListByEdgeZone is Azure.Core.Foundations.Operation< - { - @doc("The name of a supported Azure region.") - @path - location: string; - - @doc("The name of the edge zone.") - @path - edgeZone: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VmImagesInEdgeZoneListResult - >; -} - -interface VirtualMachineImagesEdgeZoneOperations { - @doc("Gets a virtual machine image in an edge zone.") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of a supported Azure region.") - @path - location: string; - - @doc("The name of the edge zone.") - @path - edgeZone: string; - - @doc("A valid image publisher.") - @path - publisherName: string; - - @doc("A valid image publisher offer.") - @path - offer: string; - - @doc("A valid image SKU.") - @path - skus: string; - - @doc("A valid image SKU version.") - @path - version: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineImage - >; - - @doc(""" -Gets a list of all virtual machine image versions for the specified location, -edge zone, publisher, offer, and SKU. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions") - @get - List is Azure.Core.Foundations.Operation< - { - @doc("The name of a supported Azure region.") - @path - location: string; - - @doc("The name of the edge zone.") - @path - edgeZone: string; - - @doc("A valid image publisher.") - @path - publisherName: string; - - @doc("A valid image publisher offer.") - @path - offer: string; - - @doc("A valid image SKU.") - @path - skus: string; - - @doc("The expand expression to apply on the operation.") - @query - $expand: string; - - @doc(""" -An integer value specifying the number of images to return that matches -supplied values. -""") - @query - $top: int32; - - @doc("Specifies the order of the results returned. Formatted as an OData query.") - @query - $orderby: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -Gets a list of virtual machine image offers for the specified location, edge -zone and publisher. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers") - @get - ListOffers is Azure.Core.Foundations.Operation< - { - @doc("The name of a supported Azure region.") - @path - location: string; - - @doc("The name of the edge zone.") - @path - edgeZone: string; - - @doc("A valid image publisher.") - @path - publisherName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -Gets a list of virtual machine image publishers for the specified Azure -location and edge zone. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers") - @get - ListPublishers is Azure.Core.Foundations.Operation< - { - @doc("The name of a supported Azure region.") - @path - location: string; - - @doc("The name of the edge zone.") - @path - edgeZone: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc(""" -Gets a list of virtual machine image SKUs for the specified location, edge -zone, publisher, and offer. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus") - @get - ListSkus is Azure.Core.Foundations.Operation< - { - @doc("The name of a supported Azure region.") - @path - location: string; - - @doc("The name of the edge zone.") - @path - edgeZone: string; - - @doc("A valid image publisher.") - @path - publisherName: string; - - @doc("A valid image publisher offer.") - @path - offer: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; -} - -interface VirtualMachineExtensionImagesOperations { - @doc("Gets a virtual machine extension image.") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of a supported Azure region.") - @path - location: string; - - @path publisherName: string; - @path type: string; - @path version: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineExtensionImage - >; - - @doc("Gets a list of virtual machine extension image types.") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types") - @get - ListTypes is Azure.Core.Foundations.Operation< - { - @doc("The name of a supported Azure region.") - @path - location: string; - - @path publisherName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Gets a list of virtual machine extension image versions.") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions") - @get - ListVersions is Azure.Core.Foundations.Operation< - { - @doc("The name of a supported Azure region.") - @path - location: string; - - @path publisherName: string; - @path type: string; - - @doc("The filter to apply on the operation.") - @query - $filter: string; - - @query $top: int32; - @query $orderby: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; -} - -interface AvailabilitySetsOperations { - @doc("Create or update an availability set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}") - @put - CreateOrUpdate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the availability set.") - @path - availabilitySetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Create Availability Set operation.") - @body - parameters: AvailabilitySet; - }, - AvailabilitySet - >; - - @doc("Update an availability set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the availability set.") - @path - availabilitySetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Update Availability Set operation.") - @body - parameters: AvailabilitySetUpdate; - }, - AvailabilitySet - >; - - @doc("Delete an availability set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the availability set.") - @path - availabilitySetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Retrieves information about an availability set.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the availability set.") - @path - availabilitySetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - AvailabilitySet - >; - - @doc("Lists all availability sets in a subscription.") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets") - @get - ListBySubscription is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc(""" -The expand expression to apply to the operation. Allowed values are -'instanceView'. -""") - @query - $expand: string; - }, - AvailabilitySetListResult - >; - - @doc("Lists all availability sets in a resource group.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets") - @get - List is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - AvailabilitySetListResult - >; - - @doc(""" -Lists all available virtual machine sizes that can be used to create a new -virtual machine in an existing availability set. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes") - @get - ListAvailableSizes is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the availability set.") - @path - availabilitySetName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - VirtualMachineSizeListResult - >; -} - -interface ProximityPlacementGroupsOperations { - @doc("Create or update a proximity placement group.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}") - @put - CreateOrUpdate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the proximity placement group.") - @path - proximityPlacementGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Create Proximity Placement Group operation.") - @body - parameters: ProximityPlacementGroup; - }, - ProximityPlacementGroup - >; - - @doc("Update a proximity placement group.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the proximity placement group.") - @path - proximityPlacementGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Update Proximity Placement Group operation.") - @body - parameters: ProximityPlacementGroupUpdate; - }, - ProximityPlacementGroup - >; - - @doc("Delete a proximity placement group.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the proximity placement group.") - @path - proximityPlacementGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Retrieves information about a proximity placement group .") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the proximity placement group.") - @path - proximityPlacementGroupName: string; - - @doc(""" -includeColocationStatus=true enables fetching the colocation status of all the -resources in the proximity placement group. -""") - @query - includeColocationStatus: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - ProximityPlacementGroup - >; - - @doc("Lists all proximity placement groups in a subscription.") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups") - @get - ListBySubscription is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - ProximityPlacementGroupListResult - >; - - @doc("Lists all proximity placement groups in a resource group.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups") - @get - ListByResourceGroup is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - ProximityPlacementGroupListResult - >; -} - -interface DedicatedHostGroupsOperations { - @doc(""" -Create or update a dedicated host group. For details of Dedicated Host and -Dedicated Host Groups please see [Dedicated Host Documentation] -(https://go.microsoft.com/fwlink/?linkid=2082596) -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}") - @put - CreateOrUpdate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the dedicated host group.") - @path - hostGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Create Dedicated Host Group.") - @body - parameters: DedicatedHostGroup; - }, - DedicatedHostGroup - >; - - @doc("Update an dedicated host group.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the dedicated host group.") - @path - hostGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Update Dedicated Host Group operation.") - @body - parameters: DedicatedHostGroupUpdate; - }, - DedicatedHostGroup - >; - - @doc("Delete a dedicated host group.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the dedicated host group.") - @path - hostGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Retrieves information about a dedicated host group.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the dedicated host group.") - @path - hostGroupName: string; - - @doc(""" -The expand expression to apply on the operation. 'InstanceView' will retrieve -the list of instance views of the dedicated hosts under the dedicated host -group. 'UserData' is not supported for dedicated host group. -""") - @query - $expand: InstanceViewTypes; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - DedicatedHostGroup - >; - - @doc(""" -Lists all of the dedicated host groups in the specified resource group. Use the -nextLink property in the response to get the next page of dedicated host -groups. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups") - @get - ListByResourceGroup is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - DedicatedHostGroupListResult - >; - - @doc(""" -Lists all of the dedicated host groups in the subscription. Use the nextLink -property in the response to get the next page of dedicated host groups. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/hostGroups") - @get - ListBySubscription is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - DedicatedHostGroupListResult - >; -} - -interface DedicatedHostsOperations { - @doc("Create or update a dedicated host .") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}") - @put - CreateOrUpdate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the dedicated host group.") - @path - hostGroupName: string; - - @doc("The name of the dedicated host .") - @path - hostName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Create Dedicated Host.") - @body - parameters: DedicatedHost; - }, - DedicatedHost - >; - - @doc("Update an dedicated host .") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the dedicated host group.") - @path - hostGroupName: string; - - @doc("The name of the dedicated host .") - @path - hostName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Update Dedicated Host operation.") - @body - parameters: DedicatedHostUpdate; - }, - DedicatedHost - >; - - @doc("Delete a dedicated host.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the dedicated host group.") - @path - hostGroupName: string; - - @doc("The name of the dedicated host.") - @path - hostName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Retrieves information about a dedicated host.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the dedicated host group.") - @path - hostGroupName: string; - - @doc("The name of the dedicated host.") - @path - hostName: string; - - @doc(""" -The expand expression to apply on the operation. 'InstanceView' will retrieve -the list of instance views of the dedicated host. 'UserData' is not supported -for dedicated host. -""") - @query - $expand: InstanceViewTypes; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - DedicatedHost - >; - - @doc(""" -Lists all of the dedicated hosts in the specified dedicated host group. Use the -nextLink property in the response to get the next page of dedicated hosts. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts") - @get - ListByHostGroup is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the dedicated host group.") - @path - hostGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - DedicatedHostListResult - >; - - @doc(""" -Restart the dedicated host. The operation will complete successfully once the -dedicated host has restarted and is running. To determine the health of VMs -deployed on the dedicated host after the restart check the Resource Health -Center in the Azure Portal. Please refer to -https://docs.microsoft.com/azure/service-health/resource-health-overview for -more details. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}/restart") - @post - Restart is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the dedicated host group.") - @path - hostGroupName: string; - - @doc("The name of the dedicated host.") - @path - hostName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; -} - -interface SshPublicKeysOperations { - @doc(""" -Lists all of the SSH public keys in the subscription. Use the nextLink property -in the response to get the next page of SSH public keys. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/sshPublicKeys") - @get - ListBySubscription is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - SshPublicKeysGroupListResult - >; - - @doc(""" -Lists all of the SSH public keys in the specified resource group. Use the -nextLink property in the response to get the next page of SSH public keys. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys") - @get - ListByResourceGroup is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - SshPublicKeysGroupListResult - >; - - @doc("Creates a new SSH public key resource.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}") - @put - Create is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the SSH public key.") - @path - sshPublicKeyName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to create the SSH public key.") - @body - parameters: SshPublicKeyResource; - }, - SshPublicKeyResource - >; - - @doc("Updates a new SSH public key resource.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the SSH public key.") - @path - sshPublicKeyName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to update the SSH public key.") - @body - parameters: SshPublicKeyUpdateResource; - }, - SshPublicKeyResource - >; - - @doc("Delete an SSH public key.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the SSH public key.") - @path - sshPublicKeyName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Retrieves information about an SSH public key.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the SSH public key.") - @path - sshPublicKeyName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - SshPublicKeyResource - >; - - @doc(""" -Generates and returns a public/private key pair and populates the SSH public -key resource with the public key. The length of the key will be 3072 bits. This -operation can only be performed once per SSH public key resource. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}/generateKeyPair") - @post - GenerateKeyPair is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the SSH public key.") - @path - sshPublicKeyName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - SshPublicKeyGenerateKeyPairResult - >; -} - -interface ImagesOperations { - @doc("Create or update an image.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}") - @put - CreateOrUpdate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the image.") - @path - imageName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Create Image operation.") - @body - parameters: Image; - }, - Image - >; - - @doc("Update an image.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the image.") - @path - imageName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Update Image operation.") - @body - parameters: ImageUpdate; - }, - Image - >; - - @doc("Deletes an Image.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the image.") - @path - imageName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("Gets an image.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the image.") - @path - imageName: string; - - @doc("The expand expression to apply on the operation.") - @query - $expand: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - Image - >; - - @doc("Gets the list of images under a resource group.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images") - @get - ListByResourceGroup is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - ImageListResult - >; - - @doc(""" -Gets the list of Images in the subscription. Use nextLink property in the -response to get the next page of Images. Do this till nextLink is null to fetch -all the Images. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images") - @get - List is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - ImageListResult - >; -} - -interface RestorePointCollectionsOperations { - @doc(""" -The operation to create or update the restore point collection. Please refer to -https://aka.ms/RestorePoints for more details. When updating a restore point -collection, only tags may be modified. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}") - @put - CreateOrUpdate is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the restore point collection.") - @path - restorePointCollectionName: string; - - @doc("Parameters supplied to the Create or Update restore point collection operation.") - @body - parameters: RestorePointCollection; - }, - RestorePointCollection - >; - - @doc("The operation to update the restore point collection.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the restore point collection.") - @path - restorePointCollectionName: string; - - @doc("Parameters supplied to the Update restore point collection operation.") - @body - parameters: RestorePointCollectionUpdate; - }, - RestorePointCollection - >; - - @doc(""" -The operation to delete the restore point collection. This operation will also -delete all the contained restore points. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the Restore Point Collection.") - @path - restorePointCollectionName: string; - }, - void - >; - - @doc("The operation to get the restore point collection.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the restore point collection.") - @path - restorePointCollectionName: string; - - @doc(""" -The expand expression to apply on the operation. If expand=restorePoints, -server will return all contained restore points in the restorePointCollection. -""") - @query - $expand: RestorePointCollectionExpandOptions; - }, - RestorePointCollection - >; - - @doc("Gets the list of restore point collections in a resource group.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections") - @get - List is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("The name of the resource group.") - @path - resourceGroupName: string; - }, - RestorePointCollectionListResult - >; - - @doc(""" -Gets the list of restore point collections in the subscription. Use nextLink -property in the response to get the next page of restore point collections. Do -this till nextLink is not null to fetch all the restore point collections. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/restorePointCollections") - @get - ListAll is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - RestorePointCollectionListResult - >; -} - -interface RestorePointsOperations { - @doc(""" -The operation to create the restore point. Updating properties of an existing -restore point is not allowed -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}") - @put - Create is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the restore point collection.") - @path - restorePointCollectionName: string; - - @doc("The name of the restore point.") - @path - restorePointName: string; - - @doc("Parameters supplied to the Create restore point operation.") - @body - parameters: RestorePoint; - }, - RestorePoint - >; - - @doc("The operation to delete the restore point.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the Restore Point Collection.") - @path - restorePointCollectionName: string; - - @doc("The name of the restore point.") - @path - restorePointName: string; - }, - void - >; - - @doc("The operation to get the restore point.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the restore point collection.") - @path - restorePointCollectionName: string; - - @doc("The name of the restore point.") - @path - restorePointName: string; - - @doc(""" -The expand expression to apply on the operation. 'InstanceView' retrieves -information about the run-time state of a restore point. -""") - @query - $expand: RestorePointExpandOptions; - }, - RestorePoint - >; -} - -interface CapacityReservationGroupsOperations { - @doc(""" -The operation to create or update a capacity reservation group. When updating a -capacity reservation group, only tags may be modified. Please refer to -https://aka.ms/CapacityReservation for more details. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}") - @put - CreateOrUpdate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the capacity reservation group.") - @path - capacityReservationGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Create capacity reservation Group.") - @body - parameters: CapacityReservationGroup; - }, - CapacityReservationGroup - >; - - @doc(""" -The operation to update a capacity reservation group. When updating a capacity -reservation group, only tags may be modified. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the capacity reservation group.") - @path - capacityReservationGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Update capacity reservation Group operation.") - @body - parameters: CapacityReservationGroupUpdate; - }, - CapacityReservationGroup - >; - - @doc(""" -The operation to delete a capacity reservation group. This operation is allowed -only if all the associated resources are disassociated from the reservation -group and all capacity reservations under the reservation group have also been -deleted. Please refer to https://aka.ms/CapacityReservation for more details. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the capacity reservation group.") - @path - capacityReservationGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("The operation that retrieves information about a capacity reservation group.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the capacity reservation group.") - @path - capacityReservationGroupName: string; - - @doc(""" -The expand expression to apply on the operation. 'InstanceView' will retrieve -the list of instance views of the capacity reservations under the capacity -reservation group which is a snapshot of the runtime properties of a capacity -reservation that is managed by the platform and can change outside of control -plane operations. -""") - @query - $expand: CapacityReservationGroupInstanceViewTypes; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - CapacityReservationGroup - >; - - @doc(""" -Lists all of the capacity reservation groups in the specified resource group. -Use the nextLink property in the response to get the next page of capacity -reservation groups. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups") - @get - ListByResourceGroup is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc(""" -The expand expression to apply on the operation. Based on the expand param(s) -specified we return Virtual Machine or ScaleSet VM Instance or both resource -Ids which are associated to capacity reservation group in the response. -""") - @query - $expand: ExpandTypesForGetCapacityReservationGroups; - }, - CapacityReservationGroupListResult - >; - - @doc(""" -Lists all of the capacity reservation groups in the subscription. Use the -nextLink property in the response to get the next page of capacity reservation -groups. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/capacityReservationGroups") - @get - ListBySubscription is Azure.Core.Foundations.Operation< - { - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc(""" -The expand expression to apply on the operation. Based on the expand param(s) -specified we return Virtual Machine or ScaleSet VM Instance or both resource -Ids which are associated to capacity reservation group in the response. -""") - @query - $expand: ExpandTypesForGetCapacityReservationGroups; - }, - CapacityReservationGroupListResult - >; -} - -interface CapacityReservationsOperations { - @doc(""" -The operation to create or update a capacity reservation. Please note some -properties can be set only during capacity reservation creation. Please refer -to https://aka.ms/CapacityReservation for more details. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}") - @put - CreateOrUpdate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the capacity reservation group.") - @path - capacityReservationGroupName: string; - - @doc("The name of the capacity reservation.") - @path - capacityReservationName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Create capacity reservation.") - @body - parameters: CapacityReservation; - }, - CapacityReservation - >; - - @doc("The operation to update a capacity reservation.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the capacity reservation group.") - @path - capacityReservationGroupName: string; - - @doc("The name of the capacity reservation.") - @path - capacityReservationName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Update capacity reservation operation.") - @body - parameters: CapacityReservationUpdate; - }, - CapacityReservation | void - >; - - @doc(""" -The operation to delete a capacity reservation. This operation is allowed only -when all the associated resources are disassociated from the capacity -reservation. Please refer to https://aka.ms/CapacityReservation for more -details. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the capacity reservation group.") - @path - capacityReservationGroupName: string; - - @doc("The name of the capacity reservation.") - @path - capacityReservationName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - void - >; - - @doc("The operation that retrieves information about the capacity reservation.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the capacity reservation group.") - @path - capacityReservationGroupName: string; - - @doc("The name of the capacity reservation.") - @path - capacityReservationName: string; - - @doc(""" -The expand expression to apply on the operation. 'InstanceView' retrieves a -snapshot of the runtime properties of the capacity reservation that is managed -by the platform and can change outside of control plane operations. -""") - @query - $expand: CapacityReservationInstanceViewTypes; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - CapacityReservation - >; - - @doc(""" -Lists all of the capacity reservations in the specified capacity reservation -group. Use the nextLink property in the response to get the next page of -capacity reservations. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations") - @get - ListByCapacityReservationGroup is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the capacity reservation group.") - @path - capacityReservationGroupName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - }, - CapacityReservationListResult - >; -} - -interface LogAnalyticsOperations { - @doc(""" -Export logs that show Api requests made by this subscription in the given time -window to show throttling activities. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval") - @post - ExportRequestRateByInterval is Azure.Core.Foundations.Operation< - { - @doc("The location upon which virtual-machine-sizes is queried.") - @path - location: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the LogAnalytics getRequestRateByInterval Api.") - @body - parameters: RequestRateByIntervalInput; - }, - LogAnalyticsOperationResult | void - >; - - @doc(""" -Export logs that show total throttled Api requests for this subscription in the -given time window. -""") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests") - @post - ExportThrottledRequests is Azure.Core.Foundations.Operation< - { - @doc("The location upon which virtual-machine-sizes is queried.") - @path - location: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the LogAnalytics getThrottledRequests Api.") - @body - parameters: ThrottledRequestsInput; - }, - LogAnalyticsOperationResult | void - >; -} - -interface VirtualMachineRunCommandsOperations { - @doc("Lists all available run commands for a subscription in a location.") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands") - @get - List is Azure.Core.Foundations.Operation< - { - @doc("The location upon which run commands is queried.") - @path - location: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Accept header") - @header - Accept: "application/json, text/json"; - }, - RunCommandListResult - >; - - @doc("Gets specific run command for a subscription in a location.") - @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The location upon which run commands is queried.") - @path - location: string; - - @doc("The command id.") - @path - commandId: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Accept header") - @header - Accept: "application/json, text/json"; - }, - RunCommandDocument - >; - - @doc("The operation to create or update the run command.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}") - @put - CreateOrUpdate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc(""" -The name of the virtual machine where the run command should be created or -updated. -""") - @path - vmName: string; - - @doc("The name of the virtual machine run command.") - @path - runCommandName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Create Virtual Machine RunCommand operation.") - @body - runCommand: VirtualMachineRunCommand; - - @doc("Accept header") - @header - Accept: "application/json, text/json"; - }, - VirtualMachineRunCommand - >; - - @doc("The operation to update the run command.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine where the run command should be updated.") - @path - vmName: string; - - @doc("The name of the virtual machine run command.") - @path - runCommandName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Update Virtual Machine RunCommand operation.") - @body - runCommand: VirtualMachineRunCommandUpdate; - - @doc("Accept header") - @header - Accept: "application/json, text/json"; - }, - VirtualMachineRunCommand - >; - - @doc("The operation to delete the run command.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine where the run command should be deleted.") - @path - vmName: string; - - @doc("The name of the virtual machine run command.") - @path - runCommandName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Accept header") - @header - Accept: "application/json, text/json"; - }, - void - >; - - @doc("The operation to get the run command.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}") - @get - GetByVirtualMachine is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine containing the run command.") - @path - vmName: string; - - @doc("The name of the virtual machine run command.") - @path - runCommandName: string; - - @doc("The expand expression to apply on the operation.") - @query - $expand: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Accept header") - @header - Accept: "application/json, text/json"; - }, - VirtualMachineRunCommand - >; - - @doc("The operation to get all run commands of a Virtual Machine.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands") - @get - ListByVirtualMachine is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the virtual machine containing the run command.") - @path - vmName: string; - - @doc("The expand expression to apply on the operation.") - @query - $expand: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Accept header") - @header - Accept: "application/json, text/json"; - }, - VirtualMachineRunCommandsListResult - >; -} - -interface VirtualMachineScaleSetVMRunCommandsOperations { - @doc("The operation to create or update the VMSS VM run command.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") - @put - CreateOrUpdate is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc("The name of the virtual machine run command.") - @path - runCommandName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Create Virtual Machine RunCommand operation.") - @body - runCommand: VirtualMachineRunCommand; - - @doc("Accept header") - @header - Accept: "application/json, text/json"; - }, - VirtualMachineRunCommand - >; - - @doc("The operation to update the VMSS VM run command.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") - @patch - Update is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc("The name of the virtual machine run command.") - @path - runCommandName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Parameters supplied to the Update Virtual Machine RunCommand operation.") - @body - runCommand: VirtualMachineRunCommandUpdate; - - @doc("Accept header") - @header - Accept: "application/json, text/json"; - }, - VirtualMachineRunCommand - >; - - @doc("The operation to delete the VMSS VM run command.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") - @delete - Delete is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc("The name of the virtual machine run command.") - @path - runCommandName: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Accept header") - @header - Accept: "application/json, text/json"; - }, - void - >; - - @doc("The operation to get the VMSS VM run command.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") - @get - Get is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc("The name of the virtual machine run command.") - @path - runCommandName: string; - - @doc("The expand expression to apply on the operation.") - @query - $expand: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Accept header") - @header - Accept: "application/json, text/json"; - }, - VirtualMachineRunCommand - >; - - @doc(""" -The operation to get all run commands of an instance in Virtual Machine -Scaleset. -""") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands") - @get - List is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - - @doc("The instance ID of the virtual machine.") - @path - instanceId: string; - - @doc("The expand expression to apply on the operation.") - @query - $expand: string; - - @doc(""" -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. -""") - @path - subscriptionId: string; - - @doc("Accept header") - @header - Accept: "application/json, text/json"; - }, - VirtualMachineRunCommandsListResult - >; -} diff --git a/packages/extensions/openapi-to-cadl/test/batch/tsp-output/main.tsp b/packages/extensions/openapi-to-cadl/test/batch/tsp-output/main.tsp deleted file mode 100644 index 37779b8329..0000000000 --- a/packages/extensions/openapi-to-cadl/test/batch/tsp-output/main.tsp +++ /dev/null @@ -1,19 +0,0 @@ -import "@typespec/rest"; -import "@typespec/http"; -import "./routes.tsp"; - -using TypeSpec.Rest; -using TypeSpec.Http; -@service({ - title: "Azure Batch Service", - version: "2022-01-01.15.0", -}) -@server( - "{batchUrl}", - "A client for issuing REST requests to the Azure Batch service.", - { - batchUrl: string, - } -) -@doc("A client for issuing REST requests to the Azure Batch service.") -namespace Azure.Batch; diff --git a/packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/tspconfig.yaml deleted file mode 100644 index 013d55ba1e..0000000000 --- a/packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/tspconfig.yaml +++ /dev/null @@ -1,14 +0,0 @@ -emit: - - "@azure-tools/typespec-autorest": - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/complexObject/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-cadl/test/complexObject/tsp-output/tspconfig.yaml deleted file mode 100644 index 013d55ba1e..0000000000 --- a/packages/extensions/openapi-to-cadl/test/complexObject/tsp-output/tspconfig.yaml +++ /dev/null @@ -1,14 +0,0 @@ -emit: - - "@azure-tools/typespec-autorest": - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/confidentialLedger/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-cadl/test/confidentialLedger/tsp-output/tspconfig.yaml deleted file mode 100644 index 013d55ba1e..0000000000 --- a/packages/extensions/openapi-to-cadl/test/confidentialLedger/tsp-output/tspconfig.yaml +++ /dev/null @@ -1,14 +0,0 @@ -emit: - - "@azure-tools/typespec-autorest": - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/main.tsp b/packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/main.tsp deleted file mode 100644 index 2b7979132b..0000000000 --- a/packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/main.tsp +++ /dev/null @@ -1,22 +0,0 @@ -import "@typespec/rest"; -import "@typespec/http"; -import "./routes.tsp"; - -using TypeSpec.Rest; -using TypeSpec.Http; -@service({ - title: "Azure Keyvault Service", - version: "7.4-preview.1", -}) -@server( - "{vaultBaseUrl}", - "The key vault client performs cryptographic key operations and vault operations against the Key Vault service.", - { - vaultBaseUrl: string, - } -) -@doc(""" -The key vault client performs cryptographic key operations and vault operations -against the Key Vault service. -""") -namespace Azure.Keyvault; diff --git a/packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/tspconfig.yaml deleted file mode 100644 index 013d55ba1e..0000000000 --- a/packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/tspconfig.yaml +++ /dev/null @@ -1,14 +0,0 @@ -emit: - - "@azure-tools/typespec-autorest": - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/loadTest/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-cadl/test/loadTest/tsp-output/tspconfig.yaml deleted file mode 100644 index 013d55ba1e..0000000000 --- a/packages/extensions/openapi-to-cadl/test/loadTest/tsp-output/tspconfig.yaml +++ /dev/null @@ -1,14 +0,0 @@ -emit: - - "@azure-tools/typespec-autorest": - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/nh/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-cadl/test/nh/tsp-output/tspconfig.yaml deleted file mode 100644 index 013d55ba1e..0000000000 --- a/packages/extensions/openapi-to-cadl/test/nh/tsp-output/tspconfig.yaml +++ /dev/null @@ -1,14 +0,0 @@ -emit: - - "@azure-tools/typespec-autorest": - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/openAI/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-cadl/test/openAI/tsp-output/tspconfig.yaml deleted file mode 100644 index 013d55ba1e..0000000000 --- a/packages/extensions/openapi-to-cadl/test/openAI/tsp-output/tspconfig.yaml +++ /dev/null @@ -1,14 +0,0 @@ -emit: - - "@azure-tools/typespec-autorest": - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/pagination/tsp-output/main.tsp b/packages/extensions/openapi-to-cadl/test/pagination/tsp-output/main.tsp deleted file mode 100644 index 92d1b5d3b0..0000000000 --- a/packages/extensions/openapi-to-cadl/test/pagination/tsp-output/main.tsp +++ /dev/null @@ -1,19 +0,0 @@ -import "@typespec/rest"; -import "@typespec/http"; -import "./routes.tsp"; - -using TypeSpec.Rest; -using TypeSpec.Http; -@service({ - title: "AutoRest Paging Test Service", - version: "1.0.0", -}) -@server( - "{$host}", - "Long-running Operation for AutoRest", - { - $host: string, - } -) -@doc("Long-running Operation for AutoRest") -namespace AutoRestPagingTestService; diff --git a/packages/extensions/openapi-to-cadl/test/pagination/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-cadl/test/pagination/tsp-output/tspconfig.yaml deleted file mode 100644 index 013d55ba1e..0000000000 --- a/packages/extensions/openapi-to-cadl/test/pagination/tsp-output/tspconfig.yaml +++ /dev/null @@ -1,14 +0,0 @@ -emit: - - "@azure-tools/typespec-autorest": - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/qna/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-cadl/test/qna/tsp-output/tspconfig.yaml deleted file mode 100644 index 013d55ba1e..0000000000 --- a/packages/extensions/openapi-to-cadl/test/qna/tsp-output/tspconfig.yaml +++ /dev/null @@ -1,14 +0,0 @@ -emit: - - "@azure-tools/typespec-autorest": - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/tspconfig.yaml deleted file mode 100644 index 013d55ba1e..0000000000 --- a/packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/tspconfig.yaml +++ /dev/null @@ -1,14 +0,0 @@ -emit: - - "@azure-tools/typespec-autorest": - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/qnaRuntime/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-cadl/test/qnaRuntime/tsp-output/tspconfig.yaml deleted file mode 100644 index 013d55ba1e..0000000000 --- a/packages/extensions/openapi-to-cadl/test/qnaRuntime/tsp-output/tspconfig.yaml +++ /dev/null @@ -1,14 +0,0 @@ -emit: - - "@azure-tools/typespec-autorest": - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/schemaRegistry/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-cadl/test/schemaRegistry/tsp-output/tspconfig.yaml deleted file mode 100644 index 013d55ba1e..0000000000 --- a/packages/extensions/openapi-to-cadl/test/schemaRegistry/tsp-output/tspconfig.yaml +++ /dev/null @@ -1,14 +0,0 @@ -emit: - - "@azure-tools/typespec-autorest": - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/url/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-cadl/test/url/tsp-output/tspconfig.yaml deleted file mode 100644 index 013d55ba1e..0000000000 --- a/packages/extensions/openapi-to-cadl/test/url/tsp-output/tspconfig.yaml +++ /dev/null @@ -1,14 +0,0 @@ -emit: - - "@azure-tools/typespec-autorest": - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/tspconfig.yaml deleted file mode 100644 index 013d55ba1e..0000000000 --- a/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/tspconfig.yaml +++ /dev/null @@ -1,14 +0,0 @@ -emit: - - "@azure-tools/typespec-autorest": - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/.eslintignore b/packages/extensions/openapi-to-typespec/.eslintignore similarity index 100% rename from packages/extensions/openapi-to-cadl/.eslintignore rename to packages/extensions/openapi-to-typespec/.eslintignore diff --git a/packages/extensions/openapi-to-cadl/.eslintrc.yaml b/packages/extensions/openapi-to-typespec/.eslintrc.yaml similarity index 100% rename from packages/extensions/openapi-to-cadl/.eslintrc.yaml rename to packages/extensions/openapi-to-typespec/.eslintrc.yaml diff --git a/packages/extensions/openapi-to-cadl/.npmignore b/packages/extensions/openapi-to-typespec/.npmignore similarity index 100% rename from packages/extensions/openapi-to-cadl/.npmignore rename to packages/extensions/openapi-to-typespec/.npmignore diff --git a/packages/extensions/openapi-to-cadl/CHANGELOG.json b/packages/extensions/openapi-to-typespec/CHANGELOG.json similarity index 98% rename from packages/extensions/openapi-to-cadl/CHANGELOG.json rename to packages/extensions/openapi-to-typespec/CHANGELOG.json index 166cb73053..e7a6eefe52 100644 --- a/packages/extensions/openapi-to-cadl/CHANGELOG.json +++ b/packages/extensions/openapi-to-typespec/CHANGELOG.json @@ -1,5 +1,5 @@ { - "name": "@autorest/openapi-to-cadl", + "name": "@autorest/openapi-to-typespec", "entries": [ { "version": "0.6.0", diff --git a/packages/extensions/openapi-to-cadl/CHANGELOG.md b/packages/extensions/openapi-to-typespec/CHANGELOG.md similarity index 93% rename from packages/extensions/openapi-to-cadl/CHANGELOG.md rename to packages/extensions/openapi-to-typespec/CHANGELOG.md index 26a8b27dd9..1561580466 100644 --- a/packages/extensions/openapi-to-cadl/CHANGELOG.md +++ b/packages/extensions/openapi-to-typespec/CHANGELOG.md @@ -1,4 +1,4 @@ -# Change Log - @autorest/openapi-to-cadl +# Change Log - @autorest/openapi-to-typespec This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. diff --git a/packages/extensions/openapi-to-cadl/LICENSE b/packages/extensions/openapi-to-typespec/LICENSE similarity index 100% rename from packages/extensions/openapi-to-cadl/LICENSE rename to packages/extensions/openapi-to-typespec/LICENSE diff --git a/packages/extensions/openapi-to-typespec/README.md b/packages/extensions/openapi-to-typespec/README.md new file mode 100644 index 0000000000..8e19453638 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/README.md @@ -0,0 +1,51 @@ +## Autorest openapi-to-typespec Plugin Configuration + +Autorest extension to scaffold a new TypeSpec definition from an existing OpenApi document. + +To run it + +```bash +autorest --openapi-to-typespec --input-file= --namespace= --title="" --use=@autorest/openapi-to-typespec@next --output-folder=. +``` + +or with a README config file + +```bash +autorest --openapi-to-typespec --require=.md --use=@autorest/openapi-to-typespec@next --output-folder=. +``` + +This plugin will generate the following files + +main.tsp - Entry point of the TypeSpec project, it contains service information +models.tsp - Contains all the model definitions +routes.tsp - Contains all the resource endpoints +tsproject.yaml - Contains configuration for the TypeSpec compiler +package.json - Configuration of the TypeSpec project + +```yaml +version: 3.6.6 +use-extension: + "@autorest/modelerfour": "^4.23.5" + +modelerfour: + # this runs a pre-namer step to clean up names + prenamer: false + +openapi-to-typespec-scope/emitter: + input-artifact: openapi-to-typespec-files + +output-artifact: openapi-to-typespec-files + +pipeline: + source-swagger-detector: + input: openapi-document/multi-api/identity + openapi-to-typespec: # <- name of plugin + input: + - modelerfour/identity + - source-swagger-detector + output-artifact: openapi-to-typespec-files + + openapi-to-typespec/emitter: + input: openapi-to-typespec + scope: openapi-to-typespec-scope/emitter +``` diff --git a/packages/extensions/openapi-to-typespec/convert.ps1 b/packages/extensions/openapi-to-typespec/convert.ps1 new file mode 100644 index 0000000000..094c5ad3b0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/convert.ps1 @@ -0,0 +1,67 @@ +<# + .SYNOPSIS + Convert ARM swagger to TypeSpec. + + .DESCRIPTION + This script will help to call csharp codegen and converter codegen to convert an ARM specific swagger into TypeSpec. + + .EXAMPLE + pwsh convert.ps1 https://github.com/Azure/azure-rest-api-specs/blob/main/specification/sphere/resource-manager/readme.md +#> + +param( + [Parameter(Mandatory)] + [string] + # Specifies the swagger config file, not the swagger json, but the readme config. + $swaggerConfigFile, + [string] + # Specified the output folder, deafult to current folder. + $outputFolder, + [string] + # Specified the csharp codegen, default to https://aka.ms/azsdk/openapi-to-typespec-csharp. + $csharpCodegen = "https://aka.ms/azsdk/openapi-to-typespec-csharp", + [string] + # Specified the converter codegen, default to https://aka.ms/azsdk/openapi-to-typespec. + $converterCodegen = "" +) + +function GenerateMetadata () +{ + Write-Host "##Generating metadata with csharp codegen in $outputFolder with $csharpCodegen" + $cmd = "autorest --csharp --max-memory-size=8192 --use=`"$csharpCodegen`" --output-folder=$outputFolder --mgmt-debug.only-generate-metadata --azure-arm --skip-csproj $swaggerConfigFile" + Write-Host "$cmd" + Invoke-Expression $cmd + if ($LASTEXITCODE) { exit $LASTEXITCODE } + if (Test-Path (Join-Path $outputFolder resources.json)) + { + Remove-Item (Join-Path $outputFolder resources.json) + } + Rename-Item (Join-Path $outputFolder metadata.json) (Join-Path $outputFolder resources.json) +} + +function DoConvert () +{ + Write-Host "##Converting from swagger to tsp with in $outputFolder with $converterCodegen" + $cmd = "autorest --openapi-to-typespec --isArm --use=`"$converterCodegen`" --output-folder=$outputFolder --src-path=tsp-output $swaggerConfigFile" + Write-Host "$cmd" + Invoke-Expression $cmd + if ($LASTEXITCODE) { exit $LASTEXITCODE } +} + +if ([string]::IsNullOrEmpty($outputFolder)) +{ + $outputFolder = Get-Location +} +else +{ + $outputFolder = (Resolve-Path $outputFolder) -replace "(\\|\/)$" +} +Write-Host "##output folder is $outputFolder" + +if ([string]::IsNullOrEmpty($converterCodegen)) +{ + $converterCodegen = $PSScriptRoot +} + +GenerateMetadata +DoConvert diff --git a/packages/extensions/openapi-to-cadl/package.json b/packages/extensions/openapi-to-typespec/package.json similarity index 72% rename from packages/extensions/openapi-to-cadl/package.json rename to packages/extensions/openapi-to-typespec/package.json index bcf09c51d2..7ee8a35002 100644 --- a/packages/extensions/openapi-to-cadl/package.json +++ b/packages/extensions/openapi-to-typespec/package.json @@ -1,11 +1,11 @@ { - "name": "@autorest/openapi-to-cadl", + "name": "@autorest/openapi-to-typespec", "version": "0.6.0", "description": "Autorest plugin to scaffold a Typespec definition from an OpenAPI document", "main": "dist/main.js", "typings": "dist/main.d.ts", "scripts": { - "generate": "ts-node ./test/utils/generate-cadl.ts generate", + "generate": "ts-node ./test/utils/generate-typespec.ts generate", "test": "echo \"Error: no test specified\" && exit 1", "test:ci": "npm run generate && node ./test/utils/check-clean-tree.js", "clean": "rimraf ./dist ./temp", @@ -41,18 +41,22 @@ "@azure-tools/codegen": "~2.10.0", "@autorest/extension-base": "~3.6.0", "@autorest/codemodel": "~4.20.0", - "@typespec/compiler": "^0.50.0", - "@typespec/rest": "^0.50.0", - "@typespec/http": "^0.50.0", - "@typespec/versioning": "^0.50.0", - "@typespec/prettier-plugin-typespec": "^0.50.0", - "@azure-tools/typespec-azure-core": "^0.36.0", - "@azure-tools/typespec-autorest": "^0.36.0", + "@typespec/compiler": "^0.51.0", + "@typespec/rest": "^0.51.0", + "@typespec/http": "^0.51.0", + "@typespec/versioning": "^0.51.0", + "@typespec/prettier-plugin-typespec": "^0.51.0", + "@azure-tools/typespec-azure-core": "^0.37.2", + "@azure-tools/typespec-autorest": "^0.37.2", + "@azure-tools/typespec-azure-resource-manager": "^0.37.1", "@typespec/openapi": "^0.50.0", "@typespec/openapi3": "^0.50.0", - "prettier": "~3.1.0" + "prettier": "~3.1.0", + "lodash": "~4.17.20", + "pluralize": "^8.0.0" }, "devDependencies": { + "autorest": "~3.7.1", "typescript": "~5.2.2", "@types/prettier": "^2.7.0", "@types/webpack": "~5.28.5", @@ -62,7 +66,7 @@ "fs-extra": "^10.1.0", "@types/fs-extra": "^9.0.13", "chalk": "^4.1.0", - "@azure-tools/typespec-autorest": "^0.36.0", + "@azure-tools/typespec-autorest": "^0.37.2", "webpack-cli": "~5.1.4", "webpack": "~5.89.0", "@typescript-eslint/eslint-plugin": "^6.11.0", @@ -73,6 +77,9 @@ "eslint-plugin-unicorn": "~49.0.0", "eslint-plugin-import": "~2.29.0", "eslint": "^8.28.0", - "ts-loader": "~9.5.1" + "ts-loader": "~9.5.1", + "@types/lodash": "~4.14.168", + "@types/pluralize": "^0.0.30", + "@azure-tools/openapi": "~3.6.0" } } diff --git a/packages/extensions/openapi-to-cadl/src/autorest-session.ts b/packages/extensions/openapi-to-typespec/src/autorest-session.ts similarity index 56% rename from packages/extensions/openapi-to-cadl/src/autorest-session.ts rename to packages/extensions/openapi-to-typespec/src/autorest-session.ts index f2dd6f02cb..7e397b9296 100644 --- a/packages/extensions/openapi-to-cadl/src/autorest-session.ts +++ b/packages/extensions/openapi-to-typespec/src/autorest-session.ts @@ -2,6 +2,7 @@ import { CodeModel } from "@autorest/codemodel"; import { Session } from "@autorest/extension-base"; let _session: Session; +let _armCommonTypeVersion: string; export function setSession(session: Session): void { _session = session; @@ -10,3 +11,11 @@ export function setSession(session: Session): void { export function getSession(): Session { return _session; } + +export function setArmCommonTypeVersion(version: string): void { + _armCommonTypeVersion = version; +} + +export function getArmCommonTypeVersion(): string { + return _armCommonTypeVersion; +} diff --git a/packages/extensions/openapi-to-cadl/src/data-types.ts b/packages/extensions/openapi-to-typespec/src/data-types.ts similarity index 68% rename from packages/extensions/openapi-to-cadl/src/data-types.ts rename to packages/extensions/openapi-to-typespec/src/data-types.ts index 7862e97736..60a44784db 100644 --- a/packages/extensions/openapi-to-cadl/src/data-types.ts +++ b/packages/extensions/openapi-to-typespec/src/data-types.ts @@ -1,7 +1,7 @@ import { CodeModel, Schema } from "@autorest/codemodel"; -import { CadlDataType } from "./interfaces"; +import { TypespecDataType } from "./interfaces"; -const dataTypes = new WeakMap>(); +const dataTypes = new WeakMap>(); export function getDataTypes(codeModel: CodeModel) { let dataTypeMap = dataTypes.get(codeModel); diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts new file mode 100644 index 0000000000..8879cff456 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts @@ -0,0 +1,48 @@ +import { join } from "path"; +import { getSession } from "../autorest-session"; +import { generateArmResource } from "../generate/generate-arm-resource"; +import { TypespecProgram, TspArmResource } from "../interfaces"; +import { formatTypespecFile } from "../utils/format"; +import { getNamespace } from "../utils/namespace"; + +export async function emitArmResources(program: TypespecProgram, basePath: string) { + // Create a file per resource + const session = getSession(); + for (const armResource of program.models.armResources) { + const { modules, namespaces } = getResourcesImports(program, armResource); + const filePath = join(basePath, `${armResource.name}.tsp`); + const generatedResource = generateArmResource(armResource); + const content = [ + modules.join("\n"), + "\n", + namespaces.join("\n"), + "\n", + getNamespace(program), + generatedResource, + ].join("\n"); + session.writeFile({ filename: filePath, content: await formatTypespecFile(content, filePath) }); + } +} + +export function getResourcesImports(_program: TypespecProgram, armResource: TspArmResource) { + const imports = { + modules: [ + `import "@azure-tools/typespec-azure-core";`, + `import "@azure-tools/typespec-azure-resource-manager";`, + `import "@typespec/rest";`, + `import "./models.tsp";`, + ], + namespaces: [ + `using TypeSpec.Rest;`, + `using Azure.ResourceManager;`, + `using Azure.ResourceManager.Foundations;`, + `using TypeSpec.Http;`, + ], + }; + + if (armResource.resourceParent?.name) { + imports.modules.push(`import "./${armResource.resourceParent.name}.tsp";`); + } + + return imports; +} diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-main.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-main.ts new file mode 100644 index 0000000000..5706d088e1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-main.ts @@ -0,0 +1,63 @@ +import { getSession } from "../autorest-session"; +import { generateServiceInformation } from "../generate/generate-service-information"; +import { TypespecProgram } from "../interfaces"; +import { getOptions } from "../options"; +import { formatTypespecFile } from "../utils/format"; +import { getArmResourcesMetadata } from "../utils/resource-discovery"; + +export async function emitMain(filePath: string, program: TypespecProgram): Promise { + const { isArm } = getOptions(); + const content = isArm ? getArmServiceInformation(program) : getServiceInformation(program); + const session = getSession(); + session.writeFile({ filename: filePath, content: await formatTypespecFile(content, filePath) }); +} + +function getServiceInformation(program: TypespecProgram) { + const imports = [ + `import "@typespec/rest";`, + `import "@typespec/http";`, + `import "./routes.tsp";`, + ``, + `using TypeSpec.Rest;`, + `using TypeSpec.Http;`, + ]; + const content = generateServiceInformation(program); + + return [...imports, content].join("\n"); +} + +function getArmServiceInformation(program: TypespecProgram) { + const imports = [ + `import "@typespec/rest";`, + `import "@typespec/versioning";`, + `import "@azure-tools/typespec-azure-core";`, + `import "@azure-tools/typespec-azure-resource-manager";`, + `import "./models.tsp";`, + ...getArmResourceImports(program), + ``, + `using TypeSpec.Rest;`, + `using TypeSpec.Http;`, + `using Azure.ResourceManager.Foundations;`, + `using Azure.Core;`, + `using Azure.ResourceManager;`, + `using TypeSpec.Versioning;`, + ]; + const content = generateServiceInformation(program); + + return [...imports, content].join("\n"); +} + +function getArmResourceImports(program: TypespecProgram): string[] { + const resourceMetadata = getArmResourcesMetadata(); + const imports: string[] = []; + + for (const resource in resourceMetadata) { + imports.push(`import "./${resourceMetadata[resource].SwaggerModelName}.tsp";`); + } + + if (program.operationGroups.length > 0) { + imports.push(`import "./routes.tsp";`); + } + + return imports; +} diff --git a/packages/extensions/openapi-to-cadl/src/emiters/emit-models.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-models.ts similarity index 56% rename from packages/extensions/openapi-to-cadl/src/emiters/emit-models.ts rename to packages/extensions/openapi-to-typespec/src/emiters/emit-models.ts index 9775a84f9f..c729dafc87 100644 --- a/packages/extensions/openapi-to-cadl/src/emiters/emit-models.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-models.ts @@ -1,19 +1,20 @@ import { getSession } from "../autorest-session"; import { generateEnums } from "../generate/generate-enums"; import { generateObject } from "../generate/generate-object"; -import { CadlEnum, CadlProgram } from "../interfaces"; -import { formatCadlFile } from "../utils/format"; +import { TypespecEnum, TypespecProgram } from "../interfaces"; +import { getOptions } from "../options"; +import { formatTypespecFile } from "../utils/format"; import { getModelsImports } from "../utils/imports"; import { getNamespace } from "../utils/namespace"; -export async function emitModels(filePath: string, program: CadlProgram): Promise { +export async function emitModels(filePath: string, program: TypespecProgram): Promise { const content = generateModels(program); const session = getSession(); - session.writeFile({ filename: filePath, content: await formatCadlFile(content, filePath) }); + session.writeFile({ filename: filePath, content: await formatTypespecFile(content, filePath) }); } -function generateModels(program: CadlProgram) { +function generateModels(program: TypespecProgram) { const { models } = program; const { modules, namespaces: namespacesSet } = getModelsImports(program); const imports = [...new Set([`import "@typespec/rest";`, `import "@typespec/http";`, ...modules])].join("\n"); @@ -22,12 +23,24 @@ function generateModels(program: CadlProgram) { "\n", ); + const isArm = getOptions().isArm; + const enums = flattenEnums(models.enums).join(""); const objects = models.objects.map(generateObject).join("\n\n"); - return [imports, "\n", namespaces, "\n", getNamespace(program), "\n", enums, "\n", objects].join("\n"); + return [ + imports, + "\n", + namespaces, + "\n", + getNamespace(program), + isArm ? "\ninterface Operations extends Azure.ResourceManager.Operations {} \n" : "\n", + enums, + "\n", + objects, + ].join("\n"); } -function flattenEnums(enums: CadlEnum[]) { +function flattenEnums(enums: TypespecEnum[]) { return enums.reduce((a, c) => { return [...a, ...generateEnums(c)]; }, []); diff --git a/packages/extensions/openapi-to-cadl/src/emiters/emit-package.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-package.ts similarity index 88% rename from packages/extensions/openapi-to-cadl/src/emiters/emit-package.ts rename to packages/extensions/openapi-to-typespec/src/emiters/emit-package.ts index 6c7338eb6c..3dc289fddb 100644 --- a/packages/extensions/openapi-to-cadl/src/emiters/emit-package.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-package.ts @@ -1,8 +1,8 @@ import { getSession } from "../autorest-session"; -import { CadlProgram } from "../interfaces"; +import { TypespecProgram } from "../interfaces"; import { formatFile } from "../utils/format"; -export async function emitPackage(filePath: string, program: CadlProgram): Promise { +export async function emitPackage(filePath: string, program: TypespecProgram): Promise { const session = getSession(); // Default to false; const includePackage = session.configuration["include-package"] === true; diff --git a/packages/extensions/openapi-to-cadl/src/emiters/emit-routes.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-routes.ts similarity index 58% rename from packages/extensions/openapi-to-cadl/src/emiters/emit-routes.ts rename to packages/extensions/openapi-to-typespec/src/emiters/emit-routes.ts index ce634fd37f..d8a4b5556d 100644 --- a/packages/extensions/openapi-to-cadl/src/emiters/emit-routes.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-routes.ts @@ -1,17 +1,20 @@ import { getSession } from "../autorest-session"; import { generateOperationGroup } from "../generate/generate-operations"; -import { CadlProgram } from "../interfaces"; -import { formatCadlFile } from "../utils/format"; +import { TypespecProgram } from "../interfaces"; +import { formatTypespecFile } from "../utils/format"; import { getRoutesImports } from "../utils/imports"; import { getNamespace } from "../utils/namespace"; -export async function emitRoutes(filePath: string, program: CadlProgram): Promise { +export async function emitRoutes(filePath: string, program: TypespecProgram): Promise { + if (program.operationGroups.length === 0) { + return; + } const content = generateRoutes(program); const session = getSession(); - session.writeFile({ filename: filePath, content: await formatCadlFile(content, filePath) }); + session.writeFile({ filename: filePath, content: await formatTypespecFile(content, filePath) }); } -function generateRoutes(program: CadlProgram) { +function generateRoutes(program: TypespecProgram) { const { operationGroups } = program; const { modules, namespaces } = getRoutesImports(program); const content = operationGroups.map(generateOperationGroup); diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts new file mode 100644 index 0000000000..24e87a9343 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts @@ -0,0 +1,42 @@ +import { getSession } from "../autorest-session"; +import { getOptions } from "../options"; +import { formatFile } from "../utils/format"; + +export async function emitTypespecConfig(filePath: string): Promise { + const session = getSession(); + const { isArm } = getOptions(); + let content = `emit: + - "@azure-tools/typespec-autorest" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true +`; + + if (isArm) { + const inputFiles = session.configuration["input-file"]; + const swaggerName = inputFiles.length > 1 ? "openapi.json" : inputFiles[0].split("/").pop(); + content = `emit: + - '@azure-tools/typespec-autorest' +options: + '@azure-tools/typespec-autorest': + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/${swaggerName}" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" +`; + } + + session.writeFile({ filename: filePath, content: await formatFile(content, filePath) }); +} diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts new file mode 100644 index 0000000000..4bb9e5ed30 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts @@ -0,0 +1,88 @@ +import { Dictionary } from "@azure-tools/openapi/v3"; +import { TypespecOperation, TspArmResource, TspArmResourceOperation } from "interfaces"; +import { replaceGeneratedResourceObject } from "../transforms/transform-arm-resources"; +import { generateDecorators } from "../utils/decorators"; +import { generateDocs } from "../utils/docs"; +import { getModelPropertiesDeclarations } from "../utils/model-generation"; +import { generateOperation } from "./generate-operations"; + +export function generateArmResource(resource: TspArmResource): string { + let definitions: string[] = []; + + for (const fixme of resource.fixMe ?? []) { + definitions.push(fixme); + } + + const doc = generateDocs(resource); + definitions.push(doc); + + const decorators = generateDecorators(resource.decorators); + decorators && definitions.push(decorators); + + if (resource.resourceParent) { + definitions.push(`@parentResource(${resource.resourceParent.name})`); + } + + definitions.push(`model ${resource.name} is ${resource.resourceKind}<${resource.propertiesModelName}> {`); + + definitions = [...definitions, ...getModelPropertiesDeclarations(resource.properties)]; + + for (const p of resource.optionalStandardProperties) { + definitions.push(`\n...${p}`); + } + + definitions.push("}\n"); + + definitions.push("\n"); + + definitions.push(generateArmResourceOperation(resource)); + + return definitions.join("\n"); +} + +function generateArmResourceOperation(resource: TspArmResource): string { + const groupedOperations: Dictionary<(TspArmResourceOperation | TypespecOperation)[]> = {}; + for (const operation of resource.resourceOperations) { + if (!groupedOperations[operation.operationGroupName]) { + groupedOperations[operation.operationGroupName] = []; + } + groupedOperations[operation.operationGroupName].push(operation); + } + for (const operation of resource.normalOperations) { + if (!groupedOperations[operation.operationGroupName!]) { + groupedOperations[operation.operationGroupName!] = []; + } + groupedOperations[operation.operationGroupName!].push(operation); + } + const definitions: string[] = []; + + for (const [operationGroupName, operations] of Object.entries(groupedOperations)) { + definitions.push("@armResourceOperations"); + definitions.push(`interface ${operationGroupName} {`); + for (let operation of operations) { + if ((operation as TspArmResourceOperation).kind) { + operation = operation as TspArmResourceOperation; + for (const fixme of operation.fixMe ?? []) { + definitions.push(fixme); + } + definitions.push(generateDocs(operation)); + const decorators = generateDecorators(operation.decorators); + decorators && definitions.push(decorators); + if (operation.kind === "ArmResourceExists") { + definitions.push(`op ${operation.name}(${operation.parameters.join(",")}): ${operation.responses.join("|")}`); + } else { + definitions.push( + `${operation.name} is ${operation.kind}<${(operation.templateParameters ?? []) + .map(replaceGeneratedResourceObject) + .join(",")}>`, + ); + } + } else { + definitions.push(generateOperation(operation as TypespecOperation)); + } + } + definitions.push("}\n"); + } + + return definitions.join("\n"); +} diff --git a/packages/extensions/openapi-to-cadl/src/generate/generate-enums.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-enums.ts similarity index 62% rename from packages/extensions/openapi-to-cadl/src/generate/generate-enums.ts rename to packages/extensions/openapi-to-typespec/src/generate/generate-enums.ts index 71f4fec275..bf0835572d 100644 --- a/packages/extensions/openapi-to-cadl/src/generate/generate-enums.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-enums.ts @@ -1,22 +1,22 @@ -import { CadlEnum } from "../interfaces"; +import { TypespecEnum } from "../interfaces"; import { generateDecorators } from "../utils/decorators"; import { generateDocs } from "../utils/docs"; -export function generateEnums(cadlEnum: CadlEnum) { +export function generateEnums(typespecEnum: TypespecEnum) { const definitions: string[] = []; - const doc = generateDocs(cadlEnum); + const doc = generateDocs(typespecEnum); definitions.push(doc); - for (const fixme of cadlEnum.fixMe ?? []) { + for (const fixme of typespecEnum.fixMe ?? []) { definitions.push(`\n${fixme}`); } - const decorators = generateDecorators(cadlEnum.decorators); + const decorators = generateDecorators(typespecEnum.decorators); decorators && definitions.push(decorators); const enumDefinition = ` - enum ${cadlEnum.name} { - ${cadlEnum.members + enum ${typespecEnum.name} { + ${typespecEnum.members .map((m) => { const kv = `"${m.name}"` !== m.value ? `${m.name}: ${m.value}` : m.value; return `${generateDocs(m)}${kv}`; diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-object.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-object.ts new file mode 100644 index 0000000000..7bc6c5add3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-object.ts @@ -0,0 +1,51 @@ +import { TypespecObject } from "../interfaces"; +import { generateDecorators } from "../utils/decorators"; +import { generateDocs } from "../utils/docs"; +import { getModelPropertiesDeclarations } from "../utils/model-generation"; + +export function generateObject(typespecObject: TypespecObject) { + let definitions: string[] = []; + + const fixme = getFixme(typespecObject); + fixme && definitions.push(fixme); + + const doc = generateDocs(typespecObject); + definitions.push(doc); + + const decorators = generateDecorators(typespecObject.decorators); + decorators && definitions.push(decorators); + + if (typespecObject.extendedParents?.length) { + const firstParent = typespecObject.extendedParents[0]; + definitions.push(`model ${typespecObject.name} extends ${firstParent} {`); + } else if (typespecObject.spreadParents && typespecObject.spreadParents.length === 1) { + definitions.push(`model ${typespecObject.name} extends ${typespecObject.spreadParents[0]} {`); + } else if (typespecObject.alias) { + const { alias, params } = typespecObject.alias; + + definitions.push(`model ${typespecObject.name} is ${alias}${params ? `<${params.join(",")}>` : ""} {`); + } else { + definitions.push(`model ${typespecObject.name} {`); + } + + if (typespecObject.spreadParents?.length) { + if (typespecObject.extendedParents?.length || typespecObject.spreadParents.length > 1) { + for (const parent of typespecObject.spreadParents) { + definitions.push(`...${parent};`); + } + } + } + + definitions = [...definitions, ...getModelPropertiesDeclarations(typespecObject.properties)]; + definitions.push("}"); + + return definitions.join("\n"); +} + +function getFixme(typespecObject: TypespecObject): string | undefined { + if (!typespecObject.fixMe) { + return undefined; + } + + return typespecObject.fixMe.join("\n"); +} diff --git a/packages/extensions/openapi-to-cadl/src/generate/generate-operations.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts similarity index 69% rename from packages/extensions/openapi-to-cadl/src/generate/generate-operations.ts rename to packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts index fd5005210d..cf469decc4 100644 --- a/packages/extensions/openapi-to-cadl/src/generate/generate-operations.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts @@ -1,7 +1,8 @@ -import { CadlOperation, CadlOperationGroup, CadlParameter } from "../interfaces"; +import { TypespecOperation, TypespecOperationGroup, TypespecParameter } from "../interfaces"; import { generateDocs, generateSummary } from "../utils/docs"; +import { generateParameter } from "./generate-parameter"; -export function generateOperation(operation: CadlOperation, operationGroup: CadlOperationGroup) { +export function generateOperation(operation: TypespecOperation, operationGroup?: TypespecOperationGroup) { const doc = generateDocs(operation); const summary = generateSummary(operation); const { verb, name, route, responses, parameters } = operation; @@ -21,7 +22,7 @@ export function generateOperation(operation: CadlOperation, operationGroup: Cadl generateNameCollisionWarning(duplicateNames, statements); statements.push(`@route("${route}")`); statements.push( - `@${verb} op ${name} is Azure.Core.Foundations.Operation<{${params ? params : ""}}, ${responses.join( + `@${verb} op ${name} is Azure.Core.Foundations.Operation<${params ? params : "{}"}, ${responses.join( " | ", )}>;\n\n\n`, ); @@ -33,9 +34,9 @@ export function generateOperation(operation: CadlOperation, operationGroup: Cadl const resourceParameters = generateParameters( parameters.filter((param) => !["path", "body"].some((p) => p === param.location)), ); - const parametersString = !resourceParameters ? `` : `, { parameters: {${resourceParameters}}}`; + const parametersString = resourceParameters ? `, { parameters: ${resourceParameters}}` : ""; statements.push( - `${operationGroup.name ? "" : "op "}`, + `${operationGroup?.name ? "" : "op "}`, `${name} is Azure.Core.${resource.kind}<${resource.response.name} ${parametersString}>;\n\n\n`, ); } @@ -61,22 +62,30 @@ function generateNameCollisionWarning(duplicateNames: string[], statements: stri function generateMultiResponseWarning(responses: string[], statements: string[]) { responses.length > 2 && statements.push( - `// FIXME: (multi-response) Swagger defines multiple requests and responses. - // This needs to be revisited as CADL supports linking specific responses to each request`, + `// FIXME: (multi-response) Swagger defines multiple requests and responses. + // This needs to be revisited as Typespec supports linking specific responses to each request`, ); } -function generateParameters(parameters: CadlParameter[]) { +export function generateParameters(parameters: TypespecParameter[]) { + if (parameters.length === 0) { + return ""; + } + if (parameters.length === 1 && parameters[0].location === "body") { + if (parameters[0].type === "unknown") { + return "unknown"; + } else { + return parameters[0].type; + } + } const params: string[] = []; for (const parameter of parameters) { - const location = parameter.location; - params.push(generateDocs(parameter)); - params.push(`@${location} "${parameter.name}": ${parameter.type},`); + params.push(generateParameter(parameter)); } - return params.join("\n"); + return `{${params.join("\n")}}`; } -export function generateOperationGroup(operationGroup: CadlOperationGroup) { +export function generateOperationGroup(operationGroup: TypespecOperationGroup) { const statements: string[] = []; const doc = generateDocs(operationGroup); const { name, operations } = operationGroup; diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts new file mode 100644 index 0000000000..f6af8acb3c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts @@ -0,0 +1,20 @@ +import { TypespecParameter } from "../interfaces"; +import { generateDecorators } from "../utils/decorators"; +import { generateDocs } from "../utils/docs"; +import { transformValue } from "../utils/values"; + +export function generateParameter(parameter: TypespecParameter): string { + const definitions: string[] = []; + const doc = generateDocs(parameter); + definitions.push(doc); + + const decorators = generateDecorators(parameter.decorators); + decorators && definitions.push(decorators); + let defaultValue = ""; + if (parameter.defaultValue) { + defaultValue = ` = ${transformValue(parameter.defaultValue)}`; + } + definitions.push(`"${parameter.name}"${parameter.isOptional ? "?" : ""}: ${parameter.type}${defaultValue}`); + + return definitions.join("\n"); +} diff --git a/packages/extensions/openapi-to-cadl/src/generate/generate-service-information.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts similarity index 58% rename from packages/extensions/openapi-to-cadl/src/generate/generate-service-information.ts rename to packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts index a2022dbc8c..e1d190b15d 100644 --- a/packages/extensions/openapi-to-cadl/src/generate/generate-service-information.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts @@ -1,17 +1,31 @@ -import { CadlProgram, EndpointParameter } from "../interfaces"; +import { TypespecProgram, EndpointParameter } from "../interfaces"; +import { getOptions } from "../options"; import { generateDocs } from "../utils/docs"; import { getNamespace } from "../utils/namespace"; -export function generateServiceInformation(program: CadlProgram) { +export function generateServiceInformation(program: TypespecProgram) { const { serviceInformation } = program; const definitions: string[] = []; + const { isArm } = getOptions(); + if (isArm) { + definitions.push(`@armProviderNamespace`); + } definitions.push(`@service({ title: "${serviceInformation.name}" - ${serviceInformation.version ? `, version: "${serviceInformation.version}"` : ""} })`); - if (serviceInformation.endpoint) { + if (serviceInformation.version) { + definitions.push(`@versioned(Versions)`); + } + + if (isArm && serviceInformation.armCommonTypeVersion) { + definitions.push( + `@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.${serviceInformation.armCommonTypeVersion})`, + ); + } + + if (!isArm && serviceInformation.endpoint) { definitions.push(`@server("${serviceInformation.endpoint}", ${JSON.stringify(serviceInformation.doc) ?? ""}`); const parametrizedHost = getEndpointParameters(serviceInformation.endpoint); const hasParameters = @@ -35,8 +49,21 @@ export function generateServiceInformation(program: CadlProgram) { } const serviceDoc = generateDocs(serviceInformation); serviceDoc && definitions.push(serviceDoc); + definitions.push(getNamespace(program)); + if (serviceInformation.version) { + definitions.push(""); + definitions.push(`@doc("The available API versions.")`); + definitions.push(`enum Versions {`); + if (isArm) { + definitions.push(`@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)`); + definitions.push(`@useDependency(Azure.Core.Versions.v1_0_Preview_1)`); + } + definitions.push(`v${serviceInformation.version.replaceAll("-", "_")}: "${serviceInformation.version}",`); + definitions.push("}"); + } + return definitions.join("\n"); } diff --git a/packages/extensions/openapi-to-cadl/src/index.ts b/packages/extensions/openapi-to-typespec/src/index.ts similarity index 100% rename from packages/extensions/openapi-to-cadl/src/index.ts rename to packages/extensions/openapi-to-typespec/src/index.ts diff --git a/packages/extensions/openapi-to-typespec/src/interfaces.ts b/packages/extensions/openapi-to-typespec/src/interfaces.ts new file mode 100644 index 0000000000..94c4b1aa82 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/interfaces.ts @@ -0,0 +1,221 @@ +export interface TypespecProgram { + models: Models; + operationGroups: TypespecOperationGroup[]; + serviceInformation: ServiceInformation; +} + +export interface TypespecOptions { + isAzureSpec: boolean; + namespace?: string; + guessResourceKey: boolean; + isArm: boolean; +} + +export interface TypespecChoiceValue extends WithDoc { + name: string; + value: string | number | boolean; +} + +export interface WithDoc { + doc?: string | string[]; +} + +export interface WithSummary { + summary?: string; +} + +export interface TypespecOperationGroup extends WithDoc { + name: string; + operations: TypespecOperation[]; +} + +export type Extension = "Pageable" | "LRO"; +export interface TypespecOperation extends WithDoc, WithSummary, WithFixMe { + name: string; + verb: "get" | "post" | "put" | "delete"; + route: string; + responses: string[]; + parameters: TypespecParameter[]; + extensions: Extension[]; + resource?: TypespecResource; + operationGroupName?: string; +} + +export type ResourceKind = + | "ResourceCreateOrUpdate" + | "ResourceCreateOrReplace" + | "ResourceCreateWithServiceProvidedName" + | "ResourceRead" + | "ResourceDelete" + | "ResourceList" + | "NonPagedResourceList" + | "ResourceAction" + | "ResourceCollectionAction" + | "LongRunningResourceCreateOrReplace" + | "LongRunningResourceCreateOrUpdate" + | "LongRunningResourceCreateWithServiceProvidedName" + | "LongRunningResourceDelete"; + +export interface TypespecResource { + kind: ResourceKind; + response: TypespecDataType; +} + +export interface ServiceInformation extends WithDoc { + name: string; + version?: string; + endpoint?: string; + endpointParameters?: EndpointParameter[]; + produces?: string[]; + consumes?: string[]; + armCommonTypeVersion?: string; +} + +export interface EndpointParameter extends WithDoc { + name: string; +} + +export interface TypespecDataType extends WithDoc, WithFixMe { + kind: string; + name: string; +} + +export interface TypespecWildcardType extends TypespecDataType { + kind: "wildcard"; +} + +export interface DecoratorArgumentOptions { + unwrap?: boolean; +} + +export interface DecoratorArgument { + value: string; + options?: DecoratorArgumentOptions; +} + +export interface TypespecEnum extends TypespecDataType { + kind: "enum"; + members: TypespecChoiceValue[]; + isExtensible: boolean; + decorators?: TypespecDecorator[]; +} + +export interface WithFixMe { + fixMe?: string[]; +} + +export type TypespecParameterLocation = "path" | "query" | "header" | "body"; +export interface TypespecParameter extends TypespecDataType { + kind: "parameter"; + isOptional: boolean; + type: string; + decorators?: TypespecDecorator[]; + location: TypespecParameterLocation; + serializedName: string; + defaultValue?: any; +} + +export interface TypespecObjectProperty extends TypespecDataType { + kind: "property"; + isOptional: boolean; + type: string; + decorators?: TypespecDecorator[]; + defaultValue?: any; +} + +export interface TypespecDecorator extends WithFixMe { + name: string; + arguments?: (string | number)[] | DecoratorArgument[]; + module?: string; + namespace?: string; +} + +export interface TypespecAlias { + alias: string; + params?: string[]; + module?: string; +} + +export interface TypespecObject extends TypespecDataType { + kind: "object"; + properties: TypespecObjectProperty[]; + parents: string[]; + extendedParents?: string[]; + spreadParents?: string[]; + decorators?: TypespecDecorator[]; + alias?: TypespecAlias; +} + +export interface Models { + enums: TypespecEnum[]; + objects: TypespecObject[]; + armResources: TspArmResource[]; +} + +export type ArmResourceKind = "TrackedResource" | "ProxyResource" | "ExtensionResource"; +export type ArmResourceOperationKind = "TrackedResourceOperations" | "ProxyResourceOperations"; + +const FIRST_LEVEL_RESOURCE = [ + "ResourceGroupResource", + "SubscriptionResource", + "ManagementGroupResource", + "TenantResource", + "ArmResource", +] as const; +export type FirstLevelResource = (typeof FIRST_LEVEL_RESOURCE)[number]; + +export function isFirstLevelResource(value: string): value is FirstLevelResource { + return FIRST_LEVEL_RESOURCE.includes(value as FirstLevelResource); +} + +export interface TspArmResourceOperationBase extends WithDoc, WithFixMe { + kind: string; + name: string; + templateParameters?: string[]; + decorators?: TypespecDecorator[]; + operationGroupName: string; +} + +export type TspArmResourceOperation = + | TspArmResourceListOperation + | TspArmResourceNonListOperation + | TspArmResourceExistsOperation; + +export interface TspArmResourceNonListOperation extends TspArmResourceOperationBase { + kind: + | "ArmResourceRead" + | "ArmResourceCreateOrReplaceSync" + | "ArmResourceCreateOrUpdateAsync" + | "ArmResourcePatchSync" + | "ArmResourcePatchAsync" + | "ArmTagsPatchSync" + | "ArmTagsPatchAsync" + | "ArmCustomPatchSync" + | "ArmCustomPatchAsync" + | "ArmResourceDeleteSync" + | "ArmResourceDeleteAsync" + | "ArmResourceDeleteWithoutOkAsync" + | "ArmResourceActionSync" + | "ArmResourceActionNoContentSync" + | "ArmResourceActionAsync" + | "ArmResourceActionNoResponseContentAsync"; +} + +export interface TspArmResourceListOperation extends TspArmResourceOperationBase { + kind: "ArmResourceListByParent" | "ArmListBySubscription" | "ArmResourceListAtScope"; +} + +export interface TspArmResourceExistsOperation extends TspArmResourceOperationBase { + kind: "ArmResourceExists"; + parameters: string[]; + responses: string[]; +} + +export interface TspArmResource extends TypespecObject { + resourceKind: ArmResourceKind; + propertiesModelName: string; + resourceParent?: TspArmResource; + resourceOperations: TspArmResourceOperation[]; + normalOperations: TypespecOperation[]; + optionalStandardProperties: string[]; +} diff --git a/packages/extensions/openapi-to-typespec/src/main.ts b/packages/extensions/openapi-to-typespec/src/main.ts new file mode 100644 index 0000000000..be6dbc0bd7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/main.ts @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { join } from "path"; +import { CodeModel, codeModelSchema } from "@autorest/codemodel"; +import { AutoRestExtension, AutorestExtensionHost, Session, startSession } from "@autorest/extension-base"; +import { OpenAPI3Document } from "@azure-tools/openapi"; +import { setArmCommonTypeVersion, setSession } from "./autorest-session"; +import { emitArmResources } from "./emiters/emit-arm-resources"; +import { emitMain } from "./emiters/emit-main"; + +import { emitModels } from "./emiters/emit-models"; +import { emitPackage } from "./emiters/emit-package"; +import { emitRoutes } from "./emiters/emit-routes"; +import { emitTypespecConfig } from "./emiters/emit-typespec-config"; +import { getModel } from "./model"; +import { pretransformArmResources } from "./pretransforms/arm-pretransform"; +import { pretransformNames } from "./pretransforms/name-pretransform"; +import { markErrorModels } from "./utils/errors"; +import { markPagination } from "./utils/paging"; +import { markResources } from "./utils/resources"; + +export async function processConverter(host: AutorestExtensionHost) { + const session = await startSession(host, codeModelSchema); + setSession(session); + const codeModel = session.model; + pretransformNames(codeModel); + pretransformArmResources(codeModel); + markPagination(codeModel); + markErrorModels(codeModel); + markResources(codeModel); + const programDetails = getModel(codeModel); + await emitArmResources(programDetails, getOutuptDirectory(session)); + await emitModels(getFilePath(session, "models.tsp"), programDetails); + await emitRoutes(getFilePath(session, "routes.tsp"), programDetails); + await emitMain(getFilePath(session, "main.tsp"), programDetails); + await emitPackage(getFilePath(session, "package.json"), programDetails); + await emitTypespecConfig(getFilePath(session, "tspconfig.yaml")); +} + +function getOutuptDirectory(session: Session) { + return session.configuration["src-path"] ?? ""; +} + +function getFilePath(session: Session, fileName: string) { + return join(getOutuptDirectory(session), fileName); +} + +async function main() { + const pluginHost = new AutoRestExtension(); + pluginHost.add("source-swagger-detector", processDetector); + pluginHost.add("openapi-to-typespec", processConverter); + await pluginHost.run(); +} + +main().catch((e) => { + throw new Error(e); +}); + +export async function processDetector(host: AutorestExtensionHost) { + const session = await startSession(host, codeModelSchema); + if (session.model.components?.schemas) { + for (const v of Object.values(session.model.components.schemas)) { + if (v["x-ms-metadata"]?.originalLocations) { + for (const p of v["x-ms-metadata"].originalLocations) { + const result = p.match(/\/specification\/common-types\/resource-management\/(v\d)\//); + if (result) { + setArmCommonTypeVersion(result[1]); + return; + } + } + } + } + } +} diff --git a/packages/extensions/openapi-to-typespec/src/model.ts b/packages/extensions/openapi-to-typespec/src/model.ts new file mode 100644 index 0000000000..69da0ed2cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/model.ts @@ -0,0 +1,79 @@ +import { CodeModel, isObjectSchema, Schema } from "@autorest/codemodel"; +import { getDataTypes } from "./data-types"; +import { TypespecDataType, TypespecProgram } from "./interfaces"; +import { getOptions } from "./options"; +import { transformTspArmResource } from "./transforms/transform-arm-resources"; +import { transformEnum } from "./transforms/transform-choices"; +import { getTypespecType, transformObject } from "./transforms/transform-object"; +import { transformOperationGroup } from "./transforms/transform-operations"; +import { transformServiceInformation } from "./transforms/transform-service-information"; +import { ArmResourceSchema, filterResourceRelatedObjects, isResourceSchema } from "./utils/resource-discovery"; +import { isChoiceSchema } from "./utils/schemas"; + +const models: Map = new Map(); + +export function getModel(codeModel: CodeModel): TypespecProgram { + let model = models.get(codeModel); + + if (!model) { + getDataTypes(codeModel); + model = transformModel(codeModel); + models.set(codeModel, model); + } + + return model; +} + +export function transformDataType(schema: Schema, codeModel: CodeModel): TypespecDataType { + if (isObjectSchema(schema)) { + return transformObject(schema, codeModel); + } + + if (isChoiceSchema(schema)) { + return transformEnum(schema, codeModel); + } + + return { + name: getTypespecType(schema, codeModel), + kind: "wildcard", + doc: schema.language.default.documentation, + }; +} + +function transformModel(codeModel: CodeModel): TypespecProgram { + const caldEnums = [...(codeModel.schemas.choices ?? []), ...(codeModel.schemas.sealedChoices ?? [])] + .filter((c) => c.language.default.name !== "Versions") + .map((c) => transformEnum(c, codeModel)); + + const { isArm } = getOptions(); + + // objects need to be converted first because they are used in operation convertion + const typespecObjects = (codeModel.schemas.objects ?? []).map((o) => transformObject(o, codeModel)); + + const armResources = isArm + ? codeModel.schemas.objects + ?.filter((o) => isResourceSchema(o)) + .map((o) => transformTspArmResource(o as ArmResourceSchema)) ?? [] + : []; + + const serviceInformation = transformServiceInformation(codeModel); + + const typespecOperationGroups = []; + + for (const og of codeModel.operationGroups) { + const typespecOperationGroup = transformOperationGroup(og, codeModel); + if (typespecOperationGroup.operations.length > 0) { + typespecOperationGroups.push(typespecOperationGroup); + } + } + + return { + serviceInformation, + models: { + enums: caldEnums, + objects: isArm ? filterResourceRelatedObjects(typespecObjects) : typespecObjects, + armResources, + }, + operationGroups: typespecOperationGroups, + }; +} diff --git a/packages/extensions/openapi-to-cadl/src/options.ts b/packages/extensions/openapi-to-typespec/src/options.ts similarity index 52% rename from packages/extensions/openapi-to-cadl/src/options.ts rename to packages/extensions/openapi-to-typespec/src/options.ts index 131e5ed8b3..67cd1f84dd 100644 --- a/packages/extensions/openapi-to-cadl/src/options.ts +++ b/packages/extensions/openapi-to-typespec/src/options.ts @@ -1,28 +1,38 @@ import { CodeModel } from "@autorest/codemodel"; import { Session } from "@autorest/extension-base"; import { getSession } from "./autorest-session"; -import { CadlOptions } from "./interfaces"; +import { TypespecOptions } from "./interfaces"; -export let options: CadlOptions; +export let options: TypespecOptions; -export function getOptions(): CadlOptions { +export function getOptions(): TypespecOptions { if (!options) { - const session = getSession(); - options = { - isAzureSpec: getIsAzureSpec(session), - namespace: getNamespace(session), - guessResourceKey: getGuessResourceKey(session), - }; + updateOptions(); } return options; } +export function updateOptions() { + const session = getSession(); + options = { + isAzureSpec: getIsAzureSpec(session), + namespace: getNamespace(session), + guessResourceKey: getGuessResourceKey(session), + isArm: getIsArm(session), + }; +} + export function getGuessResourceKey(session: Session) { const shouldGuess = session.configuration["guessResourceKey"] ?? false; return shouldGuess !== false; } +export function getIsArm(session: Session) { + const isArm = session.configuration["isArm"] ?? false; + return isArm !== false; +} + export function getIsAzureSpec(session: Session) { return session.configuration["isAzureSpec"] !== false; } diff --git a/packages/extensions/openapi-to-cadl/src/paths.ts b/packages/extensions/openapi-to-typespec/src/paths.ts similarity index 100% rename from packages/extensions/openapi-to-cadl/src/paths.ts rename to packages/extensions/openapi-to-typespec/src/paths.ts diff --git a/packages/extensions/openapi-to-typespec/src/pretransforms/arm-pretransform.ts b/packages/extensions/openapi-to-typespec/src/pretransforms/arm-pretransform.ts new file mode 100644 index 0000000000..0f48e734ee --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/pretransforms/arm-pretransform.ts @@ -0,0 +1,13 @@ +import { CodeModel } from "@autorest/codemodel"; +import { getOptions } from "../options"; +import { tagSchemaAsResource } from "../utils/resource-discovery"; + +export function pretransformArmResources(codeModel: CodeModel): void { + const { isArm } = getOptions(); + if (!isArm) { + return; + } + for (const schema of codeModel.schemas?.objects ?? []) { + tagSchemaAsResource(schema); + } +} diff --git a/packages/extensions/openapi-to-cadl/src/pretransforms/name-pretransform.ts b/packages/extensions/openapi-to-typespec/src/pretransforms/name-pretransform.ts similarity index 100% rename from packages/extensions/openapi-to-cadl/src/pretransforms/name-pretransform.ts rename to packages/extensions/openapi-to-typespec/src/pretransforms/name-pretransform.ts diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts new file mode 100644 index 0000000000..ea6448b011 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts @@ -0,0 +1,760 @@ +import { + CodeModel, + ObjectSchema, + Operation, + Parameter, + Response, + SchemaResponse, + SchemaType, +} from "@autorest/codemodel"; +import _ from "lodash"; +import pluralize from "pluralize"; +import { getSession } from "../autorest-session"; +import { generateParameter } from "../generate/generate-parameter"; +import { + ArmResourceKind, + TypespecDecorator, + TypespecObjectProperty, + TypespecOperation, + TypespecParameter, + TspArmResource, + TspArmResourceOperation, + isFirstLevelResource, +} from "../interfaces"; +import { updateOptions } from "../options"; +import { + ArmResource, + ArmResourceSchema, + OperationWithResourceOperationFlag, + _ArmResourceOperation, + getResourceExistOperation as getResourceExistsOperation, + getResourceOperations, + getSingletonResouceListOperation, + isResourceSchema, +} from "../utils/resource-discovery"; +import { isResponseSchema } from "../utils/schemas"; +import { transformObjectProperty } from "./transform-object"; +import { transformParameter, transformRequest } from "./transform-operations"; + +const generatedResourceObjects: Map = new Map(); + +export function isGeneratedResourceObject(name: string): boolean { + return generatedResourceObjects.has(name); +} + +export function replaceGeneratedResourceObject(name: string): string { + return generatedResourceObjects.get(name) ?? name; +} + +function addGeneratedResourceObjectIfNotExits(name: string, mapping: string) { + if (generatedResourceObjects.has(name)) { + return; + } + generatedResourceObjects.set(name, mapping); +} + +export function transformTspArmResource(schema: ArmResourceSchema): TspArmResource { + const fixMe: string[] = []; + + if (!getSession().configuration["namespace"]) { + const segments = schema.resourceMetadata.GetOperations[0].Path.split("/"); + for (let i = segments.length - 1; i >= 0; i--) { + if (segments[i] === "providers") { + getSession().configuration["namespace"] = segments[i + 1]; + updateOptions(); + break; + } + } + } + + // TODO: deal with a resource with multiple parents + if (schema.resourceMetadata.Parents.length > 1) { + fixMe.push( + `// FIXME: ${schema.resourceMetadata.SwaggerModelName} has more than one parent, currently converter will only use the first one`, + ); + } + + addGeneratedResourceObjectIfNotExits(schema.language.default.name, schema.language.default.name); + + const propertiesModelSchema = schema.properties?.find((p) => p.serializedName === "properties")?.schema; + let propertiesModelName = propertiesModelSchema?.language.default.name; + + if (propertiesModelSchema?.type === SchemaType.Dictionary) { + propertiesModelName = "Record"; + } + + // TODO: deal with resources that has no properties property + if (!propertiesModelName) { + fixMe.push(`// FIXME: ${schema.resourceMetadata.SwaggerModelName} has no properties property`); + propertiesModelName = "{}"; + } + + const operations = getTspOperations(schema, propertiesModelName); + + return { + fixMe, + resourceKind: getResourceKind(schema), + kind: "object", + properties: [buildKeyProperty(schema), ...getOtherProperties(schema)], + name: schema.resourceMetadata.SwaggerModelName, + parents: [], + resourceParent: getParentResource(schema), + propertiesModelName, + doc: schema.language.default.description, + decorators: buildResourceDecorators(schema), + resourceOperations: operations[0], + normalOperations: operations[1], + optionalStandardProperties: getResourceOptionalStandardProperties(schema), + }; +} + +function getOtherProperties(schema: ArmResourceSchema): TypespecObjectProperty[] { + const knownProperties = [ + "properties", + "id", + "name", + "type", + "systemData", + "location", + "tags", + "identity", + "sku", + "eTag", + "plan", + "kind", + "managedBy", + ]; + const otherProperties: TypespecObjectProperty[] = []; + for (const property of schema.properties ?? []) { + if (!knownProperties.includes(property.serializedName)) { + otherProperties.push(transformObjectProperty(property, getSession().model)); + } + } + return otherProperties; +} + +function getResourceOptionalStandardProperties(schema: ArmResourceSchema): string[] { + const optionalStandardProperties = []; + + const msi = schema.properties?.find((p) => p.serializedName === "identity"); + if (msi) { + let msiType; + if (msi.schema.language.default.name === "ManagedServiceIdentity") { + msiType = "Azure.ResourceManager.ManagedServiceIdentity"; + } else if (msi.schema.language.default.name === "SystemAssignedServiceIdentity") { + msiType = "Azure.ResourceManager.ManagedSystemAssignedIdentity"; + } else { + // TODO: handle non-standard property + msiType = "Azure.ResourceManager.ManagedServiceIdentity"; + } + optionalStandardProperties.push(msiType); + } + + if (schema.properties?.find((p) => p.serializedName === "sku")) { + // TODO: handle non-standard property + optionalStandardProperties.push("Azure.ResourceManager.ResourceSku"); + } + + if (schema.properties?.find((p) => p.serializedName === "eTag")) { + // TODO: handle non-standard property + optionalStandardProperties.push("Azure.ResourceManager.EntityTag"); + } + + if (schema.properties?.find((p) => p.serializedName === "plan")) { + // TODO: handle non-standard property + optionalStandardProperties.push("Azure.ResourceManager.ResourcePlan"); + } + + if (schema.properties?.find((p) => p.serializedName === "kind")) { + // TODO: handle non-standard property + optionalStandardProperties.push("Azure.ResourceManager.ResourceKind"); + } + + if (schema.properties?.find((p) => p.serializedName === "managedBy")) { + // TODO: handle non-standard property + optionalStandardProperties.push("Azure.ResourceManager.ManagedBy"); + } + + return optionalStandardProperties; +} + +function convertResourceReadOperation( + resourceMetadata: ArmResource, + operations: Record, +): TspArmResourceOperation[] { + // every resource should have a get operation + const operation = resourceMetadata.GetOperations[0]; + const swaggerOperation = operations[operation.OperationID]; + const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); + return [ + { + doc: resourceMetadata.GetOperations[0].Description, // TODO: resource have duplicated CRUD operations + kind: "ArmResourceRead", + name: getOperationName(operation.OperationID), + operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + templateParameters: baseParameters + ? [resourceMetadata.SwaggerModelName, baseParameters] + : [resourceMetadata.SwaggerModelName], + }, + ]; +} + +function convertResourceExistsOperation(resourceMetadata: ArmResource): TspArmResourceOperation[] { + const swaggerOperation = getResourceExistsOperation(resourceMetadata); + if (swaggerOperation) { + return [ + { + doc: swaggerOperation.language.default.description, + kind: "ArmResourceExists", + name: swaggerOperation.operationId ? getOperationName(swaggerOperation.operationId) : "exists", + operationGroupName: getOperationGroupName(swaggerOperation.operationId, resourceMetadata.Name), + parameters: [ + `...ResourceInstanceParameters<${resourceMetadata.SwaggerModelName}, BaseParameters<${resourceMetadata.SwaggerModelName}>>`, + ], + responses: ["OkResponse", "ErrorResponse"], + decorators: [{ name: "head" }], + }, + ]; + } + return []; +} + +function convertResourceCreateOrUpdateOperation( + resourceMetadata: ArmResource, + operations: Record, +): TspArmResourceOperation[] { + if (resourceMetadata.CreateOperations.length) { + const operation = resourceMetadata.CreateOperations[0]; + const swaggerOperation = operations[operation.OperationID]; + const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; + const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); + return [ + { + doc: operation.Description, + kind: isLongRunning ? "ArmResourceCreateOrUpdateAsync" : "ArmResourceCreateOrReplaceSync", + name: getOperationName(operation.OperationID), + operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + templateParameters: baseParameters + ? [resourceMetadata.SwaggerModelName, baseParameters] + : [resourceMetadata.SwaggerModelName], + }, + ]; + } + return []; +} + +function convertResourceUpdateOperation( + resourceMetadata: ArmResource, + operations: Record, + resourcePropertiesModelName: string, +): TspArmResourceOperation[] { + if (resourceMetadata.UpdateOperations.length) { + const operation = resourceMetadata.UpdateOperations[0]; + if ( + !resourceMetadata.CreateOperations.length || + resourceMetadata.CreateOperations[0].OperationID !== operation.OperationID + ) { + const swaggerOperation = operations[operation.OperationID]; + const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; + const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); + const bodyParam = swaggerOperation.requests?.[0].parameters?.find((p) => p.protocol.http?.in === "body"); + const propertiesProperty = (bodyParam?.schema as ObjectSchema)?.properties?.find( + (p) => p.serializedName === "properties", + ); + const tagsProperty = (bodyParam?.schema as ObjectSchema)?.properties?.find((p) => p.serializedName === "tags"); + const fixMe: string[] = []; + if (!bodyParam || (!propertiesProperty && !tagsProperty)) { + fixMe.push( + "// FIXME: (ArmResourcePatch): ArmResourcePatchSync/ArmResourcePatchAsync should have a body parameter with either properties property or tag property", + ); + } + let kind; + const templateParameters = [resourceMetadata.SwaggerModelName]; + if (propertiesProperty) { + kind = isLongRunning ? "ArmResourcePatchAsync" : "ArmResourcePatchSync"; + // TODO: if update properties are different from resource properties, we need to use a different model + templateParameters.push(resourcePropertiesModelName); + addGeneratedResourceObjectIfNotExits( + bodyParam?.schema.language.default.name ?? "", + `ResourceUpdateModel<${resourceMetadata.SwaggerModelName}>`, + ); + if (propertiesProperty.schema.language.default.name !== resourcePropertiesModelName) { + addGeneratedResourceObjectIfNotExits( + propertiesProperty.schema.language.default.name, + `ResourceUpdateModelProperties<${resourceMetadata.SwaggerModelName}, ${resourcePropertiesModelName}>`, + ); + } + } else if (tagsProperty) { + kind = isLongRunning ? "ArmTagsPatchAsync" : "ArmTagsPatchSync"; + // TODO: if update properties are different from tag properties, we need to use a different model + addGeneratedResourceObjectIfNotExits( + bodyParam?.schema.language.default.name ?? "", + `TagsUpdateModel<${resourceMetadata.SwaggerModelName}>`, + ); + } else if (bodyParam) { + kind = isLongRunning ? "ArmCustomPatchAsync" : "ArmCustomPatchSync"; + templateParameters.push(bodyParam.schema.language.default.name); + } else { + kind = isLongRunning ? "ArmCustomPatchAsync" : "ArmCustomPatchSync"; + templateParameters.push("{}"); + } + if (baseParameters) { + templateParameters.push(baseParameters); + } + return [ + { + fixMe, + doc: operation.Description, + kind: kind as any, + name: getOperationName(operation.OperationID), + operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + templateParameters, + }, + ]; + } + } + return []; +} + +function convertResourceDeleteOperation( + resourceMetadata: ArmResource, + operations: Record, +): TspArmResourceOperation[] { + if (resourceMetadata.DeleteOperations.length) { + const operation = resourceMetadata.DeleteOperations[0]; + const swaggerOperation = operations[operation.OperationID]; + const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; + const okResponse = swaggerOperation?.responses?.filter((o) => o.protocol.http?.statusCodes.includes("200"))?.[0]; + const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); + + return [ + { + doc: operation.Description, + kind: isLongRunning + ? okResponse + ? "ArmResourceDeleteAsync" + : "ArmResourceDeleteWithoutOkAsync" + : "ArmResourceDeleteSync", + name: getOperationName(operation.OperationID), + operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + templateParameters: baseParameters + ? [resourceMetadata.SwaggerModelName, baseParameters] + : [resourceMetadata.SwaggerModelName], + }, + ]; + } + return []; +} + +function convertResourceListOperations( + resourceMetadata: ArmResource, + operations: Record, +): TspArmResourceOperation[] { + const converted: TspArmResourceOperation[] = []; + + // list by parent operation + if (resourceMetadata.ListOperations.length) { + // TODO: TParentName, TParentFriendlyName + const operation = resourceMetadata.ListOperations[0]; + const swaggerOperation = operations[operation.OperationID]; + const okResponse = swaggerOperation?.responses?.filter((o) => o.protocol.http?.statusCodes.includes("200"))?.[0]; + const templateParameters = [resourceMetadata.SwaggerModelName]; + const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); + if (baseParameters) { + templateParameters.push(baseParameters); + } + + addGeneratedResourceObjectIfNotExits( + getSchemaResponseSchemaName(okResponse) ?? "", + `ResourceListResult<${resourceMetadata.SwaggerModelName}>`, + ); + + converted.push({ + doc: operation.Description, + kind: "ArmResourceListByParent", + name: getOperationName(operation.OperationID), + operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + templateParameters: templateParameters, + }); + } + + // operation under subscription + if (resourceMetadata.OperationsFromSubscriptionExtension.length) { + for (const operation of resourceMetadata.OperationsFromSubscriptionExtension) { + // TODO: handle other kinds of operations + if (operation.PagingMetadata) { + const swaggerOperation = operations[operation.OperationID]; + const okResponse = swaggerOperation?.responses?.filter( + (o) => o.protocol.http?.statusCodes.includes("200"), + )?.[0]; + const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); + + addGeneratedResourceObjectIfNotExits( + getSchemaResponseSchemaName(okResponse) ?? "", + `ResourceListResult<${resourceMetadata.SwaggerModelName}>`, + ); + // either list in location or list in subscription + if (operation.Path.includes("/locations/")) { + const templateParameters = [ + resourceMetadata.SwaggerModelName, + `LocationScope<${resourceMetadata.SwaggerModelName}>`, + ]; + if (baseParameters) { + templateParameters.push(baseParameters); + } + converted.push({ + doc: operation.Description, + kind: "ArmResourceListAtScope", + name: getOperationName(operation.OperationID), + operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + templateParameters, + }); + } else { + converted.push({ + doc: operation.Description, + kind: "ArmListBySubscription", + name: getOperationName(operation.OperationID), + operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + templateParameters: [resourceMetadata.SwaggerModelName], + }); + } + } + } + } + + // add list operation for singleton resource if exists + if (resourceMetadata.IsSingletonResource) { + const swaggerOperation = getSingletonResouceListOperation(resourceMetadata); + if (swaggerOperation) { + const okResponse = swaggerOperation?.responses?.filter((o) => o.protocol.http?.statusCodes.includes("200"))?.[0]; + const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); + + addGeneratedResourceObjectIfNotExits( + getSchemaResponseSchemaName(okResponse) ?? "", + `ResourceListResult<${resourceMetadata.SwaggerModelName}>`, + ); + converted.push({ + doc: swaggerOperation.language.default.description, + kind: "ArmResourceListByParent", + name: swaggerOperation.operationId + ? getOperationName(swaggerOperation.operationId) + : `listBy${resourceMetadata.Parents[0].replace(/Resource$/, "")}`, + operationGroupName: getOperationGroupName(swaggerOperation.operationId, resourceMetadata.Name), + templateParameters: baseParameters + ? [resourceMetadata.SwaggerModelName, baseParameters] + : [resourceMetadata.SwaggerModelName], + }); + (swaggerOperation as OperationWithResourceOperationFlag).isResourceOperation = true; + } + } + + return converted; +} + +function convertResourceActionOperations( + resourceMetadata: ArmResource, + operations: Record, +): TspArmResourceOperation[] { + const converted: TspArmResourceOperation[] = []; + + if (resourceMetadata.OtherOperations.length) { + for (const operation of resourceMetadata.OtherOperations) { + if (operation.Method === "POST") { + const swaggerOperation = operations[operation.OperationID]; + const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; + const okResponse = swaggerOperation?.responses?.filter( + (o) => o.protocol.http?.statusCodes.includes("200"), + )?.[0]; + // TODO: deal with non-schema response for action + let operationResponseName; + if (okResponse && isResponseSchema(okResponse)) { + if (!okResponse.schema.language.default.name.includes("·")) { + operationResponseName = okResponse.schema.language.default.name; + } + } + + const request = buildOperationBodyRequest(swaggerOperation, resourceMetadata) ?? "void"; + const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); + let kind; + if (!okResponse) { + // TODO: Sync operation should have a 204 response + kind = isLongRunning ? "ArmResourceActionNoResponseContentAsync" : "ArmResourceActionNoContentSync"; + } else { + kind = isLongRunning ? "ArmResourceActionAsync" : "ArmResourceActionSync"; + } + const templateParameters = [resourceMetadata.SwaggerModelName, request]; + if (okResponse) { + templateParameters.push(operationResponseName ?? "void"); + } + if (baseParameters) { + templateParameters.push(baseParameters); + } + converted.push({ + doc: operation.Description, + kind: kind as any, + name: getOperationName(operation.OperationID), + operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + templateParameters, + }); + } + } + } + + return converted; +} + +function convertResourceOtherGetOperations( + resourceMetadata: ArmResource, + operations: Record, +): TypespecOperation[] { + const converted: TypespecOperation[] = []; + + if (resourceMetadata.OtherOperations.length) { + for (const operation of resourceMetadata.OtherOperations) { + if (operation.Method === "GET") { + const swaggerOperation = operations[operation.OperationID]; + if (swaggerOperation.requests && swaggerOperation.requests[0]) { + const op = transformRequest(swaggerOperation.requests[0], swaggerOperation, getSession().model); + op.operationGroupName = getOperationGroupName(operation.OperationID, resourceMetadata.Name); + converted.push(op); + } + } + } + } + + return converted; +} + +function getTspOperations( + armSchema: ArmResourceSchema, + resourcePropertiesModelName: string, +): [TspArmResourceOperation[], TypespecOperation[]] { + const resourceMetadata = armSchema.resourceMetadata; + const operations = getResourceOperations(resourceMetadata); + const tspOperations: TspArmResourceOperation[] = []; + const normalOperations: TypespecOperation[] = []; + + // TODO: handle operations under resource group / management group / tenant + + // read operation + tspOperations.push(...convertResourceReadOperation(resourceMetadata, operations)); + + // exist operation + tspOperations.push(...convertResourceExistsOperation(resourceMetadata)); + + // create operation + tspOperations.push(...convertResourceCreateOrUpdateOperation(resourceMetadata, operations)); + + // patch update operation could either be patch for resource/tag or custom patch + tspOperations.push(...convertResourceUpdateOperation(resourceMetadata, operations, resourcePropertiesModelName)); + + // delete operation + tspOperations.push(...convertResourceDeleteOperation(resourceMetadata, operations)); + + // list operation + tspOperations.push(...convertResourceListOperations(resourceMetadata, operations)); + + // action operation + tspOperations.push(...convertResourceActionOperations(resourceMetadata, operations)); + + // other get operations + normalOperations.push(...convertResourceOtherGetOperations(resourceMetadata, operations)); + + return [tspOperations, normalOperations]; +} + +function getOperationName(name: string): string { + return _.lowerFirst(_.last(name.split("_"))); +} + +function getOperationGroupName(name: string | undefined, resourceName: string): string { + if (name && name.includes("_")) { + return _.first(name.split("_"))!; + } else { + return pluralize(resourceName); + } +} + +function buildOperationBodyRequest(operation: Operation, resource: ArmResource): string | undefined { + const codeModel = getSession().model; + const bodyParam: Parameter | undefined = operation.requests?.[0].parameters?.find( + (p) => p.protocol.http?.in === "body", + ); + if (bodyParam) { + const transformed = transformParameter(bodyParam, codeModel); + return transformed.type; + } +} + +function buildOperationBaseParameters(operation: Operation, resource: ArmResource): string | undefined { + const codeModel = getSession().model; + const parameters: TypespecParameter[] = []; + const resourceBasicParameters = []; + resource.GetOperations[0].Path.split("/").forEach((p) => { + if (p.match(/^{.+}$/)) { + resourceBasicParameters.push(p.replace("{", "").replace("}", "")); + } + }); + resourceBasicParameters.push("api-version"); + resourceBasicParameters.push("$host"); + if (operation.parameters) { + for (const parameter of operation.parameters) { + if (!resourceBasicParameters.includes(parameter.language.default.serializedName)) { + parameters.push(transformParameter(parameter, codeModel)); + } + } + } + + if (parameters.length) { + const params: string[] = []; + for (const parameter of parameters) { + params.push(generateParameter(parameter)); + } + return `{ + ...BaseParameters<${resource.SwaggerModelName}>, + ${params.join("\n")} + }`; + } +} + +function getKeyParameter(resourceMetadata: ArmResource): Parameter | undefined { + for (const operationGroup of getSession().model.operationGroups) { + for (const operation of operationGroup.operations) { + if (operation.operationId === resourceMetadata.GetOperations[0].OperationID) { + for (const parameter of operation.parameters ?? []) { + if (parameter.language.default.serializedName === resourceMetadata.ResourceKey) { + return parameter; + } + } + } + } + } +} + +function generateSingletonKeyParameter(): TypespecParameter { + return { + kind: "parameter", + name: "name", + isOptional: false, + type: "string", + location: "path", + serializedName: "name", + }; +} + +function getParentResource(schema: ArmResourceSchema): TspArmResource | undefined { + const resourceParent = schema.resourceMetadata.Parents?.[0]; + + if (!resourceParent || isFirstLevelResource(resourceParent)) { + return undefined; + } + + for (const objectSchema of getSession().model.schemas.objects ?? []) { + if (!isResourceSchema(objectSchema)) { + continue; + } + + if (objectSchema.resourceMetadata.Name === resourceParent) { + return transformTspArmResource(objectSchema); + } + } +} + +function getResourceKind(schema: ArmResourceSchema): ArmResourceKind { + if (schema.resourceMetadata.IsExtensionResource) { + return "ExtensionResource"; + } + + if (schema.resourceMetadata.IsTrackedResource) { + return "TrackedResource"; + } + + return "ProxyResource"; +} + +function getSchemaResponseSchemaName(response: Response | undefined): string | undefined { + if (!response || !(response as SchemaResponse).schema) { + return undefined; + } + + return (response as SchemaResponse).schema.language.default.name; +} + +function buildKeyProperty(schema: ArmResourceSchema): TypespecObjectProperty { + let parameter; + if (!schema.resourceMetadata.IsSingletonResource) { + const keyProperty = getKeyParameter(schema.resourceMetadata); + if (!keyProperty) { + throw new Error( + `Failed to find key property ${schema.resourceMetadata.ResourceKey} for ${schema.language.default.name}`, + ); + } + parameter = transformParameter(keyProperty, getSession().model); + } else { + parameter = generateSingletonKeyParameter(); + } + + if (!parameter.decorators) { + parameter.decorators = []; + } + + parameter.decorators.push( + { + name: "key", + arguments: [schema.resourceMetadata.ResourceKey], + }, + { + name: "segment", + arguments: [schema.resourceMetadata.ResourceKeySegment], + }, + ); + + // by convention the property itself needs to be called "name" + parameter.name = "name"; + + return { ...parameter, kind: "property" }; +} + +function buildResourceDecorators(schema: ArmResourceSchema): TypespecDecorator[] { + const resourceModelDecorators: TypespecDecorator[] = []; + + if (schema.resourceMetadata.IsSingletonResource) { + resourceModelDecorators.push({ + name: "singleton", + arguments: [getSingletonName(schema)], + }); + } + + if (schema.resourceMetadata.IsTenantResource) { + resourceModelDecorators.push({ + name: "tenantResource", + }); + } else if (schema.resourceMetadata.IsSubscriptionResource) { + // TODO: need to change after TSP support location resource for other resource types + if (schema.resourceMetadata.GetOperations[0].Path.includes("/locations/")) { + resourceModelDecorators.push({ + name: "locationResource", + }); + } else { + resourceModelDecorators.push({ + name: "subscriptionResource", + }); + } + } + + return resourceModelDecorators; +} + +function getSingletonName(schema: ArmResourceSchema): string { + const key = schema.resourceMetadata.ResourceKey; + const pathLast = schema.resourceMetadata.GetOperations[0].Path.split("/").pop() ?? ""; + if (key !== pathLast) { + if (pathLast?.includes("{")) { + // this is from c# config, which need confirm with service + return "default"; + } else { + return pathLast; + } + } + return key; +} diff --git a/packages/extensions/openapi-to-cadl/src/transforms/transform-choices.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-choices.ts similarity index 80% rename from packages/extensions/openapi-to-cadl/src/transforms/transform-choices.ts rename to packages/extensions/openapi-to-typespec/src/transforms/transform-choices.ts index 20935fc2fd..95ab5ea250 100644 --- a/packages/extensions/openapi-to-cadl/src/transforms/transform-choices.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-choices.ts @@ -1,16 +1,16 @@ import { ChoiceSchema, ChoiceValue, CodeModel, SchemaType, SealedChoiceSchema } from "@autorest/codemodel"; import { getDataTypes } from "../data-types"; -import { CadlChoiceValue, CadlEnum } from "../interfaces"; +import { TypespecChoiceValue, TypespecEnum } from "../interfaces"; import { getEnumDecorators } from "../utils/decorators"; import { transformValue } from "../utils/values"; -export function transformEnum(schema: SealedChoiceSchema | ChoiceSchema, codeModel: CodeModel): CadlEnum { +export function transformEnum(schema: SealedChoiceSchema | ChoiceSchema, codeModel: CodeModel): TypespecEnum { const dataTypes = getDataTypes(codeModel); - let cadlEnum = dataTypes.get(schema) as CadlEnum; + let typespecEnum = dataTypes.get(schema) as TypespecEnum; - if (!cadlEnum) { - cadlEnum = { + if (!typespecEnum) { + typespecEnum = { decorators: getEnumDecorators(schema), doc: schema.language.default.documentation, kind: "enum", @@ -24,14 +24,14 @@ export function transformEnum(schema: SealedChoiceSchema | ChoiceSchema, codeMod }), }; } - return cadlEnum; + return typespecEnum; } function hasSyntheticName(schema: ChoiceSchema | SealedChoiceSchema) { return schema.language.default.name.startsWith("components·"); } -function transformChoiceMember(member: ChoiceValue): CadlChoiceValue { +function transformChoiceMember(member: ChoiceValue): TypespecChoiceValue { return { doc: member.language.default.description, name: member.language.default.name, diff --git a/packages/extensions/openapi-to-cadl/src/transforms/transform-object.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts similarity index 69% rename from packages/extensions/openapi-to-cadl/src/transforms/transform-object.ts rename to packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts index f6cdf6f89a..0b0a85150e 100644 --- a/packages/extensions/openapi-to-cadl/src/transforms/transform-object.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts @@ -6,24 +6,29 @@ import { Property, Schema, SchemaType, + StringSchema, } from "@autorest/codemodel"; +import { get } from "lodash"; import { getDataTypes } from "../data-types"; -import { CadlObject, CadlObjectProperty } from "../interfaces"; +import { TypespecObject, TypespecObjectProperty } from "../interfaces"; import { addCorePageAlias } from "../utils/alias"; import { getModelDecorators, getPropertyDecorators } from "../utils/decorators"; import { getDiscriminator, getOwnDiscriminator } from "../utils/discriminator"; import { getLogger } from "../utils/logger"; import { + isAnyObjectSchema, isAnySchema, + isArmIdSchema, isArraySchema, isChoiceSchema, isConstantSchema, isDictionarySchema, isSealedChoiceSchema, + isStringSchema, } from "../utils/schemas"; import { transformValue } from "../utils/values"; -const cadlTypes = new Map([ +const typespecTypes = new Map([ [SchemaType.Date, "plainDate"], [SchemaType.DateTime, "utcDateTime"], [SchemaType.UnixTime, "plainTime"], @@ -36,19 +41,19 @@ const cadlTypes = new Map([ [SchemaType.Number, "float32"], [SchemaType.Integer, "int32"], [SchemaType.Boolean, "boolean"], - [SchemaType.Credential, "@secret string"], + [SchemaType.Credential, "string"], [SchemaType.Duration, "duration"], [SchemaType.AnyObject, "object"], ]); -export function transformObject(schema: ObjectSchema, codeModel: CodeModel): CadlObject { - const cadlTypes = getDataTypes(codeModel); - let visited: Partial = cadlTypes.get(schema) as CadlObject; +export function transformObject(schema: ObjectSchema, codeModel: CodeModel): TypespecObject { + const typespecTypes = getDataTypes(codeModel); + let visited: Partial = typespecTypes.get(schema) as TypespecObject; if (visited) { - return visited as CadlObject; + return visited as TypespecObject; } - const logger = getLogger("transformOperationGroup"); + const logger = getLogger("transformObject"); logger.info(`Transforming object ${schema.language.default.name}`); @@ -58,7 +63,7 @@ export function transformObject(schema: ObjectSchema, codeModel: CodeModel): Cad // Marking as visited before processing properties to avoid infinite recursion // when transforming properties that reference this object. visited = { name, doc }; - cadlTypes.set(schema, visited as any); + typespecTypes.set(schema, visited as any); const properties = (schema.properties ?? []) .filter((p) => !p.isDiscriminator) @@ -70,7 +75,7 @@ export function transformObject(schema: ObjectSchema, codeModel: CodeModel): Cad discriminatorProperty && properties.push(discriminatorProperty); } - const updatedVisited: CadlObject = { + const updatedVisited: TypespecObject = { name, doc, kind: "object", @@ -84,27 +89,27 @@ export function transformObject(schema: ObjectSchema, codeModel: CodeModel): Cad addCorePageAlias(updatedVisited); addFixmes(updatedVisited); - cadlTypes.set(schema, updatedVisited); + typespecTypes.set(schema, updatedVisited); return updatedVisited; } -function addFixmes(cadlObject: CadlObject): void { - cadlObject.fixMe = cadlObject.fixMe ?? []; +function addFixmes(typespecObject: TypespecObject): void { + typespecObject.fixMe = typespecObject.fixMe ?? []; - if ((cadlObject.extendedParents ?? []).length > 1) { - cadlObject.fixMe - .push(`// FIXME: (multiple-inheritance) Multiple inheritance is not supported in CADL, so this type will only inherit from one parent. + if ((typespecObject.extendedParents ?? []).length > 1) { + typespecObject.fixMe + .push(`// FIXME: (multiple-inheritance) Multiple inheritance is not supported in Typespec, so this type will only inherit from one parent. // this may happen because of multiple parents having discriminator properties. - // Parents not included ${cadlObject.extendedParents?.join(", ")}`); + // Parents not included ${typespecObject.extendedParents?.join(", ")}`); } } -export function transformObjectProperty(propertySchema: Property, codeModel: CodeModel): CadlObjectProperty { +export function transformObjectProperty(propertySchema: Property, codeModel: CodeModel): TypespecObjectProperty { const name = propertySchema.language.default.name; const doc = propertySchema.language.default.description; if (isObjectSchema(propertySchema.schema)) { const dataTypes = getDataTypes(codeModel); - let visited = dataTypes.get(propertySchema.schema) as CadlObject; + let visited = dataTypes.get(propertySchema.schema) as TypespecObject; if (!visited) { visited = transformObject(propertySchema.schema, codeModel); dataTypes.set(propertySchema.schema, visited); @@ -117,7 +122,7 @@ export function transformObjectProperty(propertySchema: Property, codeModel: Cod isOptional: propertySchema.required !== true, type: visited.name, decorators: getPropertyDecorators(propertySchema), - ...(propertySchema.readOnly === true && { visibility: "read" }), + defaultValue: propertySchema.schema.defaultValue, }; } @@ -129,15 +134,15 @@ export function transformObjectProperty(propertySchema: Property, codeModel: Cod doc, name, isOptional: propertySchema.required !== true, - type: getCadlType(propertySchema.schema, codeModel), + type: getTypespecType(propertySchema.schema, codeModel), decorators: getPropertyDecorators(propertySchema), fixMe: getFixme(propertySchema, codeModel), }; } function getFixme(property: Property, codeModel: CodeModel): string[] { - const cadlType = getCadlType(property.schema, codeModel); - if (cadlType === "utcDateTime") { + const typespecType = getTypespecType(property.schema, codeModel); + if (typespecType === "utcDateTime") { return ["// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario."]; } @@ -170,12 +175,23 @@ function getSpreadParents(schema: ObjectSchema, codeModel: CodeModel): string[] const dictionaryParent = immediateParents.find((p) => isDictionarySchema(p)) as DictionarySchema | undefined; if (dictionaryParent) { - spreadingParents.push(`Record<${getCadlType(dictionaryParent.elementType, codeModel)}>`); + spreadingParents.push(`Record<${getTypespecType(dictionaryParent.elementType, codeModel)}>`); } return spreadingParents; } -export function getCadlType(schema: Schema, codeModel: CodeModel): string { +function getArmIdType(schema: Schema): string { + const allowedResources = schema.extensions?.["x-ms-arm-id-details"]?.["allowedResources"]; + if (allowedResources) { + return `ResourceIdentifier<[${schema.extensions?.["x-ms-arm-id-details"]?.["allowedResources"] + .map((r: { [x: string]: string }) => '{type: "' + r["type"] + '";}') + .join(",")}]>`; + } else { + return "ResourceIdentifier"; + } +} + +export function getTypespecType(schema: Schema, codeModel: CodeModel): string { const schemaType = schema.type; const visited = getDataTypes(codeModel).get(schema); @@ -188,7 +204,7 @@ export function getCadlType(schema: Schema, codeModel: CodeModel): string { } if (isArraySchema(schema)) { - const elementType = getCadlType(schema.elementType, codeModel); + const elementType = getTypespecType(schema.elementType, codeModel); return `${elementType}[]`; } @@ -201,18 +217,26 @@ export function getCadlType(schema: Schema, codeModel: CodeModel): string { } if (isDictionarySchema(schema)) { - return `Record<${getCadlType(schema.elementType, codeModel)}>`; + return `Record<${getTypespecType(schema.elementType, codeModel)}>`; } if (isAnySchema(schema)) { return `unknown`; } - const cadlType = cadlTypes.get(schemaType); + if (isAnyObjectSchema(schema)) { + return `Record`; + } + + if (isArmIdSchema(schema) || (schema as StringSchema).extensions?.["x-ms-arm-id-details"]) { + return getArmIdType(schema); + } + + const typespecType = typespecTypes.get(schemaType); - if (!cadlType) { + if (!typespecType) { throw new Error(`Unknown type ${(schema as any).type}`); } - return cadlType; + return typespecType; } diff --git a/packages/extensions/openapi-to-cadl/src/transforms/transform-operations.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts similarity index 81% rename from packages/extensions/openapi-to-cadl/src/transforms/transform-operations.ts rename to packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts index c717f9e5a7..7ee2475c45 100644 --- a/packages/extensions/openapi-to-cadl/src/transforms/transform-operations.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts @@ -9,9 +9,18 @@ import { Schema, SchemaResponse, } from "@autorest/codemodel"; +import { OperationWithResourceOperationFlag } from "utils/resource-discovery"; import { getDataTypes } from "../data-types"; -import { CadlOperation, CadlOperationGroup, CadlParameter, CadlParameterLocation, Extension } from "../interfaces"; +import { + TypespecOperation, + TypespecOperationGroup, + TypespecParameter, + TypespecParameterLocation, + Extension, +} from "../interfaces"; import { transformDataType } from "../model"; +import { getOptions } from "../options"; +import { getPropertyDecorators } from "../utils/decorators"; import { getLogger } from "../utils/logger"; import { getLanguageMetadata } from "../utils/metadata"; import { isConstantSchema } from "../utils/schemas"; @@ -19,10 +28,10 @@ import { isConstantSchema } from "../utils/schemas"; export function transformOperationGroup( { language, operations }: OperationGroup, codeModel: CodeModel, -): CadlOperationGroup { +): TypespecOperationGroup { const name = language.default.name ? `${language.default.name}Operations` : ""; const doc = language.default.description; - const ops = operations.reduce((acc, op) => { + const ops = operations.reduce((acc, op) => { acc = [...acc, ...transformOperation(op, codeModel)]; return acc; }, []); @@ -58,11 +67,20 @@ function transformResponses(responses: SchemaResponse[] = [], codeModel: CodeMod }); } -export function transformOperation(operation: Operation, codeModel: CodeModel): CadlOperation[] { +export function transformOperation(operation: Operation, codeModel: CodeModel): TypespecOperation[] { + const { isArm } = getOptions(); + if (isArm) { + if ( + (operation as OperationWithResourceOperationFlag).isResourceOperation || + transformRoute(operation.requests?.[0].protocol)?.match(/^\/providers\/[^/]+\/operations$/) + ) { + return []; + } + } return (operation.requests ?? []).map((r) => transformRequest(r, operation, codeModel)); } -function transformRequest(_request: Request, operation: Operation, codeModel: CodeModel): CadlOperation { +export function transformRequest(_request: Request, operation: Operation, codeModel: CodeModel): TypespecOperation { const { language, responses, requests } = operation; const name = language.default.name; const doc = language.default.description; @@ -141,9 +159,9 @@ function filterOperationParameters(parameter: Parameter, visitedParameters: Set< return shouldVisit; } -export function transformParameter(parameter: Parameter, codeModel: CodeModel): CadlParameter { +export function transformParameter(parameter: Parameter, codeModel: CodeModel): TypespecParameter { // Body parameter doesn't have a serializedName, in that case we get the name - const name = parameter.language.default.serializedName ?? parameter.language.default.name; + const name = parameter.language.default.name; const doc = parameter.language.default.description; const dataTypes = getDataTypes(codeModel); @@ -156,6 +174,9 @@ export function transformParameter(parameter: Parameter, codeModel: CodeModel): isOptional: parameter.required !== true, type: visited.name, location: transformParameterLocation(parameter), + decorators: getPropertyDecorators(parameter), + serializedName: parameter.language.default.serializedName ?? parameter.language.default.name, + defaultValue: parameter.schema.defaultValue, }; } @@ -176,7 +197,7 @@ function getRequestParameters(operation: Operation): Parameter[] { return [...parameters, ...signatureParameters]; } -function transformParameterLocation(parameter: Parameter): CadlParameterLocation { +function transformParameterLocation(parameter: Parameter): TypespecParameterLocation { const location: ParameterLocation = parameter.protocol.http?.in; if (!location) { diff --git a/packages/extensions/openapi-to-cadl/src/transforms/transform-service-information.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts similarity index 94% rename from packages/extensions/openapi-to-cadl/src/transforms/transform-service-information.ts rename to packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts index 2b329899a6..0189eb70aa 100644 --- a/packages/extensions/openapi-to-cadl/src/transforms/transform-service-information.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts @@ -1,15 +1,19 @@ import { CodeModel, ImplementationLocation, ParameterLocation } from "@autorest/codemodel"; +import { getArmCommonTypeVersion } from "../autorest-session"; import { EndpointParameter, ServiceInformation } from "../interfaces"; +import { getOptions } from "../options"; import { getFirstEndpoint } from "../utils/get-endpoint"; import { isConstantSchema } from "../utils/schemas"; export function transformServiceInformation(model: CodeModel): ServiceInformation { + const { isArm } = getOptions(); return { name: model.info.title, doc: model.info.description ?? "// FIXME: (miissing-service-description) Add service description", endpoint: getFirstEndpoint(model), endpointParameters: transformEndpointParameters(model), version: getApiVersion(model), + armCommonTypeVersion: isArm ? getArmCommonTypeVersion() : undefined, }; } diff --git a/packages/extensions/openapi-to-typespec/src/utils/alias.ts b/packages/extensions/openapi-to-typespec/src/utils/alias.ts new file mode 100644 index 0000000000..846c1cdf49 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/utils/alias.ts @@ -0,0 +1,22 @@ +import { TypespecAlias, TypespecObject } from "../interfaces"; + +export function addCorePageAlias(typespecObject: TypespecObject): TypespecAlias | undefined { + if (!typespecObject.decorators?.some((d) => d.name === "pagedResult")) { + return; + } + const value = typespecObject.properties.filter((p) => p.name === "value"); + if (!typespecObject.properties.some((p) => p.name === "nextLink") || !value.length) { + return; + } + + typespecObject.decorators = typespecObject.decorators.filter((d) => d.name !== "pagedResult"); + typespecObject.properties = typespecObject.properties.filter((p) => p.name !== "nextLink" && p.name !== "value"); + + typespecObject.alias = { + alias: "Azure.Core.Page", + params: [value[0].type.replace("[]", "")], + module: "@azure-tools/typespec-azure-core", + }; + + return; +} diff --git a/packages/extensions/openapi-to-typespec/src/utils/decorators.ts b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts new file mode 100644 index 0000000000..72446dc125 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts @@ -0,0 +1,255 @@ +import { + ChoiceSchema, + ObjectSchema, + Parameter, + Property, + Schema, + SchemaType, + SealedChoiceSchema, + SerializationStyle, + isNumberSchema, +} from "@autorest/codemodel"; +import { TypespecDecorator, DecoratorArgument } from "../interfaces"; +import { getOwnDiscriminator } from "./discriminator"; +import { isSealedChoiceSchema, isStringSchema } from "./schemas"; + +export function getModelDecorators(model: ObjectSchema): TypespecDecorator[] { + const decorators: TypespecDecorator[] = []; + + const paging = model.language.default.paging ?? {}; + if (paging.isPageable) { + decorators.push({ + name: "pagedResult", + module: "@azure-tools/typespec-azure-core", + namespace: "Azure.Core", + }); + } + + const ownDiscriminator = getOwnDiscriminator(model); + + if (ownDiscriminator) { + decorators.push({ + name: "discriminator", + arguments: [ownDiscriminator.serializedName], + }); + } + + if (model.language.default.isError) { + decorators.push({ name: "error" }); + } + + let resource = model.language.default.resource; + if (resource) { + if (resource.startsWith("/")) { + // Remove the leading + resource = resource.slice(1); + } + decorators.push({ + name: "resource", + module: "@azure-tools/typespec-azure-core", + namespace: "Azure.Core", + arguments: [resource], + }); + } + + return decorators; +} + +export function getPropertyDecorators(element: Property | Parameter): TypespecDecorator[] { + const decorators: TypespecDecorator[] = []; + + const paging = element.language.default.paging ?? {}; + + if (!isParameter(element)) { + const visibility = getPropertyVisibility(element); + if (visibility.length) { + decorators.push({ name: "visibility", arguments: visibility }); + } + } + + if (paging.isNextLink) { + decorators.push({ name: "nextLink" }); + } + + if (paging.isValue) { + decorators.push({ name: "items" }); + } + + if (element.schema.type === SchemaType.Credential) { + decorators.push({ name: "secret" }); + } + + getNumberSchemaDecorators(element.schema, decorators); + getStringSchemaDecorators(element.schema, decorators); + + if (element.language.default.isResourceKey) { + decorators.push({ + name: "key", + fixMe: [ + "// FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one", + ], + }); + } + + if (isParameter(element) && element?.protocol?.http?.in) { + const location = element.protocol.http.in; + const locationDecorator: TypespecDecorator = { name: location }; + + if (location === "query") { + locationDecorator.arguments = [element.language.default.serializedName]; + if (element.schema.type === SchemaType.Array) { + let format = "multi"; + switch (element.protocol.http?.style) { + case SerializationStyle.Form: + if (!element.protocol.http?.explode) { + format = "csv"; + } + break; + case SerializationStyle.PipeDelimited: + format = "pipes"; + break; + case SerializationStyle.Simple: + format = "csv"; + break; + case SerializationStyle.SpaceDelimited: + format = "ssv"; + break; + case SerializationStyle.TabDelimited: + format = "tsv"; + break; + } + locationDecorator.arguments = [ + { + value: `{name: "${element.language.default.serializedName}", format: "${format}"}`, + options: { unwrap: true }, + }, + ]; + } + } + + decorators.push(locationDecorator); + } + + if (!isParameter(element) && element.serializedName !== element.language.default.name) { + decorators.push({ + name: "projectedName", + arguments: ["json", (element as Property).serializedName], + }); + } + + return decorators; +} + +function isParameter(schema: Parameter | Property): schema is Parameter { + return !(schema as Property).serializedName; +} + +export function getPropertyVisibility(property: Property): string[] { + const xmsMutability = property.extensions?.["x-ms-mutability"]; + if (!xmsMutability) { + return property.readOnly ? ["read"] : []; + } + + const visibility: string[] = []; + + if (Array.isArray(xmsMutability)) { + if (xmsMutability.includes("read")) { + visibility.push("read"); + } + if (xmsMutability.includes("create")) { + visibility.push("create"); + } + if (xmsMutability.includes("update")) { + visibility.push("update"); + } + } + + return visibility; +} + +function getNumberSchemaDecorators(schema: Schema, decorators: TypespecDecorator[]): void { + if (!isNumberSchema(schema)) { + return; + } + + if (schema.maximum) { + if (schema.exclusiveMaximum) { + decorators.push({ name: "maxValueExclusive", arguments: [schema.maximum] }); + } else { + decorators.push({ name: "maxValue", arguments: [schema.maximum] }); + } + } + + if (schema.minimum) { + if (schema.exclusiveMinimum) { + decorators.push({ name: "minValueExclusive", arguments: [schema.minimum] }); + } else { + decorators.push({ name: "minValue", arguments: [schema.minimum] }); + } + } +} + +function getStringSchemaDecorators(schema: Schema, decorators: TypespecDecorator[]): void { + if (!isStringSchema(schema)) { + return; + } + + if (schema.maxLength) { + decorators.push({ name: "maxLength", arguments: [schema.maxLength] }); + } + + if (schema.minLength) { + decorators.push({ name: "minLength", arguments: [schema.minLength] }); + } + + if (schema.pattern) { + decorators.push({ name: "pattern", arguments: [escapeRegex(schema.pattern)] }); + } +} + +function escapeRegex(str: string) { + return str.replace(/\\/g, "\\\\"); +} + +export function getEnumDecorators(enumeration: SealedChoiceSchema | ChoiceSchema): TypespecDecorator[] { + const decorators: TypespecDecorator[] = []; + + if (isSealedChoiceSchema(enumeration)) { + decorators.push({ + name: "Azure.Core.fixed", + module: "@azure-tools/typespec-azure-core", + }); + } + + return decorators; +} +export function generateDecorators(decorators: TypespecDecorator[] = []): string { + const definitions: string[] = []; + for (const decorator of decorators ?? []) { + if (decorator.fixMe) { + definitions.push(decorator.fixMe.join(`\n`)); + } + if (decorator.arguments) { + definitions.push(`@${decorator.name}(${decorator.arguments.map((a) => getArgumentValue(a)).join(", ")})`); + } else { + definitions.push(`@${decorator.name}`); + } + } + + return definitions.join("\n"); +} + +function getArgumentValue(argument: DecoratorArgument | string | number): string { + if (typeof argument === "string") { + return `"${argument}"`; + } else if (typeof argument === "number") { + return `${argument}`; + } else { + let value = argument.value; + if (!argument.options?.unwrap) { + value = `${argument.value}`; + } + + return value; + } +} diff --git a/packages/extensions/openapi-to-cadl/src/utils/discriminator.ts b/packages/extensions/openapi-to-typespec/src/utils/discriminator.ts similarity index 89% rename from packages/extensions/openapi-to-cadl/src/utils/discriminator.ts rename to packages/extensions/openapi-to-typespec/src/utils/discriminator.ts index f569d77253..f49137bdd2 100644 --- a/packages/extensions/openapi-to-cadl/src/utils/discriminator.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/discriminator.ts @@ -1,12 +1,12 @@ import { ObjectSchema, Property } from "@autorest/codemodel"; -import { CadlObjectProperty } from "../interfaces"; +import { TypespecObjectProperty } from "../interfaces"; import { getLogger } from "./logger"; export function getOwnDiscriminator(schema: ObjectSchema): Property | undefined { return schema.discriminator?.property; } -export function getDiscriminator(schema: ObjectSchema): CadlObjectProperty | undefined { +export function getDiscriminator(schema: ObjectSchema): TypespecObjectProperty | undefined { if (!schema.discriminatorValue) { return undefined; } diff --git a/packages/extensions/openapi-to-cadl/src/utils/docs.ts b/packages/extensions/openapi-to-typespec/src/utils/docs.ts similarity index 91% rename from packages/extensions/openapi-to-cadl/src/utils/docs.ts rename to packages/extensions/openapi-to-typespec/src/utils/docs.ts index 676b5a2dd8..a6eb721b2b 100644 --- a/packages/extensions/openapi-to-cadl/src/utils/docs.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/docs.ts @@ -1,4 +1,5 @@ import { WithSummary } from "../interfaces"; +import { getOptions } from "../options"; interface WithDocs { doc?: string | string[]; @@ -27,7 +28,8 @@ export function generateSummary({ summary }: WithSummary): string { } function lineWrap(doc: string) { - const maxLength = 80; + const { isArm } = getOptions(); + const maxLength = isArm ? Number.POSITIVE_INFINITY : 80; if (doc.length <= maxLength && !doc.includes("\n")) { return `"${doc}"`; diff --git a/packages/extensions/openapi-to-cadl/src/utils/errors.ts b/packages/extensions/openapi-to-typespec/src/utils/errors.ts similarity index 100% rename from packages/extensions/openapi-to-cadl/src/utils/errors.ts rename to packages/extensions/openapi-to-typespec/src/utils/errors.ts diff --git a/packages/extensions/openapi-to-cadl/src/utils/format.ts b/packages/extensions/openapi-to-typespec/src/utils/format.ts similarity index 56% rename from packages/extensions/openapi-to-cadl/src/utils/format.ts rename to packages/extensions/openapi-to-typespec/src/utils/format.ts index f81c41eb8b..1e7187566e 100644 --- a/packages/extensions/openapi-to-cadl/src/utils/format.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/format.ts @@ -6,13 +6,15 @@ export function formatFile(content: string, filepath: string) { }); } -export async function formatCadlFile(content: string, filepath: string): Promise { +export async function formatTypespecFile(content: string, filepath: string): Promise { try { return await format(content, { plugins: ["@typespec/prettier-plugin-typespec"], filepath, }); - } catch { + } catch (e) { + // const logger = getLogger("formatTypespecFile"); + // logger.error(`Failed to format file ${filepath} \n ${e}`); return content; } } diff --git a/packages/extensions/openapi-to-cadl/src/utils/get-endpoint.ts b/packages/extensions/openapi-to-typespec/src/utils/get-endpoint.ts similarity index 100% rename from packages/extensions/openapi-to-cadl/src/utils/get-endpoint.ts rename to packages/extensions/openapi-to-typespec/src/utils/get-endpoint.ts diff --git a/packages/extensions/openapi-to-cadl/src/utils/imports.ts b/packages/extensions/openapi-to-typespec/src/utils/imports.ts similarity index 77% rename from packages/extensions/openapi-to-cadl/src/utils/imports.ts rename to packages/extensions/openapi-to-typespec/src/utils/imports.ts index c9e7311643..09efe43f57 100644 --- a/packages/extensions/openapi-to-cadl/src/utils/imports.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/imports.ts @@ -1,11 +1,12 @@ -import { CadlProgram } from "../interfaces"; +import { TypespecProgram } from "../interfaces"; +import { getOptions } from "../options"; type Imports = { modules: string[]; namespaces: string[]; }; -export function getModelsImports(program: CadlProgram) { +export function getModelsImports(program: TypespecProgram) { const modules = new Set(); const namespaces = new Set(); for (const choice of program.models.enums) { @@ -28,6 +29,12 @@ export function getModelsImports(program: CadlProgram) { } } } + const { isArm } = getOptions(); + + if (isArm) { + modules.add(`import "@azure-tools/typespec-azure-resource-manager";`); + namespaces.add(`using Azure.ResourceManager;`); + } return { modules: [...modules], @@ -35,7 +42,7 @@ export function getModelsImports(program: CadlProgram) { }; } -export function getRoutesImports(_program: CadlProgram) { +export function getRoutesImports(_program: TypespecProgram) { const imports: Imports = { modules: [`import "@azure-tools/typespec-azure-core";`, `import "@typespec/rest";`, `import "./models.tsp";`], namespaces: [`using TypeSpec.Rest;`, `using TypeSpec.Http;`], diff --git a/packages/extensions/openapi-to-cadl/src/utils/logger.ts b/packages/extensions/openapi-to-typespec/src/utils/logger.ts similarity index 100% rename from packages/extensions/openapi-to-cadl/src/utils/logger.ts rename to packages/extensions/openapi-to-typespec/src/utils/logger.ts diff --git a/packages/extensions/openapi-to-cadl/src/utils/lro.ts b/packages/extensions/openapi-to-typespec/src/utils/lro.ts similarity index 100% rename from packages/extensions/openapi-to-cadl/src/utils/lro.ts rename to packages/extensions/openapi-to-typespec/src/utils/lro.ts diff --git a/packages/extensions/openapi-to-cadl/src/utils/metadata.ts b/packages/extensions/openapi-to-typespec/src/utils/metadata.ts similarity index 100% rename from packages/extensions/openapi-to-cadl/src/utils/metadata.ts rename to packages/extensions/openapi-to-typespec/src/utils/metadata.ts diff --git a/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts b/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts new file mode 100644 index 0000000000..37d2aea83e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts @@ -0,0 +1,26 @@ +import { TypespecObjectProperty } from "../interfaces"; +import { generateDecorators } from "./decorators"; +import { generateDocs } from "./docs"; +import { transformValue } from "./values"; + +export function getModelPropertiesDeclarations(properties: TypespecObjectProperty[]): string[] { + const definitions: string[] = []; + for (const property of properties) { + const propertyDoc = generateDocs(property); + propertyDoc && definitions.push(propertyDoc); + const decorators = generateDecorators(property.decorators); + decorators && definitions.push(decorators); + property.fixMe && property.fixMe.length && definitions.push(property.fixMe.join("\n")); + let defaultValue = ""; + if (property.defaultValue) { + defaultValue = ` = ${transformValue(property.defaultValue)}`; + } + definitions.push(`"${property.name}"${getOptionalOperator(property)}: ${property.type}${defaultValue};`); + } + + return definitions; +} + +function getOptionalOperator(property: TypespecObjectProperty) { + return property.isOptional ? "?" : ""; +} diff --git a/packages/extensions/openapi-to-cadl/src/utils/namespace.ts b/packages/extensions/openapi-to-typespec/src/utils/namespace.ts similarity index 66% rename from packages/extensions/openapi-to-cadl/src/utils/namespace.ts rename to packages/extensions/openapi-to-typespec/src/utils/namespace.ts index 84d9aa2793..1723f3d8d9 100644 --- a/packages/extensions/openapi-to-cadl/src/utils/namespace.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/namespace.ts @@ -1,7 +1,7 @@ -import { CadlProgram } from "../interfaces"; +import { TypespecProgram } from "../interfaces"; import { getOptions } from "../options"; -export function getNamespace(program: CadlProgram) { +export function getNamespace(program: TypespecProgram) { let { namespace } = getOptions(); namespace = namespace ?? program.serviceInformation.name.replace(/ /g, "").replace(/-/g, ""); diff --git a/packages/extensions/openapi-to-typespec/src/utils/operations.ts b/packages/extensions/openapi-to-typespec/src/utils/operations.ts new file mode 100644 index 0000000000..c94b787f5e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/utils/operations.ts @@ -0,0 +1,5 @@ +import { CodeModel, HttpMethod, Operation } from "@autorest/codemodel"; + +export function getHttpMethod(_codeModel: CodeModel, operation: Operation): HttpMethod { + return operation.requests?.[0].protocol.http?.method; +} diff --git a/packages/extensions/openapi-to-cadl/src/utils/paging.ts b/packages/extensions/openapi-to-typespec/src/utils/paging.ts similarity index 100% rename from packages/extensions/openapi-to-cadl/src/utils/paging.ts rename to packages/extensions/openapi-to-typespec/src/utils/paging.ts diff --git a/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts b/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts new file mode 100644 index 0000000000..36558bf15b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts @@ -0,0 +1,186 @@ +import { readFileSync } from "fs"; +import { join } from "path"; +import { ObjectSchema, Operation } from "@autorest/codemodel"; +import { getSession } from "../autorest-session"; +import { TypespecObject, TspArmResource } from "../interfaces"; +import { isGeneratedResourceObject } from "../transforms/transform-arm-resources"; +export interface _ArmResourceOperation { + Name: string; + Path: string; + Method: string; + OperationID: string; + IsLongRunning: boolean; + Description?: string; + PagingMetadata: _ArmPagingMetadata | null; +} + +export interface _ArmPagingMetadata { + Method: string; + NextPageMethod?: string; + ItemName: string; + NextLinkName: string; +} + +export interface ArmResource { + Name: string; + GetOperations: _ArmResourceOperation[]; + CreateOperations: _ArmResourceOperation[]; + UpdateOperations: _ArmResourceOperation[]; + DeleteOperations: _ArmResourceOperation[]; + ListOperations: _ArmResourceOperation[]; + OperationsFromResourceGroupExtension: _ArmResourceOperation[]; + OperationsFromSubscriptionExtension: _ArmResourceOperation[]; + OperationsFromManagementGroupExtension: _ArmResourceOperation[]; + OperationsFromTenantExtension: _ArmResourceOperation[]; + OtherOperations: _ArmResourceOperation[]; + Parents: string[]; + SwaggerModelName: string; + ResourceType: string; + ResourceKey: string; + ResourceKeySegment: string; + IsTrackedResource: boolean; + IsTenantResource: boolean; + IsSubscriptionResource: boolean; + IsManagementGroupResource: boolean; + IsExtensionResource: boolean; + IsSingletonResource: boolean; +} + +let armResourceCache: Record | undefined; + +export interface OperationWithResourceOperationFlag extends Operation { + isResourceOperation?: boolean; +} + +export function getResourceOperations(resource: ArmResource): Record { + const operations: Record = {}; + const codeModel = getSession().model; + + const allOperations = resource.GetOperations.concat(resource.CreateOperations) + .concat(resource.UpdateOperations) + .concat(resource.DeleteOperations) + .concat(resource.ListOperations) + .concat(resource.OperationsFromResourceGroupExtension) + .concat(resource.OperationsFromSubscriptionExtension) + .concat(resource.OperationsFromManagementGroupExtension) + .concat(resource.OperationsFromTenantExtension) + .concat(resource.OtherOperations); + for (const operationGroup of codeModel.operationGroups) { + for (const operation of operationGroup.operations) { + for (const operationMetadata of allOperations) { + if (operation.operationId === operationMetadata.OperationID) { + operations[operation.operationId] = operation; + (operation as OperationWithResourceOperationFlag).isResourceOperation = true; + } + } + } + } + + return operations; +} + +export function getSingletonResouceListOperation(resource: ArmResource): Operation | undefined { + const codeModel = getSession().model; + + if (resource.IsSingletonResource) { + let predictSingletonResourcePath: string | undefined; + if (resource.IsSingletonResource) { + predictSingletonResourcePath = resource.GetOperations[0].Path.split("/").slice(0, -1).join("/"); + } + + for (const operationGroup of codeModel.operationGroups) { + for (const operation of operationGroup.operations) { + // for singleton resource, c# will drop the list operation but we need to get it back + if ( + operation.requests?.length && + operation.requests[0].protocol?.http?.path === predictSingletonResourcePath && + operation.requests[0].protocol.http?.method === "get" + ) { + return operation; + } + } + } + } +} + +export function getResourceExistOperation(resource: ArmResource): Operation | undefined { + const codeModel = getSession().model; + for (const operationGroup of codeModel.operationGroups) { + for (const operation of operationGroup.operations) { + if ( + operation.requests?.length && + operation.requests[0].protocol?.http?.path === resource.GetOperations[0].Path && + operation.requests[0].protocol.http?.method === "head" + ) { + return operation; + } + } + } +} + +export function getArmResourcesMetadata(): Record { + if (armResourceCache) { + return armResourceCache; + } + const session = getSession(); + const outputFolder: string = session.configuration["output-folder"] ?? ""; + + try { + const content = readFileSync(join(outputFolder, "resources.json"), "utf-8"); + const { Resources }: { Resources: Record } = JSON.parse(content); + armResourceCache = Resources; + + return armResourceCache; + } catch (e) { + throw new Error(`Failed to load resources.json from ${outputFolder} \n ${e}`); + } +} + +export interface ArmResourceSchema extends ObjectSchema { + resourceMetadata: ArmResource; +} + +export function tagSchemaAsResource(schema: ObjectSchema): void { + const resourcesMetadata = getArmResourcesMetadata(); + + for (const resourceName in resourcesMetadata) { + if (resourcesMetadata[resourceName].SwaggerModelName.toLowerCase() === schema.language.default.name.toLowerCase()) { + (schema as ArmResourceSchema).resourceMetadata = resourcesMetadata[resourceName]; + return; + } + } +} + +export function isResourceSchema(schema: ObjectSchema): schema is ArmResourceSchema { + return Boolean((schema as ArmResourceSchema).resourceMetadata); +} + +const _ArmCoreTypes = [ + "Resource", + "ProxyResource", + "TrackedResource", + "ErrorAdditionalInfo", + "ErrorDetail", + "ErrorResponse", + "Operation", + "OperationListResult", + "OperationDisplay", + "Origin", + "SystemData", + "Origin", + "ManagedServiceIdentity", + "ManagedSystemAssignedIdentity", + "EntityTag", + "ResourceKind", + "ResourcePlan", + "ResourceSku", + "ManagedBy", +]; + +export function filterResourceRelatedObjects(objects: TypespecObject[]): TypespecObject[] { + return objects.filter((o) => !_ArmCoreTypes.includes(o.name) && !isGeneratedResourceObject(o.name)); +} + +export function isTspArmResource(schema: TypespecObject): schema is TspArmResource { + return Boolean((schema as TspArmResource).resourceKind); +} diff --git a/packages/extensions/openapi-to-cadl/src/utils/resources.ts b/packages/extensions/openapi-to-typespec/src/utils/resources.ts similarity index 93% rename from packages/extensions/openapi-to-cadl/src/utils/resources.ts rename to packages/extensions/openapi-to-typespec/src/utils/resources.ts index a32844b259..ed5299e98b 100644 --- a/packages/extensions/openapi-to-cadl/src/utils/resources.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/resources.ts @@ -11,10 +11,11 @@ import { SchemaResponse, } from "@autorest/codemodel"; import { getDataTypes } from "../data-types"; -import { CadlResource } from "../interfaces"; +import { TypespecResource } from "../interfaces"; import { transformDataType } from "../model"; import { getOptions } from "../options"; import { hasLROExtension } from "./lro"; +import { getHttpMethod } from "./operations"; import { getPageableResponse, isPageableOperation, isPageValue } from "./paging"; import { isArraySchema, isResponseSchema } from "./schemas"; @@ -60,7 +61,7 @@ function isActionOperation(operation: Operation) { return lastPart.startsWith(":"); } -function getResourceKind(codeModel: CodeModel, operation: Operation): CadlResource | undefined { +function getResourceKind(codeModel: CodeModel, operation: Operation): TypespecResource | undefined { if (isActionOperation(operation)) { // Actions are not yet supported return undefined; @@ -116,7 +117,7 @@ function getResourceKind(codeModel: CodeModel, operation: Operation): CadlResour return undefined; } -function handleLROResource(codeModel: CodeModel, operation: Operation): CadlResource | undefined { +function handleLROResource(codeModel: CodeModel, operation: Operation): TypespecResource | undefined { const operationMethod = getHttpMethod(codeModel, operation); if (operationMethod === HttpMethod.Patch) { @@ -152,7 +153,7 @@ function handleResource( | "LongRunningResourceCreateWithServiceProvidedName" | "LongRunningResourceDelete" | "ResourceAction", -): CadlResource | undefined { +): TypespecResource | undefined { const dataTypes = getDataTypes(codeModel); for (const response of operation.responses ?? []) { let schema: Schema | undefined; @@ -174,10 +175,10 @@ function handleResource( if (!markResource(operation, schema)) { return undefined; } - const cadlResponse = dataTypes.get(schema) ?? transformDataType(schema, codeModel); + const typespecResponse = dataTypes.get(schema) ?? transformDataType(schema, codeModel); return { kind, - response: cadlResponse, + response: typespecResponse, }; } @@ -195,10 +196,6 @@ function getResourcePath(operation: Operation): string { throw new Error(`Couldn't find a resource path for operation ${operation.language.default.name}`); } -function getHttpMethod(_codeModel: CodeModel, operation: Operation): HttpMethod { - return operation.requests?.[0].protocol.http?.method; -} - function getNonPageableListResource(operation: Operation): ArraySchema | undefined { if (!operation.responses) { throw new Error(`Operation ${operation.language.default.name} has no defined responses`); @@ -225,7 +222,7 @@ function getNonPageableListResource(operation: Operation): ArraySchema | undefin return isResponseSchema(firstResponse) && isArraySchema(firstResponse.schema) ? firstResponse.schema : undefined; } -function handleGetOperation(codeModel: CodeModel, operation: Operation): CadlResource | undefined { +function handleGetOperation(codeModel: CodeModel, operation: Operation): TypespecResource | undefined { if (isPageableOperation(operation)) { return getPageableResource(codeModel, operation); } @@ -236,12 +233,12 @@ function handleGetOperation(codeModel: CodeModel, operation: Operation): CadlRes return undefined; } const dataTypes = getDataTypes(codeModel); - const cadlResponse = + const typespecResponse = dataTypes.get(nonPageableListResource.elementType) ?? transformDataType(nonPageableListResource.elementType, codeModel); return { kind: "NonPagedResourceList", - response: cadlResponse, + response: typespecResponse, }; } @@ -262,7 +259,7 @@ function markResource(operation: Operation, elementType: Schema) { return false; } -function getPageableResource(codeModel: CodeModel, operation: Operation): CadlResource | undefined { +function getPageableResource(codeModel: CodeModel, operation: Operation): TypespecResource | undefined { const response = getPageableResponse(operation) as SchemaResponse; if (isObjectSchema(response.schema)) { for (const property of response.schema.properties ?? []) { @@ -276,10 +273,10 @@ function getPageableResource(codeModel: CodeModel, operation: Operation): CadlRe } } - const cadlResponse = dataTypes.get(elementType) ?? transformDataType(elementType, codeModel); + const typespecResponse = dataTypes.get(elementType) ?? transformDataType(elementType, codeModel); return { kind: "ResourceList", - response: cadlResponse, + response: typespecResponse, }; } } @@ -295,7 +292,8 @@ function markModelWithResource(elementType: Schema, resource: string) { function markWithKey(schema: ObjectSchema): boolean { const { properties, parents } = schema; - const { guessResourceKey } = getOptions(); + const options = getOptions(); + const { guessResourceKey } = options; if (!guessResourceKey) { return false; diff --git a/packages/extensions/openapi-to-cadl/src/utils/schemas.ts b/packages/extensions/openapi-to-typespec/src/utils/schemas.ts similarity index 72% rename from packages/extensions/openapi-to-cadl/src/utils/schemas.ts rename to packages/extensions/openapi-to-typespec/src/utils/schemas.ts index b242c2c6fd..3eff69036b 100644 --- a/packages/extensions/openapi-to-cadl/src/utils/schemas.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/schemas.ts @@ -9,12 +9,17 @@ import { SealedChoiceSchema, Response, AnySchema, + StringSchema, } from "@autorest/codemodel"; export function isConstantSchema(schema: Schema): schema is ConstantSchema { return schema.type === SchemaType.Constant; } +export function isStringSchema(schema: Schema): schema is StringSchema { + return schema.type === SchemaType.String; +} + export function isArraySchema(schema: Schema): schema is ArraySchema { return schema.type === SchemaType.Array; } @@ -36,5 +41,13 @@ export function isResponseSchema(response: Response | SchemaResponse): response } export function isAnySchema(schema: Schema): schema is AnySchema { - return schema.type === SchemaType.Any || schema.type === SchemaType.AnyObject; + return schema.type === SchemaType.Any; +} + +export function isAnyObjectSchema(schema: Schema): schema is AnySchema { + return schema.type === SchemaType.AnyObject; +} + +export function isArmIdSchema(schema: Schema): boolean { + return schema.type === SchemaType.ArmId; } diff --git a/packages/extensions/openapi-to-cadl/src/utils/values.ts b/packages/extensions/openapi-to-typespec/src/utils/values.ts similarity index 100% rename from packages/extensions/openapi-to-cadl/src/utils/values.ts rename to packages/extensions/openapi-to-typespec/src/utils/values.ts diff --git a/packages/extensions/openapi-to-cadl/test/analyzeText/readme.md b/packages/extensions/openapi-to-typespec/test/analyzeText/readme.md similarity index 100% rename from packages/extensions/openapi-to-cadl/test/analyzeText/readme.md rename to packages/extensions/openapi-to-typespec/test/analyzeText/readme.md diff --git a/packages/extensions/openapi-to-cadl/test/analyzeText/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp similarity index 92% rename from packages/extensions/openapi-to-cadl/test/analyzeText/tsp-output/main.tsp rename to packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp index e1412a9571..edbc82d4da 100644 --- a/packages/extensions/openapi-to-cadl/test/analyzeText/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp @@ -6,8 +6,8 @@ using TypeSpec.Rest; using TypeSpec.Http; @service({ title: "Microsoft Cognitive Language Service - Analyze Text Authoring", - version: "2022-05-01", }) +@versioned(Versions) @server( "{Endpoint}/language", "The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview.", @@ -24,3 +24,8 @@ documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview. """) namespace Azure.Language.Authoring; + +@doc("The available API versions.") +enum Versions { + v2022_05_01: "2022-05-01", +} diff --git a/packages/extensions/openapi-to-cadl/test/analyzeText/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp similarity index 98% rename from packages/extensions/openapi-to-cadl/test/analyzeText/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp index 32d04d5c52..008e08d46b 100644 --- a/packages/extensions/openapi-to-cadl/test/analyzeText/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp @@ -135,7 +135,7 @@ model ProjectMetadata { storageInputContainerName: string; @doc("The project settings.") - settings?: unknown; + settings?: Record; @doc("The new project name.") projectName: string; @@ -161,9 +161,7 @@ model ErrorResponse { } @doc("The error object.") -model Error { - ...Record; - +model Error extends Record { @doc("One of a server-defined set of error codes.") code: ErrorCode; @@ -217,7 +215,7 @@ model CreateProjectOptions { storageInputContainerName: string; @doc("The project settings.") - settings?: unknown; + settings?: Record; @doc("The new project name.") projectName: string; @@ -339,9 +337,7 @@ model CreateDeploymentOptions { } @doc("Represents the state of a deployment job.") -model DeploymentJobState { - ...JobState; -} +model DeploymentJobState extends JobState {} @doc("Represents a job's state.") model JobState { @@ -382,17 +378,13 @@ model Warning { } @doc("Represents the state of an export job.") -model ExportProjectJobState { - ...JobState; - +model ExportProjectJobState extends JobState { @doc("The URL to use in order to download the exported project.") resultUrl?: string; } @doc("Represents the state of an import job.") -model ImportProjectJobState { - ...JobState; -} +model ImportProjectJobState extends JobState {} @doc("Represents a list of retrieved trained models.") model ProjectTrainedModels is Azure.Core.Page; @@ -454,9 +446,7 @@ model EvaluationSummary { model TrainingJobs is Azure.Core.Page; @doc("Represents the state of a training job.") -model TrainingJobState { - ...JobState; - +model TrainingJobState extends JobState { @doc("Represents training tasks detailed result.") result: TrainingJobResult; } @@ -498,9 +488,7 @@ model SubTrainingJobState { } @doc("Represents the state of a project deletion job.") -model ProjectDeletionJobState { - ...JobState; -} +model ProjectDeletionJobState extends JobState {} @doc("Represents a list of retrieved languages.") model SupportedLanguages is Azure.Core.Page; diff --git a/packages/extensions/openapi-to-cadl/test/analyzeText/tsp-output/package.json b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/package.json similarity index 100% rename from packages/extensions/openapi-to-cadl/test/analyzeText/tsp-output/package.json rename to packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/package.json diff --git a/packages/extensions/openapi-to-cadl/test/analyzeText/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/routes.tsp similarity index 87% rename from packages/extensions/openapi-to-cadl/test/analyzeText/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/routes.tsp index f434c6fd58..555ad2cfeb 100644 --- a/packages/extensions/openapi-to-cadl/test/analyzeText/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/routes.tsp @@ -14,16 +14,16 @@ interface TextAnalysisAuthoringOperations { { parameters: { @doc("The maximum number of resources to return from the collection.") - @query - top: int32; + @query("top") + top?: int32; @doc("An offset into the collection of the first resource to be returned.") - @query - skip: int32; + @query("skip") + skip?: int32; @doc("The maximum number of resources to include in a single response.") - @query - maxpagesize: int32; + @query("maxpagesize") + maxpagesize?: int32; }; } >; @@ -43,6 +43,7 @@ interface TextAnalysisAuthoringOperations { Export is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -50,12 +51,12 @@ interface TextAnalysisAuthoringOperations { Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. """) - @query + @query("stringIndexType") stringIndexType: StringIndexType; @doc("Kind of asset to export.") - @query - assetKind: string; + @query("assetKind") + assetKind?: string; }, void >; @@ -69,6 +70,7 @@ exists, the data of that project is replaced. Import is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -85,6 +87,7 @@ exists, the data of that project is replaced. Train is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -101,16 +104,16 @@ exists, the data of that project is replaced. { parameters: { @doc("The maximum number of resources to return from the collection.") - @query - top: int32; + @query("top") + top?: int32; @doc("An offset into the collection of the first resource to be returned.") - @query - skip: int32; + @query("skip") + skip?: int32; @doc("The maximum number of resources to include in a single response.") - @query - maxpagesize: int32; + @query("maxpagesize") + maxpagesize?: int32; }; } >; @@ -121,6 +124,7 @@ exists, the data of that project is replaced. SwapDeployments is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -146,6 +150,7 @@ exists, the data of that project is replaced. GetDeploymentStatus is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -166,6 +171,7 @@ exists, the data of that project is replaced. GetSwapDeploymentsStatus is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -185,6 +191,7 @@ metadata, and assets. GetExportStatus is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -201,6 +208,7 @@ metadata, and assets. GetImportStatus is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -217,16 +225,16 @@ metadata, and assets. { parameters: { @doc("The maximum number of resources to return from the collection.") - @query - top: int32; + @query("top") + top?: int32; @doc("An offset into the collection of the first resource to be returned.") - @query - skip: int32; + @query("skip") + skip?: int32; @doc("The maximum number of resources to include in a single response.") - @query - maxpagesize: int32; + @query("maxpagesize") + maxpagesize?: int32; }; } >; @@ -246,6 +254,7 @@ the raw inference results for the data included in the evaluation process. GetModelEvaluationResults is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -257,20 +266,20 @@ the raw inference results for the data included in the evaluation process. Specifies the method used to interpret string offsets. For additional information see https://aka.ms/text-analytics-offsets. """) - @query + @query("stringIndexType") stringIndexType: StringIndexType; @doc("The maximum number of resources to return from the collection.") - @query - top: int32; + @query("top") + top?: int32; @doc("An offset into the collection of the first resource to be returned.") - @query - skip: int32; + @query("skip") + skip?: int32; @doc("The maximum number of resources to include in a single response.") - @query - maxpagesize: int32; + @query("maxpagesize") + maxpagesize?: int32; }, EvaluationResults >; @@ -284,6 +293,7 @@ performance measurements of the model e.g., F1, Precision, Recall, etc. GetModelEvaluationSummary is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -300,20 +310,21 @@ performance measurements of the model e.g., F1, Precision, Recall, etc. ListTrainingJobs is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @doc("The maximum number of resources to return from the collection.") - @query - top: int32; + @query("top") + top?: int32; @doc("An offset into the collection of the first resource to be returned.") - @query - skip: int32; + @query("skip") + skip?: int32; @doc("The maximum number of resources to include in a single response.") - @query - maxpagesize: int32; + @query("maxpagesize") + maxpagesize?: int32; }, TrainingJobs >; @@ -324,6 +335,7 @@ performance measurements of the model e.g., F1, Precision, Recall, etc. GetTrainingStatus is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -340,6 +352,7 @@ performance measurements of the model e.g., F1, Precision, Recall, etc. CancelTrainingJob is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -368,16 +381,16 @@ performance measurements of the model e.g., F1, Precision, Recall, etc. { parameters: { @doc("The maximum number of resources to return from the collection.") - @query - top: int32; + @query("top") + top?: int32; @doc("An offset into the collection of the first resource to be returned.") - @query - skip: int32; + @query("skip") + skip?: int32; @doc("The maximum number of resources to include in a single response.") - @query - maxpagesize: int32; + @query("maxpagesize") + maxpagesize?: int32; }; } >; @@ -388,20 +401,20 @@ performance measurements of the model e.g., F1, Precision, Recall, etc. ListTrainingConfigVersions is Azure.Core.Foundations.Operation< { @doc("The project kind.") - @query + @query("projectKind") projectKind: ProjectKind; @doc("The maximum number of resources to return from the collection.") - @query - top: int32; + @query("top") + top?: int32; @doc("An offset into the collection of the first resource to be returned.") - @query - skip: int32; + @query("skip") + skip?: int32; @doc("The maximum number of resources to include in a single response.") - @query - maxpagesize: int32; + @query("maxpagesize") + maxpagesize?: int32; }, TrainingConfigVersions >; diff --git a/packages/extensions/openapi-to-cadl/test/batch/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/tspconfig.yaml similarity index 94% rename from packages/extensions/openapi-to-cadl/test/batch/tsp-output/tspconfig.yaml rename to packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/tspconfig.yaml index 013d55ba1e..fb405fa449 100644 --- a/packages/extensions/openapi-to-cadl/test/batch/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/tspconfig.yaml @@ -1,5 +1,5 @@ emit: - - "@azure-tools/typespec-autorest": + - "@azure-tools/typespec-autorest" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-cadl/test/anomalyDetector/readme.md b/packages/extensions/openapi-to-typespec/test/anomalyDetector/readme.md similarity index 100% rename from packages/extensions/openapi-to-cadl/test/anomalyDetector/readme.md rename to packages/extensions/openapi-to-typespec/test/anomalyDetector/readme.md diff --git a/packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/main.tsp similarity index 100% rename from packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/main.tsp rename to packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/main.tsp diff --git a/packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/models.tsp similarity index 99% rename from packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/models.tsp index 3df07a29b7..f688b34039 100644 --- a/packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/models.tsp @@ -379,6 +379,7 @@ model VariableState { variable?: string; @doc("Proportion of NaN values filled of the variable.") + @maxValue(1) filledNARatio?: float32; @doc("Number of effective points counted.") @@ -440,9 +441,11 @@ model AnomalyValue { Indicates the significance of the anomaly. The higher the severity, the more significant the anomaly. """) + @maxValue(1) severity: float32; @doc("Raw score from the model.") + @maxValue(2) score: float32; interpretation?: AnomalyInterpretation[]; @@ -485,6 +488,7 @@ date-time. endTime: utcDateTime; @doc("An optional field. The name of the model whose maximum length is 24.") + @maxLength(24) displayName?: string; @doc(""" diff --git a/packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/routes.tsp similarity index 85% rename from packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/routes.tsp index 9134ab6de0..7901ecf7a8 100644 --- a/packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/routes.tsp @@ -17,14 +17,7 @@ user an overall status of the time series. @route("/timeseries/entire/detect") @post op DetectEntireSeries is Azure.Core.Foundations.Operation< - { - @doc(""" -Time series points and period if needed. Advanced model parameters can also be -set in the request. -""") - @body - body: DetectRequest; - }, + DetectRequest, EntireDetectResponse >; @@ -38,14 +31,7 @@ real-time monitoring of business metrics. @route("/timeseries/last/detect") @post op DetectLastPoint is Azure.Core.Foundations.Operation< - { - @doc(""" -Time series points and period if needed. Advanced model parameters can also be -set in the request. -""") - @body - body: DetectRequest; - }, + DetectRequest, LastDetectResponse >; @@ -54,14 +40,7 @@ set in the request. @route("/timeseries/changepoint/detect") @post op DetectChangePoint is Azure.Core.Foundations.Operation< - { - @doc(""" -Time series points and granularity is needed. Advanced model parameters can -also be set in the request if needed. -""") - @body - body: ChangePointDetectRequest; - }, + ChangePointDetectRequest, ChangePointDetectResponse >; @@ -83,14 +62,7 @@ column is value. """) @route("/multivariate/models") @post -op TrainMultivariateModel is Azure.Core.Foundations.Operation< - { - @doc("Training request") - @body - body: ModelInfo; - }, - void ->; +op TrainMultivariateModel is Azure.Core.Foundations.Operation; @summary("List Multivariate Models") @doc("List models of a subscription") @@ -99,12 +71,12 @@ op ListMultivariateModel is Azure.Core.ResourceList< { parameters: { @doc("$skip indicates how many models will be skipped.") - @query - $skip: int32; + @query("$skip") + $skip?: int32; @doc("$top indicates how many models will be fetched.") - @query - $top: int32; + @query("$top") + $top?: int32 = 10; }; } >; diff --git a/packages/extensions/openapi-to-cadl/test/analyzeText/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/tspconfig.yaml similarity index 94% rename from packages/extensions/openapi-to-cadl/test/analyzeText/tsp-output/tspconfig.yaml rename to packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/tspconfig.yaml index 013d55ba1e..fb405fa449 100644 --- a/packages/extensions/openapi-to-cadl/test/analyzeText/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/tspconfig.yaml @@ -1,5 +1,5 @@ emit: - - "@azure-tools/typespec-autorest": + - "@azure-tools/typespec-autorest" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/agrifood.md b/packages/extensions/openapi-to-typespec/test/arm-agrifood/agrifood.md new file mode 100644 index 0000000000..03b4547995 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/agrifood.md @@ -0,0 +1,40 @@ +```yaml +library-name: AgFoodPlatform +namespace: Azure.ResourceManager.AgFoodPlatform +isAzureSpec: true +isArm: true +require: https://github.com/Azure/azure-rest-api-specs/tree/7cc7728e5be252a7c6e559ea380411c8cceffa89/specification/agrifood/resource-manager/readme.md +skip-csproj: true +modelerfour: + flatten-payloads: false + +format-by-name-rules: + "tenantId": "uuid" + "ETag": "etag" + "location": "azure-location" + "*Uri": "Uri" + "*Uris": "Uri" + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + Vmos: VmOS + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/resources.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/resources.json new file mode 100644 index 0000000000..e53cc3ac96 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/resources.json @@ -0,0 +1,561 @@ +{ + "Resources": { + "DataConnector": { + "Name": "DataConnector", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/dataConnectors/{dataConnectorName}", + "Method": "GET", + "OperationID": "DataConnectors_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get specific Data Connector resource by DataConnectorName." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/dataConnectors/{dataConnectorName}", + "Method": "PUT", + "OperationID": "DataConnectors_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update Data Connector For MADMA resource." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/dataConnectors/{dataConnectorName}", + "Method": "PUT", + "OperationID": "DataConnectors_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update Data Connector For MADMA resource." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/dataConnectors/{dataConnectorName}", + "Method": "DELETE", + "OperationID": "DataConnectors_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a Data Connectors with given dataConnector name." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/dataConnectors", + "Method": "GET", + "OperationID": "DataConnectors_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the Data Connector Credentials for MADMA instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DataManagerForAgriculture"], + "SwaggerModelName": "DataConnector", + "ResourceType": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "ResourceKey": "dataConnectorName", + "ResourceKeySegment": "dataConnectors", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DataManagerForAgricultureExtension": { + "Name": "DataManagerForAgricultureExtension", + "GetOperations": [ + { + "Name": "Get", + "Path": "/providers/Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions/{dataManagerForAgricultureExtensionId}", + "Method": "GET", + "OperationID": "DataManagerForAgricultureExtensions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Data Manager For Agriculture extension." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/providers/Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions", + "Method": "GET", + "OperationID": "DataManagerForAgricultureExtensions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Get list of Data Manager For Agriculture extension." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["TenantResource"], + "SwaggerModelName": "DataManagerForAgricultureExtension", + "ResourceType": "Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions", + "ResourceKey": "dataManagerForAgricultureExtensionId", + "ResourceKeySegment": "farmBeatsExtensionDefinitions", + "IsTrackedResource": false, + "IsTenantResource": true, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DataManagerForAgriculture": { + "Name": "DataManagerForAgriculture", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}", + "Method": "GET", + "OperationID": "DataManagerForAgricultureResources_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get DataManagerForAgriculture resource." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}", + "Method": "PUT", + "OperationID": "DataManagerForAgricultureResources_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update Data Manager For Agriculture resource." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}", + "Method": "PATCH", + "OperationID": "DataManagerForAgricultureResources_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a Data Manager For Agriculture resource." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}", + "Method": "DELETE", + "OperationID": "DataManagerForAgricultureResources_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a Data Manager For Agriculture resource." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats", + "Method": "GET", + "OperationID": "DataManagerForAgricultureResources_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the DataManagerForAgriculture instances for a resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetDataManagerForAgricultures", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/farmBeats", + "Method": "GET", + "OperationID": "DataManagerForAgricultureResources_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the DataManagerForAgriculture instances for a subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "DataManagerForAgriculture", + "ResourceType": "Microsoft.AgFoodPlatform/farmBeats", + "ResourceKey": "dataManagerForAgricultureResourceName", + "ResourceKeySegment": "farmBeats", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Extension": { + "Name": "Extension", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/extensions/{extensionId}", + "Method": "GET", + "OperationID": "Extensions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get installed extension details by extension id." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/extensions/{extensionId}", + "Method": "PUT", + "OperationID": "Extensions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Install or Update extension. Additional Api Properties are merged patch and if the extension is updated to a new version then the obsolete entries will be auto deleted from Additional Api Properties." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/extensions/{extensionId}", + "Method": "PUT", + "OperationID": "Extensions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Install or Update extension. Additional Api Properties are merged patch and if the extension is updated to a new version then the obsolete entries will be auto deleted from Additional Api Properties." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/extensions/{extensionId}", + "Method": "DELETE", + "OperationID": "Extensions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Uninstall extension." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/extensions", + "Method": "GET", + "OperationID": "Extensions_ListByDataManagerForAgriculture", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByDataManagerForAgriculture", + "NextPageMethod": "ListByDataManagerForAgricultureNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Get installed extensions details." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DataManagerForAgriculture"], + "SwaggerModelName": "Extension", + "ResourceType": "Microsoft.AgFoodPlatform/farmBeats/extensions", + "ResourceKey": "extensionId", + "ResourceKeySegment": "extensions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "AgFoodPlatformPrivateEndpointConnection": { + "Name": "AgFoodPlatformPrivateEndpointConnection", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "GET", + "OperationID": "PrivateEndpointConnections_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Private endpoint connection object." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "PUT", + "OperationID": "PrivateEndpointConnections_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Approves or Rejects a Private endpoint connection request." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "PUT", + "OperationID": "PrivateEndpointConnections_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Approves or Rejects a Private endpoint connection request." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "DELETE", + "OperationID": "PrivateEndpointConnections_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete Private endpoint connection request." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateEndpointConnections", + "Method": "GET", + "OperationID": "PrivateEndpointConnections_ListByResource", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResource", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Get list of Private endpoint connections." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DataManagerForAgriculture"], + "SwaggerModelName": "PrivateEndpointConnection", + "ResourceType": "Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections", + "ResourceKey": "privateEndpointConnectionName", + "ResourceKeySegment": "privateEndpointConnections", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "AgFoodPlatformPrivateLinkResource": { + "Name": "AgFoodPlatformPrivateLinkResource", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateLinkResources/{subResourceName}", + "Method": "GET", + "OperationID": "PrivateLinkResources_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Private link resource object." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateLinkResources", + "Method": "GET", + "OperationID": "PrivateLinkResources_ListByResource", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResource", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Get list of Private link resources." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DataManagerForAgriculture"], + "SwaggerModelName": "PrivateLinkResource", + "ResourceType": "Microsoft.AgFoodPlatform/farmBeats/privateLinkResources", + "ResourceKey": "subResourceName", + "ResourceKeySegment": "privateLinkResources", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Solution": { + "Name": "Solution", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/solutions/{solutionId}", + "Method": "GET", + "OperationID": "Solutions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get installed Solution details by Solution id." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/solutions/{solutionId}", + "Method": "PUT", + "OperationID": "Solutions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Install Or Update Solution." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/solutions/{solutionId}", + "Method": "PUT", + "OperationID": "Solutions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Install Or Update Solution." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/solutions/{solutionId}", + "Method": "DELETE", + "OperationID": "Solutions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Uninstall Solution." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/solutions", + "Method": "GET", + "OperationID": "Solutions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Get installed Solutions details." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DataManagerForAgriculture"], + "SwaggerModelName": "Solution", + "ResourceType": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "ResourceKey": "solutionId", + "ResourceKeySegment": "solutions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DataManagerForAgricultureSolution": { + "Name": "DataManagerForAgricultureSolution", + "GetOperations": [ + { + "Name": "Get", + "Path": "/providers/Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions/{dataManagerForAgricultureSolutionId}", + "Method": "GET", + "OperationID": "SolutionsDiscoverability_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Data Manager For Agriculture solution by id." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/providers/Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions", + "Method": "GET", + "OperationID": "SolutionsDiscoverability_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Get list of Data Manager For Agriculture solutions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["TenantResource"], + "SwaggerModelName": "DataManagerForAgricultureSolution", + "ResourceType": "Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions", + "ResourceKey": "dataManagerForAgricultureSolutionId", + "ResourceKeySegment": "farmBeatsSolutionDefinitions", + "IsTrackedResource": false, + "IsTenantResource": true, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp new file mode 100644 index 0000000000..72877b9f11 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp @@ -0,0 +1,55 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DataManagerForAgriculture.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.AgFoodPlatform; +@doc("DataConnector Model.") +@parentResource(DataManagerForAgriculture) +model DataConnector is ProxyResource { + @doc("Connector name.") + @maxLength(63) + @minLength(1) + @path + @key("dataConnectorName") + @segment("dataConnectors") + name: string; + + ...Azure.ResourceManager.EntityTag; +} + +@armResourceOperations +interface DataConnectors { + @doc("Get specific Data Connector resource by DataConnectorName.") + get is ArmResourceRead; + @doc("Create or update Data Connector For MADMA resource.") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Delete a Data Connectors with given dataConnector name.") + delete is ArmResourceDeleteSync; + @doc("Lists the Data Connector Credentials for MADMA instance.") + list is ArmResourceListByParent< + DataConnector, + { + ...BaseParameters; + + @doc(""" +Maximum number of items needed (inclusive). +Minimum = 10, Maximum = 1000, Default value = 50. +""") + @maxValue(1000) + @minValue(10) + @query("$maxPageSize") + $maxPageSize?: int32 = 50; + + @doc("Continuation token for getting next set of results.") + @query("$skipToken") + $skipToken?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp new file mode 100644 index 0000000000..bfcd70862d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp @@ -0,0 +1,62 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.AgFoodPlatform; +@doc("Data Manager For Agriculture ARM Resource.") +model DataManagerForAgriculture + is TrackedResource { + @doc("DataManagerForAgriculture resource name.") + @maxLength(63) + @minLength(1) + @pattern("^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$") + @path + @key("dataManagerForAgricultureResourceName") + @segment("farmBeats") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; +} + +@armResourceOperations +interface DataManagerForAgricultureResources { + @doc("Get DataManagerForAgriculture resource.") + get is ArmResourceRead; + @doc("Create or update Data Manager For Agriculture resource.") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update a Data Manager For Agriculture resource.") + update is ArmResourcePatchAsync< + DataManagerForAgriculture, + DataManagerForAgricultureProperties + >; + @doc("Delete a Data Manager For Agriculture resource.") + delete is ArmResourceDeleteSync; + @doc("Lists the DataManagerForAgriculture instances for a resource group.") + listByResourceGroup is ArmResourceListByParent< + DataManagerForAgriculture, + { + ...BaseParameters; + + @doc(""" +Maximum number of items needed (inclusive). +Minimum = 10, Maximum = 1000, Default value = 50. +""") + @maxValue(1000) + @minValue(10) + @query("$maxPageSize") + $maxPageSize?: int32 = 50; + + @doc("Continuation token for getting next set of results.") + @query("$skipToken") + $skipToken?: string; + } + >; + @doc("Lists the DataManagerForAgriculture instances for a subscription.") + listBySubscription is ArmListBySubscription; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp new file mode 100644 index 0000000000..391df5ee82 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp @@ -0,0 +1,72 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.AgFoodPlatform; +@doc("DataManagerForAgriculture extension resource.") +@tenantResource +model DataManagerForAgricultureExtension + is ProxyResource { + @doc("dataManagerForAgricultureExtensionId to be queried.") + @pattern("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$") + @path + @key("dataManagerForAgricultureExtensionId") + @segment("farmBeatsExtensionDefinitions") + name: string; +} + +@armResourceOperations +interface DataManagerForAgricultureExtensions { + @doc("Get Data Manager For Agriculture extension.") + get is ArmResourceRead; + @doc("Get list of Data Manager For Agriculture extension.") + list is ArmResourceListByParent< + DataManagerForAgricultureExtension, + { + ...BaseParameters; + + @doc("DataManagerForAgricultureExtension ids.") + @query({ + name: "farmBeatsExtensionIds", + format: "multi", + }) + farmBeatsExtensionIds?: string[]; + + @doc("DataManagerForAgriculture extension names.") + @query({ + name: "farmBeatsExtensionNames", + format: "multi", + }) + farmBeatsExtensionNames?: string[]; + + @doc("Extension categories.") + @query({ + name: "extensionCategories", + format: "multi", + }) + extensionCategories?: string[]; + + @doc("Publisher ids.") + @query({ + name: "publisherIds", + format: "multi", + }) + publisherIds?: string[]; + + @doc(""" +Maximum number of items needed (inclusive). +Minimum = 10, Maximum = 1000, Default value = 50. +""") + @maxValue(1000) + @minValue(10) + @query("$maxPageSize") + $maxPageSize?: int32 = 50; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp new file mode 100644 index 0000000000..de1bd79ad2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp @@ -0,0 +1,58 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.AgFoodPlatform; +@doc("DataManagerForAgriculture solution resource.") +@tenantResource +model DataManagerForAgricultureSolution + is ProxyResource { + @doc("dataManagerForAgricultureSolutionId to be queried.") + @pattern("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$") + @path + @key("dataManagerForAgricultureSolutionId") + @segment("farmBeatsSolutionDefinitions") + name: string; +} + +@armResourceOperations +interface SolutionsDiscoverability { + @doc("Get Data Manager For Agriculture solution by id.") + get is ArmResourceRead; + @doc("Get list of Data Manager For Agriculture solutions.") + list is ArmResourceListByParent< + DataManagerForAgricultureSolution, + { + ...BaseParameters; + + @doc("Ids of Data Manager For Agriculture Solutions which the customer requests to fetch.") + @query({ + name: "farmBeatsSolutionIds", + format: "multi", + }) + farmBeatsSolutionIds?: string[]; + + @doc("Names of Data Manager For Agriculture Solutions which the customer requests to fetch.") + @query({ + name: "farmBeatsSolutionNames", + format: "multi", + }) + farmBeatsSolutionNames?: string[]; + + @doc(""" +Maximum number of items needed (inclusive). +Minimum = 10, Maximum = 1000, Default value = 50. +""") + @maxValue(1000) + @minValue(10) + @query("$maxPageSize") + $maxPageSize?: int32 = 50; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp new file mode 100644 index 0000000000..2c33c0e861 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp @@ -0,0 +1,67 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DataManagerForAgriculture.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.AgFoodPlatform; +@doc("Extension resource.") +@parentResource(DataManagerForAgriculture) +model Extension is ProxyResource { + @doc("Id of extension resource.") + @path + @key("extensionId") + @segment("extensions") + name: string; + + ...Azure.ResourceManager.EntityTag; +} + +@armResourceOperations +interface Extensions { + @doc("Get installed extension details by extension id.") + get is ArmResourceRead; + @doc("Install or Update extension. Additional Api Properties are merged patch and if the extension is updated to a new version then the obsolete entries will be auto deleted from Additional Api Properties.") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Uninstall extension.") + delete is ArmResourceDeleteSync; + @doc("Get installed extensions details.") + listByDataManagerForAgriculture is ArmResourceListByParent< + Extension, + { + ...BaseParameters; + + @doc("Installed extension ids.") + @query({ + name: "extensionIds", + format: "multi", + }) + extensionIds?: string[]; + + @doc("Installed extension categories.") + @query({ + name: "extensionCategories", + format: "multi", + }) + extensionCategories?: string[]; + + @doc(""" +Maximum number of items needed (inclusive). +Minimum = 10, Maximum = 1000, Default value = 50. +""") + @maxValue(1000) + @minValue(10) + @query("$maxPageSize") + $maxPageSize?: int32 = 50; + + @doc("Skip token for getting next set of results.") + @query("$skipToken") + $skipToken?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp new file mode 100644 index 0000000000..f426df808b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp @@ -0,0 +1,34 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DataManagerForAgriculture.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.AgFoodPlatform; +@doc("The private endpoint connection resource.") +@parentResource(DataManagerForAgriculture) +model PrivateEndpointConnection + is ProxyResource { + @doc("Private endpoint connection name.") + @path + @key("privateEndpointConnectionName") + @segment("privateEndpointConnections") + name: string; +} + +@armResourceOperations +interface PrivateEndpointConnections { + @doc("Get Private endpoint connection object.") + get is ArmResourceRead; + @doc("Approves or Rejects a Private endpoint connection request.") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Delete Private endpoint connection request.") + delete is ArmResourceDeleteAsync; + @doc("Get list of Private endpoint connections.") + listByResource is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp new file mode 100644 index 0000000000..8b8908b8c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp @@ -0,0 +1,29 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DataManagerForAgriculture.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.AgFoodPlatform; +@doc("A private link resource.") +@parentResource(DataManagerForAgriculture) +model PrivateLinkResource is ProxyResource { + @doc("Sub resource name.") + @path + @key("subResourceName") + @segment("privateLinkResources") + name: string; +} + +@armResourceOperations +interface PrivateLinkResources { + @doc("Get Private link resource object.") + get is ArmResourceRead; + @doc("Get list of Private link resources.") + listByResource is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp new file mode 100644 index 0000000000..d74f15a5aa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp @@ -0,0 +1,108 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DataManagerForAgriculture.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.AgFoodPlatform; +@doc("Solution resource.") +@parentResource(DataManagerForAgriculture) +model Solution is ProxyResource { + @doc("SolutionId for Data Manager For Agriculture Resource.") + @pattern("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$") + @path + @key("solutionId") + @segment("solutions") + name: string; + + ...Azure.ResourceManager.EntityTag; +} + +@armResourceOperations +interface Solutions { + @doc("Get installed Solution details by Solution id.") + get is ArmResourceRead; + @doc("Install Or Update Solution.") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Uninstall Solution.") + delete is ArmResourceDeleteSync; + @doc("Get installed Solutions details.") + list is ArmResourceListByParent< + Solution, + { + ...BaseParameters; + + @doc("Installed Solution ids.") + @query({ + name: "solutionIds", + format: "multi", + }) + solutionIds?: string[]; + + @doc("Ids of the resource.") + @query({ + name: "ids", + format: "multi", + }) + ids?: string[]; + + @doc("Names of the resource.") + @query({ + name: "names", + format: "multi", + }) + names?: string[]; + + @doc(""" +Filters on key-value pairs within the Properties object. +eg. \"{testKey} eq {testValue}\". +""") + @query({ + name: "propertyFilters", + format: "multi", + }) + propertyFilters?: string[]; + + @doc("Statuses of the resource.") + @query({ + name: "statuses", + format: "multi", + }) + statuses?: string[]; + + @doc("Minimum creation date of resource (inclusive).") + @query("minCreatedDateTime") + minCreatedDateTime?: utcDateTime; + + @doc("Maximum creation date of resource (inclusive).") + @query("maxCreatedDateTime") + maxCreatedDateTime?: utcDateTime; + + @doc("Minimum last modified date of resource (inclusive).") + @query("minLastModifiedDateTime") + minLastModifiedDateTime?: utcDateTime; + + @doc("Maximum last modified date of resource (inclusive).") + @query("maxLastModifiedDateTime") + maxLastModifiedDateTime?: utcDateTime; + + @doc(""" +Maximum number of items needed (inclusive). +Minimum = 10, Maximum = 1000, Default value = 50. +""") + @maxValue(1000) + @minValue(10) + @query("$maxPageSize") + $maxPageSize?: int32 = 50; + + @doc("Skip token for getting next set of results.") + @query("$skipToken") + $skipToken?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp new file mode 100644 index 0000000000..cfc34d8905 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp @@ -0,0 +1,36 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./DataConnector.tsp"; +import "./DataManagerForAgricultureExtension.tsp"; +import "./DataManagerForAgriculture.tsp"; +import "./Extension.tsp"; +import "./PrivateEndpointConnection.tsp"; +import "./PrivateLinkResource.tsp"; +import "./Solution.tsp"; +import "./DataManagerForAgricultureSolution.tsp"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "Azure AgFoodPlatform RP Service", +}) +@versioned(Versions) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v4) +@doc("APIs documentation for Microsoft Azure Data Manager for Agriculture Service.") +namespace Azure.ResourceManager.AgFoodPlatform; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2023_06_01_preview: "2023-06-01-preview", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp new file mode 100644 index 0000000000..d9a870cbe5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp @@ -0,0 +1,492 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.AgFoodPlatform; + +interface Operations extends Azure.ResourceManager.Operations {} + +enum CheckNameAvailabilityReason { + Invalid, + AlreadyExists, +} + +enum AuthCredentialsKind { + OAuthClientCredentials, + ApiKeyAuthCredentials, +} + +enum CreatedByType { + User, + Application, + ManagedIdentity, + Key, +} + +enum ProvisioningState { + Creating, + Updating, + Deleting, + Succeeded, + Failed, + Running, +} + +enum PublicNetworkAccess { + Enabled, + Disabled, +} + +enum PrivateEndpointServiceConnectionStatus { + Pending, + Approved, + Rejected, +} + +enum PrivateEndpointConnectionProvisioningState { + Succeeded, + Creating, + Deleting, + Failed, +} + +enum Origin { + user, + system, + `user,system`, +} + +enum ActionType { + Internal, +} + +@doc("The check availability request body.") +model CheckNameAvailabilityRequest { + @doc("The name of the resource for which availability needs to be checked.") + name?: string; + + @doc("The resource type.") + type?: string; +} + +@doc("The check availability result.") +model CheckNameAvailabilityResponse { + @doc("Indicates if the resource name is available.") + nameAvailable?: boolean; + + @doc("The reason why the given name is not available.") + reason?: CheckNameAvailabilityReason; + + @doc("Detailed reason why the given name is available.") + message?: string; +} + +@doc("DataConnector Properties.") +model DataConnectorProperties { + @doc("AuthCredentials abstract base class for Auth Purpose.") + credentials: AuthCredentials; +} + +@doc("AuthCredentials abstract base class for Auth Purpose.") +@discriminator("kind") +model AuthCredentials {} + +@doc("DataManagerForAgricultureExtension properties.") +model DataManagerForAgricultureExtensionProperties { + @doc("Target ResourceType of the Data Manager For Agriculture Extension.") + @visibility("read") + targetResourceType?: string; + + @doc("Data Manager For Agriculture Extension ID.") + @visibility("read") + @maxLength(100) + @minLength(2) + @pattern("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$") + farmBeatsExtensionId?: string; + + @doc("Data Manager For Agriculture Extension name.") + @visibility("read") + @maxLength(100) + @minLength(2) + farmBeatsExtensionName?: string; + + @doc("Data Manager For Agriculture Extension version.") + @visibility("read") + @maxLength(100) + @minLength(2) + @pattern("^([1-9]|10).\\d$") + farmBeatsExtensionVersion?: string; + + @doc("Publisher ID.") + @visibility("read") + @maxLength(100) + @minLength(2) + publisherId?: string; + + @doc("Textual description.") + @visibility("read") + @maxLength(500) + @minLength(2) + description?: string; + + @doc("Category of the extension. e.g. weather/sensor/satellite.") + @visibility("read") + @maxLength(100) + @minLength(2) + extensionCategory?: string; + + @doc("Data Manager For Agriculture Extension auth link.") + @visibility("read") + extensionAuthLink?: string; + + @doc("Data Manager For Agriculture Extension api docs link.") + @visibility("read") + extensionApiDocsLink?: string; + + @doc(""" +Detailed information which shows summary of requested data. +Used in descriptive get extension metadata call. +Information for weather category per api included are apisSupported, +customParameters, PlatformParameters and Units supported. +""") + @visibility("read") + detailedInformation?: DetailedInformation[]; +} + +@doc("Model to capture detailed information for Data Manager For AgricultureExtensions.") +model DetailedInformation { + @doc("ApiName available for the Data Manager For Agriculture Extension.") + apiName?: string; + + @doc("Extension provider's API documentation link.") + apiDocsLink?: string; + + @doc("Type of Api in Extension.") + apiType?: string; + + @doc("List of customParameters.") + customParameters?: string[]; + + @doc("List of platformParameters.") + platformParameters?: string[]; + + @doc("List of defaultParameters.") + apiDefaultInputParameters?: string[]; + + @doc("Unit systems info for the data provider.") + unitsSupported?: UnitSystemsInfo; + + @doc("List of apiInputParameters.") + apiInputParameters?: string[]; +} + +@doc("Unit systems info for the data provider.") +model UnitSystemsInfo { + @doc("UnitSystem key sent as part of ProviderInput.") + @maxLength(100) + @minLength(1) + key: string; + + @doc("List of unit systems supported by this data provider.") + values: string[]; +} + +@doc("Identity for the resource.") +model Identity { + @doc("The principal ID of resource identity. The value must be an UUID.") + @visibility("read") + principalId?: string; + + @doc("The tenant ID of resource. The value must be an UUID.") + @visibility("read") + tenantId?: string; + + @doc("The identity type.") + type?: "SystemAssigned"; +} + +@doc("Data Manager For Agriculture ARM Resource properties.") +model DataManagerForAgricultureProperties { + @doc("Uri of the Data Manager For Agriculture instance.") + @visibility("read") + instanceUri?: string; + + @doc("Data Manager For Agriculture instance provisioning state.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("Sensor integration request model.") + sensorIntegration?: SensorIntegration; + + @doc("Property to allow or block public traffic for an Azure Data Manager For Agriculture resource.") + publicNetworkAccess?: PublicNetworkAccess; + + @doc("Private endpoints.") + @visibility("read") + privateEndpointConnections?: PrivateEndpointConnection[]; +} + +@doc("Sensor integration request model.") +model SensorIntegration { + @doc("Sensor integration enable state.") + enabled?: string; + + @doc("Sensor integration instance provisioning state.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).") + provisioningInfo?: ErrorResponse; +} + +@doc("Properties of the private endpoint connection.") +model PrivateEndpointConnectionProperties { + @doc("The group ids for the private endpoint resource.") + @visibility("read") + groupIds?: string[]; + + @doc("The private endpoint resource.") + privateEndpoint?: PrivateEndpoint; + + @doc("A collection of information about the state of the connection between service consumer and provider.") + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + + @doc("The provisioning state of the private endpoint connection resource.") + @visibility("read") + provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +@doc("The private endpoint resource.") +model PrivateEndpoint { + @doc("The ARM identifier for private endpoint.") + @visibility("read") + id?: string; +} + +@doc("A collection of information about the state of the connection between service consumer and provider.") +model PrivateLinkServiceConnectionState { + @doc("Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.") + status?: PrivateEndpointServiceConnectionStatus; + + @doc("The reason for approval/rejection of the connection.") + description?: string; + + @doc("A message indicating if changes on the service provider require any updates on the consumer.") + actionsRequired?: string; +} + +@doc(""" +Arm async operation class. +Ref: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/async-operations. +""") +model ArmAsyncOperation { + @doc("Status of the async operation.") + status?: string; + + @doc(""" +Arm async operation error class. +Ref: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#azure-asyncoperation-resource-format. +""") + error?: ArmAsyncOperationError; +} + +@doc(""" +Arm async operation error class. +Ref: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#azure-asyncoperation-resource-format. +""") +model ArmAsyncOperationError { + @doc("Status of the async operation.") + code?: string; + + @doc("Status of the async operation.") + message?: string; +} + +@doc("Extension Installation Request Body.") +model ExtensionInstallationRequest { + @doc("Extension Version.") + @maxLength(10) + @minLength(3) + extensionVersion?: string; + + @doc("Additional Api Properties.") + additionalApiProperties?: Record; +} + +@doc("Api properties.") +model ApiProperties { + @doc("Interval in minutes for which the weather data for the api needs to be refreshed.") + @maxValue(10080) + apiFreshnessTimeInMinutes?: int32; +} + +@doc("Extension resource properties.") +model ExtensionProperties { + @doc("Extension Id.") + @visibility("read") + @pattern("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$") + extensionId?: string; + + @doc("Extension category. e.g. weather/sensor/satellite.") + @visibility("read") + extensionCategory?: string; + + @doc("Installed extension version.") + @visibility("read") + @pattern("^([1-9]|10).\\d$") + installedExtensionVersion?: string; + + @doc("Extension auth link.") + @visibility("read") + extensionAuthLink?: string; + + @doc("Extension api docs link.") + @visibility("read") + extensionApiDocsLink?: string; + + @doc("Additional Api Properties.") + @visibility("read") + additionalApiProperties?: Record; +} + +@doc("Properties of a private link resource.") +model PrivateLinkResourceProperties { + @doc("The private link resource group id.") + @visibility("read") + groupId?: string; + + @doc("The private link resource required member names.") + @visibility("read") + requiredMembers?: string[]; + + @doc("The private link resource private link DNS zone name.") + requiredZoneNames?: string[]; +} + +@doc("Solution resource properties.") +model SolutionProperties extends Record { + @doc("Partner Id of the Solution.") + @visibility("read") + partnerId?: string; + + @doc("SaaS subscriptionId of the installed SaaS application.") + @minLength(1) + saasSubscriptionId: string; + + @doc("SaaS subscription name of the installed SaaS application.") + @minLength(1) + saasSubscriptionName: string; + + @doc("SaaS application Marketplace Publisher Id.") + @minLength(1) + marketplacePublisherId: string; + + @doc("SaaS application Plan Id.") + @minLength(1) + planId: string; + + @doc("Role Assignment Id.") + roleAssignmentId?: string; + + @doc("SaaS application Offer Id.") + @minLength(1) + offerId: string; + + @doc("SaaS application Term Id.") + @minLength(1) + termId: string; +} + +@doc("DataManagerForAgricultureSolution properties.") +model DataManagerForAgricultureSolutionProperties { + @doc("Solution Partner Id.") + @visibility("read") + partnerId?: string; + + @doc("Solution Partner Tenant Id.") + @visibility("read") + partnerTenantId?: string; + + @doc(""" +Gets scope of the Data manager For Agriculture data access that's required for processing solution request to partner. +Example: For gdd they might need weatherScope and satelliteScope. +""") + @visibility("read") + dataAccessScopes?: string[]; + + marketplaceOfferDetails?: MarketplaceOfferDetails; + + @doc("Gets api-version Swagger Document Dictionary to capture all api-versions of swagger exposed by partner to Data Manager For Agriculture.") + @visibility("read") + openApiSpecsDictionary?: Record; + + @doc("Application id of the multi tenant application to be used by partner to access Data Manager For Agriculture data.") + @visibility("read") + accessFBApplicationId?: string; + + @doc("Application id of the SaaS multi tenant application.") + @visibility("read") + saaSApplicationId?: string; + + @doc("List of ActionIds needed to make the SaaS multi tenant application access relevant fb data.") + @visibility("read") + actionIds?: string[]; + + @doc("Role Id of the SaaS multi tenant application to access relevant fb data.") + @visibility("read") + roleId?: string; + + @doc("Role Name of the SaaS multi tenant application to access relevant fb data.") + @visibility("read") + roleName?: string; + + @doc("Application name of the multi tenant application to be used by partner to access Data Manager For Agriculture Data.") + @visibility("read") + accessFBApplicationName?: string; +} + +model MarketplaceOfferDetails { + saasOfferId?: string; + publisherId?: string; +} + +@doc("ApiKeyAuthCredentials class for ApiKey based Auth.") +model ApiKeyAuthCredentials extends AuthCredentials { + @doc("Properties of the key vault.") + apiKey: KeyVaultProperties; + + @doc("Enum for different types of AuthCredentials supported.") + kind: "ApiKeyAuthCredentials"; +} + +@doc("Properties of the key vault.") +model KeyVaultProperties { + @doc("Uri of the key vault.") + @minLength(1) + keyVaultUri: string; + + @doc("Name of Key Vault key.") + @minLength(1) + keyName: string; + + @doc("Version of Key Vault key.") + @minLength(1) + keyVersion: string; +} + +@doc("OAuthClientCredentials for clientId clientSecret auth.") +model OAuthClientCredentials extends AuthCredentials { + @doc("ClientId associated with the provider.") + @minLength(1) + clientId: string; + + @doc("Properties of the key vault.") + clientSecret: KeyVaultProperties; + + @doc("Enum for different types of AuthCredentials supported.") + kind: "OAuthClientCredentials"; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp new file mode 100644 index 0000000000..eb025f3d9e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp @@ -0,0 +1,48 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace Azure.ResourceManager.AgFoodPlatform; + +interface CheckNameAvailabilityOperations { + @doc("Checks the name availability of the resource with requested resource name.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/checkNameAvailability") + @post + CheckNameAvailability is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription. The value must be an UUID.") + @path + subscriptionId: string; + + @doc("NameAvailabilityRequest object.") + @body + nameAvailabilityRequest: CheckNameAvailabilityRequest; + }, + CheckNameAvailabilityResponse + >; +} + +interface OperationResultsOperations { + @doc("Get operationResults for a Data Manager For Agriculture resource.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/locations/{locations}/operationResults/{operationResultsId}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription. The value must be an UUID.") + @path + subscriptionId: string; + + @doc("Location.") + @path + locations: string; + + @doc("operationResultsId for a specific location.") + @path + operationResultsId: string; + }, + ArmAsyncOperation + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..9bc9c6f491 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/agfood.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/apimanagement.md b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/apimanagement.md new file mode 100644 index 0000000000..2efe4a205d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/apimanagement.md @@ -0,0 +1,542 @@ +```yaml +library-name: ApiManagement +namespace: Azure.ResourceManager.ApiManagement +isAzureSpec: true +isArm: true +require: https://github.com/Azure/azure-rest-api-specs/blob/2f28b5026a4b44adefd0237087acb0c48cfe31a6/specification/apimanagement/resource-manager/readme.md +skip-csproj: true +modelerfour: + flatten-payloads: false +skip-serialization-format-xml: true + +list-exception: + - /subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName} + +request-path-is-non-resource: + # The Id of content type does not meet the criteria of ResourceIdentifier (E.g. /contentTypes/page) + - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId} + # The Id of content item does not meet the criteria of ResourceIdentifier (E.g. /contentTypes/page/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8) + - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId} + +request-path-to-resource-name: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}: ApiDiagnostic + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}: ApiIssue + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}: ApiPolicy + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}: ApiTag + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}: ApiOperationPolicy + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}: ApiOperationTag + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}: ApiManagementDiagnostic + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}: ApiManagementIssue + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}: ApiManagementPolicy + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}: ApiManagementSubscription + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}: ApiManagementTag + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}: ApiManagementUser + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}: ApiManagementProductPolicy + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}: ApiManagementProductTag + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions/{sid}: ApiManagementUserSubscription + +format-by-name-rules: + "tenantId": "uuid" + "ETag": "etag" + "location": "azure-location" + "locations": "azure-location" + "locationName": "azure-location" + "*Uri": "Uri" + "*Uris": "Uri" + "ApiVersionSetId": "arm-id" + "SourceApiId": "arm-id" + "PrivateIPAddresses": "ip-address" + "PublicIPAddresses": "ip-address" + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Url: Uri + Etag: ETag|etag + +override-operation-name: + NetworkStatus_ListByLocation: GetNetworkStatusByLocation + TenantAccessGit_RegeneratePrimaryKey: RegeneratePrimaryKeyForGit + TenantAccessGit_RegenerateSecondaryKey: RegenerateSecondaryKeyForGit + ApiProduct_ListByApis: GetApiProducts + ApiManagementServiceSkus_ListAvailableServiceSkus: GetAvailableApiManagementServiceSkus + NetworkStatus_ListByService: GetNetworkStatuses + OutboundNetworkDependenciesEndpoints_ListByService: GetOutboundNetworkDependenciesEndpoints + PolicyDescription_ListByService: GetPolicyDescriptions + PortalSettings_ListByService: GetPortalSettings + QuotaByCounterKeys_ListByService: GetQuotaByCounterKeys + Region_ListByService: GetRegions + TenantConfiguration_GetSyncState: GetTenantConfigurationSyncState + TagResource_ListByService: GetTagResources + GatewayApi_GetEntityTag: GetGatewayApiEntityTag + GroupUser_CheckEntityExists: CheckGroupUserEntityExists + NotificationRecipientEmail_CheckEntityExists: CheckNotificationRecipientEmailEntityExists + NotificationRecipientUser_CheckEntityExists: CheckNotificationRecipientUserEntityExists + ProductApi_CheckEntityExists: CheckProductApiEntityExists + ProductGroup_CheckEntityExists: CheckProductGroupEntityExists + ApiManagementService_CheckNameAvailability: CheckApiManagementServiceNameAvailability + ApiManagementService_GetDomainOwnershipIdentifier: GetApiManagementServiceDomainOwnershipIdentifier + ContentType_ListByService: GetContentTypes + ContentItem_ListByService: GetContentItems + ContentItem_GetEntityTag: GetContentItemEntityTag + ProductSubscriptions_List: GetAllProductSubscriptionData # temporary - to be removed once the polymorphic resource change is merged. + +prepend-rp-prefix: + - ResourceSkuCapacity + - ResourceSkuCapacityScaleType + +rename-mapping: + GatewayHostnameConfigurationContract.properties.negotiateClientCertificate: IsClientCertificateRequired + SubscriptionsDelegationSettingsProperties.enabled: IsSubscriptionDelegationEnabled + RegistrationDelegationSettingsProperties.enabled: IsUserRegistrationDelegationEnabled + DiagnosticContract.properties.logClientIp: IsLogClientIPEnabled + BackendTlsProperties.validateCertificateChain: ShouldValidateCertificateChain + BackendTlsProperties.validateCertificateName: ShouldValidateCertificateName + HostnameConfiguration.defaultSslBinding: IsDefaultSslBindingEnabled + HostnameConfiguration.negotiateClientCertificate: IsClientCertificateNegotiationEnabled + PortalSettingsContract.properties.enabled: IsRedirectEnabled + TermsOfServiceProperties.enabled: IsDisplayEnabled + TermsOfServiceProperties.consentRequired: IsConsentRequired + AccessInformationCreateParameters.properties.enabled: IsDirectAccessEnabled + TenantConfigurationSyncStateContract.properties.isExport: IsExported + AccessInformationSecretsContract.enabled: IsDirectAccessEnabled + AccessInformationUpdateParameters.properties.enabled: IsDirectAccessEnabled + PortalSigninSettings.properties.enabled: IsRedirectEnabled + PortalSignupSettings.properties.enabled: IsSignUpDeveloperPortalEnabled + AccessInformationContract.properties.enabled: IsDirectAccessEnabled + BackendContract.properties.resourceId: ResourceUri|uri + BackendUpdateParameters.properties.resourceId: ResourceUri|uri + RequestReportRecordContract.subscriptionId: SubscriptionResourceId|arm-id + RequestReportRecordContract.method: -|request-method + RequestReportRecordContract.ipAddress: -|ip-address + ReportRecordContract.subscriptionId: SubscriptionResourceId|arm-id + SubscriptionsDelegationSettingsProperties: SubscriptionDelegationSettingProperties + RegistrationDelegationSettingsProperties: RegistrationDelegationSettingProperties + OpenidConnectProviderContract: ApiManagementOpenIdConnectProvider + OpenidConnectProviderUpdateContract: OpenIdConnectProviderUpdateContract + VirtualNetworkConfiguration.vnetid: VnetId + AccessInformationContract: TenantAccessInfo + AccessInformationContract.properties.id: AccessInfoType + AccessIdName: AccessName + AccessIdName.access: TenantAccess + AccessIdName.gitAccess: TenantGitAccess + ApiContract: Api + ApiCollection: ApiListResult + NetworkStatusContractByLocation: NetworkStatusContractWithLocation + ApiManagementServiceResource: ApiManagementService + ApiReleaseContract: ApiRelease + OperationContract: ApiOperation + SchemaContract: ApiSchema + TagDescriptionContract: ApiTagDescription + ApiManagementServiceBackupRestoreParameters: ApiManagementServiceBackupRestoreContent + OperationResultContract: GitOperationResultContractData + ConfigurationIdName: ConfigurationName + SaveConfigurationParameter: ConfigurationSaveContent + SaveConfigurationParameter.properties.force: ForceUpdate + DeployConfigurationParameters: ConfigurationDeployContent + DeployConfigurationParameters.properties.force: ForceDelete + ApiVersionSetContract: ApiVersionSet + AuthorizationServerContract: ApiManagementAuthorizationServer + BackendContract: ApiManagementBackend + CacheContract: ApiManagementCache + CertificateContract: ApiManagementCertificate + CertificateContract.properties.expirationDate: ExpireOn + CertificateContract.properties.keyVault: KeyVaultDetails + CertificateCreateOrUpdateParameters.properties.keyVault: KeyVaultDetails + ContentTypeContract: ApiManagementContentType + ContentTypeContract.properties.id: ContentTypeIdentifier + ContentTypeContract.properties.name: ContentTypeName + EmailTemplateContract: ApiManagementEmailTemplate + GatewayContract: ApiManagementGateway + GlobalSchemaContract: ApiManagementGlobalSchema + GroupContract: ApiManagementGroup + GroupContract.properties.type: GroupType + GroupContract.properties.builtIn: IsBuiltIn + IdentityProviderContract: ApiManagementIdentityProvider + IdentityProviderContract.properties.type: IdentityProviderType + LoggerContract: ApiManagementLogger + NamedValueContract: ApiManagementNamedValue + NamedValueContract.properties.keyVault: KeyVaultDetails + NotificationContract: ApiManagementNotification + PolicyDescriptionContract: PolicyDescriptionContractData + PortalDelegationSettings: ApiManagementPortalDelegationSettings + PortalRevisionContract: ApiManagementPortalRevision + PortalSettingsContract: PortalSettingsContractData + PortalSigninSettings: ApiManagementPortalSignInSettings + PortalSignupSettings: ApiManagementPortalSignUpSettings + ProductContract: ApiManagementProduct + TenantSettingsContract: ApiManagementTenantSettings + ConnectivityCheckResponse: ConnectivityCheckResult + QuotaCounterValueUpdateContract: QuotaCounterValueUpdateContent + ContentItemContract: ApiManagementContentItem + DeletedServiceContract: ApiManagementDeletedService + DeletedServiceContract.properties.deletionDate: DeletedOn + EmailTemplateUpdateParameters: ApiManagementEmailTemplateCreateOrUpdateContent + GatewayCertificateAuthorityContract: ApiManagementGatewayCertificateAuthority + GatewayHostnameConfigurationContract: ApiManagementGatewayHostnameConfiguration + IssueAttachmentContract: ApiIssueAttachment + IssueCommentContract: ApiIssueComment + ProductState: ApiManagementProductState + UserState: ApiManagementUserState + TagCreateUpdateParameters: ApiManagementTagCreateOrUpdateContent + SubscriptionContract.properties.expirationDate: ExpireOn + SubscriptionContract.properties.notificationDate: NotifiesOn + UserContract.properties.registrationDate: RegistriesOn + AccessInformationSecretsContract: TenantAccessInfoSecretsDetails + AccessInformationSecretsContract.id: AccessInfoType + ApiManagementServiceCheckNameAvailabilityParameters: ApiManagementServiceNameAvailabilityContent + ApiManagementServiceNameAvailabilityResult.nameAvailable: IsNameAvailable + NameAvailabilityReason: ApiManagementServiceNameUnavailableReason + ApiType.websocket: WebSocket + ApiType.graphql: GraphQL + ProvisioningState: AssociationEntityProvisioningState + AuthenticationSettingsContract.openid: OpenId + CertificateInformation.expiry: ExpireOn + Confirmation: ConfirmationEmailType + Confirmation.signup: SignUp + ConnectivityCheckProtocol.TCP: Tcp + ConnectivityStatusContract.lastUpdated: LastUpdatedOn + ConnectivityStatusContract.lastStatusChange: lastStatusChangedOn + ContentFormat.openapi: OpenApi + ContentFormat.openapi+json: OpenApiJson + ContentFormat.openapi-link: OpenApiLink + ContentFormat.openapi+json-link: OpenApiJsonLink + ContentFormat.graphql-link: GraphQLLink + ConnectivityCheckRequestProtocolConfigurationHttpConfiguration: ConnectivityCheckRequestHttpConfiguration + Method: HttpMethodConfiguration + Method.GET: Get + HttpHeader: HttpHeaderConfiguration + NotificationName.BCC: Bcc + OpenIdAuthenticationSettingsContract.openidProviderId: OpenIdProviderId + OperationResultContract.properties.id: OperationResultIdentifier + OperationResultContract.properties.started: StartedOn + OperationResultContract.properties.updated: UpdatedOn + PolicyContentFormat.rawxml: RawXml + PolicyContentFormat.rawxml-link: RawXmlLink + PolicyIdName: PolicyName + ProductEntityBaseParameters: ProductEntityBaseProperties + SubscriptionUpdateParameters.properties.expirationDate: ExpireOn + SettingsTypeName: SettingsType + TagResourceContract: TagResourceContractDetails + TagResourceContractProperties: AssociatedTagProperties + ApiTagResourceContractProperties: AssociatedApiProperties + OperationTagResourceContractProperties: AssociatedOperationProperties + ProductTagResourceContractProperties: AssociatedProductProperties + UserTokenParameters.properties.expiry: ExpireOn + AuthorizationMethod.GET: Get + AuthorizationMethod.PUT: Put + GroupContractProperties.builtIn: IsBuiltIn + GroupType: ApiManagementGroupType + AccessType: StorageAccountAccessType + GatewayKeyRegenerationRequestContract: GatewayKeyRegenerateContent + KeyType: TokenGenerationUsedKeyType + Verbosity: TraceVerbosityLevel + State: IssueState + Severity: IssueSeverity + Origin: IssueOrigin + Protocol: ApiOperationInvokableProtocol + PolicyExportFormat.rawxml: RawXml + ResourceSkuResult: AvailableApiManagementServiceSkuResult + SkuType: ApiManagementServiceSkuType + PrivateLinkResource: ApiManagementPrivateLinkResource + HostnameConfiguration.keyVaultId: keyVaultSecretUri + ParameterContract.required: IsRequired + SchemaType: ApiSchemaType + ApiRevisionContract.privateUrl: privateUrlString + +directive: + - remove-operation: "ApiManagementOperations_List" + - from: definitions.json + where: $.definitions + transform: > + $.AuthorizationServerContractBaseProperties.properties.bearerTokenSendingMethods.items['x-ms-enum']['name'] = 'BearerTokenSendingMethod'; + $.AuthorizationServerContractBaseProperties.properties.clientAuthenticationMethod['x-ms-client-name'] = 'ClientAuthenticationMethods'; + $.BearerTokenSendingMethodsContract['x-ms-enum']['name'] = 'BearerTokenSendingMethod'; + $.ApiEntityBaseContract.properties.subscriptionRequired['x-ms-client-name'] = 'IsSubscriptionRequired'; + $.CacheContractProperties.properties.resourceId['x-ms-client-name'] = 'resourceUri'; + $.CacheUpdateProperties.properties.resourceId['x-ms-client-name'] = 'resourceUri'; + $.IdentityProviderBaseParameters.properties.type['x-ms-client-name'] = 'IdentityProviderType'; + $.IdentityProviderBaseParameters.properties.signinTenant['x-ms-client-name'] = 'SignInTenant'; + $.IdentityProviderBaseParameters.properties.signupPolicyName['x-ms-client-name'] = 'SignUpPolicyName'; + $.IdentityProviderBaseParameters.properties.signinPolicyName['x-ms-client-name'] = 'SignInPolicyName'; + $.IssueContractBaseProperties.properties.apiId['x-ms-format'] = 'arm-id'; + $.IssueContractProperties.properties.userId['x-ms-format'] = 'arm-id'; + $.LoggerContractProperties.properties.resourceId['x-ms-format'] = 'arm-id'; + $.NamedValueEntityBaseParameters.properties.secret['x-ms-client-name'] = 'IsSecret'; + $.ProductEntityBaseParameters.properties.subscriptionRequired['x-ms-client-name'] = 'IsSubscriptionRequired'; + $.ProductEntityBaseParameters.properties.approvalRequired['x-ms-client-name'] = 'IsApprovalRequired'; + $.ApiVersionSetContractDetails.properties.versioningScheme['x-ms-enum'] = { + "name": "versioningScheme", + "modelAsString": true + } + $.ConnectivityHop.properties.address['x-ms-format'] = 'ip-address'; + $.ConnectivityHop.properties.resourceId['x-ms-format'] = 'arm-id'; + $.RemotePrivateEndpointConnectionWrapper.properties.id['x-ms-format'] = 'arm-id'; + $.RemotePrivateEndpointConnectionWrapper.properties.type['x-ms-format'] = 'resource-type'; + $.ApiReleaseContractProperties.properties.apiId['x-ms-format'] = 'arm-id'; + $.GatewayKeyRegenerationRequestContract.properties.keyType['x-ms-enum']['name'] = 'GatewayRegenerateKeyType'; + for (var key in $) { + if (key.endsWith('Collection')) { + for (var property in $[key].properties) { + if (property === 'value' && $[key].properties[property].type === 'array') { + $[key]['x-ms-client-name'] = key.replace('Collection', 'ListResult'); + } + } + } + } + $.IssueCommentContractProperties.properties.userId['x-ms-format'] = 'arm-id'; + $.AuthorizationServerContractBaseProperties.properties.supportState['x-ms-client-name'] = 'DoesSupportState'; + $.DeletedServiceContractProperties.properties.serviceId['x-ms-format'] = 'arm-id'; + $.PortalSettingsContractProperties.properties.subscriptions['x-ms-client-name'] = 'IsSubscriptions'; + $.PortalSettingsContractProperties.properties.userRegistration['x-ms-client-name'] = 'IsUserRegistration'; + $.PrivateEndpointConnectionRequest.properties.id['x-ms-format'] = 'arm-id'; + - from: apimskus.json + where: $.definitions + transform: > + $.ApiManagementSku.properties.locations.items['x-ms-format'] = 'azure-location'; + - from: apimdeployment.json + where: $.definitions + transform: > + delete $.Operation; + delete $.OperationListResult; + $.VirtualNetworkConfiguration.properties.vnetid['format'] = 'uuid'; + $.VirtualNetworkConfiguration.properties.subnetResourceId['x-ms-format'] = 'arm-id'; + $.ResourceSkuResult.properties.resourceType['x-ms-format'] = 'resource-type'; + $.ApiManagementServiceBaseProperties.properties.publicIpAddressId['x-ms-format'] = 'arm-id'; + $.AdditionalLocation.properties.publicIpAddressId['x-ms-format'] = 'arm-id'; + - from: apimanagement.json + where: $.parameters + transform: > + $.OpenIdConnectIdParameter['x-ms-client-name'] = 'OpenId'; + $.IfMatchOptionalParameter['x-ms-format'] = 'etag'; + $.IfMatchRequiredParameter['x-ms-format'] = 'etag'; + - from: apimgroups.json + where: $.paths + transform: > + $['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users'].get.responses['200'].schema = { + "x-ms-client-name": "ApiManagementGroupUserListResult", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "x-ms-client-name": "ApiManagementGroupUserData", + "type": "object", + "allOf": [ + { + "$ref": "./definitions.json#/definitions/UserContract" + } + ] + }, + "description": "Page values." + }, + "count": { + "type": "integer", + "format": "int64", + "description": "Total record count number across all pages." + }, + "nextLink": { + "type": "string", + "description": "Next page link if any." + } + }, + "description": "Paged Group Users list representation." + } + $['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}'].put.responses['200'].schema = { + "x-ms-client-name": "ApiManagementGroupUserData", + "type": "object", + "allOf": [ + { + "$ref": "./definitions.json#/definitions/UserContract" + } + ] + } + $['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}'].put.responses['201'].schema = { + "x-ms-client-name": "ApiManagementGroupUserData", + "type": "object", + "allOf": [ + { + "$ref": "./definitions.json#/definitions/UserContract" + } + ] + } + reason: Modify the original swagger since the id in the real response is slightly different from the ApiManagementUserResource. + - from: apimgateways.json + where: $.paths + transform: > + $['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis'].get.responses['200'].schema = { + "x-ms-client-name": "ApiManagementGatewayApiListResult", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "x-ms-client-name": "GatewayApiData", + "type": "object", + "allOf": [ + { + "$ref": "./definitions.json#/definitions/ApiContract" + } + ] + }, + "description": "Page values.", + "readOnly": true + }, + "count": { + "type": "integer", + "format": "int64", + "description": "Total record count number across all pages." + }, + "nextLink": { + "type": "string", + "description": "Next page link if any.", + "readOnly": true + } + }, + "description": "Paged API list representation." + } + $['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}'].put.responses['200'].schema = { + "x-ms-client-name": "GatewayApiData", + "type": "object", + "allOf": [ + { + "$ref": "./definitions.json#/definitions/ApiContract" + } + ] + } + $['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}'].put.responses['201'].schema = { + "x-ms-client-name": "GatewayApiData", + "type": "object", + "allOf": [ + { + "$ref": "./definitions.json#/definitions/ApiContract" + } + ] + } + reason: Modify the original swagger since the id in the real response is slightly different from the ApiResource. + - from: apimproducts.json + where: $.paths + transform: > + $['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis'].get.responses['200'].schema = { + "x-ms-client-name": "ApiManagementProductApiListResult", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "x-ms-client-name": "ProductApiData", + "type": "object", + "allOf": [ + { + "$ref": "./definitions.json#/definitions/ApiContract" + } + ] + }, + "description": "Page values.", + "readOnly": true + }, + "count": { + "type": "integer", + "format": "int64", + "description": "Total record count number across all pages." + }, + "nextLink": { + "type": "string", + "description": "Next page link if any.", + "readOnly": true + } + }, + "description": "Paged API list representation." + } + $['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}'].put.responses['200'].schema = { + "x-ms-client-name": "ProductApiData", + "type": "object", + "allOf": [ + { + "$ref": "./definitions.json#/definitions/ApiContract" + } + ] + } + $['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}'].put.responses['201'].schema = { + "x-ms-client-name": "ProductApiData", + "type": "object", + "allOf": [ + { + "$ref": "./definitions.json#/definitions/ApiContract" + } + ] + } + reason: Modify the original swagger since the id in the real response is slightly different from the ApiResource. + - from: apimproducts.json + where: $.paths + transform: > + $['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups'].get.responses['200'].schema = { + "x-ms-client-name": "ApiManagementProductGroupListResult", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "x-ms-client-name": "ProductGroupData", + "type": "object", + "allOf": [ + { + "$ref": "./definitions.json#/definitions/GroupContract" + } + ] + }, + "description": "Page values.", + "readOnly": true + }, + "count": { + "type": "integer", + "format": "int64", + "description": "Total record count number across all pages." + }, + "nextLink": { + "type": "string", + "description": "Next page link if any." + } + }, + "description": "Paged Group list representation." + } + $['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}'].put.responses['200'].schema = { + "x-ms-client-name": "ProductGroupData", + "type": "object", + "allOf": [ + { + "$ref": "./definitions.json#/definitions/GroupContract" + } + ] + } + $['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}'].put.responses['201'].schema = { + "x-ms-client-name": "ProductGroupData", + "type": "object", + "allOf": [ + { + "$ref": "./definitions.json#/definitions/GroupContract" + } + ] + } + reason: Modify the original swagger since the id in the real response is slightly different from the ApiManagementGroupResource. + - from: swagger-document + where: $..[?(@.name=='$orderby')] + transform: $['x-ms-client-name'] = 'orderBy' +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/resources.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/resources.json new file mode 100644 index 0000000000..0985e755b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/resources.json @@ -0,0 +1,5068 @@ +{ + "Resources": { + "Api": { + "Name": "Api", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + "Method": "GET", + "OperationID": "Api_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the API specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + "Method": "PUT", + "OperationID": "Api_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates new or updates existing specified API of the API Management service instance." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + "Method": "PATCH", + "OperationID": "Api_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the specified API of the API Management service instance." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + "Method": "DELETE", + "OperationID": "Api_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified API of the API Management service instance." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis", + "Method": "GET", + "OperationID": "Api_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all APIs of the API Management service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetApiRevisionsByService", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions", + "Method": "GET", + "OperationID": "ApiRevision_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all revisions of an API." + }, + { + "Name": "GetApiProducts", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products", + "Method": "GET", + "OperationID": "ApiProduct_ListByApis", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByApis", + "NextPageMethod": "ListByApisNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all Products, which the API is part of." + }, + { + "Name": "GetOperationsByTags", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags", + "Method": "GET", + "OperationID": "Operation_ListByTags", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByTags", + "NextPageMethod": "ListByTagsNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of operations associated with tags." + }, + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}", + "Method": "HEAD", + "OperationID": "Api_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the API specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "ApiContract", + "ResourceType": "Microsoft.ApiManagement/service/apis", + "ResourceKey": "apiId", + "ResourceKeySegment": "apis", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiRelease": { + "Name": "ApiRelease", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", + "Method": "GET", + "OperationID": "ApiRelease_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Returns the details of an API release." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", + "Method": "PUT", + "OperationID": "ApiRelease_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new Release for the API." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", + "Method": "PATCH", + "OperationID": "ApiRelease_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the details of the release of the API specified by its identifier." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", + "Method": "DELETE", + "OperationID": "ApiRelease_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified release in the API." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases", + "Method": "GET", + "OperationID": "ApiRelease_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/releases/{releaseId}", + "Method": "HEAD", + "OperationID": "ApiRelease_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Returns the etag of an API release." + } + ], + "Parents": ["Api"], + "SwaggerModelName": "ApiReleaseContract", + "ResourceType": "Microsoft.ApiManagement/service/apis/releases", + "ResourceKey": "releaseId", + "ResourceKeySegment": "releases", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiOperation": { + "Name": "ApiOperation", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", + "Method": "GET", + "OperationID": "ApiOperation_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the API Operation specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", + "Method": "PUT", + "OperationID": "ApiOperation_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new operation in the API or updates an existing one." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", + "Method": "PATCH", + "OperationID": "ApiOperation_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the details of the operation in the API specified by its identifier." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", + "Method": "DELETE", + "OperationID": "ApiOperation_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified operation in the API." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations", + "Method": "GET", + "OperationID": "ApiOperation_ListByApi", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByApi", + "NextPageMethod": "ListByApiNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of the operations for the specified API." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}", + "Method": "HEAD", + "OperationID": "ApiOperation_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the API operation specified by its identifier." + } + ], + "Parents": ["Api"], + "SwaggerModelName": "OperationContract", + "ResourceType": "Microsoft.ApiManagement/service/apis/operations", + "ResourceKey": "operationId", + "ResourceKeySegment": "operations", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiOperationPolicy": { + "Name": "ApiOperationPolicy", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", + "Method": "GET", + "OperationID": "ApiOperationPolicy_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the policy configuration at the API Operation level." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", + "Method": "PUT", + "OperationID": "ApiOperationPolicy_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates policy configuration for the API Operation level." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", + "Method": "PUT", + "OperationID": "ApiOperationPolicy_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates policy configuration for the API Operation level." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", + "Method": "DELETE", + "OperationID": "ApiOperationPolicy_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the policy configuration at the Api Operation." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies", + "Method": "GET", + "OperationID": "ApiOperationPolicy_ListByOperation", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByOperation", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Get the list of policy configuration at the API Operation level." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/policies/{policyId}", + "Method": "HEAD", + "OperationID": "ApiOperationPolicy_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the API operation policy specified by its identifier." + } + ], + "Parents": ["ApiOperation"], + "SwaggerModelName": "PolicyContract", + "ResourceType": "Microsoft.ApiManagement/service/apis/operations/policies", + "ResourceKey": "policyId", + "ResourceKeySegment": "policies", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiPolicy": { + "Name": "ApiPolicy", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", + "Method": "GET", + "OperationID": "ApiPolicy_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the policy configuration at the API level." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", + "Method": "PUT", + "OperationID": "ApiPolicy_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates policy configuration for the API." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", + "Method": "PUT", + "OperationID": "ApiPolicy_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates policy configuration for the API." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", + "Method": "DELETE", + "OperationID": "ApiPolicy_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the policy configuration at the Api." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies", + "Method": "GET", + "OperationID": "ApiPolicy_ListByApi", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByApi", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Get the policy configuration at the API level." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}", + "Method": "HEAD", + "OperationID": "ApiPolicy_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the API policy specified by its identifier." + } + ], + "Parents": ["Api"], + "SwaggerModelName": "PolicyContract", + "ResourceType": "Microsoft.ApiManagement/service/apis/policies", + "ResourceKey": "policyId", + "ResourceKeySegment": "policies", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementPolicy": { + "Name": "ApiManagementPolicy", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", + "Method": "GET", + "OperationID": "Policy_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the Global policy definition of the Api Management service." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", + "Method": "PUT", + "OperationID": "Policy_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates the global policy configuration of the Api Management service." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", + "Method": "PUT", + "OperationID": "Policy_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates the global policy configuration of the Api Management service." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", + "Method": "DELETE", + "OperationID": "Policy_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the global policy configuration of the Api Management Service." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies", + "Method": "GET", + "OperationID": "Policy_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Lists all the Global Policy definitions of the Api Management service." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}", + "Method": "HEAD", + "OperationID": "Policy_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the Global policy definition in the Api Management service." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "PolicyContract", + "ResourceType": "Microsoft.ApiManagement/service/policies", + "ResourceKey": "policyId", + "ResourceKeySegment": "policies", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementProductPolicy": { + "Name": "ApiManagementProductPolicy", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", + "Method": "GET", + "OperationID": "ProductPolicy_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the policy configuration at the Product level." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", + "Method": "PUT", + "OperationID": "ProductPolicy_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates policy configuration for the Product." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", + "Method": "PUT", + "OperationID": "ProductPolicy_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates policy configuration for the Product." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", + "Method": "DELETE", + "OperationID": "ProductPolicy_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the policy configuration at the Product." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies", + "Method": "GET", + "OperationID": "ProductPolicy_ListByProduct", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByProduct", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Get the policy configuration at the Product level." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}", + "Method": "HEAD", + "OperationID": "ProductPolicy_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the ETag of the policy configuration at the Product level." + } + ], + "Parents": ["ApiManagementProduct"], + "SwaggerModelName": "PolicyContract", + "ResourceType": "Microsoft.ApiManagement/service/products/policies", + "ResourceKey": "policyId", + "ResourceKeySegment": "policies", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiOperationTag": { + "Name": "ApiOperationTag", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", + "Method": "GET", + "OperationID": "Tag_GetByOperation", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get tag associated with the Operation." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", + "Method": "PUT", + "OperationID": "Tag_AssignToOperation", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Assign tag to the Operation." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", + "Method": "PUT", + "OperationID": "Tag_AssignToOperation", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Assign tag to the Operation." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", + "Method": "DELETE", + "OperationID": "Tag_DetachFromOperation", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Detach the tag from the Operation." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags", + "Method": "GET", + "OperationID": "Tag_ListByOperation", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByOperation", + "NextPageMethod": "ListByOperationNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all Tags associated with the Operation." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityStateByOperation", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}/tags/{tagId}", + "Method": "HEAD", + "OperationID": "Tag_GetEntityStateByOperation", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state version of the tag specified by its identifier." + } + ], + "Parents": ["ApiOperation"], + "SwaggerModelName": "TagContract", + "ResourceType": "Microsoft.ApiManagement/service/apis/operations/tags", + "ResourceKey": "tagId", + "ResourceKeySegment": "tags", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiTag": { + "Name": "ApiTag", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", + "Method": "GET", + "OperationID": "Tag_GetByApi", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get tag associated with the API." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", + "Method": "PUT", + "OperationID": "Tag_AssignToApi", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Assign tag to the Api." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", + "Method": "PUT", + "OperationID": "Tag_AssignToApi", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Assign tag to the Api." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", + "Method": "DELETE", + "OperationID": "Tag_DetachFromApi", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Detach the tag from the Api." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags", + "Method": "GET", + "OperationID": "Tag_ListByApi", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByApi", + "NextPageMethod": "ListByApiNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all Tags associated with the API." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityStateByApi", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}", + "Method": "HEAD", + "OperationID": "Tag_GetEntityStateByApi", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state version of the tag specified by its identifier." + } + ], + "Parents": ["Api"], + "SwaggerModelName": "TagContract", + "ResourceType": "Microsoft.ApiManagement/service/apis/tags", + "ResourceKey": "tagId", + "ResourceKeySegment": "tags", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementProductTag": { + "Name": "ApiManagementProductTag", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", + "Method": "GET", + "OperationID": "Tag_GetByProduct", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get tag associated with the Product." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", + "Method": "PUT", + "OperationID": "Tag_AssignToProduct", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Assign tag to the Product." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", + "Method": "PUT", + "OperationID": "Tag_AssignToProduct", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Assign tag to the Product." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", + "Method": "DELETE", + "OperationID": "Tag_DetachFromProduct", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Detach the tag from the Product." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags", + "Method": "GET", + "OperationID": "Tag_ListByProduct", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByProduct", + "NextPageMethod": "ListByProductNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all Tags associated with the Product." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityStateByProduct", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}", + "Method": "HEAD", + "OperationID": "Tag_GetEntityStateByProduct", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state version of the tag specified by its identifier." + } + ], + "Parents": ["ApiManagementProduct"], + "SwaggerModelName": "TagContract", + "ResourceType": "Microsoft.ApiManagement/service/products/tags", + "ResourceKey": "tagId", + "ResourceKeySegment": "tags", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementTag": { + "Name": "ApiManagementTag", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", + "Method": "GET", + "OperationID": "Tag_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the tag specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", + "Method": "PUT", + "OperationID": "Tag_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a tag." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", + "Method": "PATCH", + "OperationID": "Tag_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the details of the tag specified by its identifier." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", + "Method": "DELETE", + "OperationID": "Tag_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes specific tag of the API Management service instance." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags", + "Method": "GET", + "OperationID": "Tag_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of tags defined within a service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityState", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}", + "Method": "HEAD", + "OperationID": "Tag_GetEntityState", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state version of the tag specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "TagContract", + "ResourceType": "Microsoft.ApiManagement/service/tags", + "ResourceKey": "tagId", + "ResourceKeySegment": "tags", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiSchema": { + "Name": "ApiSchema", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", + "Method": "GET", + "OperationID": "ApiSchema_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the schema configuration at the API level." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", + "Method": "PUT", + "OperationID": "ApiSchema_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates schema configuration for the API." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", + "Method": "PUT", + "OperationID": "ApiSchema_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates schema configuration for the API." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", + "Method": "DELETE", + "OperationID": "ApiSchema_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the schema configuration at the Api." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas", + "Method": "GET", + "OperationID": "ApiSchema_ListByApi", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByApi", + "NextPageMethod": "ListByApiNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Get the schema configuration at the API level." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/schemas/{schemaId}", + "Method": "HEAD", + "OperationID": "ApiSchema_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the schema specified by its identifier." + } + ], + "Parents": ["Api"], + "SwaggerModelName": "SchemaContract", + "ResourceType": "Microsoft.ApiManagement/service/apis/schemas", + "ResourceKey": "schemaId", + "ResourceKeySegment": "schemas", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiDiagnostic": { + "Name": "ApiDiagnostic", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", + "Method": "GET", + "OperationID": "ApiDiagnostic_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the Diagnostic for an API specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", + "Method": "PUT", + "OperationID": "ApiDiagnostic_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new Diagnostic for an API or updates an existing one." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", + "Method": "PATCH", + "OperationID": "ApiDiagnostic_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the details of the Diagnostic for an API specified by its identifier." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", + "Method": "DELETE", + "OperationID": "ApiDiagnostic_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified Diagnostic from an API." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics", + "Method": "GET", + "OperationID": "ApiDiagnostic_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all diagnostics of an API." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/diagnostics/{diagnosticId}", + "Method": "HEAD", + "OperationID": "ApiDiagnostic_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier." + } + ], + "Parents": ["Api"], + "SwaggerModelName": "DiagnosticContract", + "ResourceType": "Microsoft.ApiManagement/service/apis/diagnostics", + "ResourceKey": "diagnosticId", + "ResourceKeySegment": "diagnostics", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementDiagnostic": { + "Name": "ApiManagementDiagnostic", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", + "Method": "GET", + "OperationID": "Diagnostic_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the Diagnostic specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", + "Method": "PUT", + "OperationID": "Diagnostic_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new Diagnostic or updates an existing one." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", + "Method": "PATCH", + "OperationID": "Diagnostic_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the details of the Diagnostic specified by its identifier." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", + "Method": "DELETE", + "OperationID": "Diagnostic_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified Diagnostic." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics", + "Method": "GET", + "OperationID": "Diagnostic_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all diagnostics of the API Management service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}", + "Method": "HEAD", + "OperationID": "Diagnostic_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the Diagnostic specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "DiagnosticContract", + "ResourceType": "Microsoft.ApiManagement/service/diagnostics", + "ResourceKey": "diagnosticId", + "ResourceKeySegment": "diagnostics", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiIssue": { + "Name": "ApiIssue", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", + "Method": "GET", + "OperationID": "ApiIssue_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the Issue for an API specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", + "Method": "PUT", + "OperationID": "ApiIssue_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new Issue for an API or updates an existing one." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", + "Method": "PATCH", + "OperationID": "ApiIssue_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates an existing issue for an API." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", + "Method": "DELETE", + "OperationID": "ApiIssue_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified Issue from an API." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues", + "Method": "GET", + "OperationID": "ApiIssue_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all issues associated with the specified API." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", + "Method": "HEAD", + "OperationID": "ApiIssue_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the Issue for an API specified by its identifier." + } + ], + "Parents": ["Api"], + "SwaggerModelName": "IssueContract", + "ResourceType": "Microsoft.ApiManagement/service/apis/issues", + "ResourceKey": "issueId", + "ResourceKeySegment": "issues", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementIssue": { + "Name": "ApiManagementIssue", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}", + "Method": "GET", + "OperationID": "Issue_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets API Management issue details" + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues", + "Method": "GET", + "OperationID": "Issue_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of issues in the specified service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "IssueContract", + "ResourceType": "Microsoft.ApiManagement/service/issues", + "ResourceKey": "issueId", + "ResourceKeySegment": "issues", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiIssueComment": { + "Name": "ApiIssueComment", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", + "Method": "GET", + "OperationID": "ApiIssueComment_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the issue Comment for an API specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", + "Method": "PUT", + "OperationID": "ApiIssueComment_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new Comment for the Issue in an API or updates an existing one." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", + "Method": "PUT", + "OperationID": "ApiIssueComment_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new Comment for the Issue in an API or updates an existing one." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", + "Method": "DELETE", + "OperationID": "ApiIssueComment_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified comment from an Issue." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments", + "Method": "GET", + "OperationID": "ApiIssueComment_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all comments for the Issue associated with the specified API." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/comments/{commentId}", + "Method": "HEAD", + "OperationID": "ApiIssueComment_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier." + } + ], + "Parents": ["ApiIssue"], + "SwaggerModelName": "IssueCommentContract", + "ResourceType": "Microsoft.ApiManagement/service/apis/issues/comments", + "ResourceKey": "commentId", + "ResourceKeySegment": "comments", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiIssueAttachment": { + "Name": "ApiIssueAttachment", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", + "Method": "GET", + "OperationID": "ApiIssueAttachment_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the issue Attachment for an API specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", + "Method": "PUT", + "OperationID": "ApiIssueAttachment_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new Attachment for the Issue in an API or updates an existing one." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", + "Method": "PUT", + "OperationID": "ApiIssueAttachment_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new Attachment for the Issue in an API or updates an existing one." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", + "Method": "DELETE", + "OperationID": "ApiIssueAttachment_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified comment from an Issue." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments", + "Method": "GET", + "OperationID": "ApiIssueAttachment_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all attachments for the Issue associated with the specified API." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}", + "Method": "HEAD", + "OperationID": "ApiIssueAttachment_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier." + } + ], + "Parents": ["ApiIssue"], + "SwaggerModelName": "IssueAttachmentContract", + "ResourceType": "Microsoft.ApiManagement/service/apis/issues/attachments", + "ResourceKey": "attachmentId", + "ResourceKeySegment": "attachments", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiTagDescription": { + "Name": "ApiTagDescription", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", + "Method": "GET", + "OperationID": "ApiTagDescription_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Tag description in scope of API" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", + "Method": "PUT", + "OperationID": "ApiTagDescription_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create/Update tag description in scope of the Api." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", + "Method": "PUT", + "OperationID": "ApiTagDescription_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create/Update tag description in scope of the Api." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", + "Method": "DELETE", + "OperationID": "ApiTagDescription_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete tag description for the Api." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions", + "Method": "GET", + "OperationID": "ApiTagDescription_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tagDescriptions/{tagDescriptionId}", + "Method": "HEAD", + "OperationID": "ApiTagDescription_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state version of the tag specified by its identifier." + } + ], + "Parents": ["Api"], + "SwaggerModelName": "TagDescriptionContract", + "ResourceType": "Microsoft.ApiManagement/service/apis/tagDescriptions", + "ResourceKey": "tagDescriptionId", + "ResourceKeySegment": "tagDescriptions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiVersionSet": { + "Name": "ApiVersionSet", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", + "Method": "GET", + "OperationID": "ApiVersionSet_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the Api Version Set specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", + "Method": "PUT", + "OperationID": "ApiVersionSet_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or Updates a Api Version Set." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", + "Method": "PATCH", + "OperationID": "ApiVersionSet_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the details of the Api VersionSet specified by its identifier." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", + "Method": "DELETE", + "OperationID": "ApiVersionSet_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes specific Api Version Set." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets", + "Method": "GET", + "OperationID": "ApiVersionSet_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of API Version Sets in the specified service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apiVersionSets/{versionSetId}", + "Method": "HEAD", + "OperationID": "ApiVersionSet_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the Api Version Set specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "ApiVersionSetContract", + "ResourceType": "Microsoft.ApiManagement/service/apiVersionSets", + "ResourceKey": "versionSetId", + "ResourceKeySegment": "apiVersionSets", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementAuthorizationServer": { + "Name": "ApiManagementAuthorizationServer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", + "Method": "GET", + "OperationID": "AuthorizationServer_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the authorization server specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", + "Method": "PUT", + "OperationID": "AuthorizationServer_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates new authorization server or updates an existing authorization server." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", + "Method": "PATCH", + "OperationID": "AuthorizationServer_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the details of the authorization server specified by its identifier." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", + "Method": "DELETE", + "OperationID": "AuthorizationServer_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes specific authorization server instance." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers", + "Method": "GET", + "OperationID": "AuthorizationServer_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of authorization servers defined within a service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetSecrets", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}/listSecrets", + "Method": "POST", + "OperationID": "AuthorizationServer_ListSecrets", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the client secret details of the authorization server." + }, + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}", + "Method": "HEAD", + "OperationID": "AuthorizationServer_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the authorizationServer specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "AuthorizationServerContract", + "ResourceType": "Microsoft.ApiManagement/service/authorizationServers", + "ResourceKey": "authsid", + "ResourceKeySegment": "authorizationServers", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementBackend": { + "Name": "ApiManagementBackend", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", + "Method": "GET", + "OperationID": "Backend_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the backend specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", + "Method": "PUT", + "OperationID": "Backend_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or Updates a backend." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", + "Method": "PATCH", + "OperationID": "Backend_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates an existing backend." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", + "Method": "DELETE", + "OperationID": "Backend_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified backend." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends", + "Method": "GET", + "OperationID": "Backend_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of backends in the specified service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Reconnect", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}/reconnect", + "Method": "POST", + "OperationID": "Backend_Reconnect", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used." + }, + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}", + "Method": "HEAD", + "OperationID": "Backend_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the backend specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "BackendContract", + "ResourceType": "Microsoft.ApiManagement/service/backends", + "ResourceKey": "backendId", + "ResourceKeySegment": "backends", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementCache": { + "Name": "ApiManagementCache", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", + "Method": "GET", + "OperationID": "Cache_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the Cache specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", + "Method": "PUT", + "OperationID": "Cache_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates an External Cache to be used in Api Management instance." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", + "Method": "PATCH", + "OperationID": "Cache_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the details of the cache specified by its identifier." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", + "Method": "DELETE", + "OperationID": "Cache_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes specific Cache." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches", + "Method": "GET", + "OperationID": "Cache_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of all external Caches in the specified service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/caches/{cacheId}", + "Method": "HEAD", + "OperationID": "Cache_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the Cache specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "CacheContract", + "ResourceType": "Microsoft.ApiManagement/service/caches", + "ResourceKey": "cacheId", + "ResourceKeySegment": "caches", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementCertificate": { + "Name": "ApiManagementCertificate", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", + "Method": "GET", + "OperationID": "Certificate_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the certificate specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", + "Method": "PUT", + "OperationID": "Certificate_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates the certificate being used for authentication with the backend." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", + "Method": "PUT", + "OperationID": "Certificate_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates the certificate being used for authentication with the backend." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", + "Method": "DELETE", + "OperationID": "Certificate_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes specific certificate." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates", + "Method": "GET", + "OperationID": "Certificate_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of all certificates in the specified service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "RefreshSecret", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}/refreshSecret", + "Method": "POST", + "OperationID": "Certificate_RefreshSecret", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "From KeyVault, Refresh the certificate being used for authentication with the backend." + }, + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}", + "Method": "HEAD", + "OperationID": "Certificate_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the certificate specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "CertificateContract", + "ResourceType": "Microsoft.ApiManagement/service/certificates", + "ResourceKey": "certificateId", + "ResourceKeySegment": "certificates", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementDeletedService": { + "Name": "ApiManagementDeletedService", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", + "Method": "GET", + "OperationID": "DeletedServices_GetByName", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get soft-deleted Api Management Service by name." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/deletedservices/{serviceName}", + "Method": "DELETE", + "OperationID": "DeletedServices_Purge", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Purges Api Management Service (deletes it with no option to undelete)." + } + ], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetApiManagementDeletedServices", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/deletedservices", + "Method": "GET", + "OperationID": "DeletedServices_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all soft-deleted services available for undelete for the given subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["SubscriptionResource"], + "SwaggerModelName": "DeletedServiceContract", + "ResourceType": "Microsoft.ApiManagement/locations/deletedservices", + "ResourceKey": "serviceName", + "ResourceKeySegment": "deletedservices", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": true, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementService": { + "Name": "ApiManagementService", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", + "Method": "GET", + "OperationID": "ApiManagementService_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets an API Management service resource description." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", + "Method": "PUT", + "OperationID": "ApiManagementService_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates an API Management service. This is long running operation and could take several minutes to complete." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", + "Method": "PATCH", + "OperationID": "ApiManagementService_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates an existing API Management service." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}", + "Method": "DELETE", + "OperationID": "ApiManagementService_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes an existing API Management service." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service", + "Method": "GET", + "OperationID": "ApiManagementService_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List all API Management services within a resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetApiManagementServices", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/service", + "Method": "GET", + "OperationID": "ApiManagementService_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all API Management services within an Azure subscription." + }, + { + "Name": "CheckApiManagementServiceNameAvailability", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/checkNameAvailability", + "Method": "POST", + "OperationID": "ApiManagementService_CheckNameAvailability", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Checks availability and correctness of a name for an API Management service." + }, + { + "Name": "GetApiManagementServiceDomainOwnershipIdentifier", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/getDomainOwnershipIdentifier", + "Method": "POST", + "OperationID": "ApiManagementService_GetDomainOwnershipIdentifier", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the custom domain ownership identifier for an API Management service." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetApisByTags", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags", + "Method": "GET", + "OperationID": "Api_ListByTags", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByTags", + "NextPageMethod": "ListByTagsNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of apis associated with tags." + }, + { + "Name": "PerformConnectivityCheckAsync", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck", + "Method": "POST", + "OperationID": "PerformConnectivityCheckAsync", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it." + }, + { + "Name": "GetContentTypes", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes", + "Method": "GET", + "OperationID": "ContentType_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the developer portal\u0027s content types. Content types describe content items\u0027 properties, validation rules, and constraints." + }, + { + "Name": "GetContentType", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", + "Method": "GET", + "OperationID": "ContentType_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the developer portal\u0027s content type. Content types describe content items\u0027 properties, validation rules, and constraints." + }, + { + "Name": "CreateOrUpdateContentType", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", + "Method": "PUT", + "OperationID": "ContentType_CreateOrUpdate", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Creates or updates the developer portal\u0027s content type. Content types describe content items\u0027 properties, validation rules, and constraints. Custom content types\u0027 identifiers need to start with the \u0060c-\u0060 prefix. Built-in content types can\u0027t be modified." + }, + { + "Name": "DeleteContentType", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}", + "Method": "DELETE", + "OperationID": "ContentType_Delete", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Removes the specified developer portal\u0027s content type. Content types describe content items\u0027 properties, validation rules, and constraints. Built-in content types (with identifiers starting with the \u0060c-\u0060 prefix) can\u0027t be removed." + }, + { + "Name": "GetContentItems", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems", + "Method": "GET", + "OperationID": "ContentItem_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists developer portal\u0027s content items specified by the provided content type." + }, + { + "Name": "GetContentItemEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", + "Method": "HEAD", + "OperationID": "ContentItem_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Returns the entity state (ETag) version of the developer portal\u0027s content item specified by its identifier." + }, + { + "Name": "GetContentItem", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", + "Method": "GET", + "OperationID": "ContentItem_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Returns the developer portal\u0027s content item specified by its identifier." + }, + { + "Name": "CreateOrUpdateContentItem", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", + "Method": "PUT", + "OperationID": "ContentItem_CreateOrUpdate", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Creates a new developer portal\u0027s content item specified by the provided content type." + }, + { + "Name": "DeleteContentItem", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}", + "Method": "DELETE", + "OperationID": "ContentItem_Delete", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Removes the specified developer portal\u0027s content item." + }, + { + "Name": "GetAvailableApiManagementServiceSkus", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus", + "Method": "GET", + "OperationID": "ApiManagementServiceSkus_ListAvailableServiceSkus", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListAvailableServiceSkus", + "NextPageMethod": "ListAvailableServiceSkusNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets all available SKU for a given API Management service" + }, + { + "Name": "Restore", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/restore", + "Method": "POST", + "OperationID": "ApiManagementService_Restore", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete." + }, + { + "Name": "Backup", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backup", + "Method": "POST", + "OperationID": "ApiManagementService_Backup", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete." + }, + { + "Name": "GetSsoToken", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/getssotoken", + "Method": "POST", + "OperationID": "ApiManagementService_GetSsoToken", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes." + }, + { + "Name": "ApplyNetworkConfigurationUpdates", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/applynetworkconfigurationupdates", + "Method": "POST", + "OperationID": "ApiManagementService_ApplyNetworkConfigurationUpdates", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes." + }, + { + "Name": "GetNetworkStatuses", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus", + "Method": "GET", + "OperationID": "NetworkStatus_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": null, + "ItemName": "", + "NextLinkName": null + }, + "Description": "Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService." + }, + { + "Name": "GetNetworkStatusByLocation", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus", + "Method": "GET", + "OperationID": "NetworkStatus_ListByLocation", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService." + }, + { + "Name": "GetOutboundNetworkDependenciesEndpoints", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints", + "Method": "GET", + "OperationID": "OutboundNetworkDependenciesEndpoints_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Gets the network endpoints of all outbound dependencies of a ApiManagement service." + }, + { + "Name": "GetPolicyDescriptions", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions", + "Method": "GET", + "OperationID": "PolicyDescription_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Lists all policy descriptions." + }, + { + "Name": "GetPortalSettings", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings", + "Method": "GET", + "OperationID": "PortalSettings_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Lists a collection of portalsettings defined within a service instance.." + }, + { + "Name": "GetProductsByTags", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags", + "Method": "GET", + "OperationID": "Product_ListByTags", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByTags", + "NextPageMethod": "ListByTagsNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of products associated with tags." + }, + { + "Name": "GetQuotaByCounterKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", + "Method": "GET", + "OperationID": "QuotaByCounterKeys_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet." + }, + { + "Name": "UpdateQuotaByCounterKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}", + "Method": "PATCH", + "OperationID": "QuotaByCounterKeys_Update", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "Update", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values." + }, + { + "Name": "GetQuotaByPeriodKey", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", + "Method": "GET", + "OperationID": "QuotaByPeriodKeys_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance." + }, + { + "Name": "UpdateQuotaByPeriodKey", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}", + "Method": "PATCH", + "OperationID": "QuotaByPeriodKeys_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates an existing quota counter value in the specified service instance." + }, + { + "Name": "GetRegions", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions", + "Method": "GET", + "OperationID": "Region_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all azure regions in which the service exists." + }, + { + "Name": "GetReportsByApi", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi", + "Method": "GET", + "OperationID": "Reports_ListByApi", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByApi", + "NextPageMethod": "ListByApiNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists report records by API." + }, + { + "Name": "GetReportsByUser", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser", + "Method": "GET", + "OperationID": "Reports_ListByUser", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByUser", + "NextPageMethod": "ListByUserNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists report records by User." + }, + { + "Name": "GetReportsByOperation", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation", + "Method": "GET", + "OperationID": "Reports_ListByOperation", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByOperation", + "NextPageMethod": "ListByOperationNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists report records by API Operations." + }, + { + "Name": "GetReportsByProduct", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct", + "Method": "GET", + "OperationID": "Reports_ListByProduct", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByProduct", + "NextPageMethod": "ListByProductNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists report records by Product." + }, + { + "Name": "GetReportsByGeo", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo", + "Method": "GET", + "OperationID": "Reports_ListByGeo", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByGeo", + "NextPageMethod": "ListByGeoNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists report records by geography." + }, + { + "Name": "GetReportsBySubscription", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription", + "Method": "GET", + "OperationID": "Reports_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists report records by subscription." + }, + { + "Name": "GetReportsByTime", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime", + "Method": "GET", + "OperationID": "Reports_ListByTime", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByTime", + "NextPageMethod": "ListByTimeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists report records by Time." + }, + { + "Name": "GetReportsByRequest", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest", + "Method": "GET", + "OperationID": "Reports_ListByRequest", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByRequest", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Lists report records by Request." + }, + { + "Name": "GetTagResources", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources", + "Method": "GET", + "OperationID": "TagResource_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of resources associated with tags." + }, + { + "Name": "DeployTenantConfiguration", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/deploy", + "Method": "POST", + "OperationID": "TenantConfiguration_Deploy", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete." + }, + { + "Name": "SaveTenantConfiguration", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/save", + "Method": "POST", + "OperationID": "TenantConfiguration_Save", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete." + }, + { + "Name": "ValidateTenantConfiguration", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/validate", + "Method": "POST", + "OperationID": "TenantConfiguration_Validate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete." + }, + { + "Name": "GetTenantConfigurationSyncState", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState", + "Method": "GET", + "OperationID": "TenantConfiguration_GetSyncState", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the status of the most recent synchronization between the configuration database and the Git repository." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "ApiManagementServiceResource", + "ResourceType": "Microsoft.ApiManagement/service", + "ResourceKey": "serviceName", + "ResourceKeySegment": "service", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementEmailTemplate": { + "Name": "ApiManagementEmailTemplate", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", + "Method": "GET", + "OperationID": "EmailTemplate_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the email template specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", + "Method": "PUT", + "OperationID": "EmailTemplate_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates an Email Template." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", + "Method": "PATCH", + "OperationID": "EmailTemplate_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates API Management email template" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", + "Method": "DELETE", + "OperationID": "EmailTemplate_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Reset the Email Template to default template provided by the API Management service instance." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates", + "Method": "GET", + "OperationID": "EmailTemplate_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets all email templates" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}", + "Method": "HEAD", + "OperationID": "EmailTemplate_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the email template specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "EmailTemplateContract", + "ResourceType": "Microsoft.ApiManagement/service/templates", + "ResourceKey": "templateName", + "ResourceKeySegment": "templates", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementGateway": { + "Name": "ApiManagementGateway", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", + "Method": "GET", + "OperationID": "Gateway_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the Gateway specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", + "Method": "PUT", + "OperationID": "Gateway_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a Gateway to be used in Api Management instance." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", + "Method": "PATCH", + "OperationID": "Gateway_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the details of the gateway specified by its identifier." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", + "Method": "DELETE", + "OperationID": "Gateway_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes specific Gateway." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways", + "Method": "GET", + "OperationID": "Gateway_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of gateways registered with service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/listKeys", + "Method": "POST", + "OperationID": "Gateway_ListKeys", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves gateway keys." + }, + { + "Name": "RegenerateKey", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/regenerateKey", + "Method": "POST", + "OperationID": "Gateway_RegenerateKey", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Regenerates specified gateway key invalidating any tokens created with it." + }, + { + "Name": "GenerateToken", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/generateToken", + "Method": "POST", + "OperationID": "Gateway_GenerateToken", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the Shared Access Authorization Token for the gateway." + }, + { + "Name": "GetGatewayApisByService", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis", + "Method": "GET", + "OperationID": "GatewayApi_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of the APIs associated with a gateway." + }, + { + "Name": "GetGatewayApiEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", + "Method": "HEAD", + "OperationID": "GatewayApi_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Checks that API entity specified by identifier is associated with the Gateway entity." + }, + { + "Name": "CreateOrUpdateGatewayApi", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", + "Method": "PUT", + "OperationID": "GatewayApi_CreateOrUpdate", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Adds an API to the specified Gateway." + }, + { + "Name": "DeleteGatewayApi", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis/{apiId}", + "Method": "DELETE", + "OperationID": "GatewayApi_Delete", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Deletes the specified API from the specified Gateway." + }, + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}", + "Method": "HEAD", + "OperationID": "Gateway_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the Gateway specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "GatewayContract", + "ResourceType": "Microsoft.ApiManagement/service/gateways", + "ResourceKey": "gatewayId", + "ResourceKeySegment": "gateways", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementGatewayHostnameConfiguration": { + "Name": "ApiManagementGatewayHostnameConfiguration", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", + "Method": "GET", + "OperationID": "GatewayHostnameConfiguration_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get details of a hostname configuration" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", + "Method": "PUT", + "OperationID": "GatewayHostnameConfiguration_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates of updates hostname configuration for a Gateway." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", + "Method": "PUT", + "OperationID": "GatewayHostnameConfiguration_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates of updates hostname configuration for a Gateway." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", + "Method": "DELETE", + "OperationID": "GatewayHostnameConfiguration_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified hostname configuration from the specified Gateway." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations", + "Method": "GET", + "OperationID": "GatewayHostnameConfiguration_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the collection of hostname configurations for the specified gateway." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/hostnameConfigurations/{hcId}", + "Method": "HEAD", + "OperationID": "GatewayHostnameConfiguration_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Checks that hostname configuration entity specified by identifier exists for specified Gateway entity." + } + ], + "Parents": ["ApiManagementGateway"], + "SwaggerModelName": "GatewayHostnameConfigurationContract", + "ResourceType": "Microsoft.ApiManagement/service/gateways/hostnameConfigurations", + "ResourceKey": "hcId", + "ResourceKeySegment": "hostnameConfigurations", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementGatewayCertificateAuthority": { + "Name": "ApiManagementGatewayCertificateAuthority", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", + "Method": "GET", + "OperationID": "GatewayCertificateAuthority_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get assigned Gateway Certificate Authority details." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", + "Method": "PUT", + "OperationID": "GatewayCertificateAuthority_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Assign Certificate entity to Gateway entity as Certificate Authority." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", + "Method": "PUT", + "OperationID": "GatewayCertificateAuthority_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Assign Certificate entity to Gateway entity as Certificate Authority." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", + "Method": "DELETE", + "OperationID": "GatewayCertificateAuthority_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Remove relationship between Certificate Authority and Gateway entity." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities", + "Method": "GET", + "OperationID": "GatewayCertificateAuthority_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the collection of Certificate Authorities for the specified Gateway entity." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/certificateAuthorities/{certificateId}", + "Method": "HEAD", + "OperationID": "GatewayCertificateAuthority_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Checks if Certificate entity is assigned to Gateway entity as Certificate Authority." + } + ], + "Parents": ["ApiManagementGateway"], + "SwaggerModelName": "GatewayCertificateAuthorityContract", + "ResourceType": "Microsoft.ApiManagement/service/gateways/certificateAuthorities", + "ResourceKey": "certificateId", + "ResourceKeySegment": "certificateAuthorities", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementGroup": { + "Name": "ApiManagementGroup", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", + "Method": "GET", + "OperationID": "Group_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the group specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", + "Method": "PUT", + "OperationID": "Group_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or Updates a group." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", + "Method": "PATCH", + "OperationID": "Group_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the details of the group specified by its identifier." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", + "Method": "DELETE", + "OperationID": "Group_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes specific group of the API Management service instance." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups", + "Method": "GET", + "OperationID": "Group_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of groups defined within a service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetGroupUsers", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users", + "Method": "GET", + "OperationID": "GroupUser_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of user entities associated with the group." + }, + { + "Name": "CheckGroupUserEntityExists", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", + "Method": "HEAD", + "OperationID": "GroupUser_CheckEntityExists", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Checks that user entity specified by identifier is associated with the group entity." + }, + { + "Name": "CreateGroupUser", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", + "Method": "PUT", + "OperationID": "GroupUser_Create", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Add existing user to existing group" + }, + { + "Name": "DeleteGroupUser", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users/{userId}", + "Method": "DELETE", + "OperationID": "GroupUser_Delete", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Remove existing user from existing group." + }, + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}", + "Method": "HEAD", + "OperationID": "Group_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the group specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "GroupContract", + "ResourceType": "Microsoft.ApiManagement/service/groups", + "ResourceKey": "groupId", + "ResourceKeySegment": "groups", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementIdentityProvider": { + "Name": "ApiManagementIdentityProvider", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", + "Method": "GET", + "OperationID": "IdentityProvider_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the configuration details of the identity Provider configured in specified service instance." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", + "Method": "PUT", + "OperationID": "IdentityProvider_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or Updates the IdentityProvider configuration." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", + "Method": "PATCH", + "OperationID": "IdentityProvider_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates an existing IdentityProvider configuration." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", + "Method": "DELETE", + "OperationID": "IdentityProvider_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified identity provider configuration." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders", + "Method": "GET", + "OperationID": "IdentityProvider_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of Identity Provider configured in the specified service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetSecrets", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}/listSecrets", + "Method": "POST", + "OperationID": "IdentityProvider_ListSecrets", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the client secret details of the Identity Provider." + }, + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identityProviders/{identityProviderName}", + "Method": "HEAD", + "OperationID": "IdentityProvider_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the identityProvider specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "IdentityProviderContract", + "ResourceType": "Microsoft.ApiManagement/service/identityProviders", + "ResourceKey": "identityProviderName", + "ResourceKeySegment": "identityProviders", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementLogger": { + "Name": "ApiManagementLogger", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", + "Method": "GET", + "OperationID": "Logger_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the logger specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", + "Method": "PUT", + "OperationID": "Logger_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or Updates a logger." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", + "Method": "PATCH", + "OperationID": "Logger_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates an existing logger." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", + "Method": "DELETE", + "OperationID": "Logger_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified logger." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers", + "Method": "GET", + "OperationID": "Logger_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of loggers in the specified service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}", + "Method": "HEAD", + "OperationID": "Logger_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the logger specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "LoggerContract", + "ResourceType": "Microsoft.ApiManagement/service/loggers", + "ResourceKey": "loggerId", + "ResourceKeySegment": "loggers", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementNamedValue": { + "Name": "ApiManagementNamedValue", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", + "Method": "GET", + "OperationID": "NamedValue_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the named value specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", + "Method": "PUT", + "OperationID": "NamedValue_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates named value." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", + "Method": "PATCH", + "OperationID": "NamedValue_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates the specific named value." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", + "Method": "DELETE", + "OperationID": "NamedValue_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes specific named value from the API Management service instance." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues", + "Method": "GET", + "OperationID": "NamedValue_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of named values defined within a service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetValue", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/listValue", + "Method": "POST", + "OperationID": "NamedValue_ListValue", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the secret of the named value specified by its identifier." + }, + { + "Name": "RefreshSecret", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}/refreshSecret", + "Method": "POST", + "OperationID": "NamedValue_RefreshSecret", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Refresh the secret of the named value specified by its identifier." + }, + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}", + "Method": "HEAD", + "OperationID": "NamedValue_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the named value specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "NamedValueContract", + "ResourceType": "Microsoft.ApiManagement/service/namedValues", + "ResourceKey": "namedValueId", + "ResourceKeySegment": "namedValues", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementNotification": { + "Name": "ApiManagementNotification", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", + "Method": "GET", + "OperationID": "Notification_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the Notification specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", + "Method": "PUT", + "OperationID": "Notification_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or Update API Management publisher notification." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}", + "Method": "PUT", + "OperationID": "Notification_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or Update API Management publisher notification." + } + ], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications", + "Method": "GET", + "OperationID": "Notification_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of properties defined within a service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetNotificationRecipientUsers", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers", + "Method": "GET", + "OperationID": "NotificationRecipientUser_ListByNotification", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByNotification", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Gets the list of the Notification Recipient User subscribed to the notification." + }, + { + "Name": "CheckNotificationRecipientUserEntityExists", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", + "Method": "HEAD", + "OperationID": "NotificationRecipientUser_CheckEntityExists", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Determine if the Notification Recipient User is subscribed to the notification." + }, + { + "Name": "CreateOrUpdateNotificationRecipientUser", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", + "Method": "PUT", + "OperationID": "NotificationRecipientUser_CreateOrUpdate", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Adds the API Management User to the list of Recipients for the Notification." + }, + { + "Name": "DeleteNotificationRecipientUser", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers/{userId}", + "Method": "DELETE", + "OperationID": "NotificationRecipientUser_Delete", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Removes the API Management user from the list of Notification." + }, + { + "Name": "GetNotificationRecipientEmails", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails", + "Method": "GET", + "OperationID": "NotificationRecipientEmail_ListByNotification", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByNotification", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Gets the list of the Notification Recipient Emails subscribed to a notification." + }, + { + "Name": "CheckNotificationRecipientEmailEntityExists", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", + "Method": "HEAD", + "OperationID": "NotificationRecipientEmail_CheckEntityExists", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Determine if Notification Recipient Email subscribed to the notification." + }, + { + "Name": "CreateOrUpdateNotificationRecipientEmail", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", + "Method": "PUT", + "OperationID": "NotificationRecipientEmail_CreateOrUpdate", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Adds the Email address to the list of Recipients for the Notification." + }, + { + "Name": "DeleteNotificationRecipientEmail", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails/{email}", + "Method": "DELETE", + "OperationID": "NotificationRecipientEmail_Delete", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Removes the email from the list of Notification." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "NotificationContract", + "ResourceType": "Microsoft.ApiManagement/service/notifications", + "ResourceKey": "notificationName", + "ResourceKeySegment": "notifications", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementOpenIdConnectProvider": { + "Name": "ApiManagementOpenIdConnectProvider", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{openId}", + "Method": "GET", + "OperationID": "OpenIdConnectProvider_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets specific OpenID Connect Provider without secrets." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{openId}", + "Method": "PUT", + "OperationID": "OpenIdConnectProvider_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates the OpenID Connect Provider." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{openId}", + "Method": "PATCH", + "OperationID": "OpenIdConnectProvider_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the specific OpenID Connect Provider." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{openId}", + "Method": "DELETE", + "OperationID": "OpenIdConnectProvider_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes specific OpenID Connect Provider of the API Management service instance." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders", + "Method": "GET", + "OperationID": "OpenIdConnectProvider_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists of all the OpenId Connect Providers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetSecrets", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{openId}/listSecrets", + "Method": "POST", + "OperationID": "OpenIdConnectProvider_ListSecrets", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the client secret details of the OpenID Connect Provider." + }, + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/openidConnectProviders/{openId}", + "Method": "HEAD", + "OperationID": "OpenIdConnectProvider_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "OpenidConnectProviderContract", + "ResourceType": "Microsoft.ApiManagement/service/openidConnectProviders", + "ResourceKey": "opid", + "ResourceKeySegment": "openidConnectProviders", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementPortalRevision": { + "Name": "ApiManagementPortalRevision", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", + "Method": "GET", + "OperationID": "PortalRevision_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the developer portal\u0027s revision specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", + "Method": "PUT", + "OperationID": "PortalRevision_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new developer portal\u0027s revision by running the portal\u0027s publishing. The \u0060isCurrent\u0060 property indicates if the revision is publicly accessible." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", + "Method": "PATCH", + "OperationID": "PortalRevision_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates the description of specified portal revision or makes it current." + } + ], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions", + "Method": "GET", + "OperationID": "PortalRevision_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists developer portal\u0027s revisions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalRevisions/{portalRevisionId}", + "Method": "HEAD", + "OperationID": "PortalRevision_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the developer portal revision specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "PortalRevisionContract", + "ResourceType": "Microsoft.ApiManagement/service/portalRevisions", + "ResourceKey": "portalRevisionId", + "ResourceKeySegment": "portalRevisions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementPortalSignInSetting": { + "Name": "ApiManagementPortalSignInSetting", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", + "Method": "GET", + "OperationID": "SignInSettings_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Sign In Settings for the Portal" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", + "Method": "PUT", + "OperationID": "SignInSettings_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or Update Sign-In settings." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", + "Method": "PATCH", + "OperationID": "SignInSettings_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update Sign-In settings." + } + ], + "DeleteOperations": [], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signin", + "Method": "HEAD", + "OperationID": "SignInSettings_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the SignInSettings." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "PortalSigninSettings", + "ResourceType": "Microsoft.ApiManagement/service/portalsettings", + "ResourceKey": "signin", + "ResourceKeySegment": "portalsettings", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": true + }, + "ApiManagementPortalSignUpSetting": { + "Name": "ApiManagementPortalSignUpSetting", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", + "Method": "GET", + "OperationID": "SignUpSettings_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Sign Up Settings for the Portal" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", + "Method": "PUT", + "OperationID": "SignUpSettings_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or Update Sign-Up settings." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", + "Method": "PATCH", + "OperationID": "SignUpSettings_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update Sign-Up settings." + } + ], + "DeleteOperations": [], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/signup", + "Method": "HEAD", + "OperationID": "SignUpSettings_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the SignUpSettings." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "PortalSignupSettings", + "ResourceType": "Microsoft.ApiManagement/service/portalsettings", + "ResourceKey": "signup", + "ResourceKeySegment": "portalsettings", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": true + }, + "ApiManagementPortalDelegationSetting": { + "Name": "ApiManagementPortalDelegationSetting", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", + "Method": "GET", + "OperationID": "DelegationSettings_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Delegation Settings for the Portal." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", + "Method": "PUT", + "OperationID": "DelegationSettings_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or Update Delegation settings." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", + "Method": "PATCH", + "OperationID": "DelegationSettings_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update Delegation settings." + } + ], + "DeleteOperations": [], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetSecrets", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation/listSecrets", + "Method": "POST", + "OperationID": "DelegationSettings_ListSecrets", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the secret validation key of the DelegationSettings." + }, + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings/delegation", + "Method": "HEAD", + "OperationID": "DelegationSettings_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the DelegationSettings." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "PortalDelegationSettings", + "ResourceType": "Microsoft.ApiManagement/service/portalsettings", + "ResourceKey": "delegation", + "ResourceKeySegment": "portalsettings", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": true + }, + "ApiManagementPrivateEndpointConnection": { + "Name": "ApiManagementPrivateEndpointConnection", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "GET", + "OperationID": "PrivateEndpointConnection_GetByName", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the Private Endpoint Connection specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "PUT", + "OperationID": "PrivateEndpointConnection_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new Private Endpoint Connection or updates an existing one." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "PUT", + "OperationID": "PrivateEndpointConnection_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new Private Endpoint Connection or updates an existing one." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "DELETE", + "OperationID": "PrivateEndpointConnection_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified Private Endpoint Connection." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections", + "Method": "GET", + "OperationID": "PrivateEndpointConnection_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Lists all private endpoint connections of the API Management service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "PrivateEndpointConnection", + "ResourceType": "Microsoft.ApiManagement/service/privateEndpointConnections", + "ResourceKey": "privateEndpointConnectionName", + "ResourceKeySegment": "privateEndpointConnections", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementPrivateLinkResource": { + "Name": "ApiManagementPrivateLinkResource", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources/{privateLinkSubResourceName}", + "Method": "GET", + "OperationID": "PrivateEndpointConnection_GetPrivateLinkResource", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the private link resources" + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources", + "Method": "GET", + "OperationID": "PrivateEndpointConnection_ListPrivateLinkResources", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListPrivateLinkResources", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Gets the private link resources" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "PrivateLinkResource", + "ResourceType": "Microsoft.ApiManagement/service/privateLinkResources", + "ResourceKey": "privateLinkSubResourceName", + "ResourceKeySegment": "privateLinkResources", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementProduct": { + "Name": "ApiManagementProduct", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", + "Method": "GET", + "OperationID": "Product_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the product specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", + "Method": "PUT", + "OperationID": "Product_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or Updates a product." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", + "Method": "PATCH", + "OperationID": "Product_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update existing product details." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", + "Method": "DELETE", + "OperationID": "Product_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete product." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products", + "Method": "GET", + "OperationID": "Product_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of products in the specified service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetProductApis", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis", + "Method": "GET", + "OperationID": "ProductApi_ListByProduct", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByProduct", + "NextPageMethod": "ListByProductNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of the APIs associated with a product." + }, + { + "Name": "CheckProductApiEntityExists", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", + "Method": "HEAD", + "OperationID": "ProductApi_CheckEntityExists", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Checks that API entity specified by identifier is associated with the Product entity." + }, + { + "Name": "CreateOrUpdateProductApi", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", + "Method": "PUT", + "OperationID": "ProductApi_CreateOrUpdate", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Adds an API to the specified product." + }, + { + "Name": "DeleteProductApi", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis/{apiId}", + "Method": "DELETE", + "OperationID": "ProductApi_Delete", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Deletes the specified API from the specified product." + }, + { + "Name": "GetProductGroups", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups", + "Method": "GET", + "OperationID": "ProductGroup_ListByProduct", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByProduct", + "NextPageMethod": "ListByProductNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the collection of developer groups associated with the specified product." + }, + { + "Name": "CheckProductGroupEntityExists", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", + "Method": "HEAD", + "OperationID": "ProductGroup_CheckEntityExists", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Checks that Group entity specified by identifier is associated with the Product entity." + }, + { + "Name": "CreateOrUpdateProductGroup", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", + "Method": "PUT", + "OperationID": "ProductGroup_CreateOrUpdate", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Adds the association between the specified developer group with the specified product." + }, + { + "Name": "DeleteProductGroup", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups/{groupId}", + "Method": "DELETE", + "OperationID": "ProductGroup_Delete", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Deletes the association between the specified group and product." + }, + { + "Name": "GetAllProductSubscriptionData", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions", + "Method": "GET", + "OperationID": "ProductSubscriptions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the collection of subscriptions to the specified product." + }, + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}", + "Method": "HEAD", + "OperationID": "Product_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the product specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "ProductContract", + "ResourceType": "Microsoft.ApiManagement/service/products", + "ResourceKey": "productId", + "ResourceKeySegment": "products", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementGlobalSchema": { + "Name": "ApiManagementGlobalSchema", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + "Method": "GET", + "OperationID": "GlobalSchema_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the Schema specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + "Method": "PUT", + "OperationID": "GlobalSchema_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates new or updates existing specified Schema of the API Management service instance." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + "Method": "PUT", + "OperationID": "GlobalSchema_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates new or updates existing specified Schema of the API Management service instance." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + "Method": "DELETE", + "OperationID": "GlobalSchema_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes specific Schema." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas", + "Method": "GET", + "OperationID": "GlobalSchema_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of schemas registered with service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}", + "Method": "HEAD", + "OperationID": "GlobalSchema_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the Schema specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "GlobalSchemaContract", + "ResourceType": "Microsoft.ApiManagement/service/schemas", + "ResourceKey": "schemaId", + "ResourceKeySegment": "schemas", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementTenantSetting": { + "Name": "ApiManagementTenantSetting", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings/{settingsType}", + "Method": "GET", + "OperationID": "TenantSettings_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get tenant settings." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/settings", + "Method": "GET", + "OperationID": "TenantSettings_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Public settings." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "TenantSettingsContract", + "ResourceType": "Microsoft.ApiManagement/service/settings", + "ResourceKey": "settingsType", + "ResourceKeySegment": "settings", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementSubscription": { + "Name": "ApiManagementSubscription", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", + "Method": "GET", + "OperationID": "Subscription_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the specified Subscription entity." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", + "Method": "PUT", + "OperationID": "Subscription_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates the subscription of specified user to the specified product." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", + "Method": "PATCH", + "OperationID": "Subscription_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the details of a subscription specified by its identifier." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", + "Method": "DELETE", + "OperationID": "Subscription_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified subscription." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions", + "Method": "GET", + "OperationID": "Subscription_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all subscriptions of the API Management service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "RegeneratePrimaryKey", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regeneratePrimaryKey", + "Method": "POST", + "OperationID": "Subscription_RegeneratePrimaryKey", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Regenerates primary key of existing subscription of the API Management service instance." + }, + { + "Name": "RegenerateSecondaryKey", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/regenerateSecondaryKey", + "Method": "POST", + "OperationID": "Subscription_RegenerateSecondaryKey", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Regenerates secondary key of existing subscription of the API Management service instance." + }, + { + "Name": "GetSecrets", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}/listSecrets", + "Method": "POST", + "OperationID": "Subscription_ListSecrets", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the specified Subscription keys." + }, + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/subscriptions/{sid}", + "Method": "HEAD", + "OperationID": "Subscription_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "SubscriptionContract", + "ResourceType": "Microsoft.ApiManagement/service/subscriptions", + "ResourceKey": "subscriptionId", + "ResourceKeySegment": "subscriptions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementUserSubscription": { + "Name": "ApiManagementUserSubscription", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions/{sid}", + "Method": "GET", + "OperationID": "UserSubscription_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the specified Subscription entity associated with a particular user." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions", + "Method": "GET", + "OperationID": "UserSubscription_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the collection of subscriptions of the specified user." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ApiManagementUser"], + "SwaggerModelName": "SubscriptionContract", + "ResourceType": "Microsoft.ApiManagement/service/users/subscriptions", + "ResourceKey": "subscriptionId", + "ResourceKeySegment": "subscriptions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "TenantAccessInfo": { + "Name": "TenantAccessInfo", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", + "Method": "GET", + "OperationID": "TenantAccess_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get tenant access information details without secrets." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", + "Method": "PUT", + "OperationID": "TenantAccess_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update tenant access information details." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", + "Method": "PATCH", + "OperationID": "TenantAccess_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update tenant access information details." + } + ], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant", + "Method": "GET", + "OperationID": "TenantAccess_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Returns list of access infos - for Git and Management endpoints." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "RegeneratePrimaryKey", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regeneratePrimaryKey", + "Method": "POST", + "OperationID": "TenantAccess_RegeneratePrimaryKey", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Regenerate primary access key" + }, + { + "Name": "RegenerateSecondaryKey", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/regenerateSecondaryKey", + "Method": "POST", + "OperationID": "TenantAccess_RegenerateSecondaryKey", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Regenerate secondary access key" + }, + { + "Name": "GetSecrets", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/listSecrets", + "Method": "POST", + "OperationID": "TenantAccess_ListSecrets", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get tenant access information details." + }, + { + "Name": "RegeneratePrimaryKeyForGit", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regeneratePrimaryKey", + "Method": "POST", + "OperationID": "TenantAccessGit_RegeneratePrimaryKey", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Regenerate primary access key for GIT." + }, + { + "Name": "RegenerateSecondaryKeyForGit", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}/git/regenerateSecondaryKey", + "Method": "POST", + "OperationID": "TenantAccessGit_RegenerateSecondaryKey", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Regenerate secondary access key for GIT." + }, + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{accessName}", + "Method": "HEAD", + "OperationID": "TenantAccess_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Tenant access metadata" + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "AccessInformationContract", + "ResourceType": "Microsoft.ApiManagement/service/tenant", + "ResourceKey": "accessName", + "ResourceKeySegment": "tenant", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ApiManagementUser": { + "Name": "ApiManagementUser", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", + "Method": "GET", + "OperationID": "User_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the details of the user specified by its identifier." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", + "Method": "PUT", + "OperationID": "User_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or Updates a user." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", + "Method": "PATCH", + "OperationID": "User_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the details of the user specified by its identifier." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", + "Method": "DELETE", + "OperationID": "User_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes specific user." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users", + "Method": "GET", + "OperationID": "User_ListByService", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByService", + "NextPageMethod": "ListByServiceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists a collection of registered users in the specified service instance." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GenerateSsoUri", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/generateSsoUrl", + "Method": "POST", + "OperationID": "User_GenerateSsoUrl", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal." + }, + { + "Name": "GetSharedAccessToken", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/token", + "Method": "POST", + "OperationID": "User_GetSharedAccessToken", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the Shared Access Authorization Token for the User." + }, + { + "Name": "GetUserGroups", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups", + "Method": "GET", + "OperationID": "UserGroup_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all user groups." + }, + { + "Name": "GetUserIdentities", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities", + "Method": "GET", + "OperationID": "UserIdentities_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List of all user identities." + }, + { + "Name": "SendUserConfirmationPassword", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/confirmations/password/send", + "Method": "POST", + "OperationID": "UserConfirmationPassword_Send", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Sends confirmation" + }, + { + "Name": "GetEntityTag", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}", + "Method": "HEAD", + "OperationID": "User_GetEntityTag", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the entity state (Etag) version of the user specified by its identifier." + } + ], + "Parents": ["ApiManagementService"], + "SwaggerModelName": "UserContract", + "ResourceType": "Microsoft.ApiManagement/service/users", + "ResourceKey": "userId", + "ResourceKeySegment": "users", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp new file mode 100644 index 0000000000..3cff2c8932 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp @@ -0,0 +1,100 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Tenant Settings.") +@parentResource(ApiManagementServiceResource) +model AccessInformationContract + is ProxyResource { + @doc("The identifier of the Access configuration.") + @path + @key("accessName") + @segment("tenant") + name: AccessIdName; +} + +@armResourceOperations +interface TenantAccess { + @doc("Get tenant access information details without secrets.") + get is ArmResourceRead; + @doc("Tenant access metadata") + @head + getEntityTag( + ...ResourceInstanceParameters< + AccessInformationContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Update tenant access information details.") + create is ArmResourceCreateOrReplaceSync< + AccessInformationContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Update tenant access information details.") + update is ArmResourcePatchSync< + AccessInformationContract, + AccessInformationContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Returns list of access infos - for Git and Management endpoints.") + listByService is ArmResourceListByParent< + AccessInformationContract, + { + ...BaseParameters; + + @doc("Not used") + @query("$filter") + $filter?: string; + } + >; + @doc("Regenerate primary access key") + regeneratePrimaryKey is ArmResourceActionNoContentSync< + AccessInformationContract, + void + >; + @doc("Regenerate secondary access key") + regenerateSecondaryKey is ArmResourceActionNoContentSync< + AccessInformationContract, + void + >; + @doc("Get tenant access information details.") + listSecrets is ArmResourceActionSync< + AccessInformationContract, + void, + AccessInformationSecretsContract + >; +} + +@armResourceOperations +interface TenantAccessGit { + @doc("Regenerate primary access key for GIT.") + regeneratePrimaryKey is ArmResourceActionNoContentSync< + AccessInformationContract, + void + >; + @doc("Regenerate secondary access key for GIT.") + regenerateSecondaryKey is ArmResourceActionNoContentSync< + AccessInformationContract, + void + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp new file mode 100644 index 0000000000..709d91042d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp @@ -0,0 +1,241 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("API details.") +@parentResource(ApiManagementServiceResource) +model ApiContract is ProxyResource { + @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + @key("apiId") + @segment("apis") + name: string; +} + +@armResourceOperations +interface Api { + @doc("Gets the details of the API specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the API specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters>, + ): OkResponse | ErrorResponse; + @doc("Creates new or updates existing specified API of the API Management service instance.") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + ApiContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates the specified API of the API Management service instance.") + update is ArmResourcePatchSync< + ApiContract, + ApiContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes the specified API of the API Management service instance.") + delete is ArmResourceDeleteSync< + ApiContract, + { + ...BaseParameters; + + @doc("Delete all revisions of the Api.") + @query("deleteRevisions") + deleteRevisions?: boolean; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists all APIs of the API Management service instance.") + listByService is ArmResourceListByParent< + ApiContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | isCurrent | filter | eq, ne | |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Include tags in the response.") + @query("tags") + tags?: string; + + @doc("Include full ApiVersionSet resource in response") + @query("expandApiVersionSet") + expandApiVersionSet?: boolean; + } + >; +} + +@armResourceOperations +interface ApiRevision { + @doc("Lists all revisions of an API.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions") + @get + ListByService is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("API identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @path + apiId: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ApiRevisionListResult + >; +} + +@armResourceOperations +interface ApiProduct { + @doc("Lists all Products, which the API is part of.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products") + @get + ListByApis is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("API identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @path + apiId: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ProductListResult + >; +} + +@armResourceOperations +interface Operation { + @doc("Lists a collection of operations associated with tags.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags") + @get + ListByTags is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Include not tagged Operations.") + @query("includeNotTaggedOperations") + includeNotTaggedOperations?: boolean; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + TagResourceListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp new file mode 100644 index 0000000000..3410fc5600 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp @@ -0,0 +1,946 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("A single API Management service resource in List or Get response.") +model ApiManagementServiceResource + is TrackedResource { + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + @key("serviceName") + @segment("service") + name: string; + + @doc("ETag of the resource.") + @visibility("read") + etag?: string; + + @doc("A list of availability zones denoting where the resource needs to come from.") + zones?: string[]; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; +} + +@armResourceOperations +interface ApiManagementService { + @doc("Gets an API Management service resource description.") + get is ArmResourceRead; + @doc("Creates or updates an API Management service. This is long running operation and could take several minutes to complete.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Updates an existing API Management service.") + update is ArmResourcePatchAsync< + ApiManagementServiceResource, + ApiManagementServiceProperties + >; + @doc("Deletes an existing API Management service.") + delete is ArmResourceDeleteAsync; + @doc("List all API Management services within a resource group.") + listByResourceGroup is ArmResourceListByParent; + @doc("Lists all API Management services within an Azure subscription.") + list is ArmListBySubscription; + @doc("Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete.") + restore is ArmResourceActionAsync< + ApiManagementServiceResource, + ApiManagementServiceBackupRestoreParameters, + ApiManagementServiceResource + >; + @doc("Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete.") + backup is ArmResourceActionAsync< + ApiManagementServiceResource, + ApiManagementServiceBackupRestoreParameters, + ApiManagementServiceResource + >; + @doc("Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes.") + getSsoToken is ArmResourceActionSync< + ApiManagementServiceResource, + void, + ApiManagementServiceGetSsoTokenResult + >; + @doc("Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes.") + applyNetworkConfigurationUpdates is ArmResourceActionAsync< + ApiManagementServiceResource, + ApiManagementServiceApplyNetworkConfigurationParameters, + ApiManagementServiceResource + >; +} + +@armResourceOperations +interface ApiManagementServices { + @doc("Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it.") + performConnectivityCheckAsync is ArmResourceActionAsync< + ApiManagementServiceResource, + ConnectivityCheckRequest, + ConnectivityCheckResponse + >; +} + +@armResourceOperations +interface TenantConfiguration { + @doc("This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete.") + deploy is ArmResourceActionAsync< + ApiManagementServiceResource, + DeployConfigurationParameters, + OperationResultContract, + { + ...BaseParameters; + + @doc("The identifier of the Git Configuration Operation.") + @path + configurationName: ConfigurationIdName; + } + >; + @doc("This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete.") + save is ArmResourceActionAsync< + ApiManagementServiceResource, + SaveConfigurationParameter, + OperationResultContract, + { + ...BaseParameters; + + @doc("The identifier of the Git Configuration Operation.") + @path + configurationName: ConfigurationIdName; + } + >; + @doc("This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete.") + validate is ArmResourceActionAsync< + ApiManagementServiceResource, + DeployConfigurationParameters, + OperationResultContract, + { + ...BaseParameters; + + @doc("The identifier of the Git Configuration Operation.") + @path + configurationName: ConfigurationIdName; + } + >; + @doc("Gets the status of the most recent synchronization between the configuration database and the Git repository.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState") + @get + GetSyncState is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("The identifier of the Git Configuration Operation.") + @path + configurationName: ConfigurationIdName; + }, + TenantConfigurationSyncStateContract + >; +} + +@armResourceOperations +interface Api { + @doc("Lists a collection of apis associated with tags.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags") + @get + ListByTags is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | isCurrent | filter | eq | |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Include not tagged APIs.") + @query("includeNotTaggedApis") + includeNotTaggedApis?: boolean; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + TagResourceListResult + >; +} + +@armResourceOperations +interface ContentType { + @doc("Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes") + @get + ListByService is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ContentTypeListResult + >; + + @doc("Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Content type identifier.") + @maxLength(80) + @minLength(1) + @path + contentTypeId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ContentTypeContract + >; +} + +@armResourceOperations +interface ContentItem { + @doc("Lists developer portal's content items specified by the provided content type.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems") + @get + ListByService is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Content type identifier.") + @maxLength(80) + @minLength(1) + @path + contentTypeId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ContentItemListResult + >; + + @doc("Returns the developer portal's content item specified by its identifier.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Content type identifier.") + @maxLength(80) + @minLength(1) + @path + contentTypeId: string; + + @doc("Content item identifier.") + @maxLength(80) + @minLength(1) + @path + contentItemId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ContentItemContract + >; +} + +@armResourceOperations +interface ApiManagementServiceSkus { + @summary("Gets available SKUs for API Management service") + @doc("Gets all available SKU for a given API Management service") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus") + @get + ListAvailableServiceSkus is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ResourceSkuResults + >; +} + +@armResourceOperations +interface NetworkStatus { + @doc("Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus") + @get + ListByService is Azure.Core.Foundations.Operation< + { + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + }, + void + >; + + @doc("Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus") + @get + ListByLocation is Azure.Core.Foundations.Operation< + { + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US.") + @minLength(1) + @path + locationName: string; + }, + NetworkStatusContract + >; +} + +@armResourceOperations +interface OutboundNetworkDependenciesEndpoints { + @doc("Gets the network endpoints of all outbound dependencies of a ApiManagement service.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints") + @get + ListByService is Azure.Core.Foundations.Operation< + { + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + }, + OutboundEnvironmentEndpointList + >; +} + +@armResourceOperations +interface PolicyDescription { + @doc("Lists all policy descriptions.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions") + @get + ListByService is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Policy scope.") + @query("scope") + scope?: PolicyScopeContract; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + PolicyDescriptionListResult + >; +} + +@armResourceOperations +interface PortalSettings { + @doc("Lists a collection of portalsettings defined within a service instance..") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings") + @get + ListByService is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + PortalSettingsListResult + >; +} + +@armResourceOperations +interface Product { + @doc("Lists a collection of products associated with tags.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags") + @get + ListByTags is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Include not tagged Products.") + @query("includeNotTaggedProducts") + includeNotTaggedProducts?: boolean; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + TagResourceListResult + >; +} + +@armResourceOperations +interface QuotaByCounterKeys { + @doc("Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}") + @get + ListByService is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key=\"boo\" in the policy, then it’s accessible by \"boo\" counter key. But if it’s defined as counter-key=\"@(\"b\"+\"a\")\" then it will be accessible by \"ba\" key") + @path + quotaCounterKey: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + QuotaCounterListResult + >; +} + +@armResourceOperations +interface QuotaByPeriodKeys { + @doc("Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance.") + Get is Azure.Core.ResourceRead; +} + +@armResourceOperations +interface Region { + @doc("Lists all azure regions in which the service exists.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions") + @get + ListByService is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + RegionListResult + >; +} + +@armResourceOperations +interface Reports { + @doc("Lists report records by API.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi") + @get + ListByApi is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("The filter to apply on the operation.") + @query("$filter") + $filter: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("OData order by query option.") + @query("$orderby") + orderBy?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ReportListResult + >; + + @doc("Lists report records by User.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser") + @get + ListByUser is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | userId | select, filter | eq | |
    | apiRegion | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    ") + @query("$filter") + $filter: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("OData order by query option.") + @query("$orderby") + orderBy?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ReportListResult + >; + + @doc("Lists report records by API Operations.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation") + @get + ListByOperation is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | select, filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    ") + @query("$filter") + $filter: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("OData order by query option.") + @query("$orderby") + orderBy?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ReportListResult + >; + + @doc("Lists report records by Product.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct") + @get + ListByProduct is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | select, filter | eq | |
    | subscriptionId | filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    ") + @query("$filter") + $filter: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("OData order by query option.") + @query("$orderby") + orderBy?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ReportListResult + >; + + @doc("Lists report records by geography.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo") + @get + ListByGeo is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | country | select | | |
    | region | select | | |
    | zip | select | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | callCountSuccess | select | | |
    | callCountBlocked | select | | |
    | callCountFailed | select | | |
    | callCountOther | select | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    ") + @query("$filter") + $filter: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ReportListResult + >; + + @doc("Lists report records by subscription.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription") + @get + ListBySubscription is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | apiRegion | filter | eq | |
    | userId | select, filter | eq | |
    | productId | select, filter | eq | |
    | subscriptionId | select, filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    ") + @query("$filter") + $filter: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("OData order by query option.") + @query("$orderby") + orderBy?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ReportListResult + >; + + @doc("Lists report records by Time.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime") + @get + ListByTime is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter, select | ge, le | |
    | interval | select | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | callCountSuccess | select | | |
    | callCountBlocked | select | | |
    | callCountFailed | select | | |
    | callCountOther | select | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    ") + @query("$filter") + $filter: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("OData order by query option.") + @query("$orderby") + orderBy?: string; + + @doc("By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)).") + @query("interval") + interval: duration; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ReportListResult + >; + + @doc("Lists report records by Request.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest") + @get + ListByRequest is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | productId | filter | eq | |
    | userId | filter | eq | |
    | apiRegion | filter | eq | |
    | subscriptionId | filter | eq | |
    ") + @query("$filter") + $filter: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + RequestReportListResult + >; +} + +@armResourceOperations +interface TagResource { + @doc("Lists a collection of resources associated with tags.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources") + @get + ListByService is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | isCurrent | filter | eq | |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + TagResourceListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp new file mode 100644 index 0000000000..308471a5a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp @@ -0,0 +1,92 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiContract.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("ApiRelease details.") +@parentResource(ApiContract) +model ApiReleaseContract is ProxyResource { + @doc("Release identifier within an API. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + @key("releaseId") + @segment("releases") + name: string; +} + +@armResourceOperations +interface ApiRelease { + @doc("Returns the details of an API release.") + get is ArmResourceRead; + @doc("Returns the etag of an API release.") + @head + getEntityTag( + ...ResourceInstanceParameters< + ApiReleaseContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates a new Release for the API.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + ApiReleaseContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates the details of the release of the API specified by its identifier.") + update is ArmResourcePatchSync< + ApiReleaseContract, + ApiReleaseContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes the specified release in the API.") + delete is ArmResourceDeleteSync< + ApiReleaseContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters.") + listByService is ArmResourceListByParent< + ApiReleaseContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp new file mode 100644 index 0000000000..be62af42e7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp @@ -0,0 +1,92 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("API Version Set Contract details.") +@parentResource(ApiManagementServiceResource) +model ApiVersionSetContract is ProxyResource { + @doc("Api Version Set identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + @key("versionSetId") + @segment("apiVersionSets") + name: string; +} + +@armResourceOperations +interface ApiVersionSet { + @doc("Gets the details of the Api Version Set specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the Api Version Set specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + ApiVersionSetContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates or Updates a Api Version Set.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + ApiVersionSetContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates the details of the Api VersionSet specified by its identifier.") + update is ArmResourcePatchSync< + ApiVersionSetContract, + ApiVersionSetContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes specific Api Version Set.") + delete is ArmResourceDeleteSync< + ApiVersionSetContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists a collection of API Version Sets in the specified service instance.") + listByService is ArmResourceListByParent< + ApiVersionSetContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp new file mode 100644 index 0000000000..7ff51d159d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp @@ -0,0 +1,99 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("External OAuth authorization server settings.") +@parentResource(ApiManagementServiceResource) +model AuthorizationServerContract + is ProxyResource { + @doc("Identifier of the authorization server.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + @key("authsid") + @segment("authorizationServers") + name: string; +} + +@armResourceOperations +interface AuthorizationServer { + @doc("Gets the details of the authorization server specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the authorizationServer specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + AuthorizationServerContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates new authorization server or updates an existing authorization server.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + AuthorizationServerContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates the details of the authorization server specified by its identifier.") + update is ArmResourcePatchSync< + AuthorizationServerContract, + AuthorizationServerContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes specific authorization server instance.") + delete is ArmResourceDeleteSync< + AuthorizationServerContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists a collection of authorization servers defined within a service instance.") + listByService is ArmResourceListByParent< + AuthorizationServerContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; + @doc("Gets the client secret details of the authorization server.") + listSecrets is ArmResourceActionSync< + AuthorizationServerContract, + void, + AuthorizationServerSecretsContract + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp new file mode 100644 index 0000000000..73937f5a10 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp @@ -0,0 +1,96 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Backend details.") +@parentResource(ApiManagementServiceResource) +model BackendContract is ProxyResource { + @doc("Identifier of the Backend entity. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @path + @key("backendId") + @segment("backends") + name: string; +} + +@armResourceOperations +interface Backend { + @doc("Gets the details of the backend specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the backend specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + BackendContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates or Updates a backend.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + BackendContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates an existing backend.") + update is ArmResourcePatchSync< + BackendContract, + BackendContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes the specified backend.") + delete is ArmResourceDeleteSync< + BackendContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists a collection of backends in the specified service instance.") + listByService is ArmResourceListByParent< + BackendContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; + @doc("Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used.") + reconnect is ArmResourceActionNoContentSync< + BackendContract, + BackendReconnectContract + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp new file mode 100644 index 0000000000..4bf59b5902 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp @@ -0,0 +1,85 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Cache details.") +@parentResource(ApiManagementServiceResource) +model CacheContract is ProxyResource { + @doc("Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier).") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + @key("cacheId") + @segment("caches") + name: string; +} + +@armResourceOperations +interface Cache { + @doc("Gets the details of the Cache specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the Cache specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters>, + ): OkResponse | ErrorResponse; + @doc("Creates or updates an External Cache to be used in Api Management instance.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + CacheContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates the details of the cache specified by its identifier.") + update is ArmResourcePatchSync< + CacheContract, + CacheContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes specific Cache.") + delete is ArmResourceDeleteSync< + CacheContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists a collection of all external Caches in the specified service instance.") + listByService is ArmResourceListByParent< + CacheContract, + { + ...BaseParameters; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp new file mode 100644 index 0000000000..2889618329 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp @@ -0,0 +1,90 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Certificate details.") +@parentResource(ApiManagementServiceResource) +model CertificateContract is ProxyResource { + @doc("Identifier of the certificate entity. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + @key("certificateId") + @segment("certificates") + name: string; +} + +@armResourceOperations +interface Certificate { + @doc("Gets the details of the certificate specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the certificate specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + CertificateContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates or updates the certificate being used for authentication with the backend.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + CertificateContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Deletes specific certificate.") + delete is ArmResourceDeleteSync< + CertificateContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists a collection of all certificates in the specified service instance.") + listByService is ArmResourceListByParent< + CertificateContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | expirationDate | filter | ge, le, eq, ne, gt, lt | |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("When set to true, the response contains only certificates entities which failed refresh.") + @query("isKeyVaultRefreshFailed") + isKeyVaultRefreshFailed?: boolean; + } + >; + @doc("From KeyVault, Refresh the certificate being used for authentication with the backend.") + refreshSecret is ArmResourceActionSync< + CertificateContract, + void, + CertificateContract + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp new file mode 100644 index 0000000000..6a1a77d4d7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp @@ -0,0 +1,34 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Deleted API Management Service information.") +@locationResource +model DeletedServiceContract + is ProxyResource { + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + @key("serviceName") + @segment("deletedservices") + name: string; +} + +@armResourceOperations +interface DeletedServices { + @doc("Get soft-deleted Api Management Service by name.") + getByName is ArmResourceRead; + @doc("Purges Api Management Service (deletes it with no option to undelete).") + purge is ArmResourceDeleteAsync; + @doc("Lists all soft-deleted services available for undelete for the given subscription.") + listBySubscription is ArmListBySubscription; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp new file mode 100644 index 0000000000..ac95d3d06d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp @@ -0,0 +1,92 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiContract.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Diagnostic details.") +@parentResource(ApiContract) +model DiagnosticContract is ProxyResource { + @doc("Diagnostic identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + @key("diagnosticId") + @segment("diagnostics") + name: string; +} + +@armResourceOperations +interface ApiDiagnostic { + @doc("Gets the details of the Diagnostic for an API specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + DiagnosticContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates a new Diagnostic for an API or updates an existing one.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + DiagnosticContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates the details of the Diagnostic for an API specified by its identifier.") + update is ArmResourcePatchSync< + DiagnosticContract, + DiagnosticContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes the specified Diagnostic from an API.") + delete is ArmResourceDeleteSync< + DiagnosticContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists all diagnostics of an API.") + listByService is ArmResourceListByParent< + DiagnosticContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp new file mode 100644 index 0000000000..bfdb754165 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp @@ -0,0 +1,89 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Email Template details.") +@parentResource(ApiManagementServiceResource) +model EmailTemplateContract is ProxyResource { + @doc("Email Template Name Identifier.") + @path + @key("templateName") + @segment("templates") + name: TemplateName; +} + +@armResourceOperations +interface EmailTemplate { + @doc("Gets the details of the email template specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the email template specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + EmailTemplateContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Updates an Email Template.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + EmailTemplateContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates API Management email template") + update is ArmResourcePatchSync< + EmailTemplateContract, + EmailTemplateContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Reset the Email Template to default template provided by the API Management service instance.") + delete is ArmResourceDeleteSync< + EmailTemplateContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Gets all email templates") + listByService is ArmResourceListByParent< + EmailTemplateContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp new file mode 100644 index 0000000000..993a750342 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp @@ -0,0 +1,81 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./GatewayContract.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Gateway certificate authority details.") +@parentResource(GatewayContract) +model GatewayCertificateAuthorityContract + is ProxyResource { + @doc("Identifier of the certificate entity. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + @key("certificateId") + @segment("certificateAuthorities") + name: string; +} + +@armResourceOperations +interface GatewayCertificateAuthority { + @doc("Get assigned Gateway Certificate Authority details.") + get is ArmResourceRead; + @doc("Checks if Certificate entity is assigned to Gateway entity as Certificate Authority.") + @head + getEntityTag( + ...ResourceInstanceParameters< + GatewayCertificateAuthorityContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Assign Certificate entity to Gateway entity as Certificate Authority.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + GatewayCertificateAuthorityContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Remove relationship between Certificate Authority and Gateway entity.") + delete is ArmResourceDeleteSync< + GatewayCertificateAuthorityContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists the collection of Certificate Authorities for the specified Gateway entity.") + listByService is ArmResourceListByParent< + GatewayCertificateAuthorityContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | eq, ne | |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp new file mode 100644 index 0000000000..1c0e7c605f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp @@ -0,0 +1,149 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Gateway details.") +@parentResource(ApiManagementServiceResource) +model GatewayContract is ProxyResource { + @doc("Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'") + @maxLength(80) + @minLength(1) + @path + @key("gatewayId") + @segment("gateways") + name: string; +} + +@armResourceOperations +interface Gateway { + @doc("Gets the details of the Gateway specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the Gateway specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + GatewayContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates or updates a Gateway to be used in Api Management instance.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + GatewayContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates the details of the gateway specified by its identifier.") + update is ArmResourcePatchSync< + GatewayContract, + GatewayContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes specific Gateway.") + delete is ArmResourceDeleteSync< + GatewayContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists a collection of gateways registered with service instance.") + listByService is ArmResourceListByParent< + GatewayContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; + @doc("Retrieves gateway keys.") + listKeys is ArmResourceActionSync; + @doc("Regenerates specified gateway key invalidating any tokens created with it.") + regenerateKey is ArmResourceActionNoContentSync< + GatewayContract, + GatewayKeyRegenerationRequestContract + >; + @doc("Gets the Shared Access Authorization Token for the gateway.") + generateToken is ArmResourceActionSync< + GatewayContract, + GatewayTokenRequestContract, + GatewayTokenContract + >; +} + +@armResourceOperations +interface GatewayApi { + @doc("Lists a collection of the APIs associated with a gateway.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis") + @get + ListByService is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'") + @maxLength(80) + @minLength(1) + @path + gatewayId: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ApiManagementGatewayApiListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp new file mode 100644 index 0000000000..fde6ee1b04 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp @@ -0,0 +1,80 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./GatewayContract.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Gateway hostname configuration details.") +@parentResource(GatewayContract) +model GatewayHostnameConfigurationContract + is ProxyResource { + @doc("Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity.") + @maxLength(80) + @minLength(1) + @path + @key("hcId") + @segment("hostnameConfigurations") + name: string; +} + +@armResourceOperations +interface GatewayHostnameConfiguration { + @doc("Get details of a hostname configuration") + get is ArmResourceRead; + @doc("Checks that hostname configuration entity specified by identifier exists for specified Gateway entity.") + @head + getEntityTag( + ...ResourceInstanceParameters< + GatewayHostnameConfigurationContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates of updates hostname configuration for a Gateway.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + GatewayHostnameConfigurationContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Deletes the specified hostname configuration from the specified Gateway.") + delete is ArmResourceDeleteSync< + GatewayHostnameConfigurationContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists the collection of hostname configurations for the specified gateway.") + listByService is ArmResourceListByParent< + GatewayHostnameConfigurationContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp new file mode 100644 index 0000000000..8e2f4af4d9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp @@ -0,0 +1,79 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Global Schema Contract details.") +@parentResource(ApiManagementServiceResource) +model GlobalSchemaContract is ProxyResource { + @doc("Schema id identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @path + @key("schemaId") + @segment("schemas") + name: string; +} + +@armResourceOperations +interface GlobalSchema { + @doc("Gets the details of the Schema specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the Schema specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + GlobalSchemaContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates new or updates existing specified Schema of the API Management service instance.") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + GlobalSchemaContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Deletes specific Schema.") + delete is ArmResourceDeleteSync< + GlobalSchemaContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists a collection of schemas registered with service instance.") + listByService is ArmResourceListByParent< + GlobalSchemaContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp new file mode 100644 index 0000000000..52e4f203c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp @@ -0,0 +1,133 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Contract details.") +@parentResource(ApiManagementServiceResource) +model GroupContract is ProxyResource { + @doc("Group identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + @key("groupId") + @segment("groups") + name: string; +} + +@armResourceOperations +interface Group { + @doc("Gets the details of the group specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the group specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters>, + ): OkResponse | ErrorResponse; + @doc("Creates or Updates a group.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + GroupContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates the details of the group specified by its identifier.") + update is ArmResourcePatchSync< + GroupContract, + GroupContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes specific group of the API Management service instance.") + delete is ArmResourceDeleteSync< + GroupContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists a collection of groups defined within a service instance.") + listByService is ArmResourceListByParent< + GroupContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | externalId | filter | eq | |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} + +@armResourceOperations +interface GroupUser { + @doc("Lists a collection of user entities associated with the group.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Group identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + groupId: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | registrationDate | filter | ge, le, eq, ne, gt, lt | |
    | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ApiManagementGroupUserListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp new file mode 100644 index 0000000000..e25ce0601e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp @@ -0,0 +1,78 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Identity Provider details.") +@parentResource(ApiManagementServiceResource) +model IdentityProviderContract + is ProxyResource { + @doc("Identity Provider Type identifier.") + @path + @key("identityProviderName") + @segment("identityProviders") + name: IdentityProviderType; +} + +@armResourceOperations +interface IdentityProvider { + @doc("Gets the configuration details of the identity Provider configured in specified service instance.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the identityProvider specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + IdentityProviderContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates or Updates the IdentityProvider configuration.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + IdentityProviderContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates an existing IdentityProvider configuration.") + update is ArmResourcePatchSync< + IdentityProviderContract, + IdentityProviderContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes the specified identity provider configuration.") + delete is ArmResourceDeleteSync< + IdentityProviderContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists a collection of Identity Provider configured in the specified service instance.") + listByService is ArmResourceListByParent; + @doc("Gets the client secret details of the Identity Provider.") + listSecrets is ArmResourceActionSync< + IdentityProviderContract, + void, + ClientSecretContract + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp new file mode 100644 index 0000000000..8faa985bbf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp @@ -0,0 +1,81 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./IssueContract.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Issue Attachment Contract details.") +@parentResource(IssueContract) +model IssueAttachmentContract + is ProxyResource { + @doc("Attachment identifier within an Issue. Must be unique in the current Issue.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + @key("attachmentId") + @segment("attachments") + name: string; +} + +@armResourceOperations +interface ApiIssueAttachment { + @doc("Gets the details of the issue Attachment for an API specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + IssueAttachmentContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates a new Attachment for the Issue in an API or updates an existing one.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + IssueAttachmentContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Deletes the specified comment from an Issue.") + delete is ArmResourceDeleteSync< + IssueAttachmentContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists all attachments for the Issue associated with the specified API.") + listByService is ArmResourceListByParent< + IssueAttachmentContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp new file mode 100644 index 0000000000..9adc87735c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp @@ -0,0 +1,80 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./IssueContract.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Issue Comment Contract details.") +@parentResource(IssueContract) +model IssueCommentContract is ProxyResource { + @doc("Comment identifier within an Issue. Must be unique in the current Issue.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + @key("commentId") + @segment("comments") + name: string; +} + +@armResourceOperations +interface ApiIssueComment { + @doc("Gets the details of the issue Comment for an API specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + IssueCommentContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates a new Comment for the Issue in an API or updates an existing one.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + IssueCommentContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Deletes the specified comment from an Issue.") + delete is ArmResourceDeleteSync< + IssueCommentContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists all comments for the Issue associated with the specified API.") + listByService is ArmResourceListByParent< + IssueCommentContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp new file mode 100644 index 0000000000..e594e8c3e6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp @@ -0,0 +1,102 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiContract.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Issue Contract details.") +@parentResource(ApiContract) +model IssueContract is ProxyResource { + @doc("Issue identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + @key("issueId") + @segment("issues") + name: string; +} + +@armResourceOperations +interface ApiIssue { + @doc("Gets the details of the Issue for an API specified by its identifier.") + get is ArmResourceRead< + IssueContract, + { + ...BaseParameters; + + @doc("Expand the comment attachments. ") + @query("expandCommentsAttachments") + expandCommentsAttachments?: boolean; + } + >; + @doc("Gets the entity state (Etag) version of the Issue for an API specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters>, + ): OkResponse | ErrorResponse; + @doc("Creates a new Issue for an API or updates an existing one.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + IssueContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates an existing issue for an API.") + update is ArmResourcePatchSync< + IssueContract, + IssueContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes the specified Issue from an API.") + delete is ArmResourceDeleteSync< + IssueContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists all issues associated with the specified API.") + listByService is ArmResourceListByParent< + IssueContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    ") + @query("$filter") + $filter?: string; + + @doc("Expand the comment attachments. ") + @query("expandCommentsAttachments") + expandCommentsAttachments?: boolean; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp new file mode 100644 index 0000000000..866bf449c7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp @@ -0,0 +1,91 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Logger details.") +@parentResource(ApiManagementServiceResource) +model LoggerContract is ProxyResource { + @doc("Logger identifier. Must be unique in the API Management service instance.") + @maxLength(256) + @pattern("^[^*#&+:<>?]+$") + @path + @key("loggerId") + @segment("loggers") + name: string; +} + +@armResourceOperations +interface Logger { + @doc("Gets the details of the logger specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the logger specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + LoggerContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates or Updates a logger.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + LoggerContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates an existing logger.") + update is ArmResourcePatchSync< + LoggerContract, + LoggerContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes the specified logger.") + delete is ArmResourceDeleteSync< + LoggerContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists a collection of loggers in the specified service instance.") + listByService is ArmResourceListByParent< + LoggerContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | loggerType | filter | eq | |
    | resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp new file mode 100644 index 0000000000..8fe583a22b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp @@ -0,0 +1,107 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("NamedValue details.") +@parentResource(ApiManagementServiceResource) +model NamedValueContract is ProxyResource { + @doc("Identifier of the NamedValue.") + @maxLength(256) + @pattern("^[^*#&+:<>?]+$") + @path + @key("namedValueId") + @segment("namedValues") + name: string; +} + +@armResourceOperations +interface NamedValue { + @doc("Gets the details of the named value specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the named value specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + NamedValueContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates or updates named value.") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + NamedValueContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates the specific named value.") + update is ArmResourcePatchAsync< + NamedValueContract, + NamedValueContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes specific named value from the API Management service instance.") + delete is ArmResourceDeleteSync< + NamedValueContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists a collection of named values defined within a service instance.") + listByService is ArmResourceListByParent< + NamedValueContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("When set to true, the response contains only named value entities which failed refresh.") + @query("isKeyVaultRefreshFailed") + isKeyVaultRefreshFailed?: boolean; + } + >; + @doc("Gets the secret of the named value specified by its identifier.") + listValue is ArmResourceActionSync< + NamedValueContract, + void, + NamedValueSecretContract + >; + @doc("Refresh the secret of the named value specified by its identifier.") + refreshSecret is ArmResourceActionAsync< + NamedValueContract, + void, + NamedValueContract + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp new file mode 100644 index 0000000000..c1551a9940 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp @@ -0,0 +1,114 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Notification details.") +@parentResource(ApiManagementServiceResource) +model NotificationContract is ProxyResource { + @doc("Notification Name Identifier.") + @path + @key("notificationName") + @segment("notifications") + name: NotificationName; +} + +@armResourceOperations +interface Notification { + @doc("Gets the details of the Notification specified by its identifier.") + get is ArmResourceRead; + @doc("Create or Update API Management publisher notification.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + NotificationContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Lists a collection of properties defined within a service instance.") + listByService is ArmResourceListByParent< + NotificationContract, + { + ...BaseParameters; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} + +@armResourceOperations +interface NotificationRecipientUser { + @doc("Gets the list of the Notification Recipient User subscribed to the notification.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers") + @get + ListByNotification is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Notification Name Identifier.") + @path + notificationName: NotificationName; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + RecipientUserListResult + >; +} + +@armResourceOperations +interface NotificationRecipientEmail { + @doc("Gets the list of the Notification Recipient Emails subscribed to a notification.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails") + @get + ListByNotification is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Notification Name Identifier.") + @path + notificationName: NotificationName; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + RecipientEmailListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp new file mode 100644 index 0000000000..cec6af808c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp @@ -0,0 +1,128 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("OpenId Connect Provider details.") +@parentResource(ApiManagementServiceResource) +model OpenidConnectProviderContract + is ProxyResource { + @doc("Identifier of the OpenID Connect Provider.") + @maxLength(256) + @pattern("^[^*#&+:<>?]+$") + @path + @key("opid") + @segment("openidConnectProviders") + name: string; +} + +@armResourceOperations +interface OpenIdConnectProvider { + @doc("Gets specific OpenID Connect Provider without secrets.") + get is ArmResourceRead< + OpenidConnectProviderContract, + { + ...BaseParameters; + + @doc("Identifier of the OpenID Connect Provider.") + @maxLength(256) + @pattern("^[^*#&+:<>?]+$") + @path + OpenId: string; + } + >; + @doc("Creates or updates the OpenID Connect Provider.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + OpenidConnectProviderContract, + { + ...BaseParameters; + + @doc("Identifier of the OpenID Connect Provider.") + @maxLength(256) + @pattern("^[^*#&+:<>?]+$") + @path + OpenId: string; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates the specific OpenID Connect Provider.") + update is ArmResourcePatchSync< + OpenidConnectProviderContract, + OpenidConnectProviderContractProperties, + { + ...BaseParameters; + + @doc("Identifier of the OpenID Connect Provider.") + @maxLength(256) + @pattern("^[^*#&+:<>?]+$") + @path + OpenId: string; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes specific OpenID Connect Provider of the API Management service instance.") + delete is ArmResourceDeleteSync< + OpenidConnectProviderContract, + { + ...BaseParameters; + + @doc("Identifier of the OpenID Connect Provider.") + @maxLength(256) + @pattern("^[^*#&+:<>?]+$") + @path + OpenId: string; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists of all the OpenId Connect Providers.") + listByService is ArmResourceListByParent< + OpenidConnectProviderContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; + @doc("Gets the client secret details of the OpenID Connect Provider.") + listSecrets is ArmResourceActionSync< + OpenidConnectProviderContract, + void, + ClientSecretContract, + { + ...BaseParameters; + + @doc("Identifier of the OpenID Connect Provider.") + @maxLength(256) + @pattern("^[^*#&+:<>?]+$") + @path + OpenId: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp new file mode 100644 index 0000000000..16720c5bcb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp @@ -0,0 +1,95 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiContract.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("API Operation details.") +@parentResource(ApiContract) +model OperationContract is ProxyResource { + @doc("Operation identifier within an API. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @path + @key("operationId") + @segment("operations") + name: string; +} + +@armResourceOperations +interface ApiOperation { + @doc("Gets the details of the API Operation specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the API operation specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + OperationContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates a new operation in the API or updates an existing one.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + OperationContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates the details of the operation in the API specified by its identifier.") + update is ArmResourcePatchSync< + OperationContract, + OperationContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes the specified operation in the API.") + delete is ArmResourceDeleteSync< + OperationContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists a collection of the operations for the specified API.") + listByApi is ArmResourceListByParent< + OperationContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Include tags in the response.") + @query("tags") + tags?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp new file mode 100644 index 0000000000..20957f0005 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp @@ -0,0 +1,68 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./OperationContract.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Policy Contract details.") +@parentResource(OperationContract) +model PolicyContract is ProxyResource { + @doc("The identifier of the Policy.") + @path + @key("policyId") + @segment("policies") + name: PolicyIdName; +} + +@armResourceOperations +interface ApiOperationPolicy { + @doc("Get the policy configuration at the API Operation level.") + get is ArmResourceRead< + PolicyContract, + { + ...BaseParameters; + + @doc("Policy Export Format.") + @query("format") + format?: PolicyExportFormat = "xml"; + } + >; + @doc("Gets the entity state (Etag) version of the API operation policy specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + PolicyContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates or updates policy configuration for the API Operation level.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + PolicyContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Deletes the policy configuration at the Api Operation.") + delete is ArmResourceDeleteSync< + PolicyContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Get the list of policy configuration at the API Operation level.") + listByOperation is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp new file mode 100644 index 0000000000..aaeff5891b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp @@ -0,0 +1,70 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Delegation settings for a developer portal.") +@singleton("delegation") +@parentResource(ApiManagementServiceResource) +model PortalDelegationSettings + is ProxyResource { + @key("delegation") + @segment("portalsettings") + name: string; +} + +@armResourceOperations +interface DelegationSettings { + @doc("Get Delegation Settings for the Portal.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the DelegationSettings.") + @head + getEntityTag( + ...ResourceInstanceParameters< + PortalDelegationSettings, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Create or Update Delegation settings.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + PortalDelegationSettings, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Update Delegation settings.") + update is ArmResourcePatchSync< + PortalDelegationSettings, + PortalDelegationSettingsProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Gets the secret validation key of the DelegationSettings.") + listSecrets is ArmResourceActionSync< + PortalDelegationSettings, + void, + PortalSettingValidationKeyContract + >; +} + +@armResourceOperations +interface PortalSettings { + @doc("Lists a collection of portalsettings defined within a service instance..") + listByService is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp new file mode 100644 index 0000000000..90ec667f1b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp @@ -0,0 +1,80 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Portal Revision's contract details.") +@parentResource(ApiManagementServiceResource) +model PortalRevisionContract + is ProxyResource { + @doc("Portal revision identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + @key("portalRevisionId") + @segment("portalRevisions") + name: string; +} + +@armResourceOperations +interface PortalRevision { + @doc("Gets the developer portal's revision specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the developer portal revision specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + PortalRevisionContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Updates the description of specified portal revision or makes it current.") + update is ArmResourcePatchAsync< + PortalRevisionContract, + PortalRevisionContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists developer portal's revisions.") + listByService is ArmResourceListByParent< + PortalRevisionContract, + { + ...BaseParameters; + + @doc(""" +| Field | Supported operators | Supported functions | +|-------------|------------------------|-----------------------------------| + +|name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| +|description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| +|isCurrent | eq, ne | | + +""") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp new file mode 100644 index 0000000000..20c8d900f3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp @@ -0,0 +1,63 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Sign-In settings for the Developer Portal.") +@singleton("signin") +@parentResource(ApiManagementServiceResource) +model PortalSigninSettings is ProxyResource { + @key("signin") + @segment("portalsettings") + name: string; +} + +@armResourceOperations +interface SignInSettings { + @doc("Get Sign In Settings for the Portal") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the SignInSettings.") + @head + getEntityTag( + ...ResourceInstanceParameters< + PortalSigninSettings, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Create or Update Sign-In settings.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + PortalSigninSettings, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Update Sign-In settings.") + update is ArmResourcePatchSync< + PortalSigninSettings, + PortalSigninSettingProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; +} + +@armResourceOperations +interface PortalSettings { + @doc("Lists a collection of portalsettings defined within a service instance..") + listByService is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp new file mode 100644 index 0000000000..da59323ae8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp @@ -0,0 +1,63 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Sign-Up settings for a developer portal.") +@singleton("signup") +@parentResource(ApiManagementServiceResource) +model PortalSignupSettings is ProxyResource { + @key("signup") + @segment("portalsettings") + name: string; +} + +@armResourceOperations +interface SignUpSettings { + @doc("Get Sign Up Settings for the Portal") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the SignUpSettings.") + @head + getEntityTag( + ...ResourceInstanceParameters< + PortalSignupSettings, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Create or Update Sign-Up settings.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + PortalSignupSettings, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Update Sign-Up settings.") + update is ArmResourcePatchSync< + PortalSignupSettings, + PortalSignupSettingsProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; +} + +@armResourceOperations +interface PortalSettings { + @doc("Lists a collection of portalsettings defined within a service instance..") + listByService is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp new file mode 100644 index 0000000000..35f161ae69 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp @@ -0,0 +1,34 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("The Private Endpoint Connection resource.") +@parentResource(ApiManagementServiceResource) +model PrivateEndpointConnection + is ProxyResource { + @doc("Name of the private endpoint connection.") + @path + @key("privateEndpointConnectionName") + @segment("privateEndpointConnections") + name: string; +} + +@armResourceOperations +interface PrivateEndpointConnection { + @doc("Gets the details of the Private Endpoint Connection specified by its identifier.") + getByName is ArmResourceRead; + @doc("Creates a new Private Endpoint Connection or updates an existing one.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Deletes the specified Private Endpoint Connection.") + delete is ArmResourceDeleteAsync; + @doc("Lists all private endpoint connections of the API Management service instance.") + listByService is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp new file mode 100644 index 0000000000..3e381b6a94 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp @@ -0,0 +1,29 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("A private link resource") +@parentResource(ApiManagementServiceResource) +model PrivateLinkResource is ProxyResource { + @doc("Name of the private link resource.") + @path + @key("privateLinkSubResourceName") + @segment("privateLinkResources") + name: string; +} + +@armResourceOperations +interface PrivateEndpointConnection { + @doc("Gets the private link resources") + getPrivateLinkResource is ArmResourceRead; + @doc("Gets the private link resources") + listPrivateLinkResources is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp new file mode 100644 index 0000000000..0cf3757c56 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp @@ -0,0 +1,238 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Product details.") +@parentResource(ApiManagementServiceResource) +model ProductContract is ProxyResource { + @doc("Product identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + @key("productId") + @segment("products") + name: string; +} + +@armResourceOperations +interface Product { + @doc("Gets the details of the product specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the product specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + ProductContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates or Updates a product.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + ProductContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Update existing product details.") + update is ArmResourcePatchSync< + ProductContract, + ProductContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Delete product.") + delete is ArmResourceDeleteSync< + ProductContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + + @doc("Delete existing subscriptions associated with the product or not.") + @query("deleteSubscriptions") + deleteSubscriptions?: boolean; + } + >; + @doc("Lists a collection of products in the specified service instance.") + listByService is ArmResourceListByParent< + ProductContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | groups | expand | | |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("When set to true, the response contains an array of groups that have visibility to the product. The default is false.") + @query("expandGroups") + expandGroups?: boolean; + + @doc("Products which are part of a specific tag.") + @query("tags") + tags?: string; + } + >; +} + +@armResourceOperations +interface ProductApi { + @doc("Lists a collection of the APIs associated with a product.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis") + @get + ListByProduct is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Product identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + productId: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ApiManagementProductApiListResult + >; +} + +@armResourceOperations +interface ProductGroup { + @doc("Lists the collection of developer groups associated with the specified product.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups") + @get + ListByProduct is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Product identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + productId: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | |
    | displayName | filter | eq, ne | |
    | description | filter | eq, ne | |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ApiManagementProductGroupListResult + >; +} + +@armResourceOperations +interface ProductSubscriptions { + @doc("Lists the collection of subscriptions to the specified product.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Product identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + productId: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | user | expand | | |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + SubscriptionListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp new file mode 100644 index 0000000000..a1234185e1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp @@ -0,0 +1,83 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiContract.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("API Schema Contract details.") +@parentResource(ApiContract) +model SchemaContract is ProxyResource { + @doc("Schema id identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @path + @key("schemaId") + @segment("schemas") + name: string; +} + +@armResourceOperations +interface ApiSchema { + @doc("Get the schema configuration at the API level.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the schema specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + SchemaContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates or updates schema configuration for the API.") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + SchemaContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Deletes the schema configuration at the Api.") + delete is ArmResourceDeleteSync< + SchemaContract, + { + ...BaseParameters; + + @doc("If true removes all references to the schema before deleting it.") + @query("force") + force?: boolean; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Get the schema configuration at the API level.") + listByApi is ArmResourceListByParent< + SchemaContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp new file mode 100644 index 0000000000..ae6f58e442 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp @@ -0,0 +1,129 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Subscription details.") +@parentResource(ApiManagementServiceResource) +model SubscriptionContract is ProxyResource { + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + @key("subscriptionId") + @segment("subscriptions") + name: string; +} + +@armResourceOperations +interface Subscription { + @doc("Gets the specified Subscription entity.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + SubscriptionContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Creates or updates the subscription of specified user to the specified product.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + SubscriptionContract, + { + ...BaseParameters; + + @doc(""" +Notify change in Subscription State. + - If false, do not send any email notification for change of state of subscription + - If true, send email notification of change of state of subscription +""") + @query("notify") + notify?: boolean; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + + @doc("Determines the type of application which send the create user request. Default is legacy publisher portal.") + @query("appType") + appType?: AppType; + } + >; + @doc("Updates the details of a subscription specified by its identifier.") + update is ArmResourcePatchSync< + SubscriptionContract, + SubscriptionContractProperties, + { + ...BaseParameters; + + @doc(""" +Notify change in Subscription State. + - If false, do not send any email notification for change of state of subscription + - If true, send email notification of change of state of subscription +""") + @query("notify") + notify?: boolean; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + + @doc("Determines the type of application which send the create user request. Default is legacy publisher portal.") + @query("appType") + appType?: AppType; + } + >; + @doc("Deletes the specified subscription.") + delete is ArmResourceDeleteSync< + SubscriptionContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists all subscriptions of the API Management service instance.") + list is ArmResourceListByParent< + SubscriptionContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | user | expand | | |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; + @doc("Regenerates primary key of existing subscription of the API Management service instance.") + regeneratePrimaryKey is ArmResourceActionNoContentSync< + SubscriptionContract, + void + >; + @doc("Regenerates secondary key of existing subscription of the API Management service instance.") + regenerateSecondaryKey is ArmResourceActionNoContentSync< + SubscriptionContract, + void + >; + @doc("Gets the specified Subscription keys.") + listSecrets is ArmResourceActionSync< + SubscriptionContract, + void, + SubscriptionKeysContract + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp new file mode 100644 index 0000000000..a097bb29b8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp @@ -0,0 +1,59 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./OperationContract.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Tag Contract details.") +@parentResource(OperationContract) +model TagContract is ProxyResource { + @doc("Tag identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + @key("tagId") + @segment("tags") + name: string; +} + +@armResourceOperations +interface Tag { + @doc("Get tag associated with the Operation.") + getByOperation is ArmResourceRead; + @doc("Gets the entity state version of the tag specified by its identifier.") + @head + getEntityStateByOperation( + ...ResourceInstanceParameters>, + ): OkResponse | ErrorResponse; + @doc("Assign tag to the Operation.") + assignToOperation is ArmResourceCreateOrReplaceSync; + @doc("Detach the tag from the Operation.") + detachFromOperation is ArmResourceDeleteSync; + @doc("Lists all Tags associated with the Operation.") + listByOperation is ArmResourceListByParent< + TagContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp new file mode 100644 index 0000000000..83ebe38e74 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp @@ -0,0 +1,81 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiContract.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Contract details.") +@parentResource(ApiContract) +model TagDescriptionContract + is ProxyResource { + @doc("Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + @key("tagDescriptionId") + @segment("tagDescriptions") + name: string; +} + +@armResourceOperations +interface ApiTagDescription { + @doc("Get Tag description in scope of API") + get is ArmResourceRead; + @doc("Gets the entity state version of the tag specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters< + TagDescriptionContract, + BaseParameters + >, + ): OkResponse | ErrorResponse; + @doc("Create/Update tag description in scope of the Api.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + TagDescriptionContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Delete tag description for the Api.") + delete is ArmResourceDeleteSync< + TagDescriptionContract, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations") + listByService is ArmResourceListByParent< + TagDescriptionContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp new file mode 100644 index 0000000000..264031e060 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp @@ -0,0 +1,39 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("Tenant Settings.") +@parentResource(ApiManagementServiceResource) +model TenantSettingsContract + is ProxyResource { + @doc("The identifier of the settings.") + @path + @key("settingsType") + @segment("settings") + name: SettingsTypeName; +} + +@armResourceOperations +interface TenantSettings { + @doc("Get tenant settings.") + get is ArmResourceRead; + @doc("Public settings.") + listByService is ArmResourceListByParent< + TenantSettingsContract, + { + ...BaseParameters; + + @doc("Not used") + @query("$filter") + $filter?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp new file mode 100644 index 0000000000..22a10aaa7e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp @@ -0,0 +1,213 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ApiManagementServiceResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; +@doc("User details.") +@parentResource(ApiManagementServiceResource) +model UserContract is ProxyResource { + @doc("User identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @path + @key("userId") + @segment("users") + name: string; +} + +@armResourceOperations +interface User { + @doc("Gets the details of the user specified by its identifier.") + get is ArmResourceRead; + @doc("Gets the entity state (Etag) version of the user specified by its identifier.") + @head + getEntityTag( + ...ResourceInstanceParameters>, + ): OkResponse | ErrorResponse; + @doc("Creates or Updates a user.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + UserContract, + { + ...BaseParameters; + + @doc("Send an Email notification to the User.") + @query("notify") + notify?: boolean; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + } + >; + @doc("Updates the details of the user specified by its identifier.") + update is ArmResourcePatchSync< + UserContract, + UserContractProperties, + { + ...BaseParameters; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + } + >; + @doc("Deletes specific user.") + delete is ArmResourceDeleteSync< + UserContract, + { + ...BaseParameters; + + @doc("Whether to delete user's subscription or not.") + @query("deleteSubscriptions") + deleteSubscriptions?: boolean; + + @doc("Send an Account Closed Email notification to the User.") + @query("notify") + notify?: boolean; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + + @doc("Determines the type of application which send the create user request. Default is legacy publisher portal.") + @query("appType") + appType?: AppType; + } + >; + @doc("Lists a collection of registered users in the specified service instance.") + listByService is ArmResourceListByParent< + UserContract, + { + ...BaseParameters; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | registrationDate | filter | ge, le, eq, ne, gt, lt | |
    | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | groups | expand | | |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Detailed Group in response.") + @query("expandGroups") + expandGroups?: boolean; + } + >; + @doc("Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal.") + generateSsoUrl is ArmResourceActionSync< + UserContract, + void, + GenerateSsoUrlResult + >; + @doc("Gets the Shared Access Authorization Token for the User.") + getSharedAccessToken is ArmResourceActionSync< + UserContract, + UserTokenParameters, + UserTokenResult + >; +} + +@armResourceOperations +interface UserConfirmationPassword { + @doc("Sends confirmation") + send is ArmResourceActionNoContentSync< + UserContract, + void, + { + ...BaseParameters; + + @doc("Determines the type of application which send the create user request. Default is legacy publisher portal.") + @query("appType") + appType?: AppType; + } + >; +} + +@armResourceOperations +interface UserGroup { + @doc("Lists all user groups.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("User identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @path + userId: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|------------------------|-----------------------------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + GroupListResult + >; +} + +@armResourceOperations +interface UserIdentities { + @doc("List of all user identities.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("User identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @path + userId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + UserIdentityListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp new file mode 100644 index 0000000000..37b1750145 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp @@ -0,0 +1,77 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./ApiContract.tsp"; +import "./ApiReleaseContract.tsp"; +import "./OperationContract.tsp"; +import "./PolicyContract.tsp"; +import "./PolicyContract.tsp"; +import "./PolicyContract.tsp"; +import "./PolicyContract.tsp"; +import "./TagContract.tsp"; +import "./TagContract.tsp"; +import "./TagContract.tsp"; +import "./TagContract.tsp"; +import "./SchemaContract.tsp"; +import "./DiagnosticContract.tsp"; +import "./DiagnosticContract.tsp"; +import "./IssueContract.tsp"; +import "./IssueContract.tsp"; +import "./IssueCommentContract.tsp"; +import "./IssueAttachmentContract.tsp"; +import "./TagDescriptionContract.tsp"; +import "./ApiVersionSetContract.tsp"; +import "./AuthorizationServerContract.tsp"; +import "./BackendContract.tsp"; +import "./CacheContract.tsp"; +import "./CertificateContract.tsp"; +import "./DeletedServiceContract.tsp"; +import "./ApiManagementServiceResource.tsp"; +import "./EmailTemplateContract.tsp"; +import "./GatewayContract.tsp"; +import "./GatewayHostnameConfigurationContract.tsp"; +import "./GatewayCertificateAuthorityContract.tsp"; +import "./GroupContract.tsp"; +import "./IdentityProviderContract.tsp"; +import "./LoggerContract.tsp"; +import "./NamedValueContract.tsp"; +import "./NotificationContract.tsp"; +import "./OpenidConnectProviderContract.tsp"; +import "./PortalRevisionContract.tsp"; +import "./PortalSigninSettings.tsp"; +import "./PortalSignupSettings.tsp"; +import "./PortalDelegationSettings.tsp"; +import "./PrivateEndpointConnection.tsp"; +import "./PrivateLinkResource.tsp"; +import "./ProductContract.tsp"; +import "./GlobalSchemaContract.tsp"; +import "./TenantSettingsContract.tsp"; +import "./SubscriptionContract.tsp"; +import "./SubscriptionContract.tsp"; +import "./AccessInformationContract.tsp"; +import "./UserContract.tsp"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "ApiManagementClient", +}) +@versioned(Versions) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v2) +@doc("ApiManagement Client") +namespace Azure.ResourceManager.ApiManagement; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2021_08_01: "2021-08-01", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp new file mode 100644 index 0000000000..9af6ebe1e5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp @@ -0,0 +1,3834 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.ApiManagement; + +interface Operations extends Azure.ResourceManager.Operations {} + +enum Protocol { + http, + https, + ws, + wss, +} + +enum VersioningScheme { + Segment, + Query, + Header, +} + +enum BearerTokenSendingMethod { + authorizationHeader, + query, +} + +enum ApiType { + http, + soap, + websocket, + graphql, +} + +enum ContentFormat { + @doc("The contents are inline and Content type is a WADL document.") + `wadl-xml`, + @doc("The WADL document is hosted on a publicly accessible internet address.") + `wadl-link-json`, + @doc("The contents are inline and Content Type is a OpenAPI 2.0 JSON Document.") + `swagger-json`, + @doc("The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address.") + `swagger-link-json`, + @doc("The contents are inline and the document is a WSDL/Soap document.") + wsdl, + @doc("The WSDL document is hosted on a publicly accessible internet address.") + `wsdl-link`, + @doc("The contents are inline and Content Type is a OpenAPI 3.0 YAML Document.") + openapi, + @doc("The contents are inline and Content Type is a OpenAPI 3.0 JSON Document.") + `openapi+json`, + @doc("The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address.") + `openapi-link`, + @doc("The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address.") + `openapi+json-link`, + @doc("The GraphQL API endpoint hosted on a publicly accessible internet address.") + `graphql-link`, +} + +enum SoapApiType { + @doc("Imports a SOAP API having a RESTful front end.") SoapToRest: "http", + @doc("Imports the SOAP API having a SOAP front end.") SoapPassThrough: "soap", + @doc("Imports the API having a Websocket front end.") WebSocket: "websocket", + @doc("Imports the API having a GraphQL front end.") GraphQL: "graphql", +} + +enum PolicyContentFormat { + @doc("The contents are inline and Content type is an XML document.") xml, + @doc("The policy XML document is hosted on a http endpoint accessible from the API Management service.") + `xml-link`, + @doc("The contents are inline and Content type is a non XML encoded policy document.") + rawxml, + @doc("The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service.") + `rawxml-link`, +} + +enum PolicyIdName { + policy, +} + +enum PolicyExportFormat { + @doc("The contents are inline and Content type is an XML document.") xml, + @doc("The contents are inline and Content type is a non XML encoded policy document.") + rawxml, +} + +enum AlwaysLog { + @doc("Always log all erroneous request regardless of sampling settings.") + allErrors, +} + +enum SamplingType { + @doc("Fixed-rate sampling.") fixed, +} + +enum DataMaskingMode { + @doc("Mask the value of an entity.") Mask, + @doc("Hide the presence of an entity.") Hide, +} + +enum HttpCorrelationProtocol { + @doc("Do not read and inject correlation headers.") None, + @doc("Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md.") + Legacy, + @doc("Inject Trace Context headers. See https://w3c.github.io/trace-context.") + W3C, +} + +enum Verbosity { + @doc("All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance.") + verbose, + @doc("Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance.") + information, + @doc("Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance.") + error, +} + +enum OperationNameFormat { + @doc("API_NAME;rev=API_REVISION - OPERATION_NAME") Name, + @doc("HTTP_VERB URL") Url, +} + +enum State { + @doc("The issue is proposed.") proposed, + @doc("The issue is opened.") open, + @doc("The issue was removed.") removed, + @doc("The issue is now resolved.") resolved, + @doc("The issue was closed.") closed, +} + +enum ExportFormat { + @doc("Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob.") + Swagger: "swagger-link", + @doc("Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap`") + Wsdl: "wsdl-link", + @doc("Export the Api Definition in WADL Schema to Storage Blob.") + Wadl: "wadl-link", + @doc("Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob.") + Openapi: "openapi-link", + @doc("Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob.") + OpenapiJson: "openapi+json-link", +} + +enum ExportApi { + `true`, +} + +enum ExportResultFormat { + @doc("The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob.") + Swagger: "swagger-link-json", + @doc("The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap`") + Wsdl: "wsdl-link+xml", + @doc("Export the API Definition in WADL Schema to Storage Blob.") + Wadl: "wadl-link-json", + @doc("Export the API Definition in OpenAPI Specification 3.0 to Storage Blob.") + OpenApi: "openapi-link", +} + +enum GrantType { + @doc("Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1.") + authorizationCode, + @doc("Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2.") + implicit, + @doc("Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3.") + resourceOwnerPassword, + @doc("Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4.") + clientCredentials, +} + +enum ClientAuthenticationMethod { + @doc("Basic Client Authentication method.") Basic, + @doc("Body based Authentication method.") Body, +} + +enum BackendProtocol { + @doc("The Backend is a RESTful service.") http, + @doc("The Backend is a SOAP service.") soap, +} + +enum PreferredIPVersion { + IPv4, +} + +enum ConnectivityCheckProtocol { + TCP, + HTTP, + HTTPS, +} + +enum Method { + GET, + POST, +} + +enum Origin { + Local, + Inbound, + Outbound, +} + +enum Severity { + Error, + Warning, +} + +enum IssueType { + Unknown, + AgentStopped, + GuestFirewall, + DnsResolution, + SocketBind, + NetworkSecurityRule, + UserDefinedRoute, + PortThrottled, + Platform, +} + +enum ConnectionStatus { + Unknown, + Connected, + Disconnected, + Degraded, +} + +enum SkuType { + @doc("Developer SKU of Api Management.") Developer, + @doc("Standard SKU of Api Management.") Standard, + @doc("Premium SKU of Api Management.") Premium, + @doc("Basic SKU of Api Management.") Basic, + @doc("Consumption SKU of Api Management.") Consumption, + @doc("Isolated SKU of Api Management.") Isolated, +} + +enum ResourceSkuCapacityScaleType { + @doc("Supported scale type automatic.") automatic, + @doc("Supported scale type manual.") manual, + @doc("Scaling not supported.") none, +} + +enum AccessType { + @doc("Use access key.") AccessKey, + @doc("Use system assigned managed identity.") SystemAssignedManagedIdentity, + @doc("Use user assigned managed identity.") UserAssignedManagedIdentity, +} + +enum HostnameType { + Proxy, + Portal, + Management, + Scm, + DeveloperPortal, +} + +enum CertificateSource { + Managed, + KeyVault, + Custom, + BuiltIn, +} + +enum CertificateStatus { + Completed, + Failed, + InProgress, +} + +enum PublicNetworkAccess { + Enabled, + Disabled, +} + +enum PlatformVersion { + @doc("Platform version cannot be determined, as compute platform is not deployed.") + undetermined, + @doc("Platform running the service on Single Tenant V1 platform.") stv1, + @doc("Platform running the service on Single Tenant V2 platform.") stv2, + @doc("Platform running the service on Multi Tenant V1 platform.") mtv1, +} + +enum CertificateConfigurationStoreName { + CertificateAuthority, + Root, +} + +enum VirtualNetworkType { + @doc("The service is not part of any Virtual Network.") None, + @doc("The service is part of Virtual Network and it is accessible from Internet.") + External, + @doc("The service is part of Virtual Network and it is only accessible from within the virtual network.") + Internal, +} + +enum PrivateEndpointServiceConnectionStatus { + Pending, + Approved, + Rejected, +} + +enum ApimIdentityType { + SystemAssigned, + UserAssigned, + `SystemAssigned, UserAssigned`, + None, +} + +enum CreatedByType { + User, + Application, + ManagedIdentity, + Key, +} + +enum TemplateName { + applicationApprovedNotificationMessage, + accountClosedDeveloper, + quotaLimitApproachingDeveloperNotificationMessage, + newDeveloperNotificationMessage, + emailChangeIdentityDefault, + inviteUserNotificationMessage, + newCommentNotificationMessage, + confirmSignUpIdentityDefault, + newIssueNotificationMessage, + purchaseDeveloperNotificationMessage, + passwordResetIdentityDefault, + passwordResetByAdminNotificationMessage, + rejectDeveloperNotificationMessage, + requestDeveloperNotificationMessage, +} + +enum UserState { + @doc("User state is active.") active, + @doc("User is blocked. Blocked users cannot authenticate at developer portal or call API.") + blocked, + @doc("User account is pending. Requires identity confirmation before it can be made active.") + pending, + @doc("User account is closed. All identities and related entities are removed.") + deleted, +} + +enum IdentityProviderType { + @doc("Facebook as Identity provider.") facebook, + @doc("Google as Identity provider.") google, + @doc("Microsoft Live as Identity provider.") microsoft, + @doc("Twitter as Identity provider.") twitter, + @doc("Azure Active Directory as Identity provider.") aad, + @doc("Azure Active Directory B2C as Identity provider.") aadB2C, +} + +enum LoggerType { + @doc("Azure Event Hub as log destination.") azureEventHub, + @doc("Azure Application Insights as log destination.") applicationInsights, + @doc("Azure Monitor") azureMonitor, +} + +enum ConnectivityStatusType { + initializing, + success, + failure, +} + +enum NotificationName { + @doc("The following email recipients and users will receive email notifications about subscription requests for API products requiring approval.") + RequestPublisherNotificationMessage, + @doc("The following email recipients and users will receive email notifications about new API product subscriptions.") + PurchasePublisherNotificationMessage, + @doc("The following email recipients and users will receive email notifications when new applications are submitted to the application gallery.") + NewApplicationNotificationMessage, + @doc("The following recipients will receive blind carbon copies of all emails sent to developers.") + BCC, + @doc("The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal.") + NewIssuePublisherNotificationMessage, + @doc("The following email recipients and users will receive email notifications when developer closes his account.") + AccountClosedPublisher, + @doc("The following email recipients and users will receive email notifications when subscription usage gets close to usage quota.") + QuotaLimitApproachingPublisherNotificationMessage, +} + +enum PortalRevisionStatus { + @doc("Portal's revision has been queued.") pending, + @doc("Portal's revision is being published.") publishing, + @doc("Portal's revision publishing completed.") completed, + @doc("Portal's revision publishing failed.") failed, +} + +enum PrivateEndpointConnectionProvisioningState { + Succeeded, + Creating, + Deleting, + Failed, +} + +enum SchemaType { + @doc("Xml schema type.") Xml: "xml", + @doc("Json schema type.") Json: "json", +} + +enum SettingsTypeName { + public, +} + +enum AppType { + @doc("User create request was sent by legacy developer portal.") portal, + @doc("User create request was sent by new developer portal.") developerPortal, +} + +enum AccessIdName { + access, + gitAccess, +} + +enum ConfigurationIdName { + configuration, +} + +enum Confirmation { + @doc("Send an e-mail to the user confirming they have successfully signed up.") + signup, + @doc("Send an e-mail inviting the user to sign-up and complete registration.") + invite, +} +@Azure.Core.fixed +enum ProductState { + notPublished, + published, +} +@Azure.Core.fixed +enum AuthorizationMethod { + HEAD, + OPTIONS, + TRACE, + GET, + POST, + PUT, + PATCH, + DELETE, +} +@Azure.Core.fixed +enum NameAvailabilityReason { + Valid, + Invalid, + AlreadyExists, +} +@Azure.Core.fixed +enum GatewayRegenerateKeyType { + primary, + secondary, +} +@Azure.Core.fixed +enum KeyType { + primary, + secondary, +} +@Azure.Core.fixed +enum GroupType { + custom, + system, + external, +} +@Azure.Core.fixed +enum PolicyScopeContract { + Tenant, + Product, + Api, + Operation, + All, +} +@Azure.Core.fixed +enum SubscriptionState { + suspended, + active, + expired, + submitted, + rejected, + cancelled, +} +@Azure.Core.fixed +enum ApiManagementSkuCapacityScaleType { + Automatic, + Manual, + None, +} +@Azure.Core.fixed +enum ApiManagementSkuRestrictionsType { + Location, + Zone, +} +@Azure.Core.fixed +enum ApiManagementSkuRestrictionsReasonCode { + QuotaId, + NotAvailableForSubscription, +} +@Azure.Core.fixed +enum AsyncOperationStatus { + Started, + InProgress, + Succeeded, + Failed, +} + +@doc("API Entity Properties") +model ApiContractProperties extends ApiEntityBaseContract { + @doc("API identifier of the source API.") + sourceApiId?: string; + + @doc("API name. Must be 1 to 300 characters long.") + @maxLength(300) + @minLength(1) + displayName?: string; + + @doc("Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.") + @maxLength(2000) + serviceUrl?: string; + + @doc("Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.") + @maxLength(400) + path: string; + + @doc("Describes on which protocols the operations in this API can be invoked.") + protocols?: Protocol[]; + + @doc("Version set details") + apiVersionSet?: ApiVersionSetContractDetails; +} + +@doc("An API Version Set contains the common configuration for a set of API Versions relating ") +model ApiVersionSetContractDetails { + @doc("Identifier for existing API Version Set. Omit this value to create a new Version Set.") + id?: string; + + @doc("The display Name of the API Version Set.") + name?: string; + + @doc("Description of API Version Set.") + description?: string; + + @doc("An value that determines where the API Version identifier will be located in a HTTP request.") + versioningScheme?: VersioningScheme; + + @doc("Name of query parameter that indicates the API Version if versioningScheme is set to `query`.") + versionQueryName?: string; + + @doc("Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.") + versionHeaderName?: string; +} + +@doc("API base contract details.") +model ApiEntityBaseContract { + @doc("Description of the API. May include HTML formatting tags.") + description?: string; + + @doc("Collection of authentication settings included into this API.") + authenticationSettings?: AuthenticationSettingsContract; + + @doc("Protocols over which API is made available.") + subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; + + @doc("Type of API.") + @projectedName("json", "type") + apiType?: ApiType; + + @doc("Describes the revision of the API. If no value is provided, default revision 1 is created") + @maxLength(100) + @minLength(1) + apiRevision?: string; + + @doc("Indicates the version identifier of the API if the API is versioned") + @maxLength(100) + apiVersion?: string; + + @doc("Indicates if API revision is current api revision.") + isCurrent?: boolean; + + @doc("Indicates if API revision is accessible via the gateway.") + @visibility("read") + isOnline?: boolean; + + @doc("Description of the API Revision.") + @maxLength(256) + apiRevisionDescription?: string; + + @doc("Description of the API Version.") + @maxLength(256) + apiVersionDescription?: string; + + @doc("A resource identifier for the related ApiVersionSet.") + apiVersionSetId?: string; + + @doc("Specifies whether an API or Product subscription is required for accessing the API.") + @projectedName("json", "subscriptionRequired") + IsSubscriptionRequired?: boolean; + + @doc(" A URL to the Terms of Service for the API. MUST be in the format of a URL.") + termsOfServiceUrl?: string; + + @doc("Contact information for the API.") + contact?: ApiContactInformation; + + @doc("License information for the API.") + license?: ApiLicenseInformation; +} + +@doc("API Authentication Settings.") +model AuthenticationSettingsContract { + @doc("OAuth2 Authentication settings") + oAuth2?: OAuth2AuthenticationSettingsContract; + + @doc("OpenID Connect Authentication Settings") + openid?: OpenIdAuthenticationSettingsContract; +} + +@doc("API OAuth2 Authentication settings details.") +model OAuth2AuthenticationSettingsContract { + @doc("OAuth authorization server identifier.") + authorizationServerId?: string; + + @doc("operations scope.") + scope?: string; +} + +@doc("API OAuth2 Authentication settings details.") +model OpenIdAuthenticationSettingsContract { + @doc("OAuth authorization server identifier.") + openidProviderId?: string; + + @doc("How to send token to the server.") + bearerTokenSendingMethods?: BearerTokenSendingMethod[]; +} + +@doc("Subscription key parameter names details.") +model SubscriptionKeyParameterNamesContract { + @doc("Subscription key header name.") + header?: string; + + @doc("Subscription key query string parameter name.") + query?: string; +} + +@doc("API contact information") +model ApiContactInformation { + @doc("The identifying name of the contact person/organization") + name?: string; + + @doc("The URL pointing to the contact information. MUST be in the format of a URL") + url?: string; + + @doc("The email address of the contact person/organization. MUST be in the format of an email address") + email?: string; +} + +@doc("API license information") +model ApiLicenseInformation { + @doc("The license name used for the API") + name?: string; + + @doc("A URL to the license used for the API. MUST be in the format of a URL") + url?: string; +} + +@doc("Error Body contract.") +model ErrorResponseBody { + @doc("Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.") + code?: string; + + @doc("Human-readable representation of the error.") + message?: string; + + @doc("The list of invalid fields send in request, in case of validation error.") + details?: ErrorFieldContract[]; +} + +@doc("Error Field contract.") +model ErrorFieldContract { + @doc("Property level error code.") + code?: string; + + @doc("Human-readable representation of property-level error.") + message?: string; + + @doc("Property name.") + target?: string; +} + +@doc("API Create or Update Parameters.") +model ApiCreateOrUpdateParameter { + @doc("API entity create of update properties.") + properties?: ApiCreateOrUpdateProperties; +} + +@doc("API Create or Update Properties.") +model ApiCreateOrUpdateProperties extends ApiContractProperties { + @doc("Content value when Importing an API.") + value?: string; + + @doc("Format of the Content in which the API is getting imported.") + format?: ContentFormat; + + @doc("Criteria to limit import of WSDL to a subset of the document.") + wsdlSelector?: ApiCreateOrUpdatePropertiesWsdlSelector; + + @doc(""" +Type of API to create. + * `http` creates a REST API + * `soap` creates a SOAP pass-through API + * `websocket` creates websocket API + * `graphql` creates GraphQL API. +""") + @projectedName("json", "apiType") + soapApiType?: SoapApiType; +} + +@doc("Criteria to limit import of WSDL to a subset of the document.") +model ApiCreateOrUpdatePropertiesWsdlSelector { + @doc("Name of service to import from WSDL") + wsdlServiceName?: string; + + @doc("Name of endpoint(port) to import from WSDL") + wsdlEndpointName?: string; +} + +@doc("Paged API Revision list representation.") +model ApiRevisionListResult is Azure.Core.Page { + @doc("Total record count number across all pages.") + count?: int32; +} + +@doc("Summary of revision metadata.") +model ApiRevisionContract { + @doc("Identifier of the API Revision.") + @visibility("read") + apiId?: string; + + @doc("Revision number of API.") + @visibility("read") + @maxLength(100) + @minLength(1) + apiRevision?: string; + + @doc("The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDateTime?: utcDateTime; + + @doc("The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + updatedDateTime?: utcDateTime; + + @doc("Description of the API Revision.") + @visibility("read") + @maxLength(256) + description?: string; + + @doc("Gateway URL for accessing the non-current API Revision.") + @visibility("read") + privateUrl?: string; + + @doc("Indicates if API revision is the current api revision.") + @visibility("read") + isOnline?: boolean; + + @doc("Indicates if API revision is accessible via the gateway.") + @visibility("read") + isCurrent?: boolean; +} + +@doc("API Release details") +model ApiReleaseContractProperties { + @doc("Identifier of the API the release belongs to.") + apiId?: string; + + @doc("The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDateTime?: utcDateTime; + + @doc("The time the API release was updated.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + updatedDateTime?: utcDateTime; + + @doc("Release Notes") + notes?: string; +} + +@doc("Operation Contract Properties") +model OperationContractProperties extends OperationEntityBaseContract { + @doc("Operation Name.") + @maxLength(300) + @minLength(1) + displayName: string; + + @doc("A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.") + method: string; + + @doc("Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}") + @maxLength(1000) + @minLength(1) + urlTemplate: string; +} + +@doc("API Operation Entity Base Contract details.") +model OperationEntityBaseContract { + @doc("Collection of URL template parameters.") + templateParameters?: ParameterContract[]; + + @doc("Description of the operation. May include HTML formatting tags.") + @maxLength(1000) + description?: string; + + @doc("An entity containing request details.") + request?: RequestContract; + + @doc("Array of Operation responses.") + responses?: ResponseContract[]; + + @doc("Operation Policies") + policies?: string; +} + +@doc("Operation parameters details.") +model ParameterContract { + @doc("Parameter name.") + name: string; + + @doc("Parameter description.") + description?: string; + + @doc("Parameter type.") + type: string; + + @doc("Default parameter value.") + defaultValue?: string; + + @doc("Specifies whether parameter is required or not.") + required?: boolean; + + @doc("Parameter values.") + values?: string[]; + + @doc("Schema identifier.") + schemaId?: string; + + @doc("Type name defined by the schema.") + typeName?: string; + + @doc("Exampled defined for the parameter.") + examples?: Record; +} + +@doc("Parameter example.") +model ParameterExampleContract { + @doc("Short description for the example") + summary?: string; + + @doc("Long description for the example") + description?: string; + + @doc("Example value. May be a primitive value, or an object.") + value?: unknown; + + @doc("A URL that points to the literal example") + externalValue?: string; +} + +@doc("Operation request details.") +model RequestContract { + @doc("Operation request description.") + description?: string; + + @doc("Collection of operation request query parameters.") + queryParameters?: ParameterContract[]; + + @doc("Collection of operation request headers.") + headers?: ParameterContract[]; + + @doc("Collection of operation request representations.") + representations?: RepresentationContract[]; +} + +@doc("Operation request/response representation details.") +model RepresentationContract { + @doc("Specifies a registered or custom content type for this representation, e.g. application/xml.") + contentType: string; + + @doc("Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.") + schemaId?: string; + + @doc("Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.") + typeName?: string; + + @doc("Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..") + formParameters?: ParameterContract[]; + + @doc("Exampled defined for the representation.") + examples?: Record; +} + +@doc("Operation response details.") +model ResponseContract { + @doc("Operation response HTTP status code.") + statusCode: int32; + + @doc("Operation response description.") + description?: string; + + @doc("Collection of operation response representations.") + representations?: RepresentationContract[]; + + @doc("Collection of operation response headers.") + headers?: ParameterContract[]; +} + +@doc("Policy contract Properties.") +model PolicyContractProperties { + @doc("Contents of the Policy as defined by the format.") + value: string; + + @doc("Format of the policyContent.") + format?: PolicyContentFormat; +} + +@doc("Tag contract Properties.") +model TagContractProperties { + @doc("Tag name.") + @maxLength(160) + @minLength(1) + displayName: string; +} + +@doc("Product profile.") +model ProductContractProperties extends ProductEntityBaseParameters { + @doc("Product name.") + @maxLength(300) + @minLength(1) + displayName: string; +} + +@doc("Product Entity Base Parameters") +model ProductEntityBaseParameters { + @doc("Product description. May include HTML formatting tags.") + @maxLength(1000) + description?: string; + + @doc("Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.") + terms?: string; + + @doc("Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as \"protected\" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as \"open\" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.") + @projectedName("json", "subscriptionRequired") + IsSubscriptionRequired?: boolean; + + @doc("whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.") + @projectedName("json", "approvalRequired") + IsApprovalRequired?: boolean; + + @doc("Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.") + subscriptionsLimit?: int32; + + @doc("whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.") + state?: ProductState; +} + +@doc("API Schema create or update contract Properties.") +model SchemaContractProperties { + @doc("Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
    - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
    - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
    - `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
    - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`.") + contentType: string; + + @doc("Create or update Properties of the API Schema Document.") + document?: SchemaDocumentProperties; +} + +@doc("Api Schema Document Properties.") +model SchemaDocumentProperties { + @doc("Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI.") + value?: string; + + @doc("Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise.") + definitions?: Record; + + @doc("Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise.") + components?: Record; +} + +@doc("Diagnostic Entity Properties") +model DiagnosticContractProperties { + @doc("Specifies for what type of messages sampling settings should not apply.") + alwaysLog?: AlwaysLog; + + @doc("Resource Id of a target logger.") + loggerId: string; + + @doc("Sampling settings for Diagnostic.") + sampling?: SamplingSettings; + + @doc("Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.") + frontend?: PipelineDiagnosticSettings; + + @doc("Diagnostic settings for incoming/outgoing HTTP messages to the Backend") + backend?: PipelineDiagnosticSettings; + + @doc("Log the ClientIP. Default is false.") + logClientIp?: boolean; + + @doc("Sets correlation protocol to use for Application Insights diagnostics.") + httpCorrelationProtocol?: HttpCorrelationProtocol; + + @doc("The verbosity level applied to traces emitted by trace policies.") + verbosity?: Verbosity; + + @doc("The format of the Operation Name for Application Insights telemetries. Default is Name.") + operationNameFormat?: OperationNameFormat; + + @doc("Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings.") + metrics?: boolean; +} + +@doc("Sampling settings for Diagnostic.") +model SamplingSettings { + @doc("Sampling type.") + samplingType?: SamplingType; + + @doc("Rate of sampling for fixed-rate sampling.") + @maxValue(100) + percentage?: float32; +} + +@doc("Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.") +model PipelineDiagnosticSettings { + @doc("Diagnostic settings for request.") + request?: HttpMessageDiagnostic; + + @doc("Diagnostic settings for response.") + response?: HttpMessageDiagnostic; +} + +@doc("Http message diagnostic settings.") +model HttpMessageDiagnostic { + @doc("Array of HTTP Headers to log.") + headers?: string[]; + + @doc("Body logging settings.") + body?: BodyDiagnosticSettings; + + @doc("Data masking settings.") + dataMasking?: DataMasking; +} + +@doc("Body logging settings.") +model BodyDiagnosticSettings { + @doc("Number of request body bytes to log.") + @maxValue(8192) + bytes?: int32; +} + +model DataMasking { + @doc("Masking settings for Url query parameters") + queryParams?: DataMaskingEntity[]; + + @doc("Masking settings for headers") + headers?: DataMaskingEntity[]; +} + +model DataMaskingEntity { + @doc("The name of an entity to mask (e.g. a name of a header or a query parameter).") + value?: string; + + @doc("Data masking mode.") + mode?: DataMaskingMode; +} + +@doc("Issue contract Properties.") +model IssueContractProperties extends IssueContractBaseProperties { + @doc("The issue title.") + title: string; + + @doc("Text describing the issue.") + description: string; + + @doc("A resource identifier for the user created the issue.") + userId: string; +} + +@doc("Issue contract Base Properties.") +model IssueContractBaseProperties { + @doc("Date and time when the issue was created.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDate?: utcDateTime; + + @doc("Status of the issue.") + state?: State; + + @doc("A resource identifier for the API the issue was created for.") + apiId?: string; +} + +@doc("Issue Comment contract Properties.") +model IssueCommentContractProperties { + @doc("Comment text.") + text: string; + + @doc("Date and time when the comment was created.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDate?: utcDateTime; + + @doc("A resource identifier for the user who left the comment.") + userId: string; +} + +@doc("Issue Attachment contract Properties.") +model IssueAttachmentContractProperties { + @doc("Filename by which the binary data will be saved.") + title: string; + + @doc("Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided in the 'content' property.") + contentFormat: string; + + @doc("An HTTP link or Base64-encoded binary data.") + content: string; +} + +@doc("TagDescription contract Properties.") +model TagDescriptionContractProperties extends TagDescriptionBaseProperties { + @doc("Identifier of the tag in the form of /tags/{tagId}") + tagId?: string; + + @doc("Tag name.") + @maxLength(160) + @minLength(1) + displayName?: string; +} + +@doc("Parameters supplied to the Create TagDescription operation.") +model TagDescriptionBaseProperties { + @doc("Description of the Tag.") + description?: string; + + @doc("Absolute URL of external resources describing the tag.") + @maxLength(2000) + externalDocsUrl?: string; + + @doc("Description of the external resources describing the tag.") + externalDocsDescription?: string; +} + +@doc("Parameters supplied to the Create TagDescription operation.") +model TagDescriptionCreateParameters { + @doc("Properties supplied to Create TagDescription operation.") + properties?: TagDescriptionBaseProperties; +} + +@doc("Paged Tag list representation.") +model TagResourceListResult is Azure.Core.Page { + @doc("Total record count number across all pages.") + count?: int32; +} + +@doc("TagResource contract properties.") +model TagResourceContract { + @doc("Tag associated with the resource.") + // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one + @key + tag: TagTagResourceContractProperties; + + @doc("API associated with the tag.") + api?: ApiTagResourceContractProperties; + + @doc("Operation associated with the tag.") + operation?: OperationTagResourceContractProperties; + + @doc("Product associated with the tag.") + product?: ProductTagResourceContractProperties; +} + +@doc("Contract defining the Tag property in the Tag Resource Contract") +model TagTagResourceContractProperties { + @doc("Tag identifier") + id?: string; + + @doc("Tag Name") + @maxLength(160) + @minLength(1) + name?: string; +} + +@doc("API contract properties for the Tag Resources.") +model ApiTagResourceContractProperties extends ApiEntityBaseContract { + @doc("API identifier in the form /apis/{apiId}.") + id?: string; + + @doc("API name.") + @maxLength(300) + @minLength(1) + name?: string; + + @doc("Absolute URL of the backend service implementing this API.") + @maxLength(2000) + @minLength(1) + serviceUrl?: string; + + @doc("Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.") + @maxLength(400) + path?: string; + + @doc("Describes on which protocols the operations in this API can be invoked.") + protocols?: Protocol[]; +} + +@doc("Operation Entity contract Properties.") +model OperationTagResourceContractProperties { + @doc("Identifier of the operation in form /operations/{operationId}.") + id?: string; + + @doc("Operation name.") + @visibility("read") + name?: string; + + @doc("API Name.") + @visibility("read") + apiName?: string; + + @doc("API Revision.") + @visibility("read") + apiRevision?: string; + + @doc("API Version.") + @visibility("read") + apiVersion?: string; + + @doc("Operation Description.") + @visibility("read") + description?: string; + + @doc("A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.") + @visibility("read") + method?: string; + + @doc("Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}") + @visibility("read") + urlTemplate?: string; +} + +@doc("Product profile.") +model ProductTagResourceContractProperties extends ProductEntityBaseParameters { + @doc("Identifier of the product in the form of /products/{productId}") + id?: string; + + @doc("Product name.") + @maxLength(300) + @minLength(1) + name: string; +} + +@doc("API Export result.") +model ApiExportResult { + @doc("ResourceId of the API which was exported.") + id?: string; + + @doc("Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes.") + @projectedName("json", "format") + exportResultFormat?: ExportResultFormat; + + @doc("The object defining the schema of the exported API Detail") + value?: ApiExportResultValue; +} + +@doc("The object defining the schema of the exported API Detail") +model ApiExportResultValue { + @doc("Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes.") + link?: string; +} + +@doc("Properties of an API Version Set.") +model ApiVersionSetContractProperties extends ApiVersionSetEntityBase { + @doc("Name of API Version Set") + @maxLength(100) + @minLength(1) + displayName: string; + + @doc("An value that determines where the API Version identifier will be located in a HTTP request.") + versioningScheme: VersioningScheme; +} + +@doc("API Version set base parameters") +model ApiVersionSetEntityBase { + @doc("Description of API Version Set.") + description?: string; + + @doc("Name of query parameter that indicates the API Version if versioningScheme is set to `query`.") + @maxLength(100) + @minLength(1) + versionQueryName?: string; + + @doc("Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.") + @maxLength(100) + @minLength(1) + versionHeaderName?: string; +} + +@doc("External OAuth authorization server settings Properties.") +model AuthorizationServerContractProperties + extends AuthorizationServerContractBaseProperties { + @doc("User-friendly authorization server name.") + @maxLength(50) + @minLength(1) + displayName: string; + + @doc("Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.") + clientRegistrationEndpoint: string; + + @doc("OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.") + authorizationEndpoint: string; + + @doc("Form of an authorization grant, which the client uses to request the access token.") + grantTypes: GrantType[]; + + @doc("Client or app id registered with this authorization server.") + clientId: string; + + @doc("Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + clientSecret?: string; +} + +@doc("External OAuth authorization server Update settings contract.") +model AuthorizationServerContractBaseProperties { + @doc("Description of the authorization server. Can contain HTML formatting tags.") + description?: string; + + @doc("HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.") + authorizationMethods?: AuthorizationMethod[]; + + @doc("Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.") + @projectedName("json", "clientAuthenticationMethod") + clientAuthenticationMethods?: ClientAuthenticationMethod[]; + + @doc("Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {\"name\" : \"name value\", \"value\": \"a value\"}.") + tokenBodyParameters?: TokenBodyParameterContract[]; + + @doc("OAuth token endpoint. Contains absolute URI to entity being referenced.") + tokenEndpoint?: string; + + @doc("If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.") + @projectedName("json", "supportState") + doesSupportState?: boolean; + + @doc("Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.") + defaultScope?: string; + + @doc("Specifies the mechanism by which access token is passed to the API. ") + bearerTokenSendingMethods?: BearerTokenSendingMethod[]; + + @doc("Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.") + resourceOwnerUsername?: string; + + @doc("Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.") + resourceOwnerPassword?: string; +} + +@doc("OAuth acquire token request body parameter (www-url-form-encoded).") +model TokenBodyParameterContract { + @doc("body parameter name.") + name: string; + + @doc("body parameter value.") + value: string; +} + +@doc("OAuth Server Secrets Contract.") +model AuthorizationServerSecretsContract { + @doc("oAuth Authorization Server Secrets.") + clientSecret?: string; + + @doc("Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.") + resourceOwnerUsername?: string; + + @doc("Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.") + resourceOwnerPassword?: string; +} + +@doc("Parameters supplied to the Create Backend operation.") +model BackendContractProperties extends BackendBaseParameters { + @doc("Runtime Url of the Backend.") + @maxLength(2000) + @minLength(1) + url: string; + + @doc("Backend communication protocol.") + protocol: BackendProtocol; +} + +@doc("Backend entity base Parameter set.") +model BackendBaseParameters { + @doc("Backend Title.") + @maxLength(300) + @minLength(1) + title?: string; + + @doc("Backend Description.") + @maxLength(2000) + @minLength(1) + description?: string; + + @doc("Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps.") + @maxLength(2000) + @minLength(1) + resourceId?: string; + + @doc("Backend Properties contract") + properties?: BackendProperties; + + @doc("Backend Credentials Contract Properties") + credentials?: BackendCredentialsContract; + + @doc("Backend Proxy Contract Properties") + proxy?: BackendProxyContract; + + @doc("Backend TLS Properties") + tls?: BackendTlsProperties; +} + +@doc("Properties specific to the Backend Type.") +model BackendProperties { + @doc("Backend Service Fabric Cluster Properties") + serviceFabricCluster?: BackendServiceFabricClusterProperties; +} + +@doc("Properties of the Service Fabric Type Backend.") +model BackendServiceFabricClusterProperties { + @doc("The client certificate id for the management endpoint.") + clientCertificateId?: string; + + @doc("The client certificate thumbprint for the management endpoint. Will be ignored if certificatesIds are provided") + clientCertificatethumbprint?: string; + + @doc("Maximum number of retries while attempting resolve the partition.") + maxPartitionResolutionRetries?: int32; + + @doc("The cluster management endpoint.") + managementEndpoints: string[]; + + @doc("Thumbprints of certificates cluster management service uses for tls communication") + serverCertificateThumbprints?: string[]; + + @doc("Server X509 Certificate Names Collection") + serverX509Names?: X509CertificateName[]; +} + +@doc("Properties of server X509Names.") +model X509CertificateName { + @doc("Common Name of the Certificate.") + name?: string; + + @doc("Thumbprint for the Issuer of the Certificate.") + issuerCertificateThumbprint?: string; +} + +@doc("Details of the Credentials used to connect to Backend.") +model BackendCredentialsContract { + @doc("List of Client Certificate Ids.") + certificateIds?: string[]; + + @doc("List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided.") + certificate?: string[]; + + @doc("Query Parameter description.") + query?: Record; + + @doc("Header Parameter description.") + header?: Record; + + @doc("Authorization header authentication") + authorization?: BackendAuthorizationHeaderCredentials; +} + +@doc("Authorization header information.") +model BackendAuthorizationHeaderCredentials { + @doc("Authentication Scheme name.") + @maxLength(100) + @minLength(1) + scheme: string; + + @doc("Authentication Parameter value.") + @maxLength(300) + @minLength(1) + parameter: string; +} + +@doc("Details of the Backend WebProxy Server to use in the Request to Backend.") +model BackendProxyContract { + @doc("WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings.") + @maxLength(2000) + @minLength(1) + url: string; + + @doc("Username to connect to the WebProxy server") + username?: string; + + @doc("Password to connect to the WebProxy Server") + password?: string; +} + +@doc("Properties controlling TLS Certificate Validation.") +model BackendTlsProperties { + @doc("Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host.") + validateCertificateChain?: boolean; + + @doc("Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host.") + validateCertificateName?: boolean; +} + +@doc("Reconnect request parameters.") +model BackendReconnectContract extends Resource { + @doc("Reconnect request properties.") + properties?: BackendReconnectProperties; +} + +@doc("Properties to control reconnect requests.") +model BackendReconnectProperties { + @doc("Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M.") + after?: duration; +} + +@doc("Properties of the Cache contract.") +model CacheContractProperties { + @doc("Cache description") + @maxLength(2000) + description?: string; + + @doc("Runtime connection string to cache") + @maxLength(300) + connectionString: string; + + @doc("Location identifier to use cache from (should be either 'default' or valid Azure region identifier)") + @maxLength(256) + useFromLocation: string; + + @doc("Original uri of entity in external system cache points to") + @maxLength(2000) + @projectedName("json", "resourceId") + resourceUri?: string; +} + +@doc("Properties of the Certificate contract.") +model CertificateContractProperties { + @doc("Subject attribute of the certificate.") + subject: string; + + @doc("Thumbprint of the certificate.") + thumbprint: string; + + @doc(""" +Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expirationDate: utcDateTime; + + @doc("KeyVault location details of the certificate.") + keyVault?: KeyVaultContractProperties; +} + +@doc("KeyVault contract details.") +model KeyVaultContractProperties extends KeyVaultContractCreateProperties { + @doc("Last time sync and refresh status of secret from key vault.") + lastStatus?: KeyVaultLastAccessStatusContractProperties; +} + +@doc("Issue contract Update Properties.") +model KeyVaultLastAccessStatusContractProperties { + @doc("Last status code for sync and refresh of secret from key vault.") + code?: string; + + @doc("Details of the error else empty.") + message?: string; + + @doc(""" +Last time secret was accessed. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timeStampUtc?: utcDateTime; +} + +@doc("Create keyVault contract details.") +model KeyVaultContractCreateProperties { + @doc("Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi") + secretIdentifier?: string; + + @doc("Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.") + identityClientId?: string; +} + +@doc("Certificate create or update details.") +model CertificateCreateOrUpdateParameters { + @doc("Certificate create or update properties details.") + properties?: CertificateCreateOrUpdateProperties; +} + +@doc("Parameters supplied to the CreateOrUpdate certificate operation.") +model CertificateCreateOrUpdateProperties { + @doc("Base 64 encoded certificate using the application/x-pkcs12 representation.") + data?: string; + + @doc("Password for the Certificate") + password?: string; + + @doc("KeyVault location details of the certificate.") + keyVault?: KeyVaultContractCreateProperties; +} + +@doc("A request to perform the connectivity check operation on a API Management service.") +model ConnectivityCheckRequest { + @doc("Definitions about the connectivity check origin.") + source: ConnectivityCheckRequestSource; + + @doc("The connectivity check operation destination.") + destination: ConnectivityCheckRequestDestination; + + @doc("The IP version to be used. Only IPv4 is supported for now.") + preferredIPVersion?: PreferredIPVersion; + + @doc("The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value.") + protocol?: ConnectivityCheckProtocol; + + @doc("Protocol-specific configuration.") + protocolConfiguration?: ConnectivityCheckRequestProtocolConfiguration; +} + +@doc("Definitions about the connectivity check origin.") +model ConnectivityCheckRequestSource { + @doc("The API Management service region from where to start the connectivity check operation.") + region: string; + + @doc("The particular VMSS instance from which to fire the request.") + instance?: int32; +} + +@doc("The connectivity check operation destination.") +model ConnectivityCheckRequestDestination { + @doc("Destination address. Can either be an IP address or a FQDN.") + address: string; + + @doc("Destination port.") + port: int32; +} + +@doc("Protocol-specific configuration.") +model ConnectivityCheckRequestProtocolConfiguration { + @doc("Configuration for HTTP or HTTPS requests.") + @projectedName("json", "HTTPConfiguration") + httpConfiguration?: ConnectivityCheckRequestProtocolConfigurationHttpConfiguration; +} + +@doc("Configuration for HTTP or HTTPS requests.") +model ConnectivityCheckRequestProtocolConfigurationHttpConfiguration { + @doc("The HTTP method to be used.") + method?: Method; + + @doc("List of HTTP status codes considered valid for the request response.") + validStatusCodes?: int32[]; + + @doc("List of headers to be included in the request.") + headers?: HttpHeader[]; +} + +@doc("HTTP header and it's value.") +model HttpHeader { + @doc("Header name.") + name: string; + + @doc("Header value.") + value: string; +} + +@doc("Information on the connectivity status.") +model ConnectivityCheckResponse { + @doc("List of hops between the source and the destination.") + @visibility("read") + hops?: ConnectivityHop[]; + + @doc("The connection status.") + @visibility("read") + connectionStatus?: ConnectionStatus; + + @doc("Average latency in milliseconds.") + @visibility("read") + avgLatencyInMs?: int32; + + @doc("Minimum latency in milliseconds.") + @visibility("read") + minLatencyInMs?: int32; + + @doc("Maximum latency in milliseconds.") + @visibility("read") + maxLatencyInMs?: int32; + + @doc("Total number of probes sent.") + @visibility("read") + probesSent?: int32; + + @doc("Number of failed probes.") + @visibility("read") + probesFailed?: int32; +} + +@doc("Information about a hop between the source and the destination.") +model ConnectivityHop { + @doc("The type of the hop.") + @visibility("read") + type?: string; + + @doc("The ID of the hop.") + @visibility("read") + id?: string; + + @doc("The IP address of the hop.") + @visibility("read") + address?: string; + + @doc("The ID of the resource corresponding to this hop.") + @visibility("read") + resourceId?: string; + + @doc("List of next hop identifiers.") + @visibility("read") + nextHopIds?: string[]; + + @doc("List of issues.") + @visibility("read") + issues?: ConnectivityIssue[]; +} + +@doc("Information about an issue encountered in the process of checking for connectivity.") +model ConnectivityIssue { + @doc("The origin of the issue.") + @visibility("read") + origin?: Origin; + + @doc("The severity of the issue.") + @visibility("read") + severity?: Severity; + + @doc("The type of issue.") + @visibility("read") + type?: IssueType; + + @doc("Provides additional context on the issue.") + @visibility("read") + context?: Record[]; +} + +@doc("Paged list of content types.") +model ContentTypeListResult is Azure.Core.Page; + +@doc("Content type contract details.") +model ContentTypeContract extends Resource { + @doc("Properties of the content type.") + properties?: ContentTypeContractProperties; +} + +model ContentTypeContractProperties { + @doc("Content type identifier") + id?: string; + + @doc("Content type name. Must be 1 to 250 characters long.") + name?: string; + + @doc("Content type description.") + description?: string; + + @doc("Content type schema.") + schema?: Record; + + @doc("Content type version.") + version?: string; +} + +@doc("Paged list of content items.") +model ContentItemListResult is Azure.Core.Page; + +@doc("Content type contract details.") +model ContentItemContract extends Resource { + @doc("Properties of the content item.") + properties?: Record; +} + +model DeletedServiceContractProperties { + @doc("Fully-qualified API Management Service Resource ID") + serviceId?: string; + + @doc("UTC Date and Time when the service will be automatically purged. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + scheduledPurgeDate?: utcDateTime; + + @doc("UTC Timestamp when the service was soft-deleted. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + deletionDate?: utcDateTime; +} + +@doc("The API Management service SKUs operation response.") +model ResourceSkuResults is Azure.Core.Page; + +@doc("Describes an available API Management service SKU.") +model ResourceSkuResult { + @doc("The type of resource the SKU applies to.") + @visibility("read") + resourceType?: string; + + @doc("Specifies API Management SKU.") + @visibility("read") + sku?: ResourceSku; + + @doc("Specifies the number of API Management units.") + @visibility("read") + capacity?: ResourceSkuCapacity; +} + +@doc("Describes scaling information of a SKU.") +model ResourceSkuCapacity { + @doc("The minimum capacity.") + @visibility("read") + minimum?: int32; + + @doc("The maximum capacity that can be set.") + @visibility("read") + maximum?: int32; + + @doc("The default capacity.") + @visibility("read") + default?: int32; + + @doc("The scale type applicable to the sku.") + @visibility("read") + scaleType?: ResourceSkuCapacityScaleType; +} + +@doc("Parameters supplied to the Backup/Restore of an API Management service operation.") +model ApiManagementServiceBackupRestoreParameters { + @doc("The name of the Azure storage account (used to place/retrieve the backup).") + storageAccount: string; + + @doc("The name of the blob container (used to place/retrieve the backup).") + containerName: string; + + @doc("The name of the backup file to create/retrieve.") + backupName: string; + + @doc("The type of access to be used for the storage account.") + accessType?: AccessType; + + @doc("Storage account access key. Required only if `accessType` is set to `AccessKey`.") + accessKey?: string; + + @doc("The Client ID of user assigned managed identity. Required only if `accessType` is set to `UserAssignedManagedIdentity`.") + clientId?: string; +} + +@doc("Properties of an API Management service resource description.") +model ApiManagementServiceProperties + extends ApiManagementServiceBaseProperties { + @doc("Publisher email.") + @maxLength(100) + publisherEmail: string; + + @doc("Publisher name.") + @maxLength(100) + publisherName: string; +} + +@doc("Base Properties of an API Management service resource description.") +model ApiManagementServiceBaseProperties { + @doc("Email address from which the notification will be sent.") + @maxLength(100) + notificationSenderEmail?: string; + + @doc("The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.") + @visibility("read") + provisioningState?: string; + + @doc("The provisioning state of the API Management service, which is targeted by the long running operation started on the service.") + @visibility("read") + targetProvisioningState?: string; + + @doc("Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdAtUtc?: utcDateTime; + + @doc("Gateway URL of the API Management service.") + @visibility("read") + gatewayUrl?: string; + + @doc("Gateway URL of the API Management service in the Default Region.") + @visibility("read") + gatewayRegionalUrl?: string; + + @doc("Publisher portal endpoint Url of the API Management service.") + @visibility("read") + portalUrl?: string; + + @doc("Management API endpoint URL of the API Management service.") + @visibility("read") + managementApiUrl?: string; + + @doc("SCM endpoint URL of the API Management service.") + @visibility("read") + scmUrl?: string; + + @doc("DEveloper Portal endpoint URL of the API Management service.") + @visibility("read") + developerPortalUrl?: string; + + @doc("Custom hostname configuration of the API Management service.") + hostnameConfigurations?: HostnameConfiguration[]; + + @doc("Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU.") + @visibility("read") + publicIPAddresses?: string[]; + + @doc("Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU.") + @visibility("read") + privateIPAddresses?: string[]; + + @doc("Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network.") + publicIpAddressId?: string; + + @doc("Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'") + publicNetworkAccess?: PublicNetworkAccess; + + @doc("Virtual network configuration of the API Management service.") + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + + @doc("Additional datacenter locations of the API Management service.") + additionalLocations?: AdditionalLocation[]; + + @doc("Custom properties of the API Management service.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
    Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.

    You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384") + customProperties?: Record; + + @doc("List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.") + certificates?: CertificateConfiguration[]; + + @doc("Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway.") + enableClientCertificate?: boolean; + + @doc("Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region.") + disableGateway?: boolean; + + @doc("The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.") + virtualNetworkType?: VirtualNetworkType; + + @doc("Control Plane Apis version constraint for the API Management service.") + apiVersionConstraint?: ApiVersionConstraint; + + @doc("Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored.") + restore?: boolean; + + @doc("List of Private Endpoint Connections of this service.") + privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; + + @doc("Compute Platform Version running the service in this location.") + @visibility("read") + platformVersion?: PlatformVersion; +} + +@doc("Custom hostname configuration.") +model HostnameConfiguration { + @doc("Hostname type.") + type: HostnameType; + + @doc("Hostname to configure on the Api Management service.") + hostName: string; + + @doc("Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update of ssl certificate will not work. This requires Api Management service to be configured with aka.ms/apimmsi. The secret should be of type *application/x-pkcs12*") + keyVaultId?: string; + + @doc("System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate.") + identityClientId?: string; + + @doc("Base64 Encoded certificate.") + encodedCertificate?: string; + + @doc("Certificate Password.") + certificatePassword?: string; + + @doc("Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to Proxy Hostname Type.") + defaultSslBinding?: boolean; + + @doc("Specify true to always negotiate client certificate on the hostname. Default Value is false.") + negotiateClientCertificate?: boolean; + + @doc("Certificate information.") + certificate?: CertificateInformation; + + @doc("Certificate Source.") + certificateSource?: CertificateSource; + + @doc("Certificate Status.") + certificateStatus?: CertificateStatus; +} + +@doc("SSL certificate information.") +model CertificateInformation { + @doc("Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expiry: utcDateTime; + + @doc("Thumbprint of the certificate.") + thumbprint: string; + + @doc("Subject of the certificate.") + subject: string; +} + +@doc("Configuration of a virtual network to which API Management service is deployed.") +model VirtualNetworkConfiguration { + @doc("The virtual network ID. This is typically a GUID. Expect a null GUID by default.") + @visibility("read") + vnetid?: string; + + @doc("The name of the subnet.") + @visibility("read") + subnetname?: string; + + @doc("The full resource ID of a subnet in a virtual network to deploy the API Management service in.") + @pattern("^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$") + subnetResourceId?: string; +} + +@doc("Description of an additional API Management resource location.") +model AdditionalLocation { + @doc("The location name of the additional region among Azure Data center regions.") + location: string; + + @doc("SKU properties of the API Management service.") + sku: ApiManagementServiceSkuProperties; + + @doc("A list of availability zones denoting where the resource needs to come from.") + zones?: string[]; + + @doc("Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard, Premium and Isolated SKU.") + @visibility("read") + publicIPAddresses?: string[]; + + @doc("Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard, Premium and Isolated SKU.") + @visibility("read") + privateIPAddresses?: string[]; + + @doc("Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network.") + publicIpAddressId?: string; + + @doc("Virtual network configuration for the location.") + virtualNetworkConfiguration?: VirtualNetworkConfiguration; + + @doc("Gateway URL of the API Management service in the Region.") + @visibility("read") + gatewayRegionalUrl?: string; + + @doc("Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location.") + disableGateway?: boolean; + + @doc("Compute Platform Version running the service.") + @visibility("read") + platformVersion?: PlatformVersion; +} + +@doc("API Management service resource SKU properties.") +model ApiManagementServiceSkuProperties { + @doc("Name of the Sku.") + name: SkuType; + + @doc("Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0.") + capacity: int32; +} + +@doc("Certificate configuration which consist of non-trusted intermediates and root certificates.") +model CertificateConfiguration { + @doc("Base64 Encoded certificate.") + encodedCertificate?: string; + + @doc("Certificate Password.") + certificatePassword?: string; + + @doc("The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations.") + storeName: CertificateConfigurationStoreName; + + @doc("Certificate information.") + certificate?: CertificateInformation; +} + +@doc("Control Plane Apis version constraint for the API Management service.") +model ApiVersionConstraint { + @doc("Limit control plane API calls to API Management service with version equal to or newer than this value.") + minApiVersion?: string; +} + +@doc("Remote Private Endpoint Connection resource.") +model RemotePrivateEndpointConnectionWrapper { + @doc("Private Endpoint connection resource id") + id?: string; + + @doc("Private Endpoint Connection Name") + name?: string; + + @doc("Private Endpoint Connection Resource Type") + type?: string; + + @doc("Resource properties.") + properties?: PrivateEndpointConnectionWrapperProperties; +} + +@doc("Properties of the PrivateEndpointConnectProperties.") +model PrivateEndpointConnectionWrapperProperties { + @doc("The resource of private end point.") + privateEndpoint?: ArmIdWrapper; + + @doc("A collection of information about the state of the connection between service consumer and provider.") + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + + @doc("The provisioning state of the private endpoint connection resource.") + @visibility("read") + provisioningState?: string; + + @doc("All the Group ids.") + @visibility("read") + groupIds?: string[]; +} + +@doc("A wrapper for an ARM resource id") +model ArmIdWrapper { + @visibility("read") + id?: string; +} + +@doc("A collection of information about the state of the connection between service consumer and provider.") +model PrivateLinkServiceConnectionState { + @doc("Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.") + status?: PrivateEndpointServiceConnectionStatus; + + @doc("The reason for approval/rejection of the connection.") + description?: string; + + @doc("A message indicating if changes on the service provider require any updates on the consumer.") + actionsRequired?: string; +} + +@doc("Identity properties of the Api Management service resource.") +model ApiManagementServiceIdentity { + @doc("The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.") + type: ApimIdentityType; + + @doc("The principal id of the identity.") + @visibility("read") + principalId?: string; + + @doc("The client tenant id of the identity.") + @visibility("read") + tenantId?: string; + + @doc(""" +The list of user identities associated with the resource. The user identity +dictionary key references will be ARM resource ids in the form: +'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. +""") + userAssignedIdentities?: Record; +} + +model UserIdentityProperties { + @doc("The principal id of user assigned identity.") + principalId?: string; + + @doc("The client id of user assigned identity.") + clientId?: string; +} + +@doc("The Resource definition.") +model ApimResource { + @doc("Resource ID.") + @visibility("read") + id?: string; + + @doc("Resource name.") + @visibility("read") + name?: string; + + @doc("Resource type for API Management resource is set to Microsoft.ApiManagement.") + @visibility("read") + type?: string; + + @doc("Resource tags.") + tags?: Record; +} + +@doc("The response of the GetSsoToken operation.") +model ApiManagementServiceGetSsoTokenResult { + @doc("Redirect URL to the Publisher Portal containing the SSO token.") + redirectUri?: string; +} + +@doc("Parameters supplied to the CheckNameAvailability operation.") +model ApiManagementServiceCheckNameAvailabilityParameters { + @doc("The name to check for availability.") + name: string; +} + +@doc("Response of the CheckNameAvailability operation.") +model ApiManagementServiceNameAvailabilityResult { + @doc("True if the name is available and can be used to create a new API Management service; otherwise false.") + @visibility("read") + nameAvailable?: boolean; + + @doc("If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name.") + @visibility("read") + message?: string; + + @doc("Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable.") + reason?: NameAvailabilityReason; +} + +@doc("Response of the GetDomainOwnershipIdentifier operation.") +model ApiManagementServiceGetDomainOwnershipIdentifierResult { + @doc("The domain ownership identifier value.") + @visibility("read") + domainOwnershipIdentifier?: string; +} + +@doc("Parameter supplied to the Apply Network configuration operation.") +model ApiManagementServiceApplyNetworkConfigurationParameters { + @doc("Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required.") + location?: string; +} + +@doc("Email Template Contract properties.") +model EmailTemplateContractProperties { + @doc("Subject of the Template.") + @maxLength(1000) + @minLength(1) + subject: string; + + @doc("Email Template Body. This should be a valid XDocument") + @minLength(1) + body: string; + + @doc("Title of the Template.") + title?: string; + + @doc("Description of the Email Template.") + description?: string; + + @doc("Whether the template is the default template provided by API Management or has been edited.") + @visibility("read") + isDefault?: boolean; + + @doc("Email Template Parameter values.") + parameters?: EmailTemplateParametersContractProperties[]; +} + +@doc("Email Template Parameter contract.") +model EmailTemplateParametersContractProperties { + @doc("Template parameter name.") + @maxLength(256) + @minLength(1) + @pattern("^[A-Za-z0-9-._]+$") + name?: string; + + @doc("Template parameter title.") + @maxLength(4096) + @minLength(1) + title?: string; + + @doc("Template parameter description.") + @maxLength(256) + @minLength(1) + @pattern("^[A-Za-z0-9-._]+$") + description?: string; +} + +@doc("Properties of the Gateway contract.") +model GatewayContractProperties { + @doc("Gateway location.") + locationData?: ResourceLocationDataContract; + + @doc("Gateway description") + @maxLength(1000) + description?: string; +} + +@doc("Resource location data properties.") +model ResourceLocationDataContract { + @doc("A canonical name for the geographic or physical location.") + @maxLength(256) + name: string; + + @doc("The city or locality where the resource is located.") + @maxLength(256) + city?: string; + + @doc("The district, state, or province where the resource is located.") + @maxLength(256) + district?: string; + + @doc("The country or region where the resource is located.") + @maxLength(256) + countryOrRegion?: string; +} + +@doc("Gateway authentication keys.") +model GatewayKeysContract { + @doc("Primary gateway key.") + primary?: string; + + @doc("Secondary gateway key.") + secondary?: string; +} + +@doc("Gateway key regeneration request contract properties.") +model GatewayKeyRegenerationRequestContract { + @doc("The Key being regenerated.") + keyType: GatewayRegenerateKeyType; +} + +@doc("Gateway token request contract properties.") +model GatewayTokenRequestContract { + @doc("The Key to be used to generate gateway token.") + keyType: KeyType; + + @doc(""" +The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expiry: utcDateTime; +} + +@doc("Gateway access token.") +model GatewayTokenContract { + @doc("Shared Access Authentication token value for the Gateway.") + value?: string; +} + +@doc("Gateway hostname configuration details.") +model GatewayHostnameConfigurationContractProperties { + @doc("Hostname value. Supports valid domain name, partial or full wildcard") + hostname?: string; + + @doc("Identifier of Certificate entity that will be used for TLS connection establishment") + certificateId?: string; + + @doc("Determines whether gateway requests client certificate") + negotiateClientCertificate?: boolean; + + @doc("Specifies if TLS 1.0 is supported") + tls10Enabled?: boolean; + + @doc("Specifies if TLS 1.1 is supported") + tls11Enabled?: boolean; + + @doc("Specifies if HTTP/2.0 is supported") + http2Enabled?: boolean; +} + +@doc("Paged API list representation.") +model ApiManagementGatewayApiListResult is Azure.Core.Page { + @doc("Total record count number across all pages.") + count?: int32; +} + +model GatewayApiData extends ApiContract {} + +@doc("Association entity details.") +model AssociationContract extends Resource { + @doc("Association entity contract properties.") + properties?: AssociationContractProperties; +} + +@doc("Association entity contract properties.") +model AssociationContractProperties { + @doc("Provisioning state.") + provisioningState?: "created"; +} + +@doc("Gateway certificate authority details.") +model GatewayCertificateAuthorityContractProperties { + @doc("Determines whether certificate authority is trusted.") + isTrusted?: boolean; +} + +@doc("Group contract Properties.") +model GroupContractProperties { + @doc("Group name.") + @maxLength(300) + @minLength(1) + displayName: string; + + @doc("Group description. Can contain HTML formatting tags.") + @maxLength(1000) + description?: string; + + @doc("true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.") + @visibility("read") + builtIn?: boolean; + + @doc("Group type.") + type?: GroupType; + + @doc("For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null.") + externalId?: string; +} + +@doc("Parameters supplied to the Create Group operation.") +model GroupCreateParameters { + @doc("Properties supplied to Create Group operation.") + properties?: GroupCreateParametersProperties; +} + +@doc("Parameters supplied to the Create Group operation.") +model GroupCreateParametersProperties { + @doc("Group name.") + @maxLength(300) + @minLength(1) + displayName: string; + + @doc("Group description.") + description?: string; + + @doc("Group type.") + type?: GroupType; + + @doc("Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null.") + externalId?: string; +} + +@doc("Paged Group Users list representation.") +model ApiManagementGroupUserListResult + is Azure.Core.Page { + @doc("Total record count number across all pages.") + count?: int32; +} + +model ApiManagementGroupUserData extends UserContract {} + +@doc("User profile.") +model UserContractProperties extends UserEntityBaseParameters { + @doc("First name.") + firstName?: string; + + @doc("Last name.") + lastName?: string; + + @doc("Email address.") + email?: string; + + @doc(""" +Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + registrationDate?: utcDateTime; + + @doc("Collection of groups user is part of.") + @visibility("read") + groups?: GroupContractProperties[]; +} + +@doc("User Entity Base Parameters set.") +model UserEntityBaseParameters { + @doc("Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.") + state?: UserState; + + @doc("Optional note about a user set by the administrator.") + note?: string; + + @doc("Collection of user identities.") + identities?: UserIdentityContract[]; +} + +@doc("User identity details.") +model UserIdentityContract { + @doc("Identity provider name.") + provider?: string; + + @doc("Identifier value within provider.") + id?: string; +} + +@doc("The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users.") +model IdentityProviderContractProperties + extends IdentityProviderBaseParameters { + @doc("Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft.") + @minLength(1) + clientId: string; + + @doc("Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + @minLength(1) + clientSecret?: string; +} + +@doc("Identity Provider Base Parameter Properties.") +model IdentityProviderBaseParameters { + @doc("Identity Provider Type identifier.") + @projectedName("json", "type") + identityProviderType?: IdentityProviderType; + + @doc("The TenantId to use instead of Common when logging into Active Directory") + @projectedName("json", "signinTenant") + signInTenant?: string; + + @doc("List of Allowed Tenants when configuring Azure Active Directory login.") + allowedTenants?: string[]; + + @doc("OpenID Connect discovery endpoint hostname for AAD or AAD B2C.") + authority?: string; + + @doc("Signup Policy Name. Only applies to AAD B2C Identity Provider.") + @minLength(1) + @projectedName("json", "signupPolicyName") + signUpPolicyName?: string; + + @doc("Signin Policy Name. Only applies to AAD B2C Identity Provider.") + @minLength(1) + @projectedName("json", "signinPolicyName") + signInPolicyName?: string; + + @doc("Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.") + @minLength(1) + profileEditingPolicyName?: string; + + @doc("Password Reset Policy Name. Only applies to AAD B2C Identity Provider.") + @minLength(1) + passwordResetPolicyName?: string; +} + +@doc("Identity Provider details.") +model IdentityProviderCreateContract extends Resource { + @doc("Identity Provider contract properties.") + properties?: IdentityProviderCreateContractProperties; +} + +@doc("The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users.") +model IdentityProviderCreateContractProperties + extends IdentityProviderBaseParameters { + @doc("Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft.") + @minLength(1) + clientId: string; + + @doc("Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + @minLength(1) + clientSecret: string; +} + +@doc("Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.") +model ClientSecretContract { + @doc("Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.") + clientSecret?: string; +} + +@doc("The Logger entity in API Management represents an event sink that you can use to log API Management events. Currently the Logger entity supports logging API Management events to Azure Event Hubs.") +model LoggerContractProperties { + @doc("Logger type.") + loggerType: LoggerType; + + @doc("Logger description.") + @maxLength(256) + description?: string; + + @doc(""" +The name and SendRule connection string of the event hub for azureEventHub logger. +Instrumentation key for applicationInsights logger. +""") + credentials?: Record; + + @doc("Whether records are buffered in the logger before publishing. Default is assumed to be true.") + isBuffered?: boolean; + + @doc("Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).") + resourceId?: string; +} + +@doc("NamedValue Contract properties.") +model NamedValueContractProperties extends NamedValueEntityBaseParameters { + @doc("Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.") + @maxLength(256) + @minLength(1) + @pattern("^[A-Za-z0-9-._]+$") + displayName: string; + + @doc("Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + @maxLength(4096) + value?: string; + + @doc("KeyVault location details of the namedValue.") + keyVault?: KeyVaultContractProperties; +} + +@doc("NamedValue Entity Base Parameters set.") +model NamedValueEntityBaseParameters { + @doc("Optional tags that when provided can be used to filter the NamedValue list.") + tags?: string[]; + + @doc("Determines whether the value is a secret and should be encrypted or not. Default value is false.") + @projectedName("json", "secret") + IsSecret?: boolean; +} + +@doc("NamedValue details.") +model NamedValueCreateContract extends Resource { + @doc("NamedValue entity contract properties for PUT operation.") + properties?: NamedValueCreateContractProperties; +} + +@doc("NamedValue Contract properties.") +model NamedValueCreateContractProperties + extends NamedValueEntityBaseParameters { + @doc("Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.") + @maxLength(256) + @minLength(1) + @pattern("^[A-Za-z0-9-._]+$") + displayName: string; + + @doc("Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + @maxLength(4096) + value?: string; + + @doc("KeyVault location details of the namedValue.") + keyVault?: KeyVaultContractCreateProperties; +} + +@doc("Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.") +model NamedValueSecretContract { + @doc("This is secret value of the NamedValue entity.") + value?: string; +} + +@doc("Network Status in the Location") +model NetworkStatusContractByLocation { + @doc("Location of service") + @minLength(1) + location?: string; + + @doc("Network status in Location") + networkStatus?: NetworkStatusContract; +} + +@doc("Network Status details.") +model NetworkStatusContract { + @doc("Gets the list of DNS servers IPV4 addresses.") + // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one + @key + dnsServers: string[]; + + @doc("Gets the list of Connectivity Status to the Resources on which the service depends upon.") + connectivityStatus: ConnectivityStatusContract[]; +} + +@doc("Details about connectivity to a resource.") +model ConnectivityStatusContract { + @doc("The hostname of the resource which the service depends on. This can be the database, storage or any other azure resource on which the service depends upon.") + @minLength(1) + name: string; + + @doc("Resource Connectivity Status Type identifier.") + status: ConnectivityStatusType; + + @doc("Error details of the connectivity to the resource.") + error?: string; + + @doc(""" +The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastUpdated: utcDateTime; + + @doc(""" +The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastStatusChange: utcDateTime; + + @doc("Resource Type.") + resourceType: string; + + @doc("Whether this is optional.") + isOptional: boolean; +} + +@doc("Notification Contract properties.") +model NotificationContractProperties { + @doc("Title of the Notification.") + @maxLength(1000) + @minLength(1) + title: string; + + @doc("Description of the Notification.") + description?: string; + + @doc("Recipient Parameter values.") + recipients?: RecipientsContractProperties; +} + +@doc("Notification Parameter contract.") +model RecipientsContractProperties { + @doc("List of Emails subscribed for the notification.") + emails?: string[]; + + @doc("List of Users subscribed for the notification.") + users?: string[]; +} + +@doc("Paged Recipient User list representation.") +model RecipientUserListResult { + @doc("Page values.") + value?: RecipientUserContract[]; + + @doc("Total record count number across all pages.") + count?: int32; + + @doc("Next page link if any.") + nextLink?: string; +} + +@doc("Recipient User details.") +model RecipientUserContract extends Resource { + @doc("Recipient User entity contract properties.") + properties?: RecipientUsersContractProperties; +} + +@doc("Recipient User Contract Properties.") +model RecipientUsersContractProperties { + @doc("API Management UserId subscribed to notification.") + userId?: string; +} + +@doc("Paged Recipient User list representation.") +model RecipientEmailListResult { + @doc("Page values.") + value?: RecipientEmailContract[]; + + @doc("Total record count number across all pages.") + count?: int32; + + @doc("Next page link if any.") + nextLink?: string; +} + +@doc("Recipient Email details.") +model RecipientEmailContract extends Resource { + @doc("Recipient Email contract properties.") + properties?: RecipientEmailContractProperties; +} + +@doc("Recipient Email Contract Properties.") +model RecipientEmailContractProperties { + @doc("User Email subscribed to notification.") + email?: string; +} + +@doc("OpenID Connect Providers Contract.") +model OpenidConnectProviderContractProperties { + @doc("User-friendly OpenID Connect Provider name.") + @maxLength(50) + displayName: string; + + @doc("User-friendly description of OpenID Connect Provider.") + description?: string; + + @doc("Metadata endpoint URI.") + metadataEndpoint: string; + + @doc("Client ID of developer console which is the client application.") + clientId: string; + + @doc("Client Secret of developer console which is the client application.") + clientSecret?: string; +} + +@doc("Collection of Outbound Environment Endpoints") +model OutboundEnvironmentEndpointList { + @doc("Collection of resources.") + // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one + @key + value: OutboundEnvironmentEndpoint[]; + + @doc("Link to next page of resources.") + @visibility("read") + nextLink?: string; +} + +@doc("Endpoints accessed for a common purpose that the Api Management Service requires outbound network access to.") +model OutboundEnvironmentEndpoint { + @doc("The type of service accessed by the Api Management Service, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory.") + category?: string; + + @doc("The endpoints that the Api Management Service reaches the service at.") + endpoints?: EndpointDependency[]; +} + +@doc("A domain name that a service is reached at.") +model EndpointDependency { + @doc("The domain name of the dependency.") + domainName?: string; + + @doc("The Ports used when connecting to DomainName.") + endpointDetails?: EndpointDetail[]; +} + +@doc("Current TCP connectivity information from the Api Management Service to a single endpoint.") +model EndpointDetail { + @doc("The port an endpoint is connected to.") + port?: int32; + + @doc("The region of the dependency.") + region?: string; +} + +@doc("Descriptions of APIM policies.") +model PolicyDescriptionListResult { + @doc("Descriptions of APIM policies.") + value?: PolicyDescriptionContract[]; + + @doc("Total record count number.") + count?: int32; +} + +@doc("Policy description details.") +model PolicyDescriptionContract extends Resource { + @doc("Policy description contract properties.") + properties?: PolicyDescriptionContractProperties; +} + +@doc("Policy description properties.") +model PolicyDescriptionContractProperties { + @doc("Policy description.") + @visibility("read") + description?: string; + + @doc("Binary OR value of the Snippet scope.") + @visibility("read") + scope?: int32; +} + +model PortalRevisionContractProperties { + @doc("Portal revision description.") + @maxLength(2000) + description?: string; + + @doc("Portal revision publishing status details.") + @visibility("read") + @maxLength(2000) + statusDetails?: string; + + @doc("Status of the portal's revision.") + @visibility("read") + status?: PortalRevisionStatus; + + @doc("Indicates if the portal's revision is public.") + isCurrent?: boolean; + + @doc("Portal's revision creation date and time.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDateTime?: utcDateTime; + + @doc("Last updated date and time.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + updatedDateTime?: utcDateTime; +} + +@doc("Portal Settings for the Developer Portal.") +model PortalSettingsContract extends Resource { + @doc("Portal Settings contract properties.") + properties?: PortalSettingsContractProperties; +} + +@doc("Sign-in settings contract properties.") +model PortalSettingsContractProperties { + @doc("A delegation Url.") + url?: string; + + @doc("A base64-encoded validation key to validate, that a request is coming from Azure API Management.") + validationKey?: string; + + @doc("Subscriptions delegation settings.") + @projectedName("json", "subscriptions") + IsSubscriptions?: SubscriptionsDelegationSettingsProperties; + + @doc("User registration delegation settings.") + @projectedName("json", "userRegistration") + IsUserRegistration?: RegistrationDelegationSettingsProperties; + + @doc("Redirect Anonymous users to the Sign-In page.") + enabled?: boolean; + + @doc("Terms of service contract properties.") + termsOfService?: TermsOfServiceProperties; +} + +@doc("Subscriptions delegation settings properties.") +model SubscriptionsDelegationSettingsProperties { + @doc("Enable or disable delegation for subscriptions.") + enabled?: boolean; +} + +@doc("User registration delegation settings properties.") +model RegistrationDelegationSettingsProperties { + @doc("Enable or disable delegation for user registration.") + enabled?: boolean; +} + +@doc("Terms of service contract properties.") +model TermsOfServiceProperties { + @doc("A terms of service text.") + text?: string; + + @doc("Display terms of service during a sign-up process.") + enabled?: boolean; + + @doc("Ask user for consent to the terms of service.") + consentRequired?: boolean; +} + +@doc("Sign-in settings contract properties.") +model PortalSigninSettingProperties { + @doc("Redirect Anonymous users to the Sign-In page.") + enabled?: boolean; +} + +@doc("Sign-up settings contract properties.") +model PortalSignupSettingsProperties { + @doc("Allow users to sign up on a developer portal.") + enabled?: boolean; + + @doc("Terms of service contract properties.") + termsOfService?: TermsOfServiceProperties; +} + +@doc("Delegation settings contract properties.") +model PortalDelegationSettingsProperties { + @doc("A delegation Url.") + url?: string; + + @doc("A base64-encoded validation key to validate, that a request is coming from Azure API Management.") + validationKey?: string; + + @doc("Subscriptions delegation settings.") + subscriptions?: SubscriptionsDelegationSettingsProperties; + + @doc("User registration delegation settings.") + userRegistration?: RegistrationDelegationSettingsProperties; +} + +@doc("Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.") +model PortalSettingValidationKeyContract { + @doc("This is secret value of the validation key in portal settings.") + validationKey?: string; +} + +@doc("Properties of the PrivateEndpointConnectProperties.") +model PrivateEndpointConnectionProperties { + @doc("The resource of private end point.") + privateEndpoint?: PrivateEndpoint; + + @doc("A collection of information about the state of the connection between service consumer and provider.") + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + + @doc("The provisioning state of the private endpoint connection resource.") + @visibility("read") + provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +@doc("The Private Endpoint resource.") +model PrivateEndpoint { + @doc("The ARM identifier for Private Endpoint") + @visibility("read") + id?: string; +} + +@doc("A request to approve or reject a private endpoint connection") +model PrivateEndpointConnectionRequest { + @doc("Private Endpoint Connection Resource Id.") + id?: string; + + @doc("The connection state of the private endpoint connection.") + properties?: PrivateEndpointConnectionRequestProperties; +} + +@doc("The connection state of the private endpoint connection.") +model PrivateEndpointConnectionRequestProperties { + @doc("A collection of information about the state of the connection between service consumer and provider.") + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; +} + +@doc("Properties of a private link resource.") +model PrivateLinkResourceProperties { + @doc("The private link resource group id.") + @visibility("read") + groupId?: string; + + @doc("The private link resource required member names.") + @visibility("read") + requiredMembers?: string[]; + + @doc("The private link resource Private link DNS zone name.") + requiredZoneNames?: string[]; +} + +@doc("Paged API list representation.") +model ApiManagementProductApiListResult is Azure.Core.Page { + @doc("Total record count number across all pages.") + count?: int32; +} + +model ProductApiData extends ApiContract {} + +@doc("Paged Group list representation.") +model ApiManagementProductGroupListResult is Azure.Core.Page { + @doc("Total record count number across all pages.") + count?: int32; +} + +model ProductGroupData extends GroupContract {} + +@doc("Subscription details.") +model SubscriptionContractProperties { + @doc("The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier.") + ownerId?: string; + + @doc("Scope like /products/{productId} or /apis or /apis/{apiId}.") + scope: string; + + @doc("The name of the subscription, or null if the subscription has no name.") + @maxLength(100) + displayName?: string; + + @doc("Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.") + state: SubscriptionState; + + @doc(""" +Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDate?: utcDateTime; + + @doc(""" +Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDate?: utcDateTime; + + @doc(""" +Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expirationDate?: utcDateTime; + + @doc(""" +Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDate?: utcDateTime; + + @doc(""" +Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + notificationDate?: utcDateTime; + + @doc("Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + @maxLength(256) + @minLength(1) + primaryKey?: string; + + @doc("Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + @maxLength(256) + @minLength(1) + secondaryKey?: string; + + @doc("Optional subscription comment added by an administrator when the state is changed to the 'rejected'.") + stateComment?: string; + + @doc("Determines whether tracing is enabled") + allowTracing?: boolean; +} + +@doc("Paged Quota Counter list representation.") +model QuotaCounterListResult { + @doc("Quota counter values.") + value?: QuotaCounterContract[]; + + @doc("Total record count number across all pages.") + count?: int32; + + @doc("Next page link if any.") + nextLink?: string; +} + +@doc("Quota counter details.") +@resource("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}") +model QuotaCounterContract { + @doc("The Key value of the Counter. Must not be empty.") + @minLength(1) + // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one + @key + counterKey: string; + + @doc("Identifier of the Period for which the counter was collected. Must not be empty.") + @minLength(1) + periodKey: string; + + @doc(""" +The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + periodStartTime: utcDateTime; + + @doc(""" +The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + periodEndTime: utcDateTime; + + @doc("Quota Value Properties") + value?: QuotaCounterValueContractProperties; +} + +@doc("Quota counter value details.") +model QuotaCounterValueContractProperties { + @doc("Number of times Counter was called.") + callsCount?: int32; + + @doc("Data Transferred in KiloBytes.") + kbTransferred?: float32; +} + +@doc("Quota counter value details.") +model QuotaCounterValueUpdateContract { + @doc("Quota counter value details.") + properties?: QuotaCounterValueContractProperties; +} + +@doc("Lists Regions operation response details.") +model RegionListResult is Azure.Core.Page { + @doc("Total record count number across all pages.") + count?: int32; +} + +@doc("Region profile.") +model RegionContract { + @doc("Region name.") + @visibility("read") + name?: string; + + @doc("whether Region is the master region.") + isMasterRegion?: boolean; + + @doc("whether Region is deleted.") + isDeleted?: boolean; +} + +@doc("Paged Report records list representation.") +model ReportListResult is Azure.Core.Page { + @doc("Total record count number across all pages.") + count?: int32; +} + +@doc("Report data.") +model ReportRecordContract { + @doc("Name depending on report endpoint specifies product, API, operation or developer name.") + name?: string; + + @doc(""" +Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timestamp?: utcDateTime; + + @doc("Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).") + interval?: string; + + @doc("Country to which this record data is related.") + country?: string; + + @doc("Country region to which this record data is related.") + region?: string; + + @doc("Zip code to which this record data is related.") + zip?: string; + + @doc("User identifier path. /users/{userId}") + @visibility("read") + userId?: string; + + @doc("Product identifier path. /products/{productId}") + @visibility("read") + productId?: string; + + @doc("API identifier path. /apis/{apiId}") + apiId?: string; + + @doc("Operation identifier path. /apis/{apiId}/operations/{operationId}") + operationId?: string; + + @doc("API region identifier.") + apiRegion?: string; + + @doc("Subscription identifier path. /subscriptions/{subscriptionId}") + subscriptionId?: string; + + @doc("Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect") + callCountSuccess?: int32; + + @doc("Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests") + callCountBlocked?: int32; + + @doc("Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600") + callCountFailed?: int32; + + @doc("Number of other calls.") + callCountOther?: int32; + + @doc("Total number of calls.") + callCountTotal?: int32; + + @doc("Bandwidth consumed.") + bandwidth?: int32; + + @doc("Number of times when content was served from cache policy.") + cacheHitCount?: int32; + + @doc("Number of times content was fetched from backend.") + cacheMissCount?: int32; + + @doc("Average time it took to process request.") + apiTimeAvg?: float32; + + @doc("Minimum time it took to process request.") + apiTimeMin?: float32; + + @doc("Maximum time it took to process request.") + apiTimeMax?: float32; + + @doc("Average time it took to process request on backend.") + serviceTimeAvg?: float32; + + @doc("Minimum time it took to process request on backend.") + serviceTimeMin?: float32; + + @doc("Maximum time it took to process request on backend.") + serviceTimeMax?: float32; +} + +@doc("Paged Report records list representation.") +@pagedResult +model RequestReportListResult { + @doc("Page values.") + @items + value?: RequestReportRecordContract[]; + + @doc("Total record count number across all pages.") + count?: int32; +} + +@doc("Request Report data.") +model RequestReportRecordContract { + @doc("API identifier path. /apis/{apiId}") + apiId?: string; + + @doc("Operation identifier path. /apis/{apiId}/operations/{operationId}") + operationId?: string; + + @doc("Product identifier path. /products/{productId}") + @visibility("read") + productId?: string; + + @doc("User identifier path. /users/{userId}") + @visibility("read") + userId?: string; + + @doc("The HTTP method associated with this request..") + method?: string; + + @doc("The full URL associated with this request.") + url?: string; + + @doc("The client IP address associated with this request.") + ipAddress?: string; + + @doc("The HTTP status code received by the gateway as a result of forwarding this request to the backend.") + backendResponseCode?: string; + + @doc("The HTTP status code returned by the gateway.") + responseCode?: int32; + + @doc("The size of the response returned by the gateway.") + responseSize?: int32; + + @doc("The date and time when this request was received by the gateway in ISO 8601 format.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timestamp?: utcDateTime; + + @doc("Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend.") + cache?: string; + + @doc("The total time it took to process this request.") + apiTime?: float32; + + @doc("he time it took to forward this request to the backend and get the response back.") + serviceTime?: float32; + + @doc("Azure region where the gateway that processed this request is located.") + apiRegion?: string; + + @doc("Subscription identifier path. /subscriptions/{subscriptionId}") + subscriptionId?: string; + + @doc("Request Identifier.") + requestId?: string; + + @doc("The size of this request..") + requestSize?: int32; +} + +@doc("Schema create or update contract Properties.") +model GlobalSchemaContractProperties { + @doc("Schema Type. Immutable.") + schemaType: SchemaType; + + @doc("Free-form schema entity description.") + description?: string; + + @doc("Json-encoded string for non json-based schema.") + value?: unknown; + + @doc("Global Schema document object for json-based schema formats(e.g. json schema).") + document?: Record; +} + +@doc("Tenant access information contract of the API Management service.") +model TenantSettingsContractProperties { + @doc("Tenant settings") + settings?: Record; +} + +@doc("The List Resource Skus operation response.") +model ApiManagementSkusResult is Azure.Core.Page; + +@doc("Describes an available ApiManagement SKU.") +model ApiManagementSku { + @doc("The type of resource the SKU applies to.") + @visibility("read") + resourceType?: string; + + @doc("The name of SKU.") + @visibility("read") + name?: string; + + @doc("Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic**") + @visibility("read") + tier?: string; + + @doc("The Size of the SKU.") + @visibility("read") + size?: string; + + @doc("The Family of this particular SKU.") + @visibility("read") + family?: string; + + @doc("The Kind of resources that are supported in this SKU.") + @visibility("read") + kind?: string; + + @doc("Specifies the number of virtual machines in the scale set.") + @visibility("read") + capacity?: ApiManagementSkuCapacity; + + @doc("The set of locations that the SKU is available.") + @visibility("read") + locations?: string[]; + + @doc("A list of locations and availability zones in those locations where the SKU is available.") + @visibility("read") + locationInfo?: ApiManagementSkuLocationInfo[]; + + @doc("The api versions that support this SKU.") + @visibility("read") + apiVersions?: string[]; + + @doc("Metadata for retrieving price info.") + @visibility("read") + costs?: ApiManagementSkuCosts[]; + + @doc("A name value pair to describe the capability.") + @visibility("read") + capabilities?: ApiManagementSkuCapabilities[]; + + @doc("The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.") + @visibility("read") + restrictions?: ApiManagementSkuRestrictions[]; +} + +@doc("Describes scaling information of a SKU.") +model ApiManagementSkuCapacity { + @doc("The minimum capacity.") + @visibility("read") + minimum?: int32; + + @doc("The maximum capacity that can be set.") + @visibility("read") + maximum?: int32; + + @doc("The default capacity.") + @visibility("read") + default?: int32; + + @doc("The scale type applicable to the sku.") + @visibility("read") + scaleType?: ApiManagementSkuCapacityScaleType; +} + +model ApiManagementSkuLocationInfo { + @doc("Location of the SKU") + @visibility("read") + location?: string; + + @doc("List of availability zones where the SKU is supported.") + @visibility("read") + zones?: string[]; + + @doc("Details of capabilities available to a SKU in specific zones.") + @visibility("read") + zoneDetails?: ApiManagementSkuZoneDetails[]; +} + +@doc("Describes The zonal capabilities of a SKU.") +model ApiManagementSkuZoneDetails { + @doc("The set of zones that the SKU is available in with the specified capabilities.") + @visibility("read") + name?: string[]; + + @doc("A list of capabilities that are available for the SKU in the specified list of zones.") + @visibility("read") + capabilities?: ApiManagementSkuCapabilities[]; +} + +@doc("Describes The SKU capabilities object.") +model ApiManagementSkuCapabilities { + @doc("An invariant to describe the feature.") + @visibility("read") + name?: string; + + @doc("An invariant if the feature is measured by quantity.") + @visibility("read") + value?: string; +} + +@doc("Describes metadata for retrieving price info.") +model ApiManagementSkuCosts { + @doc("Used for querying price from commerce.") + @visibility("read") + meterID?: string; + + @doc("The multiplier is needed to extend the base metered cost.") + @visibility("read") + quantity?: int32; + + @doc("An invariant to show the extended unit.") + @visibility("read") + extendedUnit?: string; +} + +@doc("Describes scaling information of a SKU.") +model ApiManagementSkuRestrictions { + @doc("The type of restrictions.") + @visibility("read") + type?: ApiManagementSkuRestrictionsType; + + @doc("The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.") + @visibility("read") + values?: string[]; + + @doc("The information about the restriction where the SKU cannot be used.") + @visibility("read") + restrictionInfo?: ApiManagementSkuRestrictionInfo; + + @doc("The reason for restriction.") + @visibility("read") + reasonCode?: ApiManagementSkuRestrictionsReasonCode; +} + +model ApiManagementSkuRestrictionInfo { + @doc("Locations where the SKU is restricted") + @visibility("read") + locations?: string[]; + + @doc("List of availability zones where the SKU is restricted.") + @visibility("read") + zones?: string[]; +} + +@doc("Subscription create details.") +model SubscriptionCreateParameters { + @doc("Subscription contract properties.") + properties?: SubscriptionCreateParameterProperties; +} + +@doc("Parameters supplied to the Create subscription operation.") +model SubscriptionCreateParameterProperties { + @doc("User (user id path) for whom subscription is being created in form /users/{userId}") + ownerId?: string; + + @doc("Scope like /products/{productId} or /apis or /apis/{apiId}.") + scope: string; + + @doc("Subscription name.") + @maxLength(100) + @minLength(1) + displayName: string; + + @doc("Primary subscription key. If not specified during request key will be generated automatically.") + @maxLength(256) + @minLength(1) + primaryKey?: string; + + @doc("Secondary subscription key. If not specified during request key will be generated automatically.") + @maxLength(256) + @minLength(1) + secondaryKey?: string; + + @doc("Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.") + state?: SubscriptionState; + + @doc("Determines whether tracing can be enabled") + allowTracing?: boolean; +} + +@doc("Subscription keys.") +model SubscriptionKeysContract { + @doc("Subscription primary key.") + @maxLength(256) + @minLength(1) + primaryKey?: string; + + @doc("Subscription secondary key.") + @maxLength(256) + @minLength(1) + secondaryKey?: string; +} + +@doc("Parameters supplied to Create/Update Tag operations.") +model TagCreateUpdateParameters { + @doc("Properties supplied to Create Tag operation.") + properties?: TagContractProperties; +} + +@doc("Tenant access information contract of the API Management service.") +model AccessInformationContractProperties { + @doc("Access Information type ('access' or 'gitAccess')") + id?: string; + + @doc("Principal (User) Identifier.") + principalId?: string; + + @doc("Determines whether direct access is enabled.") + enabled?: boolean; +} + +@doc("Tenant access information update parameters.") +model AccessInformationCreateParameters { + @doc("Tenant access information update parameter properties.") + properties?: AccessInformationCreateParameterProperties; +} + +@doc("Tenant access information update parameters of the API Management service") +model AccessInformationCreateParameterProperties { + @doc("Principal (User) Identifier.") + principalId?: string; + + @doc("Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + primaryKey?: string; + + @doc("Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + secondaryKey?: string; + + @doc("Determines whether direct access is enabled.") + enabled?: boolean; +} + +@doc("Tenant access information contract of the API Management service.") +model AccessInformationSecretsContract { + @doc("Access Information type ('access' or 'gitAccess')") + id?: string; + + @doc("Principal (User) Identifier.") + principalId?: string; + + @doc("Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + primaryKey?: string; + + @doc("Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + secondaryKey?: string; + + @doc("Determines whether direct access is enabled.") + enabled?: boolean; +} + +@doc("Deploy Tenant Configuration Contract.") +model DeployConfigurationParameters { + @doc("Deploy Configuration Parameter contract properties.") + properties?: DeployConfigurationParameterProperties; +} + +@doc("Parameters supplied to the Deploy Configuration operation.") +model DeployConfigurationParameterProperties { + @doc("The name of the Git branch from which the configuration is to be deployed to the configuration database.") + branch: string; + + @doc("The value enforcing deleting subscriptions to products that are deleted in this update.") + force?: boolean; +} + +@doc("Long Running Git Operation Results.") +model OperationResultContract extends Resource { + @doc("Properties of the Operation Contract.") + properties?: OperationResultContractProperties; +} + +@doc("Operation Result.") +model OperationResultContractProperties { + @doc("Operation result identifier.") + id?: string; + + @doc("Status of an async operation.") + status?: AsyncOperationStatus; + + @doc(""" +Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + started?: utcDateTime; + + @doc(""" +Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + updated?: utcDateTime; + + @doc("Optional result info.") + resultInfo?: string; + + @doc("Error Body Contract") + error?: ErrorResponseBody; + + @doc("This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation.") + @visibility("read") + actionLog?: OperationResultLogItemContract[]; +} + +@doc("Log of the entity being created, updated or deleted.") +model OperationResultLogItemContract { + @doc("The type of entity contract.") + objectType?: string; + + @doc("Action like create/update/delete.") + action?: string; + + @doc("Identifier of the entity being created/updated/deleted.") + objectKey?: string; +} + +@doc("Save Tenant Configuration Contract details.") +model SaveConfigurationParameter { + @doc("Properties of the Save Configuration Parameters.") + properties?: SaveConfigurationParameterProperties; +} + +@doc("Parameters supplied to the Save Tenant Configuration operation.") +model SaveConfigurationParameterProperties { + @doc("The name of the Git branch in which to commit the current configuration snapshot.") + branch: string; + + @doc("The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten.") + force?: boolean; +} + +@doc("Result of Tenant Configuration Sync State.") +model TenantConfigurationSyncStateContract extends Resource { + @doc("Properties returned Tenant Configuration Sync State check.") + properties?: TenantConfigurationSyncStateContractProperties; +} + +@doc("Tenant Configuration Synchronization State.") +model TenantConfigurationSyncStateContractProperties { + @doc("The name of Git branch.") + branch?: string; + + @doc("The latest commit Id.") + commitId?: string; + + @doc("value indicating if last sync was save (true) or deploy (false) operation.") + isExport?: boolean; + + @doc("value indicating if last synchronization was later than the configuration change.") + isSynced?: boolean; + + @doc("value indicating whether Git configuration access is enabled.") + isGitEnabled?: boolean; + + @doc(""" +The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + syncDate?: utcDateTime; + + @doc(""" +The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + configurationChangeDate?: utcDateTime; + + @doc("Most recent tenant configuration operation identifier") + lastOperationId?: string; +} + +@doc("User create details.") +model UserCreateParameters { + @doc("User entity create contract properties.") + properties?: UserCreateParameterProperties; +} + +@doc("Parameters supplied to the Create User operation.") +model UserCreateParameterProperties extends UserEntityBaseParameters { + @doc("Email address. Must not be empty and must be unique within the service instance.") + @maxLength(254) + @minLength(1) + email: string; + + @doc("First name.") + @maxLength(100) + @minLength(1) + firstName: string; + + @doc("Last name.") + @maxLength(100) + @minLength(1) + lastName: string; + + @doc("User Password. If no value is provided, a default password is generated.") + password?: string; + + @doc("Determines the type of application which send the create user request. Default is legacy portal.") + appType?: AppType; + + @doc("Determines the type of confirmation e-mail that will be sent to the newly created user.") + confirmation?: Confirmation; +} + +@doc("Generate SSO Url operations response details.") +model GenerateSsoUrlResult { + @doc("Redirect Url containing the SSO URL value.") + value?: string; +} + +@doc("List of Users Identity list representation.") +model UserIdentityListResult is Azure.Core.Page { + @doc("Total record count number across all pages.") + count?: int32; +} + +@doc("Get User Token parameters.") +model UserTokenParameters { + @doc("User Token Parameter contract properties.") + properties?: UserTokenParameterProperties; +} + +@doc("Parameters supplied to the Get User Token operation.") +model UserTokenParameterProperties { + @doc("The Key to be used to generate token for user.") + keyType: KeyType; + + @doc(""" +The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + +""") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expiry: utcDateTime; +} + +@doc("Get User Token response details.") +model UserTokenResult { + @doc("Shared Access Authorization token for the User.") + value?: string; +} + +@doc("Object used to create an API Revision or Version based on an existing API Revision") +model ApiRevisionInfoContract { + @doc("Resource identifier of API to be used to create the revision from.") + sourceApiId?: string; + + @doc("Version identifier for the new API Version.") + @maxLength(100) + apiVersionName?: string; + + @doc("Description of new API Revision.") + @maxLength(256) + apiRevisionDescription?: string; + + @doc("Version set details") + apiVersionSet?: ApiVersionSetContractDetails; +} + +@doc("Quota counter value details.") +model QuotaCounterValueContract { + @doc("Quota counter Value Properties.") + value?: QuotaCounterValueContractProperties; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp new file mode 100644 index 0000000000..0ffcfed5d5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp @@ -0,0 +1,1522 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace Azure.ResourceManager.ApiManagement; + +interface TagOperations { + @doc("Lists all Tags associated with the API.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags") + @get + ListByApi is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + TagListResult + >; + + @doc("Gets the entity state version of the tag specified by its identifier.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}") + @head + GetEntityStateByApi is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string; + + @doc("Tag identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Get tag associated with the API.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}") + @get + GetByApi is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string; + + @doc("Tag identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + TagContract + >; + + @doc("Assign tag to the Api.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}") + @put + AssignToApi is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string; + + @doc("Tag identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + TagContract + >; + + @doc("Detach the tag from the Api.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}") + @delete + DetachFromApi is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string; + + @doc("Tag identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Lists all Tags associated with the Product.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags") + @get + ListByProduct is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Product identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + productId: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + TagListResult + >; + + @doc("Gets the entity state version of the tag specified by its identifier.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}") + @head + GetEntityStateByProduct is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Product identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + productId: string; + + @doc("Tag identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Get tag associated with the Product.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}") + @get + GetByProduct is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Product identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + productId: string; + + @doc("Tag identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + TagContract + >; + + @doc("Assign tag to the Product.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}") + @put + AssignToProduct is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Product identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + productId: string; + + @doc("Tag identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + TagContract + >; + + @doc("Detach the tag from the Product.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}") + @delete + DetachFromProduct is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Product identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + productId: string; + + @doc("Tag identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Lists a collection of tags defined within a service instance.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags") + @get + ListByService is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Scope like 'apis', 'products' or 'apis/{apiId}") + @query("scope") + scope?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + TagListResult + >; + + @doc("Gets the entity state version of the tag specified by its identifier.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") + @head + GetEntityState is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Tag identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Gets the details of the tag specified by its identifier.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Tag identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + TagContract + >; + + @doc("Creates a tag.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Tag identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("Create parameters.") + @body + parameters: TagCreateUpdateParameters; + }, + TagContract + >; + + @doc("Updates the details of the tag specified by its identifier.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") + @patch + Update is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Tag identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("Update parameters.") + @body + parameters: TagCreateUpdateParameters; + }, + TagContract + >; + + @doc("Deletes specific tag of the API Management service instance.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Tag identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; +} + +interface ApiPolicyOperations { + @doc("Get the policy configuration at the API level.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies") + @get + ListByApi is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + PolicyListResult + >; + + @doc("Gets the entity state (Etag) version of the API policy specified by its identifier.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}") + @head + GetEntityTag is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string; + + @doc("The identifier of the Policy.") + @path + policyId: PolicyIdName; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Get the policy configuration at the API level.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string; + + @doc("The identifier of the Policy.") + @path + policyId: PolicyIdName; + + @doc("Policy Export Format.") + @query("format") + format?: PolicyExportFormat = "xml"; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("Accept header") + @header + accept: "application/json, application/vnd.ms-azure-apim.policy+xml, application/vnd.ms-azure-apim.policy.raw+xml"; + }, + PolicyContract + >; + + @doc("Creates or updates policy configuration for the API.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string; + + @doc("The identifier of the Policy.") + @path + policyId: PolicyIdName; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("The policy contents to apply.") + @body + parameters: PolicyContract; + }, + PolicyContract + >; + + @doc("Deletes the policy configuration at the Api.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string; + + @doc("The identifier of the Policy.") + @path + policyId: PolicyIdName; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; +} + +interface ApiExportOperations { + @doc("Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string; + + @doc("Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes.") + @query("format") + format: ExportFormat; + + @doc("Query parameter required to export the API details.") + @query("export") + export: ExportApi; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ApiExportResult + >; +} + +interface DiagnosticOperations { + @doc("Lists all diagnostics of the API Management service instance.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics") + @get + ListByService is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + DiagnosticListResult + >; + + @doc("Gets the entity state (Etag) version of the Diagnostic specified by its identifier.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") + @head + GetEntityTag is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Diagnostic identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + diagnosticId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Gets the details of the Diagnostic specified by its identifier.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Diagnostic identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + diagnosticId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + DiagnosticContract + >; + + @doc("Creates a new Diagnostic or updates an existing one.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Diagnostic identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + diagnosticId: string; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("Create parameters.") + @body + parameters: DiagnosticContract; + }, + DiagnosticContract + >; + + @doc("Updates the details of the Diagnostic specified by its identifier.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") + @patch + Update is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Diagnostic identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + diagnosticId: string; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("Diagnostic Update parameters.") + @body + parameters: DiagnosticContract; + }, + DiagnosticContract + >; + + @doc("Deletes the specified Diagnostic.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Diagnostic identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + diagnosticId: string; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; +} + +interface IssueOperations { + @doc("Lists a collection of issues in the specified service instance.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues") + @get + ListByService is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + IssueListResult + >; + + @doc("Gets API Management issue details") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Issue identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + issueId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + IssueContract + >; +} + +interface PolicyOperations { + @doc("Lists all the Global Policy definitions of the Api Management service.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies") + @get + ListByService is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + PolicyListResult + >; + + @doc("Gets the entity state (Etag) version of the Global policy definition in the Api Management service.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}") + @head + GetEntityTag is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("The identifier of the Policy.") + @path + policyId: PolicyIdName; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Get the Global policy definition of the Api Management service.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("The identifier of the Policy.") + @path + policyId: PolicyIdName; + + @doc("Policy Export Format.") + @query("format") + format?: PolicyExportFormat = "xml"; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + PolicyContract + >; + + @doc("Creates or updates the global policy configuration of the Api Management service.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("The identifier of the Policy.") + @path + policyId: PolicyIdName; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("The policy contents to apply.") + @body + parameters: PolicyContract; + }, + PolicyContract + >; + + @doc("Deletes the global policy configuration of the Api Management Service.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("The identifier of the Policy.") + @path + policyId: PolicyIdName; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; +} + +interface ProductPolicyOperations { + @doc("Get the policy configuration at the Product level.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies") + @get + ListByProduct is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Product identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + productId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + PolicyListResult + >; + + @doc("Get the ETag of the policy configuration at the Product level.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}") + @head + GetEntityTag is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Product identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + productId: string; + + @doc("The identifier of the Policy.") + @path + policyId: PolicyIdName; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Get the policy configuration at the Product level.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Product identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + productId: string; + + @doc("The identifier of the Policy.") + @path + policyId: PolicyIdName; + + @doc("Policy Export Format.") + @query("format") + format?: PolicyExportFormat = "xml"; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + PolicyContract + >; + + @doc("Creates or updates policy configuration for the Product.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Product identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + productId: string; + + @doc("The identifier of the Policy.") + @path + policyId: PolicyIdName; + + @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + @header + `If-Match`?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("The policy contents to apply.") + @body + parameters: PolicyContract; + }, + PolicyContract + >; + + @doc("Deletes the policy configuration at the Product.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Product identifier. Must be unique in the current API Management service instance.") + @maxLength(256) + @minLength(1) + @path + productId: string; + + @doc("The identifier of the Policy.") + @path + policyId: PolicyIdName; + + @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + @header + `If-Match`: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; +} + +interface ApiManagementSkusOperations { + @doc("Gets the list of Microsoft.ApiManagement SKUs available for your Subscription.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/skus") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ApiManagementSkusResult + >; +} + +interface UserSubscriptionOperations { + @doc("Lists the collection of subscriptions of the specified user.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("User identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @path + userId: string; + + @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|------------------------|-----------------------------------|
    |name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + @query("$filter") + $filter?: string; + + @doc("Number of records to return.") + @minValue(1) + @query("$top") + $top?: int32; + + @doc("Number of records to skip.") + @query("$skip") + $skip?: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + SubscriptionListResult + >; + + @doc("Gets the specified Subscription entity associated with a particular user.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions/{sid}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("User identifier. Must be unique in the current API Management service instance.") + @maxLength(80) + @minLength(1) + @path + userId: string; + + @doc("Subscription entity Identifier. The entity represents the association between a user and a product in API Management.") + @maxLength(256) + @pattern("^[^*#&+:<>?]+$") + @path + sid: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + SubscriptionContract + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..691f3c1b0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/azureintegrationspaces.md b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/azureintegrationspaces.md new file mode 100644 index 0000000000..83ba887bcc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/azureintegrationspaces.md @@ -0,0 +1,9 @@ +```yaml +require: https://github.com/Azure/azure-rest-api-specs/blob/04a97e3c6d55746bf9349b16e8d1c2fe2fa942af/specification/azureintegrationspaces/resource-manager/readme.md +title: "Azure Integration Spaces resource management API." +clear-output-folder: false +guessResourceKey: false +isAzureSpec: true +isArm: true +namespace: "Microsoft.IntegrationSpaces" +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/resources.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/resources.json new file mode 100644 index 0000000000..ea1328d95e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/resources.json @@ -0,0 +1,435 @@ +{ + "Resources": { + "Space": { + "Name": "Space", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}", + "Method": "GET", + "OperationID": "Spaces_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Space" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}", + "Method": "PUT", + "OperationID": "Spaces_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a Space" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}", + "Method": "PATCH", + "OperationID": "Spaces_Patch", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update a Space" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}", + "Method": "DELETE", + "OperationID": "Spaces_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a Space" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces", + "Method": "GET", + "OperationID": "Spaces_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Space resources by resource group" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetSpaces", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.IntegrationSpaces/spaces", + "Method": "GET", + "OperationID": "Spaces_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Space resources by subscription ID" + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "Space", + "ResourceType": "Microsoft.IntegrationSpaces/spaces", + "ResourceKey": "spaceName", + "ResourceKeySegment": "spaces", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Application": { + "Name": "Application", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}", + "Method": "GET", + "OperationID": "Applications_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Application" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}", + "Method": "PUT", + "OperationID": "Applications_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a Application" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}", + "Method": "PATCH", + "OperationID": "Applications_Patch", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update a Application" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}", + "Method": "DELETE", + "OperationID": "Applications_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a Application" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications", + "Method": "GET", + "OperationID": "Applications_ListBySpace", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySpace", + "NextPageMethod": "ListBySpaceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Application resources by Space" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "DeleteBusinessProcessDevelopmentArtifact", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/deleteBusinessProcessDevelopmentArtifact", + "Method": "POST", + "OperationID": "Applications_DeleteBusinessProcessDevelopmentArtifact", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The delete business process development artifact action." + }, + { + "Name": "GetBusinessProcessDevelopmentArtifact", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/getBusinessProcessDevelopmentArtifact", + "Method": "POST", + "OperationID": "Applications_GetBusinessProcessDevelopmentArtifact", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The get business process development artifact action." + }, + { + "Name": "GetBusinessProcessDevelopmentArtifacts", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/listBusinessProcessDevelopmentArtifacts", + "Method": "POST", + "OperationID": "Applications_ListBusinessProcessDevelopmentArtifacts", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBusinessProcessDevelopmentArtifacts", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "The list business process development artifacts action." + }, + { + "Name": "SaveBusinessProcessDevelopmentArtifact", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/saveBusinessProcessDevelopmentArtifact", + "Method": "POST", + "OperationID": "Applications_SaveBusinessProcessDevelopmentArtifact", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The save business process development artifact action." + }, + { + "Name": "ValidateBusinessProcessDevelopmentArtifact", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/validateBusinessProcessDevelopmentArtifact", + "Method": "POST", + "OperationID": "Applications_ValidateBusinessProcessDevelopmentArtifact", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The validate business process development artifact action." + } + ], + "Parents": ["Space"], + "SwaggerModelName": "Application", + "ResourceType": "Microsoft.IntegrationSpaces/spaces/applications", + "ResourceKey": "applicationName", + "ResourceKeySegment": "applications", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "BusinessProcess": { + "Name": "BusinessProcess", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/businessProcesses/{businessProcessName}", + "Method": "GET", + "OperationID": "BusinessProcesses_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a BusinessProcess" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/businessProcesses/{businessProcessName}", + "Method": "PUT", + "OperationID": "BusinessProcesses_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a BusinessProcess" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/businessProcesses/{businessProcessName}", + "Method": "PATCH", + "OperationID": "BusinessProcesses_Patch", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update a BusinessProcess" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/businessProcesses/{businessProcessName}", + "Method": "DELETE", + "OperationID": "BusinessProcesses_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a BusinessProcess" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/businessProcesses", + "Method": "GET", + "OperationID": "BusinessProcesses_ListByApplication", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByApplication", + "NextPageMethod": "ListByApplicationNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List BusinessProcess resources by Application" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["Application"], + "SwaggerModelName": "BusinessProcess", + "ResourceType": "Microsoft.IntegrationSpaces/spaces/applications/businessProcesses", + "ResourceKey": "businessProcessName", + "ResourceKeySegment": "businessProcesses", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "BusinessProcessVersion": { + "Name": "BusinessProcessVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/businessProcesses/{businessProcessName}/versions/{businessProcessVersion}", + "Method": "GET", + "OperationID": "BusinessProcessVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a BusinessProcessVersion" + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/businessProcesses/{businessProcessName}/versions", + "Method": "GET", + "OperationID": "BusinessProcessVersions_ListByBusinessProcess", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByBusinessProcess", + "NextPageMethod": "ListByBusinessProcessNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List BusinessProcessVersion resources by BusinessProcess" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["BusinessProcess"], + "SwaggerModelName": "BusinessProcessVersion", + "ResourceType": "Microsoft.IntegrationSpaces/spaces/applications/businessProcesses/versions", + "ResourceKey": "businessProcessVersion", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "InfrastructureResource": { + "Name": "InfrastructureResource", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/infrastructureResources/{infrastructureResourceName}", + "Method": "GET", + "OperationID": "InfrastructureResources_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a InfrastructureResource" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/infrastructureResources/{infrastructureResourceName}", + "Method": "PUT", + "OperationID": "InfrastructureResources_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a InfrastructureResource" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/infrastructureResources/{infrastructureResourceName}", + "Method": "PATCH", + "OperationID": "InfrastructureResources_Patch", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update a InfrastructureResource" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/infrastructureResources/{infrastructureResourceName}", + "Method": "DELETE", + "OperationID": "InfrastructureResources_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a InfrastructureResource" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/infrastructureResources", + "Method": "GET", + "OperationID": "InfrastructureResources_ListBySpace", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySpace", + "NextPageMethod": "ListBySpaceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List InfrastructureResource resources by Space" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["Space"], + "SwaggerModelName": "InfrastructureResource", + "ResourceType": "Microsoft.IntegrationSpaces/spaces/infrastructureResources", + "ResourceKey": "infrastructureResourceName", + "ResourceKeySegment": "infrastructureResources", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp new file mode 100644 index 0000000000..be045c6865 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp @@ -0,0 +1,108 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Space.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.IntegrationSpaces; +@doc("An integration application under space.") +@parentResource(Space) +model Application is TrackedResource { + @doc("The name of the Application") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + @key("applicationName") + @segment("applications") + name: string; +} + +@armResourceOperations +interface Applications { + @doc("Get a Application") + get is ArmResourceRead; + @doc("Create a Application") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update a Application") + patch is ArmResourcePatchSync; + @doc("Delete a Application") + delete is ArmResourceDeleteSync; + @doc("List Application resources by Space") + listBySpace is ArmResourceListByParent< + Application, + { + ...BaseParameters; + + @doc("The number of result items to return.") + @query("top") + top?: int32; + + @doc("The number of result items to skip.") + @query("skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("maxpagesize") + maxpagesize?: int32; + + @doc("Filter the result list using the given expression.") + @query("filter") + filter?: string; + + @doc("Select the specified fields to be included in the response.") + @query({ + name: "select", + format: "multi", + }) + select?: string[]; + + @doc("Expand the indicated resources into the response.") + @query({ + name: "expand", + format: "multi", + }) + expand?: string[]; + + @doc("Expressions that specify the order of returned results.") + @query({ + name: "orderby", + format: "multi", + }) + orderby?: string[]; + } + >; + @doc("The delete business process development artifact action.") + deleteBusinessProcessDevelopmentArtifact is ArmResourceActionSync< + Application, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest, + void + >; + @doc("The get business process development artifact action.") + getBusinessProcessDevelopmentArtifact is ArmResourceActionSync< + Application, + GetOrDeleteBusinessProcessDevelopmentArtifactRequest, + SaveOrGetBusinessProcessDevelopmentArtifactResponse + >; + @doc("The list business process development artifacts action.") + listBusinessProcessDevelopmentArtifacts is ArmResourceActionSync< + Application, + void, + ListBusinessProcessDevelopmentArtifactsResponse + >; + @doc("The save business process development artifact action.") + saveBusinessProcessDevelopmentArtifact is ArmResourceActionSync< + Application, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest, + SaveOrGetBusinessProcessDevelopmentArtifactResponse + >; + @doc("The validate business process development artifact action.") + validateBusinessProcessDevelopmentArtifact is ArmResourceActionSync< + Application, + SaveOrValidateBusinessProcessDevelopmentArtifactRequest, + void + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp new file mode 100644 index 0000000000..ffa0eae773 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp @@ -0,0 +1,78 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Application.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.IntegrationSpaces; +@doc("A business process under application.") +@parentResource(Application) +model BusinessProcess is ProxyResource { + @doc("The name of the business process") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + @key("businessProcessName") + @segment("businessProcesses") + name: string; +} + +@armResourceOperations +interface BusinessProcesses { + @doc("Get a BusinessProcess") + get is ArmResourceRead; + @doc("Create a BusinessProcess") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update a BusinessProcess") + patch is ArmResourcePatchSync; + @doc("Delete a BusinessProcess") + delete is ArmResourceDeleteSync; + @doc("List BusinessProcess resources by Application") + listByApplication is ArmResourceListByParent< + BusinessProcess, + { + ...BaseParameters; + + @doc("The number of result items to return.") + @query("top") + top?: int32; + + @doc("The number of result items to skip.") + @query("skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("maxpagesize") + maxpagesize?: int32; + + @doc("Filter the result list using the given expression.") + @query("filter") + filter?: string; + + @doc("Select the specified fields to be included in the response.") + @query({ + name: "select", + format: "multi", + }) + select?: string[]; + + @doc("Expand the indicated resources into the response.") + @query({ + name: "expand", + format: "multi", + }) + expand?: string[]; + + @doc("Expressions that specify the order of returned results.") + @query({ + name: "orderby", + format: "multi", + }) + orderby?: string[]; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp new file mode 100644 index 0000000000..d741ea02d4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp @@ -0,0 +1,71 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./BusinessProcess.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.IntegrationSpaces; +@doc("A business process version.") +@parentResource(BusinessProcess) +model BusinessProcessVersion is ProxyResource { + @doc("The version of the business process") + @path + @key("businessProcessVersion") + @segment("versions") + name: string; +} + +@armResourceOperations +interface BusinessProcessVersions { + @doc("Get a BusinessProcessVersion") + get is ArmResourceRead; + @doc("List BusinessProcessVersion resources by BusinessProcess") + listByBusinessProcess is ArmResourceListByParent< + BusinessProcessVersion, + { + ...BaseParameters; + + @doc("The number of result items to return.") + @query("top") + top?: int32; + + @doc("The number of result items to skip.") + @query("skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("maxpagesize") + maxpagesize?: int32; + + @doc("Filter the result list using the given expression.") + @query("filter") + filter?: string; + + @doc("Select the specified fields to be included in the response.") + @query({ + name: "select", + format: "multi", + }) + select?: string[]; + + @doc("Expand the indicated resources into the response.") + @query({ + name: "expand", + format: "multi", + }) + expand?: string[]; + + @doc("Expressions that specify the order of returned results.") + @query({ + name: "orderby", + format: "multi", + }) + orderby?: string[]; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp new file mode 100644 index 0000000000..13a2545d77 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp @@ -0,0 +1,82 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Space.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.IntegrationSpaces; +@doc("An infrastructure resource under Space.") +@parentResource(Space) +model InfrastructureResource + is ProxyResource { + @doc("The name of the infrastructure resource in the space.") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + @key("infrastructureResourceName") + @segment("infrastructureResources") + name: string; +} + +@armResourceOperations +interface InfrastructureResources { + @doc("Get a InfrastructureResource") + get is ArmResourceRead; + @doc("Create a InfrastructureResource") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update a InfrastructureResource") + patch is ArmResourcePatchSync< + InfrastructureResource, + InfrastructureResourceProperties + >; + @doc("Delete a InfrastructureResource") + delete is ArmResourceDeleteSync; + @doc("List InfrastructureResource resources by Space") + listBySpace is ArmResourceListByParent< + InfrastructureResource, + { + ...BaseParameters; + + @doc("The number of result items to return.") + @query("top") + top?: int32; + + @doc("The number of result items to skip.") + @query("skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("maxpagesize") + maxpagesize?: int32; + + @doc("Filter the result list using the given expression.") + @query("filter") + filter?: string; + + @doc("Select the specified fields to be included in the response.") + @query({ + name: "select", + format: "multi", + }) + select?: string[]; + + @doc("Expand the indicated resources into the response.") + @query({ + name: "expand", + format: "multi", + }) + expand?: string[]; + + @doc("Expressions that specify the order of returned results.") + @query({ + name: "orderby", + format: "multi", + }) + orderby?: string[]; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp new file mode 100644 index 0000000000..910f878013 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp @@ -0,0 +1,78 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.IntegrationSpaces; +@doc("An integration space.") +model Space is TrackedResource { + @doc("The name of the space") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + @key("spaceName") + @segment("spaces") + name: string; +} + +@armResourceOperations +interface Spaces { + @doc("Get a Space") + get is ArmResourceRead; + @doc("Create a Space") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update a Space") + patch is ArmResourcePatchSync; + @doc("Delete a Space") + delete is ArmResourceDeleteSync; + @doc("List Space resources by resource group") + listByResourceGroup is ArmResourceListByParent< + Space, + { + ...BaseParameters; + + @doc("The number of result items to return.") + @query("top") + top?: int32; + + @doc("The number of result items to skip.") + @query("skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("maxpagesize") + maxpagesize?: int32; + + @doc("Filter the result list using the given expression.") + @query("filter") + filter?: string; + + @doc("Select the specified fields to be included in the response.") + @query({ + name: "select", + format: "multi", + }) + select?: string[]; + + @doc("Expand the indicated resources into the response.") + @query({ + name: "expand", + format: "multi", + }) + expand?: string[]; + + @doc("Expressions that specify the order of returned results.") + @query({ + name: "orderby", + format: "multi", + }) + orderby?: string[]; + } + >; + @doc("List Space resources by subscription ID") + listBySubscription is ArmListBySubscription; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp new file mode 100644 index 0000000000..84136e5399 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp @@ -0,0 +1,33 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./Space.tsp"; +import "./Application.tsp"; +import "./BusinessProcess.tsp"; +import "./BusinessProcessVersion.tsp"; +import "./InfrastructureResource.tsp"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "Azure Integration Spaces resource management API.", +}) +@versioned(Versions) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) +@doc("The azure integration spaces resource provider.") +namespace Microsoft.IntegrationSpaces; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2023_11_14_preview: "2023-11-14-preview", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp new file mode 100644 index 0000000000..98612ec7e7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp @@ -0,0 +1,314 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; + +namespace Microsoft.IntegrationSpaces; + +interface Operations extends Azure.ResourceManager.Operations {} + +enum Origin { + user, + system, + `user,system`, +} + +enum ActionType { + Internal, +} + +enum ProvisioningState { + @doc("Resource has been created.") Succeeded, + @doc("Resource creation failed.") Failed, + @doc("Resource creation was canceled.") Canceled, + Provisioning, + Updating, + Deleting, + Accepted, +} + +enum CreatedByType { + User, + Application, + ManagedIdentity, + Key, +} + +@doc("The properties of space.") +model SpaceResourceProperties { + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("The description of the resource.") + description?: string; +} + +@doc("The properties of application.") +model ApplicationProperties { + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("The description of the resource.") + description?: string; + + @doc("The tracking data stores.") + trackingDataStores: Record; +} + +@doc("The properties of tracking data store.") +model TrackingDataStore { + @doc("The database name.") + databaseName: string; + + @doc("The data store resource id.") + dataStoreResourceId: string; + + @doc("The data store URI.") + dataStoreUri: string; + + @doc("The data store ingestion URI.") + dataStoreIngestionUri: string; +} + +@doc("The properties of business process.") +model BusinessProcessProperties { + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("The version of the business process.") + @visibility("read") + version?: string; + + @doc("The description of the business process.") + description?: string; + + @doc("The table name of the business process.") + tableName?: string; + + @doc("The tracking data store reference name.") + trackingDataStoreReferenceName?: string; + + @doc("The business process identifier.") + identifier?: BusinessProcessIdentifier; + + @doc("The business process stages.") + businessProcessStages?: Record; + + @doc("The business process mapping.") + businessProcessMapping?: Record; +} + +@doc("The properties of business process identifier.") +model BusinessProcessIdentifier { + @doc("The property name of the business process identifier.") + propertyName?: string; + + @doc("The property type of the business process identifier.") + propertyType?: string; +} + +@doc("The properties of business process stage.") +model BusinessProcessStage { + @doc("The description of the business stage.") + description?: string; + + @doc("The properties within the properties of the business process stage.") + properties?: Record; + + @doc("The property to keep track of stages before current in the business process stage.") + stagesBefore?: string[]; +} + +@doc("The properties of business process mapping.") +model BusinessProcessMappingItem { + @doc("The logic app resource id.") + logicAppResourceId?: string; + + @doc("The workflow name within the logic app.") + workflowName?: string; + + @doc("The operation name.") + operationName?: string; + + @doc("The mapping item operation type of the business process.") + operationType?: string; +} + +@doc("The business process development artifact get or delete request.") +model GetOrDeleteBusinessProcessDevelopmentArtifactRequest { + @doc("The name of the business process development artifact.") + name: string; +} + +@doc("The business process development artifact save or get response.") +model SaveOrGetBusinessProcessDevelopmentArtifactResponse { + @doc("The name of the business process development artifact.") + name: string; + + @doc("The system data of the business process development artifact.") + systemData?: BusinessProcessDevelopmentArtifactSystemData; + + @doc("The properties of the business process development artifact.") + properties?: BusinessProcessDevelopmentArtifactProperties; +} + +@doc("The system data for business process development artifact.") +model BusinessProcessDevelopmentArtifactSystemData { + @doc("The timestamp of last modification (UTC).") + lastModifiedAt?: string; +} + +@doc("The properties of business process development artifact.") +model BusinessProcessDevelopmentArtifactProperties { + @doc("The description of the business process.") + description?: string; + + @doc("The business process identifier.") + identifier?: BusinessProcessIdentifier; + + @doc("The business process stages.") + businessProcessStages?: Record; + + @doc("The business process mapping.") + businessProcessMapping?: Record; + + @doc("The tracking profile for the business process.") + trackingProfiles?: Record; +} + +@doc("The tracking profile for the business process") +model TrackingProfileDefinition { + @doc("The tracking definition schema uri.") + @projectedName("json", "$schema") + schema?: string; + + @doc("The business process reference.") + businessProcess?: BusinessProcessReference; + + @doc("The tracking definitions.") + trackingDefinitions?: Record; +} + +@doc("The business process reference.") +model BusinessProcessReference { + @doc("The business process name.") + name?: string; + + @doc("The business process version.") + version?: string; +} + +@doc("The workflow tracking definition.") +model FlowTrackingDefinition { + @doc("The tracking correlation context.") + correlationContext?: TrackingCorrelationContext; + + @doc("The tracking events.") + events?: Record; +} + +@doc("The tracking correlation context.") +model TrackingCorrelationContext { + @doc("The operation type for correlation context.") + operationType?: string; + + @doc("The operation name for correlation context.") + operationName?: string; + + @doc("The name of the correlation property.") + propertyName?: string; + + @doc("The template expression for correlation context property value.") + value?: string; +} + +@doc("The tracking event definition.") +model TrackingEventDefinition { + @doc("The operation type.") + operationType?: string; + + @doc("The operation name.") + operationName?: string; + + @doc("The properties to be collected for event.") + properties?: Record>; +} + +@doc("The business process development artifact get collection response.") +model ListBusinessProcessDevelopmentArtifactsResponse { + @doc("The list of the business process development artifact.") + value: SaveOrGetBusinessProcessDevelopmentArtifactResponse[]; +} + +@doc("The response of a ApplicationResource list operation.") +model ApplicationResourceListResult is Azure.Core.Page; + +@doc("A resource under application.") +model ApplicationResource extends ProxyResource { + @doc("The resource-specific properties for this resource.") + @visibility("read", "create") + properties?: ApplicationResourceProperties; +} + +@doc("The properties of application resource.") +model ApplicationResourceProperties { + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("The type of the application resource.") + resourceType: string; + + @doc("The Arm id of the application resource.") + resourceId: string; + + @doc("The kind of the application resource.") + resourceKind?: string; +} + +@doc("The type used for update operations of the ApplicationResource.") +model ApplicationResourceUpdate { + @doc("The updatable properties of the ApplicationResource.") + properties?: ApplicationResourceUpdateProperties; +} + +@doc("The updatable properties of the ApplicationResource.") +model ApplicationResourceUpdateProperties { + @doc("The type of the application resource.") + resourceType?: string; + + @doc("The Arm id of the application resource.") + resourceId?: string; + + @doc("The kind of the application resource.") + resourceKind?: string; +} + +@doc("The business process development artifact save or validate request.") +model SaveOrValidateBusinessProcessDevelopmentArtifactRequest { + @doc("The name of the business process development artifact.") + name: string; + + @doc("The properties of the business process development artifact.") + properties?: BusinessProcessDevelopmentArtifactProperties; +} + +@doc("The properties of infrastructure resource.") +model InfrastructureResourceProperties { + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("The type of the infrastructure resource.") + resourceType: string; + + @doc("The id of the infrastructure resource.") + resourceId: string; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp new file mode 100644 index 0000000000..ffd2fe0b2f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp @@ -0,0 +1,220 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace Microsoft.IntegrationSpaces; + +interface ApplicationResourcesOperations { + @doc("List ApplicationResource resources by Application") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources") + @get + ListByApplication is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("The number of result items to return.") + @query("top") + top?: int32; + + @doc("The number of result items to skip.") + @query("skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("maxpagesize") + maxpagesize?: int32; + + @doc("Filter the result list using the given expression.") + @query("filter") + filter?: string; + + @doc("Select the specified fields to be included in the response.") + @query({ + name: "select", + format: "multi", + }) + select?: string[]; + + @doc("Expand the indicated resources into the response.") + @query({ + name: "expand", + format: "multi", + }) + expand?: string[]; + + @doc("Expressions that specify the order of returned results.") + @query({ + name: "orderby", + format: "multi", + }) + orderby?: string[]; + + @doc("The name of the space") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + spaceName: string; + + @doc("The name of the Application") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + applicationName: string; + }, + ApplicationResourceListResult + >; + + @doc("Get a ApplicationResource") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("The name of the space") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + spaceName: string; + + @doc("The name of the Application") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + applicationName: string; + + @doc("The name of the application resource.") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + resourceName: string; + }, + ApplicationResource + >; + + @doc("Create a ApplicationResource") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("The name of the space") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + spaceName: string; + + @doc("The name of the Application") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + applicationName: string; + + @doc("The name of the application resource.") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + resourceName: string; + + @doc("Resource create parameters.") + @body + resource: ApplicationResource; + }, + ApplicationResource + >; + + @doc("Update a ApplicationResource") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") + @patch + Patch is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("The name of the space") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + spaceName: string; + + @doc("The name of the Application") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + applicationName: string; + + @doc("The name of the application resource.") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + resourceName: string; + + @doc("The resource properties to be updated.") + @body + properties: ApplicationResourceUpdate; + }, + ApplicationResource + >; + + @doc("Delete a ApplicationResource") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("The name of the space") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + spaceName: string; + + @doc("The name of the Application") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + applicationName: string; + + @doc("The name of the application resource.") + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + resourceName: string; + }, + void + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..691f3c1b0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/compute.md b/packages/extensions/openapi-to-typespec/test/arm-compute/compute.md new file mode 100644 index 0000000000..f4bfaf0294 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/compute.md @@ -0,0 +1,373 @@ +```yaml +require: https://github.com/Azure/azure-rest-api-specs/blob/cd53bce8cf73f7e7ba6cf5ab32baffbe529ae1fb/specification/compute/resource-manager/readme.md +title: "Azure Compute resource management API." +clear-output-folder: false +guessResourceKey: false +isAzureSpec: true +isArm: true +namespace: "Microsoft.Compute" +``` + +### Config for csharp + +```yaml +modelerfour: + flatten-payloads: false + +update-required-copy: + GalleryImage: OSType + +format-by-name-rules: + "tenantId": "uuid" + "etag": "etag" + "location": "azure-location" + "locations": "azure-location" + "*Uri": "Uri" + "*Uris": "Uri" + +keep-plural-enums: + - IntervalInMins + - VmGuestPatchClassificationForWindows # we have this because the generator will change windows to window which does not make sense + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + Vmos: VmOS + VMScaleSet: VirtualMachineScaleSet + VmScaleSet: VirtualMachineScaleSet + VmScaleSets: VirtualMachineScaleSets + VMScaleSets: VirtualMachineScaleSets + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag + SSD: Ssd + SAS: Sas + VCPUs: VCpus + LRS: Lrs + ZRS: Zrs + RestorePointCollection: RestorePointGroup # the word `collection` is reserved by the SDK, therefore we need to rename all the occurrences of this in all resources and models + EncryptionSettingsCollection: EncryptionSettingsGroup # the word `collection` is reserved by the SDK, therefore we need to rename all the occurrences of this in all resources and models + VHD: Vhd + VHDX: Vhdx + +list-exception: + - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointGroupName}/restorePoints/{restorePointName} # compute RP did not provide an API for listing this resource + - /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName} + +request-path-to-resource-name: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}: VirtualMachineScaleSetVmRunCommand + +# override-operation-name: +# VirtualMachines_Start: PowerOn +# VirtualMachineScaleSets_Start: PowerOn +# VirtualMachineScaleSetVMs_Start: PowerOn +# CloudServices_Start: PowerOn +# CloudServicesUpdateDomain_GetUpdateDomain: GetUpdateDomain +# CloudServicesUpdateDomain_ListUpdateDomains: GetUpdateDomains +# CloudServicesUpdateDomain_WalkUpdateDomain: WalkUpdateDomain +# GallerySharingProfile_Update: UpdateSharingProfile +# VirtualMachineImages_ListPublishers: GetVirtualMachineImagePublishers +# VirtualMachineImages_ListSkus: GetVirtualMachineImageSkus +# VirtualMachineImages_ListOffers: GetVirtualMachineImageOffers +# VirtualMachineImagesEdgeZone_ListSkus: GetVirtualMachineImageEdgeZoneSkus +# VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade: StartOSUpgrade +# LogAnalytics_ExportRequestRateByInterval: ExportLogAnalyticsRequestRateByInterval +# LogAnalytics_ExportThrottledRequests: ExportLogAnalyticsThrottledRequests +# ResourceSkus_List: GetComputeResourceSkus + +request-path-to-resource-data: + /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}: SharedGallery + /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}: SharedGalleryImage + /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions/{galleryImageVersionName}: SharedGalleryImageVersion + /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}: CommunityGallery + /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}: CommunityGalleryImage + /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}: CommunityGalleryImageVersion + +prepend-rp-prefix: + - UsageName + - UsageUnit + - ApiError + - ApiErrorBase + - DeleteOptions + - ResourceSku + - ResourceSkuCapacity + - ResourceSkuLocationInfo + - ResourceSkuRestrictions + - ResourceSkuRestrictionInfo + - ResourceSkuRestrictionsReasonCode + - ResourceSkuRestrictionsType + - ResourceSkuZoneDetails + - ResourceSkuCapacityScaleType + - EncryptionType + - PublicIPAddressSku + - PublicIPAddressSkuName + - PublicIPAddressSkuTier + - StatusLevelTypes + +# mgmt-debug: +# show-serialized-names: true + +rename-mapping: + # DiskSecurityTypes.ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey: ConfidentialVmGuestStateOnlyEncryptedWithPlatformKey + # SubResource: ComputeWriteableSubResourceData + # SubResourceReadOnly: ComputeSubResourceData + # HyperVGenerationType: HyperVGeneration + # HyperVGenerationTypes: HyperVGeneration + # VirtualMachineExtension.properties.type: ExtensionType + # VirtualMachineExtensionUpdate.properties.type: ExtensionType + # VirtualMachineScaleSetExtension.properties.type: ExtensionType + # VirtualMachineScaleSetExtensionUpdate.properties.type: ExtensionType + # VirtualMachineScaleSetVMExtension.properties.type: ExtensionType + # VirtualMachineScaleSetVMExtensionUpdate.properties.type: ExtensionType + # RollingUpgradeStatusInfo: VirtualMachineScaleSetRollingUpgrade + # OperatingSystemTypes: SupportedOperatingSystemType + # VirtualMachineImageResource: VirtualMachineImageBase + # RestorePointCollectionSourceProperties: RestorePointCollectionSource + # RestorePointExpandOptions: RestorePointExpand + # RestorePointCollectionExpandOptions: RestorePointCollectionExpand + # ImageReference.sharedGalleryImageId: sharedGalleryImageUniqueId + # UpdateResource: ComputeResourcePatch + # SubResourceWithColocationStatus: ComputeSubResourceDataWithColocationStatus + # SshPublicKey: SshPublicKeyConfiguration + # SshPublicKeyResource: SshPublicKey + # LogAnalyticsOperationResult: LogAnalytics + # PrivateLinkResource: ComputePrivateLinkResourceData + # PrivateLinkResource.properties.groupId: -|arm-id + # Disk: ManagedDisk + # Disk.managedBy: -|arm-id + # Disk.managedByExtended: -|arm-id + # Disk.properties.diskAccessId: -|arm-id + # DiskUpdate.properties.diskAccessId: -|arm-id + # DiskRestorePoint.properties.sourceResourceId: -|arm-id + # DiskRestorePoint.properties.diskAccessId: -|arm-id + # DiskRestorePoint.properties.sourceResourceLocation: -|azure-location + # Encryption: DiskEncryption + # Encryption.diskEncryptionSetId: -|arm-id + # Encryption.type: EncryptionType + # CreationData: DiskCreationData + # CreationData.storageAccountId: -|arm-id + # CreationData.sourceResourceId: -|arm-id + # Architecture: ArchitectureType + # OSFamily: CloudServiceOSFamily + # OSFamily.name: ResourceName + # OSFamily.properties.name: OSFamilyName + # OSVersion: CloudServiceOSVersion + # UpdateDomain: UpdateDomainIdentifier + # UpdateDomain.id: -|arm-id + # Extension: CloudServiceExtension + # RoleInstance: CloudServiceRoleInstance + # UpdateResourceDefinition: GalleryUpdateResourceData + StorageAccountType: ImageStorageAccountType +# SharingProfile.permissions: permission +# UserArtifactManage: UserArtifactManagement +# GalleryExpandParams: GalleryExpand +# PirResource: PirResourceData +# PirSharedGalleryResource: PirSharedGalleryResourceData +# PirCommunityGalleryResource: PirCommunityGalleryResourceData +# PirCommunityGalleryResource.type: ResourceType|resource-type +# ExpandTypesForGetCapacityReservationGroups: CapacityReservationGroupGetExpand +# ExpandTypesForGetVMScaleSets: VirtualMachineScaleSetGetExpand +# DedicatedHostGroup.properties.hosts: DedicatedHosts +# UefiSettings.secureBootEnabled: IsSecureBootEnabled +# UefiSettings.vTpmEnabled: IsVirtualTpmEnabled +# NetworkProfile: VirtualMachineNetworkProfile +# NetworkInterfaceReference: VirtualMachineNetworkInterfaceReference +# Image: DiskImage +# VMDiskSecurityProfile: VirtualMachineDiskSecurityProfile +# VmDiskTypes: VirtualMachineDiskType +# VMGalleryApplication: VirtualMachineGalleryApplication +# VMSizeProperties: VirtualMachineSizeProperties +# ManagedDiskParameters: VirtualMachineManagedDisk +# VirtualMachineScaleSetManagedDiskParameters: VirtualMachineScaleSetManagedDisk +# StorageProfile: VirtualMachineStorageProfile +# OSProfile: VirtualMachineOSProfile +# OSDisk: VirtualMachineOSDisk +# DataDisk: VirtualMachineDataDisk +# HardwareProfile: VirtualMachineHardwareProfile +# PublicNetworkAccess: DiskPublicNetworkAccess +# LoadBalancerConfiguration: CloudServiceLoadBalancerConfiguration +# LoadBalancerConfiguration.id: -|arm-id +# ReplicationMode: GalleryReplicationMode +# ReplicationState: RegionalReplicationState +# RunCommandResult: VirtualMachineRunCommandResult +# UpgradeMode: VirtualMachineScaleSetUpgradeMode +# UpgradePolicy: VirtualMachineScaleSetUpgradePolicy +# ResourceSkuCapabilities: ComputeResourceSkuCapabilities +# ProtocolTypes: WinRMListenerProtocolType +# VMGuestPatchClassificationLinux: VmGuestPatchClassificationForLinux +# VMGuestPatchClassificationWindows: VmGuestPatchClassificationForWindows +# VirtualMachineScaleSetExtension.type: ResourceType|resource-type +# VirtualMachineScaleSetExtensionUpdate.type: ResourceType|resource-type +# VirtualMachineScaleSetVMExtension.type: ResourceType|resource-type +# VirtualMachineScaleSetVMExtensionUpdate.type: ResourceType|resource-type +# VirtualMachineScaleSetSku.resourceType: ResourceType|resource-type +# VirtualMachineScaleSetVMInstanceView.assignedHost: -|arm-id +# RestorePointCollectionSourceProperties.id: -|arm-id +# SshPublicKeyGenerateKeyPairResult.id: -|arm-id +# Snapshot.properties.diskAccessId: -|arm-id +# SnapshotUpdate.properties.diskAccessId: -|arm-id +# DiskSecurityProfile.secureVMDiskEncryptionSetId: -|arm-id +# ImageDiskReference.id: -|arm-id +# DiskImageEncryption.diskEncryptionSetId: -|arm-id +# GalleryDiskImage.source: GallerySource +# GalleryDiskImageSource.storageAccountId: -|arm-id +# GalleryImageVersionStorageProfile.source: GallerySource +# GalleryArtifactVersionSource.id: -|arm-id +# VirtualMachineExtension.properties.protectedSettingsFromKeyVault: KeyVaultProtectedSettings +# VirtualMachineScaleSetExtension.properties.protectedSettingsFromKeyVault: KeyVaultProtectedSettings +# VirtualMachineScaleSetExtensionUpdate.properties.protectedSettingsFromKeyVault: KeyVaultProtectedSettings +# VirtualMachineScaleSetVMExtension.properties.protectedSettingsFromKeyVault: KeyVaultProtectedSettings +# VirtualMachineExtensionUpdate.properties.protectedSettingsFromKeyVault: KeyVaultProtectedSettings +# VirtualMachineScaleSetVMExtensionUpdate.properties.protectedSettingsFromKeyVault: KeyVaultProtectedSettings +# Disk.properties.optimizedForFrequentAttach: IsOptimizedForFrequentAttach +# DiskUpdate.properties.optimizedForFrequentAttach: IsOptimizedForFrequentAttach +# CreationData.performancePlus: IsPerformancePlusEnabled +# GalleryApplicationCustomActionParameter.required: IsRequired +# GalleryImageVersionSafetyProfile.reportedForPolicyViolation: IsReportedForPolicyViolation +# LinuxConfiguration.disablePasswordAuthentication: IsPasswordAuthenticationDisabled +# LinuxConfiguration.enableVMAgentPlatformUpdates: IsVMAgentPlatformUpdatesEnabled +# WindowsConfiguration.enableAutomaticUpdates: IsAutomaticUpdatesEnabled +# WindowsConfiguration.enableVMAgentPlatformUpdates: IsVMAgentPlatformUpdatesEnabled +# PolicyViolation: GalleryImageVersionPolicyViolation +# PolicyViolationCategory: GalleryImageVersionPolicyViolationCategory +# PriorityMixPolicy: VirtualMachineScaleSetPriorityMixPolicy +# CommunityGalleryImageVersion.properties.excludeFromLatest: IsExcludedFromLatest +# SharedGalleryImageVersion.properties.excludeFromLatest: IsExcludedFromLatest +# GalleryArtifactPublishingProfileBase.excludeFromLatest: IsExcludedFromLatest +# TargetRegion.excludeFromLatest: IsExcludedFromLatest +# VirtualMachineNetworkInterfaceConfiguration.properties.disableTcpStateTracking: IsTcpStateTrackingDisabled +# VirtualMachineScaleSetNetworkConfiguration.properties.disableTcpStateTracking: IsTcpStateTrackingDisabled +# VirtualMachineScaleSetUpdateNetworkConfiguration.properties.disableTcpStateTracking: IsTcpStateTrackingDisabled +# AlternativeOption: ImageAlternativeOption +# AlternativeType: ImageAlternativeType +# VirtualMachineScaleSet.properties.constrainedMaximumCapacity: IsMaximumCapacityConstrained +# RollingUpgradePolicy.maxSurge: IsMaxSurgeEnabled +# ScheduledEventsProfile: ComputeScheduledEventsProfile +# ExpandTypeForListVMs: GetVirtualMachineExpandType +# ExpandTypesForListVm: GetVirtualMachineExpandType +# SecurityPostureReference: ComputeSecurityPostureReference +# RestorePointSourceVmStorageProfile.dataDisks: DataDiskList +# SecurityPostureReference.id: -|arm-id +# CommunityGalleryImage.properties.identifier: ImageIdentifier +# GalleryTargetExtendedLocation.storageAccountType: GalleryStorageAccountType +# FileFormat: DiskImageFileFormat +# CreationData.elasticSanResourceId: -|arm-id +# NetworkInterfaceAuxiliarySku: ComputeNetworkInterfaceAuxiliarySku +# NetworkInterfaceAuxiliaryMode: ComputeNetworkInterfaceAuxiliaryMode + +directive: + # copy the systemData from common-types here so that it will be automatically replaced + - from: common.json + where: $.definitions + transform: > + $.SubResource.properties.id["x-ms-format"] = "arm-id"; + $.SubResourceReadOnly.properties.id["x-ms-format"] = "arm-id"; + $.SystemData = { + "description": "Metadata pertaining to creation and last modification of the resource.", + "type": "object", + "readOnly": true, + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "type": "string", + "description": "The type of identity that created the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "type": "string", + "description": "The type of identity that last modified the resource.", + "enum": [ + "User", + "Application", + "ManagedIdentity", + "Key" + ], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" + } + } + }; + - from: virtualMachine.json + where: $.definitions + transform: > + $.VirtualMachineInstallPatchesParameters.properties.maximumDuration["format"] = "duration"; + - from: virtualMachineImage.json + where: $.definitions + transform: > + $.VirtualMachineImageProperties.properties.dataDiskImages.description = "The list of data disk images information."; + # resolve the duplicate schema issue + - from: diskRPCommon.json + where: $.definitions + transform: > + $.PurchasePlan["x-ms-client-name"] = "DiskPurchasePlan"; + $.GrantAccessData.properties.access.description = "The Access Level, accepted values include None, Read, Write."; + - from: disk.json + where: $.definitions + transform: > + $.Disk.properties.managedByExtended.items["x-ms-format"] = "arm-id"; + - from: cloudService.json + where: $.definitions + transform: > + $.CloudService.properties.properties["x-ms-client-flatten"] = true; + $.OSFamily.properties.properties["x-ms-client-flatten"] = true; + $.OSVersion.properties.properties["x-ms-client-flatten"] = true; + $.Extension.properties.properties["x-ms-client-flatten"] = true; + $.CloudServiceRole.properties.properties["x-ms-client-flatten"] = true; + $.RoleInstance.properties.properties["x-ms-client-flatten"] = true; + $.LoadBalancerConfiguration.properties.properties["x-ms-client-flatten"] = true; + $.LoadBalancerFrontendIpConfiguration.properties.properties["x-ms-client-flatten"] = true; + # this makes the name in VirtualMachineScaleSetExtension to be readonly so that our inheritance chooser could properly make it inherit from Azure.ResourceManager.ResourceData. We have some customized code to add the setter for name back (as in constructor) + - from: virtualMachineScaleSet.json + where: $.definitions.VirtualMachineScaleSetExtension.properties.name + transform: $["readOnly"] = true; + # add a json converter to this model + - from: swagger-document + where: $.definitions.KeyVaultSecretReference + transform: $["x-csharp-usage"] = "converter"; + # TODO -- to be removed. This is a temporary workaround because the rename-mapping configuration is not working properly on arrays. + - from: restorePoint.json + where: $.definitions.RestorePointSourceVMStorageProfile.properties.dataDisks + transform: $["x-ms-client-name"] = "DataDiskList"; +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/resources.json b/packages/extensions/openapi-to-typespec/test/arm-compute/resources.json new file mode 100644 index 0000000000..aba6342de1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/resources.json @@ -0,0 +1,3930 @@ +{ + "Resources": { + "VirtualMachineScaleSet": { + "Name": "VirtualMachineScaleSet", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "Method": "GET", + "OperationID": "VirtualMachineScaleSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Display information about a virtual machine scale set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "Method": "PUT", + "OperationID": "VirtualMachineScaleSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update a VM scale set." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "Method": "PATCH", + "OperationID": "VirtualMachineScaleSets_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a VM scale set." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "Method": "DELETE", + "OperationID": "VirtualMachineScaleSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a VM scale set." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets", + "Method": "GET", + "OperationID": "VirtualMachineScaleSets_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets a list of all VM scale sets under a resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetVirtualMachineScaleSetsByLocation", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachineScaleSets", + "Method": "GET", + "OperationID": "VirtualMachineScaleSets_ListByLocation", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByLocation", + "NextPageMethod": "ListByLocationNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets all the VM scale sets under the specified subscription for the specified location." + }, + { + "Name": "GetVirtualMachineScaleSets", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets", + "Method": "GET", + "OperationID": "VirtualMachineScaleSets_ListAll", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListAll", + "NextPageMethod": "ListAllNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Deallocate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/deallocate", + "Method": "POST", + "OperationID": "VirtualMachineScaleSets_Deallocate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates." + }, + { + "Name": "DeleteInstances", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/delete", + "Method": "POST", + "OperationID": "VirtualMachineScaleSets_DeleteInstances", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes virtual machines in a VM scale set." + }, + { + "Name": "GetInstanceView", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/instanceView", + "Method": "GET", + "OperationID": "VirtualMachineScaleSets_GetInstanceView", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the status of a VM scale set instance." + }, + { + "Name": "GetSkus", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/skus", + "Method": "GET", + "OperationID": "VirtualMachineScaleSets_ListSkus", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListSkus", + "NextPageMethod": "ListSkusNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU." + }, + { + "Name": "GetOSUpgradeHistory", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/osUpgradeHistory", + "Method": "GET", + "OperationID": "VirtualMachineScaleSets_GetOSUpgradeHistory", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "GetOSUpgradeHistory", + "NextPageMethod": "GetOSUpgradeHistoryNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets list of OS upgrades on a VM scale set instance." + }, + { + "Name": "PowerOff", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/poweroff", + "Method": "POST", + "OperationID": "VirtualMachineScaleSets_PowerOff", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges." + }, + { + "Name": "Restart", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/restart", + "Method": "POST", + "OperationID": "VirtualMachineScaleSets_Restart", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Restarts one or more virtual machines in a VM scale set." + }, + { + "Name": "Start", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/start", + "Method": "POST", + "OperationID": "VirtualMachineScaleSets_Start", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Starts one or more virtual machines in a VM scale set." + }, + { + "Name": "Reapply", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/reapply", + "Method": "POST", + "OperationID": "VirtualMachineScaleSets_Reapply", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances" + }, + { + "Name": "Redeploy", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/redeploy", + "Method": "POST", + "OperationID": "VirtualMachineScaleSets_Redeploy", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on." + }, + { + "Name": "PerformMaintenance", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/performMaintenance", + "Method": "POST", + "OperationID": "VirtualMachineScaleSets_PerformMaintenance", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications" + }, + { + "Name": "UpdateInstances", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/manualupgrade", + "Method": "POST", + "OperationID": "VirtualMachineScaleSets_UpdateInstances", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Upgrades one or more virtual machines to the latest SKU set in the VM scale set model." + }, + { + "Name": "Reimage", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/reimage", + "Method": "POST", + "OperationID": "VirtualMachineScaleSets_Reimage", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don\u0027t have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state." + }, + { + "Name": "ReimageAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/reimageall", + "Method": "POST", + "OperationID": "VirtualMachineScaleSets_ReimageAll", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks." + }, + { + "Name": "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk", + "Method": "POST", + "OperationID": "VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set." + }, + { + "Name": "ConvertToSinglePlacementGroup", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/convertToSinglePlacementGroup", + "Method": "POST", + "OperationID": "VirtualMachineScaleSets_ConvertToSinglePlacementGroup", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Converts SinglePlacementGroup property to false for a existing virtual machine scale set." + }, + { + "Name": "SetOrchestrationServiceState", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/setOrchestrationServiceState", + "Method": "POST", + "OperationID": "VirtualMachineScaleSets_SetOrchestrationServiceState", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Changes ServiceState property for a given service" + }, + { + "Name": "CancelVirtualMachineScaleSetRollingUpgrade", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/rollingUpgrades/cancel", + "Method": "POST", + "OperationID": "VirtualMachineScaleSetRollingUpgrades_Cancel", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Cancels the current virtual machine scale set rolling upgrade." + }, + { + "Name": "StartOSUpgradeVirtualMachineScaleSetRollingUpgrade", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/osRollingUpgrade", + "Method": "POST", + "OperationID": "VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected." + }, + { + "Name": "StartExtensionUpgradeVirtualMachineScaleSetRollingUpgrade", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/extensionRollingUpgrade", + "Method": "POST", + "OperationID": "VirtualMachineScaleSetRollingUpgrades_StartExtensionUpgrade", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest available extension version. Instances which are already running the latest extension versions are not affected." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "VirtualMachineScaleSet", + "ResourceType": "Microsoft.Compute/virtualMachineScaleSets", + "ResourceKey": "vmScaleSetName", + "ResourceKeySegment": "virtualMachineScaleSets", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "VirtualMachineScaleSetExtension": { + "Name": "VirtualMachineScaleSetExtension", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/extensions/{vmssExtensionName}", + "Method": "GET", + "OperationID": "VirtualMachineScaleSetExtensions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The operation to get the extension." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/extensions/{vmssExtensionName}", + "Method": "PUT", + "OperationID": "VirtualMachineScaleSetExtensions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to create or update an extension." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/extensions/{vmssExtensionName}", + "Method": "PATCH", + "OperationID": "VirtualMachineScaleSetExtensions_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to update an extension." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/extensions/{vmssExtensionName}", + "Method": "DELETE", + "OperationID": "VirtualMachineScaleSetExtensions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to delete the extension." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/extensions", + "Method": "GET", + "OperationID": "VirtualMachineScaleSetExtensions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets a list of all extensions in a VM scale set." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["VirtualMachineScaleSet"], + "SwaggerModelName": "VirtualMachineScaleSetExtension", + "ResourceType": "Microsoft.Compute/virtualMachineScaleSets/extensions", + "ResourceKey": "vmssExtensionName", + "ResourceKeySegment": "extensions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "RollingUpgradeStatusInfo": { + "Name": "RollingUpgradeStatusInfo", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/rollingUpgrades/latest", + "Method": "GET", + "OperationID": "VirtualMachineScaleSetRollingUpgrades_GetLatest", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the status of the latest virtual machine scale set rolling upgrade." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["VirtualMachineScaleSet"], + "SwaggerModelName": "RollingUpgradeStatusInfo", + "ResourceType": "Microsoft.Compute/virtualMachineScaleSets/rollingUpgrades", + "ResourceKey": "latest", + "ResourceKeySegment": "rollingUpgrades", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": true + }, + "VirtualMachineScaleSetVmExtension": { + "Name": "VirtualMachineScaleSetVmExtension", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", + "Method": "GET", + "OperationID": "VirtualMachineScaleSetVMExtensions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The operation to get the VMSS VM extension." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", + "Method": "PUT", + "OperationID": "VirtualMachineScaleSetVMExtensions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to create or update the VMSS VM extension." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", + "Method": "PATCH", + "OperationID": "VirtualMachineScaleSetVMExtensions_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to update the VMSS VM extension." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", + "Method": "DELETE", + "OperationID": "VirtualMachineScaleSetVMExtensions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to delete the VMSS VM extension." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}/extensions", + "Method": "GET", + "OperationID": "VirtualMachineScaleSetVMExtensions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "The operation to get all extensions of an instance in Virtual Machine Scaleset." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["VirtualMachineScaleSetVm"], + "SwaggerModelName": "VirtualMachineScaleSetVMExtension", + "ResourceType": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions", + "ResourceKey": "vmExtensionName", + "ResourceKeySegment": "extensions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "VirtualMachineScaleSetVm": { + "Name": "VirtualMachineScaleSetVm", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}", + "Method": "GET", + "OperationID": "VirtualMachineScaleSetVMs_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a virtual machine from a VM scale set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}", + "Method": "PUT", + "OperationID": "VirtualMachineScaleSetVMs_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates a virtual machine of a VM scale set." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}", + "Method": "PUT", + "OperationID": "VirtualMachineScaleSetVMs_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates a virtual machine of a VM scale set." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}", + "Method": "DELETE", + "OperationID": "VirtualMachineScaleSetVMs_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a virtual machine from a VM scale set." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines", + "Method": "GET", + "OperationID": "VirtualMachineScaleSetVMs_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets a list of all virtual machines in a VM scale sets." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Reimage", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}/reimage", + "Method": "POST", + "OperationID": "VirtualMachineScaleSetVMs_Reimage", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Reimages (upgrade the operating system) a specific virtual machine in a VM scale set." + }, + { + "Name": "ReimageAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}/reimageall", + "Method": "POST", + "OperationID": "VirtualMachineScaleSetVMs_ReimageAll", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks." + }, + { + "Name": "Deallocate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}/deallocate", + "Method": "POST", + "OperationID": "VirtualMachineScaleSetVMs_Deallocate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated." + }, + { + "Name": "GetInstanceView", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}/instanceView", + "Method": "GET", + "OperationID": "VirtualMachineScaleSetVMs_GetInstanceView", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the status of a virtual machine from a VM scale set." + }, + { + "Name": "PowerOff", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualmachines/{instanceId}/poweroff", + "Method": "POST", + "OperationID": "VirtualMachineScaleSetVMs_PowerOff", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges." + }, + { + "Name": "Restart", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualmachines/{instanceId}/restart", + "Method": "POST", + "OperationID": "VirtualMachineScaleSetVMs_Restart", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Restarts a virtual machine in a VM scale set." + }, + { + "Name": "Start", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualmachines/{instanceId}/start", + "Method": "POST", + "OperationID": "VirtualMachineScaleSetVMs_Start", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Starts a virtual machine in a VM scale set." + }, + { + "Name": "Redeploy", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualmachines/{instanceId}/redeploy", + "Method": "POST", + "OperationID": "VirtualMachineScaleSetVMs_Redeploy", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on." + }, + { + "Name": "RetrieveBootDiagnosticsData", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualmachines/{instanceId}/retrieveBootDiagnosticsData", + "Method": "POST", + "OperationID": "VirtualMachineScaleSetVMs_RetrieveBootDiagnosticsData", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set." + }, + { + "Name": "PerformMaintenance", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualmachines/{instanceId}/performMaintenance", + "Method": "POST", + "OperationID": "VirtualMachineScaleSetVMs_PerformMaintenance", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Performs maintenance on a virtual machine in a VM scale set." + }, + { + "Name": "SimulateEviction", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}/simulateEviction", + "Method": "POST", + "OperationID": "VirtualMachineScaleSetVMs_SimulateEviction", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The operation to simulate the eviction of spot virtual machine in a VM scale set." + }, + { + "Name": "RunCommand", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualmachines/{instanceId}/runCommand", + "Method": "POST", + "OperationID": "VirtualMachineScaleSetVMs_RunCommand", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Run command on a virtual machine in a VM scale set." + } + ], + "Parents": ["VirtualMachineScaleSet"], + "SwaggerModelName": "VirtualMachineScaleSetVM", + "ResourceType": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines", + "ResourceKey": "instanceId", + "ResourceKeySegment": "virtualMachines", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "VirtualMachineExtension": { + "Name": "VirtualMachineExtension", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", + "Method": "GET", + "OperationID": "VirtualMachineExtensions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The operation to get the extension." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", + "Method": "PUT", + "OperationID": "VirtualMachineExtensions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to create or update the extension." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", + "Method": "PATCH", + "OperationID": "VirtualMachineExtensions_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to update the extension." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", + "Method": "DELETE", + "OperationID": "VirtualMachineExtensions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to delete the extension." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions", + "Method": "GET", + "OperationID": "VirtualMachineExtensions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "The operation to get all extensions of a Virtual Machine." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["VirtualMachine"], + "SwaggerModelName": "VirtualMachineExtension", + "ResourceType": "Microsoft.Compute/virtualMachines/extensions", + "ResourceKey": "vmExtensionName", + "ResourceKeySegment": "extensions", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "VirtualMachine": { + "Name": "VirtualMachine", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", + "Method": "GET", + "OperationID": "VirtualMachines_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves information about the model view or the instance view of a virtual machine." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", + "Method": "PUT", + "OperationID": "VirtualMachines_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", + "Method": "PATCH", + "OperationID": "VirtualMachines_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to update a virtual machine." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", + "Method": "DELETE", + "OperationID": "VirtualMachines_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to delete a virtual machine." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines", + "Method": "GET", + "OperationID": "VirtualMachines_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetVirtualMachinesByLocation", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines", + "Method": "GET", + "OperationID": "VirtualMachines_ListByLocation", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByLocation", + "NextPageMethod": "ListByLocationNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets all the virtual machines under the specified subscription for the specified location." + }, + { + "Name": "GetVirtualMachines", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines", + "Method": "GET", + "OperationID": "VirtualMachines_ListAll", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListAll", + "NextPageMethod": "ListAllNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Capture", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture", + "Method": "POST", + "OperationID": "VirtualMachines_Capture", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs." + }, + { + "Name": "InstanceView", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView", + "Method": "GET", + "OperationID": "VirtualMachines_InstanceView", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves information about the run-time state of a virtual machine." + }, + { + "Name": "ConvertToManagedDisks", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks", + "Method": "POST", + "OperationID": "VirtualMachines_ConvertToManagedDisks", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation." + }, + { + "Name": "Deallocate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate", + "Method": "POST", + "OperationID": "VirtualMachines_Deallocate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses." + }, + { + "Name": "Generalize", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize", + "Method": "POST", + "OperationID": "VirtualMachines_Generalize", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image)." + }, + { + "Name": "GetAvailableSizes", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes", + "Method": "GET", + "OperationID": "VirtualMachines_ListAvailableSizes", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListAvailableSizes", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Lists all available virtual machine sizes to which the specified virtual machine can be resized." + }, + { + "Name": "PowerOff", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff", + "Method": "POST", + "OperationID": "VirtualMachines_PowerOff", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine." + }, + { + "Name": "Reapply", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reapply", + "Method": "POST", + "OperationID": "VirtualMachines_Reapply", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to reapply a virtual machine\u0027s state." + }, + { + "Name": "Restart", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart", + "Method": "POST", + "OperationID": "VirtualMachines_Restart", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to restart a virtual machine." + }, + { + "Name": "Start", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start", + "Method": "POST", + "OperationID": "VirtualMachines_Start", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to start a virtual machine." + }, + { + "Name": "Redeploy", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy", + "Method": "POST", + "OperationID": "VirtualMachines_Redeploy", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Shuts down the virtual machine, moves it to a new node, and powers it back on." + }, + { + "Name": "Reimage", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage", + "Method": "POST", + "OperationID": "VirtualMachines_Reimage", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Reimages (upgrade the operating system) a virtual machine which don\u0027t have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage." + }, + { + "Name": "RetrieveBootDiagnosticsData", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/retrieveBootDiagnosticsData", + "Method": "POST", + "OperationID": "VirtualMachines_RetrieveBootDiagnosticsData", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The operation to retrieve SAS URIs for a virtual machine\u0027s boot diagnostic logs." + }, + { + "Name": "PerformMaintenance", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance", + "Method": "POST", + "OperationID": "VirtualMachines_PerformMaintenance", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to perform maintenance on a virtual machine." + }, + { + "Name": "SimulateEviction", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/simulateEviction", + "Method": "POST", + "OperationID": "VirtualMachines_SimulateEviction", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The operation to simulate the eviction of spot virtual machine." + }, + { + "Name": "AssessPatches", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/assessPatches", + "Method": "POST", + "OperationID": "VirtualMachines_AssessPatches", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Assess patches on the VM." + }, + { + "Name": "InstallPatches", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/installPatches", + "Method": "POST", + "OperationID": "VirtualMachines_InstallPatches", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Installs patches on the VM." + }, + { + "Name": "RunCommand", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand", + "Method": "POST", + "OperationID": "VirtualMachines_RunCommand", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Run command on the VM." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "VirtualMachine", + "ResourceType": "Microsoft.Compute/virtualMachines", + "ResourceKey": "vmName", + "ResourceKeySegment": "virtualMachines", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "VirtualMachineExtensionImage": { + "Name": "VirtualMachineExtensionImage", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}", + "Method": "GET", + "OperationID": "VirtualMachineExtensionImages_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a virtual machine extension image." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types", + "Method": "GET", + "OperationID": "VirtualMachineExtensionImages_ListTypes", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListTypes", + "NextPageMethod": null, + "ItemName": "", + "NextLinkName": null + }, + "Description": "Gets a list of virtual machine extension image types." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["SubscriptionResource"], + "SwaggerModelName": "VirtualMachineExtensionImage", + "ResourceType": "Microsoft.Compute/locations/publishers/artifacttypes/types/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": true, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "AvailabilitySet": { + "Name": "AvailabilitySet", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "Method": "GET", + "OperationID": "AvailabilitySets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves information about an availability set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "Method": "PUT", + "OperationID": "AvailabilitySets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update an availability set." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "Method": "PATCH", + "OperationID": "AvailabilitySets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update an availability set." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "Method": "DELETE", + "OperationID": "AvailabilitySets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete an availability set." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets", + "Method": "GET", + "OperationID": "AvailabilitySets_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all availability sets in a resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetAvailabilitySets", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets", + "Method": "GET", + "OperationID": "AvailabilitySets_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all availability sets in a subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetAvailableSizes", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes", + "Method": "GET", + "OperationID": "AvailabilitySets_ListAvailableSizes", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListAvailableSizes", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "AvailabilitySet", + "ResourceType": "Microsoft.Compute/availabilitySets", + "ResourceKey": "availabilitySetName", + "ResourceKeySegment": "availabilitySets", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ProximityPlacementGroup": { + "Name": "ProximityPlacementGroup", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", + "Method": "GET", + "OperationID": "ProximityPlacementGroups_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves information about a proximity placement group ." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", + "Method": "PUT", + "OperationID": "ProximityPlacementGroups_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update a proximity placement group." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", + "Method": "PATCH", + "OperationID": "ProximityPlacementGroups_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update a proximity placement group." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", + "Method": "DELETE", + "OperationID": "ProximityPlacementGroups_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a proximity placement group." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups", + "Method": "GET", + "OperationID": "ProximityPlacementGroups_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all proximity placement groups in a resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetProximityPlacementGroups", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups", + "Method": "GET", + "OperationID": "ProximityPlacementGroups_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all proximity placement groups in a subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "ProximityPlacementGroup", + "ResourceType": "Microsoft.Compute/proximityPlacementGroups", + "ResourceKey": "proximityPlacementGroupName", + "ResourceKeySegment": "proximityPlacementGroups", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DedicatedHostGroup": { + "Name": "DedicatedHostGroup", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", + "Method": "GET", + "OperationID": "DedicatedHostGroups_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves information about a dedicated host group." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", + "Method": "PUT", + "OperationID": "DedicatedHostGroups_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596)" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", + "Method": "PATCH", + "OperationID": "DedicatedHostGroups_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update an dedicated host group." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", + "Method": "DELETE", + "OperationID": "DedicatedHostGroups_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a dedicated host group." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups", + "Method": "GET", + "OperationID": "DedicatedHostGroups_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in the response to get the next page of dedicated host groups." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetDedicatedHostGroups", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/hostGroups", + "Method": "GET", + "OperationID": "DedicatedHostGroups_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all of the dedicated host groups in the subscription. Use the nextLink property in the response to get the next page of dedicated host groups." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "DedicatedHostGroup", + "ResourceType": "Microsoft.Compute/hostGroups", + "ResourceKey": "hostGroupName", + "ResourceKeySegment": "hostGroups", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DedicatedHost": { + "Name": "DedicatedHost", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", + "Method": "GET", + "OperationID": "DedicatedHosts_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves information about a dedicated host." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", + "Method": "PUT", + "OperationID": "DedicatedHosts_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update a dedicated host ." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", + "Method": "PATCH", + "OperationID": "DedicatedHosts_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a dedicated host ." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", + "Method": "DELETE", + "OperationID": "DedicatedHosts_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a dedicated host." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts", + "Method": "GET", + "OperationID": "DedicatedHosts_ListByHostGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByHostGroup", + "NextPageMethod": "ListByHostGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Restart", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}/restart", + "Method": "POST", + "OperationID": "DedicatedHosts_Restart", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details." + }, + { + "Name": "GetAvailableSizes", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}/hostSizes", + "Method": "GET", + "OperationID": "DedicatedHosts_ListAvailableSizes", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListAvailableSizes", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host." + } + ], + "Parents": ["DedicatedHostGroup"], + "SwaggerModelName": "DedicatedHost", + "ResourceType": "Microsoft.Compute/hostGroups/hosts", + "ResourceKey": "hostName", + "ResourceKeySegment": "hosts", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "SshPublicKeyResource": { + "Name": "SshPublicKeyResource", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", + "Method": "GET", + "OperationID": "SshPublicKeys_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves information about an SSH public key." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", + "Method": "PUT", + "OperationID": "SshPublicKeys_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new SSH public key resource." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", + "Method": "PATCH", + "OperationID": "SshPublicKeys_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a new SSH public key resource." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", + "Method": "DELETE", + "OperationID": "SshPublicKeys_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete an SSH public key." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys", + "Method": "GET", + "OperationID": "SshPublicKeys_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the response to get the next page of SSH public keys." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetSshPublicKeyResources", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/sshPublicKeys", + "Method": "GET", + "OperationID": "SshPublicKeys_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GenerateKeyPair", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}/generateKeyPair", + "Method": "POST", + "OperationID": "SshPublicKeys_GenerateKeyPair", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Generates and returns a public/private key pair and populates the SSH public key resource with the public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key resource." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "SshPublicKeyResource", + "ResourceType": "Microsoft.Compute/sshPublicKeys", + "ResourceKey": "sshPublicKeyName", + "ResourceKeySegment": "sshPublicKeys", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Image": { + "Name": "Image", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", + "Method": "GET", + "OperationID": "Images_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets an image." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", + "Method": "PUT", + "OperationID": "Images_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update an image." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", + "Method": "PATCH", + "OperationID": "Images_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update an image." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", + "Method": "DELETE", + "OperationID": "Images_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes an Image." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images", + "Method": "GET", + "OperationID": "Images_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets the list of images under a resource group. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetImages", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images", + "Method": "GET", + "OperationID": "Images_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "Image", + "ResourceType": "Microsoft.Compute/images", + "ResourceKey": "imageName", + "ResourceKeySegment": "images", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "RestorePointGroup": { + "Name": "RestorePointGroup", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointGroupName}", + "Method": "GET", + "OperationID": "RestorePointCollections_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The operation to get the restore point collection." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointGroupName}", + "Method": "PUT", + "OperationID": "RestorePointCollections_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to create or update the restore point collection. Please refer to https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags may be modified." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointGroupName}", + "Method": "PATCH", + "OperationID": "RestorePointCollections_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The operation to update the restore point collection." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointGroupName}", + "Method": "DELETE", + "OperationID": "RestorePointCollections_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to delete the restore point collection. This operation will also delete all the contained restore points." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections", + "Method": "GET", + "OperationID": "RestorePointCollections_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets the list of restore point collections in a resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetRestorePointGroups", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/restorePointCollections", + "Method": "GET", + "OperationID": "RestorePointCollections_ListAll", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListAll", + "NextPageMethod": "ListAllNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets the list of restore point collections in the subscription. Use nextLink property in the response to get the next page of restore point collections. Do this till nextLink is not null to fetch all the restore point collections." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "RestorePointCollection", + "ResourceType": "Microsoft.Compute/restorePointCollections", + "ResourceKey": "restorePointCollectionName", + "ResourceKeySegment": "restorePointCollections", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "RestorePoint": { + "Name": "RestorePoint", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointGroupName}/restorePoints/{restorePointName}", + "Method": "GET", + "OperationID": "RestorePoints_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The operation to get the restore point." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointGroupName}/restorePoints/{restorePointName}", + "Method": "PUT", + "OperationID": "RestorePoints_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to create the restore point. Updating properties of an existing restore point is not allowed" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointGroupName}/restorePoints/{restorePointName}", + "Method": "PUT", + "OperationID": "RestorePoints_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to create the restore point. Updating properties of an existing restore point is not allowed" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointGroupName}/restorePoints/{restorePointName}", + "Method": "DELETE", + "OperationID": "RestorePoints_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to delete the restore point." + } + ], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["RestorePointGroup"], + "SwaggerModelName": "RestorePoint", + "ResourceType": "Microsoft.Compute/restorePointCollections/restorePoints", + "ResourceKey": "restorePointName", + "ResourceKeySegment": "restorePoints", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "CapacityReservationGroup": { + "Name": "CapacityReservationGroup", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", + "Method": "GET", + "OperationID": "CapacityReservationGroups_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The operation that retrieves information about a capacity reservation group." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", + "Method": "PUT", + "OperationID": "CapacityReservationGroups_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags may be modified. Please refer to https://aka.ms/CapacityReservation for more details." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", + "Method": "PATCH", + "OperationID": "CapacityReservationGroups_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The operation to update a capacity reservation group. When updating a capacity reservation group, only tags may be modified." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", + "Method": "DELETE", + "OperationID": "CapacityReservationGroups_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups", + "Method": "GET", + "OperationID": "CapacityReservationGroups_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all of the capacity reservation groups in the specified resource group. Use the nextLink property in the response to get the next page of capacity reservation groups." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetCapacityReservationGroups", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/capacityReservationGroups", + "Method": "GET", + "OperationID": "CapacityReservationGroups_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "CapacityReservationGroup", + "ResourceType": "Microsoft.Compute/capacityReservationGroups", + "ResourceKey": "capacityReservationGroupName", + "ResourceKeySegment": "capacityReservationGroups", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "CapacityReservation": { + "Name": "CapacityReservation", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", + "Method": "GET", + "OperationID": "CapacityReservations_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The operation that retrieves information about the capacity reservation." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", + "Method": "PUT", + "OperationID": "CapacityReservations_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", + "Method": "PATCH", + "OperationID": "CapacityReservations_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to update a capacity reservation." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", + "Method": "DELETE", + "OperationID": "CapacityReservations_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations", + "Method": "GET", + "OperationID": "CapacityReservations_ListByCapacityReservationGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByCapacityReservationGroup", + "NextPageMethod": "ListByCapacityReservationGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["CapacityReservationGroup"], + "SwaggerModelName": "CapacityReservation", + "ResourceType": "Microsoft.Compute/capacityReservationGroups/capacityReservations", + "ResourceKey": "capacityReservationName", + "ResourceKeySegment": "capacityReservations", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "VirtualMachineRunCommand": { + "Name": "VirtualMachineRunCommand", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + "Method": "GET", + "OperationID": "VirtualMachineRunCommands_GetByVirtualMachine", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The operation to get the run command." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + "Method": "PUT", + "OperationID": "VirtualMachineRunCommands_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to create or update the run command." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + "Method": "PATCH", + "OperationID": "VirtualMachineRunCommands_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to update the run command." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", + "Method": "DELETE", + "OperationID": "VirtualMachineRunCommands_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to delete the run command." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands", + "Method": "GET", + "OperationID": "VirtualMachineRunCommands_ListByVirtualMachine", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByVirtualMachine", + "NextPageMethod": "ListByVirtualMachineNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "The operation to get all run commands of a Virtual Machine." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetVirtualMachineRunCommands", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands", + "Method": "GET", + "OperationID": "VirtualMachineRunCommands_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all available run commands for a subscription in a location." + }, + { + "Name": "GetVirtualMachineRunCommand", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}", + "Method": "GET", + "OperationID": "VirtualMachineRunCommands_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets specific run command for a subscription in a location." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["VirtualMachine"], + "SwaggerModelName": "VirtualMachineRunCommand", + "ResourceType": "Microsoft.Compute/virtualMachines/runCommands", + "ResourceKey": "runCommandName", + "ResourceKeySegment": "runCommands", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "VirtualMachineScaleSetVmRunCommand": { + "Name": "VirtualMachineScaleSetVmRunCommand", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + "Method": "GET", + "OperationID": "VirtualMachineScaleSetVMRunCommands_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The operation to get the VMSS VM run command." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + "Method": "PUT", + "OperationID": "VirtualMachineScaleSetVMRunCommands_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to create or update the VMSS VM run command." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + "Method": "PATCH", + "OperationID": "VirtualMachineScaleSetVMRunCommands_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to update the VMSS VM run command." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", + "Method": "DELETE", + "OperationID": "VirtualMachineScaleSetVMRunCommands_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The operation to delete the VMSS VM run command." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{instanceId}/runCommands", + "Method": "GET", + "OperationID": "VirtualMachineScaleSetVMRunCommands_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "The operation to get all run commands of an instance in Virtual Machine Scaleset." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["VirtualMachineScaleSetVm"], + "SwaggerModelName": "VirtualMachineRunCommand", + "ResourceType": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines/runCommands", + "ResourceKey": "runCommandName", + "ResourceKeySegment": "runCommands", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Disk": { + "Name": "Disk", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", + "Method": "GET", + "OperationID": "Disks_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets information about a disk." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", + "Method": "PUT", + "OperationID": "Disks_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a disk." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", + "Method": "PATCH", + "OperationID": "Disks_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates (patches) a disk." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", + "Method": "DELETE", + "OperationID": "Disks_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a disk." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks", + "Method": "GET", + "OperationID": "Disks_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all the disks under a resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetDisks", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks", + "Method": "GET", + "OperationID": "Disks_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all the disks under a subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GrantAccess", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess", + "Method": "POST", + "OperationID": "Disks_GrantAccess", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Grants access to a disk." + }, + { + "Name": "RevokeAccess", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess", + "Method": "POST", + "OperationID": "Disks_RevokeAccess", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Revokes access to a disk." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "Disk", + "ResourceType": "Microsoft.Compute/disks", + "ResourceKey": "diskName", + "ResourceKeySegment": "disks", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DiskAccess": { + "Name": "DiskAccess", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", + "Method": "GET", + "OperationID": "DiskAccesses_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets information about a disk access resource." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", + "Method": "PUT", + "OperationID": "DiskAccesses_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a disk access resource" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", + "Method": "PATCH", + "OperationID": "DiskAccesses_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates (patches) a disk access resource." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", + "Method": "DELETE", + "OperationID": "DiskAccesses_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a disk access resource." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses", + "Method": "GET", + "OperationID": "DiskAccesses_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all the disk access resources under a resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetDiskAccesses", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses", + "Method": "GET", + "OperationID": "DiskAccesses_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all the disk access resources under a subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetPrivateLinkResources", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources", + "Method": "GET", + "OperationID": "DiskAccesses_GetPrivateLinkResources", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "GetPrivateLinkResources", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Gets the private link resources possible under disk access resource" + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "DiskAccess", + "ResourceType": "Microsoft.Compute/diskAccesses", + "ResourceKey": "diskAccessName", + "ResourceKeySegment": "diskAccesses", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ComputePrivateEndpointConnection": { + "Name": "ComputePrivateEndpointConnection", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "GET", + "OperationID": "DiskAccesses_GetAPrivateEndpointConnection", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets information about a private endpoint connection under a disk access resource." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "PUT", + "OperationID": "DiskAccesses_UpdateAPrivateEndpointConnection", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Approve or reject a private endpoint connection under disk access resource, this can\u0027t be used to create a new private endpoint connection." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "PUT", + "OperationID": "DiskAccesses_UpdateAPrivateEndpointConnection", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Approve or reject a private endpoint connection under disk access resource, this can\u0027t be used to create a new private endpoint connection." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "DELETE", + "OperationID": "DiskAccesses_DeleteAPrivateEndpointConnection", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a private endpoint connection under a disk access resource." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections", + "Method": "GET", + "OperationID": "DiskAccesses_ListPrivateEndpointConnections", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListPrivateEndpointConnections", + "NextPageMethod": "ListPrivateEndpointConnectionsNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List information about private endpoint connections under a disk access resource" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DiskAccess"], + "SwaggerModelName": "PrivateEndpointConnection", + "ResourceType": "Microsoft.Compute/diskAccesses/privateEndpointConnections", + "ResourceKey": "privateEndpointConnectionName", + "ResourceKeySegment": "privateEndpointConnections", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DiskEncryptionSet": { + "Name": "DiskEncryptionSet", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", + "Method": "GET", + "OperationID": "DiskEncryptionSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets information about a disk encryption set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", + "Method": "PUT", + "OperationID": "DiskEncryptionSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a disk encryption set" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", + "Method": "PATCH", + "OperationID": "DiskEncryptionSets_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates (patches) a disk encryption set." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", + "Method": "DELETE", + "OperationID": "DiskEncryptionSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a disk encryption set." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets", + "Method": "GET", + "OperationID": "DiskEncryptionSets_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all the disk encryption sets under a resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetDiskEncryptionSets", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskEncryptionSets", + "Method": "GET", + "OperationID": "DiskEncryptionSets_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all the disk encryption sets under a subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetAssociatedResources", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}/associatedResources", + "Method": "GET", + "OperationID": "DiskEncryptionSets_ListAssociatedResources", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListAssociatedResources", + "NextPageMethod": "ListAssociatedResourcesNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all resources that are encrypted with this disk encryption set." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "DiskEncryptionSet", + "ResourceType": "Microsoft.Compute/diskEncryptionSets", + "ResourceKey": "diskEncryptionSetName", + "ResourceKeySegment": "diskEncryptionSets", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DiskRestorePoint": { + "Name": "DiskRestorePoint", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointGroupName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}", + "Method": "GET", + "OperationID": "DiskRestorePoint_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get disk restorePoint resource" + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointGroupName}/restorePoints/{vmRestorePointName}/diskRestorePoints", + "Method": "GET", + "OperationID": "DiskRestorePoint_ListByRestorePoint", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByRestorePoint", + "NextPageMethod": "ListByRestorePointNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists diskRestorePoints under a vmRestorePoint." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GrantAccess", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointGroupName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess", + "Method": "POST", + "OperationID": "DiskRestorePoint_GrantAccess", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Grants access to a diskRestorePoint." + }, + { + "Name": "RevokeAccess", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointGroupName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess", + "Method": "POST", + "OperationID": "DiskRestorePoint_RevokeAccess", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Revokes access to a diskRestorePoint." + } + ], + "Parents": ["RestorePoint"], + "SwaggerModelName": "DiskRestorePoint", + "ResourceType": "Microsoft.Compute/restorePointCollections/restorePoints/diskRestorePoints", + "ResourceKey": "diskRestorePointName", + "ResourceKeySegment": "diskRestorePoints", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Snapshot": { + "Name": "Snapshot", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", + "Method": "GET", + "OperationID": "Snapshots_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets information about a snapshot." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", + "Method": "PUT", + "OperationID": "Snapshots_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a snapshot." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", + "Method": "PATCH", + "OperationID": "Snapshots_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates (patches) a snapshot." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", + "Method": "DELETE", + "OperationID": "Snapshots_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a snapshot." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots", + "Method": "GET", + "OperationID": "Snapshots_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists snapshots under a resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetSnapshots", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots", + "Method": "GET", + "OperationID": "Snapshots_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists snapshots under a subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GrantAccess", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess", + "Method": "POST", + "OperationID": "Snapshots_GrantAccess", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Grants access to a snapshot." + }, + { + "Name": "RevokeAccess", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess", + "Method": "POST", + "OperationID": "Snapshots_RevokeAccess", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Revokes access to a snapshot." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "Snapshot", + "ResourceType": "Microsoft.Compute/snapshots", + "ResourceKey": "snapshotName", + "ResourceKeySegment": "snapshots", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Gallery": { + "Name": "Gallery", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", + "Method": "GET", + "OperationID": "Galleries_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves information about a Shared Image Gallery." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", + "Method": "PUT", + "OperationID": "Galleries_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update a Shared Image Gallery." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", + "Method": "PATCH", + "OperationID": "Galleries_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a Shared Image Gallery." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", + "Method": "DELETE", + "OperationID": "Galleries_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a Shared Image Gallery." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries", + "Method": "GET", + "OperationID": "Galleries_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List galleries under a resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetGalleries", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries", + "Method": "GET", + "OperationID": "Galleries_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List galleries under a subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "UpdateGallerySharingProfile", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/share", + "Method": "POST", + "OperationID": "GallerySharingProfile_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update sharing profile of a gallery." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "Gallery", + "ResourceType": "Microsoft.Compute/galleries", + "ResourceKey": "galleryName", + "ResourceKeySegment": "galleries", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "GalleryImage": { + "Name": "GalleryImage", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", + "Method": "GET", + "OperationID": "GalleryImages_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves information about a gallery image definition." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", + "Method": "PUT", + "OperationID": "GalleryImages_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update a gallery image definition." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", + "Method": "PATCH", + "OperationID": "GalleryImages_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a gallery image definition." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", + "Method": "DELETE", + "OperationID": "GalleryImages_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a gallery image." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images", + "Method": "GET", + "OperationID": "GalleryImages_ListByGallery", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByGallery", + "NextPageMethod": "ListByGalleryNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List gallery image definitions in a gallery." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["Gallery"], + "SwaggerModelName": "GalleryImage", + "ResourceType": "Microsoft.Compute/galleries/images", + "ResourceKey": "galleryImageName", + "ResourceKeySegment": "images", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "GalleryImageVersion": { + "Name": "GalleryImageVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", + "Method": "GET", + "OperationID": "GalleryImageVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves information about a gallery image version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", + "Method": "PUT", + "OperationID": "GalleryImageVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update a gallery image version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", + "Method": "PATCH", + "OperationID": "GalleryImageVersions_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a gallery image version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", + "Method": "DELETE", + "OperationID": "GalleryImageVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a gallery image version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions", + "Method": "GET", + "OperationID": "GalleryImageVersions_ListByGalleryImage", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByGalleryImage", + "NextPageMethod": "ListByGalleryImageNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List gallery image versions in a gallery image definition." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["GalleryImage"], + "SwaggerModelName": "GalleryImageVersion", + "ResourceType": "Microsoft.Compute/galleries/images/versions", + "ResourceKey": "galleryImageVersionName", + "ResourceKeySegment": "versions", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "GalleryApplication": { + "Name": "GalleryApplication", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", + "Method": "GET", + "OperationID": "GalleryApplications_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves information about a gallery Application Definition." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", + "Method": "PUT", + "OperationID": "GalleryApplications_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update a gallery Application Definition." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", + "Method": "PATCH", + "OperationID": "GalleryApplications_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a gallery Application Definition." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", + "Method": "DELETE", + "OperationID": "GalleryApplications_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a gallery Application." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications", + "Method": "GET", + "OperationID": "GalleryApplications_ListByGallery", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByGallery", + "NextPageMethod": "ListByGalleryNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List gallery Application Definitions in a gallery." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["Gallery"], + "SwaggerModelName": "GalleryApplication", + "ResourceType": "Microsoft.Compute/galleries/applications", + "ResourceKey": "galleryApplicationName", + "ResourceKeySegment": "applications", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "GalleryApplicationVersion": { + "Name": "GalleryApplicationVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", + "Method": "GET", + "OperationID": "GalleryApplicationVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves information about a gallery Application Version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", + "Method": "PUT", + "OperationID": "GalleryApplicationVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update a gallery Application Version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", + "Method": "PATCH", + "OperationID": "GalleryApplicationVersions_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a gallery Application Version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", + "Method": "DELETE", + "OperationID": "GalleryApplicationVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a gallery Application Version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions", + "Method": "GET", + "OperationID": "GalleryApplicationVersions_ListByGalleryApplication", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByGalleryApplication", + "NextPageMethod": "ListByGalleryApplicationNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List gallery Application Versions in a gallery Application Definition." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["GalleryApplication"], + "SwaggerModelName": "GalleryApplicationVersion", + "ResourceType": "Microsoft.Compute/galleries/applications/versions", + "ResourceKey": "galleryApplicationVersionName", + "ResourceKeySegment": "versions", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "SharedGallery": { + "Name": "SharedGallery", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}", + "Method": "GET", + "OperationID": "SharedGalleries_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a shared gallery by subscription id or tenant id." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries", + "Method": "GET", + "OperationID": "SharedGalleries_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List shared galleries by subscription id or tenant id." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["SubscriptionResource"], + "SwaggerModelName": "SharedGallery", + "ResourceType": "Microsoft.Compute/locations/sharedGalleries", + "ResourceKey": "galleryUniqueName", + "ResourceKeySegment": "sharedGalleries", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": true, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "SharedGalleryImage": { + "Name": "SharedGalleryImage", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}", + "Method": "GET", + "OperationID": "SharedGalleryImages_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a shared gallery image by subscription id or tenant id." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images", + "Method": "GET", + "OperationID": "SharedGalleryImages_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List shared gallery images by subscription id or tenant id." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["SharedGallery"], + "SwaggerModelName": "SharedGalleryImage", + "ResourceType": "Microsoft.Compute/locations/sharedGalleries/images", + "ResourceKey": "galleryImageName", + "ResourceKeySegment": "images", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "SharedGalleryImageVersion": { + "Name": "SharedGalleryImageVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions/{galleryImageVersionName}", + "Method": "GET", + "OperationID": "SharedGalleryImageVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a shared gallery image version by subscription id or tenant id." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions", + "Method": "GET", + "OperationID": "SharedGalleryImageVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List shared gallery image versions by subscription id or tenant id." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["SharedGalleryImage"], + "SwaggerModelName": "SharedGalleryImageVersion", + "ResourceType": "Microsoft.Compute/locations/sharedGalleries/images/versions", + "ResourceKey": "galleryImageVersionName", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "CommunityGallery": { + "Name": "CommunityGallery", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}", + "Method": "GET", + "OperationID": "CommunityGalleries_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a community gallery by gallery public name." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["SubscriptionResource"], + "SwaggerModelName": "CommunityGallery", + "ResourceType": "Microsoft.Compute/locations/communityGalleries", + "ResourceKey": "publicGalleryName", + "ResourceKeySegment": "communityGalleries", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": true, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "CommunityGalleryImage": { + "Name": "CommunityGalleryImage", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}", + "Method": "GET", + "OperationID": "CommunityGalleryImages_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a community gallery image." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images", + "Method": "GET", + "OperationID": "CommunityGalleryImages_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List community gallery images inside a gallery." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["CommunityGallery"], + "SwaggerModelName": "CommunityGalleryImage", + "ResourceType": "Microsoft.Compute/locations/communityGalleries/images", + "ResourceKey": "galleryImageName", + "ResourceKeySegment": "images", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "CommunityGalleryImageVersion": { + "Name": "CommunityGalleryImageVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", + "Method": "GET", + "OperationID": "CommunityGalleryImageVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a community gallery image version." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}/versions", + "Method": "GET", + "OperationID": "CommunityGalleryImageVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List community gallery image versions inside an image." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["CommunityGalleryImage"], + "SwaggerModelName": "CommunityGalleryImageVersion", + "ResourceType": "Microsoft.Compute/locations/communityGalleries/images/versions", + "ResourceKey": "galleryImageVersionName", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "RoleInstance": { + "Name": "RoleInstance", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}", + "Method": "GET", + "OperationID": "CloudServiceRoleInstances_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a role instance from a cloud service." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}", + "Method": "DELETE", + "OperationID": "CloudServiceRoleInstances_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a role instance from a cloud service." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances", + "Method": "GET", + "OperationID": "CloudServiceRoleInstances_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetInstanceView", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView", + "Method": "GET", + "OperationID": "CloudServiceRoleInstances_GetInstanceView", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves information about the run-time state of a role instance in a cloud service." + }, + { + "Name": "Restart", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/restart", + "Method": "POST", + "OperationID": "CloudServiceRoleInstances_Restart", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service." + }, + { + "Name": "Reimage", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/reimage", + "Method": "POST", + "OperationID": "CloudServiceRoleInstances_Reimage", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles." + }, + { + "Name": "Rebuild", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/rebuild", + "Method": "POST", + "OperationID": "CloudServiceRoleInstances_Rebuild", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance." + }, + { + "Name": "GetRemoteDesktopFile", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile", + "Method": "GET", + "OperationID": "CloudServiceRoleInstances_GetRemoteDesktopFile", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a remote desktop file for a role instance in a cloud service." + } + ], + "Parents": ["CloudService"], + "SwaggerModelName": "RoleInstance", + "ResourceType": "Microsoft.Compute/cloudServices/roleInstances", + "ResourceKey": "roleInstanceName", + "ResourceKeySegment": "roleInstances", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "CloudServiceRole": { + "Name": "CloudServiceRole", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roles/{roleName}", + "Method": "GET", + "OperationID": "CloudServiceRoles_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a role from a cloud service." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roles", + "Method": "GET", + "OperationID": "CloudServiceRoles_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next page of roles. Do this till nextLink is null to fetch all the roles." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["CloudService"], + "SwaggerModelName": "CloudServiceRole", + "ResourceType": "Microsoft.Compute/cloudServices/roles", + "ResourceKey": "roleName", + "ResourceKeySegment": "roles", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "CloudService": { + "Name": "CloudService", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", + "Method": "GET", + "OperationID": "CloudServices_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Display information about a cloud service." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", + "Method": "PUT", + "OperationID": "CloudServices_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update a cloud service. Please note some properties can be set only during cloud service creation." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", + "Method": "PATCH", + "OperationID": "CloudServices_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a cloud service." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", + "Method": "DELETE", + "OperationID": "CloudServices_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a cloud service." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices", + "Method": "GET", + "OperationID": "CloudServices_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetCloudServices", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/cloudServices", + "Method": "GET", + "OperationID": "CloudServices_ListAll", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListAll", + "NextPageMethod": "ListAllNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets a list of all cloud services in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetInstanceView", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/instanceView", + "Method": "GET", + "OperationID": "CloudServices_GetInstanceView", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the status of a cloud service." + }, + { + "Name": "Start", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/start", + "Method": "POST", + "OperationID": "CloudServices_Start", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Starts the cloud service." + }, + { + "Name": "PowerOff", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/poweroff", + "Method": "POST", + "OperationID": "CloudServices_PowerOff", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Power off the cloud service. Note that resources are still attached and you are getting charged for the resources." + }, + { + "Name": "Restart", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/restart", + "Method": "POST", + "OperationID": "CloudServices_Restart", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Restarts one or more role instances in a cloud service." + }, + { + "Name": "Reimage", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/reimage", + "Method": "POST", + "OperationID": "CloudServices_Reimage", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles." + }, + { + "Name": "Rebuild", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/rebuild", + "Method": "POST", + "OperationID": "CloudServices_Rebuild", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instances." + }, + { + "Name": "DeleteInstances", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/delete", + "Method": "POST", + "OperationID": "CloudServices_DeleteInstances", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes role instances in a cloud service." + }, + { + "Name": "WalkUpdateDomainCloudServicesUpdateDomain", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}", + "Method": "PUT", + "OperationID": "CloudServicesUpdateDomain_WalkUpdateDomain", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates the role instances in the specified update domain." + }, + { + "Name": "GetUpdateDomainCloudServicesUpdateDomain", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}", + "Method": "GET", + "OperationID": "CloudServicesUpdateDomain_GetUpdateDomain", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the specified update domain of a cloud service. Use nextLink property in the response to get the next page of update domains. Do this till nextLink is null to fetch all the update domains." + }, + { + "Name": "GetUpdateDomainsCloudServicesUpdateDomains", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains", + "Method": "GET", + "OperationID": "CloudServicesUpdateDomain_ListUpdateDomains", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListUpdateDomains", + "NextPageMethod": "ListUpdateDomainsNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets a list of all update domains in a cloud service." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "CloudService", + "ResourceType": "Microsoft.Compute/cloudServices", + "ResourceKey": "cloudServiceName", + "ResourceKeySegment": "cloudServices", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "OSVersion": { + "Name": "OSVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsVersions/{osVersionName}", + "Method": "GET", + "OperationID": "CloudServiceOperatingSystems_GetOSVersion", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsVersions", + "Method": "GET", + "OperationID": "CloudServiceOperatingSystems_ListOSVersions", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListOSVersions", + "NextPageMethod": "ListOSVersionsNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets a list of all guest operating system versions available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS versions. Do this till nextLink is null to fetch all the OS versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["SubscriptionResource"], + "SwaggerModelName": "OSVersion", + "ResourceType": "Microsoft.Compute/locations/cloudServiceOsVersions", + "ResourceKey": "osVersionName", + "ResourceKeySegment": "cloudServiceOsVersions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": true, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "OSFamily": { + "Name": "OSFamily", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsFamilies/{osFamilyName}", + "Method": "GET", + "OperationID": "CloudServiceOperatingSystems_GetOSFamily", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsFamilies", + "Method": "GET", + "OperationID": "CloudServiceOperatingSystems_ListOSFamilies", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListOSFamilies", + "NextPageMethod": "ListOSFamiliesNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets a list of all guest operating system families available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS Families. Do this till nextLink is null to fetch all the OS Families." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["SubscriptionResource"], + "SwaggerModelName": "OSFamily", + "ResourceType": "Microsoft.Compute/locations/cloudServiceOsFamilies", + "ResourceKey": "osFamilyName", + "ResourceKeySegment": "cloudServiceOsFamilies", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": true, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp new file mode 100644 index 0000000000..23cf9a0b73 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp @@ -0,0 +1,56 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to an availability set at creation time. An existing VM cannot be added to an availability set.") +model AvailabilitySet is TrackedResource { + @doc("The name of the availability set.") + @path + @key("availabilitySetName") + @segment("availabilitySets") + name: string; + + ...Azure.ResourceManager.ResourceSku; +} + +@armResourceOperations +interface AvailabilitySets { + @doc("Retrieves information about an availability set.") + get is ArmResourceRead; + @doc("Create or update an availability set.") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update an availability set.") + update is ArmResourcePatchSync; + @doc("Delete an availability set.") + delete is ArmResourceDeleteSync; + @doc("Lists all availability sets in a resource group.") + list is ArmResourceListByParent; + @doc("Lists all availability sets in a subscription.") + listBySubscription is ArmListBySubscription; + @doc("Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes") + @get + ListAvailableSizes is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the availability set.") + @path + availabilitySetName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + VirtualMachineSizeListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp new file mode 100644 index 0000000000..126bfc31db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp @@ -0,0 +1,52 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./CapacityReservationGroup.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the capacity reservation.") +@parentResource(CapacityReservationGroup) +model CapacityReservation is TrackedResource { + @doc("The name of the capacity reservation.") + @path + @key("capacityReservationName") + @segment("capacityReservations") + name: string; + + @doc("Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone.") + zones?: string[]; + + ...Azure.ResourceManager.ResourceSku; +} + +@armResourceOperations +interface CapacityReservations { + @doc("The operation that retrieves information about the capacity reservation.") + get is ArmResourceRead< + CapacityReservation, + { + ...BaseParameters; + + @doc("The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the capacity reservation that is managed by the platform and can change outside of control plane operations.") + @query("$expand") + $expand?: CapacityReservationInstanceViewTypes; + } + >; + @doc("The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("The operation to update a capacity reservation.") + update is ArmResourcePatchAsync< + CapacityReservation, + CapacityReservationProperties + >; + @doc("The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details.") + delete is ArmResourceDeleteAsync; + @doc("Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations.") + listByCapacityReservationGroup is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp new file mode 100644 index 0000000000..ddda7fc14f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp @@ -0,0 +1,60 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently, a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group.") +model CapacityReservationGroup + is TrackedResource { + @doc("The name of the capacity reservation group.") + @path + @key("capacityReservationGroupName") + @segment("capacityReservationGroups") + name: string; + + @doc("Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones.") + zones?: string[]; +} + +@armResourceOperations +interface CapacityReservationGroups { + @doc("The operation that retrieves information about a capacity reservation group.") + get is ArmResourceRead< + CapacityReservationGroup, + { + ...BaseParameters; + + @doc("The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime properties of a capacity reservation that is managed by the platform and can change outside of control plane operations.") + @query("$expand") + $expand?: CapacityReservationGroupInstanceViewTypes; + } + >; + @doc("The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags may be modified. Please refer to https://aka.ms/CapacityReservation for more details.") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("The operation to update a capacity reservation group. When updating a capacity reservation group, only tags may be modified.") + update is ArmResourcePatchSync< + CapacityReservationGroup, + CapacityReservationGroupProperties + >; + @doc("The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details.") + delete is ArmResourceDeleteSync; + @doc("Lists all of the capacity reservation groups in the specified resource group. Use the nextLink property in the response to get the next page of capacity reservation groups.") + listByResourceGroup is ArmResourceListByParent< + CapacityReservationGroup, + { + ...BaseParameters; + + @doc("The expand expression to apply on the operation. Based on the expand param(s) specified we return Virtual Machine or ScaleSet VM Instance or both resource Ids which are associated to capacity reservation group in the response.") + @query("$expand") + $expand?: ExpandTypesForGetCapacityReservationGroups; + } + >; + @doc("Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups.") + listBySubscription is ArmListBySubscription; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp new file mode 100644 index 0000000000..1fe05c589a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp @@ -0,0 +1,116 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Describes the cloud service.") +model CloudService is TrackedResource { + @doc("Name of the cloud service.") + @path + @key("cloudServiceName") + @segment("cloudServices") + name: string; + + @doc("List of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned. This field is optional.") + zones?: string[]; +} + +@armResourceOperations +interface CloudServices { + @doc("Display information about a cloud service.") + get is ArmResourceRead; + @doc("Create or update a cloud service. Please note some properties can be set only during cloud service creation.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a cloud service.") + update is ArmTagsPatchAsync; + @doc("Deletes a cloud service.") + delete is ArmResourceDeleteAsync; + @doc("Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services.") + list is ArmResourceListByParent; + @doc("Gets a list of all cloud services in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services.") + listAll is ArmListBySubscription; + @doc("Starts the cloud service.") + start is ArmResourceActionAsync; + @doc("Power off the cloud service. Note that resources are still attached and you are getting charged for the resources.") + powerOff is ArmResourceActionAsync; + @doc("Restarts one or more role instances in a cloud service.") + restart is ArmResourceActionAsync; + @doc("Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles.") + reimage is ArmResourceActionAsync; + @doc("Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instances.") + rebuild is ArmResourceActionAsync; + @doc("Deletes role instances in a cloud service.") + deleteInstances is ArmResourceActionAsync; + @doc("Gets the status of a cloud service.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/instanceView") + @get + GetInstanceView is Azure.Core.Foundations.Operation< + { + @doc("Name of the resource group.") + @path + resourceGroupName: string; + + @doc("Name of the cloud service.") + @path + cloudServiceName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + CloudServiceInstanceView + >; +} + +@armResourceOperations +interface CloudServicesUpdateDomain { + @doc("Gets the specified update domain of a cloud service. Use nextLink property in the response to get the next page of update domains. Do this till nextLink is null to fetch all the update domains.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}") + @get + GetUpdateDomain is Azure.Core.Foundations.Operation< + { + @doc("Name of the resource group.") + @path + resourceGroupName: string; + + @doc("Name of the cloud service.") + @path + cloudServiceName: string; + + @doc("Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on.") + @path + updateDomain: int32; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + UpdateDomain + >; + + @doc("Gets a list of all update domains in a cloud service.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains") + @get + ListUpdateDomains is Azure.Core.Foundations.Operation< + { + @doc("Name of the resource group.") + @path + resourceGroupName: string; + + @doc("Name of the cloud service.") + @path + cloudServiceName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + UpdateDomainListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp new file mode 100644 index 0000000000..5cca58c63e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp @@ -0,0 +1,31 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./CloudService.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Describes a role of the cloud service.") +@parentResource(CloudService) +model CloudServiceRole is ProxyResource { + @doc("Name of the role.") + @path + @key("roleName") + @segment("roles") + name: string; + + ...Azure.ResourceManager.ResourceSku; +} + +@armResourceOperations +interface CloudServiceRoles { + @doc("Gets a role from a cloud service.") + get is ArmResourceRead; + @doc("Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next page of roles. Do this till nextLink is null to fetch all the roles.") + list is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp new file mode 100644 index 0000000000..2a73c137c4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp @@ -0,0 +1,27 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +// FIXME: CommunityGallery has no properties property +@doc("Specifies information about the Community Gallery that you want to create or update.") +@locationResource +model CommunityGallery is ProxyResource<{}> { + @doc("The public name of the community gallery.") + @path + @key("publicGalleryName") + @segment("communityGalleries") + name: string; +} + +@armResourceOperations +interface CommunityGalleries { + @doc("Get a community gallery by gallery public name.") + get is ArmResourceRead; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp new file mode 100644 index 0000000000..8aa7d32804 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp @@ -0,0 +1,29 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./CommunityGallery.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the gallery image definition that you want to create or update.") +@parentResource(CommunityGallery) +model CommunityGalleryImage is ProxyResource { + @doc("The name of the community gallery image definition.") + @path + @key("galleryImageName") + @segment("images") + name: string; +} + +@armResourceOperations +interface CommunityGalleryImages { + @doc("Get a community gallery image.") + get is ArmResourceRead; + @doc("List community gallery images inside a gallery.") + list is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp new file mode 100644 index 0000000000..03b622c39d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp @@ -0,0 +1,30 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./CommunityGalleryImage.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the gallery image version that you want to create or update.") +@parentResource(CommunityGalleryImage) +model CommunityGalleryImageVersion + is ProxyResource { + @doc("The name of the community gallery image version. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: ..") + @path + @key("galleryImageVersionName") + @segment("versions") + name: string; +} + +@armResourceOperations +interface CommunityGalleryImageVersions { + @doc("Get a community gallery image version.") + get is ArmResourceRead; + @doc("List community gallery image versions inside an image.") + list is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp new file mode 100644 index 0000000000..2f9c0653fe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp @@ -0,0 +1,50 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DedicatedHostGroup.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the Dedicated host.") +@parentResource(DedicatedHostGroup) +model DedicatedHost is TrackedResource { + @doc("The name of the dedicated host.") + @path + @key("hostName") + @segment("hosts") + name: string; + + ...Azure.ResourceManager.ResourceSku; +} + +@armResourceOperations +interface DedicatedHosts { + @doc("Retrieves information about a dedicated host.") + get is ArmResourceRead< + DedicatedHost, + { + ...BaseParameters; + + @doc("The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated host. 'UserData' is not supported for dedicated host.") + @query("$expand") + $expand?: InstanceViewTypes; + } + >; + @doc("Create or update a dedicated host .") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a dedicated host .") + update is ArmResourcePatchAsync; + @doc("Delete a dedicated host.") + delete is ArmResourceDeleteAsync; + @doc("Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts.") + listByHostGroup is ArmResourceListByParent; + @doc("Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details.") + restart is ArmResourceActionAsync; + @doc("Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host.") + ListAvailableSizes is Azure.Core.ResourceList; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp new file mode 100644 index 0000000000..30ad93a783 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp @@ -0,0 +1,50 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group.") +model DedicatedHostGroup is TrackedResource { + @doc("The name of the dedicated host group.") + @path + @key("hostGroupName") + @segment("hostGroups") + name: string; + + @doc("Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone.") + zones?: string[]; +} + +@armResourceOperations +interface DedicatedHostGroups { + @doc("Retrieves information about a dedicated host group.") + get is ArmResourceRead< + DedicatedHostGroup, + { + ...BaseParameters; + + @doc("The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated hosts under the dedicated host group. 'UserData' is not supported for dedicated host group.") + @query("$expand") + $expand?: InstanceViewTypes; + } + >; + @doc("Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596)") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update an dedicated host group.") + update is ArmResourcePatchSync< + DedicatedHostGroup, + DedicatedHostGroupProperties + >; + @doc("Delete a dedicated host group.") + delete is ArmResourceDeleteSync; + @doc("Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in the response to get the next page of dedicated host groups.") + listByResourceGroup is ArmResourceListByParent; + @doc("Lists all of the dedicated host groups in the subscription. Use the nextLink property in the response to get the next page of dedicated host groups.") + listBySubscription is ArmListBySubscription; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp new file mode 100644 index 0000000000..682ec78dda --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp @@ -0,0 +1,52 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Disk resource.") +model Disk is TrackedResource { + @doc("The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters.") + @path + @key("diskName") + @segment("disks") + name: string; + + @doc("List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.") + @visibility("read") + managedByExtended?: string[]; + + @doc("The Logical zone list for Disk.") + zones?: string[]; + + @doc("The extended location where the disk will be created. Extended location cannot be changed.") + extendedLocation?: ExtendedLocation; + + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ManagedBy; +} + +@armResourceOperations +interface Disks { + @doc("Gets information about a disk.") + get is ArmResourceRead; + @doc("Creates or updates a disk.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Updates (patches) a disk.") + update is ArmResourcePatchAsync; + @doc("Deletes a disk.") + delete is ArmResourceDeleteAsync; + @doc("Lists all the disks under a resource group.") + listByResourceGroup is ArmResourceListByParent; + @doc("Lists all the disks under a subscription.") + list is ArmListBySubscription; + @doc("Grants access to a disk.") + grantAccess is ArmResourceActionAsync; + @doc("Revokes access to a disk.") + revokeAccess is ArmResourceActionAsync; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp new file mode 100644 index 0000000000..1fa6ffbe4f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp @@ -0,0 +1,57 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("disk access resource.") +model DiskAccess is TrackedResource { + @doc("The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters.") + @path + @key("diskAccessName") + @segment("diskAccesses") + name: string; + + @doc("The extended location where the disk access will be created. Extended location cannot be changed.") + extendedLocation?: ExtendedLocation; +} + +@armResourceOperations +interface DiskAccesses { + @doc("Gets information about a disk access resource.") + get is ArmResourceRead; + @doc("Creates or updates a disk access resource") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Updates (patches) a disk access resource.") + update is ArmTagsPatchAsync; + @doc("Deletes a disk access resource.") + delete is ArmResourceDeleteAsync; + @doc("Lists all the disk access resources under a resource group.") + listByResourceGroup is ArmResourceListByParent; + @doc("Lists all the disk access resources under a subscription.") + list is ArmListBySubscription; + @doc("Gets the private link resources possible under disk access resource") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources") + @get + GetPrivateLinkResources is Azure.Core.Foundations.Operation< + { + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters.") + @path + diskAccessName: string; + }, + PrivateLinkResourceListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp new file mode 100644 index 0000000000..e736d83adf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp @@ -0,0 +1,39 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("disk encryption set resource.") +model DiskEncryptionSet is TrackedResource { + @doc("The name of the disk encryption set that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters.") + @path + @key("diskEncryptionSetName") + @segment("diskEncryptionSets") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; +} + +@armResourceOperations +interface DiskEncryptionSets { + @doc("Gets information about a disk encryption set.") + get is ArmResourceRead; + @doc("Creates or updates a disk encryption set") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Updates (patches) a disk encryption set.") + update is ArmResourcePatchAsync; + @doc("Deletes a disk encryption set.") + delete is ArmResourceDeleteAsync; + @doc("Lists all the disk encryption sets under a resource group.") + listByResourceGroup is ArmResourceListByParent; + @doc("Lists all the disk encryption sets under a subscription.") + list is ArmListBySubscription; + @doc("Lists all resources that are encrypted with this disk encryption set.") + ListAssociatedResources is Azure.Core.ResourceList; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp new file mode 100644 index 0000000000..a5c7eb6252 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp @@ -0,0 +1,73 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./RestorePoint.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Properties of disk restore point") +@parentResource(RestorePoint) +model DiskRestorePoint is ProxyResource { + @doc("The name of the disk restore point created.") + @path + @key("diskRestorePointName") + @segment("diskRestorePoints") + name: string; +} + +@armResourceOperations +interface DiskRestorePoint { + @doc("Get disk restorePoint resource") + get is ArmResourceRead< + DiskRestorePoint, + { + ...BaseParameters; + + @doc("The name of the restore point collection that the disk restore point belongs.") + @path + restorePointCollectionName: string; + } + >; + @doc("Lists diskRestorePoints under a vmRestorePoint.") + listByRestorePoint is ArmResourceListByParent< + DiskRestorePoint, + { + ...BaseParameters; + + @doc("The name of the restore point collection that the disk restore point belongs.") + @path + restorePointCollectionName: string; + } + >; + @doc("Grants access to a diskRestorePoint.") + grantAccess is ArmResourceActionAsync< + DiskRestorePoint, + GrantAccessData, + AccessUri, + { + ...BaseParameters; + + @doc("The name of the restore point collection that the disk restore point belongs.") + @path + restorePointCollectionName: string; + } + >; + @doc("Revokes access to a diskRestorePoint.") + revokeAccess is ArmResourceActionAsync< + DiskRestorePoint, + void, + void, + { + ...BaseParameters; + + @doc("The name of the restore point collection that the disk restore point belongs.") + @path + restorePointCollectionName: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp new file mode 100644 index 0000000000..736486b104 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp @@ -0,0 +1,54 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the Shared Image Gallery that you want to create or update.") +model Gallery is TrackedResource { + @doc("The name of the Shared Image Gallery.") + @path + @key("galleryName") + @segment("galleries") + name: string; +} + +@armResourceOperations +interface Galleries { + @doc("Retrieves information about a Shared Image Gallery.") + get is ArmResourceRead< + Gallery, + { + ...BaseParameters; + + @doc("The select expression to apply on the operation.") + @query("$select") + $select?: SelectPermissions; + + @doc("The expand query option to apply on the operation.") + @query("$expand") + $expand?: GalleryExpandParams; + } + >; + @doc("Create or update a Shared Image Gallery.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a Shared Image Gallery.") + update is ArmResourcePatchAsync; + @doc("Delete a Shared Image Gallery.") + delete is ArmResourceDeleteAsync; + @doc("List galleries under a resource group.") + listByResourceGroup is ArmResourceListByParent; + @doc("List galleries under a subscription.") + list is ArmListBySubscription; +} + +@armResourceOperations +interface GallerySharingProfile { + @doc("Update sharing profile of a gallery.") + update is ArmResourceActionAsync; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp new file mode 100644 index 0000000000..db390620d8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp @@ -0,0 +1,38 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Gallery.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the gallery Application Definition that you want to create or update.") +@parentResource(Gallery) +model GalleryApplication is TrackedResource { + @doc("The name of the gallery Application Definition to be retrieved.") + @path + @key("galleryApplicationName") + @segment("applications") + name: string; +} + +@armResourceOperations +interface GalleryApplications { + @doc("Retrieves information about a gallery Application Definition.") + get is ArmResourceRead; + @doc("Create or update a gallery Application Definition.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a gallery Application Definition.") + update is ArmResourcePatchAsync< + GalleryApplication, + GalleryApplicationProperties + >; + @doc("Delete a gallery Application.") + delete is ArmResourceDeleteAsync; + @doc("List gallery Application Definitions in a gallery.") + listByGallery is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp new file mode 100644 index 0000000000..839d86ca6e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp @@ -0,0 +1,48 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./GalleryApplication.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the gallery Application Version that you want to create or update.") +@parentResource(GalleryApplication) +model GalleryApplicationVersion + is TrackedResource { + @doc("The name of the gallery Application Version to be retrieved.") + @path + @key("galleryApplicationVersionName") + @segment("versions") + name: string; +} + +@armResourceOperations +interface GalleryApplicationVersions { + @doc("Retrieves information about a gallery Application Version.") + get is ArmResourceRead< + GalleryApplicationVersion, + { + ...BaseParameters; + + @doc("The expand expression to apply on the operation.") + @query("$expand") + $expand?: ReplicationStatusTypes; + } + >; + @doc("Create or update a gallery Application Version.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a gallery Application Version.") + update is ArmResourcePatchAsync< + GalleryApplicationVersion, + GalleryApplicationVersionProperties + >; + @doc("Delete a gallery Application Version.") + delete is ArmResourceDeleteAsync; + @doc("List gallery Application Versions in a gallery Application Definition.") + listByGalleryApplication is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp new file mode 100644 index 0000000000..280fca9170 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp @@ -0,0 +1,35 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Gallery.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the gallery image definition that you want to create or update.") +@parentResource(Gallery) +model GalleryImage is TrackedResource { + @doc("The name of the gallery image definition to be retrieved.") + @path + @key("galleryImageName") + @segment("images") + name: string; +} + +@armResourceOperations +interface GalleryImages { + @doc("Retrieves information about a gallery image definition.") + get is ArmResourceRead; + @doc("Create or update a gallery image definition.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a gallery image definition.") + update is ArmResourcePatchAsync; + @doc("Delete a gallery image.") + delete is ArmResourceDeleteAsync; + @doc("List gallery image definitions in a gallery.") + listByGallery is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp new file mode 100644 index 0000000000..071e2b238a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp @@ -0,0 +1,47 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./GalleryImage.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the gallery image version that you want to create or update.") +@parentResource(GalleryImage) +model GalleryImageVersion is TrackedResource { + @doc("The name of the gallery image version to be retrieved.") + @path + @key("galleryImageVersionName") + @segment("versions") + name: string; +} + +@armResourceOperations +interface GalleryImageVersions { + @doc("Retrieves information about a gallery image version.") + get is ArmResourceRead< + GalleryImageVersion, + { + ...BaseParameters; + + @doc("The expand expression to apply on the operation.") + @query("$expand") + $expand?: ReplicationStatusTypes; + } + >; + @doc("Create or update a gallery image version.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a gallery image version.") + update is ArmResourcePatchAsync< + GalleryImageVersion, + GalleryImageVersionProperties + >; + @doc("Delete a gallery image version.") + delete is ArmResourceDeleteAsync; + @doc("List gallery image versions in a gallery image definition.") + listByGalleryImage is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp new file mode 100644 index 0000000000..68bf122274 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp @@ -0,0 +1,47 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.") +model Image is TrackedResource { + @doc("The name of the image.") + @path + @key("imageName") + @segment("images") + name: string; + + @doc("The extended location of the Image.") + extendedLocation?: ExtendedLocation; +} + +@armResourceOperations +interface Images { + @doc("Gets an image.") + get is ArmResourceRead< + Image, + { + ...BaseParameters; + + @doc("The expand expression to apply on the operation.") + @query("$expand") + $expand?: string; + } + >; + @doc("Create or update an image.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update an image.") + update is ArmResourcePatchAsync; + @doc("Deletes an Image.") + delete is ArmResourceDeleteAsync; + @doc("Gets the list of images under a resource group. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.") + listByResourceGroup is ArmResourceListByParent; + @doc("Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.") + list is ArmListBySubscription; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp new file mode 100644 index 0000000000..c941f39dbb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp @@ -0,0 +1,28 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Describes a cloud service OS family.") +@locationResource +model OSFamily is ProxyResource { + @doc("Name of the OS family.") + @path + @key("osFamilyName") + @segment("cloudServiceOsFamilies") + name: string; +} + +@armResourceOperations +interface CloudServiceOperatingSystems { + @doc("Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service.") + getOSFamily is ArmResourceRead; + @doc("Gets a list of all guest operating system families available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS Families. Do this till nextLink is null to fetch all the OS Families.") + listOSFamilies is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp new file mode 100644 index 0000000000..5351eac17b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp @@ -0,0 +1,28 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Describes a cloud service OS version.") +@locationResource +model OSVersion is ProxyResource { + @doc("Name of the OS version.") + @path + @key("osVersionName") + @segment("cloudServiceOsVersions") + name: string; +} + +@armResourceOperations +interface CloudServiceOperatingSystems { + @doc("Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service.") + getOSVersion is ArmResourceRead; + @doc("Gets a list of all guest operating system versions available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS versions. Do this till nextLink is null to fetch all the OS versions.") + listOSVersions is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp new file mode 100644 index 0000000000..20aeb5e00d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp @@ -0,0 +1,34 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DiskAccess.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("The Private Endpoint Connection resource.") +@parentResource(DiskAccess) +model PrivateEndpointConnection + is ProxyResource { + @doc("The name of the private endpoint connection.") + @path + @key("privateEndpointConnectionName") + @segment("privateEndpointConnections") + name: string; +} + +@armResourceOperations +interface DiskAccesses { + @doc("Gets information about a private endpoint connection under a disk access resource.") + getAPrivateEndpointConnection is ArmResourceRead; + @doc("Approve or reject a private endpoint connection under disk access resource, this can't be used to create a new private endpoint connection.") + updateAPrivateEndpointConnection is ArmResourceCreateOrUpdateAsync; + @doc("Deletes a private endpoint connection under a disk access resource.") + deleteAPrivateEndpointConnection is ArmResourceDeleteAsync; + @doc("List information about private endpoint connections under a disk access resource") + listPrivateEndpointConnections is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp new file mode 100644 index 0000000000..a5ef15b6de --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp @@ -0,0 +1,52 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the proximity placement group.") +model ProximityPlacementGroup + is TrackedResource { + @doc("The name of the proximity placement group.") + @path + @key("proximityPlacementGroupName") + @segment("proximityPlacementGroups") + name: string; + + @doc("Specifies the Availability Zone where virtual machine, virtual machine scale set or availability set associated with the proximity placement group can be created.") + zones?: string[]; +} + +@armResourceOperations +interface ProximityPlacementGroups { + @doc("Retrieves information about a proximity placement group .") + get is ArmResourceRead< + ProximityPlacementGroup, + { + ...BaseParameters; + + @doc("includeColocationStatus=true enables fetching the colocation status of all the resources in the proximity placement group.") + @query("includeColocationStatus") + includeColocationStatus?: string; + } + >; + @doc("Create or update a proximity placement group.") + createOrUpdate is ArmResourceCreateOrReplaceSync; + // FIXME: (ArmResourcePatch): ArmResourcePatchSync/ArmResourcePatchAsync should have a body parameter with either properties property or tag property + @doc("Update a proximity placement group.") + update is ArmCustomPatchSync< + ProximityPlacementGroup, + ProximityPlacementGroupUpdate + >; + @doc("Delete a proximity placement group.") + delete is ArmResourceDeleteSync; + @doc("Lists all proximity placement groups in a resource group.") + listByResourceGroup is ArmResourceListByParent; + @doc("Lists all proximity placement groups in a subscription.") + listBySubscription is ArmListBySubscription; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp new file mode 100644 index 0000000000..99a5d6a086 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp @@ -0,0 +1,62 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./RestorePointCollection.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Restore Point details.") +@parentResource(RestorePointCollection) +model RestorePoint is ProxyResource { + @doc("The name of the restore point.") + @path + @key("restorePointName") + @segment("restorePoints") + name: string; +} + +@armResourceOperations +interface RestorePoints { + @doc("The operation to get the restore point.") + get is ArmResourceRead< + RestorePoint, + { + ...BaseParameters; + + @doc("The name of the restore point collection.") + @path + restorePointCollectionName: string; + + @doc("The expand expression to apply on the operation. 'InstanceView' retrieves information about the run-time state of a restore point.") + @query("$expand") + $expand?: RestorePointExpandOptions; + } + >; + @doc("The operation to create the restore point. Updating properties of an existing restore point is not allowed") + create is ArmResourceCreateOrUpdateAsync< + RestorePoint, + { + ...BaseParameters; + + @doc("The name of the restore point collection.") + @path + restorePointCollectionName: string; + } + >; + @doc("The operation to delete the restore point.") + delete is ArmResourceDeleteAsync< + RestorePoint, + { + ...BaseParameters; + + @doc("The name of the Restore Point Collection.") + @path + restorePointCollectionName: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp new file mode 100644 index 0000000000..40be5b7baf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp @@ -0,0 +1,77 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Create or update Restore Point collection parameters.") +model RestorePointCollection + is TrackedResource { + @doc("The name of the restore point collection.") + @path + @key("restorePointCollectionName") + @segment("restorePointCollections") + name: string; +} + +@armResourceOperations +interface RestorePointCollections { + @doc("The operation to get the restore point collection.") + get is ArmResourceRead< + RestorePointCollection, + { + ...BaseParameters; + + @doc("The name of the restore point collection.") + @path + restorePointCollectionName: string; + + @doc("The expand expression to apply on the operation. If expand=restorePoints, server will return all contained restore points in the restorePointCollection.") + @query("$expand") + $expand?: RestorePointCollectionExpandOptions; + } + >; + @doc("The operation to create or update the restore point collection. Please refer to https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags may be modified.") + createOrUpdate is ArmResourceCreateOrReplaceSync< + RestorePointCollection, + { + ...BaseParameters; + + @doc("The name of the restore point collection.") + @path + restorePointCollectionName: string; + } + >; + @doc("The operation to update the restore point collection.") + update is ArmResourcePatchSync< + RestorePointCollection, + RestorePointCollectionProperties, + { + ...BaseParameters; + + @doc("The name of the restore point collection.") + @path + restorePointCollectionName: string; + } + >; + @doc("The operation to delete the restore point collection. This operation will also delete all the contained restore points.") + delete is ArmResourceDeleteAsync< + RestorePointCollection, + { + ...BaseParameters; + + @doc("The name of the Restore Point Collection.") + @path + restorePointCollectionName: string; + } + >; + @doc("Gets the list of restore point collections in a resource group.") + list is ArmResourceListByParent; + @doc("Gets the list of restore point collections in the subscription. Use nextLink property in the response to get the next page of restore point collections. Do this till nextLink is not null to fetch all the restore point collections.") + listAll is ArmListBySubscription; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp new file mode 100644 index 0000000000..910bfe6dbe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp @@ -0,0 +1,108 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./CloudService.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Describes the cloud service role instance.") +@parentResource(CloudService) +model RoleInstance is ProxyResource { + @doc("Name of the role instance.") + @path + @key("roleInstanceName") + @segment("roleInstances") + name: string; + + ...Azure.ResourceManager.ResourceSku; +} + +@armResourceOperations +interface CloudServiceRoleInstances { + @doc("Gets a role instance from a cloud service.") + get is ArmResourceRead< + RoleInstance, + { + ...BaseParameters; + + @doc("The expand expression to apply to the operation. 'UserData' is not supported for cloud services.") + @query("$expand") + $expand?: InstanceViewTypes; + } + >; + @doc("Deletes a role instance from a cloud service.") + delete is ArmResourceDeleteAsync; + @doc("Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances.") + list is ArmResourceListByParent< + RoleInstance, + { + ...BaseParameters; + + @doc("The expand expression to apply to the operation. 'UserData' is not supported for cloud services.") + @query("$expand") + $expand?: InstanceViewTypes; + } + >; + @doc("The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.") + restart is ArmResourceActionAsync; + @doc("The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.") + reimage is ArmResourceActionAsync; + @doc("The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance.") + rebuild is ArmResourceActionAsync; + @doc("Retrieves information about the run-time state of a role instance in a cloud service.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView") + @get + GetInstanceView is Azure.Core.Foundations.Operation< + { + @doc("Name of the role instance.") + @path + roleInstanceName: string; + + @doc("Name of the resource group.") + @path + resourceGroupName: string; + + @doc("Name of the cloud service.") + @path + cloudServiceName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + RoleInstanceInstanceView + >; + + @doc("Gets a remote desktop file for a role instance in a cloud service.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile") + @get + GetRemoteDesktopFile is Azure.Core.Foundations.Operation< + { + @doc("Name of the role instance.") + @path + roleInstanceName: string; + + @doc("Name of the resource group.") + @path + resourceGroupName: string; + + @doc("Name of the cloud service.") + @path + cloudServiceName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("Accept header") + @header + accept: "application/x-rdp"; + }, + void + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp new file mode 100644 index 0000000000..4c99f1f248 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp @@ -0,0 +1,36 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./VirtualMachineScaleSet.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("The status of the latest virtual machine scale set rolling upgrade.") +@singleton("latest") +@parentResource(VirtualMachineScaleSet) +model RollingUpgradeStatusInfo + is TrackedResource { + @key("latest") + @segment("rollingUpgrades") + name: string; +} + +@armResourceOperations +interface VirtualMachineScaleSetRollingUpgrades { + @doc("Gets the status of the latest virtual machine scale set rolling upgrade.") + getLatest is ArmResourceRead< + RollingUpgradeStatusInfo, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp new file mode 100644 index 0000000000..b6287911be --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp @@ -0,0 +1,38 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +// FIXME: SharedGallery has no properties property +@doc("Specifies information about the Shared Gallery that you want to create or update.") +@locationResource +model SharedGallery is ProxyResource<{}> { + @doc("The unique name of the Shared Gallery.") + @path + @key("galleryUniqueName") + @segment("sharedGalleries") + name: string; +} + +@armResourceOperations +interface SharedGalleries { + @doc("Get a shared gallery by subscription id or tenant id.") + get is ArmResourceRead; + @doc("List shared galleries by subscription id or tenant id.") + list is ArmResourceListByParent< + SharedGallery, + { + ...BaseParameters; + + @doc("The query parameter to decide what shared galleries to fetch when doing listing operations.") + @query("sharedTo") + sharedTo?: SharedToValues; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp new file mode 100644 index 0000000000..fd2319b665 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp @@ -0,0 +1,38 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./SharedGallery.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the gallery image definition that you want to create or update.") +@parentResource(SharedGallery) +model SharedGalleryImage is ProxyResource { + @doc("The name of the Shared Gallery Image Definition from which the Image Versions are to be listed.") + @path + @key("galleryImageName") + @segment("images") + name: string; +} + +@armResourceOperations +interface SharedGalleryImages { + @doc("Get a shared gallery image by subscription id or tenant id.") + get is ArmResourceRead; + @doc("List shared gallery images by subscription id or tenant id.") + list is ArmResourceListByParent< + SharedGalleryImage, + { + ...BaseParameters; + + @doc("The query parameter to decide what shared galleries to fetch when doing listing operations.") + @query("sharedTo") + sharedTo?: SharedToValues; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp new file mode 100644 index 0000000000..b5d8524312 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp @@ -0,0 +1,39 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./SharedGalleryImage.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the gallery image version that you want to create or update.") +@parentResource(SharedGalleryImage) +model SharedGalleryImageVersion + is ProxyResource { + @doc("The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: ..") + @path + @key("galleryImageVersionName") + @segment("versions") + name: string; +} + +@armResourceOperations +interface SharedGalleryImageVersions { + @doc("Get a shared gallery image version by subscription id or tenant id.") + get is ArmResourceRead; + @doc("List shared gallery image versions by subscription id or tenant id.") + list is ArmResourceListByParent< + SharedGalleryImageVersion, + { + ...BaseParameters; + + @doc("The query parameter to decide what shared galleries to fetch when doing listing operations.") + @query("sharedTo") + sharedTo?: SharedToValues; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp new file mode 100644 index 0000000000..e90b77920c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp @@ -0,0 +1,45 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Snapshot resource.") +model Snapshot is TrackedResource { + @doc("The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters.") + @path + @key("snapshotName") + @segment("snapshots") + name: string; + + @doc("The extended location where the snapshot will be created. Extended location cannot be changed.") + extendedLocation?: ExtendedLocation; + + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ManagedBy; +} + +@armResourceOperations +interface Snapshots { + @doc("Gets information about a snapshot.") + get is ArmResourceRead; + @doc("Creates or updates a snapshot.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Updates (patches) a snapshot.") + update is ArmResourcePatchAsync; + @doc("Deletes a snapshot.") + delete is ArmResourceDeleteAsync; + @doc("Lists snapshots under a resource group.") + listByResourceGroup is ArmResourceListByParent; + @doc("Lists snapshots under a subscription.") + list is ArmListBySubscription; + @doc("Grants access to a snapshot.") + grantAccess is ArmResourceActionAsync; + @doc("Revokes access to a snapshot.") + revokeAccess is ArmResourceActionAsync; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp new file mode 100644 index 0000000000..1f40c59c4e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp @@ -0,0 +1,44 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Specifies information about the SSH public key.") +model SshPublicKeyResource is TrackedResource { + @doc("The name of the SSH public key.") + @path + @key("sshPublicKeyName") + @segment("sshPublicKeys") + name: string; +} + +@armResourceOperations +interface SshPublicKeys { + @doc("Retrieves information about an SSH public key.") + get is ArmResourceRead; + @doc("Creates a new SSH public key resource.") + create is ArmResourceCreateOrReplaceSync; + @doc("Updates a new SSH public key resource.") + update is ArmResourcePatchSync< + SshPublicKeyResource, + SshPublicKeyResourceProperties + >; + @doc("Delete an SSH public key.") + delete is ArmResourceDeleteSync; + @doc("Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the response to get the next page of SSH public keys.") + listByResourceGroup is ArmResourceListByParent; + @doc("Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys.") + listBySubscription is ArmListBySubscription; + @doc("Generates and returns a public/private key pair and populates the SSH public key resource with the public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key resource.") + generateKeyPair is ArmResourceActionSync< + SshPublicKeyResource, + void, + SshPublicKeyGenerateKeyPairResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp new file mode 100644 index 0000000000..c130c7cf5d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp @@ -0,0 +1,216 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Describes a Virtual Machine.") +model VirtualMachine is TrackedResource { + @doc("The name of the virtual machine.") + @path + @key("vmName") + @segment("virtualMachines") + name: string; + + @doc("The virtual machine child extension resources.") + @visibility("read") + resources?: VirtualMachineExtension[]; + + @doc("The virtual machine zones.") + zones?: string[]; + + @doc("The extended location of the Virtual Machine.") + extendedLocation?: ExtendedLocation; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourcePlan; +} + +@armResourceOperations +interface VirtualMachines { + @doc("Retrieves information about the model view or the instance view of a virtual machine.") + get is ArmResourceRead< + VirtualMachine, + { + ...BaseParameters; + + @doc("The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the virtual machine that is managed by the platform and can change outside of control plane operations. 'UserData' retrieves the UserData property as part of the VM model view that was provided by the user during the VM Create/Update operation.") + @query("$expand") + $expand?: InstanceViewTypes; + } + >; + @doc("The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("The operation to update a virtual machine.") + update is ArmResourcePatchAsync; + @doc("The operation to delete a virtual machine.") + delete is ArmResourceDeleteAsync< + VirtualMachine, + { + ...BaseParameters; + + @doc("Optional parameter to force delete virtual machines.") + @query("forceDeletion") + forceDeletion?: boolean; + } + >; + @doc("Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.") + list is ArmResourceListByParent< + VirtualMachine, + { + ...BaseParameters; + + @doc("The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'") + @query("$filter") + $filter?: string; + + @doc("The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified") + @query("$expand") + $expand?: ExpandTypeForListVMs; + } + >; + @doc("Gets all the virtual machines under the specified subscription for the specified location.") + listByLocation is ArmResourceListAtScope< + VirtualMachine, + LocationScope, + { + ...BaseParameters; + + @doc("The location for which virtual machines under the subscription are queried.") + @pattern("^[-\\w\\._]+$") + @path + location: string; + } + >; + @doc("Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.") + listAll is ArmListBySubscription; + @doc("Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.") + capture is ArmResourceActionAsync< + VirtualMachine, + VirtualMachineCaptureParameters, + VirtualMachineCaptureResult + >; + @doc("Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.") + convertToManagedDisks is ArmResourceActionAsync; + @doc("Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.") + deallocate is ArmResourceActionAsync< + VirtualMachine, + void, + void, + { + ...BaseParameters; + + @doc("Optional parameter to hibernate a virtual machine. (Feature in Preview)") + @query("hibernate") + hibernate?: boolean; + } + >; + @doc("Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image).") + generalize is ArmResourceActionSync; + @doc("The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.") + powerOff is ArmResourceActionAsync< + VirtualMachine, + void, + void, + { + ...BaseParameters; + + @doc("The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified") + @query("skipShutdown") + skipShutdown?: boolean; + } + >; + @doc("The operation to reapply a virtual machine's state.") + reapply is ArmResourceActionAsync; + @doc("The operation to restart a virtual machine.") + restart is ArmResourceActionAsync; + @doc("The operation to start a virtual machine.") + start is ArmResourceActionAsync; + @doc("Shuts down the virtual machine, moves it to a new node, and powers it back on.") + redeploy is ArmResourceActionAsync; + @doc("Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.") + reimage is ArmResourceActionAsync< + VirtualMachine, + VirtualMachineReimageParameters, + void + >; + @doc("The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.") + retrieveBootDiagnosticsData is ArmResourceActionSync< + VirtualMachine, + void, + RetrieveBootDiagnosticsDataResult, + { + ...BaseParameters; + + @doc("Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes.") + @query("sasUriExpirationTimeInMinutes") + sasUriExpirationTimeInMinutes?: int32; + } + >; + @doc("The operation to perform maintenance on a virtual machine.") + performMaintenance is ArmResourceActionAsync; + @doc("The operation to simulate the eviction of spot virtual machine.") + simulateEviction is ArmResourceActionNoContentSync; + @doc("Assess patches on the VM.") + assessPatches is ArmResourceActionAsync< + VirtualMachine, + void, + VirtualMachineAssessPatchesResult + >; + @doc("Installs patches on the VM.") + installPatches is ArmResourceActionAsync< + VirtualMachine, + VirtualMachineInstallPatchesParameters, + VirtualMachineInstallPatchesResult + >; + @doc("Run command on the VM.") + runCommand is ArmResourceActionAsync< + VirtualMachine, + RunCommandInput, + RunCommandResult + >; + @doc("Retrieves information about the run-time state of a virtual machine.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView") + @get + InstanceView is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the virtual machine.") + @path + vmName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + VirtualMachineInstanceView + >; + + @doc("Lists all available virtual machine sizes to which the specified virtual machine can be resized.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes") + @get + ListAvailableSizes is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the virtual machine.") + @path + vmName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + VirtualMachineSizeListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp new file mode 100644 index 0000000000..2bc2115d2d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp @@ -0,0 +1,57 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./VirtualMachine.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Describes a Virtual Machine Extension.") +@parentResource(VirtualMachine) +model VirtualMachineExtension + is TrackedResource { + @doc("The name of the virtual machine extension.") + @path + @key("vmExtensionName") + @segment("extensions") + name: string; +} + +@armResourceOperations +interface VirtualMachineExtensions { + @doc("The operation to get the extension.") + get is ArmResourceRead< + VirtualMachineExtension, + { + ...BaseParameters; + + @doc("The expand expression to apply on the operation.") + @query("$expand") + $expand?: string; + } + >; + @doc("The operation to create or update the extension.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("The operation to update the extension.") + update is ArmResourcePatchAsync< + VirtualMachineExtension, + VirtualMachineExtensionProperties + >; + @doc("The operation to delete the extension.") + delete is ArmResourceDeleteAsync; + @doc("The operation to get all extensions of a Virtual Machine.") + list is ArmResourceListByParent< + VirtualMachineExtension, + { + ...BaseParameters; + + @doc("The expand expression to apply on the operation.") + @query("$expand") + $expand?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp new file mode 100644 index 0000000000..b27cbe68d0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp @@ -0,0 +1,28 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Describes a Virtual Machine Extension Image.") +@locationResource +model VirtualMachineExtensionImage + is TrackedResource { + @path + @key("version") + @segment("versions") + name: string; +} + +@armResourceOperations +interface VirtualMachineExtensionImages { + @doc("Gets a virtual machine extension image.") + get is ArmResourceRead; + @doc("Gets a list of virtual machine extension image types.") + listTypes is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp new file mode 100644 index 0000000000..5fefe9ab75 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp @@ -0,0 +1,70 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./VirtualMachine.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Describes a Virtual Machine run command.") +@parentResource(VirtualMachine) +model VirtualMachineRunCommand + is TrackedResource { + @doc("The name of the virtual machine run command.") + @path + @key("runCommandName") + @segment("runCommands") + name: string; +} + +@armResourceOperations +interface VirtualMachineRunCommands { + @doc("The operation to get the run command.") + getByVirtualMachine is ArmResourceRead< + VirtualMachineRunCommand, + { + ...BaseParameters; + + @doc("The expand expression to apply on the operation.") + @query("$expand") + $expand?: string; + } + >; + @doc("The operation to create or update the run command.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("The operation to update the run command.") + update is ArmResourcePatchAsync< + VirtualMachineRunCommand, + VirtualMachineRunCommandProperties + >; + @doc("The operation to delete the run command.") + delete is ArmResourceDeleteAsync; + @doc("The operation to get all run commands of a Virtual Machine.") + listByVirtualMachine is ArmResourceListByParent< + VirtualMachineRunCommand, + { + ...BaseParameters; + + @doc("The expand expression to apply on the operation.") + @query("$expand") + $expand?: string; + } + >; + @doc("Lists all available run commands for a subscription in a location.") + list is ArmResourceListAtScope< + VirtualMachineRunCommand, + LocationScope, + { + ...BaseParameters; + + @doc("The location upon which run commands is queried.") + @pattern("^[-\\w\\._]+$") + @path + location: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp new file mode 100644 index 0000000000..8a6111e69d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp @@ -0,0 +1,412 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Describes a Virtual Machine Scale Set.") +model VirtualMachineScaleSet + is TrackedResource { + @doc("The name of the VM scale set.") + @path + @key("vmScaleSetName") + @segment("virtualMachineScaleSets") + name: string; + + @doc("The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set") + zones?: string[]; + + @doc("The extended location of the Virtual Machine Scale Set.") + extendedLocation?: ExtendedLocation; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourcePlan; +} + +@armResourceOperations +interface VirtualMachineScaleSets { + @doc("Display information about a virtual machine scale set.") + get is ArmResourceRead< + VirtualMachineScaleSet, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("The expand expression to apply on the operation. 'UserData' retrieves the UserData property of the VM scale set that was provided by the user during the VM scale set Create/Update operation") + @query("$expand") + $expand?: ExpandTypesForGetVMScaleSets; + } + >; + @doc("Create or update a VM scale set.") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + VirtualMachineScaleSet, + { + ...BaseParameters; + + @doc("The name of the VM scale set to create or update.") + @path + vmScaleSetName: string; + } + >; + @doc("Update a VM scale set.") + update is ArmResourcePatchAsync< + VirtualMachineScaleSet, + VirtualMachineScaleSetProperties, + { + ...BaseParameters; + + @doc("The name of the VM scale set to create or update.") + @path + vmScaleSetName: string; + } + >; + @doc("Deletes a VM scale set.") + delete is ArmResourceDeleteAsync< + VirtualMachineScaleSet, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("Optional parameter to force delete a VM scale set. (Feature in Preview)") + @query("forceDeletion") + forceDeletion?: boolean; + } + >; + @doc("Gets a list of all VM scale sets under a resource group.") + list is ArmResourceListByParent; + @doc("Gets all the VM scale sets under the specified subscription for the specified location.") + listByLocation is ArmResourceListAtScope< + VirtualMachineScaleSet, + LocationScope, + { + ...BaseParameters; + + @doc("The location for which VM scale sets under the subscription are queried.") + @pattern("^[-\\w\\._]+$") + @path + location: string; + } + >; + @doc("Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets.") + listAll is ArmListBySubscription; + @doc("Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates.") + deallocate is ArmResourceActionAsync< + VirtualMachineScaleSet, + VirtualMachineScaleSetVMInstanceIDs, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("Optional parameter to hibernate a virtual machine from the VM scale set. (This feature is available for VMSS with Flexible OrchestrationMode only)") + @query("hibernate") + hibernate?: boolean; + } + >; + @doc("Deletes virtual machines in a VM scale set.") + deleteInstances is ArmResourceActionAsync< + VirtualMachineScaleSet, + VirtualMachineScaleSetVMInstanceRequiredIDs, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview)") + @query("forceDeletion") + forceDeletion?: boolean; + } + >; + @doc("Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.") + powerOff is ArmResourceActionAsync< + VirtualMachineScaleSet, + VirtualMachineScaleSetVMInstanceIDs, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified") + @query("skipShutdown") + skipShutdown?: boolean; + } + >; + @doc("Restarts one or more virtual machines in a VM scale set.") + restart is ArmResourceActionAsync< + VirtualMachineScaleSet, + VirtualMachineScaleSetVMInstanceIDs, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Starts one or more virtual machines in a VM scale set.") + start is ArmResourceActionAsync< + VirtualMachineScaleSet, + VirtualMachineScaleSetVMInstanceIDs, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances") + reapply is ArmResourceActionAsync< + VirtualMachineScaleSet, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.") + redeploy is ArmResourceActionAsync< + VirtualMachineScaleSet, + VirtualMachineScaleSetVMInstanceIDs, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications") + performMaintenance is ArmResourceActionAsync< + VirtualMachineScaleSet, + VirtualMachineScaleSetVMInstanceIDs, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.") + updateInstances is ArmResourceActionAsync< + VirtualMachineScaleSet, + VirtualMachineScaleSetVMInstanceRequiredIDs, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.") + reimage is ArmResourceActionAsync< + VirtualMachineScaleSet, + VirtualMachineScaleSetReimageParameters, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.") + reimageAll is ArmResourceActionAsync< + VirtualMachineScaleSet, + VirtualMachineScaleSetVMInstanceIDs, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.") + forceRecoveryServiceFabricPlatformUpdateDomainWalk is ArmResourceActionSync< + VirtualMachineScaleSet, + void, + RecoveryWalkResponse, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("The platform update domain for which a manual recovery walk is requested") + @query("platformUpdateDomain") + platformUpdateDomain: int32; + + @doc("The zone in which the manual recovery walk is requested for cross zone virtual machine scale set") + @query("zone") + zone?: string; + + @doc("The placement group id for which the manual recovery walk is requested.") + @query("placementGroupId") + placementGroupId?: string; + } + >; + @doc("Converts SinglePlacementGroup property to false for a existing virtual machine scale set.") + convertToSinglePlacementGroup is ArmResourceActionSync< + VirtualMachineScaleSet, + VMScaleSetConvertToSinglePlacementGroupInput, + void, + { + ...BaseParameters; + + @doc("The name of the virtual machine scale set to create or update.") + @path + vmScaleSetName: string; + } + >; + @doc("Changes ServiceState property for a given service") + setOrchestrationServiceState is ArmResourceActionAsync< + VirtualMachineScaleSet, + OrchestrationServiceStateInput, + void, + { + ...BaseParameters; + + @doc("The name of the virtual machine scale set to create or update.") + @path + vmScaleSetName: string; + } + >; + @doc("Gets the status of a VM scale set instance.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView") + @get + GetInstanceView is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + VirtualMachineScaleSetInstanceView + >; + + @doc("Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus") + @get + ListSkus is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + VirtualMachineScaleSetListSkusResult + >; + + @doc("Gets list of OS upgrades on a VM scale set instance.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory") + @get + GetOSUpgradeHistory is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + VirtualMachineScaleSetListOSUpgradeHistory + >; +} + +@armResourceOperations +interface VirtualMachineScaleSetRollingUpgrades { + @doc("Cancels the current virtual machine scale set rolling upgrade.") + cancel is ArmResourceActionAsync< + VirtualMachineScaleSet, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected.") + startOSUpgrade is ArmResourceActionAsync< + VirtualMachineScaleSet, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest available extension version. Instances which are already running the latest extension versions are not affected.") + startExtensionUpgrade is ArmResourceActionAsync< + VirtualMachineScaleSet, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp new file mode 100644 index 0000000000..29221a9e25 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp @@ -0,0 +1,86 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./VirtualMachineScaleSet.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Describes a Virtual Machine Scale Set Extension.") +@parentResource(VirtualMachineScaleSet) +model VirtualMachineScaleSetExtension + is ProxyResource { + @doc("The name of the VM scale set extension.") + @path + @key("vmssExtensionName") + @segment("extensions") + name: string; +} + +@armResourceOperations +interface VirtualMachineScaleSetExtensions { + @doc("The operation to get the extension.") + get is ArmResourceRead< + VirtualMachineScaleSetExtension, + { + ...BaseParameters; + + @doc("The name of the VM scale set containing the extension.") + @path + vmScaleSetName: string; + + @doc("The expand expression to apply on the operation.") + @query("$expand") + $expand?: string; + } + >; + @doc("The operation to create or update an extension.") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + VirtualMachineScaleSetExtension, + { + ...BaseParameters; + + @doc("The name of the VM scale set where the extension should be create or updated.") + @path + vmScaleSetName: string; + } + >; + @doc("The operation to update an extension.") + update is ArmResourcePatchAsync< + VirtualMachineScaleSetExtension, + VirtualMachineScaleSetExtensionProperties, + { + ...BaseParameters; + + @doc("The name of the VM scale set where the extension should be updated.") + @path + vmScaleSetName: string; + } + >; + @doc("The operation to delete the extension.") + delete is ArmResourceDeleteAsync< + VirtualMachineScaleSetExtension, + { + ...BaseParameters; + + @doc("The name of the VM scale set where the extension should be deleted.") + @path + vmScaleSetName: string; + } + >; + @doc("Gets a list of all extensions in a VM scale set.") + list is ArmResourceListByParent< + VirtualMachineScaleSetExtension, + { + ...BaseParameters; + + @doc("The name of the VM scale set containing the extension.") + @path + vmScaleSetName: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp new file mode 100644 index 0000000000..f5146dd479 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp @@ -0,0 +1,275 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./VirtualMachineScaleSet.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Describes a virtual machine scale set virtual machine.") +@parentResource(VirtualMachineScaleSet) +model VirtualMachineScaleSetVM + is TrackedResource { + @doc("The instance ID of the virtual machine.") + @path + @key("instanceId") + @segment("virtualMachines") + name: string; + + @doc("The virtual machine instance ID.") + @visibility("read") + instanceId?: string; + + @doc("The virtual machine child extension resources.") + @visibility("read") + resources?: VirtualMachineExtension[]; + + @doc("The virtual machine zones.") + @visibility("read") + zones?: string[]; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourcePlan; +} + +@armResourceOperations +interface VirtualMachineScaleSetVMs { + @doc("Gets a virtual machine from a VM scale set.") + get is ArmResourceRead< + VirtualMachineScaleSetVM, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("The expand expression to apply on the operation. 'InstanceView' will retrieve the instance view of the virtual machine. 'UserData' will retrieve the UserData of the virtual machine.") + @query("$expand") + $expand?: InstanceViewTypes; + } + >; + @doc("Updates a virtual machine of a VM scale set.") + update is ArmResourceCreateOrUpdateAsync< + VirtualMachineScaleSetVM, + { + ...BaseParameters; + + @doc("The name of the VM scale set where the extension should be create or updated.") + @path + vmScaleSetName: string; + } + >; + @doc("Deletes a virtual machine from a VM scale set.") + delete is ArmResourceDeleteAsync< + VirtualMachineScaleSetVM, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("Optional parameter to force delete a virtual machine from a VM scale set. (Feature in Preview)") + @query("forceDeletion") + forceDeletion?: boolean; + } + >; + @doc("Gets a list of all virtual machines in a VM scale sets.") + list is ArmResourceListByParent< + VirtualMachineScaleSetVM, + { + ...BaseParameters; + + @doc("The filter to apply to the operation. Allowed values are 'startswith(instanceView/statuses/code, 'PowerState') eq true', 'properties/latestModelApplied eq true', 'properties/latestModelApplied eq false'.") + @query("$filter") + $filter?: string; + + @doc("The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'.") + @query("$select") + $select?: string; + + @doc("The expand expression to apply to the operation. Allowed values are 'instanceView'.") + @query("$expand") + $expand?: string; + } + >; + @doc("Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.") + reimage is ArmResourceActionAsync< + VirtualMachineScaleSetVM, + VirtualMachineScaleSetVMReimageParameters, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks.") + reimageAll is ArmResourceActionAsync< + VirtualMachineScaleSetVM, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated.") + deallocate is ArmResourceActionAsync< + VirtualMachineScaleSetVM, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.") + powerOff is ArmResourceActionAsync< + VirtualMachineScaleSetVM, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified") + @query("skipShutdown") + skipShutdown?: boolean; + } + >; + @doc("Restarts a virtual machine in a VM scale set.") + restart is ArmResourceActionAsync< + VirtualMachineScaleSetVM, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Starts a virtual machine in a VM scale set.") + start is ArmResourceActionAsync< + VirtualMachineScaleSetVM, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on.") + redeploy is ArmResourceActionAsync< + VirtualMachineScaleSetVM, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set.") + retrieveBootDiagnosticsData is ArmResourceActionSync< + VirtualMachineScaleSetVM, + void, + RetrieveBootDiagnosticsDataResult, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes.") + @query("sasUriExpirationTimeInMinutes") + sasUriExpirationTimeInMinutes?: int32; + } + >; + @doc("Performs maintenance on a virtual machine in a VM scale set.") + performMaintenance is ArmResourceActionAsync< + VirtualMachineScaleSetVM, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("The operation to simulate the eviction of spot virtual machine in a VM scale set.") + simulateEviction is ArmResourceActionNoContentSync< + VirtualMachineScaleSetVM, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Run command on a virtual machine in a VM scale set.") + runCommand is ArmResourceActionAsync< + VirtualMachineScaleSetVM, + RunCommandInput, + RunCommandResult, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Gets the status of a virtual machine from a VM scale set.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/instanceView") + @get + GetInstanceView is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("The instance ID of the virtual machine.") + @path + instanceId: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + VirtualMachineScaleSetVMInstanceView + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp new file mode 100644 index 0000000000..31ee9b8c15 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp @@ -0,0 +1,90 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./VirtualMachineScaleSetVM.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Compute; +@doc("Describes a VMSS VM Extension.") +@parentResource(VirtualMachineScaleSetVM) +model VirtualMachineScaleSetVMExtension + is ProxyResource { + @doc("The name of the virtual machine extension.") + @path + @key("vmExtensionName") + @segment("extensions") + name: string; +} + +@armResourceOperations +interface VirtualMachineScaleSetVMExtensions { + @doc("The operation to get the VMSS VM extension.") + get is ArmResourceRead< + VirtualMachineScaleSetVMExtension, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("The expand expression to apply on the operation.") + @query("$expand") + $expand?: string; + } + >; + @doc("The operation to create or update the VMSS VM extension.") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + VirtualMachineScaleSetVMExtension, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("The operation to update the VMSS VM extension.") + update is ArmResourcePatchAsync< + VirtualMachineScaleSetVMExtension, + VirtualMachineExtensionProperties, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("The operation to delete the VMSS VM extension.") + delete is ArmResourceDeleteAsync< + VirtualMachineScaleSetVMExtension, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("The operation to get all extensions of an instance in Virtual Machine Scaleset.") + list is ArmResourceListByParent< + VirtualMachineScaleSetVMExtension, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("The expand expression to apply on the operation.") + @query("$expand") + $expand?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp new file mode 100644 index 0000000000..819a8263c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp @@ -0,0 +1,61 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./VirtualMachineScaleSet.tsp"; +import "./VirtualMachineScaleSetExtension.tsp"; +import "./RollingUpgradeStatusInfo.tsp"; +import "./VirtualMachineScaleSetVMExtension.tsp"; +import "./VirtualMachineScaleSetVM.tsp"; +import "./VirtualMachineExtension.tsp"; +import "./VirtualMachine.tsp"; +import "./VirtualMachineExtensionImage.tsp"; +import "./AvailabilitySet.tsp"; +import "./ProximityPlacementGroup.tsp"; +import "./DedicatedHostGroup.tsp"; +import "./DedicatedHost.tsp"; +import "./SshPublicKeyResource.tsp"; +import "./Image.tsp"; +import "./RestorePointCollection.tsp"; +import "./RestorePoint.tsp"; +import "./CapacityReservationGroup.tsp"; +import "./CapacityReservation.tsp"; +import "./VirtualMachineRunCommand.tsp"; +import "./VirtualMachineRunCommand.tsp"; +import "./Disk.tsp"; +import "./DiskAccess.tsp"; +import "./PrivateEndpointConnection.tsp"; +import "./DiskEncryptionSet.tsp"; +import "./DiskRestorePoint.tsp"; +import "./Snapshot.tsp"; +import "./Gallery.tsp"; +import "./GalleryImage.tsp"; +import "./GalleryImageVersion.tsp"; +import "./GalleryApplication.tsp"; +import "./GalleryApplicationVersion.tsp"; +import "./SharedGallery.tsp"; +import "./SharedGalleryImage.tsp"; +import "./SharedGalleryImageVersion.tsp"; +import "./CommunityGallery.tsp"; +import "./CommunityGalleryImage.tsp"; +import "./CommunityGalleryImageVersion.tsp"; +import "./RoleInstance.tsp"; +import "./CloudServiceRole.tsp"; +import "./CloudService.tsp"; +import "./OSVersion.tsp"; +import "./OSFamily.tsp"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "Azure Compute resource management API.", +}) +@doc("Compute Client") +namespace Microsoft.Compute; diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp new file mode 100644 index 0000000000..dddd2316ac --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp @@ -0,0 +1,6657 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.Core; +using Azure.ResourceManager; + +namespace Microsoft.Compute; + +interface Operations extends Azure.ResourceManager.Operations {} + +enum RepairAction { + Replace, + Restart, + Reimage, +} + +enum WindowsVMGuestPatchMode { + Manual, + AutomaticByOS, + AutomaticByPlatform, +} + +enum WindowsPatchAssessmentMode { + ImageDefault, + AutomaticByPlatform, +} + +enum WindowsVMGuestPatchAutomaticByPlatformRebootSetting { + Unknown, + IfRequired, + Never, + Always, +} + +enum LinuxVMGuestPatchMode { + ImageDefault, + AutomaticByPlatform, +} + +enum LinuxPatchAssessmentMode { + ImageDefault, + AutomaticByPlatform, +} + +enum LinuxVMGuestPatchAutomaticByPlatformRebootSetting { + Unknown, + IfRequired, + Never, + Always, +} + +enum DiskCreateOptionTypes { + FromImage, + Empty, + Attach, +} + +enum DiffDiskOptions { + Local, +} + +enum DiffDiskPlacement { + CacheDisk, + ResourceDisk, +} + +enum StorageAccountTypes { + Standard_LRS, + Premium_LRS, + StandardSSD_LRS, + UltraSSD_LRS, + Premium_ZRS, + StandardSSD_ZRS, + PremiumV2_LRS, +} + +enum SecurityEncryptionTypes { + VMGuestStateOnly, + DiskWithVMGuestState, +} + +enum DiskDeleteOptionTypes { + Delete, + Detach, +} + +enum DomainNameLabelScopeTypes { + TenantReuse, + SubscriptionReuse, + ResourceGroupReuse, + NoReuse, +} + +enum IPVersion { + IPv4, + IPv6, +} + +enum DeleteOptions { + Delete, + Detach, +} + +enum PublicIPAddressSkuName { + Basic, + Standard, +} + +enum PublicIPAddressSkuTier { + Regional, + Global, +} + +enum NetworkInterfaceAuxiliaryMode { + None, + AcceleratedConnections, + Floating, +} + +enum NetworkInterfaceAuxiliarySku { + None, + A1, + A2, + A4, + A8, +} + +enum NetworkApiVersion { + `2020-11-01`, +} + +enum SecurityTypes { + TrustedLaunch, + ConfidentialVM, +} + +enum VirtualMachinePriorityTypes { + Regular, + Low, + Spot, +} + +enum VirtualMachineEvictionPolicyTypes { + Deallocate, + Delete, +} + +enum VirtualMachineScaleSetScaleInRules { + Default, + OldestVM, + NewestVM, +} + +enum OrchestrationMode { + Uniform, + Flexible, +} + +enum ExtendedLocationTypes { + EdgeZone, +} + +enum ExpandTypesForGetVMScaleSets { + userData, +} + +enum OrchestrationServiceNames { + AutomaticRepairs, +} + +enum OrchestrationServiceState { + NotRunning, + Running, + Suspended, +} + +enum OrchestrationServiceStateAction { + Resume, + Suspend, +} + +enum HyperVGeneration { + V1, + V2, +} + +enum VirtualMachineSizeTypes { + Basic_A0, + Basic_A1, + Basic_A2, + Basic_A3, + Basic_A4, + Standard_A0, + Standard_A1, + Standard_A2, + Standard_A3, + Standard_A4, + Standard_A5, + Standard_A6, + Standard_A7, + Standard_A8, + Standard_A9, + Standard_A10, + Standard_A11, + Standard_A1_v2, + Standard_A2_v2, + Standard_A4_v2, + Standard_A8_v2, + Standard_A2m_v2, + Standard_A4m_v2, + Standard_A8m_v2, + Standard_B1s, + Standard_B1ms, + Standard_B2s, + Standard_B2ms, + Standard_B4ms, + Standard_B8ms, + Standard_D1, + Standard_D2, + Standard_D3, + Standard_D4, + Standard_D11, + Standard_D12, + Standard_D13, + Standard_D14, + Standard_D1_v2, + Standard_D2_v2, + Standard_D3_v2, + Standard_D4_v2, + Standard_D5_v2, + Standard_D2_v3, + Standard_D4_v3, + Standard_D8_v3, + Standard_D16_v3, + Standard_D32_v3, + Standard_D64_v3, + Standard_D2s_v3, + Standard_D4s_v3, + Standard_D8s_v3, + Standard_D16s_v3, + Standard_D32s_v3, + Standard_D64s_v3, + Standard_D11_v2, + Standard_D12_v2, + Standard_D13_v2, + Standard_D14_v2, + Standard_D15_v2, + Standard_DS1, + Standard_DS2, + Standard_DS3, + Standard_DS4, + Standard_DS11, + Standard_DS12, + Standard_DS13, + Standard_DS14, + Standard_DS1_v2, + Standard_DS2_v2, + Standard_DS3_v2, + Standard_DS4_v2, + Standard_DS5_v2, + Standard_DS11_v2, + Standard_DS12_v2, + Standard_DS13_v2, + Standard_DS14_v2, + Standard_DS15_v2, + `Standard_DS13-4_v2`, + `Standard_DS13-2_v2`, + `Standard_DS14-8_v2`, + `Standard_DS14-4_v2`, + Standard_E2_v3, + Standard_E4_v3, + Standard_E8_v3, + Standard_E16_v3, + Standard_E32_v3, + Standard_E64_v3, + Standard_E2s_v3, + Standard_E4s_v3, + Standard_E8s_v3, + Standard_E16s_v3, + Standard_E32s_v3, + Standard_E64s_v3, + `Standard_E32-16_v3`, + `Standard_E32-8s_v3`, + `Standard_E64-32s_v3`, + `Standard_E64-16s_v3`, + Standard_F1, + Standard_F2, + Standard_F4, + Standard_F8, + Standard_F16, + Standard_F1s, + Standard_F2s, + Standard_F4s, + Standard_F8s, + Standard_F16s, + Standard_F2s_v2, + Standard_F4s_v2, + Standard_F8s_v2, + Standard_F16s_v2, + Standard_F32s_v2, + Standard_F64s_v2, + Standard_F72s_v2, + Standard_G1, + Standard_G2, + Standard_G3, + Standard_G4, + Standard_G5, + Standard_GS1, + Standard_GS2, + Standard_GS3, + Standard_GS4, + Standard_GS5, + `Standard_GS4-8`, + `Standard_GS4-4`, + `Standard_GS5-16`, + `Standard_GS5-8`, + Standard_H8, + Standard_H16, + Standard_H8m, + Standard_H16m, + Standard_H16r, + Standard_H16mr, + Standard_L4s, + Standard_L8s, + Standard_L16s, + Standard_L32s, + Standard_M64s, + Standard_M64ms, + Standard_M128s, + Standard_M128ms, + `Standard_M64-32ms`, + `Standard_M64-16ms`, + `Standard_M128-64ms`, + `Standard_M128-32ms`, + Standard_NC6, + Standard_NC12, + Standard_NC24, + Standard_NC24r, + Standard_NC6s_v2, + Standard_NC12s_v2, + Standard_NC24s_v2, + Standard_NC24rs_v2, + Standard_NC6s_v3, + Standard_NC12s_v3, + Standard_NC24s_v3, + Standard_NC24rs_v3, + Standard_ND6s, + Standard_ND12s, + Standard_ND24s, + Standard_ND24rs, + Standard_NV6, + Standard_NV12, + Standard_NV24, +} + +enum DiskDetachOptionTypes { + ForceDetach, +} + +enum DiskControllerTypes { + SCSI, + NVMe, +} + +enum IPVersions { + IPv4, + IPv6, +} + +enum PublicIPAllocationMethod { + Dynamic, + Static, +} + +enum HyperVGenerationType { + V1, + V2, +} + +enum PatchOperationStatus { + Unknown, + InProgress, + Failed, + Succeeded, + CompletedWithWarnings, +} + +enum ExpandTypeForListVMs { + instanceView, +} + +enum ExpandTypesForListVMs { + instanceView, +} + +enum VMGuestPatchRebootBehavior { + Unknown, + NeverReboots, + AlwaysRequiresReboot, + CanRequestReboot, +} + +enum PatchAssessmentState { + Unknown, + Available, +} + +enum VMGuestPatchRebootSetting { + IfRequired, + Never, + Always, +} + +enum VMGuestPatchClassificationWindows { + Critical, + Security, + UpdateRollUp, + FeaturePack, + ServicePack, + Definition, + Tools, + Updates, +} + +enum VMGuestPatchClassificationLinux { + Critical, + Security, + Other, +} + +enum VMGuestPatchRebootStatus { + Unknown, + NotNeeded, + Required, + Started, + Failed, + Completed, +} + +enum PatchInstallationState { + Unknown, + Installed, + Failed, + Excluded, + NotSelected, + Pending, +} + +enum HyperVGenerationTypes { + V1, + V2, +} + +enum VmDiskTypes { + None, + Unmanaged, +} + +enum ArchitectureTypes { + x64, + Arm64, +} + +enum ImageState { + Active, + ScheduledForDeprecation, + Deprecated, +} + +enum AlternativeType { + None, + Offer, + Plan, +} + +enum ProximityPlacementGroupType { + Standard, + Ultra, +} + +enum OperatingSystemType { + Windows, + Linux, +} + +enum RestorePointEncryptionType { + @doc("Disk Restore Point is encrypted at rest with Platform managed key. ") + EncryptionAtRestWithPlatformKey, + @doc("Disk Restore Point is encrypted at rest with Customer managed key that can be changed and revoked by a customer.") + EncryptionAtRestWithCustomerKey, + @doc("Disk Restore Point is encrypted at rest with 2 layers of encryption. One of the keys is Customer managed and the other key is Platform managed.") + EncryptionAtRestWithPlatformAndCustomerKeys, +} + +enum ConsistencyModeTypes { + CrashConsistent, + FileSystemConsistent, + ApplicationConsistent, +} + +enum RestorePointCollectionExpandOptions { + restorePoints, +} + +enum RestorePointExpandOptions { + instanceView, +} + +enum CapacityReservationGroupInstanceViewTypes { + instanceView, +} + +enum ExpandTypesForGetCapacityReservationGroups { + `virtualMachineScaleSetVMs/$ref`, + `virtualMachines/$ref`, +} + +enum CapacityReservationInstanceViewTypes { + instanceView, +} + +enum ExecutionState { + Unknown, + Pending, + Running, + Failed, + Succeeded, + TimedOut, + Canceled, +} + +enum DiskStorageAccountTypes { + @doc("Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access.") + Standard_LRS, + @doc("Premium SSD locally redundant storage. Best for production and performance sensitive workloads.") + Premium_LRS, + @doc("Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev/test.") + StandardSSD_LRS, + @doc("Ultra SSD locally redundant storage. Best for IO-intensive workloads such as SAP HANA, top tier databases (for example, SQL, Oracle), and other transaction-heavy workloads.") + UltraSSD_LRS, + @doc("Premium SSD zone redundant storage. Best for the production workloads that need storage resiliency against zone failures.") + Premium_ZRS, + @doc("Standard SSD zone redundant storage. Best for web servers, lightly used enterprise applications and dev/test that need storage resiliency against zone failures.") + StandardSSD_ZRS, + @doc("Premium SSD v2 locally redundant storage. Best for production and performance-sensitive workloads that consistently require low latency and high IOPS and throughput.") + PremiumV2_LRS, +} + +enum Architecture { + x64, + Arm64, +} + +enum DiskCreateOption { + @doc("Create an empty data disk of a size given by diskSizeGB.") Empty, + @doc("Disk will be attached to a VM.") Attach, + @doc("Create a new disk from a platform image specified by the given imageReference or galleryImageReference.") + FromImage, + @doc("Create a disk by importing from a blob specified by a sourceUri in a storage account specified by storageAccountId.") + Import, + @doc("Create a new disk or snapshot by copying from a disk or snapshot specified by the given sourceResourceId.") + Copy, + @doc("Create a new disk by copying from a backup recovery point.") Restore, + @doc("Create a new disk by obtaining a write token and using it to directly upload the contents of the disk.") + Upload, + @doc("Create a new disk by using a deep copy process, where the resource creation is considered complete only after all data has been copied from the source.") + CopyStart, + @doc("Similar to Import create option. Create a new Trusted Launch VM or Confidential VM supported disk by importing additional blob for VM guest state specified by securityDataUri in storage account specified by storageAccountId") + ImportSecure, + @doc("Similar to Upload create option. Create a new Trusted Launch VM or Confidential VM supported disk and upload using write token in both disk and VM guest state") + UploadPreparedSecure, + @doc("Create a new disk by exporting from elastic san volume snapshot") + CopyFromSanSnapshot, +} + +enum DiskState { + @doc("The disk is not being used and can be attached to a VM.") Unattached, + @doc("The disk is currently attached to a running VM.") Attached, + @doc("The disk is attached to a stopped-deallocated VM.") Reserved, + @doc("The disk is attached to a VM which is in hibernated state.") Frozen, + @doc("The disk currently has an Active SAS Uri associated with it.") + ActiveSAS, + @doc("The disk is attached to a VM in hibernated state and has an active SAS URI associated with it.") + ActiveSASFrozen, + @doc("A disk is ready to be created by upload by requesting a write token.") + ReadyToUpload, + @doc("A disk is created for upload and a write token has been issued for uploading to it.") + ActiveUpload, +} + +enum EncryptionType { + @doc("Disk is encrypted at rest with Platform managed key. It is the default encryption type. This is not a valid encryption type for disk encryption sets.") + EncryptionAtRestWithPlatformKey, + @doc("Disk is encrypted at rest with Customer managed key that can be changed and revoked by a customer.") + EncryptionAtRestWithCustomerKey, + @doc("Disk is encrypted at rest with 2 layers of encryption. One of the keys is Customer managed and the other key is Platform managed.") + EncryptionAtRestWithPlatformAndCustomerKeys, +} + +enum NetworkAccessPolicy { + @doc("The disk can be exported or uploaded to from any network.") AllowAll, + @doc("The disk can be exported or uploaded to using a DiskAccess resource's private endpoints.") + AllowPrivate, + @doc("The disk cannot be exported.") DenyAll, +} + +enum DiskSecurityTypes { + @doc("Trusted Launch provides security features such as secure boot and virtual Trusted Platform Module (vTPM)") + TrustedLaunch, + @doc("Indicates Confidential VM disk with only VM guest state encrypted") + ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey, + @doc("Indicates Confidential VM disk with both OS disk and VM guest state encrypted with a platform managed key") + ConfidentialVM_DiskEncryptedWithPlatformKey, + @doc("Indicates Confidential VM disk with both OS disk and VM guest state encrypted with a customer managed key") + ConfidentialVM_DiskEncryptedWithCustomerKey, +} + +enum PublicNetworkAccess { + @doc("You can generate a SAS URI to access the underlying data of the disk publicly on the internet when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from your trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate.") + Enabled, + @doc("You cannot access the underlying data of the disk publicly on the internet even when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from your trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate.") + Disabled, +} + +enum DataAccessAuthMode { + @doc("When export/upload URL is used, the system checks if the user has an identity in Azure Active Directory and has necessary permissions to export/upload the data. Please refer to aka.ms/DisksAzureADAuth.") + AzureActiveDirectory, + @doc("No additional authentication would be performed when accessing export/upload URL.") + None, +} + +enum AccessLevel { + None, + Read, + Write, +} + +enum FileFormat { + @doc("A VHD file is a disk image file in the Virtual Hard Disk file format.") + VHD, + @doc("A VHDX file is a disk image file in the Virtual Hard Disk v2 file format.") + VHDX, +} + +enum PrivateEndpointServiceConnectionStatus { + Pending, + Approved, + Rejected, +} + +enum PrivateEndpointConnectionProvisioningState { + Succeeded, + Creating, + Deleting, + Failed, +} + +enum DiskEncryptionSetIdentityType { + SystemAssigned, + UserAssigned, + `SystemAssigned, UserAssigned`, + None, +} + +enum DiskEncryptionSetType { + @doc("Resource using diskEncryptionSet would be encrypted at rest with Customer managed key that can be changed and revoked by a customer.") + EncryptionAtRestWithCustomerKey, + @doc("Resource using diskEncryptionSet would be encrypted at rest with two layers of encryption. One of the keys is Customer managed and the other key is Platform managed.") + EncryptionAtRestWithPlatformAndCustomerKeys, + @doc("Confidential VM supported disk and VM guest state would be encrypted with customer managed key.") + ConfidentialVmEncryptedWithCustomerKey, +} + +enum SnapshotStorageAccountTypes { + @doc("Standard HDD locally redundant storage") Standard_LRS, + @doc("Premium SSD locally redundant storage") Premium_LRS, + @doc("Standard zone redundant storage") Standard_ZRS, +} + +enum CopyCompletionErrorReason { + @doc("Indicates that the source snapshot was deleted while the background copy of the resource created via CopyStart operation was in progress.") + CopySourceNotFound, +} + +enum ExtendedLocationType { + EdgeZone, +} + +enum GalleryProvisioningState { + Creating, + Updating, + Failed, + Succeeded, + Deleting, + Migrating, +} + +enum GallerySharingPermissionTypes { + Private, + Groups, + Community, +} + +enum SharingProfileGroupTypes { + Subscriptions, + AADTenants, +} + +enum SharingState { + Succeeded, + InProgress, + Failed, + Unknown, +} + +enum SelectPermissions { + Permissions, +} + +enum GalleryExpandParams { + `SharingProfile/Groups`, +} + +enum StorageAccountType { + Standard_LRS, + Standard_ZRS, + Premium_LRS, +} + +enum ConfidentialVMEncryptionType { + EncryptedVMGuestStateOnlyWithPmk, + EncryptedWithPmk, + EncryptedWithCmk, +} + +enum ReplicationMode { + Full, + Shallow, +} + +enum GalleryExtendedLocationType { + EdgeZone, + Unknown, +} + +enum EdgeZoneStorageAccountType { + Standard_LRS, + Standard_ZRS, + StandardSSD_LRS, + Premium_LRS, +} + +enum PolicyViolationCategory { + Other, + ImageFlaggedUnsafe, + CopyrightValidation, + IpTheft, +} + +enum AggregatedReplicationState { + Unknown, + InProgress, + Completed, + Failed, +} + +enum ReplicationState { + Unknown, + Replicating, + Completed, + Failed, +} + +enum ReplicationStatusTypes { + ReplicationStatus, +} + +enum SharingUpdateOperationTypes { + Add, + Remove, + Reset, + EnableCommunity, +} + +enum SharedToValues { + tenant, +} + +enum SharedGalleryHostCaching { + None, + ReadOnly, + ReadWrite, +} + +enum CloudServiceUpgradeMode { + Auto, + Manual, + Simultaneous, +} + +enum CloudServiceSlotType { + Production, + Staging, +} + +enum CreatedByType { + User, + Application, + ManagedIdentity, + Key, +} + +enum AvailabilitySetSkuTypes { + Classic, + Aligned, +} +@Azure.Core.fixed +enum UpgradeMode { + Automatic, + Manual, + Rolling, +} +@Azure.Core.fixed +enum SettingNames { + AutoLogon, + FirstLogonCommands, +} +@Azure.Core.fixed +enum ProtocolTypes { + Http, + Https, +} +@Azure.Core.fixed +enum CachingTypes { + None, + ReadOnly, + ReadWrite, +} +@Azure.Core.fixed +enum OperatingSystemTypes { + Windows, + Linux, +} +@Azure.Core.fixed +enum StatusLevelTypes { + Info, + Warning, + Error, +} +@Azure.Core.fixed +enum ResourceIdentityType { + SystemAssigned, + UserAssigned, + `SystemAssigned, UserAssigned`, + None, +} +@Azure.Core.fixed +enum VirtualMachineScaleSetSkuScaleType { + Automatic, + None, +} +@Azure.Core.fixed +enum UpgradeState { + RollingForward, + Cancelled, + Completed, + Faulted, +} +@Azure.Core.fixed +enum UpgradeOperationInvoker { + Unknown, + User, + Platform, +} +@Azure.Core.fixed +enum RollingUpgradeStatusCode { + RollingForward, + Cancelled, + Completed, + Faulted, +} +@Azure.Core.fixed +enum RollingUpgradeActionType { + Start, + Cancel, +} +@Azure.Core.fixed +enum MaintenanceOperationResultCodeTypes { + None, + RetryLater, + MaintenanceAborted, + MaintenanceCompleted, +} +@Azure.Core.fixed +enum InstanceViewTypes { + instanceView, + userData, +} +@Azure.Core.fixed +enum DedicatedHostLicenseTypes { + None, + Windows_Server_Hybrid, + Windows_Server_Perpetual, +} +@Azure.Core.fixed +enum OperatingSystemStateTypes { + Generalized, + Specialized, +} +@Azure.Core.fixed +enum IntervalInMins { + ThreeMins, + FiveMins, + ThirtyMins, + SixtyMins, +} +@Azure.Core.fixed +enum ResourceSkuCapacityScaleType { + Automatic, + Manual, + None, +} +@Azure.Core.fixed +enum ResourceSkuRestrictionsType { + Location, + Zone, +} +@Azure.Core.fixed +enum ResourceSkuRestrictionsReasonCode { + QuotaId, + NotAvailableForSubscription, +} +@Azure.Core.fixed +enum HostCaching { + None, + ReadOnly, + ReadWrite, +} +@Azure.Core.fixed +enum GalleryApplicationCustomActionParameterType { + String, + ConfigurationDataBlob, + LogOutputBlob, +} + +@doc("The List Compute Operation operation response.") +@pagedResult +model ComputeOperationListResult { + @doc("The list of compute operations") + @visibility("read") + @items + value?: ComputeOperationValue[]; +} + +@doc("Describes the properties of a Compute Operation value.") +model ComputeOperationValue { + @doc("The origin of the compute operation.") + @visibility("read") + origin?: string; + + @doc("The name of the compute operation.") + @visibility("read") + name?: string; + + @doc("Describes the properties of a Compute Operation Value Display.") + display?: ComputeOperationValueDisplay; +} + +@doc("Describes the properties of a Compute Operation Value Display.") +model ComputeOperationValueDisplay { + @doc("The display name of the compute operation.") + @visibility("read") + operation?: string; + + @doc("The display name of the resource the operation applies to.") + @visibility("read") + resource?: string; + + @doc("The description of the operation.") + @visibility("read") + description?: string; + + @doc("The resource provider for the operation.") + @visibility("read") + provider?: string; +} + +@doc("An error response from the Compute service.") +@error +model CloudError { + @doc("Api error.") + error?: ApiError; +} + +@doc("Api error.") +model ApiError { + @doc("The Api error details") + details?: ApiErrorBase[]; + + @doc("The Api inner error") + innererror?: InnerError; + + @doc("The error code.") + code?: string; + + @doc("The target of the particular error.") + target?: string; + + @doc("The error message.") + message?: string; +} + +@doc("Api error base.") +model ApiErrorBase { + @doc("The error code.") + code?: string; + + @doc("The target of the particular error.") + target?: string; + + @doc("The error message.") + message?: string; +} + +@doc("Inner error details.") +model InnerError { + @doc("The exception type.") + exceptiontype?: string; + + @doc("The internal error message or exception dump.") + errordetail?: string; +} + +@doc("The List Usages operation response.") +model ListUsagesResult is Azure.Core.Page; + +@doc("Describes Compute Resource Usage.") +model Usage { + @doc("An enum describing the unit of usage measurement.") + unit: "Count"; + + @doc("The current usage of the resource.") + currentValue: int32; + + @doc("The maximum permitted usage of the resource.") + limit: int32; + + @doc("The name of the type of usage.") + name: UsageName; +} + +@doc("The Usage Names.") +model UsageName { + @doc("The name of the resource.") + value?: string; + + @doc("The localized name of the resource.") + localizedValue?: string; +} + +@doc("The List Virtual Machine operation response.") +@pagedResult +model VirtualMachineSizeListResult { + @doc("The list of virtual machine sizes.") + @items + value?: VirtualMachineSize[]; +} + +@doc("Describes the properties of a VM size.") +model VirtualMachineSize { + @doc("The name of the virtual machine size.") + name?: string; + + @doc("The number of cores supported by the virtual machine size. For Constrained vCPU capable VM sizes, this number represents the total vCPUs of quota that the VM uses. For accurate vCPU count, please refer to https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu or https://docs.microsoft.com/rest/api/compute/resourceskus/list") + numberOfCores?: int32; + + @doc("The OS disk size, in MB, allowed by the virtual machine size.") + osDiskSizeInMB?: int32; + + @doc("The resource disk size, in MB, allowed by the virtual machine size.") + resourceDiskSizeInMB?: int32; + + @doc("The amount of memory, in MB, supported by the virtual machine size.") + memoryInMB?: int32; + + @doc("The maximum number of data disks that can be attached to the virtual machine size.") + maxDataDiskCount?: int32; +} + +@doc("Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU name.") +model Sku { + @doc("The sku name.") + name?: string; + + @doc("Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic**") + tier?: string; + + @doc("Specifies the number of virtual machines in the scale set.") + capacity?: int32; +} + +@doc("Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.") +model Plan { + @doc("The plan ID.") + name?: string; + + @doc("The publisher ID.") + publisher?: string; + + @doc("Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.") + product?: string; + + @doc("The promotion code.") + promotionCode?: string; +} + +@doc("Describes the properties of a Virtual Machine Scale Set.") +model VirtualMachineScaleSetProperties { + @doc("The upgrade policy.") + upgradePolicy?: UpgradePolicy; + + @doc("Policy for automatic repairs.") + automaticRepairsPolicy?: AutomaticRepairsPolicy; + + @doc("The virtual machine profile.") + virtualMachineProfile?: VirtualMachineScaleSetVMProfile; + + @doc("The provisioning state, which only appears in the response.") + @visibility("read") + provisioningState?: string; + + @doc("Specifies whether the Virtual Machine Scale Set should be overprovisioned.") + overprovision?: boolean; + + @doc("When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.") + doNotRunExtensionsOnOverprovisionedVMs?: boolean; + + @doc("Specifies the ID which uniquely identifies a Virtual Machine Scale Set.") + @visibility("read") + uniqueId?: string; + + @doc("When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.") + singlePlacementGroup?: boolean; + + @doc("Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set.") + zoneBalance?: boolean; + + @doc("Fault Domain count for each placement group.") + platformFaultDomainCount?: int32; + + @doc("Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01.") + proximityPlacementGroup?: SubResource; + + @doc("Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version: 2020-06-01.") + hostGroup?: SubResource; + + @doc("Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.") + additionalCapabilities?: AdditionalCapabilities; + + @doc("Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.") + scaleInPolicy?: ScaleInPolicy; + + @doc("Specifies the orchestration mode for the virtual machine scale set.") + orchestrationMode?: OrchestrationMode; + + @doc("Specifies the Spot Restore properties for the virtual machine scale set.") + spotRestorePolicy?: SpotRestorePolicy; + + @doc("Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.") + priorityMixPolicy?: PriorityMixPolicy; + + @doc("Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timeCreated?: utcDateTime; + + @doc("Optional property which must either be set to True or omitted.") + constrainedMaximumCapacity?: boolean; +} + +@doc("Describes an upgrade policy - automatic, manual, or rolling.") +model UpgradePolicy { + @doc("Specifies the mode of an upgrade to virtual machines in the scale set.

    Possible values are:

    **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.

    **Automatic** - All virtual machines in the scale set are automatically updated at the same time.") + mode?: UpgradeMode; + + @doc("The configuration parameters used while performing a rolling upgrade.") + rollingUpgradePolicy?: RollingUpgradePolicy; + + @doc("Configuration parameters used for performing automatic OS Upgrade.") + automaticOSUpgradePolicy?: AutomaticOSUpgradePolicy; +} + +@doc("The configuration parameters used while performing a rolling upgrade.") +model RollingUpgradePolicy { + @doc("The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%.") + @maxValue(100) + @minValue(5) + maxBatchInstancePercent?: int32; + + @doc("The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%.") + @maxValue(100) + @minValue(5) + maxUnhealthyInstancePercent?: int32; + + @doc("The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%.") + @maxValue(100) + maxUnhealthyUpgradedInstancePercent?: int32; + + @doc("The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S).") + pauseTimeBetweenBatches?: string; + + @doc("Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size.") + enableCrossZoneUpgrade?: boolean; + + @doc("Upgrade all unhealthy instances in a scale set before any healthy instances.") + prioritizeUnhealthyInstances?: boolean; + + @doc("Rollback failed instances to previous model if the Rolling Upgrade policy is violated.") + rollbackFailedInstancesOnPolicyBreach?: boolean; + + @doc("Create new virtual machines to upgrade the scale set, rather than updating the existing virtual machines. Existing virtual machines will be deleted once the new virtual machines are created for each batch.") + maxSurge?: boolean; +} + +@doc("The configuration parameters used for performing automatic OS upgrade.") +model AutomaticOSUpgradePolicy { + @doc("Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true.") + enableAutomaticOSUpgrade?: boolean; + + @doc("Whether OS image rollback feature should be disabled. Default value is false.") + disableAutomaticRollback?: boolean; + + @doc("Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.") + useRollingUpgradePolicy?: boolean; +} + +@doc("Specifies the configuration parameters for automatic repairs on the virtual machine scale set.") +model AutomaticRepairsPolicy { + @doc("Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.") + enabled?: boolean; + + @doc("The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).") + gracePeriod?: string; + + @doc("Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.") + repairAction?: RepairAction; +} + +@doc("Describes a virtual machine scale set virtual machine profile.") +model VirtualMachineScaleSetVMProfile { + @doc("Specifies the operating system settings for the virtual machines in the scale set.") + osProfile?: VirtualMachineScaleSetOSProfile; + + @doc("Specifies the storage settings for the virtual machine disks.") + storageProfile?: VirtualMachineScaleSetStorageProfile; + + @doc("Specifies properties of the network interfaces of the virtual machines in the scale set.") + networkProfile?: VirtualMachineScaleSetNetworkProfile; + + @doc("Specifies the Security related profile settings for the virtual machines in the scale set.") + securityProfile?: SecurityProfile; + + @doc("Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.") + diagnosticsProfile?: DiagnosticsProfile; + + @doc("Specifies a collection of settings for extensions installed on virtual machines in the scale set.") + extensionProfile?: VirtualMachineScaleSetExtensionProfile; + + @doc("Specifies that the image or disk that is being used was licensed on-premises.

    Possible values for Windows Server operating system are:

    Windows_Client

    Windows_Server

    Possible values for Linux Server operating system are:

    RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

    [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

    Minimum api-version: 2015-06-15") + licenseType?: string; + + @doc("Specifies the priority for the virtual machines in the scale set. Minimum api-version: 2017-10-30-preview.") + priority?: VirtualMachinePriorityTypes; + + @doc("Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.") + evictionPolicy?: VirtualMachineEvictionPolicyTypes; + + @doc("Specifies the billing related details of a Azure Spot VMSS. Minimum api-version: 2019-03-01.") + billingProfile?: BillingProfile; + + @doc("Specifies Scheduled Event related configurations.") + scheduledEventsProfile?: ScheduledEventsProfile; + + @doc("UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01.") + userData?: string; + + @doc("Specifies the capacity reservation related details of a scale set. Minimum api-version: 2021-04-01.") + capacityReservation?: CapacityReservationProfile; + + @doc("Specifies the gallery applications that should be made available to the VM/VMSS") + applicationProfile?: ApplicationProfile; + + @doc("Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01.") + hardwareProfile?: VirtualMachineScaleSetHardwareProfile; + + @doc("Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. Minimum api-version: 2022-11-01") + serviceArtifactReference?: ServiceArtifactReference; + + @doc("Specifies the security posture to be used for all virtual machines in the scale set. Minimum api-version: 2023-03-01") + securityPostureReference?: SecurityPostureReference; +} + +@doc("Describes a virtual machine scale set OS profile.") +model VirtualMachineScaleSetOSProfile { + @doc("Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long.") + computerNamePrefix?: string; + + @doc("Specifies the name of the administrator account.

    **Windows-only restriction:** Cannot end in \".\"

    **Disallowed values:** \"administrator\", \"admin\", \"user\", \"user1\", \"test\", \"user2\", \"test1\", \"user3\", \"admin1\", \"1\", \"123\", \"a\", \"actuser\", \"adm\", \"admin2\", \"aspnet\", \"backup\", \"console\", \"david\", \"guest\", \"john\", \"owner\", \"root\", \"server\", \"sql\", \"support\", \"support_388945a0\", \"sys\", \"test2\", \"test3\", \"user4\", \"user5\".

    **Minimum-length (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters") + adminUsername?: string; + + @doc("Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\\W_])

    **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)") + adminPassword?: string; + + @doc("Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init)") + customData?: string; + + @doc("Specifies Windows operating system settings on the virtual machine.") + windowsConfiguration?: WindowsConfiguration; + + @doc("Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).") + linuxConfiguration?: LinuxConfiguration; + + @doc("Specifies set of certificates that should be installed onto the virtual machines in the scale set. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).") + secrets?: VaultSecretGroup[]; + + @doc("Specifies whether extension operations should be allowed on the virtual machine scale set. This may only be set to False when no extensions are present on the virtual machine scale set.") + allowExtensionOperations?: boolean; + + @doc("Optional property which must either be set to True or omitted.") + requireGuestProvisionSignal?: boolean; +} + +@doc("Specifies Windows operating system settings on the virtual machine.") +model WindowsConfiguration { + @doc("Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, it is set to true by default. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.") + provisionVMAgent?: boolean; + + @doc("Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning.") + enableAutomaticUpdates?: boolean; + + @doc("Specifies the time zone of the virtual machine. e.g. \"Pacific Standard Time\". Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones).") + timeZone?: string; + + @doc("Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.") + additionalUnattendContent?: AdditionalUnattendContent[]; + + @doc("[Preview Feature] Specifies settings related to VM Guest Patching on Windows.") + patchSettings?: PatchSettings; + + @doc("Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.") + winRM?: WinRMConfiguration; + + @doc("Indicates whether VMAgent Platform Updates is enabled for the Windows virtual machine. Default value is false.") + enableVMAgentPlatformUpdates?: boolean; +} + +@doc("Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied.") +model AdditionalUnattendContent { + @doc("The pass name. Currently, the only allowable value is OobeSystem.") + passName?: "OobeSystem"; + + @doc("The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.") + componentName?: "Microsoft-Windows-Shell-Setup"; + + @doc("Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.") + settingName?: SettingNames; + + @doc("Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.") + content?: string; +} + +@doc("Specifies settings related to VM Guest Patching on Windows.") +model PatchSettings { + @doc("Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

    Possible values are:

    **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

    **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

    **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true ") + patchMode?: WindowsVMGuestPatchMode; + + @doc("Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to 'AutomaticByPlatform'.") + enableHotpatching?: boolean; + + @doc("Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.

    Possible values are:

    **ImageDefault** - You control the timing of patch assessments on a virtual machine.

    **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. ") + assessmentMode?: WindowsPatchAssessmentMode; + + @doc("Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows.") + automaticByPlatformSettings?: WindowsVMGuestPatchAutomaticByPlatformSettings; +} + +@doc("Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch settings.") +model WindowsVMGuestPatchAutomaticByPlatformSettings { + @doc("Specifies the reboot setting for all AutomaticByPlatform patch installation operations.") + rebootSetting?: WindowsVMGuestPatchAutomaticByPlatformRebootSetting; + + @doc("Enables customer to schedule patching without accidental upgrades") + bypassPlatformSafetyChecksOnUserSchedule?: boolean; +} + +@doc("Describes Windows Remote Management configuration of the VM") +model WinRMConfiguration { + @doc("The list of Windows Remote Management listeners") + listeners?: WinRMListener[]; +} + +@doc("Describes Protocol and thumbprint of Windows Remote Management listener") +model WinRMListener { + @doc("Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**") + protocol?: ProtocolTypes; + + @doc("This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be the Base64 encoding of the following JSON Object which is encoded in UTF-8:

    {
    \"data\":\"\",
    \"dataType\":\"pfx\",
    \"password\":\"\"
    }
    To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).") + certificateUrl?: string; +} + +@doc("Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).") +model LinuxConfiguration { + @doc("Specifies whether password authentication should be disabled.") + disablePasswordAuthentication?: boolean; + + @doc("Specifies the ssh key configuration for a Linux OS.") + ssh?: SshConfiguration; + + @doc("Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.") + provisionVMAgent?: boolean; + + @doc("[Preview Feature] Specifies settings related to VM Guest Patching on Linux.") + patchSettings?: LinuxPatchSettings; + + @doc("Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine. Default value is false.") + enableVMAgentPlatformUpdates?: boolean; +} + +@doc("SSH configuration for Linux based VMs running on Azure") +model SshConfiguration { + @doc("The list of SSH public keys used to authenticate with linux based VMs.") + publicKeys?: SshPublicKey[]; +} + +@doc("Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed.") +model SshPublicKey { + @doc("Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys") + path?: string; + + @doc("SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).") + keyData?: string; +} + +@doc("Specifies settings related to VM Guest Patching on Linux.") +model LinuxPatchSettings { + @doc("Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

    Possible values are:

    **ImageDefault** - The virtual machine's default patching configuration is used.

    **AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true") + patchMode?: LinuxVMGuestPatchMode; + + @doc("Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.

    Possible values are:

    **ImageDefault** - You control the timing of patch assessments on a virtual machine.

    **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.") + assessmentMode?: LinuxPatchAssessmentMode; + + @doc("Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux.") + automaticByPlatformSettings?: LinuxVMGuestPatchAutomaticByPlatformSettings; +} + +@doc("Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Linux patch settings.") +model LinuxVMGuestPatchAutomaticByPlatformSettings { + @doc("Specifies the reboot setting for all AutomaticByPlatform patch installation operations.") + rebootSetting?: LinuxVMGuestPatchAutomaticByPlatformRebootSetting; + + @doc("Enables customer to schedule patching without accidental upgrades") + bypassPlatformSafetyChecksOnUserSchedule?: boolean; +} + +@doc("Describes a set of certificates which are all in the same Key Vault.") +model VaultSecretGroup { + @doc("The relative URL of the Key Vault containing all of the certificates in VaultCertificates.") + sourceVault?: SubResource; + + @doc("The list of key vault references in SourceVault which contain certificates.") + vaultCertificates?: VaultCertificate[]; +} + +model SubResource { + @doc("Resource Id") + id?: string; +} + +@doc("Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM.") +model VaultCertificate { + @doc("This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

    {
    \"data\":\"\",
    \"dataType\":\"pfx\",
    \"password\":\"\"
    }
    To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).") + certificateUrl?: string; + + @doc("For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted.") + certificateStore?: string; +} + +@doc("Describes a virtual machine scale set storage profile.") +model VirtualMachineScaleSetStorageProfile { + @doc("Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.") + imageReference?: ImageReference; + + @doc("Specifies information about the operating system disk used by the virtual machines in the scale set. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).") + osDisk?: VirtualMachineScaleSetOSDisk; + + @doc("Specifies the parameters that are used to add data disks to the virtual machines in the scale set. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).") + dataDisks?: VirtualMachineScaleSetDataDisk[]; + + diskControllerType?: string; +} + +@doc("Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.") +model ImageReference extends SubResource { + @doc("The image publisher.") + publisher?: string; + + @doc("Specifies the offer of the platform image or marketplace image used to create the virtual machine.") + offer?: string; + + @doc("The image SKU.") + sku?: string; + + @doc("Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version of gallery image, just set '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' in the 'id' field without version input.") + version?: string; + + @doc("Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'.") + @visibility("read") + exactVersion?: string; + + @doc("Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.") + sharedGalleryImageId?: string; + + @doc("Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET call.") + communityGalleryImageId?: string; +} + +@doc("Describes a virtual machine scale set operating system disk.") +model VirtualMachineScaleSetOSDisk { + @doc("The disk name.") + name?: string; + + @doc("Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**") + caching?: CachingTypes; + + @doc("Specifies whether writeAccelerator should be enabled or disabled on the disk.") + writeAcceleratorEnabled?: boolean; + + @doc("Specifies how the virtual machines in the scale set should be created. The only allowed value is: **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described.") + createOption: DiskCreateOptionTypes; + + @doc("Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.") + diffDiskSettings?: DiffDiskSettings; + + @doc("Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.") + diskSizeGB?: int32; + + @doc("This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**") + osType?: OperatingSystemTypes; + + @doc("Specifies information about the unmanaged user image to base the scale set on.") + image?: VirtualHardDisk; + + @doc("Specifies the container urls that are used to store operating system disks for the scale set.") + vhdContainers?: string[]; + + @doc("The managed disk parameters.") + managedDisk?: VirtualMachineScaleSetManagedDiskParameters; + + @doc("Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

    Possible values:

    **Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.

    **Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted.

    The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for Ephemeral OS Disk.") + deleteOption?: DiskDeleteOptionTypes; +} + +@doc("Describes the parameters of ephemeral disk settings that can be specified for operating system disk. **Note:** The ephemeral disk settings can only be specified for managed disk.") +model DiffDiskSettings { + @doc("Specifies the ephemeral disk settings for operating system disk.") + option?: DiffDiskOptions; + + @doc("Specifies the ephemeral disk placement for operating system disk. Possible values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk.") + placement?: DiffDiskPlacement; +} + +@doc("Describes the uri of a disk.") +model VirtualHardDisk { + @doc("Specifies the virtual hard disk's uri.") + uri?: string; +} + +@doc("Describes the parameters of a ScaleSet managed disk.") +model VirtualMachineScaleSetManagedDiskParameters { + @doc("Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.") + storageAccountType?: StorageAccountTypes; + + @doc("Specifies the customer managed disk encryption set resource id for the managed disk.") + diskEncryptionSet?: DiskEncryptionSetParameters; + + @doc("Specifies the security profile for the managed disk.") + securityProfile?: VMDiskSecurityProfile; +} + +@doc("Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. **Note:** The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.") +model DiskEncryptionSetParameters extends SubResource {} + +@doc("Specifies the security profile settings for the managed disk. **Note:** It can only be set for Confidential VMs.") +model VMDiskSecurityProfile { + @doc("Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. **Note:** It can be set for only Confidential VMs.") + securityEncryptionType?: SecurityEncryptionTypes; + + @doc("Specifies the customer managed disk encryption set resource id for the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob.") + diskEncryptionSet?: DiskEncryptionSetParameters; +} + +@doc("Describes a virtual machine scale set data disk.") +model VirtualMachineScaleSetDataDisk { + @doc("The disk name.") + name?: string; + + @doc("Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.") + lun: int32; + + @doc("Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**") + caching?: CachingTypes; + + @doc("Specifies whether writeAccelerator should be enabled or disabled on the disk.") + writeAcceleratorEnabled?: boolean; + + @doc("The create option.") + createOption: DiskCreateOptionTypes; + + @doc("Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.") + diskSizeGB?: int32; + + @doc("The managed disk parameters.") + managedDisk?: VirtualMachineScaleSetManagedDiskParameters; + + @doc("Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.") + @projectedName("json", "diskIOPSReadWrite") + diskIopsReadWrite?: int32; + + @doc("Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.") + diskMBpsReadWrite?: int32; + + @doc("Specifies whether data disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

    Possible values:

    **Delete** If this value is used, the data disk is deleted when the VMSS Flex VM is deleted.

    **Detach** If this value is used, the data disk is retained after VMSS Flex VM is deleted.

    The default value is set to **Delete**.") + deleteOption?: DiskDeleteOptionTypes; +} + +@doc("Describes a virtual machine scale set network profile.") +model VirtualMachineScaleSetNetworkProfile { + @doc("A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.") + healthProbe?: ApiEntityReference; + + @doc("The list of network configurations.") + networkInterfaceConfigurations?: VirtualMachineScaleSetNetworkConfiguration[]; + + @doc("specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible'") + networkApiVersion?: NetworkApiVersion; +} + +@doc("The API entity reference.") +model ApiEntityReference { + @doc("The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...") + id?: string; +} + +@doc("Describes a virtual machine scale set network profile's network configurations.") +model VirtualMachineScaleSetNetworkConfiguration { + @doc("The network configuration name.") + name: string; + + @doc("Describes a virtual machine scale set network profile's IP configuration.") + properties?: VirtualMachineScaleSetNetworkConfigurationProperties; +} + +@doc("Describes a virtual machine scale set network profile's IP configuration.") +model VirtualMachineScaleSetNetworkConfigurationProperties { + @doc("Specifies the primary network interface in case the virtual machine has more than 1 network interface.") + primary?: boolean; + + @doc("Specifies whether the network interface is accelerated networking-enabled.") + enableAcceleratedNetworking?: boolean; + + @doc("Specifies whether the network interface is disabled for tcp state tracking.") + disableTcpStateTracking?: boolean; + + @doc("Specifies whether the network interface is FPGA networking-enabled.") + enableFpga?: boolean; + + @doc("The network security group.") + networkSecurityGroup?: SubResource; + + @doc("The dns settings to be applied on the network interfaces.") + dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; + + @doc("Specifies the IP configurations of the network interface.") + ipConfigurations: VirtualMachineScaleSetIPConfiguration[]; + + @doc("Whether IP forwarding enabled on this NIC.") + enableIPForwarding?: boolean; + + @doc("Specify what happens to the network interface when the VM is deleted") + deleteOption?: DeleteOptions; + + @doc("Specifies whether the Auxiliary mode is enabled for the Network Interface resource.") + auxiliaryMode?: NetworkInterfaceAuxiliaryMode; + + @doc("Specifies whether the Auxiliary sku is enabled for the Network Interface resource.") + auxiliarySku?: NetworkInterfaceAuxiliarySku; +} + +@doc("Describes a virtual machines scale sets network configuration's DNS settings.") +model VirtualMachineScaleSetNetworkConfigurationDnsSettings { + @doc("List of DNS servers IP addresses") + dnsServers?: string[]; +} + +@doc("Describes a virtual machine scale set network profile's IP configuration.") +model VirtualMachineScaleSetIPConfiguration { + @doc("The IP configuration name.") + name: string; + + @doc("Describes a virtual machine scale set network profile's IP configuration properties.") + properties?: VirtualMachineScaleSetIPConfigurationProperties; +} + +@doc("Describes a virtual machine scale set network profile's IP configuration properties.") +model VirtualMachineScaleSetIPConfigurationProperties { + @doc("Specifies the identifier of the subnet.") + subnet?: ApiEntityReference; + + @doc("Specifies the primary network interface in case the virtual machine has more than 1 network interface.") + primary?: boolean; + + @doc("The publicIPAddressConfiguration.") + publicIPAddressConfiguration?: VirtualMachineScaleSetPublicIPAddressConfiguration; + + @doc("Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") + privateIPAddressVersion?: IPVersion; + + @doc("Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway.") + applicationGatewayBackendAddressPools?: SubResource[]; + + @doc("Specifies an array of references to application security group.") + applicationSecurityGroups?: SubResource[]; + + @doc("Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer.") + loadBalancerBackendAddressPools?: SubResource[]; + + @doc("Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer.") + loadBalancerInboundNatPools?: SubResource[]; +} + +@doc("Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration") +model VirtualMachineScaleSetPublicIPAddressConfiguration { + @doc("The publicIP address configuration name.") + name: string; + + @doc("Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration") + properties?: VirtualMachineScaleSetPublicIPAddressConfigurationProperties; + + @doc("Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.") + sku?: PublicIPAddressSku; +} + +@doc("Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration") +model VirtualMachineScaleSetPublicIPAddressConfigurationProperties { + @doc("The idle timeout of the public IP address.") + idleTimeoutInMinutes?: int32; + + @doc("The dns settings to be applied on the publicIP addresses .") + dnsSettings?: VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; + + @doc("The list of IP tags associated with the public IP address.") + ipTags?: VirtualMachineScaleSetIpTag[]; + + @doc("The PublicIPPrefix from which to allocate publicIP addresses.") + publicIPPrefix?: SubResource; + + @doc("Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") + publicIPAddressVersion?: IPVersion; + + @doc("Specify what happens to the public IP when the VM is deleted") + deleteOption?: DeleteOptions; +} + +@doc("Describes a virtual machines scale sets network configuration's DNS settings.") +model VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings { + @doc("The Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be created") + domainNameLabel: string; + + @doc("The Domain name label scope.The concatenation of the hashed domain name label that generated according to the policy from domain name label scope and vm index will be the domain name labels of the PublicIPAddress resources that will be created") + domainNameLabelScope?: DomainNameLabelScopeTypes; +} + +@doc("Contains the IP tag associated with the public IP address.") +model VirtualMachineScaleSetIpTag { + @doc("IP tag type. Example: FirstPartyUsage.") + ipTagType?: string; + + @doc("IP tag associated with the public IP. Example: SQL, Storage etc.") + tag?: string; +} + +@doc("Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.") +model PublicIPAddressSku { + @doc("Specify public IP sku name") + name?: PublicIPAddressSkuName; + + @doc("Specify public IP sku tier") + tier?: PublicIPAddressSkuTier; +} + +@doc("Specifies the Security profile settings for the virtual machine or virtual machine scale set.") +model SecurityProfile { + @doc("Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01.") + uefiSettings?: UefiSettings; + + @doc("This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at host will be disabled unless this property is set to true for the resource.") + encryptionAtHost?: boolean; + + @doc("Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set.") + securityType?: SecurityTypes; +} + +@doc("Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01.") +model UefiSettings { + @doc("Specifies whether secure boot should be enabled on the virtual machine. Minimum api-version: 2020-12-01.") + secureBootEnabled?: boolean; + + @doc("Specifies whether vTPM should be enabled on the virtual machine. Minimum api-version: 2020-12-01.") + vTpmEnabled?: boolean; +} + +@doc("Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.") +model DiagnosticsProfile { + @doc("Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.") + bootDiagnostics?: BootDiagnostics; +} + +@doc("Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.") +model BootDiagnostics { + @doc("Whether boot diagnostics should be enabled on the Virtual Machine.") + enabled?: boolean; + + @doc("Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.") + storageUri?: string; +} + +@doc("Describes a virtual machine scale set extension profile.") +model VirtualMachineScaleSetExtensionProfile { + @doc("The virtual machine scale set child extension resources.") + extensions?: VirtualMachineScaleSetExtension[]; + + @doc("Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01.") + extensionsTimeBudget?: string; +} + +@doc("Describes the properties of a Virtual Machine Scale Set Extension.") +model VirtualMachineScaleSetExtensionProperties { + @doc("If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed.") + forceUpdateTag?: string; + + @doc("The name of the extension handler publisher.") + publisher?: string; + + @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") + type?: string; + + @doc("Specifies the version of the script handler.") + typeHandlerVersion?: string; + + @doc("Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.") + autoUpgradeMinorVersion?: boolean; + + @doc("Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.") + enableAutomaticUpgrade?: boolean; + + @doc("Json formatted public settings for the extension.") + settings?: Record; + + @doc("The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.") + protectedSettings?: Record; + + @doc("The provisioning state, which only appears in the response.") + @visibility("read") + provisioningState?: string; + + @doc("Collection of extension names after which this extension needs to be provisioned.") + provisionAfterExtensions?: string[]; + + @doc("Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.") + suppressFailures?: boolean; + + @doc("The extensions protected settings that are passed by reference, and consumed from key vault") + protectedSettingsFromKeyVault?: KeyVaultSecretReference; +} + +@doc("Describes a reference to Key Vault Secret") +model KeyVaultSecretReference { + @doc("The URL referencing a secret in a Key Vault.") + secretUrl: string; + + @doc("The relative URL of the Key Vault containing the secret.") + sourceVault: SubResource; +} + +model SubResourceReadOnly { + @doc("Resource Id") + @visibility("read") + id?: string; +} + +@doc("Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01.") +model BillingProfile { + @doc("Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.

    This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price.

    The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS.

    Possible values are:

    - Any decimal value greater than zero. Example: 0.01538

    -1 – indicates default price to be up-to on-demand.

    You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.

    Minimum api-version: 2019-03-01.") + maxPrice?: float32; +} + +model ScheduledEventsProfile { + @doc("Specifies Terminate Scheduled Event related configurations.") + terminateNotificationProfile?: TerminateNotificationProfile; + + @doc("Specifies OS Image Scheduled Event related configurations.") + osImageNotificationProfile?: OSImageNotificationProfile; +} + +model TerminateNotificationProfile { + @doc("Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M)") + notBeforeTimeout?: string; + + @doc("Specifies whether the Terminate Scheduled event is enabled or disabled.") + enable?: boolean; +} + +model OSImageNotificationProfile { + @doc("Length of time a Virtual Machine being reimaged or having its OS upgraded will have to potentially approve the OS Image Scheduled Event before the event is auto approved (timed out). The configuration is specified in ISO 8601 format, and the value must be 15 minutes (PT15M)") + notBeforeTimeout?: string; + + @doc("Specifies whether the OS Image Scheduled event is enabled or disabled.") + enable?: boolean; +} + +@doc("The parameters of a capacity reservation Profile.") +model CapacityReservationProfile { + @doc("Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.") + capacityReservationGroup?: SubResource; +} + +@doc("Contains the list of gallery applications that should be made available to the VM/VMSS") +model ApplicationProfile { + @doc("Specifies the gallery applications that should be made available to the VM/VMSS") + galleryApplications?: VMGalleryApplication[]; +} + +@doc("Specifies the required information to reference a compute gallery application version") +model VMGalleryApplication { + @doc("Optional, Specifies a passthrough value for more generic context.") + tags?: string; + + @doc("Optional, Specifies the order in which the packages have to be installed") + order?: int32; + + @doc("Specifies the GalleryApplicationVersion resource id on the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}") + packageReferenceId: string; + + @doc("Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided") + configurationReference?: string; + + @doc("Optional, If true, any failure for any operation in the VmApplication will fail the deployment") + treatFailureAsDeploymentFailure?: boolean; + + @doc("If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated for the VM/VMSS") + enableAutomaticUpgrade?: boolean; +} + +@doc("Specifies the hardware settings for the virtual machine scale set.") +model VirtualMachineScaleSetHardwareProfile { + @doc("Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details.") + vmSizeProperties?: VMSizeProperties; +} + +@doc("Specifies VM Size Property settings on the virtual machine.") +model VMSizeProperties { + @doc("Specifies the number of vCPUs available for the VM. When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list).") + vCPUsAvailable?: int32; + + @doc("Specifies the vCPU to physical core ratio. When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). **Setting this property to 1 also means that hyper-threading is disabled.**") + vCPUsPerCore?: int32; +} + +@doc("Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. Minimum api-version: 2022-11-01") +model ServiceArtifactReference { + @doc("The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}") + id?: string; +} + +@doc("Specifies the security posture to be used for all virtual machines in the scale set. Minimum api-version: 2023-03-01") +model SecurityPostureReference { + @doc("The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest") + id?: string; + + @doc("List of virtual machine extensions to exclude when applying the Security Posture.") + excludeExtensions?: VirtualMachineExtension[]; +} + +@doc("Describes the properties of a Virtual Machine Extension.") +model VirtualMachineExtensionProperties { + @doc("How the extension handler should be forced to update even if the extension configuration has not changed.") + forceUpdateTag?: string; + + @doc("The name of the extension handler publisher.") + publisher?: string; + + @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") + type?: string; + + @doc("Specifies the version of the script handler.") + typeHandlerVersion?: string; + + @doc("Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.") + autoUpgradeMinorVersion?: boolean; + + @doc("Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.") + enableAutomaticUpgrade?: boolean; + + @doc("Json formatted public settings for the extension.") + settings?: Record; + + @doc("The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.") + protectedSettings?: Record; + + @doc("The provisioning state, which only appears in the response.") + @visibility("read") + provisioningState?: string; + + @doc("The virtual machine extension instance view.") + instanceView?: VirtualMachineExtensionInstanceView; + + @doc("Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.") + suppressFailures?: boolean; + + @doc("The extensions protected settings that are passed by reference, and consumed from key vault") + protectedSettingsFromKeyVault?: KeyVaultSecretReference; + + @doc("Collection of extension names after which this extension needs to be provisioned.") + provisionAfterExtensions?: string[]; +} + +@doc("The instance view of a virtual machine extension.") +model VirtualMachineExtensionInstanceView { + @doc("The virtual machine extension name.") + name?: string; + + @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") + type?: string; + + @doc("Specifies the version of the script handler.") + typeHandlerVersion?: string; + + @doc("The resource status information.") + substatuses?: InstanceViewStatus[]; + + @doc("The resource status information.") + statuses?: InstanceViewStatus[]; +} + +@doc("Instance view status.") +model InstanceViewStatus { + @doc("The status code.") + code?: string; + + @doc("The level code.") + level?: StatusLevelTypes; + + @doc("The short localizable label for the status.") + displayStatus?: string; + + @doc("The detailed status message, including for alerts and error messages.") + message?: string; + + @doc("The time of the status.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + time?: utcDateTime; +} + +@doc("The Resource model definition with location property as optional.") +model ResourceWithOptionalLocation { + @doc("Resource location") + location?: string; + + @doc("Resource Id") + @visibility("read") + id?: string; + + @doc("Resource name") + @visibility("read") + name?: string; + + @doc("Resource type") + @visibility("read") + type?: string; + + @doc("Resource tags") + tags?: Record; +} + +@doc("Enables or disables a capability on the virtual machine or virtual machine scale set.") +model AdditionalCapabilities { + @doc("The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.") + ultraSSDEnabled?: boolean; + + @doc("The flag that enables or disables hibernation capability on the VM.") + hibernationEnabled?: boolean; +} + +@doc("Describes a scale-in policy for a virtual machine scale set.") +model ScaleInPolicy { + @doc("The rules to be followed when scaling-in a virtual machine scale set.

    Possible values are:

    **Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.

    **OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.

    **NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.

    ") + rules?: VirtualMachineScaleSetScaleInRules[]; + + @doc("This property allows you to specify if virtual machines chosen for removal have to be force deleted when a virtual machine scale set is being scaled-in.(Feature in Preview)") + forceDeletion?: boolean; +} + +@doc("Specifies the Spot-Try-Restore properties for the virtual machine scale set. With this property customer can enable or disable automatic restore of the evicted Spot VMSS VM instances opportunistically based on capacity availability and pricing constraint.") +model SpotRestorePolicy { + @doc("Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based on capacity availability and pricing constraints") + enabled?: boolean; + + @doc("Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances") + restoreTimeout?: string; +} + +@doc("Specifies the target splits for Spot and Regular priority VMs within a scale set with flexible orchestration mode. With this property the customer is able to specify the base number of regular priority VMs created as the VMSS flex instance scales out and the split between Spot and Regular priority VMs after this base target has been reached.") +model PriorityMixPolicy { + @doc("The base number of regular priority VMs that will be created in this scale set as it scales out.") + baseRegularPriorityCount?: int32; + + @doc("The percentage of VM instances, after the base regular priority count has been reached, that are expected to use regular priority.") + @maxValue(100) + regularPriorityPercentageAboveBase?: int32; +} + +@doc("Identity for the virtual machine scale set.") +model VirtualMachineScaleSetIdentity { + @doc("The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity.") + @visibility("read") + principalId?: string; + + @doc("The tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity.") + @visibility("read") + tenantId?: string; + + @doc("The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set.") + type?: ResourceIdentityType; + + @doc("The list of user identities associated with the virtual machine scale set. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.") + userAssignedIdentities?: Record; +} + +model UserAssignedIdentitiesValue { + @doc("The principal id of user assigned identity.") + @visibility("read") + principalId?: string; + + @doc("The client id of user assigned identity.") + @visibility("read") + clientId?: string; +} + +@doc("The complex type of the extended location.") +model ExtendedLocation { + @doc("The name of the extended location.") + name?: string; + + @doc("The type of the extended location.") + type?: ExtendedLocationTypes; +} + +@doc("Describes a virtual machine scale set virtual machine profile.") +model VirtualMachineScaleSetUpdateVMProfile { + @doc("The virtual machine scale set OS profile.") + osProfile?: VirtualMachineScaleSetUpdateOSProfile; + + @doc("The virtual machine scale set storage profile.") + storageProfile?: VirtualMachineScaleSetUpdateStorageProfile; + + @doc("The virtual machine scale set network profile.") + networkProfile?: VirtualMachineScaleSetUpdateNetworkProfile; + + @doc("The virtual machine scale set Security profile") + securityProfile?: SecurityProfile; + + @doc("The virtual machine scale set diagnostics profile.") + diagnosticsProfile?: DiagnosticsProfile; + + @doc("The virtual machine scale set extension profile.") + extensionProfile?: VirtualMachineScaleSetExtensionProfile; + + @doc("The license type, which is for bring your own license scenario.") + licenseType?: string; + + @doc("Specifies the billing related details of a Azure Spot VMSS. Minimum api-version: 2019-03-01.") + billingProfile?: BillingProfile; + + @doc("Specifies Scheduled Event related configurations.") + scheduledEventsProfile?: ScheduledEventsProfile; + + @doc("UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

    Minimum api-version: 2021-03-01") + userData?: string; + + @doc("Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01.") + hardwareProfile?: VirtualMachineScaleSetHardwareProfile; +} + +@doc("Describes a virtual machine scale set OS profile.") +model VirtualMachineScaleSetUpdateOSProfile { + @doc("A base-64 encoded string of custom data.") + customData?: string; + + @doc("The Windows Configuration of the OS profile.") + windowsConfiguration?: WindowsConfiguration; + + @doc("The Linux Configuration of the OS profile.") + linuxConfiguration?: LinuxConfiguration; + + @doc("The List of certificates for addition to the VM.") + secrets?: VaultSecretGroup[]; +} + +@doc("Describes a virtual machine scale set storage profile.") +model VirtualMachineScaleSetUpdateStorageProfile { + @doc("The image reference.") + imageReference?: ImageReference; + + @doc("The OS disk.") + osDisk?: VirtualMachineScaleSetUpdateOSDisk; + + @doc("The data disks.") + dataDisks?: VirtualMachineScaleSetDataDisk[]; + + diskControllerType?: string; +} + +@doc("Describes virtual machine scale set operating system disk Update Object. This should be used for Updating VMSS OS Disk.") +model VirtualMachineScaleSetUpdateOSDisk { + @doc("The caching type.") + caching?: CachingTypes; + + @doc("Specifies whether writeAccelerator should be enabled or disabled on the disk.") + writeAcceleratorEnabled?: boolean; + + @doc("Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

    diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023") + diskSizeGB?: int32; + + @doc("The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk should not exist.") + image?: VirtualHardDisk; + + @doc("The list of virtual hard disk container uris.") + vhdContainers?: string[]; + + @doc("The managed disk parameters.") + managedDisk?: VirtualMachineScaleSetManagedDiskParameters; + + @doc("Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

    Possible values:

    **Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.

    **Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted.

    The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for Ephemeral OS Disk.") + deleteOption?: DiskDeleteOptionTypes; +} + +@doc("Describes a virtual machine scale set network profile.") +model VirtualMachineScaleSetUpdateNetworkProfile { + @doc("A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.") + healthProbe?: ApiEntityReference; + + @doc("The list of network configurations.") + networkInterfaceConfigurations?: VirtualMachineScaleSetUpdateNetworkConfiguration[]; + + @doc("specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible'") + networkApiVersion?: NetworkApiVersion; +} + +@doc("Describes a virtual machine scale set network profile's network configurations.") +model VirtualMachineScaleSetUpdateNetworkConfiguration { + @doc("The network configuration name.") + name?: string; + + @doc("Describes a virtual machine scale set updatable network profile's IP configuration.Use this object for updating network profile's IP Configuration.") + properties?: VirtualMachineScaleSetUpdateNetworkConfigurationProperties; +} + +@doc("Describes a virtual machine scale set updatable network profile's IP configuration.Use this object for updating network profile's IP Configuration.") +model VirtualMachineScaleSetUpdateNetworkConfigurationProperties { + @doc("Whether this is a primary NIC on a virtual machine.") + primary?: boolean; + + @doc("Specifies whether the network interface is accelerated networking-enabled.") + enableAcceleratedNetworking?: boolean; + + @doc("Specifies whether the network interface is disabled for tcp state tracking.") + disableTcpStateTracking?: boolean; + + @doc("Specifies whether the network interface is FPGA networking-enabled.") + enableFpga?: boolean; + + @doc("The network security group.") + networkSecurityGroup?: SubResource; + + @doc("The dns settings to be applied on the network interfaces.") + dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; + + @doc("The virtual machine scale set IP Configuration.") + ipConfigurations?: VirtualMachineScaleSetUpdateIPConfiguration[]; + + @doc("Whether IP forwarding enabled on this NIC.") + enableIPForwarding?: boolean; + + @doc("Specify what happens to the network interface when the VM is deleted") + deleteOption?: DeleteOptions; + + @doc("Specifies whether the Auxiliary mode is enabled for the Network Interface resource.") + auxiliaryMode?: NetworkInterfaceAuxiliaryMode; + + @doc("Specifies whether the Auxiliary sku is enabled for the Network Interface resource.") + auxiliarySku?: NetworkInterfaceAuxiliarySku; +} + +@doc("Describes a virtual machine scale set network profile's IP configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the new subnet are in the same virtual network") +model VirtualMachineScaleSetUpdateIPConfiguration { + @doc("The IP configuration name.") + name?: string; + + @doc("Describes a virtual machine scale set network profile's IP configuration properties.") + properties?: VirtualMachineScaleSetUpdateIPConfigurationProperties; +} + +@doc("Describes a virtual machine scale set network profile's IP configuration properties.") +model VirtualMachineScaleSetUpdateIPConfigurationProperties { + @doc("The subnet.") + subnet?: ApiEntityReference; + + @doc("Specifies the primary IP Configuration in case the network interface has more than one IP Configuration.") + primary?: boolean; + + @doc("The publicIPAddressConfiguration.") + publicIPAddressConfiguration?: VirtualMachineScaleSetUpdatePublicIPAddressConfiguration; + + @doc("Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") + privateIPAddressVersion?: IPVersion; + + @doc("The application gateway backend address pools.") + applicationGatewayBackendAddressPools?: SubResource[]; + + @doc("Specifies an array of references to application security group.") + applicationSecurityGroups?: SubResource[]; + + @doc("The load balancer backend address pools.") + loadBalancerBackendAddressPools?: SubResource[]; + + @doc("The load balancer inbound nat pools.") + loadBalancerInboundNatPools?: SubResource[]; +} + +@doc("Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration") +model VirtualMachineScaleSetUpdatePublicIPAddressConfiguration { + @doc("The publicIP address configuration name.") + name?: string; + + @doc("Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration") + properties?: VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties; +} + +@doc("Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration") +model VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties { + @doc("The idle timeout of the public IP address.") + idleTimeoutInMinutes?: int32; + + @doc("The dns settings to be applied on the publicIP addresses .") + dnsSettings?: VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; + + @doc("The PublicIPPrefix from which to allocate publicIP addresses.") + publicIPPrefix?: SubResource; + + @doc("Specify what happens to the public IP when the VM is deleted") + deleteOption?: DeleteOptions; +} + +@doc("The Update Resource model definition.") +model UpdateResource { + @doc("Resource tags") + tags?: Record; +} + +@doc("Specifies a list of virtual machine instance IDs from the VM scale set.") +model VirtualMachineScaleSetVMInstanceIDs { + @doc("The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.") + instanceIds?: string[]; +} + +@doc("Specifies a list of virtual machine instance IDs from the VM scale set.") +model VirtualMachineScaleSetVMInstanceRequiredIDs { + @doc("The virtual machine scale set instance ids.") + instanceIds: string[]; +} + +@doc("The instance view of a virtual machine scale set.") +model VirtualMachineScaleSetInstanceView { + @doc("The instance view status summary for the virtual machine scale set.") + @visibility("read") + virtualMachine?: VirtualMachineScaleSetInstanceViewStatusesSummary; + + @doc("The extensions information.") + @visibility("read") + extensions?: VirtualMachineScaleSetVMExtensionsSummary[]; + + @doc("The resource status information.") + statuses?: InstanceViewStatus[]; + + @doc("The orchestration services information.") + @visibility("read") + orchestrationServices?: OrchestrationServiceSummary[]; +} + +@doc("Instance view statuses summary for virtual machines of a virtual machine scale set.") +model VirtualMachineScaleSetInstanceViewStatusesSummary { + @doc("The extensions information.") + @visibility("read") + statusesSummary?: VirtualMachineStatusCodeCount[]; +} + +@doc("The status code and count of the virtual machine scale set instance view status summary.") +model VirtualMachineStatusCodeCount { + @doc("The instance view status code.") + @visibility("read") + code?: string; + + @doc("The number of instances having a particular status code.") + @visibility("read") + count?: int32; +} + +@doc("Extensions summary for virtual machines of a virtual machine scale set.") +model VirtualMachineScaleSetVMExtensionsSummary { + @doc("The extension name.") + @visibility("read") + name?: string; + + @doc("The extensions information.") + @visibility("read") + statusesSummary?: VirtualMachineStatusCodeCount[]; +} + +@doc("Summary for an orchestration service of a virtual machine scale set.") +model OrchestrationServiceSummary { + @doc("The name of the service.") + @visibility("read") + serviceName?: OrchestrationServiceNames; + + @doc("The current state of the service.") + @visibility("read") + serviceState?: OrchestrationServiceState; +} + +@doc("The Virtual Machine Scale Set List Skus operation response.") +model VirtualMachineScaleSetListSkusResult + is Azure.Core.Page; + +@doc("Describes an available virtual machine scale set sku.") +model VirtualMachineScaleSetSku { + @doc("The type of resource the sku applies to.") + @visibility("read") + resourceType?: string; + + @doc("The Sku.") + @visibility("read") + sku?: Sku; + + @doc("Specifies the number of virtual machines in the scale set.") + @visibility("read") + capacity?: VirtualMachineScaleSetSkuCapacity; +} + +@doc("Describes scaling information of a sku.") +model VirtualMachineScaleSetSkuCapacity { + @doc("The minimum capacity.") + @visibility("read") + minimum?: int32; + + @doc("The maximum capacity that can be set.") + @visibility("read") + maximum?: int32; + + @doc("The default capacity.") + @visibility("read") + defaultCapacity?: int32; + + @doc("The scale type applicable to the sku.") + @visibility("read") + scaleType?: VirtualMachineScaleSetSkuScaleType; +} + +@doc("List of Virtual Machine Scale Set OS Upgrade History operation response.") +model VirtualMachineScaleSetListOSUpgradeHistory + is Azure.Core.Page; + +@doc("Virtual Machine Scale Set OS Upgrade History operation response.") +model UpgradeOperationHistoricalStatusInfo { + @doc("Information about the properties of the upgrade operation.") + @visibility("read") + properties?: UpgradeOperationHistoricalStatusInfoProperties; + + @doc("Resource type") + @visibility("read") + type?: string; + + @doc("Resource location") + @visibility("read") + location?: string; +} + +@doc("Describes each OS upgrade on the Virtual Machine Scale Set.") +model UpgradeOperationHistoricalStatusInfoProperties { + @doc("Information about the overall status of the upgrade operation.") + @visibility("read") + runningStatus?: UpgradeOperationHistoryStatus; + + @doc("Counts of the VMs in each state.") + @visibility("read") + progress?: RollingUpgradeProgressInfo; + + @doc("Error Details for this upgrade if there are any.") + @visibility("read") + error?: ApiError; + + @doc("Invoker of the Upgrade Operation") + @visibility("read") + startedBy?: UpgradeOperationInvoker; + + @doc("Image Reference details") + @visibility("read") + targetImageReference?: ImageReference; + + @doc("Information about OS rollback if performed") + @visibility("read") + rollbackInfo?: RollbackStatusInfo; +} + +@doc("Information about the current running state of the overall upgrade.") +model UpgradeOperationHistoryStatus { + @doc("Code indicating the current status of the upgrade.") + @visibility("read") + code?: UpgradeState; + + @doc("Start time of the upgrade.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startTime?: utcDateTime; + + @doc("End time of the upgrade.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endTime?: utcDateTime; +} + +@doc("Information about the number of virtual machine instances in each upgrade state.") +model RollingUpgradeProgressInfo { + @doc("The number of instances that have been successfully upgraded.") + @visibility("read") + successfulInstanceCount?: int32; + + @doc("The number of instances that have failed to be upgraded successfully.") + @visibility("read") + failedInstanceCount?: int32; + + @doc("The number of instances that are currently being upgraded.") + @visibility("read") + inProgressInstanceCount?: int32; + + @doc("The number of instances that have not yet begun to be upgraded.") + @visibility("read") + pendingInstanceCount?: int32; +} + +@doc("Information about rollback on failed VM instances after a OS Upgrade operation.") +model RollbackStatusInfo { + @doc("The number of instances which have been successfully rolled back.") + @visibility("read") + successfullyRolledbackInstanceCount?: int32; + + @doc("The number of instances which failed to rollback.") + @visibility("read") + failedRolledbackInstanceCount?: int32; + + @doc("Error details if OS rollback failed.") + @visibility("read") + rollbackError?: ApiError; +} + +@doc("Describes a Virtual Machine Scale Set VM Reimage Parameters.") +model VirtualMachineScaleSetReimageParameters + extends VirtualMachineScaleSetVMReimageParameters { + @doc("The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.") + instanceIds?: string[]; +} + +@doc("Describes a Virtual Machine Scale Set VM Reimage Parameters.") +model VirtualMachineScaleSetVMReimageParameters + extends VirtualMachineReimageParameters {} + +@doc("Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk will always be reimaged") +model VirtualMachineReimageParameters { + @doc("Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.") + tempDisk?: boolean; + + @doc("Specifies in decimal number, the version the OS disk should be reimaged to. If exact version is not provided, the OS disk is reimaged to the existing version of OS Disk.") + exactVersion?: string; + + @doc("Specifies information required for reimaging the non-ephemeral OS disk.") + osProfile?: OSProfileProvisioningData; +} + +@doc("Additional parameters for Reimaging Non-Ephemeral Virtual Machine.") +model OSProfileProvisioningData { + @doc("Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\\W_])

    **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)") + adminPassword?: string; + + @doc("Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. The property customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). If using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init).") + customData?: string; +} + +@doc("The status of the latest virtual machine scale set rolling upgrade.") +model RollingUpgradeStatusInfoProperties { + @doc("The rolling upgrade policies applied for this upgrade.") + @visibility("read") + policy?: RollingUpgradePolicy; + + @doc("Information about the current running state of the overall upgrade.") + @visibility("read") + runningStatus?: RollingUpgradeRunningStatus; + + @doc("Information about the number of virtual machine instances in each upgrade state.") + @visibility("read") + progress?: RollingUpgradeProgressInfo; + + @doc("Error details for this upgrade, if there are any.") + @visibility("read") + error?: ApiError; +} + +@doc("Information about the current running state of the overall upgrade.") +model RollingUpgradeRunningStatus { + @doc("Code indicating the current status of the upgrade.") + @visibility("read") + code?: RollingUpgradeStatusCode; + + @doc("Start time of the upgrade.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startTime?: utcDateTime; + + @doc("The last action performed on the rolling upgrade.") + @visibility("read") + lastAction?: RollingUpgradeActionType; + + @doc("Last action time of the upgrade.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastActionTime?: utcDateTime; +} + +@doc("Response after calling a manual recovery walk") +model RecoveryWalkResponse { + @doc("Whether the recovery walk was performed") + @visibility("read") + walkPerformed?: boolean; + + @doc("The next update domain that needs to be walked. Null means walk spanning all update domains has been completed") + @visibility("read") + nextPlatformUpdateDomain?: int32; +} + +model VMScaleSetConvertToSinglePlacementGroupInput { + @doc("Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances.") + activePlacementGroupId?: string; +} + +@doc("The input for OrchestrationServiceState") +model OrchestrationServiceStateInput { + @doc("The name of the service.") + serviceName: OrchestrationServiceNames; + + @doc("The action to be performed.") + action: OrchestrationServiceStateAction; +} + +@doc("Describes the properties of a virtual machine scale set virtual machine.") +model VirtualMachineScaleSetVMProperties { + @doc("Specifies whether the latest model has been applied to the virtual machine.") + @visibility("read") + latestModelApplied?: boolean; + + @doc("Azure VM unique ID.") + @visibility("read") + vmId?: string; + + @doc("The virtual machine instance view.") + @visibility("read") + instanceView?: VirtualMachineScaleSetVMInstanceView; + + @doc("Specifies the hardware settings for the virtual machine.") + hardwareProfile?: HardwareProfile; + + @doc("Specifies the storage settings for the virtual machine disks.") + storageProfile?: StorageProfile; + + @doc("Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type.") + additionalCapabilities?: AdditionalCapabilities; + + @doc("Specifies the operating system settings for the virtual machine.") + osProfile?: OSProfile; + + @doc("Specifies the Security related profile settings for the virtual machine.") + securityProfile?: SecurityProfile; + + @doc("Specifies the network interfaces of the virtual machine.") + networkProfile?: NetworkProfile; + + @doc("Specifies the network profile configuration of the virtual machine.") + networkProfileConfiguration?: VirtualMachineScaleSetVMNetworkProfileConfiguration; + + @doc("Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.") + diagnosticsProfile?: DiagnosticsProfile; + + @doc("Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.") + availabilitySet?: SubResource; + + @doc("The provisioning state, which only appears in the response.") + @visibility("read") + provisioningState?: string; + + @doc("Specifies that the image or disk that is being used was licensed on-premises.

    Possible values for Windows Server operating system are:

    Windows_Client

    Windows_Server

    Possible values for Linux Server operating system are:

    RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

    [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

    Minimum api-version: 2015-06-15") + licenseType?: string; + + @doc("Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine.") + @visibility("read") + modelDefinitionApplied?: string; + + @doc("Specifies the protection policy of the virtual machine.") + protectionPolicy?: VirtualMachineScaleSetVMProtectionPolicy; + + @doc("UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

    Minimum api-version: 2021-03-01") + userData?: string; + + @doc("Specifies the time at which the Virtual Machine resource was created.

    Minimum api-version: 2021-11-01.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timeCreated?: utcDateTime; +} + +@doc("The instance view of a virtual machine scale set VM.") +model VirtualMachineScaleSetVMInstanceView { + @doc("The Update Domain count.") + platformUpdateDomain?: int32; + + @doc("The Fault Domain count.") + platformFaultDomain?: int32; + + @doc("The Remote desktop certificate thumbprint.") + rdpThumbPrint?: string; + + @doc("The VM Agent running on the virtual machine.") + vmAgent?: VirtualMachineAgentInstanceView; + + @doc("The Maintenance Operation status on the virtual machine.") + maintenanceRedeployStatus?: MaintenanceRedeployStatus; + + @doc("The disks information.") + disks?: DiskInstanceView[]; + + @doc("The extensions information.") + extensions?: VirtualMachineExtensionInstanceView[]; + + @doc("The health status for the VM.") + @visibility("read") + vmHealth?: VirtualMachineHealthStatus; + + @doc("Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.") + bootDiagnostics?: BootDiagnosticsInstanceView; + + @doc("The resource status information.") + statuses?: InstanceViewStatus[]; + + @doc("Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01.") + @visibility("read") + assignedHost?: string; + + @doc("The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId.") + placementGroupId?: string; + + @doc("Specifies the host OS name of the virtual machine.

    This name cannot be updated after the VM is created.

    **Max-length (Windows):** 15 characters

    **Max-length (Linux):** 64 characters.

    For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions).") + computerName?: string; + + @doc("The Operating System running on the hybrid machine.") + osName?: string; + + @doc("The version of Operating System running on the hybrid machine.") + osVersion?: string; + + @doc("The hypervisor generation of the Virtual Machine [V1, V2]") + hyperVGeneration?: HyperVGeneration; +} + +@doc("The instance view of the VM Agent running on the virtual machine.") +model VirtualMachineAgentInstanceView { + @doc("The VM Agent full version.") + vmAgentVersion?: string; + + @doc("The virtual machine extension handler instance view.") + extensionHandlers?: VirtualMachineExtensionHandlerInstanceView[]; + + @doc("The resource status information.") + statuses?: InstanceViewStatus[]; +} + +@doc("The instance view of a virtual machine extension handler.") +model VirtualMachineExtensionHandlerInstanceView { + @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") + type?: string; + + @doc("Specifies the version of the script handler.") + typeHandlerVersion?: string; + + @doc("The extension handler status.") + status?: InstanceViewStatus; +} + +@doc("Maintenance Operation Status.") +model MaintenanceRedeployStatus { + @doc("True, if customer is allowed to perform Maintenance.") + isCustomerInitiatedMaintenanceAllowed?: boolean; + + @doc("Start Time for the Pre Maintenance Window.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + preMaintenanceWindowStartTime?: utcDateTime; + + @doc("End Time for the Pre Maintenance Window.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + preMaintenanceWindowEndTime?: utcDateTime; + + @doc("Start Time for the Maintenance Window.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + maintenanceWindowStartTime?: utcDateTime; + + @doc("End Time for the Maintenance Window.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + maintenanceWindowEndTime?: utcDateTime; + + @doc("The Last Maintenance Operation Result Code.") + lastOperationResultCode?: MaintenanceOperationResultCodeTypes; + + @doc("Message returned for the last Maintenance Operation.") + lastOperationMessage?: string; +} + +@doc("The instance view of the disk.") +model DiskInstanceView { + @doc("The disk name.") + name?: string; + + @doc("Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15") + encryptionSettings?: DiskEncryptionSettings[]; + + @doc("The resource status information.") + statuses?: InstanceViewStatus[]; +} + +@doc("Describes a Encryption Settings for a Disk") +model DiskEncryptionSettings { + @doc("Specifies the location of the disk encryption key, which is a Key Vault Secret.") + diskEncryptionKey?: KeyVaultSecretReference; + + @doc("Specifies the location of the key encryption key in Key Vault.") + keyEncryptionKey?: KeyVaultKeyReference; + + @doc("Specifies whether disk encryption should be enabled on the virtual machine.") + enabled?: boolean; +} + +@doc("Describes a reference to Key Vault Key") +model KeyVaultKeyReference { + @doc("The URL referencing a key encryption key in Key Vault.") + keyUrl: string; + + @doc("The relative URL of the Key Vault containing the key.") + sourceVault: SubResource; +} + +@doc("The health status of the VM.") +model VirtualMachineHealthStatus { + @doc("The health status information for the VM.") + @visibility("read") + status?: InstanceViewStatus; +} + +@doc("The instance view of a virtual machine boot diagnostics.") +model BootDiagnosticsInstanceView { + @doc("The console screenshot blob URI. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage.") + @visibility("read") + consoleScreenshotBlobUri?: string; + + @doc("The serial console log blob Uri. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage.") + @visibility("read") + serialConsoleLogBlobUri?: string; + + @doc("The boot diagnostics status information for the VM. **Note:** It will be set only if there are errors encountered in enabling boot diagnostics.") + @visibility("read") + status?: InstanceViewStatus; +} + +@doc("Specifies the hardware settings for the virtual machine.") +model HardwareProfile { + @doc("Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set.") + vmSize?: VirtualMachineSizeTypes; + + @doc("Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01. This feature is still in preview mode and is not supported for VirtualMachineScaleSet. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details.") + vmSizeProperties?: VMSizeProperties; +} + +@doc("Specifies the storage settings for the virtual machine disks.") +model StorageProfile { + @doc("Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.") + imageReference?: ImageReference; + + @doc("Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).") + osDisk?: OSDisk; + + @doc("Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).") + dataDisks?: DataDisk[]; + + @doc("Specifies the disk controller type configured for the VM. **Note:** This property will be set to the default disk controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01.") + diskControllerType?: DiskControllerTypes; +} + +@doc("Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).") +model OSDisk { + @doc("This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**") + osType?: OperatingSystemTypes; + + @doc("Specifies the encryption settings for the OS Disk. Minimum api-version: 2015-06-15.") + encryptionSettings?: DiskEncryptionSettings; + + @doc("The disk name.") + name?: string; + + @doc("The virtual hard disk.") + vhd?: VirtualHardDisk; + + @doc("The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.") + image?: VirtualHardDisk; + + @doc("Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**") + caching?: CachingTypes; + + @doc("Specifies whether writeAccelerator should be enabled or disabled on the disk.") + writeAcceleratorEnabled?: boolean; + + @doc("Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.") + diffDiskSettings?: DiffDiskSettings; + + @doc("Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described.") + createOption: DiskCreateOptionTypes; + + @doc("Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.") + diskSizeGB?: int32; + + @doc("The managed disk parameters.") + managedDisk?: ManagedDiskParameters; + + @doc("Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the OS disk is deleted when VM is deleted. **Detach.** If this value is used, the os disk is retained after VM is deleted. The default value is set to **Detach**. For an ephemeral OS Disk, the default value is set to **Delete**. The user cannot change the delete option for an ephemeral OS Disk.") + deleteOption?: DiskDeleteOptionTypes; +} + +@doc("The parameters of a managed disk.") +model ManagedDiskParameters extends SubResource { + @doc("Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.") + storageAccountType?: StorageAccountTypes; + + @doc("Specifies the customer managed disk encryption set resource id for the managed disk.") + diskEncryptionSet?: DiskEncryptionSetParameters; + + @doc("Specifies the security profile for the managed disk.") + securityProfile?: VMDiskSecurityProfile; +} + +@doc("Describes a data disk.") +model DataDisk { + @doc("Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.") + lun: int32; + + @doc("The disk name.") + name?: string; + + @doc("The virtual hard disk.") + vhd?: VirtualHardDisk; + + @doc("The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.") + image?: VirtualHardDisk; + + @doc("Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**") + caching?: CachingTypes; + + @doc("Specifies whether writeAccelerator should be enabled or disabled on the disk.") + writeAcceleratorEnabled?: boolean; + + @doc("Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described.") + createOption: DiskCreateOptionTypes; + + @doc("Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.") + diskSizeGB?: int32; + + @doc("The managed disk parameters.") + managedDisk?: ManagedDiskParameters; + + @doc("Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset") + toBeDetached?: boolean; + + @doc("Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.") + @visibility("read") + @projectedName("json", "diskIOPSReadWrite") + diskIopsReadWrite?: int32; + + @doc("Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.") + @visibility("read") + diskMBpsReadWrite?: int32; + + @doc("Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'.") + detachOption?: DiskDetachOptionTypes; + + @doc("Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**.") + deleteOption?: DiskDeleteOptionTypes; +} + +@doc("Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is provisioned.") +model OSProfile { + @doc("Specifies the host OS name of the virtual machine. This name cannot be updated after the VM is created. **Max-length (Windows):** 15 characters. **Max-length (Linux):** 64 characters. For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules).") + computerName?: string; + + @doc("Specifies the name of the administrator account.

    This property cannot be updated after the VM is created.

    **Windows-only restriction:** Cannot end in \".\"

    **Disallowed values:** \"administrator\", \"admin\", \"user\", \"user1\", \"test\", \"user2\", \"test1\", \"user3\", \"admin1\", \"1\", \"123\", \"a\", \"actuser\", \"adm\", \"admin2\", \"aspnet\", \"backup\", \"console\", \"david\", \"guest\", \"john\", \"owner\", \"root\", \"server\", \"sql\", \"support\", \"support_388945a0\", \"sys\", \"test2\", \"test3\", \"user4\", \"user5\".

    **Minimum-length (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters.") + adminUsername?: string; + + @doc("Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\\W_])

    **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)") + adminPassword?: string; + + @doc("Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. The property 'customData' is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init).") + customData?: string; + + @doc("Specifies Windows operating system settings on the virtual machine.") + windowsConfiguration?: WindowsConfiguration; + + @doc("Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).") + linuxConfiguration?: LinuxConfiguration; + + @doc("Specifies set of certificates that should be installed onto the virtual machine. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).") + secrets?: VaultSecretGroup[]; + + @doc("Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine.") + allowExtensionOperations?: boolean; + + @doc("Optional property which must either be set to True or omitted.") + requireGuestProvisionSignal?: boolean; +} + +@doc("Specifies the network interfaces or the networking configuration of the virtual machine.") +model NetworkProfile { + @doc("Specifies the list of resource Ids for the network interfaces associated with the virtual machine.") + networkInterfaces?: NetworkInterfaceReference[]; + + @doc("specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations") + networkApiVersion?: NetworkApiVersion; + + @doc("Specifies the networking configurations that will be used to create the virtual machine networking resources.") + networkInterfaceConfigurations?: VirtualMachineNetworkInterfaceConfiguration[]; +} + +@doc("Describes a network interface reference.") +model NetworkInterfaceReference extends SubResource { + @doc("Describes a network interface reference properties.") + properties?: NetworkInterfaceReferenceProperties; +} + +@doc("Describes a network interface reference properties.") +model NetworkInterfaceReferenceProperties { + @doc("Specifies the primary network interface in case the virtual machine has more than 1 network interface.") + primary?: boolean; + + @doc("Specify what happens to the network interface when the VM is deleted") + deleteOption?: DeleteOptions; +} + +@doc("Describes a virtual machine network interface configurations.") +model VirtualMachineNetworkInterfaceConfiguration { + @doc("The network interface configuration name.") + name: string; + + @doc("Describes a virtual machine network profile's IP configuration.") + properties?: VirtualMachineNetworkInterfaceConfigurationProperties; +} + +@doc("Describes a virtual machine network profile's IP configuration.") +model VirtualMachineNetworkInterfaceConfigurationProperties { + @doc("Specifies the primary network interface in case the virtual machine has more than 1 network interface.") + primary?: boolean; + + @doc("Specify what happens to the network interface when the VM is deleted") + deleteOption?: DeleteOptions; + + @doc("Specifies whether the network interface is accelerated networking-enabled.") + enableAcceleratedNetworking?: boolean; + + @doc("Specifies whether the network interface is disabled for tcp state tracking.") + disableTcpStateTracking?: boolean; + + @doc("Specifies whether the network interface is FPGA networking-enabled.") + enableFpga?: boolean; + + @doc("Whether IP forwarding enabled on this NIC.") + enableIPForwarding?: boolean; + + @doc("The network security group.") + networkSecurityGroup?: SubResource; + + @doc("The dns settings to be applied on the network interfaces.") + dnsSettings?: VirtualMachineNetworkInterfaceDnsSettingsConfiguration; + + @doc("Specifies the IP configurations of the network interface.") + ipConfigurations: VirtualMachineNetworkInterfaceIPConfiguration[]; + + dscpConfiguration?: SubResource; + + @doc("Specifies whether the Auxiliary mode is enabled for the Network Interface resource.") + auxiliaryMode?: NetworkInterfaceAuxiliaryMode; + + @doc("Specifies whether the Auxiliary sku is enabled for the Network Interface resource.") + auxiliarySku?: NetworkInterfaceAuxiliarySku; +} + +@doc("Describes a virtual machines network configuration's DNS settings.") +model VirtualMachineNetworkInterfaceDnsSettingsConfiguration { + @doc("List of DNS servers IP addresses") + dnsServers?: string[]; +} + +@doc("Describes a virtual machine network profile's IP configuration.") +model VirtualMachineNetworkInterfaceIPConfiguration { + @doc("The IP configuration name.") + name: string; + + @doc("Describes a virtual machine network interface IP configuration properties.") + properties?: VirtualMachineNetworkInterfaceIPConfigurationProperties; +} + +@doc("Describes a virtual machine network interface IP configuration properties.") +model VirtualMachineNetworkInterfaceIPConfigurationProperties { + @doc("Specifies the identifier of the subnet.") + subnet?: SubResource; + + @doc("Specifies the primary network interface in case the virtual machine has more than 1 network interface.") + primary?: boolean; + + @doc("The publicIPAddressConfiguration.") + publicIPAddressConfiguration?: VirtualMachinePublicIPAddressConfiguration; + + @doc("Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") + privateIPAddressVersion?: IPVersions; + + @doc("Specifies an array of references to application security group.") + applicationSecurityGroups?: SubResource[]; + + @doc("Specifies an array of references to backend address pools of application gateways. A virtual machine can reference backend address pools of multiple application gateways. Multiple virtual machines cannot use the same application gateway.") + applicationGatewayBackendAddressPools?: SubResource[]; + + @doc("Specifies an array of references to backend address pools of load balancers. A virtual machine can reference backend address pools of one public and one internal load balancer. [Multiple virtual machines cannot use the same basic sku load balancer].") + loadBalancerBackendAddressPools?: SubResource[]; +} + +@doc("Describes a virtual machines IP Configuration's PublicIPAddress configuration") +model VirtualMachinePublicIPAddressConfiguration { + @doc("The publicIP address configuration name.") + name: string; + + @doc("Describes a virtual machines IP Configuration's PublicIPAddress configuration") + properties?: VirtualMachinePublicIPAddressConfigurationProperties; + + @doc("Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.") + sku?: PublicIPAddressSku; +} + +@doc("Describes a virtual machines IP Configuration's PublicIPAddress configuration") +model VirtualMachinePublicIPAddressConfigurationProperties { + @doc("The idle timeout of the public IP address.") + idleTimeoutInMinutes?: int32; + + @doc("Specify what happens to the public IP address when the VM is deleted") + deleteOption?: DeleteOptions; + + @doc("The dns settings to be applied on the publicIP addresses .") + dnsSettings?: VirtualMachinePublicIPAddressDnsSettingsConfiguration; + + @doc("The list of IP tags associated with the public IP address.") + ipTags?: VirtualMachineIpTag[]; + + @doc("The PublicIPPrefix from which to allocate publicIP addresses.") + publicIPPrefix?: SubResource; + + @doc("Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") + publicIPAddressVersion?: IPVersions; + + @doc("Specify the public IP allocation type") + publicIPAllocationMethod?: PublicIPAllocationMethod; +} + +@doc("Describes a virtual machines network configuration's DNS settings.") +model VirtualMachinePublicIPAddressDnsSettingsConfiguration { + @doc("The Domain name label prefix of the PublicIPAddress resources that will be created. The generated name label is the concatenation of the domain name label and vm network profile unique ID.") + domainNameLabel: string; + + @doc("The Domain name label scope of the PublicIPAddress resources that will be created. The generated name label is the concatenation of the hashed domain name label with policy according to the domain name label scope and vm network profile unique ID.") + domainNameLabelScope?: DomainNameLabelScopeTypes; +} + +@doc("Contains the IP tag associated with the public IP address.") +model VirtualMachineIpTag { + @doc("IP tag type. Example: FirstPartyUsage.") + ipTagType?: string; + + @doc("IP tag associated with the public IP. Example: SQL, Storage etc.") + tag?: string; +} + +@doc("Describes a virtual machine scale set VM network profile.") +model VirtualMachineScaleSetVMNetworkProfileConfiguration { + @doc("The list of network configurations.") + networkInterfaceConfigurations?: VirtualMachineScaleSetNetworkConfiguration[]; +} + +@doc("The protection policy of a virtual machine scale set VM.") +model VirtualMachineScaleSetVMProtectionPolicy { + @doc("Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation.") + protectFromScaleIn?: boolean; + + @doc("Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine scale set VM.") + protectFromScaleSetActions?: boolean; +} + +@doc("Identity for the virtual machine.") +model VirtualMachineIdentity { + @doc("The principal id of virtual machine identity. This property will only be provided for a system assigned identity.") + @visibility("read") + principalId?: string; + + @doc("The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity.") + @visibility("read") + tenantId?: string; + + @doc("The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine.") + type?: ResourceIdentityType; + + @doc("The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.") + userAssignedIdentities?: Record; +} + +@doc("The SAS URIs of the console screenshot and serial log blobs.") +model RetrieveBootDiagnosticsDataResult { + @doc("The console screenshot blob URI") + @visibility("read") + consoleScreenshotBlobUri?: string; + + @doc("The serial console log blob URI.") + @visibility("read") + serialConsoleLogBlobUri?: string; +} + +@doc("Describes the properties of a Virtual Machine.") +model VirtualMachineProperties { + @doc("Specifies the hardware settings for the virtual machine.") + hardwareProfile?: HardwareProfile; + + @doc("Specifies the storage settings for the virtual machine disks.") + storageProfile?: StorageProfile; + + @doc("Specifies additional capabilities enabled or disabled on the virtual machine.") + additionalCapabilities?: AdditionalCapabilities; + + @doc("Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.") + osProfile?: OSProfile; + + @doc("Specifies the network interfaces of the virtual machine.") + networkProfile?: NetworkProfile; + + @doc("Specifies the Security related profile settings for the virtual machine.") + securityProfile?: SecurityProfile; + + @doc("Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.") + diagnosticsProfile?: DiagnosticsProfile; + + @doc("Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.") + availabilitySet?: SubResource; + + @doc("Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. This property cannot exist along with a non-null properties.availabilitySet reference. Minimum api‐version: 2019‐03‐01.") + virtualMachineScaleSet?: SubResource; + + @doc("Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01.") + proximityPlacementGroup?: SubResource; + + @doc("Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01") + priority?: VirtualMachinePriorityTypes; + + @doc("Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.") + evictionPolicy?: VirtualMachineEvictionPolicyTypes; + + @doc("Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01.") + billingProfile?: BillingProfile; + + @doc("Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01.") + host?: SubResource; + + @doc("Specifies information about the dedicated host group that the virtual machine resides in. **Note:** User cannot specify both host and hostGroup properties. Minimum api-version: 2020-06-01.") + hostGroup?: SubResource; + + @doc("The provisioning state, which only appears in the response.") + @visibility("read") + provisioningState?: string; + + @doc("The virtual machine instance view.") + @visibility("read") + instanceView?: VirtualMachineInstanceView; + + @doc("Specifies that the image or disk that is being used was licensed on-premises.

    Possible values for Windows Server operating system are:

    Windows_Client

    Windows_Server

    Possible values for Linux Server operating system are:

    RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

    [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

    Minimum api-version: 2015-06-15") + licenseType?: string; + + @doc("Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands.") + @visibility("read") + vmId?: string; + + @doc("Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01.") + extensionsTimeBudget?: string; + + @doc("Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains. This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set. The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' greater than 1. This property cannot be updated once the Virtual Machine is created. Fault domain assignment can be viewed in the Virtual Machine Instance View. Minimum api‐version: 2020‐12‐01.") + platformFaultDomain?: int32; + + @doc("Specifies Scheduled Event related configurations.") + scheduledEventsProfile?: ScheduledEventsProfile; + + @doc("UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01.") + userData?: string; + + @doc("Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01.") + capacityReservation?: CapacityReservationProfile; + + @doc("Specifies the gallery applications that should be made available to the VM/VMSS.") + applicationProfile?: ApplicationProfile; + + @doc("Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timeCreated?: utcDateTime; +} + +@doc("The instance view of a virtual machine.") +model VirtualMachineInstanceView { + @doc("Specifies the update domain of the virtual machine.") + platformUpdateDomain?: int32; + + @doc("Specifies the fault domain of the virtual machine.") + platformFaultDomain?: int32; + + @doc("The computer name assigned to the virtual machine.") + computerName?: string; + + @doc("The Operating System running on the virtual machine.") + osName?: string; + + @doc("The version of Operating System running on the virtual machine.") + osVersion?: string; + + @doc("Specifies the HyperVGeneration Type associated with a resource") + hyperVGeneration?: HyperVGenerationType; + + @doc("The Remote desktop certificate thumbprint.") + rdpThumbPrint?: string; + + @doc("The VM Agent running on the virtual machine.") + vmAgent?: VirtualMachineAgentInstanceView; + + @doc("The Maintenance Operation status on the virtual machine.") + maintenanceRedeployStatus?: MaintenanceRedeployStatus; + + @doc("The virtual machine disk information.") + disks?: DiskInstanceView[]; + + @doc("The extensions information.") + extensions?: VirtualMachineExtensionInstanceView[]; + + @doc("The health status for the VM.") + @visibility("read") + vmHealth?: VirtualMachineHealthStatus; + + @doc("Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.") + bootDiagnostics?: BootDiagnosticsInstanceView; + + @doc("Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01.") + @visibility("read") + assignedHost?: string; + + @doc("The resource status information.") + statuses?: InstanceViewStatus[]; + + @doc("[Preview Feature] The status of virtual machine patch operations.") + patchStatus?: VirtualMachinePatchStatus; +} + +@doc("The status of virtual machine patch operations.") +model VirtualMachinePatchStatus { + @doc("The available patch summary of the latest assessment operation for the virtual machine.") + availablePatchSummary?: AvailablePatchSummary; + + @doc("The installation summary of the latest installation operation for the virtual machine.") + lastPatchInstallationSummary?: LastPatchInstallationSummary; + + @doc("The enablement status of the specified patchMode") + @visibility("read") + configurationStatuses?: InstanceViewStatus[]; +} + +@doc("Describes the properties of an virtual machine instance view for available patch summary.") +model AvailablePatchSummary { + @doc("The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"") + @visibility("read") + status?: PatchOperationStatus; + + @doc("The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.") + @visibility("read") + assessmentActivityId?: string; + + @doc("The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred.") + @visibility("read") + rebootPending?: boolean; + + @doc("The number of critical or security patches that have been detected as available and not yet installed.") + @visibility("read") + criticalAndSecurityPatchCount?: int32; + + @doc("The number of all available patches excluding critical and security.") + @visibility("read") + otherPatchCount?: int32; + + @doc("The UTC timestamp when the operation began.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startTime?: utcDateTime; + + @doc("The UTC timestamp when the operation began.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedTime?: utcDateTime; + + @doc("The errors that were encountered during execution of the operation. The details array contains the list of them.") + @visibility("read") + error?: ApiError; +} + +@doc("Describes the properties of the last installed patch summary.") +model LastPatchInstallationSummary { + @doc("The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"") + @visibility("read") + status?: PatchOperationStatus; + + @doc("The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.") + @visibility("read") + installationActivityId?: string; + + @doc("Describes whether the operation ran out of time before it completed all its intended actions") + @visibility("read") + maintenanceWindowExceeded?: boolean; + + @doc("The number of all available patches but not going to be installed because it didn't match a classification or inclusion list entry.") + @visibility("read") + notSelectedPatchCount?: int32; + + @doc("The number of all available patches but excluded explicitly by a customer-specified exclusion list match.") + @visibility("read") + excludedPatchCount?: int32; + + @doc("The number of all available patches expected to be installed over the course of the patch installation operation.") + @visibility("read") + pendingPatchCount?: int32; + + @doc("The count of patches that successfully installed.") + @visibility("read") + installedPatchCount?: int32; + + @doc("The count of patches that failed installation.") + @visibility("read") + failedPatchCount?: int32; + + @doc("The UTC timestamp when the operation began.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startTime?: utcDateTime; + + @doc("The UTC timestamp when the operation began.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedTime?: utcDateTime; + + @doc("The errors that were encountered during execution of the operation. The details array contains the list of them.") + @visibility("read") + error?: ApiError; +} + +@doc("Capture Virtual Machine parameters.") +model VirtualMachineCaptureParameters { + @doc("The captured virtual hard disk's name prefix.") + vhdPrefix: string; + + @doc("The destination container name.") + destinationContainerName: string; + + @doc("Specifies whether to overwrite the destination virtual hard disk, in case of conflict.") + overwriteVhds: boolean; +} + +@doc("Output of virtual machine capture operation.") +model VirtualMachineCaptureResult extends SubResource { + @doc("the schema of the captured virtual machine") + @visibility("read") + @projectedName("json", "$schema") + schema?: string; + + @doc("the version of the content") + @visibility("read") + contentVersion?: string; + + @doc("parameters of the captured virtual machine") + @visibility("read") + parameters?: Record; + + @doc("a list of resource items of the captured virtual machine") + @visibility("read") + resources?: Record[]; +} + +@doc("Describes the properties of an AssessPatches result.") +model VirtualMachineAssessPatchesResult { + @doc("The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"") + @visibility("read") + status?: PatchOperationStatus; + + @doc("The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.") + @visibility("read") + assessmentActivityId?: string; + + @doc("The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred.") + @visibility("read") + rebootPending?: boolean; + + @doc("The number of critical or security patches that have been detected as available and not yet installed.") + @visibility("read") + criticalAndSecurityPatchCount?: int32; + + @doc("The number of all available patches excluding critical and security.") + @visibility("read") + otherPatchCount?: int32; + + @doc("The UTC timestamp when the operation began.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("The list of patches that have been detected as available for installation.") + @visibility("read") + availablePatches?: VirtualMachineSoftwarePatchProperties[]; + + @doc("The errors that were encountered during execution of the operation. The details array contains the list of them.") + @visibility("read") + error?: ApiError; +} + +@doc("Describes the properties of a Virtual Machine software patch.") +model VirtualMachineSoftwarePatchProperties { + @doc("A unique identifier for the patch.") + @visibility("read") + patchId?: string; + + @doc("The friendly name of the patch.") + @visibility("read") + name?: string; + + @doc("The version number of the patch. This property applies only to Linux patches.") + @visibility("read") + version?: string; + + @doc("The KBID of the patch. Only applies to Windows patches.") + @visibility("read") + kbId?: string; + + @doc("The classification(s) of the patch as provided by the patch publisher.") + @visibility("read") + classifications?: string[]; + + @doc("Describes the reboot requirements of the patch.") + @visibility("read") + rebootBehavior?: VMGuestPatchRebootBehavior; + + @doc("The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.") + @visibility("read") + activityId?: string; + + @doc("The UTC timestamp when the repository published this patch.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + publishedDate?: utcDateTime; + + @doc("The UTC timestamp of the last update to this patch record.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedDateTime?: utcDateTime; + + @doc("Describes the availability of a given patch.") + @visibility("read") + assessmentState?: PatchAssessmentState; +} + +@doc("Input for InstallPatches as directly received by the API") +model VirtualMachineInstallPatchesParameters { + @doc("Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours)") + maximumDuration?: duration; + + @doc("Defines when it is acceptable to reboot a VM during a software update operation.") + rebootSetting: VMGuestPatchRebootSetting; + + @doc("Input for InstallPatches on a Windows VM, as directly received by the API") + windowsParameters?: WindowsParameters; + + @doc("Input for InstallPatches on a Linux VM, as directly received by the API") + linuxParameters?: LinuxParameters; +} + +@doc("Input for InstallPatches on a Windows VM, as directly received by the API") +model WindowsParameters { + @doc("The update classifications to select when installing patches for Windows.") + classificationsToInclude?: VMGuestPatchClassificationWindows[]; + + @doc("Kbs to include in the patch operation") + kbNumbersToInclude?: string[]; + + @doc("Kbs to exclude in the patch operation") + kbNumbersToExclude?: string[]; + + @doc("Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true.") + excludeKbsRequiringReboot?: boolean; + + @doc("This is used to install patches that were published on or before this given max published date.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + maxPatchPublishDate?: utcDateTime; +} + +@doc("Input for InstallPatches on a Linux VM, as directly received by the API") +model LinuxParameters { + @doc("The update classifications to select when installing patches for Linux.") + classificationsToInclude?: VMGuestPatchClassificationLinux[]; + + @doc("packages to include in the patch operation. Format: packageName_packageVersion") + packageNameMasksToInclude?: string[]; + + @doc("packages to exclude in the patch operation. Format: packageName_packageVersion") + packageNameMasksToExclude?: string[]; + + @doc("This is used as a maintenance run identifier for Auto VM Guest Patching in Linux.") + maintenanceRunId?: string; +} + +@doc("The result summary of an installation operation.") +model VirtualMachineInstallPatchesResult { + @doc("The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Failed\", \"Succeeded\", \"Unknown\" or \"CompletedWithWarnings.\"") + @visibility("read") + status?: PatchOperationStatus; + + @doc("The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.") + @visibility("read") + installationActivityId?: string; + + @doc("The reboot state of the VM following completion of the operation.") + @visibility("read") + rebootStatus?: VMGuestPatchRebootStatus; + + @doc("Whether the operation ran out of time before it completed all its intended actions.") + @visibility("read") + maintenanceWindowExceeded?: boolean; + + @doc("The number of patches that were not installed due to the user blocking their installation.") + @visibility("read") + excludedPatchCount?: int32; + + @doc("The number of patches that were detected as available for install, but did not meet the operation's criteria.") + @visibility("read") + notSelectedPatchCount?: int32; + + @doc("The number of patches that were identified as meeting the installation criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true.") + @visibility("read") + pendingPatchCount?: int32; + + @doc("The number of patches successfully installed.") + @visibility("read") + installedPatchCount?: int32; + + @doc("The number of patches that could not be installed due to some issue. See errors for details.") + @visibility("read") + failedPatchCount?: int32; + + @doc("The patches that were installed during the operation.") + @visibility("read") + patches?: PatchInstallationDetail[]; + + @doc("The UTC timestamp when the operation began.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("The errors that were encountered during execution of the operation. The details array contains the list of them.") + @visibility("read") + error?: ApiError; +} + +@doc("Information about a specific patch that was encountered during an installation action.") +model PatchInstallationDetail { + @doc("A unique identifier for the patch.") + @visibility("read") + patchId?: string; + + @doc("The friendly name of the patch.") + @visibility("read") + name?: string; + + @doc("The version string of the package. It may conform to Semantic Versioning. Only applies to Linux.") + @visibility("read") + version?: string; + + @doc("The KBID of the patch. Only applies to Windows patches.") + @visibility("read") + kbId?: string; + + @doc("The classification(s) of the patch as provided by the patch publisher.") + @visibility("read") + classifications?: string[]; + + @doc("The state of the patch after the installation operation completed.") + @visibility("read") + installationState?: PatchInstallationState; +} + +@doc("Describes a Virtual Machine Image.") +model VirtualMachineImage extends VirtualMachineImageResource { + @doc("Describes the properties of a Virtual Machine Image.") + properties?: VirtualMachineImageProperties; +} + +@doc("Describes the properties of a Virtual Machine Image.") +model VirtualMachineImageProperties { + @doc("Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.") + plan?: PurchasePlan; + + @doc("Contains the os disk image information.") + osDiskImage?: OSDiskImage; + + @doc("The list of data disk images information.") + dataDiskImages?: DataDiskImage[]; + + @doc("Describes automatic OS upgrade properties on the image.") + automaticOSUpgradeProperties?: AutomaticOSUpgradeProperties; + + @doc("Specifies the HyperVGeneration Type") + hyperVGeneration?: HyperVGenerationTypes; + + @doc("Specifies disallowed configuration for the VirtualMachine created from the image") + disallowed?: DisallowedConfiguration; + + features?: VirtualMachineImageFeature[]; + + @doc("Specifies the Architecture Type") + architecture?: ArchitectureTypes; + + @doc("Describes image deprecation status properties on the image.") + imageDeprecationStatus?: ImageDeprecationStatus; +} + +@doc("Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.") +model PurchasePlan { + @doc("The publisher ID.") + publisher: string; + + @doc("The plan ID.") + name: string; + + @doc("Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.") + product: string; +} + +@doc("Contains the os disk image information.") +model OSDiskImage { + @doc("The operating system of the osDiskImage.") + operatingSystem: OperatingSystemTypes; +} + +@doc("Contains the data disk images information.") +model DataDiskImage { + @doc("Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.") + @visibility("read") + lun?: int32; +} + +@doc("Describes automatic OS upgrade properties on the image.") +model AutomaticOSUpgradeProperties { + @doc("Specifies whether automatic OS upgrade is supported on the image.") + automaticOSUpgradeSupported: boolean; +} + +@doc("Specifies the disallowed configuration for a virtual machine image.") +model DisallowedConfiguration { + @doc("VM disk types which are disallowed.") + vmDiskType?: VmDiskTypes; +} + +@doc("Specifies additional capabilities supported by the image") +model VirtualMachineImageFeature { + @doc("The name of the feature.") + name?: string; + + @doc("The corresponding value for the feature.") + value?: string; +} + +@doc("Describes image deprecation status properties on the image.") +model ImageDeprecationStatus { + @doc("Describes the state of the image.") + imageState?: ImageState; + + @doc("The time, in future, at which this image will be marked as deprecated. This scheduled time is chosen by the Publisher.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + scheduledDeprecationTime?: utcDateTime; + + @doc("Describes the alternative option specified by the Publisher for this image when this image is deprecated.") + alternativeOption?: AlternativeOption; +} + +@doc("Describes the alternative option specified by the Publisher for this image when this image is deprecated.") +model AlternativeOption { + @doc("Describes the type of the alternative option.") + type?: AlternativeType; + + @doc("Indicates the alternative option value specified by the Publisher. This is the Offer name when the type is Offer or the Plan name when the type is Plan.") + value?: string; +} + +@doc("Virtual machine image resource information.") +model VirtualMachineImageResource extends SubResource { + @doc("The name of the resource.") + name: string; + + @doc("The supported Azure location of the resource.") + location: string; + + @doc("Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md).") + tags?: Record; + + @doc("The extended location of the Virtual Machine.") + extendedLocation?: ExtendedLocation; +} + +@doc("The List VmImages in EdgeZone operation response.") +model VmImagesInEdgeZoneListResult { + @doc("The list of VMImages in EdgeZone") + value?: VirtualMachineImageResource[]; + + @doc("The URI to fetch the next page of VMImages in EdgeZone. Call ListNext() with this URI to fetch the next page of VmImages.") + nextLink?: string; +} + +@doc("Describes the properties of a Virtual Machine Extension Image.") +model VirtualMachineExtensionImageProperties { + @doc("The operating system this extension supports.") + operatingSystem: string; + + @doc("The type of role (IaaS or PaaS) this extension supports.") + computeRole: string; + + @doc("The schema defined by publisher, where extension consumers should provide settings in a matching schema.") + handlerSchema: string; + + @doc("Whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable on scalesets, but there might be cases where a publisher wants to explicitly indicate the extension is only enabled for CRP VMs but not VMSS.") + vmScaleSetEnabled?: boolean; + + @doc("Whether the handler can support multiple extensions.") + supportsMultipleExtensions?: boolean; +} + +@doc("The instance view of a resource.") +model AvailabilitySetProperties { + @doc("Update Domain count.") + platformUpdateDomainCount?: int32; + + @doc("Fault Domain count.") + platformFaultDomainCount?: int32; + + @doc("A list of references to all virtual machines in the availability set.") + virtualMachines?: SubResource[]; + + @doc("Specifies information about the proximity placement group that the availability set should be assigned to. Minimum api-version: 2018-04-01.") + proximityPlacementGroup?: SubResource; + + @doc("The resource status information.") + @visibility("read") + statuses?: InstanceViewStatus[]; +} + +@doc("Describes the properties of a Proximity Placement Group.") +model ProximityPlacementGroupProperties { + @doc("Specifies the type of the proximity placement group. Possible values are: **Standard** : Co-locate resources within an Azure region or Availability Zone. **Ultra** : For future use.") + proximityPlacementGroupType?: ProximityPlacementGroupType; + + @doc("A list of references to all virtual machines in the proximity placement group.") + @visibility("read") + virtualMachines?: SubResourceWithColocationStatus[]; + + @doc("A list of references to all virtual machine scale sets in the proximity placement group.") + @visibility("read") + virtualMachineScaleSets?: SubResourceWithColocationStatus[]; + + @doc("A list of references to all availability sets in the proximity placement group.") + @visibility("read") + availabilitySets?: SubResourceWithColocationStatus[]; + + @doc("Describes colocation status of the Proximity Placement Group.") + colocationStatus?: InstanceViewStatus; + + @doc("Specifies the user intent of the proximity placement group.") + intent?: ProximityPlacementGroupPropertiesIntent; +} + +model SubResourceWithColocationStatus extends SubResource { + @doc("Describes colocation status of a resource in the Proximity Placement Group.") + colocationStatus?: InstanceViewStatus; +} + +@doc("Specifies the user intent of the proximity placement group.") +model ProximityPlacementGroupPropertiesIntent { + @doc("Specifies possible sizes of virtual machines that can be created in the proximity placement group.") + vmSizes?: string[]; +} + +@doc("Specifies information about the proximity placement group.") +model ProximityPlacementGroupUpdate extends UpdateResource {} + +@doc("Dedicated Host Group Properties.") +model DedicatedHostGroupProperties { + @doc("Number of fault domains that the host group can span.") + @minValue(1) + platformFaultDomainCount: int32; + + @doc("A list of references to all dedicated hosts in the dedicated host group.") + @visibility("read") + hosts?: SubResourceReadOnly[]; + + @doc("The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group.") + @visibility("read") + instanceView?: DedicatedHostGroupInstanceView; + + @doc("Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. Minimum api-version: 2020-06-01.") + supportAutomaticPlacement?: boolean; + + @doc("Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01.") + additionalCapabilities?: DedicatedHostGroupPropertiesAdditionalCapabilities; +} + +model DedicatedHostGroupInstanceView { + @doc("List of instance view of the dedicated hosts under the dedicated host group.") + hosts?: DedicatedHostInstanceViewWithName[]; +} + +@doc("The instance view of a dedicated host that includes the name of the dedicated host. It is used for the response to the instance view of a dedicated host group.") +model DedicatedHostInstanceViewWithName extends DedicatedHostInstanceView { + @doc("The name of the dedicated host.") + @visibility("read") + name?: string; +} + +@doc("The instance view of a dedicated host.") +model DedicatedHostInstanceView { + @doc("Specifies the unique id of the dedicated physical machine on which the dedicated host resides.") + @visibility("read") + assetId?: string; + + @doc("Unutilized capacity of the dedicated host.") + availableCapacity?: DedicatedHostAvailableCapacity; + + @doc("The resource status information.") + statuses?: InstanceViewStatus[]; +} + +@doc("Dedicated host unutilized capacity.") +model DedicatedHostAvailableCapacity { + @doc("The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the dedicated host.") + allocatableVMs?: DedicatedHostAllocatableVM[]; +} + +@doc("Represents the dedicated host unutilized capacity in terms of a specific VM size.") +model DedicatedHostAllocatableVM { + @doc("VM size in terms of which the unutilized capacity is represented.") + vmSize?: string; + + @doc("Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity.") + count?: float32; +} + +@doc("Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01.") +model DedicatedHostGroupPropertiesAdditionalCapabilities { + @doc("The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature. **Note:** The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal. Minimum api-version: 2022-03-01.") + ultraSSDEnabled?: boolean; +} + +@doc("Properties of the dedicated host.") +model DedicatedHostProperties { + @doc("Fault domain of the dedicated host within a dedicated host group.") + platformFaultDomain?: int32; + + @doc("Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided.") + autoReplaceOnFailure?: boolean; + + @doc("A unique id generated and assigned to the dedicated host by the platform. Does not change throughout the lifetime of the host.") + @visibility("read") + hostId?: string; + + @doc("A list of references to all virtual machines in the Dedicated Host.") + @visibility("read") + virtualMachines?: SubResourceReadOnly[]; + + @doc("Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.** The default value is: **None.**") + licenseType?: DedicatedHostLicenseTypes; + + @doc("The date when the host was first provisioned.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + provisioningTime?: utcDateTime; + + @doc("The provisioning state, which only appears in the response.") + @visibility("read") + provisioningState?: string; + + @doc("The dedicated host instance view.") + @visibility("read") + instanceView?: DedicatedHostInstanceView; + + @doc("Specifies the time at which the Dedicated Host resource was created. Minimum api-version: 2021-11-01.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timeCreated?: utcDateTime; +} + +@doc("The List Dedicated Host sizes operation response.") +@pagedResult +model DedicatedHostSizeListResult { + @doc("The list of dedicated host sizes.") + @items + value?: string[]; +} + +@doc("Properties of the SSH public key.") +model SshPublicKeyResourceProperties { + @doc("SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.") + publicKey?: string; +} + +@doc("Response from generation of an SSH key pair.") +model SshPublicKeyGenerateKeyPairResult { + @doc("Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret.") + privateKey: string; + + @doc("Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format.") + publicKey: string; + + @doc("The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName}") + id: string; +} + +@doc("Describes the properties of an Image.") +model ImageProperties { + @doc("The source virtual machine from which Image is created.") + sourceVirtualMachine?: SubResource; + + @doc("Specifies the storage settings for the virtual machine disks.") + storageProfile?: ImageStorageProfile; + + @doc("The provisioning state.") + @visibility("read") + provisioningState?: string; + + @doc("Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.") + hyperVGeneration?: HyperVGenerationTypes; +} + +@doc("Describes a storage profile.") +model ImageStorageProfile { + @doc("Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).") + osDisk?: ImageOSDisk; + + @doc("Specifies the parameters that are used to add a data disk to a virtual machine.

    For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).") + dataDisks?: ImageDataDisk[]; + + @doc("Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).") + zoneResilient?: boolean; +} + +@doc("Describes an Operating System disk.") +model ImageOSDisk extends ImageDisk { + @doc("This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: **Windows,** **Linux.**") + osType: OperatingSystemTypes; + + @doc("The OS State. For managed images, use Generalized.") + osState: OperatingSystemStateTypes; +} + +@doc("Describes a image disk.") +model ImageDisk { + @doc("The snapshot.") + snapshot?: SubResource; + + @doc("The managedDisk.") + managedDisk?: SubResource; + + @doc("The Virtual Hard Disk.") + blobUri?: string; + + @doc("Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**") + caching?: CachingTypes; + + @doc("Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.") + diskSizeGB?: int32; + + @doc("Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.") + storageAccountType?: StorageAccountTypes; + + @doc("Specifies the customer managed disk encryption set resource id for the managed image disk.") + diskEncryptionSet?: DiskEncryptionSetParameters; +} + +@doc("Describes a data disk.") +model ImageDataDisk extends ImageDisk { + @doc("Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.") + lun: int32; +} + +@doc("The restore point collection properties.") +model RestorePointCollectionProperties { + @doc("The properties of the source resource that this restore point collection is created from.") + source?: RestorePointCollectionSourceProperties; + + @doc("The provisioning state of the restore point collection.") + @visibility("read") + provisioningState?: string; + + @doc("The unique id of the restore point collection.") + @visibility("read") + restorePointCollectionId?: string; + + @doc("A list containing all restore points created under this restore point collection.") + @visibility("read") + restorePoints?: RestorePoint[]; +} + +@doc("The properties of the source resource that this restore point collection is created from.") +model RestorePointCollectionSourceProperties { + @doc("Location of the source resource used to create this restore point collection.") + @visibility("read") + location?: string; + + @doc("Resource Id of the source resource used to create this restore point collection") + id?: string; +} + +@doc("The restore point properties.") +model RestorePointProperties { + @doc("List of disk resource ids that the customer wishes to exclude from the restore point. If no disks are specified, all disks will be included.") + excludeDisks?: ApiEntityReference[]; + + @doc("Gets the details of the VM captured at the time of the restore point creation.") + sourceMetadata?: RestorePointSourceMetadata; + + @doc("Gets the provisioning state of the restore point.") + @visibility("read") + provisioningState?: string; + + @doc("ConsistencyMode of the RestorePoint. Can be specified in the input while creating a restore point. For now, only CrashConsistent is accepted as a valid input. Please refer to https://aka.ms/RestorePoints for more details.") + consistencyMode?: ConsistencyModeTypes; + + @doc("Gets the creation time of the restore point.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timeCreated?: utcDateTime; + + @doc("Resource Id of the source restore point from which a copy needs to be created.") + sourceRestorePoint?: ApiEntityReference; + + @doc("The restore point instance view.") + @visibility("read") + instanceView?: RestorePointInstanceView; +} + +@doc("Describes the properties of the Virtual Machine for which the restore point was created. The properties provided are a subset and the snapshot of the overall Virtual Machine properties captured at the time of the restore point creation.") +model RestorePointSourceMetadata { + @doc("Gets the hardware profile.") + @visibility("read") + hardwareProfile?: HardwareProfile; + + @doc("Gets the storage profile.") + storageProfile?: RestorePointSourceVMStorageProfile; + + @doc("Gets the OS profile.") + @visibility("read") + osProfile?: OSProfile; + + @doc("Gets the diagnostics profile.") + @visibility("read") + diagnosticsProfile?: DiagnosticsProfile; + + @doc("Gets the license type, which is for bring your own license scenario.") + @visibility("read") + licenseType?: string; + + @doc("Gets the virtual machine unique id.") + @visibility("read") + vmId?: string; + + @doc("Gets the security profile.") + @visibility("read") + securityProfile?: SecurityProfile; + + @doc("Location of the VM from which the restore point was created.") + @visibility("read") + location?: string; + + @doc("UserData associated with the source VM for which restore point is captured, which is a base-64 encoded value.") + @visibility("read") + userData?: string; + + @doc("HyperVGeneration of the source VM for which restore point is captured.") + @visibility("read") + hyperVGeneration?: HyperVGenerationTypes; +} + +@doc("Describes the storage profile.") +model RestorePointSourceVMStorageProfile { + @doc("Gets the OS disk of the VM captured at the time of the restore point creation.") + osDisk?: RestorePointSourceVmosDisk; + + @doc("Gets the data disks of the VM captured at the time of the restore point creation.") + @projectedName("json", "dataDisks") + dataDiskList?: RestorePointSourceVMDataDisk[]; +} + +@doc("Describes an Operating System disk.") +model RestorePointSourceVmosDisk { + @doc("Gets the Operating System type.") + @visibility("read") + osType?: OperatingSystemType; + + @doc("Gets the disk encryption settings.") + @visibility("read") + encryptionSettings?: DiskEncryptionSettings; + + @doc("Gets the disk name.") + @visibility("read") + name?: string; + + @doc("Gets the caching type.") + @visibility("read") + caching?: CachingTypes; + + @doc("Gets the disk size in GB.") + @visibility("read") + diskSizeGB?: int32; + + @doc("Gets the managed disk details") + managedDisk?: ManagedDiskParameters; + + @doc("Contains Disk Restore Point properties.") + diskRestorePoint?: DiskRestorePointAttributes; + + @doc("Shows true if the disk is write-accelerator enabled.") + @visibility("read") + writeAcceleratorEnabled?: boolean; +} + +@doc("Disk Restore Point details.") +model DiskRestorePointAttributes extends SubResourceReadOnly { + @doc("Encryption at rest settings for disk restore point. It is an optional property that can be specified in the input while creating a restore point.") + encryption?: RestorePointEncryption; + + @doc("Resource Id of the source disk restore point.") + sourceDiskRestorePoint?: ApiEntityReference; +} + +@doc("Encryption at rest settings for disk restore point. It is an optional property that can be specified in the input while creating a restore point.") +model RestorePointEncryption { + @doc("Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. **Note:** The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.") + diskEncryptionSet?: DiskEncryptionSetParameters; + + @doc("The type of key used to encrypt the data of the disk restore point.") + type?: RestorePointEncryptionType; +} + +@doc("Describes a data disk.") +model RestorePointSourceVMDataDisk { + @doc("Gets the logical unit number.") + @visibility("read") + lun?: int32; + + @doc("Gets the disk name.") + @visibility("read") + name?: string; + + @doc("Gets the caching type.") + @visibility("read") + caching?: CachingTypes; + + @doc("Gets the initial disk size in GB for blank data disks, and the new desired size for existing OS and Data disks.") + @visibility("read") + diskSizeGB?: int32; + + @doc("Contains the managed disk details.") + managedDisk?: ManagedDiskParameters; + + @doc("Contains Disk Restore Point properties.") + diskRestorePoint?: DiskRestorePointAttributes; + + @doc("Shows true if the disk is write-accelerator enabled.") + @visibility("read") + writeAcceleratorEnabled?: boolean; +} + +@doc("The instance view of a restore point.") +model RestorePointInstanceView { + @doc("The disk restore points information.") + diskRestorePoints?: DiskRestorePointInstanceView[]; + + @doc("The resource status information.") + statuses?: InstanceViewStatus[]; +} + +@doc("The instance view of a disk restore point.") +model DiskRestorePointInstanceView { + @doc("Disk restore point Id.") + id?: string; + + @doc("The disk restore point replication status information.") + replicationStatus?: DiskRestorePointReplicationStatus; +} + +@doc("The instance view of a disk restore point.") +model DiskRestorePointReplicationStatus { + @doc("The resource status information.") + status?: InstanceViewStatus; + + @doc("Replication completion percentage.") + completionPercent?: int32; +} + +@doc("capacity reservation group Properties.") +model CapacityReservationGroupProperties { + @doc("A list of all capacity reservation resource ids that belong to capacity reservation group.") + @visibility("read") + capacityReservations?: SubResourceReadOnly[]; + + @doc("A list of references to all virtual machines associated to the capacity reservation group.") + @visibility("read") + virtualMachinesAssociated?: SubResourceReadOnly[]; + + @doc("The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group.") + @visibility("read") + instanceView?: CapacityReservationGroupInstanceView; +} + +model CapacityReservationGroupInstanceView { + @doc("List of instance view of the capacity reservations under the capacity reservation group.") + @visibility("read") + capacityReservations?: CapacityReservationInstanceViewWithName[]; +} + +@doc("The instance view of a capacity reservation that includes the name of the capacity reservation. It is used for the response to the instance view of a capacity reservation group.") +model CapacityReservationInstanceViewWithName + extends CapacityReservationInstanceView { + @doc("The name of the capacity reservation.") + @visibility("read") + name?: string; +} + +@doc("The instance view of a capacity reservation that provides as snapshot of the runtime properties of the capacity reservation that is managed by the platform and can change outside of control plane operations.") +model CapacityReservationInstanceView { + @doc("Unutilized capacity of the capacity reservation.") + utilizationInfo?: CapacityReservationUtilization; + + @doc("The resource status information.") + statuses?: InstanceViewStatus[]; +} + +@doc("Represents the capacity reservation utilization in terms of resources allocated.") +model CapacityReservationUtilization { + @doc("The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed. Minimum api-version: 2022-08-01.") + @visibility("read") + currentCapacity?: int32; + + @doc("A list of all virtual machines resource ids allocated against the capacity reservation.") + @visibility("read") + virtualMachinesAllocated?: SubResourceReadOnly[]; +} + +@doc("Properties of the Capacity reservation.") +model CapacityReservationProperties { + @doc("A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource.") + @visibility("read") + reservationId?: string; + + @doc("Specifies the value of fault domain count that Capacity Reservation supports for requested VM size. **Note:** The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation. Minimum api-version: 2022-08-01.") + @visibility("read") + platformFaultDomainCount?: int32; + + @doc("A list of all virtual machine resource ids that are associated with the capacity reservation.") + @visibility("read") + virtualMachinesAssociated?: SubResourceReadOnly[]; + + @doc("The date time when the capacity reservation was last updated.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + provisioningTime?: utcDateTime; + + @doc("The provisioning state, which only appears in the response.") + @visibility("read") + provisioningState?: string; + + @doc("The Capacity reservation instance view.") + @visibility("read") + instanceView?: CapacityReservationInstanceView; + + @doc("Specifies the time at which the Capacity Reservation resource was created. Minimum api-version: 2021-11-01.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timeCreated?: utcDateTime; +} + +@doc("Api request input for LogAnalytics getRequestRateByInterval Api.") +model RequestRateByIntervalInput extends LogAnalyticsInputBase { + @doc("Interval value in minutes used to create LogAnalytics call rate logs.") + intervalLength: IntervalInMins; +} + +@doc("Api input base class for LogAnalytics Api.") +model LogAnalyticsInputBase { + @doc("SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.") + blobContainerSasUri: string; + + @doc("From time of the query") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + fromTime: utcDateTime; + + @doc("To time of the query") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + toTime: utcDateTime; + + @doc("Group query result by Throttle Policy applied.") + groupByThrottlePolicy?: boolean; + + @doc("Group query result by Operation Name.") + groupByOperationName?: boolean; + + @doc("Group query result by Resource Name.") + groupByResourceName?: boolean; + + @doc("Group query result by Client Application ID.") + groupByClientApplicationId?: boolean; + + @doc("Group query result by User Agent.") + groupByUserAgent?: boolean; +} + +@doc("LogAnalytics operation status response") +model LogAnalyticsOperationResult { + @doc("LogAnalyticsOutput") + @visibility("read") + properties?: LogAnalyticsOutput; +} + +@doc("LogAnalytics output properties") +model LogAnalyticsOutput { + @doc("Output file Uri path to blob container.") + @visibility("read") + output?: string; +} + +@doc("Api request input for LogAnalytics getThrottledRequests Api.") +model ThrottledRequestsInput extends LogAnalyticsInputBase {} + +@doc("Describes the properties of a Run Command metadata.") +model RunCommandDocumentBase { + @doc("The VM run command schema.") + @projectedName("json", "$schema") + schema: string; + + @doc("The VM run command id.") + id: string; + + @doc("The Operating System type.") + osType: OperatingSystemTypes; + + @doc("The VM run command label.") + label: string; + + @doc("The VM run command description.") + description: string; +} + +@doc("Describes the properties of a Run Command.") +model RunCommandDocument extends RunCommandDocumentBase { + @doc("The script to be executed.") + script: string[]; + + @doc("The parameters used by the script.") + parameters?: RunCommandParameterDefinition[]; +} + +@doc("Describes the properties of a run command parameter.") +model RunCommandParameterDefinition { + @doc("The run command parameter name.") + name: string; + + @doc("The run command parameter type.") + type: string; + + @doc("The run command parameter default value.") + defaultValue?: string; + + @doc("The run command parameter required.") + required?: boolean; +} + +@doc("Capture Virtual Machine parameters.") +model RunCommandInput { + @doc("The run command id.") + commandId: string; + + @doc("Optional. The script to be executed. When this value is given, the given script will override the default script of the command.") + script?: string[]; + + @doc("The run command parameters.") + parameters?: RunCommandInputParameter[]; +} + +@doc("Describes the properties of a run command parameter.") +model RunCommandInputParameter { + @doc("The run command parameter name.") + name: string; + + @doc("The run command parameter value.") + value: string; +} + +model RunCommandResult { + @doc("Run command operation response.") + value?: InstanceViewStatus[]; +} + +@doc("Describes the properties of a Virtual Machine run command.") +model VirtualMachineRunCommandProperties { + @doc("The source of the run command script.") + source?: VirtualMachineRunCommandScriptSource; + + @doc("The parameters used by the script.") + parameters?: RunCommandInputParameter[]; + + @doc("The parameters used by the script.") + protectedParameters?: RunCommandInputParameter[]; + + @doc("Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.") + asyncExecution?: boolean; + + @doc("Specifies the user account on the VM when executing the run command.") + runAsUser?: string; + + @doc("Specifies the user account password on the VM when executing the run command.") + runAsPassword?: string; + + @doc("The timeout in seconds to execute the run command.") + timeoutInSeconds?: int32; + + @doc("Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. ") + outputBlobUri?: string; + + @doc("Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter.") + errorBlobUri?: string; + + @doc("User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged ") + outputBlobManagedIdentity?: RunCommandManagedIdentity; + + @doc("User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged ") + errorBlobManagedIdentity?: RunCommandManagedIdentity; + + @doc("The provisioning state, which only appears in the response. If treatFailureAsDeploymentFailure set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If treatFailureAsDeploymentFailure set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results ") + @visibility("read") + provisioningState?: string; + + @doc("The virtual machine run command instance view.") + @visibility("read") + instanceView?: VirtualMachineRunCommandInstanceView; + + @doc("Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results ") + treatFailureAsDeploymentFailure?: boolean; +} + +@doc("Describes the script sources for run command. Use only one of script, scriptUri, commandId.") +model VirtualMachineRunCommandScriptSource { + @doc("Specifies the script content to be executed on the VM.") + script?: string; + + @doc("Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.") + scriptUri?: string; + + @doc("Specifies a commandId of predefined built-in script.") + commandId?: string; + + @doc("User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged.") + scriptUriManagedIdentity?: RunCommandManagedIdentity; +} + +@doc(" Contains clientId or objectId (use only one, not both) of a user-assigned managed identity that has access to storage blob used in Run Command. Use an empty RunCommandManagedIdentity object in case of system-assigned identity. Make sure the Azure storage blob exists in case of scriptUri, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment with scriptUri blob and 'Storage Blob Data Contributor' for Append blobs(outputBlobUri, errorBlobUri). In case of user assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged.") +model RunCommandManagedIdentity { + @doc("Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided.") + clientId?: string; + + @doc("Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided.") + objectId?: string; +} + +@doc("The instance view of a virtual machine run command.") +model VirtualMachineRunCommandInstanceView { + @doc("Script execution status.") + executionState?: ExecutionState; + + @doc("Communicate script configuration errors or execution messages.") + executionMessage?: string; + + @doc("Exit code returned from script execution.") + exitCode?: int32; + + @doc("Script output stream.") + output?: string; + + @doc("Script error stream.") + error?: string; + + @doc("Script start time.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startTime?: utcDateTime; + + @doc("Script end time.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endTime?: utcDateTime; + + @doc("The resource status information.") + statuses?: InstanceViewStatus[]; +} + +@doc("The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS.") +model DiskSku { + @doc("The sku name.") + name?: DiskStorageAccountTypes; + + @doc("The sku tier.") + @visibility("read") + tier?: string; +} + +@doc("Disk resource properties.") +model DiskProperties { + @doc("The time when the disk was created.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timeCreated?: utcDateTime; + + @doc("The Operating System type.") + osType?: OperatingSystemTypes; + + @doc("The hypervisor generation of the Virtual Machine. Applicable to OS disks only.") + hyperVGeneration?: HyperVGeneration; + + @doc("Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}") + purchasePlan?: DiskPurchasePlan; + + @doc("List of supported capabilities for the image from which the OS disk was created.") + supportedCapabilities?: SupportedCapabilities; + + @doc("Disk source information. CreationData information cannot be changed after the disk has been created.") + creationData: CreationData; + + @doc("If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.") + diskSizeGB?: int32; + + @doc("The size of the disk in bytes. This field is read only.") + @visibility("read") + diskSizeBytes?: int32; + + @doc("Unique Guid identifying the resource.") + @visibility("read") + uniqueId?: string; + + @doc("Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.") + encryptionSettingsCollection?: EncryptionSettingsCollection; + + @doc("The disk provisioning state.") + @visibility("read") + provisioningState?: string; + + @doc("The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.") + @projectedName("json", "diskIOPSReadWrite") + diskIopsReadWrite?: int32; + + @doc("The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.") + diskMBpsReadWrite?: int32; + + @doc("The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.") + @projectedName("json", "diskIOPSReadOnly") + diskIopsReadOnly?: int32; + + @doc("The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.") + diskMBpsReadOnly?: int32; + + @doc("The state of the disk.") + @visibility("read") + diskState?: DiskState; + + @doc("Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.") + encryption?: Encryption; + + @doc("The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.") + maxShares?: int32; + + @doc("Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.") + @visibility("read") + shareInfo?: ShareInfoElement[]; + + @doc("Policy for accessing the disk via network.") + networkAccessPolicy?: NetworkAccessPolicy; + + @doc("ARM id of the DiskAccess resource for using private endpoints on disks.") + diskAccessId?: string; + + @doc("Latest time when bursting was last enabled on a disk.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + burstingEnabledTime?: utcDateTime; + + @doc("Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.") + tier?: string; + + @doc("Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.") + burstingEnabled?: boolean; + + @doc("Properties of the disk for which update is pending.") + @visibility("read") + propertyUpdatesInProgress?: PropertyUpdatesInProgress; + + @doc("Indicates the OS on a disk supports hibernation.") + supportsHibernation?: boolean; + + @doc("Contains the security related information for the resource.") + securityProfile?: DiskSecurityProfile; + + @doc("Percentage complete for the background copy when a resource is created via the CopyStart operation.") + completionPercent?: float32; + + @doc("Policy for controlling export on the disk.") + publicNetworkAccess?: PublicNetworkAccess; + + @doc("Additional authentication requirements when exporting or uploading to a disk or snapshot.") + dataAccessAuthMode?: DataAccessAuthMode; + + @doc("Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine.") + optimizedForFrequentAttach?: boolean; + + @doc("The UTC time when the ownership state of the disk was last changed i.e., the time the disk was last attached or detached from a VM or the time when the VM to which the disk was attached was deallocated or started.") + @visibility("read") + @projectedName("json", "LastOwnershipUpdateTime") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastOwnershipUpdateTime?: utcDateTime; +} + +@doc("Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.") +model DiskPurchasePlan { + @doc("The plan ID.") + name: string; + + @doc("The publisher ID.") + publisher: string; + + @doc("Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.") + product: string; + + @doc("The Offer Promotion Code.") + promotionCode?: string; +} + +@doc("List of supported capabilities persisted on the disk resource for VM use.") +model SupportedCapabilities { + @doc("The disk controllers that an OS disk supports. If set it can be SCSI or SCSI, NVME or NVME, SCSI.") + diskControllerTypes?: string; + + @doc("True if the image from which the OS disk is created supports accelerated networking.") + acceleratedNetwork?: boolean; + + @doc("CPU architecture supported by an OS disk.") + architecture?: Architecture; +} + +@doc("Data used when creating a disk.") +model CreationData { + @doc("This enumerates the possible sources of a disk's creation.") + createOption: DiskCreateOption; + + @doc("Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.") + storageAccountId?: string; + + @doc("Disk source information for PIR or user images.") + imageReference?: ImageDiskReference; + + @doc("Required if creating from a Gallery Image. The id/sharedGalleryImageId/communityGalleryImageId of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.") + galleryImageReference?: ImageDiskReference; + + @doc("If createOption is Import, this is the URI of a blob to be imported into a managed disk.") + sourceUri?: string; + + @doc("If createOption is Copy, this is the ARM id of the source snapshot or disk.") + sourceResourceId?: string; + + @doc("If this field is set, this is the unique id identifying the source of this resource.") + @visibility("read") + sourceUniqueId?: string; + + @doc("If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).") + uploadSizeBytes?: int32; + + @doc("Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.") + logicalSectorSize?: int32; + + @doc("If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state.") + securityDataUri?: string; + + @doc("Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled.") + performancePlus?: boolean; + + @doc("Required if createOption is CopyFromSanSnapshot. This is the ARM id of the source elastic san volume snapshot.") + elasticSanResourceId?: string; +} + +@doc("The source image used for creating the disk.") +model ImageDiskReference { + @doc("A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference.") + id?: string; + + @doc("A relative uri containing a direct shared Azure Compute Gallery image reference.") + sharedGalleryImageId?: string; + + @doc("A relative uri containing a community Azure Compute Gallery image reference.") + communityGalleryImageId?: string; + + @doc("If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.") + lun?: int32; +} + +@doc("Encryption settings for disk or snapshot") +model EncryptionSettingsCollection { + @doc("Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged.") + enabled: boolean; + + @doc("A collection of encryption settings, one for each disk volume.") + encryptionSettings?: EncryptionSettingsElement[]; + + @doc("Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption.") + encryptionSettingsVersion?: string; +} + +@doc("Encryption settings for one disk volume.") +model EncryptionSettingsElement { + @doc("Key Vault Secret Url and vault id of the disk encryption key") + diskEncryptionKey?: KeyVaultAndSecretReference; + + @doc("Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key.") + keyEncryptionKey?: KeyVaultAndKeyReference; +} + +@doc("Key Vault Secret Url and vault id of the encryption key ") +model KeyVaultAndSecretReference { + @doc("Resource id of the KeyVault containing the key or secret") + sourceVault: SourceVault; + + @doc("Url pointing to a key or secret in KeyVault") + secretUrl: string; +} + +@doc("The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}") +model SourceVault { + @doc("Resource Id") + id?: string; +} + +@doc("Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey") +model KeyVaultAndKeyReference { + @doc("Resource id of the KeyVault containing the key or secret") + sourceVault: SourceVault; + + @doc("Url pointing to a key or secret in KeyVault") + keyUrl: string; +} + +@doc("Encryption at rest settings for disk or snapshot") +model Encryption { + @doc("ResourceId of the disk encryption set to use for enabling encryption at rest.") + diskEncryptionSetId?: string; + + @doc("The type of key used to encrypt the data of the disk.") + type?: EncryptionType; +} + +model ShareInfoElement { + @doc("A relative URI containing the ID of the VM that has the disk attached.") + @visibility("read") + vmUri?: string; +} + +@doc("Properties of the disk for which update is pending.") +model PropertyUpdatesInProgress { + @doc("The target performance tier of the disk if a tier change operation is in progress.") + targetTier?: string; +} + +@doc("Contains the security related information for the resource.") +model DiskSecurityProfile { + @doc("Specifies the SecurityType of the VM. Applicable for OS disks only.") + securityType?: DiskSecurityTypes; + + @doc("ResourceId of the disk encryption set associated to Confidential VM supported disk encrypted with customer managed key") + secureVMDiskEncryptionSetId?: string; +} + +@doc("Data used for requesting a SAS.") +model GrantAccessData { + @doc("The Access Level, accepted values include None, Read, Write.") + access: AccessLevel; + + @doc("Time duration in seconds until the SAS access expires.") + durationInSeconds: int32; + + @doc("Set this flag to true to get additional SAS for VM guest state") + getSecureVMGuestStateSAS?: boolean; + + @doc("Used to specify the file format when making request for SAS on a VHDX file format snapshot") + fileFormat?: FileFormat; +} + +@doc("A disk access SAS uri.") +model AccessUri { + @doc("A SAS uri for accessing a disk.") + @visibility("read") + accessSAS?: string; + + @doc("A SAS uri for accessing a VM guest state.") + @visibility("read") + securityDataAccessSAS?: string; +} + +model DiskAccessProperties { + @doc("A readonly collection of private endpoint connections created on the disk. Currently only one endpoint connection is supported.") + @visibility("read") + privateEndpointConnections?: PrivateEndpointConnection[]; + + @doc("The disk access resource provisioning state.") + @visibility("read") + provisioningState?: string; + + @doc("The time when the disk access was created.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timeCreated?: utcDateTime; +} + +@doc("Properties of the PrivateEndpointConnectProperties.") +model PrivateEndpointConnectionProperties { + @doc("The resource of private end point.") + @visibility("read") + privateEndpoint?: PrivateEndpoint; + + @doc("A collection of information about the state of the connection between DiskAccess and Virtual Network.") + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + + @doc("The provisioning state of the private endpoint connection resource.") + @visibility("read") + provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +@doc("The Private Endpoint resource.") +model PrivateEndpoint { + @doc("The ARM identifier for Private Endpoint") + @visibility("read") + id?: string; +} + +@doc("A collection of information about the state of the connection between service consumer and provider.") +model PrivateLinkServiceConnectionState { + @doc("Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.") + status?: PrivateEndpointServiceConnectionStatus; + + @doc("The reason for approval/rejection of the connection.") + description?: string; + + @doc("A message indicating if changes on the service provider require any updates on the consumer.") + actionsRequired?: string; +} + +@doc("A list of private link resources") +model PrivateLinkResourceListResult { + @doc("Array of private link resources") + value?: PrivateLinkResource[]; +} + +@doc("A private link resource") +model PrivateLinkResource { + @doc("Resource properties.") + properties?: PrivateLinkResourceProperties; + + @doc("private link resource Id") + @visibility("read") + id?: string; + + @doc("private link resource name") + @visibility("read") + name?: string; + + @doc("private link resource type") + @visibility("read") + type?: string; +} + +@doc("Properties of a private link resource.") +model PrivateLinkResourceProperties { + @doc("The private link resource group id.") + @visibility("read") + groupId?: string; + + @doc("The private link resource required member names.") + @visibility("read") + requiredMembers?: string[]; + + @doc("The private link resource DNS zone name.") + requiredZoneNames?: string[]; +} + +@doc("The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks.") +model EncryptionSetIdentity { + @doc("The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys.") + type?: DiskEncryptionSetIdentityType; + + @doc("The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity") + @visibility("read") + principalId?: string; + + @doc("The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity") + @visibility("read") + tenantId?: string; + + @doc("The list of user identities associated with the disk encryption set. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.") + userAssignedIdentities?: Record; +} + +model EncryptionSetProperties { + @doc("The type of key used to encrypt the data of the disk.") + encryptionType?: DiskEncryptionSetType; + + @doc("The key vault key which is currently used by this disk encryption set.") + activeKey?: KeyForDiskEncryptionSet; + + @doc("A readonly collection of key vault keys previously used by this disk encryption set while a key rotation is in progress. It will be empty if there is no ongoing key rotation.") + @visibility("read") + previousKeys?: KeyForDiskEncryptionSet[]; + + @doc("The disk encryption set provisioning state.") + @visibility("read") + provisioningState?: string; + + @doc("Set this flag to true to enable auto-updating of this disk encryption set to the latest key version.") + rotationToLatestKeyVersionEnabled?: boolean; + + @doc("The time when the active key of this disk encryption set was updated.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastKeyRotationTimestamp?: utcDateTime; + + @doc("The error that was encountered during auto-key rotation. If an error is present, then auto-key rotation will not be attempted until the error on this disk encryption set is fixed.") + @visibility("read") + autoKeyRotationError?: ApiError; + + @doc("Multi-tenant application client id to access key vault in a different tenant. Setting the value to 'None' will clear the property.") + federatedClientId?: string; +} + +@doc("Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots") +model KeyForDiskEncryptionSet { + @doc("Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption Set subscription.") + sourceVault?: SourceVault; + + @doc("Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of rotationToLatestKeyVersionEnabled value.") + keyUrl: string; +} + +@doc("The List resources which are encrypted with the disk encryption set.") +model ResourceUriList is Azure.Core.Page; + +@doc("Properties of an incremental disk restore point") +model DiskRestorePointProperties { + @doc("The timestamp of restorePoint creation") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timeCreated?: utcDateTime; + + @doc("arm id of source disk or source disk restore point.") + @visibility("read") + sourceResourceId?: string; + + @doc("The Operating System type.") + @visibility("read") + osType?: OperatingSystemTypes; + + @doc("The hypervisor generation of the Virtual Machine. Applicable to OS disks only.") + hyperVGeneration?: HyperVGeneration; + + @doc("Purchase plan information for the the image from which the OS disk was created.") + purchasePlan?: DiskPurchasePlan; + + @doc("List of supported capabilities for the image from which the OS disk was created.") + supportedCapabilities?: SupportedCapabilities; + + @doc("id of the backing snapshot's MIS family") + @visibility("read") + familyId?: string; + + @doc("unique incarnation id of the source disk") + @visibility("read") + sourceUniqueId?: string; + + @doc("Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.") + @visibility("read") + encryption?: Encryption; + + @doc("Indicates the OS on a disk supports hibernation.") + supportsHibernation?: boolean; + + @doc("Policy for accessing the disk via network.") + networkAccessPolicy?: NetworkAccessPolicy; + + @doc("Policy for controlling export on the disk.") + publicNetworkAccess?: PublicNetworkAccess; + + @doc("ARM id of the DiskAccess resource for using private endpoints on disks.") + diskAccessId?: string; + + @doc("Percentage complete for the background copy of disk restore point when source resource is from a different region.") + completionPercent?: float32; + + @doc("Replication state of disk restore point when source resource is from a different region.") + @visibility("read") + replicationState?: string; + + @doc("Location of source disk or source disk restore point when source resource is from a different region.") + @visibility("read") + sourceResourceLocation?: string; + + @doc("Contains the security related information for the resource.") + securityProfile?: DiskSecurityProfile; +} + +@doc("The ProxyOnly Resource model definition.") +model ProxyOnlyResource { + @doc("Resource Id") + @visibility("read") + id?: string; + + @doc("Resource name") + @visibility("read") + name?: string; + + @doc("Resource type") + @visibility("read") + type?: string; +} + +@doc("The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot") +model SnapshotSku { + @doc("The sku name.") + name?: SnapshotStorageAccountTypes; + + @doc("The sku tier.") + @visibility("read") + tier?: string; +} + +@doc("Snapshot resource properties.") +model SnapshotProperties { + @doc("The time when the snapshot was created.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timeCreated?: utcDateTime; + + @doc("The Operating System type.") + osType?: OperatingSystemTypes; + + @doc("The hypervisor generation of the Virtual Machine. Applicable to OS disks only.") + hyperVGeneration?: HyperVGeneration; + + @doc("Purchase plan information for the image from which the source disk for the snapshot was originally created.") + purchasePlan?: DiskPurchasePlan; + + @doc("List of supported capabilities for the image from which the source disk from the snapshot was originally created.") + supportedCapabilities?: SupportedCapabilities; + + @doc("Disk source information. CreationData information cannot be changed after the disk has been created.") + creationData: CreationData; + + @doc("If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.") + diskSizeGB?: int32; + + @doc("The size of the disk in bytes. This field is read only.") + @visibility("read") + diskSizeBytes?: int32; + + @doc("The state of the snapshot.") + @visibility("read") + diskState?: DiskState; + + @doc("Unique Guid identifying the resource.") + @visibility("read") + uniqueId?: string; + + @doc("Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.") + encryptionSettingsCollection?: EncryptionSettingsCollection; + + @doc("The disk provisioning state.") + @visibility("read") + provisioningState?: string; + + @doc("Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed.") + incremental?: boolean; + + @doc("Incremental snapshots for a disk share an incremental snapshot family id. The Get Page Range Diff API can only be called on incremental snapshots with the same family id.") + @visibility("read") + incrementalSnapshotFamilyId?: string; + + @doc("Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.") + encryption?: Encryption; + + @doc("Policy for accessing the disk via network.") + networkAccessPolicy?: NetworkAccessPolicy; + + @doc("ARM id of the DiskAccess resource for using private endpoints on disks.") + diskAccessId?: string; + + @doc("Contains the security related information for the resource.") + securityProfile?: DiskSecurityProfile; + + @doc("Indicates the OS on a snapshot supports hibernation.") + supportsHibernation?: boolean; + + @doc("Policy for controlling export on the disk.") + publicNetworkAccess?: PublicNetworkAccess; + + @doc("Percentage complete for the background copy when a resource is created via the CopyStart operation.") + completionPercent?: float32; + + @doc("Indicates the error details if the background copy of a resource created via the CopyStart operation fails.") + copyCompletionError?: CopyCompletionError; + + @doc("Additional authentication requirements when exporting or uploading to a disk or snapshot.") + dataAccessAuthMode?: DataAccessAuthMode; +} + +@doc("Indicates the error details if the background copy of a resource created via the CopyStart operation fails.") +model CopyCompletionError { + @doc("Indicates the error code if the background copy of a resource created via the CopyStart operation fails.") + errorCode: CopyCompletionErrorReason; + + @doc("Indicates the error message if the background copy of a resource created via the CopyStart operation fails.") + errorMessage: string; +} + +@doc("The List Resource Skus operation response.") +model ResourceSkusResult is Azure.Core.Page; + +@doc("Describes scaling information of a SKU.") +model ResourceSkuCapacity { + @doc("The minimum capacity.") + @visibility("read") + minimum?: int32; + + @doc("The maximum capacity that can be set.") + @visibility("read") + maximum?: int32; + + @doc("The default capacity.") + @visibility("read") + default?: int32; + + @doc("The scale type applicable to the sku.") + @visibility("read") + scaleType?: ResourceSkuCapacityScaleType; +} + +@doc("Describes an available Compute SKU Location Information.") +model ResourceSkuLocationInfo { + @doc("Location of the SKU") + @visibility("read") + location?: string; + + @doc("List of availability zones where the SKU is supported.") + @visibility("read") + zones?: string[]; + + @doc("Details of capabilities available to a SKU in specific zones.") + @visibility("read") + zoneDetails?: ResourceSkuZoneDetails[]; + + @doc("The names of extended locations.") + @visibility("read") + extendedLocations?: string[]; + + @doc("The type of the extended location.") + @visibility("read") + type?: ExtendedLocationType; +} + +@doc("Describes The zonal capabilities of a SKU.") +model ResourceSkuZoneDetails { + @doc("The set of zones that the SKU is available in with the specified capabilities.") + @visibility("read") + name?: string[]; + + @doc("A list of capabilities that are available for the SKU in the specified list of zones.") + @visibility("read") + capabilities?: ResourceSkuCapabilities[]; +} + +@doc("Describes The SKU capabilities object.") +model ResourceSkuCapabilities { + @doc("An invariant to describe the feature.") + @visibility("read") + name?: string; + + @doc("An invariant if the feature is measured by quantity.") + @visibility("read") + value?: string; +} + +@doc("Describes metadata for retrieving price info.") +model ResourceSkuCosts { + @doc("Used for querying price from commerce.") + @visibility("read") + meterID?: string; + + @doc("The multiplier is needed to extend the base metered cost.") + @visibility("read") + quantity?: int32; + + @doc("An invariant to show the extended unit.") + @visibility("read") + extendedUnit?: string; +} + +@doc("Describes scaling information of a SKU.") +model ResourceSkuRestrictions { + @doc("The type of restrictions.") + @visibility("read") + type?: ResourceSkuRestrictionsType; + + @doc("The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.") + @visibility("read") + values?: string[]; + + @doc("The information about the restriction where the SKU cannot be used.") + @visibility("read") + restrictionInfo?: ResourceSkuRestrictionInfo; + + @doc("The reason for restriction.") + @visibility("read") + reasonCode?: ResourceSkuRestrictionsReasonCode; +} + +@doc("Describes an available Compute SKU Restriction Information.") +model ResourceSkuRestrictionInfo { + @doc("Locations where the SKU is restricted") + @visibility("read") + locations?: string[]; + + @doc("List of availability zones where the SKU is restricted.") + @visibility("read") + zones?: string[]; +} + +@doc("Describes the properties of a Shared Image Gallery.") +model GalleryProperties { + @doc("The description of this Shared Image Gallery resource. This property is updatable.") + description?: string; + + @doc("Describes the gallery unique name.") + identifier?: GalleryIdentifier; + + @doc("The provisioning state, which only appears in the response.") + @visibility("read") + provisioningState?: GalleryProvisioningState; + + @doc("Profile for gallery sharing to subscription or tenant") + sharingProfile?: SharingProfile; + + @doc("Contains information about the soft deletion policy of the gallery.") + softDeletePolicy?: SoftDeletePolicy; + + @doc("Sharing status of current gallery.") + @visibility("read") + sharingStatus?: SharingStatus; +} + +@doc("Describes the gallery unique name.") +model GalleryIdentifier { + @doc("The unique name of the Shared Image Gallery. This name is generated automatically by Azure.") + @visibility("read") + uniqueName?: string; +} + +@doc("Profile for gallery sharing to subscription or tenant") +model SharingProfile { + @doc("This property allows you to specify the permission of sharing gallery.

    Possible values are:

    **Private**

    **Groups**

    **Community**") + permissions?: GallerySharingPermissionTypes; + + @doc("A list of sharing profile groups.") + @visibility("read") + groups?: SharingProfileGroup[]; + + @doc("Information of community gallery if current gallery is shared to community.") + communityGalleryInfo?: CommunityGalleryInfo; +} + +@doc("Group of the gallery sharing profile") +model SharingProfileGroup { + @doc("This property allows you to specify the type of sharing group.

    Possible values are:

    **Subscriptions**

    **AADTenants**") + type?: SharingProfileGroupTypes; + + @doc("A list of subscription/tenant ids the gallery is aimed to be shared to.") + ids?: string[]; +} + +@doc("Information of community gallery if current gallery is shared to community") +model CommunityGalleryInfo { + @doc("The link to the publisher website. Visible to all users.") + publisherUri?: string; + + @doc("Community gallery publisher support email. The email address of the publisher. Visible to all users.") + publisherContact?: string; + + @doc("End-user license agreement for community gallery image.") + eula?: string; + + @doc("The prefix of the gallery name that will be displayed publicly. Visible to all users.") + publicNamePrefix?: string; + + @doc("Contains info about whether community gallery sharing is enabled.") + @visibility("read") + communityGalleryEnabled?: boolean; + + @doc("Community gallery public name list.") + @visibility("read") + publicNames?: string[]; +} + +@doc("Contains information about the soft deletion policy of the gallery.") +model SoftDeletePolicy { + @doc("Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time.") + isSoftDeleteEnabled?: boolean; +} + +@doc("Sharing status of current gallery.") +model SharingStatus { + @doc("Aggregated sharing state of current gallery.") + @visibility("read") + aggregatedState?: SharingState; + + @doc("Summary of all regional sharing status.") + summary?: RegionalSharingStatus[]; +} + +@doc("Gallery regional sharing status") +model RegionalSharingStatus { + @doc("Region name") + region?: string; + + @doc("Gallery sharing state in current region") + @visibility("read") + state?: SharingState; + + @doc("Details of gallery regional sharing failure.") + details?: string; +} + +@doc("The Update Resource model definition.") +model UpdateResourceDefinition { + @doc("Resource Id") + @visibility("read") + id?: string; + + @doc("Resource name") + @visibility("read") + name?: string; + + @doc("Resource type") + @visibility("read") + type?: string; + + @doc("Resource tags") + tags?: Record; +} + +@doc("Describes the properties of a gallery image definition.") +model GalleryImageProperties { + @doc("The description of this gallery image definition resource. This property is updatable.") + description?: string; + + @doc("The Eula agreement for the gallery image definition.") + eula?: string; + + @doc("The privacy statement uri.") + privacyStatementUri?: string; + + @doc("The release note uri.") + releaseNoteUri?: string; + + @doc("This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

    Possible values are:

    **Windows**

    **Linux**") + osType: OperatingSystemTypes; + + @doc("This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'.") + osState: OperatingSystemStateTypes; + + @doc("The hypervisor generation of the Virtual Machine. Applicable to OS disks only.") + hyperVGeneration?: HyperVGeneration; + + @doc("The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endOfLifeDate?: utcDateTime; + + @doc("This is the gallery image definition identifier.") + identifier: GalleryImageIdentifier; + + @doc("The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.") + recommended?: RecommendedMachineConfiguration; + + @doc("Describes the disallowed disk types.") + disallowed?: Disallowed; + + @doc("Describes the gallery image definition purchase plan. This is used by marketplace images.") + purchasePlan?: ImagePurchasePlan; + + @doc("The provisioning state, which only appears in the response.") + @visibility("read") + provisioningState?: GalleryProvisioningState; + + @doc("A list of gallery image features.") + features?: GalleryImageFeature[]; + + @doc("The architecture of the image. Applicable to OS disks only.") + architecture?: Architecture; +} + +@doc("This is the gallery image definition identifier.") +model GalleryImageIdentifier { + @doc("The name of the gallery image definition publisher.") + publisher: string; + + @doc("The name of the gallery image definition offer.") + offer: string; + + @doc("The name of the gallery image definition SKU.") + sku: string; +} + +@doc("The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.") +model RecommendedMachineConfiguration { + @doc("Describes the resource range.") + vCPUs?: ResourceRange; + + @doc("Describes the resource range.") + memory?: ResourceRange; +} + +@doc("Describes the resource range.") +model ResourceRange { + @doc("The minimum number of the resource.") + min?: int32; + + @doc("The maximum number of the resource.") + max?: int32; +} + +@doc("Describes the disallowed disk types.") +model Disallowed { + @doc("A list of disk types.") + diskTypes?: string[]; +} + +@doc("Describes the gallery image definition purchase plan. This is used by marketplace images.") +model ImagePurchasePlan { + @doc("The plan ID.") + name?: string; + + @doc("The publisher ID.") + publisher?: string; + + @doc("The product ID.") + product?: string; +} + +@doc("A feature for gallery image.") +model GalleryImageFeature { + @doc("The name of the gallery image feature.") + name?: string; + + @doc("The value of the gallery image feature.") + value?: string; +} + +@doc("Describes the properties of a gallery image version.") +model GalleryImageVersionProperties { + @doc("The publishing profile of a gallery image Version.") + publishingProfile?: GalleryImageVersionPublishingProfile; + + @doc("The provisioning state, which only appears in the response.") + @visibility("read") + provisioningState?: GalleryProvisioningState; + + @doc("This is the storage profile of a Gallery Image Version.") + storageProfile: GalleryImageVersionStorageProfile; + + @doc("This is the safety profile of the Gallery Image Version.") + safetyProfile?: GalleryImageVersionSafetyProfile; + + @doc("This is the replication status of the gallery image version.") + @visibility("read") + replicationStatus?: ReplicationStatus; +} + +@doc("The publishing profile of a gallery image Version.") +model GalleryImageVersionPublishingProfile + extends GalleryArtifactPublishingProfileBase {} + +@doc("Describes the basic gallery artifact publishing profile.") +model GalleryArtifactPublishingProfileBase { + @doc("The target regions where the Image Version is going to be replicated to. This property is updatable.") + targetRegions?: TargetRegion[]; + + @doc("The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.") + replicaCount?: int32; + + @doc("If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.") + excludeFromLatest?: boolean; + + @doc("The timestamp for when the gallery image version is published.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + publishedDate?: utcDateTime; + + @doc("The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endOfLifeDate?: utcDateTime; + + @doc("Specifies the storage account type to be used to store the image. This property is not updatable.") + storageAccountType?: StorageAccountType; + + @doc("Optional parameter which specifies the mode to be used for replication. This property is not updatable.") + replicationMode?: ReplicationMode; + + @doc("The target extended locations where the Image Version is going to be replicated to. This property is updatable.") + targetExtendedLocations?: GalleryTargetExtendedLocation[]; +} + +@doc("Describes the target region information.") +model TargetRegion { + @doc("The name of the region.") + name: string; + + @doc("The number of replicas of the Image Version to be created per region. This property is updatable.") + regionalReplicaCount?: int32; + + @doc("Specifies the storage account type to be used to store the image. This property is not updatable.") + storageAccountType?: StorageAccountType; + + @doc("Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.") + encryption?: EncryptionImages; + + @doc("Contains the flag setting to hide an image when users specify version='latest'") + excludeFromLatest?: boolean; +} + +@doc("Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.") +model EncryptionImages { + @doc("Contains encryption settings for an OS disk image.") + osDiskImage?: OSDiskImageEncryption; + + @doc("A list of encryption specifications for data disk images.") + dataDiskImages?: DataDiskImageEncryption[]; +} + +@doc("Contains encryption settings for an OS disk image.") +model OSDiskImageEncryption extends DiskImageEncryption { + @doc("This property specifies the security profile of an OS disk image.") + securityProfile?: OSDiskImageSecurityProfile; +} + +@doc("Contains security profile for an OS disk image.") +model OSDiskImageSecurityProfile { + @doc("confidential VM encryption types") + confidentialVMEncryptionType?: ConfidentialVMEncryptionType; + + @doc("secure VM disk encryption set id") + secureVMDiskEncryptionSetId?: string; +} + +@doc("This is the disk image encryption base class.") +model DiskImageEncryption { + @doc("A relative URI containing the resource ID of the disk encryption set.") + diskEncryptionSetId?: string; +} + +@doc("Contains encryption settings for a data disk image.") +model DataDiskImageEncryption extends DiskImageEncryption { + @doc("This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.") + lun: int32; +} + +model GalleryTargetExtendedLocation { + @doc("The name of the region.") + name?: string; + + @doc("The name of the extended location.") + extendedLocation?: GalleryExtendedLocation; + + @doc("The number of replicas of the Image Version to be created per extended location. This property is updatable.") + extendedLocationReplicaCount?: int32; + + @doc("Specifies the storage account type to be used to store the image. This property is not updatable.") + storageAccountType?: EdgeZoneStorageAccountType; + + @doc("Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.") + encryption?: EncryptionImages; +} + +@doc("The name of the extended location.") +model GalleryExtendedLocation { + name?: string; + + @doc("It is type of the extended location.") + type?: GalleryExtendedLocationType; +} + +@doc("This is the storage profile of a Gallery Image Version.") +model GalleryImageVersionStorageProfile { + @doc("The source of the gallery artifact version.") + source?: GalleryArtifactVersionFullSource; + + @doc("This is the OS disk image.") + osDiskImage?: GalleryOSDiskImage; + + @doc("A list of data disk images.") + dataDiskImages?: GalleryDataDiskImage[]; +} + +@doc("The source of the gallery artifact version.") +model GalleryArtifactVersionFullSource extends GalleryArtifactVersionSource { + @doc("The resource Id of the source Community Gallery Image. Only required when using Community Gallery Image as a source.") + communityGalleryImageId?: string; +} + +@doc("The gallery artifact version source.") +model GalleryArtifactVersionSource { + @doc("The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource.") + id?: string; +} + +@doc("This is the OS disk image.") +model GalleryOSDiskImage extends GalleryDiskImage {} + +@doc("This is the disk image base class.") +model GalleryDiskImage { + @doc("This property indicates the size of the VHD to be created.") + @visibility("read") + sizeInGB?: int32; + + @doc("The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'") + hostCaching?: HostCaching; + + @doc("The source for the disk image.") + source?: GalleryDiskImageSource; +} + +@doc("The source for the disk image.") +model GalleryDiskImageSource extends GalleryArtifactVersionSource { + @doc("The uri of the gallery artifact version source. Currently used to specify vhd/blob source.") + uri?: string; + + @doc("The Storage Account Id that contains the vhd blob being used as a source for this artifact version.") + storageAccountId?: string; +} + +@doc("This is the data disk image.") +model GalleryDataDiskImage extends GalleryDiskImage { + @doc("This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.") + lun: int32; +} + +@doc("This is the safety profile of the Gallery Image Version.") +model GalleryImageVersionSafetyProfile + extends GalleryArtifactSafetyProfileBase { + @doc("Indicates whether this image has been reported as violating Microsoft's policies.") + @visibility("read") + reportedForPolicyViolation?: boolean; + + @doc("A list of Policy Violations that have been reported for this Gallery Image Version.") + @visibility("read") + policyViolations?: PolicyViolation[]; +} + +@doc("A policy violation reported against a gallery artifact.") +model PolicyViolation { + @doc("Describes the nature of the policy violation.") + category?: PolicyViolationCategory; + + @doc("Describes specific details about why this policy violation was reported.") + details?: string; +} + +@doc("This is the safety profile of the Gallery Artifact Version.") +model GalleryArtifactSafetyProfileBase { + @doc("Indicates whether or not removing this Gallery Image Version from replicated regions is allowed.") + allowDeletionOfReplicatedLocations?: boolean; +} + +@doc("This is the replication status of the gallery image version.") +model ReplicationStatus { + @doc("This is the aggregated replication status based on all the regional replication status flags.") + @visibility("read") + aggregatedState?: AggregatedReplicationState; + + @doc("This is a summary of replication status for each region.") + @visibility("read") + summary?: RegionalReplicationStatus[]; +} + +@doc("This is the regional replication status.") +model RegionalReplicationStatus { + @doc("The region to which the gallery image version is being replicated to.") + @visibility("read") + region?: string; + + @doc("This is the regional replication state.") + @visibility("read") + state?: ReplicationState; + + @doc("The details of the replication status.") + @visibility("read") + details?: string; + + @doc("It indicates progress of the replication job.") + @visibility("read") + progress?: int32; +} + +@doc("Describes the properties of a gallery Application Definition.") +model GalleryApplicationProperties { + @doc("The description of this gallery Application Definition resource. This property is updatable.") + description?: string; + + @doc("The Eula agreement for the gallery Application Definition.") + eula?: string; + + @doc("The privacy statement uri.") + privacyStatementUri?: string; + + @doc("The release note uri.") + releaseNoteUri?: string; + + @doc("The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endOfLifeDate?: utcDateTime; + + @doc("This property allows you to specify the supported type of the OS that application is built for.

    Possible values are:

    **Windows**

    **Linux**") + supportedOSType: OperatingSystemTypes; + + @doc("A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application.") + customActions?: GalleryApplicationCustomAction[]; +} + +@doc("A custom action that can be performed with a Gallery Application Version.") +model GalleryApplicationCustomAction { + @doc("The name of the custom action. Must be unique within the Gallery Application Version.") + name: string; + + @doc("The script to run when executing this custom action.") + script: string; + + @doc("Description to help the users understand what this custom action does.") + description?: string; + + @doc("The parameters that this custom action uses") + parameters?: GalleryApplicationCustomActionParameter[]; +} + +@doc("The definition of a parameter that can be passed to a custom action of a Gallery Application Version.") +model GalleryApplicationCustomActionParameter { + @doc("The name of the custom action. Must be unique within the Gallery Application Version.") + name: string; + + @doc("Indicates whether this parameter must be passed when running the custom action.") + required?: boolean; + + @doc("Specifies the type of the custom action parameter. Possible values are: String, ConfigurationDataBlob or LogOutputBlob") + type?: GalleryApplicationCustomActionParameterType; + + @doc("The default value of the parameter. Only applies to string types") + defaultValue?: string; + + @doc("A description to help users understand what this parameter means") + description?: string; +} + +@doc("Describes the properties of a gallery image version.") +model GalleryApplicationVersionProperties { + @doc("The publishing profile of a gallery image version.") + publishingProfile: GalleryApplicationVersionPublishingProfile; + + @doc("The safety profile of the Gallery Application Version.") + safetyProfile?: GalleryApplicationVersionSafetyProfile; + + @doc("The provisioning state, which only appears in the response.") + @visibility("read") + provisioningState?: GalleryProvisioningState; + + @doc("This is the replication status of the gallery image version.") + @visibility("read") + replicationStatus?: ReplicationStatus; +} + +@doc("The publishing profile of a gallery image version.") +model GalleryApplicationVersionPublishingProfile + extends GalleryArtifactPublishingProfileBase { + @doc("The source image from which the Image Version is going to be created.") + source: UserArtifactSource; + + manageActions?: UserArtifactManage; + + @doc("Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set.") + settings?: UserArtifactSettings; + + @doc("Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.") + advancedSettings?: Record; + + @doc("Optional. Whether or not this application reports health.") + enableHealthCheck?: boolean; + + @doc("A list of custom actions that can be performed with this Gallery Application Version.") + customActions?: GalleryApplicationCustomAction[]; +} + +@doc("The source image from which the Image Version is going to be created.") +model UserArtifactSource { + @doc("Required. The mediaLink of the artifact, must be a readable storage page blob.") + mediaLink: string; + + @doc("Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob.") + defaultConfigurationLink?: string; +} + +model UserArtifactManage { + @doc("Required. The path and arguments to install the gallery application. This is limited to 4096 characters.") + install: string; + + @doc("Required. The path and arguments to remove the gallery application. This is limited to 4096 characters.") + remove: string; + + @doc("Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters.") + update?: string; +} + +@doc("Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set.") +model UserArtifactSettings { + @doc("Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name.") + packageFileName?: string; + + @doc("Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with \"_config\".") + configFileName?: string; +} + +@doc("The safety profile of the Gallery Application Version.") +model GalleryApplicationVersionSafetyProfile + extends GalleryArtifactSafetyProfileBase {} + +@doc("Specifies information about the gallery sharing profile update.") +model SharingUpdate { + @doc("This property allows you to specify the operation type of gallery sharing update.

    Possible values are:

    **Add**

    **Remove**

    **Reset**") + operationType: SharingUpdateOperationTypes; + + @doc("A list of sharing profile groups.") + groups?: SharingProfileGroup[]; +} + +@doc("Base information about the shared gallery resource in pir.") +model PirSharedGalleryResource extends PirResource { + @doc("The identifier information of shared gallery.") + identifier?: SharedGalleryIdentifier; +} + +@doc("The identifier information of shared gallery.") +model SharedGalleryIdentifier { + @doc("The unique id of this shared gallery.") + uniqueId?: string; +} + +@doc("The Resource model definition.") +model PirResource { + @doc("Resource name") + @visibility("read") + name?: string; + + @doc("Resource location") + @visibility("read") + location?: string; +} + +@doc("Describes the properties of a gallery image definition.") +model SharedGalleryImageProperties { + @doc("This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

    Possible values are:

    **Windows**

    **Linux**") + osType: OperatingSystemTypes; + + @doc("This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'.") + osState: OperatingSystemStateTypes; + + @doc("The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endOfLifeDate?: utcDateTime; + + @doc("This is the gallery image definition identifier.") + identifier: GalleryImageIdentifier; + + @doc("The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.") + recommended?: RecommendedMachineConfiguration; + + @doc("Describes the disallowed disk types.") + disallowed?: Disallowed; + + @doc("The hypervisor generation of the Virtual Machine. Applicable to OS disks only.") + hyperVGeneration?: HyperVGeneration; + + @doc("A list of gallery image features.") + features?: GalleryImageFeature[]; + + @doc("Describes the gallery image definition purchase plan. This is used by marketplace images.") + purchasePlan?: ImagePurchasePlan; + + @doc("The architecture of the image. Applicable to OS disks only.") + architecture?: Architecture; + + @doc("Privacy statement uri for the current community gallery image.") + privacyStatementUri?: string; + + @doc("End-user license agreement for the current community gallery image.") + eula?: string; +} + +@doc("Describes the properties of a gallery image version.") +model SharedGalleryImageVersionProperties { + @doc("The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + publishedDate?: utcDateTime; + + @doc("The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endOfLifeDate?: utcDateTime; + + @doc("If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.") + excludeFromLatest?: boolean; + + @doc("Describes the storage profile of the image version.") + storageProfile?: SharedGalleryImageVersionStorageProfile; +} + +@doc("This is the storage profile of a Gallery Image Version.") +model SharedGalleryImageVersionStorageProfile { + @doc("This is the OS disk image.") + osDiskImage?: SharedGalleryOSDiskImage; + + @doc("A list of data disk images.") + dataDiskImages?: SharedGalleryDataDiskImage[]; +} + +@doc("This is the OS disk image.") +model SharedGalleryOSDiskImage extends SharedGalleryDiskImage {} + +@doc("This is the disk image base class.") +model SharedGalleryDiskImage { + @doc("This property indicates the size of the VHD to be created.") + @visibility("read") + diskSizeGB?: int32; + + @doc("The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'") + hostCaching?: SharedGalleryHostCaching; +} + +@doc("This is the data disk image.") +model SharedGalleryDataDiskImage extends SharedGalleryDiskImage { + @doc("This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.") + lun: int32; +} + +@doc("Base information about the community gallery resource in pir.") +model PirCommunityGalleryResource { + @doc("Resource name") + @visibility("read") + name?: string; + + @doc("Resource location") + @visibility("read") + location?: string; + + @doc("Resource type") + @visibility("read") + type?: string; + + @doc("The identifier information of community gallery.") + identifier?: CommunityGalleryIdentifier; +} + +@doc("The identifier information of community gallery.") +model CommunityGalleryIdentifier { + @doc("The unique id of this community gallery.") + uniqueId?: string; +} + +@doc("Describes the properties of a gallery image definition.") +model CommunityGalleryImageProperties { + @doc("This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

    Possible values are:

    **Windows**

    **Linux**") + osType: OperatingSystemTypes; + + @doc("This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'.") + osState: OperatingSystemStateTypes; + + @doc("The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endOfLifeDate?: utcDateTime; + + @doc("This is the community gallery image definition identifier.") + identifier: CommunityGalleryImageIdentifier; + + @doc("The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.") + recommended?: RecommendedMachineConfiguration; + + @doc("Describes the disallowed disk types.") + disallowed?: Disallowed; + + @doc("The hypervisor generation of the Virtual Machine. Applicable to OS disks only.") + hyperVGeneration?: HyperVGeneration; + + @doc("A list of gallery image features.") + features?: GalleryImageFeature[]; + + @doc("Describes the gallery image definition purchase plan. This is used by marketplace images.") + purchasePlan?: ImagePurchasePlan; + + @doc("The architecture of the image. Applicable to OS disks only.") + architecture?: Architecture; + + @doc("Privacy statement uri for the current community gallery image.") + privacyStatementUri?: string; + + @doc("End-user license agreement for the current community gallery image.") + eula?: string; +} + +@doc("This is the community gallery image definition identifier.") +model CommunityGalleryImageIdentifier { + @doc("The name of the gallery image definition publisher.") + publisher?: string; + + @doc("The name of the gallery image definition offer.") + offer?: string; + + @doc("The name of the gallery image definition SKU.") + sku?: string; +} + +@doc("Describes the properties of a gallery image version.") +model CommunityGalleryImageVersionProperties { + @doc("The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + publishedDate?: utcDateTime; + + @doc("The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endOfLifeDate?: utcDateTime; + + @doc("If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.") + excludeFromLatest?: boolean; + + @doc("Describes the storage profile of the image version.") + storageProfile?: SharedGalleryImageVersionStorageProfile; +} + +@doc("The role instance SKU.") +model InstanceSku { + @doc("The sku name.") + @visibility("read") + name?: string; + + @doc("The tier of the cloud service role instance.") + @visibility("read") + tier?: string; +} + +@doc("Role instance properties.") +model RoleInstanceProperties { + @doc("Describes the network profile for the role instance.") + networkProfile?: RoleInstanceNetworkProfile; + + @doc("The instance view of the role instance.") + instanceView?: RoleInstanceInstanceView; +} + +@doc("Describes the network profile for the role instance.") +model RoleInstanceNetworkProfile { + @doc("Specifies the list of resource Ids for the network interfaces associated with the role instance.") + @visibility("read") + networkInterfaces?: SubResource[]; +} + +@doc("The instance view of the role instance.") +model RoleInstanceInstanceView { + @doc("The Update Domain.") + @visibility("read") + platformUpdateDomain?: int32; + + @doc("The Fault Domain.") + @visibility("read") + platformFaultDomain?: int32; + + @doc("Specifies a unique identifier generated internally for the cloud service associated with this role instance.

    NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details.") + @visibility("read") + privateId?: string; + + @visibility("read") + statuses?: ResourceInstanceViewStatus[]; +} + +@doc("Instance view status.") +model ResourceInstanceViewStatus { + @doc("The status code.") + @visibility("read") + code?: string; + + @doc("The short localizable label for the status.") + @visibility("read") + displayStatus?: string; + + @doc("The detailed status message, including for alerts and error messages.") + @visibility("read") + message?: string; + + @doc("The time of the status.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + time?: utcDateTime; + + @doc("The level code.") + level?: StatusLevelTypes; +} + +@doc("Describes the cloud service role sku.") +model CloudServiceRoleSku { + @doc("The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete and recreate the cloud service or move back to the old sku.") + name?: string; + + @doc("Specifies the tier of the cloud service. Possible Values are

    **Standard**

    **Basic**") + tier?: string; + + @doc("Specifies the number of role instances in the cloud service.") + capacity?: int32; +} + +@doc("The cloud service role properties.") +model CloudServiceRoleProperties { + @doc("Specifies the ID which uniquely identifies a cloud service role.") + @visibility("read") + uniqueId?: string; +} + +@doc("Cloud service properties") +model CloudServiceProperties { + @doc(""" +Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. +This is a write-only property and is not returned in GET calls. +""") + packageUrl?: string; + + @doc("Specifies the XML service configuration (.cscfg) for the cloud service.") + configuration?: string; + + @doc(""" +Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. +This is a write-only property and is not returned in GET calls. +""") + configurationUrl?: string; + + @doc(""" +(Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`. +If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff. +""") + startCloudService?: boolean; + + @doc(""" +(Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively. +The default value is `false`. +""") + allowModelOverride?: boolean; + + @doc(""" +Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. +Possible Values are

    **Auto**

    **Manual**

    **Simultaneous**

    +If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. +""") + upgradeMode?: CloudServiceUpgradeMode; + + @doc("Describes the role profile for the cloud service.") + roleProfile?: CloudServiceRoleProfile; + + @doc("Describes the OS profile for the cloud service.") + osProfile?: CloudServiceOsProfile; + + @doc("Network Profile for the cloud service.") + networkProfile?: CloudServiceNetworkProfile; + + @doc("Describes a cloud service extension profile.") + extensionProfile?: CloudServiceExtensionProfile; + + @doc("The provisioning state, which only appears in the response.") + @visibility("read") + provisioningState?: string; + + @doc("The unique identifier for the cloud service.") + @visibility("read") + uniqueId?: string; +} + +@doc("Describes the role profile for the cloud service.") +model CloudServiceRoleProfile { + @doc("List of roles for the cloud service.") + roles?: CloudServiceRoleProfileProperties[]; +} + +@doc("Describes the role properties.") +model CloudServiceRoleProfileProperties { + @doc("Resource name.") + name?: string; + + @doc("Describes the cloud service role sku.") + sku?: CloudServiceRoleSku; +} + +@doc("Describes the OS profile for the cloud service.") +model CloudServiceOsProfile { + @doc("Specifies set of certificates that should be installed onto the role instances.") + secrets?: CloudServiceVaultSecretGroup[]; +} + +@doc("Describes a set of certificates which are all in the same Key Vault.") +model CloudServiceVaultSecretGroup { + @doc("The relative URL of the Key Vault containing all of the certificates in VaultCertificates.") + sourceVault?: SubResource; + + @doc("The list of key vault references in SourceVault which contain certificates.") + vaultCertificates?: CloudServiceVaultCertificate[]; +} + +@doc("Describes a single certificate reference in a Key Vault, and where the certificate should reside on the role instance.") +model CloudServiceVaultCertificate { + @doc("This is the URL of a certificate that has been uploaded to Key Vault as a secret.") + certificateUrl?: string; +} + +@doc("Network Profile for the cloud service.") +model CloudServiceNetworkProfile { + @doc("List of Load balancer configurations. Cloud service can have up to two load balancer configurations, corresponding to a Public Load Balancer and an Internal Load Balancer.") + loadBalancerConfigurations?: LoadBalancerConfiguration[]; + + @doc(""" +Slot type for the cloud service. +Possible values are

    **Production**

    **Staging**

    +If not specified, the default value is Production. +""") + slotType?: CloudServiceSlotType; + + @doc("The id reference of the cloud service containing the target IP with which the subject cloud service can perform a swap. This property cannot be updated once it is set. The swappable cloud service referred by this id must be present otherwise an error will be thrown.") + swappableCloudService?: SubResource; +} + +@doc("Describes the load balancer configuration.") +model LoadBalancerConfiguration { + @doc("Resource Id") + id?: string; + + @doc("The name of the Load balancer") + name: string; + + @doc("Properties of the load balancer configuration.") + properties: LoadBalancerConfigurationProperties; +} + +@doc("Describes the properties of the load balancer configuration.") +model LoadBalancerConfigurationProperties { + @doc("Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration.") + frontendIpConfigurations: LoadBalancerFrontendIpConfiguration[]; +} + +@doc("Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration.") +model LoadBalancerFrontendIpConfiguration { + @doc("The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource.") + name: string; + + @doc("Properties of load balancer frontend ip configuration.") + properties: LoadBalancerFrontendIpConfigurationProperties; +} + +@doc("Describes a cloud service IP Configuration") +model LoadBalancerFrontendIpConfigurationProperties { + @doc("The reference to the public ip address resource.") + publicIPAddress?: SubResource; + + @doc("The reference to the virtual network subnet resource.") + subnet?: SubResource; + + @doc("The virtual network private IP address of the IP configuration.") + privateIPAddress?: string; +} + +@doc("Describes a cloud service extension profile.") +model CloudServiceExtensionProfile { + @doc("List of extensions for the cloud service.") + extensions?: Extension[]; +} + +@doc("Describes a cloud service Extension.") +model Extension { + @doc("The name of the extension.") + name?: string; + + @doc("Extension Properties.") + properties?: CloudServiceExtensionProperties; +} + +@doc("Extension Properties.") +model CloudServiceExtensionProperties { + @doc("The name of the extension handler publisher.") + publisher?: string; + + @doc("Specifies the type of the extension.") + type?: string; + + @doc("Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance.") + typeHandlerVersion?: string; + + @doc("Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available.") + autoUpgradeMinorVersion?: boolean; + + @doc("Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension.") + settings?: Record; + + @doc("Protected settings for the extension which are encrypted before sent to the role instance.") + protectedSettings?: Record; + + @doc("Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance.") + protectedSettingsFromKeyVault?: CloudServiceVaultAndSecretReference; + + @doc(""" +Tag to force apply the provided public and protected settings. +Changing the tag value allows for re-running the extension without changing any of the public or protected settings. +If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler. +If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and +it is up to handler implementation whether to re-run it or not +""") + forceUpdateTag?: string; + + @doc("The provisioning state, which only appears in the response.") + @visibility("read") + provisioningState?: string; + + @doc("Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service.") + rolesAppliedTo?: string[]; +} + +@doc("Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance.") +model CloudServiceVaultAndSecretReference { + @doc("The ARM Resource ID of the Key Vault") + sourceVault?: SubResource; + + @doc("Secret URL which contains the protected settings of the extension") + secretUrl?: string; +} + +@doc("InstanceView of CloudService as a whole") +model CloudServiceInstanceView { + @doc("Instance view statuses.") + roleInstance?: InstanceViewStatusesSummary; + + @doc("The version of the SDK that was used to generate the package for the cloud service.") + @visibility("read") + sdkVersion?: string; + + @doc("Specifies a list of unique identifiers generated internally for the cloud service.

    NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details.") + @visibility("read") + privateIds?: string[]; + + @visibility("read") + statuses?: ResourceInstanceViewStatus[]; +} + +@doc("Instance view statuses.") +model InstanceViewStatusesSummary { + @doc("The summary.") + @visibility("read") + statusesSummary?: StatusCodeCount[]; +} + +@doc("The status code and count of the cloud service instance view statuses") +model StatusCodeCount { + @doc("The instance view status code") + @visibility("read") + code?: string; + + @doc("Number of instances having this status code") + @visibility("read") + count?: int32; +} + +@doc("Specifies a list of role instances from the cloud service.") +model RoleInstances { + @doc("List of cloud service role instance names. Value of '*' will signify all role instances of the cloud service.") + roleInstances: string[]; +} + +@doc("Defines an update domain for the cloud service.") +model UpdateDomain { + @doc("Resource Id") + @visibility("read") + id?: string; + + @doc("Resource Name") + @visibility("read") + name?: string; +} + +@doc("The list operation result.") +model UpdateDomainListResult is Azure.Core.Page; + +@doc("OS version properties.") +model OSVersionProperties { + @doc("The family of this OS version.") + @visibility("read") + family?: string; + + @doc("The family label of this OS version.") + @visibility("read") + familyLabel?: string; + + @doc("The OS version.") + @visibility("read") + version?: string; + + @doc("The OS version label.") + @visibility("read") + label?: string; + + @doc("Specifies whether this is the default OS version for its family.") + @visibility("read") + isDefault?: boolean; + + @doc("Specifies whether this OS version is active.") + @visibility("read") + isActive?: boolean; +} + +@doc("OS family properties.") +model OSFamilyProperties { + @doc("The OS family name.") + @visibility("read") + name?: string; + + @doc("The OS family label.") + @visibility("read") + label?: string; + + @doc("List of OS versions belonging to this family.") + @visibility("read") + versions?: OSVersionPropertiesBase[]; +} + +@doc("Configuration view of an OS version.") +model OSVersionPropertiesBase { + @doc("The OS version.") + @visibility("read") + version?: string; + + @doc("The OS version label.") + @visibility("read") + label?: string; + + @doc("Specifies whether this is the default OS version for its family.") + @visibility("read") + isDefault?: boolean; + + @doc("Specifies whether this OS version is active.") + @visibility("read") + isActive?: boolean; +} + +@doc("The source image from which the Image Version is going to be created.") +model GalleryArtifactSource { + @doc("The managed artifact.") + managedImage: ManagedArtifact; +} + +@doc("The managed artifact.") +model ManagedArtifact { + @doc("The managed artifact id.") + id: string; +} + +@doc("The gallery image version with latest version in a particular region.") +model LatestGalleryImageVersion { + @doc("The name of the latest version in the region.") + latestVersionName?: string; + + @doc("region of the Gallery Image Version.") + location?: string; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp new file mode 100644 index 0000000000..c78588f87d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp @@ -0,0 +1,626 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace Microsoft.Compute; + +interface UsageOperations { + @doc("Gets, for the specified location, the current compute resource usage information as well as the limits for compute resources under the subscription.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The location for which resource usage is queried.") + @pattern("^[-\\w\\._]+$") + @path + location: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + ListUsagesResult + >; +} + +interface VirtualMachineSizesOperations { + @doc("This API is deprecated. Use [Resources Skus](https://docs.microsoft.com/rest/api/compute/resourceskus/list)") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The location upon which virtual-machine-sizes is queried.") + @pattern("^[-\\w\\._]+$") + @path + location: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + VirtualMachineSizeListResult + >; +} + +interface VirtualMachineImagesOperations { + @doc("Gets a virtual machine image.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The name of a supported Azure region.") + @path + location: string; + + @doc("A valid image publisher.") + @path + publisherName: string; + + @doc("A valid image publisher offer.") + @path + offer: string; + + @doc("A valid image SKU.") + @path + skus: string; + + @doc("A valid image SKU version.") + @path + version: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + VirtualMachineImage + >; + + @doc("Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The name of a supported Azure region.") + @path + location: string; + + @doc("A valid image publisher.") + @path + publisherName: string; + + @doc("A valid image publisher offer.") + @path + offer: string; + + @doc("A valid image SKU.") + @path + skus: string; + + @doc("The expand expression to apply on the operation.") + @query("$expand") + $expand?: string; + + @query("$top") + $top?: int32; + + @query("$orderby") + $orderby?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Gets a list of virtual machine image offers for the specified location and publisher.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers") + @get + ListOffers is Azure.Core.Foundations.Operation< + { + @doc("The name of a supported Azure region.") + @path + location: string; + + @doc("A valid image publisher.") + @path + publisherName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Gets a list of virtual machine image publishers for the specified Azure location.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers") + @get + ListPublishers is Azure.Core.Foundations.Operation< + { + @doc("The name of a supported Azure region.") + @path + location: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Gets a list of virtual machine image SKUs for the specified location, publisher, and offer.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus") + @get + ListSkus is Azure.Core.Foundations.Operation< + { + @doc("The name of a supported Azure region.") + @path + location: string; + + @doc("A valid image publisher.") + @path + publisherName: string; + + @doc("A valid image publisher offer.") + @path + offer: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Gets a list of all virtual machine image versions for the specified edge zone") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/vmimages") + @get + ListByEdgeZone is Azure.Core.Foundations.Operation< + { + @doc("The name of a supported Azure region.") + @path + location: string; + + @doc("The name of the edge zone.") + @path + edgeZone: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + VmImagesInEdgeZoneListResult + >; +} + +interface VirtualMachineImagesEdgeZoneOperations { + @doc("Gets a virtual machine image in an edge zone.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The name of a supported Azure region.") + @path + location: string; + + @doc("The name of the edge zone.") + @path + edgeZone: string; + + @doc("A valid image publisher.") + @path + publisherName: string; + + @doc("A valid image publisher offer.") + @path + offer: string; + + @doc("A valid image SKU.") + @path + skus: string; + + @doc("A valid image SKU version.") + @path + version: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + VirtualMachineImage + >; + + @doc("Gets a list of all virtual machine image versions for the specified location, edge zone, publisher, offer, and SKU.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The name of a supported Azure region.") + @path + location: string; + + @doc("The name of the edge zone.") + @path + edgeZone: string; + + @doc("A valid image publisher.") + @path + publisherName: string; + + @doc("A valid image publisher offer.") + @path + offer: string; + + @doc("A valid image SKU.") + @path + skus: string; + + @doc("The expand expression to apply on the operation.") + @query("$expand") + $expand?: string; + + @doc("An integer value specifying the number of images to return that matches supplied values.") + @query("$top") + $top?: int32; + + @doc("Specifies the order of the results returned. Formatted as an OData query.") + @query("$orderby") + $orderby?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Gets a list of virtual machine image offers for the specified location, edge zone and publisher.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers") + @get + ListOffers is Azure.Core.Foundations.Operation< + { + @doc("The name of a supported Azure region.") + @path + location: string; + + @doc("The name of the edge zone.") + @path + edgeZone: string; + + @doc("A valid image publisher.") + @path + publisherName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Gets a list of virtual machine image publishers for the specified Azure location and edge zone.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers") + @get + ListPublishers is Azure.Core.Foundations.Operation< + { + @doc("The name of a supported Azure region.") + @path + location: string; + + @doc("The name of the edge zone.") + @path + edgeZone: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; + + @doc("Gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and offer.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus") + @get + ListSkus is Azure.Core.Foundations.Operation< + { + @doc("The name of a supported Azure region.") + @path + location: string; + + @doc("The name of the edge zone.") + @path + edgeZone: string; + + @doc("A valid image publisher.") + @path + publisherName: string; + + @doc("A valid image publisher offer.") + @path + offer: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; +} + +interface VirtualMachineExtensionImagesOperations { + @doc("Gets a list of virtual machine extension image versions.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions") + @get + ListVersions is Azure.Core.Foundations.Operation< + { + @doc("The name of a supported Azure region.") + @path + location: string; + + @path + publisherName: string; + + @path + type: string; + + @doc("The filter to apply on the operation.") + @query("$filter") + $filter?: string; + + @query("$top") + $top?: int32; + + @query("$orderby") + $orderby?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + void + >; +} + +interface LogAnalyticsOperations { + @doc("Export logs that show Api requests made by this subscription in the given time window to show throttling activities.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval") + @post + ExportRequestRateByInterval is Azure.Core.Foundations.Operation< + { + @doc("The location upon which virtual-machine-sizes is queried.") + @pattern("^[-\\w\\._]+$") + @path + location: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("Parameters supplied to the LogAnalytics getRequestRateByInterval Api.") + @body + parameters: RequestRateByIntervalInput; + }, + LogAnalyticsOperationResult | void + >; + + @doc("Export logs that show total throttled Api requests for this subscription in the given time window.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests") + @post + ExportThrottledRequests is Azure.Core.Foundations.Operation< + { + @doc("The location upon which virtual-machine-sizes is queried.") + @pattern("^[-\\w\\._]+$") + @path + location: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("Parameters supplied to the LogAnalytics getThrottledRequests Api.") + @body + parameters: ThrottledRequestsInput; + }, + LogAnalyticsOperationResult | void + >; +} + +interface VirtualMachineScaleSetVMRunCommandsOperations { + @doc("The operation to create or update the VMSS VM run command.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("The instance ID of the virtual machine.") + @path + instanceId: string; + + @doc("The name of the virtual machine run command.") + @path + runCommandName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("Parameters supplied to the Create Virtual Machine RunCommand operation.") + @body + runCommand: VirtualMachineRunCommand; + + @doc("Accept header") + @header + accept: "application/json, text/json"; + }, + VirtualMachineRunCommand + >; + + @doc("The operation to update the VMSS VM run command.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") + @patch + Update is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("The instance ID of the virtual machine.") + @path + instanceId: string; + + @doc("The name of the virtual machine run command.") + @path + runCommandName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("Parameters supplied to the Update Virtual Machine RunCommand operation.") + @body + runCommand: VirtualMachineRunCommandUpdate; + + @doc("Accept header") + @header + accept: "application/json, text/json"; + }, + VirtualMachineRunCommand + >; + + @doc("The operation to delete the VMSS VM run command.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("The instance ID of the virtual machine.") + @path + instanceId: string; + + @doc("The name of the virtual machine run command.") + @path + runCommandName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("Accept header") + @header + accept: "application/json, text/json"; + }, + void + >; + + @doc("The operation to get the VMSS VM run command.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("The instance ID of the virtual machine.") + @path + instanceId: string; + + @doc("The name of the virtual machine run command.") + @path + runCommandName: string; + + @doc("The expand expression to apply on the operation.") + @query("$expand") + $expand?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("Accept header") + @header + accept: "application/json, text/json"; + }, + VirtualMachineRunCommand + >; + + @doc("The operation to get all run commands of an instance in Virtual Machine Scaleset.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + + @doc("The instance ID of the virtual machine.") + @path + instanceId: string; + + @doc("The expand expression to apply on the operation.") + @query("$expand") + $expand?: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("Accept header") + @header + accept: "application/json, text/json"; + }, + VirtualMachineRunCommandsListResult + >; +} + +interface ResourceSkusOperations { + @doc("Gets the list of Microsoft.Compute SKUs available for your Subscription.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("The filter to apply on the operation. Only **location** filter is supported currently.") + @query("$filter") + $filter?: string; + + @doc("To Include Extended Locations information or not in the response.") + @query("includeExtendedLocations") + includeExtendedLocations?: string; + }, + ResourceSkusResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..691f3c1b0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/networkanalytics.md b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/networkanalytics.md new file mode 100644 index 0000000000..caec4e87c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/networkanalytics.md @@ -0,0 +1,9 @@ +```yaml +require: https://github.com/Azure/azure-rest-api-specs/blob/2bb95006b1eaffeae16fcbc20f5d9844309a80a0/specification/networkanalytics/resource-manager/readme.md +title: "Azure Network Analytics resource management API." +clear-output-folder: false +guessResourceKey: false +isAzureSpec: true +isArm: true +namespace: "Microsoft.NetworkAnalytics" +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/resources.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/resources.json new file mode 100644 index 0000000000..6819760716 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/resources.json @@ -0,0 +1,291 @@ +{ + "Resources": { + "DataProduct": { + "Name": "DataProduct", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}", + "Method": "GET", + "OperationID": "DataProducts_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieve data product resource." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}", + "Method": "PUT", + "OperationID": "DataProducts_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create data product resource." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}", + "Method": "PATCH", + "OperationID": "DataProducts_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update data product resource." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}", + "Method": "DELETE", + "OperationID": "DataProducts_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete data product resource." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts", + "Method": "GET", + "OperationID": "DataProducts_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List data products by resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetDataProducts", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkAnalytics/dataProducts", + "Method": "GET", + "OperationID": "DataProducts_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List data products by subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "AddUserRole", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/addUserRole", + "Method": "POST", + "OperationID": "DataProducts_AddUserRole", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Assign role to the data product." + }, + { + "Name": "GenerateStorageAccountSasToken", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/generateStorageAccountSasToken", + "Method": "POST", + "OperationID": "DataProducts_GenerateStorageAccountSasToken", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Generate sas token for storage account." + }, + { + "Name": "GetRolesAssignments", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/listRolesAssignments", + "Method": "POST", + "OperationID": "DataProducts_ListRolesAssignments", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "List user roles associated with the data product." + }, + { + "Name": "RemoveUserRole", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/removeUserRole", + "Method": "POST", + "OperationID": "DataProducts_RemoveUserRole", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Remove role from the data product." + }, + { + "Name": "RotateKey", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/rotateKey", + "Method": "POST", + "OperationID": "DataProducts_RotateKey", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Initiate key rotation on Data Product." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "DataProduct", + "ResourceType": "Microsoft.NetworkAnalytics/dataProducts", + "ResourceKey": "dataProductName", + "ResourceKeySegment": "dataProducts", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DataProductsCatalog": { + "Name": "DataProductsCatalog", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", + "Method": "GET", + "OperationID": "DataProductsCatalogs_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieve data type resource." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetDataProductsCatalogs", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs", + "Method": "GET", + "OperationID": "DataProductsCatalogs_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List data catalog by subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "DataProductsCatalog", + "ResourceType": "Microsoft.NetworkAnalytics/dataProductsCatalogs", + "ResourceKey": "default", + "ResourceKeySegment": "dataProductsCatalogs", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": true + }, + "DataType": { + "Name": "DataType", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}", + "Method": "GET", + "OperationID": "DataTypes_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieve data type resource." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}", + "Method": "PUT", + "OperationID": "DataTypes_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create data type resource." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}", + "Method": "PATCH", + "OperationID": "DataTypes_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update data type resource." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}", + "Method": "DELETE", + "OperationID": "DataTypes_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete data type resource." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes", + "Method": "GET", + "OperationID": "DataTypes_ListByDataProduct", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByDataProduct", + "NextPageMethod": "ListByDataProductNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List data type by parent resource." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "DeleteData", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}/deleteData", + "Method": "POST", + "OperationID": "DataTypes_DeleteData", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete data for data type." + }, + { + "Name": "GenerateStorageContainerSasToken", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}/generateStorageContainerSasToken", + "Method": "POST", + "OperationID": "DataTypes_GenerateStorageContainerSasToken", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Generate sas token for storage container." + } + ], + "Parents": ["DataProduct"], + "SwaggerModelName": "DataType", + "ResourceType": "Microsoft.NetworkAnalytics/dataProducts/dataTypes", + "ResourceKey": "dataTypeName", + "ResourceKeySegment": "dataTypes", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp new file mode 100644 index 0000000000..759eed6348 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp @@ -0,0 +1,65 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.NetworkAnalytics; +@doc("The data product resource.") +model DataProduct is TrackedResource { + @doc("The data product resource name") + @maxLength(63) + @minLength(3) + @pattern("^[a-z][a-z0-9]*$") + @path + @key("dataProductName") + @segment("dataProducts") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; +} + +@armResourceOperations +interface DataProducts { + @doc("Retrieve data product resource.") + get is ArmResourceRead; + @doc("Create data product resource.") + create is ArmResourceCreateOrUpdateAsync; + @doc("Update data product resource.") + update is ArmResourcePatchAsync; + @doc("Delete data product resource.") + delete is ArmResourceDeleteWithoutOkAsync; + @doc("List data products by resource group.") + listByResourceGroup is ArmResourceListByParent; + @doc("List data products by subscription.") + listBySubscription is ArmListBySubscription; + @doc("Assign role to the data product.") + addUserRole is ArmResourceActionSync< + DataProduct, + RoleAssignmentCommonProperties, + RoleAssignmentDetail + >; + @doc("Generate sas token for storage account.") + generateStorageAccountSasToken is ArmResourceActionSync< + DataProduct, + AccountSas, + AccountSasToken + >; + @doc("List user roles associated with the data product.") + listRolesAssignments is ArmResourceActionSync< + DataProduct, + Record, + ListRoleAssignments + >; + @doc("Remove role from the data product.") + removeUserRole is ArmResourceActionNoContentSync< + DataProduct, + RoleAssignmentDetail + >; + @doc("Initiate key rotation on Data Product.") + rotateKey is ArmResourceActionNoContentSync; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp new file mode 100644 index 0000000000..6226f421a8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp @@ -0,0 +1,28 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.NetworkAnalytics; +@doc("The data catalog resource.") +@singleton("default") +model DataProductsCatalog is ProxyResource { + @key("default") + @segment("dataProductsCatalogs") + name: string; +} + +@armResourceOperations +interface DataProductsCatalogs { + @doc("Retrieve data type resource.") + get is ArmResourceRead; + @doc("List data catalog by subscription.") + listBySubscription is ArmListBySubscription; + @doc("List data catalog by resource group.") + listByResourceGroup is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp new file mode 100644 index 0000000000..22401df7ef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp @@ -0,0 +1,49 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DataProduct.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.NetworkAnalytics; +@doc("The data type resource.") +@parentResource(DataProduct) +model DataType is ProxyResource { + @doc("The data type name.") + @maxLength(63) + @minLength(3) + @pattern("^[a-z][a-z0-9-]*$") + @path + @key("dataTypeName") + @segment("dataTypes") + name: string; +} + +@armResourceOperations +interface DataTypes { + @doc("Retrieve data type resource.") + get is ArmResourceRead; + @doc("Create data type resource.") + create is ArmResourceCreateOrUpdateAsync; + @doc("Update data type resource.") + update is ArmResourcePatchAsync; + @doc("Delete data type resource.") + delete is ArmResourceDeleteWithoutOkAsync; + @doc("List data type by parent resource.") + listByDataProduct is ArmResourceListByParent; + @doc("Delete data for data type.") + deleteData is ArmResourceActionNoResponseContentAsync< + DataType, + Record + >; + @doc("Generate sas token for storage container.") + generateStorageContainerSasToken is ArmResourceActionSync< + DataType, + ContainerSaS, + ContainerSasToken + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp new file mode 100644 index 0000000000..0138b59aa4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp @@ -0,0 +1,30 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./DataProduct.tsp"; +import "./DataProductsCatalog.tsp"; +import "./DataType.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "Azure Network Analytics resource management API.", +}) +@versioned(Versions) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) +@doc("// FIXME: (miissing-service-description) Add service description") +namespace Microsoft.NetworkAnalytics; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2023_11_15: "2023-11-15", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp new file mode 100644 index 0000000000..a46998a192 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp @@ -0,0 +1,445 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; + +namespace Microsoft.NetworkAnalytics; + +interface Operations extends Azure.ResourceManager.Operations {} + +enum Origin { + user, + system, + `user,system`, +} + +enum ActionType { + Internal, +} + +enum ProvisioningState { + @doc("Represents a succeeded operation.") Succeeded, + @doc("Represents a failed operation.") Failed, + @doc("Represents a canceled operation.") Canceled, + @doc("Represents a pending operation.") Provisioning, + @doc("Represents a pending operation.") Updating, + @doc("Represents an operation under deletion.") Deleting, + @doc("Represents an accepted operation.") Accepted, +} + +enum ControlState { + @doc("Field to enable a setting.") Enabled, + @doc("Field to disable a setting.") Disabled, +} + +enum DefaultAction { + @doc("Represents allow action.") Allow, + @doc("Represents deny action.") Deny, +} + +enum ManagedServiceIdentityType { + None, + SystemAssigned, + UserAssigned, + `SystemAssigned, UserAssigned`, +} + +enum CreatedByType { + User, + Application, + ManagedIdentity, + Key, +} + +enum DataProductUserRole { + @doc("Field to specify user of type Reader.") Reader, + @doc(""" +Field to specify user of type SensitiveReader. +This user has privileged access to read sensitive data of a data product. +""") + SensitiveReader, +} + +enum DataTypeState { + @doc("Field to specify stopped state.") Stopped, + @doc("Field to specify running state.") Running, +} + +enum Bypass { + @doc("Represents no bypassing of traffic.") None, + @doc("Represents bypassing logging traffic.") Logging, + @doc("Represents bypassing metrics traffic.") Metrics, + @doc("Represents bypassing azure services traffic.") AzureServices, +} + +@doc("The data product properties.") +model DataProductProperties { + @doc("The resource GUID property of the data product resource.") + @visibility("read") + resourceGuid?: string; + + @doc("Latest provisioning state of data product.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("Data product publisher name.") + @visibility("read", "create") + publisher: string; + + @doc("Product name of data product.") + @visibility("read", "create") + product: string; + + @doc("Major version of data product.") + @visibility("read", "create") + majorVersion: string; + + @doc("List of name or email associated with data product resource deployment.") + @visibility("read", "create", "update") + owners?: string[]; + + @doc("Flag to enable or disable redundancy for data product.") + @visibility("read", "create") + redundancy?: ControlState; + + @doc("Purview account url for data product to connect to.") + @visibility("read", "create", "update") + purviewAccount?: string; + + @doc("Purview collection url for data product to connect to.") + @visibility("read", "create", "update") + purviewCollection?: string; + + @doc("Flag to enable or disable private link for data product resource.") + @visibility("read", "create", "update") + privateLinksEnabled?: ControlState; + + @doc("Flag to enable or disable public access of data product resource.") + @visibility("read", "create") + publicNetworkAccess?: ControlState; + + @doc("Flag to enable customer managed key encryption for data product.") + @visibility("read", "create") + customerManagedKeyEncryptionEnabled?: ControlState; + + @doc("Customer managed encryption key details for data product.") + @visibility("read", "create") + customerEncryptionKey?: EncryptionKeyDetails; + + @doc("Network rule set for data product.") + @visibility("read", "create") + networkacls?: DataProductNetworkAcls; + + @doc("Managed resource group configuration.") + @visibility("create") + managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; + + @doc("List of available minor versions of the data product resource.") + @visibility("read") + availableMinorVersions?: string[]; + + @doc("Current configured minor version of the data product resource.") + @visibility("read", "update") + currentMinorVersion?: string; + + @doc("Documentation link for the data product based on definition file.") + @visibility("read") + documentation?: string; + + @doc("Resource links which exposed to the customer to query the data.") + @visibility("read") + consumptionEndpoints?: ConsumptionEndpointsProperties; + + @doc("Key vault url.") + @visibility("read") + keyVaultUrl?: string; +} + +@doc("Encryption key details.") +model EncryptionKeyDetails { + @doc("The Uri of the key vault.") + keyVaultUri: string; + + @doc("The name of the key vault key.") + keyName: string; + + @doc("The version of the key vault key.") + keyVersion: string; +} + +@doc("Data Product Network rule set") +model DataProductNetworkAcls { + @doc("Virtual Network Rule") + virtualNetworkRule: VirtualNetworkRule[]; + + @doc("IP rule with specific IP or IP range in CIDR format.") + ipRules: IPRules[]; + + @doc("The list of query ips in the format of CIDR allowed to connect to query/visualization endpoint.") + allowedQueryIpRangeList: string[]; + + @doc("Default Action") + defaultAction: DefaultAction; +} + +@doc("Virtual Network Rule") +model VirtualNetworkRule { + @doc("Resource ID of a subnet") + id: string; + + @doc("The action of virtual network rule.") + action?: string; + + @doc("Gets the state of virtual network rule.") + state?: string; +} + +@doc("IP rule with specific IP or IP range in CIDR format.") +model IPRules { + @doc("IP Rules Value") + value?: string; + + @doc("The action of virtual network rule.") + action: string; +} + +@doc("ManagedResourceGroup related properties") +model ManagedResourceGroupConfiguration { + @doc("Name of managed resource group") + name: string; + + @doc("Managed Resource Group location") + location: string; +} + +@doc("Details of Consumption Properties") +model ConsumptionEndpointsProperties { + @doc("Ingestion url to upload the data.") + @visibility("read") + ingestionUrl?: string; + + @doc("Resource Id of ingestion endpoint.") + @visibility("read") + ingestionResourceId?: ResourceIdentifier<[ + { + type: "Microsoft.Storage/storageAccounts"; + } + ]>; + + @doc("Url to consume file type.") + @visibility("read") + fileAccessUrl?: string; + + @doc("Resource Id of file access endpoint.") + @visibility("read") + fileAccessResourceId?: ResourceIdentifier<[ + { + type: "Microsoft.Storage/storageAccounts"; + } + ]>; + + @doc("Url to consume the processed data.") + @visibility("read") + queryUrl?: string; + + @doc("Resource Id of query endpoint.") + @visibility("read") + queryResourceId?: ResourceIdentifier<[ + { + type: "Microsoft.Kusto/clusters"; + } + ]>; +} + +@doc("User assigned identity properties") +model UserAssignedIdentity { + @doc("The principal ID of the assigned identity.") + @visibility("read") + principalId?: string; + + @doc("The client ID of the assigned identity.") + @visibility("read") + clientId?: string; +} + +@doc("Details for data catalog properties.") +model DataProductsCatalogProperties { + @doc("The data catalog provisioning state.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("The data product publisher information.") + publishers: PublisherInformation[]; +} + +@doc("Details for Publisher Information.") +model PublisherInformation { + @doc("Name of the publisher.") + publisherName: string; + + @doc("Data product information.") + dataProducts: DataProductInformation[]; +} + +@doc("Data Product Information") +model DataProductInformation { + @doc("Name of data product.") + dataProductName: string; + + @doc("Description about data product.") + description: string; + + @doc("Version information of data product.") + dataProductVersions: DataProductVersion[]; +} + +@doc("Data Product Version.") +model DataProductVersion { + @doc("Version of data product") + version: string; +} + +@doc("The details for role assignment common properties.") +model RoleAssignmentCommonProperties { + @doc("Role Id of the Built-In Role") + roleId: string; + + @doc("Object ID of the AAD principal or security-group.") + principalId: string; + + @doc("User name.") + userName: string; + + @doc("Data Type Scope at which the role assignment is created.") + dataTypeScope: string[]; + + @doc("Type of the principal Id: User, Group or ServicePrincipal") + principalType: string; + + @doc("Data Product role to be assigned to a user.") + role: DataProductUserRole; +} + +@doc("The details for role assignment response.") +model RoleAssignmentDetail { + @doc("Role Id of the Built-In Role") + roleId: string; + + @doc("Object ID of the AAD principal or security-group.") + principalId: string; + + @doc("User name.") + userName: string; + + @doc("Data Type Scope at which the role assignment is created.") + dataTypeScope: string[]; + + @doc("Type of the principal Id: User, Group or ServicePrincipal") + principalType: string; + + @doc("Data Product role to be assigned to a user.") + role: DataProductUserRole; + + @doc("Id of role assignment request") + roleAssignmentId: string; +} + +@doc("The data type properties") +model DataTypeProperties { + @doc("Latest provisioning state of data product.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("State of data type.") + @visibility("read", "create", "update") + state?: DataTypeState; + + @doc("Reason for the state of data type.") + @visibility("read") + stateReason?: string; + + @doc("Field for storage output retention in days.") + @visibility("read", "create", "update") + storageOutputRetention?: int32; + + @doc("Field for database cache retention in days.") + @visibility("read", "create", "update") + databaseCacheRetention?: int32; + + @doc("Field for database data retention in days.") + @visibility("read", "create", "update") + databaseRetention?: int32; + + @doc("Url for data visualization.") + @visibility("read") + visualizationUrl?: string; +} + +@doc("The details for container sas creation.") +model ContainerSaS { + @doc("Sas token start timestamp.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startTimeStamp: utcDateTime; + + @doc("Sas token expiry timestamp.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expiryTimeStamp: utcDateTime; + + @doc("Ip Address") + ipAddress: string; +} + +@doc("Details of storage container account sas token .") +model ContainerSasToken { + @doc("Field to specify storage container sas token.") + @secret + storageContainerSasToken: string; +} + +@doc("The details for storage account sas creation.") +model AccountSas { + @doc("Sas token start timestamp.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startTimeStamp: utcDateTime; + + @doc("Sas token expiry timestamp.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expiryTimeStamp: utcDateTime; + + @doc("Ip Address") + ipAddress: string; +} + +@doc("Details of storage account sas token .") +model AccountSasToken { + @doc("Field to specify storage account sas token.") + @secret + storageAccountSasToken: string; +} + +@doc("list role assignments.") +model ListRoleAssignments { + @doc("Count of role assignments.") + count: int32; + + @doc("list of role assignments") + roleAssignmentResponse: RoleAssignmentDetail[]; +} + +@doc("Details for KeyVault.") +model KeyVaultInfo { + @doc("key vault url.") + keyVaultUrl: string; +} + +@doc("Resource Access Rules.") +model ResourceAccessRules { + @doc("The tenant ID of resource.") + tenantId: string; + + @doc("Resource ID") + resourceId: string; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..e8d224c8f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/networkanalytics.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/playwrighttesting.md b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/playwrighttesting.md new file mode 100644 index 0000000000..d053253b83 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/playwrighttesting.md @@ -0,0 +1,13 @@ +```yaml +require: https://github.com/Azure/azure-rest-api-specs/blob/5a281cf0d538de6dad0c70eda7ee901c60a11e6b/specification/playwrighttesting/resource-manager/readme.md +title: "Microsoft AzurePlaywrightService Management API" +clear-output-folder: false +isAzureSpec: true +isArm: true +namespace: "Microsoft.AzurePlaywrightService" +``` + +```yaml +request-path-to-resource-name: + /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name}: Quota +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/resources.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/resources.json new file mode 100644 index 0000000000..9a71bcc7f6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/resources.json @@ -0,0 +1,147 @@ +{ + "Resources": { + "Account": { + "Name": "Account", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name}", + "Method": "GET", + "OperationID": "Accounts_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Account" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name}", + "Method": "PUT", + "OperationID": "Accounts_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a Account" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name}", + "Method": "PATCH", + "OperationID": "Accounts_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update a Account" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name}", + "Method": "DELETE", + "OperationID": "Accounts_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a Account" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts", + "Method": "GET", + "OperationID": "Accounts_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Account resources by resource group" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetAccounts", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/accounts", + "Method": "GET", + "OperationID": "Accounts_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Account resources by subscription ID" + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "Account", + "ResourceType": "Microsoft.AzurePlaywrightService/accounts", + "ResourceKey": "name", + "ResourceKeySegment": "accounts", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Quota": { + "Name": "Quota", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name}", + "Method": "GET", + "OperationID": "Quotas_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get quota by name." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas", + "Method": "GET", + "OperationID": "Quotas_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List quotas for a given subscription Id." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["SubscriptionResource"], + "SwaggerModelName": "Quota", + "ResourceType": "Microsoft.AzurePlaywrightService/locations/quotas", + "ResourceKey": "name", + "ResourceKeySegment": "quotas", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": true, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp new file mode 100644 index 0000000000..a2b505309a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp @@ -0,0 +1,38 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.AzurePlaywrightService; +@doc("An account resource") +model Account is TrackedResource { + @doc("Name of account") + @maxLength(64) + @minLength(3) + @pattern("^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$") + @path + @key("name") + @segment("accounts") + name: string; +} + +@armResourceOperations +interface Accounts { + @doc("Get a Account") + get is ArmResourceRead; + @doc("Create a Account") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a Account") + update is ArmResourcePatchSync; + @doc("Delete a Account") + delete is ArmResourceDeleteAsync; + @doc("List Account resources by resource group") + listByResourceGroup is ArmResourceListByParent; + @doc("List Account resources by subscription ID") + listBySubscription is ArmListBySubscription; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp new file mode 100644 index 0000000000..265c873d2b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp @@ -0,0 +1,28 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.AzurePlaywrightService; +@doc("A quota resource") +@locationResource +model Quota is ProxyResource { + @doc("The quota name.") + @path + @key("name") + @segment("quotas") + name: QuotaNames; +} + +@armResourceOperations +interface Quotas { + @doc("Get quota by name.") + get is ArmResourceRead; + @doc("List quotas for a given subscription Id.") + listBySubscription is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp new file mode 100644 index 0000000000..f12cab8719 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp @@ -0,0 +1,29 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./Account.tsp"; +import "./Quota.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "Microsoft AzurePlaywrightService Management API", +}) +@versioned(Versions) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) +@doc("Azure Playwright testing management service") +namespace Microsoft.AzurePlaywrightService; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2023_10_01_preview: "2023-10-01-preview", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp new file mode 100644 index 0000000000..96f5cde292 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp @@ -0,0 +1,115 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; + +namespace Microsoft.AzurePlaywrightService; + +interface Operations extends Azure.ResourceManager.Operations {} + +enum Origin { + user, + system, + `user,system`, +} + +enum ActionType { + Internal, +} + +enum EnablementStatus { + @doc("The feature is Enabled.") Enabled, + @doc("The feature is Disabled.") Disabled, +} + +enum ProvisioningState { + @doc("Resource has been created.") Succeeded, + @doc("Resource creation failed.") Failed, + @doc("Resource creation was canceled.") Canceled, + @doc("Deletion in progress") Deleting, + @doc("Change accepted for processing") Accepted, +} + +enum CreatedByType { + User, + Application, + ManagedIdentity, + Key, +} + +enum FreeTrialState { + @doc("The free-trial is Active.") Active, + @doc("The free-trial is Expired.") Expired, +} + +enum QuotaNames { + @doc("The quota details for scalable execution feature. When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.") + ScalableExecution, +} + +@doc("Account properties") +model AccountProperties { + @doc("The Playwright testing dashboard URI for the account resource.") + @visibility("read") + dashboardUri?: string; + + @doc("This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created.") + regionalAffinity?: EnablementStatus; + + @doc("When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.") + scalableExecution?: EnablementStatus; + + @doc("When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting.") + reporting?: EnablementStatus; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("Quota properties") +model QuotaProperties { + @doc("The free-trial quota.") + freeTrial?: FreeTrialProperties; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("The free-trial properties") +model FreeTrialProperties { + @doc("The playwright account id.") + @visibility("read") + accountId: string; + + @doc("The free-trial createdAt utcDateTime.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdAt: utcDateTime; + + @doc("The free-trial expiryAt utcDateTime.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expiryAt: utcDateTime; + + @doc("The free-trial allocated limit value eg. allocated free minutes.") + @visibility("read") + allocatedValue: int32; + + @doc("The free-trial used value eg. used free minutes.") + @visibility("read") + usedValue: int32; + + @doc("The free-trial percentage used.") + @visibility("read") + @maxValue(100) + percentageUsed: float32; + + @doc("The free-trial state.") + @visibility("read") + state: FreeTrialState; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..d9531cebe6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/playwrighttesting.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/resources.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/resources.json new file mode 100644 index 0000000000..218f28ef76 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/resources.json @@ -0,0 +1,256 @@ +{ + "Resources": { + "TrafficController": { + "Name": "TrafficController", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}", + "Method": "GET", + "OperationID": "TrafficControllerInterface_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a TrafficController" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}", + "Method": "PUT", + "OperationID": "TrafficControllerInterface_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a TrafficController" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}", + "Method": "PATCH", + "OperationID": "TrafficControllerInterface_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update a TrafficController" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}", + "Method": "DELETE", + "OperationID": "TrafficControllerInterface_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a TrafficController" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers", + "Method": "GET", + "OperationID": "TrafficControllerInterface_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List TrafficController resources by resource group" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetTrafficControllers", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceNetworking/trafficControllers", + "Method": "GET", + "OperationID": "TrafficControllerInterface_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List TrafficController resources by subscription ID" + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "TrafficController", + "ResourceType": "Microsoft.ServiceNetworking/trafficControllers", + "ResourceKey": "trafficControllerName", + "ResourceKeySegment": "trafficControllers", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Association": { + "Name": "Association", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}", + "Method": "GET", + "OperationID": "AssociationsInterface_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Association" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}", + "Method": "PUT", + "OperationID": "AssociationsInterface_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a Association" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}", + "Method": "PATCH", + "OperationID": "AssociationsInterface_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update a Association" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}", + "Method": "DELETE", + "OperationID": "AssociationsInterface_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a Association" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations", + "Method": "GET", + "OperationID": "AssociationsInterface_ListByTrafficController", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByTrafficController", + "NextPageMethod": "ListByTrafficControllerNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Association resources by TrafficController" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["TrafficController"], + "SwaggerModelName": "Association", + "ResourceType": "Microsoft.ServiceNetworking/trafficControllers/associations", + "ResourceKey": "associationName", + "ResourceKeySegment": "associations", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Frontend": { + "Name": "Frontend", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}", + "Method": "GET", + "OperationID": "FrontendsInterface_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Frontend" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}", + "Method": "PUT", + "OperationID": "FrontendsInterface_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a Frontend" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}", + "Method": "PATCH", + "OperationID": "FrontendsInterface_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update a Frontend" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}", + "Method": "DELETE", + "OperationID": "FrontendsInterface_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a Frontend" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends", + "Method": "GET", + "OperationID": "FrontendsInterface_ListByTrafficController", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByTrafficController", + "NextPageMethod": "ListByTrafficControllerNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Frontend resources by TrafficController" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["TrafficController"], + "SwaggerModelName": "Frontend", + "ResourceType": "Microsoft.ServiceNetworking/trafficControllers/frontends", + "ResourceKey": "frontendName", + "ResourceKeySegment": "frontends", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/servicenetworking.md b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/servicenetworking.md new file mode 100644 index 0000000000..c4d65e72bd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/servicenetworking.md @@ -0,0 +1,8 @@ +```yaml +require: https://github.com/Azure/azure-rest-api-specs/blob/5a281cf0d538de6dad0c70eda7ee901c60a11e6b/specification/servicenetworking/resource-manager/readme.md +title: "Traffic Controller Provider management API." +clear-output-folder: false +isAzureSpec: true +isArm: true +namespace: "Microsoft.ServiceNetworking" +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp new file mode 100644 index 0000000000..44dbcc0851 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp @@ -0,0 +1,36 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./TrafficController.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.ServiceNetworking; +@doc("Association Subresource of Traffic Controller") +@parentResource(TrafficController) +model Association is TrackedResource { + @doc("Name of Association") + @pattern("^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$") + @path + @key("associationName") + @segment("associations") + name: string; +} + +@armResourceOperations +interface AssociationsInterface { + @doc("Get a Association") + get is ArmResourceRead; + @doc("Create a Association") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a Association") + update is ArmResourcePatchSync; + @doc("Delete a Association") + delete is ArmResourceDeleteAsync; + @doc("List Association resources by TrafficController") + listByTrafficController is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp new file mode 100644 index 0000000000..7d4d454beb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp @@ -0,0 +1,36 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./TrafficController.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.ServiceNetworking; +@doc("Frontend Subresource of Traffic Controller.") +@parentResource(TrafficController) +model Frontend is TrackedResource { + @doc("Frontends") + @pattern("^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$") + @path + @key("frontendName") + @segment("frontends") + name: string; +} + +@armResourceOperations +interface FrontendsInterface { + @doc("Get a Frontend") + get is ArmResourceRead; + @doc("Create a Frontend") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a Frontend") + update is ArmTagsPatchSync; + @doc("Delete a Frontend") + delete is ArmResourceDeleteAsync; + @doc("List Frontend resources by TrafficController") + listByTrafficController is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp new file mode 100644 index 0000000000..52369417fc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp @@ -0,0 +1,36 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.ServiceNetworking; +@doc("Concrete tracked resource types can be created by aliasing this type using a specific property type.") +model TrafficController is TrackedResource { + @doc("traffic controller name for path") + @pattern("^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$") + @path + @key("trafficControllerName") + @segment("trafficControllers") + name: string; +} + +@armResourceOperations +interface TrafficControllerInterface { + @doc("Get a TrafficController") + get is ArmResourceRead; + @doc("Create a TrafficController") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a TrafficController") + update is ArmTagsPatchSync; + @doc("Delete a TrafficController") + delete is ArmResourceDeleteAsync; + @doc("List TrafficController resources by resource group") + listByResourceGroup is ArmResourceListByParent; + @doc("List TrafficController resources by subscription ID") + listBySubscription is ArmListBySubscription; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp new file mode 100644 index 0000000000..58a6d5ad04 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp @@ -0,0 +1,30 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./TrafficController.tsp"; +import "./Association.tsp"; +import "./Frontend.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "Traffic Controller Provider management API.", +}) +@versioned(Versions) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) +@doc("Traffic Controller Provider management API.") +namespace Microsoft.ServiceNetworking; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2023_11_01: "2023-11-01", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp new file mode 100644 index 0000000000..90db8d685c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp @@ -0,0 +1,103 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; + +namespace Microsoft.ServiceNetworking; + +interface Operations extends Azure.ResourceManager.Operations {} + +enum Origin { + user, + system, + `user,system`, +} + +enum ActionType { + Internal, +} + +enum ProvisioningState { + Provisioning, + Updating, + Deleting, + Accepted, + Succeeded, + Failed, + Canceled, +} + +enum CreatedByType { + User, + Application, + ManagedIdentity, + Key, +} + +enum AssociationType { + subnets, +} + +@doc("Traffic Controller Properties.") +model TrafficControllerProperties { + @doc("Configuration Endpoints.") + @visibility("read") + configurationEndpoints?: string[]; + + @doc("Frontends References List") + @visibility("read") + frontends?: ResourceId[]; + + @doc("Associations References List") + @visibility("read") + associations?: ResourceId[]; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("Resource ID definition used by parent to reference child resources.") +model ResourceId { + @doc("Resource ID of child resource.") + id: string; +} + +@doc("Association Properties.") +model AssociationProperties { + @doc("Association Type") + associationType: AssociationType; + + @doc("Association Subnet") + subnet?: AssociationSubnet; + + @doc("Provisioning State of Traffic Controller Association Resource") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("Association Subnet.") +model AssociationSubnet { + @doc("Association ID.") + id: string; +} + +@doc("Association Subnet.") +model AssociationSubnetUpdate { + @doc("Association ID.") + id?: string; +} + +@doc("Frontend Properties.") +model FrontendProperties { + @doc("The Fully Qualified Domain Name of the DNS record associated to a Traffic Controller frontend.") + @visibility("read") + fqdn?: string; + + @doc("Provisioning State of Traffic Controller Frontend Resource") + @visibility("read") + provisioningState?: ProvisioningState; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..4498bece90 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/TrafficController.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/resources.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/resources.json new file mode 100644 index 0000000000..f6b723dc9b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/resources.json @@ -0,0 +1,680 @@ +{ + "Resources": { + "Catalog": { + "Name": "Catalog", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", + "Method": "GET", + "OperationID": "Catalogs_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Catalog" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", + "Method": "PUT", + "OperationID": "Catalogs_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a Catalog" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", + "Method": "PATCH", + "OperationID": "Catalogs_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update a Catalog" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}", + "Method": "DELETE", + "OperationID": "Catalogs_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a Catalog" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs", + "Method": "GET", + "OperationID": "Catalogs_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Catalog resources by resource group" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetCatalogs", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzureSphere/catalogs", + "Method": "GET", + "OperationID": "Catalogs_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Catalog resources by subscription ID" + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "CountDevices", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/countDevices", + "Method": "POST", + "OperationID": "Catalogs_CountDevices", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Counts devices in catalog." + }, + { + "Name": "GetDeployments", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeployments", + "Method": "POST", + "OperationID": "Catalogs_ListDeployments", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListDeployments", + "NextPageMethod": "ListDeploymentsNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists deployments for catalog." + }, + { + "Name": "GetDeviceGroups", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceGroups", + "Method": "POST", + "OperationID": "Catalogs_ListDeviceGroups", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListDeviceGroups", + "NextPageMethod": "ListDeviceGroupsNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List the device groups for the catalog." + }, + { + "Name": "GetDeviceInsights", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceInsights", + "Method": "POST", + "OperationID": "Catalogs_ListDeviceInsights", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListDeviceInsights", + "NextPageMethod": "ListDeviceInsightsNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists device insights for catalog." + }, + { + "Name": "GetDevices", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDevices", + "Method": "POST", + "OperationID": "Catalogs_ListDevices", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListDevices", + "NextPageMethod": "ListDevicesNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists devices for catalog." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "Catalog", + "ResourceType": "Microsoft.AzureSphere/catalogs", + "ResourceKey": "catalogName", + "ResourceKeySegment": "catalogs", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Certificate": { + "Name": "Certificate", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}", + "Method": "GET", + "OperationID": "Certificates_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Certificate" + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates", + "Method": "GET", + "OperationID": "Certificates_ListByCatalog", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByCatalog", + "NextPageMethod": "ListByCatalogNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Certificate resources by Catalog" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "RetrieveCertChain", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveCertChain", + "Method": "POST", + "OperationID": "Certificates_RetrieveCertChain", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieves cert chain." + }, + { + "Name": "RetrieveProofOfPossessionNonce", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveProofOfPossessionNonce", + "Method": "POST", + "OperationID": "Certificates_RetrieveProofOfPossessionNonce", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the proof of possession nonce." + } + ], + "Parents": ["Catalog"], + "SwaggerModelName": "Certificate", + "ResourceType": "Microsoft.AzureSphere/catalogs/certificates", + "ResourceKey": "serialNumber", + "ResourceKeySegment": "certificates", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Image": { + "Name": "Image", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}", + "Method": "GET", + "OperationID": "Images_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Image" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}", + "Method": "PUT", + "OperationID": "Images_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a Image" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}", + "Method": "PUT", + "OperationID": "Images_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a Image" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}", + "Method": "DELETE", + "OperationID": "Images_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a Image" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images", + "Method": "GET", + "OperationID": "Images_ListByCatalog", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByCatalog", + "NextPageMethod": "ListByCatalogNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Image resources by Catalog" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["Catalog"], + "SwaggerModelName": "Image", + "ResourceType": "Microsoft.AzureSphere/catalogs/images", + "ResourceKey": "imageName", + "ResourceKeySegment": "images", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Product": { + "Name": "Product", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", + "Method": "GET", + "OperationID": "Products_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Product. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product name." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", + "Method": "PUT", + "OperationID": "Products_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a Product. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product name." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", + "Method": "PATCH", + "OperationID": "Products_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a Product. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product name." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}", + "Method": "DELETE", + "OperationID": "Products_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a Product. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product name\u0027" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products", + "Method": "GET", + "OperationID": "Products_ListByCatalog", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByCatalog", + "NextPageMethod": "ListByCatalogNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Product resources by Catalog" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "CountDevices", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/countDevices", + "Method": "POST", + "OperationID": "Products_CountDevices", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Counts devices in product. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product name." + }, + { + "Name": "GenerateDefaultDeviceGroups", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/generateDefaultDeviceGroups", + "Method": "POST", + "OperationID": "Products_GenerateDefaultDeviceGroups", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "GenerateDefaultDeviceGroups", + "NextPageMethod": "GenerateDefaultDeviceGroupsNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Generates default device groups for the product. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product name." + } + ], + "Parents": ["Catalog"], + "SwaggerModelName": "Product", + "ResourceType": "Microsoft.AzureSphere/catalogs/products", + "ResourceKey": "productName", + "ResourceKeySegment": "products", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DeviceGroup": { + "Name": "DeviceGroup", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", + "Method": "GET", + "OperationID": "DeviceGroups_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a DeviceGroup. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", + "Method": "PUT", + "OperationID": "DeviceGroups_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a DeviceGroup. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", + "Method": "PATCH", + "OperationID": "DeviceGroups_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a DeviceGroup. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}", + "Method": "DELETE", + "OperationID": "DeviceGroups_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a DeviceGroup. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups", + "Method": "GET", + "OperationID": "DeviceGroups_ListByProduct", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByProduct", + "NextPageMethod": "ListByProductNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List DeviceGroup resources by Product. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product name." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "ClaimDevices", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/claimDevices", + "Method": "POST", + "OperationID": "DeviceGroups_ClaimDevices", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Bulk claims the devices. Use \u0027.unassigned\u0027 or \u0027.default\u0027 for the device group and product names when bulk claiming devices to a catalog only." + }, + { + "Name": "CountDevices", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices", + "Method": "POST", + "OperationID": "DeviceGroups_CountDevices", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Counts devices in device group. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name." + } + ], + "Parents": ["Product"], + "SwaggerModelName": "DeviceGroup", + "ResourceType": "Microsoft.AzureSphere/catalogs/products/deviceGroups", + "ResourceKey": "deviceGroupName", + "ResourceKeySegment": "deviceGroups", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Deployment": { + "Name": "Deployment", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", + "Method": "GET", + "OperationID": "Deployments_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Deployment. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", + "Method": "PUT", + "OperationID": "Deployments_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a Deployment. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", + "Method": "PUT", + "OperationID": "Deployments_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a Deployment. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}", + "Method": "DELETE", + "OperationID": "Deployments_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a Deployment. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments", + "Method": "GET", + "OperationID": "Deployments_ListByDeviceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByDeviceGroup", + "NextPageMethod": "ListByDeviceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Deployment resources by DeviceGroup. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DeviceGroup"], + "SwaggerModelName": "Deployment", + "ResourceType": "Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments", + "ResourceKey": "deploymentName", + "ResourceKeySegment": "deployments", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Device": { + "Name": "Device", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", + "Method": "GET", + "OperationID": "Devices_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Device. Use \u0027.unassigned\u0027 or \u0027.default\u0027 for the device group and product names when a device does not belong to a device group and product." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", + "Method": "PUT", + "OperationID": "Devices_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a Device. Use \u0027.unassigned\u0027 or \u0027.default\u0027 for the device group and product names to claim a device to the catalog only." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", + "Method": "PATCH", + "OperationID": "Devices_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a Device. Use \u0027.unassigned\u0027 or \u0027.default\u0027 for the device group and product names to move a device to the catalog level." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}", + "Method": "DELETE", + "OperationID": "Devices_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a Device" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices", + "Method": "GET", + "OperationID": "Devices_ListByDeviceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByDeviceGroup", + "NextPageMethod": "ListByDeviceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Device resources by DeviceGroup. \u0027.default\u0027 and \u0027.unassigned\u0027 are system defined values and cannot be used for product or device group name." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GenerateCapabilityImage", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage", + "Method": "POST", + "OperationID": "Devices_GenerateCapabilityImage", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Generates the capability image for the device. Use \u0027.unassigned\u0027 or \u0027.default\u0027 for the device group and product names to generate the image for a device that does not belong to a specific device group and product." + } + ], + "Parents": ["DeviceGroup"], + "SwaggerModelName": "Device", + "ResourceType": "Microsoft.AzureSphere/catalogs/products/deviceGroups/devices", + "ResourceKey": "deviceName", + "ResourceKeySegment": "devices", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/sphere.md b/packages/extensions/openapi-to-typespec/test/arm-sphere/sphere.md new file mode 100644 index 0000000000..1b7bef94eb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/sphere.md @@ -0,0 +1,8 @@ +```yaml +require: https://github.com/Azure/azure-rest-api-specs/blob/a89f3906ba60257ae28a2eed756a1ee4ca72ed51/specification/sphere/resource-manager/readme.md +title: "Azure Sphere resource management API." +clear-output-folder: false +guessResourceKey: false +isAzureSpec: true +isArm: true +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp new file mode 100644 index 0000000000..869cf0ab7a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp @@ -0,0 +1,138 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.AzureSphere; +@doc("An Azure Sphere catalog") +model Catalog is TrackedResource { + @doc("Name of catalog") + @pattern("^[A-Za-z0-9_-]{1,50}$") + @path + @key("catalogName") + @segment("catalogs") + name: string; +} + +@armResourceOperations +interface Catalogs { + @doc("Get a Catalog") + get is ArmResourceRead; + @doc("Create a Catalog") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a Catalog") + update is ArmTagsPatchSync; + @doc("Delete a Catalog") + delete is ArmResourceDeleteAsync; + @doc("List Catalog resources by resource group") + listByResourceGroup is ArmResourceListByParent; + @doc("List Catalog resources by subscription ID") + listBySubscription is ArmListBySubscription; + @doc("Counts devices in catalog.") + countDevices is ArmResourceActionSync; + @doc("Lists deployments for catalog.") + listDeployments is ArmResourceActionSync< + Catalog, + void, + ResourceListResult, + { + ...BaseParameters; + + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; + + @doc("The number of result items to return.") + @query("$top") + top?: int32; + + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; + @doc("List the device groups for the catalog.") + listDeviceGroups is ArmResourceActionSync< + Catalog, + ListDeviceGroupsRequest, + ResourceListResult, + { + ...BaseParameters; + + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; + + @doc("The number of result items to return.") + @query("$top") + top?: int32; + + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; + @doc("Lists device insights for catalog.") + listDeviceInsights is ArmResourceActionSync< + Catalog, + void, + PagedDeviceInsight, + { + ...BaseParameters; + + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; + + @doc("The number of result items to return.") + @query("$top") + top?: int32; + + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; + @doc("Lists devices for catalog.") + listDevices is ArmResourceActionSync< + Catalog, + void, + ResourceListResult, + { + ...BaseParameters; + + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; + + @doc("The number of result items to return.") + @query("$top") + top?: int32; + + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp new file mode 100644 index 0000000000..eef2369bc3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp @@ -0,0 +1,62 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Catalog.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.AzureSphere; +@doc("An certificate resource belonging to a catalog resource.") +@parentResource(Catalog) +model Certificate is ProxyResource { + @doc("Serial number of the certificate. Use '.default' to get current active certificate.") + @path + @key("serialNumber") + @segment("certificates") + name: string; +} + +@armResourceOperations +interface Certificates { + @doc("Get a Certificate") + get is ArmResourceRead; + @doc("List Certificate resources by Catalog") + listByCatalog is ArmResourceListByParent< + Certificate, + { + ...BaseParameters; + + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; + + @doc("The number of result items to return.") + @query("$top") + top?: int32; + + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; + @doc("Retrieves cert chain.") + retrieveCertChain is ArmResourceActionSync< + Certificate, + void, + CertificateChainResponse + >; + @doc("Gets the proof of possession nonce.") + retrieveProofOfPossessionNonce is ArmResourceActionSync< + Certificate, + ProofOfPossessionNonceRequest, + ProofOfPossessionNonceResponse + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp new file mode 100644 index 0000000000..99143202c2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp @@ -0,0 +1,54 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DeviceGroup.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.AzureSphere; +@doc("An deployment resource belonging to a device group resource.") +@parentResource(DeviceGroup) +model Deployment is ProxyResource { + @doc("Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.") + @path + @key("deploymentName") + @segment("deployments") + name: string; +} + +@armResourceOperations +interface Deployments { + @doc("Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + get is ArmResourceRead; + @doc("Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + delete is ArmResourceDeleteAsync; + @doc("List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + listByDeviceGroup is ArmResourceListByParent< + Deployment, + { + ...BaseParameters; + + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; + + @doc("The number of result items to return.") + @query("$top") + top?: int32; + + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp new file mode 100644 index 0000000000..b9a03e0e57 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp @@ -0,0 +1,42 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DeviceGroup.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.AzureSphere; +@doc("An device resource belonging to a device group resource.") +@parentResource(DeviceGroup) +model Device is ProxyResource { + @doc("Device name") + @pattern("^[a-zA-Z0-9-]{128}$") + @path + @key("deviceName") + @segment("devices") + name: string; +} + +@armResourceOperations +interface Devices { + @doc("Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product.") + get is ArmResourceRead; + @doc("Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level.") + update is ArmResourcePatchAsync; + @doc("Delete a Device") + delete is ArmResourceDeleteAsync; + @doc("List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + listByDeviceGroup is ArmResourceListByParent; + @doc("Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product.") + generateCapabilityImage is ArmResourceActionAsync< + Device, + GenerateCapabilityImageRequest, + SignedCapabilityImageResponse + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp new file mode 100644 index 0000000000..de7e6b89fd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp @@ -0,0 +1,64 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Product.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.AzureSphere; +@doc("An device group resource belonging to a product resource.") +@parentResource(Product) +model DeviceGroup is ProxyResource { + @doc("Name of device group.") + @pattern("^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$") + @path + @key("deviceGroupName") + @segment("deviceGroups") + name: string; +} + +@armResourceOperations +interface DeviceGroups { + @doc("Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + get is ArmResourceRead; + @doc("Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + update is ArmResourcePatchAsync; + @doc("Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + delete is ArmResourceDeleteAsync; + @doc("List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + listByProduct is ArmResourceListByParent< + DeviceGroup, + { + ...BaseParameters; + + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; + + @doc("The number of result items to return.") + @query("$top") + top?: int32; + + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; + @doc("Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk claiming devices to a catalog only.") + claimDevices is ArmResourceActionNoResponseContentAsync< + DeviceGroup, + ClaimDevicesRequest + >; + @doc("Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + countDevices is ArmResourceActionSync; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp new file mode 100644 index 0000000000..6f4ac2a2ac --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp @@ -0,0 +1,54 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Catalog.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.AzureSphere; +@doc("An image resource belonging to a catalog resource.") +@parentResource(Catalog) +model Image is ProxyResource { + @doc("Image name. Use .default for image creation.") + @path + @key("imageName") + @segment("images") + name: string; +} + +@armResourceOperations +interface Images { + @doc("Get a Image") + get is ArmResourceRead; + @doc("Create a Image") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Delete a Image") + delete is ArmResourceDeleteAsync; + @doc("List Image resources by Catalog") + listByCatalog is ArmResourceListByParent< + Image, + { + ...BaseParameters; + + @doc("Filter the result list using the given expression") + @query("$filter") + filter?: string; + + @doc("The number of result items to return.") + @query("$top") + top?: int32; + + @doc("The number of result items to skip.") + @query("$skip") + skip?: int32; + + @doc("The maximum number of result items per page.") + @query("$maxpagesize") + maxpagesize?: int32; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp new file mode 100644 index 0000000000..6612b66f7b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp @@ -0,0 +1,44 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Catalog.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.AzureSphere; +@doc("An product resource belonging to a catalog resource.") +@parentResource(Catalog) +model Product is ProxyResource { + @doc("Name of product.") + @pattern("^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$") + @path + @key("productName") + @segment("products") + name: string; +} + +@armResourceOperations +interface Products { + @doc("Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + get is ArmResourceRead; + @doc("Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + update is ArmResourcePatchAsync; + @doc("Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'") + delete is ArmResourceDeleteAsync; + @doc("List Product resources by Catalog") + listByCatalog is ArmResourceListByParent; + @doc("Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + countDevices is ArmResourceActionSync; + @doc("Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + generateDefaultDeviceGroups is ArmResourceActionSync< + Product, + void, + ResourceListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp new file mode 100644 index 0000000000..733c48e408 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp @@ -0,0 +1,34 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./Catalog.tsp"; +import "./Certificate.tsp"; +import "./Image.tsp"; +import "./Product.tsp"; +import "./DeviceGroup.tsp"; +import "./Deployment.tsp"; +import "./Device.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "Azure Sphere resource management API.", +}) +@versioned(Versions) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) +@doc("Azure Sphere resource management API.") +namespace Microsoft.AzureSphere; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2022_09_01_preview: "2022-09-01-preview", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp new file mode 100644 index 0000000000..e24be0e9ac --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp @@ -0,0 +1,360 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; + +namespace Microsoft.AzureSphere; + +interface Operations extends Azure.ResourceManager.Operations {} + +enum Origin { + user, + system, + `user,system`, +} + +enum ActionType { + Internal, +} + +enum ProvisioningState { + @doc("Resource has been created.") Succeeded, + @doc("Resource creation failed.") Failed, + @doc("Resource creation was canceled.") Canceled, + @doc("The resource is being provisioned") Provisioning, + @doc("The resource is being updated") Updating, + @doc("The resource is being deleted") Deleting, + @doc("The resource create request has been accepted") Accepted, +} + +enum CreatedByType { + User, + Application, + ManagedIdentity, + Key, +} + +enum CertificateStatus { + @doc("Certificate is active") Active, + @doc("Certificate is inactive") Inactive, + @doc("Certificate has expired") Expired, + @doc("Certificate has been revoked") Revoked, +} + +enum RegionalDataBoundary { + @doc("No data boundary") None, + @doc("EU data boundary") EU, +} + +enum ImageType { + @doc("Invalid image.") InvalidImageType, + @doc("One Bl image type") OneBl, + @doc("Pluton image type") PlutonRuntime, + @doc("Wifi firmware image type") WifiFirmware, + @doc("Security monitor image type") SecurityMonitor, + @doc("Normal world loader image type") NormalWorldLoader, + @doc("Normal world dtb image type") NormalWorldDtb, + @doc("Normal world kernel image type") NormalWorldKernel, + @doc("Root FS image type") RootFs, + @doc("Services image type") Services, + @doc("Applications image type") Applications, + @doc("FW config image type") FwConfig, + @doc("Boot manifest image type") BootManifest, + @doc("Nwfs image type") Nwfs, + @doc("Trusted key store image type") TrustedKeystore, + @doc("Policy image type") Policy, + @doc("Customer board config image type") CustomerBoardConfig, + @doc("Update certificate store image type") UpdateCertStore, + @doc("Base system update manifest image type") BaseSystemUpdateManifest, + @doc("Firmware update manifest image type") FirmwareUpdateManifest, + @doc("Customer update manifest image type") CustomerUpdateManifest, + @doc("Recovery manifest image type") RecoveryManifest, + @doc("manifest set image type") ManifestSet, + @doc("Other image type") Other, +} + +enum OSFeedType { + @doc("Retail OS feed type.") Retail, + @doc("Retail evaluation OS feed type.") RetailEval, +} + +enum UpdatePolicy { + @doc("Update all policy.") UpdateAll, + @doc("No update for 3rd party app policy.") No3rdPartyAppUpdates, +} + +enum AllowCrashDumpCollection { + @doc("Crash dump collection enabled") Enabled, + @doc("Crash dump collection disabled") Disabled, +} + +enum CapabilityType { + @doc("Application development capability") ApplicationDevelopment, + @doc("Field servicing capability") FieldServicing, +} + +@doc("Catalog properties") +model CatalogProperties { + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("The properties of certificate") +model CertificateProperties { + @doc("The certificate as a UTF-8 encoded base 64 string.") + @visibility("read") + certificate?: string; + + @doc("The certificate status.") + @visibility("read") + status?: CertificateStatus; + + @doc("The certificate subject.") + @visibility("read") + subject?: string; + + @doc("The certificate thumbprint.") + @visibility("read") + thumbprint?: string; + + @doc("The certificate expiry date.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expiryUtc?: utcDateTime; + + @doc("The certificate not before date.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + notBeforeUtc?: utcDateTime; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("The certificate chain response.") +model CertificateChainResponse { + @doc("The certificate chain.") + @visibility("read") + certificateChain?: string; +} + +@doc("Request for the proof of possession nonce") +model ProofOfPossessionNonceRequest { + @doc("The proof of possession nonce") + proofOfPossessionNonce: string; +} + +@doc("Result of the action to generate a proof of possession nonce") +model ProofOfPossessionNonceResponse extends CertificateProperties {} + +@doc("Response to the action call for count devices in a catalog.") +model CountDeviceResponse extends CountElementsResponse {} + +@doc("Response of the count for elements.") +model CountElementsResponse { + @doc("Number of children resources in parent resource.") + value: int32; +} + +@doc("The properties of image") +model ImageProperties { + @doc("Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads.") + @visibility("read", "create") + image?: string; + + @doc("Image ID") + @visibility("read", "create") + imageId?: string; + + @doc("Image name") + @visibility("read") + imageName?: string; + + @doc("Regional data boundary for an image") + @visibility("read", "create") + regionalDataBoundary?: RegionalDataBoundary; + + @doc("Location the image") + @visibility("read") + uri?: string; + + @doc("The image description.") + @visibility("read") + description?: string; + + @doc("The image component id.") + @visibility("read") + componentId?: string; + + @doc("The image type.") + @visibility("read") + imageType?: ImageType; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("The properties of deployment") +model DeploymentProperties { + @doc("Deployment ID") + @visibility("read", "create") + deploymentId?: string; + + @doc("Images deployed") + @visibility("read", "create") + deployedImages?: Image[]; + + @doc("Deployment date UTC") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + deploymentDateUtc?: utcDateTime; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("Request of the action to list device groups for a catalog.") +model ListDeviceGroupsRequest { + @doc("Device Group name.") + deviceGroupName?: string; +} + +@doc("The properties of deviceGroup") +model DeviceGroupProperties { + @doc("Description of the device group.") + description?: string; + + @doc("Operating system feed type of the device group.") + osFeedType?: OSFeedType; + + @doc("Update policy of the device group.") + updatePolicy?: UpdatePolicy; + + @doc("Flag to define if the user allows for crash dump collection.") + allowCrashDumpsCollection?: AllowCrashDumpCollection; + + @doc("Regional data boundary for the device group.") + regionalDataBoundary?: RegionalDataBoundary; + + @doc("Deployment status for the device group.") + @visibility("read") + hasDeployment?: boolean; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("Paged collection of DeviceInsight items") +model PagedDeviceInsight is Azure.Core.Page; + +@doc("Device insight report.") +model DeviceInsight { + @doc("Device ID") + deviceId: string; + + @doc("Event description") + description: string; + + @doc("Event start timestamp") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startTimestampUtc: utcDateTime; + + @doc("Event end timestamp") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endTimestampUtc: utcDateTime; + + @doc("Event category") + eventCategory: string; + + @doc("Event class") + eventClass: string; + + @doc("Event type") + eventType: string; + + @doc("Event count") + eventCount: int32; +} + +@doc("The properties of device") +model DeviceProperties { + @doc("Device ID") + @visibility("read", "create") + deviceId?: string; + + @doc("SKU of the chip") + @visibility("read") + chipSku?: string; + + @doc("OS version available for installation when update requested") + @visibility("read") + lastAvailableOsVersion?: string; + + @doc("OS version running on device when update requested") + @visibility("read") + lastInstalledOsVersion?: string; + + @doc("Time when update requested and new OS version available") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastOsUpdateUtc?: utcDateTime; + + @doc("Time when update was last requested") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastUpdateRequestUtc?: utcDateTime; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("The properties of product") +model ProductProperties { + @doc("Description of the product") + description: string; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("Request to the action call to bulk claim devices.") +model ClaimDevicesRequest { + @doc("Device identifiers of the devices to be claimed.") + deviceIdentifiers: string[]; +} + +@doc("Request of the action to create a signed device capability image") +model GenerateCapabilityImageRequest { + @doc("List of capabilities to create") + capabilities: CapabilityType[]; +} + +@doc("Signed device capability image response") +model SignedCapabilityImageResponse { + @doc("The signed device capability image as a UTF-8 encoded base 64 string.") + @visibility("read") + image?: string; +} + +@doc("The properties of device patch") +model DevicePatchProperties { + @doc("Device group id") + deviceGroupId: string; +} + +@doc("Image upload request body.") +model ImageUploadRequestBody { + @doc(".") + images: string; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..94026eee22 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/azuresphere.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/resources.json b/packages/extensions/openapi-to-typespec/test/arm-storage/resources.json new file mode 100644 index 0000000000..e5d18f9e67 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/resources.json @@ -0,0 +1,1316 @@ +{ + "Resources": { + "StorageAccount": { + "Name": "StorageAccount", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}", + "Method": "GET", + "OperationID": "StorageAccounts_GetProperties", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}", + "Method": "PUT", + "OperationID": "StorageAccounts_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}", + "Method": "PATCH", + "OperationID": "StorageAccounts_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}", + "Method": "DELETE", + "OperationID": "StorageAccounts_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a storage account in Microsoft Azure." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts", + "Method": "GET", + "OperationID": "StorageAccounts_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "CheckNameAvailabilityStorageAccount", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability", + "Method": "POST", + "OperationID": "StorageAccounts_CheckNameAvailability", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Checks that the storage account name is valid and is not already in use." + }, + { + "Name": "GetStorageAccounts", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts", + "Method": "GET", + "OperationID": "StorageAccounts_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys", + "Method": "POST", + "OperationID": "StorageAccounts_ListKeys", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListKeys", + "NextPageMethod": null, + "ItemName": "keys", + "NextLinkName": null + }, + "Description": "Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account." + }, + { + "Name": "RegenerateKey", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey", + "Method": "POST", + "OperationID": "StorageAccounts_RegenerateKey", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "RegenerateKey", + "NextPageMethod": null, + "ItemName": "keys", + "NextLinkName": null + }, + "Description": "Regenerates one of the access keys or Kerberos keys for the specified storage account." + }, + { + "Name": "GetAccountSas", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListAccountSas", + "Method": "POST", + "OperationID": "StorageAccounts_ListAccountSAS", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "List SAS credentials of a storage account." + }, + { + "Name": "GetServiceSas", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/ListServiceSas", + "Method": "POST", + "OperationID": "StorageAccounts_ListServiceSAS", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "List service SAS credentials of a specific resource." + }, + { + "Name": "Failover", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/failover", + "Method": "POST", + "OperationID": "StorageAccounts_Failover", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account\u0027s primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to \u0027Planned\u0027. Learn more about the failover options here- https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance" + }, + { + "Name": "HierarchicalNamespaceMigration", + "Path": "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/hnsonmigration", + "Method": "POST", + "OperationID": "StorageAccounts_HierarchicalNamespaceMigration", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Live Migration of storage account to enable Hns" + }, + { + "Name": "AbortHierarchicalNamespaceMigration", + "Path": "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/aborthnsonmigration", + "Method": "POST", + "OperationID": "StorageAccounts_AbortHierarchicalNamespaceMigration", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Abort live Migration of storage account to enable Hns" + }, + { + "Name": "RestoreBlobRanges", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/restoreBlobRanges", + "Method": "POST", + "OperationID": "StorageAccounts_RestoreBlobRanges", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Restore blobs in the specified blob ranges" + }, + { + "Name": "RevokeUserDelegationKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/revokeUserDelegationKeys", + "Method": "POST", + "OperationID": "StorageAccounts_RevokeUserDelegationKeys", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Revoke user delegation keys." + }, + { + "Name": "GetPrivateLinkResources", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateLinkResources", + "Method": "GET", + "OperationID": "PrivateLinkResources_ListByStorageAccount", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByStorageAccount", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Gets the private link resources that need to be created for a storage account." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "StorageAccount", + "ResourceType": "Microsoft.Storage/storageAccounts", + "ResourceKey": "accountName", + "ResourceKeySegment": "storageAccounts", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DeletedAccount": { + "Name": "DeletedAccount", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/deletedAccounts/{deletedAccountName}", + "Method": "GET", + "OperationID": "DeletedAccounts_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get properties of specified deleted account resource." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetDeletedAccounts", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/deletedAccounts", + "Method": "GET", + "OperationID": "DeletedAccounts_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists deleted accounts under the subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["SubscriptionResource"], + "SwaggerModelName": "DeletedAccount", + "ResourceType": "Microsoft.Storage/locations/deletedAccounts", + "ResourceKey": "deletedAccountName", + "ResourceKeySegment": "deletedAccounts", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": true, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ManagementPolicy": { + "Name": "ManagementPolicy", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}", + "Method": "GET", + "OperationID": "ManagementPolicies_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the managementpolicy associated with the specified storage account." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}", + "Method": "PUT", + "OperationID": "ManagementPolicies_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Sets the managementpolicy to the specified storage account." + } + ], + "UpdateOperations": [], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}", + "Method": "DELETE", + "OperationID": "ManagementPolicies_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the managementpolicy associated with the specified storage account." + } + ], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["StorageAccount"], + "SwaggerModelName": "ManagementPolicy", + "ResourceType": "Microsoft.Storage/storageAccounts/managementPolicies", + "ResourceKey": "managementPolicyName", + "ResourceKeySegment": "managementPolicies", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": true + }, + "BlobInventoryPolicy": { + "Name": "BlobInventoryPolicy", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies/{blobInventoryPolicyName}", + "Method": "GET", + "OperationID": "BlobInventoryPolicies_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the blob inventory policy associated with the specified storage account." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies/{blobInventoryPolicyName}", + "Method": "PUT", + "OperationID": "BlobInventoryPolicies_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Sets the blob inventory policy to the specified storage account." + } + ], + "UpdateOperations": [], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies/{blobInventoryPolicyName}", + "Method": "DELETE", + "OperationID": "BlobInventoryPolicies_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the blob inventory policy associated with the specified storage account." + } + ], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["StorageAccount"], + "SwaggerModelName": "BlobInventoryPolicy", + "ResourceType": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "ResourceKey": "blobInventoryPolicyName", + "ResourceKeySegment": "inventoryPolicies", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": true + }, + "StoragePrivateEndpointConnection": { + "Name": "StoragePrivateEndpointConnection", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "GET", + "OperationID": "PrivateEndpointConnections_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the specified private endpoint connection associated with the storage account." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "PUT", + "OperationID": "PrivateEndpointConnections_Put", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update the state of specified private endpoint connection associated with the storage account." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "PUT", + "OperationID": "PrivateEndpointConnections_Put", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update the state of specified private endpoint connection associated with the storage account." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "DELETE", + "OperationID": "PrivateEndpointConnections_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified private endpoint connection associated with the storage account." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections", + "Method": "GET", + "OperationID": "PrivateEndpointConnections_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "List all the private endpoint connections associated with the storage account." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["StorageAccount"], + "SwaggerModelName": "PrivateEndpointConnection", + "ResourceType": "Microsoft.Storage/storageAccounts/privateEndpointConnections", + "ResourceKey": "privateEndpointConnectionName", + "ResourceKeySegment": "privateEndpointConnections", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ObjectReplicationPolicy": { + "Name": "ObjectReplicationPolicy", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}", + "Method": "GET", + "OperationID": "ObjectReplicationPolicies_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the object replication policy of the storage account by policy ID." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}", + "Method": "PUT", + "OperationID": "ObjectReplicationPolicies_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update the object replication policy of the storage account." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}", + "Method": "PUT", + "OperationID": "ObjectReplicationPolicies_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update the object replication policy of the storage account." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}", + "Method": "DELETE", + "OperationID": "ObjectReplicationPolicies_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the object replication policy associated with the specified storage account." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies", + "Method": "GET", + "OperationID": "ObjectReplicationPolicies_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "List the object replication policies associated with the storage account." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["StorageAccount"], + "SwaggerModelName": "ObjectReplicationPolicy", + "ResourceType": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "ResourceKey": "objectReplicationPolicyId", + "ResourceKeySegment": "objectReplicationPolicies", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "LocalUser": { + "Name": "LocalUser", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}", + "Method": "GET", + "OperationID": "LocalUsers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the local user of the storage account by username." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}", + "Method": "PUT", + "OperationID": "LocalUsers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update the properties of a local user associated with the storage account" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}", + "Method": "PUT", + "OperationID": "LocalUsers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update the properties of a local user associated with the storage account" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}", + "Method": "DELETE", + "OperationID": "LocalUsers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the local user associated with the specified storage account." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers", + "Method": "GET", + "OperationID": "LocalUsers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "List the local users associated with the storage account." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}/listKeys", + "Method": "POST", + "OperationID": "LocalUsers_ListKeys", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "List SSH authorized keys and shared key of the local user." + }, + { + "Name": "RegeneratePassword", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}/regeneratePassword", + "Method": "POST", + "OperationID": "LocalUsers_RegeneratePassword", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Regenerate the local user SSH password." + } + ], + "Parents": ["StorageAccount"], + "SwaggerModelName": "LocalUser", + "ResourceType": "Microsoft.Storage/storageAccounts/localUsers", + "ResourceKey": "username", + "ResourceKeySegment": "localUsers", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "EncryptionScope": { + "Name": "EncryptionScope", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}", + "Method": "GET", + "OperationID": "EncryptionScopes_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Returns the properties for the specified encryption scope." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}", + "Method": "PUT", + "OperationID": "EncryptionScopes_Put", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}", + "Method": "PATCH", + "OperationID": "EncryptionScopes_Patch", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist." + } + ], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes", + "Method": "GET", + "OperationID": "EncryptionScopes_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all the encryption scopes available under the specified storage account." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["StorageAccount"], + "SwaggerModelName": "EncryptionScope", + "ResourceType": "Microsoft.Storage/storageAccounts/encryptionScopes", + "ResourceKey": "encryptionScopeName", + "ResourceKeySegment": "encryptionScopes", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "BlobServiceProperty": { + "Name": "BlobServiceProperty", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default", + "Method": "GET", + "OperationID": "BlobServices_GetServiceProperties", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the properties of a storage account\u2019s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default", + "Method": "PUT", + "OperationID": "BlobServices_SetServiceProperties", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Sets the properties of a storage account\u2019s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. " + } + ], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["StorageAccount"], + "SwaggerModelName": "BlobServiceProperties", + "ResourceType": "Microsoft.Storage/storageAccounts/blobServices", + "ResourceKey": "BlobServicesName", + "ResourceKeySegment": "blobServices", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": true + }, + "BlobContainer": { + "Name": "BlobContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}", + "Method": "GET", + "OperationID": "BlobContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets properties of a specified container. " + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}", + "Method": "PUT", + "OperationID": "BlobContainers_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. " + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}", + "Method": "PATCH", + "OperationID": "BlobContainers_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn\u0027t already exist. " + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}", + "Method": "DELETE", + "OperationID": "BlobContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes specified container under its account." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers", + "Method": "GET", + "OperationID": "BlobContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "SetLegalHold", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/setLegalHold", + "Method": "POST", + "OperationID": "BlobContainers_SetLegalHold", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request." + }, + { + "Name": "ClearLegalHold", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/clearLegalHold", + "Method": "POST", + "OperationID": "BlobContainers_ClearLegalHold", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request." + }, + { + "Name": "Lease", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease", + "Method": "POST", + "OperationID": "BlobContainers_Lease", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite." + }, + { + "Name": "ObjectLevelWorm", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/migrate", + "Method": "POST", + "OperationID": "BlobContainers_ObjectLevelWorm", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container." + } + ], + "Parents": ["BlobServiceProperty"], + "SwaggerModelName": "BlobContainer", + "ResourceType": "Microsoft.Storage/storageAccounts/blobServices/containers", + "ResourceKey": "containerName", + "ResourceKeySegment": "containers", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ImmutabilityPolicy": { + "Name": "ImmutabilityPolicy", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default", + "Method": "GET", + "OperationID": "BlobContainers_GetImmutabilityPolicy", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the existing immutability policy along with the corresponding ETag in response headers and body." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default", + "Method": "PUT", + "OperationID": "BlobContainers_CreateOrUpdateImmutabilityPolicy", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation." + } + ], + "UpdateOperations": [], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default", + "Method": "DELETE", + "OperationID": "BlobContainers_DeleteImmutabilityPolicy", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container." + } + ], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "LockImmutabilityPolicy", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/lock", + "Method": "POST", + "OperationID": "BlobContainers_LockImmutabilityPolicy", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation." + }, + { + "Name": "ExtendImmutabilityPolicy", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/extend", + "Method": "POST", + "OperationID": "BlobContainers_ExtendImmutabilityPolicy", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation." + } + ], + "Parents": ["BlobContainer"], + "SwaggerModelName": "ImmutabilityPolicy", + "ResourceType": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "ResourceKey": "immutabilityPolicyName", + "ResourceKeySegment": "immutabilityPolicies", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": true + }, + "FileServiceProperty": { + "Name": "FileServiceProperty", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default", + "Method": "GET", + "OperationID": "FileServices_GetServiceProperties", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default", + "Method": "PUT", + "OperationID": "FileServices_SetServiceProperties", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. " + } + ], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["StorageAccount"], + "SwaggerModelName": "FileServiceProperties", + "ResourceType": "Microsoft.Storage/storageAccounts/fileServices", + "ResourceKey": "FileServicesName", + "ResourceKeySegment": "fileServices", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": true + }, + "FileShare": { + "Name": "FileShare", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}", + "Method": "GET", + "OperationID": "FileShares_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets properties of a specified share." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}", + "Method": "PUT", + "OperationID": "FileShares_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. " + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}", + "Method": "PATCH", + "OperationID": "FileShares_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. " + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}", + "Method": "DELETE", + "OperationID": "FileShares_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes specified share under its account." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares", + "Method": "GET", + "OperationID": "FileShares_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all shares." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Restore", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}/restore", + "Method": "POST", + "OperationID": "FileShares_Restore", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Restore a file share within a valid retention days if share soft delete is enabled" + }, + { + "Name": "Lease", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}/lease", + "Method": "POST", + "OperationID": "FileShares_Lease", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite." + } + ], + "Parents": ["FileServiceProperty"], + "SwaggerModelName": "FileShare", + "ResourceType": "Microsoft.Storage/storageAccounts/fileServices/shares", + "ResourceKey": "shareName", + "ResourceKeySegment": "shares", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "QueueServiceProperty": { + "Name": "QueueServiceProperty", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default", + "Method": "GET", + "OperationID": "QueueServices_GetServiceProperties", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the properties of a storage account\u2019s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default", + "Method": "PUT", + "OperationID": "QueueServices_SetServiceProperties", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Sets the properties of a storage account\u2019s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. " + } + ], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["StorageAccount"], + "SwaggerModelName": "QueueServiceProperties", + "ResourceType": "Microsoft.Storage/storageAccounts/queueServices", + "ResourceKey": "queueServiceName", + "ResourceKeySegment": "queueServices", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": true + }, + "StorageQueue": { + "Name": "StorageQueue", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", + "Method": "GET", + "OperationID": "Queue_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the queue with the specified queue name, under the specified account if it exists." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", + "Method": "PUT", + "OperationID": "Queue_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new queue with the specified queue name, under the specified account." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", + "Method": "PATCH", + "OperationID": "Queue_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Creates a new queue with the specified queue name, under the specified account." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}", + "Method": "DELETE", + "OperationID": "Queue_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the queue with the specified queue name, under the specified account if it exists." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues", + "Method": "GET", + "OperationID": "Queue_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets a list of all the queues under the specified storage account" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["QueueServiceProperty"], + "SwaggerModelName": "StorageQueue", + "ResourceType": "Microsoft.Storage/storageAccounts/queueServices/queues", + "ResourceKey": "queueName", + "ResourceKeySegment": "queues", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "TableServiceProperty": { + "Name": "TableServiceProperty", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default", + "Method": "GET", + "OperationID": "TableServices_GetServiceProperties", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the properties of a storage account\u2019s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default", + "Method": "PUT", + "OperationID": "TableServices_SetServiceProperties", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Sets the properties of a storage account\u2019s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. " + } + ], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["StorageAccount"], + "SwaggerModelName": "TableServiceProperties", + "ResourceType": "Microsoft.Storage/storageAccounts/tableServices", + "ResourceKey": "tableServiceName", + "ResourceKeySegment": "tableServices", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": true + }, + "Table": { + "Name": "Table", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", + "Method": "GET", + "OperationID": "Table_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the table with the specified table name, under the specified account if it exists." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", + "Method": "PUT", + "OperationID": "Table_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a new table with the specified table name, under the specified account." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", + "Method": "PATCH", + "OperationID": "Table_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Creates a new table with the specified table name, under the specified account." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}", + "Method": "DELETE", + "OperationID": "Table_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the table with the specified table name, under the specified account if it exists." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables", + "Method": "GET", + "OperationID": "Table_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets a list of all the tables under the specified storage account" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["TableServiceProperty"], + "SwaggerModelName": "Table", + "ResourceType": "Microsoft.Storage/storageAccounts/tableServices/tables", + "ResourceKey": "tableName", + "ResourceKeySegment": "tables", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/storage.md b/packages/extensions/openapi-to-typespec/test/arm-storage/storage.md new file mode 100644 index 0000000000..361bc872c0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/storage.md @@ -0,0 +1,319 @@ +```yaml +require: https://github.com/Azure/azure-rest-api-specs/blob/da0cfefaa0e6c237e1e3819f1cb2e11d7606878d/specification/storage/resource-manager/readme.md +title: "Azure Storage resource management API." +clear-output-folder: false +guessResourceKey: false +isAzureSpec: true +isArm: true +namespace: "Microsoft.Storage" +``` + +### Config for csharp + +```yaml +modelerfour: + flatten-payloads: false + +list-exception: + - /subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/deletedAccounts/{deletedAccountName} + +# override-operation-name: +# StorageAccounts_CheckNameAvailability: CheckStorageAccountNameAvailability +# StorageAccounts_HierarchicalNamespaceMigration: EnableHierarchicalNamespace +# BlobContainers_ObjectLevelWorm: EnableVersionLevelImmutability + +request-path-to-singleton-resource: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/{managementPolicyName}: managementPolicies/default + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies/{blobInventoryPolicyName}: inventoryPolicies/default + +format-by-name-rules: + "tenantId": "uuid" + "ETag": "etag" + "location": "azure-location" + "*Uri": "Uri" + "*Uris": "Uri" + "*Guid": "uuid" + "ifMatch": "etag" + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + Vmos: VmOS + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag + SAS: Sas + SKU: Sku + SMB: Smb + NFS: Nfs + LRS: Lrs + ZRS: Zrs + GRS: Grs + TLS: Tls + AAD: Aad + GET: Get + PUT: Put + +prepend-rp-prefix: + - CorsRules + - CorsRule + - CustomDomain + - DnsEndpointType + - ListKeyExpand + - MinimumTlsVersion + - ProvisioningState + - PermissionScope + - SshPublicKey + - PublicNetworkAccess + - RoutingPreference + - RoutingChoice + - UsageName + - UsageUnit + +# rename-mapping: +# BlobServiceProperties: BlobService +# QueueServiceProperties: QueueService +# FileServiceProperties: FileService +# TableServiceProperties: TableService +# StorageAccountCheckNameAvailabilityParameters: StorageAccountNameAvailabilityContent +# Multichannel.enabled: IsMultiChannelEnabled +# AccessPolicy.expiryTime: expireOn +# AccountStatus: StorageAccountStatus +# ResourceAccessRule: StorageAccountResourceAccessRule +# NetworkRuleSet: StorageAccountNetworkRuleSet +# VirtualNetworkRule: StorageAccountVirtualNetworkRule +# IPRule: StorageAccountIPRule +# Action: StorageAccountNetworkRuleAction +# State: StorageAccountNetworkRuleState +# Bypass: StorageNetworkBypass +# DefaultAction: StorageNetworkDefaultAction +# EnabledProtocols: FileShareEnabledProtocol +# FileShare.properties.enabledProtocols: enabledProtocol +# Encryption: StorageAccountEncryption +# EncryptionIdentity: StorageAccountEncryptionIdentity +# EncryptionServices: StorageAccountEncryptionServices +# EncryptionService: StorageEncryptionService +# EncryptionService.enabled: IsEnabled +# Endpoints: StorageAccountEndpoints +# KeySource: StorageAccountKeySource +# KeyType: StorageEncryptionKeyType +# KeyPolicy: StorageAccountKeyPolicy +# KeyPermission: StorageAccountKeyPermission +# KeyCreationTime: StorageAccountKeyCreationTime +# KeyVaultProperties: StorageAccountKeyVaultProperties +# Format: BlobInventoryPolicyFormat +# Schedule: BlobInventoryPolicySchedule +# ObjectType: BlobInventoryPolicyObjectType +# LastAccessTimeTrackingPolicy.enable: IsEnabled +# HttpProtocol: StorageAccountHttpProtocol +# Name: LastAccessTimeTrackingPolicyName +# LeaseDuration: StorageLeaseDurationType +# BlobContainer.properties.leaseDuration: LeaseDuration +# FileShare.properties.leaseDuration: LeaseDuration +# ManagementPolicyRule.enabled: IsEnabled +# RuleType: ManagementPolicyRuleType +# Permissions: StorageAccountSasPermission +# Services: StorageAccountSasSignedService +# AccountSasParameters.signedExpiry: SharedAccessExpireOn +# SignedResourceTypes: StorageAccountSasSignedResourceType +# SignedResource: ServiceSasSignedResourceType +# Reason: StorageAccountNameUnavailableReason +# Restriction: StorageSkuRestriction +# ReasonCode: StorageRestrictionReasonCode +# SKUCapability: StorageSkuCapability +# RestorePolicyProperties.enabled: IsEnabled +# SasPolicy: StorageAccountSasPolicy +# ShareAccessTier: FileShareAccessTier +# TagFilter: ManagementPolicyTagFilter +# TagFilter.op: Operator +# TagProperty: LegalHoldTag +# AccessTier: StorageAccountAccessTier +# StorageAccountSkuConversionStatus.startTime: StartOn +# StorageAccountSkuConversionStatus.endTime: EndOn +# SkuConversionStatus: StorageAccountSkuConversionState +# PrivateLinkResource: StoragePrivateLinkResourceData +# MigrationState: ImmutableStorageWithVersioningMigrationState +# AccessPolicy: StorageServiceAccessPolicy +# ChangeFeed: BlobServiceChangeFeed +# ChangeFeed.enabled: IsEnabled +# CheckNameAvailabilityResult: StorageAccountNameAvailabilityResult +# CheckNameAvailabilityResult.nameAvailable: IsNameAvailable +# BlobContainer.properties.deleted: IsDeleted +# BlobServiceProperties.properties.automaticSnapshotPolicyEnabled: IsAutomaticSnapshotPolicyEnabled +# FileShare.properties.deleted: IsDeleted +# DeleteRetentionPolicy.enabled: IsEnabled +# ImmutableStorageAccount.enabled: IsEnabled +# ImmutableStorageWithVersioning.enabled: IsEnabled +# BlobInventoryPolicyRule.enabled: IsEnabled +# BlobInventoryPolicySchema.enabled: IsEnabled +# ActiveDirectoryProperties: StorageActiveDirectoryProperties +# AccountType: ActiveDirectoryAccountType +# StorageAccount.properties.failoverInProgress: IsFailoverInProgress +# StorageAccount.properties.isNfsV3Enabled: IsNfsV3Enabled +# StorageAccountCreateParameters.properties.isNfsV3Enabled: IsNfsV3Enabled +# StorageAccount.properties.defaultToOAuthAuthentication: IsDefaultToOAuthAuthentication +# StorageAccountCreateParameters.properties.defaultToOAuthAuthentication: IsDefaultToOAuthAuthentication +# StorageAccountUpdateParameters.properties.defaultToOAuthAuthentication: IsDefaultToOAuthAuthentication +# CustomDomain.useSubDomainName: IsUseSubDomainNameEnabled +# RoutingPreference.publishMicrosoftEndpoints: IsMicrosoftEndpointsPublished +# RoutingPreference.publishInternetEndpoints: IsInternetEndpointsPublished +# BlobContainer.properties.denyEncryptionScopeOverride: PreventEncryptionScopeOverride +# BlobInventoryPolicy.properties.policy: PolicySchema +# ProtocolSettings.smb: SmbSetting +# LocalUser: StorageAccountLocalUser +# ManagementPolicy: StorageAccountManagementPolicy +# AzureFilesIdentityBasedAuthentication: FilesIdentityBasedAuthentication +# BlobInventoryPolicyFilter.prefixMatch: IncludePrefix +# AllowedMethods: CorsRuleAllowedMethod +# DefaultSharePermission.StorageFileDataSmbShareReader: Reader +# DefaultSharePermission.StorageFileDataSmbShareContributor: Contributor +# DefaultSharePermission.StorageFileDataSmbShareElevatedContributor: ElevatedContributor +# EncryptionScopeSource.Microsoft.Storage: Storage +# EncryptionScopeSource.Microsoft.KeyVault: KeyVault +# GeoReplicationStats: GeoReplicationStatistics +# InventoryRuleType: BlobInventoryRuleType +# LeaseContainerRequestAction: LeaseContainerAction +# LeaseState: StorageLeaseState +# LeaseStatus: StorageLeaseStatus +# ListAccountSasResponse: GetAccountSasResult +# ListServiceSasResponse: GetServiceSasResult +# ListContainersInclude: BlobContainerState +# RestorePolicyProperties: RestorePolicy +# AccountImmutabilityPolicyProperties: AccountImmutabilityPolicy +# ImmutabilityPolicyProperties: BlobContainerImmutabilityPolicy +# SignedResource.b: Blob +# SignedResource.c: Container +# SignedResource.f: File +# SignedResource.s: Share +# SignedIdentifier: StorageSignedIdentifier +# KeySource.Microsoft.Storage: Storage +# KeySource.Microsoft.Keyvault: KeyVault +# StorageAccountListKeysResult: StorageAccountGetKeysResult +# TableAccessPolicy: StorageTableAccessPolicy +# TableAccessPolicy.expiryTime: ExpireOn +# TableSignedIdentifier: StorageTableSignedIdentifier +# UpdateHistoryProperty: UpdateHistoryEntry +# UpdateHistoryProperty.update: UpdateType +# PublicAccess: StoragePublicAccessType +# Endpoints.blob: BlobUri +# Endpoints.queue: QueueUri +# Endpoints.table: TableUri +# Endpoints.file: FileUri +# Endpoints.web: WebUri +# Endpoints.dfs: DfsUri +# StorageAccountMicrosoftEndpoints.blob: BlobUri +# StorageAccountMicrosoftEndpoints.queue: QueueUri +# StorageAccountMicrosoftEndpoints.table: TableUri +# StorageAccountMicrosoftEndpoints.file: FileUri +# StorageAccountMicrosoftEndpoints.web: WebUri +# StorageAccountMicrosoftEndpoints.dfs: DfsUri +# StorageAccountInternetEndpoints.blob: BlobUri +# StorageAccountInternetEndpoints.file: FileUri +# StorageAccountInternetEndpoints.web: WebUri +# StorageAccountInternetEndpoints.dfs: DfsUri +# FailoverType: StorageAccountFailoverType +# ListEncryptionScopesInclude: EncryptionScopesIncludeType + +directive: + - from: swagger-document + where: $.definitions.FileShareItems.properties.value.items["$ref"] + transform: return "#/definitions/FileShare" + - from: swagger-document + where: $.definitions.ListContainerItems.properties.value.items["$ref"] + transform: return "#/definitions/BlobContainer" + - from: swagger-document + where: $.definitions.ListQueueResource.properties.value.items["$ref"] + transform: return "#/definitions/StorageQueue" + - from: swagger-document + where: $.definitions.BlobRestoreParameters + transform: > + $.required = ["timetoRestore", "blobRanges"]; + for (var key in $.properties) { + var property = $.properties[key]; + delete $.properties[key]; + if (key === 'timeToRestore') { + $.properties['timetoRestore'] = property; + $.properties['timetoRestore']['x-ms-client-name'] = 'timeToRestore'; + } + else{ + $.properties[key] = property; + } + } + # assigning formats + - from: swagger-document + where: $.definitions.StorageAccountCheckNameAvailabilityParameters.properties.type + transform: $["x-ms-format"] = "resource-type"; + - from: swagger-document + where: $.definitions.DeletedAccountProperties.properties.storageAccountResourceId + transform: $["x-ms-format"] = "arm-id"; + - from: swagger-document + where: $.definitions.DeletedAccountProperties.properties.creationTime + transform: $["format"] = "date-time"; + - from: swagger-document + where: $.definitions.DeletedAccountProperties.properties.deletionTime + transform: $["format"] = "date-time"; + - from: swagger-document + where: $.definitions.StorageAccountProperties.properties.primaryLocation + transform: $["x-ms-format"] = "azure-location"; + - from: swagger-document + where: $.definitions.StorageAccountProperties.properties.secondaryLocation + transform: $["x-ms-format"] = "azure-location"; + - from: swagger-document + where: $.definitions.StorageAccountSkuConversionStatus.properties.startTime + transform: $["format"] = "date-time"; + - from: swagger-document + where: $.definitions.StorageAccountSkuConversionStatus.properties.endTime + transform: $["format"] = "date-time"; + - from: swagger-document + where: $.definitions.PrivateLinkResourceProperties.properties.groupId + transform: $["x-ms-format"] = "arm-id"; + - from: swagger-document + where: $.definitions.ResourceAccessRule.properties.resourceId + transform: $["x-ms-format"] = "arm-id"; + - from: swagger-document + where: $.definitions.VirtualNetworkRule.properties.id + transform: $["x-ms-format"] = "arm-id"; + - from: swagger-document + where: $.definitions.Encryption + transform: $.required = undefined; # this is a fix for swagger issue, and it should be resolved in azure-rest-api-specs/pull/19357 + # this is a temporary fix + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}"].put.parameters + transform: $[2].required = true + # convenience change: expand the array result out + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys"].post + transform: > + $["x-ms-pageable"] = { + "itemName": "keys", + "nextLinkName": null + }; + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey"].post + transform: > + $["x-ms-pageable"] = { + "itemName": "keys", + "nextLinkName": null + }; + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/restoreBlobRanges"].post + transform: $["x-ms-long-running-operation-options"]["enable-interim-state"] = true + - from: swagger-document + where: $.definitions.StorageAccountCheckNameAvailabilityParameters.properties.type + transform: $["x-ms-constant"] = true; +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp new file mode 100644 index 0000000000..b6f9b121f9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp @@ -0,0 +1,66 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./BlobServiceProperties.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("Properties of the blob container, including Id, resource name, resource type, Etag.") +@parentResource(BlobServiceProperties) +model BlobContainer is ProxyResource { + @doc("The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.") + @maxLength(63) + @minLength(3) + @path + @key("containerName") + @segment("containers") + name: string; +} + +@armResourceOperations +interface BlobContainers { + @doc("Gets properties of a specified container. ") + get is ArmResourceRead; + @doc("Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. ") + create is ArmResourceCreateOrReplaceSync; + @doc("Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. ") + update is ArmResourcePatchSync; + @doc("Deletes specified container under its account.") + delete is ArmResourceDeleteSync; + @doc("Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.") + list is ArmResourceListByParent< + BlobContainer, + { + ...BaseParameters; + + @doc("Optional. Specified maximum number of containers that can be included in the list.") + @query("$maxpagesize") + $maxpagesize?: string; + + @doc("Optional. When specified, only container names starting with the filter will be listed.") + @query("$filter") + $filter?: string; + + @doc("Optional, used to include the properties for soft deleted blob containers.") + @query("$include") + $include?: ListContainersInclude; + } + >; + @doc("Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request.") + setLegalHold is ArmResourceActionSync; + @doc("Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.") + clearLegalHold is ArmResourceActionSync; + @doc("The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.") + lease is ArmResourceActionSync< + BlobContainer, + LeaseContainerRequest, + LeaseContainerResponse + >; + @doc("This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container.") + objectLevelWorm is ArmResourceActionAsync; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp new file mode 100644 index 0000000000..fff3f9de56 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp @@ -0,0 +1,32 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./StorageAccount.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("The storage account blob inventory policy.") +@singleton("default") +@parentResource(StorageAccount) +model BlobInventoryPolicy is ProxyResource { + @key("blobInventoryPolicyName") + @segment("inventoryPolicies") + name: string; +} + +@armResourceOperations +interface BlobInventoryPolicies { + @doc("Gets the blob inventory policy associated with the specified storage account.") + get is ArmResourceRead; + @doc("Sets the blob inventory policy to the specified storage account.") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Deletes the blob inventory policy associated with the specified storage account.") + delete is ArmResourceDeleteSync; + @doc("Gets the blob inventory policy associated with the specified storage account.") + list is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp new file mode 100644 index 0000000000..a67250d6a2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp @@ -0,0 +1,50 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./StorageAccount.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("The properties of a storage account’s Blob service.") +@singleton("default") +@parentResource(StorageAccount) +model BlobServiceProperties is ProxyResource { + @key("BlobServicesName") + @segment("blobServices") + name: string; + + ...Azure.ResourceManager.ResourceSku; +} + +@armResourceOperations +interface BlobServices { + @doc("Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.") + getServiceProperties is ArmResourceRead< + BlobServiceProperties, + { + ...BaseParameters; + + @doc("The name of the blob Service within the specified storage account. Blob Service Name must be 'default'") + @path + BlobServicesName: "default"; + } + >; + @doc("Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. ") + setServiceProperties is ArmResourceCreateOrReplaceSync< + BlobServiceProperties, + { + ...BaseParameters; + + @doc("The name of the blob Service within the specified storage account. Blob Service Name must be 'default'") + @path + BlobServicesName: "default"; + } + >; + @doc("List blob services of storage account. It returns a collection of one object named default.") + list is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp new file mode 100644 index 0000000000..e190019d6d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp @@ -0,0 +1,30 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("Deleted storage account") +@locationResource +model DeletedAccount is ProxyResource { + @doc("Name of the deleted storage account.") + @maxLength(24) + @minLength(3) + @path + @key("deletedAccountName") + @segment("deletedAccounts") + name: string; +} + +@armResourceOperations +interface DeletedAccounts { + @doc("Get properties of specified deleted account resource.") + get is ArmResourceRead; + @doc("Lists deleted accounts under the subscription.") + list is ArmListBySubscription; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp new file mode 100644 index 0000000000..320165cc47 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp @@ -0,0 +1,54 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./StorageAccount.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("The Encryption Scope resource.") +@parentResource(StorageAccount) +model EncryptionScope is ProxyResource { + @doc("The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.") + @maxLength(63) + @minLength(3) + @path + @key("encryptionScopeName") + @segment("encryptionScopes") + name: string; +} + +@armResourceOperations +interface EncryptionScopes { + @doc("Returns the properties for the specified encryption scope.") + get is ArmResourceRead; + @doc("Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request.") + put is ArmResourceCreateOrReplaceSync; + @doc("Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist.") + patch is ArmResourcePatchSync; + @doc("Lists all the encryption scopes available under the specified storage account.") + list is ArmResourceListByParent< + EncryptionScope, + { + ...BaseParameters; + + @doc("Optional, specifies the maximum number of encryption scopes that will be included in the list response.") + @maxValue(5000) + @minValue(1) + @query("$maxpagesize") + $maxpagesize?: int32; + + @doc("Optional. When specified, only encryption scope names starting with the filter will be listed.") + @query("$filter") + $filter?: string; + + @doc("Optional, when specified, will list encryption scopes with the specific state. Defaults to All") + @query("$include") + $include?: ListEncryptionScopesInclude; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp new file mode 100644 index 0000000000..710c8ec88d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp @@ -0,0 +1,50 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./StorageAccount.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("The properties of File services in storage account.") +@singleton("default") +@parentResource(StorageAccount) +model FileServiceProperties is ProxyResource { + @key("FileServicesName") + @segment("fileServices") + name: string; + + ...Azure.ResourceManager.ResourceSku; +} + +@armResourceOperations +interface FileServices { + @doc("Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules.") + getServiceProperties is ArmResourceRead< + FileServiceProperties, + { + ...BaseParameters; + + @doc("The name of the file Service within the specified storage account. File Service Name must be \"default\"") + @path + FileServicesName: "default"; + } + >; + @doc("Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. ") + setServiceProperties is ArmResourceCreateOrReplaceSync< + FileServiceProperties, + { + ...BaseParameters; + + @doc("The name of the file Service within the specified storage account. File Service Name must be \"default\"") + @path + FileServicesName: "default"; + } + >; + @doc("List all file services in storage accounts") + list is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp new file mode 100644 index 0000000000..c48d1e79ac --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp @@ -0,0 +1,104 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./FileServiceProperties.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("Properties of the file share, including Id, resource name, resource type, Etag.") +@parentResource(FileServiceProperties) +model FileShare is ProxyResource { + @doc("The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.") + @maxLength(63) + @minLength(3) + @path + @key("shareName") + @segment("shares") + name: string; +} + +@armResourceOperations +interface FileShares { + @doc("Gets properties of a specified share.") + get is ArmResourceRead< + FileShare, + { + ...BaseParameters; + + @doc("Optional, used to expand the properties within share's properties. Valid values are: stats. Should be passed as a string with delimiter ','.") + @query("$expand") + $expand?: string; + + @doc("Optional, used to retrieve properties of a snapshot.") + @header + `x-ms-snapshot`?: string; + } + >; + @doc("Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. ") + create is ArmResourceCreateOrReplaceSync< + FileShare, + { + ...BaseParameters; + + @doc("Optional, used to expand the properties within share's properties. Valid values are: snapshots. Should be passed as a string with delimiter ','") + @query("$expand") + $expand?: string; + } + >; + @doc("Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. ") + update is ArmResourcePatchSync; + @doc("Deletes specified share under its account.") + delete is ArmResourceDeleteSync< + FileShare, + { + ...BaseParameters; + + @doc("Optional, used to delete a snapshot.") + @header + `x-ms-snapshot`?: string; + + @doc("Optional. Valid values are: snapshots, leased-snapshots, none. The default value is snapshots. For 'snapshots', the file share is deleted including all of its file share snapshots. If the file share contains leased-snapshots, the deletion fails. For 'leased-snapshots', the file share is deleted included all of its file share snapshots (leased/unleased). For 'none', the file share is deleted if it has no share snapshots. If the file share contains any snapshots (leased or unleased), the deletion fails.") + @query("$include") + $include?: string; + } + >; + @doc("Lists all shares.") + list is ArmResourceListByParent< + FileShare, + { + ...BaseParameters; + + @doc("Optional. Specified maximum number of shares that can be included in the list.") + @query("$maxpagesize") + $maxpagesize?: string; + + @doc("Optional. When specified, only share names starting with the filter will be listed.") + @query("$filter") + $filter?: string; + + @doc("Optional, used to expand the properties within share's properties. Valid values are: deleted, snapshots. Should be passed as a string with delimiter ','") + @query("$expand") + $expand?: string; + } + >; + @doc("Restore a file share within a valid retention days if share soft delete is enabled") + restore is ArmResourceActionSync; + @doc("The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.") + lease is ArmResourceActionSync< + FileShare, + LeaseShareRequest, + LeaseShareResponse, + { + ...BaseParameters; + + @doc("Optional. Specify the snapshot time to lease a snapshot.") + @header + `x-ms-snapshot`?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp new file mode 100644 index 0000000000..5711f42a29 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp @@ -0,0 +1,95 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./BlobContainer.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag.") +@singleton("default") +@parentResource(BlobContainer) +model ImmutabilityPolicy is ProxyResource { + @key("immutabilityPolicyName") + @segment("immutabilityPolicies") + name: string; +} + +@armResourceOperations +interface BlobContainers { + @doc("Gets the existing immutability policy along with the corresponding ETag in response headers and body.") + getImmutabilityPolicy is ArmResourceRead< + ImmutabilityPolicy, + { + ...BaseParameters; + + @doc("The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'") + @path + immutabilityPolicyName: "default"; + + @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") + @header + `If-Match`?: string; + } + >; + @doc("Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.") + createOrUpdateImmutabilityPolicy is ArmResourceCreateOrReplaceSync< + ImmutabilityPolicy, + { + ...BaseParameters; + + @doc("The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'") + @path + immutabilityPolicyName: "default"; + + @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") + @header + `If-Match`?: string; + } + >; + @doc("Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container.") + deleteImmutabilityPolicy is ArmResourceDeleteSync< + ImmutabilityPolicy, + { + ...BaseParameters; + + @doc("The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'") + @path + immutabilityPolicyName: "default"; + + @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") + @header + `If-Match`: string; + } + >; + @doc("Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.") + lockImmutabilityPolicy is ArmResourceActionSync< + ImmutabilityPolicy, + void, + ImmutabilityPolicy, + { + ...BaseParameters; + + @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") + @header + `If-Match`: string; + } + >; + @doc("Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.") + extendImmutabilityPolicy is ArmResourceActionSync< + ImmutabilityPolicy, + ImmutabilityPolicy, + ImmutabilityPolicy, + { + ...BaseParameters; + + @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") + @header + `If-Match`: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp new file mode 100644 index 0000000000..4ff5277129 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp @@ -0,0 +1,43 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./StorageAccount.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("The local user associated with the storage accounts.") +@parentResource(StorageAccount) +model LocalUser is ProxyResource { + @doc("The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.") + @maxLength(64) + @minLength(3) + @path + @key("username") + @segment("localUsers") + name: string; +} + +@armResourceOperations +interface LocalUsers { + @doc("Get the local user of the storage account by username.") + get is ArmResourceRead; + @doc("Create or update the properties of a local user associated with the storage account") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Deletes the local user associated with the specified storage account.") + delete is ArmResourceDeleteSync; + @doc("List the local users associated with the storage account.") + list is ArmResourceListByParent; + @doc("List SSH authorized keys and shared key of the local user.") + listKeys is ArmResourceActionSync; + @doc("Regenerate the local user SSH password.") + regeneratePassword is ArmResourceActionSync< + LocalUser, + void, + LocalUserRegeneratePasswordResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp new file mode 100644 index 0000000000..e0cb0cd055 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp @@ -0,0 +1,30 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./StorageAccount.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("The Get Storage Account ManagementPolicies operation response.") +@singleton("default") +@parentResource(StorageAccount) +model ManagementPolicy is ProxyResource { + @key("managementPolicyName") + @segment("managementPolicies") + name: string; +} + +@armResourceOperations +interface ManagementPolicies { + @doc("Gets the managementpolicy associated with the specified storage account.") + get is ArmResourceRead; + @doc("Sets the managementpolicy to the specified storage account.") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Deletes the managementpolicy associated with the specified storage account.") + delete is ArmResourceDeleteSync; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp new file mode 100644 index 0000000000..ec1f4f6b41 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp @@ -0,0 +1,35 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./StorageAccount.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("The replication policy between two storage accounts. Multiple rules can be defined in one policy.") +@parentResource(StorageAccount) +model ObjectReplicationPolicy + is ProxyResource { + @doc("For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.") + @minLength(1) + @path + @key("objectReplicationPolicyId") + @segment("objectReplicationPolicies") + name: string; +} + +@armResourceOperations +interface ObjectReplicationPolicies { + @doc("Get the object replication policy of the storage account by policy ID.") + get is ArmResourceRead; + @doc("Create or update the object replication policy of the storage account.") + createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Deletes the object replication policy associated with the specified storage account.") + delete is ArmResourceDeleteSync; + @doc("List the object replication policies associated with the storage account.") + list is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp new file mode 100644 index 0000000000..3e4c66ead9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp @@ -0,0 +1,34 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./StorageAccount.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("The Private Endpoint Connection resource.") +@parentResource(StorageAccount) +model PrivateEndpointConnection + is ProxyResource { + @doc("The name of the private endpoint connection associated with the Azure resource") + @path + @key("privateEndpointConnectionName") + @segment("privateEndpointConnections") + name: string; +} + +@armResourceOperations +interface PrivateEndpointConnections { + @doc("Gets the specified private endpoint connection associated with the storage account.") + get is ArmResourceRead; + @doc("Update the state of specified private endpoint connection associated with the storage account.") + put is ArmResourceCreateOrReplaceSync; + @doc("Deletes the specified private endpoint connection associated with the storage account.") + delete is ArmResourceDeleteSync; + @doc("List all the private endpoint connections associated with the storage account.") + list is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp new file mode 100644 index 0000000000..ad95b89e19 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp @@ -0,0 +1,49 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./StorageAccount.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("The properties of a storage account’s Queue service.") +@singleton("default") +@parentResource(StorageAccount) +model QueueServiceProperties + is ProxyResource { + @key("queueServiceName") + @segment("queueServices") + name: string; +} + +@armResourceOperations +interface QueueServices { + @doc("Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.") + getServiceProperties is ArmResourceRead< + QueueServiceProperties, + { + ...BaseParameters; + + @doc("The name of the Queue Service within the specified storage account. Queue Service Name must be 'default'") + @path + queueServiceName: "default"; + } + >; + @doc("Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. ") + setServiceProperties is ArmResourceCreateOrReplaceSync< + QueueServiceProperties, + { + ...BaseParameters; + + @doc("The name of the Queue Service within the specified storage account. Queue Service Name must be 'default'") + @path + queueServiceName: "default"; + } + >; + @doc("List all queue services for the storage account") + list is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp new file mode 100644 index 0000000000..d632fe5991 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp @@ -0,0 +1,153 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("The storage account.") +model StorageAccount is TrackedResource { + @doc("The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.") + @maxLength(24) + @minLength(3) + @path + @key("accountName") + @segment("storageAccounts") + name: string; + + @doc("The extendedLocation of the resource.") + extendedLocation?: ExtendedLocation; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourceKind; +} + +@armResourceOperations +interface StorageAccounts { + @doc("Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys.") + getProperties is ArmResourceRead< + StorageAccount, + { + ...BaseParameters; + + @doc("May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus.") + @query("$expand") + $expand?: StorageAccountExpand; + } + >; + @doc("Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.") + create is ArmResourceCreateOrUpdateAsync; + @doc("The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.") + update is ArmResourcePatchSync; + @doc("Deletes a storage account in Microsoft Azure.") + delete is ArmResourceDeleteSync; + @doc("Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.") + listByResourceGroup is ArmResourceListByParent; + @doc("Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.") + list is ArmListBySubscription; + @doc("Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.") + listKeys is ArmResourceActionSync< + StorageAccount, + void, + StorageAccountListKeysResult, + { + ...BaseParameters; + + @doc("Specifies type of the key to be listed. Possible value is kerb.") + @query("$expand") + $expand?: "kerb"; + } + >; + @doc("Regenerates one of the access keys or Kerberos keys for the specified storage account.") + regenerateKey is ArmResourceActionSync< + StorageAccount, + StorageAccountRegenerateKeyParameters, + StorageAccountListKeysResult + >; + @doc("List SAS credentials of a storage account.") + listAccountSAS is ArmResourceActionSync< + StorageAccount, + AccountSasParameters, + ListAccountSasResponse + >; + @doc("List service SAS credentials of a specific resource.") + listServiceSAS is ArmResourceActionSync< + StorageAccount, + ServiceSasParameters, + ListServiceSasResponse + >; + @doc("A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance") + failover is ArmResourceActionAsync< + StorageAccount, + void, + void, + { + ...BaseParameters; + + @doc("The parameter is set to 'Planned' to indicate whether a Planned failover is requested.") + @query("failoverType") + failoverType?: "Planned"; + } + >; + @doc("Live Migration of storage account to enable Hns") + hierarchicalNamespaceMigration is ArmResourceActionAsync< + StorageAccount, + void, + void, + { + ...BaseParameters; + + @doc("Required. Hierarchical namespace migration type can either be a hierarchical namespace validation request 'HnsOnValidationRequest' or a hydration request 'HnsOnHydrationRequest'. The validation request will validate the migration whereas the hydration request will migrate the account.") + @query("requestType") + requestType: string; + } + >; + @doc("Abort live Migration of storage account to enable Hns") + abortHierarchicalNamespaceMigration is ArmResourceActionAsync< + StorageAccount, + void, + void + >; + @doc("Restore blobs in the specified blob ranges") + restoreBlobRanges is ArmResourceActionAsync< + StorageAccount, + BlobRestoreParameters, + BlobRestoreStatus + >; + @doc("Revoke user delegation keys.") + revokeUserDelegationKeys is ArmResourceActionSync; +} + +@armResourceOperations +interface PrivateLinkResources { + @doc("Gets the private link resources that need to be created for a storage account.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateLinkResources") + @get + ListByStorageAccount is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group within the user's subscription. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @pattern("^[-\\w\\._\\(\\)]+$") + @path + resourceGroupName: string; + + @doc("The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.") + @maxLength(24) + @minLength(3) + @path + accountName: string; + + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + }, + PrivateLinkResourceListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp new file mode 100644 index 0000000000..0045150490 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp @@ -0,0 +1,51 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./QueueServiceProperties.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; + +@parentResource(QueueServiceProperties) +model StorageQueue is ProxyResource { + @doc("A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.") + @maxLength(63) + @minLength(3) + @pattern("^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$") + @path + @key("queueName") + @segment("queues") + name: string; +} + +@armResourceOperations +interface Queue { + @doc("Gets the queue with the specified queue name, under the specified account if it exists.") + get is ArmResourceRead; + @doc("Creates a new queue with the specified queue name, under the specified account.") + create is ArmResourceCreateOrReplaceSync; + @doc("Creates a new queue with the specified queue name, under the specified account.") + update is ArmResourcePatchSync; + @doc("Deletes the queue with the specified queue name, under the specified account if it exists.") + delete is ArmResourceDeleteSync; + @doc("Gets a list of all the queues under the specified storage account") + list is ArmResourceListByParent< + StorageQueue, + { + ...BaseParameters; + + @doc("Optional, a maximum number of queues that should be included in a list queue response") + @query("$maxpagesize") + $maxpagesize?: string; + + @doc("Optional, When specified, only the queues with a name starting with the given filter will be listed.") + @query("$filter") + $filter?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp new file mode 100644 index 0000000000..5857bcd0ad --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp @@ -0,0 +1,38 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./TableServiceProperties.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("Properties of the table, including Id, resource name, resource type.") +@parentResource(TableServiceProperties) +model Table is ProxyResource { + @doc("A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character.") + @maxLength(63) + @minLength(3) + @pattern("^[A-Za-z][A-Za-z0-9]{2,62}$") + @path + @key("tableName") + @segment("tables") + name: string; +} + +@armResourceOperations +interface Table { + @doc("Gets the table with the specified table name, under the specified account if it exists.") + get is ArmResourceRead; + @doc("Creates a new table with the specified table name, under the specified account.") + create is ArmResourceCreateOrReplaceSync
    ; + @doc("Creates a new table with the specified table name, under the specified account.") + update is ArmResourcePatchSync; + @doc("Deletes the table with the specified table name, under the specified account if it exists.") + delete is ArmResourceDeleteSync
    ; + @doc("Gets a list of all the tables under the specified storage account") + list is ArmResourceListByParent
    ; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp new file mode 100644 index 0000000000..71206769e9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp @@ -0,0 +1,49 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./StorageAccount.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Storage; +@doc("The properties of a storage account’s Table service.") +@singleton("default") +@parentResource(StorageAccount) +model TableServiceProperties + is ProxyResource { + @key("tableServiceName") + @segment("tableServices") + name: string; +} + +@armResourceOperations +interface TableServices { + @doc("Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.") + getServiceProperties is ArmResourceRead< + TableServiceProperties, + { + ...BaseParameters; + + @doc("The name of the Table Service within the specified storage account. Table Service Name must be 'default'") + @path + tableServiceName: "default"; + } + >; + @doc("Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. ") + setServiceProperties is ArmResourceCreateOrReplaceSync< + TableServiceProperties, + { + ...BaseParameters; + + @doc("The name of the Table Service within the specified storage account. Table Service Name must be 'default'") + @path + tableServiceName: "default"; + } + >; + @doc("List all table services for the storage account.") + list is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp new file mode 100644 index 0000000000..1732a5c168 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp @@ -0,0 +1,45 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./StorageAccount.tsp"; +import "./DeletedAccount.tsp"; +import "./ManagementPolicy.tsp"; +import "./BlobInventoryPolicy.tsp"; +import "./PrivateEndpointConnection.tsp"; +import "./ObjectReplicationPolicy.tsp"; +import "./LocalUser.tsp"; +import "./EncryptionScope.tsp"; +import "./BlobServiceProperties.tsp"; +import "./BlobContainer.tsp"; +import "./ImmutabilityPolicy.tsp"; +import "./FileServiceProperties.tsp"; +import "./FileShare.tsp"; +import "./QueueServiceProperties.tsp"; +import "./StorageQueue.tsp"; +import "./TableServiceProperties.tsp"; +import "./Table.tsp"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "Azure Storage resource management API.", +}) +@versioned(Versions) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v1) +@doc("The Azure Storage Management API.") +namespace Microsoft.Storage; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2022_09_01: "2022-09-01", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp new file mode 100644 index 0000000000..e766f07a70 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp @@ -0,0 +1,2546 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.Core; +using Azure.ResourceManager; + +namespace Microsoft.Storage; + +interface Operations extends Azure.ResourceManager.Operations {} + +enum SkuName { + Standard_LRS, + Standard_GRS, + Standard_RAGRS, + Standard_ZRS, + Premium_LRS, + Premium_ZRS, + Standard_GZRS, + Standard_RAGZRS, +} + +enum Kind { + Storage, + StorageV2, + BlobStorage, + FileStorage, + BlockBlobStorage, +} + +enum ReasonCode { + QuotaId, + NotAvailableForSubscription, +} + +enum ExtendedLocationTypes { + EdgeZone, +} + +enum IdentityType { + None, + SystemAssigned, + UserAssigned, + `SystemAssigned,UserAssigned`, +} + +enum AllowedCopyScope { + PrivateLink, + AAD, +} + +enum PublicNetworkAccess { + Enabled, + Disabled, +} + +enum ExpirationAction { + Log, +} + +enum KeyType { + Service, + Account, +} + +enum KeySource { + `Microsoft.Storage`, + `Microsoft.Keyvault`, +} + +enum Bypass { + None, + Logging, + Metrics, + AzureServices, +} + +enum State { + Provisioning, + Deprovisioning, + Succeeded, + Failed, + NetworkSourceDeleted, +} + +enum DirectoryServiceOptions { + None, + AADDS, + AD, + AADKERB, +} + +enum AccountType { + User, + Computer, +} + +enum DefaultSharePermission { + None, + StorageFileDataSmbShareReader, + StorageFileDataSmbShareContributor, + StorageFileDataSmbShareElevatedContributor, +} + +enum LargeFileSharesState { + Disabled, + Enabled, +} + +enum RoutingChoice { + MicrosoftRouting, + InternetRouting, +} + +enum MinimumTlsVersion { + TLS1_0, + TLS1_1, + TLS1_2, +} + +enum AccountImmutabilityPolicyState { + Unlocked, + Locked, + Disabled, +} + +enum DnsEndpointType { + Standard, + AzureDnsZone, +} + +enum GeoReplicationStatus { + Live, + Bootstrap, + Unavailable, +} + +enum PrivateEndpointServiceConnectionStatus { + Pending, + Approved, + Rejected, +} + +enum PrivateEndpointConnectionProvisioningState { + Succeeded, + Creating, + Deleting, + Failed, +} + +enum BlobRestoreProgressStatus { + InProgress, + Complete, + Failed, +} + +enum SkuConversionStatus { + InProgress, + Succeeded, + Failed, +} + +enum Services { + b, + q, + t, + f, +} + +enum SignedResourceTypes { + s, + c, + o, +} + +enum Permissions { + r, + d, + w, + l, + a, + c, + u, + p, +} + +enum SignedResource { + b, + c, + f, + s, +} + +enum ManagementPolicyName { + default, +} + +enum RuleType { + Lifecycle, +} + +enum BlobInventoryPolicyName { + default, +} + +enum InventoryRuleType { + Inventory, +} + +enum Format { + Csv, + Parquet, +} + +enum Schedule { + Daily, + Weekly, +} + +enum ObjectType { + Blob, + Container, +} + +enum CreatedByType { + User, + Application, + ManagedIdentity, + Key, +} + +enum EncryptionScopeSource { + `Microsoft.Storage`, + `Microsoft.KeyVault`, +} + +enum EncryptionScopeState { + Enabled, + Disabled, +} + +enum ListEncryptionScopesInclude { + All, + Enabled, + Disabled, +} + +enum AllowedMethods { + DELETE, + GET, + HEAD, + MERGE, + POST, + OPTIONS, + PUT, + PATCH, +} + +enum Name { + AccessTimeTracking, +} + +enum ListContainersInclude { + deleted, +} + +enum LeaseStatus { + Locked, + Unlocked, +} + +enum LeaseState { + Available, + Leased, + Expired, + Breaking, + Broken, +} + +enum LeaseDuration { + Infinite, + Fixed, +} + +enum ImmutabilityPolicyState { + Locked, + Unlocked, +} + +enum ImmutabilityPolicyUpdateType { + put, + lock, + extend, +} + +enum MigrationState { + InProgress, + Completed, +} + +enum LeaseContainerRequestAction { + Acquire, + Renew, + Change, + Release, + Break, +} + +enum EnabledProtocols { + SMB, + NFS, +} + +enum RootSquashType { + NoRootSquash, + RootSquash, + AllSquash, +} + +enum ShareAccessTier { + TransactionOptimized, + Hot, + Cool, + Premium, +} + +enum LeaseShareAction { + Acquire, + Renew, + Change, + Release, + Break, +} +@Azure.Core.fixed +enum SkuTier { + Standard, + Premium, +} +@Azure.Core.fixed +enum Reason { + AccountNameInvalid, + AlreadyExists, +} +@Azure.Core.fixed +enum DefaultAction { + Allow, + Deny, +} +@Azure.Core.fixed +enum AccessTier { + Hot, + Cool, + Premium, +} +@Azure.Core.fixed +enum ProvisioningState { + Creating, + ResolvingDNS, + Succeeded, +} +@Azure.Core.fixed +enum AccountStatus { + available, + unavailable, +} +@Azure.Core.fixed +enum StorageAccountExpand { + geoReplicationStats, + blobRestoreStatus, +} +@Azure.Core.fixed +enum KeyPermission { + Read, + Full, +} +@Azure.Core.fixed +enum UsageUnit { + Count, + Bytes, + Seconds, + Percent, + CountsPerSecond, + BytesPerSecond, +} +@Azure.Core.fixed +enum HttpProtocol { + `https,http`, + https, +} +@Azure.Core.fixed +enum PublicAccess { + Container, + Blob, + None, +} + +@doc("Properties of operation, include metric specifications.") +model OperationProperties { + @doc("One property of operation, include metric specifications.") + serviceSpecification?: ServiceSpecification; +} + +@doc("One property of operation, include metric specifications.") +model ServiceSpecification { + @doc("Metric specifications of operation.") + metricSpecifications?: MetricSpecification[]; +} + +@doc("Metric specification of operation.") +model MetricSpecification { + @doc("Name of metric specification.") + name?: string; + + @doc("Display name of metric specification.") + displayName?: string; + + @doc("Display description of metric specification.") + displayDescription?: string; + + @doc("Unit could be Bytes or Count.") + unit?: string; + + @doc("Dimensions of blobs, including blob type and access tier.") + dimensions?: Dimension[]; + + @doc("Aggregation type could be Average.") + aggregationType?: string; + + @doc("The property to decide fill gap with zero or not.") + fillGapWithZero?: boolean; + + @doc("The category this metric specification belong to, could be Capacity.") + category?: string; + + @doc("Account Resource Id.") + resourceIdDimensionNameOverride?: string; +} + +@doc("Dimension of blobs, possibly be blob type or access tier.") +model Dimension { + @doc("Display name of dimension.") + name?: string; + + @doc("Display name of dimension.") + displayName?: string; +} + +@doc("The response from the List Storage SKUs operation.") +@pagedResult +model StorageSkuListResult { + @doc("Get the list result of storage SKUs and their properties.") + @visibility("read") + @items + value?: SkuInformation[]; +} + +@doc("Storage SKU and its properties") +model SkuInformation { + @doc("The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType.") + name: SkuName; + + @doc("The SKU tier. This is based on the SKU name.") + @visibility("read") + tier?: SkuTier; + + @doc("The type of the resource, usually it is 'storageAccounts'.") + @visibility("read") + resourceType?: string; + + @doc("Indicates the type of storage account.") + @visibility("read") + kind?: Kind; + + @doc("The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.).") + @visibility("read") + locations?: string[]; + + @doc("The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc.") + @visibility("read") + capabilities?: SKUCapability[]; + + @doc("The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.") + restrictions?: Restriction[]; +} + +@doc("The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc.") +model SKUCapability { + @doc("The name of capability, The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc.") + @visibility("read") + name?: string; + + @doc("A string value to indicate states of given capability. Possibly 'true' or 'false'.") + @visibility("read") + value?: string; +} + +@doc("The restriction because of which SKU cannot be used.") +model Restriction { + @doc("The type of restrictions. As of now only possible value for this is location.") + @visibility("read") + type?: string; + + @doc("The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.") + @visibility("read") + values?: string[]; + + @doc("The reason for the restriction. As of now this can be \"QuotaId\" or \"NotAvailableForSubscription\". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The \"NotAvailableForSubscription\" is related to capacity at DC.") + reasonCode?: ReasonCode; +} + +@doc("The parameters used to check the availability of the storage account name.") +model StorageAccountCheckNameAvailabilityParameters { + @doc("The storage account name.") + name: string; + + @doc("The type of resource, Microsoft.Storage/storageAccounts") + type: "Microsoft.Storage/storageAccounts"; +} + +@doc("The CheckNameAvailability operation response.") +model CheckNameAvailabilityResult { + @doc("Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used.") + @visibility("read") + nameAvailable?: boolean; + + @doc("Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false.") + @visibility("read") + reason?: Reason; + + @doc("Gets an error message explaining the Reason value in more detail.") + @visibility("read") + message?: string; +} + +@doc("The parameters used when creating a storage account.") +model StorageAccountCreateParameters { + @doc("Required. Gets or sets the SKU name.") + sku: Sku; + + @doc("Required. Indicates the type of storage account.") + kind: Kind; + + @doc("Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed.") + location: string; + + @doc("Optional. Set the extended location of the resource. If not set, the storage account will be created in Azure main region. Otherwise it will be created in the specified extended location") + extendedLocation?: ExtendedLocation; + + @doc("Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters.") + tags?: Record; + + @doc("The identity of the resource.") + identity?: Identity; + + @doc("The parameters used to create the storage account.") + properties?: StorageAccountPropertiesCreateParameters; +} + +@doc("The SKU of the storage account.") +model Sku { + @doc("The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType.") + name: SkuName; + + @doc("The SKU tier. This is based on the SKU name.") + @visibility("read") + tier?: SkuTier; +} + +@doc("The complex type of the extended location.") +model ExtendedLocation { + @doc("The name of the extended location.") + name?: string; + + @doc("The type of the extended location.") + type?: ExtendedLocationTypes; +} + +@doc("Identity for the resource.") +model Identity { + @doc("The principal ID of resource identity.") + @visibility("read") + principalId?: string; + + @doc("The tenant ID of resource.") + @visibility("read") + tenantId?: string; + + @doc("The identity type.") + type: IdentityType; + + @doc("Gets or sets a list of key value pairs that describe the set of User Assigned identities that will be used with this storage account. The key is the ARM resource identifier of the identity. Only 1 User Assigned identity is permitted here.") + userAssignedIdentities?: Record; +} + +@doc("UserAssignedIdentity for the resource.") +model UserAssignedIdentity { + @doc("The principal ID of the identity.") + @visibility("read") + principalId?: string; + + @doc("The client ID of the identity.") + @visibility("read") + clientId?: string; +} + +@doc("The parameters used to create the storage account.") +model StorageAccountPropertiesCreateParameters { + @doc("Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet.") + allowedCopyScope?: AllowedCopyScope; + + @doc("Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.") + publicNetworkAccess?: PublicNetworkAccess; + + @doc("SasPolicy assigned to the storage account.") + sasPolicy?: SasPolicy; + + @doc("KeyPolicy assigned to the storage account.") + keyPolicy?: KeyPolicy; + + @doc("User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property.") + customDomain?: CustomDomain; + + @doc("Encryption settings to be used for server-side encryption for the storage account.") + encryption?: Encryption; + + @doc("Network rule set") + @projectedName("json", "networkAcls") + networkRuleSet?: NetworkRuleSet; + + @doc("Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.") + accessTier?: AccessTier; + + @doc("Provides the identity based authentication settings for Azure Files.") + azureFilesIdentityBasedAuthentication?: AzureFilesIdentityBasedAuthentication; + + @doc("Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01.") + @projectedName("json", "supportsHttpsTrafficOnly") + enableHttpsTrafficOnly?: boolean; + + @doc("Enables Secure File Transfer Protocol, if set to true") + @projectedName("json", "isSftpEnabled") + IsSftpEnabled?: boolean; + + @doc("Enables local users feature, if set to true") + @projectedName("json", "isLocalUserEnabled") + IsLocalUserEnabled?: boolean; + + @doc("Account HierarchicalNamespace enabled if sets to true.") + @projectedName("json", "isHnsEnabled") + IsHnsEnabled?: boolean; + + @doc("Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled.") + largeFileSharesState?: LargeFileSharesState; + + @doc("Maintains information about the network routing choice opted by the user for data transfer") + routingPreference?: RoutingPreference; + + @doc("Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property.") + allowBlobPublicAccess?: boolean; + + @doc("Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.") + minimumTlsVersion?: MinimumTlsVersion; + + @doc("Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true.") + allowSharedKeyAccess?: boolean; + + @doc("NFS 3.0 protocol support enabled if set to true.") + @projectedName("json", "isNfsV3Enabled") + enableNfsV3?: boolean; + + @doc("Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property.") + allowCrossTenantReplication?: boolean; + + @doc("A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property.") + defaultToOAuthAuthentication?: boolean; + + @doc("The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the new containers in the account by default.") + immutableStorageWithVersioning?: ImmutableStorageAccount; + + @doc("Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier.") + dnsEndpointType?: DnsEndpointType; +} + +@doc("SasPolicy assigned to the storage account.") +model SasPolicy { + @doc("The SAS expiration period, DD.HH:MM:SS.") + sasExpirationPeriod: string; + + @doc("The SAS expiration action. Can only be Log.") + expirationAction: ExpirationAction; +} + +@doc("KeyPolicy assigned to the storage account.") +model KeyPolicy { + @doc("The key expiration period in days.") + keyExpirationPeriodInDays: int32; +} + +@doc("The custom domain assigned to this storage account. This can be set via Update.") +model CustomDomain { + @doc("Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source.") + name: string; + + @doc("Indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates.") + useSubDomainName?: boolean; +} + +@doc("The encryption settings on the storage account.") +model Encryption { + @doc("List of services which support encryption.") + services?: EncryptionServices; + + @doc("The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault") + keySource?: KeySource; + + @doc("A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest.") + requireInfrastructureEncryption?: boolean; + + @doc("Properties provided by key vault.") + @projectedName("json", "keyvaultproperties") + keyVaultProperties?: KeyVaultProperties; + + @doc("The identity to be used with service-side encryption at rest.") + @projectedName("json", "identity") + encryptionIdentity?: EncryptionIdentity; +} + +@doc("A list of services that support encryption.") +model EncryptionServices { + @doc("The encryption function of the blob storage service.") + blob?: EncryptionService; + + @doc("The encryption function of the file storage service.") + file?: EncryptionService; + + @doc("The encryption function of the table storage service.") + table?: EncryptionService; + + @doc("The encryption function of the queue storage service.") + queue?: EncryptionService; +} + +@doc("A service that allows server-side encryption to be used.") +model EncryptionService { + @doc("A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is enabled by default today and cannot be disabled.") + enabled?: boolean; + + @doc("Gets a rough estimate of the date/time when the encryption was last enabled by the user. Data is encrypted at rest by default today and cannot be disabled.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastEnabledTime?: utcDateTime; + + @doc("Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used.") + @visibility("read", "create") + keyType?: KeyType; +} + +@doc("Properties of key vault.") +model KeyVaultProperties { + @doc("The name of KeyVault key.") + @projectedName("json", "keyname") + keyName?: string; + + @doc("The version of KeyVault key.") + @projectedName("json", "keyversion") + keyVersion?: string; + + @doc("The Uri of KeyVault.") + @projectedName("json", "keyvaulturi") + keyVaultUri?: string; + + @doc("The object identifier of the current versioned Key Vault Key in use.") + @visibility("read") + currentVersionedKeyIdentifier?: string; + + @doc("Timestamp of last rotation of the Key Vault Key.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastKeyRotationTimestamp?: utcDateTime; + + @doc("This is a read only property that represents the expiration time of the current version of the customer managed key used for encryption.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + currentVersionedKeyExpirationTimestamp?: utcDateTime; +} + +@doc("Encryption identity for the storage account.") +model EncryptionIdentity { + @doc("Resource identifier of the UserAssigned identity to be associated with server-side encryption on the storage account.") + @projectedName("json", "userAssignedIdentity") + encryptionUserAssignedIdentity?: string; + + @doc("ClientId of the multi-tenant application to be used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys server-side encryption on the storage account.") + @projectedName("json", "federatedIdentityClientId") + encryptionFederatedIdentityClientId?: string; +} + +@doc("Network rule set") +model NetworkRuleSet { + @doc("Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, \"Logging, Metrics\"), or None to bypass none of those traffics.") + bypass?: Bypass; + + @doc("Sets the resource access rules") + resourceAccessRules?: ResourceAccessRule[]; + + @doc("Sets the virtual network rules") + virtualNetworkRules?: VirtualNetworkRule[]; + + @doc("Sets the IP ACL rules") + ipRules?: IPRule[]; + + @doc("Specifies the default action of allow or deny when no other rules match.") + defaultAction: DefaultAction; +} + +@doc("Resource Access Rule.") +model ResourceAccessRule { + @doc("Tenant Id") + tenantId?: string; + + @doc("Resource Id") + resourceId?: string; +} + +@doc("Virtual Network rule.") +model VirtualNetworkRule { + @doc("Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.") + @projectedName("json", "id") + virtualNetworkResourceId: string; + + @doc("The action of virtual network rule.") + action?: "Allow"; + + @doc("Gets the state of virtual network rule.") + state?: State; +} + +@doc("IP rule with specific IP or IP range in CIDR format.") +model IPRule { + @doc("Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.") + @projectedName("json", "value") + IPAddressOrRange: string; + + @doc("The action of IP ACL rule.") + action?: "Allow"; +} + +@doc("Settings for Azure Files identity based authentication.") +model AzureFilesIdentityBasedAuthentication { + @doc("Indicates the directory service used. Note that this enum may be extended in the future.") + directoryServiceOptions: DirectoryServiceOptions; + + @doc("Required if directoryServiceOptions are AD, optional if they are AADKERB.") + activeDirectoryProperties?: ActiveDirectoryProperties; + + @doc("Default share permission for users using Kerberos authentication if RBAC role is not assigned.") + defaultSharePermission?: DefaultSharePermission; +} + +@doc("Settings properties for Active Directory (AD).") +model ActiveDirectoryProperties { + @doc("Specifies the primary domain that the AD DNS server is authoritative for.") + domainName: string; + + @doc("Specifies the NetBIOS domain name.") + netBiosDomainName?: string; + + @doc("Specifies the Active Directory forest to get.") + forestName?: string; + + @doc("Specifies the domain GUID.") + domainGuid: string; + + @doc("Specifies the security identifier (SID).") + domainSid?: string; + + @doc("Specifies the security identifier (SID) for Azure Storage.") + azureStorageSid?: string; + + @doc("Specifies the Active Directory SAMAccountName for Azure Storage.") + samAccountName?: string; + + @doc("Specifies the Active Directory account type for Azure Storage.") + accountType?: AccountType; +} + +@doc("Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user data, the default option is microsoft routing") +model RoutingPreference { + @doc("Routing Choice defines the kind of network routing opted by the user.") + routingChoice?: RoutingChoice; + + @doc("A boolean flag which indicates whether microsoft routing storage endpoints are to be published") + publishMicrosoftEndpoints?: boolean; + + @doc("A boolean flag which indicates whether internet routing storage endpoints are to be published") + publishInternetEndpoints?: boolean; +} + +@doc("This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning.") +model ImmutableStorageAccount { + @doc("A boolean flag which enables account-level immutability. All the containers under such an account have object-level immutability enabled by default.") + enabled?: boolean; + + @doc("Specifies the default account-level immutability policy which is inherited and applied to objects that do not possess an explicit immutability policy at the object level. The object-level immutability policy has higher precedence than the container-level immutability policy, which has a higher precedence than the account-level immutability policy.") + immutabilityPolicy?: AccountImmutabilityPolicyProperties; +} + +@doc("This defines account-level immutability policy properties.") +model AccountImmutabilityPolicyProperties { + @doc("The immutability period for the blobs in the container since the policy creation, in days.") + @maxValue(146000) + @minValue(1) + immutabilityPeriodSinceCreationInDays?: int32; + + @doc("The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted.") + state?: AccountImmutabilityPolicyState; + + @doc("This property can only be changed for disabled and unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted.") + allowProtectedAppendWrites?: boolean; +} + +@doc("Properties of the storage account.") +model StorageAccountProperties { + @doc("Gets the status of the storage account at the time the operation was called.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint.") + @visibility("read") + primaryEndpoints?: Endpoints; + + @doc("Gets the location of the primary data center for the storage account.") + @visibility("read") + primaryLocation?: string; + + @doc("Gets the status indicating whether the primary location of the storage account is available or unavailable.") + @visibility("read") + statusOfPrimary?: AccountStatus; + + @doc("Gets the timestamp of the most recent instance of a failover to the secondary location. Only the most recent timestamp is retained. This element is not returned if there has never been a failover instance. Only available if the accountType is Standard_GRS or Standard_RAGRS.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastGeoFailoverTime?: utcDateTime; + + @doc("Gets the location of the geo-replicated secondary for the storage account. Only available if the accountType is Standard_GRS or Standard_RAGRS.") + @visibility("read") + secondaryLocation?: string; + + @doc("Gets the status indicating whether the secondary location of the storage account is available or unavailable. Only available if the SKU name is Standard_GRS or Standard_RAGRS.") + @visibility("read") + statusOfSecondary?: AccountStatus; + + @doc("Gets the creation date and time of the storage account in UTC.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + creationTime?: utcDateTime; + + @doc("Gets the custom domain the user assigned to this storage account.") + @visibility("read") + customDomain?: CustomDomain; + + @doc("SasPolicy assigned to the storage account.") + @visibility("read") + sasPolicy?: SasPolicy; + + @doc("KeyPolicy assigned to the storage account.") + @visibility("read") + keyPolicy?: KeyPolicy; + + @doc("Storage account keys creation time.") + @visibility("read") + keyCreationTime?: KeyCreationTime; + + @doc("Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the secondary location of the storage account. Only available if the SKU name is Standard_RAGRS.") + @visibility("read") + secondaryEndpoints?: Endpoints; + + @doc("Encryption settings to be used for server-side encryption for the storage account.") + @visibility("read") + encryption?: Encryption; + + @doc("Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.") + @visibility("read") + accessTier?: AccessTier; + + @doc("Provides the identity based authentication settings for Azure Files.") + azureFilesIdentityBasedAuthentication?: AzureFilesIdentityBasedAuthentication; + + @doc("Allows https traffic only to storage service if sets to true.") + @projectedName("json", "supportsHttpsTrafficOnly") + enableHttpsTrafficOnly?: boolean; + + @doc("Network rule set") + @visibility("read") + @projectedName("json", "networkAcls") + networkRuleSet?: NetworkRuleSet; + + @doc("Enables Secure File Transfer Protocol, if set to true") + @projectedName("json", "isSftpEnabled") + IsSftpEnabled?: boolean; + + @doc("Enables local users feature, if set to true") + @projectedName("json", "isLocalUserEnabled") + IsLocalUserEnabled?: boolean; + + @doc("Account HierarchicalNamespace enabled if sets to true.") + @projectedName("json", "isHnsEnabled") + IsHnsEnabled?: boolean; + + @doc("Geo Replication Stats") + @visibility("read") + geoReplicationStats?: GeoReplicationStats; + + @doc("If the failover is in progress, the value will be true, otherwise, it will be null.") + @visibility("read") + failoverInProgress?: boolean; + + @doc("Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled.") + largeFileSharesState?: LargeFileSharesState; + + @doc("List of private endpoint connection associated with the specified storage account") + @visibility("read") + privateEndpointConnections?: PrivateEndpointConnection[]; + + @doc("Maintains information about the network routing choice opted by the user for data transfer") + routingPreference?: RoutingPreference; + + @doc("Blob restore status") + @visibility("read") + blobRestoreStatus?: BlobRestoreStatus; + + @doc("Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property.") + allowBlobPublicAccess?: boolean; + + @doc("Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.") + minimumTlsVersion?: MinimumTlsVersion; + + @doc("Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true.") + allowSharedKeyAccess?: boolean; + + @doc("NFS 3.0 protocol support enabled if set to true.") + @projectedName("json", "isNfsV3Enabled") + enableNfsV3?: boolean; + + @doc("Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property.") + allowCrossTenantReplication?: boolean; + + @doc("A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property.") + defaultToOAuthAuthentication?: boolean; + + @doc("Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.") + publicNetworkAccess?: PublicNetworkAccess; + + @doc("The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the containers in the account by default.") + immutableStorageWithVersioning?: ImmutableStorageAccount; + + @doc("Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet.") + allowedCopyScope?: AllowedCopyScope; + + @doc("This property is readOnly and is set by server during asynchronous storage account sku conversion operations.") + storageAccountSkuConversionStatus?: StorageAccountSkuConversionStatus; + + @doc("Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier.") + dnsEndpointType?: DnsEndpointType; +} + +@doc("The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object.") +model Endpoints { + @doc("Gets the blob endpoint.") + @visibility("read") + blob?: string; + + @doc("Gets the queue endpoint.") + @visibility("read") + queue?: string; + + @doc("Gets the table endpoint.") + @visibility("read") + table?: string; + + @doc("Gets the file endpoint.") + @visibility("read") + file?: string; + + @doc("Gets the web endpoint.") + @visibility("read") + web?: string; + + @doc("Gets the dfs endpoint.") + @visibility("read") + dfs?: string; + + @doc("Gets the microsoft routing storage endpoints.") + microsoftEndpoints?: StorageAccountMicrosoftEndpoints; + + @doc("Gets the internet routing storage endpoints") + internetEndpoints?: StorageAccountInternetEndpoints; +} + +@doc("The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object via a microsoft routing endpoint.") +model StorageAccountMicrosoftEndpoints { + @doc("Gets the blob endpoint.") + @visibility("read") + blob?: string; + + @doc("Gets the queue endpoint.") + @visibility("read") + queue?: string; + + @doc("Gets the table endpoint.") + @visibility("read") + table?: string; + + @doc("Gets the file endpoint.") + @visibility("read") + file?: string; + + @doc("Gets the web endpoint.") + @visibility("read") + web?: string; + + @doc("Gets the dfs endpoint.") + @visibility("read") + dfs?: string; +} + +@doc("The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via a internet routing endpoint.") +model StorageAccountInternetEndpoints { + @doc("Gets the blob endpoint.") + @visibility("read") + blob?: string; + + @doc("Gets the file endpoint.") + @visibility("read") + file?: string; + + @doc("Gets the web endpoint.") + @visibility("read") + web?: string; + + @doc("Gets the dfs endpoint.") + @visibility("read") + dfs?: string; +} + +@doc("Storage account keys creation time.") +model KeyCreationTime { + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + key1?: utcDateTime; + + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + key2?: utcDateTime; +} + +@doc("Statistics related to replication for storage account's Blob, Table, Queue and File services. It is only available when geo-redundant replication is enabled for the storage account.") +model GeoReplicationStats { + @doc("The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable.") + @visibility("read") + status?: GeoReplicationStatus; + + @doc("All primary writes preceding this UTC date/time value are guaranteed to be available for read operations. Primary writes following this point in time may or may not be available for reads. Element may be default value if value of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastSyncTime?: utcDateTime; + + @doc("A boolean flag which indicates whether or not account failover is supported for the account.") + @visibility("read") + canFailover?: boolean; +} + +@doc("Properties of the PrivateEndpointConnectProperties.") +model PrivateEndpointConnectionProperties { + @doc("The resource of private end point.") + privateEndpoint?: PrivateEndpoint; + + @doc("A collection of information about the state of the connection between service consumer and provider.") + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + + @doc("The provisioning state of the private endpoint connection resource.") + @visibility("read") + provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +@doc("The Private Endpoint resource.") +model PrivateEndpoint { + @doc("The ARM identifier for Private Endpoint") + @visibility("read") + id?: string; +} + +@doc("A collection of information about the state of the connection between service consumer and provider.") +model PrivateLinkServiceConnectionState { + @doc("Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.") + status?: PrivateEndpointServiceConnectionStatus; + + @doc("The reason for approval/rejection of the connection.") + description?: string; + + @doc("A message indicating if changes on the service provider require any updates on the consumer.") + actionRequired?: string; +} + +@doc("Blob restore status.") +model BlobRestoreStatus { + @doc("The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed.") + @visibility("read") + status?: BlobRestoreProgressStatus; + + @doc("Failure reason when blob restore is failed.") + @visibility("read") + failureReason?: string; + + @doc("Id for tracking blob restore request.") + @visibility("read") + restoreId?: string; + + @doc("Blob restore request parameters.") + @visibility("read") + parameters?: BlobRestoreParameters; +} + +@doc("Blob restore parameters") +model BlobRestoreParameters { + @doc("Restore blob to the specified time.") + @projectedName("json", "timetoRestore") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timeToRestore: utcDateTime; + + @doc("Blob ranges to restore.") + blobRanges: BlobRestoreRange[]; +} + +@doc("Blob range") +model BlobRestoreRange { + @doc("Blob start range. This is inclusive. Empty means account start.") + startRange: string; + + @doc("Blob end range. This is exclusive. Empty means account end.") + endRange: string; +} + +@doc("This defines the sku conversion status object for asynchronous sku conversions.") +model StorageAccountSkuConversionStatus { + @doc("This property indicates the current sku conversion status.") + @visibility("read") + skuConversionStatus?: SkuConversionStatus; + + @doc("This property represents the target sku name to which the account sku is being converted asynchronously.") + targetSkuName?: SkuName; + + @doc("This property represents the sku conversion start time.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startTime?: utcDateTime; + + @doc("This property represents the sku conversion end time.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endTime?: utcDateTime; +} + +@doc("Attributes of a deleted storage account.") +model DeletedAccountProperties { + @doc("Full resource id of the original storage account.") + @visibility("read") + storageAccountResourceId?: string; + + @doc("Location of the deleted account.") + @visibility("read") + location?: string; + + @doc("Can be used to attempt recovering this deleted account via PutStorageAccount API.") + @visibility("read") + restoreReference?: string; + + @doc("Creation time of the deleted account.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + creationTime?: utcDateTime; + + @doc("Deletion time of the deleted account.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + deletionTime?: utcDateTime; +} + +@doc("Error response body contract.") +model ErrorResponseBody { + @doc("An identifier for the error. Codes are invariant and are intended to be consumed programmatically.") + code?: string; + + @doc("A message describing the error, intended to be suitable for display in a user interface.") + message?: string; +} + +@doc("The response from the ListKeys operation.") +@pagedResult +model StorageAccountListKeysResult { + @doc("Gets the list of storage account keys and their properties for the specified storage account.") + @visibility("read") + @items + keys?: StorageAccountKey[]; +} + +@doc("An access key for the storage account.") +model StorageAccountKey { + @doc("Name of the key.") + @visibility("read") + keyName?: string; + + @doc("Base 64-encoded value of the key.") + @visibility("read") + value?: string; + + @doc("Permissions for the key -- read-only or full permissions.") + @visibility("read") + permissions?: KeyPermission; + + @doc("Creation time of the key, in round trip date format.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + creationTime?: utcDateTime; +} + +@doc("The parameters used to regenerate the storage account key.") +model StorageAccountRegenerateKeyParameters { + @doc("The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2.") + keyName: string; +} + +@doc("The response from the List Usages operation.") +@pagedResult +model UsageListResult { + @doc("Gets or sets the list of Storage Resource Usages.") + @items + value?: Usage[]; +} + +@doc("Describes Storage Resource Usage.") +model Usage { + @doc("Gets the unit of measurement.") + @visibility("read") + unit?: UsageUnit; + + @doc("Gets the current count of the allocated resources in the subscription.") + @visibility("read") + currentValue?: int32; + + @doc("Gets the maximum count of the resources that can be allocated in the subscription.") + @visibility("read") + limit?: int32; + + @doc("Gets the name of the type of usage.") + @visibility("read") + name?: UsageName; +} + +@doc("The usage names that can be used; currently limited to StorageAccount.") +model UsageName { + @doc("Gets a string describing the resource name.") + @visibility("read") + value?: string; + + @doc("Gets a localized string describing the resource name.") + @visibility("read") + localizedValue?: string; +} + +@doc("The parameters to list SAS credentials of a storage account.") +model AccountSasParameters { + @doc("The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f).") + @projectedName("json", "signedServices") + services: Services; + + @doc("The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files.") + @projectedName("json", "signedResourceTypes") + resourceTypes: SignedResourceTypes; + + @doc("The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p).") + @projectedName("json", "signedPermission") + permissions: Permissions; + + @doc("An IP address or a range of IP addresses from which to accept requests.") + @projectedName("json", "signedIp") + IPAddressOrRange?: string; + + @doc("The protocol permitted for a request made with the account SAS.") + @projectedName("json", "signedProtocol") + protocols?: HttpProtocol; + + @doc("The time at which the SAS becomes valid.") + @projectedName("json", "signedStart") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + sharedAccessStartTime?: utcDateTime; + + @doc("The time at which the shared access signature becomes invalid.") + @projectedName("json", "signedExpiry") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + sharedAccessExpiryTime: utcDateTime; + + @doc("The key to sign the account SAS token with.") + keyToSign?: string; +} + +@doc("The List SAS credentials operation response.") +model ListAccountSasResponse { + @doc("List SAS credentials of storage account.") + @visibility("read") + accountSasToken?: string; +} + +@doc("The parameters to list service SAS credentials of a specific resource.") +model ServiceSasParameters { + @doc("The canonical path to the signed resource.") + canonicalizedResource: string; + + @doc("The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s).") + @projectedName("json", "signedResource") + resource?: SignedResource; + + @doc("The signed permissions for the service SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p).") + @projectedName("json", "signedPermission") + permissions?: Permissions; + + @doc("An IP address or a range of IP addresses from which to accept requests.") + @projectedName("json", "signedIp") + IPAddressOrRange?: string; + + @doc("The protocol permitted for a request made with the account SAS.") + @projectedName("json", "signedProtocol") + protocols?: HttpProtocol; + + @doc("The time at which the SAS becomes valid.") + @projectedName("json", "signedStart") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + sharedAccessStartTime?: utcDateTime; + + @doc("The time at which the shared access signature becomes invalid.") + @projectedName("json", "signedExpiry") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + sharedAccessExpiryTime?: utcDateTime; + + @doc("A unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or table.") + @maxLength(64) + @projectedName("json", "signedIdentifier") + identifier?: string; + + @doc("The start of partition key.") + @projectedName("json", "startPk") + partitionKeyStart?: string; + + @doc("The end of partition key.") + @projectedName("json", "endPk") + partitionKeyEnd?: string; + + @doc("The start of row key.") + @projectedName("json", "startRk") + rowKeyStart?: string; + + @doc("The end of row key.") + @projectedName("json", "endRk") + rowKeyEnd?: string; + + @doc("The key to sign the account SAS token with.") + keyToSign?: string; + + @doc("The response header override for cache control.") + @projectedName("json", "rscc") + cacheControl?: string; + + @doc("The response header override for content disposition.") + @projectedName("json", "rscd") + contentDisposition?: string; + + @doc("The response header override for content encoding.") + @projectedName("json", "rsce") + contentEncoding?: string; + + @doc("The response header override for content language.") + @projectedName("json", "rscl") + contentLanguage?: string; + + @doc("The response header override for content type.") + @projectedName("json", "rsct") + contentType?: string; +} + +@doc("The List service SAS credentials operation response.") +model ListServiceSasResponse { + @doc("List service SAS credentials of specific resource.") + @visibility("read") + serviceSasToken?: string; +} + +@doc("The Storage Account ManagementPolicy properties.") +model ManagementPolicyProperties { + @doc("Returns the date and time the ManagementPolicies was last modified.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedTime?: utcDateTime; + + @doc("The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.") + policy: ManagementPolicySchema; +} + +@doc("The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.") +model ManagementPolicySchema { + @doc("The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.") + rules: ManagementPolicyRule[]; +} + +@doc("An object that wraps the Lifecycle rule. Each rule is uniquely defined by name.") +model ManagementPolicyRule { + @doc("Rule is enabled if set to true.") + enabled?: boolean; + + @doc("A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.") + name: string; + + @doc("The valid value is Lifecycle") + type: RuleType; + + @doc("An object that defines the Lifecycle rule.") + definition: ManagementPolicyDefinition; +} + +@doc("An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set.") +model ManagementPolicyDefinition { + @doc("An object that defines the action set.") + actions: ManagementPolicyAction; + + @doc("An object that defines the filter set.") + filters?: ManagementPolicyFilter; +} + +@doc("Actions are applied to the filtered blobs when the execution condition is met.") +model ManagementPolicyAction { + @doc("The management policy action for base blob") + baseBlob?: ManagementPolicyBaseBlob; + + @doc("The management policy action for snapshot") + snapshot?: ManagementPolicySnapShot; + + @doc("The management policy action for version") + version?: ManagementPolicyVersion; +} + +@doc("Management policy action for base blob.") +model ManagementPolicyBaseBlob { + @doc("The function to tier blobs to cool storage.") + tierToCool?: DateAfterModification; + + @doc("The function to tier blobs to archive storage.") + tierToArchive?: DateAfterModification; + + @doc("The function to tier blobs to cold storage.") + tierToCold?: DateAfterModification; + + @doc("The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts") + tierToHot?: DateAfterModification; + + @doc("The function to delete the blob") + delete?: DateAfterModification; + + @doc("This property enables auto tiering of a blob from cool to hot on a blob access. This property requires tierToCool.daysAfterLastAccessTimeGreaterThan.") + enableAutoTierToHotFromCool?: boolean; +} + +@doc("Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The daysAfterLastTierChangeGreaterThan property is only applicable for tierToArchive actions which requires daysAfterModificationGreaterThan to be set, also it cannot be used in conjunction with daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan.") +model DateAfterModification { + @doc("Value indicating the age in days after last modification") + daysAfterModificationGreaterThan?: float32; + + @doc("Value indicating the age in days after last blob access. This property can only be used in conjunction with last access time tracking policy") + daysAfterLastAccessTimeGreaterThan?: float32; + + @doc("Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions and requires daysAfterModificationGreaterThan to be set for baseBlobs based actions. The blob will be archived if both the conditions are satisfied.") + daysAfterLastTierChangeGreaterThan?: float32; + + @doc("Value indicating the age in days after blob creation.") + daysAfterCreationGreaterThan?: float32; +} + +@doc("Management policy action for snapshot.") +model ManagementPolicySnapShot { + @doc("The function to tier blob snapshot to cool storage.") + tierToCool?: DateAfterCreation; + + @doc("The function to tier blob snapshot to archive storage.") + tierToArchive?: DateAfterCreation; + + @doc("The function to tier blobs to cold storage.") + tierToCold?: DateAfterCreation; + + @doc("The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts") + tierToHot?: DateAfterCreation; + + @doc("The function to delete the blob snapshot") + delete?: DateAfterCreation; +} + +@doc("Object to define snapshot and version action conditions.") +model DateAfterCreation { + @doc("Value indicating the age in days after creation") + daysAfterCreationGreaterThan: float32; + + @doc("Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions and requires daysAfterCreationGreaterThan to be set for snapshots and blob version based actions. The blob will be archived if both the conditions are satisfied.") + daysAfterLastTierChangeGreaterThan?: float32; +} + +@doc("Management policy action for blob version.") +model ManagementPolicyVersion { + @doc("The function to tier blob version to cool storage.") + tierToCool?: DateAfterCreation; + + @doc("The function to tier blob version to archive storage.") + tierToArchive?: DateAfterCreation; + + @doc("The function to tier blobs to cold storage.") + tierToCold?: DateAfterCreation; + + @doc("The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts") + tierToHot?: DateAfterCreation; + + @doc("The function to delete the blob version") + delete?: DateAfterCreation; +} + +@doc("Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical AND is performed on all filters. ") +model ManagementPolicyFilter { + @doc("An array of strings for prefixes to be match.") + prefixMatch?: string[]; + + @doc("An array of predefined enum values. Currently blockBlob supports all tiering and delete actions. Only delete actions are supported for appendBlob.") + blobTypes: string[]; + + @doc("An array of blob index tag based filters, there can be at most 10 tag filters") + blobIndexMatch?: TagFilter[]; +} + +@doc("Blob index tag based filtering for blob objects") +model TagFilter { + @doc("This is the filter tag name, it can have 1 - 128 characters") + @maxLength(128) + @minLength(1) + name: string; + + @doc("This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) is currently supported") + `op`: string; + + @doc("This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters") + @maxLength(256) + value: string; +} + +@doc("The storage account blob inventory policy properties.") +model BlobInventoryPolicyProperties { + @doc("Returns the last modified date and time of the blob inventory policy.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedTime?: utcDateTime; + + @doc("The storage account blob inventory policy object. It is composed of policy rules.") + policy: BlobInventoryPolicySchema; +} + +@doc("The storage account blob inventory policy rules.") +model BlobInventoryPolicySchema { + @doc("Policy is enabled if set to true.") + enabled: boolean; + + @doc("Deprecated Property from API version 2021-04-01 onwards, the required destination container name must be specified at the rule level 'policy.rule.destination'") + @visibility("read") + destination?: string; + + @doc("The valid value is Inventory") + type: InventoryRuleType; + + @doc("The storage account blob inventory policy rules. The rule is applied when it is enabled.") + rules: BlobInventoryPolicyRule[]; +} + +@doc("An object that wraps the blob inventory rule. Each rule is uniquely defined by name.") +model BlobInventoryPolicyRule { + @doc("Rule is enabled when set to true.") + enabled: boolean; + + @doc("A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.") + name: string; + + @doc("Container name where blob inventory files are stored. Must be pre-created.") + destination: string; + + @doc("An object that defines the blob inventory policy rule.") + definition: BlobInventoryPolicyDefinition; +} + +@doc("An object that defines the blob inventory rule.") +model BlobInventoryPolicyDefinition { + @doc("An object that defines the filter set.") + filters?: BlobInventoryPolicyFilter; + + @doc("This is a required field, it specifies the format for the inventory files.") + format: Format; + + @doc("This is a required field. This field is used to schedule an inventory formation.") + schedule: Schedule; + + @doc("This is a required field. This field specifies the scope of the inventory created either at the blob or container level.") + objectType: ObjectType; + + @doc("This is a required field. This field specifies the fields and properties of the object to be included in the inventory. The Schema field value 'Name' is always required. The valid values for this field for the 'Blob' definition.objectType include 'Name, Creation-Time, Last-Modified, Content-Length, Content-MD5, BlobType, AccessTier, AccessTierChangeTime, AccessTierInferred, Tags, Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, Snapshot, VersionId, IsCurrentVersion, Metadata, LastAccessTime, Tags, Etag, ContentType, ContentEncoding, ContentLanguage, ContentCRC64, CacheControl, ContentDisposition, LeaseStatus, LeaseState, LeaseDuration, ServerEncrypted, Deleted, DeletionId, DeletedTime, RemainingRetentionDays, ImmutabilityPolicyUntilDate, ImmutabilityPolicyMode, LegalHold, CopyId, CopyStatus, CopySource, CopyProgress, CopyCompletionTime, CopyStatusDescription, CustomerProvidedKeySha256, RehydratePriority, ArchiveStatus, XmsBlobSequenceNumber, EncryptionScope, IncrementalCopy, TagCount'. For Blob object type schema field value 'DeletedTime' is applicable only for Hns enabled accounts. The valid values for 'Container' definition.objectType include 'Name, Last-Modified, Metadata, LeaseStatus, LeaseState, LeaseDuration, PublicAccess, HasImmutabilityPolicy, HasLegalHold, Etag, DefaultEncryptionScope, DenyEncryptionScopeOverride, ImmutableStorageWithVersioningEnabled, Deleted, Version, DeletedTime, RemainingRetentionDays'. Schema field values 'Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, DeletionId' are valid only for Hns enabled accounts.Schema field values 'Tags, TagCount' are only valid for Non-Hns accounts.") + schemaFields: string[]; +} + +@doc("An object that defines the blob inventory rule filter conditions. For 'Blob' definition.objectType all filter properties are applicable, 'blobTypes' is required and others are optional. For 'Container' definition.objectType only prefixMatch is applicable and is optional.") +model BlobInventoryPolicyFilter { + @doc("An array of strings with maximum 10 blob prefixes to be included in the inventory.") + prefixMatch?: string[]; + + @doc("An array of strings with maximum 10 blob prefixes to be excluded from the inventory.") + excludePrefix?: string[]; + + @doc("An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs. This field is required when definition.objectType property is set to 'Blob'.") + blobTypes?: string[]; + + @doc("Includes blob versions in blob inventory when value is set to true. The definition.schemaFields values 'VersionId and IsCurrentVersion' are required if this property is set to true, else they must be excluded.") + includeBlobVersions?: boolean; + + @doc("Includes blob snapshots in blob inventory when value is set to true. The definition.schemaFields value 'Snapshot' is required if this property is set to true, else it must be excluded.") + includeSnapshots?: boolean; + + @doc("For 'Container' definition.objectType the definition.schemaFields must include 'Deleted, Version, DeletedTime and RemainingRetentionDays'. For 'Blob' definition.objectType and HNS enabled storage accounts the definition.schemaFields must include 'DeletionId, Deleted, DeletedTime and RemainingRetentionDays' and for Hns disabled accounts the definition.schemaFields must include 'Deleted and RemainingRetentionDays', else it must be excluded.") + includeDeleted?: boolean; +} + +@doc("An error response from the Storage service.") +@error +model CloudError { + @doc("An error response from the Storage service.") + error?: CloudErrorBody; +} + +@doc("An error response from the Storage service.") +model CloudErrorBody { + @doc("An identifier for the error. Codes are invariant and are intended to be consumed programmatically.") + code?: string; + + @doc("A message describing the error, intended to be suitable for display in a user interface.") + message?: string; + + @doc("The target of the particular error. For example, the name of the property in error.") + target?: string; + + @doc("A list of additional details about the error.") + details?: CloudErrorBody[]; +} + +@doc("A list of private link resources") +model PrivateLinkResourceListResult { + @doc("Array of private link resources") + value?: PrivateLinkResource[]; +} + +@doc("A private link resource") +model PrivateLinkResource extends Resource { + @doc("Resource properties.") + properties?: PrivateLinkResourceProperties; +} + +@doc("Properties of a private link resource.") +model PrivateLinkResourceProperties { + @doc("The private link resource group id.") + @visibility("read") + groupId?: string; + + @doc("The private link resource required member names.") + @visibility("read") + requiredMembers?: string[]; + + @doc("The private link resource Private link DNS zone name.") + requiredZoneNames?: string[]; +} + +@doc("The Storage Account ObjectReplicationPolicy properties.") +model ObjectReplicationPolicyProperties { + @doc("A unique id for object replication policy.") + @visibility("read") + policyId?: string; + + @doc("Indicates when the policy is enabled on the source account.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + enabledTime?: utcDateTime; + + @doc("Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false.") + sourceAccount: string; + + @doc("Required. Destination account name. It should be full resource id if allowCrossTenantReplication set to false.") + destinationAccount: string; + + @doc("The storage account object replication rules.") + rules?: ObjectReplicationPolicyRule[]; +} + +@doc("The replication policy rule between two containers.") +model ObjectReplicationPolicyRule { + @doc("Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.") + ruleId?: string; + + @doc("Required. Source container name.") + sourceContainer: string; + + @doc("Required. Destination container name.") + destinationContainer: string; + + @doc("Optional. An object that defines the filter set.") + filters?: ObjectReplicationPolicyFilter; +} + +@doc("Filters limit replication to a subset of blobs within the storage account. A logical OR is performed on values in the filter. If multiple filters are defined, a logical AND is performed on all filters.") +model ObjectReplicationPolicyFilter { + @doc("Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.") + prefixMatch?: string[]; + + @doc("Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z") + minCreationTime?: string; +} + +@doc("The Storage Account Local User properties.") +model LocalUserProperties { + @doc("The permission scopes of the local user.") + permissionScopes?: PermissionScope[]; + + @doc("Optional, local user home directory.") + homeDirectory?: string; + + @doc("Optional, local user ssh authorized keys for SFTP.") + sshAuthorizedKeys?: SshPublicKey[]; + + @doc("A unique Security Identifier that is generated by the server.") + @visibility("read") + sid?: string; + + @doc("Indicates whether shared key exists. Set it to false to remove existing shared key.") + hasSharedKey?: boolean; + + @doc("Indicates whether ssh key exists. Set it to false to remove existing SSH key.") + hasSshKey?: boolean; + + @doc("Indicates whether ssh password exists. Set it to false to remove existing SSH password.") + hasSshPassword?: boolean; +} + +model PermissionScope { + @doc("The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), and Create (c).") + permissions: string; + + @doc("The service used by the local user, e.g. blob, file.") + service: string; + + @doc("The name of resource, normally the container name or the file share name, used by the local user.") + resourceName: string; +} + +model SshPublicKey { + @doc("Optional. It is used to store the function/usage of the key") + description?: string; + + @doc("Ssh public key base64 encoded. The format should be: ' ', e.g. ssh-rsa AAAABBBB") + key?: string; +} + +@doc("The Storage Account Local User keys.") +model LocalUserKeys { + @doc("Optional, local user ssh authorized keys for SFTP.") + sshAuthorizedKeys?: SshPublicKey[]; + + @doc("Auto generated by the server for SMB authentication.") + @visibility("read") + sharedKey?: string; +} + +@doc("The secrets of Storage Account Local User.") +model LocalUserRegeneratePasswordResult { + @doc("Auto generated password by the server for SSH authentication if hasSshPassword is set to true on the creation of local user.") + @visibility("read") + sshPassword?: string; +} + +@doc("Properties of the encryption scope.") +model EncryptionScopeProperties { + @doc("The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault.") + source?: EncryptionScopeSource; + + @doc("The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled.") + state?: EncryptionScopeState; + + @doc("Gets the creation date and time of the encryption scope in UTC.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + creationTime?: utcDateTime; + + @doc("Gets the last modification date and time of the encryption scope in UTC.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedTime?: utcDateTime; + + @doc("The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'.") + keyVaultProperties?: EncryptionScopeKeyVaultProperties; + + @doc("A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest.") + requireInfrastructureEncryption?: boolean; +} + +@doc("The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'.") +model EncryptionScopeKeyVaultProperties { + @doc("The object identifier for a key vault key object. When applied, the encryption scope will use the key referenced by the identifier to enable customer-managed key support on this encryption scope.") + keyUri?: string; + + @doc("The object identifier of the current versioned Key Vault Key in use.") + @visibility("read") + currentVersionedKeyIdentifier?: string; + + @doc("Timestamp of last rotation of the Key Vault Key.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastKeyRotationTimestamp?: utcDateTime; +} + +@doc("The properties of a storage account’s Blob service.") +model BlobServicePropertiesProperties { + @doc("Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service.") + cors?: CorsRules; + + @doc("DefaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions.") + defaultServiceVersion?: string; + + @doc("The blob service properties for blob soft delete.") + deleteRetentionPolicy?: DeleteRetentionPolicy; + + @doc("Versioning is enabled if set to true.") + isVersioningEnabled?: boolean; + + @doc("Deprecated in favor of isVersioningEnabled property.") + automaticSnapshotPolicyEnabled?: boolean; + + @doc("The blob service properties for change feed events.") + changeFeed?: ChangeFeed; + + @doc("The blob service properties for blob restore policy.") + restorePolicy?: RestorePolicyProperties; + + @doc("The blob service properties for container soft delete.") + containerDeleteRetentionPolicy?: DeleteRetentionPolicy; + + @doc("The blob service property to configure last access time based tracking policy.") + lastAccessTimeTrackingPolicy?: LastAccessTimeTrackingPolicy; +} + +@doc("Sets the CORS rules. You can include up to five CorsRule elements in the request. ") +model CorsRules { + @doc("The List of CORS rules. You can include up to five CorsRule elements in the request. ") + corsRules?: CorsRule[]; +} + +@doc("Specifies a CORS rule for the Blob service.") +model CorsRule { + @doc("Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or \"*\" to allow all domains") + allowedOrigins: string[]; + + @doc("Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin.") + allowedMethods: AllowedMethods[]; + + @doc("Required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response.") + maxAgeInSeconds: int32; + + @doc("Required if CorsRule element is present. A list of response headers to expose to CORS clients.") + exposedHeaders: string[]; + + @doc("Required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request.") + allowedHeaders: string[]; +} + +@doc("The service properties for soft delete.") +model DeleteRetentionPolicy { + @doc("Indicates whether DeleteRetentionPolicy is enabled.") + enabled?: boolean; + + @doc("Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365.") + @maxValue(365) + @minValue(1) + days?: int32; + + @doc("This property when set to true allows deletion of the soft deleted blob versions and snapshots. This property cannot be used blob restore policy. This property only applies to blob service and does not apply to containers or file share.") + allowPermanentDelete?: boolean; +} + +@doc("The blob service properties for change feed events.") +model ChangeFeed { + @doc("Indicates whether change feed event logging is enabled for the Blob service.") + enabled?: boolean; + + @doc("Indicates the duration of changeFeed retention in days. Minimum value is 1 day and maximum value is 146000 days (400 years). A null value indicates an infinite retention of the change feed.") + @maxValue(146000) + @minValue(1) + retentionInDays?: int32; +} + +@doc("The blob service properties for blob restore policy") +model RestorePolicyProperties { + @doc("Blob restore is enabled if set to true.") + enabled: boolean; + + @doc("how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days.") + @maxValue(365) + @minValue(1) + days?: int32; + + @doc("Deprecated in favor of minRestoreTime property.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastEnabledTime?: utcDateTime; + + @doc("Returns the minimum date and time that the restore can be started.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + minRestoreTime?: utcDateTime; +} + +@doc("The blob service properties for Last access time based tracking policy.") +model LastAccessTimeTrackingPolicy { + @doc("When set to true last access time based tracking is enabled.") + enable: boolean; + + @doc("Name of the policy. The valid value is AccessTimeTracking. This field is currently read only") + name?: Name; + + @doc("The field specifies blob object tracking granularity in days, typically how often the blob object should be tracked.This field is currently read only with value as 1") + trackingGranularityInDays?: int32; + + @doc("An array of predefined supported blob types. Only blockBlob is the supported value. This field is currently read only") + blobType?: string[]; +} + +@doc("The properties of a container.") +model ContainerProperties { + @doc("The version of the deleted blob container.") + @visibility("read") + version?: string; + + @doc("Indicates whether the blob container was deleted.") + @visibility("read") + deleted?: boolean; + + @doc("Blob container deletion time.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + deletedTime?: utcDateTime; + + @doc("Remaining retention days for soft deleted blob container.") + @visibility("read") + remainingRetentionDays?: int32; + + @doc("Default the container to use specified encryption scope for all writes.") + defaultEncryptionScope?: string; + + @doc("Block override of encryption scope from the container default.") + denyEncryptionScopeOverride?: boolean; + + @doc("Specifies whether data in the container may be accessed publicly and the level of access.") + publicAccess?: PublicAccess; + + @doc("Returns the date and time the container was last modified.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedTime?: utcDateTime; + + @doc("The lease status of the container.") + @visibility("read") + leaseStatus?: LeaseStatus; + + @doc("Lease state of the container.") + @visibility("read") + leaseState?: LeaseState; + + @doc("Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.") + @visibility("read") + leaseDuration?: LeaseDuration; + + @doc("A name-value pair to associate with the container as metadata.") + metadata?: Record; + + @doc("The ImmutabilityPolicy property of the container.") + @visibility("read") + immutabilityPolicy?: ImmutabilityPolicyProperties; + + @doc("The LegalHold property of the container.") + @visibility("read") + legalHold?: LegalHoldProperties; + + @doc("The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.") + @visibility("read") + hasLegalHold?: boolean; + + @doc("The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container.") + @visibility("read") + hasImmutabilityPolicy?: boolean; + + @doc("The object level immutability property of the container. The property is immutable and can only be set to true at the container creation time. Existing containers must undergo a migration process.") + immutableStorageWithVersioning?: ImmutableStorageWithVersioning; + + @doc("Enable NFSv3 root squash on blob container.") + enableNfsV3RootSquash?: boolean; + + @doc("Enable NFSv3 all squash on blob container.") + enableNfsV3AllSquash?: boolean; +} + +@doc("The properties of an ImmutabilityPolicy of a blob container.") +model ImmutabilityPolicyProperties { + @doc("The properties of an ImmutabilityPolicy of a blob container.") + properties?: ImmutabilityPolicyProperty; + + @doc("ImmutabilityPolicy Etag.") + @visibility("read") + etag?: string; + + @doc("The ImmutabilityPolicy update history of the blob container.") + @visibility("read") + updateHistory?: UpdateHistoryProperty[]; +} + +@doc("The properties of an ImmutabilityPolicy of a blob container.") +model ImmutabilityPolicyProperty { + @doc("The immutability period for the blobs in the container since the policy creation, in days.") + immutabilityPeriodSinceCreationInDays?: int32; + + @doc("The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.") + @visibility("read") + state?: ImmutabilityPolicyState; + + @doc("This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.") + allowProtectedAppendWrites?: boolean; + + @doc("This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive.") + allowProtectedAppendWritesAll?: boolean; +} + +@doc("An update history of the ImmutabilityPolicy of a blob container.") +model UpdateHistoryProperty { + @doc("The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend.") + @visibility("read") + update?: ImmutabilityPolicyUpdateType; + + @doc("The immutability period for the blobs in the container since the policy creation, in days.") + @visibility("read") + immutabilityPeriodSinceCreationInDays?: int32; + + @doc("Returns the date and time the ImmutabilityPolicy was updated.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timestamp?: utcDateTime; + + @doc("Returns the Object ID of the user who updated the ImmutabilityPolicy.") + @visibility("read") + objectIdentifier?: string; + + @doc("Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy.") + @visibility("read") + tenantId?: string; + + @doc("Returns the User Principal Name of the user who updated the ImmutabilityPolicy.") + @visibility("read") + upn?: string; + + @doc("This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.") + allowProtectedAppendWrites?: boolean; + + @doc("This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive.") + allowProtectedAppendWritesAll?: boolean; +} + +@doc("The LegalHold property of a blob container.") +model LegalHoldProperties { + @doc("The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.") + @visibility("read") + hasLegalHold?: boolean; + + @doc("The list of LegalHold tags of a blob container.") + tags?: TagProperty[]; + + @doc("Protected append blob writes history.") + protectedAppendWritesHistory?: ProtectedAppendWritesHistory; +} + +@doc("A tag of the LegalHold of a blob container.") +model TagProperty { + @doc("The tag value.") + @visibility("read") + tag?: string; + + @doc("Returns the date and time the tag was added.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timestamp?: utcDateTime; + + @doc("Returns the Object ID of the user who added the tag.") + @visibility("read") + objectIdentifier?: string; + + @doc("Returns the Tenant ID that issued the token for the user who added the tag.") + @visibility("read") + tenantId?: string; + + @doc("Returns the User Principal Name of the user who added the tag.") + @visibility("read") + upn?: string; +} + +@doc("Protected append writes history setting for the blob container with Legal holds.") +model ProtectedAppendWritesHistory { + @doc("When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted.") + allowProtectedAppendWritesAll?: boolean; + + @doc("Returns the date and time the tag was added.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timestamp?: utcDateTime; +} + +@doc("Object level immutability properties of the container.") +model ImmutableStorageWithVersioning { + @doc("This is an immutable property, when set to true it enables object level immutability at the container level.") + enabled?: boolean; + + @doc("Returns the date and time the object level immutability was enabled.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timeStamp?: utcDateTime; + + @doc("This property denotes the container level immutability to object level immutability migration state.") + @visibility("read") + migrationState?: MigrationState; +} + +@doc("The resource model definition for an Azure Resource Manager resource with an etag.") +model AzureEntityResource extends Resource { + @doc("Resource Etag.") + @visibility("read") + etag?: string; +} + +@doc("The LegalHold property of a blob container.") +model LegalHold { + @doc("The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.") + @visibility("read") + hasLegalHold?: boolean; + + @doc("Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.") + tags: string[]; + + @doc("When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted.") + allowProtectedAppendWritesAll?: boolean; +} + +@doc("Lease Container request schema.") +model LeaseContainerRequest { + @doc("Specifies the lease action. Can be one of the available actions.") + action: LeaseContainerRequestAction; + + @doc("Identifies the lease. Can be specified in any valid GUID string format.") + leaseId?: string; + + @doc("Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60.") + breakPeriod?: int32; + + @doc("Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires.") + leaseDuration?: int32; + + @doc("Optional for acquire, required for change. Proposed lease ID, in a GUID string format.") + proposedLeaseId?: string; +} + +@doc("Lease Container response schema.") +model LeaseContainerResponse { + @doc("Returned unique lease ID that must be included with any request to delete the container, or to renew, change, or release the lease.") + leaseId?: string; + + @doc("Approximate time remaining in the lease period, in seconds.") + leaseTimeSeconds?: string; +} + +@doc("The properties of File services in storage account.") +model FileServicePropertiesProperties { + @doc("Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service.") + cors?: CorsRules; + + @doc("The file service properties for share soft delete.") + shareDeleteRetentionPolicy?: DeleteRetentionPolicy; + + @doc("Protocol settings for file service") + protocolSettings?: ProtocolSettings; +} + +@doc("Protocol settings for file service") +model ProtocolSettings { + @doc("Setting for SMB protocol") + smb?: SmbSetting; +} + +@doc("Setting for SMB protocol") +model SmbSetting { + @doc("Multichannel setting. Applies to Premium FileStorage only.") + multichannel?: Multichannel; + + @doc("SMB protocol versions supported by server. Valid values are SMB2.1, SMB3.0, SMB3.1.1. Should be passed as a string with delimiter ';'.") + versions?: string; + + @doc("SMB authentication methods supported by server. Valid values are NTLMv2, Kerberos. Should be passed as a string with delimiter ';'.") + authenticationMethods?: string; + + @doc("Kerberos ticket encryption supported by server. Valid values are RC4-HMAC, AES-256. Should be passed as a string with delimiter ';'") + kerberosTicketEncryption?: string; + + @doc("SMB channel encryption supported by server. Valid values are AES-128-CCM, AES-128-GCM, AES-256-GCM. Should be passed as a string with delimiter ';'.") + channelEncryption?: string; +} + +@doc("Multichannel setting. Applies to Premium FileStorage only.") +model Multichannel { + @doc("Indicates whether multichannel is enabled") + enabled?: boolean; +} + +@doc("The properties of the file share.") +model FileShareProperties { + @doc("Returns the date and time the share was last modified.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedTime?: utcDateTime; + + @doc("A name-value pair to associate with the share as metadata.") + metadata?: Record; + + @doc("The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.") + @maxValue(102400) + @minValue(1) + shareQuota?: int32; + + @doc("The authentication protocol that is used for the file share. Can only be specified when creating a share.") + @visibility("read", "create") + enabledProtocols?: EnabledProtocols; + + @doc("The property is for NFS share only. The default is NoRootSquash.") + rootSquash?: RootSquashType; + + @doc("The version of the share.") + @visibility("read") + version?: string; + + @doc("Indicates whether the share was deleted.") + @visibility("read") + deleted?: boolean; + + @doc("The deleted time if the share was deleted.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + deletedTime?: utcDateTime; + + @doc("Remaining retention days for share that was soft deleted.") + @visibility("read") + remainingRetentionDays?: int32; + + @doc("Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.") + accessTier?: ShareAccessTier; + + @doc("Indicates the last modification time for share access tier.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + accessTierChangeTime?: utcDateTime; + + @doc("Indicates if there is a pending transition for access tier.") + @visibility("read") + accessTierStatus?: string; + + @doc("The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files.") + @visibility("read") + shareUsageBytes?: int32; + + @doc("The lease status of the share.") + @visibility("read") + leaseStatus?: LeaseStatus; + + @doc("Lease state of the share.") + @visibility("read") + leaseState?: LeaseState; + + @doc("Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased.") + @visibility("read") + leaseDuration?: LeaseDuration; + + @doc("List of stored access policies specified on the share.") + signedIdentifiers?: SignedIdentifier[]; + + @doc("Creation time of share snapshot returned in the response of list shares with expand param \"snapshots\".") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + snapshotTime?: utcDateTime; +} + +model SignedIdentifier { + @doc("An unique identifier of the stored access policy.") + id?: string; + + @doc("Access policy") + accessPolicy?: AccessPolicy; +} + +model AccessPolicy { + @doc("Start time of the access policy") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startTime?: utcDateTime; + + @doc("Expiry time of the access policy") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expiryTime?: utcDateTime; + + @doc("List of abbreviated permissions.") + permission?: string; +} + +@doc("The deleted share to be restored.") +model DeletedShare { + @doc("Required. Identify the name of the deleted share that will be restored.") + deletedShareName: string; + + @doc("Required. Identify the version of the deleted share that will be restored.") + deletedShareVersion: string; +} + +@doc("Lease Share request schema.") +model LeaseShareRequest { + @doc("Specifies the lease action. Can be one of the available actions.") + action: LeaseShareAction; + + @doc("Identifies the lease. Can be specified in any valid GUID string format.") + leaseId?: string; + + @doc("Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60.") + breakPeriod?: int32; + + @doc("Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires.") + leaseDuration?: int32; + + @doc("Optional for acquire, required for change. Proposed lease ID, in a GUID string format.") + proposedLeaseId?: string; +} + +@doc("Lease Share response schema.") +model LeaseShareResponse { + @doc("Returned unique lease ID that must be included with any request to delete the share, or to renew, change, or release the lease.") + leaseId?: string; + + @doc("Approximate time remaining in the lease period, in seconds.") + leaseTimeSeconds?: string; +} + +@doc("The properties of a storage account’s Queue service.") +model QueueServicePropertiesProperties { + @doc("Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Queue service.") + cors?: CorsRules; +} + +model QueueProperties { + @doc("A name-value pair that represents queue metadata.") + metadata?: Record; + + @doc("Integer indicating an approximate number of messages in the queue. This number is not lower than the actual number of messages in the queue, but could be higher.") + @visibility("read") + approximateMessageCount?: int32; +} + +@doc("The properties of a storage account’s Table service.") +model TableServicePropertiesProperties { + @doc("Specifies CORS rules for the Table service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Table service.") + cors?: CorsRules; +} + +model TableProperties { + @doc("Table name under the specified account") + @visibility("read") + tableName?: string; + + @doc("List of stored access policies specified on the table.") + signedIdentifiers?: TableSignedIdentifier[]; +} + +@doc("Object to set Table Access Policy.") +model TableSignedIdentifier { + @doc("unique-64-character-value of the stored access policy.") + id: string; + + @doc("Access policy") + accessPolicy?: TableAccessPolicy; +} + +@doc("Table Access Policy Properties Object.") +model TableAccessPolicy { + @doc("Start time of the access policy") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startTime?: utcDateTime; + + @doc("Expiry time of the access policy") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expiryTime?: utcDateTime; + + @doc("Required. List of abbreviated permissions. Supported permission values include 'r','a','u','d'") + permission: string; +} + +@doc("The blob container properties be listed out.") +model ListContainerItem extends AzureEntityResource { + @doc("The blob container properties be listed out.") + properties?: ContainerProperties; +} + +@doc("The file share properties be listed out.") +model FileShareItem extends AzureEntityResource { + @doc("The file share properties be listed out.") + properties?: FileShareProperties; +} + +model ListQueue extends Resource { + @doc("List Queue resource properties.") + @projectedName("json", "properties") + queueProperties?: ListQueueProperties; +} + +model ListQueueProperties { + @doc("A name-value pair that represents queue metadata.") + metadata?: Record; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp new file mode 100644 index 0000000000..186c177afd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp @@ -0,0 +1,42 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace Microsoft.Storage; + +interface SkusOperations { + @doc("Lists the available SKUs supported by Microsoft.Storage for given subscription.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/skus") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + }, + StorageSkuListResult + >; +} + +interface UsagesOperations { + @doc("Gets the current usage count and the limit for the resources of the location under the subscription.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages") + @get + ListByLocation is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The location of the Azure Storage resource.") + @path + location: string; + }, + UsageListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..691f3c1b0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/resources.json b/packages/extensions/openapi-to-typespec/test/arm-test/resources.json new file mode 100644 index 0000000000..9f2a376da5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/resources.json @@ -0,0 +1,181 @@ +{ + "Resources": { + "Employee": { + "Name": "Employee", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}", + "Method": "GET", + "OperationID": "Employees_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Employee" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}", + "Method": "PUT", + "OperationID": "Employees_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a Employee" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}", + "Method": "PATCH", + "OperationID": "Employees_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update a Employee" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}", + "Method": "DELETE", + "OperationID": "Employees_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a Employee" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees", + "Method": "GET", + "OperationID": "Employees_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Employee resources by resource group" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetEmployees", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Test/employees", + "Method": "GET", + "OperationID": "Employees_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Employee resources by subscription ID" + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "Employee", + "ResourceType": "Microsoft.Test/employees", + "ResourceKey": "employeeName", + "ResourceKeySegment": "employees", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Enroll": { + "Name": "Enroll", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/enrolls/default", + "Method": "GET", + "OperationID": "Enrolls_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Enroll." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["Employee"], + "SwaggerModelName": "Enroll", + "ResourceType": "Microsoft.Test/employees/enrolls", + "ResourceKey": "default", + "ResourceKeySegment": "enrolls", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": true + }, + "DictProperty": { + "Name": "DictProperty", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/dictproperties/{name}", + "Method": "GET", + "OperationID": "DictProperties_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Resource." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/dictproperties", + "Method": "GET", + "OperationID": "DictProperties_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List resources by resource group" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["Employee"], + "SwaggerModelName": "DictProperty", + "ResourceType": "Microsoft.Test/employees/dictproperties", + "ResourceKey": "name", + "ResourceKeySegment": "dictproperties", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/swagger/basic.json b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/basic.json new file mode 100644 index 0000000000..b99280e7ed --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/basic.json @@ -0,0 +1,471 @@ +{ + "swagger": "2.0", + "info": { + "title": "TestClient", + "version": "2023-10-12", + "description": "For test." + }, + "schemes": ["https"], + "host": "management.azure.com", + "produces": ["application/json"], + "consumes": ["application/json"], + "security": [ + { + "azure_auth": ["user_impersonation"] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "Employees" + } + ], + "paths": { + "/providers/Microsoft.Test/operations": { + "get": { + "operationId": "Operations_List", + "tags": ["Operations"], + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Test/employees": { + "get": { + "operationId": "Employees_ListBySubscription", + "tags": ["Employees"], + "description": "List Employee resources by subscription ID", + "parameters": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/EmployeeListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees": { + "get": { + "operationId": "Employees_ListByResourceGroup", + "tags": ["Employees"], + "description": "List Employee resources by resource group", + "parameters": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/EmployeeListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}": { + "get": { + "operationId": "Employees_Get", + "tags": ["Employees"], + "description": "Get a Employee", + "parameters": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/Employee" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "operationId": "Employees_CreateOrUpdate", + "tags": ["Employees"], + "description": "Create a Employee", + "parameters": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/Employee" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Employee' update operation succeeded", + "schema": { + "$ref": "#/definitions/Employee" + } + }, + "201": { + "description": "Resource 'Employee' create operation succeeded", + "schema": { + "$ref": "#/definitions/Employee" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Employees_Update", + "tags": ["Employees"], + "description": "Update a Employee", + "parameters": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/EmployeeUpdate" + } + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/Employee" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "operationId": "Employees_Delete", + "tags": ["Employees"], + "description": "Delete a Employee", + "parameters": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource deleted successfully." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "Employee": { + "type": "object", + "description": "A Test resource", + "properties": { + "properties": { + "$ref": "#/definitions/EmployeeProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": ["read", "create"] + } + }, + "allOf": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "EmployeeListResult": { + "type": "object", + "description": "The response of a Employee list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Employee items on this page", + "items": { + "$ref": "#/definitions/Employee" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": ["value"] + }, + "EmployeeProperties": { + "type": "object", + "description": "Employee properties", + "properties": { + "age": { + "type": "integer", + "format": "int32", + "description": "Age of employee" + }, + "city": { + "type": "string", + "description": "City of employee" + }, + "profile": { + "type": "string", + "format": "base64url", + "description": "Profile of employee" + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + } + }, + "EmployeeUpdate": { + "type": "object", + "description": "The type used for update operations of the Employee.", + "properties": { + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "$ref": "#/definitions/EmployeeUpdateProperties", + "x-ms-client-flatten": true + } + } + }, + "EmployeeUpdateProperties": { + "type": "object", + "description": "The updatable properties of the Employee.", + "properties": { + "age": { + "type": "integer", + "format": "int32", + "description": "Age of employee" + }, + "city": { + "type": "string", + "description": "City of employee" + }, + "profile": { + "type": "string", + "format": "base64url", + "description": "Profile of employee" + } + } + }, + "ProvisioningState": { + "type": "string", + "description": "The provisioning state of a resource.", + "enum": ["Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted"], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Resource has been created." + }, + { + "name": "Failed", + "value": "Failed", + "description": "Resource creation failed." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Resource creation was canceled." + }, + { + "name": "Provisioning", + "value": "Provisioning", + "description": "The resource is being provisioned" + }, + { + "name": "Updating", + "value": "Updating", + "description": "The resource is updating" + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "The resource is being deleted" + }, + { + "name": "Accepted", + "value": "Accepted", + "description": "The resource create request has been accepted" + } + ] + }, + "readOnly": true + } + }, + "parameters": {} +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v1/privatelinks.json b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v1/privatelinks.json new file mode 100644 index 0000000000..4647593102 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v1/privatelinks.json @@ -0,0 +1,171 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.0", + "title": "Common types" + }, + "paths": {}, + "definitions": { + "PrivateEndpoint": { + "type": "object", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The ARM identifier for Private Endpoint" + } + }, + "description": "The Private Endpoint resource." + }, + "PrivateEndpointConnection": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/PrivateEndpointConnectionProperties", + "x-ms-client-flatten": true, + "description": "Resource properties." + } + }, + "allOf": [ + { + "$ref": "./types.json#/definitions/Resource" + } + ], + "description": "The Private Endpoint Connection resource." + }, + "PrivateEndpointConnectionProperties": { + "type": "object", + "properties": { + "privateEndpoint": { + "$ref": "#/definitions/PrivateEndpoint", + "description": "The resource of private end point." + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/PrivateLinkServiceConnectionState", + "description": "A collection of information about the state of the connection between service consumer and provider." + }, + "provisioningState": { + "$ref": "#/definitions/PrivateEndpointConnectionProvisioningState", + "description": "The provisioning state of the private endpoint connection resource." + } + }, + "required": ["privateLinkServiceConnectionState"], + "description": "Properties of the PrivateEndpointConnectProperties." + }, + "PrivateLinkServiceConnectionState": { + "type": "object", + "properties": { + "status": { + "$ref": "#/definitions/PrivateEndpointServiceConnectionStatus", + "description": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service." + }, + "description": { + "type": "string", + "description": "The reason for approval/rejection of the connection." + }, + "actionsRequired": { + "type": "string", + "description": "A message indicating if changes on the service provider require any updates on the consumer." + } + }, + "description": "A collection of information about the state of the connection between service consumer and provider." + }, + "PrivateEndpointServiceConnectionStatus": { + "type": "string", + "description": "The private endpoint connection status.", + "enum": ["Pending", "Approved", "Rejected"], + "x-ms-enum": { + "name": "PrivateEndpointServiceConnectionStatus", + "modelAsString": true + } + }, + "PrivateEndpointConnectionProvisioningState": { + "type": "string", + "readOnly": true, + "description": "The current provisioning state.", + "enum": ["Succeeded", "Creating", "Deleting", "Failed"], + "x-ms-enum": { + "name": "PrivateEndpointConnectionProvisioningState", + "modelAsString": true + } + }, + "PrivateLinkResource": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/PrivateLinkResourceProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "./types.json#/definitions/Resource" + } + ], + "description": "A private link resource" + }, + "PrivateLinkResourceProperties": { + "type": "object", + "properties": { + "groupId": { + "description": "The private link resource group id.", + "type": "string", + "readOnly": true + }, + "requiredMembers": { + "description": "The private link resource required member names.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "requiredZoneNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The private link resource Private link DNS zone name." + } + }, + "description": "Properties of a private link resource." + }, + "PrivateEndpointConnectionListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "description": "Array of private endpoint connections", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + } + }, + "description": "List of private endpoint connection associated with the specified storage account" + }, + "PrivateLinkResourceListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "description": "Array of private link resources", + "items": { + "$ref": "#/definitions/PrivateLinkResource" + } + } + }, + "description": "A list of private link resources" + } + }, + "parameters": { + "PrivateEndpointConnectionName": { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the private endpoint connection associated with the Azure resource", + "x-ms-parameter-location": "method" + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v1/types.json b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v1/types.json new file mode 100644 index 0000000000..ebf7a4d821 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v1/types.json @@ -0,0 +1,512 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.0", + "title": "Common types" + }, + "paths": {}, + "definitions": { + "Resource": { + "title": "Resource", + "description": "Common fields that are returned in the response for all Azure Resource Manager resources", + "type": "object", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the resource" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" + } + }, + "x-ms-azure-resource": true + }, + "AzureEntityResource": { + "x-ms-client-name": "AzureEntityResource", + "title": "Entity Resource", + "description": "The resource model definition for an Azure Resource Manager resource with an etag.", + "type": "object", + "properties": { + "etag": { + "type": "string", + "readOnly": true, + "description": "Resource Etag." + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "TrackedResource": { + "title": "Tracked Resource", + "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": ["read", "create", "update"], + "description": "Resource tags." + }, + "location": { + "type": "string", + "x-ms-mutability": ["read", "create"], + "description": "The geo-location where the resource lives" + } + }, + "required": ["location"], + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "ProxyResource": { + "title": "Proxy Resource", + "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "ResourceModelWithAllowedPropertySet": { + "description": "The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set.", + "type": "object", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "x-ms-mutability": ["read"], + "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the resource" + }, + "type": { + "readOnly": true, + "type": "string", + "x-ms-mutability": ["read"], + "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" + }, + "location": { + "type": "string", + "x-ms-mutability": ["read", "create"], + "description": "The geo-location where the resource lives" + }, + "managedBy": { + "type": "string", + "x-ms-mutability": ["read", "create", "update"], + "description": "The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource." + }, + "kind": { + "type": "string", + "x-ms-mutability": ["read", "create"], + "description": "Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.", + "pattern": "^[-\\w\\._,\\(\\)]+$" + }, + "etag": { + "readOnly": true, + "type": "string", + "description": "The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. " + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": ["read", "create", "update"], + "description": "Resource tags." + }, + "identity": { + "allOf": [ + { + "$ref": "#/definitions/Identity" + } + ] + }, + "sku": { + "allOf": [ + { + "$ref": "#/definitions/Sku" + } + ] + }, + "plan": { + "allOf": [ + { + "$ref": "#/definitions/Plan" + } + ] + } + }, + "x-ms-azure-resource": true + }, + "Sku": { + "description": "The resource model definition representing SKU", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the SKU. Ex - P3. It is typically a letter+number code" + }, + "tier": { + "type": "string", + "enum": ["Free", "Basic", "Standard", "Premium"], + "x-ms-enum": { + "name": "SkuTier", + "modelAsString": false + }, + "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT." + }, + "size": { + "type": "string", + "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. " + }, + "family": { + "type": "string", + "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here." + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted." + } + }, + "required": ["name"] + }, + "Identity": { + "description": "Identity for the resource.", + "type": "object", + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal ID of resource identity." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of resource." + }, + "type": { + "type": "string", + "description": "The identity type.", + "enum": ["SystemAssigned"], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": false + } + } + } + }, + "Plan": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A user defined name of the 3rd Party Artifact that is being procured." + }, + "publisher": { + "type": "string", + "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic" + }, + "product": { + "type": "string", + "description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. " + }, + "promotionCode": { + "type": "string", + "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact." + }, + "version": { + "type": "string", + "description": "The version of the desired product/artifact." + } + }, + "description": "Plan for the resource.", + "required": ["name", "publisher", "product"] + }, + "ErrorResponse": { + "title": "Error Response", + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)", + "type": "object", + "properties": { + "code": { + "readOnly": true, + "type": "string", + "description": "The error code." + }, + "message": { + "readOnly": true, + "type": "string", + "description": "The error message." + }, + "target": { + "readOnly": true, + "type": "string", + "description": "The error target." + }, + "details": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-identifiers": ["message", "target"], + "description": "The error details." + }, + "additionalInfo": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorAdditionalInfo" + }, + "x-ms-identifiers": [], + "description": "The error additional info." + } + } + }, + "ErrorAdditionalInfo": { + "type": "object", + "properties": { + "type": { + "readOnly": true, + "type": "string", + "description": "The additional info type." + }, + "info": { + "readOnly": true, + "type": "object", + "description": "The additional info." + } + }, + "description": "The resource management error additional info." + }, + "Operation": { + "title": "REST API Operation", + "description": "Details of a REST API operation, returned from the Resource Provider Operations API", + "type": "object", + "properties": { + "name": { + "description": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": "string", + "readOnly": true + }, + "isDataAction": { + "description": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.", + "type": "boolean", + "readOnly": true + }, + "display": { + "description": "Localized display information for this particular operation.", + "type": "object", + "properties": { + "provider": { + "description": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": "string", + "readOnly": true + } + } + }, + "origin": { + "description": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": "string", + "readOnly": true, + "enum": ["user", "system", "user,system"], + "x-ms-enum": { + "name": "Origin", + "modelAsString": true + } + }, + "actionType": { + "description": "Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": "string", + "readOnly": true, + "enum": ["Internal"], + "x-ms-enum": { + "name": "ActionType", + "modelAsString": true + } + } + } + }, + "OperationListResult": { + "description": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "x-ms-identifiers": ["name"], + "description": "List of operations supported by the resource provider", + "readOnly": true + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of operation list results (if there are any).", + "readOnly": true + } + } + }, + "locationData": { + "description": "Metadata pertaining to the geographic location of the resource.", + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 256, + "description": "A canonical name for the geographic or physical location." + }, + "city": { + "type": "string", + "description": "The city or locality where the resource is located." + }, + "district": { + "type": "string", + "description": "The district, state, or province where the resource is located." + }, + "countryOrRegion": { + "type": "string", + "description": "The country or region where the resource is located" + } + }, + "required": ["name"] + }, + "systemData": { + "description": "Metadata pertaining to creation and last modification of the resource.", + "type": "object", + "readOnly": true, + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "type": "string", + "description": "The type of identity that created the resource.", + "enum": ["User", "Application", "ManagedIdentity", "Key"], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "type": "string", + "description": "The type of identity that last modified the resource.", + "enum": ["User", "Application", "ManagedIdentity", "Key"], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" + } + } + }, + "encryptionProperties": { + "description": "Configuration of key for data encryption", + "type": "object", + "properties": { + "status": { + "description": "Indicates whether or not the encryption is enabled for container registry.", + "enum": ["enabled", "disabled"], + "type": "string", + "x-ms-enum": { + "name": "EncryptionStatus", + "modelAsString": true + } + }, + "keyVaultProperties": { + "$ref": "#/definitions/KeyVaultProperties", + "description": "Key vault properties." + } + } + }, + "KeyVaultProperties": { + "type": "object", + "properties": { + "keyIdentifier": { + "description": "Key vault uri to access the encryption key.", + "type": "string" + }, + "identity": { + "description": "The client ID of the identity which will be used to access key vault.", + "type": "string" + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the target subscription.", + "minLength": 1 + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for this operation.", + "minLength": 1 + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group. The name is case insensitive.", + "minLength": 1, + "maxLength": 90, + "x-ms-parameter-location": "method" + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v2/privatelinks.json b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v2/privatelinks.json new file mode 100644 index 0000000000..468b6891f1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v2/privatelinks.json @@ -0,0 +1,171 @@ +{ + "swagger": "2.0", + "info": { + "version": "2.0", + "title": "Common types" + }, + "paths": {}, + "definitions": { + "PrivateEndpoint": { + "type": "object", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The ARM identifier for Private Endpoint" + } + }, + "description": "The Private Endpoint resource." + }, + "PrivateEndpointConnection": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/PrivateEndpointConnectionProperties", + "x-ms-client-flatten": true, + "description": "Resource properties." + } + }, + "allOf": [ + { + "$ref": "./types.json#/definitions/Resource" + } + ], + "description": "The Private Endpoint Connection resource." + }, + "PrivateEndpointConnectionProperties": { + "type": "object", + "properties": { + "privateEndpoint": { + "$ref": "#/definitions/PrivateEndpoint", + "description": "The resource of private end point." + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/PrivateLinkServiceConnectionState", + "description": "A collection of information about the state of the connection between service consumer and provider." + }, + "provisioningState": { + "$ref": "#/definitions/PrivateEndpointConnectionProvisioningState", + "description": "The provisioning state of the private endpoint connection resource." + } + }, + "required": ["privateLinkServiceConnectionState"], + "description": "Properties of the PrivateEndpointConnectProperties." + }, + "PrivateLinkServiceConnectionState": { + "type": "object", + "properties": { + "status": { + "$ref": "#/definitions/PrivateEndpointServiceConnectionStatus", + "description": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service." + }, + "description": { + "type": "string", + "description": "The reason for approval/rejection of the connection." + }, + "actionsRequired": { + "type": "string", + "description": "A message indicating if changes on the service provider require any updates on the consumer." + } + }, + "description": "A collection of information about the state of the connection between service consumer and provider." + }, + "PrivateEndpointServiceConnectionStatus": { + "type": "string", + "description": "The private endpoint connection status.", + "enum": ["Pending", "Approved", "Rejected"], + "x-ms-enum": { + "name": "PrivateEndpointServiceConnectionStatus", + "modelAsString": true + } + }, + "PrivateEndpointConnectionProvisioningState": { + "type": "string", + "readOnly": true, + "description": "The current provisioning state.", + "enum": ["Succeeded", "Creating", "Deleting", "Failed"], + "x-ms-enum": { + "name": "PrivateEndpointConnectionProvisioningState", + "modelAsString": true + } + }, + "PrivateLinkResource": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/PrivateLinkResourceProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "./types.json#/definitions/Resource" + } + ], + "description": "A private link resource" + }, + "PrivateLinkResourceProperties": { + "type": "object", + "properties": { + "groupId": { + "description": "The private link resource group id.", + "type": "string", + "readOnly": true + }, + "requiredMembers": { + "description": "The private link resource required member names.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "requiredZoneNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The private link resource Private link DNS zone name." + } + }, + "description": "Properties of a private link resource." + }, + "PrivateEndpointConnectionListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "description": "Array of private endpoint connections", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + } + }, + "description": "List of private endpoint connection associated with the specified storage account" + }, + "PrivateLinkResourceListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "description": "Array of private link resources", + "items": { + "$ref": "#/definitions/PrivateLinkResource" + } + } + }, + "description": "A list of private link resources" + } + }, + "parameters": { + "PrivateEndpointConnectionName": { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the private endpoint connection associated with the Azure resource", + "x-ms-parameter-location": "method" + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v2/types.json b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v2/types.json new file mode 100644 index 0000000000..1c16d31acf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v2/types.json @@ -0,0 +1,623 @@ +{ + "swagger": "2.0", + "info": { + "version": "2.0", + "title": "Common types" + }, + "paths": {}, + "definitions": { + "Resource": { + "title": "Resource", + "description": "Common fields that are returned in the response for all Azure Resource Manager resources", + "type": "object", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the resource" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" + } + }, + "x-ms-azure-resource": true + }, + "AzureEntityResource": { + "x-ms-client-name": "AzureEntityResource", + "title": "Entity Resource", + "description": "The resource model definition for an Azure Resource Manager resource with an etag.", + "type": "object", + "properties": { + "etag": { + "type": "string", + "readOnly": true, + "description": "Resource Etag." + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "TrackedResource": { + "title": "Tracked Resource", + "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": ["read", "create", "update"], + "description": "Resource tags." + }, + "location": { + "type": "string", + "x-ms-mutability": ["read", "create"], + "description": "The geo-location where the resource lives" + } + }, + "required": ["location"], + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "ProxyResource": { + "title": "Proxy Resource", + "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "ResourceModelWithAllowedPropertySet": { + "description": "The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set.", + "type": "object", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "x-ms-mutability": ["read"], + "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the resource" + }, + "type": { + "readOnly": true, + "type": "string", + "x-ms-mutability": ["read"], + "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" + }, + "location": { + "type": "string", + "x-ms-mutability": ["read", "create"], + "description": "The geo-location where the resource lives" + }, + "managedBy": { + "type": "string", + "x-ms-mutability": ["read", "create", "update"], + "description": "The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource." + }, + "kind": { + "type": "string", + "x-ms-mutability": ["read", "create"], + "description": "Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.", + "pattern": "^[-\\w\\._,\\(\\)]+$" + }, + "etag": { + "readOnly": true, + "type": "string", + "description": "The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. " + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": ["read", "create", "update"], + "description": "Resource tags." + }, + "identity": { + "allOf": [ + { + "$ref": "#/definitions/Identity" + } + ] + }, + "sku": { + "allOf": [ + { + "$ref": "#/definitions/Sku" + } + ] + }, + "plan": { + "allOf": [ + { + "$ref": "#/definitions/Plan" + } + ] + } + }, + "x-ms-azure-resource": true + }, + "Sku": { + "description": "The resource model definition representing SKU", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the SKU. Ex - P3. It is typically a letter+number code" + }, + "tier": { + "type": "string", + "enum": ["Free", "Basic", "Standard", "Premium"], + "x-ms-enum": { + "name": "SkuTier", + "modelAsString": false + }, + "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT." + }, + "size": { + "type": "string", + "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. " + }, + "family": { + "type": "string", + "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here." + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted." + } + }, + "required": ["name"] + }, + "Identity": { + "description": "Identity for the resource.", + "type": "object", + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal ID of resource identity." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of resource." + }, + "type": { + "type": "string", + "description": "The identity type.", + "enum": ["SystemAssigned"], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": false + } + } + } + }, + "Plan": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A user defined name of the 3rd Party Artifact that is being procured." + }, + "publisher": { + "type": "string", + "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic" + }, + "product": { + "type": "string", + "description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. " + }, + "promotionCode": { + "type": "string", + "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact." + }, + "version": { + "type": "string", + "description": "The version of the desired product/artifact." + } + }, + "description": "Plan for the resource.", + "required": ["name", "publisher", "product"] + }, + "ErrorDetail": { + "description": "The error detail.", + "type": "object", + "properties": { + "code": { + "readOnly": true, + "type": "string", + "description": "The error code." + }, + "message": { + "readOnly": true, + "type": "string", + "description": "The error message." + }, + "target": { + "readOnly": true, + "type": "string", + "description": "The error target." + }, + "details": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDetail" + }, + "x-ms-identifiers": ["message", "target"], + "description": "The error details." + }, + "additionalInfo": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorAdditionalInfo" + }, + "x-ms-identifiers": [], + "description": "The error additional info." + } + } + }, + "ErrorResponse": { + "title": "Error response", + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).", + "type": "object", + "properties": { + "error": { + "description": "The error object.", + "$ref": "#/definitions/ErrorDetail" + } + } + }, + "ErrorAdditionalInfo": { + "type": "object", + "properties": { + "type": { + "readOnly": true, + "type": "string", + "description": "The additional info type." + }, + "info": { + "readOnly": true, + "type": "object", + "description": "The additional info." + } + }, + "description": "The resource management error additional info." + }, + "Operation": { + "title": "REST API Operation", + "description": "Details of a REST API operation, returned from the Resource Provider Operations API", + "type": "object", + "properties": { + "name": { + "description": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": "string", + "readOnly": true + }, + "isDataAction": { + "description": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.", + "type": "boolean", + "readOnly": true + }, + "display": { + "description": "Localized display information for this particular operation.", + "type": "object", + "properties": { + "provider": { + "description": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": "string", + "readOnly": true + } + } + }, + "origin": { + "description": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": "string", + "readOnly": true, + "enum": ["user", "system", "user,system"], + "x-ms-enum": { + "name": "Origin", + "modelAsString": true + } + }, + "actionType": { + "description": "Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": "string", + "readOnly": true, + "enum": ["Internal"], + "x-ms-enum": { + "name": "ActionType", + "modelAsString": true + } + } + } + }, + "OperationListResult": { + "description": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "x-ms-identifiers": ["name"], + "description": "List of operations supported by the resource provider", + "readOnly": true + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of operation list results (if there are any).", + "readOnly": true + } + } + }, + "OperationStatusResult": { + "description": "The current status of an async operation.", + "type": "object", + "required": ["status"], + "properties": { + "id": { + "description": "Fully qualified ID for the async operation.", + "type": "string" + }, + "name": { + "description": "Name of the async operation.", + "type": "string" + }, + "status": { + "description": "Operation status.", + "type": "string" + }, + "percentComplete": { + "description": "Percent of the operation that is complete.", + "type": "number", + "minimum": 0, + "maximum": 100 + }, + "startTime": { + "description": "The start time of the operation.", + "type": "string", + "format": "date-time" + }, + "endTime": { + "description": "The end time of the operation.", + "type": "string", + "format": "date-time" + }, + "operations": { + "description": "The operations list.", + "type": "array", + "items": { + "$ref": "#/definitions/OperationStatusResult" + } + }, + "error": { + "description": "If present, details of the operation error.", + "$ref": "#/definitions/ErrorDetail" + } + } + }, + "locationData": { + "description": "Metadata pertaining to the geographic location of the resource.", + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 256, + "description": "A canonical name for the geographic or physical location." + }, + "city": { + "type": "string", + "description": "The city or locality where the resource is located." + }, + "district": { + "type": "string", + "description": "The district, state, or province where the resource is located." + }, + "countryOrRegion": { + "type": "string", + "description": "The country or region where the resource is located" + } + }, + "required": ["name"] + }, + "systemData": { + "description": "Metadata pertaining to creation and last modification of the resource.", + "type": "object", + "readOnly": true, + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "type": "string", + "description": "The type of identity that created the resource.", + "enum": ["User", "Application", "ManagedIdentity", "Key"], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "type": "string", + "description": "The type of identity that last modified the resource.", + "enum": ["User", "Application", "ManagedIdentity", "Key"], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" + } + } + }, + "encryptionProperties": { + "description": "Configuration of key for data encryption", + "type": "object", + "properties": { + "status": { + "description": "Indicates whether or not the encryption is enabled for container registry.", + "enum": ["enabled", "disabled"], + "type": "string", + "x-ms-enum": { + "name": "EncryptionStatus", + "modelAsString": true + } + }, + "keyVaultProperties": { + "$ref": "#/definitions/KeyVaultProperties", + "description": "Key vault properties." + } + } + }, + "KeyVaultProperties": { + "type": "object", + "properties": { + "keyIdentifier": { + "description": "Key vault uri to access the encryption key.", + "type": "string" + }, + "identity": { + "description": "The client ID of the identity which will be used to access key vault.", + "type": "string" + } + } + }, + "CheckNameAvailabilityRequest": { + "description": "The check availability request body.", + "type": "object", + "properties": { + "name": { + "description": "The name of the resource for which availability needs to be checked.", + "type": "string" + }, + "type": { + "description": "The resource type.", + "type": "string" + } + } + }, + "CheckNameAvailabilityResponse": { + "description": "The check availability result.", + "type": "object", + "properties": { + "nameAvailable": { + "description": "Indicates if the resource name is available.", + "type": "boolean" + }, + "reason": { + "description": "The reason why the given name is not available.", + "type": "string", + "enum": ["Invalid", "AlreadyExists"], + "x-ms-enum": { + "name": "CheckNameAvailabilityReason", + "modelAsString": true + } + }, + "message": { + "description": "Detailed reason why the given name is available.", + "type": "string" + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the target subscription.", + "minLength": 1 + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for this operation.", + "minLength": 1 + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group. The name is case insensitive.", + "minLength": 1, + "maxLength": 90, + "x-ms-parameter-location": "method" + }, + "OperationIdParameter": { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of an ongoing async operation.", + "minLength": 1, + "x-ms-parameter-location": "method" + }, + "LocationParameter": { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "description": "The name of Azure region.", + "minLength": 1, + "x-ms-parameter-location": "method" + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v3/managedidentity.json b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v3/managedidentity.json new file mode 100644 index 0000000000..2abec69ab8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v3/managedidentity.json @@ -0,0 +1,101 @@ +{ + "swagger": "2.0", + "info": { + "version": "3.0", + "title": "Common types" + }, + "paths": {}, + "definitions": { + "UserAssignedIdentities": { + "title": "User-Assigned Identities", + "description": "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UserAssignedIdentity" + } + }, + "UserAssignedIdentity": { + "type": "object", + "description": "User assigned identity properties", + "properties": { + "principalId": { + "description": "The principal ID of the assigned identity.", + "format": "uuid", + "type": "string", + "readOnly": true + }, + "clientId": { + "description": "The client ID of the assigned identity.", + "format": "uuid", + "type": "string", + "readOnly": true + } + } + }, + "ManagedServiceIdentityType": { + "description": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + "enum": ["None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned"], + "type": "string", + "x-ms-enum": { + "name": "ManagedServiceIdentityType", + "modelAsString": true + } + }, + "ManagedServiceIdentity": { + "description": "Managed service identity (system assigned and/or user assigned identities)", + "type": "object", + "properties": { + "principalId": { + "readOnly": true, + "format": "uuid", + "type": "string", + "description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity." + }, + "tenantId": { + "readOnly": true, + "format": "uuid", + "type": "string", + "description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity." + }, + "type": { + "$ref": "#/definitions/ManagedServiceIdentityType" + }, + "userAssignedIdentities": { + "$ref": "#/definitions/UserAssignedIdentities" + } + }, + "required": ["type"] + }, + "SystemAssignedServiceIdentityType": { + "description": "Type of managed service identity (either system assigned, or none).", + "enum": ["None", "SystemAssigned"], + "type": "string", + "x-ms-enum": { + "name": "SystemAssignedServiceIdentityType", + "modelAsString": true + } + }, + "SystemAssignedServiceIdentity": { + "description": "Managed service identity (either system assigned, or none)", + "type": "object", + "properties": { + "principalId": { + "readOnly": true, + "format": "uuid", + "type": "string", + "description": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity." + }, + "tenantId": { + "readOnly": true, + "format": "uuid", + "type": "string", + "description": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity." + }, + "type": { + "$ref": "#/definitions/SystemAssignedServiceIdentityType" + } + }, + "required": ["type"] + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v3/privatelinks.json b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v3/privatelinks.json new file mode 100644 index 0000000000..54de3bbbcf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v3/privatelinks.json @@ -0,0 +1,171 @@ +{ + "swagger": "2.0", + "info": { + "version": "3.0", + "title": "Common types" + }, + "paths": {}, + "definitions": { + "PrivateEndpoint": { + "type": "object", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "The ARM identifier for Private Endpoint" + } + }, + "description": "The Private Endpoint resource." + }, + "PrivateEndpointConnection": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/PrivateEndpointConnectionProperties", + "x-ms-client-flatten": true, + "description": "Resource properties." + } + }, + "allOf": [ + { + "$ref": "./types.json#/definitions/Resource" + } + ], + "description": "The Private Endpoint Connection resource." + }, + "PrivateEndpointConnectionProperties": { + "type": "object", + "properties": { + "privateEndpoint": { + "$ref": "#/definitions/PrivateEndpoint", + "description": "The resource of private end point." + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/PrivateLinkServiceConnectionState", + "description": "A collection of information about the state of the connection between service consumer and provider." + }, + "provisioningState": { + "$ref": "#/definitions/PrivateEndpointConnectionProvisioningState", + "description": "The provisioning state of the private endpoint connection resource." + } + }, + "required": ["privateLinkServiceConnectionState"], + "description": "Properties of the PrivateEndpointConnectProperties." + }, + "PrivateLinkServiceConnectionState": { + "type": "object", + "properties": { + "status": { + "$ref": "#/definitions/PrivateEndpointServiceConnectionStatus", + "description": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service." + }, + "description": { + "type": "string", + "description": "The reason for approval/rejection of the connection." + }, + "actionsRequired": { + "type": "string", + "description": "A message indicating if changes on the service provider require any updates on the consumer." + } + }, + "description": "A collection of information about the state of the connection between service consumer and provider." + }, + "PrivateEndpointServiceConnectionStatus": { + "type": "string", + "description": "The private endpoint connection status.", + "enum": ["Pending", "Approved", "Rejected"], + "x-ms-enum": { + "name": "PrivateEndpointServiceConnectionStatus", + "modelAsString": true + } + }, + "PrivateEndpointConnectionProvisioningState": { + "type": "string", + "readOnly": true, + "description": "The current provisioning state.", + "enum": ["Succeeded", "Creating", "Deleting", "Failed"], + "x-ms-enum": { + "name": "PrivateEndpointConnectionProvisioningState", + "modelAsString": true + } + }, + "PrivateLinkResource": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/PrivateLinkResourceProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "./types.json#/definitions/Resource" + } + ], + "description": "A private link resource" + }, + "PrivateLinkResourceProperties": { + "type": "object", + "properties": { + "groupId": { + "description": "The private link resource group id.", + "type": "string", + "readOnly": true + }, + "requiredMembers": { + "description": "The private link resource required member names.", + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + }, + "requiredZoneNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The private link resource Private link DNS zone name." + } + }, + "description": "Properties of a private link resource." + }, + "PrivateEndpointConnectionListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "description": "Array of private endpoint connections", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + } + }, + "description": "List of private endpoint connection associated with the specified storage account" + }, + "PrivateLinkResourceListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "description": "Array of private link resources", + "items": { + "$ref": "#/definitions/PrivateLinkResource" + } + } + }, + "description": "A list of private link resources" + } + }, + "parameters": { + "PrivateEndpointConnectionName": { + "name": "privateEndpointConnectionName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the private endpoint connection associated with the Azure resource", + "x-ms-parameter-location": "method" + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v3/types.json b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v3/types.json new file mode 100644 index 0000000000..0736a8e6ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/common-types/resource-management/v3/types.json @@ -0,0 +1,607 @@ +{ + "swagger": "2.0", + "info": { + "version": "3.0", + "title": "Common types" + }, + "paths": {}, + "definitions": { + "Resource": { + "title": "Resource", + "description": "Common fields that are returned in the response for all Azure Resource Manager resources", + "type": "object", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + }, + "name": { + "readOnly": true, + "type": "string", + "description": "The name of the resource" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"" + }, + "systemData": { + "readOnly": true, + "type": "object", + "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "$ref": "#/definitions/systemData" + } + }, + "x-ms-azure-resource": true + }, + "AzureEntityResource": { + "x-ms-client-name": "AzureEntityResource", + "title": "Entity Resource", + "description": "The resource model definition for an Azure Resource Manager resource with an etag.", + "type": "object", + "properties": { + "etag": { + "type": "string", + "readOnly": true, + "description": "Resource Etag." + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "TrackedResource": { + "title": "Tracked Resource", + "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": ["read", "create", "update"], + "description": "Resource tags." + }, + "location": { + "type": "string", + "x-ms-mutability": ["read", "create"], + "description": "The geo-location where the resource lives" + } + }, + "required": ["location"], + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "ProxyResource": { + "title": "Proxy Resource", + "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "ResourceModelWithAllowedPropertySet": { + "description": "The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set.", + "type": "object", + "properties": { + "managedBy": { + "type": "string", + "x-ms-mutability": ["read", "create", "update"], + "description": "The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource." + }, + "kind": { + "type": "string", + "x-ms-mutability": ["read", "create"], + "description": "Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.", + "pattern": "^[-\\w\\._,\\(\\)]+$" + }, + "etag": { + "readOnly": true, + "type": "string", + "description": "The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. " + }, + "identity": { + "allOf": [ + { + "$ref": "#/definitions/Identity" + } + ] + }, + "sku": { + "allOf": [ + { + "$ref": "#/definitions/Sku" + } + ] + }, + "plan": { + "allOf": [ + { + "$ref": "#/definitions/Plan" + } + ] + } + }, + "allOf": [ + { + "$ref": "#/definitions/TrackedResource" + } + ], + "x-ms-azure-resource": true + }, + "SkuTier": { + "type": "string", + "enum": ["Free", "Basic", "Standard", "Premium"], + "x-ms-enum": { + "name": "SkuTier", + "modelAsString": false + }, + "description": "This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT." + }, + "Sku": { + "description": "The resource model definition representing SKU", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the SKU. Ex - P3. It is typically a letter+number code" + }, + "tier": { + "$ref": "#/definitions/SkuTier" + }, + "size": { + "type": "string", + "description": "The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. " + }, + "family": { + "type": "string", + "description": "If the service has different generations of hardware, for the same SKU, then that can be captured here." + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted." + } + }, + "required": ["name"] + }, + "Identity": { + "description": "Identity for the resource.", + "type": "object", + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal ID of resource identity." + }, + "tenantId": { + "readOnly": true, + "type": "string", + "description": "The tenant ID of resource." + }, + "type": { + "type": "string", + "description": "The identity type.", + "enum": ["SystemAssigned"], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": false + } + } + } + }, + "Plan": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "A user defined name of the 3rd Party Artifact that is being procured." + }, + "publisher": { + "type": "string", + "description": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic" + }, + "product": { + "type": "string", + "description": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. " + }, + "promotionCode": { + "type": "string", + "description": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact." + }, + "version": { + "type": "string", + "description": "The version of the desired product/artifact." + } + }, + "description": "Plan for the resource.", + "required": ["name", "publisher", "product"] + }, + "ErrorDetail": { + "description": "The error detail.", + "type": "object", + "properties": { + "code": { + "readOnly": true, + "type": "string", + "description": "The error code." + }, + "message": { + "readOnly": true, + "type": "string", + "description": "The error message." + }, + "target": { + "readOnly": true, + "type": "string", + "description": "The error target." + }, + "details": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDetail" + }, + "x-ms-identifiers": ["message", "target"], + "description": "The error details." + }, + "additionalInfo": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorAdditionalInfo" + }, + "x-ms-identifiers": [], + "description": "The error additional info." + } + } + }, + "ErrorResponse": { + "title": "Error response", + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).", + "type": "object", + "properties": { + "error": { + "description": "The error object.", + "$ref": "#/definitions/ErrorDetail" + } + } + }, + "ErrorAdditionalInfo": { + "type": "object", + "properties": { + "type": { + "readOnly": true, + "type": "string", + "description": "The additional info type." + }, + "info": { + "readOnly": true, + "type": "object", + "description": "The additional info." + } + }, + "description": "The resource management error additional info." + }, + "Operation": { + "title": "REST API Operation", + "description": "Details of a REST API operation, returned from the Resource Provider Operations API", + "type": "object", + "properties": { + "name": { + "description": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": "string", + "readOnly": true + }, + "isDataAction": { + "description": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for ARM/control-plane operations.", + "type": "boolean", + "readOnly": true + }, + "display": { + "description": "Localized display information for this particular operation.", + "type": "object", + "properties": { + "provider": { + "description": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": "string", + "readOnly": true + }, + "description": { + "description": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": "string", + "readOnly": true + } + } + }, + "origin": { + "description": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": "string", + "readOnly": true, + "enum": ["user", "system", "user,system"], + "x-ms-enum": { + "name": "Origin", + "modelAsString": true + } + }, + "actionType": { + "description": "Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": "string", + "readOnly": true, + "enum": ["Internal"], + "x-ms-enum": { + "name": "ActionType", + "modelAsString": true + } + } + } + }, + "OperationListResult": { + "description": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "x-ms-identifiers": ["name"], + "description": "List of operations supported by the resource provider", + "readOnly": true + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of operation list results (if there are any).", + "readOnly": true + } + } + }, + "OperationStatusResult": { + "description": "The current status of an async operation.", + "type": "object", + "required": ["status"], + "properties": { + "id": { + "description": "Fully qualified ID for the async operation.", + "type": "string" + }, + "name": { + "description": "Name of the async operation.", + "type": "string" + }, + "status": { + "description": "Operation status.", + "type": "string" + }, + "percentComplete": { + "description": "Percent of the operation that is complete.", + "type": "number", + "minimum": 0, + "maximum": 100 + }, + "startTime": { + "description": "The start time of the operation.", + "type": "string", + "format": "date-time" + }, + "endTime": { + "description": "The end time of the operation.", + "type": "string", + "format": "date-time" + }, + "operations": { + "description": "The operations list.", + "type": "array", + "items": { + "$ref": "#/definitions/OperationStatusResult" + } + }, + "error": { + "description": "If present, details of the operation error.", + "$ref": "#/definitions/ErrorDetail" + } + } + }, + "locationData": { + "description": "Metadata pertaining to the geographic location of the resource.", + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 256, + "description": "A canonical name for the geographic or physical location." + }, + "city": { + "type": "string", + "description": "The city or locality where the resource is located." + }, + "district": { + "type": "string", + "description": "The district, state, or province where the resource is located." + }, + "countryOrRegion": { + "type": "string", + "description": "The country or region where the resource is located" + } + }, + "required": ["name"] + }, + "systemData": { + "description": "Metadata pertaining to creation and last modification of the resource.", + "type": "object", + "readOnly": true, + "properties": { + "createdBy": { + "type": "string", + "description": "The identity that created the resource." + }, + "createdByType": { + "type": "string", + "description": "The type of identity that created the resource.", + "enum": ["User", "Application", "ManagedIdentity", "Key"], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource creation (UTC)." + }, + "lastModifiedBy": { + "type": "string", + "description": "The identity that last modified the resource." + }, + "lastModifiedByType": { + "type": "string", + "description": "The type of identity that last modified the resource.", + "enum": ["User", "Application", "ManagedIdentity", "Key"], + "x-ms-enum": { + "name": "createdByType", + "modelAsString": true + } + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "The timestamp of resource last modification (UTC)" + } + } + }, + "encryptionProperties": { + "description": "Configuration of key for data encryption", + "type": "object", + "properties": { + "status": { + "description": "Indicates whether or not the encryption is enabled for container registry.", + "enum": ["enabled", "disabled"], + "type": "string", + "x-ms-enum": { + "name": "EncryptionStatus", + "modelAsString": true + } + }, + "keyVaultProperties": { + "$ref": "#/definitions/KeyVaultProperties", + "description": "Key vault properties." + } + } + }, + "KeyVaultProperties": { + "type": "object", + "properties": { + "keyIdentifier": { + "description": "Key vault uri to access the encryption key.", + "type": "string" + }, + "identity": { + "description": "The client ID of the identity which will be used to access key vault.", + "type": "string" + } + } + }, + "CheckNameAvailabilityRequest": { + "description": "The check availability request body.", + "type": "object", + "properties": { + "name": { + "description": "The name of the resource for which availability needs to be checked.", + "type": "string" + }, + "type": { + "description": "The resource type.", + "type": "string" + } + } + }, + "CheckNameAvailabilityResponse": { + "description": "The check availability result.", + "type": "object", + "properties": { + "nameAvailable": { + "description": "Indicates if the resource name is available.", + "type": "boolean" + }, + "reason": { + "description": "The reason why the given name is not available.", + "type": "string", + "enum": ["Invalid", "AlreadyExists"], + "x-ms-enum": { + "name": "CheckNameAvailabilityReason", + "modelAsString": true + } + }, + "message": { + "description": "Detailed reason why the given name is available.", + "type": "string" + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the target subscription.", + "minLength": 1 + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to use for this operation.", + "minLength": 1 + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group. The name is case insensitive.", + "minLength": 1, + "maxLength": 90, + "x-ms-parameter-location": "method" + }, + "OperationIdParameter": { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of an ongoing async operation.", + "minLength": 1, + "x-ms-parameter-location": "method" + }, + "LocationParameter": { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "description": "The name of Azure region.", + "minLength": 1, + "x-ms-parameter-location": "method" + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/swagger/dict-properties.json b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/dict-properties.json new file mode 100644 index 0000000000..3298f893e5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/dict-properties.json @@ -0,0 +1,171 @@ +{ + "swagger": "2.0", + "info": { + "title": "TestClient", + "version": "2023-10-12", + "description": "For test." + }, + "schemes": ["https"], + "host": "management.azure.com", + "produces": ["application/json"], + "consumes": ["application/json"], + "security": [ + { + "azure_auth": ["user_impersonation"] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "tags": [ + { + "name": "DictProperty" + } + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/dictproperties": { + "get": { + "operationId": "DictProperties_ListByResourceGroup", + "tags": ["DictProperties"], + "description": "List resources by resource group", + "parameters": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/DictPropertyListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/dictproperties/{name}": { + "get": { + "operationId": "DictProperties_Get", + "tags": ["DictProperties"], + "description": "Get a Resource.", + "parameters": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + }, + { + "name": "name", + "in": "path", + "description": "Name of resource", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/DictProperty" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "DictProperty": { + "type": "object", + "description": "A Test resource", + "properties": { + "properties": { + "$ref": "#/definitions/DictPropertyProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": ["read", "create"] + } + }, + "allOf": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "DictPropertyListResult": { + "type": "object", + "description": "The response of a resource list operation.", + "properties": { + "value": { + "type": "array", + "description": "The resource items on this page", + "items": { + "$ref": "#/definitions/DictProperty" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": ["value"] + }, + "DictPropertyProperties": { + "type": "object", + "description": "Resource properties", + "properties": {}, + "additionalProperties": true + } + }, + "parameters": {} +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/swagger/singleton.json b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/singleton.json new file mode 100644 index 0000000000..c8ed665b1b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/singleton.json @@ -0,0 +1,110 @@ +{ + "swagger": "2.0", + "info": { + "title": "TestClient", + "version": "2023-10-12", + "description": "For test." + }, + "schemes": ["https"], + "host": "management.azure.com", + "produces": ["application/json"], + "consumes": ["application/json"], + "security": [ + { + "azure_auth": ["user_impersonation"] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "tags": [ + { + "name": "Enrolls" + } + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/enrolls/default": { + "get": { + "operationId": "Enrolls_Get", + "tags": ["Enrolls"], + "description": "Get a Enroll.", + "parameters": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/Enroll" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "Enroll": { + "type": "object", + "description": "A Test resource", + "properties": { + "properties": { + "$ref": "#/definitions/EnrollProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": ["read", "create"] + } + }, + "allOf": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "EnrollProperties": { + "type": "object", + "description": "Enroll properties", + "properties": { + "country": { + "type": "integer", + "format": "int32", + "description": "Country of employee" + }, + "city": { + "type": "string", + "description": "City of employee" + } + } + } + }, + "parameters": {} +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/test.md b/packages/extensions/openapi-to-typespec/test/arm-test/test.md new file mode 100644 index 0000000000..f4e2428f06 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/test.md @@ -0,0 +1,16 @@ +```yaml +openapi-type: arm +input-file: + - ./swagger/basic.json + - ./swagger/singleton.json + - ./swagger/dict-properties.json +``` + +```yaml +title: "Azure Test resource management API." +clear-output-folder: false +guessResourceKey: false +isAzureSpec: true +isArm: true +namespace: "Microsoft.Test" +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp new file mode 100644 index 0000000000..4898464a92 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp @@ -0,0 +1,30 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Employee.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Test; +@doc("A Test resource") +@parentResource(Employee) +model DictProperty is TrackedResource> { + @doc("Name of resource") + @pattern("^[a-zA-Z0-9-]{3,24}$") + @path + @key("name") + @segment("dictproperties") + name: string; +} + +@armResourceOperations +interface DictProperties { + @doc("Get a Resource.") + get is ArmResourceRead; + @doc("List resources by resource group") + listByResourceGroup is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp new file mode 100644 index 0000000000..eaa000d001 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp @@ -0,0 +1,36 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Test; +@doc("A Test resource") +model Employee is TrackedResource { + @doc("Name of employee") + @pattern("^[a-zA-Z0-9-]{3,24}$") + @path + @key("employeeName") + @segment("employees") + name: string; +} + +@armResourceOperations +interface Employees { + @doc("Get a Employee") + get is ArmResourceRead; + @doc("Create a Employee") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a Employee") + update is ArmResourcePatchSync; + @doc("Delete a Employee") + delete is ArmResourceDeleteSync; + @doc("List Employee resources by resource group") + listByResourceGroup is ArmResourceListByParent; + @doc("List Employee resources by subscription ID") + listBySubscription is ArmListBySubscription; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp new file mode 100644 index 0000000000..cb3c249484 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp @@ -0,0 +1,26 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Employee.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.Test; +@doc("A Test resource") +@singleton("default") +@parentResource(Employee) +model Enroll is TrackedResource { + @key("default") + @segment("enrolls") + name: string; +} + +@armResourceOperations +interface Enrolls { + @doc("Get a Enroll.") + get is ArmResourceRead; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp new file mode 100644 index 0000000000..1d1b58c248 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp @@ -0,0 +1,29 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./Employee.tsp"; +import "./Enroll.tsp"; +import "./DictProperty.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "Azure Test resource management API.", +}) +@versioned(Versions) +@doc("For test.") +namespace Microsoft.Test; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2023_10_12: "2023-10-12", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp new file mode 100644 index 0000000000..5901ff64e6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp @@ -0,0 +1,63 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; + +namespace Microsoft.Test; + +interface Operations extends Azure.ResourceManager.Operations {} + +enum Origin { + user, + system, + `user,system`, +} + +enum ActionType { + Internal, +} + +enum ProvisioningState { + @doc("Resource has been created.") Succeeded, + @doc("Resource creation failed.") Failed, + @doc("Resource creation was canceled.") Canceled, + @doc("The resource is being provisioned") Provisioning, + @doc("The resource is updating") Updating, + @doc("The resource is being deleted") Deleting, + @doc("The resource create request has been accepted") Accepted, +} + +enum CreatedByType { + User, + Application, + ManagedIdentity, + Key, +} + +@doc("Employee properties") +model EmployeeProperties { + @doc("Age of employee") + age?: int32; + + @doc("City of employee") + city?: string; + + @doc("Profile of employee") + profile?: bytes; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@doc("Enroll properties") +model EnrollProperties { + @doc("Country of employee") + country?: int32; + + @doc("City of employee") + city?: string; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..691f3c1b0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-cadl/test/batch/batch.md b/packages/extensions/openapi-to-typespec/test/batch/batch.md similarity index 100% rename from packages/extensions/openapi-to-cadl/test/batch/batch.md rename to packages/extensions/openapi-to-typespec/test/batch/batch.md diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp new file mode 100644 index 0000000000..18a7f5cc73 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp @@ -0,0 +1,22 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +@service({ + title: "Azure Batch Service" + }) +@versioned(Versions) +@server("{batchUrl}", "A client for issuing REST requests to the Azure Batch service." +, { +batchUrl: string +} +) +@doc("A client for issuing REST requests to the Azure Batch service.") +namespace Azure.Batch; + +@doc("The available API versions.") +enum Versions { +v2022_01_01.15.0: "2022-01-01.15.0", +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-cadl/test/batch/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp similarity index 99% rename from packages/extensions/openapi-to-cadl/test/batch/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp index 5485f34729..7e9cf9a9a9 100644 --- a/packages/extensions/openapi-to-cadl/test/batch/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp @@ -1139,9 +1139,11 @@ model Certificate { The X.509 thumbprint of the Certificate. This is a sequence of up to 40 hex digits. """) + @visibility("read", "create") thumbprint?: string; @doc("The algorithm used to derive the thumbprint.") + @visibility("read", "create") thumbprintAlgorithm?: string; @doc("The URL of the Certificate.") @@ -1175,12 +1177,15 @@ digits. deleteCertificateError?: DeleteCertificateError; @doc("The base64-encoded contents of the Certificate. The maximum size is 10KB.") + @visibility("create") data?: string; @doc("The format of the Certificate data.") + @visibility("create") certificateFormat?: CertificateFormat; @doc("This must be omitted if the Certificate format is cer.") + @visibility("create") password?: string; } @@ -1285,9 +1290,11 @@ specification used to create each Job. """) model BatchJobSchedule { @doc("A string that uniquely identifies the schedule within the Account.") + @visibility("read", "create") id?: string; @doc("The display name for the schedule.") + @visibility("read", "create") displayName?: string; @doc("The URL of the Job Schedule.") @@ -2618,13 +2625,13 @@ upgrade minor versions unless redeployed, even with this property set to true. autoUpgradeMinorVersion?: boolean; @doc("JSON formatted public settings for the extension.") - settings?: unknown; + settings?: Record; @doc(""" The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. """) - protectedSettings?: unknown; + protectedSettings?: Record; @doc(""" Collection of extension names after which this extension needs to be @@ -3270,15 +3277,18 @@ model BatchJob { The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). """) + @visibility("read", "create") id?: string; @doc("The display name for the Job.") + @visibility("read", "create") displayName?: string; @doc(""" Whether Tasks in the Job can define dependencies on each other. The default is false. """) + @visibility("read", "create") usesTaskDependencies?: boolean; @doc("The URL of the Job.") @@ -3375,24 +3385,28 @@ to tolerate being interrupted and restarted without causing any corruption or duplicate data. The best practice for long running Tasks is to use some form of checkpointing. """) + @visibility("read", "create") jobManagerTask?: JobManagerTask; @doc(""" The Job Preparation Task is a special Task run on each Compute Node before any other Task of the Job. """) + @visibility("read", "create") jobPreparationTask?: JobPreparationTask; @doc(""" The Job Release Task is a special Task run at the end of the Job on each Compute Node that has run any other Task of the Job. """) + @visibility("read", "create") jobReleaseTask?: JobReleaseTask; @doc(""" Individual Tasks can override an environment setting specified here by specifying the same setting name with a different value. """) + @visibility("read", "create") commonEnvironmentSettings?: EnvironmentSetting[]; @doc("Specifies how a Job should be assigned to a Pool.") @@ -3407,9 +3421,11 @@ if the Task completes with a non-zero exit code after exhausting its retry count, or if there was an error starting the Task, for example due to a resource file download error. The default is noaction. """) + @visibility("read", "create") onTaskFailure?: OnTaskFailure; @doc("The network configuration for the Job.") + @visibility("read", "create") networkConfiguration?: JobNetworkConfiguration; @doc(""" @@ -3834,12 +3850,14 @@ and underscores, and cannot contain more than 64 characters. The ID is case-preserving and case-insensitive (that is, you may not have two IDs within an Account that differ only by case). """) + @visibility("read", "create") id?: string; @doc(""" The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. """) + @visibility("read", "create") displayName?: string; @doc("The URL of the Pool.") @@ -3892,6 +3910,7 @@ For information about available sizes of virtual machines in Pools, see Choose a VM size for Compute Nodes in an Azure Batch Pool (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). """) + @visibility("read", "create") vmSize?: string; @doc(""" @@ -3900,18 +3919,21 @@ the properties must be specified. This property cannot be specified if the Batch Account was created with its poolAllocationMode property set to 'UserSubscription'. """) + @visibility("read", "create") cloudServiceConfiguration?: CloudServiceConfiguration; @doc(""" This property and cloudServiceConfiguration are mutually exclusive and one of the properties must be specified. """) + @visibility("read", "create") virtualMachineConfiguration?: VirtualMachineConfiguration; @doc(""" This is the timeout for the most recent resize operation. (The initial sizing when the Pool is created counts as a resize.) The default value is 15 minutes. """) + @visibility("read", "create") resizeTimeout?: duration; @doc(""" @@ -3933,9 +3955,11 @@ count. currentLowPriorityNodes?: int32; @doc("The desired number of dedicated Compute Nodes in the Pool.") + @visibility("read", "create") targetDedicatedNodes?: int32; @doc("The desired number of Spot/Low-priority Compute Nodes in the Pool.") + @visibility("read", "create") targetLowPriorityNodes?: int32; @doc(""" @@ -3943,18 +3967,21 @@ If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must be specified. If true, the autoScaleFormula property is required and the Pool automatically resizes according to the formula. The default value is false. """) + @visibility("read", "create") enableAutoScale?: boolean; @doc(""" This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. """) + @visibility("read", "create") autoScaleFormula?: string; @doc(""" This property is set only if the Pool automatically scales, i.e. enableAutoScale is true. """) + @visibility("read", "create") autoScaleEvaluationInterval?: duration; @doc(""" @@ -3969,9 +3996,11 @@ This imposes restrictions on which Compute Nodes can be assigned to the Pool. Specifying this value can reduce the chance of the requested number of Compute Nodes to be allocated in the Pool. """) + @visibility("read", "create") enableInterNodeCommunication?: boolean; @doc("The network configuration for a Pool.") + @visibility("read", "create") networkConfiguration?: NetworkConfiguration; @doc(""" @@ -4014,18 +4043,22 @@ The list of application licenses must be a subset of available Batch service application licenses. If a license is requested which is not supported, Pool creation will fail. """) + @visibility("read", "create") applicationLicenses?: string[]; @doc(""" The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool or 256. """) + @visibility("read", "create") taskSlotsPerNode?: int32; @doc("If not specified, the default is spread.") + @visibility("read", "create") taskSchedulingPolicy?: TaskSchedulingPolicy; @doc("The list of user Accounts to be created on each Compute Node in the Pool.") + @visibility("read", "create") userAccounts?: UserAccount[]; @doc("A list of name-value pairs associated with the Pool as metadata.") @@ -4041,6 +4074,7 @@ of statistics. The typical delay is about 30 minutes. stats?: PoolStatistics; @doc("This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.") + @visibility("read", "create") mountConfiguration?: MountConfiguration[]; @doc(""" @@ -4276,12 +4310,14 @@ model BatchTask { The ID can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. """) + @visibility("read", "create") id?: string; @doc(""" The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. """) + @visibility("read", "create") displayName?: string; @doc("The URL of the Task.") @@ -4308,6 +4344,7 @@ modified the Task in the meantime. creationTime?: utcDateTime; @doc("How the Batch service should respond when the Task completes.") + @visibility("read", "create") exitConditions?: ExitConditions; @doc("The state of the Task.") @@ -4340,6 +4377,7 @@ file paths, it should use a relative path (relative to the Task working directory), or use the Batch provided environment variable (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). """) + @visibility("read", "create") commandLine?: string; @doc(""" @@ -4353,6 +4391,7 @@ is executed in the container. Files produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that Batch file APIs will not be able to access those files. """) + @visibility("read", "create") containerSettings?: TaskContainerSettings; @doc(""" @@ -4363,21 +4402,25 @@ fail and the response error code will be RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be reduced in size. This can be achieved using .zip files, Application Packages, or Docker Containers. """) + @visibility("read", "create") resourceFiles?: ResourceFile[]; @doc(""" For multi-instance Tasks, the files will only be uploaded from the Compute Node on which the primary Task is executed. """) + @visibility("read", "create") outputFiles?: OutputFile[]; @doc("A list of environment variable settings for the Task.") + @visibility("read", "create") environmentSettings?: EnvironmentSetting[]; @doc(""" A locality hint that can be used by the Batch service to select a Compute Node on which to start a Task. """) + @visibility("read", "create") affinityInfo?: AffinityInformation; @doc("Execution constraints to apply to a Task.") @@ -4388,9 +4431,11 @@ The default is 1. A Task can only be scheduled to run on a compute node if the node has enough free scheduling slots available. For multi-instance Tasks, this must be 1. """) + @visibility("read", "create") requiredSlots?: int32; @doc("If omitted, the Task runs as a non-administrative user unique to the Task.") + @visibility("read", "create") userIdentity?: UserIdentity; @doc("Information about the execution of a Task.") @@ -4407,6 +4452,7 @@ if any of the subtasks fail (for example due to exiting with a non-zero exit code) the entire multi-instance Task fails. The multi-instance Task is then terminated and retried, up to its retry limit. """) + @visibility("read", "create") multiInstanceSettings?: MultiInstanceSettings; @doc("Resource usage statistics for a Task.") @@ -4418,6 +4464,7 @@ This Task will not be scheduled until all Tasks that it depends on have completed successfully. If any of those Tasks fail and exhaust their retry counts, this Task will never be scheduled. """) + @visibility("read", "create") dependsOn?: TaskDependencies; @doc(""" @@ -4428,6 +4475,7 @@ Compute Node is used. If a referenced Package cannot be installed, for example because the package has been deleted or because download failed, the Task fails. """) + @visibility("read", "create") applicationPackageReferences?: ApplicationPackageReference[]; @doc(""" @@ -4439,6 +4487,7 @@ Task can carry out using the token depend on the settings. For example, a Task can request Job permissions in order to add other Tasks to the Job, or check the status of the Job or of other Tasks under the Job. """) + @visibility("read", "create") authenticationTokenSettings?: AuthenticationTokenSettings; } diff --git a/packages/extensions/openapi-to-cadl/test/batch/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/routes.tsp similarity index 85% rename from packages/extensions/openapi-to-cadl/test/batch/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/batch/tsp-output/routes.tsp index 344da76fc0..e812d68ecc 100644 --- a/packages/extensions/openapi-to-cadl/test/batch/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/routes.tsp @@ -24,26 +24,28 @@ API. The maximum number of items to return in the response. A maximum of 1000 applications can be returned. """) - @query - maxresults: int32; + @maxValue(1000) + @minValue(1) + @query("maxresults") + maxResults?: int32 = 1000; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -51,7 +53,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }; } >; @@ -72,19 +74,19 @@ API. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -92,7 +94,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }; } >; @@ -120,48 +122,50 @@ The earliest time from which to include metrics. This must be at least two and a half hours before the current time. If not specified this defaults to the start time of the last aggregation interval currently available. """) - @query - starttime: utcDateTime; + @query("starttime") + startTime?: utcDateTime; @doc(""" The latest time from which to include metrics. This must be at least two hours before the current time. If not specified this defaults to the end time of the last aggregation interval currently available. """) - @query - endtime: utcDateTime; + @query("endtime") + endTime?: utcDateTime; @doc(""" An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. """) - @query - $filter: string; + @query("$filter") + $filter?: string; @doc(""" The maximum number of items to return in the response. A maximum of 1000 results will be returned. """) - @query - maxresults: int32; + @maxValue(1000) + @minValue(1) + @query("maxresults") + maxResults?: int32 = 1000; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -169,7 +173,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }; } >; @@ -189,19 +193,19 @@ periodic roll-up of statistics. The typical delay is about 30 minutes. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -209,7 +213,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, PoolStatistics >; @@ -228,19 +232,19 @@ to Microsoft Support engineers. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -248,7 +252,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc("The Pool to be added.") @body @@ -267,41 +271,43 @@ directly. An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools. """) - @query - $filter: string; + @query("$filter") + $filter?: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc("An OData $expand clause.") - @query - $expand: string; + @query("$expand") + $expand?: string; @doc(""" The maximum number of items to return in the response. A maximum of 1000 Pools can be returned. """) - @query - maxresults: int32; + @maxValue(1000) + @minValue(1) + @query("maxresults") + maxResults?: int32 = 1000; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -309,7 +315,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, BatchPoolListResult >; @@ -341,19 +347,19 @@ error code PoolBeingDeleted. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -361,7 +367,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -369,7 +375,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -377,7 +383,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -385,7 +391,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -393,7 +399,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, void >; @@ -411,19 +417,19 @@ not been modified since the specified time. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -431,7 +437,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -439,7 +445,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -447,7 +453,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -455,7 +461,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -463,7 +469,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, void >; @@ -478,30 +484,30 @@ not been modified since the specified time. poolId: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc("An OData $expand clause.") - @query - $expand: string; + @query("$expand") + $expand?: string; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -509,7 +515,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -517,7 +523,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -525,7 +531,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -533,7 +539,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -541,7 +547,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, BatchPool >; @@ -564,19 +570,19 @@ a StartTask element, then the Pool keeps the existing StartTask. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -584,7 +590,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -592,7 +598,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -600,7 +606,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -608,7 +614,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -616,7 +622,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; @doc("The parameters for the request.") @body @@ -639,19 +645,19 @@ not been modified since the specified time. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -659,7 +665,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, void >; @@ -685,19 +691,19 @@ more than once every 30 seconds. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -705,7 +711,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -713,7 +719,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -721,7 +727,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -729,7 +735,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -737,7 +743,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; @doc("The parameters for the request.") @body @@ -764,19 +770,19 @@ scaling enabled in order to evaluate a formula. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -784,7 +790,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc("The parameters for the request.") @body @@ -815,19 +821,19 @@ Nodes, use the Pool remove Compute Nodes API instead. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -835,7 +841,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -843,7 +849,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -851,7 +857,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -859,7 +865,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -867,7 +873,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; @doc("The parameters for the request.") @body @@ -898,19 +904,19 @@ be used to halt the initial sizing of the Pool when it is created. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -918,7 +924,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -926,7 +932,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -934,7 +940,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -942,7 +948,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -950,7 +956,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, void >; @@ -973,19 +979,19 @@ with this request, then the Batch service will remove the existing StartTask. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -993,7 +999,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc("The parameters for the request.") @body @@ -1020,19 +1026,19 @@ Each request may remove up to 100 nodes. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -1040,7 +1046,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1048,7 +1054,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1056,7 +1062,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1064,7 +1070,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1072,7 +1078,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; @doc("The parameters for the request.") @body @@ -1093,33 +1099,35 @@ interface AccountOperations { An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. """) - @query - $filter: string; + @query("$filter") + $filter?: string; @doc(""" The maximum number of items to return in the response. A maximum of 1000 results will be returned. """) - @query - maxresults: int32; + @maxValue(1000) + @minValue(1) + @query("maxresults") + maxResults?: int32 = 1000; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -1127,7 +1135,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }; } >; @@ -1145,30 +1153,32 @@ use a list query. An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch. """) - @query - $filter: string; + @query("$filter") + $filter?: string; @doc("The maximum number of items to return in the response.") - @query - maxresults: int32; + @maxValue(10) + @minValue(1) + @query("maxresults") + maxResults?: int32 = 10; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -1176,7 +1186,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }; } >; @@ -1198,19 +1208,19 @@ periodic roll-up of statistics. The typical delay is about 30 minutes. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -1218,7 +1228,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, JobStatistics >; @@ -1246,19 +1256,19 @@ that the Job is being deleted. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -1266,7 +1276,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1274,7 +1284,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1282,7 +1292,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1290,7 +1300,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1298,7 +1308,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, void >; @@ -1314,30 +1324,30 @@ not been modified since the specified time. jobId: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc("An OData $expand clause.") - @query - $expand: string; + @query("$expand") + $expand?: string; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -1345,7 +1355,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1353,7 +1363,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1361,7 +1371,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1369,7 +1379,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1377,7 +1387,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, BatchJob >; @@ -1400,19 +1410,19 @@ element, then the Job keeps the existing constraints. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -1420,7 +1430,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1428,7 +1438,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1436,7 +1446,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1444,7 +1454,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1452,7 +1462,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; @doc("The parameters for the request.") @body @@ -1479,19 +1489,19 @@ with this request, then the Batch service will remove the existing constraints. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -1499,7 +1509,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1507,7 +1517,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1515,7 +1525,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1523,7 +1533,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1531,7 +1541,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; @doc("The parameters for the request.") @body @@ -1563,19 +1573,19 @@ the request fails with status code 409. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -1583,7 +1593,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1591,7 +1601,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1599,7 +1609,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1607,7 +1617,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1615,7 +1625,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; @doc("The parameters for the request.") @body @@ -1645,19 +1655,19 @@ than 180 days ago, those Tasks will not run. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -1665,7 +1675,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1673,7 +1683,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1681,7 +1691,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1689,7 +1699,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1697,7 +1707,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, void >; @@ -1723,19 +1733,19 @@ Tasks cannot be added and any remaining active Tasks will not be scheduled. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -1743,7 +1753,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1751,7 +1761,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -1759,7 +1769,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1767,7 +1777,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -1775,11 +1785,11 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; @doc("The parameters for the request.") @body - parameters: BatchJobTerminateParameters; + parameters?: BatchJobTerminateParameters; }, void >; @@ -1804,19 +1814,19 @@ engineers. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -1824,7 +1834,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc("The Job to be added.") @body @@ -1843,41 +1853,43 @@ directly. An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs. """) - @query - $filter: string; + @query("$filter") + $filter?: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc("An OData $expand clause.") - @query - $expand: string; + @query("$expand") + $expand?: string; @doc(""" The maximum number of items to return in the response. A maximum of 1000 Jobs can be returned. """) - @query - maxresults: int32; + @maxValue(1000) + @minValue(1) + @query("maxresults") + maxResults?: int32 = 1000; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -1885,7 +1897,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, BatchJobListResult >; @@ -1904,41 +1916,43 @@ directly. An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. """) - @query - $filter: string; + @query("$filter") + $filter?: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc("An OData $expand clause.") - @query - $expand: string; + @query("$expand") + $expand?: string; @doc(""" The maximum number of items to return in the response. A maximum of 1000 Jobs can be returned. """) - @query - maxresults: int32; + @maxValue(1000) + @minValue(1) + @query("maxresults") + maxResults?: int32 = 1000; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -1946,7 +1960,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, BatchJobListResult >; @@ -1975,37 +1989,39 @@ JobPreparationTaskNotSpecified. An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. """) - @query - $filter: string; + @query("$filter") + $filter?: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc(""" The maximum number of items to return in the response. A maximum of 1000 Tasks can be returned. """) - @query - maxresults: int32; + @maxValue(1000) + @minValue(1) + @query("maxresults") + maxResults?: int32 = 1000; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2013,7 +2029,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, BatchJobListPreparationAndReleaseTaskStatusResult >; @@ -2037,19 +2053,19 @@ up to date. If you need exact task counts, use a list query. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2057,7 +2073,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, TaskCountsResult >; @@ -2074,19 +2090,19 @@ interface CertificateOperations { The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2094,7 +2110,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc("The Certificate to be added.") @body @@ -2113,37 +2129,39 @@ directly. An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-certificates. """) - @query - $filter: string; + @query("$filter") + $filter?: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc(""" The maximum number of items to return in the response. A maximum of 1000 Certificates can be returned. """) - @query - maxresults: int32; + @maxValue(1000) + @minValue(1) + @query("maxresults") + maxResults?: int32 = 1000; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2151,7 +2169,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, CertificateListResult >; @@ -2182,19 +2200,19 @@ then you can try again to delete the Certificate. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2202,7 +2220,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, void >; @@ -2235,19 +2253,19 @@ active if you decide that you want to continue using the Certificate. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2255,7 +2273,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, void >; @@ -2274,26 +2292,26 @@ directly. thumbprint: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2301,7 +2319,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, Certificate >; @@ -2332,26 +2350,26 @@ a directory instead of a file, you can set recursive to true to delete the directory and all of the files and subdirectories in it. If recursive is false then the directory must be empty or deletion will fail. """) - @query - recursive: boolean; + @query("recursive") + recursive?: boolean; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2359,7 +2377,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, void >; @@ -2385,19 +2403,19 @@ directly. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2405,14 +2423,14 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" The byte range to be retrieved. The default is to retrieve the entire file. The format is bytes=startRange-endRange. """) @header - `ocp-range`: string; + `ocp-range`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -2420,7 +2438,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -2428,11 +2446,11 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; @doc("Accept header") @header - Accept: "application/json, application/octet-stream"; + accept: "application/json, application/octet-stream"; }, void >; @@ -2458,19 +2476,19 @@ not been modified since the specified time. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2478,7 +2496,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -2486,7 +2504,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -2494,7 +2512,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, void >; @@ -2523,26 +2541,26 @@ a directory instead of a file, you can set recursive to true to delete the directory and all of the files and subdirectories in it. If recursive is false then the directory must be empty or deletion will fail. """) - @query - recursive: boolean; + @query("recursive") + recursive?: boolean; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2550,7 +2568,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, void >; @@ -2576,19 +2594,19 @@ directly. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2596,14 +2614,14 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" The byte range to be retrieved. The default is to retrieve the entire file. The format is bytes=startRange-endRange. """) @header - `ocp-range`: string; + `ocp-range`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -2611,7 +2629,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -2619,11 +2637,11 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; @doc("Accept header") @header - Accept: "application/json, application/octet-stream"; + accept: "application/json, application/octet-stream"; }, void >; @@ -2649,19 +2667,19 @@ not been modified since the specified time. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2669,7 +2687,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -2677,7 +2695,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -2685,7 +2703,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, void >; @@ -2708,40 +2726,42 @@ not been modified since the specified time. An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-task-files. """) - @query - $filter: string; + @query("$filter") + $filter?: string; @doc(""" Whether to list children of the Task directory. This parameter can be used in combination with the filter parameter to list specific type of files. """) - @query - recursive: boolean; + @query("recursive") + recursive?: boolean; @doc(""" The maximum number of items to return in the response. A maximum of 1000 files can be returned. """) - @query - maxresults: int32; + @maxValue(1000) + @minValue(1) + @query("maxresults") + maxResults?: int32 = 1000; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2749,7 +2769,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, NodeFileListResult >; @@ -2772,37 +2792,39 @@ directly. An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. """) - @query - $filter: string; + @query("$filter") + $filter?: string; @doc("Whether to list children of a directory.") - @query - recursive: boolean; + @query("recursive") + recursive?: boolean; @doc(""" The maximum number of items to return in the response. A maximum of 1000 files can be returned. """) - @query - maxresults: int32; + @maxValue(1000) + @minValue(1) + @query("maxresults") + maxResults?: int32 = 1000; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2810,7 +2832,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, NodeFileListResult >; @@ -2831,19 +2853,19 @@ interface JobScheduleOperations { The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2851,7 +2873,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -2859,7 +2881,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -2867,7 +2889,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -2875,7 +2897,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -2883,7 +2905,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, void >; @@ -2908,19 +2930,19 @@ though they are still counted towards Account lifetime statistics. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -2928,7 +2950,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -2936,7 +2958,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -2944,7 +2966,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -2952,7 +2974,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -2960,7 +2982,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, void >; @@ -2975,30 +2997,30 @@ not been modified since the specified time. jobScheduleId: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc("An OData $expand clause.") - @query - $expand: string; + @query("$expand") + $expand?: string; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -3006,7 +3028,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3014,7 +3036,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3022,7 +3044,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3030,7 +3052,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3038,7 +3060,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, BatchJobSchedule >; @@ -3063,19 +3085,19 @@ running Jobs are unaffected. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -3083,7 +3105,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3091,7 +3113,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3099,7 +3121,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3107,7 +3129,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3115,7 +3137,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; @doc("The parameters for the request.") @body @@ -3144,19 +3166,19 @@ running Jobs are unaffected. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -3164,7 +3186,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3172,7 +3194,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3180,7 +3202,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3188,7 +3210,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3196,7 +3218,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; @doc("The parameters for the request.") @body @@ -3219,19 +3241,19 @@ not been modified since the specified time. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -3239,7 +3261,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3247,7 +3269,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3255,7 +3277,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3263,7 +3285,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3271,7 +3293,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, void >; @@ -3290,19 +3312,19 @@ not been modified since the specified time. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -3310,7 +3332,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3318,7 +3340,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3326,7 +3348,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3334,7 +3356,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3342,7 +3364,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, void >; @@ -3361,19 +3383,19 @@ not been modified since the specified time. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -3381,7 +3403,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3389,7 +3411,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3397,7 +3419,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3405,7 +3427,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3413,7 +3435,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, void >; @@ -3428,19 +3450,19 @@ not been modified since the specified time. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -3448,7 +3470,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc("The Job Schedule to be added.") @body @@ -3467,41 +3489,43 @@ directly. An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. """) - @query - $filter: string; + @query("$filter") + $filter?: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc("An OData $expand clause.") - @query - $expand: string; + @query("$expand") + $expand?: string; @doc(""" The maximum number of items to return in the response. A maximum of 1000 Job Schedules can be returned. """) - @query - maxresults: int32; + @maxValue(1000) + @minValue(1) + @query("maxresults") + maxResults?: int32 = 1000; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -3509,7 +3533,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, BatchJobScheduleListResult >; @@ -3534,19 +3558,19 @@ the Batch service and left in whatever state it was in at that time. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -3554,7 +3578,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc("The Task to be added.") @body @@ -3581,41 +3605,43 @@ information about subtasks. An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-tasks. """) - @query - $filter: string; + @query("$filter") + $filter?: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc("An OData $expand clause.") - @query - $expand: string; + @query("$expand") + $expand?: string; @doc(""" The maximum number of items to return in the response. A maximum of 1000 Tasks can be returned. """) - @query - maxresults: int32; + @maxValue(1000) + @minValue(1) + @query("maxresults") + maxResults?: int32 = 1000; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -3623,7 +3649,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, BatchTaskListResult >; @@ -3657,19 +3683,19 @@ service and left in whatever state it was in at that time. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -3677,7 +3703,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc("The Tasks to be added.") @body @@ -3710,19 +3736,19 @@ background. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -3730,7 +3756,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3738,7 +3764,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3746,7 +3772,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3754,7 +3780,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3762,7 +3788,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, void >; @@ -3786,30 +3812,30 @@ information about subtasks. taskId: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc("An OData $expand clause.") - @query - $expand: string; + @query("$expand") + $expand?: string; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -3817,7 +3843,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3825,7 +3851,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3833,7 +3859,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3841,7 +3867,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3849,7 +3875,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, BatchTask >; @@ -3871,19 +3897,19 @@ not been modified since the specified time. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -3891,7 +3917,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3899,7 +3925,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -3907,7 +3933,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3915,7 +3941,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -3923,7 +3949,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; @doc("The parameters for the request.") @body @@ -3950,26 +3976,26 @@ Task. taskId: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -3977,7 +4003,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, BatchTaskListSubtasksResult >; @@ -4004,19 +4030,19 @@ primary task; subtasks are then terminated asynchronously in the background. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4024,7 +4050,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -4032,7 +4058,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -4040,7 +4066,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -4048,7 +4074,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -4056,7 +4082,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, void >; @@ -4090,19 +4116,19 @@ will fail if the Job has completed (or is terminating or deleting). The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4110,7 +4136,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -4118,7 +4144,7 @@ The operation will be performed only if the resource's current ETag on the service exactly matches the value specified by the client. """) @header - `If-Match`: string; + `If-Match`?: string; @doc(""" An ETag value associated with the version of the resource known to the client. @@ -4126,7 +4152,7 @@ The operation will be performed only if the resource's current ETag on the service does not match the value specified by the client. """) @header - `If-None-Match`: string; + `If-None-Match`?: string; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -4134,7 +4160,7 @@ client. The operation will be performed only if the resource on the service has been modified since the specified time. """) @header - `If-Modified-Since`: utcDateTime; + `If-Modified-Since`?: utcDateTime; @doc(""" A timestamp indicating the last modified time of the resource known to the @@ -4142,7 +4168,7 @@ client. The operation will be performed only if the resource on the service has not been modified since the specified time. """) @header - `If-Unmodified-Since`: utcDateTime; + `If-Unmodified-Since`?: utcDateTime; }, void >; @@ -4170,19 +4196,19 @@ running state. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4190,7 +4216,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc("The user Account to be created.") @body @@ -4224,19 +4250,19 @@ running state. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4244,7 +4270,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, void >; @@ -4279,19 +4305,19 @@ Account on a Compute Node only when it is in the idle or running state. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4299,7 +4325,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc("The parameters for the request.") @body @@ -4323,26 +4349,26 @@ directly. nodeId: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4350,7 +4376,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, ComputeNode >; @@ -4373,19 +4399,19 @@ directly. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4393,11 +4419,11 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc("The parameters for the request.") @body - parameters: NodeRebootParameters; + parameters?: NodeRebootParameters; }, void >; @@ -4424,19 +4450,19 @@ cloud service configuration property. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4444,11 +4470,11 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc("The parameters for the request.") @body - parameters: NodeReimageParameters; + parameters?: NodeReimageParameters; }, void >; @@ -4474,19 +4500,19 @@ scheduling state is enabled. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4494,11 +4520,11 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc("The parameters for the request.") @body - parameters: NodeDisableSchedulingParameters; + parameters?: NodeDisableSchedulingParameters; }, void >; @@ -4524,19 +4550,19 @@ state is disabled The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4544,7 +4570,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, void >; @@ -4573,19 +4599,19 @@ API. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4593,7 +4619,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, ComputeNodeGetRemoteLoginSettingsResult >; @@ -4624,19 +4650,19 @@ Protocol file. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4644,11 +4670,11 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; @doc("Accept header") @header - Accept: "application/json, application/octet-stream"; + accept: "application/json, application/octet-stream"; }, void >; @@ -4671,19 +4697,19 @@ support to aid in debugging issues with the Batch service. The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4691,7 +4717,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }; } >; @@ -4710,37 +4736,39 @@ directly. An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. """) - @query - $filter: string; + @query("$filter") + $filter?: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc(""" The maximum number of items to return in the response. A maximum of 1000 Compute Nodes can be returned. """) - @query - maxresults: int32; + @maxValue(1000) + @minValue(1) + @query("maxresults") + maxResults?: int32 = 1000; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4748,7 +4776,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, ComputeNodeListResult >; @@ -4777,26 +4805,26 @@ about. extensionName: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4804,7 +4832,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, NodeVMExtension >; @@ -4824,33 +4852,35 @@ directly. nodeId: string; @doc("An OData $select clause.") - @query - $select: string; + @query("$select") + $select?: string; @doc(""" The maximum number of items to return in the response. A maximum of 1000 Compute Nodes can be returned. """) - @query - maxresults: int32; + @maxValue(1000) + @minValue(1) + @query("maxresults") + maxResults?: int32 = 1000; @doc(""" The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) - @query - timeout: int32; + @query("timeout") + timeout?: int32 = 30; @doc(""" The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. """) @header - `client-request-id`: string; + `client-request-id`?: string; @doc("Whether the server should return the client-request-id in the response.") @header - `return-client-request-id`: boolean; + `return-client-request-id`?: boolean; @doc(""" The time the request was issued. Client libraries typically set this to the @@ -4858,7 +4888,7 @@ current system clock time; set it explicitly if you are calling the REST API directly. """) @header - `ocp-date`: utcDateTime; + `ocp-date`?: utcDateTime; }, NodeVMExtensionList >; diff --git a/packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/tspconfig.yaml similarity index 94% rename from packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/tspconfig.yaml rename to packages/extensions/openapi-to-typespec/test/batch/tsp-output/tspconfig.yaml index 013d55ba1e..fb405fa449 100644 --- a/packages/extensions/openapi-to-cadl/test/anomalyDetector/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/tspconfig.yaml @@ -1,5 +1,5 @@ emit: - - "@azure-tools/typespec-autorest": + - "@azure-tools/typespec-autorest" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-cadl/test/bodyComplex/body-complex.json b/packages/extensions/openapi-to-typespec/test/bodyComplex/body-complex.json similarity index 100% rename from packages/extensions/openapi-to-cadl/test/bodyComplex/body-complex.json rename to packages/extensions/openapi-to-typespec/test/bodyComplex/body-complex.json diff --git a/packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp similarity index 76% rename from packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/main.tsp rename to packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp index 5480278cbd..5f30f5188a 100644 --- a/packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp @@ -6,8 +6,8 @@ using TypeSpec.Rest; using TypeSpec.Http; @service({ title: "AutoRest Complex Test Service", - version: "2016-02-29", }) +@versioned(Versions) @server( "{$host}", "Test Infrastructure for AutoRest", @@ -17,3 +17,8 @@ using TypeSpec.Http; ) @doc("Test Infrastructure for AutoRest") namespace AutoRestComplexTestService; + +@doc("The available API versions.") +enum Versions { + v2016_02_29: "2016-02-29", +} diff --git a/packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp similarity index 98% rename from packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp index be26e84f5c..ae9bf222bc 100644 --- a/packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp @@ -121,19 +121,16 @@ model DictionaryWrapper { defaultProgram?: Record; } -model Siamese { - ...Cat; +model Siamese extends Cat { breed?: string; } -model Cat { - ...Pet; +model Cat extends Pet { color?: string; hates?: Dog[]; } -model Dog { - ...Pet; +model Dog extends Pet { food?: string; } diff --git a/packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/routes.tsp similarity index 55% rename from packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/routes.tsp index ad01bd186f..e975735022 100644 --- a/packages/extensions/openapi-to-cadl/test/bodyComplex/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/routes.tsp @@ -16,14 +16,7 @@ interface basicOperations { @doc("Please put {id: 2, name: 'abc', color: 'Magenta'}") @route("/complex/basic/valid") @put - putValid is Azure.Core.Foundations.Operation< - { - @doc("Please put {id: 2, name: 'abc', color: 'Magenta'}") - @body - complexBody: Basic; - }, - void - >; + putValid is Azure.Core.Foundations.Operation; @doc("Get a basic complex type that is invalid for the local strong type") @route("/complex/basic/invalid") @@ -55,14 +48,7 @@ interface primitiveOperations { @doc("Put complex types with integer properties") @route("/complex/primitive/integer") @put - putInt is Azure.Core.Foundations.Operation< - { - @doc("Please put -1 and 2") - @body - complexBody: IntWrapper; - }, - void - >; + putInt is Azure.Core.Foundations.Operation; @doc("Get complex types with long properties") @route("/complex/primitive/long") @@ -72,14 +58,7 @@ interface primitiveOperations { @doc("Put complex types with long properties") @route("/complex/primitive/long") @put - putLong is Azure.Core.Foundations.Operation< - { - @doc("Please put 1099511627775 and -999511627788") - @body - complexBody: LongWrapper; - }, - void - >; + putLong is Azure.Core.Foundations.Operation; @doc("Get complex types with float properties") @route("/complex/primitive/float") @@ -89,14 +68,7 @@ interface primitiveOperations { @doc("Put complex types with float properties") @route("/complex/primitive/float") @put - putFloat is Azure.Core.Foundations.Operation< - { - @doc("Please put 1.05 and -0.003") - @body - complexBody: FloatWrapper; - }, - void - >; + putFloat is Azure.Core.Foundations.Operation; @doc("Get complex types with double properties") @route("/complex/primitive/double") @@ -106,17 +78,7 @@ interface primitiveOperations { @doc("Put complex types with double properties") @route("/complex/primitive/double") @put - putDouble is Azure.Core.Foundations.Operation< - { - @doc(""" -Please put 3e-100 and --0.000000000000000000000000000000000000000000000000000000005 -""") - @body - complexBody: DoubleWrapper; - }, - void - >; + putDouble is Azure.Core.Foundations.Operation; @doc("Get complex types with bool properties") @route("/complex/primitive/bool") @@ -126,14 +88,7 @@ Please put 3e-100 and @doc("Put complex types with bool properties") @route("/complex/primitive/bool") @put - putBool is Azure.Core.Foundations.Operation< - { - @doc("Please put true and false") - @body - complexBody: BooleanWrapper; - }, - void - >; + putBool is Azure.Core.Foundations.Operation; @doc("Get complex types with string properties") @route("/complex/primitive/string") @@ -143,14 +98,7 @@ Please put 3e-100 and @doc("Put complex types with string properties") @route("/complex/primitive/string") @put - putString is Azure.Core.Foundations.Operation< - { - @doc("Please put 'goodrequest', '', and null") - @body - complexBody: StringWrapper; - }, - void - >; + putString is Azure.Core.Foundations.Operation; @doc("Get complex types with date properties") @route("/complex/primitive/date") @@ -160,14 +108,7 @@ Please put 3e-100 and @doc("Put complex types with date properties") @route("/complex/primitive/date") @put - putDate is Azure.Core.Foundations.Operation< - { - @doc("Please put '0001-01-01' and '2016-02-29'") - @body - complexBody: DateWrapper; - }, - void - >; + putDate is Azure.Core.Foundations.Operation; @doc("Get complex types with datetime properties") @route("/complex/primitive/datetime") @@ -177,14 +118,7 @@ Please put 3e-100 and @doc("Put complex types with datetime properties") @route("/complex/primitive/datetime") @put - putDateTime is Azure.Core.Foundations.Operation< - { - @doc("Please put '0001-01-01T12:00:00-04:00' and '2015-05-18T11:38:00-08:00'") - @body - complexBody: DatetimeWrapper; - }, - void - >; + putDateTime is Azure.Core.Foundations.Operation; @doc("Get complex types with datetimeRfc1123 properties") @route("/complex/primitive/datetimerfc1123") @@ -198,11 +132,7 @@ Please put 3e-100 and @route("/complex/primitive/datetimerfc1123") @put putDateTimeRfc1123 is Azure.Core.Foundations.Operation< - { - @doc("Please put 'Mon, 01 Jan 0001 12:00:00 GMT' and 'Mon, 18 May 2015 11:38:00 GMT'") - @body - complexBody: Datetimerfc1123Wrapper; - }, + Datetimerfc1123Wrapper, void >; @@ -214,14 +144,7 @@ Please put 3e-100 and @doc("Put complex types with duration properties") @route("/complex/primitive/duration") @put - putDuration is Azure.Core.Foundations.Operation< - { - @doc("Please put 'P123DT22H14M12.011S'") - @body - complexBody: DurationWrapper; - }, - void - >; + putDuration is Azure.Core.Foundations.Operation; @doc("Get complex types with byte properties") @route("/complex/primitive/byte") @@ -231,14 +154,7 @@ Please put 3e-100 and @doc("Put complex types with byte properties") @route("/complex/primitive/byte") @put - putByte is Azure.Core.Foundations.Operation< - { - @doc("Please put non-ascii byte string hex(FF FE FD FC 00 FA F9 F8 F7 F6)") - @body - complexBody: ByteWrapper; - }, - void - >; + putByte is Azure.Core.Foundations.Operation; } interface arrayOperations { @@ -250,17 +166,7 @@ interface arrayOperations { @doc("Put complex types with array property") @route("/complex/array/valid") @put - putValid is Azure.Core.Foundations.Operation< - { - @doc(""" -Please put an array with 4 items: \"1, 2, 3, 4\", \"\", null, \"&S#$(*Y\", -\"The quick brown fox jumps over the lazy dog\" -""") - @body - complexBody: ArrayWrapper; - }, - void - >; + putValid is Azure.Core.Foundations.Operation; @doc("Get complex types with array property which is empty") @route("/complex/array/empty") @@ -270,14 +176,7 @@ Please put an array with 4 items: \"1, 2, 3, 4\", \"\", null, \"&S#$(*Y\", @doc("Put complex types with array property which is empty") @route("/complex/array/empty") @put - putEmpty is Azure.Core.Foundations.Operation< - { - @doc("Please put an empty array") - @body - complexBody: ArrayWrapper; - }, - void - >; + putEmpty is Azure.Core.Foundations.Operation; @doc(""" Get complex types with array property while server doesn't provide a response @@ -297,17 +196,7 @@ interface dictionaryOperations { @doc("Put complex types with dictionary property") @route("/complex/dictionary/typed/valid") @put - putValid is Azure.Core.Foundations.Operation< - { - @doc(""" -Please put a dictionary with 5 key-value pairs: \"txt\":\"notepad\", -\"bmp\":\"mspaint\", \"xls\":\"excel\", \"exe\":\"\", \"\":null -""") - @body - complexBody: DictionaryWrapper; - }, - void - >; + putValid is Azure.Core.Foundations.Operation; @doc("Get complex types with dictionary property which is empty") @route("/complex/dictionary/typed/empty") @@ -317,14 +206,7 @@ Please put a dictionary with 5 key-value pairs: \"txt\":\"notepad\", @doc("Put complex types with dictionary property which is empty") @route("/complex/dictionary/typed/empty") @put - putEmpty is Azure.Core.Foundations.Operation< - { - @doc("Please put an empty dictionary") - @body - complexBody: DictionaryWrapper; - }, - void - >; + putEmpty is Azure.Core.Foundations.Operation; @doc("Get complex types with dictionary property which is null") @route("/complex/dictionary/typed/null") @@ -349,18 +231,7 @@ interface inheritanceOperations { @doc("Put complex types that extend others") @route("/complex/inheritance/valid") @put - putValid is Azure.Core.Foundations.Operation< - { - @doc(""" -Please put a siamese with id=2, name=\"Siameee\", color=green, breed=persion, -which hates 2 dogs, the 1st one named \"Potato\" with id=1 and food=\"tomato\", -and the 2nd one named \"Tomato\" with id=-1 and food=\"french fries\". -""") - @body - complexBody: Siamese; - }, - void - >; + putValid is Azure.Core.Foundations.Operation; } interface polymorphismOperations { @@ -372,59 +243,7 @@ interface polymorphismOperations { @doc("Put complex types that are polymorphic") @route("/complex/polymorphism/valid") @put - putValid is Azure.Core.Foundations.Operation< - { - @doc(""" -Please put a salmon that looks like this: -{ - 'fishtype':'Salmon', - - 'location':'alaska', - 'iswild':true, - 'species':'king', - -'length':1.0, - 'siblings':[ - { - 'fishtype':'Shark', - - 'age':6, - 'birthday': '2012-01-05T01:00:00Z', - -'length':20.0, - 'species':'predator', - }, - { - - 'fishtype':'Sawshark', - 'age':105, - 'birthday': -'1900-01-05T01:00:00Z', - 'length':10.0, - 'picture': new -Buffer([255, 255, 255, 255, 254]).toString('base64'), - -'species':'dangerous', - }, - { - 'fishtype': -'goblin', - 'age': 1, - 'birthday': -'2015-08-08T00:00:00Z', - 'length': 30.0, - 'species': -'scary', - 'jawsize': 5 - } - ] - }; -""") - @body - complexBody: Fish; - }, - void - >; + putValid is Azure.Core.Foundations.Operation; @doc("Get complex types that are polymorphic, JSON key contains a dot") @route("/complex/polymorphism/dotsyntax") @@ -469,22 +288,12 @@ also have additional properties """) @route("/complex/polymorphism/complicated") @put - putComplicated is Azure.Core.Foundations.Operation< - { - @body complexBody: Salmon; - }, - void - >; + putComplicated is Azure.Core.Foundations.Operation; @doc("Put complex types that are polymorphic, omitting the discriminator") @route("/complex/polymorphism/missingdiscriminator") @put - putMissingDiscriminator is Azure.Core.Foundations.Operation< - { - @body complexBody: Salmon; - }, - Salmon - >; + putMissingDiscriminator is Azure.Core.Foundations.Operation; @doc(""" Put complex types that are polymorphic, attempting to omit required 'birthday' @@ -492,50 +301,7 @@ field - the request should not be allowed from the client """) @route("/complex/polymorphism/missingrequired/invalid") @put - putValidMissingRequired is Azure.Core.Foundations.Operation< - { - @doc(""" -Please attempt put a sawshark that looks like this, the client should not allow -this data to be sent: -{ - \"fishtype\": \"sawshark\", - \"species\": -\"snaggle toothed\", - \"length\": 18.5, - \"age\": 2, - \"birthday\": -\"2013-06-01T01:00:00Z\", - \"location\": \"alaska\", - \"picture\": -base64(FF FF FF FF FE), - \"siblings\": [ - { - \"fishtype\": -\"shark\", - \"species\": \"predator\", - \"birthday\": -\"2012-01-05T01:00:00Z\", - \"length\": 20, - \"age\": 6 - - }, - { - \"fishtype\": \"sawshark\", - -\"species\": \"dangerous\", - \"picture\": base64(FF FF FF FF FE), - - \"length\": 10, - \"age\": 105 - } - ] -} -""") - @body - complexBody: Fish; - }, - void - >; + putValidMissingRequired is Azure.Core.Foundations.Operation; } interface polymorphicrecursiveOperations { @@ -547,88 +313,7 @@ interface polymorphicrecursiveOperations { @doc("Put complex types that are polymorphic and have recursive references") @route("/complex/polymorphicrecursive/valid") @put - putValid is Azure.Core.Foundations.Operation< - { - @doc(""" -Please put a salmon that looks like this: -{ - \"fishtype\": \"salmon\", - -\"species\": \"king\", - \"length\": 1, - \"age\": 1, - \"location\": -\"alaska\", - \"iswild\": true, - \"siblings\": [ - { - -\"fishtype\": \"shark\", - \"species\": \"predator\", - -\"length\": 20, - \"age\": 6, - \"siblings\": [ - - { - \"fishtype\": \"salmon\", - -\"species\": \"coho\", - \"length\": 2, - -\"age\": 2, - \"location\": \"atlantic\", - -\"iswild\": true, - \"siblings\": [ - -{ - \"fishtype\": \"shark\", - - \"species\": \"predator\", - \"length\": 20, - - \"age\": 6 - }, - - { - \"fishtype\": \"sawshark\", - - \"species\": \"dangerous\", - \"length\": -10, - \"age\": 105 - } - - ] - }, - { - -\"fishtype\": \"sawshark\", - \"species\": \"dangerous\", - - \"length\": 10, - \"age\": 105 - - } - ] - }, - { - \"fishtype\": \"sawshark\", - - \"species\": \"dangerous\", - \"length\": 10, - -\"age\": 105 - } - ] -} -""") - @body - complexBody: Fish; - }, - void - >; + putValid is Azure.Core.Foundations.Operation; } interface readonlypropertyOperations { @@ -640,12 +325,7 @@ interface readonlypropertyOperations { @doc("Put complex types that have readonly properties") @route("/complex/readonlyproperty/valid") @put - putValid is Azure.Core.Foundations.Operation< - { - @body complexBody: ReadonlyObj; - }, - void - >; + putValid is Azure.Core.Foundations.Operation; } interface flattencomplexOperations { diff --git a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/tspconfig.yaml similarity index 94% rename from packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/tspconfig.yaml rename to packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/tspconfig.yaml index 013d55ba1e..fb405fa449 100644 --- a/packages/extensions/openapi-to-cadl/test/arm-compute/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/tspconfig.yaml @@ -1,5 +1,5 @@ emit: - - "@azure-tools/typespec-autorest": + - "@azure-tools/typespec-autorest" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-cadl/test/complexObject/complexObject.json b/packages/extensions/openapi-to-typespec/test/complexObject/complexObject.json similarity index 100% rename from packages/extensions/openapi-to-cadl/test/complexObject/complexObject.json rename to packages/extensions/openapi-to-typespec/test/complexObject/complexObject.json diff --git a/packages/extensions/openapi-to-cadl/test/complexObject/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp similarity index 71% rename from packages/extensions/openapi-to-cadl/test/complexObject/tsp-output/main.tsp rename to packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp index 417199875d..d5ef1a9d2f 100644 --- a/packages/extensions/openapi-to-cadl/test/complexObject/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp @@ -6,8 +6,8 @@ using TypeSpec.Rest; using TypeSpec.Http; @service({ title: "Complex Model Client", - version: "2014-04-01-preview", }) +@versioned(Versions) @server( "{$host}", "Some cool documentation.", @@ -17,3 +17,8 @@ using TypeSpec.Http; ) @doc("Some cool documentation.") namespace ComplexModelClient; + +@doc("The available API versions.") +enum Versions { + v2014_04_01_preview: "2014-04-01-preview", +} diff --git a/packages/extensions/openapi-to-cadl/test/complexObject/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/models.tsp similarity index 100% rename from packages/extensions/openapi-to-cadl/test/complexObject/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/models.tsp diff --git a/packages/extensions/openapi-to-cadl/test/complexObject/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/routes.tsp similarity index 100% rename from packages/extensions/openapi-to-cadl/test/complexObject/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/routes.tsp diff --git a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..fb405fa449 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/tspconfig.yaml @@ -0,0 +1,14 @@ +emit: + - "@azure-tools/typespec-autorest" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/confidentialLedger/cl.md b/packages/extensions/openapi-to-typespec/test/confidentialLedger/cl.md similarity index 100% rename from packages/extensions/openapi-to-cadl/test/confidentialLedger/cl.md rename to packages/extensions/openapi-to-typespec/test/confidentialLedger/cl.md diff --git a/packages/extensions/openapi-to-cadl/test/confidentialLedger/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp similarity index 83% rename from packages/extensions/openapi-to-cadl/test/confidentialLedger/tsp-output/main.tsp rename to packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp index de997ac82a..31c64b5e6a 100644 --- a/packages/extensions/openapi-to-cadl/test/confidentialLedger/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp @@ -6,8 +6,8 @@ using TypeSpec.Rest; using TypeSpec.Http; @service({ title: "Microsoft Cognitive Language Service - Analyze Text Authoring", - version: "2022-05-13", }) +@versioned(Versions) @server( "{ledgerEndpoint}", "The ConfidentialLedgerClient writes and retrieves ledger entries against the Confidential Ledger service.", @@ -20,3 +20,8 @@ The ConfidentialLedgerClient writes and retrieves ledger entries against the Confidential Ledger service. """) namespace Azure.Language.Authoring; + +@doc("The available API versions.") +enum Versions { + v2022_05_13: "2022-05-13", +} diff --git a/packages/extensions/openapi-to-cadl/test/confidentialLedger/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/models.tsp similarity index 100% rename from packages/extensions/openapi-to-cadl/test/confidentialLedger/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/models.tsp diff --git a/packages/extensions/openapi-to-cadl/test/confidentialLedger/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/routes.tsp similarity index 92% rename from packages/extensions/openapi-to-cadl/test/confidentialLedger/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/routes.tsp index edd916a0c5..720d893d76 100644 --- a/packages/extensions/openapi-to-cadl/test/confidentialLedger/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/routes.tsp @@ -41,16 +41,16 @@ default) collection will be returned. op ListLedgerEntries is Azure.Core.Foundations.Operation< { @doc("The collection id.") - @query - collectionId: string; + @query("collectionId") + collectionId?: string; @doc("Specify the first transaction ID in a range.") - @query - fromTransactionId: string; + @query("fromTransactionId") + fromTransactionId?: string; @doc("Specify the last transaction ID in a range.") - @query - toTransactionId: string; + @query("toTransactionId") + toTransactionId?: string; }, PagedLedgerEntries >; @@ -62,8 +62,8 @@ op CreateLedgerEntry is Azure.Core.ResourceCreateWithServiceProvidedName< { parameters: { @doc("The collection id.") - @query - collectionId: string; + @query("collectionId") + collectionId?: string; }; } >; @@ -84,8 +84,8 @@ if the loading is still ongoing. op GetLedgerEntry is Azure.Core.Foundations.Operation< { @doc("The collection id.") - @query - collectionId: string; + @query("collectionId") + collectionId?: string; @doc("Identifies a write transaction.") @path @@ -109,8 +109,8 @@ op GetTransactionStatus is Azure.Core.ResourceRead; op GetCurrentLedgerEntry is Azure.Core.Foundations.Operation< { @doc("The collection id.") - @query - collectionId: string; + @query("collectionId") + collectionId?: string; }, LedgerEntry >; diff --git a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..fb405fa449 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/tspconfig.yaml @@ -0,0 +1,14 @@ +emit: + - "@azure-tools/typespec-autorest" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/keyvault/keyvault.md b/packages/extensions/openapi-to-typespec/test/keyvault/keyvault.md similarity index 100% rename from packages/extensions/openapi-to-cadl/test/keyvault/keyvault.md rename to packages/extensions/openapi-to-typespec/test/keyvault/keyvault.md diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp new file mode 100644 index 0000000000..5b3bc572e7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp @@ -0,0 +1,25 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +@service({ + title: "Azure Keyvault Service" + }) +@versioned(Versions) +@server("{vaultBaseUrl}", "The key vault client performs cryptographic key operations and vault operations against the Key Vault service." +, { +vaultBaseUrl: string +} +) +@doc(""" +The key vault client performs cryptographic key operations and vault operations +against the Key Vault service. +""") +namespace Azure.Keyvault; + +@doc("The available API versions.") +enum Versions { +v7.4_preview.1: "7.4-preview.1", +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp similarity index 98% rename from packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp index 9be7a1ca77..384b30e806 100644 --- a/packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp @@ -436,9 +436,7 @@ model CertificateItem { } @doc("The certificate management attributes.") -model CertificateAttributes { - ...Attributes; - +model CertificateAttributes extends Attributes { @doc(""" softDelete data retention days. Value should be >=7 and <=90 when softDelete enabled, otherwise 0. @@ -482,9 +480,7 @@ model Attributes { A Deleted Certificate consisting of its previous id, attributes and its tags, as well as information on when it will be purged. """) -model DeletedCertificateBundle { - ...CertificateBundle; - +model DeletedCertificateBundle extends CertificateBundle { @doc(""" The url of the recovery object, used to identify and recover the deleted certificate. @@ -649,6 +645,8 @@ model LifetimeAction { @doc("A condition to be satisfied for an action to be executed.") model Trigger { @doc("Percentage of lifetime at which to trigger. Value should be between 1 and 99.") + @maxValue(99) + @minValue(1) @projectedName("json", "lifetime_percentage") lifetimePercentage?: int32; @@ -965,9 +963,7 @@ model CertificateRestoreParameters { model DeletedCertificateListResult is Azure.Core.Page; @doc("The deleted certificate item containing metadata about the deleted certificate.") -model DeletedCertificateItem { - ...CertificateItem; - +model DeletedCertificateItem extends CertificateItem { @doc(""" The url of the recovery object, used to identify and recover the deleted certificate. @@ -1016,9 +1012,7 @@ model KeyCreateParameters { } @doc("The attributes of a key managed by the key vault service.") -model KeyAttributes { - ...Attributes; - +model KeyAttributes extends Attributes { @doc(""" softDelete data retention days. Value should be >=7 and <=90 when softDelete enabled, otherwise 0. @@ -1164,9 +1158,7 @@ model KeyImportParameters { } @doc("A DeletedKeyBundle consisting of a WebKey plus its Attributes and deletion info") -model DeletedKeyBundle { - ...KeyBundle; - +model DeletedKeyBundle extends KeyBundle { @doc("The url of the recovery object, used to identify and recover the deleted key.") recoveryId?: string; @@ -1324,6 +1316,7 @@ model KeyVerifyResult { @doc("The release key parameters.") model KeyReleaseParameters { @doc("The attestation assertion for the target of the key release.") + @minLength(1) @projectedName("json", "target") targetAttestationToken: string; @@ -1348,9 +1341,7 @@ model DeletedKeyListResult is Azure.Core.Page; The deleted key item containing the deleted key metadata and information about deletion. """) -model DeletedKeyItem { - ...KeyItem; - +model DeletedKeyItem extends KeyItem { @doc("The url of the recovery object, used to identify and recover the deleted key.") recoveryId?: string; @@ -1435,6 +1426,8 @@ hours: PT48H, 1 year and 10 days: P1Y10D @doc("The get random bytes request object.") model GetRandomBytesRequest { @doc("The requested number of random bytes.") + @maxValue(128) + @minValue(1) count: int32; } @@ -1579,9 +1572,7 @@ model SecretSetParameters { } @doc("The secret management attributes.") -model SecretAttributes { - ...Attributes; - +model SecretAttributes extends Attributes { @doc(""" softDelete data retention days. Value should be >=7 and <=90 when softDelete enabled, otherwise 0. @@ -1635,9 +1626,7 @@ backing a certificate, then managed will be true. A Deleted Secret consisting of its previous id, attributes and its tags, as well as information on when it will be purged. """) -model DeletedSecretBundle { - ...SecretBundle; - +model DeletedSecretBundle extends SecretBundle { @doc("The url of the recovery object, used to identify and recover the deleted secret.") recoveryId?: string; @@ -1692,9 +1681,7 @@ a certificate, then managed will be true. model DeletedSecretListResult is Azure.Core.Page; @doc("The deleted secret item containing metadata about the deleted secret.") -model DeletedSecretItem { - ...SecretItem; - +model DeletedSecretItem extends SecretItem { @doc("The url of the recovery object, used to identify and recover the deleted secret.") recoveryId?: string; @@ -1737,6 +1724,8 @@ model CertificateInfoObject { Customer to specify the number of certificates (minimum 2 and maximum 10) to restore Security Domain """) + @maxValue(10) + @minValue(2) required?: int32; } @@ -1881,9 +1870,7 @@ model DeletedStorageListResult is Azure.Core.Page; The deleted storage account item containing metadata about the deleted storage account. """) -model DeletedStorageAccountItem { - ...StorageAccountItem; - +model DeletedStorageAccountItem extends StorageAccountItem { @doc(""" The url of the recovery object, used to identify and recover the deleted storage account. @@ -1903,9 +1890,7 @@ storage account. A deleted storage account bundle consisting of its previous id, attributes and its tags, as well as information on when it will be purged. """) -model DeletedStorageBundle { - ...StorageBundle; - +model DeletedStorageBundle extends StorageBundle { @doc(""" The url of the recovery object, used to identify and recover the deleted storage account. @@ -2077,9 +2062,7 @@ model DeletedSasDefinitionListResult The deleted SAS definition item containing metadata about the deleted SAS definition. """) -model DeletedSasDefinitionItem { - ...SasDefinitionItem; - +model DeletedSasDefinitionItem extends SasDefinitionItem { @doc(""" The url of the recovery object, used to identify and recover the deleted SAS definition. @@ -2099,9 +2082,7 @@ definition. A deleted SAS definition bundle consisting of its previous id, attributes and its tags, as well as information on when it will be purged. """) -model DeletedSasDefinitionBundle { - ...SasDefinitionBundle; - +model DeletedSasDefinitionBundle extends SasDefinitionBundle { @doc(""" The url of the recovery object, used to identify and recover the deleted SAS definition. diff --git a/packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp similarity index 95% rename from packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp index b28b82bc78..baa6366ece 100644 --- a/packages/extensions/openapi-to-cadl/test/keyvault/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp @@ -14,15 +14,7 @@ container. @route("/backup") @post op FullBackup is Azure.Core.Foundations.Operation< - { - @doc(""" -Azure blob shared access signature token pointing to a valid Azure blob -container where full backup needs to be stored. This token needs to be valid -for at least next 24 hours from the time of making this call -""") - @body - azureStorageBlobContainerUri: SASTokenParameter; - }, + SASTokenParameter, FullBackupOperation >; @@ -45,14 +37,7 @@ Azure Blob storage backup folder @route("/restore") @put op FullRestoreOperation is Azure.Core.Foundations.Operation< - { - @doc(""" -The Azure blob SAS token pointing to a folder where the previous successful -full backup was stored -""") - @body - restoreBlobDetails: RestoreOperationParameters; - }, + RestoreOperationParameters, RestoreOperation >; @@ -87,7 +72,7 @@ The Azure blob SAS token pointing to a folder where the previous successful full backup was stored """) @body - restoreBlobDetails: SelectiveKeyRestoreOperationParameters; + restoreBlobDetails?: SelectiveKeyRestoreOperationParameters; }, SelectiveKeyRestoreOperation >; @@ -105,12 +90,14 @@ op GetCertificates is Azure.Core.Foundations.Operation< Maximum number of results to return in a page. If not specified the service will return up to 25 results. """) - @query - maxresults: int32; + @maxValue(25) + @minValue(1) + @query("maxresults") + maxresults?: int32; @doc("Specifies whether to include certificates which are not completely provisioned.") - @query - includePending: boolean; + @query("includePending") + includePending?: boolean; }, CertificateListResult >; @@ -140,11 +127,7 @@ requires the certificates/managecontacts permission. @route("/certificates/contacts") @put op SetCertificateContacts is Azure.Core.Foundations.Operation< - { - @doc("The contacts for the key vault certificate.") - @body - contacts: Contacts; - }, + Contacts, Contacts >; @@ -181,8 +164,10 @@ op GetCertificateIssuers is Azure.Core.Foundations.Operation< Maximum number of results to return in a page. If not specified the service will return up to 25 results. """) - @query - maxresults: int32; + @maxValue(25) + @minValue(1) + @query("maxresults") + maxresults?: int32; }, CertificateIssuerListResult >; @@ -280,6 +265,7 @@ The name of the certificate. The value you provide may be copied globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information. """) + @pattern("^[0-9a-zA-Z-]+$") @path `certificate-name`: string; @@ -307,6 +293,7 @@ The name of the certificate. The value you provide may be copied globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information. """) + @pattern("^[0-9a-zA-Z-]+$") @path `certificate-name`: string; @@ -335,8 +322,10 @@ op GetCertificateVersions is Azure.Core.Foundations.Operation< Maximum number of results to return in a page. If not specified the service will return up to 25 results. """) - @query - maxresults: int32; + @maxValue(25) + @minValue(1) + @query("maxresults") + maxresults?: int32; }, CertificateListResult >; @@ -528,11 +517,7 @@ operation requires the certificates/restore permission. @route("/certificates/restore") @post op RestoreCertificate is Azure.Core.Foundations.Operation< - { - @doc("The parameters to restore the certificate.") - @body - parameters: CertificateRestoreParameters; - }, + CertificateRestoreParameters, CertificateBundle >; @@ -555,12 +540,14 @@ op GetDeletedCertificates is Azure.Core.Foundations.Operation< Maximum number of results to return in a page. If not specified the service will return up to 25 results. """) - @query - maxresults: int32; + @maxValue(25) + @minValue(1) + @query("maxresults") + maxresults?: int32; @doc("Specifies whether to include certificates which are not completely provisioned.") - @query - includePending: boolean; + @query("includePending") + includePending?: boolean; }, DeletedCertificateListResult >; @@ -642,6 +629,7 @@ key. The value you provide may be copied globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information. """) + @pattern("^[0-9a-zA-Z-]+$") @path `key-name`: string; @@ -668,6 +656,7 @@ op RotateKey is Azure.Core.Foundations.Operation< The name of key to be rotated. The system will generate a new version in the specified key. """) + @pattern("^[0-9a-zA-Z-]+$") @path `key-name`: string; }, @@ -692,6 +681,7 @@ Name for the imported key. The value you provide may be copied globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information. """) + @pattern("^[0-9a-zA-Z-]+$") @path `key-name`: string; @@ -790,8 +780,10 @@ op GetKeyVersions is Azure.Core.Foundations.Operation< Maximum number of results to return in a page. If not specified the service will return up to 25 results. """) - @query - maxresults: int32; + @maxValue(25) + @minValue(1) + @query("maxresults") + maxresults?: int32; }, KeyListResult >; @@ -812,8 +804,10 @@ op GetKeys is Azure.Core.Foundations.Operation< Maximum number of results to return in a page. If not specified the service will return up to 25 results. """) - @query - maxresults: int32; + @maxValue(25) + @minValue(1) + @query("maxresults") + maxresults?: int32; }, KeyListResult >; @@ -863,11 +857,7 @@ Vault. This operation requires the keys/restore permission. @route("/keys/restore") @post op RestoreKey is Azure.Core.Foundations.Operation< - { - @doc("The parameters to restore the key.") - @body - parameters: KeyRestoreParameters; - }, + KeyRestoreParameters, KeyBundle >; @@ -1091,8 +1081,10 @@ op GetDeletedKeys is Azure.Core.Foundations.Operation< Maximum number of results to return in a page. If not specified the service will return up to 25 results. """) - @query - maxresults: int32; + @maxValue(25) + @minValue(1) + @query("maxresults") + maxresults?: int32; }, DeletedKeyListResult >; @@ -1193,11 +1185,7 @@ op UpdateKeyRotationPolicy is Azure.Core.Foundations.Operation< @route("/rng") @post op GetRandomBytes is Azure.Core.Foundations.Operation< - { - @doc("The request object to get random bytes.") - @body - parameters: GetRandomBytesRequest; - }, + GetRandomBytesRequest, RandomBytes >; @@ -1216,6 +1204,7 @@ The name of the secret. The value you provide may be copied globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information. """) + @pattern("^[0-9a-zA-Z-]+$") @path `secret-name`: string; @@ -1307,8 +1296,10 @@ op GetSecrets is Azure.Core.Foundations.Operation< Maximum number of results to return in a page. If not specified, the service will return up to 25 results. """) - @query - maxresults: int32; + @maxValue(25) + @minValue(1) + @query("maxresults") + maxresults?: int32; }, SecretListResult >; @@ -1331,8 +1322,10 @@ op GetSecretVersions is Azure.Core.Foundations.Operation< Maximum number of results to return in a page. If not specified, the service will return up to 25 results. """) - @query - maxresults: int32; + @maxValue(25) + @minValue(1) + @query("maxresults") + maxresults?: int32; }, SecretListResult >; @@ -1351,8 +1344,10 @@ op GetDeletedSecrets is Azure.Core.Foundations.Operation< Maximum number of results to return in a page. If not specified the service will return up to 25 results. """) - @query - maxresults: int32; + @maxValue(25) + @minValue(1) + @query("maxresults") + maxresults?: int32; }, DeletedSecretListResult >; @@ -1432,11 +1427,7 @@ requires the secrets/restore permission. @route("/secrets/restore") @post op RestoreSecret is Azure.Core.Foundations.Operation< - { - @doc("The parameters to restore the secret.") - @body - parameters: SecretRestoreParameters; - }, + SecretRestoreParameters, SecretBundle >; @@ -1491,8 +1482,10 @@ op GetStorageAccounts is Azure.Core.Foundations.Operation< Maximum number of results to return in a page. If not specified the service will return up to 25 results. """) - @query - maxresults: int32; + @maxValue(25) + @minValue(1) + @query("maxresults") + maxresults?: int32; }, StorageListResult >; @@ -1511,8 +1504,10 @@ op GetDeletedStorageAccounts is Azure.Core.Foundations.Operation< Maximum number of results to return in a page. If not specified the service will return up to 25 results. """) - @query - maxresults: int32; + @maxValue(25) + @minValue(1) + @query("maxresults") + maxresults?: int32; }, DeletedStorageListResult >; @@ -1528,6 +1523,7 @@ permission. op GetDeletedStorageAccount is Azure.Core.Foundations.Operation< { @doc("The name of the storage account.") + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; }, @@ -1546,6 +1542,7 @@ permission. op PurgeDeletedStorageAccount is Azure.Core.Foundations.Operation< { @doc("The name of the storage account.") + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; }, @@ -1563,6 +1560,7 @@ storage/recover permission. op RecoverDeletedStorageAccount is Azure.Core.Foundations.Operation< { @doc("The name of the storage account.") + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; }, @@ -1593,11 +1591,7 @@ storage/restore permission. @route("/storage/restore") @post op RestoreStorageAccount is Azure.Core.Foundations.Operation< - { - @doc("The parameters to restore the storage account.") - @body - parameters: StorageRestoreParameters; - }, + StorageRestoreParameters, StorageBundle >; @@ -1610,6 +1604,7 @@ permission. op DeleteStorageAccount is Azure.Core.Foundations.Operation< { @doc("The name of the storage account.") + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; }, @@ -1625,6 +1620,7 @@ storage/get permission. op GetStorageAccount is Azure.Core.Foundations.Operation< { @doc("The name of the storage account.") + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; }, @@ -1644,6 +1640,7 @@ The name of the storage account. The value you provide may be copied globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information. """) + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @@ -1663,6 +1660,7 @@ This operation requires the storage/set/update permission. op UpdateStorageAccount is Azure.Core.Foundations.Operation< { @doc("The name of the storage account.") + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @@ -1682,6 +1680,7 @@ operation requires the storage/regeneratekey permission. op RegenerateStorageAccountKey is Azure.Core.Foundations.Operation< { @doc("The name of the storage account.") + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @@ -1701,6 +1700,7 @@ requires the storage/listsas permission. op GetSasDefinitions is Azure.Core.Foundations.Operation< { @doc("The name of the storage account.") + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @@ -1708,8 +1708,10 @@ op GetSasDefinitions is Azure.Core.Foundations.Operation< Maximum number of results to return in a page. If not specified the service will return up to 25 results. """) - @query - maxresults: int32; + @maxValue(25) + @minValue(1) + @query("maxresults") + maxresults?: int32; }, SasDefinitionListResult >; @@ -1725,6 +1727,7 @@ storage/listsas permission. op GetDeletedSasDefinitions is Azure.Core.Foundations.Operation< { @doc("The name of the storage account.") + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @@ -1732,8 +1735,10 @@ op GetDeletedSasDefinitions is Azure.Core.Foundations.Operation< Maximum number of results to return in a page. If not specified the service will return up to 25 results. """) - @query - maxresults: int32; + @maxValue(25) + @minValue(1) + @query("maxresults") + maxresults?: int32; }, DeletedSasDefinitionListResult >; @@ -1749,10 +1754,12 @@ storage/getsas permission. op GetDeletedSasDefinition is Azure.Core.Foundations.Operation< { @doc("The name of the storage account.") + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @doc("The name of the SAS definition.") + @pattern("^[0-9a-zA-Z]+$") @path `sas-definition-name`: string; }, @@ -1770,10 +1777,12 @@ requires the storage/recover permission. op RecoverDeletedSasDefinition is Azure.Core.Foundations.Operation< { @doc("The name of the storage account.") + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @doc("The name of the SAS definition.") + @pattern("^[0-9a-zA-Z]+$") @path `sas-definition-name`: string; }, @@ -1789,10 +1798,12 @@ requires the storage/deletesas permission. op DeleteSasDefinition is Azure.Core.Foundations.Operation< { @doc("The name of the storage account.") + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @doc("The name of the SAS definition.") + @pattern("^[0-9a-zA-Z]+$") @path `sas-definition-name`: string; }, @@ -1808,10 +1819,12 @@ operation requires the storage/getsas permission. op GetSasDefinition is Azure.Core.Foundations.Operation< { @doc("The name of the storage account.") + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @doc("The name of the SAS definition.") + @pattern("^[0-9a-zA-Z]+$") @path `sas-definition-name`: string; }, @@ -1827,6 +1840,7 @@ operation requires the storage/setsas permission. op SetSasDefinition is Azure.Core.Foundations.Operation< { @doc("The name of the storage account.") + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @@ -1835,6 +1849,7 @@ The name of the SAS definition. The value you provide may be copied globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information. """) + @pattern("^[0-9a-zA-Z]+$") @path `sas-definition-name`: string; @@ -1854,10 +1869,12 @@ operation requires the storage/setsas permission. op UpdateSasDefinition is Azure.Core.Foundations.Operation< { @doc("The name of the storage account.") + @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @doc("The name of the SAS definition.") + @pattern("^[0-9a-zA-Z]+$") @path `sas-definition-name`: string; @@ -1937,8 +1954,8 @@ The scope of the role definition to create or update. Managed HSM only supports The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well. """) - @query - $filter: string; + @query("$filter") + $filter?: string; }, RoleDefinitionListResult >; @@ -2011,8 +2028,8 @@ The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. """) - @query - $filter: string; + @query("$filter") + $filter?: string; }, RoleAssignmentListResult >; @@ -2034,14 +2051,7 @@ be used to activate a provisioned managed HSM resource. @route("/securitydomain/download") @post Download is Azure.Core.Foundations.Operation< - { - @doc(""" -The Security Domain download operation requires customer to provide N -certificates (minimum 3 and maximum 10) containing a public key in JWK format. -""") - @body - CertificateInfoObject: CertificateInfoObject; - }, + CertificateInfoObject, SecurityDomainObject >; @@ -2056,11 +2066,7 @@ certificates (minimum 3 and maximum 10) containing a public key in JWK format. @route("/securitydomain/upload") @post Upload is Azure.Core.Foundations.Operation< - { - @doc("The Security Domain to be restored.") - @body - security_domain: SecurityDomainObject; - }, + SecurityDomainObject, SecurityDomainOperationStatus | void >; diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..fb405fa449 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/tspconfig.yaml @@ -0,0 +1,14 @@ +emit: + - "@azure-tools/typespec-autorest" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/loadTest/loadTest.md b/packages/extensions/openapi-to-typespec/test/loadTest/loadTest.md similarity index 100% rename from packages/extensions/openapi-to-cadl/test/loadTest/loadTest.md rename to packages/extensions/openapi-to-typespec/test/loadTest/loadTest.md diff --git a/packages/extensions/openapi-to-cadl/test/loadTest/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp similarity index 81% rename from packages/extensions/openapi-to-cadl/test/loadTest/tsp-output/main.tsp rename to packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp index 26b350205a..cf823fdd7c 100644 --- a/packages/extensions/openapi-to-cadl/test/loadTest/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp @@ -6,8 +6,8 @@ using TypeSpec.Rest; using TypeSpec.Http; @service({ title: "Load Testing Service", - version: "2022-11-01", }) +@versioned(Versions) @server( "https://{Endpoint}", "These APIs allow end users to create, view and run load tests using Azure Load Test Service.", @@ -20,3 +20,8 @@ These APIs allow end users to create, view and run load tests using Azure Load Test Service. """) namespace Azure.LoadTesting; + +@doc("The available API versions.") +enum Versions { + v2022_11_01: "2022-11-01", +} diff --git a/packages/extensions/openapi-to-cadl/test/loadTest/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/models.tsp similarity index 99% rename from packages/extensions/openapi-to-cadl/test/loadTest/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/models.tsp index e47c2a9f74..84e335b446 100644 --- a/packages/extensions/openapi-to-cadl/test/loadTest/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/models.tsp @@ -161,12 +161,17 @@ SECRET_VALUE. @doc("Unique test name as identifier.") @visibility("read") + @maxLength(50) + @minLength(2) testId?: string; @doc("The test description.") + @maxLength(100) description?: string; @doc("Display name of a test.") + @maxLength(50) + @minLength(2) displayName?: string; @doc("Subnet ID on which the load test instances should run.") @@ -551,12 +556,17 @@ SECRET_VALUE. testRunId?: string; @doc("Display name of a testRun.") + @maxLength(50) + @minLength(2) displayName?: string; @doc("Associated test Id.") + @maxLength(50) + @minLength(2) testId?: string; @doc("The test run description.") + @maxLength(100) description?: string; @doc("The test run status.") diff --git a/packages/extensions/openapi-to-cadl/test/loadTest/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/routes.tsp similarity index 83% rename from packages/extensions/openapi-to-cadl/test/loadTest/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/routes.tsp index c435df6d50..bb37c2137e 100644 --- a/packages/extensions/openapi-to-cadl/test/loadTest/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/routes.tsp @@ -18,6 +18,9 @@ interface LoadTestAdministrationOperations { Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testId: string; @@ -38,6 +41,9 @@ numeric, underscore or hyphen characters. Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testId: string; }, @@ -54,6 +60,9 @@ numeric, underscore or hyphen characters. Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testId: string; }, @@ -76,34 +85,34 @@ subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/lo Sort on the supported fields in (field asc/desc) format. eg: lastModifiedDateTime asc. Supported fields - lastModifiedDateTime """) - @query - orderby: string; + @query("orderby") + orderby?: string; @doc(""" Prefix based, case sensitive search on searchable fields - displayName, createdBy. For example, to search for a test, with display name is Login Test, the search parameter can be Login. """) - @query - search: string; + @query("search") + search?: string; @doc(""" Start DateTime(ISO 8601 literal format) of the last updated time range to filter tests. """) - @query - lastModifiedStartTime: utcDateTime; + @query("lastModifiedStartTime") + lastModifiedStartTime?: utcDateTime; @doc(""" End DateTime(ISO 8601 literal format) of the last updated time range to filter tests. """) - @query - lastModifiedEndTime: utcDateTime; + @query("lastModifiedEndTime") + lastModifiedEndTime?: utcDateTime; @doc("Number of results in response.") - @query - maxpagesize: int32; + @query("maxpagesize") + maxpagesize?: int32 = 50; }, TestsList >; @@ -126,6 +135,9 @@ should be provided in the request body as application/octet-stream. Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testId: string; @@ -134,8 +146,8 @@ numeric, underscore or hyphen characters. fileName: string; @doc("File type") - @query - fileType: FileType; + @query("fileType") + fileType?: FileType; @doc("The file content as application/octet-stream.") @body @@ -154,6 +166,9 @@ numeric, underscore or hyphen characters. Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testId: string; @@ -174,6 +189,9 @@ numeric, underscore or hyphen characters. Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testId: string; @@ -194,6 +212,9 @@ numeric, underscore or hyphen characters. Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testId: string; }, @@ -210,6 +231,9 @@ numeric, underscore or hyphen characters. Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testId: string; @@ -230,6 +254,9 @@ numeric, underscore or hyphen characters. Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testId: string; }, @@ -246,6 +273,9 @@ numeric, underscore or hyphen characters. Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testId: string; @@ -266,6 +296,9 @@ numeric, underscore or hyphen characters. Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testId: string; }, @@ -284,6 +317,9 @@ interface LoadTestRunOperations { Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testRunId: string; @@ -293,8 +329,8 @@ test will run with the JMX file, configuration and app components from the existing test run. You can override the configuration values for new test run in the request body. """) - @query - oldTestRunId: string; + @query("oldTestRunId") + oldTestRunId?: string; @doc("Load test run model") @body @@ -313,6 +349,9 @@ in the request body. Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testRunId: string; }, @@ -329,6 +368,9 @@ numeric, underscore or hyphen characters. Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testRunId: string; }, @@ -345,6 +387,9 @@ numeric, underscore or hyphen characters. Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testRunId: string; @@ -365,36 +410,36 @@ numeric, underscore or hyphen characters. Sort on the supported fields in (field asc/desc) format. eg: executedDateTime asc. Supported fields - executedDateTime """) - @query - orderby: string; + @query("orderby") + orderby?: string; @doc(""" Prefix based, case sensitive search on searchable fields - description, executedUser. For example, to search for a test run, with description 500 VUs, the search parameter can be 500. """) - @query - search: string; + @query("search") + search?: string; @doc("Unique name of an existing load test.") - @query - testId: string; + @query("testId") + testId?: string; @doc("Start DateTime(ISO 8601 literal format) of test-run execution time filter range.") - @query - executionFrom: utcDateTime; + @query("executionFrom") + executionFrom?: utcDateTime; @doc("End DateTime(ISO 8601 literal format) of test-run execution time filter range.") - @query - executionTo: utcDateTime; + @query("executionTo") + executionTo?: utcDateTime; @doc("Comma separated list of test run status.") - @query - status: string; + @query("status") + status?: string; @doc("Number of results in response.") - @query - maxpagesize: int32; + @query("maxpagesize") + maxpagesize?: int32 = 50; }, TestRunsList >; @@ -409,6 +454,9 @@ the search parameter can be 500. Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testRunId: string; }, @@ -425,6 +473,9 @@ numeric, underscore or hyphen characters. Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testRunId: string; }, @@ -441,11 +492,14 @@ numeric, underscore or hyphen characters. Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testRunId: string; @doc("Metric namespace to query metric definitions for.") - @query + @query("metricNamespace") metricNamespace: string; }, MetricDefinitionCollection @@ -461,35 +515,38 @@ numeric, underscore or hyphen characters. Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testRunId: string; @doc("The aggregation") - @query - aggregation: string; + @query("aggregation") + aggregation?: string; @doc("The interval (i.e. timegrain) of the query.") - @query - interval: Interval; + @query("interval") + interval?: Interval; @doc("Metric name") - @query + @query("metricname") metricname: string; @doc("Metric namespace to query metric definitions for.") - @query + @query("metricNamespace") metricNamespace: string; @doc(""" The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. """) - @query + @query("timespan") timespan: string; @doc("Metric dimension filter ") @body - body: MetricRequestPayload; + body?: MetricRequestPayload; }, Metrics >; @@ -501,22 +558,22 @@ The timespan of the query. It is a string with the following format { parameters: { @doc("The interval (i.e. timegrain) of the query.") - @query - interval: Interval; + @query("interval") + interval?: Interval; @doc("Metric name") - @query + @query("metricname") metricname: string; @doc("Metric namespace to query metric definitions for.") - @query + @query("metricNamespace") metricNamespace: string; @doc(""" The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. """) - @query + @query("timespan") timespan: string; }; } @@ -532,6 +589,9 @@ The timespan of the query. It is a string with the following format Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testRunId: string; @@ -558,6 +618,9 @@ run. Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testRunId: string; }, @@ -574,6 +637,9 @@ numeric, underscore or hyphen characters. Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testRunId: string; @@ -594,6 +660,9 @@ numeric, underscore or hyphen characters. Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. """) + @maxLength(50) + @minLength(2) + @pattern("^[a-z0-9_-]*$") @path testRunId: string; }, diff --git a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..fb405fa449 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/tspconfig.yaml @@ -0,0 +1,14 @@ +emit: + - "@azure-tools/typespec-autorest" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/nh/nh.json b/packages/extensions/openapi-to-typespec/test/nh/nh.json similarity index 100% rename from packages/extensions/openapi-to-cadl/test/nh/nh.json rename to packages/extensions/openapi-to-typespec/test/nh/nh.json diff --git a/packages/extensions/openapi-to-cadl/test/nh/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp similarity index 82% rename from packages/extensions/openapi-to-cadl/test/nh/tsp-output/main.tsp rename to packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp index 6ace2926de..ca739032c5 100644 --- a/packages/extensions/openapi-to-cadl/test/nh/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp @@ -6,8 +6,8 @@ using TypeSpec.Rest; using TypeSpec.Http; @service({ title: "NotificationHubsClient", - version: "2020-06-01", }) +@versioned(Versions) @server( "{namespaceBaseUrl}", "The Notification Hubs client performs operations to register and query devices, and send notifications", @@ -20,3 +20,8 @@ The Notification Hubs client performs operations to register and query devices, and send notifications """) namespace NotificationHubsClient; + +@doc("The available API versions.") +enum Versions { + v2020_06_01: "2020-06-01", +} diff --git a/packages/extensions/openapi-to-cadl/test/nh/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp similarity index 100% rename from packages/extensions/openapi-to-cadl/test/nh/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp diff --git a/packages/extensions/openapi-to-cadl/test/nh/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/routes.tsp similarity index 84% rename from packages/extensions/openapi-to-cadl/test/nh/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/nh/tsp-output/routes.tsp index e4612d2e61..707ebe33a8 100644 --- a/packages/extensions/openapi-to-cadl/test/nh/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/routes.tsp @@ -46,7 +46,7 @@ op GetNotificationHub is Azure.Core.Foundations.Operation< @doc("Accept header") @header - Accept: "application/atom+xml;type=entry;charset=utf-8"; + accept: "application/atom+xml;type=entry;charset=utf-8"; }, NotificationHubEntryModel | void >; @@ -70,13 +70,14 @@ op CreateOrUpdateNotificationHub is Azure.Core.Foundations.Operation< @doc("ETag as returned by creation, update, and retrieval, or * (overwrite).") @header - `If-Match`: string; + `If-Match`?: string; - @body body: NotificationHubEntryModel; + @body + body: NotificationHubEntryModel; @doc("Accept header") @header - Accept: "application/atom+xml;type=entry;charset=utf-8"; + accept: "application/atom+xml;type=entry;charset=utf-8"; }, NotificationHubEntryModel | void >; @@ -106,16 +107,16 @@ op GetRegistrationsByTag is Azure.Core.Foundations.Operation< Contains the token to continue the enumeration of registrations, in case there are more. """) - @query - ContinuationToken: string; + @query("ContinuationToken") + ContinuationToken?: string; @doc("OData top parameter") - @query - $top: string; + @query("$top") + $top?: string; @doc("Accept header") @header - Accept: "application/atom+xml;type=entry;charset=utf-8"; + accept: "application/atom+xml;type=entry;charset=utf-8"; }, void >; @@ -161,20 +162,20 @@ op GetRegistrations is Azure.Core.Foundations.Operation< Contains the token to continue the enumeration of registrations, in case there are more. """) - @query - ContinuationToken: string; + @query("ContinuationToken") + ContinuationToken?: string; @doc("OData filter parameter") - @query - $filter: string; + @query("$filter") + $filter?: string; @doc("OData top parameter") - @query - $top: string; + @query("$top") + $top?: string; @doc("Accept header") @header - Accept: "application/atom+xml;type=entry;charset=utf-8"; + accept: "application/atom+xml;type=entry;charset=utf-8"; }, void >; @@ -198,7 +199,7 @@ op CreateRegistration is Azure.Core.Foundations.Operation< @doc("Accept header") @header - Accept: "application/atom+xml;type=entry;charset=utf-8"; + accept: "application/atom+xml;type=entry;charset=utf-8"; }, RegistrationEntryModel | void >; @@ -222,7 +223,7 @@ op DeleteRegistration is Azure.Core.Foundations.Operation< @doc("ETag as returned by creation, update, and retrieval, or * (overwrite).") @header - `If-Match`: string; + `If-Match`?: string; @doc("Authorization Header value") @header @@ -254,7 +255,7 @@ op GetRegistration is Azure.Core.Foundations.Operation< @doc("Accept header") @header - Accept: "application/atom+xml;type=entry;charset=utf-8"; + accept: "application/atom+xml;type=entry;charset=utf-8"; }, RegistrationEntryModel | void >; @@ -280,11 +281,12 @@ op CreateOrUpdateRegistration is Azure.Core.Foundations.Operation< @header Authorization: string; - @body body: RegistrationEntryModel; + @body + body: RegistrationEntryModel; @doc("Accept header") @header - Accept: "application/atom+xml;type=entry;charset=utf-8"; + accept: "application/atom+xml;type=entry;charset=utf-8"; }, RegistrationEntryModel | void >; @@ -384,7 +386,7 @@ op SendMessage is Azure.Core.Foundations.Operation< @doc("Device handle for the PNS") @header - `ServiceBusNotification-DeviceHandle`: string; + `ServiceBusNotification-DeviceHandle`?: string; @doc("Platform type for the notification") @header @@ -392,51 +394,51 @@ op SendMessage is Azure.Core.Foundations.Operation< @doc("Notification message tags for targeting") @header - `ServiceBusNotification-Tags`: string; + `ServiceBusNotification-Tags`?: string; @doc("Direct Send") - @query - direct: boolean; + @query("direct") + direct?: boolean; @doc("The apns-topic header") @header - `apns-topic`: string; + `apns-topic`?: string; @doc("The apns-priority header") @header - `apns-priority`: string; + `apns-priority`?: string; @doc("The apns-push-type header") @header - `apns-push-type`: string; + `apns-push-type`?: string; @doc(" X-WNS-Cache-Policy header parameter") @header - `X-WNS-Cache-Policy`: string; + `X-WNS-Cache-Policy`?: string; @doc("X-WNS-PRIORITY header parameter") @header - `X-WNS-PRIORITY`: string; + `X-WNS-PRIORITY`?: string; @doc("X-WNS-RequestForStatus header parameter") @header - `X-WNS-RequestForStatus`: string; + `X-WNS-RequestForStatus`?: string; @doc("X-WNS-Tag header parameter") @header - `X-WNS-Tag`: string; + `X-WNS-Tag`?: string; @doc("X-WNS-TTL header parameter") @header - `X-WNS-TTL`: string; + `X-WNS-TTL`?: string; @doc("X-WNS-Type header parameter") @header - `X-WNS-Type`: string; + `X-WNS-Type`?: string; @doc("Upload file type") @header - `Content-Type`: ContentType; + `content-type`: ContentType; @doc("The notification message body") @body @@ -464,7 +466,7 @@ op SendMessage is Azure.Core.Foundations.Operation< @doc("Device handle for the PNS") @header - `ServiceBusNotification-DeviceHandle`: string; + `ServiceBusNotification-DeviceHandle`?: string; @doc("Platform type for the notification") @header @@ -472,51 +474,51 @@ op SendMessage is Azure.Core.Foundations.Operation< @doc("Notification message tags for targeting") @header - `ServiceBusNotification-Tags`: string; + `ServiceBusNotification-Tags`?: string; @doc("Direct Send") - @query - direct: boolean; + @query("direct") + direct?: boolean; @doc("The apns-topic header") @header - `apns-topic`: string; + `apns-topic`?: string; @doc("The apns-priority header") @header - `apns-priority`: string; + `apns-priority`?: string; @doc("The apns-push-type header") @header - `apns-push-type`: string; + `apns-push-type`?: string; @doc(" X-WNS-Cache-Policy header parameter") @header - `X-WNS-Cache-Policy`: string; + `X-WNS-Cache-Policy`?: string; @doc("X-WNS-PRIORITY header parameter") @header - `X-WNS-PRIORITY`: string; + `X-WNS-PRIORITY`?: string; @doc("X-WNS-RequestForStatus header parameter") @header - `X-WNS-RequestForStatus`: string; + `X-WNS-RequestForStatus`?: string; @doc("X-WNS-Tag header parameter") @header - `X-WNS-Tag`: string; + `X-WNS-Tag`?: string; @doc("X-WNS-TTL header parameter") @header - `X-WNS-TTL`: string; + `X-WNS-TTL`?: string; @doc("X-WNS-Type header parameter") @header - `X-WNS-Type`: string; + `X-WNS-Type`?: string; @doc("Upload file type") @header - `Content-Type`: ContentType; + `content-type`: ContentType; @doc("The notification message body") @body diff --git a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..fb405fa449 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/tspconfig.yaml @@ -0,0 +1,14 @@ +emit: + - "@azure-tools/typespec-autorest" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/openAI/openai.md b/packages/extensions/openapi-to-typespec/test/openAI/openai.md similarity index 100% rename from packages/extensions/openapi-to-cadl/test/openAI/openai.md rename to packages/extensions/openapi-to-typespec/test/openAI/openai.md diff --git a/packages/extensions/openapi-to-cadl/test/openAI/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp similarity index 74% rename from packages/extensions/openapi-to-cadl/test/openAI/tsp-output/main.tsp rename to packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp index 1b7d038f1e..aa73e0bfe5 100644 --- a/packages/extensions/openapi-to-cadl/test/openAI/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp @@ -6,8 +6,8 @@ using TypeSpec.Rest; using TypeSpec.Http; @service({ title: "OpenAI", - version: "2022-06-01-preview", }) +@versioned(Versions) @server( "https://{endpoint}/openai", "Azure OpenAI APIs for completions and search", @@ -17,3 +17,8 @@ using TypeSpec.Http; ) @doc("Azure OpenAI APIs for completions and search") namespace Azure.AI.OpenAI; + +@doc("The available API versions.") +enum Versions { + v2022_06_01_preview: "2022-06-01-preview", +} diff --git a/packages/extensions/openapi-to-cadl/test/openAI/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp similarity index 98% rename from packages/extensions/openapi-to-cadl/test/openAI/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp index aec6deef3a..5967415342 100644 --- a/packages/extensions/openapi-to-cadl/test/openAI/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp @@ -59,7 +59,7 @@ token. As an example, you can pass {\"50256\" : -100} to prevent the <|endoftext|> token from being generated. """) @projectedName("json", "logit_bias") - logitBias?: unknown; + logitBias?: Record; @doc("The ID of the end-user, for use in tracking and rate-limiting.") user?: string; @@ -182,9 +182,8 @@ model ErrorResponseError { type?: string; } -model Paths13PiqocDeploymentsDeploymentIdEmbeddingsPostRequestbodyContentApplicationJsonSchema { - ...Record; - +model Paths13PiqocDeploymentsDeploymentIdEmbeddingsPostRequestbodyContentApplicationJsonSchema + extends Record { @doc(""" An input to embed, encoded as a string, a list of strings, or a list of token lists diff --git a/packages/extensions/openapi-to-cadl/test/openAI/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/routes.tsp similarity index 96% rename from packages/extensions/openapi-to-cadl/test/openAI/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/openAI/tsp-output/routes.tsp index 66b69ca015..e67ed83f2a 100644 --- a/packages/extensions/openapi-to-cadl/test/openAI/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/routes.tsp @@ -14,7 +14,9 @@ interface completionsOperations { @post create is Azure.Core.Foundations.Operation< { - @path `deployment-id`: string; + @path + `deployment-id`: string; + @body body: Paths1Vtxb06DeploymentsDeploymentIdCompletionsPostRequestbodyContentApplicationJsonSchema; }, diff --git a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..fb405fa449 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/tspconfig.yaml @@ -0,0 +1,14 @@ +emit: + - "@azure-tools/typespec-autorest" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/pagination/paging.json b/packages/extensions/openapi-to-typespec/test/pagination/paging.json similarity index 100% rename from packages/extensions/openapi-to-cadl/test/pagination/paging.json rename to packages/extensions/openapi-to-typespec/test/pagination/paging.json diff --git a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp new file mode 100644 index 0000000000..1bed7b99c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp @@ -0,0 +1,22 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +@service({ + title: "AutoRest Paging Test Service" + }) +@versioned(Versions) +@server("{$host}", "Long-running Operation for AutoRest" +, { +$host: string +} +) +@doc("Long-running Operation for AutoRest") +namespace AutoRestPagingTestService; + +@doc("The available API versions.") +enum Versions { +v1.0.0: "1.0.0", +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-cadl/test/pagination/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp similarity index 100% rename from packages/extensions/openapi-to-cadl/test/pagination/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp diff --git a/packages/extensions/openapi-to-cadl/test/pagination/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/routes.tsp similarity index 92% rename from packages/extensions/openapi-to-cadl/test/pagination/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/pagination/tsp-output/routes.tsp index 4f72059489..57dc3267a9 100644 --- a/packages/extensions/openapi-to-cadl/test/pagination/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/routes.tsp @@ -45,18 +45,19 @@ returns a next link. Second (and final) call, will give you an items list of 1. @get getMultiplePages is Azure.Core.Foundations.Operation< { - @header `client-request-id`: string; + @header + `client-request-id`?: string; @doc("Sets the maximum number of items to return in the response.") @header - maxresults: int32; + maxresults?: int32; @doc(""" Sets the maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) @header - timeout: int32; + timeout?: int32 = 30; }, ProductResult >; @@ -71,14 +72,14 @@ ProductResult getWithQueryParams is Azure.Core.Foundations.Operation< { @doc("A required integer query parameter. Put in value '100' to pass test.") - @query + @query("requiredQueryParameter") requiredQueryParameter: int32; @doc(""" A constant. Must be True and will be passed as a query parameter to nextOperationWithQueryParams """) - @query + @query("queryConstant") queryConstant: true; }, ProductResult @@ -94,8 +95,8 @@ duplicating the `filter` param in the url sent. duplicateParams is Azure.Core.Foundations.Operation< { @doc("OData filter options. Pass in 'foo'") - @query - $filter: string; + @query("$filter") + $filter?: string; }, ProductResult >; @@ -106,8 +107,8 @@ duplicating the `filter` param in the url sent. pageWithMaxPageSize is Azure.Core.Foundations.Operation< { @doc("Max page size query param. Don't send") - @query - $maxpagesize: "5"; + @query("$maxpagesize") + $maxpagesize?: "5"; }, ProductResult >; @@ -121,7 +122,7 @@ a ProductResult nextOperationWithQueryParams is Azure.Core.Foundations.Operation< { @doc("A constant. Must be True") - @query + @query("queryConstant") queryConstant: true; }, ProductResult @@ -132,18 +133,19 @@ a ProductResult @get getOdataMultiplePages is Azure.Core.Foundations.Operation< { - @header `client-request-id`: string; + @header + `client-request-id`?: string; @doc("Sets the maximum number of items to return in the response.") @header - maxresults: int32; + maxresults?: int32; @doc(""" Sets the maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) @header - timeout: int32; + timeout?: int32 = 30; }, OdataProductResult >; @@ -153,11 +155,12 @@ seconds. The default is 30 seconds. @get getMultiplePagesWithOffset is Azure.Core.Foundations.Operation< { - @header `client-request-id`: string; + @header + `client-request-id`?: string; @doc("Sets the maximum number of items to return in the response.") @header - maxresults: int32; + maxresults?: int32; @doc("Offset of return value") @path @@ -168,7 +171,7 @@ Sets the maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) @header - timeout: int32; + timeout?: int32 = 30; }, ProductResult >; @@ -223,7 +226,7 @@ eventually. getMultiplePagesFragmentNextLink is Azure.Core.Foundations.Operation< { @doc("Sets the api version to use.") - @query + @query("api_version") api_version: string; @doc("Sets the tenant to use.") @@ -242,7 +245,7 @@ parameters grouped getMultiplePagesFragmentWithGroupingNextLink is Azure.Core.Foundations.Operation< { @doc("Sets the api version to use.") - @query + @query("api_version") api_version: string; @doc("Sets the tenant to use.") @@ -257,18 +260,19 @@ parameters grouped @post GetMultiplePagesLRO is Azure.Core.Foundations.Operation< { - @header `client-request-id`: string; + @header + `client-request-id`?: string; @doc("Sets the maximum number of items to return in the response.") @header - maxresults: int32; + maxresults?: int32; @doc(""" Sets the maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. """) @header - timeout: int32; + timeout?: int32 = 30; }, ProductResult >; @@ -296,7 +300,7 @@ version nextFragment is Azure.Core.Foundations.Operation< { @doc("Sets the api version to use.") - @query + @query("api_version") api_version: string; @doc("Sets the tenant to use.") @@ -316,7 +320,7 @@ version nextFragmentWithGrouping is Azure.Core.Foundations.Operation< { @doc("Sets the api version to use.") - @query + @query("api_version") api_version: string; @doc("Sets the tenant to use.") diff --git a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..fb405fa449 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/tspconfig.yaml @@ -0,0 +1,14 @@ +emit: + - "@azure-tools/typespec-autorest" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/qna/qna.md b/packages/extensions/openapi-to-typespec/test/qna/qna.md similarity index 100% rename from packages/extensions/openapi-to-cadl/test/qna/qna.md rename to packages/extensions/openapi-to-typespec/test/qna/qna.md diff --git a/packages/extensions/openapi-to-cadl/test/qna/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp similarity index 91% rename from packages/extensions/openapi-to-cadl/test/qna/tsp-output/main.tsp rename to packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp index d77a1f8147..aa4d487744 100644 --- a/packages/extensions/openapi-to-cadl/test/qna/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp @@ -6,8 +6,8 @@ using TypeSpec.Rest; using TypeSpec.Http; @service({ title: "QnA Maker", - version: "2022-07-01-preview", }) +@versioned(Versions) @server( "{Endpoint}/language", "The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview.", @@ -24,3 +24,8 @@ documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview. """) namespace Azure.Language.QnAMaker; + +@doc("The available API versions.") +enum Versions { + v2022_07_01_preview: "2022-07-01-preview", +} diff --git a/packages/extensions/openapi-to-cadl/test/qna/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp similarity index 98% rename from packages/extensions/openapi-to-cadl/test/qna/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp index 1ca5a845d1..33ff6ee6f3 100644 --- a/packages/extensions/openapi-to-cadl/test/qna/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp @@ -94,6 +94,7 @@ question. userId?: string; @doc("Minimum threshold score for answers, value ranges from 0 to 1.") + @maxValue(1) @projectedName("json", "confidenceScoreThreshold") confidenceThreshold?: float32; @@ -167,10 +168,13 @@ model ShortAnswerOptions { Minimum threshold score required to include an answer span, value ranges from 0 to 1. """) + @maxValue(1) @projectedName("json", "confidenceScoreThreshold") confidenceThreshold?: float32; @doc("Number of Top answers to be considered for span prediction from 1 to 10.") + @maxValue(10) + @minValue(1) @projectedName("json", "topAnswersWithSpan") top?: int32; } @@ -190,6 +194,7 @@ model KnowledgeBaseAnswer { answer?: string; @doc("Answer confidence score, value ranges from 0 to 1.") + @maxValue(1) @projectedName("json", "confidenceScore") confidence?: float32; @@ -236,6 +241,7 @@ model KnowledgeBaseAnswerPrompt { qnaId?: int32; @doc("Text displayed to represent a follow up question prompt.") + @maxLength(200) displayText?: string; } @@ -245,6 +251,7 @@ model AnswerSpan { text?: string; @doc("Predicted score of answer span, value ranges from 0 to 1.") + @maxValue(1) @projectedName("json", "confidenceScore") confidence?: float32; @@ -263,9 +270,7 @@ model ErrorResponse { } @doc("The error object.") -model Error { - ...Record; - +model Error extends Record { @doc("One of a server-defined set of error codes.") code: ErrorCode; @@ -355,6 +360,7 @@ model TextAnswer { answer?: string; @doc("answer confidence score, value ranges from 0 to 1.") + @maxValue(1) @projectedName("json", "confidenceScore") confidence?: float32; diff --git a/packages/extensions/openapi-to-cadl/test/qna/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/routes.tsp similarity index 88% rename from packages/extensions/openapi-to-cadl/test/qna/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/qna/tsp-output/routes.tsp index 5ff0ddd826..953be70dc4 100644 --- a/packages/extensions/openapi-to-cadl/test/qna/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/routes.tsp @@ -15,11 +15,11 @@ interface QuestionAnsweringOperations { GetAnswers is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") - @query + @query("projectName") projectName: string; @doc("The name of the specific deployment of the project to use.") - @query + @query("deploymentName") deploymentName: string; @doc("Post body of the request.") @@ -34,11 +34,7 @@ interface QuestionAnsweringOperations { @route("/:query-text") @post GetAnswersFromText is Azure.Core.Foundations.Operation< - { - @doc("Post body of the request.") - @body - textQueryOptions: AnswersFromTextOptions; - }, + AnswersFromTextOptions, AnswersFromTextResult >; } diff --git a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..fb405fa449 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/tspconfig.yaml @@ -0,0 +1,14 @@ +emit: + - "@azure-tools/typespec-autorest" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/qnaAuthoring/qna.md b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/qna.md similarity index 100% rename from packages/extensions/openapi-to-cadl/test/qnaAuthoring/qna.md rename to packages/extensions/openapi-to-typespec/test/qnaAuthoring/qna.md diff --git a/packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp similarity index 93% rename from packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/main.tsp rename to packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp index 99c9b6ef49..ed4bda7e45 100644 --- a/packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp @@ -6,8 +6,8 @@ using TypeSpec.Rest; using TypeSpec.Http; @service({ title: "Microsoft Cognitive Language Service - Question Answering - Authoring", - version: "2023-04-01", }) +@versioned(Versions) @server( "{Endpoint}/language", "The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview.", @@ -24,3 +24,8 @@ documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview. """) namespace MicrosoftCognitiveLanguageServiceQuestionAnsweringAuthoring; + +@doc("The available API versions.") +enum Versions { + v2023_04_01: "2023-04-01", +} diff --git a/packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp similarity index 98% rename from packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp index cfc4824eb8..438a65866d 100644 --- a/packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp @@ -140,9 +140,7 @@ model ErrorResponse { } @doc("The error object.") -model Error { - ...Record; - +model Error extends Record { @doc("One of a server-defined set of error codes.") code: ErrorCode; @@ -300,12 +298,15 @@ model QnaRecord { id?: int32; @doc("Answer text.") + @maxLength(25000) + @minLength(1) answer?: string; @doc(""" Source from which QnA was indexed e.g. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs . """) + @maxLength(300) source?: string; @doc("List of questions associated with the answer.") @@ -349,6 +350,7 @@ model QnaPrompt { qna?: QnaRecord; @doc("Text displayed to represent a follow up question prompt.") + @maxLength(200) displayText?: string; } @@ -388,6 +390,8 @@ model LastUpdatedDateTimeParameter { model SourceDisplayNameParameter { @doc("Friendly name of the Source.") + @maxLength(200) + @minLength(1) sourceDisplayName?: string; } @@ -419,6 +423,8 @@ model QnaSourceRecord { @doc("Input source file or url details.") model QnaSourceMetadata { @doc("Friendly name of the Source.") + @maxLength(200) + @minLength(1) displayName?: string; @doc(""" diff --git a/packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp similarity index 87% rename from packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp index 68bd0bb9d2..acff066479 100644 --- a/packages/extensions/openapi-to-cadl/test/qnaAuthoring/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp @@ -15,16 +15,16 @@ interface QuestionAnsweringProjectsOperations { ListProjects is Azure.Core.Foundations.Operation< { @doc("The maximum number of resources to return from the collection.") - @query - top: int32; + @query("top") + top?: int32; @doc("An offset into the collection of the first resource to be returned.") - @query - skip: int32; + @query("skip") + skip?: int32; @doc("The maximum number of resources to include in a single response.") - @query - maxpagesize: int32; + @query("maxpagesize") + maxpagesize?: int32; }, ProjectsMetadata >; @@ -36,6 +36,7 @@ interface QuestionAnsweringProjectsOperations { GetProjectDetails is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; }, @@ -49,6 +50,7 @@ interface QuestionAnsweringProjectsOperations { CreateProject is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -66,6 +68,7 @@ interface QuestionAnsweringProjectsOperations { DeleteProject is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; }, @@ -92,16 +95,17 @@ interface QuestionAnsweringProjectsOperations { Export is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @doc("Knowledge base Import or Export format.") - @query - format: Format; + @query("format") + format?: Format = "json"; @doc("Kind of the asset of the project.") - @query - assetKind: AssetKind; + @query("assetKind") + assetKind?: AssetKind; }, ExportJobState | void >; @@ -119,6 +123,7 @@ metadata, and assets. GetExportStatus is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -136,20 +141,21 @@ metadata, and assets. Import is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @doc("Knowledge base Import or Export format.") - @query - format: Format; + @query("format") + format?: Format = "json"; @doc("Kind of the asset of the project.") - @query - assetKind: AssetKind; + @query("assetKind") + assetKind?: AssetKind; @doc("Project assets the needs to be imported.") @body - body: ImportJobOptions; + body?: ImportJobOptions; }, void >; @@ -161,6 +167,7 @@ metadata, and assets. GetImportStatus is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -178,6 +185,7 @@ metadata, and assets. DeployProject is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -195,6 +203,7 @@ metadata, and assets. GetDeployStatus is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -216,20 +225,21 @@ metadata, and assets. ListDeployments is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @doc("The maximum number of resources to return from the collection.") - @query - top: int32; + @query("top") + top?: int32; @doc("An offset into the collection of the first resource to be returned.") - @query - skip: int32; + @query("skip") + skip?: int32; @doc("The maximum number of resources to include in a single response.") - @query - maxpagesize: int32; + @query("maxpagesize") + maxpagesize?: int32; }, ProjectDeployments >; @@ -241,20 +251,21 @@ metadata, and assets. GetSynonyms is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @doc("The maximum number of resources to return from the collection.") - @query - top: int32; + @query("top") + top?: int32; @doc("An offset into the collection of the first resource to be returned.") - @query - skip: int32; + @query("skip") + skip?: int32; @doc("The maximum number of resources to include in a single response.") - @query - maxpagesize: int32; + @query("maxpagesize") + maxpagesize?: int32; }, SynonymAssets >; @@ -266,6 +277,7 @@ metadata, and assets. UpdateSynonyms is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -283,20 +295,21 @@ metadata, and assets. GetSources is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @doc("The maximum number of resources to return from the collection.") - @query - top: int32; + @query("top") + top?: int32; @doc("An offset into the collection of the first resource to be returned.") - @query - skip: int32; + @query("skip") + skip?: int32; @doc("The maximum number of resources to include in a single response.") - @query - maxpagesize: int32; + @query("maxpagesize") + maxpagesize?: int32; }, QnaSources >; @@ -308,6 +321,7 @@ metadata, and assets. UpdateSources is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -325,6 +339,7 @@ metadata, and assets. GetUpdateSourcesStatus is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -342,24 +357,25 @@ metadata, and assets. GetQnas is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @doc("Source of the QnA.") - @query - source: string; + @query("source") + source?: string; @doc("The maximum number of resources to return from the collection.") - @query - top: int32; + @query("top") + top?: int32; @doc("An offset into the collection of the first resource to be returned.") - @query - skip: int32; + @query("skip") + skip?: int32; @doc("The maximum number of resources to include in a single response.") - @query - maxpagesize: int32; + @query("maxpagesize") + maxpagesize?: int32; }, QnaAssets >; @@ -371,6 +387,7 @@ metadata, and assets. UpdateQnas is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -388,6 +405,7 @@ metadata, and assets. GetUpdateQnasStatus is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; @@ -405,6 +423,7 @@ metadata, and assets. AddFeedback is Azure.Core.Foundations.Operation< { @doc("The name of the project to use.") + @maxLength(100) @path projectName: string; diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..fb405fa449 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/tspconfig.yaml @@ -0,0 +1,14 @@ +emit: + - "@azure-tools/typespec-autorest" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/qnaRuntime/qna.md b/packages/extensions/openapi-to-typespec/test/qnaRuntime/qna.md similarity index 100% rename from packages/extensions/openapi-to-cadl/test/qnaRuntime/qna.md rename to packages/extensions/openapi-to-typespec/test/qnaRuntime/qna.md diff --git a/packages/extensions/openapi-to-cadl/test/qnaRuntime/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/main.tsp similarity index 100% rename from packages/extensions/openapi-to-cadl/test/qnaRuntime/tsp-output/main.tsp rename to packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/main.tsp diff --git a/packages/extensions/openapi-to-cadl/test/qnaRuntime/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp similarity index 94% rename from packages/extensions/openapi-to-cadl/test/qnaRuntime/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp index 2e54707aef..5c994f9401 100644 --- a/packages/extensions/openapi-to-cadl/test/qnaRuntime/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp @@ -69,9 +69,7 @@ target=\"blank\">Analytics and Telemetry. } @doc("Context object with previous QnA's information.") -model QueryDTOContext { - ...QueryContextDTO; -} +model QueryDTOContext extends QueryContextDTO {} @doc("Context object with previous QnA's information.") model QueryContextDTO { @@ -85,9 +83,13 @@ model QueryContextDTO { @doc("Name - value pair of metadata.") model MetadataDTO { @doc("Metadata name.") + @maxLength(100) + @minLength(1) name: string; @doc("Metadata value.") + @maxLength(500) + @minLength(1) value: string; } @@ -122,9 +124,7 @@ model QnASearchResult { } @doc("Context object of the QnA") -model QnASearchResultContext { - ...ContextDTO; -} +model QnASearchResultContext extends ContextDTO {} @doc("Context associated with Qna.") model ContextDTO { @@ -156,13 +156,12 @@ ignored. qna?: PromptDTOQna; @doc("Text displayed to represent a follow up question prompt") + @maxLength(200) displayText?: string; } @doc("QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object") -model PromptDTOQna { - ...QnAdto; -} +model PromptDTOQna extends QnAdto {} @doc("Q-A object.") model QnAdto { @@ -170,12 +169,15 @@ model QnAdto { id?: int32; @doc("Answer text") + @maxLength(25000) + @minLength(1) answer: string; @doc(""" Source from which Q-A was indexed. eg. https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs """) + @maxLength(300) source?: string; @doc("List of questions associated with the answer.") @@ -189,9 +191,7 @@ https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs } @doc("Context of a QnA") -model QnAdtoContext { - ...ContextDTO; -} +model QnAdtoContext extends ContextDTO {} @doc(""" Error response. As per Microsoft One API guidelines - @@ -204,9 +204,7 @@ model ErrorResponse { } @doc("The error object.") -model ErrorResponseError { - ...Error; -} +model ErrorResponseError extends Error {} @doc(""" The error object. As per Microsoft One API guidelines - @@ -260,6 +258,7 @@ model FeedbackRecordDTO { userId?: string; @doc("The suggested question being provided as feedback.") + @maxLength(1000) userQuestion?: string; @doc("The qnaId for which the suggested question is provided as feedback.") diff --git a/packages/extensions/openapi-to-cadl/test/qnaRuntime/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/routes.tsp similarity index 100% rename from packages/extensions/openapi-to-cadl/test/qnaRuntime/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/routes.tsp diff --git a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..fb405fa449 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/tspconfig.yaml @@ -0,0 +1,14 @@ +emit: + - "@azure-tools/typespec-autorest" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/schemaRegistry/readme.md b/packages/extensions/openapi-to-typespec/test/schemaRegistry/readme.md similarity index 100% rename from packages/extensions/openapi-to-cadl/test/schemaRegistry/readme.md rename to packages/extensions/openapi-to-typespec/test/schemaRegistry/readme.md diff --git a/packages/extensions/openapi-to-cadl/test/schemaRegistry/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp similarity index 84% rename from packages/extensions/openapi-to-cadl/test/schemaRegistry/tsp-output/main.tsp rename to packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp index ae247c1454..a20ddac094 100644 --- a/packages/extensions/openapi-to-cadl/test/schemaRegistry/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp @@ -6,8 +6,8 @@ using TypeSpec.Rest; using TypeSpec.Http; @service({ title: "Azure Schema Registry", - version: "2021-10", }) +@versioned(Versions) @server( "https://{endpoint}", "Azure Schema Registry is as a central schema repository, with support for versioning, management, compatibility checking, and RBAC.", @@ -20,3 +20,8 @@ Azure Schema Registry is as a central schema repository, with support for versioning, management, compatibility checking, and RBAC. """) namespace AzureSchemaRegistry; + +@doc("The available API versions.") +enum Versions { + v2021_10: "2021-10", +} diff --git a/packages/extensions/openapi-to-cadl/test/schemaRegistry/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/models.tsp similarity index 100% rename from packages/extensions/openapi-to-cadl/test/schemaRegistry/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/models.tsp diff --git a/packages/extensions/openapi-to-cadl/test/schemaRegistry/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/routes.tsp similarity index 92% rename from packages/extensions/openapi-to-cadl/test/schemaRegistry/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/routes.tsp index 36720dda7a..6f3870b6d9 100644 --- a/packages/extensions/openapi-to-cadl/test/schemaRegistry/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/routes.tsp @@ -32,7 +32,7 @@ serialization of schema requested. @doc("Accept header") @header - Accept: "application/json; serialization=Avro"; + accept: "application/json; serialization=Avro"; }, void >; @@ -51,6 +51,8 @@ should match the serialization type specified in the request. groupName: string; @doc("Name of schema.") + @maxLength(50) + @pattern("^[A-Za-z0-9][^\\\\/$:]*$") @path schemaName: string; }, @@ -71,6 +73,8 @@ should match the serialization type specified in the request. groupName: string; @doc("Name of schema.") + @maxLength(50) + @pattern("^[A-Za-z0-9][^\\\\/$:]*$") @path schemaName: string; @@ -98,6 +102,8 @@ should match the serialization type specified in the request. groupName: string; @doc("Name of schema.") + @maxLength(50) + @pattern("^[A-Za-z0-9][^\\\\/$:]*$") @path schemaName: string; @@ -127,6 +133,8 @@ type should match the serialization type specified in the request. groupName: string; @doc("Name of schema.") + @maxLength(50) + @pattern("^[A-Za-z0-9][^\\\\/$:]*$") @path schemaName: string; diff --git a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..fb405fa449 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/tspconfig.yaml @@ -0,0 +1,14 @@ +emit: + - "@azure-tools/typespec-autorest" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/url/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/url/tsp-output/main.tsp similarity index 100% rename from packages/extensions/openapi-to-cadl/test/url/tsp-output/main.tsp rename to packages/extensions/openapi-to-typespec/test/url/tsp-output/main.tsp diff --git a/packages/extensions/openapi-to-cadl/test/url/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/url/tsp-output/models.tsp similarity index 100% rename from packages/extensions/openapi-to-cadl/test/url/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/url/tsp-output/models.tsp diff --git a/packages/extensions/openapi-to-cadl/test/url/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/url/tsp-output/routes.tsp similarity index 89% rename from packages/extensions/openapi-to-cadl/test/url/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/url/tsp-output/routes.tsp index 5ac35b08e1..ad101a5150 100644 --- a/packages/extensions/openapi-to-cadl/test/url/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/url/tsp-output/routes.tsp @@ -356,7 +356,7 @@ interface queriesOperations { getBooleanTrue is Azure.Core.Foundations.Operation< { @doc("true boolean value") - @query + @query("boolQuery") boolQuery: true; }, void @@ -368,7 +368,7 @@ interface queriesOperations { getBooleanFalse is Azure.Core.Foundations.Operation< { @doc("false boolean value") - @query + @query("boolQuery") boolQuery: false; }, void @@ -380,8 +380,8 @@ interface queriesOperations { getBooleanNull is Azure.Core.Foundations.Operation< { @doc("null boolean value") - @query - boolQuery: boolean; + @query("boolQuery") + boolQuery?: boolean; }, void >; @@ -392,7 +392,7 @@ interface queriesOperations { getIntOneMillion is Azure.Core.Foundations.Operation< { @doc("'1000000' integer value") - @query + @query("intQuery") intQuery: 1000000; }, void @@ -404,7 +404,7 @@ interface queriesOperations { getIntNegativeOneMillion is Azure.Core.Foundations.Operation< { @doc("'-1000000' integer value") - @query + @query("intQuery") intQuery: -1000000; }, void @@ -416,8 +416,8 @@ interface queriesOperations { getIntNull is Azure.Core.Foundations.Operation< { @doc("null integer value") - @query - intQuery: int32; + @query("intQuery") + intQuery?: int32; }, void >; @@ -428,7 +428,7 @@ interface queriesOperations { getTenBillion is Azure.Core.Foundations.Operation< { @doc("'10000000000' 64 bit integer value") - @query + @query("longQuery") longQuery: 10000000000; }, void @@ -440,7 +440,7 @@ interface queriesOperations { getNegativeTenBillion is Azure.Core.Foundations.Operation< { @doc("'-10000000000' 64 bit integer value") - @query + @query("longQuery") longQuery: -10000000000; }, void @@ -452,8 +452,8 @@ interface queriesOperations { getLongNull is Azure.Core.Foundations.Operation< { @doc("null 64 bit integer value") - @query - longQuery: int32; + @query("longQuery") + longQuery?: int32; }, void >; @@ -464,7 +464,7 @@ interface queriesOperations { floatScientificPositive is Azure.Core.Foundations.Operation< { @doc("'1.034E+20'numeric value") - @query + @query("floatQuery") floatQuery: 103400000000000000000; }, void @@ -476,7 +476,7 @@ interface queriesOperations { floatScientificNegative is Azure.Core.Foundations.Operation< { @doc("'-1.034E-20'numeric value") - @query + @query("floatQuery") floatQuery: -1.034e-20; }, void @@ -488,8 +488,8 @@ interface queriesOperations { floatNull is Azure.Core.Foundations.Operation< { @doc("null numeric value") - @query - floatQuery: float32; + @query("floatQuery") + floatQuery?: float32; }, void >; @@ -500,7 +500,7 @@ interface queriesOperations { doubleDecimalPositive is Azure.Core.Foundations.Operation< { @doc("'9999999.999'numeric value") - @query + @query("doubleQuery") doubleQuery: 9999999.999; }, void @@ -512,7 +512,7 @@ interface queriesOperations { doubleDecimalNegative is Azure.Core.Foundations.Operation< { @doc("'-9999999.999'numeric value") - @query + @query("doubleQuery") doubleQuery: -9999999.999; }, void @@ -524,8 +524,8 @@ interface queriesOperations { doubleNull is Azure.Core.Foundations.Operation< { @doc("null numeric value") - @query - doubleQuery: float32; + @query("doubleQuery") + doubleQuery?: float32; }, void >; @@ -536,7 +536,7 @@ interface queriesOperations { stringUnicode is Azure.Core.Foundations.Operation< { @doc("'啊齄丂狛狜隣郎隣兀﨩'multi-byte string value") - @query + @query("stringQuery") stringQuery: "啊齄丂狛狜隣郎隣兀﨩"; }, void @@ -548,7 +548,7 @@ interface queriesOperations { stringUrlEncoded is Azure.Core.Foundations.Operation< { @doc("'begin!*'();:@ &=+$,/?#[]end' url encoded string value") - @query + @query("stringQuery") stringQuery: "begin!*'();:@ &=+$,/?#[]end"; }, void @@ -560,7 +560,7 @@ interface queriesOperations { stringEmpty is Azure.Core.Foundations.Operation< { @doc("'' string value") - @query + @query("stringQuery") stringQuery: ""; }, void @@ -572,8 +572,8 @@ interface queriesOperations { stringNull is Azure.Core.Foundations.Operation< { @doc("null string value") - @query - stringQuery: string; + @query("stringQuery") + stringQuery?: string; }, void >; @@ -584,8 +584,8 @@ interface queriesOperations { enumValid is Azure.Core.Foundations.Operation< { @doc("'green color' enum value") - @query - enumQuery: UriColor; + @query("enumQuery") + enumQuery?: UriColor; }, void >; @@ -596,8 +596,8 @@ interface queriesOperations { enumNull is Azure.Core.Foundations.Operation< { @doc("null string value") - @query - enumQuery: UriColor; + @query("enumQuery") + enumQuery?: UriColor; }, void >; @@ -608,8 +608,8 @@ interface queriesOperations { byteMultiByte is Azure.Core.Foundations.Operation< { @doc("'啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array") - @query - byteQuery: bytes; + @query("byteQuery") + byteQuery?: bytes; }, void >; @@ -620,7 +620,7 @@ interface queriesOperations { byteEmpty is Azure.Core.Foundations.Operation< { @doc("'' as byte array") - @query + @query("byteQuery") byteQuery: ""; }, void @@ -632,8 +632,8 @@ interface queriesOperations { byteNull is Azure.Core.Foundations.Operation< { @doc("null as byte array (no query parameters in uri)") - @query - byteQuery: bytes; + @query("byteQuery") + byteQuery?: bytes; }, void >; @@ -644,7 +644,7 @@ interface queriesOperations { DateValid is Azure.Core.Foundations.Operation< { @doc("'2012-01-01' as date") - @query + @query("dateQuery") dateQuery: "2012-01-01"; }, void @@ -656,8 +656,8 @@ interface queriesOperations { DateNull is Azure.Core.Foundations.Operation< { @doc("null as date (no query parameters in uri)") - @query - dateQuery: plainDate; + @query("dateQuery") + dateQuery?: plainDate; }, void >; @@ -668,7 +668,7 @@ interface queriesOperations { DateTimeValid is Azure.Core.Foundations.Operation< { @doc("'2012-01-01T01:01:01Z' as date-time") - @query + @query("dateTimeQuery") dateTimeQuery: "2012-01-01T01:01:01Z"; }, void @@ -680,8 +680,8 @@ interface queriesOperations { DateTimeNull is Azure.Core.Foundations.Operation< { @doc("null as date-time (no query parameters)") - @query - dateTimeQuery: utcDateTime; + @query("dateTimeQuery") + dateTimeQuery?: utcDateTime; }, void >; @@ -698,8 +698,11 @@ Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the csv-array format """) - @query - arrayQuery: string[]; + @query({ + name: "arrayQuery", + format: "csv", + }) + arrayQuery?: string[]; }, void >; @@ -710,8 +713,11 @@ using the csv-array format ArrayStringCsvNull is Azure.Core.Foundations.Operation< { @doc("a null array of string using the csv-array format") - @query - arrayQuery: string[]; + @query({ + name: "arrayQuery", + format: "csv", + }) + arrayQuery?: string[]; }, void >; @@ -722,8 +728,11 @@ using the csv-array format ArrayStringCsvEmpty is Azure.Core.Foundations.Operation< { @doc("an empty array [] of string using the csv-array format") - @query - arrayQuery: string[]; + @query({ + name: "arrayQuery", + format: "csv", + }) + arrayQuery?: string[]; }, void >; @@ -737,8 +746,11 @@ Array query has no defined collection format, should default to csv. Pass in ArrayStringNoCollectionFormatEmpty is Azure.Core.Foundations.Operation< { @doc("Array-typed query parameter. Pass in ['hello', 'nihao', 'bonjour'].") - @query - arrayQuery: string[]; + @query({ + name: "arrayQuery", + format: "csv", + }) + arrayQuery?: string[]; }, void >; @@ -755,8 +767,11 @@ Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the ssv-array format """) - @query - arrayQuery: string[]; + @query({ + name: "arrayQuery", + format: "ssv", + }) + arrayQuery?: string[]; }, void >; @@ -773,8 +788,11 @@ Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the tsv-array format """) - @query - arrayQuery: string[]; + @query({ + name: "arrayQuery", + format: "tsv", + }) + arrayQuery?: string[]; }, void >; @@ -791,8 +809,11 @@ Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] using the pipes-array format """) - @query - arrayQuery: string[]; + @query({ + name: "arrayQuery", + format: "pipes", + }) + arrayQuery?: string[]; }, void >; @@ -814,24 +835,24 @@ pathItemStringQuery='pathItemStringQuery', localStringQuery='localStringQuery' pathItemStringPath: string; @doc("A string value 'pathItemStringQuery' that appears as a query parameter") - @query - pathItemStringQuery: string; + @query("pathItemStringQuery") + pathItemStringQuery?: string; @doc("A string value 'globalItemStringPath' that appears in the path") @path globalStringPath: string; @doc("should contain value null") - @query - globalStringQuery: string; + @query("globalStringQuery") + globalStringQuery?: string; @doc("should contain value 'localStringPath'") @path localStringPath: string; @doc("should contain value 'localStringQuery'") - @query - localStringQuery: string; + @query("localStringQuery") + localStringQuery?: string; }, void >; @@ -851,24 +872,24 @@ localStringQuery='localStringQuery' pathItemStringPath: string; @doc("A string value 'pathItemStringQuery' that appears as a query parameter") - @query - pathItemStringQuery: string; + @query("pathItemStringQuery") + pathItemStringQuery?: string; @doc("A string value 'globalItemStringPath' that appears in the path") @path globalStringPath: string; @doc("should contain value null") - @query - globalStringQuery: string; + @query("globalStringQuery") + globalStringQuery?: string; @doc("should contain value 'localStringPath'") @path localStringPath: string; @doc("should contain value 'localStringQuery'") - @query - localStringQuery: string; + @query("localStringQuery") + localStringQuery?: string; }, void >; @@ -888,24 +909,24 @@ localStringQuery=null pathItemStringPath: string; @doc("A string value 'pathItemStringQuery' that appears as a query parameter") - @query - pathItemStringQuery: string; + @query("pathItemStringQuery") + pathItemStringQuery?: string; @doc("A string value 'globalItemStringPath' that appears in the path") @path globalStringPath: string; @doc("should contain value null") - @query - globalStringQuery: string; + @query("globalStringQuery") + globalStringQuery?: string; @doc("should contain value 'localStringPath'") @path localStringPath: string; @doc("should contain null value") - @query - localStringQuery: string; + @query("localStringQuery") + localStringQuery?: string; }, void >; @@ -925,24 +946,24 @@ localStringQuery=null pathItemStringPath: string; @doc("should contain value null") - @query - pathItemStringQuery: string; + @query("pathItemStringQuery") + pathItemStringQuery?: string; @doc("A string value 'globalItemStringPath' that appears in the path") @path globalStringPath: string; @doc("should contain value null") - @query - globalStringQuery: string; + @query("globalStringQuery") + globalStringQuery?: string; @doc("should contain value 'localStringPath'") @path localStringPath: string; @doc("should contain value null") - @query - localStringQuery: string; + @query("localStringQuery") + localStringQuery?: string; }, void >; diff --git a/packages/extensions/openapi-to-typespec/test/url/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/url/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..fb405fa449 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/url/tsp-output/tspconfig.yaml @@ -0,0 +1,14 @@ +emit: + - "@azure-tools/typespec-autorest" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/test/url/url.json b/packages/extensions/openapi-to-typespec/test/url/url.json similarity index 100% rename from packages/extensions/openapi-to-cadl/test/url/url.json rename to packages/extensions/openapi-to-typespec/test/url/url.json diff --git a/packages/extensions/openapi-to-cadl/test/utils/check-clean-tree.js b/packages/extensions/openapi-to-typespec/test/utils/check-clean-tree.js similarity index 100% rename from packages/extensions/openapi-to-cadl/test/utils/check-clean-tree.js rename to packages/extensions/openapi-to-typespec/test/utils/check-clean-tree.js diff --git a/packages/extensions/openapi-to-cadl/test/utils/generate-cadl.ts b/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts similarity index 83% rename from packages/extensions/openapi-to-cadl/test/utils/generate-cadl.ts rename to packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts index bdeea82e79..8f24e19f00 100644 --- a/packages/extensions/openapi-to-cadl/test/utils/generate-cadl.ts +++ b/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts @@ -4,7 +4,7 @@ import { readdir } from "fs/promises"; import { join, dirname, extname, resolve } from "path"; import { resolveProject } from "./resolve-root"; -export async function generateCadl(repoRoot: string, folder: string, debug = false) { +export async function generateTypespec(repoRoot: string, folder: string, debug = false) { const { path: root } = await resolveProject(__dirname); const path = join(root, "test", folder); const dir = await readdir(path); @@ -12,9 +12,9 @@ export async function generateCadl(repoRoot: string, folder: string, debug = fal throw new Error(`No files found in ${path}`); } - const firstSwagger = dir.find( - (f) => f.endsWith(".json") || f.endsWith(".yaml") || f.endsWith(".yml") || f.endsWith(".md"), - ); + const firstSwagger = dir + .filter((d) => d !== "resources.json") + .find((f) => f.endsWith(".json") || f.endsWith(".yaml") || f.endsWith(".yml") || f.endsWith(".md")); if (!firstSwagger) { throw new Error("No swagger file found"); @@ -36,12 +36,12 @@ function generate(root: string, path: string, debug = false) { const args = [ resolve(root, "packages/apps/autorest/entrypoints/app.js"), - "--openapi-to-cadl", + "--openapi-to-typespec", inputFile, "--use=.", `--output-folder=${dirname(path)}`, "--src-path=tsp-output", - ...(debug ? ["--openapi-to-cadl.debugger"] : []), + ...(debug ? ["--openapi-to-typespec.debugger"] : []), ...(overrideGuess ? ["--guessResourceKey=false"] : ["--guessResourceKey=true"]), ]; const spawn = spawnSync("node", args, { stdio: "inherit" }); @@ -64,7 +64,7 @@ async function main() { for (const folder of folders) { try { - await generateCadl(repoRoot, folder, debug); + await generateTypespec(repoRoot, folder, debug); } catch (e) { throw new Error(`Failed to generate ${folder}, error:\n${e}`); } diff --git a/packages/extensions/openapi-to-cadl/test/utils/printer.ts b/packages/extensions/openapi-to-typespec/test/utils/printer.ts similarity index 100% rename from packages/extensions/openapi-to-cadl/test/utils/printer.ts rename to packages/extensions/openapi-to-typespec/test/utils/printer.ts diff --git a/packages/extensions/openapi-to-cadl/test/utils/resolve-root.ts b/packages/extensions/openapi-to-typespec/test/utils/resolve-root.ts similarity index 100% rename from packages/extensions/openapi-to-cadl/test/utils/resolve-root.ts rename to packages/extensions/openapi-to-typespec/test/utils/resolve-root.ts diff --git a/packages/extensions/openapi-to-cadl/test/webpubsub/readme.md b/packages/extensions/openapi-to-typespec/test/webpubsub/readme.md similarity index 100% rename from packages/extensions/openapi-to-cadl/test/webpubsub/readme.md rename to packages/extensions/openapi-to-typespec/test/webpubsub/readme.md diff --git a/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp similarity index 79% rename from packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/main.tsp rename to packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp index 19882f026d..aeb92da4b1 100644 --- a/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp @@ -6,8 +6,8 @@ using TypeSpec.Rest; using TypeSpec.Http; @service({ title: "Azure Web PubSub Service REST API", - version: "2023-07-01", }) +@versioned(Versions) @server( "{endpoint}", "// FIXME: (miissing-service-description) Add service description", @@ -17,3 +17,8 @@ using TypeSpec.Http; ) @doc("// FIXME: (miissing-service-description) Add service description") namespace AzureWebPubSubServiceRESTAPI; + +@doc("The available API versions.") +enum Versions { + v2023_07_01: "2023-07-01", +} diff --git a/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp similarity index 100% rename from packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/models.tsp rename to packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp diff --git a/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/routes.tsp similarity index 81% rename from packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/routes.tsp rename to packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/routes.tsp index a7b9eb4882..1785bd9f5c 100644 --- a/packages/extensions/openapi-to-cadl/test/webpubsub/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/routes.tsp @@ -26,6 +26,7 @@ interface WebPubSubOperations { Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @@ -46,16 +47,20 @@ alpha-numeric characters or underscore. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("Exclude these connectionIds when closing the connections in the hub.") - @query - excluded: string[]; + @query({ + name: "excluded", + format: "multi", + }) + excluded?: string[]; @doc("The reason closing the client connection.") - @query - reason: string; + @query("reason") + reason?: string; }, void >; @@ -70,28 +75,36 @@ alpha-numeric characters or underscore. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("User Id.") - @query - userId: string; + @query("userId") + userId?: string; @doc("Roles that the connection with the generated token will have.") - @query - role: string[]; + @query({ + name: "role", + format: "multi", + }) + role?: string[]; @doc("The expire time of the generated token.") - @query - minutesToExpire: int32; + @minValue(1) + @query("minutesToExpire") + minutesToExpire?: int32 = 60; @doc("Groups that the connection will join when it connects.") - @query - group: string[]; + @query({ + name: "group", + format: "multi", + }) + group?: string[]; @doc("Accept header") @header - Accept: "application/json, text/json"; + accept: "application/json, text/json"; }, ClientTokenResponse >; @@ -106,6 +119,7 @@ alpha-numeric characters or underscore. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @@ -126,19 +140,23 @@ alpha-numeric characters or underscore. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("Excluded connection Ids.") - @query - excluded: string[]; + @query({ + name: "excluded", + format: "multi", + }) + excluded?: string[]; @doc(""" Following OData filter syntax to filter out the subscribers receiving the messages. """) - @query - filter: string; + @query("filter") + filter?: string; @doc(""" The time-to-live (TTL) value in seconds for messages sent to the service. 0 is @@ -147,12 +165,13 @@ value. If this parameter is non-zero, messages that are not consumed by the client within the specified TTL will be dropped by the service. This parameter can help when the client's bandwidth is limited. """) - @query - messageTtlSeconds: int32; + @maxValue(300) + @query("messageTtlSeconds") + messageTtlSeconds?: int32; @doc("Upload file type") @header - `Content-Type`: ContentType; + `content-type`: ContentType; @doc("The payload body.") @body @@ -171,16 +190,18 @@ can help when the client's bandwidth is limited. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("Target connection Id.") + @minLength(1) @path connectionId: string; @doc("The reason closing the client connection.") - @query - reason: string; + @query("reason") + reason?: string; }, void >; @@ -195,10 +216,12 @@ alpha-numeric characters or underscore. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("The connection Id.") + @minLength(1) @path connectionId: string; }, @@ -215,10 +238,12 @@ alpha-numeric characters or underscore. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("The connection Id.") + @minLength(1) @path connectionId: string; @@ -229,12 +254,13 @@ value. If this parameter is non-zero, messages that are not consumed by the client within the specified TTL will be dropped by the service. This parameter can help when the client's bandwidth is limited. """) - @query - messageTtlSeconds: int32; + @maxValue(300) + @query("messageTtlSeconds") + messageTtlSeconds?: int32; @doc("Upload file type") @header - `Content-Type`: ContentType; + `content-type`: ContentType; @doc("The payload body.") @body @@ -253,10 +279,12 @@ can help when the client's bandwidth is limited. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("Target connection Id.") + @minLength(1) @path connectionId: string; }, @@ -273,10 +301,14 @@ alpha-numeric characters or underscore. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("Target group name, which length should be greater than 0 and less than 1025.") + @maxLength(1024) + @minLength(1) + @pattern("^(?!\\s+$).+$") @path group: string; }, @@ -293,20 +325,27 @@ alpha-numeric characters or underscore. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("Target group name, which length should be greater than 0 and less than 1025.") + @maxLength(1024) + @minLength(1) + @pattern("^(?!\\s+$).+$") @path group: string; @doc("Exclude these connectionIds when closing the connections in the group.") - @query - excluded: string[]; + @query({ + name: "excluded", + format: "multi", + }) + excluded?: string[]; @doc("The reason closing the client connection.") - @query - reason: string; + @query("reason") + reason?: string; }, void >; @@ -321,23 +360,30 @@ alpha-numeric characters or underscore. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("Target group name, which length should be greater than 0 and less than 1025.") + @maxLength(1024) + @minLength(1) + @pattern("^(?!\\s+$).+$") @path group: string; @doc("Excluded connection Ids") - @query - excluded: string[]; + @query({ + name: "excluded", + format: "multi", + }) + excluded?: string[]; @doc(""" Following OData filter syntax to filter out the subscribers receiving the messages. """) - @query - filter: string; + @query("filter") + filter?: string; @doc(""" The time-to-live (TTL) value in seconds for messages sent to the service. 0 is @@ -346,12 +392,13 @@ value. If this parameter is non-zero, messages that are not consumed by the client within the specified TTL will be dropped by the service. This parameter can help when the client's bandwidth is limited. """) - @query - messageTtlSeconds: int32; + @maxValue(300) + @query("messageTtlSeconds") + messageTtlSeconds?: int32; @doc("Upload file type") @header - `Content-Type`: ContentType; + `content-type`: ContentType; @doc("The payload body.") @body @@ -370,14 +417,19 @@ can help when the client's bandwidth is limited. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("Target group name, which length should be greater than 0 and less than 1025.") + @maxLength(1024) + @minLength(1) + @pattern("^(?!\\s+$).+$") @path group: string; @doc("Target connection Id.") + @minLength(1) @path connectionId: string; }, @@ -394,14 +446,19 @@ alpha-numeric characters or underscore. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("Target group name, which length should be greater than 0 and less than 1025.") + @maxLength(1024) + @minLength(1) + @pattern("^(?!\\s+$).+$") @path group: string; @doc("Target connection Id") + @minLength(1) @path connectionId: string; }, @@ -418,6 +475,7 @@ alpha-numeric characters or underscore. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @@ -426,6 +484,7 @@ alpha-numeric characters or underscore. permission: WebPubSubPermission; @doc("Target connection Id.") + @minLength(1) @path connectionId: string; @@ -434,8 +493,8 @@ The meaning of the target depends on the specific permission. For joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name. """) - @query - targetName: string; + @query("targetName") + targetName?: string; }, void >; @@ -450,6 +509,7 @@ the group name. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @@ -458,6 +518,7 @@ alpha-numeric characters or underscore. permission: WebPubSubPermission; @doc("Target connection Id.") + @minLength(1) @path connectionId: string; @@ -466,8 +527,8 @@ The meaning of the target depends on the specific permission. For joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name. """) - @query - targetName: string; + @query("targetName") + targetName?: string; }, void >; @@ -482,6 +543,7 @@ the group name. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @@ -490,6 +552,7 @@ alpha-numeric characters or underscore. permission: WebPubSubPermission; @doc("Target connection Id.") + @minLength(1) @path connectionId: string; @@ -498,8 +561,8 @@ The meaning of the target depends on the specific permission. For joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name. """) - @query - targetName: string; + @query("targetName") + targetName?: string; }, void >; @@ -514,10 +577,12 @@ the group name. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("Target user Id.") + @minLength(1) @path userId: string; }, @@ -534,20 +599,25 @@ alpha-numeric characters or underscore. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("The user Id.") + @minLength(1) @path userId: string; @doc("Exclude these connectionIds when closing the connections for the user.") - @query - excluded: string[]; + @query({ + name: "excluded", + format: "multi", + }) + excluded?: string[]; @doc("The reason closing the client connection.") - @query - reason: string; + @query("reason") + reason?: string; }, void >; @@ -562,10 +632,12 @@ alpha-numeric characters or underscore. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("The user Id.") + @minLength(1) @path userId: string; @@ -573,8 +645,8 @@ alpha-numeric characters or underscore. Following OData filter syntax to filter out the subscribers receiving the messages. """) - @query - filter: string; + @query("filter") + filter?: string; @doc(""" The time-to-live (TTL) value in seconds for messages sent to the service. 0 is @@ -583,12 +655,13 @@ value. If this parameter is non-zero, messages that are not consumed by the client within the specified TTL will be dropped by the service. This parameter can help when the client's bandwidth is limited. """) - @query - messageTtlSeconds: int32; + @maxValue(300) + @query("messageTtlSeconds") + messageTtlSeconds?: int32; @doc("Upload file type") @header - `Content-Type`: ContentType; + `content-type`: ContentType; @doc("The payload body.") @body @@ -607,10 +680,12 @@ can help when the client's bandwidth is limited. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("Target user Id.") + @minLength(1) @path userId: string; }, @@ -627,14 +702,19 @@ alpha-numeric characters or underscore. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("Target group name, which length should be greater than 0 and less than 1025.") + @maxLength(1024) + @minLength(1) + @pattern("^(?!\\s+$).+$") @path group: string; @doc("Target user Id.") + @minLength(1) @path userId: string; }, @@ -651,14 +731,19 @@ alpha-numeric characters or underscore. Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. """) + @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; @doc("Target group name, which length should be greater than 0 and less than 1025.") + @maxLength(1024) + @minLength(1) + @pattern("^(?!\\s+$).+$") @path group: string; @doc("Target user Id.") + @minLength(1) @path userId: string; }, diff --git a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..fb405fa449 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/tspconfig.yaml @@ -0,0 +1,14 @@ +emit: + - "@azure-tools/typespec-autorest" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true diff --git a/packages/extensions/openapi-to-cadl/tsconfig.build.json b/packages/extensions/openapi-to-typespec/tsconfig.build.json similarity index 100% rename from packages/extensions/openapi-to-cadl/tsconfig.build.json rename to packages/extensions/openapi-to-typespec/tsconfig.build.json diff --git a/packages/extensions/openapi-to-cadl/tsconfig.json b/packages/extensions/openapi-to-typespec/tsconfig.json similarity index 100% rename from packages/extensions/openapi-to-cadl/tsconfig.json rename to packages/extensions/openapi-to-typespec/tsconfig.json diff --git a/packages/extensions/openapi-to-cadl/webpack.config.js b/packages/extensions/openapi-to-typespec/webpack.config.js similarity index 100% rename from packages/extensions/openapi-to-cadl/webpack.config.js rename to packages/extensions/openapi-to-typespec/webpack.config.js diff --git a/packages/libs/configuration/resources/default-configuration.md b/packages/libs/configuration/resources/default-configuration.md index aa28e3ce13..2a050211bd 100644 --- a/packages/libs/configuration/resources/default-configuration.md +++ b/packages/libs/configuration/resources/default-configuration.md @@ -30,7 +30,7 @@ require: - $(this-folder)plugin-az.md - $(this-folder)plugin-terraform.md - $(this-folder)plugin-azure-functions.md - - $(this-folder)plugin-openapi-to-cadl.md + - $(this-folder)plugin-openapi-to-typespec.md - $(this-folder)graphs.md - $(this-folder)help-configuration.md diff --git a/packages/libs/configuration/resources/plugin-openapi-to-cadl.md b/packages/libs/configuration/resources/plugin-openapi-to-cadl.md deleted file mode 100644 index 347fbb0623..0000000000 --- a/packages/libs/configuration/resources/plugin-openapi-to-cadl.md +++ /dev/null @@ -1,11 +0,0 @@ -# Default Configuration - TypeScript - -The V3 version of the Typescript Generator. - -```yaml $(openapi-to-cadl) && !$(legacy) && !$(v2) -version: ^3.7.0 - -use-extension: - "@autorest/openapi-to-cadl": "latest" -try-require: ./readme.openapi-to-cadl.md -``` diff --git a/packages/libs/configuration/resources/plugin-openapi-to-typespec.md b/packages/libs/configuration/resources/plugin-openapi-to-typespec.md new file mode 100644 index 0000000000..b178cc7a98 --- /dev/null +++ b/packages/libs/configuration/resources/plugin-openapi-to-typespec.md @@ -0,0 +1,11 @@ +# Default Configuration - TypeScript + +The V3 version of the Typescript Generator. + +```yaml $(openapi-to-typespec) && !$(legacy) && !$(v2) +version: ^3.7.0 + +use-extension: + "@autorest/openapi-to-typespec": "latest" +try-require: ./readme.openapi-to-typespec.md +``` diff --git a/rush.json b/rush.json index 8738f92d92..e1a6b3bd84 100644 --- a/rush.json +++ b/rush.json @@ -160,8 +160,8 @@ "shouldPublish": true }, { - "packageName": "@autorest/openapi-to-cadl", - "projectFolder": "packages/extensions/openapi-to-cadl", + "packageName": "@autorest/openapi-to-typespec", + "projectFolder": "packages/extensions/openapi-to-typespec", "reviewCategory": "production", "shouldPublish": true } From a4ebf162cfd33784767e3df7473f24b7d20e1379 Mon Sep 17 00:00:00 2001 From: Chenjie Shi Date: Thu, 11 Jan 2024 17:48:50 +0800 Subject: [PATCH 10/33] Converter issue fix (#4851) 1. fix discriminator finding logic: previous exit logic for recursion is wrong 2. refine TSP build-in model filtering logic: add all special models and also add build-in namespace to models.tsp to resolve some compiling error 3. fix number enum naming issue 4. change to always use custom patch 5. replace response model for normal operation to fix missing model ref compiling error 6. fix enum default value compiling error 7. ~remove `@path` for resource key~ 8. resolve operation id collision problem 9. fix multi-layer singleton resource with duplicate key issue 10. fix singleton resource base parameter calculation issue 11. refine operaion id logic and add example conversion 12. add basic global check name availability operation 13. fix enum doc missing issue 14. add lro header support --- .prettierignore | 3 +- .../fix_converter_2024-01-08-09-46.json | 10 + common/config/rush/pnpm-lock.yaml | 38 +- .../openapi-to-typespec/convert.ps1 | 6 +- .../openapi-to-typespec/package.json | 3 +- .../src/emiters/emit-arm-resources.ts | 17 +- .../src/generate/generate-arm-resource.ts | 126 +- .../src/generate/generate-enums.ts | 4 +- .../src/generate/generate-operations.ts | 4 +- .../src/generate/generate-parameter.ts | 4 +- .../generate/generate-service-information.ts | 32 +- .../openapi-to-typespec/src/interfaces.ts | 12 +- .../openapi-to-typespec/src/model.ts | 6 +- .../src/transforms/transform-arm-resources.ts | 218 +- .../src/transforms/transform-choices.ts | 2 +- .../src/transforms/transform-object.ts | 4 +- .../src/transforms/transform-operations.ts | 3 +- .../transform-service-information.ts | 16 +- .../src/utils/decorators.ts | 3 +- .../src/utils/discriminator.ts | 14 +- .../openapi-to-typespec/src/utils/imports.ts | 10 +- .../src/utils/model-generation.ts | 4 +- .../src/utils/resource-discovery.ts | 44 +- .../openapi-to-typespec/src/utils/values.ts | 26 + .../test/analyzeText/tsp-output/main.tsp | 1 + .../test/analyzeText/tsp-output/models.tsp | 2 + .../anomalyDetector/tsp-output/models.tsp | 38 +- .../arm-agrifood/tsp-output/DataConnector.tsp | 5 + .../tsp-output/DataManagerForAgriculture.tsp | 27 +- .../DataManagerForAgricultureExtension.tsp | 3 + .../DataManagerForAgricultureSolution.tsp | 9 +- .../arm-agrifood/tsp-output/Extension.tsp | 5 + .../tsp-output/PrivateEndpointConnection.tsp | 11 +- .../tsp-output/PrivateLinkResource.tsp | 3 + .../test/arm-agrifood/tsp-output/Solution.tsp | 5 + .../DataConnectors_CreateOrUpdate.json | 69 + .../DataConnectors_Delete.json | 21 + .../DataConnectors_Get.json | 40 + .../DataConnectors_List.json | 69 + ...taManagerForAgricultureExtensions_Get.json | 245 + ...aManagerForAgricultureExtensions_List.json | 250 + ...orAgricultureResources_CreateOrUpdate.json | 67 + ...ManagerForAgricultureResources_Delete.json | 14 + ...ataManagerForAgricultureResources_Get.json | 36 + ...icultureResources_ListByResourceGroup.json | 40 + ...ricultureResources_ListBySubscription.json | 39 + ...ManagerForAgricultureResources_Update.json | 69 + .../Extensions_CreateOrUpdate.json | 48 + .../2023-06-01-preview/Extensions_Delete.json | 15 + .../2023-06-01-preview/Extensions_Get.json | 40 + ...sions_ListByDataManagerForAgriculture.json | 39 + ...ateEndpointConnections_CreateOrUpdate.json | 59 + .../PrivateEndpointConnections_Delete.json | 20 + .../PrivateEndpointConnections_Get.json | 39 + ...ateEndpointConnections_ListByResource.json | 50 + .../PrivateLinkResources_Get.json | 37 + .../PrivateLinkResources_ListByResource.json | 32 + .../SolutionsDiscoverability_Get.json | 776 ++ .../SolutionsDiscoverability_List.json | 778 ++ .../Solutions_CreateOrUpdate.json | 80 + .../2023-06-01-preview/Solutions_Delete.json | 15 + .../2023-06-01-preview/Solutions_Get.json | 41 + .../2023-06-01-preview/Solutions_List.json | 44 + .../test/arm-agrifood/tsp-output/main.tsp | 1 + .../test/arm-agrifood/tsp-output/models.tsp | 53 + .../test/arm-agrifood/tsp-output/routes.tsp | 2 + .../arm-alertsmanagement/alertsmanagement.md | 133 + .../test/arm-alertsmanagement/resources.json | 253 + .../arm-alertsmanagement/tsp-output/Alert.tsp | 136 + .../tsp-output/AlertProcessingRule.tsp | 42 + .../tsp-output/SmartGroup.tsp | 112 + ...ActionGroupToAllAlertsInASubscription.json | 95 + ...lSev0AndSev1AlertsInTwoResourceGroups.json | 131 + ...000AtASpecificDatePacificStandardTime.json | 101 + ...scriptionComingFromASpecificAlertRule.json | 113 + ...0_0400EverySatAndSunIndiaStandardTime.json | 158 + ...MonFri_09_00_17_00EasternStandardTime.json | 137 + .../AlertProcessingRules_Delete.json | 14 + .../AlertProcessingRules_GetByName.json | 98 + ...rtProcessingRules_ListByResourceGroup.json | 137 + ...ertProcessingRules_ListBySubscription.json | 128 + .../AlertProcessingRules_Update.json | 94 + .../2021-08-08/Alerts_ChangeState.json | 49 + .../examples/2021-08-08/Alerts_GetAll.json | 81 + .../examples/2021-08-08/Alerts_GetById.json | 45 + .../2021-08-08/Alerts_GetHistory.json | 41 + .../2021-08-08/SmartGroups_ChangeState.json | 76 + .../2021-08-08/SmartGroups_GetAll.json | 147 + .../2021-08-08/SmartGroups_GetById.json | 72 + .../2021-08-08/SmartGroups_GetHistory.json | 32 + .../arm-alertsmanagement/tsp-output/main.tsp | 37 + .../tsp-output/models.tsp | 708 ++ .../tsp-output/tspconfig.yaml | 11 + .../arm-analysisservices/analysisservices.md | 100 + .../test/arm-analysisservices/resources.json | 172 + .../tsp-output/AnalysisServicesServer.tsp | 128 + .../Servers_CheckNameAvailability.json | 21 + .../examples/2017-08-01/Servers_Create.json | 112 + .../examples/2017-08-01/Servers_Delete.json | 23 + .../2017-08-01/Servers_DissociateGateway.json | 15 + .../2017-08-01/Servers_GetDetails.json | 38 + .../examples/2017-08-01/Servers_List.json | 63 + .../Servers_ListByResourceGroup.json | 64 + .../2017-08-01/Servers_ListGatewayStatus.json | 18 + .../Servers_ListSkusForExisting.json | 61 + .../2017-08-01/Servers_ListSkusForNew.json | 41 + .../examples/2017-08-01/Servers_Resume.json | 20 + .../examples/2017-08-01/Servers_Suspend.json | 20 + .../examples/2017-08-01/Servers_Update.json | 84 + .../arm-analysisservices/tsp-output/main.tsp | 28 + .../tsp-output/models.tsp | 338 + .../tsp-output/tspconfig.yaml | 11 + .../tsp-output/AccessInformationContract.tsp | 39 +- .../tsp-output/ApiContract.tsp | 48 +- .../ApiManagementServiceResource.tsp | 263 +- .../tsp-output/ApiReleaseContract.tsp | 25 +- .../tsp-output/ApiVersionSetContract.tsp | 25 +- .../AuthorizationServerContract.tsp | 28 +- .../tsp-output/BackendContract.tsp | 28 +- .../tsp-output/CacheContract.tsp | 25 +- .../tsp-output/CertificateContract.tsp | 21 +- .../tsp-output/DeletedServiceContract.tsp | 18 +- .../tsp-output/DiagnosticContract.tsp | 25 +- .../tsp-output/EmailTemplateContract.tsp | 25 +- .../GatewayCertificateAuthorityContract.tsp | 18 +- .../tsp-output/GatewayContract.tsp | 40 +- .../GatewayHostnameConfigurationContract.tsp | 18 +- .../tsp-output/GlobalSchemaContract.tsp | 21 +- .../tsp-output/GroupContract.tsp | 31 +- .../tsp-output/IdentityProviderContract.tsp | 28 +- .../tsp-output/IssueAttachmentContract.tsp | 18 +- .../tsp-output/IssueCommentContract.tsp | 18 +- .../tsp-output/IssueContract.tsp | 25 +- .../tsp-output/LoggerContract.tsp | 25 +- .../tsp-output/NamedValueContract.tsp | 41 +- .../tsp-output/NotificationContract.tsp | 24 +- .../OpenidConnectProviderContract.tsp | 25 +- .../tsp-output/OperationContract.tsp | 25 +- .../tsp-output/PolicyContract.tsp | 20 +- .../tsp-output/PortalDelegationSettings.tsp | 36 +- .../tsp-output/PortalRevisionContract.tsp | 31 +- .../tsp-output/PortalSigninSettings.tsp | 27 +- .../tsp-output/PortalSignupSettings.tsp | 27 +- .../tsp-output/PrivateEndpointConnection.tsp | 15 +- .../tsp-output/PrivateLinkResource.tsp | 9 +- .../tsp-output/ProductContract.tsp | 45 +- .../tsp-output/SchemaContract.tsp | 21 +- .../tsp-output/SubscriptionContract.tsp | 34 +- .../tsp-output/TagContract.tsp | 18 +- .../tsp-output/TagDescriptionContract.tsp | 18 +- .../tsp-output/TenantSettingsContract.tsp | 9 +- .../tsp-output/UserContract.tsp | 50 +- .../ApiDiagnostic_CreateOrUpdate.json | 162 + .../2021-08-01/ApiDiagnostic_Delete.json | 17 + .../2021-08-01/ApiDiagnostic_Get.json | 59 + .../ApiDiagnostic_GetEntityTag.json | 19 + .../ApiDiagnostic_ListByService.json | 63 + .../2021-08-01/ApiDiagnostic_Update.json | 106 + .../ApiIssueAttachment_CreateOrUpdate.json | 46 + .../2021-08-01/ApiIssueAttachment_Delete.json | 18 + .../2021-08-01/ApiIssueAttachment_Get.json | 27 + .../ApiIssueAttachment_GetEntityTag.json | 20 + .../ApiIssueAttachment_ListByService.json | 32 + .../ApiIssueComment_CreateOrUpdate.json | 46 + .../2021-08-01/ApiIssueComment_Delete.json | 18 + .../2021-08-01/ApiIssueComment_Get.json | 27 + .../ApiIssueComment_GetEntityTag.json | 20 + .../ApiIssueComment_ListByService.json | 32 + .../2021-08-01/ApiIssue_CreateOrUpdate.json | 51 + .../examples/2021-08-01/ApiIssue_Delete.json | 17 + .../examples/2021-08-01/ApiIssue_Get.json | 29 + .../2021-08-01/ApiIssue_GetEntityTag.json | 19 + .../2021-08-01/ApiIssue_ListByService.json | 34 + .../examples/2021-08-01/ApiIssue_Update.json | 35 + ...Skus_ApiManagementListSkUsConsumption.json | 26 + ...ceSkus_ApiManagementListSkUsDedicated.json | 79 + ...vice_ApplyNetworkConfigurationUpdates.json | 55 + ...ckup_ApiManagementBackupWithAccessKey.json | 129 + ...gementBackupWithSystemManagedIdentity.json | 99 + ...BackupWithUserAssignedManagedIdentity.json | 100 + ...nagementService_CheckNameAvailability.json | 21 + ...eMultiRegionServiceWithCustomHostname.json | 258 + ...teOrUpdate_ApiManagementCreateService.json | 143 + ...e_ApiManagementCreateServiceHavingMsi.json | 139 + ...gementCreateServiceInVnetWithPublicIp.json | 171 + ...ate_ApiManagementCreateServiceInZones.json | 158 + ...eateServiceWithCustomHostnameKeyVault.json | 284 + ...ntCreateServiceWithSystemCertificates.json | 175 + ...CreateServiceWithUserAssignedIdentity.json | 158 + ..._CreateOrUpdate_ApiManagementUndelete.json | 115 + .../ApiManagementService_Delete.json | 62 + .../ApiManagementService_GetSsoToken.json | 17 + ...mentServiceGetMultiRegionInternalVnet.json | 102 + ...ce_Get_ApiManagementServiceGetService.json | 168 + ...iManagementServiceGetServiceHavingMsi.json | 91 + .../2021-08-01/ApiManagementService_List.json | 357 + ...ManagementService_ListByResourceGroup.json | 358 + .../ApiManagementService_Restore.json | 129 + ...piManagementUpdateServiceDisableTls10.json | 94 + ...nagementUpdateServicePublisherDetails.json | 93 + ...eServiceToNewVnetAndAvailabilityZones.json | 163 + .../ApiOperationPolicy_CreateOrUpdate.json | 42 + .../2021-08-01/ApiOperationPolicy_Delete.json | 18 + .../2021-08-01/ApiOperationPolicy_Get.json | 25 + .../ApiOperationPolicy_GetEntityTag.json | 20 + .../ApiOperationPolicy_ListByOperation.json | 30 + .../ApiOperation_CreateOrUpdate.json | 132 + .../2021-08-01/ApiOperation_Delete.json | 17 + .../2021-08-01/ApiOperation_GetEntityTag.json | 19 + ...tion_Get_ApiManagementGetApiOperation.json | 53 + ..._ApiManagementGetApiOperationPetStore.json | 93 + .../2021-08-01/ApiOperation_ListByApi.json | 72 + .../2021-08-01/ApiOperation_Update.json | 90 + .../2021-08-01/ApiProduct_ListByApis.json | 34 + .../2021-08-01/ApiRelease_CreateOrUpdate.json | 46 + .../2021-08-01/ApiRelease_Delete.json | 17 + .../examples/2021-08-01/ApiRelease_Get.json | 27 + .../2021-08-01/ApiRelease_GetEntityTag.json | 19 + .../2021-08-01/ApiRelease_ListByService.json | 31 + .../2021-08-01/ApiRelease_Update.json | 34 + .../2021-08-01/ApiRevision_ListByService.json | 29 + .../2021-08-01/ApiSchema_CreateOrUpdate.json | 53 + .../examples/2021-08-01/ApiSchema_Delete.json | 17 + .../examples/2021-08-01/ApiSchema_Get.json | 27 + .../2021-08-01/ApiSchema_GetEntityTag.json | 19 + .../2021-08-01/ApiSchema_ListByApi.json | 29 + .../ApiTagDescription_CreateOrUpdate.json | 49 + .../2021-08-01/ApiTagDescription_Delete.json | 17 + .../2021-08-01/ApiTagDescription_Get.json | 28 + .../ApiTagDescription_GetEntityTag.json | 19 + .../ApiTagDescription_ListByService.json | 32 + .../ApiVersionSet_CreateOrUpdate.json | 44 + .../2021-08-01/ApiVersionSet_Delete.json | 16 + .../2021-08-01/ApiVersionSet_Get.json | 25 + .../ApiVersionSet_GetEntityTag.json | 18 + .../ApiVersionSet_ListByService.json | 40 + .../2021-08-01/ApiVersionSet_Update.json | 33 + ...CreateOrUpdate_ApiManagementCreateApi.json | 100 + ...eOrUpdate_ApiManagementCreateApiClone.json | 81 + ...ntCreateApiNewVersionUsingExistingApi.json | 97 + ...ementCreateApiRevisionFromExistingApi.json | 70 + ...reateApiUsingImportOverrideServiceUrl.json | 70 + ...ApiManagementCreateApiUsingOai3Import.json | 67 + ...ManagementCreateApiUsingSwaggerImport.json | 69 + ...ApiManagementCreateApiUsingWadlImport.json | 69 + ...iManagementCreateApiWithOpenIdConnect.json | 101 + ...rUpdate_ApiManagementCreateGraphQlApi.json | 77 + ...eateSoapPassThroughApiUsingWsdlImport.json | 74 + ...entCreateSoapToRestApiUsingWsdlImport.json | 71 + ...pdate_ApiManagementCreateWebSocketApi.json | 77 + .../examples/2021-08-01/Api_Delete.json | 16 + .../examples/2021-08-01/Api_GetEntityTag.json | 18 + .../Api_Get_ApiManagementGetApiContract.json | 36 + ...t_ApiManagementGetApiRevisionContract.json | 34 + .../2021-08-01/Api_ListByService.json | 84 + .../examples/2021-08-01/Api_ListByTags.json | 33 + .../examples/2021-08-01/Api_Update.json | 43 + .../AuthorizationServer_CreateOrUpdate.json | 96 + .../AuthorizationServer_Delete.json | 16 + .../2021-08-01/AuthorizationServer_Get.json | 45 + .../AuthorizationServer_GetEntityTag.json | 18 + .../AuthorizationServer_ListByService.json | 76 + .../AuthorizationServer_ListSecrets.json | 20 + .../AuthorizationServer_Update.json | 52 + ...piManagementCreateBackendProxyBackend.json | 128 + ...iManagementCreateBackendServiceFabric.json | 89 + .../examples/2021-08-01/Backend_Delete.json | 16 + .../examples/2021-08-01/Backend_Get.json | 40 + .../2021-08-01/Backend_GetEntityTag.json | 18 + .../2021-08-01/Backend_ListByService.json | 83 + .../2021-08-01/Backend_Reconnect.json | 19 + .../examples/2021-08-01/Backend_Update.json | 63 + .../2021-08-01/Cache_CreateOrUpdate.json | 47 + .../examples/2021-08-01/Cache_Delete.json | 16 + .../examples/2021-08-01/Cache_Get.json | 26 + .../2021-08-01/Cache_GetEntityTag.json | 18 + .../2021-08-01/Cache_ListByService.json | 30 + .../examples/2021-08-01/Cache_Update.json | 32 + ...Update_ApiManagementCreateCertificate.json | 43 + ...nagementCreateCertificateWithKeyVault.json | 61 + .../2021-08-01/Certificate_Delete.json | 16 + .../2021-08-01/Certificate_GetEntityTag.json | 18 + ...icate_Get_ApiManagementGetCertificate.json | 25 + ...iManagementGetCertificateWithKeyVault.json | 33 + .../2021-08-01/Certificate_ListByService.json | 48 + .../2021-08-01/Certificate_RefreshSecret.json | 33 + .../examples/2021-08-01/ContentItem_Get.json | 30 + .../2021-08-01/ContentItem_ListByService.json | 33 + .../examples/2021-08-01/ContentType_Get.json | 70 + .../2021-08-01/ContentType_ListByService.json | 73 + .../DelegationSettings_CreateOrUpdate.json | 42 + .../2021-08-01/DelegationSettings_Get.json | 28 + .../DelegationSettings_GetEntityTag.json | 17 + .../DelegationSettings_ListSecrets.json | 17 + .../2021-08-01/DelegationSettings_Update.json | 27 + .../2021-08-01/DeletedServices_GetByName.json | 25 + .../DeletedServices_ListBySubscription.json | 38 + .../2021-08-01/DeletedServices_Purge.json | 30 + .../EmailTemplate_CreateOrUpdate.json | 98 + .../2021-08-01/EmailTemplate_Delete.json | 16 + .../2021-08-01/EmailTemplate_Get.json | 53 + .../EmailTemplate_GetEntityTag.json | 18 + .../EmailTemplate_ListByService.json | 58 + .../2021-08-01/EmailTemplate_Update.json | 60 + .../2021-08-01/GatewayApi_ListByService.json | 37 + ...ayCertificateAuthority_CreateOrUpdate.json | 39 + .../GatewayCertificateAuthority_Delete.json | 17 + .../GatewayCertificateAuthority_Get.json | 24 + ...ewayCertificateAuthority_GetEntityTag.json | 19 + ...wayCertificateAuthority_ListByService.json | 36 + ...yHostnameConfiguration_CreateOrUpdate.json | 54 + .../GatewayHostnameConfiguration_Delete.json | 17 + .../GatewayHostnameConfiguration_Get.json | 26 + ...wayHostnameConfiguration_GetEntityTag.json | 19 + ...ayHostnameConfiguration_ListByService.json | 40 + .../2021-08-01/Gateway_CreateOrUpdate.json | 47 + .../examples/2021-08-01/Gateway_Delete.json | 16 + .../2021-08-01/Gateway_GenerateToken.json | 22 + .../examples/2021-08-01/Gateway_Get.json | 26 + .../2021-08-01/Gateway_GetEntityTag.json | 18 + .../2021-08-01/Gateway_ListByService.json | 42 + .../examples/2021-08-01/Gateway_ListKeys.json | 19 + .../2021-08-01/Gateway_RegenerateKey.json | 17 + .../examples/2021-08-01/Gateway_Update.json | 35 + ...teOrUpdate_ApiManagementCreateSchema1.json | 49 + ...teOrUpdate_ApiManagementCreateSchema2.json | 109 + .../2021-08-01/GlobalSchema_Delete.json | 16 + .../2021-08-01/GlobalSchema_GetEntityTag.json | 18 + ...balSchema_Get_ApiManagementGetSchema1.json | 25 + ...balSchema_Get_ApiManagementGetSchema2.json | 45 + .../GlobalSchema_ListByService.json | 60 + .../examples/2021-08-01/GroupUser_List.json | 40 + ...eateOrUpdate_ApiManagementCreateGroup.json | 40 + ...date_ApiManagementCreateGroupExternal.json | 47 + .../examples/2021-08-01/Group_Delete.json | 16 + .../examples/2021-08-01/Group_Get.json | 27 + .../2021-08-01/Group_GetEntityTag.json | 18 + .../2021-08-01/Group_ListByService.json | 65 + .../examples/2021-08-01/Group_Update.json | 33 + .../IdentityProvider_CreateOrUpdate.json | 41 + .../2021-08-01/IdentityProvider_Delete.json | 16 + .../2021-08-01/IdentityProvider_Get.json | 32 + .../IdentityProvider_GetEntityTag.json | 18 + .../IdentityProvider_ListByService.json | 55 + .../IdentityProvider_ListSecrets.json | 18 + .../2021-08-01/IdentityProvider_Update.json | 39 + ...eOrUpdate_ApiManagementCreateAiLogger.json | 53 + ...eOrUpdate_ApiManagementCreateEhLogger.json | 53 + .../examples/2021-08-01/Logger_Delete.json | 16 + .../examples/2021-08-01/Logger_Get.json | 30 + .../2021-08-01/Logger_GetEntityTag.json | 18 + .../2021-08-01/Logger_ListByService.json | 54 + .../examples/2021-08-01/Logger_Update.json | 35 + ...rUpdate_ApiManagementCreateNamedValue.json | 61 + ...anagementCreateNamedValueWithKeyVault.json | 78 + .../2021-08-01/NamedValue_Delete.json | 16 + .../2021-08-01/NamedValue_GetEntityTag.json | 18 + ...dValue_Get_ApiManagementGetNamedValue.json | 29 + ...piManagementGetNamedValueWithKeyVault.json | 36 + .../2021-08-01/NamedValue_ListByService.json | 51 + .../2021-08-01/NamedValue_ListValue.json | 18 + .../2021-08-01/NamedValue_RefreshSecret.json | 41 + .../2021-08-01/NamedValue_Update.json | 45 + .../NetworkStatus_ListByLocation.json | 148 + .../NetworkStatus_ListByService.json | 152 + ...tionRecipientEmail_ListByNotification.json | 45 + ...ationRecipientUser_ListByNotification.json | 29 + .../Notification_CreateOrUpdate.json | 34 + .../examples/2021-08-01/Notification_Get.json | 34 + .../Notification_ListByService.json | 129 + .../OpenIdConnectProvider_CreateOrUpdate.json | 45 + .../OpenIdConnectProvider_Delete.json | 16 + .../2021-08-01/OpenIdConnectProvider_Get.json | 26 + .../OpenIdConnectProvider_ListByService.json | 31 + .../OpenIdConnectProvider_ListSecrets.json | 18 + .../OpenIdConnectProvider_Update.json | 32 + .../2021-08-01/Operation_ListByTags.json | 35 + ...rkDependenciesEndpoints_ListByService.json | 465 + ...ivityCheckAsync_HttpConnectivityCheck.json | 71 + ...tivityCheckAsync_TcpConnectivityCheck.json | 56 + .../PolicyDescription_ListByService.json | 38 + .../PortalRevision_CreateOrUpdate.json | 39 + .../2021-08-01/PortalRevision_Get.json | 28 + .../PortalRevision_GetEntityTag.json | 18 + .../PortalRevision_ListByService.json | 44 + .../2021-08-01/PortalRevision_Update.json | 40 + .../PortalSettings_ListByService.json | 54 + ...vateEndpointConnection_CreateOrUpdate.json | 44 + .../PrivateEndpointConnection_Delete.json | 20 + .../PrivateEndpointConnection_GetByName.json | 31 + ...ointConnection_GetPrivateLinkResource.json | 29 + ...ivateEndpointConnection_ListByService.json | 50 + ...ntConnection_ListPrivateLinkResources.json | 32 + .../2021-08-01/ProductApi_ListByProduct.json | 37 + .../ProductGroup_ListByProduct.json | 54 + .../2021-08-01/ProductSubscriptions_List.json | 32 + .../2021-08-01/Product_CreateOrUpdate.json | 44 + .../examples/2021-08-01/Product_Delete.json | 17 + .../examples/2021-08-01/Product_Get.json | 28 + .../2021-08-01/Product_GetEntityTag.json | 18 + .../2021-08-01/Product_ListByService.json | 58 + .../2021-08-01/Product_ListByTags.json | 35 + .../examples/2021-08-01/Product_Update.json | 34 + .../QuotaByCounterKeys_ListByService.json | 30 + .../2021-08-01/QuotaByPeriodKeys_Get.json | 26 + .../2021-08-01/Region_ListByService.json | 25 + .../2021-08-01/Reports_ListByApi.json | 57 + .../2021-08-01/Reports_ListByGeo.json | 39 + .../2021-08-01/Reports_ListByOperation.json | 78 + .../2021-08-01/Reports_ListByProduct.json | 57 + .../2021-08-01/Reports_ListByRequest.json | 58 + .../Reports_ListBySubscription.json | 81 + .../2021-08-01/Reports_ListByTime.json | 58 + .../2021-08-01/Reports_ListByUser.json | 75 + .../SignInSettings_CreateOrUpdate.json | 29 + .../2021-08-01/SignInSettings_Get.json | 22 + .../SignInSettings_GetEntityTag.json | 17 + .../2021-08-01/SignInSettings_Update.json | 20 + .../SignUpSettings_CreateOrUpdate.json | 39 + .../2021-08-01/SignUpSettings_Get.json | 27 + .../SignUpSettings_GetEntityTag.json | 17 + .../2021-08-01/SignUpSettings_Update.json | 25 + .../Subscription_CreateOrUpdate.json | 48 + .../2021-08-01/Subscription_Delete.json | 16 + .../examples/2021-08-01/Subscription_Get.json | 27 + .../2021-08-01/Subscription_GetEntityTag.json | 18 + .../2021-08-01/Subscription_List.json | 58 + .../2021-08-01/Subscription_ListSecrets.json | 19 + .../Subscription_RegeneratePrimaryKey.json | 14 + .../Subscription_RegenerateSecondaryKey.json | 14 + .../2021-08-01/Subscription_Update.json | 33 + .../2021-08-01/TagResource_ListByService.json | 63 + .../2021-08-01/Tag_AssignToOperation.json | 35 + .../2021-08-01/Tag_DetachFromOperation.json | 18 + .../2021-08-01/Tag_GetByOperation.json | 25 + .../Tag_GetEntityStateByOperation.json | 20 + .../2021-08-01/Tag_ListByOperation.json | 30 + .../TenantAccessGit_RegeneratePrimaryKey.json | 14 + ...enantAccessGit_RegenerateSecondaryKey.json | 14 + .../2021-08-01/TenantAccess_Create.json | 29 + .../2021-08-01/TenantAccess_GetEntityTag.json | 14 + ...cess_Get_ApiManagementGetTenantAccess.json | 23 + ...s_Get_ApiManagementGetTenantGitAccess.json | 24 + .../TenantAccess_ListByService.json | 28 + .../2021-08-01/TenantAccess_ListSecrets.json | 21 + .../TenantAccess_RegeneratePrimaryKey.json | 14 + .../TenantAccess_RegenerateSecondaryKey.json | 14 + .../2021-08-01/TenantAccess_Update.json | 29 + .../TenantConfiguration_Deploy.json | 39 + .../TenantConfiguration_GetSyncState.json | 30 + .../2021-08-01/TenantConfiguration_Save.json | 37 + .../TenantConfiguration_Validate.json | 37 + .../2021-08-01/TenantSettings_Get.json | 30 + .../TenantSettings_ListByService.json | 34 + .../UserConfirmationPassword_Send.json | 14 + .../examples/2021-08-01/UserGroup_List.json | 32 + .../2021-08-01/UserIdentities_List.json | 24 + .../2021-08-01/User_CreateOrUpdate.json | 63 + .../examples/2021-08-01/User_Delete.json | 16 + .../2021-08-01/User_GenerateSsoUrl.json | 18 + .../examples/2021-08-01/User_Get.json | 33 + .../2021-08-01/User_GetEntityTag.json | 18 + .../2021-08-01/User_GetSharedAccessToken.json | 24 + .../2021-08-01/User_ListByService.json | 74 + .../examples/2021-08-01/User_Update.json | 41 + .../arm-apimanagement/tsp-output/main.tsp | 4 +- .../arm-apimanagement/tsp-output/models.tsp | 527 +- .../arm-apimanagement/tsp-output/routes.tsp | 26 +- .../test/arm-authorization/authorization.md | 358 + .../test/arm-authorization/resources.json | 802 ++ .../tsp-output/DenyAssignment.tsp | 66 + .../tsp-output/ProviderOperationsMetadata.tsp | 60 + .../tsp-output/RoleAssignment.tsp | 71 + .../tsp-output/RoleAssignmentSchedule.tsp | 40 + .../RoleAssignmentScheduleInstance.tsp | 40 + .../RoleAssignmentScheduleRequest.tsp | 53 + .../tsp-output/RoleDefinition.tsp | 45 + .../tsp-output/RoleEligibilitySchedule.tsp | 40 + .../RoleEligibilityScheduleInstance.tsp | 40 + .../RoleEligibilityScheduleRequest.tsp | 53 + .../tsp-output/RoleManagementPolicy.tsp | 34 + .../RoleManagementPolicyAssignment.tsp | 34 + .../2015-07-01/DenyAssignments_Get.json | 47 + .../DenyAssignments_ListForResource.json | 57 + .../ProviderOperationsMetadata_Get.json | 26 + .../ProviderOperationsMetadata_List.json | 29 + .../RoleAssignmentScheduleInstances_Get.json | 54 + ...ignmentScheduleInstances_ListForScope.json | 58 + ...RoleAssignmentScheduleRequests_Cancel.json | 12 + ...RoleAssignmentScheduleRequests_Create.json | 82 + .../RoleAssignmentScheduleRequests_Get.json | 64 + ...signmentScheduleRequests_ListForScope.json | 68 + ...leAssignmentScheduleRequests_Validate.json | 82 + .../RoleAssignmentSchedules_Get.json | 53 + .../RoleAssignmentSchedules_ListForScope.json | 57 + ...reate_CreateRoleAssignmentForResource.json | 44 + ..._CreateRoleAssignmentForResourceGroup.json | 44 + ...e_CreateRoleAssignmentForSubscription.json | 44 + .../2015-07-01/RoleAssignments_Delete.json | 25 + .../2015-07-01/RoleAssignments_Get.json | 24 + .../RoleAssignments_ListForScope.json | 27 + .../RoleDefinitions_CreateOrUpdate.json | 63 + .../2015-07-01/RoleDefinitions_Delete.json | 39 + .../2015-07-01/RoleDefinitions_Get.json | 38 + .../2015-07-01/RoleDefinitions_List.json | 41 + .../RoleEligibilityScheduleInstances_Get.json | 50 + ...ibilityScheduleInstances_ListForScope.json | 54 + ...oleEligibilityScheduleRequests_Cancel.json | 12 + ...oleEligibilityScheduleRequests_Create.json | 81 + .../RoleEligibilityScheduleRequests_Get.json | 64 + ...gibilityScheduleRequests_ListForScope.json | 68 + ...eEligibilityScheduleRequests_Validate.json | 81 + .../RoleEligibilitySchedules_Get.json | 51 + ...RoleEligibilitySchedules_ListForScope.json | 55 + .../RoleManagementPolicies_Get.json | 734 ++ .../RoleManagementPolicies_ListForScope.json | 737 ++ ...date_PatchPartialRoleManagementPolicy.json | 777 ++ ...cies_Update_PatchRoleManagementPolicy.json | 1086 ++ ...oleManagementPolicyAssignments_Create.json | 395 + .../RoleManagementPolicyAssignments_Get.json | 393 + ...agementPolicyAssignments_ListForScope.json | 396 + .../arm-authorization/tsp-output/main.tsp | 52 + .../arm-authorization/tsp-output/models.tsp | 1270 +++ .../arm-authorization/tsp-output/routes.tsp | 108 + .../tsp-output/tspconfig.yaml | 11 + .../tsp-output/Application.tsp | 13 +- .../tsp-output/BusinessProcess.tsp | 8 +- .../tsp-output/BusinessProcessVersion.tsp | 3 + .../tsp-output/InfrastructureResource.tsp | 10 +- .../tsp-output/Space.tsp | 9 +- .../Applications_CreateOrUpdate.json | 94 + .../Applications_Delete.json | 15 + ...eteBusinessProcessDevelopmentArtifact.json | 17 + .../2023-11-14-preview/Applications_Get.json | 36 + ...GetBusinessProcessDevelopmentArtifact.json | 175 + ...stBusinessProcessDevelopmentArtifacts.json | 176 + .../Applications_ListBySpace.json | 39 + .../Applications_Patch.json | 44 + ...aveBusinessProcessDevelopmentArtifact.json | 326 + ...ateBusinessProcessDevelopmentArtifact.json | 176 + .../BusinessProcessVersions_Get.json | 109 + ...ProcessVersions_ListByBusinessProcess.json | 112 + .../BusinessProcesses_CreateOrUpdate.json | 289 + .../BusinessProcesses_Delete.json | 16 + .../BusinessProcesses_Get.json | 108 + .../BusinessProcesses_ListByApplication.json | 111 + .../BusinessProcesses_Patch.json | 113 + ...nfrastructureResources_CreateOrUpdate.json | 43 + .../InfrastructureResources_Delete.json | 15 + .../InfrastructureResources_Get.json | 25 + .../InfrastructureResources_ListBySpace.json | 28 + .../InfrastructureResources_Patch.json | 31 + .../Spaces_CreateOrUpdate.json | 51 + .../2023-11-14-preview/Spaces_Delete.json | 14 + .../2023-11-14-preview/Spaces_Get.json | 27 + .../Spaces_ListByResourceGroup.json | 30 + .../Spaces_ListBySubscription.json | 30 + .../2023-11-14-preview/Spaces_Patch.json | 35 + .../tsp-output/main.tsp | 1 + .../tsp-output/models.tsp | 99 + .../tsp-output/routes.tsp | 2 + .../tsp-output/AvailabilitySet.tsp | 11 +- .../tsp-output/CapacityReservation.tsp | 11 +- .../tsp-output/CapacityReservationGroup.tsp | 11 +- .../arm-compute/tsp-output/CloudService.tsp | 26 +- .../tsp-output/CloudServiceRole.tsp | 3 + .../tsp-output/CommunityGallery.tsp | 2 + .../tsp-output/CommunityGalleryImage.tsp | 3 + .../CommunityGalleryImageVersion.tsp | 3 + .../arm-compute/tsp-output/DedicatedHost.tsp | 11 +- .../tsp-output/DedicatedHostGroup.tsp | 12 +- .../test/arm-compute/tsp-output/Disk.tsp | 27 +- .../arm-compute/tsp-output/DiskAccess.tsp | 11 +- .../tsp-output/DiskEncryptionSet.tsp | 11 +- .../tsp-output/DiskRestorePoint.tsp | 21 +- .../test/arm-compute/tsp-output/Gallery.tsp | 14 +- .../tsp-output/GalleryApplication.tsp | 11 +- .../tsp-output/GalleryApplicationVersion.tsp | 10 +- .../arm-compute/tsp-output/GalleryImage.tsp | 8 +- .../tsp-output/GalleryImageVersion.tsp | 11 +- .../test/arm-compute/tsp-output/Image.tsp | 9 +- .../test/arm-compute/tsp-output/OSFamily.tsp | 9 +- .../test/arm-compute/tsp-output/OSVersion.tsp | 9 +- .../tsp-output/PrivateEndpointConnection.tsp | 15 +- .../tsp-output/ProximityPlacementGroup.tsp | 8 +- .../arm-compute/tsp-output/RestorePoint.tsp | 4 + .../tsp-output/RestorePointCollection.tsp | 11 +- .../arm-compute/tsp-output/RoleInstance.tsp | 28 +- .../tsp-output/RollingUpgradeStatusInfo.tsp | 8 +- .../arm-compute/tsp-output/SharedGallery.tsp | 3 + .../tsp-output/SharedGalleryImage.tsp | 3 + .../tsp-output/SharedGalleryImageVersion.tsp | 3 + .../test/arm-compute/tsp-output/Snapshot.tsp | 27 +- .../tsp-output/SshPublicKeyResource.tsp | 28 +- .../arm-compute/tsp-output/VirtualMachine.tsp | 45 +- .../tsp-output/VirtualMachineExtension.tsp | 10 +- .../VirtualMachineExtensionImage.tsp | 3 + .../tsp-output/VirtualMachineRunCommand.tsp | 11 +- .../tsp-output/VirtualMachineScaleSet.tsp | 126 +- .../VirtualMachineScaleSetExtension.tsp | 10 +- .../tsp-output/VirtualMachineScaleSetVM.tsp | 55 +- .../VirtualMachineScaleSetVMExtension.tsp | 20 +- .../AvailabilitySets_CreateOrUpdate.json | 34 + ...te_AvailabilitySetDeleteMaximumSetGen.json | 14 + ...te_AvailabilitySetDeleteMinimumSetGen.json | 14 + ...s_Get_AvailabilitySetGetMaximumSetGen.json | 50 + ...s_Get_AvailabilitySetGetMinimumSetGen.json | 18 + ...itySetListAvailableSizesMaximumSetGen.json | 34 + ...itySetListAvailableSizesMinimumSetGen.json | 15 + .../AvailabilitySets_ListBySubscription.json | 87 + ...List_AvailabilitySetListMaximumSetGen.json | 146 + ...List_AvailabilitySetListMinimumSetGen.json | 33 + ...te_AvailabilitySetUpdateMaximumSetGen.json | 72 + ...te_AvailabilitySetUpdateMinimumSetGen.json | 18 + ...acityReservationGroups_CreateOrUpdate.json | 51 + ...tyReservationGroupDeleteMaximumSetGen.json | 14 + ...tyReservationGroupDeleteMinimumSetGen.json | 14 + .../CapacityReservationGroups_Get.json | 83 + ...ReservationGroups_ListByResourceGroup.json | 63 + ...yReservationGroups_ListBySubscription.json | 62 + ...tyReservationGroupUpdateMaximumSetGen.json | 68 + ...tyReservationGroupUpdateMinimumSetGen.json | 18 + .../CapacityReservations_CreateOrUpdate.json | 72 + ...apacityReservationDeleteMaximumSetGen.json | 20 + ...apacityReservationDeleteMinimumSetGen.json | 20 + .../2023-07-01/CapacityReservations_Get.json | 69 + ...ations_ListByCapacityReservationGroup.json | 79 + ...apacityReservationUpdateMaximumSetGen.json | 88 + ...apacityReservationUpdateMinimumSetGen.json | 25 + ...udServiceOperatingSystems_GetOSFamily.json | 32 + ...dServiceOperatingSystems_GetOSVersion.json | 28 + ...erviceOperatingSystems_ListOSFamilies.json | 53 + ...erviceOperatingSystems_ListOSVersions.json | 45 + .../CloudServiceRoleInstances_Delete.json | 20 + .../CloudServiceRoleInstances_Get.json | 34 + ...dServiceRoleInstances_GetInstanceView.json | 28 + ...iceRoleInstances_GetRemoteDesktopFile.json | 16 + .../CloudServiceRoleInstances_List.json | 94 + .../CloudServiceRoleInstances_Rebuild.json | 19 + .../CloudServiceRoleInstances_Reimage.json | 19 + .../CloudServiceRoleInstances_Restart.json | 19 + .../2023-07-01/CloudServiceRoles_Get.json | 29 + .../2023-07-01/CloudServiceRoles_List.json | 46 + ...dServicesUpdateDomain_GetUpdateDomain.json | 19 + ...ervicesUpdateDomain_ListUpdateDomains.json | 26 + ...reateNewCloudServiceWithMultipleRoles.json | 184 + ...tipleRolesInASpecificAvailabilityZone.json | 193 + ...e_CreateNewCloudServiceWithSingleRole.json | 160 + ...hSingleRoleAndCertificateFromKeyVault.json | 196 + ...dServiceWithSingleRoleAndRdpExtension.json | 211 + .../2023-07-01/CloudServices_Delete.json | 19 + .../CloudServices_DeleteInstances.json | 24 + .../2023-07-01/CloudServices_Get.json | 90 + .../CloudServices_GetInstanceView.json | 60 + .../2023-07-01/CloudServices_List.json | 89 + .../2023-07-01/CloudServices_ListAll.json | 88 + .../2023-07-01/CloudServices_PowerOff.json | 18 + .../2023-07-01/CloudServices_Rebuild.json | 24 + .../2023-07-01/CloudServices_Reimage.json | 24 + .../2023-07-01/CloudServices_Restart.json | 24 + .../2023-07-01/CloudServices_Start.json | 18 + .../2023-07-01/CloudServices_Update.json | 76 + .../2023-07-01/CommunityGalleries_Get.json | 22 + .../CommunityGalleryImageVersions_Get.json | 35 + .../CommunityGalleryImageVersions_List.json | 38 + .../CommunityGalleryImages_Get.json | 35 + .../CommunityGalleryImages_List.json | 36 + ...ate_CreateOrUpdateADedicatedHostGroup.json | 60 + ...DedicatedHostGroupWithUltraSsdSupport.json | 69 + ...DedicatedHostGroupDeleteMaximumSetGen.json | 14 + ...DedicatedHostGroupDeleteMinimumSetGen.json | 14 + ...tGroups_Get_CreateADedicatedHostGroup.json | 90 + ...teAnUltraSsdEnabledDedicatedHostGroup.json | 66 + ...GroupListByResourceGroupMaximumSetGen.json | 62 + ...GroupListByResourceGroupMinimumSetGen.json | 21 + ...tGroupListBySubscriptionMaximumSetGen.json | 61 + ...tGroupListBySubscriptionMinimumSetGen.json | 20 + ...DedicatedHostGroupUpdateMaximumSetGen.json | 93 + ...DedicatedHostGroupUpdateMinimumSetGen.json | 18 + .../DedicatedHosts_CreateOrUpdate.json | 62 + ...lete_DedicatedHostDeleteMaximumSetGen.json | 20 + ...lete_DedicatedHostDeleteMinimumSetGen.json | 20 + .../2023-07-01/DedicatedHosts_Get.json | 63 + .../DedicatedHosts_ListAvailableSizes.json | 21 + ...catedHostListByHostGroupMaximumSetGen.json | 64 + ...catedHostListByHostGroupMinimumSetGen.json | 23 + .../2023-07-01/DedicatedHosts_Restart.json | 16 + ...date_DedicatedHostUpdateMaximumSetGen.json | 89 + ...date_DedicatedHostUpdateMinimumSetGen.json | 20 + ...osts_Update_DedicatedHostUpdateResize.json | 45 + .../DiskAccesses_CreateOrUpdate.json | 35 + .../2023-07-01/DiskAccesses_Delete.json | 19 + ...sses_DeleteAPrivateEndpointConnection.json | 20 + ...ccesses_GetAPrivateEndpointConnection.json | 31 + .../DiskAccesses_GetPrivateLinkResources.json | 32 + ...etInformationAboutADiskAccessResource.json | 28 + ...iskAccessResourceWithPrivateEndpoints.json | 46 + .../2023-07-01/DiskAccesses_List.json | 63 + .../DiskAccesses_ListByResourceGroup.json | 64 + ...cesses_ListPrivateEndpointConnections.json | 34 + .../2023-07-01/DiskAccesses_Update.json | 45 + ...sses_UpdateAPrivateEndpointConnection.json | 57 + ...eateOrUpdate_CreateADiskEncryptionSet.json | 67 + ...ithKeyVaultFromADifferentSubscription.json | 58 + ...onSetWithKeyVaultFromADifferentTenant.json | 70 + .../2023-07-01/DiskEncryptionSets_Delete.json | 19 + ...GetInformationAboutADiskEncryptionSet.json | 38 + ...ncryptionSetWhenAutoKeyRotationFailed.json | 43 + .../2023-07-01/DiskEncryptionSets_List.json | 65 + ...ncryptionSets_ListAssociatedResources.json | 21 + ...iskEncryptionSets_ListByResourceGroup.json | 66 + ...nSets_Update_UpdateADiskEncryptionSet.json | 77 + ...stKeyVersionEnabledSetToTrueSucceeded.json | 65 + ...estKeyVersionEnabledSetToTrueUpdating.json | 70 + ...AnIncrementalDiskRestorePointResource.json | 30 + ...nSourceResourceIsFromADifferentRegion.json | 33 + .../DiskRestorePoint_GrantAccess.json | 29 + .../DiskRestorePoint_ListByRestorePoint.json | 33 + .../DiskRestorePoint_RevokeAccess.json | 20 + ...edDiskEncryptedWithCustomerManagedKey.json | 70 + ...iskAndAssociateWithDiskAccessResource.json | 54 + ...DiskAndAssociateWithDiskEncryptionSet.json | 55 + ..._CreateAManagedDiskByCopyingASnapshot.json | 49 + ...managedBlobFromADifferentSubscription.json | 52 + ...nUnmanagedBlobFromTheSameSubscription.json | 49 + ..._CreateAManagedDiskFromAPlatformImage.json | 76 + ...omAnAzureComputeGalleryCommunityImage.json | 66 + ...nAzureComputeGalleryDirectSharedImage.json | 66 + ...gedDiskFromAnAzureComputeGalleryImage.json | 66 + ...dDiskInTheSameOrDifferentSubscription.json | 49 + ...nagedDiskFromElasticSanVolumeSnapshot.json | 49 + ...nagedDiskFromImportSecureCreateOption.json | 67 + ...kFromUploadPreparedSecureCreateOption.json | 61 + ...ateAManagedDiskWithDataAccessAuthMode.json | 51 + ...gedDiskWithOptimizedForFrequentAttach.json | 52 + ...CreateAManagedDiskWithPerformancePlus.json | 49 + ...eAManagedDiskWithPremiumV2AccountType.json | 62 + ...CreateAManagedDiskWithSecurityProfile.json | 67 + ...eateAManagedDiskWithSsdZrsAccountType.json | 60 + ...traAccountTypeWithReadOnlyPropertySet.json | 69 + ...eateOrUpdate_CreateAManagedUploadDisk.json | 49 + ...eateOrUpdate_CreateAnEmptyManagedDisk.json | 49 + ...eAnEmptyManagedDiskInExtendedLocation.json | 61 + ...ManagedDiskWithLogicalSectorSize_512E.json | 63 + .../examples/2023-07-01/Disks_Delete.json | 19 + .../examples/2023-07-01/Disks_Get.json | 76 + ...sks_GrantAccess_GetASasOnAManagedDisk.json | 27 + ...ss_GetSasOnManagedDiskAndVmGuestState.json | 28 + .../examples/2023-07-01/Disks_List.json | 121 + .../2023-07-01/Disks_ListByResourceGroup.json | 122 + .../2023-07-01/Disks_RevokeAccess.json | 18 + ...teOrUpdateABurstingEnabledManagedDisk.json | 50 + ...ManagedDiskToAddAcceleratedNetworking.json | 72 + ...e_UpdateAManagedDiskToAddArchitecture.json | 72 + ...e_UpdateAManagedDiskToAddPurchasePlan.json | 81 + ...eAManagedDiskToAddSupportsHibernation.json | 62 + ...Update_UpdateAManagedDiskToChangeTier.json | 49 + ...e_UpdateAManagedDiskToDisableBursting.json | 44 + ...skToDisableOptimizedForFrequentAttach.json | 48 + ...teAManagedDiskWithDiskControllerTypes.json | 72 + ...ToRemoveDiskAccessResourceAssociation.json | 48 + ...reateOrUpdate_CreateACommunityGallery.json | 93 + ...OrUpdate_CreateOrUpdateASimpleGallery.json | 57 + ...pdateASimpleGalleryWithSharingProfile.json | 69 + ...ASimpleGalleryWithSoftDeletionEnabled.json | 69 + .../examples/2023-07-01/Galleries_Delete.json | 15 + .../Galleries_Get_GetACommunityGallery.json | 47 + .../2023-07-01/Galleries_Get_GetAGallery.json | 25 + ...GalleryWithExpandSharingProfileGroups.json | 39 + ..._Get_GetAGalleryWithSelectPermissions.json | 39 + .../examples/2023-07-01/Galleries_List.json | 29 + .../Galleries_ListByResourceGroup.json | 30 + .../examples/2023-07-01/Galleries_Update.json | 30 + ...eryApplicationVersions_CreateOrUpdate.json | 233 + .../GalleryApplicationVersions_Delete.json | 17 + ...ons_Get_GetAGalleryApplicationVersion.json | 67 + ...plicationVersionWithReplicationStatus.json | 85 + ...tionVersions_ListByGalleryApplication.json | 71 + .../GalleryApplicationVersions_Update.json | 78 + .../GalleryApplications_CreateOrUpdate.json | 132 + .../GalleryApplications_Delete.json | 16 + .../2023-07-01/GalleryApplications_Get.json | 42 + .../GalleryApplications_ListByGallery.json | 46 + .../GalleryApplications_Update.json | 69 + ...ionUsingCommunityGalleryImageAsSource.json | 324 + ...ImageVersionUsingManagedImageAsSource.json | 324 + ...nUsingMixOfDisksAndSnapshotsAsASource.json | 313 + ...ageVersionUsingShallowReplicationMode.json | 184 + ...yImageVersionUsingSharedImageAsSource.json | 324 + ...ryImageVersionUsingSnapshotsAsASource.json | 313 + ...eGalleryImageVersionUsingVhdAsASource.json | 271 + ...pleGalleryImageVersionUsingVmAsSource.json | 324 + ...nWithTargetExtendedLocationsSpecified.json | 366 + .../GalleryImageVersions_Delete.json | 17 + ...eVersions_Get_GetAGalleryImageVersion.json | 83 + ...leryImageVersionWithReplicationStatus.json | 101 + ...eryImageVersionWithSnapshotsAsASource.json | 82 + ...tAGalleryImageVersionWithVhdAsASource.json | 82 + ...lleryImageVersions_ListByGalleryImage.json | 87 + ...lleryImageVersionManagedImageAsSource.json | 91 + ...pleGalleryImageVersionWithoutSourceId.json | 87 + .../GalleryImages_CreateOrUpdate.json | 77 + .../2023-07-01/GalleryImages_Delete.json | 16 + .../2023-07-01/GalleryImages_Get.json | 30 + .../GalleryImages_ListByGallery.json | 34 + .../2023-07-01/GalleryImages_Update.json | 42 + ...haringIdToTheSharingProfileOfAGallery.json | 73 + ..._Update_ResetSharingProfileOfAGallery.json | 28 + ...ofile_Update_ShareAGalleryToCommunity.json | 28 + ...e_CreateAVirtualMachineImageFromABlob.json | 67 + ...romABlobWithDiskEncryptionSetResource.json | 73 + ...eAVirtualMachineImageFromAManagedDisk.json | 73 + ...agedDiskWithDiskEncryptionSetResource.json | 79 + ...eateAVirtualMachineImageFromASnapshot.json | 73 + ...SnapshotWithDiskEncryptionSetResource.json | 79 + ...hineImageFromAnExistingVirtualMachine.json | 72 + ...neImageThatIncludesADataDiskFromABlob.json | 83 + ...ThatIncludesADataDiskFromAManagedDisk.json | 95 + ...ageThatIncludesADataDiskFromASnapshot.json | 95 + ...mages_Delete_ImageDeleteMaximumSetGen.json | 19 + ...mages_Delete_ImageDeleteMinimumSetGen.json | 19 + .../examples/2023-07-01/Images_Get.json | 52 + .../examples/2023-07-01/Images_List.json | 53 + .../Images_ListByResourceGroup.json | 54 + .../examples/2023-07-01/Images_Update.json | 109 + ...oximityPlacementGroups_CreateOrUpdate.json | 67 + .../ProximityPlacementGroups_Delete.json | 14 + .../ProximityPlacementGroups_Get.json | 48 + ...tyPlacementGroups_ListByResourceGroup.json | 52 + ...ityPlacementGroups_ListBySubscription.json | 51 + .../ProximityPlacementGroups_Update.json | 28 + ...CreateOrUpdateARestorePointCollection.json | 61 + ...torePointCollectionForCrossRegionCopy.json | 61 + ...orePointCollectionDeleteMaximumSetGen.json | 19 + ...orePointCollectionDeleteMinimumSetGen.json | 19 + ...sContainedInTheRestorePointCollection.json | 31 + ...sContainedInTheRestorePointCollection.json | 99 + .../RestorePointCollections_List.json | 51 + .../RestorePointCollections_ListAll.json | 50 + ...orePointCollectionUpdateMaximumSetGen.json | 195 + ...orePointCollectionUpdateMinimumSetGen.json | 18 + ...e_CopyARestorePointToADifferentRegion.json | 86 + ...torePoints_Create_CreateARestorePoint.json | 90 + ...elete_RestorePointDeleteMaximumSetGen.json | 20 + ...elete_RestorePointDeleteMinimumSetGen.json | 20 + .../RestorePoints_Get_GetARestorePoint.json | 80 + ...s_Get_GetRestorePointWithInstanceView.json | 114 + .../2023-07-01/SharedGalleries_Get.json | 21 + .../2023-07-01/SharedGalleries_List.json | 25 + .../SharedGalleryImageVersions_Get.json | 34 + .../SharedGalleryImageVersions_List.json | 38 + .../2023-07-01/SharedGalleryImages_Get.json | 34 + .../2023-07-01/SharedGalleryImages_List.json | 36 + ...managedBlobFromADifferentSubscription.json | 52 + ...nUnmanagedBlobFromTheSameSubscription.json | 49 + ...napshotFromAnElasticSanVolumeSnapshot.json | 49 + ...shotInTheSameOrADifferentSubscription.json | 49 + ...fferentSubscriptionInADifferentRegion.json | 49 + .../examples/2023-07-01/Snapshots_Delete.json | 19 + ...hots_Get_GetInformationAboutASnapshot.json | 67 + ...InformationAboutAnIncrementalSnapshot.json | 73 + .../2023-07-01/Snapshots_GrantAccess.json | 27 + .../examples/2023-07-01/Snapshots_List.json | 101 + .../Snapshots_ListByResourceGroup.json | 59 + .../2023-07-01/Snapshots_RevokeAccess.json | 18 + .../Snapshots_Update_UpdateASnapshot.json | 60 + ...ateASnapshotWithAcceleratedNetworking.json | 69 + .../2023-07-01/SshPublicKeys_Create.json | 38 + ...elete_SshPublicKeyDeleteMaximumSetGen.json | 14 + ...elete_SshPublicKeyDeleteMinimumSetGen.json | 14 + .../SshPublicKeys_GenerateKeyPair.json | 19 + .../2023-07-01/SshPublicKeys_Get.json | 25 + ...icKeyListByResourceGroupMaximumSetGen.json | 31 + ...icKeyListByResourceGroupMinimumSetGen.json | 21 + ...licKeyListBySubscriptionMaximumSetGen.json | 30 + ...licKeyListBySubscriptionMinimumSetGen.json | 20 + ...pdate_SshPublicKeyUpdateMaximumSetGen.json | 35 + ...pdate_SshPublicKeyUpdateMinimumSetGen.json | 18 + ...MachineExtensionImageGetMaximumSetGen.json | 32 + ...MachineExtensionImageGetMinimumSetGen.json | 21 + ...eExtensionImageListTypesMaximumSetGen.json | 32 + ...eExtensionImageListTypesMinimumSetGen.json | 21 + ...eExtensionCreateOrUpdateMaximumSetGen.json | 148 + ...eExtensionCreateOrUpdateMinimumSetGen.json | 31 + ...alMachineExtensionDeleteMaximumSetGen.json | 20 + ...alMachineExtensionDeleteMinimumSetGen.json | 20 + ...rtualMachineExtensionGetMaximumSetGen.json | 60 + ...rtualMachineExtensionGetMinimumSetGen.json | 19 + ...tualMachineExtensionListMaximumSetGen.json | 63 + ...tualMachineExtensionListMinimumSetGen.json | 15 + .../VirtualMachineExtensions_Update.json | 56 + ...tualMachineRunCommands_CreateOrUpdate.json | 109 + .../VirtualMachineRunCommands_Delete.json | 20 + ...achineRunCommands_GetByVirtualMachine.json | 47 + .../VirtualMachineRunCommands_List.json | 87 + ...chineRunCommands_ListByVirtualMachine.json | 50 + .../VirtualMachineRunCommands_Update.json | 73 + ...tExtensionCreateOrUpdateMaximumSetGen.json | 77 + ...tExtensionCreateOrUpdateMinimumSetGen.json | 23 + ...eScaleSetExtensionDeleteMaximumSetGen.json | 20 + ...eScaleSetExtensionDeleteMinimumSetGen.json | 20 + ...hineScaleSetExtensionGetMaximumSetGen.json | 36 + ...hineScaleSetExtensionGetMinimumSetGen.json | 16 + ...ineScaleSetExtensionListMaximumSetGen.json | 39 + ...ineScaleSetExtensionListMinimumSetGen.json | 19 + ...eScaleSetExtensionUpdateMaximumSetGen.json | 76 + ...eScaleSetExtensionUpdateMinimumSetGen.json | 23 + ...eSetRollingUpgradeCancelMaximumSetGen.json | 18 + ...eSetRollingUpgradeCancelMinimumSetGen.json | 18 + ...tRollingUpgradeGetLatestMaximumSetGen.json | 63 + ...tRollingUpgradeGetLatestMinimumSetGen.json | 18 + ...RollingUpgrades_StartExtensionUpgrade.json | 18 + ...ingUpgradeStartOsUpgradeMaximumSetGen.json | 18 + ...ingUpgradeStartOsUpgradeMinimumSetGen.json | 18 + ...neScaleSetVMExtensions_CreateOrUpdate.json | 59 + ...ualMachineScaleSetVMExtensions_Delete.json | 21 + ...irtualMachineScaleSetVMExtensions_Get.json | 31 + ...rtualMachineScaleSetVMExtensions_List.json | 49 + ...ualMachineScaleSetVMExtensions_Update.json | 42 + ...hineScaleSetVmDeallocateMaximumSetGen.json | 19 + ...hineScaleSetVmDeallocateMinimumSetGen.json | 19 + .../VirtualMachineScaleSetVMs_Delete.json | 21 + ...ualMachineScaleSetVMs_GetInstanceView.json | 67 + ...etVMs_Get_GetVmScaleSetVmWithUserData.json | 135 + ...t_GetVmScaleSetVmWithVmSizeProperties.json | 140 + ...ualMachineScaleSetVmListMaximumSetGen.json | 548 + ...ualMachineScaleSetVmListMinimumSetGen.json | 22 + ...eSetVmPerformMaintenanceMaximumSetGen.json | 19 + ...eSetVmPerformMaintenanceMinimumSetGen.json | 19 + ...achineScaleSetVmPowerOffMaximumSetGen.json | 20 + ...achineScaleSetVmPowerOffMinimumSetGen.json | 19 + ...achineScaleSetVmRedeployMaximumSetGen.json | 19 + ...achineScaleSetVmRedeployMinimumSetGen.json | 19 + ...hineScaleSetVmReimageAllMaximumSetGen.json | 19 + ...hineScaleSetVmReimageAllMinimumSetGen.json | 19 + ...MachineScaleSetVmReimageMaximumSetGen.json | 22 + ...MachineScaleSetVmReimageMinimumSetGen.json | 19 + ...MachineScaleSetVmRestartMaximumSetGen.json | 19 + ...MachineScaleSetVmRestartMinimumSetGen.json | 19 + ...aleSetVMs_RetrieveBootDiagnosticsData.json | 20 + .../VirtualMachineScaleSetVMs_RunCommand.json | 42 + ...alMachineScaleSetVMs_SimulateEviction.json | 14 + ...alMachineScaleSetVmStartMaximumSetGen.json | 19 + ...alMachineScaleSetVmStartMinimumSetGen.json | 19 + ...lMachineScaleSetVmUpdateMaximumSetGen.json | 1535 +++ ...lMachineScaleSetVmUpdateMinimumSetGen.json | 31 + ...rtToSinglePlacementGroupMaximumSetGen.json | 16 + ...rtToSinglePlacementGroupMinimumSetGen.json | 14 + ...eSetFromAnUnmanagedGeneralizedOsImage.json | 204 + ...formImageScaleSetWithUnmanagedOsDisks.json | 224 + ...pdate_CreateAScaleSetFromACustomImage.json | 206 + ...eAScaleSetFromAGeneralizedSharedImage.json | 206 + ...eAScaleSetFromASpecializedSharedImage.json | 185 + ...figHasDisableTcpStateTrackingProperty.json | 279 + ...ateAScaleSetWithAMarketplaceImagePlan.json | 232 + ...ScaleSetWithAnAzureApplicationGateway.json | 232 + ...reateAScaleSetWithAnAzureLoadBalancer.json | 253 + ...CreateAScaleSetWithApplicationProfile.json | 258 + ...eAScaleSetWithAutomaticRepairsEnabled.json | 229 + ...te_CreateAScaleSetWithBootDiagnostics.json | 235 + ...CreateAScaleSetWithDiskControllerType.json | 251 + ...ryptionSetResourceInOsDiskAndDataDisk.json | 257 + ...teAScaleSetWithEmptyDataDisksOnEachVm.json | 272 + ...e_CreateAScaleSetWithEphemeralOsDisks.json | 241 + ...phemeralOsDisksUsingPlacementProperty.json | 244 + ...reateAScaleSetWithExtensionTimeBudget.json | 280 + ...ateAScaleSetWithFpgaNetworkInterfaces.json | 273 + ...cryptionUsingEncryptionAtHostProperty.json | 241 + ...teAScaleSetWithManagedBootDiagnostics.json | 232 + ...erfacesWithPublicIpAddressDnsSettings.json | 305 + ...eSetWithOsImageScheduledEventsEnabled.json | 235 + ...teAScaleSetWithPasswordAuthentication.json | 217 + ...ate_CreateAScaleSetWithPremiumStorage.json | 217 + ..._CreateAScaleSetWithPriorityMixPolicy.json | 236 + ...date_CreateAScaleSetWithScaleInPolicy.json | 235 + ...AScaleSetWithSecurityPostureReference.json | 229 + ...leSetWithSecurityTypeAsConfidentialVm.json | 247 + ...AScaleSetWithServiceArtifactReference.json | 229 + ..._CreateAScaleSetWithSpotRestorePolicy.json | 244 + ..._CreateAScaleSetWithSshAuthentication.json | 241 + ...etWithTerminateScheduledEventsEnabled.json | 235 + ...etWithUefiSettingsOfSecureBootAndVTpm.json | 238 + ...eOrUpdate_CreateAScaleSetWithUserData.json | 230 + ...etWithVirtualMachinesInDifferentZones.json | 286 + ...e_CreateAScaleSetWithVmSizeProperties.json | 248 + ...tensionThatHasSuppressFailuresEnabled.json | 280 + ...sionWithProtectedSettingsFromKeyVault.json | 295 + ...pdateAScaleSetWithCapacityReservation.json | 232 + ...achineScaleSetDeallocateMaximumSetGen.json | 24 + ...achineScaleSetDeallocateMinimumSetGen.json | 18 + .../VirtualMachineScaleSets_Delete.json | 20 + ...eScaleSetDeleteInstancesMaximumSetGen.json | 24 + ...eScaleSetDeleteInstancesMinimumSetGen.json | 23 + ...PlatformUpdateDomainWalkMaximumSetGen.json | 19 + ...PlatformUpdateDomainWalkMinimumSetGen.json | 16 + ...eScaleSetGetInstanceViewMaximumSetGen.json | 50 + ...eScaleSetGetInstanceViewMinimumSetGen.json | 15 + ...leSetGetOsUpgradeHistoryMaximumSetGen.json | 82 + ...leSetGetOsUpgradeHistoryMinimumSetGen.json | 19 + ...leSets_Get_GetAVirtualMachineScaleSet.json | 109 + ...tedHostGroupThroughAutomaticPlacement.json | 94 + ...etAVirtualMachineScaleSetWithUserData.json | 109 + ...GetVmScaleSetVmWithDiskControllerType.json | 110 + ...alMachineScaleSetListAllMaximumSetGen.json | 371 + ...alMachineScaleSetListAllMinimumSetGen.json | 20 + ...irtualMachineScaleSets_ListByLocation.json | 171 + ...lMachineScaleSetListSkusMaximumSetGen.json | 33 + ...lMachineScaleSetListSkusMinimumSetGen.json | 19 + ...rtualMachineScaleSetListMaximumSetGen.json | 687 ++ ...rtualMachineScaleSetListMinimumSetGen.json | 25 + ...aleSetPerformMaintenanceMaximumSetGen.json | 23 + ...aleSetPerformMaintenanceMinimumSetGen.json | 18 + ...lMachineScaleSetPowerOffMaximumSetGen.json | 24 + ...lMachineScaleSetPowerOffMinimumSetGen.json | 18 + ...lMachineScaleSetsReapplyMaximumSetGen.json | 18 + ...lMachineScaleSetsReapplyMinimumSetGen.json | 18 + ...lMachineScaleSetRedeployMaximumSetGen.json | 23 + ...lMachineScaleSetRedeployMinimumSetGen.json | 18 + ...achineScaleSetReimageAllMaximumSetGen.json | 23 + ...achineScaleSetReimageAllMinimumSetGen.json | 18 + ...alMachineScaleSetReimageMaximumSetGen.json | 24 + ...alMachineScaleSetReimageMinimumSetGen.json | 18 + ...alMachineScaleSetRestartMaximumSetGen.json | 23 + ...alMachineScaleSetRestartMinimumSetGen.json | 18 + ...rchestrationServiceStateMaximumSetGen.json | 22 + ...rchestrationServiceStateMinimumSetGen.json | 22 + ...tualMachineScaleSetStartMaximumSetGen.json | 23 + ...tualMachineScaleSetStartMinimumSetGen.json | 18 + ...eScaleSetUpdateInstancesMaximumSetGen.json | 23 + ...eScaleSetUpdateInstancesMinimumSetGen.json | 23 + ...ualMachineScaleSetUpdateMaximumSetGen.json | 651 ++ ...ualMachineScaleSetUpdateMinimumSetGen.json | 18 + .../VirtualMachines_AssessPatches.json | 58 + ...re_VirtualMachineCaptureMaximumSetGen.json | 33 + ...re_VirtualMachineCaptureMinimumSetGen.json | 25 + ...ineConvertToManagedDisksMaximumSetGen.json | 18 + ...ineConvertToManagedDisksMinimumSetGen.json | 18 + ...geVmFromAnUnmanagedGeneralizedOsImage.json | 147 + ...chSettingAssessmentModeOfImageDefault.json | 165 + ...latformAndAutomaticByPlatformSettings.json | 180 + ...hAPatchSettingPatchModeOfImageDefault.json | 165 + ...ssessmentModeSetToAutomaticByPlatform.json | 168 + ...ormImageVmWithUnmanagedOsAndDataDisks.json | 215 + ...e_CreateAVmFromACommunityGalleryImage.json | 146 + ...ateOrUpdate_CreateAVmFromACustomImage.json | 146 + ..._CreateAVmFromAGeneralizedSharedImage.json | 146 + ...date_CreateAVmFromASharedGalleryImage.json | 146 + ..._CreateAVmFromASpecializedSharedImage.json | 125 + ...thCustomerAssignedPlatformFaultDomain.json | 167 + ...OrUpdate_CreateAVmInAnAvailabilitySet.json | 164 + ...te_CreateAVmWithAMarketplaceImagePlan.json | 170 + ...e_CreateAVmWithAnExtensionsTimeBudget.json | 176 + ...pdate_CreateAVmWithApplicationProfile.json | 210 + ...OrUpdate_CreateAVmWithBootDiagnostics.json | 173 + ...pdate_CreateAVmWithDiskControllerType.json | 177 + ...onSetResourceIdInTheOsDiskAndDataDisk.json | 231 + ...eOrUpdate_CreateAVmWithEmptyDataDisks.json | 207 + ...OrUpdate_CreateAVmWithEphemeralOsDisk.json | 179 + ...ningInCacheDiskUsingPlacementProperty.json | 182 + ...gInResourceDiskUsingPlacementProperty.json | 182 + ...pdate_CreateAVmWithHibernationEnabled.json | 182 + ...cryptionUsingEncryptionAtHostProperty.json | 179 + ...e_CreateAVmWithManagedBootDiagnostics.json | 170 + ...eAVmWithNetworkInterfaceConfiguration.json | 176 + ...urationWithPublicIpAddressDnsSettings.json | 180 + ...e_CreateAVmWithPasswordAuthentication.json | 155 + ...eOrUpdate_CreateAVmWithPremiumStorage.json | 155 + ...e_CreateAVmWithScheduledEventsProfile.json | 203 + ...ConfidentialVmWithCustomerManagedKeys.json | 192 + ...ConfidentialVmWithPlatformManagedKeys.json | 183 + ...Update_CreateAVmWithSshAuthentication.json | 179 + ...VmWithUefiSettingsOfSecureBootAndVTpm.json | 176 + ..._CreateOrUpdate_CreateAVmWithUserData.json | 174 + ...rUpdate_CreateAVmWithVmSizeProperties.json | 186 + ...chSettingAssessmentModeOfImageDefault.json | 168 + ...APatchSettingPatchModeOfAutomaticByOs.json | 168 + ...latformAndAutomaticByPlatformSettings.json | 183 + ...PlatformAndEnableHotpatchingSetToTrue.json | 171 + ...sVmWithAPatchSettingPatchModeOfManual.json | 168 + ...ssessmentModeSetToAutomaticByPlatform.json | 171 + ...ateOrUpdateAVmWithCapacityReservation.json | 185 + ...VirtualMachineDeallocateMaximumSetGen.json | 19 + ...VirtualMachineDeallocateMinimumSetGen.json | 18 + .../2023-07-01/VirtualMachines_Delete.json | 20 + .../VirtualMachines_Generalize.json | 13 + ...irtualMachines_Get_GetAVirtualMachine.json | 137 + ...tedHostGroupThroughAutomaticPlacement.json | 69 + ...chineWithDiskControllerTypeProperties.json | 138 + ...etAVirtualMachineWithVmSizeProperties.json | 137 + .../VirtualMachines_InstallPatches.json | 65 + ...tedHostGroupThroughAutomaticPlacement.json | 59 + ...nceView_GetVirtualMachineInstanceView.json | 140 + ...ll_VirtualMachineListAllMaximumSetGen.json | 695 ++ ...ll_VirtualMachineListAllMinimumSetGen.json | 24 + .../VirtualMachines_ListAvailableSizes.json | 34 + .../VirtualMachines_ListByLocation.json | 129 + ..._List_VirtualMachineListMaximumSetGen.json | 932 ++ ..._List_VirtualMachineListMinimumSetGen.json | 25 + ...achinePerformMaintenanceMaximumSetGen.json | 18 + ...achinePerformMaintenanceMinimumSetGen.json | 18 + ...f_VirtualMachinePowerOffMaximumSetGen.json | 19 + ...f_VirtualMachinePowerOffMinimumSetGen.json | 18 + .../2023-07-01/VirtualMachines_Reapply.json | 18 + ...y_VirtualMachineRedeployMaximumSetGen.json | 18 + ...y_VirtualMachineRedeployMinimumSetGen.json | 18 + ...ge_ReimageANonEphemeralVirtualMachine.json | 26 + ...chines_Reimage_ReimageAVirtualMachine.json | 21 + ...rt_VirtualMachineRestartMaximumSetGen.json | 18 + ...rt_VirtualMachineRestartMinimumSetGen.json | 18 + ...lMachines_RetrieveBootDiagnosticsData.json | 19 + .../VirtualMachines_RunCommand.json | 40 + .../VirtualMachines_SimulateEviction.json | 13 + ...tart_VirtualMachineStartMaximumSetGen.json | 18 + ...tart_VirtualMachineStartMinimumSetGen.json | 18 + ...s_Update_UpdateAVmByDetachingDataDisk.json | 137 + ...ate_UpdateAVmByForceDetachingDataDisk.json | 139 + .../test/arm-compute/tsp-output/main.tsp | 29 + .../test/arm-compute/tsp-output/models.tsp | 604 +- .../test/arm-compute/tsp-output/routes.tsp | 4 +- .../openapi-to-typespec/test/arm-dns/dns.md | 126 + .../test/arm-dns/resources.json | 903 ++ .../test/arm-dns/tsp-output/DnsRecord.tsp | 124 + .../test/arm-dns/tsp-output/DnsZone.tsp | 129 + ...dSets_CreateOrUpdate_CreateARecordset.json | 67 + ...eateARecordsetWithAliasTargetResource.json | 63 + ...ts_CreateOrUpdate_CreateAaaaRecordset.json | 67 + ...ets_CreateOrUpdate_CreateCaaRecordset.json | 73 + ...s_CreateOrUpdate_CreateCnameRecordset.json | 61 + ...Sets_CreateOrUpdate_CreateMxRecordset.json | 70 + ...Sets_CreateOrUpdate_CreateNsRecordset.json | 67 + ...ets_CreateOrUpdate_CreatePtrRecordset.json | 67 + ...ets_CreateOrUpdate_CreateSoaRecordset.json | 79 + ...ets_CreateOrUpdate_CreateSrvRecordset.json | 76 + ...ets_CreateOrUpdate_CreateTxtRecordset.json | 76 + .../RecordSets_Delete_DeleteARecordset.json | 16 + ...RecordSets_Delete_DeleteAaaaRecordset.json | 16 + .../RecordSets_Delete_DeleteCaaRecordset.json | 16 + ...ecordSets_Delete_DeleteCnameRecordset.json | 16 + .../RecordSets_Delete_DeleteMxRecordset.json | 16 + .../RecordSets_Delete_DeleteNsRecordset.json | 16 + .../RecordSets_Delete_DeletePtrRecordset.json | 16 + .../RecordSets_Delete_DeleteSrvRecordset.json | 16 + .../RecordSets_Delete_DeleteTxtRecordset.json | 16 + .../RecordSets_Get_GetARecordset.json | 34 + .../RecordSets_Get_GetAaaaRecordset.json | 34 + .../RecordSets_Get_GetCaaRecordset.json | 36 + .../RecordSets_Get_GetCnameRecordset.json | 32 + .../RecordSets_Get_GetMxRecordset.json | 35 + .../RecordSets_Get_GetNsRecordset.json | 34 + .../RecordSets_Get_GetPtrRecordset.json | 34 + .../RecordSets_Get_GetSoaRecordset.json | 38 + .../RecordSets_Get_GetSrvRecordset.json | 37 + .../RecordSets_Get_GetTxtRecordset.json | 37 + .../2018-05-01/RecordSets_ListByDnsZone.json | 73 + ...RecordSets_ListByType_ListARecordsets.json | 38 + ...ordSets_ListByType_ListAaaaRecordsets.json | 38 + ...cordSets_ListByType_ListCaaRecordsets.json | 40 + ...rdSets_ListByType_ListCnameRecordsets.json | 36 + ...ecordSets_ListByType_ListMxRecordsets.json | 39 + ...ecordSets_ListByType_ListNsRecordsets.json | 38 + ...cordSets_ListByType_ListPtrRecordsets.json | 38 + ...cordSets_ListByType_ListSoaRecordsets.json | 42 + ...cordSets_ListByType_ListSrvRecordsets.json | 41 + ...cordSets_ListByType_ListTxtRecordsets.json | 41 + .../RecordSets_Update_PatchARecordset.json | 41 + .../RecordSets_Update_PatchAaaaRecordset.json | 41 + .../RecordSets_Update_PatchCaaRecordset.json | 43 + ...RecordSets_Update_PatchCnameRecordset.json | 39 + .../RecordSets_Update_PatchMxRecordset.json | 42 + .../RecordSets_Update_PatchNsRecordset.json | 41 + .../RecordSets_Update_PatchPtrRecordset.json | 41 + .../RecordSets_Update_PatchSoaRecordset.json | 45 + .../RecordSets_Update_PatchSrvRecordset.json | 44 + .../RecordSets_Update_PatchTxtRecordset.json | 44 + .../2018-05-01/Zones_CreateOrUpdate.json | 64 + .../examples/2018-05-01/Zones_Delete.json | 19 + .../examples/2018-05-01/Zones_Get.json | 34 + .../examples/2018-05-01/Zones_List.json | 54 + .../2018-05-01/Zones_ListByResourceGroup.json | 55 + .../examples/2018-05-01/Zones_Update.json | 39 + .../test/arm-dns/tsp-output/main.tsp | 39 + .../test/arm-dns/tsp-output/models.tsp | 325 + .../test/arm-dns/tsp-output/routes.tsp | 28 + .../test/arm-dns/tsp-output/tspconfig.yaml | 11 + .../machinelearningservices.md | 610 ++ .../resources.json | 3472 +++++++ .../BatchDeploymentTrackedResource.tsp | 79 + .../BatchEndpointTrackedResource.tsp | 84 + .../tsp-output/CodeContainerResource.tsp | 60 + .../tsp-output/CodeVersionResource.tsp | 76 + .../tsp-output/ComponentContainerResource.tsp | 60 + .../tsp-output/ComponentVersionResource.tsp | 71 + .../tsp-output/ComputeResource.tsp | 120 + .../tsp-output/DataContainerResource.tsp | 63 + .../tsp-output/DataVersionBaseResource.tsp | 87 + .../tsp-output/DatastoreResource.tsp | 100 + .../EnvironmentContainerResource.tsp | 64 + .../tsp-output/EnvironmentVersionResource.tsp | 75 + .../tsp-output/Feature.tsp | 50 + .../tsp-output/FeaturesetContainer.tsp | 71 + .../tsp-output/FeaturesetVersion.tsp | 114 + .../FeaturestoreEntityContainer.tsp | 72 + .../tsp-output/FeaturestoreEntityVersion.tsp | 80 + .../tsp-output/JobBaseResource.tsp | 99 + .../tsp-output/LabelingJob.tsp | 85 + .../tsp-output/ModelContainerResource.tsp | 64 + .../tsp-output/ModelVersionResource.tsp | 103 + .../OnlineDeploymentTrackedResource.tsp | 132 + .../OnlineEndpointTrackedResource.tsp | 124 + .../tsp-output/OutboundRuleBasicResource.tsp | 51 + .../tsp-output/PrivateEndpointConnection.tsp | 45 + .../tsp-output/Registry.tsp | 64 + .../tsp-output/Schedule.tsp | 55 + .../tsp-output/Workspace.tsp | 228 + ...aceConnectionPropertiesV2BasicResource.tsp | 78 + .../BatchDeployments_CreateOrUpdate.json | 222 + .../BatchDeployments_Delete.json | 21 + .../BatchDeployments_Get.json | 90 + .../BatchDeployments_List.json | 97 + .../BatchDeployments_Update.json | 103 + .../BatchEndpoints_CreateOrUpdate.json | 141 + .../BatchEndpoints_Delete.json | 20 + .../BatchEndpoints_Get.json | 62 + .../BatchEndpoints_List.json | 68 + .../BatchEndpoints_ListKeys.json | 20 + .../BatchEndpoints_Update.json | 79 + ...eateOrUpdate_AttachAKubernetesCompute.json | 125 + ...pute_CreateOrUpdate_CreateAAmlCompute.json | 62 + ...ateOrUpdate_CreateADataFactoryCompute.json | 46 + ...ute_CreateOrUpdate_CreateAnAksCompute.json | 46 + ...Update_CreateAnComputeInstanceCompute.json | 101 + ...mputeInstanceComputeWithMinimalInputs.json | 49 + ...AnComputeInstanceComputeWithSchedules.json | 74 + ...pute_CreateOrUpdate_UpdateAAmlCompute.json | 88 + ...ute_CreateOrUpdate_UpdateAnAksCompute.json | 58 + .../2023-06-01-preview/Compute_Delete.json | 22 + .../Compute_Get_GetAAksCompute.json | 29 + .../Compute_Get_GetAAmlCompute.json | 58 + .../Compute_Get_GetAKubernetesCompute.json | 56 + .../Compute_Get_GetAnComputeInstance.json | 116 + .../2023-06-01-preview/Compute_List.json | 47 + .../2023-06-01-preview/Compute_ListKeys.json | 21 + .../2023-06-01-preview/Compute_ListNodes.json | 35 + .../2023-06-01-preview/Compute_Restart.json | 18 + .../2023-06-01-preview/Compute_Start.json | 18 + .../2023-06-01-preview/Compute_Stop.json | 18 + .../2023-06-01-preview/Compute_Update.json | 40 + .../Compute_UpdateCustomServices.json | 49 + .../Compute_UpdateIdleShutdownSetting.json | 17 + ...OrUpdateDatastoreAzureBlobWAccountKey.json | 105 + ...oreAzureDataLakeGen1WServicePrincipal.json | 106 + ...oreAzureDataLakeGen2WServicePrincipal.json | 115 + ...ateDatastoreAzureFileStoreWAccountKey.json | 103 + .../2023-06-01-preview/Datastores_Delete.json | 15 + .../2023-06-01-preview/Datastores_Get.json | 48 + .../2023-06-01-preview/Datastores_List.json | 61 + .../Datastores_ListSecrets.json | 20 + .../2023-06-01-preview/Features_Get.json | 42 + .../2023-06-01-preview/Features_List.json | 50 + .../FeaturesetContainers_CreateOrUpdate.json | 83 + .../FeaturesetContainers_Delete.json | 20 + .../FeaturesetContainers_GetEntity.json | 42 + .../FeaturesetContainers_List.json | 49 + .../FeaturesetVersions_Backfill.json | 42 + .../FeaturesetVersions_CreateOrUpdate.json | 221 + .../FeaturesetVersions_Delete.json | 21 + .../FeaturesetVersions_Get.json | 88 + .../FeaturesetVersions_List.json | 95 + ...resetVersions_ListMaterializationJobs.json | 42 + ...estoreEntityContainers_CreateOrUpdate.json | 83 + .../FeaturestoreEntityContainers_Delete.json | 20 + ...eaturestoreEntityContainers_GetEntity.json | 42 + .../FeaturestoreEntityContainers_List.json | 49 + ...urestoreEntityVersions_CreateOrUpdate.json | 101 + .../FeaturestoreEntityVersions_Delete.json | 21 + .../FeaturestoreEntityVersions_Get.json | 48 + .../FeaturestoreEntityVersions_List.json | 55 + .../2023-06-01-preview/Jobs_Cancel.json | 19 + ...reateOrUpdate_CreateOrUpdateAutoMlJob.json | 335 + ...eateOrUpdate_CreateOrUpdateCommandJob.json | 335 + ...ateOrUpdate_CreateOrUpdatePipelineJob.json | 170 + ...CreateOrUpdate_CreateOrUpdateSweepJob.json | 335 + .../2023-06-01-preview/Jobs_Delete.json | 20 + .../Jobs_Get_GetAutoMlJob.json | 127 + .../Jobs_Get_GetCommandJob.json | 127 + .../Jobs_Get_GetPipelineJob.json | 71 + .../Jobs_Get_GetSweepJob.json | 127 + .../Jobs_List_ListAutoMlJob.json | 138 + .../Jobs_List_ListCommandJob.json | 138 + .../Jobs_List_ListPipelineJob.json | 78 + .../Jobs_List_ListSweepJob.json | 138 + .../2023-06-01-preview/Jobs_Update.json | 156 + .../LabelingJobs_CreateOrUpdate.json | 244 + .../LabelingJobs_Delete.json | 15 + .../LabelingJobs_ExportLabels.json | 30 + .../2023-06-01-preview/LabelingJobs_Get.json | 102 + .../2023-06-01-preview/LabelingJobs_List.json | 106 + .../LabelingJobs_Pause.json | 14 + .../LabelingJobs_Resume.json | 19 + ...orkProvisions_ProvisionManagedNetwork.json | 26 + ...gedNetworkSettingsRule_CreateOrUpdate.json | 40 + .../ManagedNetworkSettingsRule_Delete.json | 20 + .../ManagedNetworkSettingsRule_Get.json | 27 + .../ManagedNetworkSettingsRule_List.json | 41 + ...ateOrUpdateKubernetesOnlineDeployment.json | 246 + ...CreateOrUpdateManagedOnlineDeployment.json | 231 + .../OnlineDeployments_Delete.json | 21 + .../OnlineDeployments_GetLogs.json | 23 + ...nts_Get_GetKubernetesOnlineDeployment.json | 98 + ...yments_Get_GetManagedOnlineDeployment.json | 93 + .../OnlineDeployments_List.json | 105 + ...us_ListKubernetesOnlineDeploymentSkus.json | 37 + ...tSkus_ListManagedOnlineDeploymentSkus.json | 37 + ...date_UpdateKubernetesOnlineDeployment.json | 113 + ..._Update_UpdateManagedOnlineDeployment.json | 108 + .../OnlineEndpoints_CreateOrUpdate.json | 144 + .../OnlineEndpoints_Delete.json | 20 + .../OnlineEndpoints_Get.json | 64 + .../OnlineEndpoints_GetToken.json | 22 + .../OnlineEndpoints_List.json | 75 + .../OnlineEndpoints_ListKeys.json | 20 + .../OnlineEndpoints_RegenerateKeys.json | 24 + .../OnlineEndpoints_Update.json | 78 + ...ateEndpointConnections_CreateOrUpdate.json | 40 + .../PrivateEndpointConnections_Delete.json | 16 + .../PrivateEndpointConnections_Get.json | 32 + .../PrivateEndpointConnections_List.json | 52 + .../PrivateLinkResources_List.json | 30 + .../Registries_CreateOrUpdate.json | 280 + .../2023-06-01-preview/Registries_Delete.json | 20 + .../2023-06-01-preview/Registries_Get.json | 108 + .../2023-06-01-preview/Registries_List.json | 112 + .../Registries_ListBySubscription.json | 111 + .../Registries_RemoveRegions.json | 190 + .../2023-06-01-preview/Registries_Update.json | 124 + ...RegistryCodeContainers_CreateOrUpdate.json | 66 + .../RegistryCodeContainers_Delete.json | 20 + .../RegistryCodeContainers_Get.json | 35 + .../RegistryCodeContainers_List.json | 60 + ...ersions_CreateOrGetStartPendingUpload.json | 33 + .../RegistryCodeVersions_CreateOrUpdate.json | 81 + .../RegistryCodeVersions_Delete.json | 21 + .../RegistryCodeVersions_Get.json | 41 + .../RegistryCodeVersions_List.json | 48 + ...tryComponentContainers_CreateOrUpdate.json | 74 + .../RegistryComponentContainers_Delete.json | 20 + .../RegistryComponentContainers_Get.json | 38 + .../RegistryComponentContainers_List.json | 44 + ...istryComponentVersions_CreateOrUpdate.json | 87 + .../RegistryComponentVersions_Delete.json | 21 + .../RegistryComponentVersions_Get.json | 43 + .../RegistryComponentVersions_List.json | 50 + ...RegistryDataContainers_CreateOrUpdate.json | 84 + .../RegistryDataContainers_Delete.json | 20 + .../RegistryDataContainers_Get.json | 42 + .../RegistryDataContainers_List.json | 48 + ...ersions_CreateOrGetStartPendingUpload.json | 33 + .../RegistryDataVersions_CreateOrUpdate.json | 96 + .../RegistryDataVersions_Delete.json | 21 + .../RegistryDataVersions_Get.json | 46 + .../RegistryDataVersions_List.json | 55 + ...yEnvironmentContainers_CreateOrUpdate.json | 84 + .../RegistryEnvironmentContainers_Delete.json | 20 + .../RegistryEnvironmentContainers_Get.json | 35 + .../RegistryEnvironmentContainers_List.json | 41 + ...tryEnvironmentVersions_CreateOrUpdate.json | 140 + .../RegistryEnvironmentVersions_Delete.json | 21 + .../RegistryEnvironmentVersions_Get.json | 61 + .../RegistryEnvironmentVersions_List.json | 68 + ...egistryModelContainers_CreateOrUpdate.json | 66 + .../RegistryModelContainers_Delete.json | 20 + .../RegistryModelContainers_Get.json | 35 + .../RegistryModelContainers_List.json | 40 + ...ersions_CreateOrGetStartPendingUpload.json | 33 + .../RegistryModelVersions_CreateOrUpdate.json | 105 + .../RegistryModelVersions_Delete.json | 21 + .../RegistryModelVersions_Get.json | 49 + .../RegistryModelVersions_List.json | 61 + .../RegistryModelVersions_Package.json | 95 + .../Schedules_CreateOrUpdate.json | 121 + .../2023-06-01-preview/Schedules_Delete.json | 21 + .../2023-06-01-preview/Schedules_Get.json | 54 + .../2023-06-01-preview/Schedules_List.json | 59 + .../WorkspaceConnections_Create.json | 34 + .../WorkspaceConnections_Delete.json | 15 + .../WorkspaceConnections_Get.json | 26 + .../WorkspaceConnections_List.json | 41 + .../WorkspaceConnections_ListSecrets.json | 40 + .../WorkspaceConnections_Update.json | 53 + .../WorkspaceFeatures_List.json | 28 + .../Workspaces_CreateOrUpdate.json | 111 + .../2023-06-01-preview/Workspaces_Delete.json | 19 + .../Workspaces_Diagnose.json | 51 + .../2023-06-01-preview/Workspaces_Get.json | 102 + .../Workspaces_ListByResourceGroup.json | 48 + .../Workspaces_ListBySubscription.json | 47 + .../Workspaces_ListKeys.json | 37 + .../Workspaces_ListNotebookAccessToken.json | 22 + .../Workspaces_ListNotebookKeys.json | 18 + ...tOutboundNetworkDependenciesEndpoints.json | 48 + .../Workspaces_ListStorageAccountKeys.json | 17 + .../Workspaces_PrepareNotebook.json | 27 + .../Workspaces_ResyncKeys.json | 18 + .../2023-06-01-preview/Workspaces_Update.json | 47 + .../tsp-output/main.tsp | 68 + .../tsp-output/models.tsp | 8774 +++++++++++++++++ .../tsp-output/routes.tsp | 1608 +++ .../tsp-output/tspconfig.yaml | 11 + .../tsp-output/DataProduct.tsp | 31 +- .../tsp-output/DataProductsCatalog.tsp | 6 +- .../tsp-output/DataType.tsp | 31 +- ..._DataProductsCatalogsGetMaximumSetGen.json | 45 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 16 + ...alogsListByResourceGroupMaximumSetGen.json | 50 + ...alogsListByResourceGroupMinimumSetGen.json | 20 + ...talogsListBySubscriptionMaximumSetGen.json | 49 + ...talogsListBySubscriptionMinimumSetGen.json | 19 + ..._DataProductsAddUserRoleMaximumSetGen.json | 35 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 35 + ...reate_DataProductsCreateMaximumSetGen.json | 252 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 38 + ...elete_DataProductsDeleteMaximumSetGen.json | 18 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 18 + ...teStorageAccountSasTokenMaximumSetGen.json | 22 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 22 + ...ucts_Get_DataProductsGetMaximumSetGen.json | 102 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 18 + ...ductsListByResourceGroupMaximumSetGen.json | 106 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 21 + ...oductsListBySubscriptionMaximumSetGen.json | 105 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 20 + ...uctsListRolesAssignmentsMaximumSetGen.json | 31 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 31 + ...taProductsRemoveUserRoleMaximumSetGen.json | 24 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 24 + ...ey_DataProductsRotateKeyMaximumSetGen.json | 16 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 16 + ...pdate_DataProductsUpdateMaximumSetGen.json | 129 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 23 + ...s_Create_DataTypesCreateMaximumSetGen.json | 73 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 23 + ...Data_DataTypesDeleteDataMaximumSetGen.json | 20 + ...Data_DataTypesDeleteDataMinimumSetGen.json | 20 + ...s_Delete_DataTypesDeleteMaximumSetGen.json | 19 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 19 + ...StorageContainerSasTokenMaximumSetGen.json | 23 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 23 + ...taTypes_Get_DataTypesGetMaximumSetGen.json | 37 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 18 + ...taTypesListByDataProductMaximumSetGen.json | 41 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 21 + ...s_Update_DataTypesUpdateMaximumSetGen.json | 50 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 22 + .../arm-networkanalytics/tsp-output/main.tsp | 1 + .../tsp-output/models.tsp | 91 +- .../tsp-output/Account.tsp | 21 +- .../tsp-output/Quota.tsp | 3 + .../Accounts_CreateOrUpdate.json | 76 + .../2023-10-01-preview/Accounts_Delete.json | 19 + .../2023-10-01-preview/Accounts_Get.json | 38 + .../Accounts_ListByResourceGroup.json | 41 + .../Accounts_ListBySubscription.json | 40 + .../2023-10-01-preview/Accounts_Update.json | 47 + .../2023-10-01-preview/Quotas_Get.json | 31 + .../Quotas_ListBySubscription.json | 34 + .../arm-playwrighttesting/tsp-output/main.tsp | 1 + .../tsp-output/models.tsp | 47 + .../tsp-output/Association.tsp | 32 +- .../tsp-output/Frontend.tsp | 32 +- .../tsp-output/TrafficController.tsp | 35 +- .../AssociationsInterface_CreateOrUpdate.json | 51 + .../AssociationsInterface_Delete.json | 21 + .../2023-11-01/AssociationsInterface_Get.json | 28 + ...ionsInterface_ListByTrafficController.json | 31 + .../AssociationsInterface_Update.json | 35 + .../FrontendsInterface_CreateOrUpdate.json | 41 + .../2023-11-01/FrontendsInterface_Delete.json | 21 + .../2023-11-01/FrontendsInterface_Get.json | 25 + ...endsInterface_ListByTrafficController.json | 28 + .../2023-11-01/FrontendsInterface_Update.json | 26 + ...ficControllerInterface_CreateOrUpdate.json | 72 + .../TrafficControllerInterface_Delete.json | 20 + .../TrafficControllerInterface_Get.json | 39 + ...ntrollerInterface_ListByResourceGroup.json | 42 + ...ontrollerInterface_ListBySubscription.json | 41 + .../TrafficControllerInterface_Update.json | 44 + .../arm-servicenetworking/tsp-output/main.tsp | 1 + .../tsp-output/models.tsp | 53 + .../test/arm-sphere/tsp-output/Catalog.tsp | 26 +- .../arm-sphere/tsp-output/Certificate.tsp | 5 + .../test/arm-sphere/tsp-output/Deployment.tsp | 17 +- .../test/arm-sphere/tsp-output/Device.tsp | 30 +- .../arm-sphere/tsp-output/DeviceGroup.tsp | 31 +- .../test/arm-sphere/tsp-output/Image.tsp | 17 +- .../test/arm-sphere/tsp-output/Product.tsp | 27 +- .../Catalogs_CountDevices.json | 18 + .../Catalogs_CreateOrUpdate.json | 34 + .../2022-09-01-preview/Catalogs_Delete.json | 24 + .../2022-09-01-preview/Catalogs_Get.json | 21 + .../Catalogs_ListByResourceGroup.json | 30 + .../Catalogs_ListBySubscription.json | 29 + .../Catalogs_ListDeployments.json | 27 + .../Catalogs_ListDeviceGroups.json | 32 + .../Catalogs_ListDeviceInsights.json | 40 + .../Catalogs_ListDevices.json | 27 + .../2022-09-01-preview/Catalogs_Update.json | 25 + .../2022-09-01-preview/Certificates_Get.json | 17 + .../Certificates_ListByCatalog.json | 18 + .../Certificates_RetrieveCertChain.json | 19 + ...icates_RetrieveProofOfPossessionNonce.json | 22 + .../Deployments_CreateOrUpdate.json | 47 + .../Deployments_Delete.json | 27 + .../2022-09-01-preview/Deployments_Get.json | 38 + .../Deployments_ListByDeviceGroup.json | 42 + .../DeviceGroups_ClaimDevices.json | 25 + .../DeviceGroups_CountDevices.json | 20 + .../DeviceGroups_CreateOrUpdate.json | 46 + .../DeviceGroups_Delete.json | 26 + .../2022-09-01-preview/DeviceGroups_Get.json | 26 + .../DeviceGroups_ListByProduct.json | 30 + .../DeviceGroups_Update.json | 33 + .../Devices_CreateOrUpdate.json | 34 + .../2022-09-01-preview/Devices_Delete.json | 27 + .../Devices_GenerateCapabilityImage.json | 32 + .../2022-09-01-preview/Devices_Get.json | 29 + .../Devices_ListByDeviceGroup.json | 29 + .../2022-09-01-preview/Devices_Update.json | 36 + .../Images_CreateOrUpdate.json | 34 + .../2022-09-01-preview/Images_Delete.json | 25 + .../2022-09-01-preview/Images_Get.json | 17 + .../Images_ListByCatalog.json | 27 + .../Products_CountDevices.json | 21 + .../Products_CreateOrUpdate.json | 30 + .../2022-09-01-preview/Products_Delete.json | 25 + .../Products_GenerateDefaultDeviceGroups.json | 40 + .../2022-09-01-preview/Products_Get.json | 23 + .../Products_ListByCatalog.json | 29 + .../2022-09-01-preview/Products_Update.json | 30 + .../test/arm-sphere/tsp-output/main.tsp | 1 + .../test/arm-sphere/tsp-output/models.tsp | 85 + .../arm-storage/tsp-output/BlobContainer.tsp | 20 +- .../tsp-output/BlobInventoryPolicy.tsp | 7 +- .../tsp-output/BlobServiceProperties.tsp | 33 +- .../arm-storage/tsp-output/DeletedAccount.tsp | 3 + .../tsp-output/EncryptionScope.tsp | 7 +- .../tsp-output/FileServiceProperties.tsp | 33 +- .../test/arm-storage/tsp-output/FileShare.tsp | 10 +- .../tsp-output/ImmutabilityPolicy.tsp | 32 +- .../test/arm-storage/tsp-output/LocalUser.tsp | 7 + .../tsp-output/ManagementPolicy.tsp | 6 +- .../tsp-output/ObjectReplicationPolicy.tsp | 5 + .../tsp-output/PrivateEndpointConnection.tsp | 5 + .../tsp-output/QueueServiceProperties.tsp | 33 +- .../arm-storage/tsp-output/StorageAccount.tsp | 45 +- .../arm-storage/tsp-output/StorageQueue.tsp | 20 +- .../test/arm-storage/tsp-output/Table.tsp | 20 +- .../tsp-output/TableServiceProperties.tsp | 33 +- .../BlobContainers_ClearLegalHold.json | 27 + ...licy_CreateOrUpdateImmutabilityPolicy.json | 34 + ...licyWithAllowProtectedAppendWritesAll.json | 34 + ...utContainerWithDefaultEncryptionScope.json | 42 + ...reate_PutContainerWithObjectLevelWorm.json | 45 + .../BlobContainers_Create_PutContainers.json | 29 + .../2022-09-01/BlobContainers_Delete.json | 16 + ...obContainers_DeleteImmutabilityPolicy.json | 28 + ...obContainers_ExtendImmutabilityPolicy.json | 32 + .../BlobContainers_GetImmutabilityPolicy.json | 28 + ...sGetWithAllowProtectedAppendWritesAll.json | 91 + .../BlobContainers_Get_GetContainers.json | 83 + ...iners_Lease_AcquireALeaseOnAContainer.json | 26 + ...tainers_Lease_BreakALeaseOnAContainer.json | 26 + .../BlobContainers_List_ListContainers.json | 48 + ...Containers_List_ListDeletedContainers.json | 52 + ...BlobContainers_LockImmutabilityPolicy.json | 27 + .../BlobContainers_ObjectLevelWorm.json | 21 + ...s_SetLegalHold_SetLegalHoldContainers.json | 31 + ...nersWithAllowProtectedAppendWritesAll.json | 33 + .../2022-09-01/BlobContainers_Update.json | 37 + ..._StorageAccountSetBlobInventoryPolicy.json | 164 + ...ncludeDeleteAndNewSchemaForHnsAccount.json | 199 + ...udeDeleteAndNewSchemaForNonHnsAccount.json | 197 + .../BlobInventoryPolicies_Delete.json | 16 + .../2022-09-01/BlobInventoryPolicies_Get.json | 67 + .../BlobInventoryPolicies_List.json | 70 + .../BlobServices_GetServiceProperties.json | 98 + .../2022-09-01/BlobServices_List.json | 101 + ...s_BlobServicesPutAllowPermanentDelete.json | 39 + ...ervicesPutLastAccessTimeBasedTracking.json | 43 + ..._SetServiceProperties_PutBlobServices.json | 173 + .../2022-09-01/DeletedAccounts_Get.json | 27 + .../2022-09-01/DeletedAccounts_List.json | 41 + .../2022-09-01/EncryptionScopes_Get.json | 27 + .../2022-09-01/EncryptionScopes_List.json | 45 + .../2022-09-01/EncryptionScopes_Patch.json | 40 + ..._Put_StorageAccountPutEncryptionScope.json | 41 + ...tionScopeWithInfrastructureEncryption.json | 47 + .../FileServices_GetServiceProperties.json | 88 + .../2022-09-01/FileServices_List.json | 91 + ..._SetServiceProperties_PutFileServices.json | 153 + ...utFileServicesEnableSecureSmbFeatures.json | 47 + ..._PutFileServicesEnableSmbMultichannel.json | 45 + .../FileShares_Create_CreateNfsShares.json | 39 + .../FileShares_Create_PutShares.json | 29 + ...Shares_Create_PutSharesWithAccessTier.json | 39 + .../2022-09-01/FileShares_Delete.json | 16 + .../FileShares_Get_GetShareStats.json | 28 + .../2022-09-01/FileShares_Get_GetShares.json | 26 + ...ileShares_Lease_AcquireALeaseOnAShare.json | 26 + .../FileShares_Lease_BreakALeaseOnAShare.json | 26 + .../FileShares_List_ListDeletedShares.json | 44 + .../FileShares_List_ListShareSnapshots.json | 41 + .../FileShares_List_ListShares.json | 40 + .../2022-09-01/FileShares_Restore.json | 19 + .../FileShares_Update_UpdateShareAcls.json | 47 + .../FileShares_Update_UpdateShares.json | 33 + ...lUsers_CreateOrUpdate_CreateLocalUser.json | 67 + ...lUsers_CreateOrUpdate_UpdateLocalUser.json | 36 + .../2022-09-01/LocalUsers_Delete.json | 16 + .../examples/2022-09-01/LocalUsers_Get.json | 40 + .../examples/2022-09-01/LocalUsers_List.json | 61 + .../2022-09-01/LocalUsers_ListKeys.json | 25 + .../LocalUsers_RegeneratePassword.json | 19 + ...e_StorageAccountSetManagementPolicies.json | 182 + ...olicyBaseBlobDaysAfterCreationActions.json | 92 + ...untSetManagementPolicyColdTierActions.json | 130 + ...anagementPolicyForBlockAndAppendBlobs.json | 102 + ...ountSetManagementPolicyHotTierActions.json | 100 + ...tPolicyLastAccessTimeBasedBlobActions.json | 104 + ...gementPolicyLastTierChangeTimeActions.json | 118 + ...anagementPolicyWithSnapshotAndVersion.json | 136 + .../2022-09-01/ManagementPolicies_Delete.json | 16 + .../2022-09-01/ManagementPolicies_Get.json | 61 + ...eObjectReplicationPolicyOnDestination.json | 57 + ...CreateObjectReplicationPolicyOnSource.json | 61 + ...eObjectReplicationPolicyOnDestination.json | 67 + ...UpdateObjectReplicationPolicyOnSource.json | 69 + .../ObjectReplicationPolicies_Delete.json | 16 + .../ObjectReplicationPolicies_Get.json | 49 + .../ObjectReplicationPolicies_List.json | 37 + .../PrivateEndpointConnections_Delete.json | 16 + .../PrivateEndpointConnections_Get.json | 32 + .../PrivateEndpointConnections_List.json | 51 + .../PrivateEndpointConnections_Put.json | 40 + ...ateLinkResources_ListByStorageAccount.json | 103 + .../QueueServices_GetServiceProperties.json | 84 + .../2022-09-01/QueueServices_List.json | 87 + .../QueueServices_SetServiceProperties.json | 149 + .../Queue_Create_QueueOperationPut.json | 22 + ..._Create_QueueOperationPutWithMetadata.json | 35 + .../examples/2022-09-01/Queue_Delete.json | 15 + .../examples/2022-09-01/Queue_Get.json | 27 + .../examples/2022-09-01/Queue_List.json | 42 + .../examples/2022-09-01/Queue_Update.json | 22 + ...s_AbortHierarchicalNamespaceMigration.json | 18 + ...StorageAccounts_CheckNameAvailability.json | 19 + ...ageAccounts_Create_NfsV3AccountCreate.json | 63 + ...eAccounts_Create_StorageAccountCreate.json | 151 + ...ageAccountCreateAllowedCopyScopeToAad.json | 146 + ...ntCreateAllowedCopyScopeToPrivateLink.json | 146 + ...ountCreateDisallowPublicNetworkAccess.json | 150 + ...ntCreateDnsEndpointTypeToAzureDnsZone.json | 153 + ...ccountCreateDnsEndpointTypeToStandard.json | 153 + ...ccountCreateEnablePublicNetworkAccess.json | 150 + ...eAccountCreatePremiumBlockBlobStorage.json | 91 + ...UserAssignedEncryptionIdentityWithCmk.json | 120 + ...IdentityWithFederatedIdentityClientId.json | 122 + ...geAccountCreateWithImmutabilityPolicy.json | 72 + .../2022-09-01/StorageAccounts_Delete.json | 15 + ...ounts_Failover_StorageAccountFailover.json | 19 + ...ailover_StorageAccountFailoverPlanned.json | 20 + ...ageAccountGetAsyncSkuConversionStatus.json | 36 + ...roperties_StorageAccountGetProperties.json | 103 + ...StorageAccountGetPropertiesCmkEnabled.json | 106 + ...GetPropertiesCmkVersionExpirationTime.json | 107 + ...counts_HierarchicalNamespaceMigration.json | 19 + .../2022-09-01/StorageAccounts_List.json | 315 + .../StorageAccounts_ListAccountSAS.json | 27 + .../StorageAccounts_ListByResourceGroup.json | 80 + .../2022-09-01/StorageAccounts_ListKeys.json | 29 + .../StorageAccounts_ListServiceSAS.json | 24 + ...teKey_StorageAccountRegenerateKerbKey.json | 37 + ...nerateKey_StorageAccountRegenerateKey.json | 32 + .../StorageAccounts_RestoreBlobRanges.json | 66 + ...rageAccounts_RevokeUserDelegationKeys.json | 13 + ...ccounts_Update_StorageAccountEnableAd.json | 77 + ...counts_Update_StorageAccountEnableCmk.json | 96 + ...eAccounts_Update_StorageAccountUpdate.json | 154 + ...ageAccountUpdateAllowedCopyScopeToAad.json | 151 + ...countUpdateDisablePublicNetworkAccess.json | 151 + ...UserAssignedEncryptionIdentityWithCmk.json | 118 + ...IdentityWithFederatedIdentityClientId.json | 120 + ...geAccountUpdateWithImmutabilityPolicy.json | 52 + .../TableServices_GetServiceProperties.json | 84 + .../2022-09-01/TableServices_List.json | 87 + .../TableServices_SetServiceProperties.json | 149 + .../Table_Create_TableOperationPut.json | 24 + ...e_Create_TableOperationPutOrPatchAcls.json | 64 + .../examples/2022-09-01/Table_Delete.json | 15 + .../examples/2022-09-01/Table_Get.json | 24 + .../examples/2022-09-01/Table_List.json | 36 + .../Table_Update_TableOperationPatch.json | 24 + ...e_Update_TableOperationPutOrPatchAcls.json | 64 + .../test/arm-storage/tsp-output/main.tsp | 4 +- .../test/arm-storage/tsp-output/models.tsp | 207 +- .../test/arm-storage/tsp-output/routes.tsp | 2 + .../test/arm-test/tsp-output/DictProperty.tsp | 3 + .../test/arm-test/tsp-output/Employee.tsp | 15 +- .../test/arm-test/tsp-output/Enroll.tsp | 4 +- .../test/arm-test/tsp-output/main.tsp | 1 + .../test/arm-test/tsp-output/models.tsp | 45 + .../test/batch/tsp-output/main.tsp | 1 + .../test/batch/tsp-output/models.tsp | 240 +- .../test/bodyComplex/tsp-output/main.tsp | 1 + .../test/bodyComplex/tsp-output/models.tsp | 1 + .../test/complexObject/tsp-output/main.tsp | 1 + .../confidentialLedger/tsp-output/main.tsp | 1 + .../confidentialLedger/tsp-output/models.tsp | 3 + .../test/keyvault/tsp-output/main.tsp | 1 + .../test/keyvault/tsp-output/models.tsp | 33 +- .../test/loadTest/tsp-output/main.tsp | 1 + .../test/loadTest/tsp-output/models.tsp | 21 + .../test/nh/tsp-output/main.tsp | 1 + .../test/nh/tsp-output/models.tsp | 5 +- .../test/openAI/tsp-output/main.tsp | 1 + .../test/pagination/tsp-output/main.tsp | 1 + .../test/pagination/tsp-output/models.tsp | 1 + .../test/qna/tsp-output/main.tsp | 1 + .../test/qna/tsp-output/models.tsp | 9 + .../test/qnaAuthoring/tsp-output/main.tsp | 1 + .../test/qnaAuthoring/tsp-output/models.tsp | 6 + .../test/qnaAuthoring/tsp-output/routes.tsp | 4 +- .../test/qnaRuntime/tsp-output/models.tsp | 2 + .../test/schemaRegistry/tsp-output/main.tsp | 1 + .../test/url/tsp-output/models.tsp | 3 +- .../test/webpubsub/tsp-output/main.tsp | 1 + .../test/webpubsub/tsp-output/models.tsp | 5 +- 1736 files changed, 132222 insertions(+), 847 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/fix_converter_2024-01-08-09-46.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_ListByDataManagerForAgriculture.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_ListByResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_ListByResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/alertsmanagement.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsAnActionGroupToAllAlertsInASubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsTwoActionGroupsToAllSev0AndSev1AlertsInTwoResourceGroups.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAlertsOnASpecificVmDuringAOneOffMaintenanceWindow_1800_2000AtASpecificDatePacificStandardTime.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsInASubscriptionComingFromASpecificAlertRule.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsOnAnyVmInTwoResourceGroupsDuringARecurringMaintenanceWindow_2200_0400EverySatAndSunIndiaStandardTime.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsOutsideBusinessHoursMonFri_09_00_17_00EasternStandardTime.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_GetByName.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_ChangeState.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetAll.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetById.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetHistory.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_ChangeState.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetAll.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetById.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetHistory.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/analysisservices.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_CheckNameAvailability.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_DissociateGateway.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_GetDetails.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListGatewayStatus.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForExisting.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForNew.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Resume.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Suspend.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsConsumption.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsDedicated.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ApplyNetworkConfigurationUpdates.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithAccessKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithSystemManagedIdentity.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithUserAssignedManagedIdentity.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CheckNameAvailability.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustomHostname.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceHavingMsi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIp.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInZones.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKeyVault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificates.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdentity.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementUndelete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_GetSsoToken.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetMultiRegionInternalVnet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetServiceHavingMsi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Restore.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceDisableTls10.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServicePublisherDetails.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_ListByOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperationPetStore.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_ListByApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiProduct_ListByApis.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRevision_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_ListByApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiClone.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServiceUrl.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingOai3Import.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingWadlImport.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateGraphQlApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateWebSocketApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiContract.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiRevisionContract.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByTags.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendProxyBackend.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendServiceFabric.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Reconnect.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificateWithKeyVault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificateWithKeyVault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_RefreshSecret.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_GetByName.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_Purge.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayApi_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GenerateToken.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_RegenerateKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema1.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema2.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema1.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema2.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GroupUser_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroupExternal.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateAiLogger.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateEhLogger.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValue.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValueWithKeyVault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValue.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValueWithKeyVault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListValue.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_RefreshSecret.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByLocation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientEmail_ListByNotification.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientUser_ListByNotification.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Operation_ListByTags.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OutboundNetworkDependenciesEndpoints_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_HttpConnectivityCheck.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_TcpConnectivityCheck.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PolicyDescription_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalSettings_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetByName.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetPrivateLinkResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListPrivateLinkResources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductApi_ListByProduct.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductGroup_ListByProduct.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductSubscriptions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByTags.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByCounterKeys_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByPeriodKeys_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Region_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByGeo.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByProduct.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByRequest.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByTime.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByUser.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegeneratePrimaryKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegenerateSecondaryKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TagResource_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_AssignToOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_DetachFromOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetByOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetEntityStateByOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_ListByOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegeneratePrimaryKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegenerateSecondaryKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantGitAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegeneratePrimaryKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegenerateSecondaryKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Deploy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_GetSyncState.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Save.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Validate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserConfirmationPassword_Send.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserGroup_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserIdentities_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GenerateSsoUrl.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetSharedAccessToken.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/authorization.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_ListForResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Cancel.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Validate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Cancel.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Validate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchPartialRoleManagementPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchRoleManagementPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_DeleteBusinessProcessDevelopmentArtifact.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_GetBusinessProcessDevelopmentArtifact.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBusinessProcessDevelopmentArtifacts.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBySpace.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Patch.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_SaveBusinessProcessDevelopmentArtifact.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ValidateBusinessProcessDevelopmentArtifact.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_ListByBusinessProcess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_ListByApplication.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Patch.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_ListBySpace.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Patch.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Patch.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_ListByCapacityReservationGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSFamily.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSVersion.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSFamilies.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSVersions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetInstanceView.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetRemoteDesktopFile.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Rebuild.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Reimage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Restart.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_GetUpdateDomain.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_ListUpdateDomains.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRoles.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRolesInASpecificAvailabilityZone.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRole.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndCertificateFromKeyVault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndRdpExtension.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_DeleteInstances.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_GetInstanceView.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_ListAll.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_PowerOff.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Rebuild.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Reimage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Restart.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Start.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleries_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroupWithUltraSsdSupport.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateADedicatedHostGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateAnUltraSsdEnabledDedicatedHostGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListAvailableSizes.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Restart.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateResize.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_DeleteAPrivateEndpointConnection.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetAPrivateEndpointConnection.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetPrivateLinkResources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResourceWithPrivateEndpoints.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListPrivateEndpointConnections.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_UpdateAPrivateEndpointConnection.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentTenant.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSetWhenAutoKeyRotationFailed.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListAssociatedResources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueSucceeded.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueUpdating.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointWhenSourceResourceIsFromADifferentRegion.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_GrantAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_ListByRestorePoint.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_RevokeAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAConfidentialVmSupportedDiskEncryptedWithCustomerManagedKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskAccessResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskEncryptionSet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByCopyingASnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromADifferentSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromTheSameSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAPlatformImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryCommunityImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryDirectSharedImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnExistingManagedDiskInTheSameOrDifferentSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromElasticSanVolumeSnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromImportSecureCreateOption.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromUploadPreparedSecureCreateOption.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithDataAccessAuthMode.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithOptimizedForFrequentAttach.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPerformancePlus.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPremiumV2AccountType.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSecurityProfile.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSsdZrsAccountType.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithUltraAccountTypeWithReadOnlyPropertySet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedUploadDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDiskInExtendedLocation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnUltraManagedDiskWithLogicalSectorSize_512E.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetASasOnAManagedDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetSasOnManagedDiskAndVmGuestState.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_RevokeAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_CreateOrUpdateABurstingEnabledManagedDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddAcceleratedNetworking.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddArchitecture.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddPurchasePlan.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddSupportsHibernation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToChangeTier.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableBursting.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableOptimizedForFrequentAttach.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskWithDiskControllerTypes.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateManagedDiskToRemoveDiskAccessResourceAssociation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateACommunityGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSharingProfile.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSoftDeletionEnabled.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetACommunityGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithExpandSharingProfileGroups.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithSelectPermissions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersion.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersionWithReplicationStatus.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_ListByGalleryApplication.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_ListByGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapshotsAsASource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMode.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVhdAsASource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVmAsSource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersion.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithReplicationStatus.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithSnapshotsAsASource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithVhdAsASource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_ListByGalleryImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionManagedImageAsSource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionWithoutSourceId.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_ListByGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_AddSharingIdToTheSharingProfileOfAGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ResetSharingProfileOfAGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ShareAGalleryToCommunity.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlobWithDiskEncryptionSetResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDiskWithDiskEncryptionSetResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshotWithDiskEncryptionSetResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAnExistingVirtualMachine.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromABlob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromAManagedDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromASnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollection.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollectionForCrossRegionCopy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionButNotTheRestorePointsContainedInTheRestorePointCollection.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionIncludingTheRestorePointsContainedInTheRestorePointCollection.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_ListAll.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CopyARestorePointToADifferentRegion.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CreateARestorePoint.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetARestorePoint.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetRestorePointWithInstanceView.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromTheSameSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnElasticSanVolumeSnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegion.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutASnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutAnIncrementalSnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_GrantAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_RevokeAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshotWithAcceleratedNetworking.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_GenerateKeyPair.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_GetByVirtualMachine.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_ListByVirtualMachine.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartExtensionUpgrade.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_GetInstanceView.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithUserData.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithVmSizeProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RetrieveBootDiagnosticsData.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RunCommand.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_SimulateEviction.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateACustomImageScaleSetFromAnUnmanagedGeneralizedOsImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAPlatformImageScaleSetWithUnmanagedOsDisks.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromACustomImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromAGeneralizedSharedImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromASpecializedSharedImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWhereNicConfigHasDisableTcpStateTrackingProperty.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAMarketplaceImagePlan.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureApplicationGateway.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureLoadBalancer.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithApplicationProfile.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAutomaticRepairsEnabled.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithBootDiagnostics.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskControllerType.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskEncryptionSetResourceInOsDiskAndDataDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEmptyDataDisksOnEachVm.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisks.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisksUsingPlacementProperty.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithExtensionTimeBudget.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithFpgaNetworkInterfaces.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithHostEncryptionUsingEncryptionAtHostProperty.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithManagedBootDiagnostics.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithNetworkInterfacesWithPublicIpAddressDnsSettings.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithOsImageScheduledEventsEnabled.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPasswordAuthentication.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPremiumStorage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPriorityMixPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithScaleInPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityPostureReference.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityTypeAsConfidentialVm.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithServiceArtifactReference.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSpotRestorePolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSshAuthentication.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithTerminateScheduledEventsEnabled.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUefiSettingsOfSecureBootAndVTpm.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUserData.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVirtualMachinesInDifferentZones.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVmSizeProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionThatHasSuppressFailuresEnabled.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionWithProtectedSettingsFromKeyVault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateOrUpdateAScaleSetWithCapacityReservation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetPlacedOnADedicatedHostGroupThroughAutomaticPlacement.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetWithUserData.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetVmScaleSetVmWithDiskControllerType.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListByLocation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_AssessPatches.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateACustomImageVmFromAnUnmanagedGeneralizedOsImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingAssessmentModeOfImageDefault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfImageDefault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAPlatformImageVmWithUnmanagedOsAndDataDisks.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACommunityGalleryImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACustomImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromAGeneralizedSharedImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASharedGalleryImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASpecializedSharedImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAVirtualMachineScaleSetWithCustomerAssignedPlatformFaultDomain.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAnAvailabilitySet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAMarketplaceImagePlan.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAnExtensionsTimeBudget.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithApplicationProfile.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithBootDiagnostics.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskControllerType.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskEncryptionSetResourceIdInTheOsDiskAndDataDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEmptyDataDisks.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInCacheDiskUsingPlacementProperty.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInResourceDiskUsingPlacementProperty.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHibernationEnabled.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHostEncryptionUsingEncryptionAtHostProperty.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithManagedBootDiagnostics.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfiguration.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfigurationWithPublicIpAddressDnsSettings.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPasswordAuthentication.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPremiumStorage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithScheduledEventsProfile.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithCustomerManagedKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithPlatformManagedKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSshAuthentication.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUefiSettingsOfSecureBootAndVTpm.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUserData.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithVmSizeProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingAssessmentModeOfImageDefault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByOs.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndEnableHotpatchingSetToTrue.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfManual.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateOrUpdateAVmWithCapacityReservation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Generalize.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachine.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithDiskControllerTypeProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithVmSizeProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstallPatches.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetInstanceViewOfAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetVirtualMachineInstanceView.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAvailableSizes.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListByLocation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reapply.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageANonEphemeralVirtualMachine.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageAVirtualMachine.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RetrieveBootDiagnosticsData.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RunCommand.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_SimulateEviction.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByDetachingDataDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByForceDetachingDataDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/dns.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordsetWithAliasTargetResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateAaaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCnameRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateMxRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateNsRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreatePtrRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSoaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSrvRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateTxtRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteARecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteAaaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCnameRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteMxRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteNsRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeletePtrRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteSrvRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteTxtRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetARecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetAaaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCnameRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetMxRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetNsRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetPtrRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSoaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSrvRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetTxtRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByDnsZone.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListARecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListAaaaRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCaaRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCnameRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListMxRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListNsRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListPtrRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSoaRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSrvRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListTxtRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchARecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchAaaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCnameRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchMxRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchNsRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchPtrRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSoaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSrvRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchTxtRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/machinelearningservices.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_AttachAKubernetesCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAAmlCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateADataFactoryCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnAksCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithMinimalInputs.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithSchedules.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAAmlCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAnAksCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAksCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAmlCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAKubernetesCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAnComputeInstance.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListNodes.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Restart.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Start.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Stop.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateCustomServices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateIdleShutdownSetting.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureBlobWAccountKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_GetEntity.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Backfill.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_ListMaterializationJobs.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_GetEntity.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Cancel.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateAutoMlJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateCommandJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdatePipelineJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateSweepJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetAutoMlJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetCommandJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetPipelineJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetSweepJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListAutoMlJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListCommandJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListPipelineJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListSweepJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_ExportLabels.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Pause.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Resume.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkProvisions_ProvisionManagedNetwork.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateManagedOnlineDeployment.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_GetLogs.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetKubernetesOnlineDeployment.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetManagedOnlineDeployment.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListKubernetesOnlineDeploymentSkus.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListManagedOnlineDeploymentSkus.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateKubernetesOnlineDeployment.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateManagedOnlineDeployment.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_GetToken.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_RegenerateKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_RemoveRegions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrGetStartPendingUpload.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrGetStartPendingUpload.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrGetStartPendingUpload.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Package.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceFeatures_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Diagnose.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookAccessToken.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListOutboundNetworkDependenciesEndpoints.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListStorageAccountKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_PrepareNotebook.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ResyncKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_ListByTrafficController.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_ListByTrafficController.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CountDevices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeployments.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceGroups.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceInsights.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDevices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_ListByCatalog.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveCertChain.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveProofOfPossessionNonce.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_ListByDeviceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ClaimDevices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CountDevices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ListByProduct.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_GenerateCapabilityImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_ListByDeviceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_ListByCatalog.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CountDevices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_GenerateDefaultDeviceGroups.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_ListByCatalog.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ClearLegalHold.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithDefaultEncryptionScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithObjectLevelWorm.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainers.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_DeleteImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ExtendImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_GetImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetBlobContainersGetWithAllowProtectedAppendWritesAll.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetContainers.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_AcquireALeaseOnAContainer.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_BreakALeaseOnAContainer.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListContainers.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListDeletedContainers.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_LockImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ObjectLevelWorm.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainers.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainersWithAllowProtectedAppendWritesAll.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_GetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutAllowPermanentDelete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutLastAccessTimeBasedTracking.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_PutBlobServices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Patch.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_GetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSecureSmbFeatures.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSmbMultichannel.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_CreateNfsShares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutShares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutSharesWithAccessTier.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShareStats.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_AcquireALeaseOnAShare.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_BreakALeaseOnAShare.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListDeletedShares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShareSnapshots.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Restore.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShareAcls.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_CreateLocalUser.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_UpdateLocalUser.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_RegeneratePassword.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicies.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyColdTierActions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyHotTierActions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastAccessTimeBasedBlobActions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastTierChangeTimeActions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyWithSnapshotAndVersion.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnDestination.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnSource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnDestination.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnSource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Put.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateLinkResources_ListByStorageAccount.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_GetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_SetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPut.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPutWithMetadata.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_AbortHierarchicalNamespaceMigration.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_CheckNameAvailability.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_NfsV3AccountCreate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToAad.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToPrivateLink.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDisallowPublicNetworkAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToStandard.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateEnablePublicNetworkAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreatePremiumBlockBlobStorage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedEncryptionIdentityWithCmk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateWithImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailover.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailoverPlanned.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetAsyncSkuConversionStatus.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkEnabled.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkVersionExpirationTime.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_HierarchicalNamespaceMigration.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListAccountSAS.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListServiceSAS.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKerbKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RestoreBlobRanges.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RevokeUserDelegationKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableAd.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableCmk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateAllowedCopyScopeToAad.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateDisablePublicNetworkAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedEncryptionIdentityWithCmk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateWithImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_GetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_SetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPut.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPutOrPatchAcls.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPatch.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPutOrPatchAcls.json diff --git a/.prettierignore b/.prettierignore index 6ccf146fc2..951512e228 100644 --- a/.prettierignore +++ b/.prettierignore @@ -338,5 +338,6 @@ packages/extensions/core/test/plugins/*/expected/*.json # MICROSOFT SECURITY.md /SECURITY.md -# Generated typespec +# Generated typespec and examples packages/extensions/openapi-to-typespec/test/**/*.tsp +packages/extensions/openapi-to-typespec/test/**/*.json diff --git a/common/changes/@autorest/openapi-to-typespec/fix_converter_2024-01-08-09-46.json b/common/changes/@autorest/openapi-to-typespec/fix_converter_2024-01-08-09-46.json new file mode 100644 index 0000000000..ac5cf8d547 --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/fix_converter_2024-01-08-09-46.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Fix validation issues for converter", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index e384513d3c..4eb9ea1f6b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -197,6 +197,9 @@ dependencies: chalk: specifier: ^4.1.0 version: 4.1.2 + change-case-all: + specifier: ~2.1.0 + version: 2.1.0 cli-progress: specifier: ~3.10.0 version: 3.10.0 @@ -2652,6 +2655,15 @@ packages: supports-color: 7.2.0 dev: false + /change-case-all@2.1.0: + resolution: {integrity: sha512-v6b0WWWkZUMHVuYk82l+WROgkUm4qEN2w5hKRNWtEOYwWqUGoi8C6xH0l1RLF1EoWqDFK6MFclmN3od6ws3/uw==} + dependencies: + change-case: 5.4.0 + sponge-case: 2.0.2 + swap-case: 3.0.2 + title-case: 3.0.3 + dev: false + /change-case@4.1.2: resolution: {integrity: sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==} dependencies: @@ -2669,6 +2681,14 @@ packages: tslib: 2.6.2 dev: false + /change-case@5.0.2: + resolution: {integrity: sha512-tH6YZXViaeC2/Mnt8m4gSmbZfNorC2rhwCX2bXw8SYZWr8ljCPB7iA+1TLG9t7yroWBFauc63LlOZ1gucMVCWw==} + dev: false + + /change-case@5.4.0: + resolution: {integrity: sha512-11YRFf0f4pI+ROHUfq64WivyrcNSrZjdDt2qgVxvAObtj/Pwnu5uAKObHRbN9uAhaDFkvkqcKVEl8Dxnmx+N7w==} + dev: false + /char-regex@1.0.2: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} @@ -7419,6 +7439,10 @@ packages: extend-shallow: 3.0.2 dev: false + /sponge-case@2.0.2: + resolution: {integrity: sha512-LBnE+y0zs+ajPFa0Fn/wGhCqigua+AxYf4MZFO3l83e/rAEdtTxiXf/0u6+9VzLClVEHrow9Vpj5FycAtaHNcA==} + dev: false + /sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: false @@ -7619,6 +7643,10 @@ packages: engines: {node: '>= 0.4'} dev: false + /swap-case@3.0.2: + resolution: {integrity: sha512-1tJUDXK5JZTVg04yDTMQnz1c9KFoTGQQo4QZuNbj5olv0ahyQK0R+OIU0KsbjmUhul+wg5iJFGfVRtilC5/GtQ==} + dev: false + /synckit@0.8.5: resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==} engines: {node: ^14.18.0 || >=16.0.0} @@ -7740,6 +7768,12 @@ packages: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: false + /title-case@3.0.3: + resolution: {integrity: sha512-e1zGYRvbffpcHIrnuqT0Dh+gEJtDaxDSoG4JAIpq4oDFyooziLBIiYQv0GBT4FUAnUop5uZ1hiIAj7oAF6sOCA==} + dependencies: + tslib: 2.6.2 + dev: false + /titleize@3.0.0: resolution: {integrity: sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==} engines: {node: '>=12'} @@ -9317,7 +9351,7 @@ packages: dev: false file:projects/openapi-to-typespec.tgz(jest@29.7.0): - resolution: {integrity: sha512-RqW7Hnn2Gm4Ytv2iUSt/wcaMZNUG15OZhayym0nAWp4BqpvjnV6UzruHlBu9pth0oZVC0uPK0dqIYZ/rDcLJ6g==, tarball: file:projects/openapi-to-typespec.tgz} + resolution: {integrity: sha512-zAj7zkO6vCcOuJPYLE8z93z4EqthmE0ByOjCnhOSutRmbgrMC357Rocf0KoOefoFJcA+IqIy3kIHBRPj/F7PVw==, tarball: file:projects/openapi-to-typespec.tgz} id: file:projects/openapi-to-typespec.tgz name: '@rush-temp/openapi-to-typespec' version: 0.0.0 @@ -9341,6 +9375,8 @@ packages: '@typespec/rest': 0.51.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) '@typespec/versioning': 0.51.0(@typespec/compiler@0.51.0) chalk: 4.1.2 + change-case: 5.0.2 + change-case-all: 2.1.0 eslint: 8.53.0 eslint-plugin-import: 2.29.0(eslint@8.53.0) eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) diff --git a/packages/extensions/openapi-to-typespec/convert.ps1 b/packages/extensions/openapi-to-typespec/convert.ps1 index 094c5ad3b0..49824a8c79 100644 --- a/packages/extensions/openapi-to-typespec/convert.ps1 +++ b/packages/extensions/openapi-to-typespec/convert.ps1 @@ -22,13 +22,13 @@ param( $csharpCodegen = "https://aka.ms/azsdk/openapi-to-typespec-csharp", [string] # Specified the converter codegen, default to https://aka.ms/azsdk/openapi-to-typespec. - $converterCodegen = "" + $converterCodegen = "." ) function GenerateMetadata () { Write-Host "##Generating metadata with csharp codegen in $outputFolder with $csharpCodegen" - $cmd = "autorest --csharp --max-memory-size=8192 --use=`"$csharpCodegen`" --output-folder=$outputFolder --mgmt-debug.only-generate-metadata --azure-arm --skip-csproj $swaggerConfigFile" + $cmd = "autorest --csharp --isAzureSpec --isArm --max-memory-size=8192 --use=`"$csharpCodegen`" --output-folder=$outputFolder --mgmt-debug.only-generate-metadata --azure-arm --skip-csproj $swaggerConfigFile" Write-Host "$cmd" Invoke-Expression $cmd if ($LASTEXITCODE) { exit $LASTEXITCODE } @@ -42,7 +42,7 @@ function GenerateMetadata () function DoConvert () { Write-Host "##Converting from swagger to tsp with in $outputFolder with $converterCodegen" - $cmd = "autorest --openapi-to-typespec --isArm --use=`"$converterCodegen`" --output-folder=$outputFolder --src-path=tsp-output $swaggerConfigFile" + $cmd = "autorest --openapi-to-typespec --isAzureSpec --isArm --use=`"$converterCodegen`" --output-folder=$outputFolder --src-path=tsp-output $swaggerConfigFile" Write-Host "$cmd" Invoke-Expression $cmd if ($LASTEXITCODE) { exit $LASTEXITCODE } diff --git a/packages/extensions/openapi-to-typespec/package.json b/packages/extensions/openapi-to-typespec/package.json index 7ee8a35002..76bff5fbbf 100644 --- a/packages/extensions/openapi-to-typespec/package.json +++ b/packages/extensions/openapi-to-typespec/package.json @@ -53,7 +53,8 @@ "@typespec/openapi3": "^0.50.0", "prettier": "~3.1.0", "lodash": "~4.17.20", - "pluralize": "^8.0.0" + "pluralize": "^8.0.0", + "change-case-all": "~2.1.0" }, "devDependencies": { "autorest": "~3.7.1", diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts index 8879cff456..ecb48369f6 100644 --- a/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts @@ -1,6 +1,6 @@ import { join } from "path"; import { getSession } from "../autorest-session"; -import { generateArmResource } from "../generate/generate-arm-resource"; +import { generateArmResource, generateArmResourceExamples } from "../generate/generate-arm-resource"; import { TypespecProgram, TspArmResource } from "../interfaces"; import { formatTypespecFile } from "../utils/format"; import { getNamespace } from "../utils/namespace"; @@ -8,6 +8,7 @@ import { getNamespace } from "../utils/namespace"; export async function emitArmResources(program: TypespecProgram, basePath: string) { // Create a file per resource const session = getSession(); + const { serviceInformation } = program; for (const armResource of program.models.armResources) { const { modules, namespaces } = getResourcesImports(program, armResource); const filePath = join(basePath, `${armResource.name}.tsp`); @@ -21,6 +22,18 @@ export async function emitArmResources(program: TypespecProgram, basePath: strin generatedResource, ].join("\n"); session.writeFile({ filename: filePath, content: await formatTypespecFile(content, filePath) }); + // generate examples for each operation + const examples = generateArmResourceExamples(armResource); + for (const [filename, content] of Object.entries(examples)) { + if (serviceInformation.versions) { + session.writeFile({ + filename: join(basePath, "examples", serviceInformation.versions[0], `${filename}.json`), + content, + }); + } else { + session.writeFile({ filename: join(basePath, "examples", "unknown", `${filename}.json`), content }); + } + } } } @@ -29,6 +42,7 @@ export function getResourcesImports(_program: TypespecProgram, armResource: TspA modules: [ `import "@azure-tools/typespec-azure-core";`, `import "@azure-tools/typespec-azure-resource-manager";`, + `import "@typespec/openapi";`, `import "@typespec/rest";`, `import "./models.tsp";`, ], @@ -37,6 +51,7 @@ export function getResourcesImports(_program: TypespecProgram, armResource: TspA `using Azure.ResourceManager;`, `using Azure.ResourceManager.Foundations;`, `using TypeSpec.Http;`, + `using TypeSpec.OpenAPI;`, ], }; diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts index 4bb9e5ed30..41b23f3a11 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts @@ -1,5 +1,7 @@ -import { Dictionary } from "@azure-tools/openapi/v3"; -import { TypespecOperation, TspArmResource, TspArmResourceOperation } from "interfaces"; +import { Case } from "change-case-all"; +import { TypespecOperation, TspArmResource } from "interfaces"; +import _ from "lodash"; +import pluralize from "pluralize"; import { replaceGeneratedResourceObject } from "../transforms/transform-arm-resources"; import { generateDecorators } from "../utils/decorators"; import { generateDocs } from "../utils/docs"; @@ -41,48 +43,100 @@ export function generateArmResource(resource: TspArmResource): string { } function generateArmResourceOperation(resource: TspArmResource): string { - const groupedOperations: Dictionary<(TspArmResourceOperation | TypespecOperation)[]> = {}; + const formalOperationGroupName = pluralize(resource.name); + const definitions: string[] = []; + + definitions.push("@armResourceOperations"); + if (resource.name === formalOperationGroupName) { + definitions.push(`@projectedName("client", "${formalOperationGroupName}")`); + definitions.push(`interface ${formalOperationGroupName}OperationGroup {`); + } else { + definitions.push(`interface ${formalOperationGroupName} {`); + } + for (const operation of resource.resourceOperations) { - if (!groupedOperations[operation.operationGroupName]) { - groupedOperations[operation.operationGroupName] = []; + for (const fixme of operation.fixMe ?? []) { + definitions.push(fixme); + } + definitions.push(generateDocs(operation)); + const decorators = generateDecorators(operation.decorators); + decorators && definitions.push(decorators); + if ( + operation.operationId && + operation.operationId !== getGeneratedOperationId(formalOperationGroupName, operation.name) + ) { + definitions.push(`@operationId("${operation.operationId}")`); + definitions.push(`#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility"`); + } + if (operation.kind === "ArmResourceExists") { + definitions.push(`op ${operation.name}(${operation.parameters.join(",")}): ${operation.responses.join("|")}`); + } else if (operation.templateParameters?.length) { + definitions.push( + `${operation.name} is ${operation.kind}<${(operation.templateParameters ?? []) + .map(replaceGeneratedResourceObject) + .join(",")}>`, + ); + } else { + definitions.push(`${operation.name} is ${operation.kind}`); } - groupedOperations[operation.operationGroupName].push(operation); + definitions.push(""); } for (const operation of resource.normalOperations) { - if (!groupedOperations[operation.operationGroupName!]) { - groupedOperations[operation.operationGroupName!] = []; + if ( + operation.operationId && + operation.operationId !== getGeneratedOperationId(formalOperationGroupName, operation.name) + ) { + definitions.push(`@operationId("${operation.operationId}")`); + definitions.push(`#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility"`); } - groupedOperations[operation.operationGroupName!].push(operation); + definitions.push(generateOperation(operation as TypespecOperation)); + definitions.push(""); } - const definitions: string[] = []; - for (const [operationGroupName, operations] of Object.entries(groupedOperations)) { - definitions.push("@armResourceOperations"); - definitions.push(`interface ${operationGroupName} {`); - for (let operation of operations) { - if ((operation as TspArmResourceOperation).kind) { - operation = operation as TspArmResourceOperation; - for (const fixme of operation.fixMe ?? []) { - definitions.push(fixme); - } - definitions.push(generateDocs(operation)); - const decorators = generateDecorators(operation.decorators); - decorators && definitions.push(decorators); - if (operation.kind === "ArmResourceExists") { - definitions.push(`op ${operation.name}(${operation.parameters.join(",")}): ${operation.responses.join("|")}`); - } else { - definitions.push( - `${operation.name} is ${operation.kind}<${(operation.templateParameters ?? []) - .map(replaceGeneratedResourceObject) - .join(",")}>`, - ); - } - } else { - definitions.push(generateOperation(operation as TypespecOperation)); - } + definitions.push("}\n"); + + return definitions.join("\n"); +} + +export function generateArmResourceExamples(resource: TspArmResource): Record { + const formalOperationGroupName = pluralize(resource.name); + const examples: Record = {}; + for (const operation of resource.resourceOperations) { + generateExamples( + operation.examples ?? {}, + operation.operationId ?? getGeneratedOperationId(formalOperationGroupName, operation.name), + examples, + ); + } + for (const operation of resource.normalOperations) { + generateExamples( + operation.examples ?? {}, + operation.operationId ?? getGeneratedOperationId(formalOperationGroupName, operation.name), + examples, + ); + } + return examples; +} + +function generateExamples( + examples: Record>, + operationId: string, + generatedExamples: Record, +) { + const count = _.keys(examples).length; + for (const [title, example] of _.entries(examples)) { + if (!example.operationId) { + example.operationId = operationId; + example.title = title; + } + let filename = operationId; + if (count > 1) { + filename = `${filename}_${Case.pascal(title)}`; } - definitions.push("}\n"); + generatedExamples[filename] = JSON.stringify(example, null, 2); } +} - return definitions.join("\n"); +function getGeneratedOperationId(operationGroupName: string, operationName: string): string { + return `${Case.pascal(operationGroupName)}_${Case.pascal(operationName)}`; } diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-enums.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-enums.ts index bf0835572d..c959ea3d94 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-enums.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-enums.ts @@ -18,11 +18,11 @@ export function generateEnums(typespecEnum: TypespecEnum) { enum ${typespecEnum.name} { ${typespecEnum.members .map((m) => { - const kv = `"${m.name}"` !== m.value ? `${m.name}: ${m.value}` : m.value; + const kv = `"${m.name}"` !== m.value ? `"${m.name}": ${m.value}` : m.value; return `${generateDocs(m)}${kv}`; }) .join(", ")} - }\n`; + }\n\n`; definitions.push(enumDefinition); diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts index cf469decc4..f6c6a0f3c8 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts @@ -1,11 +1,13 @@ import { TypespecOperation, TypespecOperationGroup, TypespecParameter } from "../interfaces"; +import { replaceGeneratedResourceObject } from "../transforms/transform-arm-resources"; import { generateDocs, generateSummary } from "../utils/docs"; import { generateParameter } from "./generate-parameter"; export function generateOperation(operation: TypespecOperation, operationGroup?: TypespecOperationGroup) { const doc = generateDocs(operation); const summary = generateSummary(operation); - const { verb, name, route, responses, parameters } = operation; + const { verb, name, route, parameters } = operation; + const responses = operation.responses.map(replaceGeneratedResourceObject); const params = generateParameters(parameters); const statements: string[] = []; summary && statements.push(summary); diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts index f6af8acb3c..494c906ece 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts @@ -1,7 +1,7 @@ import { TypespecParameter } from "../interfaces"; import { generateDecorators } from "../utils/decorators"; import { generateDocs } from "../utils/docs"; -import { transformValue } from "../utils/values"; +import { transformDefaultValue } from "../utils/values"; export function generateParameter(parameter: TypespecParameter): string { const definitions: string[] = []; @@ -12,7 +12,7 @@ export function generateParameter(parameter: TypespecParameter): string { decorators && definitions.push(decorators); let defaultValue = ""; if (parameter.defaultValue) { - defaultValue = ` = ${transformValue(parameter.defaultValue)}`; + defaultValue = ` = ${transformDefaultValue(parameter.type, parameter.defaultValue)}`; } definitions.push(`"${parameter.name}"${parameter.isOptional ? "?" : ""}: ${parameter.type}${defaultValue}`); diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts index e1d190b15d..aef4cdb664 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts @@ -3,6 +3,8 @@ import { getOptions } from "../options"; import { generateDocs } from "../utils/docs"; import { getNamespace } from "../utils/namespace"; +const VALID_VERSIONS = ["v3", "v4", "v5"]; + export function generateServiceInformation(program: TypespecProgram) { const { serviceInformation } = program; const definitions: string[] = []; @@ -15,14 +17,23 @@ export function generateServiceInformation(program: TypespecProgram) { title: "${serviceInformation.name}" })`); - if (serviceInformation.version) { + if (serviceInformation.versions) { definitions.push(`@versioned(Versions)`); } if (isArm && serviceInformation.armCommonTypeVersion) { - definitions.push( - `@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.${serviceInformation.armCommonTypeVersion})`, - ); + if (VALID_VERSIONS.includes(serviceInformation.armCommonTypeVersion)) { + definitions.push( + `@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.${serviceInformation.armCommonTypeVersion})`, + ); + } else { + definitions.push( + `// FIXME: Common type version ${serviceInformation.armCommonTypeVersion} is not supported for now.`, + ); + definitions.push( + `// @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.${serviceInformation.armCommonTypeVersion})`, + ); + } } if (!isArm && serviceInformation.endpoint) { @@ -52,15 +63,18 @@ export function generateServiceInformation(program: TypespecProgram) { definitions.push(getNamespace(program)); - if (serviceInformation.version) { + if (serviceInformation.versions) { definitions.push(""); definitions.push(`@doc("The available API versions.")`); definitions.push(`enum Versions {`); - if (isArm) { - definitions.push(`@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)`); - definitions.push(`@useDependency(Azure.Core.Versions.v1_0_Preview_1)`); + for (const version of serviceInformation.versions) { + if (isArm) { + definitions.push(`@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)`); + definitions.push(`@useDependency(Azure.Core.Versions.v1_0_Preview_1)`); + } + definitions.push(`@doc("The ${version} API version.")`); + definitions.push(`v${version.replaceAll("-", "_")}: "${version}",`); } - definitions.push(`v${serviceInformation.version.replaceAll("-", "_")}: "${serviceInformation.version}",`); definitions.push("}"); } diff --git a/packages/extensions/openapi-to-typespec/src/interfaces.ts b/packages/extensions/openapi-to-typespec/src/interfaces.ts index 94c4b1aa82..1d38316ada 100644 --- a/packages/extensions/openapi-to-typespec/src/interfaces.ts +++ b/packages/extensions/openapi-to-typespec/src/interfaces.ts @@ -39,6 +39,8 @@ export interface TypespecOperation extends WithDoc, WithSummary, WithFixMe { extensions: Extension[]; resource?: TypespecResource; operationGroupName?: string; + operationId?: string; + examples?: Record>; } export type ResourceKind = @@ -63,7 +65,7 @@ export interface TypespecResource { export interface ServiceInformation extends WithDoc { name: string; - version?: string; + versions?: string[]; endpoint?: string; endpointParameters?: EndpointParameter[]; produces?: string[]; @@ -173,7 +175,8 @@ export interface TspArmResourceOperationBase extends WithDoc, WithFixMe { name: string; templateParameters?: string[]; decorators?: TypespecDecorator[]; - operationGroupName: string; + operationId?: string; + examples?: Record>; } export type TspArmResourceOperation = @@ -198,7 +201,10 @@ export interface TspArmResourceNonListOperation extends TspArmResourceOperationB | "ArmResourceActionSync" | "ArmResourceActionNoContentSync" | "ArmResourceActionAsync" - | "ArmResourceActionNoResponseContentAsync"; + | "ArmResourceActionNoResponseContentAsync" + | "checkGlobalNameAvailability" + | "checkLocalNameAvailability" + | "checkNameAvailability"; } export interface TspArmResourceListOperation extends TspArmResourceOperationBase { diff --git a/packages/extensions/openapi-to-typespec/src/model.ts b/packages/extensions/openapi-to-typespec/src/model.ts index 69da0ed2cc..4ad53cb7d7 100644 --- a/packages/extensions/openapi-to-typespec/src/model.ts +++ b/packages/extensions/openapi-to-typespec/src/model.ts @@ -7,7 +7,7 @@ import { transformEnum } from "./transforms/transform-choices"; import { getTypespecType, transformObject } from "./transforms/transform-object"; import { transformOperationGroup } from "./transforms/transform-operations"; import { transformServiceInformation } from "./transforms/transform-service-information"; -import { ArmResourceSchema, filterResourceRelatedObjects, isResourceSchema } from "./utils/resource-discovery"; +import { ArmResourceSchema, filterArmModels, isResourceSchema } from "./utils/resource-discovery"; import { isChoiceSchema } from "./utils/schemas"; const models: Map = new Map(); @@ -36,7 +36,7 @@ export function transformDataType(schema: Schema, codeModel: CodeModel): Typespe return { name: getTypespecType(schema, codeModel), kind: "wildcard", - doc: schema.language.default.documentation, + doc: schema.language.default.description, }; } @@ -71,7 +71,7 @@ function transformModel(codeModel: CodeModel): TypespecProgram { serviceInformation, models: { enums: caldEnums, - objects: isArm ? filterResourceRelatedObjects(typespecObjects) : typespecObjects, + objects: isArm ? filterArmModels(codeModel, typespecObjects) : typespecObjects, armResources, }, operationGroups: typespecOperationGroups, diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts index ea6448b011..9c7eb7038f 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts @@ -1,14 +1,6 @@ -import { - CodeModel, - ObjectSchema, - Operation, - Parameter, - Response, - SchemaResponse, - SchemaType, -} from "@autorest/codemodel"; +import { Operation, Parameter, Response, SchemaResponse, SchemaType } from "@autorest/codemodel"; import _ from "lodash"; -import pluralize from "pluralize"; +import { singular } from "pluralize"; import { getSession } from "../autorest-session"; import { generateParameter } from "../generate/generate-parameter"; import { @@ -89,7 +81,7 @@ export function transformTspArmResource(schema: ArmResourceSchema): TspArmResour propertiesModelName = "{}"; } - const operations = getTspOperations(schema, propertiesModelName); + const operations = getTspOperations(schema); return { fixMe, @@ -191,10 +183,11 @@ function convertResourceReadOperation( doc: resourceMetadata.GetOperations[0].Description, // TODO: resource have duplicated CRUD operations kind: "ArmResourceRead", name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + operationId: operation.OperationID, templateParameters: baseParameters ? [resourceMetadata.SwaggerModelName, baseParameters] : [resourceMetadata.SwaggerModelName], + examples: swaggerOperation.extensions?.["x-ms-examples"], }, ]; } @@ -207,18 +200,36 @@ function convertResourceExistsOperation(resourceMetadata: ArmResource): TspArmRe doc: swaggerOperation.language.default.description, kind: "ArmResourceExists", name: swaggerOperation.operationId ? getOperationName(swaggerOperation.operationId) : "exists", - operationGroupName: getOperationGroupName(swaggerOperation.operationId, resourceMetadata.Name), + operationId: swaggerOperation.operationId, parameters: [ `...ResourceInstanceParameters<${resourceMetadata.SwaggerModelName}, BaseParameters<${resourceMetadata.SwaggerModelName}>>`, ], responses: ["OkResponse", "ErrorResponse"], decorators: [{ name: "head" }], + examples: swaggerOperation.extensions?.["x-ms-examples"], }, ]; } return []; } +function getLROHeader(swaggerOperation: Operation): string | undefined { + if (!swaggerOperation.extensions?.["x-ms-long-running-operation"]) { + return undefined; + } + let lroHeader = undefined; + const finalStateVia = swaggerOperation.extensions?.["x-ms-long-running-operation-options"]?.["final-state-via"]; + if (finalStateVia === "azure-async-operation") { + lroHeader = "ArmAsyncOperationHeader"; + } else if (finalStateVia === "location") { + lroHeader = "ArmLroLocationHeader"; + // TODO: deal with final-state-schema + } else { + // TODO: not sure how to deal with original-uri and operation-location + } + return lroHeader; +} + function convertResourceCreateOrUpdateOperation( resourceMetadata: ArmResource, operations: Record, @@ -227,16 +238,26 @@ function convertResourceCreateOrUpdateOperation( const operation = resourceMetadata.CreateOperations[0]; const swaggerOperation = operations[operation.OperationID]; const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; + const lroHeader = getLROHeader(swaggerOperation); const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); + const templateParameters = [resourceMetadata.SwaggerModelName]; + if (baseParameters) { + templateParameters.push(baseParameters); + } + if (lroHeader) { + if (!baseParameters) { + templateParameters.push(`BaseParameters<${resourceMetadata.SwaggerModelName}>`); + } + templateParameters.push(lroHeader); + } return [ { doc: operation.Description, kind: isLongRunning ? "ArmResourceCreateOrUpdateAsync" : "ArmResourceCreateOrReplaceSync", name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), - templateParameters: baseParameters - ? [resourceMetadata.SwaggerModelName, baseParameters] - : [resourceMetadata.SwaggerModelName], + operationId: operation.OperationID, + templateParameters: templateParameters, + examples: swaggerOperation.extensions?.["x-ms-examples"], }, ]; } @@ -246,7 +267,6 @@ function convertResourceCreateOrUpdateOperation( function convertResourceUpdateOperation( resourceMetadata: ArmResource, operations: Record, - resourcePropertiesModelName: string, ): TspArmResourceOperation[] { if (resourceMetadata.UpdateOperations.length) { const operation = resourceMetadata.UpdateOperations[0]; @@ -256,42 +276,18 @@ function convertResourceUpdateOperation( ) { const swaggerOperation = operations[operation.OperationID]; const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; + const lroHeader = getLROHeader(swaggerOperation); const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); const bodyParam = swaggerOperation.requests?.[0].parameters?.find((p) => p.protocol.http?.in === "body"); - const propertiesProperty = (bodyParam?.schema as ObjectSchema)?.properties?.find( - (p) => p.serializedName === "properties", - ); - const tagsProperty = (bodyParam?.schema as ObjectSchema)?.properties?.find((p) => p.serializedName === "tags"); const fixMe: string[] = []; - if (!bodyParam || (!propertiesProperty && !tagsProperty)) { + if (!bodyParam) { fixMe.push( "// FIXME: (ArmResourcePatch): ArmResourcePatchSync/ArmResourcePatchAsync should have a body parameter with either properties property or tag property", ); } let kind; const templateParameters = [resourceMetadata.SwaggerModelName]; - if (propertiesProperty) { - kind = isLongRunning ? "ArmResourcePatchAsync" : "ArmResourcePatchSync"; - // TODO: if update properties are different from resource properties, we need to use a different model - templateParameters.push(resourcePropertiesModelName); - addGeneratedResourceObjectIfNotExits( - bodyParam?.schema.language.default.name ?? "", - `ResourceUpdateModel<${resourceMetadata.SwaggerModelName}>`, - ); - if (propertiesProperty.schema.language.default.name !== resourcePropertiesModelName) { - addGeneratedResourceObjectIfNotExits( - propertiesProperty.schema.language.default.name, - `ResourceUpdateModelProperties<${resourceMetadata.SwaggerModelName}, ${resourcePropertiesModelName}>`, - ); - } - } else if (tagsProperty) { - kind = isLongRunning ? "ArmTagsPatchAsync" : "ArmTagsPatchSync"; - // TODO: if update properties are different from tag properties, we need to use a different model - addGeneratedResourceObjectIfNotExits( - bodyParam?.schema.language.default.name ?? "", - `TagsUpdateModel<${resourceMetadata.SwaggerModelName}>`, - ); - } else if (bodyParam) { + if (bodyParam) { kind = isLongRunning ? "ArmCustomPatchAsync" : "ArmCustomPatchSync"; templateParameters.push(bodyParam.schema.language.default.name); } else { @@ -301,14 +297,21 @@ function convertResourceUpdateOperation( if (baseParameters) { templateParameters.push(baseParameters); } + if (lroHeader) { + if (!baseParameters) { + templateParameters.push(`BaseParameters<${resourceMetadata.SwaggerModelName}>`); + } + templateParameters.push(lroHeader); + } return [ { fixMe, doc: operation.Description, kind: kind as any, name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + operationId: operation.OperationID, templateParameters, + examples: swaggerOperation.extensions?.["x-ms-examples"], }, ]; } @@ -324,9 +327,19 @@ function convertResourceDeleteOperation( const operation = resourceMetadata.DeleteOperations[0]; const swaggerOperation = operations[operation.OperationID]; const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; + const lroHeader = getLROHeader(swaggerOperation); const okResponse = swaggerOperation?.responses?.filter((o) => o.protocol.http?.statusCodes.includes("200"))?.[0]; const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); - + const templateParameters = [resourceMetadata.SwaggerModelName]; + if (baseParameters) { + templateParameters.push(baseParameters); + } + if (lroHeader) { + if (!baseParameters) { + templateParameters.push(`BaseParameters<${resourceMetadata.SwaggerModelName}>`); + } + templateParameters.push(lroHeader); + } return [ { doc: operation.Description, @@ -336,10 +349,9 @@ function convertResourceDeleteOperation( : "ArmResourceDeleteWithoutOkAsync" : "ArmResourceDeleteSync", name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), - templateParameters: baseParameters - ? [resourceMetadata.SwaggerModelName, baseParameters] - : [resourceMetadata.SwaggerModelName], + operationId: operation.OperationID, + templateParameters, + examples: swaggerOperation.extensions?.["x-ms-examples"], }, ]; } @@ -373,15 +385,15 @@ function convertResourceListOperations( doc: operation.Description, kind: "ArmResourceListByParent", name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + operationId: operation.OperationID, templateParameters: templateParameters, + examples: swaggerOperation.extensions?.["x-ms-examples"], }); } - // operation under subscription + // list operation under subscription if (resourceMetadata.OperationsFromSubscriptionExtension.length) { for (const operation of resourceMetadata.OperationsFromSubscriptionExtension) { - // TODO: handle other kinds of operations if (operation.PagingMetadata) { const swaggerOperation = operations[operation.OperationID]; const okResponse = swaggerOperation?.responses?.filter( @@ -406,16 +418,18 @@ function convertResourceListOperations( doc: operation.Description, kind: "ArmResourceListAtScope", name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + operationId: operation.OperationID, templateParameters, + examples: swaggerOperation.extensions?.["x-ms-examples"], }); } else { converted.push({ doc: operation.Description, kind: "ArmListBySubscription", name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + operationId: operation.OperationID, templateParameters: [resourceMetadata.SwaggerModelName], + examples: swaggerOperation.extensions?.["x-ms-examples"], }); } } @@ -439,10 +453,11 @@ function convertResourceListOperations( name: swaggerOperation.operationId ? getOperationName(swaggerOperation.operationId) : `listBy${resourceMetadata.Parents[0].replace(/Resource$/, "")}`, - operationGroupName: getOperationGroupName(swaggerOperation.operationId, resourceMetadata.Name), + operationId: swaggerOperation.operationId, templateParameters: baseParameters ? [resourceMetadata.SwaggerModelName, baseParameters] : [resourceMetadata.SwaggerModelName], + examples: swaggerOperation.extensions?.["x-ms-examples"], }); (swaggerOperation as OperationWithResourceOperationFlag).isResourceOperation = true; } @@ -462,6 +477,7 @@ function convertResourceActionOperations( if (operation.Method === "POST") { const swaggerOperation = operations[operation.OperationID]; const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; + const lroHeader = getLROHeader(swaggerOperation); const okResponse = swaggerOperation?.responses?.filter( (o) => o.protocol.http?.statusCodes.includes("200"), )?.[0]; @@ -489,12 +505,45 @@ function convertResourceActionOperations( if (baseParameters) { templateParameters.push(baseParameters); } + if (lroHeader) { + if (!baseParameters) { + templateParameters.push(`BaseParameters<${resourceMetadata.SwaggerModelName}>`); + } + templateParameters.push(lroHeader); + } converted.push({ doc: operation.Description, kind: kind as any, name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + operationId: operation.OperationID, templateParameters, + examples: swaggerOperation.extensions?.["x-ms-examples"], + }); + } + } + } + + return converted; +} + +function convertCheckNameAvailabilityOperations( + resourceMetadata: ArmResource, + operations: Record, +): TspArmResourceOperation[] { + const converted: TspArmResourceOperation[] = []; + + // check name availability operation under subscription + if (resourceMetadata.OperationsFromSubscriptionExtension.length) { + for (const operation of resourceMetadata.OperationsFromSubscriptionExtension) { + if (operation.Path.includes("/checkNameAvailability")) { + const swaggerOperation = operations[operation.OperationID]; + + converted.push({ + doc: operation.Description, + kind: "checkGlobalNameAvailability", + name: getOperationName(operation.OperationID), + operationId: operation.OperationID, + examples: swaggerOperation.extensions?.["x-ms-examples"], }); } } @@ -515,7 +564,13 @@ function convertResourceOtherGetOperations( const swaggerOperation = operations[operation.OperationID]; if (swaggerOperation.requests && swaggerOperation.requests[0]) { const op = transformRequest(swaggerOperation.requests[0], swaggerOperation, getSession().model); - op.operationGroupName = getOperationGroupName(operation.OperationID, resourceMetadata.Name); + op.operationGroupName = getOperationGroupName(operation.OperationID); + op.operationId = operation.OperationID; + if (!op.fixMe) { + op.fixMe = []; + } + op.fixMe.push(`// FIXME: ${operation.OperationID} could not be converted to a resource operation`); + op.examples = swaggerOperation.extensions?.["x-ms-examples"]; converted.push(op); } } @@ -525,10 +580,7 @@ function convertResourceOtherGetOperations( return converted; } -function getTspOperations( - armSchema: ArmResourceSchema, - resourcePropertiesModelName: string, -): [TspArmResourceOperation[], TypespecOperation[]] { +function getTspOperations(armSchema: ArmResourceSchema): [TspArmResourceOperation[], TypespecOperation[]] { const resourceMetadata = armSchema.resourceMetadata; const operations = getResourceOperations(resourceMetadata); const tspOperations: TspArmResourceOperation[] = []; @@ -546,7 +598,7 @@ function getTspOperations( tspOperations.push(...convertResourceCreateOrUpdateOperation(resourceMetadata, operations)); // patch update operation could either be patch for resource/tag or custom patch - tspOperations.push(...convertResourceUpdateOperation(resourceMetadata, operations, resourcePropertiesModelName)); + tspOperations.push(...convertResourceUpdateOperation(resourceMetadata, operations)); // delete operation tspOperations.push(...convertResourceDeleteOperation(resourceMetadata, operations)); @@ -557,6 +609,9 @@ function getTspOperations( // action operation tspOperations.push(...convertResourceActionOperations(resourceMetadata, operations)); + // check name availability operation + tspOperations.push(...convertCheckNameAvailabilityOperations(resourceMetadata, operations)); + // other get operations normalOperations.push(...convertResourceOtherGetOperations(resourceMetadata, operations)); @@ -567,11 +622,11 @@ function getOperationName(name: string): string { return _.lowerFirst(_.last(name.split("_"))); } -function getOperationGroupName(name: string | undefined, resourceName: string): string { +function getOperationGroupName(name: string | undefined): string { if (name && name.includes("_")) { return _.first(name.split("_"))!; } else { - return pluralize(resourceName); + return ""; } } @@ -588,26 +643,29 @@ function buildOperationBodyRequest(operation: Operation, resource: ArmResource): function buildOperationBaseParameters(operation: Operation, resource: ArmResource): string | undefined { const codeModel = getSession().model; - const parameters: TypespecParameter[] = []; - const resourceBasicParameters = []; + const otherParameters: TypespecParameter[] = []; + const pathParameters = []; resource.GetOperations[0].Path.split("/").forEach((p) => { if (p.match(/^{.+}$/)) { - resourceBasicParameters.push(p.replace("{", "").replace("}", "")); + pathParameters.push(p.replace("{", "").replace("}", "")); } }); - resourceBasicParameters.push("api-version"); - resourceBasicParameters.push("$host"); + pathParameters.push("api-version"); + pathParameters.push("$host"); if (operation.parameters) { for (const parameter of operation.parameters) { - if (!resourceBasicParameters.includes(parameter.language.default.serializedName)) { - parameters.push(transformParameter(parameter, codeModel)); + if (resource.IsSingletonResource && parameter.schema.type === SchemaType.Constant) { + continue; + } + if (!pathParameters.includes(parameter.language.default.serializedName)) { + otherParameters.push(transformParameter(parameter, codeModel)); } } } - if (parameters.length) { + if (otherParameters.length) { const params: string[] = []; - for (const parameter of parameters) { + for (const parameter of otherParameters) { params.push(generateParameter(parameter)); } return `{ @@ -701,7 +759,11 @@ function buildKeyProperty(schema: ArmResourceSchema): TypespecObjectProperty { parameter.decorators.push( { name: "key", - arguments: [schema.resourceMetadata.ResourceKey], + arguments: [ + schema.resourceMetadata.IsSingletonResource + ? singular(schema.resourceMetadata.ResourceKeySegment) + : schema.resourceMetadata.ResourceKey, + ], }, { name: "segment", @@ -709,6 +771,10 @@ function buildKeyProperty(schema: ArmResourceSchema): TypespecObjectProperty { }, ); + // remove @path decorator for key parameter + // TODO: still under discussion with TSP team about this behavior, in order to keep generated swagger good, comment out for now + // parameter.decorators = parameter.decorators.filter((d) => d.name !== "path"); + // by convention the property itself needs to be called "name" parameter.name = "name"; diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-choices.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-choices.ts index 95ab5ea250..946f35556c 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-choices.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-choices.ts @@ -12,7 +12,7 @@ export function transformEnum(schema: SealedChoiceSchema | ChoiceSchema, codeMod if (!typespecEnum) { typespecEnum = { decorators: getEnumDecorators(schema), - doc: schema.language.default.documentation, + doc: schema.language.default.description, kind: "enum", name: schema.language.default.name.replace(/-/g, "_"), members: schema.choices.map((choice) => transformChoiceMember(choice)), diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts index 0b0a85150e..0a8c2c9001 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts @@ -26,7 +26,7 @@ import { isSealedChoiceSchema, isStringSchema, } from "../utils/schemas"; -import { transformValue } from "../utils/values"; +import { getDefaultValue, transformValue } from "../utils/values"; const typespecTypes = new Map([ [SchemaType.Date, "plainDate"], @@ -122,7 +122,7 @@ export function transformObjectProperty(propertySchema: Property, codeModel: Cod isOptional: propertySchema.required !== true, type: visited.name, decorators: getPropertyDecorators(propertySchema), - defaultValue: propertySchema.schema.defaultValue, + defaultValue: getDefaultValue(propertySchema.schema), }; } diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts index 7ee2475c45..c7cb842160 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts @@ -24,6 +24,7 @@ import { getPropertyDecorators } from "../utils/decorators"; import { getLogger } from "../utils/logger"; import { getLanguageMetadata } from "../utils/metadata"; import { isConstantSchema } from "../utils/schemas"; +import { getDefaultValue } from "../utils/values"; export function transformOperationGroup( { language, operations }: OperationGroup, @@ -176,7 +177,7 @@ export function transformParameter(parameter: Parameter, codeModel: CodeModel): location: transformParameterLocation(parameter), decorators: getPropertyDecorators(parameter), serializedName: parameter.language.default.serializedName ?? parameter.language.default.name, - defaultValue: parameter.schema.defaultValue, + defaultValue: getDefaultValue(parameter.schema), }; } diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts index 0189eb70aa..e9f7e17168 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts @@ -12,7 +12,7 @@ export function transformServiceInformation(model: CodeModel): ServiceInformatio doc: model.info.description ?? "// FIXME: (miissing-service-description) Add service description", endpoint: getFirstEndpoint(model), endpointParameters: transformEndpointParameters(model), - version: getApiVersion(model), + versions: getApiVersions(model), armCommonTypeVersion: isArm ? getArmCommonTypeVersion() : undefined, }; } @@ -28,19 +28,17 @@ export function transformEndpointParameters(model: CodeModel): EndpointParameter })); } -function getApiVersion(model: CodeModel): string | undefined { +function getApiVersions(model: CodeModel): string[] | undefined { if (!model.globalParameters || !model.globalParameters.length) { return undefined; } - const apiVersionParam = model.globalParameters - .filter( - (gp) => gp.implementation === ImplementationLocation.Client && gp.protocol.http?.in === ParameterLocation.Query, - ) - .find((param) => param.language.default.serializedName === "api-version"); + const apiVersionParams = (model.schemas.constants ?? []).filter((c) => + c.language.default.name.startsWith("ApiVersion"), + ); - if (apiVersionParam && isConstantSchema(apiVersionParam.schema)) { - return apiVersionParam.schema.value.value.toString(); + if (apiVersionParams.length) { + return apiVersionParams.map((c) => c.value.value); } return undefined; diff --git a/packages/extensions/openapi-to-typespec/src/utils/decorators.ts b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts index 72446dc125..91c1f82a31 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/decorators.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts @@ -216,8 +216,9 @@ export function getEnumDecorators(enumeration: SealedChoiceSchema | ChoiceSchema if (isSealedChoiceSchema(enumeration)) { decorators.push({ - name: "Azure.Core.fixed", + name: "fixed", module: "@azure-tools/typespec-azure-core", + namespace: "Azure.Core", }); } diff --git a/packages/extensions/openapi-to-typespec/src/utils/discriminator.ts b/packages/extensions/openapi-to-typespec/src/utils/discriminator.ts index f49137bdd2..6fc19cf5a8 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/discriminator.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/discriminator.ts @@ -10,7 +10,13 @@ export function getDiscriminator(schema: ObjectSchema): TypespecObjectProperty | if (!schema.discriminatorValue) { return undefined; } - const { serializedName: name, language } = getDiscriminatorProperty(schema); + const discriminator = getDiscriminatorProperty(schema); + if (!discriminator) { + const logger = getLogger("getDiscriminator"); + logger.warning(`No discriminator property found for ${schema.language.default.name}`); + return undefined; + } + const { serializedName: name, language } = discriminator; const type = `"${schema.discriminatorValue}"`; return { @@ -22,7 +28,7 @@ export function getDiscriminator(schema: ObjectSchema): TypespecObjectProperty | }; } -function getDiscriminatorProperty(schema: ObjectSchema): Property { +function getDiscriminatorProperty(schema: ObjectSchema): Property | undefined { const logger = getLogger("getDiscriminatorProperty"); logger.info(`Getting discriminator property for ${schema.language.default.name}`); @@ -32,7 +38,7 @@ function getDiscriminatorProperty(schema: ObjectSchema): Property { } if (!schema.parents?.immediate || schema.parents.immediate.length === 0) { - throw new Error("No discriminator property found"); + return; } for (const parent of schema.parents.immediate as ObjectSchema[]) { @@ -42,6 +48,4 @@ function getDiscriminatorProperty(schema: ObjectSchema): Property { return discriminator; } } - - throw new Error("No discriminator property found"); } diff --git a/packages/extensions/openapi-to-typespec/src/utils/imports.ts b/packages/extensions/openapi-to-typespec/src/utils/imports.ts index 09efe43f57..eef7ada6a3 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/imports.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/imports.ts @@ -33,7 +33,8 @@ export function getModelsImports(program: TypespecProgram) { if (isArm) { modules.add(`import "@azure-tools/typespec-azure-resource-manager";`); - namespaces.add(`using Azure.ResourceManager;`); + namespaces.add("using Azure.ResourceManager;"); + namespaces.add("using Azure.ResourceManager.Foundations;"); } return { @@ -48,5 +49,12 @@ export function getRoutesImports(_program: TypespecProgram) { namespaces: [`using TypeSpec.Rest;`, `using TypeSpec.Http;`], }; + const { isArm } = getOptions(); + + if (isArm) { + imports.modules.push(`import "@azure-tools/typespec-azure-resource-manager";`); + imports.namespaces.push("using Azure.ResourceManager;"); + } + return imports; } diff --git a/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts b/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts index 37d2aea83e..34d47e7b5a 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts @@ -1,7 +1,7 @@ import { TypespecObjectProperty } from "../interfaces"; import { generateDecorators } from "./decorators"; import { generateDocs } from "./docs"; -import { transformValue } from "./values"; +import { transformDefaultValue } from "./values"; export function getModelPropertiesDeclarations(properties: TypespecObjectProperty[]): string[] { const definitions: string[] = []; @@ -13,7 +13,7 @@ export function getModelPropertiesDeclarations(properties: TypespecObjectPropert property.fixMe && property.fixMe.length && definitions.push(property.fixMe.join("\n")); let defaultValue = ""; if (property.defaultValue) { - defaultValue = ` = ${transformValue(property.defaultValue)}`; + defaultValue = ` = ${transformDefaultValue(property.type, property.defaultValue)}`; } definitions.push(`"${property.name}"${getOptionalOperator(property)}: ${property.type}${defaultValue};`); } diff --git a/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts b/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts index 36558bf15b..01a72ba4ca 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts @@ -1,6 +1,6 @@ import { readFileSync } from "fs"; import { join } from "path"; -import { ObjectSchema, Operation } from "@autorest/codemodel"; +import { CodeModel, ObjectSchema, Operation, SchemaResponse } from "@autorest/codemodel"; import { getSession } from "../autorest-session"; import { TypespecObject, TspArmResource } from "../interfaces"; import { isGeneratedResourceObject } from "../transforms/transform-arm-resources"; @@ -156,18 +156,10 @@ export function isResourceSchema(schema: ObjectSchema): schema is ArmResourceSch } const _ArmCoreTypes = [ - "Resource", - "ProxyResource", "TrackedResource", - "ErrorAdditionalInfo", - "ErrorDetail", - "ErrorResponse", - "Operation", - "OperationListResult", - "OperationDisplay", - "Origin", - "SystemData", - "Origin", + "ProxyResource", + "ExtensionResource", + "ResourceProvisioningState", "ManagedServiceIdentity", "ManagedSystemAssignedIdentity", "EntityTag", @@ -175,10 +167,34 @@ const _ArmCoreTypes = [ "ResourcePlan", "ResourceSku", "ManagedBy", + "OperationListResult", + "Origin", + "OperationDisplay", + "OperationStatusResult", + "ErrorDetail", + "ErrorAdditionalInfo", + "SystemData", + "ManagedIdentityProperties", + "ManagedSystemIdentityProperties", + "UserAssignedIdentity", + "Operation", + "ErrorResponse", ]; -export function filterResourceRelatedObjects(objects: TypespecObject[]): TypespecObject[] { - return objects.filter((o) => !_ArmCoreTypes.includes(o.name) && !isGeneratedResourceObject(o.name)); +export function filterArmModels(codeModel: CodeModel, objects: TypespecObject[]): TypespecObject[] { + const filtered = [..._ArmCoreTypes]; + for (const operationGroup of codeModel.operationGroups) { + for (const operation of operationGroup.operations) { + if (operation.requests?.[0].protocol?.http?.path.match(/^\/providers\/[^/]+\/operations$/)) { + const okResponse = operation.responses?.filter((o) => o.protocol.http?.statusCodes.includes("200"))?.[0]; + const objectName = (okResponse as SchemaResponse)?.schema?.language.default.name; + if (objectName) { + filtered.push(objectName); + } + } + } + } + return objects.filter((o) => !filtered.includes(o.name) && !isGeneratedResourceObject(o.name)); } export function isTspArmResource(schema: TypespecObject): schema is TspArmResource { diff --git a/packages/extensions/openapi-to-typespec/src/utils/values.ts b/packages/extensions/openapi-to-typespec/src/utils/values.ts index b942bd5c33..a08d9c122d 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/values.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/values.ts @@ -1,3 +1,6 @@ +import { Schema } from "@autorest/codemodel"; +import { isChoiceSchema } from "./schemas"; + export function transformValue(value: string | number | boolean) { if (typeof value === "string") { return `"${value}"`; @@ -5,3 +8,26 @@ export function transformValue(value: string | number | boolean) { return value; } + +export function transformDefaultValue(type: string, value: string | number | boolean) { + if (type === "string" || type === "int32" || type === "boolean") { + return transformValue(value); + } else { + return `${type}.${value}`; + } +} + +export function getDefaultValue(schema: Schema) { + if (schema.defaultValue === undefined) { + return undefined; + } + if (isChoiceSchema(schema)) { + for (const choice of schema.choices) { + if (schema.defaultValue === choice.value.toString()) { + return choice.language.default.name; + } + } + } else { + return schema.defaultValue; + } +} diff --git a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp index edbc82d4da..5ecdd63f5c 100644 --- a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp @@ -27,5 +27,6 @@ namespace Azure.Language.Authoring; @doc("The available API versions.") enum Versions { + @doc("The 2022-05-01 API version.") v2022_05_01: "2022-05-01", } diff --git a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp index 008e08d46b..2ba09b48b7 100644 --- a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp @@ -28,6 +28,7 @@ own data. CustomEntityRecognition, } +@doc("Human-readable error code.") enum ErrorCode { InvalidRequest, InvalidArgument, @@ -49,6 +50,7 @@ enum ErrorCode { Warning, } +@doc("Human-readable error code.") enum InnerErrorCode { InvalidRequest, InvalidParameterValue, diff --git a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/models.tsp index f688b34039..163fe77182 100644 --- a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/models.tsp @@ -8,10 +8,15 @@ using Azure.Core; namespace AnomalyDetectorClient; +@doc("Anomaly Detector API version (for example, v1.0).") enum ApiVersion { `v1.1-preview.1`, } +@doc(""" +Define the impute method, can be one of auto, previous, linear, fixed, zero, +notFill. +""") enum ImputeMode { auto, previous, @@ -21,6 +26,7 @@ enum ImputeMode { notFill, } +@doc("The error code.") enum AnomalyDetectorErrorCodes { InvalidCustomInterval, BadArgument, @@ -35,6 +41,11 @@ enum AnomalyDetectorErrorCodes { InvalidImputeFixedValue, } +@doc(""" +An optional field, indicating how missing values will be filled. One of +Previous, Subsequent, Linear, Zero, Fixed, and NotFill. Cannot be set to +NotFill, when the alignMode is Outer. +""") enum FillNAMethod { Previous, Subsequent, @@ -43,7 +54,14 @@ enum FillNAMethod { Fixed, NotFill, } -@Azure.Core.fixed + +@doc(""" +Optional argument, can be one of yearly, monthly, weekly, daily, hourly, +minutely, secondly, microsecond or none. If granularity is not present, it will +be none by default. If granularity is none, the timestamp property in time +series point can be absent. +""") +@fixed enum TimeGranularity { yearly, monthly, @@ -55,24 +73,34 @@ enum TimeGranularity { microsecond, none, } -@Azure.Core.fixed + +@doc("Status of detection results. One of CREATED, RUNNING, READY, and FAILED.") +@fixed enum DetectionStatus { CREATED, RUNNING, READY, FAILED, } -@Azure.Core.fixed + +@fixed enum DataSchema { OneTable, MultiTable, } -@Azure.Core.fixed + +@doc(""" +An optional field, indicating how we align different variables to the same +time-range. Either Inner or Outer. +""") +@fixed enum AlignMode { Inner, Outer, } -@Azure.Core.fixed + +@doc("Model status. One of CREATED, RUNNING, READY, and FAILED.") +@fixed enum ModelStatus { CREATED, RUNNING, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp index 72877b9f11..76cbe90644 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DataManagerForAgriculture.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("DataConnector Model.") @@ -28,10 +30,13 @@ model DataConnector is ProxyResource { interface DataConnectors { @doc("Get specific Data Connector resource by DataConnectorName.") get is ArmResourceRead; + @doc("Create or update Data Connector For MADMA resource.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Delete a Data Connectors with given dataConnector name.") delete is ArmResourceDeleteSync; + @doc("Lists the Data Connector Credentials for MADMA instance.") list is ArmResourceListByParent< DataConnector, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp index bfcd70862d..abd3f03cdb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("Data Manager For Agriculture ARM Resource.") @@ -25,19 +27,35 @@ model DataManagerForAgriculture } @armResourceOperations -interface DataManagerForAgricultureResources { +interface DataManagerForAgricultures { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get DataManagerForAgriculture resource.") + @operationId("DataManagerForAgricultureResources_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create or update Data Manager For Agriculture resource.") + @operationId("DataManagerForAgricultureResources_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update a Data Manager For Agriculture resource.") - update is ArmResourcePatchAsync< + @operationId("DataManagerForAgricultureResources_Update") + update is ArmCustomPatchAsync< DataManagerForAgriculture, - DataManagerForAgricultureProperties + DataManagerForAgricultureUpdateRequestModel, + BaseParameters, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Delete a Data Manager For Agriculture resource.") + @operationId("DataManagerForAgricultureResources_Delete") delete is ArmResourceDeleteSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists the DataManagerForAgriculture instances for a resource group.") + @operationId("DataManagerForAgricultureResources_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent< DataManagerForAgriculture, { @@ -57,6 +75,9 @@ Minimum = 10, Maximum = 1000, Default value = 50. $skipToken?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists the DataManagerForAgriculture instances for a subscription.") + @operationId("DataManagerForAgricultureResources_ListBySubscription") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp index 391df5ee82..c6ef7952a9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("DataManagerForAgriculture extension resource.") @@ -25,6 +27,7 @@ model DataManagerForAgricultureExtension interface DataManagerForAgricultureExtensions { @doc("Get Data Manager For Agriculture extension.") get is ArmResourceRead; + @doc("Get list of Data Manager For Agriculture extension.") list is ArmResourceListByParent< DataManagerForAgricultureExtension, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp index de1bd79ad2..9a172339e3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("DataManagerForAgriculture solution resource.") @@ -22,10 +24,15 @@ model DataManagerForAgricultureSolution } @armResourceOperations -interface SolutionsDiscoverability { +interface DataManagerForAgricultureSolutions { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get Data Manager For Agriculture solution by id.") + @operationId("SolutionsDiscoverability_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get list of Data Manager For Agriculture solutions.") + @operationId("SolutionsDiscoverability_List") list is ArmResourceListByParent< DataManagerForAgricultureSolution, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp index 2c33c0e861..d9f39be6d2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DataManagerForAgriculture.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("Extension resource.") @@ -26,10 +28,13 @@ model Extension is ProxyResource { interface Extensions { @doc("Get installed extension details by extension id.") get is ArmResourceRead; + @doc("Install or Update extension. Additional Api Properties are merged patch and if the extension is updated to a new version then the obsolete entries will be auto deleted from Additional Api Properties.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Uninstall extension.") delete is ArmResourceDeleteSync; + @doc("Get installed extensions details.") listByDataManagerForAgriculture is ArmResourceListByParent< Extension, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp index f426df808b..89d643e266 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DataManagerForAgriculture.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("The private endpoint connection resource.") @@ -25,10 +27,17 @@ model PrivateEndpointConnection interface PrivateEndpointConnections { @doc("Get Private endpoint connection object.") get is ArmResourceRead; + @doc("Approves or Rejects a Private endpoint connection request.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Delete Private endpoint connection request.") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + PrivateEndpointConnection, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Get list of Private endpoint connections.") listByResource is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp index 8b8908b8c1..9c9211fde2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DataManagerForAgriculture.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("A private link resource.") @@ -24,6 +26,7 @@ model PrivateLinkResource is ProxyResource { interface PrivateLinkResources { @doc("Get Private link resource object.") get is ArmResourceRead; + @doc("Get list of Private link resources.") listByResource is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp index d74f15a5aa..bf0fb800b7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DataManagerForAgriculture.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("Solution resource.") @@ -27,10 +29,13 @@ model Solution is ProxyResource { interface Solutions { @doc("Get installed Solution details by Solution id.") get is ArmResourceRead; + @doc("Install Or Update Solution.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Uninstall Solution.") delete is ArmResourceDeleteSync; + @doc("Get installed Solutions details.") list is ArmResourceListByParent< Solution, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_CreateOrUpdate.json new file mode 100644 index 0000000000..53cdeb0029 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_CreateOrUpdate.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "credentials": { + "apiKey": { + "keyName": "abcApiKey", + "keyVaultUri": "https://testKeyVault.vault.azure.net/", + "keyVersion": "239c0475c7d44f20b0fc27d3fe90a41d" + }, + "kind": "ApiKeyAuthCredentials" + } + } + }, + "dataConnectorName": "WeatherIBM", + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/WeatherIBM", + "properties": { + "credentials": { + "clientId": "string", + "clientSecret": { + "keyName": "string", + "keyVaultUri": "string", + "keyVersion": "string" + }, + "kind": "OAuthClientCredentials" + } + } + } + }, + "201": { + "body": { + "name": "SatelliteSentinelHub", + "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/SatelliteSentinelHub", + "properties": { + "credentials": { + "clientId": "string", + "clientSecret": { + "keyName": "string", + "keyVaultUri": "string", + "keyVersion": "string" + }, + "kind": "OAuthClientCredentials" + } + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:02.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "DataConnectors_CreateOrUpdate", + "title": "DataConnectors_CreateOrUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Delete.json new file mode 100644 index 0000000000..0c5d8e5f02 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataConnectorName": "SatelliteSentinelHub", + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": {}, + "204": {}, + "400": { + "error": { + "code": "ConnectorConfigurationInvalid", + "message": "Connector name not supported. Supported connectors are 'SatelliteSentinelHub' and 'WeatherIBM'." + } + } + }, + "operationId": "DataConnectors_Delete", + "title": "DataConnectors_Delete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Get.json new file mode 100644 index 0000000000..83bdaeb1dd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Get.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataConnectorName": "SatelliteSentinelHub", + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "SatelliteSentinelHub", + "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/SatelliteSentinelHub", + "properties": { + "credentials": { + "clientId": "string", + "clientSecret": { + "keyName": "string", + "keyVaultUri": "string", + "keyVersion": "string" + }, + "kind": "OAuthClientCredentials" + } + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:02.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "DataConnectors_Get", + "title": "DataConnectors_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_List.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_List.json new file mode 100644 index 0000000000..c7d27435f6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_List.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataConnectorName": "WeatherIBM", + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "SatelliteSentinelHub", + "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/SatelliteSentinelHub", + "properties": { + "credentials": { + "clientId": "string", + "clientSecret": { + "keyName": "string", + "keyVaultUri": "string", + "keyVersion": "string" + }, + "kind": "OAuthClientCredentials" + } + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:02.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + { + "name": "WeatherIBM", + "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/WeatherIBM", + "properties": { + "credentials": { + "apiKey": { + "keyName": "string", + "keyVaultUri": "string", + "keyVersion": "string" + }, + "kind": "ApiKeyAuthCredentials" + } + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:02.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + } + } + }, + "operationId": "DataConnectors_List", + "title": "DataConnectors_List" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_Get.json new file mode 100644 index 0000000000..ada406e640 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_Get.json @@ -0,0 +1,245 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureExtensionId": "DTN.ContentServices" + }, + "responses": { + "200": { + "body": { + "name": "DTN.ContentServices", + "type": "Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions/DTN.ContentServices", + "properties": { + "detailedInformation": [ + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetDailyObservations", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "sunrise", + "sunset", + "weatherCode", + "weatherDescription", + "maxTemperature", + "minTemperature", + "avgHeatIndex", + "maxHeatIndex", + "minHeatIndex", + "maxWindChill", + "minWindChill", + "maxFeelsLike", + "minFeelsLike", + "avgFeelsLike", + "maxWindSpeed", + "avgWetBulbGlobeTemp", + "maxWetBulbGlobeTemp", + "minWetBulbGlobeTemp", + "minutesOfSunshine", + "cornHeatUnit", + "evapotranspiration" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "growingDegreeDay", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "windChill", + "windSpeed", + "windDirection" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "hours", + "units", + "precision", + "sector" + ], + "apiName": "GetHourlyObservations", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "weatherCode", + "weatherDescription", + "feelsLike", + "visibilityWeatherCode", + "visibilityWeatherDescription", + "minutesOfSunshine" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "visibility", + "windChill", + "windSpeed", + "windDirection", + "windGust" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetHourlyForecasts", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "weatherCode", + "weatherDescription", + "feelsLike", + "visibilityWeatherCode", + "visibilityWeatherDescription", + "minutesOfSunshine" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "visibility", + "windChill", + "windSpeed", + "windDirection", + "windGust" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetDailyForecasts", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "sunrise", + "sunset", + "weatherCode", + "weatherDescription", + "maxTemperature", + "minTemperature", + "avgHeatIndex", + "maxHeatIndex", + "minHeatIndex", + "maxWindChill", + "minWindChill", + "maxFeelsLike", + "minFeelsLike", + "avgFeelsLike", + "maxWindSpeed", + "avgWetBulbGlobeTemp", + "maxWetBulbGlobeTemp", + "minWetBulbGlobeTemp", + "minutesOfSunshine", + "cornHeatUnit", + "evapotranspiration" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "growingDegreeDay", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "windChill", + "windSpeed", + "windDirection" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + } + ], + "extensionApiDocsLink": "https://cs-docs.dtn.com/api/weather-observations-and-forecasts-rest-api/", + "extensionAuthLink": "https://www.dtn.com/dtn-content-integration/", + "extensionCategory": "Weather", + "farmBeatsExtensionId": "DTN.ContentServices", + "farmBeatsExtensionName": "DTN", + "farmBeatsExtensionVersion": "1.0", + "publisherId": "dtn", + "targetResourceType": "FarmBeats" + }, + "systemData": { + "createdAt": "2021-04-12T15:28:06Z", + "lastModifiedAt": "2021-04-12T15:30:01Z" + } + } + } + }, + "operationId": "DataManagerForAgricultureExtensions_Get", + "title": "DataManagerForAgricultureExtensions_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_List.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_List.json new file mode 100644 index 0000000000..366be7977e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_List.json @@ -0,0 +1,250 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "DTN.ContentServices", + "type": "Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions/DTN.ContentServices", + "properties": { + "detailedInformation": [ + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetDailyObservations", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "sunrise", + "sunset", + "weatherCode", + "weatherDescription", + "maxTemperature", + "minTemperature", + "avgHeatIndex", + "maxHeatIndex", + "minHeatIndex", + "maxWindChill", + "minWindChill", + "maxFeelsLike", + "minFeelsLike", + "avgFeelsLike", + "maxWindSpeed", + "avgWetBulbGlobeTemp", + "maxWetBulbGlobeTemp", + "minWetBulbGlobeTemp", + "minutesOfSunshine", + "cornHeatUnit", + "evapotranspiration" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "growingDegreeDay", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "windChill", + "windSpeed", + "windDirection" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "hours", + "units", + "precision", + "sector" + ], + "apiName": "GetHourlyObservations", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "weatherCode", + "weatherDescription", + "feelsLike", + "visibilityWeatherCode", + "visibilityWeatherDescription", + "minutesOfSunshine" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "visibility", + "windChill", + "windSpeed", + "windDirection", + "windGust" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetHourlyForecasts", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "weatherCode", + "weatherDescription", + "feelsLike", + "visibilityWeatherCode", + "visibilityWeatherDescription", + "minutesOfSunshine" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "visibility", + "windChill", + "windSpeed", + "windDirection", + "windGust" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetDailyForecasts", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "sunrise", + "sunset", + "weatherCode", + "weatherDescription", + "maxTemperature", + "minTemperature", + "avgHeatIndex", + "maxHeatIndex", + "minHeatIndex", + "maxWindChill", + "minWindChill", + "maxFeelsLike", + "minFeelsLike", + "avgFeelsLike", + "maxWindSpeed", + "avgWetBulbGlobeTemp", + "maxWetBulbGlobeTemp", + "minWetBulbGlobeTemp", + "minutesOfSunshine", + "cornHeatUnit", + "evapotranspiration" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "growingDegreeDay", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "windChill", + "windSpeed", + "windDirection" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + } + ], + "extensionApiDocsLink": "https://cs-docs.dtn.com/api/weather-observations-and-forecasts-rest-api/", + "extensionAuthLink": "https://www.dtn.com/dtn-content-integration/", + "extensionCategory": "Weather", + "farmBeatsExtensionId": "DTN.ContentServices", + "farmBeatsExtensionName": "DTN", + "farmBeatsExtensionVersion": "1.0", + "publisherId": "dtn", + "targetResourceType": "FarmBeats" + }, + "systemData": { + "createdAt": "2021-04-12T15:28:06Z", + "lastModifiedAt": "2021-04-12T15:30:01Z" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "DataManagerForAgricultureExtensions_List", + "title": "DataManagerForAgricultureExtensions_List" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_CreateOrUpdate.json new file mode 100644 index 0000000000..9bc813a591 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_CreateOrUpdate.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "request": { + "location": "eastus2", + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "responses": { + "200": { + "body": { + "name": "examples-farmbeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "201": { + "body": { + "name": "examples-farmbeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Failed" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "DataManagerForAgricultureResources_CreateOrUpdate", + "title": "DataManagerForAgricultureResources_CreateOrUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Delete.json new file mode 100644 index 0000000000..3a533e483d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Delete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "DataManagerForAgricultureResources_Delete", + "title": "DataManagerForAgricultureResources_Delete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Get.json new file mode 100644 index 0000000000..4e7b5dabc6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Get.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmBeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "examples-farmBeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "DataManagerForAgricultureResources_Get", + "title": "DataManagerForAgricultureResources_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListByResourceGroup.json new file mode 100644 index 0000000000..df0ca0fe96 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListByResourceGroup.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "examples-farmBeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "DataManagerForAgricultureResources_ListByResourceGroup", + "title": "DataManagerForAgricultureResources_ListByResourceGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListBySubscription.json new file mode 100644 index 0000000000..2c1703447e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListBySubscription.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "examples-farmBeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "DataManagerForAgricultureResources_ListBySubscription", + "title": "DataManagerForAgricultureResources_ListBySubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Update.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Update.json new file mode 100644 index 0000000000..9828b76860 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Update.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmBeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "request": { + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "responses": { + "200": { + "body": { + "name": "examples-farmBeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": { + "body": { + "name": "examples-farmBeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "headers": { + "location": "http://azure.async.operation/status" + } + } + }, + "operationId": "DataManagerForAgricultureResources_Update", + "title": "DataManagerForAgricultureResources_Update" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_CreateOrUpdate.json new file mode 100644 index 0000000000..dceaa01cf7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_CreateOrUpdate.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "apiProperties": { + "examples-api": { + "apiFreshnessTimeInMinutes": 3600 + } + }, + "extensionVersion": "1.0" + }, + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "extensionId": "provider.extension", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "201": { + "body": { + "name": "provider.extension", + "type": "Microsoft.AgFoodPlatform/farmBeats/extensions", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-dataManagerForAgricultureResourceName/extensions/provider.extension", + "properties": { + "additionalApiProperties": { + "examples-api": { + "apiFreshnessTimeInMinutes": 3600 + } + }, + "extensionApiDocsLink": "https://docs.provider.com/documentation/extension", + "extensionAuthLink": "https://www.provider.com/extension/", + "extensionCategory": "Weather", + "installedExtensionVersion": "1.0" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:02.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "Extensions_CreateOrUpdate", + "title": "Extensions_CreateOrUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Delete.json new file mode 100644 index 0000000000..066518e750 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "extensionId": "provider.extension", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Extensions_Delete", + "title": "Extensions_Delete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Get.json new file mode 100644 index 0000000000..1465cc8516 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Get.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "extensionId": "provider.extension", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "provider.extension", + "type": "Microsoft.AgFoodPlatform/farmBeats/extensions", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/extensions/provider.extension", + "properties": { + "additionalApiProperties": { + "examples-api": { + "apiFreshnessTimeInMinutes": 3600 + } + }, + "extensionApiDocsLink": "https://docs.provider.com/documentation/extension", + "extensionAuthLink": "https://www.provider.com/extension/", + "extensionCategory": "Weather", + "installedExtensionVersion": "1.0" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "Extensions_Get", + "title": "Extensions_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_ListByDataManagerForAgriculture.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_ListByDataManagerForAgriculture.json new file mode 100644 index 0000000000..99eb18b851 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_ListByDataManagerForAgriculture.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "provider.extension", + "type": "Microsoft.AgFoodPlatform/farmBeats/extensions", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/extensions/provider.extension", + "properties": { + "extensionApiDocsLink": "https://docs.provider.com/documentation/extension", + "extensionAuthLink": "https://www.provider.com/extension/", + "extensionCategory": "Weather", + "installedExtensionVersion": "1.0" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Extensions_ListByDataManagerForAgriculture", + "title": "Extensions_ListByDataManagerForAgriculture" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json new file mode 100644 index 0000000000..665ce7316e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "request": { + "properties": { + "privateLinkServiceConnectionState": { + "description": "Approved by johndoe@contoso.com", + "status": "Approved" + } + } + } + }, + "responses": { + "200": { + "body": { + "name": "privateEndpointConnectionName", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + }, + "400": { + "body": { + "error": { + "code": "ModelValidationFailed", + "message": "Request input validation failed.", + "details": [ + { + "code": "ModelValidationFailed", + "message": "The Payload field is required.", + "target": "Payload" + }, + { + "code": "ModelValidationFailed", + "message": "Error converting value \"InvalidStatus\" to type 'PrivateEndpointState'. Path 'properties.privateLinkServiceConnectionState.status', line 1, position 624. Refer path description for more information.", + "target": "Payload.properties.privateLinkServiceConnectionState.status" + } + ] + } + } + } + }, + "operationId": "PrivateEndpointConnections_CreateOrUpdate", + "title": "PrivateEndpointConnections_CreateOrUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json new file mode 100644 index 0000000000..7b06e2de35 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "http://azure.async.operation/status" + } + }, + "204": {} + }, + "operationId": "PrivateEndpointConnections_Delete", + "title": "PrivateEndpointConnections_Delete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json new file mode 100644 index 0000000000..cf7c434d07 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "privateEndpointConnectionName", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + }, + "404": { + "body": { + "error": { + "code": "PrivateEndpointConnectionNotFound", + "message": "Private endpoint connection resource 'privateEndpointConnectionName' for subscriptionId '11111111-2222-3333-4444-555555555555', resource group name 'examples-rg', resource type 'farmBeats' and resource name 'examples-farmbeatsResourceName' not found." + } + } + } + }, + "operationId": "PrivateEndpointConnections_Get", + "title": "PrivateEndpointConnections_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_ListByResource.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_ListByResource.json new file mode 100644 index 0000000000..d2db6ab443 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_ListByResource.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "privateEndpointConnectionName", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + }, + { + "name": "privateEndpointConnectionName2", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName2", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName2" + }, + "privateLinkServiceConnectionState": { + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "PrivateEndpointConnections_ListByResource", + "title": "PrivateEndpointConnections_ListByResource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_Get.json new file mode 100644 index 0000000000..fb4a1b0bf1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_Get.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subResourceName": "farmbeats", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "farmbeats", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateLinkResources", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "properties": { + "groupId": "farmbeats", + "requiredMembers": [ + "farmbeats" + ], + "requiredZoneNames": [ + "privatelink.farmbeats.azure.net" + ] + } + } + }, + "404": { + "body": { + "error": { + "code": "ResourceNotFound", + "message": "Resource with subscriptionId '11111111-2222-3333-4444-555555555555', resource group 'examples-rg' and resourcename 'examples-farmbeatsResourceName' not found." + } + } + } + }, + "operationId": "PrivateLinkResources_Get", + "title": "PrivateLinkResources_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_ListByResource.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_ListByResource.json new file mode 100644 index 0000000000..c1bcad35f3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_ListByResource.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "farmbeats", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateLinkResources", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "properties": { + "groupId": "farmbeats", + "requiredMembers": [ + "farmbeats" + ], + "requiredZoneNames": [ + "privatelink.farmbeats.azure.net" + ] + } + } + ] + } + } + }, + "operationId": "PrivateLinkResources_ListByResource", + "title": "PrivateLinkResources_ListByResource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_Get.json new file mode 100644 index 0000000000..d0141b0dfc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_Get.json @@ -0,0 +1,776 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureSolutionId": "bayerAgPowered.gdu" + }, + "responses": { + "200": { + "body": { + "name": "bayerAgPowered.gdu", + "type": "Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions", + "id": "/providers/Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions/bayerAgPowered.gdu", + "properties": { + "accessFBApplicationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "accessFBApplicationName": "solution provider 1", + "actionIds": [ + "actionId1" + ], + "dataAccessScopes": [ + "Weather", + "Scenes" + ], + "marketplaceOfferDetails": { + "publisherId": "publisherId", + "saasOfferId": "saasOfferId" + }, + "openApiSpecsDictionary": { + "v1": { + "info": { + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "contact": { + "email": "apiteam@swagger.io" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "termsOfService": "http://swagger.io/terms/", + "title": "Swagger Petstore", + "version": "1.0.6" + }, + "basePath": "/", + "definitions": { + "Error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "ErrorResponse": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "InnerError": { + "type": "object", + "description": "Inner error containing list of errors.\r\nInnerError reference document.", + "additionalProperties": { + "type": "object" + }, + "properties": { + "code": { + "type": "string", + "description": "Specific error code than was provided by the\r\ncontaining error." + } + } + }, + "WeatherDataIngestionJob": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + } + }, + "externalDocs": { + "description": "Find out more about Swagger", + "url": "http://swagger.io" + }, + "host": "addon.azurewebsites.net", + "paths": { + "/v1/resources/{resourceId}": { + "get": { + "operationId": "Weather_GetDataIngestionJobDetails", + "description": "Get weather ingestion job.", + "parameters": [ + { + "name": "resourceId", + "type": "string", + "description": "Id of the job.", + "in": "path", + "required": true + }, + { + "name": "api-version", + "type": "string", + "description": "The requested API version", + "default": "2021-07-31-preview", + "in": "query", + "required": true + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Weather" + ], + "responses": { + "200": { + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Success" + }, + "default": { + "schema": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "description": "Error" + } + } + }, + "put": { + "operationId": "Weather_CreateDataIngestionJob", + "description": "Create a weather data ingestion job.", + "consumes": [ + "application/json" + ], + "parameters": [ + { + "name": "resourceId", + "type": "string", + "description": "Job id supplied by user.", + "in": "path", + "required": true + }, + { + "name": "api-version", + "type": "string", + "description": "The requested API version", + "default": "2021-07-31-preview", + "in": "query", + "required": true + }, + { + "name": "body", + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Job parameters supplied by user.", + "in": "body" + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Weather" + ], + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "responses": { + "202": { + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Success" + }, + "default": { + "schema": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "description": "Error" + } + } + } + } + }, + "schemes": [ + "https" + ], + "swagger": "2.0" + } + }, + "partnerId": "abc", + "partnerTenantId": "556b0c04-d33e-48d0-9f6f-f893c8c77e00", + "roleId": "role1", + "roleName": "roleName1", + "saaSApplicationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "systemData": { + "createdAt": "2022-07-25T10:15:15Z", + "lastModifiedAt": "2022-07-25T10:15:15Z" + } + }, + "headers": {} + } + }, + "operationId": "SolutionsDiscoverability_Get", + "title": "SolutionsDiscoverability_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_List.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_List.json new file mode 100644 index 0000000000..fcd5ae8e73 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_List.json @@ -0,0 +1,778 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "bayerAgPowered.gdu", + "type": "Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions", + "id": "/providers/Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions/bayerAgPowered.gdu", + "properties": { + "accessFBApplicationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "accessFBApplicationName": "solution provider 1", + "actionIds": [ + "actionId1" + ], + "dataAccessScopes": [ + "string" + ], + "marketplaceOfferDetails": { + "publisherId": "publisherId", + "saasOfferId": "saasOfferId" + }, + "openApiSpecsDictionary": { + "v1": { + "info": { + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "contact": { + "email": "apiteam@swagger.io" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "termsOfService": "http://swagger.io/terms/", + "title": "Swagger Petstore", + "version": "1.0.6" + }, + "basePath": "/", + "definitions": { + "Error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "ErrorResponse": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "InnerError": { + "type": "object", + "description": "Inner error containing list of errors.\r\nInnerError reference document.", + "additionalProperties": { + "type": "object" + }, + "properties": { + "code": { + "type": "string", + "description": "Specific error code than was provided by the\r\ncontaining error." + } + } + }, + "WeatherDataIngestionJob": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + } + }, + "externalDocs": { + "description": "Find out more about Swagger", + "url": "http://swagger.io" + }, + "host": "addon.azurewebsites.net", + "paths": { + "/v1/resources/{resourceId}": { + "get": { + "operationId": "Weather_GetDataIngestionJobDetails", + "description": "Get weather ingestion job.", + "parameters": [ + { + "name": "resourceId", + "type": "string", + "description": "Id of the job.", + "in": "path", + "required": true + }, + { + "name": "api-version", + "type": "string", + "description": "The requested API version", + "default": "2021-07-31-preview", + "in": "query", + "required": true + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Weather" + ], + "responses": { + "200": { + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Success" + }, + "default": { + "schema": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "description": "Error" + } + } + }, + "put": { + "operationId": "Weather_CreateDataIngestionJob", + "description": "Create a weather data ingestion job.", + "consumes": [ + "application/json" + ], + "parameters": [ + { + "name": "resourceId", + "type": "string", + "description": "Job id supplied by user.", + "in": "path", + "required": true + }, + { + "name": "api-version", + "type": "string", + "description": "The requested API version", + "default": "2021-07-31-preview", + "in": "query", + "required": true + }, + { + "name": "body", + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Job parameters supplied by user.", + "in": "body" + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Weather" + ], + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "responses": { + "202": { + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Success" + }, + "default": { + "schema": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "description": "Error" + } + } + } + } + }, + "schemes": [ + "https" + ], + "swagger": "2.0" + } + }, + "partnerId": "abc", + "partnerTenantId": "556b0c04-d33e-48d0-9f6f-f893c8c77e00", + "roleId": "role1", + "roleName": "roleName1", + "saaSApplicationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "systemData": { + "createdAt": "2022-07-25T10:15:15Z", + "lastModifiedAt": "2022-07-25T10:15:15Z" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "SolutionsDiscoverability_List", + "title": "SolutionsDiscoverability_List" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_CreateOrUpdate.json new file mode 100644 index 0000000000..a056d6d7d9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_CreateOrUpdate.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "marketplacePublisherId": "publisherId", + "offerId": "offerId", + "planId": "planId", + "roleAssignmentId": "11111111-2222-3333-4444-555555555555", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "termId": "termId" + } + }, + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "solutionId": "abc.partner", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "eTag": "19002383-0000-0700-0000-633572de0000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "properties": { + "marketplacePublisherId": "publisherId", + "offerId": "offerId", + "partnerId": "abc", + "planId": "planId", + "roleAssignmentId": "11111111-2222-3333-4444-555555555555", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "solutionId": "abc.intbugbashfour", + "termId": "termId" + }, + "systemData": { + "createdAt": "2022-09-29T10:26:29Z", + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "eTag": "19002383-0000-0700-0000-633572de0000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "properties": { + "marketplacePublisherId": "publisherId", + "offerId": "offerId", + "partnerId": "abc", + "planId": "planId", + "roleAssignmentId": "11111111-2222-3333-4444-555555555555", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "solutionId": "abc.intbugbashfour", + "termId": "termId" + }, + "systemData": { + "createdAt": "2022-09-29T10:26:29Z", + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Solutions_CreateOrUpdate", + "title": "Solutions_CreateOrUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Delete.json new file mode 100644 index 0000000000..d670792367 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "solutionId": "provider.solution", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Solutions_Delete", + "title": "Solutions_Delete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Get.json new file mode 100644 index 0000000000..80d0f6de34 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Get.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "solutionId": "provider.solution", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "eTag": "19002383-0000-0700-0000-633572de0000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "properties": { + "marketplacePublisherId": "publisherId", + "offerId": "offerId", + "partnerId": "abc", + "planId": "planId", + "roleAssignmentId": "11111111-2222-3333-4444-555555555555", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "solutionId": "abc.intbugbashfour", + "termId": "termId" + }, + "systemData": { + "createdAt": "2022-09-29T10:26:29Z", + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Solutions_Get", + "title": "Solutions_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_List.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_List.json new file mode 100644 index 0000000000..2cba511691 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_List.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "eTag": "19002383-0000-0700-0000-633572de0000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "properties": { + "marketplacePublisherId": "publisherId", + "offerId": "offerId", + "partnerId": "abc", + "planId": "planId", + "roleAssignmentId": "11111111-2222-3333-4444-555555555555", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "solutionId": "abc.intbugbashfour", + "termId": "termId" + }, + "systemData": { + "createdAt": "2022-09-29T10:26:29Z", + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Solutions_List", + "title": "Solutions_List" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp index cfc34d8905..f34178833a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp @@ -32,5 +32,6 @@ namespace Azure.ResourceManager.AgFoodPlatform; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-06-01-preview API version.") v2023_06_01_preview: "2023-06-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp index d9a870cbe5..f926f486cf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp @@ -5,21 +5,25 @@ import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Azure.ResourceManager.AgFoodPlatform; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The reason why the given name is not available.") enum CheckNameAvailabilityReason { Invalid, AlreadyExists, } +@doc("Enum for different types of AuthCredentials supported.") enum AuthCredentialsKind { OAuthClientCredentials, ApiKeyAuthCredentials, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -27,6 +31,7 @@ enum CreatedByType { Key, } +@doc("Data Manager For Agriculture instance provisioning state.") enum ProvisioningState { Creating, Updating, @@ -36,17 +41,20 @@ enum ProvisioningState { Running, } +@doc("Property to allow or block public traffic for an Azure Data Manager For Agriculture resource.") enum PublicNetworkAccess { Enabled, Disabled, } +@doc("The private endpoint connection status.") enum PrivateEndpointServiceConnectionStatus { Pending, Approved, Rejected, } +@doc("The current provisioning state.") enum PrivateEndpointConnectionProvisioningState { Succeeded, Creating, @@ -54,12 +62,14 @@ enum PrivateEndpointConnectionProvisioningState { Failed, } +@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") enum Origin { user, system, `user,system`, } +@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") enum ActionType { Internal, } @@ -95,6 +105,25 @@ model DataConnectorProperties { @discriminator("kind") model AuthCredentials {} +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\"") + @visibility("read") + id?: ResourceIdentifier; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; +} + @doc("DataManagerForAgricultureExtension properties.") model DataManagerForAgricultureExtensionProperties { @doc("Target ResourceType of the Data Manager For Agriculture Extension.") @@ -279,6 +308,30 @@ model PrivateLinkServiceConnectionState { actionsRequired?: string; } +@doc("DataManagerForAgriculture update request.") +model DataManagerForAgricultureUpdateRequestModel { + @doc("Geo-location where the resource lives.") + location?: string; + + @doc("Identity for the resource.") + identity?: Identity; + + @doc("Data Manager For Agriculture ARM Resource properties.") + properties?: DataManagerForAgricultureUpdateProperties; + + @doc("Resource tags.") + tags?: Record; +} + +@doc("Data Manager For Agriculture ARM Resource properties.") +model DataManagerForAgricultureUpdateProperties { + @doc("Sensor integration request model.") + sensorIntegration?: SensorIntegration; + + @doc("Property to allow or block public traffic for an Azure Data Manager For Agriculture resource.") + publicNetworkAccess?: PublicNetworkAccess; +} + @doc(""" Arm async operation class. Ref: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/async-operations. diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp index eb025f3d9e..91430509ee 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp @@ -1,9 +1,11 @@ import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.ResourceManager; namespace Azure.ResourceManager.AgFoodPlatform; diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/alertsmanagement.md b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/alertsmanagement.md new file mode 100644 index 0000000000..70b119763f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/alertsmanagement.md @@ -0,0 +1,133 @@ +```yaml +library-name: AlertsManagement +namespace: Azure.ResourceManager.AlertsManagement +isAzureSpec: true +isArm: true +require: https://github.com/Azure/azure-rest-api-specs/blob/0077b4a8c5071d3ab33fd9f9ba013581c9a66b8f/specification/alertsmanagement/resource-manager/readme.md +skip-csproj: true +modelerfour: + flatten-payloads: false + +rename-mapping: + AlertModification.modifiedAt: modifiedOn|date-time + AlertProcessingRuleProperties.enabled: IsEnabled + AlertsSortByFields.startDateTime: StartOn + AlertsSortByFields.lastModifiedDateTime: LastModifiedOn + AlertsSummaryGroup.groupedby: GroupedBy + AlertsSummaryGroupItem.groupedby: GroupedBy + Essentials.startDateTime: StartOn|date-time + Essentials.lastModifiedUserName: lastModifiedBy + PatchObject.properties.enabled: IsEnabled + SmartGroup.properties.lastModifiedUserName: lastModifiedBy + SmartGroupModificationItem.modifiedAt: modifiedOn|date-time + Recurrence.startTime: startOn + Recurrence.endTime: endOn + Schedule.effectiveFrom: -|date-time + Schedule.effectiveUntil: -|date-time + TimeRange.1h: OneHour + TimeRange.1d: OneDay + TimeRange.7d: SevenDays + TimeRange.30d: ThirtyDays + AddActionGroups: AlertProcessingRuleAddGroupsAction + RemoveAllActionGroups: AlertProcessingRuleRemoveAllGroupsAction + AlertModificationEvent: ServiceAlertModificationEvent + AlertModificationItem: ServiceAlertModificationItemInfo + Severity: ServiceAlertSeverity + Identifier: RetrievedInformationIdentifier + TimeRange: TimeRangeFilter + DaysOfWeek: AlertsManagementDayOfWeek + MonitorService: MonitorServiceSourceForAlert + MonthlyRecurrence: AlertProcessingRuleMonthlyRecurrence + WeeklyRecurrence: AlertProcessingRuleWeeklyRecurrence + SortOrder: AlertsManagementQuerySortOrder + Action: AlertProcessingRuleAction + ActionType: AlertProcessingRuleActionType + Alert: ServiceAlert + AlertsList: ServiceAlertListResult + AlertState: ServiceAlertState + ActionStatus: ServiceAlertActionStatus + Essentials: ServiceAlertEssentials + SignalType: ServiceAlertSignalType + Condition: AlertProcessingRuleCondition + Field: AlertProcessingRuleField + Operator: AlertProcessingRuleOperator + SmartGroupModificationItem: SmartGroupModificationItemInfo + Schedule: AlertProcessingRuleSchedule + Recurrence: AlertProcessingRuleRecurrence + AlertsMetaData: ServiceAlertMetadata + AlertsMetaDataProperties: ServiceAlertMetadataProperties + AlertModification: ServiceAlertModification + AlertsSortByFields: ListServiceAlertsSortByField + AlertsSummary: ServiceAlertSummary + AlertsSummaryGroupByField: GetServiceAlertSummaryGroupByField + AlertsSummaryGroupItem: ServiceAlertSummaryGroupItemInfo + MetadataIdentifier: ServiceAlertMetadataIdentifier + AlertModificationProperties: ServiceAlertModificationProperties + AlertProperties: ServiceAlertProperties + AlertsSummaryGroup: ServiceAlertSummaryGroup + +format-by-name-rules: + "tenantId": "uuid" + "alertId": "uuid" + "smartGroupId": "uuid" + "ETag": "etag" + "location": "azure-location" + "*Uri": "Uri" + "*Uris": "Uri" + "actionGroupIds": "arm-id" + +override-operation-name: + Alerts_MetaData: GetServiceAlertMetadata + Alerts_GetSummary: GetServiceAlertSummary + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag + SCOM: Scom + +directive: + - from: SmartGroups.json + where: $.definitions + transform: > + $.errorResponse['x-ms-client-name'] = 'SmartGroupErrorResponse'; + $.errorResponseBody['x-ms-client-name'] = 'SmartGroupErrorResponseBody'; + $.smartGroupProperties.properties.smartGroupState['x-ms-enum']['name'] = 'SmartGroupState'; + - from: AlertProcessingRules.json + where: $.definitions + transform: > + $.errorResponse['x-ms-client-name'] = 'AlertProcessingRuleErrorResponse'; + $.errorResponseBody['x-ms-client-name'] = 'AlertProcessingRuleErrorResponseBody'; + $.Recurrence.properties.startTime['format'] = 'time'; + $.Recurrence.properties.endTime['format'] = 'time'; + - from: AlertsManagement.json + where: $.definitions + transform: > + $.errorResponse['x-ms-client-name'] = 'AlertsManagementErrorResponse'; + $.errorResponseBody['x-ms-client-name'] = 'AlertsManagementErrorResponseBody'; + - from: SmartGroups.json + where: $.parameters + transform: > + $.smartGroupId['format'] = 'uuid'; + - from: AlertsManagement.json + where: $.parameters + transform: > + $.alertId['format'] = 'uuid'; +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/resources.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/resources.json new file mode 100644 index 0000000000..47b898d324 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/resources.json @@ -0,0 +1,253 @@ +{ + "Resources": { + "AlertProcessingRule": { + "Name": "AlertProcessingRule", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", + "Method": "GET", + "OperationID": "AlertProcessingRules_GetByName", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get an alert processing rule by name." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", + "Method": "PUT", + "OperationID": "AlertProcessingRules_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update an alert processing rule." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", + "Method": "PATCH", + "OperationID": "AlertProcessingRules_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Enable, disable, or update tags for an alert processing rule." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", + "Method": "DELETE", + "OperationID": "AlertProcessingRules_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete an alert processing rule." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules", + "Method": "GET", + "OperationID": "AlertProcessingRules_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List all alert processing rules in a resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetAlertProcessingRules", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/actionRules", + "Method": "GET", + "OperationID": "AlertProcessingRules_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List all alert processing rules in a subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "AlertProcessingRule", + "ResourceType": "Microsoft.AlertsManagement/actionRules", + "ResourceKey": "alertProcessingRuleName", + "ResourceKeySegment": "actionRules", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ServiceAlert": { + "Name": "ServiceAlert", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}", + "Method": "GET", + "OperationID": "Alerts_GetById", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get information related to a specific alert" + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts", + "Method": "GET", + "OperationID": "Alerts_GetAll", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "GetAll", + "NextPageMethod": "GetAllNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime. " + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetServiceAlertSummary", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alertsSummary", + "Method": "GET", + "OperationID": "Alerts_GetSummary", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a summarized count of your alerts grouped by various parameters (e.g. grouping by \u0027Severity\u0027 returns the count of alerts for each severity)." + }, + { + "Name": "GetServiceAlertMetadata", + "Path": "/providers/Microsoft.AlertsManagement/alertsMetaData", + "Method": "GET", + "OperationID": "Alerts_MetaData", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "List alerts meta data information based on value of identifier parameter." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "ChangeState", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/changestate", + "Method": "POST", + "OperationID": "Alerts_ChangeState", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Change the state of an alert." + }, + { + "Name": "GetHistory", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history", + "Method": "GET", + "OperationID": "Alerts_GetHistory", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the history of an alert, which captures any monitor condition changes (Fired/Resolved) and alert state changes (New/Acknowledged/Closed)." + } + ], + "Parents": ["SubscriptionResource"], + "SwaggerModelName": "Alert", + "ResourceType": "Microsoft.AlertsManagement/alerts", + "ResourceKey": "alertId", + "ResourceKeySegment": "alerts", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": true, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "SmartGroup": { + "Name": "SmartGroup", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}", + "Method": "GET", + "OperationID": "SmartGroups_GetById", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get information related to a specific Smart Group." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups", + "Method": "GET", + "OperationID": "SmartGroups_GetAll", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "GetAll", + "NextPageMethod": "GetAllNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List all the Smart Groups within a specified subscription. " + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "ChangeState", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/changeState", + "Method": "POST", + "OperationID": "SmartGroups_ChangeState", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Change the state of a Smart Group." + }, + { + "Name": "GetHistory", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/history", + "Method": "GET", + "OperationID": "SmartGroups_GetHistory", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the history a smart group, which captures any Smart Group state changes (New/Acknowledged/Closed) ." + } + ], + "Parents": ["SubscriptionResource"], + "SwaggerModelName": "SmartGroup", + "ResourceType": "Microsoft.AlertsManagement/smartGroups", + "ResourceKey": "smartGroupId", + "ResourceKeySegment": "smartGroups", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": true, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp new file mode 100644 index 0000000000..f09aa67b5b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp @@ -0,0 +1,136 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.AlertsManagement; +@doc("An alert created in alert management service.") +@subscriptionResource +model Alert is ProxyResource { + @doc("Unique ID of an alert instance.") + @path + @key("alertId") + @segment("alerts") + name: string; +} + +@armResourceOperations +interface Alerts { + @doc("Get information related to a specific alert") + getById is ArmResourceRead; + + @doc("List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime. ") + getAll is ArmResourceListByParent< + Alert, + { + ...BaseParameters; + + @doc("Filter by target resource( which is full ARM ID) Default value is select all.") + @query("targetResource") + targetResource?: string; + + @doc("Filter by target resource type. Default value is select all.") + @query("targetResourceType") + targetResourceType?: string; + + @doc("Filter by target resource group name. Default value is select all.") + @query("targetResourceGroup") + targetResourceGroup?: string; + + @doc("Filter by monitor service which generates the alert instance. Default value is select all.") + @query("monitorService") + monitorService?: MonitorService; + + @doc("Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.") + @query("monitorCondition") + monitorCondition?: MonitorCondition; + + @doc("Filter by severity. Default value is select all.") + @query("severity") + severity?: Severity; + + @doc("Filter by state of the alert instance. Default value is to select all.") + @query("alertState") + alertState?: AlertState; + + @doc("Filter by specific alert rule. Default value is to select all.") + @query("alertRule") + alertRule?: string; + + @doc("Filter the alerts list by the Smart Group Id. Default value is none.") + @query("smartGroupId") + smartGroupId?: string; + + @doc("Include context which has contextual data specific to the monitor service. Default value is false'") + @query("includeContext") + includeContext?: boolean; + + @doc("Include egress config which would be used for displaying the content in portal. Default value is 'false'.") + @query("includeEgressConfig") + includeEgressConfig?: boolean; + + @doc("Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the \"includeContent\" filter is selected, maximum value allowed is 25. Default value is 25.") + @query("pageCount") + pageCount?: int32; + + @doc("Sort the query results by input field, Default value is 'lastModifiedDateTime'.") + @query("sortBy") + sortBy?: AlertsSortByFields; + + @doc("Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others.") + @query("sortOrder") + sortOrder?: SortOrder; + + @doc("This filter allows to selection of the fields(comma separated) which would be part of the essential section. This would allow to project only the required fields rather than getting entire content. Default is to fetch all the fields in the essentials section.") + @query("select") + select?: string; + + @doc("Filter by time range by below listed values. Default value is 1 day.") + @query("timeRange") + timeRange?: TimeRange; + + @doc("Filter by custom time range in the format / where time is in (ISO-8601 format)'. Permissible values is within 30 days from query time. Either timeRange or customTimeRange could be used but not both. Default is none.") + @query("customTimeRange") + customTimeRange?: string; + } + >; + + @doc("Change the state of an alert.") + changeState is ArmResourceActionSync< + Alert, + string, + Alert, + { + ...BaseParameters; + + @doc("New state of the alert.") + @query("newState") + newState: AlertState; + } + >; + + @doc("Get the history of an alert, which captures any monitor condition changes (Fired/Resolved) and alert state changes (New/Acknowledged/Closed).") + // FIXME: Alerts_GetHistory could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history") + @get + GetHistory is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("Unique ID of an alert instance.") + @path + alertId: string; + }, + AlertModification + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp new file mode 100644 index 0000000000..0ce05ed92c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp @@ -0,0 +1,42 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.AlertsManagement; +@doc("Alert processing rule object containing target scopes, conditions and scheduling logic.") +model AlertProcessingRule is TrackedResource { + @doc("The name of the alert processing rule that needs to be fetched.") + @path + @key("alertProcessingRuleName") + @segment("actionRules") + name: string; +} + +@armResourceOperations +interface AlertProcessingRules { + @doc("Get an alert processing rule by name.") + getByName is ArmResourceRead; + + @doc("Create or update an alert processing rule.") + createOrUpdate is ArmResourceCreateOrReplaceSync; + + @doc("Enable, disable, or update tags for an alert processing rule.") + update is ArmCustomPatchSync; + + @doc("Delete an alert processing rule.") + delete is ArmResourceDeleteSync; + + @doc("List all alert processing rules in a resource group.") + listByResourceGroup is ArmResourceListByParent; + + @doc("List all alert processing rules in a subscription.") + listBySubscription is ArmListBySubscription; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp new file mode 100644 index 0000000000..d6bec57e3f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp @@ -0,0 +1,112 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.AlertsManagement; +@doc("Set of related alerts grouped together smartly by AMS.") +@subscriptionResource +model SmartGroup is ProxyResource { + @doc("Smart group unique id. ") + @path + @key("smartGroupId") + @segment("smartGroups") + name: string; +} + +@armResourceOperations +interface SmartGroups { + @doc("Get information related to a specific Smart Group.") + getById is ArmResourceRead; + + @doc("List all the Smart Groups within a specified subscription. ") + getAll is ArmResourceListByParent< + SmartGroup, + { + ...BaseParameters; + + @doc("Filter by target resource( which is full ARM ID) Default value is select all.") + @query("targetResource") + targetResource?: string; + + @doc("Filter by target resource group name. Default value is select all.") + @query("targetResourceGroup") + targetResourceGroup?: string; + + @doc("Filter by target resource type. Default value is select all.") + @query("targetResourceType") + targetResourceType?: string; + + @doc("Filter by monitor service which generates the alert instance. Default value is select all.") + @query("monitorService") + monitorService?: MonitorService; + + @doc("Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.") + @query("monitorCondition") + monitorCondition?: MonitorCondition; + + @doc("Filter by severity. Default value is select all.") + @query("severity") + severity?: Severity; + + @doc("Filter by state of the smart group. Default value is to select all.") + @query("smartGroupState") + smartGroupState?: AlertState; + + @doc("Filter by time range by below listed values. Default value is 1 day.") + @query("timeRange") + timeRange?: TimeRange; + + @doc("Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the \"includeContent\" filter is selected, maximum value allowed is 25. Default value is 25.") + @query("pageCount") + pageCount?: int32; + + @doc("Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'.") + @query("sortBy") + sortBy?: SmartGroupsSortByFields; + + @doc("Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others.") + @query("sortOrder") + sortOrder?: SortOrder; + } + >; + + @doc("Change the state of a Smart Group.") + changeState is ArmResourceActionSync< + SmartGroup, + void, + SmartGroup, + { + ...BaseParameters; + + @doc("New state of the alert.") + @query("newState") + newState: AlertState; + } + >; + + @doc("Get the history a smart group, which captures any Smart Group state changes (New/Acknowledged/Closed) .") + // FIXME: SmartGroups_GetHistory could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/history") + @get + GetHistory is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("Smart group unique id. ") + @path + smartGroupId: string; + }, + SmartGroupModification + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsAnActionGroupToAllAlertsInASubscription.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsAnActionGroupToAllAlertsInASubscription.json new file mode 100644 index 0000000000..1ac05a035a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsAnActionGroupToAllAlertsInASubscription.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "alertProcessingRule": { + "location": "Global", + "properties": { + "description": "Add ActionGroup1 to all alerts in the subscription", + "actions": [ + { + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/ActionGroup1" + ], + "actionType": "AddActionGroups" + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "tags": {} + }, + "alertProcessingRuleName": "AddActionGroupToSubscription", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "subId1" + }, + "responses": { + "200": { + "body": { + "name": "AddActionGroupToSubscription", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupToSubscription", + "location": "Global", + "properties": { + "description": "Add ActionGroup1 to all alerts in the subscription", + "actions": [ + { + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/ActionGroup1" + ], + "actionType": "AddActionGroups" + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "systemData": { + "createdAt": "2021-02-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2021-02-13T16:15:34Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + }, + "201": { + "body": { + "name": "AddActionGroupToSubscription", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupToSubscription", + "location": "Global", + "properties": { + "description": "Add ActionGroup1 to all alerts in the subscription", + "actions": [ + { + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/ActionGroup1" + ], + "actionType": "AddActionGroups" + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "systemData": { + "createdAt": "2021-02-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2021-02-13T16:15:34Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + } + }, + "operationId": "AlertProcessingRules_CreateOrUpdate", + "title": "Create or update a rule that adds an action group to all alerts in a subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsTwoActionGroupsToAllSev0AndSev1AlertsInTwoResourceGroups.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsTwoActionGroupsToAllSev0AndSev1AlertsInTwoResourceGroups.json new file mode 100644 index 0000000000..776a83326d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsTwoActionGroupsToAllSev0AndSev1AlertsInTwoResourceGroups.json @@ -0,0 +1,131 @@ +{ + "parameters": { + "alertProcessingRule": { + "location": "Global", + "properties": { + "description": "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups", + "actions": [ + { + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1", + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2" + ], + "actionType": "AddActionGroups" + } + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "sev0", + "sev1" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ] + }, + "tags": {} + }, + "alertProcessingRuleName": "AddActionGroupsBySeverity", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "subId1" + }, + "responses": { + "200": { + "body": { + "name": "AddActionGroupsBySeverity", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupsBySeverity", + "location": "Global", + "properties": { + "description": "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups", + "actions": [ + { + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1", + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2" + ], + "actionType": "AddActionGroups" + } + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "sev0", + "sev1" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-13T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + }, + "201": { + "body": { + "name": "AddActionGroupsBySeverity", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupsBySeverity", + "location": "Global", + "properties": { + "description": "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups", + "actions": [ + { + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1", + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2" + ], + "actionType": "AddActionGroups" + } + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "sev0", + "sev1" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-13T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + } + }, + "operationId": "AlertProcessingRules_CreateOrUpdate", + "title": "Create or update a rule that adds two action groups to all Sev0 and Sev1 alerts in two resource groups" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAlertsOnASpecificVmDuringAOneOffMaintenanceWindow_1800_2000AtASpecificDatePacificStandardTime.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAlertsOnASpecificVmDuringAOneOffMaintenanceWindow_1800_2000AtASpecificDatePacificStandardTime.json new file mode 100644 index 0000000000..de1721e393 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAlertsOnASpecificVmDuringAOneOffMaintenanceWindow_1800_2000AtASpecificDatePacificStandardTime.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "alertProcessingRule": { + "location": "Global", + "properties": { + "description": "Removes all ActionGroups from all Alerts on VMName during the maintenance window", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "enabled": true, + "schedule": { + "effectiveFrom": "2021-04-15T18:00:00", + "effectiveUntil": "2021-04-15T20:00:00", + "timeZone": "Pacific Standard Time" + }, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1/providers/Microsoft.Compute/virtualMachines/VMName" + ] + }, + "tags": {} + }, + "alertProcessingRuleName": "RemoveActionGroupsMaintenanceWindow", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "subId1" + }, + "responses": { + "200": { + "body": { + "name": "RemoveActionGroupsMaintenanceWindow", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsMaintenanceWindow", + "location": "Global", + "properties": { + "description": "Removes all ActionGroups from all Alerts on VMName during the maintenance window", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "enabled": true, + "schedule": { + "effectiveFrom": "2021-04-15T18:00:00", + "effectiveUntil": "2021-04-15T20:00:00", + "timeZone": "Pacific Standard Time" + }, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1/providers/Microsoft.Compute/virtualMachines/VMName" + ] + }, + "systemData": { + "createdAt": "2018-06-12T20:13:29Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + }, + "201": { + "body": { + "name": "RemoveActionGroupsMaintenanceWindow", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsMaintenanceWindow", + "location": "Global", + "properties": { + "description": "Removes all ActionGroups from all Alerts on VMName during the maintenance window", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "enabled": true, + "schedule": { + "effectiveFrom": "2021-04-15T18:00:00", + "effectiveUntil": "2021-04-15T20:00:00", + "timeZone": "Pacific Standard Time" + }, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1/providers/Microsoft.Compute/virtualMachines/VMName" + ] + }, + "systemData": { + "createdAt": "2018-06-12T20:13:29Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + } + }, + "operationId": "AlertProcessingRules_CreateOrUpdate", + "title": "Create or update a rule that removes all action groups from alerts on a specific VM during a one-off maintenance window (1800-2000 at a specific date, Pacific Standard Time)" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsInASubscriptionComingFromASpecificAlertRule.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsInASubscriptionComingFromASpecificAlertRule.json new file mode 100644 index 0000000000..960e467d9d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsInASubscriptionComingFromASpecificAlertRule.json @@ -0,0 +1,113 @@ +{ + "parameters": { + "alertProcessingRule": { + "location": "Global", + "properties": { + "description": "Removes all ActionGroups from all Alerts that fire on above AlertRule", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "AlertRuleId", + "operator": "Equals", + "values": [ + "/subscriptions/suubId1/resourceGroups/Rgid2/providers/microsoft.insights/activityLogAlerts/RuleName" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "tags": {} + }, + "alertProcessingRuleName": "RemoveActionGroupsSpecificAlertRule", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "subId1" + }, + "responses": { + "200": { + "body": { + "name": "RemoveActionGroupsSpecificAlertRule", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsSpecificAlertRule", + "location": "Global", + "properties": { + "description": "Removes all ActionGroups from all Alerts that fire on above AlertRule", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "AlertRuleId", + "operator": "Equals", + "values": [ + "/subscriptions/suubId1/resourceGroups/Rgid2/providers/microsoft.insights/activityLogAlerts/RuleName" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "systemData": { + "createdAt": "2018-06-11T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + }, + "201": { + "body": { + "name": "RemoveActionGroupsSpecificAlertRule", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsSpecificAlertRule", + "location": "Global", + "properties": { + "description": "Removes all ActionGroups from all Alerts that fire on above AlertRule", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "AlertRuleId", + "operator": "Equals", + "values": [ + "/subscriptions/suubId1/resourceGroups/Rgid2/providers/microsoft.insights/activityLogAlerts/RuleName" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "systemData": { + "createdAt": "2018-06-11T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + } + }, + "operationId": "AlertProcessingRules_CreateOrUpdate", + "title": "Create or update a rule that removes all action groups from all alerts in a subscription coming from a specific alert rule" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsOnAnyVmInTwoResourceGroupsDuringARecurringMaintenanceWindow_2200_0400EverySatAndSunIndiaStandardTime.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsOnAnyVmInTwoResourceGroupsDuringARecurringMaintenanceWindow_2200_0400EverySatAndSunIndiaStandardTime.json new file mode 100644 index 0000000000..885de099fc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsOnAnyVmInTwoResourceGroupsDuringARecurringMaintenanceWindow_2200_0400EverySatAndSunIndiaStandardTime.json @@ -0,0 +1,158 @@ +{ + "parameters": { + "alertProcessingRule": { + "location": "Global", + "properties": { + "description": "Remove all ActionGroups from all Vitual machine Alerts during the recurring maintenance", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "TargetResourceType", + "operator": "Equals", + "values": [ + "microsoft.compute/virtualmachines" + ] + } + ], + "enabled": true, + "schedule": { + "recurrences": [ + { + "daysOfWeek": [ + "Saturday", + "Sunday" + ], + "endTime": "04:00:00", + "recurrenceType": "Weekly", + "startTime": "22:00:00" + } + ], + "timeZone": "India Standard Time" + }, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ] + }, + "tags": {} + }, + "alertProcessingRuleName": "RemoveActionGroupsRecurringMaintenance", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "subId1" + }, + "responses": { + "200": { + "body": { + "name": "RemoveActionGroupsRecurringMaintenance", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsRecurringMaintenance", + "location": "Global", + "properties": { + "description": "Remove all ActionGroups from all Vitual machine Alerts during the recurring maintenance", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "TargetResourceType", + "operator": "Equals", + "values": [ + "microsoft.compute/virtualmachines" + ] + } + ], + "enabled": true, + "schedule": { + "recurrences": [ + { + "daysOfWeek": [ + "Saturday", + "Sunday" + ], + "endTime": "04:00:00", + "recurrenceType": "Weekly", + "startTime": "22:00:00" + } + ], + "timeZone": "India Standard Time" + }, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ] + }, + "systemData": { + "createdAt": "2018-06-11T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + }, + "201": { + "body": { + "name": "RemoveActionGroupsRecurringMaintenance", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsRecurringMaintenance", + "location": "Global", + "properties": { + "description": "Remove all ActionGroups from all Vitual machine Alerts during the recurring maintenance", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "TargetResourceType", + "operator": "Equals", + "values": [ + "microsoft.compute/virtualmachines" + ] + } + ], + "enabled": true, + "schedule": { + "recurrences": [ + { + "daysOfWeek": [ + "Saturday", + "Sunday" + ], + "endTime": "04:00:00", + "recurrenceType": "Weekly", + "startTime": "22:00:00" + } + ], + "timeZone": "India Standard Time" + }, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ] + }, + "systemData": { + "createdAt": "2018-06-11T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + } + }, + "operationId": "AlertProcessingRules_CreateOrUpdate", + "title": "Create or update a rule that removes all action groups from all alerts on any VM in two resource groups during a recurring maintenance window (2200-0400 every Sat and Sun, India Standard Time)" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsOutsideBusinessHoursMonFri_09_00_17_00EasternStandardTime.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsOutsideBusinessHoursMonFri_09_00_17_00EasternStandardTime.json new file mode 100644 index 0000000000..e79939bea5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsOutsideBusinessHoursMonFri_09_00_17_00EasternStandardTime.json @@ -0,0 +1,137 @@ +{ + "parameters": { + "alertProcessingRule": { + "location": "Global", + "properties": { + "description": "Remove all ActionGroups outside business hours", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "enabled": true, + "schedule": { + "recurrences": [ + { + "endTime": "09:00:00", + "recurrenceType": "Daily", + "startTime": "17:00:00" + }, + { + "daysOfWeek": [ + "Saturday", + "Sunday" + ], + "recurrenceType": "Weekly" + } + ], + "timeZone": "Eastern Standard Time" + }, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "tags": {} + }, + "alertProcessingRuleName": "RemoveActionGroupsOutsideBusinessHours", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "subId1" + }, + "responses": { + "200": { + "body": { + "name": "RemoveActionGroupsOutsideBusinessHours", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsOutsideBusinessHours", + "location": "Global", + "properties": { + "description": "Remove all ActionGroups outside business hours", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "enabled": true, + "schedule": { + "recurrences": [ + { + "endTime": "09:00:00", + "recurrenceType": "Daily", + "startTime": "17:00:00" + }, + { + "daysOfWeek": [ + "Saturday", + "Sunday" + ], + "recurrenceType": "Weekly" + } + ], + "timeZone": "Eastern Standard Time" + }, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "systemData": { + "createdAt": "2018-06-11T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + }, + "201": { + "body": { + "name": "RemoveActionGroupsOutsideBusinessHours", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsOutsideBusinessHours", + "location": "Global", + "properties": { + "description": "Remove all ActionGroups outside business hours", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "enabled": true, + "schedule": { + "recurrences": [ + { + "endTime": "09:00:00", + "recurrenceType": "Daily", + "startTime": "17:00:00" + }, + { + "daysOfWeek": [ + "Saturday", + "Sunday" + ], + "recurrenceType": "Weekly" + } + ], + "timeZone": "Eastern Standard Time" + }, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "systemData": { + "createdAt": "2018-06-11T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + } + }, + "operationId": "AlertProcessingRules_CreateOrUpdate", + "title": "Create or update a rule that removes all action groups outside business hours (Mon-Fri 09:00-17:00, Eastern Standard Time)" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Delete.json new file mode 100644 index 0000000000..b42923c565 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Delete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "alertProcessingRuleName": "DailySuppression", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "AlertProcessingRules_Delete", + "title": "DeleteAlertProcessingRule" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_GetByName.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_GetByName.json new file mode 100644 index 0000000000..5cb4374cc0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_GetByName.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "alertProcessingRuleName": "DailySuppression", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": { + "body": { + "name": "DailySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression", + "location": "Global", + "properties": { + "description": "Alert processing rule on resource group for daily and weekly scheduling", + "actions": [ + { + "actionGroupIds": [ + "actiongGroup1", + "actiongGroup2" + ], + "actionType": "AddActionGroups" + } + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "Sev0", + "Sev2" + ] + }, + { + "field": "MonitorService", + "operator": "Equals", + "values": [ + "Platform", + "Application Insights" + ] + }, + { + "field": "MonitorCondition", + "operator": "Equals", + "values": [ + "Fired" + ] + }, + { + "field": "TargetResourceType", + "operator": "NotEquals", + "values": [ + "Microsoft.Compute/VirtualMachines" + ] + } + ], + "enabled": true, + "schedule": { + "effectiveFrom": "2018-01-10T22:05:09", + "effectiveUntil": "2018-12-10T22:05:09", + "recurrences": [ + { + "endTime": "14:00:00", + "recurrenceType": "Daily", + "startTime": "06:00:00" + }, + { + "daysOfWeek": [ + "Saturday", + "Sunday" + ], + "endTime": "20:00:00", + "recurrenceType": "Weekly", + "startTime": "10:00:00" + } + ], + "timeZone": "Pacific Standard Time" + }, + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + } + }, + "operationId": "AlertProcessingRules_GetByName", + "title": "GetAlertProcessingRuleById" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListByResourceGroup.json new file mode 100644 index 0000000000..ce4b49272a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListByResourceGroup.json @@ -0,0 +1,137 @@ +{ + "parameters": { + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules?api-version=2021-08-08&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", + "value": [ + { + "name": "DailySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression", + "location": "Global", + "properties": { + "description": "Alert processing rule on resource group for daily suppression", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "Sev0", + "Sev2" + ] + }, + { + "field": "MonitorService", + "operator": "Equals", + "values": [ + "Platform", + "Application Insights" + ] + }, + { + "field": "TargetResourceType", + "operator": "NotEquals", + "values": [ + "Microsoft.Compute/VirtualMachines" + ] + } + ], + "enabled": true, + "schedule": { + "effectiveFrom": "2018-09-12T06:00:00", + "effectiveUntil": "2018-09-20T14:00:00", + "recurrences": [ + { + "endTime": "14:00:00", + "recurrenceType": "Daily", + "startTime": "06:00:00" + } + ], + "timeZone": "Pacific Standard Time" + }, + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + }, + { + "name": "WeeklySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/WeeklySuppression", + "location": "Global", + "properties": { + "description": "Alert processing rule on resource group for sending email", + "actions": [ + { + "actionGroupIds": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.insights/actiongroups/testAG" + ], + "actionType": "AddActionGroups" + } + ], + "conditions": [ + { + "field": "MonitorCondition", + "operator": "Equals", + "values": [ + "Fired" + ] + }, + { + "field": "Description", + "operator": "Contains", + "values": [ + "Percentage CPU greater than 80%", + "Metric alert on resource foo" + ] + }, + { + "field": "AlertContext", + "operator": "DoesNotContain", + "values": [ + "testresource", + "foo" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.Compute/VirtualMachines/testResource" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + } + } + }, + "operationId": "AlertProcessingRules_ListByResourceGroup", + "title": "GetAlertProcessingRulesResourceGroupWide" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListBySubscription.json new file mode 100644 index 0000000000..5e10417ad6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListBySubscription.json @@ -0,0 +1,128 @@ +{ + "parameters": { + "api-version": "2021-08-08", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/actionRules?api-version=2021-08-08&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", + "value": [ + { + "name": "DailySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression", + "location": "Global", + "properties": { + "description": "Alert processing rule on resource group for daily suppression", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "Sev0", + "Sev2" + ] + }, + { + "field": "MonitorService", + "operator": "Equals", + "values": [ + "Platform", + "Application Insights" + ] + }, + { + "field": "TargetResourceType", + "operator": "NotEquals", + "values": [ + "Microsoft.Compute/VirtualMachines" + ] + } + ], + "enabled": true, + "schedule": { + "effectiveFrom": "2018-01-10T22:05:09", + "effectiveUntil": "2018-12-10T22:05:09", + "recurrences": [ + { + "endTime": "14:00:00", + "recurrenceType": "Daily", + "startTime": "06:00:00" + } + ], + "timeZone": "Pacific Standard Time" + }, + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + }, + { + "name": "WeeklySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/WeeklySuppression", + "location": "Global", + "properties": { + "description": "Alert processing rule on resource group for adding action group", + "actions": [ + { + "actionGroupIds": [ + "actiongGroup1" + ], + "actionType": "AddActionGroups" + } + ], + "conditions": [ + { + "field": "MonitorCondition", + "operator": "Equals", + "values": [ + "Fired" + ] + }, + { + "field": "Description", + "operator": "Contains", + "values": [ + "Percentage CPU greater than 80%", + "Metric alert on resource foo" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.Compute/VirtualMachines/testResource" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + } + } + }, + "operationId": "AlertProcessingRules_ListBySubscription", + "title": "GetAlertProcessingRulesSubscriptionWide" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Update.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Update.json new file mode 100644 index 0000000000..fd7ba3ccd6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Update.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "alertProcessingRuleName": "WeeklySuppression", + "alertProcessingRulePatch": { + "properties": { + "enabled": false + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": { + "body": { + "name": "WeeklySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/WeeklySuppression", + "location": "Global", + "properties": { + "description": "Alert processing rule on resource group for weekly suppression", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "Sev0", + "Sev2" + ] + }, + { + "field": "MonitorService", + "operator": "Equals", + "values": [ + "Platform", + "Application Insights" + ] + }, + { + "field": "TargetResourceType", + "operator": "NotEquals", + "values": [ + "Microsoft.Compute/VirtualMachines" + ] + } + ], + "enabled": false, + "schedule": { + "effectiveFrom": "2018-12-10T22:05:09", + "effectiveUntil": "2018-12-05T22:05:09", + "recurrences": [ + { + "daysOfWeek": [ + "Tuesday", + "Friday" + ], + "endTime": "14:00:00", + "recurrenceType": "Weekly", + "startTime": "06:00:00" + } + ], + "timeZone": "Pacific Standard Time" + }, + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "AlertProcessingRules_Update", + "title": "PatchAlertProcessingRule" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_ChangeState.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_ChangeState.json new file mode 100644 index 0000000000..e56ba7816b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_ChangeState.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", + "api-version": "2019-05-05-preview", + "body": { + "comment": "Acknowledging alert" + }, + "newState": "Acknowledged", + "subscriptionId": "9e261de7-c804-4b9d-9ebf-6f50fe350a9a" + }, + "responses": { + "200": { + "body": { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/alerts", + "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", + "properties": { + "context": {}, + "egressConfig": {}, + "essentials": { + "description": "description of the alert", + "actionStatus": { + "isSuppressed": false + }, + "alertRule": "https://servisdfsdfappinsight.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", + "alertState": "Acknowledged", + "lastModifiedDateTime": "2018-09-13T15:51:02Z", + "lastModifiedUserName": "System", + "monitorCondition": "Fired", + "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", + "monitorService": "Application Insights", + "severity": "Sev3", + "signalType": "Log", + "smartGroupId": "23d6b2ce-8c54-468f-aff0-sd32aebb7e56", + "smartGroupingReason": "Occurred frequently with other alerts", + "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", + "startDateTime": "2018-09-13T15:51:02Z", + "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", + "targetResourceGroup": "servicedeskresourcegroup", + "targetResourceName": "servicedeskappinsight", + "targetResourceType": "components" + } + } + } + } + }, + "operationId": "Alerts_ChangeState", + "title": "Resolve" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetAll.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetAll.json new file mode 100644 index 0000000000..2e9edf3199 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetAll.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "api-version": "2019-05-05-preview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/alerts?api-version=2018-05-05-preview&timeRange=1d&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", + "value": [ + { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/alerts", + "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", + "properties": { + "context": {}, + "egressConfig": {}, + "essentials": { + "description": "description of the alert", + "actionStatus": { + "isSuppressed": false + }, + "alertRule": "https://servisdffsdf.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", + "alertState": "Acknowledged", + "lastModifiedDateTime": "2018-09-13T15:51:02Z", + "lastModifiedUserName": "System", + "monitorCondition": "Fired", + "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", + "monitorService": "Application Insights", + "severity": "Sev3", + "signalType": "Log", + "smartGroupId": "23d6b2ce-8c54-468f-aff0-sd32aebb7e56", + "smartGroupingReason": "Occurred frequently with other alerts", + "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", + "startDateTime": "2018-09-13T15:51:02Z", + "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", + "targetResourceGroup": "servicedeskresourcegroup", + "targetResourceName": "servicedeskappinsight", + "targetResourceType": "components" + } + } + }, + { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/alerts", + "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", + "properties": { + "context": {}, + "egressConfig": {}, + "essentials": { + "description": "description of the alert", + "actionStatus": { + "isSuppressed": false + }, + "alertRule": "https://servicsdfsdf.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", + "alertState": "New", + "lastModifiedDateTime": "2018-09-13T15:51:02Z", + "lastModifiedUserName": "System", + "monitorCondition": "Fired", + "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", + "monitorService": "Application Insights", + "severity": "Sev3", + "signalType": "Log", + "smartGroupId": "d1c49c89-ea95-4697-a299-c0f5ebac62f1", + "smartGroupingReason": "Alerts that frequently occur together have been grouped.", + "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", + "startDateTime": "2018-09-13T15:51:02Z", + "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/cind/providers/microsoft.operationalinsights/workspaces/servicedeskwcus", + "targetResourceGroup": "servicedeskresourcegroup", + "targetResourceName": "servicedeskwcus", + "targetResourceType": "components" + } + } + } + ] + } + } + }, + "operationId": "Alerts_GetAll", + "title": "ListAlerts" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetById.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetById.json new file mode 100644 index 0000000000..b4f1e0515d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetById.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", + "api-version": "2019-05-05-preview", + "subscriptionId": "9e261de7-c804-4b9d-9ebf-6f50fe350a9a" + }, + "responses": { + "200": { + "body": { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/alerts", + "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", + "properties": { + "context": {}, + "egressConfig": {}, + "essentials": { + "description": "description of the alert", + "actionStatus": { + "isSuppressed": false + }, + "alertRule": "https://sersdfsdfinsight.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", + "alertState": "Acknowledged", + "lastModifiedDateTime": "2018-09-13T15:51:02Z", + "lastModifiedUserName": "System", + "monitorCondition": "Fired", + "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", + "monitorService": "Application Insights", + "severity": "Sev3", + "signalType": "Log", + "smartGroupId": "23d6b2ce-8c54-468f-aff0-sd32aebb7e56", + "smartGroupingReason": "Occurred frequently with other alerts", + "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", + "startDateTime": "2018-09-13T15:51:02Z", + "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", + "targetResourceGroup": "servicedeskresourcegroup", + "targetResourceName": "servicedeskappinsight", + "targetResourceType": "components" + } + } + } + } + }, + "operationId": "Alerts_GetById", + "title": "GetById" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetHistory.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetHistory.json new file mode 100644 index 0000000000..af3b3e2166 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetHistory.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", + "api-version": "2019-05-05-preview", + "subscriptionId": "9e261de7-c804-4b9d-9ebf-6f50fe350a9a" + }, + "responses": { + "200": { + "body": { + "name": "CPU Alert", + "type": "Microsoft.AlertsManagement/alerts", + "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100/history/default", + "properties": { + "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", + "modifications": [ + { + "description": "State changed from 'New' to 'Acknowledged'", + "comments": "Acknowledging alert", + "modificationEvent": "StateChange", + "modifiedAt": "2018-06-13T06:14:15.7378737Z", + "modifiedBy": "vikramm@microsoft.com", + "newValue": "Acknowledged", + "oldValue": "New" + }, + { + "description": "New Alert Object is created", + "comments": "", + "modificationEvent": "AlertCreated", + "modifiedAt": "2018-06-13T06:09:01Z", + "modifiedBy": "System", + "newValue": "", + "oldValue": "" + } + ] + } + } + } + }, + "operationId": "Alerts_GetHistory", + "title": "Resolve" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_ChangeState.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_ChangeState.json new file mode 100644 index 0000000000..4859d65412 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_ChangeState.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2019-05-05-preview", + "body": { + "comments": "Acknowledging smart group" + }, + "newState": "Acknowledged", + "smartGroupId": "a808445e-bb38-4751-85c2-1b109ccc1059", + "subscriptionId": "dd91de05-d791-4ceb-b6dc-988682dc7d72" + }, + "responses": { + "200": { + "body": { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/smartGroups", + "id": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/a808445e-bb38-4751-85c2-1b109ccc1059", + "properties": { + "alertSeverities": [ + { + "name": "Sev3", + "count": 1942 + } + ], + "alertStates": [ + { + "name": "New", + "count": 1941 + }, + { + "name": "Acknowledged", + "count": 1 + } + ], + "alertsCount": 1942, + "lastModifiedDateTime": "2018-06-13T06:30:09Z", + "lastModifiedUserName": "System", + "monitorConditions": [ + { + "name": "Fired", + "count": 1942 + } + ], + "monitorServices": [ + { + "name": "Application Insights", + "count": 1942 + } + ], + "resourceGroups": [ + { + "name": "alertscorrelationrg", + "count": 1942 + } + ], + "resourceTypes": [ + { + "name": "components", + "count": 1942 + } + ], + "resources": [ + { + "name": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/alertscorrelationrg/providers/microsoft.insights/components/alertscorrelationworkerrole_int", + "count": 1942 + } + ], + "severity": "Sev3", + "smartGroupState": "Acknowledged", + "startDateTime": "2018-06-06T12:35:09Z" + } + } + } + }, + "operationId": "SmartGroups_ChangeState", + "title": "changestate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetAll.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetAll.json new file mode 100644 index 0000000000..1197536107 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetAll.json @@ -0,0 +1,147 @@ +{ + "parameters": { + "api-version": "2019-05-05-preview", + "subscriptionId": "dd91de05-d791-4ceb-b6dc-988682dc7d72" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/smartGroups", + "id": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/a808445e-bb38-4751-85c2-1b109ccc1059", + "properties": { + "alertSeverities": [ + { + "name": "Sev3", + "count": 1942 + } + ], + "alertStates": [ + { + "name": "New", + "count": 1941 + }, + { + "name": "Acknowledged", + "count": 1 + } + ], + "alertsCount": 1942, + "lastModifiedDateTime": "2018-06-13T06:30:09Z", + "lastModifiedUserName": "System", + "monitorConditions": [ + { + "name": "Fired", + "count": 1942 + } + ], + "monitorServices": [ + { + "name": "Application Insights", + "count": 1942 + } + ], + "resourceGroups": [ + { + "name": "alertscorrelationrg", + "count": 1942 + } + ], + "resourceTypes": [ + { + "name": "components", + "count": 1942 + } + ], + "resources": [ + { + "name": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/alertscorrelationrg/providers/microsoft.insights/components/alertscorrelationworkerrole_int", + "count": 1942 + } + ], + "severity": "Sev3", + "smartGroupState": "New", + "startDateTime": "2018-06-06T12:35:09Z" + } + }, + { + "name": "CPU Alert", + "type": "Microsoft.AlertsManagement/smartGroups", + "id": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/01114c7c-769f-4fd4-b6fa-ab77693b83cd", + "properties": { + "alertSeverities": [ + { + "name": "Sev0", + "count": 6984 + }, + { + "name": "Sev1", + "count": 6927 + } + ], + "alertStates": [ + { + "name": "New", + "count": 15358 + }, + { + "name": "Acknowledged", + "count": 12 + }, + { + "name": "Closed", + "count": 4 + } + ], + "alertsCount": 15374, + "lastModifiedDateTime": "2018-06-13T06:29:01Z", + "lastModifiedUserName": "System", + "monitorConditions": [ + { + "name": "Fired", + "count": 15374 + } + ], + "monitorServices": [ + { + "name": "Log Analytics", + "count": 13911 + } + ], + "resourceGroups": [ + { + "name": "mms-eus", + "count": 15374 + } + ], + "resourceTypes": [ + { + "name": "microsoft.operationalinsights/workspaces", + "count": 6912 + }, + { + "name": "workspaces", + "count": 8462 + } + ], + "resources": [ + { + "name": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/alertsint", + "count": 15374 + } + ], + "severity": "Sev0", + "smartGroupState": "Acknowledged", + "startDateTime": "2018-05-17T10:18:44.2020997Z" + } + } + ] + } + } + }, + "operationId": "SmartGroups_GetAll", + "title": "List" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetById.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetById.json new file mode 100644 index 0000000000..b66d6510c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetById.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2019-05-05-preview", + "smartGroupId": "603675da-9851-4b26-854a-49fc53d32715", + "subscriptionId": "9e261de7-c804-4b9d-9ebf-6f50fe350a9a" + }, + "responses": { + "200": { + "body": { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/smartGroups", + "id": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/a808445e-bb38-4751-85c2-1b109ccc1059", + "properties": { + "alertSeverities": [ + { + "name": "Sev3", + "count": 1942 + } + ], + "alertStates": [ + { + "name": "New", + "count": 1941 + }, + { + "name": "Acknowledged", + "count": 1 + } + ], + "alertsCount": 1942, + "lastModifiedDateTime": "2018-06-13T06:30:09Z", + "lastModifiedUserName": "System", + "monitorConditions": [ + { + "name": "Fired", + "count": 1942 + } + ], + "monitorServices": [ + { + "name": "Application Insights", + "count": 1942 + } + ], + "resourceGroups": [ + { + "name": "alertscorrelationrg", + "count": 1942 + } + ], + "resourceTypes": [ + { + "name": "components", + "count": 1942 + } + ], + "resources": [ + { + "name": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/alertscorrelationrg/providers/microsoft.insights/components/alertscorrelationworkerrole_int", + "count": 1942 + } + ], + "severity": "Sev3", + "smartGroupState": "New", + "startDateTime": "2018-06-06T12:35:09Z" + } + } + } + }, + "operationId": "SmartGroups_GetById", + "title": "Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetHistory.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetHistory.json new file mode 100644 index 0000000000..982fb1c81f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetHistory.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2019-05-05-preview", + "smartGroupId": "a808445e-bb38-4751-85c2-1b109ccc1059", + "subscriptionId": "9e261de7-c804-4b9d-9ebf-6f50fe350a9a" + }, + "responses": { + "200": { + "body": { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/alerts", + "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/smartGroups/a808445e-bb38-4751-85c2-1b109ccc1059/history/default", + "properties": { + "modifications": [ + { + "description": "New Smart Group is created", + "comments": "", + "modificationEvent": "SmartGroupCreated", + "modifiedAt": "2018-06-06T12:35:09Z", + "modifiedBy": "System", + "newValue": "", + "oldValue": "" + } + ], + "smartGroupId": "a808445e-bb38-4751-85c2-1b109ccc1059" + } + } + } + }, + "operationId": "SmartGroups_GetHistory", + "title": "Resolve" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/main.tsp new file mode 100644 index 0000000000..5f922357ab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/main.tsp @@ -0,0 +1,37 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./AlertProcessingRule.tsp"; +import "./Alert.tsp"; +import "./SmartGroup.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "AlertsManagementClient", +}) +@versioned(Versions) +// FIXME: Common type version v2 is not supported for now. +// @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v2) +@doc("AlertsManagement Client") +namespace Azure.ResourceManager.AlertsManagement; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2021-08-08 API version.") + v2021_08_08: "2021-08-08", + + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2019-05-05-preview API version.") + v2019_05_05_preview: "2019-05-05-preview", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp new file mode 100644 index 0000000000..5db9e03843 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp @@ -0,0 +1,708 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; + +namespace Azure.ResourceManager.AlertsManagement; + +interface Operations extends Azure.ResourceManager.Operations {} + +@doc("Field for a given condition.") +enum Field { + Severity, + MonitorService, + MonitorCondition, + SignalType, + TargetResourceType, + TargetResource, + TargetResourceGroup, + AlertRuleId, + AlertRuleName, + Description, + AlertContext, +} + +@doc("Operator for a given condition.") +enum Operator { + Equals, + NotEquals, + Contains, + DoesNotContain, +} + +@doc("Specifies when the recurrence should be applied.") +enum RecurrenceType { + Daily, + Weekly, + Monthly, +} + +@doc("Action that should be applied.") +enum ActionType { + AddActionGroups, + RemoveAllActionGroups, +} + +@doc("The type of identity that created the resource.") +enum CreatedByType { + User, + Application, + ManagedIdentity, + Key, +} + +enum Identifier { + MonitorServiceList, +} + +@doc("Identification of the information to be retrieved by API call") +enum MetadataIdentifier { + MonitorServiceList, +} + +enum MonitorService { + `Application Insights`, + `ActivityLog Administrative`, + `ActivityLog Security`, + `ActivityLog Recommendation`, + `ActivityLog Policy`, + `ActivityLog Autoscale`, + `Log Analytics`, + Nagios, + Platform, + SCOM, + ServiceHealth, + SmartDetector, + `VM Insights`, + Zabbix, +} + +enum MonitorCondition { + Fired, + Resolved, +} + +enum Severity { + Sev0, + Sev1, + Sev2, + Sev3, + Sev4, +} + +enum AlertState { + New, + Acknowledged, + Closed, +} + +enum AlertsSortByFields { + name, + severity, + alertState, + monitorCondition, + targetResource, + targetResourceName, + targetResourceGroup, + targetResourceType, + startDateTime, + lastModifiedDateTime, +} + +enum SortOrder { + asc, + desc, +} + +enum TimeRange { + `1h`, + `1d`, + `7d`, + `30d`, +} + +@doc("The type of signal the alert is based on, which could be metrics, logs or activity logs.") +enum SignalType { + Metric, + Log, + Unknown, +} + +enum AlertsSummaryGroupByFields { + severity, + alertState, + monitorCondition, + monitorService, + signalType, + alertRule, +} + +enum SmartGroupsSortByFields { + alertsCount, + state, + severity, + startDateTime, + lastModifiedDateTime, +} + +@doc("Smart group state") +enum SmartGroupState { + New, + Acknowledged, + Closed, +} + +@doc("Days of week.") +enum DaysOfWeek { + Sunday, + Monday, + Tuesday, + Wednesday, + Thursday, + Friday, + Saturday, +} + +@doc("Reason for the modification") +@fixed +enum AlertModificationEvent { + AlertCreated, + StateChange, + MonitorConditionChange, + SeverityChange, + ActionRuleTriggered, + ActionRuleSuppressed, + ActionsTriggered, + ActionsSuppressed, + ActionsFailed, +} + +@doc("Reason for the modification") +@fixed +enum SmartGroupModificationEvent { + SmartGroupCreated, + StateChange, + AlertAdded, + AlertRemoved, +} + +@doc("Alert processing rule properties defining scopes, conditions and scheduling logic for alert processing rule.") +model AlertProcessingRuleProperties { + @doc("Scopes on which alert processing rule will apply.") + scopes: string[]; + + @doc("Conditions on which alerts will be filtered.") + conditions?: Condition[]; + + @doc("Scheduling for alert processing rule.") + schedule?: Schedule; + + @doc("Actions to be applied.") + actions: Action[]; + + @doc("Description of alert processing rule.") + description?: string; + + @doc("Indicates if the given alert processing rule is enabled or disabled.") + enabled?: boolean; +} + +@doc("Condition to trigger an alert processing rule.") +model Condition { + @doc("Field for a given condition.") + field?: Field; + + @doc("Operator for a given condition.") + operator?: Operator; + + @doc("List of values to match for a given condition.") + values?: string[]; +} + +@doc("Scheduling configuration for a given alert processing rule.") +model Schedule { + @doc("Scheduling effective from time. Date-Time in ISO-8601 format without timezone suffix.") + @pattern("^(?:(\\d{4}-\\d{2}-\\d{2})T(\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?))$") + effectiveFrom?: string; + + @doc("Scheduling effective until time. Date-Time in ISO-8601 format without timezone suffix.") + @pattern("^(?:(\\d{4}-\\d{2}-\\d{2})T(\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?))$") + effectiveUntil?: string; + + @doc("Scheduling time zone.") + timeZone?: string; + + @doc("List of recurrences.") + recurrences?: Recurrence[]; +} + +@doc("Recurrence object.") +@discriminator("recurrenceType") +model Recurrence { + @doc("Start time for recurrence.") + startTime?: plainTime; + + @doc("End time for recurrence.") + endTime?: plainTime; +} + +@doc("Action to be applied.") +@discriminator("actionType") +model Action {} + +@doc("An azure managed resource object.") +model ManagedResource extends Resource { + @doc("Resource location") + @visibility("read", "create") + // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one + @key + location: string; + + @doc("Resource tags") + tags?: Record; +} + +@doc("An azure resource object") +model Resource { + @doc("Azure resource Id") + @visibility("read") + id?: string; + + @doc("Azure resource type") + @visibility("read") + type?: string; + + @doc("Azure resource name") + @visibility("read") + name?: string; +} + +@doc("An error response from the service.") +@error +model AlertProcessingRuleErrorResponse { + @doc("Details of error response.") + error?: AlertProcessingRuleErrorResponseBody; +} + +@doc("Details of error response.") +model AlertProcessingRuleErrorResponseBody { + @doc("Error code, intended to be consumed programmatically.") + code?: string; + + @doc("Description of the error, intended for display in user interface.") + message?: string; + + @doc("Target of the particular error, for example name of the property.") + target?: string; + + @doc("A list of additional details about the error.") + details?: AlertProcessingRuleErrorResponseBody[]; +} + +@doc("Data contract for patch.") +model PatchObject { + @doc("Properties supported by patch operation.") + properties?: PatchProperties; + + @doc("Tags to be updated.") + tags?: Record; +} + +@doc("Alert processing rule properties supported by patch.") +model PatchProperties { + @doc("Indicates if the given alert processing rule is enabled or disabled.") + enabled?: boolean; +} + +@doc("An error response from the service.") +@error +model AlertsManagementErrorResponse { + @doc("Details of error response.") + error?: AlertsManagementErrorResponseBody; +} + +@doc("Details of error response.") +model AlertsManagementErrorResponseBody { + @doc("Error code, intended to be consumed programmatically.") + code?: string; + + @doc("Description of the error, intended for display in user interface.") + message?: string; + + @doc("Target of the particular error, for example name of the property.") + target?: string; + + @doc("A list of additional details about the error.") + details?: AlertsManagementErrorResponseBody[]; +} + +@doc("alert meta data information.") +model AlertsMetaData { + @doc("alert meta data property bag") + properties?: AlertsMetaDataProperties; +} + +@doc("alert meta data property bag") +@discriminator("metadataIdentifier") +model AlertsMetaDataProperties {} + +@doc("Alert property bag") +model AlertProperties { + @doc("This object contains consistent fields across different monitor services.") + essentials?: Essentials; + + @doc("Information specific to the monitor service that gives more contextual details about the alert.") + @visibility("read") + context?: Record; + + @doc("Config which would be used for displaying the data in portal.") + @visibility("read") + egressConfig?: Record; +} + +@doc("This object contains consistent fields across different monitor services.") +model Essentials { + @doc("Severity of alert Sev0 being highest and Sev4 being lowest.") + @visibility("read") + severity?: Severity; + + @doc("The type of signal the alert is based on, which could be metrics, logs or activity logs.") + @visibility("read") + signalType?: SignalType; + + @doc("Alert object state, which can be modified by the user.") + @visibility("read") + alertState?: AlertState; + + @doc("Condition of the rule at the monitor service. It represents whether the underlying conditions have crossed the defined alert rule thresholds.") + @visibility("read") + monitorCondition?: MonitorCondition; + + @doc("Target ARM resource, on which alert got created.") + targetResource?: string; + + @doc("Name of the target ARM resource name, on which alert got created.") + targetResourceName?: string; + + @doc("Resource group of target ARM resource, on which alert got created.") + targetResourceGroup?: string; + + @doc("Resource type of target ARM resource, on which alert got created.") + targetResourceType?: string; + + @doc("Monitor service on which the rule(monitor) is set.") + @visibility("read") + monitorService?: MonitorService; + + @doc("Rule(monitor) which fired alert instance. Depending on the monitor service, this would be ARM id or name of the rule.") + @visibility("read") + alertRule?: string; + + @doc("Unique Id created by monitor service for each alert instance. This could be used to track the issue at the monitor service, in case of Nagios, Zabbix, SCOM etc.") + @visibility("read") + sourceCreatedId?: string; + + @doc("Unique Id of the smart group") + @visibility("read") + smartGroupId?: string; + + @doc("Verbose reason describing the reason why this alert instance is added to a smart group") + @visibility("read") + smartGroupingReason?: string; + + @doc("Creation time(ISO-8601 format) of alert instance.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("Last modification time(ISO-8601 format) of alert instance.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedDateTime?: utcDateTime; + + @doc("Resolved time(ISO-8601 format) of alert instance. This will be updated when monitor service resolves the alert instance because the rule condition is no longer met.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + monitorConditionResolvedDateTime?: utcDateTime; + + @doc("User who last modified the alert, in case of monitor service updates user would be 'system', otherwise name of the user.") + @visibility("read") + lastModifiedUserName?: string; + + @doc("Action status") + actionStatus?: ActionStatus; + + @doc("Alert description.") + description?: string; +} + +@doc("Action status") +model ActionStatus { + @doc("Value indicating whether alert is suppressed.") + isSuppressed?: boolean; +} + +@doc("Alert Modification details") +model AlertModification extends Resource { + @doc("Properties of the alert modification item.") + properties?: AlertModificationProperties; +} + +@doc("Properties of the alert modification item.") +model AlertModificationProperties { + @doc("Unique Id of the alert for which the history is being retrieved") + @visibility("read") + alertId?: string; + + @doc("Modification details") + modifications?: AlertModificationItem[]; +} + +@doc("Alert modification item.") +model AlertModificationItem { + @doc("Reason for the modification") + modificationEvent?: AlertModificationEvent; + + @doc("Old value") + oldValue?: string; + + @doc("New value") + newValue?: string; + + @doc("Modified date and time") + modifiedAt?: string; + + @doc("Modified user details (Principal client name)") + modifiedBy?: string; + + @doc("Modification comments") + comments?: string; + + @doc("Description of the modification") + description?: string; +} + +@doc("Summary of alerts based on the input filters and 'groupby' parameters.") +model AlertsSummary extends Resource { + @doc("Group the result set.") + properties?: AlertsSummaryGroup; +} + +@doc("Group the result set.") +model AlertsSummaryGroup { + @doc("Total count of the result set.") + total?: int32; + + @doc("Total count of the smart groups.") + smartGroupsCount?: int32; + + @doc("Name of the field aggregated") + groupedby?: string; + + @doc("List of the items") + values?: AlertsSummaryGroupItem[]; +} + +@doc("Alerts summary group item") +model AlertsSummaryGroupItem { + @doc("Value of the aggregated field") + name?: string; + + @doc("Count of the aggregated field") + count?: int32; + + @doc("Name of the field aggregated") + groupedby?: string; + + @doc("List of the items") + values?: AlertsSummaryGroupItem[]; +} + +@doc("Properties of smart group.") +model SmartGroupProperties { + @doc("Total number of alerts in smart group") + alertsCount?: int32; + + @doc("Smart group state") + @visibility("read") + smartGroupState?: SmartGroupState; + + @doc("Severity of smart group is the highest(Sev0 >... > Sev4) severity of all the alerts in the group.") + @visibility("read") + severity?: Severity; + + @doc("Creation time of smart group. Date-Time in ISO-8601 format.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("Last updated time of smart group. Date-Time in ISO-8601 format.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedDateTime?: utcDateTime; + + @doc("Last modified by user name.") + @visibility("read") + lastModifiedUserName?: string; + + @doc("Summary of target resources in the smart group") + resources?: SmartGroupAggregatedProperty[]; + + @doc("Summary of target resource types in the smart group") + resourceTypes?: SmartGroupAggregatedProperty[]; + + @doc("Summary of target resource groups in the smart group") + resourceGroups?: SmartGroupAggregatedProperty[]; + + @doc("Summary of monitorServices in the smart group") + monitorServices?: SmartGroupAggregatedProperty[]; + + @doc("Summary of monitorConditions in the smart group") + monitorConditions?: SmartGroupAggregatedProperty[]; + + @doc("Summary of alertStates in the smart group") + alertStates?: SmartGroupAggregatedProperty[]; + + @doc("Summary of alertSeverities in the smart group") + alertSeverities?: SmartGroupAggregatedProperty[]; + + @doc("The URI to fetch the next page of alerts. Call ListNext() with this URI to fetch the next page alerts.") + nextLink?: string; +} + +@doc("Aggregated property of each type") +model SmartGroupAggregatedProperty { + @doc("Name of the type.") + name?: string; + + @doc("Total number of items of type.") + count?: int32; +} + +@doc("An error response from the service.") +@error +model SmartGroupErrorResponse { + @doc("Details of error response.") + error?: SmartGroupErrorResponseBody; +} + +@doc("Details of error response.") +model SmartGroupErrorResponseBody { + @doc("Error code, intended to be consumed programmatically.") + code?: string; + + @doc("Description of the error, intended for display in user interface.") + message?: string; + + @doc("Target of the particular error, for example name of the property.") + target?: string; + + @doc("A list of additional details about the error.") + details?: SmartGroupErrorResponseBody[]; +} + +@doc("Alert Modification details") +model SmartGroupModification extends Resource { + @doc("Properties of the smartGroup modification item.") + properties?: SmartGroupModificationProperties; +} + +@doc("Properties of the smartGroup modification item.") +model SmartGroupModificationProperties { + @doc("Unique Id of the smartGroup for which the history is being retrieved") + @visibility("read") + smartGroupId?: string; + + @doc("Modification details") + modifications?: SmartGroupModificationItem[]; + + @doc("URL to fetch the next set of results.") + nextLink?: string; +} + +@doc("smartGroup modification item.") +model SmartGroupModificationItem { + @doc("Reason for the modification") + modificationEvent?: SmartGroupModificationEvent; + + @doc("Old value") + oldValue?: string; + + @doc("New value") + newValue?: string; + + @doc("Modified date and time") + modifiedAt?: string; + + @doc("Modified user details (Principal client name)") + modifiedBy?: string; + + @doc("Modification comments") + comments?: string; + + @doc("Description of the modification") + description?: string; +} + +@doc("Daily recurrence object.") +model DailyRecurrence extends Recurrence { + @doc("Specifies when the recurrence should be applied.") + recurrenceType: "Daily"; +} + +@doc("Weekly recurrence object.") +model WeeklyRecurrence extends Recurrence { + @doc("Specifies the values for weekly recurrence pattern.") + daysOfWeek: DaysOfWeek[]; + + @doc("Specifies when the recurrence should be applied.") + recurrenceType: "Weekly"; +} + +@doc("Monthly recurrence object.") +model MonthlyRecurrence extends Recurrence { + @doc("Specifies the values for monthly recurrence pattern.") + daysOfMonth: int32[]; + + @doc("Specifies when the recurrence should be applied.") + recurrenceType: "Monthly"; +} + +@doc("Add action groups to alert processing rule.") +model AddActionGroups extends Action { + @doc("List of action group Ids to add to alert processing rule.") + actionGroupIds: string[]; + + @doc("Action that should be applied.") + actionType: "AddActionGroups"; +} + +@doc("Indicates if all action groups should be removed.") +model RemoveAllActionGroups extends Action { + @doc("Action that should be applied.") + actionType: "RemoveAllActionGroups"; +} + +@doc("Monitor service details") +model MonitorServiceList extends AlertsMetaDataProperties { + @doc("Array of operations") + data: MonitorServiceDetails[]; + + @doc("Identification of the information to be retrieved by API call") + metadataIdentifier: "MonitorServiceList"; +} + +@doc("Details of a monitor service") +model MonitorServiceDetails { + @doc("Monitor service name") + name?: string; + + @doc("Monitor service display name") + displayName?: string; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..691f3c1b0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/analysisservices.md b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/analysisservices.md new file mode 100644 index 0000000000..ef50c07cd0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/analysisservices.md @@ -0,0 +1,100 @@ +```yaml +library-name: Analysiservices +namespace: Azure.ResourceManager.Analysis +isAzureSpec: true +isArm: true +require: https://github.com/Azure/azure-rest-api-specs/blob/c2d2b523575031790b8672640ea762bdf9ad4964/specification/analysisservices/resource-manager/readme.md +tag: package-2017-08 +skip-csproj: true +modelerfour: + flatten-payloads: false + +rename-mapping: + State: AnalysisState + Status: AnalysisStatus + OperationStatus: AnalysisOperationStatus + AnalysisServicesServers.value: AnalysisResources + # SkuEnumerationForNewResourceResult.value: SKUs + Resource.sku: AnalysisSku + AnalysisServicesServer.properties.sku: AnalysisServerSku + ServerAdministrators.members: AsAdministratorIdentities + CheckServerNameAvailabilityResult.nameAvailable: IsNameAvailable + IPv4FirewallSettings.enablePowerBIService: IsPowerBIServiceEnabled + SkuDetailsForExistingResource: AnalysisExistingSku + SkuEnumerationForExistingResourceResult: ExistingResourceResultSkuEnumeration + SkuEnumerationForNewResourceResult: NewResourceResultSkuEnumeration + CheckServerNameAvailabilityContent: AnalysisServicesServerNameAvailabilityContent + # SkuEnumerationForExistingResourceResult.value: ExistingResources + AnalysisServicesServer.properties.ipV4FirewallSettings: IPv4FirewallSettings + AnalysisServicesServer.properties.querypoolConnectionMode: QueryPoolConnectionMode + CheckServerNameAvailabilityParameters: AnalysisServerNameAvailabilityContent + CheckServerNameAvailabilityResult: AnalysisServerNameAvailabilityResult + ConnectionMode: AnalysisConnectionMode + GatewayDetails: AnalysisGatewayDetails + IPv4FirewallRule: AnalysisIPv4FirewallRule + IPv4FirewallSettings: AnalysisIPv4FirewallSettings + ManagedMode: AnalysisManagedMode + ProvisioningState: AnalysisProvisioningState + ResourceSku: AnalysisResourceSku + AnalysisServicesServerUpdateParameters: AnalysisServerPatch + AnalysisServicesServers: AnalysisServers + AnalysisServicesServer: AnalysisServer + AnalysisServicesServerData: AnalysisServerData + AnalysisServicesServerResource: AnalysisServerResource + AnalysisServicesServerCollection: AnalysisServerCollection + GatewayListStatusLive: AnalysisGatewayStatus + Status.0: Zero + +format-by-name-rules: + "tenantId": "uuid" + "ETag": "etag" + "location": "azure-location" + "*Uri": "Uri" + "*Uris": "Uri" + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + Vmos: VmOS + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag + +override-operation-name: + Servers_ListSkusForExisting: GetExistingSkus + Servers_CheckNameAvailability: CheckAnalysisServerNameAvailability + Servers_ListSkusForNew: GetEligibleSkus + +directive: + - remove-operation: Servers_ListOperationResults + - remove-operation: Servers_ListOperationStatuses + - from: analysisservices.json + where: $.definitions + transform: > + $.AnalysisServicesServerMutableProperties.properties.managedMode['x-ms-enum'] = { + "name": "ManagedMode", + "modelAsString": true + } + $.AnalysisServicesServerMutableProperties.properties.serverMonitorMode['x-ms-enum'] = { + "name": "ServerMonitorMode", + "modelAsString": true + } + - from: analysisservices.json + where: $.definitions.SkuDetailsForExistingResource.properties.resourceType + transform: $["x-ms-format"] = "resource-type" +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/resources.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/resources.json new file mode 100644 index 0000000000..d9121ad0bd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/resources.json @@ -0,0 +1,172 @@ +{ + "Resources": { + "AnalysisServer": { + "Name": "AnalysisServer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}", + "Method": "GET", + "OperationID": "Servers_GetDetails", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets details about the specified Analysis Services server." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}", + "Method": "PUT", + "OperationID": "Servers_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Provisions the specified Analysis Services server based on the configuration specified in the request." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}", + "Method": "PATCH", + "OperationID": "Servers_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates the current state of the specified Analysis Services server." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}", + "Method": "DELETE", + "OperationID": "Servers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified Analysis Services server." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers", + "Method": "GET", + "OperationID": "Servers_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Gets all the Analysis Services servers for the given resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetAnalysisServers", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/servers", + "Method": "GET", + "OperationID": "Servers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Lists all the Analysis Services servers for the given subscription." + }, + { + "Name": "GetEligibleSkus", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/skus", + "Method": "GET", + "OperationID": "Servers_ListSkusForNew", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListSkusForNew", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Lists eligible SKUs for Analysis Services resource provider." + }, + { + "Name": "CheckAnalysisServerNameAvailability", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/locations/{location}/checkNameAvailability", + "Method": "POST", + "OperationID": "Servers_CheckNameAvailability", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Check the name availability in the target location." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Suspend", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/suspend", + "Method": "POST", + "OperationID": "Servers_Suspend", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Suspends operation of the specified Analysis Services server instance." + }, + { + "Name": "Resume", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/resume", + "Method": "POST", + "OperationID": "Servers_Resume", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Resumes operation of the specified Analysis Services server instance." + }, + { + "Name": "GetExistingSkus", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/skus", + "Method": "GET", + "OperationID": "Servers_ListSkusForExisting", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListSkusForExisting", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Lists eligible SKUs for an Analysis Services resource." + }, + { + "Name": "GetGatewayStatus", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/listGatewayStatus", + "Method": "POST", + "OperationID": "Servers_ListGatewayStatus", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Return the gateway status of the specified Analysis Services server instance." + }, + { + "Name": "DissociateGateway", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/dissociateGateway", + "Method": "POST", + "OperationID": "Servers_DissociateGateway", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Dissociates a Unified Gateway associated with the server." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "AnalysisServicesServer", + "ResourceType": "Microsoft.AnalysisServices/servers", + "ResourceKey": "serverName", + "ResourceKeySegment": "servers", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp new file mode 100644 index 0000000000..884cc56e0e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp @@ -0,0 +1,128 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Analysis; +@doc("Represents an instance of an Analysis Services resource.") +model AnalysisServicesServer + is TrackedResource { + @doc("The name of the Analysis Services server. It must be a minimum of 3 characters, and a maximum of 63.") + @maxLength(63) + @minLength(3) + @pattern("^[a-z][a-z0-9]*$") + @path + @key("serverName") + @segment("servers") + name: string; +} + +@armResourceOperations +interface AnalysisServicesServers { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets details about the specified Analysis Services server.") + @operationId("Servers_GetDetails") + getDetails is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Provisions the specified Analysis Services server based on the configuration specified in the request.") + @operationId("Servers_Create") + create is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Updates the current state of the specified Analysis Services server.") + @operationId("Servers_Update") + update is ArmCustomPatchAsync< + AnalysisServicesServer, + AnalysisServicesServerUpdateParameters + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Deletes the specified Analysis Services server.") + @operationId("Servers_Delete") + delete is ArmResourceDeleteAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets all the Analysis Services servers for the given resource group.") + @operationId("Servers_ListByResourceGroup") + listByResourceGroup is ArmResourceListByParent; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists all the Analysis Services servers for the given subscription.") + @operationId("Servers_List") + list is ArmListBySubscription; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists eligible SKUs for Analysis Services resource provider.") + @operationId("Servers_ListSkusForNew") + listSkusForNew is ArmListBySubscription; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Suspends operation of the specified Analysis Services server instance.") + @operationId("Servers_Suspend") + suspend is ArmResourceActionAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Resumes operation of the specified Analysis Services server instance.") + @operationId("Servers_Resume") + resume is ArmResourceActionAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Return the gateway status of the specified Analysis Services server instance.") + @operationId("Servers_ListGatewayStatus") + listGatewayStatus is ArmResourceActionSync< + AnalysisServicesServer, + void, + GatewayListStatusLive + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Dissociates a Unified Gateway associated with the server.") + @operationId("Servers_DissociateGateway") + dissociateGateway is ArmResourceActionSync< + AnalysisServicesServer, + void, + void + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Check the name availability in the target location.") + @operationId("Servers_CheckNameAvailability") + checkNameAvailability is checkGlobalNameAvailability; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Servers_ListSkusForExisting") + @doc("Lists eligible SKUs for an Analysis Services resource.") + // FIXME: Servers_ListSkusForExisting could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/skus") + @get + ListSkusForExisting is Azure.Core.Foundations.Operation< + { + @doc("The name of the Azure Resource group of which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90.") + @maxLength(90) + @minLength(1) + @pattern("^[-\\w\\._\\(\\)]+$") + @path + resourceGroupName: string; + + @doc("The name of the Analysis Services server. It must be at least 3 characters in length, and no more than 63.") + @maxLength(63) + @minLength(3) + @pattern("^[a-z][a-z0-9]*$") + @path + serverName: string; + + @doc("A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + SkuEnumerationForExistingResourceResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_CheckNameAvailability.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_CheckNameAvailability.json new file mode 100644 index 0000000000..2200bb3519 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_CheckNameAvailability.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "location": "West US", + "serverParameters": { + "name": "azsdktest", + "type": "Microsoft.AnalysisServices/servers" + }, + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "nameAvailable": true + }, + "headers": {} + } + }, + "operationId": "Servers_CheckNameAvailability", + "title": "Get details of a server" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Create.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Create.json new file mode 100644 index 0000000000..2e420642a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Create.json @@ -0,0 +1,112 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "serverParameters": { + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com", + "azsdktest2@microsoft.com" + ] + } + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com", + "azsdktest2@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com", + "azsdktest2@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "headers": {} + }, + "202": { + "body": { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com", + "azsdktest2@microsoft.com" + ] + }, + "provisioningState": "Preparing", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Preparing" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "headers": {} + } + }, + "operationId": "Servers_Create", + "title": "Create a server." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Delete.json new file mode 100644 index 0000000000..cd433c7b69 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Delete.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "description": "OK.", + "headers": {} + }, + "202": { + "description": "Accepted.", + "headers": {} + }, + "204": { + "headers": {} + } + }, + "operationId": "Servers_Delete", + "title": "Delete a server." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_DissociateGateway.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_DissociateGateway.json new file mode 100644 index 0000000000..aadd5492c4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_DissociateGateway.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "headers": {} + } + }, + "operationId": "Servers_DissociateGateway", + "title": "Get details of a server" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_GetDetails.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_GetDetails.json new file mode 100644 index 0000000000..15f0938232 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_GetDetails.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "headers": {} + } + }, + "operationId": "Servers_GetDetails", + "title": "Get details of a server" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_List.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_List.json new file mode 100644 index 0000000000..710a9ecd16 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_List.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + { + "name": "azsdktest2", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG2/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S0", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Servers_List", + "title": "List existing servers under the subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListByResourceGroup.json new file mode 100644 index 0000000000..cbec3a228e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListByResourceGroup.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + { + "name": "azsdktest2", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S0", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Servers_ListByResourceGroup", + "title": "List existing servers in the resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListGatewayStatus.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListGatewayStatus.json new file mode 100644 index 0000000000..30ab89dff5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListGatewayStatus.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "status": 0 + }, + "headers": {} + } + }, + "operationId": "Servers_ListGatewayStatus", + "title": "Get details of a server" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForExisting.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForExisting.json new file mode 100644 index 0000000000..0b19718b94 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForExisting.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "B1", + "tier": "Basic" + } + }, + { + "sku": { + "name": "B2", + "tier": "Basic" + } + }, + { + "sku": { + "name": "S0", + "tier": "Standard" + } + }, + { + "sku": { + "name": "S1", + "tier": "Standard" + } + }, + { + "sku": { + "name": "S2", + "tier": "Standard" + } + }, + { + "sku": { + "name": "S3", + "tier": "Standard" + } + }, + { + "sku": { + "name": "S4", + "tier": "Standard" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Servers_ListSkusForExisting", + "title": "List eligible SKUs for an existing server" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForNew.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForNew.json new file mode 100644 index 0000000000..7b4c6fd08e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForNew.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "B1" + }, + { + "name": "B2" + }, + { + "name": "D1" + }, + { + "name": "S0" + }, + { + "name": "S1" + }, + { + "name": "S2" + }, + { + "name": "S3" + }, + { + "name": "S4" + } + ] + }, + "headers": {} + } + }, + "operationId": "Servers_ListSkusForNew", + "title": "List eligible SKUs for a new server" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Resume.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Resume.json new file mode 100644 index 0000000000..ebdd026877 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Resume.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "description": "OK.", + "headers": {} + }, + "202": { + "description": "Accepted.", + "headers": {} + } + }, + "operationId": "Servers_Resume", + "title": "Resume a server." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Suspend.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Suspend.json new file mode 100644 index 0000000000..caf0f5af1b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Suspend.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "description": "OK.", + "headers": {} + }, + "202": { + "description": "Accepted.", + "headers": {} + } + }, + "operationId": "Servers_Suspend", + "title": "Suspend a server." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Update.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Update.json new file mode 100644 index 0000000000..213f749619 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Update.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "serverUpdateParameters": { + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com", + "azsdktest2@microsoft.com" + ] + } + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com", + "azsdktest2@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "headers": {} + }, + "202": { + "body": { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com", + "azsdktest2@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "headers": {} + } + }, + "operationId": "Servers_Update", + "title": "Update a server." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp new file mode 100644 index 0000000000..5937a2bb30 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp @@ -0,0 +1,28 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./AnalysisServicesServer.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "AzureAnalysisServices", +}) +@versioned(Versions) +@doc("The Azure Analysis Services Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Analysis Services servers") +namespace Azure.ResourceManager.Analysis; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2017-08-01 API version.") + v2017_08_01: "2017-08-01", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp new file mode 100644 index 0000000000..d028c80841 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp @@ -0,0 +1,338 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; + +namespace Azure.ResourceManager.Analysis; + +interface Operations extends Azure.ResourceManager.Operations {} + +@doc("The current state of Analysis Services resource. The state is to indicate more states outside of resource provisioning.") +enum State { + Deleting, + Succeeded, + Failed, + Paused, + Suspended, + Provisioning, + Updating, + Suspending, + Pausing, + Resuming, + Preparing, + Scaling, +} + +@doc("The current deployment state of Analysis Services resource. The provisioningState is to indicate states for resource provisioning.") +enum ProvisioningState { + Deleting, + Succeeded, + Failed, + Paused, + Suspended, + Provisioning, + Updating, + Suspending, + Pausing, + Resuming, + Preparing, + Scaling, +} + +@doc("The name of the Azure pricing tier to which the SKU applies.") +enum SkuTier { + Development, + Basic, + Standard, +} + +@doc("The managed mode of the server (0 = not managed, 1 = managed).") +enum ManagedMode { + `0`: 0, + `1`: 1, +} + +@doc("The server monitor mode for AS server") +enum ServerMonitorMode { + `0`: 0, + `1`: 1, +} + +@doc("How the read-write server's participation in the query pool is controlled.
    It can have the following values:
    • readOnly - indicates that the read-write server is intended not to participate in query operations
    • all - indicates that the read-write server can participate in query operations
    Specifying readOnly when capacity is 1 results in error.") +@fixed +enum ConnectionMode { + All, + ReadOnly, +} + +@doc("Properties of Analysis Services resource.") +model AnalysisServicesServerProperties + extends AnalysisServicesServerMutableProperties { + @doc("The current state of Analysis Services resource. The state is to indicate more states outside of resource provisioning.") + @visibility("read") + state?: State; + + @doc("The current deployment state of Analysis Services resource. The provisioningState is to indicate states for resource provisioning.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("The full name of the Analysis Services resource.") + @visibility("read") + serverFullName?: string; + + @doc("The SKU of the Analysis Services resource.") + sku?: ResourceSku; +} + +@doc("An object that represents a set of mutable Analysis Services resource properties.") +model AnalysisServicesServerMutableProperties { + @doc("A collection of AS server administrators") + asAdministrators?: ServerAdministrators; + + @doc("The SAS container URI to the backup container.") + backupBlobContainerUri?: string; + + @doc("The gateway details configured for the AS server.") + gatewayDetails?: GatewayDetails; + + @doc("The firewall settings for the AS server.") + ipV4FirewallSettings?: IPv4FirewallSettings; + + @doc("How the read-write server's participation in the query pool is controlled.
    It can have the following values:
    • readOnly - indicates that the read-write server is intended not to participate in query operations
    • all - indicates that the read-write server can participate in query operations
    Specifying readOnly when capacity is 1 results in error.") + querypoolConnectionMode?: ConnectionMode; + + @doc("The managed mode of the server (0 = not managed, 1 = managed).") + managedMode?: ManagedMode; + + @doc("The server monitor mode for AS server") + serverMonitorMode?: ServerMonitorMode; +} + +@doc("An array of administrator user identities.") +model ServerAdministrators { + @doc("An array of administrator user identities.") + members?: string[]; +} + +@doc("The gateway details.") +model GatewayDetails { + @doc("Gateway resource to be associated with the server.") + gatewayResourceId?: string; + + @doc("Gateway object id from in the DMTS cluster for the gateway resource.") + @visibility("read") + gatewayObjectId?: string; + + @doc("Uri of the DMTS cluster.") + @visibility("read") + dmtsClusterUri?: string; +} + +@doc("An array of firewall rules.") +model IPv4FirewallSettings { + @doc("An array of firewall rules.") + firewallRules?: IPv4FirewallRule[]; + + @doc("The indicator of enabling PBI service.") + enablePowerBIService?: boolean; +} + +@doc("The detail of firewall rule.") +model IPv4FirewallRule { + @doc("The rule name.") + firewallRuleName?: string; + + @doc("The start range of IPv4.") + rangeStart?: string; + + @doc("The end range of IPv4.") + rangeEnd?: string; +} + +@doc("Represents an instance of an Analysis Services resource.") +model Resource { + @doc("An identifier that represents the Analysis Services resource.") + @visibility("read") + id?: string; + + @doc("The name of the Analysis Services resource.") + @visibility("read") + name?: string; + + @doc("The type of the Analysis Services resource.") + @visibility("read") + type?: string; + + @doc("Location of the Analysis Services resource.") + @visibility("read", "create") + // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one + @key + location: string; + + @doc("The SKU of the Analysis Services resource.") + sku: ResourceSku; + + @doc("Key-value pairs of additional resource provisioning properties.") + tags?: Record; +} + +@doc("Provision request specification") +model AnalysisServicesServerUpdateParameters { + @doc("The SKU of the Analysis Services resource.") + sku?: ResourceSku; + + @doc("Key-value pairs of additional provisioning properties.") + tags?: Record; + + @doc("Properties of the provision operation request.") + properties?: AnalysisServicesServerMutableProperties; +} + +@doc("An object that represents enumerating SKUs for existing resources.") +model SkuEnumerationForExistingResourceResult { + @doc("The collection of available SKUs for existing resources.") + value?: SkuDetailsForExistingResource[]; +} + +@doc("An object that represents SKU details for existing resources.") +model SkuDetailsForExistingResource { + @doc("The SKU in SKU details for existing resources.") + sku?: ResourceSku; + + @doc("The resource type.") + resourceType?: string; +} + +@doc("Status of gateway is live.") +model GatewayListStatusLive { + @doc("Live message of list gateway. Status: 0 - Live") + status?: 0; +} + +@doc("Status of gateway is error.") +@error +model GatewayListStatusError { + @doc("Error of the list gateway status.") + error?: ErrorDetail; +} + +@doc("Details of server name request body.") +model CheckServerNameAvailabilityParameters { + @doc("Name for checking availability.") + @maxLength(63) + @minLength(3) + @pattern("^[a-z][a-z0-9]*$") + name?: string; + + @doc("The resource type of azure analysis services.") + type?: string; +} + +@doc("The checking result of server name availability.") +model CheckServerNameAvailabilityResult { + @doc("Indicator of available of the server name.") + nameAvailable?: boolean; + + @doc("The reason of unavailability.") + reason?: string; + + @doc("The detailed message of the request unavailability.") + message?: string; +} + +@doc("Additional properties to expose performance metrics to shoebox.") +model OperationProperties { + @doc("Performance metrics to shoebox.") + serviceSpecification?: OperationPropertiesServiceSpecification; +} + +@doc("Performance metrics to shoebox.") +model OperationPropertiesServiceSpecification { + @doc("The metric specifications.") + @visibility("read") + metricSpecifications?: MetricSpecifications[]; + + @doc("The log specifications.") + @visibility("read") + logSpecifications?: LogSpecifications[]; +} + +@doc("Available operation metric specification for exposing performance metrics to shoebox.") +model MetricSpecifications { + @doc("The name of metric.") + @visibility("read") + name?: string; + + @doc("The displayed name of metric.") + @visibility("read") + displayName?: string; + + @doc("The displayed description of metric.") + @visibility("read") + displayDescription?: string; + + @doc("The unit of the metric.") + @visibility("read") + unit?: string; + + @doc("The aggregation type of metric.") + @visibility("read") + aggregationType?: string; + + @doc("The dimensions of metric.") + @visibility("read") + dimensions?: MetricDimensions[]; +} + +@doc("Metric dimension.") +model MetricDimensions { + @doc("Dimension name.") + @visibility("read") + name?: string; + + @doc("Dimension display name.") + @visibility("read") + displayName?: string; +} + +@doc("The log metric specification for exposing performance metrics to shoebox.") +model LogSpecifications { + @doc("The name of metric.") + @visibility("read") + name?: string; + + @doc("The displayed name of log.") + @visibility("read") + displayName?: string; + + @doc("The blob duration for the log.") + @visibility("read") + blobDuration?: string; +} + +@doc("The status of operation.") +model OperationStatus { + @doc("The operation Id.") + id?: string; + + @doc("The operation name.") + name?: string; + + @doc("The start time of the operation.") + startTime?: string; + + @doc("The end time of the operation.") + endTime?: string; + + @doc("The status of the operation.") + status?: string; + + @doc("The error detail of the operation if any.") + error?: ErrorDetail; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..0f785c611e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/analysisservices.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp index 3cff2c8932..3b337f1772 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Tenant Settings.") @@ -22,18 +24,26 @@ model AccessInformationContract } @armResourceOperations -interface TenantAccess { +interface AccessInformationContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get tenant access information details without secrets.") + @operationId("TenantAccess_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Tenant access metadata") @head + @operationId("TenantAccess_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< AccessInformationContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update tenant access information details.") + @operationId("TenantAccess_Create") create is ArmResourceCreateOrReplaceSync< AccessInformationContract, { @@ -44,10 +54,13 @@ interface TenantAccess { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update tenant access information details.") - update is ArmResourcePatchSync< + @operationId("TenantAccess_Update") + update is ArmCustomPatchSync< AccessInformationContract, - AccessInformationContractProperties, + AccessInformationUpdateParameters, { ...BaseParameters; @@ -56,7 +69,10 @@ interface TenantAccess { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Returns list of access infos - for Git and Management endpoints.") + @operationId("TenantAccess_ListByService") listByService is ArmResourceListByParent< AccessInformationContract, { @@ -67,32 +83,43 @@ interface TenantAccess { $filter?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Regenerate primary access key") + @operationId("TenantAccess_RegeneratePrimaryKey") regeneratePrimaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Regenerate secondary access key") + @operationId("TenantAccess_RegenerateSecondaryKey") regenerateSecondaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get tenant access information details.") + @operationId("TenantAccess_ListSecrets") listSecrets is ArmResourceActionSync< AccessInformationContract, void, AccessInformationSecretsContract >; -} -@armResourceOperations -interface TenantAccessGit { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Regenerate primary access key for GIT.") + @operationId("TenantAccessGit_RegeneratePrimaryKey") regeneratePrimaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Regenerate secondary access key for GIT.") + @operationId("TenantAccessGit_RegenerateSecondaryKey") regenerateSecondaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp index 709d91042d..bd7b10e894 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("API details.") @@ -24,15 +26,23 @@ model ApiContract is ProxyResource { } @armResourceOperations -interface Api { +interface ApiContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the API specified by its identifier.") + @operationId("Api_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the API specified by its identifier.") @head + @operationId("Api_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates new or updates existing specified API of the API Management service instance.") + @operationId("Api_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrUpdateAsync< ApiContract, { @@ -41,12 +51,16 @@ interface Api { @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") @header `If-Match`?: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the specified API of the API Management service instance.") - update is ArmResourcePatchSync< + @operationId("Api_Update") + update is ArmCustomPatchSync< ApiContract, - ApiContractProperties, + ApiUpdateContract, { ...BaseParameters; @@ -55,7 +69,10 @@ interface Api { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified API of the API Management service instance.") + @operationId("Api_Delete") delete is ArmResourceDeleteSync< ApiContract, { @@ -70,7 +87,10 @@ interface Api { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all APIs of the API Management service instance.") + @operationId("Api_ListByService") listByService is ArmResourceListByParent< ApiContract, { @@ -98,11 +118,11 @@ interface Api { expandApiVersionSet?: boolean; } >; -} -@armResourceOperations -interface ApiRevision { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiRevision_ListByService") @doc("Lists all revisions of an API.") + // FIXME: ApiRevision_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions") @get ListByService is Azure.Core.Foundations.Operation< @@ -143,11 +163,11 @@ interface ApiRevision { }, ApiRevisionListResult >; -} -@armResourceOperations -interface ApiProduct { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiProduct_ListByApis") @doc("Lists all Products, which the API is part of.") + // FIXME: ApiProduct_ListByApis could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products") @get ListByApis is Azure.Core.Foundations.Operation< @@ -186,13 +206,13 @@ interface ApiProduct { @path subscriptionId: string; }, - ProductListResult + ResourceListResult >; -} -@armResourceOperations -interface Operation { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Operation_ListByTags") @doc("Lists a collection of operations associated with tags.") + // FIXME: Operation_ListByTags could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags") @get ListByTags is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp index 3410fc5600..16c7da4b0b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("A single API Management service resource in List or Get response.") @@ -33,61 +35,96 @@ model ApiManagementServiceResource } @armResourceOperations -interface ApiManagementService { +interface ApiManagementServiceResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets an API Management service resource description.") + @operationId("ApiManagementService_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates an API Management service. This is long running operation and could take several minutes to complete.") + @operationId("ApiManagementService_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates an existing API Management service.") - update is ArmResourcePatchAsync< + @operationId("ApiManagementService_Update") + update is ArmCustomPatchAsync< ApiManagementServiceResource, - ApiManagementServiceProperties + ApiManagementServiceUpdateParameters >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes an existing API Management service.") + @operationId("ApiManagementService_Delete") delete is ArmResourceDeleteAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List all API Management services within a resource group.") + @operationId("ApiManagementService_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all API Management services within an Azure subscription.") + @operationId("ApiManagementService_List") list is ArmListBySubscription; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it.") + @operationId("PerformConnectivityCheckAsync") + performConnectivityCheckAsync is ArmResourceActionAsync< + ApiManagementServiceResource, + ConnectivityCheckRequest, + ConnectivityCheckResponse, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete.") + @operationId("ApiManagementService_Restore") restore is ArmResourceActionAsync< ApiManagementServiceResource, ApiManagementServiceBackupRestoreParameters, - ApiManagementServiceResource + ApiManagementServiceResource, + BaseParameters, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete.") + @operationId("ApiManagementService_Backup") backup is ArmResourceActionAsync< ApiManagementServiceResource, ApiManagementServiceBackupRestoreParameters, - ApiManagementServiceResource + ApiManagementServiceResource, + BaseParameters, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes.") + @operationId("ApiManagementService_GetSsoToken") getSsoToken is ArmResourceActionSync< ApiManagementServiceResource, void, ApiManagementServiceGetSsoTokenResult >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes.") + @operationId("ApiManagementService_ApplyNetworkConfigurationUpdates") applyNetworkConfigurationUpdates is ArmResourceActionAsync< ApiManagementServiceResource, ApiManagementServiceApplyNetworkConfigurationParameters, - ApiManagementServiceResource - >; -} - -@armResourceOperations -interface ApiManagementServices { - @doc("Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it.") - performConnectivityCheckAsync is ArmResourceActionAsync< ApiManagementServiceResource, - ConnectivityCheckRequest, - ConnectivityCheckResponse + BaseParameters, + ArmLroLocationHeader >; -} -@armResourceOperations -interface TenantConfiguration { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete.") + @operationId("TenantConfiguration_Deploy") deploy is ArmResourceActionAsync< ApiManagementServiceResource, DeployConfigurationParameters, @@ -98,9 +135,13 @@ interface TenantConfiguration { @doc("The identifier of the Git Configuration Operation.") @path configurationName: ConfigurationIdName; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete.") + @operationId("TenantConfiguration_Save") save is ArmResourceActionAsync< ApiManagementServiceResource, SaveConfigurationParameter, @@ -111,9 +152,13 @@ interface TenantConfiguration { @doc("The identifier of the Git Configuration Operation.") @path configurationName: ConfigurationIdName; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete.") + @operationId("TenantConfiguration_Validate") validate is ArmResourceActionAsync< ApiManagementServiceResource, DeployConfigurationParameters, @@ -121,42 +166,22 @@ interface TenantConfiguration { { ...BaseParameters; - @doc("The identifier of the Git Configuration Operation.") - @path - configurationName: ConfigurationIdName; - } - >; - @doc("Gets the status of the most recent synchronization between the configuration database and the Git repository.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState") - @get - GetSyncState is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the API Management service.") - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") - @path - subscriptionId: string; - @doc("The identifier of the Git Configuration Operation.") @path configurationName: ConfigurationIdName; }, - TenantConfigurationSyncStateContract + ArmLroLocationHeader >; -} -@armResourceOperations -interface Api { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Checks availability and correctness of a name for an API Management service.") + @operationId("ApiManagementService_CheckNameAvailability") + checkNameAvailability is checkGlobalNameAvailability; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Api_ListByTags") @doc("Lists a collection of apis associated with tags.") + // FIXME: Api_ListByTags could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags") @get ListByTags is Azure.Core.Foundations.Operation< @@ -195,11 +220,11 @@ interface Api { }, TagResourceListResult >; -} -@armResourceOperations -interface ContentType { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ContentType_ListByService") @doc("Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints.") + // FIXME: ContentType_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes") @get ListByService is Azure.Core.Foundations.Operation< @@ -222,7 +247,10 @@ interface ContentType { ContentTypeListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ContentType_Get") @doc("Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints.") + // FIXME: ContentType_Get could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}") @get Get is Azure.Core.Foundations.Operation< @@ -250,11 +278,11 @@ interface ContentType { }, ContentTypeContract >; -} -@armResourceOperations -interface ContentItem { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ContentItem_ListByService") @doc("Lists developer portal's content items specified by the provided content type.") + // FIXME: ContentItem_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems") @get ListByService is Azure.Core.Foundations.Operation< @@ -283,7 +311,10 @@ interface ContentItem { ContentItemListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ContentItem_Get") @doc("Returns the developer portal's content item specified by its identifier.") + // FIXME: ContentItem_Get could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}") @get Get is Azure.Core.Foundations.Operation< @@ -317,12 +348,12 @@ interface ContentItem { }, ContentItemContract >; -} -@armResourceOperations -interface ApiManagementServiceSkus { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiManagementServiceSkus_ListAvailableServiceSkus") @summary("Gets available SKUs for API Management service") @doc("Gets all available SKU for a given API Management service") + // FIXME: ApiManagementServiceSkus_ListAvailableServiceSkus could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus") @get ListAvailableServiceSkus is Azure.Core.Foundations.Operation< @@ -344,11 +375,11 @@ interface ApiManagementServiceSkus { }, ResourceSkuResults >; -} -@armResourceOperations -interface NetworkStatus { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NetworkStatus_ListByService") @doc("Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService.") + // FIXME: NetworkStatus_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus") @get ListByService is Azure.Core.Foundations.Operation< @@ -371,7 +402,10 @@ interface NetworkStatus { void >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NetworkStatus_ListByLocation") @doc("Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService.") + // FIXME: NetworkStatus_ListByLocation could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus") @get ListByLocation is Azure.Core.Foundations.Operation< @@ -398,11 +432,11 @@ interface NetworkStatus { }, NetworkStatusContract >; -} -@armResourceOperations -interface OutboundNetworkDependenciesEndpoints { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("OutboundNetworkDependenciesEndpoints_ListByService") @doc("Gets the network endpoints of all outbound dependencies of a ApiManagement service.") + // FIXME: OutboundNetworkDependenciesEndpoints_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints") @get ListByService is Azure.Core.Foundations.Operation< @@ -424,11 +458,11 @@ interface OutboundNetworkDependenciesEndpoints { }, OutboundEnvironmentEndpointList >; -} -@armResourceOperations -interface PolicyDescription { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PolicyDescription_ListByService") @doc("Lists all policy descriptions.") + // FIXME: PolicyDescription_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions") @get ListByService is Azure.Core.Foundations.Operation< @@ -454,11 +488,11 @@ interface PolicyDescription { }, PolicyDescriptionListResult >; -} -@armResourceOperations -interface PortalSettings { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PortalSettings_ListByService") @doc("Lists a collection of portalsettings defined within a service instance..") + // FIXME: PortalSettings_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings") @get ListByService is Azure.Core.Foundations.Operation< @@ -478,13 +512,13 @@ interface PortalSettings { @path subscriptionId: string; }, - PortalSettingsListResult + ResourceListResult >; -} -@armResourceOperations -interface Product { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Product_ListByTags") @doc("Lists a collection of products associated with tags.") + // FIXME: Product_ListByTags could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags") @get ListByTags is Azure.Core.Foundations.Operation< @@ -523,11 +557,11 @@ interface Product { }, TagResourceListResult >; -} -@armResourceOperations -interface QuotaByCounterKeys { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("QuotaByCounterKeys_ListByService") @doc("Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet.") + // FIXME: QuotaByCounterKeys_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}") @get ListByService is Azure.Core.Foundations.Operation< @@ -553,17 +587,17 @@ interface QuotaByCounterKeys { }, QuotaCounterListResult >; -} -@armResourceOperations -interface QuotaByPeriodKeys { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("QuotaByPeriodKeys_Get") @doc("Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance.") + // FIXME: QuotaByPeriodKeys_Get could not be converted to a resource operation Get is Azure.Core.ResourceRead; -} -@armResourceOperations -interface Region { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Region_ListByService") @doc("Lists all azure regions in which the service exists.") + // FIXME: Region_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions") @get ListByService is Azure.Core.Foundations.Operation< @@ -585,11 +619,11 @@ interface Region { }, RegionListResult >; -} -@armResourceOperations -interface Reports { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByApi") @doc("Lists report records by API.") + // FIXME: Reports_ListByApi could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi") @get ListByApi is Azure.Core.Foundations.Operation< @@ -629,7 +663,10 @@ interface Reports { ReportListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByUser") @doc("Lists report records by User.") + // FIXME: Reports_ListByUser could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser") @get ListByUser is Azure.Core.Foundations.Operation< @@ -669,7 +706,10 @@ interface Reports { ReportListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByOperation") @doc("Lists report records by API Operations.") + // FIXME: Reports_ListByOperation could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation") @get ListByOperation is Azure.Core.Foundations.Operation< @@ -709,7 +749,10 @@ interface Reports { ReportListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByProduct") @doc("Lists report records by Product.") + // FIXME: Reports_ListByProduct could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct") @get ListByProduct is Azure.Core.Foundations.Operation< @@ -749,7 +792,10 @@ interface Reports { ReportListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByGeo") @doc("Lists report records by geography.") + // FIXME: Reports_ListByGeo could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo") @get ListByGeo is Azure.Core.Foundations.Operation< @@ -785,7 +831,10 @@ interface Reports { ReportListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListBySubscription") @doc("Lists report records by subscription.") + // FIXME: Reports_ListBySubscription could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription") @get ListBySubscription is Azure.Core.Foundations.Operation< @@ -825,7 +874,10 @@ interface Reports { ReportListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByTime") @doc("Lists report records by Time.") + // FIXME: Reports_ListByTime could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime") @get ListByTime is Azure.Core.Foundations.Operation< @@ -869,7 +921,10 @@ interface Reports { ReportListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByRequest") @doc("Lists report records by Request.") + // FIXME: Reports_ListByRequest could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest") @get ListByRequest is Azure.Core.Foundations.Operation< @@ -904,11 +959,11 @@ interface Reports { }, RequestReportListResult >; -} -@armResourceOperations -interface TagResource { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TagResource_ListByService") @doc("Lists a collection of resources associated with tags.") + // FIXME: TagResource_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources") @get ListByService is Azure.Core.Foundations.Operation< @@ -943,4 +998,34 @@ interface TagResource { }, TagResourceListResult >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantConfiguration_GetSyncState") + @doc("Gets the status of the most recent synchronization between the configuration database and the Git repository.") + // FIXME: TenantConfiguration_GetSyncState could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState") + @get + GetSyncState is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("The identifier of the Git Configuration Operation.") + @path + configurationName: ConfigurationIdName; + }, + TenantConfigurationSyncStateContract + >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp index 308471a5a9..8c2352e091 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("ApiRelease details.") @@ -24,18 +26,26 @@ model ApiReleaseContract is ProxyResource { } @armResourceOperations -interface ApiRelease { +interface ApiReleaseContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Returns the details of an API release.") + @operationId("ApiRelease_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Returns the etag of an API release.") @head + @operationId("ApiRelease_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< ApiReleaseContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new Release for the API.") + @operationId("ApiRelease_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< ApiReleaseContract, { @@ -46,10 +56,13 @@ interface ApiRelease { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the release of the API specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("ApiRelease_Update") + update is ArmCustomPatchSync< + ApiReleaseContract, ApiReleaseContract, - ApiReleaseContractProperties, { ...BaseParameters; @@ -58,7 +71,10 @@ interface ApiRelease { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified release in the API.") + @operationId("ApiRelease_Delete") delete is ArmResourceDeleteSync< ApiReleaseContract, { @@ -69,7 +85,10 @@ interface ApiRelease { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters.") + @operationId("ApiRelease_ListByService") listByService is ArmResourceListByParent< ApiReleaseContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp index be62af42e7..653ba9f730 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("API Version Set Contract details.") @@ -24,18 +26,26 @@ model ApiVersionSetContract is ProxyResource { } @armResourceOperations -interface ApiVersionSet { +interface ApiVersionSetContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Api Version Set specified by its identifier.") + @operationId("ApiVersionSet_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the Api Version Set specified by its identifier.") @head + @operationId("ApiVersionSet_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< ApiVersionSetContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or Updates a Api Version Set.") + @operationId("ApiVersionSet_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< ApiVersionSetContract, { @@ -46,10 +56,13 @@ interface ApiVersionSet { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the Api VersionSet specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("ApiVersionSet_Update") + update is ArmCustomPatchSync< ApiVersionSetContract, - ApiVersionSetContractProperties, + ApiVersionSetUpdateParameters, { ...BaseParameters; @@ -58,7 +71,10 @@ interface ApiVersionSet { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific Api Version Set.") + @operationId("ApiVersionSet_Delete") delete is ArmResourceDeleteSync< ApiVersionSetContract, { @@ -69,7 +85,10 @@ interface ApiVersionSet { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of API Version Sets in the specified service instance.") + @operationId("ApiVersionSet_ListByService") listByService is ArmResourceListByParent< ApiVersionSetContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp index 7ff51d159d..7fd71b9dae 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("External OAuth authorization server settings.") @@ -25,18 +27,26 @@ model AuthorizationServerContract } @armResourceOperations -interface AuthorizationServer { +interface AuthorizationServerContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the authorization server specified by its identifier.") + @operationId("AuthorizationServer_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the authorizationServer specified by its identifier.") @head + @operationId("AuthorizationServer_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< AuthorizationServerContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates new authorization server or updates an existing authorization server.") + @operationId("AuthorizationServer_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< AuthorizationServerContract, { @@ -47,10 +57,13 @@ interface AuthorizationServer { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the authorization server specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("AuthorizationServer_Update") + update is ArmCustomPatchSync< AuthorizationServerContract, - AuthorizationServerContractProperties, + AuthorizationServerUpdateContract, { ...BaseParameters; @@ -59,7 +72,10 @@ interface AuthorizationServer { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific authorization server instance.") + @operationId("AuthorizationServer_Delete") delete is ArmResourceDeleteSync< AuthorizationServerContract, { @@ -70,7 +86,10 @@ interface AuthorizationServer { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of authorization servers defined within a service instance.") + @operationId("AuthorizationServer_ListByService") listByService is ArmResourceListByParent< AuthorizationServerContract, { @@ -90,7 +109,10 @@ interface AuthorizationServer { $skip?: int32; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the client secret details of the authorization server.") + @operationId("AuthorizationServer_ListSecrets") listSecrets is ArmResourceActionSync< AuthorizationServerContract, void, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp index 73937f5a10..a2688e4528 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Backend details.") @@ -23,18 +25,26 @@ model BackendContract is ProxyResource { } @armResourceOperations -interface Backend { +interface BackendContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the backend specified by its identifier.") + @operationId("Backend_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the backend specified by its identifier.") @head + @operationId("Backend_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< BackendContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or Updates a backend.") + @operationId("Backend_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< BackendContract, { @@ -45,10 +55,13 @@ interface Backend { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates an existing backend.") - update is ArmResourcePatchSync< + @operationId("Backend_Update") + update is ArmCustomPatchSync< BackendContract, - BackendContractProperties, + BackendUpdateParameters, { ...BaseParameters; @@ -57,7 +70,10 @@ interface Backend { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified backend.") + @operationId("Backend_Delete") delete is ArmResourceDeleteSync< BackendContract, { @@ -68,7 +84,10 @@ interface Backend { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of backends in the specified service instance.") + @operationId("Backend_ListByService") listByService is ArmResourceListByParent< BackendContract, { @@ -88,7 +107,10 @@ interface Backend { $skip?: int32; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used.") + @operationId("Backend_Reconnect") reconnect is ArmResourceActionNoContentSync< BackendContract, BackendReconnectContract diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp index 4bf59b5902..03c56a82c9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Cache details.") @@ -24,15 +26,23 @@ model CacheContract is ProxyResource { } @armResourceOperations -interface Cache { +interface CacheContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Cache specified by its identifier.") + @operationId("Cache_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the Cache specified by its identifier.") @head + @operationId("Cache_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates an External Cache to be used in Api Management instance.") + @operationId("Cache_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< CacheContract, { @@ -43,10 +53,13 @@ interface Cache { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the cache specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("Cache_Update") + update is ArmCustomPatchSync< CacheContract, - CacheContractProperties, + CacheUpdateParameters, { ...BaseParameters; @@ -55,7 +68,10 @@ interface Cache { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific Cache.") + @operationId("Cache_Delete") delete is ArmResourceDeleteSync< CacheContract, { @@ -66,7 +82,10 @@ interface Cache { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of all external Caches in the specified service instance.") + @operationId("Cache_ListByService") listByService is ArmResourceListByParent< CacheContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp index 2889618329..a3cdffa810 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Certificate details.") @@ -24,18 +26,26 @@ model CertificateContract is ProxyResource { } @armResourceOperations -interface Certificate { +interface CertificateContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the certificate specified by its identifier.") + @operationId("Certificate_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the certificate specified by its identifier.") @head + @operationId("Certificate_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< CertificateContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates the certificate being used for authentication with the backend.") + @operationId("Certificate_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< CertificateContract, { @@ -46,7 +56,10 @@ interface Certificate { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific certificate.") + @operationId("Certificate_Delete") delete is ArmResourceDeleteSync< CertificateContract, { @@ -57,7 +70,10 @@ interface Certificate { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of all certificates in the specified service instance.") + @operationId("Certificate_ListByService") listByService is ArmResourceListByParent< CertificateContract, { @@ -81,7 +97,10 @@ interface Certificate { isKeyVaultRefreshFailed?: boolean; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("From KeyVault, Refresh the certificate being used for authentication with the backend.") + @operationId("Certificate_RefreshSecret") refreshSecret is ArmResourceActionSync< CertificateContract, void, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp index 6a1a77d4d7..f2b6414108 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Deleted API Management Service information.") @@ -24,11 +26,23 @@ model DeletedServiceContract } @armResourceOperations -interface DeletedServices { +interface DeletedServiceContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get soft-deleted Api Management Service by name.") + @operationId("DeletedServices_GetByName") getByName is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Purges Api Management Service (deletes it with no option to undelete).") - purge is ArmResourceDeleteAsync; + @operationId("DeletedServices_Purge") + purge is ArmResourceDeleteAsync< + DeletedServiceContract, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all soft-deleted services available for undelete for the given subscription.") + @operationId("DeletedServices_ListBySubscription") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp index ac95d3d06d..b119230810 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Diagnostic details.") @@ -24,18 +26,26 @@ model DiagnosticContract is ProxyResource { } @armResourceOperations -interface ApiDiagnostic { +interface DiagnosticContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Diagnostic for an API specified by its identifier.") + @operationId("ApiDiagnostic_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier.") @head + @operationId("ApiDiagnostic_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< DiagnosticContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new Diagnostic for an API or updates an existing one.") + @operationId("ApiDiagnostic_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< DiagnosticContract, { @@ -46,10 +56,13 @@ interface ApiDiagnostic { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the Diagnostic for an API specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("ApiDiagnostic_Update") + update is ArmCustomPatchSync< + DiagnosticContract, DiagnosticContract, - DiagnosticContractProperties, { ...BaseParameters; @@ -58,7 +71,10 @@ interface ApiDiagnostic { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified Diagnostic from an API.") + @operationId("ApiDiagnostic_Delete") delete is ArmResourceDeleteSync< DiagnosticContract, { @@ -69,7 +85,10 @@ interface ApiDiagnostic { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all diagnostics of an API.") + @operationId("ApiDiagnostic_ListByService") listByService is ArmResourceListByParent< DiagnosticContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp index bfdb754165..e9da89e30c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Email Template details.") @@ -21,18 +23,26 @@ model EmailTemplateContract is ProxyResource { } @armResourceOperations -interface EmailTemplate { +interface EmailTemplateContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the email template specified by its identifier.") + @operationId("EmailTemplate_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the email template specified by its identifier.") @head + @operationId("EmailTemplate_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< EmailTemplateContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates an Email Template.") + @operationId("EmailTemplate_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< EmailTemplateContract, { @@ -43,10 +53,13 @@ interface EmailTemplate { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates API Management email template") - update is ArmResourcePatchSync< + @operationId("EmailTemplate_Update") + update is ArmCustomPatchSync< EmailTemplateContract, - EmailTemplateContractProperties, + EmailTemplateUpdateParameters, { ...BaseParameters; @@ -55,7 +68,10 @@ interface EmailTemplate { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Reset the Email Template to default template provided by the API Management service instance.") + @operationId("EmailTemplate_Delete") delete is ArmResourceDeleteSync< EmailTemplateContract, { @@ -66,7 +82,10 @@ interface EmailTemplate { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets all email templates") + @operationId("EmailTemplate_ListByService") listByService is ArmResourceListByParent< EmailTemplateContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp index 993a750342..5816a60db4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./GatewayContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Gateway certificate authority details.") @@ -25,18 +27,26 @@ model GatewayCertificateAuthorityContract } @armResourceOperations -interface GatewayCertificateAuthority { +interface GatewayCertificateAuthorityContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get assigned Gateway Certificate Authority details.") + @operationId("GatewayCertificateAuthority_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Checks if Certificate entity is assigned to Gateway entity as Certificate Authority.") @head + @operationId("GatewayCertificateAuthority_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GatewayCertificateAuthorityContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Assign Certificate entity to Gateway entity as Certificate Authority.") + @operationId("GatewayCertificateAuthority_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayCertificateAuthorityContract, { @@ -47,7 +57,10 @@ interface GatewayCertificateAuthority { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Remove relationship between Certificate Authority and Gateway entity.") + @operationId("GatewayCertificateAuthority_Delete") delete is ArmResourceDeleteSync< GatewayCertificateAuthorityContract, { @@ -58,7 +71,10 @@ interface GatewayCertificateAuthority { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists the collection of Certificate Authorities for the specified Gateway entity.") + @operationId("GatewayCertificateAuthority_ListByService") listByService is ArmResourceListByParent< GatewayCertificateAuthorityContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp index 1c0e7c605f..5060171ccd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Gateway details.") @@ -23,18 +25,26 @@ model GatewayContract is ProxyResource { } @armResourceOperations -interface Gateway { +interface GatewayContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Gateway specified by its identifier.") + @operationId("Gateway_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the Gateway specified by its identifier.") @head + @operationId("Gateway_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GatewayContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates a Gateway to be used in Api Management instance.") + @operationId("Gateway_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayContract, { @@ -45,10 +55,13 @@ interface Gateway { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the gateway specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("Gateway_Update") + update is ArmCustomPatchSync< + GatewayContract, GatewayContract, - GatewayContractProperties, { ...BaseParameters; @@ -57,7 +70,10 @@ interface Gateway { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific Gateway.") + @operationId("Gateway_Delete") delete is ArmResourceDeleteSync< GatewayContract, { @@ -68,7 +84,10 @@ interface Gateway { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of gateways registered with service instance.") + @operationId("Gateway_ListByService") listByService is ArmResourceListByParent< GatewayContract, { @@ -88,24 +107,33 @@ interface Gateway { $skip?: int32; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Retrieves gateway keys.") + @operationId("Gateway_ListKeys") listKeys is ArmResourceActionSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Regenerates specified gateway key invalidating any tokens created with it.") + @operationId("Gateway_RegenerateKey") regenerateKey is ArmResourceActionNoContentSync< GatewayContract, GatewayKeyRegenerationRequestContract >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the Shared Access Authorization Token for the gateway.") + @operationId("Gateway_GenerateToken") generateToken is ArmResourceActionSync< GatewayContract, GatewayTokenRequestContract, GatewayTokenContract >; -} -@armResourceOperations -interface GatewayApi { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GatewayApi_ListByService") @doc("Lists a collection of the APIs associated with a gateway.") + // FIXME: GatewayApi_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis") @get ListByService is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp index fde6ee1b04..cf3db9b401 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./GatewayContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Gateway hostname configuration details.") @@ -24,18 +26,26 @@ model GatewayHostnameConfigurationContract } @armResourceOperations -interface GatewayHostnameConfiguration { +interface GatewayHostnameConfigurationContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get details of a hostname configuration") + @operationId("GatewayHostnameConfiguration_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Checks that hostname configuration entity specified by identifier exists for specified Gateway entity.") @head + @operationId("GatewayHostnameConfiguration_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GatewayHostnameConfigurationContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates of updates hostname configuration for a Gateway.") + @operationId("GatewayHostnameConfiguration_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayHostnameConfigurationContract, { @@ -46,7 +56,10 @@ interface GatewayHostnameConfiguration { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified hostname configuration from the specified Gateway.") + @operationId("GatewayHostnameConfiguration_Delete") delete is ArmResourceDeleteSync< GatewayHostnameConfigurationContract, { @@ -57,7 +70,10 @@ interface GatewayHostnameConfiguration { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists the collection of hostname configurations for the specified gateway.") + @operationId("GatewayHostnameConfiguration_ListByService") listByService is ArmResourceListByParent< GatewayHostnameConfigurationContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp index 8e2f4af4d9..15b4ef58fd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Global Schema Contract details.") @@ -23,18 +25,26 @@ model GlobalSchemaContract is ProxyResource { } @armResourceOperations -interface GlobalSchema { +interface GlobalSchemaContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Schema specified by its identifier.") + @operationId("GlobalSchema_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the Schema specified by its identifier.") @head + @operationId("GlobalSchema_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GlobalSchemaContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates new or updates existing specified Schema of the API Management service instance.") + @operationId("GlobalSchema_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrUpdateAsync< GlobalSchemaContract, { @@ -43,9 +53,13 @@ interface GlobalSchema { @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") @header `If-Match`?: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific Schema.") + @operationId("GlobalSchema_Delete") delete is ArmResourceDeleteSync< GlobalSchemaContract, { @@ -56,7 +70,10 @@ interface GlobalSchema { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of schemas registered with service instance.") + @operationId("GlobalSchema_ListByService") listByService is ArmResourceListByParent< GlobalSchemaContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp index 52e4f203c1..a98a44d844 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Contract details.") @@ -23,15 +25,23 @@ model GroupContract is ProxyResource { } @armResourceOperations -interface Group { +interface GroupContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the group specified by its identifier.") + @operationId("Group_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the group specified by its identifier.") @head + @operationId("Group_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or Updates a group.") + @operationId("Group_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GroupContract, { @@ -42,10 +52,13 @@ interface Group { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the group specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("Group_Update") + update is ArmCustomPatchSync< GroupContract, - GroupContractProperties, + GroupUpdateParameters, { ...BaseParameters; @@ -54,7 +67,10 @@ interface Group { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific group of the API Management service instance.") + @operationId("Group_Delete") delete is ArmResourceDeleteSync< GroupContract, { @@ -65,7 +81,10 @@ interface Group { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of groups defined within a service instance.") + @operationId("Group_ListByService") listByService is ArmResourceListByParent< GroupContract, { @@ -85,11 +104,11 @@ interface Group { $skip?: int32; } >; -} -@armResourceOperations -interface GroupUser { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GroupUser_List") @doc("Lists a collection of user entities associated with the group.") + // FIXME: GroupUser_List could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users") @get List is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp index e25ce0601e..898881f736 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Identity Provider details.") @@ -22,18 +24,26 @@ model IdentityProviderContract } @armResourceOperations -interface IdentityProvider { +interface IdentityProviderContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the configuration details of the identity Provider configured in specified service instance.") + @operationId("IdentityProvider_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the identityProvider specified by its identifier.") @head + @operationId("IdentityProvider_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< IdentityProviderContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or Updates the IdentityProvider configuration.") + @operationId("IdentityProvider_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IdentityProviderContract, { @@ -44,10 +54,13 @@ interface IdentityProvider { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates an existing IdentityProvider configuration.") - update is ArmResourcePatchSync< + @operationId("IdentityProvider_Update") + update is ArmCustomPatchSync< IdentityProviderContract, - IdentityProviderContractProperties, + IdentityProviderUpdateParameters, { ...BaseParameters; @@ -56,7 +69,10 @@ interface IdentityProvider { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified identity provider configuration.") + @operationId("IdentityProvider_Delete") delete is ArmResourceDeleteSync< IdentityProviderContract, { @@ -67,9 +83,15 @@ interface IdentityProvider { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of Identity Provider configured in the specified service instance.") + @operationId("IdentityProvider_ListByService") listByService is ArmResourceListByParent; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the client secret details of the Identity Provider.") + @operationId("IdentityProvider_ListSecrets") listSecrets is ArmResourceActionSync< IdentityProviderContract, void, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp index 8faa985bbf..c6f7fd9830 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./IssueContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Issue Attachment Contract details.") @@ -25,18 +27,26 @@ model IssueAttachmentContract } @armResourceOperations -interface ApiIssueAttachment { +interface IssueAttachmentContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the issue Attachment for an API specified by its identifier.") + @operationId("ApiIssueAttachment_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier.") @head + @operationId("ApiIssueAttachment_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< IssueAttachmentContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new Attachment for the Issue in an API or updates an existing one.") + @operationId("ApiIssueAttachment_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IssueAttachmentContract, { @@ -47,7 +57,10 @@ interface ApiIssueAttachment { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified comment from an Issue.") + @operationId("ApiIssueAttachment_Delete") delete is ArmResourceDeleteSync< IssueAttachmentContract, { @@ -58,7 +71,10 @@ interface ApiIssueAttachment { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all attachments for the Issue associated with the specified API.") + @operationId("ApiIssueAttachment_ListByService") listByService is ArmResourceListByParent< IssueAttachmentContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp index 9adc87735c..a157961fa5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./IssueContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Issue Comment Contract details.") @@ -24,18 +26,26 @@ model IssueCommentContract is ProxyResource { } @armResourceOperations -interface ApiIssueComment { +interface IssueCommentContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the issue Comment for an API specified by its identifier.") + @operationId("ApiIssueComment_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier.") @head + @operationId("ApiIssueComment_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< IssueCommentContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new Comment for the Issue in an API or updates an existing one.") + @operationId("ApiIssueComment_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IssueCommentContract, { @@ -46,7 +56,10 @@ interface ApiIssueComment { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified comment from an Issue.") + @operationId("ApiIssueComment_Delete") delete is ArmResourceDeleteSync< IssueCommentContract, { @@ -57,7 +70,10 @@ interface ApiIssueComment { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all comments for the Issue associated with the specified API.") + @operationId("ApiIssueComment_ListByService") listByService is ArmResourceListByParent< IssueCommentContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp index e594e8c3e6..6696ba29ce 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Issue Contract details.") @@ -24,8 +26,10 @@ model IssueContract is ProxyResource { } @armResourceOperations -interface ApiIssue { +interface IssueContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Issue for an API specified by its identifier.") + @operationId("ApiIssue_Get") get is ArmResourceRead< IssueContract, { @@ -36,12 +40,18 @@ interface ApiIssue { expandCommentsAttachments?: boolean; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the Issue for an API specified by its identifier.") @head + @operationId("ApiIssue_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new Issue for an API or updates an existing one.") + @operationId("ApiIssue_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IssueContract, { @@ -52,10 +62,13 @@ interface ApiIssue { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates an existing issue for an API.") - update is ArmResourcePatchSync< + @operationId("ApiIssue_Update") + update is ArmCustomPatchSync< IssueContract, - IssueContractProperties, + IssueUpdateContract, { ...BaseParameters; @@ -64,7 +77,10 @@ interface ApiIssue { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified Issue from an API.") + @operationId("ApiIssue_Delete") delete is ArmResourceDeleteSync< IssueContract, { @@ -75,7 +91,10 @@ interface ApiIssue { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all issues associated with the specified API.") + @operationId("ApiIssue_ListByService") listByService is ArmResourceListByParent< IssueContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp index 866bf449c7..a67024359c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Logger details.") @@ -23,18 +25,26 @@ model LoggerContract is ProxyResource { } @armResourceOperations -interface Logger { +interface LoggerContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the logger specified by its identifier.") + @operationId("Logger_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the logger specified by its identifier.") @head + @operationId("Logger_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< LoggerContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or Updates a logger.") + @operationId("Logger_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< LoggerContract, { @@ -45,10 +55,13 @@ interface Logger { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates an existing logger.") - update is ArmResourcePatchSync< + @operationId("Logger_Update") + update is ArmCustomPatchSync< LoggerContract, - LoggerContractProperties, + LoggerUpdateContract, { ...BaseParameters; @@ -57,7 +70,10 @@ interface Logger { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified logger.") + @operationId("Logger_Delete") delete is ArmResourceDeleteSync< LoggerContract, { @@ -68,7 +84,10 @@ interface Logger { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of loggers in the specified service instance.") + @operationId("Logger_ListByService") listByService is ArmResourceListByParent< LoggerContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp index 8fe583a22b..9ad491998f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("NamedValue details.") @@ -23,18 +25,26 @@ model NamedValueContract is ProxyResource { } @armResourceOperations -interface NamedValue { +interface NamedValueContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the named value specified by its identifier.") + @operationId("NamedValue_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the named value specified by its identifier.") @head + @operationId("NamedValue_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< NamedValueContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates named value.") + @operationId("NamedValue_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrUpdateAsync< NamedValueContract, { @@ -43,21 +53,29 @@ interface NamedValue { @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") @header `If-Match`?: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the specific named value.") - update is ArmResourcePatchAsync< + @operationId("NamedValue_Update") + update is ArmCustomPatchAsync< NamedValueContract, - NamedValueContractProperties, + NamedValueUpdateParameters, { ...BaseParameters; @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") @header `If-Match`: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific named value from the API Management service instance.") + @operationId("NamedValue_Delete") delete is ArmResourceDeleteSync< NamedValueContract, { @@ -68,7 +86,10 @@ interface NamedValue { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of named values defined within a service instance.") + @operationId("NamedValue_ListByService") listByService is ArmResourceListByParent< NamedValueContract, { @@ -92,16 +113,24 @@ interface NamedValue { isKeyVaultRefreshFailed?: boolean; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the secret of the named value specified by its identifier.") + @operationId("NamedValue_ListValue") listValue is ArmResourceActionSync< NamedValueContract, void, NamedValueSecretContract >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Refresh the secret of the named value specified by its identifier.") + @operationId("NamedValue_RefreshSecret") refreshSecret is ArmResourceActionAsync< NamedValueContract, void, - NamedValueContract + NamedValueContract, + BaseParameters, + ArmLroLocationHeader >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp index c1551a9940..d1ca373be1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Notification details.") @@ -21,10 +23,15 @@ model NotificationContract is ProxyResource { } @armResourceOperations -interface Notification { +interface NotificationContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Notification specified by its identifier.") + @operationId("Notification_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create or Update API Management publisher notification.") + @operationId("Notification_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< NotificationContract, { @@ -35,7 +42,10 @@ interface Notification { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of properties defined within a service instance.") + @operationId("Notification_ListByService") listByService is ArmResourceListByParent< NotificationContract, { @@ -51,11 +61,11 @@ interface Notification { $skip?: int32; } >; -} -@armResourceOperations -interface NotificationRecipientUser { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NotificationRecipientUser_ListByNotification") @doc("Gets the list of the Notification Recipient User subscribed to the notification.") + // FIXME: NotificationRecipientUser_ListByNotification could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers") @get ListByNotification is Azure.Core.Foundations.Operation< @@ -81,11 +91,11 @@ interface NotificationRecipientUser { }, RecipientUserListResult >; -} -@armResourceOperations -interface NotificationRecipientEmail { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NotificationRecipientEmail_ListByNotification") @doc("Gets the list of the Notification Recipient Emails subscribed to a notification.") + // FIXME: NotificationRecipientEmail_ListByNotification could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails") @get ListByNotification is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp index cec6af808c..f756a97099 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("OpenId Connect Provider details.") @@ -24,8 +26,10 @@ model OpenidConnectProviderContract } @armResourceOperations -interface OpenIdConnectProvider { +interface OpenidConnectProviderContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets specific OpenID Connect Provider without secrets.") + @operationId("OpenIdConnectProvider_Get") get is ArmResourceRead< OpenidConnectProviderContract, { @@ -38,7 +42,10 @@ interface OpenIdConnectProvider { OpenId: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates the OpenID Connect Provider.") + @operationId("OpenIdConnectProvider_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< OpenidConnectProviderContract, { @@ -55,10 +62,13 @@ interface OpenIdConnectProvider { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the specific OpenID Connect Provider.") - update is ArmResourcePatchSync< + @operationId("OpenIdConnectProvider_Update") + update is ArmCustomPatchSync< OpenidConnectProviderContract, - OpenidConnectProviderContractProperties, + OpenidConnectProviderUpdateContract, { ...BaseParameters; @@ -73,7 +83,10 @@ interface OpenIdConnectProvider { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific OpenID Connect Provider of the API Management service instance.") + @operationId("OpenIdConnectProvider_Delete") delete is ArmResourceDeleteSync< OpenidConnectProviderContract, { @@ -90,7 +103,10 @@ interface OpenIdConnectProvider { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists of all the OpenId Connect Providers.") + @operationId("OpenIdConnectProvider_ListByService") listByService is ArmResourceListByParent< OpenidConnectProviderContract, { @@ -110,7 +126,10 @@ interface OpenIdConnectProvider { $skip?: int32; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the client secret details of the OpenID Connect Provider.") + @operationId("OpenIdConnectProvider_ListSecrets") listSecrets is ArmResourceActionSync< OpenidConnectProviderContract, void, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp index 16720c5bcb..7b77e70775 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("API Operation details.") @@ -23,18 +25,26 @@ model OperationContract is ProxyResource { } @armResourceOperations -interface ApiOperation { +interface OperationContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the API Operation specified by its identifier.") + @operationId("ApiOperation_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the API operation specified by its identifier.") @head + @operationId("ApiOperation_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< OperationContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new operation in the API or updates an existing one.") + @operationId("ApiOperation_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< OperationContract, { @@ -45,10 +55,13 @@ interface ApiOperation { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the operation in the API specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("ApiOperation_Update") + update is ArmCustomPatchSync< OperationContract, - OperationContractProperties, + OperationUpdateContract, { ...BaseParameters; @@ -57,7 +70,10 @@ interface ApiOperation { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified operation in the API.") + @operationId("ApiOperation_Delete") delete is ArmResourceDeleteSync< OperationContract, { @@ -68,7 +84,10 @@ interface ApiOperation { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of the operations for the specified API.") + @operationId("ApiOperation_ListByApi") listByApi is ArmResourceListByParent< OperationContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp index 20957f0005..14b6d3ad32 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./OperationContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Policy Contract details.") @@ -21,8 +23,10 @@ model PolicyContract is ProxyResource { } @armResourceOperations -interface ApiOperationPolicy { +interface PolicyContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get the policy configuration at the API Operation level.") + @operationId("ApiOperationPolicy_Get") get is ArmResourceRead< PolicyContract, { @@ -30,18 +34,24 @@ interface ApiOperationPolicy { @doc("Policy Export Format.") @query("format") - format?: PolicyExportFormat = "xml"; + format?: PolicyExportFormat = PolicyExportFormat.xml; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the API operation policy specified by its identifier.") @head + @operationId("ApiOperationPolicy_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PolicyContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates policy configuration for the API Operation level.") + @operationId("ApiOperationPolicy_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PolicyContract, { @@ -52,7 +62,10 @@ interface ApiOperationPolicy { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the policy configuration at the Api Operation.") + @operationId("ApiOperationPolicy_Delete") delete is ArmResourceDeleteSync< PolicyContract, { @@ -63,6 +76,9 @@ interface ApiOperationPolicy { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get the list of policy configuration at the API Operation level.") + @operationId("ApiOperationPolicy_ListByOperation") listByOperation is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp index aaeff5891b..5de9038dc1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Delegation settings for a developer portal.") @@ -15,24 +17,33 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiManagementServiceResource) model PortalDelegationSettings is ProxyResource { - @key("delegation") + @key("portalsetting") @segment("portalsettings") name: string; } @armResourceOperations -interface DelegationSettings { +@projectedName("client", "PortalDelegationSettings") +interface PortalDelegationSettingsOperationGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get Delegation Settings for the Portal.") + @operationId("DelegationSettings_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the DelegationSettings.") @head + @operationId("DelegationSettings_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalDelegationSettings, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create or Update Delegation settings.") + @operationId("DelegationSettings_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PortalDelegationSettings, { @@ -43,10 +54,13 @@ interface DelegationSettings { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update Delegation settings.") - update is ArmResourcePatchSync< + @operationId("DelegationSettings_Update") + update is ArmCustomPatchSync< + PortalDelegationSettings, PortalDelegationSettings, - PortalDelegationSettingsProperties, { ...BaseParameters; @@ -55,16 +69,18 @@ interface DelegationSettings { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists a collection of portalsettings defined within a service instance..") + @operationId("PortalSettings_ListByService") + listByService is ArmResourceListByParent; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the secret validation key of the DelegationSettings.") + @operationId("DelegationSettings_ListSecrets") listSecrets is ArmResourceActionSync< PortalDelegationSettings, void, PortalSettingValidationKeyContract >; } - -@armResourceOperations -interface PortalSettings { - @doc("Lists a collection of portalsettings defined within a service instance..") - listByService is ArmResourceListByParent; -} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp index 90ec667f1b..325294ff3f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Portal Revision's contract details.") @@ -24,32 +26,51 @@ model PortalRevisionContract } @armResourceOperations -interface PortalRevision { +interface PortalRevisionContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the developer portal's revision specified by its identifier.") + @operationId("PortalRevision_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the developer portal revision specified by its identifier.") @head + @operationId("PortalRevision_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalRevisionContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + @operationId("PortalRevision_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + PortalRevisionContract, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the description of specified portal revision or makes it current.") - update is ArmResourcePatchAsync< + @operationId("PortalRevision_Update") + update is ArmCustomPatchAsync< + PortalRevisionContract, PortalRevisionContract, - PortalRevisionContractProperties, { ...BaseParameters; @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") @header `If-Match`: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists developer portal's revisions.") + @operationId("PortalRevision_ListByService") listByService is ArmResourceListByParent< PortalRevisionContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp index 20c8d900f3..ed77817ff6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,30 +9,40 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Sign-In settings for the Developer Portal.") @singleton("signin") @parentResource(ApiManagementServiceResource) model PortalSigninSettings is ProxyResource { - @key("signin") + @key("portalsetting") @segment("portalsettings") name: string; } @armResourceOperations -interface SignInSettings { +@projectedName("client", "PortalSigninSettings") +interface PortalSigninSettingsOperationGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get Sign In Settings for the Portal") + @operationId("SignInSettings_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the SignInSettings.") @head + @operationId("SignInSettings_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalSigninSettings, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create or Update Sign-In settings.") + @operationId("SignInSettings_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PortalSigninSettings, { @@ -42,10 +53,13 @@ interface SignInSettings { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update Sign-In settings.") - update is ArmResourcePatchSync< + @operationId("SignInSettings_Update") + update is ArmCustomPatchSync< + PortalSigninSettings, PortalSigninSettings, - PortalSigninSettingProperties, { ...BaseParameters; @@ -54,10 +68,9 @@ interface SignInSettings { `If-Match`: string; } >; -} -@armResourceOperations -interface PortalSettings { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of portalsettings defined within a service instance..") + @operationId("PortalSettings_ListByService") listByService is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp index da59323ae8..a8a7af6a45 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,30 +9,40 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Sign-Up settings for a developer portal.") @singleton("signup") @parentResource(ApiManagementServiceResource) model PortalSignupSettings is ProxyResource { - @key("signup") + @key("portalsetting") @segment("portalsettings") name: string; } @armResourceOperations -interface SignUpSettings { +@projectedName("client", "PortalSignupSettings") +interface PortalSignupSettingsOperationGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get Sign Up Settings for the Portal") + @operationId("SignUpSettings_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the SignUpSettings.") @head + @operationId("SignUpSettings_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalSignupSettings, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create or Update Sign-Up settings.") + @operationId("SignUpSettings_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PortalSignupSettings, { @@ -42,10 +53,13 @@ interface SignUpSettings { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update Sign-Up settings.") - update is ArmResourcePatchSync< + @operationId("SignUpSettings_Update") + update is ArmCustomPatchSync< + PortalSignupSettings, PortalSignupSettings, - PortalSignupSettingsProperties, { ...BaseParameters; @@ -54,10 +68,9 @@ interface SignUpSettings { `If-Match`: string; } >; -} -@armResourceOperations -interface PortalSettings { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of portalsettings defined within a service instance..") + @operationId("PortalSettings_ListByService") listByService is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp index 35f161ae69..716bbd25cf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("The Private Endpoint Connection resource.") @@ -22,13 +24,24 @@ model PrivateEndpointConnection } @armResourceOperations -interface PrivateEndpointConnection { +interface PrivateEndpointConnections { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Private Endpoint Connection specified by its identifier.") + @operationId("PrivateEndpointConnection_GetByName") getByName is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new Private Endpoint Connection or updates an existing one.") + @operationId("PrivateEndpointConnection_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified Private Endpoint Connection.") + @operationId("PrivateEndpointConnection_Delete") delete is ArmResourceDeleteAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all private endpoint connections of the API Management service instance.") + @operationId("PrivateEndpointConnection_ListByService") listByService is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp index 3e381b6a94..21514c50d8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("A private link resource") @@ -21,9 +23,14 @@ model PrivateLinkResource is ProxyResource { } @armResourceOperations -interface PrivateEndpointConnection { +interface PrivateLinkResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the private link resources") + @operationId("PrivateEndpointConnection_GetPrivateLinkResource") getPrivateLinkResource is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the private link resources") + @operationId("PrivateEndpointConnection_ListPrivateLinkResources") listPrivateLinkResources is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp index 0cf3757c56..7d0436f34f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Product details.") @@ -23,18 +25,26 @@ model ProductContract is ProxyResource { } @armResourceOperations -interface Product { +interface ProductContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the product specified by its identifier.") + @operationId("Product_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the product specified by its identifier.") @head + @operationId("Product_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< ProductContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or Updates a product.") + @operationId("Product_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< ProductContract, { @@ -45,10 +55,13 @@ interface Product { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update existing product details.") - update is ArmResourcePatchSync< + @operationId("Product_Update") + update is ArmCustomPatchSync< ProductContract, - ProductContractProperties, + ProductUpdateParameters, { ...BaseParameters; @@ -57,7 +70,10 @@ interface Product { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Delete product.") + @operationId("Product_Delete") delete is ArmResourceDeleteSync< ProductContract, { @@ -72,7 +88,10 @@ interface Product { deleteSubscriptions?: boolean; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of products in the specified service instance.") + @operationId("Product_ListByService") listByService is ArmResourceListByParent< ProductContract, { @@ -100,11 +119,11 @@ interface Product { tags?: string; } >; -} -@armResourceOperations -interface ProductApi { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ProductApi_ListByProduct") @doc("Lists a collection of the APIs associated with a product.") + // FIXME: ProductApi_ListByProduct could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis") @get ListByProduct is Azure.Core.Foundations.Operation< @@ -145,11 +164,11 @@ interface ProductApi { }, ApiManagementProductApiListResult >; -} -@armResourceOperations -interface ProductGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ProductGroup_ListByProduct") @doc("Lists the collection of developer groups associated with the specified product.") + // FIXME: ProductGroup_ListByProduct could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups") @get ListByProduct is Azure.Core.Foundations.Operation< @@ -190,11 +209,11 @@ interface ProductGroup { }, ApiManagementProductGroupListResult >; -} -@armResourceOperations -interface ProductSubscriptions { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ProductSubscriptions_List") @doc("Lists the collection of subscriptions to the specified product.") + // FIXME: ProductSubscriptions_List could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions") @get List is Azure.Core.Foundations.Operation< @@ -233,6 +252,6 @@ interface ProductSubscriptions { @path subscriptionId: string; }, - SubscriptionListResult + ResourceListResult >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp index a1234185e1..b722bce933 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("API Schema Contract details.") @@ -23,18 +25,26 @@ model SchemaContract is ProxyResource { } @armResourceOperations -interface ApiSchema { +interface SchemaContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get the schema configuration at the API level.") + @operationId("ApiSchema_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the schema specified by its identifier.") @head + @operationId("ApiSchema_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< SchemaContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates schema configuration for the API.") + @operationId("ApiSchema_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrUpdateAsync< SchemaContract, { @@ -43,9 +53,13 @@ interface ApiSchema { @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") @header `If-Match`?: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the schema configuration at the Api.") + @operationId("ApiSchema_Delete") delete is ArmResourceDeleteSync< SchemaContract, { @@ -60,7 +74,10 @@ interface ApiSchema { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get the schema configuration at the API level.") + @operationId("ApiSchema_ListByApi") listByApi is ArmResourceListByParent< SchemaContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp index ae6f58e442..282b8d4ccc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Subscription details.") @@ -21,18 +23,26 @@ model SubscriptionContract is ProxyResource { } @armResourceOperations -interface Subscription { +interface SubscriptionContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the specified Subscription entity.") + @operationId("Subscription_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier.") @head + @operationId("Subscription_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< SubscriptionContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates the subscription of specified user to the specified product.") + @operationId("Subscription_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< SubscriptionContract, { @@ -55,10 +65,13 @@ Notify change in Subscription State. appType?: AppType; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of a subscription specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("Subscription_Update") + update is ArmCustomPatchSync< SubscriptionContract, - SubscriptionContractProperties, + SubscriptionUpdateParameters, { ...BaseParameters; @@ -79,7 +92,10 @@ Notify change in Subscription State. appType?: AppType; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified subscription.") + @operationId("Subscription_Delete") delete is ArmResourceDeleteSync< SubscriptionContract, { @@ -90,7 +106,10 @@ Notify change in Subscription State. `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all subscriptions of the API Management service instance.") + @operationId("Subscription_List") list is ArmResourceListByParent< SubscriptionContract, { @@ -110,17 +129,26 @@ Notify change in Subscription State. $skip?: int32; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Regenerates primary key of existing subscription of the API Management service instance.") + @operationId("Subscription_RegeneratePrimaryKey") regeneratePrimaryKey is ArmResourceActionNoContentSync< SubscriptionContract, void >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Regenerates secondary key of existing subscription of the API Management service instance.") + @operationId("Subscription_RegenerateSecondaryKey") regenerateSecondaryKey is ArmResourceActionNoContentSync< SubscriptionContract, void >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the specified Subscription keys.") + @operationId("Subscription_ListSecrets") listSecrets is ArmResourceActionSync< SubscriptionContract, void, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp index a097bb29b8..441988134a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./OperationContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Tag Contract details.") @@ -24,19 +26,33 @@ model TagContract is ProxyResource { } @armResourceOperations -interface Tag { +interface TagContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get tag associated with the Operation.") + @operationId("Tag_GetByOperation") getByOperation is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state version of the tag specified by its identifier.") @head + @operationId("Tag_GetEntityStateByOperation") getEntityStateByOperation( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Assign tag to the Operation.") + @operationId("Tag_AssignToOperation") assignToOperation is ArmResourceCreateOrReplaceSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Detach the tag from the Operation.") + @operationId("Tag_DetachFromOperation") detachFromOperation is ArmResourceDeleteSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all Tags associated with the Operation.") + @operationId("Tag_ListByOperation") listByOperation is ArmResourceListByParent< TagContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp index 83ebe38e74..9df7604a21 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Contract details.") @@ -25,18 +27,26 @@ model TagDescriptionContract } @armResourceOperations -interface ApiTagDescription { +interface TagDescriptionContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get Tag description in scope of API") + @operationId("ApiTagDescription_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state version of the tag specified by its identifier.") @head + @operationId("ApiTagDescription_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< TagDescriptionContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create/Update tag description in scope of the Api.") + @operationId("ApiTagDescription_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< TagDescriptionContract, { @@ -47,7 +57,10 @@ interface ApiTagDescription { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Delete tag description for the Api.") + @operationId("ApiTagDescription_Delete") delete is ArmResourceDeleteSync< TagDescriptionContract, { @@ -58,7 +71,10 @@ interface ApiTagDescription { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations") + @operationId("ApiTagDescription_ListByService") listByService is ArmResourceListByParent< TagDescriptionContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp index 264031e060..77ba366ca5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Tenant Settings.") @@ -22,10 +24,15 @@ model TenantSettingsContract } @armResourceOperations -interface TenantSettings { +interface TenantSettingsContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get tenant settings.") + @operationId("TenantSettings_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Public settings.") + @operationId("TenantSettings_ListByService") listByService is ArmResourceListByParent< TenantSettingsContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp index 22a10aaa7e..b06eb8163a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("User details.") @@ -23,15 +25,23 @@ model UserContract is ProxyResource { } @armResourceOperations -interface User { +interface UserContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the user specified by its identifier.") + @operationId("User_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the user specified by its identifier.") @head + @operationId("User_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or Updates a user.") + @operationId("User_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< UserContract, { @@ -46,10 +56,13 @@ interface User { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the user specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("User_Update") + update is ArmCustomPatchSync< UserContract, - UserContractProperties, + UserUpdateParameters, { ...BaseParameters; @@ -58,7 +71,10 @@ interface User { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific user.") + @operationId("User_Delete") delete is ArmResourceDeleteSync< UserContract, { @@ -81,7 +97,10 @@ interface User { appType?: AppType; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of registered users in the specified service instance.") + @operationId("User_ListByService") listByService is ArmResourceListByParent< UserContract, { @@ -105,23 +124,28 @@ interface User { expandGroups?: boolean; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal.") + @operationId("User_GenerateSsoUrl") generateSsoUrl is ArmResourceActionSync< UserContract, void, GenerateSsoUrlResult >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the Shared Access Authorization Token for the User.") + @operationId("User_GetSharedAccessToken") getSharedAccessToken is ArmResourceActionSync< UserContract, UserTokenParameters, UserTokenResult >; -} -@armResourceOperations -interface UserConfirmationPassword { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Sends confirmation") + @operationId("UserConfirmationPassword_Send") send is ArmResourceActionNoContentSync< UserContract, void, @@ -133,11 +157,11 @@ interface UserConfirmationPassword { appType?: AppType; } >; -} -@armResourceOperations -interface UserGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("UserGroup_List") @doc("Lists all user groups.") + // FIXME: UserGroup_List could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups") @get List is Azure.Core.Foundations.Operation< @@ -176,13 +200,13 @@ interface UserGroup { @path subscriptionId: string; }, - GroupListResult + ResourceListResult >; -} -@armResourceOperations -interface UserIdentities { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("UserIdentities_List") @doc("List of all user identities.") + // FIXME: UserIdentities_List could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities") @get List is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_CreateOrUpdate.json new file mode 100644 index 0000000000..318fc0d44e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_CreateOrUpdate.json @@ -0,0 +1,162 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "diagnosticId": "applicationinsights", + "parameters": { + "properties": { + "alwaysLog": "allErrors", + "backend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "frontend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "loggerId": "/loggers/applicationinsights", + "sampling": { + "percentage": 50, + "samplingType": "fixed" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "applicationinsights", + "type": "Microsoft.ApiManagement/service/apis/diagnostics", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/diagnostics/applicationinsights", + "properties": { + "alwaysLog": "allErrors", + "backend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "frontend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "loggerId": "/loggers/applicationinsights", + "sampling": { + "percentage": 50, + "samplingType": "fixed" + } + } + } + }, + "201": { + "body": { + "name": "applicationinsights", + "type": "Microsoft.ApiManagement/service/apis/diagnostics", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/diagnostics/applicationinsights", + "properties": { + "alwaysLog": "allErrors", + "backend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "frontend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "loggerId": "/loggers/applicationinsights", + "sampling": { + "percentage": 50, + "samplingType": "fixed" + } + } + } + } + }, + "operationId": "ApiDiagnostic_CreateOrUpdate", + "title": "ApiManagementCreateApiDiagnostic" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Delete.json new file mode 100644 index 0000000000..27edadd8a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "diagnosticId": "applicationinsights", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiDiagnostic_Delete", + "title": "ApiManagementDeleteApiDiagnostic" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Get.json new file mode 100644 index 0000000000..dc1b097ae6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Get.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "diagnosticId": "applicationinsights", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "applicationinsights", + "type": "Microsoft.ApiManagement/service/apis/diagnostics", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/diagnostics/applicationinsights", + "properties": { + "alwaysLog": "allErrors", + "backend": { + "response": { + "body": { + "bytes": 100 + }, + "headers": [] + }, + "request": { + "body": { + "bytes": 100 + }, + "headers": [] + } + }, + "frontend": { + "response": { + "body": { + "bytes": 100 + }, + "headers": [] + }, + "request": { + "body": { + "bytes": 100 + }, + "headers": [] + } + }, + "httpCorrelationProtocol": "Legacy", + "logClientIp": true, + "loggerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/aisamplingtest", + "sampling": { + "percentage": 100, + "samplingType": "fixed" + } + } + } + } + }, + "operationId": "ApiDiagnostic_Get", + "title": "ApiManagementGetApiDiagnostic" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_GetEntityTag.json new file mode 100644 index 0000000000..d25c8da044 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "diagnosticId": "applicationinsights", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiDiagnostic_GetEntityTag", + "title": "ApiManagementHeadApiDiagnostic" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_ListByService.json new file mode 100644 index 0000000000..5c7b99f5be --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_ListByService.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "echo-api", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "value": [ + { + "name": "applicationinsights", + "type": "Microsoft.ApiManagement/service/apis/diagnostics", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/diagnostics/applicationinsights", + "properties": { + "alwaysLog": "allErrors", + "backend": { + "response": { + "body": { + "bytes": 100 + }, + "headers": [] + }, + "request": { + "body": { + "bytes": 100 + }, + "headers": [] + } + }, + "frontend": { + "response": { + "body": { + "bytes": 100 + }, + "headers": [] + }, + "request": { + "body": { + "bytes": 100 + }, + "headers": [] + } + }, + "httpCorrelationProtocol": "Legacy", + "logClientIp": true, + "loggerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/aisamplingtest", + "sampling": { + "percentage": 100, + "samplingType": "fixed" + } + } + } + ] + } + } + }, + "operationId": "ApiDiagnostic_ListByService", + "title": "ApiManagementListApiDiagnostics" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Update.json new file mode 100644 index 0000000000..25b0e586b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Update.json @@ -0,0 +1,106 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "echo-api", + "diagnosticId": "applicationinsights", + "parameters": { + "properties": { + "alwaysLog": "allErrors", + "backend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "frontend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "loggerId": "/loggers/applicationinsights", + "sampling": { + "percentage": 50, + "samplingType": "fixed" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "applicationinsights", + "type": "Microsoft.ApiManagement/service/apis/diagnostics", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/diagnostics/applicationinsights", + "properties": { + "alwaysLog": "allErrors", + "backend": { + "response": { + "body": { + "bytes": 100 + }, + "headers": [] + }, + "request": { + "body": { + "bytes": 100 + }, + "headers": [] + } + }, + "frontend": { + "response": { + "body": { + "bytes": 100 + }, + "headers": [] + }, + "request": { + "body": { + "bytes": 100 + }, + "headers": [] + } + }, + "httpCorrelationProtocol": "Legacy", + "logClientIp": true, + "loggerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/aisamplingtest", + "sampling": { + "percentage": 100, + "samplingType": "fixed" + } + } + } + } + }, + "operationId": "ApiDiagnostic_Update", + "title": "ApiManagementUpdateApiDiagnostic" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_CreateOrUpdate.json new file mode 100644 index 0000000000..c42d3baacc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_CreateOrUpdate.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "attachmentId": "57d2ef278aa04f0888cba3f3", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "parameters": { + "properties": { + "content": "IEJhc2U2NA==", + "contentFormat": "image/jpeg", + "title": "Issue attachment." + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d2ef278aa04f0888cba3f3", + "type": "Microsoft.ApiManagement/service/apis/issues/attachments", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/attachments/57d2ef278aa04f0888cba3f3", + "properties": { + "content": "https://.../image.jpg", + "contentFormat": "link", + "title": "Issue attachment." + } + } + }, + "201": { + "body": { + "name": "57d2ef278aa04f0888cba3f3", + "type": "Microsoft.ApiManagement/service/apis/issues/attachments", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/attachments/57d2ef278aa04f0888cba3f3", + "properties": { + "content": "https://.../image.jpg", + "contentFormat": "link", + "title": "Issue attachment." + } + } + } + }, + "operationId": "ApiIssueAttachment_CreateOrUpdate", + "title": "ApiManagementCreateApiIssueAttachment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Delete.json new file mode 100644 index 0000000000..6d2f3138b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Delete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "attachmentId": "57d2ef278aa04f0888cba3f3", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiIssueAttachment_Delete", + "title": "ApiManagementDeleteApiIssueAttachment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Get.json new file mode 100644 index 0000000000..7c03ed4838 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "attachmentId": "57d2ef278aa04f0888cba3f3", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d2ef278aa04f0888cba3f3", + "type": "Microsoft.ApiManagement/service/apis/issues/attachments", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/attachments/57d2ef278aa04f0888cba3f3", + "properties": { + "content": "https://.../image.jpg", + "contentFormat": "link", + "title": "Issue attachment." + } + } + } + }, + "operationId": "ApiIssueAttachment_Get", + "title": "ApiManagementGetApiIssueAttachment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_GetEntityTag.json new file mode 100644 index 0000000000..eb2422dd0f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_GetEntityTag.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "attachmentId": "57d2ef278aa04f0888cba3f3", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiIssueAttachment_GetEntityTag", + "title": "ApiManagementHeadApiIssueAttachment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_ListByService.json new file mode 100644 index 0000000000..881975a357 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_ListByService.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "57d2ef278aa04f0888cba3f3", + "type": "Microsoft.ApiManagement/service/apis/issues/attachments", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/attachments/57d2ef278aa04f0888cba3f3", + "properties": { + "content": "https://.../image.jpg", + "contentFormat": "link", + "title": "Issue attachment." + } + } + ] + } + } + }, + "operationId": "ApiIssueAttachment_ListByService", + "title": "ApiManagementListApiIssueAttachments" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_CreateOrUpdate.json new file mode 100644 index 0000000000..25a397ad38 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_CreateOrUpdate.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "commentId": "599e29ab193c3c0bd0b3e2fb", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "parameters": { + "properties": { + "createdDate": "2018-02-01T22:21:20.467Z", + "text": "Issue comment.", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "599e29ab193c3c0bd0b3e2fb", + "type": "Microsoft.ApiManagement/service/apis/issues/comments", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/comments/599e29ab193c3c0bd0b3e2fb", + "properties": { + "createdDate": "2018-02-01T22:21:20.467Z", + "text": "Issue comment.", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + }, + "201": { + "body": { + "name": "599e29ab193c3c0bd0b3e2fb", + "type": "Microsoft.ApiManagement/service/apis/issues/comments", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/comments/599e29ab193c3c0bd0b3e2fb", + "properties": { + "createdDate": "2018-02-01T22:21:20.467Z", + "text": "Issue comment.", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + } + }, + "operationId": "ApiIssueComment_CreateOrUpdate", + "title": "ApiManagementCreateApiIssueComment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Delete.json new file mode 100644 index 0000000000..aaa4c3a63b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Delete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "commentId": "599e29ab193c3c0bd0b3e2fb", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiIssueComment_Delete", + "title": "ApiManagementDeleteApiIssueComment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Get.json new file mode 100644 index 0000000000..6d4d0a534b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "commentId": "599e29ab193c3c0bd0b3e2fb", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "599e29ab193c3c0bd0b3e2fb", + "type": "Microsoft.ApiManagement/service/apis/issues/comments", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/comments/599e29ab193c3c0bd0b3e2fb", + "properties": { + "createdDate": "2018-02-01T22:21:20.467Z", + "text": "Issue comment.", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + } + }, + "operationId": "ApiIssueComment_Get", + "title": "ApiManagementGetApiIssueComment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_GetEntityTag.json new file mode 100644 index 0000000000..c44e7f2ab4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_GetEntityTag.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "commentId": "599e29ab193c3c0bd0b3e2fb", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiIssueComment_GetEntityTag", + "title": "ApiManagementHeadApiIssueComment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_ListByService.json new file mode 100644 index 0000000000..316bcb1a1a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_ListByService.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "599e29ab193c3c0bd0b3e2fb", + "type": "Microsoft.ApiManagement/service/apis/issues/comments", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/comments/599e29ab193c3c0bd0b3e2fb", + "properties": { + "createdDate": "2018-02-01T22:21:20.467Z", + "text": "Issue comment.", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + ] + } + } + }, + "operationId": "ApiIssueComment_ListByService", + "title": "ApiManagementListApiIssueComments" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_CreateOrUpdate.json new file mode 100644 index 0000000000..564372ac5e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_CreateOrUpdate.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "parameters": { + "properties": { + "description": "New API issue description", + "createdDate": "2018-02-01T22:21:20.467Z", + "state": "open", + "title": "New API issue", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/issues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc", + "properties": { + "description": "New API issue description", + "createdDate": "2018-02-01T22:21:20.467Z", + "state": "open", + "title": "New API issue", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + }, + "201": { + "body": { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/issues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc", + "properties": { + "description": "New API issue description", + "createdDate": "2018-02-01T22:21:20.467Z", + "state": "open", + "title": "New API issue", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + } + }, + "operationId": "ApiIssue_CreateOrUpdate", + "title": "ApiManagementCreateApiIssue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Delete.json new file mode 100644 index 0000000000..a390fb7494 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiIssue_Delete", + "title": "ApiManagementDeleteApiIssue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Get.json new file mode 100644 index 0000000000..b68e3d3a81 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Get.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/issues", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc", + "properties": { + "description": "New API issue description", + "apiId": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a", + "createdDate": "2018-02-01T22:21:20.467Z", + "state": "open", + "title": "New API issue", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + } + }, + "operationId": "ApiIssue_Get", + "title": "ApiManagementGetApiIssue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_GetEntityTag.json new file mode 100644 index 0000000000..32679c3024 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiIssue_GetEntityTag", + "title": "ApiManagementHeadApiIssue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_ListByService.json new file mode 100644 index 0000000000..aedf0ac964 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_ListByService.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/issues", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc", + "properties": { + "description": "New API issue description", + "apiId": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a", + "createdDate": "2018-02-01T22:21:20.467Z", + "state": "open", + "title": "New API issue", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + ] + } + } + }, + "operationId": "ApiIssue_ListByService", + "title": "ApiManagementListApiIssues" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Update.json new file mode 100644 index 0000000000..b12b0b4a07 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Update.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "parameters": { + "properties": { + "state": "closed" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/issues", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc", + "properties": { + "description": "New API issue description", + "apiId": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a", + "createdDate": "2018-02-01T22:21:20.467Z", + "state": "open", + "title": "New API issue", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + } + }, + "operationId": "ApiIssue_Update", + "title": "ApiManagementUpdateApiIssue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsConsumption.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsConsumption.json new file mode 100644 index 0000000000..20f593cb73 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsConsumption.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "capacity": null, + "resourceType": "Microsoft.ApiManagement/service", + "sku": { + "name": "Consumption" + } + } + ] + } + } + }, + "operationId": "ApiManagementServiceSkus_ListAvailableServiceSkus", + "title": "ApiManagementListSKUs-Consumption" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsDedicated.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsDedicated.json new file mode 100644 index 0000000000..5958e6ac61 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsDedicated.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "capacity": { + "default": 1, + "maximum": 1, + "minimum": 1, + "scaleType": "none" + }, + "resourceType": "Microsoft.ApiManagement/service", + "sku": { + "name": "Developer" + } + }, + { + "capacity": { + "default": 1, + "maximum": 2, + "minimum": 1, + "scaleType": "manual" + }, + "resourceType": "Microsoft.ApiManagement/service", + "sku": { + "name": "Basic" + } + }, + { + "capacity": { + "default": 1, + "maximum": 4, + "minimum": 1, + "scaleType": "automatic" + }, + "resourceType": "Microsoft.ApiManagement/service", + "sku": { + "name": "Standard" + } + }, + { + "capacity": { + "default": 1, + "maximum": 10, + "minimum": 1, + "scaleType": "automatic" + }, + "resourceType": "Microsoft.ApiManagement/service", + "sku": { + "name": "Premium" + } + }, + { + "capacity": { + "default": 1, + "maximum": 1, + "minimum": 1, + "scaleType": "automatic" + }, + "resourceType": "Microsoft.ApiManagement/service", + "sku": { + "name": "Isolated" + } + } + ] + } + } + }, + "operationId": "ApiManagementServiceSkus_ListAvailableServiceSkus", + "title": "ApiManagementListSKUs-Dedicated" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ApplyNetworkConfigurationUpdates.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ApplyNetworkConfigurationUpdates.json new file mode 100644 index 0000000000..0dbbca88a2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ApplyNetworkConfigurationUpdates.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "location": "west us" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAXX6Y=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "East Asia", + "properties": { + "createdAtUtc": "2015-09-22T01:50:34.7921566Z", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "207.46.155.24" + ], + "publisherEmail": "admin@live.com", + "publisherName": "Contoso", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/eastUsVirtualNetwork/subnets/apimSubnet" + }, + "virtualNetworkType": "External" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": { + "UID": "52ed5986-717b-45b4-b17c-3df8db372cff" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_ApplyNetworkConfigurationUpdates", + "title": "ApiManagementApplyNetworkConfigurationUpdates" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithAccessKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithAccessKey.json new file mode 100644 index 0000000000..92e53a3f52 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithAccessKey.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "accessKey": "**************************************************", + "accessType": "AccessKey", + "backupName": "apimService1backup_2017_03_19", + "containerName": "backupContainer", + "storageAccount": "teststorageaccount" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAACXok=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "additionalLocations": [ + { + "disableGateway": true, + "gatewayRegionalUrl": "https://apimService1-eastus-01.regional.azure-api.net", + "location": "East US", + "publicIPAddresses": [ + "23.101.138.153" + ], + "sku": { + "name": "Premium", + "capacity": 1 + } + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "createdAtUtc": "2019-12-18T06:26:20.3348609Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-westus-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2" + }, + "defaultSslBinding": true, + "hostName": "gateway1.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "mgmt.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Portal", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "portal1.msitesting.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.91.32.113" + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_Backup", + "title": "ApiManagementBackupWithAccessKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithSystemManagedIdentity.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithSystemManagedIdentity.json new file mode 100644 index 0000000000..89e9010170 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithSystemManagedIdentity.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "accessType": "SystemAssignedManagedIdentity", + "backupName": "backup5", + "containerName": "apim-backups", + "storageAccount": "contosorpstorage" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAQM8o=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "XXXXX-5fb4-4916-95d4-64b306f9d924", + "tenantId": "XXXXX-86f1-XXXXX-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/rg1UserIdentity": { + "clientId": "XXXXX-a154-4830-XXXX-46a12da1a1e2", + "principalId": "XXXXX-a100-4478-XXXX-d65d98118ba0" + }, + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/vpnpremium": { + "clientId": "XXXX-6328-4db2-XXXX-ab0e3e7806cf", + "principalId": "XXXXX-9208-4128-af2d-a10d2af9b5a3" + } + } + }, + "location": "Central US EUAP", + "properties": { + "createdAtUtc": "2020-04-23T16:26:47.8637967Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-centraluseuap-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv1", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "52.XXXX.160.66" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "apimService1@corp.microsoft.com", + "publisherName": "MS", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "systemData": { + "lastModifiedAt": "2021-06-30T06:24:57.0008037Z", + "lastModifiedBy": "contoso@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": { + "Owner": "apimService1" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_Backup", + "title": "ApiManagementBackupWithSystemManagedIdentity" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithUserAssignedManagedIdentity.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithUserAssignedManagedIdentity.json new file mode 100644 index 0000000000..6bf30fcf6f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithUserAssignedManagedIdentity.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "accessType": "UserAssignedManagedIdentity", + "backupName": "backup5", + "clientId": "XXXXX-a154-4830-XXXX-46a12da1a1e2", + "containerName": "apim-backups", + "storageAccount": "contosorpstorage" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAQM8o=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "XXXXX-5fb4-4916-95d4-64b306f9d924", + "tenantId": "XXXXX-86f1-XXXXX-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/rg1UserIdentity": { + "clientId": "XXXXX-a154-4830-XXXX-46a12da1a1e2", + "principalId": "XXXXX-a100-4478-XXXX-d65d98118ba0" + }, + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/vpnpremium": { + "clientId": "XXXX-6328-4db2-XXXX-ab0e3e7806cf", + "principalId": "XXXXX-9208-4128-af2d-a10d2af9b5a3" + } + } + }, + "location": "Central US EUAP", + "properties": { + "createdAtUtc": "2020-04-23T16:26:47.8637967Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-centraluseuap-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv1", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "52.XXXX.160.66" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "apimService1@corp.microsoft.com", + "publisherName": "MS", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "systemData": { + "lastModifiedAt": "2021-06-30T06:24:57.0008037Z", + "lastModifiedBy": "contoso@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": { + "Owner": "apimService1" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_Backup", + "title": "ApiManagementBackupWithUserAssignedManagedIdentity" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CheckNameAvailability.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CheckNameAvailability.json new file mode 100644 index 0000000000..a9fb6419ad --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CheckNameAvailability.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "name": "apimService1" + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "message": "", + "nameAvailable": true, + "reason": "Valid" + } + } + }, + "operationId": "ApiManagementService_CheckNameAvailability", + "title": "ApiManagementServiceCheckNameAvailability" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustomHostname.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustomHostname.json new file mode 100644 index 0000000000..0ef35180ac --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustomHostname.json @@ -0,0 +1,258 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "location": "West US", + "properties": { + "additionalLocations": [ + { + "disableGateway": true, + "location": "East US", + "sku": { + "name": "Premium", + "capacity": 1 + } + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificatePassword": "Password", + "defaultSslBinding": true, + "encodedCertificate": "****** Base 64 Encoded Certificate ************", + "hostName": "gateway1.msitesting.net" + }, + { + "type": "Management", + "certificatePassword": "Password", + "encodedCertificate": "****** Base 64 Encoded Certificate ************", + "hostName": "mgmt.msitesting.net" + }, + { + "type": "Portal", + "certificatePassword": "Password", + "encodedCertificate": "****** Base 64 Encoded Certificate ************", + "hostName": "portal1.msitesting.net" + } + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAACXok=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "additionalLocations": [ + { + "disableGateway": true, + "gatewayRegionalUrl": "https://apimService1-eastus-01.regional.azure-api.net", + "location": "East US", + "publicIPAddresses": [ + "23.101.138.153" + ], + "sku": { + "name": "Premium", + "capacity": 1 + } + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "createdAtUtc": "2019-12-18T06:26:20.3348609Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-westus-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXF1D174FDB3A2" + }, + "defaultSslBinding": true, + "hostName": "gateway1.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXF1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "mgmt.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Portal", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXF1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "portal1.msitesting.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.91.32.113" + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAACXoo=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "additionalLocations": [ + { + "disableGateway": true, + "location": "East US", + "sku": { + "name": "Premium", + "capacity": 1 + } + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "createdAtUtc": "2019-12-18T08:04:26.9492661Z", + "disableGateway": false, + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXF1D174FDB3A2" + }, + "defaultSslBinding": true, + "hostName": "gateway1.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXF1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "mgmt.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Portal", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXF1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "portal1.msitesting.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Created", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/bXVsdGlob3N0bmFtZW11bHRpcmVnaW9uc2VydmljZV9BY3RfZjFiOTZhMjc=?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/bXVsdGlob3N0bmFtZW11bHRpcmVnaW9uc2VydmljZV9BY3RfZjFiOTZhMjc=?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateMultiRegionServiceWithCustomHostname" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateService.json new file mode 100644 index 0000000000..b391d4ccaf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateService.json @@ -0,0 +1,143 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "location": "South Central US", + "properties": { + "publisherEmail": "foo@contoso.com", + "publisherName": "foo" + }, + "sku": { + "name": "Developer", + "capacity": 1 + }, + "tags": { + "Name": "Contoso", + "Test": "User" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAp3T4=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "South Central US", + "properties": { + "apiVersionConstraint": {}, + "createdAtUtc": "2019-12-18T06:10:56.0327105Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-southcentralus-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "23.102.171.124" + ], + "publisherEmail": "foo@contoso.com", + "publisherName": "foo", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Developer", + "capacity": 1 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "Name": "Contoso", + "Test": "User" + } + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAp3P0=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "South Central US", + "properties": { + "apiVersionConstraint": {}, + "createdAtUtc": "2019-12-18T06:10:56.0327105Z", + "disableGateway": false, + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Created", + "publisherEmail": "foo@contoso.com", + "publisherName": "foo", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Developer", + "capacity": 1 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "Name": "Contoso", + "Test": "User" + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/c2RrdGVzdGFwaW0xNTkxX0FjdF9jZTkyMmNmOQ==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateService" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceHavingMsi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceHavingMsi.json new file mode 100644 index 0000000000..55af44d10e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceHavingMsi.json @@ -0,0 +1,139 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAAWiU=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "SystemAssigned", + "principalId": "dfb9a757-df69-4966-a8d0-711a9cd8ffb4", + "tenantId": "XXXXXX-86f1-41af-91ab-2d7cd011db47" + }, + "location": "West US", + "properties": { + "createdAtUtc": "2019-04-11T16:29:29.9711098Z", + "enableClientCertificate": false, + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "mtv1", + "provisioningState": "Succeeded", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAAWiE=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "SystemAssigned", + "principalId": "dfb9a757-df69-4966-a8d0-711a9cd8ffb4", + "tenantId": "XXXXXX-86f1-41af-91ab-2d7cd011db47" + }, + "location": "West US", + "properties": { + "createdAtUtc": "2019-04-11T16:29:29.9711098Z", + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Created", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateServiceHavingMsi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIp.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIp.json new file mode 100644 index 0000000000..e37570d558 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIp.json @@ -0,0 +1,171 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "location": "East US 2 EUAP", + "properties": { + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant" + }, + "virtualNetworkType": "External" + }, + "sku": { + "name": "Premium", + "capacity": 2 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + }, + "zones": [ + "1", + "2" + ] + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAGTAs=", + "id": "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.ApiManagement/service/apimService1", + "location": "East US 2 EUAP", + "properties": { + "createdAtUtc": "2021-02-22T06:53:46.6409875Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-eastus2euap-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "20.47.137.XXX" + ], + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant" + }, + "virtualNetworkType": "External" + }, + "sku": { + "name": "Premium", + "capacity": 2 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + }, + "zones": [ + "1", + "2" + ] + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAiXto=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "East US 2 EUAP", + "properties": { + "createdAtUtc": "2020-07-28T23:18:14.6562474Z", + "disableGateway": false, + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "provisioningState": "Created", + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "Activating", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant" + }, + "virtualNetworkType": "External" + }, + "sku": { + "name": "Premium", + "capacity": 2 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + }, + "zones": [ + "1", + "2" + ] + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateServiceInVnetWithPublicIP" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInZones.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInZones.json new file mode 100644 index 0000000000..d65df2a42a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInZones.json @@ -0,0 +1,158 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "location": "North europe", + "properties": { + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk" + }, + "sku": { + "name": "Premium", + "capacity": 2 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + }, + "zones": [ + "1", + "2" + ] + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAiXvE=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "North Europe", + "properties": { + "createdAtUtc": "2020-07-28T23:18:14.6562474Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-northeurope-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "20.54.34.66" + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 2 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + }, + "zones": [ + "1", + "2" + ] + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAiXto=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "North Europe", + "properties": { + "createdAtUtc": "2020-07-28T23:18:14.6562474Z", + "disableGateway": false, + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "provisioningState": "Created", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 2 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + }, + "zones": [ + "1", + "2" + ] + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateServiceInZones" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKeyVault.json new file mode 100644 index 0000000000..63eaf3eccc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKeyVault.json @@ -0,0 +1,284 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} + } + }, + "location": "North Europe", + "properties": { + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "gateway1.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + }, + { + "type": "Management", + "hostName": "mgmt.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + }, + { + "type": "Portal", + "hostName": "portal1.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + } + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAigjU=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "UserAssigned", + "tenantId": "f686d426-8d16-xxxx-xxxx-ab578e110ccd", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": { + "clientId": "329419bc-adec-4dce-9568-25a6d486e468", + "principalId": "15e769b2-xxxx-xxxx-xxxx-3fd9a923ac3a" + } + } + }, + "location": "North Europe", + "properties": { + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "createdAtUtc": "2020-09-13T22:30:20.7759747Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-northeurope-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2037-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "EA276907917CB5XXXXXXXXXXX690" + }, + "certificateSource": "KeyVault", + "defaultSslBinding": true, + "hostName": "gateway1.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2037-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "EA276907917CB5XXXXXXXXXXX690" + }, + "certificateSource": "KeyVault", + "defaultSslBinding": false, + "hostName": "mgmt.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + "negotiateClientCertificate": false + }, + { + "type": "Portal", + "certificate": { + "expiry": "2037-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "EA276907917CB5XXXXXXXXXXX690" + }, + "certificateSource": "KeyVault", + "defaultSslBinding": false, + "hostName": "portal1.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "40.112.74.192" + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAigi8=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} + } + }, + "location": "North Europe", + "properties": { + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "createdAtUtc": "2020-09-13T22:30:20.7759747Z", + "disableGateway": false, + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2037-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "EA276907917CB5XXXXXXXXXXX690" + }, + "certificateSource": "KeyVault", + "defaultSslBinding": true, + "hostName": "gateway1.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2037-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "EA276907917CB5XXXXXXXXXXX690" + }, + "certificateSource": "KeyVault", + "defaultSslBinding": false, + "hostName": "mgmt.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + "negotiateClientCertificate": false + }, + { + "type": "Portal", + "certificate": { + "expiry": "2037-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "EA276907917CB5XXXXXXXXXXX690" + }, + "certificateSource": "KeyVault", + "defaultSslBinding": false, + "hostName": "portal1.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "provisioningState": "Created", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/bXVsdGlob3N0bmFtZW11bHRpcmVnaW9uc2VydmljZV9BY3RfZjFiOTZhMjc=?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/bXVsdGlob3N0bmFtZW11bHRpcmVnaW9uc2VydmljZV9BY3RfZjFiOTZhMjc=?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateServiceWithCustomHostnameKeyVault" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificates.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificates.json new file mode 100644 index 0000000000..00268085b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificates.json @@ -0,0 +1,175 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "location": "Central US", + "properties": { + "certificates": [ + { + "certificatePassword": "Password", + "encodedCertificate": "*******Base64 encoded Certificate******************", + "storeName": "CertificateAuthority" + } + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk" + }, + "sku": { + "name": "Basic", + "capacity": 1 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAp3UM=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "Central US", + "properties": { + "apiVersionConstraint": {}, + "certificates": [ + { + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989652CABCF585ACBFCB9C2C91F1D174FDB3A2" + }, + "storeName": "CertificateAuthority" + } + ], + "createdAtUtc": "2019-12-18T06:33:28.0906918Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-centralus-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "40.113.223.117" + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Basic", + "capacity": 1 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAp3TM=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "Central US", + "properties": { + "apiVersionConstraint": {}, + "certificates": [ + { + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989652CABCF585ACBFCB9C2C91F1D174FDB3A2" + }, + "storeName": "CertificateAuthority" + } + ], + "createdAtUtc": "2019-12-18T06:33:28.0906918Z", + "disableGateway": false, + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "provisioningState": "Created", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Basic", + "capacity": 1 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/bXVsdGlob3N0bmFtZW11bHRpcmVnaW9uc2VydmljZV9BY3RfZjFiOTZhMjc=?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/bXVsdGlob3N0bmFtZW11bHRpcmVnaW9uc2VydmljZV9BY3RfZjFiOTZhMjc=?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateServiceWithSystemCertificates" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdentity.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdentity.json new file mode 100644 index 0000000000..b4b01b1135 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdentity.json @@ -0,0 +1,158 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": {} + } + }, + "location": "West US", + "properties": { + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAFzyk=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "UserAssigned", + "tenantId": "XXXXX-86f1-41af-XXXX-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": { + "clientId": "5a2c6b8e-0905-XXXX-a772-993c9418137f", + "principalId": "XXXXX-6e62-4649-9f54-a119fc1ba85e" + } + } + }, + "location": "West US", + "properties": { + "createdAtUtc": "2020-03-12T01:05:33.4573398Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "disableGateway": false, + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "mtv1", + "provisioningState": "Succeeded", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAFzyQ=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": {} + } + }, + "location": "West US", + "properties": { + "createdAtUtc": "2020-03-12T01:05:33.4573398Z", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "mtv1", + "provisioningState": "Created", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateServiceWithUserAssignedIdentity" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementUndelete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementUndelete.json new file mode 100644 index 0000000000..d8618c01ee --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementUndelete.json @@ -0,0 +1,115 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "location": "South Central US", + "properties": { + "publisherEmail": "foo@contoso.com", + "publisherName": "foo", + "restore": true + }, + "sku": { + "name": "Developer", + "capacity": 1 + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAp3T4=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "South Central US", + "properties": { + "apiVersionConstraint": {}, + "createdAtUtc": "2019-12-18T06:10:56.0327105Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-southcentralus-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "23.102.171.124" + ], + "publisherEmail": "foo@contoso.com", + "publisherName": "foo", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Developer", + "capacity": 1 + } + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAp3P0=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "South Central US", + "properties": { + "apiVersionConstraint": {}, + "createdAtUtc": "2019-12-18T06:10:56.0327105Z", + "disableGateway": false, + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Created", + "publisherEmail": "foo@contoso.com", + "publisherName": "foo", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Developer", + "capacity": 1 + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/c2RrdGVzdGFwaW0xNTkxX0FjdF9jZTkyMmNmOQ==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementUndelete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Delete.json new file mode 100644 index 0000000000..fa7b3b728c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Delete.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "202": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAFfhHY=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "createdAtUtc": "2016-12-20T19:41:21.5823069Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "True" + }, + "gatewayRegionalUrl": "https://apimService1-westus-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "40.XX.XXX.168" + ], + "publisherEmail": "contoso@live.com", + "publisherName": "Microsoft", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "Deleting", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/BlockVNETSamir/subnets/default" + }, + "virtualNetworkType": "External" + }, + "sku": { + "name": "Developer", + "capacity": 1 + }, + "tags": {} + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/TGV2eTExMDZtMDJfVGVybV9jMmZlY2QwMA==?api-version=2021-08-01" + } + }, + "204": {} + }, + "operationId": "ApiManagementService_Delete", + "title": "ApiManagementServiceDeleteService" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_GetSsoToken.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_GetSsoToken.json new file mode 100644 index 0000000000..395e7e1ebb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_GetSsoToken.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "redirectUri": "https://apimService1.portal.azure-api.net:443/signin-sso?token=1%26201705301929%26eIkr3%2fnfaLs1GVJ0OVbzkJjAcwPFkEZAPM8VUXvXPf7cJ6lWsB9oUwsk2zln9x0KLkn21txCPJWWheSPq7SNeA%3d%3d" + } + } + }, + "operationId": "ApiManagementService_GetSsoToken", + "title": "ApiManagementServiceGetSsoToken" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetMultiRegionInternalVnet.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetMultiRegionInternalVnet.json new file mode 100644 index 0000000000..19b8c40720 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetMultiRegionInternalVnet.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimservice1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAADqC0c=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimservice1", + "location": "West US", + "properties": { + "additionalLocations": [ + { + "disableGateway": false, + "gatewayRegionalUrl": "https://apimservice1-westus2-01.regional.azure-api.net", + "location": "West US 2", + "privateIPAddresses": [ + "10.0.X.6" + ], + "publicIPAddresses": [ + "40.XXX.79.187" + ], + "sku": { + "name": "Premium", + "capacity": 1 + }, + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/APIMVNet/subnets/apim-internal-sub" + } + } + ], + "apiVersionConstraint": {}, + "createdAtUtc": "2019-12-02T01:42:09.1268424Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "True" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimservice1-westus-01.regional.azure-api.net", + "gatewayUrl": "https://apimservice1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2019-08-16T16:51:34+00:00", + "subject": "CN=*.preview.net", + "thumbprint": "B4330123DBAXXXXXXXXX1F35E84493476" + }, + "certificateSource": "Custom", + "defaultSslBinding": true, + "hostName": "apimgatewaytest.preview.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimservice1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimservice1.portal.azure-api.net", + "privateIPAddresses": [ + "172.XX.0.5" + ], + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "137.XXX.11.74" + ], + "publisherEmail": "abcs@contoso.com", + "publisherName": "contoso publisher", + "scmUrl": "https://apimservice1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apim-appGateway-vnet/subnets/apim-subnet" + }, + "virtualNetworkType": "Internal" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": {} + } + } + }, + "operationId": "ApiManagementService_Get", + "title": "ApiManagementServiceGetMultiRegionInternalVnet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetService.json new file mode 100644 index 0000000000..6d6d91f971 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetService.json @@ -0,0 +1,168 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "OGF-Z3-06162021-Premium", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWN/4=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/OGF-Z3-06162021-Premium", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "306205e7-b21a-41bf-92e2-3e28af30041e", + "tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ogf-identity": { + "clientId": "8d9791f2-0cdf-41f4-9e66-cdc39b496789", + "principalId": "713784d2-ee37-412a-95f0-3768f397f82d" + } + } + }, + "location": "East US", + "properties": { + "additionalLocations": [ + { + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-premium-eastus2-01.regional.azure-api.net", + "location": "East US 2", + "platformVersion": "stv2", + "publicIPAddresses": [ + "40.70.24.106" + ], + "sku": { + "name": "Premium", + "capacity": 1 + }, + "zones": [] + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-12-01" + }, + "certificates": [], + "createdAtUtc": "2021-06-16T09:40:00.9453556Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "false" + }, + "developerPortalUrl": "https://ogf-z3-06162021-premium.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-premium-eastus-01.regional.azure-api.net", + "gatewayUrl": "https://ogf-z3-06162021-premium.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "ogf-z3-06162021-premium.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286XXXXXXXX58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": true, + "hostName": "gateway.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault.azure.net/secrets/current-ssl", + "negotiateClientCertificate": true + }, + { + "type": "DeveloperPortal", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286XXXXXXXX58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": false, + "hostName": "developer.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault.azure.net/secrets/current-ssl", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286XXXXXXXX58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": false, + "hostName": "mgmt.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault.azure.net/secrets/current-ssl", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://ogf-z3-06162021-premium.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "portalUrl": "https://ogf-z3-06162021-premium.portal.azure-api.net", + "privateEndpointConnections": [ + { + "name": "privateEndpointProxyName", + "type": "Microsoft.ApiManagement/service/privateEndpointConnections", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/privateEndpointProxyName", + "properties": { + "groupIds": [ + "Gateway" + ], + "privateEndpoint": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "Please approve my request, thanks", + "actionsRequired": "None", + "status": "Pending" + }, + "provisioningState": "Pending" + } + } + ], + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.92.130.49" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "string", + "publisherName": "Test Premium", + "scmUrl": "https://ogf-z3-06162021-premium.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "systemData": { + "createdAt": "2021-06-16T09:40:00.7106733Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2021-06-20T06:33:09.6159006Z", + "lastModifiedBy": "foo@contoso.com", + "lastModifiedByType": "User" + }, + "tags": { + "ReleaseName": "Z3", + "owner": "v-aswmoh" + } + } + } + }, + "operationId": "ApiManagementService_Get", + "title": "ApiManagementServiceGetService" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetServiceHavingMsi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetServiceHavingMsi.json new file mode 100644 index 0000000000..2e20702170 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetServiceHavingMsi.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAENfI=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "ca1d33f7-xxxx-42ec-xxxx-d526a1ee953a", + "tenantId": "72f988bf-xxxx-41af-xxxx-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": { + "clientId": "aaff9c7d-xxxx-4db2-xxxx-ab0e3e7806cf", + "principalId": "95194df2-9208-xxxx-xxxx-a10d2af9b5a3" + } + } + }, + "location": "West Europe", + "properties": { + "createdAtUtc": "2016-04-12T00:20:15.6018952Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "True" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-westeurope-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2020-12-18T11:11:47+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "9833D531D7A45XXXXXA85908BD3692E0BD3F" + }, + "certificateSource": "KeyVault", + "defaultSslBinding": true, + "hostName": "proxy.msitesting.net", + "keyVaultId": "https://samir-msi-keyvault.vault.azure.net/secrets/msicertificate", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.94.xxx.188" + ], + "publisherEmail": "foo@contoso.com", + "publisherName": "Contoso", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/dfVirtualNetwork/subnets/backendSubnet" + }, + "virtualNetworkType": "External" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": {} + } + } + }, + "operationId": "ApiManagementService_Get", + "title": "ApiManagementServiceGetServiceHavingMsi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_List.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_List.json new file mode 100644 index 0000000000..7b42ea0808 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_List.json @@ -0,0 +1,357 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "OGF-Z3-06162021-Premium", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWN/4=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/OGF-Z3-06162021-Premium", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "306205e7-b21a-41bf-92e2-3e28af30041e", + "tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ogf-identity": { + "clientId": "8d9791f2-0cdf-41f4-9e66-cdc39b496789", + "principalId": "713784d2-ee37-412a-95f0-3768f397f82d" + } + } + }, + "location": "East US", + "properties": { + "additionalLocations": [ + { + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-premium-eastus2-01.regional.azure-api.net", + "location": "East US 2", + "publicIPAddresses": [ + "40.70.24.106" + ], + "sku": { + "name": "Premium", + "capacity": 1 + }, + "zones": [] + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-12-01" + }, + "certificates": [], + "createdAtUtc": "2021-06-16T09:40:00.9453556Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "false" + }, + "developerPortalUrl": "https://ogf-z3-06162021-premium.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-premium-eastus-01.regional.azure-api.net", + "gatewayUrl": "https://ogf-z3-06162021-premium.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "ogf-z3-06162021-premium.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": true, + "hostName": "gateway.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl", + "negotiateClientCertificate": true + }, + { + "type": "DeveloperPortal", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": false, + "hostName": "developer.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": false, + "hostName": "mgmt.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://ogf-z3-06162021-premium.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://ogf-z3-06162021-premium.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.92.130.49" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "bar@contoso.com", + "publisherName": "Test Premium", + "scmUrl": "https://ogf-z3-06162021-premium.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "systemData": { + "createdAt": "2021-06-16T09:40:00.7106733Z", + "createdBy": "bar@contoso.com", + "createdByType": "User", + "lastModifiedAt": "2021-06-20T06:33:09.6159006Z", + "lastModifiedBy": "foo@contoso.com", + "lastModifiedByType": "User" + }, + "tags": { + "ReleaseName": "Z3", + "owner": "v-aswmoh" + } + }, + { + "name": "vvktestcons", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWKwo=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/vvktestcons", + "location": "East US", + "properties": { + "createdAtUtc": "2020-08-10T18:07:23.4565211Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "disableGateway": false, + "enableClientCertificate": false, + "gatewayUrl": "https://vvktestcons.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "vvktestcons.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisherEmail": "bar@contoso.com", + "publisherName": "vvktestcons", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "tags": { + "Owner": "vitaliik" + } + }, + { + "name": "OGF-Z3-06162021-Standard", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWF7M=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/OGF-Z3-06162021-Standard", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "347a5800-ca99-475a-9202-fe38ca79ee41", + "tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ogf-identity": { + "clientId": "8d9791f2-0cdf-41f4-9e66-cdc39b496789", + "principalId": "713784d2-ee37-412a-95f0-3768f397f82d" + } + } + }, + "location": "East US", + "properties": { + "apiVersionConstraint": { + "minApiVersion": "2019-12-01" + }, + "createdAtUtc": "2021-06-16T09:39:58.6555759Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": "true", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://ogf-z3-06162021-standard.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-standard-eastus-01.regional.azure-api.net", + "gatewayUrl": "https://ogf-z3-06162021-standard.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "ogf-z3-06162021-standard.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://ogf-z3-06162021-standard.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://ogf-z3-06162021-standard.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.82.208.32" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "bar@contoso.com", + "publisherName": "Test Standard", + "scmUrl": "https://ogf-z3-06162021-standard.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Standard", + "capacity": 2 + }, + "systemData": { + "createdAt": "2021-06-16T09:39:58.4591834Z", + "createdBy": "bar@contoso.com", + "createdByType": "User", + "lastModifiedAt": "2021-06-17T15:05:13.5494721Z", + "lastModifiedBy": "bar@contoso.com", + "lastModifiedByType": "User" + }, + "tags": {} + }, + { + "name": "ogf-dev-060921", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWEFg=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/ogf-dev-060921", + "identity": { + "type": "SystemAssigned", + "principalId": "c9bd4c05-205e-4431-b232-112cf2e9e0aa", + "tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd" + }, + "location": "East US", + "properties": { + "additionalLocations": [ + { + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-dev-060921-southcentralus-01.regional.azure-api.net", + "location": "South Central US", + "publicIPAddresses": [ + "13.84.208.29" + ], + "sku": { + "name": "Premium", + "capacity": 9 + }, + "zones": [] + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-12-01" + }, + "certificates": [ + { + "certificate": { + "expiry": "2021-11-25T22:51:47+00:00", + "subject": "CN=*.apim.net", + "thumbprint": "4E8234312EC69245D1AE296C4882D46FB84076A3" + }, + "storeName": "Root" + } + ], + "createdAtUtc": "2021-06-09T10:06:22.2133978Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "false" + }, + "developerPortalUrl": "https://ogf-dev-060921.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-dev-060921-eastus-01.regional.azure-api.net", + "gatewayUrl": "https://ogf-dev-060921.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "ogf-dev-060921.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://ogf-dev-060921.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://ogf-dev-060921.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "168.62.39.172" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "v-ssaiprasan@microsoft.com", + "publisherName": "TechM", + "scmUrl": "https://ogf-dev-060921.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 3 + }, + "systemData": { + "createdAt": "2021-06-09T10:06:21.7336597Z", + "createdBy": "v-ssaiprasan@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2021-06-10T14:27:05.546816Z", + "lastModifiedBy": "v-ssaiprasan@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + } + } + }, + "operationId": "ApiManagementService_List", + "title": "ApiManagementListServiceBySubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ListByResourceGroup.json new file mode 100644 index 0000000000..a1bbb3c903 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ListByResourceGroup.json @@ -0,0 +1,358 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "OGF-Z3-06162021-Premium", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWN/4=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/OGF-Z3-06162021-Premium", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "306205e7-b21a-41bf-92e2-3e28af30041e", + "tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ogf-identity": { + "clientId": "8d9791f2-0cdf-41f4-9e66-cdc39b496789", + "principalId": "713784d2-ee37-412a-95f0-3768f397f82d" + } + } + }, + "location": "East US", + "properties": { + "additionalLocations": [ + { + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-premium-eastus2-01.regional.azure-api.net", + "location": "East US 2", + "publicIPAddresses": [ + "40.70.24.106" + ], + "sku": { + "name": "Premium", + "capacity": 1 + }, + "zones": [] + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-12-01" + }, + "certificates": [], + "createdAtUtc": "2021-06-16T09:40:00.9453556Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "false" + }, + "developerPortalUrl": "https://ogf-z3-06162021-premium.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-premium-eastus-01.regional.azure-api.net", + "gatewayUrl": "https://ogf-z3-06162021-premium.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "ogf-z3-06162021-premium.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": true, + "hostName": "gateway.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl", + "negotiateClientCertificate": true + }, + { + "type": "DeveloperPortal", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": false, + "hostName": "developer.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": false, + "hostName": "mgmt.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://ogf-z3-06162021-premium.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://ogf-z3-06162021-premium.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.92.130.49" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "bar@contoso.com", + "publisherName": "Test Premium", + "scmUrl": "https://ogf-z3-06162021-premium.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "systemData": { + "createdAt": "2021-06-16T09:40:00.7106733Z", + "createdBy": "bar@contoso.com", + "createdByType": "User", + "lastModifiedAt": "2021-06-20T06:33:09.6159006Z", + "lastModifiedBy": "foo@contoso.com", + "lastModifiedByType": "User" + }, + "tags": { + "ReleaseName": "Z3", + "owner": "v-aswmoh" + } + }, + { + "name": "vvktestcons", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWKwo=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/vvktestcons", + "location": "East US", + "properties": { + "createdAtUtc": "2020-08-10T18:07:23.4565211Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "disableGateway": false, + "enableClientCertificate": false, + "gatewayUrl": "https://vvktestcons.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "vvktestcons.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisherEmail": "bar@contoso.com", + "publisherName": "vvktestcons", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "tags": { + "Owner": "vitaliik" + } + }, + { + "name": "OGF-Z3-06162021-Standard", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWF7M=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/OGF-Z3-06162021-Standard", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "347a5800-ca99-475a-9202-fe38ca79ee41", + "tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ogf-identity": { + "clientId": "8d9791f2-0cdf-41f4-9e66-cdc39b496789", + "principalId": "713784d2-ee37-412a-95f0-3768f397f82d" + } + } + }, + "location": "East US", + "properties": { + "apiVersionConstraint": { + "minApiVersion": "2019-12-01" + }, + "createdAtUtc": "2021-06-16T09:39:58.6555759Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": "true", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://ogf-z3-06162021-standard.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-standard-eastus-01.regional.azure-api.net", + "gatewayUrl": "https://ogf-z3-06162021-standard.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "ogf-z3-06162021-standard.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://ogf-z3-06162021-standard.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://ogf-z3-06162021-standard.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.82.208.32" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "bar@contoso.com", + "publisherName": "Test Standard", + "scmUrl": "https://ogf-z3-06162021-standard.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Standard", + "capacity": 2 + }, + "systemData": { + "createdAt": "2021-06-16T09:39:58.4591834Z", + "createdBy": "bar@contoso.com", + "createdByType": "User", + "lastModifiedAt": "2021-06-17T15:05:13.5494721Z", + "lastModifiedBy": "bar@contoso.com", + "lastModifiedByType": "User" + }, + "tags": {} + }, + { + "name": "ogf-dev-060921", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWEFg=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/ogf-dev-060921", + "identity": { + "type": "SystemAssigned", + "principalId": "c9bd4c05-205e-4431-b232-112cf2e9e0aa", + "tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd" + }, + "location": "East US", + "properties": { + "additionalLocations": [ + { + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-dev-060921-southcentralus-01.regional.azure-api.net", + "location": "South Central US", + "publicIPAddresses": [ + "13.84.208.29" + ], + "sku": { + "name": "Premium", + "capacity": 9 + }, + "zones": [] + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-12-01" + }, + "certificates": [ + { + "certificate": { + "expiry": "2021-11-25T22:51:47+00:00", + "subject": "CN=*.apim.net", + "thumbprint": "4E8234312EC69245D1AE296C4882D46FB84076A3" + }, + "storeName": "Root" + } + ], + "createdAtUtc": "2021-06-09T10:06:22.2133978Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "false" + }, + "developerPortalUrl": "https://ogf-dev-060921.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-dev-060921-eastus-01.regional.azure-api.net", + "gatewayUrl": "https://ogf-dev-060921.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "ogf-dev-060921.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://ogf-dev-060921.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://ogf-dev-060921.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "168.62.39.172" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "v-ssaiprasan@microsoft.com", + "publisherName": "TechM", + "scmUrl": "https://ogf-dev-060921.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 3 + }, + "systemData": { + "createdAt": "2021-06-09T10:06:21.7336597Z", + "createdBy": "v-ssaiprasan@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2021-06-10T14:27:05.546816Z", + "lastModifiedBy": "v-ssaiprasan@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + } + } + }, + "operationId": "ApiManagementService_ListByResourceGroup", + "title": "ApiManagementListServiceBySubscriptionAndResourceGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Restore.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Restore.json new file mode 100644 index 0000000000..470c309a73 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Restore.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "accessKey": "**************************************************", + "accessType": "AccessKey", + "backupName": "apimService1backup_2017_03_19", + "containerName": "backupContainer", + "storageAccount": "teststorageaccount" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAACXok=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "additionalLocations": [ + { + "disableGateway": true, + "gatewayRegionalUrl": "https://apimService1-eastus-01.regional.azure-api.net", + "location": "East US", + "publicIPAddresses": [ + "23.101.138.153" + ], + "sku": { + "name": "Premium", + "capacity": 1 + } + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "createdAtUtc": "2019-12-18T06:26:20.3348609Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-westus-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2" + }, + "defaultSslBinding": true, + "hostName": "gateway1.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "mgmt.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Portal", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "portal1.msitesting.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.91.32.113" + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_Restore", + "title": "ApiManagementRestoreService" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceDisableTls10.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceDisableTls10.json new file mode 100644 index 0000000000..a4e5bd501e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceDisableTls10.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAYRPs=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "createdAtUtc": "2017-06-29T17:50:42.3191122Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False" + }, + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "40.86.176.232" + ], + "publisherEmail": "admin@live.com", + "publisherName": "Contoso", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Standard", + "capacity": 1 + }, + "tags": { + "Owner": "sasolank", + "Pool": "Manual", + "Reserved": "", + "TestExpiration": "Thu, 29 Jun 2017 18:50:40 GMT", + "TestSuiteExpiration": "Thu, 29 Jun 2017 18:51:46 GMT", + "UID": "4f5025fe-0669-4e2e-8320-5199466e5eb3" + } + } + }, + "202": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAYRPs=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "createdAtUtc": "2017-06-29T17:50:42.3191122Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False" + }, + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "40.86.176.232" + ], + "publisherEmail": "admin@live.com", + "publisherName": "Contoso", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Standard", + "capacity": 1 + }, + "tags": { + "TestExpiration": "Thu, 29 Jun 2017 18:50:40 GMT" + } + } + }, + "operationId": "ApiManagementService_Update", + "title": "ApiManagementUpdateServiceDisableTls10" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServicePublisherDetails.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServicePublisherDetails.json new file mode 100644 index 0000000000..b14f4a7b14 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServicePublisherDetails.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "publisherEmail": "foobar@live.com", + "publisherName": "Contoso Vnext" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAYRPs=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "createdAtUtc": "2017-06-29T17:50:42.3191122Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False" + }, + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "40.86.176.232" + ], + "publisherEmail": "foobar@live.com", + "publisherName": "Contoso Vnext", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Standard", + "capacity": 1 + }, + "tags": { + "Owner": "sasolank", + "Pool": "Manual", + "Reserved": "", + "TestExpiration": "Thu, 29 Jun 2017 18:50:40 GMT", + "TestSuiteExpiration": "Thu, 29 Jun 2017 18:51:46 GMT", + "UID": "4f5025fe-0669-4e2e-8320-5199466e5eb3" + } + } + }, + "202": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAYRPs=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "createdAtUtc": "2017-06-29T17:50:42.3191122Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False" + }, + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "40.86.176.232" + ], + "publisherEmail": "admin@live.com", + "publisherName": "Contoso", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Standard", + "capacity": 1 + }, + "tags": { + "TestExpiration": "Thu, 29 Jun 2017 18:50:40 GMT" + } + } + }, + "operationId": "ApiManagementService_Update", + "title": "ApiManagementUpdateServicePublisherDetails" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones.json new file mode 100644 index 0000000000..7f18fecb71 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones.json @@ -0,0 +1,163 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "additionalLocations": [ + { + "location": "Australia East", + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", + "sku": { + "name": "Premium", + "capacity": 3 + }, + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default" + }, + "zones": [ + "1", + "2", + "3" + ] + } + ], + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2" + }, + "virtualNetworkType": "External" + }, + "sku": { + "name": "Premium", + "capacity": 3 + }, + "zones": [ + "1", + "2", + "3" + ] + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWBIU=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "Japan East", + "properties": { + "additionalLocations": [ + { + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-australiaeast-01.regional.azure-api.net", + "location": "Australia East", + "platformVersion": "stv2", + "publicIPAddresses": [ + "20.213.1.35" + ], + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", + "sku": { + "name": "Premium", + "capacity": 3 + }, + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default" + }, + "zones": [ + "1", + "2", + "3" + ] + } + ], + "createdAtUtc": "2021-04-08T23:41:35.6447381Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_GCM_SHA256": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_256_CBC_SHA": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_256_CBC_SHA256": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "false" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-japaneast-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2022-06-09T23:59:59+00:00", + "subject": "CN=mycustomdomain.int-azure-api.net", + "thumbprint": "2994B5FFB8F76B3C687D324A8DEE0432C1ED18CD" + }, + "certificateSource": "Managed", + "defaultSslBinding": true, + "hostName": "mycustomdomain.int-azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "20.78.248.217" + ], + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", + "publicNetworkAccess": "Enabled", + "publisherEmail": "contoso@microsoft.com", + "publisherName": "apimPublisher", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2" + }, + "virtualNetworkType": "Internal" + }, + "sku": { + "name": "Premium", + "capacity": 3 + }, + "systemData": { + "lastModifiedAt": "2022-01-21T20:04:21.6108974Z", + "lastModifiedBy": "contoso@microsoft.com", + "lastModifiedByType": "User" + }, + "zones": [ + "1", + "2", + "3" + ] + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/TGV2eTExMDZtMDJfVGVybV9jMmZlY2QwMA==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_Update", + "title": "ApiManagementUpdateServiceToNewVnetAndAvailabilityZones" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_CreateOrUpdate.json new file mode 100644 index 0000000000..1bec4433b2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_CreateOrUpdate.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "operationId": "5600b57e7e8880006a080001", + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "5600b57e7e8880006a040001", + "parameters": { + "properties": { + "format": "xml", + "value": " " + } + }, + "policyId": "policy", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "policy", + "type": "Microsoft.ApiManagement/service/apis/operations/policies", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b57e7e8880006a040001/operations/5600b57e7e8880006a080001/policies/policy", + "properties": { + "value": "\r\n \r\n \r\n \r\n \r\n \r\n" + } + } + }, + "201": { + "body": { + "name": "policy", + "type": "Microsoft.ApiManagement/service/apis/operations/policies", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b57e7e8880006a040001/operations/5600b57e7e8880006a080001/policies/policy", + "properties": { + "value": "\r\n \r\n \r\n \r\n \r\n \r\n" + } + } + } + }, + "operationId": "ApiOperationPolicy_CreateOrUpdate", + "title": "ApiManagementCreateApiOperationPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Delete.json new file mode 100644 index 0000000000..374949375f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Delete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "operationId": "testoperation", + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "testapi", + "policyId": "policy", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiOperationPolicy_Delete", + "title": "ApiManagementDeleteApiOperationPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Get.json new file mode 100644 index 0000000000..167d1075af --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Get.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "operationId": "5600b53ac53f5b0062080006", + "api-version": "2021-08-01", + "apiId": "5600b539c53f5b0062040001", + "policyId": "policy", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "policy", + "type": "Microsoft.ApiManagement/service/apis/operations/policies", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b539c53f5b0062040001/operations/5600b53ac53f5b0062080006/policies/policy", + "properties": { + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n This is a sample\r\n \r\n \r\n \r\n \r\n" + } + } + } + }, + "operationId": "ApiOperationPolicy_Get", + "title": "ApiManagementGetApiOperationPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_GetEntityTag.json new file mode 100644 index 0000000000..e376a52d6d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_GetEntityTag.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "operationId": "5600b53ac53f5b0062080006", + "api-version": "2021-08-01", + "apiId": "5600b539c53f5b0062040001", + "policyId": "policy", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiOperationPolicy_GetEntityTag", + "title": "ApiManagementHeadApiOperationPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_ListByOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_ListByOperation.json new file mode 100644 index 0000000000..c383688191 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_ListByOperation.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "operationId": "599e29ab193c3c0bd0b3e2fb", + "api-version": "2021-08-01", + "apiId": "599e2953193c3c0bd0b3e2fa", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "policy", + "type": "Microsoft.ApiManagement/service/apis/operations/policies", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/599e2953193c3c0bd0b3e2fa/operations/599e29ab193c3c0bd0b3e2fb/policies/policy", + "properties": { + "value": "\r\n\r\n \r\n \r\n \r\n \r\n xxx\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + ] + } + } + }, + "operationId": "ApiOperationPolicy_ListByOperation", + "title": "ApiManagementListApiOperationPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_CreateOrUpdate.json new file mode 100644 index 0000000000..c988ac7096 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_CreateOrUpdate.json @@ -0,0 +1,132 @@ +{ + "parameters": { + "operationId": "newoperations", + "api-version": "2021-08-01", + "apiId": "PetStoreTemplate2", + "parameters": { + "properties": { + "method": "POST", + "description": "This can only be done by the logged in user.", + "displayName": "createUser2", + "templateParameters": [], + "urlTemplate": "/user1", + "request": { + "description": "Created user object", + "headers": [], + "queryParameters": [], + "representations": [ + { + "contentType": "application/json", + "schemaId": "592f6c1d0af5840ca8897f0c", + "typeName": "User" + } + ] + }, + "responses": [ + { + "description": "successful operation", + "headers": [], + "representations": [ + { + "contentType": "application/xml" + }, + { + "contentType": "application/json" + } + ], + "statusCode": 200 + } + ] + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "newoperations", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/PetStoreTemplate2/operations/newoperations", + "properties": { + "method": "POST", + "description": "This can only be done by the logged in user.", + "displayName": "createUser2", + "templateParameters": [], + "urlTemplate": "/user1", + "request": { + "description": "Created user object", + "headers": [], + "queryParameters": [], + "representations": [ + { + "contentType": "application/json", + "schemaId": "592f6c1d0af5840ca8897f0c", + "typeName": "User" + } + ] + }, + "responses": [ + { + "description": "successful operation", + "headers": [], + "representations": [ + { + "contentType": "application/xml" + }, + { + "contentType": "application/json" + } + ], + "statusCode": 200 + } + ] + } + } + }, + "201": { + "body": { + "name": "newoperations", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/PetStoreTemplate2/operations/newoperations", + "properties": { + "method": "POST", + "description": "This can only be done by the logged in user.", + "displayName": "createUser2", + "templateParameters": [], + "urlTemplate": "/user1", + "request": { + "description": "Created user object", + "headers": [], + "queryParameters": [], + "representations": [ + { + "contentType": "application/json", + "schemaId": "592f6c1d0af5840ca8897f0c", + "typeName": "User" + } + ] + }, + "responses": [ + { + "description": "successful operation", + "headers": [], + "representations": [ + { + "contentType": "application/xml" + }, + { + "contentType": "application/json" + } + ], + "statusCode": 200 + } + ] + } + } + } + }, + "operationId": "ApiOperation_CreateOrUpdate", + "title": "ApiManagementCreateApiOperation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Delete.json new file mode 100644 index 0000000000..028f08bfb9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "operationId": "57d2ef278aa04f0ad01d6cdc", + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiOperation_Delete", + "title": "ApiManagementDeleteApiOperation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_GetEntityTag.json new file mode 100644 index 0000000000..d2b9165e00 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "operationId": "57d2ef278aa04f0ad01d6cdc", + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiOperation_GetEntityTag", + "title": "ApiManagementHeadApiOperation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperation.json new file mode 100644 index 0000000000..4492d1ff29 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperation.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "operationId": "57d2ef278aa04f0ad01d6cdc", + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc", + "properties": { + "method": "POST", + "displayName": "CancelOrder", + "templateParameters": [], + "urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/CancelOrder", + "request": { + "description": "IFazioService_CancelOrder_InputMessage", + "headers": [], + "queryParameters": [], + "representations": [ + { + "contentType": "text/xml", + "schemaId": "6980a395-f08b-4a59-8295-1440cbd909b8", + "typeName": "CancelOrder" + } + ] + }, + "responses": [ + { + "description": "IFazioService_CancelOrder_OutputMessage", + "headers": [], + "representations": [ + { + "contentType": "text/xml", + "schemaId": "6980a395-f08b-4a59-8295-1440cbd909b8", + "typeName": "CancelOrderResponse" + } + ], + "statusCode": 200 + } + ] + } + } + } + }, + "operationId": "ApiOperation_Get", + "title": "ApiManagementGetApiOperation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperationPetStore.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperationPetStore.json new file mode 100644 index 0000000000..c388029633 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperationPetStore.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "operationId": "loginUser", + "api-version": "2021-08-01", + "apiId": "swagger-petstore", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "loginUser", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/swagger-petstore/operations/loginUser", + "properties": { + "method": "GET", + "description": "", + "displayName": "Logs user into the system", + "templateParameters": [ + { + "name": "username", + "type": "string", + "description": "The user name for login", + "required": true, + "values": [] + }, + { + "name": "password", + "type": "string", + "description": "The password for login in clear text", + "required": true, + "values": [] + } + ], + "urlTemplate": "/user/login?username={username}&password={password}", + "request": { + "headers": [], + "queryParameters": [], + "representations": [] + }, + "responses": [ + { + "description": "successful operation", + "headers": [ + { + "name": "X-Rate-Limit", + "type": "integer", + "description": "calls per hour allowed by the user", + "values": [] + }, + { + "name": "X-Expires-After", + "type": "string", + "description": "date in UTC when token expires", + "values": [] + } + ], + "representations": [ + { + "contentType": "application/xml", + "schemaId": "5ba91a35f373b513a0bf31c6", + "typeName": "UserLoginGet200ApplicationXmlResponse" + }, + { + "contentType": "application/json", + "schemaId": "5ba91a35f373b513a0bf31c6", + "typeName": "UserLoginGet200ApplicationJsonResponse" + } + ], + "statusCode": 200 + }, + { + "description": "Invalid username/password supplied", + "headers": [], + "representations": [ + { + "contentType": "application/xml" + }, + { + "contentType": "application/json" + } + ], + "statusCode": 400 + } + ] + } + } + } + }, + "operationId": "ApiOperation_Get", + "title": "ApiManagementGetApiOperationPetStore" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_ListByApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_ListByApi.json new file mode 100644 index 0000000000..e2a89d2e81 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_ListByApi.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "operationId": "57d2ef278aa04f0ad01d6cdc", + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 5, + "nextLink": "", + "value": [ + { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc", + "properties": { + "method": "POST", + "displayName": "CancelOrder", + "urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/CancelOrder" + } + }, + { + "name": "57d2ef278aa04f0ad01d6cda", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cda", + "properties": { + "method": "POST", + "displayName": "GetMostRecentOrder", + "urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/GetMostRecentOrder" + } + }, + { + "name": "57d2ef278aa04f0ad01d6cd9", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cd9", + "properties": { + "method": "POST", + "displayName": "GetOpenOrders", + "urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/GetOpenOrders" + } + }, + { + "name": "57d2ef278aa04f0ad01d6cdb", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdb", + "properties": { + "method": "POST", + "displayName": "GetOrder", + "urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/GetOrder" + } + }, + { + "name": "57d2ef278aa04f0ad01d6cd8", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cd8", + "properties": { + "method": "POST", + "displayName": "submitOrder", + "urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/submitOrder" + } + } + ] + } + } + }, + "operationId": "ApiOperation_ListByApi", + "title": "ApiManagementListApiOperations" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Update.json new file mode 100644 index 0000000000..daa971f465 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Update.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "operationId": "operationId", + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "echo-api", + "parameters": { + "properties": { + "method": "GET", + "displayName": "Retrieve resource", + "templateParameters": [], + "urlTemplate": "/resource", + "request": { + "queryParameters": [ + { + "name": "param1", + "type": "string", + "description": "A sample parameter that is required and has a default value of \"sample\".", + "defaultValue": "sample", + "required": true, + "values": [ + "sample" + ] + } + ] + }, + "responses": [ + { + "description": "Returned in all cases.", + "headers": [], + "representations": [], + "statusCode": 200 + }, + { + "description": "Server Error.", + "headers": [], + "representations": [], + "statusCode": 500 + } + ] + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc", + "properties": { + "method": "POST", + "displayName": "CancelOrder", + "templateParameters": [], + "urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/CancelOrder", + "request": { + "description": "IFazioService_CancelOrder_InputMessage", + "headers": [], + "queryParameters": [], + "representations": [ + { + "contentType": "text/xml", + "schemaId": "6980a395-f08b-4a59-8295-1440cbd909b8", + "typeName": "CancelOrder" + } + ] + }, + "responses": [ + { + "description": "IFazioService_CancelOrder_OutputMessage", + "headers": [], + "representations": [ + { + "contentType": "text/xml", + "schemaId": "6980a395-f08b-4a59-8295-1440cbd909b8", + "typeName": "CancelOrderResponse" + } + ], + "statusCode": 200 + } + ] + } + } + } + }, + "operationId": "ApiOperation_Update", + "title": "ApiManagementUpdateApiOperation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiProduct_ListByApis.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiProduct_ListByApis.json new file mode 100644 index 0000000000..fb304a3073 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiProduct_ListByApis.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "5600b539c53f5b0062060002", + "type": "Microsoft.ApiManagement/service/apis/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b539c53f5b0062060002", + "properties": { + "description": "Subscribers have completely unlimited access to the API. Administrator approval is required.", + "approvalRequired": true, + "displayName": "Unlimited", + "state": "published", + "subscriptionRequired": true, + "subscriptionsLimit": 1 + } + } + ] + } + } + }, + "operationId": "ApiProduct_ListByApis", + "title": "ApiManagementListApiProducts" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_CreateOrUpdate.json new file mode 100644 index 0000000000..c5e116d0b8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_CreateOrUpdate.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "a1", + "parameters": { + "properties": { + "apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + "notes": "yahooagain" + } + }, + "releaseId": "testrev", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testrev", + "type": "Microsoft.ApiManagement/service/apis/releases", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/testrev", + "properties": { + "apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + "createdDateTime": "2018-02-08T20:52:00.65Z", + "notes": "yahooagain", + "updatedDateTime": "2018-02-08T20:52:00.65Z" + } + } + }, + "201": { + "body": { + "name": "testrev", + "type": "Microsoft.ApiManagement/service/apis/releases", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/testrev", + "properties": { + "apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + "createdDateTime": "2018-02-08T20:52:00.65Z", + "notes": "yahooagain", + "updatedDateTime": "2018-02-08T20:52:00.65Z" + } + } + } + }, + "operationId": "ApiRelease_CreateOrUpdate", + "title": "ApiManagementCreateApiRelease" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Delete.json new file mode 100644 index 0000000000..8e07af09ba --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "5a5fcc09124a7fa9b89f2f1d", + "releaseId": "testrev", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiRelease_Delete", + "title": "ApiManagementDeleteApiRelease" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Get.json new file mode 100644 index 0000000000..9d998d7cfa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "a1", + "releaseId": "5a7cb545298324c53224a799", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "5a7cb545298324c53224a799", + "type": "Microsoft.ApiManagement/service/apis/releases", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/5a7cb545298324c53224a799", + "properties": { + "apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + "createdDateTime": "2018-02-08T20:38:29.173Z", + "notes": "yahoo", + "updatedDateTime": "2018-02-08T20:38:29.173Z" + } + } + } + }, + "operationId": "ApiRelease_Get", + "title": "ApiManagementGetApiRelease" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_GetEntityTag.json new file mode 100644 index 0000000000..4189157de2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "a1", + "releaseId": "5a7cb545298324c53224a799", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiRelease_GetEntityTag", + "title": "ApiManagementHeadApiRelease" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_ListByService.json new file mode 100644 index 0000000000..3e1767c8bc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_ListByService.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "a1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "5a7cb545298324c53224a799", + "type": "Microsoft.ApiManagement/service/apis/releases", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/5a7cb545298324c53224a799", + "properties": { + "createdDateTime": "2018-02-08T20:38:29.173Z", + "notes": "yahoo", + "updatedDateTime": "2018-02-08T20:38:29.173Z" + } + } + ] + } + } + }, + "operationId": "ApiRelease_ListByService", + "title": "ApiManagementListApiReleases" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Update.json new file mode 100644 index 0000000000..e8194601ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Update.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "a1", + "parameters": { + "properties": { + "apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + "notes": "yahooagain" + } + }, + "releaseId": "testrev", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testrev", + "type": "Microsoft.ApiManagement/service/apis/releases", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/testrev", + "properties": { + "apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + "createdDateTime": "2018-02-08T20:38:29.173Z", + "notes": "yahoo", + "updatedDateTime": "2018-02-08T20:38:29.173Z" + } + } + } + }, + "operationId": "ApiRelease_Update", + "title": "ApiManagementUpdateApiRelease" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRevision_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRevision_ListByService.json new file mode 100644 index 0000000000..870e1aa899 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRevision_ListByService.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1;rev=1", + "apiRevision": "1", + "createdDateTime": "2018-02-01T22:21:20.467Z", + "isCurrent": true, + "isOnline": true, + "updatedDateTime": "2018-02-01T22:21:20.467Z" + } + ] + } + } + }, + "operationId": "ApiRevision_ListByService", + "title": "ApiManagementListApiRevisions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_CreateOrUpdate.json new file mode 100644 index 0000000000..5e4b342cf7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_CreateOrUpdate.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "59d6bb8f1f7fab13dc67ec9b", + "parameters": { + "properties": { + "contentType": "application/vnd.ms-azure-apim.xsd+xml", + "document": { + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + }, + "resourceGroupName": "rg1", + "schemaId": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "type": "Microsoft.ApiManagement/service/apis/schemas", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/schemas/ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "properties": { + "contentType": "application/vnd.ms-azure-apim.xsd+xml", + "document": { + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + } + }, + "201": { + "body": { + "name": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "type": "Microsoft.ApiManagement/service/apis/schemas", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/schemas/ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "properties": { + "contentType": "application/vnd.ms-azure-apim.xsd+xml", + "document": { + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/schemas/ec12520d-9d48-4e7b-8f39-698ca2ac63f1?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "ApiSchema_CreateOrUpdate", + "title": "ApiManagementCreateApiSchema" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Delete.json new file mode 100644 index 0000000000..df88078b65 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "59d5b28d1f7fab116c282650", + "resourceGroupName": "rg1", + "schemaId": "59d5b28e1f7fab116402044e", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiSchema_Delete", + "title": "ApiManagementDeleteApiSchema" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Get.json new file mode 100644 index 0000000000..e52bcba3d7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "59d6bb8f1f7fab13dc67ec9b", + "resourceGroupName": "rg1", + "schemaId": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "type": "Microsoft.ApiManagement/service/apis/schemas", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/schemas/ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "properties": { + "contentType": "application/vnd.ms-azure-apim.xsd+xml", + "document": { + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + } + } + }, + "operationId": "ApiSchema_Get", + "title": "ApiManagementGetApiSchema" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_GetEntityTag.json new file mode 100644 index 0000000000..f522a1bb10 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "resourceGroupName": "rg1", + "schemaId": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiSchema_GetEntityTag", + "title": "ApiManagementHeadApiSchema" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_ListByApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_ListByApi.json new file mode 100644 index 0000000000..446317073d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_ListByApi.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "59d5b28d1f7fab116c282650", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "59d5b28e1f7fab116402044e", + "type": "Microsoft.ApiManagement/service/apis/schemas", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d5b28d1f7fab116c282650/schemas/59d5b28e1f7fab116402044e", + "properties": { + "contentType": "application/vnd.ms-azure-apim.swagger.definitions+json" + } + } + ] + } + } + }, + "operationId": "ApiSchema_ListByApi", + "title": "ApiManagementListApiSchemas" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_CreateOrUpdate.json new file mode 100644 index 0000000000..76abda526c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_CreateOrUpdate.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "5931a75ae4bbd512a88c680b", + "parameters": { + "properties": { + "description": "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", + "externalDocsDescription": "Description of the external docs resource", + "externalDocsUrl": "http://some.url/additionaldoc" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagDescriptionId": "tagId1" + }, + "responses": { + "200": { + "body": { + "name": "tagId1", + "type": "Microsoft.ApiManagement/service/apis/tagDescriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5931a75ae4bbd512a88c680b/tagDescriptions/tagId1", + "properties": { + "description": "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", + "displayName": "tag1", + "externalDocsDescription": "some additional info", + "externalDocsUrl": "http://some_url.com", + "tagId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1" + } + } + }, + "201": { + "body": { + "name": "tagId1", + "type": "Microsoft.ApiManagement/service/apis/tagDescriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5931a75ae4bbd512a88c680b/tagDescriptions/tagId1", + "properties": { + "description": "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", + "displayName": "tag1", + "externalDocsDescription": "some additional info", + "externalDocsUrl": "http://some_url.com", + "tagId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1" + } + } + } + }, + "operationId": "ApiTagDescription_CreateOrUpdate", + "title": "ApiManagementCreateApiTagDescription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Delete.json new file mode 100644 index 0000000000..81d5069af9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "59d5b28d1f7fab116c282650", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagDescriptionId": "59d5b28e1f7fab116402044e" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiTagDescription_Delete", + "title": "ApiManagementDeleteApiTagDescription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Get.json new file mode 100644 index 0000000000..97c616554d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Get.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "59d6bb8f1f7fab13dc67ec9b", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagDescriptionId": "59306a29e4bbd510dc24e5f9" + }, + "responses": { + "200": { + "body": { + "name": "59306a29e4bbd510dc24e5f9", + "type": "Microsoft.ApiManagement/service/apis/tagDescriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/tagDescriptions/59306a29e4bbd510dc24e5f9", + "properties": { + "description": null, + "displayName": "tag1", + "externalDocsDescription": "some additional info", + "externalDocsUrl": "http://some_url.com", + "tagId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/59306a29e4bbd510dc24e5f9" + } + } + } + }, + "operationId": "ApiTagDescription_Get", + "title": "ApiManagementGetApiTagDescription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_GetEntityTag.json new file mode 100644 index 0000000000..53ddf42710 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "59d6bb8f1f7fab13dc67ec9b", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagDescriptionId": "59306a29e4bbd510dc24e5f9" + }, + "responses": { + "200": { + "headers": { + "Etag": "AAAAAAAACCI=" + } + } + }, + "operationId": "ApiTagDescription_GetEntityTag", + "title": "ApiManagementHeadApiTagDescription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_ListByService.json new file mode 100644 index 0000000000..55ee3965ec --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_ListByService.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "5600b539c53f5b0062060002", + "type": "Microsoft.ApiManagement/service/tags", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tagDescriptions/5600b539c53f5b0062060002", + "properties": { + "displayName": "tag1", + "externalDocsDescription": "some additional info", + "externalDocsUrl": "http://some_url.com", + "tagId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/5600b539c53f5b0062060002" + } + } + ] + } + } + }, + "operationId": "ApiTagDescription_ListByService", + "title": "ApiManagementListApiTagDescriptions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_CreateOrUpdate.json new file mode 100644 index 0000000000..d44c54f15c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_CreateOrUpdate.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "description": "Version configuration", + "displayName": "api set 1", + "versioningScheme": "Segment" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "versionSetId": "api1" + }, + "responses": { + "200": { + "body": { + "name": "api1", + "type": "Microsoft.ApiManagement/service/api-version-sets", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/api1", + "properties": { + "description": "Version configuration", + "displayName": "api set 1", + "versioningScheme": "Segment" + } + } + }, + "201": { + "body": { + "name": "api1", + "type": "Microsoft.ApiManagement/service/api-version-sets", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/api1", + "properties": { + "description": "Version configuration", + "displayName": "api set 1", + "versioningScheme": "Segment" + } + } + } + }, + "operationId": "ApiVersionSet_CreateOrUpdate", + "title": "ApiManagementCreateApiVersionSet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Delete.json new file mode 100644 index 0000000000..69981c6d1e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "versionSetId": "a1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiVersionSet_Delete", + "title": "ApiManagementDeleteApiVersionSet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Get.json new file mode 100644 index 0000000000..96f2fde256 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Get.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "versionSetId": "vs1" + }, + "responses": { + "200": { + "body": { + "name": "vs1", + "type": "Microsoft.ApiManagement/service/api-version-sets", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/vs1", + "properties": { + "description": "Version configuration", + "displayName": "Version Set 1", + "versioningScheme": "Segment" + } + } + } + }, + "operationId": "ApiVersionSet_Get", + "title": "ApiManagementGetApiVersionSet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_GetEntityTag.json new file mode 100644 index 0000000000..be04f6b580 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "versionSetId": "vs1" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiVersionSet_GetEntityTag", + "title": "ApiManagementHeadApiVersionSet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_ListByService.json new file mode 100644 index 0000000000..f595224c42 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_ListByService.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "name": "vs1", + "type": "Microsoft.ApiManagement/service/api-version-sets", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/vs1", + "properties": { + "description": "Version configuration", + "displayName": "api set 1", + "versioningScheme": "Segment" + } + }, + { + "name": "vs2", + "type": "Microsoft.ApiManagement/service/api-version-sets", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/vs2", + "properties": { + "description": "Version configuration 2", + "displayName": "api set 2", + "versioningScheme": "Query" + } + } + ] + } + } + }, + "operationId": "ApiVersionSet_ListByService", + "title": "ApiManagementListApiVersionSets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Update.json new file mode 100644 index 0000000000..7a04f17fb0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Update.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "description": "Version configuration", + "displayName": "api set 1", + "versioningScheme": "Segment" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "versionSetId": "vs1" + }, + "responses": { + "200": { + "body": { + "name": "vs1", + "type": "Microsoft.ApiManagement/service/api-version-sets", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/vs1", + "properties": { + "description": "Version configuration", + "displayName": "api set 1", + "versioningScheme": "Segment" + } + } + } + }, + "operationId": "ApiVersionSet_Update", + "title": "ApiManagementUpdateApiVersionSet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApi.json new file mode 100644 index 0000000000..53f8921386 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApi.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "tempgroup", + "parameters": { + "properties": { + "path": "newapiPath", + "description": "apidescription5200", + "authenticationSettings": { + "oAuth2": { + "authorizationServerId": "authorizationServerId2283", + "scope": "oauth2scope2580" + } + }, + "displayName": "apiname1463", + "protocols": [ + "https", + "http" + ], + "serviceUrl": "http://newechoapi.cloudapp.net/api", + "subscriptionKeyParameterNames": { + "header": "header4520", + "query": "query3037" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apiid9419", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419", + "properties": { + "path": "newapiPath", + "description": "apidescription5200", + "apiRevision": "1", + "authenticationSettings": { + "oAuth2": { + "authorizationServerId": "authorizationServerId2283", + "scope": "oauth2scope2580" + } + }, + "displayName": "apiname1463", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://newechoapi.cloudapp.net/api", + "subscriptionKeyParameterNames": { + "header": "header4520", + "query": "query3037" + } + } + } + }, + "201": { + "body": { + "name": "apiid9419", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419", + "properties": { + "path": "newapiPath", + "description": "apidescription5200", + "apiRevision": "1", + "authenticationSettings": { + "oAuth2": { + "authorizationServerId": "authorizationServerId2283", + "scope": "oauth2scope2580" + } + }, + "displayName": "apiname1463", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://newechoapi.cloudapp.net/api", + "subscriptionKeyParameterNames": { + "header": "header4520", + "query": "query3037" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiClone.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiClone.json new file mode 100644 index 0000000000..3db3b0b571 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiClone.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "echo-api2", + "parameters": { + "properties": { + "path": "echo2", + "description": "Copy of Existing Echo Api including Operations.", + "displayName": "Echo API2", + "isCurrent": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api", + "sourceApiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001", + "subscriptionRequired": true + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "echoapi2", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoapi2", + "properties": { + "path": "echo2", + "description": "Copy of Existing Echo Api including Operations.", + "apiRevision": "1", + "displayName": "Echo API2", + "isCurrent": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + }, + "subscriptionRequired": true + } + } + }, + "201": { + "body": { + "name": "echoapi2", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoapi2", + "properties": { + "path": "echo2", + "description": "Copy of Existing Echo Api including Operations.", + "apiRevision": "1", + "displayName": "Echo API2", + "isCurrent": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + }, + "subscriptionRequired": true + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiClone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingApi.json new file mode 100644 index 0000000000..d7486b6668 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingApi.json @@ -0,0 +1,97 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "echoapiv3", + "parameters": { + "properties": { + "path": "echo2", + "description": "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", + "apiVersion": "v4", + "apiVersionSetId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + "displayName": "Echo API2", + "isCurrent": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api", + "sourceApiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath", + "subscriptionRequired": true + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "echoapiv3", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoapiv3", + "properties": { + "path": "echo2", + "description": "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", + "apiRevision": "1", + "apiVersion": "v4", + "apiVersionSet": { + "name": "Echo API2", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + "versioningScheme": "Segment" + }, + "apiVersionSetId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + "displayName": "Echo API2", + "isCurrent": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + }, + "subscriptionRequired": true + } + } + }, + "201": { + "body": { + "name": "echoapiv3", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoapiv3", + "properties": { + "path": "echo2", + "description": "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", + "apiRevision": "1", + "apiVersion": "v4", + "apiVersionSet": { + "name": "Echo API2", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + "versioningScheme": "Segment" + }, + "apiVersionSetId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + "displayName": "Echo API2", + "isCurrent": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + }, + "subscriptionRequired": true + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiNewVersionUsingExistingApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi.json new file mode 100644 index 0000000000..7f71af235d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "echo-api;rev=3", + "parameters": { + "properties": { + "path": "echo", + "apiRevisionDescription": "Creating a Revision of an existing API", + "serviceUrl": "http://echoapi.cloudapp.net/apiv3", + "sourceApiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "echo-api;rev=3", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api;rev=3", + "properties": { + "path": "echo", + "apiRevision": "3", + "apiRevisionDescription": "Creating a Revision of an existing API", + "displayName": "Echo API", + "protocols": [ + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/apiv3", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + }, + "subscriptionRequired": true + } + } + }, + "201": { + "body": { + "name": "echo-api;rev=3", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api;rev=3", + "properties": { + "path": "echo", + "apiRevision": "3", + "apiRevisionDescription": "Creating a Revision of an existing API", + "displayName": "Echo API", + "protocols": [ + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/apiv3", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + }, + "subscriptionRequired": true + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiRevisionFromExistingApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServiceUrl.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServiceUrl.json new file mode 100644 index 0000000000..cb3779c56f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServiceUrl.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "apidocs", + "parameters": { + "properties": { + "format": "swagger-link", + "path": "petstoreapi123", + "serviceUrl": "http://petstore.swagger.wordnik.com/api", + "value": "http://apimpimportviaurl.azurewebsites.net/api/apidocs/" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apidocs", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apidocs", + "properties": { + "path": "petstoreapi123", + "description": "This is a sample server Petstore server. You can find out more about Swagger \n at http://swagger.wordnik.com or on irc.freenode.net, #swagger. For this sample,\n you can use the api key \"special-key\" to test the authorization filters", + "apiRevision": "1", + "displayName": "Swagger Sample App", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.wordnik.com/api", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "201": { + "body": { + "name": "apidocs", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apidocs", + "properties": { + "path": "petstoreapi123", + "description": "This is a sample server Petstore server. You can find out more about Swagger \n at http://swagger.wordnik.com or on irc.freenode.net, #swagger. For this sample,\n you can use the api key \"special-key\" to test the authorization filters", + "apiRevision": "1", + "displayName": "Swagger Sample App", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.wordnik.com/api", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apidocs?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiUsingImportOverrideServiceUrl" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingOai3Import.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingOai3Import.json new file mode 100644 index 0000000000..7d4f61e25a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingOai3Import.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "petstore", + "parameters": { + "properties": { + "format": "openapi-link", + "path": "petstore", + "value": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "petstoreapi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/petstoreapi", + "properties": { + "path": "petstore", + "apiRevision": "1", + "displayName": "Swagger Petstore", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.io/v1", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "201": { + "body": { + "name": "petstoreapi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/petstoreapi", + "properties": { + "path": "petstore", + "apiRevision": "1", + "displayName": "Swagger Petstore", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.io/v1", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiUsingOai3Import" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport.json new file mode 100644 index 0000000000..29b5591535 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "petstore", + "parameters": { + "properties": { + "format": "swagger-link-json", + "path": "petstore", + "value": "http://petstore.swagger.io/v2/swagger.json" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "petstoreapi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/petstoreapi", + "properties": { + "path": "petstore", + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "apiRevision": "1", + "displayName": "Swagger Petstore", + "isCurrent": true, + "protocols": [ + "http" + ], + "serviceUrl": "http://petstore.swagger.io/v2", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "201": { + "body": { + "name": "petstoreapi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/petstoreapi", + "properties": { + "path": "petstore", + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "apiRevision": "1", + "displayName": "Swagger Petstore", + "isCurrent": true, + "protocols": [ + "http" + ], + "serviceUrl": "http://petstore.swagger.io/v2", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiUsingSwaggerImport" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingWadlImport.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingWadlImport.json new file mode 100644 index 0000000000..a02c34684d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingWadlImport.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "petstore", + "parameters": { + "properties": { + "format": "wadl-link-json", + "path": "collector", + "value": "https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "collectorwadl", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/collectorwadl", + "properties": { + "path": "collector", + "description": "", + "apiRevision": "1", + "displayName": "http://localhost:8080/collector-northbound", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://localhost:8080/collector-northbound", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "201": { + "body": { + "name": "collectorwadl", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/collectorwadl", + "properties": { + "path": "collector", + "description": "", + "apiRevision": "1", + "displayName": "http://localhost:8080/collector-northbound", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://localhost:8080/collector-northbound", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiUsingWadlImport" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect.json new file mode 100644 index 0000000000..828e24da34 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "tempgroup", + "parameters": { + "properties": { + "path": "petstore", + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "authenticationSettings": { + "openid": { + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "openidProviderId": "testopenid" + } + }, + "displayName": "Swagger Petstore", + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.io/v2", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "58da4c4ccdae970a08121230", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58da4c4ccdae970a08121230", + "properties": { + "path": "petstore", + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "apiRevision": "1", + "authenticationSettings": { + "openid": { + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "openidProviderId": "testopenid" + } + }, + "displayName": "Swagger Petstore", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.io/v2", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "201": { + "body": { + "name": "58da4c4ccdae970a08121230", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58da4c4ccdae970a08121230", + "properties": { + "path": "petstore", + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "apiRevision": "1", + "authenticationSettings": { + "openid": { + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "openidProviderId": "testopenid" + } + }, + "displayName": "Swagger Petstore", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.io/v2", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiWithOpenIdConnect" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateGraphQlApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateGraphQlApi.json new file mode 100644 index 0000000000..1472a30e05 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateGraphQlApi.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "tempgroup", + "parameters": { + "properties": { + "type": "graphql", + "path": "graphql-api", + "description": "apidescription5200", + "displayName": "apiname1463", + "protocols": [ + "http", + "https" + ], + "serviceUrl": "https://api.spacex.land/graphql" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apiid9419", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419", + "properties": { + "type": "graphql", + "path": "graphql-api", + "description": "apidescription5200", + "apiRevision": "1", + "authenticationSettings": null, + "displayName": "apiname1463", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "https://api.spacex.land/graphql", + "subscriptionKeyParameterNames": null + } + } + }, + "201": { + "body": { + "name": "apiid9419", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419", + "properties": { + "type": "graphql", + "path": "graphql-api", + "description": "apidescription5200", + "apiRevision": "1", + "authenticationSettings": null, + "displayName": "apiname1463", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "https", + "https" + ], + "serviceUrl": "https://api.spacex.land/graphql", + "subscriptionKeyParameterNames": null + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateGraphQLApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json new file mode 100644 index 0000000000..91c36b9295 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "soapApi", + "parameters": { + "properties": { + "format": "wsdl-link", + "path": "currency", + "apiType": "soap", + "value": "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + "wsdlSelector": { + "wsdlEndpointName": "CurrencyConvertorSoap", + "wsdlServiceName": "CurrencyConvertor" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "soapApi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/soapApi", + "properties": { + "type": "soap", + "path": "currency", + "apiRevision": "1", + "displayName": "CurrencyConvertor", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://www.webservicex.net", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "201": { + "body": { + "name": "soapApi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/soapApi", + "properties": { + "type": "soap", + "path": "currency", + "apiRevision": "1", + "displayName": "CurrencyConvertor", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://www.webservicex.net", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateSoapPassThroughApiUsingWsdlImport" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport.json new file mode 100644 index 0000000000..baa2d205e9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "soapApi", + "parameters": { + "properties": { + "format": "wsdl-link", + "path": "currency", + "value": "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + "wsdlSelector": { + "wsdlEndpointName": "CurrencyConvertorSoap", + "wsdlServiceName": "CurrencyConvertor" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "soapApi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/soapApi", + "properties": { + "path": "currency", + "apiRevision": "1", + "displayName": "CurrencyConvertor", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://www.webservicex.net", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "201": { + "body": { + "name": "soapApi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/soapApi", + "properties": { + "path": "currency", + "apiRevision": "1", + "displayName": "CurrencyConvertor", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://www.webservicex.net", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateSoapToRestApiUsingWsdlImport" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateWebSocketApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateWebSocketApi.json new file mode 100644 index 0000000000..f7c5532be1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateWebSocketApi.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "tempgroup", + "parameters": { + "properties": { + "type": "websocket", + "path": "newapiPath", + "description": "apidescription5200", + "displayName": "apiname1463", + "protocols": [ + "wss", + "ws" + ], + "serviceUrl": "wss://echo.websocket.org" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apiid9419", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419", + "properties": { + "type": "websocket", + "path": "newapiPath", + "description": "apidescription5200", + "apiRevision": "1", + "authenticationSettings": null, + "displayName": "apiname1463", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "ws", + "wss" + ], + "serviceUrl": "wss://echo.websocket.org", + "subscriptionKeyParameterNames": null + } + } + }, + "201": { + "body": { + "name": "apiid9419", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419", + "properties": { + "type": "websocket", + "path": "newapiPath", + "description": "apidescription5200", + "apiRevision": "1", + "authenticationSettings": null, + "displayName": "apiname1463", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "ws", + "wss" + ], + "serviceUrl": "wss://echo.websocket.org", + "subscriptionKeyParameterNames": null + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateWebSocketApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Delete.json new file mode 100644 index 0000000000..1159431b36 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "echo-api", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Api_Delete", + "title": "ApiManagementDeleteApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_GetEntityTag.json new file mode 100644 index 0000000000..4ffc87136f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Api_GetEntityTag", + "title": "ApiManagementHeadApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiContract.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiContract.json new file mode 100644 index 0000000000..a496cca55a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiContract.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d1f7558aa04f15146d9d8a", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a", + "properties": { + "type": "soap", + "path": "schulte", + "apiRevision": "1", + "displayName": "Service", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "https" + ], + "serviceUrl": "https://api.plexonline.com/DataSource/Service.asmx", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + } + }, + "operationId": "Api_Get", + "title": "ApiManagementGetApiContract" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiRevisionContract.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiRevisionContract.json new file mode 100644 index 0000000000..649ffd54f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiRevisionContract.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "echo-api;rev=3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "echo-api;rev=3", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api;rev=3", + "properties": { + "path": "schulte", + "apiRevision": "3", + "apiRevisionDescription": "fixed bug in contract", + "displayName": "Service", + "protocols": [ + "https" + ], + "serviceUrl": "https://api.plexonline.com/DataSource/Service.asmx", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + } + }, + "operationId": "Api_Get", + "title": "ApiManagementGetApiRevisionContract" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByService.json new file mode 100644 index 0000000000..6a8836ab18 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByService.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 4, + "nextLink": "", + "value": [ + { + "name": "a1", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + "properties": { + "path": "api1", + "apiRevision": "1", + "apiVersionSetId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/c48f96c9-1385-4e2d-b410-5ab591ce0fc4", + "displayName": "api1", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api" + } + }, + { + "name": "5a73933b8f27f7cc82a2d533", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5a73933b8f27f7cc82a2d533", + "properties": { + "path": "api1", + "apiRevision": "1", + "apiVersion": "v1", + "apiVersionSetId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/c48f96c9-1385-4e2d-b410-5ab591ce0fc4", + "displayName": "api1", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api" + } + }, + { + "name": "echo-api", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", + "properties": { + "path": "echo", + "apiRevision": "1", + "displayName": "Echo API", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api" + } + }, + { + "name": "5a7390baa5816a110435aee0", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5a7390baa5816a110435aee0", + "properties": { + "path": "vvv", + "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification", + "apiRevision": "1", + "displayName": "Swagger Petstore Extensive", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.wordnik.com/api" + } + } + ] + } + } + }, + "operationId": "Api_ListByService", + "title": "ApiManagementListApis" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByTags.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByTags.json new file mode 100644 index 0000000000..7cadce246d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByTags.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "value": [ + { + "api": { + "name": "Echo API", + "path": "echo", + "apiRevision": "1", + "id": "/apis/echo-api", + "isCurrent": true, + "serviceUrl": "http://echoapi.cloudapp.net/api" + }, + "tag": { + "name": "awesomeTag", + "id": "/tags/apitag123" + } + } + ] + } + } + }, + "operationId": "Api_ListByTags", + "title": "ApiManagementListApisByTags" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Update.json new file mode 100644 index 0000000000..b4283efb1d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Update.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "echo-api", + "parameters": { + "properties": { + "path": "newecho", + "displayName": "Echo API New", + "serviceUrl": "http://echoapi.cloudapp.net/api2" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "echo-api", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", + "properties": { + "path": "newecho", + "apiRevision": "1", + "displayName": "Echo API New", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api2", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + } + }, + "operationId": "Api_Update", + "title": "ApiManagementUpdateApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_CreateOrUpdate.json new file mode 100644 index 0000000000..924da99ae5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_CreateOrUpdate.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "authsid": "newauthServer", + "parameters": { + "properties": { + "description": "test server", + "authorizationEndpoint": "https://www.contoso.com/oauth2/auth", + "authorizationMethods": [ + "GET" + ], + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "clientId": "1", + "clientRegistrationEndpoint": "https://www.contoso.com/apps", + "clientSecret": "2", + "defaultScope": "read write", + "displayName": "test2", + "grantTypes": [ + "authorizationCode", + "implicit" + ], + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un", + "supportState": true, + "tokenEndpoint": "https://www.contoso.com/oauth2/token" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "newauthServer", + "type": "Microsoft.ApiManagement/service/authorizationServers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer", + "properties": { + "description": "test server", + "authorizationEndpoint": "https://www.contoso.com/oauth2/auth", + "authorizationMethods": [ + "GET" + ], + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "clientId": "1", + "clientRegistrationEndpoint": "https://www.contoso.com/apps", + "defaultScope": "read write", + "displayName": "test2", + "grantTypes": [ + "authorizationCode", + "implicit" + ], + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un", + "supportState": true, + "tokenEndpoint": "https://www.contoso.com/oauth2/token" + } + } + }, + "201": { + "body": { + "name": "newauthServer", + "type": "Microsoft.ApiManagement/service/authorizationServers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer", + "properties": { + "description": "test server", + "authorizationEndpoint": "https://www.contoso.com/oauth2/auth", + "authorizationMethods": [ + "GET" + ], + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "clientId": "1", + "clientRegistrationEndpoint": "https://www.contoso.com/apps", + "defaultScope": "read write", + "displayName": "test2", + "grantTypes": [ + "authorizationCode", + "implicit" + ], + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un", + "supportState": true, + "tokenEndpoint": "https://www.contoso.com/oauth2/token" + } + } + } + }, + "operationId": "AuthorizationServer_CreateOrUpdate", + "title": "ApiManagementCreateAuthorizationServer" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Delete.json new file mode 100644 index 0000000000..b680c8d7e8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "authsid": "newauthServer2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "AuthorizationServer_Delete", + "title": "ApiManagementDeleteAuthorizationServer" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Get.json new file mode 100644 index 0000000000..e81cc6f914 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Get.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "authsid": "newauthServer2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "newauthServer2", + "type": "Microsoft.ApiManagement/service/authorizationServers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer2", + "properties": { + "description": "test server", + "authorizationEndpoint": "https://www.contoso.com/oauth2/auth", + "authorizationMethods": [ + "GET" + ], + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "clientAuthenticationMethod": [ + "Basic" + ], + "clientId": "1", + "clientRegistrationEndpoint": "https://www.contoso.com/apps", + "defaultScope": "read write", + "displayName": "test3", + "grantTypes": [ + "authorizationCode", + "implicit" + ], + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un", + "supportState": true, + "tokenEndpoint": "https://www.contoso.com/oauth2/token" + } + } + } + }, + "operationId": "AuthorizationServer_Get", + "title": "ApiManagementGetAuthorizationServer" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_GetEntityTag.json new file mode 100644 index 0000000000..c7fb9600d8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "authsid": "newauthServer2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "AuthorizationServer_GetEntityTag", + "title": "ApiManagementHeadAuthorizationServer" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListByService.json new file mode 100644 index 0000000000..2d7e4ac519 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListByService.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "", + "value": [ + { + "name": "newauthServer", + "type": "Microsoft.ApiManagement/service/authorizationServers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer", + "properties": { + "description": "test server", + "authorizationEndpoint": "https://www.contoso.com/oauth2/auth", + "authorizationMethods": [ + "GET" + ], + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "clientId": "1", + "clientRegistrationEndpoint": "https://www.contoso.com/apps", + "defaultScope": "read write", + "displayName": "test2", + "grantTypes": [ + "authorizationCode", + "implicit" + ], + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un", + "supportState": true, + "tokenEndpoint": "https://www.contoso.com/oauth2/token" + } + }, + { + "name": "newauthServer2", + "type": "Microsoft.ApiManagement/service/authorizationServers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer2", + "properties": { + "description": "test server", + "authorizationEndpoint": "https://www.contoso.com/oauth2/auth", + "authorizationMethods": [ + "GET" + ], + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "clientAuthenticationMethod": [ + "Basic" + ], + "clientId": "1", + "clientRegistrationEndpoint": "https://www.contoso.com/apps", + "defaultScope": "read write", + "displayName": "test3", + "grantTypes": [ + "authorizationCode", + "implicit" + ], + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un", + "supportState": true, + "tokenEndpoint": "https://www.contoso.com/oauth2/token" + } + } + ] + } + } + }, + "operationId": "AuthorizationServer_ListByService", + "title": "ApiManagementListAuthorizationServers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListSecrets.json new file mode 100644 index 0000000000..283efaaeed --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListSecrets.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "authsid": "newauthServer2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "clientSecret": "2", + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un" + } + } + }, + "operationId": "AuthorizationServer_ListSecrets", + "title": "ApiManagementAuthorizationServerListSecrets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Update.json new file mode 100644 index 0000000000..5b36dee942 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Update.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "authsid": "newauthServer", + "parameters": { + "properties": { + "clientId": "update", + "clientSecret": "updated" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "newauthServer", + "type": "Microsoft.ApiManagement/service/authorizationServers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer", + "properties": { + "description": "test server", + "authorizationEndpoint": "https://www.contoso.com/oauth2/auth", + "authorizationMethods": [ + "GET" + ], + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "clientAuthenticationMethod": [ + "Basic" + ], + "clientId": "updated", + "clientRegistrationEndpoint": "https://www.contoso.com/apps", + "defaultScope": "read write", + "displayName": "test3", + "grantTypes": [ + "authorizationCode", + "implicit" + ], + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un", + "supportState": true, + "tokenEndpoint": "https://www.contoso.com/oauth2/token" + } + } + } + }, + "operationId": "AuthorizationServer_Update", + "title": "ApiManagementUpdateAuthorizationServer" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendProxyBackend.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendProxyBackend.json new file mode 100644 index 0000000000..b47479351b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendProxyBackend.json @@ -0,0 +1,128 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "backendId": "proxybackend", + "parameters": { + "properties": { + "description": "description5308", + "credentials": { + "authorization": { + "parameter": "opensesma", + "scheme": "Basic" + }, + "header": { + "x-my-1": [ + "val1", + "val2" + ] + }, + "query": { + "sv": [ + "xx", + "bb", + "cc" + ] + } + }, + "proxy": { + "password": "", + "url": "http://192.168.1.1:8080", + "username": "Contoso\\admin" + }, + "tls": { + "validateCertificateChain": true, + "validateCertificateName": true + }, + "url": "https://backendname2644/", + "protocol": "http" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "proxybackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend", + "properties": { + "description": "description5308", + "credentials": { + "authorization": { + "parameter": "opensesma", + "scheme": "Basic" + }, + "header": { + "x-my-1": [ + "val1", + "val2" + ] + }, + "query": { + "sv": [ + "xx", + "bb", + "cc" + ] + } + }, + "proxy": { + "password": "", + "url": "http://192.168.1.1:8080", + "username": "Contoso\\admin" + }, + "tls": { + "validateCertificateChain": false, + "validateCertificateName": false + }, + "url": "https://backendname2644/", + "protocol": "http" + } + } + }, + "201": { + "body": { + "name": "proxybackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend", + "properties": { + "description": "description5308", + "credentials": { + "authorization": { + "parameter": "opensesma", + "scheme": "Basic" + }, + "header": { + "x-my-1": [ + "val1", + "val2" + ] + }, + "query": { + "sv": [ + "xx", + "bb", + "cc" + ] + } + }, + "proxy": { + "password": "", + "url": "http://192.168.1.1:8080", + "username": "Contoso\\admin" + }, + "tls": { + "validateCertificateChain": false, + "validateCertificateName": false + }, + "url": "https://backendname2644/", + "protocol": "http" + } + } + } + }, + "operationId": "Backend_CreateOrUpdate", + "title": "ApiManagementCreateBackendProxyBackend" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendServiceFabric.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendServiceFabric.json new file mode 100644 index 0000000000..6809154344 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendServiceFabric.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "backendId": "sfbackend", + "parameters": { + "properties": { + "description": "Service Fabric Test App 1", + "properties": { + "serviceFabricCluster": { + "clientCertificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "managementEndpoints": [ + "https://somecluster.com" + ], + "maxPartitionResolutionRetries": 5, + "serverX509Names": [ + { + "name": "ServerCommonName1", + "issuerCertificateThumbprint": "IssuerCertificateThumbprint1" + } + ] + } + }, + "url": "fabric:/mytestapp/mytestservice", + "protocol": "http" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "sfbackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend", + "properties": { + "description": "Service Fabric Test App 1", + "properties": { + "serviceFabricCluster": { + "clientCertificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "managementEndpoints": [ + "https://somecluster.com" + ], + "maxPartitionResolutionRetries": 5, + "serverX509Names": [ + { + "name": "ServerCommonName1", + "issuerCertificateThumbprint": "IssuerCertificateThumbprint1" + } + ] + } + }, + "url": "fabric:/mytestapp/mytestservice", + "protocol": "http" + } + } + }, + "201": { + "body": { + "name": "sfbackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend", + "properties": { + "description": "Service Fabric Test App 1", + "properties": { + "serviceFabricCluster": { + "clientCertificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "managementEndpoints": [ + "https://somecluster.com" + ], + "maxPartitionResolutionRetries": 5, + "serverX509Names": [ + { + "name": "ServerCommonName1", + "issuerCertificateThumbprint": "IssuerCertificateThumbprint1" + } + ] + } + }, + "url": "fabric:/mytestapp/mytestservice", + "protocol": "http" + } + } + } + }, + "operationId": "Backend_CreateOrUpdate", + "title": "ApiManagementCreateBackendServiceFabric" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Delete.json new file mode 100644 index 0000000000..69040586c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "backendId": "sfbackend", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Backend_Delete", + "title": "ApiManagementDeleteBackend" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Get.json new file mode 100644 index 0000000000..17727e92d7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Get.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "backendId": "sfbackend", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "sfbackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend", + "properties": { + "description": "Service Fabric Test App 1", + "properties": { + "serviceFabricCluster": { + "clientCertificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "managementEndpoints": [ + "https://somecluster.com" + ], + "maxPartitionResolutionRetries": 5, + "serverX509Names": [ + { + "name": "ServerCommonName1", + "issuerCertificateThumbprint": "IssuerCertificateThumbprint1" + } + ] + } + }, + "url": "fabric:/mytestapp/mytestservice", + "protocol": "http" + } + } + } + }, + "operationId": "Backend_Get", + "title": "ApiManagementGetBackend" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_GetEntityTag.json new file mode 100644 index 0000000000..abc3ed2607 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "backendId": "sfbackend", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Backend_GetEntityTag", + "title": "ApiManagementHeadBackend" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_ListByService.json new file mode 100644 index 0000000000..782192e026 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_ListByService.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "name": "proxybackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend", + "properties": { + "description": "description5308", + "credentials": { + "authorization": { + "parameter": "opensesma", + "scheme": "Basic" + }, + "header": { + "x-my-1": [ + "val1", + "val2" + ] + }, + "query": { + "sv": [ + "xx", + "bb", + "cc" + ] + } + }, + "proxy": { + "password": "", + "url": "http://192.168.1.1:8080", + "username": "Contoso\\admin" + }, + "tls": { + "validateCertificateChain": false, + "validateCertificateName": false + }, + "url": "https://backendname2644/", + "protocol": "http" + } + }, + { + "name": "sfbackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend", + "properties": { + "description": "Service Fabric Test App 1", + "properties": { + "serviceFabricCluster": { + "clientCertificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "managementEndpoints": [ + "https://somecluster.com" + ], + "maxPartitionResolutionRetries": 5, + "serverX509Names": [ + { + "name": "ServerCommonName1", + "issuerCertificateThumbprint": "IssuerCertificateThumbprint1" + } + ] + } + }, + "url": "fabric:/mytestapp/mytestservice", + "protocol": "http" + } + } + ] + } + } + }, + "operationId": "Backend_ListByService", + "title": "ApiManagementListBackends" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Reconnect.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Reconnect.json new file mode 100644 index 0000000000..1e1c1c06a7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Reconnect.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "backendId": "proxybackend", + "parameters": { + "properties": { + "after": "PT3S" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "202": {} + }, + "operationId": "Backend_Reconnect", + "title": "ApiManagementBackendReconnect" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Update.json new file mode 100644 index 0000000000..bd0c08b5eb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Update.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "backendId": "proxybackend", + "parameters": { + "properties": { + "description": "description5308", + "tls": { + "validateCertificateChain": false, + "validateCertificateName": true + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "proxybackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend", + "properties": { + "description": "description5308", + "credentials": { + "authorization": { + "parameter": "opensesma", + "scheme": "Basic" + }, + "header": { + "x-my-1": [ + "val1", + "val2" + ] + }, + "query": { + "sv": [ + "xx", + "bb", + "cc" + ] + } + }, + "proxy": { + "password": "", + "url": "http://192.168.1.1:8080", + "username": "Contoso\\admin" + }, + "tls": { + "validateCertificateChain": false, + "validateCertificateName": true + }, + "url": "https://backendname2644/", + "protocol": "http" + } + } + } + }, + "operationId": "Backend_Update", + "title": "ApiManagementUpdateBackend" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_CreateOrUpdate.json new file mode 100644 index 0000000000..6af2396c08 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_CreateOrUpdate.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "cacheId": "c1", + "parameters": { + "properties": { + "description": "Redis cache instances in West India", + "connectionString": "apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + "useFromLocation": "default" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "c1", + "type": "Microsoft.ApiManagement/service/caches", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1", + "properties": { + "description": "Redis cache instances in West India", + "connectionString": "{{5f7fbca77a891a2200f3db38}}", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + "useFromLocation": "default" + } + } + }, + "201": { + "body": { + "name": "c1", + "type": "Microsoft.ApiManagement/service/caches", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1", + "properties": { + "description": "Redis cache instances in West India", + "connectionString": "{{5f7fbca77a891a2200f3db38}}", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + "useFromLocation": "default" + } + } + } + }, + "operationId": "Cache_CreateOrUpdate", + "title": "ApiManagementCreateCache" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Delete.json new file mode 100644 index 0000000000..f49e64853b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "cacheId": "southindia", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Cache_Delete", + "title": "ApiManagementDeleteCache" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Get.json new file mode 100644 index 0000000000..826d674118 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Get.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "cacheId": "c1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "c1", + "type": "Microsoft.ApiManagement/service/caches", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1", + "properties": { + "description": "Redis cache instances in West India", + "connectionString": "{{5f7fbca77a891a2200f3db38}}", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + "useFromLocation": "default" + } + } + } + }, + "operationId": "Cache_Get", + "title": "ApiManagementGetCache" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_GetEntityTag.json new file mode 100644 index 0000000000..2278e9d504 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "cacheId": "default", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Cache_GetEntityTag", + "title": "ApiManagementHeadCache" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_ListByService.json new file mode 100644 index 0000000000..59221c21f6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_ListByService.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "value": [ + { + "name": "c1", + "type": "Microsoft.ApiManagement/service/caches", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1", + "properties": { + "description": "Redis cache instances in West India", + "connectionString": "{{5f7fbca77a891a2200f3db38}}", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + "useFromLocation": "default" + } + } + ] + } + } + }, + "operationId": "Cache_ListByService", + "title": "ApiManagementListCaches" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Update.json new file mode 100644 index 0000000000..3bff9f587f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Update.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "cacheId": "c1", + "parameters": { + "properties": { + "useFromLocation": "westindia" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "c1", + "type": "Microsoft.ApiManagement/service/caches", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1", + "properties": { + "description": "Redis cache instances in West India", + "connectionString": "{{5f7fbca77a891a2200f3db38}}", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + "useFromLocation": "westindia" + } + } + } + }, + "operationId": "Cache_Update", + "title": "ApiManagementUpdateCache" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificate.json new file mode 100644 index 0000000000..2f084a4650 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificate.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "tempcert", + "parameters": { + "properties": { + "data": "****************Base 64 Encoded Certificate *******************************", + "password": "****Certificate Password******" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "tempcert", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/tempcert", + "properties": { + "expirationDate": "2018-03-17T21:55:07+00:00", + "subject": "CN=contoso.com", + "thumbprint": "*******************3" + } + } + }, + "201": { + "body": { + "name": "tempcert", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/tempcert", + "properties": { + "expirationDate": "2018-03-17T21:55:07+00:00", + "subject": "CN=contoso.com", + "thumbprint": "*******************3" + } + } + } + }, + "operationId": "Certificate_CreateOrUpdate", + "title": "ApiManagementCreateCertificate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificateWithKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificateWithKeyVault.json new file mode 100644 index 0000000000..b970ff09a2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificateWithKeyVault.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "templateCertkv", + "parameters": { + "properties": { + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "templateCertkv", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv", + "properties": { + "expirationDate": "2037-01-01T07:00:00Z", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-22T00:24:53.3191468Z" + }, + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + }, + "subject": "CN=*.msitesting.net", + "thumbprint": "EA**********************9AD690" + } + } + }, + "201": { + "body": { + "name": "templateCertkv", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv", + "properties": { + "expirationDate": "2037-01-01T07:00:00Z", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-22T00:24:53.3191468Z" + }, + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + }, + "subject": "CN=*.msitesting.net", + "thumbprint": "EA**********************9AD690" + } + } + } + }, + "operationId": "Certificate_CreateOrUpdate", + "title": "ApiManagementCreateCertificateWithKeyVault" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Delete.json new file mode 100644 index 0000000000..81339708c5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "certificateId": "tempcert", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Certificate_Delete", + "title": "ApiManagementDeleteCertificate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_GetEntityTag.json new file mode 100644 index 0000000000..efa4936f21 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "templateCert1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Certificate_GetEntityTag", + "title": "ApiManagementHeadCertificate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificate.json new file mode 100644 index 0000000000..1c60974103 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificate.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "templateCert1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "templateCert1", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCert1", + "properties": { + "expirationDate": "2017-04-23T17:03:41Z", + "subject": "CN=mutual-authcert", + "thumbprint": "EBA**********************8594A6" + } + } + } + }, + "operationId": "Certificate_Get", + "title": "ApiManagementGetCertificate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificateWithKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificateWithKeyVault.json new file mode 100644 index 0000000000..e4aca0b6bc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificateWithKeyVault.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "templateCertkv", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "templateCertkv", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv", + "properties": { + "expirationDate": "2037-01-01T07:00:00Z", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-22T00:24:53.3191468Z" + }, + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + }, + "subject": "CN=*.msitesting.net", + "thumbprint": "EA**********************9AD690" + } + } + } + }, + "operationId": "Certificate_Get", + "title": "ApiManagementGetCertificateWithKeyVault" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_ListByService.json new file mode 100644 index 0000000000..bf0e1cc9be --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_ListByService.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "name": "templateCert1", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/kjoshiarmtemplateCert1", + "properties": { + "expirationDate": "2017-04-23T17:03:41Z", + "subject": "CN=mutual-authcert", + "thumbprint": "EBA************************48594A6" + } + }, + { + "name": "templateCertkv", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv", + "properties": { + "expirationDate": "2037-01-01T07:00:00Z", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-22T00:24:53.3191468Z" + }, + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + }, + "subject": "CN=*.msitesting.net", + "thumbprint": "EA**********************9AD690" + } + } + ] + } + } + }, + "operationId": "Certificate_ListByService", + "title": "ApiManagementListCertificates" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_RefreshSecret.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_RefreshSecret.json new file mode 100644 index 0000000000..b4a0d735f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_RefreshSecret.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "templateCertkv", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "templateCertkv", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv", + "properties": { + "expirationDate": "2037-01-01T07:00:00Z", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-22T00:24:53.3191468Z" + }, + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + }, + "subject": "CN=*.msitesting.net", + "thumbprint": "EA**********************9AD690" + } + } + } + }, + "operationId": "Certificate_RefreshSecret", + "title": "ApiManagementRefreshCertificate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_Get.json new file mode 100644 index 0000000000..2c666ae432 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_Get.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "contentItemId": "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "contentTypeId": "page", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "type": "Microsoft.ApiManagement/service/contentTypes/contentItems", + "id": "/contentTypes/page/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "properties": { + "en_us": { + "description": "Short story about the company.", + "documentId": "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "keywords": "company, about", + "permalink": "/about", + "title": "About" + } + } + } + } + }, + "operationId": "ContentItem_Get", + "title": "ApiManagementGetContentTypeContentItem" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_ListByService.json new file mode 100644 index 0000000000..f5b72e5ebb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_ListByService.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "contentTypeId": "page", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "type": "Microsoft.ApiManagement/service/contentTypes/contentItems", + "id": "/contentTypes/page/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "properties": { + "en_us": { + "description": "Short story about the company.", + "documentId": "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "keywords": "company, about", + "permalink": "/about", + "title": "About" + } + } + } + ] + } + } + }, + "operationId": "ContentItem_ListByService", + "title": "ApiManagementListContentTypeContentItems" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_Get.json new file mode 100644 index 0000000000..0e2132edc8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_Get.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "contentTypeId": "page", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "page", + "type": "Microsoft.ApiManagement/service/contentTypes", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/contentTypes/page", + "properties": { + "name": "Page", + "schema": { + "additionalProperties": false, + "properties": { + "en_us": { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "Page description. This property gets included in SEO attributes.", + "indexed": true, + "title": "Description" + }, + "documentId": { + "type": "string", + "description": "Reference to page content document.", + "title": "Document ID" + }, + "keywords": { + "type": "string", + "description": "Page keywords. This property gets included in SEO attributes.", + "indexed": true, + "title": "Keywords" + }, + "permalink": { + "type": "string", + "description": "Page permalink, e.g. '/about'.", + "indexed": true, + "title": "Permalink" + }, + "title": { + "type": "string", + "description": "Page title. This property gets included in SEO attributes.", + "indexed": true, + "title": "Title" + } + }, + "required": [ + "title", + "permalink", + "documentId" + ] + } + } + }, + "description": "A regular page", + "version": "1.0.0" + } + } + } + }, + "operationId": "ContentType_Get", + "title": "ApiManagementGetContentType" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_ListByService.json new file mode 100644 index 0000000000..aefb7ecf0d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_ListByService.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "page", + "type": "Microsoft.ApiManagement/service/contentTypes", + "id": "/contentTypes/page", + "properties": { + "name": "Page", + "schema": { + "additionalProperties": false, + "properties": { + "en_us": { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "Page description. This property gets included in SEO attributes.", + "indexed": true, + "title": "Description" + }, + "documentId": { + "type": "string", + "description": "Reference to page content document.", + "title": "Document ID" + }, + "keywords": { + "type": "string", + "description": "Page keywords. This property gets included in SEO attributes.", + "indexed": true, + "title": "Keywords" + }, + "permalink": { + "type": "string", + "description": "Page permalink, e.g. '/about'.", + "indexed": true, + "title": "Permalink" + }, + "title": { + "type": "string", + "description": "Page title. This property gets included in SEO attributes.", + "indexed": true, + "title": "Title" + } + }, + "required": [ + "title", + "permalink", + "documentId" + ] + } + } + }, + "description": "A regular page", + "version": "1.0.0" + } + } + ] + } + } + }, + "operationId": "ContentType_ListByService", + "title": "ApiManagementListContentTypes" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_CreateOrUpdate.json new file mode 100644 index 0000000000..2c93162273 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_CreateOrUpdate.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "subscriptions": { + "enabled": true + }, + "url": "http://contoso.com/delegation", + "userRegistration": { + "enabled": true + }, + "validationKey": "" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "200": { + "body": { + "name": "delegation", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/delegation", + "properties": { + "subscriptions": { + "enabled": true + }, + "url": "http://contoso.com/delegation", + "userRegistration": { + "enabled": true + } + } + } + } + }, + "operationId": "DelegationSettings_CreateOrUpdate", + "title": "ApiManagementPortalSettingsUpdateDelegation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Get.json new file mode 100644 index 0000000000..1f6775a0f4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Get.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "delegation", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/delegation", + "properties": { + "subscriptions": { + "enabled": true + }, + "url": "http://contoso.com/delegation", + "userRegistration": { + "enabled": true + } + } + } + } + }, + "operationId": "DelegationSettings_Get", + "title": "ApiManagementPortalSettingsGetDelegation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_GetEntityTag.json new file mode 100644 index 0000000000..d1e5e6e318 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_GetEntityTag.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "DelegationSettings_GetEntityTag", + "title": "ApiManagementHeadDelegationSettings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_ListSecrets.json new file mode 100644 index 0000000000..38e2f7d045 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_ListSecrets.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "validationKey": "" + } + } + }, + "operationId": "DelegationSettings_ListSecrets", + "title": "ApiManagementListSecretsPortalSettings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Update.json new file mode 100644 index 0000000000..d455e85940 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Update.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "subscriptions": { + "enabled": true + }, + "url": "http://contoso.com/delegation", + "userRegistration": { + "enabled": true + }, + "validationKey": "" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "204": {} + }, + "operationId": "DelegationSettings_Update", + "title": "ApiManagementPortalSettingsUpdateDelegation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_GetByName.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_GetByName.json new file mode 100644 index 0000000000..838df2d252 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_GetByName.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "location": "westus", + "serviceName": "apimService3", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService3", + "type": "Microsoft.ApiManagement/deletedservices", + "id": "/subscriptions/subid/providers/Microsoft.ApiManagement/locations/westus/deletedservices/apimService3", + "location": "West US", + "properties": { + "deletionDate": "2017-05-27T15:33:55.5426123Z", + "scheduledPurgeDate": "2017-05-27T15:33:55.5426123Z", + "serviceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService3" + } + } + } + }, + "operationId": "DeletedServices_GetByName", + "title": "ApiManagementGetDeletedServiceByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_ListBySubscription.json new file mode 100644 index 0000000000..a1488768af --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_ListBySubscription.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "apimService3", + "type": "Microsoft.ApiManagement/deletedservices", + "id": "/subscriptions/subid/providers/Microsoft.ApiManagement/locations/westus/deletedservices/apimService3", + "location": "West US", + "properties": { + "deletionDate": "2017-05-27T15:33:55.5426123Z", + "scheduledPurgeDate": "2017-05-27T15:33:55.5426123Z", + "serviceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService3" + } + }, + { + "name": "apimService", + "type": "Microsoft.ApiManagement/deletedservices", + "id": "/subscriptions/subid/providers/Microsoft.ApiManagement/locations/westus2/deletedservices/apimService", + "location": "West US 2", + "properties": { + "deletionDate": "2017-05-27T15:33:55.5426123Z", + "scheduledPurgeDate": "2017-05-27T15:33:55.5426123Z", + "serviceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService" + } + } + ] + } + } + }, + "operationId": "DeletedServices_ListBySubscription", + "title": "ApiManagementDeletedServicesListBySubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_Purge.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_Purge.json new file mode 100644 index 0000000000..e07eace046 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_Purge.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "location": "westus", + "serviceName": "apimService3", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "202": { + "body": { + "name": "apimService3", + "type": "Microsoft.ApiManagement/deletedservices", + "id": "/subscriptions/subid/providers/Microsoft.ApiManagement/locations/westus/deletedservices/apimService3", + "location": "West US", + "properties": { + "deletionDate": "2017-05-27T15:33:55.5426123Z", + "scheduledPurgeDate": "2017-05-27T15:33:55.5426123Z", + "serviceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService3" + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/locations/westus/deletedservices/apimService3/operationresults/TGV2eTExMDZtMDJfVGVybV9jMmZlY2QwMA==?api-version=2021-08-01" + } + }, + "204": {} + }, + "operationId": "DeletedServices_Purge", + "title": "ApiManagementDeletedServicesPurge" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_CreateOrUpdate.json new file mode 100644 index 0000000000..1539720777 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_CreateOrUpdate.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "subject": "Your request for $IssueName was successfully received." + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "templateName": "newIssueNotificationMessage" + }, + "responses": { + "200": { + "body": { + "name": "NewIssueNotificationMessage", + "type": "Microsoft.ApiManagement/service/templates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/NewIssueNotificationMessage", + "properties": { + "description": "This email is sent to developers after they create a new topic on the Issues page of the developer portal.", + "body": "\r\n\r\n \r\n \r\n

    Dear $DevFirstName $DevLastName,

    \r\n

    Thank you for contacting us. Our API team will review your issue and get back to you soon.

    \r\n

    \r\n Click this link to view or edit your request.\r\n

    \r\n

    Best,

    \r\n

    The $OrganizationName API Team

    \r\n \r\n", + "isDefault": false, + "parameters": [ + { + "name": "DevFirstName", + "title": "Developer first name" + }, + { + "name": "DevLastName", + "title": "Developer last name" + }, + { + "name": "IssueId", + "title": "Issue id" + }, + { + "name": "IssueName", + "title": "Issue name" + }, + { + "name": "OrganizationName", + "title": "Organization name" + }, + { + "name": "DevPortalUrl", + "title": "Developer portal URL" + } + ], + "subject": "Your request for $IssueName was successfully received.", + "title": "New issue received" + } + } + }, + "201": { + "body": { + "name": "NewIssueNotificationMessage", + "type": "Microsoft.ApiManagement/service/templates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/NewIssueNotificationMessage", + "properties": { + "description": "This email is sent to developers after they create a new topic on the Issues page of the developer portal.", + "body": "\r\n\r\n \r\n \r\n

    Dear $DevFirstName $DevLastName,

    \r\n

    Thank you for contacting us. Our API team will review your issue and get back to you soon.

    \r\n

    \r\n Click this link to view or edit your request.\r\n

    \r\n

    Best,

    \r\n

    The $OrganizationName API Team

    \r\n \r\n", + "isDefault": false, + "parameters": [ + { + "name": "DevFirstName", + "title": "Developer first name" + }, + { + "name": "DevLastName", + "title": "Developer last name" + }, + { + "name": "IssueId", + "title": "Issue id" + }, + { + "name": "IssueName", + "title": "Issue name" + }, + { + "name": "OrganizationName", + "title": "Organization name" + }, + { + "name": "DevPortalUrl", + "title": "Developer portal URL" + } + ], + "subject": "Your request for $IssueName was successfully received.", + "title": "New issue received" + } + } + } + }, + "operationId": "EmailTemplate_CreateOrUpdate", + "title": "ApiManagementCreateTemplate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Delete.json new file mode 100644 index 0000000000..39056e12a8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "templateName": "newIssueNotificationMessage" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "EmailTemplate_Delete", + "title": "ApiManagementDeleteTemplate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Get.json new file mode 100644 index 0000000000..7c370daead --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Get.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "templateName": "newIssueNotificationMessage" + }, + "responses": { + "200": { + "body": { + "name": "NewIssueNotificationMessage", + "type": "Microsoft.ApiManagement/service/templates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/NewIssueNotificationMessage", + "properties": { + "description": "This email is sent to developers after they create a new topic on the Issues page of the developer portal.", + "body": "\r\n\r\n \r\n \r\n

    Dear $DevFirstName $DevLastName,

    \r\n

    Thank you for contacting us. Our API team will review your issue and get back to you soon.

    \r\n

    \r\n Click this link to view or edit your request.\r\n

    \r\n

    Best,

    \r\n

    The $OrganizationName API Team

    \r\n \r\n", + "isDefault": true, + "parameters": [ + { + "name": "DevFirstName", + "title": "Developer first name" + }, + { + "name": "DevLastName", + "title": "Developer last name" + }, + { + "name": "IssueId", + "title": "Issue id" + }, + { + "name": "IssueName", + "title": "Issue name" + }, + { + "name": "OrganizationName", + "title": "Organization name" + }, + { + "name": "DevPortalUrl", + "title": "Developer portal URL" + } + ], + "subject": "Your request $IssueName was received", + "title": "New issue received" + } + } + } + }, + "operationId": "EmailTemplate_Get", + "title": "ApiManagementGetTemplate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_GetEntityTag.json new file mode 100644 index 0000000000..d50ed0361d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "templateName": "newIssueNotificationMessage" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "EmailTemplate_GetEntityTag", + "title": "ApiManagementHeadEmailTemplate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_ListByService.json new file mode 100644 index 0000000000..7a738451ae --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_ListByService.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "ApplicationApprovedNotificationMessage", + "type": "Microsoft.ApiManagement/service/templates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/ApplicationApprovedNotificationMessage", + "properties": { + "description": "Developers who submitted their application for publication in the application gallery on the developer portal receive this email after their submission is approved.", + "body": "\r\n\r\n \r\n \r\n

    Dear $DevFirstName $DevLastName,

    \r\n

    \r\n We are happy to let you know that your request to publish the $AppName application in the application gallery has been approved. Your application has been published and can be viewed here.\r\n

    \r\n

    Best,

    \r\n

    The $OrganizationName API Team

    \r\n \r\n", + "isDefault": true, + "parameters": [ + { + "name": "AppId", + "title": "Application id" + }, + { + "name": "AppName", + "title": "Application name" + }, + { + "name": "DevFirstName", + "title": "Developer first name" + }, + { + "name": "DevLastName", + "title": "Developer last name" + }, + { + "name": "OrganizationName", + "title": "Organization name" + }, + { + "name": "DevPortalUrl", + "title": "Developer portal URL" + } + ], + "subject": "Your application $AppName is published in the application gallery", + "title": "Application gallery submission approved" + } + } + ] + } + } + }, + "operationId": "EmailTemplate_ListByService", + "title": "ApiManagementListTemplates" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Update.json new file mode 100644 index 0000000000..6a1556d134 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Update.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "body": "\r\n\r\n \r\n \r\n

    Dear $DevFirstName $DevLastName,

    \r\n

    \r\n We are happy to let you know that your request to publish the $AppName application in the gallery has been approved. Your application has been published and can be viewed here.\r\n

    \r\n

    Best,

    \r\n

    The $OrganizationName API Team

    \r\n \r\n", + "subject": "Your request $IssueName was received" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "templateName": "newIssueNotificationMessage" + }, + "responses": { + "200": { + "body": { + "name": "NewIssueNotificationMessage", + "type": "Microsoft.ApiManagement/service/templates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/NewIssueNotificationMessage", + "properties": { + "description": "This email is sent to developers after they create a new topic on the Issues page of the developer portal.", + "body": "\r\n\r\n \r\n \r\n

    Dear $DevFirstName $DevLastName,

    \r\n

    Thank you for contacting us. Our API team will review your issue and get back to you soon.

    \r\n

    \r\n Click this link to view or edit your request.\r\n

    \r\n

    Best,

    \r\n

    The $OrganizationName API Team

    \r\n \r\n", + "isDefault": true, + "parameters": [ + { + "name": "DevFirstName", + "title": "Developer first name" + }, + { + "name": "DevLastName", + "title": "Developer last name" + }, + { + "name": "IssueId", + "title": "Issue id" + }, + { + "name": "IssueName", + "title": "Issue name" + }, + { + "name": "OrganizationName", + "title": "Organization name" + }, + { + "name": "DevPortalUrl", + "title": "Developer portal URL" + } + ], + "subject": "Your request $IssueName was received", + "title": "New issue received" + } + } + } + }, + "operationId": "EmailTemplate_Update", + "title": "ApiManagementUpdateTemplate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayApi_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayApi_ListByService.json new file mode 100644 index 0000000000..6512854e44 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayApi_ListByService.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "57681820a40f7eb6c49f6aca", + "type": "Microsoft.ApiManagement/service/gateways/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/apis/57681820a40f7eb6c49f6aca", + "properties": { + "path": "suffix_57681820a40f7eb6c49f6ace", + "description": "description_57681820a40f7eb6c49f6acc", + "apiRevision": "1", + "displayName": "api_57681820a40f7eb6c49f6acb", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://contoso/57681820a40f7eb6c49f6acd" + } + } + ] + } + } + }, + "operationId": "GatewayApi_ListByService", + "title": "ApiManagementListGatewayApis" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_CreateOrUpdate.json new file mode 100644 index 0000000000..13b452069c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_CreateOrUpdate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "cert1", + "gatewayId": "gw1", + "parameters": { + "properties": { + "isTrusted": false + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "cert1", + "type": "Microsoft.ApiManagement/service/gateways/certificateAuthorities", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/certificateAuthorities/cert1", + "properties": { + "isTrusted": false + } + } + }, + "201": { + "body": { + "name": "cert1", + "type": "Microsoft.ApiManagement/service/gateways/certificateAuthorities", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/certificateAuthorities/cert1", + "properties": { + "isTrusted": false + } + } + } + }, + "operationId": "GatewayCertificateAuthority_CreateOrUpdate", + "title": "ApiManagementCreateGatewayCertificateAuthority" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Delete.json new file mode 100644 index 0000000000..27723bbcc7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "certificateId": "default", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "GatewayCertificateAuthority_Delete", + "title": "ApiManagementDeleteGatewayCertificateAuthority" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Get.json new file mode 100644 index 0000000000..05d00e5c68 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Get.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "cert1", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "cert1", + "type": "Microsoft.ApiManagement/service/gateways/certificateAuthorities", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/certificateAuthorities/cert1", + "properties": { + "isTrusted": true + } + } + } + }, + "operationId": "GatewayCertificateAuthority_Get", + "title": "ApiManagementGetGatewayCertificateAuthority" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_GetEntityTag.json new file mode 100644 index 0000000000..6d1f1a177b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "cert1", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "GatewayCertificateAuthority_GetEntityTag", + "title": "ApiManagementHeadGatewayCertificateAuthority" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_ListByService.json new file mode 100644 index 0000000000..008db557a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_ListByService.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "", + "value": [ + { + "name": "cert1", + "type": "Microsoft.ApiManagement/service/gateways/certificateAuthorities", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/certificateAuthorities/cert1", + "properties": { + "isTrusted": false + } + }, + { + "name": "cert2", + "type": "Microsoft.ApiManagement/service/gateways/certificateAuthorities", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/certificateAuthorities/cert2", + "properties": { + "isTrusted": true + } + } + ] + } + } + }, + "operationId": "GatewayCertificateAuthority_ListByService", + "title": "ApiManagementListGatewaycertificateAuthorities" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_CreateOrUpdate.json new file mode 100644 index 0000000000..e63d69b02f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_CreateOrUpdate.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "hcId": "default", + "parameters": { + "properties": { + "certificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "hostname": "*", + "http2Enabled": true, + "negotiateClientCertificate": false, + "tls10Enabled": false, + "tls11Enabled": false + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.ApiManagement/service/gateways/hostnameConfigurations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/default", + "properties": { + "certificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "hostname": "*", + "http2Enabled": true, + "negotiateClientCertificate": false, + "tls10Enabled": false, + "tls11Enabled": false + } + } + }, + "201": { + "body": { + "name": "default", + "type": "Microsoft.ApiManagement/service/gateways/hostnameConfigurations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/default", + "properties": { + "certificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "hostname": "*", + "http2Enabled": true, + "negotiateClientCertificate": false, + "tls10Enabled": false, + "tls11Enabled": false + } + } + } + }, + "operationId": "GatewayHostnameConfiguration_CreateOrUpdate", + "title": "ApiManagementCreateGatewayHostnameConfiguration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Delete.json new file mode 100644 index 0000000000..13321efd24 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "gatewayId": "gw1", + "hcId": "default", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "GatewayHostnameConfiguration_Delete", + "title": "ApiManagementDeleteGatewayHostnameConfiguration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Get.json new file mode 100644 index 0000000000..2d845416a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Get.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "hcId": "default", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.ApiManagement/service/gateways/hostnameConfigurations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/default", + "properties": { + "certificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "hostname": "*", + "negotiateClientCertificate": false + } + } + } + }, + "operationId": "GatewayHostnameConfiguration_Get", + "title": "ApiManagementGetGatewayHostnameConfiguration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_GetEntityTag.json new file mode 100644 index 0000000000..db1863b803 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "hcId": "default", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "GatewayHostnameConfiguration_GetEntityTag", + "title": "ApiManagementHeadGatewayHostnameConfiguration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_ListByService.json new file mode 100644 index 0000000000..458fc53ed0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_ListByService.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "", + "value": [ + { + "name": "default", + "type": "Microsoft.ApiManagement/service/gateways/hostnameConfigurations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/default", + "properties": { + "certificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "hostname": "*", + "negotiateClientCertificate": false + } + }, + { + "name": "default", + "type": "Microsoft.ApiManagement/service/gateways/hostnameConfigurations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/hostname1", + "properties": { + "certificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert2", + "hostname": "foo.bar.com", + "negotiateClientCertificate": true + } + } + ] + } + } + }, + "operationId": "GatewayHostnameConfiguration_ListByService", + "title": "ApiManagementListGatewayHostnameConfigurations" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_CreateOrUpdate.json new file mode 100644 index 0000000000..a31089003a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_CreateOrUpdate.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "parameters": { + "properties": { + "description": "my gateway 1", + "locationData": { + "name": "my location" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "a1", + "type": "Microsoft.ApiManagement/service/gateways", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1", + "properties": { + "description": "my gateway 1", + "locationData": { + "name": "my location" + } + } + } + }, + "201": { + "body": { + "name": "a1", + "type": "Microsoft.ApiManagement/service/gateways", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1", + "properties": { + "description": "my gateway 1", + "locationData": { + "name": "my location" + } + } + } + } + }, + "operationId": "Gateway_CreateOrUpdate", + "title": "ApiManagementCreateGateway" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Delete.json new file mode 100644 index 0000000000..92e7521761 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Gateway_Delete", + "title": "ApiManagementDeleteGateway" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GenerateToken.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GenerateToken.json new file mode 100644 index 0000000000..b2ef83c6be --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GenerateToken.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "parameters": { + "expiry": "2020-04-21T00:44:24.2845269Z", + "keyType": "primary" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": "gw1&201904210044&9A1GR1f5WIhFvFmzQG+xxxxxxxxxxx/kBeu87DWad3tkasUXuvPL+MgzlwUHyg==" + } + } + }, + "operationId": "Gateway_GenerateToken", + "title": "ApiManagementGatewayGenerateToken" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Get.json new file mode 100644 index 0000000000..0a816141e9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Get.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "a1", + "type": "Microsoft.ApiManagement/service/gateways", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1", + "properties": { + "description": "my gateway 1", + "locationData": { + "name": "my location" + } + } + } + } + }, + "operationId": "Gateway_Get", + "title": "ApiManagementGetGateway" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GetEntityTag.json new file mode 100644 index 0000000000..b557fffaaa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "mygateway", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Gateway_GetEntityTag", + "title": "ApiManagementHeadGateway" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListByService.json new file mode 100644 index 0000000000..660515ea99 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListByService.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "name": "a1", + "type": "Microsoft.ApiManagement/service/gateways", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1", + "properties": { + "description": "my gateway 1", + "locationData": { + "name": "my location 1" + } + } + }, + { + "name": "5a73933b8f27f7cc82a2d533", + "type": "Microsoft.ApiManagement/service/gateways", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw2", + "properties": { + "description": "my gateway 2", + "locationData": { + "name": "my location 2" + } + } + } + ] + } + } + }, + "operationId": "Gateway_ListByService", + "title": "ApiManagementListGateways" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListKeys.json new file mode 100644 index 0000000000..0c37f4abe2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListKeys.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "primary": "primary_key_value", + "secondary": "secondary_key_value" + } + } + }, + "operationId": "Gateway_ListKeys", + "title": "ApiManagementGatewayListKeys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_RegenerateKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_RegenerateKey.json new file mode 100644 index 0000000000..5883e40ab4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_RegenerateKey.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gwId", + "parameters": { + "keyType": "primary" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "204": {} + }, + "operationId": "Gateway_RegenerateKey", + "title": "ApiManagementGatewayRegenerateKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Update.json new file mode 100644 index 0000000000..8e1cc6a0e9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Update.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "gatewayId": "gw1", + "parameters": { + "properties": { + "description": "my gateway 1", + "locationData": { + "name": "my location" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "a1", + "type": "Microsoft.ApiManagement/service/gateways", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1", + "properties": { + "description": "my gateway 1", + "locationData": { + "name": "my location" + } + } + } + } + }, + "operationId": "Gateway_Update", + "title": "ApiManagementUpdateGateway" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema1.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema1.json new file mode 100644 index 0000000000..68b824520b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema1.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "description": "sample schema description", + "schemaType": "xml", + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + }, + "resourceGroupName": "rg1", + "schemaId": "schema1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "schema1", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1", + "properties": { + "description": "sample schema description", + "schemaType": "xml", + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + }, + "201": { + "body": { + "name": "schema1", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1", + "properties": { + "description": "sample schema description", + "schemaType": "xml", + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "GlobalSchema_CreateOrUpdate", + "title": "ApiManagementCreateSchema1" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema2.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema2.json new file mode 100644 index 0000000000..c9091dac3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema2.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "description": "sample schema description", + "document": { + "type": "object", + "$id": "https://example.com/person.schema.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "age": { + "type": "integer", + "description": "Age in years which must be equal to or greater than zero.", + "minimum": 0 + }, + "firstName": { + "type": "string", + "description": "The person's first name." + }, + "lastName": { + "type": "string", + "description": "The person's last name." + } + }, + "title": "Person" + }, + "schemaType": "json" + } + }, + "resourceGroupName": "rg1", + "schemaId": "schema1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "schema1", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1", + "properties": { + "description": "sample schema description", + "document": { + "type": "object", + "$id": "https://example.com/person.schema.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "age": { + "type": "integer", + "description": "Age in years which must be equal to or greater than zero.", + "minimum": 0 + }, + "firstName": { + "type": "string", + "description": "The person's first name." + }, + "lastName": { + "type": "string", + "description": "The person's last name." + } + }, + "title": "Person" + }, + "schemaType": "json" + } + } + }, + "201": { + "body": { + "name": "schema1", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1", + "properties": { + "description": "sample schema description", + "document": { + "type": "object", + "$id": "https://example.com/person.schema.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "age": { + "type": "integer", + "description": "Age in years which must be equal to or greater than zero.", + "minimum": 0 + }, + "firstName": { + "type": "string", + "description": "The person's first name." + }, + "lastName": { + "type": "string", + "description": "The person's last name." + } + }, + "title": "Person" + }, + "schemaType": "json" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "GlobalSchema_CreateOrUpdate", + "title": "ApiManagementCreateSchema2" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Delete.json new file mode 100644 index 0000000000..70af7a3d65 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "schemaId": "schema1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "GlobalSchema_Delete", + "title": "ApiManagementDeleteSchema" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_GetEntityTag.json new file mode 100644 index 0000000000..f6d335915e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "schemaId": "myschema", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "GlobalSchema_GetEntityTag", + "title": "ApiManagementHeadApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema1.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema1.json new file mode 100644 index 0000000000..0a38bb3164 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema1.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "schemaId": "schema1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "schema1", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1", + "properties": { + "description": "sample schema description", + "schemaType": "xml", + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + } + }, + "operationId": "GlobalSchema_Get", + "title": "ApiManagementGetSchema1" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema2.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema2.json new file mode 100644 index 0000000000..b21f3a1d3a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema2.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "schemaId": "schema2", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "schema2", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema2", + "properties": { + "description": "sample schema description", + "document": { + "type": "object", + "$id": "https://example.com/person.schema.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "age": { + "type": "integer", + "description": "Age in years which must be equal to or greater than zero.", + "minimum": 0 + }, + "firstName": { + "type": "string", + "description": "The person's first name." + }, + "lastName": { + "type": "string", + "description": "The person's last name." + } + }, + "title": "Person" + }, + "schemaType": "json" + } + } + } + }, + "operationId": "GlobalSchema_Get", + "title": "ApiManagementGetSchema2" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_ListByService.json new file mode 100644 index 0000000000..03224a01b6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_ListByService.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "name": "schema1", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1", + "properties": { + "description": "sample schema description", + "schemaType": "xml", + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + }, + { + "name": "schema2", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema2", + "properties": { + "description": "sample schema description", + "document": { + "type": "object", + "$id": "https://example.com/person.schema.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "age": { + "type": "integer", + "description": "Age in years which must be equal to or greater than zero.", + "minimum": 0 + }, + "firstName": { + "type": "string", + "description": "The person's first name." + }, + "lastName": { + "type": "string", + "description": "The person's last name." + } + }, + "title": "Person" + }, + "schemaType": "json" + } + } + ] + } + } + }, + "operationId": "GlobalSchema_ListByService", + "title": "ApiManagementListSchemas" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GroupUser_List.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GroupUser_List.json new file mode 100644 index 0000000000..a141230205 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GroupUser_List.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "groupId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "armTemplateUser1", + "type": "Microsoft.ApiManagement/service/groups/users", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/kjoshiarmTemplateUser1", + "properties": { + "email": "user1@live.com", + "firstName": "user1", + "identities": [ + { + "id": "user1@live.com", + "provider": "Basic" + } + ], + "lastName": "lastname1", + "note": "note for user 1", + "registrationDate": "2017-05-31T18:54:41.447Z", + "state": "active" + } + } + ] + } + } + }, + "operationId": "GroupUser_List", + "title": "ApiManagementListGroupUsers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroup.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroup.json new file mode 100644 index 0000000000..f16593c4dd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroup.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "groupId": "tempgroup", + "parameters": { + "properties": { + "displayName": "temp group" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "tempgroup", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/tempgroup", + "properties": { + "type": "custom", + "displayName": "temp group" + } + } + }, + "201": { + "body": { + "name": "tempgroup", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/tempgroup", + "properties": { + "type": "custom", + "displayName": "temp group" + } + } + } + }, + "operationId": "Group_CreateOrUpdate", + "title": "ApiManagementCreateGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroupExternal.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroupExternal.json new file mode 100644 index 0000000000..26433daf0e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroupExternal.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "groupId": "aadGroup", + "parameters": { + "properties": { + "type": "external", + "description": "new group to test", + "displayName": "NewGroup (samiraad.onmicrosoft.com)", + "externalId": "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "aadGroup", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/aadGroup", + "properties": { + "type": "external", + "description": "new group to test", + "displayName": "NewGroup (samiraad.onmicrosoft.com)", + "externalId": "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d" + } + } + }, + "201": { + "body": { + "name": "aadGroup", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/aadGroup", + "properties": { + "type": "external", + "description": "new group to test", + "displayName": "NewGroup (samiraad.onmicrosoft.com)", + "externalId": "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d" + } + } + } + }, + "operationId": "Group_CreateOrUpdate", + "title": "ApiManagementCreateGroupExternal" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Delete.json new file mode 100644 index 0000000000..66d5d78217 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "groupId": "aadGroup", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Group_Delete", + "title": "ApiManagementDeleteGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Get.json new file mode 100644 index 0000000000..f165b46a04 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "groupId": "59306a29e4bbd510dc24e5f9", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "59306a29e4bbd510dc24e5f9", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/59306a29e4bbd510dc24e5f9", + "properties": { + "type": "external", + "description": "awesome group of people", + "builtIn": false, + "displayName": "AwesomeGroup (samiraad.onmicrosoft.com)", + "externalId": "aad://samiraad.onmicrosoft.com/groups/3773adf4-032e-4d25-9988-eaff9ca72eca" + } + } + } + }, + "operationId": "Group_Get", + "title": "ApiManagementGetGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_GetEntityTag.json new file mode 100644 index 0000000000..e99ea1b161 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "groupId": "59306a29e4bbd510dc24e5f9", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Group_GetEntityTag", + "title": "ApiManagementHeadGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_ListByService.json new file mode 100644 index 0000000000..d87b15f960 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_ListByService.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 4, + "nextLink": "", + "value": [ + { + "name": "5600b59375ff190048020001", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b59375ff190048020001", + "properties": { + "type": "system", + "description": "Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group.", + "builtIn": true, + "displayName": "Administrators" + } + }, + { + "name": "59306a29e4bbd510dc24e5f9", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/59306a29e4bbd510dc24e5f9", + "properties": { + "type": "external", + "description": "awesome group of people", + "builtIn": false, + "displayName": "AwesomeGroup (samiraad.onmicrosoft.com)", + "externalId": "aad://samiraad.onmicrosoft.com/groups/3773adf4-032e-4d25-9988-eaff9ca72eca" + } + }, + { + "name": "5600b59375ff190048020002", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b59375ff190048020002", + "properties": { + "type": "system", + "description": "Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.", + "builtIn": true, + "displayName": "Developers" + } + }, + { + "name": "5600b59375ff190048020003", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b59375ff190048020003", + "properties": { + "type": "system", + "description": "Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group.", + "builtIn": true, + "displayName": "Guests" + } + } + ] + } + } + }, + "operationId": "Group_ListByService", + "title": "ApiManagementListGroups" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Update.json new file mode 100644 index 0000000000..a38cc3d079 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Update.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "groupId": "tempgroup", + "parameters": { + "properties": { + "displayName": "temp group" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "tempgroup", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/tempgroup", + "properties": { + "type": "external", + "description": "awesome group of people", + "builtIn": false, + "displayName": "tempgroup", + "externalId": "aad://samiraad.onmicrosoft.com/groups/3773adf4-032e-4d25-9988-eaff9ca72eca" + } + } + } + }, + "operationId": "Group_Update", + "title": "ApiManagementUpdateGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_CreateOrUpdate.json new file mode 100644 index 0000000000..07f97d786c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_CreateOrUpdate.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "identityProviderName": "facebook", + "parameters": { + "properties": { + "clientId": "facebookid", + "clientSecret": "facebookapplicationsecret" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "Facebook", + "type": "Microsoft.ApiManagement/service/identityProviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/Facebook", + "properties": { + "type": "facebook", + "clientId": "facebookid" + } + } + }, + "201": { + "body": { + "name": "Facebook", + "type": "Microsoft.ApiManagement/service/identityProviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/Facebook", + "properties": { + "type": "facebook", + "clientId": "facebookid" + } + } + } + }, + "operationId": "IdentityProvider_CreateOrUpdate", + "title": "ApiManagementCreateIdentityProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Delete.json new file mode 100644 index 0000000000..b32b62835a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "identityProviderName": "aad", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "IdentityProvider_Delete", + "title": "ApiManagementDeleteIdentityProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Get.json new file mode 100644 index 0000000000..5b79d1e875 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Get.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "identityProviderName": "aadB2C", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "AadB2C", + "type": "Microsoft.ApiManagement/service/identityProviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/AadB2C", + "properties": { + "type": "aadB2C", + "allowedTenants": [ + "contosoaadb2c.onmicrosoft.com", + "contoso2aadb2c.onmicrosoft.com" + ], + "authority": "login.microsoftonline.com", + "clientId": "f02dafe2-b8b8-48ec-a38e-27e5c16c51e5", + "signinPolicyName": "B2C_1_policy-signin", + "signinTenant": "contosoaadb2c.onmicrosoft.com", + "signupPolicyName": "B2C_1_policy-signup" + } + } + } + }, + "operationId": "IdentityProvider_Get", + "title": "ApiManagementGetIdentityProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_GetEntityTag.json new file mode 100644 index 0000000000..0c3c358ef5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "identityProviderName": "aadB2C", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "IdentityProvider_GetEntityTag", + "title": "ApiManagementHeadIdentityProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListByService.json new file mode 100644 index 0000000000..63e53a0b91 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListByService.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "Google", + "type": "Microsoft.ApiManagement/service/identityProviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/Google", + "properties": { + "type": "google", + "clientId": "googleId" + } + }, + { + "name": "Aad", + "type": "Microsoft.ApiManagement/service/identityProviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/Aad", + "properties": { + "type": "aad", + "allowedTenants": [ + "samiraad.onmicrosoft.com" + ], + "clientId": "aadapplicationid" + } + }, + { + "name": "AadB2C", + "type": "Microsoft.ApiManagement/service/identityProviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/AadB2C", + "properties": { + "type": "aadB2C", + "allowedTenants": [ + "samirtestbc.onmicrosoft.com" + ], + "clientId": "aadb2clientId", + "signinPolicyName": "B2C_1_Signin_Default", + "signupPolicyName": "B2C_1_Signup_Default" + } + } + ] + } + } + }, + "operationId": "IdentityProvider_ListByService", + "title": "ApiManagementListIdentityProviders" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListSecrets.json new file mode 100644 index 0000000000..92f33dbcef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListSecrets.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "identityProviderName": "aadB2C", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "clientSecret": "XXXXXXX" + } + } + }, + "operationId": "IdentityProvider_ListSecrets", + "title": "ApiManagementIdentityProviderListSecrets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Update.json new file mode 100644 index 0000000000..ddc2d279f7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Update.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "identityProviderName": "facebook", + "parameters": { + "properties": { + "clientId": "updatedfacebookid", + "clientSecret": "updatedfacebooksecret" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "AadB2C", + "type": "Microsoft.ApiManagement/service/identityProviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/AadB2C", + "properties": { + "type": "aadB2C", + "allowedTenants": [ + "contosoaadb2c.onmicrosoft.com", + "contoso2aadb2c.onmicrosoft.com" + ], + "authority": "login.microsoftonline.com", + "clientId": "f02dafe2-b8b8-48ec-a38e-27e5c16c51e5", + "signinPolicyName": "B2C_1_policy-signin", + "signinTenant": "contosoaadb2c.onmicrosoft.com", + "signupPolicyName": "B2C_1_policy-signup" + } + } + } + }, + "operationId": "IdentityProvider_Update", + "title": "ApiManagementUpdateIdentityProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateAiLogger.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateAiLogger.json new file mode 100644 index 0000000000..1b83a294d7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateAiLogger.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "loggerId": "loggerId", + "parameters": { + "properties": { + "description": "adding a new logger", + "credentials": { + "instrumentationKey": "11................a1" + }, + "loggerType": "applicationInsights" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "loggerId", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/loggerId", + "properties": { + "description": null, + "credentials": { + "instrumentationKey": "{{5a.......2a}}" + }, + "isBuffered": false, + "loggerType": "applicationInsights" + } + } + }, + "201": { + "body": { + "name": "loggerId", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/loggerId", + "properties": { + "description": null, + "credentials": { + "instrumentationKey": "{{5a.......2a}}" + }, + "isBuffered": false, + "loggerType": "applicationInsights", + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/microsoft.insights/components/airesource" + } + } + } + }, + "operationId": "Logger_CreateOrUpdate", + "title": "ApiManagementCreateAILogger" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateEhLogger.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateEhLogger.json new file mode 100644 index 0000000000..f6a320c60c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateEhLogger.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "loggerId": "eh1", + "parameters": { + "properties": { + "description": "adding a new logger", + "credentials": { + "name": "hydraeventhub", + "connectionString": "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=" + }, + "loggerType": "azureEventHub" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "eh1", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/eh1", + "properties": { + "description": "adding a new logger", + "credentials": { + "connectionString": "{{Logger-Credentials-5f28745bbebeeb13cc3f7301}}" + }, + "isBuffered": true, + "loggerType": "azureEventHub" + } + } + }, + "201": { + "body": { + "name": "eh1", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/eh1", + "properties": { + "description": "adding a new logger", + "credentials": { + "connectionString": "{{Logger-Credentials-5f28745bbebeeb13cc3f7301}}" + }, + "isBuffered": true, + "loggerType": "azureEventHub" + } + } + } + }, + "operationId": "Logger_CreateOrUpdate", + "title": "ApiManagementCreateEHLogger" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Delete.json new file mode 100644 index 0000000000..9b19192374 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "loggerId": "loggerId", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Logger_Delete", + "title": "ApiManagementDeleteLogger" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Get.json new file mode 100644 index 0000000000..aab585973b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Get.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "loggerId": "templateLogger", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "kloudapilogger1", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/kloudapilogger1", + "properties": { + "description": "testeventhub3again", + "credentials": { + "name": "testeventhub4", + "connectionString": "Endpoint=sb://eventhubapim.servicebus.windows.net/;SharedAccessKeyName=Sender;SharedAccessKey=************" + }, + "isBuffered": true, + "loggerType": "azureEventHub", + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.EventHub/namespaces/eventhubapim" + } + } + } + }, + "operationId": "Logger_Get", + "title": "ApiManagementGetLogger" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_GetEntityTag.json new file mode 100644 index 0000000000..e16614ef3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "loggerId": "templateLogger", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Logger_GetEntityTag", + "title": "ApiManagementHeadLogger" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_ListByService.json new file mode 100644 index 0000000000..054b3ebfc0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_ListByService.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "azuremonitor", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/azuremonitor", + "properties": { + "isBuffered": true, + "loggerType": "azureMonitor" + } + }, + { + "name": "vvktest", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/vvktest", + "properties": { + "credentials": { + "instrumentationKey": "{{Logger-Credentials-5b1a17ef2b3f91153004b10d}}" + }, + "isBuffered": true, + "loggerType": "applicationInsights" + } + }, + { + "name": "applicationinsights", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/applicationinsights", + "properties": { + "description": "miaoappinsight", + "credentials": { + "instrumentationKey": "{{Logger-Credentials-5b2056062b3f911ae84a3069}}" + }, + "isBuffered": true, + "loggerType": "applicationInsights" + } + } + ] + } + } + }, + "operationId": "Logger_ListByService", + "title": "ApiManagementListLoggers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Update.json new file mode 100644 index 0000000000..46078a8f18 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Update.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "loggerId": "eh1", + "parameters": { + "properties": { + "description": "updating description", + "loggerType": "azureEventHub" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "eh1", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/eh1", + "properties": { + "description": "updating description", + "credentials": { + "connectionString": "{{Logger-Credentials-5f28745bbebeeb13cc3f7301}}" + }, + "isBuffered": true, + "loggerType": "azureEventHub" + } + } + } + }, + "operationId": "Logger_Update", + "title": "ApiManagementUpdateLogger" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValue.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValue.json new file mode 100644 index 0000000000..b253fe8ee7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValue.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "namedValueId": "testprop2", + "parameters": { + "properties": { + "displayName": "prop3name", + "secret": false, + "tags": [ + "foo", + "bar" + ], + "value": "propValue" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testprop2", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2", + "properties": { + "displayName": "prop3name", + "secret": false, + "tags": [ + "foo", + "bar" + ], + "value": "propValue" + } + } + }, + "201": { + "body": { + "name": "testprop2", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2", + "properties": { + "displayName": "prop3name", + "secret": false, + "tags": [ + "foo", + "bar" + ], + "value": "propValue" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "NamedValue_CreateOrUpdate", + "title": "ApiManagementCreateNamedValue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValueWithKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValueWithKeyVault.json new file mode 100644 index 0000000000..9cf30d88a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValueWithKeyVault.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "namedValueId": "testprop6", + "parameters": { + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "secretIdentifier": "https://contoso.vault.azure.net/secrets/aadSecret" + }, + "secret": true, + "tags": [ + "foo", + "bar" + ] + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testprop6", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6", + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-11T00:54:31.8024882Z" + }, + "secretIdentifier": "https://contoso.vault.azure.net/secrets/aadSecret" + }, + "secret": true, + "tags": [ + "foo", + "bar" + ] + } + } + }, + "201": { + "body": { + "name": "testprop6", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6", + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-11T00:54:31.8024882Z" + }, + "secretIdentifier": "https://contoso.vault.azure.net/secrets/aadSecret" + }, + "secret": true, + "tags": [ + "foo", + "bar" + ] + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "NamedValue_CreateOrUpdate", + "title": "ApiManagementCreateNamedValueWithKeyVault" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Delete.json new file mode 100644 index 0000000000..8dd43a560c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "namedValueId": "testprop2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "NamedValue_Delete", + "title": "ApiManagementDeleteNamedValue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_GetEntityTag.json new file mode 100644 index 0000000000..b2055a18ac --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "namedValueId": "testarmTemplateproperties2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "NamedValue_GetEntityTag", + "title": "ApiManagementHeadNamedValue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValue.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValue.json new file mode 100644 index 0000000000..b51fa4ac32 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValue.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "namedValueId": "testarmTemplateproperties2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testarmTemplateproperties2", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testarmTemplateproperties2", + "properties": { + "displayName": "propName", + "secret": false, + "tags": [ + "foo", + "bar" + ], + "value": "propValue" + } + } + } + }, + "operationId": "NamedValue_Get", + "title": "ApiManagementGetNamedValue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValueWithKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValueWithKeyVault.json new file mode 100644 index 0000000000..34bb4e1ae7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValueWithKeyVault.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "namedValueId": "testprop6", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testprop6", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6", + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "identityClientId": "2d2df842-44d8-4885-8dec-77cc1a984a31", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-11T00:54:31.8024882Z" + }, + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + }, + "secret": true, + "tags": [ + "foo", + "bar" + ] + } + } + } + }, + "operationId": "NamedValue_Get", + "title": "ApiManagementGetNamedValueWithKeyVault" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListByService.json new file mode 100644 index 0000000000..7bb62a6bd3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListByService.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "592f1174cc83890dc4f32686", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/592f1174cc83890dc4f32686", + "properties": { + "displayName": "Logger-Credentials-592f1174cc83890dc4f32687", + "secret": false, + "value": "propValue" + } + }, + { + "name": "testprop6", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6", + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "identityClientId": "2d2df842-44d8-4885-8dec-77cc1a984a31", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-11T00:54:31.8024882Z" + }, + "secretIdentifier": "https://contoso.vault.azure.net/secrets/aadSecret" + }, + "secret": true, + "tags": [ + "foo", + "bar" + ] + } + } + ] + } + } + }, + "operationId": "NamedValue_ListByService", + "title": "ApiManagementListNamedValues" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListValue.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListValue.json new file mode 100644 index 0000000000..b73e374dc7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListValue.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "namedValueId": "testarmTemplateproperties2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": "propValue" + } + } + }, + "operationId": "NamedValue_ListValue", + "title": "ApiManagementNamedValueListValue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_RefreshSecret.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_RefreshSecret.json new file mode 100644 index 0000000000..c48a1c75c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_RefreshSecret.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "namedValueId": "testprop2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testprop6", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6", + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "identityClientId": "2d2df842-44d8-4885-8dec-77cc1a984a31", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-11T00:54:31.8024882Z" + }, + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + }, + "secret": true, + "tags": [ + "foo", + "bar" + ] + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6/refreshSecret?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "NamedValue_RefreshSecret", + "title": "ApiManagementRefreshNamedValue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Update.json new file mode 100644 index 0000000000..95d9d2ddd0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Update.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "namedValueId": "testprop2", + "parameters": { + "properties": { + "displayName": "prop3name", + "secret": false, + "tags": [ + "foo", + "bar2" + ], + "value": "propValue" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2", + "properties": { + "displayName": "prop3name", + "secret": false, + "tags": [ + "foo", + "bar2" + ], + "value": "propValue" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=204" + } + } + }, + "operationId": "NamedValue_Update", + "title": "ApiManagementUpdateNamedValue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByLocation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByLocation.json new file mode 100644 index 0000000000..9e75833d0e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByLocation.json @@ -0,0 +1,148 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "locationName": "North Central US", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "connectivityStatus": [ + { + "name": "apimgmtst6tnxxxxxxxxxxx.blob.core.windows.net", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:55.9365931Z", + "lastUpdated": "2020-11-24T22:55:14.7035899Z", + "resourceType": "BlobStorage", + "status": "success" + }, + { + "name": "apimgmtst6tnxxxxxxxxxxx.file.core.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:55.9265938Z", + "lastUpdated": "2020-11-24T22:55:41.5322463Z", + "resourceType": "FileStorage", + "status": "success" + }, + { + "name": "apimgmtst6tnxxxxxxxxxxx.queue.core.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:55.8410477Z", + "lastUpdated": "2020-11-24T22:55:30.645994Z", + "resourceType": "Queue", + "status": "success" + }, + { + "name": "apimgmtst6tnxxxxxxxxxxx.table.core.windows.net", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:55.9365931Z", + "lastUpdated": "2020-11-24T22:55:23.8789171Z", + "resourceType": "TableStorage", + "status": "success" + }, + { + "name": "gcs.prod.monitoring.core.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T08:07:37.5486932Z", + "lastUpdated": "2020-11-24T22:57:34.8666833Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "https://gcs.ppe.warm.ingestion.monitoring.azure.com", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.1060523Z", + "lastUpdated": "2020-11-24T22:56:26.1870188Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "https://global.metrics.nsatc.net/", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.0510519Z", + "lastUpdated": "2020-11-24T22:56:35.9620612Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "https://login.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.1060523Z", + "lastUpdated": "2020-11-24T22:56:30.8047708Z", + "resourceType": "AzureActiveDirectory", + "status": "success" + }, + { + "name": "https://prod2.metrics.nsatc.net:1886/RecoveryService", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.2796235Z", + "lastUpdated": "2020-11-24T22:56:45.2095302Z", + "resourceType": "Metrics", + "status": "success" + }, + { + "name": "LocalGatewayRedis", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:55.9365931Z", + "lastUpdated": "2020-11-24T22:55:15.1345836Z", + "resourceType": "InternalCache", + "status": "success" + }, + { + "name": "prod.warmpath.msftcloudes.com", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:55.8410477Z", + "lastUpdated": "2020-11-24T22:55:57.8992141Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "Scm", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:57.325384Z", + "lastUpdated": "2020-11-24T23:03:57.6187917Z", + "resourceType": "SourceControl", + "status": "success" + }, + { + "name": "smtpi-xxx.msn.com:25028", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.3510577Z", + "lastUpdated": "2020-11-24T22:58:22.2430074Z", + "resourceType": "Email", + "status": "success" + }, + { + "name": "zwcvuxxxx.database.windows.net", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:56.0410467Z", + "lastUpdated": "2020-11-24T22:55:44.3582171Z", + "resourceType": "SQLDatabase", + "status": "success" + } + ], + "dnsServers": [ + "10.82.98.10" + ] + } + } + }, + "operationId": "NetworkStatus_ListByLocation", + "title": "ApiManagementServiceGetNetworkStatusByLocation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByService.json new file mode 100644 index 0000000000..e037e56c19 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByService.json @@ -0,0 +1,152 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": [ + { + "location": "West US", + "networkStatus": { + "connectivityStatus": [ + { + "name": "apimgmtst6xxxxxxxxxxx.blob.core.windows.net", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:55.9365931Z", + "lastUpdated": "2020-11-24T22:55:14.7035899Z", + "resourceType": "BlobStorage", + "status": "success" + }, + { + "name": "apimgmtst6xxxxxxxxxxx.file.core.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:55.9265938Z", + "lastUpdated": "2020-11-24T22:55:41.5322463Z", + "resourceType": "FileStorage", + "status": "success" + }, + { + "name": "apimgmtst6xxxxxxxxxxx.queue.core.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:55.8410477Z", + "lastUpdated": "2020-11-24T22:55:30.645994Z", + "resourceType": "Queue", + "status": "success" + }, + { + "name": "apimgmtst6xxxxxxxxxxx.table.core.windows.net", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:55.9365931Z", + "lastUpdated": "2020-11-24T22:55:23.8789171Z", + "resourceType": "TableStorage", + "status": "success" + }, + { + "name": "gcs.prod.monitoring.core.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T08:07:37.5486932Z", + "lastUpdated": "2020-11-24T22:57:34.8666833Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "https://gcs.ppe.warm.ingestion.monitoring.azure.com", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.1060523Z", + "lastUpdated": "2020-11-24T22:56:26.1870188Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "https://global.metrics.nsatc.net/", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.0510519Z", + "lastUpdated": "2020-11-24T22:56:35.9620612Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "https://login.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.1060523Z", + "lastUpdated": "2020-11-24T22:56:30.8047708Z", + "resourceType": "AzureActiveDirectory", + "status": "success" + }, + { + "name": "https://prod2.metrics.nsatc.net:1886/RecoveryService", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.2796235Z", + "lastUpdated": "2020-11-24T22:56:45.2095302Z", + "resourceType": "Metrics", + "status": "success" + }, + { + "name": "LocalGatewayRedis", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:55.9365931Z", + "lastUpdated": "2020-11-24T22:55:15.1345836Z", + "resourceType": "InternalCache", + "status": "success" + }, + { + "name": "prod.warmpath.msftcloudes.com", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:55.8410477Z", + "lastUpdated": "2020-11-24T22:55:57.8992141Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "Scm", + "error": "", + "isOptional": true, + "lastStatusChange": "2019-07-20T02:25:48.7066996Z", + "lastUpdated": "2020-11-24T23:01:24.0553684Z", + "resourceType": "SourceControl", + "status": "success" + }, + { + "name": "smtpi-ch1.msn.com:25028", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.3510577Z", + "lastUpdated": "2020-11-24T22:58:22.2430074Z", + "resourceType": "Email", + "status": "success" + }, + { + "name": "zwcvuxxxx.database.windows.net", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:56.0410467Z", + "lastUpdated": "2020-11-24T22:55:44.3582171Z", + "resourceType": "SQLDatabase", + "status": "success" + } + ], + "dnsServers": [ + "10.82.98.10" + ] + } + } + ] + } + }, + "operationId": "NetworkStatus_ListByService", + "title": "ApiManagementServiceGetNetworkStatus" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientEmail_ListByNotification.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientEmail_ListByNotification.json new file mode 100644 index 0000000000..b32464ac80 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientEmail_ListByNotification.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "notificationName": "RequestPublisherNotificationMessage", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "contoso@live.com", + "type": "Microsoft.ApiManagement/service/notifications/recipientEmails", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/contoso@live.com", + "properties": { + "email": "contoso@live.com" + } + }, + { + "name": "foobar!live", + "type": "Microsoft.ApiManagement/service/notifications/recipientEmails", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/foobar!live", + "properties": { + "email": "foobar!live" + } + }, + { + "name": "foobar@live.com", + "type": "Microsoft.ApiManagement/service/notifications/recipientEmails", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/foobar@live.com", + "properties": { + "email": "foobar@live.com" + } + } + ] + } + } + }, + "operationId": "NotificationRecipientEmail_ListByNotification", + "title": "ApiManagementListNotificationRecipientEmails" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientUser_ListByNotification.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientUser_ListByNotification.json new file mode 100644 index 0000000000..6ff0e9faab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientUser_ListByNotification.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "notificationName": "RequestPublisherNotificationMessage", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "576823d0a40f7e74ec07d642", + "type": "Microsoft.ApiManagement/service/notifications/recipientUsers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientUsers/576823d0a40f7e74ec07d642", + "properties": { + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/576823d0a40f7e74ec07d642" + } + } + ] + } + } + }, + "operationId": "NotificationRecipientUser_ListByNotification", + "title": "ApiManagementListNotificationRecipientUsers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_CreateOrUpdate.json new file mode 100644 index 0000000000..32313e9eb5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_CreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "notificationName": "RequestPublisherNotificationMessage", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "RequestPublisherNotificationMessage", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage", + "properties": { + "description": "The following email recipients and users will receive email notifications about subscription requests for API products requiring approval.", + "recipients": { + "emails": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/contoso@live.com", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/foobar!live", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/foobar@live.com" + ], + "users": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/576823d0a40f7e74ec07d642" + ] + }, + "title": "Subscription requests (requiring approval)" + } + } + } + }, + "operationId": "Notification_CreateOrUpdate", + "title": "ApiManagementCreateNotification" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_Get.json new file mode 100644 index 0000000000..e31e85669d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_Get.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "notificationName": "RequestPublisherNotificationMessage", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "RequestPublisherNotificationMessage", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage", + "properties": { + "description": "The following email recipients and users will receive email notifications about subscription requests for API products requiring approval.", + "recipients": { + "emails": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/contoso@live.com", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/foobar!live", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/foobar@live.com" + ], + "users": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/576823d0a40f7e74ec07d642" + ] + }, + "title": "Subscription requests (requiring approval)" + } + } + } + }, + "operationId": "Notification_Get", + "title": "ApiManagementGetNotification" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_ListByService.json new file mode 100644 index 0000000000..0c27b5b6bc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_ListByService.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 7, + "nextLink": "", + "value": [ + { + "name": "RequestPublisherNotificationMessage", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage", + "properties": { + "description": "The following email recipients and users will receive email notifications about subscription requests for API products requiring approval.", + "recipients": { + "emails": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/contoso@live.com", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/foobar!live", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/foobar@live.com" + ], + "users": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/576823d0a40f7e74ec07d642" + ] + }, + "title": "Subscription requests (requiring approval)" + } + }, + { + "name": "PurchasePublisherNotificationMessage", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/PurchasePublisherNotificationMessage", + "properties": { + "description": "The following email recipients and users will receive email notifications about new API product subscriptions.", + "recipients": { + "emails": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/contoso@live.com" + ], + "users": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + ] + }, + "title": "New subscriptions" + } + }, + { + "name": "NewApplicationNotificationMessage", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/NewApplicationNotificationMessage", + "properties": { + "description": "The following email recipients and users will receive email notifications when new applications are submitted to the application gallery.", + "recipients": { + "emails": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/contoso@live.com" + ], + "users": [] + }, + "title": "Application gallery requests" + } + }, + { + "name": "BCC", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/BCC", + "properties": { + "description": "The following recipients will receive blind carbon copies of all emails sent to developers.", + "recipients": { + "emails": [], + "users": [] + }, + "title": "BCC" + } + }, + { + "name": "NewIssuePublisherNotificationMessage", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/NewIssuePublisherNotificationMessage", + "properties": { + "description": "The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal.", + "recipients": { + "emails": [], + "users": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + ] + }, + "title": "New issue or comment" + } + }, + { + "name": "AccountClosedPublisher", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/AccountClosedPublisher", + "properties": { + "description": "The following email recipients and users will receive email notifications when developer closes his account", + "recipients": { + "emails": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/contoso@live.com" + ], + "users": [] + }, + "title": "Close account message" + } + }, + { + "name": "QuotaLimitApproachingPublisherNotificationMessage", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/QuotaLimitApproachingPublisherNotificationMessage", + "properties": { + "description": "The following email recipients and users will receive email notifications when subscription usage gets close to usage quota.", + "recipients": { + "emails": [], + "users": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + ] + }, + "title": "Approaching subscription quota limit" + } + } + ] + } + } + }, + "operationId": "Notification_ListByService", + "title": "ApiManagementListNotifications" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_CreateOrUpdate.json new file mode 100644 index 0000000000..c7c0aa879f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_CreateOrUpdate.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "opid": "templateOpenIdConnect3", + "parameters": { + "properties": { + "clientId": "oidprovidertemplate3", + "clientSecret": "x", + "displayName": "templateoidprovider3", + "metadataEndpoint": "https://oidprovider-template3.net" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "templateOpenIdConnect3", + "type": "Microsoft.ApiManagement/service/openidconnectproviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/openidConnectProviders/templateOpenIdConnect3", + "properties": { + "clientId": "oidprovidertemplate3", + "displayName": "templateoidprovider3", + "metadataEndpoint": "https://oidprovider-template3.net" + } + } + }, + "201": { + "body": { + "name": "templateOpenIdConnect3", + "type": "Microsoft.ApiManagement/service/openidconnectproviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/openidConnectProviders/templateOpenIdConnect3", + "properties": { + "clientId": "oidprovidertemplate3", + "displayName": "templateoidprovider3", + "metadataEndpoint": "https://oidprovider-template3.net" + } + } + } + }, + "operationId": "OpenIdConnectProvider_CreateOrUpdate", + "title": "ApiManagementCreateOpenIdConnectProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Delete.json new file mode 100644 index 0000000000..61d3170f4d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "opid": "templateOpenIdConnect3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "OpenIdConnectProvider_Delete", + "title": "ApiManagementDeleteOpenIdConnectProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Get.json new file mode 100644 index 0000000000..c4326d9d76 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Get.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "opid": "templateOpenIdConnect2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "templateOpenIdConnect2", + "type": "Microsoft.ApiManagement/service/openidconnectproviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/openidConnectProviders/templateOpenIdConnect2", + "properties": { + "description": "open id provider template2", + "clientId": "oidprovidertemplate2", + "displayName": "templateoidprovider2", + "metadataEndpoint": "https://oidprovider-template2.net" + } + } + } + }, + "operationId": "OpenIdConnectProvider_Get", + "title": "ApiManagementGetOpenIdConnectProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListByService.json new file mode 100644 index 0000000000..5a2fbffc15 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListByService.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "templateOpenIdConnect2", + "type": "Microsoft.ApiManagement/service/openidconnectproviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/openidConnectProviders/templateOpenIdConnect2", + "properties": { + "description": "open id provider template2", + "clientId": "oidprovidertemplate2", + "displayName": "templateoidprovider2", + "metadataEndpoint": "https://oidprovider-template2.net" + } + } + ] + } + } + }, + "operationId": "OpenIdConnectProvider_ListByService", + "title": "ApiManagementListOpenIdConnectProviders" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListSecrets.json new file mode 100644 index 0000000000..8f7b4329e7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListSecrets.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "opid": "templateOpenIdConnect2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "clientSecret": "oidsecretproviderTemplate2" + } + } + }, + "operationId": "OpenIdConnectProvider_ListSecrets", + "title": "ApiManagementOpenidConnectProviderListSecrets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Update.json new file mode 100644 index 0000000000..788f66b05a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Update.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "opid": "templateOpenIdConnect2", + "parameters": { + "properties": { + "clientSecret": "updatedsecret" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "templateOpenIdConnect2", + "type": "Microsoft.ApiManagement/service/openidconnectproviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/openidConnectProviders/templateOpenIdConnect2", + "properties": { + "description": "open id provider template2", + "clientId": "oidprovidertemplate2", + "displayName": "templateoidprovider2", + "metadataEndpoint": "https://oidprovider-template2.net" + } + } + } + }, + "operationId": "OpenIdConnectProvider_Update", + "title": "ApiManagementUpdateOpenIdConnectProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Operation_ListByTags.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Operation_ListByTags.json new file mode 100644 index 0000000000..2813c968de --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Operation_ListByTags.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "a1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "value": [ + { + "operation": { + "name": "Create resource", + "method": "POST", + "description": "A demonstration of a POST call based on the echo backend above. The request body is expected to contain JSON-formatted data (see example below). A policy is used to automatically transform any request sent in JSON directly to XML. In a real-world scenario this could be used to enable modern clients to speak to a legacy backend.", + "apiName": "Echo API", + "apiRevision": "1", + "id": "/apis/echo-api/operations/create-resource", + "urlTemplate": "/resource" + }, + "tag": { + "name": "awesomeTag", + "id": "/tags/apitag123" + } + } + ] + } + } + }, + "operationId": "Operation_ListByTags", + "title": "ApiManagementListApiOperationsByTags" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OutboundNetworkDependenciesEndpoints_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OutboundNetworkDependenciesEndpoints_ListByService.json new file mode 100644 index 0000000000..c6e819b2b1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OutboundNetworkDependenciesEndpoints_ListByService.json @@ -0,0 +1,465 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "category": "Azure SMTP", + "endpoints": [ + { + "domainName": "smtpi-ch1.msn.com", + "endpointDetails": [ + { + "port": 25028, + "region": "West US" + } + ] + } + ] + }, + { + "category": "Azure SQL", + "endpoints": [ + { + "domainName": "xxxx1345234.database.windows.net", + "endpointDetails": [ + { + "port": 1433, + "region": "West US" + } + ] + } + ] + }, + { + "category": "Azure Storage", + "endpoints": [ + { + "domainName": "xxxx32storagedgfbay.blob.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx1362629927xt.blob.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx1362629927xt.table.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx141483183xt.blob.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx141483183xt.table.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx1949864718xt.blob.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx1949864718xt.table.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx3292114122xt.blob.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx3292114122xt.table.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx32tst4oto8t0mlesawmm.blob.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx32tst4oto8t0mlesawmm.file.core.windows.net", + "endpointDetails": [ + { + "port": 445, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx32tst4oto8t0mlesawmm.queue.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx32tst4oto8t0mlesawmm.table.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + } + ] + }, + { + "category": "Azure Event Hub", + "endpoints": [ + { + "domainName": "xxxx1362629927eh.servicebus.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + }, + { + "port": 5671, + "region": "West US" + }, + { + "port": 5672, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx1949864718eh.servicebus.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + }, + { + "port": 5671, + "region": "West US" + }, + { + "port": 5672, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx3292114122eh.servicebus.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + }, + { + "port": 5671, + "region": "West US" + }, + { + "port": 5672, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx141483183eh.servicebus.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + }, + { + "port": 5671, + "region": "West US" + }, + { + "port": 5672, + "region": "West US" + } + ] + } + ] + }, + { + "category": "SSL Certificate Verification", + "endpoints": [ + { + "domainName": "ocsp.msocsp.com", + "endpointDetails": [ + { + "port": 80, + "region": "Global" + }, + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "mscrl.microsoft.com", + "endpointDetails": [ + { + "port": 80, + "region": "Global" + }, + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "crl.microsoft.com", + "endpointDetails": [ + { + "port": 80, + "region": "Global" + }, + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "crl3.digicert.com", + "endpointDetails": [ + { + "port": 80, + "region": "Global" + }, + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "ocsp.digicert.com", + "endpointDetails": [ + { + "port": 80, + "region": "Global" + }, + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "cacerts.digicert.com", + "endpointDetails": [ + { + "port": 80, + "region": "Global" + }, + { + "port": 443, + "region": "Global" + } + ] + } + ] + }, + { + "category": "Azure Monitor", + "endpoints": [ + { + "domainName": "gcs.ppe.monitoring.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "global.prod.microsoftmetrics.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "xxx3.prod.microsoftmetrics.com", + "endpointDetails": [ + { + "port": 1886, + "region": "Global" + } + ] + }, + { + "domainName": "xxx3-red.prod.microsoftmetrics.com", + "endpointDetails": [ + { + "port": 1886, + "region": "Global" + } + ] + }, + { + "domainName": "xxx3-black.prod.microsoftmetrics.com", + "endpointDetails": [ + { + "port": 1886, + "region": "Global" + } + ] + }, + { + "domainName": "gcs.ppe.warm.ingestion.monitoring.azure.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "metrichost23.prod.microsoftmetrics.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "metrichost23-red.prod.microsoftmetrics.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "metrichost23-black.prod.microsoftmetrics.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + } + ] + }, + { + "category": "Portal Captcha", + "endpoints": [ + { + "domainName": "client.xxx.live.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "partner.xxx.live.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + } + ] + }, + { + "category": "Azure Active Directory", + "endpoints": [ + { + "domainName": "login.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "graph.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "login.microsoftonline.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + } + ] + } + ] + } + } + }, + "operationId": "OutboundNetworkDependenciesEndpoints_ListByService", + "title": "ApiManagementServiceGetOutboundNetworkDependenciesEndpoints" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_HttpConnectivityCheck.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_HttpConnectivityCheck.json new file mode 100644 index 0000000000..deae7f2763 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_HttpConnectivityCheck.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "connectivityCheckRequestParams": { + "destination": { + "address": "https://microsoft.com", + "port": 3306 + }, + "protocolConfiguration": { + "HTTPConfiguration": { + "method": "GET", + "headers": [ + { + "name": "Authorization", + "value": "Bearer myPreciousToken" + } + ], + "validStatusCodes": [ + 200, + 204 + ] + } + }, + "source": { + "region": "northeurope" + }, + "protocol": "HTTPS" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "avgLatencyInMs": 260, + "connectionStatus": "Reachable", + "hops": [ + { + "type": "Source", + "address": "20.82.216.48", + "id": "c60e2296-5ebc-48cc-80e8-7e6d2981e7b2", + "issues": [], + "nextHopIds": [ + "26aa44e7-04f1-462f-aa5d-5951957b5650" + ], + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1" + }, + { + "type": "Internet", + "address": "40.113.200.201", + "id": "26aa44e7-04f1-462f-aa5d-5951957b5650", + "issues": [], + "nextHopIds": [] + } + ], + "maxLatencyInMs": 281, + "minLatencyInMs": 250, + "probesFailed": 0, + "probesSent": 3 + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/connectivityCheck/operationresults/bmljb2xhLW5ldHdvcmt3YXRjaGVyNF9Db25uZWN0aXRpdml0eUNoZWNrXzE2MmExNmZl?api-version=2021-08-01" + } + } + }, + "operationId": "PerformConnectivityCheckAsync", + "title": "HTTP Connectivity Check" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_TcpConnectivityCheck.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_TcpConnectivityCheck.json new file mode 100644 index 0000000000..6f125f618d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_TcpConnectivityCheck.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "connectivityCheckRequestParams": { + "destination": { + "address": "8.8.8.8", + "port": 53 + }, + "preferredIPVersion": "IPv4", + "source": { + "region": "northeurope" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "avgLatencyInMs": 1, + "connectionStatus": "Connected", + "hops": [ + { + "type": "Source", + "address": "10.1.1.4", + "id": "7dbbe7aa-60ba-4650-831e-63d775d38e9e", + "issues": [], + "nextHopIds": [ + "75c8d819-b208-4584-a311-1aa45ce753f9" + ], + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1" + }, + { + "type": "Internet", + "address": "8.8.8.8", + "id": "75c8d819-b208-4584-a311-1aa45ce753f9", + "issues": [], + "nextHopIds": [] + } + ], + "maxLatencyInMs": 4, + "minLatencyInMs": 1, + "probesFailed": 0, + "probesSent": 100 + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/connectivityCheck/operationresults/bmljb2xhLW5ldHdvcmt3YXRjaGVyNF9Db25uZWN0aXRpdml0eUNoZWNrXzE2MmExNmZl?api-version=2021-08-01" + } + } + }, + "operationId": "PerformConnectivityCheckAsync", + "title": "TCP Connectivity Check" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PolicyDescription_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PolicyDescription_ListByService.json new file mode 100644 index 0000000000..a8378e1ad7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PolicyDescription_ListByService.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "scope": "Api", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "value": [ + { + "name": "authentication-basic", + "type": "Microsoft.ApiManagement/service/policyDescriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policyDescriptions/authentication-basic", + "properties": { + "description": "Authenticate with the backend service using Basic authentication. Use in the inbound section at API scope.", + "scope": 268435471 + } + }, + { + "name": "authentication-certificate", + "type": "Microsoft.ApiManagement/service/policyDescriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policyDescriptions/authentication-certificate", + "properties": { + "description": "Authenticate with the backend service using a client certificate. Use in the inbound section at API scope.", + "scope": 268435471 + } + } + ] + } + } + }, + "operationId": "PolicyDescription_ListByService", + "title": "ApiManagementListPolicyDescriptions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_CreateOrUpdate.json new file mode 100644 index 0000000000..379c8929e2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_CreateOrUpdate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "description": "portal revision 1", + "isCurrent": true + } + }, + "portalRevisionId": "20201112101010", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "201": { + "body": { + "name": "20201112101010", + "type": "Microsoft.ApiManagement/service/portalRevisions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalRevisions/20201112101010", + "properties": { + "description": "portal revision 1", + "createdDateTime": "2020-11-13T22:28:43.657Z", + "isCurrent": true, + "status": "completed", + "statusDetails": null, + "updatedDateTime": "2020-11-13T22:29:22.68Z" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalRevisions/20201112101010?api-version=2021-08-01&asyncId=5faf089b1d9a026694220e0c&asyncCode=201" + } + } + }, + "operationId": "PortalRevision_CreateOrUpdate", + "title": "ApiManagementCreatePortalRevision" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Get.json new file mode 100644 index 0000000000..8019856ba0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Get.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "portalRevisionId": "20201112101010", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "20201112101010", + "type": "Microsoft.ApiManagement/service/portalRevisions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalRevisions/20201112101010", + "properties": { + "description": "portal revision 1", + "createdDateTime": "2020-11-12T22:51:36.47Z", + "isCurrent": true, + "status": "completed", + "statusDetails": null, + "updatedDateTime": "2020-11-12T22:52:00.097Z" + } + } + } + }, + "operationId": "PortalRevision_Get", + "title": "ApiManagementGetPortalRevision" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_GetEntityTag.json new file mode 100644 index 0000000000..d8bb34f861 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "portalRevisionId": "20201112101010", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "PortalRevision_GetEntityTag", + "title": "ApiManagementHeadPortalRevision" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_ListByService.json new file mode 100644 index 0000000000..df06fea351 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_ListByService.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "20201112000000", + "type": "Microsoft.ApiManagement/service/portalRevisions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalRevisions/20201112000000", + "properties": { + "description": "portal revision", + "createdDateTime": "2020-11-12T22:10:09.673Z", + "isCurrent": false, + "status": "completed", + "statusDetails": null, + "updatedDateTime": "2020-11-12T22:12:41.46Z" + } + }, + { + "name": "20201112101010", + "type": "Microsoft.ApiManagement/service/portalRevisions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalRevisions/20201112101010", + "properties": { + "description": "portal revision 1", + "createdDateTime": "2020-11-12T22:51:36.47Z", + "isCurrent": true, + "status": "completed", + "statusDetails": null, + "updatedDateTime": "2020-11-12T22:52:00.097Z" + } + } + ] + } + } + }, + "operationId": "PortalRevision_ListByService", + "title": "ApiManagementListPortalRevisions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Update.json new file mode 100644 index 0000000000..4d05c559df --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Update.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "description": "portal revision update", + "isCurrent": true + } + }, + "portalRevisionId": "20201112101010", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "20201112101010", + "type": "Microsoft.ApiManagement/service/portalRevisions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2", + "properties": { + "description": "portal revision update", + "createdDateTime": "2020-11-13T22:47:13.397Z", + "isCurrent": true, + "status": "completed", + "statusDetails": null, + "updatedDateTime": "2020-11-13T23:29:25.34Z" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalRevisions/20201112101010?api-version=2021-08-01&asyncId=5faf16b81d9a028970d0bfbb&asyncCode=200" + } + } + }, + "operationId": "PortalRevision_Update", + "title": "ApiManagementUpdatePortalRevision" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalSettings_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalSettings_ListByService.json new file mode 100644 index 0000000000..a8a6a3b428 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalSettings_ListByService.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "value": [ + { + "name": "delegation", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/delegation", + "properties": { + "enabled": false, + "subscriptions": { + "enabled": false + }, + "userRegistration": { + "enabled": false + } + } + }, + { + "name": "signin", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signin", + "properties": { + "enabled": false + } + }, + { + "name": "signup", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signup", + "properties": { + "enabled": true, + "termsOfService": { + "consentRequired": false, + "enabled": false, + "text": "Terms of service" + } + } + } + ] + } + } + }, + "operationId": "PortalSettings_ListByService", + "title": "ApiManagementListPortalSettings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_CreateOrUpdate.json new file mode 100644 index 0000000000..46941b9dde --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_CreateOrUpdate.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "privateEndpointConnectionRequest": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName", + "properties": { + "privateLinkServiceConnectionState": { + "description": "The Private Endpoint Connection is approved.", + "status": "Approved" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "privateEndpointConnectionName", + "type": "Microsoft.ApiManagement/service/privateEndpointConnections", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/privateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "The request has been approved.", + "status": "Succeeded" + }, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "PrivateEndpointConnection_CreateOrUpdate", + "title": "ApiManagementApproveOrRejectPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_Delete.json new file mode 100644 index 0000000000..7c347bab82 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + }, + "204": {} + }, + "operationId": "PrivateEndpointConnection_Delete", + "title": "ApiManagementDeletePrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetByName.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetByName.json new file mode 100644 index 0000000000..173a59fae6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetByName.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "privateEndpointProxyName", + "type": "Microsoft.ApiManagement/service/privateEndpointConnections", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/privateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "Please approve my request, thanks", + "actionsRequired": "None", + "status": "Pending" + }, + "provisioningState": "Pending" + } + } + } + }, + "operationId": "PrivateEndpointConnection_GetByName", + "title": "ApiManagementGetPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetPrivateLinkResource.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetPrivateLinkResource.json new file mode 100644 index 0000000000..3f4dc5c91b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetPrivateLinkResource.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "privateLinkSubResourceName": "privateLinkSubResourceName", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "Gateway", + "type": "Microsoft.ApiManagement/service/privateLinkResources", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateLinkResources/Gateway", + "properties": { + "groupId": "Gateway", + "requiredMembers": [ + "Gateway" + ], + "requiredZoneNames": [ + "privateLink.azure-api.net" + ] + } + } + } + }, + "operationId": "PrivateEndpointConnection_GetPrivateLinkResource", + "title": "ApiManagementGetPrivateLinkGroupResource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListByService.json new file mode 100644 index 0000000000..f69a08da27 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListByService.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "privateEndpointProxyName", + "type": "Microsoft.ApiManagement/service/privateEndpointConnections", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "Please approve my request, thanks", + "actionsRequired": "None", + "status": "Pending" + }, + "provisioningState": "Pending" + } + }, + { + "name": "privateEndpointProxyName2", + "type": "Microsoft.ApiManagement/service/privateEndpointConnections", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/privateEndpointProxyName2", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/privateEndpointName2" + }, + "privateLinkServiceConnectionState": { + "description": "Please approve my request, thanks", + "actionsRequired": "None", + "status": "Pending" + }, + "provisioningState": "Pending" + } + } + ] + } + } + }, + "operationId": "PrivateEndpointConnection_ListByService", + "title": "ApiManagementListPrivateEndpointConnections" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListPrivateLinkResources.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListPrivateLinkResources.json new file mode 100644 index 0000000000..874cbea23f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListPrivateLinkResources.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Gateway", + "type": "Microsoft.ApiManagement/service/privateLinkResources", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateLinkResources/Gateway", + "properties": { + "groupId": "Gateway", + "requiredMembers": [ + "Gateway" + ], + "requiredZoneNames": [ + "privateLink.azure-api.net" + ] + } + } + ] + } + } + }, + "operationId": "PrivateEndpointConnection_ListPrivateLinkResources", + "title": "ApiManagementListPrivateLinkGroupResources" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductApi_ListByProduct.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductApi_ListByProduct.json new file mode 100644 index 0000000000..0bd73fadb5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductApi_ListByProduct.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "productId": "5768181ea40f7eb6c49f6ac7", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "57681820a40f7eb6c49f6aca", + "type": "Microsoft.ApiManagement/service/products/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5768181ea40f7eb6c49f6ac7/apis/57681820a40f7eb6c49f6aca", + "properties": { + "path": "suffix_57681820a40f7eb6c49f6ace", + "description": "description_57681820a40f7eb6c49f6acc", + "apiRevision": "1", + "displayName": "api_57681820a40f7eb6c49f6acb", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://contoso/57681820a40f7eb6c49f6acd" + } + } + ] + } + } + }, + "operationId": "ProductApi_ListByProduct", + "title": "ApiManagementListProductApis" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductGroup_ListByProduct.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductGroup_ListByProduct.json new file mode 100644 index 0000000000..ba28b0b887 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductGroup_ListByProduct.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "productId": "5600b57e7e8880006a060002", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "5600b57e7e8880006a020001", + "type": "Microsoft.ApiManagement/service/products/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/groups/5600b57e7e8880006a020001", + "properties": { + "type": "system", + "description": "Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group.", + "builtIn": true, + "displayName": "Administrators" + } + }, + { + "name": "5600b57e7e8880006a020002", + "type": "Microsoft.ApiManagement/service/products/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/groups/5600b57e7e8880006a020002", + "properties": { + "type": "system", + "description": "Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.", + "builtIn": true, + "displayName": "Developers" + } + }, + { + "name": "5600b57e7e8880006a020003", + "type": "Microsoft.ApiManagement/service/products/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/groups/5600b57e7e8880006a020003", + "properties": { + "type": "system", + "description": "Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group.", + "builtIn": true, + "displayName": "Guests" + } + } + ] + } + } + }, + "operationId": "ProductGroup_ListByProduct", + "title": "ApiManagementListProductGroups" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductSubscriptions_List.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductSubscriptions_List.json new file mode 100644 index 0000000000..f11c762ba2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductSubscriptions_List.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "productId": "5600b57e7e8880006a060002", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "5600b57e7e8880006a070002", + "type": "Microsoft.ApiManagement/service/products/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/subscriptions/5600b57e7e8880006a070002", + "properties": { + "createdDate": "2015-09-22T01:57:18.723Z", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002", + "state": "active" + } + } + ] + } + } + }, + "operationId": "ProductSubscriptions_List", + "title": "ApiManagementListProductSubscriptions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_CreateOrUpdate.json new file mode 100644 index 0000000000..ca5ff6ebb7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_CreateOrUpdate.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "displayName": "Test Template ProductName 4" + } + }, + "productId": "testproduct", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testproduct", + "type": "Microsoft.ApiManagement/service/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/testproduct", + "properties": { + "approvalRequired": false, + "displayName": "Test Template ProductName 4", + "state": "notPublished", + "subscriptionRequired": true + } + } + }, + "201": { + "body": { + "name": "testproduct", + "type": "Microsoft.ApiManagement/service/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/testproduct", + "properties": { + "approvalRequired": false, + "displayName": "Test Template ProductName 4", + "state": "notPublished", + "subscriptionRequired": true + } + } + } + }, + "operationId": "Product_CreateOrUpdate", + "title": "ApiManagementCreateProduct" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Delete.json new file mode 100644 index 0000000000..e8dc43725d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "deleteSubscriptions": true, + "productId": "testproduct", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Product_Delete", + "title": "ApiManagementDeleteProduct" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Get.json new file mode 100644 index 0000000000..b1b8305960 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Get.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "productId": "unlimited", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "unlimited", + "type": "Microsoft.ApiManagement/service/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/unlimited", + "properties": { + "description": "Subscribers have completely unlimited access to the API. Administrator approval is required.", + "approvalRequired": true, + "displayName": "Unlimited", + "state": "published", + "subscriptionRequired": true, + "subscriptionsLimit": 1 + } + } + } + }, + "operationId": "Product_Get", + "title": "ApiManagementGetProduct" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_GetEntityTag.json new file mode 100644 index 0000000000..a747c0747a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "productId": "unlimited", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Product_GetEntityTag", + "title": "ApiManagementHeadProduct" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByService.json new file mode 100644 index 0000000000..066f214387 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByService.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "kjoshiarmtemplateCert1", + "type": "Microsoft.ApiManagement/service/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/kjoshiarmtemplateCert1", + "properties": { + "description": "Development Product", + "displayName": "Dev", + "state": "published", + "subscriptionRequired": false + } + }, + { + "name": "starter", + "type": "Microsoft.ApiManagement/service/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/starter", + "properties": { + "description": "Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.", + "approvalRequired": false, + "displayName": "Starter", + "state": "published", + "subscriptionRequired": true, + "subscriptionsLimit": 1, + "terms": "" + } + }, + { + "name": "unlimited", + "type": "Microsoft.ApiManagement/service/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/unlimited", + "properties": { + "description": "Subscribers have completely unlimited access to the API. Administrator approval is required.", + "approvalRequired": true, + "displayName": "Unlimited", + "state": "published", + "subscriptionRequired": true, + "subscriptionsLimit": 1 + } + } + ] + } + } + }, + "operationId": "Product_ListByService", + "title": "ApiManagementListProducts" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByTags.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByTags.json new file mode 100644 index 0000000000..69fcea931c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByTags.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "value": [ + { + "product": { + "name": "Starter", + "description": "Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.", + "approvalRequired": false, + "id": "/products/starter", + "state": "published", + "subscriptionRequired": true, + "subscriptionsLimit": 1, + "terms": "" + }, + "tag": { + "name": "awesomeTag", + "id": "/tags/apitag123" + } + } + ] + } + } + }, + "operationId": "Product_ListByTags", + "title": "ApiManagementListProductsByTags" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Update.json new file mode 100644 index 0000000000..88350ea7ae --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Update.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "displayName": "Test Template ProductName 4" + } + }, + "productId": "testproduct", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testproduct", + "type": "Microsoft.ApiManagement/service/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/testproduct", + "properties": { + "description": "Subscribers have completely unlimited access to the API. Administrator approval is required.", + "approvalRequired": true, + "displayName": "Test Template ProductName 4", + "state": "published", + "subscriptionRequired": true, + "subscriptionsLimit": 1 + } + } + } + }, + "operationId": "Product_Update", + "title": "ApiManagementUpdateProduct" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByCounterKeys_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByCounterKeys_ListByService.json new file mode 100644 index 0000000000..90ea94a68a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByCounterKeys_ListByService.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "quotaCounterKey": "ba", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "", + "value": [ + { + "counterKey": "ba", + "periodEndTime": "2018-02-08T16:54:40Z", + "periodKey": "0_P3Y6M4DT12H30M5S", + "periodStartTime": "2014-08-04T04:24:35Z", + "value": { + "callsCount": 5, + "kbTransferred": 2.5830078125 + } + } + ] + } + } + }, + "operationId": "QuotaByCounterKeys_ListByService", + "title": "ApiManagementGetQuotaCounterKeys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByPeriodKeys_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByPeriodKeys_Get.json new file mode 100644 index 0000000000..29332f56b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByPeriodKeys_Get.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "quotaCounterKey": "ba", + "quotaPeriodKey": "0_P3Y6M4DT12H30M5S", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "counterKey": "ba", + "periodEndTime": "2018-02-08T16:54:40Z", + "periodKey": "0_P3Y6M4DT12H30M5S", + "periodStartTime": "2014-08-04T04:24:35Z", + "value": { + "callsCount": 0, + "kbTransferred": 2.5625 + } + } + } + }, + "operationId": "QuotaByPeriodKeys_Get", + "title": "ApiManagementGetQuotaCounterKeysByQuotaPeriod" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Region_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Region_ListByService.json new file mode 100644 index 0000000000..6511816c5f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Region_ListByService.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "West US", + "isDeleted": false, + "isMasterRegion": true + } + ] + } + } + }, + "operationId": "Region_ListByService", + "title": "ApiManagementListRegions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByApi.json new file mode 100644 index 0000000000..bb34763666 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByApi.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "name": "Echo API", + "apiId": "/apis/5600b59475ff190048040001", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0 + }, + { + "name": "httpbin", + "apiId": "/apis/57a03a13e4bbd5119c8b19e9", + "apiTimeAvg": 1015.7607923076923, + "apiTimeMax": 1819.2173, + "apiTimeMin": 330.3206, + "bandwidth": 11019, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 1, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 13, + "callCountTotal": 14, + "serviceTimeAvg": 957.094776923077, + "serviceTimeMax": 1697.3612, + "serviceTimeMin": 215.24 + } + ] + } + } + }, + "operationId": "Reports_ListByApi", + "title": "ApiManagementGetReportsByApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByGeo.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByGeo.json new file mode 100644 index 0000000000..84d56594d7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByGeo.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "", + "value": [ + { + "apiTimeAvg": 1015.7607923076923, + "apiTimeMax": 1819.2173, + "apiTimeMin": 330.3206, + "bandwidth": 11019, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 1, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 13, + "callCountTotal": 14, + "country": "US", + "region": "WA", + "serviceTimeAvg": 957.094776923077, + "serviceTimeMax": 1697.3612, + "serviceTimeMin": 215.24, + "zip": "98052" + } + ] + } + } + }, + "operationId": "Reports_ListByGeo", + "title": "ApiManagementGetReportsByGeo" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByOperation.json new file mode 100644 index 0000000000..b34169b1d8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByOperation.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "get", + "operationId": "/apis/57a03a13e4bbd5119c8b19e9/operations/57a03a1dd8d14f0a780d7d14", + "apiId": "/apis/57a03a13e4bbd5119c8b19e9", + "apiTimeAvg": 1015.7607923076923, + "apiTimeMax": 1819.2173, + "apiTimeMin": 330.3206, + "bandwidth": 11019, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 1, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 13, + "callCountTotal": 14, + "serviceTimeAvg": 957.094776923077, + "serviceTimeMax": 1697.3612, + "serviceTimeMin": 215.24 + }, + { + "name": "GetWeatherInformation", + "operationId": "/apis/57c999d1e4bbd50c988cb2c3/operations/57c999d1e4bbd50df889c93e", + "apiId": "/apis/57c999d1e4bbd50c988cb2c3", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0 + }, + { + "name": "GetCityForecastByZIP", + "operationId": "/apis/57c999d1e4bbd50c988cb2c3/operations/57c999d1e4bbd50df889c93f", + "apiId": "/apis/57c999d1e4bbd50c988cb2c3", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0 + } + ] + } + } + }, + "operationId": "Reports_ListByOperation", + "title": "ApiManagementGetReportsByOperation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByProduct.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByProduct.json new file mode 100644 index 0000000000..1c0ef57fb6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByProduct.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "name": "Starter", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "productId": "/products/5600b59475ff190048060001", + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0 + }, + { + "name": "Unlimited", + "apiTimeAvg": 1015.7607923076923, + "apiTimeMax": 1819.2173, + "apiTimeMin": 330.3206, + "bandwidth": 11019, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 1, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 13, + "callCountTotal": 14, + "productId": "/products/5600b59475ff190048060002", + "serviceTimeAvg": 957.094776923077, + "serviceTimeMax": 1697.3612, + "serviceTimeMin": 215.24 + } + ] + } + } + }, + "operationId": "Reports_ListByProduct", + "title": "ApiManagementGetReportsByProduct" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByRequest.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByRequest.json new file mode 100644 index 0000000000..25ced5b441 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByRequest.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "value": [ + { + "operationId": "/apis/5931a75ae4bbd512a88c680b/operations/-", + "method": "GET", + "apiId": "/apis/5931a75ae4bbd512a88c680b", + "apiRegion": "East Asia", + "apiTime": 221.1544, + "cache": "none", + "ipAddress": "207.xx.155.xx", + "productId": "/products/-", + "requestId": "63e7119c-26aa-433c-96d7-f6f3267ff52f", + "requestSize": 0, + "responseCode": 404, + "responseSize": 405, + "serviceTime": 0, + "subscriptionId": "/subscriptions/5600b59475ff190048070002", + "timestamp": "2017-06-03T00:17:00.1649134Z", + "url": "https://apimService1.azure-api.net/echo/resource?param1=sample", + "userId": "/users/1" + }, + { + "operationId": "/apis/5931a75ae4bbd512a88c680b/operations/-", + "method": "POST", + "apiId": "/apis/5931a75ae4bbd512a88c680b", + "apiRegion": "East Asia", + "apiTime": 6.675400000000001, + "cache": "none", + "ipAddress": "207.xx.155.xx", + "productId": "/products/-", + "requestId": "e581b7f7-c9ec-4fc6-8ab9-3855d9b00b04", + "requestSize": 0, + "responseCode": 404, + "responseSize": 403, + "serviceTime": 0, + "subscriptionId": "/subscriptions/5600b59475ff190048070002", + "timestamp": "2017-06-03T00:17:20.5255131Z", + "url": "https://apimService1.azure-api.net/echo/resource", + "userId": "/users/1" + } + ] + } + } + }, + "operationId": "Reports_ListByRequest", + "title": "ApiManagementGetReportsByRequest" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListBySubscription.json new file mode 100644 index 0000000000..7d4e4b1608 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListBySubscription.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "productId": "/products/5600b59475ff190048060001", + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0, + "subscriptionId": "/subscriptions/5600b59475ff190048070001", + "userId": "/users/1" + }, + { + "name": "", + "apiTimeAvg": 1015.7607923076923, + "apiTimeMax": 1819.2173, + "apiTimeMin": 330.3206, + "bandwidth": 11019, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 1, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 13, + "callCountTotal": 14, + "productId": "/products/5600b59475ff190048060002", + "serviceTimeAvg": 957.094776923077, + "serviceTimeMax": 1697.3612, + "serviceTimeMin": 215.24, + "subscriptionId": "/subscriptions/5600b59475ff190048070002", + "userId": "/users/1" + }, + { + "name": "", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "productId": "/products/5702e97e5157a50f48dce801", + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0, + "subscriptionId": "/subscriptions/5702e97e5157a50a9c733303", + "userId": "/users/1" + } + ] + } + } + }, + "operationId": "Reports_ListBySubscription", + "title": "ApiManagementGetReportsBySubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByTime.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByTime.json new file mode 100644 index 0000000000..4589e1ca8b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByTime.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "interval": "PT15M", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "apiTimeAvg": 1337.46335, + "apiTimeMax": 1819.2173, + "apiTimeMin": 885.0839000000001, + "bandwidth": 3243, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 4, + "callCountTotal": 4, + "interval": "PT15M", + "serviceTimeAvg": 1255.917425, + "serviceTimeMax": 1697.3612, + "serviceTimeMin": 882.8264, + "timestamp": "2017-06-03T00:15:00Z" + }, + { + "apiTimeAvg": 872.7818777777778, + "apiTimeMax": 1093.8407, + "apiTimeMin": 330.3206, + "bandwidth": 7776, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 1, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 9, + "callCountTotal": 10, + "interval": "PT15M", + "serviceTimeAvg": 824.2847111111112, + "serviceTimeMax": 973.2262000000001, + "serviceTimeMin": 215.24, + "timestamp": "2017-06-03T00:30:00Z" + } + ] + } + } + }, + "operationId": "Reports_ListByTime", + "title": "ApiManagementGetReportsByTime" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByUser.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByUser.json new file mode 100644 index 0000000000..aa7d44128f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByUser.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "Administrator", + "apiTimeAvg": 1015.7607923076923, + "apiTimeMax": 1819.2173, + "apiTimeMin": 330.3206, + "bandwidth": 11019, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 1, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 13, + "callCountTotal": 14, + "serviceTimeAvg": 957.094776923077, + "serviceTimeMax": 1697.3612, + "serviceTimeMin": 215.24, + "userId": "/users/1" + }, + { + "name": "Samir Solanki", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0, + "userId": "/users/56eaec62baf08b06e46d27fd" + }, + { + "name": "Anonymous", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0, + "userId": "/users/54c800b332965a0035030000" + } + ] + } + } + }, + "operationId": "Reports_ListByUser", + "title": "ApiManagementGetReportsByUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_CreateOrUpdate.json new file mode 100644 index 0000000000..66bc8616c6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_CreateOrUpdate.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "enabled": true + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "200": { + "body": { + "name": "signin", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signin", + "properties": { + "enabled": true + } + } + } + }, + "operationId": "SignInSettings_CreateOrUpdate", + "title": "ApiManagementPortalSettingsUpdateSignIn" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Get.json new file mode 100644 index 0000000000..3da6456410 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Get.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "signin", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signin", + "properties": { + "enabled": true + } + } + } + }, + "operationId": "SignInSettings_Get", + "title": "ApiManagementPortalSettingsGetSignIn" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_GetEntityTag.json new file mode 100644 index 0000000000..95686f7ab0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_GetEntityTag.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "SignInSettings_GetEntityTag", + "title": "ApiManagementHeadSignInSettings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Update.json new file mode 100644 index 0000000000..77faa7bebb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Update.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "enabled": true + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "204": {} + }, + "operationId": "SignInSettings_Update", + "title": "ApiManagementPortalSettingsUpdateSignIn" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_CreateOrUpdate.json new file mode 100644 index 0000000000..118ca18e3d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_CreateOrUpdate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "enabled": true, + "termsOfService": { + "consentRequired": true, + "enabled": true, + "text": "Terms of service text." + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "200": { + "body": { + "name": "signup", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signup", + "properties": { + "enabled": true, + "termsOfService": { + "consentRequired": true, + "enabled": true, + "text": "Terms of service text." + } + } + } + } + }, + "operationId": "SignUpSettings_CreateOrUpdate", + "title": "ApiManagementPortalSettingsUpdateSignUp" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Get.json new file mode 100644 index 0000000000..d88584b1a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "signup", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signup", + "properties": { + "enabled": true, + "termsOfService": { + "consentRequired": true, + "enabled": true, + "text": "Terms of service text." + } + } + } + } + }, + "operationId": "SignUpSettings_Get", + "title": "ApiManagementPortalSettingsGetSignUp" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_GetEntityTag.json new file mode 100644 index 0000000000..2ec8a4d036 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_GetEntityTag.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "SignUpSettings_GetEntityTag", + "title": "ApiManagementHeadSignUpSettings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Update.json new file mode 100644 index 0000000000..1f3605632e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Update.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "enabled": true, + "termsOfService": { + "consentRequired": true, + "enabled": true, + "text": "Terms of service text." + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "204": {} + }, + "operationId": "SignUpSettings_Update", + "title": "ApiManagementPortalSettingsUpdateSignUp" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_CreateOrUpdate.json new file mode 100644 index 0000000000..d0ad103deb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_CreateOrUpdate.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "displayName": "testsub", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "testsub", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testsub", + "type": "Microsoft.ApiManagement/service/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/testsub", + "properties": { + "createdDate": "2017-06-02T23:34:03.1055076Z", + "displayName": "testsub", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002", + "state": "submitted" + } + } + }, + "201": { + "body": { + "name": "testsub", + "type": "Microsoft.ApiManagement/service/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/testsub", + "properties": { + "createdDate": "2017-06-02T23:34:03.1055076Z", + "displayName": "testsub", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002", + "state": "submitted" + } + } + } + }, + "operationId": "Subscription_CreateOrUpdate", + "title": "ApiManagementCreateSubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Delete.json new file mode 100644 index 0000000000..d696315d38 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "testsub", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Subscription_Delete", + "title": "ApiManagementDeleteSubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Get.json new file mode 100644 index 0000000000..8ec97bbd2a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "5931a769d8d14f0ad8ce13b8", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "5931a769d8d14f0ad8ce13b8", + "type": "Microsoft.ApiManagement/service/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/5931a769d8d14f0ad8ce13b8", + "properties": { + "createdDate": "2017-06-02T17:59:06.223Z", + "displayName": "Unlimited", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002", + "state": "submitted" + } + } + } + }, + "operationId": "Subscription_Get", + "title": "ApiManagementGetSubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_GetEntityTag.json new file mode 100644 index 0000000000..332bd8db86 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "5931a769d8d14f0ad8ce13b8", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Subscription_GetEntityTag", + "title": "ApiManagementHeadSubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_List.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_List.json new file mode 100644 index 0000000000..17fe9e3d76 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_List.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "5600b59475ff190048070001", + "type": "Microsoft.ApiManagement/service/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/5600b59475ff190048070001", + "properties": { + "createdDate": "2015-09-22T01:57:40.3Z", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060001", + "state": "active" + } + }, + { + "name": "56eaed3dbaf08b06e46d27fe", + "type": "Microsoft.ApiManagement/service/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/56eaed3dbaf08b06e46d27fe", + "properties": { + "createdDate": "2016-03-17T17:45:33.837Z", + "displayName": "Starter", + "expirationDate": "2016-04-01T00:00:00Z", + "notificationDate": "2016-03-20T00:00:00Z", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/56eaec62baf08b06e46d27fd", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060001", + "startDate": "2016-03-17T00:00:00Z", + "state": "active" + } + }, + { + "name": "5931a769d8d14f0ad8ce13b8", + "type": "Microsoft.ApiManagement/service/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/5931a769d8d14f0ad8ce13b8", + "properties": { + "createdDate": "2017-06-02T17:59:06.223Z", + "displayName": "Unlimited", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002", + "state": "submitted" + } + } + ] + } + } + }, + "operationId": "Subscription_List", + "title": "ApiManagementListSubscriptions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_ListSecrets.json new file mode 100644 index 0000000000..665c9d370e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_ListSecrets.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "5931a769d8d14f0ad8ce13b8", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "primaryKey": "", + "secondaryKey": "" + } + } + }, + "operationId": "Subscription_ListSecrets", + "title": "ApiManagementSubscriptionListSecrets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegeneratePrimaryKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegeneratePrimaryKey.json new file mode 100644 index 0000000000..ffeff54e1a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegeneratePrimaryKey.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "testsub", + "subscriptionId": "subid" + }, + "responses": { + "204": {} + }, + "operationId": "Subscription_RegeneratePrimaryKey", + "title": "ApiManagementSubscriptionRegeneratePrimaryKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegenerateSecondaryKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegenerateSecondaryKey.json new file mode 100644 index 0000000000..ce01f4f16c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegenerateSecondaryKey.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "testsub", + "subscriptionId": "subid" + }, + "responses": { + "204": {} + }, + "operationId": "Subscription_RegenerateSecondaryKey", + "title": "ApiManagementSubscriptionRegenerateSecondaryKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Update.json new file mode 100644 index 0000000000..f7934340cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Update.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "displayName": "testsub" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "testsub", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testsub", + "type": "Microsoft.ApiManagement/service/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/testsub", + "properties": { + "createdDate": "2017-06-02T17:59:06.223Z", + "displayName": "testsub", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002", + "state": "submitted" + } + } + } + }, + "operationId": "Subscription_Update", + "title": "ApiManagementUpdateSubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TagResource_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TagResource_ListByService.json new file mode 100644 index 0000000000..8352698bae --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TagResource_ListByService.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "operation": { + "name": "Create resource", + "method": "POST", + "description": "A demonstration of a POST call based on the echo backend above. The request body is expected to contain JSON-formatted data (see example below). A policy is used to automatically transform any request sent in JSON directly to XML. In a real-world scenario this could be used to enable modern clients to speak to a legacy backend.", + "apiName": "Echo API", + "apiRevision": "1", + "id": "/apis/echo-api/operations/create-resource", + "urlTemplate": "/resource" + }, + "tag": { + "name": "awesomeTag", + "id": "/tags/apitag123" + } + }, + { + "api": { + "name": "Echo API", + "path": "echo", + "apiRevision": "1", + "id": "/apis/echo-api", + "isCurrent": true, + "serviceUrl": "http://echoapi.cloudapp.net/api" + }, + "tag": { + "name": "awesomeTag", + "id": "/tags/apitag123" + } + }, + { + "product": { + "name": "Starter", + "description": "Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.", + "approvalRequired": false, + "id": "/products/starter", + "state": "published", + "subscriptionRequired": true, + "subscriptionsLimit": 1, + "terms": "" + }, + "tag": { + "name": "awesomeTag", + "id": "/tags/apitag123" + } + } + ] + } + } + }, + "operationId": "TagResource_ListByService", + "title": "ApiManagementListTagResources" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_AssignToOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_AssignToOperation.json new file mode 100644 index 0000000000..06c422750e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_AssignToOperation.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "operationId": "5931a75ae4bbd512a88c680a", + "api-version": "2021-08-01", + "apiId": "5931a75ae4bbd512a88c680b", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagId": "tagId1" + }, + "responses": { + "200": { + "body": { + "name": "tagId1", + "type": "Microsoft.ApiManagement/service/tags", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1", + "properties": { + "displayName": "tag1" + } + } + }, + "201": { + "body": { + "name": "tagId1", + "type": "Microsoft.ApiManagement/service/tags", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1", + "properties": { + "displayName": "tag1" + } + } + } + }, + "operationId": "Tag_AssignToOperation", + "title": "ApiManagementCreateApiOperationTag" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_DetachFromOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_DetachFromOperation.json new file mode 100644 index 0000000000..44a59a20b5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_DetachFromOperation.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "operationId": "59d5b28d1f7fab116c282651", + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "59d5b28d1f7fab116c282650", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagId": "59d5b28e1f7fab116402044e" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Tag_DetachFromOperation", + "title": "ApiManagementDeleteApiOperationTag" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetByOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetByOperation.json new file mode 100644 index 0000000000..a04ff58519 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetByOperation.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "operationId": "59d6bb8f1f7fab13dc67ec9a", + "api-version": "2021-08-01", + "apiId": "59d6bb8f1f7fab13dc67ec9b", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagId": "59306a29e4bbd510dc24e5f9" + }, + "responses": { + "200": { + "body": { + "name": "59306a29e4bbd510dc24e5f9", + "type": "Microsoft.ApiManagement/service/tags", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/59306a29e4bbd510dc24e5f9", + "properties": { + "displayName": "tag1" + } + } + } + }, + "operationId": "Tag_GetByOperation", + "title": "ApiManagementGetApiOperationTag" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetEntityStateByOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetEntityStateByOperation.json new file mode 100644 index 0000000000..a2160d7f35 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetEntityStateByOperation.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "operationId": "59d6bb8f1f7fab13dc67ec9a", + "api-version": "2021-08-01", + "apiId": "59d6bb8f1f7fab13dc67ec9b", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagId": "59306a29e4bbd510dc24e5f9" + }, + "responses": { + "200": { + "headers": { + "Etag": "AAAAAAAACCI=" + } + } + }, + "operationId": "Tag_GetEntityStateByOperation", + "title": "ApiManagementHeadApiOperationTag" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_ListByOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_ListByOperation.json new file mode 100644 index 0000000000..790a34b4da --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_ListByOperation.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "operationId": "57d2ef278aa04f0888cba3f6", + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "5600b539c53f5b0062060002", + "type": "Microsoft.ApiManagement/service/tags", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/5600b539c53f5b0062060002", + "properties": { + "displayName": "tag1" + } + } + ] + } + } + }, + "operationId": "Tag_ListByOperation", + "title": "ApiManagementListApiOperationTags" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegeneratePrimaryKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegeneratePrimaryKey.json new file mode 100644 index 0000000000..51ea9475c3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegeneratePrimaryKey.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "accessName": "access", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "204": {} + }, + "operationId": "TenantAccessGit_RegeneratePrimaryKey", + "title": "ApiManagementTenantAccessRegenerateKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegenerateSecondaryKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegenerateSecondaryKey.json new file mode 100644 index 0000000000..fbf689bae4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegenerateSecondaryKey.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "accessName": "access", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "204": {} + }, + "operationId": "TenantAccessGit_RegenerateSecondaryKey", + "title": "ApiManagementTenantAccessRegenerateKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Create.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Create.json new file mode 100644 index 0000000000..51d288c325 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Create.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "If-Match": "*", + "accessName": "access", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "enabled": true + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "access", + "type": "Microsoft.ApiManagement/service/tenant", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access", + "properties": { + "enabled": true + } + } + } + }, + "operationId": "TenantAccess_Create", + "title": "ApiManagementCreateTenantAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_GetEntityTag.json new file mode 100644 index 0000000000..cb9b8142a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_GetEntityTag.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "accessName": "access", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {} + }, + "operationId": "TenantAccess_GetEntityTag", + "title": "ApiManagementHeadTenantAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantAccess.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantAccess.json new file mode 100644 index 0000000000..14aa826000 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantAccess.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "accessName": "access", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "access", + "type": "Microsoft.ApiManagement/service/tenant", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access", + "properties": { + "enabled": true + } + } + } + }, + "operationId": "TenantAccess_Get", + "title": "ApiManagementGetTenantAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantGitAccess.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantGitAccess.json new file mode 100644 index 0000000000..93d51c94b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantGitAccess.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accessName": "gitAccess", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "gitAccess", + "type": "Microsoft.ApiManagement/service/tenant", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/gitAccess", + "properties": { + "enabled": true, + "principalId": "git" + } + } + } + }, + "operationId": "TenantAccess_Get", + "title": "ApiManagementGetTenantGitAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListByService.json new file mode 100644 index 0000000000..92cd46984f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListByService.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "access", + "type": "Microsoft.ApiManagement/service/tenant", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access", + "properties": { + "enabled": true + } + } + ] + } + } + }, + "operationId": "TenantAccess_ListByService", + "title": "ApiManagementListTenantAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListSecrets.json new file mode 100644 index 0000000000..20227cec6b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListSecrets.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "accessName": "access", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "enabled": true, + "id": "5600b59375ff190048030003", + "primaryKey": "", + "secondaryKey": "" + } + } + }, + "operationId": "TenantAccess_ListSecrets", + "title": "ApiManagementListSecretsTenantAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegeneratePrimaryKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegeneratePrimaryKey.json new file mode 100644 index 0000000000..fe4ba4bb0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegeneratePrimaryKey.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "accessName": "access", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "204": {} + }, + "operationId": "TenantAccess_RegeneratePrimaryKey", + "title": "ApiManagementTenantAccessRegenerateKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegenerateSecondaryKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegenerateSecondaryKey.json new file mode 100644 index 0000000000..ecb23922a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegenerateSecondaryKey.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "accessName": "access", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "204": {} + }, + "operationId": "TenantAccess_RegenerateSecondaryKey", + "title": "ApiManagementTenantAccessRegenerateKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Update.json new file mode 100644 index 0000000000..3488df2d32 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Update.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "If-Match": "*", + "accessName": "access", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "enabled": true + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "access", + "type": "Microsoft.ApiManagement/service/tenant", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access", + "properties": { + "enabled": true + } + } + } + }, + "operationId": "TenantAccess_Update", + "title": "ApiManagementUpdateTenantAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Deploy.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Deploy.json new file mode 100644 index 0000000000..46187d8a53 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Deploy.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "configurationName": "configuration", + "parameters": { + "properties": { + "branch": "master" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "6074e652093a9d0dac3d733c", + "type": "Microsoft.ApiManagement/service/tenant/operationResults", + "id": "6074e652093a9d0dac3d733c", + "properties": { + "error": { + "code": "ValidationError", + "message": "File not found: 'api-management/configuration.json'" + }, + "started": "2017-11-26T17:06:54.303Z", + "status": "Failed", + "updated": "2017-11-26T17:07:21.777Z" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/operationResults/5a1af4ae2a6d2e0b688d7517?api-version=2021-08-01" + } + } + }, + "operationId": "TenantConfiguration_Deploy", + "title": "ApiManagementTenantConfigurationDeploy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_GetSyncState.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_GetSyncState.json new file mode 100644 index 0000000000..fbe3fa05dc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_GetSyncState.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "configurationName": "configuration", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "syncState", + "type": "Microsoft.ApiManagement/service/tenant/syncState", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/configuration/syncState", + "properties": { + "branch": "master", + "commitId": "de891c2342c7058dde45e5e624eae7e558c94683", + "configurationChangeDate": "2021-04-13T00:11:43.862781Z", + "isExport": true, + "isGitEnabled": true, + "isSynced": true, + "lastOperationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/configuration/operationResults/6074f0bd093a9d0dac3d7347", + "syncDate": "2021-04-13T01:15:53.9824995Z" + } + } + } + }, + "operationId": "TenantConfiguration_GetSyncState", + "title": "ApiManagementTenantAccessSyncState" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Save.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Save.json new file mode 100644 index 0000000000..106872d847 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Save.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "configurationName": "configuration", + "parameters": { + "properties": { + "branch": "master" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "6074e652093a9d0dac3d733c", + "type": "Microsoft.ApiManagement/service/tenant/operationResults", + "id": "6074e652093a9d0dac3d733c", + "properties": { + "actionLog": [], + "resultInfo": "The configuration was successfully saved to master as commit c0ae274f6046912107bad734834cbf65918668b6.", + "started": "2021-04-13T00:31:14.94Z", + "status": "Succeeded", + "updated": "2021-04-13T00:31:27.59Z" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/operationResults/5a1af57d2a6d2e0b688d751b?api-version=2021-08-01" + } + } + }, + "operationId": "TenantConfiguration_Save", + "title": "ApiManagementTenantConfigurationSave" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Validate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Validate.json new file mode 100644 index 0000000000..a2ff141df4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Validate.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "configurationName": "configuration", + "parameters": { + "properties": { + "branch": "master" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "6074ec02093a9d0dac3d7345", + "type": "Microsoft.ApiManagement/service/tenant/operationResults", + "id": "6074ec02093a9d0dac3d7345", + "properties": { + "actionLog": [], + "resultInfo": "Validation is successfull", + "started": "2021-04-13T00:55:30.62Z", + "status": "Succeeded", + "updated": "2021-04-13T00:55:39.857Z" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/operationResults/5a1af64e2a6d2e0b688d751e?api-version=2021-08-01" + } + } + }, + "operationId": "TenantConfiguration_Validate", + "title": "ApiManagementTenantConfigurationValidate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_Get.json new file mode 100644 index 0000000000..a9133f4bc1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_Get.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "settingsType": "public", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "public", + "type": "Microsoft.ApiManagement/service/settings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/settings/public", + "properties": { + "settings": { + "CustomPortalSettings.DelegatedSubscriptionEnabled": "False", + "CustomPortalSettings.DelegationEnabled": "False", + "CustomPortalSettings.DelegationUrl": "", + "CustomPortalSettings.UserRegistrationTerms": null, + "CustomPortalSettings.UserRegistrationTermsConsentRequired": "False", + "CustomPortalSettings.UserRegistrationTermsEnabled": "False" + } + } + } + } + }, + "operationId": "TenantSettings_Get", + "title": "ApiManagementGetTenantSettings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_ListByService.json new file mode 100644 index 0000000000..e3d388d9e7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_ListByService.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "", + "value": [ + { + "name": "public", + "type": "Microsoft.ApiManagement/service/settings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/settings/public", + "properties": { + "settings": { + "CustomPortalSettings.DelegatedSubscriptionEnabled": "False", + "CustomPortalSettings.DelegationEnabled": "False", + "CustomPortalSettings.DelegationUrl": "", + "CustomPortalSettings.UserRegistrationTerms": null, + "CustomPortalSettings.UserRegistrationTermsConsentRequired": "False", + "CustomPortalSettings.UserRegistrationTermsEnabled": "False" + } + } + } + ] + } + } + }, + "operationId": "TenantSettings_ListByService", + "title": "ApiManagementListTenantSettings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserConfirmationPassword_Send.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserConfirmationPassword_Send.json new file mode 100644 index 0000000000..a3d5b9824f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserConfirmationPassword_Send.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "57127d485157a511ace86ae7" + }, + "responses": { + "204": {} + }, + "operationId": "UserConfirmationPassword_Send", + "title": "ApiManagementUserConfirmationPasswordSend" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserGroup_List.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserGroup_List.json new file mode 100644 index 0000000000..99f0641dc8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserGroup_List.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "57681833a40f7eb6c49f6acf" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "5600b57e7e8880006a020002", + "type": "Microsoft.ApiManagement/service/users/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57681833a40f7eb6c49f6acf/groups/5600b57e7e8880006a020002", + "properties": { + "type": "system", + "description": "Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.", + "builtIn": true, + "displayName": "Developers" + } + } + ] + } + } + }, + "operationId": "UserGroup_List", + "title": "ApiManagementListUserGroups" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserIdentities_List.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserIdentities_List.json new file mode 100644 index 0000000000..00f39f1996 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserIdentities_List.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "57f2af53bb17172280f44057" + }, + "responses": { + "200": { + "body": { + "nextLink": "", + "value": [ + { + "id": "086cf9********55ab", + "provider": "Microsoft" + } + ] + } + } + }, + "operationId": "UserIdentities_List", + "title": "ApiManagementListUserIdentities" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_CreateOrUpdate.json new file mode 100644 index 0000000000..2afaebba34 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_CreateOrUpdate.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "confirmation": "signup", + "email": "foobar@outlook.com", + "firstName": "foo", + "lastName": "bar" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "200": { + "body": { + "name": "5931a75ae4bbd512288c680b", + "type": "Microsoft.ApiManagement/service/users", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512288c680b", + "properties": { + "email": "foobar@outlook.com", + "firstName": "foo", + "groups": [], + "identities": [ + { + "id": "foobar@outlook.com", + "provider": "Basic" + } + ], + "lastName": "bar", + "registrationDate": "2018-01-07T21:21:29.16Z", + "state": "active" + } + } + }, + "201": { + "body": { + "name": "5931a75ae4bbd512288c680b", + "type": "Microsoft.ApiManagement/service/users", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512288c680b", + "properties": { + "email": "foobar@outlook.com", + "firstName": "foo", + "groups": [], + "identities": [ + { + "id": "foobar@outlook.com", + "provider": "Basic" + } + ], + "lastName": "bar", + "registrationDate": "2018-01-07T21:21:29.16Z", + "state": "active" + } + } + } + }, + "operationId": "User_CreateOrUpdate", + "title": "ApiManagementCreateUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Delete.json new file mode 100644 index 0000000000..1ef7cf5441 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "User_Delete", + "title": "ApiManagementDeleteUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GenerateSsoUrl.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GenerateSsoUrl.json new file mode 100644 index 0000000000..c641d92da5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GenerateSsoUrl.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "57127d485157a511ace86ae7" + }, + "responses": { + "200": { + "body": { + "value": "https://apimService1.portal.azure-api.net/signin-sso?token=57127d485157a511ace86ae7%26201706051624%267VY18MlwAom***********2bYr2bDQHg21OzQsNakExQ%3d%3d" + } + } + }, + "operationId": "User_GenerateSsoUrl", + "title": "ApiManagementUserGenerateSsoUrl" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Get.json new file mode 100644 index 0000000000..8a4e8c0f37 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Get.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512a88c680b" + }, + "responses": { + "200": { + "body": { + "name": "5931a75ae4bbd512a88c680b", + "type": "Microsoft.ApiManagement/service/users", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b", + "properties": { + "email": "foobar@outlook.com", + "firstName": "foo", + "identities": [ + { + "id": "*************", + "provider": "Microsoft" + } + ], + "lastName": "bar", + "registrationDate": "2017-06-02T17:58:50.357Z", + "state": "active" + } + } + } + }, + "operationId": "User_Get", + "title": "ApiManagementGetUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetEntityTag.json new file mode 100644 index 0000000000..f9b9c0229a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512a88c680b" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "User_GetEntityTag", + "title": "ApiManagementHeadUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetSharedAccessToken.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetSharedAccessToken.json new file mode 100644 index 0000000000..7d855c619b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetSharedAccessToken.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "expiry": "2019-04-21T00:44:24.2845269Z", + "keyType": "primary" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "userId1718" + }, + "responses": { + "200": { + "body": { + "value": "userId1718&201904210044&9A1GR1f5WIhFvFmzQG+xxxxxxxxxxx/kBeu87DWad3tkasUXuvPL+MgzlwUHyg==" + } + } + }, + "operationId": "User_GetSharedAccessToken", + "title": "ApiManagementUserToken" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_ListByService.json new file mode 100644 index 0000000000..c773b87887 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_ListByService.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "1", + "type": "Microsoft.ApiManagement/service/users", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", + "properties": { + "email": "admin@live.com", + "firstName": "Administrator", + "identities": [ + { + "id": "admin@live.com", + "provider": "Azure" + } + ], + "lastName": "", + "registrationDate": "2015-09-22T01:57:39.677Z", + "state": "active" + } + }, + { + "name": "56eaec62baf08b06e46d27fd", + "type": "Microsoft.ApiManagement/service/users", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/56eaec62baf08b06e46d27fd", + "properties": { + "email": "foo.bar.83@gmail.com", + "firstName": "foo", + "identities": [ + { + "id": "foo.bar.83@gmail.com", + "provider": "Basic" + } + ], + "lastName": "bar", + "registrationDate": "2016-03-17T17:41:56.327Z", + "state": "active" + } + }, + { + "name": "5931a75ae4bbd512a88c680b", + "type": "Microsoft.ApiManagement/service/users", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b", + "properties": { + "email": "foobar@outlook.com", + "firstName": "foo", + "identities": [ + { + "id": "*************", + "provider": "Microsoft" + } + ], + "lastName": "bar", + "registrationDate": "2017-06-02T17:58:50.357Z", + "state": "active" + } + } + ] + } + } + }, + "operationId": "User_ListByService", + "title": "ApiManagementListUsers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Update.json new file mode 100644 index 0000000000..b3572419ff --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Update.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "email": "foobar@outlook.com", + "firstName": "foo", + "lastName": "bar" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512a88c680b" + }, + "responses": { + "200": { + "body": { + "name": "5931a75ae4bbd512a88c680b", + "type": "Microsoft.ApiManagement/service/users", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b", + "properties": { + "email": "foobar@outlook.com", + "firstName": "foo", + "identities": [ + { + "id": "*************", + "provider": "Microsoft" + } + ], + "lastName": "bar", + "registrationDate": "2017-06-02T17:58:50.357Z", + "state": "active" + } + } + } + }, + "operationId": "User_Update", + "title": "ApiManagementUpdateUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp index 37b1750145..0ad30a6d44 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp @@ -65,7 +65,8 @@ using TypeSpec.Versioning; title: "ApiManagementClient", }) @versioned(Versions) -@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v2) +// FIXME: Common type version v2 is not supported for now. +// @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v2) @doc("ApiManagement Client") namespace Azure.ResourceManager.ApiManagement; @@ -73,5 +74,6 @@ namespace Azure.ResourceManager.ApiManagement; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2021-08-01 API version.") v2021_08_01: "2021-08-01", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp index 9af6ebe1e5..b8831fee82 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp @@ -7,6 +7,7 @@ using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Azure.ResourceManager.ApiManagement; @@ -19,6 +20,7 @@ enum Protocol { wss, } +@doc("An value that determines where the API Version identifier will be located in a HTTP request.") enum VersioningScheme { Segment, Query, @@ -30,6 +32,7 @@ enum BearerTokenSendingMethod { query, } +@doc("Type of API.") enum ApiType { http, soap, @@ -37,6 +40,7 @@ enum ApiType { graphql, } +@doc("Format of the Content in which the API is getting imported.") enum ContentFormat { @doc("The contents are inline and Content type is a WADL document.") `wadl-xml`, @@ -62,6 +66,13 @@ enum ContentFormat { `graphql-link`, } +@doc(""" +Type of API to create. + * `http` creates a REST API + * `soap` creates a SOAP pass-through API + * `websocket` creates websocket API + * `graphql` creates GraphQL API. +""") enum SoapApiType { @doc("Imports a SOAP API having a RESTful front end.") SoapToRest: "http", @doc("Imports the SOAP API having a SOAP front end.") SoapPassThrough: "soap", @@ -69,6 +80,7 @@ enum SoapApiType { @doc("Imports the API having a GraphQL front end.") GraphQL: "graphql", } +@doc("Format of the policyContent.") enum PolicyContentFormat { @doc("The contents are inline and Content type is an XML document.") xml, @doc("The policy XML document is hosted on a http endpoint accessible from the API Management service.") @@ -89,20 +101,24 @@ enum PolicyExportFormat { rawxml, } +@doc("Specifies for what type of messages sampling settings should not apply.") enum AlwaysLog { @doc("Always log all erroneous request regardless of sampling settings.") allErrors, } +@doc("Sampling type.") enum SamplingType { @doc("Fixed-rate sampling.") fixed, } +@doc("Data masking mode.") enum DataMaskingMode { @doc("Mask the value of an entity.") Mask, @doc("Hide the presence of an entity.") Hide, } +@doc("Sets correlation protocol to use for Application Insights diagnostics.") enum HttpCorrelationProtocol { @doc("Do not read and inject correlation headers.") None, @doc("Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md.") @@ -111,6 +127,7 @@ enum HttpCorrelationProtocol { W3C, } +@doc("The verbosity level applied to traces emitted by trace policies.") enum Verbosity { @doc("All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance.") verbose, @@ -120,11 +137,13 @@ enum Verbosity { error, } +@doc("The format of the Operation Name for Application Insights telemetries. Default is Name.") enum OperationNameFormat { @doc("API_NAME;rev=API_REVISION - OPERATION_NAME") Name, @doc("HTTP_VERB URL") Url, } +@doc("Status of the issue.") enum State { @doc("The issue is proposed.") proposed, @doc("The issue is opened.") open, @@ -150,6 +169,7 @@ enum ExportApi { `true`, } +@doc("Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes.") enum ExportResultFormat { @doc("The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob.") Swagger: "swagger-link-json", @@ -177,37 +197,44 @@ enum ClientAuthenticationMethod { @doc("Body based Authentication method.") Body, } +@doc("Backend communication protocol.") enum BackendProtocol { @doc("The Backend is a RESTful service.") http, @doc("The Backend is a SOAP service.") soap, } +@doc("The IP version to be used. Only IPv4 is supported for now.") enum PreferredIPVersion { IPv4, } +@doc("The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value.") enum ConnectivityCheckProtocol { TCP, HTTP, HTTPS, } +@doc("The HTTP method to be used.") enum Method { GET, POST, } +@doc("The origin of the issue.") enum Origin { Local, Inbound, Outbound, } +@doc("The severity of the issue.") enum Severity { Error, Warning, } +@doc("The type of issue.") enum IssueType { Unknown, AgentStopped, @@ -220,6 +247,7 @@ enum IssueType { Platform, } +@doc("The connection status.") enum ConnectionStatus { Unknown, Connected, @@ -227,6 +255,7 @@ enum ConnectionStatus { Degraded, } +@doc("Name of the Sku.") enum SkuType { @doc("Developer SKU of Api Management.") Developer, @doc("Standard SKU of Api Management.") Standard, @@ -236,18 +265,21 @@ enum SkuType { @doc("Isolated SKU of Api Management.") Isolated, } +@doc("The scale type applicable to the sku.") enum ResourceSkuCapacityScaleType { @doc("Supported scale type automatic.") automatic, @doc("Supported scale type manual.") manual, @doc("Scaling not supported.") none, } +@doc("The type of access to be used for the storage account.") enum AccessType { @doc("Use access key.") AccessKey, @doc("Use system assigned managed identity.") SystemAssignedManagedIdentity, @doc("Use user assigned managed identity.") UserAssignedManagedIdentity, } +@doc("Hostname type.") enum HostnameType { Proxy, Portal, @@ -256,6 +288,7 @@ enum HostnameType { DeveloperPortal, } +@doc("Certificate Source.") enum CertificateSource { Managed, KeyVault, @@ -263,17 +296,20 @@ enum CertificateSource { BuiltIn, } +@doc("Certificate Status.") enum CertificateStatus { Completed, Failed, InProgress, } +@doc("Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'") enum PublicNetworkAccess { Enabled, Disabled, } +@doc("Compute Platform Version running the service.") enum PlatformVersion { @doc("Platform version cannot be determined, as compute platform is not deployed.") undetermined, @@ -282,11 +318,13 @@ enum PlatformVersion { @doc("Platform running the service on Multi Tenant V1 platform.") mtv1, } +@doc("The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations.") enum CertificateConfigurationStoreName { CertificateAuthority, Root, } +@doc("The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.") enum VirtualNetworkType { @doc("The service is not part of any Virtual Network.") None, @doc("The service is part of Virtual Network and it is accessible from Internet.") @@ -295,12 +333,14 @@ enum VirtualNetworkType { Internal, } +@doc("The private endpoint connection status.") enum PrivateEndpointServiceConnectionStatus { Pending, Approved, Rejected, } +@doc("The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.") enum ApimIdentityType { SystemAssigned, UserAssigned, @@ -308,6 +348,7 @@ enum ApimIdentityType { None, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -332,6 +373,7 @@ enum TemplateName { requestDeveloperNotificationMessage, } +@doc("Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.") enum UserState { @doc("User state is active.") active, @doc("User is blocked. Blocked users cannot authenticate at developer portal or call API.") @@ -351,12 +393,14 @@ enum IdentityProviderType { @doc("Azure Active Directory B2C as Identity provider.") aadB2C, } +@doc("Logger type.") enum LoggerType { @doc("Azure Event Hub as log destination.") azureEventHub, @doc("Azure Application Insights as log destination.") applicationInsights, @doc("Azure Monitor") azureMonitor, } +@doc("Resource Connectivity Status Type identifier.") enum ConnectivityStatusType { initializing, success, @@ -380,6 +424,7 @@ enum NotificationName { QuotaLimitApproachingPublisherNotificationMessage, } +@doc("Status of the portal's revision.") enum PortalRevisionStatus { @doc("Portal's revision has been queued.") pending, @doc("Portal's revision is being published.") publishing, @@ -387,6 +432,7 @@ enum PortalRevisionStatus { @doc("Portal's revision publishing failed.") failed, } +@doc("The current provisioning state.") enum PrivateEndpointConnectionProvisioningState { Succeeded, Creating, @@ -394,6 +440,7 @@ enum PrivateEndpointConnectionProvisioningState { Failed, } +@doc("Schema Type. Immutable.") enum SchemaType { @doc("Xml schema type.") Xml: "xml", @doc("Json schema type.") Json: "json", @@ -417,18 +464,22 @@ enum ConfigurationIdName { configuration, } +@doc("Determines the type of confirmation e-mail that will be sent to the newly created user.") enum Confirmation { @doc("Send an e-mail to the user confirming they have successfully signed up.") signup, @doc("Send an e-mail inviting the user to sign-up and complete registration.") invite, } -@Azure.Core.fixed + +@doc("whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.") +@fixed enum ProductState { notPublished, published, } -@Azure.Core.fixed + +@fixed enum AuthorizationMethod { HEAD, OPTIONS, @@ -439,29 +490,38 @@ enum AuthorizationMethod { PATCH, DELETE, } -@Azure.Core.fixed + +@doc("Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable.") +@fixed enum NameAvailabilityReason { Valid, Invalid, AlreadyExists, } -@Azure.Core.fixed + +@doc("The Key being regenerated.") +@fixed enum GatewayRegenerateKeyType { primary, secondary, } -@Azure.Core.fixed + +@doc("The Key to be used to generate token for user.") +@fixed enum KeyType { primary, secondary, } -@Azure.Core.fixed + +@doc("Group type.") +@fixed enum GroupType { custom, system, external, } -@Azure.Core.fixed + +@fixed enum PolicyScopeContract { Tenant, Product, @@ -469,7 +529,9 @@ enum PolicyScopeContract { Operation, All, } -@Azure.Core.fixed + +@doc("Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.") +@fixed enum SubscriptionState { suspended, active, @@ -478,23 +540,31 @@ enum SubscriptionState { rejected, cancelled, } -@Azure.Core.fixed + +@doc("The scale type applicable to the sku.") +@fixed enum ApiManagementSkuCapacityScaleType { Automatic, Manual, None, } -@Azure.Core.fixed + +@doc("The type of restrictions.") +@fixed enum ApiManagementSkuRestrictionsType { Location, Zone, } -@Azure.Core.fixed + +@doc("The reason for restriction.") +@fixed enum ApiManagementSkuRestrictionsReasonCode { QuotaId, NotAvailableForSubscription, } -@Azure.Core.fixed + +@doc("Status of an async operation.") +@fixed enum AsyncOperationStatus { Started, InProgress, @@ -661,6 +731,21 @@ model ApiLicenseInformation { url?: string; } +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; +} + @doc("Error Body contract.") model ErrorResponseBody { @doc("Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.") @@ -722,6 +807,32 @@ model ApiCreateOrUpdatePropertiesWsdlSelector { wsdlEndpointName?: string; } +@doc("API update contract details.") +model ApiUpdateContract { + @doc("Properties of the API entity that can be updated.") + properties?: ApiContractUpdateProperties; +} + +@doc("API update contract properties.") +model ApiContractUpdateProperties extends ApiEntityBaseContract { + @doc("API name.") + @maxLength(300) + @minLength(1) + displayName?: string; + + @doc("Absolute URL of the backend service implementing this API.") + @maxLength(2000) + @minLength(1) + serviceUrl?: string; + + @doc("Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.") + @maxLength(400) + path?: string; + + @doc("Describes on which protocols the operations in this API can be invoked.") + protocols?: Protocol[]; +} + @doc("Paged API Revision list representation.") model ApiRevisionListResult is Azure.Core.Page { @doc("Total record count number across all pages.") @@ -915,6 +1026,28 @@ model ResponseContract { headers?: ParameterContract[]; } +@doc("API Operation Update Contract details.") +model OperationUpdateContract { + @doc("Properties of the API Operation entity that can be updated.") + properties?: OperationUpdateContractProperties; +} + +@doc("Operation Update Contract Properties.") +model OperationUpdateContractProperties extends OperationEntityBaseContract { + @doc("Operation Name.") + @maxLength(300) + @minLength(1) + displayName?: string; + + @doc("A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.") + method?: string; + + @doc("Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}") + @maxLength(1000) + @minLength(1) + urlTemplate?: string; +} + @doc("Policy contract Properties.") model PolicyContractProperties { @doc("Contents of the Policy as defined by the format.") @@ -1097,6 +1230,24 @@ model IssueContractBaseProperties { apiId?: string; } +@doc("Issue update Parameters.") +model IssueUpdateContract { + @doc("Issue entity Update contract properties.") + properties?: IssueUpdateContractProperties; +} + +@doc("Issue contract Update Properties.") +model IssueUpdateContractProperties extends IssueContractBaseProperties { + @doc("The issue title.") + title?: string; + + @doc("Text describing the issue.") + description?: string; + + @doc("A resource identifier for the user created the issue.") + userId?: string; +} + @doc("Issue Comment contract Properties.") model IssueCommentContractProperties { @doc("Comment text.") @@ -1300,6 +1451,23 @@ model ApiVersionSetEntityBase { versionHeaderName?: string; } +@doc("Parameters to update or create an API Version Set Contract.") +model ApiVersionSetUpdateParameters { + @doc("Parameters to update or create an API Version Set Contract.") + properties?: ApiVersionSetUpdateParametersProperties; +} + +@doc("Properties used to create or update an API Version Set.") +model ApiVersionSetUpdateParametersProperties extends ApiVersionSetEntityBase { + @doc("Name of API Version Set") + @maxLength(100) + @minLength(1) + displayName?: string; + + @doc("An value that determines where the API Version identifier will be located in a HTTP request.") + versioningScheme?: VersioningScheme; +} + @doc("External OAuth authorization server settings Properties.") model AuthorizationServerContractProperties extends AuthorizationServerContractBaseProperties { @@ -1368,6 +1536,36 @@ model TokenBodyParameterContract { value: string; } +@doc("External OAuth authorization server settings.") +model AuthorizationServerUpdateContract extends Resource { + @doc("Properties of the External OAuth authorization server update Contract.") + properties?: AuthorizationServerUpdateContractProperties; +} + +@doc("External OAuth authorization server Update settings contract.") +model AuthorizationServerUpdateContractProperties + extends AuthorizationServerContractBaseProperties { + @doc("User-friendly authorization server name.") + @maxLength(50) + @minLength(1) + displayName?: string; + + @doc("Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.") + clientRegistrationEndpoint?: string; + + @doc("OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.") + authorizationEndpoint?: string; + + @doc("Form of an authorization grant, which the client uses to request the access token.") + grantTypes?: GrantType[]; + + @doc("Client or app id registered with this authorization server.") + clientId?: string; + + @doc("Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + clientSecret?: string; +} + @doc("OAuth Server Secrets Contract.") model AuthorizationServerSecretsContract { @doc("oAuth Authorization Server Secrets.") @@ -1511,6 +1709,23 @@ model BackendTlsProperties { validateCertificateName?: boolean; } +@doc("Backend update parameters.") +model BackendUpdateParameters { + @doc("Backend entity update contract properties.") + properties?: BackendUpdateParameterProperties; +} + +@doc("Parameters supplied to the Update Backend operation.") +model BackendUpdateParameterProperties extends BackendBaseParameters { + @doc("Runtime Url of the Backend.") + @maxLength(2000) + @minLength(1) + url?: string; + + @doc("Backend communication protocol.") + protocol?: BackendProtocol; +} + @doc("Reconnect request parameters.") model BackendReconnectContract extends Resource { @doc("Reconnect request properties.") @@ -1543,6 +1758,32 @@ model CacheContractProperties { resourceUri?: string; } +@doc("Cache update details.") +model CacheUpdateParameters { + @doc("Cache update properties details.") + properties?: CacheUpdateProperties; +} + +@doc("Parameters supplied to the Update Cache operation.") +model CacheUpdateProperties { + @doc("Cache description") + @maxLength(2000) + description?: string; + + @doc("Runtime connection string to cache") + @maxLength(300) + connectionString?: string; + + @doc("Location identifier to use cache from (should be either 'default' or valid Azure region identifier)") + @maxLength(256) + useFromLocation?: string; + + @doc("Original uri of entity in external system cache points to") + @maxLength(2000) + @projectedName("json", "resourceId") + resourceUri?: string; +} + @doc("Properties of the Certificate contract.") model CertificateContractProperties { @doc("Subject attribute of the certificate.") @@ -2194,6 +2435,37 @@ model ApimResource { tags?: Record; } +@doc("Parameter supplied to Update Api Management Service.") +model ApiManagementServiceUpdateParameters extends ApimResource { + @doc("Properties of the API Management service.") + properties?: ApiManagementServiceUpdateProperties; + + @doc("SKU properties of the API Management service.") + sku?: ApiManagementServiceSkuProperties; + + @doc("Managed service identity of the Api Management service.") + identity?: ApiManagementServiceIdentity; + + @doc("ETag of the resource.") + @visibility("read") + etag?: string; + + @doc("A list of availability zones denoting where the resource needs to come from.") + zones?: string[]; +} + +@doc("Properties of an API Management service resource description.") +model ApiManagementServiceUpdateProperties + extends ApiManagementServiceBaseProperties { + @doc("Publisher email.") + @maxLength(100) + publisherEmail?: string; + + @doc("Publisher name.") + @maxLength(100) + publisherName?: string; +} + @doc("The response of the GetSsoToken operation.") model ApiManagementServiceGetSsoTokenResult { @doc("Redirect URL to the Publisher Portal containing the SSO token.") @@ -2278,6 +2550,33 @@ model EmailTemplateParametersContractProperties { description?: string; } +@doc("Email Template update Parameters.") +model EmailTemplateUpdateParameters { + @doc("Email Template Update contract properties.") + properties?: EmailTemplateUpdateParameterProperties; +} + +@doc("Email Template Update Contract properties.") +model EmailTemplateUpdateParameterProperties { + @doc("Subject of the Template.") + @maxLength(1000) + @minLength(1) + subject?: string; + + @doc("Title of the Template.") + title?: string; + + @doc("Description of the Email Template.") + description?: string; + + @doc("Email Template Body. This should be a valid XDocument") + @minLength(1) + body?: string; + + @doc("Email Template Parameter values.") + parameters?: EmailTemplateParametersContractProperties[]; +} + @doc("Properties of the Gateway contract.") model GatewayContractProperties { @doc("Gateway location.") @@ -2433,6 +2732,29 @@ model GroupCreateParametersProperties { externalId?: string; } +@doc("Parameters supplied to the Update Group operation.") +model GroupUpdateParameters { + @doc("Group entity update contract properties.") + properties?: GroupUpdateParametersProperties; +} + +@doc("Parameters supplied to the Update Group operation.") +model GroupUpdateParametersProperties { + @doc("Group name.") + @maxLength(300) + @minLength(1) + displayName?: string; + + @doc("Group description.") + description?: string; + + @doc("Group type.") + type?: GroupType; + + @doc("Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null.") + externalId?: string; +} + @doc("Paged Group Users list representation.") model ApiManagementGroupUserListResult is Azure.Core.Page { @@ -2551,6 +2873,23 @@ model IdentityProviderCreateContractProperties clientSecret: string; } +@doc("Parameters supplied to update Identity Provider") +model IdentityProviderUpdateParameters { + @doc("Identity Provider update properties.") + properties?: IdentityProviderUpdateProperties; +} + +@doc("Parameters supplied to the Update Identity Provider operation.") +model IdentityProviderUpdateProperties extends IdentityProviderBaseParameters { + @doc("Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft.") + @minLength(1) + clientId?: string; + + @doc("Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft.") + @minLength(1) + clientSecret?: string; +} + @doc("Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.") model ClientSecretContract { @doc("Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.") @@ -2579,6 +2918,27 @@ Instrumentation key for applicationInsights logger. resourceId?: string; } +@doc("Logger update contract.") +model LoggerUpdateContract { + @doc("Logger entity update contract properties.") + properties?: LoggerUpdateParameters; +} + +@doc("Parameters supplied to the Update Logger operation.") +model LoggerUpdateParameters { + @doc("Logger type.") + loggerType?: LoggerType; + + @doc("Logger description.") + description?: string; + + @doc("Logger credentials.") + credentials?: Record; + + @doc("Whether records are buffered in the logger before publishing. Default is assumed to be true.") + isBuffered?: boolean; +} + @doc("NamedValue Contract properties.") model NamedValueContractProperties extends NamedValueEntityBaseParameters { @doc("Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.") @@ -2628,6 +2988,30 @@ model NamedValueCreateContractProperties keyVault?: KeyVaultContractCreateProperties; } +@doc("NamedValue update Parameters.") +model NamedValueUpdateParameters { + @doc("NamedValue entity Update contract properties.") + properties?: NamedValueUpdateParameterProperties; +} + +@doc("NamedValue Contract properties.") +model NamedValueUpdateParameterProperties + extends NamedValueEntityBaseParameters { + @doc("Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.") + @maxLength(256) + @minLength(1) + @pattern("^[A-Za-z0-9-._]+$") + displayName?: string; + + @doc("Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace.") + @maxLength(4096) + @minLength(1) + value?: string; + + @doc("KeyVault location details of the namedValue.") + keyVault?: KeyVaultContractCreateProperties; +} + @doc("Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.") model NamedValueSecretContract { @doc("This is secret value of the NamedValue entity.") @@ -2778,6 +3162,31 @@ model OpenidConnectProviderContractProperties { clientSecret?: string; } +@doc("Parameters supplied to the Update OpenID Connect Provider operation.") +model OpenidConnectProviderUpdateContract { + @doc("OpenId Connect Provider Update contract properties.") + properties?: OpenidConnectProviderUpdateContractProperties; +} + +@doc("Parameters supplied to the Update OpenID Connect Provider operation.") +model OpenidConnectProviderUpdateContractProperties { + @doc("User-friendly OpenID Connect Provider name.") + @maxLength(50) + displayName?: string; + + @doc("User-friendly description of OpenID Connect Provider.") + description?: string; + + @doc("Metadata endpoint URI.") + metadataEndpoint?: string; + + @doc("Client ID of developer console which is the client application.") + clientId?: string; + + @doc("Client Secret of developer console which is the client application.") + clientSecret?: string; +} + @doc("Collection of Outbound Environment Endpoints") model OutboundEnvironmentEndpointList { @doc("Collection of resources.") @@ -3009,6 +3418,20 @@ model PrivateLinkResourceProperties { requiredZoneNames?: string[]; } +@doc("Product Update parameters.") +model ProductUpdateParameters { + @doc("Product entity Update contract properties.") + properties?: ProductUpdateProperties; +} + +@doc("Parameters supplied to the Update Product operation.") +model ProductUpdateProperties extends ProductEntityBaseParameters { + @doc("Product name.") + @maxLength(300) + @minLength(1) + displayName?: string; +} + @doc("Paged API list representation.") model ApiManagementProductApiListResult is Azure.Core.Page { @doc("Total record count number across all pages.") @@ -3548,6 +3971,47 @@ model SubscriptionCreateParameterProperties { allowTracing?: boolean; } +@doc("Subscription update details.") +model SubscriptionUpdateParameters { + @doc("Subscription Update contract properties.") + properties?: SubscriptionUpdateParameterProperties; +} + +@doc("Parameters supplied to the Update subscription operation.") +model SubscriptionUpdateParameterProperties { + @doc("User identifier path: /users/{userId}") + ownerId?: string; + + @doc("Scope like /products/{productId} or /apis or /apis/{apiId}") + scope?: string; + + @doc("Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expirationDate?: utcDateTime; + + @doc("Subscription name.") + displayName?: string; + + @doc("Primary subscription key.") + @maxLength(256) + @minLength(1) + primaryKey?: string; + + @doc("Secondary subscription key.") + @maxLength(256) + @minLength(1) + secondaryKey?: string; + + @doc("Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.") + state?: SubscriptionState; + + @doc("Comments describing subscription state change by the administrator when the state is changed to the 'rejected'.") + stateComment?: string; + + @doc("Determines whether tracing can be enabled") + allowTracing?: boolean; +} + @doc("Subscription keys.") model SubscriptionKeysContract { @doc("Subscription primary key.") @@ -3600,6 +4064,18 @@ model AccessInformationCreateParameterProperties { enabled?: boolean; } +@doc("Tenant access information update parameters.") +model AccessInformationUpdateParameters { + @doc("Tenant access information update parameter properties.") + properties?: AccessInformationUpdateParameterProperties; +} + +@doc("Tenant access information update parameters of the API Management service") +model AccessInformationUpdateParameterProperties { + @doc("Determines whether direct access is enabled.") + enabled?: boolean; +} + @doc("Tenant access information contract of the API Management service.") model AccessInformationSecretsContract { @doc("Access Information type ('access' or 'gitAccess')") @@ -3773,6 +4249,33 @@ model UserCreateParameterProperties extends UserEntityBaseParameters { confirmation?: Confirmation; } +@doc("User update parameters.") +model UserUpdateParameters { + @doc("User entity update contract properties.") + properties?: UserUpdateParametersProperties; +} + +@doc("Parameters supplied to the Update User operation.") +model UserUpdateParametersProperties extends UserEntityBaseParameters { + @doc("Email address. Must not be empty and must be unique within the service instance.") + @maxLength(254) + @minLength(1) + email?: string; + + @doc("User Password.") + password?: string; + + @doc("First name.") + @maxLength(100) + @minLength(1) + firstName?: string; + + @doc("Last name.") + @maxLength(100) + @minLength(1) + lastName?: string; +} + @doc("Generate SSO Url operations response details.") model GenerateSsoUrlResult { @doc("Redirect Url containing the SSO URL value.") diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp index 0ffcfed5d5..c8c870a02e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp @@ -1,9 +1,11 @@ import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.ResourceManager; namespace Azure.ResourceManager.ApiManagement; @@ -48,7 +50,7 @@ interface TagOperations { @path subscriptionId: string; }, - TagListResult + ResourceListResult >; @doc("Gets the entity state version of the tag specified by its identifier.") @@ -238,7 +240,7 @@ interface TagOperations { @path subscriptionId: string; }, - TagListResult + ResourceListResult >; @doc("Gets the entity state version of the tag specified by its identifier.") @@ -422,7 +424,7 @@ interface TagOperations { @path subscriptionId: string; }, - TagListResult + ResourceListResult >; @doc("Gets the entity state version of the tag specified by its identifier.") @@ -624,7 +626,7 @@ interface ApiPolicyOperations { @path subscriptionId: string; }, - PolicyListResult + ResourceListResult >; @doc("Gets the entity state (Etag) version of the API policy specified by its identifier.") @@ -690,7 +692,7 @@ interface ApiPolicyOperations { @doc("Policy Export Format.") @query("format") - format?: PolicyExportFormat = "xml"; + format?: PolicyExportFormat = PolicyExportFormat.xml; @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") @path @@ -858,7 +860,7 @@ interface DiagnosticOperations { @path subscriptionId: string; }, - DiagnosticListResult + ResourceListResult >; @doc("Gets the entity state (Etag) version of the Diagnostic specified by its identifier.") @@ -1066,7 +1068,7 @@ interface IssueOperations { @path subscriptionId: string; }, - IssueListResult + ResourceListResult >; @doc("Gets API Management issue details") @@ -1121,7 +1123,7 @@ interface PolicyOperations { @path subscriptionId: string; }, - PolicyListResult + ResourceListResult >; @doc("Gets the entity state (Etag) version of the Global policy definition in the Api Management service.") @@ -1173,7 +1175,7 @@ interface PolicyOperations { @doc("Policy Export Format.") @query("format") - format?: PolicyExportFormat = "xml"; + format?: PolicyExportFormat = PolicyExportFormat.xml; @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") @path @@ -1276,7 +1278,7 @@ interface ProductPolicyOperations { @path subscriptionId: string; }, - PolicyListResult + ResourceListResult >; @doc("Get the ETag of the policy configuration at the Product level.") @@ -1340,7 +1342,7 @@ interface ProductPolicyOperations { @doc("Policy Export Format.") @query("format") - format?: PolicyExportFormat = "xml"; + format?: PolicyExportFormat = PolicyExportFormat.xml; @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") @path @@ -1482,7 +1484,7 @@ interface UserSubscriptionOperations { @path subscriptionId: string; }, - SubscriptionListResult + ResourceListResult >; @doc("Gets the specified Subscription entity associated with a particular user.") diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/authorization.md b/packages/extensions/openapi-to-typespec/test/arm-authorization/authorization.md new file mode 100644 index 0000000000..7fc7c9927f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/authorization.md @@ -0,0 +1,358 @@ +```yaml +library-name: Authorization +namespace: Azure.ResourceManager.Authorization +isAzureSpec: true +isArm: true +require: https://github.com/Azure/azure-rest-api-specs/blob/a436672b07fb1fe276c203b086b3f0e0d0c4aa24/specification/authorization/resource-manager/readme.md +tag: package-2022-04-01 +output-folder: Generated/ +skip-csproj: true + +rename-mapping: + RoleAssignment.properties.delegatedManagedIdentityResourceId: -|arm-id + DenyAssignment.properties.doNotApplyToChildScopes: IsAppliedToChildScopes + RoleAssignmentSchedule.properties.linkedRoleEligibilityScheduleId: -|arm-id + RoleAssignmentSchedule.properties.roleAssignmentScheduleRequestId: -|arm-id + RoleAssignmentScheduleInstance.properties.linkedRoleEligibilityScheduleId: -|arm-id + RoleAssignmentScheduleInstance.properties.linkedRoleEligibilityScheduleInstanceId: -|arm-id + RoleAssignmentScheduleInstance.properties.originRoleAssignmentId: -|arm-id + RoleAssignmentScheduleInstance.properties.roleAssignmentScheduleId: -|arm-id + RoleAssignmentScheduleRequest.properties.linkedRoleEligibilityScheduleId: -|arm-id + RoleAssignmentScheduleRequest.properties.targetRoleAssignmentScheduleId: -|arm-id + RoleAssignmentScheduleRequest.properties.targetRoleAssignmentScheduleInstanceId: -|arm-id + RoleEligibilitySchedule.properties.roleEligibilityScheduleRequestId: -|arm-id + RoleEligibilityScheduleInstance.properties.roleEligibilityScheduleId: -|arm-id + RoleEligibilityScheduleRequest.properties.targetRoleEligibilityScheduleId: -|arm-id + RoleEligibilityScheduleRequest.properties.targetRoleEligibilityScheduleInstanceId: -|arm-id + RoleManagementPolicyApprovalRule.setting: Settings + RoleManagementPolicyEnablementRule.enabledRules: EnablementRules + RoleManagementPolicyNotificationRule.notificationType: NotificationDeliveryType + RoleManagementPolicyNotificationRule.isDefaultRecipientsEnabled: AreDefaultRecipientsEnabled + ScopeType.managementgroup: ManagementGroup + ScopeType.resourcegroup: ResourceGroup + ApprovalMode: RoleManagementApprovalMode + ApprovalSettings: RoleManagementApprovalSettings + ApprovalStage: RoleManagementApprovalStage + AssignmentType: RoleAssignmentScheduleAssignmentType + ClassicAdministrator: AuthorizationClassicAdministrator + ClassicAdministratorListResult: AuthorizationClassicAdministratorListResult + EnablementRules: RoleAssignmentEnablementRuleType + ExpandedProperties: RoleManagementExpandedProperties + NotificationDeliveryMechanism: NotificationDeliveryType + NotificationLevel: RoleManagementPolicyNotificationLevel + Permission: RoleDefinitionPermission + PermissionGetResult: RoleDefinitionPermissionListResult + RoleDefinition: AuthorizationRoleDefinition + RoleType: AuthorizationRoleType + PolicyProperties: RoleManagementPolicyProperties + Principal: RoleManagementPrincipal + PrincipalType: RoleManagementPrincipalType + ProviderOperation: AuthorizationProviderOperationInfo + ProviderOperationsMetadata: AuthorizationProviderOperationsMetadata + ProviderOperationsMetadataListResult: AuthorizationProviderOperationsMetadataListResult + RecipientType: RoleManagementPolicyRecipientType + RoleAssignmentScheduleRequestPropertiesTicketInfo: RoleAssignmentScheduleTicketInfo + ScopeType: RoleManagementScopeType + UserSet: RoleManagementUserInfo + UserType: RoleManagementUserType + +format-by-name-rules: + "tenantId": "uuid" + "applicationId": "uuid" + "etag": "etag" + "location": "azure-location" + "principalId": "uuid" + "requestorId": "uuid" + "roleDefinitionId": "arm-id" + "policyId": "arm-id" + "*Uri": "Uri" + "*Uris": "Uri" + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag + +generate-arm-resource-extensions: + - /{scope}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} + - /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName} + - /{scope}/providers/Microsoft.Authorization/roleAssignmentSchedules/{roleAssignmentScheduleName} + - /{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleInstances/{roleAssignmentScheduleInstanceName} + - /{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} + - /{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName} + - /{scope}/providers/Microsoft.Authorization/roleEligibilitySchedules/{roleEligibilityScheduleName} + - /{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName} + - /{scope}/providers/Microsoft.Authorization/roleManagementPolicies/{roleManagementPolicyName} + - /{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName} + - /{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleInstances/{roleEligibilityScheduleInstanceName} + +request-path-to-resource-type: + /{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName}: Microsoft.Authorization/roleManagementPolicyAssignments + +directive: + # The requested resource does not support http method 'DELETE' + - remove-operation: "RoleManagementPolicies_Delete" + - remove-operation: "RoleManagementPolicyAssignments_Delete" + # TODO: remove dup methods with scope method, here is another issue logged https://github.com/Azure/autorest.csharp/issues/2629 + - remove-operation: "RoleAssignments_ListForSubscription" + - remove-operation: "RoleAssignments_ListForResourceGroup" + - remove-operation: "RoleAssignments_ListForResource" + # remove all ById Path + - from: authorization-RoleAssignmentsCalls.json + where: $.paths['/{roleAssignmentId}'] + transform: $ = {} + - from: authorization-RoleDefinitionsCalls.json + where: $.paths['/{roleDefinitionId}'] + transform: $ = {} + - from: authorization-RoleDefinitionsCalls.json + where: $['x-ms-paths']['/{roleId}?disambiguation_dummy'] + transform: $ = {} + - from: authorization-DenyAssignmentCalls.json + where: $.paths['/{denyAssignmentId}'] + transform: $ = {} + + - from: authorization-RoleDefinitionsCalls.json + where: $.paths['/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/permissions'].get + transform: $.operationId = 'AzurePermissionsForResourceGroup_List' + - from: authorization-RoleDefinitionsCalls.json + where: $.paths['/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/permissions'].get + transform: $.operationId = 'AzurePermissionsForResource_List' + + - from: authorization-RoleAssignmentsCalls.json + where: $.definitions + transform: > + $.RoleAssignmentProperties.properties.delegatedManagedIdentityResourceId["x-nullable"] = true; + - from: common-types.json + where: $.definitions + transform: > + $.RoleManagementPolicyExpirationRule.properties.maximumDuration['format'] = 'duration'; + $.UserSet.properties.id['x-ms-format'] = 'uuid'; + $.RoleManagementPolicyRuleTarget.properties.level = { + 'type': 'string', + 'description': 'The assignment level to which rule is applied.', + 'enum': [ + 'Assignment', + 'Eligibility' + ], + 'x-ms-enum': { + 'name': 'RoleManagementAssignmentLevel', + 'modelAsString': true + } + }; + $.Principal.properties.type = { + 'type': 'string', + 'description': 'Type of the principal.', + 'x-ms-client-name': 'principalType', + 'enum': [ + 'User', + 'Group', + 'ServicePrincipal', + 'ForeignGroup', + 'Device' + ], + 'x-ms-enum': { + 'name': 'principalType', + 'modelAsString': true + } + }; + delete $.Permission; + + - from: RoleAssignmentSchedule.json + where: $.definitions + transform: > + $.RoleAssignmentScheduleProperties.properties.status['x-ms-enum']['name'] = 'RoleManagementScheduleStatus'; + $.RoleAssignmentScheduleProperties.properties.memberType['x-ms-enum']['name'] = 'RoleManagementScheduleMemberType'; + - from: RoleAssignmentScheduleInstance.json + where: $.definitions + transform: > + $.RoleAssignmentScheduleInstanceProperties.properties.status['x-ms-enum']['name'] = 'RoleManagementScheduleStatus'; + $.RoleAssignmentScheduleInstanceProperties.properties.memberType['x-ms-enum']['name'] = 'RoleManagementScheduleMemberType'; + - from: RoleAssignmentScheduleRequest.json + where: $.definitions + transform: > + $.RoleAssignmentScheduleRequestProperties.properties.status['x-ms-enum']['name'] = 'RoleManagementScheduleStatus'; + $.RoleAssignmentScheduleRequestProperties.properties.requestType['x-ms-enum']['name'] = 'RoleManagementScheduleRequestType'; + $.RoleAssignmentScheduleRequestProperties.properties.scheduleInfo.properties.expiration.properties.type['x-ms-enum']['name'] = 'RoleManagementScheduleExpirationType'; + $.RoleAssignmentScheduleRequestProperties.properties.scheduleInfo.properties.expiration.properties.type['x-ms-client-name'] = 'ExpirationType'; + $.RoleAssignmentScheduleRequestProperties.properties.scheduleInfo.properties.expiration.properties.duration['format'] = 'duration'; + $.RoleAssignmentScheduleRequestProperties.properties.scheduleInfo['x-ms-client-flatten'] = true; + $.RoleAssignmentScheduleRequestProperties.properties.scheduleInfo.properties.expiration['x-ms-client-flatten'] = true; + - from: RoleEligibilitySchedule.json + where: $.definitions + transform: > + $.RoleEligibilityScheduleProperties.properties.status['x-ms-enum']['name'] = 'RoleManagementScheduleStatus'; + $.RoleEligibilityScheduleProperties.properties.memberType['x-ms-enum']['name'] = 'RoleManagementScheduleMemberType'; + - from: RoleEligibilityScheduleInstance.json + where: $.definitions + transform: > + $.RoleEligibilityScheduleInstanceProperties.properties.status['x-ms-enum']['name'] = 'RoleManagementScheduleStatus'; + $.RoleEligibilityScheduleInstanceProperties.properties.memberType['x-ms-enum']['name'] = 'RoleManagementScheduleMemberType'; + - from: RoleEligibilityScheduleRequest.json + where: $.definitions + transform: > + $.RoleEligibilityScheduleRequestProperties.properties.status['x-ms-enum']['name'] = 'RoleManagementScheduleStatus'; + $.RoleEligibilityScheduleRequestProperties.properties.requestType['x-ms-enum']['name'] = 'RoleManagementScheduleRequestType'; + $.RoleEligibilityScheduleRequestProperties.properties.scheduleInfo.properties.expiration.properties.type['x-ms-enum']['name'] = 'RoleManagementScheduleExpirationType'; + $.RoleEligibilityScheduleRequestProperties.properties.scheduleInfo.properties.expiration.properties.type['x-ms-client-name'] = 'ExpirationType'; + $.RoleEligibilityScheduleRequestProperties.properties.scheduleInfo.properties.expiration.properties.duration['format'] = 'duration'; + $.RoleEligibilityScheduleRequestProperties.properties.scheduleInfo['x-ms-client-flatten'] = true; + $.RoleEligibilityScheduleRequestProperties.properties.scheduleInfo.properties.expiration['x-ms-client-flatten'] = true; + - from: RoleManagementPolicy.json + where: $.definitions + transform: > + $.PolicyProperties.properties.scope['x-ms-client-flatten'] = true; + $.PolicyProperties.properties.scope.properties.id['x-ms-format'] = 'arm-id'; + $.PolicyProperties.properties.scope.properties.id['x-ms-client-name'] = 'ScopeId'; + $.PolicyProperties.properties.scope.properties.displayName['x-ms-client-name'] = 'ScopeDisplayName'; + $.PolicyProperties.properties.scope.properties.type = { + 'type': 'string', + 'description': 'Type of the scope.', + 'x-ms-client-name': 'ScopeType', + 'enum': [ + 'subscription', + 'managementgroup', + 'resourcegroup' + ], + 'x-ms-enum': { + 'name': 'ScopeType', + 'modelAsString': true + } + }; + - from: authorization-RoleDefinitionsCalls.json + where: $.definitions + transform: > + $.RoleDefinitionProperties.properties.type = { + 'type': 'string', + 'description': 'The role type.', + 'x-ms-client-name': 'RoleType', + 'enum': [ + 'BuiltInRole', + 'CustomRole' + ], + 'x-ms-enum': { + 'name': 'RoleType', + 'modelAsString': true + } + }; + - from: authorization-ProviderOperationsCalls.json + where: $.definitions + transform: > + $.ResourceType['x-ms-client-name'] = 'AuthorizationProviderResourceType'; + $.ProviderOperation.properties.properties['x-nullable'] = true + - from: swagger-document + where: $.definitions.ExpandedProperties.properties + transform: > + $.scope['x-ms-client-flatten'] = true; + $.scope.properties.id['x-ms-format'] = 'arm-id'; + $.scope.properties.id['x-ms-client-name'] = 'ScopeId'; + $.scope.properties.displayName['x-ms-client-name'] = 'ScopeDisplayName'; + $.scope.properties.type = { + 'type': 'string', + 'description': 'Type of the scope.', + 'x-ms-client-name': 'ScopeType', + 'enum': [ + 'subscription', + 'managementgroup', + 'resourcegroup' + ], + 'x-ms-enum': { + 'name': 'ScopeType', + 'modelAsString': true + } + }; + $.roleDefinition['x-ms-client-flatten'] = true; + $.roleDefinition.properties.id['x-ms-format'] = 'arm-id'; + $.roleDefinition.properties.id['x-ms-client-name'] = 'RoleDefinitionId'; + $.roleDefinition.properties.displayName['x-ms-client-name'] = 'RoleDefinitionDisplayName'; + $.roleDefinition.properties.type = { + 'type': 'string', + 'description': 'The role type.', + 'x-ms-client-name': 'RoleType', + 'enum': [ + 'BuiltInRole', + 'CustomRole' + ], + 'x-ms-enum': { + 'name': 'RoleType', + 'modelAsString': true + } + }; + $.principal['x-ms-client-flatten'] = true; + $.principal.properties.id['x-ms-format'] = 'arm-id'; + $.principal.properties.id['x-ms-client-name'] = 'PrincipalId'; + $.principal.properties.displayName['x-ms-client-name'] = 'PrincipalDisplayName'; + $.principal.properties.type = { + 'type': 'string', + 'description': 'Type of the principal.', + 'x-ms-client-name': 'principalType', + 'enum': [ + 'User', + 'Group', + 'ServicePrincipal', + 'ForeignGroup', + 'Device' + ], + 'x-ms-enum': { + 'name': 'principalType', + 'modelAsString': true + } + }; + - from: swagger-document + where: $.definitions.PolicyAssignmentProperties.properties + transform: > + $.scope['x-ms-client-flatten'] = true; + $.scope.properties.id['x-ms-format'] = 'arm-id'; + $.scope.properties.id['x-ms-client-name'] = 'ScopeId'; + $.scope.properties.displayName['x-ms-client-name'] = 'ScopeDisplayName'; + $.scope.properties.type = { + 'type': 'string', + 'description': 'Type of the scope.', + 'x-ms-client-name': 'ScopeType', + 'enum': [ + 'subscription', + 'managementgroup', + 'resourcegroup' + ], + 'x-ms-enum': { + 'name': 'ScopeType', + 'modelAsString': true + } + }; + $.roleDefinition['x-ms-client-flatten'] = true; + $.roleDefinition.properties.id['x-ms-format'] = 'arm-id'; + $.roleDefinition.properties.id['x-ms-client-name'] = 'RoleDefinitionId'; + $.roleDefinition.properties.displayName['x-ms-client-name'] = 'RoleDefinitionDisplayName'; + $.roleDefinition.properties.type = { + 'type': 'string', + 'description': 'The role type.', + 'x-ms-client-name': 'RoleType', + 'enum': [ + 'BuiltInRole', + 'CustomRole' + ], + 'x-ms-enum': { + 'name': 'RoleType', + 'modelAsString': true + } + }; + $.policy['x-ms-client-flatten'] = true; + $.policy.properties.id['x-ms-format'] = 'arm-id'; + $.policy.properties.id['x-ms-client-name'] = 'PolicyId'; +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/resources.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/resources.json new file mode 100644 index 0000000000..be207770a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/resources.json @@ -0,0 +1,802 @@ +{ + "Resources": { + "DenyAssignment": { + "Name": "DenyAssignment", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId}", + "Method": "GET", + "OperationID": "DenyAssignments_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the specified deny assignment." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/denyAssignments", + "Method": "GET", + "OperationID": "DenyAssignments_ListForResource", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForResource", + "NextPageMethod": "ListForResourceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets deny assignments for a resource." + }, + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/denyAssignments", + "Method": "GET", + "OperationID": "DenyAssignments_ListForResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForResourceGroup", + "NextPageMethod": "ListForResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets deny assignments for a resource group." + }, + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/denyAssignments", + "Method": "GET", + "OperationID": "DenyAssignments_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets all deny assignments for the subscription." + }, + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/denyAssignments", + "Method": "GET", + "OperationID": "DenyAssignments_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets deny assignments for a scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "DenyAssignment", + "ResourceType": "Microsoft.Authorization/denyAssignments", + "ResourceKey": "denyAssignmentId", + "ResourceKeySegment": "denyAssignments", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "AuthorizationProviderOperationsMetadata": { + "Name": "AuthorizationProviderOperationsMetadata", + "GetOperations": [ + { + "Name": "Get", + "Path": "/providers/Microsoft.Authorization/providerOperations/{resourceProviderNamespace}", + "Method": "GET", + "OperationID": "ProviderOperationsMetadata_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets provider operations metadata for the specified resource provider." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/providers/Microsoft.Authorization/providerOperations", + "Method": "GET", + "OperationID": "ProviderOperationsMetadata_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets provider operations metadata for all resource providers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["TenantResource"], + "SwaggerModelName": "ProviderOperationsMetadata", + "ResourceType": "Microsoft.Authorization/providerOperations", + "ResourceKey": "resourceProviderNamespace", + "ResourceKeySegment": "providerOperations", + "IsTrackedResource": false, + "IsTenantResource": true, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "RoleAssignment": { + "Name": "RoleAssignment", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}", + "Method": "GET", + "OperationID": "RoleAssignments_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a role assignment by scope and name." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}", + "Method": "PUT", + "OperationID": "RoleAssignments_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update a role assignment by scope and name." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}", + "Method": "PUT", + "OperationID": "RoleAssignments_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update a role assignment by scope and name." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}", + "Method": "DELETE", + "OperationID": "RoleAssignments_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a role assignment by scope and name." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignments", + "Method": "GET", + "OperationID": "RoleAssignments_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List all role assignments that apply to a scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleAssignment", + "ResourceType": "Microsoft.Authorization/roleAssignments", + "ResourceKey": "roleAssignmentName", + "ResourceKeySegment": "roleAssignments", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "AuthorizationRoleDefinition": { + "Name": "AuthorizationRoleDefinition", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}", + "Method": "GET", + "OperationID": "RoleDefinitions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get role definition by name (GUID)." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}", + "Method": "PUT", + "OperationID": "RoleDefinitions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a role definition." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}", + "Method": "PUT", + "OperationID": "RoleDefinitions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a role definition." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}", + "Method": "DELETE", + "OperationID": "RoleDefinitions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a role definition." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleDefinitions", + "Method": "GET", + "OperationID": "RoleDefinitions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Get all role definitions that are applicable at scope and above." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleDefinition", + "ResourceType": "Microsoft.Authorization/roleDefinitions", + "ResourceKey": "roleDefinitionId", + "ResourceKeySegment": "roleDefinitions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleAssignmentSchedule": { + "Name": "RoleAssignmentSchedule", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentSchedules/{roleAssignmentScheduleName}", + "Method": "GET", + "OperationID": "RoleAssignmentSchedules_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the specified role assignment schedule for a resource scope" + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentSchedules", + "Method": "GET", + "OperationID": "RoleAssignmentSchedules_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role assignment schedules for a resource scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleAssignmentSchedule", + "ResourceType": "Microsoft.Authorization/roleAssignmentSchedules", + "ResourceKey": "roleAssignmentScheduleName", + "ResourceKeySegment": "roleAssignmentSchedules", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleAssignmentScheduleInstance": { + "Name": "RoleAssignmentScheduleInstance", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleInstances/{roleAssignmentScheduleInstanceName}", + "Method": "GET", + "OperationID": "RoleAssignmentScheduleInstances_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the specified role assignment schedule instance." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleInstances", + "Method": "GET", + "OperationID": "RoleAssignmentScheduleInstances_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role assignment schedule instances of a role assignment schedule." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleAssignmentScheduleInstance", + "ResourceType": "Microsoft.Authorization/roleAssignmentScheduleInstances", + "ResourceKey": "roleAssignmentScheduleInstanceName", + "ResourceKeySegment": "roleAssignmentScheduleInstances", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleAssignmentScheduleRequest": { + "Name": "RoleAssignmentScheduleRequest", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName}", + "Method": "GET", + "OperationID": "RoleAssignmentScheduleRequests_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the specified role assignment schedule request." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName}", + "Method": "PUT", + "OperationID": "RoleAssignmentScheduleRequests_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a role assignment schedule request." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName}", + "Method": "PUT", + "OperationID": "RoleAssignmentScheduleRequests_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a role assignment schedule request." + } + ], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests", + "Method": "GET", + "OperationID": "RoleAssignmentScheduleRequests_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role assignment schedule requests for a scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Cancel", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName}/cancel", + "Method": "POST", + "OperationID": "RoleAssignmentScheduleRequests_Cancel", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Cancels a pending role assignment schedule request." + }, + { + "Name": "Validate", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName}/validate", + "Method": "POST", + "OperationID": "RoleAssignmentScheduleRequests_Validate", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Validates a new role assignment schedule request." + } + ], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleAssignmentScheduleRequest", + "ResourceType": "Microsoft.Authorization/roleAssignmentScheduleRequests", + "ResourceKey": "roleAssignmentScheduleRequestName", + "ResourceKeySegment": "roleAssignmentScheduleRequests", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleEligibilitySchedule": { + "Name": "RoleEligibilitySchedule", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilitySchedules/{roleEligibilityScheduleName}", + "Method": "GET", + "OperationID": "RoleEligibilitySchedules_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the specified role eligibility schedule for a resource scope" + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilitySchedules", + "Method": "GET", + "OperationID": "RoleEligibilitySchedules_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role eligibility schedules for a resource scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleEligibilitySchedule", + "ResourceType": "Microsoft.Authorization/roleEligibilitySchedules", + "ResourceKey": "roleEligibilityScheduleName", + "ResourceKeySegment": "roleEligibilitySchedules", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleEligibilityScheduleInstance": { + "Name": "RoleEligibilityScheduleInstance", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleInstances/{roleEligibilityScheduleInstanceName}", + "Method": "GET", + "OperationID": "RoleEligibilityScheduleInstances_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the specified role eligibility schedule instance." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleInstances", + "Method": "GET", + "OperationID": "RoleEligibilityScheduleInstances_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role eligibility schedule instances of a role eligibility schedule." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleEligibilityScheduleInstance", + "ResourceType": "Microsoft.Authorization/roleEligibilityScheduleInstances", + "ResourceKey": "roleEligibilityScheduleInstanceName", + "ResourceKeySegment": "roleEligibilityScheduleInstances", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleEligibilityScheduleRequest": { + "Name": "RoleEligibilityScheduleRequest", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName}", + "Method": "GET", + "OperationID": "RoleEligibilityScheduleRequests_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the specified role eligibility schedule request." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName}", + "Method": "PUT", + "OperationID": "RoleEligibilityScheduleRequests_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a role eligibility schedule request." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName}", + "Method": "PUT", + "OperationID": "RoleEligibilityScheduleRequests_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a role eligibility schedule request." + } + ], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests", + "Method": "GET", + "OperationID": "RoleEligibilityScheduleRequests_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role eligibility schedule requests for a scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Cancel", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName}/cancel", + "Method": "POST", + "OperationID": "RoleEligibilityScheduleRequests_Cancel", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Cancels a pending role eligibility schedule request." + }, + { + "Name": "Validate", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName}/validate", + "Method": "POST", + "OperationID": "RoleEligibilityScheduleRequests_Validate", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Validates a new role eligibility schedule request." + } + ], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleEligibilityScheduleRequest", + "ResourceType": "Microsoft.Authorization/roleEligibilityScheduleRequests", + "ResourceKey": "roleEligibilityScheduleRequestName", + "ResourceKeySegment": "roleEligibilityScheduleRequests", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleManagementPolicy": { + "Name": "RoleManagementPolicy", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleManagementPolicies/{roleManagementPolicyName}", + "Method": "GET", + "OperationID": "RoleManagementPolicies_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the specified role management policy for a resource scope" + } + ], + "CreateOperations": [], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/{scope}/providers/Microsoft.Authorization/roleManagementPolicies/{roleManagementPolicyName}", + "Method": "PATCH", + "OperationID": "RoleManagementPolicies_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update a role management policy" + } + ], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleManagementPolicies", + "Method": "GET", + "OperationID": "RoleManagementPolicies_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role management policies for a resource scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleManagementPolicy", + "ResourceType": "Microsoft.Authorization/roleManagementPolicies", + "ResourceKey": "roleManagementPolicyName", + "ResourceKeySegment": "roleManagementPolicies", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleManagementPolicyAssignment": { + "Name": "RoleManagementPolicyAssignment", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName}", + "Method": "GET", + "OperationID": "RoleManagementPolicyAssignments_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the specified role management policy assignment for a resource scope" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName}", + "Method": "PUT", + "OperationID": "RoleManagementPolicyAssignments_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a role management policy assignment" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName}", + "Method": "PUT", + "OperationID": "RoleManagementPolicyAssignments_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a role management policy assignment" + } + ], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments", + "Method": "GET", + "OperationID": "RoleManagementPolicyAssignments_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role management assignment policies for a resource scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleManagementPolicyAssignment", + "ResourceType": "Microsoft.Authorization/roleManagementPolicyAssignments", + "ResourceKey": "roleManagementPolicyAssignmentName", + "ResourceKeySegment": "roleManagementPolicyAssignments", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp new file mode 100644 index 0000000000..dbba191362 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp @@ -0,0 +1,66 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Deny Assignment") +model DenyAssignment is ExtensionResource { + @doc("The ID of the deny assignment to get.") + @path + @key("denyAssignmentId") + @segment("denyAssignments") + name: string; +} + +@armResourceOperations +interface DenyAssignments { + @doc("Get the specified deny assignment.") + get is ArmResourceRead; + + @doc("Gets deny assignments for a resource.") + listForResource is ArmResourceListByParent< + DenyAssignment, + { + ...BaseParameters; + + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("The namespace of the resource provider.") + @path + resourceProviderNamespace: string; + + @doc("The parent resource identity.") + @path + parentResourcePath: string; + + @doc("The resource type of the resource.") + @path + resourceType: string; + + @doc("The name of the resource to get deny assignments for.") + @path + resourceName: string; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. This filter is different from the principalId filter as it returns not only those deny assignments that contain the specified principal is the Principals list but also those deny assignments that contain the specified principal is the ExcludePrincipals list. Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and description properties are returned.") + @query("$filter") + $filter?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp new file mode 100644 index 0000000000..ebf7e544e3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp @@ -0,0 +1,60 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +// FIXME: ProviderOperationsMetadata has no properties property +@doc("Provider Operations metadata") +@tenantResource +model ProviderOperationsMetadata is ProxyResource<{}> { + @doc("The namespace of the resource provider.") + @path + @key("resourceProviderNamespace") + @segment("providerOperations") + name: string; + + @doc("The provider display name.") + displayName?: string; + + @doc("The provider resource types") + resourceTypes?: AuthorizationProviderResourceType[]; + + @doc("The provider operations.") + operations?: ProviderOperation[]; +} + +@armResourceOperations +@projectedName("client", "ProviderOperationsMetadata") +interface ProviderOperationsMetadataOperationGroup { + @doc("Gets provider operations metadata for the specified resource provider.") + get is ArmResourceRead< + ProviderOperationsMetadata, + { + ...BaseParameters; + + @doc("Specifies whether to expand the values.") + @query("$expand") + $expand?: string = "resourceTypes"; + } + >; + + @doc("Gets provider operations metadata for all resource providers.") + list is ArmResourceListByParent< + ProviderOperationsMetadata, + { + ...BaseParameters; + + @doc("Specifies whether to expand the values.") + @query("$expand") + $expand?: string = "resourceTypes"; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp new file mode 100644 index 0000000000..4f12057895 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp @@ -0,0 +1,71 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role Assignments") +model RoleAssignment is ExtensionResource { + @doc("The name of the role assignment. It can be any valid GUID.") + @path + @key("roleAssignmentName") + @segment("roleAssignments") + name: string; +} + +@armResourceOperations +interface RoleAssignments { + @doc("Get a role assignment by scope and name.") + get is ArmResourceRead< + RoleAssignment, + { + ...BaseParameters; + + @doc("Tenant ID for cross-tenant request") + @query("tenantId") + tenantId?: string; + } + >; + + @doc("Create or update a role assignment by scope and name.") + create is ArmResourceCreateOrReplaceSync; + + @doc("Delete a role assignment by scope and name.") + delete is ArmResourceDeleteSync< + RoleAssignment, + { + ...BaseParameters; + + @doc("Tenant ID for cross-tenant request") + @query("tenantId") + tenantId?: string; + } + >; + + @doc("List all role assignments that apply to a scope.") + listForScope is ArmResourceListByParent< + RoleAssignment, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal.") + @query("$filter") + $filter?: string; + + @doc("Tenant ID for cross-tenant request") + @query("tenantId") + tenantId?: string; + + @doc("The skipToken to apply on the operation. Use $skipToken={skiptoken} to return paged role assignments following the skipToken passed. Only supported on provider level calls.") + @query("$skipToken") + $skipToken?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp new file mode 100644 index 0000000000..252768525f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp @@ -0,0 +1,40 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role Assignment schedule") +model RoleAssignmentSchedule + is ExtensionResource { + @doc("The name (guid) of the role assignment schedule to get.") + @path + @key("roleAssignmentScheduleName") + @segment("roleAssignmentSchedules") + name: string; +} + +@armResourceOperations +interface RoleAssignmentSchedules { + @doc("Get the specified role assignment schedule for a resource scope") + get is ArmResourceRead; + + @doc("Gets role assignment schedules for a resource scope.") + listForScope is ArmResourceListByParent< + RoleAssignmentSchedule, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment schedules for the current user. Use $filter=asTarget() to return all role assignment schedules created for the current user.") + @query("$filter") + $filter?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp new file mode 100644 index 0000000000..8d3f7c4b86 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp @@ -0,0 +1,40 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Information about current or upcoming role assignment schedule instance") +model RoleAssignmentScheduleInstance + is ExtensionResource { + @doc("The name (hash of schedule name + time) of the role assignment schedule to get.") + @path + @key("roleAssignmentScheduleInstanceName") + @segment("roleAssignmentScheduleInstances") + name: string; +} + +@armResourceOperations +interface RoleAssignmentScheduleInstances { + @doc("Gets the specified role assignment schedule instance.") + get is ArmResourceRead; + + @doc("Gets role assignment schedule instances of a role assignment schedule.") + listForScope is ArmResourceListByParent< + RoleAssignmentScheduleInstance, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment schedule instances for the user. Use $filter=asTarget() to return all role assignment schedule instances created for the current user.") + @query("$filter") + $filter?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp new file mode 100644 index 0000000000..74751c9ea9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp @@ -0,0 +1,53 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role Assignment schedule request") +model RoleAssignmentScheduleRequest + is ExtensionResource { + @doc("The name (guid) of the role assignment schedule request to get.") + @path + @key("roleAssignmentScheduleRequestName") + @segment("roleAssignmentScheduleRequests") + name: string; +} + +@armResourceOperations +interface RoleAssignmentScheduleRequests { + @doc("Get the specified role assignment schedule request.") + get is ArmResourceRead; + + @doc("Creates a role assignment schedule request.") + create is ArmResourceCreateOrReplaceSync; + + @doc("Gets role assignment schedule requests for a scope.") + listForScope is ArmResourceListByParent< + RoleAssignmentScheduleRequest, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role assignment schedule requests requested by the current user. Use $filter=asTarget() to return all role assignment schedule requests created for the current user. Use $filter=asApprover() to return all role assignment schedule requests where the current user is an approver.") + @query("$filter") + $filter?: string; + } + >; + + @doc("Cancels a pending role assignment schedule request.") + cancel is ArmResourceActionSync; + + @doc("Validates a new role assignment schedule request.") + validate is ArmResourceActionSync< + RoleAssignmentScheduleRequest, + RoleAssignmentScheduleRequest, + RoleAssignmentScheduleRequest + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp new file mode 100644 index 0000000000..675b042085 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp @@ -0,0 +1,45 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role definition.") +model RoleDefinition is ExtensionResource { + @doc("The ID of the role definition.") + @path + @key("roleDefinitionId") + @segment("roleDefinitions") + name: string; +} + +@armResourceOperations +interface RoleDefinitions { + @doc("Get role definition by name (GUID).") + get is ArmResourceRead; + + @doc("Creates or updates a role definition.") + createOrUpdate is ArmResourceCreateOrReplaceSync; + + @doc("Deletes a role definition.") + delete is ArmResourceDeleteSync; + + @doc("Get all role definitions that are applicable at scope and above.") + list is ArmResourceListByParent< + RoleDefinition, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well.") + @query("$filter") + $filter?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp new file mode 100644 index 0000000000..fe16e2f188 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp @@ -0,0 +1,40 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role eligibility schedule") +model RoleEligibilitySchedule + is ExtensionResource { + @doc("The name (guid) of the role eligibility schedule to get.") + @path + @key("roleEligibilityScheduleName") + @segment("roleEligibilitySchedules") + name: string; +} + +@armResourceOperations +interface RoleEligibilitySchedules { + @doc("Get the specified role eligibility schedule for a resource scope") + get is ArmResourceRead; + + @doc("Gets role eligibility schedules for a resource scope.") + listForScope is ArmResourceListByParent< + RoleEligibilitySchedule, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedules at or above the scope. Use $filter=principalId eq {id} to return all role eligibility schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use $filter=asTarget() to return all role eligibility schedules created for the current user.") + @query("$filter") + $filter?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp new file mode 100644 index 0000000000..6b4c4690ef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp @@ -0,0 +1,40 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Information about current or upcoming role eligibility schedule instance") +model RoleEligibilityScheduleInstance + is ExtensionResource { + @doc("The name (hash of schedule name + time) of the role eligibility schedule to get.") + @path + @key("roleEligibilityScheduleInstanceName") + @segment("roleEligibilityScheduleInstances") + name: string; +} + +@armResourceOperations +interface RoleEligibilityScheduleInstances { + @doc("Gets the specified role eligibility schedule instance.") + get is ArmResourceRead; + + @doc("Gets role eligibility schedule instances of a role eligibility schedule.") + listForScope is ArmResourceListByParent< + RoleEligibilityScheduleInstance, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use $filter=asTarget() to return all role eligibility schedules created for the current user.") + @query("$filter") + $filter?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp new file mode 100644 index 0000000000..c0a6fe274b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp @@ -0,0 +1,53 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role Eligibility schedule request") +model RoleEligibilityScheduleRequest + is ExtensionResource { + @doc("The name (guid) of the role eligibility schedule request to get.") + @path + @key("roleEligibilityScheduleRequestName") + @segment("roleEligibilityScheduleRequests") + name: string; +} + +@armResourceOperations +interface RoleEligibilityScheduleRequests { + @doc("Get the specified role eligibility schedule request.") + get is ArmResourceRead; + + @doc("Creates a role eligibility schedule request.") + create is ArmResourceCreateOrReplaceSync; + + @doc("Gets role eligibility schedule requests for a scope.") + listForScope is ArmResourceListByParent< + RoleEligibilityScheduleRequest, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role eligibility schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role eligibility schedule requests requested by the current user. Use $filter=asTarget() to return all role eligibility schedule requests created for the current user. Use $filter=asApprover() to return all role eligibility schedule requests where the current user is an approver.") + @query("$filter") + $filter?: string; + } + >; + + @doc("Cancels a pending role eligibility schedule request.") + cancel is ArmResourceActionSync; + + @doc("Validates a new role eligibility schedule request.") + validate is ArmResourceActionSync< + RoleEligibilityScheduleRequest, + RoleEligibilityScheduleRequest, + RoleEligibilityScheduleRequest + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp new file mode 100644 index 0000000000..d971793eeb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp @@ -0,0 +1,34 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role management policy") +model RoleManagementPolicy + is ExtensionResource { + @doc("The name (guid) of the role management policy to get.") + @path + @key("roleManagementPolicyName") + @segment("roleManagementPolicies") + name: string; +} + +@armResourceOperations +interface RoleManagementPolicies { + @doc("Get the specified role management policy for a resource scope") + get is ArmResourceRead; + + @doc("Update a role management policy") + update is ArmCustomPatchSync; + + @doc("Gets role management policies for a resource scope.") + listForScope is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp new file mode 100644 index 0000000000..614aa7d9ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp @@ -0,0 +1,34 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role management policy") +model RoleManagementPolicyAssignment + is ExtensionResource { + @doc("The name of format {guid_guid} the role management policy assignment to get.") + @path + @key("roleManagementPolicyAssignmentName") + @segment("roleManagementPolicyAssignments") + name: string; +} + +@armResourceOperations +interface RoleManagementPolicyAssignments { + @doc("Get the specified role management policy assignment for a resource scope") + get is ArmResourceRead; + + @doc("Create a role management policy assignment") + create is ArmResourceCreateOrReplaceSync; + + @doc("Gets role management assignment policies for a resource scope.") + listForScope is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_Get.json new file mode 100644 index 0000000000..7919be4d3f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_Get.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "denyAssignmentId": "denyAssignmentId", + "scope": "subscriptions/subId/resourcegroups/rgname" + }, + "responses": { + "200": { + "body": { + "name": "denyAssignmentId", + "type": "Microsoft.Authorization/denyAssignments", + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId", + "properties": { + "description": "Deny assignment description", + "denyAssignmentName": "Deny assignment name", + "doNotApplyToChildScopes": false, + "excludePrincipals": [ + { + "type": "principalType2", + "id": "principalId2" + } + ], + "isSystemProtected": true, + "permissions": [ + { + "actions": [ + "action" + ], + "dataActions": [], + "notActions": [], + "notDataActions": [] + } + ], + "principals": [ + { + "type": "principalType1", + "id": "principalId1" + } + ], + "scope": "/subscriptions/subId/resourcegroups/rgname" + } + } + } + }, + "operationId": "DenyAssignments_Get", + "title": "Get deny assignment by name" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_ListForResource.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_ListForResource.json new file mode 100644 index 0000000000..cb860218eb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_ListForResource.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "parentResourcePath": "parentResourcePath", + "resourceGroupName": "rgname", + "resourceName": "resourceName", + "resourceProviderNamespace": "resourceProviderNamespace", + "resourceType": "resourceType", + "subscriptionId": "subId" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "denyAssignmentId", + "type": "Microsoft.Authorization/denyAssignments", + "id": "/subscriptions/subId/resourcegroups/rgname/providers/resourceProviderNamespace/parentResourcePath/resourceType/resourceName/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId", + "properties": { + "description": "Deny assignment description", + "denyAssignmentName": "Deny assignment name", + "doNotApplyToChildScopes": false, + "excludePrincipals": [ + { + "type": "principalType2", + "id": "principalId2" + } + ], + "isSystemProtected": true, + "permissions": [ + { + "actions": [ + "action" + ], + "dataActions": [ + "action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "principals": [ + { + "type": "principalType1", + "id": "principalId1" + } + ], + "scope": "/subscriptions/subId/resourcegroups/rgname/providers/resourceProviderNamespace/parentResourcePath/resourceType/resourceName" + } + } + ] + } + } + }, + "operationId": "DenyAssignments_ListForResource", + "title": "List deny assignments for resource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_Get.json new file mode 100644 index 0000000000..aff522ebfc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_Get.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "resourceProviderNamespace": "resourceProviderNamespace" + }, + "responses": { + "200": { + "body": { + "name": "name", + "type": "type", + "displayName": "displayName", + "id": "id", + "resourceTypes": [ + { + "name": "name", + "displayName": "name", + "operations": [] + } + ], + "operations": [] + } + } + }, + "operationId": "ProviderOperationsMetadata_Get", + "title": "List provider operations metadata for resource provider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_List.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_List.json new file mode 100644 index 0000000000..096889bb4a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_List.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2022-04-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "name", + "type": "type", + "displayName": "displayName", + "id": "id", + "resourceTypes": [ + { + "name": "name", + "displayName": "name", + "operations": [] + } + ], + "operations": [] + } + ] + } + } + }, + "operationId": "ProviderOperationsMetadata_List", + "title": "List provider operations metadata for all resource providers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_Get.json new file mode 100644 index 0000000000..f1c224390f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_Get.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleAssignmentScheduleInstanceName": "ed9b8180-cef7-4c77-a63c-b8566ecfc412", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "ed9b8180-cef7-4c77-a63c-b8566ecfc412", + "type": "Microsoft.Authorization/RoleAssignmentScheduleInstances", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleInstances/ed9b8180-cef7-4c77-a63c-b8566ecfc412", + "properties": { + "assignmentType": "Assigned", + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "endDateTime": "2020-09-10T05:35:17.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "linkedRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "linkedRoleEligibilityScheduleInstanceId": "21e4b59a-0499-4fe0-a3c3-43a3055b773a", + "memberType": "Direct", + "originRoleAssignmentId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleAssignments/ed9b8180-cef7-4c77-a63c-b8566ecfc412", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleAssignmentScheduleId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-09T21:35:27.91Z", + "status": "Accepted" + } + } + } + }, + "operationId": "RoleAssignmentScheduleInstances_Get", + "title": "GetRoleAssignmentScheduleInstanceByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_ListForScope.json new file mode 100644 index 0000000000..cc3e8342ef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_ListForScope.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "$filter": "assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')", + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "ed9b8180-cef7-4c77-a63c-b8566ecfc412", + "type": "Microsoft.Authorization/RoleAssignmentScheduleInstances", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleInstances/ed9b8180-cef7-4c77-a63c-b8566ecfc412", + "properties": { + "assignmentType": "Assigned", + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "endDateTime": "2020-09-10T05:35:17.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "linkedRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "linkedRoleEligibilityScheduleInstanceId": "21e4b59a-0499-4fe0-a3c3-43a3055b773a", + "memberType": "Direct", + "originRoleAssignmentId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleAssignments/ed9b8180-cef7-4c77-a63c-b8566ecfc412", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleAssignmentScheduleId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-09T21:35:27.91Z", + "status": "Accepted" + } + } + ] + } + } + }, + "operationId": "RoleAssignmentScheduleInstances_ListForScope", + "title": "GetRoleAssignmentScheduleInstancesByScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Cancel.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Cancel.json new file mode 100644 index 0000000000..602066d456 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Cancel.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleAssignmentScheduleRequestName": "fea7a502-9a96-4806-a26f-eee560e52045", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": {} + }, + "operationId": "RoleAssignmentScheduleRequests_Cancel", + "title": "CancelRoleAssignmentScheduleRequestByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Create.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Create.json new file mode 100644 index 0000000000..1dbd0af260 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Create.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "parameters": { + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "linkedRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "requestType": "SelfActivate", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "PT8H", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:35:27.91Z" + } + } + }, + "roleAssignmentScheduleRequestName": "fea7a502-9a96-4806-a26f-eee560e52045", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "201": { + "body": { + "name": "fea7a502-9a96-4806-a26f-eee560e52045", + "type": "Microsoft.Authorization/RoleAssignmentScheduleRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "SelfActivate", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "PT8H", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:35:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleAssignmentScheduleId": "c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "targetRoleAssignmentScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + } + }, + "operationId": "RoleAssignmentScheduleRequests_Create", + "title": "PutRoleAssignmentScheduleRequest" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Get.json new file mode 100644 index 0000000000..4354473d26 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Get.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleAssignmentScheduleRequestName": "fea7a502-9a96-4806-a26f-eee560e52045", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "fea7a502-9a96-4806-a26f-eee560e52045", + "type": "Microsoft.Authorization/RoleAssignmentScheduleRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "SelfActivate", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "PT8H", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:35:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleAssignmentScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "targetRoleAssignmentScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + } + }, + "operationId": "RoleAssignmentScheduleRequests_Get", + "title": "GetRoleAssignmentScheduleRequestByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_ListForScope.json new file mode 100644 index 0000000000..fefc2967ad --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_ListForScope.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "$filter": "assignedTo('A3BB8764-CB92-4276-9D2A-CA1E895E55EA')", + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "fea7a502-9a96-4806-a26f-eee560e52045", + "type": "Microsoft.Authorization/RoleAssignmentScheduleRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "SelfActivate", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "PT8H", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:35:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleAssignmentScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "targetRoleAssignmentScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + ] + } + } + }, + "operationId": "RoleAssignmentScheduleRequests_ListForScope", + "title": "GetRoleAssignmentScheduleRequestByScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Validate.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Validate.json new file mode 100644 index 0000000000..c8aa6be61c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Validate.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "parameters": { + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "linkedRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "requestType": "SelfActivate", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "PT8H", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:35:27.91Z" + } + } + }, + "roleAssignmentScheduleRequestName": "fea7a502-9a96-4806-a26f-eee560e52045", + "scope": "subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "fea7a502-9a96-4806-a26f-eee560e52045", + "type": "Microsoft.Authorization/RoleAssignmentScheduleRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "SelfActivate", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "PT8H", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:35:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleAssignmentScheduleId": "c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "targetRoleAssignmentScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + } + }, + "operationId": "RoleAssignmentScheduleRequests_Validate", + "title": "ValidateRoleAssignmentScheduleRequestByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_Get.json new file mode 100644 index 0000000000..94dda03dfc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_Get.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleAssignmentScheduleName": "c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "type": "Microsoft.Authorization/RoleAssignmentSchedules", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "properties": { + "assignmentType": "Assigned", + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "endDateTime": "2020-09-10T05:35:17.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "linkedRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "memberType": "Direct", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleAssignmentScheduleRequestId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-09T21:35:27.91Z", + "status": "Provisioned", + "updatedOn": "2020-09-09T21:35:27.91Z" + } + } + } + }, + "operationId": "RoleAssignmentSchedules_Get", + "title": "GetRoleAssignmentScheduleByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_ListForScope.json new file mode 100644 index 0000000000..ac9677d329 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_ListForScope.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "$filter": "assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')", + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "type": "Microsoft.Authorization/RoleAssignmentSchedules", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "properties": { + "assignmentType": "Assigned", + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "endDateTime": "2020-09-10T05:35:17.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "linkedRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "memberType": "Direct", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleAssignmentScheduleRequestId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-09T21:35:27.91Z", + "status": "Provisioned", + "updatedOn": "2020-09-09T21:35:27.91Z" + } + } + ] + } + } + }, + "operationId": "RoleAssignmentSchedules_ListForScope", + "title": "GetRoleAssignmentSchedulesByScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResource.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResource.json new file mode 100644 index 0000000000..a777ec998f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResource.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "parameters": { + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d" + } + }, + "roleAssignmentName": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account" + }, + "responses": { + "200": { + "body": { + "name": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account" + } + } + }, + "201": { + "body": { + "name": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account" + } + } + } + }, + "operationId": "RoleAssignments_Create", + "title": "Create role assignment for resource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResourceGroup.json new file mode 100644 index 0000000000..3893b3471e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResourceGroup.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "parameters": { + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d" + } + }, + "roleAssignmentName": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg" + }, + "responses": { + "200": { + "body": { + "name": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg" + } + } + }, + "201": { + "body": { + "name": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg" + } + } + } + }, + "operationId": "RoleAssignments_Create", + "title": "Create role assignment for resource group" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForSubscription.json new file mode 100644 index 0000000000..302351b166 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForSubscription.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "parameters": { + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d" + } + }, + "roleAssignmentName": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + }, + "responses": { + "200": { + "body": { + "name": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + } + } + }, + "201": { + "body": { + "name": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + } + } + } + }, + "operationId": "RoleAssignments_Create", + "title": "Create role assignment for subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Delete.json new file mode 100644 index 0000000000..a881ab6396 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Delete.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "roleAssignmentName": "b0f43c54-e787-4862-89b1-a653fa9cf747", + "scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + }, + "responses": { + "200": { + "body": { + "name": "b0f43c54-e787-4862-89b1-a653fa9cf747", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + } + } + }, + "204": {} + }, + "operationId": "RoleAssignments_Delete", + "title": "Delete role assignment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Get.json new file mode 100644 index 0000000000..bcfc45917c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Get.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "roleAssignmentName": "b0f43c54-e787-4862-89b1-a653fa9cf747", + "scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + }, + "responses": { + "200": { + "body": { + "name": "b0f43c54-e787-4862-89b1-a653fa9cf747", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + } + } + } + }, + "operationId": "RoleAssignments_Get", + "title": "Get role assignment by scope and name" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_ListForScope.json new file mode 100644 index 0000000000..ccc325bfa6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_ListForScope.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "b0f43c54-e787-4862-89b1-a653fa9cf747", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + } + } + ] + } + } + }, + "operationId": "RoleAssignments_ListForScope", + "title": "List role assignments for scope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_CreateOrUpdate.json new file mode 100644 index 0000000000..818fbeb7c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_CreateOrUpdate.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "body": { + "roleDefinition": { + "name": "roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "permissions": [ + { + "actions": [ + "action" + ], + "dataActions": [ + "dataAction" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Role name" + } + }, + "roleDefinition": {}, + "roleDefinitionId": "roleDefinitionId", + "scope": "scope" + }, + "responses": { + "201": { + "body": { + "name": "roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "properties": { + "type": "roletype", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "permissions": [ + { + "actions": [ + "action" + ], + "dataActions": [ + "dataAction" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Role name" + } + } + } + }, + "operationId": "RoleDefinitions_CreateOrUpdate", + "title": "Create role definition" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Delete.json new file mode 100644 index 0000000000..5b1948c2d6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Delete.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "roleDefinitionId": "roleDefinitionId", + "scope": "scope" + }, + "responses": { + "200": { + "body": { + "name": "roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "properties": { + "type": "roletype", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "permissions": [ + { + "actions": [ + "action" + ], + "dataActions": [ + "dataAction" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Role name" + } + } + }, + "204": {} + }, + "operationId": "RoleDefinitions_Delete", + "title": "Delete role definition" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Get.json new file mode 100644 index 0000000000..adb7e0e3a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Get.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "roleDefinitionId": "roleDefinitionId", + "scope": "scope" + }, + "responses": { + "200": { + "body": { + "name": "roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "properties": { + "type": "roletype", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "permissions": [ + { + "actions": [ + "action" + ], + "dataActions": [ + "dataAction" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Role name" + } + } + } + }, + "operationId": "RoleDefinitions_Get", + "title": "Get role definition by name" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_List.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_List.json new file mode 100644 index 0000000000..cccbaa5ca3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_List.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "scope": "scope" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "properties": { + "type": "roletype", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "permissions": [ + { + "actions": [ + "action" + ], + "dataActions": [ + "dataAction" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Role name" + } + } + ] + } + } + }, + "operationId": "RoleDefinitions_List", + "title": "List role definitions for scope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_Get.json new file mode 100644 index 0000000000..e06200fdfd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_Get.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleEligibilityScheduleInstanceName": "21e4b59a-0499-4fe0-a3c3-43a3055b773a", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "21e4b59a-0499-4fe0-a3c3-43a3055b773a", + "type": "Microsoft.Authorization/RoleEligibilityScheduleInstances", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleInstances/21e4b59a-0499-4fe0-a3c3-43a3055b773a", + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-10T00:32:36.86Z", + "endDateTime": "2021-09-10T00:31:41.477Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "memberType": "Direct", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", + "roleEligibilityScheduleId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-10T00:32:36.86Z", + "status": "Provisioned" + } + } + } + }, + "operationId": "RoleEligibilityScheduleInstances_Get", + "title": "GetRoleEligibilityScheduleInstanceByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_ListForScope.json new file mode 100644 index 0000000000..518c9d7902 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_ListForScope.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "$filter": "assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')", + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "21e4b59a-0499-4fe0-a3c3-43a3055b773a", + "type": "Microsoft.Authorization/RoleEligibilityScheduleInstances", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleInstances/21e4b59a-0499-4fe0-a3c3-43a3055b773a", + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-10T00:32:36.86Z", + "endDateTime": "2021-09-10T00:31:41.477Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "memberType": "Direct", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", + "roleEligibilityScheduleId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-10T00:32:36.86Z", + "status": "Provisioned" + } + } + ] + } + } + }, + "operationId": "RoleEligibilityScheduleInstances_ListForScope", + "title": "GetRoleEligibilityScheduleInstancesByScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Cancel.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Cancel.json new file mode 100644 index 0000000000..d3c1d6f0e8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Cancel.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleEligibilityScheduleRequestName": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": {} + }, + "operationId": "RoleEligibilityScheduleRequests_Cancel", + "title": "CancelRoleEligibilityScheduleRequestByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Create.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Create.json new file mode 100644 index 0000000000..9c4e6a7ece --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Create.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "parameters": { + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "requestType": "AdminAssign", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "P365D", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:31:27.91Z" + } + } + }, + "roleEligibilityScheduleRequestName": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "201": { + "body": { + "name": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "type": "Microsoft.Authorization/RoleEligibilityScheduleRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:32:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "AdminAssign", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "P365D", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:31:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "targetRoleEligibilityScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + } + }, + "operationId": "RoleEligibilityScheduleRequests_Create", + "title": "PutRoleEligibilityScheduleRequest" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Get.json new file mode 100644 index 0000000000..c65cf576c0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Get.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleEligibilityScheduleRequestName": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "type": "Microsoft.Authorization/RoleEligibilityRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:32:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "AdminAssign", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "P365D", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:31:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "targetRoleEligibilityScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + } + }, + "operationId": "RoleEligibilityScheduleRequests_Get", + "title": "GetRoleEligibilityScheduleRequestByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_ListForScope.json new file mode 100644 index 0000000000..1416d1425e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_ListForScope.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "$filter": "assignedTo('A3BB8764-CB92-4276-9D2A-CA1E895E55EA')", + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "type": "Microsoft.Authorization/RoleEligibilityRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:32:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "AdminAssign", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "P365D", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:31:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "targetRoleEligibilityScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + ] + } + } + }, + "operationId": "RoleEligibilityScheduleRequests_ListForScope", + "title": "GetRoleEligibilityScheduleRequestByScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Validate.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Validate.json new file mode 100644 index 0000000000..b30ee03573 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Validate.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "parameters": { + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "requestType": "AdminAssign", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "P365D", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:31:27.91Z" + } + } + }, + "roleEligibilityScheduleRequestName": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "scope": "subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "type": "Microsoft.Authorization/RoleEligibilityScheduleRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:32:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "AdminAssign", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "P365D", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:31:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "targetRoleEligibilityScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + } + }, + "operationId": "RoleEligibilityScheduleRequests_Validate", + "title": "ValidateRoleEligibilityScheduleRequestByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_Get.json new file mode 100644 index 0000000000..a7f7b80d0d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_Get.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleEligibilityScheduleName": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "type": "Microsoft.Authorization/RoleEligibilitySchedules", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413", + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:33:06.3Z", + "endDateTime": "2021-09-09T21:32:28.49Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "memberType": "Direct", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", + "roleEligibilityScheduleRequestId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-09T21:33:14.557Z", + "status": "Provisioned", + "updatedOn": "2020-09-09T22:27:00.513Z" + } + } + } + }, + "operationId": "RoleEligibilitySchedules_Get", + "title": "GetRoleEligibilityScheduleByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_ListForScope.json new file mode 100644 index 0000000000..aff30cf638 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_ListForScope.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "$filter": "assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')", + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "type": "Microsoft.Authorization/RoleEligibilitySchedules", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413", + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:33:06.3Z", + "endDateTime": "2021-09-09T21:32:28.49Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "memberType": "Direct", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", + "roleEligibilityScheduleRequestId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-09T21:33:14.557Z", + "status": "Provisioned", + "updatedOn": "2020-09-09T22:27:00.513Z" + } + } + ] + } + } + }, + "operationId": "RoleEligibilitySchedules_ListForScope", + "title": "GetRoleEligibilitySchedulesByScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Get.json new file mode 100644 index 0000000000..21d801685d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Get.json @@ -0,0 +1,734 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleManagementPolicyName": "570c3619-7688-4b34-b290-2b8bb3ccab2a", + "scope": "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + }, + "responses": { + "200": { + "body": { + "name": "570c3619-7688-4b34-b290-2b8bb3ccab2a", + "type": "Microsoft.Authorization/RoleManagementPolicies", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a", + "properties": { + "description": null, + "displayName": null, + "effectiveRules": [ + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": true, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "isOrganizationDefault": false, + "lastModifiedBy": { + "type": null, + "displayName": "Admin", + "email": null, + "id": null + }, + "lastModifiedDateTime": "2021-03-17T02:54:27.167+00:00", + "policyProperties": { + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "rules": [ + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": true, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + } + } + }, + "operationId": "RoleManagementPolicies_Get", + "title": "GetRoleManagementPolicyByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_ListForScope.json new file mode 100644 index 0000000000..950fd57624 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_ListForScope.json @@ -0,0 +1,737 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "570c3619-7688-4b34-b290-2b8bb3ccab2a", + "type": "Microsoft.Authorization/RoleManagementPolicies", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a", + "properties": { + "description": null, + "displayName": null, + "effectiveRules": [ + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": true, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "isOrganizationDefault": false, + "lastModifiedBy": { + "type": null, + "displayName": "Admin", + "email": null, + "id": null + }, + "lastModifiedDateTime": "2021-03-17T02:54:27.167+00:00", + "policyProperties": { + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "rules": [ + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": true, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + } + ] + } + } + }, + "operationId": "RoleManagementPolicies_ListForScope", + "title": "GetRoleManagementPolicyByRoleDefinitionFilter" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchPartialRoleManagementPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchPartialRoleManagementPolicy.json new file mode 100644 index 0000000000..80f9eae7d5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchPartialRoleManagementPolicy.json @@ -0,0 +1,777 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "parameters": { + "properties": { + "rules": [ + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": false, + "maximumDuration": "P180D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ] + } + }, + "roleManagementPolicyName": "570c3619-7688-4b34-b290-2b8bb3ccab2a", + "scope": "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + }, + "responses": { + "200": { + "body": { + "name": "570c3619-7688-4b34-b290-2b8bb3ccab2a", + "type": "Microsoft.Authorization/RoleManagementPolicies", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a", + "properties": { + "description": null, + "displayName": null, + "effectiveRules": [ + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": false, + "maximumDuration": "P180D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "isOrganizationDefault": false, + "lastModifiedBy": { + "type": null, + "displayName": "Admin", + "email": null, + "id": null + }, + "lastModifiedDateTime": "2021-03-17T16:35:27.91+00:00", + "policyProperties": { + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "rules": [ + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": false, + "maximumDuration": "P180D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + } + } + }, + "operationId": "RoleManagementPolicies_Update", + "title": "PatchPartialRoleManagementPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchRoleManagementPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchRoleManagementPolicy.json new file mode 100644 index 0000000000..3bcffc77bd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchRoleManagementPolicy.json @@ -0,0 +1,1086 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "parameters": { + "properties": { + "rules": [ + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": false, + "maximumDuration": "P180D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ] + } + }, + "roleManagementPolicyName": "570c3619-7688-4b34-b290-2b8bb3ccab2a", + "scope": "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + }, + "responses": { + "200": { + "body": { + "name": "570c3619-7688-4b34-b290-2b8bb3ccab2a", + "type": "Microsoft.Authorization/RoleManagementPolicies", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a", + "properties": { + "description": null, + "displayName": null, + "effectiveRules": [ + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": false, + "maximumDuration": "P180D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "isOrganizationDefault": false, + "lastModifiedBy": { + "type": null, + "displayName": "Admin", + "email": null, + "id": null + }, + "lastModifiedDateTime": "2021-03-17T16:35:27.91+00:00", + "policyProperties": { + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "rules": [ + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": false, + "maximumDuration": "P180D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + } + } + }, + "operationId": "RoleManagementPolicies_Update", + "title": "PatchRoleManagementPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Create.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Create.json new file mode 100644 index 0000000000..c3db89a9d3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Create.json @@ -0,0 +1,395 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "parameters": { + "properties": { + "policyId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9", + "roleDefinitionId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "roleManagementPolicyAssignmentName": "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "scope": "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + }, + "responses": { + "201": { + "body": { + "name": "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "type": "Microsoft.Authorization/RoleManagementPolicyAssignment", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "properties": { + "effectiveRules": [ + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": true, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "policyAssignmentProperties": { + "policy": { + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9", + "lastModifiedBy": null, + "lastModifiedDateTime": null + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "FHIR Data Converter", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "policyId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9", + "roleDefinitionId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + } + } + }, + "operationId": "RoleManagementPolicyAssignments_Create", + "title": "PutRoleManagementPolicyAssignment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Get.json new file mode 100644 index 0000000000..864ffbb61a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Get.json @@ -0,0 +1,393 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleManagementPolicyAssignmentName": "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "scope": "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + }, + "responses": { + "200": { + "body": { + "name": "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "type": "Microsoft.Authorization/RoleManagementPolicyAssignment", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "properties": { + "effectiveRules": [ + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": true, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "policyAssignmentProperties": { + "policy": { + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9", + "lastModifiedBy": { + "type": null, + "displayName": "Admin", + "email": null, + "id": null + }, + "lastModifiedDateTime": null + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "FHIR Data Converter", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "policyId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9", + "roleDefinitionId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + } + } + }, + "operationId": "RoleManagementPolicyAssignments_Get", + "title": "GetConfigurations" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_ListForScope.json new file mode 100644 index 0000000000..ff8cff5f19 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_ListForScope.json @@ -0,0 +1,396 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "type": "Microsoft.Authorization/RoleManagementPolicyAssignment", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "properties": { + "effectiveRules": [ + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": true, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "policyAssignmentProperties": { + "policy": { + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9", + "lastModifiedBy": { + "type": null, + "displayName": "Admin", + "email": null, + "id": null + }, + "lastModifiedDateTime": null + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "FHIR Data Converter", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "policyId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9", + "roleDefinitionId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + } + ] + } + } + }, + "operationId": "RoleManagementPolicyAssignments_ListForScope", + "title": "GetRoleManagementPolicyAssignmentByScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp new file mode 100644 index 0000000000..02da08350a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp @@ -0,0 +1,52 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./DenyAssignment.tsp"; +import "./ProviderOperationsMetadata.tsp"; +import "./RoleAssignment.tsp"; +import "./RoleDefinition.tsp"; +import "./RoleAssignmentSchedule.tsp"; +import "./RoleAssignmentScheduleInstance.tsp"; +import "./RoleAssignmentScheduleRequest.tsp"; +import "./RoleEligibilitySchedule.tsp"; +import "./RoleEligibilityScheduleInstance.tsp"; +import "./RoleEligibilityScheduleRequest.tsp"; +import "./RoleManagementPolicy.tsp"; +import "./RoleManagementPolicyAssignment.tsp"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "AuthorizationManagementClient", +}) +@versioned(Versions) +// FIXME: Common type version v2 is not supported for now. +// @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v2) +@doc("Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure Active Directory users.") +namespace Azure.ResourceManager.Authorization; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2015-07-01 API version.") + v2015_07_01: "2015-07-01", + + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2022-04-01 API version.") + v2022_04_01: "2022-04-01", + + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2020-10-01 API version.") + v2020_10_01: "2020-10-01", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp new file mode 100644 index 0000000000..8c5e9ec9a6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp @@ -0,0 +1,1270 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; + +namespace Azure.ResourceManager.Authorization; + +interface Operations extends Azure.ResourceManager.Operations {} + +@doc("The principal type of the assigned principal ID.") +enum PrincipalType { + User, + Group, + ServicePrincipal, + ForeignGroup, + Device, +} + +@doc("The role type.") +enum RoleType { + BuiltInRole, + CustomRole, +} + +@doc("Assignment type of the role assignment schedule") +enum AssignmentType { + Activated, + Assigned, +} + +@doc("Membership type of the role assignment schedule") +enum RoleManagementScheduleMemberType { + Inherited, + Direct, + Group, +} + +@doc("The status of the role assignment schedule.") +enum RoleManagementScheduleStatus { + Accepted, + PendingEvaluation, + Granted, + Denied, + PendingProvisioning, + Provisioned, + PendingRevocation, + Revoked, + Canceled, + Failed, + PendingApprovalProvisioning, + PendingApproval, + FailedAsResourceIsLocked, + PendingAdminDecision, + AdminApproved, + AdminDenied, + TimedOut, + ProvisioningStarted, + Invalid, + PendingScheduleCreation, + ScheduleCreated, + PendingExternalProvisioning, +} + +@doc("Type of the scope.") +enum ScopeType { + subscription, + managementgroup, + resourcegroup, +} + +@doc("The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc") +enum RoleManagementScheduleRequestType { + AdminAssign, + AdminRemove, + AdminUpdate, + AdminExtend, + AdminRenew, + SelfActivate, + SelfDeactivate, + SelfExtend, + SelfRenew, +} + +@doc("Type of the role assignment schedule expiration") +enum RoleManagementScheduleExpirationType { + AfterDuration, + AfterDateTime, + NoExpiration, +} + +@doc("The type of rule") +enum RoleManagementPolicyRuleType { + RoleManagementPolicyApprovalRule, + RoleManagementPolicyAuthenticationContextRule, + RoleManagementPolicyEnablementRule, + RoleManagementPolicyExpirationRule, + RoleManagementPolicyNotificationRule, +} + +@doc("The assignment level to which rule is applied.") +enum RoleManagementAssignmentLevel { + Assignment, + Eligibility, +} + +@doc("The type of rule") +enum ApprovalMode { + SingleStage, + Serial, + Parallel, + NoApproval, +} + +@doc("The type of user.") +enum UserType { + User, + Group, +} + +@doc("The type of enablement rule") +enum EnablementRules { + MultiFactorAuthentication, + Justification, + Ticketing, +} + +@doc("The type of notification.") +enum NotificationDeliveryMechanism { + Email, +} + +@doc("The notification level.") +enum NotificationLevel { + None, + Critical, + All, +} + +@doc("The recipient type.") +enum RecipientType { + Requestor, + Approver, + Admin, +} + +@doc("ClassicAdministrator list result information.") +model ClassicAdministratorListResult is Azure.Core.Page; + +@doc("Classic Administrators") +model ClassicAdministrator { + @doc("The ID of the administrator.") + id?: string; + + @doc("The name of the administrator.") + name?: string; + + @doc("The type of the administrator.") + type?: string; + + @doc("Properties for the classic administrator.") + properties?: ClassicAdministratorProperties; +} + +@doc("Classic Administrator properties.") +model ClassicAdministratorProperties { + @doc("The email address of the administrator.") + emailAddress?: string; + + @doc("The role of the administrator.") + role?: string; +} + +@doc("Deny assignment properties.") +model DenyAssignmentProperties { + @doc("The display name of the deny assignment.") + denyAssignmentName?: string; + + @doc("The description of the deny assignment.") + description?: string; + + @doc("An array of permissions that are denied by the deny assignment.") + permissions?: DenyAssignmentPermission[]; + + @doc("The deny assignment scope.") + scope?: string; + + @doc("Determines if the deny assignment applies to child scopes. Default value is false.") + doNotApplyToChildScopes?: boolean; + + @doc("Array of principals to which the deny assignment applies.") + principals?: Principal[]; + + @doc("Array of principals to which the deny assignment does not apply.") + excludePrincipals?: Principal[]; + + @doc("Specifies whether this deny assignment was created by Azure and cannot be edited or deleted.") + isSystemProtected?: boolean; +} + +@doc("Deny assignment permissions.") +model DenyAssignmentPermission { + @doc("Actions to which the deny assignment does not grant access.") + actions?: string[]; + + @doc("Actions to exclude from that the deny assignment does not grant access.") + notActions?: string[]; + + @doc("Data actions to which the deny assignment does not grant access.") + dataActions?: string[]; + + @doc("Data actions to exclude from that the deny assignment does not grant access.") + notDataActions?: string[]; + + @doc("The conditions on the Deny assignment permission. This limits the resources it applies to.") + condition?: string; + + @doc("Version of the condition.") + conditionVersion?: string; +} + +@doc("The name of the entity last modified it") +model Principal { + @doc("The id of the principal made changes") + id?: string; + + @doc("The name of the principal made changes") + displayName?: string; + + @doc("Type of the principal.") + @projectedName("json", "type") + principalType?: PrincipalType; + + @doc("Email of principal") + email?: string; +} + +@doc("Resource Type") +model AuthorizationProviderResourceType { + @doc("The resource type name.") + name?: string; + + @doc("The resource type display name.") + displayName?: string; + + @doc("The resource type operations.") + operations?: ProviderOperation[]; +} + +@doc("Operation") +model ProviderOperation { + @doc("The operation name.") + name?: string; + + @doc("The operation display name.") + displayName?: string; + + @doc("The operation description.") + description?: string; + + @doc("The operation origin.") + origin?: string; + + @doc("The operation properties.") + properties?: Record; + + @doc("The dataAction flag to specify the operation type.") + isDataAction?: boolean; +} + +@doc("Role assignment properties.") +model RoleAssignmentProperties { + @doc("The role assignment scope.") + @visibility("read") + scope?: string; + + @doc("The role definition ID.") + roleDefinitionId: string; + + @doc("The principal ID.") + principalId: string; + + @doc("The principal type of the assigned principal ID.") + principalType?: PrincipalType; + + @doc("Description of role assignment") + description?: string; + + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + condition?: string; + + @doc("Version of the condition. Currently the only accepted value is '2.0'") + conditionVersion?: string; + + @doc("Time it was created") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("Time it was updated") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + updatedOn?: utcDateTime; + + @doc("Id of the user who created the assignment") + @visibility("read") + createdBy?: string; + + @doc("Id of the user who updated the assignment") + @visibility("read") + updatedBy?: string; + + @doc("Id of the delegated managed identity resource") + delegatedManagedIdentityResourceId?: string; +} + +@doc("Role assignment create parameters.") +model RoleAssignmentCreateParameters { + @doc("Role assignment properties.") + properties: RoleAssignmentProperties; +} + +@doc("Permissions information.") +model PermissionGetResult is Azure.Core.Page; + +@doc("Role definition permissions.") +model Permission { + @doc("Allowed actions.") + actions?: string[]; + + @doc("Denied actions.") + notActions?: string[]; + + @doc("Allowed Data actions.") + dataActions?: string[]; + + @doc("Denied Data actions.") + notDataActions?: string[]; +} + +@doc("Role definition properties.") +model RoleDefinitionProperties { + @doc("The role name.") + roleName?: string; + + @doc("The role definition description.") + description?: string; + + @doc("The role type.") + @projectedName("json", "type") + roleType?: RoleType; + + @doc("Role definition permissions.") + permissions?: Permission[]; + + @doc("Role definition assignable scopes.") + assignableScopes?: string[]; +} + +@doc("Eligible child resources list operation result.") +model EligibleChildResourcesListResult + is Azure.Core.Page; + +@doc("Eligible child resource") +model EligibleChildResource { + @doc("The resource scope Id.") + @visibility("read") + id?: string; + + @doc("The resource name.") + @visibility("read") + name?: string; + + @doc("The resource type.") + @visibility("read") + type?: string; +} + +@doc("An error response from the service.") +@error +model CloudError { + @doc("An error response from the service.") + error?: CloudErrorBody; +} + +@doc("An error response from the service.") +model CloudErrorBody { + @doc("An identifier for the error. Codes are invariant and are intended to be consumed programmatically.") + code?: string; + + @doc("A message describing the error, intended to be suitable for display in a user interface.") + message?: string; +} + +@doc("Role assignment schedule properties with scope.") +model RoleAssignmentScheduleProperties { + @doc("The role assignment schedule scope.") + scope?: string; + + @doc("The role definition ID.") + roleDefinitionId?: string; + + @doc("The principal ID.") + principalId?: string; + + @doc("The principal type of the assigned principal ID.") + principalType?: PrincipalType; + + @doc("The id of roleAssignmentScheduleRequest used to create this roleAssignmentSchedule") + roleAssignmentScheduleRequestId?: string; + + @doc("The id of roleEligibilitySchedule used to activated this roleAssignmentSchedule") + linkedRoleEligibilityScheduleId?: string; + + @doc("Assignment type of the role assignment schedule") + assignmentType?: AssignmentType; + + @doc("Membership type of the role assignment schedule") + memberType?: RoleManagementScheduleMemberType; + + @doc("The status of the role assignment schedule.") + status?: RoleManagementScheduleStatus; + + @doc("Start DateTime when role assignment schedule") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("End DateTime when role assignment schedule") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + condition?: string; + + @doc("Version of the condition. Currently accepted value is '2.0'") + conditionVersion?: string; + + @doc("DateTime when role assignment schedule was created") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("DateTime when role assignment schedule was modified") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + updatedOn?: utcDateTime; + + @doc("Additional properties of principal, scope and role definition") + expandedProperties?: ExpandedProperties; +} + +model ExpandedProperties { + @doc("Details of the resource scope") + scope?: ExpandedPropertiesScope; + + @doc("Details of role definition") + roleDefinition?: ExpandedPropertiesRoleDefinition; + + @doc("Details of the principal") + principal?: ExpandedPropertiesPrincipal; +} + +@doc("Details of the resource scope") +model ExpandedPropertiesScope { + @doc("Scope id of the resource") + @projectedName("json", "id") + scopeId?: string; + + @doc("Display name of the resource") + @projectedName("json", "displayName") + scopeDisplayName?: string; + + @doc("Type of the scope.") + @projectedName("json", "type") + scopeType?: ScopeType; +} + +@doc("Details of role definition") +model ExpandedPropertiesRoleDefinition { + @doc("Id of the role definition") + @projectedName("json", "id") + roleDefinitionId?: string; + + @doc("Display name of the role definition") + @projectedName("json", "displayName") + roleDefinitionDisplayName?: string; + + @doc("The role type.") + @projectedName("json", "type") + roleType?: RoleType; +} + +@doc("Details of the principal") +model ExpandedPropertiesPrincipal { + @doc("Id of the principal") + @projectedName("json", "id") + principalId?: string; + + @doc("Display name of the principal") + @projectedName("json", "displayName") + principalDisplayName?: string; + + @doc("Email id of the principal") + email?: string; + + @doc("Type of the principal.") + @projectedName("json", "type") + principalType?: PrincipalType; +} + +@doc("Role assignment schedule properties with scope.") +model RoleAssignmentScheduleInstanceProperties { + @doc("The role assignment schedule scope.") + scope?: string; + + @doc("The role definition ID.") + roleDefinitionId?: string; + + @doc("The principal ID.") + principalId?: string; + + @doc("The principal type of the assigned principal ID.") + principalType?: PrincipalType; + + @doc("Id of the master role assignment schedule") + roleAssignmentScheduleId?: string; + + @doc("Role Assignment Id in external system") + originRoleAssignmentId?: string; + + @doc("The status of the role assignment schedule instance.") + status?: RoleManagementScheduleStatus; + + @doc("The startDateTime of the role assignment schedule instance") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("The endDateTime of the role assignment schedule instance") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + @doc("roleEligibilityScheduleId used to activate") + linkedRoleEligibilityScheduleId?: string; + + @doc("roleEligibilityScheduleInstanceId linked to this roleAssignmentScheduleInstance") + linkedRoleEligibilityScheduleInstanceId?: string; + + @doc("Assignment type of the role assignment schedule") + assignmentType?: AssignmentType; + + @doc("Membership type of the role assignment schedule") + memberType?: RoleManagementScheduleMemberType; + + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + condition?: string; + + @doc("Version of the condition. Currently accepted value is '2.0'") + conditionVersion?: string; + + @doc("DateTime when role assignment schedule was created") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("Additional properties of principal, scope and role definition") + expandedProperties?: ExpandedProperties; +} + +@doc("Role assignment schedule request properties with scope.") +model RoleAssignmentScheduleRequestProperties { + @doc("The role assignment schedule request scope.") + @visibility("read") + scope?: string; + + @doc("The role definition ID.") + roleDefinitionId: string; + + @doc("The principal ID.") + principalId: string; + + @doc("The principal type of the assigned principal ID.") + @visibility("read") + principalType?: PrincipalType; + + @doc("The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc") + requestType: RoleManagementScheduleRequestType; + + @doc("The status of the role assignment schedule request.") + @visibility("read") + status?: RoleManagementScheduleStatus; + + @doc("The approvalId of the role assignment schedule request.") + @visibility("read") + approvalId?: string; + + @doc("The resultant role assignment schedule id or the role assignment schedule id being updated") + targetRoleAssignmentScheduleId?: string; + + @doc("The role assignment schedule instance id being updated") + targetRoleAssignmentScheduleInstanceId?: string; + + @doc("Schedule info of the role assignment schedule") + scheduleInfo?: RoleAssignmentScheduleRequestPropertiesScheduleInfo; + + @doc("The linked role eligibility schedule id - to activate an eligibility.") + linkedRoleEligibilityScheduleId?: string; + + @doc("Justification for the role assignment") + justification?: string; + + @doc("Ticket Info of the role assignment") + ticketInfo?: RoleAssignmentScheduleRequestPropertiesTicketInfo; + + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + condition?: string; + + @doc("Version of the condition. Currently accepted value is '2.0'") + conditionVersion?: string; + + @doc("DateTime when role assignment schedule request was created") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("Id of the user who created this request") + @visibility("read") + requestorId?: string; + + @doc("Additional properties of principal, scope and role definition") + @visibility("read") + expandedProperties?: ExpandedProperties; +} + +@doc("Schedule info of the role assignment schedule") +model RoleAssignmentScheduleRequestPropertiesScheduleInfo { + @doc("Start DateTime of the role assignment schedule.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("Expiration of the role assignment schedule") + expiration?: RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration; +} + +@doc("Expiration of the role assignment schedule") +model RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration { + @doc("Type of the role assignment schedule expiration") + @projectedName("json", "type") + expirationType?: RoleManagementScheduleExpirationType; + + @doc("End DateTime of the role assignment schedule.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + @doc("Duration of the role assignment schedule in TimeSpan.") + duration?: duration; +} + +@doc("Ticket Info of the role assignment") +model RoleAssignmentScheduleRequestPropertiesTicketInfo { + @doc("Ticket number for the role assignment") + ticketNumber?: string; + + @doc("Ticket system name for the role assignment") + ticketSystem?: string; +} + +@doc("Role eligibility schedule properties with scope.") +model RoleEligibilityScheduleProperties { + @doc("The role eligibility schedule scope.") + scope?: string; + + @doc("The role definition ID.") + roleDefinitionId?: string; + + @doc("The principal ID.") + principalId?: string; + + @doc("The principal type of the assigned principal ID.") + principalType?: PrincipalType; + + @doc("The id of roleEligibilityScheduleRequest used to create this roleAssignmentSchedule") + roleEligibilityScheduleRequestId?: string; + + @doc("Membership type of the role eligibility schedule") + memberType?: RoleManagementScheduleMemberType; + + @doc("The status of the role eligibility schedule.") + status?: RoleManagementScheduleStatus; + + @doc("Start DateTime when role eligibility schedule") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("End DateTime when role eligibility schedule") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + condition?: string; + + @doc("Version of the condition. Currently accepted value is '2.0'") + conditionVersion?: string; + + @doc("DateTime when role eligibility schedule was created") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("DateTime when role eligibility schedule was modified") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + updatedOn?: utcDateTime; + + @doc("Additional properties of principal, scope and role definition") + expandedProperties?: ExpandedProperties; +} + +@doc("Role eligibility schedule properties with scope.") +model RoleEligibilityScheduleInstanceProperties { + @doc("The role eligibility schedule scope.") + scope?: string; + + @doc("The role definition ID.") + roleDefinitionId?: string; + + @doc("The principal ID.") + principalId?: string; + + @doc("The principal type of the assigned principal ID.") + principalType?: PrincipalType; + + @doc("Id of the master role eligibility schedule") + roleEligibilityScheduleId?: string; + + @doc("The status of the role eligibility schedule instance") + status?: RoleManagementScheduleStatus; + + @doc("The startDateTime of the role eligibility schedule instance") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("The endDateTime of the role eligibility schedule instance") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + @doc("Membership type of the role eligibility schedule") + memberType?: RoleManagementScheduleMemberType; + + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + condition?: string; + + @doc("Version of the condition. Currently accepted value is '2.0'") + conditionVersion?: string; + + @doc("DateTime when role eligibility schedule was created") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("Additional properties of principal, scope and role definition") + expandedProperties?: ExpandedProperties; +} + +@doc("Role eligibility schedule request properties with scope.") +model RoleEligibilityScheduleRequestProperties { + @doc("The role eligibility schedule request scope.") + @visibility("read") + scope?: string; + + @doc("The role definition ID.") + roleDefinitionId: string; + + @doc("The principal ID.") + principalId: string; + + @doc("The principal type of the assigned principal ID.") + @visibility("read") + principalType?: PrincipalType; + + @doc("The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc") + requestType: RoleManagementScheduleRequestType; + + @doc("The status of the role eligibility schedule request.") + @visibility("read") + status?: RoleManagementScheduleStatus; + + @doc("The approvalId of the role eligibility schedule request.") + @visibility("read") + approvalId?: string; + + @doc("Schedule info of the role eligibility schedule") + scheduleInfo?: RoleEligibilityScheduleRequestPropertiesScheduleInfo; + + @doc("The resultant role eligibility schedule id or the role eligibility schedule id being updated") + targetRoleEligibilityScheduleId?: string; + + @doc("The role eligibility schedule instance id being updated") + targetRoleEligibilityScheduleInstanceId?: string; + + @doc("Justification for the role eligibility") + justification?: string; + + @doc("Ticket Info of the role eligibility") + ticketInfo?: RoleEligibilityScheduleRequestPropertiesTicketInfo; + + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + condition?: string; + + @doc("Version of the condition. Currently accepted value is '2.0'") + conditionVersion?: string; + + @doc("DateTime when role eligibility schedule request was created") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("Id of the user who created this request") + @visibility("read") + requestorId?: string; + + @doc("Additional properties of principal, scope and role definition") + @visibility("read") + expandedProperties?: ExpandedProperties; +} + +@doc("Schedule info of the role eligibility schedule") +model RoleEligibilityScheduleRequestPropertiesScheduleInfo { + @doc("Start DateTime of the role eligibility schedule.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("Expiration of the role eligibility schedule") + expiration?: RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration; +} + +@doc("Expiration of the role eligibility schedule") +model RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration { + @doc("Type of the role eligibility schedule expiration") + @projectedName("json", "type") + expirationType?: RoleManagementScheduleExpirationType; + + @doc("End DateTime of the role eligibility schedule.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + @doc("Duration of the role eligibility schedule in TimeSpan.") + duration?: duration; +} + +@doc("Ticket Info of the role eligibility") +model RoleEligibilityScheduleRequestPropertiesTicketInfo { + @doc("Ticket number for the role eligibility") + ticketNumber?: string; + + @doc("Ticket system name for the role eligibility") + ticketSystem?: string; +} + +@doc("Role management policy properties with scope.") +model RoleManagementPolicyProperties { + @doc("The role management policy scope.") + scope?: string; + + @doc("The role management policy display name.") + displayName?: string; + + @doc("The role management policy description.") + description?: string; + + @doc("The role management policy is default policy.") + isOrganizationDefault?: boolean; + + @doc("The name of the entity last modified it") + @visibility("read") + lastModifiedBy?: Principal; + + @doc("The last modified date time.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedDateTime?: utcDateTime; + + @doc("The rule applied to the policy.") + rules?: RoleManagementPolicyRule[]; + + @doc("The readonly computed rule applied to the policy.") + @visibility("read") + effectiveRules?: RoleManagementPolicyRule[]; + + @doc("Additional properties of scope") + @visibility("read") + policyProperties?: PolicyProperties; +} + +@doc("The role management policy rule.") +@discriminator("ruleType") +model RoleManagementPolicyRule { + @doc("The id of the rule.") + id?: string; + + @doc("The target of the current rule.") + target?: RoleManagementPolicyRuleTarget; +} + +@doc("The role management policy rule target.") +model RoleManagementPolicyRuleTarget { + @doc("The caller of the setting.") + caller?: string; + + @doc("The type of operation.") + operations?: string[]; + + @doc("The assignment level to which rule is applied.") + level?: RoleManagementAssignmentLevel; + + @doc("The list of target objects.") + targetObjects?: string[]; + + @doc("The list of inheritable settings.") + inheritableSettings?: string[]; + + @doc("The list of enforced settings.") + enforcedSettings?: string[]; +} + +@doc("Expanded info of resource scope") +model PolicyProperties { + @doc("Details of the resource scope") + @visibility("read") + scope?: PolicyPropertiesScope; +} + +@doc("Details of the resource scope") +model PolicyPropertiesScope { + @doc("Scope id of the resource") + @projectedName("json", "id") + scopeId?: string; + + @doc("Display name of the resource") + @projectedName("json", "displayName") + scopeDisplayName?: string; + + @doc("Type of the scope.") + @projectedName("json", "type") + scopeType?: ScopeType; +} + +@doc("Role management policy assignment properties with scope.") +model RoleManagementPolicyAssignmentProperties { + @doc("The role management policy scope.") + scope?: string; + + @doc("The role definition of management policy assignment.") + roleDefinitionId?: string; + + @doc("The policy id role management policy assignment.") + policyId?: string; + + @doc("The readonly computed rule applied to the policy.") + @visibility("read") + effectiveRules?: RoleManagementPolicyRule[]; + + @doc("Additional properties of scope, role definition and policy") + @visibility("read") + policyAssignmentProperties?: PolicyAssignmentProperties; +} + +@doc("Expanded info of resource scope, role definition and policy") +model PolicyAssignmentProperties { + @doc("Details of the resource scope") + scope?: PolicyAssignmentPropertiesScope; + + @doc("Details of role definition") + roleDefinition?: PolicyAssignmentPropertiesRoleDefinition; + + @doc("Details of the policy") + policy?: PolicyAssignmentPropertiesPolicy; +} + +@doc("Details of the resource scope") +model PolicyAssignmentPropertiesScope { + @doc("Scope id of the resource") + @projectedName("json", "id") + scopeId?: string; + + @doc("Display name of the resource") + @projectedName("json", "displayName") + scopeDisplayName?: string; + + @doc("Type of the scope.") + @projectedName("json", "type") + scopeType?: ScopeType; +} + +@doc("Details of role definition") +model PolicyAssignmentPropertiesRoleDefinition { + @doc("Id of the role definition") + @projectedName("json", "id") + roleDefinitionId?: string; + + @doc("Display name of the role definition") + @projectedName("json", "displayName") + roleDefinitionDisplayName?: string; + + @doc("The role type.") + @projectedName("json", "type") + roleType?: RoleType; +} + +@doc("Details of the policy") +model PolicyAssignmentPropertiesPolicy { + @doc("Id of the policy") + @projectedName("json", "id") + policyId?: string; + + @doc("The name of the entity last modified it") + @visibility("read") + lastModifiedBy?: Principal; + + @doc("The last modified date time.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedDateTime?: utcDateTime; +} + +@doc("Deny Assignments filter") +model DenyAssignmentFilter { + @doc("Return deny assignment with specified name.") + denyAssignmentName?: string; + + @doc("Return all deny assignments where the specified principal is listed in the principals list of deny assignments.") + principalId?: string; + + @doc("Return all deny assignments where the specified principal is listed either in the principals list or exclude principals list of deny assignments.") + gdprExportPrincipalId?: string; +} + +@doc("Failed validation result details") +model ValidationResponseErrorInfo { + @doc("Error code indicating why validation failed") + @visibility("read") + code?: string; + + @doc("Message indicating why validation failed") + @visibility("read") + message?: string; +} + +@doc("Validation response") +model ValidationResponse { + @doc("Whether or not validation succeeded") + @visibility("read") + isValid?: boolean; + + @doc("Failed validation result details") + errorInfo?: ValidationResponseErrorInfo; +} + +@doc("Role Assignments filter") +model RoleAssignmentFilter { + @doc("Returns role assignment of the specific principal.") + principalId?: string; +} + +@doc("Role Definitions filter") +model RoleDefinitionFilter { + @doc("Returns role definition with the specific name.") + roleName?: string; + + @doc("Returns role definition with the specific type.") + type?: string; +} + +@doc("The role management policy approval rule.") +model RoleManagementPolicyApprovalRule extends RoleManagementPolicyRule { + @doc("The approval setting") + setting?: ApprovalSettings; + + @doc("The type of rule") + ruleType: "RoleManagementPolicyApprovalRule"; +} + +@doc("The approval settings.") +model ApprovalSettings { + @doc("Determines whether approval is required or not.") + isApprovalRequired?: boolean; + + @doc("Determines whether approval is required for assignment extension.") + isApprovalRequiredForExtension?: boolean; + + @doc("Determine whether requestor justification is required.") + isRequestorJustificationRequired?: boolean; + + @doc("The type of rule") + approvalMode?: ApprovalMode; + + @doc("The approval stages of the request.") + approvalStages?: ApprovalStage[]; +} + +@doc("The approval stage.") +model ApprovalStage { + @doc("The time in days when approval request would be timed out") + approvalStageTimeOutInDays?: int32; + + @doc("Determines whether approver need to provide justification for his decision.") + isApproverJustificationRequired?: boolean; + + @doc("The time in minutes when the approval request would be escalated if the primary approver does not approve") + escalationTimeInMinutes?: int32; + + @doc("The primary approver of the request.") + primaryApprovers?: UserSet[]; + + @doc("The value determine whether escalation feature is enabled.") + isEscalationEnabled?: boolean; + + @doc("The escalation approver of the request.") + escalationApprovers?: UserSet[]; +} + +@doc("The detail of a user.") +model UserSet { + @doc("The type of user.") + userType?: UserType; + + @doc("The value indicating whether the user is a backup fallback approver") + isBackup?: boolean; + + @doc("The object id of the user.") + id?: string; + + @doc("The description of the user.") + description?: string; +} + +@doc("The role management policy authentication context rule.") +model RoleManagementPolicyAuthenticationContextRule + extends RoleManagementPolicyRule { + @doc("The value indicating if rule is enabled.") + isEnabled?: boolean; + + @doc("The claim value.") + claimValue?: string; + + @doc("The type of rule") + ruleType: "RoleManagementPolicyAuthenticationContextRule"; +} + +@doc("The role management policy enablement rule.") +model RoleManagementPolicyEnablementRule extends RoleManagementPolicyRule { + @doc("The list of enabled rules.") + enabledRules?: EnablementRules[]; + + @doc("The type of rule") + ruleType: "RoleManagementPolicyEnablementRule"; +} + +@doc("The role management policy expiration rule.") +model RoleManagementPolicyExpirationRule extends RoleManagementPolicyRule { + @doc("The value indicating whether expiration is required.") + isExpirationRequired?: boolean; + + @doc("The maximum duration of expiration in timespan.") + maximumDuration?: duration; + + @doc("The type of rule") + ruleType: "RoleManagementPolicyExpirationRule"; +} + +@doc("The role management policy notification rule.") +model RoleManagementPolicyNotificationRule extends RoleManagementPolicyRule { + @doc("The type of notification.") + notificationType?: NotificationDeliveryMechanism; + + @doc("The notification level.") + notificationLevel?: NotificationLevel; + + @doc("The recipient type.") + recipientType?: RecipientType; + + @doc("The list of notification recipients.") + notificationRecipients?: string[]; + + @doc("Determines if the notification will be sent to the recipient type specified in the policy rule.") + isDefaultRecipientsEnabled?: boolean; + + @doc("The type of rule") + ruleType: "RoleManagementPolicyNotificationRule"; +} + +@doc("Role assignment schedule filter") +model RoleAssignmentScheduleFilter { + @doc("Returns role assignment schedule of the specific principal.") + principalId?: string; + + @doc("Returns role assignment schedule of the specific role definition.") + roleDefinitionId?: string; + + @doc("Returns role assignment schedule instances of the specific status.") + status?: string; +} + +@doc("Role assignment schedule instance filter") +model RoleAssignmentScheduleInstanceFilter { + @doc("Returns role assignment schedule instances of the specific principal.") + principalId?: string; + + @doc("Returns role assignment schedule instances of the specific role definition.") + roleDefinitionId?: string; + + @doc("Returns role assignment schedule instances of the specific status.") + status?: string; + + @doc("Returns role assignment schedule instances belonging to a specific role assignment schedule.") + roleAssignmentScheduleId?: string; +} + +@doc("Role assignment schedule request filter") +model RoleAssignmentScheduleRequestFilter { + @doc("Returns role assignment requests of the specific principal.") + principalId?: string; + + @doc("Returns role assignment requests of the specific role definition.") + roleDefinitionId?: string; + + @doc("Returns role assignment requests created by specific principal.") + requestorId?: string; + + @doc("Returns role assignment requests of specific status.") + status?: string; +} + +@doc("Role eligibility schedule filter") +model RoleEligibilityScheduleFilter { + @doc("Returns role eligibility schedule of the specific principal.") + principalId?: string; + + @doc("Returns role eligibility schedule of the specific role definition.") + roleDefinitionId?: string; + + @doc("Returns role eligibility schedule of the specific status.") + status?: string; +} + +@doc("Role eligibility schedule instance filter") +model RoleEligibilityScheduleInstanceFilter { + @doc("Returns role eligibility schedule instances of the specific principal.") + principalId?: string; + + @doc("Returns role eligibility schedule instances of the specific role definition.") + roleDefinitionId?: string; + + @doc("Returns role eligibility schedule instances of the specific status.") + status?: string; + + @doc("Returns role eligibility schedule instances belonging to a specific role eligibility schedule.") + roleEligibilityScheduleId?: string; +} + +@doc("Role eligibility schedule request filter") +model RoleEligibilityScheduleRequestFilter { + @doc("Returns role eligibility requests of the specific principal.") + principalId?: string; + + @doc("Returns role eligibility requests of the specific role definition.") + roleDefinitionId?: string; + + @doc("Returns role eligibility requests created by specific principal.") + requestorId?: string; + + @doc("Returns role eligibility requests of specific status.") + status?: string; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp new file mode 100644 index 0000000000..c62bc2b413 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp @@ -0,0 +1,108 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Authorization; + +interface ClassicAdministratorsOperations { + @doc("Gets service administrator, account administrator, and co-administrators for the subscription.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/classicAdministrators") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + }, + ClassicAdministratorListResult + >; +} + +interface GlobalAdministratorOperations { + @doc("Elevates access for a Global Administrator.") + @route("/providers/Microsoft.Authorization/elevateAccess") + @post + ElevateAccess is Azure.Core.Foundations.Operation<{}, void>; +} + +interface AzurePermissionsForResourceGroupOperations { + @doc("Gets all permissions the caller has for a resource group.") + @route("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/permissions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + }, + PermissionGetResult + >; +} + +interface AzurePermissionsForResourceOperations { + @doc("Gets all permissions the caller has for a resource.") + @route("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/permissions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("The namespace of the resource provider.") + @path + resourceProviderNamespace: string; + + @doc("The parent resource identity.") + @path + parentResourcePath: string; + + @doc("The resource type of the resource.") + @path + resourceType: string; + + @doc("The name of the resource to get the permissions for.") + @path + resourceName: string; + + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + }, + PermissionGetResult + >; +} + +interface EligibleChildResourcesOperations { + @doc("Get the child resources of a resource on which user has eligible access") + @route("/{scope}/providers/Microsoft.Authorization/eligibleChildResources") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The scope of the role management policy.") + @path + scope: string; + + @doc("The filter to apply on the operation. Use $filter=resourceType+eq+'Subscription' to filter on only resource of type = 'Subscription'. Use $filter=resourceType+eq+'subscription'+or+resourceType+eq+'resourcegroup' to filter on resource of type = 'Subscription' or 'ResourceGroup'") + @query("$filter") + $filter?: string; + }, + EligibleChildResourcesListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..691f3c1b0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp index be045c6865..62b77c46e7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Space.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.IntegrationSpaces; @doc("An integration application under space.") @@ -25,12 +27,16 @@ model Application is TrackedResource { interface Applications { @doc("Get a Application") get is ArmResourceRead; + @doc("Create a Application") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update a Application") - patch is ArmResourcePatchSync; + patch is ArmCustomPatchSync; + @doc("Delete a Application") delete is ArmResourceDeleteSync; + @doc("List Application resources by Space") listBySpace is ArmResourceListByParent< Application, @@ -75,30 +81,35 @@ interface Applications { orderby?: string[]; } >; + @doc("The delete business process development artifact action.") deleteBusinessProcessDevelopmentArtifact is ArmResourceActionSync< Application, GetOrDeleteBusinessProcessDevelopmentArtifactRequest, void >; + @doc("The get business process development artifact action.") getBusinessProcessDevelopmentArtifact is ArmResourceActionSync< Application, GetOrDeleteBusinessProcessDevelopmentArtifactRequest, SaveOrGetBusinessProcessDevelopmentArtifactResponse >; + @doc("The list business process development artifacts action.") listBusinessProcessDevelopmentArtifacts is ArmResourceActionSync< Application, void, ListBusinessProcessDevelopmentArtifactsResponse >; + @doc("The save business process development artifact action.") saveBusinessProcessDevelopmentArtifact is ArmResourceActionSync< Application, SaveOrValidateBusinessProcessDevelopmentArtifactRequest, SaveOrGetBusinessProcessDevelopmentArtifactResponse >; + @doc("The validate business process development artifact action.") validateBusinessProcessDevelopmentArtifact is ArmResourceActionSync< Application, diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp index ffa0eae773..aa6e302b82 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Application.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.IntegrationSpaces; @doc("A business process under application.") @@ -25,12 +27,16 @@ model BusinessProcess is ProxyResource { interface BusinessProcesses { @doc("Get a BusinessProcess") get is ArmResourceRead; + @doc("Create a BusinessProcess") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update a BusinessProcess") - patch is ArmResourcePatchSync; + patch is ArmCustomPatchSync; + @doc("Delete a BusinessProcess") delete is ArmResourceDeleteSync; + @doc("List BusinessProcess resources by Application") listByApplication is ArmResourceListByParent< BusinessProcess, diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp index d741ea02d4..3320b7f04a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./BusinessProcess.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.IntegrationSpaces; @doc("A business process version.") @@ -24,6 +26,7 @@ model BusinessProcessVersion is ProxyResource { interface BusinessProcessVersions { @doc("Get a BusinessProcessVersion") get is ArmResourceRead; + @doc("List BusinessProcessVersion resources by BusinessProcess") listByBusinessProcess is ArmResourceListByParent< BusinessProcessVersion, diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp index 13a2545d77..aff8a3d809 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Space.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.IntegrationSpaces; @doc("An infrastructure resource under Space.") @@ -26,15 +28,19 @@ model InfrastructureResource interface InfrastructureResources { @doc("Get a InfrastructureResource") get is ArmResourceRead; + @doc("Create a InfrastructureResource") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update a InfrastructureResource") - patch is ArmResourcePatchSync< + patch is ArmCustomPatchSync< InfrastructureResource, - InfrastructureResourceProperties + InfrastructureResourceUpdate >; + @doc("Delete a InfrastructureResource") delete is ArmResourceDeleteSync; + @doc("List InfrastructureResource resources by Space") listBySpace is ArmResourceListByParent< InfrastructureResource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp index 910f878013..a18dead222 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.IntegrationSpaces; @doc("An integration space.") @@ -23,12 +25,16 @@ model Space is TrackedResource { interface Spaces { @doc("Get a Space") get is ArmResourceRead; + @doc("Create a Space") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update a Space") - patch is ArmResourcePatchSync; + patch is ArmCustomPatchSync; + @doc("Delete a Space") delete is ArmResourceDeleteSync; + @doc("List Space resources by resource group") listByResourceGroup is ArmResourceListByParent< Space, @@ -73,6 +79,7 @@ interface Spaces { orderby?: string[]; } >; + @doc("List Space resources by subscription ID") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_CreateOrUpdate.json new file mode 100644 index 0000000000..eaac39c532 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_CreateOrUpdate.json @@ -0,0 +1,94 @@ +{ + "operationId": "Applications_CreateOrUpdate", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "resource": { + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the application.", + "trackingDataStores": { + "dataStoreName1": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + }, + "dataStoreName2": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + } + } + }, + "tags": { + "key1": "Value1" + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "CreateOrUpdateApplication", + "responses": { + "200": { + "body": { + "name": "Application1", + "type": "Microsoft.IntegrationSpaces/spaces/applications", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the application.", + "provisioningState": "Succeeded", + "trackingDataStores": { + "dataStoreName1": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + }, + "dataStoreName2": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + } + } + }, + "tags": { + "key1": "Value1" + } + } + }, + "201": { + "body": { + "name": "Application1", + "type": "Microsoft.IntegrationSpaces/spaces/applications", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the application.", + "provisioningState": "Succeeded", + "trackingDataStores": { + "dataStoreName1": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + }, + "dataStoreName2": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + } + } + }, + "tags": { + "key1": "Value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Delete.json new file mode 100644 index 0000000000..ac1086f2ae --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Delete.json @@ -0,0 +1,15 @@ +{ + "operationId": "Applications_Delete", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeleteApplication", + "responses": { + "200": {}, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_DeleteBusinessProcessDevelopmentArtifact.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_DeleteBusinessProcessDevelopmentArtifact.json new file mode 100644 index 0000000000..4b2e38e9de --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_DeleteBusinessProcessDevelopmentArtifact.json @@ -0,0 +1,17 @@ +{ + "operationId": "Applications_DeleteBusinessProcessDevelopmentArtifact", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "body": { + "name": "BusinessProcess1" + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeleteBusinessProcessDevelopmentArtifact", + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Get.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Get.json new file mode 100644 index 0000000000..7dd237fb65 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Get.json @@ -0,0 +1,36 @@ +{ + "operationId": "Applications_Get", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "GetApplication", + "responses": { + "200": { + "body": { + "name": "Application1", + "type": "Microsoft.IntegrationSpaces/spaces/applications", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the application.", + "provisioningState": "Succeeded", + "trackingDataStores": { + "dataStoreName1": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + } + } + }, + "tags": { + "key1": "Value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_GetBusinessProcessDevelopmentArtifact.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_GetBusinessProcessDevelopmentArtifact.json new file mode 100644 index 0000000000..78ca3875cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_GetBusinessProcessDevelopmentArtifact.json @@ -0,0 +1,175 @@ +{ + "operationId": "Applications_GetBusinessProcessDevelopmentArtifact", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "body": { + "name": "BusinessProcess1" + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "GetBusinessProcessDevelopmentArtifact", + "responses": { + "200": { + "body": { + "name": "BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "trackingProfiles": { + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2023-01-01/trackingdefinitionschema.json#", + "businessProcess": { + "name": "businessProcess1", + "version": "d52c9c91-6e10-4a90-9c1f-08ee5d01c656" + }, + "trackingDefinitions": { + "Fulfillment": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Completed": { + "operationName": "CompletedPO", + "operationType": "Action", + "properties": {} + }, + "Denied": { + "operationName": "DeniedPO", + "operationType": "Action", + "properties": {} + }, + "Shipped": { + "operationName": "ShippedPO", + "operationType": "Action", + "properties": { + "ShipPriority": "@action().inputs.shipPriority", + "TrackingID": "@action().inputs.trackingID" + } + } + } + }, + "PurchaseOrder": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Processing": { + "operationName": "ApprovedPO", + "operationType": "Action", + "properties": { + "ApprovalStatus": "@action().inputs.ApprovalStatus", + "ApproverName": "@action().inputs.ApproverName", + "POAmount": "@action().inputs.POamount" + } + }, + "Received": { + "operationName": "manual", + "operationType": "Trigger", + "properties": { + "City": "@trigger().outputs.body.Address.City", + "Product": "@trigger().outputs.body.Product", + "Quantity": "@trigger().outputs.body.Quantity", + "State": "@trigger().outputs.body.Address.State" + } + } + } + } + } + } + } + }, + "systemData": { + "lastModifiedAt": "2023-09-06T22:53:01.8497279Z" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBusinessProcessDevelopmentArtifacts.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBusinessProcessDevelopmentArtifacts.json new file mode 100644 index 0000000000..7a1704bbcb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBusinessProcessDevelopmentArtifacts.json @@ -0,0 +1,176 @@ +{ + "operationId": "Applications_ListBusinessProcessDevelopmentArtifacts", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ListBusinessProcessDevelopmentArtifacts", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "trackingProfiles": { + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2023-01-01/trackingdefinitionschema.json#", + "businessProcess": { + "name": "businessProcess1", + "version": "d52c9c91-6e10-4a90-9c1f-08ee5d01c656" + }, + "trackingDefinitions": { + "Fulfillment": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Completed": { + "operationName": "CompletedPO", + "operationType": "Action", + "properties": {} + }, + "Denied": { + "operationName": "DeniedPO", + "operationType": "Action", + "properties": {} + }, + "Shipped": { + "operationName": "ShippedPO", + "operationType": "Action", + "properties": { + "ShipPriority": "@action().inputs.shipPriority", + "TrackingID": "@action().inputs.trackingID" + } + } + } + }, + "PurchaseOrder": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Processing": { + "operationName": "ApprovedPO", + "operationType": "Action", + "properties": { + "ApprovalStatus": "@action().inputs.ApprovalStatus", + "ApproverName": "@action().inputs.ApproverName", + "POAmount": "@action().inputs.POamount" + } + }, + "Received": { + "operationName": "manual", + "operationType": "Trigger", + "properties": { + "City": "@trigger().outputs.body.Address.City", + "Product": "@trigger().outputs.body.Product", + "Quantity": "@trigger().outputs.body.Quantity", + "State": "@trigger().outputs.body.Address.State" + } + } + } + } + } + } + } + }, + "systemData": { + "lastModifiedAt": "2023-09-06T22:53:01.8497279Z" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBySpace.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBySpace.json new file mode 100644 index 0000000000..e8bb2c2726 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBySpace.json @@ -0,0 +1,39 @@ +{ + "operationId": "Applications_ListBySpace", + "parameters": { + "api-version": "2023-11-14-preview", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ListApplicationsBySpace", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Application1", + "type": "Microsoft.IntegrationSpaces/spaces/applications", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the application.", + "provisioningState": "Succeeded", + "trackingDataStores": { + "dataStoreName1": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + } + } + }, + "tags": { + "key1": "Value1" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Patch.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Patch.json new file mode 100644 index 0000000000..ef552ed1c4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Patch.json @@ -0,0 +1,44 @@ +{ + "operationId": "Applications_Patch", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "properties": { + "properties": { + "description": "This is the user provided PATCHED description of the application." + }, + "tags": { + "key1": "Value1" + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "PatchApplication", + "responses": { + "200": { + "body": { + "name": "Application1", + "type": "Microsoft.IntegrationSpaces/spaces/applications", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided PATCHED description of the application.", + "provisioningState": "Succeeded", + "trackingDataStores": { + "dataStoreName1": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + } + } + }, + "tags": { + "key1": "Value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_SaveBusinessProcessDevelopmentArtifact.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_SaveBusinessProcessDevelopmentArtifact.json new file mode 100644 index 0000000000..68888f79d3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_SaveBusinessProcessDevelopmentArtifact.json @@ -0,0 +1,326 @@ +{ + "operationId": "Applications_SaveBusinessProcessDevelopmentArtifact", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "body": { + "name": "BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "trackingProfiles": { + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2023-01-01/trackingdefinitionschema.json#", + "businessProcess": { + "name": "businessProcess1", + "version": "d52c9c91-6e10-4a90-9c1f-08ee5d01c656" + }, + "trackingDefinitions": { + "Fulfillment": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Completed": { + "operationName": "CompletedPO", + "operationType": "Action", + "properties": {} + }, + "Denied": { + "operationName": "DeniedPO", + "operationType": "Action", + "properties": {} + }, + "Shipped": { + "operationName": "ShippedPO", + "operationType": "Action", + "properties": { + "ShipPriority": "@action().inputs.shipPriority", + "TrackingID": "@action().inputs.trackingID" + } + } + } + }, + "PurchaseOrder": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Processing": { + "operationName": "ApprovedPO", + "operationType": "Action", + "properties": { + "ApprovalStatus": "@action().inputs.ApprovalStatus", + "ApproverName": "@action().inputs.ApproverName", + "POAmount": "@action().inputs.POamount" + } + }, + "Received": { + "operationName": "manual", + "operationType": "Trigger", + "properties": { + "City": "@trigger().outputs.body.Address.City", + "Product": "@trigger().outputs.body.Product", + "Quantity": "@trigger().outputs.body.Quantity", + "State": "@trigger().outputs.body.Address.State" + } + } + } + } + } + } + } + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "SaveBusinessProcessDevelopmentArtifact", + "responses": { + "200": { + "body": { + "name": "BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "trackingProfiles": { + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2023-01-01/trackingdefinitionschema.json#", + "businessProcess": { + "name": "businessProcess1", + "version": "d52c9c91-6e10-4a90-9c1f-08ee5d01c656" + }, + "trackingDefinitions": { + "Fulfillment": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Completed": { + "operationName": "CompletedPO", + "operationType": "Action", + "properties": {} + }, + "Denied": { + "operationName": "DeniedPO", + "operationType": "Action", + "properties": {} + }, + "Shipped": { + "operationName": "ShippedPO", + "operationType": "Action", + "properties": { + "ShipPriority": "@action().inputs.shipPriority", + "TrackingID": "@action().inputs.trackingID" + } + } + } + }, + "PurchaseOrder": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Processing": { + "operationName": "ApprovedPO", + "operationType": "Action", + "properties": { + "ApprovalStatus": "@action().inputs.ApprovalStatus", + "ApproverName": "@action().inputs.ApproverName", + "POAmount": "@action().inputs.POamount" + } + }, + "Received": { + "operationName": "manual", + "operationType": "Trigger", + "properties": { + "City": "@trigger().outputs.body.Address.City", + "Product": "@trigger().outputs.body.Product", + "Quantity": "@trigger().outputs.body.Quantity", + "State": "@trigger().outputs.body.Address.State" + } + } + } + } + } + } + } + }, + "systemData": { + "lastModifiedAt": "2023-09-06T22:53:01.8497279Z" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ValidateBusinessProcessDevelopmentArtifact.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ValidateBusinessProcessDevelopmentArtifact.json new file mode 100644 index 0000000000..a792e1bdc7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ValidateBusinessProcessDevelopmentArtifact.json @@ -0,0 +1,176 @@ +{ + "operationId": "Applications_ValidateBusinessProcessDevelopmentArtifact", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "body": { + "name": "BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received@": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "trackingProfiles": { + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2023-01-01/trackingdefinitionschema.json#", + "businessProcess": { + "name": "businessProcess1", + "version": "d52c9c91-6e10-4a90-9c1f-08ee5d01c656" + }, + "trackingDefinitions": { + "Fulfillment": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Completed": { + "operationName": "CompletedPO", + "operationType": "Action", + "properties": {} + }, + "Denied": { + "operationName": "DeniedPO", + "operationType": "Action", + "properties": {} + }, + "Shipped": { + "operationName": "ShippedPO", + "operationType": "Action", + "properties": { + "ShipPriority": "@action().inputs.shipPriority", + "TrackingID": "@action().inputs.trackingID" + } + } + } + }, + "PurchaseOrder": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Processing": { + "operationName": "ApprovedPO", + "operationType": "Action", + "properties": { + "ApprovalStatus": "@action().inputs.ApprovalStatus", + "ApproverName": "@action().inputs.ApproverName", + "POAmount": "@action().inputs.POamount" + } + }, + "Received": { + "operationName": "manual", + "operationType": "Trigger", + "properties": { + "City": "@trigger().outputs.body.Address.City", + "Product": "@trigger().outputs.body.Product", + "Quantity": "@trigger().outputs.body.Quantity", + "State": "@trigger().outputs.body.Address.State" + } + } + } + } + } + } + } + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ValidateBusinessProcessDevelopmentArtifact", + "responses": { + "200": {}, + "default": { + "body": { + "error": { + "code": "InvalidCreateBusinessProcessResourceRequest", + "message": "The body for the request to create a business process isn't valid. The business process stage named 'Received@' contains these invalid characters: (@). The name can use only letters, digits and these characters : (\"-\", \"_\", \".\")" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_Get.json new file mode 100644 index 0000000000..32bcac7f27 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_Get.json @@ -0,0 +1,109 @@ +{ + "operationId": "BusinessProcessVersions_Get", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "businessProcessName": "BusinessProcess1", + "businessProcessVersion": "08585074782265427079", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "GetBusinessProcessVersion", + "responses": { + "200": { + "body": { + "name": "08585074782265427079", + "type": "Microsoft.IntegrationSpaces/spaces/applications/businessProcesses/versions", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1/businessProcesses/BusinessProcess1/versions/08585074782265427079", + "properties": { + "description": "Sample Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "provisioningState": "Succeeded", + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1", + "version": "08585074782265427079" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_ListByBusinessProcess.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_ListByBusinessProcess.json new file mode 100644 index 0000000000..1c952a2d43 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_ListByBusinessProcess.json @@ -0,0 +1,112 @@ +{ + "operationId": "BusinessProcessVersions_ListByBusinessProcess", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "businessProcessName": "BusinessProcess1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ListBusinessProcessVersionsByBusinessProcess", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "08585074782265427079", + "type": "Microsoft.IntegrationSpaces/spaces/applications/BusinessProcesses/versions", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1/businessProcesses/BusinessProcess1/versions/08585074782265427079", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "provisioningState": "Succeeded", + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1", + "version": "08585074782265427079" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_CreateOrUpdate.json new file mode 100644 index 0000000000..f0ae9e2237 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_CreateOrUpdate.json @@ -0,0 +1,289 @@ +{ + "operationId": "BusinessProcesses_CreateOrUpdate", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "businessProcessName": "BusinessProcess1", + "resource": { + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1" + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "CreateOrUpdateBusinessProcess", + "responses": { + "200": { + "body": { + "name": "BusinessProcess1", + "type": "Microsoft.IntegrationSpaces/spaces/applications/businessProcesses", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1/BusinessProcesses/BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "provisioningState": "Succeeded", + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1", + "version": "08585074782265427079" + } + } + }, + "201": { + "body": { + "name": "BusinessProcess1", + "type": "Microsoft.IntegrationSpaces/spaces/applications/businessProcesses", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1/BusinessProcesses/BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "provisioningState": "Succeeded", + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1", + "version": "08585074782265427079" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Delete.json new file mode 100644 index 0000000000..c50f88d147 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Delete.json @@ -0,0 +1,16 @@ +{ + "operationId": "BusinessProcesses_Delete", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "businessProcessName": "BusinessProcess1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeleteBusinessProcess", + "responses": { + "200": {}, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Get.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Get.json new file mode 100644 index 0000000000..4248244f5e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Get.json @@ -0,0 +1,108 @@ +{ + "operationId": "BusinessProcesses_Get", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "businessProcessName": "BusinessProcess1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "GetBusinessProcess", + "responses": { + "200": { + "body": { + "name": "BusinessProcess1", + "type": "Microsoft.IntegrationSpaces/spaces/applications/businessProcesses", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1/businessProcesses/BusinessProcess1", + "properties": { + "description": "Sample Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "provisioningState": "Succeeded", + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1", + "version": "08585074782265427079" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_ListByApplication.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_ListByApplication.json new file mode 100644 index 0000000000..ac94165247 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_ListByApplication.json @@ -0,0 +1,111 @@ +{ + "operationId": "BusinessProcesses_ListByApplication", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ListBusinessProcessesByApplication", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "BusinessProcess1", + "type": "Microsoft.IntegrationSpaces/spaces/applications/BusinessProcesses", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1/businessProcesses/BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "provisioningState": "Succeeded", + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1", + "version": "08585074782265427079" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Patch.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Patch.json new file mode 100644 index 0000000000..93782ba625 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Patch.json @@ -0,0 +1,113 @@ +{ + "operationId": "BusinessProcesses_Patch", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "businessProcessName": "BusinessProcess1", + "properties": { + "properties": { + "description": "First updated business process." + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "PatchBusinessProcess", + "responses": { + "200": { + "body": { + "name": "BusinessProcess1", + "type": "Microsoft.IntegrationSpaces/spaces/applications/businessProcesses", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1/businessProcesses/BusinessProcess1", + "properties": { + "description": "First updated business process.", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "provisioningState": "Succeeded", + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1", + "version": "08585074782265427080" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_CreateOrUpdate.json new file mode 100644 index 0000000000..044f0bacf9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_CreateOrUpdate.json @@ -0,0 +1,43 @@ +{ + "operationId": "InfrastructureResources_CreateOrUpdate", + "parameters": { + "api-version": "2023-11-14-preview", + "infrastructureResourceName": "InfrastructureResource1", + "resource": { + "properties": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1", + "resourceType": "Microsoft.ApiManagement/service" + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "CreateOrUpdateInfrastructureResource", + "responses": { + "200": { + "body": { + "name": "InfrastructureResource1", + "type": "Microsoft.IntegrationSpaces/spaces/infrastructureresources", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/infrastructureResources/InfrastructureResource1", + "properties": { + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1", + "resourceType": "Microsoft.ApiManagement/service" + } + } + }, + "201": { + "body": { + "name": "InfrastructureResource1", + "type": "Microsoft.IntegrationSpaces/spaces/infrastructureresources", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/infrastructureResources/InfrastructureResource1", + "properties": { + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1", + "resourceType": "Microsoft.ApiManagement/service" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Delete.json new file mode 100644 index 0000000000..213cea675a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Delete.json @@ -0,0 +1,15 @@ +{ + "operationId": "InfrastructureResources_Delete", + "parameters": { + "api-version": "2023-11-14-preview", + "infrastructureResourceName": "InfrastructureResource1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeleteInfrastructureResource", + "responses": { + "200": {}, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Get.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Get.json new file mode 100644 index 0000000000..3f7c76e696 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Get.json @@ -0,0 +1,25 @@ +{ + "operationId": "InfrastructureResources_Get", + "parameters": { + "api-version": "2023-11-14-preview", + "infrastructureResourceName": "InfrastructureResource1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "GetInfrastructureResource", + "responses": { + "200": { + "body": { + "name": "InfrastructureResource1", + "type": "Microsoft.IntegrationSpaces/spaces/infrastructureresources", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/infrastructureResources/InfrastructureResource1", + "properties": { + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1", + "resourceType": "Microsoft.ApiManagement/service" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_ListBySpace.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_ListBySpace.json new file mode 100644 index 0000000000..74a8b5ccd3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_ListBySpace.json @@ -0,0 +1,28 @@ +{ + "operationId": "InfrastructureResources_ListBySpace", + "parameters": { + "api-version": "2023-11-14-preview", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ListInfrastructureResourcesBySpace", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "InfrastructureResource1", + "type": "Microsoft.IntegrationSpaces/spaces/infrastructureresources", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/infrastructureResources/InfrastructureResource1", + "properties": { + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1", + "resourceType": "Microsoft.ApiManagement/service" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Patch.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Patch.json new file mode 100644 index 0000000000..0fa6a498d9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Patch.json @@ -0,0 +1,31 @@ +{ + "operationId": "InfrastructureResources_Patch", + "parameters": { + "api-version": "2023-11-14-preview", + "infrastructureResourceName": "InfrastructureResource1", + "properties": { + "properties": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1", + "resourceType": "Microsoft.ApiManagement/service" + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "PatchInfrastructureResource", + "responses": { + "200": { + "body": { + "name": "InfrastructureResource1", + "type": "Microsoft.IntegrationSpaces/spaces/infrastructureresources", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/infrastructureResources/InfrastructureResource1", + "properties": { + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1", + "resourceType": "Microsoft.ApiManagement/service" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_CreateOrUpdate.json new file mode 100644 index 0000000000..4576952d5e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_CreateOrUpdate.json @@ -0,0 +1,51 @@ +{ + "operationId": "Spaces_CreateOrUpdate", + "parameters": { + "api-version": "2023-11-14-preview", + "resource": { + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the space resource." + }, + "tags": { + "key1": "Value1" + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "CreateOrUpdateSpace", + "responses": { + "200": { + "body": { + "name": "Space1", + "type": "Microsoft.IntegrationSpaces/spaces", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the space resource.", + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "Value1" + } + } + }, + "201": { + "body": { + "name": "Space1", + "type": "Microsoft.IntegrationSpaces/spaces", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the space resource.", + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "Value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Delete.json new file mode 100644 index 0000000000..5c0bb6b099 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Delete.json @@ -0,0 +1,14 @@ +{ + "operationId": "Spaces_Delete", + "parameters": { + "api-version": "2023-11-14-preview", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeleteSpace", + "responses": { + "200": {}, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Get.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Get.json new file mode 100644 index 0000000000..517e6cb4b0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Get.json @@ -0,0 +1,27 @@ +{ + "operationId": "Spaces_Get", + "parameters": { + "api-version": "2023-11-14-preview", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "GetSpace", + "responses": { + "200": { + "body": { + "name": "Space1", + "type": "Microsoft.IntegrationSpaces/spaces", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the space resource.", + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "Value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListByResourceGroup.json new file mode 100644 index 0000000000..bf7501878e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListByResourceGroup.json @@ -0,0 +1,30 @@ +{ + "operationId": "Spaces_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-14-preview", + "resourceGroupName": "testrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ListSpacesByResourceGroup", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Space1", + "type": "Microsoft.IntegrationSpaces/spaces", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the space resource.", + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "Value1" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListBySubscription.json new file mode 100644 index 0000000000..20cef33f5e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListBySubscription.json @@ -0,0 +1,30 @@ +{ + "operationId": "Spaces_ListBySubscription", + "parameters": { + "api-version": "2023-11-14-preview", + "resourceGroupName": "testrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ListSpacesBySubscription", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Space1", + "type": "Microsoft.IntegrationSpaces/spaces", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the space resource.", + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "Value1" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Patch.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Patch.json new file mode 100644 index 0000000000..f1fda413d7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Patch.json @@ -0,0 +1,35 @@ +{ + "operationId": "Spaces_Patch", + "parameters": { + "api-version": "2023-11-14-preview", + "properties": { + "properties": { + "description": "This is the user provided description of the space resource." + }, + "tags": { + "key1": "Value1" + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "PatchSpace", + "responses": { + "200": { + "body": { + "name": "Space1", + "type": "Microsoft.IntegrationSpaces/spaces", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the space resource.", + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "Value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp index 84136e5399..427fd6b8b4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp @@ -29,5 +29,6 @@ namespace Microsoft.IntegrationSpaces; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-11-14-preview API version.") v2023_11_14_preview: "2023-11-14-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp index 98612ec7e7..51b5b1d320 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp @@ -6,21 +6,25 @@ import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.IntegrationSpaces; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") enum Origin { user, system, `user,system`, } +@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") enum ActionType { Internal, } +@doc("The status of the current operation.") enum ProvisioningState { @doc("Resource has been created.") Succeeded, @doc("Resource creation failed.") Failed, @@ -31,6 +35,7 @@ enum ProvisioningState { Accepted, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -48,6 +53,40 @@ model SpaceResourceProperties { description?: string; } +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; +} + +@doc("The type used for update operations of the Space.") +model SpaceUpdate { + @doc("Resource tags.") + tags?: Record; + + @doc("The updatable properties of the Space.") + properties?: SpaceUpdateProperties; +} + +@doc("The updatable properties of the Space.") +model SpaceUpdateProperties { + @doc("The description of the resource.") + description?: string; +} + @doc("The properties of application.") model ApplicationProperties { @doc("The status of the last operation.") @@ -76,6 +115,24 @@ model TrackingDataStore { dataStoreIngestionUri: string; } +@doc("The type used for update operations of the Application.") +model ApplicationUpdate { + @doc("Resource tags.") + tags?: Record; + + @doc("The updatable properties of the Application.") + properties?: ApplicationUpdateProperties; +} + +@doc("The updatable properties of the Application.") +model ApplicationUpdateProperties { + @doc("The description of the resource.") + description?: string; + + @doc("The tracking data stores.") + trackingDataStores?: Record; +} + @doc("The properties of business process.") model BusinessProcessProperties { @doc("The status of the last operation.") @@ -141,6 +198,33 @@ model BusinessProcessMappingItem { operationType?: string; } +@doc("The type used for update operations of the BusinessProcess.") +model BusinessProcessUpdate { + @doc("The updatable properties of the BusinessProcess.") + properties?: BusinessProcessUpdateProperties; +} + +@doc("The updatable properties of the BusinessProcess.") +model BusinessProcessUpdateProperties { + @doc("The description of the business process.") + description?: string; + + @doc("The table name of the business process.") + tableName?: string; + + @doc("The tracking data store reference name.") + trackingDataStoreReferenceName?: string; + + @doc("The business process identifier.") + identifier?: BusinessProcessIdentifier; + + @doc("The business process stages.") + businessProcessStages?: Record; + + @doc("The business process mapping.") + businessProcessMapping?: Record; +} + @doc("The business process development artifact get or delete request.") model GetOrDeleteBusinessProcessDevelopmentArtifactRequest { @doc("The name of the business process development artifact.") @@ -312,3 +396,18 @@ model InfrastructureResourceProperties { @doc("The id of the infrastructure resource.") resourceId: string; } + +@doc("The type used for update operations of the InfrastructureResource.") +model InfrastructureResourceUpdate { + @doc("The updatable properties of the InfrastructureResource.") + properties?: InfrastructureResourceUpdateProperties; +} + +@doc("The updatable properties of the InfrastructureResource.") +model InfrastructureResourceUpdateProperties { + @doc("The type of the infrastructure resource.") + resourceType?: string; + + @doc("The id of the infrastructure resource.") + resourceId?: string; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp index ffd2fe0b2f..76059d8f12 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp @@ -1,9 +1,11 @@ import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.ResourceManager; namespace Microsoft.IntegrationSpaces; diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp index 23cf9a0b73..eced2fa6e6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to an availability set at creation time. An existing VM cannot be added to an availability set.") @@ -24,17 +26,24 @@ model AvailabilitySet is TrackedResource { interface AvailabilitySets { @doc("Retrieves information about an availability set.") get is ArmResourceRead; + @doc("Create or update an availability set.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update an availability set.") - update is ArmResourcePatchSync; + update is ArmCustomPatchSync; + @doc("Delete an availability set.") delete is ArmResourceDeleteSync; + @doc("Lists all availability sets in a resource group.") list is ArmResourceListByParent; + @doc("Lists all availability sets in a subscription.") listBySubscription is ArmListBySubscription; + @doc("Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set.") + // FIXME: AvailabilitySets_ListAvailableSizes could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes") @get ListAvailableSizes is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp index 126bfc31db..0dc2a99d53 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./CapacityReservationGroup.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the capacity reservation.") @@ -38,15 +40,16 @@ interface CapacityReservations { $expand?: CapacityReservationInstanceViewTypes; } >; + @doc("The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("The operation to update a capacity reservation.") - update is ArmResourcePatchAsync< - CapacityReservation, - CapacityReservationProperties - >; + update is ArmCustomPatchAsync; + @doc("The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details.") delete is ArmResourceDeleteAsync; + @doc("Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations.") listByCapacityReservationGroup is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp index ddda7fc14f..2aa3d4d6eb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently, a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group.") @@ -35,15 +37,19 @@ interface CapacityReservationGroups { $expand?: CapacityReservationGroupInstanceViewTypes; } >; + @doc("The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags may be modified. Please refer to https://aka.ms/CapacityReservation for more details.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("The operation to update a capacity reservation group. When updating a capacity reservation group, only tags may be modified.") - update is ArmResourcePatchSync< + update is ArmCustomPatchSync< CapacityReservationGroup, - CapacityReservationGroupProperties + CapacityReservationGroupUpdate >; + @doc("The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details.") delete is ArmResourceDeleteSync; + @doc("Lists all of the capacity reservation groups in the specified resource group. Use the nextLink property in the response to get the next page of capacity reservation groups.") listByResourceGroup is ArmResourceListByParent< CapacityReservationGroup, @@ -55,6 +61,7 @@ interface CapacityReservationGroups { $expand?: ExpandTypesForGetCapacityReservationGroups; } >; + @doc("Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups.") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp index 1fe05c589a..758b15991e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes the cloud service.") @@ -25,29 +27,42 @@ model CloudService is TrackedResource { interface CloudServices { @doc("Display information about a cloud service.") get is ArmResourceRead; + @doc("Create or update a cloud service. Please note some properties can be set only during cloud service creation.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a cloud service.") - update is ArmTagsPatchAsync; + update is ArmCustomPatchAsync; + @doc("Deletes a cloud service.") delete is ArmResourceDeleteAsync; + @doc("Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services.") list is ArmResourceListByParent; + @doc("Gets a list of all cloud services in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services.") listAll is ArmListBySubscription; + @doc("Starts the cloud service.") start is ArmResourceActionAsync; + @doc("Power off the cloud service. Note that resources are still attached and you are getting charged for the resources.") powerOff is ArmResourceActionAsync; + @doc("Restarts one or more role instances in a cloud service.") restart is ArmResourceActionAsync; + @doc("Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles.") reimage is ArmResourceActionAsync; + @doc("Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instances.") rebuild is ArmResourceActionAsync; + @doc("Deletes role instances in a cloud service.") deleteInstances is ArmResourceActionAsync; + @doc("Gets the status of a cloud service.") + // FIXME: CloudServices_GetInstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/instanceView") @get GetInstanceView is Azure.Core.Foundations.Operation< @@ -66,11 +81,11 @@ interface CloudServices { }, CloudServiceInstanceView >; -} -@armResourceOperations -interface CloudServicesUpdateDomain { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("CloudServicesUpdateDomain_GetUpdateDomain") @doc("Gets the specified update domain of a cloud service. Use nextLink property in the response to get the next page of update domains. Do this till nextLink is null to fetch all the update domains.") + // FIXME: CloudServicesUpdateDomain_GetUpdateDomain could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}") @get GetUpdateDomain is Azure.Core.Foundations.Operation< @@ -94,7 +109,10 @@ interface CloudServicesUpdateDomain { UpdateDomain >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("CloudServicesUpdateDomain_ListUpdateDomains") @doc("Gets a list of all update domains in a cloud service.") + // FIXME: CloudServicesUpdateDomain_ListUpdateDomains could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains") @get ListUpdateDomains is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp index 5cca58c63e..cdb153ef85 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./CloudService.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a role of the cloud service.") @@ -26,6 +28,7 @@ model CloudServiceRole is ProxyResource { interface CloudServiceRoles { @doc("Gets a role from a cloud service.") get is ArmResourceRead; + @doc("Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next page of roles. Do this till nextLink is null to fetch all the roles.") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp index 2a73c137c4..8c950465b2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; // FIXME: CommunityGallery has no properties property diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp index 8aa7d32804..614abe2c11 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./CommunityGallery.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery image definition that you want to create or update.") @@ -24,6 +26,7 @@ model CommunityGalleryImage is ProxyResource { interface CommunityGalleryImages { @doc("Get a community gallery image.") get is ArmResourceRead; + @doc("List community gallery images inside a gallery.") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp index 03b622c39d..60c8c5aac5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./CommunityGalleryImage.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery image version that you want to create or update.") @@ -25,6 +27,7 @@ model CommunityGalleryImageVersion interface CommunityGalleryImageVersions { @doc("Get a community gallery image version.") get is ArmResourceRead; + @doc("List community gallery image versions inside an image.") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp index 2f9c0653fe..ad183f83b7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DedicatedHostGroup.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the Dedicated host.") @@ -35,16 +37,23 @@ interface DedicatedHosts { $expand?: InstanceViewTypes; } >; + @doc("Create or update a dedicated host .") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a dedicated host .") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("Delete a dedicated host.") delete is ArmResourceDeleteAsync; + @doc("Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts.") listByHostGroup is ArmResourceListByParent; + @doc("Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details.") restart is ArmResourceActionAsync; + @doc("Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host.") + // FIXME: DedicatedHosts_ListAvailableSizes could not be converted to a resource operation ListAvailableSizes is Azure.Core.ResourceList; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp index 30ad93a783..b9d38f6c61 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group.") @@ -34,17 +36,19 @@ interface DedicatedHostGroups { $expand?: InstanceViewTypes; } >; + @doc("Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596)") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update an dedicated host group.") - update is ArmResourcePatchSync< - DedicatedHostGroup, - DedicatedHostGroupProperties - >; + update is ArmCustomPatchSync; + @doc("Delete a dedicated host group.") delete is ArmResourceDeleteSync; + @doc("Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in the response to get the next page of dedicated host groups.") listByResourceGroup is ArmResourceListByParent; + @doc("Lists all of the dedicated host groups in the subscription. Use the nextLink property in the response to get the next page of dedicated host groups.") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp index 682ec78dda..d3291b2345 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Disk resource.") @@ -35,18 +37,37 @@ model Disk is TrackedResource { interface Disks { @doc("Gets information about a disk.") get is ArmResourceRead; + @doc("Creates or updates a disk.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Updates (patches) a disk.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("Deletes a disk.") delete is ArmResourceDeleteAsync; + @doc("Lists all the disks under a resource group.") listByResourceGroup is ArmResourceListByParent; + @doc("Lists all the disks under a subscription.") list is ArmListBySubscription; + @doc("Grants access to a disk.") - grantAccess is ArmResourceActionAsync; + grantAccess is ArmResourceActionAsync< + Disk, + GrantAccessData, + AccessUri, + BaseParameters, + ArmLroLocationHeader + >; + @doc("Revokes access to a disk.") - revokeAccess is ArmResourceActionAsync; + revokeAccess is ArmResourceActionAsync< + Disk, + void, + void, + BaseParameters, + ArmLroLocationHeader + >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp index 1fa6ffbe4f..215784ca71 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("disk access resource.") @@ -25,17 +27,24 @@ model DiskAccess is TrackedResource { interface DiskAccesses { @doc("Gets information about a disk access resource.") get is ArmResourceRead; + @doc("Creates or updates a disk access resource") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Updates (patches) a disk access resource.") - update is ArmTagsPatchAsync; + update is ArmCustomPatchAsync; + @doc("Deletes a disk access resource.") delete is ArmResourceDeleteAsync; + @doc("Lists all the disk access resources under a resource group.") listByResourceGroup is ArmResourceListByParent; + @doc("Lists all the disk access resources under a subscription.") list is ArmListBySubscription; + @doc("Gets the private link resources possible under disk access resource") + // FIXME: DiskAccesses_GetPrivateLinkResources could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources") @get GetPrivateLinkResources is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp index e736d83adf..791c3f1679 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("disk encryption set resource.") @@ -24,16 +26,23 @@ model DiskEncryptionSet is TrackedResource { interface DiskEncryptionSets { @doc("Gets information about a disk encryption set.") get is ArmResourceRead; + @doc("Creates or updates a disk encryption set") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Updates (patches) a disk encryption set.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("Deletes a disk encryption set.") delete is ArmResourceDeleteAsync; + @doc("Lists all the disk encryption sets under a resource group.") listByResourceGroup is ArmResourceListByParent; + @doc("Lists all the disk encryption sets under a subscription.") list is ArmListBySubscription; + @doc("Lists all resources that are encrypted with this disk encryption set.") + // FIXME: DiskEncryptionSets_ListAssociatedResources could not be converted to a resource operation ListAssociatedResources is Azure.Core.ResourceList; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp index a5c7eb6252..d9a51575a1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./RestorePoint.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Properties of disk restore point") @@ -21,8 +23,10 @@ model DiskRestorePoint is ProxyResource { } @armResourceOperations -interface DiskRestorePoint { +interface DiskRestorePoints { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get disk restorePoint resource") + @operationId("DiskRestorePoint_Get") get is ArmResourceRead< DiskRestorePoint, { @@ -33,7 +37,10 @@ interface DiskRestorePoint { restorePointCollectionName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists diskRestorePoints under a vmRestorePoint.") + @operationId("DiskRestorePoint_ListByRestorePoint") listByRestorePoint is ArmResourceListByParent< DiskRestorePoint, { @@ -44,7 +51,10 @@ interface DiskRestorePoint { restorePointCollectionName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Grants access to a diskRestorePoint.") + @operationId("DiskRestorePoint_GrantAccess") grantAccess is ArmResourceActionAsync< DiskRestorePoint, GrantAccessData, @@ -55,9 +65,13 @@ interface DiskRestorePoint { @doc("The name of the restore point collection that the disk restore point belongs.") @path restorePointCollectionName: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Revokes access to a diskRestorePoint.") + @operationId("DiskRestorePoint_RevokeAccess") revokeAccess is ArmResourceActionAsync< DiskRestorePoint, void, @@ -68,6 +82,7 @@ interface DiskRestorePoint { @doc("The name of the restore point collection that the disk restore point belongs.") @path restorePointCollectionName: string; - } + }, + ArmLroLocationHeader >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp index 736486b104..f40441ce59 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the Shared Image Gallery that you want to create or update.") @@ -35,20 +37,24 @@ interface Galleries { $expand?: GalleryExpandParams; } >; + @doc("Create or update a Shared Image Gallery.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a Shared Image Gallery.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("Delete a Shared Image Gallery.") delete is ArmResourceDeleteAsync; + @doc("List galleries under a resource group.") listByResourceGroup is ArmResourceListByParent; + @doc("List galleries under a subscription.") list is ArmListBySubscription; -} -@armResourceOperations -interface GallerySharingProfile { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update sharing profile of a gallery.") + @operationId("GallerySharingProfile_Update") update is ArmResourceActionAsync; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp index db390620d8..65a4a314f8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Gallery.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery Application Definition that you want to create or update.") @@ -24,15 +26,16 @@ model GalleryApplication is TrackedResource { interface GalleryApplications { @doc("Retrieves information about a gallery Application Definition.") get is ArmResourceRead; + @doc("Create or update a gallery Application Definition.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a gallery Application Definition.") - update is ArmResourcePatchAsync< - GalleryApplication, - GalleryApplicationProperties - >; + update is ArmCustomPatchAsync; + @doc("Delete a gallery Application.") delete is ArmResourceDeleteAsync; + @doc("List gallery Application Definitions in a gallery.") listByGallery is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp index 839d86ca6e..9431ac192e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./GalleryApplication.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery Application Version that you want to create or update.") @@ -34,15 +36,19 @@ interface GalleryApplicationVersions { $expand?: ReplicationStatusTypes; } >; + @doc("Create or update a gallery Application Version.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a gallery Application Version.") - update is ArmResourcePatchAsync< + update is ArmCustomPatchAsync< GalleryApplicationVersion, - GalleryApplicationVersionProperties + GalleryApplicationVersionUpdate >; + @doc("Delete a gallery Application Version.") delete is ArmResourceDeleteAsync; + @doc("List gallery Application Versions in a gallery Application Definition.") listByGalleryApplication is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp index 280fca9170..d55dc31144 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Gallery.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery image definition that you want to create or update.") @@ -24,12 +26,16 @@ model GalleryImage is TrackedResource { interface GalleryImages { @doc("Retrieves information about a gallery image definition.") get is ArmResourceRead; + @doc("Create or update a gallery image definition.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a gallery image definition.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("Delete a gallery image.") delete is ArmResourceDeleteAsync; + @doc("List gallery image definitions in a gallery.") listByGallery is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp index 071e2b238a..585dc127bb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./GalleryImage.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery image version that you want to create or update.") @@ -33,15 +35,16 @@ interface GalleryImageVersions { $expand?: ReplicationStatusTypes; } >; + @doc("Create or update a gallery image version.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a gallery image version.") - update is ArmResourcePatchAsync< - GalleryImageVersion, - GalleryImageVersionProperties - >; + update is ArmCustomPatchAsync; + @doc("Delete a gallery image version.") delete is ArmResourceDeleteAsync; + @doc("List gallery image versions in a gallery image definition.") listByGalleryImage is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp index 68bf122274..750a9b9fd7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.") @@ -34,14 +36,19 @@ interface Images { $expand?: string; } >; + @doc("Create or update an image.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update an image.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("Deletes an Image.") delete is ArmResourceDeleteAsync; + @doc("Gets the list of images under a resource group. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.") listByResourceGroup is ArmResourceListByParent; + @doc("Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.") list is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp index c941f39dbb..d70ee270d9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a cloud service OS family.") @@ -20,9 +22,14 @@ model OSFamily is ProxyResource { } @armResourceOperations -interface CloudServiceOperatingSystems { +interface OSFamilies { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service.") + @operationId("CloudServiceOperatingSystems_GetOSFamily") getOSFamily is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets a list of all guest operating system families available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS Families. Do this till nextLink is null to fetch all the OS Families.") + @operationId("CloudServiceOperatingSystems_ListOSFamilies") listOSFamilies is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp index 5351eac17b..f4d2ae8858 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a cloud service OS version.") @@ -20,9 +22,14 @@ model OSVersion is ProxyResource { } @armResourceOperations -interface CloudServiceOperatingSystems { +interface OSVersions { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service.") + @operationId("CloudServiceOperatingSystems_GetOSVersion") getOSVersion is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets a list of all guest operating system versions available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS versions. Do this till nextLink is null to fetch all the OS versions.") + @operationId("CloudServiceOperatingSystems_ListOSVersions") listOSVersions is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp index 20aeb5e00d..d89816e38b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DiskAccess.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("The Private Endpoint Connection resource.") @@ -22,13 +24,24 @@ model PrivateEndpointConnection } @armResourceOperations -interface DiskAccesses { +interface PrivateEndpointConnections { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets information about a private endpoint connection under a disk access resource.") + @operationId("DiskAccesses_GetAPrivateEndpointConnection") getAPrivateEndpointConnection is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Approve or reject a private endpoint connection under disk access resource, this can't be used to create a new private endpoint connection.") + @operationId("DiskAccesses_UpdateAPrivateEndpointConnection") updateAPrivateEndpointConnection is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes a private endpoint connection under a disk access resource.") + @operationId("DiskAccesses_DeleteAPrivateEndpointConnection") deleteAPrivateEndpointConnection is ArmResourceDeleteAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List information about private endpoint connections under a disk access resource") + @operationId("DiskAccesses_ListPrivateEndpointConnections") listPrivateEndpointConnections is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp index a5ef15b6de..fb626581b0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the proximity placement group.") @@ -35,18 +37,22 @@ interface ProximityPlacementGroups { includeColocationStatus?: string; } >; + @doc("Create or update a proximity placement group.") createOrUpdate is ArmResourceCreateOrReplaceSync; - // FIXME: (ArmResourcePatch): ArmResourcePatchSync/ArmResourcePatchAsync should have a body parameter with either properties property or tag property + @doc("Update a proximity placement group.") update is ArmCustomPatchSync< ProximityPlacementGroup, ProximityPlacementGroupUpdate >; + @doc("Delete a proximity placement group.") delete is ArmResourceDeleteSync; + @doc("Lists all proximity placement groups in a resource group.") listByResourceGroup is ArmResourceListByParent; + @doc("Lists all proximity placement groups in a subscription.") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp index 99a5d6a086..5afd3be400 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./RestorePointCollection.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Restore Point details.") @@ -37,6 +39,7 @@ interface RestorePoints { $expand?: RestorePointExpandOptions; } >; + @doc("The operation to create the restore point. Updating properties of an existing restore point is not allowed") create is ArmResourceCreateOrUpdateAsync< RestorePoint, @@ -48,6 +51,7 @@ interface RestorePoints { restorePointCollectionName: string; } >; + @doc("The operation to delete the restore point.") delete is ArmResourceDeleteAsync< RestorePoint, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp index 40be5b7baf..f6566ea20f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Create or update Restore Point collection parameters.") @@ -36,6 +38,7 @@ interface RestorePointCollections { $expand?: RestorePointCollectionExpandOptions; } >; + @doc("The operation to create or update the restore point collection. Please refer to https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags may be modified.") createOrUpdate is ArmResourceCreateOrReplaceSync< RestorePointCollection, @@ -47,10 +50,11 @@ interface RestorePointCollections { restorePointCollectionName: string; } >; + @doc("The operation to update the restore point collection.") - update is ArmResourcePatchSync< + update is ArmCustomPatchSync< RestorePointCollection, - RestorePointCollectionProperties, + RestorePointCollectionUpdate, { ...BaseParameters; @@ -59,6 +63,7 @@ interface RestorePointCollections { restorePointCollectionName: string; } >; + @doc("The operation to delete the restore point collection. This operation will also delete all the contained restore points.") delete is ArmResourceDeleteAsync< RestorePointCollection, @@ -70,8 +75,10 @@ interface RestorePointCollections { restorePointCollectionName: string; } >; + @doc("Gets the list of restore point collections in a resource group.") list is ArmResourceListByParent; + @doc("Gets the list of restore point collections in the subscription. Use nextLink property in the response to get the next page of restore point collections. Do this till nextLink is not null to fetch all the restore point collections.") listAll is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp index 910bfe6dbe..fcc6d72cbc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./CloudService.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes the cloud service role instance.") @@ -23,8 +25,10 @@ model RoleInstance is ProxyResource { } @armResourceOperations -interface CloudServiceRoleInstances { +interface RoleInstances { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets a role instance from a cloud service.") + @operationId("CloudServiceRoleInstances_Get") get is ArmResourceRead< RoleInstance, { @@ -35,9 +39,15 @@ interface CloudServiceRoleInstances { $expand?: InstanceViewTypes; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes a role instance from a cloud service.") + @operationId("CloudServiceRoleInstances_Delete") delete is ArmResourceDeleteAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances.") + @operationId("CloudServiceRoleInstances_List") list is ArmResourceListByParent< RoleInstance, { @@ -48,13 +58,26 @@ interface CloudServiceRoleInstances { $expand?: InstanceViewTypes; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.") + @operationId("CloudServiceRoleInstances_Restart") restart is ArmResourceActionAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.") + @operationId("CloudServiceRoleInstances_Reimage") reimage is ArmResourceActionAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance.") + @operationId("CloudServiceRoleInstances_Rebuild") rebuild is ArmResourceActionAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("CloudServiceRoleInstances_GetInstanceView") @doc("Retrieves information about the run-time state of a role instance in a cloud service.") + // FIXME: CloudServiceRoleInstances_GetInstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView") @get GetInstanceView is Azure.Core.Foundations.Operation< @@ -78,7 +101,10 @@ interface CloudServiceRoleInstances { RoleInstanceInstanceView >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("CloudServiceRoleInstances_GetRemoteDesktopFile") @doc("Gets a remote desktop file for a role instance in a cloud service.") + // FIXME: CloudServiceRoleInstances_GetRemoteDesktopFile could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile") @get GetRemoteDesktopFile is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp index 4c99f1f248..c16c53e721 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./VirtualMachineScaleSet.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("The status of the latest virtual machine scale set rolling upgrade.") @@ -15,14 +17,16 @@ namespace Microsoft.Compute; @parentResource(VirtualMachineScaleSet) model RollingUpgradeStatusInfo is TrackedResource { - @key("latest") + @key("rollingUpgrade") @segment("rollingUpgrades") name: string; } @armResourceOperations -interface VirtualMachineScaleSetRollingUpgrades { +interface RollingUpgradeStatusInfos { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the status of the latest virtual machine scale set rolling upgrade.") + @operationId("VirtualMachineScaleSetRollingUpgrades_GetLatest") getLatest is ArmResourceRead< RollingUpgradeStatusInfo, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp index b6287911be..e3eaf46391 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; // FIXME: SharedGallery has no properties property @@ -24,6 +26,7 @@ model SharedGallery is ProxyResource<{}> { interface SharedGalleries { @doc("Get a shared gallery by subscription id or tenant id.") get is ArmResourceRead; + @doc("List shared galleries by subscription id or tenant id.") list is ArmResourceListByParent< SharedGallery, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp index fd2319b665..7d15bca18b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./SharedGallery.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery image definition that you want to create or update.") @@ -24,6 +26,7 @@ model SharedGalleryImage is ProxyResource { interface SharedGalleryImages { @doc("Get a shared gallery image by subscription id or tenant id.") get is ArmResourceRead; + @doc("List shared gallery images by subscription id or tenant id.") list is ArmResourceListByParent< SharedGalleryImage, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp index b5d8524312..beea9dc24e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./SharedGalleryImage.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery image version that you want to create or update.") @@ -25,6 +27,7 @@ model SharedGalleryImageVersion interface SharedGalleryImageVersions { @doc("Get a shared gallery image version by subscription id or tenant id.") get is ArmResourceRead; + @doc("List shared gallery image versions by subscription id or tenant id.") list is ArmResourceListByParent< SharedGalleryImageVersion, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp index e90b77920c..1b55fff803 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Snapshot resource.") @@ -28,18 +30,37 @@ model Snapshot is TrackedResource { interface Snapshots { @doc("Gets information about a snapshot.") get is ArmResourceRead; + @doc("Creates or updates a snapshot.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Updates (patches) a snapshot.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("Deletes a snapshot.") delete is ArmResourceDeleteAsync; + @doc("Lists snapshots under a resource group.") listByResourceGroup is ArmResourceListByParent; + @doc("Lists snapshots under a subscription.") list is ArmListBySubscription; + @doc("Grants access to a snapshot.") - grantAccess is ArmResourceActionAsync; + grantAccess is ArmResourceActionAsync< + Snapshot, + GrantAccessData, + AccessUri, + BaseParameters, + ArmLroLocationHeader + >; + @doc("Revokes access to a snapshot.") - revokeAccess is ArmResourceActionAsync; + revokeAccess is ArmResourceActionAsync< + Snapshot, + void, + void, + BaseParameters, + ArmLroLocationHeader + >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp index 1f40c59c4e..d02997a9c7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the SSH public key.") @@ -19,23 +21,43 @@ model SshPublicKeyResource is TrackedResource { } @armResourceOperations -interface SshPublicKeys { +interface SshPublicKeyResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Retrieves information about an SSH public key.") + @operationId("SshPublicKeys_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new SSH public key resource.") + @operationId("SshPublicKeys_Create") create is ArmResourceCreateOrReplaceSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates a new SSH public key resource.") - update is ArmResourcePatchSync< + @operationId("SshPublicKeys_Update") + update is ArmCustomPatchSync< SshPublicKeyResource, - SshPublicKeyResourceProperties + SshPublicKeyUpdateResource >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Delete an SSH public key.") + @operationId("SshPublicKeys_Delete") delete is ArmResourceDeleteSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the response to get the next page of SSH public keys.") + @operationId("SshPublicKeys_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys.") + @operationId("SshPublicKeys_ListBySubscription") listBySubscription is ArmListBySubscription; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Generates and returns a public/private key pair and populates the SSH public key resource with the public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key resource.") + @operationId("SshPublicKeys_GenerateKeyPair") generateKeyPair is ArmResourceActionSync< SshPublicKeyResource, void, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp index c130c7cf5d..bc9689a854 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a Virtual Machine.") @@ -44,10 +46,13 @@ interface VirtualMachines { $expand?: InstanceViewTypes; } >; + @doc("The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("The operation to update a virtual machine.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("The operation to delete a virtual machine.") delete is ArmResourceDeleteAsync< VirtualMachine, @@ -59,6 +64,7 @@ interface VirtualMachines { forceDeletion?: boolean; } >; + @doc("Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.") list is ArmResourceListByParent< VirtualMachine, @@ -74,6 +80,7 @@ interface VirtualMachines { $expand?: ExpandTypeForListVMs; } >; + @doc("Gets all the virtual machines under the specified subscription for the specified location.") listByLocation is ArmResourceListAtScope< VirtualMachine, @@ -87,16 +94,22 @@ interface VirtualMachines { location: string; } >; + @doc("Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.") listAll is ArmListBySubscription; + @doc("Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.") capture is ArmResourceActionAsync< VirtualMachine, VirtualMachineCaptureParameters, - VirtualMachineCaptureResult + VirtualMachineCaptureResult, + BaseParameters, + ArmLroLocationHeader >; + @doc("Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.") convertToManagedDisks is ArmResourceActionAsync; + @doc("Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.") deallocate is ArmResourceActionAsync< VirtualMachine, @@ -110,8 +123,10 @@ interface VirtualMachines { hibernate?: boolean; } >; + @doc("Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image).") generalize is ArmResourceActionSync; + @doc("The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.") powerOff is ArmResourceActionAsync< VirtualMachine, @@ -125,20 +140,26 @@ interface VirtualMachines { skipShutdown?: boolean; } >; + @doc("The operation to reapply a virtual machine's state.") reapply is ArmResourceActionAsync; + @doc("The operation to restart a virtual machine.") restart is ArmResourceActionAsync; + @doc("The operation to start a virtual machine.") start is ArmResourceActionAsync; + @doc("Shuts down the virtual machine, moves it to a new node, and powers it back on.") redeploy is ArmResourceActionAsync; + @doc("Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.") reimage is ArmResourceActionAsync< VirtualMachine, VirtualMachineReimageParameters, void >; + @doc("The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.") retrieveBootDiagnosticsData is ArmResourceActionSync< VirtualMachine, @@ -152,29 +173,42 @@ interface VirtualMachines { sasUriExpirationTimeInMinutes?: int32; } >; + @doc("The operation to perform maintenance on a virtual machine.") performMaintenance is ArmResourceActionAsync; + @doc("The operation to simulate the eviction of spot virtual machine.") simulateEviction is ArmResourceActionNoContentSync; + @doc("Assess patches on the VM.") assessPatches is ArmResourceActionAsync< VirtualMachine, void, - VirtualMachineAssessPatchesResult + VirtualMachineAssessPatchesResult, + BaseParameters, + ArmLroLocationHeader >; + @doc("Installs patches on the VM.") installPatches is ArmResourceActionAsync< VirtualMachine, VirtualMachineInstallPatchesParameters, - VirtualMachineInstallPatchesResult + VirtualMachineInstallPatchesResult, + BaseParameters, + ArmLroLocationHeader >; + @doc("Run command on the VM.") runCommand is ArmResourceActionAsync< VirtualMachine, RunCommandInput, - RunCommandResult + RunCommandResult, + BaseParameters, + ArmLroLocationHeader >; + @doc("Retrieves information about the run-time state of a virtual machine.") + // FIXME: VirtualMachines_InstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView") @get InstanceView is Azure.Core.Foundations.Operation< @@ -195,6 +229,7 @@ interface VirtualMachines { >; @doc("Lists all available virtual machine sizes to which the specified virtual machine can be resized.") + // FIXME: VirtualMachines_ListAvailableSizes could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes") @get ListAvailableSizes is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp index 2bc2115d2d..f50764350d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./VirtualMachine.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a Virtual Machine Extension.") @@ -34,15 +36,19 @@ interface VirtualMachineExtensions { $expand?: string; } >; + @doc("The operation to create or update the extension.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("The operation to update the extension.") - update is ArmResourcePatchAsync< + update is ArmCustomPatchAsync< VirtualMachineExtension, - VirtualMachineExtensionProperties + VirtualMachineExtensionUpdate >; + @doc("The operation to delete the extension.") delete is ArmResourceDeleteAsync; + @doc("The operation to get all extensions of a Virtual Machine.") list is ArmResourceListByParent< VirtualMachineExtension, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp index b27cbe68d0..aa42ed2649 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a Virtual Machine Extension Image.") @@ -23,6 +25,7 @@ model VirtualMachineExtensionImage interface VirtualMachineExtensionImages { @doc("Gets a virtual machine extension image.") get is ArmResourceRead; + @doc("Gets a list of virtual machine extension image types.") listTypes is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp index 5fefe9ab75..3bb3748be4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./VirtualMachine.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a Virtual Machine run command.") @@ -34,15 +36,19 @@ interface VirtualMachineRunCommands { $expand?: string; } >; + @doc("The operation to create or update the run command.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("The operation to update the run command.") - update is ArmResourcePatchAsync< + update is ArmCustomPatchAsync< VirtualMachineRunCommand, - VirtualMachineRunCommandProperties + VirtualMachineRunCommandUpdate >; + @doc("The operation to delete the run command.") delete is ArmResourceDeleteAsync; + @doc("The operation to get all run commands of a Virtual Machine.") listByVirtualMachine is ArmResourceListByParent< VirtualMachineRunCommand, @@ -54,6 +60,7 @@ interface VirtualMachineRunCommands { $expand?: string; } >; + @doc("Lists all available run commands for a subscription in a location.") list is ArmResourceListAtScope< VirtualMachineRunCommand, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp index 8a6111e69d..e795a581dc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a Virtual Machine Scale Set.") @@ -46,6 +48,7 @@ interface VirtualMachineScaleSets { $expand?: ExpandTypesForGetVMScaleSets; } >; + @doc("Create or update a VM scale set.") createOrUpdate is ArmResourceCreateOrUpdateAsync< VirtualMachineScaleSet, @@ -57,10 +60,11 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Update a VM scale set.") - update is ArmResourcePatchAsync< + update is ArmCustomPatchAsync< VirtualMachineScaleSet, - VirtualMachineScaleSetProperties, + VirtualMachineScaleSetUpdate, { ...BaseParameters; @@ -69,6 +73,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Deletes a VM scale set.") delete is ArmResourceDeleteAsync< VirtualMachineScaleSet, @@ -84,8 +89,10 @@ interface VirtualMachineScaleSets { forceDeletion?: boolean; } >; + @doc("Gets a list of all VM scale sets under a resource group.") list is ArmResourceListByParent; + @doc("Gets all the VM scale sets under the specified subscription for the specified location.") listByLocation is ArmResourceListAtScope< VirtualMachineScaleSet, @@ -99,8 +106,10 @@ interface VirtualMachineScaleSets { location: string; } >; + @doc("Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets.") listAll is ArmListBySubscription; + @doc("Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates.") deallocate is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -118,6 +127,7 @@ interface VirtualMachineScaleSets { hibernate?: boolean; } >; + @doc("Deletes virtual machines in a VM scale set.") deleteInstances is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -135,6 +145,7 @@ interface VirtualMachineScaleSets { forceDeletion?: boolean; } >; + @doc("Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.") powerOff is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -152,6 +163,7 @@ interface VirtualMachineScaleSets { skipShutdown?: boolean; } >; + @doc("Restarts one or more virtual machines in a VM scale set.") restart is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -165,6 +177,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Starts one or more virtual machines in a VM scale set.") start is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -178,6 +191,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances") reapply is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -189,8 +203,10 @@ interface VirtualMachineScaleSets { @doc("The name of the VM scale set.") @path vmScaleSetName: string; - } + }, + ArmLroLocationHeader >; + @doc("Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.") redeploy is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -204,6 +220,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications") performMaintenance is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -217,6 +234,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.") updateInstances is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -230,6 +248,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.") reimage is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -243,6 +262,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.") reimageAll is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -256,6 +276,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.") forceRecoveryServiceFabricPlatformUpdateDomainWalk is ArmResourceActionSync< VirtualMachineScaleSet, @@ -281,6 +302,7 @@ interface VirtualMachineScaleSets { placementGroupId?: string; } >; + @doc("Converts SinglePlacementGroup property to false for a existing virtual machine scale set.") convertToSinglePlacementGroup is ArmResourceActionSync< VirtualMachineScaleSet, @@ -294,6 +316,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Changes ServiceState property for a given service") setOrchestrationServiceState is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -307,7 +330,57 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Cancels the current virtual machine scale set rolling upgrade.") + @operationId("VirtualMachineScaleSetRollingUpgrades_Cancel") + cancel is ArmResourceActionAsync< + VirtualMachineScaleSet, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected.") + @operationId("VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade") + startOSUpgrade is ArmResourceActionAsync< + VirtualMachineScaleSet, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest available extension version. Instances which are already running the latest extension versions are not affected.") + @operationId("VirtualMachineScaleSetRollingUpgrades_StartExtensionUpgrade") + startExtensionUpgrade is ArmResourceActionAsync< + VirtualMachineScaleSet, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Gets the status of a VM scale set instance.") + // FIXME: VirtualMachineScaleSets_GetInstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView") @get GetInstanceView is Azure.Core.Foundations.Operation< @@ -328,6 +401,7 @@ interface VirtualMachineScaleSets { >; @doc("Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.") + // FIXME: VirtualMachineScaleSets_ListSkus could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus") @get ListSkus is Azure.Core.Foundations.Operation< @@ -347,7 +421,10 @@ interface VirtualMachineScaleSets { VirtualMachineScaleSetListSkusResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("VirtualMachineScaleSets_GetOSUpgradeHistory") @doc("Gets list of OS upgrades on a VM scale set instance.") + // FIXME: VirtualMachineScaleSets_GetOSUpgradeHistory could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory") @get GetOSUpgradeHistory is Azure.Core.Foundations.Operation< @@ -367,46 +444,3 @@ interface VirtualMachineScaleSets { VirtualMachineScaleSetListOSUpgradeHistory >; } - -@armResourceOperations -interface VirtualMachineScaleSetRollingUpgrades { - @doc("Cancels the current virtual machine scale set rolling upgrade.") - cancel is ArmResourceActionAsync< - VirtualMachineScaleSet, - void, - void, - { - ...BaseParameters; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - } - >; - @doc("Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected.") - startOSUpgrade is ArmResourceActionAsync< - VirtualMachineScaleSet, - void, - void, - { - ...BaseParameters; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - } - >; - @doc("Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest available extension version. Instances which are already running the latest extension versions are not affected.") - startExtensionUpgrade is ArmResourceActionAsync< - VirtualMachineScaleSet, - void, - void, - { - ...BaseParameters; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - } - >; -} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp index 29221a9e25..0066b5a7a1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./VirtualMachineScaleSet.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a Virtual Machine Scale Set Extension.") @@ -38,6 +40,7 @@ interface VirtualMachineScaleSetExtensions { $expand?: string; } >; + @doc("The operation to create or update an extension.") createOrUpdate is ArmResourceCreateOrUpdateAsync< VirtualMachineScaleSetExtension, @@ -49,10 +52,11 @@ interface VirtualMachineScaleSetExtensions { vmScaleSetName: string; } >; + @doc("The operation to update an extension.") - update is ArmResourcePatchAsync< + update is ArmCustomPatchAsync< VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProperties, + VirtualMachineScaleSetExtensionUpdate, { ...BaseParameters; @@ -61,6 +65,7 @@ interface VirtualMachineScaleSetExtensions { vmScaleSetName: string; } >; + @doc("The operation to delete the extension.") delete is ArmResourceDeleteAsync< VirtualMachineScaleSetExtension, @@ -72,6 +77,7 @@ interface VirtualMachineScaleSetExtensions { vmScaleSetName: string; } >; + @doc("Gets a list of all extensions in a VM scale set.") list is ArmResourceListByParent< VirtualMachineScaleSetExtension, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp index f5146dd479..b4f649df86 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./VirtualMachineScaleSet.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a virtual machine scale set virtual machine.") @@ -38,8 +40,10 @@ model VirtualMachineScaleSetVM } @armResourceOperations -interface VirtualMachineScaleSetVMs { +interface VirtualMachineScaleSetVMS { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets a virtual machine from a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_Get") get is ArmResourceRead< VirtualMachineScaleSetVM, { @@ -54,7 +58,10 @@ interface VirtualMachineScaleSetVMs { $expand?: InstanceViewTypes; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates a virtual machine of a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_Update") update is ArmResourceCreateOrUpdateAsync< VirtualMachineScaleSetVM, { @@ -65,7 +72,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes a virtual machine from a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_Delete") delete is ArmResourceDeleteAsync< VirtualMachineScaleSetVM, { @@ -80,7 +90,10 @@ interface VirtualMachineScaleSetVMs { forceDeletion?: boolean; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets a list of all virtual machines in a VM scale sets.") + @operationId("VirtualMachineScaleSetVMs_List") list is ArmResourceListByParent< VirtualMachineScaleSetVM, { @@ -99,7 +112,10 @@ interface VirtualMachineScaleSetVMs { $expand?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_Reimage") reimage is ArmResourceActionAsync< VirtualMachineScaleSetVM, VirtualMachineScaleSetVMReimageParameters, @@ -112,7 +128,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks.") + @operationId("VirtualMachineScaleSetVMs_ReimageAll") reimageAll is ArmResourceActionAsync< VirtualMachineScaleSetVM, void, @@ -125,7 +144,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated.") + @operationId("VirtualMachineScaleSetVMs_Deallocate") deallocate is ArmResourceActionAsync< VirtualMachineScaleSetVM, void, @@ -138,7 +160,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.") + @operationId("VirtualMachineScaleSetVMs_PowerOff") powerOff is ArmResourceActionAsync< VirtualMachineScaleSetVM, void, @@ -155,7 +180,10 @@ interface VirtualMachineScaleSetVMs { skipShutdown?: boolean; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Restarts a virtual machine in a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_Restart") restart is ArmResourceActionAsync< VirtualMachineScaleSetVM, void, @@ -168,7 +196,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Starts a virtual machine in a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_Start") start is ArmResourceActionAsync< VirtualMachineScaleSetVM, void, @@ -181,7 +212,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on.") + @operationId("VirtualMachineScaleSetVMs_Redeploy") redeploy is ArmResourceActionAsync< VirtualMachineScaleSetVM, void, @@ -194,7 +228,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_RetrieveBootDiagnosticsData") retrieveBootDiagnosticsData is ArmResourceActionSync< VirtualMachineScaleSetVM, void, @@ -211,7 +248,10 @@ interface VirtualMachineScaleSetVMs { sasUriExpirationTimeInMinutes?: int32; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Performs maintenance on a virtual machine in a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_PerformMaintenance") performMaintenance is ArmResourceActionAsync< VirtualMachineScaleSetVM, void, @@ -224,7 +264,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The operation to simulate the eviction of spot virtual machine in a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_SimulateEviction") simulateEviction is ArmResourceActionNoContentSync< VirtualMachineScaleSetVM, void, @@ -236,7 +279,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Run command on a virtual machine in a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_RunCommand") runCommand is ArmResourceActionAsync< VirtualMachineScaleSetVM, RunCommandInput, @@ -247,9 +293,14 @@ interface VirtualMachineScaleSetVMs { @doc("The name of the VM scale set.") @path vmScaleSetName: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("VirtualMachineScaleSetVMs_GetInstanceView") @doc("Gets the status of a virtual machine from a VM scale set.") + // FIXME: VirtualMachineScaleSetVMs_GetInstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/instanceView") @get GetInstanceView is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp index 31ee9b8c15..3c7653a86c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./VirtualMachineScaleSetVM.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a VMSS VM Extension.") @@ -23,7 +25,9 @@ model VirtualMachineScaleSetVMExtension @armResourceOperations interface VirtualMachineScaleSetVMExtensions { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The operation to get the VMSS VM extension.") + @operationId("VirtualMachineScaleSetVMExtensions_Get") get is ArmResourceRead< VirtualMachineScaleSetVMExtension, { @@ -38,7 +42,10 @@ interface VirtualMachineScaleSetVMExtensions { $expand?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The operation to create or update the VMSS VM extension.") + @operationId("VirtualMachineScaleSetVMExtensions_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrUpdateAsync< VirtualMachineScaleSetVMExtension, { @@ -49,10 +56,13 @@ interface VirtualMachineScaleSetVMExtensions { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The operation to update the VMSS VM extension.") - update is ArmResourcePatchAsync< + @operationId("VirtualMachineScaleSetVMExtensions_Update") + update is ArmCustomPatchAsync< VirtualMachineScaleSetVMExtension, - VirtualMachineExtensionProperties, + VirtualMachineScaleSetVMExtensionUpdate, { ...BaseParameters; @@ -61,7 +71,10 @@ interface VirtualMachineScaleSetVMExtensions { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The operation to delete the VMSS VM extension.") + @operationId("VirtualMachineScaleSetVMExtensions_Delete") delete is ArmResourceDeleteAsync< VirtualMachineScaleSetVMExtension, { @@ -72,7 +85,10 @@ interface VirtualMachineScaleSetVMExtensions { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The operation to get all extensions of an instance in Virtual Machine Scaleset.") + @operationId("VirtualMachineScaleSetVMExtensions_List") list is ArmResourceListByParent< VirtualMachineScaleSetVMExtension, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_CreateOrUpdate.json new file mode 100644 index 0000000000..ad7cf8261f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_CreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "myAvailabilitySet", + "parameters": { + "location": "westus", + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 20 + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myAvailabilitySet", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet", + "location": "westus", + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 20 + }, + "sku": { + "name": "Classic" + } + } + } + }, + "operationId": "AvailabilitySets_CreateOrUpdate", + "title": "Create an availability set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMaximumSetGen.json new file mode 100644 index 0000000000..44bd604bb8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMaximumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "AvailabilitySets_Delete", + "title": "AvailabilitySet_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMinimumSetGen.json new file mode 100644 index 0000000000..f502a475cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMinimumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "AvailabilitySets_Delete", + "title": "AvailabilitySet_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMaximumSetGen.json new file mode 100644 index 0000000000..895dc6aed5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMaximumSetGen.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myAvailabilitySet", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet", + "location": "westus", + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 20, + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "virtualMachines": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ] + }, + "sku": { + "name": "Classic", + "capacity": 29, + "tier": "aaaaaaaaaaaaaa" + }, + "tags": { + "key2505": "aa", + "key9626": "aaaaaaaaaaaaaaaaaaaa" + } + } + } + }, + "operationId": "AvailabilitySets_Get", + "title": "AvailabilitySet_Get_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMinimumSetGen.json new file mode 100644 index 0000000000..e8482da662 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet", + "location": "westus" + } + } + }, + "operationId": "AvailabilitySets_Get", + "title": "AvailabilitySet_Get_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMaximumSetGen.json new file mode 100644 index 0000000000..e7318d2b54 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMaximumSetGen.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Standard_A1_V2", + "maxDataDiskCount": 2, + "memoryInMB": 2048, + "numberOfCores": 1, + "osDiskSizeInMB": 1047552, + "resourceDiskSizeInMB": 10240 + }, + { + "name": "Standard_A2_V2", + "maxDataDiskCount": 4, + "memoryInMB": 4096, + "numberOfCores": 2, + "osDiskSizeInMB": 1047552, + "resourceDiskSizeInMB": 20480 + } + ] + } + } + }, + "operationId": "AvailabilitySets_ListAvailableSizes", + "title": "AvailabilitySet_ListAvailableSizes_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMinimumSetGen.json new file mode 100644 index 0000000000..f48edb649c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMinimumSetGen.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": {} + } + }, + "operationId": "AvailabilitySets_ListAvailableSizes", + "title": "AvailabilitySet_ListAvailableSizes_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListBySubscription.json new file mode 100644 index 0000000000..3da2809002 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListBySubscription.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "$expand": "virtualMachines\\$ref", + "api-version": "2023-07-01", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "australiasoutheast", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "virtualMachines": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + ] + }, + "sku": { + "name": "Classic" + } + }, + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "australiasoutheast", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "virtualMachines": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + ] + }, + "sku": { + "name": "Classic" + } + }, + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "westcentralus", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "virtualMachines": [] + }, + "sku": { + "name": "Classic" + }, + "tags": { + "{tagName}": "{tagValue}" + } + }, + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "westcentralus", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "virtualMachines": [] + }, + "sku": { + "name": "Classic" + }, + "tags": { + "{tagName}": "{tagValue}" + } + } + ] + } + } + }, + "operationId": "AvailabilitySets_ListBySubscription", + "title": "List availability sets in a subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMaximumSetGen.json new file mode 100644 index 0000000000..63d6aed23d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMaximumSetGen.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaa", + "value": [ + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "australiasoutheast", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaa", + "displayStatus": "aaaaaaaaaaa", + "level": "Info", + "message": "aaaaaa", + "time": "2021-11-30T13:39:56.427Z" + } + ], + "virtualMachines": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + ] + }, + "sku": { + "name": "Classic", + "capacity": 22, + "tier": "aaaaaaaaaaaaaaaaaaaaaaa" + }, + "tags": { + "key2039": "aaaaaaaaaaaaa" + } + }, + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "australiasoutheast", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaa", + "displayStatus": "aaaaaaaaaaa", + "level": "Info", + "message": "aaaaaa", + "time": "2021-11-30T13:39:56.427Z" + } + ], + "virtualMachines": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + ] + }, + "sku": { + "name": "Classic", + "capacity": 23, + "tier": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "tags": { + "key5849": "aaaaaaaaaaaaaaa" + } + }, + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "westcentralus", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaa", + "displayStatus": "aaaaaaaaaaa", + "level": "Info", + "message": "aaaaaa", + "time": "2021-11-30T13:39:56.427Z" + } + ], + "virtualMachines": [] + }, + "sku": { + "name": "Classic", + "capacity": 26, + "tier": "aaaaaaaaaaaaaaaaaaaaa" + }, + "tags": {} + }, + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "westcentralus", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaa", + "displayStatus": "aaaaaaaaaaa", + "level": "Info", + "message": "aaaaaa", + "time": "2021-11-30T13:39:56.427Z" + } + ], + "virtualMachines": [] + }, + "sku": { + "name": "Classic", + "capacity": 6, + "tier": "aaaaaaaaaaaaaaaaaa" + }, + "tags": {} + } + ] + } + } + }, + "operationId": "AvailabilitySets_List", + "title": "AvailabilitySet_List_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMinimumSetGen.json new file mode 100644 index 0000000000..b6d9e8124b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMinimumSetGen.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet1", + "location": "australiasoutheast" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet2", + "location": "australiasoutheast" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet3", + "location": "westcentralus" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet4", + "location": "westcentralus" + } + ] + } + } + }, + "operationId": "AvailabilitySets_List", + "title": "AvailabilitySet_List_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMaximumSetGen.json new file mode 100644 index 0000000000..d3cb1dd466 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMaximumSetGen.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aaaaaaaaaaaaaaaaaaa", + "parameters": { + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 20, + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "virtualMachines": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ] + }, + "sku": { + "name": "DSv3-Type1", + "capacity": 7, + "tier": "aaa" + }, + "tags": { + "key2574": "aaaaaaaa" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myAvailabilitySet", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet", + "location": "westus", + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 20, + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "virtualMachines": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ] + }, + "sku": { + "name": "Classic", + "capacity": 29, + "tier": "aaaaaaaaaaaaaa" + }, + "tags": { + "key2505": "aa", + "key9626": "aaaaaaaaaaaaaaaaaaaa" + } + } + } + }, + "operationId": "AvailabilitySets_Update", + "title": "AvailabilitySet_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMinimumSetGen.json new file mode 100644 index 0000000000..40886eaebc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aaaaaaaaaaaaaaaaaaaa", + "parameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "location": "westus" + } + } + }, + "operationId": "AvailabilitySets_Update", + "title": "AvailabilitySet_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_CreateOrUpdate.json new file mode 100644 index 0000000000..edb3742bbe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_CreateOrUpdate.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "myCapacityReservationGroup", + "parameters": { + "location": "westus", + "tags": { + "department": "finance" + }, + "zones": [ + "1", + "2" + ] + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myCapacityReservationGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/myCapacityReservationGroup", + "location": "westus", + "tags": { + "department": "finance", + "owner": "myCompany" + }, + "zones": [ + "1", + "2" + ] + } + }, + "201": { + "body": { + "name": "myCapacityReservationGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/myCapacityReservationGroup", + "location": "westus", + "tags": { + "department": "finance" + }, + "zones": [ + "1", + "2" + ] + } + } + }, + "operationId": "CapacityReservationGroups_CreateOrUpdate", + "title": "Create or update a capacity reservation group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMaximumSetGen.json new file mode 100644 index 0000000000..2b86452d40 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMaximumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "a", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "CapacityReservationGroups_Delete", + "title": "CapacityReservationGroup_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMinimumSetGen.json new file mode 100644 index 0000000000..32bcaa9b49 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMinimumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "CapacityReservationGroups_Delete", + "title": "CapacityReservationGroup_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Get.json new file mode 100644 index 0000000000..bcad9a4a16 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Get.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "$expand": "instanceView", + "api-version": "2023-07-01", + "capacityReservationGroupName": "myCapacityReservationGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myCapacityReservationGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/myCapacityReservationGroup", + "location": "westus", + "properties": { + "capacityReservations": [ + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation1" + }, + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation2" + } + ], + "instanceView": { + "capacityReservations": [ + { + "name": "myCapacityReservation1", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info" + } + ], + "utilizationInfo": { + "currentCapacity": 5, + "virtualMachinesAllocated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2" + } + ] + } + }, + { + "name": "myCapacityReservation2", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info" + } + ], + "utilizationInfo": { + "currentCapacity": 5, + "virtualMachinesAllocated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM4" + } + ] + } + } + ] + } + }, + "tags": { + "{tagName}": "{tagValue}" + }, + "zones": [ + "3", + "1" + ] + } + } + }, + "operationId": "CapacityReservationGroups_Get", + "title": "Get a capacity reservation Group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListByResourceGroup.json new file mode 100644 index 0000000000..fcd3c9af0a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListByResourceGroup.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "$expand": "virtualMachines/$ref", + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{capacityReservationGroupName}", + "type": "Microsoft.Compute/CapacityReservationGroups", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", + "location": "West US", + "properties": { + "capacityReservations": [ + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation1" + }, + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation2" + } + ], + "virtualMachinesAssociated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2" + } + ] + } + }, + { + "name": "{capacityReservationGroupName}", + "type": "Microsoft.Compute/CapacityReservationGroups", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", + "location": "West US", + "properties": { + "capacityReservations": [ + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation3" + }, + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation4" + } + ], + "virtualMachinesAssociated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3" + } + ] + } + } + ] + } + } + }, + "operationId": "CapacityReservationGroups_ListByResourceGroup", + "title": "List capacity reservation groups in resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListBySubscription.json new file mode 100644 index 0000000000..fe2f7d8498 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListBySubscription.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "$expand": "virtualMachines/$ref", + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{capacityReservationGroupName}", + "type": "Microsoft.Compute/CapacityReservationGroups", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", + "location": "West US", + "properties": { + "capacityReservations": [ + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation1" + }, + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation2" + } + ], + "virtualMachinesAssociated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/virtualMachines/myVM1" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/virtualMachines/myVM2" + } + ] + } + }, + { + "name": "{capacityReservationGroupName}", + "type": "Microsoft.Compute/CapacityReservationGroups", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup2/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", + "location": "West US", + "properties": { + "capacityReservations": [ + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup2/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation3" + }, + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup2/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation4" + } + ], + "virtualMachinesAssociated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup2/providers/Microsoft.Compute/virtualMachines/myVM3" + } + ] + } + } + ] + } + } + }, + "operationId": "CapacityReservationGroups_ListBySubscription", + "title": "List capacity reservation groups in subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMaximumSetGen.json new file mode 100644 index 0000000000..9fb33b8675 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMaximumSetGen.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "aaaaaaaaaaaaaaaaaaaaaa", + "parameters": { + "properties": { + "instanceView": {} + }, + "tags": { + "key5355": "aaa" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myCapacityReservationGroup", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/myCapacityReservationGroup", + "location": "westus", + "properties": { + "capacityReservations": [ + { + "id": "aaaa" + } + ], + "instanceView": { + "capacityReservations": [ + { + "name": "aaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "utilizationInfo": { + "virtualMachinesAllocated": [ + { + "id": "aaaa" + } + ] + } + } + ] + }, + "virtualMachinesAssociated": [ + { + "id": "aaaa" + } + ] + }, + "tags": {}, + "zones": [ + "1", + "2" + ] + } + } + }, + "operationId": "CapacityReservationGroups_Update", + "title": "CapacityReservationGroup_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMinimumSetGen.json new file mode 100644 index 0000000000..4b9a8acb09 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "aaaaaaaaaaaaaaaaaaaaaa", + "parameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "location": "westus" + } + } + }, + "operationId": "CapacityReservationGroups_Update", + "title": "CapacityReservationGroup_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_CreateOrUpdate.json new file mode 100644 index 0000000000..23a39a0965 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_CreateOrUpdate.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "myCapacityReservationGroup", + "capacityReservationName": "myCapacityReservation", + "parameters": { + "location": "westus", + "sku": { + "name": "Standard_DS1_v2", + "capacity": 4 + }, + "tags": { + "department": "HR" + }, + "zones": [ + "1" + ] + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myCapacityReservation", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation", + "location": "westus", + "properties": { + "platformFaultDomainCount": 3, + "provisioningState": "Creating", + "provisioningTime": "2021-06-27T01:02:38.3138469+00:00", + "reservationId": "{GUID}" + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 4 + }, + "tags": { + "department": "HR" + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "myCapacityReservation", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation", + "location": "westus", + "properties": { + "platformFaultDomainCount": 3, + "provisioningState": "Creating", + "provisioningTime": "2021-06-27T01:02:38.3138469+00:00", + "reservationId": "{GUID}" + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 4 + }, + "tags": { + "department": "HR" + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "CapacityReservations_CreateOrUpdate", + "title": "Create or update a capacity reservation ." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMaximumSetGen.json new file mode 100644 index 0000000000..edd26d5900 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMaximumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "aaaaaaaaaaa", + "capacityReservationName": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "CapacityReservations_Delete", + "title": "CapacityReservation_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMinimumSetGen.json new file mode 100644 index 0000000000..f40891a01c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "aaa", + "capacityReservationName": "aaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "CapacityReservations_Delete", + "title": "CapacityReservation_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Get.json new file mode 100644 index 0000000000..721bf28ea4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Get.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "$expand": "instanceView", + "api-version": "2023-07-01", + "capacityReservationGroupName": "myCapacityReservationGroup", + "capacityReservationName": "myCapacityReservation", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myCapacityReservation", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation", + "location": "westus", + "properties": { + "instanceView": { + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info" + } + ], + "utilizationInfo": { + "currentCapacity": 5, + "virtualMachinesAllocated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2" + } + ] + } + }, + "platformFaultDomainCount": 3, + "provisioningState": "Succeeded", + "provisioningTime": "2021-06-27T01:02:38.3138469+00:00", + "reservationId": "{GUID}", + "timeCreated": "2021-06-27T01:02:38.3138469+00:00", + "virtualMachinesAssociated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3" + } + ] + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 4 + }, + "tags": { + "department": "HR" + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "CapacityReservations_Get", + "title": "Get a capacity reservation." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_ListByCapacityReservationGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_ListByCapacityReservationGroup.json new file mode 100644 index 0000000000..1933739ea0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_ListByCapacityReservationGroup.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "$expand": "virtualMachines/$ref", + "api-version": "2023-07-01", + "capacityReservationGroupName": "myCapacityReservationGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{capacityReservationName}", + "type": "Microsoft.Compute/CapacityReservations", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/CapacityReservation/{capacityReservationName}", + "location": "West US", + "properties": { + "platformFaultDomainCount": 3, + "provisioningState": "Succeeded", + "provisioningTime": "2021-06-27T01:02:38.3138469+00:00", + "reservationId": "{GUID}", + "virtualMachinesAssociated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3" + } + ] + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 4 + }, + "tags": { + "department": "HR" + }, + "zones": [ + "1" + ] + }, + { + "name": "{capacityReservationName}", + "type": "Microsoft.Compute/CapacityReservations", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/CapacityReservation/{capacityReservationName}", + "location": "West US", + "properties": { + "platformFaultDomainCount": 3, + "provisioningState": "Succeeded", + "provisioningTime": "2021-06-27T01:02:38.3138469+00:00", + "reservationId": "{GUID}", + "virtualMachinesAssociated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM4" + } + ] + }, + "sku": { + "name": "Standard_A1_v2", + "capacity": 4 + }, + "tags": { + "department": "HR" + }, + "zones": [ + "1" + ] + } + ] + } + } + }, + "operationId": "CapacityReservations_ListByCapacityReservationGroup", + "title": "List capacity reservations in reservation group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMaximumSetGen.json new file mode 100644 index 0000000000..cb9599f54a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMaximumSetGen.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "aaaaaaaaaa", + "capacityReservationName": "aaaaaaaaaaaaaaaaaaa", + "parameters": { + "properties": { + "instanceView": { + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "utilizationInfo": {} + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 7, + "tier": "aaa" + }, + "tags": { + "key4974": "aaaaaaaaaaaaaaaa" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myCapacityReservation", + "type": "aaaaaaaaaaaaaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation", + "location": "westus", + "properties": { + "instanceView": { + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "utilizationInfo": { + "virtualMachinesAllocated": [ + { + "id": "aaaa" + } + ] + } + }, + "platformFaultDomainCount": 3, + "provisioningState": "Creating", + "provisioningTime": "2021-06-27T01:02:38.3138469+00:00", + "reservationId": "{GUID}", + "virtualMachinesAssociated": [ + { + "id": "aaaa" + } + ] + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 4, + "tier": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "tags": {}, + "zones": [ + "1" + ] + } + }, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CapacityReservations_Update", + "title": "CapacityReservation_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMinimumSetGen.json new file mode 100644 index 0000000000..2364b0d0ff --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMinimumSetGen.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "capacityReservationName": "aaa", + "parameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "location": "westus", + "sku": {} + } + }, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CapacityReservations_Update", + "title": "CapacityReservation_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSFamily.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSFamily.json new file mode 100644 index 0000000000..abe2b4a86b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSFamily.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "location": "westus2", + "osFamilyName": "3", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "3", + "type": "Microsoft.Compute/locations/cloudServiceOsFamilies", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus2/cloudServiceOSFamilies/3", + "location": "westus2", + "properties": { + "name": "3", + "label": "Windows Server 2012", + "versions": [ + { + "isActive": true, + "isDefault": true, + "label": "Windows Azure Guest OS 3.90 (Release 202010-02)", + "version": "WA-GUEST-OS-3.90_202010-02" + } + ] + } + } + } + }, + "operationId": "CloudServiceOperatingSystems_GetOSFamily", + "title": "Get Cloud Service OS Family" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSVersion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSVersion.json new file mode 100644 index 0000000000..2f801be81a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSVersion.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "location": "westus2", + "osVersionName": "WA-GUEST-OS-3.90_202010-02", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "WA-GUEST-OS-3.90_202010-02", + "type": "Microsoft.Compute/locations/cloudServiceOsVersions", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus2/cloudServiceOSVersions/WA-GUEST-OS-3.90_202010-02", + "location": "westus2", + "properties": { + "family": "3", + "familyLabel": "Windows Server 2012", + "isActive": true, + "isDefault": true, + "label": "Windows Azure Guest OS 3.90 (Release 202010-02)", + "version": "WA-GUEST-OS-3.90_202010-02" + } + } + } + }, + "operationId": "CloudServiceOperatingSystems_GetOSVersion", + "title": "Get Cloud Service OS Version" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSFamilies.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSFamilies.json new file mode 100644 index 0000000000..2a3bb96cf3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSFamilies.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "location": "westus2", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "3", + "type": "Microsoft.Compute/locations/cloudServiceOsFamilies", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus2/cloudServiceOSFamilies/3", + "location": "westus2", + "properties": { + "name": "3", + "label": "Windows Server 2012", + "versions": [ + { + "isActive": true, + "isDefault": true, + "label": "Windows Azure Guest OS 3.90 (Release 202010-02)", + "version": "WA-GUEST-OS-3.90_202010-02" + } + ] + } + }, + { + "name": "4", + "type": "Microsoft.Compute/locations/cloudServiceOsFamilies", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus2/cloudServiceOSFamilies/4", + "location": "westus2", + "properties": { + "name": "4", + "label": "Windows Server 2012 R2", + "versions": [ + { + "isActive": true, + "isDefault": true, + "label": "Windows Azure Guest OS 4.83 (Release 202010-02)", + "version": "WA-GUEST-OS-4.83_202010-02" + } + ] + } + } + ] + } + } + }, + "operationId": "CloudServiceOperatingSystems_ListOSFamilies", + "title": "List Cloud Service OS Families in a subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSVersions.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSVersions.json new file mode 100644 index 0000000000..cb4c51b561 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSVersions.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "location": "westus2", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "WA-GUEST-OS-3.90_202010-02", + "type": "Microsoft.Compute/locations/cloudServiceOsVersions", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus2/cloudServiceOSVersions/WA-GUEST-OS-3.90_202010-02", + "location": "westus2", + "properties": { + "family": "3", + "familyLabel": "Windows Server 2012", + "isActive": true, + "isDefault": true, + "label": "Windows Azure Guest OS 3.90 (Release 202010-02)", + "version": "WA-GUEST-OS-3.90_202010-02" + } + }, + { + "name": "WA-GUEST-OS-4.83_202010-02", + "type": "Microsoft.Compute/locations/cloudServiceOsVersions", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus2/cloudServiceOSVersions/WA-GUEST-OS-4.83_202010-02", + "location": "westus2", + "properties": { + "family": "4", + "familyLabel": "Windows Server 2012 R2", + "isActive": true, + "isDefault": true, + "label": "Windows Azure Guest OS 4.83 (Release 202010-02)", + "version": "WA-GUEST-OS-4.83_202010-02" + } + } + ] + } + } + }, + "operationId": "CloudServiceOperatingSystems_ListOSVersions", + "title": "List Cloud Service OS Versions in a subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Delete.json new file mode 100644 index 0000000000..b8df1b722f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "roleInstanceName": "{roleInstance-name}", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "CloudServiceRoleInstances_Delete", + "title": "Delete Cloud Service Role Instance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Get.json new file mode 100644 index 0000000000..8a2606ae0e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Get.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "roleInstanceName": "{roleInstance-name}", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{roleInstance-name}", + "type": "Microsoft.Compute/cloudServices/roleInstances", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/{roleInstance-name}", + "location": "eastus2euap", + "properties": { + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/{roleInstance-name}/networkInterfaces/nic1" + } + ] + } + }, + "sku": { + "name": "Standard_D1_v2", + "tier": "Standard" + } + } + } + }, + "operationId": "CloudServiceRoleInstances_Get", + "title": "Get Cloud Service Role Instance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetInstanceView.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetInstanceView.json new file mode 100644 index 0000000000..307b715fce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetInstanceView.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "roleInstanceName": "{roleInstance-name}", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "platformFaultDomain": 0, + "platformUpdateDomain": 0, + "privateId": "3491bc0c-1f6c-444f-b1d0-ec0751a74e3e", + "statuses": [ + { + "code": "RoleState/RoleStateStarted", + "displayStatus": "RoleStateStarted", + "level": "Info", + "message": "" + } + ] + } + } + }, + "operationId": "CloudServiceRoleInstances_GetInstanceView", + "title": "Get Instance View of Cloud Service Role Instance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetRemoteDesktopFile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetRemoteDesktopFile.json new file mode 100644 index 0000000000..8b43b9f11b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetRemoteDesktopFile.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "aaaa", + "resourceGroupName": "rgcloudService", + "roleInstanceName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": {} + } + }, + "operationId": "CloudServiceRoleInstances_GetRemoteDesktopFile", + "title": "Get Cloud Service Role" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_List.json new file mode 100644 index 0000000000..718c9d9fcc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_List.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "ContosoFrontend_IN_0", + "type": "Microsoft.Compute/cloudServices/roleInstances", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoFrontend_IN_0", + "location": "eastus2euap", + "properties": { + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoFrontend_IN_0/networkInterfaces/nic1" + } + ] + } + }, + "sku": { + "name": "Standard_D1_v2", + "tier": "Standard" + } + }, + { + "name": "ContosoFrontend_IN_1", + "type": "Microsoft.Compute/cloudServices/roleInstances", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoFrontend_IN_1", + "location": "eastus2euap", + "properties": { + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoFrontend_IN_1/networkInterfaces/nic1" + } + ] + } + }, + "sku": { + "name": "Standard_D1_v2", + "tier": "Standard" + } + }, + { + "name": "ContosoBackend_IN_0", + "type": "Microsoft.Compute/cloudServices/roleInstances", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoBackend_IN_0", + "location": "eastus2euap", + "properties": { + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoBackend_IN_0/networkInterfaces/nic1" + } + ] + } + }, + "sku": { + "name": "Standard_D1_v2", + "tier": "Standard" + } + }, + { + "name": "ContosoBackend_IN_1", + "type": "Microsoft.Compute/cloudServices/roleInstances", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoBackend_IN_1", + "location": "eastus2euap", + "properties": { + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoBackend_IN_1/networkInterfaces/nic1" + } + ] + } + }, + "sku": { + "name": "Standard_D1_v2", + "tier": "Standard" + } + } + ] + } + } + }, + "operationId": "CloudServiceRoleInstances_List", + "title": "List Role Instances in a Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Rebuild.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Rebuild.json new file mode 100644 index 0000000000..707b007181 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Rebuild.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "roleInstanceName": "{roleInstance-name}", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServiceRoleInstances_Rebuild", + "title": "Rebuild Cloud Service Role Instance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Reimage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Reimage.json new file mode 100644 index 0000000000..efd63caf2b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Reimage.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "roleInstanceName": "{roleInstance-name}", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServiceRoleInstances_Reimage", + "title": "Reimage Cloud Service Role Instance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Restart.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Restart.json new file mode 100644 index 0000000000..7dbca66eee --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Restart.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "roleInstanceName": "{roleInstance-name}", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServiceRoleInstances_Restart", + "title": "Restart Cloud Service Role Instance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_Get.json new file mode 100644 index 0000000000..ee23664519 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_Get.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "roleName": "{role-name}", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{role-name}", + "type": "Microsoft.Compute/cloudServices/roles", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roles/{role-name}", + "location": "eastus2euap", + "properties": { + "uniqueId": "b03bc269-766b-4921-b91a-7dffaae4d03b:{role-name}" + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + } + } + }, + "operationId": "CloudServiceRoles_Get", + "title": "Get Cloud Service Role" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_List.json new file mode 100644 index 0000000000..64baab5269 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_List.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "ContosoFrontend", + "type": "Microsoft.Compute/cloudServices/roles", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roles/ContosoFrontend", + "location": "eastus2euap", + "properties": { + "uniqueId": "b03bc269-766b-4921-b91a-7dffaae4d03b:ContosoFrontend" + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "type": "Microsoft.Compute/cloudServices/roles", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roles/ContosoBackend", + "location": "eastus2euap", + "properties": { + "uniqueId": "b03bc269-766b-4921-b91a-7dffaae4d03b:ContosoBackend" + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + } + ] + } + } + }, + "operationId": "CloudServiceRoles_List", + "title": "List Roles in a Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_GetUpdateDomain.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_GetUpdateDomain.json new file mode 100644 index 0000000000..495339ddbd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_GetUpdateDomain.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}", + "updateDomain": 1 + }, + "responses": { + "200": { + "body": { + "name": "1", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/updateDomains/1" + } + } + }, + "operationId": "CloudServicesUpdateDomain_GetUpdateDomain", + "title": "Get Cloud Service Update Domain" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_ListUpdateDomains.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_ListUpdateDomains.json new file mode 100644 index 0000000000..61785c54ba --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_ListUpdateDomains.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "0", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/updateDomains/0" + }, + { + "name": "1", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/updateDomains/1" + } + ] + } + } + }, + "operationId": "CloudServicesUpdateDomain_ListUpdateDomains", + "title": "List Update Domains in Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRoles.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRoles.json new file mode 100644 index 0000000000..da2891babf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRoles.json @@ -0,0 +1,184 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "packageUrl": "{PackageUrl}", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "upgradeMode": "Auto" + } + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Updating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "7f3edf91-cb34-4a3e-971a-177dc3dd43cb", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + } + }, + "201": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Creating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "7f3edf91-cb34-4a3e-971a-177dc3dd43cb", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_CreateOrUpdate", + "title": "Create New Cloud Service with Multiple Roles" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRolesInASpecificAvailabilityZone.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRolesInASpecificAvailabilityZone.json new file mode 100644 index 0000000000..de963c101f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRolesInASpecificAvailabilityZone.json @@ -0,0 +1,193 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "packageUrl": "{PackageUrl}", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "upgradeMode": "Auto" + }, + "zones": [ + "1" + ] + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Updating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "7f3edf91-cb34-4a3e-971a-177dc3dd43cb", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Creating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "7f3edf91-cb34-4a3e-971a-177dc3dd43cb", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + }, + "zones": [ + "1" + ] + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_CreateOrUpdate", + "title": "Create New Cloud Service with Multiple Roles in a specific availability zone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRole.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRole.json new file mode 100644 index 0000000000..b7f6eed687 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRole.json @@ -0,0 +1,160 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "myLoadBalancer", + "properties": { + "frontendIpConfigurations": [ + { + "name": "myfe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/myPublicIP" + } + } + } + ] + } + } + ] + }, + "packageUrl": "{PackageUrl}", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "upgradeMode": "Auto" + } + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/5393f919-a68a-43d0-9063-4b2bda6bffdf/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "myLoadBalancer", + "properties": { + "frontendIpConfigurations": [ + { + "name": "myfe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/myPublicIP" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Updating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "14d10b45-ced7-42ef-a406-50a3df2cea7d", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + } + }, + "201": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/5393f919-a68a-43d0-9063-4b2bda6bffdf/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "myLoadBalancer", + "properties": { + "frontendIpConfigurations": [ + { + "name": "myfe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/myPublicIP" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Creating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "14d10b45-ced7-42ef-a406-50a3df2cea7d", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_CreateOrUpdate", + "title": "Create New Cloud Service with Single Role" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndCertificateFromKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndCertificateFromKeyVault.json new file mode 100644 index 0000000000..9b189e543d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndCertificateFromKeyVault.json @@ -0,0 +1,196 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.KeyVault/vaults/{keyvault-name}" + }, + "vaultCertificates": [ + { + "certificateUrl": "https://{keyvault-name}.vault.azure.net:443/secrets/ContosoCertificate/{secret-id}" + } + ] + } + ] + }, + "packageUrl": "{PackageUrl}", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "upgradeMode": "Auto" + } + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.KeyVault/vaults/{keyvault-name}" + }, + "vaultCertificates": [ + { + "certificateUrl": "https://{keyvault-name}.vault.azure.net:443/secrets/ContosoCertificate/{secret-id}" + } + ] + } + ] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Updating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "60b6cd59-600b-4e02-b717-521b07aa94bf", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + } + }, + "201": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.KeyVault/vaults/{keyvault-name}" + }, + "vaultCertificates": [ + { + "certificateUrl": "https://{keyvault-name}.vault.azure.net:443/secrets/ContosoCertificate/{secret-id}" + } + ] + } + ] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Creating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "60b6cd59-600b-4e02-b717-521b07aa94bf", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_CreateOrUpdate", + "title": "Create New Cloud Service with Single Role and Certificate from Key Vault" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndRdpExtension.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndRdpExtension.json new file mode 100644 index 0000000000..dcd12d1727 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndRdpExtension.json @@ -0,0 +1,211 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "extensionProfile": { + "extensions": [ + { + "name": "RDPExtension", + "properties": { + "type": "RDP", + "autoUpgradeMinorVersion": false, + "protectedSettings": "{password}", + "publisher": "Microsoft.Windows.Azure.Extensions", + "settings": "UserAzure10/22/2021 15:05:45", + "typeHandlerVersion": "1.2" + } + } + ] + }, + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "packageUrl": "{PackageUrl}", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "upgradeMode": "Auto" + } + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "extensionProfile": { + "extensions": [ + { + "name": "RDPExtension", + "properties": { + "type": "RDP", + "autoUpgradeMinorVersion": false, + "provisioningState": "Creating", + "publisher": "Microsoft.Windows.Azure.Extensions", + "rolesAppliedTo": [ + "*" + ], + "settings": "UserAzure10/22/2021 15:05:45", + "typeHandlerVersion": "1.2" + } + } + ] + }, + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Updating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "c948cccb-bbfa-4516-a250-c28abc4d0c15", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + } + }, + "201": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "extensionProfile": { + "extensions": [ + { + "name": "RDPExtension", + "properties": { + "type": "RDP", + "autoUpgradeMinorVersion": false, + "provisioningState": "Creating", + "publisher": "Microsoft.Windows.Azure.Extensions", + "rolesAppliedTo": [ + "*" + ], + "settings": "UserAzure10/22/2021 15:05:45", + "typeHandlerVersion": "1.2" + } + } + ] + }, + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Creating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "c948cccb-bbfa-4516-a250-c28abc4d0c15", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_CreateOrUpdate", + "title": "Create New Cloud Service with Single Role and RDP Extension" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Delete.json new file mode 100644 index 0000000000..f71f2dec03 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Delete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "CloudServices_Delete", + "title": "Delete Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_DeleteInstances.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_DeleteInstances.json new file mode 100644 index 0000000000..cf29b274bb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_DeleteInstances.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "roleInstances": [ + "ContosoFrontend_IN_0", + "ContosoBackend_IN_1" + ] + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_DeleteInstances", + "title": "Delete Cloud Service Role Instances in a Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Get.json new file mode 100644 index 0000000000..d154530c1b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Get.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "eastus2euap", + "properties": { + "configuration": "{ServiceConfiguration}", + "extensionProfile": { + "extensions": [ + { + "name": "RDPExtension", + "properties": { + "type": "RDP", + "autoUpgradeMinorVersion": false, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Windows.Azure.Extensions", + "rolesAppliedTo": [ + "*" + ], + "settings": "userazure01/12/2022 16:29:02", + "typeHandlerVersion": "1.2" + } + } + ] + }, + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "provisioningState": "Succeeded", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "4ccb4323-4740-4545-bb81-780b27375947", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + } + } + }, + "operationId": "CloudServices_Get", + "title": "Get Cloud Service with Multiple Roles and RDP Extension" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_GetInstanceView.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_GetInstanceView.json new file mode 100644 index 0000000000..7aed0fb2f2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_GetInstanceView.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "privateIds": [ + "3491bc0c-1f6c-444f-b1d0-ec0751a74e3e" + ], + "roleInstance": { + "statusesSummary": [ + { + "code": "ProvisioningState/succeeded", + "count": 4 + }, + { + "code": "PowerState/started", + "count": 4 + }, + { + "code": "RoleState/RoleStateStarted", + "count": 4 + } + ] + }, + "sdkVersion": "2.9.6496.3", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "time": "2021-01-12T16:50:07.0953535+05:30" + }, + { + "code": "PowerState/started", + "displayStatus": "Started", + "level": "Info", + "time": "2021-01-12T16:50:07.0953535+05:30" + }, + { + "code": "CurrentUpgradeDomain/-1", + "displayStatus": "Current Upgrade Domain of cloud service is -1.", + "level": "Info" + }, + { + "code": "MaxUpgradeDomain/1", + "displayStatus": "Max Upgrade Domain of cloud service is 1.", + "level": "Info" + } + ] + } + } + }, + "operationId": "CloudServices_GetInstanceView", + "title": "Get Cloud Service Instance View with Multiple Roles" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_List.json new file mode 100644 index 0000000000..e33ea17b0e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_List.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "eastus2euap", + "properties": { + "configuration": "{ServiceConfiguration}", + "extensionProfile": { + "extensions": [ + { + "name": "RDPExtension", + "properties": { + "type": "RDP", + "autoUpgradeMinorVersion": false, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Windows.Azure.Extensions", + "rolesAppliedTo": [ + "*" + ], + "settings": "userazure01/12/2022 16:29:02", + "typeHandlerVersion": "1.2" + } + } + ] + }, + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "provisioningState": "Succeeded", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "4ccb4323-4740-4545-bb81-780b27375947", + "upgradeMode": "Auto" + } + } + ] + } + } + }, + "operationId": "CloudServices_List", + "title": "List Cloud Services in a Resource Group" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_ListAll.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_ListAll.json new file mode 100644 index 0000000000..5797982fe7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_ListAll.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "eastus2euap", + "properties": { + "configuration": "{ServiceConfiguration}", + "extensionProfile": { + "extensions": [ + { + "name": "RDPExtension", + "properties": { + "type": "RDP", + "autoUpgradeMinorVersion": false, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Windows.Azure.Extensions", + "rolesAppliedTo": [ + "*" + ], + "settings": "userazure01/12/2022 16:29:02", + "typeHandlerVersion": "1.2" + } + } + ] + }, + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "provisioningState": "Succeeded", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "4ccb4323-4740-4545-bb81-780b27375947", + "upgradeMode": "Auto" + } + } + ] + } + } + }, + "operationId": "CloudServices_ListAll", + "title": "List Cloud Services in a Subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_PowerOff.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_PowerOff.json new file mode 100644 index 0000000000..a822a28d6e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_PowerOff.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_PowerOff", + "title": "Stop or PowerOff Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Rebuild.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Rebuild.json new file mode 100644 index 0000000000..6fd9ccb646 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Rebuild.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "roleInstances": [ + "ContosoFrontend_IN_0", + "ContosoBackend_IN_1" + ] + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_Rebuild", + "title": "Rebuild Cloud Service Role Instances in a Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Reimage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Reimage.json new file mode 100644 index 0000000000..990d336c8d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Reimage.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "roleInstances": [ + "ContosoFrontend_IN_0", + "ContosoBackend_IN_1" + ] + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_Reimage", + "title": "Reimage Cloud Service Role Instances in a Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Restart.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Restart.json new file mode 100644 index 0000000000..d917610d8a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Restart.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "roleInstances": [ + "ContosoFrontend_IN_0", + "ContosoBackend_IN_1" + ] + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_Restart", + "title": "Restart Cloud Service Role Instances in a Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Start.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Start.json new file mode 100644 index 0000000000..1bf7330ab5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Start.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_Start", + "title": "Start Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Update.json new file mode 100644 index 0000000000..d1d4a02ad1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Update.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "tags": { + "Documentation": "RestAPI" + } + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "eastus2euap", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "provisioningState": "Updating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "4ccb4323-4740-4545-bb81-780b27375947", + "upgradeMode": "Auto" + }, + "tags": { + "Documentation": "RestAPI" + } + } + } + }, + "operationId": "CloudServices_Update", + "title": "Update existing Cloud Service to add tags" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleries_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleries_Get.json new file mode 100644 index 0000000000..a9c1bb7e08 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleries_Get.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "location": "myLocation", + "publicGalleryName": "publicGalleryName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "publicGalleryName", + "type": "Microsoft.Compute/Locations/CommunityGallery", + "identifier": { + "uniqueId": "/CommunityGalleries/publicGalleryName" + }, + "location": "myLocation" + } + } + }, + "operationId": "CommunityGalleries_Get", + "title": "Get a community gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_Get.json new file mode 100644 index 0000000000..5160f6236c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_Get.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersionName": "myGalleryImageVersionName", + "location": "myLocation", + "publicGalleryName": "publicGalleryName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryImageVersionName", + "type": "Microsoft.Compute/Locations/CommunityGalleryImageVersion", + "identifier": { + "uniqueId": "/CommunityGalleries/publicGalleryName/Images/myGalleryImageName/Versions/myGalleryImageVersionName" + }, + "location": "myLocation", + "properties": { + "endOfLifeDate": "2022-03-20T09:12:28Z", + "excludeFromLatest": false, + "publishedDate": "2018-03-20T09:12:28Z", + "storageProfile": { + "osDiskImage": { + "diskSizeGB": 29, + "hostCaching": "None" + } + } + } + } + } + }, + "operationId": "CommunityGalleryImageVersions_Get", + "title": "Get a community gallery image version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_List.json new file mode 100644 index 0000000000..86f7c0d62f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_List.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "location": "myLocation", + "publicGalleryName": "publicGalleryName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscription-Id}/providers/Microsoft.Compute/communityGalleries/publicGalleryName/images/myGalleryImageName/versions?$skiptoken={token}/communityGalleries/publicGalleryName/images/myGalleryImageName/versions/myGalleryImageVersionName", + "value": [ + { + "name": "myGalleryImageVersionName", + "identifier": { + "uniqueId": "/CommunityGalleries/publicGalleryName/Images/myGalleryImageName/Versions/myGalleryImageVersionName" + }, + "location": "myLocation", + "properties": { + "endOfLifeDate": "2022-03-20T09:12:28Z", + "excludeFromLatest": false, + "publishedDate": "2018-03-20T09:12:28Z", + "storageProfile": { + "osDiskImage": { + "diskSizeGB": 29, + "hostCaching": "None" + } + } + } + } + ] + } + } + }, + "operationId": "CommunityGalleryImageVersions_List", + "title": "List community gallery image versions." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_Get.json new file mode 100644 index 0000000000..7b9d86cb4e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_Get.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "location": "myLocation", + "publicGalleryName": "publicGalleryName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryImageName", + "type": "Microsoft.Compute/Locations/CommunityGalleryImage", + "identifier": { + "uniqueId": "/CommunityGalleries/publicGalleryName/Images/myGalleryImageName" + }, + "location": "myLocation", + "properties": { + "eula": "https://www.microsoft.com/en-us/", + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "privacyStatementUri": "https://www.microsoft.com/en-us/" + } + } + } + }, + "operationId": "CommunityGalleryImages_Get", + "title": "Get a community gallery image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_List.json new file mode 100644 index 0000000000..6407b7fd55 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_List.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "location": "myLocation", + "publicGalleryName": "publicGalleryName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscription-Id}/providers/Microsoft.Compute/communityGalleries/publicGalleryName/images?$skiptoken={token}/communityGalleries/publicGalleryName/images/myGalleryImageName", + "value": [ + { + "name": "myGalleryImageName", + "identifier": { + "uniqueId": "/CommunityGalleries/publicGalleryName/Images/myGalleryImageName" + }, + "location": "myLocation", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows" + } + } + ] + } + } + }, + "operationId": "CommunityGalleryImages_List", + "title": "List community gallery images." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroup.json new file mode 100644 index 0000000000..125147ff9e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroup.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "myDedicatedHostGroup", + "parameters": { + "location": "westus", + "properties": { + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "department": "finance" + }, + "zones": [ + "1" + ] + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHostGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "department": "finance", + "owner": "myCompany" + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "myDedicatedHostGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "department": "finance" + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "DedicatedHostGroups_CreateOrUpdate", + "title": "Create or update a dedicated host group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroupWithUltraSsdSupport.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroupWithUltraSsdSupport.json new file mode 100644 index 0000000000..a885a1cce7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroupWithUltraSsdSupport.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "myDedicatedHostGroup", + "parameters": { + "location": "westus", + "properties": { + "additionalCapabilities": { + "ultraSSDEnabled": true + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "department": "finance" + }, + "zones": [ + "1" + ] + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHostGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "additionalCapabilities": { + "ultraSSDEnabled": true + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "department": "finance", + "owner": "myCompany" + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "myDedicatedHostGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "additionalCapabilities": { + "ultraSSDEnabled": true + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "department": "finance" + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "DedicatedHostGroups_CreateOrUpdate", + "title": "Create or update a dedicated host group with Ultra SSD support." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMaximumSetGen.json new file mode 100644 index 0000000000..050f761782 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMaximumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "a", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "DedicatedHostGroups_Delete", + "title": "DedicatedHostGroup_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMinimumSetGen.json new file mode 100644 index 0000000000..e1aa46c668 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMinimumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "DedicatedHostGroups_Delete", + "title": "DedicatedHostGroup_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateADedicatedHostGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateADedicatedHostGroup.json new file mode 100644 index 0000000000..d39c5db72c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateADedicatedHostGroup.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "expand": "instanceView", + "hostGroupName": "myDedicatedHostGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHostGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "hosts": [ + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/myDedicatedHostGroup/myHostGroup/Hosts/myHost1" + }, + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/myDedicatedHostGroup/myHostGroup/Hosts/myHost2" + } + ], + "instanceView": { + "hosts": [ + { + "name": "myHost1", + "assetId": "eb3f58b8-b4e8-4882-b69f-301a01812407", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 10, + "vmSize": "Standard_A1" + } + ] + }, + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info" + }, + { + "code": "HealthState/available", + "displayStatus": "Host available", + "level": "Info" + } + ] + }, + { + "name": "myHost2", + "assetId": "f293d4ac-5eea-4be2-b0c0-0fcaa09aebf8", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 10, + "vmSize": "Standard_A1" + } + ] + }, + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info" + }, + { + "code": "HealthState/available", + "displayStatus": "Host available", + "level": "Info" + } + ] + } + ] + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "{tagName}": "{tagValue}" + }, + "zones": [ + "3" + ] + } + } + }, + "operationId": "DedicatedHostGroups_Get", + "title": "Create a dedicated host group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateAnUltraSsdEnabledDedicatedHostGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateAnUltraSsdEnabledDedicatedHostGroup.json new file mode 100644 index 0000000000..8491a24b96 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateAnUltraSsdEnabledDedicatedHostGroup.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "expand": "instanceView", + "hostGroupName": "myDedicatedHostGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHostGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "additionalCapabilities": { + "ultraSSDEnabled": true + }, + "hosts": [ + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/myDedicatedHostGroup/myHostGroup/Hosts/myHost" + } + ], + "instanceView": { + "hosts": [ + { + "name": "myHost", + "assetId": "eb3f58b8-b4e8-4882-b69f-301a01812407", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 10, + "vmSize": "Standard_A1" + } + ] + }, + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info" + }, + { + "code": "HealthState/available", + "displayStatus": "Host available", + "level": "Info" + } + ] + } + ] + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "{tagName}": "{tagValue}" + }, + "zones": [ + "3" + ] + } + } + }, + "operationId": "DedicatedHostGroups_Get", + "title": "Create an ultraSSDEnabled dedicated host group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMaximumSetGen.json new file mode 100644 index 0000000000..a644eb3cd7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMaximumSetGen.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "myDedicatedHostGroup", + "type": "aaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "hosts": [ + { + "id": "aaaa" + } + ], + "instanceView": { + "hosts": [ + { + "name": "aaaaaaaaaaaaaaaaaa", + "assetId": "aaaa", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 26, + "vmSize": "aaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ] + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": {}, + "zones": [ + "1" + ] + } + ] + } + } + }, + "operationId": "DedicatedHostGroups_ListByResourceGroup", + "title": "DedicatedHostGroup_ListByResourceGroup_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMinimumSetGen.json new file mode 100644 index 0000000000..662b398ffe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMinimumSetGen.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus" + } + ] + } + } + }, + "operationId": "DedicatedHostGroups_ListByResourceGroup", + "title": "DedicatedHostGroup_ListByResourceGroup_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMaximumSetGen.json new file mode 100644 index 0000000000..164c5d58cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMaximumSetGen.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "myDedicatedHostGroup", + "type": "aaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "hosts": [ + { + "id": "aaaa" + } + ], + "instanceView": { + "hosts": [ + { + "name": "aaaaaaaaaaaaaaaaaa", + "assetId": "aaaa", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 26, + "vmSize": "aaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ] + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": {}, + "zones": [ + "1" + ] + } + ] + } + } + }, + "operationId": "DedicatedHostGroups_ListBySubscription", + "title": "DedicatedHostGroup_ListBySubscription_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMinimumSetGen.json new file mode 100644 index 0000000000..9ea60cd438 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus" + } + ] + } + } + }, + "operationId": "DedicatedHostGroups_ListBySubscription", + "title": "DedicatedHostGroup_ListBySubscription_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMaximumSetGen.json new file mode 100644 index 0000000000..577f6d6e9d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMaximumSetGen.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaa", + "parameters": { + "properties": { + "instanceView": { + "hosts": [ + { + "availableCapacity": { + "allocatableVMs": [ + { + "count": 26, + "vmSize": "aaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ] + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "key9921": "aaaaaaaaaa" + }, + "zones": [ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHostGroup", + "type": "aaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "hosts": [ + { + "id": "aaaa" + } + ], + "instanceView": { + "hosts": [ + { + "name": "aaaaaaaaaaaaaaaaaa", + "assetId": "aaaa", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 26, + "vmSize": "aaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ] + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": {}, + "zones": [ + "1" + ] + } + } + }, + "operationId": "DedicatedHostGroups_Update", + "title": "DedicatedHostGroup_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMinimumSetGen.json new file mode 100644 index 0000000000..7eaa226fb5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaaaaaaaaa", + "parameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "location": "westus" + } + } + }, + "operationId": "DedicatedHostGroups_Update", + "title": "DedicatedHostGroup_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_CreateOrUpdate.json new file mode 100644 index 0000000000..50d4403c40 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_CreateOrUpdate.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "myDedicatedHostGroup", + "hostName": "myDedicatedHost", + "parameters": { + "location": "westus", + "properties": { + "platformFaultDomain": 1 + }, + "sku": { + "name": "DSv3-Type1" + }, + "tags": { + "department": "HR" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHost", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myDedicatedHost", + "location": "westus", + "properties": { + "autoReplaceOnFailure": false, + "hostId": "{GUID}", + "licenseType": "Windows_Server_Hybrid", + "platformFaultDomain": 1 + }, + "sku": { + "name": "DSv3-Type1" + }, + "tags": { + "department": "HR" + } + } + }, + "201": { + "body": { + "name": "myDedicatedHost", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myDedicatedHost", + "location": "westus", + "properties": { + "autoReplaceOnFailure": true, + "hostId": "{GUID}", + "platformFaultDomain": 1 + }, + "sku": { + "name": "DSv3-Type1" + }, + "tags": { + "department": "HR" + } + } + } + }, + "operationId": "DedicatedHosts_CreateOrUpdate", + "title": "Create or update a dedicated host ." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMaximumSetGen.json new file mode 100644 index 0000000000..cdc70982da --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMaximumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaaaa", + "hostName": "aaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "DedicatedHosts_Delete", + "title": "DedicatedHost_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMinimumSetGen.json new file mode 100644 index 0000000000..55bdcf5c98 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaaaaaaaaaaaaa", + "hostName": "aaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "DedicatedHosts_Delete", + "title": "DedicatedHost_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Get.json new file mode 100644 index 0000000000..40ca2c0643 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Get.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "$expand": "instanceView", + "api-version": "2023-07-01", + "hostGroupName": "myDedicatedHostGroup", + "hostName": "myHost", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myHost", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myHost", + "location": "westus", + "properties": { + "autoReplaceOnFailure": true, + "hostId": "{GUID}", + "instanceView": { + "assetId": "eb3f58b8-b4e8-4882-b69f-301a01812407", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 10, + "vmSize": "Standard_A1" + } + ] + }, + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info" + }, + { + "code": "HealthState/available", + "displayStatus": "Host available", + "level": "Info" + } + ] + }, + "platformFaultDomain": 1, + "provisioningState": "Succeeded", + "provisioningTime": "2019-06-27T01:02:38.3138469+00:00", + "timeCreated": "2019-06-27T01:02:38.3138469+00:00", + "virtualMachines": [ + { + "id": "/subscriptions/subId/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/vm1" + } + ] + }, + "sku": { + "name": "DSv3-Type1" + }, + "tags": { + "department": "HR" + } + } + } + }, + "operationId": "DedicatedHosts_Get", + "title": "Get a dedicated host." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListAvailableSizes.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListAvailableSizes.json new file mode 100644 index 0000000000..7b6d147de6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListAvailableSizes.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "myDedicatedHostGroup", + "hostName": "myHost", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "value": [ + "Dsv3-Type1", + "Esv3-Type1" + ] + } + } + }, + "operationId": "DedicatedHosts_ListAvailableSizes", + "title": "Get Available Dedicated Host Sizes." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMaximumSetGen.json new file mode 100644 index 0000000000..e2613383c2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMaximumSetGen.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaaaa", + "value": [ + { + "name": "myDedicatedHost", + "type": "aaaaaaaaaaaaaaaaaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myDedicatedHost", + "location": "westus", + "properties": { + "autoReplaceOnFailure": true, + "hostId": "{GUID}", + "instanceView": { + "assetId": "aaaaaaaaaaaaaaaa", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 26, + "vmSize": "aaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + }, + "licenseType": "Windows_Server_Hybrid", + "platformFaultDomain": 1, + "provisioningState": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "provisioningTime": "2021-11-30T12:58:26.526Z", + "virtualMachines": [ + { + "id": "aaaa" + } + ] + }, + "sku": { + "name": "DSv3-Type1", + "capacity": 7, + "tier": "aaa" + }, + "tags": {} + } + ] + } + } + }, + "operationId": "DedicatedHosts_ListByHostGroup", + "title": "DedicatedHost_ListByHostGroup_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMinimumSetGen.json new file mode 100644 index 0000000000..51e5489c17 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myHost", + "location": "westus", + "sku": {} + } + ] + } + } + }, + "operationId": "DedicatedHosts_ListByHostGroup", + "title": "DedicatedHost_ListByHostGroup_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Restart.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Restart.json new file mode 100644 index 0000000000..6808fb913b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Restart.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "myDedicatedHostGroup", + "hostName": "myHost", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "description": "OK" + } + }, + "operationId": "DedicatedHosts_Restart", + "title": "Restart Dedicated Host." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMaximumSetGen.json new file mode 100644 index 0000000000..8652bbe294 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMaximumSetGen.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaaaaaaa", + "hostName": "aaaaaaaaaaaaaaaaaaaaa", + "parameters": { + "properties": { + "autoReplaceOnFailure": true, + "instanceView": { + "availableCapacity": { + "allocatableVMs": [ + { + "count": 26, + "vmSize": "aaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + }, + "licenseType": "Windows_Server_Hybrid", + "platformFaultDomain": 1 + }, + "tags": { + "key8813": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHost", + "type": "aaaaaaaaaaaaaaaaaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myDedicatedHost", + "location": "westus", + "properties": { + "autoReplaceOnFailure": true, + "hostId": "{GUID}", + "instanceView": { + "assetId": "aaaaaaaaaaaaaaaa", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 26, + "vmSize": "aaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + }, + "licenseType": "Windows_Server_Hybrid", + "platformFaultDomain": 1, + "provisioningState": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "provisioningTime": "2021-11-30T12:58:26.526Z", + "virtualMachines": [ + { + "id": "aaaa" + } + ] + }, + "sku": { + "name": "DSv3-Type1", + "capacity": 7, + "tier": "aaa" + }, + "tags": {} + } + } + }, + "operationId": "DedicatedHosts_Update", + "title": "DedicatedHost_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMinimumSetGen.json new file mode 100644 index 0000000000..5e7df53351 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aa", + "hostName": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "parameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "location": "westus", + "sku": {} + } + } + }, + "operationId": "DedicatedHosts_Update", + "title": "DedicatedHost_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateResize.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateResize.json new file mode 100644 index 0000000000..ba5d57b0de --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateResize.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaaaaaaa", + "hostName": "aaaaaaaaaaaaaaaaaaaaa", + "parameters": { + "sku": { + "name": "DSv3-Type1" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHost", + "type": "aaaaaaaaaaaaaaaaaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myDedicatedHost", + "location": "westus", + "properties": { + "autoReplaceOnFailure": true, + "hostId": "{GUID}", + "licenseType": "Windows_Server_Hybrid", + "platformFaultDomain": 1, + "provisioningState": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "provisioningTime": "2021-11-30T12:58:26.526Z", + "virtualMachines": [ + { + "id": "aaaa" + } + ] + }, + "sku": { + "name": "DSv3-Type1", + "capacity": 7, + "tier": "aaa" + }, + "tags": {} + } + } + }, + "operationId": "DedicatedHosts_Update", + "title": "DedicatedHost_Update_Resize" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_CreateOrUpdate.json new file mode 100644 index 0000000000..4ea504533b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_CreateOrUpdate.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccess": { + "location": "West US" + }, + "diskAccessName": "myDiskAccess", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourcegroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "timeCreated": "2020-05-01T04:41:35.079872+00:00" + } + } + }, + "202": { + "body": { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourcegroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "West US" + } + } + }, + "operationId": "DiskAccesses_CreateOrUpdate", + "title": "Create a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Delete.json new file mode 100644 index 0000000000..2eaeb464c3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Delete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + }, + "204": {} + }, + "operationId": "DiskAccesses_Delete", + "title": "Delete a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_DeleteAPrivateEndpointConnection.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_DeleteAPrivateEndpointConnection.json new file mode 100644 index 0000000000..4312a3629d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_DeleteAPrivateEndpointConnection.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "privateEndpointConnectionName": "myPrivateEndpointConnection", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + }, + "204": {} + }, + "operationId": "DiskAccesses_DeleteAPrivateEndpointConnection", + "title": "Delete a private endpoint connection under a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetAPrivateEndpointConnection.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetAPrivateEndpointConnection.json new file mode 100644 index 0000000000..24e1275532 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetAPrivateEndpointConnection.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "privateEndpointConnectionName": "myPrivateEndpointConnection", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myPrivateEndpointConnection", + "type": "Microsoft.Compute/diskAccesses/PrivateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess/privateEndpoinConnections/myPrivateEndpointConnection", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "DiskAccesses_GetAPrivateEndpointConnection", + "title": "Get information about a private endpoint connection under a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetPrivateLinkResources.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetPrivateLinkResources.json new file mode 100644 index 0000000000..52cf6879f0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetPrivateLinkResources.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "disks", + "type": "Microsoft.Compute/diskAccesses/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess/privateLinkResources/disks", + "properties": { + "groupId": "disks", + "requiredMembers": [ + "diskAccess_1" + ], + "requiredZoneNames": [ + "privatelink.blob.core.windows.net" + ] + } + } + ] + } + } + }, + "operationId": "DiskAccesses_GetPrivateLinkResources", + "title": "List all possible private link resources under disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResource.json new file mode 100644 index 0000000000..84c72434f9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResource.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "westus", + "properties": { + "provisioningState": "Succeeded", + "timeCreated": "2020-05-01T04:41:35.079872+00:00" + }, + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + } + } + }, + "operationId": "DiskAccesses_Get", + "title": "Get information about a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResourceWithPrivateEndpoints.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResourceWithPrivateEndpoints.json new file mode 100644 index 0000000000..eeecafaebd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResourceWithPrivateEndpoints.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "westus", + "properties": { + "privateEndpointConnections": [ + { + "name": "myDiskAccess.d4914cfa-6bc2-4049-a57c-3d1f622d8eef", + "type": "Microsoft.Compute/diskAccesses/PrivateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess/privateEndpoinConnections/myDiskAccess.d4914cfa-6bc2-4049-a57c-3d1f622d8eef", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ], + "provisioningState": "Succeeded", + "timeCreated": "2020-05-01T04:41:35.079872+00:00" + }, + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + } + } + }, + "operationId": "DiskAccesses_Get", + "title": "Get information about a disk access resource with private endpoints." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_List.json new file mode 100644 index 0000000000..374a60a552 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_List.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses?$skiptoken={token}", + "value": [ + { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "westus", + "properties": { + "provisioningState": "Succeeded", + "timeCreated": "2020-05-01T04:41:35.079872+00:00" + }, + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + }, + { + "name": "myDiskAccess2", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/mySecondResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess2", + "location": "westus", + "properties": { + "privateEndpointConnections": [ + { + "name": "myDiskAccess.d4914cfa-6bc2-4049-a57c-3d1f622d8eef", + "type": "Microsoft.Compute/diskAccesses/PrivateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/mySecondResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess2/privateEndpoinConnections/myDiskAccess2.d4914cfa-6bc2-4049-a57c-3d1f622d8eef", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/mySecondResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint2" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ], + "provisioningState": "Succeeded", + "timeCreated": "2020-05-01T04:41:35.079872+00:00" + }, + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + } + ] + } + } + }, + "operationId": "DiskAccesses_List", + "title": "List all disk access resources in a subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListByResourceGroup.json new file mode 100644 index 0000000000..cf7ad5a039 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListByResourceGroup.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses?$skiptoken={token}", + "value": [ + { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "westus", + "properties": { + "provisioningState": "Succeeded", + "timeCreated": "2020-05-01T04:41:35.079872+00:00" + }, + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + }, + { + "name": "myDiskAccess2", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess2", + "location": "westus", + "properties": { + "privateEndpointConnections": [ + { + "name": "myDiskAccess.d4914cfa-6bc2-4049-a57c-3d1f622d8eef", + "type": "Microsoft.Compute/diskAccesses/PrivateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess2/privateEndpoinConnections/myDiskAccess2.d4914cfa-6bc2-4049-a57c-3d1f622d8eef", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint2" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ], + "provisioningState": "Succeeded", + "timeCreated": "2020-05-01T04:41:35.079872+00:00" + }, + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + } + ] + } + } + }, + "operationId": "DiskAccesses_ListByResourceGroup", + "title": "List all disk access resources in a resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListPrivateEndpointConnections.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListPrivateEndpointConnections.json new file mode 100644 index 0000000000..823e8f0394 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListPrivateEndpointConnections.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "myPrivateEndpointConnection", + "type": "Microsoft.Compute/diskAccesses/PrivateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess/privateEndpoinConnections/myPrivateEndpointConnection", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "DiskAccesses_ListPrivateEndpointConnections", + "title": "Get information about a private endpoint connection under a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Update.json new file mode 100644 index 0000000000..94985020b1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Update.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccess": { + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + }, + "diskAccessName": "myDiskAccess", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourcegroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "West US", + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + } + }, + "202": { + "body": { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourcegroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "West US", + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess?api-version=2021-04-01" + } + } + }, + "operationId": "DiskAccesses_Update", + "title": "Update a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_UpdateAPrivateEndpointConnection.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_UpdateAPrivateEndpointConnection.json new file mode 100644 index 0000000000..aad18848a6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_UpdateAPrivateEndpointConnection.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "privateEndpointConnection": { + "properties": { + "privateLinkServiceConnectionState": { + "description": "Approving myPrivateEndpointConnection", + "status": "Approved" + } + } + }, + "privateEndpointConnectionName": "myPrivateEndpointConnection", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myPrivateEndpointConnectionName", + "type": "Microsoft.Compute/diskAccesses/PrivateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess/privateEndpoinConnections/myPrivateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint" + }, + "privateLinkServiceConnectionState": { + "description": "Approving myPrivateEndpointConnection", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myPrivateEndpointConenction", + "type": "Microsoft.Compute/diskAccesses/privateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess/privateEndpoinConnections/myPrivateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint" + }, + "privateLinkServiceConnectionState": { + "description": "Approving myPrivateEndpointConnection", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "DiskAccesses_UpdateAPrivateEndpointConnection", + "title": "Approve a Private Endpoint Connection under a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSet.json new file mode 100644 index 0000000000..3adce78ee5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSet.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSet": { + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey" + } + }, + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [] + } + } + }, + "202": { + "body": { + "name": "myDiskEncryptionSet", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [] + } + } + } + }, + "operationId": "DiskEncryptionSets_CreateOrUpdate", + "title": "Create a disk encryption set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentSubscription.json new file mode 100644 index 0000000000..ddf6ab541d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentSubscription.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSet": { + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/{key}" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey" + } + }, + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/{key}" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [] + } + } + }, + "202": { + "body": { + "name": "myDiskEncryptionSet", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/{key}" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [] + } + } + } + }, + "operationId": "DiskEncryptionSets_CreateOrUpdate", + "title": "Create a disk encryption set with key vault from a different subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentTenant.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentTenant.json new file mode 100644 index 0000000000..b2c7f7e6f2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentTenant.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSet": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}": {} + } + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferenttenant.vault-int.azure-int.net/keys/{key}" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "federatedClientId": "00000000-0000-0000-0000-000000000000" + } + }, + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}": {} + } + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferenttenant.vault-int.azure-int.net/keys/{key}" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "federatedClientId": "00000000-0000-0000-0000-000000000000", + "previousKeys": [] + } + } + }, + "202": { + "body": { + "name": "myDiskEncryptionSet", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}": {} + } + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferenttenant.vault-int.azure-int.net/keys/{key}" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "federatedClientId": "00000000-0000-0000-0000-000000000000", + "previousKeys": [] + } + } + } + }, + "operationId": "DiskEncryptionSets_CreateOrUpdate", + "title": "Create a disk encryption set with key vault from a different tenant." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Delete.json new file mode 100644 index 0000000000..74d51b09b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Delete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + }, + "204": {} + }, + "operationId": "DiskEncryptionSets_Delete", + "title": "Delete a disk encryption set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSet.json new file mode 100644 index 0000000000..c561a91fd5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSet.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "westus", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [], + "provisioningState": "Succeeded" + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + } + } + }, + "operationId": "DiskEncryptionSets_Get", + "title": "Get information about a disk encryption set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSetWhenAutoKeyRotationFailed.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSetWhenAutoKeyRotationFailed.json new file mode 100644 index 0000000000..617a5be6d1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSetWhenAutoKeyRotationFailed.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "westus", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "autoKeyRotationError": { + "code": "ManagedServiceIdentityNotFound", + "message": "Auto-key rotation was disabled as managed service identity associated with DiskEncryptionSet 'myDiskEncryptionSet' was not found. Please update the resource with correct identity to re-enable auto-key rotation." + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [], + "provisioningState": "Succeeded", + "rotationToLatestKeyVersionEnabled": true + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + } + } + }, + "operationId": "DiskEncryptionSets_Get", + "title": "Get information about a disk encryption set when auto-key rotation failed." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_List.json new file mode 100644 index 0000000000..ae2fb3ff89 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_List.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskEncryptionSets?$skiptoken={token}", + "value": [ + { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "westus", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [], + "provisioningState": "Succeeded" + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + }, + { + "name": "myDiskEncryptionSet2", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/mySecondResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet2", + "identity": { + "type": "SystemAssigned" + }, + "location": "westus", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/mySecondResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault2" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [], + "provisioningState": "Succeeded" + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + } + ] + } + } + }, + "operationId": "DiskEncryptionSets_List", + "title": "List all disk encryption sets in a subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListAssociatedResources.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListAssociatedResources.json new file mode 100644 index 0000000000..98a72a00cb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListAssociatedResources.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}/associatedResources?$skiptoken={token}", + "value": [ + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk", + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + ] + } + } + }, + "operationId": "DiskEncryptionSets_ListAssociatedResources", + "title": "List all resources that are encrypted with this disk encryption set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListByResourceGroup.json new file mode 100644 index 0000000000..90a9d784ef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListByResourceGroup.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskEncryptionSets?$skiptoken={token}", + "value": [ + { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "westus", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [], + "provisioningState": "Succeeded" + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + }, + { + "name": "myDiskEncryptionSet2", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet2", + "identity": { + "type": "SystemAssigned" + }, + "location": "westus", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault2" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [], + "provisioningState": "Succeeded" + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + } + ] + } + } + }, + "operationId": "DiskEncryptionSets_ListByResourceGroup", + "title": "List all disk encryption sets in a resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSet.json new file mode 100644 index 0000000000..98e9626e74 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSet.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSet": { + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/keyName/keyVersion", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey" + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + }, + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/keyName/keyVersion", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "lastKeyRotationTimestamp": "2021-04-01T04:41:35.079872+00:00", + "previousKeys": [] + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + } + }, + "202": { + "body": { + "name": "myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/keyName/keyVersion", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [] + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet?api-version=2021-04-01" + } + } + }, + "operationId": "DiskEncryptionSets_Update", + "title": "Update a disk encryption set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueSucceeded.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueSucceeded.json new file mode 100644 index 0000000000..9d7372ecf7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueSucceeded.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSet": { + "identity": { + "type": "SystemAssigned" + }, + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/keyVersion1" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "rotationToLatestKeyVersionEnabled": true + } + }, + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/KeyVersion2" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "lastKeyRotationTimestamp": "2021-04-01T04:41:35.079872+00:00", + "provisioningState": "Succeeded", + "rotationToLatestKeyVersionEnabled": true + } + } + }, + "202": { + "body": { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/keyVersion1" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [] + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet?api-version=2021-04-01" + } + } + }, + "operationId": "DiskEncryptionSets_Update", + "title": "Update a disk encryption set with rotationToLatestKeyVersionEnabled set to true - Succeeded" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueUpdating.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueUpdating.json new file mode 100644 index 0000000000..b284f35cae --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueUpdating.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSet": { + "identity": { + "type": "SystemAssigned" + }, + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/keyVersion1" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "rotationToLatestKeyVersionEnabled": true + } + }, + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/keyVersion2" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "lastKeyRotationTimestamp": "2021-04-01T04:41:35.079872+00:00", + "previousKeys": [ + { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/keyVersion1" + } + ], + "provisioningState": "Updating", + "rotationToLatestKeyVersionEnabled": true + } + } + }, + "202": { + "body": { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/keyVersion1" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [] + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet?api-version=2021-04-01" + } + } + }, + "operationId": "DiskEncryptionSets_Update", + "title": "Update a disk encryption set with rotationToLatestKeyVersionEnabled set to true - Updating" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointResource.json new file mode 100644 index 0000000000..cb701c24f7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointResource.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskRestorePointName": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpc", + "subscriptionId": "{subscription-id}", + "vmRestorePointName": "vmrp" + }, + "responses": { + "200": { + "body": { + "name": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpc/restorePoints/vmrp/diskRestorePoints/TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "properties": { + "familyId": "996bf3ce-b6ff-4e86-9db6-dc27ea06cea5", + "hyperVGeneration": "V1", + "networkAccessPolicy": "AllowAll", + "osType": "Windows", + "publicNetworkAccess": "Disabled", + "sourceResourceId": "/subscriptions/d2260d06-e00d-422f-8b63-93df551a59ae/resourceGroups/rg0680fb0c-89f1-41b4-96c0-35733a181558/providers/Microsoft.Compute/disks/TestDisk45ceb03433006d1baee0", + "sourceUniqueId": "48e058b1-7eea-4968-b532-10a8a1130c13", + "timeCreated": "2020-09-16T04:41:35.079872+00:00" + } + } + } + }, + "operationId": "DiskRestorePoint_Get", + "title": "Get an incremental disk restorePoint resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointWhenSourceResourceIsFromADifferentRegion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointWhenSourceResourceIsFromADifferentRegion.json new file mode 100644 index 0000000000..575b6a5d64 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointWhenSourceResourceIsFromADifferentRegion.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskRestorePointName": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpc", + "subscriptionId": "{subscription-id}", + "vmRestorePointName": "vmrp" + }, + "responses": { + "200": { + "body": { + "name": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpc/restorePoints/vmrp/diskRestorePoints/TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "properties": { + "completionPercent": 100, + "familyId": "996bf3ce-b6ff-4e86-9db6-dc27ea06cea5", + "hyperVGeneration": "V1", + "networkAccessPolicy": "AllowAll", + "osType": "Windows", + "publicNetworkAccess": "Disabled", + "replicationState": "Succeeded", + "sourceResourceId": "/subscriptions/d2260d06-e00d-422f-8b63-93df551a59ae/resourceGroups/rg0680fb0c-89f1-41b4-96c0-35733a181558/providers/Microsoft.Compute/disks/TestDisk45ceb03433006d1baee0", + "sourceResourceLocation": "eastus2", + "sourceUniqueId": "48e058b1-7eea-4968-b532-10a8a1130c13", + "timeCreated": "2020-09-16T04:41:35.079872+00:00" + } + } + } + }, + "operationId": "DiskRestorePoint_Get", + "title": "Get an incremental disk restorePoint when source resource is from a different region" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_GrantAccess.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_GrantAccess.json new file mode 100644 index 0000000000..3d51f32bb8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_GrantAccess.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskRestorePointName": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "grantAccessData": { + "access": "Read", + "durationInSeconds": 300, + "fileFormat": "VHDX" + }, + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpc", + "subscriptionId": "{subscription-id}", + "vmRestorePointName": "vmrp" + }, + "responses": { + "200": { + "body": { + "accessSAS": "https://md-gpvmcxzlzxgd.partition.blob.storage.azure.net/xx3cqcx53f0v/abcd?sv=2014-02-14&sr=b&sk=key1&sig=XXX&st=2021-05-24T18:02:34Z&se=2021-05-24T18:19:14Z&sp=r" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + } + }, + "operationId": "DiskRestorePoint_GrantAccess", + "title": "Grants access to a diskRestorePoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_ListByRestorePoint.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_ListByRestorePoint.json new file mode 100644 index 0000000000..7163599ed0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_ListByRestorePoint.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpc", + "subscriptionId": "{subscription-id}", + "vmRestorePointName": "vmrp" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpc/restorePoints/vmrp/diskRestorePoints/TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "properties": { + "familyId": "996bf3ce-b6ff-4e86-9db6-dc27ea06cea5", + "hyperVGeneration": "V1", + "networkAccessPolicy": "AllowAll", + "osType": "Windows", + "publicNetworkAccess": "Disabled", + "sourceResourceId": "/subscriptions/d2260d06-e00d-422f-8b63-93df551a59ae/resourceGroups/rg0680fb0c-89f1-41b4-96c0-35733a181558/providers/Microsoft.Compute/disks/TestDisk45ceb03433006d1baee0", + "sourceUniqueId": "48e058b1-7eea-4968-b532-10a8a1130c13", + "timeCreated": "2020-09-16T04:41:35.079872+00:00" + } + } + ] + } + } + }, + "operationId": "DiskRestorePoint_ListByRestorePoint", + "title": "Get an incremental disk restorePoint resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_RevokeAccess.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_RevokeAccess.json new file mode 100644 index 0000000000..5e505a0bdf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_RevokeAccess.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskRestorePointName": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpc", + "subscriptionId": "{subscription-id}", + "vmRestorePointName": "vmrp" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + } + }, + "operationId": "DiskRestorePoint_RevokeAccess", + "title": "Revokes access to a diskRestorePoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAConfidentialVmSupportedDiskEncryptedWithCustomerManagedKey.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAConfidentialVmSupportedDiskEncryptedWithCustomerManagedKey.json new file mode 100644 index 0000000000..944063ee34 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAConfidentialVmSupportedDiskEncryptedWithCustomerManagedKey.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0" + } + }, + "osType": "Windows", + "securityProfile": { + "secureVMDiskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", + "securityType": "ConfidentialVM_DiskEncryptedWithCustomerKey" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0" + } + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "securityProfile": { + "secureVMDiskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", + "securityType": "ConfidentialVM_DiskEncryptedWithCustomerKey" + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0" + } + }, + "osType": "Windows", + "provisioningState": "Updating", + "securityProfile": { + "secureVMDiskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", + "securityType": "ConfidentialVM_DiskEncryptedWithCustomerKey" + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a confidential VM supported disk encrypted with customer managed key" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskAccessResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskAccessResource.json new file mode 100644 index 0000000000..1b7f8a7746 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskAccessResource.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskAccessId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/{existing-diskAccess-name}", + "diskSizeGB": 200, + "networkAccessPolicy": "AllowPrivate" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskAccessId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/{existing-diskAccess-name}", + "diskSizeGB": 200, + "networkAccessPolicy": "AllowPrivate", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk and associate with disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskEncryptionSet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskEncryptionSet.json new file mode 100644 index 0000000000..1c3626cf7d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskEncryptionSet.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "encryption": { + "diskEncryptionSetId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "encryption": { + "diskEncryptionSetId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk and associate with disk encryption set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByCopyingASnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByCopyingASnapshot.json new file mode 100644 index 0000000000..e3529f77f4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByCopyingASnapshot.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk by copying a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromADifferentSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromADifferentSubscription.json new file mode 100644 index 0000000000..0580cf3c0e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromADifferentSubscription.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk by importing an unmanaged blob from a different subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromTheSameSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromTheSameSubscription.json new file mode 100644 index 0000000000..4dd4792137 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromTheSameSubscription.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk by importing an unmanaged blob from the same subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAPlatformImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAPlatformImage.json new file mode 100644 index 0000000000..14565636c4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAPlatformImage.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0" + } + }, + "osType": "Windows" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "purchasePlan": { + "name": "{sku}", + "product": "{offer}", + "publisher": "{publisher}" + }, + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "purchasePlan": { + "name": "{sku}", + "product": "{offer}", + "publisher": "{publisher}" + }, + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from a platform image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryCommunityImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryCommunityImage.json new file mode 100644 index 0000000000..b283d6566a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryCommunityImage.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "communityGalleryImageId": "/CommunityGalleries/{communityGalleryPublicGalleryName}/Images/{imageName}/Versions/1.0.0" + } + }, + "osType": "Windows" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "communityGalleryImageId": "/CommunityGalleries/{communityGalleryPublicGalleryName}/Images/{imageName}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "communityGalleryImageId": "/CommunityGalleries/{communityGalleryPublicGalleryName}/Images/{imageName}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from an Azure Compute Gallery community image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryDirectSharedImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryDirectSharedImage.json new file mode 100644 index 0000000000..6462a9c9bb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryDirectSharedImage.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "sharedGalleryImageId": "/SharedGalleries/{sharedGalleryUniqueName}/Images/{imageName}/Versions/1.0.0" + } + }, + "osType": "Windows" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "sharedGalleryImageId": "/SharedGalleries/{sharedGalleryUniqueName}/Images/{imageName}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "sharedGalleryImageId": "/SharedGalleries/{sharedGalleryUniqueName}/Images/{imageName}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from an Azure Compute Gallery direct shared image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryImage.json new file mode 100644 index 0000000000..a18fca6ec1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryImage.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "id": "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Providers/Microsoft.Compute/Galleries/{galleryName}/Images/{imageName}/Versions/1.0.0" + } + }, + "osType": "Windows" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "id": "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Providers/Microsoft.Compute/Galleries/{galleryName}/Images/{imageName}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "id": "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Providers/Microsoft.Compute/Galleries/{galleryName}/Images/{imageName}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from an Azure Compute Gallery image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnExistingManagedDiskInTheSameOrDifferentSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnExistingManagedDiskInTheSameOrDifferentSubscription.json new file mode 100644 index 0000000000..4154763887 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnExistingManagedDiskInTheSameOrDifferentSubscription.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1" + } + } + }, + "diskName": "myDisk2", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk2", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk2", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from an existing managed disk in the same or different subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromElasticSanVolumeSnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromElasticSanVolumeSnapshot.json new file mode 100644 index 0000000000..eade2487b6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromElasticSanVolumeSnapshot.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyFromSanSnapshot", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyFromSanSnapshot", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot" + }, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyFromSanSnapshot", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from elastic san volume snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromImportSecureCreateOption.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromImportSecureCreateOption.json new file mode 100644 index 0000000000..c3bb0f701f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromImportSecureCreateOption.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "ImportSecure", + "securityDataUri": "https://mystorageaccount.blob.core.windows.net/osimages/vmgs.vhd", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "osType": "Windows", + "securityProfile": { + "securityType": "ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "ImportSecure", + "securityDataUri": "https://mystorageaccount.blob.core.windows.net/osimages/vmgs.vhd", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "securityProfile": { + "securityType": "ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey" + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "ImportSecure", + "securityDataUri": "https://mystorageaccount.blob.core.windows.net/osimages/vmgs.vhd", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "osType": "Windows", + "provisioningState": "Updating", + "securityProfile": { + "securityType": "ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey" + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from ImportSecure create option" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromUploadPreparedSecureCreateOption.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromUploadPreparedSecureCreateOption.json new file mode 100644 index 0000000000..7fc1824b1a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromUploadPreparedSecureCreateOption.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "UploadPreparedSecure", + "uploadSizeBytes": 10737418752 + }, + "osType": "Windows", + "securityProfile": { + "securityType": "TrustedLaunch" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "UploadPreparedSecure", + "uploadSizeBytes": 10737418752 + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "securityProfile": { + "securityType": "TrustedLaunch" + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "UploadPreparedSecure", + "uploadSizeBytes": 10737418752 + }, + "osType": "Windows", + "provisioningState": "Updating", + "securityProfile": { + "securityType": "TrustedLaunch" + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from UploadPreparedSecure create option" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithDataAccessAuthMode.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithDataAccessAuthMode.json new file mode 100644 index 0000000000..47cf7d0512 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithDataAccessAuthMode.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "dataAccessAuthMode": "AzureActiveDirectory", + "diskSizeGB": 200 + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "dataAccessAuthMode": "AzureActiveDirectory", + "diskSizeGB": 200, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk with dataAccessAuthMode" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithOptimizedForFrequentAttach.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithOptimizedForFrequentAttach.json new file mode 100644 index 0000000000..06671ff1c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithOptimizedForFrequentAttach.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "optimizedForFrequentAttach": true + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "optimizedForFrequentAttach": true, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "optimizedForFrequentAttach": true, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk with optimizedForFrequentAttach." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPerformancePlus.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPerformancePlus.json new file mode 100644 index 0000000000..9c269a6d5e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPerformancePlus.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Upload", + "performancePlus": true + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Upload", + "performancePlus": true + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Upload", + "performancePlus": true + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk with performancePlus." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPremiumV2AccountType.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPremiumV2AccountType.json new file mode 100644 index 0000000000..ae5b5719de --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPremiumV2AccountType.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskIOPSReadWrite": 125, + "diskMBpsReadWrite": 3000, + "diskSizeGB": 200 + }, + "sku": { + "name": "PremiumV2_LRS" + } + }, + "diskName": "myPremiumV2Disk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myPremiumV2Disk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + }, + "sku": { + "name": "PremiumV2_LRS", + "tier": "Premium" + } + } + }, + "202": { + "body": { + "name": "myPremiumV2Disk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + }, + "sku": { + "name": "PremiumV2_LRS", + "tier": "Premium" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk with premium v2 account type." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSecurityProfile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSecurityProfile.json new file mode 100644 index 0000000000..63d003b932 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSecurityProfile.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "North Central US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/uswest/Publishers/Microsoft/ArtifactTypes/VMImage/Offers/{offer}" + } + }, + "osType": "Windows", + "securityProfile": { + "securityType": "TrustedLaunch" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "North Central US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/uswest/Publishers/Microsoft/ArtifactTypes/VMImage/Offers/{offer}" + } + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "securityProfile": { + "securityType": "TrustedLaunch" + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "North Central US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/uswest/Publishers/Microsoft/ArtifactTypes/VMImage/Offers/{offer}" + } + }, + "osType": "Windows", + "provisioningState": "Updating", + "securityProfile": { + "securityType": "TrustedLaunch" + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk with security profile" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSsdZrsAccountType.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSsdZrsAccountType.json new file mode 100644 index 0000000000..3090b3ea1e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSsdZrsAccountType.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200 + }, + "sku": { + "name": "Premium_ZRS" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + }, + "sku": { + "name": "Premium_ZRS", + "tier": "Premium" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + }, + "sku": { + "name": "Premium_ZRS", + "tier": "Premium" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk with ssd zrs account type." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithUltraAccountTypeWithReadOnlyPropertySet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithUltraAccountTypeWithReadOnlyPropertySet.json new file mode 100644 index 0000000000..887b8ed892 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithUltraAccountTypeWithReadOnlyPropertySet.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty", + "logicalSectorSize": 4096 + }, + "diskIOPSReadWrite": 125, + "diskMBpsReadWrite": 3000, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + } + }, + "sku": { + "name": "UltraSSD_LRS" + } + }, + "diskName": "myUltraReadOnlyDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myUltraReadOnlyDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "provisioningState": "Updating" + }, + "sku": { + "name": "UltraSSD_LRS", + "tier": "Ultra" + } + } + }, + "202": { + "body": { + "name": "myUltraReadOnlyDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + }, + "sku": { + "name": "UltraSSD_LRS", + "tier": "Ultra" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk with ultra account type with readOnly property set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedUploadDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedUploadDisk.json new file mode 100644 index 0000000000..5f73d251fe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedUploadDisk.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Upload", + "uploadSizeBytes": 10737418752 + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Upload", + "uploadSizeBytes": 10737418752 + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Upload", + "uploadSizeBytes": 10737418752 + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed upload disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDisk.json new file mode 100644 index 0000000000..a43182ccac --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDisk.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200 + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create an empty managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDiskInExtendedLocation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDiskInExtendedLocation.json new file mode 100644 index 0000000000..1895970f3b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDiskInExtendedLocation.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "extendedLocation": { + "name": "{edge-zone-id}", + "type": "EdgeZone" + }, + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200 + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "extendedLocation": { + "name": "{edge-zone-id}", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "extendedLocation": { + "name": "{edge-zone-id}", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create an empty managed disk in extended location." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnUltraManagedDiskWithLogicalSectorSize_512E.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnUltraManagedDiskWithLogicalSectorSize_512E.json new file mode 100644 index 0000000000..b06d88f594 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnUltraManagedDiskWithLogicalSectorSize_512E.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty", + "logicalSectorSize": 512 + }, + "diskSizeGB": 200 + }, + "sku": { + "name": "UltraSSD_LRS" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty", + "logicalSectorSize": 512 + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + }, + "sku": { + "name": "UltraSSD_LRS", + "tier": "Ultra" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty", + "logicalSectorSize": 512 + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + }, + "sku": { + "name": "UltraSSD_LRS", + "tier": "Ultra" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create an ultra managed disk with logicalSectorSize 512E" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Delete.json new file mode 100644 index 0000000000..4bee09d130 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Delete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + }, + "204": {} + }, + "operationId": "Disks_Delete", + "title": "Delete a managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Get.json new file mode 100644 index 0000000000..e264a816e3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Get.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskName": "myManagedDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myManagedDisk", + "type": "Microsoft.Compute/disks", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk", + "location": "westus", + "managedBy": "/subscriptions/123caaa-123v-v211-a49f-f88ccac5bf88/resourceGroups/ResourceGroupName/providers/Microsoft.Compute/virtualMachines/TestVM414689371c88843d65ec", + "properties": { + "LastOwnershipUpdateTime": "2016-12-28T04:41:35.079872+00:00", + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 10, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "purchasePlan": { + "name": "test_sku", + "product": "marketplace_vm_test", + "publisher": "test_test_pmc2pc1" + }, + "securityProfile": { + "securityType": "TrustedLaunch" + }, + "supportedCapabilities": { + "acceleratedNetwork": true + }, + "supportsHibernation": true, + "timeCreated": "2016-12-28T04:41:35.079872+00:00" + }, + "sku": { + "name": "Standard_LRS" + }, + "tags": { + "department": "Development", + "project": "ManagedDisks" + } + } + } + }, + "operationId": "Disks_Get", + "title": "Get information about a managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetASasOnAManagedDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetASasOnAManagedDisk.json new file mode 100644 index 0000000000..89093228c5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetASasOnAManagedDisk.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskName": "myDisk", + "grantAccessData": { + "access": "Read", + "durationInSeconds": 300, + "fileFormat": "VHD" + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "accessSAS": "https://md-gpvmcxzlzxgd.partition.blob.storage.azure.net/xx3cqcx53f0v/abcd?sv=2014-02-14&sr=b&sk=key1&sig=XXX&st=2021-05-24T18:02:34Z&se=2021-05-24T18:19:14Z&sp=r" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + } + }, + "operationId": "Disks_GrantAccess", + "title": "Get a sas on a managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetSasOnManagedDiskAndVmGuestState.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetSasOnManagedDiskAndVmGuestState.json new file mode 100644 index 0000000000..aaef7390c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetSasOnManagedDiskAndVmGuestState.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskName": "myDisk", + "grantAccessData": { + "access": "Read", + "durationInSeconds": 300, + "getSecureVMGuestStateSAS": true + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "accessSAS": "https://md-gpvmcxzlzxgd.partition.blob.storage.azure.net/xx3cqcx53f0v/abcd?sv=2014-02-14&sr=b&sk=key1&sig=XXX&st=2021-05-24T18:02:34Z&se=2021-05-24T18:19:14Z&sp=r", + "securityDataAccessSAS": "https://md-gpvmcxzlzxgd.partition.blob.storage.azure.net/xx3cqcx53f0v/b9bf5824-6122-49e0-ba22-042f76ccd8a1_vmgs?sv=2014-02-14&sr=b&sk=key1&sig=XXX&st=2021-05-24T18:02:34Z&se=2021-05-24T18:19:14Z&sp=r" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + } + }, + "operationId": "Disks_GrantAccess", + "title": "Get sas on managed disk and VM guest state" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_List.json new file mode 100644 index 0000000000..b433b07100 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_List.json @@ -0,0 +1,121 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://disksvchost:99/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/Disks/myManagedDisk", + "value": [ + { + "name": "myManagedDisk1", + "type": "Microsoft.Compute/disks", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1" + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:41:35.9278721+00:00" + }, + "tags": { + "department": "Development", + "project": "ManagedDisks" + } + }, + { + "name": "myManagedDisk2", + "type": "Microsoft.Compute/disks", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 10, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:41:36.872242+00:00" + } + }, + { + "name": "myManagedDisk3", + "type": "Microsoft.Compute/disks", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk3", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/uswest/Publishers/Microsoft/ArtifactTypes/VMImage/Offers/{offer}" + } + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:41:36.3973934+00:00" + }, + "tags": { + "department": "Development", + "project": "ManagedDisks" + } + } + ] + } + } + }, + "operationId": "Disks_List", + "title": "List all managed disks in a subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_ListByResourceGroup.json new file mode 100644 index 0000000000..254320b196 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_ListByResourceGroup.json @@ -0,0 +1,122 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://disksvchost:99/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/Disks/myManagedDisk", + "value": [ + { + "name": "myManagedDisk1", + "type": "Microsoft.Compute/disks", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:41:35.9278721+00:00" + }, + "tags": { + "department": "Development", + "project": "ManagedDisks" + } + }, + { + "name": "myManagedDisk2", + "type": "Microsoft.Compute/disks", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 10, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:41:36.872242+00:00" + } + }, + { + "name": "myManagedDisk3", + "type": "Microsoft.Compute/disks", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/uswest/Publishers/Microsoft/ArtifactTypes/VMImage/Offers/{offer}" + } + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:41:36.3973934+00:00" + }, + "tags": { + "department": "Development", + "project": "ManagedDisks" + } + } + ] + } + } + }, + "operationId": "Disks_ListByResourceGroup", + "title": "List all managed disks in a resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_RevokeAccess.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_RevokeAccess.json new file mode 100644 index 0000000000..df191dfc39 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_RevokeAccess.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + } + }, + "operationId": "Disks_RevokeAccess", + "title": "Revoke access to a managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_CreateOrUpdateABurstingEnabledManagedDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_CreateOrUpdateABurstingEnabledManagedDisk.json new file mode 100644 index 0000000000..b2b2cd3637 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_CreateOrUpdateABurstingEnabledManagedDisk.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "burstingEnabled": true, + "diskSizeGB": 1024 + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "burstingEnabled": true, + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 1024, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 1024, + "provisioningState": "Updating" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Create or update a bursting enabled managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddAcceleratedNetworking.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddAcceleratedNetworking.json new file mode 100644 index 0000000000..21e31b2be3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddAcceleratedNetworking.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "supportedCapabilities": { + "acceleratedNetwork": false + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "supportedCapabilities": { + "acceleratedNetwork": false + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "supportedCapabilities": { + "acceleratedNetwork": false + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk to add accelerated networking." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddArchitecture.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddArchitecture.json new file mode 100644 index 0000000000..6ae1fc40cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddArchitecture.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "supportedCapabilities": { + "architecture": "Arm64" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "supportedCapabilities": { + "architecture": "Arm64" + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "supportedCapabilities": { + "architecture": "Arm64" + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-12-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk to add architecture." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddPurchasePlan.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddPurchasePlan.json new file mode 100644 index 0000000000..2b5981fe03 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddPurchasePlan.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "purchasePlan": { + "name": "myPurchasePlanName", + "product": "myPurchasePlanProduct", + "promotionCode": "myPurchasePlanPromotionCode", + "publisher": "myPurchasePlanPublisher" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "purchasePlan": { + "name": "myPurchasePlanName", + "product": "myPurchasePlanProduct", + "promotionCode": "myPurchasePlanPromotionCode", + "publisher": "myPurchasePlanPublisher" + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "purchasePlan": { + "name": "myPurchasePlanName", + "product": "myPurchasePlanProduct", + "promotionCode": "myPurchasePlanPromotionCode", + "publisher": "myPurchasePlanPublisher" + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk to add purchase plan." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddSupportsHibernation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddSupportsHibernation.json new file mode 100644 index 0000000000..ab444fccfb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddSupportsHibernation.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "supportsHibernation": true + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "supportsHibernation": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "supportsHibernation": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk to add supportsHibernation." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToChangeTier.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToChangeTier.json new file mode 100644 index 0000000000..23693ac412 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToChangeTier.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "tier": "P30" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "provisioningState": "Succeeded", + "tier": "P30" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "propertyUpdatesInProgress": { + "targetTier": "P30" + }, + "provisioningState": "Updating", + "tier": "P10" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk to change tier." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableBursting.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableBursting.json new file mode 100644 index 0000000000..28a061e1c6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableBursting.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "burstingEnabled": false + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "provisioningState": "Updating" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk to disable bursting." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableOptimizedForFrequentAttach.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableOptimizedForFrequentAttach.json new file mode 100644 index 0000000000..d99cf20a92 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableOptimizedForFrequentAttach.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "optimizedForFrequentAttach": false + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "optimizedForFrequentAttach": false, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "optimizedForFrequentAttach": false, + "provisioningState": "Updating" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk to disable optimizedForFrequentAttach." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskWithDiskControllerTypes.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskWithDiskControllerTypes.json new file mode 100644 index 0000000000..b04c0c2d19 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskWithDiskControllerTypes.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "supportedCapabilities": { + "diskControllerTypes": "SCSI" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/marketplacetestfirstparty/ArtifactTypes/VMImage/Offers/nvme_test_062/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "supportedCapabilities": { + "diskControllerTypes": "SCSI" + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/marketplacetestfirstparty/ArtifactTypes/VMImage/Offers/nvme_test_062/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "supportedCapabilities": { + "diskControllerTypes": "SCSI" + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2023-04-02" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk with diskControllerTypes." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateManagedDiskToRemoveDiskAccessResourceAssociation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateManagedDiskToRemoveDiskAccessResourceAssociation.json new file mode 100644 index 0000000000..0afa8f91a5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateManagedDiskToRemoveDiskAccessResourceAssociation.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "networkAccessPolicy": "AllowAll" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "networkAccessPolicy": "AllowAll", + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "networkAccessPolicy": "AllowAll", + "provisioningState": "Updating" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update managed disk to remove disk access resource association." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateACommunityGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateACommunityGallery.json new file mode 100644 index 0000000000..70da204d00 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateACommunityGallery.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "gallery": { + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "sharingProfile": { + "communityGalleryInfo": { + "eula": "eula", + "publicNamePrefix": "PirPublic", + "publisherContact": "pir@microsoft.com", + "publisherUri": "uri" + }, + "permissions": "Community" + } + } + }, + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating", + "sharingProfile": { + "communityGalleryInfo": { + "eula": "eula", + "publicNamePrefix": "PirPublic", + "publisherContact": "pir@microsoft.com", + "publisherUri": "uri" + }, + "permissions": "Community" + } + } + } + }, + "201": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Creating", + "sharingProfile": { + "communityGalleryInfo": { + "eula": "eula", + "publicNamePrefix": "PirPublic", + "publisherContact": "pir@microsoft.com", + "publisherUri": "uri" + }, + "permissions": "Community" + } + } + } + }, + "202": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating", + "sharingProfile": { + "communityGalleryInfo": { + "eula": "eula", + "publicNamePrefix": "PirPublic", + "publisherContact": "pir@microsoft.com", + "publisherUri": "uri" + }, + "permissions": "Community" + } + } + } + } + }, + "operationId": "Galleries_CreateOrUpdate", + "title": "Create a community gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGallery.json new file mode 100644 index 0000000000..1f6036ad7f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGallery.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "gallery": { + "location": "West US", + "properties": { + "description": "This is the gallery description." + } + }, + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating" + } + } + }, + "201": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Creating" + } + } + }, + "202": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Galleries_CreateOrUpdate", + "title": "Create or update a simple gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSharingProfile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSharingProfile.json new file mode 100644 index 0000000000..fb436244ab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSharingProfile.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "gallery": { + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "sharingProfile": { + "permissions": "Groups" + } + } + }, + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating", + "sharingProfile": { + "permissions": "Groups" + } + } + } + }, + "201": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Creating", + "sharingProfile": { + "permissions": "Groups" + } + } + } + }, + "202": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating", + "sharingProfile": { + "permissions": "Groups" + } + } + } + } + }, + "operationId": "Galleries_CreateOrUpdate", + "title": "Create or update a simple gallery with sharing profile." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSoftDeletionEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSoftDeletionEnabled.json new file mode 100644 index 0000000000..59b58b2d72 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSoftDeletionEnabled.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "gallery": { + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "softDeletePolicy": { + "isSoftDeleteEnabled": true + } + } + }, + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating", + "softDeletePolicy": { + "isSoftDeleteEnabled": true + } + } + } + }, + "201": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Creating", + "softDeletePolicy": { + "isSoftDeleteEnabled": true + } + } + } + }, + "202": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating", + "softDeletePolicy": { + "isSoftDeleteEnabled": true + } + } + } + } + }, + "operationId": "Galleries_CreateOrUpdate", + "title": "Create or update a simple gallery with soft deletion enabled." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Delete.json new file mode 100644 index 0000000000..da9a6c6ce6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + }, + "operationId": "Galleries_Delete", + "title": "Delete a gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetACommunityGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetACommunityGallery.json new file mode 100644 index 0000000000..c6349f1ee9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetACommunityGallery.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Succeeded", + "sharingProfile": { + "communityGalleryInfo": { + "communityGalleryEnabled": true, + "eula": "eula", + "publicNames": [ + "GalelryPublicName" + ], + "publisherContact": "pir@microsoft.com", + "publisherUri": "uri" + }, + "permissions": "Community" + }, + "sharingStatus": { + "aggregatedState": "Succeeded", + "summary": [ + { + "region": "westus", + "state": "Succeeded", + "details": "" + } + ] + } + } + } + } + }, + "operationId": "Galleries_Get", + "title": "Get a community gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGallery.json new file mode 100644 index 0000000000..c903a11386 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGallery.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "Galleries_Get", + "title": "Get a gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithExpandSharingProfileGroups.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithExpandSharingProfileGroups.json new file mode 100644 index 0000000000..48675a54c0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithExpandSharingProfileGroups.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "$expand": "SharingProfile/Groups", + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "sharingProfile": { + "groups": [ + { + "type": "Subscriptions", + "ids": [ + "34a4ab42-0d72-47d9-bd1a-aed207386dac", + "380fd389-260b-41aa-bad9-0a83108c370b" + ] + }, + { + "type": "AADTenants", + "ids": [ + "c24c76aa-8897-4027-9b03-8f7928b54ff6" + ] + } + ], + "permissions": "Groups" + } + } + } + } + }, + "operationId": "Galleries_Get", + "title": "Get a gallery with expand sharingProfile groups." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithSelectPermissions.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithSelectPermissions.json new file mode 100644 index 0000000000..9e1c8f4628 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithSelectPermissions.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "$select": "Permissions", + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "sharingProfile": { + "groups": [ + { + "type": "Subscriptions", + "ids": [ + "34a4ab42-0d72-47d9-bd1a-aed207386dac", + "380fd389-260b-41aa-bad9-0a83108c370b" + ] + }, + { + "type": "AADTenants", + "ids": [ + "c24c76aa-8897-4027-9b03-8f7928b54ff6" + ] + } + ], + "permissions": "Groups" + } + } + } + } + }, + "operationId": "Galleries_Get", + "title": "Get a gallery with select permissions." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_List.json new file mode 100644 index 0000000000..4541c94943 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_List.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/galleries/myGalleryName", + "value": [ + { + "name": "myGalleryName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "Galleries_List", + "title": "List galleries in a subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_ListByResourceGroup.json new file mode 100644 index 0000000000..c115ef0133 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_ListByResourceGroup.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/galleries/myGalleryName", + "value": [ + { + "name": "myGalleryName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "Galleries_ListByResourceGroup", + "title": "List galleries in a resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Update.json new file mode 100644 index 0000000000..afca95d9ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Update.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "gallery": { + "properties": { + "description": "This is the gallery description." + } + }, + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Galleries_Update", + "title": "Update a simple gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..aadf2a7c29 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_CreateOrUpdate.json @@ -0,0 +1,233 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryApplicationVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "endOfLifeDate": "2019-07-01T07:00:00Z", + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "replicaCount": 1, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + }, + "galleryApplicationVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/applications/versions", + "id": "/subscriptions/01523d7c-60da-455e-adef-521b547922c4/resourceGroups/galleryPsTestRg98/providers/Microsoft.Compute/galleries/galleryPsTestGallery6165/applications/galleryPsTestGalleryApplication7825/versions/1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "advancedSettings": { + "timeout": "300", + "user": "root" + }, + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "enableHealthCheck": false, + "endOfLifeDate": "2019-07-01T07:00:00+00:00", + "excludeFromLatest": false, + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "publishedDate": "2019-06-21T17:13:57.5972568+00:00", + "replicaCount": 1, + "settings": { + "configFileName": "configuration.cfg", + "packageFileName": "package.zip" + }, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/applications/versions", + "id": "/subscriptions/01523d7c-60da-455e-adef-521b547922c4/resourceGroups/galleryPsTestRg98/providers/Microsoft.Compute/galleries/galleryPsTestGallery6165/applications/galleryPsTestGalleryApplication7825/versions/1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "advancedSettings": { + "timeout": "300", + "user": "root" + }, + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "enableHealthCheck": false, + "endOfLifeDate": "2019-07-01T07:00:00+00:00", + "excludeFromLatest": false, + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "publishedDate": "2019-06-21T17:13:57.5972568+00:00", + "replicaCount": 1, + "settings": { + "configFileName": "configuration.cfg", + "packageFileName": "package.zip" + }, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/applications/versions", + "id": "/subscriptions/01523d7c-60da-455e-adef-521b547922c4/resourceGroups/galleryPsTestRg98/providers/Microsoft.Compute/galleries/galleryPsTestGallery6165/applications/galleryPsTestGalleryApplication7825/versions/1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "enableHealthCheck": false, + "endOfLifeDate": "2019-07-01T07:00:00+00:00", + "excludeFromLatest": false, + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "publishedDate": "2019-06-21T17:13:57.5972568+00:00", + "replicaCount": 1, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + } + }, + "operationId": "GalleryApplicationVersions_CreateOrUpdate", + "title": "Create or update a simple gallery Application Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Delete.json new file mode 100644 index 0000000000..1d5a65f41b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryApplicationVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + }, + "operationId": "GalleryApplicationVersions_Delete", + "title": "Delete a gallery Application Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersion.json new file mode 100644 index 0000000000..b335b07d65 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersion.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryApplicationVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/applications/versions", + "id": "/subscriptions/01523d7c-60da-455e-adef-521b547922c4/resourceGroups/galleryPsTestRg98/providers/Microsoft.Compute/galleries/galleryPsTestGallery6165/applications/galleryPsTestGalleryApplication7825/versions/1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "enableHealthCheck": false, + "endOfLifeDate": "2019-07-01T07:00:00+00:00", + "excludeFromLatest": false, + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "publishedDate": "2019-06-21T17:13:57.5972568+00:00", + "replicaCount": 1, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + } + }, + "operationId": "GalleryApplicationVersions_Get", + "title": "Get a gallery Application Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersionWithReplicationStatus.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersionWithReplicationStatus.json new file mode 100644 index 0000000000..aff5abc920 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersionWithReplicationStatus.json @@ -0,0 +1,85 @@ +{ + "parameters": { + "$expand": "ReplicationStatus", + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryApplicationVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "advancedSettings": { + "timeout": "300", + "user": "root" + }, + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "enableHealthCheck": false, + "endOfLifeDate": "2019-07-01T07:00:00+00:00", + "excludeFromLatest": false, + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "publishedDate": "2019-06-21T17:13:57.5972568+00:00", + "replicaCount": 1, + "settings": { + "configFileName": "configuration.cfg", + "packageFileName": "package.zip" + }, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "replicationStatus": { + "aggregatedState": "Completed", + "summary": [ + { + "progress": 100, + "region": "West US", + "state": "Completed", + "details": "" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + } + }, + "operationId": "GalleryApplicationVersions_Get", + "title": "Get a gallery Application Version with replication status." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_ListByGalleryApplication.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_ListByGalleryApplication.json new file mode 100644 index 0000000000..60e2538687 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_ListByGalleryApplication.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications/myGalleryApplicationName/versions?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/galleries/myGalleryName/applications/myGalleryApplicationName/versions/myGalleryApplicationVersionName", + "value": [ + { + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/applications/versions", + "id": "/subscriptions/01523d7c-60da-455e-adef-521b547922c4/resourceGroups/galleryPsTestRg98/providers/Microsoft.Compute/galleries/galleryPsTestGallery6165/applications/galleryPsTestGalleryApplication7825/versions/1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "enableHealthCheck": false, + "endOfLifeDate": "2019-07-01T07:00:00+00:00", + "excludeFromLatest": false, + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "publishedDate": "2019-06-21T17:13:57.5972568+00:00", + "replicaCount": 1, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + ] + } + } + }, + "operationId": "GalleryApplicationVersions_ListByGalleryApplication", + "title": "List gallery Application Versions in a gallery Application Definition." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Update.json new file mode 100644 index 0000000000..f5ce2ddf2a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Update.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryApplicationVersion": { + "properties": { + "publishingProfile": { + "endOfLifeDate": "2019-07-01T07:00:00Z", + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "replicaCount": 1, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + }, + "galleryApplicationVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/applications/versions", + "id": "/subscriptions/01523d7c-60da-455e-adef-521b547922c4/resourceGroups/galleryPsTestRg98/providers/Microsoft.Compute/galleries/galleryPsTestGallery6165/applications/galleryPsTestGalleryApplication7825/versions/1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "enableHealthCheck": false, + "endOfLifeDate": "2019-07-01T07:00:00+00:00", + "excludeFromLatest": false, + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "publishedDate": "2019-06-21T17:13:57.5972568+00:00", + "replicaCount": 1, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + } + }, + "operationId": "GalleryApplicationVersions_Update", + "title": "Update a simple gallery Application Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_CreateOrUpdate.json new file mode 100644 index 0000000000..896db739b5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_CreateOrUpdate.json @@ -0,0 +1,132 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplication": { + "location": "West US", + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + }, + "galleryApplicationName": "myGalleryApplicationName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryApplicationName", + "type": "Microsoft.Compute/galleries", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications/myGalleryApplicationName", + "location": "West US", + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + } + }, + "201": { + "body": { + "name": "myGalleryApplicationName", + "type": "Microsoft.Compute/galleries", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications/myGalleryApplicationName", + "location": "West US", + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + } + }, + "202": { + "body": { + "name": "myGalleryApplicationName", + "type": "Microsoft.Compute/galleries", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications/myGalleryApplicationName", + "location": "West US", + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + } + } + }, + "operationId": "GalleryApplications_CreateOrUpdate", + "title": "Create or update a simple gallery Application." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Delete.json new file mode 100644 index 0000000000..9cb21becdd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + }, + "operationId": "GalleryApplications_Delete", + "title": "Delete a gallery Application." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Get.json new file mode 100644 index 0000000000..272aa6b4c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Get.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryApplicationName", + "location": "West US", + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + } + } + }, + "operationId": "GalleryApplications_Get", + "title": "Get a gallery Application." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_ListByGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_ListByGallery.json new file mode 100644 index 0000000000..b5e4742407 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_ListByGallery.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/galleries/myGalleryName/applications/myGalleryApplicationName", + "value": [ + { + "name": "myGalleryApplicationName", + "location": "West US", + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + } + ] + } + } + }, + "operationId": "GalleryApplications_ListByGallery", + "title": "List gallery Applications in a gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Update.json new file mode 100644 index 0000000000..c1b90d0ebe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Update.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplication": { + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + }, + "galleryApplicationName": "myGalleryApplicationName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryApplicationName", + "type": "Microsoft.Compute/galleries", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications/myGalleryApplicationName", + "location": "West US", + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + } + } + }, + "operationId": "GalleryApplications_Update", + "title": "Update a simple gallery Application." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource.json new file mode 100644 index 0000000000..1979877695 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource.json @@ -0,0 +1,324 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "source": { + "communityGalleryImageId": "/communityGalleries/{communityGalleryName}/images/{communityGalleryImageName}" + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "communityGalleryImageId": "/communityGalleries/{communityGalleryName}/images/{communityGalleryImageName}" + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "communityGalleryImageId": "/communityGalleries/{communityGalleryName}/images/{communityGalleryImageName}" + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "communityGalleryImageId": "/communityGalleries/{communityGalleryName}/images/{communityGalleryImageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using community gallery image as source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource.json new file mode 100644 index 0000000000..3006bf1930 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource.json @@ -0,0 +1,324 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using managed image as source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapshotsAsASource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapshotsAsASource.json new file mode 100644 index 0000000000..c7cc577b7b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapshotsAsASource.json @@ -0,0 +1,313 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using mix of disks and snapshots as a source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMode.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMode.json new file mode 100644 index 0000000000..5311aab071 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMode.json @@ -0,0 +1,184 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "replicationMode": "Shallow", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1 + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "replicationMode": "Shallow", + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "replicationMode": "Shallow", + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "replicationMode": "Shallow", + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using shallow replication mode." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource.json new file mode 100644 index 0000000000..dbed8d6508 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource.json @@ -0,0 +1,324 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionName}" + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionName}" + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionName}" + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using shared image as source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource.json new file mode 100644 index 0000000000..0c06684b50 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource.json @@ -0,0 +1,313 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using snapshots as a source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVhdAsASource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVhdAsASource.json new file mode 100644 index 0000000000..cbf0f5b676 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVhdAsASource.json @@ -0,0 +1,271 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using vhd as a source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVmAsSource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVmAsSource.json new file mode 100644 index 0000000000..5f8d3a3ee4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVmAsSource.json @@ -0,0 +1,324 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2 + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using VM as source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified.json new file mode 100644 index 0000000000..659c83beeb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified.json @@ -0,0 +1,366 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetExtendedLocations": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 0 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "extendedLocation": { + "name": "microsoftlosangeles1", + "type": "EdgeZone" + }, + "extendedLocationReplicaCount": 1, + "storageAccountType": "StandardSSD_LRS(default)" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 0 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "extendedLocation": { + "name": "microsoftnewyork1", + "type": "EdgeZone" + }, + "extendedLocationReplicaCount": 1, + "storageAccountType": "StandardSSD_LRS(default)" + } + ], + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple gallery image version with target extended locations specified." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Delete.json new file mode 100644 index 0000000000..b49696048e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + }, + "operationId": "GalleryImageVersions_Delete", + "title": "Delete a gallery image version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersion.json new file mode 100644 index 0000000000..65622b19f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersion.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_Get", + "title": "Get a gallery image version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithReplicationStatus.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithReplicationStatus.json new file mode 100644 index 0000000000..9504fcf105 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithReplicationStatus.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "$expand": "ReplicationStatus", + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + } + ] + }, + "replicationStatus": { + "aggregatedState": "Completed", + "summary": [ + { + "progress": 100, + "region": "West US", + "state": "Completed", + "details": "" + }, + { + "progress": 100, + "region": "East US", + "state": "Completed", + "details": "" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_Get", + "title": "Get a gallery image version with replication status." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithSnapshotsAsASource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithSnapshotsAsASource.json new file mode 100644 index 0000000000..573cf3ddd9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithSnapshotsAsASource.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{diskSnapshotName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{snapshotName}" + } + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_Get", + "title": "Get a gallery image version with snapshots as a source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithVhdAsASource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithVhdAsASource.json new file mode 100644 index 0000000000..58b018a40b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithVhdAsASource.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_Get", + "title": "Get a gallery image version with vhd as a source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_ListByGalleryImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_ListByGalleryImage.json new file mode 100644 index 0000000000..0d9b5f6cbb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_ListByGalleryImage.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/images/myGalleryImageName/versions?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/galleries/myGalleryName/images/myGalleryImageName/versions/myGalleryImageVersionName", + "value": [ + { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + ] + } + } + }, + "operationId": "GalleryImageVersions_ListByGalleryImage", + "title": "List gallery image versions in a gallery image definition." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionManagedImageAsSource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionManagedImageAsSource.json new file mode 100644 index 0000000000..e87603aa35 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionManagedImageAsSource.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "storageProfile": { + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_Update", + "title": "Update a simple Gallery Image Version (Managed Image as source)." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionWithoutSourceId.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionWithoutSourceId.json new file mode 100644 index 0000000000..9f644b59ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionWithoutSourceId.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "storageProfile": {} + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_Update", + "title": "Update a simple Gallery Image Version without source id." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_CreateOrUpdate.json new file mode 100644 index 0000000000..e8538ffb75 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_CreateOrUpdate.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImage": { + "location": "West US", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows" + } + }, + "galleryImageName": "myGalleryImageName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryImageName", + "location": "West US", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "provisioningState": "Updating" + } + } + }, + "201": { + "body": { + "name": "myGalleryImageName", + "location": "West US", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "provisioningState": "Creating" + } + } + }, + "202": { + "body": { + "name": "myGalleryImageName", + "location": "West US", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "provisioningState": "Updating" + } + } + } + }, + "operationId": "GalleryImages_CreateOrUpdate", + "title": "Create or update a simple gallery image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Delete.json new file mode 100644 index 0000000000..8e6980198d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + }, + "operationId": "GalleryImages_Delete", + "title": "Delete a gallery image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Get.json new file mode 100644 index 0000000000..04a0f66ffc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Get.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryImageName", + "location": "West US", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "GalleryImages_Get", + "title": "Get a gallery image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_ListByGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_ListByGallery.json new file mode 100644 index 0000000000..b16b7b97f9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_ListByGallery.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/images?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/galleries/myGalleryName/images/myGalleryImageName", + "value": [ + { + "name": "myGalleryImageName", + "location": "West US", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "GalleryImages_ListByGallery", + "title": "List gallery images in a gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Update.json new file mode 100644 index 0000000000..0b7d699f63 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Update.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImage": { + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows" + } + }, + "galleryImageName": "myGalleryImageName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryImageName", + "location": "West US", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "provisioningState": "Updating" + } + } + } + }, + "operationId": "GalleryImages_Update", + "title": "Update a simple gallery image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_AddSharingIdToTheSharingProfileOfAGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_AddSharingIdToTheSharingProfileOfAGallery.json new file mode 100644 index 0000000000..efdd1e6cd5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_AddSharingIdToTheSharingProfileOfAGallery.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "sharingUpdate": { + "groups": [ + { + "type": "Subscriptions", + "ids": [ + "34a4ab42-0d72-47d9-bd1a-aed207386dac", + "380fd389-260b-41aa-bad9-0a83108c370b" + ] + }, + { + "type": "AADTenants", + "ids": [ + "c24c76aa-8897-4027-9b03-8f7928b54ff6" + ] + } + ], + "operationType": "Add" + }, + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "groups": [ + { + "type": "Subscriptions", + "ids": [ + "34a4ab42-0d72-47d9-bd1a-aed207386dac", + "380fd389-260b-41aa-bad9-0a83108c370b" + ] + }, + { + "type": "AADTenants", + "ids": [ + "c24c76aa-8897-4027-9b03-8f7928b54ff6" + ] + } + ], + "operationType": "Add" + } + }, + "202": { + "body": { + "groups": [ + { + "type": "Subscriptions", + "ids": [ + "34a4ab42-0d72-47d9-bd1a-aed207386dac", + "380fd389-260b-41aa-bad9-0a83108c370b" + ] + }, + { + "type": "AADTenants", + "ids": [ + "c24c76aa-8897-4027-9b03-8f7928b54ff6" + ] + } + ], + "operationType": "Add" + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/share?api-version=2022-03-03" + } + } + }, + "operationId": "GallerySharingProfile_Update", + "title": "Add sharing id to the sharing profile of a gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ResetSharingProfileOfAGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ResetSharingProfileOfAGallery.json new file mode 100644 index 0000000000..0b3a0e43ff --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ResetSharingProfileOfAGallery.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "sharingUpdate": { + "operationType": "Reset" + }, + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "operationType": "Reset" + } + }, + "202": { + "body": { + "operationType": "Reset" + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/share?api-version=2022-03-03" + } + } + }, + "operationId": "GallerySharingProfile_Update", + "title": "reset sharing profile of a gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ShareAGalleryToCommunity.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ShareAGalleryToCommunity.json new file mode 100644 index 0000000000..15ee00a1b0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ShareAGalleryToCommunity.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "sharingUpdate": { + "operationType": "EnableCommunity" + }, + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "operationType": "EnableCommunity" + } + }, + "202": { + "body": { + "operationType": "EnableCommunity" + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/share?api-version=2022-03-03" + } + } + }, + "operationId": "GallerySharingProfile_Update", + "title": "share a gallery to community." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlob.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlob.json new file mode 100644 index 0000000000..0e5136b1a3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlob.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": true + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": true + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": true + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image from a blob." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlobWithDiskEncryptionSetResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlobWithDiskEncryptionSetResource.json new file mode 100644 index 0000000000..0bbdadac58 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlobWithDiskEncryptionSetResource.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "osState": "Generalized", + "osType": "Linux" + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "caching": "ReadWrite", + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "osState": "Generalized", + "osType": "Linux" + } + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "caching": "ReadWrite", + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "osState": "Generalized", + "osType": "Linux" + } + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image from a blob with DiskEncryptionSet resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDisk.json new file mode 100644 index 0000000000..a8af1a35c5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDisk.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "osDisk": { + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": true + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": true + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": true + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image from a managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDiskWithDiskEncryptionSetResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDiskWithDiskEncryptionSetResource.json new file mode 100644 index 0000000000..af9accc0f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDiskWithDiskEncryptionSetResource.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "osDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + } + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + } + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image from a managed disk with DiskEncryptionSet resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshot.json new file mode 100644 index 0000000000..2a4501c411 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshot.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "osDisk": { + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + }, + "zoneResilient": false + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + }, + "zoneResilient": false + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + }, + "zoneResilient": false + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image from a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshotWithDiskEncryptionSetResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshotWithDiskEncryptionSetResource.json new file mode 100644 index 0000000000..57108191e5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshotWithDiskEncryptionSetResource.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "osDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + } + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + } + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image from a snapshot with DiskEncryptionSet resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAnExistingVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAnExistingVirtualMachine.json new file mode 100644 index 0000000000..c6fd417bda --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAnExistingVirtualMachine.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "sourceVirtualMachine": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "sourceVirtualMachine": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + }, + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myVM_OsDisk_1_6dc293b7d811433196903acf92665022" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "sourceVirtualMachine": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + }, + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myVM_OsDisk_1_6dc293b7d811433196903acf92665022" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image from an existing virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromABlob.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromABlob.json new file mode 100644 index 0000000000..b674a65bfa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromABlob.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1 + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1 + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1 + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image that includes a data disk from a blob." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromAManagedDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromAManagedDisk.json new file mode 100644 index 0000000000..329ad24fc4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromAManagedDisk.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "dataDisks": [ + { + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + } + } + ], + "osDisk": { + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + } + } + ], + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + } + } + ], + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image that includes a data disk from a managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromASnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromASnapshot.json new file mode 100644 index 0000000000..a5a2735119 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromASnapshot.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "dataDisks": [ + { + "lun": 1, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + } + } + ], + "osDisk": { + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + }, + "zoneResilient": true + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "lun": 1, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + } + } + ], + "osDisk": { + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + }, + "zoneResilient": true + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "lun": 1, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + } + } + ], + "osDisk": { + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + }, + "zoneResilient": true + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image that includes a data disk from a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMaximumSetGen.json new file mode 100644 index 0000000000..7b76bba3a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "Images_Delete", + "title": "Image_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMinimumSetGen.json new file mode 100644 index 0000000000..189e5b5165 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "Images_Delete", + "title": "Image_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Get.json new file mode 100644 index 0000000000..5254979e4f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Get.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage", + "location": "West US", + "properties": { + "provisioningState": "created", + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + }, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + }, + "storageAccountType": "Standard_LRS" + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "diskSizeGB": 20, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1" + }, + "osState": "Generalized", + "osType": "Windows", + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "storageAccountType": "Standard_LRS" + }, + "zoneResilient": true + } + } + } + } + }, + "operationId": "Images_Get", + "title": "Get information about a virtual machine image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_List.json new file mode 100644 index 0000000000..b9983fc3d1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_List.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/UserVMImages/myImageName", + "value": [ + { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage", + "location": "West US", + "properties": { + "provisioningState": "created", + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + }, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + }, + "storageAccountType": "Standard_LRS" + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1" + }, + "osState": "Generalized", + "osType": "Windows", + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "storageAccountType": "Standard_LRS" + } + } + } + } + ] + } + } + }, + "operationId": "Images_List", + "title": "List all virtual machine images in a subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_ListByResourceGroup.json new file mode 100644 index 0000000000..486c2c0e62 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_ListByResourceGroup.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/UserVMImages/myImageName", + "value": [ + { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage", + "location": "West US", + "properties": { + "provisioningState": "created", + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + }, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + }, + "storageAccountType": "Standard_LRS" + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1" + }, + "osState": "Generalized", + "osType": "Windows", + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "storageAccountType": "Standard_LRS" + } + } + } + } + ] + } + } + }, + "operationId": "Images_ListByResourceGroup", + "title": "List all virtual machine images in a resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Update.json new file mode 100644 index 0000000000..aec85cbfcf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Update.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "properties": { + "hyperVGeneration": "V1", + "sourceVirtualMachine": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + } + }, + "tags": { + "department": "HR" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage", + "location": "West US", + "properties": { + "provisioningState": "created", + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + }, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + }, + "storageAccountType": "Standard_LRS" + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "diskSizeGB": 20, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1" + }, + "osState": "Generalized", + "osType": "Windows", + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "storageAccountType": "Standard_LRS" + }, + "zoneResilient": true + } + }, + "tags": { + "department": "HR" + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage", + "location": "West US", + "properties": { + "provisioningState": "created", + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + }, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + }, + "storageAccountType": "Standard_LRS" + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "diskSizeGB": 20, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1" + }, + "osState": "Generalized", + "osType": "Windows", + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "storageAccountType": "Standard_LRS" + }, + "zoneResilient": true + } + }, + "tags": { + "department": "HR" + } + } + } + }, + "operationId": "Images_Update", + "title": "Updates tags of an Image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_CreateOrUpdate.json new file mode 100644 index 0000000000..6388082aab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_CreateOrUpdate.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "intent": { + "vmSizes": [ + "Basic_A0", + "Basic_A2" + ] + }, + "proximityPlacementGroupType": "Standard" + }, + "zones": [ + "1" + ] + }, + "proximityPlacementGroupName": "myProximityPlacementGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myProximityPlacementGroup", + "type": "Microsoft.Compute/proximityPlacementGroups", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myProximityPlacementGroup", + "location": "westus", + "properties": { + "intent": { + "vmSizes": [ + "Basic_A0", + "Basic_A2" + ] + }, + "proximityPlacementGroupType": "Standard" + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "myProximityPlacementGroup", + "type": "Microsoft.Compute/proximityPlacementGroups", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myProximityPlacementGroup", + "location": "westus", + "properties": { + "intent": { + "vmSizes": [ + "Basic_A0", + "Basic_A2" + ] + }, + "proximityPlacementGroupType": "Standard" + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "ProximityPlacementGroups_CreateOrUpdate", + "title": "Create or Update a proximity placement group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Delete.json new file mode 100644 index 0000000000..ecb5a67f47 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Delete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "proximityPlacementGroupName": "myProximityPlacementGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {} + }, + "operationId": "ProximityPlacementGroups_Delete", + "title": "Delete a proximity placement group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Get.json new file mode 100644 index 0000000000..9673e94f9b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Get.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "proximityPlacementGroupName": "myProximityPlacementGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myProximityPlacementGroup", + "type": "Microsoft.Compute/proximityPlacementGroups", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myProximityPlacementGroup", + "location": "westus", + "properties": { + "availabilitySets": [ + { + "id": "string" + } + ], + "intent": { + "vmSizes": [ + "Basic_A0", + "Basic_A2" + ] + }, + "proximityPlacementGroupType": "Standard", + "virtualMachineScaleSets": [ + { + "id": "string" + } + ], + "virtualMachines": [ + { + "id": "string" + } + ] + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "ProximityPlacementGroups_Get", + "title": "Get proximity placement groups." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListByResourceGroup.json new file mode 100644 index 0000000000..9949e177b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListByResourceGroup.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "myProximityPlacementGroup", + "type": "Microsoft.Compute/proximityPlacementGroups", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myProximityPlacementGroup", + "location": "westus", + "properties": { + "availabilitySets": [ + { + "id": "string" + } + ], + "intent": { + "vmSizes": [ + "Basic_A0", + "Basic_A2" + ] + }, + "proximityPlacementGroupType": "Standard", + "virtualMachineScaleSets": [ + { + "id": "string" + } + ], + "virtualMachines": [ + { + "id": "string" + } + ] + }, + "zones": [ + "1" + ] + } + ] + } + } + }, + "operationId": "ProximityPlacementGroups_ListByResourceGroup", + "title": "List proximity placement group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListBySubscription.json new file mode 100644 index 0000000000..b3ce6a043f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListBySubscription.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "myProximityPlacementGroup", + "type": "Microsoft.Compute/proximityPlacementGroups", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myProximityPlacementGroup", + "location": "westus", + "properties": { + "availabilitySets": [ + { + "id": "string" + } + ], + "intent": { + "vmSizes": [ + "Basic_A0", + "Basic_A2" + ] + }, + "proximityPlacementGroupType": "Standard", + "virtualMachineScaleSets": [ + { + "id": "string" + } + ], + "virtualMachines": [ + { + "id": "string" + } + ] + }, + "zones": [ + "1" + ] + } + ] + } + } + }, + "operationId": "ProximityPlacementGroups_ListBySubscription", + "title": "List proximity placement groups." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Update.json new file mode 100644 index 0000000000..f3325aa97c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Update.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "tags": { + "additionalProp1": "string" + } + }, + "proximityPlacementGroupName": "myProximityPlacementGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myProximityPlacementGroup", + "type": "Microsoft.Compute/proximityPlacementGroups", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myProximityPlacementGroup", + "location": "westus", + "properties": { + "proximityPlacementGroupType": "Standard" + } + } + } + }, + "operationId": "ProximityPlacementGroups_Update", + "title": "Update a proximity placement group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollection.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollection.json new file mode 100644 index 0000000000..a423031311 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollection.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "norwayeast", + "properties": { + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + } + }, + "tags": { + "myTag1": "tagValue1" + } + }, + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "myRpc", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myRpc", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/myRpc", + "location": "norwayeast", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "eastus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + }, + "201": { + "body": { + "name": "myRpc", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/myRpc", + "location": "norwayeast", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "eastus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "RestorePointCollections_CreateOrUpdate", + "title": "Create or update a restore point collection." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollectionForCrossRegionCopy.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollectionForCrossRegionCopy.json new file mode 100644 index 0000000000..be183a100c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollectionForCrossRegionCopy.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "norwayeast", + "properties": { + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/sourceRpcName" + } + }, + "tags": { + "myTag1": "tagValue1" + } + }, + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "myRpc", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myRpc", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/myRpc", + "location": "norwayeast", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "eastus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + }, + "201": { + "body": { + "name": "myRpc", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/myRpc", + "location": "norwayeast", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c", + "source": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/sourceRpcName", + "location": "eastus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "RestorePointCollections_CreateOrUpdate", + "title": "Create or update a restore point collection for cross region copy." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMaximumSetGen.json new file mode 100644 index 0000000000..4c32c448d1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "restorePointCollectionName": "aaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "RestorePointCollections_Delete", + "title": "RestorePointCollection_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMinimumSetGen.json new file mode 100644 index 0000000000..98cd85dd27 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "restorePointCollectionName": "aaaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "RestorePointCollections_Delete", + "title": "RestorePointCollection_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionButNotTheRestorePointsContainedInTheRestorePointCollection.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionButNotTheRestorePointsContainedInTheRestorePointCollection.json new file mode 100644 index 0000000000..ed254c6e30 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionButNotTheRestorePointsContainedInTheRestorePointCollection.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "myRpc", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myRpc", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/myRpc", + "location": "westus", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/myRpc", + "location": "eastus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "RestorePointCollections_Get", + "title": "Get a restore point collection (but not the restore points contained in the restore point collection)" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionIncludingTheRestorePointsContainedInTheRestorePointCollection.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionIncludingTheRestorePointsContainedInTheRestorePointCollection.json new file mode 100644 index 0000000000..b1ee85bff6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionIncludingTheRestorePointsContainedInTheRestorePointCollection.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "expand": "restorePoints", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpcName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "rpcName", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName", + "location": "westus", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4", + "restorePoints": [ + { + "name": "restorePointName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName", + "properties": { + "consistencyMode": "ApplicationConsistent", + "excludeDisks": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm8768_disk2_fe6ffde4f69b491ca33fb984d5bcd89f" + } + ], + "provisioningState": "Succeeded", + "sourceMetadata": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_B1s" + }, + "location": "westus", + "osProfile": { + "adminUsername": "admin", + "allowExtensionOperations": true, + "computerName": "computerName", + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "testingexcludedisk_DataDisk_1", + "caching": "None", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_DataDisk_1_68785190-1acb-4d5e-a8ae-705b45f3dca5" + }, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_DataDisk_1", + "storageAccountType": "Standard_LRS" + } + } + ], + "osDisk": { + "name": "testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "caching": "ReadWrite", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7" + }, + "timeCreated": "2021-01-27T20:35:05.8401519+00:00" + } + } + ], + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "eastus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "RestorePointCollections_Get", + "title": "Get a restore point collection, including the restore points contained in the restore point collection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_List.json new file mode 100644 index 0000000000..889f09c9cb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_List.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "restorePointCollection1", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/restorePointCollection1", + "location": "westus", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/restorePointCollection1", + "location": "westus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + }, + { + "name": "restorePointCollection2", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/restorePointCollection2", + "location": "westus", + "properties": { + "provisioningState": "Deleting", + "restorePointCollectionId": "2875c590-e337-4102-9668-4f5b7e3f98a4", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/restorePointCollection2", + "location": "westus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + ] + } + } + }, + "operationId": "RestorePointCollections_List", + "title": "Gets the list of restore point collections in a resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_ListAll.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_ListAll.json new file mode 100644 index 0000000000..8a0c34d6f6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_ListAll.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "restorePointCollection1", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/resourceGroup1/providers/Microsoft.Compute/restorePointCollections/restorePointCollection1", + "location": "westus", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/VM_Test", + "location": "westus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + }, + { + "name": "restorePointCollection2", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/resourceGroup2/providers/Microsoft.Compute/restorePointCollections/restorePointCollection2", + "location": "westus", + "properties": { + "provisioningState": "Deleting", + "restorePointCollectionId": "2875c590-e337-4102-9668-4f5b7e3f98a4", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/VM_Prod", + "location": "westus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + ] + } + } + }, + "operationId": "RestorePointCollections_ListAll", + "title": "Gets the list of restore point collections in a subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMaximumSetGen.json new file mode 100644 index 0000000000..58c36e2ef9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMaximumSetGen.json @@ -0,0 +1,195 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "properties": { + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + } + }, + "tags": { + "key8536": "aaaaaaaaaaaaaaaaaaa" + } + }, + "resourceGroupName": "rgcompute", + "restorePointCollectionName": "aaaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myRpc", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/myRpc", + "location": "norwayeast", + "properties": { + "provisioningState": "Successful", + "restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c", + "restorePoints": [ + { + "name": "aaaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaa", + "properties": { + "consistencyMode": "CrashConsistent", + "excludeDisks": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + } + ], + "provisioningState": "aaaaaaaaaaaaaaaaa", + "sourceMetadata": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaa" + } + }, + "hardwareProfile": { + "vmSize": "Standard_B1s", + "vmSizeProperties": { + "vCPUsAvailable": 9, + "vCPUsPerCore": 12 + } + }, + "licenseType": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "location": "westus", + "osProfile": { + "adminUsername": "admin", + "allowExtensionOperations": true, + "computerName": "computerName", + "customData": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vaultCertificates": [ + { + "certificateStore": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "certificateUrl": "aaaaaaa" + } + ] + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "testingexcludedisk_DataDisk_1", + "caching": "None", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_DataDisk_1_68785190-1acb-4d5e-a8ae-705b45f3dca5" + }, + "diskSizeGB": 24, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_DataDisk_1", + "storageAccountType": "Standard_LRS" + } + } + ], + "osDisk": { + "name": "testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "caching": "ReadWrite", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "diskSizeGB": 3, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7" + }, + "timeCreated": "2021-11-30T12:58:26.593Z" + } + } + ], + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "eastus" + } + }, + "tags": {} + } + } + }, + "operationId": "RestorePointCollections_Update", + "title": "RestorePointCollection_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMinimumSetGen.json new file mode 100644 index 0000000000..7fdd4094a2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "resourceGroupName": "rgcompute", + "restorePointCollectionName": "aaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "location": "norwayeast" + } + } + }, + "operationId": "RestorePointCollections_Update", + "title": "RestorePointCollection_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CopyARestorePointToADifferentRegion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CopyARestorePointToADifferentRegion.json new file mode 100644 index 0000000000..cfd762e17f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CopyARestorePointToADifferentRegion.json @@ -0,0 +1,86 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "properties": { + "sourceRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/sourceRpcName/restorePoints/sourceRpName" + } + } + }, + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpcName", + "restorePointName": "rpName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "201": { + "body": { + "name": "rpName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName", + "properties": { + "consistencyMode": "ApplicationConsistent", + "provisioningState": "Creating", + "sourceMetadata": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_B1s" + }, + "location": "westus", + "osProfile": { + "adminUsername": "admin", + "allowExtensionOperations": true, + "computerName": "computerName", + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "dataDisk123", + "caching": "None", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/restorePointCollections/mynewrpc/restorePoints/restorepointtwo/diskRestorePoints/dataDisk123_68785190-1acb-4d5e-a8ae-705b45f3dca5" + }, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/disks/dataDisk123", + "storageAccountType": "Standard_LRS" + } + } + ], + "osDisk": { + "name": "osDisk123", + "caching": "ReadWrite", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName/diskRestorePoints/osDisk123_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk123", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "userData": "c2FtcGxlIHVzZXJEYXRh", + "vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7" + }, + "sourceRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/sourceRpcName/restorePoints/sourceRpName" + }, + "timeCreated": "2021-10-25T23:54:29.2796325+00:00" + } + } + } + }, + "operationId": "RestorePoints_Create", + "title": "Copy a restore point to a different region" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CreateARestorePoint.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CreateARestorePoint.json new file mode 100644 index 0000000000..0113a290b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CreateARestorePoint.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "properties": { + "excludeDisks": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123" + } + ] + } + }, + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpcName", + "restorePointName": "rpName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "201": { + "body": { + "name": "rpName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName", + "properties": { + "consistencyMode": "ApplicationConsistent", + "excludeDisks": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123" + } + ], + "provisioningState": "Succeeded", + "sourceMetadata": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_B1s" + }, + "location": "westus", + "osProfile": { + "adminUsername": "admin", + "allowExtensionOperations": true, + "computerName": "computerName", + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "dataDisk123", + "caching": "None", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/restorePointCollections/mynewrpc/restorePoints/restorepointtwo/diskRestorePoints/dataDisk123_68785190-1acb-4d5e-a8ae-705b45f3dca5" + }, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/disks/dataDisk123", + "storageAccountType": "Standard_LRS" + } + } + ], + "osDisk": { + "name": "osDisk123", + "caching": "ReadWrite", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName/diskRestorePoints/osDisk123_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk123", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "userData": "c2FtcGxlIHVzZXJEYXRh", + "vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7" + }, + "timeCreated": "2021-01-27T20:35:05.8401519+00:00" + } + } + } + }, + "operationId": "RestorePoints_Create", + "title": "Create a restore point" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMaximumSetGen.json new file mode 100644 index 0000000000..8826f6d36e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMaximumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "restorePointCollectionName": "aaaaaaaaaaaaaaaaaaaaaa", + "restorePointName": "a", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "RestorePoints_Delete", + "title": "RestorePoint_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMinimumSetGen.json new file mode 100644 index 0000000000..0de58ccd53 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "restorePointCollectionName": "aaaaaaaaaaaaaaaaa", + "restorePointName": "aaaaaaaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "RestorePoints_Delete", + "title": "RestorePoint_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetARestorePoint.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetARestorePoint.json new file mode 100644 index 0000000000..fdd3363889 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetARestorePoint.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpcName", + "restorePointName": "rpName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "rpName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName", + "properties": { + "consistencyMode": "ApplicationConsistent", + "excludeDisks": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm8768_disk2_fe6ffde4f69b491ca33fb984d5bcd89f" + } + ], + "provisioningState": "Succeeded", + "sourceMetadata": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_B1s" + }, + "location": "westus", + "osProfile": { + "adminUsername": "admin", + "allowExtensionOperations": true, + "computerName": "computerName", + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "testingexcludedisk_DataDisk_1", + "caching": "None", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/restorePointCollections/mynewrpc/restorePoints/restorepointtwo/diskRestorePoints/testingexcludedisk_DataDisk_1_68785190-1acb-4d5e-a8ae-705b45f3dca5" + }, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/disks/testingexcludedisk_DataDisk_1", + "storageAccountType": "Standard_LRS" + } + } + ], + "osDisk": { + "name": "testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "caching": "ReadWrite", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7" + }, + "timeCreated": "2021-01-27T20:35:05.8401519+00:00" + } + } + } + }, + "operationId": "RestorePoints_Get", + "title": "Get a restore point" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetRestorePointWithInstanceView.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetRestorePointWithInstanceView.json new file mode 100644 index 0000000000..d59ce7b188 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetRestorePointWithInstanceView.json @@ -0,0 +1,114 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "expand": "instanceView", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpcName", + "restorePointName": "rpName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "rpName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName", + "properties": { + "consistencyMode": "ApplicationConsistent", + "excludeDisks": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm8768_disk2_fe6ffde4f69b491ca33fb984d5bcd89f" + } + ], + "instanceView": { + "diskRestorePoints": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57", + "replicationStatus": { + "completionPercent": 100, + "status": { + "code": "ReplicationState/succeeded", + "displayStatus": "Succeeded", + "level": "Info" + } + } + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/restorePointCollections/mynewrpc/restorePoints/restorepointtwo/diskRestorePoints/testingexcludedisk_DataDisk_1_68785190-1acb-4d5e-a8ae-705b45f3dca5", + "replicationStatus": { + "completionPercent": 100, + "status": { + "code": "ReplicationState/succeeded", + "displayStatus": "Succeeded", + "level": "Info" + } + } + } + ], + "statuses": [ + { + "code": "ReplicationState/succeeded", + "displayStatus": "Succeeded", + "level": "Info" + } + ] + }, + "provisioningState": "Succeeded", + "sourceMetadata": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_B1s" + }, + "location": "westus", + "osProfile": { + "adminUsername": "admin", + "allowExtensionOperations": true, + "computerName": "computerName", + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "testingexcludedisk_DataDisk_1", + "caching": "None", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/restorePointCollections/mynewrpc/restorePoints/restorepointtwo/diskRestorePoints/testingexcludedisk_DataDisk_1_68785190-1acb-4d5e-a8ae-705b45f3dca5" + }, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/disks/testingexcludedisk_DataDisk_1", + "storageAccountType": "Standard_LRS" + } + } + ], + "osDisk": { + "name": "testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "caching": "ReadWrite", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7" + }, + "timeCreated": "2021-01-27T20:35:05.8401519+00:00" + } + } + } + }, + "operationId": "RestorePoints_Get", + "title": "Get restore point with instance view" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_Get.json new file mode 100644 index 0000000000..c47cfbb40e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_Get.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryUniqueName": "galleryUniqueName", + "location": "myLocation", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "identifier": { + "uniqueId": "/SharedGalleries/galleryUniqueName" + }, + "location": "myLocation" + } + } + }, + "operationId": "SharedGalleries_Get", + "title": "Get a shared gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_List.json new file mode 100644 index 0000000000..5f4d208f5d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_List.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "location": "myLocation", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/providers/Microsoft.Compute/sharedGalleries?$skiptoken={token}/Subscriptions/{subscriptionId}/galleries/galleryUniqueName", + "value": [ + { + "name": "galleryUniqueName", + "identifier": { + "uniqueId": "/SharedGalleries/galleryUniqueName" + }, + "location": "myLocation" + } + ] + } + } + }, + "operationId": "SharedGalleries_List", + "title": "List shared galleries." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_Get.json new file mode 100644 index 0000000000..4f6f72dcf4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_Get.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersionName": "myGalleryImageVersionName", + "galleryUniqueName": "galleryUniqueName", + "location": "myLocation", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryImageVersionName", + "identifier": { + "uniqueId": "/SharedGalleries/galleryUniqueName/Images/myGalleryImageName/Versions/myGalleryImageVersionName" + }, + "location": "myLocation", + "properties": { + "endOfLifeDate": "2022-03-20T09:12:28Z", + "excludeFromLatest": false, + "publishedDate": "2018-03-20T09:12:28Z", + "storageProfile": { + "osDiskImage": { + "diskSizeGB": 29, + "hostCaching": "None" + } + } + } + } + } + }, + "operationId": "SharedGalleryImageVersions_Get", + "title": "Get a shared gallery image version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_List.json new file mode 100644 index 0000000000..aaed0c1156 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_List.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryUniqueName": "galleryUniqueName", + "location": "myLocation", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscription-Id}/providers/Microsoft.Compute/sharedGalleries/galleryUniqueName/images/myGalleryImageName/versions?$skiptoken={token}/Subscriptions/{subscription-Id}/galleries/galleryUniqueName/images/myGalleryImageName/versions/myGalleryImageVersionName", + "value": [ + { + "name": "myGalleryImageVersionName", + "identifier": { + "uniqueId": "/SharedGalleries/galleryUniqueName/Images/myGalleryImageName/Versions/myGalleryImageVersionName" + }, + "location": "myLocation", + "properties": { + "endOfLifeDate": "2022-03-20T09:12:28Z", + "excludeFromLatest": false, + "publishedDate": "2018-03-20T09:12:28Z", + "storageProfile": { + "osDiskImage": { + "diskSizeGB": 29, + "hostCaching": "None" + } + } + } + } + ] + } + } + }, + "operationId": "SharedGalleryImageVersions_List", + "title": "List shared gallery image versions." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_Get.json new file mode 100644 index 0000000000..ae8c22b378 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_Get.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryUniqueName": "galleryUniqueName", + "location": "myLocation", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryImageName", + "identifier": { + "uniqueId": "/SharedGalleries/galleryUniqueName/Images/myGalleryImageName" + }, + "location": "myLocation", + "properties": { + "eula": "https://www.microsoft.com/en-us/", + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "privacyStatementUri": "https://www.microsoft.com/en-us/" + } + } + } + }, + "operationId": "SharedGalleryImages_Get", + "title": "Get a shared gallery image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_List.json new file mode 100644 index 0000000000..f60b386631 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_List.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryUniqueName": "galleryUniqueName", + "location": "myLocation", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscription-Id}/providers/Microsoft.Compute/sharedGalleries/galleryUniqueName/images?$skiptoken={token}/Subscriptions/{subscription-Id}/galleries/galleryUniqueName/images/myGalleryImageName", + "value": [ + { + "name": "myGalleryImageName", + "identifier": { + "uniqueId": "/SharedGalleries/galleryUniqueName/Images/myGalleryImageName" + }, + "location": "myLocation", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows" + } + } + ] + } + } + }, + "operationId": "SharedGalleryImages_List", + "title": "List shared gallery images." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription.json new file mode 100644 index 0000000000..831b584947 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshot": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + } + } + }, + "snapshotName": "mySnapshot1", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot1", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "mySnapshot1", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Snapshots_CreateOrUpdate", + "title": "Create a snapshot by importing an unmanaged blob from a different subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromTheSameSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromTheSameSubscription.json new file mode 100644 index 0000000000..971214ab6b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromTheSameSubscription.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshot": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + } + } + }, + "snapshotName": "mySnapshot1", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot1", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "mySnapshot1", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Snapshots_CreateOrUpdate", + "title": "Create a snapshot by importing an unmanaged blob from the same subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnElasticSanVolumeSnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnElasticSanVolumeSnapshot.json new file mode 100644 index 0000000000..ea38f80700 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnElasticSanVolumeSnapshot.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshot": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyFromSanSnapshot", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot" + } + } + }, + "snapshotName": "mySnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyFromSanSnapshot", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "mySnapshot", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyFromSanSnapshot", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Snapshots_CreateOrUpdate", + "title": "Create a snapshot from an elastic san volume snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscription.json new file mode 100644 index 0000000000..e0a453f068 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscription.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshot": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + } + } + }, + "snapshotName": "mySnapshot2", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot2", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "mySnapshot2", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Snapshots_CreateOrUpdate", + "title": "Create a snapshot from an existing snapshot in the same or a different subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegion.json new file mode 100644 index 0000000000..41ddab55a0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegion.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshot": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyStart", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + } + } + }, + "snapshotName": "mySnapshot2", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot2", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2", + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyStart", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "mySnapshot2", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2", + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyStart", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Snapshots_CreateOrUpdate", + "title": "Create a snapshot from an existing snapshot in the same or a different subscription in a different region." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Delete.json new file mode 100644 index 0000000000..0dc103b0e2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Delete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshotName": "mySnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + }, + "204": {} + }, + "operationId": "Snapshots_Delete", + "title": "Delete a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutASnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutASnapshot.json new file mode 100644 index 0000000000..4ae70c97d6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutASnapshot.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshotName": "mySnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot", + "type": "Microsoft.Compute/snapshots", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "sourceUniqueId": "d633885d-d102-4481-901e-5b2413d1a7be" + }, + "diskSizeGB": 100, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "purchasePlan": { + "name": "test_sku", + "product": "marketplace_vm_test", + "publisher": "test_test_pmc2pc1" + }, + "supportedCapabilities": { + "acceleratedNetwork": true + }, + "supportsHibernation": true, + "timeCreated": "2016-12-28T04:41:35.079872+00:00" + }, + "tags": { + "department": "Development", + "project": "Snapshots" + } + } + } + }, + "operationId": "Snapshots_Get", + "title": "Get information about a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutAnIncrementalSnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutAnIncrementalSnapshot.json new file mode 100644 index 0000000000..7902492bb5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutAnIncrementalSnapshot.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshotName": "myIncrementalSnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myIncrementalSnapshot", + "type": "Microsoft.Compute/snapshots", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/myIncrementalSnapshot", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "sourceUniqueId": "d633885d-d102-4481-901e-5b2413d1a7be" + }, + "diskSizeBytes": 10737418240, + "diskSizeGB": 100, + "diskState": "0", + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "hyperVGeneration": "V1", + "incremental": true, + "incrementalSnapshotFamilyId": "d1a341d5-1ea7-4a85-b304-944ad8021639", + "networkAccessPolicy": "0", + "osType": "Windows", + "provisioningState": "Succeeded", + "purchasePlan": { + "name": "test_sku", + "product": "marketplace_vm_test", + "publisher": "test_test_pmc2pc1" + }, + "supportedCapabilities": { + "acceleratedNetwork": true + }, + "supportsHibernation": true, + "timeCreated": "2016-12-28T04:41:35.079872+00:00", + "uniqueId": "a395e9c1-fb9e-446e-a9ba-7b2fa0bcd305" + }, + "tags": { + "department": "Development", + "project": "Snapshots" + } + } + } + }, + "operationId": "Snapshots_Get", + "title": "Get information about an incremental snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_GrantAccess.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_GrantAccess.json new file mode 100644 index 0000000000..db7f54a1eb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_GrantAccess.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "grantAccessData": { + "access": "Read", + "durationInSeconds": 300, + "fileFormat": "VHDX" + }, + "resourceGroupName": "myResourceGroup", + "snapshotName": "mySnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "accessSAS": "https://md-gpvmcxzlzxgd.partition.blob.storage.azure.net/xx3cqcx53f0v/abcd?sv=2014-02-14&sr=b&sk=key1&sig=XXX&st=2021-05-24T18:02:34Z&se=2021-05-24T18:19:14Z&sp=r" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + } + }, + "operationId": "Snapshots_GrantAccess", + "title": "Get a sas on a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_List.json new file mode 100644 index 0000000000..6ce58129c3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_List.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "mySnapshot1", + "type": "Microsoft.Compute/snapshots", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:47:30.6630569+00:00" + }, + "tags": { + "department": "Development", + "project": "Snapshots" + } + }, + { + "name": "mySnapshot2", + "type": "Microsoft.Compute/snapshots", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:47:30.3247198+00:00" + }, + "tags": { + "department": "Development", + "project": "Snapshots" + } + } + ] + } + } + }, + "operationId": "Snapshots_List", + "title": "List all snapshots in a subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_ListByResourceGroup.json new file mode 100644 index 0000000000..e2a832bb9f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_ListByResourceGroup.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "mySnapshot", + "type": "Microsoft.Compute/snapshots", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:41:35.9278721+00:00" + }, + "tags": { + "department": "Development", + "project": "Snapshots" + } + } + ] + } + } + }, + "operationId": "Snapshots_ListByResourceGroup", + "title": "List all snapshots in a resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_RevokeAccess.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_RevokeAccess.json new file mode 100644 index 0000000000..984c116e1f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_RevokeAccess.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshotName": "mySnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + } + }, + "operationId": "Snapshots_RevokeAccess", + "title": "Revoke access to a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshot.json new file mode 100644 index 0000000000..688004c198 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshot.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshot": { + "properties": { + "diskSizeGB": 20 + }, + "tags": { + "department": "Development", + "project": "UpdateSnapshots" + } + }, + "snapshotName": "mySnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "diskSizeGB": 20, + "provisioningState": "Succeeded" + }, + "tags": { + "department": "Development", + "project": "UpdateSnapshots" + } + } + }, + "202": { + "body": { + "name": "mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "diskSizeGB": 20, + "provisioningState": "Updating" + }, + "tags": { + "department": "Development", + "project": "UpdateSnapshots" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot?api-version=2021-04-01" + } + } + }, + "operationId": "Snapshots_Update", + "title": "Update a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshotWithAcceleratedNetworking.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshotWithAcceleratedNetworking.json new file mode 100644 index 0000000000..fc443b9094 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshotWithAcceleratedNetworking.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshot": { + "properties": { + "diskSizeGB": 20, + "supportedCapabilities": { + "acceleratedNetwork": false + } + }, + "tags": { + "department": "Development", + "project": "UpdateSnapshots" + } + }, + "snapshotName": "mySnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "diskSizeGB": 20, + "provisioningState": "Succeeded", + "supportedCapabilities": { + "acceleratedNetwork": false + } + }, + "tags": { + "department": "Development", + "project": "UpdateSnapshots" + } + } + }, + "202": { + "body": { + "name": "mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "diskSizeGB": 20, + "provisioningState": "Updating", + "supportedCapabilities": { + "acceleratedNetwork": false + } + }, + "tags": { + "department": "Development", + "project": "UpdateSnapshots" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot?api-version=2021-04-01" + } + } + }, + "operationId": "Snapshots_Update", + "title": "Update a snapshot with accelerated networking." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Create.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Create.json new file mode 100644 index 0000000000..fa24a20234 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Create.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "publicKey": "{ssh-rsa public key}" + } + }, + "resourceGroupName": "myResourceGroup", + "sshPublicKeyName": "mySshPublicKeyName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySshPublicKeyName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/sshPublicKeys/mySshPublicKeyName", + "location": "westus", + "properties": { + "publicKey": "{ssh-rsa public key}" + } + } + }, + "201": { + "body": { + "name": "mySshPublicKeyName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/sshPublicKeys/mySshPublicKeyName", + "location": "westus", + "properties": { + "publicKey": "{ssh-rsa public key}" + } + } + } + }, + "operationId": "SshPublicKeys_Create", + "title": "Create a new SSH public key resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMaximumSetGen.json new file mode 100644 index 0000000000..4e8ee192a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMaximumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "sshPublicKeyName": "aaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "SshPublicKeys_Delete", + "title": "SshPublicKey_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMinimumSetGen.json new file mode 100644 index 0000000000..e96813875f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMinimumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "sshPublicKeyName": "aaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "SshPublicKeys_Delete", + "title": "SshPublicKey_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_GenerateKeyPair.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_GenerateKeyPair.json new file mode 100644 index 0000000000..e63da376f8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_GenerateKeyPair.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "sshPublicKeyName": "mySshPublicKeyName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/SshPublicKeys/mySshPublicKeyName", + "privateKey": "{ssh private key}", + "publicKey": "{ssh-rsa public key}" + } + } + }, + "operationId": "SshPublicKeys_GenerateKeyPair", + "title": "Generate an SSH key pair." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Get.json new file mode 100644 index 0000000000..3a8c8ec9fe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Get.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "sshPublicKeyName": "mySshPublicKeyName", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "mySshPublicKeyName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/SshPublicKeys/mySshPublicKeyName", + "location": "westus", + "properties": { + "publicKey": "{ssh-rsa public key}" + }, + "tags": { + "{tagName}": "{tagValue}" + } + } + } + }, + "operationId": "SshPublicKeys_Get", + "title": "Get an ssh public key." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMaximumSetGen.json new file mode 100644 index 0000000000..733a8fd7a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMaximumSetGen.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaa", + "value": [ + { + "name": "mySshPublicKeyName", + "type": "aaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/sshPublicKeys/mySshPublicKeyName", + "location": "westus", + "properties": { + "publicKey": "{ssh-rsa public key}" + }, + "tags": { + "key6396": "aaaaaaaaaaaaa", + "key8839": "aaa" + } + } + ] + } + } + }, + "operationId": "SshPublicKeys_ListByResourceGroup", + "title": "SshPublicKey_ListByResourceGroup_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMinimumSetGen.json new file mode 100644 index 0000000000..6d7010bece --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMinimumSetGen.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/sshPublicKeys/mySshPublicKeyName", + "location": "westus" + } + ] + } + } + }, + "operationId": "SshPublicKeys_ListByResourceGroup", + "title": "SshPublicKey_ListByResourceGroup_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMaximumSetGen.json new file mode 100644 index 0000000000..5ffabad8f3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMaximumSetGen.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaa", + "value": [ + { + "name": "mySshPublicKeyName", + "type": "aaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/sshPublicKeys/mySshPublicKeyName", + "location": "westus", + "properties": { + "publicKey": "{ssh-rsa public key}" + }, + "tags": { + "key6396": "aaaaaaaaaaaaa", + "key8839": "aaa" + } + } + ] + } + } + }, + "operationId": "SshPublicKeys_ListBySubscription", + "title": "SshPublicKey_ListBySubscription_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMinimumSetGen.json new file mode 100644 index 0000000000..e18fda32b1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/sshPublicKeys/mySshPublicKeyName", + "location": "westus" + } + ] + } + } + }, + "operationId": "SshPublicKeys_ListBySubscription", + "title": "SshPublicKey_ListBySubscription_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMaximumSetGen.json new file mode 100644 index 0000000000..dedd50aa06 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMaximumSetGen.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "properties": { + "publicKey": "{ssh-rsa public key}" + }, + "tags": { + "key2854": "a" + } + }, + "resourceGroupName": "rgcompute", + "sshPublicKeyName": "aaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySshPublicKeyName", + "type": "aaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/sshPublicKeys/mySshPublicKeyName", + "location": "westus", + "properties": { + "publicKey": "{ssh-rsa public key}" + }, + "tags": { + "key6396": "aaaaaaaaaaaaa", + "key8839": "aaa" + } + } + } + }, + "operationId": "SshPublicKeys_Update", + "title": "SshPublicKey_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMinimumSetGen.json new file mode 100644 index 0000000000..0ecbb95831 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "resourceGroupName": "rgcompute", + "sshPublicKeyName": "aaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "location": "westus" + } + } + }, + "operationId": "SshPublicKeys_Update", + "title": "SshPublicKey_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMaximumSetGen.json new file mode 100644 index 0000000000..f5ddc129c3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMaximumSetGen.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "type": "aaaaaaaaaaaaaaaaaa", + "api-version": "2023-07-01", + "location": "aaaaaaaaaaaaa", + "publisherName": "aaaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}", + "version": "aaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "aaaaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaa", + "properties": { + "computeRole": "aaaaaaaaaaaaaaaaa", + "handlerSchema": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "operatingSystem": "aaaaaaaaaaaaaaaaaa", + "supportsMultipleExtensions": true, + "vmScaleSetEnabled": true + }, + "tags": { + "key9885": "aaaaaaaaa" + } + } + } + }, + "operationId": "VirtualMachineExtensionImages_Get", + "title": "VirtualMachineExtensionImage_Get_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMinimumSetGen.json new file mode 100644 index 0000000000..32f556b793 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMinimumSetGen.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "type": "aa", + "api-version": "2023-07-01", + "location": "aaaaaaaaaaaaaa", + "publisherName": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}", + "version": "aaa" + }, + "responses": { + "200": { + "body": { + "name": "aaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaa" + } + } + }, + "operationId": "VirtualMachineExtensionImages_Get", + "title": "VirtualMachineExtensionImage_Get_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMaximumSetGen.json new file mode 100644 index 0000000000..072cb56aa0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMaximumSetGen.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "location": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "publisherName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": [ + { + "name": "aaaaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaa", + "properties": { + "computeRole": "aaaaaaaaaaaaaaaaa", + "handlerSchema": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "operatingSystem": "aaaaaaaaaaaaaaaaaa", + "supportsMultipleExtensions": true, + "vmScaleSetEnabled": true + }, + "tags": { + "key9885": "aaaaaaaaa" + } + } + ] + } + }, + "operationId": "VirtualMachineExtensionImages_ListTypes", + "title": "VirtualMachineExtensionImage_ListTypes_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMinimumSetGen.json new file mode 100644 index 0000000000..b68e29e0ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMinimumSetGen.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "location": "aaaa", + "publisherName": "aa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": [ + { + "name": "aaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaa" + } + ] + } + }, + "operationId": "VirtualMachineExtensionImages_ListTypes", + "title": "VirtualMachineExtensionImage_ListTypes_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMaximumSetGen.json new file mode 100644 index 0000000000..98121c98c7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMaximumSetGen.json @@ -0,0 +1,148 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": { + "location": "westus", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "a", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "publisher": "extPublisher", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.2" + }, + "tags": { + "key9183": "aa" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "aaaaaaaaaaaaa", + "vmName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "a", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.2" + }, + "tags": { + "key9183": "aa" + } + } + }, + "201": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "a", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.2" + }, + "tags": { + "key9183": "aa" + } + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineExtensions_CreateOrUpdate", + "title": "VirtualMachineExtension_CreateOrUpdate_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMinimumSetGen.json new file mode 100644 index 0000000000..edcf0e2574 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMinimumSetGen.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": { + "location": "westus" + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "myVMExtension", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus" + } + }, + "201": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus" + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineExtensions_CreateOrUpdate", + "title": "VirtualMachineExtension_CreateOrUpdate_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMaximumSetGen.json new file mode 100644 index 0000000000..0a468b42e6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMaximumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "vmName": "aaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "VirtualMachineExtensions_Delete", + "title": "VirtualMachineExtension_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMinimumSetGen.json new file mode 100644 index 0000000000..ca9870b410 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "aa", + "vmName": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "VirtualMachineExtensions_Delete", + "title": "VirtualMachineExtension_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMaximumSetGen.json new file mode 100644 index 0000000000..3862aafc00 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMaximumSetGen.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "$expand": "aaaaaa", + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "aaaaaaa", + "vmName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "a", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.2" + }, + "tags": { + "key9183": "aa" + } + } + } + }, + "operationId": "VirtualMachineExtensions_Get", + "title": "VirtualMachineExtension_Get_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMinimumSetGen.json new file mode 100644 index 0000000000..9ac16118a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "myVMExtension", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus" + } + } + }, + "operationId": "VirtualMachineExtensions_Get", + "title": "VirtualMachineExtension_Get_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMaximumSetGen.json new file mode 100644 index 0000000000..acef71393a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMaximumSetGen.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "$expand": "aaaaaaaaaaaaaaaaa", + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "a", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.2" + }, + "tags": { + "key9183": "aa" + } + } + ] + } + } + }, + "operationId": "VirtualMachineExtensions_List", + "title": "VirtualMachineExtension_List_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMinimumSetGen.json new file mode 100644 index 0000000000..69864d9c70 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMinimumSetGen.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": {} + } + }, + "operationId": "VirtualMachineExtensions_List", + "title": "VirtualMachineExtension_List_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Update.json new file mode 100644 index 0000000000..41cf1094fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Update.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": { + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "suppressFailures": true, + "typeHandlerVersion": "1.2" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "myVMExtension", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "suppressFailures": true, + "typeHandlerVersion": "1.2" + } + } + } + }, + "operationId": "VirtualMachineExtensions_Update", + "title": "Update VM extension." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_CreateOrUpdate.json new file mode 100644 index 0000000000..419b9b2c68 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_CreateOrUpdate.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "runCommand": { + "location": "West US", + "properties": { + "asyncExecution": false, + "errorBlobUri": "https://mystorageaccount.blob.core.windows.net/scriptcontainer/scriptURI", + "outputBlobManagedIdentity": { + "clientId": "22d35efb-0c99-4041-8c5b-6d24db33a69a" + }, + "outputBlobUri": "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt", + "parameters": [ + { + "name": "param1", + "value": "value1" + }, + { + "name": "param2", + "value": "value2" + } + ], + "runAsPassword": "", + "runAsUser": "user1", + "source": { + "scriptUri": "https://mystorageaccount.blob.core.windows.net/scriptcontainer/scriptURI" + }, + "timeoutInSeconds": 3600, + "treatFailureAsDeploymentFailure": false + } + }, + "runCommandName": "myRunCommand", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myRunCommand", + "type": "Microsoft.Compute/virtualMachines/runCommands", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/runCommands/myRunCommand", + "location": "westus", + "properties": { + "asyncExecution": false, + "errorBlobUri": "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt", + "outputBlobUri": "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt", + "parameters": [ + { + "name": "param1", + "value": "value1" + }, + { + "name": "param2", + "value": "value2" + } + ], + "provisioningState": "Succeeded", + "runAsUser": "user1", + "source": { + "scriptUri": "https://mystorageaccount.blob.core.windows.net/scriptcontainer/MyScript.ps1" + }, + "timeoutInSeconds": 3600, + "treatFailureAsDeploymentFailure": false + }, + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + }, + "201": { + "body": { + "name": "myRunCommand", + "type": "Microsoft.Compute/virtualMachines/runCommands", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/runCommands/myRunCommand", + "location": "westus", + "properties": { + "asyncExecution": false, + "errorBlobUri": "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt", + "outputBlobUri": "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt", + "parameters": [ + { + "name": "param1", + "value": "value1" + }, + { + "name": "param2", + "value": "value2" + } + ], + "provisioningState": "Creating", + "runAsUser": "user1", + "source": { + "scriptUri": "https://mystorageaccount.blob.core.windows.net/scriptcontainer/MyScript.ps1" + }, + "timeoutInSeconds": 3600, + "treatFailureAsDeploymentFailure": false + }, + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + } + }, + "operationId": "VirtualMachineRunCommands_CreateOrUpdate", + "title": "Create or update a run command." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Delete.json new file mode 100644 index 0000000000..d04613e1f9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "runCommandName": "myRunCommand", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + }, + "204": {} + }, + "operationId": "VirtualMachineRunCommands_Delete", + "title": "Delete a run command." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_GetByVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_GetByVirtualMachine.json new file mode 100644 index 0000000000..4240d40bf0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_GetByVirtualMachine.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "runCommandName": "myRunCommand", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myRunCommand", + "type": "Microsoft.Compute/virtualMachines/runCommands", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/runCommands/myRunCommand", + "location": "westus", + "properties": { + "asyncExecution": false, + "errorBlobUri": "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt", + "outputBlobUri": "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt", + "parameters": [ + { + "name": "param1", + "value": "value1" + }, + { + "name": "param2", + "value": "value2" + } + ], + "provisioningState": "Succeeded", + "runAsUser": "user1", + "source": { + "script": "Write-Host Hello World! ; Remove-Item C:\test\testFile.txt" + }, + "timeoutInSeconds": 3600, + "treatFailureAsDeploymentFailure": false + }, + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + } + }, + "operationId": "VirtualMachineRunCommands_GetByVirtualMachine", + "title": "Get a run command." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_List.json new file mode 100644 index 0000000000..cf7ad918a8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_List.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "location": "SoutheastAsia", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "description": "Configure the machine to enable remote PowerShell.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "EnableRemotePS", + "label": "Enable remote PowerShell", + "osType": "Windows" + }, + { + "description": "Shows detailed information for the IP address, subnet mask and default gateway for each adapter bound to TCP/IP.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "IPConfig", + "label": "List IP configuration", + "osType": "Windows" + }, + { + "description": "Custom multiline PowerShell script should be defined in script property. Optional parameters can be set in parameters property.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "RunPowerShellScript", + "label": "Executes a PowerShell script", + "osType": "Windows" + }, + { + "description": "Custom multiline shell script should be defined in script property. Optional parameters can be set in parameters property.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "RunShellScript", + "label": "Executes a Linux shell script", + "osType": "Linux" + }, + { + "description": "Get the configuration of all network interfaces.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "ifconfig", + "label": "List network configuration", + "osType": "Linux" + }, + { + "description": "Checks if the local Administrator account is disabled, and if so enables it.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "EnableAdminAccount", + "label": "Enable administrator account", + "osType": "Windows" + }, + { + "description": "Reset built-in Administrator account password.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "ResetAccountPassword", + "label": "Reset built-in Administrator account password", + "osType": "Windows" + }, + { + "description": "Checks registry settings and domain policy settings. Suggests policy actions if machine is part of a domain or modifies the settings to default values.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "RDPSettings", + "label": "Verify RDP Listener Settings", + "osType": "Windows" + }, + { + "description": "Sets the default or user specified port number for Remote Desktop connections. Enables firewall rule for inbound access to the port.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "SetRDPPort", + "label": "Set Remote Desktop port", + "osType": "Windows" + }, + { + "description": "Removes the SSL certificate tied to the RDP listener and restores the RDP listerner security to default. Use this script if you see any issues with the certificate.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "ResetRDPCert", + "label": "Restore RDP Authentication mode to defaults", + "osType": "Windows" + } + ] + } + } + }, + "operationId": "VirtualMachineRunCommands_List", + "title": "VirtualMachineRunCommandList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_ListByVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_ListByVirtualMachine.json new file mode 100644 index 0000000000..9cfd9c236f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_ListByVirtualMachine.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "myRunCommand", + "type": "Microsoft.Compute/virtualMachines/runCommands", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/runCommands/myRunCommand", + "location": "westus", + "properties": { + "asyncExecution": false, + "errorBlobUri": "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt", + "outputBlobUri": "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt", + "parameters": [ + { + "name": "param1", + "value": "value1" + }, + { + "name": "param2", + "value": "value2" + } + ], + "provisioningState": "Succeeded", + "runAsUser": "user1", + "source": { + "script": "Write-Host Hello World!" + }, + "timeoutInSeconds": 0, + "treatFailureAsDeploymentFailure": false + }, + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + ] + } + } + }, + "operationId": "VirtualMachineRunCommands_ListByVirtualMachine", + "title": "List run commands in a Virtual Machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Update.json new file mode 100644 index 0000000000..091a4a039f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Update.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "runCommand": { + "properties": { + "asyncExecution": false, + "errorBlobManagedIdentity": { + "objectId": "4231e4d2-33e4-4e23-96b2-17888afa6072" + }, + "errorBlobUri": "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt", + "outputBlobUri": "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/outputUri", + "parameters": [ + { + "name": "param1", + "value": "value1" + }, + { + "name": "param2", + "value": "value2" + } + ], + "runAsPassword": "", + "runAsUser": "user1", + "source": { + "script": "Write-Host Hello World! ; Remove-Item C:\test\testFile.txt" + }, + "timeoutInSeconds": 3600 + } + }, + "runCommandName": "myRunCommand", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myRunCommand", + "type": "Microsoft.Compute/virtualMachines/runCommands", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/runCommands/myRunCommand", + "location": "westus", + "properties": { + "asyncExecution": false, + "errorBlobUri": "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt", + "outputBlobUri": "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt", + "parameters": [ + { + "name": "param1", + "value": "value1" + }, + { + "name": "param2", + "value": "value2" + } + ], + "provisioningState": "Updating", + "runAsUser": "user1", + "source": { + "script": "Write-Host Hello World! ; Remove-Item C:\test\testFile.txt" + }, + "timeoutInSeconds": 3600, + "treatFailureAsDeploymentFailure": false + }, + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + } + }, + "operationId": "VirtualMachineRunCommands_Update", + "title": "Update a run command." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMaximumSetGen.json new file mode 100644 index 0000000000..8c8bcfb0e2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMaximumSetGen.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaa", + "vmssExtensionName": "aaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "{extension-name}", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaa", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "provisioningState": "aaa", + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + }, + "201": { + "body": { + "name": "{extension-name}", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaa", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "provisioningState": "aaa", + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetExtensions_CreateOrUpdate", + "title": "VirtualMachineScaleSetExtension_CreateOrUpdate_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMinimumSetGen.json new file mode 100644 index 0000000000..b081fdc5aa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaa", + "vmssExtensionName": "aaaaaaaaaaa" + }, + "responses": { + "200": { + "body": {} + }, + "201": { + "body": {}, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetExtensions_CreateOrUpdate", + "title": "VirtualMachineScaleSetExtension_CreateOrUpdate_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMaximumSetGen.json new file mode 100644 index 0000000000..5caa1a734d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMaximumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "vmssExtensionName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "VirtualMachineScaleSetExtensions_Delete", + "title": "VirtualMachineScaleSetExtension_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMinimumSetGen.json new file mode 100644 index 0000000000..a377945d74 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaa", + "vmssExtensionName": "aaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "VirtualMachineScaleSetExtensions_Delete", + "title": "VirtualMachineScaleSetExtension_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMaximumSetGen.json new file mode 100644 index 0000000000..b16693ac77 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMaximumSetGen.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "$expand": "aaaaaaa", + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa", + "vmssExtensionName": "aaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "{extension-name}", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaa", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "provisioningState": "aaa", + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + } + }, + "operationId": "VirtualMachineScaleSetExtensions_Get", + "title": "VirtualMachineScaleSetExtension_Get_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMinimumSetGen.json new file mode 100644 index 0000000000..68dd6b583d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMinimumSetGen.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "a", + "vmssExtensionName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": {} + } + }, + "operationId": "VirtualMachineScaleSetExtensions_Get", + "title": "VirtualMachineScaleSetExtension_Get_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMaximumSetGen.json new file mode 100644 index 0000000000..98bd33075a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMaximumSetGen.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "nextLink": "aa", + "value": [ + { + "name": "{extension-name}", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaa", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "provisioningState": "aaa", + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSetExtensions_List", + "title": "VirtualMachineScaleSetExtension_List_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMinimumSetGen.json new file mode 100644 index 0000000000..59ffca6e76 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "value": [ + {} + ] + } + } + }, + "operationId": "VirtualMachineScaleSetExtensions_List", + "title": "VirtualMachineScaleSetExtension_List_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMaximumSetGen.json new file mode 100644 index 0000000000..0848c0697a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMaximumSetGen.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": { + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "vmssExtensionName": "aaaa" + }, + "responses": { + "200": { + "body": { + "name": "{extension-name}", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaa", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "provisioningState": "aaa", + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + }, + "201": { + "body": { + "name": "{extension-name}", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaa", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "provisioningState": "aaa", + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetExtensions_Update", + "title": "VirtualMachineScaleSetExtension_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMinimumSetGen.json new file mode 100644 index 0000000000..d590e325db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "vmssExtensionName": "aa" + }, + "responses": { + "200": { + "body": {} + }, + "201": { + "body": {}, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetExtensions_Update", + "title": "VirtualMachineScaleSetExtension_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMaximumSetGen.json new file mode 100644 index 0000000000..8cc0f8b000 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetRollingUpgrades_Cancel", + "title": "VirtualMachineScaleSetRollingUpgrade_Cancel_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMinimumSetGen.json new file mode 100644 index 0000000000..e3b188b6e7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetRollingUpgrades_Cancel", + "title": "VirtualMachineScaleSetRollingUpgrade_Cancel_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMaximumSetGen.json new file mode 100644 index 0000000000..6b19edc110 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMaximumSetGen.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "aaaaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaa", + "location": "aaaaaa", + "properties": { + "error": { + "code": "aaaaaaa", + "innererror": { + "errordetail": "aaaaaaaaaaaaaaaaaaaaaaaa", + "exceptiontype": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "message": "aaaaaaaaa", + "target": "aaaaaaa", + "details": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaaa", + "message": "aa", + "target": "aaaa" + } + ] + }, + "policy": { + "enableCrossZoneUpgrade": true, + "maxBatchInstancePercent": 49, + "maxSurge": true, + "maxUnhealthyInstancePercent": 81, + "maxUnhealthyUpgradedInstancePercent": 98, + "pauseTimeBetweenBatches": "aaaaaaaaaaaaaaa", + "prioritizeUnhealthyInstances": true, + "rollbackFailedInstancesOnPolicyBreach": true + }, + "progress": { + "failedInstanceCount": 25, + "inProgressInstanceCount": 20, + "pendingInstanceCount": 27, + "successfulInstanceCount": 6 + }, + "runningStatus": { + "code": "RollingForward", + "lastAction": "Start", + "lastActionTime": "2021-11-30T13:06:23.362Z", + "startTime": "2021-11-30T13:06:23.362Z" + } + }, + "tags": { + "key8533": "aaaaaaaaaaaaaaaaaaaaaaaa" + } + } + } + }, + "operationId": "VirtualMachineScaleSetRollingUpgrades_GetLatest", + "title": "VirtualMachineScaleSetRollingUpgrade_GetLatest_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMinimumSetGen.json new file mode 100644 index 0000000000..2af4ebb80d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "id": "aaaaaaaaaa", + "location": "aaaaaa" + } + } + }, + "operationId": "VirtualMachineScaleSetRollingUpgrades_GetLatest", + "title": "VirtualMachineScaleSetRollingUpgrade_GetLatest_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartExtensionUpgrade.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartExtensionUpgrade.json new file mode 100644 index 0000000000..c847cef6a7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartExtensionUpgrade.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachineScaleSetRollingUpgrades_StartExtensionUpgrade", + "title": "Start an extension rolling upgrade." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMaximumSetGen.json new file mode 100644 index 0000000000..6910a88ab0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade", + "title": "VirtualMachineScaleSetRollingUpgrade_StartOSUpgrade_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMinimumSetGen.json new file mode 100644 index 0000000000..c68c409441 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade", + "title": "VirtualMachineScaleSetRollingUpgrade_StartOSUpgrade_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_CreateOrUpdate.json new file mode 100644 index 0000000000..87d7c9f562 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_CreateOrUpdate.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": { + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.2" + } + }, + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "myVMExtension", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/extensions/myVMExtension", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.2" + } + } + }, + "201": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/extensions/myVMExtension", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.2" + } + } + } + }, + "operationId": "VirtualMachineScaleSetVMExtensions_CreateOrUpdate", + "title": "Create VirtualMachineScaleSet VM extension." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Delete.json new file mode 100644 index 0000000000..078be51f4d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "myVMExtension", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + }, + "204": {} + }, + "operationId": "VirtualMachineScaleSetVMExtensions_Delete", + "title": "Delete VirtualMachineScaleSet VM extension." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Get.json new file mode 100644 index 0000000000..4b96d22c1c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Get.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "myVMExtension", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/extensions/myVMExtension", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.2" + } + } + } + }, + "operationId": "VirtualMachineScaleSetVMExtensions_Get", + "title": "Get VirtualMachineScaleSet VM extension." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_List.json new file mode 100644 index 0000000000..5676ff0ea8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_List.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/extensions/myVMExtension", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "provisioningState": "Succeeded", + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.2" + } + }, + { + "name": "myVMExtension1", + "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/extensions/myVMExtension1", + "properties": { + "type": "extType1", + "autoUpgradeMinorVersion": true, + "provisioningState": "Succeeded", + "publisher": "extPublisher1", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.0" + } + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSetVMExtensions_List", + "title": "List extensions in Vmss instance." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Update.json new file mode 100644 index 0000000000..0fafa60a43 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Update.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": { + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.2" + } + }, + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "myVMExtension", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/extensions/myVMExtension", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.2" + } + } + } + }, + "operationId": "VirtualMachineScaleSetVMExtensions_Update", + "title": "Update VirtualMachineScaleSet VM extension." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMaximumSetGen.json new file mode 100644 index 0000000000..2acf5a3899 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Deallocate", + "title": "VirtualMachineScaleSetVM_Deallocate_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMinimumSetGen.json new file mode 100644 index 0000000000..15fd7aa4aa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Deallocate", + "title": "VirtualMachineScaleSetVM_Deallocate_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Delete.json new file mode 100644 index 0000000000..992a611f79 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "forceDeletion": "true", + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + }, + "204": {} + }, + "operationId": "VirtualMachineScaleSetVMs_Delete", + "title": "Force Delete a virtual machine from a VM scale set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_GetInstanceView.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_GetInstanceView.json new file mode 100644 index 0000000000..e37af7c6a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_GetInstanceView.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myVirtualMachineScaleSet" + }, + "responses": { + "200": { + "body": { + "assignedHost": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/hostGroups/myHostGroup/hosts/myHost", + "bootDiagnostics": null, + "disks": [ + { + "name": "myOSDisk", + "encryptionSettings": null, + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": null, + "time": "2023-07-01T04:58:58.0882815+00:00" + } + ] + } + ], + "platformFaultDomain": 0, + "platformUpdateDomain": 0, + "rdpThumbPrint": null, + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": null, + "time": "2020-06-05T04:59:58.1852966+00:00" + }, + { + "code": "PowerState/running", + "displayStatus": "VM running", + "level": "Info", + "message": null, + "time": null + } + ], + "vmAgent": { + "extensionHandlers": null, + "statuses": [ + { + "code": "ProvisioningState/Unavailable", + "displayStatus": "Not Ready", + "level": "Warning", + "message": "VM status blob is found but not yet populated.", + "time": "2023-07-01T05:00:32+00:00" + } + ], + "vmAgentVersion": "Unknown" + }, + "extensions": null + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_GetInstanceView", + "title": "Get instance view of a virtual machine from a VM scale set placed on a dedicated host group through automatic placement." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithUserData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithUserData.json new file mode 100644 index 0000000000..30d0fee4f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithUserData.json @@ -0,0 +1,135 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "expand": "UserData", + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": {}, + "latestModelApplied": true, + "modelDefinitionApplied": "VirtualMachineScaleSet", + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0/networkInterfaces/vmsstestnetconfig5415" + } + ] + }, + "networkProfileConfiguration": { + "networkInterfaceConfigurations": [ + { + "name": "vmsstestnetconfig5415", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": false, + "ipConfigurations": [ + { + "name": "vmsstestnetconfig9693", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vn4071/subnets/sn5503" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "test000000", + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [ + { + "name": "vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 128, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": false + } + ], + "imageReference": { + "exactVersion": "4.127.20180315", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2012-R2-Datacenter", + "version": "4.127.20180315" + }, + "osDisk": { + "name": "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "caching": "None", + "createOption": "FromImage", + "diskSizeGB": 127, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "42af9fdf-b906-4ad7-9905-8316209ff619" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "westus", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "typeHandlerVersion": "1.9" + }, + "tags": { + "displayName": "CustomScriptExtension-DSC" + } + } + ], + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Get", + "title": "Get VM scale set VM with UserData" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithVmSizeProperties.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithVmSizeProperties.json new file mode 100644 index 0000000000..16140d7f15 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithVmSizeProperties.json @@ -0,0 +1,140 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "expand": "UserData", + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "latestModelApplied": true, + "modelDefinitionApplied": "VirtualMachineScaleSet", + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0/networkInterfaces/vmsstestnetconfig5415" + } + ] + }, + "networkProfileConfiguration": { + "networkInterfaceConfigurations": [ + { + "name": "vmsstestnetconfig5415", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": false, + "ipConfigurations": [ + { + "name": "vmsstestnetconfig9693", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vn4071/subnets/sn5503" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "test000000", + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [ + { + "name": "vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 128, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": false + } + ], + "imageReference": { + "exactVersion": "4.127.20180315", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2012-R2-Datacenter", + "version": "4.127.20180315" + }, + "osDisk": { + "name": "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "caching": "None", + "createOption": "FromImage", + "diskSizeGB": 127, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "42af9fdf-b906-4ad7-9905-8316209ff619" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "westus", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "typeHandlerVersion": "1.9" + }, + "tags": { + "displayName": "CustomScriptExtension-DSC" + } + } + ], + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Get", + "title": "Get VM scale set VM with VMSizeProperties" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMaximumSetGen.json new file mode 100644 index 0000000000..83795449f7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMaximumSetGen.json @@ -0,0 +1,548 @@ +{ + "parameters": { + "$expand": "aaaaaaaaaaaaa", + "$filter": "aaaaaaaaaaaaaa", + "$select": "aaaaaaaaaaaaaaaaaaaaa", + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "virtualMachineScaleSetName": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaaaaaaaaaaa", + "value": [ + { + "name": "{vmss-vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "instanceId": "aaaaaaaaaaaa", + "location": "westus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaa" + } + }, + "hardwareProfile": { + "vmSize": "Basic_A0", + "vmSizeProperties": { + "vCPUsAvailable": 9, + "vCPUsPerCore": 12 + } + }, + "instanceView": { + "assignedHost": "aaaaaaa", + "bootDiagnostics": { + "consoleScreenshotBlobUri": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "serialConsoleLogBlobUri": "aaaaaaaa", + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "disks": [ + { + "name": "aaaaaaaaaaa", + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ], + "maintenanceRedeployStatus": { + "isCustomerInitiatedMaintenanceAllowed": true, + "lastOperationMessage": "aaaaaa", + "lastOperationResultCode": "None", + "maintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "maintenanceWindowStartTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowStartTime": "2021-11-30T12:58:26.531Z" + }, + "placementGroupId": "aaa", + "platformFaultDomain": 14, + "platformUpdateDomain": 23, + "rdpThumbPrint": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgent": { + "extensionHandlers": [ + { + "type": "aaaaaaaaaaaaa", + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + }, + "typeHandlerVersion": "aaaaa" + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgentVersion": "aaaaaaaaaaaaaaaaaaaaaaa" + }, + "vmHealth": { + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "extensions": [ + { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "latestModelApplied": true, + "licenseType": "aaaaaaaaaa", + "modelDefinitionApplied": "VirtualMachineScaleSet", + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 2, + "ipTags": [ + { + "ipTagType": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0/networkInterfaces/vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "networkProfileConfiguration": { + "networkInterfaceConfigurations": [ + { + "name": "vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "vmsstestnetconfig9693", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 18, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vn4071/subnets/sn5503" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "test000000", + "customData": "aaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "protectionPolicy": { + "protectFromScaleIn": true, + "protectFromScaleSetActions": true + }, + "provisioningState": "Succeeded", + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "caching": "None", + "createOption": "Empty", + "deleteOption": "Delete", + "detachOption": "ForceDetach", + "diskIOPSReadWrite": 18, + "diskMBpsReadWrite": 29, + "diskSizeGB": 128, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": true, + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + ], + "imageReference": { + "exactVersion": "4.127.20180315", + "id": "a", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20180315" + }, + "osDisk": { + "name": "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "timeCreated": "2021-06-27T01:02:38.3138469+00:00", + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "42af9fdf-b906-4ad7-9905-8316209ff619" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "westus", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaa", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.9" + }, + "tags": {} + } + ], + "sku": { + "name": "Classic", + "capacity": 29, + "tier": "aaaaaaaaaaaaaa" + }, + "tags": {}, + "zones": [ + "a" + ] + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_List", + "title": "VirtualMachineScaleSetVM_List_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMinimumSetGen.json new file mode 100644 index 0000000000..419d0fbf7e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMinimumSetGen.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "virtualMachineScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "location": "westus" + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_List", + "title": "VirtualMachineScaleSetVM_List_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMaximumSetGen.json new file mode 100644 index 0000000000..374077cabc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_PerformMaintenance", + "title": "VirtualMachineScaleSetVM_PerformMaintenance_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMinimumSetGen.json new file mode 100644 index 0000000000..e517b4e158 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_PerformMaintenance", + "title": "VirtualMachineScaleSetVM_PerformMaintenance_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMaximumSetGen.json new file mode 100644 index 0000000000..b3d7bf5758 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMaximumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaa", + "resourceGroupName": "rgcompute", + "skipShutdown": true, + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_PowerOff", + "title": "VirtualMachineScaleSetVM_PowerOff_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMinimumSetGen.json new file mode 100644 index 0000000000..77694617d6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_PowerOff", + "title": "VirtualMachineScaleSetVM_PowerOff_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMaximumSetGen.json new file mode 100644 index 0000000000..da353c3373 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Redeploy", + "title": "VirtualMachineScaleSetVM_Redeploy_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMinimumSetGen.json new file mode 100644 index 0000000000..7d4f8396c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Redeploy", + "title": "VirtualMachineScaleSetVM_Redeploy_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMaximumSetGen.json new file mode 100644 index 0000000000..ddd9a5acf7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_ReimageAll", + "title": "VirtualMachineScaleSetVM_ReimageAll_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMinimumSetGen.json new file mode 100644 index 0000000000..ff7acca2eb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_ReimageAll", + "title": "VirtualMachineScaleSetVM_ReimageAll_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMaximumSetGen.json new file mode 100644 index 0000000000..35135b0771 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMaximumSetGen.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaa", + "vmScaleSetVMReimageInput": { + "tempDisk": true + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Reimage", + "title": "VirtualMachineScaleSetVM_Reimage_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMinimumSetGen.json new file mode 100644 index 0000000000..95a784e380 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Reimage", + "title": "VirtualMachineScaleSetVM_Reimage_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMaximumSetGen.json new file mode 100644 index 0000000000..d051f42760 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Restart", + "title": "VirtualMachineScaleSetVM_Restart_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMinimumSetGen.json new file mode 100644 index 0000000000..5debd00a34 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Restart", + "title": "VirtualMachineScaleSetVM_Restart_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RetrieveBootDiagnosticsData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RetrieveBootDiagnosticsData.json new file mode 100644 index 0000000000..63a7f27665 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RetrieveBootDiagnosticsData.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "0", + "resourceGroupName": "ResourceGroup", + "sasUriExpirationTimeInMinutes": 60, + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": { + "body": { + "consoleScreenshotBlobUri": "https://storageuri/myvmScaleSetinstance.screenshot.bmp?{saskey}", + "serialConsoleLogBlobUri": "https://storageuri/myvmScaleSetinstance.serialconsole.log?{saskey}" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_RetrieveBootDiagnosticsData", + "title": "RetrieveBootDiagnosticsData of a virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RunCommand.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RunCommand.json new file mode 100644 index 0000000000..eee25c4f9f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RunCommand.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "0", + "parameters": { + "commandId": "RunPowerShellScript", + "script": [ + "Write-Host Hello World!" + ] + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myVirtualMachineScaleSet" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "code": "ComponentStatus/StdOut/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": "Hello World!" + }, + { + "code": "ComponentStatus/StdErr/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": "" + } + ] + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_RunCommand", + "title": "VirtualMachineScaleSetVMs_RunCommand" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_SimulateEviction.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_SimulateEviction.json new file mode 100644 index 0000000000..a2547f52e9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_SimulateEviction.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "InstanceId", + "resourceGroupName": "ResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "VmScaleSetName" + }, + "responses": { + "204": {} + }, + "operationId": "VirtualMachineScaleSetVMs_SimulateEviction", + "title": "Simulate Eviction a virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMaximumSetGen.json new file mode 100644 index 0000000000..93d4524d58 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Start", + "title": "VirtualMachineScaleSetVM_Start_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMinimumSetGen.json new file mode 100644 index 0000000000..8c01e4ebfc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Start", + "title": "VirtualMachineScaleSetVM_Start_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMaximumSetGen.json new file mode 100644 index 0000000000..e4ad3e3792 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMaximumSetGen.json @@ -0,0 +1,1535 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "parameters": { + "location": "westus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaa" + } + }, + "hardwareProfile": { + "vmSize": "Basic_A0", + "vmSizeProperties": { + "vCPUsAvailable": 9, + "vCPUsPerCore": 12 + } + }, + "instanceView": { + "bootDiagnostics": { + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "disks": [ + { + "name": "aaaaaaaaaaa", + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ], + "maintenanceRedeployStatus": { + "isCustomerInitiatedMaintenanceAllowed": true, + "lastOperationMessage": "aaaaaa", + "lastOperationResultCode": "None", + "maintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "maintenanceWindowStartTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowStartTime": "2021-11-30T12:58:26.531Z" + }, + "placementGroupId": "aaa", + "platformFaultDomain": 14, + "platformUpdateDomain": 23, + "rdpThumbPrint": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgent": { + "extensionHandlers": [ + { + "type": "aaaaaaaaaaaaa", + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + }, + "typeHandlerVersion": "aaaaa" + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgentVersion": "aaaaaaaaaaaaaaaaaaaaaaa" + }, + "vmHealth": { + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "extensions": [ + { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "licenseType": "aaaaaaaaaa", + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 2, + "ipTags": [ + { + "ipTagType": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0/networkInterfaces/vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "networkProfileConfiguration": { + "networkInterfaceConfigurations": [ + { + "name": "vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "vmsstestnetconfig9693", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 18, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vn4071/subnets/sn5503" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "aaaaaaaaaaaaaaaa", + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "test000000", + "customData": "aaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "protectionPolicy": { + "protectFromScaleIn": true, + "protectFromScaleSetActions": true + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "caching": "None", + "createOption": "Empty", + "deleteOption": "Delete", + "detachOption": "ForceDetach", + "diskSizeGB": 128, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": true, + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + ], + "imageReference": { + "id": "a", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20180315" + }, + "osDisk": { + "name": "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + }, + "sku": { + "name": "Classic", + "capacity": 29, + "tier": "aaaaaaaaaaaaaa" + }, + "tags": {} + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "instanceId": "aaaaaaaaaaaa", + "location": "westus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaa" + } + }, + "hardwareProfile": { + "vmSize": "Basic_A0", + "vmSizeProperties": { + "vCPUsAvailable": 9, + "vCPUsPerCore": 12 + } + }, + "instanceView": { + "assignedHost": "aaaaaaa", + "bootDiagnostics": { + "consoleScreenshotBlobUri": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "serialConsoleLogBlobUri": "aaaaaaaa", + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "disks": [ + { + "name": "aaaaaaaaaaa", + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ], + "maintenanceRedeployStatus": { + "isCustomerInitiatedMaintenanceAllowed": true, + "lastOperationMessage": "aaaaaa", + "lastOperationResultCode": "None", + "maintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "maintenanceWindowStartTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowStartTime": "2021-11-30T12:58:26.531Z" + }, + "placementGroupId": "aaa", + "platformFaultDomain": 14, + "platformUpdateDomain": 23, + "rdpThumbPrint": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgent": { + "extensionHandlers": [ + { + "type": "aaaaaaaaaaaaa", + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + }, + "typeHandlerVersion": "aaaaa" + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgentVersion": "aaaaaaaaaaaaaaaaaaaaaaa" + }, + "vmHealth": { + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "extensions": [ + { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "latestModelApplied": true, + "licenseType": "aaaaaaaaaa", + "modelDefinitionApplied": "VirtualMachineScaleSet", + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 2, + "ipTags": [ + { + "ipTagType": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0/networkInterfaces/vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "networkProfileConfiguration": { + "networkInterfaceConfigurations": [ + { + "name": "vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "vmsstestnetconfig9693", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 18, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vn4071/subnets/sn5503" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "test000000", + "customData": "aaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "protectionPolicy": { + "protectFromScaleIn": true, + "protectFromScaleSetActions": true + }, + "provisioningState": "Succeeded", + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "caching": "None", + "createOption": "Empty", + "deleteOption": "Delete", + "detachOption": "ForceDetach", + "diskIOPSReadWrite": 18, + "diskMBpsReadWrite": 29, + "diskSizeGB": 128, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": true, + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + ], + "imageReference": { + "exactVersion": "4.127.20180315", + "id": "a", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20180315" + }, + "osDisk": { + "name": "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "42af9fdf-b906-4ad7-9905-8316209ff619" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "westus", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaa", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.9" + }, + "tags": {} + } + ], + "sku": { + "name": "Classic", + "capacity": 29, + "tier": "aaaaaaaaaaaaaa" + }, + "tags": {}, + "zones": [ + "a" + ] + } + }, + "202": { + "body": { + "name": "{vmss-vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "instanceId": "aaaaaaaaaaaa", + "location": "westus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaa" + } + }, + "hardwareProfile": { + "vmSize": "Basic_A0", + "vmSizeProperties": { + "vCPUsAvailable": 9, + "vCPUsPerCore": 12 + } + }, + "instanceView": { + "assignedHost": "aaaaaaa", + "bootDiagnostics": { + "consoleScreenshotBlobUri": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "serialConsoleLogBlobUri": "aaaaaaaa", + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "disks": [ + { + "name": "aaaaaaaaaaa", + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ], + "maintenanceRedeployStatus": { + "isCustomerInitiatedMaintenanceAllowed": true, + "lastOperationMessage": "aaaaaa", + "lastOperationResultCode": "None", + "maintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "maintenanceWindowStartTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowStartTime": "2021-11-30T12:58:26.531Z" + }, + "placementGroupId": "aaa", + "platformFaultDomain": 14, + "platformUpdateDomain": 23, + "rdpThumbPrint": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgent": { + "extensionHandlers": [ + { + "type": "aaaaaaaaaaaaa", + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + }, + "typeHandlerVersion": "aaaaa" + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgentVersion": "aaaaaaaaaaaaaaaaaaaaaaa" + }, + "vmHealth": { + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "extensions": [ + { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "latestModelApplied": true, + "licenseType": "aaaaaaaaaa", + "modelDefinitionApplied": "VirtualMachineScaleSet", + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 2, + "ipTags": [ + { + "ipTagType": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0/networkInterfaces/vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "networkProfileConfiguration": { + "networkInterfaceConfigurations": [ + { + "name": "vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "vmsstestnetconfig9693", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 18, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vn4071/subnets/sn5503" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "test000000", + "customData": "aaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "protectionPolicy": { + "protectFromScaleIn": true, + "protectFromScaleSetActions": true + }, + "provisioningState": "Succeeded", + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "caching": "None", + "createOption": "Empty", + "deleteOption": "Delete", + "detachOption": "ForceDetach", + "diskIOPSReadWrite": 18, + "diskMBpsReadWrite": 29, + "diskSizeGB": 128, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": true, + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + ], + "imageReference": { + "exactVersion": "4.127.20180315", + "id": "a", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20180315" + }, + "osDisk": { + "name": "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "42af9fdf-b906-4ad7-9905-8316209ff619" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "westus", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaa", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.9" + }, + "tags": {} + } + ], + "sku": { + "name": "Classic", + "capacity": 29, + "tier": "aaaaaaaaaaaaaa" + }, + "tags": {}, + "zones": [ + "a" + ] + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Update", + "title": "VirtualMachineScaleSetVM_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMinimumSetGen.json new file mode 100644 index 0000000000..4a1229eb70 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMinimumSetGen.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaa", + "parameters": { + "location": "westus" + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "location": "westus" + } + }, + "202": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "location": "westus" + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Update", + "title": "VirtualMachineScaleSetVM_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMaximumSetGen.json new file mode 100644 index 0000000000..62ddc36986 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMaximumSetGen.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "activePlacementGroupId": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {} + }, + "operationId": "VirtualMachineScaleSets_ConvertToSinglePlacementGroup", + "title": "VirtualMachineScaleSet_ConvertToSinglePlacementGroup_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMinimumSetGen.json new file mode 100644 index 0000000000..ca75f44be0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMinimumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaa" + }, + "responses": { + "200": {} + }, + "operationId": "VirtualMachineScaleSets_ConvertToSinglePlacementGroup", + "title": "VirtualMachineScaleSet_ConvertToSinglePlacementGroup_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateACustomImageScaleSetFromAnUnmanagedGeneralizedOsImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateACustomImageScaleSetFromAnUnmanagedGeneralizedOsImage.json new file mode 100644 index 0000000000..b3bec13bf9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateACustomImageScaleSetFromAnUnmanagedGeneralizedOsImage.json @@ -0,0 +1,204 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "image": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d6e9ab29-f8c9-4792-978c-ae2c07b98f17", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "image": { + "uri": "https://{existing-storage-account-name}.blob.core.windows.net/system/Microsoft.Compute/Images/vhds/{existing-generalized-os-image-blob-name}.vhd" + }, + "osType": "Windows" + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d6e9ab29-f8c9-4792-978c-ae2c07b98f17", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "image": { + "uri": "https://{existing-storage-account-name}.blob.core.windows.net/system/Microsoft.Compute/Images/vhds/{existing-generalized-os-image-blob-name}.vhd" + }, + "osType": "Windows" + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a custom-image scale set from an unmanaged generalized os image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAPlatformImageScaleSetWithUnmanagedOsDisks.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAPlatformImageScaleSetWithUnmanagedOsDisks.json new file mode 100644 index 0000000000..4974c566f9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAPlatformImageScaleSetWithUnmanagedOsDisks.json @@ -0,0 +1,224 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "vhdContainers": [ + "http://{existing-storage-account-name-0}.blob.core.windows.net/vhdContainer", + "http://{existing-storage-account-name-1}.blob.core.windows.net/vhdContainer", + "http://{existing-storage-account-name-2}.blob.core.windows.net/vhdContainer", + "http://{existing-storage-account-name-3}.blob.core.windows.net/vhdContainer", + "http://{existing-storage-account-name-4}.blob.core.windows.net/vhdContainer" + ] + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "77b7df9a-32fe-45e3-8911-60ac9c9b9c64", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "vhdContainers": [ + "http://{existing-storage-account-name}.blob.core.windows.net/vhds" + ] + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "77b7df9a-32fe-45e3-8911-60ac9c9b9c64", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "vhdContainers": [ + "http://{existing-storage-account-name}.blob.core.windows.net/vhds" + ] + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a platform-image scale set with unmanaged os disks." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromACustomImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromACustomImage.json new file mode 100644 index 0000000000..e26b47bf92 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromACustomImage.json @@ -0,0 +1,206 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set from a custom image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromAGeneralizedSharedImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromAGeneralizedSharedImage.json new file mode 100644 index 0000000000..2578d3d37f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromAGeneralizedSharedImage.json @@ -0,0 +1,206 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set from a generalized shared image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromASpecializedSharedImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromASpecializedSharedImage.json new file mode 100644 index 0000000000..86965ede50 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromASpecializedSharedImage.json @@ -0,0 +1,185 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set from a specialized shared image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWhereNicConfigHasDisableTcpStateTrackingProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWhereNicConfigHasDisableTcpStateTrackingProperty.json new file mode 100644 index 0000000000..4aacf2a731 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWhereNicConfigHasDisableTcpStateTrackingProperty.json @@ -0,0 +1,279 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "disableTcpStateTracking": true, + "enableAcceleratedNetworking": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + }, + { + "name": "{nicConfig2-name}", + "properties": { + "disableTcpStateTracking": false, + "enableAcceleratedNetworking": false, + "enableIPForwarding": false, + "ipConfigurations": [ + { + "name": "{nicConfig2-name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + }, + { + "name": "{nicConfig2-name}", + "properties": { + "disableTcpStateTracking": false, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableFpga": false, + "ipConfigurations": [ + { + "name": "{nicConfig2-name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + }, + { + "name": "{nicConfig2-name}", + "properties": { + "disableTcpStateTracking": false, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableFpga": false, + "ipConfigurations": [ + { + "name": "{nicConfig2-name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set where nic config has DisableTcpStateTracking property" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAMarketplaceImagePlan.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAMarketplaceImagePlan.json new file mode 100644 index 0000000000..227e72da79 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAMarketplaceImagePlan.json @@ -0,0 +1,232 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with a marketplace image plan." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureApplicationGateway.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureApplicationGateway.json new file mode 100644 index 0000000000..19864fa73d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureApplicationGateway.json @@ -0,0 +1,232 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/{existing-application-gateway-name}/backendAddressPools/{existing-backend-address-pool-name}" + } + ], + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "a0134477-b9d9-484b-b0e3-205c1c089ffa", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/nsgExistingAppGw/backendAddressPools/appGatewayBackendPool" + } + ], + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "a0134477-b9d9-484b-b0e3-205c1c089ffa", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/nsgExistingAppGw/backendAddressPools/appGatewayBackendPool" + } + ], + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with an azure application gateway." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureLoadBalancer.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureLoadBalancer.json new file mode 100644 index 0000000000..fd85af4bc4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureLoadBalancer.json @@ -0,0 +1,253 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/backendAddressPools/{existing-backend-address-pool-name}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/inboundNatPools/{existing-nat-pool-name}" + } + ], + "publicIPAddressConfiguration": { + "name": "{vmss-name}", + "properties": { + "publicIPAddressVersion": "IPv4" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "ec0b21ca-51ec-414b-9323-f236ffc21479", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/myLb/backendAddressPools/lbBackendPool" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/myLb/inboundNatPools/lbNatPool" + } + ], + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "ec0b21ca-51ec-414b-9323-f236ffc21479", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/myLb/backendAddressPools/lbBackendPool" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/myLb/inboundNatPools/lbNatPool" + } + ], + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with an azure load balancer." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithApplicationProfile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithApplicationProfile.json new file mode 100644 index 0000000000..a5f562f0a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithApplicationProfile.json @@ -0,0 +1,258 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "enableAutomaticUpgrade": false, + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1", + "treatFailureAsDeploymentFailure": true + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "ffb27c5c-39a5-4d4e-b307-b32598689813", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "ffb27c5c-39a5-4d4e-b307-b32598689813", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Application Profile" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAutomaticRepairsEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAutomaticRepairsEnabled.json new file mode 100644 index 0000000000..005e7d8cfe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAutomaticRepairsEnabled.json @@ -0,0 +1,229 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "PT10M" + }, + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "PT10M" + }, + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "PT10M" + }, + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with automatic repairs enabled" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithBootDiagnostics.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithBootDiagnostics.json new file mode 100644 index 0000000000..c16909efb9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithBootDiagnostics.json @@ -0,0 +1,235 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with boot diagnostics." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskControllerType.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskControllerType.json new file mode 100644 index 0000000000..3c83a7a00e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskControllerType.json @@ -0,0 +1,251 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "hardwareProfile": { + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "diskControllerType": "NVMe", + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "diskControllerType": "NVMe", + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "diskControllerType": "SCSI", + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Disk Controller Type" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskEncryptionSetResourceInOsDiskAndDataDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskEncryptionSetResourceInOsDiskAndDataDisk.json new file mode 100644 index 0000000000..a83a187f87 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskEncryptionSetResourceInOsDiskAndDataDisk.json @@ -0,0 +1,257 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with DiskEncryptionSet resource in os disk and data disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEmptyDataDisksOnEachVm.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEmptyDataDisksOnEachVm.json new file mode 100644 index 0000000000..988e561f0b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEmptyDataDisksOnEachVm.json @@ -0,0 +1,272 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0 + }, + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1 + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 512, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Succeeded", + "singlePlacementGroup": true, + "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 512, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 512, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with empty data disks on each vm." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisks.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisks.json new file mode 100644 index 0000000000..19e0215244 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisks.json @@ -0,0 +1,241 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with ephemeral os disks." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisksUsingPlacementProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisksUsingPlacementProperty.json new file mode 100644 index 0000000000..ca752ecf61 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisksUsingPlacementProperty.json @@ -0,0 +1,244 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "ResourceDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "ResourceDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "ResourceDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with ephemeral os disks using placement property." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithExtensionTimeBudget.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithExtensionTimeBudget.json new file mode 100644 index 0000000000..2f5f1d4555 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithExtensionTimeBudget.json @@ -0,0 +1,280 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensionsTimeBudget": "PT1H20M", + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "publisher": "{extension-Publisher}", + "settings": {}, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensionsTimeBudget": "PT1H20M", + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "publisher": "{extension-Publisher}", + "settings": {}, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensionsTimeBudget": "PT1H20M", + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "publisher": "{extension-Publisher}", + "settings": {}, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with extension time budget." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithFpgaNetworkInterfaces.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithFpgaNetworkInterfaces.json new file mode 100644 index 0000000000..cc2b66816e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithFpgaNetworkInterfaces.json @@ -0,0 +1,273 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + }, + { + "name": "{fpgaNic-Name}", + "properties": { + "enableAcceleratedNetworking": false, + "enableFpga": true, + "enableIPForwarding": false, + "ipConfigurations": [ + { + "name": "{fpgaNic-Name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + }, + { + "name": "{fpgaNic-Name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableFpga": true, + "ipConfigurations": [ + { + "name": "{fpgaNic-Name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + }, + { + "name": "{fpgaNic-Name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableFpga": true, + "ipConfigurations": [ + { + "name": "{fpgaNic-Name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Fpga Network Interfaces." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithHostEncryptionUsingEncryptionAtHostProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithHostEncryptionUsingEncryptionAtHostProperty.json new file mode 100644 index 0000000000..8ac7798fa8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithHostEncryptionUsingEncryptionAtHostProperty.json @@ -0,0 +1,241 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "securityProfile": { + "encryptionAtHost": true + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityProfile": { + "encryptionAtHost": true + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityProfile": { + "encryptionAtHost": true + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Host Encryption using encryptionAtHost property." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithManagedBootDiagnostics.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithManagedBootDiagnostics.json new file mode 100644 index 0000000000..fa8c88ddb0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithManagedBootDiagnostics.json @@ -0,0 +1,232 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with managed boot diagnostics." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithNetworkInterfacesWithPublicIpAddressDnsSettings.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithNetworkInterfacesWithPublicIpAddressDnsSettings.json new file mode 100644 index 0000000000..cb3c9cfced --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithNetworkInterfacesWithPublicIpAddressDnsSettings.json @@ -0,0 +1,305 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "auxiliaryMode": "AcceleratedConnections", + "auxiliarySku": "A1", + "disableTcpStateTracking": true, + "enableAcceleratedNetworking": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + }, + { + "name": "{nicConfig2-name}", + "properties": { + "disableTcpStateTracking": false, + "enableAcceleratedNetworking": false, + "enableIPForwarding": false, + "ipConfigurations": [ + { + "name": "{nicConfig2-name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "publicip", + "properties": { + "dnsSettings": { + "domainNameLabel": "vmsstestlabel01", + "domainNameLabelScope": "NoReuse" + }, + "idleTimeoutInMinutes": 10 + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "auxiliaryMode": "AcceleratedConnections", + "auxiliarySku": "A1", + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "publicip", + "properties": { + "dnsSettings": { + "domainNameLabel": "vmsstestlabel01", + "domainNameLabelScope": "TenantReuse" + }, + "idleTimeoutInMinutes": 10 + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + }, + { + "name": "{nicConfig2-name}", + "properties": { + "disableTcpStateTracking": false, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableFpga": false, + "ipConfigurations": [ + { + "name": "{nicConfig2-name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "auxiliaryMode": "AcceleratedConnections", + "auxiliarySku": "A1", + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + }, + { + "name": "{nicConfig2-name}", + "properties": { + "disableTcpStateTracking": false, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableFpga": false, + "ipConfigurations": [ + { + "name": "{nicConfig2-name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Network Interfaces with public ip address dns settings." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithOsImageScheduledEventsEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithOsImageScheduledEventsEnabled.json new file mode 100644 index 0000000000..15f3918c55 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithOsImageScheduledEventsEnabled.json @@ -0,0 +1,235 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with OS image scheduled events enabled." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPasswordAuthentication.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPasswordAuthentication.json new file mode 100644 index 0000000000..ab8fdc3afd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPasswordAuthentication.json @@ -0,0 +1,217 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "ffb27c5c-39a5-4d4e-b307-b32598689813", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "ffb27c5c-39a5-4d4e-b307-b32598689813", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with password authentication." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPremiumStorage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPremiumStorage.json new file mode 100644 index 0000000000..830ac88ad8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPremiumStorage.json @@ -0,0 +1,217 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "19fd38a2-f50a-42c6-9dc7-3f9cf3791225", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "19fd38a2-f50a-42c6-9dc7-3f9cf3791225", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with premium storage." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPriorityMixPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPriorityMixPolicy.json new file mode 100644 index 0000000000..4c51b34baa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPriorityMixPolicy.json @@ -0,0 +1,236 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "orchestrationMode": "Flexible", + "priorityMixPolicy": { + "baseRegularPriorityCount": 4, + "regularPriorityPercentageAboveBase": 50 + }, + "singlePlacementGroup": false, + "virtualMachineProfile": { + "billingProfile": { + "maxPrice": -1 + }, + "evictionPolicy": "Deallocate", + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "priority": "Spot", + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_A8m_v2", + "capacity": 10, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "orchestrationMode": "Flexible", + "priorityMixPolicy": { + "baseRegularPriorityCount": 4, + "regularPriorityPercentageAboveBase": 50 + }, + "provisioningState": "Creating", + "singlePlacementGroup": false, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "virtualMachineProfile": { + "billingProfile": { + "maxPrice": -1 + }, + "evictionPolicy": "Deallocate", + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "priority": "Spot", + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_A8m_v2", + "capacity": 10, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "orchestrationMode": "Flexible", + "priorityMixPolicy": { + "baseRegularPriorityCount": 4, + "regularPriorityPercentageAboveBase": 50 + }, + "provisioningState": "Creating", + "singlePlacementGroup": false, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "virtualMachineProfile": { + "billingProfile": { + "maxPrice": -1 + }, + "evictionPolicy": "Deallocate", + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "priority": "Spot", + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_A8m_v2", + "capacity": 10, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with priority mix policy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithScaleInPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithScaleInPolicy.json new file mode 100644 index 0000000000..0543568721 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithScaleInPolicy.json @@ -0,0 +1,235 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "OldestVM" + ] + }, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "OldestVM" + ] + }, + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "OldestVM" + ] + }, + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with scaleInPolicy." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityPostureReference.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityPostureReference.json new file mode 100644 index 0000000000..022fac01f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityPostureReference.json @@ -0,0 +1,229 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "eastus2euap", + "properties": { + "overprovision": true, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": true + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "securityPostureReference": { + "id": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2022-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage" + } + } + } + }, + "sku": { + "name": "Standard_A1", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "eastus2euap", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d12ccb3d-ab15-4794-9836-c4196392e9f2", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": true + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityPostureReference": { + "id": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2022-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage" + } + } + } + }, + "sku": { + "name": "Standard_A1", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "eastus2euap", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d12ccb3d-ab15-4794-9836-c4196392e9f2", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": true + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityPostureReference": { + "id": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2022-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage" + } + } + } + }, + "sku": { + "name": "Standard_A1", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Security Posture Reference" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityTypeAsConfidentialVm.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityTypeAsConfidentialVm.json new file mode 100644 index 0000000000..fa23501346 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityTypeAsConfidentialVm.json @@ -0,0 +1,247 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "securityEncryptionType": "VMGuestStateOnly" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DC2as_v5", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "securityEncryptionType": "VMGuestStateOnly" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DC2as_v5", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "securityEncryptionType": "VMGuestStateOnly" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DC2as_v5", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with SecurityType as ConfidentialVM" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithServiceArtifactReference.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithServiceArtifactReference.json new file mode 100644 index 0000000000..fee9373033 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithServiceArtifactReference.json @@ -0,0 +1,229 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "eastus2euap", + "properties": { + "overprovision": true, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": true + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "serviceArtifactReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2022-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage" + } + } + } + }, + "sku": { + "name": "Standard_A1", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "eastus2euap", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "77b7df9a-32fe-45e3-8911-60ac9c9b9c64", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": true + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "serviceArtifactReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2022-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage" + } + } + } + }, + "sku": { + "name": "Standard_A1", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "eastus2euap", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "77b7df9a-32fe-45e3-8911-60ac9c9b9c64", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": true + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "serviceArtifactReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2022-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage" + } + } + } + }, + "sku": { + "name": "Standard_A1", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Service Artifact Reference" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSpotRestorePolicy.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSpotRestorePolicy.json new file mode 100644 index 0000000000..133fbacf89 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSpotRestorePolicy.json @@ -0,0 +1,244 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "spotRestorePolicy": { + "enabled": true, + "restoreTimeout": "PT1H" + }, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "billingProfile": { + "maxPrice": -1 + }, + "evictionPolicy": "Deallocate", + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "priority": "Spot", + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_A8m_v2", + "capacity": 2, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "spotRestorePolicy": { + "enabled": true, + "restoreTimeout": "PT1H" + }, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "billingProfile": { + "maxPrice": -1 + }, + "evictionPolicy": "Deallocate", + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "priority": "Spot", + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_A8m_v2", + "capacity": 2, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "spotRestorePolicy": { + "enabled": true, + "restoreTimeout": "PT1H" + }, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "billingProfile": { + "maxPrice": -1 + }, + "evictionPolicy": "Deallocate", + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "priority": "Spot", + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_A8m_v2", + "capacity": 2, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with spot restore policy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSshAuthentication.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSshAuthentication.json new file mode 100644 index 0000000000..bf35cef2ea --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSshAuthentication.json @@ -0,0 +1,241 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "fb73af19-0090-467c-9ced-b00bceab1c45", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "fb73af19-0090-467c-9ced-b00bceab1c45", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with ssh authentication." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithTerminateScheduledEventsEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithTerminateScheduledEventsEnabled.json new file mode 100644 index 0000000000..cc5ce20998 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithTerminateScheduledEventsEnabled.json @@ -0,0 +1,235 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT5M" + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT5M" + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT5M" + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with terminate scheduled events enabled." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUefiSettingsOfSecureBootAndVTpm.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUefiSettingsOfSecureBootAndVTpm.json new file mode 100644 index 0000000000..f054574aa3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUefiSettingsOfSecureBootAndVTpm.json @@ -0,0 +1,238 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "securityProfile": { + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "windowsserver-gen2preview-preview", + "publisher": "MicrosoftWindowsServer", + "sku": "windows10-tvm", + "version": "18363.592.2001092016" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityProfile": { + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "windowsserver-gen2preview-preview", + "publisher": "MicrosoftWindowsServer", + "sku": "windows10-tvm", + "version": "18363.592.2001092016" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityProfile": { + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "windowsserver-gen2preview-preview", + "publisher": "MicrosoftWindowsServer", + "sku": "windows10-tvm", + "version": "18363.592.2001092016" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Uefi Settings of secureBoot and vTPM." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUserData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUserData.json new file mode 100644 index 0000000000..697f66d879 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUserData.json @@ -0,0 +1,230 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with userData." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVirtualMachinesInDifferentZones.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVirtualMachinesInDifferentZones.json new file mode 100644 index 0000000000..21f4afe81d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVirtualMachinesInDifferentZones.json @@ -0,0 +1,286 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "centralus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0 + }, + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1 + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 512, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_A1_v2", + "capacity": 2, + "tier": "Standard" + }, + "zones": [ + "1", + "3" + ] + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "centralus", + "properties": { + "overprovision": true, + "provisioningState": "Succeeded", + "singlePlacementGroup": false, + "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa", + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 512, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + }, + "zoneBalance": false + }, + "sku": { + "name": "Standard_A1_v2", + "capacity": 2, + "tier": "Standard" + }, + "zones": [ + "1", + "3" + ] + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "centralus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": false, + "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa", + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 512, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + }, + "zoneBalance": false + }, + "sku": { + "name": "Standard_A1_v2", + "capacity": 2, + "tier": "Standard" + }, + "zones": [ + "1", + "3" + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with virtual machines in different zones." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVmSizeProperties.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVmSizeProperties.json new file mode 100644 index 0000000000..53ed22fe50 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVmSizeProperties.json @@ -0,0 +1,248 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "hardwareProfile": { + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with vm size properties" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionThatHasSuppressFailuresEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionThatHasSuppressFailuresEnabled.json new file mode 100644 index 0000000000..f458a589c0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionThatHasSuppressFailuresEnabled.json @@ -0,0 +1,280 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a VMSS with an extension that has suppressFailures enabled" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionWithProtectedSettingsFromKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionWithProtectedSettingsFromKeyVault.json new file mode 100644 index 0000000000..353c032fd6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionWithProtectedSettingsFromKeyVault.json @@ -0,0 +1,295 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "publisher": "{extension-Publisher}", + "settings": {}, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "publisher": "{extension-Publisher}", + "settings": {}, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "publisher": "{extension-Publisher}", + "settings": {}, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a VMSS with an extension with protectedSettingsFromKeyVault" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateOrUpdateAScaleSetWithCapacityReservation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateOrUpdateAScaleSetWithCapacityReservation.json new file mode 100644 index 0000000000..591a1d2e18 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateOrUpdateAScaleSetWithCapacityReservation.json @@ -0,0 +1,232 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "capacityReservation": { + "capacityReservationGroup": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "capacityReservation": { + "capacityReservationGroup": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "capacityReservation": { + "capacityReservationGroup": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create or update a scale set with capacity reservation." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMaximumSetGen.json new file mode 100644 index 0000000000..fbaf95798f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMaximumSetGen.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hibernate": true, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Deallocate", + "title": "VirtualMachineScaleSet_Deallocate_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMinimumSetGen.json new file mode 100644 index 0000000000..5913e04233 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Deallocate", + "title": "VirtualMachineScaleSet_Deallocate_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Delete.json new file mode 100644 index 0000000000..2cc0b68c3d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "forceDeletion": "true", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + }, + "204": {} + }, + "operationId": "VirtualMachineScaleSets_Delete", + "title": "Force Delete a VM scale set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMaximumSetGen.json new file mode 100644 index 0000000000..396d089b1e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMaximumSetGen.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "forceDeletion": true, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_DeleteInstances", + "title": "VirtualMachineScaleSet_DeleteInstances_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMinimumSetGen.json new file mode 100644 index 0000000000..78001457b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_DeleteInstances", + "title": "VirtualMachineScaleSet_DeleteInstances_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMaximumSetGen.json new file mode 100644 index 0000000000..b19900e6e5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "platformUpdateDomain": 30, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "nextPlatformUpdateDomain": 7, + "walkPerformed": true + } + } + }, + "operationId": "VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk", + "title": "VirtualMachineScaleSet_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMinimumSetGen.json new file mode 100644 index 0000000000..3d1b1e0ea3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMinimumSetGen.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "platformUpdateDomain": 9, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": {} + } + }, + "operationId": "VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk", + "title": "VirtualMachineScaleSet_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMaximumSetGen.json new file mode 100644 index 0000000000..ce05803ce0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMaximumSetGen.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "orchestrationServices": [ + { + "serviceName": "AutomaticRepairs", + "serviceState": "NotRunning" + } + ], + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaaaaaa", + "time": "2021-11-30T12:58:26.526Z" + } + ], + "virtualMachine": { + "statusesSummary": [ + { + "code": "aa", + "count": 21 + } + ] + }, + "extensions": [ + { + "name": "aaaaaaaaaaa", + "statusesSummary": [ + { + "code": "aa", + "count": 21 + } + ] + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_GetInstanceView", + "title": "VirtualMachineScaleSet_GetInstanceView_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMinimumSetGen.json new file mode 100644 index 0000000000..a1d3cdc46e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMinimumSetGen.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": {} + } + }, + "operationId": "VirtualMachineScaleSets_GetInstanceView", + "title": "VirtualMachineScaleSet_GetInstanceView_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMaximumSetGen.json new file mode 100644 index 0000000000..6ea86625ae --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMaximumSetGen.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaa" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaaaaaa", + "value": [ + { + "type": "aaaaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaa", + "properties": { + "error": { + "code": "aaaaaaa", + "innererror": { + "errordetail": "aaaaaaaaaaaaaaaaaaaaaaaa", + "exceptiontype": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "message": "aaaaaaaaa", + "target": "aaaaaaa", + "details": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaaa", + "message": "aa", + "target": "aaaa" + } + ] + }, + "progress": { + "failedInstanceCount": 25, + "inProgressInstanceCount": 20, + "pendingInstanceCount": 27, + "successfulInstanceCount": 6 + }, + "rollbackInfo": { + "failedRolledbackInstanceCount": 2, + "rollbackError": { + "code": "aaaaaaa", + "innererror": { + "errordetail": "aaaaaaaaaaaaaaaaaaaaaaaa", + "exceptiontype": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "message": "aaaaaaaaa", + "target": "aaaaaaa", + "details": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaaa", + "message": "aa", + "target": "aaaa" + } + ] + }, + "successfullyRolledbackInstanceCount": 12 + }, + "runningStatus": { + "code": "RollingForward", + "endTime": "2021-11-30T13:05:40.443Z", + "startTime": "2021-11-30T13:05:40.442Z" + }, + "startedBy": "Unknown", + "targetImageReference": { + "exactVersion": "aaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaa", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaa", + "sku": "2016-Datacenter", + "version": "latest" + } + } + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_GetOSUpgradeHistory", + "title": "VirtualMachineScaleSet_GetOSUpgradeHistory_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMinimumSetGen.json new file mode 100644 index 0000000000..e30bbfb24a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "value": [ + {} + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_GetOSUpgradeHistory", + "title": "VirtualMachineScaleSet_GetOSUpgradeHistory_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSet.json new file mode 100644 index 0000000000..e20d629d79 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSet.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myVirtualMachineScaleSet" + }, + "responses": { + "200": { + "body": { + "name": "myVirtualMachineScaleSet", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myVirtualMachineScaleSet", + "location": "westus", + "properties": { + "doNotRunExtensionsOnOverprovisionedVMs": false, + "hostGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/hostGroups/myHostGroup" + }, + "overprovision": false, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "singlePlacementGroup": false, + "timeCreated": "2021-06-27T01:02:38.3138469+00:00", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": false + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "myNic", + "properties": { + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "primary": true, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "myVirtualMachineScaleSet", + "linuxConfiguration": { + "disablePasswordAuthentication": false + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "databricks", + "publisher": "azuredatabricks", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_Get", + "title": "Get a virtual machine scale set" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetPlacedOnADedicatedHostGroupThroughAutomaticPlacement.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetPlacedOnADedicatedHostGroupThroughAutomaticPlacement.json new file mode 100644 index 0000000000..6c37513ced --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetPlacedOnADedicatedHostGroupThroughAutomaticPlacement.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myVirtualMachineScaleSet" + }, + "responses": { + "200": { + "body": { + "name": "myVirtualMachineScaleSet", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myVirtualMachineScaleSet", + "location": "West US", + "properties": { + "doNotRunExtensionsOnOverprovisionedVMs": false, + "hostGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/hostGroups/myHostGroup" + }, + "overprovision": false, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "singlePlacementGroup": false, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": false + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "myNic", + "properties": { + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "primary": true, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "myVirtualMachineScaleSet", + "linuxConfiguration": { + "disablePasswordAuthentication": false + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "databricks", + "publisher": "azuredatabricks", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_Get", + "title": "Get a virtual machine scale set placed on a dedicated host group through automatic placement." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetWithUserData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetWithUserData.json new file mode 100644 index 0000000000..1a44670334 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetWithUserData.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "$expand": "userData", + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myVirtualMachineScaleSet" + }, + "responses": { + "200": { + "body": { + "name": "myVirtualMachineScaleSet", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myVirtualMachineScaleSet", + "location": "westus", + "properties": { + "doNotRunExtensionsOnOverprovisionedVMs": false, + "hostGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/hostGroups/myHostGroup" + }, + "overprovision": false, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "singlePlacementGroup": false, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": false + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "myNic", + "properties": { + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "primary": true, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "myVirtualMachineScaleSet", + "linuxConfiguration": { + "disablePasswordAuthentication": false + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "databricks", + "publisher": "azuredatabricks", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_Get", + "title": "Get a virtual machine scale set with UserData" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetVmScaleSetVmWithDiskControllerType.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetVmScaleSetVmWithDiskControllerType.json new file mode 100644 index 0000000000..91ad404c39 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetVmScaleSetVmWithDiskControllerType.json @@ -0,0 +1,110 @@ +{ + "parameters": { + "$expand": "userData", + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myVirtualMachineScaleSet" + }, + "responses": { + "200": { + "body": { + "name": "myVirtualMachineScaleSet", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myVirtualMachineScaleSet", + "location": "westus", + "properties": { + "doNotRunExtensionsOnOverprovisionedVMs": false, + "hostGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/hostGroups/myHostGroup" + }, + "overprovision": false, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "singlePlacementGroup": false, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": false + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "myNic", + "properties": { + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "primary": true, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "myVirtualMachineScaleSet", + "linuxConfiguration": { + "disablePasswordAuthentication": false + } + }, + "storageProfile": { + "dataDisks": [], + "diskControllerType": "NVMe", + "imageReference": { + "offer": "databricks", + "publisher": "azuredatabricks", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_Get", + "title": "Get VM scale set VM with Disk Controller Type" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMaximumSetGen.json new file mode 100644 index 0000000000..aa0b79d74b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMaximumSetGen.json @@ -0,0 +1,371 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaa", + "value": [ + { + "name": "{virtualMachineScaleSetName}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "extendedLocation": { + "name": "aaaaaaaaaaaaaaaaaaaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaa", + "tenantId": "aaaaaaaaaaaaaaaa", + "userAssignedIdentities": { + "key3951": { + "clientId": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "principalId": "aaaa" + } + } + }, + "location": "westus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "doNotRunExtensionsOnOverprovisionedVMs": true, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "orchestrationMode": "Uniform", + "overprovision": true, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "Default" + ] + }, + "singlePlacementGroup": true, + "spotRestorePolicy": { + "enabled": true, + "restoreTimeout": "aaaaaaaaaa" + }, + "uniqueId": "aaaaaaaa", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "disableAutomaticRollback": true, + "enableAutomaticOSUpgrade": true + }, + "mode": "Manual", + "rollingUpgradePolicy": { + "enableCrossZoneUpgrade": true, + "maxBatchInstancePercent": 49, + "maxSurge": true, + "maxUnhealthyInstancePercent": 81, + "maxUnhealthyUpgradedInstancePercent": 98, + "pauseTimeBetweenBatches": "aaaaaaaaaaaaaaa", + "prioritizeUnhealthyInstances": true, + "rollbackFailedInstancesOnPolicyBreach": true + } + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaa", + "order": 29, + "packageReferenceId": "aaaaaaaaaa", + "tags": "aaaaaaaaaaa" + } + ] + }, + "billingProfile": { + "maxPrice": 4 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaa" + } + }, + "evictionPolicy": "Deallocate", + "extensionProfile": { + "extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "extensions": [ + { + "name": "aa", + "type": "aaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "type": "aaaaaaaa", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aaaaaaaaaaaaaa" + ], + "provisioningState": "aaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaa", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + } + ] + }, + "licenseType": "aaaaaaaaaa", + "networkProfile": { + "healthProbe": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaa" + ] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa", + "domainNameLabelScope": "TenantReuse" + }, + "idleTimeoutInMinutes": 18, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "customData": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vaultCertificates": [ + { + "certificateStore": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "certificateUrl": "aaaaaaa" + } + ] + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "priority": "Regular", + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "aa" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "aaaaaaaaaaaaaa", + "caching": "None", + "createOption": "FromImage", + "diskIOPSReadWrite": 11, + "diskMBpsReadWrite": 13, + "diskSizeGB": 11, + "lun": 24, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Standard_LRS" + }, + "writeAcceleratorEnabled": true + } + ], + "imageReference": { + "exactVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "a", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaaaa", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "aaaaaaaaaaaaaaa", + "caching": "ReadWrite", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 30, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhdContainers": [ + "aaaaaaaaaaaaaaaaaaaaaaaaa" + ], + "writeAcceleratorEnabled": true + } + }, + "userData": "aaa" + }, + "zoneBalance": true + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + }, + "tags": { + "key8425": "aaa" + }, + "zones": [ + "aaaaaaaaaaaaaaaaaaaa" + ] + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_ListAll", + "title": "VirtualMachineScaleSet_ListAll_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMinimumSetGen.json new file mode 100644 index 0000000000..eb4bf8d915 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "location": "westus" + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_ListAll", + "title": "VirtualMachineScaleSet_ListAll_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListByLocation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListByLocation.json new file mode 100644 index 0000000000..9316917dbb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListByLocation.json @@ -0,0 +1,171 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "location": "eastus", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{virtualMachineScaleSetName}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "location": "eastus", + "properties": { + "doNotRunExtensionsOnOverprovisionedVMs": false, + "overprovision": false, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "singlePlacementGroup": false, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": false + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "myNic", + "properties": { + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "primary": true, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "{virtualMachineScaleSetName}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "databricks", + "publisher": "azuredatabricks", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": { + "myTag1": "tagValue1" + } + }, + { + "name": "{virtualMachineScaleSetName}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}1", + "location": "eastus", + "properties": { + "doNotRunExtensionsOnOverprovisionedVMs": false, + "overprovision": false, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "singlePlacementGroup": false, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": false + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "myNic1", + "properties": { + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "primary": true, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "{virtualMachineScaleSetName}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "databricks", + "publisher": "azuredatabricks", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": { + "myTag1": "tagValue2" + } + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_ListByLocation", + "title": "Lists all the VM scale sets under the specified subscription for the specified location." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMaximumSetGen.json new file mode 100644 index 0000000000..ea77c03148 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMaximumSetGen.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaa" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaaaaaaaaaaa", + "value": [ + { + "capacity": { + "defaultCapacity": 20, + "maximum": 27, + "minimum": 22, + "scaleType": "Automatic" + }, + "resourceType": "aaaaaaaaaaaaaaaaa", + "sku": { + "name": "DSv3-Type1", + "capacity": 7, + "tier": "aaa" + } + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_ListSkus", + "title": "VirtualMachineScaleSet_ListSkus_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMinimumSetGen.json new file mode 100644 index 0000000000..f2951c9dfa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "value": [ + {} + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_ListSkus", + "title": "VirtualMachineScaleSet_ListSkus_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMaximumSetGen.json new file mode 100644 index 0000000000..3da8110604 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMaximumSetGen.json @@ -0,0 +1,687 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "{virtualMachineScaleSetName}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "extendedLocation": { + "name": "aaaaaaaaaaaaaaaaaaaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaa", + "tenantId": "aaaaaaaaaaaaaaaa", + "userAssignedIdentities": { + "key3951": { + "clientId": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "principalId": "aaaa" + } + } + }, + "location": "eastus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "doNotRunExtensionsOnOverprovisionedVMs": true, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "orchestrationMode": "Uniform", + "overprovision": true, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "Default" + ] + }, + "singlePlacementGroup": true, + "spotRestorePolicy": { + "enabled": true, + "restoreTimeout": "aaaaaaaaaa" + }, + "uniqueId": "aaaaaaaaaaaaaaaaaaaaaaa", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "disableAutomaticRollback": true, + "enableAutomaticOSUpgrade": true, + "useRollingUpgradePolicy": true + }, + "mode": "Automatic", + "rollingUpgradePolicy": { + "enableCrossZoneUpgrade": true, + "maxBatchInstancePercent": 49, + "maxSurge": true, + "maxUnhealthyInstancePercent": 81, + "maxUnhealthyUpgradedInstancePercent": 98, + "pauseTimeBetweenBatches": "aaaaaaaaaaaaaaa", + "prioritizeUnhealthyInstances": true, + "rollbackFailedInstancesOnPolicyBreach": true + } + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaa", + "order": 29, + "packageReferenceId": "aaaaaaaaaa", + "tags": "aaaaaaaaaaa" + } + ] + }, + "billingProfile": { + "maxPrice": 4 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaa" + } + }, + "evictionPolicy": "Deallocate", + "extensionProfile": { + "extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "extensions": [ + { + "name": "aa", + "type": "aaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "type": "aaaaaaaa", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aaaaaaaaaaaaaa" + ], + "provisioningState": "aaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaa", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + } + ] + }, + "licenseType": "aaaa", + "networkProfile": { + "healthProbe": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "myNic", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaa" + ] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 18, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "{virtualMachineScaleSetName}", + "customData": "aaaaaaaaaaaaaaaaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vaultCertificates": [ + { + "certificateStore": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "certificateUrl": "aaaaaaa" + } + ] + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "priority": "Regular", + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "aa" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "exactVersion": "aaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaa", + "offer": "databricks", + "publisher": "azuredatabricks", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaaaa", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "name": "aaaaaaaaaaaaaaaaaaaaaaa", + "caching": "ReadWrite", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 30, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows", + "vhdContainers": [ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + ], + "writeAcceleratorEnabled": true + } + }, + "userData": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "zoneBalance": true + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": {}, + "zones": [ + "aaaaaaa" + ] + }, + { + "name": "{virtualMachineScaleSetName}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "extendedLocation": { + "name": "aaaaaaaaaaaaaaaaaaaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}1", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaa", + "tenantId": "aaaaaaaaaaaaaaaa", + "userAssignedIdentities": { + "key3951": { + "clientId": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "principalId": "aaaa" + } + } + }, + "location": "eastus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "doNotRunExtensionsOnOverprovisionedVMs": true, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "orchestrationMode": "Uniform", + "overprovision": true, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "Default" + ] + }, + "singlePlacementGroup": true, + "spotRestorePolicy": { + "enabled": true, + "restoreTimeout": "aaaaaaaaaa" + }, + "uniqueId": "aaaaa", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "disableAutomaticRollback": true, + "enableAutomaticOSUpgrade": true, + "useRollingUpgradePolicy": true + }, + "mode": "Automatic", + "rollingUpgradePolicy": { + "enableCrossZoneUpgrade": true, + "maxBatchInstancePercent": 49, + "maxSurge": true, + "maxUnhealthyInstancePercent": 81, + "maxUnhealthyUpgradedInstancePercent": 98, + "pauseTimeBetweenBatches": "aaaaaaaaaaaaaaa", + "prioritizeUnhealthyInstances": true + } + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaa", + "order": 29, + "packageReferenceId": "aaaaaaaaaa", + "tags": "aaaaaaaaaaa" + } + ] + }, + "billingProfile": { + "maxPrice": 4 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaa" + } + }, + "evictionPolicy": "Deallocate", + "extensionProfile": { + "extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "extensions": [ + { + "name": "aa", + "type": "aaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "type": "aaaaaaaa", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aaaaaaaaaaaaaa" + ], + "provisioningState": "aaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaa", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + } + ] + }, + "licenseType": "aaaaaaaaaaaaaaaaaaaaaaa", + "networkProfile": { + "healthProbe": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "myNic1", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaa" + ] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 18, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "{virtualMachineScaleSetName}", + "customData": "a", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vaultCertificates": [ + { + "certificateStore": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "certificateUrl": "aaaaaaa" + } + ] + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "priority": "Regular", + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "aa" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "exactVersion": "aa", + "id": "aaa", + "offer": "databricks", + "publisher": "azuredatabricks", + "sharedGalleryImageId": "aaaaaaa", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "name": "a", + "caching": "ReadWrite", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 30, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows", + "vhdContainers": [ + "aaaaaaaaaaaaaaaa" + ], + "writeAcceleratorEnabled": true + } + }, + "userData": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "zoneBalance": true + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": {}, + "zones": [ + "aaaaaaaa" + ] + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_List", + "title": "VirtualMachineScaleSet_List_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMinimumSetGen.json new file mode 100644 index 0000000000..64469f8897 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMinimumSetGen.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "location": "eastus" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "location": "eastus" + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_List", + "title": "VirtualMachineScaleSet_List_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMaximumSetGen.json new file mode 100644 index 0000000000..405b4c18c4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMaximumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_PerformMaintenance", + "title": "VirtualMachineScaleSet_PerformMaintenance_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMinimumSetGen.json new file mode 100644 index 0000000000..a76bc9c13c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_PerformMaintenance", + "title": "VirtualMachineScaleSet_PerformMaintenance_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMaximumSetGen.json new file mode 100644 index 0000000000..d32fc4311d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMaximumSetGen.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "skipShutdown": true, + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_PowerOff", + "title": "VirtualMachineScaleSet_PowerOff_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMinimumSetGen.json new file mode 100644 index 0000000000..fb7eec01b5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "a" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_PowerOff", + "title": "VirtualMachineScaleSet_PowerOff_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMaximumSetGen.json new file mode 100644 index 0000000000..870fb81976 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "VirtualMachineScaleSetReapplyTestRG", + "subscriptionId": "b4f1213b-cacc-4816-8bfb-f30f90643de8", + "vmScaleSetName": "VMSSReapply-Test-ScaleSet" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/b4f1213b-cacc-4816-8bfb-f30f90643de8/providers/Microsoft.Compute/locations/eastus/operationResults/c57dff56-0cd2-4e24-8d11-4e18d77f7e85?api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachineScaleSets_Reapply", + "title": "VirtualMachineScaleSets_Reapply_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMinimumSetGen.json new file mode 100644 index 0000000000..48a07baf44 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "VirtualMachineScaleSetReapplyTestRG", + "subscriptionId": "b4f1213b-cacc-4816-8bfb-f30f90643de8", + "vmScaleSetName": "VMSSReapply-Test-ScaleSet" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/b4f1213b-cacc-4816-8bfb-f30f90643de8/providers/Microsoft.Compute/locations/eastus/operationResults/c57dff56-0cd2-4e24-8d11-4e18d77f7e85?api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachineScaleSets_Reapply", + "title": "VirtualMachineScaleSets_Reapply_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMaximumSetGen.json new file mode 100644 index 0000000000..75c2022cf2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMaximumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Redeploy", + "title": "VirtualMachineScaleSet_Redeploy_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMinimumSetGen.json new file mode 100644 index 0000000000..6edf0242b5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Redeploy", + "title": "VirtualMachineScaleSet_Redeploy_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMaximumSetGen.json new file mode 100644 index 0000000000..3382bad359 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMaximumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_ReimageAll", + "title": "VirtualMachineScaleSet_ReimageAll_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMinimumSetGen.json new file mode 100644 index 0000000000..952dfb4a45 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_ReimageAll", + "title": "VirtualMachineScaleSet_ReimageAll_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMaximumSetGen.json new file mode 100644 index 0000000000..e2e4b6da3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMaximumSetGen.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "vmScaleSetReimageInput": { + "instanceIds": [ + "aaaaaaaaaa" + ], + "tempDisk": true + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Reimage", + "title": "VirtualMachineScaleSet_Reimage_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMinimumSetGen.json new file mode 100644 index 0000000000..930fc7e6fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Reimage", + "title": "VirtualMachineScaleSet_Reimage_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMaximumSetGen.json new file mode 100644 index 0000000000..edebb48c79 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMaximumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Restart", + "title": "VirtualMachineScaleSet_Restart_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMinimumSetGen.json new file mode 100644 index 0000000000..c705b54fab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Restart", + "title": "VirtualMachineScaleSet_Restart_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMaximumSetGen.json new file mode 100644 index 0000000000..4f5288337f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMaximumSetGen.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "action": "Resume", + "serviceName": "AutomaticRepairs" + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_SetOrchestrationServiceState", + "title": "VirtualMachineScaleSet_SetOrchestrationServiceState_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMinimumSetGen.json new file mode 100644 index 0000000000..403c6c3788 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMinimumSetGen.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "action": "Resume", + "serviceName": "AutomaticRepairs" + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_SetOrchestrationServiceState", + "title": "VirtualMachineScaleSet_SetOrchestrationServiceState_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMaximumSetGen.json new file mode 100644 index 0000000000..a86bf1c641 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMaximumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Start", + "title": "VirtualMachineScaleSet_Start_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMinimumSetGen.json new file mode 100644 index 0000000000..ec9ebd34c5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Start", + "title": "VirtualMachineScaleSet_Start_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMaximumSetGen.json new file mode 100644 index 0000000000..d5d4a2f263 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMaximumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_UpdateInstances", + "title": "VirtualMachineScaleSet_UpdateInstances_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMinimumSetGen.json new file mode 100644 index 0000000000..b33f4b807f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_UpdateInstances", + "title": "VirtualMachineScaleSet_UpdateInstances_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMaximumSetGen.json new file mode 100644 index 0000000000..c1fd83d2c6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMaximumSetGen.json @@ -0,0 +1,651 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "key3951": {} + } + }, + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "promotionCode": "aaaaaaaaaa", + "publisher": "microsoft-ads" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "PT30M" + }, + "doNotRunExtensionsOnOverprovisionedVMs": true, + "overprovision": true, + "proximityPlacementGroup": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "OldestVM" + ] + }, + "singlePlacementGroup": true, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "disableAutomaticRollback": true, + "enableAutomaticOSUpgrade": true + }, + "mode": "Manual", + "rollingUpgradePolicy": { + "enableCrossZoneUpgrade": true, + "maxBatchInstancePercent": 49, + "maxSurge": true, + "maxUnhealthyInstancePercent": 81, + "maxUnhealthyUpgradedInstancePercent": 98, + "pauseTimeBetweenBatches": "aaaaaaaaaaaaaaa", + "prioritizeUnhealthyInstances": true, + "rollbackFailedInstancesOnPolicyBreach": true + } + }, + "virtualMachineProfile": { + "billingProfile": { + "maxPrice": -1 + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensionsTimeBudget": "PT1H20M", + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "licenseType": "aaaaaaaaaaaa", + "networkProfile": { + "healthProbe": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123" + }, + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "applicationSecurityGroups": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "a", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 3 + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123" + } + } + } + ], + "networkSecurityGroup": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "customData": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vaultCertificates": [ + { + "certificateStore": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "certificateUrl": "aaaaaaa" + } + ] + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "rebootSetting": "Never" + }, + "enableHotpatching": true, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "caching": "None", + "createOption": "Empty", + "diskIOPSReadWrite": 28, + "diskMBpsReadWrite": 15, + "diskSizeGB": 1023, + "lun": 26, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Standard_LRS" + }, + "writeAcceleratorEnabled": true + } + ], + "imageReference": { + "id": "aaaaaaaaaaaaaaaaaaa", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaa", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "diskSizeGB": 6, + "image": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Standard_LRS" + }, + "vhdContainers": [ + "aa" + ], + "writeAcceleratorEnabled": true + } + }, + "userData": "aaaaaaaaaaaaa" + } + }, + "sku": { + "name": "DSv3-Type1", + "capacity": 7, + "tier": "aaa" + }, + "tags": { + "key246": "aaaaaaaaaaaaaaaaaaaaaaaa" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "{virtualMachineScaleSetName}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "extendedLocation": { + "name": "aaaaaaaaaaaaaaaaaaaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaa", + "tenantId": "aaaaaaaaaaaaaaaa", + "userAssignedIdentities": { + "key3951": { + "clientId": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "principalId": "aaaa" + } + } + }, + "location": "westus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "PT30M" + }, + "doNotRunExtensionsOnOverprovisionedVMs": true, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "orchestrationMode": "Uniform", + "overprovision": true, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "proximityPlacementGroup": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "OldestVM" + ] + }, + "singlePlacementGroup": true, + "spotRestorePolicy": { + "enabled": true, + "restoreTimeout": "aaaaaaaaaa" + }, + "uniqueId": "aaaaaaaa", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "disableAutomaticRollback": true, + "enableAutomaticOSUpgrade": true + }, + "mode": "Manual", + "rollingUpgradePolicy": { + "enableCrossZoneUpgrade": true, + "maxBatchInstancePercent": 49, + "maxSurge": true, + "maxUnhealthyInstancePercent": 81, + "maxUnhealthyUpgradedInstancePercent": 98, + "pauseTimeBetweenBatches": "aaaaaaaaaaaaaaa", + "prioritizeUnhealthyInstances": true + } + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaa", + "order": 29, + "packageReferenceId": "aaaaaaaaaa", + "tags": "aaaaaaaaaaa" + } + ] + }, + "billingProfile": { + "maxPrice": -1 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "evictionPolicy": "Deallocate", + "extensionProfile": { + "extensionsTimeBudget": "PT1H20M", + "extensions": [ + { + "name": "{extension-name}", + "type": "aaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "provisioningState": "aaaaaaaaaaaaaa", + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "licenseType": "aaaaaaaaaaaa", + "networkProfile": { + "healthProbe": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123" + }, + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaa" + ] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "applicationSecurityGroups": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "a", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 3, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123" + } + } + } + ], + "networkSecurityGroup": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "customData": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vaultCertificates": [ + { + "certificateStore": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "certificateUrl": "aaaaaaa" + } + ] + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "rebootSetting": "Never" + }, + "enableHotpatching": true, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "priority": "Regular", + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "caching": "None", + "createOption": "Empty", + "diskIOPSReadWrite": 28, + "diskMBpsReadWrite": 15, + "diskSizeGB": 1023, + "lun": 26, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Standard_LRS" + }, + "writeAcceleratorEnabled": true + } + ], + "imageReference": { + "exactVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaa", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaa", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "aaaaaaaaaaaaaaa", + "caching": "ReadWrite", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 6, + "image": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhdContainers": [ + "aa" + ], + "writeAcceleratorEnabled": true + } + }, + "userData": "aaaaaaaaaaaaa" + }, + "zoneBalance": true + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + }, + "tags": { + "key8425": "aaa" + }, + "zones": [ + "aaaaaaaaaaaaaaaaaaaa" + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_Update", + "title": "VirtualMachineScaleSet_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMinimumSetGen.json new file mode 100644 index 0000000000..e1358da5c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "location": "westus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Update", + "title": "VirtualMachineScaleSet_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_AssessPatches.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_AssessPatches.json new file mode 100644 index 0000000000..da0de82006 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_AssessPatches.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroupName", + "subscriptionId": "{subscription-id}", + "vmName": "myVMName" + }, + "responses": { + "200": { + "body": { + "assessmentActivityId": "68f8b292-dfc2-4646-9781-33cc88631968", + "availablePatches": [ + { + "name": "Definition Update for Windows Defender Antivirus - KB2267602 (Definition 1.279.1373.0)", + "activityId": "68f8b292-dfc2-4646-9781-33cc88631968", + "assessmentState": "Available", + "classifications": [ + "Definition Updates" + ], + "kbId": "2267602", + "lastModifiedDateTime": "2020-04-24T21:18:45.2830263Z", + "patchId": "35428702-5784-4ba4-a6e0-5222258b5411", + "publishedDate": "2018-11-07T00:00:00Z", + "rebootBehavior": "NeverReboots", + "version": "" + }, + { + "name": "Windows Malicious Software Removal Tool x64 - October 2018 (KB890830)", + "activityId": "68f8b292-dfc2-4646-9781-33cc88631968", + "assessmentState": "Available", + "classifications": [ + "Update Rollups" + ], + "kbId": "890830", + "lastModifiedDateTime": "2020-04-24T21:18:45.2830263Z", + "patchId": "39f9cdd1-795c-4d0e-8c0a-73ab3f31746d", + "publishedDate": "2018-11-07T00:00:00Z", + "rebootBehavior": "CanRequestReboot", + "version": "" + } + ], + "criticalAndSecurityPatchCount": 1, + "error": null, + "otherPatchCount": 2, + "rebootPending": true, + "startDateTime": "2020-04-24T21:02:04.2556154Z", + "status": "Succeeded" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachines_AssessPatches", + "title": "Assess patch state of a virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMaximumSetGen.json new file mode 100644 index 0000000000..fa23bbf5ba --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMaximumSetGen.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "destinationContainerName": "aaaaaaa", + "overwriteVhds": true, + "vhdPrefix": "aaaaaaaaa" + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "$schema": "aaaaa", + "contentVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaaaa", + "parameters": {}, + "resources": [ + {} + ] + } + }, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Capture", + "title": "VirtualMachine_Capture_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMinimumSetGen.json new file mode 100644 index 0000000000..a98faf8f4c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMinimumSetGen.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "destinationContainerName": "aaaaaaa", + "overwriteVhds": true, + "vhdPrefix": "aaaaaaaaa" + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": {} + }, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Capture", + "title": "VirtualMachine_Capture_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMaximumSetGen.json new file mode 100644 index 0000000000..a9fc863c64 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_ConvertToManagedDisks", + "title": "VirtualMachine_ConvertToManagedDisks_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMinimumSetGen.json new file mode 100644 index 0000000000..f7ecf9f20e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_ConvertToManagedDisks", + "title": "VirtualMachine_ConvertToManagedDisks_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateACustomImageVmFromAnUnmanagedGeneralizedOsImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateACustomImageVmFromAnUnmanagedGeneralizedOsImage.json new file mode 100644 index 0000000000..26cf45ed6c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateACustomImageVmFromAnUnmanagedGeneralizedOsImage.json @@ -0,0 +1,147 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "image": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd" + }, + "osType": "Windows", + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "{vm-name}" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "image": { + "uri": "https://{existing-storage-account-name}.blob.core.windows.net/system/Microsoft.Compute/Images/vhds/{existing-generalized-os-image-blob-name}.vhd" + }, + "osType": "Windows", + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk.vhd" + } + } + }, + "vmId": "926cd555-a07c-4ff5-b214-4aa4dd09d79b" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "image": { + "uri": "https://{existing-storage-account-name}.blob.core.windows.net/system/Microsoft.Compute/Images/vhds/{existing-generalized-os-image-blob-name}.vhd" + }, + "osType": "Windows", + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk.vhd" + } + } + }, + "vmId": "926cd555-a07c-4ff5-b214-4aa4dd09d79b" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a custom-image vm from an unmanaged generalized os image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingAssessmentModeOfImageDefault.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingAssessmentModeOfImageDefault.json new file mode 100644 index 0000000000..962d081720 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingAssessmentModeOfImageDefault.json @@ -0,0 +1,165 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "ImageDefault" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "ImageDefault" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "ImageDefault" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Linux vm with a patch setting assessmentMode of ImageDefault." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json new file mode 100644 index 0000000000..550945c307 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json @@ -0,0 +1,180 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": true, + "rebootSetting": "Never" + }, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": true, + "rebootSetting": "Never" + }, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": true, + "rebootSetting": "Never" + }, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Linux vm with a patch setting patchMode of AutomaticByPlatform and AutomaticByPlatformSettings." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfImageDefault.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfImageDefault.json new file mode 100644 index 0000000000..a30a8beb6e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfImageDefault.json @@ -0,0 +1,165 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Linux vm with a patch setting patchMode of ImageDefault." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json new file mode 100644 index 0000000000..59f9e1c826 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json @@ -0,0 +1,168 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Linux vm with a patch settings patchMode and assessmentMode set to AutomaticByPlatform." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAPlatformImageVmWithUnmanagedOsAndDataDisks.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAPlatformImageVmWithUnmanagedOsAndDataDisks.json new file mode 100644 index 0000000000..977e3459fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAPlatformImageVmWithUnmanagedOsAndDataDisks.json @@ -0,0 +1,215 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk0.vhd" + } + }, + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk1.vhd" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "{vm-name}" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "name": "dataDisk0", + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk0.vhd" + } + }, + { + "name": "dataDisk1", + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk1.vhd" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "osType": "Windows", + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk.vhd" + } + } + }, + "vmId": "5230a749-2f68-4830-900b-702182d32e63" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "name": "dataDisk0", + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk0.vhd" + } + }, + { + "name": "dataDisk1", + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk1.vhd" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "osType": "Windows", + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk.vhd" + } + } + }, + "vmId": "5230a749-2f68-4830-900b-702182d32e63" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a platform-image vm with unmanaged os and data disks." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACommunityGalleryImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACommunityGalleryImage.json new file mode 100644 index 0000000000..51016e0891 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACommunityGalleryImage.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "communityGalleryImageId": "/CommunityGalleries/galleryPublicName/Images/communityGalleryImageName/Versions/communityGalleryImageVersionName" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "communityGalleryImageId": "/CommunityGalleries/galleryPublicName/Images/communityGalleryImageName/Versions/communityGalleryImageVersionName" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "communityGalleryImageId": "/CommunityGalleries/galleryPublicName/Images/communityGalleryImageName/Versions/communityGalleryImageVersionName" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM from a community gallery image" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACustomImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACustomImage.json new file mode 100644 index 0000000000..ef5623ae64 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACustomImage.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm from a custom image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromAGeneralizedSharedImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromAGeneralizedSharedImage.json new file mode 100644 index 0000000000..38d5c1bb6b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromAGeneralizedSharedImage.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm from a generalized shared image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASharedGalleryImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASharedGalleryImage.json new file mode 100644 index 0000000000..f877390de2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASharedGalleryImage.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "sharedGalleryImageId": "/SharedGalleries/sharedGalleryName/Images/sharedGalleryImageName/Versions/sharedGalleryImageVersionName" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "sharedGalleryImageId": "/SharedGalleries/sharedGalleryName/Images/sharedGalleryImageName/Versions/sharedGalleryImageVersionName" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "sharedGalleryImageId": "/SharedGalleries/sharedGalleryName/Images/sharedGalleryImageName/Versions/sharedGalleryImageVersionName" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM from a shared gallery image" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASpecializedSharedImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASpecializedSharedImage.json new file mode 100644 index 0000000000..8f17786f4f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASpecializedSharedImage.json @@ -0,0 +1,125 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm from a specialized shared image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAVirtualMachineScaleSetWithCustomerAssignedPlatformFaultDomain.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAVirtualMachineScaleSetWithCustomerAssignedPlatformFaultDomain.json new file mode 100644 index 0000000000..2086678dae --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAVirtualMachineScaleSetWithCustomerAssignedPlatformFaultDomain.json @@ -0,0 +1,167 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "platformFaultDomain": 1, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "virtualMachineScaleSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{existing-flex-vmss-name-with-platformFaultDomainCount-greater-than-1}" + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "platformFaultDomain": 1, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "virtualMachineScaleSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myExistingFlexVmss" + }, + "vmId": "7cce54f2-ecd3-4ddd-a8d9-50984faa3918" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "platformFaultDomain": 1, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "virtualMachineScaleSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myExistingFlexVmss" + }, + "vmId": "7cce54f2-ecd3-4ddd-a8d9-50984faa3918" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm in a Virtual Machine Scale Set with customer assigned platformFaultDomain." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAnAvailabilitySet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAnAvailabilitySet.json new file mode 100644 index 0000000000..a418e36e4b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAnAvailabilitySet.json @@ -0,0 +1,164 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "availabilitySet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/{existing-availability-set-name}" + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "availabilitySet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/NSGEXISTINGAS" + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "availabilitySet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/NSGEXISTINGAS" + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm in an availability set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAMarketplaceImagePlan.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAMarketplaceImagePlan.json new file mode 100644 index 0000000000..1abf092cd0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAMarketplaceImagePlan.json @@ -0,0 +1,170 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with a marketplace image plan." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAnExtensionsTimeBudget.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAnExtensionsTimeBudget.json new file mode 100644 index 0000000000..86d25ffc9a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAnExtensionsTimeBudget.json @@ -0,0 +1,176 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "extensionsTimeBudget": "PT30M", + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionsTimeBudget": "PT30M", + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionsTimeBudget": "PT30M", + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with an extensions time budget." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithApplicationProfile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithApplicationProfile.json new file mode 100644 index 0000000000..d93eb90122 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithApplicationProfile.json @@ -0,0 +1,210 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "enableAutomaticUpgrade": false, + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1", + "treatFailureAsDeploymentFailure": false + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "{image_offer}", + "publisher": "{image_publisher}", + "sku": "{image_sku}", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "e0de9b84-a506-4b95-9623-00a425d05c90" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "e0de9b84-a506-4b95-9623-00a425d05c90" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with Application Profile." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithBootDiagnostics.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithBootDiagnostics.json new file mode 100644 index 0000000000..c98ae3dbb9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithBootDiagnostics.json @@ -0,0 +1,173 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with boot diagnostics." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskControllerType.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskControllerType.json new file mode 100644 index 0000000000..9948792a83 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskControllerType.json @@ -0,0 +1,177 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D4_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "diskControllerType": "NVMe", + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "userData": "U29tZSBDdXN0b20gRGF0YQ==" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D4_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Updating", + "storageProfile": { + "dataDisks": [], + "diskControllerType": "NVMe", + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D4_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "diskControllerType": "NVMe", + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with Disk Controller Type" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskEncryptionSetResourceIdInTheOsDiskAndDataDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskEncryptionSetResourceIdInTheOsDiskAndDataDisk.json new file mode 100644 index 0000000000..7152bc3882 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskEncryptionSetResourceIdInTheOsDiskAndDataDisk.json @@ -0,0 +1,231 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "ReadWrite", + "createOption": "Attach", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}", + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "ReadWrite", + "createOption": "Attach", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}", + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskencryptionset-name}" + }, + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "ReadWrite", + "createOption": "Attach", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}", + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with DiskEncryptionSet resource id in the os disk and data disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEmptyDataDisks.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEmptyDataDisks.json new file mode 100644 index 0000000000..0b03c7b392 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEmptyDataDisks.json @@ -0,0 +1,207 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0 + }, + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1 + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "3906fef9-a1e5-4b83-a8a8-540858b41df0" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": false + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": false + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "3906fef9-a1e5-4b83-a8a8-540858b41df0" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with empty data disks." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDisk.json new file mode 100644 index 0000000000..5d1e216dcc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDisk.json @@ -0,0 +1,179 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with ephemeral os disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInCacheDiskUsingPlacementProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInCacheDiskUsingPlacementProperty.json new file mode 100644 index 0000000000..256609f3e1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInCacheDiskUsingPlacementProperty.json @@ -0,0 +1,182 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with ephemeral os disk provisioning in Cache disk using placement property." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInResourceDiskUsingPlacementProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInResourceDiskUsingPlacementProperty.json new file mode 100644 index 0000000000..6b5b3c8092 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInResourceDiskUsingPlacementProperty.json @@ -0,0 +1,182 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "ResourceDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "ResourceDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "ResourceDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with ephemeral os disk provisioning in Resource disk using placement property." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHibernationEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHibernationEnabled.json new file mode 100644 index 0000000000..4bbc5eea57 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHibernationEnabled.json @@ -0,0 +1,182 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "eastus2euap", + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "{vm-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2019-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "vmOSdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "{vm-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "location": "eastus2euap", + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "{vm-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Updating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2019-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "vmOSdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "{vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "location": "eastus2euap", + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "{vm-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2019-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "vmOSdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with HibernationEnabled" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHostEncryptionUsingEncryptionAtHostProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHostEncryptionUsingEncryptionAtHostProperty.json new file mode 100644 index 0000000000..a6e4fe263c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHostEncryptionUsingEncryptionAtHostProperty.json @@ -0,0 +1,179 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "securityProfile": { + "encryptionAtHost": true + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "encryptionAtHost": true + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "encryptionAtHost": true + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with Host Encryption using encryptionAtHost property." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithManagedBootDiagnostics.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithManagedBootDiagnostics.json new file mode 100644 index 0000000000..b7870ae6bf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithManagedBootDiagnostics.json @@ -0,0 +1,170 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with managed boot diagnostics." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfiguration.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfiguration.json new file mode 100644 index 0000000000..82b4631aa9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfiguration.json @@ -0,0 +1,176 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "{nic-config-name}", + "properties": { + "deleteOption": "Delete", + "ipConfigurations": [ + { + "name": "{ip-config-name}", + "properties": { + "primary": true, + "publicIPAddressConfiguration": { + "name": "{publicIP-config-name}", + "properties": { + "deleteOption": "Detach", + "publicIPAllocationMethod": "Static" + }, + "sku": { + "name": "Basic", + "tier": "Global" + } + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/toBeCreatedNetworkInterface", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/toBeCreatedNetworkInterface", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with network interface configuration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfigurationWithPublicIpAddressDnsSettings.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfigurationWithPublicIpAddressDnsSettings.json new file mode 100644 index 0000000000..8898c1550f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfigurationWithPublicIpAddressDnsSettings.json @@ -0,0 +1,180 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "{nic-config-name}", + "properties": { + "deleteOption": "Delete", + "ipConfigurations": [ + { + "name": "{ip-config-name}", + "properties": { + "primary": true, + "publicIPAddressConfiguration": { + "name": "{publicIP-config-name}", + "properties": { + "deleteOption": "Detach", + "dnsSettings": { + "domainNameLabel": "aaaaa", + "domainNameLabelScope": "TenantReuse" + }, + "publicIPAllocationMethod": "Static" + }, + "sku": { + "name": "Basic", + "tier": "Global" + } + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/toBeCreatedNetworkInterface", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/toBeCreatedNetworkInterface", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with network interface configuration with public ip address dns settings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPasswordAuthentication.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPasswordAuthentication.json new file mode 100644 index 0000000000..77ea8dec99 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPasswordAuthentication.json @@ -0,0 +1,155 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b248db33-62ba-4d2d-b791-811e075ee0f5" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b248db33-62ba-4d2d-b791-811e075ee0f5" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with password authentication." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPremiumStorage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPremiumStorage.json new file mode 100644 index 0000000000..0a16104dfc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPremiumStorage.json @@ -0,0 +1,155 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with premium storage." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithScheduledEventsProfile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithScheduledEventsProfile.json new file mode 100644 index 0000000000..27238dd00f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithScheduledEventsProfile.json @@ -0,0 +1,203 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + }, + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + }, + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + }, + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with Scheduled Events Profile" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithCustomerManagedKeys.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithCustomerManagedKeys.json new file mode 100644 index 0000000000..fe4ffc0595 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithCustomerManagedKeys.json @@ -0,0 +1,192 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DC2as_v5" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "securityEncryptionType": "DiskWithVMGuestState" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DC2as_v5" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "securityEncryptionType": "DiskWithVMGuestState" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DC2as_v5" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "securityEncryptionType": "DiskWithVMGuestState" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with securityType ConfidentialVM with Customer Managed Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithPlatformManagedKeys.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithPlatformManagedKeys.json new file mode 100644 index 0000000000..7b465816bf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithPlatformManagedKeys.json @@ -0,0 +1,183 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DC2as_v5" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "securityEncryptionType": "DiskWithVMGuestState" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DC2as_v5" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "securityEncryptionType": "DiskWithVMGuestState" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DC2as_v5" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "securityEncryptionType": "DiskWithVMGuestState" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with securityType ConfidentialVM with Platform Managed Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSshAuthentication.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSshAuthentication.json new file mode 100644 index 0000000000..a8dbf2c1af --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSshAuthentication.json @@ -0,0 +1,179 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + } + }, + "storageProfile": { + "imageReference": { + "offer": "{image_offer}", + "publisher": "{image_publisher}", + "sku": "{image_sku}", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "e0de9b84-a506-4b95-9623-00a425d05c90" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "e0de9b84-a506-4b95-9623-00a425d05c90" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with ssh authentication." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUefiSettingsOfSecureBootAndVTpm.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUefiSettingsOfSecureBootAndVTpm.json new file mode 100644 index 0000000000..a7bb9b4989 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUefiSettingsOfSecureBootAndVTpm.json @@ -0,0 +1,176 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "securityProfile": { + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "windowsserver-gen2preview-preview", + "publisher": "MicrosoftWindowsServer", + "sku": "windows10-tvm", + "version": "18363.592.2001092016" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "windowsserver-gen2preview-preview", + "publisher": "MicrosoftWindowsServer", + "sku": "windows10-tvm", + "version": "18363.592.2001092016" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "StandardSSD_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "windowsserver-gen2preview-preview", + "publisher": "MicrosoftWindowsServer", + "sku": "windows10-tvm", + "version": "18363.592.2001092016" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "StandardSSD_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with Uefi Settings of secureBoot and vTPM." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUserData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUserData.json new file mode 100644 index 0000000000..2d515e7c7f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUserData.json @@ -0,0 +1,174 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "{vm-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "vmOSdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "{vm-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "{vm-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "vmOSdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "{vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "{vm-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "vmOSdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with UserData" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithVmSizeProperties.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithVmSizeProperties.json new file mode 100644 index 0000000000..0ae5a984c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithVmSizeProperties.json @@ -0,0 +1,186 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D4_v3", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "userData": "U29tZSBDdXN0b20gRGF0YQ==" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D4_v3", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Updating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D4_v3", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with VM Size Properties" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingAssessmentModeOfImageDefault.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingAssessmentModeOfImageDefault.json new file mode 100644 index 0000000000..85788a0331 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingAssessmentModeOfImageDefault.json @@ -0,0 +1,168 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": false, + "patchSettings": { + "assessmentMode": "ImageDefault" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Windows vm with a patch setting assessmentMode of ImageDefault." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByOs.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByOs.json new file mode 100644 index 0000000000..e907aa0ee5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByOs.json @@ -0,0 +1,168 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "patchMode": "AutomaticByOS" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "patchMode": "AutomaticByOS" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "patchMode": "AutomaticByOS" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Windows vm with a patch setting patchMode of AutomaticByOS." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json new file mode 100644 index 0000000000..5530b373e9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json @@ -0,0 +1,183 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": false, + "rebootSetting": "Never" + }, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": false, + "rebootSetting": "Never" + }, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": false, + "rebootSetting": "Never" + }, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Windows vm with a patch setting patchMode of AutomaticByPlatform and AutomaticByPlatformSettings." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndEnableHotpatchingSetToTrue.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndEnableHotpatchingSetToTrue.json new file mode 100644 index 0000000000..e779a3342a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndEnableHotpatchingSetToTrue.json @@ -0,0 +1,171 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "enableHotpatching": true, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "enableHotpatching": true, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "enableHotpatching": true, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Windows vm with a patch setting patchMode of AutomaticByPlatform and enableHotpatching set to true." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfManual.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfManual.json new file mode 100644 index 0000000000..62b26ad4b8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfManual.json @@ -0,0 +1,168 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "patchMode": "Manual" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "patchMode": "Manual" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": false, + "patchSettings": { + "patchMode": "Manual" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Windows vm with a patch setting patchMode of Manual." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json new file mode 100644 index 0000000000..3d3c132919 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json @@ -0,0 +1,171 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Windows vm with patch settings patchMode and assessmentMode set to AutomaticByPlatform." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateOrUpdateAVmWithCapacityReservation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateOrUpdateAVmWithCapacityReservation.json new file mode 100644 index 0000000000..e5a5af6be8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateOrUpdateAVmWithCapacityReservation.json @@ -0,0 +1,185 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}" + } + }, + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}" + } + }, + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}" + } + }, + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create or update a VM with capacity reservation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMaximumSetGen.json new file mode 100644 index 0000000000..d12681ea9a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hibernate": true, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Deallocate", + "title": "VirtualMachine_Deallocate_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMinimumSetGen.json new file mode 100644 index 0000000000..f554dc2f24 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Deallocate", + "title": "VirtualMachine_Deallocate_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Delete.json new file mode 100644 index 0000000000..881a81b188 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "forceDeletion": "true", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + }, + "204": {} + }, + "operationId": "VirtualMachines_Delete", + "title": "Force delete a VM" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Generalize.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Generalize.json new file mode 100644 index 0000000000..69d1fa0cbf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Generalize.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVMName" + }, + "responses": { + "200": {} + }, + "operationId": "VirtualMachines_Generalize", + "title": "Generalize a Virtual Machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachine.json new file mode 100644 index 0000000000..3efe01156f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachine.json @@ -0,0 +1,137 @@ +{ + "parameters": { + "$expand": "userData", + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "West US", + "properties": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "availabilitySet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/my-AvailabilitySet" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{myStorageAccount}.blob.core.windows.net" + } + }, + "extensionsTimeBudget": "PT50M", + "hardwareProfile": { + "vmSize": "Standard_DS3_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{myNIC}" + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": false, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/my-ppg01" + }, + "storageProfile": { + "dataDisks": [ + { + "name": "myDataDisk0", + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 30, + "lun": 0, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDataDisk0", + "storageAccountType": "Premium_LRS" + } + }, + { + "name": "myDataDisk1", + "caching": "ReadWrite", + "createOption": "Attach", + "diskSizeGB": 100, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDataDisk1", + "storageAccountType": "Premium_LRS" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myOsDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myOsDisk", + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "timeCreated": "2021-06-27T01:02:38.3138469+00:00", + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "west us", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "typeHandlerVersion": "1.9" + }, + "tags": { + "displayName": "CustomScriptExtension-DSC" + } + } + ], + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachines_Get", + "title": "Get a Virtual Machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json new file mode 100644 index 0000000000..8e7677c748 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "West US", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "hostGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/hostGroups/myHostGroup" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{myNIC}" + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": false, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myOsDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myOsDisk", + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachines_Get", + "title": "Get a virtual machine placed on a dedicated host group through automatic placement" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithDiskControllerTypeProperties.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithDiskControllerTypeProperties.json new file mode 100644 index 0000000000..c9698a7d88 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithDiskControllerTypeProperties.json @@ -0,0 +1,138 @@ +{ + "parameters": { + "$expand": "userData", + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "West US", + "properties": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "availabilitySet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/my-AvailabilitySet" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{myStorageAccount}.blob.core.windows.net" + } + }, + "extensionsTimeBudget": "PT50M", + "hardwareProfile": { + "vmSize": "Standard_DS3_v2", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{myNIC}" + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": false, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [ + { + "name": "myDataDisk0", + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 30, + "lun": 0, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDataDisk0", + "storageAccountType": "Premium_LRS" + } + }, + { + "name": "myDataDisk1", + "caching": "ReadWrite", + "createOption": "Attach", + "diskSizeGB": 100, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDataDisk1", + "storageAccountType": "Premium_LRS" + } + } + ], + "diskControllerType": "NVMe", + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myOsDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myOsDisk", + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "west us", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "typeHandlerVersion": "1.9" + }, + "tags": { + "displayName": "CustomScriptExtension-DSC" + } + } + ], + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachines_Get", + "title": "Get a virtual machine with Disk Controller Type Properties" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithVmSizeProperties.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithVmSizeProperties.json new file mode 100644 index 0000000000..27a4c24b23 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithVmSizeProperties.json @@ -0,0 +1,137 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "expand": "UserData", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "West US", + "properties": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "availabilitySet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/my-AvailabilitySet" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{myStorageAccount}.blob.core.windows.net" + } + }, + "extensionsTimeBudget": "PT50M", + "hardwareProfile": { + "vmSize": "Standard_DS3_v2", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{myNIC}" + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": false, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [ + { + "name": "myDataDisk0", + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 30, + "lun": 0, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDataDisk0", + "storageAccountType": "Premium_LRS" + } + }, + { + "name": "myDataDisk1", + "caching": "ReadWrite", + "createOption": "Attach", + "diskSizeGB": 100, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDataDisk1", + "storageAccountType": "Premium_LRS" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myOsDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myOsDisk", + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "west us", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "typeHandlerVersion": "1.9" + }, + "tags": { + "displayName": "CustomScriptExtension-DSC" + } + } + ], + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachines_Get", + "title": "Get a virtual machine with VM Size Properties" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstallPatches.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstallPatches.json new file mode 100644 index 0000000000..1de54ae2f2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstallPatches.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "installPatchesInput": { + "maximumDuration": "PT4H", + "rebootSetting": "IfRequired", + "windowsParameters": { + "classificationsToInclude": [ + "Critical", + "Security" + ], + "maxPatchPublishDate": "2020-11-19T02:36:43.0539904+00:00" + } + }, + "resourceGroupName": "myResourceGroupName", + "subscriptionId": "{subscription-id}", + "vmName": "myVMName" + }, + "responses": { + "200": { + "body": { + "error": null, + "excludedPatchCount": 0, + "failedPatchCount": 0, + "installationActivityId": "68f8b292-dfc2-4646-9781-33cc88631968", + "installedPatchCount": 3, + "maintenanceWindowExceeded": false, + "notSelectedPatchCount": 0, + "patches": [ + { + "name": "Definition Update for Windows Defender Antivirus - KB2267602 (Definition 1.279.1373.0)", + "classifications": [ + "Definition Updates" + ], + "installationState": "Installed", + "kbId": "2267602", + "patchId": "35428702-5784-4ba4-a6e0-5222258b5411", + "version": "" + }, + { + "name": "Windows Malicious Software Removal Tool x64 - October 2018 (KB890830)", + "classifications": [ + "Update Rollups" + ], + "installationState": "Pending", + "kbId": "890830", + "patchId": "39f9cdd1-795c-4d0e-8c0a-73ab3f31746d", + "version": "" + } + ], + "pendingPatchCount": 2, + "rebootStatus": "Completed", + "startDateTime": "2020-04-24T21:02:04.2556154Z", + "status": "Succeeded" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachines_InstallPatches", + "title": "Install patch state of a virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetInstanceViewOfAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetInstanceViewOfAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json new file mode 100644 index 0000000000..83a757edc1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetInstanceViewOfAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "assignedHost": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/hostGroups/myHostGroup/hosts/myHost", + "computerName": "myVM", + "disks": [ + { + "name": "myOsDisk", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "time": "2023-07-01T21:29:47.477089+00:00" + } + ] + } + ], + "hyperVGeneration": "V1", + "osName": "Windows Server 2016 Datacenter", + "osVersion": "Microsoft Windows NT 10.0.14393.0", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "time": "2023-07-01T21:30:12.8051917+00:00" + }, + { + "code": "PowerState/running", + "displayStatus": "VM running", + "level": "Info" + } + ], + "vmAgent": { + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Ready", + "level": "Info", + "message": "GuestAgent is running and accepting new configurations.", + "time": "2023-07-01T23:11:22+00:00" + } + ], + "vmAgentVersion": "2.7.41491.949" + } + } + } + }, + "operationId": "VirtualMachines_InstanceView", + "title": "Get instance view of a virtual machine placed on a dedicated host group through automatic placement." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetVirtualMachineInstanceView.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetVirtualMachineInstanceView.json new file mode 100644 index 0000000000..a2877fcae4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetVirtualMachineInstanceView.json @@ -0,0 +1,140 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "bootDiagnostics": { + "consoleScreenshotBlobUri": "https://{myStorageAccount}.blob.core.windows.net/bootdiagnostics-myOsDisk/myOsDisk.screenshot.bmp", + "serialConsoleLogBlobUri": "https://{myStorageAccount}.blob.core.windows.net/bootdiagnostics-myOsDisk/myOsDisk.serialconsole.log" + }, + "computerName": "myVM", + "disks": [ + { + "name": "myOsDisk", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "time": "2019-10-14T21:29:47.477089+00:00" + } + ] + }, + { + "name": "myDataDisk0", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "time": "2019-10-14T21:29:47.461517+00:00" + } + ] + } + ], + "hyperVGeneration": "V1", + "osName": "Windows Server 2016 Datacenter", + "osVersion": "Microsoft Windows NT 10.0.14393.0", + "patchStatus": { + "availablePatchSummary": { + "assessmentActivityId": "68f8b292-dfc2-4646-9781-33cc88631968", + "criticalAndSecurityPatchCount": 1, + "error": null, + "lastModifiedTime": "2020-04-24T21:02:04.2556154Z", + "otherPatchCount": 2, + "rebootPending": true, + "startTime": "2020-04-24T21:02:04.2556154Z", + "status": "Succeeded" + }, + "configurationStatuses": [ + { + "code": "PatchModeConfigurationState/Ready", + "displayStatus": "Status_PatchModeConfigurationState_Ready", + "level": "Info", + "time": "2020-04-24T21:02:04.2556154Z" + }, + { + "code": "AssessmentModeConfigurationState/Pending", + "displayStatus": "Status_AssessmentModeConfigurationState_Pending", + "level": "Info", + "time": "2020-04-24T21:02:04.2556154Z" + } + ], + "lastPatchInstallationSummary": { + "error": null, + "excludedPatchCount": 1, + "failedPatchCount": 1, + "installationActivityId": "68f8b292-dfc2-4646-9981-33cc88631968", + "installedPatchCount": 1, + "lastModifiedTime": "2020-04-24T21:02:04.2556154Z", + "maintenanceWindowExceeded": false, + "notSelectedPatchCount": 1, + "pendingPatchCount": 1, + "startTime": "2020-04-24T21:02:04.2556154Z", + "status": "Succeeded" + } + }, + "platformFaultDomain": 1, + "platformUpdateDomain": 1, + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "time": "2019-10-14T21:30:12.8051917+00:00" + }, + { + "code": "PowerState/running", + "displayStatus": "VM running", + "level": "Info" + } + ], + "vmAgent": { + "extensionHandlers": [ + { + "type": "Microsoft.Azure.Security.IaaSAntimalware", + "status": { + "code": "ProvisioningState/succeeded", + "displayStatus": "Ready", + "level": "Info" + }, + "typeHandlerVersion": "1.5.5.9" + } + ], + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Ready", + "level": "Info", + "message": "GuestAgent is running and accepting new configurations.", + "time": "2019-10-14T23:11:22+00:00" + } + ], + "vmAgentVersion": "2.7.41491.949" + }, + "extensions": [ + { + "name": "IaaSAntiMalware-ext0", + "type": "Microsoft.Azure.Security.IaaSAntimalware", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": "Microsoft Antimalware enabled" + } + ], + "typeHandlerVersion": "1.5.5.9" + } + ] + } + } + }, + "operationId": "VirtualMachines_InstanceView", + "title": "Get Virtual Machine Instance View." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMaximumSetGen.json new file mode 100644 index 0000000000..cb05bab257 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMaximumSetGen.json @@ -0,0 +1,695 @@ +{ + "parameters": { + "$filter": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "api-version": "2023-07-01", + "statusOnly": "aaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "a", + "value": [ + { + "name": "{virtualMachineName}", + "type": "Microsoft.Compute/virtualMachines", + "extendedLocation": { + "name": "aaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaaa", + "tenantId": "aaaaa", + "userAssignedIdentities": { + "key5688": { + "clientId": "aaaaaaaaaaa", + "principalId": "aaaaaaaaaaaaaaa" + } + } + }, + "location": "eastus", + "plan": { + "name": "aaaaaaaaaaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "order": 4, + "packageReferenceId": "aaaaaaaaaaaaaaaaaaaaaa", + "tags": "aaaaa" + } + ] + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "billingProfile": { + "maxPrice": 26 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaaaa" + } + }, + "evictionPolicy": "Deallocate", + "extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "hardwareProfile": { + "vmSize": "Standard_A0", + "vmSizeProperties": { + "vCPUsAvailable": 7, + "vCPUsPerCore": 14 + } + }, + "host": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "licenseType": "aaaaaaaaaaaaaaa", + "networkProfile": { + "networkApiVersion": "2022-05-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "deleteOption": "Delete", + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaa", + "domainNameLabelScope": "TenantReuse" + }, + "idleTimeoutInMinutes": 23, + "ipTags": [ + { + "ipTagType": "aaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "Test", + "customData": "aaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaaaaaaaaaaaaaaaaaaaaa", + "keyData": "aaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "platformFaultDomain": 8, + "priority": "Regular", + "provisioningState": "Succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + }, + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "communityGalleryImageId": "aaaa", + "exactVersion": "aaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20170406" + }, + "osDisk": { + "name": "test", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "securityProfile": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "securityEncryptionType": "VMGuestStateOnly" + }, + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "timeCreated": "2022-01-14T16:43:41.683Z", + "userData": "aaa", + "virtualMachineScaleSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vmId": "{vmId}" + }, + "resources": [ + { + "name": "aaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaaaaa", + "properties": { + "type": "aaaaaaaa", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaaaaaaaa", + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "provisioningState": "aaa", + "publisher": "aaaaaaaaaaaaaaaa", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "aaaaaaaaaaaa" + }, + "tags": { + "key9428": "aaaaaaa" + } + } + ], + "tags": {}, + "zones": [ + "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + { + "name": "{virtualMachineName}", + "type": "Microsoft.Compute/virtualMachines", + "extendedLocation": { + "name": "aaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaaa", + "tenantId": "aaaaa", + "userAssignedIdentities": { + "key5688": { + "clientId": "aaaaaaaaaaa", + "principalId": "aaaaaaaaaaaaaaa" + } + } + }, + "location": "eastus", + "plan": { + "name": "aaaaaaaaaaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "order": 4, + "packageReferenceId": "aaaaaaaaaaaaaaaaaaaaaa", + "tags": "aaaaa" + } + ] + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "billingProfile": { + "maxPrice": 26 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaaaa" + } + }, + "evictionPolicy": "Deallocate", + "extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaa", + "hardwareProfile": { + "vmSize": "Standard_A0", + "vmSizeProperties": { + "vCPUsAvailable": 7, + "vCPUsPerCore": 14 + } + }, + "host": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "licenseType": "aaaaaaaaaaaaaa", + "networkProfile": { + "networkApiVersion": "2022-05-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "deleteOption": "Delete", + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaa", + "domainNameLabelScope": "SubscriptionReuse" + }, + "idleTimeoutInMinutes": 23, + "ipTags": [ + { + "ipTagType": "aaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "Test", + "customData": "aaaaaaaaaaaaaaaaaaaaaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaaaaaaaaaaaaaaaaaaaaa", + "keyData": "aaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "platformFaultDomain": 11, + "priority": "Regular", + "provisioningState": "Succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + }, + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "communityGalleryImageId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "exactVersion": "aa", + "id": "aaaaaaaa", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20170406" + }, + "osDisk": { + "name": "test", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "securityProfile": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "securityEncryptionType": "VMGuestStateOnly" + }, + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "timeCreated": "2022-01-14T16:43:41.685Z", + "userData": "aaaaaaaaaaaaaaaaaaa", + "virtualMachineScaleSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vmId": "{vmId}" + }, + "resources": [ + { + "name": "aaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaaaaa", + "properties": { + "type": "aaaaaaaa", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaaaaaaaa", + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "provisioningState": "aaa", + "publisher": "aaaaaaaaaaaaaaaa", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "aaaaaaaaaaaa" + }, + "tags": { + "key9428": "aaaaaaa" + } + } + ], + "tags": {}, + "zones": [ + "aaaaaa" + ] + } + ] + } + } + }, + "operationId": "VirtualMachines_ListAll", + "title": "VirtualMachine_ListAll_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMinimumSetGen.json new file mode 100644 index 0000000000..fe973cfdab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMinimumSetGen.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "location": "eastus" + }, + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "location": "eastus" + } + ] + } + } + }, + "operationId": "VirtualMachines_ListAll", + "title": "VirtualMachine_ListAll_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAvailableSizes.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAvailableSizes.json new file mode 100644 index 0000000000..dd9caf6226 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAvailableSizes.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVmName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Standard_A1_V2", + "maxDataDiskCount": 2, + "memoryInMB": 2048, + "numberOfCores": 1, + "osDiskSizeInMB": 1047552, + "resourceDiskSizeInMB": 10240 + }, + { + "name": "Standard_A2_V2", + "maxDataDiskCount": 4, + "memoryInMB": 4096, + "numberOfCores": 2, + "osDiskSizeInMB": 1047552, + "resourceDiskSizeInMB": 20480 + } + ] + } + } + }, + "operationId": "VirtualMachines_ListAvailableSizes", + "title": "Lists all available virtual machine sizes to which the specified virtual machine can be resized" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListByLocation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListByLocation.json new file mode 100644 index 0000000000..f57b47919a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListByLocation.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "location": "eastus", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{virtualMachineName}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "location": "eastus", + "properties": { + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "hardwareProfile": { + "vmSize": "Standard_A0" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}" + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "Test", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2012-R2-Datacenter", + "version": "4.127.20170406" + }, + "osDisk": { + "name": "test", + "caching": "None", + "createOption": "FromImage", + "diskSizeGB": 127, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + } + } + }, + "vmId": "{vmId}" + }, + "tags": { + "RG": "rg", + "testTag": "1" + } + }, + { + "name": "{virtualMachineName}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "location": "eastus", + "properties": { + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "hardwareProfile": { + "vmSize": "Standard_A0" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}" + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "Test", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2012-R2-Datacenter", + "version": "4.127.20170406" + }, + "osDisk": { + "name": "test", + "caching": "None", + "createOption": "FromImage", + "diskSizeGB": 127, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + } + } + }, + "vmId": "{vmId}" + }, + "tags": { + "RG": "rg", + "testTag": "1" + } + } + ] + } + } + }, + "operationId": "VirtualMachines_ListByLocation", + "title": "Lists all the virtual machines under the specified subscription for the specified location." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMaximumSetGen.json new file mode 100644 index 0000000000..1c3ebb1dd7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMaximumSetGen.json @@ -0,0 +1,932 @@ +{ + "parameters": { + "$filter": "aaaaaaaaaaaaaaaaaaaaaaa", + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "a", + "value": [ + { + "name": "{virtualMachineName}", + "type": "Microsoft.Compute/virtualMachines", + "extendedLocation": { + "name": "aaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaaa", + "tenantId": "aaaaa", + "userAssignedIdentities": { + "key5688": { + "clientId": "aaaaaaaaaaa", + "principalId": "aaaaaaaaaaaaaaa" + } + } + }, + "location": "eastus", + "plan": { + "name": "aaaaaaaaaaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "order": 4, + "packageReferenceId": "aaaaaaaaaaaaaaaaaaaaaa", + "tags": "aaaaa" + } + ] + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "billingProfile": { + "maxPrice": 26 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaaaa" + } + }, + "evictionPolicy": "Deallocate", + "extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "hardwareProfile": { + "vmSize": "Standard_A0", + "vmSizeProperties": { + "vCPUsAvailable": 7, + "vCPUsPerCore": 14 + } + }, + "host": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "licenseType": "aaaaaaaaaaaaaaa", + "networkProfile": { + "networkApiVersion": "2022-05-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "deleteOption": "Delete", + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaa" + }, + "idleTimeoutInMinutes": 23, + "ipTags": [ + { + "ipTagType": "aaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "Test", + "customData": "aaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaaaaaaaaaaaaaaaaaaaaa", + "keyData": "aaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "platformFaultDomain": 8, + "priority": "Regular", + "provisioningState": "Succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + }, + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "communityGalleryImageId": "aaaa", + "exactVersion": "aaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20170406" + }, + "osDisk": { + "name": "test", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "securityProfile": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "securityEncryptionType": "VMGuestStateOnly" + }, + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "timeCreated": "2022-01-14T16:43:41.683Z", + "userData": "aaa", + "virtualMachineScaleSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vmId": "{vmId}" + }, + "resources": [ + { + "name": "aaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaaaaa", + "properties": { + "type": "aaaaaaaa", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaaaaaaaa", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "substatuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "typeHandlerVersion": "aaaaaa" + }, + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "provisioningState": "aaa", + "publisher": "aaaaaaaaaaaaaaaa", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "aaaaaaaaaaaa" + }, + "tags": { + "key9428": "aaaaaaa" + } + } + ], + "tags": {}, + "zones": [ + "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + { + "name": "{virtualMachineName}", + "type": "Microsoft.Compute/virtualMachines", + "extendedLocation": { + "name": "aaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaaa", + "tenantId": "aaaaa", + "userAssignedIdentities": { + "key5688": { + "clientId": "aaaaaaaaaaa", + "principalId": "aaaaaaaaaaaaaaa" + } + } + }, + "location": "eastus", + "plan": { + "name": "aaaaaaaaaaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "order": 4, + "packageReferenceId": "aaaaaaaaaaaaaaaaaaaaaa", + "tags": "aaaaa" + } + ] + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "billingProfile": { + "maxPrice": 26 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaaaa" + } + }, + "evictionPolicy": "Deallocate", + "extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaa", + "hardwareProfile": { + "vmSize": "Standard_A0", + "vmSizeProperties": { + "vCPUsAvailable": 7, + "vCPUsPerCore": 14 + } + }, + "host": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "instanceView": { + "assignedHost": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "bootDiagnostics": { + "consoleScreenshotBlobUri": "aaaaaaaaaaaaaaaaaaaaaaa", + "serialConsoleLogBlobUri": "aaaaaaaaaaaaaaaaaaa", + "status": { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + }, + "computerName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "disks": [ + { + "name": "a", + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "statuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ] + } + ], + "hyperVGeneration": "V1", + "maintenanceRedeployStatus": { + "isCustomerInitiatedMaintenanceAllowed": true, + "lastOperationMessage": "aa", + "lastOperationResultCode": "None", + "maintenanceWindowEndTime": "2022-01-14T16:43:41.682Z", + "maintenanceWindowStartTime": "2022-01-14T16:43:41.682Z", + "preMaintenanceWindowEndTime": "2022-01-14T16:43:41.682Z", + "preMaintenanceWindowStartTime": "2022-01-14T16:43:41.682Z" + }, + "osName": "aaaaaaaaaaa", + "osVersion": "aaaaaaaaaaaaaa", + "patchStatus": { + "availablePatchSummary": { + "assessmentActivityId": "aaaaaaaaaaaaaaaaaaa", + "criticalAndSecurityPatchCount": 22, + "error": { + "code": "aaaaaa", + "innererror": { + "errordetail": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "exceptiontype": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "message": "aaa", + "target": "aaaaaaaaa", + "details": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaa", + "message": "aaaaaaaaaaaaa", + "target": "aaaaaa" + } + ] + }, + "lastModifiedTime": "2022-01-14T16:43:41.683Z", + "otherPatchCount": 25, + "rebootPending": true, + "startTime": "2022-01-14T16:43:41.682Z", + "status": "Unknown" + }, + "configurationStatuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "lastPatchInstallationSummary": { + "error": { + "code": "aaaaaa", + "innererror": { + "errordetail": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "exceptiontype": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "message": "aaa", + "target": "aaaaaaaaa", + "details": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaa", + "message": "aaaaaaaaaaaaa", + "target": "aaaaaa" + } + ] + }, + "excludedPatchCount": 1, + "failedPatchCount": 30, + "installationActivityId": "aaaaaa", + "installedPatchCount": 28, + "lastModifiedTime": "2022-01-14T16:43:41.683Z", + "maintenanceWindowExceeded": true, + "notSelectedPatchCount": 20, + "pendingPatchCount": 2, + "startTime": "2022-01-14T16:43:41.683Z", + "status": "Unknown" + } + }, + "platformFaultDomain": 29, + "platformUpdateDomain": 1, + "rdpThumbPrint": "aaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "vmAgent": { + "extensionHandlers": [ + { + "type": "aaaaa", + "status": { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + }, + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaa" + } + ], + "statuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "vmAgentVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "vmHealth": { + "status": { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + }, + "extensions": [ + { + "name": "aaaaaaaaaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "substatuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "typeHandlerVersion": "aaaaaa" + } + ] + }, + "licenseType": "aaaaaaaaaaaaaa", + "networkProfile": { + "networkApiVersion": "2022-05-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "deleteOption": "Delete", + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaa" + }, + "idleTimeoutInMinutes": 23, + "ipTags": [ + { + "ipTagType": "aaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "Test", + "customData": "aaaaaaaaaaaaaaaaaaaaaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaaaaaaaaaaaaaaaaaaaaa", + "keyData": "aaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "platformFaultDomain": 11, + "priority": "Regular", + "provisioningState": "Succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + }, + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "communityGalleryImageId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "exactVersion": "aa", + "id": "aaaaaaaa", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20170406" + }, + "osDisk": { + "name": "test", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "securityProfile": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "securityEncryptionType": "VMGuestStateOnly" + }, + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "timeCreated": "2022-01-14T16:43:41.685Z", + "userData": "aaaaaaaaaaaaaaaaaaa", + "virtualMachineScaleSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vmId": "{vmId}" + }, + "resources": [ + { + "name": "aaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaaaaa", + "properties": { + "type": "aaaaaaaa", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaaaaaaaa", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "substatuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "typeHandlerVersion": "aaaaaa" + }, + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "provisioningState": "aaa", + "publisher": "aaaaaaaaaaaaaaaa", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "aaaaaaaaaaaa" + }, + "tags": { + "key9428": "aaaaaaa" + } + } + ], + "tags": {}, + "zones": [ + "aaaaaa" + ] + } + ] + } + } + }, + "operationId": "VirtualMachines_List", + "title": "VirtualMachine_List_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMinimumSetGen.json new file mode 100644 index 0000000000..2d08e37963 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMinimumSetGen.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "location": "eastus" + }, + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "location": "eastus" + } + ] + } + } + }, + "operationId": "VirtualMachines_List", + "title": "VirtualMachine_List_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMaximumSetGen.json new file mode 100644 index 0000000000..9eec71dc7e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_PerformMaintenance", + "title": "VirtualMachine_PerformMaintenance_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMinimumSetGen.json new file mode 100644 index 0000000000..935617bd31 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_PerformMaintenance", + "title": "VirtualMachine_PerformMaintenance_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMaximumSetGen.json new file mode 100644 index 0000000000..99bf340edf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "skipShutdown": true, + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_PowerOff", + "title": "VirtualMachine_PowerOff_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMinimumSetGen.json new file mode 100644 index 0000000000..fdab18ec3a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_PowerOff", + "title": "VirtualMachine_PowerOff_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reapply.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reapply.json new file mode 100644 index 0000000000..d01b28ba63 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reapply.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "ResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "VMName" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachines_Reapply", + "title": "Reapply the state of a virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMaximumSetGen.json new file mode 100644 index 0000000000..abca78078a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "a" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Redeploy", + "title": "VirtualMachine_Redeploy_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMinimumSetGen.json new file mode 100644 index 0000000000..505219bf6e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Redeploy", + "title": "VirtualMachine_Redeploy_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageANonEphemeralVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageANonEphemeralVirtualMachine.json new file mode 100644 index 0000000000..d86353b888 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageANonEphemeralVirtualMachine.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "exactVersion": "aaaaaa", + "osProfile": { + "adminPassword": "{your-password}", + "customData": "{your-custom-data}" + }, + "tempDisk": true + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVMName" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachines_Reimage", + "title": "Reimage a Non-Ephemeral Virtual Machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageAVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageAVirtualMachine.json new file mode 100644 index 0000000000..532b20062d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageAVirtualMachine.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "tempDisk": true + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVMName" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachines_Reimage", + "title": "Reimage a Virtual Machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMaximumSetGen.json new file mode 100644 index 0000000000..b1c5e31a21 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Restart", + "title": "VirtualMachine_Restart_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMinimumSetGen.json new file mode 100644 index 0000000000..c081f0098a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Restart", + "title": "VirtualMachine_Restart_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RetrieveBootDiagnosticsData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RetrieveBootDiagnosticsData.json new file mode 100644 index 0000000000..0d374784df --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RetrieveBootDiagnosticsData.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "ResourceGroup", + "sasUriExpirationTimeInMinutes": 60, + "subscriptionId": "{subscription-id}", + "vmName": "VMName" + }, + "responses": { + "200": { + "body": { + "consoleScreenshotBlobUri": "https://storageuri/vm.screenshot.bmp?{sasKey}", + "serialConsoleLogBlobUri": "https://storageuri/vm.serialconsole.log?{sasKey}" + } + } + }, + "operationId": "VirtualMachines_RetrieveBootDiagnosticsData", + "title": "RetrieveBootDiagnosticsData of a virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RunCommand.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RunCommand.json new file mode 100644 index 0000000000..8fc3d9d1d4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RunCommand.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "$top": 1, + "api-version": "2023-07-01", + "monitor": "true", + "parameters": { + "commandId": "RunPowerShellScript" + }, + "resourceGroupName": "crptestar98131", + "subscriptionId": "24fb23e3-6ba3-41f0-9b6e-e41131d5d61e", + "vmName": "vm3036" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "code": "ComponentStatus/StdOut/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": "This is a sample script with parameters value1 value2" + }, + { + "code": "ComponentStatus/StdErr/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": "" + } + ] + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachines_RunCommand", + "title": "VirtualMachineRunCommand" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_SimulateEviction.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_SimulateEviction.json new file mode 100644 index 0000000000..3e1cac8ff2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_SimulateEviction.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "ResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "VMName" + }, + "responses": { + "204": {} + }, + "operationId": "VirtualMachines_SimulateEviction", + "title": "Simulate Eviction a virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMaximumSetGen.json new file mode 100644 index 0000000000..326389d619 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Start", + "title": "VirtualMachine_Start_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMinimumSetGen.json new file mode 100644 index 0000000000..a06f47c7db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Start", + "title": "VirtualMachine_Start_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByDetachingDataDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByDetachingDataDisk.json new file mode 100644 index 0000000000..41cfaf6144 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByDetachingDataDisk.json @@ -0,0 +1,137 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "toBeDetached": true + }, + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "toBeDetached": false + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Updating", + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": true + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": false + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "3906fef9-a1e5-4b83-a8a8-540858b41df0" + } + } + } + }, + "operationId": "VirtualMachines_Update", + "title": "Update a VM by detaching data disk" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByForceDetachingDataDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByForceDetachingDataDisk.json new file mode 100644 index 0000000000..944c91870e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByForceDetachingDataDisk.json @@ -0,0 +1,139 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "Empty", + "detachOption": "ForceDetach", + "diskSizeGB": 1023, + "lun": 0, + "toBeDetached": true + }, + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "toBeDetached": false + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Updating", + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "detachOption": "ForceDetach", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": true + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": false + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "3906fef9-a1e5-4b83-a8a8-540858b41df0" + } + } + } + }, + "operationId": "VirtualMachines_Update", + "title": "Update a VM by force-detaching data disk" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp index 819a8263c1..1654d879bc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp @@ -57,5 +57,34 @@ using TypeSpec.Versioning; @service({ title: "Azure Compute resource management API.", }) +@versioned(Versions) @doc("Compute Client") namespace Microsoft.Compute; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-07-01 API version.") + v2023_07_01: "2023-07-01", + + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-04-02 API version.") + v2023_04_02: "2023-04-02", + + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2021-07-01 API version.") + v2021_07_01: "2021-07-01", + + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2022-03-03 API version.") + v2022_03_03: "2022-03-03", + + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2022-09-04 API version.") + v2022_09_04: "2022-09-04", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp index dddd2316ac..ae375f90a9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp @@ -7,28 +7,33 @@ using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.Compute; interface Operations extends Azure.ResourceManager.Operations {} +@doc("Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.") enum RepairAction { Replace, Restart, Reimage, } +@doc("Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

    Possible values are:

    **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

    **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

    **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true ") enum WindowsVMGuestPatchMode { Manual, AutomaticByOS, AutomaticByPlatform, } +@doc("Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.

    Possible values are:

    **ImageDefault** - You control the timing of patch assessments on a virtual machine.

    **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. ") enum WindowsPatchAssessmentMode { ImageDefault, AutomaticByPlatform, } +@doc("Specifies the reboot setting for all AutomaticByPlatform patch installation operations.") enum WindowsVMGuestPatchAutomaticByPlatformRebootSetting { Unknown, IfRequired, @@ -36,16 +41,19 @@ enum WindowsVMGuestPatchAutomaticByPlatformRebootSetting { Always, } +@doc("Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

    Possible values are:

    **ImageDefault** - The virtual machine's default patching configuration is used.

    **AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true") enum LinuxVMGuestPatchMode { ImageDefault, AutomaticByPlatform, } +@doc("Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.

    Possible values are:

    **ImageDefault** - You control the timing of patch assessments on a virtual machine.

    **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.") enum LinuxPatchAssessmentMode { ImageDefault, AutomaticByPlatform, } +@doc("Specifies the reboot setting for all AutomaticByPlatform patch installation operations.") enum LinuxVMGuestPatchAutomaticByPlatformRebootSetting { Unknown, IfRequired, @@ -53,21 +61,25 @@ enum LinuxVMGuestPatchAutomaticByPlatformRebootSetting { Always, } +@doc("Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described.") enum DiskCreateOptionTypes { FromImage, Empty, Attach, } +@doc("Specifies the ephemeral disk option for operating system disk.") enum DiffDiskOptions { Local, } +@doc("Specifies the ephemeral disk placement for operating system disk. This property can be used by user in the request to choose the location i.e, cache disk or resource disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements") enum DiffDiskPlacement { CacheDisk, ResourceDisk, } +@doc("Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. Premium_ZRS uses Premium SSD zone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant storage. For more information regarding disks supported for Windows Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/windows/disks-types and, for Linux Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/linux/disks-types") enum StorageAccountTypes { Standard_LRS, Premium_LRS, @@ -78,16 +90,19 @@ enum StorageAccountTypes { PremiumV2_LRS, } +@doc("Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. **Note:** It can be set for only Confidential VMs.") enum SecurityEncryptionTypes { VMGuestStateOnly, DiskWithVMGuestState, } +@doc("Specifies the behavior of the managed disk when the VM gets deleted, for example whether the managed disk is deleted or detached. Supported values are: **Delete.** If this value is used, the managed disk is deleted when VM gets deleted. **Detach.** If this value is used, the managed disk is retained after VM gets deleted. Minimum api-version: 2021-03-01.") enum DiskDeleteOptionTypes { Delete, Detach, } +@doc("The Domain name label scope.The concatenation of the hashed domain name label that generated according to the policy from domain name label scope and vm index will be the domain name labels of the PublicIPAddress resources that will be created") enum DomainNameLabelScopeTypes { TenantReuse, SubscriptionReuse, @@ -95,32 +110,38 @@ enum DomainNameLabelScopeTypes { NoReuse, } +@doc("Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") enum IPVersion { IPv4, IPv6, } +@doc("Specify what happens to the network interface when the VM is deleted") enum DeleteOptions { Delete, Detach, } +@doc("Specify public IP sku name") enum PublicIPAddressSkuName { Basic, Standard, } +@doc("Specify public IP sku tier") enum PublicIPAddressSkuTier { Regional, Global, } +@doc("Specifies whether the Auxiliary mode is enabled for the Network Interface resource.") enum NetworkInterfaceAuxiliaryMode { None, AcceleratedConnections, Floating, } +@doc("Specifies whether the Auxiliary sku is enabled for the Network Interface resource.") enum NetworkInterfaceAuxiliarySku { None, A1, @@ -129,21 +150,25 @@ enum NetworkInterfaceAuxiliarySku { A8, } +@doc("specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations") enum NetworkApiVersion { `2020-11-01`, } +@doc("Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set.") enum SecurityTypes { TrustedLaunch, ConfidentialVM, } +@doc("Specifies the priority for a standalone virtual machine or the virtual machines in the scale set. 'Low' enum will be deprecated in the future, please use 'Spot' as the enum to deploy Azure Spot VM/VMSS.") enum VirtualMachinePriorityTypes { Regular, Low, Spot, } +@doc("Specifies the eviction policy for the Azure Spot VM/VMSS") enum VirtualMachineEvictionPolicyTypes { Deallocate, Delete, @@ -155,11 +180,13 @@ enum VirtualMachineScaleSetScaleInRules { NewestVM, } +@doc("Specifies the orchestration mode for the virtual machine scale set.") enum OrchestrationMode { Uniform, Flexible, } +@doc("The type of extendedLocation.") enum ExtendedLocationTypes { EdgeZone, } @@ -168,26 +195,31 @@ enum ExpandTypesForGetVMScaleSets { userData, } +@doc("The name of the service.") enum OrchestrationServiceNames { AutomaticRepairs, } +@doc("The current state of the service.") enum OrchestrationServiceState { NotRunning, Running, Suspended, } +@doc("The action to be performed.") enum OrchestrationServiceStateAction { Resume, Suspend, } +@doc("The hypervisor generation of the Virtual Machine. Applicable to OS disks only.") enum HyperVGeneration { V1, V2, } +@doc("Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set.") enum VirtualMachineSizeTypes { Basic_A0, Basic_A1, @@ -357,30 +389,36 @@ enum VirtualMachineSizeTypes { Standard_NV24, } +@doc("Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values are: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'.") enum DiskDetachOptionTypes { ForceDetach, } +@doc("Specifies the disk controller type configured for the VM and VirtualMachineScaleSet. This property is only supported for virtual machines whose operating system disk and VM sku supports Generation 2 (https://docs.microsoft.com/en-us/azure/virtual-machines/generation-2), please check the HyperVGenerations capability returned as part of VM sku capabilities in the response of Microsoft.Compute SKUs api for the region contains V2 (https://docs.microsoft.com/rest/api/compute/resourceskus/list). For more information about Disk Controller Types supported please refer to https://aka.ms/azure-diskcontrollertypes.") enum DiskControllerTypes { SCSI, NVMe, } +@doc("Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") enum IPVersions { IPv4, IPv6, } +@doc("Specify the public IP allocation type") enum PublicIPAllocationMethod { Dynamic, Static, } +@doc("Specifies the HyperVGeneration Type associated with a resource") enum HyperVGenerationType { V1, V2, } +@doc("The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"") enum PatchOperationStatus { Unknown, InProgress, @@ -397,6 +435,7 @@ enum ExpandTypesForListVMs { instanceView, } +@doc("Describes the reboot requirements of the patch.") enum VMGuestPatchRebootBehavior { Unknown, NeverReboots, @@ -404,11 +443,13 @@ enum VMGuestPatchRebootBehavior { CanRequestReboot, } +@doc("Describes the availability of a given patch.") enum PatchAssessmentState { Unknown, Available, } +@doc("Defines when it is acceptable to reboot a VM during a software update operation.") enum VMGuestPatchRebootSetting { IfRequired, Never, @@ -432,6 +473,7 @@ enum VMGuestPatchClassificationLinux { Other, } +@doc("The reboot state of the VM following completion of the operation.") enum VMGuestPatchRebootStatus { Unknown, NotNeeded, @@ -441,6 +483,7 @@ enum VMGuestPatchRebootStatus { Completed, } +@doc("The state of the patch after the installation operation completed.") enum PatchInstallationState { Unknown, Installed, @@ -450,43 +493,51 @@ enum PatchInstallationState { Pending, } +@doc("Specifies the HyperVGeneration Type") enum HyperVGenerationTypes { V1, V2, } +@doc("VM disk types which are disallowed.") enum VmDiskTypes { None, Unmanaged, } +@doc("Specifies the Architecture Type") enum ArchitectureTypes { x64, Arm64, } +@doc("Describes the state of the image.") enum ImageState { Active, ScheduledForDeprecation, Deprecated, } +@doc("Describes the type of the alternative option.") enum AlternativeType { None, Offer, Plan, } +@doc("Specifies the type of the proximity placement group. Possible values are: **Standard** : Co-locate resources within an Azure region or Availability Zone. **Ultra** : For future use.") enum ProximityPlacementGroupType { Standard, Ultra, } +@doc("Gets the Operating System type.") enum OperatingSystemType { Windows, Linux, } +@doc("The type of key used to encrypt the data of the disk restore point.") enum RestorePointEncryptionType { @doc("Disk Restore Point is encrypted at rest with Platform managed key. ") EncryptionAtRestWithPlatformKey, @@ -496,6 +547,7 @@ enum RestorePointEncryptionType { EncryptionAtRestWithPlatformAndCustomerKeys, } +@doc("ConsistencyMode of the RestorePoint. Can be specified in the input while creating a restore point. For now, only CrashConsistent is accepted as a valid input. Please refer to https://aka.ms/RestorePoints for more details.") enum ConsistencyModeTypes { CrashConsistent, FileSystemConsistent, @@ -523,6 +575,7 @@ enum CapacityReservationInstanceViewTypes { instanceView, } +@doc("Script execution status.") enum ExecutionState { Unknown, Pending, @@ -533,6 +586,7 @@ enum ExecutionState { Canceled, } +@doc("The sku name.") enum DiskStorageAccountTypes { @doc("Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access.") Standard_LRS, @@ -550,11 +604,13 @@ enum DiskStorageAccountTypes { PremiumV2_LRS, } +@doc("The architecture of the image. Applicable to OS disks only.") enum Architecture { x64, Arm64, } +@doc("This enumerates the possible sources of a disk's creation.") enum DiskCreateOption { @doc("Create an empty data disk of a size given by diskSizeGB.") Empty, @doc("Disk will be attached to a VM.") Attach, @@ -577,6 +633,7 @@ enum DiskCreateOption { CopyFromSanSnapshot, } +@doc("This enumerates the possible state of the disk.") enum DiskState { @doc("The disk is not being used and can be attached to a VM.") Unattached, @doc("The disk is currently attached to a running VM.") Attached, @@ -592,6 +649,7 @@ enum DiskState { ActiveUpload, } +@doc("The type of key used to encrypt the data of the disk.") enum EncryptionType { @doc("Disk is encrypted at rest with Platform managed key. It is the default encryption type. This is not a valid encryption type for disk encryption sets.") EncryptionAtRestWithPlatformKey, @@ -601,6 +659,7 @@ enum EncryptionType { EncryptionAtRestWithPlatformAndCustomerKeys, } +@doc("Policy for accessing the disk via network.") enum NetworkAccessPolicy { @doc("The disk can be exported or uploaded to from any network.") AllowAll, @doc("The disk can be exported or uploaded to using a DiskAccess resource's private endpoints.") @@ -608,6 +667,7 @@ enum NetworkAccessPolicy { @doc("The disk cannot be exported.") DenyAll, } +@doc("Specifies the SecurityType of the VM. Applicable for OS disks only.") enum DiskSecurityTypes { @doc("Trusted Launch provides security features such as secure boot and virtual Trusted Platform Module (vTPM)") TrustedLaunch, @@ -619,6 +679,7 @@ enum DiskSecurityTypes { ConfidentialVM_DiskEncryptedWithCustomerKey, } +@doc("Policy for controlling export on the disk.") enum PublicNetworkAccess { @doc("You can generate a SAS URI to access the underlying data of the disk publicly on the internet when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from your trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate.") Enabled, @@ -626,6 +687,7 @@ enum PublicNetworkAccess { Disabled, } +@doc("Additional authentication requirements when exporting or uploading to a disk or snapshot.") enum DataAccessAuthMode { @doc("When export/upload URL is used, the system checks if the user has an identity in Azure Active Directory and has necessary permissions to export/upload the data. Please refer to aka.ms/DisksAzureADAuth.") AzureActiveDirectory, @@ -633,12 +695,14 @@ enum DataAccessAuthMode { None, } +@doc("The Access Level, accepted values include None, Read, Write.") enum AccessLevel { None, Read, Write, } +@doc("Used to specify the file format when making request for SAS on a VHDX file format snapshot") enum FileFormat { @doc("A VHD file is a disk image file in the Virtual Hard Disk file format.") VHD, @@ -646,12 +710,14 @@ enum FileFormat { VHDX, } +@doc("The private endpoint connection status.") enum PrivateEndpointServiceConnectionStatus { Pending, Approved, Rejected, } +@doc("The current provisioning state.") enum PrivateEndpointConnectionProvisioningState { Succeeded, Creating, @@ -659,6 +725,7 @@ enum PrivateEndpointConnectionProvisioningState { Failed, } +@doc("The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys.") enum DiskEncryptionSetIdentityType { SystemAssigned, UserAssigned, @@ -666,6 +733,7 @@ enum DiskEncryptionSetIdentityType { None, } +@doc("The type of key used to encrypt the data of the disk.") enum DiskEncryptionSetType { @doc("Resource using diskEncryptionSet would be encrypted at rest with Customer managed key that can be changed and revoked by a customer.") EncryptionAtRestWithCustomerKey, @@ -675,21 +743,25 @@ enum DiskEncryptionSetType { ConfidentialVmEncryptedWithCustomerKey, } +@doc("The sku name.") enum SnapshotStorageAccountTypes { @doc("Standard HDD locally redundant storage") Standard_LRS, @doc("Premium SSD locally redundant storage") Premium_LRS, @doc("Standard zone redundant storage") Standard_ZRS, } +@doc("Indicates the error code if the background copy of a resource created via the CopyStart operation fails.") enum CopyCompletionErrorReason { @doc("Indicates that the source snapshot was deleted while the background copy of the resource created via CopyStart operation was in progress.") CopySourceNotFound, } +@doc("The type of the extended location.") enum ExtendedLocationType { EdgeZone, } +@doc("The provisioning state, which only appears in the response.") enum GalleryProvisioningState { Creating, Updating, @@ -699,17 +771,20 @@ enum GalleryProvisioningState { Migrating, } +@doc("This property allows you to specify the permission of sharing gallery.

    Possible values are:

    **Private**

    **Groups**

    **Community**") enum GallerySharingPermissionTypes { Private, Groups, Community, } +@doc("This property allows you to specify the type of sharing group.

    Possible values are:

    **Subscriptions**

    **AADTenants**") enum SharingProfileGroupTypes { Subscriptions, AADTenants, } +@doc("The sharing state of the gallery, which only appears in the response.") enum SharingState { Succeeded, InProgress, @@ -725,28 +800,33 @@ enum GalleryExpandParams { `SharingProfile/Groups`, } +@doc("Specifies the storage account type to be used to store the image. This property is not updatable.") enum StorageAccountType { Standard_LRS, Standard_ZRS, Premium_LRS, } +@doc("confidential VM encryption types") enum ConfidentialVMEncryptionType { EncryptedVMGuestStateOnlyWithPmk, EncryptedWithPmk, EncryptedWithCmk, } +@doc("Optional parameter which specifies the mode to be used for replication. This property is not updatable.") enum ReplicationMode { Full, Shallow, } +@doc("It is type of the extended location.") enum GalleryExtendedLocationType { EdgeZone, Unknown, } +@doc("Specifies the storage account type to be used to store the image. This property is not updatable.") enum EdgeZoneStorageAccountType { Standard_LRS, Standard_ZRS, @@ -754,6 +834,7 @@ enum EdgeZoneStorageAccountType { Premium_LRS, } +@doc("Describes the nature of the policy violation.") enum PolicyViolationCategory { Other, ImageFlaggedUnsafe, @@ -761,6 +842,7 @@ enum PolicyViolationCategory { IpTheft, } +@doc("This is the aggregated replication status based on all the regional replication status flags.") enum AggregatedReplicationState { Unknown, InProgress, @@ -768,6 +850,7 @@ enum AggregatedReplicationState { Failed, } +@doc("This is the regional replication state.") enum ReplicationState { Unknown, Replicating, @@ -779,6 +862,7 @@ enum ReplicationStatusTypes { ReplicationStatus, } +@doc("This property allows you to specify the operation type of gallery sharing update.

    Possible values are:

    **Add**

    **Remove**

    **Reset**") enum SharingUpdateOperationTypes { Add, Remove, @@ -790,23 +874,35 @@ enum SharedToValues { tenant, } +@doc("The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'") enum SharedGalleryHostCaching { None, ReadOnly, ReadWrite, } +@doc(""" +Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. +Possible Values are

    **Auto**

    **Manual**

    **Simultaneous**

    +If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. +""") enum CloudServiceUpgradeMode { Auto, Manual, Simultaneous, } +@doc(""" +Slot type for the cloud service. +Possible values are

    **Production**

    **Staging**

    +If not specified, the default value is Production. +""") enum CloudServiceSlotType { Production, Staging, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -814,148 +910,183 @@ enum CreatedByType { Key, } +@doc("Specifies the sku of an Availability Set. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'.") enum AvailabilitySetSkuTypes { Classic, Aligned, } -@Azure.Core.fixed + +@doc("Specifies the mode of an upgrade to virtual machines in the scale set.

    Possible values are:

    **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.

    **Automatic** - All virtual machines in the scale set are automatically updated at the same time.") +@fixed enum UpgradeMode { Automatic, Manual, Rolling, } -@Azure.Core.fixed + +@doc("Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.") +@fixed enum SettingNames { AutoLogon, FirstLogonCommands, } -@Azure.Core.fixed + +@doc("Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**") +@fixed enum ProtocolTypes { Http, Https, } -@Azure.Core.fixed + +@doc("Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage**") +@fixed enum CachingTypes { None, ReadOnly, ReadWrite, } -@Azure.Core.fixed + +@doc("This property allows you to specify the supported type of the OS that application is built for.

    Possible values are:

    **Windows**

    **Linux**") +@fixed enum OperatingSystemTypes { Windows, Linux, } -@Azure.Core.fixed + +@doc("The level code.") +@fixed enum StatusLevelTypes { Info, Warning, Error, } -@Azure.Core.fixed + +@doc("The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set.") +@fixed enum ResourceIdentityType { SystemAssigned, UserAssigned, `SystemAssigned, UserAssigned`, None, } -@Azure.Core.fixed + +@doc("The scale type applicable to the sku.") +@fixed enum VirtualMachineScaleSetSkuScaleType { Automatic, None, } -@Azure.Core.fixed + +@doc("Code indicating the current status of the upgrade.") +@fixed enum UpgradeState { RollingForward, Cancelled, Completed, Faulted, } -@Azure.Core.fixed + +@doc("Invoker of the Upgrade Operation") +@fixed enum UpgradeOperationInvoker { Unknown, User, Platform, } -@Azure.Core.fixed + +@doc("Code indicating the current status of the upgrade.") +@fixed enum RollingUpgradeStatusCode { RollingForward, Cancelled, Completed, Faulted, } -@Azure.Core.fixed + +@doc("The last action performed on the rolling upgrade.") +@fixed enum RollingUpgradeActionType { Start, Cancel, } -@Azure.Core.fixed + +@doc("The Last Maintenance Operation Result Code.") +@fixed enum MaintenanceOperationResultCodeTypes { None, RetryLater, MaintenanceAborted, MaintenanceCompleted, } -@Azure.Core.fixed + +@fixed enum InstanceViewTypes { instanceView, userData, } -@Azure.Core.fixed + +@doc("Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.** The default value is: **None.**") +@fixed enum DedicatedHostLicenseTypes { None, Windows_Server_Hybrid, Windows_Server_Perpetual, } -@Azure.Core.fixed + +@doc("This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'.") +@fixed enum OperatingSystemStateTypes { Generalized, Specialized, } -@Azure.Core.fixed + +@doc("Interval value in minutes used to create LogAnalytics call rate logs.") +@fixed enum IntervalInMins { ThreeMins, FiveMins, ThirtyMins, SixtyMins, } -@Azure.Core.fixed + +@doc("The scale type applicable to the sku.") +@fixed enum ResourceSkuCapacityScaleType { Automatic, Manual, None, } -@Azure.Core.fixed + +@doc("The type of restrictions.") +@fixed enum ResourceSkuRestrictionsType { Location, Zone, } -@Azure.Core.fixed + +@doc("The reason for restriction.") +@fixed enum ResourceSkuRestrictionsReasonCode { QuotaId, NotAvailableForSubscription, } -@Azure.Core.fixed + +@doc("The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'") +@fixed enum HostCaching { None, ReadOnly, ReadWrite, } -@Azure.Core.fixed + +@doc("Specifies the type of the custom action parameter. Possible values are: String, ConfigurationDataBlob or LogOutputBlob") +@fixed enum GalleryApplicationCustomActionParameterType { String, ConfigurationDataBlob, LogOutputBlob, } -@doc("The List Compute Operation operation response.") -@pagedResult -model ComputeOperationListResult { - @doc("The list of compute operations") - @visibility("read") - @items - value?: ComputeOperationValue[]; -} - @doc("Describes the properties of a Compute Operation value.") model ComputeOperationValue { @doc("The origin of the compute operation.") @@ -2169,6 +2300,78 @@ model ExtendedLocation { type?: ExtendedLocationTypes; } +@doc("The Resource model definition.") +model Resource { + @doc("Resource Id") + @visibility("read") + id?: string; + + @doc("Resource name") + @visibility("read") + name?: string; + + @doc("Resource type") + @visibility("read") + type?: string; + + @doc("Resource location") + location: string; + + @doc("Resource tags") + tags?: Record; +} + +@doc("Describes a Virtual Machine Scale Set.") +model VirtualMachineScaleSetUpdate extends UpdateResource { + @doc("The virtual machine scale set sku.") + sku?: Sku; + + @doc("The purchase plan when deploying a virtual machine scale set from VM Marketplace images.") + plan?: Plan; + + @doc("Describes the properties of a Virtual Machine Scale Set.") + properties?: VirtualMachineScaleSetUpdateProperties; + + @doc("The identity of the virtual machine scale set, if configured.") + identity?: VirtualMachineScaleSetIdentity; +} + +@doc("Describes the properties of a Virtual Machine Scale Set.") +model VirtualMachineScaleSetUpdateProperties { + @doc("The upgrade policy.") + upgradePolicy?: UpgradePolicy; + + @doc("Policy for automatic repairs.") + automaticRepairsPolicy?: AutomaticRepairsPolicy; + + @doc("The virtual machine profile.") + virtualMachineProfile?: VirtualMachineScaleSetUpdateVMProfile; + + @doc("Specifies whether the Virtual Machine Scale Set should be overprovisioned.") + overprovision?: boolean; + + @doc("When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.") + doNotRunExtensionsOnOverprovisionedVMs?: boolean; + + @doc("When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.") + singlePlacementGroup?: boolean; + + @doc("Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.") + additionalCapabilities?: AdditionalCapabilities; + + @doc("Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.") + scaleInPolicy?: ScaleInPolicy; + + @doc("Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

    Minimum api-version: 2018-04-01.") + proximityPlacementGroup?: SubResource; + + @doc("Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.") + priorityMixPolicy?: PriorityMixPolicy; + + @doc("Specifies the Spot Restore properties for the virtual machine scale set.") + spotRestorePolicy?: SpotRestorePolicy; +} + @doc("Describes a virtual machine scale set virtual machine profile.") model VirtualMachineScaleSetUpdateVMProfile { @doc("The virtual machine scale set OS profile.") @@ -2451,6 +2654,20 @@ model OrchestrationServiceSummary { serviceState?: OrchestrationServiceState; } +@doc("Describes a Virtual Machine Scale Set Extension.") +model VirtualMachineScaleSetExtensionUpdate extends SubResourceReadOnly { + @doc("The name of the extension.") + @visibility("read") + name?: string; + + @doc("Resource type") + @visibility("read") + type?: string; + + @doc("Describes the properties of a Virtual Machine Scale Set Extension.") + properties?: VirtualMachineScaleSetExtensionProperties; +} + @doc("The Virtual Machine Scale Set List Skus operation response.") model VirtualMachineScaleSetListSkusResult is Azure.Core.Page; @@ -2683,6 +2900,53 @@ model OrchestrationServiceStateInput { action: OrchestrationServiceStateAction; } +@doc("Describes a VMSS VM Extension.") +model VirtualMachineScaleSetVMExtensionUpdate extends SubResourceReadOnly { + @doc("The name of the extension.") + @visibility("read") + name?: string; + + @doc("Resource type") + @visibility("read") + type?: string; + + @doc("Describes the properties of a Virtual Machine Extension.") + properties?: VirtualMachineExtensionUpdateProperties; +} + +@doc("Describes the properties of a Virtual Machine Extension.") +model VirtualMachineExtensionUpdateProperties { + @doc("How the extension handler should be forced to update even if the extension configuration has not changed.") + forceUpdateTag?: string; + + @doc("The name of the extension handler publisher.") + publisher?: string; + + @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") + type?: string; + + @doc("Specifies the version of the script handler.") + typeHandlerVersion?: string; + + @doc("Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.") + autoUpgradeMinorVersion?: boolean; + + @doc("Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.") + enableAutomaticUpgrade?: boolean; + + @doc("Json formatted public settings for the extension.") + settings?: Record; + + @doc("The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.") + protectedSettings?: Record; + + @doc("Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.") + suppressFailures?: boolean; + + @doc("The extensions protected settings that are passed by reference, and consumed from key vault") + protectedSettingsFromKeyVault?: KeyVaultSecretReference; +} + @doc("Describes the properties of a virtual machine scale set virtual machine.") model VirtualMachineScaleSetVMProperties { @doc("Specifies whether the latest model has been applied to the virtual machine.") @@ -3270,6 +3534,12 @@ model RetrieveBootDiagnosticsDataResult { serialConsoleLogBlobUri?: string; } +@doc("Describes a Virtual Machine Extension.") +model VirtualMachineExtensionUpdate extends UpdateResource { + @doc("Describes the properties of a Virtual Machine Extension.") + properties?: VirtualMachineExtensionUpdateProperties; +} + @doc("Describes the properties of a Virtual Machine.") model VirtualMachineProperties { @doc("Specifies the hardware settings for the virtual machine.") @@ -3540,6 +3810,21 @@ model VirtualMachineCaptureResult extends SubResource { resources?: Record[]; } +@doc("Describes a Virtual Machine Update.") +model VirtualMachineUpdate extends UpdateResource { + @doc("Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.") + plan?: Plan; + + @doc("Describes the properties of a Virtual Machine.") + properties?: VirtualMachineProperties; + + @doc("The identity of the virtual machine, if configured.") + identity?: VirtualMachineIdentity; + + @doc("The virtual machine zones.") + zones?: string[]; +} + @doc("Describes the properties of an AssessPatches result.") model VirtualMachineAssessPatchesResult { @doc("The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"") @@ -3913,6 +4198,15 @@ model AvailabilitySetProperties { statuses?: InstanceViewStatus[]; } +@doc("Specifies information about the availability set that the virtual machine should be assigned to. Only tags may be updated.") +model AvailabilitySetUpdate extends UpdateResource { + @doc("The instance view of a resource.") + properties?: AvailabilitySetProperties; + + @doc("Sku of the availability set") + sku?: Sku; +} + @doc("Describes the properties of a Proximity Placement Group.") model ProximityPlacementGroupProperties { @doc("Specifies the type of the proximity placement group. Possible values are: **Standard** : Co-locate resources within an Azure region or Availability Zone. **Ultra** : For future use.") @@ -4018,6 +4312,15 @@ model DedicatedHostGroupPropertiesAdditionalCapabilities { ultraSSDEnabled?: boolean; } +@doc("Specifies information about the dedicated host group that the dedicated host should be assigned to. Only tags may be updated.") +model DedicatedHostGroupUpdate extends UpdateResource { + @doc("Dedicated Host Group Properties.") + properties?: DedicatedHostGroupProperties; + + @doc("Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone.") + zones?: string[]; +} + @doc("Properties of the dedicated host.") model DedicatedHostProperties { @doc("Fault domain of the dedicated host within a dedicated host group.") @@ -4056,6 +4359,15 @@ model DedicatedHostProperties { timeCreated?: utcDateTime; } +@doc("Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated.") +model DedicatedHostUpdate extends UpdateResource { + @doc("Properties of the dedicated host.") + properties?: DedicatedHostProperties; + + @doc("[List all available dedicated host sizes for resizing] (https://docs.microsoft.com/rest/api/compute/dedicated-hosts/listavailablesizes). Resizing can be only used to scale up DedicatedHost. Only name is required to be set. ") + sku?: Sku; +} + @doc("The List Dedicated Host sizes operation response.") @pagedResult model DedicatedHostSizeListResult { @@ -4070,6 +4382,12 @@ model SshPublicKeyResourceProperties { publicKey?: string; } +@doc("Specifies information about the SSH public key.") +model SshPublicKeyUpdateResource extends UpdateResource { + @doc("Properties of the SSH public key.") + properties?: SshPublicKeyResourceProperties; +} + @doc("Response from generation of an SSH key pair.") model SshPublicKeyGenerateKeyPairResult { @doc("Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret.") @@ -4149,6 +4467,12 @@ model ImageDataDisk extends ImageDisk { lun: int32; } +@doc("The source user image virtual hard disk. Only tags may be updated.") +model ImageUpdate extends UpdateResource { + @doc("Describes the properties of an Image.") + properties?: ImageProperties; +} + @doc("The restore point collection properties.") model RestorePointCollectionProperties { @doc("The properties of the source resource that this restore point collection is created from.") @@ -4363,6 +4687,12 @@ model DiskRestorePointReplicationStatus { completionPercent?: int32; } +@doc("Update Restore Point collection parameters.") +model RestorePointCollectionUpdate extends UpdateResource { + @doc("The restore point collection properties.") + properties?: RestorePointCollectionProperties; +} + @doc("capacity reservation group Properties.") model CapacityReservationGroupProperties { @doc("A list of all capacity reservation resource ids that belong to capacity reservation group.") @@ -4412,6 +4742,12 @@ model CapacityReservationUtilization { virtualMachinesAllocated?: SubResourceReadOnly[]; } +@doc("Specifies information about the capacity reservation group. Only tags can be updated.") +model CapacityReservationGroupUpdate extends UpdateResource { + @doc("capacity reservation group Properties.") + properties?: CapacityReservationGroupProperties; +} + @doc("Properties of the Capacity reservation.") model CapacityReservationProperties { @doc("A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource.") @@ -4445,6 +4781,15 @@ model CapacityReservationProperties { timeCreated?: utcDateTime; } +@doc("Specifies information about the capacity reservation. Only tags and sku.capacity can be updated.") +model CapacityReservationUpdate extends UpdateResource { + @doc("Properties of the Capacity reservation.") + properties?: CapacityReservationProperties; + + @doc("SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.") + sku?: Sku; +} + @doc("Api request input for LogAnalytics getRequestRateByInterval Api.") model RequestRateByIntervalInput extends LogAnalyticsInputBase { @doc("Interval value in minutes used to create LogAnalytics call rate logs.") @@ -4666,6 +5011,12 @@ model VirtualMachineRunCommandInstanceView { statuses?: InstanceViewStatus[]; } +@doc("Describes a Virtual Machine run command.") +model VirtualMachineRunCommandUpdate extends UpdateResource { + @doc("Describes the properties of a Virtual Machine run command.") + properties?: VirtualMachineRunCommandProperties; +} + @doc("The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS.") model DiskSku { @doc("The sku name.") @@ -4947,6 +5298,84 @@ model DiskSecurityProfile { secureVMDiskEncryptionSetId?: string; } +@doc("Disk update resource.") +model DiskUpdate { + @doc("Disk resource update properties.") + properties?: DiskUpdateProperties; + + @doc("Resource tags") + tags?: Record; + + @doc("The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS.") + sku?: DiskSku; +} + +@doc("Disk resource update properties.") +model DiskUpdateProperties { + @doc("the Operating System type.") + osType?: OperatingSystemTypes; + + @doc("If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.") + diskSizeGB?: int32; + + @doc("Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.") + encryptionSettingsCollection?: EncryptionSettingsCollection; + + @doc("The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.") + @projectedName("json", "diskIOPSReadWrite") + diskIopsReadWrite?: int32; + + @doc("The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.") + diskMBpsReadWrite?: int32; + + @doc("The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.") + @projectedName("json", "diskIOPSReadOnly") + diskIopsReadOnly?: int32; + + @doc("The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.") + diskMBpsReadOnly?: int32; + + @doc("The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.") + maxShares?: int32; + + @doc("Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.") + encryption?: Encryption; + + @doc("Policy for accessing the disk via network.") + networkAccessPolicy?: NetworkAccessPolicy; + + @doc("ARM id of the DiskAccess resource for using private endpoints on disks.") + diskAccessId?: string; + + @doc("Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.") + tier?: string; + + @doc("Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.") + burstingEnabled?: boolean; + + @doc("Purchase plan information to be added on the OS disk") + purchasePlan?: DiskPurchasePlan; + + @doc("List of supported capabilities to be added on the OS disk.") + supportedCapabilities?: SupportedCapabilities; + + @doc("Properties of the disk for which update is pending.") + @visibility("read") + propertyUpdatesInProgress?: PropertyUpdatesInProgress; + + @doc("Indicates the OS on a disk supports hibernation.") + supportsHibernation?: boolean; + + @doc("Policy for controlling export on the disk.") + publicNetworkAccess?: PublicNetworkAccess; + + @doc("Additional authentication requirements when exporting or uploading to a disk or snapshot.") + dataAccessAuthMode?: DataAccessAuthMode; + + @doc("Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine.") + optimizedForFrequentAttach?: boolean; +} + @doc("Data used for requesting a SAS.") model GrantAccessData { @doc("The Access Level, accepted values include None, Read, Write.") @@ -5021,6 +5450,12 @@ model PrivateLinkServiceConnectionState { actionsRequired?: string; } +@doc("Used for updating a disk access resource.") +model DiskAccessUpdate { + @doc("Resource tags") + tags?: Record; +} + @doc("A list of private link resources") model PrivateLinkResourceListResult { @doc("Array of private link resources") @@ -5116,6 +5551,33 @@ model KeyForDiskEncryptionSet { keyUrl: string; } +@doc("disk encryption set update resource.") +model DiskEncryptionSetUpdate { + @doc("disk encryption set resource update properties.") + properties?: DiskEncryptionSetUpdateProperties; + + @doc("Resource tags") + tags?: Record; + + @doc("The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks.") + identity?: EncryptionSetIdentity; +} + +@doc("disk encryption set resource update properties.") +model DiskEncryptionSetUpdateProperties { + @doc("The type of key used to encrypt the data of the disk.") + encryptionType?: DiskEncryptionSetType; + + @doc("Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots") + activeKey?: KeyForDiskEncryptionSet; + + @doc("Set this flag to true to enable auto-updating of this disk encryption set to the latest key version.") + rotationToLatestKeyVersionEnabled?: boolean; + + @doc("Multi-tenant application client id to access key vault in a different tenant. Setting the value to 'None' will clear the property.") + federatedClientId?: string; +} + @doc("The List resources which are encrypted with the disk encryption set.") model ResourceUriList is Azure.Core.Page; @@ -5295,6 +5757,51 @@ model CopyCompletionError { errorMessage: string; } +@doc("Snapshot update resource.") +model SnapshotUpdate { + @doc("Snapshot resource update properties.") + properties?: SnapshotUpdateProperties; + + @doc("Resource tags") + tags?: Record; + + @doc("The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot") + sku?: SnapshotSku; +} + +@doc("Snapshot resource update properties.") +model SnapshotUpdateProperties { + @doc("the Operating System type.") + osType?: OperatingSystemTypes; + + @doc("If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.") + diskSizeGB?: int32; + + @doc("Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.") + encryptionSettingsCollection?: EncryptionSettingsCollection; + + @doc("Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.") + encryption?: Encryption; + + @doc("Policy for accessing the disk via network.") + networkAccessPolicy?: NetworkAccessPolicy; + + @doc("ARM id of the DiskAccess resource for using private endpoints on disks.") + diskAccessId?: string; + + @doc("Indicates the OS on a snapshot supports hibernation.") + supportsHibernation?: boolean; + + @doc("Policy for controlling export on the disk.") + publicNetworkAccess?: PublicNetworkAccess; + + @doc("Additional authentication requirements when exporting or uploading to a disk or snapshot.") + dataAccessAuthMode?: DataAccessAuthMode; + + @doc("List of supported capabilities for the image from which the OS disk was created.") + supportedCapabilities?: SupportedCapabilities; +} + @doc("The List Resource Skus operation response.") model ResourceSkusResult is Azure.Core.Page; @@ -5511,6 +6018,12 @@ model RegionalSharingStatus { details?: string; } +@doc("Specifies information about the Shared Image Gallery that you want to update.") +model GalleryUpdate extends UpdateResourceDefinition { + @doc("Describes the properties of a Shared Image Gallery.") + properties?: GalleryProperties; +} + @doc("The Update Resource model definition.") model UpdateResourceDefinition { @doc("Resource Id") @@ -5636,6 +6149,12 @@ model GalleryImageFeature { value?: string; } +@doc("Specifies information about the gallery image definition that you want to update.") +model GalleryImageUpdate extends UpdateResourceDefinition { + @doc("Describes the properties of a gallery image definition.") + properties?: GalleryImageProperties; +} + @doc("Describes the properties of a gallery image version.") model GalleryImageVersionProperties { @doc("The publishing profile of a gallery image Version.") @@ -5881,6 +6400,12 @@ model RegionalReplicationStatus { progress?: int32; } +@doc("Specifies information about the gallery image version that you want to update.") +model GalleryImageVersionUpdate extends UpdateResourceDefinition { + @doc("Describes the properties of a gallery image version.") + properties?: GalleryImageVersionProperties; +} + @doc("Describes the properties of a gallery Application Definition.") model GalleryApplicationProperties { @doc("The description of this gallery Application Definition resource. This property is updatable.") @@ -5939,6 +6464,12 @@ model GalleryApplicationCustomActionParameter { description?: string; } +@doc("Specifies information about the gallery Application Definition that you want to update.") +model GalleryApplicationUpdate extends UpdateResourceDefinition { + @doc("Describes the properties of a gallery Application Definition.") + properties?: GalleryApplicationProperties; +} + @doc("Describes the properties of a gallery image version.") model GalleryApplicationVersionProperties { @doc("The publishing profile of a gallery image version.") @@ -6010,6 +6541,12 @@ model UserArtifactSettings { model GalleryApplicationVersionSafetyProfile extends GalleryArtifactSafetyProfileBase {} +@doc("Specifies information about the gallery Application Version that you want to update.") +model GalleryApplicationVersionUpdate extends UpdateResourceDefinition { + @doc("Describes the properties of a gallery image version.") + properties?: GalleryApplicationVersionProperties; +} + @doc("Specifies information about the gallery sharing profile update.") model SharingUpdate { @doc("This property allows you to specify the operation type of gallery sharing update.

    Possible values are:

    **Add**

    **Remove**

    **Reset**") @@ -6519,6 +7056,11 @@ model CloudServiceVaultAndSecretReference { secretUrl?: string; } +model CloudServiceUpdate { + @doc("Resource tags") + tags?: Record; +} + @doc("InstanceView of CloudService as a whole") model CloudServiceInstanceView { @doc("Instance view statuses.") diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp index c78588f87d..4a282b4819 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp @@ -1,9 +1,11 @@ import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.ResourceManager; namespace Microsoft.Compute; @@ -599,7 +601,7 @@ interface VirtualMachineScaleSetVMRunCommandsOperations { @header accept: "application/json, text/json"; }, - VirtualMachineRunCommandsListResult + ResourceListResult >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/dns.md b/packages/extensions/openapi-to-typespec/test/arm-dns/dns.md new file mode 100644 index 0000000000..e2dd30b8e4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/dns.md @@ -0,0 +1,126 @@ +```yaml +library-name: Dns +namespace: Azure.ResourceManager.Dns +isAzureSpec: true +isArm: true +require: https://github.com/Azure/azure-rest-api-specs/blob/48a49f06399fbdf21f17406b5042f96a5d573bf0/specification/dns/resource-manager/readme.md +# tag: package-2018-05 +skip-csproj: true +modelerfour: + flatten-payloads: false + lenient-model-deduplication: true + +format-by-name-rules: + "tenantId": "uuid" + "ETag": "etag" + "location": "azure-location" + "*Uri": "Uri" + "*Uris": "Uri" + "*Guid": "uuid" + "ifMatch": "etag" + "IPv6Address": "ip-address" + "IPv4Address": "ip-address" + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + Vmos: VmOS + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag + SAS: Sas + SKU: Sku + SMB: Smb + NFS: Nfs + LRS: Lrs + ZRS: Zrs + GRS: Grs + TLS: Tls + AAD: Aad + GET: Get + PUT: Put + RecordType: DnsRecordType + ARecord: DnsARecordInfo + AaaaRecord: DnsAaaaRecordInfo + MxRecord: DnsMXRecordInfo + NsRecord: DnsNSRecordInfo + PtrRecord: DnsPtrRecordInfo + SrvRecord: DnsSrvRecordInfo + TxtRecord: DnsTxtRecordInfo + CnameRecord: DnsCnameRecordInfo + SoaRecord: DnsSoaRecordInfo + CaaRecord: DnsCaaRecordInfo + +override-operation-name: + RecordSets_ListByDnsZone: GetAllRecordData # Change back to GetRecords once the polymorphic resource change is merged. + DnsResourceReference_GetByTargetResources: GetDnsResourceReferencesByTargetResources + Zones_List: GetDnsZones + +request-path-to-resource-name: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/A: DnsARecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/AAAA: DnsAaaaRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/CAA: DnsCaaRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/CNAME: DnsCnameRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/MX: DnsMXRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/NS: DnsNSRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/PTR: DnsPtrRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/SOA: DnsSoaRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/SRV: DnsSrvRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/TXT: DnsTxtRecord + +directive: + - remove-operation: RecordSets_ListAllByDnsZone + - from: swagger-document + where: $.definitions + transform: > + $.RecordSet["x-ms-client-name"] = "DnsRecord"; + $.RecordSetListResult["x-ms-client-name"] = "DnsRecordListResult"; + $.ZoneUpdate["x-ms-client-name"] = "ZoneUpdateOptions"; + $.NsRecord.properties.nsdname["x-ms-client-name"] = "DnsNSDomainName"; + $.PtrRecord.properties.ptrdname["x-ms-client-name"] = "DnsPtrDomainName"; + $.RecordSetProperties.properties.TTL["x-ms-client-name"] = "TtlInSeconds"; + $.TxtRecord.properties.value["x-ms-client-name"] = "values"; + $.ZoneProperties.properties.maxNumberOfRecordsPerRecordSet["x-nullable"] = true; + $.ZoneProperties.properties.maxNumberOfRecordSets["x-ms-client-name"] = "maxNumberOfRecords"; + $.ZoneProperties.properties.maxNumberOfRecordsPerRecordSet["x-ms-client-name"] = "maxNumberOfRecordsPerRecord"; + $.ZoneProperties.properties.numberOfRecordSets["x-ms-client-name"] = "numberOfRecords"; + + # FooTime => FooTimeInSeconds + - from: swagger-document + where: $.definitions + transform: > + $.SoaRecord.properties.expireTime["x-ms-client-name"] = "expireTimeInSeconds"; + $.SoaRecord.properties.retryTime["x-ms-client-name"] = "retryTimeInSeconds"; + $.SoaRecord.properties.minimumTTL["x-ms-client-name"] = "minimumTtlInSeconds"; + $.SoaRecord.properties.refreshTime["x-ms-client-name"] = "refreshTimeInSeconds"; + + # Add Prepend Name + - from: swagger-document + where: $.definitions + transform: > + $.Zone["x-ms-client-name"] = "DnsZone"; + $.ZoneProperties.properties.zoneType["x-ms-enum"].name = "DnsZoneType"; + $.ZoneListResult["x-ms-client-name"] = "DnsZoneListResult"; + + # Mx Ns => MX NS + - from: swagger-document + where: $.definitions + transform: > + $.RecordSetProperties.properties.MXRecords["x-ms-client-name"] = "MXRecords"; + $.RecordSetProperties.properties.NSRecords["x-ms-client-name"] = "NSRecords"; +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/resources.json b/packages/extensions/openapi-to-typespec/test/arm-dns/resources.json new file mode 100644 index 0000000000..bef4fee3ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/resources.json @@ -0,0 +1,903 @@ +{ + "Resources": { + "DnsARecord": { + "Name": "DnsARecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/A/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/A/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/A/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/A/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/A", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/A", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "A", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsAaaaRecord": { + "Name": "DnsAaaaRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/AAAA/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/AAAA/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/AAAA/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/AAAA/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/AAAA", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/AAAA", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "AAAA", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsCaaRecord": { + "Name": "DnsCaaRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CAA/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CAA/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CAA/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CAA/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CAA", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/CAA", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "CAA", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsCnameRecord": { + "Name": "DnsCnameRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CNAME/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CNAME/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CNAME/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CNAME/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CNAME", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/CNAME", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "CNAME", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsMXRecord": { + "Name": "DnsMXRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/MX/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/MX/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/MX/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/MX/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/MX", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/MX", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "MX", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsNSRecord": { + "Name": "DnsNSRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/NS/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/NS/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/NS/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/NS/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/NS", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/NS", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "NS", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsPtrRecord": { + "Name": "DnsPtrRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/PTR/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/PTR/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/PTR/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/PTR/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/PTR", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/PTR", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "PTR", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsSoaRecord": { + "Name": "DnsSoaRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SOA/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SOA/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SOA/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SOA/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SOA", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/SOA", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "SOA", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsSrvRecord": { + "Name": "DnsSrvRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SRV/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SRV/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SRV/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SRV/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SRV", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/SRV", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "SRV", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsTxtRecord": { + "Name": "DnsTxtRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/TXT/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/TXT/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/TXT/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/TXT/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/TXT", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/TXT", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "TXT", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsZone": { + "Name": "DnsZone", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}", + "Method": "GET", + "OperationID": "Zones_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}", + "Method": "PUT", + "OperationID": "Zones_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a DNS zone. Does not modify DNS records within the zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}", + "Method": "PATCH", + "OperationID": "Zones_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a DNS zone. Does not modify DNS records within the zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}", + "Method": "DELETE", + "OperationID": "Zones_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones", + "Method": "GET", + "OperationID": "Zones_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the DNS zones within a resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetDnsZones", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnszones", + "Method": "GET", + "OperationID": "Zones_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the DNS zones in all resource groups in a subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetAllRecordData", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/recordsets", + "Method": "GET", + "OperationID": "RecordSets_ListByDnsZone", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByDnsZone", + "NextPageMethod": "ListByDnsZoneNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all record sets in a DNS zone." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "DnsZone", + "ResourceType": "Microsoft.Network/dnsZones", + "ResourceKey": "zoneName", + "ResourceKeySegment": "dnsZones", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp new file mode 100644 index 0000000000..a4678459a7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp @@ -0,0 +1,124 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DnsZone.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Dns; +@doc("Describes a DNS record set (a collection of DNS records with the same name and type).") +@parentResource(DnsZone) +model DnsRecord is ProxyResource { + @doc("The name of the record set, relative to the name of the zone.") + @path + @key("relativeRecordSetName") + @segment("A") + name: string; + + @doc("The etag of the record set.") + etag?: string; +} + +@armResourceOperations +interface DnsRecords { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets a record set.") + @operationId("RecordSets_Get") + get is ArmResourceRead< + DnsRecord, + { + ...BaseParameters; + + @doc("The type of DNS record in this record set.") + @path + recordType: RecordType; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Creates or updates a record set within a DNS zone.") + @operationId("RecordSets_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrReplaceSync< + DnsRecord, + { + ...BaseParameters; + + @doc("The type of DNS record in this record set. Record sets of type SOA can be updated but not created (they are created when the DNS zone is created).") + @path + recordType: RecordType; + + @doc("The etag of the record set. Omit this value to always overwrite the current record set. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.") + @header + IfMatch?: string; + + @doc("Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will be ignored.") + @header + IfNoneMatch?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Updates a record set within a DNS zone.") + @operationId("RecordSets_Update") + update is ArmCustomPatchSync< + DnsRecord, + DnsRecord, + { + ...BaseParameters; + + @doc("The type of DNS record in this record set.") + @path + recordType: RecordType; + + @doc("The etag of the record set. Omit this value to always overwrite the current record set. Specify the last-seen etag value to prevent accidentally overwriting concurrent changes.") + @header + IfMatch?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Deletes a record set from a DNS zone. This operation cannot be undone.") + @operationId("RecordSets_Delete") + delete is ArmResourceDeleteSync< + DnsRecord, + { + ...BaseParameters; + + @doc("The type of DNS record in this record set. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).") + @path + recordType: RecordType; + + @doc("The etag of the record set. Omit this value to always delete the current record set. Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.") + @header + IfMatch?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists the record sets of a specified type in a DNS zone.") + @operationId("RecordSets_ListByType") + listByType is ArmResourceListByParent< + DnsRecord, + { + ...BaseParameters; + + @doc("The type of record sets to enumerate.") + @path + recordType: RecordType; + + @doc("The maximum number of record sets to return. If not specified, returns up to 100 record sets.") + @query("$top") + $top?: int32; + + @doc("The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with .") + @query("$recordsetnamesuffix") + $recordsetnamesuffix?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp new file mode 100644 index 0000000000..f00db75762 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp @@ -0,0 +1,129 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Dns; +@doc("Describes a DNS zone.") +model DnsZone is TrackedResource { + @doc("The name of the DNS zone (without a terminating dot).") + @path + @key("zoneName") + @segment("dnsZones") + name: string; + + @doc("The etag of the zone.") + etag?: string; +} + +@armResourceOperations +interface DnsZones { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone.") + @operationId("Zones_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Creates or updates a DNS zone. Does not modify DNS records within the zone.") + @operationId("Zones_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrReplaceSync< + DnsZone, + { + ...BaseParameters; + + @doc("The etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.") + @header + IfMatch?: string; + + @doc("Set to '*' to allow a new DNS zone to be created, but to prevent updating an existing zone. Other values will be ignored.") + @header + IfNoneMatch?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Updates a DNS zone. Does not modify DNS records within the zone.") + @operationId("Zones_Update") + update is ArmCustomPatchSync< + DnsZone, + ZoneUpdateOptions, + { + ...BaseParameters; + + @doc("The etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.") + @header + IfMatch?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone.") + @operationId("Zones_Delete") + delete is ArmResourceDeleteAsync< + DnsZone, + { + ...BaseParameters; + + @doc("The etag of the DNS zone. Omit this value to always delete the current zone. Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.") + @header + IfMatch?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists the DNS zones within a resource group.") + @operationId("Zones_ListByResourceGroup") + listByResourceGroup is ArmResourceListByParent< + DnsZone, + { + ...BaseParameters; + + @doc("The maximum number of record sets to return. If not specified, returns up to 100 record sets.") + @query("$top") + $top?: int32; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists the DNS zones in all resource groups in a subscription.") + @operationId("Zones_List") + list is ArmListBySubscription; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RecordSets_ListByDnsZone") + @doc("Lists all record sets in a DNS zone.") + // FIXME: RecordSets_ListByDnsZone could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/recordsets") + @get + ListByDnsZone is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the DNS zone (without a terminating dot).") + @path + zoneName: string; + + @doc("The maximum number of record sets to return. If not specified, returns up to 100 record sets.") + @query("$top") + $top?: int32; + + @doc("The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with .") + @query("$recordsetnamesuffix") + $recordsetnamesuffix?: string; + + @doc("Specifies the Azure subscription ID, which uniquely identifies the Microsoft Azure subscription.") + @path + subscriptionId: string; + }, + ResourceListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordset.json new file mode 100644 index 0000000000..f1778f410f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordset.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "ARecords": [ + { + "ipv4Address": "127.0.0.1" + } + ], + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "ARecords": [ + { + "ipv4Address": "127.0.0.1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "ARecords": [ + { + "ipv4Address": "127.0.0.1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create A recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordsetWithAliasTargetResource.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordsetWithAliasTargetResource.json new file mode 100644 index 0000000000..a1a9f8467d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordsetWithAliasTargetResource.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "TTL": 3600, + "metadata": { + "key1": "value1" + }, + "targetResource": { + "id": "/subscriptions/726f8cd6-6459-4db4-8e6d-2cd2716904e2/resourceGroups/test/providers/Microsoft.Network/trafficManagerProfiles/testpp2" + } + } + }, + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + }, + "provisioningState": "Succeeded", + "targetResource": { + "id": "/subscriptions/726f8cd6-6459-4db4-8e6d-2cd2716904e2/resourceGroups/test/providers/Microsoft.Network/trafficManagerProfiles/testpp2" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + }, + "provisioningState": "Succeeded", + "targetResource": { + "id": "/subscriptions/726f8cd6-6459-4db4-8e6d-2cd2716904e2/resourceGroups/test/providers/Microsoft.Network/trafficManagerProfiles/testpp2" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create A recordset with alias target resource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateAaaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateAaaaRecordset.json new file mode 100644 index 0000000000..b2ad924f92 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateAaaaRecordset.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "AAAARecords": [ + { + "ipv6Address": "::1" + } + ], + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "AAAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/AAAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA/record1", + "properties": { + "AAAARecords": [ + { + "ipv6Address": "::1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/AAAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA/record1", + "properties": { + "AAAARecords": [ + { + "ipv6Address": "::1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create AAAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCaaRecordset.json new file mode 100644 index 0000000000..7813071547 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCaaRecordset.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "TTL": 3600, + "caaRecords": [ + { + "flags": 0, + "tag": "issue", + "value": "ca.contoso.com" + } + ], + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "CAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1", + "properties": { + "TTL": 3600, + "caaRecords": [ + { + "flags": 0, + "tag": "issue", + "value": "ca.contoso.com" + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1", + "properties": { + "TTL": 3600, + "caaRecords": [ + { + "flags": 0, + "tag": "issue", + "value": "ca.contoso.com" + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create CAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCnameRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCnameRecordset.json new file mode 100644 index 0000000000..dce052f4ca --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCnameRecordset.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "CNAMERecord": { + "cname": "contoso.com" + }, + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "CNAME", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CNAME", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record1", + "properties": { + "CNAMERecord": { + "cname": "contoso.com" + }, + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CNAME", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record1", + "properties": { + "CNAMERecord": { + "cname": "contoso.com" + }, + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create CNAME recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateMxRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateMxRecordset.json new file mode 100644 index 0000000000..a54a77224c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateMxRecordset.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "MXRecords": [ + { + "exchange": "mail.contoso.com", + "preference": 0 + } + ], + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "MX", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/MX", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX/record1", + "properties": { + "MXRecords": [ + { + "exchange": "mail.contoso.com", + "preference": 0 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/MX", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX/record1", + "properties": { + "MXRecords": [ + { + "exchange": "mail.contoso.com", + "preference": 0 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create MX recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateNsRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateNsRecordset.json new file mode 100644 index 0000000000..69bbd2cae1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateNsRecordset.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "NSRecords": [ + { + "nsdname": "ns1.contoso.com" + } + ], + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "NS", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/NS", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS/record1", + "properties": { + "NSRecords": [ + { + "nsdname": "ns1.contoso.com" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/NS", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS/record1", + "properties": { + "NSRecords": [ + { + "nsdname": "ns1.contoso.com" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create NS recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreatePtrRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreatePtrRecordset.json new file mode 100644 index 0000000000..703dfbb9eb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreatePtrRecordset.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "PTRRecords": [ + { + "ptrdname": "localhost" + } + ], + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "PTR", + "relativeRecordSetName": "1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "0.0.127.in-addr.arpa" + }, + "responses": { + "200": { + "body": { + "name": "1", + "type": "Microsoft.Network/dnsZones/PTR", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR/1", + "properties": { + "PTRRecords": [ + { + "ptrdname": "localhost" + } + ], + "TTL": 3600, + "fqdn": "1.0.0.127.in-addr.arpa", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "1", + "type": "Microsoft.Network/dnsZones/PTR", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR/1", + "properties": { + "PTRRecords": [ + { + "ptrdname": "localhost" + } + ], + "TTL": 3600, + "fqdn": "1.0.0.127.in-addr.arpa", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create PTR recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSoaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSoaRecordset.json new file mode 100644 index 0000000000..a2eb01730c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSoaRecordset.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "SOARecord": { + "email": "hostmaster.contoso.com", + "expireTime": 2419200, + "host": "ns1.contoso.com", + "minimumTTL": 300, + "refreshTime": 3600, + "retryTime": 300, + "serialNumber": 1 + }, + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "SOA", + "relativeRecordSetName": "@", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "@", + "type": "Microsoft.Network/dnsZones/SOA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA/@", + "properties": { + "SOARecord": { + "email": "hostmaster.contoso.com", + "expireTime": 2419200, + "host": "ns1.contoso.com", + "minimumTTL": 300, + "refreshTime": 3600, + "retryTime": 300, + "serialNumber": 1 + }, + "TTL": 3600, + "fqdn": "zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "@", + "type": "Microsoft.Network/dnsZones/SOA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA/@", + "properties": { + "SOARecord": { + "email": "hostmaster.contoso.com", + "expireTime": 2419200, + "host": "ns1.contoso.com", + "minimumTTL": 300, + "refreshTime": 3600, + "retryTime": 300, + "serialNumber": 1 + }, + "TTL": 3600, + "fqdn": "zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create SOA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSrvRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSrvRecordset.json new file mode 100644 index 0000000000..6feb34df98 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSrvRecordset.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "SRVRecords": [ + { + "port": 80, + "priority": 0, + "target": "contoso.com", + "weight": 10 + } + ], + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "SRV", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/SRV", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV/record1", + "properties": { + "SRVRecords": [ + { + "port": 80, + "priority": 0, + "target": "contoso.com", + "weight": 10 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/SRV", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV/record1", + "properties": { + "SRVRecords": [ + { + "port": 80, + "priority": 0, + "target": "contoso.com", + "weight": 10 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create SRV recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateTxtRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateTxtRecordset.json new file mode 100644 index 0000000000..138a13918c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateTxtRecordset.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "TTL": 3600, + "TXTRecords": [ + { + "value": [ + "string1", + "string2" + ] + } + ], + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "TXT", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/TXT", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT/record1", + "properties": { + "TTL": 3600, + "TXTRecords": [ + { + "value": [ + "string1", + "string2" + ] + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/TXT", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT/record1", + "properties": { + "TTL": 3600, + "TXTRecords": [ + { + "value": [ + "string1", + "string2" + ] + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create TXT recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteARecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteARecordset.json new file mode 100644 index 0000000000..903a035f96 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteARecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete A recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteAaaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteAaaaRecordset.json new file mode 100644 index 0000000000..3c2b4046e4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteAaaaRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "AAAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete AAAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCaaRecordset.json new file mode 100644 index 0000000000..f5251c909d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCaaRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "CAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete CAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCnameRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCnameRecordset.json new file mode 100644 index 0000000000..a9bace8a08 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCnameRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete CNAME recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteMxRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteMxRecordset.json new file mode 100644 index 0000000000..a6afd45849 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteMxRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete MX recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteNsRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteNsRecordset.json new file mode 100644 index 0000000000..d89967fcb2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteNsRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete NS recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeletePtrRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeletePtrRecordset.json new file mode 100644 index 0000000000..0105914bc4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeletePtrRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "PTR", + "relativeRecordSetName": "1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "0.0.127.in-addr.arpa" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete PTR recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteSrvRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteSrvRecordset.json new file mode 100644 index 0000000000..18f5e585a7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteSrvRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "SRV", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete SRV recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteTxtRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteTxtRecordset.json new file mode 100644 index 0000000000..c5e8cd550d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteTxtRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "TXT", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete TXT recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetARecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetARecordset.json new file mode 100644 index 0000000000..1385776f47 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetARecordset.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "ARecords": [ + { + "ipv4Address": "127.0.0.1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get A recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetAaaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetAaaaRecordset.json new file mode 100644 index 0000000000..6195b29efa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetAaaaRecordset.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "AAAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/AAAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA/record1", + "properties": { + "AAAARecords": [ + { + "ipv6Address": "::1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get AAAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCaaRecordset.json new file mode 100644 index 0000000000..e4c5f9e431 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCaaRecordset.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "CAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1", + "properties": { + "TTL": 3600, + "caaRecords": [ + { + "flags": 0, + "tag": "issue", + "value": "ca.contoso.com" + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get CAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCnameRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCnameRecordset.json new file mode 100644 index 0000000000..5c0e387680 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCnameRecordset.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "CNAME", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CNAME", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record1", + "properties": { + "CNAMERecord": { + "cname": "contoso.com" + }, + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get CNAME recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetMxRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetMxRecordset.json new file mode 100644 index 0000000000..76feb6e24d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetMxRecordset.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "MX", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/MX", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX/record1", + "properties": { + "MXRecords": [ + { + "exchange": "mail.contoso.com", + "preference": 0 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get MX recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetNsRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetNsRecordset.json new file mode 100644 index 0000000000..881be2c77c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetNsRecordset.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "NS", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/NS", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS/record1", + "properties": { + "NSRecords": [ + { + "nsdname": "ns1.contoso.com" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get NS recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetPtrRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetPtrRecordset.json new file mode 100644 index 0000000000..b8ecf6eec2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetPtrRecordset.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "PTR", + "relativeRecordSetName": "1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "0.0.127.in-addr.arpa" + }, + "responses": { + "200": { + "body": { + "name": "1", + "type": "Microsoft.Network/dnsZones/PTR", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR/1", + "properties": { + "PTRRecords": [ + { + "ptrdname": "localhost" + } + ], + "TTL": 3600, + "fqdn": "1.0.0.127.in-addr.arpa", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get PTR recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSoaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSoaRecordset.json new file mode 100644 index 0000000000..1327fcd84c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSoaRecordset.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "SOA", + "relativeRecordSetName": "@", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "@", + "type": "Microsoft.Network/dnsZones/SOA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA/@", + "properties": { + "SOARecord": { + "email": "hostmaster.contoso.com", + "expireTime": 2419200, + "host": "ns1.contoso.com", + "minimumTTL": 300, + "refreshTime": 3600, + "retryTime": 300, + "serialNumber": 1 + }, + "TTL": 3600, + "fqdn": "zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get SOA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSrvRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSrvRecordset.json new file mode 100644 index 0000000000..83d04e81db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSrvRecordset.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "SRV", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/SRV", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV/record1", + "properties": { + "SRVRecords": [ + { + "port": 80, + "priority": 0, + "target": "contoso.com", + "weight": 10 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get SRV recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetTxtRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetTxtRecordset.json new file mode 100644 index 0000000000..10dd61fa02 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetTxtRecordset.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "TXT", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/TXT", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT/record1", + "properties": { + "TTL": 3600, + "TXTRecords": [ + { + "value": [ + "string1", + "string2" + ] + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get TXT recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByDnsZone.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByDnsZone.json new file mode 100644 index 0000000000..d13a90f41d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByDnsZone.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1", + "properties": { + "TTL": 3600, + "caaRecords": [ + { + "flags": 0, + "tag": "issue", + "value": "ca.contoso.com" + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + }, + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "ARecords": [ + { + "ipv4Address": "127.0.0.1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + }, + { + "name": "record2", + "type": "Microsoft.Network/dnsZones/CNAME", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record2", + "properties": { + "CNAMERecord": { + "cname": "contoso.com" + }, + "TTL": 3600, + "fqdn": "record2.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByDnsZone", + "title": "List recordsets by zone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListARecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListARecordsets.json new file mode 100644 index 0000000000..3f833bb61c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListARecordsets.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "A", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "ARecords": [ + { + "ipv4Address": "127.0.0.1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List A recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListAaaaRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListAaaaRecordsets.json new file mode 100644 index 0000000000..cd7f2b46b0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListAaaaRecordsets.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "AAAA", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/AAAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA/record1", + "properties": { + "AAAARecords": [ + { + "ipv6Address": "::1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List AAAA recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCaaRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCaaRecordsets.json new file mode 100644 index 0000000000..17df2357c6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCaaRecordsets.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "CAA", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1", + "properties": { + "TTL": 3600, + "caaRecords": [ + { + "flags": 0, + "tag": "issue", + "value": "ca.contoso.com" + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List CAA recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCnameRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCnameRecordsets.json new file mode 100644 index 0000000000..54f4f85179 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCnameRecordsets.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "CNAME", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CNAME", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record1", + "properties": { + "CNAMERecord": { + "cname": "contoso.com" + }, + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List CNAME recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListMxRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListMxRecordsets.json new file mode 100644 index 0000000000..d9d538d44e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListMxRecordsets.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "MX", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/MX", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX/record1", + "properties": { + "MXRecords": [ + { + "exchange": "mail.contoso.com", + "preference": 0 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List MX recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListNsRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListNsRecordsets.json new file mode 100644 index 0000000000..741207591c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListNsRecordsets.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "NS", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/NS", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS/record1", + "properties": { + "NSRecords": [ + { + "nsdname": "ns1.contoso.com" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List NS recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListPtrRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListPtrRecordsets.json new file mode 100644 index 0000000000..89283ec06b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListPtrRecordsets.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "PTR", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "0.0.127.in-addr.arpa" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "1", + "type": "Microsoft.Network/dnsZones/PTR", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR/1", + "properties": { + "PTRRecords": [ + { + "ptrdname": "localhost" + } + ], + "TTL": 3600, + "fqdn": "1.0.0.127.in-addr.arpa", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List PTR recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSoaRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSoaRecordsets.json new file mode 100644 index 0000000000..f2c94b043b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSoaRecordsets.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "SOA", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "@", + "type": "Microsoft.Network/dnsZones/SOA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA/@", + "properties": { + "SOARecord": { + "email": "hostmaster.contoso.com", + "expireTime": 2419200, + "host": "ns1.contoso.com", + "minimumTTL": 300, + "refreshTime": 3600, + "retryTime": 300, + "serialNumber": 1 + }, + "TTL": 3600, + "fqdn": "zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List SOA recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSrvRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSrvRecordsets.json new file mode 100644 index 0000000000..5cbd25a66a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSrvRecordsets.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "SRV", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/SRV", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV/record1", + "properties": { + "SRVRecords": [ + { + "port": 80, + "priority": 0, + "target": "contoso.com", + "weight": 10 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List SRV recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListTxtRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListTxtRecordsets.json new file mode 100644 index 0000000000..37fab76dbb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListTxtRecordsets.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "TXT", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/TXT", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT/record1", + "properties": { + "TTL": 3600, + "TXTRecords": [ + { + "value": [ + "string1", + "string2" + ] + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List TXT recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchARecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchARecordset.json new file mode 100644 index 0000000000..130f03eb3a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchARecordset.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "ARecords": [ + { + "ipv4Address": "127.0.0.1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch A recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchAaaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchAaaaRecordset.json new file mode 100644 index 0000000000..6f1fb6b9cb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchAaaaRecordset.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "AAAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/AAAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA/record1", + "properties": { + "AAAARecords": [ + { + "ipv6Address": "::1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch AAAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCaaRecordset.json new file mode 100644 index 0000000000..48a94505b0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCaaRecordset.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "CAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1", + "properties": { + "TTL": 3600, + "caaRecords": [ + { + "flags": 0, + "tag": "issue", + "value": "ca.contoso.com" + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch CAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCnameRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCnameRecordset.json new file mode 100644 index 0000000000..230747e7df --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCnameRecordset.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "CNAME", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CNAME", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record1", + "properties": { + "CNAMERecord": { + "cname": "contoso.com" + }, + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch CNAME recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchMxRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchMxRecordset.json new file mode 100644 index 0000000000..ea9e188dcc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchMxRecordset.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "MX", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/MX", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX/record1", + "properties": { + "MXRecords": [ + { + "exchange": "mail.contoso.com", + "preference": 0 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch MX recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchNsRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchNsRecordset.json new file mode 100644 index 0000000000..ac82206f61 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchNsRecordset.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "NS", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/NS", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS/record1", + "properties": { + "NSRecords": [ + { + "nsdname": "ns1.contoso.com" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch NS recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchPtrRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchPtrRecordset.json new file mode 100644 index 0000000000..d5ee65e6e3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchPtrRecordset.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "PTR", + "relativeRecordSetName": "1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "0.0.127.in-addr.arpa" + }, + "responses": { + "200": { + "body": { + "name": "1", + "type": "Microsoft.Network/dnsZones/PTR", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR/1", + "properties": { + "PTRRecords": [ + { + "ptrdname": "localhost" + } + ], + "TTL": 3600, + "fqdn": "1.0.0.127.in-addr.arpa", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch PTR recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSoaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSoaRecordset.json new file mode 100644 index 0000000000..7703649e5b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSoaRecordset.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "SOA", + "relativeRecordSetName": "@", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "@", + "type": "Microsoft.Network/dnsZones/SOA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA/@", + "properties": { + "SOARecord": { + "email": "hostmaster.contoso.com", + "expireTime": 2419200, + "host": "ns1.contoso.com", + "minimumTTL": 300, + "refreshTime": 3600, + "retryTime": 300, + "serialNumber": 1 + }, + "TTL": 3600, + "fqdn": "zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch SOA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSrvRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSrvRecordset.json new file mode 100644 index 0000000000..7a0268aabf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSrvRecordset.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "SRV", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/SRV", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV/record1", + "properties": { + "SRVRecords": [ + { + "port": 80, + "priority": 0, + "target": "contoso.com", + "weight": 10 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch SRV recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchTxtRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchTxtRecordset.json new file mode 100644 index 0000000000..9412474827 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchTxtRecordset.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "TXT", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/TXT", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT/record1", + "properties": { + "TTL": 3600, + "TXTRecords": [ + { + "value": [ + "string1", + "string2" + ] + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch TXT recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_CreateOrUpdate.json new file mode 100644 index 0000000000..f546b6b2f2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_CreateOrUpdate.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "location": "Global", + "tags": { + "key1": "value1" + } + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "zone1", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-01.azure-dns.com", + "ns2-01.azure-dns.net", + "ns3-01.azure-dns.org", + "ns4-01.azure-dns.info" + ], + "numberOfRecordSets": 2, + "zoneType": "Public" + }, + "tags": { + "key1": "value1" + } + } + }, + "201": { + "body": { + "name": "zone1", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-01.azure-dns.com", + "ns2-01.azure-dns.net", + "ns3-01.azure-dns.org", + "ns4-01.azure-dns.info" + ], + "numberOfRecordSets": 2, + "zoneType": "Public" + }, + "tags": { + "key1": "value1" + } + } + } + }, + "operationId": "Zones_CreateOrUpdate", + "title": "Create zone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Delete.json new file mode 100644 index 0000000000..3b91078c3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Delete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://asyncoperationstatusurl" + } + }, + "204": {} + }, + "operationId": "Zones_Delete", + "title": "Delete zone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Get.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Get.json new file mode 100644 index 0000000000..542112639a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Get.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "zone1", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-01.azure-dns.com", + "ns2-01.azure-dns.net", + "ns3-01.azure-dns.org", + "ns4-01.azure-dns.info" + ], + "numberOfRecordSets": 2 + }, + "tags": { + "key1": "value1" + } + } + } + }, + "operationId": "Zones_Get", + "title": "Get zone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_List.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_List.json new file mode 100644 index 0000000000..1be98baee4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_List.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/providers/Microsoft.Network/dnsZones?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "zone1", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-01.azure-dns.com", + "ns2-01.azure-dns.net", + "ns3-01.azure-dns.org", + "ns4-01.azure-dns.info" + ], + "numberOfRecordSets": 2 + }, + "tags": { + "key1": "value1" + } + }, + { + "name": "zone2", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/dnsZones/zone2", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-02.azure-dns.com", + "ns2-02.azure-dns.net", + "ns3-02.azure-dns.org", + "ns4-02.azure-dns.info" + ], + "numberOfRecordSets": 300 + } + } + ] + } + } + }, + "operationId": "Zones_List", + "title": "List zones by subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_ListByResourceGroup.json new file mode 100644 index 0000000000..73dd504e2e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_ListByResourceGroup.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "zone1", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-01.azure-dns.com", + "ns2-01.azure-dns.net", + "ns3-01.azure-dns.org", + "ns4-01.azure-dns.info" + ], + "numberOfRecordSets": 2 + }, + "tags": { + "key1": "value1" + } + }, + { + "name": "zone2", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone2", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-02.azure-dns.com", + "ns2-02.azure-dns.net", + "ns3-02.azure-dns.org", + "ns4-02.azure-dns.info" + ], + "numberOfRecordSets": 300 + } + } + ] + } + } + }, + "operationId": "Zones_ListByResourceGroup", + "title": "List zones by resource group" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Update.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Update.json new file mode 100644 index 0000000000..4fe00a39a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Update.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "tags": { + "key2": "value2" + } + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "zone1", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-01.azure-dns.com", + "ns2-01.azure-dns.net", + "ns3-01.azure-dns.org", + "ns4-01.azure-dns.info" + ], + "numberOfRecordSets": 2 + }, + "tags": { + "key2": "value2" + } + } + } + }, + "operationId": "Zones_Update", + "title": "Patch zone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/main.tsp new file mode 100644 index 0000000000..da2a15bf60 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/main.tsp @@ -0,0 +1,39 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsZone.tsp"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "DnsManagementClient", +}) +@versioned(Versions) +@doc("The DNS Management Client.") +namespace Azure.ResourceManager.Dns; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2018-05-01 API version.") + v2018_05_01: "2018-05-01", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp new file mode 100644 index 0000000000..34398ee09a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp @@ -0,0 +1,325 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; + +namespace Azure.ResourceManager.Dns; + +interface Operations extends Azure.ResourceManager.Operations {} + +@fixed +enum RecordType { + A, + AAAA, + CAA, + CNAME, + MX, + NS, + PTR, + SOA, + SRV, + TXT, +} + +@doc("The type of this DNS zone (Public or Private).") +@fixed +enum DnsZoneType { + Public, + Private, +} + +@doc("Represents the properties of the records in the record set.") +model RecordSetProperties { + @doc("The metadata attached to the record set.") + metadata?: Record; + + @doc("The TTL (time-to-live) of the records in the record set.") + @projectedName("json", "TTL") + ttlInSeconds?: int32; + + @doc("Fully qualified domain name of the record set.") + @visibility("read") + fqdn?: string; + + @doc("provisioning State of the record set.") + @visibility("read") + provisioningState?: string; + + @doc("A reference to an azure resource from where the dns resource value is taken.") + targetResource?: SubResource; + + @doc("The list of A records in the record set.") + @projectedName("json", "ARecords") + aRecords?: ARecord[]; + + @doc("The list of AAAA records in the record set.") + @projectedName("json", "AAAARecords") + aaaaRecords?: AaaaRecord[]; + + @doc("The list of MX records in the record set.") + MXRecords?: MxRecord[]; + + @doc("The list of NS records in the record set.") + NSRecords?: NsRecord[]; + + @doc("The list of PTR records in the record set.") + @projectedName("json", "PTRRecords") + ptrRecords?: PtrRecord[]; + + @doc("The list of SRV records in the record set.") + @projectedName("json", "SRVRecords") + srvRecords?: SrvRecord[]; + + @doc("The list of TXT records in the record set.") + @projectedName("json", "TXTRecords") + txtRecords?: TxtRecord[]; + + @doc("The CNAME record in the record set.") + @projectedName("json", "CNAMERecord") + cnameRecord?: CnameRecord; + + @doc("The SOA record in the record set.") + @projectedName("json", "SOARecord") + soaRecord?: SoaRecord; + + @doc("The list of CAA records in the record set.") + caaRecords?: CaaRecord[]; +} + +@doc("A reference to a another resource") +model SubResource { + @doc("Resource Id.") + id?: string; +} + +@doc("An A record.") +model ARecord { + @doc("The IPv4 address of this A record.") + ipv4Address?: string; +} + +@doc("An AAAA record.") +model AaaaRecord { + @doc("The IPv6 address of this AAAA record.") + ipv6Address?: string; +} + +@doc("An MX record.") +model MxRecord { + @doc("The preference value for this MX record.") + preference?: int32; + + @doc("The domain name of the mail host for this MX record.") + exchange?: string; +} + +@doc("An NS record.") +model NsRecord { + @doc("The name server name for this NS record.") + @projectedName("json", "nsdname") + dnsNSDomainName?: string; +} + +@doc("A PTR record.") +model PtrRecord { + @doc("The PTR target domain name for this PTR record.") + @projectedName("json", "ptrdname") + dnsPtrDomainName?: string; +} + +@doc("An SRV record.") +model SrvRecord { + @doc("The priority value for this SRV record.") + priority?: int32; + + @doc("The weight value for this SRV record.") + weight?: int32; + + @doc("The port value for this SRV record.") + port?: int32; + + @doc("The target domain name for this SRV record.") + target?: string; +} + +@doc("A TXT record.") +model TxtRecord { + @doc("The text value of this TXT record.") + @projectedName("json", "value") + values?: string[]; +} + +@doc("A CNAME record.") +model CnameRecord { + @doc("The canonical name for this CNAME record.") + cname?: string; +} + +@doc("An SOA record.") +model SoaRecord { + @doc("The domain name of the authoritative name server for this SOA record.") + host?: string; + + @doc("The email contact for this SOA record.") + email?: string; + + @doc("The serial number for this SOA record.") + serialNumber?: int32; + + @doc("The refresh value for this SOA record.") + @projectedName("json", "refreshTime") + refreshTimeInSeconds?: int32; + + @doc("The retry time for this SOA record.") + @projectedName("json", "retryTime") + retryTimeInSeconds?: int32; + + @doc("The expire time for this SOA record.") + @projectedName("json", "expireTime") + expireTimeInSeconds?: int32; + + @doc("The minimum value for this SOA record. By convention this is used to determine the negative caching duration.") + @projectedName("json", "minimumTTL") + minimumTtlInSeconds?: int32; +} + +@doc("A CAA record.") +model CaaRecord { + @doc("The flags for this CAA record as an integer between 0 and 255.") + flags?: int32; + + @doc("The tag for this CAA record.") + tag?: string; + + @doc("The value for this CAA record.") + value?: string; +} + +@doc("An error response from the service.") +@error +model CloudError { + @doc("Cloud error body.") + error?: CloudErrorBody; +} + +@doc("An error response from the service.") +model CloudErrorBody { + @doc("An identifier for the error. Codes are invariant and are intended to be consumed programmatically.") + code?: string; + + @doc("A message describing the error, intended to be suitable for display in a user interface.") + message?: string; + + @doc("The target of the particular error. For example, the name of the property in error.") + target?: string; + + @doc("A list of additional details about the error.") + details?: CloudErrorBody[]; +} + +@doc("Represents the properties of the zone.") +model ZoneProperties { + @doc("The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.") + @visibility("read") + @projectedName("json", "maxNumberOfRecordSets") + maxNumberOfRecords?: int32; + + @doc("The maximum number of records per record set that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.") + @visibility("read") + @projectedName("json", "maxNumberOfRecordsPerRecordSet") + maxNumberOfRecordsPerRecord?: int32; + + @doc("The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.") + @visibility("read") + @projectedName("json", "numberOfRecordSets") + numberOfRecords?: int32; + + @doc("The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored.") + @visibility("read") + nameServers?: string[]; + + @doc("The type of this DNS zone (Public or Private).") + zoneType?: DnsZoneType; + + @doc("A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private.") + registrationVirtualNetworks?: SubResource[]; + + @doc("A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private.") + resolutionVirtualNetworks?: SubResource[]; +} + +@doc("Common properties of an Azure Resource Manager resource") +model Resource { + @doc("Resource ID.") + @visibility("read") + id?: string; + + @doc("Resource name.") + @visibility("read") + name?: string; + + @doc("Resource type.") + @visibility("read") + type?: string; + + @doc("Resource location.") + @visibility("read", "create") + // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one + @key + location: string; + + @doc("Resource tags.") + tags?: Record; +} + +@doc("Describes a request to update a DNS zone.") +model ZoneUpdateOptions { + @doc("Resource tags.") + tags?: Record; +} + +@doc("Represents the properties of the Dns Resource Reference Request.") +model DnsResourceReferenceRequest { + @doc("The properties of the Resource Reference Request.") + properties?: DnsResourceReferenceRequestProperties; +} + +@doc("Represents the properties of the Dns Resource Reference Request.") +model DnsResourceReferenceRequestProperties { + @doc("A list of references to azure resources for which referencing dns records need to be queried.") + targetResources?: SubResource[]; +} + +@doc("Represents the properties of the Dns Resource Reference Result.") +model DnsResourceReferenceResult { + @doc("The result of dns resource reference request. Returns a list of dns resource references for each of the azure resource in the request.") + properties?: DnsResourceReferenceResultProperties; +} + +@doc("The result of dns resource reference request. Returns a list of dns resource references for each of the azure resource in the request.") +model DnsResourceReferenceResultProperties { + @doc("The result of dns resource reference request. A list of dns resource references for each of the azure resource in the request") + dnsResourceReferences?: DnsResourceReference[]; +} + +@doc("Represents a single Azure resource and its referencing DNS records.") +model DnsResourceReference { + @doc("A list of dns Records ") + dnsResources?: SubResource[]; + + @doc("A reference to an azure resource from where the dns resource value is taken.") + targetResource?: SubResource; +} + +@doc("Parameters supplied to update a record set.") +model RecordSetUpdateParameters { + @doc("Specifies information about the record set being updated.") + @projectedName("json", "RecordSet") + recordSet?: DnsRecord; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp new file mode 100644 index 0000000000..12d713a36f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp @@ -0,0 +1,28 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Dns; + +interface DnsResourceReferenceOperations { + @doc("Returns the DNS records specified by the referencing targetResourceIds.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Network/getDnsResourceReference") + @post + GetByTargetResources is Azure.Core.Foundations.Operation< + { + @doc("Specifies the Azure subscription ID, which uniquely identifies the Microsoft Azure subscription.") + @path + subscriptionId: string; + + @doc("Properties for dns resource reference request.") + @body + parameters: DnsResourceReferenceRequest; + }, + DnsResourceReferenceResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..475477bfc3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/dns.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/machinelearningservices.md b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/machinelearningservices.md new file mode 100644 index 0000000000..aa5e9813f0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/machinelearningservices.md @@ -0,0 +1,610 @@ +```yaml +library-name: MachineLearning +namespace: Azure.ResourceManager.MachineLearning +isAzureSpec: true +isArm: true +require: https://github.com/Azure/azure-rest-api-specs/blob/3eb9ec8e9c8f717c6b461c4c0f49a4662fb948fd/specification/machinelearningservices/resource-manager/readme.md +#tag: package-preview-2023-06 +skip-csproj: true +modelerfour: + flatten-payloads: false +deserialize-null-collection-as-null-value: true + +#mgmt-debug: +# show-serialized-names: true + +format-by-name-rules: + "tenantId": "uuid" + "etag": "etag" + "location": "azure-location" + "*Uri": "Uri" + "*Uris": "Uri" + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + Vmos: VmOS + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag + AKS: Aks + USD: Usd + PAT: Pat + SAS: Sas + LRS: Lrs + AAD: Aad + AML: Aml + VCPU: VCpu|vCpu + VCPUs: VCpus|vCpus + +override-operation-name: + Quotas_List: GetMachineLearningQuotas + Quotas_Update: UpdateMachineLearningQuotas + Usages_List: GetMachineLearningUsages + VirtualMachineSizes_List: GetMachineLearningVmSizes + +no-property-type-replacement: + - ResourceId + - VirtualMachineImage + +request-path-to-resource-name: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}: MachineLearningCodeContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}: MachineLearningCodeVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}: MachineLearningComponentContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}: MachineLearningComponentVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}: MachineLearningDataContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}: MachineLearningDataVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}: MachineLearningEnvironmentContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}: MachineLearningEnvironmentVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}: MachineLearningModelContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}: MachineLearningModelVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}: MachineLearningRegistryCodeContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}: MachineLearningRegistryCodeVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}: MachineLearninRegistryComponentContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}: MachineLearninRegistryComponentVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}: MachineLearningRegistryDataContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}: MachineLearningRegistryDataVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}: MachineLearningRegistryEnvironmentContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}: MachineLearningRegistryEnvironmentVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}: MachineLearningRegistryModelContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}: MachineLearningRegistryModelVersion + +prepend-rp-prefix: + - Feature + - FeatureProperties + - LabelingJob + - Registry + - Webhook + - WebhookType + - AllFeatures + +rename-mapping: + FeaturesetContainer: MachineLearningFeatureSetContainer + FeaturesetContainerProperties: MachineLearningFeatureSetContainerProperties + FeaturesetJob: MachineLearningFeatureSetJob + FeaturesetVersion: MachineLearningFeatureSetVersion + FeaturesetVersionBackfillRequest: FeatureSetVersionBackfillContent + FeaturesetVersionProperties: MachineLearningFeatureSetVersionProperties + FeaturestoreEntityContainer: MachineLearningFeatureStoreEntityContainer + FeaturestoreEntityContainerProperties: MachineLearningFeatureStoreEntityContainerProperties + FeaturestoreEntityVersion: MachineLearningFeaturestoreEntityVersion + FeaturestoreEntityVersionProperties: MachineLearningFeatureStoreEntityVersionProperties + FeaturestoreJobType: FeatureStoreJobType + ComputeInstanceProperties.setupScripts: SetupScriptsSettings + Workspace: MachineLearningWorkspace + ComputeResource: MachineLearningCompute + Compute: MachineLearningComputeProperties + Compute.resourceId: -|arm-id + ComputeInstance: MachineLearningComputeInstance + ComputeInstanceProperties: MachineLearningComputeInstanceProperties + AKS: MachineLearningAksCompute + AKSSchemaProperties: MachineLearningAksComputeProperties + Kubernetes: MachineLearningKubernetesCompute + KubernetesProperties: MachineLearningKubernetesProperties + VirtualMachine: MachineLearningVirtualMachineCompute + VirtualMachineSchemaProperties: MachineLearningVirtualMachineProperties + HDInsight: MachineLearningHDInsightCompute + HDInsightProperties: MachineLearningHDInsightProperties + DataFactory: MachineLearningDataFactoryCompute + Databricks: MachineLearningDatabricksCompute + DatabricksProperties: MachineLearningDatabricksProperties + DataLakeAnalytics: MachineLearningDataLakeAnalytics + DataLakeAnalyticsSchemaProperties: MachineLearningDataLakeAnalyticsProperties + SynapseSpark: MachineLearningSynapseSpark + SynapseSparkProperties: MachineLearningSynapseSparkProperties + ProvisioningState: MachineLearningProvisioningState + ListWorkspaceKeysResult: MachineLearningWorkspaceGetKeysResult + ListWorkspaceKeysResult.userStorageArmId: UserStorageResourceId + RegistryListCredentialsResult: MachineLearningContainerRegistryCredentials + Password: MachineLearningPasswordDetail + BatchDeploymentTrackedResource: MachineLearningBatchDeployment + BatchDeployment: MachineLearningBatchDeploymentProperties + BatchEndpointTrackedResource: MachineLearningBatchEndpoint + BatchEndpoint: MachineLearningBatchEndpointProperties + AssetContainer: MachineLearningAssetContainer + ResourceBase: MachineLearningResourceBase + AssetBase: MachineLearningAssetBase + JobBaseResource: MachineLearningJob + JobBase: MachineLearningJobProperties + CommandJob: MachineLearningCommandJob + CodeContainerResource: MachineLearningCodeContainer + CodeContainer: MachineLearningCodeContainerProperties + CodeVersionResource: MachineLearningCodeVersion + CodeVersion: MachineLearningCodeVersionProperties + ComponentContainerResource: MachineLearningComponentContainer + ComponentContainer: MachineLearningComponentContainerProperties + DataVersionBaseResource: MachineLearningDataVersion + DataVersionBase: MachineLearningDataVersionProperties + EnvironmentContainerResource: MachineLearningEnvironmentContainer + EnvironmentContainer: MachineLearningEnvironmentContainerProperties + EnvironmentVersionResource: MachineLearningEnvironmentVersion + EnvironmentVersion: MachineLearningEnvironmentVersionProperties + ComponentVersionResource: MachineLearningComponentVersion + ComponentVersion: MachineLearningComponentVersionProperties + DataContainerResource: MachineLearningDataContainer + DataContainer: MachineLearningDataContainerProperties + DatastoreResource: MachineLearningDatastore + Datastore: MachineLearningDatastoreProperties + MLTableData: MachineLearningTable + ResourceQuota: MachineLearningResourceQuota + ModelContainerResource: MachineLearningModelContainer + ModelContainer: MachineLearningModelContainerProperties + ModelVersionResource: MachineLearningModelVersion + ModelVersion: MachineLearningModelVersionProperties + OnlineDeploymentTrackedResource: MachineLearningOnlineDeployment + OnlineDeployment: MachineLearningOnlineDeploymentProperties + OnlineEndpointTrackedResource: MachineLearningOnlineEndpoint + OnlineEndpoint: MachineLearningOnlineEndpointProperties + Schedule: MachineLearningSchedule + ScheduleProperties: MachineLearningScheduleProperties + VirtualMachineSize: MachineLearningVmSize + WorkspaceConnectionPropertiesV2BasicResource: MachineLearningWorkspaceConnection + WorkspaceConnectionPropertiesV2: MachineLearningWorkspaceConnectionProperties + UpdateWorkspaceQuotas: MachineLearningWorkspaceQuotaUpdate + QuotaUpdateParameters: MachineLearningQuotaUpdateContent + EncryptionProperty: MachineLearningEncryptionSetting + EncryptionStatus: MachineLearningEncryptionStatus + KeyVaultProperties: MachineLearningEncryptionKeyVaultProperties + KeyVaultProperties.keyVaultArmId: -|arm-id + IdentityForCmk: MachineLearningCmkIdentity + IdentityForCmk.userAssignedIdentity: -|arm-id + NotebookResourceInfo: MachineLearningNotebookResourceInfo + SharedPrivateLinkResource: MachineLearningSharedPrivateLinkResource + SharedPrivateLinkResource.properties.privateLinkResourceId: -|arm-id + Workspace.properties.storageHnsEnabled: IsStorageHnsEnabled + Workspace.properties.v1LegacyMode: IsV1LegacyMode + DiagnoseResponseResult: MachineLearningWorkspaceDiagnoseResult + DiagnoseWorkspaceParameters: MachineLearningWorkspaceDiagnoseContent + DiagnoseRequestProperties: MachineLearningWorkspaceDiagnoseProperties + NotebookAccessTokenResult: MachineLearningWorkspaceNotebookAccessTokenResult + ListNotebookKeysResult: MachineLearningWorkspaceGetNotebookKeysResult + FqdnEndpointsPropertyBag: MachineLearningFqdnEndpoints + FqdnEndpoints: MachineLearningFqdnEndpointsProperties + ListStorageAccountKeysResult: MachineLearningWorkspaceGetStorageAccountKeysResult + AmlUserFeature: MachineLearningUserFeature + DatastoreCredentials: MachineLearningDatastoreCredentials + AccountKeyDatastoreCredentials: MachineLearningAccountKeyDatastoreCredentials + CertificateDatastoreCredentials: MachineLearningCertificateDatastoreCredentials + NoneDatastoreCredentials: MachineLearningNoneDatastoreCredentials + SasDatastoreCredentials: MachineLearningSasDatastoreCredentials + ServicePrincipalDatastoreCredentials: MachineLearningServicePrincipalDatastoreCredentials + DatastoreSecrets: MachineLearningDatastoreSecrets + CertificateDatastoreSecrets: MachineLearningCertificateDatastoreSecrets + SasDatastoreSecrets: MachineLearningSasDatastoreSecrets + ServicePrincipalDatastoreSecrets: MachineLearningServicePrincipalDatastoreSecrets + AccountKeyDatastoreSecrets: MachineLearningAccountKeyDatastoreSecrets + ComputeSecrets: MachineLearningComputeSecrets + AksComputeSecrets: MachineLearningAksComputeSecrets + DatabricksComputeSecrets: MachineLearningDatabricksComputeSecrets + VirtualMachineSecrets: MachineLearningVirtualMachineSecrets + AksNetworkingConfiguration: MachineLearningAksNetworkingConfiguration + AksNetworkingConfiguration.subnetId: -|arm-id + ClusterPurpose: MachineLearningClusterPurpose + LoadBalancerType: MachineLearningLoadBalancerType + SslConfiguration: MachineLearningSslConfiguration + SystemService: MachineLearningComputeSystemService + IdentityConfiguration: MachineLearningIdentityConfiguration + ManagedIdentity: MachineLearningManagedIdentity + ManagedIdentity.resourceId: -|arm-id + UserIdentity: MachineLearningUserIdentity + PartialMinimalTrackedResource: MachineLearningResourcePatch + PartialMinimalTrackedResourceWithIdentity: MachineLearningResourcePatchWithIdentity + PartialSku: MachineLearningSkuPatch + ApplicationSharingPolicy: MachineLearningApplicationSharingPolicy + AssetReferenceBase: MachineLearningAssetReferenceBase + DataPathAssetReference: MachineLearningDataPathAssetReference + IdAssetReference: MachineLearningIdAssetReference + IdAssetReference.assetId: -|arm-id + OutputPathAssetReference: MachineLearningOutputPathAssetReference + AssignedUser: MachineLearningComputeInstanceAssignedUser + AutoPauseProperties: MachineLearningAutoPauseProperties + AutoPauseProperties.enabled: IsEnabled + Autosave: MachineLearningComputeInstanceAutosave + ComputeInstanceConnectivityEndpoints: MachineLearningComputeInstanceConnectivityEndpoints + ComputeInstanceContainer: MachineLearningComputeInstanceContainer + ComputeInstanceEnvironmentInfo: MachineLearningComputeInstanceEnvironmentInfo + Network: MachineLearningNetwork + ComputeInstanceCreatedBy: MachineLearningComputeInstanceCreatedBy + ComputeInstanceAuthorizationType: MachineLearningComputeInstanceAuthorizationType + ComputeInstanceApplication: MachineLearningComputeInstanceApplication + ComputeInstanceDataDisk: MachineLearningComputeInstanceDataDisk + ComputeInstanceDataMount: MachineLearningComputeInstanceDataMount + MountAction: MachineLearningMountAction + MountState: MachineLearningMountState + SourceType: MachineLearningSourceType + ComputeInstanceLastOperation: MachineLearningComputeInstanceLastOperation + OperationName: MachineLearningOperationName + OperationStatus: MachineLearningOperationStatus + OperationTrigger: MachineLearningOperationTrigger + ComputeInstanceSshSettings: MachineLearningComputeInstanceSshSettings + SshPublicAccess: MachineLearningSshPublicAccess + ComputeInstanceState: MachineLearningComputeInstanceState + ComputePowerAction: MachineLearningComputePowerAction + ComputeStartStopSchedule: MachineLearningComputeStartStopSchedule + ComputeStartStopSchedule.recurrence: RecurrenceSchedule + ComputeStartStopSchedule.cron: CronSchedule + ProvisioningStatus: MachineLearningComputeProvisioningStatus + ScheduleBase: MachineLearningScheduleBase + ScheduleStatus: MachineLearningScheduleStatus + TriggerType: MachineLearningTriggerType + RecurrenceTrigger: MachineLearningRecurrenceTrigger + ConnectionCategory: MachineLearningConnectionCategory + ContainerType: MachineLearningContainerType + DeploymentLogs: MachineLearningDeploymentLogs + DeploymentLogsRequest: MachineLearningDeploymentLogsContent + DiagnoseResponseResultValue: MachineLearningDiagnoseResultValue + DiagnoseResult: MachineLearningDiagnoseResult + DiagnoseResultLevel: MachineLearningDiagnoseResultLevel + PartialManagedServiceIdentity: MachineLearningPartialManagedServiceIdentity + AutoScaleProperties: MachineLearningAutoScaleProperties + AutoScaleProperties.enabled: IsEnabled + Seasonality: ForecastingSeasonality + AzureBlobDatastore: MachineLearningAzureBlobDatastore + AzureDataLakeGen1Datastore: MachineLearningAzureDataLakeGen1Datastore + AzureDataLakeGen2Datastore: MachineLearningAzureDataLakeGen2Datastore + AzureFileDatastore: MachineLearningAzureFileDatastore + BatchLoggingLevel: MachineLearningBatchLoggingLevel + BatchOutputAction: MachineLearningBatchOutputAction + BatchRetrySettings: MachineLearningBatchRetrySettings + BillingCurrency: MachineLearningBillingCurrency + BuildContext: MachineLearningBuildContext + EnvironmentType: MachineLearningEnvironmentType + OperatingSystemType: MachineLearningOperatingSystemType + InferenceContainerProperties: MachineLearningInferenceContainerProperties + Caching: MachineLearningCachingType + Classification: ClassificationTask + CodeConfiguration: MachineLearningCodeConfiguration + JobLimits: MachineLearningJobLimits + SweepJobLimits: MachineLearningSweepJobLimits + CommandJobLimits: MachineLearningCommandJobLimits + ContainerResourceRequirements: MachineLearningContainerResourceRequirements + ContainerResourceSettings: MachineLearningContainerResourceSettings + TriggerBase: MachineLearningTriggerBase + JobInput: MachineLearningJobInput + CustomModelJobInput: MachineLearningCustomModelJobInput + LiteralJobInput: MachineLearningLiteralJobInput + MLFlowModelJobInput: MachineLearningFlowModelJobInput + MLTableJobInput: MachineLearningTableJobInput + TritonModelJobInput: MachineLearningTritonModelJobInput + UriFileJobInput: MachineLearningUriFileJobInput + UriFolderJobInput: MachineLearningUriFolderJobInput + JobOutput: MachineLearningJobOutput + CustomModelJobOutput: MachineLearningCustomModelJobOutput + MLFlowModelJobOutput: MachineLearningFlowModelJobOutput + MLTableJobOutput: MachineLearningTableJobOutput + TritonModelJobOutput: MachineLearningTritonModelJobOutput + UriFileJobOutput: MachineLearningUriFileJobOutput + UriFolderJobOutput: MachineLearningUriFolderJobOutput + DataType: MachineLearningDataType + OnlineScaleSettings: MachineLearningOnlineScaleSettings + DefaultScaleSettings: MachineLearningDefaultScaleSettings + TargetUtilizationScaleSettings: MachineLearningTargetUtilizationScaleSettings + DeploymentProvisioningState: MachineLearningDeploymentProvisioningState + ResourceConfiguration: MachineLearningResourceConfiguration + DeploymentResourceConfiguration: MachineLearningDeploymentResourceConfiguration + JobResourceConfiguration: MachineLearningJobResourceConfiguration + DistributionConfiguration: MachineLearningDistributionConfiguration + Mpi: MpiDistributionConfiguration + PyTorch: PyTorchDistributionConfiguration + TensorFlow: TensorFlowDistributionConfiguration + EarlyTerminationPolicy: MachineLearningEarlyTerminationPolicy + EgressPublicNetworkAccessType: MachineLearningEgressPublicNetworkAccessType + EndpointAuthKeys: MachineLearningEndpointAuthKeys + EndpointAuthMode: MachineLearningEndpointAuthMode + EndpointAuthToken: MachineLearningEndpointAuthToken + EndpointComputeType: MachineLearningEndpointComputeType + EndpointDeploymentPropertiesBase: MachineLearningEndpointDeploymentProperties + EndpointPropertiesBase: MachineLearningEndpointProperties + EndpointProvisioningState: MachineLearningEndpointProvisioningState + EndpointScheduleAction: MachineLearningEndpointScheduleAction + ErrorResponse: MachineLearningError + EstimatedVMPrice: MachineLearningEstimatedVMPrice + VMPriceOSType: MachineLearningVMPriceOSType + VMTier: MachineLearningVmTier + EstimatedVMPrices: MachineLearningEstimatedVMPrices + UnitOfMeasure: MachineLearningUnitOfMeasure + FeatureLags: MachineLearningFeatureLag + FeaturizationMode: MachineLearningFeaturizationMode + FeaturizationSettings: MachineLearningFeaturizationSettings + FlavorData: MachineLearningFlavorData + FqdnEndpoint: MachineLearningFqdnEndpoint + FqdnEndpointDetail: MachineLearningFqdnEndpointDetail + Goal: MachineLearningGoal + InputDeliveryMode: MachineLearningInputDeliveryMode + OutputDeliveryMode: MachineLearningOutputDeliveryMode + InstanceTypeSchema: MachineLearningInstanceTypeSchema + InstanceTypeSchemaResources: MachineLearningInstanceTypeSchemaResources + ScheduleActionBase: MachineLearningScheduleAction + JobScheduleAction: MachineLearningJobScheduleAction + JobService: MachineLearningJobService + JobStatus: MachineLearningJobStatus + KeyType: MachineLearningKeyType + KubernetesOnlineDeployment: MachineLearningKubernetesOnlineDeployment + ListViewType: MachineLearningListViewType + LogVerbosity: MachineLearningLogVerbosity + ManagedIdentityAuthTypeWorkspaceConnectionProperties: MachineLearningManagedIdentityAuthTypeWorkspaceConnection + WorkspaceConnectionManagedIdentity: MachineLearningWorkspaceConnectionManagedIdentity + WorkspaceConnectionManagedIdentity.resourceId: -|arm-id + NoneAuthTypeWorkspaceConnectionProperties: MachineLearningNoneAuthTypeWorkspaceConnection + PATAuthTypeWorkspaceConnectionProperties: MachineLearningPATAuthTypeWorkspaceConnection + SASAuthTypeWorkspaceConnectionProperties: MachineLearningSASAuthTypeWorkspaceConnection + UsernamePasswordAuthTypeWorkspaceConnectionProperties: MachineLearningUsernamePasswordAuthTypeWorkspaceConnection + ConnectionAuthType: MachineLearningConnectionAuthType + ManagedOnlineDeployment: MachineLearningManagedOnlineDeployment + ModelSize: MachineLearningModelSize + NodeState: MachineLearningNodeState + NodeStateCounts: MachineLearningNodeStateCounts + NotebookPreparationError: MachineLearningNotebookPreparationError + Objective: MachineLearningObjective + OnlineRequestSettings: MachineLearningOnlineRequestSettings + OrderString: MachineLearningOrderString + OsType: MachineLearningOSType + PipelineJob: MachineLearningPipelineJob + WorkspacePrivateEndpointResource: MachineLearningPrivateEndpoint + WorkspacePrivateEndpointResource.id: -|arm-id + WorkspacePrivateEndpointResource.subnetArmId: -|arm-id + ProbeSettings: MachineLearningProbeSettings + PublicNetworkAccessType: MachineLearningPublicNetworkAccessType + QuotaBaseProperties: MachineLearningQuotaProperties + QuotaUnit: MachineLearningQuotaUnit + RecurrenceFrequency: MachineLearningRecurrenceFrequency + RecurrenceSchedule: MachineLearningRecurrenceSchedule + WeekDay: MachineLearningDayOfWeek + RegenerateEndpointKeysRequest: MachineLearningEndpointKeyRegenerateContent + Regression: AutoMLVerticalRegression + RegressionModels: AutoMLVerticalRegressionModel + RegressionPrimaryMetrics: AutoMLVerticalRegressionPrimaryMetric + RemoteLoginPortPublicAccess: MachineLearningRemoteLoginPortPublicAccess + ResourceName: MachineLearningResourceName + Route: MachineLearningInferenceContainerRoute + ScaleSettings: AmlComputeScaleSettings + ScheduleListViewType: MachineLearningScheduleListViewType + ScheduleProvisioningState: MachineLearningScheduleProvisioningState + ScheduleProvisioningStatus: MachineLearningScheduleProvisioningStatus + ScriptReference: MachineLearningScriptReference + ScriptsToExecute: MachineLearningScriptsToExecute + ServiceDataAccessAuthIdentity: MachineLearningServiceDataAccessAuthIdentity + ShortSeriesHandlingConfiguration: MachineLearningShortSeriesHandlingConfiguration + SkuCapacity: MachineLearningSkuCapacity + SkuScaleType: MachineLearningSkuScaleType + SkuResource: MachineLearningSkuDetail + SkuSetting: MachineLearningSkuSetting + SslConfigStatus: MachineLearningSslConfigStatus + StackEnsembleSettings: MachineLearningStackEnsembleSettings + StackMetaLearnerType: MachineLearningStackMetaLearnerType + Status: MachineLearningWorkspaceQuotaStatus + StorageAccountType: MachineLearningStorageAccountType + SweepJob: MachineLearningSweepJob + TrainingSettings: MachineLearningTrainingSettings + TrainingSettings.enableDnnTraining: IsDnnTrainingEnabled + TrainingSettings.enableModelExplainability: IsModelExplainabilityEnabled + TrainingSettings.enableOnnxCompatibleModels: IsOnnxCompatibleModelsEnabled + TrainingSettings.enableStackEnsemble: IsStackEnsembleEnabled + TrainingSettings.enableVoteEnsemble: IsVoteEnsembleEnabled + UnderlyingResourceAction: MachineLearningUnderlyingResourceAction + UriFileDataVersion: MachineLearningUriFileDataVersion + UriFolderDataVersion: MachineLearningUriFolderDataVersion + UsageName: MachineLearningUsageName + UsageUnit: MachineLearningUsageUnit + UserAccountCredentials: MachineLearningUserAccountCredentials + UseStl: MachineLearningUseStl + ValueFormat: MachineLearningValueFormat + VirtualMachineSshCredentials: MachineLearningVmSshCredentials + VmPriority: MachineLearningVmPriority + WorkspaceConnectionUsernamePassword: MachineLearningWorkspaceConnectionUsernamePassword + Workspace.properties.hbiWorkspace: IsHbiWorkspace + Workspace.properties.publicNetworkAccess: PublicNetworkAccessType + WorkspaceUpdateParameters.properties.publicNetworkAccess: PublicNetworkAccessType + AllocationState: MachineLearningAllocationState + FeatureResource: MachineLearningFeatureResource + ResourceId.id: -|arm-id + JobBase.componentId: -|arm-id + JobBase.computeId: -|arm-id + CommandJob.environmentId: -|arm-id + EndpointComputeType.AzureMLCompute: AmlCompute + OutputPathAssetReference.jobId: -|arm-id + PipelineJob.sourceJobId: -|arm-id + VirtualMachineSize.premiumIO: IsPremiumIOSupported + AmlComputeNodeInformation.privateIpAddress: -|ip-address + AmlComputeNodeInformation.publicIpAddress: -|ip-address + CommandJob.codeId: -|arm-id + CodeConfiguration.codeId: -|arm-id + HDInsightProperties.address: -|ip-address + VirtualMachineSchemaProperties.address: -|ip-address + TrialComponent: MachineLearningTrialComponent + TrialComponent.codeId: -|arm-id + TrialComponent.environmentId: -|arm-id + Forecasting: MachineLearningForecasting + EndpointAuthToken.expiryTimeUtc: ExpireOn|unixtime # this temporarily does not work + EndpointAuthToken.refreshAfterTimeUtc: RefreshOn|unixtime # this temporarily does not work + SystemCreatedAcrAccount.armResourceId: ArmResourceIdentifier|arm-id + SystemCreatedStorageAccount.armResourceId: ArmResourceIdentifier|arm-id + UserCreatedAcrAccount.armResourceId: ArmResourceIdentifier|arm-id + UserCreatedStorageAccount.armResourceId: ArmResourceIdentifier|arm-id + Cron: ComputeStartStopCronSchedule + Recurrence: ComputeStartStopRecurrenceSchedule + EndpointServiceConnectionStatus: MachineLearningPrivateEndpointServiceConnectionStatus + ArmResourceId.resourceId: -|arm-id + Workspace.properties.hubResourceId: -|arm-id + OutboundRuleBasicResource: MachineLearningOutboundRuleBasic + OutboundRule: MachineLearningOutboundRule + BindOptions: MountBindOptions + BindOptions.createHostPath: DoesCreateHostPath + AcrDetails: RegistryAcrDetails + AllNodes: JobAllNodes + Nodes: JobNodes + AssetProvisioningState: RegistryAssetProvisioningState + BaseEnvironmentId: BaseEnvironmentType + BaseEnvironmentId.resourceId: -|arm-id + BlobReferenceForConsumptionDto.storageAccountArmId: -|arm-id + Collection: DataCollectionConfiguration + Docker: DockerSetting + Endpoint: ContainerEndpoint + Protocol: ContainerCommunicationProtocol + Image: ImageSetting + ConnectionCategory.AzureSqlDb: AzureSqlDB + ConnectionCategory.AzureMySqlDb: AzureMySqlDB + ConnectionCategory.AzurePostgresDb: AzurePostgresDB + EncryptionProperty.cosmosDbResourceId: CosmosDBResourceId|arm-id + EncryptionProperty.searchAccountResourceId: -|arm-id + EncryptionProperty.storageAccountResourceId: -|arm-id + MLAssistConfiguration: MachineLearningAssistConfiguration + MLAssistConfigurationEnabled: MachineLearningAssistEnabledConfiguration + MlflowAutologger: MachineLearningFlowAutoLogger + MLFlowAutologgerState: MachineLearningFlowAutoLoggerState + MultiSelect: LabelCategoryMultiSelect + PackageRequest: ModelPackageContent + PackageResponse: ModelPackageResult + PackageInputPathId.resourceId: -|arm-id + PrivateEndpointResource: RegistryPrivateEndpoint + PrivateEndpointResource.subnetArmId: -|arm-id + PrivateEndpoint: PrivateEndpointBase + PrivateEndpoint.id: -|arm-id + QueueSettings: JobQueueSettings + Ray: RayDistributionConfiguration + RegistryPrivateEndpointConnection.id: -|arm-id + RuleAction: NetworkingRuleAction + RuleCategory: OutboundRuleCategory + RuleStatus: OutboundRuleStatus + RuleType: OutboundRuleType + StatusMessage: JobStatusMessage + StatusMessageLevel: JobStatusMessageLevel + ImageType.azureml: AzureML + ProtectionLevel: IntellectualProtectionLevel + +directive: + - from: swagger-document + where: $.definitions.EndpointAuthToken.properties + transform: > + $["expiryTimeUtc"].format = "unixtime"; + $["refreshAfterTimeUtc"].format = "unixtime"; + - from: swagger-document + where: $.definitions.ComputeNodesInformation.properties + transform: delete $.nextLink; + reason: Duplicated "nextLink" property defined in schema 'AmlComputeNodesInformation' and 'ComputeNodesInformation' + - from: swagger-document + where: $.definitions.Compute.properties.provisioningErrors + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlCompute.allOf[?(@.type=="object")].properties.properties.properties.subnet + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlCompute.allOf[?(@.type=="object")].properties.properties.properties.errors + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlCompute.allOf[?(@.type=="object")].properties.properties.properties.virtualMachineImage + transform: $["x-nullable"] = true; + #BUG: Patch does not return scaledown time PATCH + - from: swagger-document + where: $.definitions.ScaleSettings.properties.nodeIdleTimeBeforeScaleDown + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlCompute.allOf[?(@.type=="object")].properties.properties.properties.currentNodeCount + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.VirtualMachineSchema.properties.properties.properties.administratorAccount + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlCompute.allOf[?(@.type=="object")].properties.properties.properties.targetNodeCount + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlCompute.allOf[?(@.type=="object")].properties.properties.properties.nodeStateCounts + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlCompute.allOf[?(@.type=="object")].properties.properties.properties.allocationState + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.EnvironmentContainerResource.properties.systemData + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.DatastoreProperties.properties.properties + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.ComputeInstance.allOf[?(@.type=="object")].properties.properties.properties.setupScripts + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlComputeProperties.properties.errors + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlComputeProperties.properties.virtualMachineImage + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.TableVerticalValidationDataSettings.properties.cvSplitColumnNames + transform: $["x-nullable"] = true; + - from: workspaceRP.json + where: $.definitions + transform: > + $.PrivateLinkResourceProperties.properties.groupId.readOnly = true; + $.PrivateLinkResourceProperties.properties.requiredMembers.readOnly = true; + # quite a few x-ms-client-name extensions are defined in the swagger, we here erase them all to prevent some funny interactions between our own renaming configuration + - from: mfe.json + where: $.definitions + transform: > + $.CodeContainerResource["x-ms-client-name"] = undefined; + $.CodeContainer["x-ms-client-name"] = undefined; + $.BatchDeploymentTrackedResource["x-ms-client-name"] = undefined; + $.BatchDeployment["x-ms-client-name"] = undefined; + $.BatchEndpointTrackedResource["x-ms-client-name"] = undefined; + $.BatchEndpoint["x-ms-client-name"] = undefined; + $.CodeVersionResource["x-ms-client-name"] = undefined; + $.CodeVersion["x-ms-client-name"] = undefined; + $.ComponentContainerResource["x-ms-client-name"] = undefined; + $.ComponentContainer["x-ms-client-name"] = undefined; + $.ComponentVersionResource["x-ms-client-name"] = undefined; + $.ComponentVersion["x-ms-client-name"] = undefined; + $.DataContainerResource["x-ms-client-name"] = undefined; + $.DataContainer["x-ms-client-name"] = undefined; + $.DatastoreResource["x-ms-client-name"] = undefined; + $.Datastore["x-ms-client-name"] = undefined; + $.DataVersionBaseResource["x-ms-client-name"] = undefined; + $.DataVersionBase["x-ms-client-name"] = undefined; + $.EnvironmentContainerResource["x-ms-client-name"] = undefined; + $.EnvironmentContainer["x-ms-client-name"] = undefined; + $.EnvironmentVersionResource["x-ms-client-name"] = undefined; + $.EnvironmentVersion["x-ms-client-name"] = undefined; + $.JobBaseResource["x-ms-client-name"] = undefined; + $.JobBase["x-ms-client-name"] = undefined; + $.ModelContainerResource["x-ms-client-name"] = undefined; + $.ModelContainer["x-ms-client-name"] = undefined; + $.ModelVersionResource["x-ms-client-name"] = undefined; + $.ModelVersion["x-ms-client-name"] = undefined; + $.OnlineDeploymentTrackedResource["x-ms-client-name"] = undefined; + $.OnlineDeployment["x-ms-client-name"] = undefined; + $.OnlineEndpointTrackedResource["x-ms-client-name"] = undefined; + $.OnlineEndpoint["x-ms-client-name"] = undefined; +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/resources.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/resources.json new file mode 100644 index 0000000000..ee4d896607 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/resources.json @@ -0,0 +1,3472 @@ +{ + "Resources": { + "MachineLearningCompute": { + "Name": "MachineLearningCompute", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", + "Method": "GET", + "OperationID": "Compute_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use \u0027keys\u0027 nested resource to get them." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", + "Method": "PUT", + "OperationID": "Compute_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", + "Method": "PATCH", + "OperationID": "Compute_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", + "Method": "DELETE", + "OperationID": "Compute_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes specified Machine Learning compute." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes", + "Method": "GET", + "OperationID": "Compute_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets computes in specified workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "UpdateCustomServices", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/customServices", + "Method": "POST", + "OperationID": "Compute_UpdateCustomServices", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the custom services list. The list of custom services provided shall be overwritten" + }, + { + "Name": "GetNodes", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes", + "Method": "POST", + "OperationID": "Compute_ListNodes", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListNodes", + "NextPageMethod": "ListNodesNextPage", + "ItemName": "nodes", + "NextLinkName": "nextLink" + }, + "Description": "Get the details (e.g IP address, port etc) of all the compute nodes in the compute." + }, + { + "Name": "GetKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys", + "Method": "POST", + "OperationID": "Compute_ListKeys", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets secrets related to Machine Learning compute (storage keys, service credentials, etc)." + }, + { + "Name": "Start", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start", + "Method": "POST", + "OperationID": "Compute_Start", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Posts a start action to a compute instance" + }, + { + "Name": "Stop", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop", + "Method": "POST", + "OperationID": "Compute_Stop", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Posts a stop action to a compute instance" + }, + { + "Name": "Restart", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart", + "Method": "POST", + "OperationID": "Compute_Restart", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Posts a restart action to a compute instance" + }, + { + "Name": "UpdateIdleShutdownSetting", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/updateIdleShutdownSetting", + "Method": "POST", + "OperationID": "Compute_UpdateIdleShutdownSetting", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the idle shutdown setting of a compute instance." + } + ], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "ComputeResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/computes", + "ResourceKey": "computeName", + "ResourceKeySegment": "computes", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryCodeContainer": { + "Name": "MachineLearningRegistryCodeContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}", + "Method": "GET", + "OperationID": "RegistryCodeContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Code container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}", + "Method": "PUT", + "OperationID": "RegistryCodeContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update Code container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}", + "Method": "PUT", + "OperationID": "RegistryCodeContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update Code container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}", + "Method": "DELETE", + "OperationID": "RegistryCodeContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete Code container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes", + "Method": "GET", + "OperationID": "RegistryCodeContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningRegistry"], + "SwaggerModelName": "CodeContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/codes", + "ResourceKey": "codeName", + "ResourceKeySegment": "codes", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningCodeContainer": { + "Name": "MachineLearningCodeContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}", + "Method": "GET", + "OperationID": "CodeContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}", + "Method": "PUT", + "OperationID": "CodeContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}", + "Method": "PUT", + "OperationID": "CodeContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}", + "Method": "DELETE", + "OperationID": "CodeContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes", + "Method": "GET", + "OperationID": "CodeContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "CodeContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/codes", + "ResourceKey": "name", + "ResourceKeySegment": "codes", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryCodeVersion": { + "Name": "MachineLearningRegistryCodeVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}", + "Method": "GET", + "OperationID": "RegistryCodeVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryCodeVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryCodeVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}", + "Method": "DELETE", + "OperationID": "RegistryCodeVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions", + "Method": "GET", + "OperationID": "RegistryCodeVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "CreateOrGetStartPendingUpload", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}/startPendingUpload", + "Method": "POST", + "OperationID": "RegistryCodeVersions_CreateOrGetStartPendingUpload", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Generate a storage location and credential for the client to upload a code asset to." + } + ], + "Parents": ["MachineLearningRegistryCodeContainer"], + "SwaggerModelName": "CodeVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/codes/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningCodeVersion": { + "Name": "MachineLearningCodeVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}", + "Method": "GET", + "OperationID": "CodeVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "CodeVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "CodeVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "CodeVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions", + "Method": "GET", + "OperationID": "CodeVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "CreateOrGetStartPendingUpload", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/startPendingUpload", + "Method": "POST", + "OperationID": "CodeVersions_CreateOrGetStartPendingUpload", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Generate a storage location and credential for the client to upload a code asset to." + } + ], + "Parents": ["MachineLearningCodeContainer"], + "SwaggerModelName": "CodeVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/codes/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearninRegistryComponentContainer": { + "Name": "MachineLearninRegistryComponentContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}", + "Method": "GET", + "OperationID": "RegistryComponentContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}", + "Method": "PUT", + "OperationID": "RegistryComponentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}", + "Method": "PUT", + "OperationID": "RegistryComponentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}", + "Method": "DELETE", + "OperationID": "RegistryComponentContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components", + "Method": "GET", + "OperationID": "RegistryComponentContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningRegistry"], + "SwaggerModelName": "ComponentContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/components", + "ResourceKey": "componentName", + "ResourceKeySegment": "components", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningComponentContainer": { + "Name": "MachineLearningComponentContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}", + "Method": "GET", + "OperationID": "ComponentContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}", + "Method": "PUT", + "OperationID": "ComponentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}", + "Method": "PUT", + "OperationID": "ComponentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}", + "Method": "DELETE", + "OperationID": "ComponentContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components", + "Method": "GET", + "OperationID": "ComponentContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List component containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "ComponentContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/components", + "ResourceKey": "name", + "ResourceKeySegment": "components", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearninRegistryComponentVersion": { + "Name": "MachineLearninRegistryComponentVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}", + "Method": "GET", + "OperationID": "RegistryComponentVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryComponentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryComponentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}", + "Method": "DELETE", + "OperationID": "RegistryComponentVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions", + "Method": "GET", + "OperationID": "RegistryComponentVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearninRegistryComponentContainer"], + "SwaggerModelName": "ComponentVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/components/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningComponentVersion": { + "Name": "MachineLearningComponentVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}", + "Method": "GET", + "OperationID": "ComponentVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "ComponentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "ComponentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "ComponentVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions", + "Method": "GET", + "OperationID": "ComponentVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List component versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningComponentContainer"], + "SwaggerModelName": "ComponentVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/components/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryDataContainer": { + "Name": "MachineLearningRegistryDataContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}", + "Method": "GET", + "OperationID": "RegistryDataContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}", + "Method": "PUT", + "OperationID": "RegistryDataContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}", + "Method": "PUT", + "OperationID": "RegistryDataContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}", + "Method": "DELETE", + "OperationID": "RegistryDataContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data", + "Method": "GET", + "OperationID": "RegistryDataContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Data containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningRegistry"], + "SwaggerModelName": "DataContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/data", + "ResourceKey": "name", + "ResourceKeySegment": "data", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningDataContainer": { + "Name": "MachineLearningDataContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}", + "Method": "GET", + "OperationID": "DataContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}", + "Method": "PUT", + "OperationID": "DataContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}", + "Method": "PUT", + "OperationID": "DataContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}", + "Method": "DELETE", + "OperationID": "DataContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data", + "Method": "GET", + "OperationID": "DataContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List data containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "DataContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/data", + "ResourceKey": "name", + "ResourceKeySegment": "data", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryDataVersion": { + "Name": "MachineLearningRegistryDataVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}", + "Method": "GET", + "OperationID": "RegistryDataVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryDataVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryDataVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "RegistryDataVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions", + "Method": "GET", + "OperationID": "RegistryDataVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List data versions in the data container" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "CreateOrGetStartPendingUpload", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}/startPendingUpload", + "Method": "POST", + "OperationID": "RegistryDataVersions_CreateOrGetStartPendingUpload", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Generate a storage location and credential for the client to upload a data asset to." + } + ], + "Parents": ["MachineLearningRegistryDataContainer"], + "SwaggerModelName": "DataVersionBaseResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/data/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningDataVersion": { + "Name": "MachineLearningDataVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}", + "Method": "GET", + "OperationID": "DataVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "DataVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "DataVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "DataVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions", + "Method": "GET", + "OperationID": "DataVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List data versions in the data container" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningDataContainer"], + "SwaggerModelName": "DataVersionBaseResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/data/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryEnvironmentContainer": { + "Name": "MachineLearningRegistryEnvironmentContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}", + "Method": "GET", + "OperationID": "RegistryEnvironmentContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}", + "Method": "PUT", + "OperationID": "RegistryEnvironmentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}", + "Method": "PUT", + "OperationID": "RegistryEnvironmentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}", + "Method": "DELETE", + "OperationID": "RegistryEnvironmentContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments", + "Method": "GET", + "OperationID": "RegistryEnvironmentContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List environment containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningRegistry"], + "SwaggerModelName": "EnvironmentContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/environments", + "ResourceKey": "environmentName", + "ResourceKeySegment": "environments", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningEnvironmentContainer": { + "Name": "MachineLearningEnvironmentContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}", + "Method": "GET", + "OperationID": "EnvironmentContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}", + "Method": "PUT", + "OperationID": "EnvironmentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}", + "Method": "PUT", + "OperationID": "EnvironmentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}", + "Method": "DELETE", + "OperationID": "EnvironmentContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments", + "Method": "GET", + "OperationID": "EnvironmentContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List environment containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "EnvironmentContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/environments", + "ResourceKey": "name", + "ResourceKeySegment": "environments", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryEnvironmentVersion": { + "Name": "MachineLearningRegistryEnvironmentVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}", + "Method": "GET", + "OperationID": "RegistryEnvironmentVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryEnvironmentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryEnvironmentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}", + "Method": "DELETE", + "OperationID": "RegistryEnvironmentVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions", + "Method": "GET", + "OperationID": "RegistryEnvironmentVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningRegistryEnvironmentContainer"], + "SwaggerModelName": "EnvironmentVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/environments/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningEnvironmentVersion": { + "Name": "MachineLearningEnvironmentVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}", + "Method": "GET", + "OperationID": "EnvironmentVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "EnvironmentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates an EnvironmentVersion." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "EnvironmentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates an EnvironmentVersion." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "EnvironmentVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions", + "Method": "GET", + "OperationID": "EnvironmentVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningEnvironmentContainer"], + "SwaggerModelName": "EnvironmentVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/environments/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryModelContainer": { + "Name": "MachineLearningRegistryModelContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}", + "Method": "GET", + "OperationID": "RegistryModelContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}", + "Method": "PUT", + "OperationID": "RegistryModelContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update model container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}", + "Method": "PUT", + "OperationID": "RegistryModelContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update model container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}", + "Method": "DELETE", + "OperationID": "RegistryModelContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models", + "Method": "GET", + "OperationID": "RegistryModelContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List model containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningRegistry"], + "SwaggerModelName": "ModelContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/models", + "ResourceKey": "modelName", + "ResourceKeySegment": "models", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningModelContainer": { + "Name": "MachineLearningModelContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}", + "Method": "GET", + "OperationID": "ModelContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}", + "Method": "PUT", + "OperationID": "ModelContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}", + "Method": "PUT", + "OperationID": "ModelContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}", + "Method": "DELETE", + "OperationID": "ModelContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models", + "Method": "GET", + "OperationID": "ModelContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List model containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "ModelContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/models", + "ResourceKey": "name", + "ResourceKeySegment": "models", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryModelVersion": { + "Name": "MachineLearningRegistryModelVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}", + "Method": "GET", + "OperationID": "RegistryModelVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryModelVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryModelVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}", + "Method": "DELETE", + "OperationID": "RegistryModelVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions", + "Method": "GET", + "OperationID": "RegistryModelVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Package", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}/package", + "Method": "POST", + "OperationID": "RegistryModelVersions_Package", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Model Version Package operation." + }, + { + "Name": "CreateOrGetStartPendingUpload", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}/startPendingUpload", + "Method": "POST", + "OperationID": "RegistryModelVersions_CreateOrGetStartPendingUpload", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Generate a storage location and credential for the client to upload a model asset to." + } + ], + "Parents": ["MachineLearningRegistryModelContainer"], + "SwaggerModelName": "ModelVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/models/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningModelVersion": { + "Name": "MachineLearningModelVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}", + "Method": "GET", + "OperationID": "ModelVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "ModelVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "ModelVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "ModelVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions", + "Method": "GET", + "OperationID": "ModelVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List model versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Package", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/package", + "Method": "POST", + "OperationID": "ModelVersions_Package", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Model Version Package operation." + } + ], + "Parents": ["MachineLearningModelContainer"], + "SwaggerModelName": "ModelVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/models/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningBatchEndpoint": { + "Name": "MachineLearningBatchEndpoint", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}", + "Method": "GET", + "OperationID": "BatchEndpoints_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a batch inference endpoint by name." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}", + "Method": "PUT", + "OperationID": "BatchEndpoints_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a batch inference endpoint (asynchronous)." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}", + "Method": "PATCH", + "OperationID": "BatchEndpoints_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a batch inference endpoint (asynchronous)." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}", + "Method": "DELETE", + "OperationID": "BatchEndpoints_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete Batch Inference Endpoint (asynchronous)." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints", + "Method": "GET", + "OperationID": "BatchEndpoints_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists Batch inference endpoint in the workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/listkeys", + "Method": "POST", + "OperationID": "BatchEndpoints_ListKeys", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Lists batch Inference Endpoint keys." + } + ], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "BatchEndpointTrackedResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/batchEndpoints", + "ResourceKey": "endpointName", + "ResourceKeySegment": "batchEndpoints", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningBatchDeployment": { + "Name": "MachineLearningBatchDeployment", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "GET", + "OperationID": "BatchDeployments_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a batch inference deployment by id." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "PUT", + "OperationID": "BatchDeployments_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates/updates a batch inference deployment (asynchronous)." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "PATCH", + "OperationID": "BatchDeployments_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a batch inference deployment (asynchronous)." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "DELETE", + "OperationID": "BatchDeployments_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete Batch Inference deployment (asynchronous)." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments", + "Method": "GET", + "OperationID": "BatchDeployments_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists Batch inference deployments in the workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningBatchEndpoint"], + "SwaggerModelName": "BatchDeploymentTrackedResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/batchEndpoints/deployments", + "ResourceKey": "deploymentName", + "ResourceKeySegment": "deployments", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningDatastore": { + "Name": "MachineLearningDatastore", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}", + "Method": "GET", + "OperationID": "Datastores_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get datastore." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}", + "Method": "PUT", + "OperationID": "Datastores_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update datastore." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}", + "Method": "PUT", + "OperationID": "Datastores_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update datastore." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}", + "Method": "DELETE", + "OperationID": "Datastores_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete datastore." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores", + "Method": "GET", + "OperationID": "Datastores_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List datastores." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetSecrets", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets", + "Method": "POST", + "OperationID": "Datastores_ListSecrets", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get datastore secrets." + } + ], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "DatastoreResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/datastores", + "ResourceKey": "name", + "ResourceKeySegment": "datastores", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningFeatureSetContainer": { + "Name": "MachineLearningFeatureSetContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}", + "Method": "GET", + "OperationID": "FeaturesetContainers_GetEntity", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}", + "Method": "PUT", + "OperationID": "FeaturesetContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}", + "Method": "PUT", + "OperationID": "FeaturesetContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}", + "Method": "DELETE", + "OperationID": "FeaturesetContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets", + "Method": "GET", + "OperationID": "FeaturesetContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List featurestore entity containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "FeaturesetContainer", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/featuresets", + "ResourceKey": "name", + "ResourceKeySegment": "featuresets", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningFeature": { + "Name": "MachineLearningFeature", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName}", + "Method": "GET", + "OperationID": "Features_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get feature." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features", + "Method": "GET", + "OperationID": "Features_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Features." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningFeatureSetVersion"], + "SwaggerModelName": "Feature", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/featuresets/versions/features", + "ResourceKey": "featureName", + "ResourceKeySegment": "features", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningFeatureSetVersion": { + "Name": "MachineLearningFeatureSetVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}", + "Method": "GET", + "OperationID": "FeaturesetVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "FeaturesetVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "FeaturesetVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "FeaturesetVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions", + "Method": "GET", + "OperationID": "FeaturesetVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Backfill", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/backfill", + "Method": "POST", + "OperationID": "FeaturesetVersions_Backfill", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Backfill." + }, + { + "Name": "GetMaterializationJobs", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/listMaterializationJobs", + "Method": "POST", + "OperationID": "FeaturesetVersions_ListMaterializationJobs", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListMaterializationJobs", + "NextPageMethod": "ListMaterializationJobsNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List materialization Jobs." + } + ], + "Parents": ["MachineLearningFeatureSetContainer"], + "SwaggerModelName": "FeaturesetVersion", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/featuresets/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningFeatureStoreEntityContainer": { + "Name": "MachineLearningFeatureStoreEntityContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}", + "Method": "GET", + "OperationID": "FeaturestoreEntityContainers_GetEntity", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}", + "Method": "PUT", + "OperationID": "FeaturestoreEntityContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}", + "Method": "PUT", + "OperationID": "FeaturestoreEntityContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}", + "Method": "DELETE", + "OperationID": "FeaturestoreEntityContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities", + "Method": "GET", + "OperationID": "FeaturestoreEntityContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List featurestore entity containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "FeaturestoreEntityContainer", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/featurestoreEntities", + "ResourceKey": "name", + "ResourceKeySegment": "featurestoreEntities", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningFeaturestoreEntityVersion": { + "Name": "MachineLearningFeaturestoreEntityVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}", + "Method": "GET", + "OperationID": "FeaturestoreEntityVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "FeaturestoreEntityVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "FeaturestoreEntityVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "FeaturestoreEntityVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions", + "Method": "GET", + "OperationID": "FeaturestoreEntityVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningFeatureStoreEntityContainer"], + "SwaggerModelName": "FeaturestoreEntityVersion", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/featurestoreEntities/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningJob": { + "Name": "MachineLearningJob", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}", + "Method": "GET", + "OperationID": "Jobs_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a Job by name/id." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}", + "Method": "PUT", + "OperationID": "Jobs_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates and executes a Job." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}", + "Method": "PATCH", + "OperationID": "Jobs_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a Job." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}", + "Method": "DELETE", + "OperationID": "Jobs_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a Job (asynchronous)." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs", + "Method": "GET", + "OperationID": "Jobs_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists Jobs in the workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Cancel", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel", + "Method": "POST", + "OperationID": "Jobs_Cancel", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Cancels a Job (asynchronous)." + } + ], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "JobBaseResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/jobs", + "ResourceKey": "id", + "ResourceKeySegment": "jobs", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningLabelingJob": { + "Name": "MachineLearningLabelingJob", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}", + "Method": "GET", + "OperationID": "LabelingJobs_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a labeling job by name/id." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}", + "Method": "PUT", + "OperationID": "LabelingJobs_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a labeling job (asynchronous)." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}", + "Method": "PUT", + "OperationID": "LabelingJobs_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a labeling job (asynchronous)." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}", + "Method": "DELETE", + "OperationID": "LabelingJobs_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a labeling job." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs", + "Method": "GET", + "OperationID": "LabelingJobs_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists labeling jobs in the workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "ExportLabels", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/exportLabels", + "Method": "POST", + "OperationID": "LabelingJobs_ExportLabels", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Export labels from a labeling job (asynchronous)." + }, + { + "Name": "Pause", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/pause", + "Method": "POST", + "OperationID": "LabelingJobs_Pause", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Pause a labeling job." + }, + { + "Name": "Resume", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/resume", + "Method": "POST", + "OperationID": "LabelingJobs_Resume", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Resume a labeling job (asynchronous)." + } + ], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "LabelingJob", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/labelingJobs", + "ResourceKey": "id", + "ResourceKeySegment": "labelingJobs", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningOnlineEndpoint": { + "Name": "MachineLearningOnlineEndpoint", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}", + "Method": "GET", + "OperationID": "OnlineEndpoints_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Online Endpoint." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}", + "Method": "PUT", + "OperationID": "OnlineEndpoints_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update Online Endpoint (asynchronous)." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}", + "Method": "PATCH", + "OperationID": "OnlineEndpoints_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update Online Endpoint (asynchronous)." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}", + "Method": "DELETE", + "OperationID": "OnlineEndpoints_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete Online Endpoint (asynchronous)." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints", + "Method": "GET", + "OperationID": "OnlineEndpoints_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Online Endpoints." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/listKeys", + "Method": "POST", + "OperationID": "OnlineEndpoints_ListKeys", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "List EndpointAuthKeys for an Endpoint using Key-based authentication." + }, + { + "Name": "RegenerateKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys", + "Method": "POST", + "OperationID": "OnlineEndpoints_RegenerateKeys", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous)." + }, + { + "Name": "GetToken", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token", + "Method": "POST", + "OperationID": "OnlineEndpoints_GetToken", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieve a valid AML token for an Endpoint using AMLToken-based authentication." + } + ], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "OnlineEndpointTrackedResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/onlineEndpoints", + "ResourceKey": "endpointName", + "ResourceKeySegment": "onlineEndpoints", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningOnlineDeployment": { + "Name": "MachineLearningOnlineDeployment", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "GET", + "OperationID": "OnlineDeployments_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Inference Deployment Deployment." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "PUT", + "OperationID": "OnlineDeployments_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update Inference Endpoint Deployment (asynchronous)." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "PATCH", + "OperationID": "OnlineDeployments_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update Online Deployment (asynchronous)." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "DELETE", + "OperationID": "OnlineDeployments_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete Inference Endpoint Deployment (asynchronous)." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments", + "Method": "GET", + "OperationID": "OnlineDeployments_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Inference Endpoint Deployments." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetLogs", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/getLogs", + "Method": "POST", + "OperationID": "OnlineDeployments_GetLogs", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Polls an Endpoint operation." + }, + { + "Name": "GetSkus", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus", + "Method": "GET", + "OperationID": "OnlineDeployments_ListSkus", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListSkus", + "NextPageMethod": "ListSkusNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Inference Endpoint Deployment Skus." + } + ], + "Parents": ["MachineLearningOnlineEndpoint"], + "SwaggerModelName": "OnlineDeploymentTrackedResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/onlineEndpoints/deployments", + "ResourceKey": "deploymentName", + "ResourceKeySegment": "deployments", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningSchedule": { + "Name": "MachineLearningSchedule", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}", + "Method": "GET", + "OperationID": "Schedules_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get schedule." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}", + "Method": "PUT", + "OperationID": "Schedules_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update schedule." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}", + "Method": "PUT", + "OperationID": "Schedules_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update schedule." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}", + "Method": "DELETE", + "OperationID": "Schedules_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete schedule." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules", + "Method": "GET", + "OperationID": "Schedules_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List schedules in specified workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "Schedule", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/schedules", + "ResourceKey": "name", + "ResourceKeySegment": "schedules", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistry": { + "Name": "MachineLearningRegistry", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}", + "Method": "GET", + "OperationID": "Registries_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get registry" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}", + "Method": "PUT", + "OperationID": "Registries_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update registry" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}", + "Method": "PATCH", + "OperationID": "Registries_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update tags" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}", + "Method": "DELETE", + "OperationID": "Registries_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete registry" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries", + "Method": "GET", + "OperationID": "Registries_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List registries" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetMachineLearningRegistries", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/registries", + "Method": "GET", + "OperationID": "Registries_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List registries by subscription" + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "RemoveRegions", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/removeRegions", + "Method": "POST", + "OperationID": "Registries_RemoveRegions", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Remove regions from registry" + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "Registry", + "ResourceType": "Microsoft.MachineLearningServices/registries", + "ResourceKey": "registryName", + "ResourceKeySegment": "registries", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningWorkspace": { + "Name": "MachineLearningWorkspace", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", + "Method": "GET", + "OperationID": "Workspaces_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the properties of the specified machine learning workspace." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", + "Method": "PUT", + "OperationID": "Workspaces_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a workspace with the specified parameters." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", + "Method": "PATCH", + "OperationID": "Workspaces_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates a machine learning workspace with the specified parameters." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", + "Method": "DELETE", + "OperationID": "Workspaces_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a machine learning workspace." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces", + "Method": "GET", + "OperationID": "Workspaces_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all the available machine learning workspaces under the specified resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetMachineLearningWorkspaces", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces", + "Method": "GET", + "OperationID": "Workspaces_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all the available machine learning workspaces under the specified subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetWorkspaceFeatures", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features", + "Method": "GET", + "OperationID": "WorkspaceFeatures_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all enabled features for a workspace" + }, + { + "Name": "Diagnose", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose", + "Method": "POST", + "OperationID": "Workspaces_Diagnose", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Diagnose workspace setup issue." + }, + { + "Name": "GetKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys", + "Method": "POST", + "OperationID": "Workspaces_ListKeys", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry." + }, + { + "Name": "GetNotebookAccessToken", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken", + "Method": "POST", + "OperationID": "Workspaces_ListNotebookAccessToken", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Azure Machine Learning Workspace notebook access token" + }, + { + "Name": "GetNotebookKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys", + "Method": "POST", + "OperationID": "Workspaces_ListNotebookKeys", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Lists keys of Azure Machine Learning Workspaces notebook." + }, + { + "Name": "GetStorageAccountKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys", + "Method": "POST", + "OperationID": "Workspaces_ListStorageAccountKeys", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Lists keys of Azure Machine Learning Workspace\u0027s storage account." + }, + { + "Name": "GetOutboundNetworkDependenciesEndpoints", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints", + "Method": "GET", + "OperationID": "Workspaces_ListOutboundNetworkDependenciesEndpoints", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListOutboundNetworkDependenciesEndpoints", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically." + }, + { + "Name": "PrepareNotebook", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook", + "Method": "POST", + "OperationID": "Workspaces_PrepareNotebook", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Prepare Azure Machine Learning Workspace\u0027s notebook resource" + }, + { + "Name": "ResyncKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys", + "Method": "POST", + "OperationID": "Workspaces_ResyncKeys", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and password for container registry" + }, + { + "Name": "GetPrivateLinkResources", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources", + "Method": "GET", + "OperationID": "PrivateLinkResources_List", + "IsLongRunning": false, + "PagingMetadata": { "Method": "List", "NextPageMethod": null, "ItemName": "value", "NextLinkName": null }, + "Description": "Called by Client (Portal, CLI, etc) to get available \u0022private link resources\u0022 for the workspace.\r\nEach \u0022private link resource\u0022 is a connection endpoint (IP address) to the resource.\r\nPre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution.\r\nOther RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc.\r\nDefined in the \u0022[NRP] Private Endpoint Design\u0022 doc, topic \u0022GET API for GroupIds\u0022." + }, + { + "Name": "ProvisionManagedNetworkManagedNetworkProvision", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/provisionManagedNetwork", + "Method": "POST", + "OperationID": "ManagedNetworkProvisions_ProvisionManagedNetwork", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Provisions the managed network of a machine learning workspace." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "Workspace", + "ResourceType": "Microsoft.MachineLearningServices/workspaces", + "ResourceKey": "workspaceName", + "ResourceKeySegment": "workspaces", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningWorkspaceConnection": { + "Name": "MachineLearningWorkspaceConnection", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}", + "Method": "GET", + "OperationID": "WorkspaceConnections_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Lists machine learning workspaces connections by name." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}", + "Method": "PUT", + "OperationID": "WorkspaceConnections_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update machine learning workspaces connections under the specified workspace." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}", + "Method": "PATCH", + "OperationID": "WorkspaceConnections_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update machine learning workspaces connections under the specified workspace." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}", + "Method": "DELETE", + "OperationID": "WorkspaceConnections_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete machine learning workspaces connections by name." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections", + "Method": "GET", + "OperationID": "WorkspaceConnections_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all the available machine learning workspaces connections under the specified workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetSecrets", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/listsecrets", + "Method": "POST", + "OperationID": "WorkspaceConnections_ListSecrets", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "List all the secrets of a machine learning workspaces connections." + } + ], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "WorkspaceConnectionPropertiesV2BasicResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/connections", + "ResourceKey": "connectionName", + "ResourceKeySegment": "connections", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningOutboundRuleBasic": { + "Name": "MachineLearningOutboundRuleBasic", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}", + "Method": "GET", + "OperationID": "ManagedNetworkSettingsRule_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets an outbound rule from the managed network of a machine learning workspace." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}", + "Method": "PUT", + "OperationID": "ManagedNetworkSettingsRule_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates an outbound rule in the managed network of a machine learning workspace." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}", + "Method": "PUT", + "OperationID": "ManagedNetworkSettingsRule_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates an outbound rule in the managed network of a machine learning workspace." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}", + "Method": "DELETE", + "OperationID": "ManagedNetworkSettingsRule_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes an outbound rule from the managed network of a machine learning workspace." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules", + "Method": "GET", + "OperationID": "ManagedNetworkSettingsRule_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the managed network outbound rules for a machine learning workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "OutboundRuleBasicResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/outboundRules", + "ResourceKey": "ruleName", + "ResourceKeySegment": "outboundRules", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningPrivateEndpointConnection": { + "Name": "MachineLearningPrivateEndpointConnection", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "GET", + "OperationID": "PrivateEndpointConnections_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Called by end-users to get a PE connection." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "PUT", + "OperationID": "PrivateEndpointConnections_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Called by end-users to approve or reject a PE connection.\r\nThis method must validate and forward the call to NRP." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "PUT", + "OperationID": "PrivateEndpointConnections_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Called by end-users to approve or reject a PE connection.\r\nThis method must validate and forward the call to NRP." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "DELETE", + "OperationID": "PrivateEndpointConnections_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Called by end-users to delete a PE connection." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections", + "Method": "GET", + "OperationID": "PrivateEndpointConnections_List", + "IsLongRunning": false, + "PagingMetadata": { "Method": "List", "NextPageMethod": null, "ItemName": "value", "NextLinkName": null }, + "Description": "Called by end-users to get all PE connections." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "PrivateEndpointConnection", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/privateEndpointConnections", + "ResourceKey": "privateEndpointConnectionName", + "ResourceKeySegment": "privateEndpointConnections", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp new file mode 100644 index 0000000000..3a172ce406 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp @@ -0,0 +1,79 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./BatchEndpointTrackedResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; + +@parentResource(BatchEndpointTrackedResource) +model BatchDeploymentTrackedResource is TrackedResource { + @doc("The identifier for the Batch deployments.") + @path + @key("deploymentName") + @segment("deployments") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourceKind; +} + +@armResourceOperations +interface BatchDeploymentTrackedResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets a batch inference deployment by id.") + @operationId("BatchDeployments_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Creates/updates a batch inference deployment (asynchronous).") + @operationId("BatchDeployments_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Update a batch inference deployment (asynchronous).") + @operationId("BatchDeployments_Update") + update is ArmCustomPatchAsync< + BatchDeploymentTrackedResource, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete Batch Inference deployment (asynchronous).") + @operationId("BatchDeployments_Delete") + delete is ArmResourceDeleteAsync< + BatchDeploymentTrackedResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists Batch inference deployments in the workspace.") + @operationId("BatchDeployments_List") + list is ArmResourceListByParent< + BatchDeploymentTrackedResource, + { + ...BaseParameters; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Top of list.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp new file mode 100644 index 0000000000..423f98e30b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp @@ -0,0 +1,84 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; + +@parentResource(Workspace) +model BatchEndpointTrackedResource is TrackedResource { + @doc("Name for the Batch Endpoint.") + @path + @key("endpointName") + @segment("batchEndpoints") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourceKind; +} + +@armResourceOperations +interface BatchEndpointTrackedResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets a batch inference endpoint by name.") + @operationId("BatchEndpoints_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Creates a batch inference endpoint (asynchronous).") + @operationId("BatchEndpoints_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Update a batch inference endpoint (asynchronous).") + @operationId("BatchEndpoints_Update") + update is ArmCustomPatchAsync< + BatchEndpointTrackedResource, + PartialMinimalTrackedResourceWithIdentity + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete Batch Inference Endpoint (asynchronous).") + @operationId("BatchEndpoints_Delete") + delete is ArmResourceDeleteAsync< + BatchEndpointTrackedResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists Batch inference endpoint in the workspace.") + @operationId("BatchEndpoints_List") + list is ArmResourceListByParent< + BatchEndpointTrackedResource, + { + ...BaseParameters; + + @doc("Number of endpoints to be retrieved in a page of results.") + @query("count") + count?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists batch Inference Endpoint keys.") + @operationId("BatchEndpoints_ListKeys") + listKeys is ArmResourceActionSync< + BatchEndpointTrackedResource, + void, + EndpointAuthKeys + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp new file mode 100644 index 0000000000..d08bf377ef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp @@ -0,0 +1,60 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Registry.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Registry) +model CodeContainerResource is ProxyResource { + @doc("Container name.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + @key("codeName") + @segment("codes") + name: string; +} + +@armResourceOperations +interface CodeContainerResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get Code container.") + @operationId("RegistryCodeContainers_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update Code container.") + @operationId("RegistryCodeContainers_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete Code container.") + @operationId("RegistryCodeContainers_Delete") + delete is ArmResourceDeleteAsync< + CodeContainerResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List containers.") + @operationId("RegistryCodeContainers_List") + list is ArmResourceListByParent< + CodeContainerResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp new file mode 100644 index 0000000000..fa1245c953 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp @@ -0,0 +1,76 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./CodeContainerResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(CodeContainerResource) +model CodeVersionResource is ProxyResource { + @doc("Version identifier.") + @path + @key("version") + @segment("versions") + name: string; +} + +@armResourceOperations +interface CodeVersionResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get version.") + @operationId("RegistryCodeVersions_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update version.") + @operationId("RegistryCodeVersions_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete version.") + @operationId("RegistryCodeVersions_Delete") + delete is ArmResourceDeleteAsync< + CodeVersionResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List versions.") + @operationId("RegistryCodeVersions_List") + list is ArmResourceListByParent< + CodeVersionResource, + { + ...BaseParameters; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Generate a storage location and credential for the client to upload a code asset to.") + @operationId("RegistryCodeVersions_CreateOrGetStartPendingUpload") + createOrGetStartPendingUpload is ArmResourceActionSync< + CodeVersionResource, + PendingUploadRequestDto, + PendingUploadResponseDto + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp new file mode 100644 index 0000000000..36164c6aec --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp @@ -0,0 +1,60 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Registry.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Registry) +model ComponentContainerResource is ProxyResource { + @doc("Container name.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + @key("componentName") + @segment("components") + name: string; +} + +@armResourceOperations +interface ComponentContainerResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get container.") + @operationId("RegistryComponentContainers_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update container.") + @operationId("RegistryComponentContainers_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete container.") + @operationId("RegistryComponentContainers_Delete") + delete is ArmResourceDeleteAsync< + ComponentContainerResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List containers.") + @operationId("RegistryComponentContainers_List") + list is ArmResourceListByParent< + ComponentContainerResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp new file mode 100644 index 0000000000..a96638c436 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp @@ -0,0 +1,71 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ComponentContainerResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(ComponentContainerResource) +model ComponentVersionResource is ProxyResource { + @doc("Version identifier.") + @path + @key("version") + @segment("versions") + name: string; +} + +@armResourceOperations +interface ComponentVersionResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get version.") + @operationId("RegistryComponentVersions_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update version.") + @operationId("RegistryComponentVersions_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete version.") + @operationId("RegistryComponentVersions_Delete") + delete is ArmResourceDeleteAsync< + ComponentVersionResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List versions.") + @operationId("RegistryComponentVersions_List") + list is ArmResourceListByParent< + ComponentVersionResource, + { + ...BaseParameters; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Component stage.") + @query("stage") + stage?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp new file mode 100644 index 0000000000..389dc49412 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp @@ -0,0 +1,120 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +// FIXME: ComputeResource has no properties property +@doc("Machine Learning compute object wrapped into ARM resource envelope.") +@parentResource(Workspace) +model ComputeResource is TrackedResource<{}> { + @doc("Name of the Azure Machine Learning compute.") + @path + @key("computeName") + @segment("computes") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; +} + +@armResourceOperations +interface ComputeResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them.") + @operationId("Compute_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet.") + @operationId("Compute_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation.") + @operationId("Compute_Update") + update is ArmCustomPatchAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Deletes specified Machine Learning compute.") + @operationId("Compute_Delete") + delete is ArmResourceDeleteAsync< + ComputeResource, + { + ...BaseParameters; + + @doc("Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'.") + @query("underlyingResourceAction") + underlyingResourceAction: UnderlyingResourceAction; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets computes in specified workspace.") + @operationId("Compute_List") + list is ArmResourceListByParent< + ComputeResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Updates the custom services list. The list of custom services provided shall be overwritten") + @operationId("Compute_UpdateCustomServices") + updateCustomServices is ArmResourceActionSync< + ComputeResource, + CustomService[], + void + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get the details (e.g IP address, port etc) of all the compute nodes in the compute.") + @operationId("Compute_ListNodes") + listNodes is ArmResourceActionSync< + ComputeResource, + void, + AmlComputeNodesInformation + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets secrets related to Machine Learning compute (storage keys, service credentials, etc).") + @operationId("Compute_ListKeys") + listKeys is ArmResourceActionSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Posts a start action to a compute instance") + @operationId("Compute_Start") + start is ArmResourceActionNoResponseContentAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Posts a stop action to a compute instance") + @operationId("Compute_Stop") + stop is ArmResourceActionNoResponseContentAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Posts a restart action to a compute instance") + @operationId("Compute_Restart") + restart is ArmResourceActionNoResponseContentAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Updates the idle shutdown setting of a compute instance.") + @operationId("Compute_UpdateIdleShutdownSetting") + updateIdleShutdownSetting is ArmResourceActionSync< + ComputeResource, + IdleShutdownSetting, + void + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp new file mode 100644 index 0000000000..7cad46b631 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp @@ -0,0 +1,63 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Registry.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Registry) +model DataContainerResource is ProxyResource { + @doc("Container name.") + @path + @key("name") + @segment("data") + name: string; +} + +@armResourceOperations +interface DataContainerResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get container.") + @operationId("RegistryDataContainers_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update container.") + @operationId("RegistryDataContainers_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete container.") + @operationId("RegistryDataContainers_Delete") + delete is ArmResourceDeleteAsync< + DataContainerResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List Data containers.") + @operationId("RegistryDataContainers_List") + list is ArmResourceListByParent< + DataContainerResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp new file mode 100644 index 0000000000..f5ea79aa59 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp @@ -0,0 +1,87 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DataContainerResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(DataContainerResource) +model DataVersionBaseResource is ProxyResource { + @doc("Version identifier.") + @path + @key("version") + @segment("versions") + name: string; +} + +@armResourceOperations +interface DataVersionBaseResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get version.") + @operationId("RegistryDataVersions_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update version.") + @operationId("RegistryDataVersions_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete version.") + @operationId("RegistryDataVersions_Delete") + delete is ArmResourceDeleteAsync< + DataVersionBaseResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List data versions in the data container") + @operationId("RegistryDataVersions_List") + list is ArmResourceListByParent< + DataVersionBaseResource, + { + ...BaseParameters; + + @doc("Please choose OrderBy value from ['createdtime', 'modifiedtime']") + @query("$orderBy") + $orderBy?: string; + + @doc(""" +Top count of results, top count cannot be greater than the page size. + If topCount > page size, results with be default page size count will be returned +""") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("$tags") + $tags?: string; + + @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Generate a storage location and credential for the client to upload a data asset to.") + @operationId("RegistryDataVersions_CreateOrGetStartPendingUpload") + createOrGetStartPendingUpload is ArmResourceActionSync< + DataVersionBaseResource, + PendingUploadRequestDto, + PendingUploadResponseDto + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp new file mode 100644 index 0000000000..a3d5623fc7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp @@ -0,0 +1,100 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Workspace) +model DatastoreResource is ProxyResource { + @doc("Datastore name.") + @path + @key("name") + @segment("datastores") + name: string; +} + +@armResourceOperations +interface DatastoreResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get datastore.") + @operationId("Datastores_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update datastore.") + @operationId("Datastores_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrReplaceSync< + DatastoreResource, + { + ...BaseParameters; + + @doc("Flag to skip validation.") + @query("skipValidation") + skipValidation?: boolean; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete datastore.") + @operationId("Datastores_Delete") + delete is ArmResourceDeleteSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List datastores.") + @operationId("Datastores_List") + list is ArmResourceListByParent< + DatastoreResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Maximum number of results to return.") + @query("count") + count?: int32 = 30; + + @doc("Filter down to the workspace default datastore.") + @query("isDefault") + isDefault?: boolean; + + @doc("Names of datastores to return.") + @query({ + name: "names", + format: "csv", + }) + names?: string[]; + + @doc("Text to search for in the datastore names.") + @query("searchText") + searchText?: string; + + @doc("Order by property (createdtime | modifiedtime | name).") + @query("orderBy") + orderBy?: string; + + @doc("Order by property in ascending order.") + @query("orderByAsc") + orderByAsc?: boolean; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get datastore secrets.") + @operationId("Datastores_ListSecrets") + listSecrets is ArmResourceActionSync< + DatastoreResource, + void, + DatastoreSecrets + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp new file mode 100644 index 0000000000..37466020e3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp @@ -0,0 +1,64 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Registry.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Registry) +model EnvironmentContainerResource is ProxyResource { + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + @key("environmentName") + @segment("environments") + name: string; +} + +@armResourceOperations +interface EnvironmentContainerResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get container.") + @operationId("RegistryEnvironmentContainers_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update container.") + @operationId("RegistryEnvironmentContainers_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete container.") + @operationId("RegistryEnvironmentContainers_Delete") + delete is ArmResourceDeleteAsync< + EnvironmentContainerResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List environment containers.") + @operationId("RegistryEnvironmentContainers_List") + list is ArmResourceListByParent< + EnvironmentContainerResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp new file mode 100644 index 0000000000..ce9e982412 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp @@ -0,0 +1,75 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./EnvironmentContainerResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(EnvironmentContainerResource) +model EnvironmentVersionResource is ProxyResource { + @doc("Version identifier. This is case-sensitive.") + @path + @key("version") + @segment("versions") + name: string; +} + +@armResourceOperations +interface EnvironmentVersionResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get version.") + @operationId("RegistryEnvironmentVersions_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update version.") + @operationId("RegistryEnvironmentVersions_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete version.") + @operationId("RegistryEnvironmentVersions_Delete") + delete is ArmResourceDeleteAsync< + EnvironmentVersionResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List versions.") + @operationId("RegistryEnvironmentVersions_List") + list is ArmResourceListByParent< + EnvironmentVersionResource, + { + ...BaseParameters; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("Stage for including/excluding (for example) archived entities. Takes priority over listViewType") + @query("stage") + stage?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp new file mode 100644 index 0000000000..17901e3e49 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp @@ -0,0 +1,50 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./FeaturesetVersion.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(FeaturesetVersion) +model Feature is ProxyResource { + @doc("Feature Name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + @key("featureName") + @segment("features") + name: string; +} + +@armResourceOperations +interface Features { + @doc("Get feature.") + get is ArmResourceRead; + + @doc("List Features.") + list is ArmResourceListByParent< + Feature, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("tags") + tags?: string; + + @doc("Description of the featureset.") + @query("description") + description?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp new file mode 100644 index 0000000000..b488344b90 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp @@ -0,0 +1,71 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Workspace) +model FeaturesetContainer is ProxyResource { + @doc("Container name. This is case-sensitive.") + @path + @key("name") + @segment("featuresets") + name: string; +} + +@armResourceOperations +interface FeaturesetContainers { + @doc("Get container.") + getEntity is ArmResourceRead; + + @doc("Create or update container.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + @doc("Delete container.") + delete is ArmResourceDeleteAsync< + FeaturesetContainer, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("List featurestore entity containers.") + list is ArmResourceListByParent< + FeaturesetContainer, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("tags") + tags?: string; + + @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("page size") + @query("pageSize") + pageSize?: int32 = 20; + + @doc("description for the feature set") + @query("description") + description?: string; + + @doc("createdBy user name") + @query("createdBy") + createdBy?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp new file mode 100644 index 0000000000..3d818c1811 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp @@ -0,0 +1,114 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./FeaturesetContainer.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(FeaturesetContainer) +model FeaturesetVersion is ProxyResource { + @doc("Version identifier. This is case-sensitive.") + @path + @key("version") + @segment("versions") + name: string; +} + +@armResourceOperations +interface FeaturesetVersions { + @doc("Get version.") + get is ArmResourceRead; + + @doc("Create or update version.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + @doc("Delete version.") + delete is ArmResourceDeleteAsync< + FeaturesetVersion, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("List versions.") + list is ArmResourceListByParent< + FeaturesetVersion, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("tags") + tags?: string; + + @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("page size") + @query("pageSize") + pageSize?: int32 = 20; + + @doc("name for the featureset version") + @query("versionName") + versionName?: string; + + @doc("description for the feature set version") + @query("description") + description?: string; + + @doc("createdBy user name") + @query("createdBy") + createdBy?: string; + + @doc("Specifies the featurestore stage") + @query("stage") + stage?: string; + } + >; + + @doc("Backfill.") + backfill is ArmResourceActionAsync< + FeaturesetVersion, + FeaturesetVersionBackfillRequest, + FeaturesetJob, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("List materialization Jobs.") + listMaterializationJobs is ArmResourceActionSync< + FeaturesetVersion, + void, + FeaturesetJobArmPaginatedResult, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("filters") + filters?: string; + + @doc("Start time of the feature window to filter materialization jobs.") + @query("featureWindowStart") + featureWindowStart?: string; + + @doc("End time of the feature window to filter materialization jobs.") + @query("featureWindowEnd") + featureWindowEnd?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp new file mode 100644 index 0000000000..d869cda01d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp @@ -0,0 +1,72 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Workspace) +model FeaturestoreEntityContainer + is ProxyResource { + @doc("Container name. This is case-sensitive.") + @path + @key("name") + @segment("featurestoreEntities") + name: string; +} + +@armResourceOperations +interface FeaturestoreEntityContainers { + @doc("Get container.") + getEntity is ArmResourceRead; + + @doc("Create or update container.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + @doc("Delete container.") + delete is ArmResourceDeleteAsync< + FeaturestoreEntityContainer, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("List featurestore entity containers.") + list is ArmResourceListByParent< + FeaturestoreEntityContainer, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("tags") + tags?: string; + + @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("page size") + @query("pageSize") + pageSize?: int32 = 20; + + @doc("description for the featurestore entity") + @query("description") + description?: string; + + @doc("createdBy user name") + @query("createdBy") + createdBy?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp new file mode 100644 index 0000000000..8f39a997a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp @@ -0,0 +1,80 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./FeaturestoreEntityContainer.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(FeaturestoreEntityContainer) +model FeaturestoreEntityVersion + is ProxyResource { + @doc("Version identifier. This is case-sensitive.") + @path + @key("version") + @segment("versions") + name: string; +} + +@armResourceOperations +interface FeaturestoreEntityVersions { + @doc("Get version.") + get is ArmResourceRead; + + @doc("Create or update version.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + @doc("Delete version.") + delete is ArmResourceDeleteAsync< + FeaturestoreEntityVersion, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("List versions.") + list is ArmResourceListByParent< + FeaturestoreEntityVersion, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("tags") + tags?: string; + + @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("page size") + @query("pageSize") + pageSize?: int32 = 20; + + @doc("name for the featurestore entity version") + @query("versionName") + versionName?: string; + + @doc("description for the feature entity version") + @query("description") + description?: string; + + @doc("createdBy user name") + @query("createdBy") + createdBy?: string; + + @doc("Specifies the featurestore stage") + @query("stage") + stage?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp new file mode 100644 index 0000000000..b049ad67b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp @@ -0,0 +1,99 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Workspace) +model JobBaseResource is ProxyResource { + @doc("The name and identifier for the Job. This is case-sensitive.") + @path + @key("id") + @segment("jobs") + name: string; +} + +@armResourceOperations +interface JobBaseResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets a Job by name/id.") + @operationId("Jobs_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Creates and executes a Job.") + @operationId("Jobs_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrReplaceSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Updates a Job.") + @operationId("Jobs_Update") + update is ArmCustomPatchSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Deletes a Job (asynchronous).") + @operationId("Jobs_Delete") + delete is ArmResourceDeleteAsync< + JobBaseResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists Jobs in the workspace.") + @operationId("Jobs_List") + list is ArmResourceListByParent< + JobBaseResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Type of job to be returned.") + @query("jobType") + jobType?: string; + + @doc("Jobs returned will have this tag key.") + @query("tag") + tag?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("Asset name the job's named output is registered with") + @query("assetName") + assetName?: string; + + @doc("Indicator whether the job is scheduled job.") + @query("scheduled") + scheduled?: boolean; + + @doc("The scheduled id for listing the job triggered from") + @query("scheduleId") + scheduleId?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Cancels a Job (asynchronous).") + @operationId("Jobs_Cancel") + cancel is ArmResourceActionAsync< + JobBaseResource, + void, + void, + BaseParameters, + ArmLroLocationHeader + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp new file mode 100644 index 0000000000..330a821ee4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp @@ -0,0 +1,85 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Workspace) +model LabelingJob is ProxyResource { + @doc("The name and identifier for the LabelingJob.") + @path + @key("id") + @segment("labelingJobs") + name: string; +} + +@armResourceOperations +interface LabelingJobs { + @doc("Gets a labeling job by name/id.") + get is ArmResourceRead< + LabelingJob, + { + ...BaseParameters; + + @doc("Boolean value to indicate whether to include JobInstructions in response.") + @query("includeJobInstructions") + includeJobInstructions?: boolean; + + @doc("Boolean value to indicate Whether to include LabelCategories in response.") + @query("includeLabelCategories") + includeLabelCategories?: boolean; + } + >; + + @doc("Creates or updates a labeling job (asynchronous).") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + @doc("Delete a labeling job.") + delete is ArmResourceDeleteSync; + + @doc("Lists labeling jobs in the workspace.") + list is ArmResourceListByParent< + LabelingJob, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Number of labeling jobs to return.") + @query("$top") + $top?: int32; + } + >; + + @doc("Export labels from a labeling job (asynchronous).") + exportLabels is ArmResourceActionAsync< + LabelingJob, + ExportSummary, + ExportSummary, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("Pause a labeling job.") + pause is ArmResourceActionSync; + + @doc("Resume a labeling job (asynchronous).") + resume is ArmResourceActionAsync< + LabelingJob, + void, + void, + BaseParameters, + ArmLroLocationHeader + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp new file mode 100644 index 0000000000..e0868af4cb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp @@ -0,0 +1,64 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Registry.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Registry) +model ModelContainerResource is ProxyResource { + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + @key("modelName") + @segment("models") + name: string; +} + +@armResourceOperations +interface ModelContainerResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get container.") + @operationId("RegistryModelContainers_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update model container.") + @operationId("RegistryModelContainers_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete container.") + @operationId("RegistryModelContainers_Delete") + delete is ArmResourceDeleteAsync< + ModelContainerResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List model containers.") + @operationId("RegistryModelContainers_List") + list is ArmResourceListByParent< + ModelContainerResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp new file mode 100644 index 0000000000..17d1d81392 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp @@ -0,0 +1,103 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ModelContainerResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(ModelContainerResource) +model ModelVersionResource is ProxyResource { + @doc("Version identifier. This is case-sensitive.") + @path + @key("version") + @segment("versions") + name: string; +} + +@armResourceOperations +interface ModelVersionResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get version.") + @operationId("RegistryModelVersions_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update version.") + @operationId("RegistryModelVersions_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete version.") + @operationId("RegistryModelVersions_Delete") + delete is ArmResourceDeleteAsync< + ModelVersionResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List versions.") + @operationId("RegistryModelVersions_List") + list is ArmResourceListByParent< + ModelVersionResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Model description.") + @query("description") + description?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("tags") + tags?: string; + + @doc("Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2") + @query("properties") + properties?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Model Version Package operation.") + @operationId("RegistryModelVersions_Package") + package is ArmResourceActionAsync< + ModelVersionResource, + PackageRequest, + PackageResponse, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Generate a storage location and credential for the client to upload a model asset to.") + @operationId("RegistryModelVersions_CreateOrGetStartPendingUpload") + createOrGetStartPendingUpload is ArmResourceActionSync< + ModelVersionResource, + PendingUploadRequestDto, + PendingUploadResponseDto + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp new file mode 100644 index 0000000000..b0ca858ce3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp @@ -0,0 +1,132 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./OnlineEndpointTrackedResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; + +@parentResource(OnlineEndpointTrackedResource) +model OnlineDeploymentTrackedResource is TrackedResource { + @doc("Inference Endpoint Deployment name.") + @path + @key("deploymentName") + @segment("deployments") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourceKind; +} + +@armResourceOperations +interface OnlineDeploymentTrackedResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get Inference Deployment Deployment.") + @operationId("OnlineDeployments_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update Inference Endpoint Deployment (asynchronous).") + @operationId("OnlineDeployments_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Update Online Deployment (asynchronous).") + @operationId("OnlineDeployments_Update") + update is ArmCustomPatchAsync< + OnlineDeploymentTrackedResource, + PartialMinimalTrackedResourceWithSku + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete Inference Endpoint Deployment (asynchronous).") + @operationId("OnlineDeployments_Delete") + delete is ArmResourceDeleteAsync< + OnlineDeploymentTrackedResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List Inference Endpoint Deployments.") + @operationId("OnlineDeployments_List") + list is ArmResourceListByParent< + OnlineDeploymentTrackedResource, + { + ...BaseParameters; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Top of list.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Polls an Endpoint operation.") + @operationId("OnlineDeployments_GetLogs") + getLogs is ArmResourceActionSync< + OnlineDeploymentTrackedResource, + DeploymentLogsRequest, + DeploymentLogs + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("OnlineDeployments_ListSkus") + @summary("List Inference Endpoint Deployment Skus.") + @doc("List Inference Endpoint Deployment Skus.") + // FIXME: OnlineDeployments_ListSkus could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus") + @get + ListSkus is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Inference endpoint name.") + @path + endpointName: string; + + @doc("Inference Endpoint Deployment name.") + @path + deploymentName: string; + + @doc("Number of Skus to be retrieved in a page of results.") + @query("count") + count?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + }, + SkuResourceArmPaginatedResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp new file mode 100644 index 0000000000..240759640a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp @@ -0,0 +1,124 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; + +@parentResource(Workspace) +model OnlineEndpointTrackedResource is TrackedResource { + @doc("Online Endpoint name.") + @path + @key("endpointName") + @segment("onlineEndpoints") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourceKind; +} + +@armResourceOperations +interface OnlineEndpointTrackedResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get Online Endpoint.") + @operationId("OnlineEndpoints_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update Online Endpoint (asynchronous).") + @operationId("OnlineEndpoints_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Update Online Endpoint (asynchronous).") + @operationId("OnlineEndpoints_Update") + update is ArmCustomPatchAsync< + OnlineEndpointTrackedResource, + PartialMinimalTrackedResourceWithIdentity + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete Online Endpoint (asynchronous).") + @operationId("OnlineEndpoints_Delete") + delete is ArmResourceDeleteAsync< + OnlineEndpointTrackedResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List Online Endpoints.") + @operationId("OnlineEndpoints_List") + list is ArmResourceListByParent< + OnlineEndpointTrackedResource, + { + ...BaseParameters; + + @doc("Name of the endpoint.") + @query("name") + name?: string; + + @doc("Number of endpoints to be retrieved in a page of results.") + @query("count") + count?: int32; + + @doc("EndpointComputeType to be filtered by.") + @query("computeType") + computeType?: EndpointComputeType; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("A set of tags with which to filter the returned models. It is a comma separated string of tags key or tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 .") + @query("tags") + tags?: string; + + @doc("A set of properties with which to filter the returned models. It is a comma separated string of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 .") + @query("properties") + properties?: string; + + @doc("The option to order the response.") + @query("orderBy") + orderBy?: OrderString; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List EndpointAuthKeys for an Endpoint using Key-based authentication.") + @operationId("OnlineEndpoints_ListKeys") + listKeys is ArmResourceActionSync< + OnlineEndpointTrackedResource, + void, + EndpointAuthKeys + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous).") + @operationId("OnlineEndpoints_RegenerateKeys") + regenerateKeys is ArmResourceActionAsync< + OnlineEndpointTrackedResource, + RegenerateEndpointKeysRequest, + void, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Retrieve a valid AML token for an Endpoint using AMLToken-based authentication.") + @operationId("OnlineEndpoints_GetToken") + getToken is ArmResourceActionSync< + OnlineEndpointTrackedResource, + void, + EndpointAuthToken + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp new file mode 100644 index 0000000000..20c250eaff --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp @@ -0,0 +1,51 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Outbound Rule Basic Resource for the managed network of a machine learning workspace.") +@parentResource(Workspace) +model OutboundRuleBasicResource is ProxyResource { + @doc("Name of the workspace managed network outbound rule") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + @key("ruleName") + @segment("outboundRules") + name: string; +} + +@armResourceOperations +interface OutboundRuleBasicResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets an outbound rule from the managed network of a machine learning workspace.") + @operationId("ManagedNetworkSettingsRule_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Creates or updates an outbound rule in the managed network of a machine learning workspace.") + @operationId("ManagedNetworkSettingsRule_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + OutboundRuleBasicResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Deletes an outbound rule from the managed network of a machine learning workspace.") + @operationId("ManagedNetworkSettingsRule_Delete") + delete is ArmResourceDeleteAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists the managed network outbound rules for a machine learning workspace.") + @operationId("ManagedNetworkSettingsRule_List") + list is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp new file mode 100644 index 0000000000..b2bf3862fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp @@ -0,0 +1,45 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("The Private Endpoint Connection resource.") +@parentResource(Workspace) +model PrivateEndpointConnection + is TrackedResource { + @doc("NRP Private Endpoint Connection Name") + @path + @key("privateEndpointConnectionName") + @segment("privateEndpointConnections") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; +} + +@armResourceOperations +interface PrivateEndpointConnections { + @doc("Called by end-users to get a PE connection.") + get is ArmResourceRead; + + @doc(""" +Called by end-users to approve or reject a PE connection. +This method must validate and forward the call to NRP. +""") + createOrUpdate is ArmResourceCreateOrReplaceSync; + + @doc("Called by end-users to delete a PE connection.") + delete is ArmResourceDeleteSync; + + @doc("Called by end-users to get all PE connections.") + list is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp new file mode 100644 index 0000000000..004cb1e443 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp @@ -0,0 +1,64 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; + +model Registry is TrackedResource { + @doc("Name of Azure Machine Learning registry. This is case-insensitive") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{2,32}$") + @path + @key("registryName") + @segment("registries") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourceKind; +} + +@armResourceOperations +interface Registries { + @doc("Get registry") + get is ArmResourceRead; + + @doc("Create or update registry") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Registry, + BaseParameters, + ArmAsyncOperationHeader + >; + + @doc("Update tags") + update is ArmCustomPatchSync; + + @doc("Delete registry") + delete is ArmResourceDeleteAsync< + Registry, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("List registries") + list is ArmResourceListByParent; + + @doc("List registries by subscription") + listBySubscription is ArmListBySubscription; + + @doc("Remove regions from registry") + removeRegions is ArmResourceActionAsync< + Registry, + Registry, + Registry, + BaseParameters, + ArmLroLocationHeader + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp new file mode 100644 index 0000000000..29df360256 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp @@ -0,0 +1,55 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Workspace) +model Schedule is ProxyResource { + @doc("Schedule name.") + @path + @key("name") + @segment("schedules") + name: string; +} + +@armResourceOperations +interface Schedules { + @doc("Get schedule.") + get is ArmResourceRead; + + @doc("Create or update schedule.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + @doc("Delete schedule.") + delete is ArmResourceDeleteAsync< + Schedule, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("List schedules in specified workspace.") + list is ArmResourceListByParent< + Schedule, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Status filter for schedule.") + @query("listViewType") + listViewType?: ScheduleListViewType; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp new file mode 100644 index 0000000000..2608367d4c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp @@ -0,0 +1,228 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("An object that represents a machine learning workspace.") +model Workspace is TrackedResource { + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + @key("workspaceName") + @segment("workspaces") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourceKind; +} + +@armResourceOperations +interface Workspaces { + @doc("Gets the properties of the specified machine learning workspace.") + get is ArmResourceRead; + + @doc("Creates or updates a workspace with the specified parameters.") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Workspace, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("Updates a machine learning workspace with the specified parameters.") + update is ArmCustomPatchAsync; + + @doc("Deletes a machine learning workspace.") + delete is ArmResourceDeleteAsync< + Workspace, + { + ...BaseParameters; + + @doc("Flag to indicate delete is a purge request.") + @query("forceToPurge") + forceToPurge?: boolean; + } + >; + + @doc("Lists all the available machine learning workspaces under the specified resource group.") + listByResourceGroup is ArmResourceListByParent< + Workspace, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Kind of workspace.") + @query("kind") + kind?: string; + } + >; + + @doc("Lists all the available machine learning workspaces under the specified subscription.") + listBySubscription is ArmListBySubscription; + + @doc("Diagnose workspace setup issue.") + diagnose is ArmResourceActionAsync< + Workspace, + DiagnoseWorkspaceParameters, + DiagnoseResponseResult, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry.") + listKeys is ArmResourceActionSync; + + @doc("Get Azure Machine Learning Workspace notebook access token") + listNotebookAccessToken is ArmResourceActionSync< + Workspace, + void, + NotebookAccessTokenResult + >; + + @doc("Lists keys of Azure Machine Learning Workspaces notebook.") + listNotebookKeys is ArmResourceActionSync< + Workspace, + void, + ListNotebookKeysResult + >; + + @doc("Lists keys of Azure Machine Learning Workspace's storage account.") + listStorageAccountKeys is ArmResourceActionSync< + Workspace, + void, + ListStorageAccountKeysResult + >; + + @doc("Prepare Azure Machine Learning Workspace's notebook resource") + prepareNotebook is ArmResourceActionAsync< + Workspace, + void, + NotebookResourceInfo, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and password for container registry") + resyncKeys is ArmResourceActionAsync< + Workspace, + void, + void, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Provisions the managed network of a machine learning workspace.") + @operationId("ManagedNetworkProvisions_ProvisionManagedNetwork") + provisionManagedNetwork is ArmResourceActionAsync< + Workspace, + ManagedNetworkProvisionOptions, + ManagedNetworkProvisionStatus, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("WorkspaceFeatures_List") + @doc("Lists all enabled features for a workspace") + // FIXME: WorkspaceFeatures_List could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + }, + ListAmlUserFeatureResult + >; + + @summary("Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically.") + @doc("Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically.") + // FIXME: Workspaces_ListOutboundNetworkDependenciesEndpoints could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") + @get + ListOutboundNetworkDependenciesEndpoints is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + }, + ExternalFqdnResponse + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateLinkResources_List") + @summary(""" +Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. +Each "private link resource" is a connection endpoint (IP address) to the resource. +Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. +Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. +Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". +""") + @doc(""" +Called by Client (Portal, CLI, etc) to get available \"private link resources\" for the workspace. +Each \"private link resource\" is a connection endpoint (IP address) to the resource. +Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. +Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. +Defined in the \"[NRP] Private Endpoint Design\" doc, topic \"GET API for GroupIds\". +""") + // FIXME: PrivateLinkResources_List could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + }, + PrivateLinkResourceListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp new file mode 100644 index 0000000000..356fc3f1aa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp @@ -0,0 +1,78 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; + +@parentResource(Workspace) +model WorkspaceConnectionPropertiesV2BasicResource + is ProxyResource { + @doc("Friendly name of the workspace connection") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + @key("connectionName") + @segment("connections") + name: string; +} + +@armResourceOperations +interface WorkspaceConnectionPropertiesV2BasicResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists machine learning workspaces connections by name.") + @operationId("WorkspaceConnections_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update machine learning workspaces connections under the specified workspace.") + @operationId("WorkspaceConnections_Create") + create is ArmResourceCreateOrReplaceSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Update machine learning workspaces connections under the specified workspace.") + @operationId("WorkspaceConnections_Update") + update is ArmCustomPatchSync< + WorkspaceConnectionPropertiesV2BasicResource, + WorkspaceConnectionUpdateParameter + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete machine learning workspaces connections by name.") + @operationId("WorkspaceConnections_Delete") + delete is ArmResourceDeleteSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists all the available machine learning workspaces connections under the specified workspace.") + @operationId("WorkspaceConnections_List") + list is ArmResourceListByParent< + WorkspaceConnectionPropertiesV2BasicResource, + { + ...BaseParameters; + + @doc("Target of the workspace connection.") + @query("target") + target?: string; + + @doc("Category of the workspace connection.") + @query("category") + category?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List all the secrets of a machine learning workspaces connections.") + @operationId("WorkspaceConnections_ListSecrets") + listSecrets is ArmResourceActionSync< + WorkspaceConnectionPropertiesV2BasicResource, + void, + WorkspaceConnectionPropertiesV2BasicResource + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_CreateOrUpdate.json new file mode 100644 index 0000000000..f61c67ed01 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_CreateOrUpdate.json @@ -0,0 +1,222 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "compute": "string", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "errorThreshold": 1, + "loggingLevel": "Info", + "maxConcurrencyPerInstance": 1, + "miniBatchSize": 1, + "model": { + "assetId": "string", + "referenceType": "Id" + }, + "outputAction": "SummaryOnly", + "outputFileName": "string", + "properties": { + "string": "string" + }, + "resources": { + "instanceCount": 1, + "instanceType": "string", + "properties": { + "string": { + "cd3c37dc-2876-4ca4-8a54-21bd7619724a": null + } + } + }, + "retrySettings": { + "maxRetries": 1, + "timeout": "PT5M" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "compute": "string", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "errorThreshold": 1, + "loggingLevel": "Info", + "maxConcurrencyPerInstance": 1, + "miniBatchSize": 1, + "model": { + "assetId": "string", + "referenceType": "Id" + }, + "outputAction": "SummaryOnly", + "outputFileName": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "resources": { + "instanceCount": 1, + "instanceType": "string", + "properties": { + "string": { + "4939850d-8eae-4343-8566-0826259a2ad1": null + } + } + }, + "retrySettings": { + "maxRetries": 1, + "timeout": "PT5M" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "compute": "string", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "errorThreshold": 1, + "loggingLevel": "Info", + "maxConcurrencyPerInstance": 1, + "miniBatchSize": 1, + "model": { + "assetId": "string", + "referenceType": "Id" + }, + "outputAction": "SummaryOnly", + "outputFileName": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "resources": { + "instanceCount": 1, + "instanceType": "string", + "properties": { + "string": { + "b76755e4-16bf-45d4-b625-6634df7444cc": null + } + } + }, + "retrySettings": { + "maxRetries": 1, + "timeout": "PT5M" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "BatchDeployments_CreateOrUpdate", + "title": "CreateOrUpdate Workspace Batch Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Delete.json new file mode 100644 index 0000000000..580da15ca9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "BatchDeployments_Delete", + "title": "Delete Workspace Batch Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Get.json new file mode 100644 index 0000000000..2b86fc6ea5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Get.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "compute": "string", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "errorThreshold": 1, + "loggingLevel": "Info", + "maxConcurrencyPerInstance": 1, + "miniBatchSize": 1, + "model": { + "assetId": "string", + "referenceType": "Id" + }, + "outputAction": "SummaryOnly", + "outputFileName": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "resources": { + "instanceCount": 1, + "instanceType": "string", + "properties": { + "string": { + "843c2bb4-e5f1-4267-98c8-ba22a99dbb00": null + } + } + }, + "retrySettings": { + "maxRetries": 1, + "timeout": "PT5M" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "BatchDeployments_Get", + "title": "Get Workspace Batch Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_List.json new file mode 100644 index 0000000000..0d5820113c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_List.json @@ -0,0 +1,97 @@ +{ + "parameters": { + "$orderBy": "string", + "$skipToken": "string", + "$top": 1, + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "compute": "string", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "errorThreshold": 1, + "loggingLevel": "Info", + "maxConcurrencyPerInstance": 1, + "miniBatchSize": 1, + "model": { + "assetId": "string", + "referenceType": "Id" + }, + "outputAction": "SummaryOnly", + "outputFileName": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "resources": { + "instanceCount": 1, + "instanceType": "string", + "properties": { + "string": { + "a3c13e2e-a213-4cac-9f5a-b49966906ad6": null + } + } + }, + "retrySettings": { + "maxRetries": 1, + "timeout": "PT5M" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + }, + "headers": {} + } + }, + "operationId": "BatchDeployments_List", + "title": "List Workspace Batch Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Update.json new file mode 100644 index 0000000000..de441ae4ca --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Update.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string" + }, + "tags": {} + }, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "compute": "string", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "errorThreshold": 1, + "loggingLevel": "Info", + "maxConcurrencyPerInstance": 1, + "miniBatchSize": 1, + "model": { + "assetId": "string", + "referenceType": "Id" + }, + "outputAction": "SummaryOnly", + "outputFileName": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "resources": { + "instanceCount": 1, + "instanceType": "string", + "properties": { + "string": { + "1e5e1cf9-b0ea-4cf6-9764-e750bf85c10a": null + } + } + }, + "retrySettings": { + "maxRetries": 1, + "timeout": "PT5M" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": { + "Location": "example_location" + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "BatchDeployments_Update", + "title": "Update Workspace Batch Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_CreateOrUpdate.json new file mode 100644 index 0000000000..07f594793d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_CreateOrUpdate.json @@ -0,0 +1,141 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "defaults": { + "deploymentName": "string" + }, + "properties": { + "string": "string" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "defaults": { + "deploymentName": "string" + }, + "properties": { + "string": "string" + }, + "provisioningState": "Succeeded", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example" + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "defaults": { + "deploymentName": "string" + }, + "properties": { + "string": "string" + }, + "provisioningState": "Updating", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example" + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "BatchEndpoints_CreateOrUpdate", + "title": "CreateOrUpdate Workspace Batch Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Delete.json new file mode 100644 index 0000000000..ae97e5bdf4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "endpointName": "testBatchEndpoint", + "resourceGroupName": "resourceGroup-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "BatchEndpoints_Delete", + "title": "Delete Workspace Batch Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Get.json new file mode 100644 index 0000000000..a347101b92 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Get.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "defaults": { + "deploymentName": "string" + }, + "properties": { + "string": "string" + }, + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example" + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "BatchEndpoints_Get", + "title": "Get Workspace Batch Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_List.json new file mode 100644 index 0000000000..b2b49b1bc9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_List.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "count": 1, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "defaults": { + "deploymentName": "string" + }, + "properties": { + "string": "string" + }, + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example" + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + }, + "headers": {} + } + }, + "operationId": "BatchEndpoints_List", + "title": "List Workspace Batch Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_ListKeys.json new file mode 100644 index 0000000000..851de283ba --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_ListKeys.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "primaryKey": "string", + "secondaryKey": "string" + }, + "headers": {} + } + }, + "operationId": "BatchEndpoints_ListKeys", + "title": "ListKeys Workspace Batch Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Update.json new file mode 100644 index 0000000000..bfaa5aa409 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Update.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "tags": {} + }, + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "defaults": { + "deploymentName": "string" + }, + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example" + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": { + "Location": "example_location" + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "BatchEndpoints_Update", + "title": "Update Workspace Batch Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_AttachAKubernetesCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_AttachAKubernetesCompute.json new file mode 100644 index 0000000000..ddbbbc4876 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_AttachAKubernetesCompute.json @@ -0,0 +1,125 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "Kubernetes", + "properties": { + "defaultInstanceType": "defaultInstanceType", + "instanceTypes": { + "defaultInstanceType": { + "nodeSelector": null, + "resources": { + "limits": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + }, + "requests": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + } + } + } + }, + "namespace": "default" + }, + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "Kubernetes", + "properties": { + "defaultInstanceType": "defaultInstanceType", + "extensionInstanceReleaseTrain": "stable", + "extensionPrincipalId": null, + "instanceTypes": { + "defaultInstanceType": { + "nodeSelector": null, + "resources": { + "limits": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + }, + "requests": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + } + } + } + }, + "namespace": "default", + "relayConnectionString": null, + "serviceBusConnectionString": null, + "vcName": null + }, + "provisioningState": "Creating", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "Kubernetes", + "properties": { + "defaultInstanceType": "defaultInstanceType", + "extensionInstanceReleaseTrain": "stable", + "extensionPrincipalId": null, + "instanceTypes": { + "defaultInstanceType": { + "nodeSelector": null, + "resources": { + "limits": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + }, + "requests": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + } + } + } + }, + "namespace": "default", + "relayConnectionString": null, + "serviceBusConnectionString": null, + "vcName": null + }, + "provisioningState": "Creating", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Attach a Kubernetes Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAAmlCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAAmlCompute.json new file mode 100644 index 0000000000..ddb059c165 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAAmlCompute.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "computeType": "AmlCompute", + "properties": { + "enableNodePublicIp": true, + "isolatedNetwork": false, + "osType": "Windows", + "remoteLoginPortPublicAccess": "NotSpecified", + "scaleSettings": { + "maxNodeCount": 1, + "minNodeCount": 0, + "nodeIdleTimeBeforeScaleDown": "PT5M" + }, + "virtualMachineImage": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myImageGallery/images/myImageDefinition/versions/0.0.1" + }, + "vmPriority": "Dedicated", + "vmSize": "STANDARD_NC6" + } + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "AmlCompute", + "provisioningState": "Creating" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "AmlCompute", + "provisioningState": "Creating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Create a AML Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateADataFactoryCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateADataFactoryCompute.json new file mode 100644 index 0000000000..a2643a8874 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateADataFactoryCompute.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "computeType": "DataFactory" + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "DataFactory", + "provisioningState": "Creating" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "DataFactory", + "provisioningState": "Creating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Create a DataFactory Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnAksCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnAksCompute.json new file mode 100644 index 0000000000..5df21792d1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnAksCompute.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "computeType": "AKS" + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "AKS", + "provisioningState": "Creating" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "AKS", + "provisioningState": "Creating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Create an AKS Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceCompute.json new file mode 100644 index 0000000000..ca6a050b8e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceCompute.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "properties": { + "applicationSharingPolicy": "Personal", + "autologgerSettings": { + "mlflowAutologger": "Enabled" + }, + "computeInstanceAuthorizationType": "personal", + "customServices": [ + { + "name": "rstudio-workbench", + "docker": { + "privileged": true + }, + "endpoints": [ + { + "name": "connect", + "hostIp": null, + "published": 4444, + "target": 8787, + "protocol": "http" + } + ], + "environmentVariables": { + "RSP_LICENSE": { + "type": "local", + "value": "XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX" + } + }, + "image": { + "type": "docker", + "reference": "ghcr.io/azure/rstudio-workbench:latest" + }, + "volumes": [ + { + "type": "bind", + "readOnly": true, + "source": "/mnt/azureuser/", + "target": "/home/testuser/" + } + ] + } + ], + "personalComputeInstanceSettings": { + "assignedUser": { + "objectId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000" + } + }, + "sshSettings": { + "sshPublicAccess": "Disabled" + }, + "subnet": { + "id": "test-subnet-resource-id" + }, + "vmSize": "STANDARD_NC6" + } + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "provisioningState": "Creating" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "provisioningState": "Creating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Create an ComputeInstance Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithMinimalInputs.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithMinimalInputs.json new file mode 100644 index 0000000000..d450bf6ddc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithMinimalInputs.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "properties": { + "vmSize": "STANDARD_NC6" + } + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "provisioningState": "Creating" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "provisioningState": "Creating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Create an ComputeInstance Compute with minimal inputs" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithSchedules.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithSchedules.json new file mode 100644 index 0000000000..d105af37cb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithSchedules.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "properties": { + "applicationSharingPolicy": "Personal", + "computeInstanceAuthorizationType": "personal", + "personalComputeInstanceSettings": { + "assignedUser": { + "objectId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000" + } + }, + "schedules": { + "computeStartStop": [ + { + "action": "Stop", + "cron": { + "expression": "0 18 * * *", + "startTime": "2021-04-23T01:30:00", + "timeZone": "Pacific Standard Time" + }, + "status": "Enabled", + "triggerType": "Cron" + } + ] + }, + "sshSettings": { + "sshPublicAccess": "Disabled" + }, + "vmSize": "STANDARD_NC6" + } + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "provisioningState": "Creating" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "provisioningState": "Creating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Create an ComputeInstance Compute with Schedules" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAAmlCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAAmlCompute.json new file mode 100644 index 0000000000..5943cda50a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAAmlCompute.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "AmlCompute", + "properties": { + "scaleSettings": { + "maxNodeCount": 4, + "minNodeCount": 4, + "nodeIdleTimeBeforeScaleDown": "PT5M" + } + } + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus2", + "properties": { + "description": "some compute", + "computeType": "AmlCompute", + "createdOn": "2021-04-01T22:00:00.0000000+00:00", + "modifiedOn": "2021-04-01T22:00:00.0000000+00:00", + "properties": { + "allocationState": "Resizing", + "allocationStateTransitionTime": "2017-09-27T22:28:08.998Z", + "currentNodeCount": 0, + "enableNodePublicIp": true, + "errors": null, + "isolatedNetwork": false, + "nodeStateCounts": { + "idleNodeCount": 0, + "leavingNodeCount": 0, + "preemptedNodeCount": 0, + "preparingNodeCount": 0, + "runningNodeCount": 0, + "unusableNodeCount": 0 + }, + "osType": "Windows", + "remoteLoginPortPublicAccess": "Enabled", + "scaleSettings": { + "maxNodeCount": 1, + "minNodeCount": 0, + "nodeIdleTimeBeforeScaleDown": "PT5M" + }, + "subnet": { + "id": "test-subnet-resource-id" + }, + "targetNodeCount": 1, + "virtualMachineImage": null, + "vmPriority": "Dedicated", + "vmSize": "STANDARD_NC6" + }, + "provisioningState": "Succeeded" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus2", + "properties": { + "description": "some compute", + "computeType": "AmlCompute", + "provisioningState": "Updating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Update a AML Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAnAksCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAnAksCompute.json new file mode 100644 index 0000000000..89e10c425b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAnAksCompute.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "AKS", + "properties": { + "agentCount": 4 + }, + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "AKS", + "properties": { + "agentCount": 4 + }, + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "AKS", + "provisioningState": "Updating", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Update an AKS Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Delete.json new file mode 100644 index 0000000000..cb7e7cde38 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Delete.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "underlyingResourceAction": "Delete", + "workspaceName": "workspaces123" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus...", + "Location": "https://management.azure.com/subscriptions/...pathToOperationResult..." + } + }, + "204": {} + }, + "operationId": "Compute_Delete", + "title": "Delete Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAksCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAksCompute.json new file mode 100644 index 0000000000..ca11d38b71 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAksCompute.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "AKS", + "createdOn": "2021-04-01T22:00:00.0000000+00:00", + "modifiedOn": "2021-04-01T22:00:00.0000000+00:00", + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + } + } + }, + "operationId": "Compute_Get", + "title": "Get a AKS Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAmlCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAmlCompute.json new file mode 100644 index 0000000000..c4f2fdcafd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAmlCompute.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus2", + "properties": { + "description": "some compute", + "computeType": "AmlCompute", + "createdOn": "2021-04-01T22:00:00.0000000+00:00", + "modifiedOn": "2021-04-01T22:00:00.0000000+00:00", + "properties": { + "allocationState": "Resizing", + "allocationStateTransitionTime": "2017-09-27T22:28:08.998Z", + "currentNodeCount": 0, + "enableNodePublicIp": true, + "errors": null, + "isolatedNetwork": false, + "nodeStateCounts": { + "idleNodeCount": 0, + "leavingNodeCount": 0, + "preemptedNodeCount": 0, + "preparingNodeCount": 0, + "runningNodeCount": 0, + "unusableNodeCount": 0 + }, + "osType": "Windows", + "remoteLoginPortPublicAccess": "Enabled", + "scaleSettings": { + "maxNodeCount": 1, + "minNodeCount": 0, + "nodeIdleTimeBeforeScaleDown": "PT5M" + }, + "subnet": { + "id": "test-subnet-resource-id" + }, + "targetNodeCount": 1, + "virtualMachineImage": null, + "vmPriority": "Dedicated", + "vmSize": "STANDARD_NC6" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "Compute_Get", + "title": "Get a AML Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAKubernetesCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAKubernetesCompute.json new file mode 100644 index 0000000000..b54d6fa433 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAKubernetesCompute.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "Kubernetes", + "createdOn": "2021-04-01T22:00:00.0000000+00:00", + "isAttachedCompute": true, + "modifiedOn": "2021-04-01T22:00:00.0000000+00:00", + "properties": { + "defaultInstanceType": "defaultInstanceType", + "extensionInstanceReleaseTrain": "stable", + "extensionPrincipalId": null, + "instanceTypes": { + "defaultInstanceType": { + "nodeSelector": null, + "resources": { + "limits": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + }, + "requests": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + } + } + } + }, + "namespace": "default", + "relayConnectionString": null, + "serviceBusConnectionString": null, + "vcName": null + }, + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + } + } + }, + "operationId": "Compute_Get", + "title": "Get a Kubernetes Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAnComputeInstance.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAnComputeInstance.json new file mode 100644 index 0000000000..6f6677b0cd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAnComputeInstance.json @@ -0,0 +1,116 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus2", + "properties": { + "description": "some compute", + "computeType": "ComputeInstance", + "createdOn": "2021-04-01T22:00:00.0000000+00:00", + "modifiedOn": "2021-04-01T22:00:00.0000000+00:00", + "properties": { + "applicationSharingPolicy": "Shared", + "applications": [ + { + "displayName": "Jupyter", + "endpointUri": "https://compute123.eastus2.azureml.net/jupyter" + } + ], + "computeInstanceAuthorizationType": "personal", + "connectivityEndpoints": { + "privateIpAddress": "10.0.0.1", + "publicIpAddress": "10.0.0.1" + }, + "createdBy": { + "userId": "00000000-0000-0000-0000-000000000000", + "userName": "foobar@microsoft.com", + "userOrgId": "00000000-0000-0000-0000-000000000000" + }, + "customServices": [ + { + "name": "rstudio-workbench", + "docker": { + "privileged": true + }, + "endpoints": [ + { + "name": "connect", + "hostIp": null, + "published": 4444, + "target": 8787, + "protocol": "http" + } + ], + "environmentVariables": { + "RSP_LICENSE": { + "type": "local", + "value": "XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX" + } + }, + "image": { + "type": "docker", + "reference": "ghcr.io/azure/rstudio-workbench:latest" + }, + "volumes": [ + { + "type": "bind", + "bind": { + "createHostPath": true, + "propagation": "test", + "selinux": "test" + }, + "consistency": "test", + "readOnly": true, + "source": "/mnt/azureuser/", + "target": "/home/testuser/", + "tmpfs": { + "size": 10 + }, + "volume": { + "nocopy": true + } + } + ] + } + ], + "errors": null, + "osImageMetadata": { + "currentImageVersion": "22.06.14", + "isLatestOsImageVersion": false, + "latestImageVersion": "22.07.22" + }, + "personalComputeInstanceSettings": { + "assignedUser": { + "objectId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000" + } + }, + "sshSettings": { + "adminUserName": "azureuser", + "sshPort": 22, + "sshPublicAccess": "Enabled" + }, + "state": "Running", + "subnet": { + "id": "test-subnet-resource-id" + }, + "vmSize": "STANDARD_NC6" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "Compute_Get", + "title": "Get an ComputeInstance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_List.json new file mode 100644 index 0000000000..ef0946b46a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_List.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "nextLink": "nextLink", + "value": [ + { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "AKS", + "createdOn": "2021-04-01T22:00:00.0000000+00:00", + "modifiedOn": "2021-04-01T22:00:00.0000000+00:00", + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + }, + { + "name": "compute1234", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute1234", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "AKS", + "createdOn": "2021-04-01T22:00:00.0000000+00:00", + "modifiedOn": "2021-04-01T22:00:00.0000000+00:00", + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute1234-56826-c9b00420020b2" + } + } + ] + } + } + }, + "operationId": "Compute_List", + "title": "Get Computes" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListKeys.json new file mode 100644 index 0000000000..cebcad4c1c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListKeys.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "adminKubeConfig": "admin kube config...", + "computeType": "AKS", + "imagePullSecretName": "the image pull secret name", + "userKubeConfig": "user kube config..." + } + } + }, + "operationId": "Compute_ListKeys", + "title": "List AKS Compute Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListNodes.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListNodes.json new file mode 100644 index 0000000000..51d4bf9a2e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListNodes.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "nextLink": "nextLink", + "nodes": [ + { + "nodeId": "tvm-3601533753_1-20170719t162906z", + "nodeState": "running", + "port": 50000, + "privateIpAddress": "13.84.190.124", + "publicIpAddress": "13.84.190.134", + "runId": "2f378a44-38f2-443a-9f0d-9909d0b47890" + }, + { + "nodeId": "tvm-3601533753_2-20170719t162906z", + "nodeState": "idle", + "port": 50001, + "privateIpAddress": "13.84.190.124", + "publicIpAddress": "13.84.190.134" + } + ] + } + } + }, + "operationId": "Compute_ListNodes", + "title": "Get compute nodes information for a compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Restart.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Restart.json new file mode 100644 index 0000000000..3199194449 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Restart.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Compute_Restart", + "title": "Restart ComputeInstance Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Start.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Start.json new file mode 100644 index 0000000000..4fb98622b2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Start.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Compute_Start", + "title": "Start ComputeInstance Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Stop.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Stop.json new file mode 100644 index 0000000000..7e7dbc7b63 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Stop.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Compute_Stop", + "title": "Stop ComputeInstance Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Update.json new file mode 100644 index 0000000000..6ecb2f4372 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Update.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "properties": { + "properties": { + "scaleSettings": { + "maxNodeCount": 4, + "minNodeCount": 4, + "nodeIdleTimeBeforeScaleDown": "PT5M" + } + } + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus2", + "properties": { + "description": "some compute", + "computeType": "AmlCompute", + "provisioningState": "Updating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_Update", + "title": "Update a AmlCompute Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateCustomServices.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateCustomServices.json new file mode 100644 index 0000000000..5dec89f71f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateCustomServices.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "customServices": [ + { + "name": "rstudio-workbench", + "docker": { + "privileged": true + }, + "endpoints": [ + { + "name": "connect", + "hostIp": null, + "published": 4444, + "target": 8787, + "protocol": "http" + } + ], + "environmentVariables": { + "RSP_LICENSE": { + "type": "local", + "value": "XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX" + } + }, + "image": { + "type": "docker", + "reference": "ghcr.io/azure/rstudio-workbench:latest" + }, + "volumes": [ + { + "type": "bind", + "readOnly": true, + "source": "/mnt/azureuser/", + "target": "/home/testuser/" + } + ] + } + ], + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": {} + }, + "operationId": "Compute_UpdateCustomServices", + "title": "Update Custom Services" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateIdleShutdownSetting.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateIdleShutdownSetting.json new file mode 100644 index 0000000000..b1bbbf4582 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateIdleShutdownSetting.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "idleTimeBeforeShutdown": "PT120M" + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": {} + }, + "operationId": "Compute_UpdateIdleShutdownSetting", + "title": "Update idle shutdown setting of ComputeInstance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureBlobWAccountKey.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureBlobWAccountKey.json new file mode 100644 index 0000000000..be992ff812 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureBlobWAccountKey.json @@ -0,0 +1,105 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "accountName": "string", + "containerName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "key": "string", + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureBlob", + "endpoint": "core.windows.net", + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "https" + } + }, + "resourceGroupName": "test-rg", + "skipValidation": false, + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "containerName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureBlob", + "endpoint": "core.windows.net", + "isDefault": false, + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "https" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "containerName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureBlob", + "endpoint": "core.windows.net", + "isDefault": false, + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "https" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Datastores_CreateOrUpdate", + "title": "CreateOrUpdate datastore (AzureBlob w/ AccountKey)." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal.json new file mode 100644 index 0000000000..f959c61251 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal.json @@ -0,0 +1,106 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "credentials": { + "authorityUrl": "string", + "clientId": "00000000-1111-2222-3333-444444444444", + "credentialsType": "ServicePrincipal", + "resourceUrl": "string", + "secrets": { + "clientSecret": "string", + "secretsType": "ServicePrincipal" + }, + "tenantId": "00000000-1111-2222-3333-444444444444" + }, + "datastoreType": "AzureDataLakeGen1", + "properties": null, + "storeName": "string", + "tags": { + "string": "string" + } + } + }, + "resourceGroupName": "test-rg", + "skipValidation": false, + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "credentials": { + "authorityUrl": "string", + "clientId": "00000000-1111-2222-3333-444444444444", + "credentialsType": "ServicePrincipal", + "resourceUrl": "string", + "secrets": { + "secretsType": "ServicePrincipal" + }, + "tenantId": "00000000-1111-2222-3333-444444444444" + }, + "datastoreType": "AzureDataLakeGen1", + "properties": null, + "storeName": "string", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "credentials": { + "authorityUrl": "string", + "clientId": "00000000-1111-2222-3333-444444444444", + "credentialsType": "ServicePrincipal", + "resourceUrl": "string", + "secrets": { + "secretsType": "ServicePrincipal" + }, + "tenantId": "00000000-1111-2222-3333-444444444444" + }, + "datastoreType": "AzureDataLakeGen1", + "properties": null, + "storeName": "string", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Datastores_CreateOrUpdate", + "title": "CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal)." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal.json new file mode 100644 index 0000000000..074f8107f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal.json @@ -0,0 +1,115 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "accountName": "string", + "credentials": { + "authorityUrl": "string", + "clientId": "00000000-1111-2222-3333-444444444444", + "credentialsType": "ServicePrincipal", + "resourceUrl": "string", + "secrets": { + "clientSecret": "string", + "secretsType": "ServicePrincipal" + }, + "tenantId": "00000000-1111-2222-3333-444444444444" + }, + "datastoreType": "AzureDataLakeGen2", + "endpoint": "string", + "filesystem": "string", + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "string" + } + }, + "resourceGroupName": "test-rg", + "skipValidation": false, + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "credentials": { + "authorityUrl": "string", + "clientId": "00000000-1111-2222-3333-444444444444", + "credentialsType": "ServicePrincipal", + "resourceUrl": "string", + "secrets": { + "secretsType": "ServicePrincipal" + }, + "tenantId": "00000000-1111-2222-3333-444444444444" + }, + "datastoreType": "AzureDataLakeGen2", + "endpoint": "string", + "filesystem": "string", + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "string" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "credentials": { + "authorityUrl": "string", + "clientId": "00000000-1111-2222-3333-444444444444", + "credentialsType": "ServicePrincipal", + "resourceUrl": "string", + "secrets": { + "secretsType": "ServicePrincipal" + }, + "tenantId": "00000000-1111-2222-3333-444444444444" + }, + "datastoreType": "AzureDataLakeGen2", + "endpoint": "string", + "filesystem": "string", + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "string" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Datastores_CreateOrUpdate", + "title": "CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal)." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKey.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKey.json new file mode 100644 index 0000000000..ef1785cf87 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKey.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "accountName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "key": "string", + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureFile", + "endpoint": "string", + "fileShareName": "string", + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "string" + } + }, + "resourceGroupName": "test-rg", + "skipValidation": false, + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureFile", + "endpoint": "string", + "fileShareName": "string", + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "string" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureFile", + "endpoint": "string", + "fileShareName": "string", + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "string" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Datastores_CreateOrUpdate", + "title": "CreateOrUpdate datastore (Azure File store w/ AccountKey)." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Delete.json new file mode 100644 index 0000000000..e880e6aaff --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Datastores_Delete", + "title": "Delete datastore." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Get.json new file mode 100644 index 0000000000..e2f9633057 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Get.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "containerName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureBlob", + "endpoint": "core.windows.net", + "isDefault": false, + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "https" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Datastores_Get", + "title": "Get datastore." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_List.json new file mode 100644 index 0000000000..0a34b55bb9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_List.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "count": 1, + "isDefault": false, + "names": [ + "string" + ], + "orderBy": "string", + "orderByAsc": false, + "resourceGroupName": "test-rg", + "searchText": "string", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "containerName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureBlob", + "endpoint": "core.windows.net", + "isDefault": false, + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "https" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Datastores_List", + "title": "List datastores." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_ListSecrets.json new file mode 100644 index 0000000000..0a71ab5f73 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_ListSecrets.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "key": "string", + "secretsType": "AccountKey" + }, + "headers": {} + } + }, + "operationId": "Datastores_ListSecrets", + "title": "Get datastore secrets." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_Get.json new file mode 100644 index 0000000000..76ddad2646 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_Get.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "featureName": "string", + "featuresetName": "string", + "featuresetVersion": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "Float", + "featureName": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:51", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:51", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "Features_Get", + "title": "Get Feature." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_List.json new file mode 100644 index 0000000000..b18e4e0d77 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_List.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "description": "string", + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "featureName": "string", + "featuresetName": "string", + "featuresetVersion": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tags": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "Boolean", + "featureName": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:50", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:50", + "lastModifiedBy": "string", + "lastModifiedByType": "ManagedIdentity" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Features_List", + "title": "List Feature." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_CreateOrUpdate.json new file mode 100644 index 0000000000..11571db7c0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_CreateOrUpdate.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "isArchived": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Updating", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:48", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:48", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Updating", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:48", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:48", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "FeaturesetContainers_CreateOrUpdate", + "title": "CreateOrUpdate Workspace Featureset Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_Delete.json new file mode 100644 index 0000000000..5bd9c1a3b9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "FeaturesetContainers_Delete", + "title": "Delete Workspace Featureset Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_GetEntity.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_GetEntity.json new file mode 100644 index 0000000000..e506716a00 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_GetEntity.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Deleting", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:49", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:49", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "FeaturesetContainers_GetEntity", + "title": "GetEntity Workspace Featureset Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_List.json new file mode 100644 index 0000000000..99a28993a6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_List.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "listViewType": "ArchivedOnly", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tags": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Canceled", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:46", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:46", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "FeaturesetContainers_List", + "title": "List Workspace Featureset Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Backfill.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Backfill.json new file mode 100644 index 0000000000..948bd3a1ee --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Backfill.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "description": "string", + "displayName": "string", + "featureWindow": { + "featureWindowEnd": "2020-01-01T12:34:56.999+00:51", + "featureWindowStart": "2020-01-01T12:34:56.999+00:51" + }, + "resource": { + "instanceType": "string" + }, + "sparkConfiguration": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "jobId": "string" + }, + "headers": {} + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "FeaturesetVersions_Backfill", + "title": "Backfill Workspace Featureset Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..dcac941cac --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_CreateOrUpdate.json @@ -0,0 +1,221 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "entities": [ + "string" + ], + "isAnonymous": false, + "isArchived": false, + "materializationSettings": { + "notification": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "resource": { + "instanceType": "string" + }, + "schedule": { + "endTime": "string", + "frequency": "Day", + "interval": 1, + "schedule": { + "hours": [ + 1 + ], + "minutes": [ + 1 + ], + "monthDays": [ + 1 + ], + "weekDays": [ + "Monday" + ] + }, + "startTime": "string", + "timeZone": "string", + "triggerType": "Recurrence" + }, + "sparkConfiguration": { + "string": "string" + }, + "storeType": "Online" + }, + "properties": { + "string": "string" + }, + "specification": { + "path": "string" + }, + "stage": "string", + "tags": { + "string": "string" + } + } + }, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "entities": [ + "string" + ], + "isAnonymous": false, + "isArchived": false, + "materializationSettings": { + "notification": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "resource": { + "instanceType": "string" + }, + "schedule": { + "endTime": "string", + "frequency": "Day", + "interval": 1, + "schedule": { + "hours": [ + 1 + ], + "minutes": [ + 1 + ], + "monthDays": [ + 1 + ], + "weekDays": [ + "Wednesday" + ] + }, + "startTime": "string", + "timeZone": "string", + "triggerType": "Recurrence" + }, + "sparkConfiguration": { + "string": "string" + }, + "storeType": "OnlineAndOffline" + }, + "properties": { + "string": "string" + }, + "provisioningState": "Deleting", + "specification": { + "path": "string" + }, + "stage": "string", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:52", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:52", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "entities": [ + "string" + ], + "isAnonymous": false, + "isArchived": false, + "materializationSettings": { + "notification": { + "emailOn": [ + "JobCancelled" + ], + "emails": [ + "string" + ] + }, + "resource": { + "instanceType": "string" + }, + "schedule": { + "endTime": "string", + "frequency": "Hour", + "interval": 1, + "schedule": { + "hours": [ + 1 + ], + "minutes": [ + 1 + ], + "monthDays": [ + 1 + ], + "weekDays": [ + "Wednesday" + ] + }, + "startTime": "string", + "timeZone": "string", + "triggerType": "Recurrence" + }, + "sparkConfiguration": { + "string": "string" + }, + "storeType": "Offline" + }, + "properties": { + "string": "string" + }, + "provisioningState": "Failed", + "specification": { + "path": "string" + }, + "stage": "string", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:52", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:52", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "FeaturesetVersions_CreateOrUpdate", + "title": "CreateOrUpdate Workspace Featureset Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Delete.json new file mode 100644 index 0000000000..291b4ba208 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "FeaturesetVersions_Delete", + "title": "Delete Workspace Featureset Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Get.json new file mode 100644 index 0000000000..2bbe768dea --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Get.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "entities": [ + "string" + ], + "isAnonymous": false, + "isArchived": false, + "materializationSettings": { + "notification": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "resource": { + "instanceType": "string" + }, + "schedule": { + "endTime": "string", + "frequency": "Minute", + "interval": 1, + "schedule": { + "hours": [ + 1 + ], + "minutes": [ + 1 + ], + "monthDays": [ + 1 + ], + "weekDays": [ + "Wednesday" + ] + }, + "startTime": "string", + "timeZone": "string", + "triggerType": "Recurrence" + }, + "sparkConfiguration": { + "string": "string" + }, + "storeType": "None" + }, + "properties": { + "string": "string" + }, + "provisioningState": "Succeeded", + "specification": { + "path": "string" + }, + "stage": "string", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:52", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:52", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + } + }, + "operationId": "FeaturesetVersions_Get", + "title": "Get Workspace Featureset Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_List.json new file mode 100644 index 0000000000..f09dd7bb99 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_List.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "name": "string", + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "listViewType": "All", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tags": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "entities": [ + "string" + ], + "isAnonymous": false, + "isArchived": false, + "materializationSettings": { + "notification": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ] + }, + "resource": { + "instanceType": "string" + }, + "schedule": { + "endTime": "string", + "frequency": "Month", + "interval": 1, + "schedule": { + "hours": [ + 1 + ], + "minutes": [ + 1 + ], + "monthDays": [ + 1 + ], + "weekDays": [ + "Saturday" + ] + }, + "startTime": "string", + "timeZone": "string", + "triggerType": "Recurrence" + }, + "sparkConfiguration": { + "string": "string" + }, + "storeType": "Offline" + }, + "properties": { + "string": "string" + }, + "provisioningState": "Canceled", + "specification": { + "path": "string" + }, + "stage": "string", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:49", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:49", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "FeaturesetVersions_List", + "title": "List Workspace Featureset Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_ListMaterializationJobs.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_ListMaterializationJobs.json new file mode 100644 index 0000000000..3329792933 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_ListMaterializationJobs.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "name": "string", + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "featureWindowEnd": "string", + "featureWindowStart": "string", + "filters": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "type": "RecurrentMaterialization", + "createdDate": "2020-01-01T12:34:56.999+00:53", + "displayName": "string", + "duration": "PT5M", + "experimentId": "string", + "featureWindow": { + "featureWindowEnd": "2020-01-01T12:34:56.999+00:53", + "featureWindowStart": "2020-01-01T12:34:56.999+00:53" + }, + "jobId": "string", + "status": "CancelRequested", + "tags": { + "string": "string" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "FeaturesetVersions_ListMaterializationJobs", + "title": "ListMaterializationJobs Workspace Featureset Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_CreateOrUpdate.json new file mode 100644 index 0000000000..6528fd4beb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_CreateOrUpdate.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "isArchived": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:38", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:38", + "lastModifiedBy": "string", + "lastModifiedByType": "ManagedIdentity" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:38", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:38", + "lastModifiedBy": "string", + "lastModifiedByType": "ManagedIdentity" + } + }, + "headers": {} + } + }, + "operationId": "FeaturestoreEntityContainers_CreateOrUpdate", + "title": "CreateOrUpdate Workspace Featurestore Entity Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_Delete.json new file mode 100644 index 0000000000..40bd3cc904 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "FeaturestoreEntityContainers_Delete", + "title": "Delete Workspace Featurestore Entity Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_GetEntity.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_GetEntity.json new file mode 100644 index 0000000000..3f3681b9a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_GetEntity.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Updating", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:43", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:43", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "FeaturestoreEntityContainers_GetEntity", + "title": "GetEntity Workspace Featurestore Entity Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_List.json new file mode 100644 index 0000000000..0a7348058c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_List.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "listViewType": "All", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tags": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Canceled", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:43", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:43", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "FeaturestoreEntityContainers_List", + "title": "List Workspace Featurestore Entity Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..60fdafaec5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_CreateOrUpdate.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "indexColumns": [ + { + "columnName": "string", + "dataType": "Datetime" + } + ], + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "indexColumns": [ + { + "columnName": "string", + "dataType": "Integer" + } + ], + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "provisioningState": "Succeeded", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:58", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:58", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "indexColumns": [ + { + "columnName": "string", + "dataType": "Integer" + } + ], + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "provisioningState": "Canceled", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:58", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:58", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "FeaturestoreEntityVersions_CreateOrUpdate", + "title": "CreateOrUpdate Workspace Featurestore Entity Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Delete.json new file mode 100644 index 0000000000..a6f2862252 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "FeaturestoreEntityVersions_Delete", + "title": "Delete Workspace Featurestore Entity Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Get.json new file mode 100644 index 0000000000..21fff2c833 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Get.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "indexColumns": [ + { + "columnName": "string", + "dataType": "Datetime" + } + ], + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:57", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:57", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "FeaturestoreEntityVersions_Get", + "title": "Get Workspace Featurestore Entity Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_List.json new file mode 100644 index 0000000000..382b469b26 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_List.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "name": "string", + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "listViewType": "ActiveOnly", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tags": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "indexColumns": [ + { + "columnName": "string", + "dataType": "Datetime" + } + ], + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:55", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:55", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "FeaturestoreEntityVersions_List", + "title": "List Workspace Featurestore Entity Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Cancel.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Cancel.json new file mode 100644 index 0000000000..10363d4516 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Cancel.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Jobs_Cancel", + "title": "Cancel Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateAutoMlJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateAutoMlJob.json new file mode 100644 index 0000000000..e7d113fc0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateAutoMlJob.json @@ -0,0 +1,335 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Direct", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Premium", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "f69c8d5a-9b39-4183-92d3-a2b18944cf95": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + } + } + }, + "tags": { + "string": "string" + } + } + }, + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "ReadWriteMount", + "uri": "string" + } + }, + "parameters": { + "a6f57022-8e31-44db-98e6-fa9495abb01c": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Basic", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "94ce04ed-3b17-4e48-a2a6-a923068268fd": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "CancelRequested", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:22", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:22", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Direct", + "uri": "string" + } + }, + "parameters": { + "342c3b36-f4d6-4af6-8410-7198803cff8f": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Premium", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "0aec33cb-4916-4b3b-b610-35f3f78cc6f0": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Provisioning", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:22", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:22", + "lastModifiedBy": "string", + "lastModifiedByType": "ManagedIdentity" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_CreateOrUpdate", + "title": "CreateOrUpdate AutoML Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateCommandJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateCommandJob.json new file mode 100644 index 0000000000..ee52bb0041 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateCommandJob.json @@ -0,0 +1,335 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCancelled" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Basic", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "c9ac10d0-915b-4de5-afe8-a4c78a37a558": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + } + } + }, + "tags": { + "string": "string" + } + } + }, + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCancelled" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "parameters": { + "56fc2716-8290-4394-867e-14e89387af68": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Basic", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "500bc411-5f81-4b2c-aae9-f84c33146a4c": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Queued", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:23", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:23", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "parameters": { + "e3455adb-ad77-4518-985a-c60703f3d3ea": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Standard", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "56a57b62-09f2-48ee-a4ec-a19a230a6aa0": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Preparing", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:23", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:23", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_CreateOrUpdate", + "title": "CreateOrUpdate Command Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdatePipelineJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdatePipelineJob.json new file mode 100644 index 0000000000..4a850526cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdatePipelineJob.json @@ -0,0 +1,170 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "computeId": "string", + "displayName": "string", + "experimentName": "string", + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "jobType": "Pipeline", + "outputs": { + "string": { + "description": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "services": { + "string": { + "endpoint": "string", + "jobServiceType": "string", + "port": 1, + "properties": { + "string": "string" + } + } + }, + "settings": {}, + "tags": { + "string": "string" + } + } + }, + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "computeId": "string", + "displayName": "string", + "experimentName": "string", + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "jobType": "Pipeline", + "outputs": { + "string": { + "description": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "settings": {}, + "status": "NotStarted", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "computeId": "string", + "displayName": "string", + "experimentName": "string", + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "jobType": "Pipeline", + "outputs": { + "string": { + "description": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "settings": {}, + "status": "NotStarted", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_CreateOrUpdate", + "title": "CreateOrUpdate Pipeline Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateSweepJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateSweepJob.json new file mode 100644 index 0000000000..5611ad6c8d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateSweepJob.json @@ -0,0 +1,335 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "ReadWriteMount", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Basic", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "5fc1f627-491e-45a0-a6a2-f5b4be884911": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + } + } + }, + "tags": { + "string": "string" + } + } + }, + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "parameters": { + "5489ee88-92db-4266-b321-ed47823d52b8": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Standard", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "b2de23ac-268c-459c-bbf3-0d8ece77d247": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Starting", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:25", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:25", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "parameters": { + "307f11f6-ff8d-450d-b8a3-4c9d0f7d883f": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Standard", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "64db9b4b-db26-4473-9eb8-49e5e5cbeb3f": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Starting", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:25", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:25", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_CreateOrUpdate", + "title": "CreateOrUpdate Sweep Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Delete.json new file mode 100644 index 0000000000..f087f998ab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "Jobs_Delete", + "title": "Delete Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetAutoMlJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetAutoMlJob.json new file mode 100644 index 0000000000..105ea46a11 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetAutoMlJob.json @@ -0,0 +1,127 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Enabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "parameters": { + "30a01c8b-9d69-4924-8a14-63a1fbd78f3a": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Basic", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "9c4f5d89-ed21-42e3-9263-246633ca4a50": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Scheduled", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:19", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:19", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_Get", + "title": "Get AutoML Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetCommandJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetCommandJob.json new file mode 100644 index 0000000000..fb59a2e59d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetCommandJob.json @@ -0,0 +1,127 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Enabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "ReadWriteMount", + "uri": "string" + } + }, + "parameters": { + "049b85fe-425d-4ec6-b194-85c0f2771fe5": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Spot", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "a2da3516-d5bf-4e6f-a220-463602afc87c": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "NotStarted", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:23", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:23", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_Get", + "title": "Get Command Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetPipelineJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetPipelineJob.json new file mode 100644 index 0000000000..fe498e8ab1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetPipelineJob.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "computeId": "string", + "displayName": "string", + "experimentName": "string", + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "jobType": "Pipeline", + "outputs": { + "string": { + "description": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "settings": {}, + "status": "NotStarted", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_Get", + "title": "Get Pipeline Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetSweepJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetSweepJob.json new file mode 100644 index 0000000000..e9935edff8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetSweepJob.json @@ -0,0 +1,127 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCancelled" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Direct", + "uri": "string" + } + }, + "parameters": { + "92ae6a47-dc8b-407a-88d1-2e8a1932e15a": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Premium", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "81750226-212a-41d5-b3c3-d6ba8a48ed6e": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Preparing", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:24", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:24", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_Get", + "title": "Get Sweep Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListAutoMlJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListAutoMlJob.json new file mode 100644 index 0000000000..811a76aca1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListAutoMlJob.json @@ -0,0 +1,138 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "assetName": "string", + "jobType": "string", + "listViewType": "All", + "resourceGroupName": "test-rg", + "scheduleId": "string", + "scheduled": false, + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tag": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "ReadWriteMount", + "uri": "string" + } + }, + "parameters": { + "1a89709e-1af8-41de-99c1-0349bd20e005": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Spot", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "4e53b3df-bd02-42d1-a3cd-ee4678c0b79f": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Failed", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:22", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:22", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Jobs_List", + "title": "List AutoML Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListCommandJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListCommandJob.json new file mode 100644 index 0000000000..0ffc703430 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListCommandJob.json @@ -0,0 +1,138 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "assetName": "string", + "jobType": "string", + "listViewType": "ActiveOnly", + "resourceGroupName": "test-rg", + "scheduleId": "string", + "scheduled": false, + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tag": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCancelled" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "ReadWriteMount", + "uri": "string" + } + }, + "parameters": { + "13a3c675-c28b-4143-807e-fde07ad06a01": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Basic", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "47f85ca1-a889-4417-a451-2ebca543e605": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Failed", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:23", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:23", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Jobs_List", + "title": "List Command Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListPipelineJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListPipelineJob.json new file mode 100644 index 0000000000..2946f136fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListPipelineJob.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "jobType": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tag": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "computeId": "string", + "displayName": "string", + "experimentName": "string", + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "jobType": "Pipeline", + "outputs": { + "string": { + "description": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "settings": {}, + "status": "NotStarted", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Jobs_List", + "title": "List Pipeline Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListSweepJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListSweepJob.json new file mode 100644 index 0000000000..d0932c0236 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListSweepJob.json @@ -0,0 +1,138 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "assetName": "string", + "jobType": "string", + "listViewType": "ActiveOnly", + "resourceGroupName": "test-rg", + "scheduleId": "string", + "scheduled": false, + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tag": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Direct", + "uri": "string" + } + }, + "parameters": { + "ed0b17ef-7461-4e01-92bb-376554a4ee87": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Premium", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "0a76565a-7e17-45ce-bdea-0548a617ce27": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Running", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:25", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:25", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Jobs_List", + "title": "List Sweep Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Update.json new file mode 100644 index 0000000000..d63996a8fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Update.json @@ -0,0 +1,156 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "notificationSetting": { + "webhooks": { + "string": { + "eventType": "string", + "webhookType": "AzureDevOps" + } + } + } + } + }, + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Enabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ], + "webhooks": { + "string": { + "eventType": "string", + "webhookType": "AzureDevOps" + } + } + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "autoDeleteSetting": { + "condition": "CreatedGreaterThan", + "value": "string" + }, + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "parameters": { + "6f851dd9-5a2d-4bd7-8a67-3b0e6a075bdb": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Premium", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "maxInstanceCount": 1, + "properties": { + "string": { + "00cac5bf-6a80-4db4-9c7f-1feebe8c21c8": null + } + }, + "shmSize": "2g" + }, + "secretsConfiguration": { + "string": { + "uri": null, + "workspaceSecretName": "string" + } + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Canceled", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:44", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:44", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_Update", + "title": "Update Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_CreateOrUpdate.json new file mode 100644 index 0000000000..8d740177fc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_CreateOrUpdate.json @@ -0,0 +1,244 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "jobInstructions": { + "uri": "link/to/instructions" + }, + "jobType": "Labeling", + "labelCategories": { + "myCategory1": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory1Title", + "multiSelect": "Disabled" + }, + "myCategory2": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory2Title", + "multiSelect": "Disabled" + } + }, + "labelingJobMediaProperties": { + "mediaType": "Image" + }, + "mlAssistConfiguration": { + "inferencingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute", + "mlAssist": "Enabled", + "trainingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute" + }, + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + } + }, + "id": "testLabelingJob", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "name": "testLabelingJob", + "type": "Microsoft.MachineLearningServices/workspaces/labelingJobs", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/labelingJobs/testLabelingJob", + "properties": { + "description": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "jobInstructions": { + "uri": "link/to/instructions" + }, + "jobType": "Labeling", + "labelCategories": { + "myCategory1": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory1Title", + "multiSelect": "Disabled" + }, + "myCategory2": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory2Title", + "multiSelect": "Disabled" + } + }, + "labelingJobMediaProperties": { + "mediaType": "Image" + }, + "mlAssistConfiguration": { + "inferencingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute", + "mlAssist": "Enabled", + "trainingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute" + }, + "progressMetrics": { + "completedDatapointCount": 0, + "incrementalDataLastRefreshDateTime": "2020-12-08T01:23:37.234Z", + "skippedDatapointCount": 0, + "totalDatapointCount": 0 + }, + "projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "status": "NotStarted", + "statusMessages": [ + { + "code": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "level": "Error", + "message": "string" + } + ], + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + }, + "systemData": { + "createdAt": "2020-12-08T01:23:37.235Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-12-08T01:23:37.235Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + }, + "201": { + "body": { + "name": "testLabelingJob", + "type": "Microsoft.MachineLearningServices/workspaces/labelingJobs", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/labelingJobs/testLabelingJob", + "properties": { + "description": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "jobInstructions": { + "uri": "link/to/instructions" + }, + "jobType": "Labeling", + "labelCategories": { + "myCategory1": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory1Title", + "multiSelect": "Disabled" + }, + "myCategory2": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory2Title", + "multiSelect": "Disabled" + } + }, + "labelingJobMediaProperties": { + "mediaType": "Image" + }, + "mlAssistConfiguration": { + "inferencingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute", + "mlAssist": "Enabled", + "trainingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute" + }, + "progressMetrics": { + "completedDatapointCount": 0, + "incrementalDataLastRefreshDateTime": "2020-12-08T01:23:37.234Z", + "skippedDatapointCount": 0, + "totalDatapointCount": 0 + }, + "projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "status": "NotStarted", + "statusMessages": [ + { + "code": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "level": "Error", + "message": "string" + } + ], + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + }, + "systemData": { + "createdAt": "2020-12-08T01:23:37.235Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-12-08T01:23:37.235Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "LabelingJobs_CreateOrUpdate", + "title": "CreateOrUpdate Labeling Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Delete.json new file mode 100644 index 0000000000..c8ae638d45 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "testLabelingJob", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "LabelingJobs_Delete", + "title": "Delete Labeling Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_ExportLabels.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_ExportLabels.json new file mode 100644 index 0000000000..4ead918a34 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_ExportLabels.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "format": "Dataset" + }, + "id": "testLabelingJob", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "format": "Dataset", + "endDateTime": "2021-02-08T23:34:40.730Z", + "exportedRowCount": 0, + "labelingJobId": "string", + "startDateTime": "2021-02-08T23:34:40.730Z" + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "LabelingJobs_ExportLabels", + "title": "ExportLabels Labeling Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Get.json new file mode 100644 index 0000000000..8361187d89 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Get.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "testLabelingJob", + "includeJobInstructions": true, + "includeLabelCategories": true, + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "name": "testLabelingJob", + "type": "Microsoft.MachineLearningServices/workspaces/labelingJobs", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/labelingJobs/testLabelingJob", + "properties": { + "description": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "jobInstructions": { + "uri": "link/to/instructions" + }, + "jobType": "Labeling", + "labelCategories": { + "myCategory1": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory1Title", + "multiSelect": "Disabled" + }, + "myCategory2": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory2Title", + "multiSelect": "Disabled" + } + }, + "labelingJobMediaProperties": { + "mediaType": "Image" + }, + "mlAssistConfiguration": { + "inferencingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute", + "mlAssist": "Enabled", + "trainingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute" + }, + "progressMetrics": { + "completedDatapointCount": 0, + "incrementalDataLastRefreshDateTime": "2020-12-08T01:23:37.234Z", + "skippedDatapointCount": 0, + "totalDatapointCount": 0 + }, + "projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "status": "NotStarted", + "statusMessages": [ + { + "code": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "level": "Error", + "message": "string" + } + ], + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + }, + "systemData": { + "createdAt": "2020-12-08T01:23:37.235Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-12-08T01:23:37.235Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "LabelingJobs_Get", + "title": "Get Labeling Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_List.json new file mode 100644 index 0000000000..7e453318f7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_List.json @@ -0,0 +1,106 @@ +{ + "parameters": { + "$skipToken": "skiptoken", + "api-version": "2023-06-01-preview", + "count": "10", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "nextlink", + "value": [ + { + "name": "testLabelingJob", + "type": "Microsoft.MachineLearningServices/workspaces/labelingJobs", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/labelingJobs/testLabelingJob", + "properties": { + "description": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "jobInstructions": { + "uri": "link/to/instructions" + }, + "jobType": "Labeling", + "labelCategories": { + "myCategory1": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory1Title", + "multiSelect": "Disabled" + }, + "myCategory2": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory2Title", + "multiSelect": "Disabled" + } + }, + "labelingJobMediaProperties": { + "mediaType": "Image" + }, + "mlAssistConfiguration": { + "inferencingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute", + "mlAssist": "Enabled", + "trainingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute" + }, + "progressMetrics": { + "completedDatapointCount": 0, + "incrementalDataLastRefreshDateTime": "2020-12-08T01:23:37.234Z", + "skippedDatapointCount": 0, + "totalDatapointCount": 0 + }, + "projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "status": "NotStarted", + "statusMessages": [ + { + "code": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "level": "Error", + "message": "string" + } + ], + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + }, + "systemData": { + "createdAt": "2020-12-08T01:23:37.235Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-12-08T01:23:37.235Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + } + } + }, + "operationId": "LabelingJobs_List", + "title": "List Labeling Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Pause.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Pause.json new file mode 100644 index 0000000000..c7336f56b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Pause.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "testLabelingJob", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": {} + }, + "operationId": "LabelingJobs_Pause", + "title": "Pause Labeling Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Resume.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Resume.json new file mode 100644 index 0000000000..cee3ed086a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Resume.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "testLabelingJob", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "LabelingJobs_Resume", + "title": "Resume Labeling Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkProvisions_ProvisionManagedNetwork.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkProvisions_ProvisionManagedNetwork.json new file mode 100644 index 0000000000..742271c993 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkProvisions_ProvisionManagedNetwork.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "includeSpark": false + }, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "aml-workspace-name" + }, + "responses": { + "200": { + "body": { + "sparkReady": true, + "status": "Active" + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "ManagedNetworkProvisions_ProvisionManagedNetwork", + "title": "Provision ManagedNetwork" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_CreateOrUpdate.json new file mode 100644 index 0000000000..8b6d22ce04 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_CreateOrUpdate.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "type": "FQDN", + "category": "UserDefined", + "destination": "some_string", + "status": "Active" + } + }, + "resourceGroupName": "test-rg", + "ruleName": "some_string", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "aml-workspace-name" + }, + "responses": { + "200": { + "body": { + "name": "some_string", + "type": "some_string", + "id": "some_string", + "properties": { + "type": "FQDN", + "category": "UserDefined", + "destination": "some_string", + "status": "Active" + } + }, + "headers": {} + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "ManagedNetworkSettingsRule_CreateOrUpdate", + "title": "CreateOrUpdate ManagedNetworkSettingsRule" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Delete.json new file mode 100644 index 0000000000..f920ee0a78 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "ruleName": "some_string", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "aml-workspace-name" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "ManagedNetworkSettingsRule_Delete", + "title": "Delete ManagedNetworkSettingsRule" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Get.json new file mode 100644 index 0000000000..63cbeaa006 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "ruleName": "some_string", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "aml-workspace-name" + }, + "responses": { + "200": { + "body": { + "name": "some_string", + "type": "some_string", + "id": "some_string", + "properties": { + "type": "FQDN", + "category": "UserDefined", + "destination": "some_string", + "status": "Active" + } + }, + "headers": {} + } + }, + "operationId": "ManagedNetworkSettingsRule_Get", + "title": "Get ManagedNetworkSettingsRule" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_List.json new file mode 100644 index 0000000000..6442327a76 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_List.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "aml-workspace-name" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "some_string", + "type": "some_string", + "id": "some_string", + "properties": { + "type": "FQDN", + "category": "Required", + "destination": "some_string", + "status": "Inactive" + } + }, + { + "name": "some_string", + "type": "some_string", + "id": "some_string", + "properties": { + "type": "FQDN", + "category": "Required", + "destination": "some_string", + "status": "Inactive" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "ManagedNetworkSettingsRule_List", + "title": "List ManagedNetworkSettingsRule" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment.json new file mode 100644 index 0000000000..b191e9fec6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment.json @@ -0,0 +1,246 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "containerResourceRequirements": { + "containerResourceLimits": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + }, + "containerResourceRequests": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + } + }, + "endpointComputeType": "Kubernetes", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "containerResourceRequirements": { + "containerResourceLimits": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + }, + "containerResourceRequests": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + } + }, + "endpointComputeType": "Kubernetes", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "containerResourceRequirements": { + "containerResourceLimits": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + }, + "containerResourceRequests": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + } + }, + "endpointComputeType": "Kubernetes", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "OnlineDeployments_CreateOrUpdate", + "title": "CreateOrUpdate Kubernetes Online Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateManagedOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateManagedOnlineDeployment.json new file mode 100644 index 0000000000..026f63927a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateManagedOnlineDeployment.json @@ -0,0 +1,231 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "endpointComputeType": "Managed", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "readinessProbe": { + "failureThreshold": 30, + "initialDelay": "PT1S", + "period": "PT10S", + "successThreshold": 1, + "timeout": "PT2S" + }, + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "endpointComputeType": "Managed", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "readinessProbe": { + "failureThreshold": 30, + "initialDelay": "PT1S", + "period": "PT10S", + "successThreshold": 1, + "timeout": "PT2S" + }, + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "endpointComputeType": "Managed", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "readinessProbe": { + "failureThreshold": 30, + "initialDelay": "PT1S", + "period": "PT10S", + "successThreshold": 1, + "timeout": "PT2S" + }, + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "OnlineDeployments_CreateOrUpdate", + "title": "CreateOrUpdate Managed Online Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Delete.json new file mode 100644 index 0000000000..5c4f629cab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "deploymentName": "testDeployment", + "endpointName": "testEndpoint", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "workspace123" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "OnlineDeployments_Delete", + "title": "Delete Workspace Online Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_GetLogs.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_GetLogs.json new file mode 100644 index 0000000000..3ea8b51160 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_GetLogs.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "containerType": "StorageInitializer", + "tail": 0 + }, + "deploymentName": "testDeployment", + "endpointName": "testEndpoint", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "workspace123" + }, + "responses": { + "200": { + "body": { + "content": "string" + } + } + }, + "operationId": "OnlineDeployments_GetLogs", + "title": "Get Online Deployment Logs." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetKubernetesOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetKubernetesOnlineDeployment.json new file mode 100644 index 0000000000..ddf2d7256d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetKubernetesOnlineDeployment.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "containerResourceRequirements": { + "containerResourceLimits": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + }, + "containerResourceRequests": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + } + }, + "endpointComputeType": "Kubernetes", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "OnlineDeployments_Get", + "title": "Get Kubernetes Online Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetManagedOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetManagedOnlineDeployment.json new file mode 100644 index 0000000000..63417542f1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetManagedOnlineDeployment.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "endpointComputeType": "Managed", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "readinessProbe": { + "failureThreshold": 30, + "initialDelay": "PT1S", + "period": "PT10S", + "successThreshold": 1, + "timeout": "PT2S" + }, + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "OnlineDeployments_Get", + "title": "Get Managed Online Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_List.json new file mode 100644 index 0000000000..dcc730ad04 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_List.json @@ -0,0 +1,105 @@ +{ + "parameters": { + "$orderBy": "string", + "$skipToken": "string", + "$top": 1, + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "containerResourceRequirements": { + "containerResourceLimits": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + }, + "containerResourceRequests": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + } + }, + "endpointComputeType": "Kubernetes", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + }, + "headers": {} + } + }, + "operationId": "OnlineDeployments_List", + "title": "List Online Deployments." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListKubernetesOnlineDeploymentSkus.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListKubernetesOnlineDeploymentSkus.json new file mode 100644 index 0000000000..69bb8c9541 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListKubernetesOnlineDeploymentSkus.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "count": 1, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "capacity": { + "default": 1, + "maximum": 1, + "minimum": 1, + "scaleType": "Automatic" + }, + "resourceType": "Microsoft.MachineLearning.Services/endpoints/deployments", + "sku": { + "name": "string", + "tier": "Free" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "OnlineDeployments_ListSkus", + "title": "List Kubernetes Online Deployment Skus." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListManagedOnlineDeploymentSkus.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListManagedOnlineDeploymentSkus.json new file mode 100644 index 0000000000..67ed12587d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListManagedOnlineDeploymentSkus.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "count": 1, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "capacity": { + "default": 1, + "maximum": 1, + "minimum": 1, + "scaleType": "Automatic" + }, + "resourceType": "Microsoft.MachineLearning.Services/endpoints/deployments", + "sku": { + "name": "string", + "tier": "Free" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "OnlineDeployments_ListSkus", + "title": "List Managed Online Deployment Skus." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateKubernetesOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateKubernetesOnlineDeployment.json new file mode 100644 index 0000000000..63b21ad6e0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateKubernetesOnlineDeployment.json @@ -0,0 +1,113 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "containerResourceRequirements": { + "containerResourceLimits": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + }, + "containerResourceRequests": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + } + }, + "endpointComputeType": "Kubernetes", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "OnlineDeployments_Update", + "title": "Update Kubernetes Online Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateManagedOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateManagedOnlineDeployment.json new file mode 100644 index 0000000000..3739adb3fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateManagedOnlineDeployment.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "endpointComputeType": "Managed", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "readinessProbe": { + "failureThreshold": 30, + "initialDelay": "PT1S", + "period": "PT10S", + "successThreshold": 1, + "timeout": "PT2S" + }, + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "OnlineDeployments_Update", + "title": "Update Managed Online Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_CreateOrUpdate.json new file mode 100644 index 0000000000..24b4db7ab6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_CreateOrUpdate.json @@ -0,0 +1,144 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "compute": "string", + "properties": { + "string": "string" + }, + "traffic": { + "string": 1 + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "compute": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example", + "traffic": { + "string": 1 + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "compute": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example", + "traffic": { + "string": 1 + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "OnlineEndpoints_CreateOrUpdate", + "title": "CreateOrUpdate Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Delete.json new file mode 100644 index 0000000000..a5f50484db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "OnlineEndpoints_Delete", + "title": "Delete Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Get.json new file mode 100644 index 0000000000..123c6b43fc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Get.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "compute": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example", + "traffic": { + "string": 1 + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "OnlineEndpoints_Get", + "title": "Get Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_GetToken.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_GetToken.json new file mode 100644 index 0000000000..f650aaafc6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_GetToken.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "accessToken": "string", + "expiryTimeUtc": 1, + "refreshAfterTimeUtc": 1, + "tokenType": "string" + }, + "headers": {} + } + }, + "operationId": "OnlineEndpoints_GetToken", + "title": "GetToken Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_List.json new file mode 100644 index 0000000000..f458581546 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_List.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "name": "string", + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "computeType": "Managed", + "count": 1, + "orderBy": "CreatedAtDesc", + "properties": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tags": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "compute": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example", + "traffic": { + "string": 1 + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + }, + "headers": {} + } + }, + "operationId": "OnlineEndpoints_List", + "title": "List Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_ListKeys.json new file mode 100644 index 0000000000..7f70965758 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_ListKeys.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "primaryKey": "string", + "secondaryKey": "string" + }, + "headers": {} + } + }, + "operationId": "OnlineEndpoints_ListKeys", + "title": "ListKeys Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_RegenerateKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_RegenerateKeys.json new file mode 100644 index 0000000000..c75d1d82da --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_RegenerateKeys.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "keyType": "Primary", + "keyValue": "string" + }, + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus...", + "Location": "https://management.azure.com/subscriptions/...pathToOperationResult..." + } + } + }, + "operationId": "OnlineEndpoints_RegenerateKeys", + "title": "RegenerateKeys Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Update.json new file mode 100644 index 0000000000..aa3b0eedda --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Update.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "tags": {} + }, + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "compute": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example", + "traffic": { + "string": 1 + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "OnlineEndpoints_Update", + "title": "Update Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json new file mode 100644 index 0000000000..a573975c29 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "status": "Approved" + } + } + }, + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "resourceGroupName": "rg-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.MachineLearningServices/workspaces/privateEndpointConnections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "PrivateEndpointConnections_CreateOrUpdate", + "title": "WorkspacePutPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json new file mode 100644 index 0000000000..3508cf7e0f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "resourceGroupName": "rg-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "PrivateEndpointConnections_Delete", + "title": "WorkspacePutPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json new file mode 100644 index 0000000000..f6f4408154 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "resourceGroupName": "rg-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.MachineLearningServices/workspaces/privateEndpointConnections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "PrivateEndpointConnections_Get", + "title": "WorkspaceGetPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_List.json new file mode 100644 index 0000000000..e0c4fa243a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_List.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "resourceGroupName": "rg-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.MachineLearningServices/workspaces/privateEndpointConnections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + }, + { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.MachineLearningServices/workspaces/privateEndpointConnections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "PrivateEndpointConnections_List", + "title": "StorageAccountListPrivateEndpointConnections" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_List.json new file mode 100644 index 0000000000..2fb3fec515 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_List.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "monitor": "true", + "resourceGroupName": "rg-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "amlworkspace", + "type": "Microsoft.MachineLearningServices/workspaces/privateLinkResources", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateLinkResources/amlworkspace", + "properties": { + "groupId": "amlworkspace", + "requiredMembers": [ + "default" + ] + } + } + ] + } + } + }, + "operationId": "PrivateLinkResources_List", + "title": "WorkspaceListPrivateLinkResources" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_CreateOrUpdate.json new file mode 100644 index 0000000000..6d36d6fc0f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_CreateOrUpdate.json @@ -0,0 +1,280 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "None", + "userAssignedIdentities": { + "string": {} + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "registryName": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "id": "string", + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:38", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:38", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "id": "string", + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:38", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:38", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "Registries_CreateOrUpdate", + "title": "CreateOrUpdate Registry with system created accounts." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Delete.json new file mode 100644 index 0000000000..844532d746 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "registryName": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location", + "Retry-After": 100 + } + }, + "204": {} + }, + "operationId": "Registries_Delete", + "title": "Delete Registry." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Get.json new file mode 100644 index 0000000000..f1290b304d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Get.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "registryName": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "id": "string", + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:40", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:40", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "Registries_Get", + "title": "Get Registry with system created accounts." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_List.json new file mode 100644 index 0000000000..6b55055fa5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_List.json @@ -0,0 +1,112 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "id": "string", + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:40", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:40", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + }, + "headers": {} + } + }, + "operationId": "Registries_List", + "title": "List registries with system created accounts." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_ListBySubscription.json new file mode 100644 index 0000000000..032d596eea --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_ListBySubscription.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "id": "string", + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:15", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:15", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + }, + "headers": {} + } + }, + "operationId": "Registries_ListBySubscription", + "title": "List registries by subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_RemoveRegions.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_RemoveRegions.json new file mode 100644 index 0000000000..05bcee768a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_RemoveRegions.json @@ -0,0 +1,190 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "None", + "userAssignedIdentities": { + "string": {} + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "registryName": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "id": "string", + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:01", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:01", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "202": { + "headers": { + "Location": "example_location", + "Retry-After": 100 + } + } + }, + "operationId": "Registries_RemoveRegions", + "title": "Remove regions from registry" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Update.json new file mode 100644 index 0000000000..9d2950534a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Update.json @@ -0,0 +1,124 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Basic" + }, + "tags": {} + }, + "registryName": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "id": "string", + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:02", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:02", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "Registries_Update", + "title": "Update Registry with system created accounts." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_CreateOrUpdate.json new file mode 100644 index 0000000000..aa39067926 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_CreateOrUpdate.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + }, + "codeName": "testContainer", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/codes", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/codes/testContainer", + "properties": { + "description": "string", + "tags": { + "property1": "string", + "property2": "string" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + }, + "201": { + "body": { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/codes", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/codes/testContainer", + "properties": { + "description": "string", + "tags": { + "property1": "string", + "property2": "string" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "RegistryCodeContainers_CreateOrUpdate", + "title": "CreateOrUpdate Registry Code Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Delete.json new file mode 100644 index 0000000000..08f316d8a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "codeName": "testContainer", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryCodeContainers_Delete", + "title": "Delete Registry Code Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Get.json new file mode 100644 index 0000000000..0ff281f4b2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Get.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "codeName": "testContainer", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/codes", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testworkspace/codes/testContainer", + "properties": { + "description": "string", + "tags": { + "property1": "string", + "property2": "string" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-08-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "RegistryCodeContainers_Get", + "title": "Get Registry Code Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_List.json new file mode 100644 index 0000000000..cf525178f4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_List.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "$skipToken": "skiptoken", + "api-version": "2023-06-01-preview", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/codes", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/codes/testContainer", + "properties": { + "description": "string", + "tags": { + "property1": "string", + "property2": "string" + } + }, + "systemData": { + "createdAt": "2020-08-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-08-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + }, + { + "name": "testContainer2", + "type": "Microsoft.MachineLearningServices/registries/codes", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/codes/testContainer2", + "properties": { + "description": "string", + "tags": { + "property1": "string", + "property2": "string" + } + }, + "systemData": { + "createdAt": "2020-08-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-08-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + ] + } + } + }, + "operationId": "RegistryCodeContainers_List", + "title": "List Registry Code Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrGetStartPendingUpload.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrGetStartPendingUpload.json new file mode 100644 index 0000000000..83b46d7a38 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrGetStartPendingUpload.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "pendingUploadId": "string", + "pendingUploadType": "None" + }, + "codeName": "string", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "blobReferenceForConsumption": { + "blobUri": "https://www.contoso.com/example", + "credential": { + "credentialType": "SAS", + "sasUri": "https://www.contoso.com/example" + }, + "storageAccountArmId": "string" + }, + "pendingUploadId": "string", + "pendingUploadType": "None" + }, + "headers": {} + } + }, + "operationId": "RegistryCodeVersions_CreateOrGetStartPendingUpload", + "title": "CreateOrGetStartPendingUpload Registry Code Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..ef785e34fe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrUpdate.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "codeUri": "https://blobStorage/folderName", + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "codeName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "codeUri": "https://blobStorage/folderName", + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "codeUri": "https://blobStorage/folderName", + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryCodeVersions_CreateOrUpdate", + "title": "CreateOrUpdate Registry Code Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Delete.json new file mode 100644 index 0000000000..85d109592b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "codeName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryCodeVersions_Delete", + "title": "Delete Registry Code Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Get.json new file mode 100644 index 0000000000..993ad3bc88 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Get.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "codeName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "codeUri": "https://blobStorage/folderName", + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryCodeVersions_Get", + "title": "Get Registry Code Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_List.json new file mode 100644 index 0000000000..983e114019 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_List.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "$orderBy": "string", + "$skipToken": "string", + "$top": 1, + "api-version": "2023-06-01-preview", + "codeName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "codeUri": "https://blobStorage/folderName", + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "RegistryCodeVersions_List", + "title": "List Registry Code Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_CreateOrUpdate.json new file mode 100644 index 0000000000..cd3e797313 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_CreateOrUpdate.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "componentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryComponentContainers_CreateOrUpdate", + "title": "CreateOrUpdate Registry Component Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Delete.json new file mode 100644 index 0000000000..a85d440f8a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "componentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryComponentContainers_Delete", + "title": "Delete Registry Component Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Get.json new file mode 100644 index 0000000000..f5e4a1962a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Get.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "componentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryComponentContainers_Get", + "title": "Get Registry Component Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_List.json new file mode 100644 index 0000000000..5ab76243c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_List.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "componentName": "testContainer", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "RegistryComponentContainers_List", + "title": "List Registry Component Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..8267b5ab42 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_CreateOrUpdate.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "componentSpec": { + "8ced901b-d826-477d-bfef-329da9672513": null + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "componentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "componentSpec": { + "2de2e74e-457d-4447-a581-933abc2b9d96": null + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "componentSpec": { + "a6c1349d-5e45-48da-92c3-3ce176cb30e9": null + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryComponentVersions_CreateOrUpdate", + "title": "CreateOrUpdate Registry Component Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Delete.json new file mode 100644 index 0000000000..2ab88b1996 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "componentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryComponentVersions_Delete", + "title": "Delete Registry Component Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Get.json new file mode 100644 index 0000000000..c9adab841b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Get.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "componentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "componentSpec": { + "1a7c40b5-2029-4f5f-a8d6-fd0822038773": null + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryComponentVersions_Get", + "title": "Get Registry Component Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_List.json new file mode 100644 index 0000000000..4dd54447bb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_List.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "$orderBy": "string", + "$skipToken": "string", + "$top": 1, + "api-version": "2023-06-01-preview", + "componentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "componentSpec": { + "50acbce5-cccc-475a-8ac6-c4da402afbd8": null + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "RegistryComponentVersions_List", + "title": "List Registry Component Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_CreateOrUpdate.json new file mode 100644 index 0000000000..c56e4bbdda --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_CreateOrUpdate.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "dataType": "uri_folder", + "isArchived": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "mltable", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:15", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:15", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "uri_folder", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:15", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:15", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + } + }, + "operationId": "RegistryDataContainers_CreateOrUpdate", + "title": "CreateOrUpdate Registry Data Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Delete.json new file mode 100644 index 0000000000..bb23ecaae0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryDataContainers_Delete", + "title": "Delete Registry Data Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Get.json new file mode 100644 index 0000000000..c5d58db0f9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Get.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "uri_file", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:14", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:14", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "RegistryDataContainers_Get", + "title": "Get Registry Data Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_List.json new file mode 100644 index 0000000000..a5bcb8972e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_List.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "listViewType": "All", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "uri_folder", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:15", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:15", + "lastModifiedBy": "string", + "lastModifiedByType": "ManagedIdentity" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "RegistryDataContainers_List", + "title": "RegistryList Registry Data Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrGetStartPendingUpload.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrGetStartPendingUpload.json new file mode 100644 index 0000000000..8b75f9284c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrGetStartPendingUpload.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "pendingUploadId": "string", + "pendingUploadType": "None" + }, + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "blobReferenceForConsumption": { + "blobUri": "https://www.contoso.com/example", + "credential": { + "credentialType": "SAS", + "sasUri": "https://www.contoso.com/example" + }, + "storageAccountArmId": "string" + }, + "pendingUploadId": "string", + "pendingUploadType": "None" + }, + "headers": {} + } + }, + "operationId": "RegistryDataVersions_CreateOrGetStartPendingUpload", + "title": "CreateOrGetStartPendingUpload Registry Data Version Base." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..eb421120a6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrUpdate.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "dataType": "mltable", + "dataUri": "string", + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "referencedUris": [ + "string" + ], + "tags": { + "string": "string" + } + } + }, + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "mltable", + "dataUri": "string", + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "referencedUris": [ + "string" + ], + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:13", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:13", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "mltable", + "dataUri": "string", + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "referencedUris": [ + "string" + ], + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:13", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:13", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "RegistryDataVersions_CreateOrUpdate", + "title": "CreateOrUpdate Registry Data Version Base." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Delete.json new file mode 100644 index 0000000000..d4f589166a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryDataVersions_Delete", + "title": "Delete Registry Data Version Base." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Get.json new file mode 100644 index 0000000000..a2ae6abc3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Get.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "mltable", + "dataUri": "string", + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "referencedUris": [ + "string" + ], + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:14", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:14", + "lastModifiedBy": "string", + "lastModifiedByType": "ManagedIdentity" + } + }, + "headers": {} + } + }, + "operationId": "RegistryDataVersions_Get", + "title": "Get Registry Data Version Base." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_List.json new file mode 100644 index 0000000000..046378130c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_List.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "name": "string", + "$orderBy": "string", + "$skipToken": "string", + "$tags": "string", + "$top": 1, + "api-version": "2023-06-01-preview", + "listViewType": "ArchivedOnly", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "mltable", + "dataUri": "string", + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "referencedUris": [ + "string" + ], + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:48", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:48", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "RegistryDataVersions_List", + "title": "RegistryList Registry Data Version Base." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_CreateOrUpdate.json new file mode 100644 index 0000000000..1dbd5b1050 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_CreateOrUpdate.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + } + }, + "environmentName": "testEnvironment", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "testEnvironment", + "type": "Microsoft.MachineLearningServices/registries/environments", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/environments/testEnvironment", + "properties": { + "description": "string", + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + }, + "systemData": { + "createdAt": "2020-12-04T03:39:11.300Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-12-04T03:39:11.300Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + }, + "201": { + "body": { + "name": "testEnvironment", + "type": "Microsoft.MachineLearningServices/registries/environments", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/environments/testEnvironment", + "properties": { + "description": "string", + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + }, + "systemData": { + "createdAt": "2020-12-04T03:39:11.301Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-12-04T03:39:11.301Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "RegistryEnvironmentContainers_CreateOrUpdate", + "title": "CreateOrUpdate Registry Environment Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Delete.json new file mode 100644 index 0000000000..5b35a7ae21 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "environmentName": "testContainer", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryEnvironmentContainers_Delete", + "title": "Delete Registry Environment Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Get.json new file mode 100644 index 0000000000..c9e9f26af7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Get.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "environmentName": "testEnvironment", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "testEnvironment", + "type": "Microsoft.MachineLearningServices/registries/environments", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/environments/testEnvironment", + "properties": { + "description": "string", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "RegistryEnvironmentContainers_Get", + "title": "Get Registry Environment Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_List.json new file mode 100644 index 0000000000..f910fb99db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_List.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "$skipToken": "skiptoken", + "api-version": "2023-06-01-preview", + "environmentName": "testContainer", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "testEnvironment", + "type": "Microsoft.MachineLearningServices/registries/environments", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/environments/testEnvironment", + "properties": { + "description": "string", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + ] + } + } + }, + "operationId": "RegistryEnvironmentContainers_List", + "title": "List Registry Environment Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..2fdc0fd8e7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_CreateOrUpdate.json @@ -0,0 +1,140 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "build": { + "contextUri": "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/", + "dockerfilePath": "prod/Dockerfile" + }, + "condaFile": "string", + "image": "docker.io/tensorflow/serving:latest", + "inferenceConfig": { + "livenessRoute": { + "path": "string", + "port": 1 + }, + "readinessRoute": { + "path": "string", + "port": 1 + }, + "scoringRoute": { + "path": "string", + "port": 1 + } + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "environmentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "build": { + "contextUri": "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/", + "dockerfilePath": "prod/Dockerfile" + }, + "condaFile": "string", + "environmentType": "Curated", + "image": "docker.io/tensorflow/serving:latest", + "inferenceConfig": { + "livenessRoute": { + "path": "string", + "port": 1 + }, + "readinessRoute": { + "path": "string", + "port": 1 + }, + "scoringRoute": { + "path": "string", + "port": 1 + } + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "build": { + "contextUri": "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/", + "dockerfilePath": "prod/Dockerfile" + }, + "condaFile": "string", + "environmentType": "Curated", + "image": "docker.io/tensorflow/serving:latest", + "inferenceConfig": { + "livenessRoute": { + "path": "string", + "port": 1 + }, + "readinessRoute": { + "path": "string", + "port": 1 + }, + "scoringRoute": { + "path": "string", + "port": 1 + } + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryEnvironmentVersions_CreateOrUpdate", + "title": "CreateOrUpdate Registry Environment Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Delete.json new file mode 100644 index 0000000000..a53b2255a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "environmentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryEnvironmentVersions_Delete", + "title": "Delete Registry Environment Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Get.json new file mode 100644 index 0000000000..1060bcb981 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Get.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "environmentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "build": { + "contextUri": "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/", + "dockerfilePath": "prod/Dockerfile" + }, + "condaFile": "string", + "environmentType": "Curated", + "image": "docker.io/tensorflow/serving:latest", + "inferenceConfig": { + "livenessRoute": { + "path": "string", + "port": 1 + }, + "readinessRoute": { + "path": "string", + "port": 1 + }, + "scoringRoute": { + "path": "string", + "port": 1 + } + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryEnvironmentVersions_Get", + "title": "Get Registry Environment Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_List.json new file mode 100644 index 0000000000..85d6d4f293 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_List.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "$orderBy": "string", + "$skipToken": "string", + "$top": 1, + "api-version": "2023-06-01-preview", + "environmentName": "string", + "registryName": "my-aml-regsitry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "build": { + "contextUri": "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/", + "dockerfilePath": "prod/Dockerfile" + }, + "condaFile": "string", + "environmentType": "Curated", + "image": "docker.io/tensorflow/serving:latest", + "inferenceConfig": { + "livenessRoute": { + "path": "string", + "port": 1 + }, + "readinessRoute": { + "path": "string", + "port": 1 + }, + "scoringRoute": { + "path": "string", + "port": 1 + } + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "RegistryEnvironmentVersions_List", + "title": "List Registry Environment Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_CreateOrUpdate.json new file mode 100644 index 0000000000..8e57951264 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_CreateOrUpdate.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "Model container description", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + }, + "modelName": "testContainer", + "registryName": "registry123", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/models", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/registry123/models/testContainer", + "properties": { + "description": "Model container description", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + }, + "201": { + "body": { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/models", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/registry123/models/testContainer", + "properties": { + "description": "Model container description", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "RegistryModelContainers_CreateOrUpdate", + "title": "CreateOrUpdate Registry Model Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Delete.json new file mode 100644 index 0000000000..1730ff2ca0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "modelName": "testContainer", + "registryName": "registry123", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryModelContainers_Delete", + "title": "Delete Registry Model Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Get.json new file mode 100644 index 0000000000..b3a29a517e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Get.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "modelName": "testContainer", + "registryName": "registry123", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/models", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/registry123/models/testContainer", + "properties": { + "description": "Model container description", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "RegistryModelContainers_Get", + "title": "Get Registry Model Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_List.json new file mode 100644 index 0000000000..4b82b34518 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_List.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "name": "testContainer", + "api-version": "2023-06-01-preview", + "registryName": "registry123", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "nextlink", + "value": [ + { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/models", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/registry123/models/testContainer", + "properties": { + "description": "Model container description", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + ] + } + } + }, + "operationId": "RegistryModelContainers_List", + "title": "List Registry Model Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrGetStartPendingUpload.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrGetStartPendingUpload.json new file mode 100644 index 0000000000..4795084c9d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrGetStartPendingUpload.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "pendingUploadId": "string", + "pendingUploadType": "None" + }, + "modelName": "string", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "blobReferenceForConsumption": { + "blobUri": "https://www.contoso.com/example", + "credential": { + "credentialType": "SAS", + "sasUri": "https://www.contoso.com/example" + }, + "storageAccountArmId": "string" + }, + "pendingUploadId": "string", + "pendingUploadType": "TemporaryBlobReference" + }, + "headers": {} + } + }, + "operationId": "RegistryModelVersions_CreateOrGetStartPendingUpload", + "title": "CreateOrGetStartPendingUpload Registry Model Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..686ee5c0c3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrUpdate.json @@ -0,0 +1,105 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "flavors": { + "string": { + "data": { + "string": "string" + } + } + }, + "isAnonymous": false, + "modelType": "CustomModel", + "modelUri": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "modelName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "flavors": { + "string": { + "data": { + "string": "string" + } + } + }, + "isAnonymous": false, + "modelType": "CustomModel", + "modelUri": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "flavors": { + "string": { + "data": { + "string": "string" + } + } + }, + "isAnonymous": false, + "modelType": "CustomModel", + "modelUri": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryModelVersions_CreateOrUpdate", + "title": "CreateOrUpdate Registry Model Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Delete.json new file mode 100644 index 0000000000..8dd1ad6d28 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "modelName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryModelVersions_Delete", + "title": "Delete Registry Model Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Get.json new file mode 100644 index 0000000000..a70b09e1f0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Get.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "modelName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "flavors": { + "string": { + "data": { + "string": "string" + } + } + }, + "isAnonymous": false, + "modelType": "CustomModel", + "modelUri": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryModelVersions_Get", + "title": "Get Registry Model Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_List.json new file mode 100644 index 0000000000..67129f9bc4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_List.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "description": "string", + "$orderBy": "string", + "$skipToken": "string", + "$top": 1, + "api-version": "2023-06-01-preview", + "modelName": "string", + "offset": 1, + "properties": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tags": "string", + "version": "string" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "flavors": { + "string": { + "data": { + "string": "string" + } + } + }, + "isAnonymous": false, + "modelType": "CustomModel", + "modelUri": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "RegistryModelVersions_List", + "title": "List Registry Model Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Package.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Package.json new file mode 100644 index 0000000000..5de971e6a5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Package.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "baseEnvironmentSource": { + "baseEnvironmentSourceType": "EnvironmentAsset", + "resourceId": "string" + }, + "environmentVariables": { + "string": "string" + }, + "inferencingServer": { + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "serverType": "AzureMLBatch" + }, + "inputs": [ + { + "path": { + "inputPathType": "Url", + "url": "string" + }, + "inputType": "UriFile", + "mode": "Download", + "mountPath": "string" + } + ], + "modelConfiguration": { + "mode": "ReadOnlyMount", + "mountPath": "string" + }, + "tags": { + "string": "string" + }, + "targetEnvironmentId": "string" + }, + "modelName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "baseEnvironmentSource": { + "baseEnvironmentSourceType": "EnvironmentAsset", + "resourceId": "string" + }, + "buildId": "string", + "buildState": "NotStarted", + "environmentVariables": { + "string": "string" + }, + "inferencingServer": { + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "serverType": "AzureMLBatch" + }, + "inputs": [ + { + "path": { + "inputPathType": "Url", + "url": "string" + }, + "inputType": "UriFile", + "mode": "Download", + "mountPath": "string" + } + ], + "logUrl": "string", + "modelConfiguration": { + "mode": "ReadOnlyMount", + "mountPath": "string" + }, + "tags": { + "string": "string" + }, + "targetEnvironmentId": "string" + }, + "headers": {} + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "RegistryModelVersions_Package", + "title": "Package Registry Model Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_CreateOrUpdate.json new file mode 100644 index 0000000000..2b52f358c0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_CreateOrUpdate.json @@ -0,0 +1,121 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "action": { + "actionType": "InvokeBatchEndpoint", + "endpointInvocationDefinition": { + "9965593e-526f-4b89-bb36-761138cf2794": null + } + }, + "displayName": "string", + "isEnabled": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + }, + "trigger": { + "endTime": "string", + "expression": "string", + "startTime": "string", + "timeZone": "string", + "triggerType": "Cron" + } + } + }, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "action": { + "actionType": "InvokeBatchEndpoint", + "endpointInvocationDefinition": { + "d77a9a9a-4bb5-4c0c-8a77-459be8b82b9f": null + } + }, + "displayName": "string", + "isEnabled": false, + "properties": { + "string": "string" + }, + "provisioningState": "Succeeded", + "tags": { + "string": "string" + }, + "trigger": { + "endTime": "string", + "expression": "string", + "startTime": "string", + "timeZone": "string", + "triggerType": "Cron" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "action": { + "actionType": "InvokeBatchEndpoint", + "endpointInvocationDefinition": { + "13ea51e0-ff28-49c3-a85d-9b5199eb14e5": null + } + }, + "displayName": "string", + "isEnabled": false, + "properties": { + "string": "string" + }, + "provisioningState": "Failed", + "tags": { + "string": "string" + }, + "trigger": { + "endTime": "string", + "expression": "string", + "startTime": "string", + "timeZone": "string", + "triggerType": "Cron" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Schedules_CreateOrUpdate", + "title": "CreateOrUpdate Schedule." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Delete.json new file mode 100644 index 0000000000..e62b0112a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus...", + "Location": "https://management.azure.com/subscriptions/...pathToOperationResult..." + } + }, + "204": {} + }, + "operationId": "Schedules_Delete", + "title": "Delete Schedule." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Get.json new file mode 100644 index 0000000000..630a426741 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Get.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "action": { + "actionType": "InvokeBatchEndpoint", + "endpointInvocationDefinition": { + "a108545b-def1-4c86-8e53-dbcb1de3a8bc": null + } + }, + "displayName": "string", + "isEnabled": false, + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "tags": { + "string": "string" + }, + "trigger": { + "endTime": "string", + "expression": "string", + "startTime": "string", + "timeZone": "string", + "triggerType": "Cron" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "Schedules_Get", + "title": "Get Schedule." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_List.json new file mode 100644 index 0000000000..d140b0446d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_List.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "action": { + "actionType": "InvokeBatchEndpoint", + "endpointInvocationDefinition": { + "00cd1396-a094-4d48-8d86-14c43a55a6af": null + } + }, + "displayName": "string", + "isEnabled": false, + "properties": { + "string": "string" + }, + "provisioningState": "Deleting", + "tags": { + "string": "string" + }, + "trigger": { + "endTime": "string", + "expression": "string", + "startTime": "string", + "timeZone": "string", + "triggerType": "Cron" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Schedules_List", + "title": "List Schedules." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Create.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Create.json new file mode 100644 index 0000000000..bc7f1119fc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Create.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "authType": "None", + "category": "ContainerRegistry", + "expiryTime": "2024-03-15T14:30:00Z", + "target": "www.facebook.com" + } + }, + "connectionName": "connection-1", + "resourceGroupName": "resourceGroup-1", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "workspace-1" + }, + "responses": { + "200": { + "body": { + "name": "connection-1", + "type": "Microsoft.MachineLearningServices/workspaces/connections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1/providers/Microsoft.MachineLearningServices/workspaces/workspace-1/connections/connection-1", + "properties": { + "authType": "None", + "category": "ContainerRegistry", + "expiryTime": "2024-03-15T14:30:00Z", + "target": "www.facebook.com" + } + } + } + }, + "operationId": "WorkspaceConnections_Create", + "title": "CreateWorkspaceConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Delete.json new file mode 100644 index 0000000000..c3f4457977 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "connectionName": "connection-1", + "resourceGroupName": "resourceGroup-1", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "workspace-1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "WorkspaceConnections_Delete", + "title": "DeleteWorkspaceConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Get.json new file mode 100644 index 0000000000..e5d5acb084 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Get.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "connectionName": "connection-1", + "resourceGroupName": "resourceGroup-1", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "workspace-1" + }, + "responses": { + "200": { + "body": { + "name": "connection-1", + "type": "Microsoft.MachineLearningServices/workspaces/connections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1/providers/Microsoft.MachineLearningServices/workspaces/workspace-1/connections/connection-1", + "properties": { + "authType": "None", + "category": "ContainerRegistry", + "expiryTime": "2024-03-15T14:30:00Z", + "target": "www.facebook.com" + } + } + } + }, + "operationId": "WorkspaceConnections_Get", + "title": "GetWorkspaceConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_List.json new file mode 100644 index 0000000000..13818c2aca --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_List.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "category": "ContainerRegistry", + "resourceGroupName": "resourceGroup-1", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "target": "www.facebook.com", + "workspaceName": "workspace-1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "connection-1", + "type": "Microsoft.MachineLearningServices/workspaces/connections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1/providers/Microsoft.MachineLearningServices/workspaces/workspace-1/linkedWorkspaces/connection-1", + "properties": { + "authType": "PAT", + "category": "ContainerRegistry", + "expiryTime": "2024-03-15T14:30:00Z", + "target": "www.facebook.com" + } + }, + { + "name": "connection-2", + "type": "Microsoft.MachineLearningServices/workspaces/connections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1/providers/Microsoft.MachineLearningServices/workspaces/workspace-1/linkedWorkspaces/connection-2", + "properties": { + "authType": "PAT", + "category": "ContainerRegistry", + "target": "www.facebook.com" + } + } + ] + } + } + }, + "operationId": "WorkspaceConnections_List", + "title": "ListWorkspaceConnections" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_ListSecrets.json new file mode 100644 index 0000000000..45d686ffa8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_ListSecrets.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "connectionName": "some_string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "aml-workspace-name" + }, + "responses": { + "200": { + "body": { + "name": "some_string", + "type": "some_string", + "id": "some_string", + "properties": { + "authType": "AccessKey", + "category": "CustomKeys", + "credentials": { + "accessKeyId": "some_string", + "secretAccessKey": "some_string" + }, + "expiryTime": "2020-01-01T00:00:00Z", + "metadata": {}, + "target": "some_string" + }, + "systemData": { + "createdAt": "2020-01-01T00:00:00Z", + "createdBy": "some_string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T00:00:00Z", + "lastModifiedBy": "some_string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "WorkspaceConnections_ListSecrets", + "title": "GetWorkspaceConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Update.json new file mode 100644 index 0000000000..1b325739f2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Update.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "authType": "AccessKey", + "category": "ADLSGen2", + "credentials": { + "accessKeyId": "some_string", + "secretAccessKey": "some_string" + }, + "expiryTime": "2020-01-01T00:00:00Z", + "metadata": {}, + "target": "some_string" + } + }, + "connectionName": "some_string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "aml-workspace-name" + }, + "responses": { + "200": { + "body": { + "name": "some_string", + "type": "some_string", + "id": "some_string", + "properties": { + "authType": "AccessKey", + "category": "ADLSGen2", + "credentials": { + "accessKeyId": "some_string", + "secretAccessKey": "some_string" + }, + "expiryTime": "2020-01-01T00:00:00Z", + "metadata": {}, + "target": "some_string" + }, + "systemData": { + "createdAt": "2020-01-01T00:00:00Z", + "createdBy": "some_string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T00:00:00Z", + "lastModifiedBy": "some_string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + } + }, + "operationId": "WorkspaceConnections_Update", + "title": "UpdateWorkspaceConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceFeatures_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceFeatures_List.json new file mode 100644 index 0000000000..acd8291dc0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceFeatures_List.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "description": "Create, edit or delete AutoML experiments in the SDK", + "displayName": "Create edit experiments UI", + "id": "automatedml_createeditexperimentsui" + }, + { + "description": "Upgrade workspace from Basic to enterprise from the UI", + "displayName": "Upgrade workspace UI", + "id": "workspace_upgradeworkspaceui" + } + ] + } + } + }, + "operationId": "WorkspaceFeatures_List", + "title": "List Workspace features" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_CreateOrUpdate.json new file mode 100644 index 0000000000..6f31d63627 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_CreateOrUpdate.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned,UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai": {} + } + }, + "location": "eastus2euap", + "properties": { + "description": "test description", + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry", + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai" + }, + "keyVaultProperties": { + "identityClientId": "", + "keyIdentifier": "https://testkv.vault.azure.net/keys/testkey/aabbccddee112233445566778899aabb", + "keyVaultArmId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv" + }, + "status": "Enabled" + }, + "friendlyName": "HelloName", + "hbiWorkspace": false, + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", + "sharedPrivateLinkResources": [ + { + "name": "testdbresource", + "properties": { + "groupId": "Sql", + "privateLinkResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql", + "requestMessage": "Please approve", + "status": "Approved" + } + } + ], + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + } + }, + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "name": "testworkspace", + "type": "Microsoft.MachineLearningServices/workspaces", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "location": "eastus2euap", + "properties": { + "description": "test description", + "allowPublicAccessWhenBehindVnet": false, + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry", + "discoveryUrl": "http://example.com", + "enableDataIsolation": false, + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai" + }, + "keyVaultProperties": { + "identityClientId": "", + "keyIdentifier": "https://testkv.vault.azure.net/keys/testkey/aabbccddee112233445566778899aabb", + "keyVaultArmId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv" + }, + "status": "Enabled" + }, + "friendlyName": "HelloName", + "hbiWorkspace": false, + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", + "publicNetworkAccess": "Disabled", + "sharedPrivateLinkResources": [ + { + "name": "testdbresource", + "properties": { + "groupId": "Sql", + "privateLinkResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql", + "requestMessage": "Please approve", + "status": "Approved" + } + } + ], + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + } + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Workspaces_CreateOrUpdate", + "title": "Create Workspace" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Delete.json new file mode 100644 index 0000000000..dc24fa4f96 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Delete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "Workspaces_Delete", + "title": "Delete Workspace" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Diagnose.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Diagnose.json new file mode 100644 index 0000000000..aca8411c8d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Diagnose.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "value": { + "applicationInsights": {}, + "containerRegistry": {}, + "dnsResolution": {}, + "keyVault": {}, + "nsg": {}, + "others": {}, + "resourceLock": {}, + "storageAccount": {}, + "udr": {} + } + }, + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "value": { + "applicationInsightsResults": [], + "containerRegistryResults": [], + "dnsResolutionResults": [ + { + "code": "CustomDNSInUse", + "level": "Warning", + "message": "We have detected an on-premise dns server is configured. Please make sure conditional forwarding is configured correctly according to doc https://foo" + } + ], + "keyVaultResults": [], + "networkSecurityRuleResults": [], + "otherResults": [], + "resourceLockResults": [], + "storageAccountResults": [], + "userDefinedRouteResults": [] + } + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Workspaces_Diagnose", + "title": "Diagnose Workspace" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Get.json new file mode 100644 index 0000000000..f084e36a49 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Get.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "name": "testworkspace", + "type": "Microsoft.MachineLearningServices/workspaces", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "location": "eastus2euap", + "properties": { + "description": "test description", + "allowPublicAccessWhenBehindVnet": false, + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry", + "discoveryUrl": "http://example.com", + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai" + }, + "keyVaultProperties": { + "identityClientId": "", + "keyIdentifier": "https://testkv.vault.azure.net/keys/testkey/aabbccddee112233445566778899aabb", + "keyVaultArmId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv" + }, + "status": "Enabled" + }, + "friendlyName": "HelloName", + "hbiWorkspace": false, + "imageBuildCompute": "testcompute", + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", + "managedNetwork": { + "isolationMode": "AllowOnlyApprovedOutbound", + "networkId": "00000000-1111-2222-3333-444444444444", + "outboundRules": { + "some_string": { + "type": "FQDN", + "category": "Required", + "destination": "some_string", + "status": "Inactive" + } + }, + "status": { + "sparkReady": false, + "status": "Active" + } + }, + "privateEndpointConnections": [ + { + "name": "testprivatelinkconnection", + "type": "Microsoft.MachineLearningServices/workspaces/privateEndpointConnections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateEndpointConnections/testprivatelinkconnection", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ], + "privateLinkCount": 0, + "publicNetworkAccess": "Disabled", + "serviceProvisionedResourceGroup": "testworkspace_0000111122223333", + "sharedPrivateLinkResources": [ + { + "name": "testcosmosdbresource", + "properties": { + "groupId": "Sql", + "privateLinkResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testcosmosdbresource/privateLinkResources/Sql", + "requestMessage": "Please approve", + "status": "Approved" + } + } + ], + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + } + } + } + }, + "operationId": "Workspaces_Get", + "title": "Get Workspace" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListByResourceGroup.json new file mode 100644 index 0000000000..a9edefee0f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListByResourceGroup.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "nextLink", + "value": [ + { + "name": "testworkspace", + "type": "Microsoft.MachineLearningServices/workspaces", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace", + "location": "eastus2euap", + "properties": { + "description": "test description", + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry", + "discoveryUrl": "http://example.com", + "friendlyName": "HelloName", + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + } + }, + { + "name": "testworkspace1", + "type": "Microsoft.MachineLearningServices/workspaces", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace1", + "location": "eastus2euap", + "properties": { + "description": "test description", + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistryNew", + "discoveryUrl": "http://example.com", + "friendlyName": "HelloName 1", + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkvNew", + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccountOld" + } + } + ] + } + } + }, + "operationId": "Workspaces_ListByResourceGroup", + "title": "Get Workspaces by Resource Group" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListBySubscription.json new file mode 100644 index 0000000000..449b0adb06 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListBySubscription.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "nextLink", + "value": [ + { + "name": "testworkspace", + "type": "Microsoft.MachineLearningServices/workspaces", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace", + "location": "eastus2euap", + "properties": { + "description": "test description", + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry", + "discoveryUrl": "http://example.com", + "friendlyName": "HelloName", + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + } + }, + { + "name": "testworkspace", + "type": "Microsoft.MachineLearningServices/workspaces", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-5678/providers/Microsoft.MachineLearningServices/workspaces/testworkspace", + "location": "eastus2euap", + "properties": { + "description": "test description", + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistryNew", + "discoveryUrl": "http://example.com", + "friendlyName": "HelloName", + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkvNew", + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccountOld" + } + } + ] + } + } + }, + "operationId": "Workspaces_ListBySubscription", + "title": "Get Workspaces by subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListKeys.json new file mode 100644 index 0000000000..bf22090168 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListKeys.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "testrg123", + "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "appInsightsInstrumentationKey": null, + "containerRegistryCredentials": { + "location": null, + "passwords": [ + { + "name": "password", + "value": "" + }, + { + "name": "password2", + "value": "0KARRQoQHSUq1yViPWg7YFernOS=Ic/t" + } + ], + "username": "testdemoworkjmjmeykp" + }, + "notebookAccessKeys": { + "primaryAccessKey": null, + "secondaryAccessKey": null + }, + "userStorageArmId": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/ragargeastus2euap/providers/Microsoft.Storage/storageAccounts/testdemoworkazashomr", + "userStorageKey": null + } + } + }, + "operationId": "Workspaces_ListKeys", + "title": "List Workspace Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookAccessToken.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookAccessToken.json new file mode 100644 index 0000000000..54914a86a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookAccessToken.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "expiresIn": 28800, + "hostName": "Host product name", + "notebookResourceId": "94350843095843059", + "publicDns": "resource.notebooks.azure.net", + "scope": "aznb_identity", + "tokenType": "Bearer" + } + } + }, + "operationId": "Workspaces_ListNotebookAccessToken", + "title": "List Workspace Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookKeys.json new file mode 100644 index 0000000000..0d88c82d04 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookKeys.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "testrg123", + "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "primaryAccessKey": null, + "secondaryAccessKey": null + } + } + }, + "operationId": "Workspaces_ListNotebookKeys", + "title": "List Workspace Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListOutboundNetworkDependenciesEndpoints.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListOutboundNetworkDependenciesEndpoints.json new file mode 100644 index 0000000000..fa7516cd8e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListOutboundNetworkDependenciesEndpoints.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "category": "Azure Active Directory", + "endpoints": [ + { + "domainName": "login.microsoftonline.com", + "endpointDetails": [ + { + "port": 443 + } + ] + } + ] + } + }, + { + "properties": { + "category": "Azure portal", + "endpoints": [ + { + "domainName": "management.azure.com", + "endpointDetails": [ + { + "port": 443 + } + ] + } + ] + } + } + ] + } + } + }, + "operationId": "Workspaces_ListOutboundNetworkDependenciesEndpoints", + "title": "ListOutboundNetworkDependenciesEndpoints" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListStorageAccountKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListStorageAccountKeys.json new file mode 100644 index 0000000000..6ff2e9b8cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListStorageAccountKeys.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "testrg123", + "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "userStorageKey": null + } + } + }, + "operationId": "Workspaces_ListStorageAccountKeys", + "title": "List Workspace Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_PrepareNotebook.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_PrepareNotebook.json new file mode 100644 index 0000000000..b81bfe63b5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_PrepareNotebook.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "testrg123", + "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "fqdn": "testnotebook.notebooks.azure.com", + "notebookPreparationError": { + "errorMessage": "general error", + "statusCode": 500 + }, + "resourceId": "aabbccddee112233445566778899" + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Workspaces_PrepareNotebook", + "title": "Prepare Notebook" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ResyncKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ResyncKeys.json new file mode 100644 index 0000000000..bd12801453 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ResyncKeys.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "testrg123", + "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "workspaceName": "workspaces123" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Workspaces_ResyncKeys", + "title": "Resync Workspace Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Update.json new file mode 100644 index 0000000000..3d998b34af --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Update.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "new description", + "friendlyName": "New friendly name", + "publicNetworkAccess": "Disabled" + } + }, + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "name": "testworkspace", + "type": "Microsoft.MachineLearningServices/workspaces", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444" + }, + "location": "eastus2euap", + "properties": { + "description": "new description", + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry", + "discoveryUrl": "http://example.com", + "friendlyName": "New friendly name", + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", + "publicNetworkAccess": "Disabled", + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + } + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Workspaces_Update", + "title": "Update Workspace" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp new file mode 100644 index 0000000000..09216f9f5d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp @@ -0,0 +1,68 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./ComputeResource.tsp"; +import "./CodeContainerResource.tsp"; +import "./CodeContainerResource.tsp"; +import "./CodeVersionResource.tsp"; +import "./CodeVersionResource.tsp"; +import "./ComponentContainerResource.tsp"; +import "./ComponentContainerResource.tsp"; +import "./ComponentVersionResource.tsp"; +import "./ComponentVersionResource.tsp"; +import "./DataContainerResource.tsp"; +import "./DataContainerResource.tsp"; +import "./DataVersionBaseResource.tsp"; +import "./DataVersionBaseResource.tsp"; +import "./EnvironmentContainerResource.tsp"; +import "./EnvironmentContainerResource.tsp"; +import "./EnvironmentVersionResource.tsp"; +import "./EnvironmentVersionResource.tsp"; +import "./ModelContainerResource.tsp"; +import "./ModelContainerResource.tsp"; +import "./ModelVersionResource.tsp"; +import "./ModelVersionResource.tsp"; +import "./BatchEndpointTrackedResource.tsp"; +import "./BatchDeploymentTrackedResource.tsp"; +import "./DatastoreResource.tsp"; +import "./FeaturesetContainer.tsp"; +import "./Feature.tsp"; +import "./FeaturesetVersion.tsp"; +import "./FeaturestoreEntityContainer.tsp"; +import "./FeaturestoreEntityVersion.tsp"; +import "./JobBaseResource.tsp"; +import "./LabelingJob.tsp"; +import "./OnlineEndpointTrackedResource.tsp"; +import "./OnlineDeploymentTrackedResource.tsp"; +import "./Schedule.tsp"; +import "./Registry.tsp"; +import "./Workspace.tsp"; +import "./WorkspaceConnectionPropertiesV2BasicResource.tsp"; +import "./OutboundRuleBasicResource.tsp"; +import "./PrivateEndpointConnection.tsp"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "Azure Machine Learning Services", +}) +@versioned(Versions) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) +@doc("These APIs allow end users to operate on Azure Machine Learning Workspace resources.") +namespace Azure.ResourceManager.MachineLearning; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-06-01-preview API version.") + v2023_06_01_preview: "2023-06-01-preview", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp new file mode 100644 index 0000000000..2416b05726 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp @@ -0,0 +1,8774 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; + +namespace Azure.ResourceManager.MachineLearning; + +interface Operations extends Azure.ResourceManager.Operations {} + +@doc("An enum describing the unit of usage measurement.") +enum UsageUnit { + Count, +} + +@doc("Three lettered code specifying the currency of the VM price. Example: USD") +enum BillingCurrency { + USD, +} + +@doc("The unit of time measurement for the specified VM price. Example: OneHour") +enum UnitOfMeasure { + OneHour, +} + +@doc("Operating system type used by the VM.") +enum VMPriceOSType { + Linux, + Windows, +} + +@doc("The type of the VM.") +enum VMTier { + Standard, + LowPriority, + Spot, +} + +@doc("An enum describing the unit of quota measurement.") +enum QuotaUnit { + Count, +} + +@doc("Status of update workspace quota.") +enum Status { + Undefined, + Success, + Failure, + InvalidQuotaBelowClusterMinimum, + InvalidQuotaExceedsSubscriptionLimit, + InvalidVMFamilyName, + OperationNotSupportedForSku, + OperationNotEnabledForRegion, +} + +@doc("Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).") +enum ManagedServiceIdentityType { + None, + SystemAssigned, + UserAssigned, + `SystemAssigned,UserAssigned`, +} + +@doc("The type of identity that created the resource.") +enum CreatedByType { + User, + Application, + ManagedIdentity, + Key, +} + +@doc("The type of compute") +enum ComputeType { + AKS, + Kubernetes, + AmlCompute, + ComputeInstance, + DataFactory, + VirtualMachine, + HDInsight, + Databricks, + DataLakeAnalytics, + SynapseSpark, +} + +@doc("The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed.") +enum ProvisioningState { + Unknown, + Updating, + Creating, + Deleting, + Succeeded, + Failed, + Canceled, +} + +enum UnderlyingResourceAction { + Delete, + Detach, +} + +@doc("Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images") +enum ImageType { + docker, + azureml, +} + +@doc("Type of the Environment Variable. Possible values are: local - For local variable") +enum EnvironmentVariableType { + local, +} + +@doc("Protocol over which communication will happen over this endpoint") +enum Protocol { + tcp, + udp, + http, +} + +@doc("Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe") +enum VolumeDefinitionType { + bind, + volume, + tmpfs, + npipe, +} + +@doc("State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted.") +enum NodeState { + idle, + running, + preparing, + unusable, + leaving, + preempted, +} + +@doc("Provisioning state of registry asset.") +enum AssetProvisioningState { + Succeeded, + Failed, + Canceled, + Creating, + Updating, + Deleting, +} + +enum AutoDeleteCondition { + CreatedGreaterThan, + LastAccessedGreaterThan, +} + +@doc("Type of storage to use for the pending upload location") +enum PendingUploadType { + None, + TemporaryBlobReference, +} + +@doc("Enum to determine the PendingUpload credentials type.") +enum PendingUploadCredentialType { + SAS, +} + +enum ListViewType { + ActiveOnly, + ArchivedOnly, + All, +} + +@doc("Enum to determine the type of data.") +enum DataType { + uri_file, + uri_folder, + mltable, +} + +@doc("Protection level associated with the Intellectual Property.") +enum ProtectionLevel { + @doc("All means Intellectual Property is fully protected.") All, + @doc("None means it is not an Intellectual Property.") None, +} + +@doc("AutoRebuild setting for the derived image") +enum AutoRebuildSetting { + Disabled, + OnBaseImageUpdate, +} + +@doc("Environment type is either user created or curated by Azure ML service") +enum EnvironmentType { + Curated, + UserCreated, +} + +@doc("The type of operating system.") +enum OperatingSystemType { + Linux, + Windows, +} + +@doc("Base environment type.") +enum BaseEnvironmentSourceType { + EnvironmentAsset, +} + +@doc("Inferencing server type for various targets.") +enum InferencingServerType { + AzureMLOnline, + AzureMLBatch, + Triton, + Custom, +} + +@doc("Type of the inputs.") +enum PackageInputType { + UriFile, + UriFolder, +} + +@doc("Mounting type of the model or the inputs") +enum PackageInputDeliveryMode { + Copy, + Download, +} + +@doc("Input path type for package inputs.") +enum InputPathType { + Url, + PathId, + PathVersion, +} + +@doc("Package build state returned in package response.") +enum PackageBuildState { + NotStarted, + Running, + Succeeded, + Failed, +} + +@doc("State of endpoint provisioning.") +enum EndpointProvisioningState { + Creating, + Deleting, + Succeeded, + Failed, + Updating, + Canceled, +} + +@doc("Enum to determine endpoint authentication mode.") +enum EndpointAuthMode { + AMLToken, + Key, + AADToken, +} + +@doc("The enumerated property types for batch deployments.") +enum BatchDeploymentConfigurationType { + Model, + PipelineComponent, +} + +@doc(""" +Log verbosity for batch inferencing. +Increasing verbosity order for logging is : Warning, Info and Debug. +The default value is Info. +""") +enum BatchLoggingLevel { + Info, + Warning, + Debug, +} + +@doc("Enum to determine which reference method to use for an asset.") +enum ReferenceType { + Id, + DataPath, + OutputPath, +} + +@doc("Enum to determine how batch inferencing will handle output") +enum BatchOutputAction { + SummaryOnly, + AppendRow, +} + +@doc("Possible values for DeploymentProvisioningState.") +enum DeploymentProvisioningState { + Creating, + Deleting, + Scaling, + Updating, + Succeeded, + Failed, + Canceled, +} + +@doc("Enum to determine the datastore credentials type.") +enum CredentialsType { + AccountKey, + Certificate, + None, + Sas, + ServicePrincipal, + KerberosKeytab, + KerberosPassword, +} + +@doc("Enum to determine the datastore contents type.") +enum DatastoreType { + AzureBlob, + AzureDataLakeGen1, + AzureDataLakeGen2, + AzureFile, + Hdfs, + OneLake, +} + +@doc("Enum to determine the datastore secrets type.") +enum SecretsType { + AccountKey, + Certificate, + Sas, + ServicePrincipal, + KerberosPassword, + KerberosKeytab, +} + +enum FeatureDataType { + String, + Integer, + Long, + Float, + Double, + Binary, + Datetime, + Boolean, +} + +@doc("Enum to determine the email notification type.") +enum EmailNotificationEnableType { + JobCompleted, + JobFailed, + JobCancelled, +} + +@doc("Enum to determine the webhook callback service type.") +enum WebhookType { + AzureDevOps, +} + +@doc("Enum to describe the frequency of a recurrence schedule") +enum RecurrenceFrequency { + @doc("Minute frequency") Minute, + @doc("Hour frequency") Hour, + @doc("Day frequency") Day, + @doc("Week frequency") Week, + @doc("Month frequency") Month, +} + +@doc("Enum of weekday") +enum WeekDay { + @doc("Monday weekday") Monday, + @doc("Tuesday weekday") Tuesday, + @doc("Wednesday weekday") Wednesday, + @doc("Thursday weekday") Thursday, + @doc("Friday weekday") Friday, + @doc("Saturday weekday") Saturday, + @doc("Sunday weekday") Sunday, +} + +enum TriggerType { + Recurrence, + Cron, +} + +enum MaterializationStoreType { + None, + Online, + Offline, + OnlineAndOffline, +} + +@doc("The status of a job.") +enum JobStatus { + @doc("Run hasn't started yet.") NotStarted, + @doc("Run has started. The user has a run ID.") Starting, + @doc("(Not used currently) It will be used if ES is creating the compute target.") + Provisioning, + @doc("The run environment is being prepared.") Preparing, + @doc("The job is queued in the compute target. For example, in BatchAI the job is in queued state, while waiting for all required nodes to be ready.") + Queued, + @doc("The job started to run in the compute target.") Running, + @doc("Job is completed in the target. It is in output collection state now.") + Finalizing, + @doc("Cancellation has been requested for the job.") CancelRequested, + @doc("Job completed successfully. This reflects that both the job itself and output collection states completed successfully") + Completed, + @doc("Job failed.") Failed, + @doc("Following cancellation request, the job is now successfully canceled.") + Canceled, + @doc(""" +When heartbeat is enabled, if the run isn't updating any information to RunHistory then the run goes to NotResponding state. +NotResponding is the only state that is exempt from strict transition orders. A run can go from NotResponding to any of the previous states. +""") + NotResponding, + @doc("The job is paused by users. Some adjustment to labeling jobs can be made only in paused state.") + Paused, + @doc("Default job status if not mapped to all other statuses") Unknown, + @doc("The job is in a scheduled state. Job is not in any active state.") + Scheduled, +} + +enum FeaturestoreJobType { + RecurrentMaterialization, + BackfillMaterialization, +} + +@doc("Enum to determine identity framework.") +enum IdentityConfigurationType { + Managed, + AMLToken, + UserIdentity, +} + +@doc("Enum to determine the type of job.") +enum JobType { + AutoML, + Command, + Labeling, + Sweep, + Pipeline, + Spark, +} + +@doc("The enumerated types for the nodes value") +enum NodesValueType { + All, + Custom, +} + +@doc("Whether IncrementalDataRefresh is enabled") +enum IncrementalDataRefresh { + Enabled, + Disabled, +} + +@doc("Whether multiSelect is enabled") +enum MultiSelect { + Enabled, + Disabled, +} + +@doc("Media type of data asset.") +enum MediaType { + Image, + Text, +} + +enum MLAssistConfigurationType { + Enabled, + Disabled, +} + +@doc("Enum to determine the job provisioning state.") +enum JobProvisioningState { + Succeeded, + Failed, + Canceled, + InProgress, +} + +enum StatusMessageLevel { + Error, + Information, + Warning, +} + +@doc("The format of exported labels.") +enum ExportFormatType { + Dataset, + Coco, + CSV, +} + +@doc("Enum to determine endpoint compute type.") +enum EndpointComputeType { + Managed, + Kubernetes, + AzureMLCompute, +} + +enum OrderString { + CreatedAtDesc, + CreatedAtAsc, + UpdatedAtDesc, + UpdatedAtAsc, +} + +@doc("Enum to determine whether PublicNetworkAccess is Enabled or Disabled.") +enum PublicNetworkAccessType { + Enabled, + Disabled, +} + +enum DataCollectionMode { + Enabled, + Disabled, +} + +enum RollingRateType { + Year, + Month, + Day, + Hour, + Minute, +} + +@doc("Enum to determine whether PublicNetworkAccess is Enabled or Disabled for egress of a deployment.") +enum EgressPublicNetworkAccessType { + Enabled, + Disabled, +} + +enum ScaleType { + Default, + TargetUtilization, +} + +@doc("The type of container to retrieve logs from.") +enum ContainerType { + @doc("The container used to download models and score script.") + StorageInitializer, + @doc("The container used to serve user's request.") InferenceServer, + @doc("The container used to collect payload and custom logging when mdc is enabled.") + ModelDataCollector, +} + +@doc("Node scaling setting for the compute sku.") +enum SkuScaleType { + @doc("Automatically scales node count.") Automatic, + @doc("Node count scaled upon user request.") Manual, + @doc("Fixed set of nodes.") None, +} + +enum KeyType { + Primary, + Secondary, +} + +enum ScheduleListViewType { + EnabledOnly, + DisabledOnly, + All, +} + +enum ScheduleActionType { + CreateJob, + InvokeBatchEndpoint, + ImportData, + CreateMonitor, +} + +enum ScheduleProvisioningStatus { + Creating, + Updating, + Deleting, + Succeeded, + Failed, + Canceled, +} + +@doc("Connection status of the service consumer with the service provider") +enum EndpointServiceConnectionStatus { + Approved, + Pending, + Rejected, + Disconnected, + Timeout, +} + +@doc("Indicates whether or not the encryption is enabled for the workspace.") +enum EncryptionStatus { + Enabled, + Disabled, +} + +@doc("Isolation mode for the managed network of a machine learning workspace.") +enum IsolationMode { + Disabled, + AllowInternetOutbound, + AllowOnlyApprovedOutbound, +} + +@doc("Category of a managed network Outbound Rule of a machine learning workspace.") +enum RuleCategory { + Required, + Recommended, + UserDefined, +} + +@doc("Type of a managed network Outbound Rule of a machine learning workspace.") +enum RuleStatus { + Inactive, + Active, +} + +@doc("Type of a managed network Outbound Rule of a machine learning workspace.") +enum RuleType { + FQDN, + PrivateEndpoint, + ServiceTag, +} + +@doc("Status for the managed network of a machine learning workspace.") +enum ManagedNetworkStatus { + Inactive, + Active, +} + +@doc("The current provisioning state.") +enum PrivateEndpointConnectionProvisioningState { + Succeeded, + Creating, + Deleting, + Failed, +} + +@doc("Authentication type of the connection target") +enum ConnectionAuthType { + PAT, + ManagedIdentity, + UsernamePassword, + None, + SAS, + ServicePrincipal, + AccessKey, + ApiKey, + CustomKeys, +} + +@doc("Category of the connection") +enum ConnectionCategory { + PythonFeed, + ContainerRegistry, + Git, + S3, + Snowflake, + AzureSqlDb, + AzureSynapseAnalytics, + AzureMySqlDb, + AzurePostgresDb, + ADLSGen2, + Redis, + ApiKey, + AzureOpenAI, + CognitiveSearch, + CognitiveService, + CustomKeys, +} + +@doc("Level of workspace setup error") +enum DiagnoseResultLevel { + Warning, + Error, + Information, +} + +@doc("Intended usage of the cluster") +enum ClusterPurpose { + FastProd, + DenseProd, + DevTest, +} + +@doc("Enable or disable ssl for scoring") +enum SslConfigStatus { + Disabled, + Enabled, + Auto, +} + +@doc("Load Balancer Type") +enum LoadBalancerType { + PublicIp, + InternalLoadBalancer, +} + +@doc("Compute OS Type") +enum OsType { + Linux, + Windows, +} + +@doc("Virtual Machine priority") +enum VmPriority { + Dedicated, + LowPriority, +} + +@doc("State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled.") +enum RemoteLoginPortPublicAccess { + Enabled, + Disabled, + NotSpecified, +} + +@doc("Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute.") +enum AllocationState { + Steady, + Resizing, +} + +@doc("Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role.") +enum ApplicationSharingPolicy { + Personal, + Shared, +} + +@doc("Indicates whether mlflow autologger is enabled for notebooks.") +enum MlflowAutologger { + Enabled, + Disabled, +} + +@doc("State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable.") +enum SshPublicAccess { + Enabled, + Disabled, +} + +@doc("Current state of an ComputeInstance.") +enum ComputeInstanceState { + Creating, + CreateFailed, + Deleting, + Running, + Restarting, + JobRunning, + SettingUp, + SetupFailed, + Starting, + Stopped, + Stopping, + UserSettingUp, + UserSetupFailed, + Unknown, + Unusable, +} + +@doc("The Compute Instance Authorization type. Available values are personal (default).") +enum ComputeInstanceAuthorizationType { + personal, +} + +@doc("Name of the last operation.") +enum OperationName { + Create, + Start, + Stop, + Restart, + Reimage, + Delete, +} + +@doc("Operation status.") +enum OperationStatus { + InProgress, + Succeeded, + CreateFailed, + StartFailed, + StopFailed, + RestartFailed, + ReimageFailed, + DeleteFailed, +} + +@doc("Trigger of operation.") +enum OperationTrigger { + User, + Schedule, + IdleShutdown, +} + +@doc("The current deployment state of schedule.") +enum ProvisioningStatus { + Completed, + Provisioning, + Failed, +} + +@doc("Is the schedule enabled or disabled?") +enum ScheduleStatus { + Enabled, + Disabled, +} + +@doc("[Required] The compute power action.") +enum ComputePowerAction { + Start, + Stop, +} + +@doc("The current deployment state of schedule.") +enum ScheduleProvisioningState { + Completed, + Provisioning, + Failed, +} + +@doc("Auto save settings.") +enum Autosave { + None, + Local, + Remote, +} + +@doc("network of this container.") +enum Network { + Bridge, + Host, +} + +@doc("Caching type of Data Disk.") +enum Caching { + None, + ReadOnly, + ReadWrite, +} + +@doc("type of this storage account.") +enum StorageAccountType { + Standard_LRS, + Premium_LRS, +} + +@doc("Data source type.") +enum SourceType { + Dataset, + Datastore, + URI, +} + +@doc("Mount Action.") +enum MountAction { + Mount, + Unmount, +} + +@doc("Mount state.") +enum MountState { + MountRequested, + Mounted, + MountFailed, + UnmountRequested, + UnmountFailed, + Unmounted, +} + +enum MonitoringFeatureFilterType { + @doc("Includes all features.") AllFeatures, + @doc("Only includes the top contributing features, measured by feature attribution.") + TopNByAttribution, + @doc("Includes a user-defined subset of features.") FeatureSubset, +} + +@doc("Monitor compute identity type enum.") +enum MonitorComputeIdentityType { + @doc("Authenticates through user's AML token.") AmlToken, + @doc("Authenticates through a user-provided managed identity.") + ManagedIdentity, +} + +@doc("Enum to determine the input data delivery mode.") +enum InputDeliveryMode { + ReadOnlyMount, + ReadWriteMount, + Download, + Direct, + EvalMount, + EvalDownload, +} + +@doc("Output data delivery mode enums.") +enum OutputDeliveryMode { + ReadWriteMount, + Upload, + Direct, +} + +@doc("Enum to determine forecast horizon selection mode.") +enum ForecastHorizonMode { + @doc("Forecast horizon to be determined automatically.") Auto, + @doc("Use the custom forecast horizon.") Custom, +} + +@doc("Enum to determine the Job Output Type.") +enum JobOutputType { + uri_file, + uri_folder, + mltable, + custom_model, + mlflow_model, + triton_model, +} + +@doc("Enum to determine the job tier.") +enum JobTier { + Null, + Spot, + Basic, + Standard, + Premium, +} + +@doc("Enum for setting log verbosity.") +enum LogVerbosity { + @doc("No logs emitted.") NotSet, + @doc("Debug and above log statements logged.") Debug, + @doc("Info and above log statements logged.") Info, + @doc("Warning and above log statements logged.") Warning, + @doc("Error and above log statements logged.") Error, + @doc("Only critical statements logged.") Critical, +} + +@doc("AutoMLJob Task type.") +enum TaskType { + @doc(""" +Classification in machine learning and statistics is a supervised learning approach in which +the computer program learns from the data given to it and make new observations or classifications. +""") + Classification, + @doc("Regression means to predict the value using the input data. Regression models are used to predict a continuous value.") + Regression, + @doc(""" +Forecasting is a special kind of regression task that deals with time-series data and creates forecasting model +that can be used to predict the near future values based on the inputs. +""") + Forecasting, + @doc(""" +Image Classification. Multi-class image classification is used when an image is classified with only a single label +from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. +""") + ImageClassification, + @doc(""" +Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels +from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. +""") + ImageClassificationMultilabel, + @doc(""" +Image Object Detection. Object detection is used to identify objects in an image and locate each object with a +bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. +""") + ImageObjectDetection, + @doc(""" +Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, +drawing a polygon around each object in the image. +""") + ImageInstanceSegmentation, + @doc(""" +Text classification (also known as text tagging or text categorization) is the process of sorting texts into categories. +Categories are mutually exclusive. +""") + TextClassification, + @doc("Multilabel classification task assigns each sample to a group (zero or more) of target labels.") + TextClassificationMultilabel, + @doc(""" +Text Named Entity Recognition a.k.a. TextNER. +Named Entity Recognition (NER) is the ability to take free-form text and identify the occurrences of entities such as people, locations, organizations, and more. +""") + TextNER, +} + +@doc("Enum to determine the Job Input Type.") +enum JobInputType { + literal, + uri_file, + uri_folder, + mltable, + custom_model, + mlflow_model, + triton_model, +} + +@doc("Determines how N-Cross validations value is determined.") +enum NCrossValidationsMode { + @doc("Determine N-Cross validations value automatically. Supported only for 'Forecasting' AutoML task.") + Auto, + @doc("Use custom N-Cross validations value.") Custom, +} + +@doc("Forecasting seasonality mode.") +enum SeasonalityMode { + @doc("Seasonality to be determined automatically.") Auto, + @doc("Use the custom seasonality value.") Custom, +} + +@doc("Target lags selection modes.") +enum TargetLagsMode { + @doc("Target lags to be determined automatically.") Auto, + @doc("Use the custom target lags.") Custom, +} + +@doc("Target rolling windows size mode.") +enum TargetRollingWindowSizeMode { + @doc("Determine rolling windows size automatically.") Auto, + @doc("Use the specified rolling window size.") Custom, +} + +@doc("Enum to determine the state of mlflow autologger.") +enum MLFlowAutologgerState { + Enabled, + Disabled, +} + +enum MonitoringAlertNotificationType { + @doc("Settings for Azure Monitor based alerting.") AzureMonitor, + @doc("Settings for AML email notifications.") Email, +} + +enum ServiceDataAccessAuthIdentity { + @doc("Do not use any identity for service data access.") None, + @doc("Use the system assigned managed identity of the Workspace to authenticate service data access.") + WorkspaceSystemAssignedIdentity, + @doc("Use the user assigned managed identity of the Workspace to authenticate service data access.") + WorkspaceUserAssignedIdentity, +} + +enum EarlyTerminationPolicyType { + Bandit, + MedianStopping, + TruncationSelection, +} + +enum SamplingAlgorithmType { + Grid, + Random, + Bayesian, +} + +enum CategoricalDataDriftMetric { + @doc("The Jensen Shannon Distance (JSD) metric.") JensenShannonDistance, + @doc("The Population Stability Index (PSI) metric.") PopulationStabilityIndex, + @doc("The Pearsons Chi Squared Test metric.") PearsonsChiSquaredTest, +} + +enum MonitoringFeatureDataType { + @doc("Used for features of numerical data type.") Numerical, + @doc("Used for features of categorical data type.") Categorical, +} + +enum CategoricalDataQualityMetric { + @doc("Calculates the rate of null values.") NullValueRate, + @doc("Calculates the rate of data type errors.") DataTypeErrorRate, + @doc("Calculates the rate values are out of bounds.") OutOfBoundsRate, +} + +enum CategoricalPredictionDriftMetric { + @doc("The Jensen Shannon Distance (JSD) metric.") JensenShannonDistance, + @doc("The Population Stability Index (PSI) metric.") PopulationStabilityIndex, + @doc("The Pearsons Chi Squared Test metric.") PearsonsChiSquaredTest, +} + +@doc("Primary metrics for classification tasks.") +enum ClassificationPrimaryMetrics { + @doc(""" +AUC is the Area under the curve. +This metric represents arithmetic mean of the score for each class, +weighted by the number of true instances in each class. +""") + AUCWeighted, + @doc("Accuracy is the ratio of predictions that exactly match the true class labels.") + Accuracy, + @doc(""" +Normalized macro recall is recall macro-averaged and normalized, so that random +performance has a score of 0, and perfect performance has a score of 1. +""") + NormMacroRecall, + @doc(""" +The arithmetic mean of the average precision score for each class, weighted by +the number of true instances in each class. +""") + AveragePrecisionScoreWeighted, + @doc("The arithmetic mean of precision for each class, weighted by number of true instances in each class.") + PrecisionScoreWeighted, +} + +@doc("Enum for all classification models supported by AutoML.") +enum ClassificationModels { + @doc(""" +Logistic regression is a fundamental classification technique. +It belongs to the group of linear classifiers and is somewhat similar to polynomial and linear regression. +Logistic regression is fast and relatively uncomplicated, and it's convenient for you to interpret the results. +Although it's essentially a method for binary classification, it can also be applied to multiclass problems. +""") + LogisticRegression, + @doc(""" +SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications +to find the model parameters that correspond to the best fit between predicted and actual outputs. +""") + SGD, + @doc(""" +The multinomial Naive Bayes classifier is suitable for classification with discrete features (e.g., word counts for text classification). +The multinomial distribution normally requires integer feature counts. However, in practice, fractional counts such as tf-idf may also work. +""") + MultinomialNaiveBayes, + @doc("Naive Bayes classifier for multivariate Bernoulli models.") + BernoulliNaiveBayes, + @doc(""" +A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. +After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. +""") + SVM, + @doc(""" +A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. +After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. +Linear SVM performs best when input data is linear, i.e., data can be easily classified by drawing the straight line between classified values on a plotted graph. +""") + LinearSVM, + @doc(""" +K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints +which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. +""") + KNN, + @doc(""" +Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. +The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. +""") + DecisionTree, + @doc(""" +Random forest is a supervised learning algorithm. +The \"forest\" it builds, is an ensemble of decision trees, usually trained with the bagging method. +The general idea of the bagging method is that a combination of learning models increases the overall result. +""") + RandomForest, + @doc("Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm.") + ExtremeRandomTrees, + @doc("LightGBM is a gradient boosting framework that uses tree based learning algorithms.") + LightGBM, + @doc("The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution.") + GradientBoosting, + @doc("XGBoost: Extreme Gradient Boosting Algorithm. This algorithm is used for structured data where target column values can be divided into distinct class values.") + XGBoostClassifier, +} + +@doc(""" +The meta-learner is a model trained on the output of the individual heterogeneous models. +Default meta-learners are LogisticRegression for classification tasks (or LogisticRegressionCV if cross-validation is enabled) and ElasticNet for regression/forecasting tasks (or ElasticNetCV if cross-validation is enabled). +This parameter can be one of the following strings: LogisticRegression, LogisticRegressionCV, LightGBMClassifier, ElasticNet, ElasticNetCV, LightGBMRegressor, or LinearRegression +""") +enum StackMetaLearnerType { + None, + @doc("Default meta-learners are LogisticRegression for classification tasks.") + LogisticRegression, + @doc("Default meta-learners are LogisticRegression for classification task when CV is on.") + LogisticRegressionCV, + LightGBMClassifier, + @doc("Default meta-learners are LogisticRegression for regression task.") + ElasticNet, + @doc("Default meta-learners are LogisticRegression for regression task when CV is on.") + ElasticNetCV, + LightGBMRegressor, + LinearRegression, +} + +@doc("Training mode dictates whether to use distributed training or not") +enum TrainingMode { + @doc("Auto mode") Auto, + @doc("Distributed training mode") Distributed, + @doc("Non distributed training mode") NonDistributed, +} + +@doc("Enum for all classification models supported by AutoML.") +enum BlockedTransformers { + @doc("Target encoding for text data.") TextTargetEncoder, + @doc("Ohe hot encoding creates a binary feature transformation.") + OneHotEncoder, + @doc("Target encoding for categorical data.") CatTargetEncoder, + @doc("Tf-Idf stands for, term-frequency times inverse document-frequency. This is a common term weighting scheme for identifying information from documents.") + TfIdf, + @doc("Weight of Evidence encoding is a technique used to encode categorical variables. It uses the natural log of the P(1)/P(0) to create weights.") + WoETargetEncoder, + @doc("Label encoder converts labels/categorical variables in a numerical form.") + LabelEncoder, + @doc("Word embedding helps represents words or phrases as a vector, or a series of numbers.") + WordEmbedding, + @doc("Naive Bayes is a classified that is used for classification of discrete features that are categorically distributed.") + NaiveBayes, + @doc("Count Vectorizer converts a collection of text documents to a matrix of token counts.") + CountVectorizer, + @doc("Hashing One Hot Encoder can turn categorical variables into a limited number of new features. This is often used for high-cardinality categorical features.") + HashOneHotEncoder, +} + +@doc("Featurization mode - determines data featurization mode.") +enum FeaturizationMode { + @doc("Auto mode, system performs featurization without any custom featurization inputs.") + Auto, + @doc("Custom featurization.") Custom, + @doc("Featurization off. 'Forecasting' task cannot use this value.") Off, +} + +enum ClassificationModelPerformanceMetric { + @doc("Calculates the accuracy of the model predictions.") Accuracy, + @doc("Calculates the precision of the model predictions.") Precision, + @doc("Calculates the recall of the model predictions.") Recall, +} + +enum MonitoringModelType { + @doc("A model trained for classification tasks.") Classification, + @doc("A model trained for regressions tasks.") Regression, +} + +@doc("Enum to determine the job distribution type.") +enum DistributionType { + PyTorch, + TensorFlow, + Mpi, + Ray, +} + +enum JobLimitsType { + Command, + Sweep, +} + +@doc("Monitor compute type enum.") +enum MonitorComputeType { + @doc("Serverless Spark compute.") ServerlessSpark, +} + +@doc("Model task type enum.") +enum ModelTaskType { + Classification, + Regression, + QuestionAnswering, +} + +enum MonitoringNotificationMode { + @doc("Disabled notifications will not produce emails/metrics leveraged for alerting.") + Disabled, + @doc("Enabled notification will produce emails/metrics leveraged for alerting.") + Enabled, +} + +enum MonitoringSignalType { + @doc("Tracks model input data distribution change, comparing against training data or past production data.") + DataDrift, + @doc("Tracks prediction result data distribution change, comparing against validation/test label data or past production data.") + PredictionDrift, + @doc("Tracks model input data integrity.") DataQuality, + @doc("Tracks feature importance change in production, comparing against feature importance at training time.") + FeatureAttributionDrift, + @doc("Tracks a custom signal provided by users.") Custom, + @doc("Tracks model performance based on ground truth data.") ModelPerformance, + @doc("Tracks the safety and quality of generated content.") + GenerationSafetyQuality, + @doc("Tracks the token usage of generative endpoints.") + GenerationTokenStatistics, +} + +@doc("Monitoring input data type enum.") +enum MonitoringInputDataType { + @doc("An input data with a fixed window size.") Static, + @doc("An input data which trailing relatively to the monitor's current run.") + Trailing, + @doc("An input data with tabular format which doesn't require preprocessing.") + Fixed, +} + +@doc("Enum to determine the type of data.") +enum DataImportSourceType { + database, + file_system, +} + +enum FeatureAttributionMetric { + @doc("The Normalized Discounted Cumulative Gain metric.") + NormalizedDiscountedCumulativeGain, +} + +@doc("Flag for generating lags for the numeric features.") +enum FeatureLags { + @doc("No feature lags generated.") None, + @doc("System auto-generates feature lags.") Auto, +} + +@doc("The parameter defining how if AutoML should handle short time series.") +enum ShortSeriesHandlingConfiguration { + @doc("Represents no/null value.") None, + @doc("Short series will be padded if there are no long series, otherwise short series will be dropped.") + Auto, + @doc("All the short series will be padded.") Pad, + @doc("All the short series will be dropped.") Drop, +} + +@doc("Target aggregate function.") +enum TargetAggregationFunction { + @doc("Represent no value set.") None, + Sum, + Max, + Min, + Mean, +} + +@doc("Configure STL Decomposition of the time-series target column.") +enum UseStl { + @doc("No stl decomposition.") None, + Season, + SeasonTrend, +} + +@doc("Primary metrics for Forecasting task.") +enum ForecastingPrimaryMetrics { + @doc("The Spearman's rank coefficient of correlation is a non-parametric measure of rank correlation.") + SpearmanCorrelation, + @doc("The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales.") + NormalizedRootMeanSquaredError, + @doc("The R2 score is one of the performance evaluation measures for forecasting-based machine learning models.") + R2Score, + @doc("The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales.") + NormalizedMeanAbsoluteError, +} + +@doc("Enum for all forecasting models supported by AutoML.") +enum ForecastingModels { + @doc(""" +Auto-Autoregressive Integrated Moving Average (ARIMA) model uses time-series data and statistical analysis to interpret the data and make future predictions. +This model aims to explain data by using time series data on its past values and uses linear regression to make predictions. +""") + AutoArima, + @doc(""" +Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. +It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet is robust to missing data and shifts in the trend, and typically handles outliers well. +""") + Prophet, + @doc("The Naive forecasting model makes predictions by carrying forward the latest target value for each time-series in the training data.") + Naive, + @doc("The Seasonal Naive forecasting model makes predictions by carrying forward the latest season of target values for each time-series in the training data.") + SeasonalNaive, + @doc("The Average forecasting model makes predictions by carrying forward the average of the target values for each time-series in the training data.") + Average, + @doc("The Seasonal Average forecasting model makes predictions by carrying forward the average value of the latest season of data for each time-series in the training data.") + SeasonalAverage, + @doc("Exponential smoothing is a time series forecasting method for univariate data that can be extended to support data with a systematic trend or seasonal component.") + ExponentialSmoothing, + @doc(""" +An Autoregressive Integrated Moving Average with Explanatory Variable (ARIMAX) model can be viewed as a multiple regression model with one or more autoregressive (AR) terms and/or one or more moving average (MA) terms. +This method is suitable for forecasting when data is stationary/non stationary, and multivariate with any type of data pattern, i.e., level/trend /seasonality/cyclicity. +""") + Arimax, + @doc("TCNForecaster: Temporal Convolutional Networks Forecaster. //TODO: Ask forecasting team for brief intro.") + TCNForecaster, + @doc("Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions.") + ElasticNet, + @doc("The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution.") + GradientBoosting, + @doc(""" +Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. +The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. +""") + DecisionTree, + @doc(""" +K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints +which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. +""") + KNN, + @doc("Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer.") + LassoLars, + @doc(""" +SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications +to find the model parameters that correspond to the best fit between predicted and actual outputs. +It's an inexact but powerful technique. +""") + SGD, + @doc(""" +Random forest is a supervised learning algorithm. +The \"forest\" it builds, is an ensemble of decision trees, usually trained with the bagging method. +The general idea of the bagging method is that a combination of learning models increases the overall result. +""") + RandomForest, + @doc("Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm.") + ExtremeRandomTrees, + @doc("LightGBM is a gradient boosting framework that uses tree based learning algorithms.") + LightGBM, + @doc("XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners.") + XGBoostRegressor, +} + +@doc("Generation safety quality metric enum.") +enum GenerationSafetyQualityMetric { + AcceptableGroundednessScorePerInstance, + AggregatedGroundednessPassRate, + AcceptableCoherenceScorePerInstance, + AggregatedCoherencePassRate, + AcceptableFluencyScorePerInstance, + AggregatedFluencyPassRate, + AcceptableSimilarityScorePerInstance, + AggregatedSimilarityPassRate, + AcceptableRelevanceScorePerInstance, + AggregatedRelevancePassRate, +} + +@doc("Generation token statistics metric enum.") +enum GenerationTokenStatisticsMetric { + TotalTokenCount, + TotalTokenCountPerGroup, +} + +@doc("Learning rate scheduler enum.") +enum LearningRateScheduler { + @doc("No learning rate scheduler selected.") None, + @doc("Cosine Annealing With Warmup.") WarmupCosine, + @doc("Step learning rate scheduler.") Step, +} + +@doc("Stochastic optimizer for image models.") +enum StochasticOptimizer { + @doc("No optimizer selected.") None, + @doc("Stochastic Gradient Descent optimizer.") Sgd, + @doc("Adam is algorithm the optimizes stochastic objective functions based on adaptive estimates of moments") + Adam, + @doc("AdamW is a variant of the optimizer Adam that has an improved implementation of weight decay.") + Adamw, +} + +@doc("Primary metrics for classification multilabel tasks.") +enum ClassificationMultilabelPrimaryMetrics { + @doc(""" +AUC is the Area under the curve. +This metric represents arithmetic mean of the score for each class, +weighted by the number of true instances in each class. +""") + AUCWeighted, + @doc("Accuracy is the ratio of predictions that exactly match the true class labels.") + Accuracy, + @doc(""" +Normalized macro recall is recall macro-averaged and normalized, so that random +performance has a score of 0, and perfect performance has a score of 1. +""") + NormMacroRecall, + @doc(""" +The arithmetic mean of the average precision score for each class, weighted by +the number of true instances in each class. +""") + AveragePrecisionScoreWeighted, + @doc("The arithmetic mean of precision for each class, weighted by number of true instances in each class.") + PrecisionScoreWeighted, + @doc("Intersection Over Union. Intersection of predictions divided by union of predictions.") + IOU, +} + +@doc("Primary metrics for InstanceSegmentation tasks.") +enum InstanceSegmentationPrimaryMetrics { + @doc(""" +Mean Average Precision (MAP) is the average of AP (Average Precision). +AP is calculated for each class and averaged to get the MAP. +""") + MeanAveragePrecision, +} + +enum LogTrainingMetrics { + @doc("Enable compute and log training metrics.") Enable, + @doc("Disable compute and log training metrics.") Disable, +} + +enum LogValidationLoss { + @doc("Enable compute and log validation metrics.") Enable, + @doc("Disable compute and log validation metrics.") Disable, +} + +@doc("Image model size.") +enum ModelSize { + @doc("No value selected.") None, + @doc("Small size.") Small, + @doc("Medium size.") Medium, + @doc("Large size.") Large, + @doc("Extra large size.") ExtraLarge, +} + +@doc("Metric computation method to use for validation metrics in image tasks.") +enum ValidationMetricType { + @doc("No metric.") None, + @doc("Coco metric.") Coco, + @doc("Voc metric.") Voc, + @doc("CocoVoc metric.") CocoVoc, +} + +@doc("Primary metrics for Image ObjectDetection task.") +enum ObjectDetectionPrimaryMetrics { + @doc(""" +Mean Average Precision (MAP) is the average of AP (Average Precision). +AP is calculated for each class and averaged to get the MAP. +""") + MeanAveragePrecision, +} + +@doc("Annotation type of image data.") +enum ImageAnnotationType { + Classification, + BoundingBox, + InstanceSegmentation, +} + +@doc("Annotation type of text data.") +enum TextAnnotationType { + Classification, + NamedEntityRecognition, +} + +@doc("Enum to determine OneLake artifact type.") +enum OneLakeArtifactType { + LakeHouse, +} + +@doc("Enum of learning rate schedulers that aligns with those supported by HF") +enum NlpLearningRateScheduler { + @doc("No learning rate schedule.") None, + @doc("Linear warmup and decay.") Linear, + @doc("Linear warmup then cosine decay.") Cosine, + @doc("Linear warmup, cosine decay, then restart to initial LR.") + CosineWithRestarts, + @doc("Increase linearly then polynomially decay.") Polynomial, + @doc("Constant learning rate.") Constant, + @doc("Linear warmup followed by constant value.") ConstantWithWarmup, +} + +enum NumericalDataDriftMetric { + @doc("The Jensen Shannon Distance (JSD) metric.") JensenShannonDistance, + @doc("The Population Stability Index (PSI) metric.") PopulationStabilityIndex, + @doc("The Normalized Wasserstein Distance metric.") + NormalizedWassersteinDistance, + @doc("The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric.") + TwoSampleKolmogorovSmirnovTest, +} + +enum NumericalDataQualityMetric { + @doc("Calculates the rate of null values.") NullValueRate, + @doc("Calculates the rate of data type errors.") DataTypeErrorRate, + @doc("Calculates the rate values are out of bounds.") OutOfBoundsRate, +} + +enum NumericalPredictionDriftMetric { + @doc("The Jensen Shannon Distance (JSD) metric.") JensenShannonDistance, + @doc("The Population Stability Index (PSI) metric.") PopulationStabilityIndex, + @doc("The Normalized Wasserstein Distance metric.") + NormalizedWassersteinDistance, + @doc("The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric.") + TwoSampleKolmogorovSmirnovTest, +} + +@doc("Defines supported metric goals for hyperparameter tuning") +enum Goal { + Minimize, + Maximize, +} + +@doc("The specific type of random algorithm") +enum RandomSamplingAlgorithmRule { + Random, + Sobol, +} + +@doc("Primary metrics for Regression task.") +enum RegressionPrimaryMetrics { + @doc("The Spearman's rank coefficient of correlation is a nonparametric measure of rank correlation.") + SpearmanCorrelation, + @doc("The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales.") + NormalizedRootMeanSquaredError, + @doc("The R2 score is one of the performance evaluation measures for forecasting-based machine learning models.") + R2Score, + @doc("The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales.") + NormalizedMeanAbsoluteError, +} + +@doc("Enum for all Regression models supported by AutoML.") +enum RegressionModels { + @doc("Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions.") + ElasticNet, + @doc("The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution.") + GradientBoosting, + @doc(""" +Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. +The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. +""") + DecisionTree, + @doc(""" +K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints +which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. +""") + KNN, + @doc("Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer.") + LassoLars, + @doc(""" +SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications +to find the model parameters that correspond to the best fit between predicted and actual outputs. +It's an inexact but powerful technique. +""") + SGD, + @doc(""" +Random forest is a supervised learning algorithm. +The \"forest\" it builds, is an ensemble of decision trees, usually trained with the bagging method. +The general idea of the bagging method is that a combination of learning models increases the overall result. +""") + RandomForest, + @doc("Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm.") + ExtremeRandomTrees, + @doc("LightGBM is a gradient boosting framework that uses tree based learning algorithms.") + LightGBM, + @doc("XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners.") + XGBoostRegressor, +} + +enum RegressionModelPerformanceMetric { + @doc("The Mean Absolute Error (MAE) metric.") MeanAbsoluteError, + @doc("The Root Mean Squared Error (RMSE) metric.") RootMeanSquaredError, + @doc("The Mean Squared Error (MSE) metric.") MeanSquaredError, +} + +enum SparkJobEntryType { + SparkJobPythonEntry, + SparkJobScalaEntry, +} + +@doc("The action enum for networking rule.") +enum RuleAction { + Allow, + Deny, +} + +@doc("This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.") +@fixed +enum SkuTier { + Free, + Basic, + Standard, + Premium, +} + +@doc("The List Usages operation response.") +model ListUsagesResult is Azure.Core.Page; + +@doc("Describes AML Resource Usage.") +model Usage { + @doc("Specifies the resource ID.") + @visibility("read") + id?: string; + + @doc("Region of the AML workspace in the id.") + @visibility("read") + amlWorkspaceLocation?: string; + + @doc("Specifies the resource type.") + @visibility("read") + type?: string; + + @doc("An enum describing the unit of usage measurement.") + @visibility("read") + unit?: UsageUnit; + + @doc("The current usage of the resource.") + @visibility("read") + currentValue?: int32; + + @doc("The maximum permitted usage of the resource.") + @visibility("read") + limit?: int32; + + @doc("The name of the type of usage.") + @visibility("read") + name?: UsageName; +} + +@doc("The Usage Names.") +model UsageName { + @doc("The name of the resource.") + @visibility("read") + value?: string; + + @doc("The localized name of the resource.") + @visibility("read") + localizedValue?: string; +} + +@doc("The List Virtual Machine size operation response.") +model VirtualMachineSizeListResult { + @doc("The list of virtual machine sizes supported by AmlCompute.") + value?: VirtualMachineSize[]; +} + +@doc("Describes the properties of a VM size.") +model VirtualMachineSize { + @doc("The name of the virtual machine size.") + @visibility("read") + name?: string; + + @doc("The family name of the virtual machine size.") + @visibility("read") + family?: string; + + @doc("The number of vCPUs supported by the virtual machine size.") + @visibility("read") + vCPUs?: int32; + + @doc("The number of gPUs supported by the virtual machine size.") + @visibility("read") + gpus?: int32; + + @doc("The OS VHD disk size, in MB, allowed by the virtual machine size.") + @visibility("read") + osVhdSizeMB?: int32; + + @doc("The resource volume size, in MB, allowed by the virtual machine size.") + @visibility("read") + maxResourceVolumeMB?: int32; + + @doc("The amount of memory, in GB, supported by the virtual machine size.") + @visibility("read") + memoryGB?: float32; + + @doc("Specifies if the virtual machine size supports low priority VMs.") + @visibility("read") + lowPriorityCapable?: boolean; + + @doc("Specifies if the virtual machine size supports premium IO.") + @visibility("read") + premiumIO?: boolean; + + @doc("The estimated price information for using a VM.") + estimatedVMPrices?: EstimatedVMPrices; + + @doc("Specifies the compute types supported by the virtual machine size.") + supportedComputeTypes?: string[]; +} + +@doc("The estimated price info for using a VM.") +model EstimatedVMPrices { + @doc("Three lettered code specifying the currency of the VM price. Example: USD") + billingCurrency: BillingCurrency; + + @doc("The unit of time measurement for the specified VM price. Example: OneHour") + unitOfMeasure: UnitOfMeasure; + + @doc("The list of estimated prices for using a VM of a particular OS type, tier, etc.") + values: EstimatedVMPrice[]; +} + +@doc("The estimated price info for using a VM of a particular OS type, tier, etc.") +model EstimatedVMPrice { + @doc("The price charged for using the VM.") + retailPrice: float32; + + @doc("Operating system type used by the VM.") + osType: VMPriceOSType; + + @doc("The type of the VM.") + vmTier: VMTier; +} + +@doc("Quota update parameters.") +model QuotaUpdateParameters { + @doc("The list for update quota.") + value?: QuotaBaseProperties[]; + + @doc("Region of workspace quota to be updated.") + location?: string; +} + +@doc("The properties for Quota update or retrieval.") +model QuotaBaseProperties { + @doc("Specifies the resource ID.") + id?: string; + + @doc("Specifies the resource type.") + type?: string; + + @doc("The maximum permitted quota of the resource.") + limit?: int32; + + @doc("An enum describing the unit of quota measurement.") + unit?: QuotaUnit; +} + +@doc("The result of update workspace quota.") +model UpdateWorkspaceQuotasResult { + @doc("The list of workspace quota update result.") + @visibility("read") + value?: UpdateWorkspaceQuotas[]; + + @doc("The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page of Workspace Quota update result.") + @visibility("read") + nextLink?: string; +} + +@doc("The properties for update Quota response.") +model UpdateWorkspaceQuotas { + @doc("Specifies the resource ID.") + @visibility("read") + id?: string; + + @doc("Specifies the resource type.") + @visibility("read") + type?: string; + + @doc("The maximum permitted quota of the resource.") + limit?: int32; + + @doc("An enum describing the unit of quota measurement.") + @visibility("read") + unit?: QuotaUnit; + + @doc("Status of update workspace quota.") + status?: Status; +} + +@doc("The List WorkspaceQuotasByVMFamily operation response.") +model ListWorkspaceQuotas is Azure.Core.Page; + +@doc("The quota assigned to a resource.") +model ResourceQuota { + @doc("Specifies the resource ID.") + @visibility("read") + id?: string; + + @doc("Region of the AML workspace in the id.") + @visibility("read") + amlWorkspaceLocation?: string; + + @doc("Specifies the resource type.") + @visibility("read") + type?: string; + + @doc("Name of the resource.") + @visibility("read") + name?: ResourceName; + + @doc("The maximum permitted quota of the resource.") + @visibility("read") + limit?: int32; + + @doc("An enum describing the unit of quota measurement.") + @visibility("read") + unit?: QuotaUnit; +} + +@doc("The Resource Name.") +model ResourceName { + @doc("The name of the resource.") + @visibility("read") + value?: string; + + @doc("The localized name of the resource.") + @visibility("read") + localizedValue?: string; +} + +@doc("The resource model definition representing SKU") +model Sku { + @doc("The name of the SKU. Ex - P3. It is typically a letter+number code") + name: string; + + @doc("This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.") + tier?: SkuTier; + + @doc("The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ") + size?: string; + + @doc("If the service has different generations of hardware, for the same SKU, then that can be captured here.") + family?: string; + + @doc("If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.") + capacity?: int32; +} + +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; +} + +model ComputeResourceSchema { + @doc("Compute properties") + properties?: Compute; +} + +@doc("Machine Learning compute object.") +@discriminator("computeType") +model Compute { + @doc("Location for the underlying compute") + @visibility("read", "create") + computeLocation?: string; + + @doc("The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("The description of the Machine Learning compute.") + description?: string; + + @doc("The time at which the compute was created.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("The time at which the compute was last modified.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + modifiedOn?: utcDateTime; + + @doc("ARM resource id of the underlying compute") + resourceId?: string; + + @doc("Errors during provisioning") + @visibility("read") + provisioningErrors?: ErrorResponse[]; + + @doc("Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.") + @visibility("read") + isAttachedCompute?: boolean; + + @doc("Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication.") + @visibility("read", "create") + disableLocalAuth?: boolean; +} + +@doc("AmlCompute update parameters.") +model ClusterUpdateParameters { + @doc("The properties of the amlCompute.") + properties?: ClusterUpdateProperties; +} + +@doc("The properties of a amlCompute that need to be updated.") +model ClusterUpdateProperties { + @doc("Properties of ClusterUpdate") + properties?: ScaleSettingsInformation; +} + +@doc("Desired scale settings for the amlCompute.") +model ScaleSettingsInformation { + @doc("scale settings for AML Compute") + scaleSettings?: ScaleSettings; +} + +@doc("scale settings for AML Compute") +model ScaleSettings { + @doc("Max number of nodes to use") + maxNodeCount: int32; + + @doc("Min number of nodes to use") + minNodeCount?: int32; + + @doc("Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format.") + nodeIdleTimeBeforeScaleDown?: duration; +} + +@doc("Specifies the custom service configuration") +model CustomService extends Record { + @doc("Name of the Custom Service") + name?: string; + + @doc("Describes the Image Specifications") + image?: Image; + + @doc("Environment Variable for the container") + environmentVariables?: Record; + + @doc("Describes the docker settings for the image") + docker?: Docker; + + @doc("Configuring the endpoints for the container") + endpoints?: Endpoint[]; + + @doc("Configuring the volumes for the container") + volumes?: VolumeDefinition[]; +} + +model Image extends Record { + @doc("Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images") + type?: ImageType; + + @doc("Image reference URL") + reference?: string; +} + +model EnvironmentVariable extends Record { + @doc("Type of the Environment Variable. Possible values are: local - For local variable") + type?: EnvironmentVariableType; + + @doc("Value of the Environment variable") + value?: string; +} + +model Docker extends Record { + @doc("Indicate whether container shall run in privileged or non-privileged mode.") + privileged?: boolean; +} + +model Endpoint { + @doc("Protocol over which communication will happen over this endpoint") + protocol?: Protocol; + + @doc("Name of the Endpoint") + name?: string; + + @doc("Application port inside the container.") + target?: int32; + + @doc("Port over which the application is exposed from container.") + published?: int32; + + @doc("Host IP over which the application is exposed from the container") + hostIp?: string; +} + +model VolumeDefinition { + @doc("Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe") + type?: VolumeDefinitionType; + + @doc("Indicate whether to mount volume as readOnly. Default value for this is false.") + readOnly?: boolean; + + @doc("Source of the mount. For bind mounts this is the host path.") + source?: string; + + @doc("Target of the mount. For bind mounts this is the path in the container.") + target?: string; + + @doc("Consistency of the volume") + consistency?: string; + + @doc("Bind Options of the mount") + bind?: BindOptions; + + @doc("Volume Options of the mount") + volume?: VolumeOptions; + + @doc("tmpfs option of the mount") + tmpfs?: TmpfsOptions; +} + +model BindOptions { + @doc("Type of Bind Option") + propagation?: string; + + @doc("Indicate whether to create host path.") + createHostPath?: boolean; + + @doc("Mention the selinux options.") + selinux?: string; +} + +model VolumeOptions { + @doc("Indicate whether volume is nocopy") + nocopy?: boolean; +} + +model TmpfsOptions { + @doc("Mention the Tmpfs size") + size?: int32; +} + +@doc("Result of AmlCompute Nodes") +@pagedResult +model AmlComputeNodesInformation { + @doc("The collection of returned AmlCompute nodes details.") + @visibility("read") + @items + nodes?: AmlComputeNodeInformation[]; + + @doc("The continuation token.") + @visibility("read") + @nextLink + nextLink?: string; +} + +@doc("Compute node information related to a AmlCompute.") +model AmlComputeNodeInformation { + @doc("ID of the compute node.") + @visibility("read") + nodeId?: string; + + @doc("Private IP address of the compute node.") + @visibility("read") + privateIpAddress?: string; + + @doc("Public IP address of the compute node.") + @visibility("read") + publicIpAddress?: string; + + @doc("SSH port number of the node.") + @visibility("read") + port?: int32; + + @doc("State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted.") + @visibility("read") + nodeState?: NodeState; + + @doc("ID of the Experiment running on the node, if any else null.") + @visibility("read") + runId?: string; +} + +@doc("Secrets related to a Machine Learning compute. Might differ for every type of compute.") +@discriminator("computeType") +model ComputeSecrets {} + +@doc("Stops compute instance after user defined period of inactivity.") +model IdleShutdownSetting { + @doc("Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days.") + idleTimeBeforeShutdown?: string; +} + +@doc("Container for code asset versions.") +model CodeContainer extends AssetContainer { + @doc("Provisioning state for the code container.") + @visibility("read") + provisioningState?: AssetProvisioningState; +} + +model AssetContainer extends ResourceBase { + @doc("Is the asset archived?") + @visibility("read", "create", "update") + isArchived?: boolean; + + @doc("The latest version inside this container.") + @visibility("read") + latestVersion?: string; + + @doc("The next auto incremental version") + @visibility("read") + nextVersion?: string; +} + +model ResourceBase { + @doc("The asset description text.") + description?: string; + + @doc("The asset property dictionary.") + properties?: Record; + + @doc("Tag dictionary. Tags can be added, removed, and updated.") + tags?: Record; +} + +@doc("Code asset version details.") +model CodeVersion extends AssetBase { + @doc("Uri where code is located") + codeUri?: string; + + @doc("Provisioning state for the code version.") + @visibility("read") + provisioningState?: AssetProvisioningState; +} + +model AssetBase extends ResourceBase { + @doc("Specifies the lifecycle setting of managed data asset.") + @visibility("read", "create", "update") + autoDeleteSetting?: AutoDeleteSetting; + + @doc("If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous") + @visibility("read", "create") + isAnonymous?: boolean; + + @doc("Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived") + @visibility("read", "create", "update") + isArchived?: boolean; +} + +model AutoDeleteSetting { + @doc("When to check if an asset is expired") + @visibility("read", "create", "update") + condition?: AutoDeleteCondition; + + @doc("Expiration condition value.") + @visibility("read", "create", "update") + value?: string; +} + +model PendingUploadRequestDto { + @doc("If PendingUploadId = null then random guid will be used.") + pendingUploadId?: string; + + @doc("TemporaryBlobReference is the only supported type") + pendingUploadType?: PendingUploadType; +} + +model PendingUploadResponseDto { + @doc("Container level read, write, list SAS") + blobReferenceForConsumption?: BlobReferenceForConsumptionDto; + + @doc("ID for this upload request") + pendingUploadId?: string; + + @doc("TemporaryBlobReference is the only supported type") + pendingUploadType?: PendingUploadType; +} + +model BlobReferenceForConsumptionDto { + @doc(""" +Blob URI path for client to upload data. +Example: https://blob.windows.core.net/Container/Path +""") + blobUri?: string; + + @doc("Credential info to access storage account") + credential?: PendingUploadCredentialDto; + + @doc("Arm ID of the storage account to use") + storageAccountArmId?: string; +} + +@discriminator("credentialType") +model PendingUploadCredentialDto {} + +@doc(""" +Component container definition. + +""") +model ComponentContainer extends AssetContainer { + @doc("Provisioning state for the component container.") + @visibility("read") + provisioningState?: AssetProvisioningState; +} + +@doc("Definition of a component version: defines resources that span component types.") +model ComponentVersion extends AssetBase { + @doc(""" +Defines Component definition details. + +""") + @visibility("read", "create") + componentSpec?: Record; + + @doc("Provisioning state for the component version.") + @visibility("read") + provisioningState?: AssetProvisioningState; + + @doc("Stage in the component lifecycle") + stage?: string; +} + +@doc("Container for data asset versions.") +model DataContainer extends AssetContainer { + @doc("[Required] Specifies the type of data.") + @visibility("read", "create") + dataType: DataType; +} + +@doc("Data version base definition") +@discriminator("dataType") +model DataVersionBase extends AssetBase { + @doc("[Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + dataUri: string; + + @doc("Intellectual Property details. Used if data is an Intellectual Property.") + @visibility("read", "create") + intellectualProperty?: IntellectualProperty; + + @doc("Stage in the data lifecycle assigned to this data asset") + stage?: string; +} + +@doc("Intellectual Property details for a resource.") +model IntellectualProperty { + @doc("Protection level of the Intellectual Property.") + protectionLevel?: ProtectionLevel; + + @doc("[Required] Publisher of the Intellectual Property. Must be the same as Registry publisher name.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + publisher: string; +} + +@doc("Container for environment specification versions.") +model EnvironmentContainer extends AssetContainer { + @doc("Provisioning state for the environment container.") + @visibility("read") + provisioningState?: AssetProvisioningState; +} + +@doc("Environment version details.") +model EnvironmentVersion extends AssetBase { + @doc("Defines if image needs to be rebuilt based on base image changes.") + @visibility("read", "create") + autoRebuild?: AutoRebuildSetting; + + @doc("Configuration settings for Docker build context.") + @visibility("read", "create") + build?: BuildContext; + + @doc(""" +Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and C/C++ packages. + +""") + @visibility("read", "create") + condaFile?: string; + + @doc(""" +Environment type is either user managed or curated by the Azure ML service + +""") + @visibility("read") + environmentType?: EnvironmentType; + + @doc(""" +Name of the image that will be used for the environment. + +""") + @visibility("read", "create") + image?: string; + + @doc("Defines configuration specific to inference.") + @visibility("read", "create") + inferenceConfig?: InferenceContainerProperties; + + @doc("Intellectual Property details. Used if environment is an Intellectual Property.") + @visibility("read", "create") + intellectualProperty?: IntellectualProperty; + + @doc("The OS type of the environment.") + @visibility("read", "create") + osType?: OperatingSystemType; + + @doc("Provisioning state for the environment version.") + @visibility("read") + provisioningState?: AssetProvisioningState; + + @doc("Stage in the environment lifecycle assigned to this environment") + stage?: string; +} + +@doc("Configuration settings for Docker build context") +model BuildContext { + @doc(""" +[Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. + +""") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + contextUri: string; + + @doc(""" +Path to the Dockerfile in the build context. + +""") + @visibility("read", "create") + dockerfilePath?: string; +} + +model InferenceContainerProperties { + @doc("The route to check the liveness of the inference server container.") + livenessRoute?: Route; + + @doc("The route to check the readiness of the inference server container.") + readinessRoute?: Route; + + @doc("The port to send the scoring requests to, within the inference server container.") + scoringRoute?: Route; +} + +model Route { + @doc("[Required] The path for the route.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + path: string; + + @doc("[Required] The port for the route.") + port: int32; +} + +model ModelContainer extends AssetContainer { + @doc("Provisioning state for the model container.") + @visibility("read") + provisioningState?: AssetProvisioningState; +} + +@doc("Model asset version details.") +model ModelVersion extends AssetBase { + @doc("Mapping of model flavors to their properties.") + flavors?: Record; + + @doc("Intellectual Property details. Used if model is an Intellectual Property.") + @visibility("read", "create") + intellectualProperty?: IntellectualProperty; + + @doc("Name of the training job which produced this model") + jobName?: string; + + @doc("The storage format for this entity. Used for NCD.") + modelType?: string; + + @doc("The URI path to the model contents.") + modelUri?: string; + + @doc("Provisioning state for the model version.") + @visibility("read") + provisioningState?: AssetProvisioningState; + + @doc("Stage in the model lifecycle assigned to this model") + stage?: string; +} + +model FlavorData { + @doc("Model flavor-specific data.") + data?: Record; +} + +@doc("Model package operation request properties.") +model PackageRequest { + @doc("Base environment to start with.") + @visibility("read", "create") + baseEnvironmentSource?: BaseEnvironmentSource; + + @doc("Collection of environment variables.") + @visibility("read", "create") + environmentVariables?: Record; + + @doc("[Required] Inferencing server configurations.") + @visibility("read", "create") + inferencingServer: InferencingServer; + + @doc("Collection of inputs.") + @visibility("read", "create") + inputs?: ModelPackageInput[]; + + @doc("Model configuration including the mount mode.") + @visibility("read", "create") + modelConfiguration?: ModelConfiguration; + + @doc("Tag dictionary. Tags can be added, removed, and updated.") + @visibility("read", "create") + tags?: Record; + + @doc("[Required] Arm ID of the target environment to be created by package operation.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + targetEnvironmentId: string; +} + +@discriminator("baseEnvironmentSourceType") +model BaseEnvironmentSource {} + +@discriminator("serverType") +model InferencingServer {} + +@doc("Model package input options.") +model ModelPackageInput { + @doc("[Required] Type of the input included in the target image.") + inputType: PackageInputType; + + @doc("Input delivery mode of the input.") + mode?: PackageInputDeliveryMode; + + @doc("Relative mount path of the input in the target image.") + mountPath?: string; + + @doc("[Required] Location of the input.") + path: PackageInputPathBase; +} + +@discriminator("inputPathType") +model PackageInputPathBase {} + +@doc("Model configuration options.") +model ModelConfiguration { + @doc("Input delivery mode for the model.") + mode?: PackageInputDeliveryMode; + + @doc("Relative mounting path of the model in the target image.") + mountPath?: string; +} + +@doc("Package response returned after async package operation completes successfully.") +model PackageResponse { + @doc("Base environment to start with.") + @visibility("read") + baseEnvironmentSource?: BaseEnvironmentSource; + + @doc("Build id of the image build operation.") + @visibility("read") + buildId?: string; + + @doc("Build state of the image build operation.") + @visibility("read") + buildState?: PackageBuildState; + + @doc("Collection of environment variables.") + @visibility("read") + environmentVariables?: Record; + + @doc("Inferencing server configurations.") + @visibility("read") + inferencingServer?: InferencingServer; + + @doc("Collection of inputs.") + @visibility("read") + inputs?: ModelPackageInput[]; + + @doc("Log url of the image build operation.") + @visibility("read") + logUrl?: string; + + @doc("Model configuration including the mount mode.") + @visibility("read") + modelConfiguration?: ModelConfiguration; + + @doc("Tag dictionary. Tags can be added, removed, and updated.") + @visibility("read") + tags?: Record; + + @doc("Asset ID of the target environment created by package operation.") + @visibility("read") + targetEnvironmentId?: string; +} + +@doc("Batch endpoint configuration.") +model BatchEndpoint extends EndpointPropertiesBase { + @doc("Default values for Batch Endpoint.") + defaults?: BatchEndpointDefaults; + + @doc("Provisioning state for the endpoint.") + @visibility("read") + provisioningState?: EndpointProvisioningState; +} + +@doc("Batch endpoint default values") +model BatchEndpointDefaults { + @doc(""" +Name of the deployment that will be default for the endpoint. +This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. +""") + deploymentName?: string; +} + +@doc("Inference Endpoint base definition") +model EndpointPropertiesBase { + @doc("[Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does.") + authMode: EndpointAuthMode; + + @doc("Description of the inference endpoint.") + description?: string; + + @doc(""" +EndpointAuthKeys to set initially on an Endpoint. +This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. +""") + @visibility("create") + keys?: EndpointAuthKeys; + + @doc("Property dictionary. Properties can be added, but not removed or altered.") + properties?: Record; + + @doc("Endpoint URI.") + @visibility("read") + scoringUri?: string; + + @doc("Endpoint Swagger URI.") + @visibility("read") + swaggerUri?: string; +} + +@doc("Keys for endpoint authentication.") +model EndpointAuthKeys { + @doc("The primary key.") + @visibility("read", "create") + primaryKey?: string; + + @doc("The secondary key.") + @visibility("read", "create") + secondaryKey?: string; +} + +@doc("Strictly used in update requests.") +model PartialMinimalTrackedResourceWithIdentity + extends PartialMinimalTrackedResource { + @doc("Managed service identity (system assigned and/or user assigned identities)") + identity?: PartialManagedServiceIdentity; +} + +@doc("Managed service identity (system assigned and/or user assigned identities)") +model PartialManagedServiceIdentity { + @doc("Managed service identity (system assigned and/or user assigned identities)") + type?: ManagedServiceIdentityType; + + @doc("The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.") + userAssignedIdentities?: Record>; +} + +@doc("Strictly used in update requests.") +model PartialMinimalTrackedResource { + @doc("Resource tags.") + tags?: Record; +} + +@doc("Batch inference settings per deployment.") +model BatchDeployment extends EndpointDeploymentPropertiesBase { + @doc("Compute target for batch inference operation.") + compute?: string; + + @doc("Properties relevant to different deployment types.") + deploymentConfiguration?: BatchDeploymentConfiguration; + + @doc(""" +Error threshold, if the error count for the entire input goes above this value, +the batch inference will be aborted. Range is [-1, int.MaxValue]. +For FileDataset, this value is the count of file failures. +For TabularDataset, this value is the count of record failures. +If set to -1 (the lower bound), all failures during batch inference will be ignored. +""") + errorThreshold?: int32; + + @doc("Logging level for batch inference operation.") + loggingLevel?: BatchLoggingLevel; + + @doc("Indicates maximum number of parallelism per instance.") + maxConcurrencyPerInstance?: int32; + + @doc(""" +Size of the mini-batch passed to each batch invocation. +For FileDataset, this is the number of files per mini-batch. +For TabularDataset, this is the size of the records in bytes, per mini-batch. +""") + miniBatchSize?: int32; + + @doc("Reference to the model asset for the endpoint deployment.") + `model`?: AssetReferenceBase; + + @doc("Indicates how the output will be organized.") + outputAction?: BatchOutputAction; + + @doc("Customized output file name for append_row output action.") + outputFileName?: string; + + @doc("Provisioning state for the endpoint deployment.") + @visibility("read") + provisioningState?: DeploymentProvisioningState; + + @doc(""" +Indicates compute configuration for the job. +If not provided, will default to the defaults defined in ResourceConfiguration. +""") + resources?: DeploymentResourceConfiguration; + + @doc(""" +Retry Settings for the batch inference operation. +If not provided, will default to the defaults defined in BatchRetrySettings. +""") + retrySettings?: BatchRetrySettings; +} + +@doc("Properties relevant to different deployment types.") +@discriminator("deploymentConfigurationType") +model BatchDeploymentConfiguration {} + +@doc("Base definition for asset references.") +@discriminator("referenceType") +model AssetReferenceBase {} + +model DeploymentResourceConfiguration extends ResourceConfiguration {} + +model ResourceConfiguration { + @doc("Optional number of instances or nodes used by the compute target.") + @visibility("read", "create") + instanceCount?: int32; + + @doc("Optional type of VM used as supported by the compute target.") + @visibility("read", "create") + instanceType?: string; + + @doc("Locations where the job can run.") + @visibility("read", "create") + locations?: string[]; + + @doc(""" +Optional max allowed number of instances or nodes to be used by the compute target. +For use with elastic training, currently supported by PyTorch distribution type only. +""") + @visibility("read", "create") + maxInstanceCount?: int32; + + @doc("Additional properties bag.") + @visibility("read", "create") + properties?: Record>; +} + +@doc("Retry settings for a batch inference operation.") +model BatchRetrySettings { + @doc("Maximum retry count for a mini-batch") + maxRetries?: int32; + + @doc("Invocation timeout for a mini-batch, in ISO 8601 format.") + timeout?: duration; +} + +@doc("Base definition for endpoint deployment.") +model EndpointDeploymentPropertiesBase { + @doc("Code configuration for the endpoint deployment.") + codeConfiguration?: CodeConfiguration; + + @doc("Description of the endpoint deployment.") + description?: string; + + @doc("ARM resource ID of the environment specification for the endpoint deployment.") + environmentId?: string; + + @doc("Environment variables configuration for the deployment.") + environmentVariables?: Record; + + @doc("Property dictionary. Properties can be added, but not removed or altered.") + properties?: Record; +} + +@doc("Configuration for a scoring code asset.") +model CodeConfiguration { + @doc("ARM resource ID of the code asset.") + @visibility("read", "create") + codeId?: string; + + @doc("[Required] The script to execute on startup. eg. \"score.py\"") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + scoringScript: string; +} + +@doc("Strictly used in update requests.") +model PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties { + @doc("Additional attributes of the entity.") + properties?: PartialBatchDeployment; + + @doc("Resource tags.") + tags?: Record; +} + +@doc("Mutable batch inference settings per deployment.") +model PartialBatchDeployment { + @doc("Description of the endpoint deployment.") + description?: string; +} + +@doc("Base definition for datastore contents configuration.") +@discriminator("datastoreType") +model Datastore extends ResourceBase { + @doc("[Required] Account credentials.") + credentials: DatastoreCredentials; + + @doc("Intellectual Property details.") + @visibility("read", "create") + intellectualProperty?: IntellectualProperty; + + @doc("Readonly property to indicate if datastore is the workspace default datastore") + @visibility("read") + isDefault?: boolean; +} + +@doc("Base definition for datastore credentials.") +@discriminator("credentialsType") +model DatastoreCredentials {} + +@doc("Base definition for datastore secrets.") +@discriminator("secretsType") +model DatastoreSecrets {} + +@doc("Dto object representing feature set") +model FeaturesetContainerProperties extends AssetContainer { + @doc("Provisioning state for the featureset container.") + @visibility("read") + provisioningState?: AssetProvisioningState; +} + +@doc("Dto object representing feature") +model FeatureProperties extends ResourceBase { + @doc("Specifies type") + dataType?: FeatureDataType; + + @doc("Specifies name") + featureName?: string; +} + +@doc("Dto object representing feature set version") +model FeaturesetVersionProperties extends AssetBase { + @doc("Specifies list of entities") + entities?: string[]; + + @doc("Specifies the materialization settings") + materializationSettings?: MaterializationSettings; + + @doc("Provisioning state for the featureset version container.") + @visibility("read") + provisioningState?: AssetProvisioningState; + + @doc("Specifies the feature spec details") + specification?: FeaturesetSpecification; + + @doc("Specifies the asset stage") + stage?: string; +} + +model MaterializationSettings { + @doc("Specifies the notification details") + notification?: NotificationSetting; + + @doc("Specifies the compute resource settings") + resource?: MaterializationComputeResource; + + @doc("Specifies the schedule details") + schedule?: RecurrenceTrigger; + + @doc("Specifies the spark compute settings") + sparkConfiguration?: Record; + + @doc("Specifies the stores to which materialization should happen") + storeType?: MaterializationStoreType; +} + +@doc("Configuration for notification.") +model NotificationSetting { + @doc("Send email notification to user on specified notification type") + @visibility("read", "create") + emailOn?: EmailNotificationEnableType[]; + + @doc("This is the email recipient list which has a limitation of 499 characters in total concat with comma separator") + @visibility("read", "create") + emails?: string[]; + + @doc("Send webhook callback to a service. Key is a user-provided name for the webhook.") + @visibility("read", "create", "update") + webhooks?: Record; +} + +@doc("Webhook base") +@discriminator("webhookType") +model Webhook { + @doc("Send callback on a specified notification event") + @visibility("read", "create") + eventType?: string; +} + +@doc("Dto object representing compute resource") +model MaterializationComputeResource { + @doc("Specifies the instance type") + instanceType?: string; +} + +model RecurrenceTrigger extends TriggerBase { + @doc("[Required] The frequency to trigger schedule.") + frequency: RecurrenceFrequency; + + @doc("[Required] Specifies schedule interval in conjunction with frequency") + interval: int32; + + @doc("The recurrence schedule.") + schedule?: RecurrenceSchedule; + + @doc("[Required] ") + triggerType: "Recurrence"; +} + +model RecurrenceSchedule { + @doc("[Required] List of hours for the schedule.") + hours: int32[]; + + @doc("[Required] List of minutes for the schedule.") + minutes: int32[]; + + @doc("List of month days for the schedule") + monthDays?: int32[]; + + @doc("List of days for the schedule.") + weekDays?: WeekDay[]; +} + +@discriminator("triggerType") +model TriggerBase { + @doc(""" +Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. +Recommented format would be \"2022-06-01T00:00:01\" +If not present, the schedule will run indefinitely +""") + endTime?: string; + + @doc("Specifies start time of schedule in ISO 8601 format, but without a UTC offset.") + startTime?: string; + + @doc(""" +Specifies time zone in which the schedule runs. +TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 +""") + timeZone?: string; +} + +@doc("Dto object representing specification") +model FeaturesetSpecification { + @doc("Specifies the spec path") + path?: string; +} + +@doc("Request payload for creating a backfill request for a given feature set version") +model FeaturesetVersionBackfillRequest { + @doc("Specifies description") + description?: string; + + @doc("Specifies description") + displayName?: string; + + @doc("Specifies the backfill feature window to be materialized") + featureWindow?: FeatureWindow; + + @doc("Specifies the compute resource settings") + resource?: MaterializationComputeResource; + + @doc("Specifies the spark compute settings") + sparkConfiguration?: Record; + + @doc("Specifies the tags") + tags?: Record; +} + +@doc("Specifies the feature window") +model FeatureWindow { + @doc("Specifies the feature window end time") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + featureWindowEnd?: utcDateTime; + + @doc("Specifies the feature window start time") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + featureWindowStart?: utcDateTime; +} + +@doc("Dto object representing the feature set job") +model FeaturesetJob { + @doc("Specifies the created date") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDate?: utcDateTime; + + @doc("Specifies the display name") + displayName?: string; + + @doc("Specifies the duration") + duration?: duration; + + @doc("Specifies the experiment id") + experimentId?: string; + + @doc("Specifies the backfill feature window to be materialized") + featureWindow?: FeatureWindow; + + @doc("Specifies the job id") + jobId?: string; + + @doc("Specifies the job status") + status?: JobStatus; + + @doc("Specifies the tags if any") + tags?: Record; + + @doc("Specifies the feature store job type") + type?: FeaturestoreJobType; +} + +@doc("A paginated list of FeaturesetJob entities.") +model FeaturesetJobArmPaginatedResult is Azure.Core.Page; + +@doc("Dto object representing feature entity") +model FeaturestoreEntityContainerProperties extends AssetContainer { + @doc("Provisioning state for the featurestore entity container.") + @visibility("read") + provisioningState?: AssetProvisioningState; +} + +@doc("Dto object representing feature entity version") +model FeaturestoreEntityVersionProperties extends AssetBase { + @doc("Specifies index columns") + indexColumns?: IndexColumn[]; + + @doc("Provisioning state for the featurestore entity version.") + @visibility("read") + provisioningState?: AssetProvisioningState; + + @doc("Specifies the asset stage") + stage?: string; +} + +@doc("Dto object representing index column") +model IndexColumn { + @doc("Specifies the column name") + columnName?: string; + + @doc("Specifies the data type") + dataType?: FeatureDataType; +} + +@doc("Base definition for a job.") +@discriminator("jobType") +model JobBase extends ResourceBase { + @doc("ARM resource ID of the component resource.") + @visibility("read", "create") + componentId?: string; + + @doc("ARM resource ID of the compute resource.") + @visibility("read", "create") + computeId?: string; + + @doc("Display name of job.") + @visibility("read", "create") + displayName?: string; + + @doc("The name of the experiment the job belongs to. If not set, the job is placed in the \"Default\" experiment.") + @visibility("read", "create") + experimentName?: string; + + @doc(""" +Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. +Defaults to AmlToken if null. +""") + @visibility("read", "create") + identity?: IdentityConfiguration; + + @doc("Is the asset archived?") + @visibility("read", "create", "update") + isArchived?: boolean; + + @doc("Notification setting for the job") + @visibility("read", "create", "update") + notificationSetting?: NotificationSetting; + + @doc("Configuration for secrets to be made available during runtime.") + @visibility("read", "create") + secretsConfiguration?: Record; + + @doc(""" +List of JobEndpoints. +For local jobs, a job endpoint will have an endpoint value of FileStreamObject. +""") + services?: Record; + + @doc("Status of the job.") + @visibility("read") + status?: JobStatus; +} + +@doc("Base definition for identity configuration.") +@discriminator("identityType") +model IdentityConfiguration {} + +@doc("Secret Configuration definition.") +model SecretConfiguration { + @doc(""" +Secret Uri. +Sample Uri : https://myvault.vault.azure.net/secrets/mysecretname/secretversion +""") + @visibility("read", "create") + uri?: string; + + @doc("Name of secret in workspace key vault.") + @visibility("read", "create") + workspaceSecretName?: string; +} + +@doc("Job endpoint definition") +model JobService { + @doc("Url for endpoint.") + @visibility("read", "create") + endpoint?: string; + + @doc("Any error in the service.") + @visibility("read") + errorMessage?: string; + + @doc("Endpoint type.") + @visibility("read", "create") + jobServiceType?: string; + + @doc(""" +Nodes that user would like to start the service on. +If Nodes is not set or set to null, the service will only be started on leader node. +""") + nodes?: Nodes; + + @doc("Port for endpoint set by user.") + @visibility("read", "create") + port?: int32; + + @doc("Additional properties to set on the endpoint.") + properties?: Record; + + @doc("Status of endpoint.") + @visibility("read") + status?: string; +} + +@doc("Abstract Nodes definition") +@discriminator("nodesValueType") +model Nodes {} + +@doc("Azure Resource Manager resource envelope strictly used in update requests.") +model PartialJobBasePartialResource { + @doc("Additional attributes of the entity.") + properties?: PartialJobBase; +} + +@doc("Mutable base definition for a job.") +model PartialJobBase { + @doc("Mutable notification setting for the job") + notificationSetting?: PartialNotificationSetting; +} + +@doc("Mutable configuration for notification.") +model PartialNotificationSetting { + @doc("Send webhook callback to a service. Key is a user-provided name for the webhook.") + webhooks?: Record; +} + +@doc("Labeling job definition") +model LabelingJobProperties extends JobBase { + @doc("Created time of the job in UTC timezone.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDateTime?: utcDateTime; + + @doc("Configuration of data used in the job.") + @visibility("read", "create") + dataConfiguration?: LabelingDataConfiguration; + + @doc("Labeling instructions of the job.") + @visibility("read", "create", "update") + jobInstructions?: LabelingJobInstructions; + + @doc("Label categories of the job.") + @visibility("read", "create", "update") + labelCategories?: Record; + + @doc("Media type specific properties in the job.") + @visibility("read", "create") + labelingJobMediaProperties?: LabelingJobMediaProperties; + + @doc("Configuration of MLAssist feature in the job.") + @visibility("read", "create") + mlAssistConfiguration?: MLAssistConfiguration; + + @doc("Progress metrics of the job.") + @visibility("read") + progressMetrics?: ProgressMetrics; + + @doc("Internal id of the job(Previously called project).") + @visibility("read") + projectId?: string; + + @doc("Specifies the labeling job provisioning state.") + @visibility("read") + provisioningState?: JobProvisioningState; + + @doc("Status messages of the job.") + @visibility("read") + statusMessages?: StatusMessage[]; + + @doc("[Required] Specifies the type of job.") + jobType: "Labeling"; +} + +@doc("Labeling data configuration definition") +model LabelingDataConfiguration { + @doc("Resource Id of the data asset to perform labeling.") + @visibility("read", "create") + dataId?: string; + + @doc("Indicates whether to enable incremental data refresh.") + @visibility("read", "create", "update") + incrementalDataRefresh?: IncrementalDataRefresh; +} + +@doc("Instructions for labeling job") +model LabelingJobInstructions { + @doc("The link to a page with detailed labeling instructions for labelers.") + @visibility("read", "create", "update") + uri?: string; +} + +@doc("Label category definition") +model LabelCategory { + @doc("Dictionary of label classes in this category.") + @visibility("read", "create", "update") + classes?: Record; + + @doc("Display name of the label category.") + @visibility("read", "create") + displayName?: string; + + @doc("Indicates whether it is allowed to select multiple classes in this category.") + @visibility("read", "create", "update") + multiSelect?: MultiSelect; +} + +@doc("Label class definition") +model LabelClass { + @doc("Display name of the label class.") + @visibility("read", "create") + displayName?: string; + + @doc("Dictionary of subclasses of the label class.") + @visibility("read", "create", "update") + subclasses?: Record; +} + +@doc("Properties of a labeling job") +@discriminator("mediaType") +model LabelingJobMediaProperties {} + +@doc("Labeling MLAssist configuration definition") +@discriminator("mlAssist") +model MLAssistConfiguration {} + +@doc("Progress metrics definition") +model ProgressMetrics { + @doc("The completed datapoint count.") + @visibility("read") + completedDatapointCount?: int32; + + @doc("The time of last successful incremental data refresh in UTC.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + incrementalDataLastRefreshDateTime?: utcDateTime; + + @doc("The skipped datapoint count.") + @visibility("read") + skippedDatapointCount?: int32; + + @doc("The total datapoint count.") + @visibility("read") + totalDatapointCount?: int32; +} + +@doc("Active message associated with project") +model StatusMessage { + @doc("Service-defined message code.") + @visibility("read") + code?: string; + + @doc("Time in UTC at which the message was created.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDateTime?: utcDateTime; + + @doc("Severity level of message.") + @visibility("read") + level?: StatusMessageLevel; + + @doc("A human-readable representation of the message code.") + @visibility("read") + message?: string; +} + +@discriminator("format") +model ExportSummary { + @doc("The time when the export was completed.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + @doc("The total number of labeled datapoints exported.") + @visibility("read") + exportedRowCount?: int32; + + @doc("Name and identifier of the job containing exported labels.") + @visibility("read") + labelingJobId?: string; + + @doc("The time when the export was requested.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; +} + +@doc("Online endpoint configuration") +model OnlineEndpoint extends EndpointPropertiesBase { + @doc(""" +ARM resource ID of the compute if it exists. +optional +""") + compute?: string; + + @doc("Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50.") + mirrorTraffic?: Record; + + @doc("Provisioning state for the endpoint.") + @visibility("read") + provisioningState?: EndpointProvisioningState; + + @doc("Set to \"Enabled\" for endpoints that should allow public access when Private Link is enabled.") + publicNetworkAccess?: PublicNetworkAccessType; + + @doc("Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100.") + traffic?: Record; +} + +@discriminator("endpointComputeType") +model OnlineDeployment extends EndpointDeploymentPropertiesBase { + @doc("If true, enables Application Insights logging.") + appInsightsEnabled?: boolean; + + @doc("The mdc configuration, we disable mdc when it's null.") + dataCollector?: DataCollector; + + @doc("If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled.") + egressPublicNetworkAccess?: EgressPublicNetworkAccessType; + + @doc("Compute instance type.") + @visibility("read", "create") + instanceType?: string; + + @doc("Liveness probe monitors the health of the container regularly.") + livenessProbe?: ProbeSettings; + + @doc("The URI path to the model.") + `model`?: string; + + @doc("The path to mount the model in custom container.") + modelMountPath?: string; + + @doc("Provisioning state for the endpoint deployment.") + @visibility("read") + provisioningState?: DeploymentProvisioningState; + + @doc("Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe.") + readinessProbe?: ProbeSettings; + + @doc("Request settings for the deployment.") + requestSettings?: OnlineRequestSettings; + + @doc(""" +Scale settings for the deployment. +If it is null or not provided, +it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment +and to DefaultScaleSettings for ManagedOnlineDeployment. +""") + scaleSettings?: OnlineScaleSettings; +} + +model DataCollector { + @doc(""" +[Required] The collection configuration. Each collection has it own configuration to collect model data and the name of collection can be arbitrary string. +Model data collector can be used for either payload logging or custom logging or both of them. Collection request and response are reserved for payload logging, others are for custom logging. +""") + collections: Record; + + @doc("The request logging configuration for mdc, it includes advanced logging settings for all collections. It's optional.") + requestLogging?: RequestLogging; + + @doc(""" +When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of them in a single blob file. +If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. +If it's day, all data will be collected in blob path /yyyy/MM/dd/. +The other benefit of rolling path is that model monitoring ui is able to select a time range of data very quickly. +""") + rollingRate?: RollingRateType; +} + +model Collection { + @doc("The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint identity to auth.") + clientId?: string; + + @doc("Enable or disable data collection.") + dataCollectionMode?: DataCollectionMode; + + @doc("The data asset arm resource id. Client side will ensure data asset is pointing to the blob storage, and backend will collect data to the blob storage.") + dataId?: string; + + @doc("The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default.") + samplingRate?: float32; +} + +model RequestLogging { + @doc("For payload logging, we only collect payload by default. If customers also want to collect the specified headers, they can set them in captureHeaders so that backend will collect those headers along with payload.") + captureHeaders?: string[]; +} + +@doc("Deployment container liveness/readiness probe configuration.") +model ProbeSettings { + @doc("The number of failures to allow before returning an unhealthy status.") + failureThreshold?: int32; + + @doc("The delay before the first probe in ISO 8601 format.") + initialDelay?: duration; + + @doc("The length of time between probes in ISO 8601 format.") + period?: duration; + + @doc("The number of successful probes before returning a healthy status.") + successThreshold?: int32; + + @doc("The probe timeout in ISO 8601 format.") + timeout?: duration; +} + +@doc("Online deployment scoring requests configuration.") +model OnlineRequestSettings { + @doc("The number of maximum concurrent requests per node allowed per deployment. Defaults to 1.") + maxConcurrentRequestsPerInstance?: int32; + + @doc(""" +The maximum amount of time a request will stay in the queue in ISO 8601 format. +Defaults to 500ms. +""") + maxQueueWait?: duration; + + @doc(""" +The scoring timeout in ISO 8601 format. +Defaults to 5000ms. +""") + requestTimeout?: duration; +} + +@doc("Online deployment scaling configuration.") +@discriminator("scaleType") +model OnlineScaleSettings {} + +@doc("Strictly used in update requests.") +model PartialMinimalTrackedResourceWithSku + extends PartialMinimalTrackedResource { + @doc("Sku details required for ARM contract for Autoscaling.") + sku?: PartialSku; +} + +@doc("Common SKU definition.") +model PartialSku { + @doc("If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.") + capacity?: int32; + + @doc("If the service has different generations of hardware, for the same SKU, then that can be captured here.") + family?: string; + + @doc("The name of the SKU. Ex - P3. It is typically a letter+number code.") + name?: string; + + @doc("The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.") + size?: string; + + @doc("This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.") + tier?: SkuTier; +} + +model DeploymentLogsRequest { + @doc("The type of container to retrieve logs from.") + containerType?: ContainerType; + + @doc("The maximum number of lines to tail.") + tail?: int32; +} + +model DeploymentLogs { + @doc("The retrieved online deployment logs.") + content?: string; +} + +@doc("A paginated list of SkuResource entities.") +model SkuResourceArmPaginatedResult is Azure.Core.Page; + +@doc("Fulfills ARM Contract requirement to list all available SKUS for a resource.") +model SkuResource { + @doc("Gets or sets the Sku Capacity.") + capacity?: SkuCapacity; + + @doc("The resource type name.") + @visibility("read") + resourceType?: string; + + @doc("Gets or sets the Sku.") + sku?: SkuSetting; +} + +@doc("SKU capacity information") +model SkuCapacity { + @doc("Gets or sets the default capacity.") + default?: int32; + + @doc("Gets or sets the maximum.") + maximum?: int32; + + @doc("Gets or sets the minimum.") + minimum?: int32; + + @doc("Gets or sets the type of the scale.") + scaleType?: SkuScaleType; +} + +@doc("SkuSetting fulfills the need for stripped down SKU info in ARM contract.") +model SkuSetting { + @doc("[Required] The name of the SKU. Ex - P3. It is typically a letter+number code.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + name: string; + + @doc("This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.") + tier?: SkuTier; +} + +model RegenerateEndpointKeysRequest { + @doc("[Required] Specification for which type of key to generate. Primary or Secondary.") + keyType: KeyType; + + @doc("The value the key is set to.") + keyValue?: string; +} + +@doc("Service Token") +model EndpointAuthToken { + @doc("Access token for endpoint authentication.") + accessToken?: string; + + @doc("Access token expiry time (UTC).") + expiryTimeUtc?: plainTime; + + @doc("Refresh access token after time (UTC).") + refreshAfterTimeUtc?: plainTime; + + @doc("Access token type.") + tokenType?: string; +} + +@doc("Base definition of a schedule") +model ScheduleProperties extends ResourceBase { + @doc("[Required] Specifies the action of the schedule") + @visibility("read", "create", "update") + action: ScheduleActionBase; + + @doc("Display name of schedule.") + @visibility("read", "create") + displayName?: string; + + @doc("Is the schedule enabled?") + @visibility("read", "create", "update") + isEnabled?: boolean; + + @doc("Provisioning state for the schedule.") + @visibility("read") + provisioningState?: ScheduleProvisioningStatus; + + @doc("[Required] Specifies the trigger details") + @visibility("read", "create", "update") + trigger: TriggerBase; +} + +@discriminator("actionType") +model ScheduleActionBase {} + +@doc("Details of the Registry") +model RegistryProperties { + @doc("Discovery URL for the Registry") + discoveryUrl?: string; + + @doc("IntellectualPropertyPublisher for the registry") + intellectualPropertyPublisher?: string; + + @doc("ResourceId of the managed RG if the registry has system created resources") + managedResourceGroup?: ArmResourceId; + + @doc("MLFlow Registry URI for the Registry") + mlFlowRegistryUri?: string; + + @doc("Private endpoint connections info used for pending connections in private link portal") + privateEndpointConnections?: RegistryPrivateEndpointConnection[]; + + @doc(""" +Is the Registry accessible from the internet? +Possible values: \"Enabled\" or \"Disabled\" +""") + publicNetworkAccess?: string; + + @doc("Details of each region the registry is in") + regionDetails?: RegistryRegionArmDetails[]; +} + +@doc("ARM ResourceId of a resource") +model ArmResourceId { + @doc(""" +Arm ResourceId is in the format \"/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}\" +or \"/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}\" +""") + resourceId?: string; +} + +@doc("Private endpoint connection definition.") +model RegistryPrivateEndpointConnection { + @doc(""" +This is the private endpoint connection name created on SRP +Full resource id: /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.MachineLearningServices/{resourceType}/{resourceName}/privateEndpointConnections/{peConnectionName} +""") + id?: string; + + @doc("Same as workspace location.") + @visibility("read", "create") + location?: string; + + @doc("Properties of the Private Endpoint Connection") + properties?: RegistryPrivateEndpointConnectionProperties; +} + +@doc("Properties of the Private Endpoint Connection") +model RegistryPrivateEndpointConnectionProperties { + @doc("The group ids") + groupIds?: string[]; + + @doc("The PE network resource that is linked to this PE connection.") + privateEndpoint?: PrivateEndpointResource; + + @doc("The connection state.") + privateLinkServiceConnectionState?: RegistryPrivateLinkServiceConnectionState; + + @doc("One of null, \"Succeeded\", \"Provisioning\", \"Failed\". While not approved, it's null.") + provisioningState?: string; +} + +@doc("The PE network resource that is linked to this PE connection.") +model PrivateEndpointResource extends PrivateEndpoint { + @doc("The subnetId that the private endpoint is connected to.") + subnetArmId?: string; +} + +@doc("The Private Endpoint resource.") +model PrivateEndpoint { + @doc("The ARM identifier for Private Endpoint") + @visibility("read") + id?: string; +} + +@doc("The connection state.") +model RegistryPrivateLinkServiceConnectionState { + @doc("Some RP chose \"None\". Other RPs use this for region expansion.") + actionsRequired?: string; + + @doc("User-defined message that, per NRP doc, may be used for approval-related message.") + description?: string; + + @doc("Connection status of the service consumer with the service provider") + status?: EndpointServiceConnectionStatus; +} + +@doc("Details for each region the registry is in") +model RegistryRegionArmDetails { + @doc("List of ACR accounts") + acrDetails?: AcrDetails[]; + + @doc("The location where the registry exists") + location?: string; + + @doc("List of storage accounts") + storageAccountDetails?: StorageAccountDetails[]; +} + +@doc("Details of ACR account to be used for the Registry") +model AcrDetails { + @doc("Details of system created ACR account to be used for the Registry") + systemCreatedAcrAccount?: SystemCreatedAcrAccount; + + @doc("Details of user created ACR account to be used for the Registry. Not supported in most cases and will throw 400 error if provided.") + userCreatedAcrAccount?: UserCreatedAcrAccount; +} + +model SystemCreatedAcrAccount { + @doc("Name of the ACR account") + acrAccountName?: string; + + @doc("SKU of the ACR account") + acrAccountSku?: string; + + @doc("This is populated once the ACR account is created.") + armResourceId?: ArmResourceId; +} + +model UserCreatedAcrAccount { + @doc("ARM ResourceId of a resource") + armResourceId?: ArmResourceId; +} + +@doc("Details of storage account to be used for the Registry") +model StorageAccountDetails { + @doc("Details of system created storage account to be used for the registry") + systemCreatedStorageAccount?: SystemCreatedStorageAccount; + + @doc("Details of user created storage account to be used for the registry. Not supported in most cases and will throw 400 error if provided.") + userCreatedStorageAccount?: UserCreatedStorageAccount; +} + +model SystemCreatedStorageAccount { + @doc("Public blob access allowed") + allowBlobPublicAccess?: boolean; + + @doc("This is populated once the storage account is created.") + armResourceId?: ArmResourceId; + + @doc("HNS enabled for storage account") + storageAccountHnsEnabled?: boolean; + + @doc("Name of the storage account") + storageAccountName?: string; + + @doc(""" +Allowed values: +\"Standard_LRS\", +\"Standard_GRS\", +\"Standard_RAGRS\", +\"Standard_ZRS\", +\"Standard_GZRS\", +\"Standard_RAGZRS\", +\"Premium_LRS\", +\"Premium_ZRS\" +""") + storageAccountType?: string; +} + +model UserCreatedStorageAccount { + @doc("ARM ResourceId of a resource") + armResourceId?: ArmResourceId; +} + +@doc("Strictly used in update requests.") +model PartialRegistryPartialTrackedResource { + @doc("Managed service identity (system assigned and/or user assigned identities)") + identity?: RegistryPartialManagedServiceIdentity; + + @doc("Sku details required for ARM contract for Autoscaling.") + sku?: PartialSku; + + @doc("Resource tags.") + tags?: Record; +} + +@doc("Managed service identity (system assigned and/or user assigned identities)") +model RegistryPartialManagedServiceIdentity extends ManagedServiceIdentity {} + +@doc("The List Aml user feature operation response.") +model ListAmlUserFeatureResult is Azure.Core.Page; + +@doc("Features enabled for a workspace") +model AmlUserFeature { + @doc("Specifies the feature ID") + id?: string; + + @doc("Specifies the feature name ") + displayName?: string; + + @doc("Describes the feature for user experience") + description?: string; +} + +@doc("Azure Machine Learning team account REST API operation") +model AmlOperation { + @doc("Gets or sets display name of operation") + display?: OperationDisplay; + + @doc("Indicates whether the operation applies to data-plane") + isDataAction?: boolean; + + @doc("Gets or sets operation name: {provider}/{resource}/{operation}") + name?: string; + + @doc("The intended executor of the operation: user/system") + origin?: string; +} + +@doc("The properties of a machine learning workspace.") +model WorkspaceProperties { + @doc("The flag to indicate whether to allow public access when behind VNet.") + allowPublicAccessWhenBehindVnet?: boolean; + + @doc("ARM id of the application insights associated with this workspace.") + applicationInsights?: string; + + associatedWorkspaces?: string[]; + containerRegistries?: string[]; + + @doc("ARM id of the container registry associated with this workspace.") + containerRegistry?: string; + + @doc("The description of this workspace.") + description?: string; + + @doc("Url for the discovery service to identify regional endpoints for machine learning experimentation services") + discoveryUrl?: string; + + enableDataIsolation?: boolean; + encryption?: EncryptionProperty; + existingWorkspaces?: string[]; + + @doc("Settings for feature store type workspace.") + featureStoreSettings?: FeatureStoreSettings; + + @doc("The friendly name for this workspace. This name in mutable") + friendlyName?: string; + + @doc("The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service") + hbiWorkspace?: boolean; + + hubResourceId?: string; + + @doc("The compute name for image build") + imageBuildCompute?: string; + + @doc("ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created") + keyVault?: string; + + keyVaults?: string[]; + + @doc("Managed Network settings for a machine learning workspace.") + managedNetwork?: ManagedNetworkSettings; + + @doc("The URI associated with this workspace that machine learning flow must point at to set up tracking.") + @visibility("read") + mlFlowTrackingUri?: string; + + @doc("The notebook info of Azure ML workspace.") + @visibility("read") + notebookInfo?: NotebookResourceInfo; + + @doc("The user assigned identity resource id that represents the workspace identity.") + primaryUserAssignedIdentity?: string; + + @doc("The list of private endpoint connections in the workspace.") + @visibility("read") + privateEndpointConnections?: PrivateEndpointConnection[]; + + @doc("Count of private connections in the workspace") + @visibility("read") + privateLinkCount?: int32; + + @doc("The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("Whether requests from Public Network are allowed.") + publicNetworkAccess?: PublicNetworkAccessType; + + @doc("The service managed resource settings.") + serviceManagedResourcesSettings?: ServiceManagedResourcesSettings; + + @doc("The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace") + @visibility("read") + serviceProvisionedResourceGroup?: string; + + @doc("The list of shared private link resources in this workspace.") + sharedPrivateLinkResources?: SharedPrivateLinkResource[]; + + @doc("Retention time in days after workspace get soft deleted.") + softDeleteRetentionInDays?: int32; + + @doc("ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created") + storageAccount?: string; + + storageAccounts?: string[]; + + @doc("If the storage associated with the workspace has hierarchical namespace(HNS) enabled.") + @visibility("read") + storageHnsEnabled?: boolean; + + @doc("The auth mode used for accessing the system datastores of the workspace.") + systemDatastoresAuthMode?: string; + + @doc("The tenant id associated with this workspace.") + @visibility("read") + tenantId?: string; + + @doc("Enabling v1_legacy_mode may prevent you from using features provided by the v2 API.") + v1LegacyMode?: boolean; + + @doc("WorkspaceHub's configuration object.") + workspaceHubConfig?: WorkspaceHubConfig; + + @doc("The immutable id associated with this workspace.") + @visibility("read") + workspaceId?: string; +} + +model EncryptionProperty { + @doc(""" +The byok cosmosdb account that customer brings to store customer's data +with encryption +""") + cosmosDbResourceId?: string; + + @doc("Identity to be used with the keyVault") + identity?: IdentityForCmk; + + @doc("KeyVault details to do the encryption") + keyVaultProperties: KeyVaultProperties; + + @doc(""" +The byok search account that customer brings to store customer's data +with encryption +""") + searchAccountResourceId?: string; + + @doc("Indicates whether or not the encryption is enabled for the workspace.") + status: EncryptionStatus; + + @doc(""" +The byok storage account that customer brings to store customer's data +with encryption +""") + storageAccountResourceId?: string; +} + +@doc("Identity object used for encryption.") +model IdentityForCmk { + @doc("UserAssignedIdentity to be used to fetch the encryption key from keyVault") + userAssignedIdentity?: string; +} + +@doc("Customer Key vault properties.") +model KeyVaultProperties { + @doc(""" +Currently, we support only SystemAssigned MSI. +We need this when we support UserAssignedIdentities +""") + identityClientId?: string; + + @doc("KeyVault key identifier to encrypt the data") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + keyIdentifier: string; + + @doc("KeyVault Arm Id that contains the data encryption key") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + keyVaultArmId: string; +} + +model FeatureStoreSettings { + computeRuntime?: ComputeRuntimeDto; + offlineStoreConnectionName?: string; + onlineStoreConnectionName?: string; +} + +model ComputeRuntimeDto { + sparkRuntimeVersion?: string; +} + +@doc("Managed Network settings for a machine learning workspace.") +model ManagedNetworkSettings { + @doc("Isolation mode for the managed network of a machine learning workspace.") + isolationMode?: IsolationMode; + + @visibility("read") + networkId?: string; + + @doc("Dictionary of ") + outboundRules?: Record; + + @doc("Status of the Provisioning for the managed network of a machine learning workspace.") + status?: ManagedNetworkProvisionStatus; +} + +@doc("Outbound Rule for the managed network of a machine learning workspace.") +@discriminator("type") +model OutboundRule { + @doc("Category of a managed network Outbound Rule of a machine learning workspace.") + category?: RuleCategory; + + @doc("Type of a managed network Outbound Rule of a machine learning workspace.") + status?: RuleStatus; +} + +@doc("Status of the Provisioning for the managed network of a machine learning workspace.") +model ManagedNetworkProvisionStatus { + sparkReady?: boolean; + + @doc("Status for the managed network of a machine learning workspace.") + status?: ManagedNetworkStatus; +} + +model NotebookResourceInfo { + fqdn?: string; + isPrivateLinkEnabled?: boolean; + + @doc("The error that occurs when preparing notebook.") + notebookPreparationError?: NotebookPreparationError; + + @doc("the data plane resourceId that used to initialize notebook component") + resourceId?: string; +} + +model NotebookPreparationError { + errorMessage?: string; + statusCode?: int32; +} + +@doc("Private endpoint connection properties.") +model PrivateEndpointConnectionProperties { + @doc("The Private Endpoint resource.") + privateEndpoint?: WorkspacePrivateEndpointResource; + + @doc("The connection state.") + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + + @doc("The current provisioning state.") + @visibility("read") + provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +@doc("The Private Endpoint resource.") +model WorkspacePrivateEndpointResource { + @doc("e.g. /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}") + @visibility("read") + id?: string; + + @doc("The subnetId that the private endpoint is connected to.") + @visibility("read") + subnetArmId?: string; +} + +@doc("A collection of information about the state of the connection between service consumer and provider.") +model PrivateLinkServiceConnectionState { + @doc("Some RP chose \"None\". Other RPs use this for region expansion.") + actionsRequired?: string; + + @doc("User-defined message that, per NRP doc, may be used for approval-related message.") + description?: string; + + @doc("Connection status of the service consumer with the service provider") + status?: EndpointServiceConnectionStatus; +} + +model ServiceManagedResourcesSettings { + cosmosDb?: CosmosDbSettings; +} + +model CosmosDbSettings { + collectionsThroughput?: int32; +} + +model SharedPrivateLinkResource { + @doc("Unique name of the private link") + name?: string; + + @doc("Properties of a shared private link resource.") + properties?: SharedPrivateLinkResourceProperty; +} + +@doc("Properties of a shared private link resource.") +model SharedPrivateLinkResourceProperty { + @doc("group id of the private link") + groupId?: string; + + @doc("the resource id that private link links to") + privateLinkResourceId?: string; + + @doc("Request message") + requestMessage?: string; + + @doc("Connection status of the service consumer with the service provider") + status?: EndpointServiceConnectionStatus; +} + +@doc("WorkspaceHub's configuration object.") +model WorkspaceHubConfig { + additionalWorkspaceStorageAccounts?: string[]; + defaultWorkspaceResourceGroup?: string; +} + +@doc("The parameters for updating a machine learning workspace.") +model WorkspaceUpdateParameters { + @doc("Managed service identity (system assigned and/or user assigned identities)") + identity?: ManagedServiceIdentity; + + @doc("The properties that the machine learning workspace will be updated with.") + properties?: WorkspacePropertiesUpdateParameters; + + @doc("Optional. This field is required to be implemented by the RP because AML is supporting more than one tier") + sku?: Sku; + + @doc("The resource tags for the machine learning workspace.") + tags?: Record; +} + +@doc("The parameters for updating a machine learning workspace.") +model WorkspacePropertiesUpdateParameters { + @doc("ARM id of the application insights associated with this workspace.") + applicationInsights?: string; + + @doc("ARM id of the container registry associated with this workspace.") + containerRegistry?: string; + + @doc("The description of this workspace.") + description?: string; + + enableDataIsolation?: boolean; + encryption?: EncryptionUpdateProperties; + + @doc("Settings for feature store type workspace.") + featureStoreSettings?: FeatureStoreSettings; + + @doc("The friendly name for this workspace. This name in mutable") + friendlyName?: string; + + @doc("The compute name for image build") + imageBuildCompute?: string; + + @doc("Managed Network settings for a machine learning workspace.") + managedNetwork?: ManagedNetworkSettings; + + @doc("The user assigned identity resource id that represents the workspace identity.") + primaryUserAssignedIdentity?: string; + + @doc("Whether requests from Public Network are allowed.") + publicNetworkAccess?: PublicNetworkAccessType; + + @doc("The service managed resource settings.") + serviceManagedResourcesSettings?: ServiceManagedResourcesSettings; + + @doc("Retention time in days after workspace get soft deleted.") + softDeleteRetentionInDays?: int32; + + @doc("Enabling v1_legacy_mode may prevent you from using features provided by the v2 API.") + v1LegacyMode?: boolean; +} + +model EncryptionUpdateProperties { + keyVaultProperties: EncryptionKeyVaultUpdateProperties; +} + +model EncryptionKeyVaultUpdateProperties { + @minLength(1) + @pattern("[a-zA-Z0-9_]") + keyIdentifier: string; +} + +@discriminator("authType") +model WorkspaceConnectionPropertiesV2 { + @doc("Category of the connection") + category?: ConnectionCategory; + + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expiryTime?: utcDateTime; + + @doc("Any object") + metadata?: Record; + + target?: string; +} + +@doc("The properties that the machine learning workspace connection will be updated with.") +model WorkspaceConnectionUpdateParameter { + @doc("The properties that the machine learning workspace connection will be updated with.") + properties?: WorkspaceConnectionPropertiesV2; +} + +@doc("Parameters to diagnose a workspace") +model DiagnoseWorkspaceParameters { + value?: DiagnoseRequestProperties; +} + +model DiagnoseRequestProperties { + @doc("Setting for diagnosing dependent application insights") + applicationInsights?: Record; + + @doc("Setting for diagnosing dependent container registry") + containerRegistry?: Record; + + @doc("Setting for diagnosing dns resolution") + dnsResolution?: Record; + + @doc("Setting for diagnosing dependent key vault") + keyVault?: Record; + + @doc("Setting for diagnosing network security group") + nsg?: Record; + + @doc("Setting for diagnosing unclassified category of problems") + others?: Record; + + @doc("Setting for diagnosing resource lock") + resourceLock?: Record; + + @doc("Setting for diagnosing dependent storage account") + storageAccount?: Record; + + @doc("Setting for diagnosing user defined routing") + udr?: Record; +} + +model DiagnoseResponseResult { + value?: DiagnoseResponseResultValue; +} + +model DiagnoseResponseResultValue { + userDefinedRouteResults?: DiagnoseResult[]; + networkSecurityRuleResults?: DiagnoseResult[]; + resourceLockResults?: DiagnoseResult[]; + dnsResolutionResults?: DiagnoseResult[]; + storageAccountResults?: DiagnoseResult[]; + keyVaultResults?: DiagnoseResult[]; + containerRegistryResults?: DiagnoseResult[]; + applicationInsightsResults?: DiagnoseResult[]; + otherResults?: DiagnoseResult[]; +} + +@doc("Result of Diagnose") +model DiagnoseResult { + @doc("Code for workspace setup error") + @visibility("read") + code?: string; + + @doc("Level of workspace setup error") + @visibility("read") + level?: DiagnoseResultLevel; + + @doc("Message of workspace setup error") + @visibility("read") + message?: string; +} + +model ListWorkspaceKeysResult { + @doc("The access key of the workspace app insights") + @visibility("read") + appInsightsInstrumentationKey?: string; + + containerRegistryCredentials?: RegistryListCredentialsResult; + notebookAccessKeys?: ListNotebookKeysResult; + + @doc("The arm Id key of the workspace storage") + @visibility("read") + userStorageArmId?: string; + + @doc("The access key of the workspace storage") + @visibility("read") + userStorageKey?: string; +} + +model RegistryListCredentialsResult { + @doc("The location of the workspace ACR") + @visibility("read") + location?: string; + + passwords?: Password[]; + + @doc("The username of the workspace ACR") + @visibility("read") + username?: string; +} + +model Password { + @visibility("read") + name?: string; + + @visibility("read") + value?: string; +} + +model ListNotebookKeysResult { + @doc("The primary access key of the Notebook") + @visibility("read") + primaryAccessKey?: string; + + @doc("The secondary access key of the Notebook") + @visibility("read") + secondaryAccessKey?: string; +} + +model NotebookAccessTokenResult { + @visibility("read") + accessToken?: string; + + @visibility("read") + expiresIn?: int32; + + @visibility("read") + hostName?: string; + + @visibility("read") + notebookResourceId?: string; + + @visibility("read") + publicDns?: string; + + @visibility("read") + refreshToken?: string; + + @visibility("read") + scope?: string; + + @visibility("read") + tokenType?: string; +} + +model ListStorageAccountKeysResult { + @doc("The access key of the storage") + @visibility("read") + userStorageKey?: string; +} + +model ExternalFqdnResponse { + value?: FqdnEndpointsPropertyBag[]; +} + +@doc("Property bag for FQDN endpoints result") +model FqdnEndpointsPropertyBag { + properties?: FqdnEndpoints; +} + +model FqdnEndpoints { + category?: string; + endpoints?: FqdnEndpoint[]; +} + +model FqdnEndpoint { + domainName?: string; + endpointDetails?: FqdnEndpointDetail[]; +} + +model FqdnEndpointDetail { + port?: int32; +} + +@doc("A list of private link resources") +@pagedResult +model PrivateLinkResourceListResult { + @items + value?: PrivateLinkResource[]; +} + +@doc("A private link resource") +model PrivateLinkResource extends Resource { + @doc("Managed service identity (system assigned and/or user assigned identities)") + identity?: ManagedServiceIdentity; + + @doc("Same as workspace location.") + location?: string; + + @doc("Properties of a private link resource.") + properties?: PrivateLinkResourceProperties; + + @doc("Optional. This field is required to be implemented by the RP because AML is supporting more than one tier") + sku?: Sku; + + @doc("Dictionary of ") + tags?: Record; +} + +@doc("Properties of a private link resource.") +model PrivateLinkResourceProperties { + @doc("The private link resource group id.") + @visibility("read") + groupId?: string; + + @doc("The private link resource required member names.") + @visibility("read") + requiredMembers?: string[]; + + @doc("The private link resource Private link DNS zone name.") + requiredZoneNames?: string[]; +} + +@doc("Managed Network Provisioning options for managed network of a machine learning workspace.") +model ManagedNetworkProvisionOptions { + includeSpark?: boolean; +} + +@doc("Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet.") +model ResourceId { + @doc("The ID of the resource") + id: string; +} + +@doc("A Machine Learning compute based on AKS.") +model AKS extends Compute { + ...AKSSchema; + + @doc("The type of compute") + computeType: "AKS"; +} + +model AKSSchema { + @doc("AKS properties") + properties?: AKSSchemaProperties; +} + +@doc("AKS properties") +model AKSSchemaProperties { + @doc("Cluster full qualified domain name") + clusterFqdn?: string; + + @doc("System services") + @visibility("read") + systemServices?: SystemService[]; + + @doc("Number of agents") + agentCount?: int32; + + @doc("Agent virtual machine size") + agentVmSize?: string; + + @doc("Intended usage of the cluster") + clusterPurpose?: ClusterPurpose; + + @doc("SSL configuration") + sslConfiguration?: SslConfiguration; + + @doc("AKS networking configuration for vnet") + aksNetworkingConfiguration?: AksNetworkingConfiguration; + + @doc("Load Balancer Type") + loadBalancerType?: LoadBalancerType; + + @doc("Load Balancer Subnet") + loadBalancerSubnet?: string; +} + +@doc("A system service running on a compute.") +model SystemService { + @doc("The type of this system service.") + @visibility("read") + systemServiceType?: string; + + @doc("Public IP address") + @visibility("read") + publicIpAddress?: string; + + @doc("The version for this type.") + @visibility("read") + version?: string; +} + +@doc("The ssl configuration for scoring") +model SslConfiguration { + @doc("Enable or disable ssl for scoring") + status?: SslConfigStatus; + + @doc("Cert data") + cert?: string; + + @doc("Key data") + key?: string; + + @doc("CNAME of the cert") + cname?: string; + + @doc("Leaf domain label of public endpoint") + leafDomainLabel?: string; + + @doc("Indicates whether to overwrite existing domain label.") + overwriteExistingDomain?: boolean; +} + +@doc("Advance configuration for AKS networking") +model AksNetworkingConfiguration { + @doc("Virtual network subnet resource ID the compute nodes belong to") + subnetId?: string; + + @doc("A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.") + @pattern("^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$") + serviceCidr?: string; + + @doc("An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.") + @pattern("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$") + dnsServiceIP?: string; + + @doc("A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range.") + @pattern("^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$") + dockerBridgeCidr?: string; +} + +@doc("A Machine Learning compute based on Kubernetes Compute.") +model Kubernetes extends Compute { + ...KubernetesSchema; + + @doc("The type of compute") + computeType: "Kubernetes"; +} + +@doc("Kubernetes Compute Schema") +model KubernetesSchema { + @doc("Properties of Kubernetes") + properties?: KubernetesProperties; +} + +@doc("Kubernetes properties") +model KubernetesProperties { + @doc("Relay connection string.") + relayConnectionString?: string; + + @doc("ServiceBus connection string.") + serviceBusConnectionString?: string; + + @doc("Extension principal-id.") + extensionPrincipalId?: string; + + @doc("Extension instance release train.") + extensionInstanceReleaseTrain?: string; + + @doc("VC name.") + vcName?: string; + + @doc("Compute namespace") + `namespace`?: string; + + @doc("Default instance type") + defaultInstanceType?: string; + + @doc("Instance Type Schema") + instanceTypes?: Record; +} + +@doc("Instance type schema.") +model InstanceTypeSchema { + @doc("Node Selector") + nodeSelector?: Record; + + @doc("Resource requests/limits for this instance type") + resources?: InstanceTypeSchemaResources; +} + +@doc("Resource requests/limits for this instance type") +model InstanceTypeSchemaResources { + @doc("Resource requests for this instance type") + requests?: Record; + + @doc("Resource limits for this instance type") + limits?: Record; +} + +@doc("AML Compute properties") +model AmlComputeProperties { + @doc("Compute OS Type") + osType?: OsType; + + @doc("Virtual Machine Size") + vmSize?: string; + + @doc("Virtual Machine priority") + vmPriority?: VmPriority; + + @doc("Virtual Machine image for AML Compute - windows only") + virtualMachineImage?: VirtualMachineImage; + + @doc("Network is isolated or not") + isolatedNetwork?: boolean; + + @doc("Scale settings for AML Compute") + scaleSettings?: ScaleSettings; + + @doc("Credentials for an administrator user account that will be created on each compute node.") + userAccountCredentials?: UserAccountCredentials; + + @doc("Virtual network subnet resource ID the compute nodes belong to.") + subnet?: ResourceId; + + @doc("State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled.") + remoteLoginPortPublicAccess?: RemoteLoginPortPublicAccess; + + @doc("Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute.") + @visibility("read") + allocationState?: AllocationState; + + @doc("The time at which the compute entered its current allocation state.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + allocationStateTransitionTime?: utcDateTime; + + @doc("Collection of errors encountered by various compute nodes during node setup.") + @visibility("read") + errors?: ErrorResponse[]; + + @doc("The number of compute nodes currently assigned to the compute.") + @visibility("read") + currentNodeCount?: int32; + + @doc("The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation.") + @visibility("read") + targetNodeCount?: int32; + + @doc("Counts of various node states on the compute.") + @visibility("read") + nodeStateCounts?: NodeStateCounts; + + @doc("Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs.") + enableNodePublicIp?: boolean; + + @doc("A property bag containing additional properties.") + propertyBag?: Record; +} + +@doc("Virtual Machine image for Windows AML Compute") +model VirtualMachineImage { + @doc("Virtual Machine image path") + id: string; +} + +@doc("Settings for user account that gets created on each on the nodes of a compute.") +model UserAccountCredentials { + @doc("Name of the administrator user account which can be used to SSH to nodes.") + adminUserName: string; + + @doc("SSH public key of the administrator user account.") + adminUserSshPublicKey?: string; + + @doc("Password of the administrator user account.") + adminUserPassword?: string; +} + +@doc("Counts of various compute node states on the amlCompute.") +model NodeStateCounts { + @doc("Number of compute nodes in idle state.") + @visibility("read") + idleNodeCount?: int32; + + @doc("Number of compute nodes which are running jobs.") + @visibility("read") + runningNodeCount?: int32; + + @doc("Number of compute nodes which are being prepared.") + @visibility("read") + preparingNodeCount?: int32; + + @doc("Number of compute nodes which are in unusable state.") + @visibility("read") + unusableNodeCount?: int32; + + @doc("Number of compute nodes which are leaving the amlCompute.") + @visibility("read") + leavingNodeCount?: int32; + + @doc("Number of compute nodes which are in preempted state.") + @visibility("read") + preemptedNodeCount?: int32; +} + +@doc("An Azure Machine Learning compute.") +model AmlCompute extends Compute { + ...AmlComputeSchema; + + @doc("The type of compute") + computeType: "AmlCompute"; +} + +@doc("Properties(top level) of AmlCompute") +model AmlComputeSchema { + @doc("Properties of AmlCompute") + properties?: AmlComputeProperties; +} + +@doc("Compute Instance properties") +model ComputeInstanceProperties { + @doc("Virtual Machine Size") + vmSize?: string; + + @doc("Virtual network subnet resource ID the compute nodes belong to.") + subnet?: ResourceId; + + @doc("Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role.") + applicationSharingPolicy?: ApplicationSharingPolicy; + + @doc("Specifies settings for autologger.") + autologgerSettings?: ComputeInstanceAutologgerSettings; + + @doc("Specifies policy and settings for SSH access.") + sshSettings?: ComputeInstanceSshSettings; + + @doc("List of Custom Services added to the compute.") + customServices?: CustomService[]; + + @doc("Returns metadata about the operating system image for this compute instance.") + @visibility("read") + osImageMetadata?: ImageMetadata; + + @doc("Describes all connectivity endpoints available for this ComputeInstance.") + @visibility("read") + connectivityEndpoints?: ComputeInstanceConnectivityEndpoints; + + @doc("Describes available applications and their endpoints on this ComputeInstance.") + @visibility("read") + applications?: ComputeInstanceApplication[]; + + @doc("Describes information on user who created this ComputeInstance.") + @visibility("read") + createdBy?: ComputeInstanceCreatedBy; + + @doc("Collection of errors encountered on this ComputeInstance.") + @visibility("read") + errors?: ErrorResponse[]; + + @doc("The current state of this ComputeInstance.") + @visibility("read") + state?: ComputeInstanceState; + + @doc("The Compute Instance Authorization type. Available values are personal (default).") + computeInstanceAuthorizationType?: ComputeInstanceAuthorizationType; + + @doc("Settings for a personal compute instance.") + personalComputeInstanceSettings?: PersonalComputeInstanceSettings; + + @doc("Details of customized scripts to execute for setting up the cluster.") + setupScripts?: SetupScripts; + + @doc("The last operation on ComputeInstance.") + @visibility("read") + lastOperation?: ComputeInstanceLastOperation; + + @doc("The list of schedules to be applied on the computes.") + schedules?: ComputeSchedules; + + @doc("Stops compute instance after user defined period of inactivity. Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days.") + idleTimeBeforeShutdown?: string; + + @doc("Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs.") + enableNodePublicIp?: boolean; + + @doc("Describes informations of containers on this ComputeInstance.") + @visibility("read") + containers?: ComputeInstanceContainer[]; + + @doc("Describes informations of dataDisks on this ComputeInstance.") + @visibility("read") + dataDisks?: ComputeInstanceDataDisk[]; + + @doc("Describes informations of dataMounts on this ComputeInstance.") + @visibility("read") + dataMounts?: ComputeInstanceDataMount[]; + + @doc("ComputeInstance version.") + @visibility("read") + versions?: ComputeInstanceVersion; +} + +@doc("Specifies settings for autologger.") +model ComputeInstanceAutologgerSettings { + @doc("Indicates whether mlflow autologger is enabled for notebooks.") + mlflowAutologger?: MlflowAutologger; +} + +@doc("Specifies policy and settings for SSH access.") +model ComputeInstanceSshSettings { + @doc("State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable.") + sshPublicAccess?: SshPublicAccess; + + @doc("Describes the admin user name.") + @visibility("read") + adminUserName?: string; + + @doc("Describes the port for connecting through SSH.") + @visibility("read") + sshPort?: int32; + + @doc("Specifies the SSH rsa public key file as a string. Use \"ssh-keygen -t rsa -b 2048\" to generate your SSH key pairs.") + adminPublicKey?: string; +} + +@doc("Returns metadata about the operating system image for this compute instance.") +model ImageMetadata { + @doc("Specifies the current operating system image version this compute instance is running on.") + currentImageVersion?: string; + + @doc("Specifies the latest available operating system image version.") + latestImageVersion?: string; + + @doc("Specifies whether this compute instance is running on the latest operating system image.") + isLatestOsImageVersion?: boolean; +} + +@doc("Defines all connectivity endpoints and properties for an ComputeInstance.") +model ComputeInstanceConnectivityEndpoints { + @doc("Public IP Address of this ComputeInstance.") + @visibility("read") + publicIpAddress?: string; + + @doc("Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed).") + @visibility("read") + privateIpAddress?: string; +} + +@doc("Defines an Aml Instance application and its connectivity endpoint URI.") +model ComputeInstanceApplication { + @doc("Name of the ComputeInstance application.") + displayName?: string; + + @doc("Application' endpoint URI.") + endpointUri?: string; +} + +@doc("Describes information on user who created this ComputeInstance.") +model ComputeInstanceCreatedBy { + @doc("Name of the user.") + @visibility("read") + userName?: string; + + @doc("Uniquely identifies user' Azure Active Directory organization.") + @visibility("read") + userOrgId?: string; + + @doc("Uniquely identifies the user within his/her organization.") + @visibility("read") + userId?: string; +} + +@doc("Settings for a personal compute instance.") +model PersonalComputeInstanceSettings { + @doc("A user explicitly assigned to a personal compute instance.") + assignedUser?: AssignedUser; +} + +@doc("A user that can be assigned to a compute instance.") +model AssignedUser { + @doc("User’s AAD Object Id.") + objectId: string; + + @doc("User’s AAD Tenant Id.") + tenantId: string; +} + +@doc("Details of customized scripts to execute for setting up the cluster.") +model SetupScripts { + @doc("Customized setup scripts") + scripts?: ScriptsToExecute; +} + +@doc("Customized setup scripts") +model ScriptsToExecute { + @doc("Script that's run every time the machine starts.") + startupScript?: ScriptReference; + + @doc("Script that's run only once during provision of the compute.") + creationScript?: ScriptReference; +} + +@doc("Script reference") +model ScriptReference { + @doc("The storage source of the script: inline, workspace.") + scriptSource?: string; + + @doc("The location of scripts in the mounted volume.") + scriptData?: string; + + @doc("Optional command line arguments passed to the script to run.") + scriptArguments?: string; + + @doc("Optional time period passed to timeout command.") + timeout?: string; +} + +@doc("The last operation on ComputeInstance.") +model ComputeInstanceLastOperation { + @doc("Name of the last operation.") + operationName?: OperationName; + + @doc("Time of the last operation.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + operationTime?: utcDateTime; + + @doc("Operation status.") + operationStatus?: OperationStatus; + + @doc("Trigger of operation.") + operationTrigger?: OperationTrigger; +} + +@doc("The list of schedules to be applied on the computes") +model ComputeSchedules { + @doc("The list of compute start stop schedules to be applied.") + computeStartStop?: ComputeStartStopSchedule[]; +} + +@doc("Compute start stop schedule properties") +model ComputeStartStopSchedule { + @doc("A system assigned id for the schedule.") + @visibility("read") + id?: string; + + @doc("The current deployment state of schedule.") + @visibility("read") + provisioningStatus?: ProvisioningStatus; + + @doc("Is the schedule enabled or disabled?") + status?: ScheduleStatus; + + @doc("[Required] The compute power action.") + action?: ComputePowerAction; + + @doc("[Required] The schedule trigger type.") + triggerType?: TriggerType; + + @doc("Required if triggerType is Recurrence.") + recurrence?: Recurrence; + + @doc("Required if triggerType is Cron.") + cron?: Cron; + + @doc("[Deprecated] Not used any more.") + schedule?: ScheduleBase; +} + +@doc("The workflow trigger recurrence for ComputeStartStop schedule type.") +model Recurrence { + @doc("[Required] The frequency to trigger schedule.") + frequency?: RecurrenceFrequency; + + @doc("[Required] Specifies schedule interval in conjunction with frequency") + interval?: int32; + + @doc("The start time in yyyy-MM-ddTHH:mm:ss format.") + startTime?: string; + + @doc(""" +Specifies time zone in which the schedule runs. +TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 +""") + timeZone?: string; + + @doc("[Required] The recurrence schedule.") + schedule?: RecurrenceSchedule; +} + +@doc("The workflow trigger cron for ComputeStartStop schedule type.") +model Cron { + @doc("The start time in yyyy-MM-ddTHH:mm:ss format.") + startTime?: string; + + @doc(""" +Specifies time zone in which the schedule runs. +TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 +""") + timeZone?: string; + + @doc(""" +[Required] Specifies cron expression of schedule. +The expression should follow NCronTab format. +""") + expression?: string; +} + +model ScheduleBase { + @doc("A system assigned id for the schedule.") + id?: string; + + @doc("The current deployment state of schedule.") + provisioningStatus?: ScheduleProvisioningState; + + @doc("Is the schedule enabled or disabled?") + status?: ScheduleStatus; +} + +@doc("Defines an Aml Instance container.") +model ComputeInstanceContainer { + @doc("Name of the ComputeInstance container.") + name?: string; + + @doc("Auto save settings.") + autosave?: Autosave; + + @doc("Information of GPU.") + gpu?: string; + + @doc("network of this container.") + network?: Network; + + @doc("Environment information of this container.") + environment?: ComputeInstanceEnvironmentInfo; + + @doc("services of this containers.") + @visibility("read") + services?: Record[]; +} + +@doc("Environment information") +model ComputeInstanceEnvironmentInfo { + @doc("name of environment.") + name?: string; + + @doc("version of environment.") + version?: string; +} + +@doc("Defines an Aml Instance DataDisk.") +model ComputeInstanceDataDisk { + @doc("Caching type of Data Disk.") + caching?: Caching; + + @doc("The initial disk size in gigabytes.") + diskSizeGB?: int32; + + @doc("The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun.") + lun?: int32; + + @doc("type of this storage account.") + storageAccountType?: StorageAccountType; +} + +@doc("Defines an Aml Instance DataMount.") +model ComputeInstanceDataMount { + @doc("Source of the ComputeInstance data mount.") + source?: string; + + @doc("Data source type.") + sourceType?: SourceType; + + @doc("name of the ComputeInstance data mount.") + mountName?: string; + + @doc("Mount Action.") + mountAction?: MountAction; + + @doc("who this data mount created by.") + createdBy?: string; + + @doc("Path of this data mount.") + mountPath?: string; + + @doc("Mount state.") + mountState?: MountState; + + @doc("The time when the disk mounted.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + mountedOn?: utcDateTime; + + @doc("Error of this data mount.") + error?: string; +} + +@doc("Version of computeInstance.") +model ComputeInstanceVersion { + @doc("Runtime of compute instance.") + runtime?: string; +} + +@doc("An Azure Machine Learning compute instance.") +model ComputeInstance extends Compute { + ...ComputeInstanceSchema; + + @doc("The type of compute") + computeType: "ComputeInstance"; +} + +@doc("Properties(top level) of ComputeInstance") +model ComputeInstanceSchema { + @doc("Properties of ComputeInstance") + properties?: ComputeInstanceProperties; +} + +@doc("A Machine Learning compute based on Azure Virtual Machines.") +model VirtualMachine extends Compute { + ...VirtualMachineSchema; + + @doc("The type of compute") + computeType: "VirtualMachine"; +} + +model VirtualMachineSchema { + properties?: VirtualMachineSchemaProperties; +} + +model VirtualMachineSchemaProperties { + @doc("Virtual Machine size") + virtualMachineSize?: string; + + @doc("Port open for ssh connections.") + sshPort?: int32; + + @doc("Notebook server port open for ssh connections.") + notebookServerPort?: int32; + + @doc("Public IP address of the virtual machine.") + address?: string; + + @doc("Admin credentials for virtual machine") + administratorAccount?: VirtualMachineSshCredentials; + + @doc("Indicates whether this compute will be used for running notebooks.") + isNotebookInstanceCompute?: boolean; +} + +@doc("Admin credentials for virtual machine") +model VirtualMachineSshCredentials { + @doc("Username of admin account") + username?: string; + + @doc("Password of admin account") + password?: string; + + @doc("Public key data") + publicKeyData?: string; + + @doc("Private key data") + privateKeyData?: string; +} + +@doc("HDInsight compute properties") +model HDInsightProperties { + @doc("Port open for ssh connections on the master node of the cluster.") + sshPort?: int32; + + @doc("Public IP address of the master node of the cluster.") + address?: string; + + @doc("Admin credentials for master node of the cluster") + administratorAccount?: VirtualMachineSshCredentials; +} + +@doc("A HDInsight compute.") +model HDInsight extends Compute { + ...HDInsightSchema; + + @doc("The type of compute") + computeType: "HDInsight"; +} + +model HDInsightSchema { + @doc("HDInsight compute properties") + properties?: HDInsightProperties; +} + +@doc("A DataFactory compute.") +model DataFactory extends Compute { + @doc("The type of compute") + computeType: "DataFactory"; +} + +@doc("Properties of Databricks") +model DatabricksProperties { + @doc("Databricks access token") + databricksAccessToken?: string; + + @doc("Workspace Url") + workspaceUrl?: string; +} + +@doc("A DataFactory compute.") +model Databricks extends Compute { + ...DatabricksSchema; + + @doc("The type of compute") + computeType: "Databricks"; +} + +model DatabricksSchema { + @doc("Properties of Databricks") + properties?: DatabricksProperties; +} + +@doc("A DataLakeAnalytics compute.") +model DataLakeAnalytics extends Compute { + ...DataLakeAnalyticsSchema; + + @doc("The type of compute") + computeType: "DataLakeAnalytics"; +} + +model DataLakeAnalyticsSchema { + properties?: DataLakeAnalyticsSchemaProperties; +} + +model DataLakeAnalyticsSchemaProperties { + @doc("DataLake Store Account Name") + dataLakeStoreAccountName?: string; +} + +@doc("A SynapseSpark compute.") +model SynapseSpark extends Compute { + properties?: SynapseSparkProperties; + + @doc("The type of compute") + computeType: "SynapseSpark"; +} + +model SynapseSparkProperties { + @doc("Auto scale properties.") + autoScaleProperties?: AutoScaleProperties; + + @doc("Auto pause properties.") + autoPauseProperties?: AutoPauseProperties; + + @doc("Spark version.") + sparkVersion?: string; + + @doc("The number of compute nodes currently assigned to the compute.") + nodeCount?: int32; + + @doc("Node size.") + nodeSize?: string; + + @doc("Node size family.") + nodeSizeFamily?: string; + + @doc("Azure subscription identifier.") + subscriptionId?: string; + + @doc("Name of the resource group in which workspace is located.") + resourceGroup?: string; + + @doc("Name of Azure Machine Learning workspace.") + workspaceName?: string; + + @doc("Pool name.") + poolName?: string; +} + +@doc("Auto scale properties") +model AutoScaleProperties { + minNodeCount?: int32; + enabled?: boolean; + maxNodeCount?: int32; +} + +@doc("Auto pause properties") +model AutoPauseProperties { + delayInMinutes?: int32; + enabled?: boolean; +} + +@doc("Properties of AksComputeSecrets") +model AksComputeSecretsProperties { + @doc("Content of kubeconfig file that can be used to connect to the Kubernetes cluster.") + userKubeConfig?: string; + + @doc("Content of kubeconfig file that can be used to connect to the Kubernetes cluster.") + adminKubeConfig?: string; + + @doc("Image registry pull secret.") + imagePullSecretName?: string; +} + +@doc("Secrets related to a Machine Learning compute based on AKS.") +model AksComputeSecrets extends ComputeSecrets { + ...AksComputeSecretsProperties; + + @doc("The type of compute") + computeType: "AKS"; +} + +@doc("Secrets related to a Machine Learning compute based on AKS.") +model VirtualMachineSecrets extends ComputeSecrets { + ...VirtualMachineSecretsSchema; + + @doc("The type of compute") + computeType: "VirtualMachine"; +} + +model VirtualMachineSecretsSchema { + @doc("Admin credentials for virtual machine.") + administratorAccount?: VirtualMachineSshCredentials; +} + +@doc("Properties of Databricks Compute Secrets") +model DatabricksComputeSecretsProperties { + @doc("access token for databricks account.") + databricksAccessToken?: string; +} + +@doc("Secrets related to a Machine Learning compute based on Databricks.") +model DatabricksComputeSecrets extends ComputeSecrets { + ...DatabricksComputeSecretsProperties; + + @doc("The type of compute") + computeType: "Databricks"; +} + +@doc("Account key datastore credentials configuration.") +model AccountKeyDatastoreCredentials extends DatastoreCredentials { + @doc("[Required] Storage account secrets.") + @visibility("create", "update") + secrets: AccountKeyDatastoreSecrets; + + @doc("[Required] Credential type used to authentication with storage.") + credentialsType: "AccountKey"; +} + +@doc("Datastore account key secrets.") +model AccountKeyDatastoreSecrets extends DatastoreSecrets { + @doc("Storage account key.") + key?: string; + + @doc("[Required] Credential type used to authentication with storage.") + secretsType: "AccountKey"; +} + +model AllFeatures extends MonitoringFeatureFilterBase { + @doc("[Required] Specifies the feature filter to leverage when selecting features to calculate metrics over.") + filterType: "AllFeatures"; +} + +@discriminator("filterType") +model MonitoringFeatureFilterBase {} + +@doc("All nodes means the service will be running on all of the nodes of the job") +model AllNodes extends Nodes { + @doc("[Required] Type of the Nodes value") + nodesValueType: "All"; +} + +@doc("AML Token identity configuration.") +model AmlToken extends IdentityConfiguration { + @doc("[Required] Specifies the type of identity framework.") + identityType: "AMLToken"; +} + +@doc("AML token compute identity definition.") +model AmlTokenComputeIdentity extends MonitorComputeIdentityBase { + @doc("[Required] Monitor compute identity type enum.") + computeIdentityType: "AmlToken"; +} + +@doc("Monitor compute identity base definition.") +@discriminator("computeIdentityType") +model MonitorComputeIdentityBase {} + +@doc("Asset input type.") +model AssetJobInput { + @doc("Input Asset Delivery Mode.") + @visibility("read", "create") + mode?: InputDeliveryMode; + + @doc("[Required] Input Asset URI.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + uri: string; +} + +@doc("Asset output type.") +model AssetJobOutput { + @doc("Output Asset Name.") + assetName?: string; + + @doc("Output Asset Version.") + assetVersion?: string; + + @doc("Auto delete setting of output data asset.") + @visibility("read", "create", "update") + autoDeleteSetting?: AutoDeleteSetting; + + @doc("Output Asset Delivery Mode.") + @visibility("read", "create") + mode?: OutputDeliveryMode; + + @doc("Output Asset URI.") + uri?: string; +} + +@doc("Forecast horizon determined automatically by system.") +model AutoForecastHorizon extends ForecastHorizon { + @doc("[Required] Set forecast horizon value selection mode.") + mode: "Auto"; +} + +@doc("The desired maximum forecast horizon in units of time-series frequency.") +@discriminator("mode") +model ForecastHorizon {} + +@doc(""" +AutoMLJob class. +Use this class for executing AutoML tasks like Classification/Regression etc. +See TaskType enum for all the tasks supported. +""") +model AutoMLJob extends JobBase { + @doc(""" +The ARM resource ID of the Environment specification for the job. +This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated environment version when running the job. +""") + @visibility("read", "create") + environmentId?: string; + + @doc("Environment variables included in the job.") + @visibility("read", "create") + environmentVariables?: Record; + + @doc("Mapping of output data bindings used in the job.") + @visibility("read", "create") + outputs?: Record; + + @doc("Queue settings for the job") + @visibility("read", "create") + queueSettings?: QueueSettings; + + @doc("Compute Resource configuration for the job.") + @visibility("read", "create") + resources?: JobResourceConfiguration; + + @doc("[Required] This represents scenario which can be one of Tables/NLP/Image") + taskDetails: AutoMLVertical; + + @doc("[Required] Specifies the type of job.") + jobType: "AutoML"; +} + +@doc("Job output definition container information on where to find job output/logs.") +@discriminator("jobOutputType") +model JobOutput { + @doc("Description for the output.") + @visibility("read", "create") + description?: string; +} + +model QueueSettings { + @doc("Controls the compute job tier") + @visibility("read", "create") + jobTier?: JobTier; + + @doc("Controls the priority of the job on a compute.") + @visibility("read", "create") + priority?: int32; +} + +model JobResourceConfiguration extends ResourceConfiguration { + @doc("Extra arguments to pass to the Docker run command. This would override any parameters that have already been set by the system, or in this section. This parameter is only supported for Azure ML compute types.") + @visibility("read", "create") + dockerArgs?: string; + + @doc("Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes).") + @visibility("read", "create") + @pattern("\\d+[bBkKmMgG]") + shmSize?: string; +} + +@doc(""" +AutoML vertical class. +Base class for AutoML verticals - TableVertical/ImageVertical/NLPVertical +""") +@discriminator("taskType") +model AutoMLVertical { + @doc("Log verbosity for the job.") + logVerbosity?: LogVerbosity; + + @doc(""" +Target column name: This is prediction values column. +Also known as label column name in context of classification tasks. +""") + targetColumnName?: string; + + @doc("[Required] Training data input.") + trainingData: MLTableJobInput; +} + +model MLTableJobInput extends JobInput { + ...AssetJobInput; + + @doc("[Required] Specifies the type of job.") + jobInputType: "mltable"; +} + +@doc("Command job definition.") +@discriminator("jobInputType") +model JobInput { + @doc("Description for the input.") + @visibility("read", "create") + description?: string; +} + +@doc("N-Cross validations determined automatically.") +model AutoNCrossValidations extends NCrossValidations { + @doc("[Required] Mode for determining N-Cross validations.") + mode: "Auto"; +} + +@doc("N-Cross validations value.") +@discriminator("mode") +model NCrossValidations {} + +model AutoSeasonality extends Seasonality { + @doc("[Required] Seasonality mode.") + mode: "Auto"; +} + +@doc("Forecasting seasonality.") +@discriminator("mode") +model Seasonality {} + +model AutoTargetLags extends TargetLags { + @doc("[Required] Set target lags mode - Auto/Custom") + mode: "Auto"; +} + +@doc("The number of past periods to lag from the target column.") +@discriminator("mode") +model TargetLags {} + +@doc("Target lags rolling window determined automatically.") +model AutoTargetRollingWindowSize extends TargetRollingWindowSize { + @doc("[Required] TargetRollingWindowSiz detection mode.") + mode: "Auto"; +} + +@doc("Forecasting target rolling window size.") +@discriminator("mode") +model TargetRollingWindowSize {} + +@doc("Settings for Autologger.") +model AutologgerSettings { + @doc("[Required] Indicates whether mlflow autologger is enabled.") + @visibility("read", "create") + mlflowAutologger: MLFlowAutologgerState; +} + +model AzMonMonitoringAlertNotificationSettings + extends MonitoringAlertNotificationSettingsBase { + @doc("[Required] Specifies the type of signal to monitor.") + alertNotificationType: "AzureMonitor"; +} + +@discriminator("alertNotificationType") +model MonitoringAlertNotificationSettingsBase {} + +@doc("Azure Blob datastore configuration.") +model AzureBlobDatastore extends Datastore { + ...AzureDatastore; + + @doc("Storage account name.") + @visibility("read", "create") + accountName?: string; + + @doc("Storage account container name.") + @visibility("read", "create") + containerName?: string; + + @doc("Azure cloud endpoint for the storage account.") + @visibility("read", "create") + endpoint?: string; + + @doc("Protocol used to communicate with the storage account.") + @visibility("read", "create") + protocol?: string; + + @doc("Indicates which identity to use to authenticate service data access to customer's storage.") + @visibility("read", "create") + serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; + + @doc("[Required] Storage type backing the datastore.") + datastoreType: "AzureBlob"; +} + +@doc("Base definition for Azure datastore contents configuration.") +model AzureDatastore { + @doc("Azure Resource Group name") + resourceGroup?: string; + + @doc("Azure Subscription Id") + subscriptionId?: string; +} + +@doc("Azure Data Lake Gen1 datastore configuration.") +model AzureDataLakeGen1Datastore extends Datastore { + ...AzureDatastore; + + @doc("Indicates which identity to use to authenticate service data access to customer's storage.") + @visibility("read", "create") + serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; + + @doc("[Required] Azure Data Lake store name.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + storeName: string; + + @doc("[Required] Storage type backing the datastore.") + datastoreType: "AzureDataLakeGen1"; +} + +@doc("Azure Data Lake Gen2 datastore configuration.") +model AzureDataLakeGen2Datastore extends Datastore { + ...AzureDatastore; + + @doc("[Required] Storage account name.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + accountName: string; + + @doc("Azure cloud endpoint for the storage account.") + @visibility("read", "create") + endpoint?: string; + + @doc("[Required] The name of the Data Lake Gen2 filesystem.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + filesystem: string; + + @doc("Protocol used to communicate with the storage account.") + @visibility("read", "create") + protocol?: string; + + @doc("Indicates which identity to use to authenticate service data access to customer's storage.") + @visibility("read", "create") + serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; + + @doc("[Required] Storage type backing the datastore.") + datastoreType: "AzureDataLakeGen2"; +} + +@doc("Webhook details specific for Azure DevOps") +model AzureDevOpsWebhook extends Webhook { + @doc("[Required] Specifies the type of service to send a callback") + webhookType: "AzureDevOps"; +} + +@doc("Azure File datastore configuration.") +model AzureFileDatastore extends Datastore { + ...AzureDatastore; + + @doc("[Required] Storage account name.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + accountName: string; + + @doc("Azure cloud endpoint for the storage account.") + @visibility("read", "create") + endpoint?: string; + + @doc("[Required] The name of the Azure file share that the datastore points to.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + fileShareName: string; + + @doc("Protocol used to communicate with the storage account.") + @visibility("read", "create") + protocol?: string; + + @doc("Indicates which identity to use to authenticate service data access to customer's storage.") + @visibility("read", "create") + serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; + + @doc("[Required] Storage type backing the datastore.") + datastoreType: "AzureFile"; +} + +@doc("Azure ML batch inferencing server configurations.") +model AzureMLBatchInferencingServer extends InferencingServer { + @doc("Code configuration for AML batch inferencing server.") + codeConfiguration?: CodeConfiguration; + + @doc("[Required] Inferencing server type for various targets.") + serverType: "AzureMLBatch"; +} + +@doc("Azure ML online inferencing configurations.") +model AzureMLOnlineInferencingServer extends InferencingServer { + @doc("Code configuration for AML inferencing server.") + codeConfiguration?: CodeConfiguration; + + @doc("[Required] Inferencing server type for various targets.") + serverType: "AzureMLOnline"; +} + +@doc("Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation") +model BanditPolicy extends EarlyTerminationPolicy { + @doc("Absolute distance allowed from the best performing run.") + slackAmount?: float32; + + @doc("Ratio of the allowed distance from the best performing run.") + slackFactor?: float32; + + @doc("[Required] Name of policy configuration") + policyType: "Bandit"; +} + +@doc("Early termination policies enable canceling poor-performing runs before they complete") +@discriminator("policyType") +model EarlyTerminationPolicy { + @doc("Number of intervals by which to delay the first evaluation.") + delayEvaluation?: int32; + + @doc("Interval (number of runs) between policy evaluations.") + evaluationInterval?: int32; +} + +@doc("Base environment type.") +model BaseEnvironmentId extends BaseEnvironmentSource { + @doc("[Required] Resource id accepting ArmId or AzureMlId.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + resourceId: string; + + @doc("[Required] Base environment type.") + baseEnvironmentSourceType: "EnvironmentAsset"; +} + +@doc("Properties for a Batch Pipeline Component Deployment.") +model BatchPipelineComponentDeploymentConfiguration + extends BatchDeploymentConfiguration { + @doc("The ARM id of the component to be run.") + componentId?: IdAssetReference; + + @doc("The description which will be applied to the job.") + description?: string; + + @doc("Run-time settings for the pipeline job.") + settings?: Record; + + @doc("The tags which will be applied to the job.") + tags?: Record; + + @doc("[Required] The type of the deployment") + deploymentConfigurationType: "PipelineComponent"; +} + +@doc("Reference to an asset via its ARM resource ID.") +model IdAssetReference extends AssetReferenceBase { + @doc("[Required] ARM resource ID of the asset.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + assetId: string; + + @doc("[Required] Specifies the type of asset reference.") + referenceType: "Id"; +} + +@doc("Defines a Sampling Algorithm that generates values based on previous values") +model BayesianSamplingAlgorithm extends SamplingAlgorithm { + @doc("[Required] The algorithm used for generating hyperparameter values, along with configuration properties") + samplingAlgorithmType: "Bayesian"; +} + +@doc(""" +The Sampling Algorithm used to generate hyperparameter values, along with properties to +configure the algorithm +""") +@discriminator("samplingAlgorithmType") +model SamplingAlgorithm {} + +model CategoricalDataDriftMetricThreshold extends DataDriftMetricThresholdBase { + @doc("[Required] The categorical data drift metric to calculate.") + @visibility("read", "create") + metric: CategoricalDataDriftMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + dataType: "Categorical"; +} + +@discriminator("dataType") +model DataDriftMetricThresholdBase { + @doc("The threshold value. If null, a default value will be set depending on the selected metric.") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +model MonitoringThreshold { + @doc("The threshold value. If null, the set default is dependent on the metric type.") + @visibility("read", "create") + value?: float32; +} + +model CategoricalDataQualityMetricThreshold + extends DataQualityMetricThresholdBase { + @doc("[Required] The categorical data quality metric to calculate.") + @visibility("read", "create") + metric: CategoricalDataQualityMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + dataType: "Categorical"; +} + +@discriminator("dataType") +model DataQualityMetricThresholdBase { + @doc("The threshold value. If null, a default value will be set depending on the selected metric.") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +model CategoricalPredictionDriftMetricThreshold + extends PredictionDriftMetricThresholdBase { + @doc("[Required] The categorical prediction drift metric to calculate.") + @visibility("read", "create") + metric: CategoricalPredictionDriftMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + dataType: "Categorical"; +} + +@discriminator("dataType") +model PredictionDriftMetricThresholdBase { + @doc("The threshold value. If null, a default value will be set depending on the selected metric.") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +@doc("Certificate datastore credentials configuration.") +model CertificateDatastoreCredentials extends DatastoreCredentials { + @doc("Authority URL used for authentication.") + authorityUrl?: string; + + @doc("[Required] Service principal client ID.") + clientId: string; + + @doc("Resource the service principal has access to.") + resourceUrl?: string; + + @doc("[Required] Service principal secrets.") + @visibility("create", "update") + secrets: CertificateDatastoreSecrets; + + @doc("[Required] ID of the tenant to which the service principal belongs.") + tenantId: string; + + @doc("[Required] Thumbprint of the certificate used for authentication.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + thumbprint: string; + + @doc("[Required] Credential type used to authentication with storage.") + credentialsType: "Certificate"; +} + +@doc("Datastore certificate secrets.") +model CertificateDatastoreSecrets extends DatastoreSecrets { + @doc("Service principal certificate.") + certificate?: string; + + @doc("[Required] Credential type used to authentication with storage.") + secretsType: "Certificate"; +} + +@doc("Classification task in AutoML Table vertical.") +model Classification extends AutoMLVertical { + ...TableVertical; + + @doc("Positive label for binary metrics calculation.") + positiveLabel?: string; + + @doc("Primary metric for the task.") + primaryMetric?: ClassificationPrimaryMetrics; + + @doc("Inputs for training phase for an AutoML Job.") + trainingSettings?: ClassificationTrainingSettings; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "Classification"; +} + +@doc("Classification Training related configuration.") +model ClassificationTrainingSettings extends TrainingSettings { + @doc("Allowed models for classification task.") + allowedTrainingAlgorithms?: ClassificationModels[]; + + @doc("Blocked models for classification task.") + blockedTrainingAlgorithms?: ClassificationModels[]; +} + +@doc("Training related configuration.") +model TrainingSettings { + @doc("Enable recommendation of DNN models.") + enableDnnTraining?: boolean; + + @doc("Flag to turn on explainability on best model.") + enableModelExplainability?: boolean; + + @doc("Flag for enabling onnx compatible models.") + enableOnnxCompatibleModels?: boolean; + + @doc("Enable stack ensemble run.") + enableStackEnsemble?: boolean; + + @doc("Enable voting ensemble run.") + enableVoteEnsemble?: boolean; + + @doc(""" +During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. +Configure this parameter with a higher value than 300 secs, if more time is needed. +""") + ensembleModelDownloadTimeout?: duration; + + @doc("Stack ensemble settings for stack ensemble run.") + stackEnsembleSettings?: StackEnsembleSettings; + + @doc(""" +TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future may result in mixed mode or heuristics based mode selection. Default is 'auto'. +If 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. +If 'NonDistributed' then only non distributed algorithms are chosen. +""") + trainingMode?: TrainingMode; +} + +@doc("Advances setting to customize StackEnsemble run.") +model StackEnsembleSettings { + @doc("Optional parameters to pass to the initializer of the meta-learner.") + stackMetaLearnerKWargs?: Record; + + @doc("Specifies the proportion of the training set (when choosing train and validation type of training) to be reserved for training the meta-learner. Default value is 0.2.") + stackMetaLearnerTrainPercentage?: float32; + + @doc("The meta-learner is a model trained on the output of the individual heterogeneous models.") + stackMetaLearnerType?: StackMetaLearnerType; +} + +@doc("Abstract class for AutoML tasks that use table dataset as input - such as Classification/Regression/Forecasting.") +model TableVertical { + @doc("Columns to use for CVSplit data.") + cvSplitColumnNames?: string[]; + + @doc("Featurization inputs needed for AutoML job.") + featurizationSettings?: TableVerticalFeaturizationSettings; + + @doc("Model/training parameters that will remain constant throughout training.") + fixedParameters?: TableFixedParameters; + + @doc("Execution constraints for AutoMLJob.") + limitSettings?: TableVerticalLimitSettings; + + @doc(""" +Number of cross validation folds to be applied on training dataset +when validation dataset is not provided. +""") + nCrossValidations?: NCrossValidations; + + @doc("Search space for sampling different combinations of models and their hyperparameters.") + searchSpace?: TableParameterSubspace[]; + + @doc("Settings for model sweeping and hyperparameter tuning.") + sweepSettings?: TableSweepSettings; + + @doc("Test data input.") + testData?: MLTableJobInput; + + @doc(""" +The fraction of test dataset that needs to be set aside for validation purpose. +Values between (0.0 , 1.0) +Applied when validation dataset is not provided. +""") + testDataSize?: float32; + + @doc("Validation data inputs.") + validationData?: MLTableJobInput; + + @doc(""" +The fraction of training dataset that needs to be set aside for validation purpose. +Values between (0.0 , 1.0) +Applied when validation dataset is not provided. +""") + validationDataSize?: float32; + + @doc("The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down.") + weightColumnName?: string; +} + +@doc("Featurization Configuration.") +model TableVerticalFeaturizationSettings extends FeaturizationSettings { + @doc("These transformers shall not be used in featurization.") + blockedTransformers?: BlockedTransformers[]; + + @doc("Dictionary of column name and its type (int, float, string, datetime etc).") + columnNameAndTypes?: Record; + + @doc("Determines whether to use Dnn based featurizers for data featurization.") + enableDnnFeaturization?: boolean; + + @doc(""" +Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of necessary transformation of the data in featurization phase. +If 'Off' is selected then no featurization is done. +If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. +""") + mode?: FeaturizationMode; + + @doc("User can specify additional transformers to be used along with the columns to which it would be applied and parameters for the transformer constructor.") + transformerParams?: Record; +} + +@doc("Column transformer parameters.") +model ColumnTransformer { + @doc("Fields to apply transformer logic on.") + fields?: string[]; + + @doc(""" +Different properties to be passed to transformer. +Input expected is dictionary of key,value pairs in JSON format. +""") + parameters?: Record; +} + +@doc("Featurization Configuration.") +model FeaturizationSettings { + @doc("Dataset language, useful for the text data.") + datasetLanguage?: string; +} + +@doc("Fixed training parameters that won't be swept over during AutoML Table training.") +model TableFixedParameters { + @doc("Specify the boosting type, e.g gbdt for XGBoost.") + booster?: string; + + @doc("Specify the boosting type, e.g gbdt for LightGBM.") + boostingType?: string; + + @doc("Specify the grow policy, which controls the way new nodes are added to the tree.") + growPolicy?: string; + + @doc("The learning rate for the training procedure.") + learningRate?: float32; + + @doc("Specify the Maximum number of discrete bins to bucket continuous features .") + maxBin?: int32; + + @doc("Specify the max depth to limit the tree depth explicitly.") + maxDepth?: int32; + + @doc("Specify the max leaves to limit the tree leaves explicitly.") + maxLeaves?: int32; + + @doc("The minimum number of data per leaf.") + minDataInLeaf?: int32; + + @doc("Minimum loss reduction required to make a further partition on a leaf node of the tree.") + minSplitGain?: float32; + + @doc("The name of the model to train.") + modelName?: string; + + @doc("Specify the number of trees (or rounds) in an model.") + nEstimators?: int32; + + @doc("Specify the number of leaves.") + numLeaves?: int32; + + @doc("The name of the preprocessor to use.") + preprocessorName?: string; + + @doc("L1 regularization term on weights.") + regAlpha?: float32; + + @doc("L2 regularization term on weights.") + regLambda?: float32; + + @doc("Subsample ratio of the training instance.") + subsample?: float32; + + @doc("Frequency of subsample.") + subsampleFreq?: float32; + + @doc("Specify the tree method.") + treeMethod?: string; + + @doc("If true, center before scaling the data with StandardScalar.") + withMean?: boolean; + + @doc("If true, scaling the data with Unit Variance with StandardScalar.") + withStd?: boolean; +} + +@doc("Job execution constraints.") +model TableVerticalLimitSettings { + @doc("Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score improvement in last 20 iterations.") + enableEarlyTermination?: boolean; + + @doc("Exit score for the AutoML job.") + exitScore?: float32; + + @doc("Maximum Concurrent iterations.") + maxConcurrentTrials?: int32; + + @doc("Max cores per iteration.") + maxCoresPerTrial?: int32; + + @doc("Maximum nodes to use for the experiment.") + maxNodes?: int32; + + @doc("Number of iterations.") + maxTrials?: int32; + + @doc("Number of concurrent sweeping runs that user wants to trigger.") + sweepConcurrentTrials?: int32; + + @doc("Number of sweeping runs that user wants to trigger.") + sweepTrials?: int32; + + @doc("AutoML job timeout.") + timeout?: duration; + + @doc("Iteration timeout.") + trialTimeout?: duration; +} + +model TableParameterSubspace { + @doc("Specify the boosting type, e.g gbdt for XGBoost.") + booster?: string; + + @doc("Specify the boosting type, e.g gbdt for LightGBM.") + boostingType?: string; + + @doc("Specify the grow policy, which controls the way new nodes are added to the tree.") + growPolicy?: string; + + @doc("The learning rate for the training procedure.") + learningRate?: string; + + @doc("Specify the Maximum number of discrete bins to bucket continuous features .") + maxBin?: string; + + @doc("Specify the max depth to limit the tree depth explicitly.") + maxDepth?: string; + + @doc("Specify the max leaves to limit the tree leaves explicitly.") + maxLeaves?: string; + + @doc("The minimum number of data per leaf.") + minDataInLeaf?: string; + + @doc("Minimum loss reduction required to make a further partition on a leaf node of the tree.") + minSplitGain?: string; + + @doc("The name of the model to train.") + modelName?: string; + + @doc("Specify the number of trees (or rounds) in an model.") + nEstimators?: string; + + @doc("Specify the number of leaves.") + numLeaves?: string; + + @doc("The name of the preprocessor to use.") + preprocessorName?: string; + + @doc("L1 regularization term on weights.") + regAlpha?: string; + + @doc("L2 regularization term on weights.") + regLambda?: string; + + @doc("Subsample ratio of the training instance.") + subsample?: string; + + @doc("Frequency of subsample") + subsampleFreq?: string; + + @doc("Specify the tree method.") + treeMethod?: string; + + @doc("If true, center before scaling the data with StandardScalar.") + withMean?: string; + + @doc("If true, scaling the data with Unit Variance with StandardScalar.") + withStd?: string; +} + +model TableSweepSettings { + @doc("Type of early termination policy for the sweeping job.") + earlyTermination?: EarlyTerminationPolicy; + + @doc("[Required] Type of sampling algorithm.") + samplingAlgorithm: SamplingAlgorithmType; +} + +model ClassificationModelPerformanceMetricThreshold + extends ModelPerformanceMetricThresholdBase { + @doc("[Required] The classification model performance to calculate.") + @visibility("read", "create") + metric: ClassificationModelPerformanceMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + modelType: "Classification"; +} + +@discriminator("modelType") +model ModelPerformanceMetricThresholdBase { + @doc("The threshold value. If null, a default value will be set depending on the selected metric.") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +model CocoExportSummary extends ExportSummary { + @doc("The container name to which the labels will be exported.") + @visibility("read") + containerName?: string; + + @doc("The output path where the labels will be exported.") + @visibility("read") + snapshotPath?: string; + + @doc("[Required] The format of exported labels, also as the discriminator.") + format: "Coco"; +} + +@doc("Command job definition.") +model CommandJob extends JobBase { + @doc("Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.") + @visibility("read", "create") + autologgerSettings?: AutologgerSettings; + + @doc("ARM resource ID of the code asset.") + @visibility("read", "create") + codeId?: string; + + @doc("[Required] The command to execute on startup of the job. eg. \"python train.py\"") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + command: string; + + @doc("Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, Ray, or null.") + @visibility("read", "create") + distribution?: DistributionConfiguration; + + @doc("[Required] The ARM resource ID of the Environment specification for the job.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + environmentId: string; + + @doc("Environment variables included in the job.") + @visibility("read", "create") + environmentVariables?: Record; + + @doc("Mapping of input data bindings used in the job.") + @visibility("read", "create") + inputs?: Record; + + @doc("Command Job limit.") + @visibility("read", "create") + limits?: CommandJobLimits; + + @doc("Mapping of output data bindings used in the job.") + @visibility("read", "create") + outputs?: Record; + + @doc("Input parameters.") + @visibility("read") + parameters?: Record; + + @doc("Queue settings for the job") + @visibility("read", "create") + queueSettings?: QueueSettings; + + @doc("Compute Resource configuration for the job.") + @visibility("read", "create") + resources?: JobResourceConfiguration; + + @doc("[Required] Specifies the type of job.") + jobType: "Command"; +} + +@doc("Base definition for job distribution configuration.") +@discriminator("distributionType") +model DistributionConfiguration {} + +@doc("Command Job limit class.") +model CommandJobLimits extends JobLimits { + @doc("[Required] JobLimit type.") + jobLimitsType: "Command"; +} + +@discriminator("jobLimitsType") +model JobLimits { + @doc("The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds.") + timeout?: duration; +} + +@doc("Resource requirements for each container instance within an online deployment.") +model ContainerResourceRequirements { + @doc("Container resource limit info:") + containerResourceLimits?: ContainerResourceSettings; + + @doc("Container resource request info:") + containerResourceRequests?: ContainerResourceSettings; +} + +model ContainerResourceSettings { + @doc(""" +Number of vCPUs request/limit for container. More info: +https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +""") + cpu?: string; + + @doc(""" +Number of Nvidia GPU cards request/limit for container. More info: +https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +""") + gpu?: string; + + @doc(""" +Memory size request/limit for container. More info: +https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +""") + memory?: string; +} + +model CreateMonitorAction extends ScheduleActionBase { + @doc("[Required] Defines the monitor.") + @visibility("read", "create") + monitorDefinition: MonitorDefinition; + + @doc("[Required] Specifies the action type of the schedule") + actionType: "CreateMonitor"; +} + +model MonitorDefinition { + @doc("The monitor's notification settings.") + @visibility("read", "create") + alertNotificationSetting?: MonitoringAlertNotificationSettingsBase; + + @doc("[Required] The ARM resource ID of the compute resource to run the monitoring job on.") + @visibility("read", "create") + computeConfiguration: MonitorComputeConfigurationBase; + + @doc("The ARM resource ID of either the model or deployment targeted by this monitor.") + @visibility("read", "create") + monitoringTarget?: MonitoringTarget; + + @doc("[Required] The signals to monitor.") + @visibility("read", "create") + signals: Record; +} + +@doc("Monitor compute configuration base definition.") +@discriminator("computeType") +model MonitorComputeConfigurationBase {} + +@doc("Monitoring target definition.") +model MonitoringTarget { + @doc("The ARM resource ID of either the deployment targeted by this monitor.") + @visibility("read", "create") + deploymentId?: string; + + @doc("The ARM resource ID of either the model targeted by this monitor.") + @visibility("read", "create") + modelId?: string; + + @doc("[Required] The machine learning task type of the model.") + @visibility("read", "create") + taskType: ModelTaskType; +} + +@discriminator("signalType") +model MonitoringSignalBase { + @doc("The current notification mode for this signal.") + @visibility("read", "create") + mode?: MonitoringNotificationMode; + + @doc("Property dictionary. Properties can be added, but not removed or altered.") + properties?: Record; +} + +model CronTrigger extends TriggerBase { + @doc(""" +[Required] Specifies cron expression of schedule. +The expression should follow NCronTab format. +""") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + expression: string; + + @doc("[Required] ") + triggerType: "Cron"; +} + +model CsvExportSummary extends ExportSummary { + @doc("The container name to which the labels will be exported.") + @visibility("read") + containerName?: string; + + @doc("The output path where the labels will be exported.") + @visibility("read") + snapshotPath?: string; + + @doc("[Required] The format of exported labels, also as the discriminator.") + format: "CSV"; +} + +@doc("The desired maximum forecast horizon in units of time-series frequency.") +model CustomForecastHorizon extends ForecastHorizon { + @doc("[Required] Forecast horizon value.") + value: int32; + + @doc("[Required] Set forecast horizon value selection mode.") + mode: "Custom"; +} + +@doc("Custom inference server configurations.") +model CustomInferencingServer extends InferencingServer { + @doc("Inference configuration for custom inferencing.") + inferenceConfiguration?: OnlineInferenceConfiguration; + + @doc("[Required] Inferencing server type for various targets.") + serverType: "Custom"; +} + +@doc("Online inference configuration options.") +model OnlineInferenceConfiguration { + @doc("Additional configurations") + configurations?: Record; + + @doc("Entry script or command to invoke.") + entryScript?: string; + + @doc("The route to check the liveness of the inference server container.") + livenessRoute?: Route; + + @doc("The route to check the readiness of the inference server container.") + readinessRoute?: Route; + + @doc("The port to send the scoring requests to, within the inference server container.") + scoringRoute?: Route; +} + +model CustomMetricThreshold { + @doc("[Required] The user-defined metric to calculate.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + metric: string; + + @doc("The threshold value. If null, a default value will be set depending on the selected metric.") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +model CustomModelJobInput extends JobInput { + ...AssetJobInput; + + @doc("[Required] Specifies the type of job.") + jobInputType: "custom_model"; +} + +model CustomModelJobOutput extends JobOutput { + ...AssetJobOutput; + + @doc("[Required] Specifies the type of job.") + jobOutputType: "custom_model"; +} + +model CustomMonitoringSignal extends MonitoringSignalBase { + @doc("[Required] ARM resource ID of the component resource used to calculate the custom metrics.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + componentId: string; + + @doc("Monitoring assets to take as input. Key is the component input port name, value is the data asset.") + @visibility("read", "create") + inputAssets?: Record; + + @doc("Extra component parameters to take as input. Key is the component literal input port name, value is the parameter value.") + @visibility("read", "create") + inputs?: Record; + + @doc("[Required] A list of metrics to calculate and their associated thresholds.") + @visibility("read", "create") + metricThresholds: CustomMetricThreshold[]; + + @doc("[Required] A list of metrics to calculate and their associated thresholds.") + @visibility("read", "create") + workspaceConnection: MonitoringWorkspaceConnection; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "Custom"; +} + +@doc("Monitoring input data base definition.") +@discriminator("inputDataType") +model MonitoringInputDataBase { + @doc("Mapping of column names to special uses.") + @visibility("read", "create") + columns?: Record; + + @doc("The context metadata of the data source.") + @visibility("read", "create") + dataContext?: string; + + @doc("[Required] Specifies the type of job.") + @visibility("read", "create") + jobInputType: JobInputType; + + @doc("[Required] Input Asset URI.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + uri: string; +} + +@doc("Monitoring workspace connection definition.") +model MonitoringWorkspaceConnection { + @doc(""" +The properties of a workspace service connection to store as environment variables in the submitted jobs. +Key is workspace connection property path, name is environment variable key. +""") + @visibility("read", "create") + environmentVariables?: Record; + + @doc(""" +The properties of a workspace service connection to store as secrets in the submitted jobs. +Key is workspace connection property path, name is secret key. +""") + @visibility("read", "create") + secrets?: Record; +} + +@doc("N-Cross validations are specified by user.") +model CustomNCrossValidations extends NCrossValidations { + @doc("[Required] N-Cross validations value.") + value: int32; + + @doc("[Required] Mode for determining N-Cross validations.") + mode: "Custom"; +} + +model CustomSeasonality extends Seasonality { + @doc("[Required] Seasonality value.") + value: int32; + + @doc("[Required] Seasonality mode.") + mode: "Custom"; +} + +model CustomTargetLags extends TargetLags { + @doc("[Required] Set target lags values.") + values: int32[]; + + @doc("[Required] Set target lags mode - Auto/Custom") + mode: "Custom"; +} + +model CustomTargetRollingWindowSize extends TargetRollingWindowSize { + @doc("[Required] TargetRollingWindowSize value.") + value: int32; + + @doc("[Required] TargetRollingWindowSiz detection mode.") + mode: "Custom"; +} + +model DataDriftMonitoringSignal extends MonitoringSignalBase { + @doc("The data segment used for scoping on a subset of the data population.") + @visibility("read", "create") + dataSegment?: MonitoringDataSegment; + + @doc("A dictionary that maps feature names to their respective data types.") + @visibility("read", "create") + featureDataTypeOverride?: Record; + + @doc("The feature filter which identifies which feature to calculate drift over.") + @visibility("read", "create") + features?: MonitoringFeatureFilterBase; + + @doc("[Required] A list of metrics to calculate and their associated thresholds.") + @visibility("read", "create") + metricThresholds: DataDriftMetricThresholdBase[]; + + @doc("[Required] The data which drift will be calculated for.") + @visibility("read", "create") + productionData: MonitoringInputDataBase; + + @doc("[Required] The data to calculate drift against.") + @visibility("read", "create") + referenceData: MonitoringInputDataBase; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "DataDrift"; +} + +model MonitoringDataSegment { + @doc("The feature to segment the data on.") + @visibility("read", "create") + feature?: string; + + @doc("Filters for only the specified values of the given segmented feature.") + @visibility("read", "create") + values?: string[]; +} + +model DataImport extends DataVersionBase { + @doc("Name of the asset for data import job to create") + assetName?: string; + + @doc("Source data of the asset to import from") + source?: DataImportSource; + + @doc("[Required] Specifies the type of data.") + dataType: "uri_folder"; +} + +@discriminator("sourceType") +model DataImportSource { + @doc("Workspace connection for data import source storage") + connection?: string; +} + +@doc("Reference to an asset via its path in a datastore.") +model DataPathAssetReference extends AssetReferenceBase { + @doc("ARM resource ID of the datastore where the asset is located.") + datastoreId?: string; + + @doc("The path of the file/directory in the datastore.") + path?: string; + + @doc("[Required] Specifies the type of asset reference.") + referenceType: "DataPath"; +} + +model DataQualityMonitoringSignal extends MonitoringSignalBase { + @doc("A dictionary that maps feature names to their respective data types.") + @visibility("read", "create") + featureDataTypeOverride?: Record; + + @doc("The features to calculate drift over.") + @visibility("read", "create") + features?: MonitoringFeatureFilterBase; + + @doc("[Required] A list of metrics to calculate and their associated thresholds.") + @visibility("read", "create") + metricThresholds: DataQualityMetricThresholdBase[]; + + @doc("[Required] The data produced by the production service which drift will be calculated for.") + @visibility("read", "create") + productionData: MonitoringInputDataBase; + + @doc("[Required] The data to calculate drift against.") + @visibility("read", "create") + referenceData: MonitoringInputDataBase; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "DataQuality"; +} + +model DatabaseSource extends DataImportSource { + @doc("SQL Query statement for data import Database source") + query?: string; + + @doc("SQL StoredProcedure on data import Database source") + storedProcedure?: string; + + @doc("SQL StoredProcedure parameters") + storedProcedureParams?: Record[]; + + @doc("Name of the table on data import Database source") + tableName?: string; + + @doc("[Required] Specifies the type of data.") + sourceType: "database"; +} + +model DatasetExportSummary extends ExportSummary { + @doc("The unique name of the labeled data asset.") + @visibility("read") + labeledAssetName?: string; + + @doc("[Required] The format of exported labels, also as the discriminator.") + format: "Dataset"; +} + +model DefaultScaleSettings extends OnlineScaleSettings { + @doc("[Required] Type of deployment scaling algorithm") + scaleType: "Default"; +} + +model EmailMonitoringAlertNotificationSettings + extends MonitoringAlertNotificationSettingsBase { + @doc("Configuration for notification.") + @visibility("read", "create") + emailNotificationSetting?: NotificationSetting; + + @doc("[Required] Specifies the type of signal to monitor.") + alertNotificationType: "Email"; +} + +model EndpointScheduleAction extends ScheduleActionBase { + @doc(""" +[Required] Defines Schedule action definition details. + +""") + @visibility("read", "create", "update") + endpointInvocationDefinition: Record; + + @doc("[Required] Specifies the action type of the schedule") + actionType: "InvokeBatchEndpoint"; +} + +model FeatureAttributionDriftMonitoringSignal extends MonitoringSignalBase { + @doc("[Required] A list of metrics to calculate and their associated thresholds.") + @visibility("read", "create") + metricThreshold: FeatureAttributionMetricThreshold; + + @doc("[Required] The data which drift will be calculated for.") + @visibility("read", "create") + productionData: MonitoringInputDataBase[]; + + @doc("[Required] The data to calculate drift against.") + @visibility("read", "create") + referenceData: MonitoringInputDataBase; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "FeatureAttributionDrift"; +} + +model FeatureAttributionMetricThreshold { + @doc("[Required] The feature attribution metric to calculate.") + @visibility("read", "create") + metric: FeatureAttributionMetric; + + @doc("The threshold value. If null, a default value will be set depending on the selected metric.") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +model FeatureSubset extends MonitoringFeatureFilterBase { + @doc("[Required] The list of features to include.") + @visibility("read", "create") + features: string[]; + + @doc("[Required] Specifies the feature filter to leverage when selecting features to calculate metrics over.") + filterType: "FeatureSubset"; +} + +model FileSystemSource extends DataImportSource { + @doc("Path on data import FileSystem source") + path?: string; + + @doc("[Required] Specifies the type of data.") + sourceType: "file_system"; +} + +@doc("Fixed input data definition.") +model FixedInputData extends MonitoringInputDataBase { + @doc("[Required] Specifies the type of signal to monitor.") + inputDataType: "Fixed"; +} + +@doc("Forecasting task in AutoML Table vertical.") +model Forecasting extends AutoMLVertical { + ...TableVertical; + + @doc("Forecasting task specific inputs.") + forecastingSettings?: ForecastingSettings; + + @doc("Primary metric for forecasting task.") + primaryMetric?: ForecastingPrimaryMetrics; + + @doc("Inputs for training phase for an AutoML Job.") + trainingSettings?: ForecastingTrainingSettings; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "Forecasting"; +} + +@doc("Forecasting specific parameters.") +model ForecastingSettings { + @doc(""" +Country or region for holidays for forecasting tasks. +These should be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. +""") + countryOrRegionForHolidays?: string; + + @doc(""" +Number of periods between the origin time of one CV fold and the next fold. For +example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be +three days apart. +""") + cvStepSize?: int32; + + @doc("Flag for generating lags for the numeric features with 'auto' or null.") + featureLags?: FeatureLags; + + @doc(""" +The feature columns that are available for training but unknown at the time of forecast/inference. +If features_unknown_at_forecast_time is not set, it is assumed that all the feature columns in the dataset are known at inference time. +""") + featuresUnknownAtForecastTime?: string[]; + + @doc("The desired maximum forecast horizon in units of time-series frequency.") + forecastHorizon?: ForecastHorizon; + + @doc("When forecasting, this parameter represents the period with which the forecast is desired, for example daily, weekly, yearly, etc. The forecast frequency is dataset frequency by default.") + frequency?: string; + + @doc(""" +Set time series seasonality as an integer multiple of the series frequency. +If seasonality is set to 'auto', it will be inferred. +""") + seasonality?: Seasonality; + + @doc("The parameter defining how if AutoML should handle short time series.") + shortSeriesHandlingConfig?: ShortSeriesHandlingConfiguration; + + @doc(""" +The function to be used to aggregate the time series target column to conform to a user specified frequency. +If the TargetAggregateFunction is set i.e. not 'None', but the freq parameter is not set, the error is raised. The possible target aggregation functions are: \"sum\", \"max\", \"min\" and \"mean\". +""") + targetAggregateFunction?: TargetAggregationFunction; + + @doc("The number of past periods to lag from the target column.") + targetLags?: TargetLags; + + @doc("The number of past periods used to create a rolling window average of the target column.") + targetRollingWindowSize?: TargetRollingWindowSize; + + @doc("The name of the time column. This parameter is required when forecasting to specify the datetime column in the input data used for building the time series and inferring its frequency.") + timeColumnName?: string; + + @doc(""" +The names of columns used to group a timeseries. It can be used to create multiple series. +If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type forecasting. +""") + timeSeriesIdColumnNames?: string[]; + + @doc("Configure STL Decomposition of the time-series target column.") + useStl?: UseStl; +} + +@doc("Forecasting Training related configuration.") +model ForecastingTrainingSettings extends TrainingSettings { + @doc("Allowed models for forecasting task.") + allowedTrainingAlgorithms?: ForecastingModels[]; + + @doc("Blocked models for forecasting task.") + blockedTrainingAlgorithms?: ForecastingModels[]; +} + +@doc("Generation safety quality metric threshold definition.") +model GenerationSafetyQualityMetricThreshold { + @doc("[Required] Gets or sets the feature attribution metric to calculate.") + @visibility("read", "create") + metric: GenerationSafetyQualityMetric; + + @doc(""" +Gets or sets the threshold value. +If null, a default value will be set depending on the selected metric. +""") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +@doc("Generation safety quality monitoring signal definition.") +model GenerationSafetyQualityMonitoringSignal extends MonitoringSignalBase { + @doc("[Required] Gets or sets the metrics to calculate and the corresponding thresholds.") + @visibility("read", "create") + metricThresholds: GenerationSafetyQualityMetricThreshold[]; + + @doc("Gets or sets the target data for computing metrics.") + @visibility("read", "create") + productionData?: MonitoringInputDataBase[]; + + @doc("[Required] The sample rate of the target data, should be greater than 0 and at most 1.") + @visibility("read", "create") + samplingRate: float32; + + @doc("Gets or sets the workspace connection ID used to connect to the content generation endpoint.") + @visibility("read", "create") + workspaceConnectionId?: string; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "GenerationSafetyQuality"; +} + +@doc("Generation token statistics metric threshold definition.") +model GenerationTokenStatisticsMetricThreshold { + @doc("[Required] Gets or sets the feature attribution metric to calculate.") + @visibility("read", "create") + metric: GenerationTokenStatisticsMetric; + + @doc(""" +Gets or sets the threshold value. +If null, a default value will be set depending on the selected metric. +""") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +@doc("Generation token statistics signal definition.") +model GenerationTokenStatisticsSignal extends MonitoringSignalBase { + @doc("[Required] Gets or sets the metrics to calculate and the corresponding thresholds.") + @visibility("read", "create") + metricThresholds: GenerationTokenStatisticsMetricThreshold[]; + + @doc("Gets or sets the target data for computing metrics.") + @visibility("read", "create") + productionData?: MonitoringInputDataBase; + + @doc("[Required] The sample rate of the target data, should be greater than 0 and at most 1.") + @visibility("read", "create") + samplingRate: float32; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "GenerationTokenStatistics"; +} + +@doc("Defines a Sampling Algorithm that exhaustively generates every value combination in the space") +model GridSamplingAlgorithm extends SamplingAlgorithm { + @doc("[Required] The algorithm used for generating hyperparameter values, along with configuration properties") + samplingAlgorithmType: "Grid"; +} + +model HdfsDatastore extends Datastore { + @doc("The TLS cert of the HDFS server. Needs to be a base64 encoded string. Required if \"Https\" protocol is selected.") + @visibility("read", "create") + hdfsServerCertificate?: string; + + @doc("[Required] IP Address or DNS HostName.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + nameNodeAddress: string; + + @doc("Protocol used to communicate with the storage account (Https/Http).") + @visibility("read", "create") + protocol?: string; + + @doc("[Required] Storage type backing the datastore.") + datastoreType: "Hdfs"; +} + +@doc(""" +Image Classification. Multi-class image classification is used when an image is classified with only a single label +from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. +""") +model ImageClassification extends AutoMLVertical { + ...ImageClassificationBase; + + @doc("Primary metric to optimize for this task.") + primaryMetric?: ClassificationPrimaryMetrics; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "ImageClassification"; +} + +model ImageClassificationBase extends ImageVertical { + @doc("Settings used for training the model.") + modelSettings?: ImageModelSettingsClassification; + + @doc("Search space for sampling different combinations of models and their hyperparameters.") + searchSpace?: ImageModelDistributionSettingsClassification[]; +} + +@doc(""" +Settings used for training the model. +For more information on the available settings please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") +model ImageModelSettingsClassification extends ImageModelSettings { + @doc("Image crop size that is input to the neural network for the training dataset. Must be a positive integer.") + trainingCropSize?: int32; + + @doc("Image crop size that is input to the neural network for the validation dataset. Must be a positive integer.") + validationCropSize?: int32; + + @doc("Image size to which to resize before cropping for validation dataset. Must be a positive integer.") + validationResizeSize?: int32; + + @doc(""" +Weighted loss. The accepted values are 0 for no weighted loss. +1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. +""") + weightedLoss?: int32; +} + +@doc(""" +Settings used for training the model. +For more information on the available settings please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") +model ImageModelSettings { + @doc("Settings for advanced scenarios.") + advancedSettings?: string; + + @doc("Enable AMSGrad when optimizer is 'adam' or 'adamw'.") + amsGradient?: boolean; + + @doc("Settings for using Augmentations.") + augmentations?: string; + + @doc("Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].") + beta1?: float32; + + @doc("Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].") + beta2?: float32; + + @doc("Frequency to store model checkpoints. Must be a positive integer.") + checkpointFrequency?: int32; + + @doc("The pretrained checkpoint model for incremental training.") + checkpointModel?: MLFlowModelJobInput; + + @doc("The id of a previous run that has a pretrained checkpoint for incremental training.") + checkpointRunId?: string; + + @doc("Whether to use distributed training.") + distributed?: boolean; + + @doc("Enable early stopping logic during training.") + earlyStopping?: boolean; + + @doc(""" +Minimum number of epochs or validation evaluations to wait before primary metric improvement +is tracked for early stopping. Must be a positive integer. +""") + earlyStoppingDelay?: int32; + + @doc(""" +Minimum number of epochs or validation evaluations with no primary metric improvement before +the run is stopped. Must be a positive integer. +""") + earlyStoppingPatience?: int32; + + @doc("Enable normalization when exporting ONNX model.") + enableOnnxNormalization?: boolean; + + @doc("Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.") + evaluationFrequency?: int32; + + @doc(""" +Gradient accumulation means running a configured number of \"GradAccumulationStep\" steps without +updating the model weights while accumulating the gradients of those steps, and then using +the accumulated gradients to compute the weight updates. Must be a positive integer. +""") + gradientAccumulationStep?: int32; + + @doc(""" +Number of layers to freeze for the model. Must be a positive integer. +For instance, passing 2 as value for 'seresnext' means +freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please +see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") + layersToFreeze?: int32; + + @doc("Initial learning rate. Must be a float in the range [0, 1].") + learningRate?: float32; + + @doc("Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'.") + learningRateScheduler?: LearningRateScheduler; + + @doc(""" +Name of the model to use for training. +For more information on the available models please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") + modelName?: string; + + @doc("Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1].") + momentum?: float32; + + @doc("Enable nesterov when optimizer is 'sgd'.") + nesterov?: boolean; + + @doc("Number of training epochs. Must be a positive integer.") + numberOfEpochs?: int32; + + @doc("Number of data loader workers. Must be a non-negative integer.") + numberOfWorkers?: int32; + + @doc("Type of optimizer.") + optimizer?: StochasticOptimizer; + + @doc("Random seed to be used when using deterministic training.") + randomSeed?: int32; + + @doc("Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1].") + stepLRGamma?: float32; + + @doc("Value of step size when learning rate scheduler is 'step'. Must be a positive integer.") + stepLRStepSize?: int32; + + @doc("Training batch size. Must be a positive integer.") + trainingBatchSize?: int32; + + @doc("Validation batch size. Must be a positive integer.") + validationBatchSize?: int32; + + @doc("Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1].") + warmupCosineLRCycles?: float32; + + @doc("Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer.") + warmupCosineLRWarmupEpochs?: int32; + + @doc("Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1].") + weightDecay?: float32; +} + +model MLFlowModelJobInput extends JobInput { + ...AssetJobInput; + + @doc("[Required] Specifies the type of job.") + jobInputType: "mlflow_model"; +} + +@doc(""" +Distribution expressions to sweep over values of model settings. + +Some examples are: +``` +ModelName = \"choice('seresnext', 'resnest50')\"; +LearningRate = \"uniform(0.001, 0.01)\"; +LayersToFreeze = \"choice(0, 2)\"; +``` +For more details on how to compose distribution expressions please check the documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters +For more information on the available settings please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") +model ImageModelDistributionSettingsClassification + extends ImageModelDistributionSettings { + @doc("Image crop size that is input to the neural network for the training dataset. Must be a positive integer.") + trainingCropSize?: string; + + @doc("Image crop size that is input to the neural network for the validation dataset. Must be a positive integer.") + validationCropSize?: string; + + @doc("Image size to which to resize before cropping for validation dataset. Must be a positive integer.") + validationResizeSize?: string; + + @doc(""" +Weighted loss. The accepted values are 0 for no weighted loss. +1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. +""") + weightedLoss?: string; +} + +@doc(""" +Distribution expressions to sweep over values of model settings. + +Some examples are: +``` +ModelName = \"choice('seresnext', 'resnest50')\"; +LearningRate = \"uniform(0.001, 0.01)\"; +LayersToFreeze = \"choice(0, 2)\"; +``` +All distributions can be specified as distribution_name(min, max) or choice(val1, val2, ..., valn) +where distribution name can be: uniform, quniform, loguniform, etc +For more details on how to compose distribution expressions please check the documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters +For more information on the available settings please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") +model ImageModelDistributionSettings { + @doc("Enable AMSGrad when optimizer is 'adam' or 'adamw'.") + amsGradient?: string; + + @doc("Settings for using Augmentations.") + augmentations?: string; + + @doc("Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].") + beta1?: string; + + @doc("Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].") + beta2?: string; + + @doc("Whether to use distributer training.") + distributed?: string; + + @doc("Enable early stopping logic during training.") + earlyStopping?: string; + + @doc(""" +Minimum number of epochs or validation evaluations to wait before primary metric improvement +is tracked for early stopping. Must be a positive integer. +""") + earlyStoppingDelay?: string; + + @doc(""" +Minimum number of epochs or validation evaluations with no primary metric improvement before +the run is stopped. Must be a positive integer. +""") + earlyStoppingPatience?: string; + + @doc("Enable normalization when exporting ONNX model.") + enableOnnxNormalization?: string; + + @doc("Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.") + evaluationFrequency?: string; + + @doc(""" +Gradient accumulation means running a configured number of \"GradAccumulationStep\" steps without +updating the model weights while accumulating the gradients of those steps, and then using +the accumulated gradients to compute the weight updates. Must be a positive integer. +""") + gradientAccumulationStep?: string; + + @doc(""" +Number of layers to freeze for the model. Must be a positive integer. +For instance, passing 2 as value for 'seresnext' means +freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please +see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") + layersToFreeze?: string; + + @doc("Initial learning rate. Must be a float in the range [0, 1].") + learningRate?: string; + + @doc("Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'.") + learningRateScheduler?: string; + + @doc(""" +Name of the model to use for training. +For more information on the available models please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") + modelName?: string; + + @doc("Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1].") + momentum?: string; + + @doc("Enable nesterov when optimizer is 'sgd'.") + nesterov?: string; + + @doc("Number of training epochs. Must be a positive integer.") + numberOfEpochs?: string; + + @doc("Number of data loader workers. Must be a non-negative integer.") + numberOfWorkers?: string; + + @doc("Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'.") + optimizer?: string; + + @doc("Random seed to be used when using deterministic training.") + randomSeed?: string; + + @doc("Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1].") + stepLRGamma?: string; + + @doc("Value of step size when learning rate scheduler is 'step'. Must be a positive integer.") + stepLRStepSize?: string; + + @doc("Training batch size. Must be a positive integer.") + trainingBatchSize?: string; + + @doc("Validation batch size. Must be a positive integer.") + validationBatchSize?: string; + + @doc("Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1].") + warmupCosineLRCycles?: string; + + @doc("Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer.") + warmupCosineLRWarmupEpochs?: string; + + @doc("Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1].") + weightDecay?: string; +} + +@doc(""" +Abstract class for AutoML tasks that train image (computer vision) models - +such as Image Classification / Image Classification Multilabel / Image Object Detection / Image Instance Segmentation. +""") +model ImageVertical { + @doc("[Required] Limit settings for the AutoML job.") + limitSettings: ImageLimitSettings; + + @doc("Model sweeping and hyperparameter sweeping related settings.") + sweepSettings?: ImageSweepSettings; + + @doc("Validation data inputs.") + validationData?: MLTableJobInput; + + @doc(""" +The fraction of training dataset that needs to be set aside for validation purpose. +Values between (0.0 , 1.0) +Applied when validation dataset is not provided. +""") + validationDataSize?: float32; +} + +@doc("Limit settings for the AutoML job.") +model ImageLimitSettings { + @doc("Maximum number of concurrent AutoML iterations.") + maxConcurrentTrials?: int32; + + @doc("Maximum number of AutoML iterations.") + maxTrials?: int32; + + @doc("AutoML job timeout.") + timeout?: duration; +} + +@doc("Model sweeping and hyperparameter sweeping related settings.") +model ImageSweepSettings { + @doc("Type of early termination policy.") + earlyTermination?: EarlyTerminationPolicy; + + @doc("[Required] Type of the hyperparameter sampling algorithms.") + samplingAlgorithm: SamplingAlgorithmType; +} + +@doc(""" +Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels +from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. +""") +model ImageClassificationMultilabel extends AutoMLVertical { + ...ImageClassificationBase; + + @doc("Primary metric to optimize for this task.") + primaryMetric?: ClassificationMultilabelPrimaryMetrics; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "ImageClassificationMultilabel"; +} + +@doc(""" +Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, +drawing a polygon around each object in the image. +""") +model ImageInstanceSegmentation extends AutoMLVertical { + ...ImageObjectDetectionBase; + + @doc("Primary metric to optimize for this task.") + primaryMetric?: InstanceSegmentationPrimaryMetrics; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "ImageInstanceSegmentation"; +} + +model ImageObjectDetectionBase extends ImageVertical { + @doc("Settings used for training the model.") + modelSettings?: ImageModelSettingsObjectDetection; + + @doc("Search space for sampling different combinations of models and their hyperparameters.") + searchSpace?: ImageModelDistributionSettingsObjectDetection[]; +} + +@doc(""" +Settings used for training the model. +For more information on the available settings please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") +model ImageModelSettingsObjectDetection extends ImageModelSettings { + @doc(""" +Maximum number of detections per image, for all classes. Must be a positive integer. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + boxDetectionsPerImage?: int32; + + @doc(""" +During inference, only return proposals with a classification score greater than +BoxScoreThreshold. Must be a float in the range[0, 1]. +""") + boxScoreThreshold?: float32; + + @doc(""" +Image size for train and validation. Must be a positive integer. +Note: The training run may get into CUDA OOM if the size is too big. +Note: This settings is only supported for the 'yolov5' algorithm. +""") + imageSize?: int32; + + @doc("Enable computing and logging training metrics.") + logTrainingMetrics?: LogTrainingMetrics; + + @doc("Enable computing and logging validation loss.") + logValidationLoss?: LogValidationLoss; + + @doc(""" +Maximum size of the image to be rescaled before feeding it to the backbone. +Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + maxSize?: int32; + + @doc(""" +Minimum size of the image to be rescaled before feeding it to the backbone. +Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + minSize?: int32; + + @doc(""" +Model size. Must be 'small', 'medium', 'large', or 'xlarge'. +Note: training run may get into CUDA OOM if the model size is too big. +Note: This settings is only supported for the 'yolov5' algorithm. +""") + modelSize?: ModelSize; + + @doc(""" +Enable multi-scale image by varying image size by +/- 50%. +Note: training run may get into CUDA OOM if no sufficient GPU memory. +Note: This settings is only supported for the 'yolov5' algorithm. +""") + multiScale?: boolean; + + @doc("IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1].") + nmsIouThreshold?: float32; + + @doc(""" +The grid size to use for tiling each image. Note: TileGridSize must not be +None to enable small object detection logic. A string containing two integers in mxn format. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + tileGridSize?: string; + + @doc(""" +Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). +Note: This settings is not supported for the 'yolov5' algorithm. +""") + tileOverlapRatio?: float32; + + @doc(""" +The IOU threshold to use to perform NMS while merging predictions from tiles and image. +Used in validation/ inference. Must be float in the range [0, 1]. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + tilePredictionsNmsThreshold?: float32; + + @doc("IOU threshold to use when computing validation metric. Must be float in the range [0, 1].") + validationIouThreshold?: float32; + + @doc("Metric computation method to use for validation metrics.") + validationMetricType?: ValidationMetricType; +} + +@doc(""" +Distribution expressions to sweep over values of model settings. + +Some examples are: +``` +ModelName = \"choice('seresnext', 'resnest50')\"; +LearningRate = \"uniform(0.001, 0.01)\"; +LayersToFreeze = \"choice(0, 2)\"; +``` +For more details on how to compose distribution expressions please check the documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters +For more information on the available settings please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") +model ImageModelDistributionSettingsObjectDetection + extends ImageModelDistributionSettings { + @doc(""" +Maximum number of detections per image, for all classes. Must be a positive integer. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + boxDetectionsPerImage?: string; + + @doc(""" +During inference, only return proposals with a classification score greater than +BoxScoreThreshold. Must be a float in the range[0, 1]. +""") + boxScoreThreshold?: string; + + @doc(""" +Image size for train and validation. Must be a positive integer. +Note: The training run may get into CUDA OOM if the size is too big. +Note: This settings is only supported for the 'yolov5' algorithm. +""") + imageSize?: string; + + @doc(""" +Maximum size of the image to be rescaled before feeding it to the backbone. +Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + maxSize?: string; + + @doc(""" +Minimum size of the image to be rescaled before feeding it to the backbone. +Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + minSize?: string; + + @doc(""" +Model size. Must be 'small', 'medium', 'large', or 'xlarge'. +Note: training run may get into CUDA OOM if the model size is too big. +Note: This settings is only supported for the 'yolov5' algorithm. +""") + modelSize?: string; + + @doc(""" +Enable multi-scale image by varying image size by +/- 50%. +Note: training run may get into CUDA OOM if no sufficient GPU memory. +Note: This settings is only supported for the 'yolov5' algorithm. +""") + multiScale?: string; + + @doc("IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1].") + nmsIouThreshold?: string; + + @doc(""" +The grid size to use for tiling each image. Note: TileGridSize must not be +None to enable small object detection logic. A string containing two integers in mxn format. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + tileGridSize?: string; + + @doc(""" +Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). +Note: This settings is not supported for the 'yolov5' algorithm. +""") + tileOverlapRatio?: string; + + @doc(""" +The IOU threshold to use to perform NMS while merging predictions from tiles and image. +Used in validation/ inference. Must be float in the range [0, 1]. +Note: This settings is not supported for the 'yolov5' algorithm. +NMS: Non-maximum suppression +""") + tilePredictionsNmsThreshold?: string; + + @doc("IOU threshold to use when computing validation metric. Must be float in the range [0, 1].") + validationIouThreshold?: string; + + @doc("Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'.") + validationMetricType?: string; +} + +@doc(""" +Image Object Detection. Object detection is used to identify objects in an image and locate each object with a +bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. +""") +model ImageObjectDetection extends AutoMLVertical { + ...ImageObjectDetectionBase; + + @doc("Primary metric to optimize for this task.") + primaryMetric?: ObjectDetectionPrimaryMetrics; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "ImageObjectDetection"; +} + +model ImportDataAction extends ScheduleActionBase { + @doc("[Required] Defines Schedule action definition details.") + @visibility("read", "create", "update") + dataImportDefinition: DataImport; + + @doc("[Required] Specifies the action type of the schedule") + actionType: "ImportData"; +} + +model JobScheduleAction extends ScheduleActionBase { + @doc("[Required] Defines Schedule action definition details.") + @visibility("read", "create", "update") + jobDefinition: JobBase; + + @doc("[Required] Specifies the action type of the schedule") + actionType: "CreateJob"; +} + +model KerberosCredentials { + @doc("[Required] IP Address or DNS HostName.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + kerberosKdcAddress: string; + + @doc("[Required] Kerberos Username") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + kerberosPrincipal: string; + + @doc("[Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or service.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + kerberosRealm: string; +} + +model KerberosKeytabCredentials extends DatastoreCredentials { + ...KerberosCredentials; + + @doc("[Required] Keytab secrets.") + @visibility("create", "update") + secrets: KerberosKeytabSecrets; + + @doc("[Required] Credential type used to authentication with storage.") + credentialsType: "KerberosKeytab"; +} + +model KerberosKeytabSecrets extends DatastoreSecrets { + @doc("Kerberos keytab secret.") + kerberosKeytab?: string; + + @doc("[Required] Credential type used to authentication with storage.") + secretsType: "KerberosKeytab"; +} + +model KerberosPasswordCredentials extends DatastoreCredentials { + ...KerberosCredentials; + + @doc("[Required] Kerberos password secrets.") + @visibility("create", "update") + secrets: KerberosPasswordSecrets; + + @doc("[Required] Credential type used to authentication with storage.") + credentialsType: "KerberosPassword"; +} + +model KerberosPasswordSecrets extends DatastoreSecrets { + @doc("Kerberos password secret.") + kerberosPassword?: string; + + @doc("[Required] Credential type used to authentication with storage.") + secretsType: "KerberosPassword"; +} + +@doc("Properties specific to a KubernetesOnlineDeployment.") +model KubernetesOnlineDeployment extends OnlineDeployment { + @doc("The resource requirements for the container (cpu and memory).") + containerResourceRequirements?: ContainerResourceRequirements; + + @doc("[Required] The compute type of the endpoint.") + endpointComputeType: "Kubernetes"; +} + +@doc("Properties of a labeling job for image data") +model LabelingJobImageProperties extends LabelingJobMediaProperties { + @doc("Annotation type of image labeling job.") + @visibility("read", "create") + annotationType?: ImageAnnotationType; + + @doc("[Required] Media type of the job.") + mediaType: "Image"; +} + +@doc("Properties of a labeling job for text data") +model LabelingJobTextProperties extends LabelingJobMediaProperties { + @doc("Annotation type of text labeling job.") + @visibility("read", "create") + annotationType?: TextAnnotationType; + + @doc("[Required] Media type of the job.") + mediaType: "Text"; +} + +model LakeHouseArtifact extends OneLakeArtifact { + @doc("[Required] OneLake artifact type") + artifactType: "LakeHouse"; +} + +@doc("OneLake artifact (data source) configuration.") +@discriminator("artifactType") +model OneLakeArtifact { + @doc("[Required] OneLake artifact name") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + artifactName: string; +} + +@doc("Literal input type.") +model LiteralJobInput extends JobInput { + @doc("[Required] Literal value for the input.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + value: string; + + @doc("[Required] Specifies the type of job.") + jobInputType: "literal"; +} + +@doc("Labeling MLAssist configuration definition when MLAssist is disabled") +model MLAssistConfigurationDisabled extends MLAssistConfiguration { + @doc("[Required] Indicates whether MLAssist feature is enabled.") + mlAssist: "Disabled"; +} + +@doc("Labeling MLAssist configuration definition when MLAssist is enabled") +model MLAssistConfigurationEnabled extends MLAssistConfiguration { + @doc("[Required] AML compute binding used in inferencing.") + @visibility("read", "create", "update") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + inferencingComputeBinding: string; + + @doc("[Required] AML compute binding used in training.") + @visibility("read", "create", "update") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + trainingComputeBinding: string; + + @doc("[Required] Indicates whether MLAssist feature is enabled.") + mlAssist: "Enabled"; +} + +model MLFlowModelJobOutput extends JobOutput { + ...AssetJobOutput; + + @doc("[Required] Specifies the type of job.") + jobOutputType: "mlflow_model"; +} + +@doc("MLTable data definition") +model MLTableData extends DataVersionBase { + @doc("Uris referenced in the MLTable definition (required for lineage)") + @visibility("read", "create") + referencedUris?: string[]; + + @doc("[Required] Specifies the type of data.") + dataType: "mltable"; +} + +model MLTableJobOutput extends JobOutput { + ...AssetJobOutput; + + @doc("[Required] Specifies the type of job.") + jobOutputType: "mltable"; +} + +@doc("Managed compute identity definition.") +model ManagedComputeIdentity extends MonitorComputeIdentityBase { + @doc("Managed service identity (system assigned and/or user assigned identities)") + identity?: ManagedServiceIdentity; + + @doc("[Required] Monitor compute identity type enum.") + computeIdentityType: "ManagedIdentity"; +} + +@doc("Managed identity configuration.") +model ManagedIdentity extends IdentityConfiguration { + @doc("Specifies a user-assigned identity by client ID. For system-assigned, do not set this field.") + @visibility("read", "create") + clientId?: string; + + @doc("Specifies a user-assigned identity by object ID. For system-assigned, do not set this field.") + @visibility("read", "create") + objectId?: string; + + @doc("Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field.") + @visibility("read", "create") + resourceId?: string; + + @doc("[Required] Specifies the type of identity framework.") + identityType: "Managed"; +} + +@doc("Properties specific to a ManagedOnlineDeployment.") +model ManagedOnlineDeployment extends OnlineDeployment { + @doc("[Required] The compute type of the endpoint.") + endpointComputeType: "Managed"; +} + +@doc("Defines an early termination policy based on running averages of the primary metric of all runs") +model MedianStoppingPolicy extends EarlyTerminationPolicy { + @doc("[Required] Name of policy configuration") + policyType: "MedianStopping"; +} + +@doc("Model performance signal definition.") +model ModelPerformanceSignal extends MonitoringSignalBase { + @doc("The data segment.") + @visibility("read", "create") + dataSegment?: MonitoringDataSegment; + + @doc("[Required] A list of metrics to calculate and their associated thresholds.") + @visibility("read", "create") + metricThreshold: ModelPerformanceMetricThresholdBase; + + @doc("[Required] The data produced by the production service which drift will be calculated for.") + @visibility("read", "create") + productionData: MonitoringInputDataBase[]; + + @doc("[Required] The data to calculate drift against.") + @visibility("read", "create") + referenceData: MonitoringInputDataBase; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "ModelPerformance"; +} + +@doc("Monitor serverless spark compute definition.") +model MonitorServerlessSparkCompute extends MonitorComputeConfigurationBase { + @doc("[Required] The identity scheme leveraged to by the spark jobs running on serverless Spark.") + @visibility("read", "create") + computeIdentity: MonitorComputeIdentityBase; + + @doc("[Required] The instance type running the Spark job.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + instanceType: string; + + @doc("[Required] The Spark runtime version.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + runtimeVersion: string; + + @doc("[Required] Specifies the type of signal to monitor.") + computeType: "ServerlessSpark"; +} + +@doc("MPI distribution configuration.") +model Mpi extends DistributionConfiguration { + @doc("Number of processes per MPI node.") + @visibility("read", "create") + processCountPerInstance?: int32; + + @doc("[Required] Specifies the type of distribution framework.") + distributionType: "Mpi"; +} + +@doc("Fixed training parameters that won't be swept over during AutoML NLP training.") +model NlpFixedParameters { + @doc("Number of steps to accumulate gradients over before running a backward pass.") + gradientAccumulationSteps?: int32; + + @doc("The learning rate for the training procedure.") + learningRate?: float32; + + @doc("The type of learning rate schedule to use during the training procedure.") + learningRateScheduler?: NlpLearningRateScheduler; + + @doc("The name of the model to train.") + modelName?: string; + + @doc("Number of training epochs.") + numberOfEpochs?: int32; + + @doc("The batch size for the training procedure.") + trainingBatchSize?: int32; + + @doc("The batch size to be used during evaluation.") + validationBatchSize?: int32; + + @doc("The warmup ratio, used alongside LrSchedulerType.") + warmupRatio?: float32; + + @doc("The weight decay for the training procedure.") + weightDecay?: float32; +} + +@doc("Stringified search spaces for each parameter. See below examples.") +model NlpParameterSubspace { + @doc("Number of steps to accumulate gradients over before running a backward pass.") + gradientAccumulationSteps?: string; + + @doc("The learning rate for the training procedure.") + learningRate?: string; + + @doc("The type of learning rate schedule to use during the training procedure.") + learningRateScheduler?: string; + + @doc("The name of the model to train.") + modelName?: string; + + @doc("Number of training epochs.") + numberOfEpochs?: string; + + @doc("The batch size for the training procedure.") + trainingBatchSize?: string; + + @doc("The batch size to be used during evaluation.") + validationBatchSize?: string; + + @doc("The warmup ratio, used alongside LrSchedulerType.") + warmupRatio?: string; + + @doc("The weight decay for the training procedure.") + weightDecay?: string; +} + +@doc("Model sweeping and hyperparameter tuning related settings.") +model NlpSweepSettings { + @doc("Type of early termination policy for the sweeping job.") + earlyTermination?: EarlyTerminationPolicy; + + @doc("[Required] Type of sampling algorithm.") + samplingAlgorithm: SamplingAlgorithmType; +} + +@doc(""" +Abstract class for NLP related AutoML tasks. +NLP - Natural Language Processing. +""") +model NlpVertical { + @doc("Featurization inputs needed for AutoML job.") + featurizationSettings?: NlpVerticalFeaturizationSettings; + + @doc("Model/training parameters that will remain constant throughout training.") + fixedParameters?: NlpFixedParameters; + + @doc("Execution constraints for AutoMLJob.") + limitSettings?: NlpVerticalLimitSettings; + + @doc("Search space for sampling different combinations of models and their hyperparameters.") + searchSpace?: NlpParameterSubspace[]; + + @doc("Settings for model sweeping and hyperparameter tuning.") + sweepSettings?: NlpSweepSettings; + + @doc("Validation data inputs.") + validationData?: MLTableJobInput; +} + +model NlpVerticalFeaturizationSettings extends FeaturizationSettings {} + +@doc("Job execution constraints.") +model NlpVerticalLimitSettings { + @doc("Maximum Concurrent AutoML iterations.") + maxConcurrentTrials?: int32; + + @doc("Maximum nodes to use for the experiment.") + maxNodes?: int32; + + @doc("Number of AutoML iterations.") + maxTrials?: int32; + + @doc("AutoML job timeout.") + timeout?: duration; + + @doc("Timeout for individual HD trials.") + trialTimeout?: duration; +} + +@doc("Empty/none datastore credentials.") +model NoneDatastoreCredentials extends DatastoreCredentials { + @doc("[Required] Credential type used to authentication with storage.") + credentialsType: "None"; +} + +model NumericalDataDriftMetricThreshold extends DataDriftMetricThresholdBase { + @doc("[Required] The numerical data drift metric to calculate.") + metric: NumericalDataDriftMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + dataType: "Numerical"; +} + +model NumericalDataQualityMetricThreshold + extends DataQualityMetricThresholdBase { + @doc("[Required] The numerical data quality metric to calculate.") + @visibility("read", "create") + metric: NumericalDataQualityMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + dataType: "Numerical"; +} + +model NumericalPredictionDriftMetricThreshold + extends PredictionDriftMetricThresholdBase { + @doc("[Required] The numerical prediction drift metric to calculate.") + @visibility("read", "create") + metric: NumericalPredictionDriftMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + dataType: "Numerical"; +} + +@doc("Optimization objective.") +model Objective { + @doc("[Required] Defines supported metric goals for hyperparameter tuning") + goal: Goal; + + @doc("[Required] Name of the metric to optimize.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + primaryMetric: string; +} + +@doc("OneLake (Trident) datastore configuration.") +model OneLakeDatastore extends Datastore { + @doc("[Required] OneLake artifact backing the datastore.") + @visibility("read", "create") + artifact: OneLakeArtifact; + + @doc("OneLake endpoint to use for the datastore.") + @visibility("read", "create") + endpoint?: string; + + @doc("[Required] OneLake workspace name.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + oneLakeWorkspaceName: string; + + @doc("Indicates which identity to use to authenticate service data access to customer's storage.") + @visibility("read", "create") + serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; + + @doc("[Required] Storage type backing the datastore.") + datastoreType: "OneLake"; +} + +@doc("Reference to an asset via its path in a job output.") +model OutputPathAssetReference extends AssetReferenceBase { + @doc("ARM resource ID of the job.") + jobId?: string; + + @doc("The path of the file/directory in the job output.") + path?: string; + + @doc("[Required] Specifies the type of asset reference.") + referenceType: "OutputPath"; +} + +@doc("Package input path specified with a resource id.") +model PackageInputPathId extends PackageInputPathBase { + @doc("Input resource id.") + resourceId?: string; + + @doc("[Required] Input path type for package inputs.") + inputPathType: "PathId"; +} + +@doc("Package input path specified as an url.") +model PackageInputPathUrl extends PackageInputPathBase { + @doc("Input path url.") + url?: string; + + @doc("[Required] Input path type for package inputs.") + inputPathType: "Url"; +} + +@doc("Package input path specified with name and version.") +model PackageInputPathVersion extends PackageInputPathBase { + @doc("Input resource name.") + resourceName?: string; + + @doc("Input resource version.") + resourceVersion?: string; + + @doc("[Required] Input path type for package inputs.") + inputPathType: "PathVersion"; +} + +@doc("Pipeline Job definition: defines generic to MFE attributes.") +model PipelineJob extends JobBase { + @doc("Inputs for the pipeline job.") + @visibility("read", "create") + inputs?: Record; + + @doc("Jobs construct the Pipeline Job.") + @visibility("read", "create") + jobs?: Record>; + + @doc("Outputs for the pipeline job") + @visibility("read", "create") + outputs?: Record; + + @doc("Pipeline settings, for things like ContinueRunOnStepFailure etc.") + @visibility("read", "create") + settings?: Record; + + @doc("ARM resource ID of source job.") + @visibility("read", "create") + sourceJobId?: string; + + @doc("[Required] Specifies the type of job.") + jobType: "Pipeline"; +} + +model PredictionDriftMonitoringSignal extends MonitoringSignalBase { + @doc("[Required] A list of metrics to calculate and their associated thresholds.") + @visibility("read", "create") + metricThresholds: PredictionDriftMetricThresholdBase[]; + + @doc("[Required] The type of the model monitored.") + @visibility("read", "create") + modelType: MonitoringModelType; + + @doc("[Required] The data which drift will be calculated for.") + @visibility("read", "create") + productionData: MonitoringInputDataBase; + + @doc("[Required] The data to calculate drift against.") + @visibility("read", "create") + referenceData: MonitoringInputDataBase; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "PredictionDrift"; +} + +@doc("PyTorch distribution configuration.") +model PyTorch extends DistributionConfiguration { + @doc("Number of processes per node.") + processCountPerInstance?: int32; + + @doc("[Required] Specifies the type of distribution framework.") + distributionType: "PyTorch"; +} + +@doc("Defines a Sampling Algorithm that generates values randomly") +model RandomSamplingAlgorithm extends SamplingAlgorithm { + @doc("An optional positive number or e in string format to be used as base for log based random sampling") + logbase?: string; + + @doc("The specific type of random algorithm") + rule?: RandomSamplingAlgorithmRule; + + @doc("An optional integer to use as the seed for random number generation") + seed?: int32; + + @doc("[Required] The algorithm used for generating hyperparameter values, along with configuration properties") + samplingAlgorithmType: "Random"; +} + +@doc("Ray distribution configuration.") +model Ray extends DistributionConfiguration { + @doc("The address of Ray head node.") + address?: string; + + @doc("The port to bind the dashboard server to.") + dashboardPort?: int32; + + @doc("Additional arguments passed to ray start in head node.") + headNodeAdditionalArgs?: string; + + @doc("Provide this argument to start the Ray dashboard GUI.") + includeDashboard?: boolean; + + @doc("The port of the head ray process.") + port?: int32; + + @doc("Additional arguments passed to ray start in worker node.") + workerNodeAdditionalArgs?: string; + + @doc("[Required] Specifies the type of distribution framework.") + distributionType: "Ray"; +} + +@doc("Regression task in AutoML Table vertical.") +model Regression extends AutoMLVertical { + ...TableVertical; + + @doc("Primary metric for regression task.") + primaryMetric?: RegressionPrimaryMetrics; + + @doc("Inputs for training phase for an AutoML Job.") + trainingSettings?: RegressionTrainingSettings; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "Regression"; +} + +@doc("Regression Training related configuration.") +model RegressionTrainingSettings extends TrainingSettings { + @doc("Allowed models for regression task.") + allowedTrainingAlgorithms?: RegressionModels[]; + + @doc("Blocked models for regression task.") + blockedTrainingAlgorithms?: RegressionModels[]; +} + +model RegressionModelPerformanceMetricThreshold + extends ModelPerformanceMetricThresholdBase { + @doc("[Required] The regression model performance metric to calculate.") + @visibility("read", "create") + metric: RegressionModelPerformanceMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + modelType: "Regression"; +} + +model SASCredentialDto extends PendingUploadCredentialDto { + @doc("Full SAS Uri, including the storage, container/blob path and SAS token") + sasUri?: string; + + @doc("[Required] Credential type used to authentication with storage.") + credentialType: "SAS"; +} + +@doc("SAS datastore credentials configuration.") +model SasDatastoreCredentials extends DatastoreCredentials { + @doc("[Required] Storage container secrets.") + @visibility("create", "update") + secrets: SasDatastoreSecrets; + + @doc("[Required] Credential type used to authentication with storage.") + credentialsType: "Sas"; +} + +@doc("Datastore SAS secrets.") +model SasDatastoreSecrets extends DatastoreSecrets { + @doc("Storage container SAS token.") + sasToken?: string; + + @doc("[Required] Credential type used to authentication with storage.") + secretsType: "Sas"; +} + +@doc("Service Principal datastore credentials configuration.") +model ServicePrincipalDatastoreCredentials extends DatastoreCredentials { + @doc("Authority URL used for authentication.") + authorityUrl?: string; + + @doc("[Required] Service principal client ID.") + clientId: string; + + @doc("Resource the service principal has access to.") + resourceUrl?: string; + + @doc("[Required] Service principal secrets.") + @visibility("create", "update") + secrets: ServicePrincipalDatastoreSecrets; + + @doc("[Required] ID of the tenant to which the service principal belongs.") + tenantId: string; + + @doc("[Required] Credential type used to authentication with storage.") + credentialsType: "ServicePrincipal"; +} + +@doc("Datastore Service Principal secrets.") +model ServicePrincipalDatastoreSecrets extends DatastoreSecrets { + @doc("Service principal secret.") + clientSecret?: string; + + @doc("[Required] Credential type used to authentication with storage.") + secretsType: "ServicePrincipal"; +} + +@doc("Spark job definition.") +model SparkJob extends JobBase { + @doc("Archive files used in the job.") + @visibility("read", "create") + archives?: string[]; + + @doc("Arguments for the job.") + @visibility("read", "create") + args?: string; + + @doc("[Required] ARM resource ID of the code asset.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + codeId: string; + + @doc("Spark configured properties.") + @visibility("read", "create") + conf?: Record; + + @doc("[Required] The entry to execute on startup of the job.") + @visibility("read", "create") + entry: SparkJobEntry; + + @doc("The ARM resource ID of the Environment specification for the job.") + @visibility("read", "create") + environmentId?: string; + + @doc("Files used in the job.") + @visibility("read", "create") + files?: string[]; + + @doc("Mapping of input data bindings used in the job.") + @visibility("read", "create") + inputs?: Record; + + @doc("Jar files used in the job.") + @visibility("read", "create") + jars?: string[]; + + @doc("Mapping of output data bindings used in the job.") + @visibility("read", "create") + outputs?: Record; + + @doc("Python files used in the job.") + @visibility("read", "create") + pyFiles?: string[]; + + @doc("Queue settings for the job") + @visibility("read", "create") + queueSettings?: QueueSettings; + + @doc("Compute Resource configuration for the job.") + @visibility("read", "create") + resources?: SparkResourceConfiguration; + + @doc("[Required] Specifies the type of job.") + jobType: "Spark"; +} + +@doc("Spark job entry point definition.") +@discriminator("sparkJobEntryType") +model SparkJobEntry {} + +model SparkResourceConfiguration { + @doc("Optional type of VM used as supported by the compute target.") + @visibility("read", "create") + instanceType?: string; + + @doc("Version of spark runtime used for the job.") + @visibility("read", "create") + runtimeVersion?: string; +} + +model SparkJobPythonEntry extends SparkJobEntry { + @doc("[Required] Relative python file path for job entry point.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + file: string; + + @doc("[Required] Type of the job's entry point.") + sparkJobEntryType: "SparkJobPythonEntry"; +} + +model SparkJobScalaEntry extends SparkJobEntry { + @doc("[Required] Scala class name used as entry point.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + className: string; + + @doc("[Required] Type of the job's entry point.") + sparkJobEntryType: "SparkJobScalaEntry"; +} + +@doc("Static input data definition.") +model StaticInputData extends MonitoringInputDataBase { + @doc("The ARM resource ID of the component resource used to preprocess the data.") + @visibility("read", "create") + preprocessingComponentId?: string; + + @doc("[Required] The end date of the data window.") + @visibility("read", "create") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + windowEnd: utcDateTime; + + @doc("[Required] The start date of the data window.") + @visibility("read", "create") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + windowStart: utcDateTime; + + @doc("[Required] Specifies the type of signal to monitor.") + inputDataType: "Static"; +} + +@doc("Sweep job definition.") +model SweepJob extends JobBase { + @doc("Early termination policies enable canceling poor-performing runs before they complete") + earlyTermination?: EarlyTerminationPolicy; + + @doc("Mapping of input data bindings used in the job.") + @visibility("read", "create") + inputs?: Record; + + @doc("Sweep Job limit.") + @visibility("read", "create") + limits?: SweepJobLimits; + + @doc("[Required] Optimization objective.") + objective: Objective; + + @doc("Mapping of output data bindings used in the job.") + @visibility("read", "create") + outputs?: Record; + + @doc("Queue settings for the job") + @visibility("read", "create") + queueSettings?: QueueSettings; + + @doc("[Required] The hyperparameter sampling algorithm") + samplingAlgorithm: SamplingAlgorithm; + + @doc("[Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter") + searchSpace: Record; + + @doc("[Required] Trial component definition.") + trial: TrialComponent; + + @doc("[Required] Specifies the type of job.") + jobType: "Sweep"; +} + +@doc("Sweep Job limit class.") +model SweepJobLimits extends JobLimits { + @doc("Sweep Job max concurrent trials.") + maxConcurrentTrials?: int32; + + @doc("Sweep Job max total trials.") + maxTotalTrials?: int32; + + @doc("Sweep Job Trial timeout value.") + trialTimeout?: duration; + + @doc("[Required] JobLimit type.") + jobLimitsType: "Sweep"; +} + +@doc("Trial component definition.") +model TrialComponent { + @doc("ARM resource ID of the code asset.") + @visibility("read", "create") + codeId?: string; + + @doc("[Required] The command to execute on startup of the job. eg. \"python train.py\"") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + command: string; + + @doc("Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.") + @visibility("read", "create") + distribution?: DistributionConfiguration; + + @doc("[Required] The ARM resource ID of the Environment specification for the job.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + environmentId: string; + + @doc("Environment variables included in the job.") + @visibility("read", "create") + environmentVariables?: Record; + + @doc("Compute Resource configuration for the job.") + @visibility("read", "create") + resources?: JobResourceConfiguration; +} + +model TargetUtilizationScaleSettings extends OnlineScaleSettings { + @doc("The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances.") + maxInstances?: int32; + + @doc("The minimum number of instances to always be present.") + minInstances?: int32; + + @doc("The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds.") + pollingInterval?: duration; + + @doc("Target CPU usage for the autoscaler.") + targetUtilizationPercentage?: int32; + + @doc("[Required] Type of deployment scaling algorithm") + scaleType: "TargetUtilization"; +} + +@doc("TensorFlow distribution configuration.") +model TensorFlow extends DistributionConfiguration { + @doc("Number of parameter server tasks.") + @visibility("read", "create") + parameterServerCount?: int32; + + @doc("Number of workers. If not specified, will default to the instance count.") + @visibility("read", "create") + workerCount?: int32; + + @doc("[Required] Specifies the type of distribution framework.") + distributionType: "TensorFlow"; +} + +@doc(""" +Text Classification task in AutoML NLP vertical. +NLP - Natural Language Processing. +""") +model TextClassification extends AutoMLVertical { + ...NlpVertical; + + @doc("Primary metric for Text-Classification task.") + primaryMetric?: ClassificationPrimaryMetrics; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "TextClassification"; +} + +@doc(""" +Text Classification Multilabel task in AutoML NLP vertical. +NLP - Natural Language Processing. +""") +model TextClassificationMultilabel extends AutoMLVertical { + ...NlpVertical; + + @doc(""" +Primary metric for Text-Classification-Multilabel task. +Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. +""") + @visibility("read") + primaryMetric?: ClassificationMultilabelPrimaryMetrics; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "TextClassificationMultilabel"; +} + +@doc(""" +Text-NER task in AutoML NLP vertical. +NER - Named Entity Recognition. +NLP - Natural Language Processing. +""") +model TextNer extends AutoMLVertical { + ...NlpVertical; + + @doc(""" +Primary metric for Text-NER task. +Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. +""") + @visibility("read") + primaryMetric?: ClassificationPrimaryMetrics; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "TextNER"; +} + +model TopNFeaturesByAttribution extends MonitoringFeatureFilterBase { + @doc("The number of top features to include.") + @visibility("read", "create") + top?: int32; + + @doc("[Required] Specifies the feature filter to leverage when selecting features to calculate metrics over.") + filterType: "TopNByAttribution"; +} + +@doc("Trailing input data definition.") +model TrailingInputData extends MonitoringInputDataBase { + @doc("The ARM resource ID of the component resource used to preprocess the data.") + @visibility("read", "create") + preprocessingComponentId?: string; + + @doc("[Required] The time offset between the end of the data window and the monitor's current run time.") + @visibility("read", "create") + windowOffset: duration; + + @doc("[Required] The size of the trailing data window.") + @visibility("read", "create") + windowSize: duration; + + @doc("[Required] Specifies the type of signal to monitor.") + inputDataType: "Trailing"; +} + +@doc("Triton inferencing server configurations.") +model TritonInferencingServer extends InferencingServer { + @doc("Inference configuration for Triton.") + inferenceConfiguration?: OnlineInferenceConfiguration; + + @doc("[Required] Inferencing server type for various targets.") + serverType: "Triton"; +} + +model TritonModelJobInput extends JobInput { + ...AssetJobInput; + + @doc("[Required] Specifies the type of job.") + jobInputType: "triton_model"; +} + +model TritonModelJobOutput extends JobOutput { + ...AssetJobOutput; + + @doc("[Required] Specifies the type of job.") + jobOutputType: "triton_model"; +} + +@doc("Defines an early termination policy that cancels a given percentage of runs at each evaluation interval.") +model TruncationSelectionPolicy extends EarlyTerminationPolicy { + @doc("The percentage of runs to cancel at each evaluation interval.") + truncationPercentage?: int32; + + @doc("[Required] Name of policy configuration") + policyType: "TruncationSelection"; +} + +@doc("uri-file data version entity") +model UriFileDataVersion extends DataVersionBase { + @doc("[Required] Specifies the type of data.") + dataType: "uri_file"; +} + +model UriFileJobInput extends JobInput { + ...AssetJobInput; + + @doc("[Required] Specifies the type of job.") + jobInputType: "uri_file"; +} + +model UriFileJobOutput extends JobOutput { + ...AssetJobOutput; + + @doc("[Required] Specifies the type of job.") + jobOutputType: "uri_file"; +} + +@doc("uri-folder data version entity") +model UriFolderDataVersion extends DataVersionBase { + @doc("[Required] Specifies the type of data.") + dataType: "uri_folder"; +} + +model UriFolderJobInput extends JobInput { + ...AssetJobInput; + + @doc("[Required] Specifies the type of job.") + jobInputType: "uri_folder"; +} + +model UriFolderJobOutput extends JobOutput { + ...AssetJobOutput; + + @doc("[Required] Specifies the type of job.") + jobOutputType: "uri_folder"; +} + +@doc("User identity configuration.") +model UserIdentity extends IdentityConfiguration { + @doc("[Required] Specifies the type of identity framework.") + identityType: "UserIdentity"; +} + +model AccessKeyAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionAccessKey; + + @doc("Authentication type of the connection target") + authType: "AccessKey"; +} + +model WorkspaceConnectionAccessKey { + accessKeyId?: string; + secretAccessKey?: string; +} + +@doc(""" +This connection type covers the generic ApiKey auth connection categories, for examples: +AzureOpenAI: + Category:= AzureOpenAI + AuthType:= ApiKey (as type discriminator) + Credentials:= {ApiKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + Target:= {ApiBase} + +CognitiveService: + Category:= CognitiveService + AuthType:= ApiKey (as type discriminator) + Credentials:= {SubscriptionKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + Target:= ServiceRegion={serviceRegion} + +CognitiveSearch: + Category:= CognitiveSearch + AuthType:= ApiKey (as type discriminator) + Credentials:= {Key} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + Target:= {Endpoint} + +Use Metadata property bag for ApiType, ApiVersion, Kind and other metadata fields +""") +model ApiKeyAuthWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + @doc("Api key object for workspace connection credential.") + credentials?: WorkspaceConnectionApiKey; + + @doc("Authentication type of the connection target") + authType: "ApiKey"; +} + +@doc("Api key object for workspace connection credential.") +model WorkspaceConnectionApiKey { + key?: string; +} + +@doc("Custom Keys credential object") +model CustomKeys { + @doc("Dictionary of ") + keys?: Record; +} + +@doc(""" +Category:= CustomKeys +AuthType:= CustomKeys (as type discriminator) +Credentials:= {CustomKeys} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.CustomKeys +Target:= {any value} +Use Metadata property bag for ApiVersion and other metadata fields +""") +model CustomKeysWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + @doc("Custom Keys credential object") + credentials?: CustomKeys; + + @doc("Authentication type of the connection target") + authType: "CustomKeys"; +} + +@doc("FQDN Outbound Rule for the managed network of a machine learning workspace.") +model FqdnOutboundRule extends OutboundRule { + destination?: string; + + @doc("Type of a managed network Outbound Rule of a machine learning workspace.") + type: "FQDN"; +} + +model ManagedIdentityAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionManagedIdentity; + + @doc("Authentication type of the connection target") + authType: "ManagedIdentity"; +} + +model WorkspaceConnectionManagedIdentity { + clientId?: string; + resourceId?: string; +} + +model NoneAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + @doc("Authentication type of the connection target") + authType: "None"; +} + +model PATAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionPersonalAccessToken; + + @doc("Authentication type of the connection target") + authType: "PAT"; +} + +model WorkspaceConnectionPersonalAccessToken { + pat?: string; +} + +@doc("Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace.") +model PrivateEndpointDestination { + serviceResourceId?: string; + sparkEnabled?: boolean; + + @doc("Type of a managed network Outbound Rule of a machine learning workspace.") + sparkStatus?: RuleStatus; + + subresourceTarget?: string; +} + +@doc("Private Endpoint Outbound Rule for the managed network of a machine learning workspace.") +model PrivateEndpointOutboundRule extends OutboundRule { + @doc("Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace.") + destination?: PrivateEndpointDestination; + + @doc("Type of a managed network Outbound Rule of a machine learning workspace.") + type: "PrivateEndpoint"; +} + +model SASAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionSharedAccessSignature; + + @doc("Authentication type of the connection target") + authType: "SAS"; +} + +model WorkspaceConnectionSharedAccessSignature { + sas?: string; +} + +model ServicePrincipalAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionServicePrincipal; + + @doc("Authentication type of the connection target") + authType: "ServicePrincipal"; +} + +model WorkspaceConnectionServicePrincipal { + clientId?: string; + clientSecret?: string; + tenantId?: string; +} + +@doc("Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace.") +model ServiceTagDestination { + @doc("The action enum for networking rule.") + action?: RuleAction; + + @doc("Optional, if provided, the ServiceTag property will be ignored.") + @visibility("read") + addressPrefixes?: string[]; + + portRanges?: string; + protocol?: string; + serviceTag?: string; +} + +@doc("Service Tag Outbound Rule for the managed network of a machine learning workspace.") +model ServiceTagOutboundRule extends OutboundRule { + @doc("Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace.") + destination?: ServiceTagDestination; + + @doc("Type of a managed network Outbound Rule of a machine learning workspace.") + type: "ServiceTag"; +} + +model UsernamePasswordAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionUsernamePassword; + + @doc("Authentication type of the connection target") + authType: "UsernamePassword"; +} + +model WorkspaceConnectionUsernamePassword { + password?: string; + username?: string; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp new file mode 100644 index 0000000000..ebf4ed1742 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp @@ -0,0 +1,1608 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning; + +interface UsagesOperations { + @doc("Gets the current usage information as well as limits for AML resources for given subscription and location.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The location for which resource usage is queried.") + @pattern("^[-\\w\\._]+$") + @path + location: string; + }, + ListUsagesResult + >; +} + +interface VirtualMachineSizesOperations { + @doc("Returns supported VM Sizes in a location") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The location upon which virtual-machine-sizes is queried.") + @pattern("^[-\\w\\._]+$") + @path + location: string; + + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + }, + VirtualMachineSizeListResult + >; +} + +interface QuotasOperations { + @doc("Update quota for each VM family in workspace.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas") + @post + Update is Azure.Core.Foundations.Operation< + { + @doc("The location for update quota is queried.") + @pattern("^[-\\w\\._]+$") + @path + location: string; + + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("Quota update parameters.") + @body + parameters: QuotaUpdateParameters; + }, + UpdateWorkspaceQuotasResult + >; + + @doc("Gets the currently assigned Workspace Quotas based on VMFamily.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The location for which resource usage is queried.") + @pattern("^[-\\w\\._]+$") + @path + location: string; + }, + ListWorkspaceQuotas + >; +} + +interface CodeContainersOperations { + @summary("List containers.") + @doc("List containers.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + }, + ResourceListResult + >; + + @summary("Delete container.") + @doc("Delete container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + }, + void + >; + + @summary("Get container.") + @doc("Get container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + }, + CodeContainerResource + >; + + @summary("Create or update container.") + @doc("Create or update container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Container entity to create or update.") + @body + body: CodeContainerResource; + }, + CodeContainerResource + >; +} + +interface CodeVersionsOperations { + @summary("List versions.") + @doc("List versions.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("If specified, return CodeVersion assets with specified content hash value, regardless of name") + @query("hash") + hash?: string; + + @doc("Hash algorithm version when listing by hash") + @query("hashVersion") + hashVersion?: string; + }, + ResourceListResult + >; + + @summary("Delete version.") + @doc("Delete version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + }, + void + >; + + @summary("Get version.") + @doc("Get version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + }, + CodeVersionResource + >; + + @summary("Create or update version.") + @doc("Create or update version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + + @doc("Version entity to create or update.") + @body + body: CodeVersionResource; + }, + CodeVersionResource + >; + + @summary("Generate a storage location and credential for the client to upload a code asset to.") + @doc("Generate a storage location and credential for the client to upload a code asset to.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/startPendingUpload") + @post + CreateOrGetStartPendingUpload is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + + @doc("Pending upload request object") + @body + body: PendingUploadRequestDto; + }, + PendingUploadResponseDto + >; +} + +interface ComponentContainersOperations { + @summary("List component containers.") + @doc("List component containers.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + }, + ResourceListResult + >; + + @summary("Delete container.") + @doc("Delete container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + }, + void + >; + + @summary("Get container.") + @doc("Get container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + }, + ComponentContainerResource + >; + + @summary("Create or update container.") + @doc("Create or update container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Container entity to create or update.") + @body + body: ComponentContainerResource; + }, + ComponentContainerResource + >; +} + +interface ComponentVersionsOperations { + @summary("List component versions.") + @doc("List component versions.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Component name.") + @path + name: string; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("Component stage.") + @query("stage") + stage?: string; + }, + ResourceListResult + >; + + @summary("Delete version.") + @doc("Delete version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + + @doc("Version identifier.") + @path + version: string; + }, + void + >; + + @summary("Get version.") + @doc("Get version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + + @doc("Version identifier.") + @path + version: string; + }, + ComponentVersionResource + >; + + @summary("Create or update version.") + @doc("Create or update version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Version identifier.") + @path + version: string; + + @doc("Version entity to create or update.") + @body + body: ComponentVersionResource; + }, + ComponentVersionResource + >; +} + +interface DataContainersOperations { + @summary("List data containers.") + @doc("List data containers.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + }, + ResourceListResult + >; + + @summary("Delete container.") + @doc("Delete container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + }, + void + >; + + @summary("Get container.") + @doc("Get container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + }, + DataContainerResource + >; + + @summary("Create or update container.") + @doc("Create or update container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Container entity to create or update.") + @body + body: DataContainerResource; + }, + DataContainerResource + >; +} + +interface DataVersionsOperations { + @summary("List data versions in the data container") + @doc("List data versions in the data container") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Data container's name") + @path + name: string; + + @doc("Please choose OrderBy value from ['createdtime', 'modifiedtime']") + @query("$orderBy") + $orderBy?: string; + + @doc(""" +Top count of results, top count cannot be greater than the page size. + If topCount > page size, results with be default page size count will be returned +""") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("$tags") + $tags?: string; + + @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("data stage") + @query("stage") + stage?: string; + }, + ResourceListResult + >; + + @summary("Delete version.") + @doc("Delete version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + + @doc("Version identifier.") + @path + version: string; + }, + void + >; + + @summary("Get version.") + @doc("Get version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + + @doc("Version identifier.") + @path + version: string; + }, + DataVersionBaseResource + >; + + @summary("Create or update version.") + @doc("Create or update version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Version identifier.") + @path + version: string; + + @doc("Version entity to create or update.") + @body + body: DataVersionBaseResource; + }, + DataVersionBaseResource + >; +} + +interface EnvironmentContainersOperations { + @summary("List environment containers.") + @doc("List environment containers.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + }, + ResourceListResult + >; + + @summary("Delete container.") + @doc("Delete container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + }, + void + >; + + @summary("Get container.") + @doc("Get container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + }, + EnvironmentContainerResource + >; + + @summary("Create or update container.") + @doc("Create or update container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Container entity to create or update.") + @body + body: EnvironmentContainerResource; + }, + EnvironmentContainerResource + >; +} + +interface EnvironmentVersionsOperations { + @summary("List versions.") + @doc("List versions.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("Stage for including/excluding (for example) archived entities. Takes priority over listViewType") + @query("stage") + stage?: string; + }, + ResourceListResult + >; + + @summary("Delete version.") + @doc("Delete version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + }, + void + >; + + @summary("Get version.") + @doc("Get version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + }, + EnvironmentVersionResource + >; + + @summary("Creates or updates an EnvironmentVersion.") + @doc("Creates or updates an EnvironmentVersion.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Name of EnvironmentVersion. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Version of EnvironmentVersion.") + @path + version: string; + + @doc("Definition of EnvironmentVersion.") + @body + body: EnvironmentVersionResource; + }, + EnvironmentVersionResource + >; +} + +interface ModelContainersOperations { + @summary("List model containers.") + @doc("List model containers.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Maximum number of results to return.") + @query("count") + count?: int32; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + }, + ResourceListResult + >; + + @summary("Delete container.") + @doc("Delete container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + }, + void + >; + + @summary("Get container.") + @doc("Get container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + }, + ModelContainerResource + >; + + @summary("Create or update container.") + @doc("Create or update container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Container entity to create or update.") + @body + body: ModelContainerResource; + }, + ModelContainerResource + >; +} + +interface ModelVersionsOperations { + @summary("List model versions.") + @doc("List model versions.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Model name. This is case-sensitive.") + @path + name: string; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Model version.") + @query("version") + version?: string; + + @doc("Model description.") + @query("description") + description?: string; + + @doc("Number of initial results to skip.") + @query("offset") + offset?: int32; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("tags") + tags?: string; + + @doc("Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2") + @query("properties") + properties?: string; + + @doc("Name of the feed.") + @query("feed") + feed?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("Model stage") + @query("stage") + stage?: string; + }, + ResourceListResult + >; + + @summary("Delete version.") + @doc("Delete version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + }, + void + >; + + @summary("Get version.") + @doc("Get version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + }, + ModelVersionResource + >; + + @summary("Create or update version.") + @doc("Create or update version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + + @doc("Version entity to create or update.") + @body + body: ModelVersionResource; + }, + ModelVersionResource + >; + + @summary("Model Version Package operation.") + @doc("Model Version Package operation.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/package") + @post + Package is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + + @doc("Package operation request body.") + @body + body: PackageRequest; + }, + PackageResponse | void + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..691f3c1b0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp index 759eed6348..1c93686250 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.NetworkAnalytics; @doc("The data product resource.") @@ -27,39 +29,62 @@ model DataProduct is TrackedResource { interface DataProducts { @doc("Retrieve data product resource.") get is ArmResourceRead; + @doc("Create data product resource.") - create is ArmResourceCreateOrUpdateAsync; + create is ArmResourceCreateOrUpdateAsync< + DataProduct, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update data product resource.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync< + DataProduct, + DataProductUpdate, + BaseParameters, + ArmLroLocationHeader + >; + @doc("Delete data product resource.") - delete is ArmResourceDeleteWithoutOkAsync; + delete is ArmResourceDeleteWithoutOkAsync< + DataProduct, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List data products by resource group.") listByResourceGroup is ArmResourceListByParent; + @doc("List data products by subscription.") listBySubscription is ArmListBySubscription; + @doc("Assign role to the data product.") addUserRole is ArmResourceActionSync< DataProduct, RoleAssignmentCommonProperties, RoleAssignmentDetail >; + @doc("Generate sas token for storage account.") generateStorageAccountSasToken is ArmResourceActionSync< DataProduct, AccountSas, AccountSasToken >; + @doc("List user roles associated with the data product.") listRolesAssignments is ArmResourceActionSync< DataProduct, Record, ListRoleAssignments >; + @doc("Remove role from the data product.") removeUserRole is ArmResourceActionNoContentSync< DataProduct, RoleAssignmentDetail >; + @doc("Initiate key rotation on Data Product.") rotateKey is ArmResourceActionNoContentSync; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp index 6226f421a8..7759d93cbb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,12 +8,13 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.NetworkAnalytics; @doc("The data catalog resource.") @singleton("default") model DataProductsCatalog is ProxyResource { - @key("default") + @key("dataProductsCatalog") @segment("dataProductsCatalogs") name: string; } @@ -21,8 +23,10 @@ model DataProductsCatalog is ProxyResource { interface DataProductsCatalogs { @doc("Retrieve data type resource.") get is ArmResourceRead; + @doc("List data catalog by subscription.") listBySubscription is ArmListBySubscription; + @doc("List data catalog by resource group.") listByResourceGroup is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp index 22401df7ef..a861e80f76 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DataProduct.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.NetworkAnalytics; @doc("The data type resource.") @@ -27,19 +29,40 @@ model DataType is ProxyResource { interface DataTypes { @doc("Retrieve data type resource.") get is ArmResourceRead; + @doc("Create data type resource.") - create is ArmResourceCreateOrUpdateAsync; + create is ArmResourceCreateOrUpdateAsync< + DataType, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update data type resource.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync< + DataType, + DataTypeUpdate, + BaseParameters, + ArmLroLocationHeader + >; + @doc("Delete data type resource.") - delete is ArmResourceDeleteWithoutOkAsync; + delete is ArmResourceDeleteWithoutOkAsync< + DataType, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List data type by parent resource.") listByDataProduct is ArmResourceListByParent; + @doc("Delete data for data type.") deleteData is ArmResourceActionNoResponseContentAsync< DataType, - Record + Record, + BaseParameters, + ArmLroLocationHeader >; + @doc("Generate sas token for storage container.") generateStorageContainerSasToken is ArmResourceActionSync< DataType, diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGen.json new file mode 100644 index 0000000000..f19498286d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGen.json @@ -0,0 +1,45 @@ +{ + "operationId": "DataProductsCatalogs_Get", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_Get_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.NetworkAnalytics/dataProductsCatalogs", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", + "properties": { + "provisioningState": "Succeeded", + "publishers": [ + { + "dataProducts": [ + { + "description": "Official data product for Mobile Content Cloud.", + "dataProductName": "MCC", + "dataProductVersions": [ + { + "version": "1.0.0" + } + ] + } + ], + "publisherName": "Microsoft" + } + ] + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..7ecf733626 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,16 @@ +{ + "operationId": "DataProductsCatalogs_Get", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMaximumSetGen.json new file mode 100644 index 0000000000..02e8bd1673 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMaximumSetGen.json @@ -0,0 +1,50 @@ +{ + "operationId": "DataProductsCatalogs_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "default", + "type": "Microsoft.NetworkAnalytics/dataProductsCatalogs", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", + "properties": { + "provisioningState": "Succeeded", + "publishers": [ + { + "dataProducts": [ + { + "description": "Official data product for Mobile Content Cloud.", + "dataProductName": "MCC", + "dataProductVersions": [ + { + "version": "1.0.0" + } + ] + } + ], + "publisherName": "Microsoft" + } + ] + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMinimumSetGen.json new file mode 100644 index 0000000000..5c7486f6e4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "operationId": "DataProductsCatalogs_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMaximumSetGen.json new file mode 100644 index 0000000000..0003a9f385 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMaximumSetGen.json @@ -0,0 +1,49 @@ +{ + "operationId": "DataProductsCatalogs_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_ListBySubscription_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "default", + "type": "Microsoft.NetworkAnalytics/dataProductsCatalogs", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", + "properties": { + "provisioningState": "Succeeded", + "publishers": [ + { + "dataProducts": [ + { + "description": "Official data product for Mobile Content Cloud.", + "dataProductName": "MCC", + "dataProductVersions": [ + { + "version": "1.0.0" + } + ] + } + ], + "publisherName": "Microsoft" + } + ] + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMinimumSetGen.json new file mode 100644 index 0000000000..4c2b8e3fa1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "operationId": "DataProductsCatalogs_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_ListBySubscription_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGen.json new file mode 100644 index 0000000000..6926baacb1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGen.json @@ -0,0 +1,35 @@ +{ + "operationId": "DataProducts_AddUserRole", + "parameters": { + "api-version": "2023-11-15", + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_AddUserRole_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..32984a0046 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,35 @@ +{ + "operationId": "DataProducts_AddUserRole", + "parameters": { + "api-version": "2023-11-15", + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "userName" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "userName" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGen.json new file mode 100644 index 0000000000..f7b151ed00 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGen.json @@ -0,0 +1,252 @@ +{ + "operationId": "DataProducts_Create", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resource": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} + } + }, + "location": "eastus", + "properties": { + "consumptionEndpoints": {}, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + }, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Create_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + }, + "201": { + "body": { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + }, + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..2ea69e94ab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,38 @@ +{ + "operationId": "DataProducts_Create", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resource": { + "location": "eastus", + "properties": { + "majorVersion": "1.0.0", + "product": "MCC", + "publisher": "Microsoft" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + }, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + }, + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGen.json new file mode 100644 index 0000000000..f63b07ab43 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "operationId": "DataProducts_Delete", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Delete_MaximumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..4248e15d2d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "operationId": "DataProducts_Delete", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGen.json new file mode 100644 index 0000000000..52130bf9a7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGen.json @@ -0,0 +1,22 @@ +{ + "operationId": "DataProducts_GenerateStorageAccountSasToken", + "parameters": { + "api-version": "2023-11-15", + "body": { + "expiryTimeStamp": "2023-08-24T05:34:58.151Z", + "ipAddress": "1.1.1.1", + "startTimeStamp": "2023-08-24T05:34:58.151Z" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "storageAccountSasToken": "storageAccountSasToken" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..39abd7936a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,22 @@ +{ + "operationId": "DataProducts_GenerateStorageAccountSasToken", + "parameters": { + "api-version": "2023-11-15", + "body": { + "expiryTimeStamp": "2023-08-24T05:35:17.051Z", + "ipAddress": "1.1.1.1", + "startTimeStamp": "2023-08-24T05:35:17.051Z" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "storageAccountSasToken": "storageAccountSasToken" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGen.json new file mode 100644 index 0000000000..3576486a01 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGen.json @@ -0,0 +1,102 @@ +{ + "operationId": "DataProducts_Get", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Get_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..1a0370845c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "operationId": "DataProducts_Get", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGen.json new file mode 100644 index 0000000000..20ac87c3a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGen.json @@ -0,0 +1,106 @@ +{ + "operationId": "DataProducts_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListByResourceGroup_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..f6c75a1f84 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,21 @@ +{ + "operationId": "DataProducts_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGen.json new file mode 100644 index 0000000000..c093d02db4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGen.json @@ -0,0 +1,105 @@ +{ + "operationId": "DataProducts_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListBySubscription_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetworkAnalytics/DataProducts?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..789767c921 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "operationId": "DataProducts_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGen.json new file mode 100644 index 0000000000..aa82e992e6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGen.json @@ -0,0 +1,31 @@ +{ + "operationId": "DataProducts_ListRolesAssignments", + "parameters": { + "api-version": "2023-11-15", + "body": {}, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListRolesAssignments_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "count": 1, + "roleAssignmentResponse": [ + { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..5f896b0f01 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,31 @@ +{ + "operationId": "DataProducts_ListRolesAssignments", + "parameters": { + "api-version": "2023-11-15", + "body": {}, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "count": 1, + "roleAssignmentResponse": [ + { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGen.json new file mode 100644 index 0000000000..4842556a31 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGen.json @@ -0,0 +1,24 @@ +{ + "operationId": "DataProducts_RemoveUserRole", + "parameters": { + "api-version": "2023-11-15", + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_RemoveUserRole_MaximumSet_Gen", + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..ec8a03137c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,24 @@ +{ + "operationId": "DataProducts_RemoveUserRole", + "parameters": { + "api-version": "2023-11-15", + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGen.json new file mode 100644 index 0000000000..c47672f0c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGen.json @@ -0,0 +1,16 @@ +{ + "operationId": "DataProducts_RotateKey", + "parameters": { + "api-version": "2023-11-15", + "body": { + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_RotateKey_MaximumSet_Gen", + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..cc85062d1d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,16 @@ +{ + "operationId": "DataProducts_RotateKey", + "parameters": { + "api-version": "2023-11-15", + "body": { + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGen.json new file mode 100644 index 0000000000..20fc36725c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGen.json @@ -0,0 +1,129 @@ +{ + "operationId": "DataProducts_Update", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "properties": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} + } + }, + "properties": { + "currentMinorVersion": "1.0.1", + "owners": [ + "abc@micros.com", + "def@micros.com" + ], + "privateLinksEnabled": "Disabled", + "purviewAccount": "testpurview", + "purviewCollection": "134567890" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + }, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Update_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com", + "def@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..ef1715d60f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "operationId": "DataProducts_Update", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "properties": {}, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "location": "jwlerdaudgxff" + } + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGen.json new file mode 100644 index 0000000000..12d0d18499 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGen.json @@ -0,0 +1,73 @@ +{ + "operationId": "DataTypes_Create", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resource": { + "properties": { + "databaseCacheRetention": 23, + "databaseRetention": 6, + "provisioningState": "Succeeded", + "state": "STARTED", + "storageOutputRetention": 27 + } + }, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Create_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "datatypeName", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "properties": { + "databaseCacheRetention": 23, + "databaseRetention": 6, + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "State Reason", + "storageOutputRetention": 27, + "visualizationUrl": "visualizationUrl" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + }, + "201": { + "body": { + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "properties": { + "databaseCacheRetention": 23, + "databaseRetention": 6, + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "State Reason", + "storageOutputRetention": 27, + "visualizationUrl": "visualizationUrl" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + }, + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..dc1ffed225 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "operationId": "DataTypes_Create", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resource": {}, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": {} + }, + "201": { + "body": {}, + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMaximumSetGen.json new file mode 100644 index 0000000000..11928e44f1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMaximumSetGen.json @@ -0,0 +1,20 @@ +{ + "operationId": "DataTypes_DeleteData", + "parameters": { + "api-version": "2023-11-15", + "body": {}, + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_DeleteData_MaximumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMinimumSetGen.json new file mode 100644 index 0000000000..f6ba6d7f3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "operationId": "DataTypes_DeleteData", + "parameters": { + "api-version": "2023-11-15", + "body": {}, + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_DeleteData_MinimumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGen.json new file mode 100644 index 0000000000..32ccacb328 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "operationId": "DataTypes_Delete", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Delete_MaximumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..aa28902546 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "operationId": "DataTypes_Delete", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGen.json new file mode 100644 index 0000000000..162c8ec470 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGen.json @@ -0,0 +1,23 @@ +{ + "operationId": "DataTypes_GenerateStorageContainerSasToken", + "parameters": { + "api-version": "2023-11-15", + "body": { + "expiryTimeStamp": "2023-08-24T05:34:58.039Z", + "ipAddress": "1.1.1.1", + "startTimeStamp": "2023-08-24T05:34:58.039Z" + }, + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "storageContainerSasToken": "storageContainerSasToken" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..05800b2f8b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "operationId": "DataTypes_GenerateStorageContainerSasToken", + "parameters": { + "api-version": "2023-11-15", + "body": { + "expiryTimeStamp": "2023-08-24T05:35:16.887Z", + "ipAddress": "1.1.1.1", + "startTimeStamp": "2023-08-24T05:35:16.887Z" + }, + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "storageContainerSasToken": "storageContainerSasToken" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGen.json new file mode 100644 index 0000000000..c420e2a626 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGen.json @@ -0,0 +1,37 @@ +{ + "operationId": "DataTypes_Get", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Get_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "properties": { + "databaseCacheRetention": 23, + "databaseRetention": 6, + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "state Reason", + "storageOutputRetention": 27, + "visualizationUrl": "visualizationUrl" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..92f277bda0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "operationId": "DataTypes_Get", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGen.json new file mode 100644 index 0000000000..8db6542baa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGen.json @@ -0,0 +1,41 @@ +{ + "operationId": "DataTypes_ListByDataProduct", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_ListByDataProduct_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01/dataTypes?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "properties": { + "databaseCacheRetention": 23, + "databaseRetention": 6, + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "state Reason", + "storageOutputRetention": 27, + "visualizationUrl": "visualizationUrl" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..2ead5d9ce9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,21 @@ +{ + "operationId": "DataTypes_ListByDataProduct", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGen.json new file mode 100644 index 0000000000..4dea0837f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGen.json @@ -0,0 +1,50 @@ +{ + "operationId": "DataTypes_Update", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "properties": { + "properties": { + "databaseCacheRetention": 16, + "databaseRetention": 9, + "state": "STARTED", + "storageOutputRetention": 30 + } + }, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Update_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "properties": { + "databaseCacheRetention": 16, + "databaseRetention": 9, + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "State Reason", + "storageOutputRetention": 30, + "visualizationUrl": "visualizationUrl" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..868a1de1ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,22 @@ +{ + "operationId": "DataTypes_Update", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "properties": {}, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": {} + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp index 0138b59aa4..0d5a7bfb66 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp @@ -26,5 +26,6 @@ namespace Microsoft.NetworkAnalytics; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-11-15 API version.") v2023_11_15: "2023-11-15", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp index a46998a192..000b481277 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp @@ -5,21 +5,25 @@ import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.NetworkAnalytics; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") enum Origin { user, system, `user,system`, } +@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") enum ActionType { Internal, } +@doc("The status of the current operation.") enum ProvisioningState { @doc("Represents a succeeded operation.") Succeeded, @doc("Represents a failed operation.") Failed, @@ -30,16 +34,19 @@ enum ProvisioningState { @doc("Represents an accepted operation.") Accepted, } +@doc("The data type state") enum ControlState { @doc("Field to enable a setting.") Enabled, @doc("Field to disable a setting.") Disabled, } +@doc("Specifies the default action of allow or deny when no other rules match.") enum DefaultAction { @doc("Represents allow action.") Allow, @doc("Represents deny action.") Deny, } +@doc("Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).") enum ManagedServiceIdentityType { None, SystemAssigned, @@ -47,6 +54,7 @@ enum ManagedServiceIdentityType { `SystemAssigned, UserAssigned`, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -54,6 +62,7 @@ enum CreatedByType { Key, } +@doc("The data type state") enum DataProductUserRole { @doc("Field to specify user of type Reader.") Reader, @doc(""" @@ -63,11 +72,13 @@ This user has privileged access to read sensitive data of a data product. SensitiveReader, } +@doc("The data type state") enum DataTypeState { @doc("Field to specify stopped state.") Stopped, @doc("Field to specify running state.") Running, } +@doc("Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, \"Logging, Metrics\"), or None to bypass none of those traffics.") enum Bypass { @doc("Represents no bypassing of traffic.") None, @doc("Represents bypassing logging traffic.") Logging, @@ -254,15 +265,23 @@ model ConsumptionEndpointsProperties { ]>; } -@doc("User assigned identity properties") -model UserAssignedIdentity { - @doc("The principal ID of the assigned identity.") +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") @visibility("read") - principalId?: string; + id?: string; - @doc("The client ID of the assigned identity.") + @doc("The name of the resource") @visibility("read") - clientId?: string; + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; } @doc("Details for data catalog properties.") @@ -302,6 +321,41 @@ model DataProductVersion { version: string; } +@doc("The type used for update operations of the DataProduct.") +model DataProductUpdate { + @doc("The managed service identities assigned to this resource.") + identity?: ManagedServiceIdentity; + + @doc("Resource tags.") + tags?: Record; + + @doc("The updatable properties of the DataProduct.") + properties?: DataProductUpdateProperties; +} + +@doc("The updatable properties of the DataProduct.") +model DataProductUpdateProperties { + @doc("List of name or email associated with data product resource deployment.") + @visibility("read", "create", "update") + owners?: string[]; + + @doc("Purview account url for data product to connect to.") + @visibility("read", "create", "update") + purviewAccount?: string; + + @doc("Purview collection url for data product to connect to.") + @visibility("read", "create", "update") + purviewCollection?: string; + + @doc("Flag to enable or disable private link for data product resource.") + @visibility("read", "create", "update") + privateLinksEnabled?: ControlState; + + @doc("Current configured minor version of the data product resource.") + @visibility("read", "update") + currentMinorVersion?: string; +} + @doc("The details for role assignment common properties.") model RoleAssignmentCommonProperties { @doc("Role Id of the Built-In Role") @@ -378,6 +432,31 @@ model DataTypeProperties { visualizationUrl?: string; } +@doc("The type used for update operations of the DataType.") +model DataTypeUpdate { + @doc("The updatable properties of the DataType.") + properties?: DataTypeUpdateProperties; +} + +@doc("The updatable properties of the DataType.") +model DataTypeUpdateProperties { + @doc("State of data type.") + @visibility("read", "create", "update") + state?: DataTypeState; + + @doc("Field for storage output retention in days.") + @visibility("read", "create", "update") + storageOutputRetention?: int32; + + @doc("Field for database cache retention in days.") + @visibility("read", "create", "update") + databaseCacheRetention?: int32; + + @doc("Field for database data retention in days.") + @visibility("read", "create", "update") + databaseRetention?: int32; +} + @doc("The details for container sas creation.") model ContainerSaS { @doc("Sas token start timestamp.") diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp index a2b505309a..11f78c415a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzurePlaywrightService; @doc("An account resource") @@ -25,14 +27,27 @@ model Account is TrackedResource { interface Accounts { @doc("Get a Account") get is ArmResourceRead; + @doc("Create a Account") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Account, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update a Account") - update is ArmResourcePatchSync; + update is ArmCustomPatchSync; + @doc("Delete a Account") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + Account, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List Account resources by resource group") listByResourceGroup is ArmResourceListByParent; + @doc("List Account resources by subscription ID") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp index 265c873d2b..8f28cf8d23 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzurePlaywrightService; @doc("A quota resource") @@ -23,6 +25,7 @@ model Quota is ProxyResource { interface Quotas { @doc("Get quota by name.") get is ArmResourceRead; + @doc("List quotas for a given subscription Id.") listBySubscription is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_CreateOrUpdate.json new file mode 100644 index 0000000000..0527cb1c82 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_CreateOrUpdate.json @@ -0,0 +1,76 @@ +{ + "operationId": "Accounts_CreateOrUpdate", + "parameters": { + "name": "myPlaywrightAccount", + "api-version": "2023-10-01-preview", + "resource": { + "location": "westus", + "properties": { + "regionalAffinity": "Enabled" + }, + "tags": { + "Team": "Dev Exp" + } + }, + "resourceGroupName": "dummyrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_CreateOrUpdate", + "responses": { + "200": { + "body": { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + } + }, + "201": { + "body": { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.PlaywrightTesting/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000/Spring/default?api-version=2023-06-01-preview" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Delete.json new file mode 100644 index 0000000000..5e69c18b42 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Delete.json @@ -0,0 +1,19 @@ +{ + "operationId": "Accounts_Delete", + "parameters": { + "name": "myPlaywrightAccount", + "api-version": "2023-10-01-preview", + "resourceGroupName": "dummyrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_Delete", + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.PlaywrightTesting/locations/eastus/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2023-06-01-preview" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Get.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Get.json new file mode 100644 index 0000000000..2ded0c48b1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Get.json @@ -0,0 +1,38 @@ +{ + "operationId": "Accounts_Get", + "parameters": { + "name": "myPlaywrightAccount", + "api-version": "2023-10-01-preview", + "resourceGroupName": "dummyrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_Get", + "responses": { + "200": { + "body": { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListByResourceGroup.json new file mode 100644 index 0000000000..7bfc80e402 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListByResourceGroup.json @@ -0,0 +1,41 @@ +{ + "operationId": "Accounts_ListByResourceGroup", + "parameters": { + "api-version": "2023-10-01-preview", + "resourceGroupName": "dummyrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_ListByResourceGroup", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListBySubscription.json new file mode 100644 index 0000000000..af33e2310b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListBySubscription.json @@ -0,0 +1,40 @@ +{ + "operationId": "Accounts_ListBySubscription", + "parameters": { + "api-version": "2023-10-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_ListBySubscription", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Update.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Update.json new file mode 100644 index 0000000000..0c2f290ae0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Update.json @@ -0,0 +1,47 @@ +{ + "operationId": "Accounts_Update", + "parameters": { + "name": "myPlaywrightAccount", + "api-version": "2023-10-01-preview", + "properties": { + "properties": { + "regionalAffinity": "Enabled" + }, + "tags": { + "Division": "LT", + "Team": "Dev Exp" + } + }, + "resourceGroupName": "dummyrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_Update", + "responses": { + "200": { + "body": { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_Get.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_Get.json new file mode 100644 index 0000000000..f4895fbab2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_Get.json @@ -0,0 +1,31 @@ +{ + "operationId": "Quotas_Get", + "parameters": { + "name": "ScalableExecution", + "api-version": "2023-10-01-preview", + "location": "eastus", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Quotas_Get", + "responses": { + "200": { + "body": { + "name": "ScalableExecution", + "type": "Microsoft.AzurePlaywrightService/Locations/Quotas", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzurePlaywrightService/locations/eastus/quotas/ScalableExecution", + "properties": { + "freeTrial": { + "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "allocatedValue": 0, + "createdAt": "2023-08-31T10:19:36.081Z", + "expiryAt": "2023-08-31T10:19:36.081Z", + "percentageUsed": 100, + "state": "Active", + "usedValue": 0 + }, + "provisioningState": "Succeeded" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_ListBySubscription.json new file mode 100644 index 0000000000..1b47a7e382 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_ListBySubscription.json @@ -0,0 +1,34 @@ +{ + "operationId": "Quotas_ListBySubscription", + "parameters": { + "api-version": "2023-10-01-preview", + "location": "eastus", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Quotas_ListBySubscription", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "ScalableExecution", + "type": "Microsoft.AzurePlaywrightService/Locations/Quotas", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzurePlaywrightService/locations/eastus/quotas/ScalableExecution", + "properties": { + "freeTrial": { + "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "allocatedValue": 0, + "createdAt": "2023-08-31T10:19:36.081Z", + "expiryAt": "2023-08-31T10:19:36.081Z", + "percentageUsed": 100, + "state": "Active", + "usedValue": 0 + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp index f12cab8719..5104445bb5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp @@ -25,5 +25,6 @@ namespace Microsoft.AzurePlaywrightService; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-10-01-preview API version.") v2023_10_01_preview: "2023-10-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp index 96f5cde292..bfbc6f61e5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp @@ -5,26 +5,31 @@ import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.AzurePlaywrightService; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") enum Origin { user, system, `user,system`, } +@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") enum ActionType { Internal, } +@doc("The enablement status of a feature.") enum EnablementStatus { @doc("The feature is Enabled.") Enabled, @doc("The feature is Disabled.") Disabled, } +@doc("The status of the current operation.") enum ProvisioningState { @doc("Resource has been created.") Succeeded, @doc("Resource creation failed.") Failed, @@ -33,6 +38,7 @@ enum ProvisioningState { @doc("Change accepted for processing") Accepted, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -40,6 +46,7 @@ enum CreatedByType { Key, } +@doc("The free-trial state.") enum FreeTrialState { @doc("The free-trial is Active.") Active, @doc("The free-trial is Expired.") Expired, @@ -70,6 +77,25 @@ model AccountProperties { provisioningState?: ProvisioningState; } +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; +} + @doc("Quota properties") model QuotaProperties { @doc("The free-trial quota.") @@ -113,3 +139,24 @@ model FreeTrialProperties { @visibility("read") state: FreeTrialState; } + +@doc("The type used for update operations of the Account.") +model AccountUpdate { + @doc("Resource tags.") + tags?: Record; + + @doc("The updatable properties of the Account.") + properties?: AccountUpdateProperties; +} + +@doc("The updatable properties of the Account.") +model AccountUpdateProperties { + @doc("This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created.") + regionalAffinity?: EnablementStatus; + + @doc("When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.") + scalableExecution?: EnablementStatus; + + @doc("When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting.") + reporting?: EnablementStatus; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp index 44dbcc0851..86bea2ae80 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./TrafficController.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.ServiceNetworking; @doc("Association Subresource of Traffic Controller") @@ -22,15 +24,37 @@ model Association is TrackedResource { } @armResourceOperations -interface AssociationsInterface { +interface Associations { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get a Association") + @operationId("AssociationsInterface_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create a Association") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + @operationId("AssociationsInterface_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Association, + BaseParameters, + ArmAsyncOperationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update a Association") - update is ArmResourcePatchSync; + @operationId("AssociationsInterface_Update") + update is ArmCustomPatchSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Delete a Association") - delete is ArmResourceDeleteAsync; + @operationId("AssociationsInterface_Delete") + delete is ArmResourceDeleteAsync< + Association, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List Association resources by TrafficController") + @operationId("AssociationsInterface_ListByTrafficController") listByTrafficController is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp index 7d4d454beb..24461bd64c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./TrafficController.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.ServiceNetworking; @doc("Frontend Subresource of Traffic Controller.") @@ -22,15 +24,37 @@ model Frontend is TrackedResource { } @armResourceOperations -interface FrontendsInterface { +interface Frontends { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get a Frontend") + @operationId("FrontendsInterface_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create a Frontend") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + @operationId("FrontendsInterface_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Frontend, + BaseParameters, + ArmAsyncOperationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update a Frontend") - update is ArmTagsPatchSync; + @operationId("FrontendsInterface_Update") + update is ArmCustomPatchSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Delete a Frontend") - delete is ArmResourceDeleteAsync; + @operationId("FrontendsInterface_Delete") + delete is ArmResourceDeleteAsync< + Frontend, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List Frontend resources by TrafficController") + @operationId("FrontendsInterface_ListByTrafficController") listByTrafficController is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp index 52369417fc..2aaf3fdbd4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.ServiceNetworking; @doc("Concrete tracked resource types can be created by aliasing this type using a specific property type.") @@ -20,17 +22,42 @@ model TrafficController is TrackedResource { } @armResourceOperations -interface TrafficControllerInterface { +interface TrafficControllers { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get a TrafficController") + @operationId("TrafficControllerInterface_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create a TrafficController") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + @operationId("TrafficControllerInterface_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + TrafficController, + BaseParameters, + ArmAsyncOperationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update a TrafficController") - update is ArmTagsPatchSync; + @operationId("TrafficControllerInterface_Update") + update is ArmCustomPatchSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Delete a TrafficController") - delete is ArmResourceDeleteAsync; + @operationId("TrafficControllerInterface_Delete") + delete is ArmResourceDeleteAsync< + TrafficController, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List TrafficController resources by resource group") + @operationId("TrafficControllerInterface_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List TrafficController resources by subscription ID") + @operationId("TrafficControllerInterface_ListBySubscription") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_CreateOrUpdate.json new file mode 100644 index 0000000000..2893cb5f73 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_CreateOrUpdate.json @@ -0,0 +1,51 @@ +{ + "operationId": "AssociationsInterface_CreateOrUpdate", + "parameters": { + "api-version": "2023-11-01", + "associationName": "as1", + "resource": { + "location": "NorthCentralUS", + "properties": { + "associationType": "subnets", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Put Association", + "responses": { + "200": { + "body": { + "name": "associatedvnet-1", + "type": "Microsoft.ServiceNetworking/trafficControllers/associations", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1", + "location": "NorthCentralUS", + "properties": { + "associationType": "subnets", + "provisioningState": "Accepted", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + }, + "201": { + "body": { + "name": "associatedvnet-1", + "type": "Microsoft.ServiceNetworking/trafficControllers/associations", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1", + "location": "NorthCentralUS", + "properties": { + "associationType": "subnets", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Delete.json new file mode 100644 index 0000000000..7a451c65e2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Delete.json @@ -0,0 +1,21 @@ +{ + "operationId": "AssociationsInterface_Delete", + "parameters": { + "api-version": "2023-11-01", + "associationName": "as1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Delete Association", + "responses": { + "200": {}, + "202": { + "headers": { + "Retry-After": 3, + "location": "https://blobLocation.com" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Get.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Get.json new file mode 100644 index 0000000000..c49d723c9d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Get.json @@ -0,0 +1,28 @@ +{ + "operationId": "AssociationsInterface_Get", + "parameters": { + "api-version": "2023-11-01", + "associationName": "as1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Get Association", + "responses": { + "200": { + "body": { + "name": "as1", + "type": "Microsoft.ServiceNetworking/trafficControllers/associations", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1", + "location": "NorthCentralUS", + "properties": { + "associationType": "subnets", + "provisioningState": "Succeeded", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_ListByTrafficController.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_ListByTrafficController.json new file mode 100644 index 0000000000..0791850af8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_ListByTrafficController.json @@ -0,0 +1,31 @@ +{ + "operationId": "AssociationsInterface_ListByTrafficController", + "parameters": { + "api-version": "2023-11-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Get Associations", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "as1", + "type": "Microsoft.ServiceNetworking/trafficControllers/associations", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1", + "location": "NorthCentralUS", + "properties": { + "associationType": "subnets", + "provisioningState": "Succeeded", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Update.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Update.json new file mode 100644 index 0000000000..10db57ec99 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Update.json @@ -0,0 +1,35 @@ +{ + "operationId": "AssociationsInterface_Update", + "parameters": { + "api-version": "2023-11-01", + "associationName": "as1", + "properties": { + "properties": { + "associationType": "subnets", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Update Association", + "responses": { + "200": { + "body": { + "name": "as1", + "type": "Microsoft.ServiceNetworking/trafficControllers/associations", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1", + "location": "NorthCentralUS", + "properties": { + "associationType": "subnets", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_CreateOrUpdate.json new file mode 100644 index 0000000000..a4a9d318ea --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_CreateOrUpdate.json @@ -0,0 +1,41 @@ +{ + "operationId": "FrontendsInterface_CreateOrUpdate", + "parameters": { + "api-version": "2023-11-01", + "frontendName": "fe1", + "resource": { + "location": "NorthCentralUS", + "properties": {} + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Put Frontend", + "responses": { + "200": { + "body": { + "name": "fe1", + "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", + "location": "NorthCentralUS", + "properties": { + "fqdn": "test.net", + "provisioningState": "Succeeded" + } + } + }, + "201": { + "body": { + "name": "fe1", + "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", + "location": "NorthCentralUS", + "properties": { + "fqdn": "test.net", + "provisioningState": "Succeeded" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Delete.json new file mode 100644 index 0000000000..a2a44b5489 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Delete.json @@ -0,0 +1,21 @@ +{ + "operationId": "FrontendsInterface_Delete", + "parameters": { + "api-version": "2023-11-01", + "frontendName": "fe1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Delete Frontend", + "responses": { + "200": {}, + "202": { + "headers": { + "Retry-After": 3, + "location": "https://blobLocation.com" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Get.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Get.json new file mode 100644 index 0000000000..b61e2a5790 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Get.json @@ -0,0 +1,25 @@ +{ + "operationId": "FrontendsInterface_Get", + "parameters": { + "api-version": "2023-11-01", + "frontendName": "fe1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Get Frontend", + "responses": { + "200": { + "body": { + "name": "fe1", + "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", + "location": "NorthCentralUS", + "properties": { + "fqdn": "test.net", + "provisioningState": "Succeeded" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_ListByTrafficController.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_ListByTrafficController.json new file mode 100644 index 0000000000..981cd6bccb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_ListByTrafficController.json @@ -0,0 +1,28 @@ +{ + "operationId": "FrontendsInterface_ListByTrafficController", + "parameters": { + "api-version": "2023-11-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Get Frontends", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "fe1", + "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", + "location": "NorthCentralUS", + "properties": { + "fqdn": "test.net", + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Update.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Update.json new file mode 100644 index 0000000000..b09a9b78db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Update.json @@ -0,0 +1,26 @@ +{ + "operationId": "FrontendsInterface_Update", + "parameters": { + "api-version": "2023-11-01", + "frontendName": "fe1", + "properties": {}, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Update Frontend", + "responses": { + "200": { + "body": { + "name": "fe1", + "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", + "location": "NorthCentralUS", + "properties": { + "fqdn": "test.net", + "provisioningState": "Succeeded" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_CreateOrUpdate.json new file mode 100644 index 0000000000..bd04a8e2b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_CreateOrUpdate.json @@ -0,0 +1,72 @@ +{ + "operationId": "TrafficControllerInterface_CreateOrUpdate", + "parameters": { + "api-version": "2023-11-01", + "resource": { + "location": "NorthCentralUS", + "tags": { + "key1": "value1" + } + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Put Traffic Controller", + "responses": { + "200": { + "body": { + "name": "tc1", + "type": "Microsoft.ServiceNetworking/trafficControllers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1", + "location": "NorthCentralUS", + "properties": { + "associations": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + ], + "configurationEndpoints": [ + "abc.trafficcontroller.azure.net" + ], + "frontends": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + ], + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "value1" + } + } + }, + "201": { + "body": { + "name": "tc1", + "type": "Microsoft.ServiceNetworking/trafficControllers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1", + "location": "NorthCentralUS", + "properties": { + "associations": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + ], + "configurationEndpoints": [ + "abc.trafficcontroller.azure.net" + ], + "frontends": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + ], + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Delete.json new file mode 100644 index 0000000000..6d16e849bf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Delete.json @@ -0,0 +1,20 @@ +{ + "operationId": "TrafficControllerInterface_Delete", + "parameters": { + "api-version": "2023-11-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Delete Traffic Controller", + "responses": { + "200": {}, + "202": { + "headers": { + "Retry-After": 3, + "location": "https://blobLocation.com" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Get.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Get.json new file mode 100644 index 0000000000..5e4b154ed5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Get.json @@ -0,0 +1,39 @@ +{ + "operationId": "TrafficControllerInterface_Get", + "parameters": { + "api-version": "2023-11-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Get Traffic Controller", + "responses": { + "200": { + "body": { + "name": "tc1", + "type": "Microsoft.ServiceNetworking/trafficControllers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1", + "location": "NorthCentralUS", + "properties": { + "associations": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + ], + "configurationEndpoints": [ + "abc.trafficcontroller.azure.net" + ], + "frontends": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + ], + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListByResourceGroup.json new file mode 100644 index 0000000000..bce2a37c5a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListByResourceGroup.json @@ -0,0 +1,42 @@ +{ + "operationId": "TrafficControllerInterface_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid" + }, + "title": "Get Traffic Controllers", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "tc1", + "type": "Microsoft.ServiceNetworking/trafficControllers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1", + "location": "NorthCentralUS", + "properties": { + "associations": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + ], + "configurationEndpoints": [ + "abc.trafficcontroller.azure.net" + ], + "frontends": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + ], + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "value1" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListBySubscription.json new file mode 100644 index 0000000000..ad60cd8f3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListBySubscription.json @@ -0,0 +1,41 @@ +{ + "operationId": "TrafficControllerInterface_ListBySubscription", + "parameters": { + "api-version": "2023-11-01", + "subscriptionId": "subid" + }, + "title": "Get Traffic Controllers List", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "tc1", + "type": "Microsoft.ServiceNetworking/trafficControllers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1", + "location": "NorthCentralUS", + "properties": { + "associations": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + ], + "configurationEndpoints": [ + "abc.trafficcontroller.azure.net" + ], + "frontends": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + ], + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "value1" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Update.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Update.json new file mode 100644 index 0000000000..a87a1dc53b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Update.json @@ -0,0 +1,44 @@ +{ + "operationId": "TrafficControllerInterface_Update", + "parameters": { + "api-version": "2023-11-01", + "properties": { + "tags": { + "key1": "value1" + } + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Patch Traffic Controller", + "responses": { + "200": { + "body": { + "name": "tc1", + "type": "Microsoft.ServiceNetworking/trafficControllers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1", + "location": "NorthCentralUS", + "properties": { + "associations": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + ], + "configurationEndpoints": [ + "abc.trafficcontroller.azure.net" + ], + "frontends": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + ], + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp index 58a6d5ad04..f43a83d3c4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp @@ -26,5 +26,6 @@ namespace Microsoft.ServiceNetworking; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-11-01 API version.") v2023_11_01: "2023-11-01", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp index 90db8d685c..8e6698a47c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp @@ -5,17 +5,20 @@ import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.ServiceNetworking; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") enum Origin { user, system, `user,system`, } +@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") enum ActionType { Internal, } @@ -30,6 +33,7 @@ enum ProvisioningState { Canceled, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -66,6 +70,31 @@ model ResourceId { id: string; } +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; +} + +@doc("The type used for update operations of the TrafficController.") +model TrafficControllerUpdate { + @doc("Resource tags.") + tags?: Record; +} + @doc("Association Properties.") model AssociationProperties { @doc("Association Type") @@ -85,6 +114,24 @@ model AssociationSubnet { id: string; } +@doc("The type used for update operations of the Association.") +model AssociationUpdate { + @doc("Resource tags.") + tags?: Record; + + @doc("The updatable properties of the Association.") + properties?: AssociationUpdateProperties; +} + +@doc("The updatable properties of the Association.") +model AssociationUpdateProperties { + @doc("Association Type") + associationType?: AssociationType; + + @doc("Association Subnet") + subnet?: AssociationSubnetUpdate; +} + @doc("Association Subnet.") model AssociationSubnetUpdate { @doc("Association ID.") @@ -101,3 +148,9 @@ model FrontendProperties { @visibility("read") provisioningState?: ProvisioningState; } + +@doc("The type used for update operations of the Frontend.") +model FrontendUpdate { + @doc("Resource tags.") + tags?: Record; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp index 869cf0ab7a..7e495e9eff 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; @doc("An Azure Sphere catalog") @@ -23,18 +25,33 @@ model Catalog is TrackedResource { interface Catalogs { @doc("Get a Catalog") get is ArmResourceRead; + @doc("Create a Catalog") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Catalog, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update a Catalog") - update is ArmTagsPatchSync; + update is ArmCustomPatchSync; + @doc("Delete a Catalog") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + Catalog, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List Catalog resources by resource group") listByResourceGroup is ArmResourceListByParent; + @doc("List Catalog resources by subscription ID") listBySubscription is ArmListBySubscription; + @doc("Counts devices in catalog.") countDevices is ArmResourceActionSync; + @doc("Lists deployments for catalog.") listDeployments is ArmResourceActionSync< Catalog, @@ -60,6 +77,7 @@ interface Catalogs { maxpagesize?: int32; } >; + @doc("List the device groups for the catalog.") listDeviceGroups is ArmResourceActionSync< Catalog, @@ -85,6 +103,7 @@ interface Catalogs { maxpagesize?: int32; } >; + @doc("Lists device insights for catalog.") listDeviceInsights is ArmResourceActionSync< Catalog, @@ -110,6 +129,7 @@ interface Catalogs { maxpagesize?: int32; } >; + @doc("Lists devices for catalog.") listDevices is ArmResourceActionSync< Catalog, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp index eef2369bc3..e42f42210e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Catalog.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; @doc("An certificate resource belonging to a catalog resource.") @@ -24,6 +26,7 @@ model Certificate is ProxyResource { interface Certificates { @doc("Get a Certificate") get is ArmResourceRead; + @doc("List Certificate resources by Catalog") listByCatalog is ArmResourceListByParent< Certificate, @@ -47,12 +50,14 @@ interface Certificates { maxpagesize?: int32; } >; + @doc("Retrieves cert chain.") retrieveCertChain is ArmResourceActionSync< Certificate, void, CertificateChainResponse >; + @doc("Gets the proof of possession nonce.") retrieveProofOfPossessionNonce is ArmResourceActionSync< Certificate, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp index 99143202c2..5550a848b5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DeviceGroup.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; @doc("An deployment resource belonging to a device group resource.") @@ -24,10 +26,21 @@ model Deployment is ProxyResource { interface Deployments { @doc("Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") get is ArmResourceRead; + @doc("Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Deployment, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + Deployment, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") listByDeviceGroup is ArmResourceListByParent< Deployment, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp index b9a03e0e57..493c8e138f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DeviceGroup.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; @doc("An device resource belonging to a device group resource.") @@ -25,18 +27,38 @@ model Device is ProxyResource { interface Devices { @doc("Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product.") get is ArmResourceRead; + @doc("Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Device, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync< + Device, + DeviceUpdate, + BaseParameters, + ArmLroLocationHeader + >; + @doc("Delete a Device") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + Device, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") listByDeviceGroup is ArmResourceListByParent; + @doc("Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product.") generateCapabilityImage is ArmResourceActionAsync< Device, GenerateCapabilityImageRequest, - SignedCapabilityImageResponse + SignedCapabilityImageResponse, + BaseParameters, + ArmLroLocationHeader >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp index de7e6b89fd..59128d7d7f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Product.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; @doc("An device group resource belonging to a product resource.") @@ -25,12 +27,29 @@ model DeviceGroup is ProxyResource { interface DeviceGroups { @doc("Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") get is ArmResourceRead; + @doc("Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + DeviceGroup, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync< + DeviceGroup, + DeviceGroupUpdate, + BaseParameters, + ArmLroLocationHeader + >; + @doc("Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + DeviceGroup, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") listByProduct is ArmResourceListByParent< DeviceGroup, @@ -54,11 +73,15 @@ interface DeviceGroups { maxpagesize?: int32; } >; + @doc("Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk claiming devices to a catalog only.") claimDevices is ArmResourceActionNoResponseContentAsync< DeviceGroup, - ClaimDevicesRequest + ClaimDevicesRequest, + BaseParameters, + ArmLroLocationHeader >; + @doc("Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") countDevices is ArmResourceActionSync; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp index 6f4ac2a2ac..936f1d80b4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Catalog.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; @doc("An image resource belonging to a catalog resource.") @@ -24,10 +26,21 @@ model Image is ProxyResource { interface Images { @doc("Get a Image") get is ArmResourceRead; + @doc("Create a Image") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Image, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Delete a Image") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + Image, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List Image resources by Catalog") listByCatalog is ArmResourceListByParent< Image, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp index 6612b66f7b..e8a338b248 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Catalog.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; @doc("An product resource belonging to a catalog resource.") @@ -25,16 +27,35 @@ model Product is ProxyResource { interface Products { @doc("Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") get is ArmResourceRead; + @doc("Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Product, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync< + Product, + ProductUpdate, + BaseParameters, + ArmLroLocationHeader + >; + @doc("Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + Product, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List Product resources by Catalog") listByCatalog is ArmResourceListByParent; + @doc("Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") countDevices is ArmResourceActionSync; + @doc("Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") generateDefaultDeviceGroups is ArmResourceActionSync< Product, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CountDevices.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CountDevices.json new file mode 100644 index 0000000000..8e98c0b30a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CountDevices.json @@ -0,0 +1,18 @@ +{ + "operationId": "Catalogs_CountDevices", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_CountDevices", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": 3 + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CreateOrUpdate.json new file mode 100644 index 0000000000..12fbb285cf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "operationId": "Catalogs_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "location": "global", + "resource": { + "location": "global" + }, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Delete.json new file mode 100644 index 0000000000..9cf48d1b3a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Delete.json @@ -0,0 +1,24 @@ +{ + "operationId": "Catalogs_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Get.json new file mode 100644 index 0000000000..ffff8db7cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Get.json @@ -0,0 +1,21 @@ +{ + "operationId": "Catalogs_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListByResourceGroup.json new file mode 100644 index 0000000000..f52192cbc0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListByResourceGroup.json @@ -0,0 +1,30 @@ +{ + "operationId": "Catalogs_ListByResourceGroup", + "parameters": { + "api-version": "2022-09-01-preview", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListByResourceGroup", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + }, + { + "name": "MyCatalog2", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog2", + "location": "global" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListBySubscription.json new file mode 100644 index 0000000000..2b1412903d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListBySubscription.json @@ -0,0 +1,29 @@ +{ + "operationId": "Catalogs_ListBySubscription", + "parameters": { + "api-version": "2022-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListBySubscription", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + }, + { + "name": "MyCatalog2", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup2/providers/Microsoft.AzureSphere/catalogs/MyCatalog2", + "location": "global" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeployments.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeployments.json new file mode 100644 index 0000000000..d64d0282cb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeployments.json @@ -0,0 +1,27 @@ +{ + "operationId": "Catalogs_ListDeployments", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListDeployments", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "DeploymentName1111", + "properties": {} + }, + { + "name": "DeploymentName1121", + "properties": {} + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceGroups.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceGroups.json new file mode 100644 index 0000000000..2ab4b6b559 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceGroups.json @@ -0,0 +1,32 @@ +{ + "operationId": "Catalogs_ListDeviceGroups", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "listDeviceGroupsRequest": { + "deviceGroupName": "MyDeviceGroup1" + }, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListDeviceGroups", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyDeviceGroup1", + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1" + }, + { + "name": "MyDeviceGroup2", + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct2/devicegroups/MyDeviceGroup2" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceInsights.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceInsights.json new file mode 100644 index 0000000000..72fe42e06e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceInsights.json @@ -0,0 +1,40 @@ +{ + "operationId": "Catalogs_ListDeviceInsights", + "parameters": { + "$top": 10, + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListDeviceInsights", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "description": "eventDescription1", + "deviceId": "eventIdentifier1", + "endTimestampUtc": "2021-09-30T23:54:21.96Z", + "eventCategory": "eventCategory1", + "eventClass": "eventClass1", + "eventCount": 1, + "eventType": "eventType1", + "startTimestampUtc": "2021-09-30T21:51:39.26Z" + }, + { + "description": "eventDescription2", + "deviceId": "eventIdentifier2", + "endTimestampUtc": "2022-12-07T17:34:12.50Z", + "eventCategory": "eventCategory2", + "eventClass": "eventClass2", + "eventCount": 1, + "eventType": "eventType2", + "startTimestampUtc": "2022-12-06T12:41:39.26Z" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDevices.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDevices.json new file mode 100644 index 0000000000..7f72d39e0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDevices.json @@ -0,0 +1,27 @@ +{ + "operationId": "Catalogs_ListDevices", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListDevices", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "properties": {} + }, + { + "name": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "properties": {} + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Update.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Update.json new file mode 100644 index 0000000000..5ecd11ed68 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Update.json @@ -0,0 +1,25 @@ +{ + "operationId": "Catalogs_Update", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "properties": {}, + "resource": { + "location": "global" + }, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_Update", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_Get.json new file mode 100644 index 0000000000..05e8533ac8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_Get.json @@ -0,0 +1,17 @@ +{ + "operationId": "Certificates_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "serialNumber": "default", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Certificates_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": {} + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_ListByCatalog.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_ListByCatalog.json new file mode 100644 index 0000000000..ba01741148 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_ListByCatalog.json @@ -0,0 +1,18 @@ +{ + "operationId": "Certificates_ListByCatalog", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Certificates_ListByCatalog", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveCertChain.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveCertChain.json new file mode 100644 index 0000000000..07608e0fd6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveCertChain.json @@ -0,0 +1,19 @@ +{ + "operationId": "Certificates_RetrieveCertChain", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "serialNumber": "active", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Certificates_RetrieveCertChain", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "certificateChain": "ABynaryRepresentationOfTheRequestedCatalogCertificateChain" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveProofOfPossessionNonce.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveProofOfPossessionNonce.json new file mode 100644 index 0000000000..d3a73c7b0f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveProofOfPossessionNonce.json @@ -0,0 +1,22 @@ +{ + "operationId": "Certificates_RetrieveProofOfPossessionNonce", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "proofOfPossessionNonceRequest": { + "proofOfPossessionNonce": "proofOfPossessionNonce" + }, + "resourceGroupName": "MyResourceGroup1", + "serialNumber": "active", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Certificates_RetrieveProofOfPossessionNonce", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "certificate": "bXliYXNlNjRzdHJpbmc=" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_CreateOrUpdate.json new file mode 100644 index 0000000000..ef3ca50bbc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_CreateOrUpdate.json @@ -0,0 +1,47 @@ +{ + "operationId": "Deployments_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deploymentName": "MyDeployment1", + "deviceGroupName": "myDeviceGroup1", + "productName": "MyProduct1", + "resource": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Deployments_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyDeployment1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/deviceGroups/MyDeviceGroup1/deployments/MyDeployment1", + "properties": { + "deployedImages": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/MyImage1", + "properties": { + "image": "MyImage", + "imageId": "00000000-0000-0000-0000-000000000000", + "imageType": "InvalidImageType", + "provisioningState": "Succeeded", + "regionalDataBoundary": "None", + "uri": "imageUri" + } + } + ], + "provisioningState": "Succeeded" + } + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "MyDeployment1", + "type": "Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/deployments/MyDeployment1" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Delete.json new file mode 100644 index 0000000000..85f53cd0d5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Delete.json @@ -0,0 +1,27 @@ +{ + "operationId": "Deployments_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deploymentName": "MyDeploymentName1", + "deviceGroupName": "DeviceGroupName1", + "productName": "MyProductName1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Deployments_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Get.json new file mode 100644 index 0000000000..63a1b85466 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Get.json @@ -0,0 +1,38 @@ +{ + "operationId": "Deployments_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deploymentName": "MyDeployment1", + "deviceGroupName": "myDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Deployments_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyDeployment1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/deviceGroups/MyDeviceGroup1/deployments/MyDeployment1", + "properties": { + "deployedImages": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/MyImage1", + "properties": { + "description": "description", + "componentId": "componentId", + "image": "dGVzdGltYWdl", + "imageType": "ImageType", + "provisioningState": "Succeeded", + "regionalDataBoundary": "None", + "uri": "imageUri" + } + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_ListByDeviceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_ListByDeviceGroup.json new file mode 100644 index 0000000000..ad770c94f6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_ListByDeviceGroup.json @@ -0,0 +1,42 @@ +{ + "operationId": "Deployments_ListByDeviceGroup", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "myDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Deployments_ListByDeviceGroup", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyDeployment1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/deviceGroups/MyDeviceGroup1/deployments/MyDeployment1", + "properties": { + "deployedImages": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/MyImage1", + "properties": { + "description": "description", + "componentId": "componentId", + "image": "dGVzdGltYWdl", + "imageType": "ImageType", + "provisioningState": "Succeeded", + "regionalDataBoundary": "None", + "uri": "imageUri" + } + } + ], + "deploymentDateUtc": "2022-09-30T21:51:39.2698729Z" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ClaimDevices.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ClaimDevices.json new file mode 100644 index 0000000000..4b8d8dc27f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ClaimDevices.json @@ -0,0 +1,25 @@ +{ + "operationId": "DeviceGroups_ClaimDevices", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "claimDevicesRequest": { + "deviceIdentifiers": [ + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_ClaimDevices", + "responses": { + "202": { + "description": "Resource operation accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CountDevices.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CountDevices.json new file mode 100644 index 0000000000..14b1a2758c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CountDevices.json @@ -0,0 +1,20 @@ +{ + "operationId": "DeviceGroups_CountDevices", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_CountDevices", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": 3 + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CreateOrUpdate.json new file mode 100644 index 0000000000..3244ad81aa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CreateOrUpdate.json @@ -0,0 +1,46 @@ +{ + "operationId": "DeviceGroups_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "resource": { + "properties": { + "description": "Description for MyDeviceGroup1", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + }, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "microsoft.AzureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1", + "properties": { + "description": "Description of MyDeviceGroup1", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "MyDeviceId1", + "type": "Microsoft.AzureSphere/catalogs/products/deviceGroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1", + "properties": { + "description": "Description of MyDeviceGroup1", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Delete.json new file mode 100644 index 0000000000..1c42b931ca --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Delete.json @@ -0,0 +1,26 @@ +{ + "operationId": "DeviceGroups_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Get.json new file mode 100644 index 0000000000..9b867336b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Get.json @@ -0,0 +1,26 @@ +{ + "operationId": "DeviceGroups_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1", + "properties": { + "description": "The description of MyDeviceGroup1", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ListByProduct.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ListByProduct.json new file mode 100644 index 0000000000..dc7a9bc1c4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ListByProduct.json @@ -0,0 +1,30 @@ +{ + "operationId": "DeviceGroups_ListByProduct", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_ListByProduct", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyDeviceGroup1", + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1" + }, + { + "name": "MyDeviceGroup2", + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/Products/MyProduct2/devicegroups/MyDeviceGroup2" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Update.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Update.json new file mode 100644 index 0000000000..ae6b769484 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Update.json @@ -0,0 +1,33 @@ +{ + "operationId": "DeviceGroups_Update", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "properties": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_Update", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1", + "properties": { + "description": "The description of MyDeviceGroup1", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_CreateOrUpdate.json new file mode 100644 index 0000000000..0361bfdd14 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_CreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "operationId": "Devices_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "myDeviceGroup1", + "deviceName": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "productName": "MyProduct1", + "resource": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "properties": { + "chipSku": "MyChipSku1" + } + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "Microsoft.AzureSphere/catalogs/products/deviceGroups/devices", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Delete.json new file mode 100644 index 0000000000..a1f3969be5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Delete.json @@ -0,0 +1,27 @@ +{ + "operationId": "Devices_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "DeviceGroupName1", + "deviceName": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "productName": "MyProductName1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_GenerateCapabilityImage.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_GenerateCapabilityImage.json new file mode 100644 index 0000000000..c125e98e70 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_GenerateCapabilityImage.json @@ -0,0 +1,32 @@ +{ + "operationId": "Devices_GenerateCapabilityImage", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "myDeviceGroup1", + "deviceName": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "generateDeviceCapabilityRequest": { + "capabilities": [ + "ApplicationDevelopment" + ] + }, + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_GenerateCapabilityImage", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "image": "TheDeviceCapabilityImage" + } + }, + "202": { + "description": "Resource operation accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Get.json new file mode 100644 index 0000000000..a645c9e293 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Get.json @@ -0,0 +1,29 @@ +{ + "operationId": "Devices_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "myDeviceGroup1", + "deviceName": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "properties": { + "chipSku": "MyChipSku1", + "lastAvailableOsVersion": "AvailableOsVersion1", + "lastInstalledOsVersion": "InstalledOsVersion1", + "lastOsUpdateUtc": "2022-09-30T23:54:21.96Z", + "lastUpdateRequestUtc": "2022-10-01T23:54:21.96Z" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_ListByDeviceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_ListByDeviceGroup.json new file mode 100644 index 0000000000..fd2f8ca567 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_ListByDeviceGroup.json @@ -0,0 +1,29 @@ +{ + "operationId": "Devices_ListByDeviceGroup", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "myDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_ListByDeviceGroup", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000-0000-0000-0000-000000000001", + "properties": {} + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000-0000-0000-0000-000000000002", + "properties": {} + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Update.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Update.json new file mode 100644 index 0000000000..309755fae6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Update.json @@ -0,0 +1,36 @@ +{ + "operationId": "Devices_Update", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "deviceName": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "productName": "MyProduct1", + "properties": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_Update", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "Microsoft.AzureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1/device/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "properties": { + "chipSku": "MyChipSku1", + "lastAvailableOsVersion": "AvailableOsVersion1", + "lastInstalledOsVersion": "InstalledOsVersion1", + "lastOsUpdateUtc": "2022-10-30T23:54:21.96Z", + "lastUpdateRequestUtc": "2022-10-01T23:54:21.96Z" + } + } + }, + "202": { + "description": "The device update started successfully.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_CreateOrUpdate.json new file mode 100644 index 0000000000..4afa2137a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_CreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "operationId": "Images_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "imageName": "default", + "resource": { + "properties": { + "image": "bXliYXNlNjRzdHJpbmc=" + } + }, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Image_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyProduct1", + "type": "Microsoft.AzureSphere/catalogs/images", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/default" + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "MyProduct1", + "type": "Microsoft.AzureSphere/catalogs/images", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/default" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Delete.json new file mode 100644 index 0000000000..8457e3ba33 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Delete.json @@ -0,0 +1,25 @@ +{ + "operationId": "Images_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "imageName": "imageID", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Images_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Get.json new file mode 100644 index 0000000000..e63b7d375c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Get.json @@ -0,0 +1,17 @@ +{ + "operationId": "Images_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "imageName": "myImageId", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Images_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": {} + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_ListByCatalog.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_ListByCatalog.json new file mode 100644 index 0000000000..c84863660c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_ListByCatalog.json @@ -0,0 +1,27 @@ +{ + "operationId": "Images_ListByCatalog", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Images_ListByCatalog", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyImage1", + "id": "00000000-0000-0000-0000-000000000001" + }, + { + "name": "MyImage2", + "id": "00000000-0000-0000-0000-000000000002" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CountDevices.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CountDevices.json new file mode 100644 index 0000000000..74b9469a62 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CountDevices.json @@ -0,0 +1,21 @@ +{ + "operationId": "Products_CountDevices", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productGroupName": "MyProduct1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_CountDevices", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": 3 + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CreateOrUpdate.json new file mode 100644 index 0000000000..cde11d3020 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CreateOrUpdate.json @@ -0,0 +1,30 @@ +{ + "operationId": "Products_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProduct1", + "resource": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyProduct1", + "type": "Microsoft.AzureSphere/catalogs/products", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1" + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "MyProduct1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Delete.json new file mode 100644 index 0000000000..ce45bfdb5a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Delete.json @@ -0,0 +1,25 @@ +{ + "operationId": "Products_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProductName1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_GenerateDefaultDeviceGroups.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_GenerateDefaultDeviceGroups.json new file mode 100644 index 0000000000..6c834aff44 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_GenerateDefaultDeviceGroups.json @@ -0,0 +1,40 @@ +{ + "operationId": "Products_GenerateDefaultDeviceGroups", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_GenerateDefaultDeviceGroups", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyDeviceGroup1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1", + "properties": { + "description": "Device group description 1", + "allowCrashDumpsCollection": "Enabled", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + }, + { + "name": "MyDeviceGroup2", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup2", + "properties": { + "description": "Device group description 2", + "allowCrashDumpsCollection": "Enabled", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Get.json new file mode 100644 index 0000000000..8acc34e547 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Get.json @@ -0,0 +1,23 @@ +{ + "operationId": "Products_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "microsoft.azureSphere/catalogs/products", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1", + "properties": { + "description": "product description." + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_ListByCatalog.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_ListByCatalog.json new file mode 100644 index 0000000000..2bc3059d09 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_ListByCatalog.json @@ -0,0 +1,29 @@ +{ + "operationId": "Products_ListByCatalog", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_ListByCatalog", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyProduct1", + "type": "Microsoft.AzureSphere/catalogs/products", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1" + }, + { + "name": "MyProduct2", + "type": "Microsoft.AzureSphere/catalogs/products", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct2" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Update.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Update.json new file mode 100644 index 0000000000..cd7ea772c3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Update.json @@ -0,0 +1,30 @@ +{ + "operationId": "Products_Update", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProduct1", + "properties": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_Update", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "microsoft.azureSphere/catalogs/products", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1", + "properties": { + "description": "Product description." + } + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp index 733c48e408..8af1897a6c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp @@ -30,5 +30,6 @@ namespace Microsoft.AzureSphere; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2022-09-01-preview API version.") v2022_09_01_preview: "2022-09-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp index e24be0e9ac..2fa769a4e4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp @@ -6,21 +6,25 @@ import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.AzureSphere; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") enum Origin { user, system, `user,system`, } +@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") enum ActionType { Internal, } +@doc("Provisioning state of the resource.") enum ProvisioningState { @doc("Resource has been created.") Succeeded, @doc("Resource creation failed.") Failed, @@ -31,6 +35,7 @@ enum ProvisioningState { @doc("The resource create request has been accepted") Accepted, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -38,6 +43,7 @@ enum CreatedByType { Key, } +@doc("Certificate status values.") enum CertificateStatus { @doc("Certificate is active") Active, @doc("Certificate is inactive") Inactive, @@ -45,11 +51,13 @@ enum CertificateStatus { @doc("Certificate has been revoked") Revoked, } +@doc("Regional data boundary values.") enum RegionalDataBoundary { @doc("No data boundary") None, @doc("EU data boundary") EU, } +@doc("Image type values.") enum ImageType { @doc("Invalid image.") InvalidImageType, @doc("One Bl image type") OneBl, @@ -77,21 +85,25 @@ enum ImageType { @doc("Other image type") Other, } +@doc("OS feed type values.") enum OSFeedType { @doc("Retail OS feed type.") Retail, @doc("Retail evaluation OS feed type.") RetailEval, } +@doc("Update policy values.") enum UpdatePolicy { @doc("Update all policy.") UpdateAll, @doc("No update for 3rd party app policy.") No3rdPartyAppUpdates, } +@doc("Allow crash dumps values.") enum AllowCrashDumpCollection { @doc("Crash dump collection enabled") Enabled, @doc("Crash dump collection disabled") Disabled, } +@doc("Capability image type") enum CapabilityType { @doc("Application development capability") ApplicationDevelopment, @doc("Field servicing capability") FieldServicing, @@ -104,6 +116,31 @@ model CatalogProperties { provisioningState?: ProvisioningState; } +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; +} + +@doc("The type used for update operations of the Catalog.") +model CatalogUpdate { + @doc("Resource tags.") + tags?: Record; +} + @doc("The properties of certificate") model CertificateProperties { @doc("The certificate as a UTF-8 encoded base 64 string.") @@ -328,12 +365,60 @@ model ProductProperties { provisioningState?: ProvisioningState; } +@doc("The type used for update operations of the Product.") +model ProductUpdate { + @doc("The updatable properties of the Product.") + properties?: ProductUpdateProperties; +} + +@doc("The updatable properties of the Product.") +model ProductUpdateProperties { + @doc("Description of the product") + description?: string; +} + +@doc("The type used for update operations of the DeviceGroup.") +model DeviceGroupUpdate { + @doc("The updatable properties of the DeviceGroup.") + properties?: DeviceGroupUpdateProperties; +} + +@doc("The updatable properties of the DeviceGroup.") +model DeviceGroupUpdateProperties { + @doc("Description of the device group.") + description?: string; + + @doc("Operating system feed type of the device group.") + osFeedType?: OSFeedType; + + @doc("Update policy of the device group.") + updatePolicy?: UpdatePolicy; + + @doc("Flag to define if the user allows for crash dump collection.") + allowCrashDumpsCollection?: AllowCrashDumpCollection; + + @doc("Regional data boundary for the device group.") + regionalDataBoundary?: RegionalDataBoundary; +} + @doc("Request to the action call to bulk claim devices.") model ClaimDevicesRequest { @doc("Device identifiers of the devices to be claimed.") deviceIdentifiers: string[]; } +@doc("The type used for update operations of the Device.") +model DeviceUpdate { + @doc("The updatable properties of the Device.") + properties?: DeviceUpdateProperties; +} + +@doc("The updatable properties of the Device.") +model DeviceUpdateProperties { + @doc("Device group id") + deviceGroupId?: string; +} + @doc("Request of the action to create a signed device capability image") model GenerateCapabilityImageRequest { @doc("List of capabilities to create") diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp index b6f9b121f9..6df53af1cd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./BlobServiceProperties.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("Properties of the blob container, including Id, resource name, resource type, Etag.") @@ -26,12 +28,16 @@ model BlobContainer is ProxyResource { interface BlobContainers { @doc("Gets properties of a specified container. ") get is ArmResourceRead; + @doc("Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. ") create is ArmResourceCreateOrReplaceSync; + @doc("Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. ") - update is ArmResourcePatchSync; + update is ArmCustomPatchSync; + @doc("Deletes specified container under its account.") delete is ArmResourceDeleteSync; + @doc("Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.") list is ArmResourceListByParent< BlobContainer, @@ -51,16 +57,26 @@ interface BlobContainers { $include?: ListContainersInclude; } >; + @doc("Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request.") setLegalHold is ArmResourceActionSync; + @doc("Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.") clearLegalHold is ArmResourceActionSync; + @doc("The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.") lease is ArmResourceActionSync< BlobContainer, LeaseContainerRequest, LeaseContainerResponse >; + @doc("This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container.") - objectLevelWorm is ArmResourceActionAsync; + objectLevelWorm is ArmResourceActionAsync< + BlobContainer, + void, + void, + BaseParameters, + ArmLroLocationHeader + >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp index fff3f9de56..6e95e0e636 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,13 +9,14 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The storage account blob inventory policy.") @singleton("default") @parentResource(StorageAccount) model BlobInventoryPolicy is ProxyResource { - @key("blobInventoryPolicyName") + @key("inventoryPolicy") @segment("inventoryPolicies") name: string; } @@ -23,10 +25,13 @@ model BlobInventoryPolicy is ProxyResource { interface BlobInventoryPolicies { @doc("Gets the blob inventory policy associated with the specified storage account.") get is ArmResourceRead; + @doc("Sets the blob inventory policy to the specified storage account.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Deletes the blob inventory policy associated with the specified storage account.") delete is ArmResourceDeleteSync; + @doc("Gets the blob inventory policy associated with the specified storage account.") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp index a67250d6a2..2848b6cbd9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,13 +9,14 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The properties of a storage account’s Blob service.") @singleton("default") @parentResource(StorageAccount) model BlobServiceProperties is ProxyResource { - @key("BlobServicesName") + @key("blobService") @segment("blobServices") name: string; @@ -22,29 +24,20 @@ model BlobServiceProperties is ProxyResource { } @armResourceOperations -interface BlobServices { +@projectedName("client", "BlobServiceProperties") +interface BlobServicePropertiesOperationGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.") - getServiceProperties is ArmResourceRead< - BlobServiceProperties, - { - ...BaseParameters; + @operationId("BlobServices_GetServiceProperties") + getServiceProperties is ArmResourceRead; - @doc("The name of the blob Service within the specified storage account. Blob Service Name must be 'default'") - @path - BlobServicesName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. ") - setServiceProperties is ArmResourceCreateOrReplaceSync< - BlobServiceProperties, - { - ...BaseParameters; + @operationId("BlobServices_SetServiceProperties") + setServiceProperties is ArmResourceCreateOrReplaceSync; - @doc("The name of the blob Service within the specified storage account. Blob Service Name must be 'default'") - @path - BlobServicesName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List blob services of storage account. It returns a collection of one object named default.") + @operationId("BlobServices_List") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp index e190019d6d..6c449cf914 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("Deleted storage account") @@ -25,6 +27,7 @@ model DeletedAccount is ProxyResource { interface DeletedAccounts { @doc("Get properties of specified deleted account resource.") get is ArmResourceRead; + @doc("Lists deleted accounts under the subscription.") list is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp index 320165cc47..9dabc70a47 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The Encryption Scope resource.") @@ -26,10 +28,13 @@ model EncryptionScope is ProxyResource { interface EncryptionScopes { @doc("Returns the properties for the specified encryption scope.") get is ArmResourceRead; + @doc("Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request.") put is ArmResourceCreateOrReplaceSync; + @doc("Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist.") - patch is ArmResourcePatchSync; + patch is ArmCustomPatchSync; + @doc("Lists all the encryption scopes available under the specified storage account.") list is ArmResourceListByParent< EncryptionScope, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp index 710c8ec88d..36971e998c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,13 +9,14 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The properties of File services in storage account.") @singleton("default") @parentResource(StorageAccount) model FileServiceProperties is ProxyResource { - @key("FileServicesName") + @key("fileService") @segment("fileServices") name: string; @@ -22,29 +24,20 @@ model FileServiceProperties is ProxyResource { } @armResourceOperations -interface FileServices { +@projectedName("client", "FileServiceProperties") +interface FileServicePropertiesOperationGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules.") - getServiceProperties is ArmResourceRead< - FileServiceProperties, - { - ...BaseParameters; + @operationId("FileServices_GetServiceProperties") + getServiceProperties is ArmResourceRead; - @doc("The name of the file Service within the specified storage account. File Service Name must be \"default\"") - @path - FileServicesName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. ") - setServiceProperties is ArmResourceCreateOrReplaceSync< - FileServiceProperties, - { - ...BaseParameters; + @operationId("FileServices_SetServiceProperties") + setServiceProperties is ArmResourceCreateOrReplaceSync; - @doc("The name of the file Service within the specified storage account. File Service Name must be \"default\"") - @path - FileServicesName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List all file services in storage accounts") + @operationId("FileServices_List") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp index c48d1e79ac..3a9ee48c75 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./FileServiceProperties.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("Properties of the file share, including Id, resource name, resource type, Etag.") @@ -39,6 +41,7 @@ interface FileShares { `x-ms-snapshot`?: string; } >; + @doc("Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. ") create is ArmResourceCreateOrReplaceSync< FileShare, @@ -50,8 +53,10 @@ interface FileShares { $expand?: string; } >; + @doc("Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. ") - update is ArmResourcePatchSync; + update is ArmCustomPatchSync; + @doc("Deletes specified share under its account.") delete is ArmResourceDeleteSync< FileShare, @@ -67,6 +72,7 @@ interface FileShares { $include?: string; } >; + @doc("Lists all shares.") list is ArmResourceListByParent< FileShare, @@ -86,8 +92,10 @@ interface FileShares { $expand?: string; } >; + @doc("Restore a file share within a valid retention days if share soft delete is enabled") restore is ArmResourceActionSync; + @doc("The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.") lease is ArmResourceActionSync< FileShare, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp index 5711f42a29..7cf2002c83 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./BlobContainer.tsp"; @@ -8,65 +9,65 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag.") @singleton("default") @parentResource(BlobContainer) model ImmutabilityPolicy is ProxyResource { - @key("immutabilityPolicyName") + @key("immutabilityPolicy") @segment("immutabilityPolicies") name: string; } @armResourceOperations -interface BlobContainers { +interface ImmutabilityPolicies { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the existing immutability policy along with the corresponding ETag in response headers and body.") + @operationId("BlobContainers_GetImmutabilityPolicy") getImmutabilityPolicy is ArmResourceRead< ImmutabilityPolicy, { ...BaseParameters; - @doc("The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'") - @path - immutabilityPolicyName: "default"; - @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") @header `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.") + @operationId("BlobContainers_CreateOrUpdateImmutabilityPolicy") createOrUpdateImmutabilityPolicy is ArmResourceCreateOrReplaceSync< ImmutabilityPolicy, { ...BaseParameters; - @doc("The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'") - @path - immutabilityPolicyName: "default"; - @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") @header `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container.") + @operationId("BlobContainers_DeleteImmutabilityPolicy") deleteImmutabilityPolicy is ArmResourceDeleteSync< ImmutabilityPolicy, { ...BaseParameters; - @doc("The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'") - @path - immutabilityPolicyName: "default"; - @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") @header `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.") + @operationId("BlobContainers_LockImmutabilityPolicy") lockImmutabilityPolicy is ArmResourceActionSync< ImmutabilityPolicy, void, @@ -79,7 +80,10 @@ interface BlobContainers { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.") + @operationId("BlobContainers_ExtendImmutabilityPolicy") extendImmutabilityPolicy is ArmResourceActionSync< ImmutabilityPolicy, ImmutabilityPolicy, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp index 4ff5277129..f8d802d842 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The local user associated with the storage accounts.") @@ -26,14 +28,19 @@ model LocalUser is ProxyResource { interface LocalUsers { @doc("Get the local user of the storage account by username.") get is ArmResourceRead; + @doc("Create or update the properties of a local user associated with the storage account") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Deletes the local user associated with the specified storage account.") delete is ArmResourceDeleteSync; + @doc("List the local users associated with the storage account.") list is ArmResourceListByParent; + @doc("List SSH authorized keys and shared key of the local user.") listKeys is ArmResourceActionSync; + @doc("Regenerate the local user SSH password.") regeneratePassword is ArmResourceActionSync< LocalUser, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp index e0cb0cd055..40823cbcc8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,13 +9,14 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The Get Storage Account ManagementPolicies operation response.") @singleton("default") @parentResource(StorageAccount) model ManagementPolicy is ProxyResource { - @key("managementPolicyName") + @key("managementPolicy") @segment("managementPolicies") name: string; } @@ -23,8 +25,10 @@ model ManagementPolicy is ProxyResource { interface ManagementPolicies { @doc("Gets the managementpolicy associated with the specified storage account.") get is ArmResourceRead; + @doc("Sets the managementpolicy to the specified storage account.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Deletes the managementpolicy associated with the specified storage account.") delete is ArmResourceDeleteSync; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp index ec1f4f6b41..a78d6c77d7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The replication policy between two storage accounts. Multiple rules can be defined in one policy.") @@ -26,10 +28,13 @@ model ObjectReplicationPolicy interface ObjectReplicationPolicies { @doc("Get the object replication policy of the storage account by policy ID.") get is ArmResourceRead; + @doc("Create or update the object replication policy of the storage account.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Deletes the object replication policy associated with the specified storage account.") delete is ArmResourceDeleteSync; + @doc("List the object replication policies associated with the storage account.") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp index 3e4c66ead9..98b1c03ab2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The Private Endpoint Connection resource.") @@ -25,10 +27,13 @@ model PrivateEndpointConnection interface PrivateEndpointConnections { @doc("Gets the specified private endpoint connection associated with the storage account.") get is ArmResourceRead; + @doc("Update the state of specified private endpoint connection associated with the storage account.") put is ArmResourceCreateOrReplaceSync; + @doc("Deletes the specified private endpoint connection associated with the storage account.") delete is ArmResourceDeleteSync; + @doc("List all the private endpoint connections associated with the storage account.") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp index ad95b89e19..afbb38a879 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The properties of a storage account’s Queue service.") @@ -15,35 +17,26 @@ namespace Microsoft.Storage; @parentResource(StorageAccount) model QueueServiceProperties is ProxyResource { - @key("queueServiceName") + @key("queueService") @segment("queueServices") name: string; } @armResourceOperations -interface QueueServices { +@projectedName("client", "QueueServiceProperties") +interface QueueServicePropertiesOperationGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.") - getServiceProperties is ArmResourceRead< - QueueServiceProperties, - { - ...BaseParameters; + @operationId("QueueServices_GetServiceProperties") + getServiceProperties is ArmResourceRead; - @doc("The name of the Queue Service within the specified storage account. Queue Service Name must be 'default'") - @path - queueServiceName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. ") - setServiceProperties is ArmResourceCreateOrReplaceSync< - QueueServiceProperties, - { - ...BaseParameters; + @operationId("QueueServices_SetServiceProperties") + setServiceProperties is ArmResourceCreateOrReplaceSync; - @doc("The name of the Queue Service within the specified storage account. Queue Service Name must be 'default'") - @path - queueServiceName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List all queue services for the storage account") + @operationId("QueueServices_List") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp index d632fe5991..4ce10f0a6b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The storage account.") @@ -40,16 +42,22 @@ interface StorageAccounts { $expand?: StorageAccountExpand; } >; + @doc("Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.") create is ArmResourceCreateOrUpdateAsync; + @doc("The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.") - update is ArmResourcePatchSync; + update is ArmCustomPatchSync; + @doc("Deletes a storage account in Microsoft Azure.") delete is ArmResourceDeleteSync; + @doc("Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.") listByResourceGroup is ArmResourceListByParent; + @doc("Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.") list is ArmListBySubscription; + @doc("Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.") listKeys is ArmResourceActionSync< StorageAccount, @@ -63,24 +71,32 @@ interface StorageAccounts { $expand?: "kerb"; } >; + @doc("Regenerates one of the access keys or Kerberos keys for the specified storage account.") regenerateKey is ArmResourceActionSync< StorageAccount, StorageAccountRegenerateKeyParameters, StorageAccountListKeysResult >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List SAS credentials of a storage account.") + @operationId("StorageAccounts_ListAccountSAS") listAccountSAS is ArmResourceActionSync< StorageAccount, AccountSasParameters, ListAccountSasResponse >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List service SAS credentials of a specific resource.") + @operationId("StorageAccounts_ListServiceSAS") listServiceSAS is ArmResourceActionSync< StorageAccount, ServiceSasParameters, ListServiceSasResponse >; + @doc("A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance") failover is ArmResourceActionAsync< StorageAccount, @@ -92,8 +108,10 @@ interface StorageAccounts { @doc("The parameter is set to 'Planned' to indicate whether a Planned failover is requested.") @query("failoverType") failoverType?: "Planned"; - } + }, + ArmLroLocationHeader >; + @doc("Live Migration of storage account to enable Hns") hierarchicalNamespaceMigration is ArmResourceActionAsync< StorageAccount, @@ -105,27 +123,38 @@ interface StorageAccounts { @doc("Required. Hierarchical namespace migration type can either be a hierarchical namespace validation request 'HnsOnValidationRequest' or a hydration request 'HnsOnHydrationRequest'. The validation request will validate the migration whereas the hydration request will migrate the account.") @query("requestType") requestType: string; - } + }, + ArmLroLocationHeader >; + @doc("Abort live Migration of storage account to enable Hns") abortHierarchicalNamespaceMigration is ArmResourceActionAsync< StorageAccount, void, - void + void, + BaseParameters, + ArmLroLocationHeader >; + @doc("Restore blobs in the specified blob ranges") restoreBlobRanges is ArmResourceActionAsync< StorageAccount, BlobRestoreParameters, - BlobRestoreStatus + BlobRestoreStatus, + BaseParameters, + ArmLroLocationHeader >; + @doc("Revoke user delegation keys.") revokeUserDelegationKeys is ArmResourceActionSync; -} -@armResourceOperations -interface PrivateLinkResources { + @doc("Checks that the storage account name is valid and is not already in use.") + checkNameAvailability is checkGlobalNameAvailability; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateLinkResources_ListByStorageAccount") @doc("Gets the private link resources that need to be created for a storage account.") + // FIXME: PrivateLinkResources_ListByStorageAccount could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateLinkResources") @get ListByStorageAccount is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp index 0045150490..e7ac5dea0d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./QueueServiceProperties.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @@ -24,16 +26,30 @@ model StorageQueue is ProxyResource { } @armResourceOperations -interface Queue { +interface StorageQueues { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the queue with the specified queue name, under the specified account if it exists.") + @operationId("Queue_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new queue with the specified queue name, under the specified account.") + @operationId("Queue_Create") create is ArmResourceCreateOrReplaceSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new queue with the specified queue name, under the specified account.") - update is ArmResourcePatchSync; + @operationId("Queue_Update") + update is ArmCustomPatchSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the queue with the specified queue name, under the specified account if it exists.") + @operationId("Queue_Delete") delete is ArmResourceDeleteSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets a list of all the queues under the specified storage account") + @operationId("Queue_List") list is ArmResourceListByParent< StorageQueue, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp index 5857bcd0ad..871fdcff9f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./TableServiceProperties.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("Properties of the table, including Id, resource name, resource type.") @@ -24,15 +26,29 @@ model Table is ProxyResource { } @armResourceOperations -interface Table { +interface Tables { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the table with the specified table name, under the specified account if it exists.") + @operationId("Table_Get") get is ArmResourceRead
    ; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new table with the specified table name, under the specified account.") + @operationId("Table_Create") create is ArmResourceCreateOrReplaceSync
    ; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new table with the specified table name, under the specified account.") - update is ArmResourcePatchSync; + @operationId("Table_Update") + update is ArmCustomPatchSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the table with the specified table name, under the specified account if it exists.") + @operationId("Table_Delete") delete is ArmResourceDeleteSync
    ; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets a list of all the tables under the specified storage account") + @operationId("Table_List") list is ArmResourceListByParent
    ; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp index 71206769e9..99fbd3e7e5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The properties of a storage account’s Table service.") @@ -15,35 +17,26 @@ namespace Microsoft.Storage; @parentResource(StorageAccount) model TableServiceProperties is ProxyResource { - @key("tableServiceName") + @key("tableService") @segment("tableServices") name: string; } @armResourceOperations -interface TableServices { +@projectedName("client", "TableServiceProperties") +interface TableServicePropertiesOperationGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.") - getServiceProperties is ArmResourceRead< - TableServiceProperties, - { - ...BaseParameters; + @operationId("TableServices_GetServiceProperties") + getServiceProperties is ArmResourceRead; - @doc("The name of the Table Service within the specified storage account. Table Service Name must be 'default'") - @path - tableServiceName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. ") - setServiceProperties is ArmResourceCreateOrReplaceSync< - TableServiceProperties, - { - ...BaseParameters; + @operationId("TableServices_SetServiceProperties") + setServiceProperties is ArmResourceCreateOrReplaceSync; - @doc("The name of the Table Service within the specified storage account. Table Service Name must be 'default'") - @path - tableServiceName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List all table services for the storage account.") + @operationId("TableServices_List") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ClearLegalHold.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ClearLegalHold.json new file mode 100644 index 0000000000..c638ce3ac6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ClearLegalHold.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "LegalHold": { + "tags": [ + "tag1", + "tag2", + "tag3" + ] + }, + "accountName": "sto7280", + "api-version": "2022-09-01", + "containerName": "container8723", + "monitor": "true", + "resourceGroupName": "res4303", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "hasLegalHold": false, + "tags": [] + } + } + }, + "operationId": "BlobContainers_ClearLegalHold", + "title": "ClearLegalHoldContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicy.json new file mode 100644 index 0000000000..65599a78ab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicy.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "accountName": "sto7069", + "api-version": "2022-09-01", + "containerName": "container6397", + "immutabilityPolicyName": "default", + "monitor": "true", + "parameters": { + "properties": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 3 + } + }, + "resourceGroupName": "res1782", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d59f830cb130e5\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res1782/providers/Microsoft.Storage/storageAccounts/sto7069/blobServices/default/containers/container6397/immutabilityPolicies/default", + "properties": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 3, + "state": "Unlocked" + } + } + } + }, + "operationId": "BlobContainers_CreateOrUpdateImmutabilityPolicy", + "title": "CreateOrUpdateImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll.json new file mode 100644 index 0000000000..a55b6a1ae9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "accountName": "sto7069", + "api-version": "2022-09-01", + "containerName": "container6397", + "immutabilityPolicyName": "default", + "monitor": "true", + "parameters": { + "properties": { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 3 + } + }, + "resourceGroupName": "res1782", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d59f830cb130e5\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res1782/providers/Microsoft.Storage/storageAccounts/sto7069/blobServices/default/containers/container6397/immutabilityPolicies/default", + "properties": { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 3, + "state": "Unlocked" + } + } + } + }, + "operationId": "BlobContainers_CreateOrUpdateImmutabilityPolicy", + "title": "CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithDefaultEncryptionScope.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithDefaultEncryptionScope.json new file mode 100644 index 0000000000..a90643cf61 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithDefaultEncryptionScope.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "blobContainer": { + "properties": { + "defaultEncryptionScope": "encryptionscope185", + "denyEncryptionScopeOverride": true + } + }, + "containerName": "container6185", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "properties": { + "defaultEncryptionScope": "encryptionscope185", + "denyEncryptionScopeOverride": true + } + } + }, + "201": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "properties": { + "defaultEncryptionScope": "encryptionscope185", + "denyEncryptionScopeOverride": true + } + } + } + }, + "operationId": "BlobContainers_Create", + "title": "PutContainerWithDefaultEncryptionScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithObjectLevelWorm.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithObjectLevelWorm.json new file mode 100644 index 0000000000..d59b2625c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithObjectLevelWorm.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "blobContainer": { + "properties": { + "immutableStorageWithVersioning": { + "enabled": true + } + } + }, + "containerName": "container6185", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "properties": { + "immutableStorageWithVersioning": { + "enabled": true + } + } + } + }, + "201": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "properties": { + "immutableStorageWithVersioning": { + "enabled": true + } + } + } + } + }, + "operationId": "BlobContainers_Create", + "title": "PutContainerWithObjectLevelWorm" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainers.json new file mode 100644 index 0000000000..d2610bb08d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainers.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "blobContainer": {}, + "containerName": "container6185", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185" + } + }, + "201": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185" + } + } + }, + "operationId": "BlobContainers_Create", + "title": "PutContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Delete.json new file mode 100644 index 0000000000..0606f341a8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto4506", + "api-version": "2022-09-01", + "containerName": "container9689", + "monitor": "true", + "resourceGroupName": "res4079", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "BlobContainers_Delete", + "title": "DeleteContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_DeleteImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_DeleteImmutabilityPolicy.json new file mode 100644 index 0000000000..d19ff5f137 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_DeleteImmutabilityPolicy.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "If-Match": "\"8d59f81a7fa7be0\"", + "accountName": "sto9621", + "api-version": "2022-09-01", + "containerName": "container4910", + "immutabilityPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res1581", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d59f81a87b40c0\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res1581/providers/Microsoft.Storage/storageAccounts/sto9621/blobServices/default/containers/container4910/immutabilityPolicies/default", + "properties": { + "immutabilityPeriodSinceCreationInDays": 0, + "state": "Unlocked" + } + } + } + }, + "operationId": "BlobContainers_DeleteImmutabilityPolicy", + "title": "DeleteImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ExtendImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ExtendImmutabilityPolicy.json new file mode 100644 index 0000000000..f19de1db20 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ExtendImmutabilityPolicy.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "If-Match": "\"8d59f830d0c3bf9\"", + "accountName": "sto232", + "api-version": "2022-09-01", + "containerName": "container5023", + "monitor": "true", + "parameters": { + "properties": { + "immutabilityPeriodSinceCreationInDays": 100 + } + }, + "resourceGroupName": "res6238", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d57a8b2ff50332\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6238/providers/Microsoft.Storage/storageAccounts/sto232/blobServices/default/containers/container5023/immutabilityPolicies/default", + "properties": { + "immutabilityPeriodSinceCreationInDays": 100, + "state": "Locked" + } + } + } + }, + "operationId": "BlobContainers_ExtendImmutabilityPolicy", + "title": "ExtendImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_GetImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_GetImmutabilityPolicy.json new file mode 100644 index 0000000000..25315997db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_GetImmutabilityPolicy.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "accountName": "sto9177", + "api-version": "2022-09-01", + "containerName": "container3489", + "immutabilityPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res5221", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d59f828e64b75c\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res5221/providers/Microsoft.Storage/storageAccounts/sto9177/blobServices/default/containers/container3489/immutabilityPolicies/default", + "properties": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 5, + "state": "Unlocked" + } + } + } + }, + "operationId": "BlobContainers_GetImmutabilityPolicy", + "title": "GetImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetBlobContainersGetWithAllowProtectedAppendWritesAll.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetBlobContainersGetWithAllowProtectedAppendWritesAll.json new file mode 100644 index 0000000000..5536afa47e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetBlobContainersGetWithAllowProtectedAppendWritesAll.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "accountName": "sto6217", + "api-version": "2022-09-01", + "containerName": "container1634", + "monitor": "true", + "resourceGroupName": "res9871", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container1634", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D592D74CC20EBA\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634", + "properties": { + "hasImmutabilityPolicy": true, + "hasLegalHold": true, + "immutabilityPolicy": { + "etag": "\"8d592d74cb3011a\"", + "properties": { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 100, + "state": "Locked" + }, + "updateHistory": [ + { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 3, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:11.431403Z", + "update": "put" + }, + { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 3, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:13.0907641Z", + "update": "lock" + }, + { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 100, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:14.7097716Z", + "update": "extend" + } + ] + }, + "lastModifiedTime": "2018-03-26T05:06:14Z", + "leaseState": "Available", + "leaseStatus": "Unlocked", + "legalHold": { + "hasLegalHold": true, + "protectedAppendWritesHistory": { + "allowProtectedAppendWritesAll": true, + "timestamp": "2022-09-01T01:58:44.5044483Z" + }, + "tags": [ + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag1", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + }, + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag2", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + }, + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag3", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + } + ] + }, + "publicAccess": "None" + } + } + } + }, + "operationId": "BlobContainers_Get", + "title": "GetBlobContainersGetWithAllowProtectedAppendWritesAll" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetContainers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetContainers.json new file mode 100644 index 0000000000..11f4fda9ba --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetContainers.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "accountName": "sto6217", + "api-version": "2022-09-01", + "containerName": "container1634", + "monitor": "true", + "resourceGroupName": "res9871", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container1634", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D592D74CC20EBA\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634", + "properties": { + "hasImmutabilityPolicy": true, + "hasLegalHold": true, + "immutabilityPolicy": { + "etag": "\"8d592d74cb3011a\"", + "properties": { + "immutabilityPeriodSinceCreationInDays": 100, + "state": "Locked" + }, + "updateHistory": [ + { + "immutabilityPeriodSinceCreationInDays": 3, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:11.431403Z", + "update": "put" + }, + { + "immutabilityPeriodSinceCreationInDays": 3, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:13.0907641Z", + "update": "lock" + }, + { + "immutabilityPeriodSinceCreationInDays": 100, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:14.7097716Z", + "update": "extend" + } + ] + }, + "lastModifiedTime": "2018-03-26T05:06:14Z", + "leaseState": "Available", + "leaseStatus": "Unlocked", + "legalHold": { + "hasLegalHold": true, + "tags": [ + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag1", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + }, + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag2", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + }, + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag3", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + } + ] + }, + "publicAccess": "None" + } + } + } + }, + "operationId": "BlobContainers_Get", + "title": "GetContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_AcquireALeaseOnAContainer.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_AcquireALeaseOnAContainer.json new file mode 100644 index 0000000000..3106c569b5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_AcquireALeaseOnAContainer.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "containerName": "container6185", + "monitor": "true", + "parameters": { + "action": "Acquire", + "breakPeriod": null, + "leaseDuration": -1, + "leaseId": null, + "proposedLeaseId": null + }, + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d" + } + } + }, + "operationId": "BlobContainers_Lease", + "title": "Acquire a lease on a container" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_BreakALeaseOnAContainer.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_BreakALeaseOnAContainer.json new file mode 100644 index 0000000000..a0c851249b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_BreakALeaseOnAContainer.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "containerName": "container6185", + "monitor": "true", + "parameters": { + "action": "Break", + "breakPeriod": null, + "leaseDuration": null, + "leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d", + "proposedLeaseId": null + }, + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "leaseTimeSeconds": "0" + } + } + }, + "operationId": "BlobContainers_Lease", + "title": "Break a lease on a container" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListContainers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListContainers.json new file mode 100644 index 0000000000..63b8c941ee --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListContainers.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers?api-version=2022-09-01&$maxpagesize=2&$skipToken=/sto1590/container5103", + "value": [ + { + "name": "container1644", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D589847D51C7DE\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container1644", + "properties": { + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "lastModifiedTime": "2018-03-14T08:20:47Z", + "leaseState": "Available", + "leaseStatus": "Unlocked", + "publicAccess": "Container" + } + }, + { + "name": "container4052", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container4052", + "properties": { + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "lastModifiedTime": "2018-03-14T08:20:47Z", + "leaseState": "Available", + "leaseStatus": "Unlocked", + "publicAccess": "None" + } + } + ] + } + } + }, + "operationId": "BlobContainers_List", + "title": "ListContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListDeletedContainers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListDeletedContainers.json new file mode 100644 index 0000000000..b0a7775fb5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListDeletedContainers.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "$include": "deleted", + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "container1644", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D589847D51C7DE\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container1644", + "properties": { + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "lastModifiedTime": "2018-03-14T08:20:47Z", + "leaseState": "Available", + "leaseStatus": "Unlocked", + "publicAccess": "Container" + } + }, + { + "name": "container4052", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container4052", + "properties": { + "deleted": true, + "deletedTime": "2019-12-14T08:20:47Z", + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "lastModifiedTime": "2018-03-14T08:20:47Z", + "leaseState": "Expired", + "leaseStatus": "Unlocked", + "publicAccess": "None", + "remainingRetentionDays": 30, + "version": "1234567890" + } + } + ] + } + } + }, + "operationId": "BlobContainers_List", + "title": "ListDeletedContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_LockImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_LockImmutabilityPolicy.json new file mode 100644 index 0000000000..93507534cf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_LockImmutabilityPolicy.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "If-Match": "\"8d59f825b721dd3\"", + "accountName": "sto5009", + "api-version": "2022-09-01", + "containerName": "container1631", + "monitor": "true", + "resourceGroupName": "res2702", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d57a8a5edb084a\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res2702/providers/Microsoft.Storage/storageAccounts/sto5009/blobServices/default/containers/container1631/immutabilityPolicies/default", + "properties": { + "immutabilityPeriodSinceCreationInDays": 3, + "state": "Locked" + } + } + } + }, + "operationId": "BlobContainers_LockImmutabilityPolicy", + "title": "LockImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ObjectLevelWorm.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ObjectLevelWorm.json new file mode 100644 index 0000000000..39f5617c04 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ObjectLevelWorm.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "accountName": "sto7069", + "api-version": "2022-09-01", + "containerName": "container6397", + "immutabilityPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res1782", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://endpoint:port/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/{location}/asyncoperations/{operationid}?monitor=true&api-version=2022-09-01" + } + } + }, + "operationId": "BlobContainers_ObjectLevelWorm", + "title": "VersionLevelWormContainerMigration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainers.json new file mode 100644 index 0000000000..384e5ab194 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainers.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "LegalHold": { + "tags": [ + "tag1", + "tag2", + "tag3" + ] + }, + "accountName": "sto7280", + "api-version": "2022-09-01", + "containerName": "container8723", + "monitor": "true", + "resourceGroupName": "res4303", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "hasLegalHold": true, + "tags": [ + "tag1", + "tag2", + "tag3" + ] + } + } + }, + "operationId": "BlobContainers_SetLegalHold", + "title": "SetLegalHoldContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainersWithAllowProtectedAppendWritesAll.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainersWithAllowProtectedAppendWritesAll.json new file mode 100644 index 0000000000..0c3cebc312 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainersWithAllowProtectedAppendWritesAll.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "LegalHold": { + "allowProtectedAppendWritesAll": true, + "tags": [ + "tag1", + "tag2", + "tag3" + ] + }, + "accountName": "sto7280", + "api-version": "2022-09-01", + "containerName": "container8723", + "monitor": "true", + "resourceGroupName": "res4303", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "allowProtectedAppendWritesAll": true, + "hasLegalHold": true, + "tags": [ + "tag1", + "tag2", + "tag3" + ] + } + } + }, + "operationId": "BlobContainers_SetLegalHold", + "title": "SetLegalHoldContainersWithAllowProtectedAppendWritesAll" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Update.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Update.json new file mode 100644 index 0000000000..1aa042f28e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Update.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "blobContainer": { + "properties": { + "metadata": { + "metadata": "true" + }, + "publicAccess": "Container" + } + }, + "containerName": "container6185", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "properties": { + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "metadata": { + "metadata": "true" + }, + "publicAccess": "Container" + } + } + } + }, + "operationId": "BlobContainers_Update", + "title": "UpdateContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicy.json new file mode 100644 index 0000000000..b3f356898c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicy.json @@ -0,0 +1,164 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "blobInventoryPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Metadata" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultInventoryPolicy", + "type": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default", + "properties": { + "lastModifiedTime": "2020-10-05T02:53:39.0932539Z", + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Metadata" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "BlobInventoryPolicies_CreateOrUpdate", + "title": "StorageAccountSetBlobInventoryPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json new file mode 100644 index 0000000000..1809e23c2e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json @@ -0,0 +1,199 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "blobInventoryPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeDeleted": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "ContentType", + "ContentEncoding", + "ContentLanguage", + "ContentCRC64", + "CacheControl", + "Metadata", + "DeletionId", + "Deleted", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold", + "Etag", + "DefaultEncryptionScope", + "DenyEncryptionScopeOverride", + "ImmutableStorageWithVersioningEnabled", + "Deleted", + "Version", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultInventoryPolicy", + "type": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default", + "properties": { + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeDeleted": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "ContentType", + "ContentEncoding", + "ContentLanguage", + "ContentCRC64", + "CacheControl", + "Metadata", + "DeletionId", + "Deleted", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold", + "Etag", + "DefaultEncryptionScope", + "DenyEncryptionScopeOverride", + "ImmutableStorageWithVersioningEnabled", + "Deleted", + "Version", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "BlobInventoryPolicies_CreateOrUpdate", + "title": "StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json new file mode 100644 index 0000000000..ea3e4c1d20 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json @@ -0,0 +1,197 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "blobInventoryPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeDeleted": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Tags", + "ContentType", + "ContentEncoding", + "ContentLanguage", + "ContentCRC64", + "CacheControl", + "Metadata", + "Deleted", + "RemainingRetentionDays" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold", + "Etag", + "DefaultEncryptionScope", + "DenyEncryptionScopeOverride", + "ImmutableStorageWithVersioningEnabled", + "Deleted", + "Version", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultInventoryPolicy", + "type": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default", + "properties": { + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeDeleted": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Tags", + "ContentType", + "ContentEncoding", + "ContentLanguage", + "ContentCRC64", + "CacheControl", + "Metadata", + "Deleted", + "RemainingRetentionDays" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold", + "Etag", + "DefaultEncryptionScope", + "DenyEncryptionScopeOverride", + "ImmutableStorageWithVersioningEnabled", + "Deleted", + "Version", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "BlobInventoryPolicies_CreateOrUpdate", + "title": "StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Delete.json new file mode 100644 index 0000000000..74b346b837 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "blobInventoryPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "BlobInventoryPolicies_Delete", + "title": "StorageAccountDeleteBlobInventoryPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Get.json new file mode 100644 index 0000000000..bfce403b0a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Get.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "blobInventoryPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultInventoryPolicy", + "type": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default", + "properties": { + "lastModifiedTime": "2020-10-05T02:53:39.0932539Z", + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "includeBlobVersions": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Metadata" + ] + }, + "destination": "container1", + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "BlobInventoryPolicies_Get", + "title": "StorageAccountGetBlobInventoryPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_List.json new file mode 100644 index 0000000000..f83ea442d0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_List.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "DefaultInventoryPolicy", + "type": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default", + "properties": { + "lastModifiedTime": "2020-10-05T02:53:39.0932539Z", + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "includeBlobVersions": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Metadata" + ] + }, + "destination": "container1", + "enabled": true + } + ] + } + } + } + ] + } + } + }, + "operationId": "BlobInventoryPolicies_List", + "title": "StorageAccountGetBlobInventoryPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_GetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_GetServiceProperties.json new file mode 100644 index 0000000000..1bdaf78877 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_GetServiceProperties.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "BlobServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "properties": { + "changeFeed": { + "enabled": true, + "retentionInDays": 7 + }, + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x -ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + }, + "defaultServiceVersion": "2017-07-29", + "deleteRetentionPolicy": { + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + } + }, + "operationId": "BlobServices_GetServiceProperties", + "title": "GetBlobServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_List.json new file mode 100644 index 0000000000..cb61fc99a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_List.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "properties": { + "changeFeed": { + "enabled": true, + "retentionInDays": 7 + }, + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x -ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + }, + "defaultServiceVersion": "2017-07-29", + "deleteRetentionPolicy": { + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + ] + } + } + }, + "operationId": "BlobServices_List", + "title": "ListBlobServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutAllowPermanentDelete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutAllowPermanentDelete.json new file mode 100644 index 0000000000..2ee78d0f22 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutAllowPermanentDelete.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "BlobServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "deleteRetentionPolicy": { + "allowPermanentDelete": true, + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "properties": { + "deleteRetentionPolicy": { + "allowPermanentDelete": true, + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + } + } + } + }, + "operationId": "BlobServices_SetServiceProperties", + "title": "BlobServicesPutAllowPermanentDelete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutLastAccessTimeBasedTracking.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutLastAccessTimeBasedTracking.json new file mode 100644 index 0000000000..7adcadf650 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutLastAccessTimeBasedTracking.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "BlobServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "lastAccessTimeTrackingPolicy": { + "name": "AccessTimeTracking", + "blobType": [ + "blockBlob" + ], + "enable": true, + "trackingGranularityInDays": 1 + } + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "properties": { + "lastAccessTimeTrackingPolicy": { + "name": "AccessTimeTracking", + "blobType": [ + "blockBlob" + ], + "enable": true, + "trackingGranularityInDays": 1 + } + } + } + } + }, + "operationId": "BlobServices_SetServiceProperties", + "title": "BlobServicesPutLastAccessTimeBasedTracking" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_PutBlobServices.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_PutBlobServices.json new file mode 100644 index 0000000000..719ad7be35 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_PutBlobServices.json @@ -0,0 +1,173 @@ +{ + "parameters": { + "BlobServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "changeFeed": { + "enabled": true, + "retentionInDays": 7 + }, + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x -ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + }, + "defaultServiceVersion": "2017-07-29", + "deleteRetentionPolicy": { + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "properties": { + "changeFeed": { + "enabled": true, + "retentionInDays": 7 + }, + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x -ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + }, + "defaultServiceVersion": "2017-07-29", + "deleteRetentionPolicy": { + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + } + }, + "operationId": "BlobServices_SetServiceProperties", + "title": "PutBlobServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_Get.json new file mode 100644 index 0000000000..1ad68565be --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2022-09-01", + "deletedAccountName": "sto1125", + "location": "eastus", + "monitor": "true", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto1125", + "type": "Microsoft.Storage/deletedAccounts", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1125", + "properties": { + "creationTime": "2020-08-17T03:35:37.4588848Z", + "deletionTime": "2020-08-17T04:41:37.3442475Z", + "location": "eastus", + "restoreReference": "sto1125|2020-08-17T03:35:37.4588848Z", + "storageAccountResourceId": "/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1125" + } + } + } + }, + "operationId": "DeletedAccounts_Get", + "title": "DeletedAccountGet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_List.json new file mode 100644 index 0000000000..6093d65130 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_List.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2022-09-01", + "monitor": "true", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "sto1125", + "type": "Microsoft.Storage/deletedAccounts", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1125", + "properties": { + "creationTime": "2020-08-17T03:35:37.4588848Z", + "deletionTime": "2020-08-17T04:41:37.3442475Z", + "location": "eastus", + "restoreReference": "sto1125|2020-08-17T03:35:37.4588848Z", + "storageAccountResourceId": "/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1125" + } + }, + { + "name": "sto1126", + "type": "Microsoft.Storage/deletedAccounts", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1126", + "properties": { + "creationTime": "2020-08-19T15:10:21.5902165Z", + "deletionTime": "2020-08-20T06:11:55.1957302Z", + "location": "eastus", + "restoreReference": "sto1126|2020-08-17T03:35:37.4588848Z", + "storageAccountResourceId": "/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1126" + } + } + ] + } + } + }, + "operationId": "DeletedAccounts_List", + "title": "DeletedAccountList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Get.json new file mode 100644 index 0000000000..fe394c421f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "accountName": "{storage-account-name}", + "api-version": "2022-09-01", + "encryptionScopeName": "{encryption-scope-name}", + "monitor": "true", + "resourceGroupName": "resource-group-name", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{encyrption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "source": "Microsoft.Storage", + "state": "Enabled" + } + } + } + }, + "operationId": "EncryptionScopes_Get", + "title": "StorageAccountGetEncryptionScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_List.json new file mode 100644 index 0000000000..5565cb3abf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_List.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "accountName": "{storage-account-name}", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "resource-group-name", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "name": "scope-1", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/scope-1", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "source": "Microsoft.Storage", + "state": "Enabled" + } + }, + { + "name": "scope-2", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/scope-2", + "properties": { + "creationTime": "2018-10-16T04:32:14.3355306Z", + "keyVaultProperties": { + "keyUri": "https://testvault.vault.core.windows.net/keys/key1/863425f1358359c" + }, + "lastModifiedTime": "2018-10-17T06:23:14.4513306Z", + "source": "Microsoft.KeyVault", + "state": "Enabled" + } + } + ] + } + } + }, + "operationId": "EncryptionScopes_List", + "title": "StorageAccountEncryptionScopeList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Patch.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Patch.json new file mode 100644 index 0000000000..7fd74727ed --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Patch.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "accountName": "{storage-account-name}", + "api-version": "2022-09-01", + "encryptionScope": { + "properties": { + "keyVaultProperties": { + "keyUri": "https://testvault.vault.core.windows.net/keys/key1/863425f1358359c" + }, + "source": "Microsoft.KeyVault" + } + }, + "encryptionScopeName": "{encryption-scope-name}", + "monitor": "true", + "resourceGroupName": "resource-group-name", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{encryption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "keyVaultProperties": { + "currentVersionedKeyIdentifier": "https://testvault.vault.core.windows.net/keys/key1/863425f1358359c", + "keyUri": "https://testvault.vault.core.windows.net/keys/key1/863425f1358359c", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "lastModifiedTime": "2018-10-17T06:23:14.4513306Z", + "source": "Microsoft.KeyVault", + "state": "Enabled" + } + } + } + }, + "operationId": "EncryptionScopes_Patch", + "title": "StorageAccountPatchEncryptionScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScope.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScope.json new file mode 100644 index 0000000000..c874c7e8e4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScope.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "accountName": "{storage-account-name}", + "api-version": "2022-09-01", + "encryptionScope": {}, + "encryptionScopeName": "{encryption-scope-name}", + "monitor": "true", + "resourceGroupName": "resource-group-name", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{encryption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "source": "Microsoft.Storage", + "state": "Enabled" + } + } + }, + "201": { + "body": { + "name": "{encryption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "source": "Microsoft.Storage", + "state": "Enabled" + } + } + } + }, + "operationId": "EncryptionScopes_Put", + "title": "StorageAccountPutEncryptionScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json new file mode 100644 index 0000000000..d116b0fae0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "accountName": "{storage-account-name}", + "api-version": "2022-09-01", + "encryptionScope": { + "properties": { + "requireInfrastructureEncryption": true + } + }, + "encryptionScopeName": "{encryption-scope-name}", + "monitor": "true", + "resourceGroupName": "resource-group-name", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{encryption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "requireInfrastructureEncryption": true, + "source": "Microsoft.Storage", + "state": "Enabled" + } + } + }, + "201": { + "body": { + "name": "{encryption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "requireInfrastructureEncryption": true, + "source": "Microsoft.Storage", + "state": "Enabled" + } + } + } + }, + "operationId": "EncryptionScopes_Put", + "title": "StorageAccountPutEncryptionScopeWithInfrastructureEncryption" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_GetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_GetServiceProperties.json new file mode 100644 index 0000000000..7a6ee80ee6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_GetServiceProperties.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "FileServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + } + }, + "operationId": "FileServices_GetServiceProperties", + "title": "GetFileServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_List.json new file mode 100644 index 0000000000..b04a8e483c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_List.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + ] + } + } + }, + "operationId": "FileServices_List", + "title": "ListFileServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServices.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServices.json new file mode 100644 index 0000000000..a2e6a26c4e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServices.json @@ -0,0 +1,153 @@ +{ + "parameters": { + "FileServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + } + }, + "operationId": "FileServices_SetServiceProperties", + "title": "PutFileServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSecureSmbFeatures.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSecureSmbFeatures.json new file mode 100644 index 0000000000..c7325add77 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSecureSmbFeatures.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "FileServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "protocolSettings": { + "smb": { + "authenticationMethods": "NTLMv2;Kerberos", + "channelEncryption": "AES-128-CCM;AES-128-GCM;AES-256-GCM", + "kerberosTicketEncryption": "RC4-HMAC;AES-256", + "versions": "SMB2.1;SMB3.0;SMB3.1.1" + } + } + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "properties": { + "protocolSettings": { + "smb": { + "authenticationMethods": "NTLMv2;Kerberos", + "channelEncryption": "AES-128-CCM;AES-128-GCM;AES-256-GCM", + "kerberosTicketEncryption": "RC4-HMAC;AES-256", + "versions": "SMB2.1;SMB3.0;SMB3.1.1" + } + } + }, + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + } + } + } + }, + "operationId": "FileServices_SetServiceProperties", + "title": "PutFileServices_EnableSecureSmbFeatures" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSmbMultichannel.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSmbMultichannel.json new file mode 100644 index 0000000000..0476733999 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSmbMultichannel.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "FileServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "protocolSettings": { + "smb": { + "multichannel": { + "enabled": true + } + } + } + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "properties": { + "protocolSettings": { + "smb": { + "multichannel": { + "enabled": true + } + } + } + }, + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + } + } + } + }, + "operationId": "FileServices_SetServiceProperties", + "title": "PutFileServices_EnableSMBMultichannel" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_CreateNfsShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_CreateNfsShares.json new file mode 100644 index 0000000000..b42600491d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_CreateNfsShares.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "accountName": "sto666", + "api-version": "2022-09-01", + "fileShare": { + "properties": { + "enabledProtocols": "NFS" + } + }, + "monitor": "true", + "resourceGroupName": "res346", + "shareName": "share1235", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share1235", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235", + "properties": { + "enabledProtocols": "NFS" + } + } + }, + "201": { + "body": { + "name": "share1235", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235", + "properties": { + "enabledProtocols": "NFS" + } + } + } + }, + "operationId": "FileShares_Create", + "title": "Create NFS Shares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutShares.json new file mode 100644 index 0000000000..bbafca0a7f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutShares.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "fileShare": {}, + "monitor": "true", + "resourceGroupName": "res3376", + "shareName": "share6185", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share6185", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185" + } + }, + "201": { + "body": { + "name": "share6185", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185" + } + } + }, + "operationId": "FileShares_Create", + "title": "PutShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutSharesWithAccessTier.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutSharesWithAccessTier.json new file mode 100644 index 0000000000..53e6183cec --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutSharesWithAccessTier.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "accountName": "sto666", + "api-version": "2022-09-01", + "fileShare": { + "properties": { + "accessTier": "Hot" + } + }, + "monitor": "true", + "resourceGroupName": "res346", + "shareName": "share1235", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share1235", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235", + "properties": { + "accessTier": "Hot" + } + } + }, + "201": { + "body": { + "name": "share1235", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235", + "properties": { + "accessTier": "Hot" + } + } + } + }, + "operationId": "FileShares_Create", + "title": "PutShares with Access Tier" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Delete.json new file mode 100644 index 0000000000..d7a6ea2e0d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto4506", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4079", + "shareName": "share9689", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "FileShares_Delete", + "title": "DeleteShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShareStats.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShareStats.json new file mode 100644 index 0000000000..e9e9e9779d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShareStats.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "$expand": "stats", + "accountName": "sto6217", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9871", + "shareName": "share1634", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share1634", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D592D74CC20EBA\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634", + "properties": { + "lastModifiedTime": "2019-05-26T05:06:14Z", + "shareQuota": 1024, + "shareUsageBytes": 652945 + } + } + } + }, + "operationId": "FileShares_Get", + "title": "GetShareStats" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShares.json new file mode 100644 index 0000000000..ff7b406b63 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShares.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "sto6217", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9871", + "shareName": "share1634", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share1634", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D592D74CC20EBA\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634", + "properties": { + "lastModifiedTime": "2019-05-26T05:06:14Z", + "shareQuota": 1024 + } + } + } + }, + "operationId": "FileShares_Get", + "title": "GetShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_AcquireALeaseOnAShare.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_AcquireALeaseOnAShare.json new file mode 100644 index 0000000000..c35eae0f42 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_AcquireALeaseOnAShare.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "action": "Acquire", + "breakPeriod": null, + "leaseDuration": -1, + "leaseId": null, + "proposedLeaseId": null + }, + "resourceGroupName": "res3376", + "shareName": "share124", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d" + } + } + }, + "operationId": "FileShares_Lease", + "title": "Acquire a lease on a share" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_BreakALeaseOnAShare.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_BreakALeaseOnAShare.json new file mode 100644 index 0000000000..4de3e7cb2c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_BreakALeaseOnAShare.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "action": "Break", + "breakPeriod": null, + "leaseDuration": null, + "leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d", + "proposedLeaseId": null + }, + "resourceGroupName": "res3376", + "shareName": "share12", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "leaseTimeSeconds": "0" + } + } + }, + "operationId": "FileShares_Lease", + "title": "Break a lease on a share" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListDeletedShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListDeletedShares.json new file mode 100644 index 0000000000..6a18e10c1a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListDeletedShares.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "$expand": "deleted", + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "share1644", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847D51C7DE\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644_1234567890", + "properties": { + "deleted": true, + "deletedTime": "2019-12-14T08:20:47Z", + "lastModifiedTime": "2019-05-14T08:20:47Z", + "remainingRetentionDays": 30, + "shareQuota": 1024, + "version": "1234567890" + } + }, + { + "name": "share4052", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052", + "properties": { + "lastModifiedTime": "2019-05-14T08:20:47Z", + "shareQuota": 1024 + } + } + ] + } + } + }, + "operationId": "FileShares_List", + "title": "ListDeletedShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShareSnapshots.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShareSnapshots.json new file mode 100644 index 0000000000..2dfaa824a3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShareSnapshots.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "$expand": "snapshots", + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "share4052", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052", + "properties": { + "lastModifiedTime": "2020-10-26T05:47:05.0000000Z", + "shareQuota": 1024 + } + }, + { + "name": "share4052", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052", + "properties": { + "lastModifiedTime": "2020-10-26T05:47:05.0000000Z", + "shareQuota": 1024, + "snapshotTime": "2020-10-26T05:48:07.0000000Z" + } + } + ] + } + } + }, + "operationId": "FileShares_List", + "title": "ListShareSnapshots" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShares.json new file mode 100644 index 0000000000..13f1f9ffe7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShares.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares?api-version=2022-09-01&$maxpagesize=2&$skipToken=/sto1590/share5103", + "value": [ + { + "name": "share1644", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847D51C7DE\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644", + "properties": { + "lastModifiedTime": "2019-05-14T08:20:47Z", + "shareQuota": 1024 + } + }, + { + "name": "share4052", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052", + "properties": { + "lastModifiedTime": "2019-05-14T08:20:47Z", + "shareQuota": 1024 + } + } + ] + } + } + }, + "operationId": "FileShares_List", + "title": "ListShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Restore.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Restore.json new file mode 100644 index 0000000000..ed73b3b7d9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Restore.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "deletedShare": { + "deletedShareName": "share1249", + "deletedShareVersion": "1234567890" + }, + "monitor": "true", + "resourceGroupName": "res3376", + "shareName": "share1249", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {} + }, + "operationId": "FileShares_Restore", + "title": "RestoreShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShareAcls.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShareAcls.json new file mode 100644 index 0000000000..346853407b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShareAcls.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "fileShare": { + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2021-05-01T08:49:37.0000000Z", + "permission": "rwd", + "startTime": "2021-04-01T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + } + ] + } + }, + "monitor": "true", + "resourceGroupName": "res3376", + "shareName": "share6185", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share6185", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185", + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2021-05-01T08:49:37.0000000Z", + "permission": "rwd", + "startTime": "2021-04-01T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + } + ] + } + } + } + }, + "operationId": "FileShares_Update", + "title": "UpdateShareAcls" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShares.json new file mode 100644 index 0000000000..534fe3b90d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShares.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "fileShare": { + "properties": { + "metadata": { + "type": "image" + } + } + }, + "monitor": "true", + "resourceGroupName": "res3376", + "shareName": "share6185", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share6185", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185", + "properties": { + "metadata": { + "type": "image" + } + } + } + } + }, + "operationId": "FileShares_Update", + "title": "UpdateShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_CreateLocalUser.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_CreateLocalUser.json new file mode 100644 index 0000000000..7ab6b80679 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_CreateLocalUser.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "properties": { + "properties": { + "hasSshPassword": true, + "homeDirectory": "homedirectory", + "permissionScopes": [ + { + "permissions": "rwd", + "resourceName": "share1", + "service": "file" + }, + { + "permissions": "rw", + "resourceName": "share2", + "service": "file" + } + ], + "sshAuthorizedKeys": [ + { + "description": "key name", + "key": "ssh-rsa keykeykeykeykey=" + } + ] + } + }, + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": { + "body": { + "name": "user1", + "type": "Microsoft.Storage/storageAccounts/localUsers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1", + "properties": { + "homeDirectory": "homedirectory", + "permissionScopes": [ + { + "permissions": "rwd", + "resourceName": "share1", + "service": "file" + }, + { + "permissions": "rw", + "resourceName": "share2", + "service": "file" + } + ], + "sid": "S-1-2-0-125132-153423-36235-1000", + "sshAuthorizedKeys": [ + { + "description": "key name", + "key": "ssh-rsa keykeykeykeykey=" + } + ] + } + } + } + }, + "operationId": "LocalUsers_CreateOrUpdate", + "title": "CreateLocalUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_UpdateLocalUser.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_UpdateLocalUser.json new file mode 100644 index 0000000000..1ebeb4da39 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_UpdateLocalUser.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "properties": { + "properties": { + "hasSharedKey": false, + "hasSshKey": false, + "hasSshPassword": false, + "homeDirectory": "homedirectory2" + } + }, + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": { + "body": { + "name": "user1", + "type": "Microsoft.Storage/storageAccounts/localUsers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1", + "properties": { + "hasSharedKey": false, + "hasSshKey": false, + "hasSshPassword": false, + "homeDirectory": "homedirectory2", + "sid": "S-1-2-0-3528686663-1788730862-2791910117-1000" + } + } + } + }, + "operationId": "LocalUsers_CreateOrUpdate", + "title": "UpdateLocalUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Delete.json new file mode 100644 index 0000000000..ebd417fa37 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "LocalUsers_Delete", + "title": "DeleteLocalUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Get.json new file mode 100644 index 0000000000..a82bbd39bc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Get.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": { + "body": { + "name": "user1", + "type": "Microsoft.Storage/storageAccounts/localUsers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1", + "properties": { + "hasSharedKey": true, + "hasSshKey": true, + "hasSshPassword": true, + "homeDirectory": "homedirectory", + "permissionScopes": [ + { + "permissions": "rwd", + "resourceName": "share1", + "service": "file" + }, + { + "permissions": "rw", + "resourceName": "share2", + "service": "file" + } + ], + "sid": "S-1-2-0-125132-153423-36235-1000" + } + } + } + }, + "operationId": "LocalUsers_Get", + "title": "GetLocalUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_List.json new file mode 100644 index 0000000000..7eb0119d1a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_List.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "user1", + "type": "Microsoft.Storage/storageAccounts/localUsers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1", + "properties": { + "hasSharedKey": true, + "hasSshKey": true, + "hasSshPassword": true, + "homeDirectory": "homedirectory", + "permissionScopes": [ + { + "permissions": "rwd", + "resourceName": "share1", + "service": "file" + }, + { + "permissions": "rw", + "resourceName": "share2", + "service": "file" + } + ], + "sid": "S-1-2-0-125132-153423-36235-1000" + } + }, + { + "name": "user2", + "type": "Microsoft.Storage/storageAccounts/localUsers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/loalUsers/user2", + "properties": { + "hasSharedKey": true, + "hasSshKey": false, + "hasSshPassword": true, + "permissionScopes": [ + { + "permissions": "rw", + "resourceName": "resourcename", + "service": "blob" + } + ], + "sid": "S-1-2-0-533672-235636-66334-1001" + } + } + ] + } + } + }, + "operationId": "LocalUsers_List", + "title": "ListLocalUsers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_ListKeys.json new file mode 100644 index 0000000000..8be916ca3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_ListKeys.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": { + "body": { + "sharedKey": "", + "sshAuthorizedKeys": [ + { + "description": "key name", + "key": "ssh-rsa keykeykeykeykew=" + } + ] + } + } + }, + "operationId": "LocalUsers_ListKeys", + "title": "ListLocalUserKeys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_RegeneratePassword.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_RegeneratePassword.json new file mode 100644 index 0000000000..910f3146fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_RegeneratePassword.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": { + "body": { + "sshPassword": "" + } + } + }, + "operationId": "LocalUsers_RegeneratePassword", + "title": "RegenerateLocalUserPassword" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicies.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicies.json new file mode 100644 index 0000000000..d9872d51bf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicies.json @@ -0,0 +1,182 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + }, + { + "name": "olcmtest2", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + } + }, + "filters": { + "blobIndexMatch": [ + { + "name": "tag1", + "op": "==", + "value": "val1" + }, + { + "name": "tag2", + "op": "==", + "value": "val2" + } + ], + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer2" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + }, + { + "name": "olcmtest2", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + } + }, + "filters": { + "blobIndexMatch": [ + { + "name": "tag1", + "op": "==", + "value": "val1" + }, + { + "name": "tag2", + "op": "==", + "value": "val2" + } + ], + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer2" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions.json new file mode 100644 index 0000000000..15a301f9f1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions.json @@ -0,0 +1,92 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2021-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyColdTierActions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyColdTierActions.json new file mode 100644 index 0000000000..5693609745 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyColdTierActions.json @@ -0,0 +1,130 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCold": { + "daysAfterModificationGreaterThan": 30 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + }, + "tierToCold": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 30 + }, + "tierToCold": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2021-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCold": { + "daysAfterModificationGreaterThan": 30 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + }, + "tierToCold": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 30 + }, + "tierToCold": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicyColdTierActions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json new file mode 100644 index 0000000000..5e4dd9a56a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 90 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 90 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 90 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 90 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 90 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 90 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicyForBlockAndAppendBlobs" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyHotTierActions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyHotTierActions.json new file mode 100644 index 0000000000..4aa50777af --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyHotTierActions.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "tierToHot": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "tierToHot": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "tierToHot": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2021-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "tierToHot": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "tierToHot": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "tierToHot": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicyHotTierActions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastAccessTimeBasedBlobActions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastAccessTimeBasedBlobActions.json new file mode 100644 index 0000000000..9fbf02daa8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastAccessTimeBasedBlobActions.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterLastAccessTimeGreaterThan": 1000 + }, + "enableAutoTierToHotFromCool": true, + "tierToArchive": { + "daysAfterLastAccessTimeGreaterThan": 90 + }, + "tierToCool": { + "daysAfterLastAccessTimeGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterLastAccessTimeGreaterThan": 1000 + }, + "enableAutoTierToHotFromCool": true, + "tierToArchive": { + "daysAfterLastAccessTimeGreaterThan": 90 + }, + "tierToCool": { + "daysAfterLastAccessTimeGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastTierChangeTimeActions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastTierChangeTimeActions.json new file mode 100644 index 0000000000..df907098d1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastTierChangeTimeActions.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterLastTierChangeGreaterThan": 120, + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "tierToArchive": { + "daysAfterCreationGreaterThan": 30, + "daysAfterLastTierChangeGreaterThan": 90 + } + }, + "version": { + "tierToArchive": { + "daysAfterCreationGreaterThan": 30, + "daysAfterLastTierChangeGreaterThan": 90 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterLastTierChangeGreaterThan": 120, + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "tierToArchive": { + "daysAfterCreationGreaterThan": 30, + "daysAfterLastTierChangeGreaterThan": 90 + } + }, + "version": { + "tierToArchive": { + "daysAfterCreationGreaterThan": 30, + "daysAfterLastTierChangeGreaterThan": 90 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicy_LastTierChangeTimeActions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyWithSnapshotAndVersion.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyWithSnapshotAndVersion.json new file mode 100644 index 0000000000..458a9e246a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyWithSnapshotAndVersion.json @@ -0,0 +1,136 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicyWithSnapshotAndVersion" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Delete.json new file mode 100644 index 0000000000..f25c2d4a53 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ManagementPolicies_Delete", + "title": "StorageAccountDeleteManagementPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Get.json new file mode 100644 index 0000000000..2fe4aaea77 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Get.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T03:01:55.7168089Z", + "policy": { + "rules": [ + { + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_Get", + "title": "StorageAccountGetManagementPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnDestination.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnDestination.json new file mode 100644 index 0000000000..37c965f6a5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnDestination.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "accountName": "dst112", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "default", + "properties": { + "properties": { + "destinationAccount": "dst112", + "rules": [ + { + "destinationContainer": "dcont139", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "sourceContainer": "scont139" + } + ], + "sourceAccount": "src1122" + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "2a20bb73-5717-4635-985a-5d4cf777438f", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/dst112/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "destinationAccount": "dst112", + "policyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "rules": [ + { + "destinationContainer": "destContainer1", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "sourceContainer1" + } + ], + "sourceAccount": "src1122" + } + } + } + }, + "operationId": "ObjectReplicationPolicies_CreateOrUpdate", + "title": "StorageAccountCreateObjectReplicationPolicyOnDestination" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnSource.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnSource.json new file mode 100644 index 0000000000..380b839ba6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnSource.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "accountName": "src1122", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "properties": { + "destinationAccount": "dst112", + "rules": [ + { + "destinationContainer": "dcont139", + "filters": { + "minCreationTime": "2020-02-19T16:05:00Z", + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "scont139" + } + ], + "sourceAccount": "src1122" + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "2a20bb73-5717-4635-985a-5d4cf777438f", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/src1122/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "destinationAccount": "dst112", + "enabledTime": "2019-06-08T03:01:55.7168089Z", + "policyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "rules": [ + { + "destinationContainer": "destContainer1", + "filters": { + "minCreationTime": "2020-02-19T16:05:00Z", + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "sourceContainer1" + } + ], + "sourceAccount": "src1122" + } + } + } + }, + "operationId": "ObjectReplicationPolicies_CreateOrUpdate", + "title": "StorageAccountCreateObjectReplicationPolicyOnSource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnDestination.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnDestination.json new file mode 100644 index 0000000000..ecefc4cce2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnDestination.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "accountName": "dst112", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "properties": { + "destinationAccount": "dst112", + "rules": [ + { + "destinationContainer": "dcont139", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "scont139" + }, + { + "destinationContainer": "dcont179", + "sourceContainer": "scont179" + } + ], + "sourceAccount": "src1122" + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "2a20bb73-5717-4635-985a-5d4cf777438f", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/dst112/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "destinationAccount": "dst112", + "policyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "rules": [ + { + "destinationContainer": "destContainer1", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "sourceContainer1" + }, + { + "destinationContainer": "dcont179", + "ruleId": "cfbb4bc2-8b60-429f-b05a-d1e0942b33b2", + "sourceContainer": "scont179" + } + ], + "sourceAccount": "src1122" + } + } + } + }, + "operationId": "ObjectReplicationPolicies_CreateOrUpdate", + "title": "StorageAccountUpdateObjectReplicationPolicyOnDestination" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnSource.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnSource.json new file mode 100644 index 0000000000..9106f661b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnSource.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "accountName": "src1122", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "properties": { + "destinationAccount": "dst112", + "rules": [ + { + "destinationContainer": "dcont139", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "scont139" + }, + { + "destinationContainer": "dcont179", + "ruleId": "cfbb4bc2-8b60-429f-b05a-d1e0942b33b2", + "sourceContainer": "scont179" + } + ], + "sourceAccount": "src1122" + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "2a20bb73-5717-4635-985a-5d4cf777438f", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/src1122/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "destinationAccount": "dst112", + "enabledTime": "2019-06-08T03:01:55.7168089Z", + "policyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "rules": [ + { + "destinationContainer": "destContainer1", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "sourceContainer1" + }, + { + "destinationContainer": "dcont179", + "ruleId": "cfbb4bc2-8b60-429f-b05a-d1e0942b33b2", + "sourceContainer": "scont179" + } + ], + "sourceAccount": "src1122" + } + } + } + }, + "operationId": "ObjectReplicationPolicies_CreateOrUpdate", + "title": "StorageAccountUpdateObjectReplicationPolicyOnSource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Delete.json new file mode 100644 index 0000000000..b6a2b64493 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "{objectReplicationPolicy-Id}", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ObjectReplicationPolicies_Delete", + "title": "StorageAccountDeleteObjectReplicationPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Get.json new file mode 100644 index 0000000000..35b0049b21 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Get.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "{objectReplicationPolicy-Id}", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{objectReplicationPolicy-Id}", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/objectReplicationPolicies/{objectReplicationPolicy-Id}", + "properties": { + "destinationAccount": "destAccount1", + "enabledTime": "2019-06-08T03:01:55.7168089Z", + "policyId": "{objectReplicationPolicy-Id}", + "rules": [ + { + "destinationContainer": "destContainer1", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "sourceContainer": "sourceContainer1" + }, + { + "destinationContainer": "destContainer1", + "filters": { + "prefixMatch": [ + "blobC", + "blobD" + ] + }, + "sourceContainer": "sourceContainer1" + } + ], + "sourceAccount": "sto2527" + } + } + } + }, + "operationId": "ObjectReplicationPolicies_Get", + "title": "StorageAccountGetObjectReplicationPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_List.json new file mode 100644 index 0000000000..318ef4e4af --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_List.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "c6c23999-fd4e-433a-bcf9-1db69d27cd8a", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/objectReplicationPolicies/c6c23999-fd4e-433a-bcf9-1db69d27cd8a", + "properties": { + "destinationAccount": "destAccount1", + "sourceAccount": "sto2527" + } + }, + { + "name": "141d23dc-8958-4b48-b6e6-5a40bf1af116", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/objectReplicationPolicies/141d23dc-8958-4b48-b6e6-5a40bf1af116", + "properties": { + "destinationAccount": "destAccount2", + "sourceAccount": "sto2527" + } + } + ] + } + } + }, + "operationId": "ObjectReplicationPolicies_List", + "title": "StorageAccountListObjectReplicationPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Delete.json new file mode 100644 index 0000000000..417d613056 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "PrivateEndpointConnections_Delete", + "title": "StorageAccountDeletePrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Get.json new file mode 100644 index 0000000000..cbc22acab0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Get.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.Storage/storageAccounts/privateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "PrivateEndpointConnections_Get", + "title": "StorageAccountGetPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_List.json new file mode 100644 index 0000000000..48c63c31c9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_List.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.Storage/storageAccounts/privateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + }, + { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.Storage/storageAccounts/privateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest02" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "PrivateEndpointConnections_List", + "title": "StorageAccountListPrivateEndpointConnections" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Put.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Put.json new file mode 100644 index 0000000000..c312f1ff28 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Put.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "properties": { + "properties": { + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "status": "Approved" + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.Storage/storageAccounts/privateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "PrivateEndpointConnections_Put", + "title": "StorageAccountPutPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateLinkResources_ListByStorageAccount.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateLinkResources_ListByStorageAccount.json new file mode 100644 index 0000000000..8aaa066b45 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateLinkResources_ListByStorageAccount.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "blob", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/blob", + "properties": { + "groupId": "blob", + "requiredMembers": [ + "blob" + ], + "requiredZoneNames": [ + "privatelink.blob.core.windows.net" + ] + } + }, + { + "name": "blob_secondary", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/blob_secondary", + "properties": { + "groupId": "blob_secondary", + "requiredMembers": [ + "blob_secondary" + ], + "requiredZoneNames": [ + "privatelink.blob.core.windows.net" + ] + } + }, + { + "name": "table", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/table", + "properties": { + "groupId": "table", + "requiredMembers": [ + "table" + ], + "requiredZoneNames": [ + "privatelink.table.core.windows.net" + ] + } + }, + { + "name": "table_secondary", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/table_secondary", + "properties": { + "groupId": "table_secondary", + "requiredMembers": [ + "table_secondary" + ], + "requiredZoneNames": [ + "privatelink.table.core.windows.net" + ] + } + }, + { + "name": "dfs", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/dfs", + "properties": { + "groupId": "dfs", + "requiredMembers": [ + "dfs" + ], + "requiredZoneNames": [ + "privatelink.dfs.core.windows.net" + ] + } + }, + { + "name": "dfs_secondary", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/dfs_secondary", + "properties": { + "groupId": "dfs_secondary", + "requiredMembers": [ + "dfs_secondary" + ], + "requiredZoneNames": [ + "privatelink.dfs.core.windows.net" + ] + } + } + ] + } + } + }, + "operationId": "PrivateLinkResources_ListByStorageAccount", + "title": "StorageAccountListPrivateLinkResources" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_GetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_GetServiceProperties.json new file mode 100644 index 0000000000..cee806bd5f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_GetServiceProperties.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "queueServiceName": "default", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/queueServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/queueServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + } + }, + "operationId": "QueueServices_GetServiceProperties", + "title": "QueueServicesGet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_List.json new file mode 100644 index 0000000000..48b34d2dba --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_List.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/queueServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/queueServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + ] + } + } + }, + "operationId": "QueueServices_List", + "title": "QueueServicesList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_SetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_SetServiceProperties.json new file mode 100644 index 0000000000..f541b0a1ef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_SetServiceProperties.json @@ -0,0 +1,149 @@ +{ + "parameters": { + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + }, + "queueServiceName": "default", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/queueServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/queueServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + } + }, + "operationId": "QueueServices_SetServiceProperties", + "title": "QueueServicesPut" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPut.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPut.json new file mode 100644 index 0000000000..5d116a0d30 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPut.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "queue": {}, + "queueName": "queue6185", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "queue6185", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185" + } + } + }, + "operationId": "Queue_Create", + "title": "QueueOperationPut" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPutWithMetadata.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPutWithMetadata.json new file mode 100644 index 0000000000..62a7b99277 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPutWithMetadata.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "queue": { + "properties": { + "metadata": { + "sample1": "meta1", + "sample2": "meta2" + } + } + }, + "queueName": "queue6185", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "queue6185", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185", + "properties": { + "metadata": { + "sample1": "meta1", + "sample2": "meta2" + } + } + } + } + }, + "operationId": "Queue_Create", + "title": "QueueOperationPutWithMetadata" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Delete.json new file mode 100644 index 0000000000..cec8e4659a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "queueName": "queue6185", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "204": {} + }, + "operationId": "Queue_Delete", + "title": "QueueOperationDelete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Get.json new file mode 100644 index 0000000000..062d4a18d8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "queueName": "queue6185", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "queue6185", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185", + "properties": { + "metadata": { + "sample1": "meta1", + "sample2": "meta2" + } + } + } + } + }, + "operationId": "Queue_Get", + "title": "QueueOperationGet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_List.json new file mode 100644 index 0000000000..6afa17ca58 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_List.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues?api-version=2022-09-01&$maxpagesize=2&$skipToken=/sto328/queue6187", + "value": [ + { + "name": "queue6185", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185", + "properties": { + "metadata": { + "sample1": "meta1", + "sample2": "meta2" + } + } + }, + { + "name": "queue6186", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6186", + "properties": { + "metadata": { + "sample1": "meta1", + "sample2": "meta2" + } + } + } + ] + } + } + }, + "operationId": "Queue_List", + "title": "QueueOperationList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Update.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Update.json new file mode 100644 index 0000000000..cccabeb7ec --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Update.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "queue": {}, + "queueName": "queue6185", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "queue6185", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185" + } + } + }, + "operationId": "Queue_Update", + "title": "QueueOperationPatch" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_AbortHierarchicalNamespaceMigration.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_AbortHierarchicalNamespaceMigration.json new file mode 100644 index 0000000000..c43fccbae3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_AbortHierarchicalNamespaceMigration.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "accountName": "sto2434", + "api-version": "2022-09-01", + "resourceGroupName": "res4228", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://endpoint:port/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/{location}/asyncoperations/{operationid}?monitor=true&api-version=2022-09-01" + } + } + }, + "operationId": "StorageAccounts_AbortHierarchicalNamespaceMigration", + "title": "StorageAccountAbortHierarchicalNamespaceMigration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_CheckNameAvailability.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_CheckNameAvailability.json new file mode 100644 index 0000000000..2204f5e2a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_CheckNameAvailability.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "accountName": { + "name": "sto3363", + "type": "Microsoft.Storage/storageAccounts" + }, + "api-version": "2022-09-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nameAvailable": true + } + } + }, + "operationId": "StorageAccounts_CheckNameAvailability", + "title": "StorageAccountCheckNameAvailability" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_NfsV3AccountCreate.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_NfsV3AccountCreate.json new file mode 100644 index 0000000000..f628c9432c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_NfsV3AccountCreate.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "kind": "BlockBlobStorage", + "location": "eastus", + "properties": { + "isHnsEnabled": true, + "isNfsV3Enabled": true, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12" + } + ] + }, + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Premium_LRS" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "BlockBlobStorage", + "location": "eastus", + "properties": { + "isHnsEnabled": true, + "isNfsV3Enabled": true, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12" + } + ] + }, + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "NfsV3AccountCreate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreate.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreate.json new file mode 100644 index 0000000000..dc8fdee9f4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreate.json @@ -0,0 +1,151 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "defaultToOAuthAuthentication": false, + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToAad.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToAad.json new file mode 100644 index 0000000000..3e187db0da --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToAad.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "AAD", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "AAD", + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateAllowedCopyScopeToAAD" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToPrivateLink.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToPrivateLink.json new file mode 100644 index 0000000000..aece4b54ff --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToPrivateLink.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "PrivateLink", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "PrivateLink", + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateAllowedCopyScopeToPrivateLink" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDisallowPublicNetworkAccess.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDisallowPublicNetworkAccess.json new file mode 100644 index 0000000000..7c324e4acb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDisallowPublicNetworkAccess.json @@ -0,0 +1,150 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "publicNetworkAccess": "Disabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Disabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateDisallowPublicNetworkAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json new file mode 100644 index 0000000000..465bea7dd6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json @@ -0,0 +1,153 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "defaultToOAuthAuthentication": false, + "dnsEndpointType": "AzureDnsZone", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "dnsEndpointType": "AzureDnsZone", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.z24.blob.storage.azure.net/", + "dfs": "https://sto4445.z24.dfs.storage.azure.net/", + "file": "https://sto4445.z24.file.storage.azure.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.z24.blob.storage.azure.net/", + "dfs": "https://sto4445-internetrouting.z24.dfs.storage.azure.net/", + "file": "https://sto4445-internetrouting.z24.file.storage.azure.net/", + "web": "https://sto4445-internetrouting.z24.web.storage.azure.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.z24.blob.storage.azure.net/", + "dfs": "https://sto4445-microsoftrouting.z24.dfs.storage.azure.net/", + "file": "https://sto4445-microsoftrouting.z24.file.storage.azure.net/", + "queue": "https://sto4445-microsoftrouting.z24.queue.storage.azure.net/", + "table": "https://sto4445-microsoftrouting.z24.table.storage.azure.net/", + "web": "https://sto4445-microsoftrouting.z24.web.storage.azure.net/" + }, + "queue": "https://sto4445.z24.queue.storage.azure.net/", + "table": "https://sto4445.z24.table.storage.azure.net/", + "web": "https://sto4445.z24.web.storage.azure.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateDnsEndpointTypeToAzureDnsZone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToStandard.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToStandard.json new file mode 100644 index 0000000000..2d92360768 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToStandard.json @@ -0,0 +1,153 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "defaultToOAuthAuthentication": false, + "dnsEndpointType": "Standard", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "dnsEndpointType": "Standard", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateDnsEndpointTypeToStandard" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateEnablePublicNetworkAccess.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateEnablePublicNetworkAccess.json new file mode 100644 index 0000000000..75b6f34dc2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateEnablePublicNetworkAccess.json @@ -0,0 +1,150 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "publicNetworkAccess": "Enabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateEnablePublicNetworkAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreatePremiumBlockBlobStorage.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreatePremiumBlockBlobStorage.json new file mode 100644 index 0000000000..ebb3c0feac --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreatePremiumBlockBlobStorage.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "kind": "BlockBlobStorage", + "location": "eastus", + "properties": { + "allowSharedKeyAccess": true, + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "minimumTlsVersion": "TLS1_2" + }, + "sku": { + "name": "Premium_LRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "accessTier": "Premium", + "allowBlobPublicAccess": false, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreatePremiumBlockBlobStorage" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedEncryptionIdentityWithCmk.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedEncryptionIdentityWithCmk.json new file mode 100644 index 0000000000..2ae8f04303 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedEncryptionIdentityWithCmk.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {} + } + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + } + }, + "sku": { + "name": "Standard_LRS" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": { + "clientId": "fbaa6278-1ecc-415c-819f-6e2058d3acb5", + "principalId": "8d823284-1060-42a5-9ec4-ed3d831e24d7" + } + } + }, + "kind": "StorageV2", + "location": "eastus", + "properties": { + "accessTier": "Hot", + "creationTime": "2020-12-15T00:43:14.0839093Z", + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + } + } + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "tags": {} + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateUserAssignedEncryptionIdentityWithCMK" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json new file mode 100644 index 0000000000..359bc1b1b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json @@ -0,0 +1,122 @@ +{ + "parameters": { + "accountName": "sto131918", + "api-version": "2022-09-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {} + } + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "encryption": { + "identity": { + "federatedIdentityClientId": "f83c6b1b-4d34-47e4-bb34-9d83df58b540", + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + } + }, + "sku": { + "name": "Standard_LRS" + } + }, + "resourceGroupName": "res131918", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": { + "clientId": "fbaa6278-1ecc-415c-819f-6e2058d3acb5", + "principalId": "8d823284-1060-42a5-9ec4-ed3d831e24d7" + } + } + }, + "kind": "StorageV2", + "location": "eastus", + "properties": { + "accessTier": "Hot", + "creationTime": "2020-12-15T00:43:14.0839093Z", + "encryption": { + "identity": { + "federatedIdentityClientId": "f83c6b1b-4d34-47e4-bb34-9d83df58b540", + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + } + } + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "tags": {} + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateWithImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateWithImmutabilityPolicy.json new file mode 100644 index 0000000000..4a69de864d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateWithImmutabilityPolicy.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "immutableStorageWithVersioning": { + "enabled": true, + "immutabilityPolicy": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 15, + "state": "Unlocked" + } + } + }, + "sku": { + "name": "Standard_GRS" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T13:25:33.4863236Z", + "immutableStorageWithVersioning": { + "enabled": true, + "immutabilityPolicy": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 15, + "state": "Unlocked" + } + }, + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded" + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateWithImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Delete.json new file mode 100644 index 0000000000..73351c108d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "accountName": "sto2434", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4228", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "StorageAccounts_Delete", + "title": "StorageAccountDelete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailover.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailover.json new file mode 100644 index 0000000000..497d33c22a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailover.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "accountName": "sto2434", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4228", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://endpoint:port/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/{location}/asyncoperations/{operationid}?monitor=true&api-version=2022-09-01" + } + } + }, + "operationId": "StorageAccounts_Failover", + "title": "StorageAccountFailover" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailoverPlanned.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailoverPlanned.json new file mode 100644 index 0000000000..6ed4911a71 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailoverPlanned.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "accountName": "sto2434", + "api-version": "2022-09-01", + "failoverType": "Planned", + "monitor": "true", + "resourceGroupName": "res4228", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://endpoint:port/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/{location}/asyncoperations/{operationid}?monitor=true&api-version=2022-09-01" + } + } + }, + "operationId": "StorageAccounts_Failover", + "title": "StorageAccountFailoverPlanned" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetAsyncSkuConversionStatus.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetAsyncSkuConversionStatus.json new file mode 100644 index 0000000000..f1b47fff92 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetAsyncSkuConversionStatus.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "StorageV2", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "storageAccountSkuConversionStatus": { + "endTime": "2021-09-02T02:53:39.0932539Z", + "skuConversionStatus": "InProgress", + "startTime": "2022-09-01T02:53:39.0932539Z", + "targetSkuName": "Standard_GRS" + } + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + } + }, + "operationId": "StorageAccounts_GetProperties", + "title": "StorageAccountGetAsyncSkuConversionStatus" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetProperties.json new file mode 100644 index 0000000000..2e29a43255 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetProperties.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "geoReplicationStats": { + "canFailover": true, + "lastSyncTime": "2018-10-30T00:25:34Z", + "status": "Live" + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_GetProperties", + "title": "StorageAccountGetProperties" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkEnabled.json new file mode 100644 index 0000000000..3bfa4418e0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkEnabled.json @@ -0,0 +1,106 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "identity": { + "type": "SystemAssigned", + "principalId": "911871cc-ffd1-4fc4-ac11-7a316433ea66", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "geoReplicationStats": { + "canFailover": true, + "lastSyncTime": "2018-10-30T00:25:34Z", + "status": "Live" + }, + "isHnsEnabled": true, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_GetProperties", + "title": "StorageAccountGetPropertiesCMKEnabled" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkVersionExpirationTime.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkVersionExpirationTime.json new file mode 100644 index 0000000000..aa559a8fd9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkVersionExpirationTime.json @@ -0,0 +1,107 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "identity": { + "type": "SystemAssigned", + "principalId": "911871cc-ffd1-4fc4-ac11-7a316433ea66", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyExpirationTimestamp": "2019-12-13T20:36:23.7023290Z", + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "geoReplicationStats": { + "canFailover": true, + "lastSyncTime": "2018-10-30T00:25:34Z", + "status": "Live" + }, + "isHnsEnabled": true, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_GetProperties", + "title": "StorageAccountGetPropertiesCMKVersionExpirationTime" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_HierarchicalNamespaceMigration.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_HierarchicalNamespaceMigration.json new file mode 100644 index 0000000000..986642b311 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_HierarchicalNamespaceMigration.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "accountName": "sto2434", + "api-version": "2022-09-01", + "requestType": "HnsOnValidationRequest", + "resourceGroupName": "res4228", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://endpoint:port/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/{location}/asyncoperations/{operationid}?monitor=true&api-version=2022-09-01" + } + } + }, + "operationId": "StorageAccounts_HierarchicalNamespaceMigration", + "title": "StorageAccountHierarchicalNamespaceMigration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_List.json new file mode 100644 index 0000000000..b605faedcd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_List.json @@ -0,0 +1,315 @@ +{ + "parameters": { + "api-version": "2022-09-01", + "monitor": "true", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "sto1125", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res2627/providers/Microsoft.Storage/storageAccounts/sto1125", + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T13:28:53.4540398Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "primaryEndpoints": { + "blob": "https://sto1125.blob.core.windows.net/", + "dfs": "https://sto1125.dfs.core.windows.net/", + "file": "https://sto1125.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto1125-internetrouting.blob.core.windows.net/", + "dfs": "https://sto1125-internetrouting.dfs.core.windows.net/", + "file": "https://sto1125-internetrouting.file.core.windows.net/", + "web": "https://sto1125-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto1125-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto1125-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto1125-microsoftrouting.file.core.windows.net/", + "queue": "https://sto1125-microsoftrouting.queue.core.windows.net/", + "table": "https://sto1125-microsoftrouting.table.core.windows.net/", + "web": "https://sto1125-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto1125.queue.core.windows.net/", + "table": "https://sto1125.table.core.windows.net/", + "web": "https://sto1125.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto3699", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto3699", + "identity": { + "type": "SystemAssigned", + "principalId": "356d057d-cba5-44dd-8a30-b2e547bc416b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T10:06:30.6093014Z", + "primaryEndpoints": { + "blob": "https://sto3699.blob.core.windows.net/", + "file": "https://sto3699.file.core.windows.net/", + "queue": "https://sto3699.queue.core.windows.net/", + "table": "https://sto3699.table.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "identity": { + "type": "SystemAssigned", + "principalId": "911871cc-ffd1-4fc4-ac11-7a316433ea66", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "geoReplicationStats": { + "canFailover": true, + "lastSyncTime": "2018-10-30T00:25:34Z", + "status": "Live" + }, + "isHnsEnabled": true, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto6637", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto6637", + "identity": { + "type": "SystemAssigned", + "principalId": "911871cc-ffd1-4fc4-ac11-7a316433ea66", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T10:09:39.5625175Z", + "primaryEndpoints": { + "blob": "https://sto6637.blob.core.windows.net/", + "file": "https://sto6637.file.core.windows.net/", + "queue": "https://sto6637.queue.core.windows.net/", + "table": "https://sto6637.table.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto834", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res8186/providers/Microsoft.Storage/storageAccounts/sto834", + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T13:28:20.8686541Z", + "primaryEndpoints": { + "blob": "https://sto834.blob.core.windows.net/", + "file": "https://sto834.file.core.windows.net/", + "queue": "https://sto834.queue.core.windows.net/", + "table": "https://sto834.table.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto9174", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto9174", + "identity": { + "type": "SystemAssigned", + "principalId": "933e3ddf-1802-4a51-9469-18a33b576f88", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T09:46:19.6556989Z", + "primaryEndpoints": { + "blob": "https://sto9174.blob.core.windows.net/", + "file": "https://sto9174.file.core.windows.net/", + "queue": "https://sto9174.queue.core.windows.net/", + "table": "https://sto9174.table.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + ] + } + } + }, + "operationId": "StorageAccounts_List", + "title": "StorageAccountList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListAccountSAS.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListAccountSAS.json new file mode 100644 index 0000000000..cd3c10ab68 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListAccountSAS.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "accountName": "sto8588", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "keyToSign": "key1", + "signedExpiry": "2017-05-24T11:42:03.1567373Z", + "signedPermission": "r", + "signedProtocol": "https,http", + "signedResourceTypes": "s", + "signedServices": "b", + "signedStart": "2017-05-24T10:42:03.1567373Z" + }, + "resourceGroupName": "res7985", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "accountSasToken": "sv=2015-04-05&ss=b&srt=s&sp=r&st=2017-05-24T10%3A42%3A03Z&se=2017-05-24T11%3A42%3A03Z&spr=https,http&sig=Z0I%2BEpM%2BPPlTC8ApfUf%2BcffO2aahMgZim3U0iArqsS0%3D" + } + } + }, + "operationId": "StorageAccounts_ListAccountSAS", + "title": "StorageAccountListAccountSAS" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListByResourceGroup.json new file mode 100644 index 0000000000..ad31885e28 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListByResourceGroup.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "api-version": "2022-09-01", + "resourceGroupName": "res6117", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "sto4036", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6117/providers/Microsoft.Storage/storageAccounts/sto4036", + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T13:24:47.818801Z", + "isHnsEnabled": true, + "primaryEndpoints": { + "blob": "https://sto4036.blob.core.windows.net/", + "dfs": "https://sto4036.dfs.core.windows.net/", + "file": "https://sto4036.file.core.windows.net/", + "queue": "https://sto4036.queue.core.windows.net/", + "table": "https://sto4036.table.core.windows.net/", + "web": "https://sto4036.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto4452", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6117/providers/Microsoft.Storage/storageAccounts/sto4452", + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T13:24:15.7068366Z", + "primaryEndpoints": { + "blob": "https://sto4452.blob.core.windows.net/", + "file": "https://sto4452.file.core.windows.net/", + "queue": "https://sto4452.queue.core.windows.net/", + "table": "https://sto4452.table.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + ] + } + } + }, + "operationId": "StorageAccounts_ListByResourceGroup", + "title": "StorageAccountListByResourceGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListKeys.json new file mode 100644 index 0000000000..29533ec40c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListKeys.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "accountName": "sto2220", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res418", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "keys": [ + { + "keyName": "key1", + "permissions": "Full", + "value": "" + }, + { + "keyName": "key2", + "permissions": "Full", + "value": "" + } + ] + } + } + }, + "operationId": "StorageAccounts_ListKeys", + "title": "StorageAccountListKeys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListServiceSAS.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListServiceSAS.json new file mode 100644 index 0000000000..07ea571eab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListServiceSAS.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accountName": "sto1299", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "canonicalizedResource": "/blob/sto1299/music", + "signedExpiry": "2017-05-24T11:32:48.8457197Z", + "signedPermission": "l", + "signedResource": "c" + }, + "resourceGroupName": "res7439", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "serviceSasToken": "sv=2015-04-05&sr=c&se=2017-05-24T11%3A32%3A48Z&sp=l&sig=PoF8yBUGixsjzwroLmw7vG3VbGz4KB2woZC2D4C2oio%3D" + } + } + }, + "operationId": "StorageAccounts_ListServiceSAS", + "title": "StorageAccountListServiceSAS" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKerbKey.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKerbKey.json new file mode 100644 index 0000000000..d91fd8d0d3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKerbKey.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "accountName": "sto3539", + "api-version": "2022-09-01", + "monitor": "true", + "regenerateKey": { + "keyName": "kerb1" + }, + "resourceGroupName": "res4167", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "keys": [ + { + "keyName": "key1", + "permissions": "Full", + "value": "" + }, + { + "keyName": "key2", + "permissions": "Full", + "value": "" + }, + { + "keyName": "kerb1", + "permissions": "Full", + "value": "" + } + ] + } + } + }, + "operationId": "StorageAccounts_RegenerateKey", + "title": "StorageAccountRegenerateKerbKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKey.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKey.json new file mode 100644 index 0000000000..4e5eb91129 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKey.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "accountName": "sto3539", + "api-version": "2022-09-01", + "monitor": "true", + "regenerateKey": { + "keyName": "key2" + }, + "resourceGroupName": "res4167", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "keys": [ + { + "keyName": "key1", + "permissions": "Full", + "value": "" + }, + { + "keyName": "key2", + "permissions": "Full", + "value": "" + } + ] + } + } + }, + "operationId": "StorageAccounts_RegenerateKey", + "title": "StorageAccountRegenerateKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RestoreBlobRanges.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RestoreBlobRanges.json new file mode 100644 index 0000000000..1a114cdafd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RestoreBlobRanges.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "blobRanges": [ + { + "endRange": "container/blobpath2", + "startRange": "container/blobpath1" + }, + { + "endRange": "", + "startRange": "container2/blobpath3" + } + ], + "timeToRestore": "2019-04-20T15:30:00.0000000Z" + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "parameters": { + "blobRanges": [ + { + "endRange": "container/blobpath2", + "startRange": "container/blobpath1" + }, + { + "endRange": "", + "startRange": "container2/blobpath3" + } + ], + "timeToRestore": "2019-04-20T15:30:00.0000000Z" + }, + "restoreId": "{restore_id}", + "status": "Succeeded" + } + }, + "202": { + "body": { + "parameters": { + "blobRanges": [ + { + "endRange": "container/blobpath2", + "startRange": "container/blobpath1" + }, + { + "endRange": "", + "startRange": "container2/blobpath3" + } + ], + "timeToRestore": "2019-04-20T15:30:00.0000000Z" + }, + "restoreId": "{restore_id}", + "status": "InProgress" + }, + "headers": { + "location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2022-09-01" + } + } + }, + "operationId": "StorageAccounts_RestoreBlobRanges", + "title": "BlobRangesRestore" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RevokeUserDelegationKeys.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RevokeUserDelegationKeys.json new file mode 100644 index 0000000000..4193e580a3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RevokeUserDelegationKeys.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "accountName": "sto3539", + "api-version": "2022-09-01", + "resourceGroupName": "res4167", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {} + }, + "operationId": "StorageAccounts_RevokeUserDelegationKeys", + "title": "StorageAccountRevokeUserDelegationKeys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableAd.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableAd.json new file mode 100644 index 0000000000..6d2cf33b7d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableAd.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "azureFilesIdentityBasedAuthentication": { + "activeDirectoryProperties": { + "accountType": "User", + "azureStorageSid": "S-1-5-21-2400535526-2334094090-2402026252-0012", + "domainGuid": "aebfc118-9fa9-4732-a21f-d98e41a77ae1", + "domainName": "adtest.com", + "domainSid": "S-1-5-21-2400535526-2334094090-2402026252", + "forestName": "adtest.com", + "netBiosDomainName": "adtest.com", + "samAccountName": "sam12498" + }, + "directoryServiceOptions": "AD" + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "azureFilesIdentityBasedAuthentication": { + "activeDirectoryProperties": { + "accountType": "User", + "azureStorageSid": "S-1-5-21-2400535526-2334094090-2402026252-0012", + "domainGuid": "aebfc118-9fa9-4732-a21f-d98e41a77ae1", + "domainName": "adtest.com", + "domainSid": "S-1-5-21-2400535526-2334094090-2402026252", + "forestName": "adtest.com", + "netBiosDomainName": "adtest.com", + "samAccountName": "sam12498" + }, + "directoryServiceOptions": "AD" + }, + "creationTime": "2017-06-01T02:42:41.7633306Z", + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountEnableAD" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableCmk.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableCmk.json new file mode 100644 index 0000000000..714ba8e871 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableCmk.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "encryption": { + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "identity": { + "type": "SystemAssigned", + "principalId": "911871cc-ffd1-4fc4-ac11-7a316433ea66", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountEnableCMK" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdate.json new file mode 100644 index 0000000000..96cd93d416 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdate.json @@ -0,0 +1,154 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "defaultToOAuthAuthentication": false, + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isLocalUserEnabled": true, + "isSftpEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "defaultAction": "Allow", + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ] + }, + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "isLocalUserEnabled": true, + "isSftpEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateAllowedCopyScopeToAad.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateAllowedCopyScopeToAad.json new file mode 100644 index 0000000000..826ea584c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateAllowedCopyScopeToAad.json @@ -0,0 +1,151 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "AAD", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "defaultAction": "Allow", + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ] + }, + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "AAD", + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdateAllowedCopyScopeToAAD" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateDisablePublicNetworkAccess.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateDisablePublicNetworkAccess.json new file mode 100644 index 0000000000..8ae576aac0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateDisablePublicNetworkAccess.json @@ -0,0 +1,151 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "defaultAction": "Allow", + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ] + }, + "publicNetworkAccess": "Disabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Disabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdateDisablePublicNetworkAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedEncryptionIdentityWithCmk.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedEncryptionIdentityWithCmk.json new file mode 100644 index 0000000000..778f1fe0ef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedEncryptionIdentityWithCmk.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {} + } + }, + "kind": "Storage", + "properties": { + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + } + }, + "sku": { + "name": "Standard_LRS" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": { + "clientId": "fbaa6278-1ecc-415c-819f-6e2058d3acb5", + "principalId": "8d823284-1060-42a5-9ec4-ed3d831e24d7" + } + } + }, + "kind": "StorageV2", + "location": "eastus", + "properties": { + "accessTier": "Hot", + "creationTime": "2020-12-15T00:43:14.0839093Z", + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + } + } + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "tags": {} + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json new file mode 100644 index 0000000000..1e1e636650 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "accountName": "sto131918", + "api-version": "2022-09-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {} + } + }, + "kind": "Storage", + "properties": { + "encryption": { + "identity": { + "federatedIdentityClientId": "3109d1c4-a5de-4d84-8832-feabb916a4b6", + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + } + }, + "sku": { + "name": "Standard_LRS" + } + }, + "resourceGroupName": "res131918", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": { + "clientId": "fbaa6278-1ecc-415c-819f-6e2058d3acb5", + "principalId": "8d823284-1060-42a5-9ec4-ed3d831e24d7" + } + } + }, + "kind": "StorageV2", + "location": "eastus", + "properties": { + "accessTier": "Hot", + "creationTime": "2020-12-15T00:43:14.0839093Z", + "encryption": { + "identity": { + "federatedIdentityClientId": "3109d1c4-a5de-4d84-8832-feabb916a4b6", + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + } + } + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "tags": {} + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateWithImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateWithImmutabilityPolicy.json new file mode 100644 index 0000000000..dc9393936f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateWithImmutabilityPolicy.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "immutableStorageWithVersioning": { + "enabled": true, + "immutabilityPolicy": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 15, + "state": "Locked" + } + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "immutableStorageWithVersioning": { + "enabled": true, + "immutabilityPolicy": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 15, + "state": "Locked" + } + } + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdateWithImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_GetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_GetServiceProperties.json new file mode 100644 index 0000000000..387de65dc1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_GetServiceProperties.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}", + "tableServiceName": "default" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/tableServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + } + }, + "operationId": "TableServices_GetServiceProperties", + "title": "TableServicesGet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_List.json new file mode 100644 index 0000000000..4a227a03d8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_List.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/tableServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + ] + } + } + }, + "operationId": "TableServices_List", + "title": "TableServicesList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_SetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_SetServiceProperties.json new file mode 100644 index 0000000000..d77e657aa8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_SetServiceProperties.json @@ -0,0 +1,149 @@ +{ + "parameters": { + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}", + "tableServiceName": "default" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/tableServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + } + }, + "operationId": "TableServices_SetServiceProperties", + "title": "TableServicesPut" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPut.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPut.json new file mode 100644 index 0000000000..ea06b856bd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPut.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "200": { + "body": { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "tableName": "table6185" + } + } + } + }, + "operationId": "Table_Create", + "title": "TableOperationPut" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPutOrPatchAcls.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPutOrPatchAcls.json new file mode 100644 index 0000000000..0c21d06cee --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPutOrPatchAcls.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "raud", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + }, + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "rad", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI" + } + ] + } + }, + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "200": { + "body": { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "raud", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + }, + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "rad", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI" + } + ], + "tableName": "table6185" + } + } + } + }, + "operationId": "Table_Create", + "title": "TableOperationPutOrPatchAcls" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Delete.json new file mode 100644 index 0000000000..e642694a02 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "204": {} + }, + "operationId": "Table_Delete", + "title": "TableOperationDelete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Get.json new file mode 100644 index 0000000000..70f9d62e40 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Get.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "200": { + "body": { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "tableName": "table6185" + } + } + } + }, + "operationId": "Table_Get", + "title": "TableOperationGet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_List.json new file mode 100644 index 0000000000..69de240793 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_List.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables?api-version=2022-09-01&NextTableName=1!40!bXl0YWJsZXNoYzU0OAEwMWQ2MTI5ZTJmYjVmODFh", + "value": [ + { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "tableName": "table6185" + } + }, + { + "name": "table6186", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6186", + "properties": { + "tableName": "table6186" + } + } + ] + } + } + }, + "operationId": "Table_List", + "title": "TableOperationList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPatch.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPatch.json new file mode 100644 index 0000000000..29f691398b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPatch.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "200": { + "body": { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "tableName": "table6185" + } + } + } + }, + "operationId": "Table_Update", + "title": "TableOperationPatch" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPutOrPatchAcls.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPutOrPatchAcls.json new file mode 100644 index 0000000000..7d3a465aef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPutOrPatchAcls.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "raud", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + }, + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "rad", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI" + } + ] + } + }, + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "200": { + "body": { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "raud", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + }, + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "rad", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI" + } + ], + "tableName": "table6185" + } + } + } + }, + "operationId": "Table_Update", + "title": "TableOperationPutOrPatchAcls" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp index 1732a5c168..8ca5d65a99 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp @@ -33,7 +33,8 @@ using TypeSpec.Versioning; title: "Azure Storage resource management API.", }) @versioned(Versions) -@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v1) +// FIXME: Common type version v1 is not supported for now. +// @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v1) @doc("The Azure Storage Management API.") namespace Microsoft.Storage; @@ -41,5 +42,6 @@ namespace Microsoft.Storage; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2022-09-01 API version.") v2022_09_01: "2022-09-01", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp index e766f07a70..dfe7bb8ab5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp @@ -7,11 +7,13 @@ using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.Storage; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType.") enum SkuName { Standard_LRS, Standard_GRS, @@ -23,6 +25,7 @@ enum SkuName { Standard_RAGZRS, } +@doc("Indicates the type of storage account.") enum Kind { Storage, StorageV2, @@ -31,15 +34,18 @@ enum Kind { BlockBlobStorage, } +@doc("The reason for the restriction. As of now this can be \"QuotaId\" or \"NotAvailableForSubscription\". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The \"NotAvailableForSubscription\" is related to capacity at DC.") enum ReasonCode { QuotaId, NotAvailableForSubscription, } +@doc("The type of extendedLocation.") enum ExtendedLocationTypes { EdgeZone, } +@doc("The identity type.") enum IdentityType { None, SystemAssigned, @@ -47,30 +53,36 @@ enum IdentityType { `SystemAssigned,UserAssigned`, } +@doc("Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet.") enum AllowedCopyScope { PrivateLink, AAD, } +@doc("Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.") enum PublicNetworkAccess { Enabled, Disabled, } +@doc("The SAS expiration action. Can only be Log.") enum ExpirationAction { Log, } +@doc("Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used.") enum KeyType { Service, Account, } +@doc("The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault") enum KeySource { `Microsoft.Storage`, `Microsoft.Keyvault`, } +@doc("Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, \"Logging, Metrics\"), or None to bypass none of those traffics.") enum Bypass { None, Logging, @@ -78,6 +90,7 @@ enum Bypass { AzureServices, } +@doc("Gets the state of virtual network rule.") enum State { Provisioning, Deprovisioning, @@ -86,6 +99,7 @@ enum State { NetworkSourceDeleted, } +@doc("Indicates the directory service used. Note that this enum may be extended in the future.") enum DirectoryServiceOptions { None, AADDS, @@ -93,11 +107,13 @@ enum DirectoryServiceOptions { AADKERB, } +@doc("Specifies the Active Directory account type for Azure Storage.") enum AccountType { User, Computer, } +@doc("Default share permission for users using Kerberos authentication if RBAC role is not assigned.") enum DefaultSharePermission { None, StorageFileDataSmbShareReader, @@ -105,45 +121,53 @@ enum DefaultSharePermission { StorageFileDataSmbShareElevatedContributor, } +@doc("Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled.") enum LargeFileSharesState { Disabled, Enabled, } +@doc("Routing Choice defines the kind of network routing opted by the user.") enum RoutingChoice { MicrosoftRouting, InternetRouting, } +@doc("Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.") enum MinimumTlsVersion { TLS1_0, TLS1_1, TLS1_2, } +@doc("The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted.") enum AccountImmutabilityPolicyState { Unlocked, Locked, Disabled, } +@doc("Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier.") enum DnsEndpointType { Standard, AzureDnsZone, } +@doc("The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable.") enum GeoReplicationStatus { Live, Bootstrap, Unavailable, } +@doc("The private endpoint connection status.") enum PrivateEndpointServiceConnectionStatus { Pending, Approved, Rejected, } +@doc("The current provisioning state.") enum PrivateEndpointConnectionProvisioningState { Succeeded, Creating, @@ -151,18 +175,21 @@ enum PrivateEndpointConnectionProvisioningState { Failed, } +@doc("The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed.") enum BlobRestoreProgressStatus { InProgress, Complete, Failed, } +@doc("This property indicates the current sku conversion status.") enum SkuConversionStatus { InProgress, Succeeded, Failed, } +@doc("The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f).") enum Services { b, q, @@ -170,12 +197,14 @@ enum Services { f, } +@doc("The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files.") enum SignedResourceTypes { s, c, o, } +@doc("The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p).") enum Permissions { r, d, @@ -187,6 +216,7 @@ enum Permissions { p, } +@doc("The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s).") enum SignedResource { b, c, @@ -198,6 +228,7 @@ enum ManagementPolicyName { default, } +@doc("The valid value is Lifecycle") enum RuleType { Lifecycle, } @@ -206,25 +237,30 @@ enum BlobInventoryPolicyName { default, } +@doc("The valid value is Inventory") enum InventoryRuleType { Inventory, } +@doc("This is a required field, it specifies the format for the inventory files.") enum Format { Csv, Parquet, } +@doc("This is a required field. This field is used to schedule an inventory formation.") enum Schedule { Daily, Weekly, } +@doc("This is a required field. This field specifies the scope of the inventory created either at the blob or container level.") enum ObjectType { Blob, Container, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -232,11 +268,13 @@ enum CreatedByType { Key, } +@doc("The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault.") enum EncryptionScopeSource { `Microsoft.Storage`, `Microsoft.KeyVault`, } +@doc("The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled.") enum EncryptionScopeState { Enabled, Disabled, @@ -259,6 +297,7 @@ enum AllowedMethods { PATCH, } +@doc("Name of the policy. The valid value is AccessTimeTracking. This field is currently read only") enum Name { AccessTimeTracking, } @@ -267,11 +306,13 @@ enum ListContainersInclude { deleted, } +@doc("The lease status of the container.") enum LeaseStatus { Locked, Unlocked, } +@doc("Lease state of the container.") enum LeaseState { Available, Leased, @@ -280,27 +321,32 @@ enum LeaseState { Broken, } +@doc("Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.") enum LeaseDuration { Infinite, Fixed, } +@doc("The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.") enum ImmutabilityPolicyState { Locked, Unlocked, } +@doc("The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend.") enum ImmutabilityPolicyUpdateType { put, lock, extend, } +@doc("This property denotes the container level immutability to object level immutability migration state.") enum MigrationState { InProgress, Completed, } +@doc("Specifies the lease action. Can be one of the available actions.") enum LeaseContainerRequestAction { Acquire, Renew, @@ -309,17 +355,20 @@ enum LeaseContainerRequestAction { Break, } +@doc("The authentication protocol that is used for the file share. Can only be specified when creating a share.") enum EnabledProtocols { SMB, NFS, } +@doc("The property is for NFS share only. The default is NoRootSquash.") enum RootSquashType { NoRootSquash, RootSquash, AllSquash, } +@doc("Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.") enum ShareAccessTier { TransactionOptimized, Hot, @@ -327,6 +376,7 @@ enum ShareAccessTier { Premium, } +@doc("Specifies the lease action. Can be one of the available actions.") enum LeaseShareAction { Acquire, Renew, @@ -334,49 +384,66 @@ enum LeaseShareAction { Release, Break, } -@Azure.Core.fixed + +@doc("The SKU tier. This is based on the SKU name.") +@fixed enum SkuTier { Standard, Premium, } -@Azure.Core.fixed + +@doc("Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false.") +@fixed enum Reason { AccountNameInvalid, AlreadyExists, } -@Azure.Core.fixed + +@doc("Specifies the default action of allow or deny when no other rules match.") +@fixed enum DefaultAction { Allow, Deny, } -@Azure.Core.fixed + +@doc("Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.") +@fixed enum AccessTier { Hot, Cool, Premium, } -@Azure.Core.fixed + +@doc("Gets the status of the storage account at the time the operation was called.") +@fixed enum ProvisioningState { Creating, ResolvingDNS, Succeeded, } -@Azure.Core.fixed + +@doc("Gets the status indicating whether the primary location of the storage account is available or unavailable.") +@fixed enum AccountStatus { available, unavailable, } -@Azure.Core.fixed + +@fixed enum StorageAccountExpand { geoReplicationStats, blobRestoreStatus, } -@Azure.Core.fixed + +@doc("Permissions for the key -- read-only or full permissions.") +@fixed enum KeyPermission { Read, Full, } -@Azure.Core.fixed + +@doc("Gets the unit of measurement.") +@fixed enum UsageUnit { Count, Bytes, @@ -385,12 +452,16 @@ enum UsageUnit { CountsPerSecond, BytesPerSecond, } -@Azure.Core.fixed + +@doc("The protocol permitted for a request made with the account SAS.") +@fixed enum HttpProtocol { `https,http`, https, } -@Azure.Core.fixed + +@doc("Specifies whether data in the container may be accessed publicly and the level of access.") +@fixed enum PublicAccess { Container, Blob, @@ -595,17 +666,6 @@ model Identity { userAssignedIdentities?: Record; } -@doc("UserAssignedIdentity for the resource.") -model UserAssignedIdentity { - @doc("The principal ID of the identity.") - @visibility("read") - principalId?: string; - - @doc("The client ID of the identity.") - @visibility("read") - clientId?: string; -} - @doc("The parameters used to create the storage account.") model StorageAccountPropertiesCreateParameters { @doc("Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet.") @@ -1203,6 +1263,21 @@ model PrivateLinkServiceConnectionState { actionRequired?: string; } +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; +} + @doc("Blob restore status.") model BlobRestoreStatus { @doc("The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed.") @@ -1262,6 +1337,94 @@ model StorageAccountSkuConversionStatus { endTime?: utcDateTime; } +@doc("The parameters that can be provided when updating the storage account properties.") +model StorageAccountUpdateParameters { + @doc("Gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of those SKU names be updated to any other value.") + sku?: Sku; + + @doc("Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters.") + tags?: Record; + + @doc("The identity of the resource.") + identity?: Identity; + + @doc("The parameters used when updating a storage account.") + properties?: StorageAccountPropertiesUpdateParameters; + + @doc("Optional. Indicates the type of storage account. Currently only StorageV2 value supported by server.") + kind?: Kind; +} + +@doc("The parameters used when updating a storage account.") +model StorageAccountPropertiesUpdateParameters { + @doc("Custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property.") + customDomain?: CustomDomain; + + @doc("Not applicable. Azure Storage encryption at rest is enabled by default for all storage accounts and cannot be disabled.") + encryption?: Encryption; + + @doc("SasPolicy assigned to the storage account.") + sasPolicy?: SasPolicy; + + @doc("KeyPolicy assigned to the storage account.") + keyPolicy?: KeyPolicy; + + @doc("Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.") + accessTier?: AccessTier; + + @doc("Provides the identity based authentication settings for Azure Files.") + azureFilesIdentityBasedAuthentication?: AzureFilesIdentityBasedAuthentication; + + @doc("Allows https traffic only to storage service if sets to true.") + @projectedName("json", "supportsHttpsTrafficOnly") + enableHttpsTrafficOnly?: boolean; + + @doc("Enables Secure File Transfer Protocol, if set to true") + @projectedName("json", "isSftpEnabled") + IsSftpEnabled?: boolean; + + @doc("Enables local users feature, if set to true") + @projectedName("json", "isLocalUserEnabled") + IsLocalUserEnabled?: boolean; + + @doc("Network rule set") + @projectedName("json", "networkAcls") + networkRuleSet?: NetworkRuleSet; + + @doc("Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled.") + largeFileSharesState?: LargeFileSharesState; + + @doc("Maintains information about the network routing choice opted by the user for data transfer") + routingPreference?: RoutingPreference; + + @doc("Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property.") + allowBlobPublicAccess?: boolean; + + @doc("Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.") + minimumTlsVersion?: MinimumTlsVersion; + + @doc("Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true.") + allowSharedKeyAccess?: boolean; + + @doc("Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property.") + allowCrossTenantReplication?: boolean; + + @doc("A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property.") + defaultToOAuthAuthentication?: boolean; + + @doc("Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.") + publicNetworkAccess?: PublicNetworkAccess; + + @doc("The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the containers in the account by default.") + immutableStorageWithVersioning?: ImmutableStorageAccount; + + @doc("Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet.") + allowedCopyScope?: AllowedCopyScope; + + @doc("Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier.") + dnsEndpointType?: DnsEndpointType; +} + @doc("Attributes of a deleted storage account.") model DeletedAccountProperties { @doc("Full resource id of the original storage account.") diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp index 186c177afd..3e80a78bdf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp @@ -1,9 +1,11 @@ import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.ResourceManager; namespace Microsoft.Storage; diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp index 4898464a92..a9f84093aa 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Employee.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Test; @doc("A Test resource") @@ -25,6 +27,7 @@ model DictProperty is TrackedResource> { interface DictProperties { @doc("Get a Resource.") get is ArmResourceRead; + @doc("List resources by resource group") listByResourceGroup is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp index eaa000d001..b5e091fb0d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Test; @doc("A Test resource") @@ -23,14 +25,23 @@ model Employee is TrackedResource { interface Employees { @doc("Get a Employee") get is ArmResourceRead; + @doc("Create a Employee") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Employee, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update a Employee") - update is ArmResourcePatchSync; + update is ArmCustomPatchSync; + @doc("Delete a Employee") delete is ArmResourceDeleteSync; + @doc("List Employee resources by resource group") listByResourceGroup is ArmResourceListByParent; + @doc("List Employee resources by subscription ID") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp index cb3c249484..d43b05622c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Employee.tsp"; @@ -8,13 +9,14 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Test; @doc("A Test resource") @singleton("default") @parentResource(Employee) model Enroll is TrackedResource { - @key("default") + @key("enroll") @segment("enrolls") name: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp index 1d1b58c248..c343b56788 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp @@ -25,5 +25,6 @@ namespace Microsoft.Test; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-10-12 API version.") v2023_10_12: "2023-10-12", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp index 5901ff64e6..d6ce0dd694 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp @@ -5,21 +5,25 @@ import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.Test; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") enum Origin { user, system, `user,system`, } +@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") enum ActionType { Internal, } +@doc("The provisioning state of a resource.") enum ProvisioningState { @doc("Resource has been created.") Succeeded, @doc("Resource creation failed.") Failed, @@ -30,6 +34,7 @@ enum ProvisioningState { @doc("The resource create request has been accepted") Accepted, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -53,6 +58,46 @@ model EmployeeProperties { provisioningState?: ProvisioningState; } +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; +} + +@doc("The type used for update operations of the Employee.") +model EmployeeUpdate { + @doc("Resource tags.") + tags?: Record; + + @doc("The updatable properties of the Employee.") + properties?: EmployeeUpdateProperties; +} + +@doc("The updatable properties of the Employee.") +model EmployeeUpdateProperties { + @doc("Age of employee") + age?: int32; + + @doc("City of employee") + city?: string; + + @doc("Profile of employee") + profile?: bytes; +} + @doc("Enroll properties") model EnrollProperties { @doc("Country of employee") diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp index 18a7f5cc73..e5066a7b78 100644 --- a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp @@ -18,5 +18,6 @@ namespace Azure.Batch; @doc("The available API versions.") enum Versions { +@doc("The 2022-01-01.15.0 API version.") v2022_01_01.15.0: "2022-01-01.15.0", } \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp index 7e9cf9a9a9..e54a815a15 100644 --- a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp @@ -8,12 +8,18 @@ using Azure.Core; namespace Azure.Batch; -@Azure.Core.fixed +@doc("The type of operating system (e.g. Windows or Linux) of the Image.") +@fixed enum OSType { @doc("The Linux operating system.") linux, @doc("The Windows operating system.") windows, } -@Azure.Core.fixed + +@doc(""" +Whether the Azure Batch service actively verifies that the Image is compatible +with the associated Compute Node agent SKU. +""") +@fixed enum VerificationType { @doc(""" The Image is guaranteed to be compatible with the associated Compute Node agent @@ -26,7 +32,9 @@ Image, but specific functionality has not been verified. """) unverified, } -@Azure.Core.fixed + +@doc("The state of the Certificate.") +@fixed enum CertificateState { @doc("The Certificate is available for use in Pools.") active, @doc(""" @@ -46,13 +54,17 @@ the delete. """) deleteFailed: "deletefailed", } -@Azure.Core.fixed + +@doc("The format of the Certificate data.") +@fixed enum CertificateFormat { @doc("The Certificate is a PFX (PKCS#12) formatted Certificate or Certificate chain.") pfx, @doc("The Certificate is a base64-encoded X.509 Certificate.") cer, } -@Azure.Core.fixed + +@doc("The state of the Job Schedule.") +@fixed enum JobScheduleState { @doc("The Job Schedule is active and will create Jobs as per its schedule.") active, @@ -82,7 +94,12 @@ all Jobs and Tasks under the Job Schedule have been deleted. """) deleting, } -@Azure.Core.fixed + +@doc(""" +The action the Batch service should take when all Tasks in the Job are in the +completed state. +""") +@fixed enum OnAllTasksComplete { @doc(""" Do nothing. The Job remains active unless terminated or disabled by some other @@ -92,7 +109,14 @@ means. @doc("Terminate the Job. The Job's terminateReason is set to 'AllTasksComplete'.") terminateJob: "terminatejob", } -@Azure.Core.fixed + +@doc(""" +A Task is considered to have failed if has a failureInfo. A failureInfo is set +if the Task completes with a non-zero exit code after exhausting its retry +count, or if there was an error starting the Task, for example due to a +resource file download error. The default is noaction. +""") +@fixed enum OnTaskFailure { @doc(""" Do nothing. The Job remains active unless terminated or disabled by some other @@ -106,7 +130,9 @@ that is what the Task specifies.) """) performExitOptionsJobAction: "performexitoptionsjobaction", } -@Azure.Core.fixed + +@doc("The default is 'taskWorkingDirectory'.") +@fixed enum ContainerWorkingDirectory { @doc(""" Use the standard Batch service Task working directory, which will contain the @@ -119,7 +145,12 @@ directory will not contain the Resource Files downloaded by Batch. """) containerImageDefault, } -@Azure.Core.fixed + +@doc(""" +The conditions under which a Task output file or set of files should be +uploaded. +""") +@fixed enum OutputFileUploadCondition { @doc("Upload the file(s) only after the Task process exits with an exit code of 0.") taskSuccess: "tasksuccess", @@ -131,7 +162,15 @@ was. """) taskCompletion: "taskcompletion", } -@Azure.Core.fixed + +@doc(""" +The default value is pool. If the pool is running Windows a value of Task +should be specified if stricter isolation between tasks is required. For +example, if the task mutates the registry in a way which could impact other +tasks, or if certificates have been specified on the pool which should not be +accessible by normal tasks but should be accessible by StartTasks. +""") +@fixed enum AutoUserScope { @doc("Specifies that the service should create a new user for the Task.") task, @@ -141,7 +180,9 @@ on every Compute Node in a Pool. """) pool, } -@Azure.Core.fixed + +@doc("The elevation level of the user.") +@fixed enum ElevationLevel { @doc("The user is a standard user without elevated access.") nonAdmin: "nonadmin", @@ -151,7 +192,12 @@ permissions. """) admin, } -@Azure.Core.fixed + +@doc(""" +The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule +are assigned to Pools. +""") +@fixed enum PoolLifetimeOption { @doc(""" The Pool exists for the lifetime of the Job Schedule. The Batch Service creates @@ -167,21 +213,31 @@ Job created on the schedule. """) job, } -@Azure.Core.fixed + +@doc(""" +The default value for caching is none. For information about the caching +options see: +https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. +""") +@fixed enum CachingType { @doc("The caching mode for the disk is not enabled.") none, @doc("The caching mode for the disk is read only.") readOnly: "readonly", @doc("The caching mode for the disk is read and write.") readWrite: "readwrite", } -@Azure.Core.fixed + +@doc("The storage Account type for use in creating data disks.") +@fixed enum StorageAccountType { @doc("The data disk should use standard locally redundant storage.") StandardLRS: "standard_lrs", @doc("The data disk should use premium locally redundant storage.") PremiumLRS: "premium_lrs", } -@Azure.Core.fixed + +@doc("A disk to encrypt.") +@fixed enum DiskEncryptionTarget { @doc("The OS Disk on the compute node is encrypted.") OsDisk: "osdisk", @doc(""" @@ -191,7 +247,9 @@ encryption occurs at boot time. """) TemporaryDisk: "temporarydisk", } -@Azure.Core.fixed + +@doc("The default value is regional.") +@fixed enum NodePlacementPolicyType { @doc("All nodes in the pool will be allocated in the same region.") regional, @doc(""" @@ -200,7 +258,9 @@ effort balancing. """) zonal, } -@Azure.Core.fixed + +@doc("If not specified, the default is spread.") +@fixed enum ComputeNodeFillType { @doc("Tasks should be assigned evenly across all Compute Nodes in the Pool.") spread, @@ -211,22 +271,30 @@ Pool. """) pack, } -@Azure.Core.fixed + +@doc("The scope of dynamic vnet assignment.") +@fixed enum DynamicVNetAssignmentScope { @doc("No dynamic VNet assignment is enabled.") none, @doc("Dynamic VNet assignment is done per-job.") job, } -@Azure.Core.fixed + +@doc("The protocol of the endpoint.") +@fixed enum InboundEndpointProtocol { @doc("Use TCP for the endpoint.") tcp, @doc("Use UDP for the endpoint.") udp, } -@Azure.Core.fixed + +@doc("The action that should be taken for a specified IP address, subnet range or tag.") +@fixed enum NetworkSecurityGroupRuleAccess { @doc("Allow access.") allow, @doc("Deny access.") deny, } -@Azure.Core.fixed + +@doc("The provisioning type for Public IP Addresses for the Pool.") +@fixed enum IPAddressProvisioningType { @doc(""" A public IP will be created and managed by Batch. There may be multiple public @@ -241,14 +309,27 @@ Nodes. @doc("No public IP Address will be created.") noPublicIPAddresses: "nopublicipaddresses", } -@Azure.Core.fixed + +@doc(""" +The default value is currentuser. This property is applicable only for Pools +configured with Windows Compute Nodes (that is, created with +cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows +Image reference). For Linux Compute Nodes, the Certificates are stored in a +directory inside the Task working directory and an environment variable +AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. +For Certificates with visibility of 'remoteUser', a 'certs' directory is +created in the user's home directory (e.g., /home/{user-name}/certs) and +Certificates are placed in that directory. +""") +@fixed enum CertificateStoreLocation { @doc("Certificates should be installed to the CurrentUser Certificate store.") currentUser: "currentuser", @doc("Certificates should be installed to the LocalMachine Certificate store.") localMachine: "localmachine", } -@Azure.Core.fixed + +@fixed enum CertificateVisibility { @doc(""" The Certificate should be visible to the user account under which the StartTask @@ -267,7 +348,12 @@ remotely access the Compute Node. """) remoteUser: "remoteuser", } -@Azure.Core.fixed + +@doc(""" +The default value for VirtualMachineConfiguration Pools is 'batch' and for +CloudServiceConfiguration Pools is 'interactive'. +""") +@fixed enum LoginMode { @doc(""" The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended @@ -284,7 +370,9 @@ maximum privilege. """) interactive, } -@Azure.Core.fixed + +@doc("The state of the Job.") +@fixed enum JobState { @doc("The Job is available to have Tasks scheduled.") active, @doc(""" @@ -320,14 +408,18 @@ Tasks). """) deleting, } -@Azure.Core.fixed + +@doc("The category of the error.") +@fixed enum ErrorCategory { @doc("The error is due to a user issue, such as misconfiguration.") userError: "usererror", @doc("The error is due to an internal server issue.") serverError: "servererror", } -@Azure.Core.fixed + +@doc("What to do with active Tasks associated with the Job.") +@fixed enum DisableJobOption { @doc(""" Terminate running Tasks and requeue them. The Tasks will run again when the Job @@ -341,7 +433,9 @@ indicating that they were terminated, and will not run again. terminate, @doc("Allow currently running Tasks to complete.") wait, } -@Azure.Core.fixed + +@doc("The current state of the Job Preparation Task on the Compute Node.") +@fixed enum JobPreparationTaskState { @doc("The Task is currently running (including retrying).") running, @doc(""" @@ -351,7 +445,9 @@ preparation errors (such as resource file download failures). """) completed, } -@Azure.Core.fixed + +@doc("The result of Task execution.") +@fixed enum TaskExecutionResult { @doc("The Task ran successfully.") success, @doc(""" @@ -361,7 +457,9 @@ after the Task process exited. """) failure, } -@Azure.Core.fixed + +@doc("The current state of the Job Release Task on the Compute Node.") +@fixed enum JobReleaseTaskState { @doc("The Task is currently running (including retrying).") running, @doc(""" @@ -371,7 +469,9 @@ preparation errors (such as resource file download failures). """) completed, } -@Azure.Core.fixed + +@doc("The current state of the Pool.") +@fixed enum PoolState { @doc("The Pool is available to run Tasks subject to the availability of Compute Nodes.") active, @@ -381,7 +481,9 @@ not yet completed. """) deleting, } -@Azure.Core.fixed + +@doc("Whether the Pool is resizing.") +@fixed enum AllocationState { @doc(""" The Pool is not resizing. There are no changes to the number of Compute Nodes @@ -401,7 +503,13 @@ but the stop request has not yet been completed. """) stopping, } -@Azure.Core.fixed + +@doc(""" +The list of user identities associated with the Batch pool. The user identity +dictionary key references will be ARM resource ids in the form: +'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. +""") +@fixed enum PoolIdentityType { @doc("Batch pool has user assigned identities with it.") UserAssigned, @doc(""" @@ -410,7 +518,9 @@ will remove existing identities. """) None, } -@Azure.Core.fixed + +@doc("The default value is requeue.") +@fixed enum ComputeNodeDeallocationOption { @doc(""" Terminate running Task processes and requeue the Tasks. The Tasks will run @@ -436,7 +546,15 @@ Compute Nodes when all Task retention periods have expired. """) retainedData: "retaineddata", } -@Azure.Core.fixed + +@doc(""" +The default is none for exit code 0 and terminate for all other exit +conditions. If the Job's onTaskFailed property is noaction, then specifying +this property returns an error and the add Task request fails with an invalid +property value error; if you are calling the REST API directly, the HTTP status +code is 400 (Bad Request). +""") +@fixed enum JobAction { @doc("Take no action.") none, @doc(""" @@ -450,7 +568,13 @@ Terminate the Job. The terminateReason in the Job's executionInfo is set to """) terminate, } -@Azure.Core.fixed + +@doc(""" +Possible values are 'satisfy' (allowing dependent tasks to progress) and +'block' (dependent tasks continue to wait). Batch does not yet support +cancellation of dependent tasks. +""") +@fixed enum DependencyAction { @doc(""" Satisfy tasks waiting on this task; once all dependencies are satisfied, the @@ -460,7 +584,9 @@ task will be scheduled to run. @doc("Blocks tasks waiting on this task, preventing them from being scheduled.") block, } -@Azure.Core.fixed + +@doc("The state of the Task.") +@fixed enum TaskState { @doc(""" The Task is queued and able to run, but is not currently assigned to a Compute @@ -491,7 +617,9 @@ the Task, or when the Task has been terminated. """) completed, } -@Azure.Core.fixed + +@doc("The status of the add Task request.") +@fixed enum TaskAddStatus { @doc("The Task was added successfully.") success, @doc(""" @@ -505,7 +633,9 @@ modification. """) serverError: "servererror", } -@Azure.Core.fixed + +@doc("The state of the subtask.") +@fixed enum SubtaskState { @doc(""" The Task has been assigned to a Compute Node, but is waiting for a required Job @@ -530,7 +660,13 @@ the Task, or when the Task has been terminated. """) completed, } -@Azure.Core.fixed + +@doc(""" +The Spot/Low-priority Compute Node has been preempted. Tasks which were running +on the Compute Node when it was preempted will be rescheduled when another +Compute Node becomes available. +""") +@fixed enum ComputeNodeState { @doc("The Compute Node is not currently running a Task.") idle, @doc("The Compute Node is rebooting.") rebooting, @@ -578,7 +714,9 @@ Compute Node becomes available. """) preempted, } -@Azure.Core.fixed + +@doc("Whether the Compute Node is available for Task scheduling.") +@fixed enum SchedulingState { @doc("Tasks can be scheduled on the Compute Node.") enabled, @doc(""" @@ -588,7 +726,9 @@ scheduling enabled. """) disabled, } -@Azure.Core.fixed + +@doc("The state of the StartTask on the Compute Node.") +@fixed enum StartTaskState { @doc("The StartTask is currently running.") running, @doc(""" @@ -598,7 +738,9 @@ preparation errors (such as resource file download failures). """) completed, } -@Azure.Core.fixed + +@doc("The default value is requeue.") +@fixed enum ComputeNodeRebootOption { @doc(""" Terminate running Task processes and requeue the Tasks. The Tasks will run @@ -624,7 +766,9 @@ Compute Node when all Task retention periods have expired. """) retainedData: "retaineddata", } -@Azure.Core.fixed + +@doc("The default value is requeue.") +@fixed enum ComputeNodeReimageOption { @doc(""" Terminate running Task processes and requeue the Tasks. The Tasks will run @@ -650,7 +794,9 @@ Compute Node when all Task retention periods have expired. """) retainedData: "retaineddata", } -@Azure.Core.fixed + +@doc("The default value is requeue.") +@fixed enum DisableComputeNodeSchedulingOption { @doc(""" Terminate running Task processes and requeue the Tasks. The Tasks may run again @@ -670,7 +816,9 @@ Enter offline state when all Tasks have completed. """) taskCompletion: "taskcompletion", } -@Azure.Core.fixed + +@doc("Level code.") +@fixed enum StatusLevelTypes { Error, Info, diff --git a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp index 5f30f5188a..53f9865cb2 100644 --- a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp @@ -20,5 +20,6 @@ namespace AutoRestComplexTestService; @doc("The available API versions.") enum Versions { + @doc("The 2016-02-29 API version.") v2016_02_29: "2016-02-29", } diff --git a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp index ae9bf222bc..8ec0f9b6f6 100644 --- a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp @@ -17,6 +17,7 @@ enum MyKind { Kind1, } +@doc("Colors possible") enum GoblinSharkColor { pink, gray, diff --git a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp index d5ef1a9d2f..475c207f76 100644 --- a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp @@ -20,5 +20,6 @@ namespace ComplexModelClient; @doc("The available API versions.") enum Versions { + @doc("The 2014-04-01-preview API version.") v2014_04_01_preview: "2014-04-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp index 31c64b5e6a..3170808c3b 100644 --- a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp @@ -23,5 +23,6 @@ namespace Azure.Language.Authoring; @doc("The available API versions.") enum Versions { + @doc("The 2022-05-13 API version.") v2022_05_13: "2022-05-13", } diff --git a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/models.tsp index cc98d46f19..8101be0b57 100644 --- a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/models.tsp @@ -8,16 +8,19 @@ using Azure.Core; namespace Azure.Language.Authoring; +@doc("State of a ledger query.") enum ConfidentialLedgerQueryState { Loading, Ready, } +@doc("Represents the state of the transaction.") enum TransactionState { Committed, Pending, } +@doc("Represents an assignable role.") enum ConfidentialLedgerUserRoleName { Administrator, Contributor, diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp index 5b3bc572e7..2fc600be68 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp @@ -21,5 +21,6 @@ namespace Azure.Keyvault; @doc("The available API versions.") enum Versions { +@doc("The 7.4-preview.1 API version.") v7.4_preview.1: "7.4-preview.1", } \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp index 384b30e806..634ecd206b 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp @@ -4,9 +4,16 @@ import "@azure-tools/typespec-azure-core"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.Core; namespace Azure.Keyvault; +@doc(""" +Reflects the deletion recovery level currently in effect for certificates in +the current vault. If it contains 'Purgeable', the certificate can be +permanently deleted by a privileged user; otherwise, only the system can purge +the certificate, at the end of the retention interval. +""") enum DeletionRecoveryLevel { @doc(""" Denotes a vault state in which deletion is an irreversible operation, without @@ -66,6 +73,10 @@ the subscription itself cannot be cancelled. `CustomizedRecoverable+ProtectedSubscription`, } +@doc(""" +JsonWebKey Key Type (kty), as defined in +https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. +""") enum JsonWebKeyType { @doc("Elliptic Curve.") EC, @doc("Elliptic Curve with a private key which is stored in the HSM.") @@ -83,6 +94,7 @@ is stored in the HSM. `OKP-HSM`, } +@doc("Elliptic curve name. For valid values, see JsonWebKeyCurveName.") enum JsonWebKeyCurveName { @doc("The NIST P-256 elliptic curve, AKA SECG curve SECP256R1.") `P-256`, @doc("The NIST P-384 elliptic curve, AKA SECG curve SECP384R1.") `P-384`, @@ -103,6 +115,7 @@ enum KeyUsageType { decipherOnly, } +@doc("JSON web key operations. For more information, see JsonWebKeyOperation.") enum JsonWebKeyOperation { encrypt, decrypt, @@ -114,6 +127,7 @@ enum JsonWebKeyOperation { export, } +@doc("algorithm identifier") enum JsonWebKeyEncryptionAlgorithm { `RSA-OAEP`, `RSA-OAEP-256`, @@ -132,6 +146,10 @@ enum JsonWebKeyEncryptionAlgorithm { A256CBCPAD, } +@doc(""" +The signing/verification algorithm identifier. For more information on possible +algorithm types, see JsonWebKeySignatureAlgorithm. +""") enum JsonWebKeySignatureAlgorithm { @doc(""" RSASSA-PSS using SHA-256 and MGF1 with SHA-256, as described in @@ -191,21 +209,25 @@ https://tools.ietf.org/html/rfc8032. EdDSA, } +@doc("The encryption algorithm to use to protected the exported key material") enum KeyEncryptionAlgorithm { CKM_RSA_AES_KEY_WRAP, RSA_AES_KEY_WRAP_256, RSA_AES_KEY_WRAP_384, } +@doc("The role definition type.") enum RoleDefinitionType { `Microsoft.Authorization/roleDefinitions`, } +@doc("The role type.") enum RoleType { @doc("Built in role.") BuiltInRole: "AKVBuiltInRole", @doc("Custom role.") CustomRole, } +@doc("Supported permissions for data actions.") enum DataAction { @doc("Read HSM key metadata.") ReadHsmKey: "Microsoft.KeyVault/managedHsm/keys/read/action", @@ -277,27 +299,34 @@ enum DataAction { RandomNumbersGenerate: "Microsoft.KeyVault/managedHsm/rng/action", } +@doc("The role scope.") enum RoleScope { @doc("Global scope") Global: "/", @doc("Keys scope") Keys: "/keys", } +@doc("The type specifier of the value.") enum SettingTypeEnum { boolean, } +@doc("The type of SAS token the SAS definition will create.") enum SasTokenType { account, service, } -@Azure.Core.fixed + +@doc("The type of the action.") +@fixed enum ActionType { EmailContacts, AutoRenew, rotate, notify, } -@Azure.Core.fixed + +@doc("operation status") +@fixed enum OperationStatus { Success, InProgress, diff --git a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp index cf823fdd7c..5ec17b8388 100644 --- a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp @@ -23,5 +23,6 @@ namespace Azure.LoadTesting; @doc("The available API versions.") enum Versions { + @doc("The 2022-11-01 API version.") v2022_11_01: "2022-11-01", } diff --git a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/models.tsp index 84e335b446..7250f5dcb8 100644 --- a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/models.tsp @@ -7,6 +7,7 @@ using TypeSpec.Http; namespace Azure.LoadTesting; +@doc("The client metric on which the criteria should be applied.") enum PFMetrics { @doc("Pass fail criteria for response time metric") response_time_ms, @doc("Pass fail criteria for response time metric") latency, @@ -15,6 +16,12 @@ enum PFMetrics { @doc("Pass fail criteria for request rate.") requests_per_sec, } +@doc(""" +The aggregation function to be applied on the client metric. Allowed functions +- ‘percentage’ - for error metric , ‘avg’, ‘p50’, ‘p90’, ‘p95’, ‘p99’, ‘min’, +‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, +‘count’ - for requests +""") enum PFAgFunc { @doc("Criteria applies for count value") count, @doc("Criteria applies for given percentage value") percentage, @@ -27,33 +34,39 @@ enum PFAgFunc { @doc("Criteria applies for maximum value") max, } +@doc("Action taken after the threshold is met. Default is ‘continue’.") enum PFAction { @doc("Test will continue to run even if pass fail metric criteria metric gets failed") continue, @doc("Test run will stop if pass fail criteria metric is not passed.") stop, } +@doc("Outcome of the test run.") enum PFResult { @doc("Given pass fail criteria metric has passed.") passed, @doc("Given pass fail criteria metric couldn't determine.") undetermined, @doc("Given pass fail criteria metric has failed.") failed, } +@doc("Type of secret") enum SecretType { @doc("If the secret is stored in an Azure Key Vault") AKV_SECRET_URI, @doc("If the Plain text secret value provided") SECRET_VALUE, } +@doc("Type of certificate") enum CertificateType { @doc("If the certificate is stored in an Azure Key Vault") AKV_CERT_URI, } +@doc("File type") enum FileType { @doc("If file is jmx script") JMX_FILE, @doc("If file is user properties") USER_PROPERTIES, @doc("If file is not any of other supported type") ADDITIONAL_ARTIFACTS, } +@doc("Validation status of the file") enum FileStatus { @doc("File is not validated.") NOT_VALIDATED, @doc("File is validated.") VALIDATION_SUCCESS, @@ -62,12 +75,14 @@ enum FileStatus { @doc("Validation is not required.") VALIDATION_NOT_REQUIRED, } +@doc("Test result for pass/Fail criteria used during the test run.") enum PFTestResult { @doc("Pass/fail criteria has passed.") PASSED, @doc("Pass/fail criteria is not applicable.") NOT_APPLICABLE, @doc("Pass/fail criteria has failed.") FAILED, } +@doc("The test run status.") enum Status { @doc("Test run request is accepted") ACCEPTED, @doc("Test run is not yet started.") NOTSTARTED, @@ -87,6 +102,7 @@ enum Status { @doc("Test run JMX file validation is failed") VALIDATION_FAILURE, } +@doc("The primary aggregation type value defining how to use the values for display.") enum AggregationType { @doc("Average value") Average, @doc("Total count") Count, @@ -97,6 +113,7 @@ enum AggregationType { @doc("99th percentile") Percentile99, } +@doc("The unit of the metric.") enum MetricUnit { @doc("No unit specified") NotSpecified, @doc("Percentage") Percent, @@ -108,6 +125,10 @@ enum MetricUnit { @doc("Count per second") CountPerSecond, } +@doc(""" +The time grain specifies the aggregation interval for the metric. Expressed as +a duration 'PT1M', 'PT1H', etc. +""") enum TimeGrain { @doc("5 seconds, available only if test run duration is less than 10 minutes") PT5S, diff --git a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp index ca739032c5..0aa97bc4cb 100644 --- a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp @@ -23,5 +23,6 @@ namespace NotificationHubsClient; @doc("The available API versions.") enum Versions { + @doc("The 2020-06-01 API version.") v2020_06_01: "2020-06-01", } diff --git a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp index c79f352922..987d254576 100644 --- a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp @@ -35,6 +35,7 @@ enum RegistrationEntryModelXmlnsM { `http://schemas.microsoft.com/ado/2007/08/dataservices/metadata`, } +@doc("PNS Platform for the installation") enum PlatformType { apns, wns, @@ -99,7 +100,9 @@ enum ApiVersionType { `2016-07`, `2020-06`, } -@Azure.Core.fixed + +@doc("Content type for upload") +@fixed enum ContentType { @doc("Content Type 'application/json;charset=utf-8'") `application/json;charset=utf-8`, diff --git a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp index aa73e0bfe5..ed3b6b8d22 100644 --- a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp @@ -20,5 +20,6 @@ namespace Azure.AI.OpenAI; @doc("The available API versions.") enum Versions { + @doc("The 2022-06-01-preview API version.") v2022_06_01_preview: "2022-06-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp index 1bed7b99c8..ac952c6c97 100644 --- a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp @@ -18,5 +18,6 @@ namespace AutoRestPagingTestService; @doc("The available API versions.") enum Versions { +@doc("The 1.0.0 API version.") v1.0.0: "1.0.0", } \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp index e02ec88ae1..40a4ef87d6 100644 --- a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp @@ -8,6 +8,7 @@ using Azure.Core; namespace AutoRestPagingTestService; +@doc("The status of the request") enum OperationResultStatus { Succeeded, Failed, diff --git a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp index aa4d487744..27b7cddfe2 100644 --- a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp @@ -27,5 +27,6 @@ namespace Azure.Language.QnAMaker; @doc("The available API versions.") enum Versions { + @doc("The 2022-07-01-preview API version.") v2022_07_01_preview: "2022-07-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp index 33ff6ee6f3..cecc5cc1c6 100644 --- a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp @@ -6,16 +6,19 @@ using TypeSpec.Http; namespace Azure.Language.QnAMaker; +@doc("Type of ranker to be used.") enum RankerKind { @doc("Question only ranker.") QuestionOnly, @doc("Default ranker.") Default, } +@doc("Set to 'OR' or 'AND' for using corresponding logical operation.") enum LogicalOperationKind { AND, OR, } +@doc("Human-readable error code.") enum ErrorCode { InvalidRequest, InvalidArgument, @@ -37,6 +40,7 @@ enum ErrorCode { Warning, } +@doc("Human-readable error code.") enum InnerErrorCode { InvalidRequest, InvalidParameterValue, @@ -54,6 +58,11 @@ enum InnerErrorCode { InvalidCountryHint, } +@doc(""" +Specifies the method used to interpret string offsets. Defaults to Text +Elements (Graphemes) according to Unicode v8.0.0. For additional information +see https://aka.ms/text-analytics-offsets. +""") enum StringIndexType { @doc(""" Returned offset and length values will correspond to TextElements (Graphemes diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp index ed4bda7e45..374dfef5ea 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp @@ -27,5 +27,6 @@ namespace MicrosoftCognitiveLanguageServiceQuestionAnsweringAuthoring; @doc("The available API versions.") enum Versions { + @doc("The 2023-04-01 API version.") v2023_04_01: "2023-04-01", } diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp index 438a65866d..a3edfc665a 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp @@ -7,6 +7,7 @@ using TypeSpec.Http; namespace MicrosoftCognitiveLanguageServiceQuestionAnsweringAuthoring; +@doc("Human-readable error code.") enum ErrorCode { InvalidRequest, InvalidArgument, @@ -28,6 +29,7 @@ enum ErrorCode { Warning, } +@doc("Human-readable error code.") enum InnerErrorCode { InvalidRequest, InvalidParameterValue, @@ -45,6 +47,7 @@ enum InnerErrorCode { InvalidCountryHint, } +@doc("Job Status.") enum JobStatus { notStarted, running, @@ -74,15 +77,18 @@ enum AssetKind { synonyms, } +@doc("Supported source types.") enum SourceKind { file, url, } +@doc("Content structure type for sources.") enum SourceContentStructureKind { unstructured, } +@doc("Update operation type for assets.") enum UpdateOperationKind { add, delete, diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp index acff066479..3df4e93955 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp @@ -101,7 +101,7 @@ interface QuestionAnsweringProjectsOperations { @doc("Knowledge base Import or Export format.") @query("format") - format?: Format = "json"; + format?: Format = Format.json; @doc("Kind of the asset of the project.") @query("assetKind") @@ -147,7 +147,7 @@ metadata, and assets. @doc("Knowledge base Import or Export format.") @query("format") - format?: Format = "json"; + format?: Format = Format.json; @doc("Kind of the asset of the project.") @query("assetKind") diff --git a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp index 5c994f9401..8d6391c095 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp @@ -6,11 +6,13 @@ using TypeSpec.Http; namespace QnAMakerRuntimeClient; +@doc("Optional field. Set to OR for using OR as Operation for Strict Filters.") enum StrictFiltersCompoundOperationType { AND, OR, } +@doc("Human readable error code.") enum ErrorCodeType { BadArgument, Forbidden, diff --git a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp index a20ddac094..a3a21efaa9 100644 --- a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp @@ -23,5 +23,6 @@ namespace AzureSchemaRegistry; @doc("The available API versions.") enum Versions { + @doc("The 2021-10 API version.") v2021_10: "2021-10", } diff --git a/packages/extensions/openapi-to-typespec/test/url/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/url/tsp-output/models.tsp index 19b5d3f384..524e1c45b9 100644 --- a/packages/extensions/openapi-to-typespec/test/url/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/url/tsp-output/models.tsp @@ -4,10 +4,11 @@ import "@azure-tools/typespec-azure-core"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.Core; namespace AutoRestUrlTestService; -@Azure.Core.fixed +@fixed enum UriColor { `red color`, `green color`, diff --git a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp index aeb92da4b1..98adb3564b 100644 --- a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp @@ -20,5 +20,6 @@ namespace AzureWebPubSubServiceRESTAPI; @doc("The available API versions.") enum Versions { + @doc("The 2023-07-01 API version.") v2023_07_01: "2023-07-01", } diff --git a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp index 82a59a520d..f489190525 100644 --- a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp @@ -4,6 +4,7 @@ import "@azure-tools/typespec-azure-core"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.Core; namespace AzureWebPubSubServiceRESTAPI; @@ -11,7 +12,9 @@ enum WebPubSubPermission { sendToGroup, joinLeaveGroup, } -@Azure.Core.fixed + +@doc("Content type for upload") +@fixed enum ContentType { @doc("Content Type 'application/json'") `application/json`, @doc("Content Type 'application/octet-stream'") `application/octet-stream`, From 9b0ed9587aa358cd7c533c105bbec9c10805eb46 Mon Sep 17 00:00:00 2001 From: Chenjie Shi Date: Fri, 19 Jan 2024 16:19:53 +0800 Subject: [PATCH 11/33] Add feature and fix bug for converter (#4860) 1. remove useless enum 2. refine example file name logic 3. add full support for check name availability 4. change body param name and doc 5. change to use `ArmResourceCreateOrReplaceAsync` 6. add url type support 7. add number precision support 8. fix default value bug 9. fix readonly and patch model split issues 10. change doc syntax --- .../converter_feature_2024-01-16-10-39.json | 10 + .../src/emiters/emit-typespec-config.ts | 1 + .../src/generate/generate-arm-resource.ts | 24 +- .../src/generate/generate-operations.ts | 4 +- .../generate/generate-service-information.ts | 4 +- .../openapi-to-typespec/src/interfaces.ts | 3 +- .../openapi-to-typespec/src/model.ts | 6 +- .../src/transforms/transform-arm-resources.ts | 130 +- .../src/transforms/transform-object.ts | 20 +- .../src/transforms/transform-operations.ts | 3 +- .../transform-service-information.ts | 2 +- .../openapi-to-typespec/src/utils/docs.ts | 40 +- .../src/utils/resource-discovery.ts | 17 +- .../openapi-to-typespec/src/utils/values.ts | 2 +- .../test/analyzeText/tsp-output/main.tsp | 24 +- .../test/analyzeText/tsp-output/models.tsp | 1207 +- .../test/analyzeText/tsp-output/routes.tsp | 390 +- .../test/anomalyDetector/tsp-output/main.tsp | 40 +- .../anomalyDetector/tsp-output/models.tsp | 700 +- .../anomalyDetector/tsp-output/routes.tsp | 140 +- .../arm-agrifood/tsp-output/DataConnector.tsp | 48 +- .../tsp-output/DataManagerForAgriculture.tsp | 66 +- .../DataManagerForAgricultureExtension.tsp | 40 +- .../DataManagerForAgricultureSolution.tsp | 30 +- .../arm-agrifood/tsp-output/Extension.tsp | 56 +- .../tsp-output/PrivateEndpointConnection.tsp | 38 +- .../tsp-output/PrivateLinkResource.tsp | 18 +- .../test/arm-agrifood/tsp-output/Solution.tsp | 88 +- .../test/arm-agrifood/tsp-output/main.tsp | 12 +- .../test/arm-agrifood/tsp-output/models.tsp | 554 +- .../test/arm-agrifood/tsp-output/routes.tsp | 32 +- .../arm-agrifood/tsp-output/tspconfig.yaml | 1 + .../arm-alertsmanagement/tsp-output/Alert.tsp | 114 +- .../tsp-output/AlertProcessingRule.tsp | 58 +- .../tsp-output/SmartGroup.tsp | 86 +- ...roup_To_All_Alerts_In_A_Subscription.json} | 0 ...d_Sev1_Alerts_In_Two_Resource_Groups.json} | 0 ..._Specific_Date_Pacific_Standard_Time.json} | 0 ...on_Coming_From_A_Specific_Alert_Rule.json} | 0 ...very_Sat_And_Sun_India_Standard_Time.json} | 0 ...ri_09_00_17_00_Eastern_Standard_Time.json} | 0 .../arm-alertsmanagement/tsp-output/main.tsp | 16 +- .../tsp-output/models.tsp | 700 +- .../tsp-output/tspconfig.yaml | 1 + .../tsp-output/AnalysisServicesServer.tsp | 107 +- .../arm-analysisservices/tsp-output/main.tsp | 12 +- .../tsp-output/models.tsp | 347 +- .../tsp-output/tspconfig.yaml | 1 + .../tsp-output/AccessInformationContract.tsp | 84 +- .../tsp-output/ApiContract.tsp | 206 +- .../ApiManagementServiceResource.tsp | 884 +- .../tsp-output/ApiReleaseContract.tsp | 80 +- .../tsp-output/ApiVersionSetContract.tsp | 80 +- .../AuthorizationServerContract.tsp | 84 +- .../tsp-output/BackendContract.tsp | 93 +- .../tsp-output/CacheContract.tsp | 74 +- .../tsp-output/CertificateContract.tsp | 68 +- .../tsp-output/DeletedServiceContract.tsp | 20 +- .../tsp-output/DiagnosticContract.tsp | 80 +- .../tsp-output/EmailTemplateContract.tsp | 80 +- .../GatewayCertificateAuthorityContract.tsp | 60 +- .../tsp-output/GatewayContract.tsp | 142 +- .../GatewayHostnameConfigurationContract.tsp | 60 +- .../tsp-output/GlobalSchemaContract.tsp | 62 +- .../tsp-output/GroupContract.tsp | 112 +- .../tsp-output/IdentityProviderContract.tsp | 72 +- .../tsp-output/IssueAttachmentContract.tsp | 60 +- .../tsp-output/IssueCommentContract.tsp | 60 +- .../tsp-output/IssueContract.tsp | 84 +- .../tsp-output/LoggerContract.tsp | 78 +- .../tsp-output/NamedValueContract.tsp | 92 +- .../tsp-output/NotificationContract.tsp | 80 +- .../OpenidConnectProviderContract.tsp | 100 +- .../tsp-output/OperationContract.tsp | 84 +- .../tsp-output/PolicyContract.tsp | 52 +- .../tsp-output/PortalDelegationSettings.tsp | 60 +- .../tsp-output/PortalRevisionContract.tsp | 68 +- .../tsp-output/PortalSigninSettings.tsp | 56 +- .../tsp-output/PortalSignupSettings.tsp | 56 +- .../tsp-output/PrivateEndpointConnection.tsp | 36 +- .../tsp-output/PrivateLinkResource.tsp | 16 +- .../tsp-output/ProductContract.tsp | 198 +- .../tsp-output/SchemaContract.tsp | 66 +- .../tsp-output/SubscriptionContract.tsp | 120 +- .../tsp-output/TagContract.tsp | 40 +- .../tsp-output/TagDescriptionContract.tsp | 60 +- .../tsp-output/TenantSettingsContract.tsp | 20 +- .../tsp-output/UserContract.tsp | 185 +- ...pi_Management_List_Sk_Us_Consumption.json} | 0 ..._Api_Management_List_Sk_Us_Dedicated.json} | 0 ...pi_Management_Backup_With_Access_Key.json} | 0 ..._Backup_With_System_Managed_Identity.json} | 0 ..._With_User_Assigned_Managed_Identity.json} | 0 ..._Region_Service_With_Custom_Hostname.json} | 0 ...Update_Api_Management_Create_Service.json} | 0 ...Management_Create_Service_Having_Msi.json} | 0 ...reate_Service_In_Vnet_With_Public_Ip.json} | 0 ...i_Management_Create_Service_In_Zones.json} | 0 ...rvice_With_Custom_Hostname_Key_Vault.json} | 0 ...ate_Service_With_System_Certificates.json} | 0 ..._Service_With_User_Assigned_Identity.json} | 0 ...eateOrUpdate_Api_Management_Undelete.json} | 0 ...rvice_Get_Multi_Region_Internal_Vnet.json} | 0 ...t_Api_Management_Service_Get_Service.json} | 0 ...ement_Service_Get_Service_Having_Msi.json} | 0 ...agement_Update_Service_Disable_Tls10.json} | 0 ...ent_Update_Service_Publisher_Details.json} | 0 ...e_To_New_Vnet_And_Availability_Zones.json} | 0 ...Get_Api_Management_Get_Api_Operation.json} | 0 ...nagement_Get_Api_Operation_Pet_Store.json} | 0 ...teOrUpdate_Api_Management_Create_Api.json} | 0 ...date_Api_Management_Create_Api_Clone.json} | 0 ...e_Api_New_Version_Using_Existing_Api.json} | 0 ...reate_Api_Revision_From_Existing_Api.json} | 0 ...pi_Using_Import_Override_Service_Url.json} | 0 ...agement_Create_Api_Using_Oai3_Import.json} | 0 ...ment_Create_Api_Using_Swagger_Import.json} | 0 ...agement_Create_Api_Using_Wadl_Import.json} | 0 ...ment_Create_Api_With_Open_Id_Connect.json} | 0 ...e_Api_Management_Create_Graph_Ql_Api.json} | 0 ...p_Pass_Through_Api_Using_Wsdl_Import.json} | 0 ...e_Soap_To_Rest_Api_Using_Wsdl_Import.json} | 0 ...Api_Management_Create_Web_Socket_Api.json} | 0 ..._Get_Api_Management_Get_Api_Contract.json} | 0 ...Management_Get_Api_Revision_Contract.json} | 0 ...agement_Create_Backend_Proxy_Backend.json} | 0 ...gement_Create_Backend_Service_Fabric.json} | 0 ...te_Api_Management_Create_Certificate.json} | 0 ...nt_Create_Certificate_With_Key_Vault.json} | 0 ...e_Get_Api_Management_Get_Certificate.json} | 0 ...ement_Get_Certificate_With_Key_Vault.json} | 0 ...Update_Api_Management_Create_Schema1.json} | 0 ...Update_Api_Management_Create_Schema2.json} | 0 ...chema_Get_Api_Management_Get_Schema1.json} | 0 ...chema_Get_Api_Management_Get_Schema2.json} | 0 ...OrUpdate_Api_Management_Create_Group.json} | 0 ...Api_Management_Create_Group_External.json} | 0 ...date_Api_Management_Create_Ai_Logger.json} | 0 ...date_Api_Management_Create_Eh_Logger.json} | 0 ...te_Api_Management_Create_Named_Value.json} | 0 ...nt_Create_Named_Value_With_Key_Vault.json} | 0 ...e_Get_Api_Management_Get_Named_Value.json} | 0 ...ement_Get_Named_Value_With_Key_Vault.json} | 0 ...tyCheckAsync_Http_Connectivity_Check.json} | 0 ...ityCheckAsync_Tcp_Connectivity_Check.json} | 0 ...Get_Api_Management_Get_Tenant_Access.json} | 0 ...Api_Management_Get_Tenant_Git_Access.json} | 0 .../arm-apimanagement/tsp-output/main.tsp | 12 +- .../arm-apimanagement/tsp-output/models.tsp | 5295 +++-- .../arm-apimanagement/tsp-output/routes.tsp | 1162 +- .../tsp-output/tspconfig.yaml | 1 + .../tsp-output/DenyAssignment.tsp | 46 +- .../tsp-output/ProviderOperationsMetadata.tsp | 38 +- .../tsp-output/RoleAssignment.tsp | 58 +- .../tsp-output/RoleAssignmentSchedule.tsp | 22 +- .../RoleAssignmentScheduleInstance.tsp | 22 +- .../RoleAssignmentScheduleRequest.tsp | 57 +- .../tsp-output/RoleDefinition.tsp | 42 +- .../tsp-output/RoleEligibilitySchedule.tsp | 22 +- .../RoleEligibilityScheduleInstance.tsp | 22 +- .../RoleEligibilityScheduleRequest.tsp | 57 +- .../tsp-output/RoleManagementPolicy.tsp | 35 +- .../RoleManagementPolicyAssignment.tsp | 34 +- ..._Create_Role_Assignment_For_Resource.json} | 0 ...e_Role_Assignment_For_Resource_Group.json} | 0 ...ate_Role_Assignment_For_Subscription.json} | 0 ...Patch_Partial_Role_Management_Policy.json} | 0 ..._Update_Patch_Role_Management_Policy.json} | 0 .../arm-authorization/tsp-output/main.tsp | 20 +- .../arm-authorization/tsp-output/models.tsp | 1444 +- .../arm-authorization/tsp-output/routes.tsp | 74 +- .../tsp-output/tspconfig.yaml | 1 + .../tsp-output/Application.tsp | 79 +- .../tsp-output/BusinessProcess.tsp | 59 +- .../tsp-output/BusinessProcessVersion.tsp | 46 +- .../tsp-output/InfrastructureResource.tsp | 59 +- .../tsp-output/Space.tsp | 63 +- .../tsp-output/main.tsp | 12 +- .../tsp-output/models.tsp | 516 +- .../tsp-output/routes.tsp | 162 +- .../tsp-output/tspconfig.yaml | 1 + .../tsp-output/AvailabilitySet.tsp | 76 +- .../tsp-output/CapacityReservation.tsp | 64 +- .../tsp-output/CapacityReservationGroup.tsp | 70 +- .../arm-compute/tsp-output/CloudService.tsp | 183 +- .../tsp-output/CloudServiceRole.tsp | 18 +- .../tsp-output/CommunityGallery.tsp | 12 +- .../tsp-output/CommunityGalleryImage.tsp | 18 +- .../CommunityGalleryImageVersion.tsp | 18 +- .../arm-compute/tsp-output/DedicatedHost.tsp | 70 +- .../tsp-output/DedicatedHostGroup.tsp | 66 +- .../test/arm-compute/tsp-output/Disk.tsp | 79 +- .../arm-compute/tsp-output/DiskAccess.tsp | 82 +- .../tsp-output/DiskEncryptionSet.tsp | 66 +- .../tsp-output/DiskRestorePoint.tsp | 52 +- .../test/arm-compute/tsp-output/Gallery.tsp | 77 +- .../tsp-output/GalleryApplication.tsp | 56 +- .../tsp-output/GalleryApplicationVersion.tsp | 60 +- .../arm-compute/tsp-output/GalleryImage.tsp | 56 +- .../tsp-output/GalleryImageVersion.tsp | 60 +- .../test/arm-compute/tsp-output/Image.tsp | 65 +- .../test/arm-compute/tsp-output/OSFamily.tsp | 16 +- .../test/arm-compute/tsp-output/OSVersion.tsp | 16 +- .../tsp-output/PrivateEndpointConnection.tsp | 38 +- .../tsp-output/ProximityPlacementGroup.tsp | 66 +- .../arm-compute/tsp-output/RestorePoint.tsp | 50 +- .../tsp-output/RestorePointCollection.tsp | 78 +- .../arm-compute/tsp-output/RoleInstance.tsp | 92 +- .../tsp-output/RollingUpgradeStatusInfo.tsp | 12 +- .../arm-compute/tsp-output/SharedGallery.tsp | 22 +- .../tsp-output/SharedGalleryImage.tsp | 22 +- .../tsp-output/SharedGalleryImageVersion.tsp | 22 +- .../test/arm-compute/tsp-output/Snapshot.tsp | 80 +- .../tsp-output/SshPublicKeyResource.tsp | 60 +- .../arm-compute/tsp-output/VirtualMachine.tsp | 246 +- .../tsp-output/VirtualMachineExtension.tsp | 64 +- .../VirtualMachineExtensionImage.tsp | 14 +- .../tsp-output/VirtualMachineRunCommand.tsp | 72 +- .../tsp-output/VirtualMachineScaleSet.tsp | 448 +- .../VirtualMachineScaleSetExtension.tsp | 80 +- .../tsp-output/VirtualMachineScaleSetVM.tsp | 224 +- .../VirtualMachineScaleSetVMExtension.tsp | 82 +- ...ilability_Set_Delete_Maximum_Set_Gen.json} | 0 ...ilability_Set_Delete_Minimum_Set_Gen.json} | 0 ...Availability_Set_Get_Maximum_Set_Gen.json} | 0 ...Availability_Set_Get_Minimum_Set_Gen.json} | 0 ...List_Available_Sizes_Maximum_Set_Gen.json} | 0 ...List_Available_Sizes_Minimum_Set_Gen.json} | 0 ...vailability_Set_List_Maximum_Set_Gen.json} | 0 ...vailability_Set_List_Minimum_Set_Gen.json} | 0 ...ilability_Set_Update_Maximum_Set_Gen.json} | 0 ...ilability_Set_Update_Minimum_Set_Gen.json} | 0 ...rvation_Group_Delete_Maximum_Set_Gen.json} | 0 ...rvation_Group_Delete_Minimum_Set_Gen.json} | 0 ...rvation_Group_Update_Maximum_Set_Gen.json} | 0 ...rvation_Group_Update_Minimum_Set_Gen.json} | 0 ...y_Reservation_Delete_Maximum_Set_Gen.json} | 0 ...y_Reservation_Delete_Minimum_Set_Gen.json} | 0 ...y_Reservation_Update_Maximum_Set_Gen.json} | 0 ...y_Reservation_Update_Minimum_Set_Gen.json} | 0 ...ew_Cloud_Service_With_Multiple_Roles.json} | 0 ...oles_In_A_Specific_Availability_Zone.json} | 0 ...e_New_Cloud_Service_With_Single_Role.json} | 0 ..._Role_And_Certificate_From_Key_Vault.json} | 0 ...e_With_Single_Role_And_Rdp_Extension.json} | 0 ...ate_Or_Update_A_Dedicated_Host_Group.json} | 0 ...ed_Host_Group_With_Ultra_Ssd_Support.json} | 0 ...ed_Host_Group_Delete_Maximum_Set_Gen.json} | 0 ...ed_Host_Group_Delete_Minimum_Set_Gen.json} | 0 ...ps_Get_Create_A_Dedicated_Host_Group.json} | 0 ...tra_Ssd_Enabled_Dedicated_Host_Group.json} | 0 ...st_By_Resource_Group_Maximum_Set_Gen.json} | 0 ...st_By_Resource_Group_Minimum_Set_Gen.json} | 0 ...List_By_Subscription_Maximum_Set_Gen.json} | 0 ...List_By_Subscription_Minimum_Set_Gen.json} | 0 ...ed_Host_Group_Update_Maximum_Set_Gen.json} | 0 ...ed_Host_Group_Update_Minimum_Set_Gen.json} | 0 ...edicated_Host_Delete_Maximum_Set_Gen.json} | 0 ...edicated_Host_Delete_Minimum_Set_Gen.json} | 0 ...t_List_By_Host_Group_Maximum_Set_Gen.json} | 0 ...t_List_By_Host_Group_Minimum_Set_Gen.json} | 0 ...edicated_Host_Update_Maximum_Set_Gen.json} | 0 ...edicated_Host_Update_Minimum_Set_Gen.json} | 0 ..._Update_Dedicated_Host_Update_Resize.json} | 0 ...rmation_About_A_Disk_Access_Resource.json} | 0 ...cess_Resource_With_Private_Endpoints.json} | 0 ...rUpdate_Create_A_Disk_Encryption_Set.json} | 0 ..._Vault_From_A_Different_Subscription.json} | 0 ...th_Key_Vault_From_A_Different_Tenant.json} | 0 ...ormation_About_A_Disk_Encryption_Set.json} | 0 ...on_Set_When_Auto_Key_Rotation_Failed.json} | 0 ..._Update_Update_A_Disk_Encryption_Set.json} | 0 ...ersion_Enabled_Set_To_True_Succeeded.json} | 0 ...Version_Enabled_Set_To_True_Updating.json} | 0 ...remental_Disk_Restore_Point_Resource.json} | 0 ..._Resource_Is_From_A_Different_Region.json} | 0 ..._Encrypted_With_Customer_Managed_Key.json} | 0 ..._Associate_With_Disk_Access_Resource.json} | 0 ...d_Associate_With_Disk_Encryption_Set.json} | 0 ...A_Managed_Disk_By_Copying_A_Snapshot.json} | 0 ...d_Blob_From_A_Different_Subscription.json} | 0 ...aged_Blob_From_The_Same_Subscription.json} | 0 ...A_Managed_Disk_From_A_Platform_Image.json} | 0 ...zure_Compute_Gallery_Community_Image.json} | 0 ..._Compute_Gallery_Direct_Shared_Image.json} | 0 ..._From_An_Azure_Compute_Gallery_Image.json} | 0 ...n_The_Same_Or_Different_Subscription.json} | 0 ...isk_From_Elastic_San_Volume_Snapshot.json} | 0 ...isk_From_Import_Secure_Create_Option.json} | 0 ...Upload_Prepared_Secure_Create_Option.json} | 0 ...aged_Disk_With_Data_Access_Auth_Mode.json} | 0 ...k_With_Optimized_For_Frequent_Attach.json} | 0 ...A_Managed_Disk_With_Performance_Plus.json} | 0 ...ed_Disk_With_Premium_V2_Account_Type.json} | 0 ...A_Managed_Disk_With_Security_Profile.json} | 0 ...naged_Disk_With_Ssd_Zrs_Account_Type.json} | 0 ...unt_Type_With_Read_Only_Property_Set.json} | 0 ...rUpdate_Create_A_Managed_Upload_Disk.json} | 0 ...rUpdate_Create_An_Empty_Managed_Disk.json} | 0 ...ty_Managed_Disk_In_Extended_Location.json} | 0 ..._Disk_With_Logical_Sector_Size_512_E.json} | 0 ...ntAccess_Get_A_Sas_On_A_Managed_Disk.json} | 0 ...s_On_Managed_Disk_And_Vm_Guest_State.json} | 0 ...date_A_Bursting_Enabled_Managed_Disk.json} | 0 ...d_Disk_To_Add_Accelerated_Networking.json} | 0 ...e_A_Managed_Disk_To_Add_Architecture.json} | 0 ..._A_Managed_Disk_To_Add_Purchase_Plan.json} | 0 ...ged_Disk_To_Add_Supports_Hibernation.json} | 0 ...Update_A_Managed_Disk_To_Change_Tier.json} | 0 ...e_A_Managed_Disk_To_Disable_Bursting.json} | 0 ...isable_Optimized_For_Frequent_Attach.json} | 0 ...aged_Disk_With_Disk_Controller_Types.json} | 0 ...ove_Disk_Access_Resource_Association.json} | 0 ...eOrUpdate_Create_A_Community_Gallery.json} | 0 ...te_Create_Or_Update_A_Simple_Gallery.json} | 0 ..._Simple_Gallery_With_Sharing_Profile.json} | 0 ...e_Gallery_With_Soft_Deletion_Enabled.json} | 0 ...alleries_Get_Get_A_Community_Gallery.json} | 0 ....json => Galleries_Get_Get_A_Gallery.json} | 0 ...y_With_Expand_Sharing_Profile_Groups.json} | 0 ...et_A_Gallery_With_Select_Permissions.json} | 0 ...et_Get_A_Gallery_Application_Version.json} | 0 ...tion_Version_With_Replication_Status.json} | 0 ...ng_Community_Gallery_Image_As_Source.json} | 0 ...ersion_Using_Managed_Image_As_Source.json} | 0 ...x_Of_Disks_And_Snapshots_As_A_Source.json} | 0 ...rsion_Using_Shallow_Replication_Mode.json} | 0 ...Version_Using_Shared_Image_As_Source.json} | 0 ..._Version_Using_Snapshots_As_A_Source.json} | 0 ..._Image_Version_Using_Vhd_As_A_Source.json} | 0 ...ery_Image_Version_Using_Vm_As_Source.json} | 0 ..._Target_Extended_Locations_Specified.json} | 0 ...ions_Get_Get_A_Gallery_Image_Version.json} | 0 ...mage_Version_With_Replication_Status.json} | 0 ...e_Version_With_Snapshots_As_A_Source.json} | 0 ...y_Image_Version_With_Vhd_As_A_Source.json} | 0 ...mage_Version_Managed_Image_As_Source.json} | 0 ...lery_Image_Version_Without_Source_Id.json} | 0 ..._To_The_Sharing_Profile_Of_A_Gallery.json} | 0 ...e_Reset_Sharing_Profile_Of_A_Gallery.json} | 0 ..._Update_Share_A_Gallery_To_Community.json} | 0 ..._A_Virtual_Machine_Image_From_A_Blob.json} | 0 ...ob_With_Disk_Encryption_Set_Resource.json} | 0 ...al_Machine_Image_From_A_Managed_Disk.json} | 0 ...sk_With_Disk_Encryption_Set_Resource.json} | 0 ...irtual_Machine_Image_From_A_Snapshot.json} | 0 ...ot_With_Disk_Encryption_Set_Resource.json} | 0 ...age_From_An_Existing_Virtual_Machine.json} | 0 ...hat_Includes_A_Data_Disk_From_A_Blob.json} | 0 ...udes_A_Data_Disk_From_A_Managed_Disk.json} | 0 ...Includes_A_Data_Disk_From_A_Snapshot.json} | 0 ..._Delete_Image_Delete_Maximum_Set_Gen.json} | 0 ..._Delete_Image_Delete_Minimum_Set_Gen.json} | 0 ...Or_Update_A_Restore_Point_Collection.json} | 0 ...int_Collection_For_Cross_Region_Copy.json} | 0 ...nt_Collection_Delete_Maximum_Set_Gen.json} | 0 ...nt_Collection_Delete_Minimum_Set_Gen.json} | 0 ...ined_In_The_Restore_Point_Collection.json} | 0 ...ined_In_The_Restore_Point_Collection.json} | 0 ...nt_Collection_Update_Maximum_Set_Gen.json} | 0 ...nt_Collection_Update_Minimum_Set_Gen.json} | 0 ..._Restore_Point_To_A_Different_Region.json} | 0 ...Points_Create_Create_A_Restore_Point.json} | 0 ...Restore_Point_Delete_Maximum_Set_Gen.json} | 0 ...Restore_Point_Delete_Minimum_Set_Gen.json} | 0 ...estorePoints_Get_Get_A_Restore_Point.json} | 0 ...Get_Restore_Point_With_Instance_View.json} | 0 ...d_Blob_From_A_Different_Subscription.json} | 0 ...aged_Blob_From_The_Same_Subscription.json} | 0 ..._From_An_Elastic_San_Volume_Snapshot.json} | 0 ...The_Same_Or_A_Different_Subscription.json} | 0 ...t_Subscription_In_A_Different_Region.json} | 0 ...Get_Get_Information_About_A_Snapshot.json} | 0 ...mation_About_An_Incremental_Snapshot.json} | 0 ...> Snapshots_Update_Update_A_Snapshot.json} | 0 ...Snapshot_With_Accelerated_Networking.json} | 0 ...sh_Public_Key_Delete_Maximum_Set_Gen.json} | 0 ...sh_Public_Key_Delete_Minimum_Set_Gen.json} | 0 ...st_By_Resource_Group_Maximum_Set_Gen.json} | 0 ...st_By_Resource_Group_Minimum_Set_Gen.json} | 0 ...List_By_Subscription_Maximum_Set_Gen.json} | 0 ...List_By_Subscription_Minimum_Set_Gen.json} | 0 ...sh_Public_Key_Update_Maximum_Set_Gen.json} | 0 ...sh_Public_Key_Update_Minimum_Set_Gen.json} | 0 ..._Extension_Image_Get_Maximum_Set_Gen.json} | 0 ..._Extension_Image_Get_Minimum_Set_Gen.json} | 0 ...ion_Image_List_Types_Maximum_Set_Gen.json} | 0 ...ion_Image_List_Types_Minimum_Set_Gen.json} | 0 ...ion_Create_Or_Update_Maximum_Set_Gen.json} | 0 ...ion_Create_Or_Update_Minimum_Set_Gen.json} | 0 ...ine_Extension_Delete_Maximum_Set_Gen.json} | 0 ...ine_Extension_Delete_Minimum_Set_Gen.json} | 0 ...achine_Extension_Get_Maximum_Set_Gen.json} | 0 ...achine_Extension_Get_Minimum_Set_Gen.json} | 0 ...chine_Extension_List_Maximum_Set_Gen.json} | 0 ...chine_Extension_List_Minimum_Set_Gen.json} | 0 ...ion_Create_Or_Update_Maximum_Set_Gen.json} | 0 ...ion_Create_Or_Update_Minimum_Set_Gen.json} | 0 ...Set_Extension_Delete_Maximum_Set_Gen.json} | 0 ...Set_Extension_Delete_Minimum_Set_Gen.json} | 0 ...le_Set_Extension_Get_Maximum_Set_Gen.json} | 0 ...le_Set_Extension_Get_Minimum_Set_Gen.json} | 0 ...e_Set_Extension_List_Maximum_Set_Gen.json} | 0 ...e_Set_Extension_List_Minimum_Set_Gen.json} | 0 ...Set_Extension_Update_Maximum_Set_Gen.json} | 0 ...Set_Extension_Update_Minimum_Set_Gen.json} | 0 ...lling_Upgrade_Cancel_Maximum_Set_Gen.json} | 0 ...lling_Upgrade_Cancel_Minimum_Set_Gen.json} | 0 ...g_Upgrade_Get_Latest_Maximum_Set_Gen.json} | 0 ...g_Upgrade_Get_Latest_Minimum_Set_Gen.json} | 0 ...ade_Start_Os_Upgrade_Maximum_Set_Gen.json} | 0 ...ade_Start_Os_Upgrade_Minimum_Set_Gen.json} | 0 ...le_Set_Vm_Deallocate_Maximum_Set_Gen.json} | 0 ...le_Set_Vm_Deallocate_Minimum_Set_Gen.json} | 0 ...t_Get_Vm_Scale_Set_Vm_With_User_Data.json} | 0 ...Scale_Set_Vm_With_Vm_Size_Properties.json} | 0 ...ne_Scale_Set_Vm_List_Maximum_Set_Gen.json} | 0 ...ne_Scale_Set_Vm_List_Minimum_Set_Gen.json} | 0 ..._Perform_Maintenance_Maximum_Set_Gen.json} | 0 ..._Perform_Maintenance_Minimum_Set_Gen.json} | 0 ...ale_Set_Vm_Power_Off_Maximum_Set_Gen.json} | 0 ...ale_Set_Vm_Power_Off_Minimum_Set_Gen.json} | 0 ...cale_Set_Vm_Redeploy_Maximum_Set_Gen.json} | 0 ...cale_Set_Vm_Redeploy_Minimum_Set_Gen.json} | 0 ...e_Set_Vm_Reimage_All_Maximum_Set_Gen.json} | 0 ...e_Set_Vm_Reimage_All_Minimum_Set_Gen.json} | 0 ...Scale_Set_Vm_Reimage_Maximum_Set_Gen.json} | 0 ...Scale_Set_Vm_Reimage_Minimum_Set_Gen.json} | 0 ...Scale_Set_Vm_Restart_Maximum_Set_Gen.json} | 0 ...Scale_Set_Vm_Restart_Minimum_Set_Gen.json} | 0 ...e_Scale_Set_Vm_Start_Maximum_Set_Gen.json} | 0 ...e_Scale_Set_Vm_Start_Minimum_Set_Gen.json} | 0 ..._Scale_Set_Vm_Update_Maximum_Set_Gen.json} | 0 ..._Scale_Set_Vm_Update_Minimum_Set_Gen.json} | 0 ...ngle_Placement_Group_Maximum_Set_Gen.json} | 0 ...ngle_Placement_Group_Minimum_Set_Gen.json} | 0 ...om_An_Unmanaged_Generalized_Os_Image.json} | 0 ...ge_Scale_Set_With_Unmanaged_Os_Disks.json} | 0 ...eate_A_Scale_Set_From_A_Custom_Image.json} | 0 ..._Set_From_A_Generalized_Shared_Image.json} | 0 ..._Set_From_A_Specialized_Shared_Image.json} | 0 ..._Disable_Tcp_State_Tracking_Property.json} | 0 ...le_Set_With_A_Marketplace_Image_Plan.json} | 0 ...et_With_An_Azure_Application_Gateway.json} | 0 ...cale_Set_With_An_Azure_Load_Balancer.json} | 0 ...A_Scale_Set_With_Application_Profile.json} | 0 ...e_Set_With_Automatic_Repairs_Enabled.json} | 0 ...te_A_Scale_Set_With_Boot_Diagnostics.json} | 0 ..._Scale_Set_With_Disk_Controller_Type.json} | 0 ...et_Resource_In_Os_Disk_And_Data_Disk.json} | 0 ...Set_With_Empty_Data_Disks_On_Each_Vm.json} | 0 ..._A_Scale_Set_With_Ephemeral_Os_Disks.json} | 0 ...al_Os_Disks_Using_Placement_Property.json} | 0 ...Scale_Set_With_Extension_Time_Budget.json} | 0 ...ale_Set_With_Fpga_Network_Interfaces.json} | 0 ...on_Using_Encryption_At_Host_Property.json} | 0 ...le_Set_With_Managed_Boot_Diagnostics.json} | 0 ..._With_Public_Ip_Address_Dns_Settings.json} | 0 ...th_Os_Image_Scheduled_Events_Enabled.json} | 0 ...ale_Set_With_Password_Authentication.json} | 0 ...ate_A_Scale_Set_With_Premium_Storage.json} | 0 ...A_Scale_Set_With_Priority_Mix_Policy.json} | 0 ...ate_A_Scale_Set_With_Scale_In_Policy.json} | 0 ..._Set_With_Security_Posture_Reference.json} | 0 ...ith_Security_Type_As_Confidential_Vm.json} | 0 ..._Set_With_Service_Artifact_Reference.json} | 0 ...A_Scale_Set_With_Spot_Restore_Policy.json} | 0 ..._A_Scale_Set_With_Ssh_Authentication.json} | 0 ...h_Terminate_Scheduled_Events_Enabled.json} | 0 ...fi_Settings_Of_Secure_Boot_And_V_Tpm.json} | 0 ...te_Create_A_Scale_Set_With_User_Data.json} | 0 ..._Virtual_Machines_In_Different_Zones.json} | 0 ..._A_Scale_Set_With_Vm_Size_Properties.json} | 0 ...n_That_Has_Suppress_Failures_Enabled.json} | 0 ...th_Protected_Settings_From_Key_Vault.json} | 0 ..._Scale_Set_With_Capacity_Reservation.json} | 0 ...Scale_Set_Deallocate_Maximum_Set_Gen.json} | 0 ...Scale_Set_Deallocate_Minimum_Set_Gen.json} | 0 ...Set_Delete_Instances_Maximum_Set_Gen.json} | 0 ...Set_Delete_Instances_Minimum_Set_Gen.json} | 0 ...m_Update_Domain_Walk_Maximum_Set_Gen.json} | 0 ...m_Update_Domain_Walk_Minimum_Set_Gen.json} | 0 ...et_Get_Instance_View_Maximum_Set_Gen.json} | 0 ...et_Get_Instance_View_Minimum_Set_Gen.json} | 0 ...t_Os_Upgrade_History_Maximum_Set_Gen.json} | 0 ...t_Os_Upgrade_History_Minimum_Set_Gen.json} | 0 ..._Get_Get_A_Virtual_Machine_Scale_Set.json} | 0 ...st_Group_Through_Automatic_Placement.json} | 0 ...ual_Machine_Scale_Set_With_User_Data.json} | 0 ...ale_Set_Vm_With_Disk_Controller_Type.json} | 0 ...e_Scale_Set_List_All_Maximum_Set_Gen.json} | 0 ...e_Scale_Set_List_All_Minimum_Set_Gen.json} | 0 ..._Scale_Set_List_Skus_Maximum_Set_Gen.json} | 0 ..._Scale_Set_List_Skus_Minimum_Set_Gen.json} | 0 ...chine_Scale_Set_List_Maximum_Set_Gen.json} | 0 ...chine_Scale_Set_List_Minimum_Set_Gen.json} | 0 ..._Perform_Maintenance_Maximum_Set_Gen.json} | 0 ..._Perform_Maintenance_Minimum_Set_Gen.json} | 0 ..._Scale_Set_Power_Off_Maximum_Set_Gen.json} | 0 ..._Scale_Set_Power_Off_Minimum_Set_Gen.json} | 0 ...hineScaleSets_Reapply_MaximumSet_Gen.json} | 0 ...hineScaleSets_Reapply_MinimumSet_Gen.json} | 0 ...e_Scale_Set_Redeploy_Maximum_Set_Gen.json} | 0 ...e_Scale_Set_Redeploy_Minimum_Set_Gen.json} | 0 ...cale_Set_Reimage_All_Maximum_Set_Gen.json} | 0 ...cale_Set_Reimage_All_Minimum_Set_Gen.json} | 0 ...ne_Scale_Set_Reimage_Maximum_Set_Gen.json} | 0 ...ne_Scale_Set_Reimage_Minimum_Set_Gen.json} | 0 ...ne_Scale_Set_Restart_Maximum_Set_Gen.json} | 0 ...ne_Scale_Set_Restart_Minimum_Set_Gen.json} | 0 ...ration_Service_State_Maximum_Set_Gen.json} | 0 ...ration_Service_State_Minimum_Set_Gen.json} | 0 ...hine_Scale_Set_Start_Maximum_Set_Gen.json} | 0 ...hine_Scale_Set_Start_Minimum_Set_Gen.json} | 0 ...Set_Update_Instances_Maximum_Set_Gen.json} | 0 ...Set_Update_Instances_Minimum_Set_Gen.json} | 0 ...ine_Scale_Set_Update_Maximum_Set_Gen.json} | 0 ...ine_Scale_Set_Update_Minimum_Set_Gen.json} | 0 ...tual_Machine_Capture_Maximum_Set_Gen.json} | 0 ...tual_Machine_Capture_Minimum_Set_Gen.json} | 0 ...ert_To_Managed_Disks_Maximum_Set_Gen.json} | 0 ...ert_To_Managed_Disks_Minimum_Set_Gen.json} | 0 ...om_An_Unmanaged_Generalized_Os_Image.json} | 0 ...ing_Assessment_Mode_Of_Image_Default.json} | 0 ...m_And_Automatic_By_Platform_Settings.json} | 0 ..._Setting_Patch_Mode_Of_Image_Default.json} | 0 ...nt_Mode_Set_To_Automatic_By_Platform.json} | 0 ..._Vm_With_Unmanaged_Os_And_Data_Disks.json} | 0 ..._A_Vm_From_A_Community_Gallery_Image.json} | 0 ...date_Create_A_Vm_From_A_Custom_Image.json} | 0 ...A_Vm_From_A_Generalized_Shared_Image.json} | 0 ...ate_A_Vm_From_A_Shared_Gallery_Image.json} | 0 ...A_Vm_From_A_Specialized_Shared_Image.json} | 0 ...tomer_Assigned_Platform_Fault_Domain.json} | 0 ...e_Create_A_Vm_In_An_Availability_Set.json} | 0 ...e_A_Vm_With_A_Marketplace_Image_Plan.json} | 0 ..._A_Vm_With_An_Extensions_Time_Budget.json} | 0 ...Create_A_Vm_With_Application_Profile.json} | 0 ...te_Create_A_Vm_With_Boot_Diagnostics.json} | 0 ...reate_A_Vm_With_Disk_Controller_Type.json} | 0 ...urce_Id_In_The_Os_Disk_And_Data_Disk.json} | 0 ...te_Create_A_Vm_With_Empty_Data_Disks.json} | 0 ...e_Create_A_Vm_With_Ephemeral_Os_Disk.json} | 0 ..._Cache_Disk_Using_Placement_Property.json} | 0 ...source_Disk_Using_Placement_Property.json} | 0 ...Create_A_Vm_With_Hibernation_Enabled.json} | 0 ...on_Using_Encryption_At_Host_Property.json} | 0 ...e_A_Vm_With_Managed_Boot_Diagnostics.json} | 0 ...With_Network_Interface_Configuration.json} | 0 ..._With_Public_Ip_Address_Dns_Settings.json} | 0 ...te_A_Vm_With_Password_Authentication.json} | 0 ...ate_Create_A_Vm_With_Premium_Storage.json} | 0 ...e_A_Vm_With_Scheduled_Events_Profile.json} | 0 ...ential_Vm_With_Customer_Managed_Keys.json} | 0 ...ential_Vm_With_Platform_Managed_Keys.json} | 0 ..._Create_A_Vm_With_Ssh_Authentication.json} | 0 ...fi_Settings_Of_Secure_Boot_And_V_Tpm.json} | 0 ...eOrUpdate_Create_A_Vm_With_User_Data.json} | 0 ..._Create_A_Vm_With_Vm_Size_Properties.json} | 0 ...ing_Assessment_Mode_Of_Image_Default.json} | 0 ...etting_Patch_Mode_Of_Automatic_By_Os.json} | 0 ...m_And_Automatic_By_Platform_Settings.json} | 0 ...m_And_Enable_Hotpatching_Set_To_True.json} | 0 ...A_Patch_Setting_Patch_Mode_Of_Manual.json} | 0 ...nt_Mode_Set_To_Automatic_By_Platform.json} | 0 ...pdate_A_Vm_With_Capacity_Reservation.json} | 0 ...l_Machine_Deallocate_Maximum_Set_Gen.json} | 0 ...l_Machine_Deallocate_Minimum_Set_Gen.json} | 0 ...alMachines_Get_Get_A_Virtual_Machine.json} | 0 ...st_Group_Through_Automatic_Placement.json} | 0 ...With_Disk_Controller_Type_Properties.json} | 0 ...tual_Machine_With_Vm_Size_Properties.json} | 0 ...st_Group_Through_Automatic_Placement.json} | 0 ...ew_Get_Virtual_Machine_Instance_View.json} | 0 ...ual_Machine_List_All_Maximum_Set_Gen.json} | 0 ...ual_Machine_List_All_Minimum_Set_Gen.json} | 0 ...Virtual_Machine_List_Maximum_Set_Gen.json} | 0 ...Virtual_Machine_List_Minimum_Set_Gen.json} | 0 ..._Perform_Maintenance_Maximum_Set_Gen.json} | 0 ..._Perform_Maintenance_Minimum_Set_Gen.json} | 0 ...al_Machine_Power_Off_Maximum_Set_Gen.json} | 0 ...al_Machine_Power_Off_Minimum_Set_Gen.json} | 0 ...ual_Machine_Redeploy_Maximum_Set_Gen.json} | 0 ...ual_Machine_Redeploy_Minimum_Set_Gen.json} | 0 ...mage_A_Non_Ephemeral_Virtual_Machine.json} | 0 ...es_Reimage_Reimage_A_Virtual_Machine.json} | 0 ...tual_Machine_Restart_Maximum_Set_Gen.json} | 0 ...tual_Machine_Restart_Minimum_Set_Gen.json} | 0 ...irtual_Machine_Start_Maximum_Set_Gen.json} | 0 ...irtual_Machine_Start_Minimum_Set_Gen.json} | 0 ...e_Update_A_Vm_By_Detaching_Data_Disk.json} | 0 ...te_A_Vm_By_Force_Detaching_Data_Disk.json} | 0 .../test/arm-compute/tsp-output/main.tsp | 28 +- .../test/arm-compute/tsp-output/models.tsp | 8235 +++++-- .../test/arm-compute/tsp-output/routes.tsp | 536 +- .../arm-compute/tsp-output/tspconfig.yaml | 1 + .../test/arm-dns/tsp-output/DnsRecord.tsp | 97 +- .../test/arm-dns/tsp-output/DnsZone.tsp | 105 +- ...ts_CreateOrUpdate_Create_A_Recordset.json} | 0 ...Recordset_With_Alias_Target_Resource.json} | 0 ...CreateOrUpdate_Create_Aaaa_Recordset.json} | 0 ..._CreateOrUpdate_Create_Caa_Recordset.json} | 0 ...reateOrUpdate_Create_Cname_Recordset.json} | 0 ...s_CreateOrUpdate_Create_Mx_Recordset.json} | 0 ...s_CreateOrUpdate_Create_Ns_Recordset.json} | 0 ..._CreateOrUpdate_Create_Ptr_Recordset.json} | 0 ..._CreateOrUpdate_Create_Soa_Recordset.json} | 0 ..._CreateOrUpdate_Create_Srv_Recordset.json} | 0 ..._CreateOrUpdate_Create_Txt_Recordset.json} | 0 ...RecordSets_Delete_Delete_A_Recordset.json} | 0 ...ordSets_Delete_Delete_Aaaa_Recordset.json} | 0 ...cordSets_Delete_Delete_Caa_Recordset.json} | 0 ...rdSets_Delete_Delete_Cname_Recordset.json} | 0 ...ecordSets_Delete_Delete_Mx_Recordset.json} | 0 ...ecordSets_Delete_Delete_Ns_Recordset.json} | 0 ...cordSets_Delete_Delete_Ptr_Recordset.json} | 0 ...cordSets_Delete_Delete_Srv_Recordset.json} | 0 ...cordSets_Delete_Delete_Txt_Recordset.json} | 0 ...on => RecordSets_Get_Get_A_Recordset.json} | 0 ...=> RecordSets_Get_Get_Aaaa_Recordset.json} | 0 ... => RecordSets_Get_Get_Caa_Recordset.json} | 0 ...> RecordSets_Get_Get_Cname_Recordset.json} | 0 ...n => RecordSets_Get_Get_Mx_Recordset.json} | 0 ...n => RecordSets_Get_Get_Ns_Recordset.json} | 0 ... => RecordSets_Get_Get_Ptr_Recordset.json} | 0 ... => RecordSets_Get_Get_Soa_Recordset.json} | 0 ... => RecordSets_Get_Get_Srv_Recordset.json} | 0 ... => RecordSets_Get_Get_Txt_Recordset.json} | 0 ...ordSets_ListByType_List_A_Recordsets.json} | 0 ...Sets_ListByType_List_Aaaa_Recordsets.json} | 0 ...dSets_ListByType_List_Caa_Recordsets.json} | 0 ...ets_ListByType_List_Cname_Recordsets.json} | 0 ...rdSets_ListByType_List_Mx_Recordsets.json} | 0 ...rdSets_ListByType_List_Ns_Recordsets.json} | 0 ...dSets_ListByType_List_Ptr_Recordsets.json} | 0 ...dSets_ListByType_List_Soa_Recordsets.json} | 0 ...dSets_ListByType_List_Srv_Recordsets.json} | 0 ...dSets_ListByType_List_Txt_Recordsets.json} | 0 ... RecordSets_Update_Patch_A_Recordset.json} | 0 ...cordSets_Update_Patch_Aaaa_Recordset.json} | 0 ...ecordSets_Update_Patch_Caa_Recordset.json} | 0 ...ordSets_Update_Patch_Cname_Recordset.json} | 0 ...RecordSets_Update_Patch_Mx_Recordset.json} | 0 ...RecordSets_Update_Patch_Ns_Recordset.json} | 0 ...ecordSets_Update_Patch_Ptr_Recordset.json} | 0 ...ecordSets_Update_Patch_Soa_Recordset.json} | 0 ...ecordSets_Update_Patch_Srv_Recordset.json} | 0 ...ecordSets_Update_Patch_Txt_Recordset.json} | 0 .../test/arm-dns/tsp-output/main.tsp | 12 +- .../test/arm-dns/tsp-output/models.tsp | 368 +- .../test/arm-dns/tsp-output/routes.tsp | 14 +- .../test/arm-dns/tsp-output/tspconfig.yaml | 1 + .../BatchDeploymentTrackedResource.tsp | 62 +- .../BatchEndpointTrackedResource.tsp | 62 +- .../tsp-output/CodeContainerResource.tsp | 42 +- .../tsp-output/CodeVersionResource.tsp | 57 +- .../tsp-output/ComponentContainerResource.tsp | 42 +- .../tsp-output/ComponentVersionResource.tsp | 54 +- .../tsp-output/ComputeResource.tsp | 230 +- .../tsp-output/DataContainerResource.tsp | 46 +- .../tsp-output/DataVersionBaseResource.tsp | 67 +- .../tsp-output/DatastoreResource.tsp | 72 +- .../EnvironmentContainerResource.tsp | 46 +- .../tsp-output/EnvironmentVersionResource.tsp | 58 +- .../tsp-output/Feature.tsp | 30 +- .../tsp-output/FeaturesetContainer.tsp | 64 +- .../tsp-output/FeaturesetVersion.tsp | 99 +- .../FeaturestoreEntityContainer.tsp | 64 +- .../tsp-output/FeaturestoreEntityVersion.tsp | 72 +- .../tsp-output/JobBaseResource.tsp | 81 +- .../tsp-output/LabelingJob.tsp | 69 +- .../tsp-output/ModelContainerResource.tsp | 46 +- .../tsp-output/ModelVersionResource.tsp | 80 +- .../OnlineDeploymentTrackedResource.tsp | 105 +- .../OnlineEndpointTrackedResource.tsp | 93 +- .../tsp-output/OutboundRuleBasicResource.tsp | 38 +- .../tsp-output/PrivateEndpointConnection.tsp | 40 +- .../tsp-output/Registry.tsp | 57 +- .../tsp-output/Schedule.tsp | 43 +- .../tsp-output/Workspace.tsp | 423 +- ...aceConnectionPropertiesV2BasicResource.tsp | 60 +- ...OrUpdate_Attach_A_Kubernetes_Compute.json} | 0 ..._CreateOrUpdate_Create_A_Aml_Compute.json} | 0 ...Update_Create_A_Data_Factory_Compute.json} | 0 ...CreateOrUpdate_Create_An_Aks_Compute.json} | 0 ...e_Create_An_Compute_Instance_Compute.json} | 0 ...Instance_Compute_With_Minimal_Inputs.json} | 0 ...pute_Instance_Compute_With_Schedules.json} | 0 ..._CreateOrUpdate_Update_A_Aml_Compute.json} | 0 ...CreateOrUpdate_Update_An_Aks_Compute.json} | 0 ...son => Compute_Get_Get_A_Aks_Compute.json} | 0 ...son => Compute_Get_Get_A_Aml_Compute.json} | 0 ...Compute_Get_Get_A_Kubernetes_Compute.json} | 0 ... Compute_Get_Get_An_Compute_Instance.json} | 0 ...e_Datastore_Azure_Blob_W_Account_Key.json} | 0 ...e_Data_Lake_Gen1_W_Service_Principal.json} | 0 ...e_Data_Lake_Gen2_W_Service_Principal.json} | 0 ...store_Azure_File_Store_W_Account_Key.json} | 0 ...rUpdate_Create_Or_Update_Auto_Ml_Job.json} | 0 ...rUpdate_Create_Or_Update_Command_Job.json} | 0 ...Update_Create_Or_Update_Pipeline_Job.json} | 0 ...eOrUpdate_Create_Or_Update_Sweep_Job.json} | 0 ...Job.json => Jobs_Get_Get_Auto_Ml_Job.json} | 0 ...Job.json => Jobs_Get_Get_Command_Job.json} | 0 ...ob.json => Jobs_Get_Get_Pipeline_Job.json} | 0 ...epJob.json => Jobs_Get_Get_Sweep_Job.json} | 0 ...b.json => Jobs_List_List_Auto_Ml_Job.json} | 0 ...b.json => Jobs_List_List_Command_Job.json} | 0 ....json => Jobs_List_List_Pipeline_Job.json} | 0 ...Job.json => Jobs_List_List_Sweep_Job.json} | 0 ..._Update_Kubernetes_Online_Deployment.json} | 0 ..._Or_Update_Managed_Online_Deployment.json} | 0 ...Get_Get_Kubernetes_Online_Deployment.json} | 0 ...ts_Get_Get_Managed_Online_Deployment.json} | 0 ...st_Kubernetes_Online_Deployment_Skus.json} | 0 ..._List_Managed_Online_Deployment_Skus.json} | 0 ..._Update_Kubernetes_Online_Deployment.json} | 0 ...ate_Update_Managed_Online_Deployment.json} | 0 .../tsp-output/main.tsp | 12 +- .../tsp-output/models.tsp | 18350 +++++++++------- .../tsp-output/routes.tsp | 1250 +- .../tsp-output/tspconfig.yaml | 1 + .../tsp-output/DataProduct.tsp | 59 +- .../tsp-output/DataProductsCatalog.tsp | 18 +- .../tsp-output/DataType.tsp | 43 +- ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...aProductsCatalogs_Get_MaximumSet_Gen.json} | 0 ...s_ListByResourceGroup_MaximumSet_Gen.json} | 0 ...s_ListByResourceGroup_MinimumSet_Gen.json} | 0 ...gs_ListBySubscription_MaximumSet_Gen.json} | 0 ...gs_ListBySubscription_MinimumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...aProducts_AddUserRole_MaximumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...> DataProducts_Create_MaximumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...> DataProducts_Delete_MaximumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...torageAccountSasToken_MaximumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...n => DataProducts_Get_MaximumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...s_ListByResourceGroup_MaximumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...ts_ListBySubscription_MaximumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ..._ListRolesAssignments_MaximumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...oducts_RemoveUserRole_MaximumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...ataProducts_RotateKey_MaximumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...> DataProducts_Update_MaximumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...n => DataTypes_Create_MaximumSet_Gen.json} | 0 ... DataTypes_DeleteData_MaximumSet_Gen.json} | 0 ... DataTypes_DeleteData_MinimumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...n => DataTypes_Delete_MaximumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...rageContainerSasToken_MaximumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...json => DataTypes_Get_MaximumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...pes_ListByDataProduct_MaximumSet_Gen.json} | 0 ... by [MinimumSet] rule_MinimumSet_Gen.json} | 0 ...n => DataTypes_Update_MaximumSet_Gen.json} | 0 .../arm-networkanalytics/tsp-output/main.tsp | 12 +- .../tsp-output/models.tsp | 657 +- .../tsp-output/tspconfig.yaml | 1 + .../tsp-output/Account.tsp | 37 +- .../tsp-output/Quota.tsp | 18 +- .../arm-playwrighttesting/tsp-output/main.tsp | 12 +- .../tsp-output/models.tsp | 207 +- .../tsp-output/tspconfig.yaml | 1 + .../tsp-output/Association.tsp | 31 +- .../tsp-output/Frontend.tsp | 31 +- .../tsp-output/TrafficController.tsp | 35 +- .../arm-servicenetworking/tsp-output/main.tsp | 12 +- .../tsp-output/models.tsp | 152 +- .../tsp-output/tspconfig.yaml | 1 + .../test/arm-sphere/tsp-output/Catalog.tsp | 133 +- .../arm-sphere/tsp-output/Certificate.tsp | 54 +- .../test/arm-sphere/tsp-output/Deployment.tsp | 44 +- .../test/arm-sphere/tsp-output/Device.tsp | 49 +- .../arm-sphere/tsp-output/DeviceGroup.tsp | 69 +- .../test/arm-sphere/tsp-output/Image.tsp | 44 +- .../test/arm-sphere/tsp-output/Product.tsp | 41 +- .../test/arm-sphere/tsp-output/main.tsp | 12 +- .../test/arm-sphere/tsp-output/models.tsp | 714 +- .../test/arm-sphere/tsp-output/tspconfig.yaml | 1 + .../arm-storage/tsp-output/BlobContainer.tsp | 110 +- .../tsp-output/BlobInventoryPolicy.tsp | 34 +- .../tsp-output/BlobServiceProperties.tsp | 28 +- .../arm-storage/tsp-output/DeletedAccount.tsp | 16 +- .../tsp-output/EncryptionScope.tsp | 62 +- .../tsp-output/FileServiceProperties.tsp | 28 +- .../test/arm-storage/tsp-output/FileShare.tsp | 104 +- .../tsp-output/ImmutabilityPolicy.tsp | 67 +- .../test/arm-storage/tsp-output/LocalUser.tsp | 46 +- .../tsp-output/ManagementPolicy.tsp | 28 +- .../tsp-output/ObjectReplicationPolicy.tsp | 38 +- .../tsp-output/PrivateEndpointConnection.tsp | 38 +- .../tsp-output/QueueServiceProperties.tsp | 28 +- .../arm-storage/tsp-output/StorageAccount.tsp | 189 +- .../arm-storage/tsp-output/StorageQueue.tsp | 50 +- .../test/arm-storage/tsp-output/Table.tsp | 46 +- .../tsp-output/TableServiceProperties.tsp | 28 +- ...Create_Or_Update_Immutability_Policy.json} | 0 ...th_Allow_Protected_Append_Writes_All.json} | 0 ...tainer_With_Default_Encryption_Scope.json} | 0 ...Put_Container_With_Object_Level_Worm.json} | 0 ...BlobContainers_Create_Put_Containers.json} | 0 ...th_Allow_Protected_Append_Writes_All.json} | 0 ...=> BlobContainers_Get_Get_Containers.json} | 0 ...Lease_Acquire_A_Lease_On_A_Container.json} | 0 ...s_Lease_Break_A_Lease_On_A_Container.json} | 0 ... BlobContainers_List_List_Containers.json} | 0 ...tainers_List_List_Deleted_Containers.json} | 0 ...tLegalHold_Set_Legal_Hold_Containers.json} | 0 ...th_Allow_Protected_Append_Writes_All.json} | 0 ...ge_Account_Set_Blob_Inventory_Policy.json} | 0 ...elete_And_New_Schema_For_Hns_Account.json} | 0 ...e_And_New_Schema_For_Non_Hns_Account.json} | 0 ..._Services_Put_Allow_Permanent_Delete.json} | 0 ..._Put_Last_Access_Time_Based_Tracking.json} | 0 ...tServiceProperties_Put_Blob_Services.json} | 0 ...Storage_Account_Put_Encryption_Scope.json} | 0 ...Scope_With_Infrastructure_Encryption.json} | 0 ...tServiceProperties_Put_File_Services.json} | 0 ..._Services_Enable_Secure_Smb_Features.json} | 0 ...ile_Services_Enable_Smb_Multichannel.json} | 0 ... FileShares_Create_Create_Nfs_Shares.json} | 0 ...json => FileShares_Create_Put_Shares.json} | 0 ...s_Create_Put_Shares_With_Access_Tier.json} | 0 ...on => FileShares_Get_Get_Share_Stats.json} | 0 ...es.json => FileShares_Get_Get_Shares.json} | 0 ...res_Lease_Acquire_A_Lease_On_A_Share.json} | 0 ...hares_Lease_Break_A_Lease_On_A_Share.json} | 0 ... FileShares_List_List_Deleted_Shares.json} | 0 ...FileShares_List_List_Share_Snapshots.json} | 0 ....json => FileShares_List_List_Shares.json} | 0 ... FileShares_Update_Update_Share_Acls.json} | 0 ...n => FileShares_Update_Update_Shares.json} | 0 ...ers_CreateOrUpdate_Create_Local_User.json} | 0 ...ers_CreateOrUpdate_Update_Local_User.json} | 0 ...rage_Account_Set_Management_Policies.json} | 0 ...ase_Blob_Days_After_Creation_Actions.json} | 0 ..._Management_Policy_Cold_Tier_Actions.json} | 0 ...nt_Policy_For_Block_And_Append_Blobs.json} | 0 ...t_Management_Policy_Hot_Tier_Actions.json} | 0 ..._Last_Access_Time_Based_Blob_Actions.json} | 0 ...Policy_Last_Tier_Change_Time_Actions.json} | 0 ...ent_Policy_With_Snapshot_And_Version.json} | 0 ...ct_Replication_Policy_On_Destination.json} | 0 ..._Object_Replication_Policy_On_Source.json} | 0 ...ct_Replication_Policy_On_Destination.json} | 0 ..._Object_Replication_Policy_On_Source.json} | 0 ... => Queue_Create_Queue_Operation_Put.json} | 0 ...te_Queue_Operation_Put_With_Metadata.json} | 0 ...ccounts_Create_Nfs_V3_Account_Create.json} | 0 ...counts_Create_Storage_Account_Create.json} | 0 ...unt_Create_Allowed_Copy_Scope_To_Aad.json} | 0 ...e_Allowed_Copy_Scope_To_Private_Link.json} | 0 ...reate_Disallow_Public_Network_Access.json} | 0 ..._Dns_Endpoint_Type_To_Azure_Dns_Zone.json} | 0 ...Create_Dns_Endpoint_Type_To_Standard.json} | 0 ..._Create_Enable_Public_Network_Access.json} | 0 ...nt_Create_Premium_Block_Blob_Storage.json} | 0 ...ssigned_Encryption_Identity_With_Cmk.json} | 0 ...ty_With_Federated_Identity_Client_Id.json} | 0 ...ount_Create_With_Immutability_Policy.json} | 0 ...ts_Failover_Storage_Account_Failover.json} | 0 ...ver_Storage_Account_Failover_Planned.json} | 0 ...ount_Get_Async_Sku_Conversion_Status.json} | 0 ...rties_Storage_Account_Get_Properties.json} | 0 ...e_Account_Get_Properties_Cmk_Enabled.json} | 0 ...operties_Cmk_Version_Expiration_Time.json} | 0 ..._Storage_Account_Regenerate_Kerb_Key.json} | 0 ...teKey_Storage_Account_Regenerate_Key.json} | 0 ...nts_Update_Storage_Account_Enable_Ad.json} | 0 ...ts_Update_Storage_Account_Enable_Cmk.json} | 0 ...counts_Update_Storage_Account_Update.json} | 0 ...unt_Update_Allowed_Copy_Scope_To_Aad.json} | 0 ...Update_Disable_Public_Network_Access.json} | 0 ...ssigned_Encryption_Identity_With_Cmk.json} | 0 ...ty_With_Federated_Identity_Client_Id.json} | 0 ...ount_Update_With_Immutability_Policy.json} | 0 ... => Table_Create_Table_Operation_Put.json} | 0 ...te_Table_Operation_Put_Or_Patch_Acls.json} | 0 ...> Table_Update_Table_Operation_Patch.json} | 0 ...te_Table_Operation_Put_Or_Patch_Acls.json} | 0 .../test/arm-storage/tsp-output/main.tsp | 12 +- .../test/arm-storage/tsp-output/models.tsp | 2863 ++- .../test/arm-storage/tsp-output/routes.tsp | 24 +- .../arm-storage/tsp-output/tspconfig.yaml | 1 + .../test/arm-test/tsp-output/DictProperty.tsp | 18 +- .../test/arm-test/tsp-output/Employee.tsp | 37 +- .../test/arm-test/tsp-output/Enroll.tsp | 8 +- .../test/arm-test/tsp-output/main.tsp | 12 +- .../test/arm-test/tsp-output/models.tsp | 145 +- .../test/arm-test/tsp-output/tspconfig.yaml | 1 + .../test/batch/tsp-output/main.tsp | 12 +- .../test/batch/tsp-output/models.tsp | 7964 ++++--- .../test/batch/tsp-output/routes.tsp | 5368 +++-- .../test/bodyComplex/tsp-output/main.tsp | 12 +- .../test/bodyComplex/tsp-output/models.tsp | 46 +- .../test/bodyComplex/tsp-output/routes.tsp | 248 +- .../test/complexObject/tsp-output/main.tsp | 12 +- .../test/complexObject/tsp-output/models.tsp | 48 +- .../test/complexObject/tsp-output/routes.tsp | 50 +- .../confidentialLedger/tsp-output/main.tsp | 16 +- .../confidentialLedger/tsp-output/models.tsp | 232 +- .../confidentialLedger/tsp-output/routes.tsp | 142 +- .../test/keyvault/tsp-output/main.tsp | 16 +- .../test/keyvault/tsp-output/models.tsp | 2794 ++- .../test/keyvault/tsp-output/routes.tsp | 1938 +- .../test/loadTest/tsp-output/main.tsp | 16 +- .../test/loadTest/tsp-output/models.tsp | 1463 +- .../test/loadTest/tsp-output/routes.tsp | 542 +- .../test/nh/tsp-output/main.tsp | 16 +- .../test/nh/tsp-output/models.tsp | 97 +- .../test/nh/tsp-output/routes.tsp | 484 +- .../test/openAI/tsp-output/main.tsp | 12 +- .../test/openAI/tsp-output/models.tsp | 210 +- .../test/openAI/tsp-output/routes.tsp | 12 +- .../test/pagination/tsp-output/main.tsp | 12 +- .../test/pagination/tsp-output/models.tsp | 8 +- .../test/pagination/tsp-output/routes.tsp | 262 +- .../test/qna/tsp-output/main.tsp | 24 +- .../test/qna/tsp-output/models.tsp | 455 +- .../test/qna/tsp-output/routes.tsp | 24 +- .../test/qnaAuthoring/tsp-output/main.tsp | 24 +- .../test/qnaAuthoring/tsp-output/models.tsp | 521 +- .../test/qnaAuthoring/tsp-output/routes.tsp | 342 +- .../test/qnaRuntime/tsp-output/main.tsp | 4 +- .../test/qnaRuntime/tsp-output/models.tsp | 310 +- .../test/qnaRuntime/tsp-output/routes.tsp | 28 +- .../test/schemaRegistry/tsp-output/main.tsp | 16 +- .../test/schemaRegistry/tsp-output/models.tsp | 52 +- .../test/schemaRegistry/tsp-output/routes.tsp | 122 +- .../test/url/tsp-output/main.tsp | 4 +- .../test/url/tsp-output/routes.tsp | 732 +- .../test/webpubsub/tsp-output/main.tsp | 14 +- .../test/webpubsub/tsp-output/models.tsp | 77 +- .../test/webpubsub/tsp-output/routes.tsp | 634 +- 946 files changed, 56908 insertions(+), 28085 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/converter_feature_2024-01-16-10-39.json rename packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/{AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsAnActionGroupToAllAlertsInASubscription.json => AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Adds_An_Action_Group_To_All_Alerts_In_A_Subscription.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/{AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsTwoActionGroupsToAllSev0AndSev1AlertsInTwoResourceGroups.json => AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Adds_Two_Action_Groups_To_All_Sev0_And_Sev1_Alerts_In_Two_Resource_Groups.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/{AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAlertsOnASpecificVmDuringAOneOffMaintenanceWindow_1800_2000AtASpecificDatePacificStandardTime.json => AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Removes_All_Action_Groups_From_Alerts_On_A_Specific_Vm_During_A_One_Off_Maintenance_Window_1800_2000_At_A_Specific_Date_Pacific_Standard_Time.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/{AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsInASubscriptionComingFromASpecificAlertRule.json => AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Removes_All_Action_Groups_From_All_Alerts_In_A_Subscription_Coming_From_A_Specific_Alert_Rule.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/{AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsOnAnyVmInTwoResourceGroupsDuringARecurringMaintenanceWindow_2200_0400EverySatAndSunIndiaStandardTime.json => AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Removes_All_Action_Groups_From_All_Alerts_On_Any_Vm_In_Two_Resource_Groups_During_A_Recurring_Maintenance_Window_2200_0400_Every_Sat_And_Sun_India_Standard_Time.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/{AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsOutsideBusinessHoursMonFri_09_00_17_00EasternStandardTime.json => AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Removes_All_Action_Groups_Outside_Business_Hours_Mon_Fri_09_00_17_00_Eastern_Standard_Time.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsConsumption.json => ApiManagementServiceSkus_ListAvailableServiceSkus_Api_Management_List_Sk_Us_Consumption.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsDedicated.json => ApiManagementServiceSkus_ListAvailableServiceSkus_Api_Management_List_Sk_Us_Dedicated.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_Backup_ApiManagementBackupWithAccessKey.json => ApiManagementService_Backup_Api_Management_Backup_With_Access_Key.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_Backup_ApiManagementBackupWithSystemManagedIdentity.json => ApiManagementService_Backup_Api_Management_Backup_With_System_Managed_Identity.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_Backup_ApiManagementBackupWithUserAssignedManagedIdentity.json => ApiManagementService_Backup_Api_Management_Backup_With_User_Assigned_Managed_Identity.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustomHostname.json => ApiManagementService_CreateOrUpdate_Api_Management_Create_Multi_Region_Service_With_Custom_Hostname.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_CreateOrUpdate_ApiManagementCreateService.json => ApiManagementService_CreateOrUpdate_Api_Management_Create_Service.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceHavingMsi.json => ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_Having_Msi.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIp.json => ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_In_Vnet_With_Public_Ip.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInZones.json => ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_In_Zones.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKeyVault.json => ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_With_Custom_Hostname_Key_Vault.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificates.json => ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_With_System_Certificates.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdentity.json => ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_With_User_Assigned_Identity.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_CreateOrUpdate_ApiManagementUndelete.json => ApiManagementService_CreateOrUpdate_Api_Management_Undelete.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_Get_ApiManagementServiceGetMultiRegionInternalVnet.json => ApiManagementService_Get_Api_Management_Service_Get_Multi_Region_Internal_Vnet.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_Get_ApiManagementServiceGetService.json => ApiManagementService_Get_Api_Management_Service_Get_Service.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_Get_ApiManagementServiceGetServiceHavingMsi.json => ApiManagementService_Get_Api_Management_Service_Get_Service_Having_Msi.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_Update_ApiManagementUpdateServiceDisableTls10.json => ApiManagementService_Update_Api_Management_Update_Service_Disable_Tls10.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_Update_ApiManagementUpdateServicePublisherDetails.json => ApiManagementService_Update_Api_Management_Update_Service_Publisher_Details.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiManagementService_Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones.json => ApiManagementService_Update_Api_Management_Update_Service_To_New_Vnet_And_Availability_Zones.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiOperation_Get_ApiManagementGetApiOperation.json => ApiOperation_Get_Api_Management_Get_Api_Operation.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{ApiOperation_Get_ApiManagementGetApiOperationPetStore.json => ApiOperation_Get_Api_Management_Get_Api_Operation_Pet_Store.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Api_CreateOrUpdate_ApiManagementCreateApi.json => Api_CreateOrUpdate_Api_Management_Create_Api.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Api_CreateOrUpdate_ApiManagementCreateApiClone.json => Api_CreateOrUpdate_Api_Management_Create_Api_Clone.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Api_CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingApi.json => Api_CreateOrUpdate_Api_Management_Create_Api_New_Version_Using_Existing_Api.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Api_CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi.json => Api_CreateOrUpdate_Api_Management_Create_Api_Revision_From_Existing_Api.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Api_CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServiceUrl.json => Api_CreateOrUpdate_Api_Management_Create_Api_Using_Import_Override_Service_Url.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Api_CreateOrUpdate_ApiManagementCreateApiUsingOai3Import.json => Api_CreateOrUpdate_Api_Management_Create_Api_Using_Oai3_Import.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Api_CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport.json => Api_CreateOrUpdate_Api_Management_Create_Api_Using_Swagger_Import.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Api_CreateOrUpdate_ApiManagementCreateApiUsingWadlImport.json => Api_CreateOrUpdate_Api_Management_Create_Api_Using_Wadl_Import.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Api_CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect.json => Api_CreateOrUpdate_Api_Management_Create_Api_With_Open_Id_Connect.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Api_CreateOrUpdate_ApiManagementCreateGraphQlApi.json => Api_CreateOrUpdate_Api_Management_Create_Graph_Ql_Api.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Api_CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json => Api_CreateOrUpdate_Api_Management_Create_Soap_Pass_Through_Api_Using_Wsdl_Import.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Api_CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport.json => Api_CreateOrUpdate_Api_Management_Create_Soap_To_Rest_Api_Using_Wsdl_Import.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Api_CreateOrUpdate_ApiManagementCreateWebSocketApi.json => Api_CreateOrUpdate_Api_Management_Create_Web_Socket_Api.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Api_Get_ApiManagementGetApiContract.json => Api_Get_Api_Management_Get_Api_Contract.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Api_Get_ApiManagementGetApiRevisionContract.json => Api_Get_Api_Management_Get_Api_Revision_Contract.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Backend_CreateOrUpdate_ApiManagementCreateBackendProxyBackend.json => Backend_CreateOrUpdate_Api_Management_Create_Backend_Proxy_Backend.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Backend_CreateOrUpdate_ApiManagementCreateBackendServiceFabric.json => Backend_CreateOrUpdate_Api_Management_Create_Backend_Service_Fabric.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Certificate_CreateOrUpdate_ApiManagementCreateCertificate.json => Certificate_CreateOrUpdate_Api_Management_Create_Certificate.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Certificate_CreateOrUpdate_ApiManagementCreateCertificateWithKeyVault.json => Certificate_CreateOrUpdate_Api_Management_Create_Certificate_With_Key_Vault.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Certificate_Get_ApiManagementGetCertificate.json => Certificate_Get_Api_Management_Get_Certificate.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Certificate_Get_ApiManagementGetCertificateWithKeyVault.json => Certificate_Get_Api_Management_Get_Certificate_With_Key_Vault.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema1.json => GlobalSchema_CreateOrUpdate_Api_Management_Create_Schema1.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema2.json => GlobalSchema_CreateOrUpdate_Api_Management_Create_Schema2.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{GlobalSchema_Get_ApiManagementGetSchema1.json => GlobalSchema_Get_Api_Management_Get_Schema1.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{GlobalSchema_Get_ApiManagementGetSchema2.json => GlobalSchema_Get_Api_Management_Get_Schema2.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Group_CreateOrUpdate_ApiManagementCreateGroup.json => Group_CreateOrUpdate_Api_Management_Create_Group.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Group_CreateOrUpdate_ApiManagementCreateGroupExternal.json => Group_CreateOrUpdate_Api_Management_Create_Group_External.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Logger_CreateOrUpdate_ApiManagementCreateAiLogger.json => Logger_CreateOrUpdate_Api_Management_Create_Ai_Logger.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{Logger_CreateOrUpdate_ApiManagementCreateEhLogger.json => Logger_CreateOrUpdate_Api_Management_Create_Eh_Logger.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{NamedValue_CreateOrUpdate_ApiManagementCreateNamedValue.json => NamedValue_CreateOrUpdate_Api_Management_Create_Named_Value.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{NamedValue_CreateOrUpdate_ApiManagementCreateNamedValueWithKeyVault.json => NamedValue_CreateOrUpdate_Api_Management_Create_Named_Value_With_Key_Vault.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{NamedValue_Get_ApiManagementGetNamedValue.json => NamedValue_Get_Api_Management_Get_Named_Value.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{NamedValue_Get_ApiManagementGetNamedValueWithKeyVault.json => NamedValue_Get_Api_Management_Get_Named_Value_With_Key_Vault.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{PerformConnectivityCheckAsync_HttpConnectivityCheck.json => PerformConnectivityCheckAsync_Http_Connectivity_Check.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{PerformConnectivityCheckAsync_TcpConnectivityCheck.json => PerformConnectivityCheckAsync_Tcp_Connectivity_Check.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{TenantAccess_Get_ApiManagementGetTenantAccess.json => TenantAccess_Get_Api_Management_Get_Tenant_Access.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/{TenantAccess_Get_ApiManagementGetTenantGitAccess.json => TenantAccess_Get_Api_Management_Get_Tenant_Git_Access.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/{RoleAssignments_Create_CreateRoleAssignmentForResource.json => RoleAssignments_Create_Create_Role_Assignment_For_Resource.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/{RoleAssignments_Create_CreateRoleAssignmentForResourceGroup.json => RoleAssignments_Create_Create_Role_Assignment_For_Resource_Group.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/{RoleAssignments_Create_CreateRoleAssignmentForSubscription.json => RoleAssignments_Create_Create_Role_Assignment_For_Subscription.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/{RoleManagementPolicies_Update_PatchPartialRoleManagementPolicy.json => RoleManagementPolicies_Update_Patch_Partial_Role_Management_Policy.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/{RoleManagementPolicies_Update_PatchRoleManagementPolicy.json => RoleManagementPolicies_Update_Patch_Role_Management_Policy.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{AvailabilitySets_Delete_AvailabilitySetDeleteMaximumSetGen.json => AvailabilitySets_Delete_Availability_Set_Delete_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{AvailabilitySets_Delete_AvailabilitySetDeleteMinimumSetGen.json => AvailabilitySets_Delete_Availability_Set_Delete_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{AvailabilitySets_Get_AvailabilitySetGetMaximumSetGen.json => AvailabilitySets_Get_Availability_Set_Get_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{AvailabilitySets_Get_AvailabilitySetGetMinimumSetGen.json => AvailabilitySets_Get_Availability_Set_Get_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMaximumSetGen.json => AvailabilitySets_ListAvailableSizes_Availability_Set_List_Available_Sizes_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMinimumSetGen.json => AvailabilitySets_ListAvailableSizes_Availability_Set_List_Available_Sizes_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{AvailabilitySets_List_AvailabilitySetListMaximumSetGen.json => AvailabilitySets_List_Availability_Set_List_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{AvailabilitySets_List_AvailabilitySetListMinimumSetGen.json => AvailabilitySets_List_Availability_Set_List_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{AvailabilitySets_Update_AvailabilitySetUpdateMaximumSetGen.json => AvailabilitySets_Update_Availability_Set_Update_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{AvailabilitySets_Update_AvailabilitySetUpdateMinimumSetGen.json => AvailabilitySets_Update_Availability_Set_Update_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMaximumSetGen.json => CapacityReservationGroups_Delete_Capacity_Reservation_Group_Delete_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMinimumSetGen.json => CapacityReservationGroups_Delete_Capacity_Reservation_Group_Delete_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{CapacityReservationGroups_Update_CapacityReservationGroupUpdateMaximumSetGen.json => CapacityReservationGroups_Update_Capacity_Reservation_Group_Update_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{CapacityReservationGroups_Update_CapacityReservationGroupUpdateMinimumSetGen.json => CapacityReservationGroups_Update_Capacity_Reservation_Group_Update_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{CapacityReservations_Delete_CapacityReservationDeleteMaximumSetGen.json => CapacityReservations_Delete_Capacity_Reservation_Delete_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{CapacityReservations_Delete_CapacityReservationDeleteMinimumSetGen.json => CapacityReservations_Delete_Capacity_Reservation_Delete_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{CapacityReservations_Update_CapacityReservationUpdateMaximumSetGen.json => CapacityReservations_Update_Capacity_Reservation_Update_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{CapacityReservations_Update_CapacityReservationUpdateMinimumSetGen.json => CapacityReservations_Update_Capacity_Reservation_Update_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRoles.json => CloudServices_CreateOrUpdate_Create_New_Cloud_Service_With_Multiple_Roles.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRolesInASpecificAvailabilityZone.json => CloudServices_CreateOrUpdate_Create_New_Cloud_Service_With_Multiple_Roles_In_A_Specific_Availability_Zone.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRole.json => CloudServices_CreateOrUpdate_Create_New_Cloud_Service_With_Single_Role.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndCertificateFromKeyVault.json => CloudServices_CreateOrUpdate_Create_New_Cloud_Service_With_Single_Role_And_Certificate_From_Key_Vault.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndRdpExtension.json => CloudServices_CreateOrUpdate_Create_New_Cloud_Service_With_Single_Role_And_Rdp_Extension.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroup.json => DedicatedHostGroups_CreateOrUpdate_Create_Or_Update_A_Dedicated_Host_Group.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroupWithUltraSsdSupport.json => DedicatedHostGroups_CreateOrUpdate_Create_Or_Update_A_Dedicated_Host_Group_With_Ultra_Ssd_Support.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMaximumSetGen.json => DedicatedHostGroups_Delete_Dedicated_Host_Group_Delete_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMinimumSetGen.json => DedicatedHostGroups_Delete_Dedicated_Host_Group_Delete_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHostGroups_Get_CreateADedicatedHostGroup.json => DedicatedHostGroups_Get_Create_A_Dedicated_Host_Group.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHostGroups_Get_CreateAnUltraSsdEnabledDedicatedHostGroup.json => DedicatedHostGroups_Get_Create_An_Ultra_Ssd_Enabled_Dedicated_Host_Group.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMaximumSetGen.json => DedicatedHostGroups_ListByResourceGroup_Dedicated_Host_Group_List_By_Resource_Group_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMinimumSetGen.json => DedicatedHostGroups_ListByResourceGroup_Dedicated_Host_Group_List_By_Resource_Group_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMaximumSetGen.json => DedicatedHostGroups_ListBySubscription_Dedicated_Host_Group_List_By_Subscription_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMinimumSetGen.json => DedicatedHostGroups_ListBySubscription_Dedicated_Host_Group_List_By_Subscription_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHostGroups_Update_DedicatedHostGroupUpdateMaximumSetGen.json => DedicatedHostGroups_Update_Dedicated_Host_Group_Update_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHostGroups_Update_DedicatedHostGroupUpdateMinimumSetGen.json => DedicatedHostGroups_Update_Dedicated_Host_Group_Update_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHosts_Delete_DedicatedHostDeleteMaximumSetGen.json => DedicatedHosts_Delete_Dedicated_Host_Delete_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHosts_Delete_DedicatedHostDeleteMinimumSetGen.json => DedicatedHosts_Delete_Dedicated_Host_Delete_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMaximumSetGen.json => DedicatedHosts_ListByHostGroup_Dedicated_Host_List_By_Host_Group_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMinimumSetGen.json => DedicatedHosts_ListByHostGroup_Dedicated_Host_List_By_Host_Group_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHosts_Update_DedicatedHostUpdateMaximumSetGen.json => DedicatedHosts_Update_Dedicated_Host_Update_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHosts_Update_DedicatedHostUpdateMinimumSetGen.json => DedicatedHosts_Update_Dedicated_Host_Update_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DedicatedHosts_Update_DedicatedHostUpdateResize.json => DedicatedHosts_Update_Dedicated_Host_Update_Resize.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DiskAccesses_Get_GetInformationAboutADiskAccessResource.json => DiskAccesses_Get_Get_Information_About_A_Disk_Access_Resource.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DiskAccesses_Get_GetInformationAboutADiskAccessResourceWithPrivateEndpoints.json => DiskAccesses_Get_Get_Information_About_A_Disk_Access_Resource_With_Private_Endpoints.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSet.json => DiskEncryptionSets_CreateOrUpdate_Create_A_Disk_Encryption_Set.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentSubscription.json => DiskEncryptionSets_CreateOrUpdate_Create_A_Disk_Encryption_Set_With_Key_Vault_From_A_Different_Subscription.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentTenant.json => DiskEncryptionSets_CreateOrUpdate_Create_A_Disk_Encryption_Set_With_Key_Vault_From_A_Different_Tenant.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSet.json => DiskEncryptionSets_Get_Get_Information_About_A_Disk_Encryption_Set.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSetWhenAutoKeyRotationFailed.json => DiskEncryptionSets_Get_Get_Information_About_A_Disk_Encryption_Set_When_Auto_Key_Rotation_Failed.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DiskEncryptionSets_Update_UpdateADiskEncryptionSet.json => DiskEncryptionSets_Update_Update_A_Disk_Encryption_Set.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueSucceeded.json => DiskEncryptionSets_Update_Update_A_Disk_Encryption_Set_With_Rotation_To_Latest_Key_Version_Enabled_Set_To_True_Succeeded.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueUpdating.json => DiskEncryptionSets_Update_Update_A_Disk_Encryption_Set_With_Rotation_To_Latest_Key_Version_Enabled_Set_To_True_Updating.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointResource.json => DiskRestorePoint_Get_Get_An_Incremental_Disk_Restore_Point_Resource.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointWhenSourceResourceIsFromADifferentRegion.json => DiskRestorePoint_Get_Get_An_Incremental_Disk_Restore_Point_When_Source_Resource_Is_From_A_Different_Region.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAConfidentialVmSupportedDiskEncryptedWithCustomerManagedKey.json => Disks_CreateOrUpdate_Create_A_Confidential_Vm_Supported_Disk_Encrypted_With_Customer_Managed_Key.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskAccessResource.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_And_Associate_With_Disk_Access_Resource.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskEncryptionSet.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_And_Associate_With_Disk_Encryption_Set.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskByCopyingASnapshot.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_By_Copying_A_Snapshot.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromADifferentSubscription.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_By_Importing_An_Unmanaged_Blob_From_A_Different_Subscription.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromTheSameSubscription.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_By_Importing_An_Unmanaged_Blob_From_The_Same_Subscription.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskFromAPlatformImage.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_From_A_Platform_Image.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryCommunityImage.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_From_An_Azure_Compute_Gallery_Community_Image.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryDirectSharedImage.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_From_An_Azure_Compute_Gallery_Direct_Shared_Image.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryImage.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_From_An_Azure_Compute_Gallery_Image.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskFromAnExistingManagedDiskInTheSameOrDifferentSubscription.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_From_An_Existing_Managed_Disk_In_The_Same_Or_Different_Subscription.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskFromElasticSanVolumeSnapshot.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_From_Elastic_San_Volume_Snapshot.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskFromImportSecureCreateOption.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_From_Import_Secure_Create_Option.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskFromUploadPreparedSecureCreateOption.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_From_Upload_Prepared_Secure_Create_Option.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskWithDataAccessAuthMode.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Data_Access_Auth_Mode.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskWithOptimizedForFrequentAttach.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Optimized_For_Frequent_Attach.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskWithPerformancePlus.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Performance_Plus.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskWithPremiumV2AccountType.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Premium_V2_Account_Type.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskWithSecurityProfile.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Security_Profile.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskWithSsdZrsAccountType.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Ssd_Zrs_Account_Type.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedDiskWithUltraAccountTypeWithReadOnlyPropertySet.json => Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Ultra_Account_Type_With_Read_Only_Property_Set.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAManagedUploadDisk.json => Disks_CreateOrUpdate_Create_A_Managed_Upload_Disk.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAnEmptyManagedDisk.json => Disks_CreateOrUpdate_Create_An_Empty_Managed_Disk.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAnEmptyManagedDiskInExtendedLocation.json => Disks_CreateOrUpdate_Create_An_Empty_Managed_Disk_In_Extended_Location.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_CreateOrUpdate_CreateAnUltraManagedDiskWithLogicalSectorSize_512E.json => Disks_CreateOrUpdate_Create_An_Ultra_Managed_Disk_With_Logical_Sector_Size_512_E.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_GrantAccess_GetASasOnAManagedDisk.json => Disks_GrantAccess_Get_A_Sas_On_A_Managed_Disk.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_GrantAccess_GetSasOnManagedDiskAndVmGuestState.json => Disks_GrantAccess_Get_Sas_On_Managed_Disk_And_Vm_Guest_State.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_Update_CreateOrUpdateABurstingEnabledManagedDisk.json => Disks_Update_Create_Or_Update_A_Bursting_Enabled_Managed_Disk.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_Update_UpdateAManagedDiskToAddAcceleratedNetworking.json => Disks_Update_Update_A_Managed_Disk_To_Add_Accelerated_Networking.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_Update_UpdateAManagedDiskToAddArchitecture.json => Disks_Update_Update_A_Managed_Disk_To_Add_Architecture.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_Update_UpdateAManagedDiskToAddPurchasePlan.json => Disks_Update_Update_A_Managed_Disk_To_Add_Purchase_Plan.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_Update_UpdateAManagedDiskToAddSupportsHibernation.json => Disks_Update_Update_A_Managed_Disk_To_Add_Supports_Hibernation.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_Update_UpdateAManagedDiskToChangeTier.json => Disks_Update_Update_A_Managed_Disk_To_Change_Tier.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_Update_UpdateAManagedDiskToDisableBursting.json => Disks_Update_Update_A_Managed_Disk_To_Disable_Bursting.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_Update_UpdateAManagedDiskToDisableOptimizedForFrequentAttach.json => Disks_Update_Update_A_Managed_Disk_To_Disable_Optimized_For_Frequent_Attach.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_Update_UpdateAManagedDiskWithDiskControllerTypes.json => Disks_Update_Update_A_Managed_Disk_With_Disk_Controller_Types.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Disks_Update_UpdateManagedDiskToRemoveDiskAccessResourceAssociation.json => Disks_Update_Update_Managed_Disk_To_Remove_Disk_Access_Resource_Association.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Galleries_CreateOrUpdate_CreateACommunityGallery.json => Galleries_CreateOrUpdate_Create_A_Community_Gallery.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Galleries_CreateOrUpdate_CreateOrUpdateASimpleGallery.json => Galleries_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSharingProfile.json => Galleries_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_With_Sharing_Profile.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSoftDeletionEnabled.json => Galleries_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_With_Soft_Deletion_Enabled.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Galleries_Get_GetACommunityGallery.json => Galleries_Get_Get_A_Community_Gallery.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Galleries_Get_GetAGallery.json => Galleries_Get_Get_A_Gallery.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Galleries_Get_GetAGalleryWithExpandSharingProfileGroups.json => Galleries_Get_Get_A_Gallery_With_Expand_Sharing_Profile_Groups.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Galleries_Get_GetAGalleryWithSelectPermissions.json => Galleries_Get_Get_A_Gallery_With_Select_Permissions.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryApplicationVersions_Get_GetAGalleryApplicationVersion.json => GalleryApplicationVersions_Get_Get_A_Gallery_Application_Version.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryApplicationVersions_Get_GetAGalleryApplicationVersionWithReplicationStatus.json => GalleryApplicationVersions_Get_Get_A_Gallery_Application_Version_With_Replication_Status.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource.json => GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Community_Gallery_Image_As_Source.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource.json => GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Managed_Image_As_Source.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapshotsAsASource.json => GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Mix_Of_Disks_And_Snapshots_As_A_Source.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMode.json => GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Shallow_Replication_Mode.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource.json => GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Shared_Image_As_Source.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource.json => GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Snapshots_As_A_Source.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVhdAsASource.json => GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Vhd_As_A_Source.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVmAsSource.json => GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Vm_As_Source.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified.json => GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_With_Target_Extended_Locations_Specified.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryImageVersions_Get_GetAGalleryImageVersion.json => GalleryImageVersions_Get_Get_A_Gallery_Image_Version.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryImageVersions_Get_GetAGalleryImageVersionWithReplicationStatus.json => GalleryImageVersions_Get_Get_A_Gallery_Image_Version_With_Replication_Status.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryImageVersions_Get_GetAGalleryImageVersionWithSnapshotsAsASource.json => GalleryImageVersions_Get_Get_A_Gallery_Image_Version_With_Snapshots_As_A_Source.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryImageVersions_Get_GetAGalleryImageVersionWithVhdAsASource.json => GalleryImageVersions_Get_Get_A_Gallery_Image_Version_With_Vhd_As_A_Source.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionManagedImageAsSource.json => GalleryImageVersions_Update_Update_A_Simple_Gallery_Image_Version_Managed_Image_As_Source.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionWithoutSourceId.json => GalleryImageVersions_Update_Update_A_Simple_Gallery_Image_Version_Without_Source_Id.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GallerySharingProfile_Update_AddSharingIdToTheSharingProfileOfAGallery.json => GallerySharingProfile_Update_Add_Sharing_Id_To_The_Sharing_Profile_Of_A_Gallery.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GallerySharingProfile_Update_ResetSharingProfileOfAGallery.json => GallerySharingProfile_Update_Reset_Sharing_Profile_Of_A_Gallery.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{GallerySharingProfile_Update_ShareAGalleryToCommunity.json => GallerySharingProfile_Update_Share_A_Gallery_To_Community.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlob.json => Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Blob.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlobWithDiskEncryptionSetResource.json => Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Blob_With_Disk_Encryption_Set_Resource.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDisk.json => Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Managed_Disk.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDiskWithDiskEncryptionSetResource.json => Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Managed_Disk_With_Disk_Encryption_Set_Resource.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshot.json => Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Snapshot.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshotWithDiskEncryptionSetResource.json => Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Snapshot_With_Disk_Encryption_Set_Resource.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Images_CreateOrUpdate_CreateAVirtualMachineImageFromAnExistingVirtualMachine.json => Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_An_Existing_Virtual_Machine.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromABlob.json => Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_That_Includes_A_Data_Disk_From_A_Blob.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromAManagedDisk.json => Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_That_Includes_A_Data_Disk_From_A_Managed_Disk.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromASnapshot.json => Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_That_Includes_A_Data_Disk_From_A_Snapshot.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Images_Delete_ImageDeleteMaximumSetGen.json => Images_Delete_Image_Delete_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Images_Delete_ImageDeleteMinimumSetGen.json => Images_Delete_Image_Delete_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollection.json => RestorePointCollections_CreateOrUpdate_Create_Or_Update_A_Restore_Point_Collection.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollectionForCrossRegionCopy.json => RestorePointCollections_CreateOrUpdate_Create_Or_Update_A_Restore_Point_Collection_For_Cross_Region_Copy.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{RestorePointCollections_Delete_RestorePointCollectionDeleteMaximumSetGen.json => RestorePointCollections_Delete_Restore_Point_Collection_Delete_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{RestorePointCollections_Delete_RestorePointCollectionDeleteMinimumSetGen.json => RestorePointCollections_Delete_Restore_Point_Collection_Delete_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{RestorePointCollections_Get_GetARestorePointCollectionButNotTheRestorePointsContainedInTheRestorePointCollection.json => RestorePointCollections_Get_Get_A_Restore_Point_Collection_But_Not_The_Restore_Points_Contained_In_The_Restore_Point_Collection.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{RestorePointCollections_Get_GetARestorePointCollectionIncludingTheRestorePointsContainedInTheRestorePointCollection.json => RestorePointCollections_Get_Get_A_Restore_Point_Collection_Including_The_Restore_Points_Contained_In_The_Restore_Point_Collection.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{RestorePointCollections_Update_RestorePointCollectionUpdateMaximumSetGen.json => RestorePointCollections_Update_Restore_Point_Collection_Update_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{RestorePointCollections_Update_RestorePointCollectionUpdateMinimumSetGen.json => RestorePointCollections_Update_Restore_Point_Collection_Update_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{RestorePoints_Create_CopyARestorePointToADifferentRegion.json => RestorePoints_Create_Copy_A_Restore_Point_To_A_Different_Region.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{RestorePoints_Create_CreateARestorePoint.json => RestorePoints_Create_Create_A_Restore_Point.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{RestorePoints_Delete_RestorePointDeleteMaximumSetGen.json => RestorePoints_Delete_Restore_Point_Delete_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{RestorePoints_Delete_RestorePointDeleteMinimumSetGen.json => RestorePoints_Delete_Restore_Point_Delete_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{RestorePoints_Get_GetARestorePoint.json => RestorePoints_Get_Get_A_Restore_Point.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{RestorePoints_Get_GetRestorePointWithInstanceView.json => RestorePoints_Get_Get_Restore_Point_With_Instance_View.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription.json => Snapshots_CreateOrUpdate_Create_A_Snapshot_By_Importing_An_Unmanaged_Blob_From_A_Different_Subscription.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromTheSameSubscription.json => Snapshots_CreateOrUpdate_Create_A_Snapshot_By_Importing_An_Unmanaged_Blob_From_The_Same_Subscription.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Snapshots_CreateOrUpdate_CreateASnapshotFromAnElasticSanVolumeSnapshot.json => Snapshots_CreateOrUpdate_Create_A_Snapshot_From_An_Elastic_San_Volume_Snapshot.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscription.json => Snapshots_CreateOrUpdate_Create_A_Snapshot_From_An_Existing_Snapshot_In_The_Same_Or_A_Different_Subscription.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegion.json => Snapshots_CreateOrUpdate_Create_A_Snapshot_From_An_Existing_Snapshot_In_The_Same_Or_A_Different_Subscription_In_A_Different_Region.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Snapshots_Get_GetInformationAboutASnapshot.json => Snapshots_Get_Get_Information_About_A_Snapshot.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Snapshots_Get_GetInformationAboutAnIncrementalSnapshot.json => Snapshots_Get_Get_Information_About_An_Incremental_Snapshot.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Snapshots_Update_UpdateASnapshot.json => Snapshots_Update_Update_A_Snapshot.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{Snapshots_Update_UpdateASnapshotWithAcceleratedNetworking.json => Snapshots_Update_Update_A_Snapshot_With_Accelerated_Networking.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{SshPublicKeys_Delete_SshPublicKeyDeleteMaximumSetGen.json => SshPublicKeys_Delete_Ssh_Public_Key_Delete_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{SshPublicKeys_Delete_SshPublicKeyDeleteMinimumSetGen.json => SshPublicKeys_Delete_Ssh_Public_Key_Delete_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMaximumSetGen.json => SshPublicKeys_ListByResourceGroup_Ssh_Public_Key_List_By_Resource_Group_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMinimumSetGen.json => SshPublicKeys_ListByResourceGroup_Ssh_Public_Key_List_By_Resource_Group_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMaximumSetGen.json => SshPublicKeys_ListBySubscription_Ssh_Public_Key_List_By_Subscription_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMinimumSetGen.json => SshPublicKeys_ListBySubscription_Ssh_Public_Key_List_By_Subscription_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{SshPublicKeys_Update_SshPublicKeyUpdateMaximumSetGen.json => SshPublicKeys_Update_Ssh_Public_Key_Update_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{SshPublicKeys_Update_SshPublicKeyUpdateMinimumSetGen.json => SshPublicKeys_Update_Ssh_Public_Key_Update_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMaximumSetGen.json => VirtualMachineExtensionImages_Get_Virtual_Machine_Extension_Image_Get_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMinimumSetGen.json => VirtualMachineExtensionImages_Get_Virtual_Machine_Extension_Image_Get_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMaximumSetGen.json => VirtualMachineExtensionImages_ListTypes_Virtual_Machine_Extension_Image_List_Types_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMinimumSetGen.json => VirtualMachineExtensionImages_ListTypes_Virtual_Machine_Extension_Image_List_Types_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMaximumSetGen.json => VirtualMachineExtensions_CreateOrUpdate_Virtual_Machine_Extension_Create_Or_Update_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMinimumSetGen.json => VirtualMachineExtensions_CreateOrUpdate_Virtual_Machine_Extension_Create_Or_Update_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMaximumSetGen.json => VirtualMachineExtensions_Delete_Virtual_Machine_Extension_Delete_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMinimumSetGen.json => VirtualMachineExtensions_Delete_Virtual_Machine_Extension_Delete_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineExtensions_Get_VirtualMachineExtensionGetMaximumSetGen.json => VirtualMachineExtensions_Get_Virtual_Machine_Extension_Get_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineExtensions_Get_VirtualMachineExtensionGetMinimumSetGen.json => VirtualMachineExtensions_Get_Virtual_Machine_Extension_Get_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineExtensions_List_VirtualMachineExtensionListMaximumSetGen.json => VirtualMachineExtensions_List_Virtual_Machine_Extension_List_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineExtensions_List_VirtualMachineExtensionListMinimumSetGen.json => VirtualMachineExtensions_List_Virtual_Machine_Extension_List_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMaximumSetGen.json => VirtualMachineScaleSetExtensions_CreateOrUpdate_Virtual_Machine_Scale_Set_Extension_Create_Or_Update_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMinimumSetGen.json => VirtualMachineScaleSetExtensions_CreateOrUpdate_Virtual_Machine_Scale_Set_Extension_Create_Or_Update_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMaximumSetGen.json => VirtualMachineScaleSetExtensions_Delete_Virtual_Machine_Scale_Set_Extension_Delete_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMinimumSetGen.json => VirtualMachineScaleSetExtensions_Delete_Virtual_Machine_Scale_Set_Extension_Delete_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMaximumSetGen.json => VirtualMachineScaleSetExtensions_Get_Virtual_Machine_Scale_Set_Extension_Get_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMinimumSetGen.json => VirtualMachineScaleSetExtensions_Get_Virtual_Machine_Scale_Set_Extension_Get_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMaximumSetGen.json => VirtualMachineScaleSetExtensions_List_Virtual_Machine_Scale_Set_Extension_List_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMinimumSetGen.json => VirtualMachineScaleSetExtensions_List_Virtual_Machine_Scale_Set_Extension_List_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMaximumSetGen.json => VirtualMachineScaleSetExtensions_Update_Virtual_Machine_Scale_Set_Extension_Update_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMinimumSetGen.json => VirtualMachineScaleSetExtensions_Update_Virtual_Machine_Scale_Set_Extension_Update_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMaximumSetGen.json => VirtualMachineScaleSetRollingUpgrades_Cancel_Virtual_Machine_Scale_Set_Rolling_Upgrade_Cancel_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMinimumSetGen.json => VirtualMachineScaleSetRollingUpgrades_Cancel_Virtual_Machine_Scale_Set_Rolling_Upgrade_Cancel_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMaximumSetGen.json => VirtualMachineScaleSetRollingUpgrades_GetLatest_Virtual_Machine_Scale_Set_Rolling_Upgrade_Get_Latest_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMinimumSetGen.json => VirtualMachineScaleSetRollingUpgrades_GetLatest_Virtual_Machine_Scale_Set_Rolling_Upgrade_Get_Latest_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMaximumSetGen.json => VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_Virtual_Machine_Scale_Set_Rolling_Upgrade_Start_Os_Upgrade_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMinimumSetGen.json => VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_Virtual_Machine_Scale_Set_Rolling_Upgrade_Start_Os_Upgrade_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMaximumSetGen.json => VirtualMachineScaleSetVMs_Deallocate_Virtual_Machine_Scale_Set_Vm_Deallocate_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMinimumSetGen.json => VirtualMachineScaleSetVMs_Deallocate_Virtual_Machine_Scale_Set_Vm_Deallocate_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithUserData.json => VirtualMachineScaleSetVMs_Get_Get_Vm_Scale_Set_Vm_With_User_Data.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithVmSizeProperties.json => VirtualMachineScaleSetVMs_Get_Get_Vm_Scale_Set_Vm_With_Vm_Size_Properties.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMaximumSetGen.json => VirtualMachineScaleSetVMs_List_Virtual_Machine_Scale_Set_Vm_List_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMinimumSetGen.json => VirtualMachineScaleSetVMs_List_Virtual_Machine_Scale_Set_Vm_List_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMaximumSetGen.json => VirtualMachineScaleSetVMs_PerformMaintenance_Virtual_Machine_Scale_Set_Vm_Perform_Maintenance_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMinimumSetGen.json => VirtualMachineScaleSetVMs_PerformMaintenance_Virtual_Machine_Scale_Set_Vm_Perform_Maintenance_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMaximumSetGen.json => VirtualMachineScaleSetVMs_PowerOff_Virtual_Machine_Scale_Set_Vm_Power_Off_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMinimumSetGen.json => VirtualMachineScaleSetVMs_PowerOff_Virtual_Machine_Scale_Set_Vm_Power_Off_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMaximumSetGen.json => VirtualMachineScaleSetVMs_Redeploy_Virtual_Machine_Scale_Set_Vm_Redeploy_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMinimumSetGen.json => VirtualMachineScaleSetVMs_Redeploy_Virtual_Machine_Scale_Set_Vm_Redeploy_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMaximumSetGen.json => VirtualMachineScaleSetVMs_ReimageAll_Virtual_Machine_Scale_Set_Vm_Reimage_All_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMinimumSetGen.json => VirtualMachineScaleSetVMs_ReimageAll_Virtual_Machine_Scale_Set_Vm_Reimage_All_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMaximumSetGen.json => VirtualMachineScaleSetVMs_Reimage_Virtual_Machine_Scale_Set_Vm_Reimage_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMinimumSetGen.json => VirtualMachineScaleSetVMs_Reimage_Virtual_Machine_Scale_Set_Vm_Reimage_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMaximumSetGen.json => VirtualMachineScaleSetVMs_Restart_Virtual_Machine_Scale_Set_Vm_Restart_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMinimumSetGen.json => VirtualMachineScaleSetVMs_Restart_Virtual_Machine_Scale_Set_Vm_Restart_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMaximumSetGen.json => VirtualMachineScaleSetVMs_Start_Virtual_Machine_Scale_Set_Vm_Start_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMinimumSetGen.json => VirtualMachineScaleSetVMs_Start_Virtual_Machine_Scale_Set_Vm_Start_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMaximumSetGen.json => VirtualMachineScaleSetVMs_Update_Virtual_Machine_Scale_Set_Vm_Update_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMinimumSetGen.json => VirtualMachineScaleSetVMs_Update_Virtual_Machine_Scale_Set_Vm_Update_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMaximumSetGen.json => VirtualMachineScaleSets_ConvertToSinglePlacementGroup_Virtual_Machine_Scale_Set_Convert_To_Single_Placement_Group_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMinimumSetGen.json => VirtualMachineScaleSets_ConvertToSinglePlacementGroup_Virtual_Machine_Scale_Set_Convert_To_Single_Placement_Group_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateACustomImageScaleSetFromAnUnmanagedGeneralizedOsImage.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Custom_Image_Scale_Set_From_An_Unmanaged_Generalized_Os_Image.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAPlatformImageScaleSetWithUnmanagedOsDisks.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Platform_Image_Scale_Set_With_Unmanaged_Os_Disks.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromACustomImage.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_From_A_Custom_Image.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromAGeneralizedSharedImage.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_From_A_Generalized_Shared_Image.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromASpecializedSharedImage.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_From_A_Specialized_Shared_Image.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWhereNicConfigHasDisableTcpStateTrackingProperty.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_Where_Nic_Config_Has_Disable_Tcp_State_Tracking_Property.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAMarketplaceImagePlan.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_A_Marketplace_Image_Plan.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureApplicationGateway.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_An_Azure_Application_Gateway.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureLoadBalancer.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_An_Azure_Load_Balancer.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithApplicationProfile.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Application_Profile.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAutomaticRepairsEnabled.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Automatic_Repairs_Enabled.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithBootDiagnostics.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Boot_Diagnostics.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskControllerType.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Disk_Controller_Type.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskEncryptionSetResourceInOsDiskAndDataDisk.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Disk_Encryption_Set_Resource_In_Os_Disk_And_Data_Disk.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEmptyDataDisksOnEachVm.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Empty_Data_Disks_On_Each_Vm.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisks.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Ephemeral_Os_Disks.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisksUsingPlacementProperty.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Ephemeral_Os_Disks_Using_Placement_Property.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithExtensionTimeBudget.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Extension_Time_Budget.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithFpgaNetworkInterfaces.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Fpga_Network_Interfaces.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithHostEncryptionUsingEncryptionAtHostProperty.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Host_Encryption_Using_Encryption_At_Host_Property.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithManagedBootDiagnostics.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Managed_Boot_Diagnostics.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithNetworkInterfacesWithPublicIpAddressDnsSettings.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Network_Interfaces_With_Public_Ip_Address_Dns_Settings.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithOsImageScheduledEventsEnabled.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Os_Image_Scheduled_Events_Enabled.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPasswordAuthentication.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Password_Authentication.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPremiumStorage.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Premium_Storage.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPriorityMixPolicy.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Priority_Mix_Policy.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithScaleInPolicy.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Scale_In_Policy.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityPostureReference.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Security_Posture_Reference.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityTypeAsConfidentialVm.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Security_Type_As_Confidential_Vm.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithServiceArtifactReference.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Service_Artifact_Reference.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSpotRestorePolicy.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Spot_Restore_Policy.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSshAuthentication.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Ssh_Authentication.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithTerminateScheduledEventsEnabled.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Terminate_Scheduled_Events_Enabled.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUefiSettingsOfSecureBootAndVTpm.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Uefi_Settings_Of_Secure_Boot_And_V_Tpm.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUserData.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_User_Data.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVirtualMachinesInDifferentZones.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Virtual_Machines_In_Different_Zones.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVmSizeProperties.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Vm_Size_Properties.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionThatHasSuppressFailuresEnabled.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Vmss_With_An_Extension_That_Has_Suppress_Failures_Enabled.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionWithProtectedSettingsFromKeyVault.json => VirtualMachineScaleSets_CreateOrUpdate_Create_A_Vmss_With_An_Extension_With_Protected_Settings_From_Key_Vault.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_CreateOrUpdate_CreateOrUpdateAScaleSetWithCapacityReservation.json => VirtualMachineScaleSets_CreateOrUpdate_Create_Or_Update_A_Scale_Set_With_Capacity_Reservation.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMaximumSetGen.json => VirtualMachineScaleSets_Deallocate_Virtual_Machine_Scale_Set_Deallocate_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMinimumSetGen.json => VirtualMachineScaleSets_Deallocate_Virtual_Machine_Scale_Set_Deallocate_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMaximumSetGen.json => VirtualMachineScaleSets_DeleteInstances_Virtual_Machine_Scale_Set_Delete_Instances_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMinimumSetGen.json => VirtualMachineScaleSets_DeleteInstances_Virtual_Machine_Scale_Set_Delete_Instances_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMaximumSetGen.json => VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_Virtual_Machine_Scale_Set_Force_Recovery_Service_Fabric_Platform_Update_Domain_Walk_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMinimumSetGen.json => VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_Virtual_Machine_Scale_Set_Force_Recovery_Service_Fabric_Platform_Update_Domain_Walk_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMaximumSetGen.json => VirtualMachineScaleSets_GetInstanceView_Virtual_Machine_Scale_Set_Get_Instance_View_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMinimumSetGen.json => VirtualMachineScaleSets_GetInstanceView_Virtual_Machine_Scale_Set_Get_Instance_View_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMaximumSetGen.json => VirtualMachineScaleSets_GetOSUpgradeHistory_Virtual_Machine_Scale_Set_Get_Os_Upgrade_History_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMinimumSetGen.json => VirtualMachineScaleSets_GetOSUpgradeHistory_Virtual_Machine_Scale_Set_Get_Os_Upgrade_History_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSet.json => VirtualMachineScaleSets_Get_Get_A_Virtual_Machine_Scale_Set.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetPlacedOnADedicatedHostGroupThroughAutomaticPlacement.json => VirtualMachineScaleSets_Get_Get_A_Virtual_Machine_Scale_Set_Placed_On_A_Dedicated_Host_Group_Through_Automatic_Placement.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetWithUserData.json => VirtualMachineScaleSets_Get_Get_A_Virtual_Machine_Scale_Set_With_User_Data.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Get_GetVmScaleSetVmWithDiskControllerType.json => VirtualMachineScaleSets_Get_Get_Vm_Scale_Set_Vm_With_Disk_Controller_Type.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMaximumSetGen.json => VirtualMachineScaleSets_ListAll_Virtual_Machine_Scale_Set_List_All_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMinimumSetGen.json => VirtualMachineScaleSets_ListAll_Virtual_Machine_Scale_Set_List_All_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMaximumSetGen.json => VirtualMachineScaleSets_ListSkus_Virtual_Machine_Scale_Set_List_Skus_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMinimumSetGen.json => VirtualMachineScaleSets_ListSkus_Virtual_Machine_Scale_Set_List_Skus_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_List_VirtualMachineScaleSetListMaximumSetGen.json => VirtualMachineScaleSets_List_Virtual_Machine_Scale_Set_List_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_List_VirtualMachineScaleSetListMinimumSetGen.json => VirtualMachineScaleSets_List_Virtual_Machine_Scale_Set_List_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMaximumSetGen.json => VirtualMachineScaleSets_PerformMaintenance_Virtual_Machine_Scale_Set_Perform_Maintenance_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMinimumSetGen.json => VirtualMachineScaleSets_PerformMaintenance_Virtual_Machine_Scale_Set_Perform_Maintenance_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMaximumSetGen.json => VirtualMachineScaleSets_PowerOff_Virtual_Machine_Scale_Set_Power_Off_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMinimumSetGen.json => VirtualMachineScaleSets_PowerOff_Virtual_Machine_Scale_Set_Power_Off_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMaximumSetGen.json => VirtualMachineScaleSets_Reapply_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMinimumSetGen.json => VirtualMachineScaleSets_Reapply_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMaximumSetGen.json => VirtualMachineScaleSets_Redeploy_Virtual_Machine_Scale_Set_Redeploy_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMinimumSetGen.json => VirtualMachineScaleSets_Redeploy_Virtual_Machine_Scale_Set_Redeploy_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMaximumSetGen.json => VirtualMachineScaleSets_ReimageAll_Virtual_Machine_Scale_Set_Reimage_All_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMinimumSetGen.json => VirtualMachineScaleSets_ReimageAll_Virtual_Machine_Scale_Set_Reimage_All_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMaximumSetGen.json => VirtualMachineScaleSets_Reimage_Virtual_Machine_Scale_Set_Reimage_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMinimumSetGen.json => VirtualMachineScaleSets_Reimage_Virtual_Machine_Scale_Set_Reimage_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMaximumSetGen.json => VirtualMachineScaleSets_Restart_Virtual_Machine_Scale_Set_Restart_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMinimumSetGen.json => VirtualMachineScaleSets_Restart_Virtual_Machine_Scale_Set_Restart_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMaximumSetGen.json => VirtualMachineScaleSets_SetOrchestrationServiceState_Virtual_Machine_Scale_Set_Set_Orchestration_Service_State_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMinimumSetGen.json => VirtualMachineScaleSets_SetOrchestrationServiceState_Virtual_Machine_Scale_Set_Set_Orchestration_Service_State_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMaximumSetGen.json => VirtualMachineScaleSets_Start_Virtual_Machine_Scale_Set_Start_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMinimumSetGen.json => VirtualMachineScaleSets_Start_Virtual_Machine_Scale_Set_Start_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMaximumSetGen.json => VirtualMachineScaleSets_UpdateInstances_Virtual_Machine_Scale_Set_Update_Instances_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMinimumSetGen.json => VirtualMachineScaleSets_UpdateInstances_Virtual_Machine_Scale_Set_Update_Instances_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMaximumSetGen.json => VirtualMachineScaleSets_Update_Virtual_Machine_Scale_Set_Update_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMinimumSetGen.json => VirtualMachineScaleSets_Update_Virtual_Machine_Scale_Set_Update_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Capture_VirtualMachineCaptureMaximumSetGen.json => VirtualMachines_Capture_Virtual_Machine_Capture_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Capture_VirtualMachineCaptureMinimumSetGen.json => VirtualMachines_Capture_Virtual_Machine_Capture_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMaximumSetGen.json => VirtualMachines_ConvertToManagedDisks_Virtual_Machine_Convert_To_Managed_Disks_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMinimumSetGen.json => VirtualMachines_ConvertToManagedDisks_Virtual_Machine_Convert_To_Managed_Disks_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateACustomImageVmFromAnUnmanagedGeneralizedOsImage.json => VirtualMachines_CreateOrUpdate_Create_A_Custom_Image_Vm_From_An_Unmanaged_Generalized_Os_Image.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingAssessmentModeOfImageDefault.json => VirtualMachines_CreateOrUpdate_Create_A_Linux_Vm_With_A_Patch_Setting_Assessment_Mode_Of_Image_Default.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json => VirtualMachines_CreateOrUpdate_Create_A_Linux_Vm_With_A_Patch_Setting_Patch_Mode_Of_Automatic_By_Platform_And_Automatic_By_Platform_Settings.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfImageDefault.json => VirtualMachines_CreateOrUpdate_Create_A_Linux_Vm_With_A_Patch_Setting_Patch_Mode_Of_Image_Default.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json => VirtualMachines_CreateOrUpdate_Create_A_Linux_Vm_With_A_Patch_Settings_Patch_Mode_And_Assessment_Mode_Set_To_Automatic_By_Platform.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAPlatformImageVmWithUnmanagedOsAndDataDisks.json => VirtualMachines_CreateOrUpdate_Create_A_Platform_Image_Vm_With_Unmanaged_Os_And_Data_Disks.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmFromACommunityGalleryImage.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_From_A_Community_Gallery_Image.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmFromACustomImage.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_From_A_Custom_Image.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmFromAGeneralizedSharedImage.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_From_A_Generalized_Shared_Image.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmFromASharedGalleryImage.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_From_A_Shared_Gallery_Image.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmFromASpecializedSharedImage.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_From_A_Specialized_Shared_Image.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmInAVirtualMachineScaleSetWithCustomerAssignedPlatformFaultDomain.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_In_A_Virtual_Machine_Scale_Set_With_Customer_Assigned_Platform_Fault_Domain.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmInAnAvailabilitySet.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_In_An_Availability_Set.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithAMarketplaceImagePlan.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_A_Marketplace_Image_Plan.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithAnExtensionsTimeBudget.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_An_Extensions_Time_Budget.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithApplicationProfile.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Application_Profile.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithBootDiagnostics.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Boot_Diagnostics.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithDiskControllerType.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Disk_Controller_Type.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithDiskEncryptionSetResourceIdInTheOsDiskAndDataDisk.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Disk_Encryption_Set_Resource_Id_In_The_Os_Disk_And_Data_Disk.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithEmptyDataDisks.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Empty_Data_Disks.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDisk.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Ephemeral_Os_Disk.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInCacheDiskUsingPlacementProperty.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Ephemeral_Os_Disk_Provisioning_In_Cache_Disk_Using_Placement_Property.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInResourceDiskUsingPlacementProperty.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Ephemeral_Os_Disk_Provisioning_In_Resource_Disk_Using_Placement_Property.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithHibernationEnabled.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Hibernation_Enabled.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithHostEncryptionUsingEncryptionAtHostProperty.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Host_Encryption_Using_Encryption_At_Host_Property.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithManagedBootDiagnostics.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Managed_Boot_Diagnostics.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfiguration.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Network_Interface_Configuration.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfigurationWithPublicIpAddressDnsSettings.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Network_Interface_Configuration_With_Public_Ip_Address_Dns_Settings.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithPasswordAuthentication.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Password_Authentication.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithPremiumStorage.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Premium_Storage.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithScheduledEventsProfile.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Scheduled_Events_Profile.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithCustomerManagedKeys.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Security_Type_Confidential_Vm_With_Customer_Managed_Keys.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithPlatformManagedKeys.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Security_Type_Confidential_Vm_With_Platform_Managed_Keys.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithSshAuthentication.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Ssh_Authentication.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithUefiSettingsOfSecureBootAndVTpm.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Uefi_Settings_Of_Secure_Boot_And_V_Tpm.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithUserData.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_User_Data.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAVmWithVmSizeProperties.json => VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Vm_Size_Properties.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingAssessmentModeOfImageDefault.json => VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_A_Patch_Setting_Assessment_Mode_Of_Image_Default.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByOs.json => VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_A_Patch_Setting_Patch_Mode_Of_Automatic_By_Os.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json => VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_A_Patch_Setting_Patch_Mode_Of_Automatic_By_Platform_And_Automatic_By_Platform_Settings.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndEnableHotpatchingSetToTrue.json => VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_A_Patch_Setting_Patch_Mode_Of_Automatic_By_Platform_And_Enable_Hotpatching_Set_To_True.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfManual.json => VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_A_Patch_Setting_Patch_Mode_Of_Manual.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json => VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_Patch_Settings_Patch_Mode_And_Assessment_Mode_Set_To_Automatic_By_Platform.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_CreateOrUpdate_CreateOrUpdateAVmWithCapacityReservation.json => VirtualMachines_CreateOrUpdate_Create_Or_Update_A_Vm_With_Capacity_Reservation.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Deallocate_VirtualMachineDeallocateMaximumSetGen.json => VirtualMachines_Deallocate_Virtual_Machine_Deallocate_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Deallocate_VirtualMachineDeallocateMinimumSetGen.json => VirtualMachines_Deallocate_Virtual_Machine_Deallocate_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Get_GetAVirtualMachine.json => VirtualMachines_Get_Get_A_Virtual_Machine.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Get_GetAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json => VirtualMachines_Get_Get_A_Virtual_Machine_Placed_On_A_Dedicated_Host_Group_Through_Automatic_Placement.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Get_GetAVirtualMachineWithDiskControllerTypeProperties.json => VirtualMachines_Get_Get_A_Virtual_Machine_With_Disk_Controller_Type_Properties.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Get_GetAVirtualMachineWithVmSizeProperties.json => VirtualMachines_Get_Get_A_Virtual_Machine_With_Vm_Size_Properties.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_InstanceView_GetInstanceViewOfAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json => VirtualMachines_InstanceView_Get_Instance_View_Of_A_Virtual_Machine_Placed_On_A_Dedicated_Host_Group_Through_Automatic_Placement.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_InstanceView_GetVirtualMachineInstanceView.json => VirtualMachines_InstanceView_Get_Virtual_Machine_Instance_View.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_ListAll_VirtualMachineListAllMaximumSetGen.json => VirtualMachines_ListAll_Virtual_Machine_List_All_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_ListAll_VirtualMachineListAllMinimumSetGen.json => VirtualMachines_ListAll_Virtual_Machine_List_All_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_List_VirtualMachineListMaximumSetGen.json => VirtualMachines_List_Virtual_Machine_List_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_List_VirtualMachineListMinimumSetGen.json => VirtualMachines_List_Virtual_Machine_List_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMaximumSetGen.json => VirtualMachines_PerformMaintenance_Virtual_Machine_Perform_Maintenance_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMinimumSetGen.json => VirtualMachines_PerformMaintenance_Virtual_Machine_Perform_Maintenance_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_PowerOff_VirtualMachinePowerOffMaximumSetGen.json => VirtualMachines_PowerOff_Virtual_Machine_Power_Off_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_PowerOff_VirtualMachinePowerOffMinimumSetGen.json => VirtualMachines_PowerOff_Virtual_Machine_Power_Off_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Redeploy_VirtualMachineRedeployMaximumSetGen.json => VirtualMachines_Redeploy_Virtual_Machine_Redeploy_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Redeploy_VirtualMachineRedeployMinimumSetGen.json => VirtualMachines_Redeploy_Virtual_Machine_Redeploy_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Reimage_ReimageANonEphemeralVirtualMachine.json => VirtualMachines_Reimage_Reimage_A_Non_Ephemeral_Virtual_Machine.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Reimage_ReimageAVirtualMachine.json => VirtualMachines_Reimage_Reimage_A_Virtual_Machine.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Restart_VirtualMachineRestartMaximumSetGen.json => VirtualMachines_Restart_Virtual_Machine_Restart_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Restart_VirtualMachineRestartMinimumSetGen.json => VirtualMachines_Restart_Virtual_Machine_Restart_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Start_VirtualMachineStartMaximumSetGen.json => VirtualMachines_Start_Virtual_Machine_Start_Maximum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Start_VirtualMachineStartMinimumSetGen.json => VirtualMachines_Start_Virtual_Machine_Start_Minimum_Set_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Update_UpdateAVmByDetachingDataDisk.json => VirtualMachines_Update_Update_A_Vm_By_Detaching_Data_Disk.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/{VirtualMachines_Update_UpdateAVmByForceDetachingDataDisk.json => VirtualMachines_Update_Update_A_Vm_By_Force_Detaching_Data_Disk.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_CreateOrUpdate_CreateARecordset.json => RecordSets_CreateOrUpdate_Create_A_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_CreateOrUpdate_CreateARecordsetWithAliasTargetResource.json => RecordSets_CreateOrUpdate_Create_A_Recordset_With_Alias_Target_Resource.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_CreateOrUpdate_CreateAaaaRecordset.json => RecordSets_CreateOrUpdate_Create_Aaaa_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_CreateOrUpdate_CreateCaaRecordset.json => RecordSets_CreateOrUpdate_Create_Caa_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_CreateOrUpdate_CreateCnameRecordset.json => RecordSets_CreateOrUpdate_Create_Cname_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_CreateOrUpdate_CreateMxRecordset.json => RecordSets_CreateOrUpdate_Create_Mx_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_CreateOrUpdate_CreateNsRecordset.json => RecordSets_CreateOrUpdate_Create_Ns_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_CreateOrUpdate_CreatePtrRecordset.json => RecordSets_CreateOrUpdate_Create_Ptr_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_CreateOrUpdate_CreateSoaRecordset.json => RecordSets_CreateOrUpdate_Create_Soa_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_CreateOrUpdate_CreateSrvRecordset.json => RecordSets_CreateOrUpdate_Create_Srv_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_CreateOrUpdate_CreateTxtRecordset.json => RecordSets_CreateOrUpdate_Create_Txt_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Delete_DeleteARecordset.json => RecordSets_Delete_Delete_A_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Delete_DeleteAaaaRecordset.json => RecordSets_Delete_Delete_Aaaa_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Delete_DeleteCaaRecordset.json => RecordSets_Delete_Delete_Caa_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Delete_DeleteCnameRecordset.json => RecordSets_Delete_Delete_Cname_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Delete_DeleteMxRecordset.json => RecordSets_Delete_Delete_Mx_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Delete_DeleteNsRecordset.json => RecordSets_Delete_Delete_Ns_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Delete_DeletePtrRecordset.json => RecordSets_Delete_Delete_Ptr_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Delete_DeleteSrvRecordset.json => RecordSets_Delete_Delete_Srv_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Delete_DeleteTxtRecordset.json => RecordSets_Delete_Delete_Txt_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Get_GetARecordset.json => RecordSets_Get_Get_A_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Get_GetAaaaRecordset.json => RecordSets_Get_Get_Aaaa_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Get_GetCaaRecordset.json => RecordSets_Get_Get_Caa_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Get_GetCnameRecordset.json => RecordSets_Get_Get_Cname_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Get_GetMxRecordset.json => RecordSets_Get_Get_Mx_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Get_GetNsRecordset.json => RecordSets_Get_Get_Ns_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Get_GetPtrRecordset.json => RecordSets_Get_Get_Ptr_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Get_GetSoaRecordset.json => RecordSets_Get_Get_Soa_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Get_GetSrvRecordset.json => RecordSets_Get_Get_Srv_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Get_GetTxtRecordset.json => RecordSets_Get_Get_Txt_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_ListByType_ListARecordsets.json => RecordSets_ListByType_List_A_Recordsets.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_ListByType_ListAaaaRecordsets.json => RecordSets_ListByType_List_Aaaa_Recordsets.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_ListByType_ListCaaRecordsets.json => RecordSets_ListByType_List_Caa_Recordsets.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_ListByType_ListCnameRecordsets.json => RecordSets_ListByType_List_Cname_Recordsets.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_ListByType_ListMxRecordsets.json => RecordSets_ListByType_List_Mx_Recordsets.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_ListByType_ListNsRecordsets.json => RecordSets_ListByType_List_Ns_Recordsets.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_ListByType_ListPtrRecordsets.json => RecordSets_ListByType_List_Ptr_Recordsets.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_ListByType_ListSoaRecordsets.json => RecordSets_ListByType_List_Soa_Recordsets.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_ListByType_ListSrvRecordsets.json => RecordSets_ListByType_List_Srv_Recordsets.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_ListByType_ListTxtRecordsets.json => RecordSets_ListByType_List_Txt_Recordsets.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Update_PatchARecordset.json => RecordSets_Update_Patch_A_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Update_PatchAaaaRecordset.json => RecordSets_Update_Patch_Aaaa_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Update_PatchCaaRecordset.json => RecordSets_Update_Patch_Caa_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Update_PatchCnameRecordset.json => RecordSets_Update_Patch_Cname_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Update_PatchMxRecordset.json => RecordSets_Update_Patch_Mx_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Update_PatchNsRecordset.json => RecordSets_Update_Patch_Ns_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Update_PatchPtrRecordset.json => RecordSets_Update_Patch_Ptr_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Update_PatchSoaRecordset.json => RecordSets_Update_Patch_Soa_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Update_PatchSrvRecordset.json => RecordSets_Update_Patch_Srv_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/{RecordSets_Update_PatchTxtRecordset.json => RecordSets_Update_Patch_Txt_Recordset.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Compute_CreateOrUpdate_AttachAKubernetesCompute.json => Compute_CreateOrUpdate_Attach_A_Kubernetes_Compute.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Compute_CreateOrUpdate_CreateAAmlCompute.json => Compute_CreateOrUpdate_Create_A_Aml_Compute.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Compute_CreateOrUpdate_CreateADataFactoryCompute.json => Compute_CreateOrUpdate_Create_A_Data_Factory_Compute.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Compute_CreateOrUpdate_CreateAnAksCompute.json => Compute_CreateOrUpdate_Create_An_Aks_Compute.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Compute_CreateOrUpdate_CreateAnComputeInstanceCompute.json => Compute_CreateOrUpdate_Create_An_Compute_Instance_Compute.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithMinimalInputs.json => Compute_CreateOrUpdate_Create_An_Compute_Instance_Compute_With_Minimal_Inputs.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithSchedules.json => Compute_CreateOrUpdate_Create_An_Compute_Instance_Compute_With_Schedules.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Compute_CreateOrUpdate_UpdateAAmlCompute.json => Compute_CreateOrUpdate_Update_A_Aml_Compute.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Compute_CreateOrUpdate_UpdateAnAksCompute.json => Compute_CreateOrUpdate_Update_An_Aks_Compute.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Compute_Get_GetAAksCompute.json => Compute_Get_Get_A_Aks_Compute.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Compute_Get_GetAAmlCompute.json => Compute_Get_Get_A_Aml_Compute.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Compute_Get_GetAKubernetesCompute.json => Compute_Get_Get_A_Kubernetes_Compute.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Compute_Get_GetAnComputeInstance.json => Compute_Get_Get_An_Compute_Instance.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureBlobWAccountKey.json => Datastores_CreateOrUpdate_Create_Or_Update_Datastore_Azure_Blob_W_Account_Key.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal.json => Datastores_CreateOrUpdate_Create_Or_Update_Datastore_Azure_Data_Lake_Gen1_W_Service_Principal.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal.json => Datastores_CreateOrUpdate_Create_Or_Update_Datastore_Azure_Data_Lake_Gen2_W_Service_Principal.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKey.json => Datastores_CreateOrUpdate_Create_Or_Update_Datastore_Azure_File_Store_W_Account_Key.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Jobs_CreateOrUpdate_CreateOrUpdateAutoMlJob.json => Jobs_CreateOrUpdate_Create_Or_Update_Auto_Ml_Job.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Jobs_CreateOrUpdate_CreateOrUpdateCommandJob.json => Jobs_CreateOrUpdate_Create_Or_Update_Command_Job.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Jobs_CreateOrUpdate_CreateOrUpdatePipelineJob.json => Jobs_CreateOrUpdate_Create_Or_Update_Pipeline_Job.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Jobs_CreateOrUpdate_CreateOrUpdateSweepJob.json => Jobs_CreateOrUpdate_Create_Or_Update_Sweep_Job.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Jobs_Get_GetAutoMlJob.json => Jobs_Get_Get_Auto_Ml_Job.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Jobs_Get_GetCommandJob.json => Jobs_Get_Get_Command_Job.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Jobs_Get_GetPipelineJob.json => Jobs_Get_Get_Pipeline_Job.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Jobs_Get_GetSweepJob.json => Jobs_Get_Get_Sweep_Job.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Jobs_List_ListAutoMlJob.json => Jobs_List_List_Auto_Ml_Job.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Jobs_List_ListCommandJob.json => Jobs_List_List_Command_Job.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Jobs_List_ListPipelineJob.json => Jobs_List_List_Pipeline_Job.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{Jobs_List_ListSweepJob.json => Jobs_List_List_Sweep_Job.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{OnlineDeployments_CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment.json => OnlineDeployments_CreateOrUpdate_Create_Or_Update_Kubernetes_Online_Deployment.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{OnlineDeployments_CreateOrUpdate_CreateOrUpdateManagedOnlineDeployment.json => OnlineDeployments_CreateOrUpdate_Create_Or_Update_Managed_Online_Deployment.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{OnlineDeployments_Get_GetKubernetesOnlineDeployment.json => OnlineDeployments_Get_Get_Kubernetes_Online_Deployment.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{OnlineDeployments_Get_GetManagedOnlineDeployment.json => OnlineDeployments_Get_Get_Managed_Online_Deployment.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{OnlineDeployments_ListSkus_ListKubernetesOnlineDeploymentSkus.json => OnlineDeployments_ListSkus_List_Kubernetes_Online_Deployment_Skus.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{OnlineDeployments_ListSkus_ListManagedOnlineDeploymentSkus.json => OnlineDeployments_ListSkus_List_Managed_Online_Deployment_Skus.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{OnlineDeployments_Update_UpdateKubernetesOnlineDeployment.json => OnlineDeployments_Update_Update_Kubernetes_Online_Deployment.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/{OnlineDeployments_Update_UpdateManagedOnlineDeployment.json => OnlineDeployments_Update_Update_Managed_Online_Deployment.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGen.json => DataProductsCatalogs_Get_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMaximumSetGen.json => DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMinimumSetGen.json => DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMaximumSetGen.json => DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMinimumSetGen.json => DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGen.json => DataProducts_AddUserRole_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_Create_DataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_Create_DataProductsCreateMaximumSetGen.json => DataProducts_Create_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_Delete_DataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_Delete_DataProductsDeleteMaximumSetGen.json => DataProducts_Delete_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGen.json => DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_Get_DataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_Get_DataProductsGetMaximumSetGen.json => DataProducts_Get_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGen.json => DataProducts_ListByResourceGroup_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGen.json => DataProducts_ListBySubscription_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGen.json => DataProducts_ListRolesAssignments_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGen.json => DataProducts_RemoveUserRole_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGen.json => DataProducts_RotateKey_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_Update_DataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataProducts_Update_DataProductsUpdateMaximumSetGen.json => DataProducts_Update_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataTypes_Create_DataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataTypes_Create_DataTypesCreateMaximumSetGen.json => DataTypes_Create_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataTypes_DeleteData_DataTypesDeleteDataMaximumSetGen.json => DataTypes_DeleteData_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataTypes_DeleteData_DataTypesDeleteDataMinimumSetGen.json => DataTypes_DeleteData_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataTypes_Delete_DataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataTypes_Delete_DataTypesDeleteMaximumSetGen.json => DataTypes_Delete_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGen.json => DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataTypes_Get_DataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataTypes_Get_DataTypesGetMaximumSetGen.json => DataTypes_Get_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGen.json => DataTypes_ListByDataProduct_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataTypes_Update_DataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json => DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/{DataTypes_Update_DataTypesUpdateMaximumSetGen.json => DataTypes_Update_MaximumSet_Gen.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicy.json => BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll.json => BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy_With_Allow_Protected_Append_Writes_All.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobContainers_Create_PutContainerWithDefaultEncryptionScope.json => BlobContainers_Create_Put_Container_With_Default_Encryption_Scope.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobContainers_Create_PutContainerWithObjectLevelWorm.json => BlobContainers_Create_Put_Container_With_Object_Level_Worm.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobContainers_Create_PutContainers.json => BlobContainers_Create_Put_Containers.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobContainers_Get_GetBlobContainersGetWithAllowProtectedAppendWritesAll.json => BlobContainers_Get_Get_Blob_Containers_Get_With_Allow_Protected_Append_Writes_All.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobContainers_Get_GetContainers.json => BlobContainers_Get_Get_Containers.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobContainers_Lease_AcquireALeaseOnAContainer.json => BlobContainers_Lease_Acquire_A_Lease_On_A_Container.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobContainers_Lease_BreakALeaseOnAContainer.json => BlobContainers_Lease_Break_A_Lease_On_A_Container.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobContainers_List_ListContainers.json => BlobContainers_List_List_Containers.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobContainers_List_ListDeletedContainers.json => BlobContainers_List_List_Deleted_Containers.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobContainers_SetLegalHold_SetLegalHoldContainers.json => BlobContainers_SetLegalHold_Set_Legal_Hold_Containers.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobContainers_SetLegalHold_SetLegalHoldContainersWithAllowProtectedAppendWritesAll.json => BlobContainers_SetLegalHold_Set_Legal_Hold_Containers_With_Allow_Protected_Append_Writes_All.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicy.json => BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json => BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Hns_Account.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json => BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Non_Hns_Account.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobServices_SetServiceProperties_BlobServicesPutAllowPermanentDelete.json => BlobServices_SetServiceProperties_Blob_Services_Put_Allow_Permanent_Delete.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobServices_SetServiceProperties_BlobServicesPutLastAccessTimeBasedTracking.json => BlobServices_SetServiceProperties_Blob_Services_Put_Last_Access_Time_Based_Tracking.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{BlobServices_SetServiceProperties_PutBlobServices.json => BlobServices_SetServiceProperties_Put_Blob_Services.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{EncryptionScopes_Put_StorageAccountPutEncryptionScope.json => EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{EncryptionScopes_Put_StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json => EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope_With_Infrastructure_Encryption.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{FileServices_SetServiceProperties_PutFileServices.json => FileServices_SetServiceProperties_Put_File_Services.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{FileServices_SetServiceProperties_PutFileServicesEnableSecureSmbFeatures.json => FileServices_SetServiceProperties_Put_File_Services_Enable_Secure_Smb_Features.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{FileServices_SetServiceProperties_PutFileServicesEnableSmbMultichannel.json => FileServices_SetServiceProperties_Put_File_Services_Enable_Smb_Multichannel.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{FileShares_Create_CreateNfsShares.json => FileShares_Create_Create_Nfs_Shares.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{FileShares_Create_PutShares.json => FileShares_Create_Put_Shares.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{FileShares_Create_PutSharesWithAccessTier.json => FileShares_Create_Put_Shares_With_Access_Tier.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{FileShares_Get_GetShareStats.json => FileShares_Get_Get_Share_Stats.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{FileShares_Get_GetShares.json => FileShares_Get_Get_Shares.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{FileShares_Lease_AcquireALeaseOnAShare.json => FileShares_Lease_Acquire_A_Lease_On_A_Share.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{FileShares_Lease_BreakALeaseOnAShare.json => FileShares_Lease_Break_A_Lease_On_A_Share.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{FileShares_List_ListDeletedShares.json => FileShares_List_List_Deleted_Shares.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{FileShares_List_ListShareSnapshots.json => FileShares_List_List_Share_Snapshots.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{FileShares_List_ListShares.json => FileShares_List_List_Shares.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{FileShares_Update_UpdateShareAcls.json => FileShares_Update_Update_Share_Acls.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{FileShares_Update_UpdateShares.json => FileShares_Update_Update_Shares.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{LocalUsers_CreateOrUpdate_CreateLocalUser.json => LocalUsers_CreateOrUpdate_Create_Local_User.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{LocalUsers_CreateOrUpdate_UpdateLocalUser.json => LocalUsers_CreateOrUpdate_Update_Local_User.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicies.json => ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policies.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions.json => ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Base_Blob_Days_After_Creation_Actions.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyColdTierActions.json => ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Cold_Tier_Actions.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json => ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_For_Block_And_Append_Blobs.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyHotTierActions.json => ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Hot_Tier_Actions.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastAccessTimeBasedBlobActions.json => ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Access_Time_Based_Blob_Actions.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastTierChangeTimeActions.json => ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Tier_Change_Time_Actions.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyWithSnapshotAndVersion.json => ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_With_Snapshot_And_Version.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnDestination.json => ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Destination.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnSource.json => ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Source.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnDestination.json => ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Destination.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnSource.json => ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Source.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{Queue_Create_QueueOperationPut.json => Queue_Create_Queue_Operation_Put.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{Queue_Create_QueueOperationPutWithMetadata.json => Queue_Create_Queue_Operation_Put_With_Metadata.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Create_NfsV3AccountCreate.json => StorageAccounts_Create_Nfs_V3_Account_Create.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Create_StorageAccountCreate.json => StorageAccounts_Create_Storage_Account_Create.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToAad.json => StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Aad.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToPrivateLink.json => StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Private_Link.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Create_StorageAccountCreateDisallowPublicNetworkAccess.json => StorageAccounts_Create_Storage_Account_Create_Disallow_Public_Network_Access.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json => StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Azure_Dns_Zone.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToStandard.json => StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Standard.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Create_StorageAccountCreateEnablePublicNetworkAccess.json => StorageAccounts_Create_Storage_Account_Create_Enable_Public_Network_Access.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Create_StorageAccountCreatePremiumBlockBlobStorage.json => StorageAccounts_Create_Storage_Account_Create_Premium_Block_Blob_Storage.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Create_StorageAccountCreateUserAssignedEncryptionIdentityWithCmk.json => StorageAccounts_Create_Storage_Account_Create_User_Assigned_Encryption_Identity_With_Cmk.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Create_StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json => StorageAccounts_Create_Storage_Account_Create_User_Assigned_Identity_With_Federated_Identity_Client_Id.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Create_StorageAccountCreateWithImmutabilityPolicy.json => StorageAccounts_Create_Storage_Account_Create_With_Immutability_Policy.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Failover_StorageAccountFailover.json => StorageAccounts_Failover_Storage_Account_Failover.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Failover_StorageAccountFailoverPlanned.json => StorageAccounts_Failover_Storage_Account_Failover_Planned.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_GetProperties_StorageAccountGetAsyncSkuConversionStatus.json => StorageAccounts_GetProperties_Storage_Account_Get_Async_Sku_Conversion_Status.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_GetProperties_StorageAccountGetProperties.json => StorageAccounts_GetProperties_Storage_Account_Get_Properties.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkEnabled.json => StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Enabled.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkVersionExpirationTime.json => StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Version_Expiration_Time.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_RegenerateKey_StorageAccountRegenerateKerbKey.json => StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Kerb_Key.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_RegenerateKey_StorageAccountRegenerateKey.json => StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Key.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Update_StorageAccountEnableAd.json => StorageAccounts_Update_Storage_Account_Enable_Ad.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Update_StorageAccountEnableCmk.json => StorageAccounts_Update_Storage_Account_Enable_Cmk.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Update_StorageAccountUpdate.json => StorageAccounts_Update_Storage_Account_Update.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Update_StorageAccountUpdateAllowedCopyScopeToAad.json => StorageAccounts_Update_Storage_Account_Update_Allowed_Copy_Scope_To_Aad.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Update_StorageAccountUpdateDisablePublicNetworkAccess.json => StorageAccounts_Update_Storage_Account_Update_Disable_Public_Network_Access.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Update_StorageAccountUpdateUserAssignedEncryptionIdentityWithCmk.json => StorageAccounts_Update_Storage_Account_Update_User_Assigned_Encryption_Identity_With_Cmk.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Update_StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json => StorageAccounts_Update_Storage_Account_Update_User_Assigned_Identity_With_Federated_Identity_Client_Id.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{StorageAccounts_Update_StorageAccountUpdateWithImmutabilityPolicy.json => StorageAccounts_Update_Storage_Account_Update_With_Immutability_Policy.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{Table_Create_TableOperationPut.json => Table_Create_Table_Operation_Put.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{Table_Create_TableOperationPutOrPatchAcls.json => Table_Create_Table_Operation_Put_Or_Patch_Acls.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{Table_Update_TableOperationPatch.json => Table_Update_Table_Operation_Patch.json} (100%) rename packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/{Table_Update_TableOperationPutOrPatchAcls.json => Table_Update_Table_Operation_Put_Or_Patch_Acls.json} (100%) diff --git a/common/changes/@autorest/openapi-to-typespec/converter_feature_2024-01-16-10-39.json b/common/changes/@autorest/openapi-to-typespec/converter_feature_2024-01-16-10-39.json new file mode 100644 index 0000000000..469ff87dda --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/converter_feature_2024-01-16-10-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Add feature and fix bug for converter.", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts index 24e87a9343..d51f92e61a 100644 --- a/packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts @@ -28,6 +28,7 @@ export async function emitTypespecConfig(filePath: string): Promise { - '@azure-tools/typespec-autorest' options: '@azure-tools/typespec-autorest': + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/${swaggerName}" diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts index 41b23f3a11..065db8b558 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts @@ -39,6 +39,14 @@ export function generateArmResource(resource: TspArmResource): string { definitions.push(generateArmResourceOperation(resource)); + definitions.push("\n"); + + for (const o of resource.resourceOperations) { + for (const d of o.augmentedDecorators ?? []) { + definitions.push(`${d}`); + } + } + return definitions.join("\n"); } @@ -63,7 +71,8 @@ function generateArmResourceOperation(resource: TspArmResource): string { decorators && definitions.push(decorators); if ( operation.operationId && - operation.operationId !== getGeneratedOperationId(formalOperationGroupName, operation.name) + (operation.operationId !== getGeneratedOperationId(formalOperationGroupName, operation.name) || + operation.kind === "ArmResourceListByParent") ) { definitions.push(`@operationId("${operation.operationId}")`); definitions.push(`#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility"`); @@ -125,13 +134,16 @@ function generateExamples( ) { const count = _.keys(examples).length; for (const [title, example] of _.entries(examples)) { - if (!example.operationId) { - example.operationId = operationId; - example.title = title; - } + example.operationId = operationId; + example.title = title; let filename = operationId; if (count > 1) { - filename = `${filename}_${Case.pascal(title)}`; + if (title.startsWith(filename)) { + filename = title; + } else { + const suffix = Case.train(title).replaceAll("-", "_"); + filename = `${filename}_${suffix}`; + } } generatedExamples[filename] = JSON.stringify(example, null, 2); } diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts index f6c6a0f3c8..105ed2fb46 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts @@ -24,7 +24,7 @@ export function generateOperation(operation: TypespecOperation, operationGroup?: generateNameCollisionWarning(duplicateNames, statements); statements.push(`@route("${route}")`); statements.push( - `@${verb} op ${name} is Azure.Core.Foundations.Operation<${params ? params : "{}"}, ${responses.join( + `@${verb} op \`${name}\` is Azure.Core.Foundations.Operation<${params ? params : "{}"}, ${responses.join( " | ", )}>;\n\n\n`, ); @@ -39,7 +39,7 @@ export function generateOperation(operation: TypespecOperation, operationGroup?: const parametersString = resourceParameters ? `, { parameters: ${resourceParameters}}` : ""; statements.push( `${operationGroup?.name ? "" : "op "}`, - `${name} is Azure.Core.${resource.kind}<${resource.response.name} ${parametersString}>;\n\n\n`, + `\`${name}\` is Azure.Core.${resource.kind}<${resource.response.name} ${parametersString}>;\n\n\n`, ); } return statements.join("\n"); diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts index aef4cdb664..80073defbc 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts @@ -65,14 +65,14 @@ export function generateServiceInformation(program: TypespecProgram) { if (serviceInformation.versions) { definitions.push(""); - definitions.push(`@doc("The available API versions.")`); + definitions.push(`/**\n* The available API versions.\n*/`); definitions.push(`enum Versions {`); for (const version of serviceInformation.versions) { if (isArm) { definitions.push(`@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)`); definitions.push(`@useDependency(Azure.Core.Versions.v1_0_Preview_1)`); } - definitions.push(`@doc("The ${version} API version.")`); + definitions.push(`/**\n* The ${version} API version.\n*/`); definitions.push(`v${version.replaceAll("-", "_")}: "${version}",`); } definitions.push("}"); diff --git a/packages/extensions/openapi-to-typespec/src/interfaces.ts b/packages/extensions/openapi-to-typespec/src/interfaces.ts index 1d38316ada..99f2f934a3 100644 --- a/packages/extensions/openapi-to-typespec/src/interfaces.ts +++ b/packages/extensions/openapi-to-typespec/src/interfaces.ts @@ -177,6 +177,7 @@ export interface TspArmResourceOperationBase extends WithDoc, WithFixMe { decorators?: TypespecDecorator[]; operationId?: string; examples?: Record>; + augmentedDecorators?: string[]; } export type TspArmResourceOperation = @@ -188,7 +189,7 @@ export interface TspArmResourceNonListOperation extends TspArmResourceOperationB kind: | "ArmResourceRead" | "ArmResourceCreateOrReplaceSync" - | "ArmResourceCreateOrUpdateAsync" + | "ArmResourceCreateOrReplaceAsync" | "ArmResourcePatchSync" | "ArmResourcePatchAsync" | "ArmTagsPatchSync" diff --git a/packages/extensions/openapi-to-typespec/src/model.ts b/packages/extensions/openapi-to-typespec/src/model.ts index 4ad53cb7d7..08bec9d910 100644 --- a/packages/extensions/openapi-to-typespec/src/model.ts +++ b/packages/extensions/openapi-to-typespec/src/model.ts @@ -7,7 +7,7 @@ import { transformEnum } from "./transforms/transform-choices"; import { getTypespecType, transformObject } from "./transforms/transform-object"; import { transformOperationGroup } from "./transforms/transform-operations"; import { transformServiceInformation } from "./transforms/transform-service-information"; -import { ArmResourceSchema, filterArmModels, isResourceSchema } from "./utils/resource-discovery"; +import { ArmResourceSchema, filterArmEnums, filterArmModels, isResourceSchema } from "./utils/resource-discovery"; import { isChoiceSchema } from "./utils/schemas"; const models: Map = new Map(); @@ -41,7 +41,7 @@ export function transformDataType(schema: Schema, codeModel: CodeModel): Typespe } function transformModel(codeModel: CodeModel): TypespecProgram { - const caldEnums = [...(codeModel.schemas.choices ?? []), ...(codeModel.schemas.sealedChoices ?? [])] + const typespecEnums = [...(codeModel.schemas.choices ?? []), ...(codeModel.schemas.sealedChoices ?? [])] .filter((c) => c.language.default.name !== "Versions") .map((c) => transformEnum(c, codeModel)); @@ -70,7 +70,7 @@ function transformModel(codeModel: CodeModel): TypespecProgram { return { serviceInformation, models: { - enums: caldEnums, + enums: isArm ? filterArmEnums(typespecEnums) : typespecEnums, objects: isArm ? filterArmModels(codeModel, typespecObjects) : typespecObjects, armResources, }, diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts index 9c7eb7038f..aa93a9efcb 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts @@ -1,6 +1,6 @@ import { Operation, Parameter, Response, SchemaResponse, SchemaType } from "@autorest/codemodel"; import _ from "lodash"; -import { singular } from "pluralize"; +import pluralize, { singular } from "pluralize"; import { getSession } from "../autorest-session"; import { generateParameter } from "../generate/generate-parameter"; import { @@ -230,13 +230,23 @@ function getLROHeader(swaggerOperation: Operation): string | undefined { return lroHeader; } -function convertResourceCreateOrUpdateOperation( +function getTSPOperationGroupName(resourceName: string): string { + const operationGroupName = pluralize(resourceName); + if (operationGroupName === resourceName) { + return `${operationGroupName}OperationGroup`; + } else { + return operationGroupName; + } +} + +function convertResourceCreateOrReplaceOperation( resourceMetadata: ArmResource, operations: Record, ): TspArmResourceOperation[] { if (resourceMetadata.CreateOperations.length) { const operation = resourceMetadata.CreateOperations[0]; const swaggerOperation = operations[operation.OperationID]; + const bodyParam = swaggerOperation.requests?.[0].parameters?.find((p) => p.protocol.http?.in === "body"); const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; const lroHeader = getLROHeader(swaggerOperation); const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); @@ -250,14 +260,33 @@ function convertResourceCreateOrUpdateOperation( } templateParameters.push(lroHeader); } + const tspOperationGroupName = getTSPOperationGroupName(resourceMetadata.SwaggerModelName); + const operationName = getOperationName(operation.OperationID); + const augmentedDecorators = []; + if (bodyParam) { + if (bodyParam.language.default.name !== "resource") { + augmentedDecorators.push( + `@@projectedName(${tspOperationGroupName}.${operationName}::parameters.resource, "json", "${bodyParam.language.default.name}");`, + ); + augmentedDecorators.push( + `@@extension(${tspOperationGroupName}.${operationName}::parameters.resource, "x-ms-client-name", "${bodyParam.language.default.name}");`, + ); + } + if (bodyParam.language.default.description !== "Resource create parameters.") { + augmentedDecorators.push( + `@@doc(${tspOperationGroupName}.${operationName}::parameters.resource, "${bodyParam.language.default.description}");`, + ); + } + } return [ { doc: operation.Description, - kind: isLongRunning ? "ArmResourceCreateOrUpdateAsync" : "ArmResourceCreateOrReplaceSync", - name: getOperationName(operation.OperationID), + kind: isLongRunning ? "ArmResourceCreateOrReplaceAsync" : "ArmResourceCreateOrReplaceSync", + name: operationName, operationId: operation.OperationID, templateParameters: templateParameters, examples: swaggerOperation.extensions?.["x-ms-examples"], + augmentedDecorators, }, ]; } @@ -287,9 +316,26 @@ function convertResourceUpdateOperation( } let kind; const templateParameters = [resourceMetadata.SwaggerModelName]; + const augmentedDecorators = []; if (bodyParam) { kind = isLongRunning ? "ArmCustomPatchAsync" : "ArmCustomPatchSync"; templateParameters.push(bodyParam.schema.language.default.name); + + const tspOperationGroupName = getTSPOperationGroupName(resourceMetadata.SwaggerModelName); + const operationName = getOperationName(operation.OperationID); + if (bodyParam.language.default.name !== "properties") { + augmentedDecorators.push( + `@@projectedName(${tspOperationGroupName}.${operationName}::parameters.properties, "json", "${bodyParam.language.default.name}");`, + ); + augmentedDecorators.push( + `@@extension(${tspOperationGroupName}.${operationName}::parameters.properties, "x-ms-client-name", "${bodyParam.language.default.name}");`, + ); + } + if (bodyParam.language.default.description !== "The resource properties to be updated.") { + augmentedDecorators.push( + `@@doc(${tspOperationGroupName}.${operationName}::parameters.properties, "${bodyParam.language.default.description}");`, + ); + } } else { kind = isLongRunning ? "ArmCustomPatchAsync" : "ArmCustomPatchSync"; templateParameters.push("{}"); @@ -312,6 +358,9 @@ function convertResourceUpdateOperation( operationId: operation.OperationID, templateParameters, examples: swaggerOperation.extensions?.["x-ms-examples"], + augmentedDecorators, + // To resolve auto-generate update model with proper visibility + decorators: [{ name: "parameterVisibility", arguments: ["read"] }], }, ]; } @@ -476,6 +525,7 @@ function convertResourceActionOperations( for (const operation of resourceMetadata.OtherOperations) { if (operation.Method === "POST") { const swaggerOperation = operations[operation.OperationID]; + const bodyParam = swaggerOperation.requests?.[0].parameters?.find((p) => p.protocol.http?.in === "body"); const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; const lroHeader = getLROHeader(swaggerOperation); const okResponse = swaggerOperation?.responses?.filter( @@ -489,7 +539,7 @@ function convertResourceActionOperations( } } - const request = buildOperationBodyRequest(swaggerOperation, resourceMetadata) ?? "void"; + const request = bodyParam ? bodyParam.schema.language.default.name : "void"; const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); let kind; if (!okResponse) { @@ -511,13 +561,33 @@ function convertResourceActionOperations( } templateParameters.push(lroHeader); } + + const tspOperationGroupName = getTSPOperationGroupName(resourceMetadata.SwaggerModelName); + const operationName = getOperationName(operation.OperationID); + const augmentedDecorators = []; + if (bodyParam) { + if (bodyParam.language.default.name !== "body") { + augmentedDecorators.push( + `@@projectedName(${tspOperationGroupName}.${operationName}::parameters.body, "json", "${bodyParam.language.default.name}");`, + ); + augmentedDecorators.push( + `@@extension(${tspOperationGroupName}.${operationName}::parameters.body, "x-ms-client-name", "${bodyParam.language.default.name}");`, + ); + } + if (bodyParam.language.default.description !== "The content of the action request") { + augmentedDecorators.push( + `@@doc(${tspOperationGroupName}.${operationName}::parameters.body, "${bodyParam.language.default.description}");`, + ); + } + } converted.push({ doc: operation.Description, kind: kind as any, - name: getOperationName(operation.OperationID), + name: operationName, operationId: operation.OperationID, templateParameters, examples: swaggerOperation.extensions?.["x-ms-examples"], + augmentedDecorators, }); } } @@ -537,14 +607,33 @@ function convertCheckNameAvailabilityOperations( for (const operation of resourceMetadata.OperationsFromSubscriptionExtension) { if (operation.Path.includes("/checkNameAvailability")) { const swaggerOperation = operations[operation.OperationID]; - - converted.push({ - doc: operation.Description, - kind: "checkGlobalNameAvailability", - name: getOperationName(operation.OperationID), - operationId: operation.OperationID, - examples: swaggerOperation.extensions?.["x-ms-examples"], - }); + const response = + ( + swaggerOperation?.responses?.filter( + (o) => o.protocol.http?.statusCodes.includes("200"), + )?.[0] as SchemaResponse + ).schema?.language.default.name ?? "CheckNameAvailabilityResponse"; + const bodyParam = swaggerOperation.requests?.[0].parameters?.find((p) => p.protocol.http?.in === "body"); + const request = bodyParam ? bodyParam.schema.language.default.name : "CheckNameAvailabilityRequest"; + if (operation.Path.includes("/locations/")) { + converted.push({ + doc: operation.Description, + kind: "checkLocalNameAvailability", + name: getOperationName(operation.OperationID), + operationId: operation.OperationID, + examples: swaggerOperation.extensions?.["x-ms-examples"], + templateParameters: [request, response], + }); + } else { + converted.push({ + doc: operation.Description, + kind: "checkGlobalNameAvailability", + name: getOperationName(operation.OperationID), + operationId: operation.OperationID, + examples: swaggerOperation.extensions?.["x-ms-examples"], + templateParameters: [request, response], + }); + } } } } @@ -595,7 +684,7 @@ function getTspOperations(armSchema: ArmResourceSchema): [TspArmResourceOperatio tspOperations.push(...convertResourceExistsOperation(resourceMetadata)); // create operation - tspOperations.push(...convertResourceCreateOrUpdateOperation(resourceMetadata, operations)); + tspOperations.push(...convertResourceCreateOrReplaceOperation(resourceMetadata, operations)); // patch update operation could either be patch for resource/tag or custom patch tspOperations.push(...convertResourceUpdateOperation(resourceMetadata, operations)); @@ -630,17 +719,6 @@ function getOperationGroupName(name: string | undefined): string { } } -function buildOperationBodyRequest(operation: Operation, resource: ArmResource): string | undefined { - const codeModel = getSession().model; - const bodyParam: Parameter | undefined = operation.requests?.[0].parameters?.find( - (p) => p.protocol.http?.in === "body", - ); - if (bodyParam) { - const transformed = transformParameter(bodyParam, codeModel); - return transformed.type; - } -} - function buildOperationBaseParameters(operation: Operation, resource: ArmResource): string | undefined { const codeModel = getSession().model; const otherParameters: TypespecParameter[] = []; diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts index 0a8c2c9001..0da3faba15 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts @@ -1,7 +1,9 @@ import { CodeModel, DictionarySchema, + isNumberSchema, isObjectSchema, + NumberSchema, ObjectSchema, Property, Schema, @@ -28,18 +30,21 @@ import { } from "../utils/schemas"; import { getDefaultValue, transformValue } from "../utils/values"; -const typespecTypes = new Map([ +const typespecTypes = new Map([ [SchemaType.Date, "plainDate"], [SchemaType.DateTime, "utcDateTime"], [SchemaType.UnixTime, "plainTime"], [SchemaType.String, "string"], [SchemaType.Time, "plainTime"], [SchemaType.Uuid, "string"], - [SchemaType.Uri, "string"], + [SchemaType.Uri, "url"], [SchemaType.ByteArray, "bytes"], [SchemaType.Binary, "bytes"], - [SchemaType.Number, "float32"], - [SchemaType.Integer, "int32"], + [SchemaType.Number + "32", "float32"], + [SchemaType.Number + "64", "float64"], + [SchemaType.Number + "128", "decimal"], + [SchemaType.Integer + "32", "int32"], + [SchemaType.Integer + "64", "int64"], [SchemaType.Boolean, "boolean"], [SchemaType.Credential, "string"], [SchemaType.Duration, "duration"], @@ -137,6 +142,7 @@ export function transformObjectProperty(propertySchema: Property, codeModel: Cod type: getTypespecType(propertySchema.schema, codeModel), decorators: getPropertyDecorators(propertySchema), fixMe: getFixme(propertySchema, codeModel), + defaultValue: getDefaultValue(propertySchema.schema), }; } @@ -192,7 +198,7 @@ function getArmIdType(schema: Schema): string { } export function getTypespecType(schema: Schema, codeModel: CodeModel): string { - const schemaType = schema.type; + let schemaType = schema.type as string; const visited = getDataTypes(codeModel).get(schema); if (visited) { @@ -232,6 +238,10 @@ export function getTypespecType(schema: Schema, codeModel: CodeModel): string { return getArmIdType(schema); } + if (isNumberSchema(schema)) { + schemaType += `${(schema as NumberSchema).precision}`; + } + const typespecType = typespecTypes.get(schemaType); if (!typespecType) { diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts index c7cb842160..54d888a024 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts @@ -9,6 +9,7 @@ import { Schema, SchemaResponse, } from "@autorest/codemodel"; +import _ from "lodash"; import { OperationWithResourceOperationFlag } from "utils/resource-discovery"; import { getDataTypes } from "../data-types"; import { @@ -83,7 +84,7 @@ export function transformOperation(operation: Operation, codeModel: CodeModel): export function transformRequest(_request: Request, operation: Operation, codeModel: CodeModel): TypespecOperation { const { language, responses, requests } = operation; - const name = language.default.name; + const name = _.lowerFirst(language.default.name); const doc = language.default.description; const summary = language.default.summary; const { paging } = getLanguageMetadata(operation.language); diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts index e9f7e17168..dd1d3abffd 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts @@ -9,7 +9,7 @@ export function transformServiceInformation(model: CodeModel): ServiceInformatio const { isArm } = getOptions(); return { name: model.info.title, - doc: model.info.description ?? "// FIXME: (miissing-service-description) Add service description", + doc: model.info.description ?? "// FIXME: (missing-service-description) Add service description", endpoint: getFirstEndpoint(model), endpointParameters: transformEndpointParameters(model), versions: getApiVersions(model), diff --git a/packages/extensions/openapi-to-typespec/src/utils/docs.ts b/packages/extensions/openapi-to-typespec/src/utils/docs.ts index a6eb721b2b..1f8c2b1317 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/docs.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/docs.ts @@ -10,13 +10,9 @@ export function generateDocs({ doc }: WithDocs): string { return ``; } - let docString = Array.isArray(doc) ? doc.join("\n") : doc; - docString = docString.replace(/\r\n/g, "\n"); - docString = docString.replace(/\\/g, "\\\\"); - docString = docString.replace(/"/g, '\\"'); - docString = lineWrap(docString); + const wrapped = lineWrap(doc); - return `@doc(${docString})`; + return `/**\n* ${wrapped.join("\n* ")}\n*/`; } export function generateSummary({ summary }: WithSummary): string { @@ -24,35 +20,43 @@ export function generateSummary({ summary }: WithSummary): string { return ""; } - return `@summary(${lineWrap(summary)})`; + const wrapped = lineWrap(summary); + + if (wrapped.length === 1) { + return `@summary("${summary}")`; + } + return `@summary("""\n${wrapped.join("\n")}\n""")`; } -function lineWrap(doc: string) { +function lineWrap(doc: string | string[]): string[] { const { isArm } = getOptions(); const maxLength = isArm ? Number.POSITIVE_INFINITY : 80; - if (doc.length <= maxLength && !doc.includes("\n")) { - return `"${doc}"`; + let docString = Array.isArray(doc) ? doc.join("") : doc; + docString = docString.replace(/\r\n/g, "\n"); + docString = docString.replace(/\r/g, "\n"); + + if (docString.length <= maxLength && !docString.includes("\n")) { + return [docString]; } - const lines: string[] = [`"""`]; - const words = doc.split(" "); + const lines: string[] = []; + const words = docString.split(" "); let line = ``; for (const word of words) { - if (word.length + 1 > maxLength - line.length) { - // Don't add the leading space + if (word === "\n") { + lines.push(line.substring(0, line.length - 1)); + line = ""; + } else if (word.length + 1 > maxLength - line.length) { lines.push(line.substring(0, line.length - 1)); - - // Start a new line line = `${word} `; } else { line = `${line}${word} `; } } lines.push(`${line.substring(0, line.length - 1)}`); - lines.push(`"""`); - return lines.join("\n"); + return lines; } function isEmptyDoc(doc?: string | string[]): doc is undefined { diff --git a/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts b/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts index 01a72ba4ca..a2f468f34f 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts @@ -2,7 +2,7 @@ import { readFileSync } from "fs"; import { join } from "path"; import { CodeModel, ObjectSchema, Operation, SchemaResponse } from "@autorest/codemodel"; import { getSession } from "../autorest-session"; -import { TypespecObject, TspArmResource } from "../interfaces"; +import { TypespecObject, TspArmResource, TypespecEnum } from "../interfaces"; import { isGeneratedResourceObject } from "../transforms/transform-arm-resources"; export interface _ArmResourceOperation { Name: string; @@ -197,6 +197,21 @@ export function filterArmModels(codeModel: CodeModel, objects: TypespecObject[]) return objects.filter((o) => !filtered.includes(o.name) && !isGeneratedResourceObject(o.name)); } +const _ArmCoreEnums = [ + "CreatedByType", + "Origin", + "ActionType", + "ManagedIdentityType", + "ManagedSystemIdentityType", + "SkuTier", + "CheckNameAvailabilityRequest", + "CheckNameAvailabilityReason", +]; + +export function filterArmEnums(enums: TypespecEnum[]): TypespecEnum[] { + return enums.filter((e) => !_ArmCoreEnums.includes(e.name)); +} + export function isTspArmResource(schema: TypespecObject): schema is TspArmResource { return Boolean((schema as TspArmResource).resourceKind); } diff --git a/packages/extensions/openapi-to-typespec/src/utils/values.ts b/packages/extensions/openapi-to-typespec/src/utils/values.ts index a08d9c122d..2bc59c3a39 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/values.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/values.ts @@ -10,7 +10,7 @@ export function transformValue(value: string | number | boolean) { } export function transformDefaultValue(type: string, value: string | number | boolean) { - if (type === "string" || type === "int32" || type === "boolean") { + if (["string", "int32", "int64", "float32", "float64", "boolean"].includes(type)) { return transformValue(value); } else { return `${type}.${value}`; diff --git a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp index 5ecdd63f5c..6f7a6a666a 100644 --- a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp @@ -4,6 +4,14 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +/** + * The language service API is a suite of natural language processing (NLP) skills + * built with best-in-class Microsoft machine learning algorithms. The API can be + * used to analyze unstructured text for tasks such as sentiment analysis, key + * phrase extraction, language detection and question answering. Further + * documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview. + */ @service({ title: "Microsoft Cognitive Language Service - Analyze Text Authoring", }) @@ -15,18 +23,14 @@ using TypeSpec.Http; Endpoint: string, } ) -@doc(""" -The language service API is a suite of natural language processing (NLP) skills -built with best-in-class Microsoft machine learning algorithms. The API can be -used to analyze unstructured text for tasks such as sentiment analysis, key -phrase extraction, language detection and question answering. Further -documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview. -""") namespace Azure.Language.Authoring; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { - @doc("The 2022-05-01 API version.") + /** + * The 2022-05-01 API version. + */ v2022_05_01: "2022-05-01", } diff --git a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp index 2ba09b48b7..7f2f358e74 100644 --- a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp @@ -9,26 +9,30 @@ using Azure.Core; namespace Azure.Language.Authoring; enum ProjectKind { - @doc(""" -For building a classification model to classify text using your own data. Each -file will have only one label. For example, file 1 is classified as A and file -2 is classified as B. -""") + /** + * For building a classification model to classify text using your own data. Each + * file will have only one label. For example, file 1 is classified as A and file + * 2 is classified as B. + */ CustomSingleLabelClassification, - @doc(""" -For building a classification model to classify text using your own data. Each -file can have one or many labels. For example, file 1 is classified as A, B, -and C and file 2 is classified as B and C. -""") + + /** + * For building a classification model to classify text using your own data. Each + * file can have one or many labels. For example, file 1 is classified as A, B, + * and C and file 2 is classified as B and C. + */ CustomMultiLabelClassification, - @doc(""" -For building an extraction model to identify your domain categories using your -own data. -""") + + /** + * For building an extraction model to identify your domain categories using your + * own data. + */ CustomEntityRecognition, } -@doc("Human-readable error code.") +/** + * Human-readable error code. + */ enum ErrorCode { InvalidRequest, InvalidArgument, @@ -50,7 +54,9 @@ enum ErrorCode { Warning, } -@doc("Human-readable error code.") +/** + * Human-readable error code. + */ enum InnerErrorCode { InvalidRequest, InvalidParameterValue, @@ -69,30 +75,33 @@ enum InnerErrorCode { } enum StringIndexType { - @doc(""" -The offset and length values will correspond to UTF-16 code units. Use this -option if your application is written in a language that support Unicode, for -example Java, JavaScript. -""") + /** + * The offset and length values will correspond to UTF-16 code units. Use this + * option if your application is written in a language that support Unicode, for + * example Java, JavaScript. + */ Utf16CodeUnit, } enum StringIndexTypeAutoGenerated { - @doc(""" -The offset and length values will correspond to UTF-16 code units. Use this -option if your application is written in a language that support Unicode, for -example Java, JavaScript. -""") + /** + * The offset and length values will correspond to UTF-16 code units. Use this + * option if your application is written in a language that support Unicode, for + * example Java, JavaScript. + */ Utf16CodeUnit, } enum EvaluationKind { - @doc(""" -Split the data into training and test sets according to user-defined -percentages. -""") + /** + * Split the data into training and test sets according to user-defined + * percentages. + */ Percentage: "percentage", - @doc("Split the data according to the chosen dataset for every example in the data.") + + /** + * Split the data according to the chosen dataset for every example in the data. + */ Manual: "manual", } @@ -106,870 +115,1296 @@ enum JobStatus { PartiallyCompleted: "partiallyCompleted", } -@doc("Represents a list of retrieved projects' metadata.") +/** + * Represents a list of retrieved projects' metadata. + */ model ProjectsMetadata is Azure.Core.Page; -@doc("Represents the metadata of a project.") +/** + * Represents the metadata of a project. + */ @resource("authoring/analyze-text/projects") model ProjectMetadata { - @doc("Represents the project creation datetime.") + /** + * Represents the project creation datetime. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDateTime: utcDateTime; - @doc("Represents the project last modification datetime.") + /** + * Represents the project last modification datetime. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedDateTime: utcDateTime; - @doc("Represents the project last training datetime.") + /** + * Represents the project last training datetime. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastTrainedDateTime?: utcDateTime; - @doc("Represents the project last deployment datetime.") + /** + * Represents the project last deployment datetime. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastDeployedDateTime?: utcDateTime; - @doc("The project kind.") + /** + * The project kind. + */ projectKind: ProjectKind; - @doc("The storage container name.") + /** + * The storage container name. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key storageInputContainerName: string; - @doc("The project settings.") + /** + * The project settings. + */ settings?: Record; - @doc("The new project name.") + /** + * The new project name. + */ projectName: string; - @doc("Whether the project would be used for multiple languages or not.") + /** + * Whether the project would be used for multiple languages or not. + */ multilingual?: boolean; - @doc("The project description.") + /** + * The project description. + */ description?: string; - @doc(""" -The project language. This is BCP-47 representation of a language. For example, -use \"en\" for English, \"en-gb\" for English (UK), \"es\" for Spanish etc. -""") + /** + * The project language. This is BCP-47 representation of a language. For example, + * use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + */ language: string; } -@doc("Error response.") +/** + * Error response. + */ @error model ErrorResponse { - @doc("The error object.") + /** + * The error object. + */ error: Error; } -@doc("The error object.") +/** + * The error object. + */ model Error extends Record { - @doc("One of a server-defined set of error codes.") + /** + * One of a server-defined set of error codes. + */ code: ErrorCode; - @doc("A human-readable representation of the error.") + /** + * A human-readable representation of the error. + */ message: string; - @doc("The target of the error.") + /** + * The target of the error. + */ target?: string; - @doc("An array of details about specific errors that led to this reported error.") + /** + * An array of details about specific errors that led to this reported error. + */ details?: Error[]; - @doc(""" -An object containing more specific information than the current object about -the error. -""") + /** + * An object containing more specific information than the current object about + * the error. + */ innererror?: InnerErrorModel; } -@doc(""" -An object containing more specific information about the error. As per -Microsoft One API guidelines - -https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. -""") +/** + * An object containing more specific information about the error. As per + * Microsoft One API guidelines - + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + */ model InnerErrorModel { - @doc("One of a server-defined set of error codes.") + /** + * One of a server-defined set of error codes. + */ code: InnerErrorCode; - @doc("Error message.") + /** + * Error message. + */ message: string; - @doc("Error details.") + /** + * Error details. + */ details?: Record; - @doc("Error target.") + /** + * Error target. + */ target?: string; - @doc(""" -An object containing more specific information than the current object about -the error. -""") + /** + * An object containing more specific information than the current object about + * the error. + */ innererror?: InnerErrorModel; } -@doc("Represents the options used to create or update a project.") +/** + * Represents the options used to create or update a project. + */ model CreateProjectOptions { - @doc("The project kind.") + /** + * The project kind. + */ projectKind: ProjectKind; - @doc("The storage container name.") + /** + * The storage container name. + */ storageInputContainerName: string; - @doc("The project settings.") + /** + * The project settings. + */ settings?: Record; - @doc("The new project name.") + /** + * The new project name. + */ projectName: string; - @doc("Whether the project would be used for multiple languages or not.") + /** + * Whether the project would be used for multiple languages or not. + */ multilingual?: boolean; - @doc("The project description.") + /** + * The project description. + */ description?: string; - @doc(""" -The project language. This is BCP-47 representation of a language. For example, -use \"en\" for English, \"en-gb\" for English (UK), \"es\" for Spanish etc. -""") + /** + * The project language. This is BCP-47 representation of a language. For example, + * use "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + */ language: string; } -@doc("Represents an exported project.") +/** + * Represents an exported project. + */ model ExportedProject { - @doc("The version of the exported file.") + /** + * The version of the exported file. + */ projectFileVersion: string; - @doc(""" -Specifies the method used to interpret string offsets. For additional -information see https://aka.ms/text-analytics-offsets. -""") + /** + * Specifies the method used to interpret string offsets. For additional + * information see https://aka.ms/text-analytics-offsets. + */ stringIndexType: StringIndexTypeAutoGenerated; - @doc("Represents the project metadata.") + /** + * Represents the project metadata. + */ metadata: CreateProjectOptions; - @doc("Represents the project assets.") + /** + * Represents the project assets. + */ assets?: ExportedProjectAssets; } -@doc("Represents the assets of an exported project.") +/** + * Represents the assets of an exported project. + */ @discriminator("projectKind") model ExportedProjectAssets {} -@doc("Represents the options for starting a new training job.") +/** + * Represents the options for starting a new training job. + */ model TrainingJobOptions { - @doc("Represents the output model label.") + /** + * Represents the output model label. + */ modelLabel: string; - @doc("Represents training config version.") + /** + * Represents training config version. + */ trainingConfigVersion: string; - @doc(""" -Represents the evaluation options. By default, the evaluation kind is -percentage, with training split percentage as 80, and testing split percentage -as 20. -""") + /** + * Represents the evaluation options. By default, the evaluation kind is + * percentage, with training split percentage as 80, and testing split percentage + * as 20. + */ evaluationOptions?: EvaluationOptions; } -@doc("Represents the options used running the evaluation.") +/** + * Represents the options used running the evaluation. + */ model EvaluationOptions { - @doc(""" -Represents the evaluation kind. By default, the evaluation kind is set to -percentage. -""") + /** + * Represents the evaluation kind. By default, the evaluation kind is set to + * percentage. + */ kind?: EvaluationKind; - @doc(""" -Represents the training dataset split percentage. Only needed in case the -evaluation kind is percentage. -""") + /** + * Represents the training dataset split percentage. Only needed in case the + * evaluation kind is percentage. + */ trainingSplitPercentage?: int32; - @doc(""" -Represents the testing dataset split percentage. Only needed in case the -evaluation kind is percentage. -""") + /** + * Represents the testing dataset split percentage. Only needed in case the + * evaluation kind is percentage. + */ testingSplitPercentage?: int32; } -@doc("Represents a list of retrieved deployments.") +/** + * Represents a list of retrieved deployments. + */ model ProjectDeployments is Azure.Core.Page; -@doc("Represents a project deployment.") +/** + * Represents a project deployment. + */ @resource("authoring/analyze-text/projects/{projectName}/deployments") model ProjectDeployment { - @doc("Represents deployment name.") + /** + * Represents deployment name. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key deploymentName: string; - @doc("Represents deployment modelId.") + /** + * Represents deployment modelId. + */ modelId: string; - @doc("Represents deployment last trained time.") + /** + * Represents deployment last trained time. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastTrainedDateTime: utcDateTime; - @doc("Represents deployment last deployed time.") + /** + * Represents deployment last deployed time. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastDeployedDateTime: utcDateTime; - @doc("Represents deployment expiration date in the runtime.") + /** + * Represents deployment expiration date in the runtime. + */ deploymentExpirationDate: plainDate; - @doc("Represents model training config version.") + /** + * Represents model training config version. + */ modelTrainingConfigVersion: string; } -@doc("Represents the options for swapping two deployments together.") +/** + * Represents the options for swapping two deployments together. + */ model SwapDeploymentsOptions { - @doc("Represents the first deployment name.") + /** + * Represents the first deployment name. + */ firstDeploymentName: string; - @doc("Represents the second deployment name.") + /** + * Represents the second deployment name. + */ secondDeploymentName: string; } -@doc("Represents the options for creating or updating a project deployment.") +/** + * Represents the options for creating or updating a project deployment. + */ model CreateDeploymentOptions { - @doc("Represents the trained model label.") + /** + * Represents the trained model label. + */ trainedModelLabel: string; } -@doc("Represents the state of a deployment job.") +/** + * Represents the state of a deployment job. + */ model DeploymentJobState extends JobState {} -@doc("Represents a job's state.") +/** + * Represents a job's state. + */ model JobState { - @doc("The job ID.") + /** + * The job ID. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key jobId: string; - @doc("The creation date time of the job.") + /** + * The creation date time of the job. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDateTime: utcDateTime; - @doc("The last date time the job was updated.") + /** + * The last date time the job was updated. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdatedDateTime: utcDateTime; - @doc("The expiration date time of the job.") + /** + * The expiration date time of the job. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expirationDateTime?: utcDateTime; - @doc("The job status.") + /** + * The job status. + */ status: JobStatus; - @doc("The warnings that were encountered while executing the job.") + /** + * The warnings that were encountered while executing the job. + */ warnings?: Warning[]; - @doc("The errors encountered while executing the job.") + /** + * The errors encountered while executing the job. + */ errors?: Error[]; } -@doc("Represents a warning that was encountered while executing the request.") +/** + * Represents a warning that was encountered while executing the request. + */ model Warning { - @doc("The warning code.") + /** + * The warning code. + */ code: string; - @doc("The warning message.") + /** + * The warning message. + */ message: string; } -@doc("Represents the state of an export job.") +/** + * Represents the state of an export job. + */ model ExportProjectJobState extends JobState { - @doc("The URL to use in order to download the exported project.") + /** + * The URL to use in order to download the exported project. + */ resultUrl?: string; } -@doc("Represents the state of an import job.") +/** + * Represents the state of an import job. + */ model ImportProjectJobState extends JobState {} -@doc("Represents a list of retrieved trained models.") +/** + * Represents a list of retrieved trained models. + */ model ProjectTrainedModels is Azure.Core.Page; -@doc("Represents a trained model.") +/** + * Represents a trained model. + */ @resource("authoring/analyze-text/projects/{projectName}/models") model ProjectTrainedModel { - @doc("The trained model label.") + /** + * The trained model label. + */ label: string; - @doc("The model ID.") + /** + * The model ID. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key modelId: string; - @doc("The last trained date time of the model.") + /** + * The last trained date time of the model. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastTrainedDateTime: utcDateTime; - @doc("The duration of the model's last training request in seconds.") + /** + * The duration of the model's last training request in seconds. + */ lastTrainingDurationInSeconds: int32; - @doc("The model expiration date.") + /** + * The model expiration date. + */ modelExpirationDate: plainDate; - @doc("The model training config version.") + /** + * The model training config version. + */ modelTrainingConfigVersion: string; } -@doc("Represents a list of results for an evaluation operation.") +/** + * Represents a list of results for an evaluation operation. + */ model EvaluationResults is Azure.Core.Page; -@doc("Represents the evaluation result of a document.") +/** + * Represents the evaluation result of a document. + */ @discriminator("projectKind") model DocumentEvaluationResult { - @doc("Represents the document path.") + /** + * Represents the document path. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key location: string; - @doc(""" -Represents the document language. This is BCP-47 representation of a language. -For example, use \"en\" for English, \"en-gb\" for English (UK), \"es\" for -Spanish etc. -""") + /** + * Represents the document language. This is BCP-47 representation of a language. + * For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish + * etc. + */ language: string; } -@doc("Represents the summary for an evaluation operation.") +/** + * Represents the summary for an evaluation operation. + */ @discriminator("projectKind") model EvaluationSummary { - @doc("Represents the options used running the evaluation.") + /** + * Represents the options used running the evaluation. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key evaluationOptions: EvaluationOptions; } -@doc("Represents a list of retrieved training jobs.") +/** + * Represents a list of retrieved training jobs. + */ model TrainingJobs is Azure.Core.Page; -@doc("Represents the state of a training job.") +/** + * Represents the state of a training job. + */ model TrainingJobState extends JobState { - @doc("Represents training tasks detailed result.") + /** + * Represents training tasks detailed result. + */ result: TrainingJobResult; } -@doc("Represents the output of a training job.") +/** + * Represents the output of a training job. + */ model TrainingJobResult { - @doc("Represents trained model label.") + /** + * Represents trained model label. + */ modelLabel: string; - @doc("Represents training config version.") + /** + * Represents training config version. + */ trainingConfigVersion: string; - @doc("Represents model train status.") + /** + * Represents model train status. + */ trainingStatus: SubTrainingJobState; - @doc("Represents model evaluation status.") + /** + * Represents model evaluation status. + */ evaluationStatus?: SubTrainingJobState; - @doc("Represents the estimate end date time for training and evaluation.") + /** + * Represents the estimate end date time for training and evaluation. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. estimatedEndDateTime?: utcDateTime; } -@doc("Represents the detailed state of a training sub-operation.") +/** + * Represents the detailed state of a training sub-operation. + */ model SubTrainingJobState { - @doc("Represents progress percentage.") + /** + * Represents progress percentage. + */ percentComplete: int32; - @doc("Represents the start date time.") + /** + * Represents the start date time. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startDateTime?: utcDateTime; - @doc("Represents the end date time.") + /** + * Represents the end date time. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endDateTime?: utcDateTime; - @doc("Represents the status of the sub-operation.") + /** + * Represents the status of the sub-operation. + */ status: JobStatus; } -@doc("Represents the state of a project deletion job.") +/** + * Represents the state of a project deletion job. + */ model ProjectDeletionJobState extends JobState {} -@doc("Represents a list of retrieved languages.") +/** + * Represents a list of retrieved languages. + */ model SupportedLanguages is Azure.Core.Page; -@doc("Represents a supported language.") +/** + * Represents a supported language. + */ @resource("authoring/analyze-text/projects/global/languages") model SupportedLanguage { - @doc("The language name.") + /** + * The language name. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key languageName: string; - @doc(""" -The language code. This is BCP-47 representation of a language. For example, -\"en\" for English, \"en-gb\" for English (UK), \"es\" for Spanish etc. -""") + /** + * The language code. This is BCP-47 representation of a language. For example, + * "en" for English, "en-gb" for English (UK), "es" for Spanish etc. + */ languageCode: string; } -@doc("Represents a list of training config versions.") +/** + * Represents a list of training config versions. + */ model TrainingConfigVersions is Azure.Core.Page; -@doc("Represents a training config version.") +/** + * Represents a training config version. + */ model TrainingConfigVersion { - @doc("Represents the version of the config.") + /** + * Represents the version of the config. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key trainingConfigVersion: string; - @doc("Represents the training config version expiration date.") + /** + * Represents the training config version expiration date. + */ modelExpirationDate: plainDate; } -@doc("Represents a cell in a confusion matrix.") +/** + * Represents a cell in a confusion matrix. + */ model ConfusionMatrixCell { - @doc("Represents normalized value in percentages.") + /** + * Represents normalized value in percentages. + */ normalizedValue: float32; - @doc("Represents raw value.") + /** + * Represents raw value. + */ rawValue: float32; } -@doc(""" -Represents the document evaluation result for a custom entity recognition -project. -""") +/** + * Represents the document evaluation result for a custom entity recognition + * project. + */ model CustomEntityRecognitionDocumentEvaluationResult extends DocumentEvaluationResult { - @doc("Represents the evaluation prediction for entity recognition.") + /** + * Represents the evaluation prediction for entity recognition. + */ customEntityRecognitionResult: DocumentEntityRecognitionEvaluationResult; - @doc("Represents the project kind.") + /** + * Represents the project kind. + */ projectKind: "CustomEntityRecognition"; } -@doc("Represents the entity recognition evaluation result for a document.") +/** + * Represents the entity recognition evaluation result for a document. + */ model DocumentEntityRecognitionEvaluationResult { - @doc("Represents the document labelled entities.") + /** + * Represents the document labelled entities. + */ entities: DocumentEntityRegionEvaluationResult[]; } -@doc(""" -Represents the evaluation comparison between the expected and predicted -entities of a document region. -""") +/** + * Represents the evaluation comparison between the expected and predicted + * entities of a document region. + */ model DocumentEntityRegionEvaluationResult { - @doc("Represents the region's expected entity labels.") + /** + * Represents the region's expected entity labels. + */ expectedEntities: DocumentEntityLabelEvaluationResult[]; - @doc("Represents the region's predicted entity labels.") + /** + * Represents the region's predicted entity labels. + */ predictedEntities: DocumentEntityLabelEvaluationResult[]; - @doc("Represents the region offset.") + /** + * Represents the region offset. + */ regionOffset: int32; - @doc("Represents the region length.") + /** + * Represents the region length. + */ regionLength: int32; } -@doc("Represents an evaluation result entity label.") +/** + * Represents an evaluation result entity label. + */ model DocumentEntityLabelEvaluationResult { - @doc("Represents the entity category.") + /** + * Represents the entity category. + */ category: string; - @doc("Represents the entity offset index relative to the original text.") + /** + * Represents the entity offset index relative to the original text. + */ offset: int32; - @doc("Represents the entity length.") + /** + * Represents the entity length. + */ length: int32; } -@doc("Represents the evaluation summary for a custom entity recognition project.") +/** + * Represents the evaluation summary for a custom entity recognition project. + */ model CustomEntityRecognitionEvaluationSummary extends EvaluationSummary { - @doc("Contains the data related to extraction evaluation.") + /** + * Contains the data related to extraction evaluation. + */ customEntityRecognitionEvaluation: EntityRecognitionEvaluationSummary; - @doc("Represents the project type that the evaluation ran on.") + /** + * Represents the project type that the evaluation ran on. + */ projectKind: "CustomEntityRecognition"; } -@doc("Represents the evaluation summary for a custom entity recognition project.") +/** + * Represents the evaluation summary for a custom entity recognition project. + */ model EntityRecognitionEvaluationSummary { - @doc(""" -Represents the confusion matrix between two entities (the two entities can be -the same). The matrix is between the entity that was labelled and the entity -that was predicted. -""") + /** + * Represents the confusion matrix between two entities (the two entities can be + * the same). The matrix is between the entity that was labelled and the entity + * that was predicted. + */ confusionMatrix: Record>; - @doc("Represents the entities evaluation") + /** + * Represents the entities evaluation + */ entities: Record; - @doc("Represents the micro F1") + /** + * Represents the micro F1 + */ microF1: float32; - @doc("Represents the micro precision") + /** + * Represents the micro precision + */ microPrecision: float32; - @doc("Represents the micro recall") + /** + * Represents the micro recall + */ microRecall: float32; - @doc("Represents the macro F1") + /** + * Represents the macro F1 + */ macroF1: float32; - @doc("Represents the macro precision") + /** + * Represents the macro precision + */ macroPrecision: float32; - @doc("Represents the macro recall") + /** + * Represents the macro recall + */ macroRecall: float32; } -@doc("Represents the evaluation summary for an entity.") +/** + * Represents the evaluation summary for an entity. + */ model EntityEvaluationSummary { - @doc("Represents the model precision") - f1: float32; - - @doc("Represents the model recall") - precision: float32; - - @doc("Represents the model F1 score") - recall: float32; - - @doc("Represents the count of true positive") + /** + * Represents the model precision + */ + f1: float64; + + /** + * Represents the model recall + */ + precision: float64; + + /** + * Represents the model F1 score + */ + recall: float64; + + /** + * Represents the count of true positive + */ truePositiveCount: int32; - @doc("Represents the count of true negative") + /** + * Represents the count of true negative + */ trueNegativeCount: int32; - @doc("Represents the count of false positive") + /** + * Represents the count of false positive + */ falsePositiveCount: int32; - @doc("Represents the count of false negative") + /** + * Represents the count of false negative + */ falseNegativeCount: int32; } -@doc(""" -Represents the document evaluation result for a custom multi-label -classification project. -""") +/** + * Represents the document evaluation result for a custom multi-label + * classification project. + */ model CustomMultiLabelClassificationDocumentEvaluationResult extends DocumentEvaluationResult { - @doc("Represents the evaluation prediction for multi label classification.") + /** + * Represents the evaluation prediction for multi label classification. + */ customMultiLabelClassificationResult: DocumentMultiLabelClassificationEvaluationResult; - @doc("Represents the project kind.") + /** + * Represents the project kind. + */ projectKind: "CustomMultiLabelClassification"; } -@doc(""" -Represents the comparison between the expected and predicted classes that are -result from the evaluation operation. -""") +/** + * Represents the comparison between the expected and predicted classes that are + * result from the evaluation operation. + */ model DocumentMultiLabelClassificationEvaluationResult { - @doc("Represents the document's expected classes.") + /** + * Represents the document's expected classes. + */ expectedClasses: string[]; - @doc("Represents the document's predicted classes.") + /** + * Represents the document's predicted classes. + */ predictedClasses: string[]; } -@doc(""" -Represents the evaluation summary for a custom multi-label classification -project. -""") +/** + * Represents the evaluation summary for a custom multi-label classification + * project. + */ model CustomMultiLabelClassificationEvaluationSummary extends EvaluationSummary { - @doc("Contains the data related to multi label classification evaluation.") + /** + * Contains the data related to multi label classification evaluation. + */ customMultiLabelClassificationEvaluation: MultiLabelClassificationEvaluationSummary; - @doc("Represents the project type that the evaluation ran on.") + /** + * Represents the project type that the evaluation ran on. + */ projectKind: "CustomMultiLabelClassification"; } -@doc("Represents the evaluation summary for a multi-label classification project.") +/** + * Represents the evaluation summary for a multi-label classification project. + */ model MultiLabelClassificationEvaluationSummary { - @doc("Represents the classes evaluation") + /** + * Represents the classes evaluation + */ classes: Record; - @doc("Represents the micro F1") + /** + * Represents the micro F1 + */ microF1: float32; - @doc("Represents the micro precision") + /** + * Represents the micro precision + */ microPrecision: float32; - @doc("Represents the micro recall") + /** + * Represents the micro recall + */ microRecall: float32; - @doc("Represents the macro F1") + /** + * Represents the macro F1 + */ macroF1: float32; - @doc("Represents the macro precision") + /** + * Represents the macro precision + */ macroPrecision: float32; - @doc("Represents the macro recall") + /** + * Represents the macro recall + */ macroRecall: float32; } -@doc(""" -Represents the evaluation summary of a class in a multi-label classification -project. -""") +/** + * Represents the evaluation summary of a class in a multi-label classification + * project. + */ model MultiLabelClassEvaluationSummary { - @doc("Represents the model precision") - f1: float32; - - @doc("Represents the model recall") - precision: float32; - - @doc("Represents the model F1 score") - recall: float32; - - @doc("Represents the count of true positive") + /** + * Represents the model precision + */ + f1: float64; + + /** + * Represents the model recall + */ + precision: float64; + + /** + * Represents the model F1 score + */ + recall: float64; + + /** + * Represents the count of true positive + */ truePositiveCount: int32; - @doc("Represents the count of true negative") + /** + * Represents the count of true negative + */ trueNegativeCount: int32; - @doc("Represents the count of false positive") + /** + * Represents the count of false positive + */ falsePositiveCount: int32; - @doc("Represents the count of false negative") + /** + * Represents the count of false negative + */ falseNegativeCount: int32; } -@doc(""" -Represents the document evaluation result for a custom single-label -classification project. -""") +/** + * Represents the document evaluation result for a custom single-label + * classification project. + */ model CustomSingleLabelClassificationDocumentEvaluationResult extends DocumentEvaluationResult { - @doc("Represents the evaluation prediction for single label classification.") + /** + * Represents the evaluation prediction for single label classification. + */ customSingleLabelClassificationResult: DocumentSingleLabelClassificationEvaluationResult; - @doc("Represents the project kind.") + /** + * Represents the project kind. + */ projectKind: "CustomSingleLabelClassification"; } -@doc(""" -Represents the comparison between the expected and predicted class that result -from an evaluation operation. -""") +/** + * Represents the comparison between the expected and predicted class that result + * from an evaluation operation. + */ model DocumentSingleLabelClassificationEvaluationResult { - @doc("Represents the document's expected class.") + /** + * Represents the document's expected class. + */ expectedClass: string; - @doc("Represents the document's predicted class.") + /** + * Represents the document's predicted class. + */ predictedClass: string; } -@doc(""" -Represents the evaluation summary for a custom single-label classification -project. -""") +/** + * Represents the evaluation summary for a custom single-label classification + * project. + */ model CustomSingleLabelClassificationEvaluationSummary extends EvaluationSummary { - @doc("Contains the data related to single label classification evaluation.") + /** + * Contains the data related to single label classification evaluation. + */ customSingleLabelClassificationEvaluation: SingleLabelClassificationEvaluationSummary; - @doc("Represents the project type that the evaluation ran on.") + /** + * Represents the project type that the evaluation ran on. + */ projectKind: "CustomSingleLabelClassification"; } -@doc(""" -Represents the evaluation summary for a custom single-label classification -project. -""") +/** + * Represents the evaluation summary for a custom single-label classification + * project. + */ model SingleLabelClassificationEvaluationSummary { - @doc(""" -Represents the confusion matrix between two classes (the two classes can be the -same). The matrix is between the class that was labelled and the class that was -predicted. -""") + /** + * Represents the confusion matrix between two classes (the two classes can be the + * same). The matrix is between the class that was labelled and the class that was + * predicted. + */ confusionMatrix: Record>; - @doc("Represents the classes evaluation") + /** + * Represents the classes evaluation + */ classes: Record; - @doc("Represents the micro F1") + /** + * Represents the micro F1 + */ microF1: float32; - @doc("Represents the micro precision") + /** + * Represents the micro precision + */ microPrecision: float32; - @doc("Represents the micro recall") + /** + * Represents the micro recall + */ microRecall: float32; - @doc("Represents the macro F1") + /** + * Represents the macro F1 + */ macroF1: float32; - @doc("Represents the macro precision") + /** + * Represents the macro precision + */ macroPrecision: float32; - @doc("Represents the macro recall") + /** + * Represents the macro recall + */ macroRecall: float32; } -@doc(""" -Represents the evaluation summary for a class in a single-label classification -project. -""") +/** + * Represents the evaluation summary for a class in a single-label classification + * project. + */ model SingleLabelClassEvaluationSummary { - @doc("Represents the model precision") - f1: float32; - - @doc("Represents the model recall") - precision: float32; - - @doc("Represents the model F1 score") - recall: float32; - - @doc("Represents the count of true positive") + /** + * Represents the model precision + */ + f1: float64; + + /** + * Represents the model recall + */ + precision: float64; + + /** + * Represents the model F1 score + */ + recall: float64; + + /** + * Represents the count of true positive + */ truePositiveCount: int32; - @doc("Represents the count of true negative") + /** + * Represents the count of true negative + */ trueNegativeCount: int32; - @doc("Represents the count of false positive") + /** + * Represents the count of false positive + */ falsePositiveCount: int32; - @doc("Represents the count of false negative") + /** + * Represents the count of false negative + */ falseNegativeCount: int32; } -@doc("Represents a class of an exported project.") +/** + * Represents a class of an exported project. + */ model ExportedClass { - @doc("The class category.") + /** + * The class category. + */ category?: string; } -@doc("Represents an exported document for a custom entity recognition project.") +/** + * Represents an exported document for a custom entity recognition project. + */ model ExportedCustomEntityRecognitionDocument { - @doc("The list of entity labels belonging to the document.") + /** + * The list of entity labels belonging to the document. + */ entities?: ExportedDocumentRegion[]; - @doc("The location of the document in the storage.") + /** + * The location of the document in the storage. + */ location?: string; - @doc(""" -Represents the document language. This is BCP-47 representation of a language. -For example, use \"en\" for English, \"en-gb\" for English (UK), \"es\" for -Spanish etc. -""") + /** + * Represents the document language. This is BCP-47 representation of a language. + * For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish + * etc. + */ language?: string; - @doc("The dataset for this document. Allowed values are 'Train' and 'Test'.") + /** + * The dataset for this document. Allowed values are 'Train' and 'Test'. + */ dataset?: string; } -@doc("Represents a region in a document for entity labeling.") +/** + * Represents a region in a document for entity labeling. + */ model ExportedDocumentRegion { - @doc("Start position for the region.") + /** + * Start position for the region. + */ regionOffset?: int32; - @doc("Length for the region text.") + /** + * Length for the region text. + */ regionLength?: int32; - @doc("The list of entity labels belonging to this region.") + /** + * The list of entity labels belonging to this region. + */ labels?: ExportedDocumentEntityLabel[]; } -@doc("Represents an entity label for a document.") +/** + * Represents an entity label for a document. + */ model ExportedDocumentEntityLabel { - @doc("The entity category.") + /** + * The entity category. + */ category?: string; - @doc("Start position for the entity text.") + /** + * Start position for the entity text. + */ offset?: int32; - @doc("Length for the entity text.") + /** + * Length for the entity text. + */ length?: int32; } -@doc("Represents the exported assets for a entity recognition project.") +/** + * Represents the exported assets for a entity recognition project. + */ model ExportedCustomEntityRecognitionProjectAssets extends ExportedProjectAssets { - @doc("The list of entities belonging to the project.") + /** + * The list of entities belonging to the project. + */ entities?: ExportedEntity[]; - @doc("The list of documents belonging to the project.") + /** + * The list of documents belonging to the project. + */ documents?: ExportedCustomEntityRecognitionDocument[]; - @doc("The type of the project the assets belong to.") + /** + * The type of the project the assets belong to. + */ projectKind: "CustomEntityRecognition"; } -@doc("Represents an entity in an exported project.") +/** + * Represents an entity in an exported project. + */ model ExportedEntity { - @doc("The entity category.") + /** + * The entity category. + */ category?: string; } -@doc("Represents an exported document of a custom multi-label classification project.") +/** + * Represents an exported document of a custom multi-label classification project. + */ model ExportedCustomMultiLabelClassificationDocument { - @doc("The document classes.") + /** + * The document classes. + */ classes?: ExportedDocumentClass[]; - @doc("The location of the document in the storage.") + /** + * The location of the document in the storage. + */ location?: string; - @doc(""" -Represents the document language. This is BCP-47 representation of a language. -For example, use \"en\" for English, \"en-gb\" for English (UK), \"es\" for -Spanish etc. -""") + /** + * Represents the document language. This is BCP-47 representation of a language. + * For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish + * etc. + */ language?: string; - @doc("The dataset for this document. Allowed values are 'Train' and 'Test'.") + /** + * The dataset for this document. Allowed values are 'Train' and 'Test'. + */ dataset?: string; } -@doc("Represents a classification label for a document.") +/** + * Represents a classification label for a document. + */ model ExportedDocumentClass { category?: string; } -@doc("Represents the exported assets for a custom multi-label classification project.") +/** + * Represents the exported assets for a custom multi-label classification project. + */ model ExportedCustomMultiLabelClassificationProjectAssets extends ExportedProjectAssets { - @doc("The list of classes in the project.") + /** + * The list of classes in the project. + */ classes?: ExportedClass[]; - @doc("The list of documents in the project.") + /** + * The list of documents in the project. + */ documents?: ExportedCustomMultiLabelClassificationDocument[]; - @doc("The type of the project the assets belong to.") + /** + * The type of the project the assets belong to. + */ projectKind: "CustomMultiLabelClassification"; } -@doc(""" -Represents an exported document for a custom single-label classification -project. -""") +/** + * Represents an exported document for a custom single-label classification + * project. + */ model ExportedCustomSingleLabelClassificationDocument { - @doc("The class of the documents.") + /** + * The class of the documents. + */ class?: ExportedDocumentClass; - @doc("The location of the document in the storage.") + /** + * The location of the document in the storage. + */ location?: string; - @doc(""" -Represents the document language. This is BCP-47 representation of a language. -For example, use \"en\" for English, \"en-gb\" for English (UK), \"es\" for -Spanish etc. -""") + /** + * Represents the document language. This is BCP-47 representation of a language. + * For example, use "en" for English, "en-gb" for English (UK), "es" for Spanish + * etc. + */ language?: string; - @doc("The dataset for this document. Allowed values are 'Train' and 'Test'.") + /** + * The dataset for this document. Allowed values are 'Train' and 'Test'. + */ dataset?: string; } -@doc("Represents the exported assets for a single-label classification project.") +/** + * Represents the exported assets for a single-label classification project. + */ model ExportedCustomSingleLabelClassificationProjectAssets extends ExportedProjectAssets { - @doc("The list of classes belonging to this project.") + /** + * The list of classes belonging to this project. + */ classes?: ExportedClass[]; - @doc("The list of documents belonging to this project.") + /** + * The list of documents belonging to this project. + */ documents?: ExportedCustomSingleLabelClassificationDocument[]; - @doc("The type of the project the assets belong to.") + /** + * The type of the project the assets belong to. + */ projectKind: "CustomSingleLabelClassification"; } diff --git a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/routes.tsp index 555ad2cfeb..ec5ea07267 100644 --- a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/routes.tsp @@ -8,411 +8,555 @@ using TypeSpec.Http; namespace Azure.Language.Authoring; interface TextAnalysisAuthoringOperations { - @doc("Lists the existing projects.") - ListProjects is Azure.Core.ResourceList< + /** + * Lists the existing projects. + */ + listProjects is Azure.Core.ResourceList< ProjectMetadata, { parameters: { - @doc("The maximum number of resources to return from the collection.") + /** + * The maximum number of resources to return from the collection. + */ @query("top") top?: int32; - @doc("An offset into the collection of the first resource to be returned.") + /** + * An offset into the collection of the first resource to be returned. + */ @query("skip") skip?: int32; - @doc("The maximum number of resources to include in a single response.") + /** + * The maximum number of resources to include in a single response. + */ @query("maxpagesize") maxpagesize?: int32; }; } >; - @doc("Creates a new project or updates an existing one.") - CreateProject is Azure.Core.ResourceCreateOrUpdate; + /** + * Creates a new project or updates an existing one. + */ + createProject is Azure.Core.ResourceCreateOrUpdate; - @doc("Gets the details of a project.") - GetProject is Azure.Core.ResourceRead; + /** + * Gets the details of a project. + */ + getProject is Azure.Core.ResourceRead; - @doc("Deletes a project.") - DeleteProject is Azure.Core.LongRunningResourceDelete; + /** + * Deletes a project. + */ + deleteProject is Azure.Core.LongRunningResourceDelete; - @doc("Triggers a job to export a project's data.") + /** + * Triggers a job to export a project's data. + */ @route("/authoring/analyze-text/projects/{projectName}/:export") @post - Export is Azure.Core.Foundations.Operation< + export is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc(""" -Specifies the method used to interpret string offsets. For additional -information see https://aka.ms/text-analytics-offsets. -""") + /** + * Specifies the method used to interpret string offsets. For additional + * information see https://aka.ms/text-analytics-offsets. + */ @query("stringIndexType") stringIndexType: StringIndexType; - @doc("Kind of asset to export.") + /** + * Kind of asset to export. + */ @query("assetKind") assetKind?: string; }, void >; - @doc(""" -Triggers a job to import a project. If a project with the same name already -exists, the data of that project is replaced. -""") + /** + * Triggers a job to import a project. If a project with the same name already + * exists, the data of that project is replaced. + */ @route("/authoring/analyze-text/projects/{projectName}/:import") @post - Import is Azure.Core.Foundations.Operation< + `import` is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The project data to import.") + /** + * The project data to import. + */ @body body: ExportedProject; }, void >; - @doc("Triggers a training job for a project.") + /** + * Triggers a training job for a project. + */ @route("/authoring/analyze-text/projects/{projectName}/:train") @post - Train is Azure.Core.Foundations.Operation< + train is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The training input parameters.") + /** + * The training input parameters. + */ @body body: TrainingJobOptions; }, void >; - @doc("Lists the deployments belonging to a project.") - ListDeployments is Azure.Core.ResourceList< + /** + * Lists the deployments belonging to a project. + */ + listDeployments is Azure.Core.ResourceList< ProjectDeployment, { parameters: { - @doc("The maximum number of resources to return from the collection.") + /** + * The maximum number of resources to return from the collection. + */ @query("top") top?: int32; - @doc("An offset into the collection of the first resource to be returned.") + /** + * An offset into the collection of the first resource to be returned. + */ @query("skip") skip?: int32; - @doc("The maximum number of resources to include in a single response.") + /** + * The maximum number of resources to include in a single response. + */ @query("maxpagesize") maxpagesize?: int32; }; } >; - @doc("Swaps two existing deployments with each other.") + /** + * Swaps two existing deployments with each other. + */ @route("/authoring/analyze-text/projects/{projectName}/deployments/:swap") @post - SwapDeployments is Azure.Core.Foundations.Operation< + swapDeployments is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The job object to swap two deployments.") + /** + * The job object to swap two deployments. + */ @body body: SwapDeploymentsOptions; }, void >; - @doc("Gets the details of a deployment.") - GetDeployment is Azure.Core.ResourceRead; + /** + * Gets the details of a deployment. + */ + getDeployment is Azure.Core.ResourceRead; - @doc("Creates a new deployment or replaces an existing one.") - DeployProject is Azure.Core.LongRunningResourceCreateOrReplace; + /** + * Creates a new deployment or replaces an existing one. + */ + deployProject is Azure.Core.LongRunningResourceCreateOrReplace; - @doc("Deletes a project deployment.") - DeleteDeployment is Azure.Core.LongRunningResourceDelete; + /** + * Deletes a project deployment. + */ + deleteDeployment is Azure.Core.LongRunningResourceDelete; - @doc("Gets the status of an existing deployment job.") + /** + * Gets the status of an existing deployment job. + */ @route("/authoring/analyze-text/projects/{projectName}/deployments/{deploymentName}/jobs/{jobId}") @get - GetDeploymentStatus is Azure.Core.Foundations.Operation< + getDeploymentStatus is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The name of the specific deployment of the project to use.") + /** + * The name of the specific deployment of the project to use. + */ @path deploymentName: string; - @doc("The job ID.") + /** + * The job ID. + */ @path jobId: string; }, DeploymentJobState >; - @doc("Gets the status of an existing swap deployment job.") + /** + * Gets the status of an existing swap deployment job. + */ @route("/authoring/analyze-text/projects/{projectName}/deployments/swap/jobs/{jobId}") @get - GetSwapDeploymentsStatus is Azure.Core.Foundations.Operation< + getSwapDeploymentsStatus is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The job ID.") + /** + * The job ID. + */ @path jobId: string; }, DeploymentJobState >; - @doc(""" -Gets the status of an export job. Once job completes, returns the project -metadata, and assets. -""") + /** + * Gets the status of an export job. Once job completes, returns the project + * metadata, and assets. + */ @route("/authoring/analyze-text/projects/{projectName}/export/jobs/{jobId}") @get - GetExportStatus is Azure.Core.Foundations.Operation< + getExportStatus is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The job ID.") + /** + * The job ID. + */ @path jobId: string; }, ExportProjectJobState >; - @doc("Gets the status for an import.") + /** + * Gets the status for an import. + */ @route("/authoring/analyze-text/projects/{projectName}/import/jobs/{jobId}") @get - GetImportStatus is Azure.Core.Foundations.Operation< + getImportStatus is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The job ID.") + /** + * The job ID. + */ @path jobId: string; }, ImportProjectJobState >; - @doc("Lists the trained models belonging to a project.") - ListTrainedModels is Azure.Core.ResourceList< + /** + * Lists the trained models belonging to a project. + */ + listTrainedModels is Azure.Core.ResourceList< ProjectTrainedModel, { parameters: { - @doc("The maximum number of resources to return from the collection.") + /** + * The maximum number of resources to return from the collection. + */ @query("top") top?: int32; - @doc("An offset into the collection of the first resource to be returned.") + /** + * An offset into the collection of the first resource to be returned. + */ @query("skip") skip?: int32; - @doc("The maximum number of resources to include in a single response.") + /** + * The maximum number of resources to include in a single response. + */ @query("maxpagesize") maxpagesize?: int32; }; } >; - @doc("Gets the details of a trained model.") - GetTrainedModel is Azure.Core.ResourceRead; + /** + * Gets the details of a trained model. + */ + getTrainedModel is Azure.Core.ResourceRead; - @doc("Deletes an existing trained model.") - DeleteTrainedModel is Azure.Core.ResourceDelete; + /** + * Deletes an existing trained model. + */ + deleteTrainedModel is Azure.Core.ResourceDelete; - @doc(""" -Gets the detailed results of the evaluation for a trained model. This includes -the raw inference results for the data included in the evaluation process. -""") + /** + * Gets the detailed results of the evaluation for a trained model. This includes + * the raw inference results for the data included in the evaluation process. + */ @route("/authoring/analyze-text/projects/{projectName}/models/{trainedModelLabel}/evaluation/result") @get - GetModelEvaluationResults is Azure.Core.Foundations.Operation< + getModelEvaluationResults is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The trained model label.") + /** + * The trained model label. + */ @path trainedModelLabel: string; - @doc(""" -Specifies the method used to interpret string offsets. For additional -information see https://aka.ms/text-analytics-offsets. -""") + /** + * Specifies the method used to interpret string offsets. For additional + * information see https://aka.ms/text-analytics-offsets. + */ @query("stringIndexType") stringIndexType: StringIndexType; - @doc("The maximum number of resources to return from the collection.") + /** + * The maximum number of resources to return from the collection. + */ @query("top") top?: int32; - @doc("An offset into the collection of the first resource to be returned.") + /** + * An offset into the collection of the first resource to be returned. + */ @query("skip") skip?: int32; - @doc("The maximum number of resources to include in a single response.") + /** + * The maximum number of resources to include in a single response. + */ @query("maxpagesize") maxpagesize?: int32; }, EvaluationResults >; - @doc(""" -Gets the evaluation summary of a trained model. The summary includes high level -performance measurements of the model e.g., F1, Precision, Recall, etc. -""") + /** + * Gets the evaluation summary of a trained model. The summary includes high level + * performance measurements of the model e.g., F1, Precision, Recall, etc. + */ @route("/authoring/analyze-text/projects/{projectName}/models/{trainedModelLabel}/evaluation/summary-result") @get - GetModelEvaluationSummary is Azure.Core.Foundations.Operation< + getModelEvaluationSummary is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The trained model label.") + /** + * The trained model label. + */ @path trainedModelLabel: string; }, EvaluationSummary >; - @doc("Lists the non-expired training jobs created for a project.") + /** + * Lists the non-expired training jobs created for a project. + */ @route("/authoring/analyze-text/projects/{projectName}/train/jobs") @get - ListTrainingJobs is Azure.Core.Foundations.Operation< + listTrainingJobs is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The maximum number of resources to return from the collection.") + /** + * The maximum number of resources to return from the collection. + */ @query("top") top?: int32; - @doc("An offset into the collection of the first resource to be returned.") + /** + * An offset into the collection of the first resource to be returned. + */ @query("skip") skip?: int32; - @doc("The maximum number of resources to include in a single response.") + /** + * The maximum number of resources to include in a single response. + */ @query("maxpagesize") maxpagesize?: int32; }, TrainingJobs >; - @doc("Gets the status for a training job.") + /** + * Gets the status for a training job. + */ @route("/authoring/analyze-text/projects/{projectName}/train/jobs/{jobId}") @get - GetTrainingStatus is Azure.Core.Foundations.Operation< + getTrainingStatus is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The job ID.") + /** + * The job ID. + */ @path jobId: string; }, TrainingJobState >; - @doc("Triggers a cancellation for a running training job.") + /** + * Triggers a cancellation for a running training job. + */ @route("/authoring/analyze-text/projects/{projectName}/train/jobs/{jobId}/:cancel") @post - CancelTrainingJob is Azure.Core.Foundations.Operation< + cancelTrainingJob is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The job ID.") + /** + * The job ID. + */ @path jobId: string; }, void >; - @doc("Gets the status for a project deletion job.") + /** + * Gets the status for a project deletion job. + */ @route("/authoring/analyze-text/projects/global/deletion-jobs/{jobId}") @get - GetProjectDeletionStatus is Azure.Core.Foundations.Operation< + getProjectDeletionStatus is Azure.Core.Foundations.Operation< { - @doc("The job ID.") + /** + * The job ID. + */ @path jobId: string; }, ProjectDeletionJobState >; - @doc("Lists the supported languages.") - GetSupportedLanguages is Azure.Core.ResourceList< + /** + * Lists the supported languages. + */ + getSupportedLanguages is Azure.Core.ResourceList< SupportedLanguage, { parameters: { - @doc("The maximum number of resources to return from the collection.") + /** + * The maximum number of resources to return from the collection. + */ @query("top") top?: int32; - @doc("An offset into the collection of the first resource to be returned.") + /** + * An offset into the collection of the first resource to be returned. + */ @query("skip") skip?: int32; - @doc("The maximum number of resources to include in a single response.") + /** + * The maximum number of resources to include in a single response. + */ @query("maxpagesize") maxpagesize?: int32; }; } >; - @doc("Lists the support training config version for a given project type.") + /** + * Lists the support training config version for a given project type. + */ @route("/authoring/analyze-text/projects/global/training-config-versions") @get - ListTrainingConfigVersions is Azure.Core.Foundations.Operation< + listTrainingConfigVersions is Azure.Core.Foundations.Operation< { - @doc("The project kind.") + /** + * The project kind. + */ @query("projectKind") projectKind: ProjectKind; - @doc("The maximum number of resources to return from the collection.") + /** + * The maximum number of resources to return from the collection. + */ @query("top") top?: int32; - @doc("An offset into the collection of the first resource to be returned.") + /** + * An offset into the collection of the first resource to be returned. + */ @query("skip") skip?: int32; - @doc("The maximum number of resources to include in a single response.") + /** + * The maximum number of resources to include in a single response. + */ @query("maxpagesize") maxpagesize?: int32; }, diff --git a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/main.tsp index e915c8c180..53a386f128 100644 --- a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/main.tsp @@ -4,6 +4,24 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +/** + * The Anomaly Detector API detects anomalies automatically in time series data. + * It supports two kinds of mode, one is for stateless using, another is for + * stateful using. In stateless mode, there are three functionalities. Entire + * Detect is for detecting the whole series with model trained by the time series, + * Last Detect is detecting last point with model trained by points before. + * ChangePoint Detect is for detecting trend changes in time series. In stateful + * mode, user can store time series, the stored time series will be used for + * detection anomalies. Under this mode, user can still use the above three + * functionalities by only giving a time range without preparing time series in + * client side. Besides the above three functionalities, stateful model also + * provide group based detection and labeling service. By leveraging labeling + * service user can provide labels for each detection result, these labels will be + * used for retuning or regenerating detection models. Inconsistency detection is + * a kind of group based detection, this detection will find inconsistency ones in + * a set of time series. By using anomaly detector service, business customers can + * discover incidents and establish a logic flow for root cause analysis. + */ @service({ title: "Anomaly Detector Client", }) @@ -11,29 +29,13 @@ using TypeSpec.Http; "{Endpoint}/anomalydetector/{ApiVersion}", "The Anomaly Detector API detects anomalies automatically in time series data. It supports two kinds of mode, one is for stateless using, another is for stateful using. In stateless mode, there are three functionalities. Entire Detect is for detecting the whole series with model trained by the time series, Last Detect is detecting last point with model trained by points before. ChangePoint Detect is for detecting trend changes in time series. In stateful mode, user can store time series, the stored time series will be used for detection anomalies. Under this mode, user can still use the above three functionalities by only giving a time range without preparing time series in client side. Besides the above three functionalities, stateful model also provide group based detection and labeling service. By leveraging labeling service user can provide labels for each detection result, these labels will be used for retuning or regenerating detection models. Inconsistency detection is a kind of group based detection, this detection will find inconsistency ones in a set of time series. By using anomaly detector service, business customers can discover incidents and establish a logic flow for root cause analysis.", { - @doc("server parameter") + /** + * server parameter + */ $host: string, Endpoint: string, ApiVersion: string, } ) -@doc(""" -The Anomaly Detector API detects anomalies automatically in time series data. -It supports two kinds of mode, one is for stateless using, another is for -stateful using. In stateless mode, there are three functionalities. Entire -Detect is for detecting the whole series with model trained by the time series, -Last Detect is detecting last point with model trained by points before. -ChangePoint Detect is for detecting trend changes in time series. In stateful -mode, user can store time series, the stored time series will be used for -detection anomalies. Under this mode, user can still use the above three -functionalities by only giving a time range without preparing time series in -client side. Besides the above three functionalities, stateful model also -provide group based detection and labeling service. By leveraging labeling -service user can provide labels for each detection result, these labels will be -used for retuning or regenerating detection models. Inconsistency detection is -a kind of group based detection, this detection will find inconsistency ones in -a set of time series. By using anomaly detector service, business customers can -discover incidents and establish a logic flow for root cause analysis. -""") namespace AnomalyDetectorClient; diff --git a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/models.tsp index 163fe77182..fd981e8091 100644 --- a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/models.tsp @@ -8,15 +8,17 @@ using Azure.Core; namespace AnomalyDetectorClient; -@doc("Anomaly Detector API version (for example, v1.0).") +/** + * Anomaly Detector API version (for example, v1.0). + */ enum ApiVersion { `v1.1-preview.1`, } -@doc(""" -Define the impute method, can be one of auto, previous, linear, fixed, zero, -notFill. -""") +/** + * Define the impute method, can be one of auto, previous, linear, fixed, zero, + * notFill. + */ enum ImputeMode { auto, previous, @@ -26,7 +28,9 @@ enum ImputeMode { notFill, } -@doc("The error code.") +/** + * The error code. + */ enum AnomalyDetectorErrorCodes { InvalidCustomInterval, BadArgument, @@ -41,11 +45,11 @@ enum AnomalyDetectorErrorCodes { InvalidImputeFixedValue, } -@doc(""" -An optional field, indicating how missing values will be filled. One of -Previous, Subsequent, Linear, Zero, Fixed, and NotFill. Cannot be set to -NotFill, when the alignMode is Outer. -""") +/** + * An optional field, indicating how missing values will be filled. One of + * Previous, Subsequent, Linear, Zero, Fixed, and NotFill. Cannot be set to + * NotFill, when the alignMode is Outer. + */ enum FillNAMethod { Previous, Subsequent, @@ -55,12 +59,12 @@ enum FillNAMethod { NotFill, } -@doc(""" -Optional argument, can be one of yearly, monthly, weekly, daily, hourly, -minutely, secondly, microsecond or none. If granularity is not present, it will -be none by default. If granularity is none, the timestamp property in time -series point can be absent. -""") +/** + * Optional argument, can be one of yearly, monthly, weekly, daily, hourly, + * minutely, secondly, microsecond or none. If granularity is not present, it will + * be none by default. If granularity is none, the timestamp property in time + * series point can be absent. + */ @fixed enum TimeGranularity { yearly, @@ -74,7 +78,9 @@ enum TimeGranularity { none, } -@doc("Status of detection results. One of CREATED, RUNNING, READY, and FAILED.") +/** + * Status of detection results. One of CREATED, RUNNING, READY, and FAILED. + */ @fixed enum DetectionStatus { CREATED, @@ -89,17 +95,19 @@ enum DataSchema { MultiTable, } -@doc(""" -An optional field, indicating how we align different variables to the same -time-range. Either Inner or Outer. -""") +/** + * An optional field, indicating how we align different variables to the same + * time-range. Either Inner or Outer. + */ @fixed enum AlignMode { Inner, Outer, } -@doc("Model status. One of CREATED, RUNNING, READY, and FAILED.") +/** + * Model status. One of CREATED, RUNNING, READY, and FAILED. + */ @fixed enum ModelStatus { CREATED, @@ -108,371 +116,441 @@ enum ModelStatus { FAILED, } -@doc("The request of entire or last anomaly detection.") +/** + * The request of entire or last anomaly detection. + */ model DetectRequest { - @doc(""" -Time series data points. Points should be sorted by timestamp in ascending -order to match the anomaly detection result. If the data is not sorted -correctly or there is duplicated timestamp, the API will not work. In such -case, an error message will be returned. -""") + /** + * Time series data points. Points should be sorted by timestamp in ascending + * order to match the anomaly detection result. If the data is not sorted + * correctly or there is duplicated timestamp, the API will not work. In such + * case, an error message will be returned. + */ series: TimeSeriesPoint[]; - @doc(""" -Optional argument, can be one of yearly, monthly, weekly, daily, hourly, -minutely, secondly, microsecond or none. If granularity is not present, it will -be none by default. If granularity is none, the timestamp property in time -series point can be absent. -""") + /** + * Optional argument, can be one of yearly, monthly, weekly, daily, hourly, + * minutely, secondly, microsecond or none. If granularity is not present, it will + * be none by default. If granularity is none, the timestamp property in time + * series point can be absent. + */ granularity?: TimeGranularity; - @doc(""" -Custom Interval is used to set non-standard time interval, for example, if the -series is 5 minutes, request can be set as {\"granularity\":\"minutely\", -\"customInterval\":5}. -""") + /** + * Custom Interval is used to set non-standard time interval, for example, if the + * series is 5 minutes, request can be set as {"granularity":"minutely", + * "customInterval":5}. + */ customInterval?: int32; - @doc(""" -Optional argument, periodic value of a time series. If the value is null or -does not present, the API will determine the period automatically. -""") + /** + * Optional argument, periodic value of a time series. If the value is null or + * does not present, the API will determine the period automatically. + */ period?: int32; - @doc("Optional argument, advanced model parameter, max anomaly ratio in a time series.") + /** + * Optional argument, advanced model parameter, max anomaly ratio in a time series. + */ maxAnomalyRatio?: float32; - @doc(""" -Optional argument, advanced model parameter, between 0-99, the lower the value -is, the larger the margin value will be which means less anomalies will be -accepted. -""") + /** + * Optional argument, advanced model parameter, between 0-99, the lower the value + * is, the larger the margin value will be which means less anomalies will be + * accepted. + */ sensitivity?: int32; - @doc(""" -Used to specify how to deal with missing values in the input series, it's used -when granularity is not \"none\". -""") + /** + * Used to specify how to deal with missing values in the input series, it's used + * when granularity is not "none". + */ imputeMode?: ImputeMode; - @doc(""" -Used to specify the value to fill, it's used when granularity is not \"none\" -and imputeMode is \"fixed\". -""") + /** + * Used to specify the value to fill, it's used when granularity is not "none" and + * imputeMode is "fixed". + */ imputeFixedValue?: float32; } -@doc("The definition of input timeseries points.") +/** + * The definition of input timeseries points. + */ model TimeSeriesPoint { - @doc("Optional argument, timestamp of a data point (ISO8601 format).") + /** + * Optional argument, timestamp of a data point (ISO8601 format). + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timestamp?: utcDateTime; - @doc("The measurement of that point, should be float.") + /** + * The measurement of that point, should be float. + */ value: float32; } -@doc("The response of entire anomaly detection.") +/** + * The response of entire anomaly detection. + */ model EntireDetectResponse { - @doc(""" -Frequency extracted from the series, zero means no recurrent pattern has been -found. -""") + /** + * Frequency extracted from the series, zero means no recurrent pattern has been + * found. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key period: int32; - @doc(""" -ExpectedValues contain expected value for each input point. The index of the -array is consistent with the input series. -""") + /** + * ExpectedValues contain expected value for each input point. The index of the + * array is consistent with the input series. + */ expectedValues: float32[]; - @doc(""" -UpperMargins contain upper margin of each input point. UpperMargin is used to -calculate upperBoundary, which equals to expectedValue + (100 - -marginScale)*upperMargin. Anomalies in response can be filtered by -upperBoundary and lowerBoundary. By adjusting marginScale value, less -significant anomalies can be filtered in client side. The index of the array is -consistent with the input series. -""") + /** + * UpperMargins contain upper margin of each input point. UpperMargin is used to + * calculate upperBoundary, which equals to expectedValue + (100 - + * marginScale)*upperMargin. Anomalies in response can be filtered by + * upperBoundary and lowerBoundary. By adjusting marginScale value, less + * significant anomalies can be filtered in client side. The index of the array is + * consistent with the input series. + */ upperMargins: float32[]; - @doc(""" -LowerMargins contain lower margin of each input point. LowerMargin is used to -calculate lowerBoundary, which equals to expectedValue - (100 - -marginScale)*lowerMargin. Points between the boundary can be marked as normal -ones in client side. The index of the array is consistent with the input -series. -""") + /** + * LowerMargins contain lower margin of each input point. LowerMargin is used to + * calculate lowerBoundary, which equals to expectedValue - (100 - + * marginScale)*lowerMargin. Points between the boundary can be marked as normal + * ones in client side. The index of the array is consistent with the input + * series. + */ lowerMargins: float32[]; - @doc(""" -IsAnomaly contains anomaly properties for each input point. True means an -anomaly either negative or positive has been detected. The index of the array -is consistent with the input series. -""") + /** + * IsAnomaly contains anomaly properties for each input point. True means an + * anomaly either negative or positive has been detected. The index of the array + * is consistent with the input series. + */ isAnomaly: boolean[]; - @doc(""" -IsNegativeAnomaly contains anomaly status in negative direction for each input -point. True means a negative anomaly has been detected. A negative anomaly -means the point is detected as an anomaly and its real value is smaller than -the expected one. The index of the array is consistent with the input series. -""") + /** + * IsNegativeAnomaly contains anomaly status in negative direction for each input + * point. True means a negative anomaly has been detected. A negative anomaly + * means the point is detected as an anomaly and its real value is smaller than + * the expected one. The index of the array is consistent with the input series. + */ isNegativeAnomaly: boolean[]; - @doc(""" -IsPositiveAnomaly contain anomaly status in positive direction for each input -point. True means a positive anomaly has been detected. A positive anomaly -means the point is detected as an anomaly and its real value is larger than the -expected one. The index of the array is consistent with the input series. -""") + /** + * IsPositiveAnomaly contain anomaly status in positive direction for each input + * point. True means a positive anomaly has been detected. A positive anomaly + * means the point is detected as an anomaly and its real value is larger than the + * expected one. The index of the array is consistent with the input series. + */ isPositiveAnomaly: boolean[]; - @doc(""" -The severity score for each input point. The larger the value is, the more -sever the anomaly is. For normal points, the \"severity\" is always 0. -""") + /** + * The severity score for each input point. The larger the value is, the more + * sever the anomaly is. For normal points, the "severity" is always 0. + */ severity?: float32[]; } -@doc("Error information returned by the API.") +/** + * Error information returned by the API. + */ @error model AnomalyDetectorError { - @doc("The error code.") + /** + * The error code. + */ code?: AnomalyDetectorErrorCodes; - @doc("A message explaining the error reported by the service.") + /** + * A message explaining the error reported by the service. + */ message?: string; } -@doc("The response of last anomaly detection.") +/** + * The response of last anomaly detection. + */ model LastDetectResponse { - @doc(""" -Frequency extracted from the series, zero means no recurrent pattern has been -found. -""") + /** + * Frequency extracted from the series, zero means no recurrent pattern has been + * found. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key period: int32; - @doc("Suggested input series points needed for detecting the latest point.") + /** + * Suggested input series points needed for detecting the latest point. + */ suggestedWindow: int32; - @doc("Expected value of the latest point.") + /** + * Expected value of the latest point. + */ expectedValue: float32; - @doc(""" -Upper margin of the latest point. UpperMargin is used to calculate -upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. -If the value of latest point is between upperBoundary and lowerBoundary, it -should be treated as normal value. By adjusting marginScale value, anomaly -status of latest point can be changed. -""") + /** + * Upper margin of the latest point. UpperMargin is used to calculate + * upperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin. + * If the value of latest point is between upperBoundary and lowerBoundary, it + * should be treated as normal value. By adjusting marginScale value, anomaly + * status of latest point can be changed. + */ upperMargin: float32; - @doc(""" -Lower margin of the latest point. LowerMargin is used to calculate -lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. - -""") + /** + * Lower margin of the latest point. LowerMargin is used to calculate + * lowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin. + * + */ lowerMargin: float32; - @doc(""" -Anomaly status of the latest point, true means the latest point is an anomaly -either in negative direction or positive direction. -""") + /** + * Anomaly status of the latest point, true means the latest point is an anomaly + * either in negative direction or positive direction. + */ isAnomaly: boolean; - @doc(""" -Anomaly status in negative direction of the latest point. True means the latest -point is an anomaly and its real value is smaller than the expected one. -""") + /** + * Anomaly status in negative direction of the latest point. True means the latest + * point is an anomaly and its real value is smaller than the expected one. + */ isNegativeAnomaly: boolean; - @doc(""" -Anomaly status in positive direction of the latest point. True means the latest -point is an anomaly and its real value is larger than the expected one. -""") + /** + * Anomaly status in positive direction of the latest point. True means the latest + * point is an anomaly and its real value is larger than the expected one. + */ isPositiveAnomaly: boolean; - @doc(""" -The severity score for the last input point. The larger the value is, the more -sever the anomaly is. For normal points, the \"severity\" is always 0. -""") + /** + * The severity score for the last input point. The larger the value is, the more + * sever the anomaly is. For normal points, the "severity" is always 0. + */ severity?: float32; } -@doc("The request of change point detection.") +/** + * The request of change point detection. + */ model ChangePointDetectRequest { - @doc(""" -Time series data points. Points should be sorted by timestamp in ascending -order to match the change point detection result. -""") + /** + * Time series data points. Points should be sorted by timestamp in ascending + * order to match the change point detection result. + */ series: TimeSeriesPoint[]; - @doc(""" -Can only be one of yearly, monthly, weekly, daily, hourly, minutely or -secondly. Granularity is used for verify whether input series is valid. -""") + /** + * Can only be one of yearly, monthly, weekly, daily, hourly, minutely or + * secondly. Granularity is used for verify whether input series is valid. + */ granularity: TimeGranularity; - @doc(""" -Custom Interval is used to set non-standard time interval, for example, if the -series is 5 minutes, request can be set as {\"granularity\":\"minutely\", -\"customInterval\":5}. -""") + /** + * Custom Interval is used to set non-standard time interval, for example, if the + * series is 5 minutes, request can be set as {"granularity":"minutely", + * "customInterval":5}. + */ customInterval?: int32; - @doc(""" -Optional argument, periodic value of a time series. If the value is null or -does not present, the API will determine the period automatically. -""") + /** + * Optional argument, periodic value of a time series. If the value is null or + * does not present, the API will determine the period automatically. + */ period?: int32; - @doc(""" -Optional argument, advanced model parameter, a default stableTrendWindow will -be used in detection. -""") + /** + * Optional argument, advanced model parameter, a default stableTrendWindow will + * be used in detection. + */ stableTrendWindow?: int32; - @doc(""" -Optional argument, advanced model parameter, between 0.0-1.0, the lower the -value is, the larger the trend error will be which means less change point will -be accepted. -""") + /** + * Optional argument, advanced model parameter, between 0.0-1.0, the lower the + * value is, the larger the trend error will be which means less change point will + * be accepted. + */ threshold?: float32; } -@doc("The response of change point detection.") +/** + * The response of change point detection. + */ model ChangePointDetectResponse { - @doc(""" -Frequency extracted from the series, zero means no recurrent pattern has been -found. -""") + /** + * Frequency extracted from the series, zero means no recurrent pattern has been + * found. + */ @visibility("read") period?: int32; - @doc(""" -isChangePoint contains change point properties for each input point. True means -an anomaly either negative or positive has been detected. The index of the -array is consistent with the input series. -""") + /** + * isChangePoint contains change point properties for each input point. True means + * an anomaly either negative or positive has been detected. The index of the + * array is consistent with the input series. + */ isChangePoint?: boolean[]; - @doc("the change point confidence of each point") + /** + * the change point confidence of each point + */ confidenceScores?: float32[]; } -@doc("Detection results for the given resultId.") +/** + * Detection results for the given resultId. + */ @resource("multivariate/entire/detect/{resultId}") model DetectionResult { // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key resultId: string; - @doc("Multivariate anomaly detection status.") + /** + * Multivariate anomaly detection status. + */ summary: DetectionResultSummary; - @doc("Detection result for each timestamp.") + /** + * Detection result for each timestamp. + */ results: AnomalyState[]; } -@doc("Multivariate anomaly detection status.") +/** + * Multivariate anomaly detection status. + */ model DetectionResultSummary { - @doc("Status of detection results. One of CREATED, RUNNING, READY, and FAILED.") + /** + * Status of detection results. One of CREATED, RUNNING, READY, and FAILED. + */ status: DetectionStatus; - @doc("Error message when detection is failed.") + /** + * Error message when detection is failed. + */ errors?: ErrorResponse[]; variableStates?: VariableState[]; - @doc("Detection request.") + /** + * Detection request. + */ setupInfo: DetectionRequest; } @error model ErrorResponse { - @doc("The error code.") + /** + * The error code. + */ code: string; - @doc("The message explaining the error reported by the service.") + /** + * The message explaining the error reported by the service. + */ message: string; } model VariableState { - @doc("Variable name.") + /** + * Variable name. + */ variable?: string; - @doc("Proportion of NaN values filled of the variable.") + /** + * Proportion of NaN values filled of the variable. + */ @maxValue(1) filledNARatio?: float32; - @doc("Number of effective points counted.") + /** + * Number of effective points counted. + */ effectiveCount?: int32; - @doc("First timestamp of the variable.") + /** + * First timestamp of the variable. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. firstTimestamp?: utcDateTime; - @doc("Last timestamp of the variable.") + /** + * Last timestamp of the variable. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastTimestamp?: utcDateTime; } -@doc("Detection request.") +/** + * Detection request. + */ model DetectionRequest { - @doc(""" -Source link to the input variables. Each variable should be a csv with two -columns, `timestamp` and `value`. The file name of the variable will be used as -its name. The variables used in detection should be exactly the same with those -used in the training phase. -""") + /** + * Source link to the input variables. Each variable should be a csv with two + * columns, `timestamp` and `value`. The file name of the variable will be used as + * its name. The variables used in detection should be exactly the same with those + * used in the training phase. + */ dataSource: string; - @doc("Top contributor count.") + /** + * Top contributor count. + */ topContributorCount: int32; - @doc(""" -A required field, indicating the start time of data for detection. Should be -date-time. -""") + /** + * A required field, indicating the start time of data for detection. Should be + * date-time. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime: utcDateTime; - @doc(""" -A required field, indicating the end time of data for detection. Should be -date-time. -""") + /** + * A required field, indicating the end time of data for detection. Should be + * date-time. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime: utcDateTime; } model AnomalyState { - @doc("timestamp") + /** + * timestamp + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timestamp: utcDateTime; value?: AnomalyValue; - @doc("Error message for the current timestamp") + /** + * Error message for the current timestamp + */ errors?: ErrorResponse[]; } model AnomalyValue { - @doc("True if an anomaly is detected at the current timestamp.") + /** + * True if an anomaly is detected at the current timestamp. + */ isAnomaly: boolean; - @doc(""" -Indicates the significance of the anomaly. The higher the severity, the more -significant the anomaly. -""") + /** + * Indicates the significance of the anomaly. The higher the severity, the more + * significant the anomaly. + */ @maxValue(1) severity: float32; - @doc("Raw score from the model.") + /** + * Raw score from the model. + */ @maxValue(2) score: float32; @@ -486,85 +564,107 @@ model AnomalyInterpretation { } model CorrelationChanges { - @doc("correlated variables") + /** + * correlated variables + */ changedVariables?: string[]; } -@doc(""" -Training result of a model including its status, errors and diagnostics -information. -""") +/** + * Training result of a model including its status, errors and diagnostics + * information. + */ model ModelInfo { - @doc(""" -Source link to the input variables. Each variable should be a csv file with two -columns, `timestamp` and `value`. By default, the file name of the variable -will be used as its variable name. -""") + /** + * Source link to the input variables. Each variable should be a csv file with two + * columns, `timestamp` and `value`. By default, the file name of the variable + * will be used as its variable name. + */ dataSource: string; dataSchema?: DataSchema; - @doc(""" -A required field, indicating the start time of training data. Should be -date-time. -""") + /** + * A required field, indicating the start time of training data. Should be + * date-time. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime: utcDateTime; - @doc("A required field, indicating the end time of training data. Should be date-time.") + /** + * A required field, indicating the end time of training data. Should be date-time. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime: utcDateTime; - @doc("An optional field. The name of the model whose maximum length is 24.") + /** + * An optional field. The name of the model whose maximum length is 24. + */ @maxLength(24) displayName?: string; - @doc(""" -An optional field, indicating how many previous points will be used to compute -the anomaly score of the subsequent point. -""") + /** + * An optional field, indicating how many previous points will be used to compute + * the anomaly score of the subsequent point. + */ slidingWindow?: int32; - @doc("An optional field, indicating the manner to align multiple variables.") + /** + * An optional field, indicating the manner to align multiple variables. + */ alignPolicy?: AlignPolicy; - @doc("Model status. One of CREATED, RUNNING, READY, and FAILED.") + /** + * Model status. One of CREATED, RUNNING, READY, and FAILED. + */ status?: ModelStatus; - @doc("Error messages when failed to create a model.") + /** + * Error messages when failed to create a model. + */ errors?: ErrorResponse[]; - @doc("Diagnostics Information for inspecting model/variable states.") + /** + * Diagnostics Information for inspecting model/variable states. + */ diagnosticsInfo?: DiagnosticsInfo; } -@doc("An optional field, indicating the manner to align multiple variables.") +/** + * An optional field, indicating the manner to align multiple variables. + */ model AlignPolicy { - @doc(""" -An optional field, indicating how we align different variables to the same -time-range. Either Inner or Outer. -""") + /** + * An optional field, indicating how we align different variables to the same + * time-range. Either Inner or Outer. + */ alignMode?: AlignMode; - @doc(""" -An optional field, indicating how missing values will be filled. One of -Previous, Subsequent, Linear, Zero, Fixed, and NotFill. Cannot be set to -NotFill, when the alignMode is Outer. -""") + /** + * An optional field, indicating how missing values will be filled. One of + * Previous, Subsequent, Linear, Zero, Fixed, and NotFill. Cannot be set to + * NotFill, when the alignMode is Outer. + */ fillNAMethod?: FillNAMethod; - @doc("An optional field. Required when fillNAMethod is Fixed.") + /** + * An optional field. Required when fillNAMethod is Fixed. + */ paddingValue?: float32; } -@doc("Diagnostics Information for inspecting model/variable states.") +/** + * Diagnostics Information for inspecting model/variable states. + */ model DiagnosticsInfo { modelState?: ModelState; variableStates?: VariableState[]; } model ModelState { - @doc("Epoch id") + /** + * Epoch id + */ epochIds?: int32[]; trainLosses?: float32[]; @@ -572,87 +672,125 @@ model ModelState { latenciesInSeconds?: float32[]; } -@doc("Response of listing models.") +/** + * Response of listing models. + */ @pagedResult model ModelList { - @doc("List of models") + /** + * List of models + */ @items models: ModelSnapshot[]; - @doc("Current count of trained multivariate models.") + /** + * Current count of trained multivariate models. + */ currentCount: int32; - @doc("Max number of models that can be trained for this subscription.") + /** + * Max number of models that can be trained for this subscription. + */ maxCount: int32; - @doc("The link to fetch more models.") + /** + * The link to fetch more models. + */ @nextLink nextLink?: string; } @resource("multivariate/models") model ModelSnapshot { - @doc("Model identifier.") + /** + * Model identifier. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key modelId: string; - @doc("Date and time (UTC) when the model was created.") + /** + * Date and time (UTC) when the model was created. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdTime: utcDateTime; - @doc("Date and time (UTC) when the model was last updated.") + /** + * Date and time (UTC) when the model was last updated. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdatedTime: utcDateTime; - @doc("Model status. One of CREATED, RUNNING, READY, and FAILED.") + /** + * Model status. One of CREATED, RUNNING, READY, and FAILED. + */ status: ModelStatus; displayName?: string; - @doc("Total number of variables.") + /** + * Total number of variables. + */ variablesCount: int32; } -@doc("Response of getting a model.") +/** + * Response of getting a model. + */ @resource("multivariate/models/{modelId}") model Model { - @doc("Model identifier.") + /** + * Model identifier. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key modelId: string; - @doc("Date and time (UTC) when the model was created.") + /** + * Date and time (UTC) when the model was created. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdTime: utcDateTime; - @doc("Date and time (UTC) when the model was last updated.") + /** + * Date and time (UTC) when the model was last updated. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdatedTime: utcDateTime; - @doc(""" -Training result of a model including its status, errors and diagnostics -information. -""") + /** + * Training result of a model including its status, errors and diagnostics + * information. + */ modelInfo?: ModelInfo; } model LastDetectionRequest { - @doc("variables") + /** + * variables + */ variables: VariableValues[]; - @doc("Top contributor count.") + /** + * Top contributor count. + */ topContributorCount: int32; } model VariableValues { - @doc("variable name") + /** + * variable name + */ name: string; - @doc("timestamps") + /** + * timestamps + */ timestamps: string[]; - @doc("values") + /** + * values + */ values: float32[]; } diff --git a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/routes.tsp index 7901ecf7a8..bcffe49606 100644 --- a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/routes.tsp @@ -7,137 +7,159 @@ using TypeSpec.Http; namespace AnomalyDetectorClient; +/** + * This operation generates a model with an entire series, each point is detected + * with the same model. With this method, points before and after a certain point + * are used to determine whether it is an anomaly. The entire detection can give + * user an overall status of the time series. + */ @summary("Detect anomalies for the entire series in batch.") -@doc(""" -This operation generates a model with an entire series, each point is detected -with the same model. With this method, points before and after a certain point -are used to determine whether it is an anomaly. The entire detection can give -user an overall status of the time series. -""") @route("/timeseries/entire/detect") @post -op DetectEntireSeries is Azure.Core.Foundations.Operation< +op detectEntireSeries is Azure.Core.Foundations.Operation< DetectRequest, EntireDetectResponse >; +/** + * This operation generates a model using points before the latest one. With this + * method, only historical points are used to determine whether the target point + * is an anomaly. The latest point detecting operation matches the scenario of + * real-time monitoring of business metrics. + */ @summary("Detect anomaly status of the latest point in time series.") -@doc(""" -This operation generates a model using points before the latest one. With this -method, only historical points are used to determine whether the target point -is an anomaly. The latest point detecting operation matches the scenario of -real-time monitoring of business metrics. -""") @route("/timeseries/last/detect") @post -op DetectLastPoint is Azure.Core.Foundations.Operation< +op detectLastPoint is Azure.Core.Foundations.Operation< DetectRequest, LastDetectResponse >; +/** + * Evaluate change point score of every series point + */ @summary("Detect change point for the entire series") -@doc("Evaluate change point score of every series point") @route("/timeseries/changepoint/detect") @post -op DetectChangePoint is Azure.Core.Foundations.Operation< +op detectChangePoint is Azure.Core.Foundations.Operation< ChangePointDetectRequest, ChangePointDetectResponse >; +/** + * Get multivariate anomaly detection result based on resultId returned by the + * DetectAnomalyAsync api + */ @summary("Get Multivariate Anomaly Detection Result") -@doc(""" -Get multivariate anomaly detection result based on resultId returned by the -DetectAnomalyAsync api -""") -op GetDetectionResult is Azure.Core.ResourceRead; +op getDetectionResult is Azure.Core.ResourceRead; +/** + * Create and train a multivariate anomaly detection model. The request must + * include a source parameter to indicate an externally accessible Azure storage + * Uri (preferably a Shared Access Signature Uri). All time-series used in + * generate the model must be zipped into one single file. Each time-series will + * be in a single CSV file in which the first column is timestamp and the second + * column is value. + */ @summary("Train a Multivariate Anomaly Detection Model") -@doc(""" -Create and train a multivariate anomaly detection model. The request must -include a source parameter to indicate an externally accessible Azure storage -Uri (preferably a Shared Access Signature Uri). All time-series used in -generate the model must be zipped into one single file. Each time-series will -be in a single CSV file in which the first column is timestamp and the second -column is value. -""") @route("/multivariate/models") @post -op TrainMultivariateModel is Azure.Core.Foundations.Operation; +op trainMultivariateModel is Azure.Core.Foundations.Operation; +/** + * List models of a subscription + */ @summary("List Multivariate Models") -@doc("List models of a subscription") -op ListMultivariateModel is Azure.Core.ResourceList< +op listMultivariateModel is Azure.Core.ResourceList< ModelSnapshot, { parameters: { - @doc("$skip indicates how many models will be skipped.") + /** + * $skip indicates how many models will be skipped. + */ @query("$skip") $skip?: int32; - @doc("$top indicates how many models will be fetched.") + /** + * $top indicates how many models will be fetched. + */ @query("$top") $top?: int32 = 10; }; } >; +/** + * Delete an existing multivariate model according to the modelId + */ @summary("Delete Multivariate Model") -@doc("Delete an existing multivariate model according to the modelId") @route("/multivariate/models/{modelId}") @delete -op DeleteMultivariateModel is Azure.Core.Foundations.Operation< +op deleteMultivariateModel is Azure.Core.Foundations.Operation< { - @doc("Model identifier") + /** + * Model identifier + */ @path modelId: string; }, void >; +/** + * Get detailed information of multivariate model, including the training status + * and variables used in the model. + */ @summary("Get Multivariate Model") -@doc(""" -Get detailed information of multivariate model, including the training status -and variables used in the model. -""") -op GetMultivariateModel is Azure.Core.ResourceRead; +op getMultivariateModel is Azure.Core.ResourceRead; +/** + * Submit detection multivariate anomaly task with the trained model of modelId, + * the input schema should be the same with the training request. Thus request + * will be complete asynchronously and will return a resultId for querying the + * detection result.The request should be a source link to indicate an externally + * accessible Azure storage Uri (preferably a Shared Access Signature Uri). All + * time-series used in generate the model must be zipped into one single file. + * Each time-series will be as follows: the first column is timestamp and the + * second column is value. + */ @summary("Detect Multivariate Anomaly") -@doc(""" -Submit detection multivariate anomaly task with the trained model of modelId, -the input schema should be the same with the training request. Thus request -will be complete asynchronously and will return a resultId for querying the -detection result.The request should be a source link to indicate an externally -accessible Azure storage Uri (preferably a Shared Access Signature Uri). All -time-series used in generate the model must be zipped into one single file. -Each time-series will be as follows: the first column is timestamp and the -second column is value. -""") @route("/multivariate/models/{modelId}/entire/detect") @post -op DetectAnomaly is Azure.Core.Foundations.Operation< +op detectAnomaly is Azure.Core.Foundations.Operation< { - @doc("Model identifier") + /** + * Model identifier + */ @path modelId: string; - @doc("Detect anomaly request") + /** + * Detect anomaly request + */ @body body: DetectionRequest; }, void >; +/** + * Synchronized API for anomaly detection. + */ @summary("Detect anomalies in the last a few points of the request body") -@doc("Synchronized API for anomaly detection.") @route("/multivariate/models/{modelId}/last/detect") @post -op LastDetectAnomaly is Azure.Core.Foundations.Operation< +op lastDetectAnomaly is Azure.Core.Foundations.Operation< { - @doc("Model identifier") + /** + * Model identifier + */ @path modelId: string; - @doc("Request for last detection") + /** + * Request for last detection + */ @body body: LastDetectionRequest; }, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp index 76cbe90644..8ff2e717b1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; -@doc("DataConnector Model.") +/** + * DataConnector Model. + */ @parentResource(DataManagerForAgriculture) model DataConnector is ProxyResource { - @doc("Connector name.") + /** + * Connector name. + */ @maxLength(63) @minLength(1) @path @@ -28,33 +32,57 @@ model DataConnector is ProxyResource { @armResourceOperations interface DataConnectors { - @doc("Get specific Data Connector resource by DataConnectorName.") + /** + * Get specific Data Connector resource by DataConnectorName. + */ get is ArmResourceRead; - @doc("Create or update Data Connector For MADMA resource.") + /** + * Create or update Data Connector For MADMA resource. + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Delete a Data Connectors with given dataConnector name.") + /** + * Delete a Data Connectors with given dataConnector name. + */ delete is ArmResourceDeleteSync; - @doc("Lists the Data Connector Credentials for MADMA instance.") + /** + * Lists the Data Connector Credentials for MADMA instance. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DataConnectors_List") list is ArmResourceListByParent< DataConnector, { ...BaseParameters; - @doc(""" -Maximum number of items needed (inclusive). + /** +* Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50. -""") +*/ @maxValue(1000) @minValue(10) @query("$maxPageSize") $maxPageSize?: int32 = 50; - @doc("Continuation token for getting next set of results.") + /** + * Continuation token for getting next set of results. + */ @query("$skipToken") $skipToken?: string; } >; } + +@@projectedName(DataConnectors.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(DataConnectors.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(DataConnectors.createOrUpdate::parameters.resource, + "Body must be valid DataConnector request." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp index abd3f03cdb..f05a57117a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; -@doc("Data Manager For Agriculture ARM Resource.") +/** + * Data Manager For Agriculture ARM Resource. + */ model DataManagerForAgriculture is TrackedResource { - @doc("DataManagerForAgriculture resource name.") + /** + * DataManagerForAgriculture resource name. + */ @maxLength(63) @minLength(1) @pattern("^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$") @@ -28,18 +32,25 @@ model DataManagerForAgriculture @armResourceOperations interface DataManagerForAgricultures { + /** + * Get DataManagerForAgriculture resource. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get DataManagerForAgriculture resource.") @operationId("DataManagerForAgricultureResources_Get") get is ArmResourceRead; + /** + * Create or update Data Manager For Agriculture resource. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or update Data Manager For Agriculture resource.") @operationId("DataManagerForAgricultureResources_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync; + /** + * Update a Data Manager For Agriculture resource. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update a Data Manager For Agriculture resource.") + @parameterVisibility("read") @operationId("DataManagerForAgricultureResources_Update") update is ArmCustomPatchAsync< DataManagerForAgriculture, @@ -48,36 +59,67 @@ interface DataManagerForAgricultures { ArmLroLocationHeader >; + /** + * Delete a Data Manager For Agriculture resource. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete a Data Manager For Agriculture resource.") @operationId("DataManagerForAgricultureResources_Delete") delete is ArmResourceDeleteSync; + /** + * Lists the DataManagerForAgriculture instances for a resource group. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists the DataManagerForAgriculture instances for a resource group.") @operationId("DataManagerForAgricultureResources_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent< DataManagerForAgriculture, { ...BaseParameters; - @doc(""" -Maximum number of items needed (inclusive). + /** +* Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50. -""") +*/ @maxValue(1000) @minValue(10) @query("$maxPageSize") $maxPageSize?: int32 = 50; - @doc("Continuation token for getting next set of results.") + /** + * Continuation token for getting next set of results. + */ @query("$skipToken") $skipToken?: string; } >; + /** + * Lists the DataManagerForAgriculture instances for a subscription. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists the DataManagerForAgriculture instances for a subscription.") @operationId("DataManagerForAgricultureResources_ListBySubscription") listBySubscription is ArmListBySubscription; } + +@@projectedName(DataManagerForAgricultures.createOrUpdate::parameters.resource, + "json", + "request" +); +@@extension(DataManagerForAgricultures.createOrUpdate::parameters.resource, + "x-ms-client-name", + "request" +); +@@doc(DataManagerForAgricultures.createOrUpdate::parameters.resource, + "Data Manager For Agriculture resource create or update request object." +); +@@projectedName(DataManagerForAgricultures.update::parameters.properties, + "json", + "request" +); +@@extension(DataManagerForAgricultures.update::parameters.properties, + "x-ms-client-name", + "request" +); +@@doc(DataManagerForAgricultures.update::parameters.properties, + "Request object." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp index c6ef7952a9..42d7a79494 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp @@ -11,11 +11,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; -@doc("DataManagerForAgriculture extension resource.") +/** + * DataManagerForAgriculture extension resource. + */ @tenantResource model DataManagerForAgricultureExtension is ProxyResource { - @doc("dataManagerForAgricultureExtensionId to be queried.") + /** + * dataManagerForAgricultureExtensionId to be queried. + */ @pattern("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$") @path @key("dataManagerForAgricultureExtensionId") @@ -25,47 +29,61 @@ model DataManagerForAgricultureExtension @armResourceOperations interface DataManagerForAgricultureExtensions { - @doc("Get Data Manager For Agriculture extension.") + /** + * Get Data Manager For Agriculture extension. + */ get is ArmResourceRead; - @doc("Get list of Data Manager For Agriculture extension.") + /** + * Get list of Data Manager For Agriculture extension. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DataManagerForAgricultureExtensions_List") list is ArmResourceListByParent< DataManagerForAgricultureExtension, { ...BaseParameters; - @doc("DataManagerForAgricultureExtension ids.") + /** + * DataManagerForAgricultureExtension ids. + */ @query({ name: "farmBeatsExtensionIds", format: "multi", }) farmBeatsExtensionIds?: string[]; - @doc("DataManagerForAgriculture extension names.") + /** + * DataManagerForAgriculture extension names. + */ @query({ name: "farmBeatsExtensionNames", format: "multi", }) farmBeatsExtensionNames?: string[]; - @doc("Extension categories.") + /** + * Extension categories. + */ @query({ name: "extensionCategories", format: "multi", }) extensionCategories?: string[]; - @doc("Publisher ids.") + /** + * Publisher ids. + */ @query({ name: "publisherIds", format: "multi", }) publisherIds?: string[]; - @doc(""" -Maximum number of items needed (inclusive). + /** +* Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50. -""") +*/ @maxValue(1000) @minValue(10) @query("$maxPageSize") diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp index 9a172339e3..3b76a1856a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp @@ -11,11 +11,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; -@doc("DataManagerForAgriculture solution resource.") +/** + * DataManagerForAgriculture solution resource. + */ @tenantResource model DataManagerForAgricultureSolution is ProxyResource { - @doc("dataManagerForAgricultureSolutionId to be queried.") + /** + * dataManagerForAgricultureSolutionId to be queried. + */ @pattern("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$") @path @key("dataManagerForAgricultureSolutionId") @@ -25,37 +29,45 @@ model DataManagerForAgricultureSolution @armResourceOperations interface DataManagerForAgricultureSolutions { + /** + * Get Data Manager For Agriculture solution by id. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get Data Manager For Agriculture solution by id.") @operationId("SolutionsDiscoverability_Get") get is ArmResourceRead; + /** + * Get list of Data Manager For Agriculture solutions. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get list of Data Manager For Agriculture solutions.") @operationId("SolutionsDiscoverability_List") list is ArmResourceListByParent< DataManagerForAgricultureSolution, { ...BaseParameters; - @doc("Ids of Data Manager For Agriculture Solutions which the customer requests to fetch.") + /** + * Ids of Data Manager For Agriculture Solutions which the customer requests to fetch. + */ @query({ name: "farmBeatsSolutionIds", format: "multi", }) farmBeatsSolutionIds?: string[]; - @doc("Names of Data Manager For Agriculture Solutions which the customer requests to fetch.") + /** + * Names of Data Manager For Agriculture Solutions which the customer requests to fetch. + */ @query({ name: "farmBeatsSolutionNames", format: "multi", }) farmBeatsSolutionNames?: string[]; - @doc(""" -Maximum number of items needed (inclusive). + /** +* Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50. -""") +*/ @maxValue(1000) @minValue(10) @query("$maxPageSize") diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp index d9f39be6d2..a7907185e8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; -@doc("Extension resource.") +/** + * Extension resource. + */ @parentResource(DataManagerForAgriculture) model Extension is ProxyResource { - @doc("Id of extension resource.") + /** + * Id of extension resource. + */ @path @key("extensionId") @segment("extensions") @@ -26,47 +30,75 @@ model Extension is ProxyResource { @armResourceOperations interface Extensions { - @doc("Get installed extension details by extension id.") + /** + * Get installed extension details by extension id. + */ get is ArmResourceRead; - @doc("Install or Update extension. Additional Api Properties are merged patch and if the extension is updated to a new version then the obsolete entries will be auto deleted from Additional Api Properties.") + /** + * Install or Update extension. Additional Api Properties are merged patch and if the extension is updated to a new version then the obsolete entries will be auto deleted from Additional Api Properties. + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Uninstall extension.") + /** + * Uninstall extension. + */ delete is ArmResourceDeleteSync; - @doc("Get installed extensions details.") + /** + * Get installed extensions details. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Extensions_ListByDataManagerForAgriculture") listByDataManagerForAgriculture is ArmResourceListByParent< Extension, { ...BaseParameters; - @doc("Installed extension ids.") + /** + * Installed extension ids. + */ @query({ name: "extensionIds", format: "multi", }) extensionIds?: string[]; - @doc("Installed extension categories.") + /** + * Installed extension categories. + */ @query({ name: "extensionCategories", format: "multi", }) extensionCategories?: string[]; - @doc(""" -Maximum number of items needed (inclusive). + /** +* Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50. -""") +*/ @maxValue(1000) @minValue(10) @query("$maxPageSize") $maxPageSize?: int32 = 50; - @doc("Skip token for getting next set of results.") + /** + * Skip token for getting next set of results. + */ @query("$skipToken") $skipToken?: string; } >; } + +@@projectedName(Extensions.createOrUpdate::parameters.resource, + "json", + "requestBody" +); +@@extension(Extensions.createOrUpdate::parameters.resource, + "x-ms-client-name", + "requestBody" +); +@@doc(Extensions.createOrUpdate::parameters.resource, + "Extension resource request body." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp index 89d643e266..28d142cc81 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; -@doc("The private endpoint connection resource.") +/** + * The private endpoint connection resource. + */ @parentResource(DataManagerForAgriculture) model PrivateEndpointConnection is ProxyResource { - @doc("Private endpoint connection name.") + /** + * Private endpoint connection name. + */ @path @key("privateEndpointConnectionName") @segment("privateEndpointConnections") @@ -25,19 +29,41 @@ model PrivateEndpointConnection @armResourceOperations interface PrivateEndpointConnections { - @doc("Get Private endpoint connection object.") + /** + * Get Private endpoint connection object. + */ get is ArmResourceRead; - @doc("Approves or Rejects a Private endpoint connection request.") + /** + * Approves or Rejects a Private endpoint connection request. + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Delete Private endpoint connection request.") + /** + * Delete Private endpoint connection request. + */ delete is ArmResourceDeleteAsync< PrivateEndpointConnection, BaseParameters, ArmAsyncOperationHeader >; - @doc("Get list of Private endpoint connections.") + /** + * Get list of Private endpoint connections. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateEndpointConnections_ListByResource") listByResource is ArmResourceListByParent; } + +@@projectedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, + "json", + "request" +); +@@extension(PrivateEndpointConnections.createOrUpdate::parameters.resource, + "x-ms-client-name", + "request" +); +@@doc(PrivateEndpointConnections.createOrUpdate::parameters.resource, + "Request object." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp index 9c9211fde2..0eced48f09 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; -@doc("A private link resource.") +/** + * A private link resource. + */ @parentResource(DataManagerForAgriculture) model PrivateLinkResource is ProxyResource { - @doc("Sub resource name.") + /** + * Sub resource name. + */ @path @key("subResourceName") @segment("privateLinkResources") @@ -24,9 +28,15 @@ model PrivateLinkResource is ProxyResource { @armResourceOperations interface PrivateLinkResources { - @doc("Get Private link resource object.") + /** + * Get Private link resource object. + */ get is ArmResourceRead; - @doc("Get list of Private link resources.") + /** + * Get list of Private link resources. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateLinkResources_ListByResource") listByResource is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp index bf0fb800b7..80e24afe0a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; -@doc("Solution resource.") +/** + * Solution resource. + */ @parentResource(DataManagerForAgriculture) model Solution is ProxyResource { - @doc("SolutionId for Data Manager For Agriculture Resource.") + /** + * SolutionId for Data Manager For Agriculture Resource. + */ @pattern("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$") @path @key("solutionId") @@ -27,87 +31,127 @@ model Solution is ProxyResource { @armResourceOperations interface Solutions { - @doc("Get installed Solution details by Solution id.") + /** + * Get installed Solution details by Solution id. + */ get is ArmResourceRead; - @doc("Install Or Update Solution.") + /** + * Install Or Update Solution. + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Uninstall Solution.") + /** + * Uninstall Solution. + */ delete is ArmResourceDeleteSync; - @doc("Get installed Solutions details.") + /** + * Get installed Solutions details. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Solutions_List") list is ArmResourceListByParent< Solution, { ...BaseParameters; - @doc("Installed Solution ids.") + /** + * Installed Solution ids. + */ @query({ name: "solutionIds", format: "multi", }) solutionIds?: string[]; - @doc("Ids of the resource.") + /** + * Ids of the resource. + */ @query({ name: "ids", format: "multi", }) ids?: string[]; - @doc("Names of the resource.") + /** + * Names of the resource. + */ @query({ name: "names", format: "multi", }) names?: string[]; - @doc(""" -Filters on key-value pairs within the Properties object. -eg. \"{testKey} eq {testValue}\". -""") + /** +* Filters on key-value pairs within the Properties object. +eg. "{testKey} eq {testValue}". +*/ @query({ name: "propertyFilters", format: "multi", }) propertyFilters?: string[]; - @doc("Statuses of the resource.") + /** + * Statuses of the resource. + */ @query({ name: "statuses", format: "multi", }) statuses?: string[]; - @doc("Minimum creation date of resource (inclusive).") + /** + * Minimum creation date of resource (inclusive). + */ @query("minCreatedDateTime") minCreatedDateTime?: utcDateTime; - @doc("Maximum creation date of resource (inclusive).") + /** + * Maximum creation date of resource (inclusive). + */ @query("maxCreatedDateTime") maxCreatedDateTime?: utcDateTime; - @doc("Minimum last modified date of resource (inclusive).") + /** + * Minimum last modified date of resource (inclusive). + */ @query("minLastModifiedDateTime") minLastModifiedDateTime?: utcDateTime; - @doc("Maximum last modified date of resource (inclusive).") + /** + * Maximum last modified date of resource (inclusive). + */ @query("maxLastModifiedDateTime") maxLastModifiedDateTime?: utcDateTime; - @doc(""" -Maximum number of items needed (inclusive). + /** +* Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50. -""") +*/ @maxValue(1000) @minValue(10) @query("$maxPageSize") $maxPageSize?: int32 = 50; - @doc("Skip token for getting next set of results.") + /** + * Skip token for getting next set of results. + */ @query("$skipToken") $skipToken?: string; } >; } + +@@projectedName(Solutions.createOrUpdate::parameters.resource, + "json", + "requestBody" +); +@@extension(Solutions.createOrUpdate::parameters.resource, + "x-ms-client-name", + "requestBody" +); +@@doc(Solutions.createOrUpdate::parameters.resource, + "Solution resource request body." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp index f34178833a..b308e0123d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp @@ -19,19 +19,25 @@ using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; +/** + * APIs documentation for Microsoft Azure Data Manager for Agriculture Service. + */ @armProviderNamespace @service({ title: "Azure AgFoodPlatform RP Service", }) @versioned(Versions) @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v4) -@doc("APIs documentation for Microsoft Azure Data Manager for Agriculture Service.") namespace Azure.ResourceManager.AgFoodPlatform; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { + /** + * The 2023-06-01-preview API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2023-06-01-preview API version.") v2023_06_01_preview: "2023-06-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp index f926f486cf..bdc088890e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp @@ -11,27 +11,17 @@ namespace Azure.ResourceManager.AgFoodPlatform; interface Operations extends Azure.ResourceManager.Operations {} -@doc("The reason why the given name is not available.") -enum CheckNameAvailabilityReason { - Invalid, - AlreadyExists, -} - -@doc("Enum for different types of AuthCredentials supported.") +/** + * Enum for different types of AuthCredentials supported. + */ enum AuthCredentialsKind { OAuthClientCredentials, ApiKeyAuthCredentials, } -@doc("The type of identity that created the resource.") -enum CreatedByType { - User, - Application, - ManagedIdentity, - Key, -} - -@doc("Data Manager For Agriculture instance provisioning state.") +/** + * Data Manager For Agriculture instance provisioning state. + */ enum ProvisioningState { Creating, Updating, @@ -41,20 +31,26 @@ enum ProvisioningState { Running, } -@doc("Property to allow or block public traffic for an Azure Data Manager For Agriculture resource.") +/** + * Property to allow or block public traffic for an Azure Data Manager For Agriculture resource. + */ enum PublicNetworkAccess { Enabled, Disabled, } -@doc("The private endpoint connection status.") +/** + * The private endpoint connection status. + */ enum PrivateEndpointServiceConnectionStatus { Pending, Approved, Rejected, } -@doc("The current provisioning state.") +/** + * The current provisioning state. + */ enum PrivateEndpointConnectionProvisioningState { Succeeded, Creating, @@ -62,442 +58,646 @@ enum PrivateEndpointConnectionProvisioningState { Failed, } -@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") -enum Origin { - user, - system, - `user,system`, -} - -@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") -enum ActionType { - Internal, -} - -@doc("The check availability request body.") +/** + * The check availability request body. + */ model CheckNameAvailabilityRequest { - @doc("The name of the resource for which availability needs to be checked.") + /** + * The name of the resource for which availability needs to be checked. + */ name?: string; - @doc("The resource type.") + /** + * The resource type. + */ type?: string; } -@doc("The check availability result.") +/** + * The check availability result. + */ model CheckNameAvailabilityResponse { - @doc("Indicates if the resource name is available.") + /** + * Indicates if the resource name is available. + */ nameAvailable?: boolean; - @doc("The reason why the given name is not available.") + /** + * The reason why the given name is not available. + */ reason?: CheckNameAvailabilityReason; - @doc("Detailed reason why the given name is available.") + /** + * Detailed reason why the given name is available. + */ message?: string; } -@doc("DataConnector Properties.") +/** + * DataConnector Properties. + */ model DataConnectorProperties { - @doc("AuthCredentials abstract base class for Auth Purpose.") + /** + * AuthCredentials abstract base class for Auth Purpose. + */ credentials: AuthCredentials; } -@doc("AuthCredentials abstract base class for Auth Purpose.") +/** + * AuthCredentials abstract base class for Auth Purpose. + */ @discriminator("kind") model AuthCredentials {} -@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + */ model Resource { - @doc("Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\"") + /** + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + */ @visibility("read") id?: ResourceIdentifier; - @doc("The name of the resource") + /** + * The name of the resource + */ @visibility("read") name?: string; - @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + */ @visibility("read") type?: string; - @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ @visibility("read") systemData?: SystemData; } -@doc("DataManagerForAgricultureExtension properties.") +/** + * DataManagerForAgricultureExtension properties. + */ model DataManagerForAgricultureExtensionProperties { - @doc("Target ResourceType of the Data Manager For Agriculture Extension.") + /** + * Target ResourceType of the Data Manager For Agriculture Extension. + */ @visibility("read") targetResourceType?: string; - @doc("Data Manager For Agriculture Extension ID.") + /** + * Data Manager For Agriculture Extension ID. + */ @visibility("read") @maxLength(100) @minLength(2) @pattern("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$") farmBeatsExtensionId?: string; - @doc("Data Manager For Agriculture Extension name.") + /** + * Data Manager For Agriculture Extension name. + */ @visibility("read") @maxLength(100) @minLength(2) farmBeatsExtensionName?: string; - @doc("Data Manager For Agriculture Extension version.") + /** + * Data Manager For Agriculture Extension version. + */ @visibility("read") @maxLength(100) @minLength(2) @pattern("^([1-9]|10).\\d$") farmBeatsExtensionVersion?: string; - @doc("Publisher ID.") + /** + * Publisher ID. + */ @visibility("read") @maxLength(100) @minLength(2) publisherId?: string; - @doc("Textual description.") + /** + * Textual description. + */ @visibility("read") @maxLength(500) @minLength(2) description?: string; - @doc("Category of the extension. e.g. weather/sensor/satellite.") + /** + * Category of the extension. e.g. weather/sensor/satellite. + */ @visibility("read") @maxLength(100) @minLength(2) extensionCategory?: string; - @doc("Data Manager For Agriculture Extension auth link.") + /** + * Data Manager For Agriculture Extension auth link. + */ @visibility("read") extensionAuthLink?: string; - @doc("Data Manager For Agriculture Extension api docs link.") + /** + * Data Manager For Agriculture Extension api docs link. + */ @visibility("read") extensionApiDocsLink?: string; - @doc(""" -Detailed information which shows summary of requested data. + /** +* Detailed information which shows summary of requested data. Used in descriptive get extension metadata call. Information for weather category per api included are apisSupported, customParameters, PlatformParameters and Units supported. -""") +*/ @visibility("read") detailedInformation?: DetailedInformation[]; } -@doc("Model to capture detailed information for Data Manager For AgricultureExtensions.") +/** + * Model to capture detailed information for Data Manager For AgricultureExtensions. + */ model DetailedInformation { - @doc("ApiName available for the Data Manager For Agriculture Extension.") + /** + * ApiName available for the Data Manager For Agriculture Extension. + */ apiName?: string; - @doc("Extension provider's API documentation link.") + /** + * Extension provider's API documentation link. + */ apiDocsLink?: string; - @doc("Type of Api in Extension.") + /** + * Type of Api in Extension. + */ apiType?: string; - @doc("List of customParameters.") + /** + * List of customParameters. + */ customParameters?: string[]; - @doc("List of platformParameters.") + /** + * List of platformParameters. + */ platformParameters?: string[]; - @doc("List of defaultParameters.") + /** + * List of defaultParameters. + */ apiDefaultInputParameters?: string[]; - @doc("Unit systems info for the data provider.") + /** + * Unit systems info for the data provider. + */ unitsSupported?: UnitSystemsInfo; - @doc("List of apiInputParameters.") + /** + * List of apiInputParameters. + */ apiInputParameters?: string[]; } -@doc("Unit systems info for the data provider.") +/** + * Unit systems info for the data provider. + */ model UnitSystemsInfo { - @doc("UnitSystem key sent as part of ProviderInput.") + /** + * UnitSystem key sent as part of ProviderInput. + */ @maxLength(100) @minLength(1) key: string; - @doc("List of unit systems supported by this data provider.") + /** + * List of unit systems supported by this data provider. + */ values: string[]; } -@doc("Identity for the resource.") +/** + * Identity for the resource. + */ model Identity { - @doc("The principal ID of resource identity. The value must be an UUID.") + /** + * The principal ID of resource identity. The value must be an UUID. + */ @visibility("read") principalId?: string; - @doc("The tenant ID of resource. The value must be an UUID.") + /** + * The tenant ID of resource. The value must be an UUID. + */ @visibility("read") tenantId?: string; - @doc("The identity type.") + /** + * The identity type. + */ type?: "SystemAssigned"; } -@doc("Data Manager For Agriculture ARM Resource properties.") +/** + * Data Manager For Agriculture ARM Resource properties. + */ model DataManagerForAgricultureProperties { - @doc("Uri of the Data Manager For Agriculture instance.") + /** + * Uri of the Data Manager For Agriculture instance. + */ @visibility("read") - instanceUri?: string; + instanceUri?: url; - @doc("Data Manager For Agriculture instance provisioning state.") + /** + * Data Manager For Agriculture instance provisioning state. + */ @visibility("read") provisioningState?: ProvisioningState; - @doc("Sensor integration request model.") + /** + * Sensor integration request model. + */ sensorIntegration?: SensorIntegration; - @doc("Property to allow or block public traffic for an Azure Data Manager For Agriculture resource.") + /** + * Property to allow or block public traffic for an Azure Data Manager For Agriculture resource. + */ publicNetworkAccess?: PublicNetworkAccess; - @doc("Private endpoints.") + /** + * Private endpoints. + */ @visibility("read") privateEndpointConnections?: PrivateEndpointConnection[]; } -@doc("Sensor integration request model.") +/** + * Sensor integration request model. + */ model SensorIntegration { - @doc("Sensor integration enable state.") + /** + * Sensor integration enable state. + */ enabled?: string; - @doc("Sensor integration instance provisioning state.") + /** + * Sensor integration instance provisioning state. + */ @visibility("read") provisioningState?: ProvisioningState; - @doc("Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).") + /** + * Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + */ provisioningInfo?: ErrorResponse; } -@doc("Properties of the private endpoint connection.") +/** + * Properties of the private endpoint connection. + */ model PrivateEndpointConnectionProperties { - @doc("The group ids for the private endpoint resource.") + /** + * The group ids for the private endpoint resource. + */ @visibility("read") groupIds?: string[]; - @doc("The private endpoint resource.") + /** + * The private endpoint resource. + */ privateEndpoint?: PrivateEndpoint; - @doc("A collection of information about the state of the connection between service consumer and provider.") + /** + * A collection of information about the state of the connection between service consumer and provider. + */ privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; - @doc("The provisioning state of the private endpoint connection resource.") + /** + * The provisioning state of the private endpoint connection resource. + */ @visibility("read") provisioningState?: PrivateEndpointConnectionProvisioningState; } -@doc("The private endpoint resource.") +/** + * The private endpoint resource. + */ model PrivateEndpoint { - @doc("The ARM identifier for private endpoint.") + /** + * The ARM identifier for private endpoint. + */ @visibility("read") id?: string; } -@doc("A collection of information about the state of the connection between service consumer and provider.") +/** + * A collection of information about the state of the connection between service consumer and provider. + */ model PrivateLinkServiceConnectionState { - @doc("Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.") + /** + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + */ status?: PrivateEndpointServiceConnectionStatus; - @doc("The reason for approval/rejection of the connection.") + /** + * The reason for approval/rejection of the connection. + */ description?: string; - @doc("A message indicating if changes on the service provider require any updates on the consumer.") + /** + * A message indicating if changes on the service provider require any updates on the consumer. + */ actionsRequired?: string; } -@doc("DataManagerForAgriculture update request.") +/** + * DataManagerForAgriculture update request. + */ model DataManagerForAgricultureUpdateRequestModel { - @doc("Geo-location where the resource lives.") + /** + * Geo-location where the resource lives. + */ location?: string; - @doc("Identity for the resource.") + /** + * Identity for the resource. + */ identity?: Identity; - @doc("Data Manager For Agriculture ARM Resource properties.") + /** + * Data Manager For Agriculture ARM Resource properties. + */ properties?: DataManagerForAgricultureUpdateProperties; - @doc("Resource tags.") + /** + * Resource tags. + */ tags?: Record; } -@doc("Data Manager For Agriculture ARM Resource properties.") +/** + * Data Manager For Agriculture ARM Resource properties. + */ model DataManagerForAgricultureUpdateProperties { - @doc("Sensor integration request model.") + /** + * Sensor integration request model. + */ sensorIntegration?: SensorIntegration; - @doc("Property to allow or block public traffic for an Azure Data Manager For Agriculture resource.") + /** + * Property to allow or block public traffic for an Azure Data Manager For Agriculture resource. + */ publicNetworkAccess?: PublicNetworkAccess; } -@doc(""" -Arm async operation class. +/** +* Arm async operation class. Ref: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/async-operations. -""") +*/ model ArmAsyncOperation { - @doc("Status of the async operation.") + /** + * Status of the async operation. + */ status?: string; - @doc(""" -Arm async operation error class. + /** +* Arm async operation error class. Ref: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#azure-asyncoperation-resource-format. -""") +*/ error?: ArmAsyncOperationError; } -@doc(""" -Arm async operation error class. +/** +* Arm async operation error class. Ref: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#azure-asyncoperation-resource-format. -""") +*/ model ArmAsyncOperationError { - @doc("Status of the async operation.") + /** + * Status of the async operation. + */ code?: string; - @doc("Status of the async operation.") + /** + * Status of the async operation. + */ message?: string; } -@doc("Extension Installation Request Body.") +/** + * Extension Installation Request Body. + */ model ExtensionInstallationRequest { - @doc("Extension Version.") + /** + * Extension Version. + */ @maxLength(10) @minLength(3) extensionVersion?: string; - @doc("Additional Api Properties.") + /** + * Additional Api Properties. + */ additionalApiProperties?: Record; } -@doc("Api properties.") +/** + * Api properties. + */ model ApiProperties { - @doc("Interval in minutes for which the weather data for the api needs to be refreshed.") + /** + * Interval in minutes for which the weather data for the api needs to be refreshed. + */ @maxValue(10080) apiFreshnessTimeInMinutes?: int32; } -@doc("Extension resource properties.") +/** + * Extension resource properties. + */ model ExtensionProperties { - @doc("Extension Id.") + /** + * Extension Id. + */ @visibility("read") @pattern("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$") extensionId?: string; - @doc("Extension category. e.g. weather/sensor/satellite.") + /** + * Extension category. e.g. weather/sensor/satellite. + */ @visibility("read") extensionCategory?: string; - @doc("Installed extension version.") + /** + * Installed extension version. + */ @visibility("read") @pattern("^([1-9]|10).\\d$") installedExtensionVersion?: string; - @doc("Extension auth link.") + /** + * Extension auth link. + */ @visibility("read") extensionAuthLink?: string; - @doc("Extension api docs link.") + /** + * Extension api docs link. + */ @visibility("read") extensionApiDocsLink?: string; - @doc("Additional Api Properties.") + /** + * Additional Api Properties. + */ @visibility("read") additionalApiProperties?: Record; } -@doc("Properties of a private link resource.") +/** + * Properties of a private link resource. + */ model PrivateLinkResourceProperties { - @doc("The private link resource group id.") + /** + * The private link resource group id. + */ @visibility("read") groupId?: string; - @doc("The private link resource required member names.") + /** + * The private link resource required member names. + */ @visibility("read") requiredMembers?: string[]; - @doc("The private link resource private link DNS zone name.") + /** + * The private link resource private link DNS zone name. + */ requiredZoneNames?: string[]; } -@doc("Solution resource properties.") +/** + * Solution resource properties. + */ model SolutionProperties extends Record { - @doc("Partner Id of the Solution.") + /** + * Partner Id of the Solution. + */ @visibility("read") partnerId?: string; - @doc("SaaS subscriptionId of the installed SaaS application.") + /** + * SaaS subscriptionId of the installed SaaS application. + */ @minLength(1) saasSubscriptionId: string; - @doc("SaaS subscription name of the installed SaaS application.") + /** + * SaaS subscription name of the installed SaaS application. + */ @minLength(1) saasSubscriptionName: string; - @doc("SaaS application Marketplace Publisher Id.") + /** + * SaaS application Marketplace Publisher Id. + */ @minLength(1) marketplacePublisherId: string; - @doc("SaaS application Plan Id.") + /** + * SaaS application Plan Id. + */ @minLength(1) planId: string; - @doc("Role Assignment Id.") + /** + * Role Assignment Id. + */ roleAssignmentId?: string; - @doc("SaaS application Offer Id.") + /** + * SaaS application Offer Id. + */ @minLength(1) offerId: string; - @doc("SaaS application Term Id.") + /** + * SaaS application Term Id. + */ @minLength(1) termId: string; } -@doc("DataManagerForAgricultureSolution properties.") +/** + * DataManagerForAgricultureSolution properties. + */ model DataManagerForAgricultureSolutionProperties { - @doc("Solution Partner Id.") + /** + * Solution Partner Id. + */ @visibility("read") partnerId?: string; - @doc("Solution Partner Tenant Id.") + /** + * Solution Partner Tenant Id. + */ @visibility("read") partnerTenantId?: string; - @doc(""" -Gets scope of the Data manager For Agriculture data access that's required for processing solution request to partner. + /** +* Gets scope of the Data manager For Agriculture data access that's required for processing solution request to partner. Example: For gdd they might need weatherScope and satelliteScope. -""") +*/ @visibility("read") dataAccessScopes?: string[]; marketplaceOfferDetails?: MarketplaceOfferDetails; - @doc("Gets api-version Swagger Document Dictionary to capture all api-versions of swagger exposed by partner to Data Manager For Agriculture.") + /** + * Gets api-version Swagger Document Dictionary to capture all api-versions of swagger exposed by partner to Data Manager For Agriculture. + */ @visibility("read") openApiSpecsDictionary?: Record; - @doc("Application id of the multi tenant application to be used by partner to access Data Manager For Agriculture data.") + /** + * Application id of the multi tenant application to be used by partner to access Data Manager For Agriculture data. + */ @visibility("read") accessFBApplicationId?: string; - @doc("Application id of the SaaS multi tenant application.") + /** + * Application id of the SaaS multi tenant application. + */ @visibility("read") saaSApplicationId?: string; - @doc("List of ActionIds needed to make the SaaS multi tenant application access relevant fb data.") + /** + * List of ActionIds needed to make the SaaS multi tenant application access relevant fb data. + */ @visibility("read") actionIds?: string[]; - @doc("Role Id of the SaaS multi tenant application to access relevant fb data.") + /** + * Role Id of the SaaS multi tenant application to access relevant fb data. + */ @visibility("read") roleId?: string; - @doc("Role Name of the SaaS multi tenant application to access relevant fb data.") + /** + * Role Name of the SaaS multi tenant application to access relevant fb data. + */ @visibility("read") roleName?: string; - @doc("Application name of the multi tenant application to be used by partner to access Data Manager For Agriculture Data.") + /** + * Application name of the multi tenant application to be used by partner to access Data Manager For Agriculture Data. + */ @visibility("read") accessFBApplicationName?: string; } @@ -507,39 +707,61 @@ model MarketplaceOfferDetails { publisherId?: string; } -@doc("ApiKeyAuthCredentials class for ApiKey based Auth.") +/** + * ApiKeyAuthCredentials class for ApiKey based Auth. + */ model ApiKeyAuthCredentials extends AuthCredentials { - @doc("Properties of the key vault.") + /** + * Properties of the key vault. + */ apiKey: KeyVaultProperties; - @doc("Enum for different types of AuthCredentials supported.") + /** + * Enum for different types of AuthCredentials supported. + */ kind: "ApiKeyAuthCredentials"; } -@doc("Properties of the key vault.") +/** + * Properties of the key vault. + */ model KeyVaultProperties { - @doc("Uri of the key vault.") + /** + * Uri of the key vault. + */ @minLength(1) keyVaultUri: string; - @doc("Name of Key Vault key.") + /** + * Name of Key Vault key. + */ @minLength(1) keyName: string; - @doc("Version of Key Vault key.") + /** + * Version of Key Vault key. + */ @minLength(1) keyVersion: string; } -@doc("OAuthClientCredentials for clientId clientSecret auth.") +/** + * OAuthClientCredentials for clientId clientSecret auth. + */ model OAuthClientCredentials extends AuthCredentials { - @doc("ClientId associated with the provider.") + /** + * ClientId associated with the provider. + */ @minLength(1) clientId: string; - @doc("Properties of the key vault.") + /** + * Properties of the key vault. + */ clientSecret: KeyVaultProperties; - @doc("Enum for different types of AuthCredentials supported.") + /** + * Enum for different types of AuthCredentials supported. + */ kind: "OAuthClientCredentials"; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp index 91430509ee..c28523d006 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp @@ -10,16 +10,22 @@ using Azure.ResourceManager; namespace Azure.ResourceManager.AgFoodPlatform; interface CheckNameAvailabilityOperations { - @doc("Checks the name availability of the resource with requested resource name.") + /** + * Checks the name availability of the resource with requested resource name. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/checkNameAvailability") @post - CheckNameAvailability is Azure.Core.Foundations.Operation< + checkNameAvailability is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription. The value must be an UUID.") + /** + * The ID of the target subscription. The value must be an UUID. + */ @path subscriptionId: string; - @doc("NameAvailabilityRequest object.") + /** + * NameAvailabilityRequest object. + */ @body nameAvailabilityRequest: CheckNameAvailabilityRequest; }, @@ -28,20 +34,28 @@ interface CheckNameAvailabilityOperations { } interface OperationResultsOperations { - @doc("Get operationResults for a Data Manager For Agriculture resource.") + /** + * Get operationResults for a Data Manager For Agriculture resource. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/locations/{locations}/operationResults/{operationResultsId}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription. The value must be an UUID.") + /** + * The ID of the target subscription. The value must be an UUID. + */ @path subscriptionId: string; - @doc("Location.") + /** + * Location. + */ @path locations: string; - @doc("operationResultsId for a specific location.") + /** + * operationResultsId for a specific location. + */ @path operationResultsId: string; }, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/tspconfig.yaml index 9bc9c6f491..93e9820d7f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/tspconfig.yaml @@ -2,6 +2,7 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/agfood.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp index f09aa67b5b..da6ee6d304 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AlertsManagement; -@doc("An alert created in alert management service.") +/** + * An alert created in alert management service. + */ @subscriptionResource model Alert is ProxyResource { - @doc("Unique ID of an alert instance.") + /** + * Unique ID of an alert instance. + */ @path @key("alertId") @segment("alerts") @@ -23,86 +27,128 @@ model Alert is ProxyResource { @armResourceOperations interface Alerts { - @doc("Get information related to a specific alert") + /** + * Get information related to a specific alert + */ getById is ArmResourceRead; - @doc("List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime. ") + /** + * List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Alerts_GetAll") getAll is ArmResourceListByParent< Alert, { ...BaseParameters; - @doc("Filter by target resource( which is full ARM ID) Default value is select all.") + /** + * Filter by target resource( which is full ARM ID) Default value is select all. + */ @query("targetResource") targetResource?: string; - @doc("Filter by target resource type. Default value is select all.") + /** + * Filter by target resource type. Default value is select all. + */ @query("targetResourceType") targetResourceType?: string; - @doc("Filter by target resource group name. Default value is select all.") + /** + * Filter by target resource group name. Default value is select all. + */ @query("targetResourceGroup") targetResourceGroup?: string; - @doc("Filter by monitor service which generates the alert instance. Default value is select all.") + /** + * Filter by monitor service which generates the alert instance. Default value is select all. + */ @query("monitorService") monitorService?: MonitorService; - @doc("Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.") + /** + * Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all. + */ @query("monitorCondition") monitorCondition?: MonitorCondition; - @doc("Filter by severity. Default value is select all.") + /** + * Filter by severity. Default value is select all. + */ @query("severity") severity?: Severity; - @doc("Filter by state of the alert instance. Default value is to select all.") + /** + * Filter by state of the alert instance. Default value is to select all. + */ @query("alertState") alertState?: AlertState; - @doc("Filter by specific alert rule. Default value is to select all.") + /** + * Filter by specific alert rule. Default value is to select all. + */ @query("alertRule") alertRule?: string; - @doc("Filter the alerts list by the Smart Group Id. Default value is none.") + /** + * Filter the alerts list by the Smart Group Id. Default value is none. + */ @query("smartGroupId") smartGroupId?: string; - @doc("Include context which has contextual data specific to the monitor service. Default value is false'") + /** + * Include context which has contextual data specific to the monitor service. Default value is false' + */ @query("includeContext") includeContext?: boolean; - @doc("Include egress config which would be used for displaying the content in portal. Default value is 'false'.") + /** + * Include egress config which would be used for displaying the content in portal. Default value is 'false'. + */ @query("includeEgressConfig") includeEgressConfig?: boolean; - @doc("Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the \"includeContent\" filter is selected, maximum value allowed is 25. Default value is 25.") + /** + * Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the "includeContent" filter is selected, maximum value allowed is 25. Default value is 25. + */ @query("pageCount") - pageCount?: int32; + pageCount?: int64; - @doc("Sort the query results by input field, Default value is 'lastModifiedDateTime'.") + /** + * Sort the query results by input field, Default value is 'lastModifiedDateTime'. + */ @query("sortBy") sortBy?: AlertsSortByFields; - @doc("Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others.") + /** + * Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others. + */ @query("sortOrder") sortOrder?: SortOrder; - @doc("This filter allows to selection of the fields(comma separated) which would be part of the essential section. This would allow to project only the required fields rather than getting entire content. Default is to fetch all the fields in the essentials section.") + /** + * This filter allows to selection of the fields(comma separated) which would be part of the essential section. This would allow to project only the required fields rather than getting entire content. Default is to fetch all the fields in the essentials section. + */ @query("select") select?: string; - @doc("Filter by time range by below listed values. Default value is 1 day.") + /** + * Filter by time range by below listed values. Default value is 1 day. + */ @query("timeRange") timeRange?: TimeRange; - @doc("Filter by custom time range in the format / where time is in (ISO-8601 format)'. Permissible values is within 30 days from query time. Either timeRange or customTimeRange could be used but not both. Default is none.") + /** + * Filter by custom time range in the format / where time is in (ISO-8601 format)'. Permissible values is within 30 days from query time. Either timeRange or customTimeRange could be used but not both. Default is none. + */ @query("customTimeRange") customTimeRange?: string; } >; - @doc("Change the state of an alert.") + /** + * Change the state of an alert. + */ changeState is ArmResourceActionSync< Alert, string, @@ -110,27 +156,39 @@ interface Alerts { { ...BaseParameters; - @doc("New state of the alert.") + /** + * New state of the alert. + */ @query("newState") newState: AlertState; } >; - @doc("Get the history of an alert, which captures any monitor condition changes (Fired/Resolved) and alert state changes (New/Acknowledged/Closed).") + /** + * Get the history of an alert, which captures any monitor condition changes (Fired/Resolved) and alert state changes (New/Acknowledged/Closed). + */ // FIXME: Alerts_GetHistory could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history") @get - GetHistory is Azure.Core.Foundations.Operation< + getHistory is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("Unique ID of an alert instance.") + /** + * Unique ID of an alert instance. + */ @path alertId: string; }, AlertModification >; } + +@@projectedName(Alerts.changeState::parameters.body, "json", "comment"); +@@extension(Alerts.changeState::parameters.body, "x-ms-client-name", "comment"); +@@doc(Alerts.changeState::parameters.body, "reason of change alert state"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp index 0ce05ed92c..b9f9335f1e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp @@ -11,9 +11,13 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AlertsManagement; -@doc("Alert processing rule object containing target scopes, conditions and scheduling logic.") +/** + * Alert processing rule object containing target scopes, conditions and scheduling logic. + */ model AlertProcessingRule is TrackedResource { - @doc("The name of the alert processing rule that needs to be fetched.") + /** + * The name of the alert processing rule that needs to be fetched. + */ @path @key("alertProcessingRuleName") @segment("actionRules") @@ -22,21 +26,59 @@ model AlertProcessingRule is TrackedResource { @armResourceOperations interface AlertProcessingRules { - @doc("Get an alert processing rule by name.") + /** + * Get an alert processing rule by name. + */ getByName is ArmResourceRead; - @doc("Create or update an alert processing rule.") + /** + * Create or update an alert processing rule. + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Enable, disable, or update tags for an alert processing rule.") + /** + * Enable, disable, or update tags for an alert processing rule. + */ + @parameterVisibility("read") update is ArmCustomPatchSync; - @doc("Delete an alert processing rule.") + /** + * Delete an alert processing rule. + */ delete is ArmResourceDeleteSync; - @doc("List all alert processing rules in a resource group.") + /** + * List all alert processing rules in a resource group. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("AlertProcessingRules_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; - @doc("List all alert processing rules in a subscription.") + /** + * List all alert processing rules in a subscription. + */ listBySubscription is ArmListBySubscription; } + +@@projectedName(AlertProcessingRules.createOrUpdate::parameters.resource, + "json", + "alertProcessingRule" +); +@@extension(AlertProcessingRules.createOrUpdate::parameters.resource, + "x-ms-client-name", + "alertProcessingRule" +); +@@doc(AlertProcessingRules.createOrUpdate::parameters.resource, + "Alert processing rule to be created/updated." +); +@@projectedName(AlertProcessingRules.update::parameters.properties, + "json", + "alertProcessingRulePatch" +); +@@extension(AlertProcessingRules.update::parameters.properties, + "x-ms-client-name", + "alertProcessingRulePatch" +); +@@doc(AlertProcessingRules.update::parameters.properties, + "Parameters supplied to the operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp index d6bec57e3f..8f8b0396db 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AlertsManagement; -@doc("Set of related alerts grouped together smartly by AMS.") +/** + * Set of related alerts grouped together smartly by AMS. + */ @subscriptionResource model SmartGroup is ProxyResource { - @doc("Smart group unique id. ") + /** + * Smart group unique id. + */ @path @key("smartGroupId") @segment("smartGroups") @@ -23,62 +27,92 @@ model SmartGroup is ProxyResource { @armResourceOperations interface SmartGroups { - @doc("Get information related to a specific Smart Group.") + /** + * Get information related to a specific Smart Group. + */ getById is ArmResourceRead; - @doc("List all the Smart Groups within a specified subscription. ") + /** + * List all the Smart Groups within a specified subscription. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("SmartGroups_GetAll") getAll is ArmResourceListByParent< SmartGroup, { ...BaseParameters; - @doc("Filter by target resource( which is full ARM ID) Default value is select all.") + /** + * Filter by target resource( which is full ARM ID) Default value is select all. + */ @query("targetResource") targetResource?: string; - @doc("Filter by target resource group name. Default value is select all.") + /** + * Filter by target resource group name. Default value is select all. + */ @query("targetResourceGroup") targetResourceGroup?: string; - @doc("Filter by target resource type. Default value is select all.") + /** + * Filter by target resource type. Default value is select all. + */ @query("targetResourceType") targetResourceType?: string; - @doc("Filter by monitor service which generates the alert instance. Default value is select all.") + /** + * Filter by monitor service which generates the alert instance. Default value is select all. + */ @query("monitorService") monitorService?: MonitorService; - @doc("Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.") + /** + * Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all. + */ @query("monitorCondition") monitorCondition?: MonitorCondition; - @doc("Filter by severity. Default value is select all.") + /** + * Filter by severity. Default value is select all. + */ @query("severity") severity?: Severity; - @doc("Filter by state of the smart group. Default value is to select all.") + /** + * Filter by state of the smart group. Default value is to select all. + */ @query("smartGroupState") smartGroupState?: AlertState; - @doc("Filter by time range by below listed values. Default value is 1 day.") + /** + * Filter by time range by below listed values. Default value is 1 day. + */ @query("timeRange") timeRange?: TimeRange; - @doc("Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the \"includeContent\" filter is selected, maximum value allowed is 25. Default value is 25.") + /** + * Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the "includeContent" filter is selected, maximum value allowed is 25. Default value is 25. + */ @query("pageCount") - pageCount?: int32; + pageCount?: int64; - @doc("Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'.") + /** + * Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'. + */ @query("sortBy") sortBy?: SmartGroupsSortByFields; - @doc("Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others.") + /** + * Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others. + */ @query("sortOrder") sortOrder?: SortOrder; } >; - @doc("Change the state of a Smart Group.") + /** + * Change the state of a Smart Group. + */ changeState is ArmResourceActionSync< SmartGroup, void, @@ -86,24 +120,32 @@ interface SmartGroups { { ...BaseParameters; - @doc("New state of the alert.") + /** + * New state of the alert. + */ @query("newState") newState: AlertState; } >; - @doc("Get the history a smart group, which captures any Smart Group state changes (New/Acknowledged/Closed) .") + /** + * Get the history a smart group, which captures any Smart Group state changes (New/Acknowledged/Closed) . + */ // FIXME: SmartGroups_GetHistory could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/history") @get - GetHistory is Azure.Core.Foundations.Operation< + getHistory is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("Smart group unique id. ") + /** + * Smart group unique id. + */ @path smartGroupId: string; }, diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsAnActionGroupToAllAlertsInASubscription.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Adds_An_Action_Group_To_All_Alerts_In_A_Subscription.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsAnActionGroupToAllAlertsInASubscription.json rename to packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Adds_An_Action_Group_To_All_Alerts_In_A_Subscription.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsTwoActionGroupsToAllSev0AndSev1AlertsInTwoResourceGroups.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Adds_Two_Action_Groups_To_All_Sev0_And_Sev1_Alerts_In_Two_Resource_Groups.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsTwoActionGroupsToAllSev0AndSev1AlertsInTwoResourceGroups.json rename to packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Adds_Two_Action_Groups_To_All_Sev0_And_Sev1_Alerts_In_Two_Resource_Groups.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAlertsOnASpecificVmDuringAOneOffMaintenanceWindow_1800_2000AtASpecificDatePacificStandardTime.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Removes_All_Action_Groups_From_Alerts_On_A_Specific_Vm_During_A_One_Off_Maintenance_Window_1800_2000_At_A_Specific_Date_Pacific_Standard_Time.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAlertsOnASpecificVmDuringAOneOffMaintenanceWindow_1800_2000AtASpecificDatePacificStandardTime.json rename to packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Removes_All_Action_Groups_From_Alerts_On_A_Specific_Vm_During_A_One_Off_Maintenance_Window_1800_2000_At_A_Specific_Date_Pacific_Standard_Time.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsInASubscriptionComingFromASpecificAlertRule.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Removes_All_Action_Groups_From_All_Alerts_In_A_Subscription_Coming_From_A_Specific_Alert_Rule.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsInASubscriptionComingFromASpecificAlertRule.json rename to packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Removes_All_Action_Groups_From_All_Alerts_In_A_Subscription_Coming_From_A_Specific_Alert_Rule.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsOnAnyVmInTwoResourceGroupsDuringARecurringMaintenanceWindow_2200_0400EverySatAndSunIndiaStandardTime.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Removes_All_Action_Groups_From_All_Alerts_On_Any_Vm_In_Two_Resource_Groups_During_A_Recurring_Maintenance_Window_2200_0400_Every_Sat_And_Sun_India_Standard_Time.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsOnAnyVmInTwoResourceGroupsDuringARecurringMaintenanceWindow_2200_0400EverySatAndSunIndiaStandardTime.json rename to packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Removes_All_Action_Groups_From_All_Alerts_On_Any_Vm_In_Two_Resource_Groups_During_A_Recurring_Maintenance_Window_2200_0400_Every_Sat_And_Sun_India_Standard_Time.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsOutsideBusinessHoursMonFri_09_00_17_00EasternStandardTime.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Removes_All_Action_Groups_Outside_Business_Hours_Mon_Fri_09_00_17_00_Eastern_Standard_Time.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsOutsideBusinessHoursMonFri_09_00_17_00EasternStandardTime.json rename to packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_Create_Or_Update_A_Rule_That_Removes_All_Action_Groups_Outside_Business_Hours_Mon_Fri_09_00_17_00_Eastern_Standard_Time.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/main.tsp index 5f922357ab..7bd3869cac 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/main.tsp @@ -13,6 +13,9 @@ using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; +/** + * AlertsManagement Client + */ @armProviderNamespace @service({ title: "AlertsManagementClient", @@ -20,18 +23,23 @@ using TypeSpec.Versioning; @versioned(Versions) // FIXME: Common type version v2 is not supported for now. // @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v2) -@doc("AlertsManagement Client") namespace Azure.ResourceManager.AlertsManagement; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { + /** + * The 2021-08-08 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2021-08-08 API version.") v2021_08_08: "2021-08-08", + /** + * The 2019-05-05-preview API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2019-05-05-preview API version.") v2019_05_05_preview: "2019-05-05-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp index 5db9e03843..7ea8f71dd1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp @@ -13,7 +13,9 @@ namespace Azure.ResourceManager.AlertsManagement; interface Operations extends Azure.ResourceManager.Operations {} -@doc("Field for a given condition.") +/** + * Field for a given condition. + */ enum Field { Severity, MonitorService, @@ -28,7 +30,9 @@ enum Field { AlertContext, } -@doc("Operator for a given condition.") +/** + * Operator for a given condition. + */ enum Operator { Equals, NotEquals, @@ -36,32 +40,22 @@ enum Operator { DoesNotContain, } -@doc("Specifies when the recurrence should be applied.") +/** + * Specifies when the recurrence should be applied. + */ enum RecurrenceType { Daily, Weekly, Monthly, } -@doc("Action that should be applied.") -enum ActionType { - AddActionGroups, - RemoveAllActionGroups, -} - -@doc("The type of identity that created the resource.") -enum CreatedByType { - User, - Application, - ManagedIdentity, - Key, -} - enum Identifier { MonitorServiceList, } -@doc("Identification of the information to be retrieved by API call") +/** + * Identification of the information to be retrieved by API call + */ enum MetadataIdentifier { MonitorServiceList, } @@ -127,7 +121,9 @@ enum TimeRange { `30d`, } -@doc("The type of signal the alert is based on, which could be metrics, logs or activity logs.") +/** + * The type of signal the alert is based on, which could be metrics, logs or activity logs. + */ enum SignalType { Metric, Log, @@ -151,14 +147,18 @@ enum SmartGroupsSortByFields { lastModifiedDateTime, } -@doc("Smart group state") +/** + * Smart group state + */ enum SmartGroupState { New, Acknowledged, Closed, } -@doc("Days of week.") +/** + * Days of week. + */ enum DaysOfWeek { Sunday, Monday, @@ -169,7 +169,9 @@ enum DaysOfWeek { Saturday, } -@doc("Reason for the modification") +/** + * Reason for the modification + */ @fixed enum AlertModificationEvent { AlertCreated, @@ -183,7 +185,9 @@ enum AlertModificationEvent { ActionsFailed, } -@doc("Reason for the modification") +/** + * Reason for the modification + */ @fixed enum SmartGroupModificationEvent { SmartGroupCreated, @@ -192,517 +196,833 @@ enum SmartGroupModificationEvent { AlertRemoved, } -@doc("Alert processing rule properties defining scopes, conditions and scheduling logic for alert processing rule.") +/** + * Alert processing rule properties defining scopes, conditions and scheduling logic for alert processing rule. + */ model AlertProcessingRuleProperties { - @doc("Scopes on which alert processing rule will apply.") + /** + * Scopes on which alert processing rule will apply. + */ scopes: string[]; - @doc("Conditions on which alerts will be filtered.") + /** + * Conditions on which alerts will be filtered. + */ conditions?: Condition[]; - @doc("Scheduling for alert processing rule.") + /** + * Scheduling for alert processing rule. + */ schedule?: Schedule; - @doc("Actions to be applied.") + /** + * Actions to be applied. + */ actions: Action[]; - @doc("Description of alert processing rule.") + /** + * Description of alert processing rule. + */ description?: string; - @doc("Indicates if the given alert processing rule is enabled or disabled.") - enabled?: boolean; + /** + * Indicates if the given alert processing rule is enabled or disabled. + */ + enabled?: boolean = true; } -@doc("Condition to trigger an alert processing rule.") +/** + * Condition to trigger an alert processing rule. + */ model Condition { - @doc("Field for a given condition.") + /** + * Field for a given condition. + */ field?: Field; - @doc("Operator for a given condition.") + /** + * Operator for a given condition. + */ operator?: Operator; - @doc("List of values to match for a given condition.") + /** + * List of values to match for a given condition. + */ values?: string[]; } -@doc("Scheduling configuration for a given alert processing rule.") +/** + * Scheduling configuration for a given alert processing rule. + */ model Schedule { - @doc("Scheduling effective from time. Date-Time in ISO-8601 format without timezone suffix.") + /** + * Scheduling effective from time. Date-Time in ISO-8601 format without timezone suffix. + */ @pattern("^(?:(\\d{4}-\\d{2}-\\d{2})T(\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?))$") effectiveFrom?: string; - @doc("Scheduling effective until time. Date-Time in ISO-8601 format without timezone suffix.") + /** + * Scheduling effective until time. Date-Time in ISO-8601 format without timezone suffix. + */ @pattern("^(?:(\\d{4}-\\d{2}-\\d{2})T(\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?))$") effectiveUntil?: string; - @doc("Scheduling time zone.") + /** + * Scheduling time zone. + */ timeZone?: string; - @doc("List of recurrences.") + /** + * List of recurrences. + */ recurrences?: Recurrence[]; } -@doc("Recurrence object.") +/** + * Recurrence object. + */ @discriminator("recurrenceType") model Recurrence { - @doc("Start time for recurrence.") + /** + * Start time for recurrence. + */ startTime?: plainTime; - @doc("End time for recurrence.") + /** + * End time for recurrence. + */ endTime?: plainTime; } -@doc("Action to be applied.") +/** + * Action to be applied. + */ @discriminator("actionType") model Action {} -@doc("An azure managed resource object.") +/** + * An azure managed resource object. + */ model ManagedResource extends Resource { - @doc("Resource location") + /** + * Resource location + */ @visibility("read", "create") // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key location: string; - @doc("Resource tags") + /** + * Resource tags + */ tags?: Record; } -@doc("An azure resource object") +/** + * An azure resource object + */ model Resource { - @doc("Azure resource Id") + /** + * Azure resource Id + */ @visibility("read") id?: string; - @doc("Azure resource type") + /** + * Azure resource type + */ @visibility("read") type?: string; - @doc("Azure resource name") + /** + * Azure resource name + */ @visibility("read") name?: string; } -@doc("An error response from the service.") +/** + * An error response from the service. + */ @error model AlertProcessingRuleErrorResponse { - @doc("Details of error response.") + /** + * Details of error response. + */ error?: AlertProcessingRuleErrorResponseBody; } -@doc("Details of error response.") +/** + * Details of error response. + */ model AlertProcessingRuleErrorResponseBody { - @doc("Error code, intended to be consumed programmatically.") + /** + * Error code, intended to be consumed programmatically. + */ code?: string; - @doc("Description of the error, intended for display in user interface.") + /** + * Description of the error, intended for display in user interface. + */ message?: string; - @doc("Target of the particular error, for example name of the property.") + /** + * Target of the particular error, for example name of the property. + */ target?: string; - @doc("A list of additional details about the error.") + /** + * A list of additional details about the error. + */ details?: AlertProcessingRuleErrorResponseBody[]; } -@doc("Data contract for patch.") +/** + * Data contract for patch. + */ model PatchObject { - @doc("Properties supported by patch operation.") + /** + * Properties supported by patch operation. + */ properties?: PatchProperties; - @doc("Tags to be updated.") + /** + * Tags to be updated. + */ tags?: Record; } -@doc("Alert processing rule properties supported by patch.") +/** + * Alert processing rule properties supported by patch. + */ model PatchProperties { - @doc("Indicates if the given alert processing rule is enabled or disabled.") + /** + * Indicates if the given alert processing rule is enabled or disabled. + */ enabled?: boolean; } -@doc("An error response from the service.") +/** + * An error response from the service. + */ @error model AlertsManagementErrorResponse { - @doc("Details of error response.") + /** + * Details of error response. + */ error?: AlertsManagementErrorResponseBody; } -@doc("Details of error response.") +/** + * Details of error response. + */ model AlertsManagementErrorResponseBody { - @doc("Error code, intended to be consumed programmatically.") + /** + * Error code, intended to be consumed programmatically. + */ code?: string; - @doc("Description of the error, intended for display in user interface.") + /** + * Description of the error, intended for display in user interface. + */ message?: string; - @doc("Target of the particular error, for example name of the property.") + /** + * Target of the particular error, for example name of the property. + */ target?: string; - @doc("A list of additional details about the error.") + /** + * A list of additional details about the error. + */ details?: AlertsManagementErrorResponseBody[]; } -@doc("alert meta data information.") +/** + * alert meta data information. + */ model AlertsMetaData { - @doc("alert meta data property bag") + /** + * alert meta data property bag + */ properties?: AlertsMetaDataProperties; } -@doc("alert meta data property bag") +/** + * alert meta data property bag + */ @discriminator("metadataIdentifier") model AlertsMetaDataProperties {} -@doc("Alert property bag") +/** + * Alert property bag + */ model AlertProperties { - @doc("This object contains consistent fields across different monitor services.") + /** + * This object contains consistent fields across different monitor services. + */ essentials?: Essentials; - @doc("Information specific to the monitor service that gives more contextual details about the alert.") + /** + * Information specific to the monitor service that gives more contextual details about the alert. + */ @visibility("read") context?: Record; - @doc("Config which would be used for displaying the data in portal.") + /** + * Config which would be used for displaying the data in portal. + */ @visibility("read") egressConfig?: Record; } -@doc("This object contains consistent fields across different monitor services.") +/** + * This object contains consistent fields across different monitor services. + */ model Essentials { - @doc("Severity of alert Sev0 being highest and Sev4 being lowest.") + /** + * Severity of alert Sev0 being highest and Sev4 being lowest. + */ @visibility("read") severity?: Severity; - @doc("The type of signal the alert is based on, which could be metrics, logs or activity logs.") + /** + * The type of signal the alert is based on, which could be metrics, logs or activity logs. + */ @visibility("read") signalType?: SignalType; - @doc("Alert object state, which can be modified by the user.") + /** + * Alert object state, which can be modified by the user. + */ @visibility("read") alertState?: AlertState; - @doc("Condition of the rule at the monitor service. It represents whether the underlying conditions have crossed the defined alert rule thresholds.") + /** + * Condition of the rule at the monitor service. It represents whether the underlying conditions have crossed the defined alert rule thresholds. + */ @visibility("read") monitorCondition?: MonitorCondition; - @doc("Target ARM resource, on which alert got created.") + /** + * Target ARM resource, on which alert got created. + */ targetResource?: string; - @doc("Name of the target ARM resource name, on which alert got created.") + /** + * Name of the target ARM resource name, on which alert got created. + */ targetResourceName?: string; - @doc("Resource group of target ARM resource, on which alert got created.") + /** + * Resource group of target ARM resource, on which alert got created. + */ targetResourceGroup?: string; - @doc("Resource type of target ARM resource, on which alert got created.") + /** + * Resource type of target ARM resource, on which alert got created. + */ targetResourceType?: string; - @doc("Monitor service on which the rule(monitor) is set.") + /** + * Monitor service on which the rule(monitor) is set. + */ @visibility("read") monitorService?: MonitorService; - @doc("Rule(monitor) which fired alert instance. Depending on the monitor service, this would be ARM id or name of the rule.") + /** + * Rule(monitor) which fired alert instance. Depending on the monitor service, this would be ARM id or name of the rule. + */ @visibility("read") alertRule?: string; - @doc("Unique Id created by monitor service for each alert instance. This could be used to track the issue at the monitor service, in case of Nagios, Zabbix, SCOM etc.") + /** + * Unique Id created by monitor service for each alert instance. This could be used to track the issue at the monitor service, in case of Nagios, Zabbix, SCOM etc. + */ @visibility("read") sourceCreatedId?: string; - @doc("Unique Id of the smart group") + /** + * Unique Id of the smart group + */ @visibility("read") smartGroupId?: string; - @doc("Verbose reason describing the reason why this alert instance is added to a smart group") + /** + * Verbose reason describing the reason why this alert instance is added to a smart group + */ @visibility("read") smartGroupingReason?: string; - @doc("Creation time(ISO-8601 format) of alert instance.") + /** + * Creation time(ISO-8601 format) of alert instance. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startDateTime?: utcDateTime; - @doc("Last modification time(ISO-8601 format) of alert instance.") + /** + * Last modification time(ISO-8601 format) of alert instance. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedDateTime?: utcDateTime; - @doc("Resolved time(ISO-8601 format) of alert instance. This will be updated when monitor service resolves the alert instance because the rule condition is no longer met.") + /** + * Resolved time(ISO-8601 format) of alert instance. This will be updated when monitor service resolves the alert instance because the rule condition is no longer met. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. monitorConditionResolvedDateTime?: utcDateTime; - @doc("User who last modified the alert, in case of monitor service updates user would be 'system', otherwise name of the user.") + /** + * User who last modified the alert, in case of monitor service updates user would be 'system', otherwise name of the user. + */ @visibility("read") lastModifiedUserName?: string; - @doc("Action status") + /** + * Action status + */ actionStatus?: ActionStatus; - @doc("Alert description.") + /** + * Alert description. + */ description?: string; } -@doc("Action status") +/** + * Action status + */ model ActionStatus { - @doc("Value indicating whether alert is suppressed.") + /** + * Value indicating whether alert is suppressed. + */ isSuppressed?: boolean; } -@doc("Alert Modification details") +/** + * Alert Modification details + */ model AlertModification extends Resource { - @doc("Properties of the alert modification item.") + /** + * Properties of the alert modification item. + */ properties?: AlertModificationProperties; } -@doc("Properties of the alert modification item.") +/** + * Properties of the alert modification item. + */ model AlertModificationProperties { - @doc("Unique Id of the alert for which the history is being retrieved") + /** + * Unique Id of the alert for which the history is being retrieved + */ @visibility("read") alertId?: string; - @doc("Modification details") + /** + * Modification details + */ modifications?: AlertModificationItem[]; } -@doc("Alert modification item.") +/** + * Alert modification item. + */ model AlertModificationItem { - @doc("Reason for the modification") + /** + * Reason for the modification + */ modificationEvent?: AlertModificationEvent; - @doc("Old value") + /** + * Old value + */ oldValue?: string; - @doc("New value") + /** + * New value + */ newValue?: string; - @doc("Modified date and time") + /** + * Modified date and time + */ modifiedAt?: string; - @doc("Modified user details (Principal client name)") + /** + * Modified user details (Principal client name) + */ modifiedBy?: string; - @doc("Modification comments") + /** + * Modification comments + */ comments?: string; - @doc("Description of the modification") + /** + * Description of the modification + */ description?: string; } -@doc("Summary of alerts based on the input filters and 'groupby' parameters.") +/** + * Summary of alerts based on the input filters and 'groupby' parameters. + */ model AlertsSummary extends Resource { - @doc("Group the result set.") + /** + * Group the result set. + */ properties?: AlertsSummaryGroup; } -@doc("Group the result set.") +/** + * Group the result set. + */ model AlertsSummaryGroup { - @doc("Total count of the result set.") - total?: int32; - - @doc("Total count of the smart groups.") - smartGroupsCount?: int32; - - @doc("Name of the field aggregated") + /** + * Total count of the result set. + */ + total?: int64; + + /** + * Total count of the smart groups. + */ + smartGroupsCount?: int64; + + /** + * Name of the field aggregated + */ groupedby?: string; - @doc("List of the items") + /** + * List of the items + */ values?: AlertsSummaryGroupItem[]; } -@doc("Alerts summary group item") +/** + * Alerts summary group item + */ model AlertsSummaryGroupItem { - @doc("Value of the aggregated field") + /** + * Value of the aggregated field + */ name?: string; - @doc("Count of the aggregated field") - count?: int32; + /** + * Count of the aggregated field + */ + count?: int64; - @doc("Name of the field aggregated") + /** + * Name of the field aggregated + */ groupedby?: string; - @doc("List of the items") + /** + * List of the items + */ values?: AlertsSummaryGroupItem[]; } -@doc("Properties of smart group.") +/** + * Properties of smart group. + */ model SmartGroupProperties { - @doc("Total number of alerts in smart group") - alertsCount?: int32; - - @doc("Smart group state") + /** + * Total number of alerts in smart group + */ + alertsCount?: int64; + + /** + * Smart group state + */ @visibility("read") smartGroupState?: SmartGroupState; - @doc("Severity of smart group is the highest(Sev0 >... > Sev4) severity of all the alerts in the group.") + /** + * Severity of smart group is the highest(Sev0 >... > Sev4) severity of all the alerts in the group. + */ @visibility("read") severity?: Severity; - @doc("Creation time of smart group. Date-Time in ISO-8601 format.") + /** + * Creation time of smart group. Date-Time in ISO-8601 format. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startDateTime?: utcDateTime; - @doc("Last updated time of smart group. Date-Time in ISO-8601 format.") + /** + * Last updated time of smart group. Date-Time in ISO-8601 format. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedDateTime?: utcDateTime; - @doc("Last modified by user name.") + /** + * Last modified by user name. + */ @visibility("read") lastModifiedUserName?: string; - @doc("Summary of target resources in the smart group") + /** + * Summary of target resources in the smart group + */ resources?: SmartGroupAggregatedProperty[]; - @doc("Summary of target resource types in the smart group") + /** + * Summary of target resource types in the smart group + */ resourceTypes?: SmartGroupAggregatedProperty[]; - @doc("Summary of target resource groups in the smart group") + /** + * Summary of target resource groups in the smart group + */ resourceGroups?: SmartGroupAggregatedProperty[]; - @doc("Summary of monitorServices in the smart group") + /** + * Summary of monitorServices in the smart group + */ monitorServices?: SmartGroupAggregatedProperty[]; - @doc("Summary of monitorConditions in the smart group") + /** + * Summary of monitorConditions in the smart group + */ monitorConditions?: SmartGroupAggregatedProperty[]; - @doc("Summary of alertStates in the smart group") + /** + * Summary of alertStates in the smart group + */ alertStates?: SmartGroupAggregatedProperty[]; - @doc("Summary of alertSeverities in the smart group") + /** + * Summary of alertSeverities in the smart group + */ alertSeverities?: SmartGroupAggregatedProperty[]; - @doc("The URI to fetch the next page of alerts. Call ListNext() with this URI to fetch the next page alerts.") + /** + * The URI to fetch the next page of alerts. Call ListNext() with this URI to fetch the next page alerts. + */ nextLink?: string; } -@doc("Aggregated property of each type") +/** + * Aggregated property of each type + */ model SmartGroupAggregatedProperty { - @doc("Name of the type.") + /** + * Name of the type. + */ name?: string; - @doc("Total number of items of type.") - count?: int32; + /** + * Total number of items of type. + */ + count?: int64; } -@doc("An error response from the service.") +/** + * An error response from the service. + */ @error model SmartGroupErrorResponse { - @doc("Details of error response.") + /** + * Details of error response. + */ error?: SmartGroupErrorResponseBody; } -@doc("Details of error response.") +/** + * Details of error response. + */ model SmartGroupErrorResponseBody { - @doc("Error code, intended to be consumed programmatically.") + /** + * Error code, intended to be consumed programmatically. + */ code?: string; - @doc("Description of the error, intended for display in user interface.") + /** + * Description of the error, intended for display in user interface. + */ message?: string; - @doc("Target of the particular error, for example name of the property.") + /** + * Target of the particular error, for example name of the property. + */ target?: string; - @doc("A list of additional details about the error.") + /** + * A list of additional details about the error. + */ details?: SmartGroupErrorResponseBody[]; } -@doc("Alert Modification details") +/** + * Alert Modification details + */ model SmartGroupModification extends Resource { - @doc("Properties of the smartGroup modification item.") + /** + * Properties of the smartGroup modification item. + */ properties?: SmartGroupModificationProperties; } -@doc("Properties of the smartGroup modification item.") +/** + * Properties of the smartGroup modification item. + */ model SmartGroupModificationProperties { - @doc("Unique Id of the smartGroup for which the history is being retrieved") + /** + * Unique Id of the smartGroup for which the history is being retrieved + */ @visibility("read") smartGroupId?: string; - @doc("Modification details") + /** + * Modification details + */ modifications?: SmartGroupModificationItem[]; - @doc("URL to fetch the next set of results.") + /** + * URL to fetch the next set of results. + */ nextLink?: string; } -@doc("smartGroup modification item.") +/** + * smartGroup modification item. + */ model SmartGroupModificationItem { - @doc("Reason for the modification") + /** + * Reason for the modification + */ modificationEvent?: SmartGroupModificationEvent; - @doc("Old value") + /** + * Old value + */ oldValue?: string; - @doc("New value") + /** + * New value + */ newValue?: string; - @doc("Modified date and time") + /** + * Modified date and time + */ modifiedAt?: string; - @doc("Modified user details (Principal client name)") + /** + * Modified user details (Principal client name) + */ modifiedBy?: string; - @doc("Modification comments") + /** + * Modification comments + */ comments?: string; - @doc("Description of the modification") + /** + * Description of the modification + */ description?: string; } -@doc("Daily recurrence object.") +/** + * Daily recurrence object. + */ model DailyRecurrence extends Recurrence { - @doc("Specifies when the recurrence should be applied.") + /** + * Specifies when the recurrence should be applied. + */ recurrenceType: "Daily"; } -@doc("Weekly recurrence object.") +/** + * Weekly recurrence object. + */ model WeeklyRecurrence extends Recurrence { - @doc("Specifies the values for weekly recurrence pattern.") + /** + * Specifies the values for weekly recurrence pattern. + */ daysOfWeek: DaysOfWeek[]; - @doc("Specifies when the recurrence should be applied.") + /** + * Specifies when the recurrence should be applied. + */ recurrenceType: "Weekly"; } -@doc("Monthly recurrence object.") +/** + * Monthly recurrence object. + */ model MonthlyRecurrence extends Recurrence { - @doc("Specifies the values for monthly recurrence pattern.") + /** + * Specifies the values for monthly recurrence pattern. + */ daysOfMonth: int32[]; - @doc("Specifies when the recurrence should be applied.") + /** + * Specifies when the recurrence should be applied. + */ recurrenceType: "Monthly"; } -@doc("Add action groups to alert processing rule.") +/** + * Add action groups to alert processing rule. + */ model AddActionGroups extends Action { - @doc("List of action group Ids to add to alert processing rule.") + /** + * List of action group Ids to add to alert processing rule. + */ actionGroupIds: string[]; - @doc("Action that should be applied.") + /** + * Action that should be applied. + */ actionType: "AddActionGroups"; } -@doc("Indicates if all action groups should be removed.") +/** + * Indicates if all action groups should be removed. + */ model RemoveAllActionGroups extends Action { - @doc("Action that should be applied.") + /** + * Action that should be applied. + */ actionType: "RemoveAllActionGroups"; } -@doc("Monitor service details") +/** + * Monitor service details + */ model MonitorServiceList extends AlertsMetaDataProperties { - @doc("Array of operations") + /** + * Array of operations + */ data: MonitorServiceDetails[]; - @doc("Identification of the information to be retrieved by API call") + /** + * Identification of the information to be retrieved by API call + */ metadataIdentifier: "MonitorServiceList"; } -@doc("Details of a monitor service") +/** + * Details of a monitor service + */ model MonitorServiceDetails { - @doc("Monitor service name") + /** + * Monitor service name + */ name?: string; - @doc("Monitor service display name") + /** + * Monitor service display name + */ displayName?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml index 691f3c1b0c..2faa332586 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml @@ -2,6 +2,7 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp index 884cc56e0e..86b002378d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.Analysis; -@doc("Represents an instance of an Analysis Services resource.") +/** + * Represents an instance of an Analysis Services resource. + */ model AnalysisServicesServer is TrackedResource { - @doc("The name of the Analysis Services server. It must be a minimum of 3 characters, and a maximum of 63.") + /** + * The name of the Analysis Services server. It must be a minimum of 3 characters, and a maximum of 63. + */ @maxLength(63) @minLength(3) @pattern("^[a-z][a-z0-9]*$") @@ -26,56 +30,77 @@ model AnalysisServicesServer @armResourceOperations interface AnalysisServicesServers { + /** + * Gets details about the specified Analysis Services server. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets details about the specified Analysis Services server.") @operationId("Servers_GetDetails") getDetails is ArmResourceRead; + /** + * Provisions the specified Analysis Services server based on the configuration specified in the request. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Provisions the specified Analysis Services server based on the configuration specified in the request.") @operationId("Servers_Create") - create is ArmResourceCreateOrUpdateAsync; + create is ArmResourceCreateOrReplaceAsync; + /** + * Updates the current state of the specified Analysis Services server. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the current state of the specified Analysis Services server.") + @parameterVisibility("read") @operationId("Servers_Update") update is ArmCustomPatchAsync< AnalysisServicesServer, AnalysisServicesServerUpdateParameters >; + /** + * Deletes the specified Analysis Services server. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the specified Analysis Services server.") @operationId("Servers_Delete") delete is ArmResourceDeleteAsync; + /** + * Gets all the Analysis Services servers for the given resource group. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets all the Analysis Services servers for the given resource group.") @operationId("Servers_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; + /** + * Lists all the Analysis Services servers for the given subscription. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all the Analysis Services servers for the given subscription.") @operationId("Servers_List") list is ArmListBySubscription; + /** + * Lists eligible SKUs for Analysis Services resource provider. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists eligible SKUs for Analysis Services resource provider.") @operationId("Servers_ListSkusForNew") listSkusForNew is ArmListBySubscription; + /** + * Suspends operation of the specified Analysis Services server instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Suspends operation of the specified Analysis Services server instance.") @operationId("Servers_Suspend") suspend is ArmResourceActionAsync; + /** + * Resumes operation of the specified Analysis Services server instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Resumes operation of the specified Analysis Services server instance.") @operationId("Servers_Resume") resume is ArmResourceActionAsync; + /** + * Return the gateway status of the specified Analysis Services server instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Return the gateway status of the specified Analysis Services server instance.") @operationId("Servers_ListGatewayStatus") listGatewayStatus is ArmResourceActionSync< AnalysisServicesServer, @@ -83,8 +108,10 @@ interface AnalysisServicesServers { GatewayListStatusLive >; + /** + * Dissociates a Unified Gateway associated with the server. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Dissociates a Unified Gateway associated with the server.") @operationId("Servers_DissociateGateway") dissociateGateway is ArmResourceActionSync< AnalysisServicesServer, @@ -92,37 +119,73 @@ interface AnalysisServicesServers { void >; + /** + * Check the name availability in the target location. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Check the name availability in the target location.") @operationId("Servers_CheckNameAvailability") - checkNameAvailability is checkGlobalNameAvailability; + checkNameAvailability is checkLocalNameAvailability< + CheckServerNameAvailabilityParameters, + CheckServerNameAvailabilityResult + >; + /** + * Lists eligible SKUs for an Analysis Services resource. + */ + // FIXME: Servers_ListSkusForExisting could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("Servers_ListSkusForExisting") - @doc("Lists eligible SKUs for an Analysis Services resource.") - // FIXME: Servers_ListSkusForExisting could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/skus") @get - ListSkusForExisting is Azure.Core.Foundations.Operation< + listSkusForExisting is Azure.Core.Foundations.Operation< { - @doc("The name of the Azure Resource group of which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90.") + /** + * The name of the Azure Resource group of which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. + */ @maxLength(90) @minLength(1) @pattern("^[-\\w\\._\\(\\)]+$") @path resourceGroupName: string; - @doc("The name of the Analysis Services server. It must be at least 3 characters in length, and no more than 63.") + /** + * The name of the Analysis Services server. It must be at least 3 characters in length, and no more than 63. + */ @maxLength(63) @minLength(3) @pattern("^[a-z][a-z0-9]*$") @path serverName: string; - @doc("A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, SkuEnumerationForExistingResourceResult >; } + +@@projectedName(AnalysisServicesServers.create::parameters.resource, + "json", + "serverParameters" +); +@@extension(AnalysisServicesServers.create::parameters.resource, + "x-ms-client-name", + "serverParameters" +); +@@doc(AnalysisServicesServers.create::parameters.resource, + "Contains the information used to provision the Analysis Services server." +); +@@projectedName(AnalysisServicesServers.update::parameters.properties, + "json", + "serverUpdateParameters" +); +@@extension(AnalysisServicesServers.update::parameters.properties, + "x-ms-client-name", + "serverUpdateParameters" +); +@@doc(AnalysisServicesServers.update::parameters.properties, + "Request object that contains the updated information for the server." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp index 5937a2bb30..26d471907f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp @@ -11,18 +11,24 @@ using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; +/** + * The Azure Analysis Services Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Analysis Services servers + */ @armProviderNamespace @service({ title: "AzureAnalysisServices", }) @versioned(Versions) -@doc("The Azure Analysis Services Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Analysis Services servers") namespace Azure.ResourceManager.Analysis; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { + /** + * The 2017-08-01 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2017-08-01 API version.") v2017_08_01: "2017-08-01", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp index d028c80841..fc0d9b7554 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp @@ -13,7 +13,9 @@ namespace Azure.ResourceManager.Analysis; interface Operations extends Azure.ResourceManager.Operations {} -@doc("The current state of Analysis Services resource. The state is to indicate more states outside of resource provisioning.") +/** + * The current state of Analysis Services resource. The state is to indicate more states outside of resource provisioning. + */ enum State { Deleting, Succeeded, @@ -29,7 +31,9 @@ enum State { Scaling, } -@doc("The current deployment state of Analysis Services resource. The provisioningState is to indicate states for resource provisioning.") +/** + * The current deployment state of Analysis Services resource. The provisioningState is to indicate states for resource provisioning. + */ enum ProvisioningState { Deleting, Succeeded, @@ -45,294 +49,451 @@ enum ProvisioningState { Scaling, } -@doc("The name of the Azure pricing tier to which the SKU applies.") -enum SkuTier { - Development, - Basic, - Standard, -} - -@doc("The managed mode of the server (0 = not managed, 1 = managed).") +/** + * The managed mode of the server (0 = not managed, 1 = managed). + */ enum ManagedMode { `0`: 0, `1`: 1, } -@doc("The server monitor mode for AS server") +/** + * The server monitor mode for AS server + */ enum ServerMonitorMode { `0`: 0, `1`: 1, } -@doc("How the read-write server's participation in the query pool is controlled.
    It can have the following values:
    • readOnly - indicates that the read-write server is intended not to participate in query operations
    • all - indicates that the read-write server can participate in query operations
    Specifying readOnly when capacity is 1 results in error.") +/** + * How the read-write server's participation in the query pool is controlled.
    It can have the following values:
    • readOnly - indicates that the read-write server is intended not to participate in query operations
    • all - indicates that the read-write server can participate in query operations
    Specifying readOnly when capacity is 1 results in error. + */ @fixed enum ConnectionMode { All, ReadOnly, } -@doc("Properties of Analysis Services resource.") +/** + * Properties of Analysis Services resource. + */ model AnalysisServicesServerProperties extends AnalysisServicesServerMutableProperties { - @doc("The current state of Analysis Services resource. The state is to indicate more states outside of resource provisioning.") + /** + * The current state of Analysis Services resource. The state is to indicate more states outside of resource provisioning. + */ @visibility("read") state?: State; - @doc("The current deployment state of Analysis Services resource. The provisioningState is to indicate states for resource provisioning.") + /** + * The current deployment state of Analysis Services resource. The provisioningState is to indicate states for resource provisioning. + */ @visibility("read") provisioningState?: ProvisioningState; - @doc("The full name of the Analysis Services resource.") + /** + * The full name of the Analysis Services resource. + */ @visibility("read") serverFullName?: string; - @doc("The SKU of the Analysis Services resource.") + /** + * The SKU of the Analysis Services resource. + */ sku?: ResourceSku; } -@doc("An object that represents a set of mutable Analysis Services resource properties.") +/** + * An object that represents a set of mutable Analysis Services resource properties. + */ model AnalysisServicesServerMutableProperties { - @doc("A collection of AS server administrators") + /** + * A collection of AS server administrators + */ asAdministrators?: ServerAdministrators; - @doc("The SAS container URI to the backup container.") + /** + * The SAS container URI to the backup container. + */ backupBlobContainerUri?: string; - @doc("The gateway details configured for the AS server.") + /** + * The gateway details configured for the AS server. + */ gatewayDetails?: GatewayDetails; - @doc("The firewall settings for the AS server.") + /** + * The firewall settings for the AS server. + */ ipV4FirewallSettings?: IPv4FirewallSettings; - @doc("How the read-write server's participation in the query pool is controlled.
    It can have the following values:
    • readOnly - indicates that the read-write server is intended not to participate in query operations
    • all - indicates that the read-write server can participate in query operations
    Specifying readOnly when capacity is 1 results in error.") - querypoolConnectionMode?: ConnectionMode; + /** + * How the read-write server's participation in the query pool is controlled.
    It can have the following values:
    • readOnly - indicates that the read-write server is intended not to participate in query operations
    • all - indicates that the read-write server can participate in query operations
    Specifying readOnly when capacity is 1 results in error. + */ + querypoolConnectionMode?: ConnectionMode = ConnectionMode.All; - @doc("The managed mode of the server (0 = not managed, 1 = managed).") + /** + * The managed mode of the server (0 = not managed, 1 = managed). + */ managedMode?: ManagedMode; - @doc("The server monitor mode for AS server") + /** + * The server monitor mode for AS server + */ serverMonitorMode?: ServerMonitorMode; } -@doc("An array of administrator user identities.") +/** + * An array of administrator user identities. + */ model ServerAdministrators { - @doc("An array of administrator user identities.") + /** + * An array of administrator user identities. + */ members?: string[]; } -@doc("The gateway details.") +/** + * The gateway details. + */ model GatewayDetails { - @doc("Gateway resource to be associated with the server.") + /** + * Gateway resource to be associated with the server. + */ gatewayResourceId?: string; - @doc("Gateway object id from in the DMTS cluster for the gateway resource.") + /** + * Gateway object id from in the DMTS cluster for the gateway resource. + */ @visibility("read") gatewayObjectId?: string; - @doc("Uri of the DMTS cluster.") + /** + * Uri of the DMTS cluster. + */ @visibility("read") dmtsClusterUri?: string; } -@doc("An array of firewall rules.") +/** + * An array of firewall rules. + */ model IPv4FirewallSettings { - @doc("An array of firewall rules.") + /** + * An array of firewall rules. + */ firewallRules?: IPv4FirewallRule[]; - @doc("The indicator of enabling PBI service.") + /** + * The indicator of enabling PBI service. + */ enablePowerBIService?: boolean; } -@doc("The detail of firewall rule.") +/** + * The detail of firewall rule. + */ model IPv4FirewallRule { - @doc("The rule name.") + /** + * The rule name. + */ firewallRuleName?: string; - @doc("The start range of IPv4.") + /** + * The start range of IPv4. + */ rangeStart?: string; - @doc("The end range of IPv4.") + /** + * The end range of IPv4. + */ rangeEnd?: string; } -@doc("Represents an instance of an Analysis Services resource.") +/** + * Represents an instance of an Analysis Services resource. + */ model Resource { - @doc("An identifier that represents the Analysis Services resource.") + /** + * An identifier that represents the Analysis Services resource. + */ @visibility("read") id?: string; - @doc("The name of the Analysis Services resource.") + /** + * The name of the Analysis Services resource. + */ @visibility("read") name?: string; - @doc("The type of the Analysis Services resource.") + /** + * The type of the Analysis Services resource. + */ @visibility("read") type?: string; - @doc("Location of the Analysis Services resource.") + /** + * Location of the Analysis Services resource. + */ @visibility("read", "create") // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key location: string; - @doc("The SKU of the Analysis Services resource.") + /** + * The SKU of the Analysis Services resource. + */ sku: ResourceSku; - @doc("Key-value pairs of additional resource provisioning properties.") + /** + * Key-value pairs of additional resource provisioning properties. + */ tags?: Record; } -@doc("Provision request specification") +/** + * Provision request specification + */ model AnalysisServicesServerUpdateParameters { - @doc("The SKU of the Analysis Services resource.") + /** + * The SKU of the Analysis Services resource. + */ sku?: ResourceSku; - @doc("Key-value pairs of additional provisioning properties.") + /** + * Key-value pairs of additional provisioning properties. + */ tags?: Record; - @doc("Properties of the provision operation request.") + /** + * Properties of the provision operation request. + */ properties?: AnalysisServicesServerMutableProperties; } -@doc("An object that represents enumerating SKUs for existing resources.") +/** + * An object that represents enumerating SKUs for existing resources. + */ model SkuEnumerationForExistingResourceResult { - @doc("The collection of available SKUs for existing resources.") + /** + * The collection of available SKUs for existing resources. + */ value?: SkuDetailsForExistingResource[]; } -@doc("An object that represents SKU details for existing resources.") +/** + * An object that represents SKU details for existing resources. + */ model SkuDetailsForExistingResource { - @doc("The SKU in SKU details for existing resources.") + /** + * The SKU in SKU details for existing resources. + */ sku?: ResourceSku; - @doc("The resource type.") + /** + * The resource type. + */ resourceType?: string; } -@doc("Status of gateway is live.") +/** + * Status of gateway is live. + */ model GatewayListStatusLive { - @doc("Live message of list gateway. Status: 0 - Live") + /** + * Live message of list gateway. Status: 0 - Live + */ status?: 0; } -@doc("Status of gateway is error.") +/** + * Status of gateway is error. + */ @error model GatewayListStatusError { - @doc("Error of the list gateway status.") + /** + * Error of the list gateway status. + */ error?: ErrorDetail; } -@doc("Details of server name request body.") +/** + * Details of server name request body. + */ model CheckServerNameAvailabilityParameters { - @doc("Name for checking availability.") + /** + * Name for checking availability. + */ @maxLength(63) @minLength(3) @pattern("^[a-z][a-z0-9]*$") name?: string; - @doc("The resource type of azure analysis services.") - type?: string; + /** + * The resource type of azure analysis services. + */ + type?: string = "Microsoft.AnalysisServices/servers"; } -@doc("The checking result of server name availability.") +/** + * The checking result of server name availability. + */ model CheckServerNameAvailabilityResult { - @doc("Indicator of available of the server name.") + /** + * Indicator of available of the server name. + */ nameAvailable?: boolean; - @doc("The reason of unavailability.") + /** + * The reason of unavailability. + */ reason?: string; - @doc("The detailed message of the request unavailability.") + /** + * The detailed message of the request unavailability. + */ message?: string; } -@doc("Additional properties to expose performance metrics to shoebox.") +/** + * Additional properties to expose performance metrics to shoebox. + */ model OperationProperties { - @doc("Performance metrics to shoebox.") + /** + * Performance metrics to shoebox. + */ serviceSpecification?: OperationPropertiesServiceSpecification; } -@doc("Performance metrics to shoebox.") +/** + * Performance metrics to shoebox. + */ model OperationPropertiesServiceSpecification { - @doc("The metric specifications.") + /** + * The metric specifications. + */ @visibility("read") metricSpecifications?: MetricSpecifications[]; - @doc("The log specifications.") + /** + * The log specifications. + */ @visibility("read") logSpecifications?: LogSpecifications[]; } -@doc("Available operation metric specification for exposing performance metrics to shoebox.") +/** + * Available operation metric specification for exposing performance metrics to shoebox. + */ model MetricSpecifications { - @doc("The name of metric.") + /** + * The name of metric. + */ @visibility("read") name?: string; - @doc("The displayed name of metric.") + /** + * The displayed name of metric. + */ @visibility("read") displayName?: string; - @doc("The displayed description of metric.") + /** + * The displayed description of metric. + */ @visibility("read") displayDescription?: string; - @doc("The unit of the metric.") + /** + * The unit of the metric. + */ @visibility("read") unit?: string; - @doc("The aggregation type of metric.") + /** + * The aggregation type of metric. + */ @visibility("read") aggregationType?: string; - @doc("The dimensions of metric.") + /** + * The dimensions of metric. + */ @visibility("read") dimensions?: MetricDimensions[]; } -@doc("Metric dimension.") +/** + * Metric dimension. + */ model MetricDimensions { - @doc("Dimension name.") + /** + * Dimension name. + */ @visibility("read") name?: string; - @doc("Dimension display name.") + /** + * Dimension display name. + */ @visibility("read") displayName?: string; } -@doc("The log metric specification for exposing performance metrics to shoebox.") +/** + * The log metric specification for exposing performance metrics to shoebox. + */ model LogSpecifications { - @doc("The name of metric.") + /** + * The name of metric. + */ @visibility("read") name?: string; - @doc("The displayed name of log.") + /** + * The displayed name of log. + */ @visibility("read") displayName?: string; - @doc("The blob duration for the log.") + /** + * The blob duration for the log. + */ @visibility("read") blobDuration?: string; } -@doc("The status of operation.") +/** + * The status of operation. + */ model OperationStatus { - @doc("The operation Id.") + /** + * The operation Id. + */ id?: string; - @doc("The operation name.") + /** + * The operation name. + */ name?: string; - @doc("The start time of the operation.") + /** + * The start time of the operation. + */ startTime?: string; - @doc("The end time of the operation.") + /** + * The end time of the operation. + */ endTime?: string; - @doc("The status of the operation.") + /** + * The status of the operation. + */ status?: string; - @doc("The error detail of the operation if any.") + /** + * The error detail of the operation if any. + */ error?: ErrorDetail; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml index 0f785c611e..7f5e93e7ef 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml @@ -2,6 +2,7 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/analysisservices.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp index 3b337f1772..14e8877290 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Tenant Settings.") +/** + * Tenant Settings. + */ @parentResource(ApiManagementServiceResource) model AccessInformationContract is ProxyResource { - @doc("The identifier of the Access configuration.") + /** + * The identifier of the Access configuration. + */ @path @key("accessName") @segment("tenant") @@ -25,13 +29,17 @@ model AccessInformationContract @armResourceOperations interface AccessInformationContracts { + /** + * Get tenant access information details without secrets. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get tenant access information details without secrets.") @operationId("TenantAccess_Get") get is ArmResourceRead; + /** + * Tenant access metadata + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Tenant access metadata") @head @operationId("TenantAccess_GetEntityTag") getEntityTag( @@ -41,22 +49,29 @@ interface AccessInformationContracts { >, ): OkResponse | ErrorResponse; + /** + * Update tenant access information details. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update tenant access information details.") @operationId("TenantAccess_Create") create is ArmResourceCreateOrReplaceSync< AccessInformationContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Update tenant access information details. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update tenant access information details.") + @parameterVisibility("read") @operationId("TenantAccess_Update") update is ArmCustomPatchSync< AccessInformationContract, @@ -64,44 +79,56 @@ interface AccessInformationContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Returns list of access infos - for Git and Management endpoints. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Returns list of access infos - for Git and Management endpoints.") @operationId("TenantAccess_ListByService") listByService is ArmResourceListByParent< AccessInformationContract, { ...BaseParameters; - @doc("Not used") + /** + * Not used + */ @query("$filter") $filter?: string; } >; + /** + * Regenerate primary access key + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Regenerate primary access key") @operationId("TenantAccess_RegeneratePrimaryKey") regeneratePrimaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void >; + /** + * Regenerate secondary access key + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Regenerate secondary access key") @operationId("TenantAccess_RegenerateSecondaryKey") regenerateSecondaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void >; + /** + * Get tenant access information details. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get tenant access information details.") @operationId("TenantAccess_ListSecrets") listSecrets is ArmResourceActionSync< AccessInformationContract, @@ -109,19 +136,46 @@ interface AccessInformationContracts { AccessInformationSecretsContract >; + /** + * Regenerate primary access key for GIT. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Regenerate primary access key for GIT.") @operationId("TenantAccessGit_RegeneratePrimaryKey") regeneratePrimaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void >; + /** + * Regenerate secondary access key for GIT. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Regenerate secondary access key for GIT.") @operationId("TenantAccessGit_RegenerateSecondaryKey") regenerateSecondaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void >; } + +@@projectedName(AccessInformationContracts.create::parameters.resource, + "json", + "parameters" +); +@@extension(AccessInformationContracts.create::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(AccessInformationContracts.create::parameters.resource, + "Parameters supplied to retrieve the Tenant Access Information." +); +@@projectedName(AccessInformationContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(AccessInformationContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(AccessInformationContracts.update::parameters.properties, + "Parameters supplied to retrieve the Tenant Access Information." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp index bd7b10e894..1cfb896170 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("API details.") +/** + * API details. + */ @parentResource(ApiManagementServiceResource) model ApiContract is ProxyResource { - @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @@ -27,36 +31,47 @@ model ApiContract is ProxyResource { @armResourceOperations interface ApiContracts { + /** + * Gets the details of the API specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the API specified by its identifier.") @operationId("Api_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the API specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the API specified by its identifier.") @head @operationId("Api_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + /** + * Creates new or updates existing specified API of the API Management service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates new or updates existing specified API of the API Management service instance.") @operationId("Api_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< ApiContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; }, ArmLroLocationHeader >; + /** + * Updates the specified API of the API Management service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the specified API of the API Management service instance.") + @parameterVisibility("read") @operationId("Api_Update") update is ArmCustomPatchSync< ApiContract, @@ -64,198 +79,291 @@ interface ApiContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Deletes the specified API of the API Management service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the specified API of the API Management service instance.") @operationId("Api_Delete") delete is ArmResourceDeleteSync< ApiContract, { ...BaseParameters; - @doc("Delete all revisions of the Api.") + /** + * Delete all revisions of the Api. + */ @query("deleteRevisions") deleteRevisions?: boolean; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists all APIs of the API Management service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all APIs of the API Management service instance.") @operationId("Api_ListByService") listByService is ArmResourceListByParent< ApiContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | isCurrent | filter | eq, ne | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | isCurrent | filter | eq, ne | |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Include tags in the response.") + /** + * Include tags in the response. + */ @query("tags") tags?: string; - @doc("Include full ApiVersionSet resource in response") + /** + * Include full ApiVersionSet resource in response + */ @query("expandApiVersionSet") expandApiVersionSet?: boolean; } >; + /** + * Lists all revisions of an API. + */ + // FIXME: ApiRevision_ListByService could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("ApiRevision_ListByService") - @doc("Lists all revisions of an API.") - // FIXME: ApiRevision_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions") @get - ListByService is Azure.Core.Foundations.Operation< + listByService is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("API identifier. Must be unique in the current API Management service instance.") + /** + * API identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @path apiId: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ApiRevisionListResult >; + /** + * Lists all Products, which the API is part of. + */ + // FIXME: ApiProduct_ListByApis could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("ApiProduct_ListByApis") - @doc("Lists all Products, which the API is part of.") - // FIXME: ApiProduct_ListByApis could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products") @get - ListByApis is Azure.Core.Foundations.Operation< + listByApis is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("API identifier. Must be unique in the current API Management service instance.") + /** + * API identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @path apiId: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ResourceListResult >; + /** + * Lists a collection of operations associated with tags. + */ + // FIXME: Operation_ListByTags could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("Operation_ListByTags") - @doc("Lists a collection of operations associated with tags.") - // FIXME: Operation_ListByTags could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags") @get - ListByTags is Azure.Core.Foundations.Operation< + listByTags is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path apiId: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Include not tagged Operations.") + /** + * Include not tagged Operations. + */ @query("includeNotTaggedOperations") includeNotTaggedOperations?: boolean; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, TagResourceListResult >; } + +@@projectedName(ApiContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(ApiContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(ApiContracts.createOrUpdate::parameters.resource, + "Create or update parameters." +); +@@projectedName(ApiContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(ApiContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(ApiContracts.update::parameters.properties, + "API Update Contract parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp index 16c7da4b0b..cbdafdda99 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("A single API Management service resource in List or Get response.") +/** + * A single API Management service resource in List or Get response. + */ model ApiManagementServiceResource is TrackedResource { - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @@ -23,11 +27,15 @@ model ApiManagementServiceResource @segment("service") name: string; - @doc("ETag of the resource.") + /** + * ETag of the resource. + */ @visibility("read") etag?: string; - @doc("A list of availability zones denoting where the resource needs to come from.") + /** + * A list of availability zones denoting where the resource needs to come from. + */ zones?: string[]; ...Azure.ResourceManager.ManagedServiceIdentity; @@ -36,41 +44,56 @@ model ApiManagementServiceResource @armResourceOperations interface ApiManagementServiceResources { + /** + * Gets an API Management service resource description. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets an API Management service resource description.") @operationId("ApiManagementService_Get") get is ArmResourceRead; + /** + * Creates or updates an API Management service. This is long running operation and could take several minutes to complete. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or updates an API Management service. This is long running operation and could take several minutes to complete.") @operationId("ApiManagementService_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Updates an existing API Management service. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates an existing API Management service.") + @parameterVisibility("read") @operationId("ApiManagementService_Update") update is ArmCustomPatchAsync< ApiManagementServiceResource, ApiManagementServiceUpdateParameters >; + /** + * Deletes an existing API Management service. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes an existing API Management service.") @operationId("ApiManagementService_Delete") delete is ArmResourceDeleteAsync; + /** + * List all API Management services within a resource group. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List all API Management services within a resource group.") @operationId("ApiManagementService_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; + /** + * Lists all API Management services within an Azure subscription. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all API Management services within an Azure subscription.") @operationId("ApiManagementService_List") list is ArmListBySubscription; + /** + * Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it.") @operationId("PerformConnectivityCheckAsync") performConnectivityCheckAsync is ArmResourceActionAsync< ApiManagementServiceResource, @@ -80,8 +103,10 @@ interface ApiManagementServiceResources { ArmLroLocationHeader >; + /** + * Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete.") @operationId("ApiManagementService_Restore") restore is ArmResourceActionAsync< ApiManagementServiceResource, @@ -91,8 +116,10 @@ interface ApiManagementServiceResources { ArmLroLocationHeader >; + /** + * Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete.") @operationId("ApiManagementService_Backup") backup is ArmResourceActionAsync< ApiManagementServiceResource, @@ -102,8 +129,10 @@ interface ApiManagementServiceResources { ArmLroLocationHeader >; + /** + * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes.") @operationId("ApiManagementService_GetSsoToken") getSsoToken is ArmResourceActionSync< ApiManagementServiceResource, @@ -111,8 +140,10 @@ interface ApiManagementServiceResources { ApiManagementServiceGetSsoTokenResult >; + /** + * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes.") @operationId("ApiManagementService_ApplyNetworkConfigurationUpdates") applyNetworkConfigurationUpdates is ArmResourceActionAsync< ApiManagementServiceResource, @@ -122,8 +153,10 @@ interface ApiManagementServiceResources { ArmLroLocationHeader >; + /** + * This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete.") @operationId("TenantConfiguration_Deploy") deploy is ArmResourceActionAsync< ApiManagementServiceResource, @@ -132,15 +165,19 @@ interface ApiManagementServiceResources { { ...BaseParameters; - @doc("The identifier of the Git Configuration Operation.") + /** + * The identifier of the Git Configuration Operation. + */ @path configurationName: ConfigurationIdName; }, ArmLroLocationHeader >; + /** + * This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete.") @operationId("TenantConfiguration_Save") save is ArmResourceActionAsync< ApiManagementServiceResource, @@ -149,15 +186,19 @@ interface ApiManagementServiceResources { { ...BaseParameters; - @doc("The identifier of the Git Configuration Operation.") + /** + * The identifier of the Git Configuration Operation. + */ @path configurationName: ConfigurationIdName; }, ArmLroLocationHeader >; + /** + * This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete.") @operationId("TenantConfiguration_Validate") validate is ArmResourceActionAsync< ApiManagementServiceResource, @@ -166,233 +207,312 @@ interface ApiManagementServiceResources { { ...BaseParameters; - @doc("The identifier of the Git Configuration Operation.") + /** + * The identifier of the Git Configuration Operation. + */ @path configurationName: ConfigurationIdName; }, ArmLroLocationHeader >; + /** + * Checks availability and correctness of a name for an API Management service. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Checks availability and correctness of a name for an API Management service.") @operationId("ApiManagementService_CheckNameAvailability") - checkNameAvailability is checkGlobalNameAvailability; + checkNameAvailability is checkGlobalNameAvailability< + ApiManagementServiceCheckNameAvailabilityParameters, + ApiManagementServiceNameAvailabilityResult + >; + /** + * Lists a collection of apis associated with tags. + */ + // FIXME: Api_ListByTags could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("Api_ListByTags") - @doc("Lists a collection of apis associated with tags.") - // FIXME: Api_ListByTags could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags") @get - ListByTags is Azure.Core.Foundations.Operation< + listByTags is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | isCurrent | filter | eq | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | isCurrent | filter | eq | |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Include not tagged APIs.") + /** + * Include not tagged APIs. + */ @query("includeNotTaggedApis") includeNotTaggedApis?: boolean; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, TagResourceListResult >; + /** + * Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. + */ + // FIXME: ContentType_ListByService could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("ContentType_ListByService") - @doc("Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints.") - // FIXME: ContentType_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes") @get - ListByService is Azure.Core.Foundations.Operation< + listByService is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ContentTypeListResult >; + /** + * Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. + */ + // FIXME: ContentType_Get could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("ContentType_Get") - @doc("Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints.") - // FIXME: ContentType_Get could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Content type identifier.") + /** + * Content type identifier. + */ @maxLength(80) @minLength(1) @path contentTypeId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ContentTypeContract >; + /** + * Lists developer portal's content items specified by the provided content type. + */ + // FIXME: ContentItem_ListByService could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("ContentItem_ListByService") - @doc("Lists developer portal's content items specified by the provided content type.") - // FIXME: ContentItem_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems") @get - ListByService is Azure.Core.Foundations.Operation< + listByService is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Content type identifier.") + /** + * Content type identifier. + */ @maxLength(80) @minLength(1) @path contentTypeId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ContentItemListResult >; + /** + * Returns the developer portal's content item specified by its identifier. + */ + // FIXME: ContentItem_Get could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("ContentItem_Get") - @doc("Returns the developer portal's content item specified by its identifier.") - // FIXME: ContentItem_Get could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Content type identifier.") + /** + * Content type identifier. + */ @maxLength(80) @minLength(1) @path contentTypeId: string; - @doc("Content item identifier.") + /** + * Content item identifier. + */ @maxLength(80) @minLength(1) @path contentItemId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ContentItemContract >; + /** + * Gets all available SKU for a given API Management service + */ + // FIXME: ApiManagementServiceSkus_ListAvailableServiceSkus could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("ApiManagementServiceSkus_ListAvailableServiceSkus") @summary("Gets available SKUs for API Management service") - @doc("Gets all available SKU for a given API Management service") - // FIXME: ApiManagementServiceSkus_ListAvailableServiceSkus could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus") @get - ListAvailableServiceSkus is Azure.Core.Foundations.Operation< + listAvailableServiceSkus is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ResourceSkuResults >; + /** + * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + */ + // FIXME: NetworkStatus_ListByService could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("NetworkStatus_ListByService") - @doc("Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService.") - // FIXME: NetworkStatus_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus") @get - ListByService is Azure.Core.Foundations.Operation< + listByService is Azure.Core.Foundations.Operation< { - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @@ -402,30 +522,40 @@ interface ApiManagementServiceResources { void >; + /** + * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. + */ + // FIXME: NetworkStatus_ListByLocation could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("NetworkStatus_ListByLocation") - @doc("Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService.") - // FIXME: NetworkStatus_ListByLocation could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus") @get - ListByLocation is Azure.Core.Foundations.Operation< + listByLocation is Azure.Core.Foundations.Operation< { - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US.") + /** + * Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US. + */ @minLength(1) @path locationName: string; @@ -433,23 +563,31 @@ interface ApiManagementServiceResources { NetworkStatusContract >; + /** + * Gets the network endpoints of all outbound dependencies of a ApiManagement service. + */ + // FIXME: OutboundNetworkDependenciesEndpoints_ListByService could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("OutboundNetworkDependenciesEndpoints_ListByService") - @doc("Gets the network endpoints of all outbound dependencies of a ApiManagement service.") - // FIXME: OutboundNetworkDependenciesEndpoints_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints") @get - ListByService is Azure.Core.Foundations.Operation< + listByService is Azure.Core.Foundations.Operation< { - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @@ -459,573 +597,877 @@ interface ApiManagementServiceResources { OutboundEnvironmentEndpointList >; + /** + * Lists all policy descriptions. + */ + // FIXME: PolicyDescription_ListByService could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("PolicyDescription_ListByService") - @doc("Lists all policy descriptions.") - // FIXME: PolicyDescription_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions") @get - ListByService is Azure.Core.Foundations.Operation< + listByService is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Policy scope.") + /** + * Policy scope. + */ @query("scope") scope?: PolicyScopeContract; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, PolicyDescriptionListResult >; + /** + * Lists a collection of portalsettings defined within a service instance.. + */ + // FIXME: PortalSettings_ListByService could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("PortalSettings_ListByService") - @doc("Lists a collection of portalsettings defined within a service instance..") - // FIXME: PortalSettings_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings") @get - ListByService is Azure.Core.Foundations.Operation< + listByService is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ResourceListResult >; + /** + * Lists a collection of products associated with tags. + */ + // FIXME: Product_ListByTags could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("Product_ListByTags") - @doc("Lists a collection of products associated with tags.") - // FIXME: Product_ListByTags could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags") @get - ListByTags is Azure.Core.Foundations.Operation< + listByTags is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Include not tagged Products.") + /** + * Include not tagged Products. + */ @query("includeNotTaggedProducts") includeNotTaggedProducts?: boolean; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, TagResourceListResult >; + /** + * Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. + */ + // FIXME: QuotaByCounterKeys_ListByService could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("QuotaByCounterKeys_ListByService") - @doc("Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet.") - // FIXME: QuotaByCounterKeys_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}") @get - ListByService is Azure.Core.Foundations.Operation< + listByService is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key=\"boo\" in the policy, then it’s accessible by \"boo\" counter key. But if it’s defined as counter-key=\"@(\"b\"+\"a\")\" then it will be accessible by \"ba\" key") + /** + * Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key + */ @path quotaCounterKey: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, QuotaCounterListResult >; + /** + * Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. + */ + // FIXME: QuotaByPeriodKeys_Get could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("QuotaByPeriodKeys_Get") - @doc("Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance.") - // FIXME: QuotaByPeriodKeys_Get could not be converted to a resource operation - Get is Azure.Core.ResourceRead; + get is Azure.Core.ResourceRead; + /** + * Lists all azure regions in which the service exists. + */ + // FIXME: Region_ListByService could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("Region_ListByService") - @doc("Lists all azure regions in which the service exists.") - // FIXME: Region_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions") @get - ListByService is Azure.Core.Foundations.Operation< + listByService is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, RegionListResult >; + /** + * Lists report records by API. + */ + // FIXME: Reports_ListByApi could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("Reports_ListByApi") - @doc("Lists report records by API.") - // FIXME: Reports_ListByApi could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi") @get - ListByApi is Azure.Core.Foundations.Operation< + listByApi is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("The filter to apply on the operation.") + /** + * The filter to apply on the operation. + */ @query("$filter") $filter: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("OData order by query option.") + /** + * OData order by query option. + */ @query("$orderby") orderBy?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ReportListResult >; + /** + * Lists report records by User. + */ + // FIXME: Reports_ListByUser could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("Reports_ListByUser") - @doc("Lists report records by User.") - // FIXME: Reports_ListByUser could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser") @get - ListByUser is Azure.Core.Foundations.Operation< + listByUser is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | userId | select, filter | eq | |
    | apiRegion | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | userId | select, filter | eq | |
    | apiRegion | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    + */ @query("$filter") $filter: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("OData order by query option.") + /** + * OData order by query option. + */ @query("$orderby") orderBy?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ReportListResult >; + /** + * Lists report records by API Operations. + */ + // FIXME: Reports_ListByOperation could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("Reports_ListByOperation") - @doc("Lists report records by API Operations.") - // FIXME: Reports_ListByOperation could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation") @get - ListByOperation is Azure.Core.Foundations.Operation< + listByOperation is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | select, filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | select, filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    + */ @query("$filter") $filter: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("OData order by query option.") + /** + * OData order by query option. + */ @query("$orderby") orderBy?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ReportListResult >; + /** + * Lists report records by Product. + */ + // FIXME: Reports_ListByProduct could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("Reports_ListByProduct") - @doc("Lists report records by Product.") - // FIXME: Reports_ListByProduct could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct") @get - ListByProduct is Azure.Core.Foundations.Operation< + listByProduct is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | select, filter | eq | |
    | subscriptionId | filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | select, filter | eq | |
    | subscriptionId | filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    + */ @query("$filter") $filter: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("OData order by query option.") + /** + * OData order by query option. + */ @query("$orderby") orderBy?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ReportListResult >; + /** + * Lists report records by geography. + */ + // FIXME: Reports_ListByGeo could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("Reports_ListByGeo") - @doc("Lists report records by geography.") - // FIXME: Reports_ListByGeo could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo") @get - ListByGeo is Azure.Core.Foundations.Operation< + listByGeo is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | country | select | | |
    | region | select | | |
    | zip | select | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | callCountSuccess | select | | |
    | callCountBlocked | select | | |
    | callCountFailed | select | | |
    | callCountOther | select | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | country | select | | |
    | region | select | | |
    | zip | select | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | callCountSuccess | select | | |
    | callCountBlocked | select | | |
    | callCountFailed | select | | |
    | callCountOther | select | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    + */ @query("$filter") $filter: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ReportListResult >; + /** + * Lists report records by subscription. + */ + // FIXME: Reports_ListBySubscription could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("Reports_ListBySubscription") - @doc("Lists report records by subscription.") - // FIXME: Reports_ListBySubscription could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription") @get - ListBySubscription is Azure.Core.Foundations.Operation< + listBySubscription is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | apiRegion | filter | eq | |
    | userId | select, filter | eq | |
    | productId | select, filter | eq | |
    | subscriptionId | select, filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | apiRegion | filter | eq | |
    | userId | select, filter | eq | |
    | productId | select, filter | eq | |
    | subscriptionId | select, filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    + */ @query("$filter") $filter: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("OData order by query option.") + /** + * OData order by query option. + */ @query("$orderby") orderBy?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ReportListResult >; + /** + * Lists report records by Time. + */ + // FIXME: Reports_ListByTime could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("Reports_ListByTime") - @doc("Lists report records by Time.") - // FIXME: Reports_ListByTime could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime") @get - ListByTime is Azure.Core.Foundations.Operation< + listByTime is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter, select | ge, le | |
    | interval | select | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | callCountSuccess | select | | |
    | callCountBlocked | select | | |
    | callCountFailed | select | | |
    | callCountOther | select | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter, select | ge, le | |
    | interval | select | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | callCountSuccess | select | | |
    | callCountBlocked | select | | |
    | callCountFailed | select | | |
    | callCountOther | select | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    + */ @query("$filter") $filter: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("OData order by query option.") + /** + * OData order by query option. + */ @query("$orderby") orderBy?: string; - @doc("By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)).") + /** + * By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). + */ @query("interval") interval: duration; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ReportListResult >; + /** + * Lists report records by Request. + */ + // FIXME: Reports_ListByRequest could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("Reports_ListByRequest") - @doc("Lists report records by Request.") - // FIXME: Reports_ListByRequest could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest") @get - ListByRequest is Azure.Core.Foundations.Operation< + listByRequest is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | productId | filter | eq | |
    | userId | filter | eq | |
    | apiRegion | filter | eq | |
    | subscriptionId | filter | eq | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | productId | filter | eq | |
    | userId | filter | eq | |
    | apiRegion | filter | eq | |
    | subscriptionId | filter | eq | |
    + */ @query("$filter") $filter: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, RequestReportListResult >; + /** + * Lists a collection of resources associated with tags. + */ + // FIXME: TagResource_ListByService could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("TagResource_ListByService") - @doc("Lists a collection of resources associated with tags.") - // FIXME: TagResource_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources") @get - ListByService is Azure.Core.Foundations.Operation< + listByService is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | isCurrent | filter | eq | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | isCurrent | filter | eq | |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, TagResourceListResult >; + /** + * Gets the status of the most recent synchronization between the configuration database and the Git repository. + */ + // FIXME: TenantConfiguration_GetSyncState could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("TenantConfiguration_GetSyncState") - @doc("Gets the status of the most recent synchronization between the configuration database and the Git repository.") - // FIXME: TenantConfiguration_GetSyncState could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState") @get - GetSyncState is Azure.Core.Foundations.Operation< + getSyncState is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("The identifier of the Git Configuration Operation.") + /** + * The identifier of the Git Configuration Operation. + */ @path configurationName: ConfigurationIdName; }, TenantConfigurationSyncStateContract >; } + +@@projectedName(ApiManagementServiceResources.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(ApiManagementServiceResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(ApiManagementServiceResources.createOrUpdate::parameters.resource, + "Parameters supplied to the CreateOrUpdate API Management service operation." +); +@@projectedName(ApiManagementServiceResources.update::parameters.properties, + "json", + "parameters" +); +@@extension(ApiManagementServiceResources.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(ApiManagementServiceResources.update::parameters.properties, + "Parameters supplied to the CreateOrUpdate API Management service operation." +); +@@projectedName(ApiManagementServiceResources.performConnectivityCheckAsync::parameters.body, + "json", + "connectivityCheckRequestParams" +); +@@extension(ApiManagementServiceResources.performConnectivityCheckAsync::parameters.body, + "x-ms-client-name", + "connectivityCheckRequestParams" +); +@@doc(ApiManagementServiceResources.performConnectivityCheckAsync::parameters.body, + "Connectivity Check request parameters." +); +@@projectedName(ApiManagementServiceResources.restore::parameters.body, + "json", + "parameters" +); +@@extension(ApiManagementServiceResources.restore::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(ApiManagementServiceResources.restore::parameters.body, + "Parameters supplied to the Restore API Management service from backup operation." +); +@@projectedName(ApiManagementServiceResources.backup::parameters.body, + "json", + "parameters" +); +@@extension(ApiManagementServiceResources.backup::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(ApiManagementServiceResources.backup::parameters.body, + "Parameters supplied to the ApiManagementService_Backup operation." +); +@@projectedName(ApiManagementServiceResources.applyNetworkConfigurationUpdates::parameters.body, + "json", + "parameters" +); +@@extension(ApiManagementServiceResources.applyNetworkConfigurationUpdates::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(ApiManagementServiceResources.applyNetworkConfigurationUpdates::parameters.body, + "Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region." +); +@@projectedName(ApiManagementServiceResources.deploy::parameters.body, + "json", + "parameters" +); +@@extension(ApiManagementServiceResources.deploy::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(ApiManagementServiceResources.deploy::parameters.body, + "Deploy Configuration parameters." +); +@@projectedName(ApiManagementServiceResources.save::parameters.body, + "json", + "parameters" +); +@@extension(ApiManagementServiceResources.save::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(ApiManagementServiceResources.save::parameters.body, + "Save Configuration parameters." +); +@@projectedName(ApiManagementServiceResources.validate::parameters.body, + "json", + "parameters" +); +@@extension(ApiManagementServiceResources.validate::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(ApiManagementServiceResources.validate::parameters.body, + "Validate Configuration parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp index 8c2352e091..6f234d3374 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("ApiRelease details.") +/** + * ApiRelease details. + */ @parentResource(ApiContract) model ApiReleaseContract is ProxyResource { - @doc("Release identifier within an API. Must be unique in the current API Management service instance.") + /** + * Release identifier within an API. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @@ -27,13 +31,17 @@ model ApiReleaseContract is ProxyResource { @armResourceOperations interface ApiReleaseContracts { + /** + * Returns the details of an API release. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Returns the details of an API release.") @operationId("ApiRelease_Get") get is ArmResourceRead; + /** + * Returns the etag of an API release. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Returns the etag of an API release.") @head @operationId("ApiRelease_GetEntityTag") getEntityTag( @@ -43,22 +51,29 @@ interface ApiReleaseContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates a new Release for the API. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates a new Release for the API.") @operationId("ApiRelease_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< ApiReleaseContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Updates the details of the release of the API specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the details of the release of the API specified by its identifier.") + @parameterVisibility("read") @operationId("ApiRelease_Update") update is ArmCustomPatchSync< ApiReleaseContract, @@ -66,46 +81,83 @@ interface ApiReleaseContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Deletes the specified release in the API. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the specified release in the API.") @operationId("ApiRelease_Delete") delete is ArmResourceDeleteSync< ApiReleaseContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters.") @operationId("ApiRelease_ListByService") listByService is ArmResourceListByParent< ApiReleaseContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; } + +@@projectedName(ApiReleaseContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(ApiReleaseContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(ApiReleaseContracts.createOrUpdate::parameters.resource, + "Create parameters." +); +@@projectedName(ApiReleaseContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(ApiReleaseContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(ApiReleaseContracts.update::parameters.properties, + "API Release Update parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp index 653ba9f730..1177a136e9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("API Version Set Contract details.") +/** + * API Version Set Contract details. + */ @parentResource(ApiManagementServiceResource) model ApiVersionSetContract is ProxyResource { - @doc("Api Version Set identifier. Must be unique in the current API Management service instance.") + /** + * Api Version Set identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @@ -27,13 +31,17 @@ model ApiVersionSetContract is ProxyResource { @armResourceOperations interface ApiVersionSetContracts { + /** + * Gets the details of the Api Version Set specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the Api Version Set specified by its identifier.") @operationId("ApiVersionSet_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the Api Version Set specified by its identifier.") @head @operationId("ApiVersionSet_GetEntityTag") getEntityTag( @@ -43,22 +51,29 @@ interface ApiVersionSetContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates or Updates a Api Version Set. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or Updates a Api Version Set.") @operationId("ApiVersionSet_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< ApiVersionSetContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Updates the details of the Api VersionSet specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the details of the Api VersionSet specified by its identifier.") + @parameterVisibility("read") @operationId("ApiVersionSet_Update") update is ArmCustomPatchSync< ApiVersionSetContract, @@ -66,46 +81,83 @@ interface ApiVersionSetContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Deletes specific Api Version Set. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes specific Api Version Set.") @operationId("ApiVersionSet_Delete") delete is ArmResourceDeleteSync< ApiVersionSetContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists a collection of API Version Sets in the specified service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of API Version Sets in the specified service instance.") @operationId("ApiVersionSet_ListByService") listByService is ArmResourceListByParent< ApiVersionSetContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; } + +@@projectedName(ApiVersionSetContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(ApiVersionSetContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(ApiVersionSetContracts.createOrUpdate::parameters.resource, + "Create or update parameters." +); +@@projectedName(ApiVersionSetContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(ApiVersionSetContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(ApiVersionSetContracts.update::parameters.properties, + "Update parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp index 7fd71b9dae..33be0cc46d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("External OAuth authorization server settings.") +/** + * External OAuth authorization server settings. + */ @parentResource(ApiManagementServiceResource) model AuthorizationServerContract is ProxyResource { - @doc("Identifier of the authorization server.") + /** + * Identifier of the authorization server. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @@ -28,13 +32,17 @@ model AuthorizationServerContract @armResourceOperations interface AuthorizationServerContracts { + /** + * Gets the details of the authorization server specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the authorization server specified by its identifier.") @operationId("AuthorizationServer_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the authorizationServer specified by its identifier.") @head @operationId("AuthorizationServer_GetEntityTag") getEntityTag( @@ -44,22 +52,29 @@ interface AuthorizationServerContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates new authorization server or updates an existing authorization server. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates new authorization server or updates an existing authorization server.") @operationId("AuthorizationServer_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< AuthorizationServerContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Updates the details of the authorization server specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the details of the authorization server specified by its identifier.") + @parameterVisibility("read") @operationId("AuthorizationServer_Update") update is ArmCustomPatchSync< AuthorizationServerContract, @@ -67,51 +82,67 @@ interface AuthorizationServerContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Deletes specific authorization server instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes specific authorization server instance.") @operationId("AuthorizationServer_Delete") delete is ArmResourceDeleteSync< AuthorizationServerContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists a collection of authorization servers defined within a service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of authorization servers defined within a service instance.") @operationId("AuthorizationServer_ListByService") listByService is ArmResourceListByParent< AuthorizationServerContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; + /** + * Gets the client secret details of the authorization server. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the client secret details of the authorization server.") @operationId("AuthorizationServer_ListSecrets") listSecrets is ArmResourceActionSync< AuthorizationServerContract, @@ -119,3 +150,26 @@ interface AuthorizationServerContracts { AuthorizationServerSecretsContract >; } + +@@projectedName(AuthorizationServerContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(AuthorizationServerContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(AuthorizationServerContracts.createOrUpdate::parameters.resource, + "Create or update parameters." +); +@@projectedName(AuthorizationServerContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(AuthorizationServerContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(AuthorizationServerContracts.update::parameters.properties, + "OAuth2 Server settings Update parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp index a2688e4528..279d8242e9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Backend details.") +/** + * Backend details. + */ @parentResource(ApiManagementServiceResource) model BackendContract is ProxyResource { - @doc("Identifier of the Backend entity. Must be unique in the current API Management service instance.") + /** + * Identifier of the Backend entity. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @path @@ -26,13 +30,17 @@ model BackendContract is ProxyResource { @armResourceOperations interface BackendContracts { + /** + * Gets the details of the backend specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the backend specified by its identifier.") @operationId("Backend_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the backend specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the backend specified by its identifier.") @head @operationId("Backend_GetEntityTag") getEntityTag( @@ -42,22 +50,29 @@ interface BackendContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates or Updates a backend. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or Updates a backend.") @operationId("Backend_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< BackendContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Updates an existing backend. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates an existing backend.") + @parameterVisibility("read") @operationId("Backend_Update") update is ArmCustomPatchSync< BackendContract, @@ -65,54 +80,102 @@ interface BackendContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Deletes the specified backend. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the specified backend.") @operationId("Backend_Delete") delete is ArmResourceDeleteSync< BackendContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists a collection of backends in the specified service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of backends in the specified service instance.") @operationId("Backend_ListByService") listByService is ArmResourceListByParent< BackendContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; + /** + * Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used.") @operationId("Backend_Reconnect") reconnect is ArmResourceActionNoContentSync< BackendContract, BackendReconnectContract >; } + +@@projectedName(BackendContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(BackendContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(BackendContracts.createOrUpdate::parameters.resource, + "Create parameters." +); +@@projectedName(BackendContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(BackendContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(BackendContracts.update::parameters.properties, "Update parameters."); +@@projectedName(BackendContracts.reconnect::parameters.body, + "json", + "parameters" +); +@@extension(BackendContracts.reconnect::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(BackendContracts.reconnect::parameters.body, + "Reconnect request parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp index 03c56a82c9..b19c8027b7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Cache details.") +/** + * Cache details. + */ @parentResource(ApiManagementServiceResource) model CacheContract is ProxyResource { - @doc("Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier).") + /** + * Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @@ -27,35 +31,46 @@ model CacheContract is ProxyResource { @armResourceOperations interface CacheContracts { + /** + * Gets the details of the Cache specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the Cache specified by its identifier.") @operationId("Cache_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the Cache specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the Cache specified by its identifier.") @head @operationId("Cache_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + /** + * Creates or updates an External Cache to be used in Api Management instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or updates an External Cache to be used in Api Management instance.") @operationId("Cache_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< CacheContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Updates the details of the cache specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the details of the cache specified by its identifier.") + @parameterVisibility("read") @operationId("Cache_Update") update is ArmCustomPatchSync< CacheContract, @@ -63,42 +78,75 @@ interface CacheContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Deletes specific Cache. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes specific Cache.") @operationId("Cache_Delete") delete is ArmResourceDeleteSync< CacheContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists a collection of all external Caches in the specified service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of all external Caches in the specified service instance.") @operationId("Cache_ListByService") listByService is ArmResourceListByParent< CacheContract, { ...BaseParameters; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; } + +@@projectedName(CacheContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(CacheContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(CacheContracts.createOrUpdate::parameters.resource, + "Create or Update parameters." +); +@@projectedName(CacheContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(CacheContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(CacheContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp index a3cdffa810..e52a4fd6be 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Certificate details.") +/** + * Certificate details. + */ @parentResource(ApiManagementServiceResource) model CertificateContract is ProxyResource { - @doc("Identifier of the certificate entity. Must be unique in the current API Management service instance.") + /** + * Identifier of the certificate entity. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @@ -27,13 +31,17 @@ model CertificateContract is ProxyResource { @armResourceOperations interface CertificateContracts { + /** + * Gets the details of the certificate specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the certificate specified by its identifier.") @operationId("Certificate_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the certificate specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the certificate specified by its identifier.") @head @operationId("Certificate_GetEntityTag") getEntityTag( @@ -43,63 +51,83 @@ interface CertificateContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates or updates the certificate being used for authentication with the backend. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or updates the certificate being used for authentication with the backend.") @operationId("Certificate_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< CertificateContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Deletes specific certificate. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes specific certificate.") @operationId("Certificate_Delete") delete is ArmResourceDeleteSync< CertificateContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists a collection of all certificates in the specified service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of all certificates in the specified service instance.") @operationId("Certificate_ListByService") listByService is ArmResourceListByParent< CertificateContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | expirationDate | filter | ge, le, eq, ne, gt, lt | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | expirationDate | filter | ge, le, eq, ne, gt, lt | |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("When set to true, the response contains only certificates entities which failed refresh.") + /** + * When set to true, the response contains only certificates entities which failed refresh. + */ @query("isKeyVaultRefreshFailed") isKeyVaultRefreshFailed?: boolean; } >; + /** + * From KeyVault, Refresh the certificate being used for authentication with the backend. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("From KeyVault, Refresh the certificate being used for authentication with the backend.") @operationId("Certificate_RefreshSecret") refreshSecret is ArmResourceActionSync< CertificateContract, @@ -107,3 +135,15 @@ interface CertificateContracts { CertificateContract >; } + +@@projectedName(CertificateContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(CertificateContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(CertificateContracts.createOrUpdate::parameters.resource, + "Create or Update parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp index f2b6414108..e9dae2b4c6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp @@ -11,11 +11,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Deleted API Management Service information.") +/** + * Deleted API Management Service information. + */ @locationResource model DeletedServiceContract is ProxyResource { - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @@ -27,13 +31,17 @@ model DeletedServiceContract @armResourceOperations interface DeletedServiceContracts { + /** + * Get soft-deleted Api Management Service by name. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get soft-deleted Api Management Service by name.") @operationId("DeletedServices_GetByName") getByName is ArmResourceRead; + /** + * Purges Api Management Service (deletes it with no option to undelete). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Purges Api Management Service (deletes it with no option to undelete).") @operationId("DeletedServices_Purge") purge is ArmResourceDeleteAsync< DeletedServiceContract, @@ -41,8 +49,10 @@ interface DeletedServiceContracts { ArmLroLocationHeader >; + /** + * Lists all soft-deleted services available for undelete for the given subscription. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all soft-deleted services available for undelete for the given subscription.") @operationId("DeletedServices_ListBySubscription") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp index b119230810..51dbcb5d9a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Diagnostic details.") +/** + * Diagnostic details. + */ @parentResource(ApiContract) model DiagnosticContract is ProxyResource { - @doc("Diagnostic identifier. Must be unique in the current API Management service instance.") + /** + * Diagnostic identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @@ -27,13 +31,17 @@ model DiagnosticContract is ProxyResource { @armResourceOperations interface DiagnosticContracts { + /** + * Gets the details of the Diagnostic for an API specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the Diagnostic for an API specified by its identifier.") @operationId("ApiDiagnostic_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier.") @head @operationId("ApiDiagnostic_GetEntityTag") getEntityTag( @@ -43,22 +51,29 @@ interface DiagnosticContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates a new Diagnostic for an API or updates an existing one. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates a new Diagnostic for an API or updates an existing one.") @operationId("ApiDiagnostic_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< DiagnosticContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Updates the details of the Diagnostic for an API specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the details of the Diagnostic for an API specified by its identifier.") + @parameterVisibility("read") @operationId("ApiDiagnostic_Update") update is ArmCustomPatchSync< DiagnosticContract, @@ -66,46 +81,83 @@ interface DiagnosticContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Deletes the specified Diagnostic from an API. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the specified Diagnostic from an API.") @operationId("ApiDiagnostic_Delete") delete is ArmResourceDeleteSync< DiagnosticContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists all diagnostics of an API. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all diagnostics of an API.") @operationId("ApiDiagnostic_ListByService") listByService is ArmResourceListByParent< DiagnosticContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; } + +@@projectedName(DiagnosticContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(DiagnosticContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(DiagnosticContracts.createOrUpdate::parameters.resource, + "Create parameters." +); +@@projectedName(DiagnosticContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(DiagnosticContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(DiagnosticContracts.update::parameters.properties, + "Diagnostic Update parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp index e9da89e30c..4ccf7714fb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Email Template details.") +/** + * Email Template details. + */ @parentResource(ApiManagementServiceResource) model EmailTemplateContract is ProxyResource { - @doc("Email Template Name Identifier.") + /** + * Email Template Name Identifier. + */ @path @key("templateName") @segment("templates") @@ -24,13 +28,17 @@ model EmailTemplateContract is ProxyResource { @armResourceOperations interface EmailTemplateContracts { + /** + * Gets the details of the email template specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the email template specified by its identifier.") @operationId("EmailTemplate_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the email template specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the email template specified by its identifier.") @head @operationId("EmailTemplate_GetEntityTag") getEntityTag( @@ -40,22 +48,29 @@ interface EmailTemplateContracts { >, ): OkResponse | ErrorResponse; + /** + * Updates an Email Template. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates an Email Template.") @operationId("EmailTemplate_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< EmailTemplateContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Updates API Management email template + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates API Management email template") + @parameterVisibility("read") @operationId("EmailTemplate_Update") update is ArmCustomPatchSync< EmailTemplateContract, @@ -63,46 +78,83 @@ interface EmailTemplateContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Reset the Email Template to default template provided by the API Management service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Reset the Email Template to default template provided by the API Management service instance.") @operationId("EmailTemplate_Delete") delete is ArmResourceDeleteSync< EmailTemplateContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Gets all email templates + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets all email templates") @operationId("EmailTemplate_ListByService") listByService is ArmResourceListByParent< EmailTemplateContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; } + +@@projectedName(EmailTemplateContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(EmailTemplateContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(EmailTemplateContracts.createOrUpdate::parameters.resource, + "Email Template update parameters." +); +@@projectedName(EmailTemplateContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(EmailTemplateContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(EmailTemplateContracts.update::parameters.properties, + "Update parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp index 5816a60db4..d6b69628fd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Gateway certificate authority details.") +/** + * Gateway certificate authority details. + */ @parentResource(GatewayContract) model GatewayCertificateAuthorityContract is ProxyResource { - @doc("Identifier of the certificate entity. Must be unique in the current API Management service instance.") + /** + * Identifier of the certificate entity. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @@ -28,13 +32,17 @@ model GatewayCertificateAuthorityContract @armResourceOperations interface GatewayCertificateAuthorityContracts { + /** + * Get assigned Gateway Certificate Authority details. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get assigned Gateway Certificate Authority details.") @operationId("GatewayCertificateAuthority_Get") get is ArmResourceRead; + /** + * Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Checks if Certificate entity is assigned to Gateway entity as Certificate Authority.") @head @operationId("GatewayCertificateAuthority_GetEntityTag") getEntityTag( @@ -44,54 +52,82 @@ interface GatewayCertificateAuthorityContracts { >, ): OkResponse | ErrorResponse; + /** + * Assign Certificate entity to Gateway entity as Certificate Authority. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Assign Certificate entity to Gateway entity as Certificate Authority.") @operationId("GatewayCertificateAuthority_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayCertificateAuthorityContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Remove relationship between Certificate Authority and Gateway entity. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Remove relationship between Certificate Authority and Gateway entity.") @operationId("GatewayCertificateAuthority_Delete") delete is ArmResourceDeleteSync< GatewayCertificateAuthorityContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists the collection of Certificate Authorities for the specified Gateway entity. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists the collection of Certificate Authorities for the specified Gateway entity.") @operationId("GatewayCertificateAuthority_ListByService") listByService is ArmResourceListByParent< GatewayCertificateAuthorityContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | eq, ne | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | eq, ne | |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; } + +@@projectedName(GatewayCertificateAuthorityContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(GatewayCertificateAuthorityContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(GatewayCertificateAuthorityContracts.createOrUpdate::parameters.resource, + "" +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp index 5060171ccd..dfb707ff58 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Gateway details.") +/** + * Gateway details. + */ @parentResource(ApiManagementServiceResource) model GatewayContract is ProxyResource { - @doc("Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'") + /** + * Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed' + */ @maxLength(80) @minLength(1) @path @@ -26,13 +30,17 @@ model GatewayContract is ProxyResource { @armResourceOperations interface GatewayContracts { + /** + * Gets the details of the Gateway specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the Gateway specified by its identifier.") @operationId("Gateway_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the Gateway specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the Gateway specified by its identifier.") @head @operationId("Gateway_GetEntityTag") getEntityTag( @@ -42,22 +50,29 @@ interface GatewayContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates or updates a Gateway to be used in Api Management instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or updates a Gateway to be used in Api Management instance.") @operationId("Gateway_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Updates the details of the gateway specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the details of the gateway specified by its identifier.") + @parameterVisibility("read") @operationId("Gateway_Update") update is ArmCustomPatchSync< GatewayContract, @@ -65,64 +80,84 @@ interface GatewayContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Deletes specific Gateway. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes specific Gateway.") @operationId("Gateway_Delete") delete is ArmResourceDeleteSync< GatewayContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists a collection of gateways registered with service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of gateways registered with service instance.") @operationId("Gateway_ListByService") listByService is ArmResourceListByParent< GatewayContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; + /** + * Retrieves gateway keys. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Retrieves gateway keys.") @operationId("Gateway_ListKeys") listKeys is ArmResourceActionSync; + /** + * Regenerates specified gateway key invalidating any tokens created with it. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Regenerates specified gateway key invalidating any tokens created with it.") @operationId("Gateway_RegenerateKey") regenerateKey is ArmResourceActionNoContentSync< GatewayContract, GatewayKeyRegenerationRequestContract >; + /** + * Gets the Shared Access Authorization Token for the gateway. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the Shared Access Authorization Token for the gateway.") @operationId("Gateway_GenerateToken") generateToken is ArmResourceActionSync< GatewayContract, @@ -130,48 +165,101 @@ interface GatewayContracts { GatewayTokenContract >; + /** + * Lists a collection of the APIs associated with a gateway. + */ + // FIXME: GatewayApi_ListByService could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("GatewayApi_ListByService") - @doc("Lists a collection of the APIs associated with a gateway.") - // FIXME: GatewayApi_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis") @get - ListByService is Azure.Core.Foundations.Operation< + listByService is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'") + /** + * Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed' + */ @maxLength(80) @minLength(1) @path gatewayId: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ApiManagementGatewayApiListResult >; } + +@@projectedName(GatewayContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(GatewayContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(GatewayContracts.createOrUpdate::parameters.resource, ""); +@@projectedName(GatewayContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(GatewayContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(GatewayContracts.update::parameters.properties, ""); +@@projectedName(GatewayContracts.regenerateKey::parameters.body, + "json", + "parameters" +); +@@extension(GatewayContracts.regenerateKey::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(GatewayContracts.regenerateKey::parameters.body, ""); +@@projectedName(GatewayContracts.generateToken::parameters.body, + "json", + "parameters" +); +@@extension(GatewayContracts.generateToken::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(GatewayContracts.generateToken::parameters.body, ""); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp index cf3db9b401..bf7a3da940 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Gateway hostname configuration details.") +/** + * Gateway hostname configuration details. + */ @parentResource(GatewayContract) model GatewayHostnameConfigurationContract is ProxyResource { - @doc("Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity.") + /** + * Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. + */ @maxLength(80) @minLength(1) @path @@ -27,13 +31,17 @@ model GatewayHostnameConfigurationContract @armResourceOperations interface GatewayHostnameConfigurationContracts { + /** + * Get details of a hostname configuration + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get details of a hostname configuration") @operationId("GatewayHostnameConfiguration_Get") get is ArmResourceRead; + /** + * Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Checks that hostname configuration entity specified by identifier exists for specified Gateway entity.") @head @operationId("GatewayHostnameConfiguration_GetEntityTag") getEntityTag( @@ -43,54 +51,82 @@ interface GatewayHostnameConfigurationContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates of updates hostname configuration for a Gateway. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates of updates hostname configuration for a Gateway.") @operationId("GatewayHostnameConfiguration_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayHostnameConfigurationContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Deletes the specified hostname configuration from the specified Gateway. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the specified hostname configuration from the specified Gateway.") @operationId("GatewayHostnameConfiguration_Delete") delete is ArmResourceDeleteSync< GatewayHostnameConfigurationContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists the collection of hostname configurations for the specified gateway. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists the collection of hostname configurations for the specified gateway.") @operationId("GatewayHostnameConfiguration_ListByService") listByService is ArmResourceListByParent< GatewayHostnameConfigurationContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; } + +@@projectedName(GatewayHostnameConfigurationContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(GatewayHostnameConfigurationContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(GatewayHostnameConfigurationContracts.createOrUpdate::parameters.resource, + "" +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp index 15b4ef58fd..9c57195305 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Global Schema Contract details.") +/** + * Global Schema Contract details. + */ @parentResource(ApiManagementServiceResource) model GlobalSchemaContract is ProxyResource { - @doc("Schema id identifier. Must be unique in the current API Management service instance.") + /** + * Schema id identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @path @@ -26,13 +30,17 @@ model GlobalSchemaContract is ProxyResource { @armResourceOperations interface GlobalSchemaContracts { + /** + * Gets the details of the Schema specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the Schema specified by its identifier.") @operationId("GlobalSchema_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the Schema specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the Schema specified by its identifier.") @head @operationId("GlobalSchema_GetEntityTag") getEntityTag( @@ -42,55 +50,83 @@ interface GlobalSchemaContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates new or updates existing specified Schema of the API Management service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates new or updates existing specified Schema of the API Management service instance.") @operationId("GlobalSchema_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< GlobalSchemaContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; }, ArmLroLocationHeader >; + /** + * Deletes specific Schema. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes specific Schema.") @operationId("GlobalSchema_Delete") delete is ArmResourceDeleteSync< GlobalSchemaContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists a collection of schemas registered with service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of schemas registered with service instance.") @operationId("GlobalSchema_ListByService") listByService is ArmResourceListByParent< GlobalSchemaContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; } + +@@projectedName(GlobalSchemaContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(GlobalSchemaContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(GlobalSchemaContracts.createOrUpdate::parameters.resource, + "Create or update parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp index a98a44d844..46d19d8e97 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Contract details.") +/** + * Contract details. + */ @parentResource(ApiManagementServiceResource) model GroupContract is ProxyResource { - @doc("Group identifier. Must be unique in the current API Management service instance.") + /** + * Group identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path @@ -26,35 +30,46 @@ model GroupContract is ProxyResource { @armResourceOperations interface GroupContracts { + /** + * Gets the details of the group specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the group specified by its identifier.") @operationId("Group_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the group specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the group specified by its identifier.") @head @operationId("Group_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + /** + * Creates or Updates a group. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or Updates a group.") @operationId("Group_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GroupContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Updates the details of the group specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the details of the group specified by its identifier.") + @parameterVisibility("read") @operationId("Group_Update") update is ArmCustomPatchSync< GroupContract, @@ -62,91 +77,140 @@ interface GroupContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Deletes specific group of the API Management service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes specific group of the API Management service instance.") @operationId("Group_Delete") delete is ArmResourceDeleteSync< GroupContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists a collection of groups defined within a service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of groups defined within a service instance.") @operationId("Group_ListByService") listByService is ArmResourceListByParent< GroupContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | externalId | filter | eq | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | externalId | filter | eq | |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; + /** + * Lists a collection of user entities associated with the group. + */ + // FIXME: GroupUser_List could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("GroupUser_List") - @doc("Lists a collection of user entities associated with the group.") - // FIXME: GroupUser_List could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Group identifier. Must be unique in the current API Management service instance.") + /** + * Group identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path groupId: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | registrationDate | filter | ge, le, eq, ne, gt, lt | |
    | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | registrationDate | filter | ge, le, eq, ne, gt, lt | |
    | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ApiManagementGroupUserListResult >; } + +@@projectedName(GroupContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(GroupContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(GroupContracts.createOrUpdate::parameters.resource, "Create parameters."); +@@projectedName(GroupContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(GroupContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(GroupContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp index 898881f736..a80172d529 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Identity Provider details.") +/** + * Identity Provider details. + */ @parentResource(ApiManagementServiceResource) model IdentityProviderContract is ProxyResource { - @doc("Identity Provider Type identifier.") + /** + * Identity Provider Type identifier. + */ @path @key("identityProviderName") @segment("identityProviders") @@ -25,13 +29,17 @@ model IdentityProviderContract @armResourceOperations interface IdentityProviderContracts { + /** + * Gets the configuration details of the identity Provider configured in specified service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the configuration details of the identity Provider configured in specified service instance.") @operationId("IdentityProvider_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the identityProvider specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the identityProvider specified by its identifier.") @head @operationId("IdentityProvider_GetEntityTag") getEntityTag( @@ -41,22 +49,29 @@ interface IdentityProviderContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates or Updates the IdentityProvider configuration. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or Updates the IdentityProvider configuration.") @operationId("IdentityProvider_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IdentityProviderContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Updates an existing IdentityProvider configuration. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates an existing IdentityProvider configuration.") + @parameterVisibility("read") @operationId("IdentityProvider_Update") update is ArmCustomPatchSync< IdentityProviderContract, @@ -64,33 +79,43 @@ interface IdentityProviderContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Deletes the specified identity provider configuration. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the specified identity provider configuration.") @operationId("IdentityProvider_Delete") delete is ArmResourceDeleteSync< IdentityProviderContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists a collection of Identity Provider configured in the specified service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of Identity Provider configured in the specified service instance.") @operationId("IdentityProvider_ListByService") listByService is ArmResourceListByParent; + /** + * Gets the client secret details of the Identity Provider. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the client secret details of the Identity Provider.") @operationId("IdentityProvider_ListSecrets") listSecrets is ArmResourceActionSync< IdentityProviderContract, @@ -98,3 +123,26 @@ interface IdentityProviderContracts { ClientSecretContract >; } + +@@projectedName(IdentityProviderContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(IdentityProviderContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(IdentityProviderContracts.createOrUpdate::parameters.resource, + "Create parameters." +); +@@projectedName(IdentityProviderContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(IdentityProviderContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(IdentityProviderContracts.update::parameters.properties, + "Update parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp index c6f7fd9830..49ff2cd938 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Issue Attachment Contract details.") +/** + * Issue Attachment Contract details. + */ @parentResource(IssueContract) model IssueAttachmentContract is ProxyResource { - @doc("Attachment identifier within an Issue. Must be unique in the current Issue.") + /** + * Attachment identifier within an Issue. Must be unique in the current Issue. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @@ -28,13 +32,17 @@ model IssueAttachmentContract @armResourceOperations interface IssueAttachmentContracts { + /** + * Gets the details of the issue Attachment for an API specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the issue Attachment for an API specified by its identifier.") @operationId("ApiIssueAttachment_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier.") @head @operationId("ApiIssueAttachment_GetEntityTag") getEntityTag( @@ -44,54 +52,82 @@ interface IssueAttachmentContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates a new Attachment for the Issue in an API or updates an existing one. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates a new Attachment for the Issue in an API or updates an existing one.") @operationId("ApiIssueAttachment_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IssueAttachmentContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Deletes the specified comment from an Issue. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the specified comment from an Issue.") @operationId("ApiIssueAttachment_Delete") delete is ArmResourceDeleteSync< IssueAttachmentContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists all attachments for the Issue associated with the specified API. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all attachments for the Issue associated with the specified API.") @operationId("ApiIssueAttachment_ListByService") listByService is ArmResourceListByParent< IssueAttachmentContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; } + +@@projectedName(IssueAttachmentContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(IssueAttachmentContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(IssueAttachmentContracts.createOrUpdate::parameters.resource, + "Create parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp index a157961fa5..725154e842 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Issue Comment Contract details.") +/** + * Issue Comment Contract details. + */ @parentResource(IssueContract) model IssueCommentContract is ProxyResource { - @doc("Comment identifier within an Issue. Must be unique in the current Issue.") + /** + * Comment identifier within an Issue. Must be unique in the current Issue. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @@ -27,13 +31,17 @@ model IssueCommentContract is ProxyResource { @armResourceOperations interface IssueCommentContracts { + /** + * Gets the details of the issue Comment for an API specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the issue Comment for an API specified by its identifier.") @operationId("ApiIssueComment_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier.") @head @operationId("ApiIssueComment_GetEntityTag") getEntityTag( @@ -43,54 +51,82 @@ interface IssueCommentContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates a new Comment for the Issue in an API or updates an existing one. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates a new Comment for the Issue in an API or updates an existing one.") @operationId("ApiIssueComment_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IssueCommentContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Deletes the specified comment from an Issue. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the specified comment from an Issue.") @operationId("ApiIssueComment_Delete") delete is ArmResourceDeleteSync< IssueCommentContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists all comments for the Issue associated with the specified API. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all comments for the Issue associated with the specified API.") @operationId("ApiIssueComment_ListByService") listByService is ArmResourceListByParent< IssueCommentContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; } + +@@projectedName(IssueCommentContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(IssueCommentContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(IssueCommentContracts.createOrUpdate::parameters.resource, + "Create parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp index 6696ba29ce..5627603a21 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Issue Contract details.") +/** + * Issue Contract details. + */ @parentResource(ApiContract) model IssueContract is ProxyResource { - @doc("Issue identifier. Must be unique in the current API Management service instance.") + /** + * Issue identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @@ -27,44 +31,57 @@ model IssueContract is ProxyResource { @armResourceOperations interface IssueContracts { + /** + * Gets the details of the Issue for an API specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the Issue for an API specified by its identifier.") @operationId("ApiIssue_Get") get is ArmResourceRead< IssueContract, { ...BaseParameters; - @doc("Expand the comment attachments. ") + /** + * Expand the comment attachments. + */ @query("expandCommentsAttachments") expandCommentsAttachments?: boolean; } >; + /** + * Gets the entity state (Etag) version of the Issue for an API specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the Issue for an API specified by its identifier.") @head @operationId("ApiIssue_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + /** + * Creates a new Issue for an API or updates an existing one. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates a new Issue for an API or updates an existing one.") @operationId("ApiIssue_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IssueContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Updates an existing issue for an API. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates an existing issue for an API.") + @parameterVisibility("read") @operationId("ApiIssue_Update") update is ArmCustomPatchSync< IssueContract, @@ -72,50 +89,85 @@ interface IssueContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Deletes the specified Issue from an API. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the specified Issue from an API.") @operationId("ApiIssue_Delete") delete is ArmResourceDeleteSync< IssueContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists all issues associated with the specified API. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all issues associated with the specified API.") @operationId("ApiIssue_ListByService") listByService is ArmResourceListByParent< IssueContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    + */ @query("$filter") $filter?: string; - @doc("Expand the comment attachments. ") + /** + * Expand the comment attachments. + */ @query("expandCommentsAttachments") expandCommentsAttachments?: boolean; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; } + +@@projectedName(IssueContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(IssueContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(IssueContracts.createOrUpdate::parameters.resource, "Create parameters."); +@@projectedName(IssueContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(IssueContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(IssueContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp index a67024359c..189109dcdd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Logger details.") +/** + * Logger details. + */ @parentResource(ApiManagementServiceResource) model LoggerContract is ProxyResource { - @doc("Logger identifier. Must be unique in the API Management service instance.") + /** + * Logger identifier. Must be unique in the API Management service instance. + */ @maxLength(256) @pattern("^[^*#&+:<>?]+$") @path @@ -26,13 +30,17 @@ model LoggerContract is ProxyResource { @armResourceOperations interface LoggerContracts { + /** + * Gets the details of the logger specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the logger specified by its identifier.") @operationId("Logger_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the logger specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the logger specified by its identifier.") @head @operationId("Logger_GetEntityTag") getEntityTag( @@ -42,22 +50,29 @@ interface LoggerContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates or Updates a logger. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or Updates a logger.") @operationId("Logger_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< LoggerContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Updates an existing logger. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates an existing logger.") + @parameterVisibility("read") @operationId("Logger_Update") update is ArmCustomPatchSync< LoggerContract, @@ -65,46 +80,81 @@ interface LoggerContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Deletes the specified logger. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the specified logger.") @operationId("Logger_Delete") delete is ArmResourceDeleteSync< LoggerContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists a collection of loggers in the specified service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of loggers in the specified service instance.") @operationId("Logger_ListByService") listByService is ArmResourceListByParent< LoggerContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | loggerType | filter | eq | |
    | resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | loggerType | filter | eq | |
    | resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; } + +@@projectedName(LoggerContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(LoggerContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(LoggerContracts.createOrUpdate::parameters.resource, + "Create parameters." +); +@@projectedName(LoggerContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(LoggerContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(LoggerContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp index 9ad491998f..7b80bc5da1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("NamedValue details.") +/** + * NamedValue details. + */ @parentResource(ApiManagementServiceResource) model NamedValueContract is ProxyResource { - @doc("Identifier of the NamedValue.") + /** + * Identifier of the NamedValue. + */ @maxLength(256) @pattern("^[^*#&+:<>?]+$") @path @@ -26,13 +30,17 @@ model NamedValueContract is ProxyResource { @armResourceOperations interface NamedValueContracts { + /** + * Gets the details of the named value specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the named value specified by its identifier.") @operationId("NamedValue_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the named value specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the named value specified by its identifier.") @head @operationId("NamedValue_GetEntityTag") getEntityTag( @@ -42,23 +50,30 @@ interface NamedValueContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates or updates named value. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or updates named value.") @operationId("NamedValue_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< NamedValueContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; }, ArmLroLocationHeader >; + /** + * Updates the specific named value. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the specific named value.") + @parameterVisibility("read") @operationId("NamedValue_Update") update is ArmCustomPatchAsync< NamedValueContract, @@ -66,56 +81,74 @@ interface NamedValueContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; }, ArmLroLocationHeader >; + /** + * Deletes specific named value from the API Management service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes specific named value from the API Management service instance.") @operationId("NamedValue_Delete") delete is ArmResourceDeleteSync< NamedValueContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists a collection of named values defined within a service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of named values defined within a service instance.") @operationId("NamedValue_ListByService") listByService is ArmResourceListByParent< NamedValueContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("When set to true, the response contains only named value entities which failed refresh.") + /** + * When set to true, the response contains only named value entities which failed refresh. + */ @query("isKeyVaultRefreshFailed") isKeyVaultRefreshFailed?: boolean; } >; + /** + * Gets the secret of the named value specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the secret of the named value specified by its identifier.") @operationId("NamedValue_ListValue") listValue is ArmResourceActionSync< NamedValueContract, @@ -123,8 +156,10 @@ interface NamedValueContracts { NamedValueSecretContract >; + /** + * Refresh the secret of the named value specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Refresh the secret of the named value specified by its identifier.") @operationId("NamedValue_RefreshSecret") refreshSecret is ArmResourceActionAsync< NamedValueContract, @@ -134,3 +169,24 @@ interface NamedValueContracts { ArmLroLocationHeader >; } + +@@projectedName(NamedValueContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(NamedValueContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(NamedValueContracts.createOrUpdate::parameters.resource, + "Create parameters." +); +@@projectedName(NamedValueContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(NamedValueContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(NamedValueContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp index d1ca373be1..1ad7cc2673 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Notification details.") +/** + * Notification details. + */ @parentResource(ApiManagementServiceResource) model NotificationContract is ProxyResource { - @doc("Notification Name Identifier.") + /** + * Notification Name Identifier. + */ @path @key("notificationName") @segment("notifications") @@ -24,98 +28,130 @@ model NotificationContract is ProxyResource { @armResourceOperations interface NotificationContracts { + /** + * Gets the details of the Notification specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the Notification specified by its identifier.") @operationId("Notification_Get") get is ArmResourceRead; + /** + * Create or Update API Management publisher notification. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or Update API Management publisher notification.") @operationId("Notification_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< NotificationContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Lists a collection of properties defined within a service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of properties defined within a service instance.") @operationId("Notification_ListByService") listByService is ArmResourceListByParent< NotificationContract, { ...BaseParameters; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; + /** + * Gets the list of the Notification Recipient User subscribed to the notification. + */ + // FIXME: NotificationRecipientUser_ListByNotification could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("NotificationRecipientUser_ListByNotification") - @doc("Gets the list of the Notification Recipient User subscribed to the notification.") - // FIXME: NotificationRecipientUser_ListByNotification could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers") @get - ListByNotification is Azure.Core.Foundations.Operation< + listByNotification is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Notification Name Identifier.") + /** + * Notification Name Identifier. + */ @path notificationName: NotificationName; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, RecipientUserListResult >; + /** + * Gets the list of the Notification Recipient Emails subscribed to a notification. + */ + // FIXME: NotificationRecipientEmail_ListByNotification could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("NotificationRecipientEmail_ListByNotification") - @doc("Gets the list of the Notification Recipient Emails subscribed to a notification.") - // FIXME: NotificationRecipientEmail_ListByNotification could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails") @get - ListByNotification is Azure.Core.Foundations.Operation< + listByNotification is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Notification Name Identifier.") + /** + * Notification Name Identifier. + */ @path notificationName: NotificationName; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp index f756a97099..fc9be52235 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("OpenId Connect Provider details.") +/** + * OpenId Connect Provider details. + */ @parentResource(ApiManagementServiceResource) model OpenidConnectProviderContract is ProxyResource { - @doc("Identifier of the OpenID Connect Provider.") + /** + * Identifier of the OpenID Connect Provider. + */ @maxLength(256) @pattern("^[^*#&+:<>?]+$") @path @@ -27,15 +31,19 @@ model OpenidConnectProviderContract @armResourceOperations interface OpenidConnectProviderContracts { + /** + * Gets specific OpenID Connect Provider without secrets. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets specific OpenID Connect Provider without secrets.") @operationId("OpenIdConnectProvider_Get") get is ArmResourceRead< OpenidConnectProviderContract, { ...BaseParameters; - @doc("Identifier of the OpenID Connect Provider.") + /** + * Identifier of the OpenID Connect Provider. + */ @maxLength(256) @pattern("^[^*#&+:<>?]+$") @path @@ -43,28 +51,37 @@ interface OpenidConnectProviderContracts { } >; + /** + * Creates or updates the OpenID Connect Provider. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or updates the OpenID Connect Provider.") @operationId("OpenIdConnectProvider_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< OpenidConnectProviderContract, { ...BaseParameters; - @doc("Identifier of the OpenID Connect Provider.") + /** + * Identifier of the OpenID Connect Provider. + */ @maxLength(256) @pattern("^[^*#&+:<>?]+$") @path OpenId: string; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Updates the specific OpenID Connect Provider. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the specific OpenID Connect Provider.") + @parameterVisibility("read") @operationId("OpenIdConnectProvider_Update") update is ArmCustomPatchSync< OpenidConnectProviderContract, @@ -72,63 +89,83 @@ interface OpenidConnectProviderContracts { { ...BaseParameters; - @doc("Identifier of the OpenID Connect Provider.") + /** + * Identifier of the OpenID Connect Provider. + */ @maxLength(256) @pattern("^[^*#&+:<>?]+$") @path OpenId: string; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Deletes specific OpenID Connect Provider of the API Management service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes specific OpenID Connect Provider of the API Management service instance.") @operationId("OpenIdConnectProvider_Delete") delete is ArmResourceDeleteSync< OpenidConnectProviderContract, { ...BaseParameters; - @doc("Identifier of the OpenID Connect Provider.") + /** + * Identifier of the OpenID Connect Provider. + */ @maxLength(256) @pattern("^[^*#&+:<>?]+$") @path OpenId: string; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists of all the OpenId Connect Providers. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists of all the OpenId Connect Providers.") @operationId("OpenIdConnectProvider_ListByService") listByService is ArmResourceListByParent< OpenidConnectProviderContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; + /** + * Gets the client secret details of the OpenID Connect Provider. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the client secret details of the OpenID Connect Provider.") @operationId("OpenIdConnectProvider_ListSecrets") listSecrets is ArmResourceActionSync< OpenidConnectProviderContract, @@ -137,7 +174,9 @@ interface OpenidConnectProviderContracts { { ...BaseParameters; - @doc("Identifier of the OpenID Connect Provider.") + /** + * Identifier of the OpenID Connect Provider. + */ @maxLength(256) @pattern("^[^*#&+:<>?]+$") @path @@ -145,3 +184,26 @@ interface OpenidConnectProviderContracts { } >; } + +@@projectedName(OpenidConnectProviderContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(OpenidConnectProviderContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(OpenidConnectProviderContracts.createOrUpdate::parameters.resource, + "Create parameters." +); +@@projectedName(OpenidConnectProviderContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(OpenidConnectProviderContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(OpenidConnectProviderContracts.update::parameters.properties, + "Update parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp index 7b77e70775..27df861358 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("API Operation details.") +/** + * API Operation details. + */ @parentResource(ApiContract) model OperationContract is ProxyResource { - @doc("Operation identifier within an API. Must be unique in the current API Management service instance.") + /** + * Operation identifier within an API. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @path @@ -26,13 +30,17 @@ model OperationContract is ProxyResource { @armResourceOperations interface OperationContracts { + /** + * Gets the details of the API Operation specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the API Operation specified by its identifier.") @operationId("ApiOperation_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the API operation specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the API operation specified by its identifier.") @head @operationId("ApiOperation_GetEntityTag") getEntityTag( @@ -42,22 +50,29 @@ interface OperationContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates a new operation in the API or updates an existing one. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates a new operation in the API or updates an existing one.") @operationId("ApiOperation_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< OperationContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Updates the details of the operation in the API specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the details of the operation in the API specified by its identifier.") + @parameterVisibility("read") @operationId("ApiOperation_Update") update is ArmCustomPatchSync< OperationContract, @@ -65,50 +80,89 @@ interface OperationContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Deletes the specified operation in the API. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the specified operation in the API.") @operationId("ApiOperation_Delete") delete is ArmResourceDeleteSync< OperationContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists a collection of the operations for the specified API. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of the operations for the specified API.") @operationId("ApiOperation_ListByApi") listByApi is ArmResourceListByParent< OperationContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Include tags in the response.") + /** + * Include tags in the response. + */ @query("tags") tags?: string; } >; } + +@@projectedName(OperationContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(OperationContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(OperationContracts.createOrUpdate::parameters.resource, + "Create parameters." +); +@@projectedName(OperationContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(OperationContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(OperationContracts.update::parameters.properties, + "API Operation Update parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp index 14b6d3ad32..86b7cfc181 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Policy Contract details.") +/** + * Policy Contract details. + */ @parentResource(OperationContract) model PolicyContract is ProxyResource { - @doc("The identifier of the Policy.") + /** + * The identifier of the Policy. + */ @path @key("policyId") @segment("policies") @@ -24,22 +28,28 @@ model PolicyContract is ProxyResource { @armResourceOperations interface PolicyContracts { + /** + * Get the policy configuration at the API Operation level. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get the policy configuration at the API Operation level.") @operationId("ApiOperationPolicy_Get") get is ArmResourceRead< PolicyContract, { ...BaseParameters; - @doc("Policy Export Format.") + /** + * Policy Export Format. + */ @query("format") format?: PolicyExportFormat = PolicyExportFormat.xml; } >; + /** + * Gets the entity state (Etag) version of the API operation policy specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the API operation policy specified by its identifier.") @head @operationId("ApiOperationPolicy_GetEntityTag") getEntityTag( @@ -49,36 +59,58 @@ interface PolicyContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates or updates policy configuration for the API Operation level. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or updates policy configuration for the API Operation level.") @operationId("ApiOperationPolicy_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PolicyContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Deletes the policy configuration at the Api Operation. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the policy configuration at the Api Operation.") @operationId("ApiOperationPolicy_Delete") delete is ArmResourceDeleteSync< PolicyContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Get the list of policy configuration at the API Operation level. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get the list of policy configuration at the API Operation level.") @operationId("ApiOperationPolicy_ListByOperation") listByOperation is ArmResourceListByParent; } + +@@projectedName(PolicyContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(PolicyContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(PolicyContracts.createOrUpdate::parameters.resource, + "The policy contents to apply." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp index 5de9038dc1..d301de8754 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp @@ -12,7 +12,9 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Delegation settings for a developer portal.") +/** + * Delegation settings for a developer portal. + */ @singleton("delegation") @parentResource(ApiManagementServiceResource) model PortalDelegationSettings @@ -25,13 +27,17 @@ model PortalDelegationSettings @armResourceOperations @projectedName("client", "PortalDelegationSettings") interface PortalDelegationSettingsOperationGroup { + /** + * Get Delegation Settings for the Portal. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get Delegation Settings for the Portal.") @operationId("DelegationSettings_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the DelegationSettings. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the DelegationSettings.") @head @operationId("DelegationSettings_GetEntityTag") getEntityTag( @@ -41,22 +47,29 @@ interface PortalDelegationSettingsOperationGroup { >, ): OkResponse | ErrorResponse; + /** + * Create or Update Delegation settings. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or Update Delegation settings.") @operationId("DelegationSettings_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PortalDelegationSettings, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Update Delegation settings. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update Delegation settings.") + @parameterVisibility("read") @operationId("DelegationSettings_Update") update is ArmCustomPatchSync< PortalDelegationSettings, @@ -64,19 +77,25 @@ interface PortalDelegationSettingsOperationGroup { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists a collection of portalsettings defined within a service instance.. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of portalsettings defined within a service instance..") @operationId("PortalSettings_ListByService") listByService is ArmResourceListByParent; + /** + * Gets the secret validation key of the DelegationSettings. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the secret validation key of the DelegationSettings.") @operationId("DelegationSettings_ListSecrets") listSecrets is ArmResourceActionSync< PortalDelegationSettings, @@ -84,3 +103,26 @@ interface PortalDelegationSettingsOperationGroup { PortalSettingValidationKeyContract >; } + +@@projectedName(PortalDelegationSettingsOperationGroup.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(PortalDelegationSettingsOperationGroup.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(PortalDelegationSettingsOperationGroup.createOrUpdate::parameters.resource, + "Create or update parameters." +); +@@projectedName(PortalDelegationSettingsOperationGroup.update::parameters.properties, + "json", + "parameters" +); +@@extension(PortalDelegationSettingsOperationGroup.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(PortalDelegationSettingsOperationGroup.update::parameters.properties, + "Update Delegation settings." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp index 325294ff3f..c833e5214b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Portal Revision's contract details.") +/** + * Portal Revision's contract details. + */ @parentResource(ApiManagementServiceResource) model PortalRevisionContract is ProxyResource { - @doc("Portal revision identifier. Must be unique in the current API Management service instance.") + /** + * Portal revision identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path @@ -27,13 +31,17 @@ model PortalRevisionContract @armResourceOperations interface PortalRevisionContracts { + /** + * Gets the developer portal's revision specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the developer portal's revision specified by its identifier.") @operationId("PortalRevision_Get") get is ArmResourceRead; + /** + * Gets the developer portal revision specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the developer portal revision specified by its identifier.") @head @operationId("PortalRevision_GetEntityTag") getEntityTag( @@ -43,17 +51,22 @@ interface PortalRevisionContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible.") @operationId("PortalRevision_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< PortalRevisionContract, BaseParameters, ArmLroLocationHeader >; + /** + * Updates the description of specified portal revision or makes it current. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the description of specified portal revision or makes it current.") + @parameterVisibility("read") @operationId("PortalRevision_Update") update is ArmCustomPatchAsync< PortalRevisionContract, @@ -61,41 +74,68 @@ interface PortalRevisionContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; }, ArmLroLocationHeader >; + /** + * Lists developer portal's revisions. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists developer portal's revisions.") @operationId("PortalRevision_ListByService") listByService is ArmResourceListByParent< PortalRevisionContract, { ...BaseParameters; - @doc(""" -| Field | Supported operators | Supported functions | + /** +* | Field | Supported operators | Supported functions | |-------------|------------------------|-----------------------------------| |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| |description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| |isCurrent | eq, ne | | -""") +*/ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; } + +@@projectedName(PortalRevisionContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(PortalRevisionContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(PortalRevisionContracts.createOrUpdate::parameters.resource, ""); +@@projectedName(PortalRevisionContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(PortalRevisionContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(PortalRevisionContracts.update::parameters.properties, ""); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp index ed77817ff6..7dd6637c05 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp @@ -12,7 +12,9 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Sign-In settings for the Developer Portal.") +/** + * Sign-In settings for the Developer Portal. + */ @singleton("signin") @parentResource(ApiManagementServiceResource) model PortalSigninSettings is ProxyResource { @@ -24,13 +26,17 @@ model PortalSigninSettings is ProxyResource { @armResourceOperations @projectedName("client", "PortalSigninSettings") interface PortalSigninSettingsOperationGroup { + /** + * Get Sign In Settings for the Portal + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get Sign In Settings for the Portal") @operationId("SignInSettings_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the SignInSettings. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the SignInSettings.") @head @operationId("SignInSettings_GetEntityTag") getEntityTag( @@ -40,22 +46,29 @@ interface PortalSigninSettingsOperationGroup { >, ): OkResponse | ErrorResponse; + /** + * Create or Update Sign-In settings. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or Update Sign-In settings.") @operationId("SignInSettings_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PortalSigninSettings, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Update Sign-In settings. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update Sign-In settings.") + @parameterVisibility("read") @operationId("SignInSettings_Update") update is ArmCustomPatchSync< PortalSigninSettings, @@ -63,14 +76,41 @@ interface PortalSigninSettingsOperationGroup { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists a collection of portalsettings defined within a service instance.. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of portalsettings defined within a service instance..") @operationId("PortalSettings_ListByService") listByService is ArmResourceListByParent; } + +@@projectedName(PortalSigninSettingsOperationGroup.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(PortalSigninSettingsOperationGroup.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(PortalSigninSettingsOperationGroup.createOrUpdate::parameters.resource, + "Create or update parameters." +); +@@projectedName(PortalSigninSettingsOperationGroup.update::parameters.properties, + "json", + "parameters" +); +@@extension(PortalSigninSettingsOperationGroup.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(PortalSigninSettingsOperationGroup.update::parameters.properties, + "Update Sign-In settings." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp index a8a7af6a45..88192aed4a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp @@ -12,7 +12,9 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Sign-Up settings for a developer portal.") +/** + * Sign-Up settings for a developer portal. + */ @singleton("signup") @parentResource(ApiManagementServiceResource) model PortalSignupSettings is ProxyResource { @@ -24,13 +26,17 @@ model PortalSignupSettings is ProxyResource { @armResourceOperations @projectedName("client", "PortalSignupSettings") interface PortalSignupSettingsOperationGroup { + /** + * Get Sign Up Settings for the Portal + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get Sign Up Settings for the Portal") @operationId("SignUpSettings_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the SignUpSettings. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the SignUpSettings.") @head @operationId("SignUpSettings_GetEntityTag") getEntityTag( @@ -40,22 +46,29 @@ interface PortalSignupSettingsOperationGroup { >, ): OkResponse | ErrorResponse; + /** + * Create or Update Sign-Up settings. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or Update Sign-Up settings.") @operationId("SignUpSettings_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PortalSignupSettings, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Update Sign-Up settings. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update Sign-Up settings.") + @parameterVisibility("read") @operationId("SignUpSettings_Update") update is ArmCustomPatchSync< PortalSignupSettings, @@ -63,14 +76,41 @@ interface PortalSignupSettingsOperationGroup { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists a collection of portalsettings defined within a service instance.. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of portalsettings defined within a service instance..") @operationId("PortalSettings_ListByService") listByService is ArmResourceListByParent; } + +@@projectedName(PortalSignupSettingsOperationGroup.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(PortalSignupSettingsOperationGroup.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(PortalSignupSettingsOperationGroup.createOrUpdate::parameters.resource, + "Create or update parameters." +); +@@projectedName(PortalSignupSettingsOperationGroup.update::parameters.properties, + "json", + "parameters" +); +@@extension(PortalSignupSettingsOperationGroup.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(PortalSignupSettingsOperationGroup.update::parameters.properties, + "Update Sign-Up settings." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp index 716bbd25cf..26ef9995df 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("The Private Endpoint Connection resource.") +/** + * The Private Endpoint Connection resource. + */ @parentResource(ApiManagementServiceResource) model PrivateEndpointConnection is ProxyResource { - @doc("Name of the private endpoint connection.") + /** + * Name of the private endpoint connection. + */ @path @key("privateEndpointConnectionName") @segment("privateEndpointConnections") @@ -25,23 +29,41 @@ model PrivateEndpointConnection @armResourceOperations interface PrivateEndpointConnections { + /** + * Gets the details of the Private Endpoint Connection specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the Private Endpoint Connection specified by its identifier.") @operationId("PrivateEndpointConnection_GetByName") getByName is ArmResourceRead; + /** + * Creates a new Private Endpoint Connection or updates an existing one. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates a new Private Endpoint Connection or updates an existing one.") @operationId("PrivateEndpointConnection_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Deletes the specified Private Endpoint Connection. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the specified Private Endpoint Connection.") @operationId("PrivateEndpointConnection_Delete") delete is ArmResourceDeleteAsync; + /** + * Lists all private endpoint connections of the API Management service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all private endpoint connections of the API Management service instance.") @operationId("PrivateEndpointConnection_ListByService") listByService is ArmResourceListByParent; } + +@@projectedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, + "json", + "privateEndpointConnectionRequest" +); +@@extension(PrivateEndpointConnections.createOrUpdate::parameters.resource, + "x-ms-client-name", + "privateEndpointConnectionRequest" +); +@@doc(PrivateEndpointConnections.createOrUpdate::parameters.resource, ""); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp index 21514c50d8..3c59ce3bf9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("A private link resource") +/** + * A private link resource + */ @parentResource(ApiManagementServiceResource) model PrivateLinkResource is ProxyResource { - @doc("Name of the private link resource.") + /** + * Name of the private link resource. + */ @path @key("privateLinkSubResourceName") @segment("privateLinkResources") @@ -24,13 +28,17 @@ model PrivateLinkResource is ProxyResource { @armResourceOperations interface PrivateLinkResources { + /** + * Gets the private link resources + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the private link resources") @operationId("PrivateEndpointConnection_GetPrivateLinkResource") getPrivateLinkResource is ArmResourceRead; + /** + * Gets the private link resources + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the private link resources") @operationId("PrivateEndpointConnection_ListPrivateLinkResources") listPrivateLinkResources is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp index 7d0436f34f..c2d289403c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Product details.") +/** + * Product details. + */ @parentResource(ApiManagementServiceResource) model ProductContract is ProxyResource { - @doc("Product identifier. Must be unique in the current API Management service instance.") + /** + * Product identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path @@ -26,13 +30,17 @@ model ProductContract is ProxyResource { @armResourceOperations interface ProductContracts { + /** + * Gets the details of the product specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the product specified by its identifier.") @operationId("Product_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the product specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the product specified by its identifier.") @head @operationId("Product_GetEntityTag") getEntityTag( @@ -42,22 +50,29 @@ interface ProductContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates or Updates a product. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or Updates a product.") @operationId("Product_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< ProductContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Update existing product details. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update existing product details.") + @parameterVisibility("read") @operationId("Product_Update") update is ArmCustomPatchSync< ProductContract, @@ -65,193 +80,282 @@ interface ProductContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Delete product. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete product.") @operationId("Product_Delete") delete is ArmResourceDeleteSync< ProductContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; - @doc("Delete existing subscriptions associated with the product or not.") + /** + * Delete existing subscriptions associated with the product or not. + */ @query("deleteSubscriptions") deleteSubscriptions?: boolean; } >; + /** + * Lists a collection of products in the specified service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of products in the specified service instance.") @operationId("Product_ListByService") listByService is ArmResourceListByParent< ProductContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | groups | expand | | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | groups | expand | | |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("When set to true, the response contains an array of groups that have visibility to the product. The default is false.") + /** + * When set to true, the response contains an array of groups that have visibility to the product. The default is false. + */ @query("expandGroups") expandGroups?: boolean; - @doc("Products which are part of a specific tag.") + /** + * Products which are part of a specific tag. + */ @query("tags") tags?: string; } >; + /** + * Lists a collection of the APIs associated with a product. + */ + // FIXME: ProductApi_ListByProduct could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("ProductApi_ListByProduct") - @doc("Lists a collection of the APIs associated with a product.") - // FIXME: ProductApi_ListByProduct could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis") @get - ListByProduct is Azure.Core.Foundations.Operation< + listByProduct is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Product identifier. Must be unique in the current API Management service instance.") + /** + * Product identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path productId: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ApiManagementProductApiListResult >; + /** + * Lists the collection of developer groups associated with the specified product. + */ + // FIXME: ProductGroup_ListByProduct could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("ProductGroup_ListByProduct") - @doc("Lists the collection of developer groups associated with the specified product.") - // FIXME: ProductGroup_ListByProduct could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups") @get - ListByProduct is Azure.Core.Foundations.Operation< + listByProduct is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Product identifier. Must be unique in the current API Management service instance.") + /** + * Product identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path productId: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | |
    | displayName | filter | eq, ne | |
    | description | filter | eq, ne | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | |
    | displayName | filter | eq, ne | |
    | description | filter | eq, ne | |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ApiManagementProductGroupListResult >; + /** + * Lists the collection of subscriptions to the specified product. + */ + // FIXME: ProductSubscriptions_List could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("ProductSubscriptions_List") - @doc("Lists the collection of subscriptions to the specified product.") - // FIXME: ProductSubscriptions_List could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Product identifier. Must be unique in the current API Management service instance.") + /** + * Product identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path productId: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | user | expand | | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | user | expand | | |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ResourceListResult >; } + +@@projectedName(ProductContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(ProductContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(ProductContracts.createOrUpdate::parameters.resource, + "Create or update parameters." +); +@@projectedName(ProductContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(ProductContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(ProductContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp index b722bce933..2910dbe74e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("API Schema Contract details.") +/** + * API Schema Contract details. + */ @parentResource(ApiContract) model SchemaContract is ProxyResource { - @doc("Schema id identifier. Must be unique in the current API Management service instance.") + /** + * Schema id identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @path @@ -26,13 +30,17 @@ model SchemaContract is ProxyResource { @armResourceOperations interface SchemaContracts { + /** + * Get the schema configuration at the API level. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get the schema configuration at the API level.") @operationId("ApiSchema_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the schema specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the schema specified by its identifier.") @head @operationId("ApiSchema_GetEntityTag") getEntityTag( @@ -42,59 +50,89 @@ interface SchemaContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates or updates schema configuration for the API. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or updates schema configuration for the API.") @operationId("ApiSchema_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< SchemaContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; }, ArmLroLocationHeader >; + /** + * Deletes the schema configuration at the Api. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the schema configuration at the Api.") @operationId("ApiSchema_Delete") delete is ArmResourceDeleteSync< SchemaContract, { ...BaseParameters; - @doc("If true removes all references to the schema before deleting it.") + /** + * If true removes all references to the schema before deleting it. + */ @query("force") force?: boolean; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Get the schema configuration at the API level. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get the schema configuration at the API level.") @operationId("ApiSchema_ListByApi") listByApi is ArmResourceListByParent< SchemaContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; } + +@@projectedName(SchemaContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(SchemaContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(SchemaContracts.createOrUpdate::parameters.resource, + "The schema contents to apply." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp index 282b8d4ccc..c077bbe1e3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Subscription details.") +/** + * Subscription details. + */ @parentResource(ApiManagementServiceResource) model SubscriptionContract is ProxyResource { - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path @key("subscriptionId") @segment("subscriptions") @@ -24,13 +28,17 @@ model SubscriptionContract is ProxyResource { @armResourceOperations interface SubscriptionContracts { + /** + * Gets the specified Subscription entity. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the specified Subscription entity.") @operationId("Subscription_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier.") @head @operationId("Subscription_GetEntityTag") getEntityTag( @@ -40,34 +48,43 @@ interface SubscriptionContracts { >, ): OkResponse | ErrorResponse; + /** + * Creates or updates the subscription of specified user to the specified product. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or updates the subscription of specified user to the specified product.") @operationId("Subscription_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< SubscriptionContract, { ...BaseParameters; - @doc(""" -Notify change in Subscription State. - - If false, do not send any email notification for change of state of subscription - - If true, send email notification of change of state of subscription -""") + /** + * Notify change in Subscription State. + * - If false, do not send any email notification for change of state of subscription + * - If true, send email notification of change of state of subscription + */ @query("notify") notify?: boolean; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; - @doc("Determines the type of application which send the create user request. Default is legacy publisher portal.") + /** + * Determines the type of application which send the create user request. Default is legacy publisher portal. + */ @query("appType") appType?: AppType; } >; + /** + * Updates the details of a subscription specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the details of a subscription specified by its identifier.") + @parameterVisibility("read") @operationId("Subscription_Update") update is ArmCustomPatchSync< SubscriptionContract, @@ -75,79 +92,101 @@ Notify change in Subscription State. { ...BaseParameters; - @doc(""" -Notify change in Subscription State. - - If false, do not send any email notification for change of state of subscription - - If true, send email notification of change of state of subscription -""") + /** + * Notify change in Subscription State. + * - If false, do not send any email notification for change of state of subscription + * - If true, send email notification of change of state of subscription + */ @query("notify") notify?: boolean; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; - @doc("Determines the type of application which send the create user request. Default is legacy publisher portal.") + /** + * Determines the type of application which send the create user request. Default is legacy publisher portal. + */ @query("appType") appType?: AppType; } >; + /** + * Deletes the specified subscription. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the specified subscription.") @operationId("Subscription_Delete") delete is ArmResourceDeleteSync< SubscriptionContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists all subscriptions of the API Management service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all subscriptions of the API Management service instance.") @operationId("Subscription_List") list is ArmResourceListByParent< SubscriptionContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | user | expand | | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | user | expand | | |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; + /** + * Regenerates primary key of existing subscription of the API Management service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Regenerates primary key of existing subscription of the API Management service instance.") @operationId("Subscription_RegeneratePrimaryKey") regeneratePrimaryKey is ArmResourceActionNoContentSync< SubscriptionContract, void >; + /** + * Regenerates secondary key of existing subscription of the API Management service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Regenerates secondary key of existing subscription of the API Management service instance.") @operationId("Subscription_RegenerateSecondaryKey") regenerateSecondaryKey is ArmResourceActionNoContentSync< SubscriptionContract, void >; + /** + * Gets the specified Subscription keys. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the specified Subscription keys.") @operationId("Subscription_ListSecrets") listSecrets is ArmResourceActionSync< SubscriptionContract, @@ -155,3 +194,26 @@ Notify change in Subscription State. SubscriptionKeysContract >; } + +@@projectedName(SubscriptionContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(SubscriptionContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(SubscriptionContracts.createOrUpdate::parameters.resource, + "Create parameters." +); +@@projectedName(SubscriptionContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(SubscriptionContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(SubscriptionContracts.update::parameters.properties, + "Update parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp index 441988134a..2d73270eef 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Tag Contract details.") +/** + * Tag Contract details. + */ @parentResource(OperationContract) model TagContract is ProxyResource { - @doc("Tag identifier. Must be unique in the current API Management service instance.") + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @@ -27,47 +31,63 @@ model TagContract is ProxyResource { @armResourceOperations interface TagContracts { + /** + * Get tag associated with the Operation. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get tag associated with the Operation.") @operationId("Tag_GetByOperation") getByOperation is ArmResourceRead; + /** + * Gets the entity state version of the tag specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state version of the tag specified by its identifier.") @head @operationId("Tag_GetEntityStateByOperation") getEntityStateByOperation( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + /** + * Assign tag to the Operation. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Assign tag to the Operation.") @operationId("Tag_AssignToOperation") assignToOperation is ArmResourceCreateOrReplaceSync; + /** + * Detach the tag from the Operation. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Detach the tag from the Operation.") @operationId("Tag_DetachFromOperation") detachFromOperation is ArmResourceDeleteSync; + /** + * Lists all Tags associated with the Operation. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all Tags associated with the Operation.") @operationId("Tag_ListByOperation") listByOperation is ArmResourceListByParent< TagContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp index 9df7604a21..f0fe09be22 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Contract details.") +/** + * Contract details. + */ @parentResource(ApiContract) model TagDescriptionContract is ProxyResource { - @doc("Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names.") + /** + * Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @@ -28,13 +32,17 @@ model TagDescriptionContract @armResourceOperations interface TagDescriptionContracts { + /** + * Get Tag description in scope of API + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get Tag description in scope of API") @operationId("ApiTagDescription_Get") get is ArmResourceRead; + /** + * Gets the entity state version of the tag specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state version of the tag specified by its identifier.") @head @operationId("ApiTagDescription_GetEntityTag") getEntityTag( @@ -44,54 +52,82 @@ interface TagDescriptionContracts { >, ): OkResponse | ErrorResponse; + /** + * Create/Update tag description in scope of the Api. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create/Update tag description in scope of the Api.") @operationId("ApiTagDescription_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< TagDescriptionContract, { ...BaseParameters; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Delete tag description for the Api. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete tag description for the Api.") @operationId("ApiTagDescription_Delete") delete is ArmResourceDeleteSync< TagDescriptionContract, { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations") @operationId("ApiTagDescription_ListByService") listByService is ArmResourceListByParent< TagDescriptionContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; } >; } + +@@projectedName(TagDescriptionContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(TagDescriptionContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(TagDescriptionContracts.createOrUpdate::parameters.resource, + "Create parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp index 77ba366ca5..a9f6427e78 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("Tenant Settings.") +/** + * Tenant Settings. + */ @parentResource(ApiManagementServiceResource) model TenantSettingsContract is ProxyResource { - @doc("The identifier of the settings.") + /** + * The identifier of the settings. + */ @path @key("settingsType") @segment("settings") @@ -25,20 +29,26 @@ model TenantSettingsContract @armResourceOperations interface TenantSettingsContracts { + /** + * Get tenant settings. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get tenant settings.") @operationId("TenantSettings_Get") get is ArmResourceRead; + /** + * Public settings. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Public settings.") @operationId("TenantSettings_ListByService") listByService is ArmResourceListByParent< TenantSettingsContract, { ...BaseParameters; - @doc("Not used") + /** + * Not used + */ @query("$filter") $filter?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp index b06eb8163a..40c6ef0f23 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; -@doc("User details.") +/** + * User details. + */ @parentResource(ApiManagementServiceResource) model UserContract is ProxyResource { - @doc("User identifier. Must be unique in the current API Management service instance.") + /** + * User identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @path @@ -26,39 +30,52 @@ model UserContract is ProxyResource { @armResourceOperations interface UserContracts { + /** + * Gets the details of the user specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the details of the user specified by its identifier.") @operationId("User_Get") get is ArmResourceRead; + /** + * Gets the entity state (Etag) version of the user specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the entity state (Etag) version of the user specified by its identifier.") @head @operationId("User_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + /** + * Creates or Updates a user. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or Updates a user.") @operationId("User_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< UserContract, { ...BaseParameters; - @doc("Send an Email notification to the User.") + /** + * Send an Email notification to the User. + */ @query("notify") notify?: boolean; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; } >; + /** + * Updates the details of the user specified by its identifier. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the details of the user specified by its identifier.") + @parameterVisibility("read") @operationId("User_Update") update is ArmCustomPatchSync< UserContract, @@ -66,67 +83,91 @@ interface UserContracts { { ...BaseParameters; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; } >; + /** + * Deletes specific user. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes specific user.") @operationId("User_Delete") delete is ArmResourceDeleteSync< UserContract, { ...BaseParameters; - @doc("Whether to delete user's subscription or not.") + /** + * Whether to delete user's subscription or not. + */ @query("deleteSubscriptions") deleteSubscriptions?: boolean; - @doc("Send an Account Closed Email notification to the User.") + /** + * Send an Account Closed Email notification to the User. + */ @query("notify") notify?: boolean; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; - @doc("Determines the type of application which send the create user request. Default is legacy publisher portal.") + /** + * Determines the type of application which send the create user request. Default is legacy publisher portal. + */ @query("appType") appType?: AppType; } >; + /** + * Lists a collection of registered users in the specified service instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists a collection of registered users in the specified service instance.") @operationId("User_ListByService") listByService is ArmResourceListByParent< UserContract, { ...BaseParameters; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | registrationDate | filter | ge, le, eq, ne, gt, lt | |
    | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | groups | expand | | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | registrationDate | filter | ge, le, eq, ne, gt, lt | |
    | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | groups | expand | | |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Detailed Group in response.") + /** + * Detailed Group in response. + */ @query("expandGroups") expandGroups?: boolean; } >; + /** + * Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal.") @operationId("User_GenerateSsoUrl") generateSsoUrl is ArmResourceActionSync< UserContract, @@ -134,8 +175,10 @@ interface UserContracts { GenerateSsoUrlResult >; + /** + * Gets the Shared Access Authorization Token for the User. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the Shared Access Authorization Token for the User.") @operationId("User_GetSharedAccessToken") getSharedAccessToken is ArmResourceActionSync< UserContract, @@ -143,8 +186,10 @@ interface UserContracts { UserTokenResult >; + /** + * Sends confirmation + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Sends confirmation") @operationId("UserConfirmationPassword_Send") send is ArmResourceActionNoContentSync< UserContract, @@ -152,86 +197,146 @@ interface UserContracts { { ...BaseParameters; - @doc("Determines the type of application which send the create user request. Default is legacy publisher portal.") + /** + * Determines the type of application which send the create user request. Default is legacy publisher portal. + */ @query("appType") appType?: AppType; } >; + /** + * Lists all user groups. + */ + // FIXME: UserGroup_List could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("UserGroup_List") - @doc("Lists all user groups.") - // FIXME: UserGroup_List could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("User identifier. Must be unique in the current API Management service instance.") + /** + * User identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @path userId: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|------------------------|-----------------------------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|------------------------|-----------------------------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ResourceListResult >; + /** + * List of all user identities. + */ + // FIXME: UserIdentities_List could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("UserIdentities_List") - @doc("List of all user identities.") - // FIXME: UserIdentities_List could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("User identifier. Must be unique in the current API Management service instance.") + /** + * User identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @path userId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, UserIdentityListResult >; } + +@@projectedName(UserContracts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(UserContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(UserContracts.createOrUpdate::parameters.resource, + "Create or update parameters." +); +@@projectedName(UserContracts.update::parameters.properties, + "json", + "parameters" +); +@@extension(UserContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(UserContracts.update::parameters.properties, "Update parameters."); +@@projectedName(UserContracts.getSharedAccessToken::parameters.body, + "json", + "parameters" +); +@@extension(UserContracts.getSharedAccessToken::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(UserContracts.getSharedAccessToken::parameters.body, + "Create Authorization Token parameters." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsConsumption.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_Api_Management_List_Sk_Us_Consumption.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsConsumption.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_Api_Management_List_Sk_Us_Consumption.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsDedicated.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_Api_Management_List_Sk_Us_Dedicated.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsDedicated.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_Api_Management_List_Sk_Us_Dedicated.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithAccessKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_Api_Management_Backup_With_Access_Key.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithAccessKey.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_Api_Management_Backup_With_Access_Key.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithSystemManagedIdentity.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_Api_Management_Backup_With_System_Managed_Identity.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithSystemManagedIdentity.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_Api_Management_Backup_With_System_Managed_Identity.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithUserAssignedManagedIdentity.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_Api_Management_Backup_With_User_Assigned_Managed_Identity.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithUserAssignedManagedIdentity.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_Api_Management_Backup_With_User_Assigned_Managed_Identity.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustomHostname.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Multi_Region_Service_With_Custom_Hostname.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustomHostname.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Multi_Region_Service_With_Custom_Hostname.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Service.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateService.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Service.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceHavingMsi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_Having_Msi.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceHavingMsi.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_Having_Msi.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIp.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_In_Vnet_With_Public_Ip.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIp.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_In_Vnet_With_Public_Ip.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInZones.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_In_Zones.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInZones.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_In_Zones.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_With_Custom_Hostname_Key_Vault.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKeyVault.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_With_Custom_Hostname_Key_Vault.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificates.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_With_System_Certificates.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificates.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_With_System_Certificates.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdentity.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_With_User_Assigned_Identity.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdentity.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Create_Service_With_User_Assigned_Identity.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementUndelete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Undelete.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementUndelete.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_Api_Management_Undelete.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetMultiRegionInternalVnet.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_Api_Management_Service_Get_Multi_Region_Internal_Vnet.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetMultiRegionInternalVnet.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_Api_Management_Service_Get_Multi_Region_Internal_Vnet.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_Api_Management_Service_Get_Service.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetService.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_Api_Management_Service_Get_Service.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetServiceHavingMsi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_Api_Management_Service_Get_Service_Having_Msi.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetServiceHavingMsi.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_Api_Management_Service_Get_Service_Having_Msi.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceDisableTls10.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_Api_Management_Update_Service_Disable_Tls10.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceDisableTls10.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_Api_Management_Update_Service_Disable_Tls10.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServicePublisherDetails.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_Api_Management_Update_Service_Publisher_Details.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServicePublisherDetails.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_Api_Management_Update_Service_Publisher_Details.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_Api_Management_Update_Service_To_New_Vnet_And_Availability_Zones.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_Api_Management_Update_Service_To_New_Vnet_And_Availability_Zones.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_Api_Management_Get_Api_Operation.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperation.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_Api_Management_Get_Api_Operation.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperationPetStore.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_Api_Management_Get_Api_Operation_Pet_Store.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperationPetStore.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_Api_Management_Get_Api_Operation_Pet_Store.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApi.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiClone.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_Clone.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiClone.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_Clone.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_New_Version_Using_Existing_Api.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingApi.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_New_Version_Using_Existing_Api.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_Revision_From_Existing_Api.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_Revision_From_Existing_Api.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServiceUrl.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_Using_Import_Override_Service_Url.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServiceUrl.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_Using_Import_Override_Service_Url.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingOai3Import.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_Using_Oai3_Import.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingOai3Import.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_Using_Oai3_Import.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_Using_Swagger_Import.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_Using_Swagger_Import.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingWadlImport.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_Using_Wadl_Import.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingWadlImport.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_Using_Wadl_Import.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_With_Open_Id_Connect.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Api_With_Open_Id_Connect.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateGraphQlApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Graph_Ql_Api.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateGraphQlApi.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Graph_Ql_Api.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Soap_Pass_Through_Api_Using_Wsdl_Import.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Soap_Pass_Through_Api_Using_Wsdl_Import.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Soap_To_Rest_Api_Using_Wsdl_Import.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Soap_To_Rest_Api_Using_Wsdl_Import.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateWebSocketApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Web_Socket_Api.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateWebSocketApi.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_Api_Management_Create_Web_Socket_Api.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiContract.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_Api_Management_Get_Api_Contract.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiContract.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_Api_Management_Get_Api_Contract.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiRevisionContract.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_Api_Management_Get_Api_Revision_Contract.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiRevisionContract.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_Api_Management_Get_Api_Revision_Contract.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendProxyBackend.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_Api_Management_Create_Backend_Proxy_Backend.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendProxyBackend.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_Api_Management_Create_Backend_Proxy_Backend.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendServiceFabric.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_Api_Management_Create_Backend_Service_Fabric.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendServiceFabric.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_Api_Management_Create_Backend_Service_Fabric.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_Api_Management_Create_Certificate.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificate.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_Api_Management_Create_Certificate.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificateWithKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_Api_Management_Create_Certificate_With_Key_Vault.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificateWithKeyVault.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_Api_Management_Create_Certificate_With_Key_Vault.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_Api_Management_Get_Certificate.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificate.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_Api_Management_Get_Certificate.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificateWithKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_Api_Management_Get_Certificate_With_Key_Vault.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificateWithKeyVault.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_Api_Management_Get_Certificate_With_Key_Vault.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema1.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_Api_Management_Create_Schema1.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema1.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_Api_Management_Create_Schema1.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema2.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_Api_Management_Create_Schema2.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema2.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_Api_Management_Create_Schema2.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema1.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_Api_Management_Get_Schema1.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema1.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_Api_Management_Get_Schema1.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema2.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_Api_Management_Get_Schema2.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema2.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_Api_Management_Get_Schema2.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroup.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_Api_Management_Create_Group.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroup.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_Api_Management_Create_Group.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroupExternal.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_Api_Management_Create_Group_External.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroupExternal.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_Api_Management_Create_Group_External.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateAiLogger.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_Api_Management_Create_Ai_Logger.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateAiLogger.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_Api_Management_Create_Ai_Logger.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateEhLogger.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_Api_Management_Create_Eh_Logger.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateEhLogger.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_Api_Management_Create_Eh_Logger.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValue.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_Api_Management_Create_Named_Value.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValue.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_Api_Management_Create_Named_Value.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValueWithKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_Api_Management_Create_Named_Value_With_Key_Vault.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValueWithKeyVault.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_Api_Management_Create_Named_Value_With_Key_Vault.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValue.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_Api_Management_Get_Named_Value.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValue.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_Api_Management_Get_Named_Value.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValueWithKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_Api_Management_Get_Named_Value_With_Key_Vault.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValueWithKeyVault.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_Api_Management_Get_Named_Value_With_Key_Vault.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_HttpConnectivityCheck.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_Http_Connectivity_Check.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_HttpConnectivityCheck.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_Http_Connectivity_Check.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_TcpConnectivityCheck.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_Tcp_Connectivity_Check.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_TcpConnectivityCheck.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_Tcp_Connectivity_Check.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantAccess.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_Api_Management_Get_Tenant_Access.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantAccess.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_Api_Management_Get_Tenant_Access.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantGitAccess.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_Api_Management_Get_Tenant_Git_Access.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantGitAccess.json rename to packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_Api_Management_Get_Tenant_Git_Access.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp index 0ad30a6d44..99ec8ded33 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp @@ -60,6 +60,9 @@ using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; +/** + * ApiManagement Client + */ @armProviderNamespace @service({ title: "ApiManagementClient", @@ -67,13 +70,16 @@ using TypeSpec.Versioning; @versioned(Versions) // FIXME: Common type version v2 is not supported for now. // @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v2) -@doc("ApiManagement Client") namespace Azure.ResourceManager.ApiManagement; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { + /** + * The 2021-08-01 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2021-08-01 API version.") v2021_08_01: "2021-08-01", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp index b8831fee82..3f0d5bd972 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp @@ -20,7 +20,9 @@ enum Protocol { wss, } -@doc("An value that determines where the API Version identifier will be located in a HTTP request.") +/** + * An value that determines where the API Version identifier will be located in a HTTP request. + */ enum VersioningScheme { Segment, Query, @@ -32,7 +34,9 @@ enum BearerTokenSendingMethod { query, } -@doc("Type of API.") +/** + * Type of API. + */ enum ApiType { http, soap, @@ -40,54 +44,117 @@ enum ApiType { graphql, } -@doc("Format of the Content in which the API is getting imported.") +/** + * Format of the Content in which the API is getting imported. + */ enum ContentFormat { - @doc("The contents are inline and Content type is a WADL document.") + /** + * The contents are inline and Content type is a WADL document. + */ `wadl-xml`, - @doc("The WADL document is hosted on a publicly accessible internet address.") + + /** + * The WADL document is hosted on a publicly accessible internet address. + */ `wadl-link-json`, - @doc("The contents are inline and Content Type is a OpenAPI 2.0 JSON Document.") + + /** + * The contents are inline and Content Type is a OpenAPI 2.0 JSON Document. + */ `swagger-json`, - @doc("The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address.") + + /** + * The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address. + */ `swagger-link-json`, - @doc("The contents are inline and the document is a WSDL/Soap document.") + + /** + * The contents are inline and the document is a WSDL/Soap document. + */ wsdl, - @doc("The WSDL document is hosted on a publicly accessible internet address.") + + /** + * The WSDL document is hosted on a publicly accessible internet address. + */ `wsdl-link`, - @doc("The contents are inline and Content Type is a OpenAPI 3.0 YAML Document.") + + /** + * The contents are inline and Content Type is a OpenAPI 3.0 YAML Document. + */ openapi, - @doc("The contents are inline and Content Type is a OpenAPI 3.0 JSON Document.") + + /** + * The contents are inline and Content Type is a OpenAPI 3.0 JSON Document. + */ `openapi+json`, - @doc("The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address.") + + /** + * The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address. + */ `openapi-link`, - @doc("The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address.") + + /** + * The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address. + */ `openapi+json-link`, - @doc("The GraphQL API endpoint hosted on a publicly accessible internet address.") + + /** + * The GraphQL API endpoint hosted on a publicly accessible internet address. + */ `graphql-link`, } -@doc(""" -Type of API to create. - * `http` creates a REST API - * `soap` creates a SOAP pass-through API - * `websocket` creates websocket API - * `graphql` creates GraphQL API. -""") +/** + * Type of API to create. + * * `http` creates a REST API + * * `soap` creates a SOAP pass-through API + * * `websocket` creates websocket API + * * `graphql` creates GraphQL API. + */ enum SoapApiType { - @doc("Imports a SOAP API having a RESTful front end.") SoapToRest: "http", - @doc("Imports the SOAP API having a SOAP front end.") SoapPassThrough: "soap", - @doc("Imports the API having a Websocket front end.") WebSocket: "websocket", - @doc("Imports the API having a GraphQL front end.") GraphQL: "graphql", -} - -@doc("Format of the policyContent.") + /** + * Imports a SOAP API having a RESTful front end. + */ + SoapToRest: "http", + + /** + * Imports the SOAP API having a SOAP front end. + */ + SoapPassThrough: "soap", + + /** + * Imports the API having a Websocket front end. + */ + WebSocket: "websocket", + + /** + * Imports the API having a GraphQL front end. + */ + GraphQL: "graphql", +} + +/** + * Format of the policyContent. + */ enum PolicyContentFormat { - @doc("The contents are inline and Content type is an XML document.") xml, - @doc("The policy XML document is hosted on a http endpoint accessible from the API Management service.") + /** + * The contents are inline and Content type is an XML document. + */ + xml, + + /** + * The policy XML document is hosted on a http endpoint accessible from the API Management service. + */ `xml-link`, - @doc("The contents are inline and Content type is a non XML encoded policy document.") + + /** + * The contents are inline and Content type is a non XML encoded policy document. + */ rawxml, - @doc("The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service.") + + /** + * The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service. + */ `rawxml-link`, } @@ -96,72 +163,161 @@ enum PolicyIdName { } enum PolicyExportFormat { - @doc("The contents are inline and Content type is an XML document.") xml, - @doc("The contents are inline and Content type is a non XML encoded policy document.") + /** + * The contents are inline and Content type is an XML document. + */ + xml, + + /** + * The contents are inline and Content type is a non XML encoded policy document. + */ rawxml, } -@doc("Specifies for what type of messages sampling settings should not apply.") +/** + * Specifies for what type of messages sampling settings should not apply. + */ enum AlwaysLog { - @doc("Always log all erroneous request regardless of sampling settings.") + /** + * Always log all erroneous request regardless of sampling settings. + */ allErrors, } -@doc("Sampling type.") +/** + * Sampling type. + */ enum SamplingType { - @doc("Fixed-rate sampling.") fixed, + /** + * Fixed-rate sampling. + */ + fixed, } -@doc("Data masking mode.") +/** + * Data masking mode. + */ enum DataMaskingMode { - @doc("Mask the value of an entity.") Mask, - @doc("Hide the presence of an entity.") Hide, + /** + * Mask the value of an entity. + */ + Mask, + + /** + * Hide the presence of an entity. + */ + Hide, } -@doc("Sets correlation protocol to use for Application Insights diagnostics.") +/** + * Sets correlation protocol to use for Application Insights diagnostics. + */ enum HttpCorrelationProtocol { - @doc("Do not read and inject correlation headers.") None, - @doc("Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md.") + /** + * Do not read and inject correlation headers. + */ + None, + + /** + * Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md. + */ Legacy, - @doc("Inject Trace Context headers. See https://w3c.github.io/trace-context.") + + /** + * Inject Trace Context headers. See https://w3c.github.io/trace-context. + */ W3C, } -@doc("The verbosity level applied to traces emitted by trace policies.") +/** + * The verbosity level applied to traces emitted by trace policies. + */ enum Verbosity { - @doc("All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance.") + /** + * All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance. + */ verbose, - @doc("Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance.") + + /** + * Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance. + */ information, - @doc("Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance.") + + /** + * Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance. + */ error, } -@doc("The format of the Operation Name for Application Insights telemetries. Default is Name.") +/** + * The format of the Operation Name for Application Insights telemetries. Default is Name. + */ enum OperationNameFormat { - @doc("API_NAME;rev=API_REVISION - OPERATION_NAME") Name, - @doc("HTTP_VERB URL") Url, + /** + * API_NAME;rev=API_REVISION - OPERATION_NAME + */ + Name, + + /** + * HTTP_VERB URL + */ + Url, } -@doc("Status of the issue.") +/** + * Status of the issue. + */ enum State { - @doc("The issue is proposed.") proposed, - @doc("The issue is opened.") open, - @doc("The issue was removed.") removed, - @doc("The issue is now resolved.") resolved, - @doc("The issue was closed.") closed, + /** + * The issue is proposed. + */ + proposed, + + /** + * The issue is opened. + */ + open, + + /** + * The issue was removed. + */ + removed, + + /** + * The issue is now resolved. + */ + resolved, + + /** + * The issue was closed. + */ + closed, } enum ExportFormat { - @doc("Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob.") + /** + * Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob. + */ Swagger: "swagger-link", - @doc("Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap`") + + /** + * Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` + */ Wsdl: "wsdl-link", - @doc("Export the Api Definition in WADL Schema to Storage Blob.") + + /** + * Export the Api Definition in WADL Schema to Storage Blob. + */ Wadl: "wadl-link", - @doc("Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob.") + + /** + * Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob. + */ Openapi: "openapi-link", - @doc("Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob.") + + /** + * Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob. + */ OpenapiJson: "openapi+json-link", } @@ -169,72 +325,115 @@ enum ExportApi { `true`, } -@doc("Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes.") +/** + * Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. + */ enum ExportResultFormat { - @doc("The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob.") + /** + * The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob. + */ Swagger: "swagger-link-json", - @doc("The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap`") + + /** + * The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs of Type `soap` + */ Wsdl: "wsdl-link+xml", - @doc("Export the API Definition in WADL Schema to Storage Blob.") + + /** + * Export the API Definition in WADL Schema to Storage Blob. + */ Wadl: "wadl-link-json", - @doc("Export the API Definition in OpenAPI Specification 3.0 to Storage Blob.") + + /** + * Export the API Definition in OpenAPI Specification 3.0 to Storage Blob. + */ OpenApi: "openapi-link", } enum GrantType { - @doc("Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1.") + /** + * Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1. + */ authorizationCode, - @doc("Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2.") + + /** + * Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2. + */ implicit, - @doc("Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3.") + + /** + * Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3. + */ resourceOwnerPassword, - @doc("Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4.") + + /** + * Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4. + */ clientCredentials, } enum ClientAuthenticationMethod { - @doc("Basic Client Authentication method.") Basic, - @doc("Body based Authentication method.") Body, + /** + * Basic Client Authentication method. + */ + Basic, + + /** + * Body based Authentication method. + */ + Body, } -@doc("Backend communication protocol.") +/** + * Backend communication protocol. + */ enum BackendProtocol { - @doc("The Backend is a RESTful service.") http, - @doc("The Backend is a SOAP service.") soap, + /** + * The Backend is a RESTful service. + */ + http, + + /** + * The Backend is a SOAP service. + */ + soap, } -@doc("The IP version to be used. Only IPv4 is supported for now.") +/** + * The IP version to be used. Only IPv4 is supported for now. + */ enum PreferredIPVersion { IPv4, } -@doc("The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value.") +/** + * The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value. + */ enum ConnectivityCheckProtocol { TCP, HTTP, HTTPS, } -@doc("The HTTP method to be used.") +/** + * The HTTP method to be used. + */ enum Method { GET, POST, } -@doc("The origin of the issue.") -enum Origin { - Local, - Inbound, - Outbound, -} - -@doc("The severity of the issue.") +/** + * The severity of the issue. + */ enum Severity { Error, Warning, } -@doc("The type of issue.") +/** + * The type of issue. + */ enum IssueType { Unknown, AgentStopped, @@ -247,7 +446,9 @@ enum IssueType { Platform, } -@doc("The connection status.") +/** + * The connection status. + */ enum ConnectionStatus { Unknown, Connected, @@ -255,31 +456,84 @@ enum ConnectionStatus { Degraded, } -@doc("Name of the Sku.") +/** + * Name of the Sku. + */ enum SkuType { - @doc("Developer SKU of Api Management.") Developer, - @doc("Standard SKU of Api Management.") Standard, - @doc("Premium SKU of Api Management.") Premium, - @doc("Basic SKU of Api Management.") Basic, - @doc("Consumption SKU of Api Management.") Consumption, - @doc("Isolated SKU of Api Management.") Isolated, -} - -@doc("The scale type applicable to the sku.") + /** + * Developer SKU of Api Management. + */ + Developer, + + /** + * Standard SKU of Api Management. + */ + Standard, + + /** + * Premium SKU of Api Management. + */ + Premium, + + /** + * Basic SKU of Api Management. + */ + Basic, + + /** + * Consumption SKU of Api Management. + */ + Consumption, + + /** + * Isolated SKU of Api Management. + */ + Isolated, +} + +/** + * The scale type applicable to the sku. + */ enum ResourceSkuCapacityScaleType { - @doc("Supported scale type automatic.") automatic, - @doc("Supported scale type manual.") manual, - @doc("Scaling not supported.") none, + /** + * Supported scale type automatic. + */ + automatic, + + /** + * Supported scale type manual. + */ + manual, + + /** + * Scaling not supported. + */ + none, } -@doc("The type of access to be used for the storage account.") +/** + * The type of access to be used for the storage account. + */ enum AccessType { - @doc("Use access key.") AccessKey, - @doc("Use system assigned managed identity.") SystemAssignedManagedIdentity, - @doc("Use user assigned managed identity.") UserAssignedManagedIdentity, + /** + * Use access key. + */ + AccessKey, + + /** + * Use system assigned managed identity. + */ + SystemAssignedManagedIdentity, + + /** + * Use user assigned managed identity. + */ + UserAssignedManagedIdentity, } -@doc("Hostname type.") +/** + * Hostname type. + */ enum HostnameType { Proxy, Portal, @@ -288,7 +542,9 @@ enum HostnameType { DeveloperPortal, } -@doc("Certificate Source.") +/** + * Certificate Source. + */ enum CertificateSource { Managed, KeyVault, @@ -296,51 +552,88 @@ enum CertificateSource { BuiltIn, } -@doc("Certificate Status.") +/** + * Certificate Status. + */ enum CertificateStatus { Completed, Failed, InProgress, } -@doc("Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'") +/** + * Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' + */ enum PublicNetworkAccess { Enabled, Disabled, } -@doc("Compute Platform Version running the service.") +/** + * Compute Platform Version running the service. + */ enum PlatformVersion { - @doc("Platform version cannot be determined, as compute platform is not deployed.") + /** + * Platform version cannot be determined, as compute platform is not deployed. + */ undetermined, - @doc("Platform running the service on Single Tenant V1 platform.") stv1, - @doc("Platform running the service on Single Tenant V2 platform.") stv2, - @doc("Platform running the service on Multi Tenant V1 platform.") mtv1, + + /** + * Platform running the service on Single Tenant V1 platform. + */ + stv1, + + /** + * Platform running the service on Single Tenant V2 platform. + */ + stv2, + + /** + * Platform running the service on Multi Tenant V1 platform. + */ + mtv1, } -@doc("The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations.") +/** + * The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. + */ enum CertificateConfigurationStoreName { CertificateAuthority, Root, } -@doc("The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.") +/** + * The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. + */ enum VirtualNetworkType { - @doc("The service is not part of any Virtual Network.") None, - @doc("The service is part of Virtual Network and it is accessible from Internet.") + /** + * The service is not part of any Virtual Network. + */ + None, + + /** + * The service is part of Virtual Network and it is accessible from Internet. + */ External, - @doc("The service is part of Virtual Network and it is only accessible from within the virtual network.") + + /** + * The service is part of Virtual Network and it is only accessible from within the virtual network. + */ Internal, } -@doc("The private endpoint connection status.") +/** + * The private endpoint connection status. + */ enum PrivateEndpointServiceConnectionStatus { Pending, Approved, Rejected, } -@doc("The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.") +/** + * The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. + */ enum ApimIdentityType { SystemAssigned, UserAssigned, @@ -348,14 +641,6 @@ enum ApimIdentityType { None, } -@doc("The type of identity that created the resource.") -enum CreatedByType { - User, - Application, - ManagedIdentity, - Key, -} - enum TemplateName { applicationApprovedNotificationMessage, accountClosedDeveloper, @@ -373,34 +658,86 @@ enum TemplateName { requestDeveloperNotificationMessage, } -@doc("Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.") +/** + * Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. + */ enum UserState { - @doc("User state is active.") active, - @doc("User is blocked. Blocked users cannot authenticate at developer portal or call API.") + /** + * User state is active. + */ + active, + + /** + * User is blocked. Blocked users cannot authenticate at developer portal or call API. + */ blocked, - @doc("User account is pending. Requires identity confirmation before it can be made active.") + + /** + * User account is pending. Requires identity confirmation before it can be made active. + */ pending, - @doc("User account is closed. All identities and related entities are removed.") + + /** + * User account is closed. All identities and related entities are removed. + */ deleted, } enum IdentityProviderType { - @doc("Facebook as Identity provider.") facebook, - @doc("Google as Identity provider.") google, - @doc("Microsoft Live as Identity provider.") microsoft, - @doc("Twitter as Identity provider.") twitter, - @doc("Azure Active Directory as Identity provider.") aad, - @doc("Azure Active Directory B2C as Identity provider.") aadB2C, -} - -@doc("Logger type.") + /** + * Facebook as Identity provider. + */ + facebook, + + /** + * Google as Identity provider. + */ + google, + + /** + * Microsoft Live as Identity provider. + */ + microsoft, + + /** + * Twitter as Identity provider. + */ + twitter, + + /** + * Azure Active Directory as Identity provider. + */ + aad, + + /** + * Azure Active Directory B2C as Identity provider. + */ + aadB2C, +} + +/** + * Logger type. + */ enum LoggerType { - @doc("Azure Event Hub as log destination.") azureEventHub, - @doc("Azure Application Insights as log destination.") applicationInsights, - @doc("Azure Monitor") azureMonitor, + /** + * Azure Event Hub as log destination. + */ + azureEventHub, + + /** + * Azure Application Insights as log destination. + */ + applicationInsights, + + /** + * Azure Monitor + */ + azureMonitor, } -@doc("Resource Connectivity Status Type identifier.") +/** + * Resource Connectivity Status Type identifier. + */ enum ConnectivityStatusType { initializing, success, @@ -408,31 +745,70 @@ enum ConnectivityStatusType { } enum NotificationName { - @doc("The following email recipients and users will receive email notifications about subscription requests for API products requiring approval.") + /** + * The following email recipients and users will receive email notifications about subscription requests for API products requiring approval. + */ RequestPublisherNotificationMessage, - @doc("The following email recipients and users will receive email notifications about new API product subscriptions.") + + /** + * The following email recipients and users will receive email notifications about new API product subscriptions. + */ PurchasePublisherNotificationMessage, - @doc("The following email recipients and users will receive email notifications when new applications are submitted to the application gallery.") + + /** + * The following email recipients and users will receive email notifications when new applications are submitted to the application gallery. + */ NewApplicationNotificationMessage, - @doc("The following recipients will receive blind carbon copies of all emails sent to developers.") + + /** + * The following recipients will receive blind carbon copies of all emails sent to developers. + */ BCC, - @doc("The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal.") + + /** + * The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal. + */ NewIssuePublisherNotificationMessage, - @doc("The following email recipients and users will receive email notifications when developer closes his account.") + + /** + * The following email recipients and users will receive email notifications when developer closes his account. + */ AccountClosedPublisher, - @doc("The following email recipients and users will receive email notifications when subscription usage gets close to usage quota.") + + /** + * The following email recipients and users will receive email notifications when subscription usage gets close to usage quota. + */ QuotaLimitApproachingPublisherNotificationMessage, } -@doc("Status of the portal's revision.") +/** + * Status of the portal's revision. + */ enum PortalRevisionStatus { - @doc("Portal's revision has been queued.") pending, - @doc("Portal's revision is being published.") publishing, - @doc("Portal's revision publishing completed.") completed, - @doc("Portal's revision publishing failed.") failed, + /** + * Portal's revision has been queued. + */ + pending, + + /** + * Portal's revision is being published. + */ + publishing, + + /** + * Portal's revision publishing completed. + */ + completed, + + /** + * Portal's revision publishing failed. + */ + failed, } -@doc("The current provisioning state.") +/** + * The current provisioning state. + */ enum PrivateEndpointConnectionProvisioningState { Succeeded, Creating, @@ -440,10 +816,19 @@ enum PrivateEndpointConnectionProvisioningState { Failed, } -@doc("Schema Type. Immutable.") +/** + * Schema Type. Immutable. + */ enum SchemaType { - @doc("Xml schema type.") Xml: "xml", - @doc("Json schema type.") Json: "json", + /** + * Xml schema type. + */ + Xml: "xml", + + /** + * Json schema type. + */ + Json: "json", } enum SettingsTypeName { @@ -451,8 +836,15 @@ enum SettingsTypeName { } enum AppType { - @doc("User create request was sent by legacy developer portal.") portal, - @doc("User create request was sent by new developer portal.") developerPortal, + /** + * User create request was sent by legacy developer portal. + */ + portal, + + /** + * User create request was sent by new developer portal. + */ + developerPortal, } enum AccessIdName { @@ -464,15 +856,24 @@ enum ConfigurationIdName { configuration, } -@doc("Determines the type of confirmation e-mail that will be sent to the newly created user.") +/** + * Determines the type of confirmation e-mail that will be sent to the newly created user. + */ enum Confirmation { - @doc("Send an e-mail to the user confirming they have successfully signed up.") + /** + * Send an e-mail to the user confirming they have successfully signed up. + */ signup, - @doc("Send an e-mail inviting the user to sign-up and complete registration.") + + /** + * Send an e-mail inviting the user to sign-up and complete registration. + */ invite, } -@doc("whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.") +/** + * whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. + */ @fixed enum ProductState { notPublished, @@ -491,7 +892,9 @@ enum AuthorizationMethod { DELETE, } -@doc("Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable.") +/** + * Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. + */ @fixed enum NameAvailabilityReason { Valid, @@ -499,21 +902,27 @@ enum NameAvailabilityReason { AlreadyExists, } -@doc("The Key being regenerated.") +/** + * The Key being regenerated. + */ @fixed enum GatewayRegenerateKeyType { primary, secondary, } -@doc("The Key to be used to generate token for user.") +/** + * The Key to be used to generate token for user. + */ @fixed enum KeyType { primary, secondary, } -@doc("Group type.") +/** + * Group type. + */ @fixed enum GroupType { custom, @@ -530,7 +939,9 @@ enum PolicyScopeContract { All, } -@doc("Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.") +/** + * Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. + */ @fixed enum SubscriptionState { suspended, @@ -541,7 +952,9 @@ enum SubscriptionState { cancelled, } -@doc("The scale type applicable to the sku.") +/** + * The scale type applicable to the sku. + */ @fixed enum ApiManagementSkuCapacityScaleType { Automatic, @@ -549,21 +962,27 @@ enum ApiManagementSkuCapacityScaleType { None, } -@doc("The type of restrictions.") +/** + * The type of restrictions. + */ @fixed enum ApiManagementSkuRestrictionsType { Location, Zone, } -@doc("The reason for restriction.") +/** + * The reason for restriction. + */ @fixed enum ApiManagementSkuRestrictionsReasonCode { QuotaId, NotAvailableForSubscription, } -@doc("Status of an async operation.") +/** + * Status of an async operation. + */ @fixed enum AsyncOperationStatus { Started, @@ -572,3766 +991,5912 @@ enum AsyncOperationStatus { Failed, } -@doc("API Entity Properties") +/** + * API Entity Properties + */ model ApiContractProperties extends ApiEntityBaseContract { - @doc("API identifier of the source API.") + /** + * API identifier of the source API. + */ sourceApiId?: string; - @doc("API name. Must be 1 to 300 characters long.") + /** + * API name. Must be 1 to 300 characters long. + */ @maxLength(300) @minLength(1) displayName?: string; - @doc("Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.") + /** + * Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. + */ @maxLength(2000) serviceUrl?: string; - @doc("Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.") + /** + * Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + */ @maxLength(400) path: string; - @doc("Describes on which protocols the operations in this API can be invoked.") + /** + * Describes on which protocols the operations in this API can be invoked. + */ protocols?: Protocol[]; - @doc("Version set details") + /** + * Version set details + */ apiVersionSet?: ApiVersionSetContractDetails; } -@doc("An API Version Set contains the common configuration for a set of API Versions relating ") +/** + * An API Version Set contains the common configuration for a set of API Versions relating + */ model ApiVersionSetContractDetails { - @doc("Identifier for existing API Version Set. Omit this value to create a new Version Set.") + /** + * Identifier for existing API Version Set. Omit this value to create a new Version Set. + */ id?: string; - @doc("The display Name of the API Version Set.") + /** + * The display Name of the API Version Set. + */ name?: string; - @doc("Description of API Version Set.") + /** + * Description of API Version Set. + */ description?: string; - @doc("An value that determines where the API Version identifier will be located in a HTTP request.") + /** + * An value that determines where the API Version identifier will be located in a HTTP request. + */ versioningScheme?: VersioningScheme; - @doc("Name of query parameter that indicates the API Version if versioningScheme is set to `query`.") + /** + * Name of query parameter that indicates the API Version if versioningScheme is set to `query`. + */ versionQueryName?: string; - @doc("Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.") + /** + * Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. + */ versionHeaderName?: string; } -@doc("API base contract details.") +/** + * API base contract details. + */ model ApiEntityBaseContract { - @doc("Description of the API. May include HTML formatting tags.") + /** + * Description of the API. May include HTML formatting tags. + */ description?: string; - @doc("Collection of authentication settings included into this API.") + /** + * Collection of authentication settings included into this API. + */ authenticationSettings?: AuthenticationSettingsContract; - @doc("Protocols over which API is made available.") + /** + * Protocols over which API is made available. + */ subscriptionKeyParameterNames?: SubscriptionKeyParameterNamesContract; - @doc("Type of API.") + /** + * Type of API. + */ @projectedName("json", "type") apiType?: ApiType; - @doc("Describes the revision of the API. If no value is provided, default revision 1 is created") + /** + * Describes the revision of the API. If no value is provided, default revision 1 is created + */ @maxLength(100) @minLength(1) apiRevision?: string; - @doc("Indicates the version identifier of the API if the API is versioned") + /** + * Indicates the version identifier of the API if the API is versioned + */ @maxLength(100) apiVersion?: string; - @doc("Indicates if API revision is current api revision.") + /** + * Indicates if API revision is current api revision. + */ isCurrent?: boolean; - @doc("Indicates if API revision is accessible via the gateway.") + /** + * Indicates if API revision is accessible via the gateway. + */ @visibility("read") isOnline?: boolean; - @doc("Description of the API Revision.") + /** + * Description of the API Revision. + */ @maxLength(256) apiRevisionDescription?: string; - @doc("Description of the API Version.") + /** + * Description of the API Version. + */ @maxLength(256) apiVersionDescription?: string; - @doc("A resource identifier for the related ApiVersionSet.") + /** + * A resource identifier for the related ApiVersionSet. + */ apiVersionSetId?: string; - @doc("Specifies whether an API or Product subscription is required for accessing the API.") + /** + * Specifies whether an API or Product subscription is required for accessing the API. + */ @projectedName("json", "subscriptionRequired") IsSubscriptionRequired?: boolean; - @doc(" A URL to the Terms of Service for the API. MUST be in the format of a URL.") + /** + * A URL to the Terms of Service for the API. MUST be in the format of a URL. + */ termsOfServiceUrl?: string; - @doc("Contact information for the API.") + /** + * Contact information for the API. + */ contact?: ApiContactInformation; - @doc("License information for the API.") + /** + * License information for the API. + */ license?: ApiLicenseInformation; } -@doc("API Authentication Settings.") +/** + * API Authentication Settings. + */ model AuthenticationSettingsContract { - @doc("OAuth2 Authentication settings") + /** + * OAuth2 Authentication settings + */ oAuth2?: OAuth2AuthenticationSettingsContract; - @doc("OpenID Connect Authentication Settings") + /** + * OpenID Connect Authentication Settings + */ openid?: OpenIdAuthenticationSettingsContract; } -@doc("API OAuth2 Authentication settings details.") +/** + * API OAuth2 Authentication settings details. + */ model OAuth2AuthenticationSettingsContract { - @doc("OAuth authorization server identifier.") + /** + * OAuth authorization server identifier. + */ authorizationServerId?: string; - @doc("operations scope.") + /** + * operations scope. + */ scope?: string; } -@doc("API OAuth2 Authentication settings details.") +/** + * API OAuth2 Authentication settings details. + */ model OpenIdAuthenticationSettingsContract { - @doc("OAuth authorization server identifier.") + /** + * OAuth authorization server identifier. + */ openidProviderId?: string; - @doc("How to send token to the server.") + /** + * How to send token to the server. + */ bearerTokenSendingMethods?: BearerTokenSendingMethod[]; } -@doc("Subscription key parameter names details.") +/** + * Subscription key parameter names details. + */ model SubscriptionKeyParameterNamesContract { - @doc("Subscription key header name.") + /** + * Subscription key header name. + */ header?: string; - @doc("Subscription key query string parameter name.") + /** + * Subscription key query string parameter name. + */ query?: string; } -@doc("API contact information") +/** + * API contact information + */ model ApiContactInformation { - @doc("The identifying name of the contact person/organization") + /** + * The identifying name of the contact person/organization + */ name?: string; - @doc("The URL pointing to the contact information. MUST be in the format of a URL") + /** + * The URL pointing to the contact information. MUST be in the format of a URL + */ url?: string; - @doc("The email address of the contact person/organization. MUST be in the format of an email address") + /** + * The email address of the contact person/organization. MUST be in the format of an email address + */ email?: string; } -@doc("API license information") +/** + * API license information + */ model ApiLicenseInformation { - @doc("The license name used for the API") + /** + * The license name used for the API + */ name?: string; - @doc("A URL to the license used for the API. MUST be in the format of a URL") + /** + * A URL to the license used for the API. MUST be in the format of a URL + */ url?: string; } -@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + */ model Resource { - @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + */ @visibility("read") id?: string; - @doc("The name of the resource") + /** + * The name of the resource + */ @visibility("read") name?: string; - @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + */ @visibility("read") type?: string; } -@doc("Error Body contract.") +/** + * Error Body contract. + */ model ErrorResponseBody { - @doc("Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.") + /** + * Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response. + */ code?: string; - @doc("Human-readable representation of the error.") + /** + * Human-readable representation of the error. + */ message?: string; - @doc("The list of invalid fields send in request, in case of validation error.") + /** + * The list of invalid fields send in request, in case of validation error. + */ details?: ErrorFieldContract[]; } -@doc("Error Field contract.") +/** + * Error Field contract. + */ model ErrorFieldContract { - @doc("Property level error code.") + /** + * Property level error code. + */ code?: string; - @doc("Human-readable representation of property-level error.") + /** + * Human-readable representation of property-level error. + */ message?: string; - @doc("Property name.") + /** + * Property name. + */ target?: string; } -@doc("API Create or Update Parameters.") +/** + * API Create or Update Parameters. + */ model ApiCreateOrUpdateParameter { - @doc("API entity create of update properties.") + /** + * API entity create of update properties. + */ properties?: ApiCreateOrUpdateProperties; } -@doc("API Create or Update Properties.") +/** + * API Create or Update Properties. + */ model ApiCreateOrUpdateProperties extends ApiContractProperties { - @doc("Content value when Importing an API.") + /** + * Content value when Importing an API. + */ value?: string; - @doc("Format of the Content in which the API is getting imported.") + /** + * Format of the Content in which the API is getting imported. + */ format?: ContentFormat; - @doc("Criteria to limit import of WSDL to a subset of the document.") + /** + * Criteria to limit import of WSDL to a subset of the document. + */ wsdlSelector?: ApiCreateOrUpdatePropertiesWsdlSelector; - @doc(""" -Type of API to create. - * `http` creates a REST API - * `soap` creates a SOAP pass-through API - * `websocket` creates websocket API - * `graphql` creates GraphQL API. -""") + /** + * Type of API to create. + * * `http` creates a REST API + * * `soap` creates a SOAP pass-through API + * * `websocket` creates websocket API + * * `graphql` creates GraphQL API. + */ @projectedName("json", "apiType") soapApiType?: SoapApiType; } -@doc("Criteria to limit import of WSDL to a subset of the document.") +/** + * Criteria to limit import of WSDL to a subset of the document. + */ model ApiCreateOrUpdatePropertiesWsdlSelector { - @doc("Name of service to import from WSDL") + /** + * Name of service to import from WSDL + */ wsdlServiceName?: string; - @doc("Name of endpoint(port) to import from WSDL") + /** + * Name of endpoint(port) to import from WSDL + */ wsdlEndpointName?: string; } -@doc("API update contract details.") +/** + * API update contract details. + */ model ApiUpdateContract { - @doc("Properties of the API entity that can be updated.") + /** + * Properties of the API entity that can be updated. + */ properties?: ApiContractUpdateProperties; } -@doc("API update contract properties.") +/** + * API update contract properties. + */ model ApiContractUpdateProperties extends ApiEntityBaseContract { - @doc("API name.") + /** + * API name. + */ @maxLength(300) @minLength(1) displayName?: string; - @doc("Absolute URL of the backend service implementing this API.") + /** + * Absolute URL of the backend service implementing this API. + */ @maxLength(2000) @minLength(1) serviceUrl?: string; - @doc("Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.") + /** + * Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + */ @maxLength(400) path?: string; - @doc("Describes on which protocols the operations in this API can be invoked.") + /** + * Describes on which protocols the operations in this API can be invoked. + */ protocols?: Protocol[]; } -@doc("Paged API Revision list representation.") +/** + * Paged API Revision list representation. + */ model ApiRevisionListResult is Azure.Core.Page { - @doc("Total record count number across all pages.") - count?: int32; + /** + * Total record count number across all pages. + */ + count?: int64; } -@doc("Summary of revision metadata.") +/** + * Summary of revision metadata. + */ model ApiRevisionContract { - @doc("Identifier of the API Revision.") + /** + * Identifier of the API Revision. + */ @visibility("read") apiId?: string; - @doc("Revision number of API.") + /** + * Revision number of API. + */ @visibility("read") @maxLength(100) @minLength(1) apiRevision?: string; - @doc("The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.") + /** + * The time the API Revision was created. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDateTime?: utcDateTime; - @doc("The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.") + /** + * The time the API Revision were updated. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. updatedDateTime?: utcDateTime; - @doc("Description of the API Revision.") + /** + * Description of the API Revision. + */ @visibility("read") @maxLength(256) description?: string; - @doc("Gateway URL for accessing the non-current API Revision.") + /** + * Gateway URL for accessing the non-current API Revision. + */ @visibility("read") privateUrl?: string; - @doc("Indicates if API revision is the current api revision.") + /** + * Indicates if API revision is the current api revision. + */ @visibility("read") isOnline?: boolean; - @doc("Indicates if API revision is accessible via the gateway.") + /** + * Indicates if API revision is accessible via the gateway. + */ @visibility("read") isCurrent?: boolean; } -@doc("API Release details") +/** + * API Release details + */ model ApiReleaseContractProperties { - @doc("Identifier of the API the release belongs to.") + /** + * Identifier of the API the release belongs to. + */ apiId?: string; - @doc("The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.") + /** + * The time the API was released. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDateTime?: utcDateTime; - @doc("The time the API release was updated.") + /** + * The time the API release was updated. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. updatedDateTime?: utcDateTime; - @doc("Release Notes") + /** + * Release Notes + */ notes?: string; } -@doc("Operation Contract Properties") +/** + * Operation Contract Properties + */ model OperationContractProperties extends OperationEntityBaseContract { - @doc("Operation Name.") + /** + * Operation Name. + */ @maxLength(300) @minLength(1) displayName: string; - @doc("A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.") + /** + * A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. + */ method: string; - @doc("Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}") + /** + * Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} + */ @maxLength(1000) @minLength(1) urlTemplate: string; } -@doc("API Operation Entity Base Contract details.") +/** + * API Operation Entity Base Contract details. + */ model OperationEntityBaseContract { - @doc("Collection of URL template parameters.") + /** + * Collection of URL template parameters. + */ templateParameters?: ParameterContract[]; - @doc("Description of the operation. May include HTML formatting tags.") + /** + * Description of the operation. May include HTML formatting tags. + */ @maxLength(1000) description?: string; - @doc("An entity containing request details.") + /** + * An entity containing request details. + */ request?: RequestContract; - @doc("Array of Operation responses.") + /** + * Array of Operation responses. + */ responses?: ResponseContract[]; - @doc("Operation Policies") + /** + * Operation Policies + */ policies?: string; } -@doc("Operation parameters details.") +/** + * Operation parameters details. + */ model ParameterContract { - @doc("Parameter name.") + /** + * Parameter name. + */ name: string; - @doc("Parameter description.") + /** + * Parameter description. + */ description?: string; - @doc("Parameter type.") + /** + * Parameter type. + */ type: string; - @doc("Default parameter value.") + /** + * Default parameter value. + */ defaultValue?: string; - @doc("Specifies whether parameter is required or not.") + /** + * Specifies whether parameter is required or not. + */ required?: boolean; - @doc("Parameter values.") + /** + * Parameter values. + */ values?: string[]; - @doc("Schema identifier.") + /** + * Schema identifier. + */ schemaId?: string; - @doc("Type name defined by the schema.") + /** + * Type name defined by the schema. + */ typeName?: string; - @doc("Exampled defined for the parameter.") + /** + * Exampled defined for the parameter. + */ examples?: Record; } -@doc("Parameter example.") +/** + * Parameter example. + */ model ParameterExampleContract { - @doc("Short description for the example") + /** + * Short description for the example + */ summary?: string; - @doc("Long description for the example") + /** + * Long description for the example + */ description?: string; - @doc("Example value. May be a primitive value, or an object.") + /** + * Example value. May be a primitive value, or an object. + */ value?: unknown; - @doc("A URL that points to the literal example") + /** + * A URL that points to the literal example + */ externalValue?: string; } -@doc("Operation request details.") +/** + * Operation request details. + */ model RequestContract { - @doc("Operation request description.") + /** + * Operation request description. + */ description?: string; - @doc("Collection of operation request query parameters.") + /** + * Collection of operation request query parameters. + */ queryParameters?: ParameterContract[]; - @doc("Collection of operation request headers.") + /** + * Collection of operation request headers. + */ headers?: ParameterContract[]; - @doc("Collection of operation request representations.") + /** + * Collection of operation request representations. + */ representations?: RepresentationContract[]; } -@doc("Operation request/response representation details.") +/** + * Operation request/response representation details. + */ model RepresentationContract { - @doc("Specifies a registered or custom content type for this representation, e.g. application/xml.") + /** + * Specifies a registered or custom content type for this representation, e.g. application/xml. + */ contentType: string; - @doc("Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.") + /** + * Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. + */ schemaId?: string; - @doc("Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'.") + /** + * Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. + */ typeName?: string; - @doc("Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'..") + /** + * Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'.. + */ formParameters?: ParameterContract[]; - @doc("Exampled defined for the representation.") + /** + * Exampled defined for the representation. + */ examples?: Record; } -@doc("Operation response details.") +/** + * Operation response details. + */ model ResponseContract { - @doc("Operation response HTTP status code.") + /** + * Operation response HTTP status code. + */ statusCode: int32; - @doc("Operation response description.") + /** + * Operation response description. + */ description?: string; - @doc("Collection of operation response representations.") + /** + * Collection of operation response representations. + */ representations?: RepresentationContract[]; - @doc("Collection of operation response headers.") + /** + * Collection of operation response headers. + */ headers?: ParameterContract[]; } -@doc("API Operation Update Contract details.") +/** + * API Operation Update Contract details. + */ model OperationUpdateContract { - @doc("Properties of the API Operation entity that can be updated.") + /** + * Properties of the API Operation entity that can be updated. + */ properties?: OperationUpdateContractProperties; } -@doc("Operation Update Contract Properties.") +/** + * Operation Update Contract Properties. + */ model OperationUpdateContractProperties extends OperationEntityBaseContract { - @doc("Operation Name.") + /** + * Operation Name. + */ @maxLength(300) @minLength(1) displayName?: string; - @doc("A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.") + /** + * A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. + */ method?: string; - @doc("Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}") + /** + * Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} + */ @maxLength(1000) @minLength(1) urlTemplate?: string; } -@doc("Policy contract Properties.") +/** + * Policy contract Properties. + */ model PolicyContractProperties { - @doc("Contents of the Policy as defined by the format.") + /** + * Contents of the Policy as defined by the format. + */ value: string; - @doc("Format of the policyContent.") - format?: PolicyContentFormat; + /** + * Format of the policyContent. + */ + format?: PolicyContentFormat = PolicyContentFormat.xml; } -@doc("Tag contract Properties.") +/** + * Tag contract Properties. + */ model TagContractProperties { - @doc("Tag name.") + /** + * Tag name. + */ @maxLength(160) @minLength(1) displayName: string; } -@doc("Product profile.") +/** + * Product profile. + */ model ProductContractProperties extends ProductEntityBaseParameters { - @doc("Product name.") + /** + * Product name. + */ @maxLength(300) @minLength(1) displayName: string; } -@doc("Product Entity Base Parameters") +/** + * Product Entity Base Parameters + */ model ProductEntityBaseParameters { - @doc("Product description. May include HTML formatting tags.") + /** + * Product description. May include HTML formatting tags. + */ @maxLength(1000) description?: string; - @doc("Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process.") + /** + * Product terms of use. Developers trying to subscribe to the product will be presented and required to accept these terms before they can complete the subscription process. + */ terms?: string; - @doc("Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as \"protected\" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as \"open\" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true.") + /** + * Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. + */ @projectedName("json", "subscriptionRequired") IsSubscriptionRequired?: boolean; - @doc("whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false.") + /** + * whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. + */ @projectedName("json", "approvalRequired") IsApprovalRequired?: boolean; - @doc("Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false.") + /** + * Whether the number of subscriptions a user can have to this product at the same time. Set to null or omit to allow unlimited per user subscriptions. Can be present only if subscriptionRequired property is present and has a value of false. + */ subscriptionsLimit?: int32; - @doc("whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.") + /** + * whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished. + */ state?: ProductState; } -@doc("API Schema create or update contract Properties.") +/** + * API Schema create or update contract Properties. + */ model SchemaContractProperties { - @doc("Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
    - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
    - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
    - `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
    - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`.") + /** + * Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml).
    - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json`
    - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml`
    - `OpenApi` Schema use `application/vnd.oai.openapi.components+json`
    - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. + */ contentType: string; - @doc("Create or update Properties of the API Schema Document.") + /** + * Create or update Properties of the API Schema Document. + */ document?: SchemaDocumentProperties; } -@doc("Api Schema Document Properties.") +/** + * Api Schema Document Properties. + */ model SchemaDocumentProperties { - @doc("Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI.") + /** + * Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. + */ value?: string; - @doc("Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise.") + /** + * Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. + */ definitions?: Record; - @doc("Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise.") + /** + * Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. + */ components?: Record; } -@doc("Diagnostic Entity Properties") +/** + * Diagnostic Entity Properties + */ model DiagnosticContractProperties { - @doc("Specifies for what type of messages sampling settings should not apply.") + /** + * Specifies for what type of messages sampling settings should not apply. + */ alwaysLog?: AlwaysLog; - @doc("Resource Id of a target logger.") + /** + * Resource Id of a target logger. + */ loggerId: string; - @doc("Sampling settings for Diagnostic.") + /** + * Sampling settings for Diagnostic. + */ sampling?: SamplingSettings; - @doc("Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.") + /** + * Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + */ frontend?: PipelineDiagnosticSettings; - @doc("Diagnostic settings for incoming/outgoing HTTP messages to the Backend") + /** + * Diagnostic settings for incoming/outgoing HTTP messages to the Backend + */ backend?: PipelineDiagnosticSettings; - @doc("Log the ClientIP. Default is false.") + /** + * Log the ClientIP. Default is false. + */ logClientIp?: boolean; - @doc("Sets correlation protocol to use for Application Insights diagnostics.") + /** + * Sets correlation protocol to use for Application Insights diagnostics. + */ httpCorrelationProtocol?: HttpCorrelationProtocol; - @doc("The verbosity level applied to traces emitted by trace policies.") + /** + * The verbosity level applied to traces emitted by trace policies. + */ verbosity?: Verbosity; - @doc("The format of the Operation Name for Application Insights telemetries. Default is Name.") + /** + * The format of the Operation Name for Application Insights telemetries. Default is Name. + */ operationNameFormat?: OperationNameFormat; - @doc("Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings.") + /** + * Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. + */ metrics?: boolean; } -@doc("Sampling settings for Diagnostic.") +/** + * Sampling settings for Diagnostic. + */ model SamplingSettings { - @doc("Sampling type.") + /** + * Sampling type. + */ samplingType?: SamplingType; - @doc("Rate of sampling for fixed-rate sampling.") + /** + * Rate of sampling for fixed-rate sampling. + */ @maxValue(100) - percentage?: float32; + percentage?: float64; } -@doc("Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.") +/** + * Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + */ model PipelineDiagnosticSettings { - @doc("Diagnostic settings for request.") + /** + * Diagnostic settings for request. + */ request?: HttpMessageDiagnostic; - @doc("Diagnostic settings for response.") + /** + * Diagnostic settings for response. + */ response?: HttpMessageDiagnostic; } -@doc("Http message diagnostic settings.") +/** + * Http message diagnostic settings. + */ model HttpMessageDiagnostic { - @doc("Array of HTTP Headers to log.") + /** + * Array of HTTP Headers to log. + */ headers?: string[]; - @doc("Body logging settings.") + /** + * Body logging settings. + */ body?: BodyDiagnosticSettings; - @doc("Data masking settings.") + /** + * Data masking settings. + */ dataMasking?: DataMasking; } -@doc("Body logging settings.") +/** + * Body logging settings. + */ model BodyDiagnosticSettings { - @doc("Number of request body bytes to log.") + /** + * Number of request body bytes to log. + */ @maxValue(8192) bytes?: int32; } model DataMasking { - @doc("Masking settings for Url query parameters") + /** + * Masking settings for Url query parameters + */ queryParams?: DataMaskingEntity[]; - @doc("Masking settings for headers") + /** + * Masking settings for headers + */ headers?: DataMaskingEntity[]; } model DataMaskingEntity { - @doc("The name of an entity to mask (e.g. a name of a header or a query parameter).") + /** + * The name of an entity to mask (e.g. a name of a header or a query parameter). + */ value?: string; - @doc("Data masking mode.") + /** + * Data masking mode. + */ mode?: DataMaskingMode; } -@doc("Issue contract Properties.") +/** + * Issue contract Properties. + */ model IssueContractProperties extends IssueContractBaseProperties { - @doc("The issue title.") + /** + * The issue title. + */ title: string; - @doc("Text describing the issue.") + /** + * Text describing the issue. + */ description: string; - @doc("A resource identifier for the user created the issue.") + /** + * A resource identifier for the user created the issue. + */ userId: string; } -@doc("Issue contract Base Properties.") +/** + * Issue contract Base Properties. + */ model IssueContractBaseProperties { - @doc("Date and time when the issue was created.") + /** + * Date and time when the issue was created. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDate?: utcDateTime; - @doc("Status of the issue.") + /** + * Status of the issue. + */ state?: State; - @doc("A resource identifier for the API the issue was created for.") + /** + * A resource identifier for the API the issue was created for. + */ apiId?: string; } -@doc("Issue update Parameters.") +/** + * Issue update Parameters. + */ model IssueUpdateContract { - @doc("Issue entity Update contract properties.") + /** + * Issue entity Update contract properties. + */ properties?: IssueUpdateContractProperties; } -@doc("Issue contract Update Properties.") +/** + * Issue contract Update Properties. + */ model IssueUpdateContractProperties extends IssueContractBaseProperties { - @doc("The issue title.") + /** + * The issue title. + */ title?: string; - @doc("Text describing the issue.") + /** + * Text describing the issue. + */ description?: string; - @doc("A resource identifier for the user created the issue.") + /** + * A resource identifier for the user created the issue. + */ userId?: string; } -@doc("Issue Comment contract Properties.") +/** + * Issue Comment contract Properties. + */ model IssueCommentContractProperties { - @doc("Comment text.") + /** + * Comment text. + */ text: string; - @doc("Date and time when the comment was created.") + /** + * Date and time when the comment was created. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDate?: utcDateTime; - @doc("A resource identifier for the user who left the comment.") + /** + * A resource identifier for the user who left the comment. + */ userId: string; } -@doc("Issue Attachment contract Properties.") +/** + * Issue Attachment contract Properties. + */ model IssueAttachmentContractProperties { - @doc("Filename by which the binary data will be saved.") + /** + * Filename by which the binary data will be saved. + */ title: string; - @doc("Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided in the 'content' property.") + /** + * Either 'link' if content is provided via an HTTP link or the MIME type of the Base64-encoded binary data provided in the 'content' property. + */ contentFormat: string; - @doc("An HTTP link or Base64-encoded binary data.") + /** + * An HTTP link or Base64-encoded binary data. + */ content: string; } -@doc("TagDescription contract Properties.") +/** + * TagDescription contract Properties. + */ model TagDescriptionContractProperties extends TagDescriptionBaseProperties { - @doc("Identifier of the tag in the form of /tags/{tagId}") + /** + * Identifier of the tag in the form of /tags/{tagId} + */ tagId?: string; - @doc("Tag name.") + /** + * Tag name. + */ @maxLength(160) @minLength(1) displayName?: string; } -@doc("Parameters supplied to the Create TagDescription operation.") +/** + * Parameters supplied to the Create TagDescription operation. + */ model TagDescriptionBaseProperties { - @doc("Description of the Tag.") + /** + * Description of the Tag. + */ description?: string; - @doc("Absolute URL of external resources describing the tag.") + /** + * Absolute URL of external resources describing the tag. + */ @maxLength(2000) externalDocsUrl?: string; - @doc("Description of the external resources describing the tag.") + /** + * Description of the external resources describing the tag. + */ externalDocsDescription?: string; } -@doc("Parameters supplied to the Create TagDescription operation.") +/** + * Parameters supplied to the Create TagDescription operation. + */ model TagDescriptionCreateParameters { - @doc("Properties supplied to Create TagDescription operation.") + /** + * Properties supplied to Create TagDescription operation. + */ properties?: TagDescriptionBaseProperties; } -@doc("Paged Tag list representation.") +/** + * Paged Tag list representation. + */ model TagResourceListResult is Azure.Core.Page { - @doc("Total record count number across all pages.") - count?: int32; + /** + * Total record count number across all pages. + */ + count?: int64; } -@doc("TagResource contract properties.") +/** + * TagResource contract properties. + */ model TagResourceContract { - @doc("Tag associated with the resource.") + /** + * Tag associated with the resource. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key tag: TagTagResourceContractProperties; - @doc("API associated with the tag.") + /** + * API associated with the tag. + */ api?: ApiTagResourceContractProperties; - @doc("Operation associated with the tag.") + /** + * Operation associated with the tag. + */ operation?: OperationTagResourceContractProperties; - @doc("Product associated with the tag.") + /** + * Product associated with the tag. + */ product?: ProductTagResourceContractProperties; } -@doc("Contract defining the Tag property in the Tag Resource Contract") +/** + * Contract defining the Tag property in the Tag Resource Contract + */ model TagTagResourceContractProperties { - @doc("Tag identifier") + /** + * Tag identifier + */ id?: string; - @doc("Tag Name") + /** + * Tag Name + */ @maxLength(160) @minLength(1) name?: string; } -@doc("API contract properties for the Tag Resources.") +/** + * API contract properties for the Tag Resources. + */ model ApiTagResourceContractProperties extends ApiEntityBaseContract { - @doc("API identifier in the form /apis/{apiId}.") + /** + * API identifier in the form /apis/{apiId}. + */ id?: string; - @doc("API name.") + /** + * API name. + */ @maxLength(300) @minLength(1) name?: string; - @doc("Absolute URL of the backend service implementing this API.") + /** + * Absolute URL of the backend service implementing this API. + */ @maxLength(2000) @minLength(1) serviceUrl?: string; - @doc("Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.") + /** + * Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + */ @maxLength(400) path?: string; - @doc("Describes on which protocols the operations in this API can be invoked.") + /** + * Describes on which protocols the operations in this API can be invoked. + */ protocols?: Protocol[]; } -@doc("Operation Entity contract Properties.") +/** + * Operation Entity contract Properties. + */ model OperationTagResourceContractProperties { - @doc("Identifier of the operation in form /operations/{operationId}.") + /** + * Identifier of the operation in form /operations/{operationId}. + */ id?: string; - @doc("Operation name.") + /** + * Operation name. + */ @visibility("read") name?: string; - @doc("API Name.") + /** + * API Name. + */ @visibility("read") apiName?: string; - @doc("API Revision.") + /** + * API Revision. + */ @visibility("read") apiRevision?: string; - @doc("API Version.") + /** + * API Version. + */ @visibility("read") apiVersion?: string; - @doc("Operation Description.") + /** + * Operation Description. + */ @visibility("read") description?: string; - @doc("A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.") + /** + * A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. + */ @visibility("read") method?: string; - @doc("Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}") + /** + * Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} + */ @visibility("read") urlTemplate?: string; } -@doc("Product profile.") +/** + * Product profile. + */ model ProductTagResourceContractProperties extends ProductEntityBaseParameters { - @doc("Identifier of the product in the form of /products/{productId}") + /** + * Identifier of the product in the form of /products/{productId} + */ id?: string; - @doc("Product name.") + /** + * Product name. + */ @maxLength(300) @minLength(1) name: string; } -@doc("API Export result.") +/** + * API Export result. + */ model ApiExportResult { - @doc("ResourceId of the API which was exported.") + /** + * ResourceId of the API which was exported. + */ id?: string; - @doc("Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes.") + /** + * Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. + */ @projectedName("json", "format") exportResultFormat?: ExportResultFormat; - @doc("The object defining the schema of the exported API Detail") + /** + * The object defining the schema of the exported API Detail + */ value?: ApiExportResultValue; } -@doc("The object defining the schema of the exported API Detail") +/** + * The object defining the schema of the exported API Detail + */ model ApiExportResultValue { - @doc("Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes.") + /** + * Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes. + */ link?: string; } -@doc("Properties of an API Version Set.") +/** + * Properties of an API Version Set. + */ model ApiVersionSetContractProperties extends ApiVersionSetEntityBase { - @doc("Name of API Version Set") + /** + * Name of API Version Set + */ @maxLength(100) @minLength(1) displayName: string; - @doc("An value that determines where the API Version identifier will be located in a HTTP request.") + /** + * An value that determines where the API Version identifier will be located in a HTTP request. + */ versioningScheme: VersioningScheme; } -@doc("API Version set base parameters") +/** + * API Version set base parameters + */ model ApiVersionSetEntityBase { - @doc("Description of API Version Set.") + /** + * Description of API Version Set. + */ description?: string; - @doc("Name of query parameter that indicates the API Version if versioningScheme is set to `query`.") + /** + * Name of query parameter that indicates the API Version if versioningScheme is set to `query`. + */ @maxLength(100) @minLength(1) versionQueryName?: string; - @doc("Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`.") + /** + * Name of HTTP header parameter that indicates the API Version if versioningScheme is set to `header`. + */ @maxLength(100) @minLength(1) versionHeaderName?: string; } -@doc("Parameters to update or create an API Version Set Contract.") +/** + * Parameters to update or create an API Version Set Contract. + */ model ApiVersionSetUpdateParameters { - @doc("Parameters to update or create an API Version Set Contract.") + /** + * Parameters to update or create an API Version Set Contract. + */ properties?: ApiVersionSetUpdateParametersProperties; } -@doc("Properties used to create or update an API Version Set.") +/** + * Properties used to create or update an API Version Set. + */ model ApiVersionSetUpdateParametersProperties extends ApiVersionSetEntityBase { - @doc("Name of API Version Set") + /** + * Name of API Version Set + */ @maxLength(100) @minLength(1) displayName?: string; - @doc("An value that determines where the API Version identifier will be located in a HTTP request.") + /** + * An value that determines where the API Version identifier will be located in a HTTP request. + */ versioningScheme?: VersioningScheme; } -@doc("External OAuth authorization server settings Properties.") +/** + * External OAuth authorization server settings Properties. + */ model AuthorizationServerContractProperties extends AuthorizationServerContractBaseProperties { - @doc("User-friendly authorization server name.") + /** + * User-friendly authorization server name. + */ @maxLength(50) @minLength(1) displayName: string; - @doc("Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.") + /** + * Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. + */ clientRegistrationEndpoint: string; - @doc("OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.") + /** + * OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. + */ authorizationEndpoint: string; - @doc("Form of an authorization grant, which the client uses to request the access token.") + /** + * Form of an authorization grant, which the client uses to request the access token. + */ grantTypes: GrantType[]; - @doc("Client or app id registered with this authorization server.") + /** + * Client or app id registered with this authorization server. + */ clientId: string; - @doc("Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + /** + * Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + */ clientSecret?: string; } -@doc("External OAuth authorization server Update settings contract.") +/** + * External OAuth authorization server Update settings contract. + */ model AuthorizationServerContractBaseProperties { - @doc("Description of the authorization server. Can contain HTML formatting tags.") + /** + * Description of the authorization server. Can contain HTML formatting tags. + */ description?: string; - @doc("HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.") + /** + * HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. + */ authorizationMethods?: AuthorizationMethod[]; - @doc("Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.") + /** + * Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. + */ @projectedName("json", "clientAuthenticationMethod") clientAuthenticationMethods?: ClientAuthenticationMethod[]; - @doc("Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {\"name\" : \"name value\", \"value\": \"a value\"}.") + /** + * Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. + */ tokenBodyParameters?: TokenBodyParameterContract[]; - @doc("OAuth token endpoint. Contains absolute URI to entity being referenced.") + /** + * OAuth token endpoint. Contains absolute URI to entity being referenced. + */ tokenEndpoint?: string; - @doc("If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.") + /** + * If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. + */ @projectedName("json", "supportState") doesSupportState?: boolean; - @doc("Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.") + /** + * Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. + */ defaultScope?: string; - @doc("Specifies the mechanism by which access token is passed to the API. ") + /** + * Specifies the mechanism by which access token is passed to the API. + */ bearerTokenSendingMethods?: BearerTokenSendingMethod[]; - @doc("Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.") + /** + * Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. + */ resourceOwnerUsername?: string; - @doc("Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.") + /** + * Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. + */ resourceOwnerPassword?: string; } -@doc("OAuth acquire token request body parameter (www-url-form-encoded).") +/** + * OAuth acquire token request body parameter (www-url-form-encoded). + */ model TokenBodyParameterContract { - @doc("body parameter name.") + /** + * body parameter name. + */ name: string; - @doc("body parameter value.") + /** + * body parameter value. + */ value: string; } -@doc("External OAuth authorization server settings.") +/** + * External OAuth authorization server settings. + */ model AuthorizationServerUpdateContract extends Resource { - @doc("Properties of the External OAuth authorization server update Contract.") + /** + * Properties of the External OAuth authorization server update Contract. + */ properties?: AuthorizationServerUpdateContractProperties; } -@doc("External OAuth authorization server Update settings contract.") +/** + * External OAuth authorization server Update settings contract. + */ model AuthorizationServerUpdateContractProperties extends AuthorizationServerContractBaseProperties { - @doc("User-friendly authorization server name.") + /** + * User-friendly authorization server name. + */ @maxLength(50) @minLength(1) displayName?: string; - @doc("Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.") + /** + * Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. + */ clientRegistrationEndpoint?: string; - @doc("OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.") + /** + * OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2. + */ authorizationEndpoint?: string; - @doc("Form of an authorization grant, which the client uses to request the access token.") + /** + * Form of an authorization grant, which the client uses to request the access token. + */ grantTypes?: GrantType[]; - @doc("Client or app id registered with this authorization server.") + /** + * Client or app id registered with this authorization server. + */ clientId?: string; - @doc("Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + /** + * Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + */ clientSecret?: string; } -@doc("OAuth Server Secrets Contract.") +/** + * OAuth Server Secrets Contract. + */ model AuthorizationServerSecretsContract { - @doc("oAuth Authorization Server Secrets.") + /** + * oAuth Authorization Server Secrets. + */ clientSecret?: string; - @doc("Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.") + /** + * Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. + */ resourceOwnerUsername?: string; - @doc("Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.") + /** + * Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. + */ resourceOwnerPassword?: string; } -@doc("Parameters supplied to the Create Backend operation.") +/** + * Parameters supplied to the Create Backend operation. + */ model BackendContractProperties extends BackendBaseParameters { - @doc("Runtime Url of the Backend.") + /** + * Runtime Url of the Backend. + */ @maxLength(2000) @minLength(1) url: string; - @doc("Backend communication protocol.") + /** + * Backend communication protocol. + */ protocol: BackendProtocol; } -@doc("Backend entity base Parameter set.") +/** + * Backend entity base Parameter set. + */ model BackendBaseParameters { - @doc("Backend Title.") + /** + * Backend Title. + */ @maxLength(300) @minLength(1) title?: string; - @doc("Backend Description.") + /** + * Backend Description. + */ @maxLength(2000) @minLength(1) description?: string; - @doc("Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps.") + /** + * Management Uri of the Resource in External System. This url can be the Arm Resource Id of Logic Apps, Function Apps or API Apps. + */ @maxLength(2000) @minLength(1) resourceId?: string; - @doc("Backend Properties contract") + /** + * Backend Properties contract + */ properties?: BackendProperties; - @doc("Backend Credentials Contract Properties") + /** + * Backend Credentials Contract Properties + */ credentials?: BackendCredentialsContract; - @doc("Backend Proxy Contract Properties") + /** + * Backend Proxy Contract Properties + */ proxy?: BackendProxyContract; - @doc("Backend TLS Properties") + /** + * Backend TLS Properties + */ tls?: BackendTlsProperties; } -@doc("Properties specific to the Backend Type.") +/** + * Properties specific to the Backend Type. + */ model BackendProperties { - @doc("Backend Service Fabric Cluster Properties") + /** + * Backend Service Fabric Cluster Properties + */ serviceFabricCluster?: BackendServiceFabricClusterProperties; } -@doc("Properties of the Service Fabric Type Backend.") +/** + * Properties of the Service Fabric Type Backend. + */ model BackendServiceFabricClusterProperties { - @doc("The client certificate id for the management endpoint.") + /** + * The client certificate id for the management endpoint. + */ clientCertificateId?: string; - @doc("The client certificate thumbprint for the management endpoint. Will be ignored if certificatesIds are provided") + /** + * The client certificate thumbprint for the management endpoint. Will be ignored if certificatesIds are provided + */ clientCertificatethumbprint?: string; - @doc("Maximum number of retries while attempting resolve the partition.") + /** + * Maximum number of retries while attempting resolve the partition. + */ maxPartitionResolutionRetries?: int32; - @doc("The cluster management endpoint.") + /** + * The cluster management endpoint. + */ managementEndpoints: string[]; - @doc("Thumbprints of certificates cluster management service uses for tls communication") + /** + * Thumbprints of certificates cluster management service uses for tls communication + */ serverCertificateThumbprints?: string[]; - @doc("Server X509 Certificate Names Collection") + /** + * Server X509 Certificate Names Collection + */ serverX509Names?: X509CertificateName[]; } -@doc("Properties of server X509Names.") +/** + * Properties of server X509Names. + */ model X509CertificateName { - @doc("Common Name of the Certificate.") + /** + * Common Name of the Certificate. + */ name?: string; - @doc("Thumbprint for the Issuer of the Certificate.") + /** + * Thumbprint for the Issuer of the Certificate. + */ issuerCertificateThumbprint?: string; } -@doc("Details of the Credentials used to connect to Backend.") +/** + * Details of the Credentials used to connect to Backend. + */ model BackendCredentialsContract { - @doc("List of Client Certificate Ids.") + /** + * List of Client Certificate Ids. + */ certificateIds?: string[]; - @doc("List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided.") + /** + * List of Client Certificate Thumbprints. Will be ignored if certificatesIds are provided. + */ certificate?: string[]; - @doc("Query Parameter description.") + /** + * Query Parameter description. + */ query?: Record; - @doc("Header Parameter description.") + /** + * Header Parameter description. + */ header?: Record; - @doc("Authorization header authentication") + /** + * Authorization header authentication + */ authorization?: BackendAuthorizationHeaderCredentials; } -@doc("Authorization header information.") +/** + * Authorization header information. + */ model BackendAuthorizationHeaderCredentials { - @doc("Authentication Scheme name.") + /** + * Authentication Scheme name. + */ @maxLength(100) @minLength(1) scheme: string; - @doc("Authentication Parameter value.") + /** + * Authentication Parameter value. + */ @maxLength(300) @minLength(1) parameter: string; } -@doc("Details of the Backend WebProxy Server to use in the Request to Backend.") +/** + * Details of the Backend WebProxy Server to use in the Request to Backend. + */ model BackendProxyContract { - @doc("WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings.") + /** + * WebProxy Server AbsoluteUri property which includes the entire URI stored in the Uri instance, including all fragments and query strings. + */ @maxLength(2000) @minLength(1) url: string; - @doc("Username to connect to the WebProxy server") + /** + * Username to connect to the WebProxy server + */ username?: string; - @doc("Password to connect to the WebProxy Server") + /** + * Password to connect to the WebProxy Server + */ password?: string; } -@doc("Properties controlling TLS Certificate Validation.") +/** + * Properties controlling TLS Certificate Validation. + */ model BackendTlsProperties { - @doc("Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host.") - validateCertificateChain?: boolean; + /** + * Flag indicating whether SSL certificate chain validation should be done when using self-signed certificates for this backend host. + */ + validateCertificateChain?: boolean = true; - @doc("Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host.") - validateCertificateName?: boolean; + /** + * Flag indicating whether SSL certificate name validation should be done when using self-signed certificates for this backend host. + */ + validateCertificateName?: boolean = true; } -@doc("Backend update parameters.") +/** + * Backend update parameters. + */ model BackendUpdateParameters { - @doc("Backend entity update contract properties.") + /** + * Backend entity update contract properties. + */ properties?: BackendUpdateParameterProperties; } -@doc("Parameters supplied to the Update Backend operation.") +/** + * Parameters supplied to the Update Backend operation. + */ model BackendUpdateParameterProperties extends BackendBaseParameters { - @doc("Runtime Url of the Backend.") + /** + * Runtime Url of the Backend. + */ @maxLength(2000) @minLength(1) url?: string; - @doc("Backend communication protocol.") + /** + * Backend communication protocol. + */ protocol?: BackendProtocol; } -@doc("Reconnect request parameters.") +/** + * Reconnect request parameters. + */ model BackendReconnectContract extends Resource { - @doc("Reconnect request properties.") + /** + * Reconnect request properties. + */ properties?: BackendReconnectProperties; } -@doc("Properties to control reconnect requests.") +/** + * Properties to control reconnect requests. + */ model BackendReconnectProperties { - @doc("Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M.") + /** + * Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M. + */ after?: duration; } -@doc("Properties of the Cache contract.") +/** + * Properties of the Cache contract. + */ model CacheContractProperties { - @doc("Cache description") + /** + * Cache description + */ @maxLength(2000) description?: string; - @doc("Runtime connection string to cache") + /** + * Runtime connection string to cache + */ @maxLength(300) connectionString: string; - @doc("Location identifier to use cache from (should be either 'default' or valid Azure region identifier)") + /** + * Location identifier to use cache from (should be either 'default' or valid Azure region identifier) + */ @maxLength(256) useFromLocation: string; - @doc("Original uri of entity in external system cache points to") + /** + * Original uri of entity in external system cache points to + */ @maxLength(2000) @projectedName("json", "resourceId") resourceUri?: string; } -@doc("Cache update details.") +/** + * Cache update details. + */ model CacheUpdateParameters { - @doc("Cache update properties details.") + /** + * Cache update properties details. + */ properties?: CacheUpdateProperties; } -@doc("Parameters supplied to the Update Cache operation.") +/** + * Parameters supplied to the Update Cache operation. + */ model CacheUpdateProperties { - @doc("Cache description") + /** + * Cache description + */ @maxLength(2000) description?: string; - @doc("Runtime connection string to cache") + /** + * Runtime connection string to cache + */ @maxLength(300) connectionString?: string; - @doc("Location identifier to use cache from (should be either 'default' or valid Azure region identifier)") + /** + * Location identifier to use cache from (should be either 'default' or valid Azure region identifier) + */ @maxLength(256) useFromLocation?: string; - @doc("Original uri of entity in external system cache points to") + /** + * Original uri of entity in external system cache points to + */ @maxLength(2000) @projectedName("json", "resourceId") resourceUri?: string; } -@doc("Properties of the Certificate contract.") +/** + * Properties of the Certificate contract. + */ model CertificateContractProperties { - @doc("Subject attribute of the certificate.") + /** + * Subject attribute of the certificate. + */ subject: string; - @doc("Thumbprint of the certificate.") + /** + * Thumbprint of the certificate. + */ thumbprint: string; - @doc(""" -Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expirationDate: utcDateTime; - @doc("KeyVault location details of the certificate.") + /** + * KeyVault location details of the certificate. + */ keyVault?: KeyVaultContractProperties; } -@doc("KeyVault contract details.") +/** + * KeyVault contract details. + */ model KeyVaultContractProperties extends KeyVaultContractCreateProperties { - @doc("Last time sync and refresh status of secret from key vault.") + /** + * Last time sync and refresh status of secret from key vault. + */ lastStatus?: KeyVaultLastAccessStatusContractProperties; } -@doc("Issue contract Update Properties.") +/** + * Issue contract Update Properties. + */ model KeyVaultLastAccessStatusContractProperties { - @doc("Last status code for sync and refresh of secret from key vault.") + /** + * Last status code for sync and refresh of secret from key vault. + */ code?: string; - @doc("Details of the error else empty.") + /** + * Details of the error else empty. + */ message?: string; - @doc(""" -Last time secret was accessed. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* Last time secret was accessed. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timeStampUtc?: utcDateTime; } -@doc("Create keyVault contract details.") +/** + * Create keyVault contract details. + */ model KeyVaultContractCreateProperties { - @doc("Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi") + /** + * Key vault secret identifier for fetching secret. Providing a versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi + */ secretIdentifier?: string; - @doc("Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret.") + /** + * Null for SystemAssignedIdentity or Client Id for UserAssignedIdentity , which will be used to access key vault secret. + */ identityClientId?: string; } -@doc("Certificate create or update details.") +/** + * Certificate create or update details. + */ model CertificateCreateOrUpdateParameters { - @doc("Certificate create or update properties details.") + /** + * Certificate create or update properties details. + */ properties?: CertificateCreateOrUpdateProperties; } -@doc("Parameters supplied to the CreateOrUpdate certificate operation.") +/** + * Parameters supplied to the CreateOrUpdate certificate operation. + */ model CertificateCreateOrUpdateProperties { - @doc("Base 64 encoded certificate using the application/x-pkcs12 representation.") + /** + * Base 64 encoded certificate using the application/x-pkcs12 representation. + */ data?: string; - @doc("Password for the Certificate") + /** + * Password for the Certificate + */ password?: string; - @doc("KeyVault location details of the certificate.") + /** + * KeyVault location details of the certificate. + */ keyVault?: KeyVaultContractCreateProperties; } -@doc("A request to perform the connectivity check operation on a API Management service.") +/** + * A request to perform the connectivity check operation on a API Management service. + */ model ConnectivityCheckRequest { - @doc("Definitions about the connectivity check origin.") + /** + * Definitions about the connectivity check origin. + */ source: ConnectivityCheckRequestSource; - @doc("The connectivity check operation destination.") + /** + * The connectivity check operation destination. + */ destination: ConnectivityCheckRequestDestination; - @doc("The IP version to be used. Only IPv4 is supported for now.") + /** + * The IP version to be used. Only IPv4 is supported for now. + */ preferredIPVersion?: PreferredIPVersion; - @doc("The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value.") + /** + * The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value. + */ protocol?: ConnectivityCheckProtocol; - @doc("Protocol-specific configuration.") + /** + * Protocol-specific configuration. + */ protocolConfiguration?: ConnectivityCheckRequestProtocolConfiguration; } -@doc("Definitions about the connectivity check origin.") +/** + * Definitions about the connectivity check origin. + */ model ConnectivityCheckRequestSource { - @doc("The API Management service region from where to start the connectivity check operation.") + /** + * The API Management service region from where to start the connectivity check operation. + */ region: string; - @doc("The particular VMSS instance from which to fire the request.") - instance?: int32; + /** + * The particular VMSS instance from which to fire the request. + */ + instance?: int64; } -@doc("The connectivity check operation destination.") +/** + * The connectivity check operation destination. + */ model ConnectivityCheckRequestDestination { - @doc("Destination address. Can either be an IP address or a FQDN.") + /** + * Destination address. Can either be an IP address or a FQDN. + */ address: string; - @doc("Destination port.") - port: int32; + /** + * Destination port. + */ + port: int64; } -@doc("Protocol-specific configuration.") +/** + * Protocol-specific configuration. + */ model ConnectivityCheckRequestProtocolConfiguration { - @doc("Configuration for HTTP or HTTPS requests.") + /** + * Configuration for HTTP or HTTPS requests. + */ @projectedName("json", "HTTPConfiguration") httpConfiguration?: ConnectivityCheckRequestProtocolConfigurationHttpConfiguration; } -@doc("Configuration for HTTP or HTTPS requests.") +/** + * Configuration for HTTP or HTTPS requests. + */ model ConnectivityCheckRequestProtocolConfigurationHttpConfiguration { - @doc("The HTTP method to be used.") + /** + * The HTTP method to be used. + */ method?: Method; - @doc("List of HTTP status codes considered valid for the request response.") - validStatusCodes?: int32[]; + /** + * List of HTTP status codes considered valid for the request response. + */ + validStatusCodes?: int64[]; - @doc("List of headers to be included in the request.") + /** + * List of headers to be included in the request. + */ headers?: HttpHeader[]; } -@doc("HTTP header and it's value.") +/** + * HTTP header and it's value. + */ model HttpHeader { - @doc("Header name.") + /** + * Header name. + */ name: string; - @doc("Header value.") + /** + * Header value. + */ value: string; } -@doc("Information on the connectivity status.") +/** + * Information on the connectivity status. + */ model ConnectivityCheckResponse { - @doc("List of hops between the source and the destination.") + /** + * List of hops between the source and the destination. + */ @visibility("read") hops?: ConnectivityHop[]; - @doc("The connection status.") + /** + * The connection status. + */ @visibility("read") connectionStatus?: ConnectionStatus; - @doc("Average latency in milliseconds.") + /** + * Average latency in milliseconds. + */ @visibility("read") - avgLatencyInMs?: int32; + avgLatencyInMs?: int64; - @doc("Minimum latency in milliseconds.") + /** + * Minimum latency in milliseconds. + */ @visibility("read") - minLatencyInMs?: int32; + minLatencyInMs?: int64; - @doc("Maximum latency in milliseconds.") + /** + * Maximum latency in milliseconds. + */ @visibility("read") - maxLatencyInMs?: int32; + maxLatencyInMs?: int64; - @doc("Total number of probes sent.") + /** + * Total number of probes sent. + */ @visibility("read") - probesSent?: int32; + probesSent?: int64; - @doc("Number of failed probes.") + /** + * Number of failed probes. + */ @visibility("read") - probesFailed?: int32; + probesFailed?: int64; } -@doc("Information about a hop between the source and the destination.") +/** + * Information about a hop between the source and the destination. + */ model ConnectivityHop { - @doc("The type of the hop.") + /** + * The type of the hop. + */ @visibility("read") type?: string; - @doc("The ID of the hop.") + /** + * The ID of the hop. + */ @visibility("read") id?: string; - @doc("The IP address of the hop.") + /** + * The IP address of the hop. + */ @visibility("read") address?: string; - @doc("The ID of the resource corresponding to this hop.") + /** + * The ID of the resource corresponding to this hop. + */ @visibility("read") resourceId?: string; - @doc("List of next hop identifiers.") + /** + * List of next hop identifiers. + */ @visibility("read") nextHopIds?: string[]; - @doc("List of issues.") + /** + * List of issues. + */ @visibility("read") issues?: ConnectivityIssue[]; } -@doc("Information about an issue encountered in the process of checking for connectivity.") +/** + * Information about an issue encountered in the process of checking for connectivity. + */ model ConnectivityIssue { - @doc("The origin of the issue.") + /** + * The origin of the issue. + */ @visibility("read") origin?: Origin; - @doc("The severity of the issue.") + /** + * The severity of the issue. + */ @visibility("read") severity?: Severity; - @doc("The type of issue.") + /** + * The type of issue. + */ @visibility("read") type?: IssueType; - @doc("Provides additional context on the issue.") + /** + * Provides additional context on the issue. + */ @visibility("read") context?: Record[]; } -@doc("Paged list of content types.") +/** + * Paged list of content types. + */ model ContentTypeListResult is Azure.Core.Page; -@doc("Content type contract details.") +/** + * Content type contract details. + */ model ContentTypeContract extends Resource { - @doc("Properties of the content type.") + /** + * Properties of the content type. + */ properties?: ContentTypeContractProperties; } model ContentTypeContractProperties { - @doc("Content type identifier") + /** + * Content type identifier + */ id?: string; - @doc("Content type name. Must be 1 to 250 characters long.") + /** + * Content type name. Must be 1 to 250 characters long. + */ name?: string; - @doc("Content type description.") + /** + * Content type description. + */ description?: string; - @doc("Content type schema.") + /** + * Content type schema. + */ schema?: Record; - @doc("Content type version.") + /** + * Content type version. + */ version?: string; } -@doc("Paged list of content items.") +/** + * Paged list of content items. + */ model ContentItemListResult is Azure.Core.Page; -@doc("Content type contract details.") +/** + * Content type contract details. + */ model ContentItemContract extends Resource { - @doc("Properties of the content item.") + /** + * Properties of the content item. + */ properties?: Record; } model DeletedServiceContractProperties { - @doc("Fully-qualified API Management Service Resource ID") + /** + * Fully-qualified API Management Service Resource ID + */ serviceId?: string; - @doc("UTC Date and Time when the service will be automatically purged. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.") + /** + * UTC Date and Time when the service will be automatically purged. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. scheduledPurgeDate?: utcDateTime; - @doc("UTC Timestamp when the service was soft-deleted. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard.") + /** + * UTC Timestamp when the service was soft-deleted. The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. deletionDate?: utcDateTime; } -@doc("The API Management service SKUs operation response.") +/** + * The API Management service SKUs operation response. + */ model ResourceSkuResults is Azure.Core.Page; -@doc("Describes an available API Management service SKU.") +/** + * Describes an available API Management service SKU. + */ model ResourceSkuResult { - @doc("The type of resource the SKU applies to.") + /** + * The type of resource the SKU applies to. + */ @visibility("read") resourceType?: string; - @doc("Specifies API Management SKU.") + /** + * Specifies API Management SKU. + */ @visibility("read") sku?: ResourceSku; - @doc("Specifies the number of API Management units.") + /** + * Specifies the number of API Management units. + */ @visibility("read") capacity?: ResourceSkuCapacity; } -@doc("Describes scaling information of a SKU.") +/** + * Describes scaling information of a SKU. + */ model ResourceSkuCapacity { - @doc("The minimum capacity.") + /** + * The minimum capacity. + */ @visibility("read") minimum?: int32; - @doc("The maximum capacity that can be set.") + /** + * The maximum capacity that can be set. + */ @visibility("read") maximum?: int32; - @doc("The default capacity.") + /** + * The default capacity. + */ @visibility("read") default?: int32; - @doc("The scale type applicable to the sku.") + /** + * The scale type applicable to the sku. + */ @visibility("read") scaleType?: ResourceSkuCapacityScaleType; } -@doc("Parameters supplied to the Backup/Restore of an API Management service operation.") +/** + * Parameters supplied to the Backup/Restore of an API Management service operation. + */ model ApiManagementServiceBackupRestoreParameters { - @doc("The name of the Azure storage account (used to place/retrieve the backup).") + /** + * The name of the Azure storage account (used to place/retrieve the backup). + */ storageAccount: string; - @doc("The name of the blob container (used to place/retrieve the backup).") + /** + * The name of the blob container (used to place/retrieve the backup). + */ containerName: string; - @doc("The name of the backup file to create/retrieve.") + /** + * The name of the backup file to create/retrieve. + */ backupName: string; - @doc("The type of access to be used for the storage account.") - accessType?: AccessType; + /** + * The type of access to be used for the storage account. + */ + accessType?: AccessType = AccessType.AccessKey; - @doc("Storage account access key. Required only if `accessType` is set to `AccessKey`.") + /** + * Storage account access key. Required only if `accessType` is set to `AccessKey`. + */ accessKey?: string; - @doc("The Client ID of user assigned managed identity. Required only if `accessType` is set to `UserAssignedManagedIdentity`.") + /** + * The Client ID of user assigned managed identity. Required only if `accessType` is set to `UserAssignedManagedIdentity`. + */ clientId?: string; } -@doc("Properties of an API Management service resource description.") +/** + * Properties of an API Management service resource description. + */ model ApiManagementServiceProperties extends ApiManagementServiceBaseProperties { - @doc("Publisher email.") + /** + * Publisher email. + */ @maxLength(100) publisherEmail: string; - @doc("Publisher name.") + /** + * Publisher name. + */ @maxLength(100) publisherName: string; } -@doc("Base Properties of an API Management service resource description.") +/** + * Base Properties of an API Management service resource description. + */ model ApiManagementServiceBaseProperties { - @doc("Email address from which the notification will be sent.") + /** + * Email address from which the notification will be sent. + */ @maxLength(100) notificationSenderEmail?: string; - @doc("The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.") + /** + * The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + */ @visibility("read") provisioningState?: string; - @doc("The provisioning state of the API Management service, which is targeted by the long running operation started on the service.") + /** + * The provisioning state of the API Management service, which is targeted by the long running operation started on the service. + */ @visibility("read") targetProvisioningState?: string; - @doc("Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.") + /** + * Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdAtUtc?: utcDateTime; - @doc("Gateway URL of the API Management service.") + /** + * Gateway URL of the API Management service. + */ @visibility("read") gatewayUrl?: string; - @doc("Gateway URL of the API Management service in the Default Region.") + /** + * Gateway URL of the API Management service in the Default Region. + */ @visibility("read") gatewayRegionalUrl?: string; - @doc("Publisher portal endpoint Url of the API Management service.") + /** + * Publisher portal endpoint Url of the API Management service. + */ @visibility("read") portalUrl?: string; - @doc("Management API endpoint URL of the API Management service.") + /** + * Management API endpoint URL of the API Management service. + */ @visibility("read") managementApiUrl?: string; - @doc("SCM endpoint URL of the API Management service.") + /** + * SCM endpoint URL of the API Management service. + */ @visibility("read") scmUrl?: string; - @doc("DEveloper Portal endpoint URL of the API Management service.") + /** + * DEveloper Portal endpoint URL of the API Management service. + */ @visibility("read") developerPortalUrl?: string; - @doc("Custom hostname configuration of the API Management service.") + /** + * Custom hostname configuration of the API Management service. + */ hostnameConfigurations?: HostnameConfiguration[]; - @doc("Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU.") + /** + * Public Static Load Balanced IP addresses of the API Management service in Primary region. Available only for Basic, Standard, Premium and Isolated SKU. + */ @visibility("read") publicIPAddresses?: string[]; - @doc("Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU.") + /** + * Private Static Load Balanced IP addresses of the API Management service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. + */ @visibility("read") privateIPAddresses?: string[]; - @doc("Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network.") + /** + * Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the region. Supported only for Developer and Premium SKU being deployed in Virtual Network. + */ publicIpAddressId?: string; - @doc("Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'") + /** + * Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled' + */ publicNetworkAccess?: PublicNetworkAccess; - @doc("Virtual network configuration of the API Management service.") + /** + * Virtual network configuration of the API Management service. + */ virtualNetworkConfiguration?: VirtualNetworkConfiguration; - @doc("Additional datacenter locations of the API Management service.") + /** + * Additional datacenter locations of the API Management service. + */ additionalLocations?: AdditionalLocation[]; - @doc("Custom properties of the API Management service.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
    Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.

    You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384") + /** + * Custom properties of the API Management service.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
    Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.

    You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384 + */ customProperties?: Record; - @doc("List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.") + /** + * List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10. + */ certificates?: CertificateConfiguration[]; - @doc("Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway.") + /** + * Property only meant to be used for Consumption SKU Service. This enforces a client certificate to be presented on each request to the gateway. This also enables the ability to authenticate the certificate in the policy on the gateway. + */ enableClientCertificate?: boolean; - @doc("Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region.") + /** + * Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in master region. + */ disableGateway?: boolean; - @doc("The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.") - virtualNetworkType?: VirtualNetworkType; + /** + * The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. + */ + virtualNetworkType?: VirtualNetworkType = VirtualNetworkType.None; - @doc("Control Plane Apis version constraint for the API Management service.") + /** + * Control Plane Apis version constraint for the API Management service. + */ apiVersionConstraint?: ApiVersionConstraint; - @doc("Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored.") + /** + * Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored. + */ restore?: boolean; - @doc("List of Private Endpoint Connections of this service.") + /** + * List of Private Endpoint Connections of this service. + */ privateEndpointConnections?: RemotePrivateEndpointConnectionWrapper[]; - @doc("Compute Platform Version running the service in this location.") + /** + * Compute Platform Version running the service in this location. + */ @visibility("read") platformVersion?: PlatformVersion; } -@doc("Custom hostname configuration.") +/** + * Custom hostname configuration. + */ model HostnameConfiguration { - @doc("Hostname type.") + /** + * Hostname type. + */ type: HostnameType; - @doc("Hostname to configure on the Api Management service.") + /** + * Hostname to configure on the Api Management service. + */ hostName: string; - @doc("Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update of ssl certificate will not work. This requires Api Management service to be configured with aka.ms/apimmsi. The secret should be of type *application/x-pkcs12*") + /** + * Url to the KeyVault Secret containing the Ssl Certificate. If absolute Url containing version is provided, auto-update of ssl certificate will not work. This requires Api Management service to be configured with aka.ms/apimmsi. The secret should be of type *application/x-pkcs12* + */ keyVaultId?: string; - @doc("System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate.") + /** + * System or User Assigned Managed identity clientId as generated by Azure AD, which has GET access to the keyVault containing the SSL certificate. + */ identityClientId?: string; - @doc("Base64 Encoded certificate.") + /** + * Base64 Encoded certificate. + */ encodedCertificate?: string; - @doc("Certificate Password.") + /** + * Certificate Password. + */ certificatePassword?: string; - @doc("Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to Proxy Hostname Type.") + /** + * Specify true to setup the certificate associated with this Hostname as the Default SSL Certificate. If a client does not send the SNI header, then this will be the certificate that will be challenged. The property is useful if a service has multiple custom hostname enabled and it needs to decide on the default ssl certificate. The setting only applied to Proxy Hostname Type. + */ defaultSslBinding?: boolean; - @doc("Specify true to always negotiate client certificate on the hostname. Default Value is false.") + /** + * Specify true to always negotiate client certificate on the hostname. Default Value is false. + */ negotiateClientCertificate?: boolean; - @doc("Certificate information.") + /** + * Certificate information. + */ certificate?: CertificateInformation; - @doc("Certificate Source.") + /** + * Certificate Source. + */ certificateSource?: CertificateSource; - @doc("Certificate Status.") + /** + * Certificate Status. + */ certificateStatus?: CertificateStatus; } -@doc("SSL certificate information.") +/** + * SSL certificate information. + */ model CertificateInformation { - @doc("Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.") + /** + * Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expiry: utcDateTime; - @doc("Thumbprint of the certificate.") + /** + * Thumbprint of the certificate. + */ thumbprint: string; - @doc("Subject of the certificate.") + /** + * Subject of the certificate. + */ subject: string; } -@doc("Configuration of a virtual network to which API Management service is deployed.") +/** + * Configuration of a virtual network to which API Management service is deployed. + */ model VirtualNetworkConfiguration { - @doc("The virtual network ID. This is typically a GUID. Expect a null GUID by default.") + /** + * The virtual network ID. This is typically a GUID. Expect a null GUID by default. + */ @visibility("read") vnetid?: string; - @doc("The name of the subnet.") + /** + * The name of the subnet. + */ @visibility("read") subnetname?: string; - @doc("The full resource ID of a subnet in a virtual network to deploy the API Management service in.") + /** + * The full resource ID of a subnet in a virtual network to deploy the API Management service in. + */ @pattern("^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$") subnetResourceId?: string; } -@doc("Description of an additional API Management resource location.") +/** + * Description of an additional API Management resource location. + */ model AdditionalLocation { - @doc("The location name of the additional region among Azure Data center regions.") + /** + * The location name of the additional region among Azure Data center regions. + */ location: string; - @doc("SKU properties of the API Management service.") + /** + * SKU properties of the API Management service. + */ sku: ApiManagementServiceSkuProperties; - @doc("A list of availability zones denoting where the resource needs to come from.") + /** + * A list of availability zones denoting where the resource needs to come from. + */ zones?: string[]; - @doc("Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard, Premium and Isolated SKU.") + /** + * Public Static Load Balanced IP addresses of the API Management service in the additional location. Available only for Basic, Standard, Premium and Isolated SKU. + */ @visibility("read") publicIPAddresses?: string[]; - @doc("Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard, Premium and Isolated SKU.") + /** + * Private Static Load Balanced IP addresses of the API Management service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard, Premium and Isolated SKU. + */ @visibility("read") privateIPAddresses?: string[]; - @doc("Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network.") + /** + * Public Standard SKU IP V4 based IP address to be associated with Virtual Network deployed service in the location. Supported only for Premium SKU being deployed in Virtual Network. + */ publicIpAddressId?: string; - @doc("Virtual network configuration for the location.") + /** + * Virtual network configuration for the location. + */ virtualNetworkConfiguration?: VirtualNetworkConfiguration; - @doc("Gateway URL of the API Management service in the Region.") + /** + * Gateway URL of the API Management service in the Region. + */ @visibility("read") gatewayRegionalUrl?: string; - @doc("Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location.") + /** + * Property only valid for an Api Management service deployed in multiple locations. This can be used to disable the gateway in this additional location. + */ disableGateway?: boolean; - @doc("Compute Platform Version running the service.") + /** + * Compute Platform Version running the service. + */ @visibility("read") platformVersion?: PlatformVersion; } -@doc("API Management service resource SKU properties.") +/** + * API Management service resource SKU properties. + */ model ApiManagementServiceSkuProperties { - @doc("Name of the Sku.") + /** + * Name of the Sku. + */ name: SkuType; - @doc("Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0.") + /** + * Capacity of the SKU (number of deployed units of the SKU). For Consumption SKU capacity must be specified as 0. + */ capacity: int32; } -@doc("Certificate configuration which consist of non-trusted intermediates and root certificates.") +/** + * Certificate configuration which consist of non-trusted intermediates and root certificates. + */ model CertificateConfiguration { - @doc("Base64 Encoded certificate.") + /** + * Base64 Encoded certificate. + */ encodedCertificate?: string; - @doc("Certificate Password.") + /** + * Certificate Password. + */ certificatePassword?: string; - @doc("The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations.") + /** + * The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. + */ storeName: CertificateConfigurationStoreName; - @doc("Certificate information.") + /** + * Certificate information. + */ certificate?: CertificateInformation; } -@doc("Control Plane Apis version constraint for the API Management service.") +/** + * Control Plane Apis version constraint for the API Management service. + */ model ApiVersionConstraint { - @doc("Limit control plane API calls to API Management service with version equal to or newer than this value.") + /** + * Limit control plane API calls to API Management service with version equal to or newer than this value. + */ minApiVersion?: string; } -@doc("Remote Private Endpoint Connection resource.") +/** + * Remote Private Endpoint Connection resource. + */ model RemotePrivateEndpointConnectionWrapper { - @doc("Private Endpoint connection resource id") + /** + * Private Endpoint connection resource id + */ id?: string; - @doc("Private Endpoint Connection Name") + /** + * Private Endpoint Connection Name + */ name?: string; - @doc("Private Endpoint Connection Resource Type") + /** + * Private Endpoint Connection Resource Type + */ type?: string; - @doc("Resource properties.") + /** + * Resource properties. + */ properties?: PrivateEndpointConnectionWrapperProperties; } -@doc("Properties of the PrivateEndpointConnectProperties.") +/** + * Properties of the PrivateEndpointConnectProperties. + */ model PrivateEndpointConnectionWrapperProperties { - @doc("The resource of private end point.") + /** + * The resource of private end point. + */ privateEndpoint?: ArmIdWrapper; - @doc("A collection of information about the state of the connection between service consumer and provider.") + /** + * A collection of information about the state of the connection between service consumer and provider. + */ privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; - @doc("The provisioning state of the private endpoint connection resource.") + /** + * The provisioning state of the private endpoint connection resource. + */ @visibility("read") provisioningState?: string; - @doc("All the Group ids.") + /** + * All the Group ids. + */ @visibility("read") groupIds?: string[]; } -@doc("A wrapper for an ARM resource id") +/** + * A wrapper for an ARM resource id + */ model ArmIdWrapper { @visibility("read") id?: string; } -@doc("A collection of information about the state of the connection between service consumer and provider.") +/** + * A collection of information about the state of the connection between service consumer and provider. + */ model PrivateLinkServiceConnectionState { - @doc("Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.") + /** + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + */ status?: PrivateEndpointServiceConnectionStatus; - @doc("The reason for approval/rejection of the connection.") + /** + * The reason for approval/rejection of the connection. + */ description?: string; - @doc("A message indicating if changes on the service provider require any updates on the consumer.") + /** + * A message indicating if changes on the service provider require any updates on the consumer. + */ actionsRequired?: string; } -@doc("Identity properties of the Api Management service resource.") +/** + * Identity properties of the Api Management service resource. + */ model ApiManagementServiceIdentity { - @doc("The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.") + /** + * The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. + */ type: ApimIdentityType; - @doc("The principal id of the identity.") + /** + * The principal id of the identity. + */ @visibility("read") principalId?: string; - @doc("The client tenant id of the identity.") + /** + * The client tenant id of the identity. + */ @visibility("read") tenantId?: string; - @doc(""" -The list of user identities associated with the resource. The user identity + /** +* The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. -""") +*/ userAssignedIdentities?: Record; } model UserIdentityProperties { - @doc("The principal id of user assigned identity.") + /** + * The principal id of user assigned identity. + */ principalId?: string; - @doc("The client id of user assigned identity.") + /** + * The client id of user assigned identity. + */ clientId?: string; } -@doc("The Resource definition.") +/** + * The Resource definition. + */ model ApimResource { - @doc("Resource ID.") + /** + * Resource ID. + */ @visibility("read") id?: string; - @doc("Resource name.") + /** + * Resource name. + */ @visibility("read") name?: string; - @doc("Resource type for API Management resource is set to Microsoft.ApiManagement.") + /** + * Resource type for API Management resource is set to Microsoft.ApiManagement. + */ @visibility("read") type?: string; - @doc("Resource tags.") + /** + * Resource tags. + */ tags?: Record; } -@doc("Parameter supplied to Update Api Management Service.") +/** + * Parameter supplied to Update Api Management Service. + */ model ApiManagementServiceUpdateParameters extends ApimResource { - @doc("Properties of the API Management service.") + /** + * Properties of the API Management service. + */ properties?: ApiManagementServiceUpdateProperties; - @doc("SKU properties of the API Management service.") + /** + * SKU properties of the API Management service. + */ sku?: ApiManagementServiceSkuProperties; - @doc("Managed service identity of the Api Management service.") + /** + * Managed service identity of the Api Management service. + */ identity?: ApiManagementServiceIdentity; - @doc("ETag of the resource.") + /** + * ETag of the resource. + */ @visibility("read") etag?: string; - @doc("A list of availability zones denoting where the resource needs to come from.") + /** + * A list of availability zones denoting where the resource needs to come from. + */ zones?: string[]; } -@doc("Properties of an API Management service resource description.") +/** + * Properties of an API Management service resource description. + */ model ApiManagementServiceUpdateProperties extends ApiManagementServiceBaseProperties { - @doc("Publisher email.") + /** + * Publisher email. + */ @maxLength(100) publisherEmail?: string; - @doc("Publisher name.") + /** + * Publisher name. + */ @maxLength(100) publisherName?: string; } -@doc("The response of the GetSsoToken operation.") +/** + * The response of the GetSsoToken operation. + */ model ApiManagementServiceGetSsoTokenResult { - @doc("Redirect URL to the Publisher Portal containing the SSO token.") + /** + * Redirect URL to the Publisher Portal containing the SSO token. + */ redirectUri?: string; } -@doc("Parameters supplied to the CheckNameAvailability operation.") +/** + * Parameters supplied to the CheckNameAvailability operation. + */ model ApiManagementServiceCheckNameAvailabilityParameters { - @doc("The name to check for availability.") + /** + * The name to check for availability. + */ name: string; } -@doc("Response of the CheckNameAvailability operation.") +/** + * Response of the CheckNameAvailability operation. + */ model ApiManagementServiceNameAvailabilityResult { - @doc("True if the name is available and can be used to create a new API Management service; otherwise false.") + /** + * True if the name is available and can be used to create a new API Management service; otherwise false. + */ @visibility("read") nameAvailable?: boolean; - @doc("If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name.") + /** + * If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name. + */ @visibility("read") message?: string; - @doc("Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable.") + /** + * Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. + */ reason?: NameAvailabilityReason; } -@doc("Response of the GetDomainOwnershipIdentifier operation.") +/** + * Response of the GetDomainOwnershipIdentifier operation. + */ model ApiManagementServiceGetDomainOwnershipIdentifierResult { - @doc("The domain ownership identifier value.") + /** + * The domain ownership identifier value. + */ @visibility("read") domainOwnershipIdentifier?: string; } -@doc("Parameter supplied to the Apply Network configuration operation.") +/** + * Parameter supplied to the Apply Network configuration operation. + */ model ApiManagementServiceApplyNetworkConfigurationParameters { - @doc("Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required.") + /** + * Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required. + */ location?: string; } -@doc("Email Template Contract properties.") +/** + * Email Template Contract properties. + */ model EmailTemplateContractProperties { - @doc("Subject of the Template.") + /** + * Subject of the Template. + */ @maxLength(1000) @minLength(1) subject: string; - @doc("Email Template Body. This should be a valid XDocument") + /** + * Email Template Body. This should be a valid XDocument + */ @minLength(1) body: string; - @doc("Title of the Template.") + /** + * Title of the Template. + */ title?: string; - @doc("Description of the Email Template.") + /** + * Description of the Email Template. + */ description?: string; - @doc("Whether the template is the default template provided by API Management or has been edited.") + /** + * Whether the template is the default template provided by API Management or has been edited. + */ @visibility("read") isDefault?: boolean; - @doc("Email Template Parameter values.") + /** + * Email Template Parameter values. + */ parameters?: EmailTemplateParametersContractProperties[]; } -@doc("Email Template Parameter contract.") +/** + * Email Template Parameter contract. + */ model EmailTemplateParametersContractProperties { - @doc("Template parameter name.") + /** + * Template parameter name. + */ @maxLength(256) @minLength(1) @pattern("^[A-Za-z0-9-._]+$") name?: string; - @doc("Template parameter title.") + /** + * Template parameter title. + */ @maxLength(4096) @minLength(1) title?: string; - @doc("Template parameter description.") + /** + * Template parameter description. + */ @maxLength(256) @minLength(1) @pattern("^[A-Za-z0-9-._]+$") description?: string; } -@doc("Email Template update Parameters.") +/** + * Email Template update Parameters. + */ model EmailTemplateUpdateParameters { - @doc("Email Template Update contract properties.") + /** + * Email Template Update contract properties. + */ properties?: EmailTemplateUpdateParameterProperties; } -@doc("Email Template Update Contract properties.") +/** + * Email Template Update Contract properties. + */ model EmailTemplateUpdateParameterProperties { - @doc("Subject of the Template.") + /** + * Subject of the Template. + */ @maxLength(1000) @minLength(1) subject?: string; - @doc("Title of the Template.") + /** + * Title of the Template. + */ title?: string; - @doc("Description of the Email Template.") + /** + * Description of the Email Template. + */ description?: string; - @doc("Email Template Body. This should be a valid XDocument") + /** + * Email Template Body. This should be a valid XDocument + */ @minLength(1) body?: string; - @doc("Email Template Parameter values.") + /** + * Email Template Parameter values. + */ parameters?: EmailTemplateParametersContractProperties[]; } -@doc("Properties of the Gateway contract.") +/** + * Properties of the Gateway contract. + */ model GatewayContractProperties { - @doc("Gateway location.") + /** + * Gateway location. + */ locationData?: ResourceLocationDataContract; - @doc("Gateway description") + /** + * Gateway description + */ @maxLength(1000) description?: string; } -@doc("Resource location data properties.") +/** + * Resource location data properties. + */ model ResourceLocationDataContract { - @doc("A canonical name for the geographic or physical location.") + /** + * A canonical name for the geographic or physical location. + */ @maxLength(256) name: string; - @doc("The city or locality where the resource is located.") + /** + * The city or locality where the resource is located. + */ @maxLength(256) city?: string; - @doc("The district, state, or province where the resource is located.") + /** + * The district, state, or province where the resource is located. + */ @maxLength(256) district?: string; - @doc("The country or region where the resource is located.") + /** + * The country or region where the resource is located. + */ @maxLength(256) countryOrRegion?: string; } -@doc("Gateway authentication keys.") +/** + * Gateway authentication keys. + */ model GatewayKeysContract { - @doc("Primary gateway key.") + /** + * Primary gateway key. + */ primary?: string; - @doc("Secondary gateway key.") + /** + * Secondary gateway key. + */ secondary?: string; } -@doc("Gateway key regeneration request contract properties.") +/** + * Gateway key regeneration request contract properties. + */ model GatewayKeyRegenerationRequestContract { - @doc("The Key being regenerated.") + /** + * The Key being regenerated. + */ keyType: GatewayRegenerateKeyType; } -@doc("Gateway token request contract properties.") +/** + * Gateway token request contract properties. + */ model GatewayTokenRequestContract { - @doc("The Key to be used to generate gateway token.") + /** + * The Key to be used to generate gateway token. + */ keyType: KeyType; - @doc(""" -The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expiry: utcDateTime; } -@doc("Gateway access token.") +/** + * Gateway access token. + */ model GatewayTokenContract { - @doc("Shared Access Authentication token value for the Gateway.") + /** + * Shared Access Authentication token value for the Gateway. + */ value?: string; } -@doc("Gateway hostname configuration details.") +/** + * Gateway hostname configuration details. + */ model GatewayHostnameConfigurationContractProperties { - @doc("Hostname value. Supports valid domain name, partial or full wildcard") + /** + * Hostname value. Supports valid domain name, partial or full wildcard + */ hostname?: string; - @doc("Identifier of Certificate entity that will be used for TLS connection establishment") + /** + * Identifier of Certificate entity that will be used for TLS connection establishment + */ certificateId?: string; - @doc("Determines whether gateway requests client certificate") + /** + * Determines whether gateway requests client certificate + */ negotiateClientCertificate?: boolean; - @doc("Specifies if TLS 1.0 is supported") + /** + * Specifies if TLS 1.0 is supported + */ tls10Enabled?: boolean; - @doc("Specifies if TLS 1.1 is supported") + /** + * Specifies if TLS 1.1 is supported + */ tls11Enabled?: boolean; - @doc("Specifies if HTTP/2.0 is supported") + /** + * Specifies if HTTP/2.0 is supported + */ http2Enabled?: boolean; } -@doc("Paged API list representation.") +/** + * Paged API list representation. + */ model ApiManagementGatewayApiListResult is Azure.Core.Page { - @doc("Total record count number across all pages.") - count?: int32; + /** + * Total record count number across all pages. + */ + count?: int64; } model GatewayApiData extends ApiContract {} -@doc("Association entity details.") +/** + * Association entity details. + */ model AssociationContract extends Resource { - @doc("Association entity contract properties.") + /** + * Association entity contract properties. + */ properties?: AssociationContractProperties; } -@doc("Association entity contract properties.") +/** + * Association entity contract properties. + */ model AssociationContractProperties { - @doc("Provisioning state.") + /** + * Provisioning state. + */ provisioningState?: "created"; } -@doc("Gateway certificate authority details.") +/** + * Gateway certificate authority details. + */ model GatewayCertificateAuthorityContractProperties { - @doc("Determines whether certificate authority is trusted.") + /** + * Determines whether certificate authority is trusted. + */ isTrusted?: boolean; } -@doc("Group contract Properties.") +/** + * Group contract Properties. + */ model GroupContractProperties { - @doc("Group name.") + /** + * Group name. + */ @maxLength(300) @minLength(1) displayName: string; - @doc("Group description. Can contain HTML formatting tags.") + /** + * Group description. Can contain HTML formatting tags. + */ @maxLength(1000) description?: string; - @doc("true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false.") + /** + * true if the group is one of the three system groups (Administrators, Developers, or Guests); otherwise false. + */ @visibility("read") builtIn?: boolean; - @doc("Group type.") + /** + * Group type. + */ type?: GroupType; - @doc("For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null.") + /** + * For external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. + */ externalId?: string; } -@doc("Parameters supplied to the Create Group operation.") +/** + * Parameters supplied to the Create Group operation. + */ model GroupCreateParameters { - @doc("Properties supplied to Create Group operation.") + /** + * Properties supplied to Create Group operation. + */ properties?: GroupCreateParametersProperties; } -@doc("Parameters supplied to the Create Group operation.") +/** + * Parameters supplied to the Create Group operation. + */ model GroupCreateParametersProperties { - @doc("Group name.") + /** + * Group name. + */ @maxLength(300) @minLength(1) displayName: string; - @doc("Group description.") + /** + * Group description. + */ description?: string; - @doc("Group type.") + /** + * Group type. + */ type?: GroupType; - @doc("Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null.") + /** + * Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. + */ externalId?: string; } -@doc("Parameters supplied to the Update Group operation.") +/** + * Parameters supplied to the Update Group operation. + */ model GroupUpdateParameters { - @doc("Group entity update contract properties.") + /** + * Group entity update contract properties. + */ properties?: GroupUpdateParametersProperties; } -@doc("Parameters supplied to the Update Group operation.") +/** + * Parameters supplied to the Update Group operation. + */ model GroupUpdateParametersProperties { - @doc("Group name.") + /** + * Group name. + */ @maxLength(300) @minLength(1) displayName?: string; - @doc("Group description.") + /** + * Group description. + */ description?: string; - @doc("Group type.") + /** + * Group type. + */ type?: GroupType; - @doc("Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null.") + /** + * Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null. + */ externalId?: string; } -@doc("Paged Group Users list representation.") +/** + * Paged Group Users list representation. + */ model ApiManagementGroupUserListResult is Azure.Core.Page { - @doc("Total record count number across all pages.") - count?: int32; + /** + * Total record count number across all pages. + */ + count?: int64; } model ApiManagementGroupUserData extends UserContract {} -@doc("User profile.") +/** + * User profile. + */ model UserContractProperties extends UserEntityBaseParameters { - @doc("First name.") + /** + * First name. + */ firstName?: string; - @doc("Last name.") + /** + * Last name. + */ lastName?: string; - @doc("Email address.") + /** + * Email address. + */ email?: string; - @doc(""" -Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. registrationDate?: utcDateTime; - @doc("Collection of groups user is part of.") + /** + * Collection of groups user is part of. + */ @visibility("read") groups?: GroupContractProperties[]; } -@doc("User Entity Base Parameters set.") +/** + * User Entity Base Parameters set. + */ model UserEntityBaseParameters { - @doc("Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.") - state?: UserState; - - @doc("Optional note about a user set by the administrator.") + /** + * Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active. + */ + state?: UserState = UserState.active; + + /** + * Optional note about a user set by the administrator. + */ note?: string; - @doc("Collection of user identities.") + /** + * Collection of user identities. + */ identities?: UserIdentityContract[]; } -@doc("User identity details.") +/** + * User identity details. + */ model UserIdentityContract { - @doc("Identity provider name.") + /** + * Identity provider name. + */ provider?: string; - @doc("Identifier value within provider.") + /** + * Identifier value within provider. + */ id?: string; } -@doc("The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users.") +/** + * The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users. + */ model IdentityProviderContractProperties extends IdentityProviderBaseParameters { - @doc("Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft.") + /** + * Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. + */ @minLength(1) clientId: string; - @doc("Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + /** + * Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + */ @minLength(1) clientSecret?: string; } -@doc("Identity Provider Base Parameter Properties.") +/** + * Identity Provider Base Parameter Properties. + */ model IdentityProviderBaseParameters { - @doc("Identity Provider Type identifier.") + /** + * Identity Provider Type identifier. + */ @projectedName("json", "type") identityProviderType?: IdentityProviderType; - @doc("The TenantId to use instead of Common when logging into Active Directory") + /** + * The TenantId to use instead of Common when logging into Active Directory + */ @projectedName("json", "signinTenant") signInTenant?: string; - @doc("List of Allowed Tenants when configuring Azure Active Directory login.") + /** + * List of Allowed Tenants when configuring Azure Active Directory login. + */ allowedTenants?: string[]; - @doc("OpenID Connect discovery endpoint hostname for AAD or AAD B2C.") + /** + * OpenID Connect discovery endpoint hostname for AAD or AAD B2C. + */ authority?: string; - @doc("Signup Policy Name. Only applies to AAD B2C Identity Provider.") + /** + * Signup Policy Name. Only applies to AAD B2C Identity Provider. + */ @minLength(1) @projectedName("json", "signupPolicyName") signUpPolicyName?: string; - @doc("Signin Policy Name. Only applies to AAD B2C Identity Provider.") + /** + * Signin Policy Name. Only applies to AAD B2C Identity Provider. + */ @minLength(1) @projectedName("json", "signinPolicyName") signInPolicyName?: string; - @doc("Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.") + /** + * Profile Editing Policy Name. Only applies to AAD B2C Identity Provider. + */ @minLength(1) profileEditingPolicyName?: string; - @doc("Password Reset Policy Name. Only applies to AAD B2C Identity Provider.") + /** + * Password Reset Policy Name. Only applies to AAD B2C Identity Provider. + */ @minLength(1) passwordResetPolicyName?: string; } -@doc("Identity Provider details.") +/** + * Identity Provider details. + */ model IdentityProviderCreateContract extends Resource { - @doc("Identity Provider contract properties.") + /** + * Identity Provider contract properties. + */ properties?: IdentityProviderCreateContractProperties; } -@doc("The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users.") +/** + * The external Identity Providers like Facebook, Google, Microsoft, Twitter or Azure Active Directory which can be used to enable access to the API Management service developer portal for all users. + */ model IdentityProviderCreateContractProperties extends IdentityProviderBaseParameters { - @doc("Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft.") + /** + * Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. + */ @minLength(1) clientId: string; - @doc("Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + /** + * Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + */ @minLength(1) clientSecret: string; } -@doc("Parameters supplied to update Identity Provider") +/** + * Parameters supplied to update Identity Provider + */ model IdentityProviderUpdateParameters { - @doc("Identity Provider update properties.") + /** + * Identity Provider update properties. + */ properties?: IdentityProviderUpdateProperties; } -@doc("Parameters supplied to the Update Identity Provider operation.") +/** + * Parameters supplied to the Update Identity Provider operation. + */ model IdentityProviderUpdateProperties extends IdentityProviderBaseParameters { - @doc("Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft.") + /** + * Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft. + */ @minLength(1) clientId?: string; - @doc("Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft.") + /** + * Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft. + */ @minLength(1) clientSecret?: string; } -@doc("Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.") +/** + * Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + */ model ClientSecretContract { - @doc("Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.") + /** + * Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + */ clientSecret?: string; } -@doc("The Logger entity in API Management represents an event sink that you can use to log API Management events. Currently the Logger entity supports logging API Management events to Azure Event Hubs.") +/** + * The Logger entity in API Management represents an event sink that you can use to log API Management events. Currently the Logger entity supports logging API Management events to Azure Event Hubs. + */ model LoggerContractProperties { - @doc("Logger type.") + /** + * Logger type. + */ loggerType: LoggerType; - @doc("Logger description.") + /** + * Logger description. + */ @maxLength(256) description?: string; - @doc(""" -The name and SendRule connection string of the event hub for azureEventHub logger. + /** +* The name and SendRule connection string of the event hub for azureEventHub logger. Instrumentation key for applicationInsights logger. -""") +*/ credentials?: Record; - @doc("Whether records are buffered in the logger before publishing. Default is assumed to be true.") + /** + * Whether records are buffered in the logger before publishing. Default is assumed to be true. + */ isBuffered?: boolean; - @doc("Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource).") + /** + * Azure Resource Id of a log target (either Azure Event Hub resource or Azure Application Insights resource). + */ resourceId?: string; } -@doc("Logger update contract.") +/** + * Logger update contract. + */ model LoggerUpdateContract { - @doc("Logger entity update contract properties.") + /** + * Logger entity update contract properties. + */ properties?: LoggerUpdateParameters; } -@doc("Parameters supplied to the Update Logger operation.") +/** + * Parameters supplied to the Update Logger operation. + */ model LoggerUpdateParameters { - @doc("Logger type.") + /** + * Logger type. + */ loggerType?: LoggerType; - @doc("Logger description.") + /** + * Logger description. + */ description?: string; - @doc("Logger credentials.") + /** + * Logger credentials. + */ credentials?: Record; - @doc("Whether records are buffered in the logger before publishing. Default is assumed to be true.") + /** + * Whether records are buffered in the logger before publishing. Default is assumed to be true. + */ isBuffered?: boolean; } -@doc("NamedValue Contract properties.") +/** + * NamedValue Contract properties. + */ model NamedValueContractProperties extends NamedValueEntityBaseParameters { - @doc("Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.") + /** + * Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. + */ @maxLength(256) @minLength(1) @pattern("^[A-Za-z0-9-._]+$") displayName: string; - @doc("Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + /** + * Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + */ @maxLength(4096) value?: string; - @doc("KeyVault location details of the namedValue.") + /** + * KeyVault location details of the namedValue. + */ keyVault?: KeyVaultContractProperties; } -@doc("NamedValue Entity Base Parameters set.") +/** + * NamedValue Entity Base Parameters set. + */ model NamedValueEntityBaseParameters { - @doc("Optional tags that when provided can be used to filter the NamedValue list.") + /** + * Optional tags that when provided can be used to filter the NamedValue list. + */ tags?: string[]; - @doc("Determines whether the value is a secret and should be encrypted or not. Default value is false.") + /** + * Determines whether the value is a secret and should be encrypted or not. Default value is false. + */ @projectedName("json", "secret") IsSecret?: boolean; } -@doc("NamedValue details.") +/** + * NamedValue details. + */ model NamedValueCreateContract extends Resource { - @doc("NamedValue entity contract properties for PUT operation.") + /** + * NamedValue entity contract properties for PUT operation. + */ properties?: NamedValueCreateContractProperties; } -@doc("NamedValue Contract properties.") +/** + * NamedValue Contract properties. + */ model NamedValueCreateContractProperties extends NamedValueEntityBaseParameters { - @doc("Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.") + /** + * Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. + */ @maxLength(256) @minLength(1) @pattern("^[A-Za-z0-9-._]+$") displayName: string; - @doc("Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + /** + * Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + */ @maxLength(4096) value?: string; - @doc("KeyVault location details of the namedValue.") + /** + * KeyVault location details of the namedValue. + */ keyVault?: KeyVaultContractCreateProperties; } -@doc("NamedValue update Parameters.") +/** + * NamedValue update Parameters. + */ model NamedValueUpdateParameters { - @doc("NamedValue entity Update contract properties.") + /** + * NamedValue entity Update contract properties. + */ properties?: NamedValueUpdateParameterProperties; } -@doc("NamedValue Contract properties.") +/** + * NamedValue Contract properties. + */ model NamedValueUpdateParameterProperties extends NamedValueEntityBaseParameters { - @doc("Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.") + /** + * Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. + */ @maxLength(256) @minLength(1) @pattern("^[A-Za-z0-9-._]+$") displayName?: string; - @doc("Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace.") + /** + * Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. + */ @maxLength(4096) @minLength(1) value?: string; - @doc("KeyVault location details of the namedValue.") + /** + * KeyVault location details of the namedValue. + */ keyVault?: KeyVaultContractCreateProperties; } -@doc("Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.") +/** + * Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + */ model NamedValueSecretContract { - @doc("This is secret value of the NamedValue entity.") + /** + * This is secret value of the NamedValue entity. + */ value?: string; } -@doc("Network Status in the Location") +/** + * Network Status in the Location + */ model NetworkStatusContractByLocation { - @doc("Location of service") + /** + * Location of service + */ @minLength(1) location?: string; - @doc("Network status in Location") + /** + * Network status in Location + */ networkStatus?: NetworkStatusContract; } -@doc("Network Status details.") +/** + * Network Status details. + */ model NetworkStatusContract { - @doc("Gets the list of DNS servers IPV4 addresses.") + /** + * Gets the list of DNS servers IPV4 addresses. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key dnsServers: string[]; - @doc("Gets the list of Connectivity Status to the Resources on which the service depends upon.") + /** + * Gets the list of Connectivity Status to the Resources on which the service depends upon. + */ connectivityStatus: ConnectivityStatusContract[]; } -@doc("Details about connectivity to a resource.") +/** + * Details about connectivity to a resource. + */ model ConnectivityStatusContract { - @doc("The hostname of the resource which the service depends on. This can be the database, storage or any other azure resource on which the service depends upon.") + /** + * The hostname of the resource which the service depends on. This can be the database, storage or any other azure resource on which the service depends upon. + */ @minLength(1) name: string; - @doc("Resource Connectivity Status Type identifier.") + /** + * Resource Connectivity Status Type identifier. + */ status: ConnectivityStatusType; - @doc("Error details of the connectivity to the resource.") + /** + * Error details of the connectivity to the resource. + */ error?: string; - @doc(""" -The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdated: utcDateTime; - @doc(""" -The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastStatusChange: utcDateTime; - @doc("Resource Type.") + /** + * Resource Type. + */ resourceType: string; - @doc("Whether this is optional.") + /** + * Whether this is optional. + */ isOptional: boolean; } -@doc("Notification Contract properties.") +/** + * Notification Contract properties. + */ model NotificationContractProperties { - @doc("Title of the Notification.") + /** + * Title of the Notification. + */ @maxLength(1000) @minLength(1) title: string; - @doc("Description of the Notification.") + /** + * Description of the Notification. + */ description?: string; - @doc("Recipient Parameter values.") + /** + * Recipient Parameter values. + */ recipients?: RecipientsContractProperties; } -@doc("Notification Parameter contract.") +/** + * Notification Parameter contract. + */ model RecipientsContractProperties { - @doc("List of Emails subscribed for the notification.") + /** + * List of Emails subscribed for the notification. + */ emails?: string[]; - @doc("List of Users subscribed for the notification.") + /** + * List of Users subscribed for the notification. + */ users?: string[]; } -@doc("Paged Recipient User list representation.") +/** + * Paged Recipient User list representation. + */ model RecipientUserListResult { - @doc("Page values.") + /** + * Page values. + */ value?: RecipientUserContract[]; - @doc("Total record count number across all pages.") - count?: int32; + /** + * Total record count number across all pages. + */ + count?: int64; - @doc("Next page link if any.") + /** + * Next page link if any. + */ nextLink?: string; } -@doc("Recipient User details.") +/** + * Recipient User details. + */ model RecipientUserContract extends Resource { - @doc("Recipient User entity contract properties.") + /** + * Recipient User entity contract properties. + */ properties?: RecipientUsersContractProperties; } -@doc("Recipient User Contract Properties.") +/** + * Recipient User Contract Properties. + */ model RecipientUsersContractProperties { - @doc("API Management UserId subscribed to notification.") + /** + * API Management UserId subscribed to notification. + */ userId?: string; } -@doc("Paged Recipient User list representation.") +/** + * Paged Recipient User list representation. + */ model RecipientEmailListResult { - @doc("Page values.") + /** + * Page values. + */ value?: RecipientEmailContract[]; - @doc("Total record count number across all pages.") - count?: int32; + /** + * Total record count number across all pages. + */ + count?: int64; - @doc("Next page link if any.") + /** + * Next page link if any. + */ nextLink?: string; } -@doc("Recipient Email details.") +/** + * Recipient Email details. + */ model RecipientEmailContract extends Resource { - @doc("Recipient Email contract properties.") + /** + * Recipient Email contract properties. + */ properties?: RecipientEmailContractProperties; } -@doc("Recipient Email Contract Properties.") +/** + * Recipient Email Contract Properties. + */ model RecipientEmailContractProperties { - @doc("User Email subscribed to notification.") + /** + * User Email subscribed to notification. + */ email?: string; } -@doc("OpenID Connect Providers Contract.") +/** + * OpenID Connect Providers Contract. + */ model OpenidConnectProviderContractProperties { - @doc("User-friendly OpenID Connect Provider name.") + /** + * User-friendly OpenID Connect Provider name. + */ @maxLength(50) displayName: string; - @doc("User-friendly description of OpenID Connect Provider.") + /** + * User-friendly description of OpenID Connect Provider. + */ description?: string; - @doc("Metadata endpoint URI.") + /** + * Metadata endpoint URI. + */ metadataEndpoint: string; - @doc("Client ID of developer console which is the client application.") + /** + * Client ID of developer console which is the client application. + */ clientId: string; - @doc("Client Secret of developer console which is the client application.") + /** + * Client Secret of developer console which is the client application. + */ clientSecret?: string; } -@doc("Parameters supplied to the Update OpenID Connect Provider operation.") +/** + * Parameters supplied to the Update OpenID Connect Provider operation. + */ model OpenidConnectProviderUpdateContract { - @doc("OpenId Connect Provider Update contract properties.") + /** + * OpenId Connect Provider Update contract properties. + */ properties?: OpenidConnectProviderUpdateContractProperties; } -@doc("Parameters supplied to the Update OpenID Connect Provider operation.") +/** + * Parameters supplied to the Update OpenID Connect Provider operation. + */ model OpenidConnectProviderUpdateContractProperties { - @doc("User-friendly OpenID Connect Provider name.") + /** + * User-friendly OpenID Connect Provider name. + */ @maxLength(50) displayName?: string; - @doc("User-friendly description of OpenID Connect Provider.") + /** + * User-friendly description of OpenID Connect Provider. + */ description?: string; - @doc("Metadata endpoint URI.") + /** + * Metadata endpoint URI. + */ metadataEndpoint?: string; - @doc("Client ID of developer console which is the client application.") + /** + * Client ID of developer console which is the client application. + */ clientId?: string; - @doc("Client Secret of developer console which is the client application.") + /** + * Client Secret of developer console which is the client application. + */ clientSecret?: string; } -@doc("Collection of Outbound Environment Endpoints") +/** + * Collection of Outbound Environment Endpoints + */ model OutboundEnvironmentEndpointList { - @doc("Collection of resources.") + /** + * Collection of resources. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key value: OutboundEnvironmentEndpoint[]; - @doc("Link to next page of resources.") + /** + * Link to next page of resources. + */ @visibility("read") nextLink?: string; } -@doc("Endpoints accessed for a common purpose that the Api Management Service requires outbound network access to.") +/** + * Endpoints accessed for a common purpose that the Api Management Service requires outbound network access to. + */ model OutboundEnvironmentEndpoint { - @doc("The type of service accessed by the Api Management Service, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory.") + /** + * The type of service accessed by the Api Management Service, e.g., Azure Storage, Azure SQL Database, and Azure Active Directory. + */ category?: string; - @doc("The endpoints that the Api Management Service reaches the service at.") + /** + * The endpoints that the Api Management Service reaches the service at. + */ endpoints?: EndpointDependency[]; } -@doc("A domain name that a service is reached at.") +/** + * A domain name that a service is reached at. + */ model EndpointDependency { - @doc("The domain name of the dependency.") + /** + * The domain name of the dependency. + */ domainName?: string; - @doc("The Ports used when connecting to DomainName.") + /** + * The Ports used when connecting to DomainName. + */ endpointDetails?: EndpointDetail[]; } -@doc("Current TCP connectivity information from the Api Management Service to a single endpoint.") +/** + * Current TCP connectivity information from the Api Management Service to a single endpoint. + */ model EndpointDetail { - @doc("The port an endpoint is connected to.") + /** + * The port an endpoint is connected to. + */ port?: int32; - @doc("The region of the dependency.") + /** + * The region of the dependency. + */ region?: string; } -@doc("Descriptions of APIM policies.") +/** + * Descriptions of APIM policies. + */ model PolicyDescriptionListResult { - @doc("Descriptions of APIM policies.") + /** + * Descriptions of APIM policies. + */ value?: PolicyDescriptionContract[]; - @doc("Total record count number.") - count?: int32; + /** + * Total record count number. + */ + count?: int64; } -@doc("Policy description details.") +/** + * Policy description details. + */ model PolicyDescriptionContract extends Resource { - @doc("Policy description contract properties.") + /** + * Policy description contract properties. + */ properties?: PolicyDescriptionContractProperties; } -@doc("Policy description properties.") +/** + * Policy description properties. + */ model PolicyDescriptionContractProperties { - @doc("Policy description.") + /** + * Policy description. + */ @visibility("read") description?: string; - @doc("Binary OR value of the Snippet scope.") + /** + * Binary OR value of the Snippet scope. + */ @visibility("read") - scope?: int32; + scope?: int64; } model PortalRevisionContractProperties { - @doc("Portal revision description.") + /** + * Portal revision description. + */ @maxLength(2000) description?: string; - @doc("Portal revision publishing status details.") + /** + * Portal revision publishing status details. + */ @visibility("read") @maxLength(2000) statusDetails?: string; - @doc("Status of the portal's revision.") + /** + * Status of the portal's revision. + */ @visibility("read") status?: PortalRevisionStatus; - @doc("Indicates if the portal's revision is public.") + /** + * Indicates if the portal's revision is public. + */ isCurrent?: boolean; - @doc("Portal's revision creation date and time.") + /** + * Portal's revision creation date and time. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDateTime?: utcDateTime; - @doc("Last updated date and time.") + /** + * Last updated date and time. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. updatedDateTime?: utcDateTime; } -@doc("Portal Settings for the Developer Portal.") +/** + * Portal Settings for the Developer Portal. + */ model PortalSettingsContract extends Resource { - @doc("Portal Settings contract properties.") + /** + * Portal Settings contract properties. + */ properties?: PortalSettingsContractProperties; } -@doc("Sign-in settings contract properties.") +/** + * Sign-in settings contract properties. + */ model PortalSettingsContractProperties { - @doc("A delegation Url.") + /** + * A delegation Url. + */ url?: string; - @doc("A base64-encoded validation key to validate, that a request is coming from Azure API Management.") + /** + * A base64-encoded validation key to validate, that a request is coming from Azure API Management. + */ validationKey?: string; - @doc("Subscriptions delegation settings.") + /** + * Subscriptions delegation settings. + */ @projectedName("json", "subscriptions") IsSubscriptions?: SubscriptionsDelegationSettingsProperties; - @doc("User registration delegation settings.") + /** + * User registration delegation settings. + */ @projectedName("json", "userRegistration") IsUserRegistration?: RegistrationDelegationSettingsProperties; - @doc("Redirect Anonymous users to the Sign-In page.") + /** + * Redirect Anonymous users to the Sign-In page. + */ enabled?: boolean; - @doc("Terms of service contract properties.") + /** + * Terms of service contract properties. + */ termsOfService?: TermsOfServiceProperties; } -@doc("Subscriptions delegation settings properties.") +/** + * Subscriptions delegation settings properties. + */ model SubscriptionsDelegationSettingsProperties { - @doc("Enable or disable delegation for subscriptions.") + /** + * Enable or disable delegation for subscriptions. + */ enabled?: boolean; } -@doc("User registration delegation settings properties.") +/** + * User registration delegation settings properties. + */ model RegistrationDelegationSettingsProperties { - @doc("Enable or disable delegation for user registration.") + /** + * Enable or disable delegation for user registration. + */ enabled?: boolean; } -@doc("Terms of service contract properties.") +/** + * Terms of service contract properties. + */ model TermsOfServiceProperties { - @doc("A terms of service text.") + /** + * A terms of service text. + */ text?: string; - @doc("Display terms of service during a sign-up process.") + /** + * Display terms of service during a sign-up process. + */ enabled?: boolean; - @doc("Ask user for consent to the terms of service.") + /** + * Ask user for consent to the terms of service. + */ consentRequired?: boolean; } -@doc("Sign-in settings contract properties.") +/** + * Sign-in settings contract properties. + */ model PortalSigninSettingProperties { - @doc("Redirect Anonymous users to the Sign-In page.") + /** + * Redirect Anonymous users to the Sign-In page. + */ enabled?: boolean; } -@doc("Sign-up settings contract properties.") +/** + * Sign-up settings contract properties. + */ model PortalSignupSettingsProperties { - @doc("Allow users to sign up on a developer portal.") + /** + * Allow users to sign up on a developer portal. + */ enabled?: boolean; - @doc("Terms of service contract properties.") + /** + * Terms of service contract properties. + */ termsOfService?: TermsOfServiceProperties; } -@doc("Delegation settings contract properties.") +/** + * Delegation settings contract properties. + */ model PortalDelegationSettingsProperties { - @doc("A delegation Url.") + /** + * A delegation Url. + */ url?: string; - @doc("A base64-encoded validation key to validate, that a request is coming from Azure API Management.") + /** + * A base64-encoded validation key to validate, that a request is coming from Azure API Management. + */ validationKey?: string; - @doc("Subscriptions delegation settings.") + /** + * Subscriptions delegation settings. + */ subscriptions?: SubscriptionsDelegationSettingsProperties; - @doc("User registration delegation settings.") + /** + * User registration delegation settings. + */ userRegistration?: RegistrationDelegationSettingsProperties; } -@doc("Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.") +/** + * Client or app secret used in IdentityProviders, Aad, OpenID or OAuth. + */ model PortalSettingValidationKeyContract { - @doc("This is secret value of the validation key in portal settings.") + /** + * This is secret value of the validation key in portal settings. + */ validationKey?: string; } -@doc("Properties of the PrivateEndpointConnectProperties.") +/** + * Properties of the PrivateEndpointConnectProperties. + */ model PrivateEndpointConnectionProperties { - @doc("The resource of private end point.") + /** + * The resource of private end point. + */ privateEndpoint?: PrivateEndpoint; - @doc("A collection of information about the state of the connection between service consumer and provider.") + /** + * A collection of information about the state of the connection between service consumer and provider. + */ privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; - @doc("The provisioning state of the private endpoint connection resource.") + /** + * The provisioning state of the private endpoint connection resource. + */ @visibility("read") provisioningState?: PrivateEndpointConnectionProvisioningState; } -@doc("The Private Endpoint resource.") +/** + * The Private Endpoint resource. + */ model PrivateEndpoint { - @doc("The ARM identifier for Private Endpoint") + /** + * The ARM identifier for Private Endpoint + */ @visibility("read") id?: string; } -@doc("A request to approve or reject a private endpoint connection") +/** + * A request to approve or reject a private endpoint connection + */ model PrivateEndpointConnectionRequest { - @doc("Private Endpoint Connection Resource Id.") + /** + * Private Endpoint Connection Resource Id. + */ id?: string; - @doc("The connection state of the private endpoint connection.") + /** + * The connection state of the private endpoint connection. + */ properties?: PrivateEndpointConnectionRequestProperties; } -@doc("The connection state of the private endpoint connection.") +/** + * The connection state of the private endpoint connection. + */ model PrivateEndpointConnectionRequestProperties { - @doc("A collection of information about the state of the connection between service consumer and provider.") + /** + * A collection of information about the state of the connection between service consumer and provider. + */ privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; } -@doc("Properties of a private link resource.") +/** + * Properties of a private link resource. + */ model PrivateLinkResourceProperties { - @doc("The private link resource group id.") + /** + * The private link resource group id. + */ @visibility("read") groupId?: string; - @doc("The private link resource required member names.") + /** + * The private link resource required member names. + */ @visibility("read") requiredMembers?: string[]; - @doc("The private link resource Private link DNS zone name.") + /** + * The private link resource Private link DNS zone name. + */ requiredZoneNames?: string[]; } -@doc("Product Update parameters.") +/** + * Product Update parameters. + */ model ProductUpdateParameters { - @doc("Product entity Update contract properties.") + /** + * Product entity Update contract properties. + */ properties?: ProductUpdateProperties; } -@doc("Parameters supplied to the Update Product operation.") +/** + * Parameters supplied to the Update Product operation. + */ model ProductUpdateProperties extends ProductEntityBaseParameters { - @doc("Product name.") + /** + * Product name. + */ @maxLength(300) @minLength(1) displayName?: string; } -@doc("Paged API list representation.") +/** + * Paged API list representation. + */ model ApiManagementProductApiListResult is Azure.Core.Page { - @doc("Total record count number across all pages.") - count?: int32; + /** + * Total record count number across all pages. + */ + count?: int64; } model ProductApiData extends ApiContract {} -@doc("Paged Group list representation.") +/** + * Paged Group list representation. + */ model ApiManagementProductGroupListResult is Azure.Core.Page { - @doc("Total record count number across all pages.") - count?: int32; + /** + * Total record count number across all pages. + */ + count?: int64; } model ProductGroupData extends GroupContract {} -@doc("Subscription details.") +/** + * Subscription details. + */ model SubscriptionContractProperties { - @doc("The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier.") + /** + * The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{userId} where {userId} is a user identifier. + */ ownerId?: string; - @doc("Scope like /products/{productId} or /apis or /apis/{apiId}.") + /** + * Scope like /products/{productId} or /apis or /apis/{apiId}. + */ scope: string; - @doc("The name of the subscription, or null if the subscription has no name.") + /** + * The name of the subscription, or null if the subscription has no name. + */ @maxLength(100) displayName?: string; - @doc("Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.") + /** + * Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. + */ state: SubscriptionState; - @doc(""" -Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDate?: utcDateTime; - @doc(""" -Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startDate?: utcDateTime; - @doc(""" -Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expirationDate?: utcDateTime; - @doc(""" -Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endDate?: utcDateTime; - @doc(""" -Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. notificationDate?: utcDateTime; - @doc("Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + /** + * Subscription primary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + */ @maxLength(256) @minLength(1) primaryKey?: string; - @doc("Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + /** + * Subscription secondary key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + */ @maxLength(256) @minLength(1) secondaryKey?: string; - @doc("Optional subscription comment added by an administrator when the state is changed to the 'rejected'.") + /** + * Optional subscription comment added by an administrator when the state is changed to the 'rejected'. + */ stateComment?: string; - @doc("Determines whether tracing is enabled") + /** + * Determines whether tracing is enabled + */ allowTracing?: boolean; } -@doc("Paged Quota Counter list representation.") +/** + * Paged Quota Counter list representation. + */ model QuotaCounterListResult { - @doc("Quota counter values.") + /** + * Quota counter values. + */ value?: QuotaCounterContract[]; - @doc("Total record count number across all pages.") - count?: int32; + /** + * Total record count number across all pages. + */ + count?: int64; - @doc("Next page link if any.") + /** + * Next page link if any. + */ nextLink?: string; } -@doc("Quota counter details.") +/** + * Quota counter details. + */ @resource("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}") model QuotaCounterContract { - @doc("The Key value of the Counter. Must not be empty.") + /** + * The Key value of the Counter. Must not be empty. + */ @minLength(1) // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key counterKey: string; - @doc("Identifier of the Period for which the counter was collected. Must not be empty.") + /** + * Identifier of the Period for which the counter was collected. Must not be empty. + */ @minLength(1) periodKey: string; - @doc(""" -The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. periodStartTime: utcDateTime; - @doc(""" -The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. periodEndTime: utcDateTime; - @doc("Quota Value Properties") + /** + * Quota Value Properties + */ value?: QuotaCounterValueContractProperties; } -@doc("Quota counter value details.") +/** + * Quota counter value details. + */ model QuotaCounterValueContractProperties { - @doc("Number of times Counter was called.") + /** + * Number of times Counter was called. + */ callsCount?: int32; - @doc("Data Transferred in KiloBytes.") - kbTransferred?: float32; + /** + * Data Transferred in KiloBytes. + */ + kbTransferred?: float64; } -@doc("Quota counter value details.") +/** + * Quota counter value details. + */ model QuotaCounterValueUpdateContract { - @doc("Quota counter value details.") + /** + * Quota counter value details. + */ properties?: QuotaCounterValueContractProperties; } -@doc("Lists Regions operation response details.") +/** + * Lists Regions operation response details. + */ model RegionListResult is Azure.Core.Page { - @doc("Total record count number across all pages.") - count?: int32; + /** + * Total record count number across all pages. + */ + count?: int64; } -@doc("Region profile.") +/** + * Region profile. + */ model RegionContract { - @doc("Region name.") + /** + * Region name. + */ @visibility("read") name?: string; - @doc("whether Region is the master region.") + /** + * whether Region is the master region. + */ isMasterRegion?: boolean; - @doc("whether Region is deleted.") + /** + * whether Region is deleted. + */ isDeleted?: boolean; } -@doc("Paged Report records list representation.") +/** + * Paged Report records list representation. + */ model ReportListResult is Azure.Core.Page { - @doc("Total record count number across all pages.") - count?: int32; + /** + * Total record count number across all pages. + */ + count?: int64; } -@doc("Report data.") +/** + * Report data. + */ model ReportRecordContract { - @doc("Name depending on report endpoint specifies product, API, operation or developer name.") + /** + * Name depending on report endpoint specifies product, API, operation or developer name. + */ name?: string; - @doc(""" -Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timestamp?: utcDateTime; - @doc("Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).") + /** + * Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations). + */ interval?: string; - @doc("Country to which this record data is related.") + /** + * Country to which this record data is related. + */ country?: string; - @doc("Country region to which this record data is related.") + /** + * Country region to which this record data is related. + */ region?: string; - @doc("Zip code to which this record data is related.") + /** + * Zip code to which this record data is related. + */ zip?: string; - @doc("User identifier path. /users/{userId}") + /** + * User identifier path. /users/{userId} + */ @visibility("read") userId?: string; - @doc("Product identifier path. /products/{productId}") + /** + * Product identifier path. /products/{productId} + */ @visibility("read") productId?: string; - @doc("API identifier path. /apis/{apiId}") + /** + * API identifier path. /apis/{apiId} + */ apiId?: string; - @doc("Operation identifier path. /apis/{apiId}/operations/{operationId}") + /** + * Operation identifier path. /apis/{apiId}/operations/{operationId} + */ operationId?: string; - @doc("API region identifier.") + /** + * API region identifier. + */ apiRegion?: string; - @doc("Subscription identifier path. /subscriptions/{subscriptionId}") + /** + * Subscription identifier path. /subscriptions/{subscriptionId} + */ subscriptionId?: string; - @doc("Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect") + /** + * Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect + */ callCountSuccess?: int32; - @doc("Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests") + /** + * Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests + */ callCountBlocked?: int32; - @doc("Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600") + /** + * Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600 + */ callCountFailed?: int32; - @doc("Number of other calls.") + /** + * Number of other calls. + */ callCountOther?: int32; - @doc("Total number of calls.") + /** + * Total number of calls. + */ callCountTotal?: int32; - @doc("Bandwidth consumed.") - bandwidth?: int32; + /** + * Bandwidth consumed. + */ + bandwidth?: int64; - @doc("Number of times when content was served from cache policy.") + /** + * Number of times when content was served from cache policy. + */ cacheHitCount?: int32; - @doc("Number of times content was fetched from backend.") + /** + * Number of times content was fetched from backend. + */ cacheMissCount?: int32; - @doc("Average time it took to process request.") - apiTimeAvg?: float32; + /** + * Average time it took to process request. + */ + apiTimeAvg?: float64; - @doc("Minimum time it took to process request.") - apiTimeMin?: float32; + /** + * Minimum time it took to process request. + */ + apiTimeMin?: float64; - @doc("Maximum time it took to process request.") - apiTimeMax?: float32; + /** + * Maximum time it took to process request. + */ + apiTimeMax?: float64; - @doc("Average time it took to process request on backend.") - serviceTimeAvg?: float32; + /** + * Average time it took to process request on backend. + */ + serviceTimeAvg?: float64; - @doc("Minimum time it took to process request on backend.") - serviceTimeMin?: float32; + /** + * Minimum time it took to process request on backend. + */ + serviceTimeMin?: float64; - @doc("Maximum time it took to process request on backend.") - serviceTimeMax?: float32; + /** + * Maximum time it took to process request on backend. + */ + serviceTimeMax?: float64; } -@doc("Paged Report records list representation.") +/** + * Paged Report records list representation. + */ @pagedResult model RequestReportListResult { - @doc("Page values.") + /** + * Page values. + */ @items value?: RequestReportRecordContract[]; - @doc("Total record count number across all pages.") - count?: int32; + /** + * Total record count number across all pages. + */ + count?: int64; } -@doc("Request Report data.") +/** + * Request Report data. + */ model RequestReportRecordContract { - @doc("API identifier path. /apis/{apiId}") + /** + * API identifier path. /apis/{apiId} + */ apiId?: string; - @doc("Operation identifier path. /apis/{apiId}/operations/{operationId}") + /** + * Operation identifier path. /apis/{apiId}/operations/{operationId} + */ operationId?: string; - @doc("Product identifier path. /products/{productId}") + /** + * Product identifier path. /products/{productId} + */ @visibility("read") productId?: string; - @doc("User identifier path. /users/{userId}") + /** + * User identifier path. /users/{userId} + */ @visibility("read") userId?: string; - @doc("The HTTP method associated with this request..") + /** + * The HTTP method associated with this request.. + */ method?: string; - @doc("The full URL associated with this request.") + /** + * The full URL associated with this request. + */ url?: string; - @doc("The client IP address associated with this request.") + /** + * The client IP address associated with this request. + */ ipAddress?: string; - @doc("The HTTP status code received by the gateway as a result of forwarding this request to the backend.") + /** + * The HTTP status code received by the gateway as a result of forwarding this request to the backend. + */ backendResponseCode?: string; - @doc("The HTTP status code returned by the gateway.") + /** + * The HTTP status code returned by the gateway. + */ responseCode?: int32; - @doc("The size of the response returned by the gateway.") + /** + * The size of the response returned by the gateway. + */ responseSize?: int32; - @doc("The date and time when this request was received by the gateway in ISO 8601 format.") + /** + * The date and time when this request was received by the gateway in ISO 8601 format. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timestamp?: utcDateTime; - @doc("Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend.") + /** + * Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend. + */ cache?: string; - @doc("The total time it took to process this request.") - apiTime?: float32; + /** + * The total time it took to process this request. + */ + apiTime?: float64; - @doc("he time it took to forward this request to the backend and get the response back.") - serviceTime?: float32; + /** + * he time it took to forward this request to the backend and get the response back. + */ + serviceTime?: float64; - @doc("Azure region where the gateway that processed this request is located.") + /** + * Azure region where the gateway that processed this request is located. + */ apiRegion?: string; - @doc("Subscription identifier path. /subscriptions/{subscriptionId}") + /** + * Subscription identifier path. /subscriptions/{subscriptionId} + */ subscriptionId?: string; - @doc("Request Identifier.") + /** + * Request Identifier. + */ requestId?: string; - @doc("The size of this request..") + /** + * The size of this request.. + */ requestSize?: int32; } -@doc("Schema create or update contract Properties.") +/** + * Schema create or update contract Properties. + */ model GlobalSchemaContractProperties { - @doc("Schema Type. Immutable.") + /** + * Schema Type. Immutable. + */ schemaType: SchemaType; - @doc("Free-form schema entity description.") + /** + * Free-form schema entity description. + */ description?: string; - @doc("Json-encoded string for non json-based schema.") + /** + * Json-encoded string for non json-based schema. + */ value?: unknown; - @doc("Global Schema document object for json-based schema formats(e.g. json schema).") + /** + * Global Schema document object for json-based schema formats(e.g. json schema). + */ document?: Record; } -@doc("Tenant access information contract of the API Management service.") +/** + * Tenant access information contract of the API Management service. + */ model TenantSettingsContractProperties { - @doc("Tenant settings") + /** + * Tenant settings + */ settings?: Record; } -@doc("The List Resource Skus operation response.") +/** + * The List Resource Skus operation response. + */ model ApiManagementSkusResult is Azure.Core.Page; -@doc("Describes an available ApiManagement SKU.") +/** + * Describes an available ApiManagement SKU. + */ model ApiManagementSku { - @doc("The type of resource the SKU applies to.") + /** + * The type of resource the SKU applies to. + */ @visibility("read") resourceType?: string; - @doc("The name of SKU.") + /** + * The name of SKU. + */ @visibility("read") name?: string; - @doc("Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic**") + /** + * Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + */ @visibility("read") tier?: string; - @doc("The Size of the SKU.") + /** + * The Size of the SKU. + */ @visibility("read") size?: string; - @doc("The Family of this particular SKU.") + /** + * The Family of this particular SKU. + */ @visibility("read") family?: string; - @doc("The Kind of resources that are supported in this SKU.") + /** + * The Kind of resources that are supported in this SKU. + */ @visibility("read") kind?: string; - @doc("Specifies the number of virtual machines in the scale set.") + /** + * Specifies the number of virtual machines in the scale set. + */ @visibility("read") capacity?: ApiManagementSkuCapacity; - @doc("The set of locations that the SKU is available.") + /** + * The set of locations that the SKU is available. + */ @visibility("read") locations?: string[]; - @doc("A list of locations and availability zones in those locations where the SKU is available.") + /** + * A list of locations and availability zones in those locations where the SKU is available. + */ @visibility("read") locationInfo?: ApiManagementSkuLocationInfo[]; - @doc("The api versions that support this SKU.") + /** + * The api versions that support this SKU. + */ @visibility("read") apiVersions?: string[]; - @doc("Metadata for retrieving price info.") + /** + * Metadata for retrieving price info. + */ @visibility("read") costs?: ApiManagementSkuCosts[]; - @doc("A name value pair to describe the capability.") + /** + * A name value pair to describe the capability. + */ @visibility("read") capabilities?: ApiManagementSkuCapabilities[]; - @doc("The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.") + /** + * The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + */ @visibility("read") restrictions?: ApiManagementSkuRestrictions[]; } -@doc("Describes scaling information of a SKU.") +/** + * Describes scaling information of a SKU. + */ model ApiManagementSkuCapacity { - @doc("The minimum capacity.") + /** + * The minimum capacity. + */ @visibility("read") minimum?: int32; - @doc("The maximum capacity that can be set.") + /** + * The maximum capacity that can be set. + */ @visibility("read") maximum?: int32; - @doc("The default capacity.") + /** + * The default capacity. + */ @visibility("read") default?: int32; - @doc("The scale type applicable to the sku.") + /** + * The scale type applicable to the sku. + */ @visibility("read") scaleType?: ApiManagementSkuCapacityScaleType; } model ApiManagementSkuLocationInfo { - @doc("Location of the SKU") + /** + * Location of the SKU + */ @visibility("read") location?: string; - @doc("List of availability zones where the SKU is supported.") + /** + * List of availability zones where the SKU is supported. + */ @visibility("read") zones?: string[]; - @doc("Details of capabilities available to a SKU in specific zones.") + /** + * Details of capabilities available to a SKU in specific zones. + */ @visibility("read") zoneDetails?: ApiManagementSkuZoneDetails[]; } -@doc("Describes The zonal capabilities of a SKU.") +/** + * Describes The zonal capabilities of a SKU. + */ model ApiManagementSkuZoneDetails { - @doc("The set of zones that the SKU is available in with the specified capabilities.") + /** + * The set of zones that the SKU is available in with the specified capabilities. + */ @visibility("read") name?: string[]; - @doc("A list of capabilities that are available for the SKU in the specified list of zones.") + /** + * A list of capabilities that are available for the SKU in the specified list of zones. + */ @visibility("read") capabilities?: ApiManagementSkuCapabilities[]; } -@doc("Describes The SKU capabilities object.") +/** + * Describes The SKU capabilities object. + */ model ApiManagementSkuCapabilities { - @doc("An invariant to describe the feature.") + /** + * An invariant to describe the feature. + */ @visibility("read") name?: string; - @doc("An invariant if the feature is measured by quantity.") + /** + * An invariant if the feature is measured by quantity. + */ @visibility("read") value?: string; } -@doc("Describes metadata for retrieving price info.") +/** + * Describes metadata for retrieving price info. + */ model ApiManagementSkuCosts { - @doc("Used for querying price from commerce.") + /** + * Used for querying price from commerce. + */ @visibility("read") meterID?: string; - @doc("The multiplier is needed to extend the base metered cost.") + /** + * The multiplier is needed to extend the base metered cost. + */ @visibility("read") - quantity?: int32; + quantity?: int64; - @doc("An invariant to show the extended unit.") + /** + * An invariant to show the extended unit. + */ @visibility("read") extendedUnit?: string; } -@doc("Describes scaling information of a SKU.") +/** + * Describes scaling information of a SKU. + */ model ApiManagementSkuRestrictions { - @doc("The type of restrictions.") + /** + * The type of restrictions. + */ @visibility("read") type?: ApiManagementSkuRestrictionsType; - @doc("The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.") + /** + * The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + */ @visibility("read") values?: string[]; - @doc("The information about the restriction where the SKU cannot be used.") + /** + * The information about the restriction where the SKU cannot be used. + */ @visibility("read") restrictionInfo?: ApiManagementSkuRestrictionInfo; - @doc("The reason for restriction.") + /** + * The reason for restriction. + */ @visibility("read") reasonCode?: ApiManagementSkuRestrictionsReasonCode; } model ApiManagementSkuRestrictionInfo { - @doc("Locations where the SKU is restricted") + /** + * Locations where the SKU is restricted + */ @visibility("read") locations?: string[]; - @doc("List of availability zones where the SKU is restricted.") + /** + * List of availability zones where the SKU is restricted. + */ @visibility("read") zones?: string[]; } -@doc("Subscription create details.") +/** + * Subscription create details. + */ model SubscriptionCreateParameters { - @doc("Subscription contract properties.") + /** + * Subscription contract properties. + */ properties?: SubscriptionCreateParameterProperties; } -@doc("Parameters supplied to the Create subscription operation.") +/** + * Parameters supplied to the Create subscription operation. + */ model SubscriptionCreateParameterProperties { - @doc("User (user id path) for whom subscription is being created in form /users/{userId}") + /** + * User (user id path) for whom subscription is being created in form /users/{userId} + */ ownerId?: string; - @doc("Scope like /products/{productId} or /apis or /apis/{apiId}.") + /** + * Scope like /products/{productId} or /apis or /apis/{apiId}. + */ scope: string; - @doc("Subscription name.") + /** + * Subscription name. + */ @maxLength(100) @minLength(1) displayName: string; - @doc("Primary subscription key. If not specified during request key will be generated automatically.") + /** + * Primary subscription key. If not specified during request key will be generated automatically. + */ @maxLength(256) @minLength(1) primaryKey?: string; - @doc("Secondary subscription key. If not specified during request key will be generated automatically.") + /** + * Secondary subscription key. If not specified during request key will be generated automatically. + */ @maxLength(256) @minLength(1) secondaryKey?: string; - @doc("Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.") + /** + * Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. + */ state?: SubscriptionState; - @doc("Determines whether tracing can be enabled") + /** + * Determines whether tracing can be enabled + */ allowTracing?: boolean; } -@doc("Subscription update details.") +/** + * Subscription update details. + */ model SubscriptionUpdateParameters { - @doc("Subscription Update contract properties.") + /** + * Subscription Update contract properties. + */ properties?: SubscriptionUpdateParameterProperties; } -@doc("Parameters supplied to the Update subscription operation.") +/** + * Parameters supplied to the Update subscription operation. + */ model SubscriptionUpdateParameterProperties { - @doc("User identifier path: /users/{userId}") + /** + * User identifier path: /users/{userId} + */ ownerId?: string; - @doc("Scope like /products/{productId} or /apis or /apis/{apiId}") + /** + * Scope like /products/{productId} or /apis or /apis/{apiId} + */ scope?: string; - @doc("Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.") + /** + * Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expirationDate?: utcDateTime; - @doc("Subscription name.") + /** + * Subscription name. + */ displayName?: string; - @doc("Primary subscription key.") + /** + * Primary subscription key. + */ @maxLength(256) @minLength(1) primaryKey?: string; - @doc("Secondary subscription key.") + /** + * Secondary subscription key. + */ @maxLength(256) @minLength(1) secondaryKey?: string; - @doc("Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.") + /** + * Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. + */ state?: SubscriptionState; - @doc("Comments describing subscription state change by the administrator when the state is changed to the 'rejected'.") + /** + * Comments describing subscription state change by the administrator when the state is changed to the 'rejected'. + */ stateComment?: string; - @doc("Determines whether tracing can be enabled") + /** + * Determines whether tracing can be enabled + */ allowTracing?: boolean; } -@doc("Subscription keys.") +/** + * Subscription keys. + */ model SubscriptionKeysContract { - @doc("Subscription primary key.") + /** + * Subscription primary key. + */ @maxLength(256) @minLength(1) primaryKey?: string; - @doc("Subscription secondary key.") + /** + * Subscription secondary key. + */ @maxLength(256) @minLength(1) secondaryKey?: string; } -@doc("Parameters supplied to Create/Update Tag operations.") +/** + * Parameters supplied to Create/Update Tag operations. + */ model TagCreateUpdateParameters { - @doc("Properties supplied to Create Tag operation.") + /** + * Properties supplied to Create Tag operation. + */ properties?: TagContractProperties; } -@doc("Tenant access information contract of the API Management service.") +/** + * Tenant access information contract of the API Management service. + */ model AccessInformationContractProperties { - @doc("Access Information type ('access' or 'gitAccess')") + /** + * Access Information type ('access' or 'gitAccess') + */ id?: string; - @doc("Principal (User) Identifier.") + /** + * Principal (User) Identifier. + */ principalId?: string; - @doc("Determines whether direct access is enabled.") + /** + * Determines whether direct access is enabled. + */ enabled?: boolean; } -@doc("Tenant access information update parameters.") +/** + * Tenant access information update parameters. + */ model AccessInformationCreateParameters { - @doc("Tenant access information update parameter properties.") + /** + * Tenant access information update parameter properties. + */ properties?: AccessInformationCreateParameterProperties; } -@doc("Tenant access information update parameters of the API Management service") +/** + * Tenant access information update parameters of the API Management service + */ model AccessInformationCreateParameterProperties { - @doc("Principal (User) Identifier.") + /** + * Principal (User) Identifier. + */ principalId?: string; - @doc("Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + /** + * Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + */ primaryKey?: string; - @doc("Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + /** + * Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + */ secondaryKey?: string; - @doc("Determines whether direct access is enabled.") + /** + * Determines whether direct access is enabled. + */ enabled?: boolean; } -@doc("Tenant access information update parameters.") +/** + * Tenant access information update parameters. + */ model AccessInformationUpdateParameters { - @doc("Tenant access information update parameter properties.") + /** + * Tenant access information update parameter properties. + */ properties?: AccessInformationUpdateParameterProperties; } -@doc("Tenant access information update parameters of the API Management service") +/** + * Tenant access information update parameters of the API Management service + */ model AccessInformationUpdateParameterProperties { - @doc("Determines whether direct access is enabled.") + /** + * Determines whether direct access is enabled. + */ enabled?: boolean; } -@doc("Tenant access information contract of the API Management service.") +/** + * Tenant access information contract of the API Management service. + */ model AccessInformationSecretsContract { - @doc("Access Information type ('access' or 'gitAccess')") + /** + * Access Information type ('access' or 'gitAccess') + */ id?: string; - @doc("Principal (User) Identifier.") + /** + * Principal (User) Identifier. + */ principalId?: string; - @doc("Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + /** + * Primary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + */ primaryKey?: string; - @doc("Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + /** + * Secondary access key. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + */ secondaryKey?: string; - @doc("Determines whether direct access is enabled.") + /** + * Determines whether direct access is enabled. + */ enabled?: boolean; } -@doc("Deploy Tenant Configuration Contract.") +/** + * Deploy Tenant Configuration Contract. + */ model DeployConfigurationParameters { - @doc("Deploy Configuration Parameter contract properties.") + /** + * Deploy Configuration Parameter contract properties. + */ properties?: DeployConfigurationParameterProperties; } -@doc("Parameters supplied to the Deploy Configuration operation.") +/** + * Parameters supplied to the Deploy Configuration operation. + */ model DeployConfigurationParameterProperties { - @doc("The name of the Git branch from which the configuration is to be deployed to the configuration database.") + /** + * The name of the Git branch from which the configuration is to be deployed to the configuration database. + */ branch: string; - @doc("The value enforcing deleting subscriptions to products that are deleted in this update.") + /** + * The value enforcing deleting subscriptions to products that are deleted in this update. + */ force?: boolean; } -@doc("Long Running Git Operation Results.") +/** + * Long Running Git Operation Results. + */ model OperationResultContract extends Resource { - @doc("Properties of the Operation Contract.") + /** + * Properties of the Operation Contract. + */ properties?: OperationResultContractProperties; } -@doc("Operation Result.") +/** + * Operation Result. + */ model OperationResultContractProperties { - @doc("Operation result identifier.") + /** + * Operation result identifier. + */ id?: string; - @doc("Status of an async operation.") + /** + * Status of an async operation. + */ status?: AsyncOperationStatus; - @doc(""" -Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. started?: utcDateTime; - @doc(""" -Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. updated?: utcDateTime; - @doc("Optional result info.") + /** + * Optional result info. + */ resultInfo?: string; - @doc("Error Body Contract") + /** + * Error Body Contract + */ error?: ErrorResponseBody; - @doc("This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation.") + /** + * This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation. + */ @visibility("read") actionLog?: OperationResultLogItemContract[]; } -@doc("Log of the entity being created, updated or deleted.") +/** + * Log of the entity being created, updated or deleted. + */ model OperationResultLogItemContract { - @doc("The type of entity contract.") + /** + * The type of entity contract. + */ objectType?: string; - @doc("Action like create/update/delete.") + /** + * Action like create/update/delete. + */ action?: string; - @doc("Identifier of the entity being created/updated/deleted.") + /** + * Identifier of the entity being created/updated/deleted. + */ objectKey?: string; } -@doc("Save Tenant Configuration Contract details.") +/** + * Save Tenant Configuration Contract details. + */ model SaveConfigurationParameter { - @doc("Properties of the Save Configuration Parameters.") + /** + * Properties of the Save Configuration Parameters. + */ properties?: SaveConfigurationParameterProperties; } -@doc("Parameters supplied to the Save Tenant Configuration operation.") +/** + * Parameters supplied to the Save Tenant Configuration operation. + */ model SaveConfigurationParameterProperties { - @doc("The name of the Git branch in which to commit the current configuration snapshot.") + /** + * The name of the Git branch in which to commit the current configuration snapshot. + */ branch: string; - @doc("The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten.") + /** + * The value if true, the current configuration database is committed to the Git repository, even if the Git repository has newer changes that would be overwritten. + */ force?: boolean; } -@doc("Result of Tenant Configuration Sync State.") +/** + * Result of Tenant Configuration Sync State. + */ model TenantConfigurationSyncStateContract extends Resource { - @doc("Properties returned Tenant Configuration Sync State check.") + /** + * Properties returned Tenant Configuration Sync State check. + */ properties?: TenantConfigurationSyncStateContractProperties; } -@doc("Tenant Configuration Synchronization State.") +/** + * Tenant Configuration Synchronization State. + */ model TenantConfigurationSyncStateContractProperties { - @doc("The name of Git branch.") + /** + * The name of Git branch. + */ branch?: string; - @doc("The latest commit Id.") + /** + * The latest commit Id. + */ commitId?: string; - @doc("value indicating if last sync was save (true) or deploy (false) operation.") + /** + * value indicating if last sync was save (true) or deploy (false) operation. + */ isExport?: boolean; - @doc("value indicating if last synchronization was later than the configuration change.") + /** + * value indicating if last synchronization was later than the configuration change. + */ isSynced?: boolean; - @doc("value indicating whether Git configuration access is enabled.") + /** + * value indicating whether Git configuration access is enabled. + */ isGitEnabled?: boolean; - @doc(""" -The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. syncDate?: utcDateTime; - @doc(""" -The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. configurationChangeDate?: utcDateTime; - @doc("Most recent tenant configuration operation identifier") + /** + * Most recent tenant configuration operation identifier + */ lastOperationId?: string; } -@doc("User create details.") +/** + * User create details. + */ model UserCreateParameters { - @doc("User entity create contract properties.") + /** + * User entity create contract properties. + */ properties?: UserCreateParameterProperties; } -@doc("Parameters supplied to the Create User operation.") +/** + * Parameters supplied to the Create User operation. + */ model UserCreateParameterProperties extends UserEntityBaseParameters { - @doc("Email address. Must not be empty and must be unique within the service instance.") + /** + * Email address. Must not be empty and must be unique within the service instance. + */ @maxLength(254) @minLength(1) email: string; - @doc("First name.") + /** + * First name. + */ @maxLength(100) @minLength(1) firstName: string; - @doc("Last name.") + /** + * Last name. + */ @maxLength(100) @minLength(1) lastName: string; - @doc("User Password. If no value is provided, a default password is generated.") + /** + * User Password. If no value is provided, a default password is generated. + */ password?: string; - @doc("Determines the type of application which send the create user request. Default is legacy portal.") + /** + * Determines the type of application which send the create user request. Default is legacy portal. + */ appType?: AppType; - @doc("Determines the type of confirmation e-mail that will be sent to the newly created user.") + /** + * Determines the type of confirmation e-mail that will be sent to the newly created user. + */ confirmation?: Confirmation; } -@doc("User update parameters.") +/** + * User update parameters. + */ model UserUpdateParameters { - @doc("User entity update contract properties.") + /** + * User entity update contract properties. + */ properties?: UserUpdateParametersProperties; } -@doc("Parameters supplied to the Update User operation.") +/** + * Parameters supplied to the Update User operation. + */ model UserUpdateParametersProperties extends UserEntityBaseParameters { - @doc("Email address. Must not be empty and must be unique within the service instance.") + /** + * Email address. Must not be empty and must be unique within the service instance. + */ @maxLength(254) @minLength(1) email?: string; - @doc("User Password.") + /** + * User Password. + */ password?: string; - @doc("First name.") + /** + * First name. + */ @maxLength(100) @minLength(1) firstName?: string; - @doc("Last name.") + /** + * Last name. + */ @maxLength(100) @minLength(1) lastName?: string; } -@doc("Generate SSO Url operations response details.") +/** + * Generate SSO Url operations response details. + */ model GenerateSsoUrlResult { - @doc("Redirect Url containing the SSO URL value.") + /** + * Redirect Url containing the SSO URL value. + */ value?: string; } -@doc("List of Users Identity list representation.") +/** + * List of Users Identity list representation. + */ model UserIdentityListResult is Azure.Core.Page { - @doc("Total record count number across all pages.") - count?: int32; + /** + * Total record count number across all pages. + */ + count?: int64; } -@doc("Get User Token parameters.") +/** + * Get User Token parameters. + */ model UserTokenParameters { - @doc("User Token Parameter contract properties.") + /** + * User Token Parameter contract properties. + */ properties?: UserTokenParameterProperties; } -@doc("Parameters supplied to the Get User Token operation.") +/** + * Parameters supplied to the Get User Token operation. + */ model UserTokenParameterProperties { - @doc("The Key to be used to generate token for user.") + /** + * The Key to be used to generate token for user. + */ keyType: KeyType; - @doc(""" -The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /** +* The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. -""") +*/ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expiry: utcDateTime; } -@doc("Get User Token response details.") +/** + * Get User Token response details. + */ model UserTokenResult { - @doc("Shared Access Authorization token for the User.") + /** + * Shared Access Authorization token for the User. + */ value?: string; } -@doc("Object used to create an API Revision or Version based on an existing API Revision") +/** + * Object used to create an API Revision or Version based on an existing API Revision + */ model ApiRevisionInfoContract { - @doc("Resource identifier of API to be used to create the revision from.") + /** + * Resource identifier of API to be used to create the revision from. + */ sourceApiId?: string; - @doc("Version identifier for the new API Version.") + /** + * Version identifier for the new API Version. + */ @maxLength(100) apiVersionName?: string; - @doc("Description of new API Revision.") + /** + * Description of new API Revision. + */ @maxLength(256) apiRevisionDescription?: string; - @doc("Version set details") + /** + * Version set details + */ apiVersionSet?: ApiVersionSetContractDetails; } -@doc("Quota counter value details.") +/** + * Quota counter value details. + */ model QuotaCounterValueContract { - @doc("Quota counter Value Properties.") + /** + * Quota counter Value Properties. + */ value?: QuotaCounterValueContractProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp index c8c870a02e..22751ef70b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp @@ -10,587 +10,791 @@ using Azure.ResourceManager; namespace Azure.ResourceManager.ApiManagement; interface TagOperations { - @doc("Lists all Tags associated with the API.") + /** + * Lists all Tags associated with the API. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags") @get - ListByApi is Azure.Core.Foundations.Operation< + listByApi is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path apiId: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ResourceListResult >; - @doc("Gets the entity state version of the tag specified by its identifier.") + /** + * Gets the entity state version of the tag specified by its identifier. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}") @head - GetEntityStateByApi is Azure.Core.Foundations.Operation< + getEntityStateByApi is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path apiId: string; - @doc("Tag identifier. Must be unique in the current API Management service instance.") + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path tagId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Get tag associated with the API.") + /** + * Get tag associated with the API. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}") @get - GetByApi is Azure.Core.Foundations.Operation< + getByApi is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path apiId: string; - @doc("Tag identifier. Must be unique in the current API Management service instance.") + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path tagId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, TagContract >; - @doc("Assign tag to the Api.") + /** + * Assign tag to the Api. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}") @put - AssignToApi is Azure.Core.Foundations.Operation< + assignToApi is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path apiId: string; - @doc("Tag identifier. Must be unique in the current API Management service instance.") + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path tagId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, TagContract >; - @doc("Detach the tag from the Api.") + /** + * Detach the tag from the Api. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}") @delete - DetachFromApi is Azure.Core.Foundations.Operation< + detachFromApi is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path apiId: string; - @doc("Tag identifier. Must be unique in the current API Management service instance.") + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path tagId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Lists all Tags associated with the Product.") + /** + * Lists all Tags associated with the Product. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags") @get - ListByProduct is Azure.Core.Foundations.Operation< + listByProduct is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Product identifier. Must be unique in the current API Management service instance.") + /** + * Product identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path productId: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ResourceListResult >; - @doc("Gets the entity state version of the tag specified by its identifier.") + /** + * Gets the entity state version of the tag specified by its identifier. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}") @head - GetEntityStateByProduct is Azure.Core.Foundations.Operation< + getEntityStateByProduct is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Product identifier. Must be unique in the current API Management service instance.") + /** + * Product identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path productId: string; - @doc("Tag identifier. Must be unique in the current API Management service instance.") + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path tagId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Get tag associated with the Product.") + /** + * Get tag associated with the Product. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}") @get - GetByProduct is Azure.Core.Foundations.Operation< + getByProduct is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Product identifier. Must be unique in the current API Management service instance.") + /** + * Product identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path productId: string; - @doc("Tag identifier. Must be unique in the current API Management service instance.") + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path tagId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, TagContract >; - @doc("Assign tag to the Product.") + /** + * Assign tag to the Product. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}") @put - AssignToProduct is Azure.Core.Foundations.Operation< + assignToProduct is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Product identifier. Must be unique in the current API Management service instance.") + /** + * Product identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path productId: string; - @doc("Tag identifier. Must be unique in the current API Management service instance.") + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path tagId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, TagContract >; - @doc("Detach the tag from the Product.") + /** + * Detach the tag from the Product. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}") @delete - DetachFromProduct is Azure.Core.Foundations.Operation< + detachFromProduct is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Product identifier. Must be unique in the current API Management service instance.") + /** + * Product identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path productId: string; - @doc("Tag identifier. Must be unique in the current API Management service instance.") + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path tagId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Lists a collection of tags defined within a service instance.") + /** + * Lists a collection of tags defined within a service instance. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags") @get - ListByService is Azure.Core.Foundations.Operation< + listByService is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Scope like 'apis', 'products' or 'apis/{apiId}") + /** + * Scope like 'apis', 'products' or 'apis/{apiId} + */ @query("scope") scope?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ResourceListResult >; - @doc("Gets the entity state version of the tag specified by its identifier.") + /** + * Gets the entity state version of the tag specified by its identifier. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") @head - GetEntityState is Azure.Core.Foundations.Operation< + getEntityState is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Tag identifier. Must be unique in the current API Management service instance.") + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path tagId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Gets the details of the tag specified by its identifier.") + /** + * Gets the details of the tag specified by its identifier. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Tag identifier. Must be unique in the current API Management service instance.") + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path tagId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, TagContract >; - @doc("Creates a tag.") + /** + * Creates a tag. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Tag identifier. Must be unique in the current API Management service instance.") + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path tagId: string; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("Create parameters.") + /** + * Create parameters. + */ @body parameters: TagCreateUpdateParameters; }, TagContract >; - @doc("Updates the details of the tag specified by its identifier.") + /** + * Updates the details of the tag specified by its identifier. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") @patch - Update is Azure.Core.Foundations.Operation< + update is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Tag identifier. Must be unique in the current API Management service instance.") + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path tagId: string; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("Update parameters.") + /** + * Update parameters. + */ @body parameters: TagCreateUpdateParameters; }, TagContract >; - @doc("Deletes specific tag of the API Management service instance.") + /** + * Deletes specific tag of the API Management service instance. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Tag identifier. Must be unique in the current API Management service instance.") + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path tagId: string; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, @@ -599,186 +803,254 @@ interface TagOperations { } interface ApiPolicyOperations { - @doc("Get the policy configuration at the API level.") + /** + * Get the policy configuration at the API level. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies") @get - ListByApi is Azure.Core.Foundations.Operation< + listByApi is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path apiId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ResourceListResult >; - @doc("Gets the entity state (Etag) version of the API policy specified by its identifier.") + /** + * Gets the entity state (Etag) version of the API policy specified by its identifier. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}") @head - GetEntityTag is Azure.Core.Foundations.Operation< + getEntityTag is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path apiId: string; - @doc("The identifier of the Policy.") + /** + * The identifier of the Policy. + */ @path policyId: PolicyIdName; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Get the policy configuration at the API level.") + /** + * Get the policy configuration at the API level. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path apiId: string; - @doc("The identifier of the Policy.") + /** + * The identifier of the Policy. + */ @path policyId: PolicyIdName; - @doc("Policy Export Format.") + /** + * Policy Export Format. + */ @query("format") format?: PolicyExportFormat = PolicyExportFormat.xml; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/json, application/vnd.ms-azure-apim.policy+xml, application/vnd.ms-azure-apim.policy.raw+xml"; }, PolicyContract >; - @doc("Creates or updates policy configuration for the API.") + /** + * Creates or updates policy configuration for the API. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path apiId: string; - @doc("The identifier of the Policy.") + /** + * The identifier of the Policy. + */ @path policyId: PolicyIdName; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("The policy contents to apply.") + /** + * The policy contents to apply. + */ @body parameters: PolicyContract; }, PolicyContract >; - @doc("Deletes the policy configuration at the Api.") + /** + * Deletes the policy configuration at the Api. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path apiId: string; - @doc("The identifier of the Policy.") + /** + * The identifier of the Policy. + */ @path policyId: PolicyIdName; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, @@ -787,38 +1059,52 @@ interface ApiPolicyOperations { } interface ApiExportOperations { - @doc("Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes.") + /** + * Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.") + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path apiId: string; - @doc("Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes.") + /** + * Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes. + */ @query("format") format: ExportFormat; - @doc("Query parameter required to export the API details.") + /** + * Query parameter required to export the API details. + */ @query("export") export: ExportApi; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, @@ -827,206 +1113,280 @@ interface ApiExportOperations { } interface DiagnosticOperations { - @doc("Lists all diagnostics of the API Management service instance.") + /** + * Lists all diagnostics of the API Management service instance. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics") @get - ListByService is Azure.Core.Foundations.Operation< + listByService is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ResourceListResult >; - @doc("Gets the entity state (Etag) version of the Diagnostic specified by its identifier.") + /** + * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") @head - GetEntityTag is Azure.Core.Foundations.Operation< + getEntityTag is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Diagnostic identifier. Must be unique in the current API Management service instance.") + /** + * Diagnostic identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path diagnosticId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Gets the details of the Diagnostic specified by its identifier.") + /** + * Gets the details of the Diagnostic specified by its identifier. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Diagnostic identifier. Must be unique in the current API Management service instance.") + /** + * Diagnostic identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path diagnosticId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, DiagnosticContract >; - @doc("Creates a new Diagnostic or updates an existing one.") + /** + * Creates a new Diagnostic or updates an existing one. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Diagnostic identifier. Must be unique in the current API Management service instance.") + /** + * Diagnostic identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path diagnosticId: string; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("Create parameters.") + /** + * Create parameters. + */ @body parameters: DiagnosticContract; }, DiagnosticContract >; - @doc("Updates the details of the Diagnostic specified by its identifier.") + /** + * Updates the details of the Diagnostic specified by its identifier. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") @patch - Update is Azure.Core.Foundations.Operation< + update is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Diagnostic identifier. Must be unique in the current API Management service instance.") + /** + * Diagnostic identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path diagnosticId: string; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("Diagnostic Update parameters.") + /** + * Diagnostic Update parameters. + */ @body parameters: DiagnosticContract; }, DiagnosticContract >; - @doc("Deletes the specified Diagnostic.") + /** + * Deletes the specified Diagnostic. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Diagnostic identifier. Must be unique in the current API Management service instance.") + /** + * Diagnostic identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path diagnosticId: string; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, @@ -1035,66 +1395,90 @@ interface DiagnosticOperations { } interface IssueOperations { - @doc("Lists a collection of issues in the specified service instance.") + /** + * Lists a collection of issues in the specified service instance. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues") @get - ListByService is Azure.Core.Foundations.Operation< + listByService is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ResourceListResult >; - @doc("Gets API Management issue details") + /** + * Gets API Management issue details + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Issue identifier. Must be unique in the current API Management service instance.") + /** + * Issue identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @pattern("^[^*#&+:<>?]+$") @path issueId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, @@ -1103,147 +1487,203 @@ interface IssueOperations { } interface PolicyOperations { - @doc("Lists all the Global Policy definitions of the Api Management service.") + /** + * Lists all the Global Policy definitions of the Api Management service. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies") @get - ListByService is Azure.Core.Foundations.Operation< + listByService is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ResourceListResult >; - @doc("Gets the entity state (Etag) version of the Global policy definition in the Api Management service.") + /** + * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}") @head - GetEntityTag is Azure.Core.Foundations.Operation< + getEntityTag is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("The identifier of the Policy.") + /** + * The identifier of the Policy. + */ @path policyId: PolicyIdName; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Get the Global policy definition of the Api Management service.") + /** + * Get the Global policy definition of the Api Management service. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("The identifier of the Policy.") + /** + * The identifier of the Policy. + */ @path policyId: PolicyIdName; - @doc("Policy Export Format.") + /** + * Policy Export Format. + */ @query("format") format?: PolicyExportFormat = PolicyExportFormat.xml; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, PolicyContract >; - @doc("Creates or updates the global policy configuration of the Api Management service.") + /** + * Creates or updates the global policy configuration of the Api Management service. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("The identifier of the Policy.") + /** + * The identifier of the Policy. + */ @path policyId: PolicyIdName; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("The policy contents to apply.") + /** + * The policy contents to apply. + */ @body parameters: PolicyContract; }, PolicyContract >; - @doc("Deletes the global policy configuration of the Api Management Service.") + /** + * Deletes the global policy configuration of the Api Management Service. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("The identifier of the Policy.") + /** + * The identifier of the Policy. + */ @path policyId: PolicyIdName; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, @@ -1252,177 +1692,243 @@ interface PolicyOperations { } interface ProductPolicyOperations { - @doc("Get the policy configuration at the Product level.") + /** + * Get the policy configuration at the Product level. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies") @get - ListByProduct is Azure.Core.Foundations.Operation< + listByProduct is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Product identifier. Must be unique in the current API Management service instance.") + /** + * Product identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path productId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ResourceListResult >; - @doc("Get the ETag of the policy configuration at the Product level.") + /** + * Get the ETag of the policy configuration at the Product level. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}") @head - GetEntityTag is Azure.Core.Foundations.Operation< + getEntityTag is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Product identifier. Must be unique in the current API Management service instance.") + /** + * Product identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path productId: string; - @doc("The identifier of the Policy.") + /** + * The identifier of the Policy. + */ @path policyId: PolicyIdName; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Get the policy configuration at the Product level.") + /** + * Get the policy configuration at the Product level. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Product identifier. Must be unique in the current API Management service instance.") + /** + * Product identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path productId: string; - @doc("The identifier of the Policy.") + /** + * The identifier of the Policy. + */ @path policyId: PolicyIdName; - @doc("Policy Export Format.") + /** + * Policy Export Format. + */ @query("format") format?: PolicyExportFormat = PolicyExportFormat.xml; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, PolicyContract >; - @doc("Creates or updates policy configuration for the Product.") + /** + * Creates or updates policy configuration for the Product. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Product identifier. Must be unique in the current API Management service instance.") + /** + * Product identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path productId: string; - @doc("The identifier of the Policy.") + /** + * The identifier of the Policy. + */ @path policyId: PolicyIdName; - @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ @header `If-Match`?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("The policy contents to apply.") + /** + * The policy contents to apply. + */ @body parameters: PolicyContract; }, PolicyContract >; - @doc("Deletes the policy configuration at the Product.") + /** + * Deletes the policy configuration at the Product. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("Product identifier. Must be unique in the current API Management service instance.") + /** + * Product identifier. Must be unique in the current API Management service instance. + */ @maxLength(256) @minLength(1) @path productId: string; - @doc("The identifier of the Policy.") + /** + * The identifier of the Policy. + */ @path policyId: PolicyIdName; - @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ @header `If-Match`: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, @@ -1431,12 +1937,16 @@ interface ProductPolicyOperations { } interface ApiManagementSkusOperations { - @doc("Gets the list of Microsoft.ApiManagement SKUs available for your Subscription.") + /** + * Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/skus") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, @@ -1445,77 +1955,105 @@ interface ApiManagementSkusOperations { } interface UserSubscriptionOperations { - @doc("Lists the collection of subscriptions of the specified user.") + /** + * Lists the collection of subscriptions of the specified user. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("User identifier. Must be unique in the current API Management service instance.") + /** + * User identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @path userId: string; - @doc("| Field | Usage | Supported operators | Supported functions |
    |-------------|------------------------|-----------------------------------|
    |name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    ") + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|------------------------|-----------------------------------|
    |name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ @query("$filter") $filter?: string; - @doc("Number of records to return.") + /** + * Number of records to return. + */ @minValue(1) @query("$top") $top?: int32; - @doc("Number of records to skip.") + /** + * Number of records to skip. + */ @query("$skip") $skip?: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, ResourceListResult >; - @doc("Gets the specified Subscription entity associated with a particular user.") + /** + * Gets the specified Subscription entity associated with a particular user. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions/{sid}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the API Management service.") + /** + * The name of the API Management service. + */ @maxLength(50) @minLength(1) @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") @path serviceName: string; - @doc("User identifier. Must be unique in the current API Management service instance.") + /** + * User identifier. Must be unique in the current API Management service instance. + */ @maxLength(80) @minLength(1) @path userId: string; - @doc("Subscription entity Identifier. The entity represents the association between a user and a product in API Management.") + /** + * Subscription entity Identifier. The entity represents the association between a user and a product in API Management. + */ @maxLength(256) @pattern("^[^*#&+:<>?]+$") @path sid: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/tspconfig.yaml index 691f3c1b0c..2faa332586 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/tspconfig.yaml @@ -2,6 +2,7 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp index dbba191362..f0f7dfc7fe 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp @@ -11,9 +11,13 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.Authorization; -@doc("Deny Assignment") +/** + * Deny Assignment + */ model DenyAssignment is ExtensionResource { - @doc("The ID of the deny assignment to get.") + /** + * The ID of the deny assignment to get. + */ @path @key("denyAssignmentId") @segment("denyAssignments") @@ -22,43 +26,63 @@ model DenyAssignment is ExtensionResource { @armResourceOperations interface DenyAssignments { - @doc("Get the specified deny assignment.") + /** + * Get the specified deny assignment. + */ get is ArmResourceRead; - @doc("Gets deny assignments for a resource.") + /** + * Gets deny assignments for a resource. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DenyAssignments_ListForResource") listForResource is ArmResourceListByParent< DenyAssignment, { ...BaseParameters; - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("The namespace of the resource provider.") + /** + * The namespace of the resource provider. + */ @path resourceProviderNamespace: string; - @doc("The parent resource identity.") + /** + * The parent resource identity. + */ @path parentResourcePath: string; - @doc("The resource type of the resource.") + /** + * The resource type of the resource. + */ @path resourceType: string; - @doc("The name of the resource to get deny assignments for.") + /** + * The name of the resource to get deny assignments for. + */ @path resourceName: string; - @doc("The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. This filter is different from the principalId filter as it returns not only those deny assignments that contain the specified principal is the Principals list but also those deny assignments that contain the specified principal is the ExcludePrincipals list. Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and description properties are returned.") + /** + * The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. This filter is different from the principalId filter as it returns not only those deny assignments that contain the specified principal is the Principals list but also those deny assignments that contain the specified principal is the ExcludePrincipals list. Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and description properties are returned. + */ @query("$filter") $filter?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp index ebf7e544e3..116e7c0a2f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp @@ -12,47 +12,67 @@ using TypeSpec.OpenAPI; namespace Azure.ResourceManager.Authorization; // FIXME: ProviderOperationsMetadata has no properties property -@doc("Provider Operations metadata") +/** + * Provider Operations metadata + */ @tenantResource model ProviderOperationsMetadata is ProxyResource<{}> { - @doc("The namespace of the resource provider.") + /** + * The namespace of the resource provider. + */ @path @key("resourceProviderNamespace") @segment("providerOperations") name: string; - @doc("The provider display name.") + /** + * The provider display name. + */ displayName?: string; - @doc("The provider resource types") + /** + * The provider resource types + */ resourceTypes?: AuthorizationProviderResourceType[]; - @doc("The provider operations.") + /** + * The provider operations. + */ operations?: ProviderOperation[]; } @armResourceOperations @projectedName("client", "ProviderOperationsMetadata") interface ProviderOperationsMetadataOperationGroup { - @doc("Gets provider operations metadata for the specified resource provider.") + /** + * Gets provider operations metadata for the specified resource provider. + */ get is ArmResourceRead< ProviderOperationsMetadata, { ...BaseParameters; - @doc("Specifies whether to expand the values.") + /** + * Specifies whether to expand the values. + */ @query("$expand") $expand?: string = "resourceTypes"; } >; - @doc("Gets provider operations metadata for all resource providers.") + /** + * Gets provider operations metadata for all resource providers. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ProviderOperationsMetadata_List") list is ArmResourceListByParent< ProviderOperationsMetadata, { ...BaseParameters; - @doc("Specifies whether to expand the values.") + /** + * Specifies whether to expand the values. + */ @query("$expand") $expand?: string = "resourceTypes"; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp index 4f12057895..105ca7cfd1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp @@ -11,9 +11,13 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.Authorization; -@doc("Role Assignments") +/** + * Role Assignments + */ model RoleAssignment is ExtensionResource { - @doc("The name of the role assignment. It can be any valid GUID.") + /** + * The name of the role assignment. It can be any valid GUID. + */ @path @key("roleAssignmentName") @segment("roleAssignments") @@ -22,50 +26,82 @@ model RoleAssignment is ExtensionResource { @armResourceOperations interface RoleAssignments { - @doc("Get a role assignment by scope and name.") + /** + * Get a role assignment by scope and name. + */ get is ArmResourceRead< RoleAssignment, { ...BaseParameters; - @doc("Tenant ID for cross-tenant request") + /** + * Tenant ID for cross-tenant request + */ @query("tenantId") tenantId?: string; } >; - @doc("Create or update a role assignment by scope and name.") + /** + * Create or update a role assignment by scope and name. + */ create is ArmResourceCreateOrReplaceSync; - @doc("Delete a role assignment by scope and name.") + /** + * Delete a role assignment by scope and name. + */ delete is ArmResourceDeleteSync< RoleAssignment, { ...BaseParameters; - @doc("Tenant ID for cross-tenant request") + /** + * Tenant ID for cross-tenant request + */ @query("tenantId") tenantId?: string; } >; - @doc("List all role assignments that apply to a scope.") + /** + * List all role assignments that apply to a scope. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RoleAssignments_ListForScope") listForScope is ArmResourceListByParent< RoleAssignment, { ...BaseParameters; - @doc("The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal.") + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. + */ @query("$filter") $filter?: string; - @doc("Tenant ID for cross-tenant request") + /** + * Tenant ID for cross-tenant request + */ @query("tenantId") tenantId?: string; - @doc("The skipToken to apply on the operation. Use $skipToken={skiptoken} to return paged role assignments following the skipToken passed. Only supported on provider level calls.") + /** + * The skipToken to apply on the operation. Use $skipToken={skiptoken} to return paged role assignments following the skipToken passed. Only supported on provider level calls. + */ @query("$skipToken") $skipToken?: string; } >; } + +@@projectedName(RoleAssignments.create::parameters.resource, + "json", + "parameters" +); +@@extension(RoleAssignments.create::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(RoleAssignments.create::parameters.resource, + "Parameters for the role assignment." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp index 252768525f..239aff5399 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.Authorization; -@doc("Role Assignment schedule") +/** + * Role Assignment schedule + */ model RoleAssignmentSchedule is ExtensionResource { - @doc("The name (guid) of the role assignment schedule to get.") + /** + * The name (guid) of the role assignment schedule to get. + */ @path @key("roleAssignmentScheduleName") @segment("roleAssignmentSchedules") @@ -23,16 +27,24 @@ model RoleAssignmentSchedule @armResourceOperations interface RoleAssignmentSchedules { - @doc("Get the specified role assignment schedule for a resource scope") + /** + * Get the specified role assignment schedule for a resource scope + */ get is ArmResourceRead; - @doc("Gets role assignment schedules for a resource scope.") + /** + * Gets role assignment schedules for a resource scope. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RoleAssignmentSchedules_ListForScope") listForScope is ArmResourceListByParent< RoleAssignmentSchedule, { ...BaseParameters; - @doc("The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment schedules for the current user. Use $filter=asTarget() to return all role assignment schedules created for the current user.") + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment schedules for the current user. Use $filter=asTarget() to return all role assignment schedules created for the current user. + */ @query("$filter") $filter?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp index 8d3f7c4b86..26074c4ef9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.Authorization; -@doc("Information about current or upcoming role assignment schedule instance") +/** + * Information about current or upcoming role assignment schedule instance + */ model RoleAssignmentScheduleInstance is ExtensionResource { - @doc("The name (hash of schedule name + time) of the role assignment schedule to get.") + /** + * The name (hash of schedule name + time) of the role assignment schedule to get. + */ @path @key("roleAssignmentScheduleInstanceName") @segment("roleAssignmentScheduleInstances") @@ -23,16 +27,24 @@ model RoleAssignmentScheduleInstance @armResourceOperations interface RoleAssignmentScheduleInstances { - @doc("Gets the specified role assignment schedule instance.") + /** + * Gets the specified role assignment schedule instance. + */ get is ArmResourceRead; - @doc("Gets role assignment schedule instances of a role assignment schedule.") + /** + * Gets role assignment schedule instances of a role assignment schedule. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RoleAssignmentScheduleInstances_ListForScope") listForScope is ArmResourceListByParent< RoleAssignmentScheduleInstance, { ...BaseParameters; - @doc("The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment schedule instances for the user. Use $filter=asTarget() to return all role assignment schedule instances created for the current user.") + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment schedule instances for the user. Use $filter=asTarget() to return all role assignment schedule instances created for the current user. + */ @query("$filter") $filter?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp index 74751c9ea9..abf49e0053 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.Authorization; -@doc("Role Assignment schedule request") +/** + * Role Assignment schedule request + */ model RoleAssignmentScheduleRequest is ExtensionResource { - @doc("The name (guid) of the role assignment schedule request to get.") + /** + * The name (guid) of the role assignment schedule request to get. + */ @path @key("roleAssignmentScheduleRequestName") @segment("roleAssignmentScheduleRequests") @@ -23,31 +27,68 @@ model RoleAssignmentScheduleRequest @armResourceOperations interface RoleAssignmentScheduleRequests { - @doc("Get the specified role assignment schedule request.") + /** + * Get the specified role assignment schedule request. + */ get is ArmResourceRead; - @doc("Creates a role assignment schedule request.") + /** + * Creates a role assignment schedule request. + */ create is ArmResourceCreateOrReplaceSync; - @doc("Gets role assignment schedule requests for a scope.") + /** + * Gets role assignment schedule requests for a scope. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RoleAssignmentScheduleRequests_ListForScope") listForScope is ArmResourceListByParent< RoleAssignmentScheduleRequest, { ...BaseParameters; - @doc("The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role assignment schedule requests requested by the current user. Use $filter=asTarget() to return all role assignment schedule requests created for the current user. Use $filter=asApprover() to return all role assignment schedule requests where the current user is an approver.") + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role assignment schedule requests requested by the current user. Use $filter=asTarget() to return all role assignment schedule requests created for the current user. Use $filter=asApprover() to return all role assignment schedule requests where the current user is an approver. + */ @query("$filter") $filter?: string; } >; - @doc("Cancels a pending role assignment schedule request.") + /** + * Cancels a pending role assignment schedule request. + */ cancel is ArmResourceActionSync; - @doc("Validates a new role assignment schedule request.") + /** + * Validates a new role assignment schedule request. + */ validate is ArmResourceActionSync< RoleAssignmentScheduleRequest, RoleAssignmentScheduleRequest, RoleAssignmentScheduleRequest >; } + +@@projectedName(RoleAssignmentScheduleRequests.create::parameters.resource, + "json", + "parameters" +); +@@extension(RoleAssignmentScheduleRequests.create::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(RoleAssignmentScheduleRequests.create::parameters.resource, + "Parameters for the role assignment schedule request." +); +@@projectedName(RoleAssignmentScheduleRequests.validate::parameters.body, + "json", + "parameters" +); +@@extension(RoleAssignmentScheduleRequests.validate::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(RoleAssignmentScheduleRequests.validate::parameters.body, + "Parameters for the role assignment schedule request." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp index 675b042085..40dd77375a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp @@ -11,9 +11,13 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.Authorization; -@doc("Role definition.") +/** + * Role definition. + */ model RoleDefinition is ExtensionResource { - @doc("The ID of the role definition.") + /** + * The ID of the role definition. + */ @path @key("roleDefinitionId") @segment("roleDefinitions") @@ -22,24 +26,48 @@ model RoleDefinition is ExtensionResource { @armResourceOperations interface RoleDefinitions { - @doc("Get role definition by name (GUID).") + /** + * Get role definition by name (GUID). + */ get is ArmResourceRead; - @doc("Creates or updates a role definition.") + /** + * Creates or updates a role definition. + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Deletes a role definition.") + /** + * Deletes a role definition. + */ delete is ArmResourceDeleteSync; - @doc("Get all role definitions that are applicable at scope and above.") + /** + * Get all role definitions that are applicable at scope and above. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RoleDefinitions_List") list is ArmResourceListByParent< RoleDefinition, { ...BaseParameters; - @doc("The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well.") + /** + * The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well. + */ @query("$filter") $filter?: string; } >; } + +@@projectedName(RoleDefinitions.createOrUpdate::parameters.resource, + "json", + "roleDefinition" +); +@@extension(RoleDefinitions.createOrUpdate::parameters.resource, + "x-ms-client-name", + "roleDefinition" +); +@@doc(RoleDefinitions.createOrUpdate::parameters.resource, + "The values for the role definition." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp index fe16e2f188..50f08b1e85 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.Authorization; -@doc("Role eligibility schedule") +/** + * Role eligibility schedule + */ model RoleEligibilitySchedule is ExtensionResource { - @doc("The name (guid) of the role eligibility schedule to get.") + /** + * The name (guid) of the role eligibility schedule to get. + */ @path @key("roleEligibilityScheduleName") @segment("roleEligibilitySchedules") @@ -23,16 +27,24 @@ model RoleEligibilitySchedule @armResourceOperations interface RoleEligibilitySchedules { - @doc("Get the specified role eligibility schedule for a resource scope") + /** + * Get the specified role eligibility schedule for a resource scope + */ get is ArmResourceRead; - @doc("Gets role eligibility schedules for a resource scope.") + /** + * Gets role eligibility schedules for a resource scope. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RoleEligibilitySchedules_ListForScope") listForScope is ArmResourceListByParent< RoleEligibilitySchedule, { ...BaseParameters; - @doc("The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedules at or above the scope. Use $filter=principalId eq {id} to return all role eligibility schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use $filter=asTarget() to return all role eligibility schedules created for the current user.") + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedules at or above the scope. Use $filter=principalId eq {id} to return all role eligibility schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use $filter=asTarget() to return all role eligibility schedules created for the current user. + */ @query("$filter") $filter?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp index 6b4c4690ef..4ebbe055f2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.Authorization; -@doc("Information about current or upcoming role eligibility schedule instance") +/** + * Information about current or upcoming role eligibility schedule instance + */ model RoleEligibilityScheduleInstance is ExtensionResource { - @doc("The name (hash of schedule name + time) of the role eligibility schedule to get.") + /** + * The name (hash of schedule name + time) of the role eligibility schedule to get. + */ @path @key("roleEligibilityScheduleInstanceName") @segment("roleEligibilityScheduleInstances") @@ -23,16 +27,24 @@ model RoleEligibilityScheduleInstance @armResourceOperations interface RoleEligibilityScheduleInstances { - @doc("Gets the specified role eligibility schedule instance.") + /** + * Gets the specified role eligibility schedule instance. + */ get is ArmResourceRead; - @doc("Gets role eligibility schedule instances of a role eligibility schedule.") + /** + * Gets role eligibility schedule instances of a role eligibility schedule. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RoleEligibilityScheduleInstances_ListForScope") listForScope is ArmResourceListByParent< RoleEligibilityScheduleInstance, { ...BaseParameters; - @doc("The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use $filter=asTarget() to return all role eligibility schedules created for the current user.") + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use $filter=asTarget() to return all role eligibility schedules created for the current user. + */ @query("$filter") $filter?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp index c0a6fe274b..cdddd7a094 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.Authorization; -@doc("Role Eligibility schedule request") +/** + * Role Eligibility schedule request + */ model RoleEligibilityScheduleRequest is ExtensionResource { - @doc("The name (guid) of the role eligibility schedule request to get.") + /** + * The name (guid) of the role eligibility schedule request to get. + */ @path @key("roleEligibilityScheduleRequestName") @segment("roleEligibilityScheduleRequests") @@ -23,31 +27,68 @@ model RoleEligibilityScheduleRequest @armResourceOperations interface RoleEligibilityScheduleRequests { - @doc("Get the specified role eligibility schedule request.") + /** + * Get the specified role eligibility schedule request. + */ get is ArmResourceRead; - @doc("Creates a role eligibility schedule request.") + /** + * Creates a role eligibility schedule request. + */ create is ArmResourceCreateOrReplaceSync; - @doc("Gets role eligibility schedule requests for a scope.") + /** + * Gets role eligibility schedule requests for a scope. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RoleEligibilityScheduleRequests_ListForScope") listForScope is ArmResourceListByParent< RoleEligibilityScheduleRequest, { ...BaseParameters; - @doc("The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role eligibility schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role eligibility schedule requests requested by the current user. Use $filter=asTarget() to return all role eligibility schedule requests created for the current user. Use $filter=asApprover() to return all role eligibility schedule requests where the current user is an approver.") + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role eligibility schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role eligibility schedule requests requested by the current user. Use $filter=asTarget() to return all role eligibility schedule requests created for the current user. Use $filter=asApprover() to return all role eligibility schedule requests where the current user is an approver. + */ @query("$filter") $filter?: string; } >; - @doc("Cancels a pending role eligibility schedule request.") + /** + * Cancels a pending role eligibility schedule request. + */ cancel is ArmResourceActionSync; - @doc("Validates a new role eligibility schedule request.") + /** + * Validates a new role eligibility schedule request. + */ validate is ArmResourceActionSync< RoleEligibilityScheduleRequest, RoleEligibilityScheduleRequest, RoleEligibilityScheduleRequest >; } + +@@projectedName(RoleEligibilityScheduleRequests.create::parameters.resource, + "json", + "parameters" +); +@@extension(RoleEligibilityScheduleRequests.create::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(RoleEligibilityScheduleRequests.create::parameters.resource, + "Parameters for the role eligibility schedule request." +); +@@projectedName(RoleEligibilityScheduleRequests.validate::parameters.body, + "json", + "parameters" +); +@@extension(RoleEligibilityScheduleRequests.validate::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(RoleEligibilityScheduleRequests.validate::parameters.body, + "Parameters for the role eligibility schedule request." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp index d971793eeb..ed8b2da580 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.Authorization; -@doc("Role management policy") +/** + * Role management policy + */ model RoleManagementPolicy is ExtensionResource { - @doc("The name (guid) of the role management policy to get.") + /** + * The name (guid) of the role management policy to get. + */ @path @key("roleManagementPolicyName") @segment("roleManagementPolicies") @@ -23,12 +27,33 @@ model RoleManagementPolicy @armResourceOperations interface RoleManagementPolicies { - @doc("Get the specified role management policy for a resource scope") + /** + * Get the specified role management policy for a resource scope + */ get is ArmResourceRead; - @doc("Update a role management policy") + /** + * Update a role management policy + */ + @parameterVisibility("read") update is ArmCustomPatchSync; - @doc("Gets role management policies for a resource scope.") + /** + * Gets role management policies for a resource scope. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RoleManagementPolicies_ListForScope") listForScope is ArmResourceListByParent; } + +@@projectedName(RoleManagementPolicies.update::parameters.properties, + "json", + "parameters" +); +@@extension(RoleManagementPolicies.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(RoleManagementPolicies.update::parameters.properties, + "Parameters for the role management policy." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp index 614aa7d9ce..e7771c656c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.Authorization; -@doc("Role management policy") +/** + * Role management policy + */ model RoleManagementPolicyAssignment is ExtensionResource { - @doc("The name of format {guid_guid} the role management policy assignment to get.") + /** + * The name of format {guid_guid} the role management policy assignment to get. + */ @path @key("roleManagementPolicyAssignmentName") @segment("roleManagementPolicyAssignments") @@ -23,12 +27,32 @@ model RoleManagementPolicyAssignment @armResourceOperations interface RoleManagementPolicyAssignments { - @doc("Get the specified role management policy assignment for a resource scope") + /** + * Get the specified role management policy assignment for a resource scope + */ get is ArmResourceRead; - @doc("Create a role management policy assignment") + /** + * Create a role management policy assignment + */ create is ArmResourceCreateOrReplaceSync; - @doc("Gets role management assignment policies for a resource scope.") + /** + * Gets role management assignment policies for a resource scope. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RoleManagementPolicyAssignments_ListForScope") listForScope is ArmResourceListByParent; } + +@@projectedName(RoleManagementPolicyAssignments.create::parameters.resource, + "json", + "parameters" +); +@@extension(RoleManagementPolicyAssignments.create::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(RoleManagementPolicyAssignments.create::parameters.resource, + "Parameters for the role management policy assignment." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResource.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_Create_Role_Assignment_For_Resource.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResource.json rename to packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_Create_Role_Assignment_For_Resource.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_Create_Role_Assignment_For_Resource_Group.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResourceGroup.json rename to packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_Create_Role_Assignment_For_Resource_Group.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_Create_Role_Assignment_For_Subscription.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForSubscription.json rename to packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_Create_Role_Assignment_For_Subscription.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchPartialRoleManagementPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_Patch_Partial_Role_Management_Policy.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchPartialRoleManagementPolicy.json rename to packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_Patch_Partial_Role_Management_Policy.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchRoleManagementPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_Patch_Role_Management_Policy.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchRoleManagementPolicy.json rename to packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_Patch_Role_Management_Policy.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp index 02da08350a..6c72b9d04e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp @@ -23,6 +23,9 @@ using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; +/** + * Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure Active Directory users. + */ @armProviderNamespace @service({ title: "AuthorizationManagementClient", @@ -30,23 +33,30 @@ using TypeSpec.Versioning; @versioned(Versions) // FIXME: Common type version v2 is not supported for now. // @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v2) -@doc("Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure Active Directory users.") namespace Azure.ResourceManager.Authorization; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { + /** + * The 2015-07-01 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2015-07-01 API version.") v2015_07_01: "2015-07-01", + /** + * The 2022-04-01 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2022-04-01 API version.") v2022_04_01: "2022-04-01", + /** + * The 2020-10-01 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2020-10-01 API version.") v2020_10_01: "2020-10-01", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp index 8c5e9ec9a6..47053a7b71 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp @@ -12,7 +12,9 @@ namespace Azure.ResourceManager.Authorization; interface Operations extends Azure.ResourceManager.Operations {} -@doc("The principal type of the assigned principal ID.") +/** + * The principal type of the assigned principal ID. + */ enum PrincipalType { User, Group, @@ -21,26 +23,34 @@ enum PrincipalType { Device, } -@doc("The role type.") +/** + * The role type. + */ enum RoleType { BuiltInRole, CustomRole, } -@doc("Assignment type of the role assignment schedule") +/** + * Assignment type of the role assignment schedule + */ enum AssignmentType { Activated, Assigned, } -@doc("Membership type of the role assignment schedule") +/** + * Membership type of the role assignment schedule + */ enum RoleManagementScheduleMemberType { Inherited, Direct, Group, } -@doc("The status of the role assignment schedule.") +/** + * The status of the role assignment schedule. + */ enum RoleManagementScheduleStatus { Accepted, PendingEvaluation, @@ -66,14 +76,18 @@ enum RoleManagementScheduleStatus { PendingExternalProvisioning, } -@doc("Type of the scope.") +/** + * Type of the scope. + */ enum ScopeType { subscription, managementgroup, resourcegroup, } -@doc("The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc") +/** + * The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc + */ enum RoleManagementScheduleRequestType { AdminAssign, AdminRemove, @@ -86,14 +100,18 @@ enum RoleManagementScheduleRequestType { SelfRenew, } -@doc("Type of the role assignment schedule expiration") +/** + * Type of the role assignment schedule expiration + */ enum RoleManagementScheduleExpirationType { AfterDuration, AfterDateTime, NoExpiration, } -@doc("The type of rule") +/** + * The type of rule + */ enum RoleManagementPolicyRuleType { RoleManagementPolicyApprovalRule, RoleManagementPolicyAuthenticationContextRule, @@ -102,13 +120,17 @@ enum RoleManagementPolicyRuleType { RoleManagementPolicyNotificationRule, } -@doc("The assignment level to which rule is applied.") +/** + * The assignment level to which rule is applied. + */ enum RoleManagementAssignmentLevel { Assignment, Eligibility, } -@doc("The type of rule") +/** + * The type of rule + */ enum ApprovalMode { SingleStage, Serial, @@ -116,1155 +138,1855 @@ enum ApprovalMode { NoApproval, } -@doc("The type of user.") +/** + * The type of user. + */ enum UserType { User, Group, } -@doc("The type of enablement rule") +/** + * The type of enablement rule + */ enum EnablementRules { MultiFactorAuthentication, Justification, Ticketing, } -@doc("The type of notification.") +/** + * The type of notification. + */ enum NotificationDeliveryMechanism { Email, } -@doc("The notification level.") +/** + * The notification level. + */ enum NotificationLevel { None, Critical, All, } -@doc("The recipient type.") +/** + * The recipient type. + */ enum RecipientType { Requestor, Approver, Admin, } -@doc("ClassicAdministrator list result information.") +/** + * ClassicAdministrator list result information. + */ model ClassicAdministratorListResult is Azure.Core.Page; -@doc("Classic Administrators") +/** + * Classic Administrators + */ model ClassicAdministrator { - @doc("The ID of the administrator.") + /** + * The ID of the administrator. + */ id?: string; - @doc("The name of the administrator.") + /** + * The name of the administrator. + */ name?: string; - @doc("The type of the administrator.") + /** + * The type of the administrator. + */ type?: string; - @doc("Properties for the classic administrator.") + /** + * Properties for the classic administrator. + */ properties?: ClassicAdministratorProperties; } -@doc("Classic Administrator properties.") +/** + * Classic Administrator properties. + */ model ClassicAdministratorProperties { - @doc("The email address of the administrator.") + /** + * The email address of the administrator. + */ emailAddress?: string; - @doc("The role of the administrator.") + /** + * The role of the administrator. + */ role?: string; } -@doc("Deny assignment properties.") +/** + * Deny assignment properties. + */ model DenyAssignmentProperties { - @doc("The display name of the deny assignment.") + /** + * The display name of the deny assignment. + */ denyAssignmentName?: string; - @doc("The description of the deny assignment.") + /** + * The description of the deny assignment. + */ description?: string; - @doc("An array of permissions that are denied by the deny assignment.") + /** + * An array of permissions that are denied by the deny assignment. + */ permissions?: DenyAssignmentPermission[]; - @doc("The deny assignment scope.") + /** + * The deny assignment scope. + */ scope?: string; - @doc("Determines if the deny assignment applies to child scopes. Default value is false.") + /** + * Determines if the deny assignment applies to child scopes. Default value is false. + */ doNotApplyToChildScopes?: boolean; - @doc("Array of principals to which the deny assignment applies.") + /** + * Array of principals to which the deny assignment applies. + */ principals?: Principal[]; - @doc("Array of principals to which the deny assignment does not apply.") + /** + * Array of principals to which the deny assignment does not apply. + */ excludePrincipals?: Principal[]; - @doc("Specifies whether this deny assignment was created by Azure and cannot be edited or deleted.") + /** + * Specifies whether this deny assignment was created by Azure and cannot be edited or deleted. + */ isSystemProtected?: boolean; } -@doc("Deny assignment permissions.") +/** + * Deny assignment permissions. + */ model DenyAssignmentPermission { - @doc("Actions to which the deny assignment does not grant access.") + /** + * Actions to which the deny assignment does not grant access. + */ actions?: string[]; - @doc("Actions to exclude from that the deny assignment does not grant access.") + /** + * Actions to exclude from that the deny assignment does not grant access. + */ notActions?: string[]; - @doc("Data actions to which the deny assignment does not grant access.") + /** + * Data actions to which the deny assignment does not grant access. + */ dataActions?: string[]; - @doc("Data actions to exclude from that the deny assignment does not grant access.") + /** + * Data actions to exclude from that the deny assignment does not grant access. + */ notDataActions?: string[]; - @doc("The conditions on the Deny assignment permission. This limits the resources it applies to.") + /** + * The conditions on the Deny assignment permission. This limits the resources it applies to. + */ condition?: string; - @doc("Version of the condition.") + /** + * Version of the condition. + */ conditionVersion?: string; } -@doc("The name of the entity last modified it") +/** + * The name of the entity last modified it + */ model Principal { - @doc("The id of the principal made changes") + /** + * The id of the principal made changes + */ id?: string; - @doc("The name of the principal made changes") + /** + * The name of the principal made changes + */ displayName?: string; - @doc("Type of the principal.") + /** + * Type of the principal. + */ @projectedName("json", "type") principalType?: PrincipalType; - @doc("Email of principal") + /** + * Email of principal + */ email?: string; } -@doc("Resource Type") +/** + * Resource Type + */ model AuthorizationProviderResourceType { - @doc("The resource type name.") + /** + * The resource type name. + */ name?: string; - @doc("The resource type display name.") + /** + * The resource type display name. + */ displayName?: string; - @doc("The resource type operations.") + /** + * The resource type operations. + */ operations?: ProviderOperation[]; } -@doc("Operation") +/** + * Operation + */ model ProviderOperation { - @doc("The operation name.") + /** + * The operation name. + */ name?: string; - @doc("The operation display name.") + /** + * The operation display name. + */ displayName?: string; - @doc("The operation description.") + /** + * The operation description. + */ description?: string; - @doc("The operation origin.") + /** + * The operation origin. + */ origin?: string; - @doc("The operation properties.") + /** + * The operation properties. + */ properties?: Record; - @doc("The dataAction flag to specify the operation type.") + /** + * The dataAction flag to specify the operation type. + */ isDataAction?: boolean; } -@doc("Role assignment properties.") +/** + * Role assignment properties. + */ model RoleAssignmentProperties { - @doc("The role assignment scope.") + /** + * The role assignment scope. + */ @visibility("read") scope?: string; - @doc("The role definition ID.") + /** + * The role definition ID. + */ roleDefinitionId: string; - @doc("The principal ID.") + /** + * The principal ID. + */ principalId: string; - @doc("The principal type of the assigned principal ID.") + /** + * The principal type of the assigned principal ID. + */ principalType?: PrincipalType; - @doc("Description of role assignment") + /** + * Description of role assignment + */ description?: string; - @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + /** + * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container' + */ condition?: string; - @doc("Version of the condition. Currently the only accepted value is '2.0'") + /** + * Version of the condition. Currently the only accepted value is '2.0' + */ conditionVersion?: string; - @doc("Time it was created") + /** + * Time it was created + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdOn?: utcDateTime; - @doc("Time it was updated") + /** + * Time it was updated + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. updatedOn?: utcDateTime; - @doc("Id of the user who created the assignment") + /** + * Id of the user who created the assignment + */ @visibility("read") createdBy?: string; - @doc("Id of the user who updated the assignment") + /** + * Id of the user who updated the assignment + */ @visibility("read") updatedBy?: string; - @doc("Id of the delegated managed identity resource") + /** + * Id of the delegated managed identity resource + */ delegatedManagedIdentityResourceId?: string; } -@doc("Role assignment create parameters.") +/** + * Role assignment create parameters. + */ model RoleAssignmentCreateParameters { - @doc("Role assignment properties.") + /** + * Role assignment properties. + */ properties: RoleAssignmentProperties; } -@doc("Permissions information.") +/** + * Permissions information. + */ model PermissionGetResult is Azure.Core.Page; -@doc("Role definition permissions.") +/** + * Role definition permissions. + */ model Permission { - @doc("Allowed actions.") + /** + * Allowed actions. + */ actions?: string[]; - @doc("Denied actions.") + /** + * Denied actions. + */ notActions?: string[]; - @doc("Allowed Data actions.") + /** + * Allowed Data actions. + */ dataActions?: string[]; - @doc("Denied Data actions.") + /** + * Denied Data actions. + */ notDataActions?: string[]; } -@doc("Role definition properties.") +/** + * Role definition properties. + */ model RoleDefinitionProperties { - @doc("The role name.") + /** + * The role name. + */ roleName?: string; - @doc("The role definition description.") + /** + * The role definition description. + */ description?: string; - @doc("The role type.") + /** + * The role type. + */ @projectedName("json", "type") roleType?: RoleType; - @doc("Role definition permissions.") + /** + * Role definition permissions. + */ permissions?: Permission[]; - @doc("Role definition assignable scopes.") + /** + * Role definition assignable scopes. + */ assignableScopes?: string[]; } -@doc("Eligible child resources list operation result.") +/** + * Eligible child resources list operation result. + */ model EligibleChildResourcesListResult is Azure.Core.Page; -@doc("Eligible child resource") +/** + * Eligible child resource + */ model EligibleChildResource { - @doc("The resource scope Id.") + /** + * The resource scope Id. + */ @visibility("read") id?: string; - @doc("The resource name.") + /** + * The resource name. + */ @visibility("read") name?: string; - @doc("The resource type.") + /** + * The resource type. + */ @visibility("read") type?: string; } -@doc("An error response from the service.") +/** + * An error response from the service. + */ @error model CloudError { - @doc("An error response from the service.") + /** + * An error response from the service. + */ error?: CloudErrorBody; } -@doc("An error response from the service.") +/** + * An error response from the service. + */ model CloudErrorBody { - @doc("An identifier for the error. Codes are invariant and are intended to be consumed programmatically.") + /** + * An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + */ code?: string; - @doc("A message describing the error, intended to be suitable for display in a user interface.") + /** + * A message describing the error, intended to be suitable for display in a user interface. + */ message?: string; } -@doc("Role assignment schedule properties with scope.") +/** + * Role assignment schedule properties with scope. + */ model RoleAssignmentScheduleProperties { - @doc("The role assignment schedule scope.") + /** + * The role assignment schedule scope. + */ scope?: string; - @doc("The role definition ID.") + /** + * The role definition ID. + */ roleDefinitionId?: string; - @doc("The principal ID.") + /** + * The principal ID. + */ principalId?: string; - @doc("The principal type of the assigned principal ID.") + /** + * The principal type of the assigned principal ID. + */ principalType?: PrincipalType; - @doc("The id of roleAssignmentScheduleRequest used to create this roleAssignmentSchedule") + /** + * The id of roleAssignmentScheduleRequest used to create this roleAssignmentSchedule + */ roleAssignmentScheduleRequestId?: string; - @doc("The id of roleEligibilitySchedule used to activated this roleAssignmentSchedule") + /** + * The id of roleEligibilitySchedule used to activated this roleAssignmentSchedule + */ linkedRoleEligibilityScheduleId?: string; - @doc("Assignment type of the role assignment schedule") + /** + * Assignment type of the role assignment schedule + */ assignmentType?: AssignmentType; - @doc("Membership type of the role assignment schedule") + /** + * Membership type of the role assignment schedule + */ memberType?: RoleManagementScheduleMemberType; - @doc("The status of the role assignment schedule.") + /** + * The status of the role assignment schedule. + */ status?: RoleManagementScheduleStatus; - @doc("Start DateTime when role assignment schedule") + /** + * Start DateTime when role assignment schedule + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startDateTime?: utcDateTime; - @doc("End DateTime when role assignment schedule") + /** + * End DateTime when role assignment schedule + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endDateTime?: utcDateTime; - @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + /** + * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container' + */ condition?: string; - @doc("Version of the condition. Currently accepted value is '2.0'") + /** + * Version of the condition. Currently accepted value is '2.0' + */ conditionVersion?: string; - @doc("DateTime when role assignment schedule was created") + /** + * DateTime when role assignment schedule was created + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdOn?: utcDateTime; - @doc("DateTime when role assignment schedule was modified") + /** + * DateTime when role assignment schedule was modified + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. updatedOn?: utcDateTime; - @doc("Additional properties of principal, scope and role definition") + /** + * Additional properties of principal, scope and role definition + */ expandedProperties?: ExpandedProperties; } model ExpandedProperties { - @doc("Details of the resource scope") + /** + * Details of the resource scope + */ scope?: ExpandedPropertiesScope; - @doc("Details of role definition") + /** + * Details of role definition + */ roleDefinition?: ExpandedPropertiesRoleDefinition; - @doc("Details of the principal") + /** + * Details of the principal + */ principal?: ExpandedPropertiesPrincipal; } -@doc("Details of the resource scope") +/** + * Details of the resource scope + */ model ExpandedPropertiesScope { - @doc("Scope id of the resource") + /** + * Scope id of the resource + */ @projectedName("json", "id") scopeId?: string; - @doc("Display name of the resource") + /** + * Display name of the resource + */ @projectedName("json", "displayName") scopeDisplayName?: string; - @doc("Type of the scope.") + /** + * Type of the scope. + */ @projectedName("json", "type") scopeType?: ScopeType; } -@doc("Details of role definition") +/** + * Details of role definition + */ model ExpandedPropertiesRoleDefinition { - @doc("Id of the role definition") + /** + * Id of the role definition + */ @projectedName("json", "id") roleDefinitionId?: string; - @doc("Display name of the role definition") + /** + * Display name of the role definition + */ @projectedName("json", "displayName") roleDefinitionDisplayName?: string; - @doc("The role type.") + /** + * The role type. + */ @projectedName("json", "type") roleType?: RoleType; } -@doc("Details of the principal") +/** + * Details of the principal + */ model ExpandedPropertiesPrincipal { - @doc("Id of the principal") + /** + * Id of the principal + */ @projectedName("json", "id") principalId?: string; - @doc("Display name of the principal") + /** + * Display name of the principal + */ @projectedName("json", "displayName") principalDisplayName?: string; - @doc("Email id of the principal") + /** + * Email id of the principal + */ email?: string; - @doc("Type of the principal.") + /** + * Type of the principal. + */ @projectedName("json", "type") principalType?: PrincipalType; } -@doc("Role assignment schedule properties with scope.") +/** + * Role assignment schedule properties with scope. + */ model RoleAssignmentScheduleInstanceProperties { - @doc("The role assignment schedule scope.") + /** + * The role assignment schedule scope. + */ scope?: string; - @doc("The role definition ID.") + /** + * The role definition ID. + */ roleDefinitionId?: string; - @doc("The principal ID.") + /** + * The principal ID. + */ principalId?: string; - @doc("The principal type of the assigned principal ID.") + /** + * The principal type of the assigned principal ID. + */ principalType?: PrincipalType; - @doc("Id of the master role assignment schedule") + /** + * Id of the master role assignment schedule + */ roleAssignmentScheduleId?: string; - @doc("Role Assignment Id in external system") + /** + * Role Assignment Id in external system + */ originRoleAssignmentId?: string; - @doc("The status of the role assignment schedule instance.") + /** + * The status of the role assignment schedule instance. + */ status?: RoleManagementScheduleStatus; - @doc("The startDateTime of the role assignment schedule instance") + /** + * The startDateTime of the role assignment schedule instance + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startDateTime?: utcDateTime; - @doc("The endDateTime of the role assignment schedule instance") + /** + * The endDateTime of the role assignment schedule instance + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endDateTime?: utcDateTime; - @doc("roleEligibilityScheduleId used to activate") + /** + * roleEligibilityScheduleId used to activate + */ linkedRoleEligibilityScheduleId?: string; - @doc("roleEligibilityScheduleInstanceId linked to this roleAssignmentScheduleInstance") + /** + * roleEligibilityScheduleInstanceId linked to this roleAssignmentScheduleInstance + */ linkedRoleEligibilityScheduleInstanceId?: string; - @doc("Assignment type of the role assignment schedule") + /** + * Assignment type of the role assignment schedule + */ assignmentType?: AssignmentType; - @doc("Membership type of the role assignment schedule") + /** + * Membership type of the role assignment schedule + */ memberType?: RoleManagementScheduleMemberType; - @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + /** + * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container' + */ condition?: string; - @doc("Version of the condition. Currently accepted value is '2.0'") + /** + * Version of the condition. Currently accepted value is '2.0' + */ conditionVersion?: string; - @doc("DateTime when role assignment schedule was created") + /** + * DateTime when role assignment schedule was created + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdOn?: utcDateTime; - @doc("Additional properties of principal, scope and role definition") + /** + * Additional properties of principal, scope and role definition + */ expandedProperties?: ExpandedProperties; } -@doc("Role assignment schedule request properties with scope.") +/** + * Role assignment schedule request properties with scope. + */ model RoleAssignmentScheduleRequestProperties { - @doc("The role assignment schedule request scope.") + /** + * The role assignment schedule request scope. + */ @visibility("read") scope?: string; - @doc("The role definition ID.") + /** + * The role definition ID. + */ roleDefinitionId: string; - @doc("The principal ID.") + /** + * The principal ID. + */ principalId: string; - @doc("The principal type of the assigned principal ID.") + /** + * The principal type of the assigned principal ID. + */ @visibility("read") principalType?: PrincipalType; - @doc("The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc") + /** + * The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc + */ requestType: RoleManagementScheduleRequestType; - @doc("The status of the role assignment schedule request.") + /** + * The status of the role assignment schedule request. + */ @visibility("read") status?: RoleManagementScheduleStatus; - @doc("The approvalId of the role assignment schedule request.") + /** + * The approvalId of the role assignment schedule request. + */ @visibility("read") approvalId?: string; - @doc("The resultant role assignment schedule id or the role assignment schedule id being updated") + /** + * The resultant role assignment schedule id or the role assignment schedule id being updated + */ targetRoleAssignmentScheduleId?: string; - @doc("The role assignment schedule instance id being updated") + /** + * The role assignment schedule instance id being updated + */ targetRoleAssignmentScheduleInstanceId?: string; - @doc("Schedule info of the role assignment schedule") + /** + * Schedule info of the role assignment schedule + */ scheduleInfo?: RoleAssignmentScheduleRequestPropertiesScheduleInfo; - @doc("The linked role eligibility schedule id - to activate an eligibility.") + /** + * The linked role eligibility schedule id - to activate an eligibility. + */ linkedRoleEligibilityScheduleId?: string; - @doc("Justification for the role assignment") + /** + * Justification for the role assignment + */ justification?: string; - @doc("Ticket Info of the role assignment") + /** + * Ticket Info of the role assignment + */ ticketInfo?: RoleAssignmentScheduleRequestPropertiesTicketInfo; - @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + /** + * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container' + */ condition?: string; - @doc("Version of the condition. Currently accepted value is '2.0'") + /** + * Version of the condition. Currently accepted value is '2.0' + */ conditionVersion?: string; - @doc("DateTime when role assignment schedule request was created") + /** + * DateTime when role assignment schedule request was created + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdOn?: utcDateTime; - @doc("Id of the user who created this request") + /** + * Id of the user who created this request + */ @visibility("read") requestorId?: string; - @doc("Additional properties of principal, scope and role definition") + /** + * Additional properties of principal, scope and role definition + */ @visibility("read") expandedProperties?: ExpandedProperties; } -@doc("Schedule info of the role assignment schedule") +/** + * Schedule info of the role assignment schedule + */ model RoleAssignmentScheduleRequestPropertiesScheduleInfo { - @doc("Start DateTime of the role assignment schedule.") + /** + * Start DateTime of the role assignment schedule. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startDateTime?: utcDateTime; - @doc("Expiration of the role assignment schedule") + /** + * Expiration of the role assignment schedule + */ expiration?: RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration; } -@doc("Expiration of the role assignment schedule") +/** + * Expiration of the role assignment schedule + */ model RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration { - @doc("Type of the role assignment schedule expiration") + /** + * Type of the role assignment schedule expiration + */ @projectedName("json", "type") expirationType?: RoleManagementScheduleExpirationType; - @doc("End DateTime of the role assignment schedule.") + /** + * End DateTime of the role assignment schedule. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endDateTime?: utcDateTime; - @doc("Duration of the role assignment schedule in TimeSpan.") + /** + * Duration of the role assignment schedule in TimeSpan. + */ duration?: duration; } -@doc("Ticket Info of the role assignment") +/** + * Ticket Info of the role assignment + */ model RoleAssignmentScheduleRequestPropertiesTicketInfo { - @doc("Ticket number for the role assignment") + /** + * Ticket number for the role assignment + */ ticketNumber?: string; - @doc("Ticket system name for the role assignment") + /** + * Ticket system name for the role assignment + */ ticketSystem?: string; } -@doc("Role eligibility schedule properties with scope.") +/** + * Role eligibility schedule properties with scope. + */ model RoleEligibilityScheduleProperties { - @doc("The role eligibility schedule scope.") + /** + * The role eligibility schedule scope. + */ scope?: string; - @doc("The role definition ID.") + /** + * The role definition ID. + */ roleDefinitionId?: string; - @doc("The principal ID.") + /** + * The principal ID. + */ principalId?: string; - @doc("The principal type of the assigned principal ID.") + /** + * The principal type of the assigned principal ID. + */ principalType?: PrincipalType; - @doc("The id of roleEligibilityScheduleRequest used to create this roleAssignmentSchedule") + /** + * The id of roleEligibilityScheduleRequest used to create this roleAssignmentSchedule + */ roleEligibilityScheduleRequestId?: string; - @doc("Membership type of the role eligibility schedule") + /** + * Membership type of the role eligibility schedule + */ memberType?: RoleManagementScheduleMemberType; - @doc("The status of the role eligibility schedule.") + /** + * The status of the role eligibility schedule. + */ status?: RoleManagementScheduleStatus; - @doc("Start DateTime when role eligibility schedule") + /** + * Start DateTime when role eligibility schedule + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startDateTime?: utcDateTime; - @doc("End DateTime when role eligibility schedule") + /** + * End DateTime when role eligibility schedule + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endDateTime?: utcDateTime; - @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + /** + * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container' + */ condition?: string; - @doc("Version of the condition. Currently accepted value is '2.0'") + /** + * Version of the condition. Currently accepted value is '2.0' + */ conditionVersion?: string; - @doc("DateTime when role eligibility schedule was created") + /** + * DateTime when role eligibility schedule was created + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdOn?: utcDateTime; - @doc("DateTime when role eligibility schedule was modified") + /** + * DateTime when role eligibility schedule was modified + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. updatedOn?: utcDateTime; - @doc("Additional properties of principal, scope and role definition") + /** + * Additional properties of principal, scope and role definition + */ expandedProperties?: ExpandedProperties; } -@doc("Role eligibility schedule properties with scope.") +/** + * Role eligibility schedule properties with scope. + */ model RoleEligibilityScheduleInstanceProperties { - @doc("The role eligibility schedule scope.") + /** + * The role eligibility schedule scope. + */ scope?: string; - @doc("The role definition ID.") + /** + * The role definition ID. + */ roleDefinitionId?: string; - @doc("The principal ID.") + /** + * The principal ID. + */ principalId?: string; - @doc("The principal type of the assigned principal ID.") + /** + * The principal type of the assigned principal ID. + */ principalType?: PrincipalType; - @doc("Id of the master role eligibility schedule") + /** + * Id of the master role eligibility schedule + */ roleEligibilityScheduleId?: string; - @doc("The status of the role eligibility schedule instance") + /** + * The status of the role eligibility schedule instance + */ status?: RoleManagementScheduleStatus; - @doc("The startDateTime of the role eligibility schedule instance") + /** + * The startDateTime of the role eligibility schedule instance + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startDateTime?: utcDateTime; - @doc("The endDateTime of the role eligibility schedule instance") + /** + * The endDateTime of the role eligibility schedule instance + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endDateTime?: utcDateTime; - @doc("Membership type of the role eligibility schedule") + /** + * Membership type of the role eligibility schedule + */ memberType?: RoleManagementScheduleMemberType; - @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + /** + * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container' + */ condition?: string; - @doc("Version of the condition. Currently accepted value is '2.0'") + /** + * Version of the condition. Currently accepted value is '2.0' + */ conditionVersion?: string; - @doc("DateTime when role eligibility schedule was created") + /** + * DateTime when role eligibility schedule was created + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdOn?: utcDateTime; - @doc("Additional properties of principal, scope and role definition") + /** + * Additional properties of principal, scope and role definition + */ expandedProperties?: ExpandedProperties; } -@doc("Role eligibility schedule request properties with scope.") +/** + * Role eligibility schedule request properties with scope. + */ model RoleEligibilityScheduleRequestProperties { - @doc("The role eligibility schedule request scope.") + /** + * The role eligibility schedule request scope. + */ @visibility("read") scope?: string; - @doc("The role definition ID.") + /** + * The role definition ID. + */ roleDefinitionId: string; - @doc("The principal ID.") + /** + * The principal ID. + */ principalId: string; - @doc("The principal type of the assigned principal ID.") + /** + * The principal type of the assigned principal ID. + */ @visibility("read") principalType?: PrincipalType; - @doc("The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc") + /** + * The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc + */ requestType: RoleManagementScheduleRequestType; - @doc("The status of the role eligibility schedule request.") + /** + * The status of the role eligibility schedule request. + */ @visibility("read") status?: RoleManagementScheduleStatus; - @doc("The approvalId of the role eligibility schedule request.") + /** + * The approvalId of the role eligibility schedule request. + */ @visibility("read") approvalId?: string; - @doc("Schedule info of the role eligibility schedule") + /** + * Schedule info of the role eligibility schedule + */ scheduleInfo?: RoleEligibilityScheduleRequestPropertiesScheduleInfo; - @doc("The resultant role eligibility schedule id or the role eligibility schedule id being updated") + /** + * The resultant role eligibility schedule id or the role eligibility schedule id being updated + */ targetRoleEligibilityScheduleId?: string; - @doc("The role eligibility schedule instance id being updated") + /** + * The role eligibility schedule instance id being updated + */ targetRoleEligibilityScheduleInstanceId?: string; - @doc("Justification for the role eligibility") + /** + * Justification for the role eligibility + */ justification?: string; - @doc("Ticket Info of the role eligibility") + /** + * Ticket Info of the role eligibility + */ ticketInfo?: RoleEligibilityScheduleRequestPropertiesTicketInfo; - @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + /** + * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container' + */ condition?: string; - @doc("Version of the condition. Currently accepted value is '2.0'") + /** + * Version of the condition. Currently accepted value is '2.0' + */ conditionVersion?: string; - @doc("DateTime when role eligibility schedule request was created") + /** + * DateTime when role eligibility schedule request was created + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdOn?: utcDateTime; - @doc("Id of the user who created this request") + /** + * Id of the user who created this request + */ @visibility("read") requestorId?: string; - @doc("Additional properties of principal, scope and role definition") + /** + * Additional properties of principal, scope and role definition + */ @visibility("read") expandedProperties?: ExpandedProperties; } -@doc("Schedule info of the role eligibility schedule") +/** + * Schedule info of the role eligibility schedule + */ model RoleEligibilityScheduleRequestPropertiesScheduleInfo { - @doc("Start DateTime of the role eligibility schedule.") + /** + * Start DateTime of the role eligibility schedule. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startDateTime?: utcDateTime; - @doc("Expiration of the role eligibility schedule") + /** + * Expiration of the role eligibility schedule + */ expiration?: RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration; } -@doc("Expiration of the role eligibility schedule") +/** + * Expiration of the role eligibility schedule + */ model RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration { - @doc("Type of the role eligibility schedule expiration") + /** + * Type of the role eligibility schedule expiration + */ @projectedName("json", "type") expirationType?: RoleManagementScheduleExpirationType; - @doc("End DateTime of the role eligibility schedule.") + /** + * End DateTime of the role eligibility schedule. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endDateTime?: utcDateTime; - @doc("Duration of the role eligibility schedule in TimeSpan.") + /** + * Duration of the role eligibility schedule in TimeSpan. + */ duration?: duration; } -@doc("Ticket Info of the role eligibility") +/** + * Ticket Info of the role eligibility + */ model RoleEligibilityScheduleRequestPropertiesTicketInfo { - @doc("Ticket number for the role eligibility") + /** + * Ticket number for the role eligibility + */ ticketNumber?: string; - @doc("Ticket system name for the role eligibility") + /** + * Ticket system name for the role eligibility + */ ticketSystem?: string; } -@doc("Role management policy properties with scope.") +/** + * Role management policy properties with scope. + */ model RoleManagementPolicyProperties { - @doc("The role management policy scope.") + /** + * The role management policy scope. + */ scope?: string; - @doc("The role management policy display name.") + /** + * The role management policy display name. + */ displayName?: string; - @doc("The role management policy description.") + /** + * The role management policy description. + */ description?: string; - @doc("The role management policy is default policy.") + /** + * The role management policy is default policy. + */ isOrganizationDefault?: boolean; - @doc("The name of the entity last modified it") + /** + * The name of the entity last modified it + */ @visibility("read") lastModifiedBy?: Principal; - @doc("The last modified date time.") + /** + * The last modified date time. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedDateTime?: utcDateTime; - @doc("The rule applied to the policy.") + /** + * The rule applied to the policy. + */ rules?: RoleManagementPolicyRule[]; - @doc("The readonly computed rule applied to the policy.") + /** + * The readonly computed rule applied to the policy. + */ @visibility("read") effectiveRules?: RoleManagementPolicyRule[]; - @doc("Additional properties of scope") + /** + * Additional properties of scope + */ @visibility("read") policyProperties?: PolicyProperties; } -@doc("The role management policy rule.") +/** + * The role management policy rule. + */ @discriminator("ruleType") model RoleManagementPolicyRule { - @doc("The id of the rule.") + /** + * The id of the rule. + */ id?: string; - @doc("The target of the current rule.") + /** + * The target of the current rule. + */ target?: RoleManagementPolicyRuleTarget; } -@doc("The role management policy rule target.") +/** + * The role management policy rule target. + */ model RoleManagementPolicyRuleTarget { - @doc("The caller of the setting.") + /** + * The caller of the setting. + */ caller?: string; - @doc("The type of operation.") + /** + * The type of operation. + */ operations?: string[]; - @doc("The assignment level to which rule is applied.") + /** + * The assignment level to which rule is applied. + */ level?: RoleManagementAssignmentLevel; - @doc("The list of target objects.") + /** + * The list of target objects. + */ targetObjects?: string[]; - @doc("The list of inheritable settings.") + /** + * The list of inheritable settings. + */ inheritableSettings?: string[]; - @doc("The list of enforced settings.") + /** + * The list of enforced settings. + */ enforcedSettings?: string[]; } -@doc("Expanded info of resource scope") +/** + * Expanded info of resource scope + */ model PolicyProperties { - @doc("Details of the resource scope") + /** + * Details of the resource scope + */ @visibility("read") scope?: PolicyPropertiesScope; } -@doc("Details of the resource scope") +/** + * Details of the resource scope + */ model PolicyPropertiesScope { - @doc("Scope id of the resource") + /** + * Scope id of the resource + */ @projectedName("json", "id") scopeId?: string; - @doc("Display name of the resource") + /** + * Display name of the resource + */ @projectedName("json", "displayName") scopeDisplayName?: string; - @doc("Type of the scope.") + /** + * Type of the scope. + */ @projectedName("json", "type") scopeType?: ScopeType; } -@doc("Role management policy assignment properties with scope.") +/** + * Role management policy assignment properties with scope. + */ model RoleManagementPolicyAssignmentProperties { - @doc("The role management policy scope.") + /** + * The role management policy scope. + */ scope?: string; - @doc("The role definition of management policy assignment.") + /** + * The role definition of management policy assignment. + */ roleDefinitionId?: string; - @doc("The policy id role management policy assignment.") + /** + * The policy id role management policy assignment. + */ policyId?: string; - @doc("The readonly computed rule applied to the policy.") + /** + * The readonly computed rule applied to the policy. + */ @visibility("read") effectiveRules?: RoleManagementPolicyRule[]; - @doc("Additional properties of scope, role definition and policy") + /** + * Additional properties of scope, role definition and policy + */ @visibility("read") policyAssignmentProperties?: PolicyAssignmentProperties; } -@doc("Expanded info of resource scope, role definition and policy") +/** + * Expanded info of resource scope, role definition and policy + */ model PolicyAssignmentProperties { - @doc("Details of the resource scope") + /** + * Details of the resource scope + */ scope?: PolicyAssignmentPropertiesScope; - @doc("Details of role definition") + /** + * Details of role definition + */ roleDefinition?: PolicyAssignmentPropertiesRoleDefinition; - @doc("Details of the policy") + /** + * Details of the policy + */ policy?: PolicyAssignmentPropertiesPolicy; } -@doc("Details of the resource scope") +/** + * Details of the resource scope + */ model PolicyAssignmentPropertiesScope { - @doc("Scope id of the resource") + /** + * Scope id of the resource + */ @projectedName("json", "id") scopeId?: string; - @doc("Display name of the resource") + /** + * Display name of the resource + */ @projectedName("json", "displayName") scopeDisplayName?: string; - @doc("Type of the scope.") + /** + * Type of the scope. + */ @projectedName("json", "type") scopeType?: ScopeType; } -@doc("Details of role definition") +/** + * Details of role definition + */ model PolicyAssignmentPropertiesRoleDefinition { - @doc("Id of the role definition") + /** + * Id of the role definition + */ @projectedName("json", "id") roleDefinitionId?: string; - @doc("Display name of the role definition") + /** + * Display name of the role definition + */ @projectedName("json", "displayName") roleDefinitionDisplayName?: string; - @doc("The role type.") + /** + * The role type. + */ @projectedName("json", "type") roleType?: RoleType; } -@doc("Details of the policy") +/** + * Details of the policy + */ model PolicyAssignmentPropertiesPolicy { - @doc("Id of the policy") + /** + * Id of the policy + */ @projectedName("json", "id") policyId?: string; - @doc("The name of the entity last modified it") + /** + * The name of the entity last modified it + */ @visibility("read") lastModifiedBy?: Principal; - @doc("The last modified date time.") + /** + * The last modified date time. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedDateTime?: utcDateTime; } -@doc("Deny Assignments filter") +/** + * Deny Assignments filter + */ model DenyAssignmentFilter { - @doc("Return deny assignment with specified name.") + /** + * Return deny assignment with specified name. + */ denyAssignmentName?: string; - @doc("Return all deny assignments where the specified principal is listed in the principals list of deny assignments.") + /** + * Return all deny assignments where the specified principal is listed in the principals list of deny assignments. + */ principalId?: string; - @doc("Return all deny assignments where the specified principal is listed either in the principals list or exclude principals list of deny assignments.") + /** + * Return all deny assignments where the specified principal is listed either in the principals list or exclude principals list of deny assignments. + */ gdprExportPrincipalId?: string; } -@doc("Failed validation result details") +/** + * Failed validation result details + */ model ValidationResponseErrorInfo { - @doc("Error code indicating why validation failed") + /** + * Error code indicating why validation failed + */ @visibility("read") code?: string; - @doc("Message indicating why validation failed") + /** + * Message indicating why validation failed + */ @visibility("read") message?: string; } -@doc("Validation response") +/** + * Validation response + */ model ValidationResponse { - @doc("Whether or not validation succeeded") + /** + * Whether or not validation succeeded + */ @visibility("read") isValid?: boolean; - @doc("Failed validation result details") + /** + * Failed validation result details + */ errorInfo?: ValidationResponseErrorInfo; } -@doc("Role Assignments filter") +/** + * Role Assignments filter + */ model RoleAssignmentFilter { - @doc("Returns role assignment of the specific principal.") + /** + * Returns role assignment of the specific principal. + */ principalId?: string; } -@doc("Role Definitions filter") +/** + * Role Definitions filter + */ model RoleDefinitionFilter { - @doc("Returns role definition with the specific name.") + /** + * Returns role definition with the specific name. + */ roleName?: string; - @doc("Returns role definition with the specific type.") + /** + * Returns role definition with the specific type. + */ type?: string; } -@doc("The role management policy approval rule.") +/** + * The role management policy approval rule. + */ model RoleManagementPolicyApprovalRule extends RoleManagementPolicyRule { - @doc("The approval setting") + /** + * The approval setting + */ setting?: ApprovalSettings; - @doc("The type of rule") + /** + * The type of rule + */ ruleType: "RoleManagementPolicyApprovalRule"; } -@doc("The approval settings.") +/** + * The approval settings. + */ model ApprovalSettings { - @doc("Determines whether approval is required or not.") + /** + * Determines whether approval is required or not. + */ isApprovalRequired?: boolean; - @doc("Determines whether approval is required for assignment extension.") + /** + * Determines whether approval is required for assignment extension. + */ isApprovalRequiredForExtension?: boolean; - @doc("Determine whether requestor justification is required.") + /** + * Determine whether requestor justification is required. + */ isRequestorJustificationRequired?: boolean; - @doc("The type of rule") + /** + * The type of rule + */ approvalMode?: ApprovalMode; - @doc("The approval stages of the request.") + /** + * The approval stages of the request. + */ approvalStages?: ApprovalStage[]; } -@doc("The approval stage.") +/** + * The approval stage. + */ model ApprovalStage { - @doc("The time in days when approval request would be timed out") + /** + * The time in days when approval request would be timed out + */ approvalStageTimeOutInDays?: int32; - @doc("Determines whether approver need to provide justification for his decision.") + /** + * Determines whether approver need to provide justification for his decision. + */ isApproverJustificationRequired?: boolean; - @doc("The time in minutes when the approval request would be escalated if the primary approver does not approve") + /** + * The time in minutes when the approval request would be escalated if the primary approver does not approve + */ escalationTimeInMinutes?: int32; - @doc("The primary approver of the request.") + /** + * The primary approver of the request. + */ primaryApprovers?: UserSet[]; - @doc("The value determine whether escalation feature is enabled.") + /** + * The value determine whether escalation feature is enabled. + */ isEscalationEnabled?: boolean; - @doc("The escalation approver of the request.") + /** + * The escalation approver of the request. + */ escalationApprovers?: UserSet[]; } -@doc("The detail of a user.") +/** + * The detail of a user. + */ model UserSet { - @doc("The type of user.") + /** + * The type of user. + */ userType?: UserType; - @doc("The value indicating whether the user is a backup fallback approver") + /** + * The value indicating whether the user is a backup fallback approver + */ isBackup?: boolean; - @doc("The object id of the user.") + /** + * The object id of the user. + */ id?: string; - @doc("The description of the user.") + /** + * The description of the user. + */ description?: string; } -@doc("The role management policy authentication context rule.") +/** + * The role management policy authentication context rule. + */ model RoleManagementPolicyAuthenticationContextRule extends RoleManagementPolicyRule { - @doc("The value indicating if rule is enabled.") + /** + * The value indicating if rule is enabled. + */ isEnabled?: boolean; - @doc("The claim value.") + /** + * The claim value. + */ claimValue?: string; - @doc("The type of rule") + /** + * The type of rule + */ ruleType: "RoleManagementPolicyAuthenticationContextRule"; } -@doc("The role management policy enablement rule.") +/** + * The role management policy enablement rule. + */ model RoleManagementPolicyEnablementRule extends RoleManagementPolicyRule { - @doc("The list of enabled rules.") + /** + * The list of enabled rules. + */ enabledRules?: EnablementRules[]; - @doc("The type of rule") + /** + * The type of rule + */ ruleType: "RoleManagementPolicyEnablementRule"; } -@doc("The role management policy expiration rule.") +/** + * The role management policy expiration rule. + */ model RoleManagementPolicyExpirationRule extends RoleManagementPolicyRule { - @doc("The value indicating whether expiration is required.") + /** + * The value indicating whether expiration is required. + */ isExpirationRequired?: boolean; - @doc("The maximum duration of expiration in timespan.") + /** + * The maximum duration of expiration in timespan. + */ maximumDuration?: duration; - @doc("The type of rule") + /** + * The type of rule + */ ruleType: "RoleManagementPolicyExpirationRule"; } -@doc("The role management policy notification rule.") +/** + * The role management policy notification rule. + */ model RoleManagementPolicyNotificationRule extends RoleManagementPolicyRule { - @doc("The type of notification.") + /** + * The type of notification. + */ notificationType?: NotificationDeliveryMechanism; - @doc("The notification level.") + /** + * The notification level. + */ notificationLevel?: NotificationLevel; - @doc("The recipient type.") + /** + * The recipient type. + */ recipientType?: RecipientType; - @doc("The list of notification recipients.") + /** + * The list of notification recipients. + */ notificationRecipients?: string[]; - @doc("Determines if the notification will be sent to the recipient type specified in the policy rule.") + /** + * Determines if the notification will be sent to the recipient type specified in the policy rule. + */ isDefaultRecipientsEnabled?: boolean; - @doc("The type of rule") + /** + * The type of rule + */ ruleType: "RoleManagementPolicyNotificationRule"; } -@doc("Role assignment schedule filter") +/** + * Role assignment schedule filter + */ model RoleAssignmentScheduleFilter { - @doc("Returns role assignment schedule of the specific principal.") + /** + * Returns role assignment schedule of the specific principal. + */ principalId?: string; - @doc("Returns role assignment schedule of the specific role definition.") + /** + * Returns role assignment schedule of the specific role definition. + */ roleDefinitionId?: string; - @doc("Returns role assignment schedule instances of the specific status.") + /** + * Returns role assignment schedule instances of the specific status. + */ status?: string; } -@doc("Role assignment schedule instance filter") +/** + * Role assignment schedule instance filter + */ model RoleAssignmentScheduleInstanceFilter { - @doc("Returns role assignment schedule instances of the specific principal.") + /** + * Returns role assignment schedule instances of the specific principal. + */ principalId?: string; - @doc("Returns role assignment schedule instances of the specific role definition.") + /** + * Returns role assignment schedule instances of the specific role definition. + */ roleDefinitionId?: string; - @doc("Returns role assignment schedule instances of the specific status.") + /** + * Returns role assignment schedule instances of the specific status. + */ status?: string; - @doc("Returns role assignment schedule instances belonging to a specific role assignment schedule.") + /** + * Returns role assignment schedule instances belonging to a specific role assignment schedule. + */ roleAssignmentScheduleId?: string; } -@doc("Role assignment schedule request filter") +/** + * Role assignment schedule request filter + */ model RoleAssignmentScheduleRequestFilter { - @doc("Returns role assignment requests of the specific principal.") + /** + * Returns role assignment requests of the specific principal. + */ principalId?: string; - @doc("Returns role assignment requests of the specific role definition.") + /** + * Returns role assignment requests of the specific role definition. + */ roleDefinitionId?: string; - @doc("Returns role assignment requests created by specific principal.") + /** + * Returns role assignment requests created by specific principal. + */ requestorId?: string; - @doc("Returns role assignment requests of specific status.") + /** + * Returns role assignment requests of specific status. + */ status?: string; } -@doc("Role eligibility schedule filter") +/** + * Role eligibility schedule filter + */ model RoleEligibilityScheduleFilter { - @doc("Returns role eligibility schedule of the specific principal.") + /** + * Returns role eligibility schedule of the specific principal. + */ principalId?: string; - @doc("Returns role eligibility schedule of the specific role definition.") + /** + * Returns role eligibility schedule of the specific role definition. + */ roleDefinitionId?: string; - @doc("Returns role eligibility schedule of the specific status.") + /** + * Returns role eligibility schedule of the specific status. + */ status?: string; } -@doc("Role eligibility schedule instance filter") +/** + * Role eligibility schedule instance filter + */ model RoleEligibilityScheduleInstanceFilter { - @doc("Returns role eligibility schedule instances of the specific principal.") + /** + * Returns role eligibility schedule instances of the specific principal. + */ principalId?: string; - @doc("Returns role eligibility schedule instances of the specific role definition.") + /** + * Returns role eligibility schedule instances of the specific role definition. + */ roleDefinitionId?: string; - @doc("Returns role eligibility schedule instances of the specific status.") + /** + * Returns role eligibility schedule instances of the specific status. + */ status?: string; - @doc("Returns role eligibility schedule instances belonging to a specific role eligibility schedule.") + /** + * Returns role eligibility schedule instances belonging to a specific role eligibility schedule. + */ roleEligibilityScheduleId?: string; } -@doc("Role eligibility schedule request filter") +/** + * Role eligibility schedule request filter + */ model RoleEligibilityScheduleRequestFilter { - @doc("Returns role eligibility requests of the specific principal.") + /** + * Returns role eligibility requests of the specific principal. + */ principalId?: string; - @doc("Returns role eligibility requests of the specific role definition.") + /** + * Returns role eligibility requests of the specific role definition. + */ roleDefinitionId?: string; - @doc("Returns role eligibility requests created by specific principal.") + /** + * Returns role eligibility requests created by specific principal. + */ requestorId?: string; - @doc("Returns role eligibility requests of specific status.") + /** + * Returns role eligibility requests of specific status. + */ status?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp index c62bc2b413..5d5d0bcf20 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp @@ -10,12 +10,16 @@ using Azure.ResourceManager; namespace Azure.ResourceManager.Authorization; interface ClassicAdministratorsOperations { - @doc("Gets service administrator, account administrator, and co-administrators for the subscription.") + /** + * Gets service administrator, account administrator, and co-administrators for the subscription. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/classicAdministrators") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; @@ -25,25 +29,33 @@ interface ClassicAdministratorsOperations { } interface GlobalAdministratorOperations { - @doc("Elevates access for a Global Administrator.") + /** + * Elevates access for a Global Administrator. + */ @route("/providers/Microsoft.Authorization/elevateAccess") @post - ElevateAccess is Azure.Core.Foundations.Operation<{}, void>; + elevateAccess is Azure.Core.Foundations.Operation<{}, void>; } interface AzurePermissionsForResourceGroupOperations { - @doc("Gets all permissions the caller has for a resource group.") + /** + * Gets all permissions the caller has for a resource group. + */ @route("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/permissions") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; @@ -53,34 +65,48 @@ interface AzurePermissionsForResourceGroupOperations { } interface AzurePermissionsForResourceOperations { - @doc("Gets all permissions the caller has for a resource.") + /** + * Gets all permissions the caller has for a resource. + */ @route("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/permissions") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("The namespace of the resource provider.") + /** + * The namespace of the resource provider. + */ @path resourceProviderNamespace: string; - @doc("The parent resource identity.") + /** + * The parent resource identity. + */ @path parentResourcePath: string; - @doc("The resource type of the resource.") + /** + * The resource type of the resource. + */ @path resourceType: string; - @doc("The name of the resource to get the permissions for.") + /** + * The name of the resource to get the permissions for. + */ @path resourceName: string; - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; @@ -90,16 +116,22 @@ interface AzurePermissionsForResourceOperations { } interface EligibleChildResourcesOperations { - @doc("Get the child resources of a resource on which user has eligible access") + /** + * Get the child resources of a resource on which user has eligible access + */ @route("/{scope}/providers/Microsoft.Authorization/eligibleChildResources") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The scope of the role management policy.") + /** + * The scope of the role management policy. + */ @path scope: string; - @doc("The filter to apply on the operation. Use $filter=resourceType+eq+'Subscription' to filter on only resource of type = 'Subscription'. Use $filter=resourceType+eq+'subscription'+or+resourceType+eq+'resourcegroup' to filter on resource of type = 'Subscription' or 'ResourceGroup'") + /** + * The filter to apply on the operation. Use $filter=resourceType+eq+'Subscription' to filter on only resource of type = 'Subscription'. Use $filter=resourceType+eq+'subscription'+or+resourceType+eq+'resourcegroup' to filter on resource of type = 'Subscription' or 'ResourceGroup' + */ @query("$filter") $filter?: string; }, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml index 691f3c1b0c..2faa332586 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml @@ -2,6 +2,7 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp index 62b77c46e7..81e3a525ba 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.IntegrationSpaces; -@doc("An integration application under space.") +/** + * An integration application under space. + */ @parentResource(Space) model Application is TrackedResource { - @doc("The name of the Application") + /** + * The name of the Application + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path @key("applicationName") @@ -25,55 +29,82 @@ model Application is TrackedResource { @armResourceOperations interface Applications { - @doc("Get a Application") + /** + * Get a Application + */ get is ArmResourceRead; - @doc("Create a Application") + /** + * Create a Application + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Update a Application") + /** + * Update a Application + */ + @parameterVisibility("read") patch is ArmCustomPatchSync; - @doc("Delete a Application") + /** + * Delete a Application + */ delete is ArmResourceDeleteSync; - @doc("List Application resources by Space") + /** + * List Application resources by Space + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Applications_ListBySpace") listBySpace is ArmResourceListByParent< Application, { ...BaseParameters; - @doc("The number of result items to return.") + /** + * The number of result items to return. + */ @query("top") top?: int32; - @doc("The number of result items to skip.") + /** + * The number of result items to skip. + */ @query("skip") skip?: int32; - @doc("The maximum number of result items per page.") + /** + * The maximum number of result items per page. + */ @query("maxpagesize") maxpagesize?: int32; - @doc("Filter the result list using the given expression.") + /** + * Filter the result list using the given expression. + */ @query("filter") filter?: string; - @doc("Select the specified fields to be included in the response.") + /** + * Select the specified fields to be included in the response. + */ @query({ name: "select", format: "multi", }) select?: string[]; - @doc("Expand the indicated resources into the response.") + /** + * Expand the indicated resources into the response. + */ @query({ name: "expand", format: "multi", }) expand?: string[]; - @doc("Expressions that specify the order of returned results.") + /** + * Expressions that specify the order of returned results. + */ @query({ name: "orderby", format: "multi", @@ -82,35 +113,45 @@ interface Applications { } >; - @doc("The delete business process development artifact action.") + /** + * The delete business process development artifact action. + */ deleteBusinessProcessDevelopmentArtifact is ArmResourceActionSync< Application, GetOrDeleteBusinessProcessDevelopmentArtifactRequest, void >; - @doc("The get business process development artifact action.") + /** + * The get business process development artifact action. + */ getBusinessProcessDevelopmentArtifact is ArmResourceActionSync< Application, GetOrDeleteBusinessProcessDevelopmentArtifactRequest, SaveOrGetBusinessProcessDevelopmentArtifactResponse >; - @doc("The list business process development artifacts action.") + /** + * The list business process development artifacts action. + */ listBusinessProcessDevelopmentArtifacts is ArmResourceActionSync< Application, void, ListBusinessProcessDevelopmentArtifactsResponse >; - @doc("The save business process development artifact action.") + /** + * The save business process development artifact action. + */ saveBusinessProcessDevelopmentArtifact is ArmResourceActionSync< Application, SaveOrValidateBusinessProcessDevelopmentArtifactRequest, SaveOrGetBusinessProcessDevelopmentArtifactResponse >; - @doc("The validate business process development artifact action.") + /** + * The validate business process development artifact action. + */ validateBusinessProcessDevelopmentArtifact is ArmResourceActionSync< Application, SaveOrValidateBusinessProcessDevelopmentArtifactRequest, diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp index aa6e302b82..e20a4a888b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.IntegrationSpaces; -@doc("A business process under application.") +/** + * A business process under application. + */ @parentResource(Application) model BusinessProcess is ProxyResource { - @doc("The name of the business process") + /** + * The name of the business process + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path @key("businessProcessName") @@ -25,55 +29,82 @@ model BusinessProcess is ProxyResource { @armResourceOperations interface BusinessProcesses { - @doc("Get a BusinessProcess") + /** + * Get a BusinessProcess + */ get is ArmResourceRead; - @doc("Create a BusinessProcess") + /** + * Create a BusinessProcess + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Update a BusinessProcess") + /** + * Update a BusinessProcess + */ + @parameterVisibility("read") patch is ArmCustomPatchSync; - @doc("Delete a BusinessProcess") + /** + * Delete a BusinessProcess + */ delete is ArmResourceDeleteSync; - @doc("List BusinessProcess resources by Application") + /** + * List BusinessProcess resources by Application + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BusinessProcesses_ListByApplication") listByApplication is ArmResourceListByParent< BusinessProcess, { ...BaseParameters; - @doc("The number of result items to return.") + /** + * The number of result items to return. + */ @query("top") top?: int32; - @doc("The number of result items to skip.") + /** + * The number of result items to skip. + */ @query("skip") skip?: int32; - @doc("The maximum number of result items per page.") + /** + * The maximum number of result items per page. + */ @query("maxpagesize") maxpagesize?: int32; - @doc("Filter the result list using the given expression.") + /** + * Filter the result list using the given expression. + */ @query("filter") filter?: string; - @doc("Select the specified fields to be included in the response.") + /** + * Select the specified fields to be included in the response. + */ @query({ name: "select", format: "multi", }) select?: string[]; - @doc("Expand the indicated resources into the response.") + /** + * Expand the indicated resources into the response. + */ @query({ name: "expand", format: "multi", }) expand?: string[]; - @doc("Expressions that specify the order of returned results.") + /** + * Expressions that specify the order of returned results. + */ @query({ name: "orderby", format: "multi", diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp index 3320b7f04a..a25bbd3e5f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.IntegrationSpaces; -@doc("A business process version.") +/** + * A business process version. + */ @parentResource(BusinessProcess) model BusinessProcessVersion is ProxyResource { - @doc("The version of the business process") + /** + * The version of the business process + */ @path @key("businessProcessVersion") @segment("versions") @@ -24,46 +28,66 @@ model BusinessProcessVersion is ProxyResource { @armResourceOperations interface BusinessProcessVersions { - @doc("Get a BusinessProcessVersion") + /** + * Get a BusinessProcessVersion + */ get is ArmResourceRead; - @doc("List BusinessProcessVersion resources by BusinessProcess") + /** + * List BusinessProcessVersion resources by BusinessProcess + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BusinessProcessVersions_ListByBusinessProcess") listByBusinessProcess is ArmResourceListByParent< BusinessProcessVersion, { ...BaseParameters; - @doc("The number of result items to return.") + /** + * The number of result items to return. + */ @query("top") top?: int32; - @doc("The number of result items to skip.") + /** + * The number of result items to skip. + */ @query("skip") skip?: int32; - @doc("The maximum number of result items per page.") + /** + * The maximum number of result items per page. + */ @query("maxpagesize") maxpagesize?: int32; - @doc("Filter the result list using the given expression.") + /** + * Filter the result list using the given expression. + */ @query("filter") filter?: string; - @doc("Select the specified fields to be included in the response.") + /** + * Select the specified fields to be included in the response. + */ @query({ name: "select", format: "multi", }) select?: string[]; - @doc("Expand the indicated resources into the response.") + /** + * Expand the indicated resources into the response. + */ @query({ name: "expand", format: "multi", }) expand?: string[]; - @doc("Expressions that specify the order of returned results.") + /** + * Expressions that specify the order of returned results. + */ @query({ name: "orderby", format: "multi", diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp index aff8a3d809..5bf23772d1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.IntegrationSpaces; -@doc("An infrastructure resource under Space.") +/** + * An infrastructure resource under Space. + */ @parentResource(Space) model InfrastructureResource is ProxyResource { - @doc("The name of the infrastructure resource in the space.") + /** + * The name of the infrastructure resource in the space. + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path @key("infrastructureResourceName") @@ -26,58 +30,85 @@ model InfrastructureResource @armResourceOperations interface InfrastructureResources { - @doc("Get a InfrastructureResource") + /** + * Get a InfrastructureResource + */ get is ArmResourceRead; - @doc("Create a InfrastructureResource") + /** + * Create a InfrastructureResource + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Update a InfrastructureResource") + /** + * Update a InfrastructureResource + */ + @parameterVisibility("read") patch is ArmCustomPatchSync< InfrastructureResource, InfrastructureResourceUpdate >; - @doc("Delete a InfrastructureResource") + /** + * Delete a InfrastructureResource + */ delete is ArmResourceDeleteSync; - @doc("List InfrastructureResource resources by Space") + /** + * List InfrastructureResource resources by Space + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("InfrastructureResources_ListBySpace") listBySpace is ArmResourceListByParent< InfrastructureResource, { ...BaseParameters; - @doc("The number of result items to return.") + /** + * The number of result items to return. + */ @query("top") top?: int32; - @doc("The number of result items to skip.") + /** + * The number of result items to skip. + */ @query("skip") skip?: int32; - @doc("The maximum number of result items per page.") + /** + * The maximum number of result items per page. + */ @query("maxpagesize") maxpagesize?: int32; - @doc("Filter the result list using the given expression.") + /** + * Filter the result list using the given expression. + */ @query("filter") filter?: string; - @doc("Select the specified fields to be included in the response.") + /** + * Select the specified fields to be included in the response. + */ @query({ name: "select", format: "multi", }) select?: string[]; - @doc("Expand the indicated resources into the response.") + /** + * Expand the indicated resources into the response. + */ @query({ name: "expand", format: "multi", }) expand?: string[]; - @doc("Expressions that specify the order of returned results.") + /** + * Expressions that specify the order of returned results. + */ @query({ name: "orderby", format: "multi", diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp index a18dead222..584980654e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp @@ -11,9 +11,13 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.IntegrationSpaces; -@doc("An integration space.") +/** + * An integration space. + */ model Space is TrackedResource { - @doc("The name of the space") + /** + * The name of the space + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path @key("spaceName") @@ -23,55 +27,82 @@ model Space is TrackedResource { @armResourceOperations interface Spaces { - @doc("Get a Space") + /** + * Get a Space + */ get is ArmResourceRead; - @doc("Create a Space") + /** + * Create a Space + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Update a Space") + /** + * Update a Space + */ + @parameterVisibility("read") patch is ArmCustomPatchSync; - @doc("Delete a Space") + /** + * Delete a Space + */ delete is ArmResourceDeleteSync; - @doc("List Space resources by resource group") + /** + * List Space resources by resource group + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Spaces_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent< Space, { ...BaseParameters; - @doc("The number of result items to return.") + /** + * The number of result items to return. + */ @query("top") top?: int32; - @doc("The number of result items to skip.") + /** + * The number of result items to skip. + */ @query("skip") skip?: int32; - @doc("The maximum number of result items per page.") + /** + * The maximum number of result items per page. + */ @query("maxpagesize") maxpagesize?: int32; - @doc("Filter the result list using the given expression.") + /** + * Filter the result list using the given expression. + */ @query("filter") filter?: string; - @doc("Select the specified fields to be included in the response.") + /** + * Select the specified fields to be included in the response. + */ @query({ name: "select", format: "multi", }) select?: string[]; - @doc("Expand the indicated resources into the response.") + /** + * Expand the indicated resources into the response. + */ @query({ name: "expand", format: "multi", }) expand?: string[]; - @doc("Expressions that specify the order of returned results.") + /** + * Expressions that specify the order of returned results. + */ @query({ name: "orderby", format: "multi", @@ -80,6 +111,8 @@ interface Spaces { } >; - @doc("List Space resources by subscription ID") + /** + * List Space resources by subscription ID + */ listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp index 427fd6b8b4..58d44b714d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp @@ -16,19 +16,25 @@ using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; +/** + * The azure integration spaces resource provider. + */ @armProviderNamespace @service({ title: "Azure Integration Spaces resource management API.", }) @versioned(Versions) @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) -@doc("The azure integration spaces resource provider.") namespace Microsoft.IntegrationSpaces; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { + /** + * The 2023-11-14-preview API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2023-11-14-preview API version.") v2023_11_14_preview: "2023-11-14-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp index 51b5b1d320..6988e8f80f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp @@ -12,402 +12,634 @@ namespace Microsoft.IntegrationSpaces; interface Operations extends Azure.ResourceManager.Operations {} -@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") -enum Origin { - user, - system, - `user,system`, -} +/** + * The status of the current operation. + */ +enum ProvisioningState { + /** + * Resource has been created. + */ + Succeeded, -@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") -enum ActionType { - Internal, -} + /** + * Resource creation failed. + */ + Failed, + + /** + * Resource creation was canceled. + */ + Canceled, -@doc("The status of the current operation.") -enum ProvisioningState { - @doc("Resource has been created.") Succeeded, - @doc("Resource creation failed.") Failed, - @doc("Resource creation was canceled.") Canceled, Provisioning, Updating, Deleting, Accepted, } -@doc("The type of identity that created the resource.") -enum CreatedByType { - User, - Application, - ManagedIdentity, - Key, -} - -@doc("The properties of space.") +/** + * The properties of space. + */ model SpaceResourceProperties { - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; - @doc("The description of the resource.") + /** + * The description of the resource. + */ description?: string; } -@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + */ model Resource { - @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + */ @visibility("read") id?: string; - @doc("The name of the resource") + /** + * The name of the resource + */ @visibility("read") name?: string; - @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + */ @visibility("read") type?: string; - @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ @visibility("read") systemData?: SystemData; } -@doc("The type used for update operations of the Space.") +/** + * The type used for update operations of the Space. + */ model SpaceUpdate { - @doc("Resource tags.") + /** + * Resource tags. + */ tags?: Record; - @doc("The updatable properties of the Space.") + /** + * The updatable properties of the Space. + */ properties?: SpaceUpdateProperties; } -@doc("The updatable properties of the Space.") +/** + * The updatable properties of the Space. + */ model SpaceUpdateProperties { - @doc("The description of the resource.") + /** + * The description of the resource. + */ description?: string; } -@doc("The properties of application.") +/** + * The properties of application. + */ model ApplicationProperties { - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; - @doc("The description of the resource.") + /** + * The description of the resource. + */ description?: string; - @doc("The tracking data stores.") + /** + * The tracking data stores. + */ trackingDataStores: Record; } -@doc("The properties of tracking data store.") +/** + * The properties of tracking data store. + */ model TrackingDataStore { - @doc("The database name.") + /** + * The database name. + */ databaseName: string; - @doc("The data store resource id.") + /** + * The data store resource id. + */ dataStoreResourceId: string; - @doc("The data store URI.") + /** + * The data store URI. + */ dataStoreUri: string; - @doc("The data store ingestion URI.") + /** + * The data store ingestion URI. + */ dataStoreIngestionUri: string; } -@doc("The type used for update operations of the Application.") +/** + * The type used for update operations of the Application. + */ model ApplicationUpdate { - @doc("Resource tags.") + /** + * Resource tags. + */ tags?: Record; - @doc("The updatable properties of the Application.") + /** + * The updatable properties of the Application. + */ properties?: ApplicationUpdateProperties; } -@doc("The updatable properties of the Application.") +/** + * The updatable properties of the Application. + */ model ApplicationUpdateProperties { - @doc("The description of the resource.") + /** + * The description of the resource. + */ description?: string; - @doc("The tracking data stores.") + /** + * The tracking data stores. + */ trackingDataStores?: Record; } -@doc("The properties of business process.") +/** + * The properties of business process. + */ model BusinessProcessProperties { - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; - @doc("The version of the business process.") + /** + * The version of the business process. + */ @visibility("read") version?: string; - @doc("The description of the business process.") + /** + * The description of the business process. + */ description?: string; - @doc("The table name of the business process.") + /** + * The table name of the business process. + */ tableName?: string; - @doc("The tracking data store reference name.") + /** + * The tracking data store reference name. + */ trackingDataStoreReferenceName?: string; - @doc("The business process identifier.") + /** + * The business process identifier. + */ identifier?: BusinessProcessIdentifier; - @doc("The business process stages.") + /** + * The business process stages. + */ businessProcessStages?: Record; - @doc("The business process mapping.") + /** + * The business process mapping. + */ businessProcessMapping?: Record; } -@doc("The properties of business process identifier.") +/** + * The properties of business process identifier. + */ model BusinessProcessIdentifier { - @doc("The property name of the business process identifier.") + /** + * The property name of the business process identifier. + */ propertyName?: string; - @doc("The property type of the business process identifier.") + /** + * The property type of the business process identifier. + */ propertyType?: string; } -@doc("The properties of business process stage.") +/** + * The properties of business process stage. + */ model BusinessProcessStage { - @doc("The description of the business stage.") + /** + * The description of the business stage. + */ description?: string; - @doc("The properties within the properties of the business process stage.") + /** + * The properties within the properties of the business process stage. + */ properties?: Record; - @doc("The property to keep track of stages before current in the business process stage.") + /** + * The property to keep track of stages before current in the business process stage. + */ stagesBefore?: string[]; } -@doc("The properties of business process mapping.") +/** + * The properties of business process mapping. + */ model BusinessProcessMappingItem { - @doc("The logic app resource id.") + /** + * The logic app resource id. + */ logicAppResourceId?: string; - @doc("The workflow name within the logic app.") + /** + * The workflow name within the logic app. + */ workflowName?: string; - @doc("The operation name.") + /** + * The operation name. + */ operationName?: string; - @doc("The mapping item operation type of the business process.") + /** + * The mapping item operation type of the business process. + */ operationType?: string; } -@doc("The type used for update operations of the BusinessProcess.") +/** + * The type used for update operations of the BusinessProcess. + */ model BusinessProcessUpdate { - @doc("The updatable properties of the BusinessProcess.") + /** + * The updatable properties of the BusinessProcess. + */ properties?: BusinessProcessUpdateProperties; } -@doc("The updatable properties of the BusinessProcess.") +/** + * The updatable properties of the BusinessProcess. + */ model BusinessProcessUpdateProperties { - @doc("The description of the business process.") + /** + * The description of the business process. + */ description?: string; - @doc("The table name of the business process.") + /** + * The table name of the business process. + */ tableName?: string; - @doc("The tracking data store reference name.") + /** + * The tracking data store reference name. + */ trackingDataStoreReferenceName?: string; - @doc("The business process identifier.") + /** + * The business process identifier. + */ identifier?: BusinessProcessIdentifier; - @doc("The business process stages.") + /** + * The business process stages. + */ businessProcessStages?: Record; - @doc("The business process mapping.") + /** + * The business process mapping. + */ businessProcessMapping?: Record; } -@doc("The business process development artifact get or delete request.") +/** + * The business process development artifact get or delete request. + */ model GetOrDeleteBusinessProcessDevelopmentArtifactRequest { - @doc("The name of the business process development artifact.") + /** + * The name of the business process development artifact. + */ name: string; } -@doc("The business process development artifact save or get response.") +/** + * The business process development artifact save or get response. + */ model SaveOrGetBusinessProcessDevelopmentArtifactResponse { - @doc("The name of the business process development artifact.") + /** + * The name of the business process development artifact. + */ name: string; - @doc("The system data of the business process development artifact.") + /** + * The system data of the business process development artifact. + */ systemData?: BusinessProcessDevelopmentArtifactSystemData; - @doc("The properties of the business process development artifact.") + /** + * The properties of the business process development artifact. + */ properties?: BusinessProcessDevelopmentArtifactProperties; } -@doc("The system data for business process development artifact.") +/** + * The system data for business process development artifact. + */ model BusinessProcessDevelopmentArtifactSystemData { - @doc("The timestamp of last modification (UTC).") + /** + * The timestamp of last modification (UTC). + */ lastModifiedAt?: string; } -@doc("The properties of business process development artifact.") +/** + * The properties of business process development artifact. + */ model BusinessProcessDevelopmentArtifactProperties { - @doc("The description of the business process.") + /** + * The description of the business process. + */ description?: string; - @doc("The business process identifier.") + /** + * The business process identifier. + */ identifier?: BusinessProcessIdentifier; - @doc("The business process stages.") + /** + * The business process stages. + */ businessProcessStages?: Record; - @doc("The business process mapping.") + /** + * The business process mapping. + */ businessProcessMapping?: Record; - @doc("The tracking profile for the business process.") + /** + * The tracking profile for the business process. + */ trackingProfiles?: Record; } -@doc("The tracking profile for the business process") +/** + * The tracking profile for the business process + */ model TrackingProfileDefinition { - @doc("The tracking definition schema uri.") + /** + * The tracking definition schema uri. + */ @projectedName("json", "$schema") schema?: string; - @doc("The business process reference.") + /** + * The business process reference. + */ businessProcess?: BusinessProcessReference; - @doc("The tracking definitions.") + /** + * The tracking definitions. + */ trackingDefinitions?: Record; } -@doc("The business process reference.") +/** + * The business process reference. + */ model BusinessProcessReference { - @doc("The business process name.") + /** + * The business process name. + */ name?: string; - @doc("The business process version.") + /** + * The business process version. + */ version?: string; } -@doc("The workflow tracking definition.") +/** + * The workflow tracking definition. + */ model FlowTrackingDefinition { - @doc("The tracking correlation context.") + /** + * The tracking correlation context. + */ correlationContext?: TrackingCorrelationContext; - @doc("The tracking events.") + /** + * The tracking events. + */ events?: Record; } -@doc("The tracking correlation context.") +/** + * The tracking correlation context. + */ model TrackingCorrelationContext { - @doc("The operation type for correlation context.") + /** + * The operation type for correlation context. + */ operationType?: string; - @doc("The operation name for correlation context.") + /** + * The operation name for correlation context. + */ operationName?: string; - @doc("The name of the correlation property.") + /** + * The name of the correlation property. + */ propertyName?: string; - @doc("The template expression for correlation context property value.") + /** + * The template expression for correlation context property value. + */ value?: string; } -@doc("The tracking event definition.") +/** + * The tracking event definition. + */ model TrackingEventDefinition { - @doc("The operation type.") + /** + * The operation type. + */ operationType?: string; - @doc("The operation name.") + /** + * The operation name. + */ operationName?: string; - @doc("The properties to be collected for event.") + /** + * The properties to be collected for event. + */ properties?: Record>; } -@doc("The business process development artifact get collection response.") +/** + * The business process development artifact get collection response. + */ model ListBusinessProcessDevelopmentArtifactsResponse { - @doc("The list of the business process development artifact.") + /** + * The list of the business process development artifact. + */ value: SaveOrGetBusinessProcessDevelopmentArtifactResponse[]; } -@doc("The response of a ApplicationResource list operation.") +/** + * The response of a ApplicationResource list operation. + */ model ApplicationResourceListResult is Azure.Core.Page; -@doc("A resource under application.") +/** + * A resource under application. + */ model ApplicationResource extends ProxyResource { - @doc("The resource-specific properties for this resource.") + /** + * The resource-specific properties for this resource. + */ @visibility("read", "create") properties?: ApplicationResourceProperties; } -@doc("The properties of application resource.") +/** + * The properties of application resource. + */ model ApplicationResourceProperties { - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; - @doc("The type of the application resource.") + /** + * The type of the application resource. + */ resourceType: string; - @doc("The Arm id of the application resource.") + /** + * The Arm id of the application resource. + */ resourceId: string; - @doc("The kind of the application resource.") + /** + * The kind of the application resource. + */ resourceKind?: string; } -@doc("The type used for update operations of the ApplicationResource.") +/** + * The type used for update operations of the ApplicationResource. + */ model ApplicationResourceUpdate { - @doc("The updatable properties of the ApplicationResource.") + /** + * The updatable properties of the ApplicationResource. + */ properties?: ApplicationResourceUpdateProperties; } -@doc("The updatable properties of the ApplicationResource.") +/** + * The updatable properties of the ApplicationResource. + */ model ApplicationResourceUpdateProperties { - @doc("The type of the application resource.") + /** + * The type of the application resource. + */ resourceType?: string; - @doc("The Arm id of the application resource.") + /** + * The Arm id of the application resource. + */ resourceId?: string; - @doc("The kind of the application resource.") + /** + * The kind of the application resource. + */ resourceKind?: string; } -@doc("The business process development artifact save or validate request.") +/** + * The business process development artifact save or validate request. + */ model SaveOrValidateBusinessProcessDevelopmentArtifactRequest { - @doc("The name of the business process development artifact.") + /** + * The name of the business process development artifact. + */ name: string; - @doc("The properties of the business process development artifact.") + /** + * The properties of the business process development artifact. + */ properties?: BusinessProcessDevelopmentArtifactProperties; } -@doc("The properties of infrastructure resource.") +/** + * The properties of infrastructure resource. + */ model InfrastructureResourceProperties { - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; - @doc("The type of the infrastructure resource.") + /** + * The type of the infrastructure resource. + */ resourceType: string; - @doc("The id of the infrastructure resource.") + /** + * The id of the infrastructure resource. + */ resourceId: string; } -@doc("The type used for update operations of the InfrastructureResource.") +/** + * The type used for update operations of the InfrastructureResource. + */ model InfrastructureResourceUpdate { - @doc("The updatable properties of the InfrastructureResource.") + /** + * The updatable properties of the InfrastructureResource. + */ properties?: InfrastructureResourceUpdateProperties; } -@doc("The updatable properties of the InfrastructureResource.") +/** + * The updatable properties of the InfrastructureResource. + */ model InfrastructureResourceUpdateProperties { - @doc("The type of the infrastructure resource.") + /** + * The type of the infrastructure resource. + */ resourceType?: string; - @doc("The id of the infrastructure resource.") + /** + * The id of the infrastructure resource. + */ resourceId?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp index 76059d8f12..57df625f4e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp @@ -10,65 +10,89 @@ using Azure.ResourceManager; namespace Microsoft.IntegrationSpaces; interface ApplicationResourcesOperations { - @doc("List ApplicationResource resources by Application") + /** + * List ApplicationResource resources by Application + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources") @get - ListByApplication is Azure.Core.Foundations.Operation< + listByApplication is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("The number of result items to return.") + /** + * The number of result items to return. + */ @query("top") top?: int32; - @doc("The number of result items to skip.") + /** + * The number of result items to skip. + */ @query("skip") skip?: int32; - @doc("The maximum number of result items per page.") + /** + * The maximum number of result items per page. + */ @query("maxpagesize") maxpagesize?: int32; - @doc("Filter the result list using the given expression.") + /** + * Filter the result list using the given expression. + */ @query("filter") filter?: string; - @doc("Select the specified fields to be included in the response.") + /** + * Select the specified fields to be included in the response. + */ @query({ name: "select", format: "multi", }) select?: string[]; - @doc("Expand the indicated resources into the response.") + /** + * Expand the indicated resources into the response. + */ @query({ name: "expand", format: "multi", }) expand?: string[]; - @doc("Expressions that specify the order of returned results.") + /** + * Expressions that specify the order of returned results. + */ @query({ name: "orderby", format: "multi", }) orderby?: string[]; - @doc("The name of the space") + /** + * The name of the space + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path spaceName: string; - @doc("The name of the Application") + /** + * The name of the Application + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path applicationName: string; @@ -76,33 +100,45 @@ interface ApplicationResourcesOperations { ApplicationResourceListResult >; - @doc("Get a ApplicationResource") + /** + * Get a ApplicationResource + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("The name of the space") + /** + * The name of the space + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path spaceName: string; - @doc("The name of the Application") + /** + * The name of the Application + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path applicationName: string; - @doc("The name of the application resource.") + /** + * The name of the application resource. + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path resourceName: string; @@ -110,109 +146,149 @@ interface ApplicationResourcesOperations { ApplicationResource >; - @doc("Create a ApplicationResource") + /** + * Create a ApplicationResource + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("The name of the space") + /** + * The name of the space + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path spaceName: string; - @doc("The name of the Application") + /** + * The name of the Application + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path applicationName: string; - @doc("The name of the application resource.") + /** + * The name of the application resource. + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path resourceName: string; - @doc("Resource create parameters.") + /** + * Resource create parameters. + */ @body resource: ApplicationResource; }, ApplicationResource >; - @doc("Update a ApplicationResource") + /** + * Update a ApplicationResource + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") @patch - Patch is Azure.Core.Foundations.Operation< + patch is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("The name of the space") + /** + * The name of the space + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path spaceName: string; - @doc("The name of the Application") + /** + * The name of the Application + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path applicationName: string; - @doc("The name of the application resource.") + /** + * The name of the application resource. + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path resourceName: string; - @doc("The resource properties to be updated.") + /** + * The resource properties to be updated. + */ @body properties: ApplicationResourceUpdate; }, ApplicationResource >; - @doc("Delete a ApplicationResource") + /** + * Delete a ApplicationResource + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("The name of the space") + /** + * The name of the space + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path spaceName: string; - @doc("The name of the Application") + /** + * The name of the Application + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path applicationName: string; - @doc("The name of the application resource.") + /** + * The name of the application resource. + */ @pattern("[a-zA-Z0-9_.()-]{0,79}$") @path resourceName: string; diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/tspconfig.yaml index 691f3c1b0c..2faa332586 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/tspconfig.yaml @@ -2,6 +2,7 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp index eced2fa6e6..e4234809ba 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp @@ -11,9 +11,13 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to an availability set at creation time. An existing VM cannot be added to an availability set.") +/** + * Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to an availability set at creation time. An existing VM cannot be added to an availability set. + */ model AvailabilitySet is TrackedResource { - @doc("The name of the availability set.") + /** + * The name of the availability set. + */ @path @key("availabilitySetName") @segment("availabilitySets") @@ -24,42 +28,88 @@ model AvailabilitySet is TrackedResource { @armResourceOperations interface AvailabilitySets { - @doc("Retrieves information about an availability set.") + /** + * Retrieves information about an availability set. + */ get is ArmResourceRead; - @doc("Create or update an availability set.") + /** + * Create or update an availability set. + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Update an availability set.") + /** + * Update an availability set. + */ + @parameterVisibility("read") update is ArmCustomPatchSync; - @doc("Delete an availability set.") + /** + * Delete an availability set. + */ delete is ArmResourceDeleteSync; - @doc("Lists all availability sets in a resource group.") + /** + * Lists all availability sets in a resource group. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("AvailabilitySets_List") list is ArmResourceListByParent; - @doc("Lists all availability sets in a subscription.") + /** + * Lists all availability sets in a subscription. + */ listBySubscription is ArmListBySubscription; - @doc("Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set.") + /** + * Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set. + */ // FIXME: AvailabilitySets_ListAvailableSizes could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes") @get - ListAvailableSizes is Azure.Core.Foundations.Operation< + listAvailableSizes is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the availability set.") + /** + * The name of the availability set. + */ @path availabilitySetName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, VirtualMachineSizeListResult >; } + +@@projectedName(AvailabilitySets.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(AvailabilitySets.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(AvailabilitySets.createOrUpdate::parameters.resource, + "Parameters supplied to the Create Availability Set operation." +); +@@projectedName(AvailabilitySets.update::parameters.properties, + "json", + "parameters" +); +@@extension(AvailabilitySets.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(AvailabilitySets.update::parameters.properties, + "Parameters supplied to the Update Availability Set operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp index 0dc2a99d53..bde32139a6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp @@ -12,16 +12,22 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the capacity reservation.") +/** + * Specifies information about the capacity reservation. + */ @parentResource(CapacityReservationGroup) model CapacityReservation is TrackedResource { - @doc("The name of the capacity reservation.") + /** + * The name of the capacity reservation. + */ @path @key("capacityReservationName") @segment("capacityReservations") name: string; - @doc("Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone.") + /** + * Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone. + */ zones?: string[]; ...Azure.ResourceManager.ResourceSku; @@ -29,27 +35,65 @@ model CapacityReservation is TrackedResource { @armResourceOperations interface CapacityReservations { - @doc("The operation that retrieves information about the capacity reservation.") + /** + * The operation that retrieves information about the capacity reservation. + */ get is ArmResourceRead< CapacityReservation, { ...BaseParameters; - @doc("The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the capacity reservation that is managed by the platform and can change outside of control plane operations.") + /** + * The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the capacity reservation that is managed by the platform and can change outside of control plane operations. + */ @query("$expand") $expand?: CapacityReservationInstanceViewTypes; } >; - @doc("The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("The operation to update a capacity reservation.") + /** + * The operation to update a capacity reservation. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync; - @doc("The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details.") + /** + * The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details. + */ delete is ArmResourceDeleteAsync; - @doc("Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations.") + /** + * Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("CapacityReservations_ListByCapacityReservationGroup") listByCapacityReservationGroup is ArmResourceListByParent; } + +@@projectedName(CapacityReservations.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(CapacityReservations.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(CapacityReservations.createOrUpdate::parameters.resource, + "Parameters supplied to the Create capacity reservation." +); +@@projectedName(CapacityReservations.update::parameters.properties, + "json", + "parameters" +); +@@extension(CapacityReservations.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(CapacityReservations.update::parameters.properties, + "Parameters supplied to the Update capacity reservation operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp index 2aa3d4d6eb..132b561517 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp @@ -11,57 +11,105 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently, a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group.") +/** + * Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently, a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group. + */ model CapacityReservationGroup is TrackedResource { - @doc("The name of the capacity reservation group.") + /** + * The name of the capacity reservation group. + */ @path @key("capacityReservationGroupName") @segment("capacityReservationGroups") name: string; - @doc("Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones.") + /** + * Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones. + */ zones?: string[]; } @armResourceOperations interface CapacityReservationGroups { - @doc("The operation that retrieves information about a capacity reservation group.") + /** + * The operation that retrieves information about a capacity reservation group. + */ get is ArmResourceRead< CapacityReservationGroup, { ...BaseParameters; - @doc("The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime properties of a capacity reservation that is managed by the platform and can change outside of control plane operations.") + /** + * The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime properties of a capacity reservation that is managed by the platform and can change outside of control plane operations. + */ @query("$expand") $expand?: CapacityReservationGroupInstanceViewTypes; } >; - @doc("The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags may be modified. Please refer to https://aka.ms/CapacityReservation for more details.") + /** + * The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags may be modified. Please refer to https://aka.ms/CapacityReservation for more details. + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("The operation to update a capacity reservation group. When updating a capacity reservation group, only tags may be modified.") + /** + * The operation to update a capacity reservation group. When updating a capacity reservation group, only tags may be modified. + */ + @parameterVisibility("read") update is ArmCustomPatchSync< CapacityReservationGroup, CapacityReservationGroupUpdate >; - @doc("The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details.") + /** + * The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. + */ delete is ArmResourceDeleteSync; - @doc("Lists all of the capacity reservation groups in the specified resource group. Use the nextLink property in the response to get the next page of capacity reservation groups.") + /** + * Lists all of the capacity reservation groups in the specified resource group. Use the nextLink property in the response to get the next page of capacity reservation groups. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("CapacityReservationGroups_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent< CapacityReservationGroup, { ...BaseParameters; - @doc("The expand expression to apply on the operation. Based on the expand param(s) specified we return Virtual Machine or ScaleSet VM Instance or both resource Ids which are associated to capacity reservation group in the response.") + /** + * The expand expression to apply on the operation. Based on the expand param(s) specified we return Virtual Machine or ScaleSet VM Instance or both resource Ids which are associated to capacity reservation group in the response. + */ @query("$expand") $expand?: ExpandTypesForGetCapacityReservationGroups; } >; - @doc("Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups.") + /** + * Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups. + */ listBySubscription is ArmListBySubscription; } + +@@projectedName(CapacityReservationGroups.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(CapacityReservationGroups.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(CapacityReservationGroups.createOrUpdate::parameters.resource, + "Parameters supplied to the Create capacity reservation Group." +); +@@projectedName(CapacityReservationGroups.update::parameters.properties, + "json", + "parameters" +); +@@extension(CapacityReservationGroups.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(CapacityReservationGroups.update::parameters.properties, + "Parameters supplied to the Update capacity reservation Group operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp index 758b15991e..8b8d7d05fc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp @@ -11,124 +11,239 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Describes the cloud service.") +/** + * Describes the cloud service. + */ model CloudService is TrackedResource { - @doc("Name of the cloud service.") + /** + * Name of the cloud service. + */ @path @key("cloudServiceName") @segment("cloudServices") name: string; - @doc("List of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned. This field is optional.") + /** + * List of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned. This field is optional. + */ zones?: string[]; } @armResourceOperations interface CloudServices { - @doc("Display information about a cloud service.") + /** + * Display information about a cloud service. + */ get is ArmResourceRead; - @doc("Create or update a cloud service. Please note some properties can be set only during cloud service creation.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Create or update a cloud service. Please note some properties can be set only during cloud service creation. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Update a cloud service.") + /** + * Update a cloud service. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync; - @doc("Deletes a cloud service.") + /** + * Deletes a cloud service. + */ delete is ArmResourceDeleteAsync; - @doc("Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services.") + /** + * Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("CloudServices_List") list is ArmResourceListByParent; - @doc("Gets a list of all cloud services in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services.") + /** + * Gets a list of all cloud services in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services. + */ listAll is ArmListBySubscription; - @doc("Starts the cloud service.") + /** + * Starts the cloud service. + */ start is ArmResourceActionAsync; - @doc("Power off the cloud service. Note that resources are still attached and you are getting charged for the resources.") + /** + * Power off the cloud service. Note that resources are still attached and you are getting charged for the resources. + */ powerOff is ArmResourceActionAsync; - @doc("Restarts one or more role instances in a cloud service.") + /** + * Restarts one or more role instances in a cloud service. + */ restart is ArmResourceActionAsync; - @doc("Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles.") + /** + * Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles. + */ reimage is ArmResourceActionAsync; - @doc("Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instances.") + /** + * Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instances. + */ rebuild is ArmResourceActionAsync; - @doc("Deletes role instances in a cloud service.") + /** + * Deletes role instances in a cloud service. + */ deleteInstances is ArmResourceActionAsync; - @doc("Gets the status of a cloud service.") + /** + * Gets the status of a cloud service. + */ // FIXME: CloudServices_GetInstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/instanceView") @get - GetInstanceView is Azure.Core.Foundations.Operation< + getInstanceView is Azure.Core.Foundations.Operation< { - @doc("Name of the resource group.") + /** + * Name of the resource group. + */ @path resourceGroupName: string; - @doc("Name of the cloud service.") + /** + * Name of the cloud service. + */ @path cloudServiceName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, CloudServiceInstanceView >; + /** + * Gets the specified update domain of a cloud service. Use nextLink property in the response to get the next page of update domains. Do this till nextLink is null to fetch all the update domains. + */ + // FIXME: CloudServicesUpdateDomain_GetUpdateDomain could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("CloudServicesUpdateDomain_GetUpdateDomain") - @doc("Gets the specified update domain of a cloud service. Use nextLink property in the response to get the next page of update domains. Do this till nextLink is null to fetch all the update domains.") - // FIXME: CloudServicesUpdateDomain_GetUpdateDomain could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}") @get - GetUpdateDomain is Azure.Core.Foundations.Operation< + getUpdateDomain is Azure.Core.Foundations.Operation< { - @doc("Name of the resource group.") + /** + * Name of the resource group. + */ @path resourceGroupName: string; - @doc("Name of the cloud service.") + /** + * Name of the cloud service. + */ @path cloudServiceName: string; - @doc("Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on.") + /** + * Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. + */ @path updateDomain: int32; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, UpdateDomain >; + /** + * Gets a list of all update domains in a cloud service. + */ + // FIXME: CloudServicesUpdateDomain_ListUpdateDomains could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("CloudServicesUpdateDomain_ListUpdateDomains") - @doc("Gets a list of all update domains in a cloud service.") - // FIXME: CloudServicesUpdateDomain_ListUpdateDomains could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains") @get - ListUpdateDomains is Azure.Core.Foundations.Operation< + listUpdateDomains is Azure.Core.Foundations.Operation< { - @doc("Name of the resource group.") + /** + * Name of the resource group. + */ @path resourceGroupName: string; - @doc("Name of the cloud service.") + /** + * Name of the cloud service. + */ @path cloudServiceName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, UpdateDomainListResult >; } + +@@projectedName(CloudServices.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(CloudServices.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(CloudServices.createOrUpdate::parameters.resource, + "The cloud service object." +); +@@projectedName(CloudServices.update::parameters.properties, + "json", + "parameters" +); +@@extension(CloudServices.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(CloudServices.update::parameters.properties, "The cloud service object."); +@@projectedName(CloudServices.restart::parameters.body, "json", "parameters"); +@@extension(CloudServices.restart::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(CloudServices.restart::parameters.body, + "List of cloud service role instance names." +); +@@projectedName(CloudServices.reimage::parameters.body, "json", "parameters"); +@@extension(CloudServices.reimage::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(CloudServices.reimage::parameters.body, + "List of cloud service role instance names." +); +@@projectedName(CloudServices.rebuild::parameters.body, "json", "parameters"); +@@extension(CloudServices.rebuild::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(CloudServices.rebuild::parameters.body, + "List of cloud service role instance names." +); +@@projectedName(CloudServices.deleteInstances::parameters.body, + "json", + "parameters" +); +@@extension(CloudServices.deleteInstances::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(CloudServices.deleteInstances::parameters.body, + "List of cloud service role instance names." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp index cdb153ef85..1b65080bfe 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Describes a role of the cloud service.") +/** + * Describes a role of the cloud service. + */ @parentResource(CloudService) model CloudServiceRole is ProxyResource { - @doc("Name of the role.") + /** + * Name of the role. + */ @path @key("roleName") @segment("roles") @@ -26,9 +30,15 @@ model CloudServiceRole is ProxyResource { @armResourceOperations interface CloudServiceRoles { - @doc("Gets a role from a cloud service.") + /** + * Gets a role from a cloud service. + */ get is ArmResourceRead; - @doc("Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next page of roles. Do this till nextLink is null to fetch all the roles.") + /** + * Gets a list of all roles in a cloud service. Use nextLink property in the response to get the next page of roles. Do this till nextLink is null to fetch all the roles. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("CloudServiceRoles_List") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp index 8c950465b2..57285a5f84 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp @@ -12,10 +12,14 @@ using TypeSpec.OpenAPI; namespace Microsoft.Compute; // FIXME: CommunityGallery has no properties property -@doc("Specifies information about the Community Gallery that you want to create or update.") +/** + * Specifies information about the Community Gallery that you want to create or update. + */ @locationResource model CommunityGallery is ProxyResource<{}> { - @doc("The public name of the community gallery.") + /** + * The public name of the community gallery. + */ @path @key("publicGalleryName") @segment("communityGalleries") @@ -24,6 +28,8 @@ model CommunityGallery is ProxyResource<{}> { @armResourceOperations interface CommunityGalleries { - @doc("Get a community gallery by gallery public name.") + /** + * Get a community gallery by gallery public name. + */ get is ArmResourceRead; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp index 614abe2c11..5f07e5f79d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the gallery image definition that you want to create or update.") +/** + * Specifies information about the gallery image definition that you want to create or update. + */ @parentResource(CommunityGallery) model CommunityGalleryImage is ProxyResource { - @doc("The name of the community gallery image definition.") + /** + * The name of the community gallery image definition. + */ @path @key("galleryImageName") @segment("images") @@ -24,9 +28,15 @@ model CommunityGalleryImage is ProxyResource { @armResourceOperations interface CommunityGalleryImages { - @doc("Get a community gallery image.") + /** + * Get a community gallery image. + */ get is ArmResourceRead; - @doc("List community gallery images inside a gallery.") + /** + * List community gallery images inside a gallery. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("CommunityGalleryImages_List") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp index 60c8c5aac5..52ae8c392b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the gallery image version that you want to create or update.") +/** + * Specifies information about the gallery image version that you want to create or update. + */ @parentResource(CommunityGalleryImage) model CommunityGalleryImageVersion is ProxyResource { - @doc("The name of the community gallery image version. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: ..") + /** + * The name of the community gallery image version. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + */ @path @key("galleryImageVersionName") @segment("versions") @@ -25,9 +29,15 @@ model CommunityGalleryImageVersion @armResourceOperations interface CommunityGalleryImageVersions { - @doc("Get a community gallery image version.") + /** + * Get a community gallery image version. + */ get is ArmResourceRead; - @doc("List community gallery image versions inside an image.") + /** + * List community gallery image versions inside an image. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("CommunityGalleryImageVersions_List") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp index ad183f83b7..7b0ce845d0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the Dedicated host.") +/** + * Specifies information about the Dedicated host. + */ @parentResource(DedicatedHostGroup) model DedicatedHost is TrackedResource { - @doc("The name of the dedicated host.") + /** + * The name of the dedicated host. + */ @path @key("hostName") @segment("hosts") @@ -26,34 +30,76 @@ model DedicatedHost is TrackedResource { @armResourceOperations interface DedicatedHosts { - @doc("Retrieves information about a dedicated host.") + /** + * Retrieves information about a dedicated host. + */ get is ArmResourceRead< DedicatedHost, { ...BaseParameters; - @doc("The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated host. 'UserData' is not supported for dedicated host.") + /** + * The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated host. 'UserData' is not supported for dedicated host. + */ @query("$expand") $expand?: InstanceViewTypes; } >; - @doc("Create or update a dedicated host .") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Create or update a dedicated host . + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Update a dedicated host .") + /** + * Update a dedicated host . + */ + @parameterVisibility("read") update is ArmCustomPatchAsync; - @doc("Delete a dedicated host.") + /** + * Delete a dedicated host. + */ delete is ArmResourceDeleteAsync; - @doc("Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts.") + /** + * Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DedicatedHosts_ListByHostGroup") listByHostGroup is ArmResourceListByParent; - @doc("Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details.") + /** + * Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details. + */ restart is ArmResourceActionAsync; - @doc("Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host.") + /** + * Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host. + */ // FIXME: DedicatedHosts_ListAvailableSizes could not be converted to a resource operation - ListAvailableSizes is Azure.Core.ResourceList; + listAvailableSizes is Azure.Core.ResourceList; } + +@@projectedName(DedicatedHosts.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(DedicatedHosts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(DedicatedHosts.createOrUpdate::parameters.resource, + "Parameters supplied to the Create Dedicated Host." +); +@@projectedName(DedicatedHosts.update::parameters.properties, + "json", + "parameters" +); +@@extension(DedicatedHosts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(DedicatedHosts.update::parameters.properties, + "Parameters supplied to the Update Dedicated Host operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp index b9d38f6c61..6fa6bf2f83 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp @@ -11,44 +11,90 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group.") +/** + * Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group. + */ model DedicatedHostGroup is TrackedResource { - @doc("The name of the dedicated host group.") + /** + * The name of the dedicated host group. + */ @path @key("hostGroupName") @segment("hostGroups") name: string; - @doc("Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone.") + /** + * Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. + */ zones?: string[]; } @armResourceOperations interface DedicatedHostGroups { - @doc("Retrieves information about a dedicated host group.") + /** + * Retrieves information about a dedicated host group. + */ get is ArmResourceRead< DedicatedHostGroup, { ...BaseParameters; - @doc("The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated hosts under the dedicated host group. 'UserData' is not supported for dedicated host group.") + /** + * The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated hosts under the dedicated host group. 'UserData' is not supported for dedicated host group. + */ @query("$expand") $expand?: InstanceViewTypes; } >; - @doc("Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596)") + /** + * Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596) + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Update an dedicated host group.") + /** + * Update an dedicated host group. + */ + @parameterVisibility("read") update is ArmCustomPatchSync; - @doc("Delete a dedicated host group.") + /** + * Delete a dedicated host group. + */ delete is ArmResourceDeleteSync; - @doc("Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in the response to get the next page of dedicated host groups.") + /** + * Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in the response to get the next page of dedicated host groups. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DedicatedHostGroups_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; - @doc("Lists all of the dedicated host groups in the subscription. Use the nextLink property in the response to get the next page of dedicated host groups.") + /** + * Lists all of the dedicated host groups in the subscription. Use the nextLink property in the response to get the next page of dedicated host groups. + */ listBySubscription is ArmListBySubscription; } + +@@projectedName(DedicatedHostGroups.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(DedicatedHostGroups.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(DedicatedHostGroups.createOrUpdate::parameters.resource, + "Parameters supplied to the Create Dedicated Host Group." +); +@@projectedName(DedicatedHostGroups.update::parameters.properties, + "json", + "parameters" +); +@@extension(DedicatedHostGroups.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(DedicatedHostGroups.update::parameters.properties, + "Parameters supplied to the Update Dedicated Host Group operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp index d3291b2345..ab32627b1b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp @@ -11,22 +11,32 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Disk resource.") +/** + * Disk resource. + */ model Disk is TrackedResource { - @doc("The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters.") + /** + * The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + */ @path @key("diskName") @segment("disks") name: string; - @doc("List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.") + /** + * List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. + */ @visibility("read") managedByExtended?: string[]; - @doc("The Logical zone list for Disk.") + /** + * The Logical zone list for Disk. + */ zones?: string[]; - @doc("The extended location where the disk will be created. Extended location cannot be changed.") + /** + * The extended location where the disk will be created. Extended location cannot be changed. + */ extendedLocation?: ExtendedLocation; ...Azure.ResourceManager.ResourceSku; @@ -35,25 +45,42 @@ model Disk is TrackedResource { @armResourceOperations interface Disks { - @doc("Gets information about a disk.") + /** + * Gets information about a disk. + */ get is ArmResourceRead; - @doc("Creates or updates a disk.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Creates or updates a disk. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Updates (patches) a disk.") + /** + * Updates (patches) a disk. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync; - @doc("Deletes a disk.") + /** + * Deletes a disk. + */ delete is ArmResourceDeleteAsync; - @doc("Lists all the disks under a resource group.") + /** + * Lists all the disks under a resource group. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Disks_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; - @doc("Lists all the disks under a subscription.") + /** + * Lists all the disks under a subscription. + */ list is ArmListBySubscription; - @doc("Grants access to a disk.") + /** + * Grants access to a disk. + */ grantAccess is ArmResourceActionAsync< Disk, GrantAccessData, @@ -62,7 +89,9 @@ interface Disks { ArmLroLocationHeader >; - @doc("Revokes access to a disk.") + /** + * Revokes access to a disk. + */ revokeAccess is ArmResourceActionAsync< Disk, void, @@ -71,3 +100,25 @@ interface Disks { ArmLroLocationHeader >; } + +@@projectedName(Disks.createOrUpdate::parameters.resource, "json", "disk"); +@@extension(Disks.createOrUpdate::parameters.resource, + "x-ms-client-name", + "disk" +); +@@doc(Disks.createOrUpdate::parameters.resource, + "Disk object supplied in the body of the Put disk operation." +); +@@projectedName(Disks.update::parameters.properties, "json", "disk"); +@@extension(Disks.update::parameters.properties, "x-ms-client-name", "disk"); +@@doc(Disks.update::parameters.properties, + "Disk object supplied in the body of the Patch disk operation." +); +@@projectedName(Disks.grantAccess::parameters.body, "json", "grantAccessData"); +@@extension(Disks.grantAccess::parameters.body, + "x-ms-client-name", + "grantAccessData" +); +@@doc(Disks.grantAccess::parameters.body, + "Access data object supplied in the body of the get disk access operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp index 215784ca71..18f786ff8f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp @@ -11,56 +11,108 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("disk access resource.") +/** + * disk access resource. + */ model DiskAccess is TrackedResource { - @doc("The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters.") + /** + * The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + */ @path @key("diskAccessName") @segment("diskAccesses") name: string; - @doc("The extended location where the disk access will be created. Extended location cannot be changed.") + /** + * The extended location where the disk access will be created. Extended location cannot be changed. + */ extendedLocation?: ExtendedLocation; } @armResourceOperations interface DiskAccesses { - @doc("Gets information about a disk access resource.") + /** + * Gets information about a disk access resource. + */ get is ArmResourceRead; - @doc("Creates or updates a disk access resource") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Creates or updates a disk access resource + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Updates (patches) a disk access resource.") + /** + * Updates (patches) a disk access resource. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync; - @doc("Deletes a disk access resource.") + /** + * Deletes a disk access resource. + */ delete is ArmResourceDeleteAsync; - @doc("Lists all the disk access resources under a resource group.") + /** + * Lists all the disk access resources under a resource group. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DiskAccesses_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; - @doc("Lists all the disk access resources under a subscription.") + /** + * Lists all the disk access resources under a subscription. + */ list is ArmListBySubscription; - @doc("Gets the private link resources possible under disk access resource") + /** + * Gets the private link resources possible under disk access resource + */ // FIXME: DiskAccesses_GetPrivateLinkResources could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources") @get - GetPrivateLinkResources is Azure.Core.Foundations.Operation< + getPrivateLinkResources is Azure.Core.Foundations.Operation< { - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters.") + /** + * The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + */ @path diskAccessName: string; }, PrivateLinkResourceListResult >; } + +@@projectedName(DiskAccesses.createOrUpdate::parameters.resource, + "json", + "diskAccess" +); +@@extension(DiskAccesses.createOrUpdate::parameters.resource, + "x-ms-client-name", + "diskAccess" +); +@@doc(DiskAccesses.createOrUpdate::parameters.resource, + "disk access object supplied in the body of the Put disk access operation." +); +@@projectedName(DiskAccesses.update::parameters.properties, + "json", + "diskAccess" +); +@@extension(DiskAccesses.update::parameters.properties, + "x-ms-client-name", + "diskAccess" +); +@@doc(DiskAccesses.update::parameters.properties, + "disk access object supplied in the body of the Patch disk access operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp index 791c3f1679..59a71ac9fe 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp @@ -11,9 +11,13 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("disk encryption set resource.") +/** + * disk encryption set resource. + */ model DiskEncryptionSet is TrackedResource { - @doc("The name of the disk encryption set that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters.") + /** + * The name of the disk encryption set that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + */ @path @key("diskEncryptionSetName") @segment("diskEncryptionSets") @@ -24,25 +28,65 @@ model DiskEncryptionSet is TrackedResource { @armResourceOperations interface DiskEncryptionSets { - @doc("Gets information about a disk encryption set.") + /** + * Gets information about a disk encryption set. + */ get is ArmResourceRead; - @doc("Creates or updates a disk encryption set") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Creates or updates a disk encryption set + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Updates (patches) a disk encryption set.") + /** + * Updates (patches) a disk encryption set. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync; - @doc("Deletes a disk encryption set.") + /** + * Deletes a disk encryption set. + */ delete is ArmResourceDeleteAsync; - @doc("Lists all the disk encryption sets under a resource group.") + /** + * Lists all the disk encryption sets under a resource group. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DiskEncryptionSets_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; - @doc("Lists all the disk encryption sets under a subscription.") + /** + * Lists all the disk encryption sets under a subscription. + */ list is ArmListBySubscription; - @doc("Lists all resources that are encrypted with this disk encryption set.") + /** + * Lists all resources that are encrypted with this disk encryption set. + */ // FIXME: DiskEncryptionSets_ListAssociatedResources could not be converted to a resource operation - ListAssociatedResources is Azure.Core.ResourceList; + listAssociatedResources is Azure.Core.ResourceList; } + +@@projectedName(DiskEncryptionSets.createOrUpdate::parameters.resource, + "json", + "diskEncryptionSet" +); +@@extension(DiskEncryptionSets.createOrUpdate::parameters.resource, + "x-ms-client-name", + "diskEncryptionSet" +); +@@doc(DiskEncryptionSets.createOrUpdate::parameters.resource, + "disk encryption set object supplied in the body of the Put disk encryption set operation." +); +@@projectedName(DiskEncryptionSets.update::parameters.properties, + "json", + "diskEncryptionSet" +); +@@extension(DiskEncryptionSets.update::parameters.properties, + "x-ms-client-name", + "diskEncryptionSet" +); +@@doc(DiskEncryptionSets.update::parameters.properties, + "disk encryption set object supplied in the body of the Patch disk encryption set operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp index d9a51575a1..1bb02acc2c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Properties of disk restore point") +/** + * Properties of disk restore point + */ @parentResource(RestorePoint) model DiskRestorePoint is ProxyResource { - @doc("The name of the disk restore point created.") + /** + * The name of the disk restore point created. + */ @path @key("diskRestorePointName") @segment("diskRestorePoints") @@ -24,36 +28,46 @@ model DiskRestorePoint is ProxyResource { @armResourceOperations interface DiskRestorePoints { + /** + * Get disk restorePoint resource + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get disk restorePoint resource") @operationId("DiskRestorePoint_Get") get is ArmResourceRead< DiskRestorePoint, { ...BaseParameters; - @doc("The name of the restore point collection that the disk restore point belongs.") + /** + * The name of the restore point collection that the disk restore point belongs. + */ @path restorePointCollectionName: string; } >; + /** + * Lists diskRestorePoints under a vmRestorePoint. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists diskRestorePoints under a vmRestorePoint.") @operationId("DiskRestorePoint_ListByRestorePoint") listByRestorePoint is ArmResourceListByParent< DiskRestorePoint, { ...BaseParameters; - @doc("The name of the restore point collection that the disk restore point belongs.") + /** + * The name of the restore point collection that the disk restore point belongs. + */ @path restorePointCollectionName: string; } >; + /** + * Grants access to a diskRestorePoint. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Grants access to a diskRestorePoint.") @operationId("DiskRestorePoint_GrantAccess") grantAccess is ArmResourceActionAsync< DiskRestorePoint, @@ -62,15 +76,19 @@ interface DiskRestorePoints { { ...BaseParameters; - @doc("The name of the restore point collection that the disk restore point belongs.") + /** + * The name of the restore point collection that the disk restore point belongs. + */ @path restorePointCollectionName: string; }, ArmLroLocationHeader >; + /** + * Revokes access to a diskRestorePoint. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Revokes access to a diskRestorePoint.") @operationId("DiskRestorePoint_RevokeAccess") revokeAccess is ArmResourceActionAsync< DiskRestorePoint, @@ -79,10 +97,24 @@ interface DiskRestorePoints { { ...BaseParameters; - @doc("The name of the restore point collection that the disk restore point belongs.") + /** + * The name of the restore point collection that the disk restore point belongs. + */ @path restorePointCollectionName: string; }, ArmLroLocationHeader >; } + +@@projectedName(DiskRestorePoints.grantAccess::parameters.body, + "json", + "grantAccessData" +); +@@extension(DiskRestorePoints.grantAccess::parameters.body, + "x-ms-client-name", + "grantAccessData" +); +@@doc(DiskRestorePoints.grantAccess::parameters.body, + "Access data object supplied in the body of the get disk access operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp index f40441ce59..20a8aa57a3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp @@ -11,9 +11,13 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the Shared Image Gallery that you want to create or update.") +/** + * Specifies information about the Shared Image Gallery that you want to create or update. + */ model Gallery is TrackedResource { - @doc("The name of the Shared Image Gallery.") + /** + * The name of the Shared Image Gallery. + */ @path @key("galleryName") @segment("galleries") @@ -22,39 +26,88 @@ model Gallery is TrackedResource { @armResourceOperations interface Galleries { - @doc("Retrieves information about a Shared Image Gallery.") + /** + * Retrieves information about a Shared Image Gallery. + */ get is ArmResourceRead< Gallery, { ...BaseParameters; - @doc("The select expression to apply on the operation.") + /** + * The select expression to apply on the operation. + */ @query("$select") $select?: SelectPermissions; - @doc("The expand query option to apply on the operation.") + /** + * The expand query option to apply on the operation. + */ @query("$expand") $expand?: GalleryExpandParams; } >; - @doc("Create or update a Shared Image Gallery.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Create or update a Shared Image Gallery. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Update a Shared Image Gallery.") + /** + * Update a Shared Image Gallery. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync; - @doc("Delete a Shared Image Gallery.") + /** + * Delete a Shared Image Gallery. + */ delete is ArmResourceDeleteAsync; - @doc("List galleries under a resource group.") + /** + * List galleries under a resource group. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Galleries_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; - @doc("List galleries under a subscription.") + /** + * List galleries under a subscription. + */ list is ArmListBySubscription; + /** + * Update sharing profile of a gallery. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update sharing profile of a gallery.") @operationId("GallerySharingProfile_Update") update is ArmResourceActionAsync; } + +@@projectedName(Galleries.createOrUpdate::parameters.resource, + "json", + "gallery" +); +@@extension(Galleries.createOrUpdate::parameters.resource, + "x-ms-client-name", + "gallery" +); +@@doc(Galleries.createOrUpdate::parameters.resource, + "Parameters supplied to the create or update Shared Image Gallery operation." +); +@@projectedName(Galleries.update::parameters.properties, "json", "gallery"); +@@extension(Galleries.update::parameters.properties, + "x-ms-client-name", + "gallery" +); +@@doc(Galleries.update::parameters.properties, + "Parameters supplied to the update Shared Image Gallery operation." +); +@@projectedName(Galleries.update::parameters.body, "json", "sharingUpdate"); +@@extension(Galleries.update::parameters.body, + "x-ms-client-name", + "sharingUpdate" +); +@@doc(Galleries.update::parameters.body, + "Parameters supplied to the update gallery sharing profile." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp index 65a4a314f8..3a104b525e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the gallery Application Definition that you want to create or update.") +/** + * Specifies information about the gallery Application Definition that you want to create or update. + */ @parentResource(Gallery) model GalleryApplication is TrackedResource { - @doc("The name of the gallery Application Definition to be retrieved.") + /** + * The name of the gallery Application Definition to be retrieved. + */ @path @key("galleryApplicationName") @segment("applications") @@ -24,18 +28,54 @@ model GalleryApplication is TrackedResource { @armResourceOperations interface GalleryApplications { - @doc("Retrieves information about a gallery Application Definition.") + /** + * Retrieves information about a gallery Application Definition. + */ get is ArmResourceRead; - @doc("Create or update a gallery Application Definition.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Create or update a gallery Application Definition. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Update a gallery Application Definition.") + /** + * Update a gallery Application Definition. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync; - @doc("Delete a gallery Application.") + /** + * Delete a gallery Application. + */ delete is ArmResourceDeleteAsync; - @doc("List gallery Application Definitions in a gallery.") + /** + * List gallery Application Definitions in a gallery. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GalleryApplications_ListByGallery") listByGallery is ArmResourceListByParent; } + +@@projectedName(GalleryApplications.createOrUpdate::parameters.resource, + "json", + "galleryApplication" +); +@@extension(GalleryApplications.createOrUpdate::parameters.resource, + "x-ms-client-name", + "galleryApplication" +); +@@doc(GalleryApplications.createOrUpdate::parameters.resource, + "Parameters supplied to the create or update gallery Application operation." +); +@@projectedName(GalleryApplications.update::parameters.properties, + "json", + "galleryApplication" +); +@@extension(GalleryApplications.update::parameters.properties, + "x-ms-client-name", + "galleryApplication" +); +@@doc(GalleryApplications.update::parameters.properties, + "Parameters supplied to the update gallery Application operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp index 9431ac192e..088c23e825 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the gallery Application Version that you want to create or update.") +/** + * Specifies information about the gallery Application Version that you want to create or update. + */ @parentResource(GalleryApplication) model GalleryApplicationVersion is TrackedResource { - @doc("The name of the gallery Application Version to be retrieved.") + /** + * The name of the gallery Application Version to be retrieved. + */ @path @key("galleryApplicationVersionName") @segment("versions") @@ -25,30 +29,68 @@ model GalleryApplicationVersion @armResourceOperations interface GalleryApplicationVersions { - @doc("Retrieves information about a gallery Application Version.") + /** + * Retrieves information about a gallery Application Version. + */ get is ArmResourceRead< GalleryApplicationVersion, { ...BaseParameters; - @doc("The expand expression to apply on the operation.") + /** + * The expand expression to apply on the operation. + */ @query("$expand") $expand?: ReplicationStatusTypes; } >; - @doc("Create or update a gallery Application Version.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Create or update a gallery Application Version. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Update a gallery Application Version.") + /** + * Update a gallery Application Version. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync< GalleryApplicationVersion, GalleryApplicationVersionUpdate >; - @doc("Delete a gallery Application Version.") + /** + * Delete a gallery Application Version. + */ delete is ArmResourceDeleteAsync; - @doc("List gallery Application Versions in a gallery Application Definition.") + /** + * List gallery Application Versions in a gallery Application Definition. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GalleryApplicationVersions_ListByGalleryApplication") listByGalleryApplication is ArmResourceListByParent; } + +@@projectedName(GalleryApplicationVersions.createOrUpdate::parameters.resource, + "json", + "galleryApplicationVersion" +); +@@extension(GalleryApplicationVersions.createOrUpdate::parameters.resource, + "x-ms-client-name", + "galleryApplicationVersion" +); +@@doc(GalleryApplicationVersions.createOrUpdate::parameters.resource, + "Parameters supplied to the create or update gallery Application Version operation." +); +@@projectedName(GalleryApplicationVersions.update::parameters.properties, + "json", + "galleryApplicationVersion" +); +@@extension(GalleryApplicationVersions.update::parameters.properties, + "x-ms-client-name", + "galleryApplicationVersion" +); +@@doc(GalleryApplicationVersions.update::parameters.properties, + "Parameters supplied to the update gallery Application Version operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp index d55dc31144..377de5eb32 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the gallery image definition that you want to create or update.") +/** + * Specifies information about the gallery image definition that you want to create or update. + */ @parentResource(Gallery) model GalleryImage is TrackedResource { - @doc("The name of the gallery image definition to be retrieved.") + /** + * The name of the gallery image definition to be retrieved. + */ @path @key("galleryImageName") @segment("images") @@ -24,18 +28,54 @@ model GalleryImage is TrackedResource { @armResourceOperations interface GalleryImages { - @doc("Retrieves information about a gallery image definition.") + /** + * Retrieves information about a gallery image definition. + */ get is ArmResourceRead; - @doc("Create or update a gallery image definition.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Create or update a gallery image definition. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Update a gallery image definition.") + /** + * Update a gallery image definition. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync; - @doc("Delete a gallery image.") + /** + * Delete a gallery image. + */ delete is ArmResourceDeleteAsync; - @doc("List gallery image definitions in a gallery.") + /** + * List gallery image definitions in a gallery. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GalleryImages_ListByGallery") listByGallery is ArmResourceListByParent; } + +@@projectedName(GalleryImages.createOrUpdate::parameters.resource, + "json", + "galleryImage" +); +@@extension(GalleryImages.createOrUpdate::parameters.resource, + "x-ms-client-name", + "galleryImage" +); +@@doc(GalleryImages.createOrUpdate::parameters.resource, + "Parameters supplied to the create or update gallery image operation." +); +@@projectedName(GalleryImages.update::parameters.properties, + "json", + "galleryImage" +); +@@extension(GalleryImages.update::parameters.properties, + "x-ms-client-name", + "galleryImage" +); +@@doc(GalleryImages.update::parameters.properties, + "Parameters supplied to the update gallery image operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp index 585dc127bb..c1d035be2a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the gallery image version that you want to create or update.") +/** + * Specifies information about the gallery image version that you want to create or update. + */ @parentResource(GalleryImage) model GalleryImageVersion is TrackedResource { - @doc("The name of the gallery image version to be retrieved.") + /** + * The name of the gallery image version to be retrieved. + */ @path @key("galleryImageVersionName") @segment("versions") @@ -24,27 +28,65 @@ model GalleryImageVersion is TrackedResource { @armResourceOperations interface GalleryImageVersions { - @doc("Retrieves information about a gallery image version.") + /** + * Retrieves information about a gallery image version. + */ get is ArmResourceRead< GalleryImageVersion, { ...BaseParameters; - @doc("The expand expression to apply on the operation.") + /** + * The expand expression to apply on the operation. + */ @query("$expand") $expand?: ReplicationStatusTypes; } >; - @doc("Create or update a gallery image version.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Create or update a gallery image version. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Update a gallery image version.") + /** + * Update a gallery image version. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync; - @doc("Delete a gallery image version.") + /** + * Delete a gallery image version. + */ delete is ArmResourceDeleteAsync; - @doc("List gallery image versions in a gallery image definition.") + /** + * List gallery image versions in a gallery image definition. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GalleryImageVersions_ListByGalleryImage") listByGalleryImage is ArmResourceListByParent; } + +@@projectedName(GalleryImageVersions.createOrUpdate::parameters.resource, + "json", + "galleryImageVersion" +); +@@extension(GalleryImageVersions.createOrUpdate::parameters.resource, + "x-ms-client-name", + "galleryImageVersion" +); +@@doc(GalleryImageVersions.createOrUpdate::parameters.resource, + "Parameters supplied to the create or update gallery image version operation." +); +@@projectedName(GalleryImageVersions.update::parameters.properties, + "json", + "galleryImageVersion" +); +@@extension(GalleryImageVersions.update::parameters.properties, + "x-ms-client-name", + "galleryImageVersion" +); +@@doc(GalleryImageVersions.update::parameters.properties, + "Parameters supplied to the update gallery image version operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp index 750a9b9fd7..4a8e5e9d8e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp @@ -11,44 +11,87 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.") +/** + * The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. + */ model Image is TrackedResource { - @doc("The name of the image.") + /** + * The name of the image. + */ @path @key("imageName") @segment("images") name: string; - @doc("The extended location of the Image.") + /** + * The extended location of the Image. + */ extendedLocation?: ExtendedLocation; } @armResourceOperations interface Images { - @doc("Gets an image.") + /** + * Gets an image. + */ get is ArmResourceRead< Image, { ...BaseParameters; - @doc("The expand expression to apply on the operation.") + /** + * The expand expression to apply on the operation. + */ @query("$expand") $expand?: string; } >; - @doc("Create or update an image.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Create or update an image. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Update an image.") + /** + * Update an image. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync; - @doc("Deletes an Image.") + /** + * Deletes an Image. + */ delete is ArmResourceDeleteAsync; - @doc("Gets the list of images under a resource group. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.") + /** + * Gets the list of images under a resource group. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Images_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; - @doc("Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.") + /** + * Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images. + */ list is ArmListBySubscription; } + +@@projectedName(Images.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(Images.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(Images.createOrUpdate::parameters.resource, + "Parameters supplied to the Create Image operation." +); +@@projectedName(Images.update::parameters.properties, "json", "parameters"); +@@extension(Images.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(Images.update::parameters.properties, + "Parameters supplied to the Update Image operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp index d70ee270d9..4cc3790bc8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Describes a cloud service OS family.") +/** + * Describes a cloud service OS family. + */ @locationResource model OSFamily is ProxyResource { - @doc("Name of the OS family.") + /** + * Name of the OS family. + */ @path @key("osFamilyName") @segment("cloudServiceOsFamilies") @@ -23,13 +27,17 @@ model OSFamily is ProxyResource { @armResourceOperations interface OSFamilies { + /** + * Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service.") @operationId("CloudServiceOperatingSystems_GetOSFamily") getOSFamily is ArmResourceRead; + /** + * Gets a list of all guest operating system families available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS Families. Do this till nextLink is null to fetch all the OS Families. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets a list of all guest operating system families available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS Families. Do this till nextLink is null to fetch all the OS Families.") @operationId("CloudServiceOperatingSystems_ListOSFamilies") listOSFamilies is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp index f4d2ae8858..ae8057eef6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Describes a cloud service OS version.") +/** + * Describes a cloud service OS version. + */ @locationResource model OSVersion is ProxyResource { - @doc("Name of the OS version.") + /** + * Name of the OS version. + */ @path @key("osVersionName") @segment("cloudServiceOsVersions") @@ -23,13 +27,17 @@ model OSVersion is ProxyResource { @armResourceOperations interface OSVersions { + /** + * Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service.") @operationId("CloudServiceOperatingSystems_GetOSVersion") getOSVersion is ArmResourceRead; + /** + * Gets a list of all guest operating system versions available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS versions. Do this till nextLink is null to fetch all the OS versions. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets a list of all guest operating system versions available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS versions. Do this till nextLink is null to fetch all the OS versions.") @operationId("CloudServiceOperatingSystems_ListOSVersions") listOSVersions is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp index d89816e38b..65566a99c8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("The Private Endpoint Connection resource.") +/** + * The Private Endpoint Connection resource. + */ @parentResource(DiskAccess) model PrivateEndpointConnection is ProxyResource { - @doc("The name of the private endpoint connection.") + /** + * The name of the private endpoint connection. + */ @path @key("privateEndpointConnectionName") @segment("privateEndpointConnections") @@ -25,23 +29,43 @@ model PrivateEndpointConnection @armResourceOperations interface PrivateEndpointConnections { + /** + * Gets information about a private endpoint connection under a disk access resource. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets information about a private endpoint connection under a disk access resource.") @operationId("DiskAccesses_GetAPrivateEndpointConnection") getAPrivateEndpointConnection is ArmResourceRead; + /** + * Approve or reject a private endpoint connection under disk access resource, this can't be used to create a new private endpoint connection. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Approve or reject a private endpoint connection under disk access resource, this can't be used to create a new private endpoint connection.") @operationId("DiskAccesses_UpdateAPrivateEndpointConnection") - updateAPrivateEndpointConnection is ArmResourceCreateOrUpdateAsync; + updateAPrivateEndpointConnection is ArmResourceCreateOrReplaceAsync; + /** + * Deletes a private endpoint connection under a disk access resource. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes a private endpoint connection under a disk access resource.") @operationId("DiskAccesses_DeleteAPrivateEndpointConnection") deleteAPrivateEndpointConnection is ArmResourceDeleteAsync; + /** + * List information about private endpoint connections under a disk access resource + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List information about private endpoint connections under a disk access resource") @operationId("DiskAccesses_ListPrivateEndpointConnections") listPrivateEndpointConnections is ArmResourceListByParent; } + +@@projectedName(PrivateEndpointConnections.updateAPrivateEndpointConnection::parameters.resource, + "json", + "privateEndpointConnection" +); +@@extension(PrivateEndpointConnections.updateAPrivateEndpointConnection::parameters.resource, + "x-ms-client-name", + "privateEndpointConnection" +); +@@doc(PrivateEndpointConnections.updateAPrivateEndpointConnection::parameters.resource, + "private endpoint connection object supplied in the body of the Put private endpoint connection operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp index fb626581b0..527127609e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp @@ -11,48 +11,94 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the proximity placement group.") +/** + * Specifies information about the proximity placement group. + */ model ProximityPlacementGroup is TrackedResource { - @doc("The name of the proximity placement group.") + /** + * The name of the proximity placement group. + */ @path @key("proximityPlacementGroupName") @segment("proximityPlacementGroups") name: string; - @doc("Specifies the Availability Zone where virtual machine, virtual machine scale set or availability set associated with the proximity placement group can be created.") + /** + * Specifies the Availability Zone where virtual machine, virtual machine scale set or availability set associated with the proximity placement group can be created. + */ zones?: string[]; } @armResourceOperations interface ProximityPlacementGroups { - @doc("Retrieves information about a proximity placement group .") + /** + * Retrieves information about a proximity placement group . + */ get is ArmResourceRead< ProximityPlacementGroup, { ...BaseParameters; - @doc("includeColocationStatus=true enables fetching the colocation status of all the resources in the proximity placement group.") + /** + * includeColocationStatus=true enables fetching the colocation status of all the resources in the proximity placement group. + */ @query("includeColocationStatus") includeColocationStatus?: string; } >; - @doc("Create or update a proximity placement group.") + /** + * Create or update a proximity placement group. + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Update a proximity placement group.") + /** + * Update a proximity placement group. + */ + @parameterVisibility("read") update is ArmCustomPatchSync< ProximityPlacementGroup, ProximityPlacementGroupUpdate >; - @doc("Delete a proximity placement group.") + /** + * Delete a proximity placement group. + */ delete is ArmResourceDeleteSync; - @doc("Lists all proximity placement groups in a resource group.") + /** + * Lists all proximity placement groups in a resource group. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ProximityPlacementGroups_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; - @doc("Lists all proximity placement groups in a subscription.") + /** + * Lists all proximity placement groups in a subscription. + */ listBySubscription is ArmListBySubscription; } + +@@projectedName(ProximityPlacementGroups.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(ProximityPlacementGroups.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(ProximityPlacementGroups.createOrUpdate::parameters.resource, + "Parameters supplied to the Create Proximity Placement Group operation." +); +@@projectedName(ProximityPlacementGroups.update::parameters.properties, + "json", + "parameters" +); +@@extension(ProximityPlacementGroups.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(ProximityPlacementGroups.update::parameters.properties, + "Parameters supplied to the Update Proximity Placement Group operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp index 5afd3be400..5c2bf7504c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Restore Point details.") +/** + * Restore Point details. + */ @parentResource(RestorePointCollection) model RestorePoint is ProxyResource { - @doc("The name of the restore point.") + /** + * The name of the restore point. + */ @path @key("restorePointName") @segment("restorePoints") @@ -24,43 +28,69 @@ model RestorePoint is ProxyResource { @armResourceOperations interface RestorePoints { - @doc("The operation to get the restore point.") + /** + * The operation to get the restore point. + */ get is ArmResourceRead< RestorePoint, { ...BaseParameters; - @doc("The name of the restore point collection.") + /** + * The name of the restore point collection. + */ @path restorePointCollectionName: string; - @doc("The expand expression to apply on the operation. 'InstanceView' retrieves information about the run-time state of a restore point.") + /** + * The expand expression to apply on the operation. 'InstanceView' retrieves information about the run-time state of a restore point. + */ @query("$expand") $expand?: RestorePointExpandOptions; } >; - @doc("The operation to create the restore point. Updating properties of an existing restore point is not allowed") - create is ArmResourceCreateOrUpdateAsync< + /** + * The operation to create the restore point. Updating properties of an existing restore point is not allowed + */ + create is ArmResourceCreateOrReplaceAsync< RestorePoint, { ...BaseParameters; - @doc("The name of the restore point collection.") + /** + * The name of the restore point collection. + */ @path restorePointCollectionName: string; } >; - @doc("The operation to delete the restore point.") + /** + * The operation to delete the restore point. + */ delete is ArmResourceDeleteAsync< RestorePoint, { ...BaseParameters; - @doc("The name of the Restore Point Collection.") + /** + * The name of the Restore Point Collection. + */ @path restorePointCollectionName: string; } >; } + +@@projectedName(RestorePoints.create::parameters.resource, + "json", + "parameters" +); +@@extension(RestorePoints.create::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(RestorePoints.create::parameters.resource, + "Parameters supplied to the Create restore point operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp index f6566ea20f..2d686c821b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Create or update Restore Point collection parameters.") +/** + * Create or update Restore Point collection parameters. + */ model RestorePointCollection is TrackedResource { - @doc("The name of the restore point collection.") + /** + * The name of the restore point collection. + */ @path @key("restorePointCollectionName") @segment("restorePointCollections") @@ -23,62 +27,110 @@ model RestorePointCollection @armResourceOperations interface RestorePointCollections { - @doc("The operation to get the restore point collection.") + /** + * The operation to get the restore point collection. + */ get is ArmResourceRead< RestorePointCollection, { ...BaseParameters; - @doc("The name of the restore point collection.") + /** + * The name of the restore point collection. + */ @path restorePointCollectionName: string; - @doc("The expand expression to apply on the operation. If expand=restorePoints, server will return all contained restore points in the restorePointCollection.") + /** + * The expand expression to apply on the operation. If expand=restorePoints, server will return all contained restore points in the restorePointCollection. + */ @query("$expand") $expand?: RestorePointCollectionExpandOptions; } >; - @doc("The operation to create or update the restore point collection. Please refer to https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags may be modified.") + /** + * The operation to create or update the restore point collection. Please refer to https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags may be modified. + */ createOrUpdate is ArmResourceCreateOrReplaceSync< RestorePointCollection, { ...BaseParameters; - @doc("The name of the restore point collection.") + /** + * The name of the restore point collection. + */ @path restorePointCollectionName: string; } >; - @doc("The operation to update the restore point collection.") + /** + * The operation to update the restore point collection. + */ + @parameterVisibility("read") update is ArmCustomPatchSync< RestorePointCollection, RestorePointCollectionUpdate, { ...BaseParameters; - @doc("The name of the restore point collection.") + /** + * The name of the restore point collection. + */ @path restorePointCollectionName: string; } >; - @doc("The operation to delete the restore point collection. This operation will also delete all the contained restore points.") + /** + * The operation to delete the restore point collection. This operation will also delete all the contained restore points. + */ delete is ArmResourceDeleteAsync< RestorePointCollection, { ...BaseParameters; - @doc("The name of the Restore Point Collection.") + /** + * The name of the Restore Point Collection. + */ @path restorePointCollectionName: string; } >; - @doc("Gets the list of restore point collections in a resource group.") + /** + * Gets the list of restore point collections in a resource group. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RestorePointCollections_List") list is ArmResourceListByParent; - @doc("Gets the list of restore point collections in the subscription. Use nextLink property in the response to get the next page of restore point collections. Do this till nextLink is not null to fetch all the restore point collections.") + /** + * Gets the list of restore point collections in the subscription. Use nextLink property in the response to get the next page of restore point collections. Do this till nextLink is not null to fetch all the restore point collections. + */ listAll is ArmListBySubscription; } + +@@projectedName(RestorePointCollections.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(RestorePointCollections.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(RestorePointCollections.createOrUpdate::parameters.resource, + "Parameters supplied to the Create or Update restore point collection operation." +); +@@projectedName(RestorePointCollections.update::parameters.properties, + "json", + "parameters" +); +@@extension(RestorePointCollections.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(RestorePointCollections.update::parameters.properties, + "Parameters supplied to the Update restore point collection operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp index fcc6d72cbc..b79e880681 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Describes the cloud service role instance.") +/** + * Describes the cloud service role instance. + */ @parentResource(CloudService) model RoleInstance is ProxyResource { - @doc("Name of the role instance.") + /** + * Name of the role instance. + */ @path @key("roleInstanceName") @segment("roleInstances") @@ -26,106 +30,144 @@ model RoleInstance is ProxyResource { @armResourceOperations interface RoleInstances { + /** + * Gets a role instance from a cloud service. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets a role instance from a cloud service.") @operationId("CloudServiceRoleInstances_Get") get is ArmResourceRead< RoleInstance, { ...BaseParameters; - @doc("The expand expression to apply to the operation. 'UserData' is not supported for cloud services.") + /** + * The expand expression to apply to the operation. 'UserData' is not supported for cloud services. + */ @query("$expand") $expand?: InstanceViewTypes; } >; + /** + * Deletes a role instance from a cloud service. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes a role instance from a cloud service.") @operationId("CloudServiceRoleInstances_Delete") delete is ArmResourceDeleteAsync; + /** + * Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances.") @operationId("CloudServiceRoleInstances_List") list is ArmResourceListByParent< RoleInstance, { ...BaseParameters; - @doc("The expand expression to apply to the operation. 'UserData' is not supported for cloud services.") + /** + * The expand expression to apply to the operation. 'UserData' is not supported for cloud services. + */ @query("$expand") $expand?: InstanceViewTypes; } >; + /** + * The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.") @operationId("CloudServiceRoleInstances_Restart") restart is ArmResourceActionAsync; + /** + * The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.") @operationId("CloudServiceRoleInstances_Reimage") reimage is ArmResourceActionAsync; + /** + * The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance.") @operationId("CloudServiceRoleInstances_Rebuild") rebuild is ArmResourceActionAsync; + /** + * Retrieves information about the run-time state of a role instance in a cloud service. + */ + // FIXME: CloudServiceRoleInstances_GetInstanceView could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("CloudServiceRoleInstances_GetInstanceView") - @doc("Retrieves information about the run-time state of a role instance in a cloud service.") - // FIXME: CloudServiceRoleInstances_GetInstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView") @get - GetInstanceView is Azure.Core.Foundations.Operation< + getInstanceView is Azure.Core.Foundations.Operation< { - @doc("Name of the role instance.") + /** + * Name of the role instance. + */ @path roleInstanceName: string; - @doc("Name of the resource group.") + /** + * Name of the resource group. + */ @path resourceGroupName: string; - @doc("Name of the cloud service.") + /** + * Name of the cloud service. + */ @path cloudServiceName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, RoleInstanceInstanceView >; + /** + * Gets a remote desktop file for a role instance in a cloud service. + */ + // FIXME: CloudServiceRoleInstances_GetRemoteDesktopFile could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("CloudServiceRoleInstances_GetRemoteDesktopFile") - @doc("Gets a remote desktop file for a role instance in a cloud service.") - // FIXME: CloudServiceRoleInstances_GetRemoteDesktopFile could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile") @get - GetRemoteDesktopFile is Azure.Core.Foundations.Operation< + getRemoteDesktopFile is Azure.Core.Foundations.Operation< { - @doc("Name of the role instance.") + /** + * Name of the role instance. + */ @path roleInstanceName: string; - @doc("Name of the resource group.") + /** + * Name of the resource group. + */ @path resourceGroupName: string; - @doc("Name of the cloud service.") + /** + * Name of the cloud service. + */ @path cloudServiceName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/x-rdp"; }, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp index c16c53e721..8f1505d238 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp @@ -12,7 +12,9 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("The status of the latest virtual machine scale set rolling upgrade.") +/** + * The status of the latest virtual machine scale set rolling upgrade. + */ @singleton("latest") @parentResource(VirtualMachineScaleSet) model RollingUpgradeStatusInfo @@ -24,15 +26,19 @@ model RollingUpgradeStatusInfo @armResourceOperations interface RollingUpgradeStatusInfos { + /** + * Gets the status of the latest virtual machine scale set rolling upgrade. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the status of the latest virtual machine scale set rolling upgrade.") @operationId("VirtualMachineScaleSetRollingUpgrades_GetLatest") getLatest is ArmResourceRead< RollingUpgradeStatusInfo, { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp index e3eaf46391..c09315ae89 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp @@ -12,10 +12,14 @@ using TypeSpec.OpenAPI; namespace Microsoft.Compute; // FIXME: SharedGallery has no properties property -@doc("Specifies information about the Shared Gallery that you want to create or update.") +/** + * Specifies information about the Shared Gallery that you want to create or update. + */ @locationResource model SharedGallery is ProxyResource<{}> { - @doc("The unique name of the Shared Gallery.") + /** + * The unique name of the Shared Gallery. + */ @path @key("galleryUniqueName") @segment("sharedGalleries") @@ -24,16 +28,24 @@ model SharedGallery is ProxyResource<{}> { @armResourceOperations interface SharedGalleries { - @doc("Get a shared gallery by subscription id or tenant id.") + /** + * Get a shared gallery by subscription id or tenant id. + */ get is ArmResourceRead; - @doc("List shared galleries by subscription id or tenant id.") + /** + * List shared galleries by subscription id or tenant id. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("SharedGalleries_List") list is ArmResourceListByParent< SharedGallery, { ...BaseParameters; - @doc("The query parameter to decide what shared galleries to fetch when doing listing operations.") + /** + * The query parameter to decide what shared galleries to fetch when doing listing operations. + */ @query("sharedTo") sharedTo?: SharedToValues; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp index 7d15bca18b..a01a4f0d40 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the gallery image definition that you want to create or update.") +/** + * Specifies information about the gallery image definition that you want to create or update. + */ @parentResource(SharedGallery) model SharedGalleryImage is ProxyResource { - @doc("The name of the Shared Gallery Image Definition from which the Image Versions are to be listed.") + /** + * The name of the Shared Gallery Image Definition from which the Image Versions are to be listed. + */ @path @key("galleryImageName") @segment("images") @@ -24,16 +28,24 @@ model SharedGalleryImage is ProxyResource { @armResourceOperations interface SharedGalleryImages { - @doc("Get a shared gallery image by subscription id or tenant id.") + /** + * Get a shared gallery image by subscription id or tenant id. + */ get is ArmResourceRead; - @doc("List shared gallery images by subscription id or tenant id.") + /** + * List shared gallery images by subscription id or tenant id. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("SharedGalleryImages_List") list is ArmResourceListByParent< SharedGalleryImage, { ...BaseParameters; - @doc("The query parameter to decide what shared galleries to fetch when doing listing operations.") + /** + * The query parameter to decide what shared galleries to fetch when doing listing operations. + */ @query("sharedTo") sharedTo?: SharedToValues; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp index beea9dc24e..dd9984814a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the gallery image version that you want to create or update.") +/** + * Specifies information about the gallery image version that you want to create or update. + */ @parentResource(SharedGalleryImage) model SharedGalleryImageVersion is ProxyResource { - @doc("The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: ..") + /** + * The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. + */ @path @key("galleryImageVersionName") @segment("versions") @@ -25,16 +29,24 @@ model SharedGalleryImageVersion @armResourceOperations interface SharedGalleryImageVersions { - @doc("Get a shared gallery image version by subscription id or tenant id.") + /** + * Get a shared gallery image version by subscription id or tenant id. + */ get is ArmResourceRead; - @doc("List shared gallery image versions by subscription id or tenant id.") + /** + * List shared gallery image versions by subscription id or tenant id. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("SharedGalleryImageVersions_List") list is ArmResourceListByParent< SharedGalleryImageVersion, { ...BaseParameters; - @doc("The query parameter to decide what shared galleries to fetch when doing listing operations.") + /** + * The query parameter to decide what shared galleries to fetch when doing listing operations. + */ @query("sharedTo") sharedTo?: SharedToValues; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp index 1b55fff803..6955468869 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp @@ -11,15 +11,21 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Snapshot resource.") +/** + * Snapshot resource. + */ model Snapshot is TrackedResource { - @doc("The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters.") + /** + * The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters. + */ @path @key("snapshotName") @segment("snapshots") name: string; - @doc("The extended location where the snapshot will be created. Extended location cannot be changed.") + /** + * The extended location where the snapshot will be created. Extended location cannot be changed. + */ extendedLocation?: ExtendedLocation; ...Azure.ResourceManager.ResourceSku; @@ -28,25 +34,42 @@ model Snapshot is TrackedResource { @armResourceOperations interface Snapshots { - @doc("Gets information about a snapshot.") + /** + * Gets information about a snapshot. + */ get is ArmResourceRead; - @doc("Creates or updates a snapshot.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Creates or updates a snapshot. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Updates (patches) a snapshot.") + /** + * Updates (patches) a snapshot. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync; - @doc("Deletes a snapshot.") + /** + * Deletes a snapshot. + */ delete is ArmResourceDeleteAsync; - @doc("Lists snapshots under a resource group.") + /** + * Lists snapshots under a resource group. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Snapshots_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; - @doc("Lists snapshots under a subscription.") + /** + * Lists snapshots under a subscription. + */ list is ArmListBySubscription; - @doc("Grants access to a snapshot.") + /** + * Grants access to a snapshot. + */ grantAccess is ArmResourceActionAsync< Snapshot, GrantAccessData, @@ -55,7 +78,9 @@ interface Snapshots { ArmLroLocationHeader >; - @doc("Revokes access to a snapshot.") + /** + * Revokes access to a snapshot. + */ revokeAccess is ArmResourceActionAsync< Snapshot, void, @@ -64,3 +89,34 @@ interface Snapshots { ArmLroLocationHeader >; } + +@@projectedName(Snapshots.createOrUpdate::parameters.resource, + "json", + "snapshot" +); +@@extension(Snapshots.createOrUpdate::parameters.resource, + "x-ms-client-name", + "snapshot" +); +@@doc(Snapshots.createOrUpdate::parameters.resource, + "Snapshot object supplied in the body of the Put disk operation." +); +@@projectedName(Snapshots.update::parameters.properties, "json", "snapshot"); +@@extension(Snapshots.update::parameters.properties, + "x-ms-client-name", + "snapshot" +); +@@doc(Snapshots.update::parameters.properties, + "Snapshot object supplied in the body of the Patch snapshot operation." +); +@@projectedName(Snapshots.grantAccess::parameters.body, + "json", + "grantAccessData" +); +@@extension(Snapshots.grantAccess::parameters.body, + "x-ms-client-name", + "grantAccessData" +); +@@doc(Snapshots.grantAccess::parameters.body, + "Access data object supplied in the body of the get snapshot access operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp index d02997a9c7..0e24a35131 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp @@ -11,9 +11,13 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Specifies information about the SSH public key.") +/** + * Specifies information about the SSH public key. + */ model SshPublicKeyResource is TrackedResource { - @doc("The name of the SSH public key.") + /** + * The name of the SSH public key. + */ @path @key("sshPublicKeyName") @segment("sshPublicKeys") @@ -22,41 +26,56 @@ model SshPublicKeyResource is TrackedResource { @armResourceOperations interface SshPublicKeyResources { + /** + * Retrieves information about an SSH public key. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Retrieves information about an SSH public key.") @operationId("SshPublicKeys_Get") get is ArmResourceRead; + /** + * Creates a new SSH public key resource. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates a new SSH public key resource.") @operationId("SshPublicKeys_Create") create is ArmResourceCreateOrReplaceSync; + /** + * Updates a new SSH public key resource. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates a new SSH public key resource.") + @parameterVisibility("read") @operationId("SshPublicKeys_Update") update is ArmCustomPatchSync< SshPublicKeyResource, SshPublicKeyUpdateResource >; + /** + * Delete an SSH public key. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete an SSH public key.") @operationId("SshPublicKeys_Delete") delete is ArmResourceDeleteSync; + /** + * Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the response to get the next page of SSH public keys. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the response to get the next page of SSH public keys.") @operationId("SshPublicKeys_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; + /** + * Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys.") @operationId("SshPublicKeys_ListBySubscription") listBySubscription is ArmListBySubscription; + /** + * Generates and returns a public/private key pair and populates the SSH public key resource with the public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key resource. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Generates and returns a public/private key pair and populates the SSH public key resource with the public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key resource.") @operationId("SshPublicKeys_GenerateKeyPair") generateKeyPair is ArmResourceActionSync< SshPublicKeyResource, @@ -64,3 +83,26 @@ interface SshPublicKeyResources { SshPublicKeyGenerateKeyPairResult >; } + +@@projectedName(SshPublicKeyResources.create::parameters.resource, + "json", + "parameters" +); +@@extension(SshPublicKeyResources.create::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(SshPublicKeyResources.create::parameters.resource, + "Parameters supplied to create the SSH public key." +); +@@projectedName(SshPublicKeyResources.update::parameters.properties, + "json", + "parameters" +); +@@extension(SshPublicKeyResources.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(SshPublicKeyResources.update::parameters.properties, + "Parameters supplied to update the SSH public key." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp index bc9689a854..cd713592a6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp @@ -11,22 +11,32 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Describes a Virtual Machine.") +/** + * Describes a Virtual Machine. + */ model VirtualMachine is TrackedResource { - @doc("The name of the virtual machine.") + /** + * The name of the virtual machine. + */ @path @key("vmName") @segment("virtualMachines") name: string; - @doc("The virtual machine child extension resources.") + /** + * The virtual machine child extension resources. + */ @visibility("read") resources?: VirtualMachineExtension[]; - @doc("The virtual machine zones.") + /** + * The virtual machine zones. + */ zones?: string[]; - @doc("The extended location of the Virtual Machine.") + /** + * The extended location of the Virtual Machine. + */ extendedLocation?: ExtendedLocation; ...Azure.ResourceManager.ManagedServiceIdentity; @@ -35,70 +45,99 @@ model VirtualMachine is TrackedResource { @armResourceOperations interface VirtualMachines { - @doc("Retrieves information about the model view or the instance view of a virtual machine.") + /** + * Retrieves information about the model view or the instance view of a virtual machine. + */ get is ArmResourceRead< VirtualMachine, { ...BaseParameters; - @doc("The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the virtual machine that is managed by the platform and can change outside of control plane operations. 'UserData' retrieves the UserData property as part of the VM model view that was provided by the user during the VM Create/Update operation.") + /** + * The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the virtual machine that is managed by the platform and can change outside of control plane operations. 'UserData' retrieves the UserData property as part of the VM model view that was provided by the user during the VM Create/Update operation. + */ @query("$expand") $expand?: InstanceViewTypes; } >; - @doc("The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("The operation to update a virtual machine.") + /** + * The operation to update a virtual machine. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync; - @doc("The operation to delete a virtual machine.") + /** + * The operation to delete a virtual machine. + */ delete is ArmResourceDeleteAsync< VirtualMachine, { ...BaseParameters; - @doc("Optional parameter to force delete virtual machines.") + /** + * Optional parameter to force delete virtual machines. + */ @query("forceDeletion") forceDeletion?: boolean; } >; - @doc("Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.") + /** + * Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("VirtualMachines_List") list is ArmResourceListByParent< VirtualMachine, { ...BaseParameters; - @doc("The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'") + /** + * The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}' + */ @query("$filter") $filter?: string; - @doc("The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified") + /** + * The expand expression to apply on operation. 'instanceView' enables fetching run time status of all Virtual Machines, this can only be specified if a valid $filter option is specified + */ @query("$expand") $expand?: ExpandTypeForListVMs; } >; - @doc("Gets all the virtual machines under the specified subscription for the specified location.") + /** + * Gets all the virtual machines under the specified subscription for the specified location. + */ listByLocation is ArmResourceListAtScope< VirtualMachine, LocationScope, { ...BaseParameters; - @doc("The location for which virtual machines under the subscription are queried.") + /** + * The location for which virtual machines under the subscription are queried. + */ @pattern("^[-\\w\\._]+$") @path location: string; } >; - @doc("Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.") + /** + * Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines. + */ listAll is ArmListBySubscription; - @doc("Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.") + /** + * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. + */ capture is ArmResourceActionAsync< VirtualMachine, VirtualMachineCaptureParameters, @@ -107,10 +146,14 @@ interface VirtualMachines { ArmLroLocationHeader >; - @doc("Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.") + /** + * Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation. + */ convertToManagedDisks is ArmResourceActionAsync; - @doc("Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.") + /** + * Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses. + */ deallocate is ArmResourceActionAsync< VirtualMachine, void, @@ -118,16 +161,22 @@ interface VirtualMachines { { ...BaseParameters; - @doc("Optional parameter to hibernate a virtual machine. (Feature in Preview)") + /** + * Optional parameter to hibernate a virtual machine. (Feature in Preview) + */ @query("hibernate") hibernate?: boolean; } >; - @doc("Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image).") + /** + * Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image). + */ generalize is ArmResourceActionSync; - @doc("The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.") + /** + * The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine. + */ powerOff is ArmResourceActionAsync< VirtualMachine, void, @@ -135,32 +184,46 @@ interface VirtualMachines { { ...BaseParameters; - @doc("The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified") + /** + * The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified + */ @query("skipShutdown") skipShutdown?: boolean; } >; - @doc("The operation to reapply a virtual machine's state.") + /** + * The operation to reapply a virtual machine's state. + */ reapply is ArmResourceActionAsync; - @doc("The operation to restart a virtual machine.") + /** + * The operation to restart a virtual machine. + */ restart is ArmResourceActionAsync; - @doc("The operation to start a virtual machine.") + /** + * The operation to start a virtual machine. + */ start is ArmResourceActionAsync; - @doc("Shuts down the virtual machine, moves it to a new node, and powers it back on.") + /** + * Shuts down the virtual machine, moves it to a new node, and powers it back on. + */ redeploy is ArmResourceActionAsync; - @doc("Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.") + /** + * Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage. + */ reimage is ArmResourceActionAsync< VirtualMachine, VirtualMachineReimageParameters, void >; - @doc("The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.") + /** + * The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs. + */ retrieveBootDiagnosticsData is ArmResourceActionSync< VirtualMachine, void, @@ -168,19 +231,27 @@ interface VirtualMachines { { ...BaseParameters; - @doc("Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes.") + /** + * Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. + */ @query("sasUriExpirationTimeInMinutes") sasUriExpirationTimeInMinutes?: int32; } >; - @doc("The operation to perform maintenance on a virtual machine.") + /** + * The operation to perform maintenance on a virtual machine. + */ performMaintenance is ArmResourceActionAsync; - @doc("The operation to simulate the eviction of spot virtual machine.") + /** + * The operation to simulate the eviction of spot virtual machine. + */ simulateEviction is ArmResourceActionNoContentSync; - @doc("Assess patches on the VM.") + /** + * Assess patches on the VM. + */ assessPatches is ArmResourceActionAsync< VirtualMachine, void, @@ -189,7 +260,9 @@ interface VirtualMachines { ArmLroLocationHeader >; - @doc("Installs patches on the VM.") + /** + * Installs patches on the VM. + */ installPatches is ArmResourceActionAsync< VirtualMachine, VirtualMachineInstallPatchesParameters, @@ -198,7 +271,9 @@ interface VirtualMachines { ArmLroLocationHeader >; - @doc("Run command on the VM.") + /** + * Run command on the VM. + */ runCommand is ArmResourceActionAsync< VirtualMachine, RunCommandInput, @@ -207,45 +282,122 @@ interface VirtualMachines { ArmLroLocationHeader >; - @doc("Retrieves information about the run-time state of a virtual machine.") + /** + * Retrieves information about the run-time state of a virtual machine. + */ // FIXME: VirtualMachines_InstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView") @get - InstanceView is Azure.Core.Foundations.Operation< + instanceView is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the virtual machine.") + /** + * The name of the virtual machine. + */ @path vmName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, VirtualMachineInstanceView >; - @doc("Lists all available virtual machine sizes to which the specified virtual machine can be resized.") + /** + * Lists all available virtual machine sizes to which the specified virtual machine can be resized. + */ // FIXME: VirtualMachines_ListAvailableSizes could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes") @get - ListAvailableSizes is Azure.Core.Foundations.Operation< + listAvailableSizes is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the virtual machine.") + /** + * The name of the virtual machine. + */ @path vmName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, VirtualMachineSizeListResult >; } + +@@projectedName(VirtualMachines.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(VirtualMachines.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(VirtualMachines.createOrUpdate::parameters.resource, + "Parameters supplied to the Create Virtual Machine operation." +); +@@projectedName(VirtualMachines.update::parameters.properties, + "json", + "parameters" +); +@@extension(VirtualMachines.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(VirtualMachines.update::parameters.properties, + "Parameters supplied to the Update Virtual Machine operation." +); +@@projectedName(VirtualMachines.capture::parameters.body, "json", "parameters"); +@@extension(VirtualMachines.capture::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(VirtualMachines.capture::parameters.body, + "Parameters supplied to the Capture Virtual Machine operation." +); +@@projectedName(VirtualMachines.reimage::parameters.body, "json", "parameters"); +@@extension(VirtualMachines.reimage::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(VirtualMachines.reimage::parameters.body, + "Parameters supplied to the Reimage Virtual Machine operation." +); +@@projectedName(VirtualMachines.installPatches::parameters.body, + "json", + "installPatchesInput" +); +@@extension(VirtualMachines.installPatches::parameters.body, + "x-ms-client-name", + "installPatchesInput" +); +@@doc(VirtualMachines.installPatches::parameters.body, + "Input for InstallPatches as directly received by the API" +); +@@projectedName(VirtualMachines.runCommand::parameters.body, + "json", + "parameters" +); +@@extension(VirtualMachines.runCommand::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(VirtualMachines.runCommand::parameters.body, + "Parameters supplied to the Run command operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp index f50764350d..7e76e7d45c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Describes a Virtual Machine Extension.") +/** + * Describes a Virtual Machine Extension. + */ @parentResource(VirtualMachine) model VirtualMachineExtension is TrackedResource { - @doc("The name of the virtual machine extension.") + /** + * The name of the virtual machine extension. + */ @path @key("vmExtensionName") @segment("extensions") @@ -25,39 +29,79 @@ model VirtualMachineExtension @armResourceOperations interface VirtualMachineExtensions { - @doc("The operation to get the extension.") + /** + * The operation to get the extension. + */ get is ArmResourceRead< VirtualMachineExtension, { ...BaseParameters; - @doc("The expand expression to apply on the operation.") + /** + * The expand expression to apply on the operation. + */ @query("$expand") $expand?: string; } >; - @doc("The operation to create or update the extension.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * The operation to create or update the extension. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("The operation to update the extension.") + /** + * The operation to update the extension. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync< VirtualMachineExtension, VirtualMachineExtensionUpdate >; - @doc("The operation to delete the extension.") + /** + * The operation to delete the extension. + */ delete is ArmResourceDeleteAsync; - @doc("The operation to get all extensions of a Virtual Machine.") + /** + * The operation to get all extensions of a Virtual Machine. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("VirtualMachineExtensions_List") list is ArmResourceListByParent< VirtualMachineExtension, { ...BaseParameters; - @doc("The expand expression to apply on the operation.") + /** + * The expand expression to apply on the operation. + */ @query("$expand") $expand?: string; } >; } + +@@projectedName(VirtualMachineExtensions.createOrUpdate::parameters.resource, + "json", + "extensionParameters" +); +@@extension(VirtualMachineExtensions.createOrUpdate::parameters.resource, + "x-ms-client-name", + "extensionParameters" +); +@@doc(VirtualMachineExtensions.createOrUpdate::parameters.resource, + "Parameters supplied to the Create Virtual Machine Extension operation." +); +@@projectedName(VirtualMachineExtensions.update::parameters.properties, + "json", + "extensionParameters" +); +@@extension(VirtualMachineExtensions.update::parameters.properties, + "x-ms-client-name", + "extensionParameters" +); +@@doc(VirtualMachineExtensions.update::parameters.properties, + "Parameters supplied to the Update Virtual Machine Extension operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp index aa42ed2649..98051e915e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp @@ -11,7 +11,9 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Describes a Virtual Machine Extension Image.") +/** + * Describes a Virtual Machine Extension Image. + */ @locationResource model VirtualMachineExtensionImage is TrackedResource { @@ -23,9 +25,15 @@ model VirtualMachineExtensionImage @armResourceOperations interface VirtualMachineExtensionImages { - @doc("Gets a virtual machine extension image.") + /** + * Gets a virtual machine extension image. + */ get is ArmResourceRead; - @doc("Gets a list of virtual machine extension image types.") + /** + * Gets a list of virtual machine extension image types. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("VirtualMachineExtensionImages_ListTypes") listTypes is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp index 3bb3748be4..a0a4757fc0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Describes a Virtual Machine run command.") +/** + * Describes a Virtual Machine run command. + */ @parentResource(VirtualMachine) model VirtualMachineRunCommand is TrackedResource { - @doc("The name of the virtual machine run command.") + /** + * The name of the virtual machine run command. + */ @path @key("runCommandName") @segment("runCommands") @@ -25,53 +29,97 @@ model VirtualMachineRunCommand @armResourceOperations interface VirtualMachineRunCommands { - @doc("The operation to get the run command.") + /** + * The operation to get the run command. + */ getByVirtualMachine is ArmResourceRead< VirtualMachineRunCommand, { ...BaseParameters; - @doc("The expand expression to apply on the operation.") + /** + * The expand expression to apply on the operation. + */ @query("$expand") $expand?: string; } >; - @doc("The operation to create or update the run command.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * The operation to create or update the run command. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("The operation to update the run command.") + /** + * The operation to update the run command. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync< VirtualMachineRunCommand, VirtualMachineRunCommandUpdate >; - @doc("The operation to delete the run command.") + /** + * The operation to delete the run command. + */ delete is ArmResourceDeleteAsync; - @doc("The operation to get all run commands of a Virtual Machine.") + /** + * The operation to get all run commands of a Virtual Machine. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("VirtualMachineRunCommands_ListByVirtualMachine") listByVirtualMachine is ArmResourceListByParent< VirtualMachineRunCommand, { ...BaseParameters; - @doc("The expand expression to apply on the operation.") + /** + * The expand expression to apply on the operation. + */ @query("$expand") $expand?: string; } >; - @doc("Lists all available run commands for a subscription in a location.") + /** + * Lists all available run commands for a subscription in a location. + */ list is ArmResourceListAtScope< VirtualMachineRunCommand, LocationScope, { ...BaseParameters; - @doc("The location upon which run commands is queried.") + /** + * The location upon which run commands is queried. + */ @pattern("^[-\\w\\._]+$") @path location: string; } >; } + +@@projectedName(VirtualMachineRunCommands.createOrUpdate::parameters.resource, + "json", + "runCommand" +); +@@extension(VirtualMachineRunCommands.createOrUpdate::parameters.resource, + "x-ms-client-name", + "runCommand" +); +@@doc(VirtualMachineRunCommands.createOrUpdate::parameters.resource, + "Parameters supplied to the Create Virtual Machine RunCommand operation." +); +@@projectedName(VirtualMachineRunCommands.update::parameters.properties, + "json", + "runCommand" +); +@@extension(VirtualMachineRunCommands.update::parameters.properties, + "x-ms-client-name", + "runCommand" +); +@@doc(VirtualMachineRunCommands.update::parameters.properties, + "Parameters supplied to the Update Virtual Machine RunCommand operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp index e795a581dc..11c9877d99 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp @@ -11,19 +11,27 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Describes a Virtual Machine Scale Set.") +/** + * Describes a Virtual Machine Scale Set. + */ model VirtualMachineScaleSet is TrackedResource { - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path @key("vmScaleSetName") @segment("virtualMachineScaleSets") name: string; - @doc("The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set") + /** + * The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set + */ zones?: string[]; - @doc("The extended location of the Virtual Machine Scale Set.") + /** + * The extended location of the Virtual Machine Scale Set. + */ extendedLocation?: ExtendedLocation; ...Azure.ResourceManager.ManagedServiceIdentity; @@ -33,84 +41,117 @@ model VirtualMachineScaleSet @armResourceOperations interface VirtualMachineScaleSets { - @doc("Display information about a virtual machine scale set.") + /** + * Display information about a virtual machine scale set. + */ get is ArmResourceRead< VirtualMachineScaleSet, { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("The expand expression to apply on the operation. 'UserData' retrieves the UserData property of the VM scale set that was provided by the user during the VM scale set Create/Update operation") + /** + * The expand expression to apply on the operation. 'UserData' retrieves the UserData property of the VM scale set that was provided by the user during the VM scale set Create/Update operation + */ @query("$expand") $expand?: ExpandTypesForGetVMScaleSets; } >; - @doc("Create or update a VM scale set.") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + /** + * Create or update a VM scale set. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync< VirtualMachineScaleSet, { ...BaseParameters; - @doc("The name of the VM scale set to create or update.") + /** + * The name of the VM scale set to create or update. + */ @path vmScaleSetName: string; } >; - @doc("Update a VM scale set.") + /** + * Update a VM scale set. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync< VirtualMachineScaleSet, VirtualMachineScaleSetUpdate, { ...BaseParameters; - @doc("The name of the VM scale set to create or update.") + /** + * The name of the VM scale set to create or update. + */ @path vmScaleSetName: string; } >; - @doc("Deletes a VM scale set.") + /** + * Deletes a VM scale set. + */ delete is ArmResourceDeleteAsync< VirtualMachineScaleSet, { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("Optional parameter to force delete a VM scale set. (Feature in Preview)") + /** + * Optional parameter to force delete a VM scale set. (Feature in Preview) + */ @query("forceDeletion") forceDeletion?: boolean; } >; - @doc("Gets a list of all VM scale sets under a resource group.") + /** + * Gets a list of all VM scale sets under a resource group. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("VirtualMachineScaleSets_List") list is ArmResourceListByParent; - @doc("Gets all the VM scale sets under the specified subscription for the specified location.") + /** + * Gets all the VM scale sets under the specified subscription for the specified location. + */ listByLocation is ArmResourceListAtScope< VirtualMachineScaleSet, LocationScope, { ...BaseParameters; - @doc("The location for which VM scale sets under the subscription are queried.") + /** + * The location for which VM scale sets under the subscription are queried. + */ @pattern("^[-\\w\\._]+$") @path location: string; } >; - @doc("Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets.") + /** + * Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets. + */ listAll is ArmListBySubscription; - @doc("Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates.") + /** + * Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates. + */ deallocate is ArmResourceActionAsync< VirtualMachineScaleSet, VirtualMachineScaleSetVMInstanceIDs, @@ -118,17 +159,23 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("Optional parameter to hibernate a virtual machine from the VM scale set. (This feature is available for VMSS with Flexible OrchestrationMode only)") + /** + * Optional parameter to hibernate a virtual machine from the VM scale set. (This feature is available for VMSS with Flexible OrchestrationMode only) + */ @query("hibernate") hibernate?: boolean; } >; - @doc("Deletes virtual machines in a VM scale set.") + /** + * Deletes virtual machines in a VM scale set. + */ deleteInstances is ArmResourceActionAsync< VirtualMachineScaleSet, VirtualMachineScaleSetVMInstanceRequiredIDs, @@ -136,17 +183,23 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview)") + /** + * Optional parameter to force delete virtual machines from the VM scale set. (Feature in Preview) + */ @query("forceDeletion") forceDeletion?: boolean; } >; - @doc("Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.") + /** + * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + */ powerOff is ArmResourceActionAsync< VirtualMachineScaleSet, VirtualMachineScaleSetVMInstanceIDs, @@ -154,17 +207,23 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified") + /** + * The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified + */ @query("skipShutdown") skipShutdown?: boolean; } >; - @doc("Restarts one or more virtual machines in a VM scale set.") + /** + * Restarts one or more virtual machines in a VM scale set. + */ restart is ArmResourceActionAsync< VirtualMachineScaleSet, VirtualMachineScaleSetVMInstanceIDs, @@ -172,13 +231,17 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; - @doc("Starts one or more virtual machines in a VM scale set.") + /** + * Starts one or more virtual machines in a VM scale set. + */ start is ArmResourceActionAsync< VirtualMachineScaleSet, VirtualMachineScaleSetVMInstanceIDs, @@ -186,13 +249,17 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; - @doc("Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances") + /** + * Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances + */ reapply is ArmResourceActionAsync< VirtualMachineScaleSet, void, @@ -200,14 +267,18 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; }, ArmLroLocationHeader >; - @doc("Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.") + /** + * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on. + */ redeploy is ArmResourceActionAsync< VirtualMachineScaleSet, VirtualMachineScaleSetVMInstanceIDs, @@ -215,13 +286,17 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; - @doc("Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications") + /** + * Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications + */ performMaintenance is ArmResourceActionAsync< VirtualMachineScaleSet, VirtualMachineScaleSetVMInstanceIDs, @@ -229,13 +304,17 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; - @doc("Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.") + /** + * Upgrades one or more virtual machines to the latest SKU set in the VM scale set model. + */ updateInstances is ArmResourceActionAsync< VirtualMachineScaleSet, VirtualMachineScaleSetVMInstanceRequiredIDs, @@ -243,13 +322,17 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; - @doc("Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.") + /** + * Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. + */ reimage is ArmResourceActionAsync< VirtualMachineScaleSet, VirtualMachineScaleSetReimageParameters, @@ -257,13 +340,17 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; - @doc("Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.") + /** + * Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks. + */ reimageAll is ArmResourceActionAsync< VirtualMachineScaleSet, VirtualMachineScaleSetVMInstanceIDs, @@ -271,13 +358,17 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; - @doc("Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.") + /** + * Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. + */ forceRecoveryServiceFabricPlatformUpdateDomainWalk is ArmResourceActionSync< VirtualMachineScaleSet, void, @@ -285,25 +376,35 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("The platform update domain for which a manual recovery walk is requested") + /** + * The platform update domain for which a manual recovery walk is requested + */ @query("platformUpdateDomain") platformUpdateDomain: int32; - @doc("The zone in which the manual recovery walk is requested for cross zone virtual machine scale set") + /** + * The zone in which the manual recovery walk is requested for cross zone virtual machine scale set + */ @query("zone") zone?: string; - @doc("The placement group id for which the manual recovery walk is requested.") + /** + * The placement group id for which the manual recovery walk is requested. + */ @query("placementGroupId") placementGroupId?: string; } >; - @doc("Converts SinglePlacementGroup property to false for a existing virtual machine scale set.") + /** + * Converts SinglePlacementGroup property to false for a existing virtual machine scale set. + */ convertToSinglePlacementGroup is ArmResourceActionSync< VirtualMachineScaleSet, VMScaleSetConvertToSinglePlacementGroupInput, @@ -311,13 +412,17 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the virtual machine scale set to create or update.") + /** + * The name of the virtual machine scale set to create or update. + */ @path vmScaleSetName: string; } >; - @doc("Changes ServiceState property for a given service") + /** + * Changes ServiceState property for a given service + */ setOrchestrationServiceState is ArmResourceActionAsync< VirtualMachineScaleSet, OrchestrationServiceStateInput, @@ -325,14 +430,18 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the virtual machine scale set to create or update.") + /** + * The name of the virtual machine scale set to create or update. + */ @path vmScaleSetName: string; } >; + /** + * Cancels the current virtual machine scale set rolling upgrade. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Cancels the current virtual machine scale set rolling upgrade.") @operationId("VirtualMachineScaleSetRollingUpgrades_Cancel") cancel is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -341,14 +450,18 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; + /** + * Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected.") @operationId("VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade") startOSUpgrade is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -357,14 +470,18 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; + /** + * Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest available extension version. Instances which are already running the latest extension versions are not affected. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest available extension version. Instances which are already running the latest extension versions are not affected.") @operationId("VirtualMachineScaleSetRollingUpgrades_StartExtensionUpgrade") startExtensionUpgrade is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -373,74 +490,255 @@ interface VirtualMachineScaleSets { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; - @doc("Gets the status of a VM scale set instance.") + /** + * Gets the status of a VM scale set instance. + */ // FIXME: VirtualMachineScaleSets_GetInstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView") @get - GetInstanceView is Azure.Core.Foundations.Operation< + getInstanceView is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, VirtualMachineScaleSetInstanceView >; - @doc("Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.") + /** + * Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU. + */ // FIXME: VirtualMachineScaleSets_ListSkus could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus") @get - ListSkus is Azure.Core.Foundations.Operation< + listSkus is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, VirtualMachineScaleSetListSkusResult >; + /** + * Gets list of OS upgrades on a VM scale set instance. + */ + // FIXME: VirtualMachineScaleSets_GetOSUpgradeHistory could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("VirtualMachineScaleSets_GetOSUpgradeHistory") - @doc("Gets list of OS upgrades on a VM scale set instance.") - // FIXME: VirtualMachineScaleSets_GetOSUpgradeHistory could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory") @get - GetOSUpgradeHistory is Azure.Core.Foundations.Operation< + getOSUpgradeHistory is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, VirtualMachineScaleSetListOSUpgradeHistory >; } + +@@projectedName(VirtualMachineScaleSets.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(VirtualMachineScaleSets.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(VirtualMachineScaleSets.createOrUpdate::parameters.resource, + "The scale set object." +); +@@projectedName(VirtualMachineScaleSets.update::parameters.properties, + "json", + "parameters" +); +@@extension(VirtualMachineScaleSets.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(VirtualMachineScaleSets.update::parameters.properties, + "The scale set object." +); +@@projectedName(VirtualMachineScaleSets.deallocate::parameters.body, + "json", + "vmInstanceIDs" +); +@@extension(VirtualMachineScaleSets.deallocate::parameters.body, + "x-ms-client-name", + "vmInstanceIDs" +); +@@doc(VirtualMachineScaleSets.deallocate::parameters.body, + "A list of virtual machine instance IDs from the VM scale set." +); +@@projectedName(VirtualMachineScaleSets.deleteInstances::parameters.body, + "json", + "vmInstanceIDs" +); +@@extension(VirtualMachineScaleSets.deleteInstances::parameters.body, + "x-ms-client-name", + "vmInstanceIDs" +); +@@doc(VirtualMachineScaleSets.deleteInstances::parameters.body, + "A list of virtual machine instance IDs from the VM scale set." +); +@@projectedName(VirtualMachineScaleSets.powerOff::parameters.body, + "json", + "vmInstanceIDs" +); +@@extension(VirtualMachineScaleSets.powerOff::parameters.body, + "x-ms-client-name", + "vmInstanceIDs" +); +@@doc(VirtualMachineScaleSets.powerOff::parameters.body, + "A list of virtual machine instance IDs from the VM scale set." +); +@@projectedName(VirtualMachineScaleSets.restart::parameters.body, + "json", + "vmInstanceIDs" +); +@@extension(VirtualMachineScaleSets.restart::parameters.body, + "x-ms-client-name", + "vmInstanceIDs" +); +@@doc(VirtualMachineScaleSets.restart::parameters.body, + "A list of virtual machine instance IDs from the VM scale set." +); +@@projectedName(VirtualMachineScaleSets.start::parameters.body, + "json", + "vmInstanceIDs" +); +@@extension(VirtualMachineScaleSets.start::parameters.body, + "x-ms-client-name", + "vmInstanceIDs" +); +@@doc(VirtualMachineScaleSets.start::parameters.body, + "A list of virtual machine instance IDs from the VM scale set." +); +@@projectedName(VirtualMachineScaleSets.redeploy::parameters.body, + "json", + "vmInstanceIDs" +); +@@extension(VirtualMachineScaleSets.redeploy::parameters.body, + "x-ms-client-name", + "vmInstanceIDs" +); +@@doc(VirtualMachineScaleSets.redeploy::parameters.body, + "A list of virtual machine instance IDs from the VM scale set." +); +@@projectedName(VirtualMachineScaleSets.performMaintenance::parameters.body, + "json", + "vmInstanceIDs" +); +@@extension(VirtualMachineScaleSets.performMaintenance::parameters.body, + "x-ms-client-name", + "vmInstanceIDs" +); +@@doc(VirtualMachineScaleSets.performMaintenance::parameters.body, + "A list of virtual machine instance IDs from the VM scale set." +); +@@projectedName(VirtualMachineScaleSets.updateInstances::parameters.body, + "json", + "vmInstanceIDs" +); +@@extension(VirtualMachineScaleSets.updateInstances::parameters.body, + "x-ms-client-name", + "vmInstanceIDs" +); +@@doc(VirtualMachineScaleSets.updateInstances::parameters.body, + "A list of virtual machine instance IDs from the VM scale set." +); +@@projectedName(VirtualMachineScaleSets.reimage::parameters.body, + "json", + "vmScaleSetReimageInput" +); +@@extension(VirtualMachineScaleSets.reimage::parameters.body, + "x-ms-client-name", + "vmScaleSetReimageInput" +); +@@doc(VirtualMachineScaleSets.reimage::parameters.body, + "Parameters for Reimaging VM ScaleSet." +); +@@projectedName(VirtualMachineScaleSets.reimageAll::parameters.body, + "json", + "vmInstanceIDs" +); +@@extension(VirtualMachineScaleSets.reimageAll::parameters.body, + "x-ms-client-name", + "vmInstanceIDs" +); +@@doc(VirtualMachineScaleSets.reimageAll::parameters.body, + "A list of virtual machine instance IDs from the VM scale set." +); +@@projectedName(VirtualMachineScaleSets.convertToSinglePlacementGroup::parameters.body, + "json", + "parameters" +); +@@extension(VirtualMachineScaleSets.convertToSinglePlacementGroup::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(VirtualMachineScaleSets.convertToSinglePlacementGroup::parameters.body, + "The input object for ConvertToSinglePlacementGroup API." +); +@@projectedName(VirtualMachineScaleSets.setOrchestrationServiceState::parameters.body, + "json", + "parameters" +); +@@extension(VirtualMachineScaleSets.setOrchestrationServiceState::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(VirtualMachineScaleSets.setOrchestrationServiceState::parameters.body, + "The input object for SetOrchestrationServiceState API." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp index 0066b5a7a1..49eacbc1a8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Describes a Virtual Machine Scale Set Extension.") +/** + * Describes a Virtual Machine Scale Set Extension. + */ @parentResource(VirtualMachineScaleSet) model VirtualMachineScaleSetExtension is ProxyResource { - @doc("The name of the VM scale set extension.") + /** + * The name of the VM scale set extension. + */ @path @key("vmssExtensionName") @segment("extensions") @@ -25,68 +29,116 @@ model VirtualMachineScaleSetExtension @armResourceOperations interface VirtualMachineScaleSetExtensions { - @doc("The operation to get the extension.") + /** + * The operation to get the extension. + */ get is ArmResourceRead< VirtualMachineScaleSetExtension, { ...BaseParameters; - @doc("The name of the VM scale set containing the extension.") + /** + * The name of the VM scale set containing the extension. + */ @path vmScaleSetName: string; - @doc("The expand expression to apply on the operation.") + /** + * The expand expression to apply on the operation. + */ @query("$expand") $expand?: string; } >; - @doc("The operation to create or update an extension.") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + /** + * The operation to create or update an extension. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync< VirtualMachineScaleSetExtension, { ...BaseParameters; - @doc("The name of the VM scale set where the extension should be create or updated.") + /** + * The name of the VM scale set where the extension should be create or updated. + */ @path vmScaleSetName: string; } >; - @doc("The operation to update an extension.") + /** + * The operation to update an extension. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync< VirtualMachineScaleSetExtension, VirtualMachineScaleSetExtensionUpdate, { ...BaseParameters; - @doc("The name of the VM scale set where the extension should be updated.") + /** + * The name of the VM scale set where the extension should be updated. + */ @path vmScaleSetName: string; } >; - @doc("The operation to delete the extension.") + /** + * The operation to delete the extension. + */ delete is ArmResourceDeleteAsync< VirtualMachineScaleSetExtension, { ...BaseParameters; - @doc("The name of the VM scale set where the extension should be deleted.") + /** + * The name of the VM scale set where the extension should be deleted. + */ @path vmScaleSetName: string; } >; - @doc("Gets a list of all extensions in a VM scale set.") + /** + * Gets a list of all extensions in a VM scale set. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("VirtualMachineScaleSetExtensions_List") list is ArmResourceListByParent< VirtualMachineScaleSetExtension, { ...BaseParameters; - @doc("The name of the VM scale set containing the extension.") + /** + * The name of the VM scale set containing the extension. + */ @path vmScaleSetName: string; } >; } + +@@projectedName(VirtualMachineScaleSetExtensions.createOrUpdate::parameters.resource, + "json", + "extensionParameters" +); +@@extension(VirtualMachineScaleSetExtensions.createOrUpdate::parameters.resource, + "x-ms-client-name", + "extensionParameters" +); +@@doc(VirtualMachineScaleSetExtensions.createOrUpdate::parameters.resource, + "Parameters supplied to the Create VM scale set Extension operation." +); +@@projectedName(VirtualMachineScaleSetExtensions.update::parameters.properties, + "json", + "extensionParameters" +); +@@extension(VirtualMachineScaleSetExtensions.update::parameters.properties, + "x-ms-client-name", + "extensionParameters" +); +@@doc(VirtualMachineScaleSetExtensions.update::parameters.properties, + "Parameters supplied to the Update VM scale set Extension operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp index b4f649df86..9354cf5bfb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp @@ -12,25 +12,35 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Describes a virtual machine scale set virtual machine.") +/** + * Describes a virtual machine scale set virtual machine. + */ @parentResource(VirtualMachineScaleSet) model VirtualMachineScaleSetVM is TrackedResource { - @doc("The instance ID of the virtual machine.") + /** + * The instance ID of the virtual machine. + */ @path @key("instanceId") @segment("virtualMachines") name: string; - @doc("The virtual machine instance ID.") + /** + * The virtual machine instance ID. + */ @visibility("read") instanceId?: string; - @doc("The virtual machine child extension resources.") + /** + * The virtual machine child extension resources. + */ @visibility("read") resources?: VirtualMachineExtension[]; - @doc("The virtual machine zones.") + /** + * The virtual machine zones. + */ @visibility("read") zones?: string[]; @@ -41,80 +51,106 @@ model VirtualMachineScaleSetVM @armResourceOperations interface VirtualMachineScaleSetVMS { + /** + * Gets a virtual machine from a VM scale set. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets a virtual machine from a VM scale set.") @operationId("VirtualMachineScaleSetVMs_Get") get is ArmResourceRead< VirtualMachineScaleSetVM, { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("The expand expression to apply on the operation. 'InstanceView' will retrieve the instance view of the virtual machine. 'UserData' will retrieve the UserData of the virtual machine.") + /** + * The expand expression to apply on the operation. 'InstanceView' will retrieve the instance view of the virtual machine. 'UserData' will retrieve the UserData of the virtual machine. + */ @query("$expand") $expand?: InstanceViewTypes; } >; + /** + * Updates a virtual machine of a VM scale set. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates a virtual machine of a VM scale set.") @operationId("VirtualMachineScaleSetVMs_Update") - update is ArmResourceCreateOrUpdateAsync< + update is ArmResourceCreateOrReplaceAsync< VirtualMachineScaleSetVM, { ...BaseParameters; - @doc("The name of the VM scale set where the extension should be create or updated.") + /** + * The name of the VM scale set where the extension should be create or updated. + */ @path vmScaleSetName: string; } >; + /** + * Deletes a virtual machine from a VM scale set. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes a virtual machine from a VM scale set.") @operationId("VirtualMachineScaleSetVMs_Delete") delete is ArmResourceDeleteAsync< VirtualMachineScaleSetVM, { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("Optional parameter to force delete a virtual machine from a VM scale set. (Feature in Preview)") + /** + * Optional parameter to force delete a virtual machine from a VM scale set. (Feature in Preview) + */ @query("forceDeletion") forceDeletion?: boolean; } >; + /** + * Gets a list of all virtual machines in a VM scale sets. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets a list of all virtual machines in a VM scale sets.") @operationId("VirtualMachineScaleSetVMs_List") list is ArmResourceListByParent< VirtualMachineScaleSetVM, { ...BaseParameters; - @doc("The filter to apply to the operation. Allowed values are 'startswith(instanceView/statuses/code, 'PowerState') eq true', 'properties/latestModelApplied eq true', 'properties/latestModelApplied eq false'.") + /** + * The filter to apply to the operation. Allowed values are 'startswith(instanceView/statuses/code, 'PowerState') eq true', 'properties/latestModelApplied eq true', 'properties/latestModelApplied eq false'. + */ @query("$filter") $filter?: string; - @doc("The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'.") + /** + * The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'. + */ @query("$select") $select?: string; - @doc("The expand expression to apply to the operation. Allowed values are 'instanceView'.") + /** + * The expand expression to apply to the operation. Allowed values are 'instanceView'. + */ @query("$expand") $expand?: string; } >; + /** + * Reimages (upgrade the operating system) a specific virtual machine in a VM scale set. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.") @operationId("VirtualMachineScaleSetVMs_Reimage") reimage is ArmResourceActionAsync< VirtualMachineScaleSetVM, @@ -123,14 +159,18 @@ interface VirtualMachineScaleSetVMS { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; + /** + * Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks.") @operationId("VirtualMachineScaleSetVMs_ReimageAll") reimageAll is ArmResourceActionAsync< VirtualMachineScaleSetVM, @@ -139,14 +179,18 @@ interface VirtualMachineScaleSetVMS { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; + /** + * Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated.") @operationId("VirtualMachineScaleSetVMs_Deallocate") deallocate is ArmResourceActionAsync< VirtualMachineScaleSetVM, @@ -155,14 +199,18 @@ interface VirtualMachineScaleSetVMS { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; + /** + * Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.") @operationId("VirtualMachineScaleSetVMs_PowerOff") powerOff is ArmResourceActionAsync< VirtualMachineScaleSetVM, @@ -171,18 +219,24 @@ interface VirtualMachineScaleSetVMS { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified") + /** + * The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified + */ @query("skipShutdown") skipShutdown?: boolean; } >; + /** + * Restarts a virtual machine in a VM scale set. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Restarts a virtual machine in a VM scale set.") @operationId("VirtualMachineScaleSetVMs_Restart") restart is ArmResourceActionAsync< VirtualMachineScaleSetVM, @@ -191,14 +245,18 @@ interface VirtualMachineScaleSetVMS { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; + /** + * Starts a virtual machine in a VM scale set. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Starts a virtual machine in a VM scale set.") @operationId("VirtualMachineScaleSetVMs_Start") start is ArmResourceActionAsync< VirtualMachineScaleSetVM, @@ -207,14 +265,18 @@ interface VirtualMachineScaleSetVMS { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; + /** + * Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on.") @operationId("VirtualMachineScaleSetVMs_Redeploy") redeploy is ArmResourceActionAsync< VirtualMachineScaleSetVM, @@ -223,14 +285,18 @@ interface VirtualMachineScaleSetVMS { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; + /** + * The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set.") @operationId("VirtualMachineScaleSetVMs_RetrieveBootDiagnosticsData") retrieveBootDiagnosticsData is ArmResourceActionSync< VirtualMachineScaleSetVM, @@ -239,18 +305,24 @@ interface VirtualMachineScaleSetVMS { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes.") + /** + * Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. + */ @query("sasUriExpirationTimeInMinutes") sasUriExpirationTimeInMinutes?: int32; } >; + /** + * Performs maintenance on a virtual machine in a VM scale set. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Performs maintenance on a virtual machine in a VM scale set.") @operationId("VirtualMachineScaleSetVMs_PerformMaintenance") performMaintenance is ArmResourceActionAsync< VirtualMachineScaleSetVM, @@ -259,14 +331,18 @@ interface VirtualMachineScaleSetVMS { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; + /** + * The operation to simulate the eviction of spot virtual machine in a VM scale set. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("The operation to simulate the eviction of spot virtual machine in a VM scale set.") @operationId("VirtualMachineScaleSetVMs_SimulateEviction") simulateEviction is ArmResourceActionNoContentSync< VirtualMachineScaleSetVM, @@ -274,14 +350,18 @@ interface VirtualMachineScaleSetVMS { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; + /** + * Run command on a virtual machine in a VM scale set. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Run command on a virtual machine in a VM scale set.") @operationId("VirtualMachineScaleSetVMs_RunCommand") runCommand is ArmResourceActionAsync< VirtualMachineScaleSetVM, @@ -290,37 +370,83 @@ interface VirtualMachineScaleSetVMS { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; }, ArmLroLocationHeader >; + /** + * Gets the status of a virtual machine from a VM scale set. + */ + // FIXME: VirtualMachineScaleSetVMs_GetInstanceView could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("VirtualMachineScaleSetVMs_GetInstanceView") - @doc("Gets the status of a virtual machine from a VM scale set.") - // FIXME: VirtualMachineScaleSetVMs_GetInstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/instanceView") @get - GetInstanceView is Azure.Core.Foundations.Operation< + getInstanceView is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("The instance ID of the virtual machine.") + /** + * The instance ID of the virtual machine. + */ @path instanceId: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, VirtualMachineScaleSetVMInstanceView >; } + +@@projectedName(VirtualMachineScaleSetVMS.update::parameters.resource, + "json", + "parameters" +); +@@extension(VirtualMachineScaleSetVMS.update::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(VirtualMachineScaleSetVMS.update::parameters.resource, + "Parameters supplied to the Update Virtual Machine Scale Sets VM operation." +); +@@projectedName(VirtualMachineScaleSetVMS.reimage::parameters.body, + "json", + "vmScaleSetVMReimageInput" +); +@@extension(VirtualMachineScaleSetVMS.reimage::parameters.body, + "x-ms-client-name", + "vmScaleSetVMReimageInput" +); +@@doc(VirtualMachineScaleSetVMS.reimage::parameters.body, + "Parameters for the Reimaging Virtual machine in ScaleSet." +); +@@projectedName(VirtualMachineScaleSetVMS.runCommand::parameters.body, + "json", + "parameters" +); +@@extension(VirtualMachineScaleSetVMS.runCommand::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(VirtualMachineScaleSetVMS.runCommand::parameters.body, + "Parameters supplied to the Run command operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp index 3c7653a86c..c9af7a012b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Compute; -@doc("Describes a VMSS VM Extension.") +/** + * Describes a VMSS VM Extension. + */ @parentResource(VirtualMachineScaleSetVM) model VirtualMachineScaleSetVMExtension is ProxyResource { - @doc("The name of the virtual machine extension.") + /** + * The name of the virtual machine extension. + */ @path @key("vmExtensionName") @segment("extensions") @@ -25,40 +29,53 @@ model VirtualMachineScaleSetVMExtension @armResourceOperations interface VirtualMachineScaleSetVMExtensions { + /** + * The operation to get the VMSS VM extension. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("The operation to get the VMSS VM extension.") @operationId("VirtualMachineScaleSetVMExtensions_Get") get is ArmResourceRead< VirtualMachineScaleSetVMExtension, { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("The expand expression to apply on the operation.") + /** + * The expand expression to apply on the operation. + */ @query("$expand") $expand?: string; } >; + /** + * The operation to create or update the VMSS VM extension. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("The operation to create or update the VMSS VM extension.") @operationId("VirtualMachineScaleSetVMExtensions_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< VirtualMachineScaleSetVMExtension, { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; + /** + * The operation to update the VMSS VM extension. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("The operation to update the VMSS VM extension.") + @parameterVisibility("read") @operationId("VirtualMachineScaleSetVMExtensions_Update") update is ArmCustomPatchAsync< VirtualMachineScaleSetVMExtension, @@ -66,41 +83,76 @@ interface VirtualMachineScaleSetVMExtensions { { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; + /** + * The operation to delete the VMSS VM extension. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("The operation to delete the VMSS VM extension.") @operationId("VirtualMachineScaleSetVMExtensions_Delete") delete is ArmResourceDeleteAsync< VirtualMachineScaleSetVMExtension, { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; } >; + /** + * The operation to get all extensions of an instance in Virtual Machine Scaleset. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("The operation to get all extensions of an instance in Virtual Machine Scaleset.") @operationId("VirtualMachineScaleSetVMExtensions_List") list is ArmResourceListByParent< VirtualMachineScaleSetVMExtension, { ...BaseParameters; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("The expand expression to apply on the operation.") + /** + * The expand expression to apply on the operation. + */ @query("$expand") $expand?: string; } >; } + +@@projectedName(VirtualMachineScaleSetVMExtensions.createOrUpdate::parameters.resource, + "json", + "extensionParameters" +); +@@extension(VirtualMachineScaleSetVMExtensions.createOrUpdate::parameters.resource, + "x-ms-client-name", + "extensionParameters" +); +@@doc(VirtualMachineScaleSetVMExtensions.createOrUpdate::parameters.resource, + "Parameters supplied to the Create Virtual Machine Extension operation." +); +@@projectedName(VirtualMachineScaleSetVMExtensions.update::parameters.properties, + "json", + "extensionParameters" +); +@@extension(VirtualMachineScaleSetVMExtensions.update::parameters.properties, + "x-ms-client-name", + "extensionParameters" +); +@@doc(VirtualMachineScaleSetVMExtensions.update::parameters.properties, + "Parameters supplied to the Update Virtual Machine Extension operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_Availability_Set_Delete_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_Availability_Set_Delete_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_Availability_Set_Delete_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_Availability_Set_Delete_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_Availability_Set_Get_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_Availability_Set_Get_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_Availability_Set_Get_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_Availability_Set_Get_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_Availability_Set_List_Available_Sizes_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_Availability_Set_List_Available_Sizes_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_Availability_Set_List_Available_Sizes_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_Availability_Set_List_Available_Sizes_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_Availability_Set_List_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_Availability_Set_List_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_Availability_Set_List_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_Availability_Set_List_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_Availability_Set_Update_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_Availability_Set_Update_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_Availability_Set_Update_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_Availability_Set_Update_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_Capacity_Reservation_Group_Delete_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_Capacity_Reservation_Group_Delete_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_Capacity_Reservation_Group_Delete_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_Capacity_Reservation_Group_Delete_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_Capacity_Reservation_Group_Update_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_Capacity_Reservation_Group_Update_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_Capacity_Reservation_Group_Update_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_Capacity_Reservation_Group_Update_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_Capacity_Reservation_Delete_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_Capacity_Reservation_Delete_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_Capacity_Reservation_Delete_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_Capacity_Reservation_Delete_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_Capacity_Reservation_Update_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_Capacity_Reservation_Update_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_Capacity_Reservation_Update_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_Capacity_Reservation_Update_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRoles.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_Create_New_Cloud_Service_With_Multiple_Roles.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRoles.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_Create_New_Cloud_Service_With_Multiple_Roles.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRolesInASpecificAvailabilityZone.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_Create_New_Cloud_Service_With_Multiple_Roles_In_A_Specific_Availability_Zone.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRolesInASpecificAvailabilityZone.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_Create_New_Cloud_Service_With_Multiple_Roles_In_A_Specific_Availability_Zone.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRole.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_Create_New_Cloud_Service_With_Single_Role.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRole.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_Create_New_Cloud_Service_With_Single_Role.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndCertificateFromKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_Create_New_Cloud_Service_With_Single_Role_And_Certificate_From_Key_Vault.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndCertificateFromKeyVault.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_Create_New_Cloud_Service_With_Single_Role_And_Certificate_From_Key_Vault.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndRdpExtension.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_Create_New_Cloud_Service_With_Single_Role_And_Rdp_Extension.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndRdpExtension.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_Create_New_Cloud_Service_With_Single_Role_And_Rdp_Extension.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_Create_Or_Update_A_Dedicated_Host_Group.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroup.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_Create_Or_Update_A_Dedicated_Host_Group.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroupWithUltraSsdSupport.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_Create_Or_Update_A_Dedicated_Host_Group_With_Ultra_Ssd_Support.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroupWithUltraSsdSupport.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_Create_Or_Update_A_Dedicated_Host_Group_With_Ultra_Ssd_Support.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_Dedicated_Host_Group_Delete_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_Dedicated_Host_Group_Delete_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_Dedicated_Host_Group_Delete_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_Dedicated_Host_Group_Delete_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateADedicatedHostGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_Create_A_Dedicated_Host_Group.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateADedicatedHostGroup.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_Create_A_Dedicated_Host_Group.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateAnUltraSsdEnabledDedicatedHostGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_Create_An_Ultra_Ssd_Enabled_Dedicated_Host_Group.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateAnUltraSsdEnabledDedicatedHostGroup.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_Create_An_Ultra_Ssd_Enabled_Dedicated_Host_Group.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_Dedicated_Host_Group_List_By_Resource_Group_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_Dedicated_Host_Group_List_By_Resource_Group_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_Dedicated_Host_Group_List_By_Resource_Group_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_Dedicated_Host_Group_List_By_Resource_Group_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_Dedicated_Host_Group_List_By_Subscription_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_Dedicated_Host_Group_List_By_Subscription_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_Dedicated_Host_Group_List_By_Subscription_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_Dedicated_Host_Group_List_By_Subscription_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_Dedicated_Host_Group_Update_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_Dedicated_Host_Group_Update_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_Dedicated_Host_Group_Update_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_Dedicated_Host_Group_Update_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_Dedicated_Host_Delete_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_Dedicated_Host_Delete_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_Dedicated_Host_Delete_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_Dedicated_Host_Delete_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_Dedicated_Host_List_By_Host_Group_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_Dedicated_Host_List_By_Host_Group_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_Dedicated_Host_List_By_Host_Group_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_Dedicated_Host_List_By_Host_Group_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_Dedicated_Host_Update_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_Dedicated_Host_Update_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_Dedicated_Host_Update_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_Dedicated_Host_Update_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateResize.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_Dedicated_Host_Update_Resize.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateResize.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_Dedicated_Host_Update_Resize.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_Get_Information_About_A_Disk_Access_Resource.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_Get_Information_About_A_Disk_Access_Resource.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResourceWithPrivateEndpoints.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_Get_Information_About_A_Disk_Access_Resource_With_Private_Endpoints.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResourceWithPrivateEndpoints.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_Get_Information_About_A_Disk_Access_Resource_With_Private_Endpoints.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_Create_A_Disk_Encryption_Set.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSet.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_Create_A_Disk_Encryption_Set.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_Create_A_Disk_Encryption_Set_With_Key_Vault_From_A_Different_Subscription.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentSubscription.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_Create_A_Disk_Encryption_Set_With_Key_Vault_From_A_Different_Subscription.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentTenant.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_Create_A_Disk_Encryption_Set_With_Key_Vault_From_A_Different_Tenant.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentTenant.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_Create_A_Disk_Encryption_Set_With_Key_Vault_From_A_Different_Tenant.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_Get_Information_About_A_Disk_Encryption_Set.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSet.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_Get_Information_About_A_Disk_Encryption_Set.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSetWhenAutoKeyRotationFailed.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_Get_Information_About_A_Disk_Encryption_Set_When_Auto_Key_Rotation_Failed.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSetWhenAutoKeyRotationFailed.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_Get_Information_About_A_Disk_Encryption_Set_When_Auto_Key_Rotation_Failed.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_Update_A_Disk_Encryption_Set.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSet.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_Update_A_Disk_Encryption_Set.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueSucceeded.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_Update_A_Disk_Encryption_Set_With_Rotation_To_Latest_Key_Version_Enabled_Set_To_True_Succeeded.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueSucceeded.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_Update_A_Disk_Encryption_Set_With_Rotation_To_Latest_Key_Version_Enabled_Set_To_True_Succeeded.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueUpdating.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_Update_A_Disk_Encryption_Set_With_Rotation_To_Latest_Key_Version_Enabled_Set_To_True_Updating.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueUpdating.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_Update_A_Disk_Encryption_Set_With_Rotation_To_Latest_Key_Version_Enabled_Set_To_True_Updating.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_Get_An_Incremental_Disk_Restore_Point_Resource.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointResource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_Get_An_Incremental_Disk_Restore_Point_Resource.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointWhenSourceResourceIsFromADifferentRegion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_Get_An_Incremental_Disk_Restore_Point_When_Source_Resource_Is_From_A_Different_Region.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointWhenSourceResourceIsFromADifferentRegion.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_Get_An_Incremental_Disk_Restore_Point_When_Source_Resource_Is_From_A_Different_Region.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAConfidentialVmSupportedDiskEncryptedWithCustomerManagedKey.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Confidential_Vm_Supported_Disk_Encrypted_With_Customer_Managed_Key.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAConfidentialVmSupportedDiskEncryptedWithCustomerManagedKey.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Confidential_Vm_Supported_Disk_Encrypted_With_Customer_Managed_Key.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskAccessResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_And_Associate_With_Disk_Access_Resource.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskAccessResource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_And_Associate_With_Disk_Access_Resource.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskEncryptionSet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_And_Associate_With_Disk_Encryption_Set.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskEncryptionSet.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_And_Associate_With_Disk_Encryption_Set.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByCopyingASnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_By_Copying_A_Snapshot.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByCopyingASnapshot.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_By_Copying_A_Snapshot.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromADifferentSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_By_Importing_An_Unmanaged_Blob_From_A_Different_Subscription.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromADifferentSubscription.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_By_Importing_An_Unmanaged_Blob_From_A_Different_Subscription.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromTheSameSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_By_Importing_An_Unmanaged_Blob_From_The_Same_Subscription.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromTheSameSubscription.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_By_Importing_An_Unmanaged_Blob_From_The_Same_Subscription.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAPlatformImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_A_Platform_Image.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAPlatformImage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_A_Platform_Image.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryCommunityImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_An_Azure_Compute_Gallery_Community_Image.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryCommunityImage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_An_Azure_Compute_Gallery_Community_Image.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryDirectSharedImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_An_Azure_Compute_Gallery_Direct_Shared_Image.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryDirectSharedImage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_An_Azure_Compute_Gallery_Direct_Shared_Image.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_An_Azure_Compute_Gallery_Image.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryImage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_An_Azure_Compute_Gallery_Image.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnExistingManagedDiskInTheSameOrDifferentSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_An_Existing_Managed_Disk_In_The_Same_Or_Different_Subscription.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnExistingManagedDiskInTheSameOrDifferentSubscription.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_An_Existing_Managed_Disk_In_The_Same_Or_Different_Subscription.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromElasticSanVolumeSnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_Elastic_San_Volume_Snapshot.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromElasticSanVolumeSnapshot.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_Elastic_San_Volume_Snapshot.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromImportSecureCreateOption.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_Import_Secure_Create_Option.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromImportSecureCreateOption.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_Import_Secure_Create_Option.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromUploadPreparedSecureCreateOption.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_Upload_Prepared_Secure_Create_Option.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromUploadPreparedSecureCreateOption.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_From_Upload_Prepared_Secure_Create_Option.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithDataAccessAuthMode.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Data_Access_Auth_Mode.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithDataAccessAuthMode.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Data_Access_Auth_Mode.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithOptimizedForFrequentAttach.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Optimized_For_Frequent_Attach.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithOptimizedForFrequentAttach.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Optimized_For_Frequent_Attach.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPerformancePlus.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Performance_Plus.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPerformancePlus.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Performance_Plus.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPremiumV2AccountType.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Premium_V2_Account_Type.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPremiumV2AccountType.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Premium_V2_Account_Type.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSecurityProfile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Security_Profile.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSecurityProfile.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Security_Profile.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSsdZrsAccountType.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Ssd_Zrs_Account_Type.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSsdZrsAccountType.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Ssd_Zrs_Account_Type.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithUltraAccountTypeWithReadOnlyPropertySet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Ultra_Account_Type_With_Read_Only_Property_Set.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithUltraAccountTypeWithReadOnlyPropertySet.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Disk_With_Ultra_Account_Type_With_Read_Only_Property_Set.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedUploadDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Upload_Disk.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedUploadDisk.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_A_Managed_Upload_Disk.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_An_Empty_Managed_Disk.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDisk.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_An_Empty_Managed_Disk.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDiskInExtendedLocation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_An_Empty_Managed_Disk_In_Extended_Location.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDiskInExtendedLocation.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_An_Empty_Managed_Disk_In_Extended_Location.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnUltraManagedDiskWithLogicalSectorSize_512E.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_An_Ultra_Managed_Disk_With_Logical_Sector_Size_512_E.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnUltraManagedDiskWithLogicalSectorSize_512E.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_Create_An_Ultra_Managed_Disk_With_Logical_Sector_Size_512_E.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetASasOnAManagedDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_Get_A_Sas_On_A_Managed_Disk.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetASasOnAManagedDisk.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_Get_A_Sas_On_A_Managed_Disk.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetSasOnManagedDiskAndVmGuestState.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_Get_Sas_On_Managed_Disk_And_Vm_Guest_State.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetSasOnManagedDiskAndVmGuestState.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_Get_Sas_On_Managed_Disk_And_Vm_Guest_State.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_CreateOrUpdateABurstingEnabledManagedDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Create_Or_Update_A_Bursting_Enabled_Managed_Disk.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_CreateOrUpdateABurstingEnabledManagedDisk.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Create_Or_Update_A_Bursting_Enabled_Managed_Disk.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddAcceleratedNetworking.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_To_Add_Accelerated_Networking.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddAcceleratedNetworking.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_To_Add_Accelerated_Networking.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddArchitecture.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_To_Add_Architecture.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddArchitecture.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_To_Add_Architecture.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddPurchasePlan.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_To_Add_Purchase_Plan.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddPurchasePlan.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_To_Add_Purchase_Plan.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddSupportsHibernation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_To_Add_Supports_Hibernation.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddSupportsHibernation.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_To_Add_Supports_Hibernation.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToChangeTier.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_To_Change_Tier.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToChangeTier.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_To_Change_Tier.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableBursting.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_To_Disable_Bursting.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableBursting.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_To_Disable_Bursting.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableOptimizedForFrequentAttach.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_To_Disable_Optimized_For_Frequent_Attach.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableOptimizedForFrequentAttach.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_To_Disable_Optimized_For_Frequent_Attach.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskWithDiskControllerTypes.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_With_Disk_Controller_Types.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskWithDiskControllerTypes.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_A_Managed_Disk_With_Disk_Controller_Types.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateManagedDiskToRemoveDiskAccessResourceAssociation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_Managed_Disk_To_Remove_Disk_Access_Resource_Association.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateManagedDiskToRemoveDiskAccessResourceAssociation.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_Update_Managed_Disk_To_Remove_Disk_Access_Resource_Association.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateACommunityGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_Create_A_Community_Gallery.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateACommunityGallery.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_Create_A_Community_Gallery.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGallery.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSharingProfile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_With_Sharing_Profile.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSharingProfile.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_With_Sharing_Profile.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSoftDeletionEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_With_Soft_Deletion_Enabled.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSoftDeletionEnabled.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_With_Soft_Deletion_Enabled.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetACommunityGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_Get_A_Community_Gallery.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetACommunityGallery.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_Get_A_Community_Gallery.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_Get_A_Gallery.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGallery.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_Get_A_Gallery.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithExpandSharingProfileGroups.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_Get_A_Gallery_With_Expand_Sharing_Profile_Groups.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithExpandSharingProfileGroups.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_Get_A_Gallery_With_Expand_Sharing_Profile_Groups.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithSelectPermissions.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_Get_A_Gallery_With_Select_Permissions.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithSelectPermissions.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_Get_A_Gallery_With_Select_Permissions.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_Get_A_Gallery_Application_Version.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersion.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_Get_A_Gallery_Application_Version.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersionWithReplicationStatus.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_Get_A_Gallery_Application_Version_With_Replication_Status.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersionWithReplicationStatus.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_Get_A_Gallery_Application_Version_With_Replication_Status.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Community_Gallery_Image_As_Source.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Community_Gallery_Image_As_Source.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Managed_Image_As_Source.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Managed_Image_As_Source.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapshotsAsASource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Mix_Of_Disks_And_Snapshots_As_A_Source.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapshotsAsASource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Mix_Of_Disks_And_Snapshots_As_A_Source.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMode.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Shallow_Replication_Mode.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMode.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Shallow_Replication_Mode.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Shared_Image_As_Source.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Shared_Image_As_Source.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Snapshots_As_A_Source.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Snapshots_As_A_Source.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVhdAsASource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Vhd_As_A_Source.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVhdAsASource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Vhd_As_A_Source.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVmAsSource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Vm_As_Source.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVmAsSource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_Using_Vm_As_Source.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_With_Target_Extended_Locations_Specified.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_Create_Or_Update_A_Simple_Gallery_Image_Version_With_Target_Extended_Locations_Specified.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_Get_A_Gallery_Image_Version.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersion.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_Get_A_Gallery_Image_Version.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithReplicationStatus.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_Get_A_Gallery_Image_Version_With_Replication_Status.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithReplicationStatus.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_Get_A_Gallery_Image_Version_With_Replication_Status.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithSnapshotsAsASource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_Get_A_Gallery_Image_Version_With_Snapshots_As_A_Source.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithSnapshotsAsASource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_Get_A_Gallery_Image_Version_With_Snapshots_As_A_Source.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithVhdAsASource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_Get_A_Gallery_Image_Version_With_Vhd_As_A_Source.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithVhdAsASource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_Get_A_Gallery_Image_Version_With_Vhd_As_A_Source.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionManagedImageAsSource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_Update_A_Simple_Gallery_Image_Version_Managed_Image_As_Source.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionManagedImageAsSource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_Update_A_Simple_Gallery_Image_Version_Managed_Image_As_Source.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionWithoutSourceId.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_Update_A_Simple_Gallery_Image_Version_Without_Source_Id.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionWithoutSourceId.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_Update_A_Simple_Gallery_Image_Version_Without_Source_Id.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_AddSharingIdToTheSharingProfileOfAGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_Add_Sharing_Id_To_The_Sharing_Profile_Of_A_Gallery.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_AddSharingIdToTheSharingProfileOfAGallery.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_Add_Sharing_Id_To_The_Sharing_Profile_Of_A_Gallery.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ResetSharingProfileOfAGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_Reset_Sharing_Profile_Of_A_Gallery.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ResetSharingProfileOfAGallery.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_Reset_Sharing_Profile_Of_A_Gallery.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ShareAGalleryToCommunity.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_Share_A_Gallery_To_Community.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ShareAGalleryToCommunity.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_Share_A_Gallery_To_Community.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlob.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Blob.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlob.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Blob.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlobWithDiskEncryptionSetResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Blob_With_Disk_Encryption_Set_Resource.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlobWithDiskEncryptionSetResource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Blob_With_Disk_Encryption_Set_Resource.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Managed_Disk.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDisk.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Managed_Disk.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDiskWithDiskEncryptionSetResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Managed_Disk_With_Disk_Encryption_Set_Resource.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDiskWithDiskEncryptionSetResource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Managed_Disk_With_Disk_Encryption_Set_Resource.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Snapshot.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshot.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Snapshot.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshotWithDiskEncryptionSetResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Snapshot_With_Disk_Encryption_Set_Resource.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshotWithDiskEncryptionSetResource.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_A_Snapshot_With_Disk_Encryption_Set_Resource.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAnExistingVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_An_Existing_Virtual_Machine.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAnExistingVirtualMachine.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_From_An_Existing_Virtual_Machine.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromABlob.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_That_Includes_A_Data_Disk_From_A_Blob.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromABlob.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_That_Includes_A_Data_Disk_From_A_Blob.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromAManagedDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_That_Includes_A_Data_Disk_From_A_Managed_Disk.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromAManagedDisk.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_That_Includes_A_Data_Disk_From_A_Managed_Disk.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromASnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_That_Includes_A_Data_Disk_From_A_Snapshot.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromASnapshot.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_Create_A_Virtual_Machine_Image_That_Includes_A_Data_Disk_From_A_Snapshot.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_Image_Delete_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_Image_Delete_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_Image_Delete_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_Image_Delete_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollection.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_Create_Or_Update_A_Restore_Point_Collection.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollection.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_Create_Or_Update_A_Restore_Point_Collection.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollectionForCrossRegionCopy.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_Create_Or_Update_A_Restore_Point_Collection_For_Cross_Region_Copy.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollectionForCrossRegionCopy.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_Create_Or_Update_A_Restore_Point_Collection_For_Cross_Region_Copy.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_Restore_Point_Collection_Delete_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_Restore_Point_Collection_Delete_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_Restore_Point_Collection_Delete_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_Restore_Point_Collection_Delete_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionButNotTheRestorePointsContainedInTheRestorePointCollection.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_Get_A_Restore_Point_Collection_But_Not_The_Restore_Points_Contained_In_The_Restore_Point_Collection.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionButNotTheRestorePointsContainedInTheRestorePointCollection.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_Get_A_Restore_Point_Collection_But_Not_The_Restore_Points_Contained_In_The_Restore_Point_Collection.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionIncludingTheRestorePointsContainedInTheRestorePointCollection.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_Get_A_Restore_Point_Collection_Including_The_Restore_Points_Contained_In_The_Restore_Point_Collection.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionIncludingTheRestorePointsContainedInTheRestorePointCollection.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_Get_A_Restore_Point_Collection_Including_The_Restore_Points_Contained_In_The_Restore_Point_Collection.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_Restore_Point_Collection_Update_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_Restore_Point_Collection_Update_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_Restore_Point_Collection_Update_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_Restore_Point_Collection_Update_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CopyARestorePointToADifferentRegion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_Copy_A_Restore_Point_To_A_Different_Region.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CopyARestorePointToADifferentRegion.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_Copy_A_Restore_Point_To_A_Different_Region.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CreateARestorePoint.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_Create_A_Restore_Point.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CreateARestorePoint.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_Create_A_Restore_Point.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_Restore_Point_Delete_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_Restore_Point_Delete_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_Restore_Point_Delete_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_Restore_Point_Delete_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetARestorePoint.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_Get_A_Restore_Point.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetARestorePoint.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_Get_A_Restore_Point.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetRestorePointWithInstanceView.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_Get_Restore_Point_With_Instance_View.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetRestorePointWithInstanceView.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_Get_Restore_Point_With_Instance_View.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_Create_A_Snapshot_By_Importing_An_Unmanaged_Blob_From_A_Different_Subscription.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_Create_A_Snapshot_By_Importing_An_Unmanaged_Blob_From_A_Different_Subscription.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromTheSameSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_Create_A_Snapshot_By_Importing_An_Unmanaged_Blob_From_The_Same_Subscription.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromTheSameSubscription.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_Create_A_Snapshot_By_Importing_An_Unmanaged_Blob_From_The_Same_Subscription.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnElasticSanVolumeSnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_Create_A_Snapshot_From_An_Elastic_San_Volume_Snapshot.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnElasticSanVolumeSnapshot.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_Create_A_Snapshot_From_An_Elastic_San_Volume_Snapshot.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_Create_A_Snapshot_From_An_Existing_Snapshot_In_The_Same_Or_A_Different_Subscription.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscription.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_Create_A_Snapshot_From_An_Existing_Snapshot_In_The_Same_Or_A_Different_Subscription.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_Create_A_Snapshot_From_An_Existing_Snapshot_In_The_Same_Or_A_Different_Subscription_In_A_Different_Region.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegion.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_Create_A_Snapshot_From_An_Existing_Snapshot_In_The_Same_Or_A_Different_Subscription_In_A_Different_Region.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutASnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_Get_Information_About_A_Snapshot.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutASnapshot.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_Get_Information_About_A_Snapshot.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutAnIncrementalSnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_Get_Information_About_An_Incremental_Snapshot.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutAnIncrementalSnapshot.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_Get_Information_About_An_Incremental_Snapshot.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_Update_A_Snapshot.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshot.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_Update_A_Snapshot.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshotWithAcceleratedNetworking.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_Update_A_Snapshot_With_Accelerated_Networking.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshotWithAcceleratedNetworking.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_Update_A_Snapshot_With_Accelerated_Networking.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_Ssh_Public_Key_Delete_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_Ssh_Public_Key_Delete_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_Ssh_Public_Key_Delete_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_Ssh_Public_Key_Delete_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_Ssh_Public_Key_List_By_Resource_Group_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_Ssh_Public_Key_List_By_Resource_Group_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_Ssh_Public_Key_List_By_Resource_Group_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_Ssh_Public_Key_List_By_Resource_Group_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_Ssh_Public_Key_List_By_Subscription_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_Ssh_Public_Key_List_By_Subscription_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_Ssh_Public_Key_List_By_Subscription_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_Ssh_Public_Key_List_By_Subscription_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_Ssh_Public_Key_Update_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_Ssh_Public_Key_Update_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_Ssh_Public_Key_Update_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_Ssh_Public_Key_Update_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_Virtual_Machine_Extension_Image_Get_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_Virtual_Machine_Extension_Image_Get_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_Virtual_Machine_Extension_Image_Get_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_Virtual_Machine_Extension_Image_Get_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_Virtual_Machine_Extension_Image_List_Types_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_Virtual_Machine_Extension_Image_List_Types_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_Virtual_Machine_Extension_Image_List_Types_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_Virtual_Machine_Extension_Image_List_Types_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_Virtual_Machine_Extension_Create_Or_Update_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_Virtual_Machine_Extension_Create_Or_Update_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_Virtual_Machine_Extension_Create_Or_Update_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_Virtual_Machine_Extension_Create_Or_Update_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_Virtual_Machine_Extension_Delete_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_Virtual_Machine_Extension_Delete_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_Virtual_Machine_Extension_Delete_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_Virtual_Machine_Extension_Delete_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_Virtual_Machine_Extension_Get_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_Virtual_Machine_Extension_Get_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_Virtual_Machine_Extension_Get_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_Virtual_Machine_Extension_Get_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_Virtual_Machine_Extension_List_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_Virtual_Machine_Extension_List_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_Virtual_Machine_Extension_List_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_Virtual_Machine_Extension_List_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_Virtual_Machine_Scale_Set_Extension_Create_Or_Update_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_Virtual_Machine_Scale_Set_Extension_Create_Or_Update_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_Virtual_Machine_Scale_Set_Extension_Create_Or_Update_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_Virtual_Machine_Scale_Set_Extension_Create_Or_Update_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_Virtual_Machine_Scale_Set_Extension_Delete_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_Virtual_Machine_Scale_Set_Extension_Delete_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_Virtual_Machine_Scale_Set_Extension_Delete_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_Virtual_Machine_Scale_Set_Extension_Delete_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_Virtual_Machine_Scale_Set_Extension_Get_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_Virtual_Machine_Scale_Set_Extension_Get_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_Virtual_Machine_Scale_Set_Extension_Get_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_Virtual_Machine_Scale_Set_Extension_Get_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_Virtual_Machine_Scale_Set_Extension_List_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_Virtual_Machine_Scale_Set_Extension_List_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_Virtual_Machine_Scale_Set_Extension_List_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_Virtual_Machine_Scale_Set_Extension_List_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_Virtual_Machine_Scale_Set_Extension_Update_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_Virtual_Machine_Scale_Set_Extension_Update_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_Virtual_Machine_Scale_Set_Extension_Update_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_Virtual_Machine_Scale_Set_Extension_Update_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_Virtual_Machine_Scale_Set_Rolling_Upgrade_Cancel_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_Virtual_Machine_Scale_Set_Rolling_Upgrade_Cancel_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_Virtual_Machine_Scale_Set_Rolling_Upgrade_Cancel_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_Virtual_Machine_Scale_Set_Rolling_Upgrade_Cancel_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_Virtual_Machine_Scale_Set_Rolling_Upgrade_Get_Latest_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_Virtual_Machine_Scale_Set_Rolling_Upgrade_Get_Latest_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_Virtual_Machine_Scale_Set_Rolling_Upgrade_Get_Latest_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_Virtual_Machine_Scale_Set_Rolling_Upgrade_Get_Latest_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_Virtual_Machine_Scale_Set_Rolling_Upgrade_Start_Os_Upgrade_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_Virtual_Machine_Scale_Set_Rolling_Upgrade_Start_Os_Upgrade_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_Virtual_Machine_Scale_Set_Rolling_Upgrade_Start_Os_Upgrade_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_Virtual_Machine_Scale_Set_Rolling_Upgrade_Start_Os_Upgrade_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_Virtual_Machine_Scale_Set_Vm_Deallocate_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_Virtual_Machine_Scale_Set_Vm_Deallocate_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_Virtual_Machine_Scale_Set_Vm_Deallocate_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_Virtual_Machine_Scale_Set_Vm_Deallocate_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithUserData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_Get_Vm_Scale_Set_Vm_With_User_Data.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithUserData.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_Get_Vm_Scale_Set_Vm_With_User_Data.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithVmSizeProperties.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_Get_Vm_Scale_Set_Vm_With_Vm_Size_Properties.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithVmSizeProperties.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_Get_Vm_Scale_Set_Vm_With_Vm_Size_Properties.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_Virtual_Machine_Scale_Set_Vm_List_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_Virtual_Machine_Scale_Set_Vm_List_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_Virtual_Machine_Scale_Set_Vm_List_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_Virtual_Machine_Scale_Set_Vm_List_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_Virtual_Machine_Scale_Set_Vm_Perform_Maintenance_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_Virtual_Machine_Scale_Set_Vm_Perform_Maintenance_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_Virtual_Machine_Scale_Set_Vm_Perform_Maintenance_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_Virtual_Machine_Scale_Set_Vm_Perform_Maintenance_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_Virtual_Machine_Scale_Set_Vm_Power_Off_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_Virtual_Machine_Scale_Set_Vm_Power_Off_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_Virtual_Machine_Scale_Set_Vm_Power_Off_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_Virtual_Machine_Scale_Set_Vm_Power_Off_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_Virtual_Machine_Scale_Set_Vm_Redeploy_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_Virtual_Machine_Scale_Set_Vm_Redeploy_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_Virtual_Machine_Scale_Set_Vm_Redeploy_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_Virtual_Machine_Scale_Set_Vm_Redeploy_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_Virtual_Machine_Scale_Set_Vm_Reimage_All_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_Virtual_Machine_Scale_Set_Vm_Reimage_All_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_Virtual_Machine_Scale_Set_Vm_Reimage_All_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_Virtual_Machine_Scale_Set_Vm_Reimage_All_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_Virtual_Machine_Scale_Set_Vm_Reimage_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_Virtual_Machine_Scale_Set_Vm_Reimage_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_Virtual_Machine_Scale_Set_Vm_Reimage_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_Virtual_Machine_Scale_Set_Vm_Reimage_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_Virtual_Machine_Scale_Set_Vm_Restart_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_Virtual_Machine_Scale_Set_Vm_Restart_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_Virtual_Machine_Scale_Set_Vm_Restart_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_Virtual_Machine_Scale_Set_Vm_Restart_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_Virtual_Machine_Scale_Set_Vm_Start_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_Virtual_Machine_Scale_Set_Vm_Start_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_Virtual_Machine_Scale_Set_Vm_Start_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_Virtual_Machine_Scale_Set_Vm_Start_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_Virtual_Machine_Scale_Set_Vm_Update_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_Virtual_Machine_Scale_Set_Vm_Update_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_Virtual_Machine_Scale_Set_Vm_Update_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_Virtual_Machine_Scale_Set_Vm_Update_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_Virtual_Machine_Scale_Set_Convert_To_Single_Placement_Group_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_Virtual_Machine_Scale_Set_Convert_To_Single_Placement_Group_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_Virtual_Machine_Scale_Set_Convert_To_Single_Placement_Group_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_Virtual_Machine_Scale_Set_Convert_To_Single_Placement_Group_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateACustomImageScaleSetFromAnUnmanagedGeneralizedOsImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Custom_Image_Scale_Set_From_An_Unmanaged_Generalized_Os_Image.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateACustomImageScaleSetFromAnUnmanagedGeneralizedOsImage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Custom_Image_Scale_Set_From_An_Unmanaged_Generalized_Os_Image.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAPlatformImageScaleSetWithUnmanagedOsDisks.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Platform_Image_Scale_Set_With_Unmanaged_Os_Disks.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAPlatformImageScaleSetWithUnmanagedOsDisks.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Platform_Image_Scale_Set_With_Unmanaged_Os_Disks.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromACustomImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_From_A_Custom_Image.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromACustomImage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_From_A_Custom_Image.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromAGeneralizedSharedImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_From_A_Generalized_Shared_Image.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromAGeneralizedSharedImage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_From_A_Generalized_Shared_Image.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromASpecializedSharedImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_From_A_Specialized_Shared_Image.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromASpecializedSharedImage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_From_A_Specialized_Shared_Image.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWhereNicConfigHasDisableTcpStateTrackingProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_Where_Nic_Config_Has_Disable_Tcp_State_Tracking_Property.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWhereNicConfigHasDisableTcpStateTrackingProperty.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_Where_Nic_Config_Has_Disable_Tcp_State_Tracking_Property.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAMarketplaceImagePlan.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_A_Marketplace_Image_Plan.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAMarketplaceImagePlan.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_A_Marketplace_Image_Plan.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureApplicationGateway.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_An_Azure_Application_Gateway.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureApplicationGateway.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_An_Azure_Application_Gateway.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureLoadBalancer.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_An_Azure_Load_Balancer.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureLoadBalancer.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_An_Azure_Load_Balancer.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithApplicationProfile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Application_Profile.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithApplicationProfile.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Application_Profile.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAutomaticRepairsEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Automatic_Repairs_Enabled.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAutomaticRepairsEnabled.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Automatic_Repairs_Enabled.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithBootDiagnostics.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Boot_Diagnostics.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithBootDiagnostics.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Boot_Diagnostics.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskControllerType.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Disk_Controller_Type.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskControllerType.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Disk_Controller_Type.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskEncryptionSetResourceInOsDiskAndDataDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Disk_Encryption_Set_Resource_In_Os_Disk_And_Data_Disk.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskEncryptionSetResourceInOsDiskAndDataDisk.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Disk_Encryption_Set_Resource_In_Os_Disk_And_Data_Disk.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEmptyDataDisksOnEachVm.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Empty_Data_Disks_On_Each_Vm.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEmptyDataDisksOnEachVm.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Empty_Data_Disks_On_Each_Vm.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisks.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Ephemeral_Os_Disks.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisks.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Ephemeral_Os_Disks.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisksUsingPlacementProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Ephemeral_Os_Disks_Using_Placement_Property.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisksUsingPlacementProperty.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Ephemeral_Os_Disks_Using_Placement_Property.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithExtensionTimeBudget.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Extension_Time_Budget.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithExtensionTimeBudget.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Extension_Time_Budget.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithFpgaNetworkInterfaces.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Fpga_Network_Interfaces.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithFpgaNetworkInterfaces.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Fpga_Network_Interfaces.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithHostEncryptionUsingEncryptionAtHostProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Host_Encryption_Using_Encryption_At_Host_Property.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithHostEncryptionUsingEncryptionAtHostProperty.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Host_Encryption_Using_Encryption_At_Host_Property.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithManagedBootDiagnostics.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Managed_Boot_Diagnostics.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithManagedBootDiagnostics.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Managed_Boot_Diagnostics.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithNetworkInterfacesWithPublicIpAddressDnsSettings.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Network_Interfaces_With_Public_Ip_Address_Dns_Settings.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithNetworkInterfacesWithPublicIpAddressDnsSettings.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Network_Interfaces_With_Public_Ip_Address_Dns_Settings.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithOsImageScheduledEventsEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Os_Image_Scheduled_Events_Enabled.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithOsImageScheduledEventsEnabled.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Os_Image_Scheduled_Events_Enabled.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPasswordAuthentication.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Password_Authentication.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPasswordAuthentication.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Password_Authentication.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPremiumStorage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Premium_Storage.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPremiumStorage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Premium_Storage.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPriorityMixPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Priority_Mix_Policy.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPriorityMixPolicy.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Priority_Mix_Policy.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithScaleInPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Scale_In_Policy.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithScaleInPolicy.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Scale_In_Policy.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityPostureReference.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Security_Posture_Reference.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityPostureReference.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Security_Posture_Reference.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityTypeAsConfidentialVm.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Security_Type_As_Confidential_Vm.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityTypeAsConfidentialVm.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Security_Type_As_Confidential_Vm.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithServiceArtifactReference.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Service_Artifact_Reference.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithServiceArtifactReference.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Service_Artifact_Reference.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSpotRestorePolicy.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Spot_Restore_Policy.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSpotRestorePolicy.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Spot_Restore_Policy.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSshAuthentication.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Ssh_Authentication.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSshAuthentication.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Ssh_Authentication.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithTerminateScheduledEventsEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Terminate_Scheduled_Events_Enabled.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithTerminateScheduledEventsEnabled.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Terminate_Scheduled_Events_Enabled.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUefiSettingsOfSecureBootAndVTpm.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Uefi_Settings_Of_Secure_Boot_And_V_Tpm.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUefiSettingsOfSecureBootAndVTpm.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Uefi_Settings_Of_Secure_Boot_And_V_Tpm.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUserData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_User_Data.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUserData.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_User_Data.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVirtualMachinesInDifferentZones.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Virtual_Machines_In_Different_Zones.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVirtualMachinesInDifferentZones.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Virtual_Machines_In_Different_Zones.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVmSizeProperties.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Vm_Size_Properties.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVmSizeProperties.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Scale_Set_With_Vm_Size_Properties.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionThatHasSuppressFailuresEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Vmss_With_An_Extension_That_Has_Suppress_Failures_Enabled.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionThatHasSuppressFailuresEnabled.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Vmss_With_An_Extension_That_Has_Suppress_Failures_Enabled.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionWithProtectedSettingsFromKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Vmss_With_An_Extension_With_Protected_Settings_From_Key_Vault.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionWithProtectedSettingsFromKeyVault.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_A_Vmss_With_An_Extension_With_Protected_Settings_From_Key_Vault.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateOrUpdateAScaleSetWithCapacityReservation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_Or_Update_A_Scale_Set_With_Capacity_Reservation.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateOrUpdateAScaleSetWithCapacityReservation.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_Create_Or_Update_A_Scale_Set_With_Capacity_Reservation.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_Virtual_Machine_Scale_Set_Deallocate_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_Virtual_Machine_Scale_Set_Deallocate_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_Virtual_Machine_Scale_Set_Deallocate_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_Virtual_Machine_Scale_Set_Deallocate_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_Virtual_Machine_Scale_Set_Delete_Instances_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_Virtual_Machine_Scale_Set_Delete_Instances_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_Virtual_Machine_Scale_Set_Delete_Instances_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_Virtual_Machine_Scale_Set_Delete_Instances_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_Virtual_Machine_Scale_Set_Force_Recovery_Service_Fabric_Platform_Update_Domain_Walk_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_Virtual_Machine_Scale_Set_Force_Recovery_Service_Fabric_Platform_Update_Domain_Walk_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_Virtual_Machine_Scale_Set_Force_Recovery_Service_Fabric_Platform_Update_Domain_Walk_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_Virtual_Machine_Scale_Set_Force_Recovery_Service_Fabric_Platform_Update_Domain_Walk_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_Virtual_Machine_Scale_Set_Get_Instance_View_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_Virtual_Machine_Scale_Set_Get_Instance_View_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_Virtual_Machine_Scale_Set_Get_Instance_View_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_Virtual_Machine_Scale_Set_Get_Instance_View_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_Virtual_Machine_Scale_Set_Get_Os_Upgrade_History_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_Virtual_Machine_Scale_Set_Get_Os_Upgrade_History_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_Virtual_Machine_Scale_Set_Get_Os_Upgrade_History_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_Virtual_Machine_Scale_Set_Get_Os_Upgrade_History_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_Get_A_Virtual_Machine_Scale_Set.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSet.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_Get_A_Virtual_Machine_Scale_Set.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetPlacedOnADedicatedHostGroupThroughAutomaticPlacement.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_Get_A_Virtual_Machine_Scale_Set_Placed_On_A_Dedicated_Host_Group_Through_Automatic_Placement.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetPlacedOnADedicatedHostGroupThroughAutomaticPlacement.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_Get_A_Virtual_Machine_Scale_Set_Placed_On_A_Dedicated_Host_Group_Through_Automatic_Placement.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetWithUserData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_Get_A_Virtual_Machine_Scale_Set_With_User_Data.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetWithUserData.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_Get_A_Virtual_Machine_Scale_Set_With_User_Data.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetVmScaleSetVmWithDiskControllerType.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_Get_Vm_Scale_Set_Vm_With_Disk_Controller_Type.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetVmScaleSetVmWithDiskControllerType.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_Get_Vm_Scale_Set_Vm_With_Disk_Controller_Type.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_Virtual_Machine_Scale_Set_List_All_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_Virtual_Machine_Scale_Set_List_All_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_Virtual_Machine_Scale_Set_List_All_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_Virtual_Machine_Scale_Set_List_All_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_Virtual_Machine_Scale_Set_List_Skus_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_Virtual_Machine_Scale_Set_List_Skus_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_Virtual_Machine_Scale_Set_List_Skus_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_Virtual_Machine_Scale_Set_List_Skus_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_Virtual_Machine_Scale_Set_List_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_Virtual_Machine_Scale_Set_List_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_Virtual_Machine_Scale_Set_List_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_Virtual_Machine_Scale_Set_List_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_Virtual_Machine_Scale_Set_Perform_Maintenance_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_Virtual_Machine_Scale_Set_Perform_Maintenance_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_Virtual_Machine_Scale_Set_Perform_Maintenance_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_Virtual_Machine_Scale_Set_Perform_Maintenance_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_Virtual_Machine_Scale_Set_Power_Off_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_Virtual_Machine_Scale_Set_Power_Off_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_Virtual_Machine_Scale_Set_Power_Off_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_Virtual_Machine_Scale_Set_Power_Off_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_Virtual_Machine_Scale_Set_Redeploy_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_Virtual_Machine_Scale_Set_Redeploy_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_Virtual_Machine_Scale_Set_Redeploy_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_Virtual_Machine_Scale_Set_Redeploy_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_Virtual_Machine_Scale_Set_Reimage_All_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_Virtual_Machine_Scale_Set_Reimage_All_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_Virtual_Machine_Scale_Set_Reimage_All_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_Virtual_Machine_Scale_Set_Reimage_All_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_Virtual_Machine_Scale_Set_Reimage_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_Virtual_Machine_Scale_Set_Reimage_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_Virtual_Machine_Scale_Set_Reimage_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_Virtual_Machine_Scale_Set_Reimage_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_Virtual_Machine_Scale_Set_Restart_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_Virtual_Machine_Scale_Set_Restart_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_Virtual_Machine_Scale_Set_Restart_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_Virtual_Machine_Scale_Set_Restart_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_Virtual_Machine_Scale_Set_Set_Orchestration_Service_State_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_Virtual_Machine_Scale_Set_Set_Orchestration_Service_State_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_Virtual_Machine_Scale_Set_Set_Orchestration_Service_State_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_Virtual_Machine_Scale_Set_Set_Orchestration_Service_State_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_Virtual_Machine_Scale_Set_Start_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_Virtual_Machine_Scale_Set_Start_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_Virtual_Machine_Scale_Set_Start_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_Virtual_Machine_Scale_Set_Start_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_Virtual_Machine_Scale_Set_Update_Instances_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_Virtual_Machine_Scale_Set_Update_Instances_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_Virtual_Machine_Scale_Set_Update_Instances_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_Virtual_Machine_Scale_Set_Update_Instances_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_Virtual_Machine_Scale_Set_Update_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_Virtual_Machine_Scale_Set_Update_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_Virtual_Machine_Scale_Set_Update_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_Virtual_Machine_Scale_Set_Update_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_Virtual_Machine_Capture_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_Virtual_Machine_Capture_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_Virtual_Machine_Capture_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_Virtual_Machine_Capture_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_Virtual_Machine_Convert_To_Managed_Disks_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_Virtual_Machine_Convert_To_Managed_Disks_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_Virtual_Machine_Convert_To_Managed_Disks_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_Virtual_Machine_Convert_To_Managed_Disks_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateACustomImageVmFromAnUnmanagedGeneralizedOsImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Custom_Image_Vm_From_An_Unmanaged_Generalized_Os_Image.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateACustomImageVmFromAnUnmanagedGeneralizedOsImage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Custom_Image_Vm_From_An_Unmanaged_Generalized_Os_Image.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingAssessmentModeOfImageDefault.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Linux_Vm_With_A_Patch_Setting_Assessment_Mode_Of_Image_Default.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingAssessmentModeOfImageDefault.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Linux_Vm_With_A_Patch_Setting_Assessment_Mode_Of_Image_Default.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Linux_Vm_With_A_Patch_Setting_Patch_Mode_Of_Automatic_By_Platform_And_Automatic_By_Platform_Settings.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Linux_Vm_With_A_Patch_Setting_Patch_Mode_Of_Automatic_By_Platform_And_Automatic_By_Platform_Settings.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfImageDefault.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Linux_Vm_With_A_Patch_Setting_Patch_Mode_Of_Image_Default.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfImageDefault.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Linux_Vm_With_A_Patch_Setting_Patch_Mode_Of_Image_Default.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Linux_Vm_With_A_Patch_Settings_Patch_Mode_And_Assessment_Mode_Set_To_Automatic_By_Platform.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Linux_Vm_With_A_Patch_Settings_Patch_Mode_And_Assessment_Mode_Set_To_Automatic_By_Platform.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAPlatformImageVmWithUnmanagedOsAndDataDisks.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Platform_Image_Vm_With_Unmanaged_Os_And_Data_Disks.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAPlatformImageVmWithUnmanagedOsAndDataDisks.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Platform_Image_Vm_With_Unmanaged_Os_And_Data_Disks.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACommunityGalleryImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_From_A_Community_Gallery_Image.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACommunityGalleryImage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_From_A_Community_Gallery_Image.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACustomImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_From_A_Custom_Image.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACustomImage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_From_A_Custom_Image.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromAGeneralizedSharedImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_From_A_Generalized_Shared_Image.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromAGeneralizedSharedImage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_From_A_Generalized_Shared_Image.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASharedGalleryImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_From_A_Shared_Gallery_Image.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASharedGalleryImage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_From_A_Shared_Gallery_Image.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASpecializedSharedImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_From_A_Specialized_Shared_Image.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASpecializedSharedImage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_From_A_Specialized_Shared_Image.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAVirtualMachineScaleSetWithCustomerAssignedPlatformFaultDomain.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_In_A_Virtual_Machine_Scale_Set_With_Customer_Assigned_Platform_Fault_Domain.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAVirtualMachineScaleSetWithCustomerAssignedPlatformFaultDomain.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_In_A_Virtual_Machine_Scale_Set_With_Customer_Assigned_Platform_Fault_Domain.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAnAvailabilitySet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_In_An_Availability_Set.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAnAvailabilitySet.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_In_An_Availability_Set.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAMarketplaceImagePlan.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_A_Marketplace_Image_Plan.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAMarketplaceImagePlan.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_A_Marketplace_Image_Plan.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAnExtensionsTimeBudget.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_An_Extensions_Time_Budget.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAnExtensionsTimeBudget.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_An_Extensions_Time_Budget.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithApplicationProfile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Application_Profile.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithApplicationProfile.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Application_Profile.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithBootDiagnostics.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Boot_Diagnostics.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithBootDiagnostics.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Boot_Diagnostics.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskControllerType.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Disk_Controller_Type.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskControllerType.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Disk_Controller_Type.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskEncryptionSetResourceIdInTheOsDiskAndDataDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Disk_Encryption_Set_Resource_Id_In_The_Os_Disk_And_Data_Disk.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskEncryptionSetResourceIdInTheOsDiskAndDataDisk.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Disk_Encryption_Set_Resource_Id_In_The_Os_Disk_And_Data_Disk.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEmptyDataDisks.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Empty_Data_Disks.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEmptyDataDisks.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Empty_Data_Disks.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Ephemeral_Os_Disk.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDisk.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Ephemeral_Os_Disk.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInCacheDiskUsingPlacementProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Ephemeral_Os_Disk_Provisioning_In_Cache_Disk_Using_Placement_Property.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInCacheDiskUsingPlacementProperty.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Ephemeral_Os_Disk_Provisioning_In_Cache_Disk_Using_Placement_Property.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInResourceDiskUsingPlacementProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Ephemeral_Os_Disk_Provisioning_In_Resource_Disk_Using_Placement_Property.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInResourceDiskUsingPlacementProperty.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Ephemeral_Os_Disk_Provisioning_In_Resource_Disk_Using_Placement_Property.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHibernationEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Hibernation_Enabled.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHibernationEnabled.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Hibernation_Enabled.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHostEncryptionUsingEncryptionAtHostProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Host_Encryption_Using_Encryption_At_Host_Property.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHostEncryptionUsingEncryptionAtHostProperty.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Host_Encryption_Using_Encryption_At_Host_Property.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithManagedBootDiagnostics.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Managed_Boot_Diagnostics.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithManagedBootDiagnostics.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Managed_Boot_Diagnostics.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfiguration.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Network_Interface_Configuration.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfiguration.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Network_Interface_Configuration.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfigurationWithPublicIpAddressDnsSettings.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Network_Interface_Configuration_With_Public_Ip_Address_Dns_Settings.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfigurationWithPublicIpAddressDnsSettings.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Network_Interface_Configuration_With_Public_Ip_Address_Dns_Settings.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPasswordAuthentication.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Password_Authentication.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPasswordAuthentication.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Password_Authentication.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPremiumStorage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Premium_Storage.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPremiumStorage.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Premium_Storage.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithScheduledEventsProfile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Scheduled_Events_Profile.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithScheduledEventsProfile.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Scheduled_Events_Profile.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithCustomerManagedKeys.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Security_Type_Confidential_Vm_With_Customer_Managed_Keys.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithCustomerManagedKeys.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Security_Type_Confidential_Vm_With_Customer_Managed_Keys.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithPlatformManagedKeys.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Security_Type_Confidential_Vm_With_Platform_Managed_Keys.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithPlatformManagedKeys.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Security_Type_Confidential_Vm_With_Platform_Managed_Keys.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSshAuthentication.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Ssh_Authentication.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSshAuthentication.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Ssh_Authentication.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUefiSettingsOfSecureBootAndVTpm.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Uefi_Settings_Of_Secure_Boot_And_V_Tpm.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUefiSettingsOfSecureBootAndVTpm.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Uefi_Settings_Of_Secure_Boot_And_V_Tpm.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUserData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_User_Data.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUserData.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_User_Data.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithVmSizeProperties.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Vm_Size_Properties.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithVmSizeProperties.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Vm_With_Vm_Size_Properties.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingAssessmentModeOfImageDefault.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_A_Patch_Setting_Assessment_Mode_Of_Image_Default.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingAssessmentModeOfImageDefault.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_A_Patch_Setting_Assessment_Mode_Of_Image_Default.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByOs.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_A_Patch_Setting_Patch_Mode_Of_Automatic_By_Os.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByOs.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_A_Patch_Setting_Patch_Mode_Of_Automatic_By_Os.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_A_Patch_Setting_Patch_Mode_Of_Automatic_By_Platform_And_Automatic_By_Platform_Settings.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_A_Patch_Setting_Patch_Mode_Of_Automatic_By_Platform_And_Automatic_By_Platform_Settings.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndEnableHotpatchingSetToTrue.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_A_Patch_Setting_Patch_Mode_Of_Automatic_By_Platform_And_Enable_Hotpatching_Set_To_True.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndEnableHotpatchingSetToTrue.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_A_Patch_Setting_Patch_Mode_Of_Automatic_By_Platform_And_Enable_Hotpatching_Set_To_True.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfManual.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_A_Patch_Setting_Patch_Mode_Of_Manual.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfManual.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_A_Patch_Setting_Patch_Mode_Of_Manual.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_Patch_Settings_Patch_Mode_And_Assessment_Mode_Set_To_Automatic_By_Platform.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_A_Windows_Vm_With_Patch_Settings_Patch_Mode_And_Assessment_Mode_Set_To_Automatic_By_Platform.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateOrUpdateAVmWithCapacityReservation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_Or_Update_A_Vm_With_Capacity_Reservation.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateOrUpdateAVmWithCapacityReservation.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_Create_Or_Update_A_Vm_With_Capacity_Reservation.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_Virtual_Machine_Deallocate_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_Virtual_Machine_Deallocate_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_Virtual_Machine_Deallocate_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_Virtual_Machine_Deallocate_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_Get_A_Virtual_Machine.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachine.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_Get_A_Virtual_Machine.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_Get_A_Virtual_Machine_Placed_On_A_Dedicated_Host_Group_Through_Automatic_Placement.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_Get_A_Virtual_Machine_Placed_On_A_Dedicated_Host_Group_Through_Automatic_Placement.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithDiskControllerTypeProperties.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_Get_A_Virtual_Machine_With_Disk_Controller_Type_Properties.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithDiskControllerTypeProperties.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_Get_A_Virtual_Machine_With_Disk_Controller_Type_Properties.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithVmSizeProperties.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_Get_A_Virtual_Machine_With_Vm_Size_Properties.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithVmSizeProperties.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_Get_A_Virtual_Machine_With_Vm_Size_Properties.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetInstanceViewOfAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_Get_Instance_View_Of_A_Virtual_Machine_Placed_On_A_Dedicated_Host_Group_Through_Automatic_Placement.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetInstanceViewOfAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_Get_Instance_View_Of_A_Virtual_Machine_Placed_On_A_Dedicated_Host_Group_Through_Automatic_Placement.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetVirtualMachineInstanceView.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_Get_Virtual_Machine_Instance_View.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetVirtualMachineInstanceView.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_Get_Virtual_Machine_Instance_View.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_Virtual_Machine_List_All_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_Virtual_Machine_List_All_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_Virtual_Machine_List_All_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_Virtual_Machine_List_All_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_Virtual_Machine_List_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_Virtual_Machine_List_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_Virtual_Machine_List_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_Virtual_Machine_List_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_Virtual_Machine_Perform_Maintenance_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_Virtual_Machine_Perform_Maintenance_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_Virtual_Machine_Perform_Maintenance_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_Virtual_Machine_Perform_Maintenance_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_Virtual_Machine_Power_Off_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_Virtual_Machine_Power_Off_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_Virtual_Machine_Power_Off_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_Virtual_Machine_Power_Off_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_Virtual_Machine_Redeploy_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_Virtual_Machine_Redeploy_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_Virtual_Machine_Redeploy_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_Virtual_Machine_Redeploy_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageANonEphemeralVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_Reimage_A_Non_Ephemeral_Virtual_Machine.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageANonEphemeralVirtualMachine.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_Reimage_A_Non_Ephemeral_Virtual_Machine.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageAVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_Reimage_A_Virtual_Machine.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageAVirtualMachine.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_Reimage_A_Virtual_Machine.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_Virtual_Machine_Restart_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_Virtual_Machine_Restart_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_Virtual_Machine_Restart_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_Virtual_Machine_Restart_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_Virtual_Machine_Start_Maximum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_Virtual_Machine_Start_Maximum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_Virtual_Machine_Start_Minimum_Set_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_Virtual_Machine_Start_Minimum_Set_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByDetachingDataDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_Update_A_Vm_By_Detaching_Data_Disk.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByDetachingDataDisk.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_Update_A_Vm_By_Detaching_Data_Disk.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByForceDetachingDataDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_Update_A_Vm_By_Force_Detaching_Data_Disk.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByForceDetachingDataDisk.json rename to packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_Update_A_Vm_By_Force_Detaching_Data_Disk.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp index 1654d879bc..d13258ca92 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp @@ -53,38 +53,52 @@ using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; +/** + * Compute Client + */ @armProviderNamespace @service({ title: "Azure Compute resource management API.", }) @versioned(Versions) -@doc("Compute Client") namespace Microsoft.Compute; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { + /** + * The 2023-07-01 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2023-07-01 API version.") v2023_07_01: "2023-07-01", + /** + * The 2023-04-02 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2023-04-02 API version.") v2023_04_02: "2023-04-02", + /** + * The 2021-07-01 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2021-07-01 API version.") v2021_07_01: "2021-07-01", + /** + * The 2022-03-03 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2022-03-03 API version.") v2022_03_03: "2022-03-03", + /** + * The 2022-09-04 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2022-09-04 API version.") v2022_09_04: "2022-09-04", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp index ae375f90a9..ef1fc5c320 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp @@ -13,27 +13,35 @@ namespace Microsoft.Compute; interface Operations extends Azure.ResourceManager.Operations {} -@doc("Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.") +/** + * Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace. + */ enum RepairAction { Replace, Restart, Reimage, } -@doc("Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

    Possible values are:

    **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

    **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

    **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true ") +/** + * Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

    Possible values are:

    **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

    **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

    **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true + */ enum WindowsVMGuestPatchMode { Manual, AutomaticByOS, AutomaticByPlatform, } -@doc("Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.

    Possible values are:

    **ImageDefault** - You control the timing of patch assessments on a virtual machine.

    **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. ") +/** + * Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.

    Possible values are:

    **ImageDefault** - You control the timing of patch assessments on a virtual machine.

    **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. + */ enum WindowsPatchAssessmentMode { ImageDefault, AutomaticByPlatform, } -@doc("Specifies the reboot setting for all AutomaticByPlatform patch installation operations.") +/** + * Specifies the reboot setting for all AutomaticByPlatform patch installation operations. + */ enum WindowsVMGuestPatchAutomaticByPlatformRebootSetting { Unknown, IfRequired, @@ -41,19 +49,25 @@ enum WindowsVMGuestPatchAutomaticByPlatformRebootSetting { Always, } -@doc("Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

    Possible values are:

    **ImageDefault** - The virtual machine's default patching configuration is used.

    **AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true") +/** + * Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

    Possible values are:

    **ImageDefault** - The virtual machine's default patching configuration is used.

    **AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true + */ enum LinuxVMGuestPatchMode { ImageDefault, AutomaticByPlatform, } -@doc("Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.

    Possible values are:

    **ImageDefault** - You control the timing of patch assessments on a virtual machine.

    **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.") +/** + * Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.

    Possible values are:

    **ImageDefault** - You control the timing of patch assessments on a virtual machine.

    **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. + */ enum LinuxPatchAssessmentMode { ImageDefault, AutomaticByPlatform, } -@doc("Specifies the reboot setting for all AutomaticByPlatform patch installation operations.") +/** + * Specifies the reboot setting for all AutomaticByPlatform patch installation operations. + */ enum LinuxVMGuestPatchAutomaticByPlatformRebootSetting { Unknown, IfRequired, @@ -61,25 +75,33 @@ enum LinuxVMGuestPatchAutomaticByPlatformRebootSetting { Always, } -@doc("Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described.") +/** + * Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. + */ enum DiskCreateOptionTypes { FromImage, Empty, Attach, } -@doc("Specifies the ephemeral disk option for operating system disk.") +/** + * Specifies the ephemeral disk option for operating system disk. + */ enum DiffDiskOptions { Local, } -@doc("Specifies the ephemeral disk placement for operating system disk. This property can be used by user in the request to choose the location i.e, cache disk or resource disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements") +/** + * Specifies the ephemeral disk placement for operating system disk. This property can be used by user in the request to choose the location i.e, cache disk or resource disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements + */ enum DiffDiskPlacement { CacheDisk, ResourceDisk, } -@doc("Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. Premium_ZRS uses Premium SSD zone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant storage. For more information regarding disks supported for Windows Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/windows/disks-types and, for Linux Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/linux/disks-types") +/** + * Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. Premium_ZRS uses Premium SSD zone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant storage. For more information regarding disks supported for Windows Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/windows/disks-types and, for Linux Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/linux/disks-types + */ enum StorageAccountTypes { Standard_LRS, Premium_LRS, @@ -90,19 +112,25 @@ enum StorageAccountTypes { PremiumV2_LRS, } -@doc("Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. **Note:** It can be set for only Confidential VMs.") +/** + * Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. **Note:** It can be set for only Confidential VMs. + */ enum SecurityEncryptionTypes { VMGuestStateOnly, DiskWithVMGuestState, } -@doc("Specifies the behavior of the managed disk when the VM gets deleted, for example whether the managed disk is deleted or detached. Supported values are: **Delete.** If this value is used, the managed disk is deleted when VM gets deleted. **Detach.** If this value is used, the managed disk is retained after VM gets deleted. Minimum api-version: 2021-03-01.") +/** + * Specifies the behavior of the managed disk when the VM gets deleted, for example whether the managed disk is deleted or detached. Supported values are: **Delete.** If this value is used, the managed disk is deleted when VM gets deleted. **Detach.** If this value is used, the managed disk is retained after VM gets deleted. Minimum api-version: 2021-03-01. + */ enum DiskDeleteOptionTypes { Delete, Detach, } -@doc("The Domain name label scope.The concatenation of the hashed domain name label that generated according to the policy from domain name label scope and vm index will be the domain name labels of the PublicIPAddress resources that will be created") +/** + * The Domain name label scope.The concatenation of the hashed domain name label that generated according to the policy from domain name label scope and vm index will be the domain name labels of the PublicIPAddress resources that will be created + */ enum DomainNameLabelScopeTypes { TenantReuse, SubscriptionReuse, @@ -110,38 +138,50 @@ enum DomainNameLabelScopeTypes { NoReuse, } -@doc("Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") +/** + * Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + */ enum IPVersion { IPv4, IPv6, } -@doc("Specify what happens to the network interface when the VM is deleted") +/** + * Specify what happens to the network interface when the VM is deleted + */ enum DeleteOptions { Delete, Detach, } -@doc("Specify public IP sku name") +/** + * Specify public IP sku name + */ enum PublicIPAddressSkuName { Basic, Standard, } -@doc("Specify public IP sku tier") +/** + * Specify public IP sku tier + */ enum PublicIPAddressSkuTier { Regional, Global, } -@doc("Specifies whether the Auxiliary mode is enabled for the Network Interface resource.") +/** + * Specifies whether the Auxiliary mode is enabled for the Network Interface resource. + */ enum NetworkInterfaceAuxiliaryMode { None, AcceleratedConnections, Floating, } -@doc("Specifies whether the Auxiliary sku is enabled for the Network Interface resource.") +/** + * Specifies whether the Auxiliary sku is enabled for the Network Interface resource. + */ enum NetworkInterfaceAuxiliarySku { None, A1, @@ -150,25 +190,33 @@ enum NetworkInterfaceAuxiliarySku { A8, } -@doc("specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations") +/** + * specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations + */ enum NetworkApiVersion { `2020-11-01`, } -@doc("Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set.") +/** + * Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set. + */ enum SecurityTypes { TrustedLaunch, ConfidentialVM, } -@doc("Specifies the priority for a standalone virtual machine or the virtual machines in the scale set. 'Low' enum will be deprecated in the future, please use 'Spot' as the enum to deploy Azure Spot VM/VMSS.") +/** + * Specifies the priority for a standalone virtual machine or the virtual machines in the scale set. 'Low' enum will be deprecated in the future, please use 'Spot' as the enum to deploy Azure Spot VM/VMSS. + */ enum VirtualMachinePriorityTypes { Regular, Low, Spot, } -@doc("Specifies the eviction policy for the Azure Spot VM/VMSS") +/** + * Specifies the eviction policy for the Azure Spot VM/VMSS + */ enum VirtualMachineEvictionPolicyTypes { Deallocate, Delete, @@ -180,13 +228,17 @@ enum VirtualMachineScaleSetScaleInRules { NewestVM, } -@doc("Specifies the orchestration mode for the virtual machine scale set.") +/** + * Specifies the orchestration mode for the virtual machine scale set. + */ enum OrchestrationMode { Uniform, Flexible, } -@doc("The type of extendedLocation.") +/** + * The type of extendedLocation. + */ enum ExtendedLocationTypes { EdgeZone, } @@ -195,31 +247,41 @@ enum ExpandTypesForGetVMScaleSets { userData, } -@doc("The name of the service.") +/** + * The name of the service. + */ enum OrchestrationServiceNames { AutomaticRepairs, } -@doc("The current state of the service.") +/** + * The current state of the service. + */ enum OrchestrationServiceState { NotRunning, Running, Suspended, } -@doc("The action to be performed.") +/** + * The action to be performed. + */ enum OrchestrationServiceStateAction { Resume, Suspend, } -@doc("The hypervisor generation of the Virtual Machine. Applicable to OS disks only.") +/** + * The hypervisor generation of the Virtual Machine. Applicable to OS disks only. + */ enum HyperVGeneration { V1, V2, } -@doc("Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set.") +/** + * Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set. + */ enum VirtualMachineSizeTypes { Basic_A0, Basic_A1, @@ -389,36 +451,48 @@ enum VirtualMachineSizeTypes { Standard_NV24, } -@doc("Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values are: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'.") +/** + * Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values are: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. + */ enum DiskDetachOptionTypes { ForceDetach, } -@doc("Specifies the disk controller type configured for the VM and VirtualMachineScaleSet. This property is only supported for virtual machines whose operating system disk and VM sku supports Generation 2 (https://docs.microsoft.com/en-us/azure/virtual-machines/generation-2), please check the HyperVGenerations capability returned as part of VM sku capabilities in the response of Microsoft.Compute SKUs api for the region contains V2 (https://docs.microsoft.com/rest/api/compute/resourceskus/list). For more information about Disk Controller Types supported please refer to https://aka.ms/azure-diskcontrollertypes.") +/** + * Specifies the disk controller type configured for the VM and VirtualMachineScaleSet. This property is only supported for virtual machines whose operating system disk and VM sku supports Generation 2 (https://docs.microsoft.com/en-us/azure/virtual-machines/generation-2), please check the HyperVGenerations capability returned as part of VM sku capabilities in the response of Microsoft.Compute SKUs api for the region contains V2 (https://docs.microsoft.com/rest/api/compute/resourceskus/list). For more information about Disk Controller Types supported please refer to https://aka.ms/azure-diskcontrollertypes. + */ enum DiskControllerTypes { SCSI, NVMe, } -@doc("Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") +/** + * Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + */ enum IPVersions { IPv4, IPv6, } -@doc("Specify the public IP allocation type") +/** + * Specify the public IP allocation type + */ enum PublicIPAllocationMethod { Dynamic, Static, } -@doc("Specifies the HyperVGeneration Type associated with a resource") +/** + * Specifies the HyperVGeneration Type associated with a resource + */ enum HyperVGenerationType { V1, V2, } -@doc("The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"") +/** + * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings." + */ enum PatchOperationStatus { Unknown, InProgress, @@ -435,7 +509,9 @@ enum ExpandTypesForListVMs { instanceView, } -@doc("Describes the reboot requirements of the patch.") +/** + * Describes the reboot requirements of the patch. + */ enum VMGuestPatchRebootBehavior { Unknown, NeverReboots, @@ -443,13 +519,17 @@ enum VMGuestPatchRebootBehavior { CanRequestReboot, } -@doc("Describes the availability of a given patch.") +/** + * Describes the availability of a given patch. + */ enum PatchAssessmentState { Unknown, Available, } -@doc("Defines when it is acceptable to reboot a VM during a software update operation.") +/** + * Defines when it is acceptable to reboot a VM during a software update operation. + */ enum VMGuestPatchRebootSetting { IfRequired, Never, @@ -473,7 +553,9 @@ enum VMGuestPatchClassificationLinux { Other, } -@doc("The reboot state of the VM following completion of the operation.") +/** + * The reboot state of the VM following completion of the operation. + */ enum VMGuestPatchRebootStatus { Unknown, NotNeeded, @@ -483,7 +565,9 @@ enum VMGuestPatchRebootStatus { Completed, } -@doc("The state of the patch after the installation operation completed.") +/** + * The state of the patch after the installation operation completed. + */ enum PatchInstallationState { Unknown, Installed, @@ -493,61 +577,87 @@ enum PatchInstallationState { Pending, } -@doc("Specifies the HyperVGeneration Type") +/** + * Specifies the HyperVGeneration Type + */ enum HyperVGenerationTypes { V1, V2, } -@doc("VM disk types which are disallowed.") +/** + * VM disk types which are disallowed. + */ enum VmDiskTypes { None, Unmanaged, } -@doc("Specifies the Architecture Type") +/** + * Specifies the Architecture Type + */ enum ArchitectureTypes { x64, Arm64, } -@doc("Describes the state of the image.") +/** + * Describes the state of the image. + */ enum ImageState { Active, ScheduledForDeprecation, Deprecated, } -@doc("Describes the type of the alternative option.") +/** + * Describes the type of the alternative option. + */ enum AlternativeType { None, Offer, Plan, } -@doc("Specifies the type of the proximity placement group. Possible values are: **Standard** : Co-locate resources within an Azure region or Availability Zone. **Ultra** : For future use.") +/** + * Specifies the type of the proximity placement group. Possible values are: **Standard** : Co-locate resources within an Azure region or Availability Zone. **Ultra** : For future use. + */ enum ProximityPlacementGroupType { Standard, Ultra, } -@doc("Gets the Operating System type.") +/** + * Gets the Operating System type. + */ enum OperatingSystemType { Windows, Linux, } -@doc("The type of key used to encrypt the data of the disk restore point.") +/** + * The type of key used to encrypt the data of the disk restore point. + */ enum RestorePointEncryptionType { - @doc("Disk Restore Point is encrypted at rest with Platform managed key. ") + /** + * Disk Restore Point is encrypted at rest with Platform managed key. + */ EncryptionAtRestWithPlatformKey, - @doc("Disk Restore Point is encrypted at rest with Customer managed key that can be changed and revoked by a customer.") + + /** + * Disk Restore Point is encrypted at rest with Customer managed key that can be changed and revoked by a customer. + */ EncryptionAtRestWithCustomerKey, - @doc("Disk Restore Point is encrypted at rest with 2 layers of encryption. One of the keys is Customer managed and the other key is Platform managed.") + + /** + * Disk Restore Point is encrypted at rest with 2 layers of encryption. One of the keys is Customer managed and the other key is Platform managed. + */ EncryptionAtRestWithPlatformAndCustomerKeys, } -@doc("ConsistencyMode of the RestorePoint. Can be specified in the input while creating a restore point. For now, only CrashConsistent is accepted as a valid input. Please refer to https://aka.ms/RestorePoints for more details.") +/** + * ConsistencyMode of the RestorePoint. Can be specified in the input while creating a restore point. For now, only CrashConsistent is accepted as a valid input. Please refer to https://aka.ms/RestorePoints for more details. + */ enum ConsistencyModeTypes { CrashConsistent, FileSystemConsistent, @@ -575,7 +685,9 @@ enum CapacityReservationInstanceViewTypes { instanceView, } -@doc("Script execution status.") +/** + * Script execution status. + */ enum ExecutionState { Unknown, Pending, @@ -586,138 +698,290 @@ enum ExecutionState { Canceled, } -@doc("The sku name.") +/** + * The sku name. + */ enum DiskStorageAccountTypes { - @doc("Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access.") + /** + * Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access. + */ Standard_LRS, - @doc("Premium SSD locally redundant storage. Best for production and performance sensitive workloads.") + + /** + * Premium SSD locally redundant storage. Best for production and performance sensitive workloads. + */ Premium_LRS, - @doc("Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev/test.") + + /** + * Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev/test. + */ StandardSSD_LRS, - @doc("Ultra SSD locally redundant storage. Best for IO-intensive workloads such as SAP HANA, top tier databases (for example, SQL, Oracle), and other transaction-heavy workloads.") + + /** + * Ultra SSD locally redundant storage. Best for IO-intensive workloads such as SAP HANA, top tier databases (for example, SQL, Oracle), and other transaction-heavy workloads. + */ UltraSSD_LRS, - @doc("Premium SSD zone redundant storage. Best for the production workloads that need storage resiliency against zone failures.") + + /** + * Premium SSD zone redundant storage. Best for the production workloads that need storage resiliency against zone failures. + */ Premium_ZRS, - @doc("Standard SSD zone redundant storage. Best for web servers, lightly used enterprise applications and dev/test that need storage resiliency against zone failures.") + + /** + * Standard SSD zone redundant storage. Best for web servers, lightly used enterprise applications and dev/test that need storage resiliency against zone failures. + */ StandardSSD_ZRS, - @doc("Premium SSD v2 locally redundant storage. Best for production and performance-sensitive workloads that consistently require low latency and high IOPS and throughput.") + + /** + * Premium SSD v2 locally redundant storage. Best for production and performance-sensitive workloads that consistently require low latency and high IOPS and throughput. + */ PremiumV2_LRS, } -@doc("The architecture of the image. Applicable to OS disks only.") +/** + * The architecture of the image. Applicable to OS disks only. + */ enum Architecture { x64, Arm64, } -@doc("This enumerates the possible sources of a disk's creation.") +/** + * This enumerates the possible sources of a disk's creation. + */ enum DiskCreateOption { - @doc("Create an empty data disk of a size given by diskSizeGB.") Empty, - @doc("Disk will be attached to a VM.") Attach, - @doc("Create a new disk from a platform image specified by the given imageReference or galleryImageReference.") + /** + * Create an empty data disk of a size given by diskSizeGB. + */ + Empty, + + /** + * Disk will be attached to a VM. + */ + Attach, + + /** + * Create a new disk from a platform image specified by the given imageReference or galleryImageReference. + */ FromImage, - @doc("Create a disk by importing from a blob specified by a sourceUri in a storage account specified by storageAccountId.") + + /** + * Create a disk by importing from a blob specified by a sourceUri in a storage account specified by storageAccountId. + */ Import, - @doc("Create a new disk or snapshot by copying from a disk or snapshot specified by the given sourceResourceId.") + + /** + * Create a new disk or snapshot by copying from a disk or snapshot specified by the given sourceResourceId. + */ Copy, - @doc("Create a new disk by copying from a backup recovery point.") Restore, - @doc("Create a new disk by obtaining a write token and using it to directly upload the contents of the disk.") + + /** + * Create a new disk by copying from a backup recovery point. + */ + Restore, + + /** + * Create a new disk by obtaining a write token and using it to directly upload the contents of the disk. + */ Upload, - @doc("Create a new disk by using a deep copy process, where the resource creation is considered complete only after all data has been copied from the source.") + + /** + * Create a new disk by using a deep copy process, where the resource creation is considered complete only after all data has been copied from the source. + */ CopyStart, - @doc("Similar to Import create option. Create a new Trusted Launch VM or Confidential VM supported disk by importing additional blob for VM guest state specified by securityDataUri in storage account specified by storageAccountId") + + /** + * Similar to Import create option. Create a new Trusted Launch VM or Confidential VM supported disk by importing additional blob for VM guest state specified by securityDataUri in storage account specified by storageAccountId + */ ImportSecure, - @doc("Similar to Upload create option. Create a new Trusted Launch VM or Confidential VM supported disk and upload using write token in both disk and VM guest state") + + /** + * Similar to Upload create option. Create a new Trusted Launch VM or Confidential VM supported disk and upload using write token in both disk and VM guest state + */ UploadPreparedSecure, - @doc("Create a new disk by exporting from elastic san volume snapshot") + + /** + * Create a new disk by exporting from elastic san volume snapshot + */ CopyFromSanSnapshot, } -@doc("This enumerates the possible state of the disk.") +/** + * This enumerates the possible state of the disk. + */ enum DiskState { - @doc("The disk is not being used and can be attached to a VM.") Unattached, - @doc("The disk is currently attached to a running VM.") Attached, - @doc("The disk is attached to a stopped-deallocated VM.") Reserved, - @doc("The disk is attached to a VM which is in hibernated state.") Frozen, - @doc("The disk currently has an Active SAS Uri associated with it.") + /** + * The disk is not being used and can be attached to a VM. + */ + Unattached, + + /** + * The disk is currently attached to a running VM. + */ + Attached, + + /** + * The disk is attached to a stopped-deallocated VM. + */ + Reserved, + + /** + * The disk is attached to a VM which is in hibernated state. + */ + Frozen, + + /** + * The disk currently has an Active SAS Uri associated with it. + */ ActiveSAS, - @doc("The disk is attached to a VM in hibernated state and has an active SAS URI associated with it.") + + /** + * The disk is attached to a VM in hibernated state and has an active SAS URI associated with it. + */ ActiveSASFrozen, - @doc("A disk is ready to be created by upload by requesting a write token.") + + /** + * A disk is ready to be created by upload by requesting a write token. + */ ReadyToUpload, - @doc("A disk is created for upload and a write token has been issued for uploading to it.") + + /** + * A disk is created for upload and a write token has been issued for uploading to it. + */ ActiveUpload, } -@doc("The type of key used to encrypt the data of the disk.") +/** + * The type of key used to encrypt the data of the disk. + */ enum EncryptionType { - @doc("Disk is encrypted at rest with Platform managed key. It is the default encryption type. This is not a valid encryption type for disk encryption sets.") + /** + * Disk is encrypted at rest with Platform managed key. It is the default encryption type. This is not a valid encryption type for disk encryption sets. + */ EncryptionAtRestWithPlatformKey, - @doc("Disk is encrypted at rest with Customer managed key that can be changed and revoked by a customer.") + + /** + * Disk is encrypted at rest with Customer managed key that can be changed and revoked by a customer. + */ EncryptionAtRestWithCustomerKey, - @doc("Disk is encrypted at rest with 2 layers of encryption. One of the keys is Customer managed and the other key is Platform managed.") + + /** + * Disk is encrypted at rest with 2 layers of encryption. One of the keys is Customer managed and the other key is Platform managed. + */ EncryptionAtRestWithPlatformAndCustomerKeys, } -@doc("Policy for accessing the disk via network.") +/** + * Policy for accessing the disk via network. + */ enum NetworkAccessPolicy { - @doc("The disk can be exported or uploaded to from any network.") AllowAll, - @doc("The disk can be exported or uploaded to using a DiskAccess resource's private endpoints.") + /** + * The disk can be exported or uploaded to from any network. + */ + AllowAll, + + /** + * The disk can be exported or uploaded to using a DiskAccess resource's private endpoints. + */ AllowPrivate, - @doc("The disk cannot be exported.") DenyAll, + + /** + * The disk cannot be exported. + */ + DenyAll, } -@doc("Specifies the SecurityType of the VM. Applicable for OS disks only.") +/** + * Specifies the SecurityType of the VM. Applicable for OS disks only. + */ enum DiskSecurityTypes { - @doc("Trusted Launch provides security features such as secure boot and virtual Trusted Platform Module (vTPM)") + /** + * Trusted Launch provides security features such as secure boot and virtual Trusted Platform Module (vTPM) + */ TrustedLaunch, - @doc("Indicates Confidential VM disk with only VM guest state encrypted") + + /** + * Indicates Confidential VM disk with only VM guest state encrypted + */ ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey, - @doc("Indicates Confidential VM disk with both OS disk and VM guest state encrypted with a platform managed key") + + /** + * Indicates Confidential VM disk with both OS disk and VM guest state encrypted with a platform managed key + */ ConfidentialVM_DiskEncryptedWithPlatformKey, - @doc("Indicates Confidential VM disk with both OS disk and VM guest state encrypted with a customer managed key") + + /** + * Indicates Confidential VM disk with both OS disk and VM guest state encrypted with a customer managed key + */ ConfidentialVM_DiskEncryptedWithCustomerKey, } -@doc("Policy for controlling export on the disk.") +/** + * Policy for controlling export on the disk. + */ enum PublicNetworkAccess { - @doc("You can generate a SAS URI to access the underlying data of the disk publicly on the internet when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from your trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate.") + /** + * You can generate a SAS URI to access the underlying data of the disk publicly on the internet when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from your trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate. + */ Enabled, - @doc("You cannot access the underlying data of the disk publicly on the internet even when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from your trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate.") + + /** + * You cannot access the underlying data of the disk publicly on the internet even when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from your trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate. + */ Disabled, } -@doc("Additional authentication requirements when exporting or uploading to a disk or snapshot.") +/** + * Additional authentication requirements when exporting or uploading to a disk or snapshot. + */ enum DataAccessAuthMode { - @doc("When export/upload URL is used, the system checks if the user has an identity in Azure Active Directory and has necessary permissions to export/upload the data. Please refer to aka.ms/DisksAzureADAuth.") + /** + * When export/upload URL is used, the system checks if the user has an identity in Azure Active Directory and has necessary permissions to export/upload the data. Please refer to aka.ms/DisksAzureADAuth. + */ AzureActiveDirectory, - @doc("No additional authentication would be performed when accessing export/upload URL.") + + /** + * No additional authentication would be performed when accessing export/upload URL. + */ None, } -@doc("The Access Level, accepted values include None, Read, Write.") +/** + * The Access Level, accepted values include None, Read, Write. + */ enum AccessLevel { None, Read, Write, } -@doc("Used to specify the file format when making request for SAS on a VHDX file format snapshot") +/** + * Used to specify the file format when making request for SAS on a VHDX file format snapshot + */ enum FileFormat { - @doc("A VHD file is a disk image file in the Virtual Hard Disk file format.") + /** + * A VHD file is a disk image file in the Virtual Hard Disk file format. + */ VHD, - @doc("A VHDX file is a disk image file in the Virtual Hard Disk v2 file format.") + + /** + * A VHDX file is a disk image file in the Virtual Hard Disk v2 file format. + */ VHDX, } -@doc("The private endpoint connection status.") +/** + * The private endpoint connection status. + */ enum PrivateEndpointServiceConnectionStatus { Pending, Approved, Rejected, } -@doc("The current provisioning state.") +/** + * The current provisioning state. + */ enum PrivateEndpointConnectionProvisioningState { Succeeded, Creating, @@ -725,7 +989,9 @@ enum PrivateEndpointConnectionProvisioningState { Failed, } -@doc("The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys.") +/** + * The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys. + */ enum DiskEncryptionSetIdentityType { SystemAssigned, UserAssigned, @@ -733,35 +999,66 @@ enum DiskEncryptionSetIdentityType { None, } -@doc("The type of key used to encrypt the data of the disk.") +/** + * The type of key used to encrypt the data of the disk. + */ enum DiskEncryptionSetType { - @doc("Resource using diskEncryptionSet would be encrypted at rest with Customer managed key that can be changed and revoked by a customer.") + /** + * Resource using diskEncryptionSet would be encrypted at rest with Customer managed key that can be changed and revoked by a customer. + */ EncryptionAtRestWithCustomerKey, - @doc("Resource using diskEncryptionSet would be encrypted at rest with two layers of encryption. One of the keys is Customer managed and the other key is Platform managed.") + + /** + * Resource using diskEncryptionSet would be encrypted at rest with two layers of encryption. One of the keys is Customer managed and the other key is Platform managed. + */ EncryptionAtRestWithPlatformAndCustomerKeys, - @doc("Confidential VM supported disk and VM guest state would be encrypted with customer managed key.") + + /** + * Confidential VM supported disk and VM guest state would be encrypted with customer managed key. + */ ConfidentialVmEncryptedWithCustomerKey, } -@doc("The sku name.") +/** + * The sku name. + */ enum SnapshotStorageAccountTypes { - @doc("Standard HDD locally redundant storage") Standard_LRS, - @doc("Premium SSD locally redundant storage") Premium_LRS, - @doc("Standard zone redundant storage") Standard_ZRS, + /** + * Standard HDD locally redundant storage + */ + Standard_LRS, + + /** + * Premium SSD locally redundant storage + */ + Premium_LRS, + + /** + * Standard zone redundant storage + */ + Standard_ZRS, } -@doc("Indicates the error code if the background copy of a resource created via the CopyStart operation fails.") +/** + * Indicates the error code if the background copy of a resource created via the CopyStart operation fails. + */ enum CopyCompletionErrorReason { - @doc("Indicates that the source snapshot was deleted while the background copy of the resource created via CopyStart operation was in progress.") + /** + * Indicates that the source snapshot was deleted while the background copy of the resource created via CopyStart operation was in progress. + */ CopySourceNotFound, } -@doc("The type of the extended location.") +/** + * The type of the extended location. + */ enum ExtendedLocationType { EdgeZone, } -@doc("The provisioning state, which only appears in the response.") +/** + * The provisioning state, which only appears in the response. + */ enum GalleryProvisioningState { Creating, Updating, @@ -771,20 +1068,26 @@ enum GalleryProvisioningState { Migrating, } -@doc("This property allows you to specify the permission of sharing gallery.

    Possible values are:

    **Private**

    **Groups**

    **Community**") +/** + * This property allows you to specify the permission of sharing gallery.

    Possible values are:

    **Private**

    **Groups**

    **Community** + */ enum GallerySharingPermissionTypes { Private, Groups, Community, } -@doc("This property allows you to specify the type of sharing group.

    Possible values are:

    **Subscriptions**

    **AADTenants**") +/** + * This property allows you to specify the type of sharing group.

    Possible values are:

    **Subscriptions**

    **AADTenants** + */ enum SharingProfileGroupTypes { Subscriptions, AADTenants, } -@doc("The sharing state of the gallery, which only appears in the response.") +/** + * The sharing state of the gallery, which only appears in the response. + */ enum SharingState { Succeeded, InProgress, @@ -800,33 +1103,43 @@ enum GalleryExpandParams { `SharingProfile/Groups`, } -@doc("Specifies the storage account type to be used to store the image. This property is not updatable.") +/** + * Specifies the storage account type to be used to store the image. This property is not updatable. + */ enum StorageAccountType { Standard_LRS, Standard_ZRS, Premium_LRS, } -@doc("confidential VM encryption types") +/** + * confidential VM encryption types + */ enum ConfidentialVMEncryptionType { EncryptedVMGuestStateOnlyWithPmk, EncryptedWithPmk, EncryptedWithCmk, } -@doc("Optional parameter which specifies the mode to be used for replication. This property is not updatable.") +/** + * Optional parameter which specifies the mode to be used for replication. This property is not updatable. + */ enum ReplicationMode { Full, Shallow, } -@doc("It is type of the extended location.") +/** + * It is type of the extended location. + */ enum GalleryExtendedLocationType { EdgeZone, Unknown, } -@doc("Specifies the storage account type to be used to store the image. This property is not updatable.") +/** + * Specifies the storage account type to be used to store the image. This property is not updatable. + */ enum EdgeZoneStorageAccountType { Standard_LRS, Standard_ZRS, @@ -834,7 +1147,9 @@ enum EdgeZoneStorageAccountType { Premium_LRS, } -@doc("Describes the nature of the policy violation.") +/** + * Describes the nature of the policy violation. + */ enum PolicyViolationCategory { Other, ImageFlaggedUnsafe, @@ -842,7 +1157,9 @@ enum PolicyViolationCategory { IpTheft, } -@doc("This is the aggregated replication status based on all the regional replication status flags.") +/** + * This is the aggregated replication status based on all the regional replication status flags. + */ enum AggregatedReplicationState { Unknown, InProgress, @@ -850,7 +1167,9 @@ enum AggregatedReplicationState { Failed, } -@doc("This is the regional replication state.") +/** + * This is the regional replication state. + */ enum ReplicationState { Unknown, Replicating, @@ -862,7 +1181,9 @@ enum ReplicationStatusTypes { ReplicationStatus, } -@doc("This property allows you to specify the operation type of gallery sharing update.

    Possible values are:

    **Add**

    **Remove**

    **Reset**") +/** + * This property allows you to specify the operation type of gallery sharing update.

    Possible values are:

    **Add**

    **Remove**

    **Reset** + */ enum SharingUpdateOperationTypes { Add, Remove, @@ -874,49 +1195,47 @@ enum SharedToValues { tenant, } -@doc("The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'") +/** + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' + */ enum SharedGalleryHostCaching { None, ReadOnly, ReadWrite, } -@doc(""" -Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. +/** +* Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. Possible Values are

    **Auto**

    **Manual**

    **Simultaneous**

    If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. -""") +*/ enum CloudServiceUpgradeMode { Auto, Manual, Simultaneous, } -@doc(""" -Slot type for the cloud service. +/** +* Slot type for the cloud service. Possible values are

    **Production**

    **Staging**

    If not specified, the default value is Production. -""") +*/ enum CloudServiceSlotType { Production, Staging, } -@doc("The type of identity that created the resource.") -enum CreatedByType { - User, - Application, - ManagedIdentity, - Key, -} - -@doc("Specifies the sku of an Availability Set. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'.") +/** + * Specifies the sku of an Availability Set. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'. + */ enum AvailabilitySetSkuTypes { Classic, Aligned, } -@doc("Specifies the mode of an upgrade to virtual machines in the scale set.

    Possible values are:

    **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.

    **Automatic** - All virtual machines in the scale set are automatically updated at the same time.") +/** + * Specifies the mode of an upgrade to virtual machines in the scale set.

    Possible values are:

    **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.

    **Automatic** - All virtual machines in the scale set are automatically updated at the same time. + */ @fixed enum UpgradeMode { Automatic, @@ -924,21 +1243,27 @@ enum UpgradeMode { Rolling, } -@doc("Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.") +/** + * Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. + */ @fixed enum SettingNames { AutoLogon, FirstLogonCommands, } -@doc("Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**") +/** + * Specifies the protocol of WinRM listener. Possible values are: **http,** **https.** + */ @fixed enum ProtocolTypes { Http, Https, } -@doc("Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage**") +/** + * Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage** + */ @fixed enum CachingTypes { None, @@ -946,14 +1271,18 @@ enum CachingTypes { ReadWrite, } -@doc("This property allows you to specify the supported type of the OS that application is built for.

    Possible values are:

    **Windows**

    **Linux**") +/** + * This property allows you to specify the supported type of the OS that application is built for.

    Possible values are:

    **Windows**

    **Linux** + */ @fixed enum OperatingSystemTypes { Windows, Linux, } -@doc("The level code.") +/** + * The level code. + */ @fixed enum StatusLevelTypes { Info, @@ -961,7 +1290,9 @@ enum StatusLevelTypes { Error, } -@doc("The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set.") +/** + * The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set. + */ @fixed enum ResourceIdentityType { SystemAssigned, @@ -970,14 +1301,18 @@ enum ResourceIdentityType { None, } -@doc("The scale type applicable to the sku.") +/** + * The scale type applicable to the sku. + */ @fixed enum VirtualMachineScaleSetSkuScaleType { Automatic, None, } -@doc("Code indicating the current status of the upgrade.") +/** + * Code indicating the current status of the upgrade. + */ @fixed enum UpgradeState { RollingForward, @@ -986,7 +1321,9 @@ enum UpgradeState { Faulted, } -@doc("Invoker of the Upgrade Operation") +/** + * Invoker of the Upgrade Operation + */ @fixed enum UpgradeOperationInvoker { Unknown, @@ -994,7 +1331,9 @@ enum UpgradeOperationInvoker { Platform, } -@doc("Code indicating the current status of the upgrade.") +/** + * Code indicating the current status of the upgrade. + */ @fixed enum RollingUpgradeStatusCode { RollingForward, @@ -1003,14 +1342,18 @@ enum RollingUpgradeStatusCode { Faulted, } -@doc("The last action performed on the rolling upgrade.") +/** + * The last action performed on the rolling upgrade. + */ @fixed enum RollingUpgradeActionType { Start, Cancel, } -@doc("The Last Maintenance Operation Result Code.") +/** + * The Last Maintenance Operation Result Code. + */ @fixed enum MaintenanceOperationResultCodeTypes { None, @@ -1025,7 +1368,9 @@ enum InstanceViewTypes { userData, } -@doc("Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.** The default value is: **None.**") +/** + * Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.** The default value is: **None.** + */ @fixed enum DedicatedHostLicenseTypes { None, @@ -1033,14 +1378,18 @@ enum DedicatedHostLicenseTypes { Windows_Server_Perpetual, } -@doc("This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'.") +/** + * This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. + */ @fixed enum OperatingSystemStateTypes { Generalized, Specialized, } -@doc("Interval value in minutes used to create LogAnalytics call rate logs.") +/** + * Interval value in minutes used to create LogAnalytics call rate logs. + */ @fixed enum IntervalInMins { ThreeMins, @@ -1049,7 +1398,9 @@ enum IntervalInMins { SixtyMins, } -@doc("The scale type applicable to the sku.") +/** + * The scale type applicable to the sku. + */ @fixed enum ResourceSkuCapacityScaleType { Automatic, @@ -1057,21 +1408,27 @@ enum ResourceSkuCapacityScaleType { None, } -@doc("The type of restrictions.") +/** + * The type of restrictions. + */ @fixed enum ResourceSkuRestrictionsType { Location, Zone, } -@doc("The reason for restriction.") +/** + * The reason for restriction. + */ @fixed enum ResourceSkuRestrictionsReasonCode { QuotaId, NotAvailableForSubscription, } -@doc("The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'") +/** + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' + */ @fixed enum HostCaching { None, @@ -1079,7 +1436,9 @@ enum HostCaching { ReadWrite, } -@doc("Specifies the type of the custom action parameter. Possible values are: String, ConfigurationDataBlob or LogOutputBlob") +/** + * Specifies the type of the custom action parameter. Possible values are: String, ConfigurationDataBlob or LogOutputBlob + */ @fixed enum GalleryApplicationCustomActionParameterType { String, @@ -1087,5714 +1446,9222 @@ enum GalleryApplicationCustomActionParameterType { LogOutputBlob, } -@doc("Describes the properties of a Compute Operation value.") +/** + * Describes the properties of a Compute Operation value. + */ model ComputeOperationValue { - @doc("The origin of the compute operation.") + /** + * The origin of the compute operation. + */ @visibility("read") origin?: string; - @doc("The name of the compute operation.") + /** + * The name of the compute operation. + */ @visibility("read") name?: string; - @doc("Describes the properties of a Compute Operation Value Display.") + /** + * Describes the properties of a Compute Operation Value Display. + */ display?: ComputeOperationValueDisplay; } -@doc("Describes the properties of a Compute Operation Value Display.") +/** + * Describes the properties of a Compute Operation Value Display. + */ model ComputeOperationValueDisplay { - @doc("The display name of the compute operation.") + /** + * The display name of the compute operation. + */ @visibility("read") operation?: string; - @doc("The display name of the resource the operation applies to.") + /** + * The display name of the resource the operation applies to. + */ @visibility("read") resource?: string; - @doc("The description of the operation.") + /** + * The description of the operation. + */ @visibility("read") description?: string; - @doc("The resource provider for the operation.") + /** + * The resource provider for the operation. + */ @visibility("read") provider?: string; } -@doc("An error response from the Compute service.") +/** + * An error response from the Compute service. + */ @error model CloudError { - @doc("Api error.") + /** + * Api error. + */ error?: ApiError; } -@doc("Api error.") +/** + * Api error. + */ model ApiError { - @doc("The Api error details") + /** + * The Api error details + */ details?: ApiErrorBase[]; - @doc("The Api inner error") + /** + * The Api inner error + */ innererror?: InnerError; - @doc("The error code.") + /** + * The error code. + */ code?: string; - @doc("The target of the particular error.") + /** + * The target of the particular error. + */ target?: string; - @doc("The error message.") + /** + * The error message. + */ message?: string; } -@doc("Api error base.") +/** + * Api error base. + */ model ApiErrorBase { - @doc("The error code.") + /** + * The error code. + */ code?: string; - @doc("The target of the particular error.") + /** + * The target of the particular error. + */ target?: string; - @doc("The error message.") + /** + * The error message. + */ message?: string; } -@doc("Inner error details.") +/** + * Inner error details. + */ model InnerError { - @doc("The exception type.") + /** + * The exception type. + */ exceptiontype?: string; - @doc("The internal error message or exception dump.") + /** + * The internal error message or exception dump. + */ errordetail?: string; } -@doc("The List Usages operation response.") +/** + * The List Usages operation response. + */ model ListUsagesResult is Azure.Core.Page; -@doc("Describes Compute Resource Usage.") +/** + * Describes Compute Resource Usage. + */ model Usage { - @doc("An enum describing the unit of usage measurement.") + /** + * An enum describing the unit of usage measurement. + */ unit: "Count"; - @doc("The current usage of the resource.") + /** + * The current usage of the resource. + */ currentValue: int32; - @doc("The maximum permitted usage of the resource.") - limit: int32; + /** + * The maximum permitted usage of the resource. + */ + limit: int64; - @doc("The name of the type of usage.") + /** + * The name of the type of usage. + */ name: UsageName; } -@doc("The Usage Names.") +/** + * The Usage Names. + */ model UsageName { - @doc("The name of the resource.") + /** + * The name of the resource. + */ value?: string; - @doc("The localized name of the resource.") + /** + * The localized name of the resource. + */ localizedValue?: string; } -@doc("The List Virtual Machine operation response.") +/** + * The List Virtual Machine operation response. + */ @pagedResult model VirtualMachineSizeListResult { - @doc("The list of virtual machine sizes.") + /** + * The list of virtual machine sizes. + */ @items value?: VirtualMachineSize[]; } -@doc("Describes the properties of a VM size.") +/** + * Describes the properties of a VM size. + */ model VirtualMachineSize { - @doc("The name of the virtual machine size.") + /** + * The name of the virtual machine size. + */ name?: string; - @doc("The number of cores supported by the virtual machine size. For Constrained vCPU capable VM sizes, this number represents the total vCPUs of quota that the VM uses. For accurate vCPU count, please refer to https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu or https://docs.microsoft.com/rest/api/compute/resourceskus/list") + /** + * The number of cores supported by the virtual machine size. For Constrained vCPU capable VM sizes, this number represents the total vCPUs of quota that the VM uses. For accurate vCPU count, please refer to https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu or https://docs.microsoft.com/rest/api/compute/resourceskus/list + */ numberOfCores?: int32; - @doc("The OS disk size, in MB, allowed by the virtual machine size.") + /** + * The OS disk size, in MB, allowed by the virtual machine size. + */ osDiskSizeInMB?: int32; - @doc("The resource disk size, in MB, allowed by the virtual machine size.") + /** + * The resource disk size, in MB, allowed by the virtual machine size. + */ resourceDiskSizeInMB?: int32; - @doc("The amount of memory, in MB, supported by the virtual machine size.") + /** + * The amount of memory, in MB, supported by the virtual machine size. + */ memoryInMB?: int32; - @doc("The maximum number of data disks that can be attached to the virtual machine size.") + /** + * The maximum number of data disks that can be attached to the virtual machine size. + */ maxDataDiskCount?: int32; } -@doc("Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU name.") +/** + * Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU name. + */ model Sku { - @doc("The sku name.") + /** + * The sku name. + */ name?: string; - @doc("Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic**") + /** + * Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + */ tier?: string; - @doc("Specifies the number of virtual machines in the scale set.") - capacity?: int32; + /** + * Specifies the number of virtual machines in the scale set. + */ + capacity?: int64; } -@doc("Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.") +/** + * Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. + */ model Plan { - @doc("The plan ID.") + /** + * The plan ID. + */ name?: string; - @doc("The publisher ID.") + /** + * The publisher ID. + */ publisher?: string; - @doc("Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.") + /** + * Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. + */ product?: string; - @doc("The promotion code.") + /** + * The promotion code. + */ promotionCode?: string; } -@doc("Describes the properties of a Virtual Machine Scale Set.") +/** + * Describes the properties of a Virtual Machine Scale Set. + */ model VirtualMachineScaleSetProperties { - @doc("The upgrade policy.") + /** + * The upgrade policy. + */ upgradePolicy?: UpgradePolicy; - @doc("Policy for automatic repairs.") + /** + * Policy for automatic repairs. + */ automaticRepairsPolicy?: AutomaticRepairsPolicy; - @doc("The virtual machine profile.") + /** + * The virtual machine profile. + */ virtualMachineProfile?: VirtualMachineScaleSetVMProfile; - @doc("The provisioning state, which only appears in the response.") + /** + * The provisioning state, which only appears in the response. + */ @visibility("read") provisioningState?: string; - @doc("Specifies whether the Virtual Machine Scale Set should be overprovisioned.") + /** + * Specifies whether the Virtual Machine Scale Set should be overprovisioned. + */ overprovision?: boolean; - @doc("When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.") + /** + * When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. + */ doNotRunExtensionsOnOverprovisionedVMs?: boolean; - @doc("Specifies the ID which uniquely identifies a Virtual Machine Scale Set.") + /** + * Specifies the ID which uniquely identifies a Virtual Machine Scale Set. + */ @visibility("read") uniqueId?: string; - @doc("When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.") + /** + * When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. + */ singlePlacementGroup?: boolean; - @doc("Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set.") + /** + * Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set. + */ zoneBalance?: boolean; - @doc("Fault Domain count for each placement group.") + /** + * Fault Domain count for each placement group. + */ platformFaultDomainCount?: int32; - @doc("Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01.") + /** + * Specifies information about the proximity placement group that the virtual machine scale set should be assigned to. Minimum api-version: 2018-04-01. + */ proximityPlacementGroup?: SubResource; - @doc("Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version: 2020-06-01.") + /** + * Specifies information about the dedicated host group that the virtual machine scale set resides in. Minimum api-version: 2020-06-01. + */ hostGroup?: SubResource; - @doc("Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.") + /** + * Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. + */ additionalCapabilities?: AdditionalCapabilities; - @doc("Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.") + /** + * Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set. + */ scaleInPolicy?: ScaleInPolicy; - @doc("Specifies the orchestration mode for the virtual machine scale set.") + /** + * Specifies the orchestration mode for the virtual machine scale set. + */ orchestrationMode?: OrchestrationMode; - @doc("Specifies the Spot Restore properties for the virtual machine scale set.") + /** + * Specifies the Spot Restore properties for the virtual machine scale set. + */ spotRestorePolicy?: SpotRestorePolicy; - @doc("Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.") + /** + * Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance. + */ priorityMixPolicy?: PriorityMixPolicy; - @doc("Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01.") + /** + * Specifies the time at which the Virtual Machine Scale Set resource was created. Minimum api-version: 2021-11-01. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timeCreated?: utcDateTime; - @doc("Optional property which must either be set to True or omitted.") + /** + * Optional property which must either be set to True or omitted. + */ constrainedMaximumCapacity?: boolean; } -@doc("Describes an upgrade policy - automatic, manual, or rolling.") +/** + * Describes an upgrade policy - automatic, manual, or rolling. + */ model UpgradePolicy { - @doc("Specifies the mode of an upgrade to virtual machines in the scale set.

    Possible values are:

    **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.

    **Automatic** - All virtual machines in the scale set are automatically updated at the same time.") + /** + * Specifies the mode of an upgrade to virtual machines in the scale set.

    Possible values are:

    **Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.

    **Automatic** - All virtual machines in the scale set are automatically updated at the same time. + */ mode?: UpgradeMode; - @doc("The configuration parameters used while performing a rolling upgrade.") + /** + * The configuration parameters used while performing a rolling upgrade. + */ rollingUpgradePolicy?: RollingUpgradePolicy; - @doc("Configuration parameters used for performing automatic OS Upgrade.") + /** + * Configuration parameters used for performing automatic OS Upgrade. + */ automaticOSUpgradePolicy?: AutomaticOSUpgradePolicy; } -@doc("The configuration parameters used while performing a rolling upgrade.") +/** + * The configuration parameters used while performing a rolling upgrade. + */ model RollingUpgradePolicy { - @doc("The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%.") + /** + * The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%. + */ @maxValue(100) @minValue(5) maxBatchInstancePercent?: int32; - @doc("The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%.") + /** + * The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%. + */ @maxValue(100) @minValue(5) maxUnhealthyInstancePercent?: int32; - @doc("The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%.") + /** + * The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%. + */ @maxValue(100) maxUnhealthyUpgradedInstancePercent?: int32; - @doc("The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S).") + /** + * The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S). + */ pauseTimeBetweenBatches?: string; - @doc("Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size.") + /** + * Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size. + */ enableCrossZoneUpgrade?: boolean; - @doc("Upgrade all unhealthy instances in a scale set before any healthy instances.") + /** + * Upgrade all unhealthy instances in a scale set before any healthy instances. + */ prioritizeUnhealthyInstances?: boolean; - @doc("Rollback failed instances to previous model if the Rolling Upgrade policy is violated.") + /** + * Rollback failed instances to previous model if the Rolling Upgrade policy is violated. + */ rollbackFailedInstancesOnPolicyBreach?: boolean; - @doc("Create new virtual machines to upgrade the scale set, rather than updating the existing virtual machines. Existing virtual machines will be deleted once the new virtual machines are created for each batch.") + /** + * Create new virtual machines to upgrade the scale set, rather than updating the existing virtual machines. Existing virtual machines will be deleted once the new virtual machines are created for each batch. + */ maxSurge?: boolean; } -@doc("The configuration parameters used for performing automatic OS upgrade.") +/** + * The configuration parameters used for performing automatic OS upgrade. + */ model AutomaticOSUpgradePolicy { - @doc("Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true.") + /** + * Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false. If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true. + */ enableAutomaticOSUpgrade?: boolean; - @doc("Whether OS image rollback feature should be disabled. Default value is false.") + /** + * Whether OS image rollback feature should be disabled. Default value is false. + */ disableAutomaticRollback?: boolean; - @doc("Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS.") + /** + * Indicates whether rolling upgrade policy should be used during Auto OS Upgrade. Default value is false. Auto OS Upgrade will fallback to the default policy if no policy is defined on the VMSS. + */ useRollingUpgradePolicy?: boolean; } -@doc("Specifies the configuration parameters for automatic repairs on the virtual machine scale set.") +/** + * Specifies the configuration parameters for automatic repairs on the virtual machine scale set. + */ model AutomaticRepairsPolicy { - @doc("Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.") + /** + * Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false. + */ enabled?: boolean; - @doc("The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).") + /** + * The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 10 minutes (PT10M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M). + */ gracePeriod?: string; - @doc("Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.") + /** + * Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace. + */ repairAction?: RepairAction; } -@doc("Describes a virtual machine scale set virtual machine profile.") +/** + * Describes a virtual machine scale set virtual machine profile. + */ model VirtualMachineScaleSetVMProfile { - @doc("Specifies the operating system settings for the virtual machines in the scale set.") + /** + * Specifies the operating system settings for the virtual machines in the scale set. + */ osProfile?: VirtualMachineScaleSetOSProfile; - @doc("Specifies the storage settings for the virtual machine disks.") + /** + * Specifies the storage settings for the virtual machine disks. + */ storageProfile?: VirtualMachineScaleSetStorageProfile; - @doc("Specifies properties of the network interfaces of the virtual machines in the scale set.") + /** + * Specifies properties of the network interfaces of the virtual machines in the scale set. + */ networkProfile?: VirtualMachineScaleSetNetworkProfile; - @doc("Specifies the Security related profile settings for the virtual machines in the scale set.") + /** + * Specifies the Security related profile settings for the virtual machines in the scale set. + */ securityProfile?: SecurityProfile; - @doc("Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.") + /** + * Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. + */ diagnosticsProfile?: DiagnosticsProfile; - @doc("Specifies a collection of settings for extensions installed on virtual machines in the scale set.") + /** + * Specifies a collection of settings for extensions installed on virtual machines in the scale set. + */ extensionProfile?: VirtualMachineScaleSetExtensionProfile; - @doc("Specifies that the image or disk that is being used was licensed on-premises.

    Possible values for Windows Server operating system are:

    Windows_Client

    Windows_Server

    Possible values for Linux Server operating system are:

    RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

    [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

    Minimum api-version: 2015-06-15") + /** + * Specifies that the image or disk that is being used was licensed on-premises.

    Possible values for Windows Server operating system are:

    Windows_Client

    Windows_Server

    Possible values for Linux Server operating system are:

    RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

    [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

    Minimum api-version: 2015-06-15 + */ licenseType?: string; - @doc("Specifies the priority for the virtual machines in the scale set. Minimum api-version: 2017-10-30-preview.") + /** + * Specifies the priority for the virtual machines in the scale set. Minimum api-version: 2017-10-30-preview. + */ priority?: VirtualMachinePriorityTypes; - @doc("Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.") + /** + * Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. + */ evictionPolicy?: VirtualMachineEvictionPolicyTypes; - @doc("Specifies the billing related details of a Azure Spot VMSS. Minimum api-version: 2019-03-01.") + /** + * Specifies the billing related details of a Azure Spot VMSS. Minimum api-version: 2019-03-01. + */ billingProfile?: BillingProfile; - @doc("Specifies Scheduled Event related configurations.") + /** + * Specifies Scheduled Event related configurations. + */ scheduledEventsProfile?: ScheduledEventsProfile; - @doc("UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01.") + /** + * UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. + */ userData?: string; - @doc("Specifies the capacity reservation related details of a scale set. Minimum api-version: 2021-04-01.") + /** + * Specifies the capacity reservation related details of a scale set. Minimum api-version: 2021-04-01. + */ capacityReservation?: CapacityReservationProfile; - @doc("Specifies the gallery applications that should be made available to the VM/VMSS") + /** + * Specifies the gallery applications that should be made available to the VM/VMSS + */ applicationProfile?: ApplicationProfile; - @doc("Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01.") + /** + * Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01. + */ hardwareProfile?: VirtualMachineScaleSetHardwareProfile; - @doc("Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. Minimum api-version: 2022-11-01") + /** + * Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. Minimum api-version: 2022-11-01 + */ serviceArtifactReference?: ServiceArtifactReference; - @doc("Specifies the security posture to be used for all virtual machines in the scale set. Minimum api-version: 2023-03-01") + /** + * Specifies the security posture to be used for all virtual machines in the scale set. Minimum api-version: 2023-03-01 + */ securityPostureReference?: SecurityPostureReference; } -@doc("Describes a virtual machine scale set OS profile.") +/** + * Describes a virtual machine scale set OS profile. + */ model VirtualMachineScaleSetOSProfile { - @doc("Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long.") + /** + * Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long. + */ computerNamePrefix?: string; - @doc("Specifies the name of the administrator account.

    **Windows-only restriction:** Cannot end in \".\"

    **Disallowed values:** \"administrator\", \"admin\", \"user\", \"user1\", \"test\", \"user2\", \"test1\", \"user3\", \"admin1\", \"1\", \"123\", \"a\", \"actuser\", \"adm\", \"admin2\", \"aspnet\", \"backup\", \"console\", \"david\", \"guest\", \"john\", \"owner\", \"root\", \"server\", \"sql\", \"support\", \"support_388945a0\", \"sys\", \"test2\", \"test3\", \"user4\", \"user5\".

    **Minimum-length (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters") + /** + * Specifies the name of the administrator account.

    **Windows-only restriction:** Cannot end in "."

    **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters + */ adminUsername?: string; - @doc("Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\\W_])

    **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)") + /** + * Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) + */ adminPassword?: string; - @doc("Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init)") + /** + * Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init) + */ customData?: string; - @doc("Specifies Windows operating system settings on the virtual machine.") + /** + * Specifies Windows operating system settings on the virtual machine. + */ windowsConfiguration?: WindowsConfiguration; - @doc("Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).") + /** + * Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + */ linuxConfiguration?: LinuxConfiguration; - @doc("Specifies set of certificates that should be installed onto the virtual machines in the scale set. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).") + /** + * Specifies set of certificates that should be installed onto the virtual machines in the scale set. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + */ secrets?: VaultSecretGroup[]; - @doc("Specifies whether extension operations should be allowed on the virtual machine scale set. This may only be set to False when no extensions are present on the virtual machine scale set.") + /** + * Specifies whether extension operations should be allowed on the virtual machine scale set. This may only be set to False when no extensions are present on the virtual machine scale set. + */ allowExtensionOperations?: boolean; - @doc("Optional property which must either be set to True or omitted.") + /** + * Optional property which must either be set to True or omitted. + */ requireGuestProvisionSignal?: boolean; } -@doc("Specifies Windows operating system settings on the virtual machine.") +/** + * Specifies Windows operating system settings on the virtual machine. + */ model WindowsConfiguration { - @doc("Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, it is set to true by default. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.") + /** + * Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, it is set to true by default. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. + */ provisionVMAgent?: boolean; - @doc("Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning.") + /** + * Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true. For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning. + */ enableAutomaticUpdates?: boolean; - @doc("Specifies the time zone of the virtual machine. e.g. \"Pacific Standard Time\". Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones).") + /** + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones). + */ timeZone?: string; - @doc("Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.") + /** + * Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. + */ additionalUnattendContent?: AdditionalUnattendContent[]; - @doc("[Preview Feature] Specifies settings related to VM Guest Patching on Windows.") + /** + * [Preview Feature] Specifies settings related to VM Guest Patching on Windows. + */ patchSettings?: PatchSettings; - @doc("Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.") + /** + * Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell. + */ winRM?: WinRMConfiguration; - @doc("Indicates whether VMAgent Platform Updates is enabled for the Windows virtual machine. Default value is false.") + /** + * Indicates whether VMAgent Platform Updates is enabled for the Windows virtual machine. Default value is false. + */ enableVMAgentPlatformUpdates?: boolean; } -@doc("Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied.") +/** + * Specifies additional XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which the content is applied. + */ model AdditionalUnattendContent { - @doc("The pass name. Currently, the only allowable value is OobeSystem.") + /** + * The pass name. Currently, the only allowable value is OobeSystem. + */ passName?: "OobeSystem"; - @doc("The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup.") + /** + * The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. + */ componentName?: "Microsoft-Windows-Shell-Setup"; - @doc("Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.") + /** + * Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. + */ settingName?: SettingNames; - @doc("Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.") + /** + * Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted. + */ content?: string; } -@doc("Specifies settings related to VM Guest Patching on Windows.") +/** + * Specifies settings related to VM Guest Patching on Windows. + */ model PatchSettings { - @doc("Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

    Possible values are:

    **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

    **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

    **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true ") + /** + * Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

    Possible values are:

    **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

    **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

    **AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true + */ patchMode?: WindowsVMGuestPatchMode; - @doc("Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to 'AutomaticByPlatform'.") + /** + * Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to 'AutomaticByPlatform'. + */ enableHotpatching?: boolean; - @doc("Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.

    Possible values are:

    **ImageDefault** - You control the timing of patch assessments on a virtual machine.

    **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. ") + /** + * Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.

    Possible values are:

    **ImageDefault** - You control the timing of patch assessments on a virtual machine.

    **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. + */ assessmentMode?: WindowsPatchAssessmentMode; - @doc("Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows.") + /** + * Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows. + */ automaticByPlatformSettings?: WindowsVMGuestPatchAutomaticByPlatformSettings; } -@doc("Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch settings.") +/** + * Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch settings. + */ model WindowsVMGuestPatchAutomaticByPlatformSettings { - @doc("Specifies the reboot setting for all AutomaticByPlatform patch installation operations.") + /** + * Specifies the reboot setting for all AutomaticByPlatform patch installation operations. + */ rebootSetting?: WindowsVMGuestPatchAutomaticByPlatformRebootSetting; - @doc("Enables customer to schedule patching without accidental upgrades") + /** + * Enables customer to schedule patching without accidental upgrades + */ bypassPlatformSafetyChecksOnUserSchedule?: boolean; } -@doc("Describes Windows Remote Management configuration of the VM") +/** + * Describes Windows Remote Management configuration of the VM + */ model WinRMConfiguration { - @doc("The list of Windows Remote Management listeners") + /** + * The list of Windows Remote Management listeners + */ listeners?: WinRMListener[]; } -@doc("Describes Protocol and thumbprint of Windows Remote Management listener") +/** + * Describes Protocol and thumbprint of Windows Remote Management listener + */ model WinRMListener { - @doc("Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**") + /** + * Specifies the protocol of WinRM listener. Possible values are: **http,** **https.** + */ protocol?: ProtocolTypes; - @doc("This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be the Base64 encoding of the following JSON Object which is encoded in UTF-8:

    {
    \"data\":\"\",
    \"dataType\":\"pfx\",
    \"password\":\"\"
    }
    To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).") + /** + * This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be the Base64 encoding of the following JSON Object which is encoded in UTF-8:

    {
    "data":"",
    "dataType":"pfx",
    "password":""
    }
    To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + */ certificateUrl?: string; } -@doc("Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).") +/** + * Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + */ model LinuxConfiguration { - @doc("Specifies whether password authentication should be disabled.") + /** + * Specifies whether password authentication should be disabled. + */ disablePasswordAuthentication?: boolean; - @doc("Specifies the ssh key configuration for a Linux OS.") + /** + * Specifies the ssh key configuration for a Linux OS. + */ ssh?: SshConfiguration; - @doc("Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.") + /** + * Indicates whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later. + */ provisionVMAgent?: boolean; - @doc("[Preview Feature] Specifies settings related to VM Guest Patching on Linux.") + /** + * [Preview Feature] Specifies settings related to VM Guest Patching on Linux. + */ patchSettings?: LinuxPatchSettings; - @doc("Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine. Default value is false.") + /** + * Indicates whether VMAgent Platform Updates is enabled for the Linux virtual machine. Default value is false. + */ enableVMAgentPlatformUpdates?: boolean; } -@doc("SSH configuration for Linux based VMs running on Azure") +/** + * SSH configuration for Linux based VMs running on Azure + */ model SshConfiguration { - @doc("The list of SSH public keys used to authenticate with linux based VMs.") + /** + * The list of SSH public keys used to authenticate with linux based VMs. + */ publicKeys?: SshPublicKey[]; } -@doc("Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed.") +/** + * Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed. + */ model SshPublicKey { - @doc("Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys") + /** + * Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys + */ path?: string; - @doc("SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).") + /** + * SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + */ keyData?: string; } -@doc("Specifies settings related to VM Guest Patching on Linux.") +/** + * Specifies settings related to VM Guest Patching on Linux. + */ model LinuxPatchSettings { - @doc("Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

    Possible values are:

    **ImageDefault** - The virtual machine's default patching configuration is used.

    **AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true") + /** + * Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

    Possible values are:

    **ImageDefault** - The virtual machine's default patching configuration is used.

    **AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true + */ patchMode?: LinuxVMGuestPatchMode; - @doc("Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.

    Possible values are:

    **ImageDefault** - You control the timing of patch assessments on a virtual machine.

    **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.") + /** + * Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.

    Possible values are:

    **ImageDefault** - You control the timing of patch assessments on a virtual machine.

    **AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. + */ assessmentMode?: LinuxPatchAssessmentMode; - @doc("Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux.") + /** + * Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux. + */ automaticByPlatformSettings?: LinuxVMGuestPatchAutomaticByPlatformSettings; } -@doc("Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Linux patch settings.") +/** + * Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Linux patch settings. + */ model LinuxVMGuestPatchAutomaticByPlatformSettings { - @doc("Specifies the reboot setting for all AutomaticByPlatform patch installation operations.") + /** + * Specifies the reboot setting for all AutomaticByPlatform patch installation operations. + */ rebootSetting?: LinuxVMGuestPatchAutomaticByPlatformRebootSetting; - @doc("Enables customer to schedule patching without accidental upgrades") + /** + * Enables customer to schedule patching without accidental upgrades + */ bypassPlatformSafetyChecksOnUserSchedule?: boolean; } -@doc("Describes a set of certificates which are all in the same Key Vault.") +/** + * Describes a set of certificates which are all in the same Key Vault. + */ model VaultSecretGroup { - @doc("The relative URL of the Key Vault containing all of the certificates in VaultCertificates.") + /** + * The relative URL of the Key Vault containing all of the certificates in VaultCertificates. + */ sourceVault?: SubResource; - @doc("The list of key vault references in SourceVault which contain certificates.") + /** + * The list of key vault references in SourceVault which contain certificates. + */ vaultCertificates?: VaultCertificate[]; } model SubResource { - @doc("Resource Id") + /** + * Resource Id + */ id?: string; } -@doc("Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM.") +/** + * Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM. + */ model VaultCertificate { - @doc("This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

    {
    \"data\":\"\",
    \"dataType\":\"pfx\",
    \"password\":\"\"
    }
    To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).") + /** + * This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:

    {
    "data":"",
    "dataType":"pfx",
    "password":""
    }
    To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + */ certificateUrl?: string; - @doc("For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted.") + /** + * For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. + */ certificateStore?: string; } -@doc("Describes a virtual machine scale set storage profile.") +/** + * Describes a virtual machine scale set storage profile. + */ model VirtualMachineScaleSetStorageProfile { - @doc("Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.") + /** + * Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. + */ imageReference?: ImageReference; - @doc("Specifies information about the operating system disk used by the virtual machines in the scale set. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).") + /** + * Specifies information about the operating system disk used by the virtual machines in the scale set. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + */ osDisk?: VirtualMachineScaleSetOSDisk; - @doc("Specifies the parameters that are used to add data disks to the virtual machines in the scale set. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).") + /** + * Specifies the parameters that are used to add data disks to the virtual machines in the scale set. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + */ dataDisks?: VirtualMachineScaleSetDataDisk[]; diskControllerType?: string; } -@doc("Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.") +/** + * Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. + */ model ImageReference extends SubResource { - @doc("The image publisher.") + /** + * The image publisher. + */ publisher?: string; - @doc("Specifies the offer of the platform image or marketplace image used to create the virtual machine.") + /** + * Specifies the offer of the platform image or marketplace image used to create the virtual machine. + */ offer?: string; - @doc("The image SKU.") + /** + * The image SKU. + */ sku?: string; - @doc("Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version of gallery image, just set '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' in the 'id' field without version input.") + /** + * Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. Please do not use field 'version' for gallery image deployment, gallery image should always use 'id' field for deployment, to use 'latest' version of gallery image, just set '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}' in the 'id' field without version input. + */ version?: string; - @doc("Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'.") + /** + * Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'. + */ @visibility("read") exactVersion?: string; - @doc("Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.") + /** + * Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call. + */ sharedGalleryImageId?: string; - @doc("Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET call.") + /** + * Specified the community gallery image unique id for vm deployment. This can be fetched from community gallery image GET call. + */ communityGalleryImageId?: string; } -@doc("Describes a virtual machine scale set operating system disk.") +/** + * Describes a virtual machine scale set operating system disk. + */ model VirtualMachineScaleSetOSDisk { - @doc("The disk name.") + /** + * The disk name. + */ name?: string; - @doc("Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**") + /** + * Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.** + */ caching?: CachingTypes; - @doc("Specifies whether writeAccelerator should be enabled or disabled on the disk.") + /** + * Specifies whether writeAccelerator should be enabled or disabled on the disk. + */ writeAcceleratorEnabled?: boolean; - @doc("Specifies how the virtual machines in the scale set should be created. The only allowed value is: **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described.") + /** + * Specifies how the virtual machines in the scale set should be created. The only allowed value is: **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. + */ createOption: DiskCreateOptionTypes; - @doc("Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.") + /** + * Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set. + */ diffDiskSettings?: DiffDiskSettings; - @doc("Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.") + /** + * Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. + */ diskSizeGB?: int32; - @doc("This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**") + /** + * This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.** + */ osType?: OperatingSystemTypes; - @doc("Specifies information about the unmanaged user image to base the scale set on.") + /** + * Specifies information about the unmanaged user image to base the scale set on. + */ image?: VirtualHardDisk; - @doc("Specifies the container urls that are used to store operating system disks for the scale set.") + /** + * Specifies the container urls that are used to store operating system disks for the scale set. + */ vhdContainers?: string[]; - @doc("The managed disk parameters.") + /** + * The managed disk parameters. + */ managedDisk?: VirtualMachineScaleSetManagedDiskParameters; - @doc("Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

    Possible values:

    **Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.

    **Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted.

    The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for Ephemeral OS Disk.") + /** + * Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

    Possible values:

    **Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.

    **Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted.

    The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for Ephemeral OS Disk. + */ deleteOption?: DiskDeleteOptionTypes; } -@doc("Describes the parameters of ephemeral disk settings that can be specified for operating system disk. **Note:** The ephemeral disk settings can only be specified for managed disk.") +/** + * Describes the parameters of ephemeral disk settings that can be specified for operating system disk. **Note:** The ephemeral disk settings can only be specified for managed disk. + */ model DiffDiskSettings { - @doc("Specifies the ephemeral disk settings for operating system disk.") + /** + * Specifies the ephemeral disk settings for operating system disk. + */ option?: DiffDiskOptions; - @doc("Specifies the ephemeral disk placement for operating system disk. Possible values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk.") + /** + * Specifies the ephemeral disk placement for operating system disk. Possible values are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used. Refer to the VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. + */ placement?: DiffDiskPlacement; } -@doc("Describes the uri of a disk.") +/** + * Describes the uri of a disk. + */ model VirtualHardDisk { - @doc("Specifies the virtual hard disk's uri.") + /** + * Specifies the virtual hard disk's uri. + */ uri?: string; } -@doc("Describes the parameters of a ScaleSet managed disk.") +/** + * Describes the parameters of a ScaleSet managed disk. + */ model VirtualMachineScaleSetManagedDiskParameters { - @doc("Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.") + /** + * Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. + */ storageAccountType?: StorageAccountTypes; - @doc("Specifies the customer managed disk encryption set resource id for the managed disk.") + /** + * Specifies the customer managed disk encryption set resource id for the managed disk. + */ diskEncryptionSet?: DiskEncryptionSetParameters; - @doc("Specifies the security profile for the managed disk.") + /** + * Specifies the security profile for the managed disk. + */ securityProfile?: VMDiskSecurityProfile; } -@doc("Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. **Note:** The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.") +/** + * Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. **Note:** The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details. + */ model DiskEncryptionSetParameters extends SubResource {} -@doc("Specifies the security profile settings for the managed disk. **Note:** It can only be set for Confidential VMs.") +/** + * Specifies the security profile settings for the managed disk. **Note:** It can only be set for Confidential VMs. + */ model VMDiskSecurityProfile { - @doc("Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. **Note:** It can be set for only Confidential VMs.") + /** + * Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. **Note:** It can be set for only Confidential VMs. + */ securityEncryptionType?: SecurityEncryptionTypes; - @doc("Specifies the customer managed disk encryption set resource id for the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob.") + /** + * Specifies the customer managed disk encryption set resource id for the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob. + */ diskEncryptionSet?: DiskEncryptionSetParameters; } -@doc("Describes a virtual machine scale set data disk.") +/** + * Describes a virtual machine scale set data disk. + */ model VirtualMachineScaleSetDataDisk { - @doc("The disk name.") + /** + * The disk name. + */ name?: string; - @doc("Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.") + /** + * Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. + */ lun: int32; - @doc("Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**") + /** + * Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.** + */ caching?: CachingTypes; - @doc("Specifies whether writeAccelerator should be enabled or disabled on the disk.") + /** + * Specifies whether writeAccelerator should be enabled or disabled on the disk. + */ writeAcceleratorEnabled?: boolean; - @doc("The create option.") + /** + * The create option. + */ createOption: DiskCreateOptionTypes; - @doc("Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.") + /** + * Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. + */ diskSizeGB?: int32; - @doc("The managed disk parameters.") + /** + * The managed disk parameters. + */ managedDisk?: VirtualMachineScaleSetManagedDiskParameters; - @doc("Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.") + /** + * Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB. + */ @projectedName("json", "diskIOPSReadWrite") - diskIopsReadWrite?: int32; + diskIopsReadWrite?: int64; - @doc("Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.") - diskMBpsReadWrite?: int32; + /** + * Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB. + */ + diskMBpsReadWrite?: int64; - @doc("Specifies whether data disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

    Possible values:

    **Delete** If this value is used, the data disk is deleted when the VMSS Flex VM is deleted.

    **Detach** If this value is used, the data disk is retained after VMSS Flex VM is deleted.

    The default value is set to **Delete**.") + /** + * Specifies whether data disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

    Possible values:

    **Delete** If this value is used, the data disk is deleted when the VMSS Flex VM is deleted.

    **Detach** If this value is used, the data disk is retained after VMSS Flex VM is deleted.

    The default value is set to **Delete**. + */ deleteOption?: DiskDeleteOptionTypes; } -@doc("Describes a virtual machine scale set network profile.") +/** + * Describes a virtual machine scale set network profile. + */ model VirtualMachineScaleSetNetworkProfile { - @doc("A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.") + /** + * A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + */ healthProbe?: ApiEntityReference; - @doc("The list of network configurations.") + /** + * The list of network configurations. + */ networkInterfaceConfigurations?: VirtualMachineScaleSetNetworkConfiguration[]; - @doc("specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible'") + /** + * specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible' + */ networkApiVersion?: NetworkApiVersion; } -@doc("The API entity reference.") +/** + * The API entity reference. + */ model ApiEntityReference { - @doc("The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...") + /** + * The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/... + */ id?: string; } -@doc("Describes a virtual machine scale set network profile's network configurations.") +/** + * Describes a virtual machine scale set network profile's network configurations. + */ model VirtualMachineScaleSetNetworkConfiguration { - @doc("The network configuration name.") + /** + * The network configuration name. + */ name: string; - @doc("Describes a virtual machine scale set network profile's IP configuration.") + /** + * Describes a virtual machine scale set network profile's IP configuration. + */ properties?: VirtualMachineScaleSetNetworkConfigurationProperties; } -@doc("Describes a virtual machine scale set network profile's IP configuration.") +/** + * Describes a virtual machine scale set network profile's IP configuration. + */ model VirtualMachineScaleSetNetworkConfigurationProperties { - @doc("Specifies the primary network interface in case the virtual machine has more than 1 network interface.") + /** + * Specifies the primary network interface in case the virtual machine has more than 1 network interface. + */ primary?: boolean; - @doc("Specifies whether the network interface is accelerated networking-enabled.") + /** + * Specifies whether the network interface is accelerated networking-enabled. + */ enableAcceleratedNetworking?: boolean; - @doc("Specifies whether the network interface is disabled for tcp state tracking.") + /** + * Specifies whether the network interface is disabled for tcp state tracking. + */ disableTcpStateTracking?: boolean; - @doc("Specifies whether the network interface is FPGA networking-enabled.") + /** + * Specifies whether the network interface is FPGA networking-enabled. + */ enableFpga?: boolean; - @doc("The network security group.") + /** + * The network security group. + */ networkSecurityGroup?: SubResource; - @doc("The dns settings to be applied on the network interfaces.") + /** + * The dns settings to be applied on the network interfaces. + */ dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; - @doc("Specifies the IP configurations of the network interface.") + /** + * Specifies the IP configurations of the network interface. + */ ipConfigurations: VirtualMachineScaleSetIPConfiguration[]; - @doc("Whether IP forwarding enabled on this NIC.") + /** + * Whether IP forwarding enabled on this NIC. + */ enableIPForwarding?: boolean; - @doc("Specify what happens to the network interface when the VM is deleted") + /** + * Specify what happens to the network interface when the VM is deleted + */ deleteOption?: DeleteOptions; - @doc("Specifies whether the Auxiliary mode is enabled for the Network Interface resource.") + /** + * Specifies whether the Auxiliary mode is enabled for the Network Interface resource. + */ auxiliaryMode?: NetworkInterfaceAuxiliaryMode; - @doc("Specifies whether the Auxiliary sku is enabled for the Network Interface resource.") + /** + * Specifies whether the Auxiliary sku is enabled for the Network Interface resource. + */ auxiliarySku?: NetworkInterfaceAuxiliarySku; } -@doc("Describes a virtual machines scale sets network configuration's DNS settings.") +/** + * Describes a virtual machines scale sets network configuration's DNS settings. + */ model VirtualMachineScaleSetNetworkConfigurationDnsSettings { - @doc("List of DNS servers IP addresses") + /** + * List of DNS servers IP addresses + */ dnsServers?: string[]; } -@doc("Describes a virtual machine scale set network profile's IP configuration.") +/** + * Describes a virtual machine scale set network profile's IP configuration. + */ model VirtualMachineScaleSetIPConfiguration { - @doc("The IP configuration name.") + /** + * The IP configuration name. + */ name: string; - @doc("Describes a virtual machine scale set network profile's IP configuration properties.") + /** + * Describes a virtual machine scale set network profile's IP configuration properties. + */ properties?: VirtualMachineScaleSetIPConfigurationProperties; } -@doc("Describes a virtual machine scale set network profile's IP configuration properties.") +/** + * Describes a virtual machine scale set network profile's IP configuration properties. + */ model VirtualMachineScaleSetIPConfigurationProperties { - @doc("Specifies the identifier of the subnet.") + /** + * Specifies the identifier of the subnet. + */ subnet?: ApiEntityReference; - @doc("Specifies the primary network interface in case the virtual machine has more than 1 network interface.") + /** + * Specifies the primary network interface in case the virtual machine has more than 1 network interface. + */ primary?: boolean; - @doc("The publicIPAddressConfiguration.") + /** + * The publicIPAddressConfiguration. + */ publicIPAddressConfiguration?: VirtualMachineScaleSetPublicIPAddressConfiguration; - @doc("Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") + /** + * Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + */ privateIPAddressVersion?: IPVersion; - @doc("Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway.") + /** + * Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway. + */ applicationGatewayBackendAddressPools?: SubResource[]; - @doc("Specifies an array of references to application security group.") + /** + * Specifies an array of references to application security group. + */ applicationSecurityGroups?: SubResource[]; - @doc("Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer.") + /** + * Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer. + */ loadBalancerBackendAddressPools?: SubResource[]; - @doc("Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer.") + /** + * Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer. + */ loadBalancerInboundNatPools?: SubResource[]; } -@doc("Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration") +/** + * Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration + */ model VirtualMachineScaleSetPublicIPAddressConfiguration { - @doc("The publicIP address configuration name.") + /** + * The publicIP address configuration name. + */ name: string; - @doc("Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration") + /** + * Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration + */ properties?: VirtualMachineScaleSetPublicIPAddressConfigurationProperties; - @doc("Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.") + /** + * Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. + */ sku?: PublicIPAddressSku; } -@doc("Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration") +/** + * Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration + */ model VirtualMachineScaleSetPublicIPAddressConfigurationProperties { - @doc("The idle timeout of the public IP address.") + /** + * The idle timeout of the public IP address. + */ idleTimeoutInMinutes?: int32; - @doc("The dns settings to be applied on the publicIP addresses .") + /** + * The dns settings to be applied on the publicIP addresses . + */ dnsSettings?: VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; - @doc("The list of IP tags associated with the public IP address.") + /** + * The list of IP tags associated with the public IP address. + */ ipTags?: VirtualMachineScaleSetIpTag[]; - @doc("The PublicIPPrefix from which to allocate publicIP addresses.") + /** + * The PublicIPPrefix from which to allocate publicIP addresses. + */ publicIPPrefix?: SubResource; - @doc("Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") + /** + * Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + */ publicIPAddressVersion?: IPVersion; - @doc("Specify what happens to the public IP when the VM is deleted") + /** + * Specify what happens to the public IP when the VM is deleted + */ deleteOption?: DeleteOptions; } -@doc("Describes a virtual machines scale sets network configuration's DNS settings.") +/** + * Describes a virtual machines scale sets network configuration's DNS settings. + */ model VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings { - @doc("The Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be created") + /** + * The Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be created + */ domainNameLabel: string; - @doc("The Domain name label scope.The concatenation of the hashed domain name label that generated according to the policy from domain name label scope and vm index will be the domain name labels of the PublicIPAddress resources that will be created") + /** + * The Domain name label scope.The concatenation of the hashed domain name label that generated according to the policy from domain name label scope and vm index will be the domain name labels of the PublicIPAddress resources that will be created + */ domainNameLabelScope?: DomainNameLabelScopeTypes; } -@doc("Contains the IP tag associated with the public IP address.") +/** + * Contains the IP tag associated with the public IP address. + */ model VirtualMachineScaleSetIpTag { - @doc("IP tag type. Example: FirstPartyUsage.") + /** + * IP tag type. Example: FirstPartyUsage. + */ ipTagType?: string; - @doc("IP tag associated with the public IP. Example: SQL, Storage etc.") + /** + * IP tag associated with the public IP. Example: SQL, Storage etc. + */ tag?: string; } -@doc("Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.") +/** + * Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. + */ model PublicIPAddressSku { - @doc("Specify public IP sku name") + /** + * Specify public IP sku name + */ name?: PublicIPAddressSkuName; - @doc("Specify public IP sku tier") + /** + * Specify public IP sku tier + */ tier?: PublicIPAddressSkuTier; } -@doc("Specifies the Security profile settings for the virtual machine or virtual machine scale set.") +/** + * Specifies the Security profile settings for the virtual machine or virtual machine scale set. + */ model SecurityProfile { - @doc("Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01.") + /** + * Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01. + */ uefiSettings?: UefiSettings; - @doc("This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at host will be disabled unless this property is set to true for the resource.") + /** + * This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself. The default behavior is: The Encryption at host will be disabled unless this property is set to true for the resource. + */ encryptionAtHost?: boolean; - @doc("Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set.") + /** + * Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set. + */ securityType?: SecurityTypes; } -@doc("Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01.") +/** + * Specifies the security settings like secure boot and vTPM used while creating the virtual machine. Minimum api-version: 2020-12-01. + */ model UefiSettings { - @doc("Specifies whether secure boot should be enabled on the virtual machine. Minimum api-version: 2020-12-01.") + /** + * Specifies whether secure boot should be enabled on the virtual machine. Minimum api-version: 2020-12-01. + */ secureBootEnabled?: boolean; - @doc("Specifies whether vTPM should be enabled on the virtual machine. Minimum api-version: 2020-12-01.") + /** + * Specifies whether vTPM should be enabled on the virtual machine. Minimum api-version: 2020-12-01. + */ vTpmEnabled?: boolean; } -@doc("Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.") +/** + * Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. + */ model DiagnosticsProfile { - @doc("Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.") + /** + * Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. + */ bootDiagnostics?: BootDiagnostics; } -@doc("Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.") +/** + * Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. + */ model BootDiagnostics { - @doc("Whether boot diagnostics should be enabled on the Virtual Machine.") + /** + * Whether boot diagnostics should be enabled on the Virtual Machine. + */ enabled?: boolean; - @doc("Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used.") + /** + * Uri of the storage account to use for placing the console output and screenshot. If storageUri is not specified while enabling boot diagnostics, managed storage will be used. + */ storageUri?: string; } -@doc("Describes a virtual machine scale set extension profile.") +/** + * Describes a virtual machine scale set extension profile. + */ model VirtualMachineScaleSetExtensionProfile { - @doc("The virtual machine scale set child extension resources.") + /** + * The virtual machine scale set child extension resources. + */ extensions?: VirtualMachineScaleSetExtension[]; - @doc("Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01.") + /** + * Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01. + */ extensionsTimeBudget?: string; } -@doc("Describes the properties of a Virtual Machine Scale Set Extension.") +/** + * Describes the properties of a Virtual Machine Scale Set Extension. + */ model VirtualMachineScaleSetExtensionProperties { - @doc("If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed.") + /** + * If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed. + */ forceUpdateTag?: string; - @doc("The name of the extension handler publisher.") + /** + * The name of the extension handler publisher. + */ publisher?: string; - @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") + /** + * Specifies the type of the extension; an example is "CustomScriptExtension". + */ type?: string; - @doc("Specifies the version of the script handler.") + /** + * Specifies the version of the script handler. + */ typeHandlerVersion?: string; - @doc("Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.") + /** + * Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + */ autoUpgradeMinorVersion?: boolean; - @doc("Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.") + /** + * Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. + */ enableAutomaticUpgrade?: boolean; - @doc("Json formatted public settings for the extension.") + /** + * Json formatted public settings for the extension. + */ settings?: Record; - @doc("The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.") + /** + * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + */ protectedSettings?: Record; - @doc("The provisioning state, which only appears in the response.") + /** + * The provisioning state, which only appears in the response. + */ @visibility("read") provisioningState?: string; - @doc("Collection of extension names after which this extension needs to be provisioned.") + /** + * Collection of extension names after which this extension needs to be provisioned. + */ provisionAfterExtensions?: string[]; - @doc("Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.") + /** + * Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. + */ suppressFailures?: boolean; - @doc("The extensions protected settings that are passed by reference, and consumed from key vault") + /** + * The extensions protected settings that are passed by reference, and consumed from key vault + */ protectedSettingsFromKeyVault?: KeyVaultSecretReference; } -@doc("Describes a reference to Key Vault Secret") +/** + * Describes a reference to Key Vault Secret + */ model KeyVaultSecretReference { - @doc("The URL referencing a secret in a Key Vault.") + /** + * The URL referencing a secret in a Key Vault. + */ secretUrl: string; - @doc("The relative URL of the Key Vault containing the secret.") + /** + * The relative URL of the Key Vault containing the secret. + */ sourceVault: SubResource; } model SubResourceReadOnly { - @doc("Resource Id") + /** + * Resource Id + */ @visibility("read") id?: string; } -@doc("Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01.") +/** + * Specifies the billing related details of a Azure Spot VM or VMSS. Minimum api-version: 2019-03-01. + */ model BillingProfile { - @doc("Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.

    This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price.

    The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS.

    Possible values are:

    - Any decimal value greater than zero. Example: 0.01538

    -1 – indicates default price to be up-to on-demand.

    You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.

    Minimum api-version: 2019-03-01.") - maxPrice?: float32; + /** + * Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.

    This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price.

    The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS.

    Possible values are:

    - Any decimal value greater than zero. Example: 0.01538

    -1 – indicates default price to be up-to on-demand.

    You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.

    Minimum api-version: 2019-03-01. + */ + maxPrice?: float64; } model ScheduledEventsProfile { - @doc("Specifies Terminate Scheduled Event related configurations.") + /** + * Specifies Terminate Scheduled Event related configurations. + */ terminateNotificationProfile?: TerminateNotificationProfile; - @doc("Specifies OS Image Scheduled Event related configurations.") + /** + * Specifies OS Image Scheduled Event related configurations. + */ osImageNotificationProfile?: OSImageNotificationProfile; } model TerminateNotificationProfile { - @doc("Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M)") + /** + * Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M) + */ notBeforeTimeout?: string; - @doc("Specifies whether the Terminate Scheduled event is enabled or disabled.") + /** + * Specifies whether the Terminate Scheduled event is enabled or disabled. + */ enable?: boolean; } model OSImageNotificationProfile { - @doc("Length of time a Virtual Machine being reimaged or having its OS upgraded will have to potentially approve the OS Image Scheduled Event before the event is auto approved (timed out). The configuration is specified in ISO 8601 format, and the value must be 15 minutes (PT15M)") + /** + * Length of time a Virtual Machine being reimaged or having its OS upgraded will have to potentially approve the OS Image Scheduled Event before the event is auto approved (timed out). The configuration is specified in ISO 8601 format, and the value must be 15 minutes (PT15M) + */ notBeforeTimeout?: string; - @doc("Specifies whether the OS Image Scheduled event is enabled or disabled.") + /** + * Specifies whether the OS Image Scheduled event is enabled or disabled. + */ enable?: boolean; } -@doc("The parameters of a capacity reservation Profile.") +/** + * The parameters of a capacity reservation Profile. + */ model CapacityReservationProfile { - @doc("Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.") + /** + * Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details. + */ capacityReservationGroup?: SubResource; } -@doc("Contains the list of gallery applications that should be made available to the VM/VMSS") +/** + * Contains the list of gallery applications that should be made available to the VM/VMSS + */ model ApplicationProfile { - @doc("Specifies the gallery applications that should be made available to the VM/VMSS") + /** + * Specifies the gallery applications that should be made available to the VM/VMSS + */ galleryApplications?: VMGalleryApplication[]; } -@doc("Specifies the required information to reference a compute gallery application version") +/** + * Specifies the required information to reference a compute gallery application version + */ model VMGalleryApplication { - @doc("Optional, Specifies a passthrough value for more generic context.") + /** + * Optional, Specifies a passthrough value for more generic context. + */ tags?: string; - @doc("Optional, Specifies the order in which the packages have to be installed") + /** + * Optional, Specifies the order in which the packages have to be installed + */ order?: int32; - @doc("Specifies the GalleryApplicationVersion resource id on the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}") + /** + * Specifies the GalleryApplicationVersion resource id on the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version} + */ packageReferenceId: string; - @doc("Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided") + /** + * Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided + */ configurationReference?: string; - @doc("Optional, If true, any failure for any operation in the VmApplication will fail the deployment") + /** + * Optional, If true, any failure for any operation in the VmApplication will fail the deployment + */ treatFailureAsDeploymentFailure?: boolean; - @doc("If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated for the VM/VMSS") + /** + * If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated for the VM/VMSS + */ enableAutomaticUpgrade?: boolean; } -@doc("Specifies the hardware settings for the virtual machine scale set.") +/** + * Specifies the hardware settings for the virtual machine scale set. + */ model VirtualMachineScaleSetHardwareProfile { - @doc("Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details.") + /** + * Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-11-01. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. + */ vmSizeProperties?: VMSizeProperties; } -@doc("Specifies VM Size Property settings on the virtual machine.") +/** + * Specifies VM Size Property settings on the virtual machine. + */ model VMSizeProperties { - @doc("Specifies the number of vCPUs available for the VM. When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list).") + /** + * Specifies the number of vCPUs available for the VM. When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). + */ vCPUsAvailable?: int32; - @doc("Specifies the vCPU to physical core ratio. When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). **Setting this property to 1 also means that hyper-threading is disabled.**") + /** + * Specifies the vCPU to physical core ratio. When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list). **Setting this property to 1 also means that hyper-threading is disabled.** + */ vCPUsPerCore?: int32; } -@doc("Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. Minimum api-version: 2022-11-01") +/** + * Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. Minimum api-version: 2022-11-01 + */ model ServiceArtifactReference { - @doc("The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}") + /** + * The service artifact reference id in the form of /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName} + */ id?: string; } -@doc("Specifies the security posture to be used for all virtual machines in the scale set. Minimum api-version: 2023-03-01") +/** + * Specifies the security posture to be used for all virtual machines in the scale set. Minimum api-version: 2023-03-01 + */ model SecurityPostureReference { - @doc("The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest") + /** + * The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest + */ id?: string; - @doc("List of virtual machine extensions to exclude when applying the Security Posture.") + /** + * List of virtual machine extensions to exclude when applying the Security Posture. + */ excludeExtensions?: VirtualMachineExtension[]; } -@doc("Describes the properties of a Virtual Machine Extension.") +/** + * Describes the properties of a Virtual Machine Extension. + */ model VirtualMachineExtensionProperties { - @doc("How the extension handler should be forced to update even if the extension configuration has not changed.") + /** + * How the extension handler should be forced to update even if the extension configuration has not changed. + */ forceUpdateTag?: string; - @doc("The name of the extension handler publisher.") + /** + * The name of the extension handler publisher. + */ publisher?: string; - @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") + /** + * Specifies the type of the extension; an example is "CustomScriptExtension". + */ type?: string; - @doc("Specifies the version of the script handler.") + /** + * Specifies the version of the script handler. + */ typeHandlerVersion?: string; - @doc("Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.") + /** + * Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + */ autoUpgradeMinorVersion?: boolean; - @doc("Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.") + /** + * Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. + */ enableAutomaticUpgrade?: boolean; - @doc("Json formatted public settings for the extension.") + /** + * Json formatted public settings for the extension. + */ settings?: Record; - @doc("The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.") + /** + * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + */ protectedSettings?: Record; - @doc("The provisioning state, which only appears in the response.") + /** + * The provisioning state, which only appears in the response. + */ @visibility("read") provisioningState?: string; - @doc("The virtual machine extension instance view.") + /** + * The virtual machine extension instance view. + */ instanceView?: VirtualMachineExtensionInstanceView; - @doc("Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.") + /** + * Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. + */ suppressFailures?: boolean; - @doc("The extensions protected settings that are passed by reference, and consumed from key vault") + /** + * The extensions protected settings that are passed by reference, and consumed from key vault + */ protectedSettingsFromKeyVault?: KeyVaultSecretReference; - @doc("Collection of extension names after which this extension needs to be provisioned.") + /** + * Collection of extension names after which this extension needs to be provisioned. + */ provisionAfterExtensions?: string[]; } -@doc("The instance view of a virtual machine extension.") +/** + * The instance view of a virtual machine extension. + */ model VirtualMachineExtensionInstanceView { - @doc("The virtual machine extension name.") + /** + * The virtual machine extension name. + */ name?: string; - @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") + /** + * Specifies the type of the extension; an example is "CustomScriptExtension". + */ type?: string; - @doc("Specifies the version of the script handler.") + /** + * Specifies the version of the script handler. + */ typeHandlerVersion?: string; - @doc("The resource status information.") + /** + * The resource status information. + */ substatuses?: InstanceViewStatus[]; - @doc("The resource status information.") + /** + * The resource status information. + */ statuses?: InstanceViewStatus[]; } -@doc("Instance view status.") +/** + * Instance view status. + */ model InstanceViewStatus { - @doc("The status code.") + /** + * The status code. + */ code?: string; - @doc("The level code.") + /** + * The level code. + */ level?: StatusLevelTypes; - @doc("The short localizable label for the status.") + /** + * The short localizable label for the status. + */ displayStatus?: string; - @doc("The detailed status message, including for alerts and error messages.") + /** + * The detailed status message, including for alerts and error messages. + */ message?: string; - @doc("The time of the status.") + /** + * The time of the status. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. time?: utcDateTime; } -@doc("The Resource model definition with location property as optional.") +/** + * The Resource model definition with location property as optional. + */ model ResourceWithOptionalLocation { - @doc("Resource location") + /** + * Resource location + */ location?: string; - @doc("Resource Id") + /** + * Resource Id + */ @visibility("read") id?: string; - @doc("Resource name") + /** + * Resource name + */ @visibility("read") name?: string; - @doc("Resource type") + /** + * Resource type + */ @visibility("read") type?: string; - @doc("Resource tags") + /** + * Resource tags + */ tags?: Record; } -@doc("Enables or disables a capability on the virtual machine or virtual machine scale set.") +/** + * Enables or disables a capability on the virtual machine or virtual machine scale set. + */ model AdditionalCapabilities { - @doc("The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.") + /** + * The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled. + */ ultraSSDEnabled?: boolean; - @doc("The flag that enables or disables hibernation capability on the VM.") + /** + * The flag that enables or disables hibernation capability on the VM. + */ hibernationEnabled?: boolean; } -@doc("Describes a scale-in policy for a virtual machine scale set.") +/** + * Describes a scale-in policy for a virtual machine scale set. + */ model ScaleInPolicy { - @doc("The rules to be followed when scaling-in a virtual machine scale set.

    Possible values are:

    **Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.

    **OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.

    **NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.

    ") + /** + * The rules to be followed when scaling-in a virtual machine scale set.

    Possible values are:

    **Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.

    **OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.

    **NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.

    + */ rules?: VirtualMachineScaleSetScaleInRules[]; - @doc("This property allows you to specify if virtual machines chosen for removal have to be force deleted when a virtual machine scale set is being scaled-in.(Feature in Preview)") + /** + * This property allows you to specify if virtual machines chosen for removal have to be force deleted when a virtual machine scale set is being scaled-in.(Feature in Preview) + */ forceDeletion?: boolean; } -@doc("Specifies the Spot-Try-Restore properties for the virtual machine scale set. With this property customer can enable or disable automatic restore of the evicted Spot VMSS VM instances opportunistically based on capacity availability and pricing constraint.") +/** + * Specifies the Spot-Try-Restore properties for the virtual machine scale set. With this property customer can enable or disable automatic restore of the evicted Spot VMSS VM instances opportunistically based on capacity availability and pricing constraint. + */ model SpotRestorePolicy { - @doc("Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based on capacity availability and pricing constraints") + /** + * Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based on capacity availability and pricing constraints + */ enabled?: boolean; - @doc("Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances") + /** + * Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances + */ restoreTimeout?: string; } -@doc("Specifies the target splits for Spot and Regular priority VMs within a scale set with flexible orchestration mode. With this property the customer is able to specify the base number of regular priority VMs created as the VMSS flex instance scales out and the split between Spot and Regular priority VMs after this base target has been reached.") +/** + * Specifies the target splits for Spot and Regular priority VMs within a scale set with flexible orchestration mode. With this property the customer is able to specify the base number of regular priority VMs created as the VMSS flex instance scales out and the split between Spot and Regular priority VMs after this base target has been reached. + */ model PriorityMixPolicy { - @doc("The base number of regular priority VMs that will be created in this scale set as it scales out.") + /** + * The base number of regular priority VMs that will be created in this scale set as it scales out. + */ baseRegularPriorityCount?: int32; - @doc("The percentage of VM instances, after the base regular priority count has been reached, that are expected to use regular priority.") + /** + * The percentage of VM instances, after the base regular priority count has been reached, that are expected to use regular priority. + */ @maxValue(100) regularPriorityPercentageAboveBase?: int32; } -@doc("Identity for the virtual machine scale set.") +/** + * Identity for the virtual machine scale set. + */ model VirtualMachineScaleSetIdentity { - @doc("The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity.") + /** + * The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity. + */ @visibility("read") principalId?: string; - @doc("The tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity.") + /** + * The tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity. + */ @visibility("read") tenantId?: string; - @doc("The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set.") + /** + * The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set. + */ type?: ResourceIdentityType; - @doc("The list of user identities associated with the virtual machine scale set. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.") + /** + * The list of user identities associated with the virtual machine scale set. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ userAssignedIdentities?: Record; } model UserAssignedIdentitiesValue { - @doc("The principal id of user assigned identity.") + /** + * The principal id of user assigned identity. + */ @visibility("read") principalId?: string; - @doc("The client id of user assigned identity.") + /** + * The client id of user assigned identity. + */ @visibility("read") clientId?: string; } -@doc("The complex type of the extended location.") +/** + * The complex type of the extended location. + */ model ExtendedLocation { - @doc("The name of the extended location.") + /** + * The name of the extended location. + */ name?: string; - @doc("The type of the extended location.") + /** + * The type of the extended location. + */ type?: ExtendedLocationTypes; } -@doc("The Resource model definition.") +/** + * The Resource model definition. + */ model Resource { - @doc("Resource Id") + /** + * Resource Id + */ @visibility("read") id?: string; - @doc("Resource name") + /** + * Resource name + */ @visibility("read") name?: string; - @doc("Resource type") + /** + * Resource type + */ @visibility("read") type?: string; - @doc("Resource location") + /** + * Resource location + */ location: string; - @doc("Resource tags") + /** + * Resource tags + */ tags?: Record; } -@doc("Describes a Virtual Machine Scale Set.") +/** + * Describes a Virtual Machine Scale Set. + */ model VirtualMachineScaleSetUpdate extends UpdateResource { - @doc("The virtual machine scale set sku.") + /** + * The virtual machine scale set sku. + */ sku?: Sku; - @doc("The purchase plan when deploying a virtual machine scale set from VM Marketplace images.") + /** + * The purchase plan when deploying a virtual machine scale set from VM Marketplace images. + */ plan?: Plan; - @doc("Describes the properties of a Virtual Machine Scale Set.") + /** + * Describes the properties of a Virtual Machine Scale Set. + */ properties?: VirtualMachineScaleSetUpdateProperties; - @doc("The identity of the virtual machine scale set, if configured.") + /** + * The identity of the virtual machine scale set, if configured. + */ identity?: VirtualMachineScaleSetIdentity; } -@doc("Describes the properties of a Virtual Machine Scale Set.") +/** + * Describes the properties of a Virtual Machine Scale Set. + */ model VirtualMachineScaleSetUpdateProperties { - @doc("The upgrade policy.") + /** + * The upgrade policy. + */ upgradePolicy?: UpgradePolicy; - @doc("Policy for automatic repairs.") + /** + * Policy for automatic repairs. + */ automaticRepairsPolicy?: AutomaticRepairsPolicy; - @doc("The virtual machine profile.") + /** + * The virtual machine profile. + */ virtualMachineProfile?: VirtualMachineScaleSetUpdateVMProfile; - @doc("Specifies whether the Virtual Machine Scale Set should be overprovisioned.") + /** + * Specifies whether the Virtual Machine Scale Set should be overprovisioned. + */ overprovision?: boolean; - @doc("When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.") + /** + * When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs. + */ doNotRunExtensionsOnOverprovisionedVMs?: boolean; - @doc("When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.") + /** + * When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true. + */ singlePlacementGroup?: boolean; - @doc("Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.") + /** + * Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type. + */ additionalCapabilities?: AdditionalCapabilities; - @doc("Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.") + /** + * Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set. + */ scaleInPolicy?: ScaleInPolicy; - @doc("Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

    Minimum api-version: 2018-04-01.") + /** + * Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

    Minimum api-version: 2018-04-01. + */ proximityPlacementGroup?: SubResource; - @doc("Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.") + /** + * Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance. + */ priorityMixPolicy?: PriorityMixPolicy; - @doc("Specifies the Spot Restore properties for the virtual machine scale set.") + /** + * Specifies the Spot Restore properties for the virtual machine scale set. + */ spotRestorePolicy?: SpotRestorePolicy; } -@doc("Describes a virtual machine scale set virtual machine profile.") +/** + * Describes a virtual machine scale set virtual machine profile. + */ model VirtualMachineScaleSetUpdateVMProfile { - @doc("The virtual machine scale set OS profile.") + /** + * The virtual machine scale set OS profile. + */ osProfile?: VirtualMachineScaleSetUpdateOSProfile; - @doc("The virtual machine scale set storage profile.") + /** + * The virtual machine scale set storage profile. + */ storageProfile?: VirtualMachineScaleSetUpdateStorageProfile; - @doc("The virtual machine scale set network profile.") + /** + * The virtual machine scale set network profile. + */ networkProfile?: VirtualMachineScaleSetUpdateNetworkProfile; - @doc("The virtual machine scale set Security profile") + /** + * The virtual machine scale set Security profile + */ securityProfile?: SecurityProfile; - @doc("The virtual machine scale set diagnostics profile.") + /** + * The virtual machine scale set diagnostics profile. + */ diagnosticsProfile?: DiagnosticsProfile; - @doc("The virtual machine scale set extension profile.") + /** + * The virtual machine scale set extension profile. + */ extensionProfile?: VirtualMachineScaleSetExtensionProfile; - @doc("The license type, which is for bring your own license scenario.") + /** + * The license type, which is for bring your own license scenario. + */ licenseType?: string; - @doc("Specifies the billing related details of a Azure Spot VMSS. Minimum api-version: 2019-03-01.") + /** + * Specifies the billing related details of a Azure Spot VMSS. Minimum api-version: 2019-03-01. + */ billingProfile?: BillingProfile; - @doc("Specifies Scheduled Event related configurations.") + /** + * Specifies Scheduled Event related configurations. + */ scheduledEventsProfile?: ScheduledEventsProfile; - @doc("UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

    Minimum api-version: 2021-03-01") + /** + * UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

    Minimum api-version: 2021-03-01 + */ userData?: string; - @doc("Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01.") + /** + * Specifies the hardware profile related details of a scale set. Minimum api-version: 2021-11-01. + */ hardwareProfile?: VirtualMachineScaleSetHardwareProfile; } -@doc("Describes a virtual machine scale set OS profile.") +/** + * Describes a virtual machine scale set OS profile. + */ model VirtualMachineScaleSetUpdateOSProfile { - @doc("A base-64 encoded string of custom data.") + /** + * A base-64 encoded string of custom data. + */ customData?: string; - @doc("The Windows Configuration of the OS profile.") + /** + * The Windows Configuration of the OS profile. + */ windowsConfiguration?: WindowsConfiguration; - @doc("The Linux Configuration of the OS profile.") + /** + * The Linux Configuration of the OS profile. + */ linuxConfiguration?: LinuxConfiguration; - @doc("The List of certificates for addition to the VM.") + /** + * The List of certificates for addition to the VM. + */ secrets?: VaultSecretGroup[]; } -@doc("Describes a virtual machine scale set storage profile.") +/** + * Describes a virtual machine scale set storage profile. + */ model VirtualMachineScaleSetUpdateStorageProfile { - @doc("The image reference.") + /** + * The image reference. + */ imageReference?: ImageReference; - @doc("The OS disk.") + /** + * The OS disk. + */ osDisk?: VirtualMachineScaleSetUpdateOSDisk; - @doc("The data disks.") + /** + * The data disks. + */ dataDisks?: VirtualMachineScaleSetDataDisk[]; diskControllerType?: string; } -@doc("Describes virtual machine scale set operating system disk Update Object. This should be used for Updating VMSS OS Disk.") +/** + * Describes virtual machine scale set operating system disk Update Object. This should be used for Updating VMSS OS Disk. + */ model VirtualMachineScaleSetUpdateOSDisk { - @doc("The caching type.") + /** + * The caching type. + */ caching?: CachingTypes; - @doc("Specifies whether writeAccelerator should be enabled or disabled on the disk.") + /** + * Specifies whether writeAccelerator should be enabled or disabled on the disk. + */ writeAcceleratorEnabled?: boolean; - @doc("Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

    diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023") + /** + * Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.

    diskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023 + */ diskSizeGB?: int32; - @doc("The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk should not exist.") + /** + * The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk should not exist. + */ image?: VirtualHardDisk; - @doc("The list of virtual hard disk container uris.") + /** + * The list of virtual hard disk container uris. + */ vhdContainers?: string[]; - @doc("The managed disk parameters.") + /** + * The managed disk parameters. + */ managedDisk?: VirtualMachineScaleSetManagedDiskParameters; - @doc("Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

    Possible values:

    **Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.

    **Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted.

    The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for Ephemeral OS Disk.") + /** + * Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

    Possible values:

    **Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.

    **Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted.

    The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for Ephemeral OS Disk. + */ deleteOption?: DiskDeleteOptionTypes; } -@doc("Describes a virtual machine scale set network profile.") +/** + * Describes a virtual machine scale set network profile. + */ model VirtualMachineScaleSetUpdateNetworkProfile { - @doc("A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.") + /** + * A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'. + */ healthProbe?: ApiEntityReference; - @doc("The list of network configurations.") + /** + * The list of network configurations. + */ networkInterfaceConfigurations?: VirtualMachineScaleSetUpdateNetworkConfiguration[]; - @doc("specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible'") + /** + * specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible' + */ networkApiVersion?: NetworkApiVersion; } -@doc("Describes a virtual machine scale set network profile's network configurations.") +/** + * Describes a virtual machine scale set network profile's network configurations. + */ model VirtualMachineScaleSetUpdateNetworkConfiguration { - @doc("The network configuration name.") + /** + * The network configuration name. + */ name?: string; - @doc("Describes a virtual machine scale set updatable network profile's IP configuration.Use this object for updating network profile's IP Configuration.") + /** + * Describes a virtual machine scale set updatable network profile's IP configuration.Use this object for updating network profile's IP Configuration. + */ properties?: VirtualMachineScaleSetUpdateNetworkConfigurationProperties; } -@doc("Describes a virtual machine scale set updatable network profile's IP configuration.Use this object for updating network profile's IP Configuration.") +/** + * Describes a virtual machine scale set updatable network profile's IP configuration.Use this object for updating network profile's IP Configuration. + */ model VirtualMachineScaleSetUpdateNetworkConfigurationProperties { - @doc("Whether this is a primary NIC on a virtual machine.") + /** + * Whether this is a primary NIC on a virtual machine. + */ primary?: boolean; - @doc("Specifies whether the network interface is accelerated networking-enabled.") + /** + * Specifies whether the network interface is accelerated networking-enabled. + */ enableAcceleratedNetworking?: boolean; - @doc("Specifies whether the network interface is disabled for tcp state tracking.") + /** + * Specifies whether the network interface is disabled for tcp state tracking. + */ disableTcpStateTracking?: boolean; - @doc("Specifies whether the network interface is FPGA networking-enabled.") + /** + * Specifies whether the network interface is FPGA networking-enabled. + */ enableFpga?: boolean; - @doc("The network security group.") + /** + * The network security group. + */ networkSecurityGroup?: SubResource; - @doc("The dns settings to be applied on the network interfaces.") + /** + * The dns settings to be applied on the network interfaces. + */ dnsSettings?: VirtualMachineScaleSetNetworkConfigurationDnsSettings; - @doc("The virtual machine scale set IP Configuration.") + /** + * The virtual machine scale set IP Configuration. + */ ipConfigurations?: VirtualMachineScaleSetUpdateIPConfiguration[]; - @doc("Whether IP forwarding enabled on this NIC.") + /** + * Whether IP forwarding enabled on this NIC. + */ enableIPForwarding?: boolean; - @doc("Specify what happens to the network interface when the VM is deleted") + /** + * Specify what happens to the network interface when the VM is deleted + */ deleteOption?: DeleteOptions; - @doc("Specifies whether the Auxiliary mode is enabled for the Network Interface resource.") + /** + * Specifies whether the Auxiliary mode is enabled for the Network Interface resource. + */ auxiliaryMode?: NetworkInterfaceAuxiliaryMode; - @doc("Specifies whether the Auxiliary sku is enabled for the Network Interface resource.") + /** + * Specifies whether the Auxiliary sku is enabled for the Network Interface resource. + */ auxiliarySku?: NetworkInterfaceAuxiliarySku; } -@doc("Describes a virtual machine scale set network profile's IP configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the new subnet are in the same virtual network") +/** + * Describes a virtual machine scale set network profile's IP configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the new subnet are in the same virtual network + */ model VirtualMachineScaleSetUpdateIPConfiguration { - @doc("The IP configuration name.") + /** + * The IP configuration name. + */ name?: string; - @doc("Describes a virtual machine scale set network profile's IP configuration properties.") + /** + * Describes a virtual machine scale set network profile's IP configuration properties. + */ properties?: VirtualMachineScaleSetUpdateIPConfigurationProperties; } -@doc("Describes a virtual machine scale set network profile's IP configuration properties.") +/** + * Describes a virtual machine scale set network profile's IP configuration properties. + */ model VirtualMachineScaleSetUpdateIPConfigurationProperties { - @doc("The subnet.") + /** + * The subnet. + */ subnet?: ApiEntityReference; - @doc("Specifies the primary IP Configuration in case the network interface has more than one IP Configuration.") + /** + * Specifies the primary IP Configuration in case the network interface has more than one IP Configuration. + */ primary?: boolean; - @doc("The publicIPAddressConfiguration.") + /** + * The publicIPAddressConfiguration. + */ publicIPAddressConfiguration?: VirtualMachineScaleSetUpdatePublicIPAddressConfiguration; - @doc("Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") + /** + * Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + */ privateIPAddressVersion?: IPVersion; - @doc("The application gateway backend address pools.") + /** + * The application gateway backend address pools. + */ applicationGatewayBackendAddressPools?: SubResource[]; - @doc("Specifies an array of references to application security group.") + /** + * Specifies an array of references to application security group. + */ applicationSecurityGroups?: SubResource[]; - @doc("The load balancer backend address pools.") + /** + * The load balancer backend address pools. + */ loadBalancerBackendAddressPools?: SubResource[]; - @doc("The load balancer inbound nat pools.") + /** + * The load balancer inbound nat pools. + */ loadBalancerInboundNatPools?: SubResource[]; } -@doc("Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration") +/** + * Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration + */ model VirtualMachineScaleSetUpdatePublicIPAddressConfiguration { - @doc("The publicIP address configuration name.") + /** + * The publicIP address configuration name. + */ name?: string; - @doc("Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration") + /** + * Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration + */ properties?: VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties; } -@doc("Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration") +/** + * Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration + */ model VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties { - @doc("The idle timeout of the public IP address.") + /** + * The idle timeout of the public IP address. + */ idleTimeoutInMinutes?: int32; - @doc("The dns settings to be applied on the publicIP addresses .") + /** + * The dns settings to be applied on the publicIP addresses . + */ dnsSettings?: VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; - @doc("The PublicIPPrefix from which to allocate publicIP addresses.") + /** + * The PublicIPPrefix from which to allocate publicIP addresses. + */ publicIPPrefix?: SubResource; - @doc("Specify what happens to the public IP when the VM is deleted") + /** + * Specify what happens to the public IP when the VM is deleted + */ deleteOption?: DeleteOptions; } -@doc("The Update Resource model definition.") +/** + * The Update Resource model definition. + */ model UpdateResource { - @doc("Resource tags") + /** + * Resource tags + */ tags?: Record; } -@doc("Specifies a list of virtual machine instance IDs from the VM scale set.") +/** + * Specifies a list of virtual machine instance IDs from the VM scale set. + */ model VirtualMachineScaleSetVMInstanceIDs { - @doc("The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.") + /** + * The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + */ instanceIds?: string[]; } -@doc("Specifies a list of virtual machine instance IDs from the VM scale set.") +/** + * Specifies a list of virtual machine instance IDs from the VM scale set. + */ model VirtualMachineScaleSetVMInstanceRequiredIDs { - @doc("The virtual machine scale set instance ids.") + /** + * The virtual machine scale set instance ids. + */ instanceIds: string[]; } -@doc("The instance view of a virtual machine scale set.") +/** + * The instance view of a virtual machine scale set. + */ model VirtualMachineScaleSetInstanceView { - @doc("The instance view status summary for the virtual machine scale set.") + /** + * The instance view status summary for the virtual machine scale set. + */ @visibility("read") virtualMachine?: VirtualMachineScaleSetInstanceViewStatusesSummary; - @doc("The extensions information.") + /** + * The extensions information. + */ @visibility("read") extensions?: VirtualMachineScaleSetVMExtensionsSummary[]; - @doc("The resource status information.") + /** + * The resource status information. + */ statuses?: InstanceViewStatus[]; - @doc("The orchestration services information.") + /** + * The orchestration services information. + */ @visibility("read") orchestrationServices?: OrchestrationServiceSummary[]; } -@doc("Instance view statuses summary for virtual machines of a virtual machine scale set.") +/** + * Instance view statuses summary for virtual machines of a virtual machine scale set. + */ model VirtualMachineScaleSetInstanceViewStatusesSummary { - @doc("The extensions information.") + /** + * The extensions information. + */ @visibility("read") statusesSummary?: VirtualMachineStatusCodeCount[]; } -@doc("The status code and count of the virtual machine scale set instance view status summary.") +/** + * The status code and count of the virtual machine scale set instance view status summary. + */ model VirtualMachineStatusCodeCount { - @doc("The instance view status code.") + /** + * The instance view status code. + */ @visibility("read") code?: string; - @doc("The number of instances having a particular status code.") + /** + * The number of instances having a particular status code. + */ @visibility("read") count?: int32; } -@doc("Extensions summary for virtual machines of a virtual machine scale set.") +/** + * Extensions summary for virtual machines of a virtual machine scale set. + */ model VirtualMachineScaleSetVMExtensionsSummary { - @doc("The extension name.") + /** + * The extension name. + */ @visibility("read") name?: string; - @doc("The extensions information.") + /** + * The extensions information. + */ @visibility("read") statusesSummary?: VirtualMachineStatusCodeCount[]; } -@doc("Summary for an orchestration service of a virtual machine scale set.") +/** + * Summary for an orchestration service of a virtual machine scale set. + */ model OrchestrationServiceSummary { - @doc("The name of the service.") + /** + * The name of the service. + */ @visibility("read") serviceName?: OrchestrationServiceNames; - @doc("The current state of the service.") + /** + * The current state of the service. + */ @visibility("read") serviceState?: OrchestrationServiceState; } -@doc("Describes a Virtual Machine Scale Set Extension.") +/** + * Describes a Virtual Machine Scale Set Extension. + */ model VirtualMachineScaleSetExtensionUpdate extends SubResourceReadOnly { - @doc("The name of the extension.") + /** + * The name of the extension. + */ @visibility("read") name?: string; - @doc("Resource type") + /** + * Resource type + */ @visibility("read") type?: string; - @doc("Describes the properties of a Virtual Machine Scale Set Extension.") + /** + * Describes the properties of a Virtual Machine Scale Set Extension. + */ properties?: VirtualMachineScaleSetExtensionProperties; } -@doc("The Virtual Machine Scale Set List Skus operation response.") +/** + * The Virtual Machine Scale Set List Skus operation response. + */ model VirtualMachineScaleSetListSkusResult is Azure.Core.Page; -@doc("Describes an available virtual machine scale set sku.") +/** + * Describes an available virtual machine scale set sku. + */ model VirtualMachineScaleSetSku { - @doc("The type of resource the sku applies to.") + /** + * The type of resource the sku applies to. + */ @visibility("read") resourceType?: string; - @doc("The Sku.") + /** + * The Sku. + */ @visibility("read") sku?: Sku; - @doc("Specifies the number of virtual machines in the scale set.") + /** + * Specifies the number of virtual machines in the scale set. + */ @visibility("read") capacity?: VirtualMachineScaleSetSkuCapacity; } -@doc("Describes scaling information of a sku.") +/** + * Describes scaling information of a sku. + */ model VirtualMachineScaleSetSkuCapacity { - @doc("The minimum capacity.") + /** + * The minimum capacity. + */ @visibility("read") - minimum?: int32; + minimum?: int64; - @doc("The maximum capacity that can be set.") + /** + * The maximum capacity that can be set. + */ @visibility("read") - maximum?: int32; + maximum?: int64; - @doc("The default capacity.") + /** + * The default capacity. + */ @visibility("read") - defaultCapacity?: int32; + defaultCapacity?: int64; - @doc("The scale type applicable to the sku.") + /** + * The scale type applicable to the sku. + */ @visibility("read") scaleType?: VirtualMachineScaleSetSkuScaleType; } -@doc("List of Virtual Machine Scale Set OS Upgrade History operation response.") +/** + * List of Virtual Machine Scale Set OS Upgrade History operation response. + */ model VirtualMachineScaleSetListOSUpgradeHistory is Azure.Core.Page; -@doc("Virtual Machine Scale Set OS Upgrade History operation response.") +/** + * Virtual Machine Scale Set OS Upgrade History operation response. + */ model UpgradeOperationHistoricalStatusInfo { - @doc("Information about the properties of the upgrade operation.") + /** + * Information about the properties of the upgrade operation. + */ @visibility("read") properties?: UpgradeOperationHistoricalStatusInfoProperties; - @doc("Resource type") + /** + * Resource type + */ @visibility("read") type?: string; - @doc("Resource location") + /** + * Resource location + */ @visibility("read") location?: string; } -@doc("Describes each OS upgrade on the Virtual Machine Scale Set.") +/** + * Describes each OS upgrade on the Virtual Machine Scale Set. + */ model UpgradeOperationHistoricalStatusInfoProperties { - @doc("Information about the overall status of the upgrade operation.") + /** + * Information about the overall status of the upgrade operation. + */ @visibility("read") runningStatus?: UpgradeOperationHistoryStatus; - @doc("Counts of the VMs in each state.") + /** + * Counts of the VMs in each state. + */ @visibility("read") progress?: RollingUpgradeProgressInfo; - @doc("Error Details for this upgrade if there are any.") + /** + * Error Details for this upgrade if there are any. + */ @visibility("read") error?: ApiError; - @doc("Invoker of the Upgrade Operation") + /** + * Invoker of the Upgrade Operation + */ @visibility("read") startedBy?: UpgradeOperationInvoker; - @doc("Image Reference details") + /** + * Image Reference details + */ @visibility("read") targetImageReference?: ImageReference; - @doc("Information about OS rollback if performed") + /** + * Information about OS rollback if performed + */ @visibility("read") rollbackInfo?: RollbackStatusInfo; } -@doc("Information about the current running state of the overall upgrade.") +/** + * Information about the current running state of the overall upgrade. + */ model UpgradeOperationHistoryStatus { - @doc("Code indicating the current status of the upgrade.") + /** + * Code indicating the current status of the upgrade. + */ @visibility("read") code?: UpgradeState; - @doc("Start time of the upgrade.") + /** + * Start time of the upgrade. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime?: utcDateTime; - @doc("End time of the upgrade.") + /** + * End time of the upgrade. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime?: utcDateTime; } -@doc("Information about the number of virtual machine instances in each upgrade state.") +/** + * Information about the number of virtual machine instances in each upgrade state. + */ model RollingUpgradeProgressInfo { - @doc("The number of instances that have been successfully upgraded.") + /** + * The number of instances that have been successfully upgraded. + */ @visibility("read") successfulInstanceCount?: int32; - @doc("The number of instances that have failed to be upgraded successfully.") + /** + * The number of instances that have failed to be upgraded successfully. + */ @visibility("read") failedInstanceCount?: int32; - @doc("The number of instances that are currently being upgraded.") + /** + * The number of instances that are currently being upgraded. + */ @visibility("read") inProgressInstanceCount?: int32; - @doc("The number of instances that have not yet begun to be upgraded.") + /** + * The number of instances that have not yet begun to be upgraded. + */ @visibility("read") pendingInstanceCount?: int32; } -@doc("Information about rollback on failed VM instances after a OS Upgrade operation.") +/** + * Information about rollback on failed VM instances after a OS Upgrade operation. + */ model RollbackStatusInfo { - @doc("The number of instances which have been successfully rolled back.") + /** + * The number of instances which have been successfully rolled back. + */ @visibility("read") successfullyRolledbackInstanceCount?: int32; - @doc("The number of instances which failed to rollback.") + /** + * The number of instances which failed to rollback. + */ @visibility("read") failedRolledbackInstanceCount?: int32; - @doc("Error details if OS rollback failed.") + /** + * Error details if OS rollback failed. + */ @visibility("read") rollbackError?: ApiError; } -@doc("Describes a Virtual Machine Scale Set VM Reimage Parameters.") +/** + * Describes a Virtual Machine Scale Set VM Reimage Parameters. + */ model VirtualMachineScaleSetReimageParameters extends VirtualMachineScaleSetVMReimageParameters { - @doc("The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.") + /** + * The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. + */ instanceIds?: string[]; } -@doc("Describes a Virtual Machine Scale Set VM Reimage Parameters.") +/** + * Describes a Virtual Machine Scale Set VM Reimage Parameters. + */ model VirtualMachineScaleSetVMReimageParameters extends VirtualMachineReimageParameters {} -@doc("Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk will always be reimaged") +/** + * Parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk will always be reimaged + */ model VirtualMachineReimageParameters { - @doc("Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.") + /** + * Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk. + */ tempDisk?: boolean; - @doc("Specifies in decimal number, the version the OS disk should be reimaged to. If exact version is not provided, the OS disk is reimaged to the existing version of OS Disk.") + /** + * Specifies in decimal number, the version the OS disk should be reimaged to. If exact version is not provided, the OS disk is reimaged to the existing version of OS Disk. + */ exactVersion?: string; - @doc("Specifies information required for reimaging the non-ephemeral OS disk.") + /** + * Specifies information required for reimaging the non-ephemeral OS disk. + */ osProfile?: OSProfileProvisioningData; } -@doc("Additional parameters for Reimaging Non-Ephemeral Virtual Machine.") +/** + * Additional parameters for Reimaging Non-Ephemeral Virtual Machine. + */ model OSProfileProvisioningData { - @doc("Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\\W_])

    **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)") + /** + * Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) + */ adminPassword?: string; - @doc("Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. The property customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). If using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init).") + /** + * Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. The property customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). If using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). + */ customData?: string; } -@doc("The status of the latest virtual machine scale set rolling upgrade.") +/** + * The status of the latest virtual machine scale set rolling upgrade. + */ model RollingUpgradeStatusInfoProperties { - @doc("The rolling upgrade policies applied for this upgrade.") + /** + * The rolling upgrade policies applied for this upgrade. + */ @visibility("read") policy?: RollingUpgradePolicy; - @doc("Information about the current running state of the overall upgrade.") + /** + * Information about the current running state of the overall upgrade. + */ @visibility("read") runningStatus?: RollingUpgradeRunningStatus; - @doc("Information about the number of virtual machine instances in each upgrade state.") + /** + * Information about the number of virtual machine instances in each upgrade state. + */ @visibility("read") progress?: RollingUpgradeProgressInfo; - @doc("Error details for this upgrade, if there are any.") + /** + * Error details for this upgrade, if there are any. + */ @visibility("read") error?: ApiError; } -@doc("Information about the current running state of the overall upgrade.") +/** + * Information about the current running state of the overall upgrade. + */ model RollingUpgradeRunningStatus { - @doc("Code indicating the current status of the upgrade.") + /** + * Code indicating the current status of the upgrade. + */ @visibility("read") code?: RollingUpgradeStatusCode; - @doc("Start time of the upgrade.") + /** + * Start time of the upgrade. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime?: utcDateTime; - @doc("The last action performed on the rolling upgrade.") + /** + * The last action performed on the rolling upgrade. + */ @visibility("read") lastAction?: RollingUpgradeActionType; - @doc("Last action time of the upgrade.") + /** + * Last action time of the upgrade. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastActionTime?: utcDateTime; } -@doc("Response after calling a manual recovery walk") +/** + * Response after calling a manual recovery walk + */ model RecoveryWalkResponse { - @doc("Whether the recovery walk was performed") + /** + * Whether the recovery walk was performed + */ @visibility("read") walkPerformed?: boolean; - @doc("The next update domain that needs to be walked. Null means walk spanning all update domains has been completed") + /** + * The next update domain that needs to be walked. Null means walk spanning all update domains has been completed + */ @visibility("read") nextPlatformUpdateDomain?: int32; } model VMScaleSetConvertToSinglePlacementGroupInput { - @doc("Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances.") + /** + * Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances. + */ activePlacementGroupId?: string; } -@doc("The input for OrchestrationServiceState") +/** + * The input for OrchestrationServiceState + */ model OrchestrationServiceStateInput { - @doc("The name of the service.") + /** + * The name of the service. + */ serviceName: OrchestrationServiceNames; - @doc("The action to be performed.") + /** + * The action to be performed. + */ action: OrchestrationServiceStateAction; } -@doc("Describes a VMSS VM Extension.") +/** + * Describes a VMSS VM Extension. + */ model VirtualMachineScaleSetVMExtensionUpdate extends SubResourceReadOnly { - @doc("The name of the extension.") + /** + * The name of the extension. + */ @visibility("read") name?: string; - @doc("Resource type") + /** + * Resource type + */ @visibility("read") type?: string; - @doc("Describes the properties of a Virtual Machine Extension.") + /** + * Describes the properties of a Virtual Machine Extension. + */ properties?: VirtualMachineExtensionUpdateProperties; } -@doc("Describes the properties of a Virtual Machine Extension.") +/** + * Describes the properties of a Virtual Machine Extension. + */ model VirtualMachineExtensionUpdateProperties { - @doc("How the extension handler should be forced to update even if the extension configuration has not changed.") + /** + * How the extension handler should be forced to update even if the extension configuration has not changed. + */ forceUpdateTag?: string; - @doc("The name of the extension handler publisher.") + /** + * The name of the extension handler publisher. + */ publisher?: string; - @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") + /** + * Specifies the type of the extension; an example is "CustomScriptExtension". + */ type?: string; - @doc("Specifies the version of the script handler.") + /** + * Specifies the version of the script handler. + */ typeHandlerVersion?: string; - @doc("Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.") + /** + * Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. + */ autoUpgradeMinorVersion?: boolean; - @doc("Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.") + /** + * Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. + */ enableAutomaticUpgrade?: boolean; - @doc("Json formatted public settings for the extension.") + /** + * Json formatted public settings for the extension. + */ settings?: Record; - @doc("The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.") + /** + * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + */ protectedSettings?: Record; - @doc("Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.") + /** + * Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false. + */ suppressFailures?: boolean; - @doc("The extensions protected settings that are passed by reference, and consumed from key vault") + /** + * The extensions protected settings that are passed by reference, and consumed from key vault + */ protectedSettingsFromKeyVault?: KeyVaultSecretReference; } -@doc("Describes the properties of a virtual machine scale set virtual machine.") +/** + * Describes the properties of a virtual machine scale set virtual machine. + */ model VirtualMachineScaleSetVMProperties { - @doc("Specifies whether the latest model has been applied to the virtual machine.") + /** + * Specifies whether the latest model has been applied to the virtual machine. + */ @visibility("read") latestModelApplied?: boolean; - @doc("Azure VM unique ID.") + /** + * Azure VM unique ID. + */ @visibility("read") vmId?: string; - @doc("The virtual machine instance view.") + /** + * The virtual machine instance view. + */ @visibility("read") instanceView?: VirtualMachineScaleSetVMInstanceView; - @doc("Specifies the hardware settings for the virtual machine.") + /** + * Specifies the hardware settings for the virtual machine. + */ hardwareProfile?: HardwareProfile; - @doc("Specifies the storage settings for the virtual machine disks.") + /** + * Specifies the storage settings for the virtual machine disks. + */ storageProfile?: StorageProfile; - @doc("Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type.") + /** + * Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. + */ additionalCapabilities?: AdditionalCapabilities; - @doc("Specifies the operating system settings for the virtual machine.") + /** + * Specifies the operating system settings for the virtual machine. + */ osProfile?: OSProfile; - @doc("Specifies the Security related profile settings for the virtual machine.") + /** + * Specifies the Security related profile settings for the virtual machine. + */ securityProfile?: SecurityProfile; - @doc("Specifies the network interfaces of the virtual machine.") + /** + * Specifies the network interfaces of the virtual machine. + */ networkProfile?: NetworkProfile; - @doc("Specifies the network profile configuration of the virtual machine.") + /** + * Specifies the network profile configuration of the virtual machine. + */ networkProfileConfiguration?: VirtualMachineScaleSetVMNetworkProfileConfiguration; - @doc("Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.") + /** + * Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. + */ diagnosticsProfile?: DiagnosticsProfile; - @doc("Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.") + /** + * Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. + */ availabilitySet?: SubResource; - @doc("The provisioning state, which only appears in the response.") + /** + * The provisioning state, which only appears in the response. + */ @visibility("read") provisioningState?: string; - @doc("Specifies that the image or disk that is being used was licensed on-premises.

    Possible values for Windows Server operating system are:

    Windows_Client

    Windows_Server

    Possible values for Linux Server operating system are:

    RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

    [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

    Minimum api-version: 2015-06-15") + /** + * Specifies that the image or disk that is being used was licensed on-premises.

    Possible values for Windows Server operating system are:

    Windows_Client

    Windows_Server

    Possible values for Linux Server operating system are:

    RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

    [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

    Minimum api-version: 2015-06-15 + */ licenseType?: string; - @doc("Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine.") + /** + * Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine. + */ @visibility("read") modelDefinitionApplied?: string; - @doc("Specifies the protection policy of the virtual machine.") + /** + * Specifies the protection policy of the virtual machine. + */ protectionPolicy?: VirtualMachineScaleSetVMProtectionPolicy; - @doc("UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

    Minimum api-version: 2021-03-01") + /** + * UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.

    Minimum api-version: 2021-03-01 + */ userData?: string; - @doc("Specifies the time at which the Virtual Machine resource was created.

    Minimum api-version: 2021-11-01.") + /** + * Specifies the time at which the Virtual Machine resource was created.

    Minimum api-version: 2021-11-01. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timeCreated?: utcDateTime; } -@doc("The instance view of a virtual machine scale set VM.") +/** + * The instance view of a virtual machine scale set VM. + */ model VirtualMachineScaleSetVMInstanceView { - @doc("The Update Domain count.") + /** + * The Update Domain count. + */ platformUpdateDomain?: int32; - @doc("The Fault Domain count.") + /** + * The Fault Domain count. + */ platformFaultDomain?: int32; - @doc("The Remote desktop certificate thumbprint.") + /** + * The Remote desktop certificate thumbprint. + */ rdpThumbPrint?: string; - @doc("The VM Agent running on the virtual machine.") + /** + * The VM Agent running on the virtual machine. + */ vmAgent?: VirtualMachineAgentInstanceView; - @doc("The Maintenance Operation status on the virtual machine.") + /** + * The Maintenance Operation status on the virtual machine. + */ maintenanceRedeployStatus?: MaintenanceRedeployStatus; - @doc("The disks information.") + /** + * The disks information. + */ disks?: DiskInstanceView[]; - @doc("The extensions information.") + /** + * The extensions information. + */ extensions?: VirtualMachineExtensionInstanceView[]; - @doc("The health status for the VM.") + /** + * The health status for the VM. + */ @visibility("read") vmHealth?: VirtualMachineHealthStatus; - @doc("Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.") + /** + * Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. + */ bootDiagnostics?: BootDiagnosticsInstanceView; - @doc("The resource status information.") + /** + * The resource status information. + */ statuses?: InstanceViewStatus[]; - @doc("Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01.") + /** + * Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01. + */ @visibility("read") assignedHost?: string; - @doc("The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId.") + /** + * The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId. + */ placementGroupId?: string; - @doc("Specifies the host OS name of the virtual machine.

    This name cannot be updated after the VM is created.

    **Max-length (Windows):** 15 characters

    **Max-length (Linux):** 64 characters.

    For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions).") + /** + * Specifies the host OS name of the virtual machine.

    This name cannot be updated after the VM is created.

    **Max-length (Windows):** 15 characters

    **Max-length (Linux):** 64 characters.

    For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-infrastructure-subscription-accounts-guidelines?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json#1-naming-conventions). + */ computerName?: string; - @doc("The Operating System running on the hybrid machine.") + /** + * The Operating System running on the hybrid machine. + */ osName?: string; - @doc("The version of Operating System running on the hybrid machine.") + /** + * The version of Operating System running on the hybrid machine. + */ osVersion?: string; - @doc("The hypervisor generation of the Virtual Machine [V1, V2]") + /** + * The hypervisor generation of the Virtual Machine [V1, V2] + */ hyperVGeneration?: HyperVGeneration; } -@doc("The instance view of the VM Agent running on the virtual machine.") +/** + * The instance view of the VM Agent running on the virtual machine. + */ model VirtualMachineAgentInstanceView { - @doc("The VM Agent full version.") + /** + * The VM Agent full version. + */ vmAgentVersion?: string; - @doc("The virtual machine extension handler instance view.") + /** + * The virtual machine extension handler instance view. + */ extensionHandlers?: VirtualMachineExtensionHandlerInstanceView[]; - @doc("The resource status information.") + /** + * The resource status information. + */ statuses?: InstanceViewStatus[]; } -@doc("The instance view of a virtual machine extension handler.") +/** + * The instance view of a virtual machine extension handler. + */ model VirtualMachineExtensionHandlerInstanceView { - @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") + /** + * Specifies the type of the extension; an example is "CustomScriptExtension". + */ type?: string; - @doc("Specifies the version of the script handler.") + /** + * Specifies the version of the script handler. + */ typeHandlerVersion?: string; - @doc("The extension handler status.") + /** + * The extension handler status. + */ status?: InstanceViewStatus; } -@doc("Maintenance Operation Status.") +/** + * Maintenance Operation Status. + */ model MaintenanceRedeployStatus { - @doc("True, if customer is allowed to perform Maintenance.") + /** + * True, if customer is allowed to perform Maintenance. + */ isCustomerInitiatedMaintenanceAllowed?: boolean; - @doc("Start Time for the Pre Maintenance Window.") + /** + * Start Time for the Pre Maintenance Window. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. preMaintenanceWindowStartTime?: utcDateTime; - @doc("End Time for the Pre Maintenance Window.") + /** + * End Time for the Pre Maintenance Window. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. preMaintenanceWindowEndTime?: utcDateTime; - @doc("Start Time for the Maintenance Window.") + /** + * Start Time for the Maintenance Window. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. maintenanceWindowStartTime?: utcDateTime; - @doc("End Time for the Maintenance Window.") + /** + * End Time for the Maintenance Window. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. maintenanceWindowEndTime?: utcDateTime; - @doc("The Last Maintenance Operation Result Code.") + /** + * The Last Maintenance Operation Result Code. + */ lastOperationResultCode?: MaintenanceOperationResultCodeTypes; - @doc("Message returned for the last Maintenance Operation.") + /** + * Message returned for the last Maintenance Operation. + */ lastOperationMessage?: string; } -@doc("The instance view of the disk.") +/** + * The instance view of the disk. + */ model DiskInstanceView { - @doc("The disk name.") + /** + * The disk name. + */ name?: string; - @doc("Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15") + /** + * Specifies the encryption settings for the OS Disk.

    Minimum api-version: 2015-06-15 + */ encryptionSettings?: DiskEncryptionSettings[]; - @doc("The resource status information.") + /** + * The resource status information. + */ statuses?: InstanceViewStatus[]; } -@doc("Describes a Encryption Settings for a Disk") +/** + * Describes a Encryption Settings for a Disk + */ model DiskEncryptionSettings { - @doc("Specifies the location of the disk encryption key, which is a Key Vault Secret.") + /** + * Specifies the location of the disk encryption key, which is a Key Vault Secret. + */ diskEncryptionKey?: KeyVaultSecretReference; - @doc("Specifies the location of the key encryption key in Key Vault.") + /** + * Specifies the location of the key encryption key in Key Vault. + */ keyEncryptionKey?: KeyVaultKeyReference; - @doc("Specifies whether disk encryption should be enabled on the virtual machine.") + /** + * Specifies whether disk encryption should be enabled on the virtual machine. + */ enabled?: boolean; } -@doc("Describes a reference to Key Vault Key") +/** + * Describes a reference to Key Vault Key + */ model KeyVaultKeyReference { - @doc("The URL referencing a key encryption key in Key Vault.") + /** + * The URL referencing a key encryption key in Key Vault. + */ keyUrl: string; - @doc("The relative URL of the Key Vault containing the key.") + /** + * The relative URL of the Key Vault containing the key. + */ sourceVault: SubResource; } -@doc("The health status of the VM.") +/** + * The health status of the VM. + */ model VirtualMachineHealthStatus { - @doc("The health status information for the VM.") + /** + * The health status information for the VM. + */ @visibility("read") status?: InstanceViewStatus; } -@doc("The instance view of a virtual machine boot diagnostics.") +/** + * The instance view of a virtual machine boot diagnostics. + */ model BootDiagnosticsInstanceView { - @doc("The console screenshot blob URI. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage.") + /** + * The console screenshot blob URI. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage. + */ @visibility("read") consoleScreenshotBlobUri?: string; - @doc("The serial console log blob Uri. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage.") + /** + * The serial console log blob Uri. **Note:** This will **not** be set if boot diagnostics is currently enabled with managed storage. + */ @visibility("read") serialConsoleLogBlobUri?: string; - @doc("The boot diagnostics status information for the VM. **Note:** It will be set only if there are errors encountered in enabling boot diagnostics.") + /** + * The boot diagnostics status information for the VM. **Note:** It will be set only if there are errors encountered in enabling boot diagnostics. + */ @visibility("read") status?: InstanceViewStatus; } -@doc("Specifies the hardware settings for the virtual machine.") +/** + * Specifies the hardware settings for the virtual machine. + */ model HardwareProfile { - @doc("Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set.") + /** + * Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set. + */ vmSize?: VirtualMachineSizeTypes; - @doc("Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01. This feature is still in preview mode and is not supported for VirtualMachineScaleSet. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details.") + /** + * Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01. This feature is still in preview mode and is not supported for VirtualMachineScaleSet. Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details. + */ vmSizeProperties?: VMSizeProperties; } -@doc("Specifies the storage settings for the virtual machine disks.") +/** + * Specifies the storage settings for the virtual machine disks. + */ model StorageProfile { - @doc("Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.") + /** + * Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. + */ imageReference?: ImageReference; - @doc("Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).") + /** + * Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + */ osDisk?: OSDisk; - @doc("Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).") + /** + * Specifies the parameters that are used to add a data disk to a virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + */ dataDisks?: DataDisk[]; - @doc("Specifies the disk controller type configured for the VM. **Note:** This property will be set to the default disk controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01.") + /** + * Specifies the disk controller type configured for the VM. **Note:** This property will be set to the default disk controller type if not specified provided virtual machine is being created with 'hyperVGeneration' set to V2 based on the capabilities of the operating system disk and VM size from the the specified minimum api version. You need to deallocate the VM before updating its disk controller type unless you are updating the VM size in the VM configuration which implicitly deallocates and reallocates the VM. Minimum api-version: 2022-08-01. + */ diskControllerType?: DiskControllerTypes; } -@doc("Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).") +/** + * Specifies information about the operating system disk used by the virtual machine. For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + */ model OSDisk { - @doc("This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**") + /** + * This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.** + */ osType?: OperatingSystemTypes; - @doc("Specifies the encryption settings for the OS Disk. Minimum api-version: 2015-06-15.") + /** + * Specifies the encryption settings for the OS Disk. Minimum api-version: 2015-06-15. + */ encryptionSettings?: DiskEncryptionSettings; - @doc("The disk name.") + /** + * The disk name. + */ name?: string; - @doc("The virtual hard disk.") + /** + * The virtual hard disk. + */ vhd?: VirtualHardDisk; - @doc("The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.") + /** + * The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. + */ image?: VirtualHardDisk; - @doc("Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**") + /** + * Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.** + */ caching?: CachingTypes; - @doc("Specifies whether writeAccelerator should be enabled or disabled on the disk.") + /** + * Specifies whether writeAccelerator should be enabled or disabled on the disk. + */ writeAcceleratorEnabled?: boolean; - @doc("Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.") + /** + * Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine. + */ diffDiskSettings?: DiffDiskSettings; - @doc("Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described.") + /** + * Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described. + */ createOption: DiskCreateOptionTypes; - @doc("Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.") + /** + * Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. + */ diskSizeGB?: int32; - @doc("The managed disk parameters.") + /** + * The managed disk parameters. + */ managedDisk?: ManagedDiskParameters; - @doc("Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the OS disk is deleted when VM is deleted. **Detach.** If this value is used, the os disk is retained after VM is deleted. The default value is set to **Detach**. For an ephemeral OS Disk, the default value is set to **Delete**. The user cannot change the delete option for an ephemeral OS Disk.") + /** + * Specifies whether OS Disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the OS disk is deleted when VM is deleted. **Detach.** If this value is used, the os disk is retained after VM is deleted. The default value is set to **Detach**. For an ephemeral OS Disk, the default value is set to **Delete**. The user cannot change the delete option for an ephemeral OS Disk. + */ deleteOption?: DiskDeleteOptionTypes; } -@doc("The parameters of a managed disk.") +/** + * The parameters of a managed disk. + */ model ManagedDiskParameters extends SubResource { - @doc("Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.") + /** + * Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. + */ storageAccountType?: StorageAccountTypes; - @doc("Specifies the customer managed disk encryption set resource id for the managed disk.") + /** + * Specifies the customer managed disk encryption set resource id for the managed disk. + */ diskEncryptionSet?: DiskEncryptionSetParameters; - @doc("Specifies the security profile for the managed disk.") + /** + * Specifies the security profile for the managed disk. + */ securityProfile?: VMDiskSecurityProfile; } -@doc("Describes a data disk.") +/** + * Describes a data disk. + */ model DataDisk { - @doc("Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.") + /** + * Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. + */ lun: int32; - @doc("The disk name.") + /** + * The disk name. + */ name?: string; - @doc("The virtual hard disk.") + /** + * The virtual hard disk. + */ vhd?: VirtualHardDisk; - @doc("The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.") + /** + * The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. + */ image?: VirtualHardDisk; - @doc("Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.**") + /** + * Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The defaulting behavior is: **None for Standard storage. ReadOnly for Premium storage.** + */ caching?: CachingTypes; - @doc("Specifies whether writeAccelerator should be enabled or disabled on the disk.") + /** + * Specifies whether writeAccelerator should be enabled or disabled on the disk. + */ writeAcceleratorEnabled?: boolean; - @doc("Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described.") + /** + * Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you should also use the imageReference element described above. If you are using a marketplace image, you should also use the plan element previously described. + */ createOption: DiskCreateOptionTypes; - @doc("Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.") + /** + * Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023. + */ diskSizeGB?: int32; - @doc("The managed disk parameters.") + /** + * The managed disk parameters. + */ managedDisk?: ManagedDiskParameters; - @doc("Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset") + /** + * Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset + */ toBeDetached?: boolean; - @doc("Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.") + /** + * Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. + */ @visibility("read") @projectedName("json", "diskIOPSReadWrite") - diskIopsReadWrite?: int32; + diskIopsReadWrite?: int64; - @doc("Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.") + /** + * Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. + */ @visibility("read") - diskMBpsReadWrite?: int32; + diskMBpsReadWrite?: int64; - @doc("Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'.") + /** + * Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. + */ detachOption?: DiskDetachOptionTypes; - @doc("Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**.") + /** + * Specifies whether data disk should be deleted or detached upon VM deletion. Possible values are: **Delete.** If this value is used, the data disk is deleted when VM is deleted. **Detach.** If this value is used, the data disk is retained after VM is deleted. The default value is set to **Detach**. + */ deleteOption?: DiskDeleteOptionTypes; } -@doc("Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is provisioned.") +/** + * Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is provisioned. + */ model OSProfile { - @doc("Specifies the host OS name of the virtual machine. This name cannot be updated after the VM is created. **Max-length (Windows):** 15 characters. **Max-length (Linux):** 64 characters. For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules).") + /** + * Specifies the host OS name of the virtual machine. This name cannot be updated after the VM is created. **Max-length (Windows):** 15 characters. **Max-length (Linux):** 64 characters. For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules). + */ computerName?: string; - @doc("Specifies the name of the administrator account.

    This property cannot be updated after the VM is created.

    **Windows-only restriction:** Cannot end in \".\"

    **Disallowed values:** \"administrator\", \"admin\", \"user\", \"user1\", \"test\", \"user2\", \"test1\", \"user3\", \"admin1\", \"1\", \"123\", \"a\", \"actuser\", \"adm\", \"admin2\", \"aspnet\", \"backup\", \"console\", \"david\", \"guest\", \"john\", \"owner\", \"root\", \"server\", \"sql\", \"support\", \"support_388945a0\", \"sys\", \"test2\", \"test3\", \"user4\", \"user5\".

    **Minimum-length (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters.") + /** + * Specifies the name of the administrator account.

    This property cannot be updated after the VM is created.

    **Windows-only restriction:** Cannot end in "."

    **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters. + */ adminUsername?: string; - @doc("Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\\W_])

    **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)") + /** + * Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) + */ adminPassword?: string; - @doc("Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. The property 'customData' is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init).") + /** + * Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property.** This property cannot be updated after the VM is created. The property 'customData' is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/). For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init). + */ customData?: string; - @doc("Specifies Windows operating system settings on the virtual machine.") + /** + * Specifies Windows operating system settings on the virtual machine. + */ windowsConfiguration?: WindowsConfiguration; - @doc("Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).") + /** + * Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + */ linuxConfiguration?: LinuxConfiguration; - @doc("Specifies set of certificates that should be installed onto the virtual machine. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).") + /** + * Specifies set of certificates that should be installed onto the virtual machine. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows). + */ secrets?: VaultSecretGroup[]; - @doc("Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine.") + /** + * Specifies whether extension operations should be allowed on the virtual machine. This may only be set to False when no extensions are present on the virtual machine. + */ allowExtensionOperations?: boolean; - @doc("Optional property which must either be set to True or omitted.") + /** + * Optional property which must either be set to True or omitted. + */ requireGuestProvisionSignal?: boolean; } -@doc("Specifies the network interfaces or the networking configuration of the virtual machine.") +/** + * Specifies the network interfaces or the networking configuration of the virtual machine. + */ model NetworkProfile { - @doc("Specifies the list of resource Ids for the network interfaces associated with the virtual machine.") + /** + * Specifies the list of resource Ids for the network interfaces associated with the virtual machine. + */ networkInterfaces?: NetworkInterfaceReference[]; - @doc("specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations") + /** + * specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations + */ networkApiVersion?: NetworkApiVersion; - @doc("Specifies the networking configurations that will be used to create the virtual machine networking resources.") + /** + * Specifies the networking configurations that will be used to create the virtual machine networking resources. + */ networkInterfaceConfigurations?: VirtualMachineNetworkInterfaceConfiguration[]; } -@doc("Describes a network interface reference.") +/** + * Describes a network interface reference. + */ model NetworkInterfaceReference extends SubResource { - @doc("Describes a network interface reference properties.") + /** + * Describes a network interface reference properties. + */ properties?: NetworkInterfaceReferenceProperties; } -@doc("Describes a network interface reference properties.") +/** + * Describes a network interface reference properties. + */ model NetworkInterfaceReferenceProperties { - @doc("Specifies the primary network interface in case the virtual machine has more than 1 network interface.") + /** + * Specifies the primary network interface in case the virtual machine has more than 1 network interface. + */ primary?: boolean; - @doc("Specify what happens to the network interface when the VM is deleted") + /** + * Specify what happens to the network interface when the VM is deleted + */ deleteOption?: DeleteOptions; } -@doc("Describes a virtual machine network interface configurations.") +/** + * Describes a virtual machine network interface configurations. + */ model VirtualMachineNetworkInterfaceConfiguration { - @doc("The network interface configuration name.") + /** + * The network interface configuration name. + */ name: string; - @doc("Describes a virtual machine network profile's IP configuration.") + /** + * Describes a virtual machine network profile's IP configuration. + */ properties?: VirtualMachineNetworkInterfaceConfigurationProperties; } -@doc("Describes a virtual machine network profile's IP configuration.") +/** + * Describes a virtual machine network profile's IP configuration. + */ model VirtualMachineNetworkInterfaceConfigurationProperties { - @doc("Specifies the primary network interface in case the virtual machine has more than 1 network interface.") + /** + * Specifies the primary network interface in case the virtual machine has more than 1 network interface. + */ primary?: boolean; - @doc("Specify what happens to the network interface when the VM is deleted") + /** + * Specify what happens to the network interface when the VM is deleted + */ deleteOption?: DeleteOptions; - @doc("Specifies whether the network interface is accelerated networking-enabled.") + /** + * Specifies whether the network interface is accelerated networking-enabled. + */ enableAcceleratedNetworking?: boolean; - @doc("Specifies whether the network interface is disabled for tcp state tracking.") + /** + * Specifies whether the network interface is disabled for tcp state tracking. + */ disableTcpStateTracking?: boolean; - @doc("Specifies whether the network interface is FPGA networking-enabled.") + /** + * Specifies whether the network interface is FPGA networking-enabled. + */ enableFpga?: boolean; - @doc("Whether IP forwarding enabled on this NIC.") + /** + * Whether IP forwarding enabled on this NIC. + */ enableIPForwarding?: boolean; - @doc("The network security group.") + /** + * The network security group. + */ networkSecurityGroup?: SubResource; - @doc("The dns settings to be applied on the network interfaces.") + /** + * The dns settings to be applied on the network interfaces. + */ dnsSettings?: VirtualMachineNetworkInterfaceDnsSettingsConfiguration; - @doc("Specifies the IP configurations of the network interface.") + /** + * Specifies the IP configurations of the network interface. + */ ipConfigurations: VirtualMachineNetworkInterfaceIPConfiguration[]; dscpConfiguration?: SubResource; - @doc("Specifies whether the Auxiliary mode is enabled for the Network Interface resource.") + /** + * Specifies whether the Auxiliary mode is enabled for the Network Interface resource. + */ auxiliaryMode?: NetworkInterfaceAuxiliaryMode; - @doc("Specifies whether the Auxiliary sku is enabled for the Network Interface resource.") + /** + * Specifies whether the Auxiliary sku is enabled for the Network Interface resource. + */ auxiliarySku?: NetworkInterfaceAuxiliarySku; } -@doc("Describes a virtual machines network configuration's DNS settings.") +/** + * Describes a virtual machines network configuration's DNS settings. + */ model VirtualMachineNetworkInterfaceDnsSettingsConfiguration { - @doc("List of DNS servers IP addresses") + /** + * List of DNS servers IP addresses + */ dnsServers?: string[]; } -@doc("Describes a virtual machine network profile's IP configuration.") +/** + * Describes a virtual machine network profile's IP configuration. + */ model VirtualMachineNetworkInterfaceIPConfiguration { - @doc("The IP configuration name.") + /** + * The IP configuration name. + */ name: string; - @doc("Describes a virtual machine network interface IP configuration properties.") + /** + * Describes a virtual machine network interface IP configuration properties. + */ properties?: VirtualMachineNetworkInterfaceIPConfigurationProperties; } -@doc("Describes a virtual machine network interface IP configuration properties.") +/** + * Describes a virtual machine network interface IP configuration properties. + */ model VirtualMachineNetworkInterfaceIPConfigurationProperties { - @doc("Specifies the identifier of the subnet.") + /** + * Specifies the identifier of the subnet. + */ subnet?: SubResource; - @doc("Specifies the primary network interface in case the virtual machine has more than 1 network interface.") + /** + * Specifies the primary network interface in case the virtual machine has more than 1 network interface. + */ primary?: boolean; - @doc("The publicIPAddressConfiguration.") + /** + * The publicIPAddressConfiguration. + */ publicIPAddressConfiguration?: VirtualMachinePublicIPAddressConfiguration; - @doc("Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") + /** + * Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + */ privateIPAddressVersion?: IPVersions; - @doc("Specifies an array of references to application security group.") + /** + * Specifies an array of references to application security group. + */ applicationSecurityGroups?: SubResource[]; - @doc("Specifies an array of references to backend address pools of application gateways. A virtual machine can reference backend address pools of multiple application gateways. Multiple virtual machines cannot use the same application gateway.") + /** + * Specifies an array of references to backend address pools of application gateways. A virtual machine can reference backend address pools of multiple application gateways. Multiple virtual machines cannot use the same application gateway. + */ applicationGatewayBackendAddressPools?: SubResource[]; - @doc("Specifies an array of references to backend address pools of load balancers. A virtual machine can reference backend address pools of one public and one internal load balancer. [Multiple virtual machines cannot use the same basic sku load balancer].") + /** + * Specifies an array of references to backend address pools of load balancers. A virtual machine can reference backend address pools of one public and one internal load balancer. [Multiple virtual machines cannot use the same basic sku load balancer]. + */ loadBalancerBackendAddressPools?: SubResource[]; } -@doc("Describes a virtual machines IP Configuration's PublicIPAddress configuration") +/** + * Describes a virtual machines IP Configuration's PublicIPAddress configuration + */ model VirtualMachinePublicIPAddressConfiguration { - @doc("The publicIP address configuration name.") + /** + * The publicIP address configuration name. + */ name: string; - @doc("Describes a virtual machines IP Configuration's PublicIPAddress configuration") + /** + * Describes a virtual machines IP Configuration's PublicIPAddress configuration + */ properties?: VirtualMachinePublicIPAddressConfigurationProperties; - @doc("Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible.") + /** + * Describes the public IP Sku. It can only be set with OrchestrationMode as Flexible. + */ sku?: PublicIPAddressSku; } -@doc("Describes a virtual machines IP Configuration's PublicIPAddress configuration") +/** + * Describes a virtual machines IP Configuration's PublicIPAddress configuration + */ model VirtualMachinePublicIPAddressConfigurationProperties { - @doc("The idle timeout of the public IP address.") + /** + * The idle timeout of the public IP address. + */ idleTimeoutInMinutes?: int32; - @doc("Specify what happens to the public IP address when the VM is deleted") + /** + * Specify what happens to the public IP address when the VM is deleted + */ deleteOption?: DeleteOptions; - @doc("The dns settings to be applied on the publicIP addresses .") + /** + * The dns settings to be applied on the publicIP addresses . + */ dnsSettings?: VirtualMachinePublicIPAddressDnsSettingsConfiguration; - @doc("The list of IP tags associated with the public IP address.") + /** + * The list of IP tags associated with the public IP address. + */ ipTags?: VirtualMachineIpTag[]; - @doc("The PublicIPPrefix from which to allocate publicIP addresses.") + /** + * The PublicIPPrefix from which to allocate publicIP addresses. + */ publicIPPrefix?: SubResource; - @doc("Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") + /** + * Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. + */ publicIPAddressVersion?: IPVersions; - @doc("Specify the public IP allocation type") + /** + * Specify the public IP allocation type + */ publicIPAllocationMethod?: PublicIPAllocationMethod; } -@doc("Describes a virtual machines network configuration's DNS settings.") +/** + * Describes a virtual machines network configuration's DNS settings. + */ model VirtualMachinePublicIPAddressDnsSettingsConfiguration { - @doc("The Domain name label prefix of the PublicIPAddress resources that will be created. The generated name label is the concatenation of the domain name label and vm network profile unique ID.") + /** + * The Domain name label prefix of the PublicIPAddress resources that will be created. The generated name label is the concatenation of the domain name label and vm network profile unique ID. + */ domainNameLabel: string; - @doc("The Domain name label scope of the PublicIPAddress resources that will be created. The generated name label is the concatenation of the hashed domain name label with policy according to the domain name label scope and vm network profile unique ID.") + /** + * The Domain name label scope of the PublicIPAddress resources that will be created. The generated name label is the concatenation of the hashed domain name label with policy according to the domain name label scope and vm network profile unique ID. + */ domainNameLabelScope?: DomainNameLabelScopeTypes; } -@doc("Contains the IP tag associated with the public IP address.") +/** + * Contains the IP tag associated with the public IP address. + */ model VirtualMachineIpTag { - @doc("IP tag type. Example: FirstPartyUsage.") + /** + * IP tag type. Example: FirstPartyUsage. + */ ipTagType?: string; - @doc("IP tag associated with the public IP. Example: SQL, Storage etc.") + /** + * IP tag associated with the public IP. Example: SQL, Storage etc. + */ tag?: string; } -@doc("Describes a virtual machine scale set VM network profile.") +/** + * Describes a virtual machine scale set VM network profile. + */ model VirtualMachineScaleSetVMNetworkProfileConfiguration { - @doc("The list of network configurations.") + /** + * The list of network configurations. + */ networkInterfaceConfigurations?: VirtualMachineScaleSetNetworkConfiguration[]; } -@doc("The protection policy of a virtual machine scale set VM.") +/** + * The protection policy of a virtual machine scale set VM. + */ model VirtualMachineScaleSetVMProtectionPolicy { - @doc("Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation.") + /** + * Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation. + */ protectFromScaleIn?: boolean; - @doc("Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine scale set VM.") + /** + * Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine scale set VM. + */ protectFromScaleSetActions?: boolean; } -@doc("Identity for the virtual machine.") +/** + * Identity for the virtual machine. + */ model VirtualMachineIdentity { - @doc("The principal id of virtual machine identity. This property will only be provided for a system assigned identity.") + /** + * The principal id of virtual machine identity. This property will only be provided for a system assigned identity. + */ @visibility("read") principalId?: string; - @doc("The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity.") + /** + * The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity. + */ @visibility("read") tenantId?: string; - @doc("The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine.") + /** + * The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. + */ type?: ResourceIdentityType; - @doc("The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.") + /** + * The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ userAssignedIdentities?: Record; } -@doc("The SAS URIs of the console screenshot and serial log blobs.") +/** + * The SAS URIs of the console screenshot and serial log blobs. + */ model RetrieveBootDiagnosticsDataResult { - @doc("The console screenshot blob URI") + /** + * The console screenshot blob URI + */ @visibility("read") consoleScreenshotBlobUri?: string; - @doc("The serial console log blob URI.") + /** + * The serial console log blob URI. + */ @visibility("read") serialConsoleLogBlobUri?: string; } -@doc("Describes a Virtual Machine Extension.") +/** + * Describes a Virtual Machine Extension. + */ model VirtualMachineExtensionUpdate extends UpdateResource { - @doc("Describes the properties of a Virtual Machine Extension.") + /** + * Describes the properties of a Virtual Machine Extension. + */ properties?: VirtualMachineExtensionUpdateProperties; } -@doc("Describes the properties of a Virtual Machine.") +/** + * Describes the properties of a Virtual Machine. + */ model VirtualMachineProperties { - @doc("Specifies the hardware settings for the virtual machine.") + /** + * Specifies the hardware settings for the virtual machine. + */ hardwareProfile?: HardwareProfile; - @doc("Specifies the storage settings for the virtual machine disks.") + /** + * Specifies the storage settings for the virtual machine disks. + */ storageProfile?: StorageProfile; - @doc("Specifies additional capabilities enabled or disabled on the virtual machine.") + /** + * Specifies additional capabilities enabled or disabled on the virtual machine. + */ additionalCapabilities?: AdditionalCapabilities; - @doc("Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.") + /** + * Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned. + */ osProfile?: OSProfile; - @doc("Specifies the network interfaces of the virtual machine.") + /** + * Specifies the network interfaces of the virtual machine. + */ networkProfile?: NetworkProfile; - @doc("Specifies the Security related profile settings for the virtual machine.") + /** + * Specifies the Security related profile settings for the virtual machine. + */ securityProfile?: SecurityProfile; - @doc("Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.") + /** + * Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. + */ diagnosticsProfile?: DiagnosticsProfile; - @doc("Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.") + /** + * Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. This property cannot exist along with a non-null properties.virtualMachineScaleSet reference. + */ availabilitySet?: SubResource; - @doc("Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. This property cannot exist along with a non-null properties.availabilitySet reference. Minimum api‐version: 2019‐03‐01.") + /** + * Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. This property cannot exist along with a non-null properties.availabilitySet reference. Minimum api‐version: 2019‐03‐01. + */ virtualMachineScaleSet?: SubResource; - @doc("Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01.") + /** + * Specifies information about the proximity placement group that the virtual machine should be assigned to. Minimum api-version: 2018-04-01. + */ proximityPlacementGroup?: SubResource; - @doc("Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01") + /** + * Specifies the priority for the virtual machine. Minimum api-version: 2019-03-01 + */ priority?: VirtualMachinePriorityTypes; - @doc("Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.") + /** + * Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. + */ evictionPolicy?: VirtualMachineEvictionPolicyTypes; - @doc("Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01.") + /** + * Specifies the billing related details of a Azure Spot virtual machine. Minimum api-version: 2019-03-01. + */ billingProfile?: BillingProfile; - @doc("Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01.") + /** + * Specifies information about the dedicated host that the virtual machine resides in. Minimum api-version: 2018-10-01. + */ host?: SubResource; - @doc("Specifies information about the dedicated host group that the virtual machine resides in. **Note:** User cannot specify both host and hostGroup properties. Minimum api-version: 2020-06-01.") + /** + * Specifies information about the dedicated host group that the virtual machine resides in. **Note:** User cannot specify both host and hostGroup properties. Minimum api-version: 2020-06-01. + */ hostGroup?: SubResource; - @doc("The provisioning state, which only appears in the response.") + /** + * The provisioning state, which only appears in the response. + */ @visibility("read") provisioningState?: string; - @doc("The virtual machine instance view.") + /** + * The virtual machine instance view. + */ @visibility("read") instanceView?: VirtualMachineInstanceView; - @doc("Specifies that the image or disk that is being used was licensed on-premises.

    Possible values for Windows Server operating system are:

    Windows_Client

    Windows_Server

    Possible values for Linux Server operating system are:

    RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

    [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

    Minimum api-version: 2015-06-15") + /** + * Specifies that the image or disk that is being used was licensed on-premises.

    Possible values for Windows Server operating system are:

    Windows_Client

    Windows_Server

    Possible values for Linux Server operating system are:

    RHEL_BYOS (for RHEL)

    SLES_BYOS (for SUSE)

    For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)

    [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)

    Minimum api-version: 2015-06-15 + */ licenseType?: string; - @doc("Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands.") + /** + * Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands. + */ @visibility("read") vmId?: string; - @doc("Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01.") + /** + * Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). Minimum api-version: 2020-06-01. + */ extensionsTimeBudget?: string; - @doc("Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains. This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set. The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' greater than 1. This property cannot be updated once the Virtual Machine is created. Fault domain assignment can be viewed in the Virtual Machine Instance View. Minimum api‐version: 2020‐12‐01.") + /** + * Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains. This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set. The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' greater than 1. This property cannot be updated once the Virtual Machine is created. Fault domain assignment can be viewed in the Virtual Machine Instance View. Minimum api‐version: 2020‐12‐01. + */ platformFaultDomain?: int32; - @doc("Specifies Scheduled Event related configurations.") + /** + * Specifies Scheduled Event related configurations. + */ scheduledEventsProfile?: ScheduledEventsProfile; - @doc("UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01.") + /** + * UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. Minimum api-version: 2021-03-01. + */ userData?: string; - @doc("Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01.") + /** + * Specifies information about the capacity reservation that is used to allocate virtual machine. Minimum api-version: 2021-04-01. + */ capacityReservation?: CapacityReservationProfile; - @doc("Specifies the gallery applications that should be made available to the VM/VMSS.") + /** + * Specifies the gallery applications that should be made available to the VM/VMSS. + */ applicationProfile?: ApplicationProfile; - @doc("Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01.") + /** + * Specifies the time at which the Virtual Machine resource was created. Minimum api-version: 2021-11-01. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timeCreated?: utcDateTime; } -@doc("The instance view of a virtual machine.") +/** + * The instance view of a virtual machine. + */ model VirtualMachineInstanceView { - @doc("Specifies the update domain of the virtual machine.") + /** + * Specifies the update domain of the virtual machine. + */ platformUpdateDomain?: int32; - @doc("Specifies the fault domain of the virtual machine.") + /** + * Specifies the fault domain of the virtual machine. + */ platformFaultDomain?: int32; - @doc("The computer name assigned to the virtual machine.") + /** + * The computer name assigned to the virtual machine. + */ computerName?: string; - @doc("The Operating System running on the virtual machine.") + /** + * The Operating System running on the virtual machine. + */ osName?: string; - @doc("The version of Operating System running on the virtual machine.") + /** + * The version of Operating System running on the virtual machine. + */ osVersion?: string; - @doc("Specifies the HyperVGeneration Type associated with a resource") + /** + * Specifies the HyperVGeneration Type associated with a resource + */ hyperVGeneration?: HyperVGenerationType; - @doc("The Remote desktop certificate thumbprint.") + /** + * The Remote desktop certificate thumbprint. + */ rdpThumbPrint?: string; - @doc("The VM Agent running on the virtual machine.") + /** + * The VM Agent running on the virtual machine. + */ vmAgent?: VirtualMachineAgentInstanceView; - @doc("The Maintenance Operation status on the virtual machine.") + /** + * The Maintenance Operation status on the virtual machine. + */ maintenanceRedeployStatus?: MaintenanceRedeployStatus; - @doc("The virtual machine disk information.") + /** + * The virtual machine disk information. + */ disks?: DiskInstanceView[]; - @doc("The extensions information.") + /** + * The extensions information. + */ extensions?: VirtualMachineExtensionInstanceView[]; - @doc("The health status for the VM.") + /** + * The health status for the VM. + */ @visibility("read") vmHealth?: VirtualMachineHealthStatus; - @doc("Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor.") + /** + * Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. + */ bootDiagnostics?: BootDiagnosticsInstanceView; - @doc("Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01.") + /** + * Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled. Minimum api-version: 2020-06-01. + */ @visibility("read") assignedHost?: string; - @doc("The resource status information.") + /** + * The resource status information. + */ statuses?: InstanceViewStatus[]; - @doc("[Preview Feature] The status of virtual machine patch operations.") + /** + * [Preview Feature] The status of virtual machine patch operations. + */ patchStatus?: VirtualMachinePatchStatus; } -@doc("The status of virtual machine patch operations.") +/** + * The status of virtual machine patch operations. + */ model VirtualMachinePatchStatus { - @doc("The available patch summary of the latest assessment operation for the virtual machine.") + /** + * The available patch summary of the latest assessment operation for the virtual machine. + */ availablePatchSummary?: AvailablePatchSummary; - @doc("The installation summary of the latest installation operation for the virtual machine.") + /** + * The installation summary of the latest installation operation for the virtual machine. + */ lastPatchInstallationSummary?: LastPatchInstallationSummary; - @doc("The enablement status of the specified patchMode") + /** + * The enablement status of the specified patchMode + */ @visibility("read") configurationStatuses?: InstanceViewStatus[]; } -@doc("Describes the properties of an virtual machine instance view for available patch summary.") +/** + * Describes the properties of an virtual machine instance view for available patch summary. + */ model AvailablePatchSummary { - @doc("The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"") + /** + * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings." + */ @visibility("read") status?: PatchOperationStatus; - @doc("The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.") + /** + * The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + */ @visibility("read") assessmentActivityId?: string; - @doc("The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred.") + /** + * The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred. + */ @visibility("read") rebootPending?: boolean; - @doc("The number of critical or security patches that have been detected as available and not yet installed.") + /** + * The number of critical or security patches that have been detected as available and not yet installed. + */ @visibility("read") criticalAndSecurityPatchCount?: int32; - @doc("The number of all available patches excluding critical and security.") + /** + * The number of all available patches excluding critical and security. + */ @visibility("read") otherPatchCount?: int32; - @doc("The UTC timestamp when the operation began.") + /** + * The UTC timestamp when the operation began. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime?: utcDateTime; - @doc("The UTC timestamp when the operation began.") + /** + * The UTC timestamp when the operation began. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedTime?: utcDateTime; - @doc("The errors that were encountered during execution of the operation. The details array contains the list of them.") + /** + * The errors that were encountered during execution of the operation. The details array contains the list of them. + */ @visibility("read") error?: ApiError; } -@doc("Describes the properties of the last installed patch summary.") +/** + * Describes the properties of the last installed patch summary. + */ model LastPatchInstallationSummary { - @doc("The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"") + /** + * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings." + */ @visibility("read") status?: PatchOperationStatus; - @doc("The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.") + /** + * The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + */ @visibility("read") installationActivityId?: string; - @doc("Describes whether the operation ran out of time before it completed all its intended actions") + /** + * Describes whether the operation ran out of time before it completed all its intended actions + */ @visibility("read") maintenanceWindowExceeded?: boolean; - @doc("The number of all available patches but not going to be installed because it didn't match a classification or inclusion list entry.") + /** + * The number of all available patches but not going to be installed because it didn't match a classification or inclusion list entry. + */ @visibility("read") notSelectedPatchCount?: int32; - @doc("The number of all available patches but excluded explicitly by a customer-specified exclusion list match.") + /** + * The number of all available patches but excluded explicitly by a customer-specified exclusion list match. + */ @visibility("read") excludedPatchCount?: int32; - @doc("The number of all available patches expected to be installed over the course of the patch installation operation.") + /** + * The number of all available patches expected to be installed over the course of the patch installation operation. + */ @visibility("read") pendingPatchCount?: int32; - @doc("The count of patches that successfully installed.") + /** + * The count of patches that successfully installed. + */ @visibility("read") installedPatchCount?: int32; - @doc("The count of patches that failed installation.") + /** + * The count of patches that failed installation. + */ @visibility("read") failedPatchCount?: int32; - @doc("The UTC timestamp when the operation began.") + /** + * The UTC timestamp when the operation began. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime?: utcDateTime; - @doc("The UTC timestamp when the operation began.") + /** + * The UTC timestamp when the operation began. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedTime?: utcDateTime; - @doc("The errors that were encountered during execution of the operation. The details array contains the list of them.") + /** + * The errors that were encountered during execution of the operation. The details array contains the list of them. + */ @visibility("read") error?: ApiError; } -@doc("Capture Virtual Machine parameters.") +/** + * Capture Virtual Machine parameters. + */ model VirtualMachineCaptureParameters { - @doc("The captured virtual hard disk's name prefix.") + /** + * The captured virtual hard disk's name prefix. + */ vhdPrefix: string; - @doc("The destination container name.") + /** + * The destination container name. + */ destinationContainerName: string; - @doc("Specifies whether to overwrite the destination virtual hard disk, in case of conflict.") + /** + * Specifies whether to overwrite the destination virtual hard disk, in case of conflict. + */ overwriteVhds: boolean; } -@doc("Output of virtual machine capture operation.") +/** + * Output of virtual machine capture operation. + */ model VirtualMachineCaptureResult extends SubResource { - @doc("the schema of the captured virtual machine") + /** + * the schema of the captured virtual machine + */ @visibility("read") @projectedName("json", "$schema") schema?: string; - @doc("the version of the content") + /** + * the version of the content + */ @visibility("read") contentVersion?: string; - @doc("parameters of the captured virtual machine") + /** + * parameters of the captured virtual machine + */ @visibility("read") parameters?: Record; - @doc("a list of resource items of the captured virtual machine") + /** + * a list of resource items of the captured virtual machine + */ @visibility("read") resources?: Record[]; } -@doc("Describes a Virtual Machine Update.") +/** + * Describes a Virtual Machine Update. + */ model VirtualMachineUpdate extends UpdateResource { - @doc("Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.") + /** + * Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. + */ plan?: Plan; - @doc("Describes the properties of a Virtual Machine.") + /** + * Describes the properties of a Virtual Machine. + */ properties?: VirtualMachineProperties; - @doc("The identity of the virtual machine, if configured.") + /** + * The identity of the virtual machine, if configured. + */ identity?: VirtualMachineIdentity; - @doc("The virtual machine zones.") + /** + * The virtual machine zones. + */ zones?: string[]; } -@doc("Describes the properties of an AssessPatches result.") +/** + * Describes the properties of an AssessPatches result. + */ model VirtualMachineAssessPatchesResult { - @doc("The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"") + /** + * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings." + */ @visibility("read") status?: PatchOperationStatus; - @doc("The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.") + /** + * The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + */ @visibility("read") assessmentActivityId?: string; - @doc("The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred.") + /** + * The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred. + */ @visibility("read") rebootPending?: boolean; - @doc("The number of critical or security patches that have been detected as available and not yet installed.") + /** + * The number of critical or security patches that have been detected as available and not yet installed. + */ @visibility("read") criticalAndSecurityPatchCount?: int32; - @doc("The number of all available patches excluding critical and security.") + /** + * The number of all available patches excluding critical and security. + */ @visibility("read") otherPatchCount?: int32; - @doc("The UTC timestamp when the operation began.") + /** + * The UTC timestamp when the operation began. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startDateTime?: utcDateTime; - @doc("The list of patches that have been detected as available for installation.") + /** + * The list of patches that have been detected as available for installation. + */ @visibility("read") availablePatches?: VirtualMachineSoftwarePatchProperties[]; - @doc("The errors that were encountered during execution of the operation. The details array contains the list of them.") + /** + * The errors that were encountered during execution of the operation. The details array contains the list of them. + */ @visibility("read") error?: ApiError; } -@doc("Describes the properties of a Virtual Machine software patch.") +/** + * Describes the properties of a Virtual Machine software patch. + */ model VirtualMachineSoftwarePatchProperties { - @doc("A unique identifier for the patch.") + /** + * A unique identifier for the patch. + */ @visibility("read") patchId?: string; - @doc("The friendly name of the patch.") + /** + * The friendly name of the patch. + */ @visibility("read") name?: string; - @doc("The version number of the patch. This property applies only to Linux patches.") + /** + * The version number of the patch. This property applies only to Linux patches. + */ @visibility("read") version?: string; - @doc("The KBID of the patch. Only applies to Windows patches.") + /** + * The KBID of the patch. Only applies to Windows patches. + */ @visibility("read") kbId?: string; - @doc("The classification(s) of the patch as provided by the patch publisher.") + /** + * The classification(s) of the patch as provided by the patch publisher. + */ @visibility("read") classifications?: string[]; - @doc("Describes the reboot requirements of the patch.") + /** + * Describes the reboot requirements of the patch. + */ @visibility("read") rebootBehavior?: VMGuestPatchRebootBehavior; - @doc("The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.") + /** + * The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + */ @visibility("read") activityId?: string; - @doc("The UTC timestamp when the repository published this patch.") + /** + * The UTC timestamp when the repository published this patch. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. publishedDate?: utcDateTime; - @doc("The UTC timestamp of the last update to this patch record.") + /** + * The UTC timestamp of the last update to this patch record. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedDateTime?: utcDateTime; - @doc("Describes the availability of a given patch.") + /** + * Describes the availability of a given patch. + */ @visibility("read") assessmentState?: PatchAssessmentState; } -@doc("Input for InstallPatches as directly received by the API") +/** + * Input for InstallPatches as directly received by the API + */ model VirtualMachineInstallPatchesParameters { - @doc("Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours)") + /** + * Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours) + */ maximumDuration?: duration; - @doc("Defines when it is acceptable to reboot a VM during a software update operation.") + /** + * Defines when it is acceptable to reboot a VM during a software update operation. + */ rebootSetting: VMGuestPatchRebootSetting; - @doc("Input for InstallPatches on a Windows VM, as directly received by the API") + /** + * Input for InstallPatches on a Windows VM, as directly received by the API + */ windowsParameters?: WindowsParameters; - @doc("Input for InstallPatches on a Linux VM, as directly received by the API") + /** + * Input for InstallPatches on a Linux VM, as directly received by the API + */ linuxParameters?: LinuxParameters; } -@doc("Input for InstallPatches on a Windows VM, as directly received by the API") +/** + * Input for InstallPatches on a Windows VM, as directly received by the API + */ model WindowsParameters { - @doc("The update classifications to select when installing patches for Windows.") + /** + * The update classifications to select when installing patches for Windows. + */ classificationsToInclude?: VMGuestPatchClassificationWindows[]; - @doc("Kbs to include in the patch operation") + /** + * Kbs to include in the patch operation + */ kbNumbersToInclude?: string[]; - @doc("Kbs to exclude in the patch operation") + /** + * Kbs to exclude in the patch operation + */ kbNumbersToExclude?: string[]; - @doc("Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true.") + /** + * Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true. + */ excludeKbsRequiringReboot?: boolean; - @doc("This is used to install patches that were published on or before this given max published date.") + /** + * This is used to install patches that were published on or before this given max published date. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. maxPatchPublishDate?: utcDateTime; } -@doc("Input for InstallPatches on a Linux VM, as directly received by the API") +/** + * Input for InstallPatches on a Linux VM, as directly received by the API + */ model LinuxParameters { - @doc("The update classifications to select when installing patches for Linux.") + /** + * The update classifications to select when installing patches for Linux. + */ classificationsToInclude?: VMGuestPatchClassificationLinux[]; - @doc("packages to include in the patch operation. Format: packageName_packageVersion") + /** + * packages to include in the patch operation. Format: packageName_packageVersion + */ packageNameMasksToInclude?: string[]; - @doc("packages to exclude in the patch operation. Format: packageName_packageVersion") + /** + * packages to exclude in the patch operation. Format: packageName_packageVersion + */ packageNameMasksToExclude?: string[]; - @doc("This is used as a maintenance run identifier for Auto VM Guest Patching in Linux.") + /** + * This is used as a maintenance run identifier for Auto VM Guest Patching in Linux. + */ maintenanceRunId?: string; } -@doc("The result summary of an installation operation.") +/** + * The result summary of an installation operation. + */ model VirtualMachineInstallPatchesResult { - @doc("The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Failed\", \"Succeeded\", \"Unknown\" or \"CompletedWithWarnings.\"") + /** + * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings." + */ @visibility("read") status?: PatchOperationStatus; - @doc("The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.") + /** + * The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs. + */ @visibility("read") installationActivityId?: string; - @doc("The reboot state of the VM following completion of the operation.") + /** + * The reboot state of the VM following completion of the operation. + */ @visibility("read") rebootStatus?: VMGuestPatchRebootStatus; - @doc("Whether the operation ran out of time before it completed all its intended actions.") + /** + * Whether the operation ran out of time before it completed all its intended actions. + */ @visibility("read") maintenanceWindowExceeded?: boolean; - @doc("The number of patches that were not installed due to the user blocking their installation.") + /** + * The number of patches that were not installed due to the user blocking their installation. + */ @visibility("read") excludedPatchCount?: int32; - @doc("The number of patches that were detected as available for install, but did not meet the operation's criteria.") + /** + * The number of patches that were detected as available for install, but did not meet the operation's criteria. + */ @visibility("read") notSelectedPatchCount?: int32; - @doc("The number of patches that were identified as meeting the installation criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true.") + /** + * The number of patches that were identified as meeting the installation criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true. + */ @visibility("read") pendingPatchCount?: int32; - @doc("The number of patches successfully installed.") + /** + * The number of patches successfully installed. + */ @visibility("read") installedPatchCount?: int32; - @doc("The number of patches that could not be installed due to some issue. See errors for details.") + /** + * The number of patches that could not be installed due to some issue. See errors for details. + */ @visibility("read") failedPatchCount?: int32; - @doc("The patches that were installed during the operation.") + /** + * The patches that were installed during the operation. + */ @visibility("read") patches?: PatchInstallationDetail[]; - @doc("The UTC timestamp when the operation began.") + /** + * The UTC timestamp when the operation began. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startDateTime?: utcDateTime; - @doc("The errors that were encountered during execution of the operation. The details array contains the list of them.") + /** + * The errors that were encountered during execution of the operation. The details array contains the list of them. + */ @visibility("read") error?: ApiError; } -@doc("Information about a specific patch that was encountered during an installation action.") +/** + * Information about a specific patch that was encountered during an installation action. + */ model PatchInstallationDetail { - @doc("A unique identifier for the patch.") + /** + * A unique identifier for the patch. + */ @visibility("read") patchId?: string; - @doc("The friendly name of the patch.") + /** + * The friendly name of the patch. + */ @visibility("read") name?: string; - @doc("The version string of the package. It may conform to Semantic Versioning. Only applies to Linux.") + /** + * The version string of the package. It may conform to Semantic Versioning. Only applies to Linux. + */ @visibility("read") version?: string; - @doc("The KBID of the patch. Only applies to Windows patches.") + /** + * The KBID of the patch. Only applies to Windows patches. + */ @visibility("read") kbId?: string; - @doc("The classification(s) of the patch as provided by the patch publisher.") + /** + * The classification(s) of the patch as provided by the patch publisher. + */ @visibility("read") classifications?: string[]; - @doc("The state of the patch after the installation operation completed.") + /** + * The state of the patch after the installation operation completed. + */ @visibility("read") installationState?: PatchInstallationState; } -@doc("Describes a Virtual Machine Image.") +/** + * Describes a Virtual Machine Image. + */ model VirtualMachineImage extends VirtualMachineImageResource { - @doc("Describes the properties of a Virtual Machine Image.") + /** + * Describes the properties of a Virtual Machine Image. + */ properties?: VirtualMachineImageProperties; } -@doc("Describes the properties of a Virtual Machine Image.") +/** + * Describes the properties of a Virtual Machine Image. + */ model VirtualMachineImageProperties { - @doc("Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.") + /** + * Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. + */ plan?: PurchasePlan; - @doc("Contains the os disk image information.") + /** + * Contains the os disk image information. + */ osDiskImage?: OSDiskImage; - @doc("The list of data disk images information.") + /** + * The list of data disk images information. + */ dataDiskImages?: DataDiskImage[]; - @doc("Describes automatic OS upgrade properties on the image.") + /** + * Describes automatic OS upgrade properties on the image. + */ automaticOSUpgradeProperties?: AutomaticOSUpgradeProperties; - @doc("Specifies the HyperVGeneration Type") + /** + * Specifies the HyperVGeneration Type + */ hyperVGeneration?: HyperVGenerationTypes; - @doc("Specifies disallowed configuration for the VirtualMachine created from the image") + /** + * Specifies disallowed configuration for the VirtualMachine created from the image + */ disallowed?: DisallowedConfiguration; features?: VirtualMachineImageFeature[]; - @doc("Specifies the Architecture Type") + /** + * Specifies the Architecture Type + */ architecture?: ArchitectureTypes; - @doc("Describes image deprecation status properties on the image.") + /** + * Describes image deprecation status properties on the image. + */ imageDeprecationStatus?: ImageDeprecationStatus; } -@doc("Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.") +/** + * Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. + */ model PurchasePlan { - @doc("The publisher ID.") + /** + * The publisher ID. + */ publisher: string; - @doc("The plan ID.") + /** + * The plan ID. + */ name: string; - @doc("Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.") + /** + * Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. + */ product: string; } -@doc("Contains the os disk image information.") +/** + * Contains the os disk image information. + */ model OSDiskImage { - @doc("The operating system of the osDiskImage.") + /** + * The operating system of the osDiskImage. + */ operatingSystem: OperatingSystemTypes; } -@doc("Contains the data disk images information.") +/** + * Contains the data disk images information. + */ model DataDiskImage { - @doc("Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.") + /** + * Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. + */ @visibility("read") lun?: int32; } -@doc("Describes automatic OS upgrade properties on the image.") +/** + * Describes automatic OS upgrade properties on the image. + */ model AutomaticOSUpgradeProperties { - @doc("Specifies whether automatic OS upgrade is supported on the image.") + /** + * Specifies whether automatic OS upgrade is supported on the image. + */ automaticOSUpgradeSupported: boolean; } -@doc("Specifies the disallowed configuration for a virtual machine image.") +/** + * Specifies the disallowed configuration for a virtual machine image. + */ model DisallowedConfiguration { - @doc("VM disk types which are disallowed.") + /** + * VM disk types which are disallowed. + */ vmDiskType?: VmDiskTypes; } -@doc("Specifies additional capabilities supported by the image") +/** + * Specifies additional capabilities supported by the image + */ model VirtualMachineImageFeature { - @doc("The name of the feature.") + /** + * The name of the feature. + */ name?: string; - @doc("The corresponding value for the feature.") + /** + * The corresponding value for the feature. + */ value?: string; } -@doc("Describes image deprecation status properties on the image.") +/** + * Describes image deprecation status properties on the image. + */ model ImageDeprecationStatus { - @doc("Describes the state of the image.") + /** + * Describes the state of the image. + */ imageState?: ImageState; - @doc("The time, in future, at which this image will be marked as deprecated. This scheduled time is chosen by the Publisher.") + /** + * The time, in future, at which this image will be marked as deprecated. This scheduled time is chosen by the Publisher. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. scheduledDeprecationTime?: utcDateTime; - @doc("Describes the alternative option specified by the Publisher for this image when this image is deprecated.") + /** + * Describes the alternative option specified by the Publisher for this image when this image is deprecated. + */ alternativeOption?: AlternativeOption; } -@doc("Describes the alternative option specified by the Publisher for this image when this image is deprecated.") +/** + * Describes the alternative option specified by the Publisher for this image when this image is deprecated. + */ model AlternativeOption { - @doc("Describes the type of the alternative option.") + /** + * Describes the type of the alternative option. + */ type?: AlternativeType; - @doc("Indicates the alternative option value specified by the Publisher. This is the Offer name when the type is Offer or the Plan name when the type is Plan.") + /** + * Indicates the alternative option value specified by the Publisher. This is the Offer name when the type is Offer or the Plan name when the type is Plan. + */ value?: string; } -@doc("Virtual machine image resource information.") +/** + * Virtual machine image resource information. + */ model VirtualMachineImageResource extends SubResource { - @doc("The name of the resource.") + /** + * The name of the resource. + */ name: string; - @doc("The supported Azure location of the resource.") + /** + * The supported Azure location of the resource. + */ location: string; - @doc("Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md).") + /** + * Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + */ tags?: Record; - @doc("The extended location of the Virtual Machine.") + /** + * The extended location of the Virtual Machine. + */ extendedLocation?: ExtendedLocation; } -@doc("The List VmImages in EdgeZone operation response.") +/** + * The List VmImages in EdgeZone operation response. + */ model VmImagesInEdgeZoneListResult { - @doc("The list of VMImages in EdgeZone") + /** + * The list of VMImages in EdgeZone + */ value?: VirtualMachineImageResource[]; - @doc("The URI to fetch the next page of VMImages in EdgeZone. Call ListNext() with this URI to fetch the next page of VmImages.") + /** + * The URI to fetch the next page of VMImages in EdgeZone. Call ListNext() with this URI to fetch the next page of VmImages. + */ nextLink?: string; } -@doc("Describes the properties of a Virtual Machine Extension Image.") +/** + * Describes the properties of a Virtual Machine Extension Image. + */ model VirtualMachineExtensionImageProperties { - @doc("The operating system this extension supports.") + /** + * The operating system this extension supports. + */ operatingSystem: string; - @doc("The type of role (IaaS or PaaS) this extension supports.") + /** + * The type of role (IaaS or PaaS) this extension supports. + */ computeRole: string; - @doc("The schema defined by publisher, where extension consumers should provide settings in a matching schema.") + /** + * The schema defined by publisher, where extension consumers should provide settings in a matching schema. + */ handlerSchema: string; - @doc("Whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable on scalesets, but there might be cases where a publisher wants to explicitly indicate the extension is only enabled for CRP VMs but not VMSS.") + /** + * Whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable on scalesets, but there might be cases where a publisher wants to explicitly indicate the extension is only enabled for CRP VMs but not VMSS. + */ vmScaleSetEnabled?: boolean; - @doc("Whether the handler can support multiple extensions.") + /** + * Whether the handler can support multiple extensions. + */ supportsMultipleExtensions?: boolean; } -@doc("The instance view of a resource.") +/** + * The instance view of a resource. + */ model AvailabilitySetProperties { - @doc("Update Domain count.") + /** + * Update Domain count. + */ platformUpdateDomainCount?: int32; - @doc("Fault Domain count.") + /** + * Fault Domain count. + */ platformFaultDomainCount?: int32; - @doc("A list of references to all virtual machines in the availability set.") + /** + * A list of references to all virtual machines in the availability set. + */ virtualMachines?: SubResource[]; - @doc("Specifies information about the proximity placement group that the availability set should be assigned to. Minimum api-version: 2018-04-01.") + /** + * Specifies information about the proximity placement group that the availability set should be assigned to. Minimum api-version: 2018-04-01. + */ proximityPlacementGroup?: SubResource; - @doc("The resource status information.") + /** + * The resource status information. + */ @visibility("read") statuses?: InstanceViewStatus[]; } -@doc("Specifies information about the availability set that the virtual machine should be assigned to. Only tags may be updated.") +/** + * Specifies information about the availability set that the virtual machine should be assigned to. Only tags may be updated. + */ model AvailabilitySetUpdate extends UpdateResource { - @doc("The instance view of a resource.") + /** + * The instance view of a resource. + */ properties?: AvailabilitySetProperties; - @doc("Sku of the availability set") + /** + * Sku of the availability set + */ sku?: Sku; } -@doc("Describes the properties of a Proximity Placement Group.") +/** + * Describes the properties of a Proximity Placement Group. + */ model ProximityPlacementGroupProperties { - @doc("Specifies the type of the proximity placement group. Possible values are: **Standard** : Co-locate resources within an Azure region or Availability Zone. **Ultra** : For future use.") + /** + * Specifies the type of the proximity placement group. Possible values are: **Standard** : Co-locate resources within an Azure region or Availability Zone. **Ultra** : For future use. + */ proximityPlacementGroupType?: ProximityPlacementGroupType; - @doc("A list of references to all virtual machines in the proximity placement group.") + /** + * A list of references to all virtual machines in the proximity placement group. + */ @visibility("read") virtualMachines?: SubResourceWithColocationStatus[]; - @doc("A list of references to all virtual machine scale sets in the proximity placement group.") + /** + * A list of references to all virtual machine scale sets in the proximity placement group. + */ @visibility("read") virtualMachineScaleSets?: SubResourceWithColocationStatus[]; - @doc("A list of references to all availability sets in the proximity placement group.") + /** + * A list of references to all availability sets in the proximity placement group. + */ @visibility("read") availabilitySets?: SubResourceWithColocationStatus[]; - @doc("Describes colocation status of the Proximity Placement Group.") + /** + * Describes colocation status of the Proximity Placement Group. + */ colocationStatus?: InstanceViewStatus; - @doc("Specifies the user intent of the proximity placement group.") + /** + * Specifies the user intent of the proximity placement group. + */ intent?: ProximityPlacementGroupPropertiesIntent; } model SubResourceWithColocationStatus extends SubResource { - @doc("Describes colocation status of a resource in the Proximity Placement Group.") + /** + * Describes colocation status of a resource in the Proximity Placement Group. + */ colocationStatus?: InstanceViewStatus; } -@doc("Specifies the user intent of the proximity placement group.") +/** + * Specifies the user intent of the proximity placement group. + */ model ProximityPlacementGroupPropertiesIntent { - @doc("Specifies possible sizes of virtual machines that can be created in the proximity placement group.") + /** + * Specifies possible sizes of virtual machines that can be created in the proximity placement group. + */ vmSizes?: string[]; } -@doc("Specifies information about the proximity placement group.") +/** + * Specifies information about the proximity placement group. + */ model ProximityPlacementGroupUpdate extends UpdateResource {} -@doc("Dedicated Host Group Properties.") +/** + * Dedicated Host Group Properties. + */ model DedicatedHostGroupProperties { - @doc("Number of fault domains that the host group can span.") + /** + * Number of fault domains that the host group can span. + */ @minValue(1) platformFaultDomainCount: int32; - @doc("A list of references to all dedicated hosts in the dedicated host group.") + /** + * A list of references to all dedicated hosts in the dedicated host group. + */ @visibility("read") hosts?: SubResourceReadOnly[]; - @doc("The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group.") + /** + * The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group. + */ @visibility("read") instanceView?: DedicatedHostGroupInstanceView; - @doc("Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. Minimum api-version: 2020-06-01.") + /** + * Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. Minimum api-version: 2020-06-01. + */ supportAutomaticPlacement?: boolean; - @doc("Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01.") + /** + * Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01. + */ additionalCapabilities?: DedicatedHostGroupPropertiesAdditionalCapabilities; } model DedicatedHostGroupInstanceView { - @doc("List of instance view of the dedicated hosts under the dedicated host group.") + /** + * List of instance view of the dedicated hosts under the dedicated host group. + */ hosts?: DedicatedHostInstanceViewWithName[]; } -@doc("The instance view of a dedicated host that includes the name of the dedicated host. It is used for the response to the instance view of a dedicated host group.") +/** + * The instance view of a dedicated host that includes the name of the dedicated host. It is used for the response to the instance view of a dedicated host group. + */ model DedicatedHostInstanceViewWithName extends DedicatedHostInstanceView { - @doc("The name of the dedicated host.") + /** + * The name of the dedicated host. + */ @visibility("read") name?: string; } -@doc("The instance view of a dedicated host.") +/** + * The instance view of a dedicated host. + */ model DedicatedHostInstanceView { - @doc("Specifies the unique id of the dedicated physical machine on which the dedicated host resides.") + /** + * Specifies the unique id of the dedicated physical machine on which the dedicated host resides. + */ @visibility("read") assetId?: string; - @doc("Unutilized capacity of the dedicated host.") + /** + * Unutilized capacity of the dedicated host. + */ availableCapacity?: DedicatedHostAvailableCapacity; - @doc("The resource status information.") + /** + * The resource status information. + */ statuses?: InstanceViewStatus[]; } -@doc("Dedicated host unutilized capacity.") +/** + * Dedicated host unutilized capacity. + */ model DedicatedHostAvailableCapacity { - @doc("The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the dedicated host.") + /** + * The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the dedicated host. + */ allocatableVMs?: DedicatedHostAllocatableVM[]; } -@doc("Represents the dedicated host unutilized capacity in terms of a specific VM size.") +/** + * Represents the dedicated host unutilized capacity in terms of a specific VM size. + */ model DedicatedHostAllocatableVM { - @doc("VM size in terms of which the unutilized capacity is represented.") + /** + * VM size in terms of which the unutilized capacity is represented. + */ vmSize?: string; - @doc("Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity.") - count?: float32; + /** + * Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity. + */ + count?: float64; } -@doc("Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01.") +/** + * Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01. + */ model DedicatedHostGroupPropertiesAdditionalCapabilities { - @doc("The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature. **Note:** The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal. Minimum api-version: 2022-03-01.") + /** + * The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature. **Note:** The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal. Minimum api-version: 2022-03-01. + */ ultraSSDEnabled?: boolean; } -@doc("Specifies information about the dedicated host group that the dedicated host should be assigned to. Only tags may be updated.") +/** + * Specifies information about the dedicated host group that the dedicated host should be assigned to. Only tags may be updated. + */ model DedicatedHostGroupUpdate extends UpdateResource { - @doc("Dedicated Host Group Properties.") + /** + * Dedicated Host Group Properties. + */ properties?: DedicatedHostGroupProperties; - @doc("Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone.") + /** + * Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. + */ zones?: string[]; } -@doc("Properties of the dedicated host.") +/** + * Properties of the dedicated host. + */ model DedicatedHostProperties { - @doc("Fault domain of the dedicated host within a dedicated host group.") + /** + * Fault domain of the dedicated host within a dedicated host group. + */ platformFaultDomain?: int32; - @doc("Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided.") + /** + * Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided. + */ autoReplaceOnFailure?: boolean; - @doc("A unique id generated and assigned to the dedicated host by the platform. Does not change throughout the lifetime of the host.") + /** + * A unique id generated and assigned to the dedicated host by the platform. Does not change throughout the lifetime of the host. + */ @visibility("read") hostId?: string; - @doc("A list of references to all virtual machines in the Dedicated Host.") + /** + * A list of references to all virtual machines in the Dedicated Host. + */ @visibility("read") virtualMachines?: SubResourceReadOnly[]; - @doc("Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.** The default value is: **None.**") + /** + * Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.** The default value is: **None.** + */ licenseType?: DedicatedHostLicenseTypes; - @doc("The date when the host was first provisioned.") + /** + * The date when the host was first provisioned. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. provisioningTime?: utcDateTime; - @doc("The provisioning state, which only appears in the response.") + /** + * The provisioning state, which only appears in the response. + */ @visibility("read") provisioningState?: string; - @doc("The dedicated host instance view.") + /** + * The dedicated host instance view. + */ @visibility("read") instanceView?: DedicatedHostInstanceView; - @doc("Specifies the time at which the Dedicated Host resource was created. Minimum api-version: 2021-11-01.") + /** + * Specifies the time at which the Dedicated Host resource was created. Minimum api-version: 2021-11-01. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timeCreated?: utcDateTime; } -@doc("Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated.") +/** + * Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated. + */ model DedicatedHostUpdate extends UpdateResource { - @doc("Properties of the dedicated host.") + /** + * Properties of the dedicated host. + */ properties?: DedicatedHostProperties; - @doc("[List all available dedicated host sizes for resizing] (https://docs.microsoft.com/rest/api/compute/dedicated-hosts/listavailablesizes). Resizing can be only used to scale up DedicatedHost. Only name is required to be set. ") + /** + * [List all available dedicated host sizes for resizing] (https://docs.microsoft.com/rest/api/compute/dedicated-hosts/listavailablesizes). Resizing can be only used to scale up DedicatedHost. Only name is required to be set. + */ sku?: Sku; } -@doc("The List Dedicated Host sizes operation response.") +/** + * The List Dedicated Host sizes operation response. + */ @pagedResult model DedicatedHostSizeListResult { - @doc("The list of dedicated host sizes.") + /** + * The list of dedicated host sizes. + */ @items value?: string[]; } -@doc("Properties of the SSH public key.") +/** + * Properties of the SSH public key. + */ model SshPublicKeyResourceProperties { - @doc("SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.") + /** + * SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format. + */ publicKey?: string; } -@doc("Specifies information about the SSH public key.") +/** + * Specifies information about the SSH public key. + */ model SshPublicKeyUpdateResource extends UpdateResource { - @doc("Properties of the SSH public key.") + /** + * Properties of the SSH public key. + */ properties?: SshPublicKeyResourceProperties; } -@doc("Response from generation of an SSH key pair.") +/** + * Response from generation of an SSH key pair. + */ model SshPublicKeyGenerateKeyPairResult { - @doc("Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret.") + /** + * Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret. + */ privateKey: string; - @doc("Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format.") + /** + * Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format. + */ publicKey: string; - @doc("The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName}") + /** + * The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName} + */ id: string; } -@doc("Describes the properties of an Image.") +/** + * Describes the properties of an Image. + */ model ImageProperties { - @doc("The source virtual machine from which Image is created.") + /** + * The source virtual machine from which Image is created. + */ sourceVirtualMachine?: SubResource; - @doc("Specifies the storage settings for the virtual machine disks.") + /** + * Specifies the storage settings for the virtual machine disks. + */ storageProfile?: ImageStorageProfile; - @doc("The provisioning state.") + /** + * The provisioning state. + */ @visibility("read") provisioningState?: string; - @doc("Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.") + /** + * Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource. + */ hyperVGeneration?: HyperVGenerationTypes; } -@doc("Describes a storage profile.") +/** + * Describes a storage profile. + */ model ImageStorageProfile { - @doc("Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).") + /** + * Specifies information about the operating system disk used by the virtual machine.

    For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + */ osDisk?: ImageOSDisk; - @doc("Specifies the parameters that are used to add a data disk to a virtual machine.

    For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).") + /** + * Specifies the parameters that are used to add a data disk to a virtual machine.

    For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview). + */ dataDisks?: ImageDataDisk[]; - @doc("Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).") + /** + * Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS). + */ zoneResilient?: boolean; } -@doc("Describes an Operating System disk.") +/** + * Describes an Operating System disk. + */ model ImageOSDisk extends ImageDisk { - @doc("This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: **Windows,** **Linux.**") + /** + * This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: **Windows,** **Linux.** + */ osType: OperatingSystemTypes; - @doc("The OS State. For managed images, use Generalized.") + /** + * The OS State. For managed images, use Generalized. + */ osState: OperatingSystemStateTypes; } -@doc("Describes a image disk.") +/** + * Describes a image disk. + */ model ImageDisk { - @doc("The snapshot.") + /** + * The snapshot. + */ snapshot?: SubResource; - @doc("The managedDisk.") + /** + * The managedDisk. + */ managedDisk?: SubResource; - @doc("The Virtual Hard Disk.") + /** + * The Virtual Hard Disk. + */ blobUri?: string; - @doc("Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**") + /** + * Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.** + */ caching?: CachingTypes; - @doc("Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.") + /** + * Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB. + */ diskSizeGB?: int32; - @doc("Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.") + /** + * Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. + */ storageAccountType?: StorageAccountTypes; - @doc("Specifies the customer managed disk encryption set resource id for the managed image disk.") + /** + * Specifies the customer managed disk encryption set resource id for the managed image disk. + */ diskEncryptionSet?: DiskEncryptionSetParameters; } -@doc("Describes a data disk.") +/** + * Describes a data disk. + */ model ImageDataDisk extends ImageDisk { - @doc("Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.") + /** + * Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. + */ lun: int32; } -@doc("The source user image virtual hard disk. Only tags may be updated.") +/** + * The source user image virtual hard disk. Only tags may be updated. + */ model ImageUpdate extends UpdateResource { - @doc("Describes the properties of an Image.") + /** + * Describes the properties of an Image. + */ properties?: ImageProperties; } -@doc("The restore point collection properties.") +/** + * The restore point collection properties. + */ model RestorePointCollectionProperties { - @doc("The properties of the source resource that this restore point collection is created from.") + /** + * The properties of the source resource that this restore point collection is created from. + */ source?: RestorePointCollectionSourceProperties; - @doc("The provisioning state of the restore point collection.") + /** + * The provisioning state of the restore point collection. + */ @visibility("read") provisioningState?: string; - @doc("The unique id of the restore point collection.") + /** + * The unique id of the restore point collection. + */ @visibility("read") restorePointCollectionId?: string; - @doc("A list containing all restore points created under this restore point collection.") + /** + * A list containing all restore points created under this restore point collection. + */ @visibility("read") restorePoints?: RestorePoint[]; } -@doc("The properties of the source resource that this restore point collection is created from.") +/** + * The properties of the source resource that this restore point collection is created from. + */ model RestorePointCollectionSourceProperties { - @doc("Location of the source resource used to create this restore point collection.") + /** + * Location of the source resource used to create this restore point collection. + */ @visibility("read") location?: string; - @doc("Resource Id of the source resource used to create this restore point collection") + /** + * Resource Id of the source resource used to create this restore point collection + */ id?: string; } -@doc("The restore point properties.") +/** + * The restore point properties. + */ model RestorePointProperties { - @doc("List of disk resource ids that the customer wishes to exclude from the restore point. If no disks are specified, all disks will be included.") + /** + * List of disk resource ids that the customer wishes to exclude from the restore point. If no disks are specified, all disks will be included. + */ excludeDisks?: ApiEntityReference[]; - @doc("Gets the details of the VM captured at the time of the restore point creation.") + /** + * Gets the details of the VM captured at the time of the restore point creation. + */ sourceMetadata?: RestorePointSourceMetadata; - @doc("Gets the provisioning state of the restore point.") + /** + * Gets the provisioning state of the restore point. + */ @visibility("read") provisioningState?: string; - @doc("ConsistencyMode of the RestorePoint. Can be specified in the input while creating a restore point. For now, only CrashConsistent is accepted as a valid input. Please refer to https://aka.ms/RestorePoints for more details.") + /** + * ConsistencyMode of the RestorePoint. Can be specified in the input while creating a restore point. For now, only CrashConsistent is accepted as a valid input. Please refer to https://aka.ms/RestorePoints for more details. + */ consistencyMode?: ConsistencyModeTypes; - @doc("Gets the creation time of the restore point.") + /** + * Gets the creation time of the restore point. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timeCreated?: utcDateTime; - @doc("Resource Id of the source restore point from which a copy needs to be created.") + /** + * Resource Id of the source restore point from which a copy needs to be created. + */ sourceRestorePoint?: ApiEntityReference; - @doc("The restore point instance view.") + /** + * The restore point instance view. + */ @visibility("read") instanceView?: RestorePointInstanceView; } -@doc("Describes the properties of the Virtual Machine for which the restore point was created. The properties provided are a subset and the snapshot of the overall Virtual Machine properties captured at the time of the restore point creation.") +/** + * Describes the properties of the Virtual Machine for which the restore point was created. The properties provided are a subset and the snapshot of the overall Virtual Machine properties captured at the time of the restore point creation. + */ model RestorePointSourceMetadata { - @doc("Gets the hardware profile.") + /** + * Gets the hardware profile. + */ @visibility("read") hardwareProfile?: HardwareProfile; - @doc("Gets the storage profile.") + /** + * Gets the storage profile. + */ storageProfile?: RestorePointSourceVMStorageProfile; - @doc("Gets the OS profile.") + /** + * Gets the OS profile. + */ @visibility("read") osProfile?: OSProfile; - @doc("Gets the diagnostics profile.") + /** + * Gets the diagnostics profile. + */ @visibility("read") diagnosticsProfile?: DiagnosticsProfile; - @doc("Gets the license type, which is for bring your own license scenario.") + /** + * Gets the license type, which is for bring your own license scenario. + */ @visibility("read") licenseType?: string; - @doc("Gets the virtual machine unique id.") + /** + * Gets the virtual machine unique id. + */ @visibility("read") vmId?: string; - @doc("Gets the security profile.") + /** + * Gets the security profile. + */ @visibility("read") securityProfile?: SecurityProfile; - @doc("Location of the VM from which the restore point was created.") + /** + * Location of the VM from which the restore point was created. + */ @visibility("read") location?: string; - @doc("UserData associated with the source VM for which restore point is captured, which is a base-64 encoded value.") + /** + * UserData associated with the source VM for which restore point is captured, which is a base-64 encoded value. + */ @visibility("read") userData?: string; - @doc("HyperVGeneration of the source VM for which restore point is captured.") + /** + * HyperVGeneration of the source VM for which restore point is captured. + */ @visibility("read") hyperVGeneration?: HyperVGenerationTypes; } -@doc("Describes the storage profile.") +/** + * Describes the storage profile. + */ model RestorePointSourceVMStorageProfile { - @doc("Gets the OS disk of the VM captured at the time of the restore point creation.") + /** + * Gets the OS disk of the VM captured at the time of the restore point creation. + */ osDisk?: RestorePointSourceVmosDisk; - @doc("Gets the data disks of the VM captured at the time of the restore point creation.") + /** + * Gets the data disks of the VM captured at the time of the restore point creation. + */ @projectedName("json", "dataDisks") dataDiskList?: RestorePointSourceVMDataDisk[]; } -@doc("Describes an Operating System disk.") +/** + * Describes an Operating System disk. + */ model RestorePointSourceVmosDisk { - @doc("Gets the Operating System type.") + /** + * Gets the Operating System type. + */ @visibility("read") osType?: OperatingSystemType; - @doc("Gets the disk encryption settings.") + /** + * Gets the disk encryption settings. + */ @visibility("read") encryptionSettings?: DiskEncryptionSettings; - @doc("Gets the disk name.") + /** + * Gets the disk name. + */ @visibility("read") name?: string; - @doc("Gets the caching type.") + /** + * Gets the caching type. + */ @visibility("read") caching?: CachingTypes; - @doc("Gets the disk size in GB.") + /** + * Gets the disk size in GB. + */ @visibility("read") diskSizeGB?: int32; - @doc("Gets the managed disk details") + /** + * Gets the managed disk details + */ managedDisk?: ManagedDiskParameters; - @doc("Contains Disk Restore Point properties.") + /** + * Contains Disk Restore Point properties. + */ diskRestorePoint?: DiskRestorePointAttributes; - @doc("Shows true if the disk is write-accelerator enabled.") + /** + * Shows true if the disk is write-accelerator enabled. + */ @visibility("read") writeAcceleratorEnabled?: boolean; } -@doc("Disk Restore Point details.") +/** + * Disk Restore Point details. + */ model DiskRestorePointAttributes extends SubResourceReadOnly { - @doc("Encryption at rest settings for disk restore point. It is an optional property that can be specified in the input while creating a restore point.") + /** + * Encryption at rest settings for disk restore point. It is an optional property that can be specified in the input while creating a restore point. + */ encryption?: RestorePointEncryption; - @doc("Resource Id of the source disk restore point.") + /** + * Resource Id of the source disk restore point. + */ sourceDiskRestorePoint?: ApiEntityReference; } -@doc("Encryption at rest settings for disk restore point. It is an optional property that can be specified in the input while creating a restore point.") +/** + * Encryption at rest settings for disk restore point. It is an optional property that can be specified in the input while creating a restore point. + */ model RestorePointEncryption { - @doc("Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. **Note:** The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.") + /** + * Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. **Note:** The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details. + */ diskEncryptionSet?: DiskEncryptionSetParameters; - @doc("The type of key used to encrypt the data of the disk restore point.") + /** + * The type of key used to encrypt the data of the disk restore point. + */ type?: RestorePointEncryptionType; } -@doc("Describes a data disk.") +/** + * Describes a data disk. + */ model RestorePointSourceVMDataDisk { - @doc("Gets the logical unit number.") + /** + * Gets the logical unit number. + */ @visibility("read") lun?: int32; - @doc("Gets the disk name.") + /** + * Gets the disk name. + */ @visibility("read") name?: string; - @doc("Gets the caching type.") + /** + * Gets the caching type. + */ @visibility("read") caching?: CachingTypes; - @doc("Gets the initial disk size in GB for blank data disks, and the new desired size for existing OS and Data disks.") + /** + * Gets the initial disk size in GB for blank data disks, and the new desired size for existing OS and Data disks. + */ @visibility("read") diskSizeGB?: int32; - @doc("Contains the managed disk details.") + /** + * Contains the managed disk details. + */ managedDisk?: ManagedDiskParameters; - @doc("Contains Disk Restore Point properties.") + /** + * Contains Disk Restore Point properties. + */ diskRestorePoint?: DiskRestorePointAttributes; - @doc("Shows true if the disk is write-accelerator enabled.") + /** + * Shows true if the disk is write-accelerator enabled. + */ @visibility("read") writeAcceleratorEnabled?: boolean; } -@doc("The instance view of a restore point.") +/** + * The instance view of a restore point. + */ model RestorePointInstanceView { - @doc("The disk restore points information.") + /** + * The disk restore points information. + */ diskRestorePoints?: DiskRestorePointInstanceView[]; - @doc("The resource status information.") + /** + * The resource status information. + */ statuses?: InstanceViewStatus[]; } -@doc("The instance view of a disk restore point.") +/** + * The instance view of a disk restore point. + */ model DiskRestorePointInstanceView { - @doc("Disk restore point Id.") + /** + * Disk restore point Id. + */ id?: string; - @doc("The disk restore point replication status information.") + /** + * The disk restore point replication status information. + */ replicationStatus?: DiskRestorePointReplicationStatus; } -@doc("The instance view of a disk restore point.") +/** + * The instance view of a disk restore point. + */ model DiskRestorePointReplicationStatus { - @doc("The resource status information.") + /** + * The resource status information. + */ status?: InstanceViewStatus; - @doc("Replication completion percentage.") + /** + * Replication completion percentage. + */ completionPercent?: int32; } -@doc("Update Restore Point collection parameters.") +/** + * Update Restore Point collection parameters. + */ model RestorePointCollectionUpdate extends UpdateResource { - @doc("The restore point collection properties.") + /** + * The restore point collection properties. + */ properties?: RestorePointCollectionProperties; } -@doc("capacity reservation group Properties.") +/** + * capacity reservation group Properties. + */ model CapacityReservationGroupProperties { - @doc("A list of all capacity reservation resource ids that belong to capacity reservation group.") + /** + * A list of all capacity reservation resource ids that belong to capacity reservation group. + */ @visibility("read") capacityReservations?: SubResourceReadOnly[]; - @doc("A list of references to all virtual machines associated to the capacity reservation group.") + /** + * A list of references to all virtual machines associated to the capacity reservation group. + */ @visibility("read") virtualMachinesAssociated?: SubResourceReadOnly[]; - @doc("The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group.") + /** + * The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group. + */ @visibility("read") instanceView?: CapacityReservationGroupInstanceView; } model CapacityReservationGroupInstanceView { - @doc("List of instance view of the capacity reservations under the capacity reservation group.") + /** + * List of instance view of the capacity reservations under the capacity reservation group. + */ @visibility("read") capacityReservations?: CapacityReservationInstanceViewWithName[]; } -@doc("The instance view of a capacity reservation that includes the name of the capacity reservation. It is used for the response to the instance view of a capacity reservation group.") +/** + * The instance view of a capacity reservation that includes the name of the capacity reservation. It is used for the response to the instance view of a capacity reservation group. + */ model CapacityReservationInstanceViewWithName extends CapacityReservationInstanceView { - @doc("The name of the capacity reservation.") + /** + * The name of the capacity reservation. + */ @visibility("read") name?: string; } -@doc("The instance view of a capacity reservation that provides as snapshot of the runtime properties of the capacity reservation that is managed by the platform and can change outside of control plane operations.") +/** + * The instance view of a capacity reservation that provides as snapshot of the runtime properties of the capacity reservation that is managed by the platform and can change outside of control plane operations. + */ model CapacityReservationInstanceView { - @doc("Unutilized capacity of the capacity reservation.") + /** + * Unutilized capacity of the capacity reservation. + */ utilizationInfo?: CapacityReservationUtilization; - @doc("The resource status information.") + /** + * The resource status information. + */ statuses?: InstanceViewStatus[]; } -@doc("Represents the capacity reservation utilization in terms of resources allocated.") +/** + * Represents the capacity reservation utilization in terms of resources allocated. + */ model CapacityReservationUtilization { - @doc("The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed. Minimum api-version: 2022-08-01.") + /** + * The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed. Minimum api-version: 2022-08-01. + */ @visibility("read") currentCapacity?: int32; - @doc("A list of all virtual machines resource ids allocated against the capacity reservation.") + /** + * A list of all virtual machines resource ids allocated against the capacity reservation. + */ @visibility("read") virtualMachinesAllocated?: SubResourceReadOnly[]; } -@doc("Specifies information about the capacity reservation group. Only tags can be updated.") +/** + * Specifies information about the capacity reservation group. Only tags can be updated. + */ model CapacityReservationGroupUpdate extends UpdateResource { - @doc("capacity reservation group Properties.") + /** + * capacity reservation group Properties. + */ properties?: CapacityReservationGroupProperties; } -@doc("Properties of the Capacity reservation.") +/** + * Properties of the Capacity reservation. + */ model CapacityReservationProperties { - @doc("A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource.") + /** + * A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource. + */ @visibility("read") reservationId?: string; - @doc("Specifies the value of fault domain count that Capacity Reservation supports for requested VM size. **Note:** The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation. Minimum api-version: 2022-08-01.") + /** + * Specifies the value of fault domain count that Capacity Reservation supports for requested VM size. **Note:** The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation. Minimum api-version: 2022-08-01. + */ @visibility("read") platformFaultDomainCount?: int32; - @doc("A list of all virtual machine resource ids that are associated with the capacity reservation.") + /** + * A list of all virtual machine resource ids that are associated with the capacity reservation. + */ @visibility("read") virtualMachinesAssociated?: SubResourceReadOnly[]; - @doc("The date time when the capacity reservation was last updated.") + /** + * The date time when the capacity reservation was last updated. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. provisioningTime?: utcDateTime; - @doc("The provisioning state, which only appears in the response.") + /** + * The provisioning state, which only appears in the response. + */ @visibility("read") provisioningState?: string; - @doc("The Capacity reservation instance view.") + /** + * The Capacity reservation instance view. + */ @visibility("read") instanceView?: CapacityReservationInstanceView; - @doc("Specifies the time at which the Capacity Reservation resource was created. Minimum api-version: 2021-11-01.") + /** + * Specifies the time at which the Capacity Reservation resource was created. Minimum api-version: 2021-11-01. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timeCreated?: utcDateTime; } -@doc("Specifies information about the capacity reservation. Only tags and sku.capacity can be updated.") +/** + * Specifies information about the capacity reservation. Only tags and sku.capacity can be updated. + */ model CapacityReservationUpdate extends UpdateResource { - @doc("Properties of the Capacity reservation.") + /** + * Properties of the Capacity reservation. + */ properties?: CapacityReservationProperties; - @doc("SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.") + /** + * SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values. + */ sku?: Sku; } -@doc("Api request input for LogAnalytics getRequestRateByInterval Api.") +/** + * Api request input for LogAnalytics getRequestRateByInterval Api. + */ model RequestRateByIntervalInput extends LogAnalyticsInputBase { - @doc("Interval value in minutes used to create LogAnalytics call rate logs.") + /** + * Interval value in minutes used to create LogAnalytics call rate logs. + */ intervalLength: IntervalInMins; } -@doc("Api input base class for LogAnalytics Api.") +/** + * Api input base class for LogAnalytics Api. + */ model LogAnalyticsInputBase { - @doc("SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.") + /** + * SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to. + */ blobContainerSasUri: string; - @doc("From time of the query") + /** + * From time of the query + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. fromTime: utcDateTime; - @doc("To time of the query") + /** + * To time of the query + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. toTime: utcDateTime; - @doc("Group query result by Throttle Policy applied.") + /** + * Group query result by Throttle Policy applied. + */ groupByThrottlePolicy?: boolean; - @doc("Group query result by Operation Name.") + /** + * Group query result by Operation Name. + */ groupByOperationName?: boolean; - @doc("Group query result by Resource Name.") + /** + * Group query result by Resource Name. + */ groupByResourceName?: boolean; - @doc("Group query result by Client Application ID.") + /** + * Group query result by Client Application ID. + */ groupByClientApplicationId?: boolean; - @doc("Group query result by User Agent.") + /** + * Group query result by User Agent. + */ groupByUserAgent?: boolean; } -@doc("LogAnalytics operation status response") +/** + * LogAnalytics operation status response + */ model LogAnalyticsOperationResult { - @doc("LogAnalyticsOutput") + /** + * LogAnalyticsOutput + */ @visibility("read") properties?: LogAnalyticsOutput; } -@doc("LogAnalytics output properties") +/** + * LogAnalytics output properties + */ model LogAnalyticsOutput { - @doc("Output file Uri path to blob container.") + /** + * Output file Uri path to blob container. + */ @visibility("read") output?: string; } -@doc("Api request input for LogAnalytics getThrottledRequests Api.") +/** + * Api request input for LogAnalytics getThrottledRequests Api. + */ model ThrottledRequestsInput extends LogAnalyticsInputBase {} -@doc("Describes the properties of a Run Command metadata.") +/** + * Describes the properties of a Run Command metadata. + */ model RunCommandDocumentBase { - @doc("The VM run command schema.") + /** + * The VM run command schema. + */ @projectedName("json", "$schema") schema: string; - @doc("The VM run command id.") + /** + * The VM run command id. + */ id: string; - @doc("The Operating System type.") + /** + * The Operating System type. + */ osType: OperatingSystemTypes; - @doc("The VM run command label.") + /** + * The VM run command label. + */ label: string; - @doc("The VM run command description.") + /** + * The VM run command description. + */ description: string; } -@doc("Describes the properties of a Run Command.") +/** + * Describes the properties of a Run Command. + */ model RunCommandDocument extends RunCommandDocumentBase { - @doc("The script to be executed.") + /** + * The script to be executed. + */ script: string[]; - @doc("The parameters used by the script.") + /** + * The parameters used by the script. + */ parameters?: RunCommandParameterDefinition[]; } -@doc("Describes the properties of a run command parameter.") +/** + * Describes the properties of a run command parameter. + */ model RunCommandParameterDefinition { - @doc("The run command parameter name.") + /** + * The run command parameter name. + */ name: string; - @doc("The run command parameter type.") + /** + * The run command parameter type. + */ type: string; - @doc("The run command parameter default value.") + /** + * The run command parameter default value. + */ defaultValue?: string; - @doc("The run command parameter required.") + /** + * The run command parameter required. + */ required?: boolean; } -@doc("Capture Virtual Machine parameters.") +/** + * Capture Virtual Machine parameters. + */ model RunCommandInput { - @doc("The run command id.") + /** + * The run command id. + */ commandId: string; - @doc("Optional. The script to be executed. When this value is given, the given script will override the default script of the command.") + /** + * Optional. The script to be executed. When this value is given, the given script will override the default script of the command. + */ script?: string[]; - @doc("The run command parameters.") + /** + * The run command parameters. + */ parameters?: RunCommandInputParameter[]; } -@doc("Describes the properties of a run command parameter.") +/** + * Describes the properties of a run command parameter. + */ model RunCommandInputParameter { - @doc("The run command parameter name.") + /** + * The run command parameter name. + */ name: string; - @doc("The run command parameter value.") + /** + * The run command parameter value. + */ value: string; } model RunCommandResult { - @doc("Run command operation response.") + /** + * Run command operation response. + */ value?: InstanceViewStatus[]; } -@doc("Describes the properties of a Virtual Machine run command.") +/** + * Describes the properties of a Virtual Machine run command. + */ model VirtualMachineRunCommandProperties { - @doc("The source of the run command script.") + /** + * The source of the run command script. + */ source?: VirtualMachineRunCommandScriptSource; - @doc("The parameters used by the script.") + /** + * The parameters used by the script. + */ parameters?: RunCommandInputParameter[]; - @doc("The parameters used by the script.") + /** + * The parameters used by the script. + */ protectedParameters?: RunCommandInputParameter[]; - @doc("Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.") + /** + * Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete. + */ asyncExecution?: boolean; - @doc("Specifies the user account on the VM when executing the run command.") + /** + * Specifies the user account on the VM when executing the run command. + */ runAsUser?: string; - @doc("Specifies the user account password on the VM when executing the run command.") + /** + * Specifies the user account password on the VM when executing the run command. + */ runAsPassword?: string; - @doc("The timeout in seconds to execute the run command.") + /** + * The timeout in seconds to execute the run command. + */ timeoutInSeconds?: int32; - @doc("Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. ") + /** + * Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter. + */ outputBlobUri?: string; - @doc("Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter.") + /** + * Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter. + */ errorBlobUri?: string; - @doc("User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged ") + /** + * User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged + */ outputBlobManagedIdentity?: RunCommandManagedIdentity; - @doc("User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged ") + /** + * User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged + */ errorBlobManagedIdentity?: RunCommandManagedIdentity; - @doc("The provisioning state, which only appears in the response. If treatFailureAsDeploymentFailure set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If treatFailureAsDeploymentFailure set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results ") + /** + * The provisioning state, which only appears in the response. If treatFailureAsDeploymentFailure set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If treatFailureAsDeploymentFailure set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results + */ @visibility("read") provisioningState?: string; - @doc("The virtual machine run command instance view.") + /** + * The virtual machine run command instance view. + */ @visibility("read") instanceView?: VirtualMachineRunCommandInstanceView; - @doc("Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results ") + /** + * Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results + */ treatFailureAsDeploymentFailure?: boolean; } -@doc("Describes the script sources for run command. Use only one of script, scriptUri, commandId.") +/** + * Describes the script sources for run command. Use only one of script, scriptUri, commandId. + */ model VirtualMachineRunCommandScriptSource { - @doc("Specifies the script content to be executed on the VM.") + /** + * Specifies the script content to be executed on the VM. + */ script?: string; - @doc("Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.") + /** + * Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI. + */ scriptUri?: string; - @doc("Specifies a commandId of predefined built-in script.") + /** + * Specifies a commandId of predefined built-in script. + */ commandId?: string; - @doc("User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged.") + /** + * User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + */ scriptUriManagedIdentity?: RunCommandManagedIdentity; } -@doc(" Contains clientId or objectId (use only one, not both) of a user-assigned managed identity that has access to storage blob used in Run Command. Use an empty RunCommandManagedIdentity object in case of system-assigned identity. Make sure the Azure storage blob exists in case of scriptUri, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment with scriptUri blob and 'Storage Blob Data Contributor' for Append blobs(outputBlobUri, errorBlobUri). In case of user assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged.") +/** + * Contains clientId or objectId (use only one, not both) of a user-assigned managed identity that has access to storage blob used in Run Command. Use an empty RunCommandManagedIdentity object in case of system-assigned identity. Make sure the Azure storage blob exists in case of scriptUri, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment with scriptUri blob and 'Storage Blob Data Contributor' for Append blobs(outputBlobUri, errorBlobUri). In case of user assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + */ model RunCommandManagedIdentity { - @doc("Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided.") + /** + * Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. + */ clientId?: string; - @doc("Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided.") + /** + * Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. + */ objectId?: string; } -@doc("The instance view of a virtual machine run command.") +/** + * The instance view of a virtual machine run command. + */ model VirtualMachineRunCommandInstanceView { - @doc("Script execution status.") + /** + * Script execution status. + */ executionState?: ExecutionState; - @doc("Communicate script configuration errors or execution messages.") + /** + * Communicate script configuration errors or execution messages. + */ executionMessage?: string; - @doc("Exit code returned from script execution.") + /** + * Exit code returned from script execution. + */ exitCode?: int32; - @doc("Script output stream.") + /** + * Script output stream. + */ output?: string; - @doc("Script error stream.") + /** + * Script error stream. + */ error?: string; - @doc("Script start time.") + /** + * Script start time. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime?: utcDateTime; - @doc("Script end time.") + /** + * Script end time. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime?: utcDateTime; - @doc("The resource status information.") + /** + * The resource status information. + */ statuses?: InstanceViewStatus[]; } -@doc("Describes a Virtual Machine run command.") +/** + * Describes a Virtual Machine run command. + */ model VirtualMachineRunCommandUpdate extends UpdateResource { - @doc("Describes the properties of a Virtual Machine run command.") + /** + * Describes the properties of a Virtual Machine run command. + */ properties?: VirtualMachineRunCommandProperties; } -@doc("The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS.") +/** + * The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS. + */ model DiskSku { - @doc("The sku name.") + /** + * The sku name. + */ name?: DiskStorageAccountTypes; - @doc("The sku tier.") + /** + * The sku tier. + */ @visibility("read") tier?: string; } -@doc("Disk resource properties.") +/** + * Disk resource properties. + */ model DiskProperties { - @doc("The time when the disk was created.") + /** + * The time when the disk was created. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timeCreated?: utcDateTime; - @doc("The Operating System type.") + /** + * The Operating System type. + */ osType?: OperatingSystemTypes; - @doc("The hypervisor generation of the Virtual Machine. Applicable to OS disks only.") + /** + * The hypervisor generation of the Virtual Machine. Applicable to OS disks only. + */ hyperVGeneration?: HyperVGeneration; - @doc("Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}") + /** + * Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer} + */ purchasePlan?: DiskPurchasePlan; - @doc("List of supported capabilities for the image from which the OS disk was created.") + /** + * List of supported capabilities for the image from which the OS disk was created. + */ supportedCapabilities?: SupportedCapabilities; - @doc("Disk source information. CreationData information cannot be changed after the disk has been created.") + /** + * Disk source information. CreationData information cannot be changed after the disk has been created. + */ creationData: CreationData; - @doc("If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.") + /** + * If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. + */ diskSizeGB?: int32; - @doc("The size of the disk in bytes. This field is read only.") + /** + * The size of the disk in bytes. This field is read only. + */ @visibility("read") - diskSizeBytes?: int32; + diskSizeBytes?: int64; - @doc("Unique Guid identifying the resource.") + /** + * Unique Guid identifying the resource. + */ @visibility("read") uniqueId?: string; - @doc("Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.") + /** + * Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. + */ encryptionSettingsCollection?: EncryptionSettingsCollection; - @doc("The disk provisioning state.") + /** + * The disk provisioning state. + */ @visibility("read") provisioningState?: string; - @doc("The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.") + /** + * The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. + */ @projectedName("json", "diskIOPSReadWrite") - diskIopsReadWrite?: int32; + diskIopsReadWrite?: int64; - @doc("The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.") - diskMBpsReadWrite?: int32; + /** + * The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. + */ + diskMBpsReadWrite?: int64; - @doc("The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.") + /** + * The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. + */ @projectedName("json", "diskIOPSReadOnly") - diskIopsReadOnly?: int32; + diskIopsReadOnly?: int64; - @doc("The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.") - diskMBpsReadOnly?: int32; + /** + * The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. + */ + diskMBpsReadOnly?: int64; - @doc("The state of the disk.") + /** + * The state of the disk. + */ @visibility("read") diskState?: DiskState; - @doc("Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.") + /** + * Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. + */ encryption?: Encryption; - @doc("The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.") + /** + * The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. + */ maxShares?: int32; - @doc("Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.") + /** + * Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. + */ @visibility("read") shareInfo?: ShareInfoElement[]; - @doc("Policy for accessing the disk via network.") + /** + * Policy for accessing the disk via network. + */ networkAccessPolicy?: NetworkAccessPolicy; - @doc("ARM id of the DiskAccess resource for using private endpoints on disks.") + /** + * ARM id of the DiskAccess resource for using private endpoints on disks. + */ diskAccessId?: string; - @doc("Latest time when bursting was last enabled on a disk.") + /** + * Latest time when bursting was last enabled on a disk. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. burstingEnabledTime?: utcDateTime; - @doc("Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.") + /** + * Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks. + */ tier?: string; - @doc("Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.") + /** + * Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. + */ burstingEnabled?: boolean; - @doc("Properties of the disk for which update is pending.") + /** + * Properties of the disk for which update is pending. + */ @visibility("read") propertyUpdatesInProgress?: PropertyUpdatesInProgress; - @doc("Indicates the OS on a disk supports hibernation.") + /** + * Indicates the OS on a disk supports hibernation. + */ supportsHibernation?: boolean; - @doc("Contains the security related information for the resource.") + /** + * Contains the security related information for the resource. + */ securityProfile?: DiskSecurityProfile; - @doc("Percentage complete for the background copy when a resource is created via the CopyStart operation.") + /** + * Percentage complete for the background copy when a resource is created via the CopyStart operation. + */ completionPercent?: float32; - @doc("Policy for controlling export on the disk.") + /** + * Policy for controlling export on the disk. + */ publicNetworkAccess?: PublicNetworkAccess; - @doc("Additional authentication requirements when exporting or uploading to a disk or snapshot.") + /** + * Additional authentication requirements when exporting or uploading to a disk or snapshot. + */ dataAccessAuthMode?: DataAccessAuthMode; - @doc("Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine.") + /** + * Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine. + */ optimizedForFrequentAttach?: boolean; - @doc("The UTC time when the ownership state of the disk was last changed i.e., the time the disk was last attached or detached from a VM or the time when the VM to which the disk was attached was deallocated or started.") + /** + * The UTC time when the ownership state of the disk was last changed i.e., the time the disk was last attached or detached from a VM or the time when the VM to which the disk was attached was deallocated or started. + */ @visibility("read") @projectedName("json", "LastOwnershipUpdateTime") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastOwnershipUpdateTime?: utcDateTime; } -@doc("Used for establishing the purchase context of any 3rd Party artifact through MarketPlace.") +/** + * Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. + */ model DiskPurchasePlan { - @doc("The plan ID.") + /** + * The plan ID. + */ name: string; - @doc("The publisher ID.") + /** + * The publisher ID. + */ publisher: string; - @doc("Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.") + /** + * Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. + */ product: string; - @doc("The Offer Promotion Code.") + /** + * The Offer Promotion Code. + */ promotionCode?: string; } -@doc("List of supported capabilities persisted on the disk resource for VM use.") +/** + * List of supported capabilities persisted on the disk resource for VM use. + */ model SupportedCapabilities { - @doc("The disk controllers that an OS disk supports. If set it can be SCSI or SCSI, NVME or NVME, SCSI.") + /** + * The disk controllers that an OS disk supports. If set it can be SCSI or SCSI, NVME or NVME, SCSI. + */ diskControllerTypes?: string; - @doc("True if the image from which the OS disk is created supports accelerated networking.") + /** + * True if the image from which the OS disk is created supports accelerated networking. + */ acceleratedNetwork?: boolean; - @doc("CPU architecture supported by an OS disk.") + /** + * CPU architecture supported by an OS disk. + */ architecture?: Architecture; } -@doc("Data used when creating a disk.") +/** + * Data used when creating a disk. + */ model CreationData { - @doc("This enumerates the possible sources of a disk's creation.") + /** + * This enumerates the possible sources of a disk's creation. + */ createOption: DiskCreateOption; - @doc("Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.") + /** + * Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk. + */ storageAccountId?: string; - @doc("Disk source information for PIR or user images.") + /** + * Disk source information for PIR or user images. + */ imageReference?: ImageDiskReference; - @doc("Required if creating from a Gallery Image. The id/sharedGalleryImageId/communityGalleryImageId of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.") + /** + * Required if creating from a Gallery Image. The id/sharedGalleryImageId/communityGalleryImageId of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk. + */ galleryImageReference?: ImageDiskReference; - @doc("If createOption is Import, this is the URI of a blob to be imported into a managed disk.") + /** + * If createOption is Import, this is the URI of a blob to be imported into a managed disk. + */ sourceUri?: string; - @doc("If createOption is Copy, this is the ARM id of the source snapshot or disk.") + /** + * If createOption is Copy, this is the ARM id of the source snapshot or disk. + */ sourceResourceId?: string; - @doc("If this field is set, this is the unique id identifying the source of this resource.") + /** + * If this field is set, this is the unique id identifying the source of this resource. + */ @visibility("read") sourceUniqueId?: string; - @doc("If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).") - uploadSizeBytes?: int32; + /** + * If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer). + */ + uploadSizeBytes?: int64; - @doc("Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.") + /** + * Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default. + */ logicalSectorSize?: int32; - @doc("If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state.") + /** + * If createOption is ImportSecure, this is the URI of a blob to be imported into VM guest state. + */ securityDataUri?: string; - @doc("Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled.") + /** + * Set this flag to true to get a boost on the performance target of the disk deployed, see here on the respective performance target. This flag can only be set on disk creation time and cannot be disabled after enabled. + */ performancePlus?: boolean; - @doc("Required if createOption is CopyFromSanSnapshot. This is the ARM id of the source elastic san volume snapshot.") + /** + * Required if createOption is CopyFromSanSnapshot. This is the ARM id of the source elastic san volume snapshot. + */ elasticSanResourceId?: string; } -@doc("The source image used for creating the disk.") +/** + * The source image used for creating the disk. + */ model ImageDiskReference { - @doc("A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference.") + /** + * A relative uri containing either a Platform Image Repository, user image, or Azure Compute Gallery image reference. + */ id?: string; - @doc("A relative uri containing a direct shared Azure Compute Gallery image reference.") + /** + * A relative uri containing a direct shared Azure Compute Gallery image reference. + */ sharedGalleryImageId?: string; - @doc("A relative uri containing a community Azure Compute Gallery image reference.") + /** + * A relative uri containing a community Azure Compute Gallery image reference. + */ communityGalleryImageId?: string; - @doc("If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.") + /** + * If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null. + */ lun?: int32; } -@doc("Encryption settings for disk or snapshot") +/** + * Encryption settings for disk or snapshot + */ model EncryptionSettingsCollection { - @doc("Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged.") + /** + * Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged. + */ enabled: boolean; - @doc("A collection of encryption settings, one for each disk volume.") + /** + * A collection of encryption settings, one for each disk volume. + */ encryptionSettings?: EncryptionSettingsElement[]; - @doc("Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption.") + /** + * Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption. + */ encryptionSettingsVersion?: string; } -@doc("Encryption settings for one disk volume.") +/** + * Encryption settings for one disk volume. + */ model EncryptionSettingsElement { - @doc("Key Vault Secret Url and vault id of the disk encryption key") + /** + * Key Vault Secret Url and vault id of the disk encryption key + */ diskEncryptionKey?: KeyVaultAndSecretReference; - @doc("Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key.") + /** + * Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key. + */ keyEncryptionKey?: KeyVaultAndKeyReference; } -@doc("Key Vault Secret Url and vault id of the encryption key ") +/** + * Key Vault Secret Url and vault id of the encryption key + */ model KeyVaultAndSecretReference { - @doc("Resource id of the KeyVault containing the key or secret") + /** + * Resource id of the KeyVault containing the key or secret + */ sourceVault: SourceVault; - @doc("Url pointing to a key or secret in KeyVault") + /** + * Url pointing to a key or secret in KeyVault + */ secretUrl: string; } -@doc("The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}") +/** + * The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} + */ model SourceVault { - @doc("Resource Id") + /** + * Resource Id + */ id?: string; } -@doc("Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey") +/** + * Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey + */ model KeyVaultAndKeyReference { - @doc("Resource id of the KeyVault containing the key or secret") + /** + * Resource id of the KeyVault containing the key or secret + */ sourceVault: SourceVault; - @doc("Url pointing to a key or secret in KeyVault") + /** + * Url pointing to a key or secret in KeyVault + */ keyUrl: string; } -@doc("Encryption at rest settings for disk or snapshot") +/** + * Encryption at rest settings for disk or snapshot + */ model Encryption { - @doc("ResourceId of the disk encryption set to use for enabling encryption at rest.") + /** + * ResourceId of the disk encryption set to use for enabling encryption at rest. + */ diskEncryptionSetId?: string; - @doc("The type of key used to encrypt the data of the disk.") + /** + * The type of key used to encrypt the data of the disk. + */ type?: EncryptionType; } model ShareInfoElement { - @doc("A relative URI containing the ID of the VM that has the disk attached.") + /** + * A relative URI containing the ID of the VM that has the disk attached. + */ @visibility("read") vmUri?: string; } -@doc("Properties of the disk for which update is pending.") +/** + * Properties of the disk for which update is pending. + */ model PropertyUpdatesInProgress { - @doc("The target performance tier of the disk if a tier change operation is in progress.") + /** + * The target performance tier of the disk if a tier change operation is in progress. + */ targetTier?: string; } -@doc("Contains the security related information for the resource.") +/** + * Contains the security related information for the resource. + */ model DiskSecurityProfile { - @doc("Specifies the SecurityType of the VM. Applicable for OS disks only.") + /** + * Specifies the SecurityType of the VM. Applicable for OS disks only. + */ securityType?: DiskSecurityTypes; - @doc("ResourceId of the disk encryption set associated to Confidential VM supported disk encrypted with customer managed key") + /** + * ResourceId of the disk encryption set associated to Confidential VM supported disk encrypted with customer managed key + */ secureVMDiskEncryptionSetId?: string; } -@doc("Disk update resource.") +/** + * Disk update resource. + */ model DiskUpdate { - @doc("Disk resource update properties.") + /** + * Disk resource update properties. + */ properties?: DiskUpdateProperties; - @doc("Resource tags") + /** + * Resource tags + */ tags?: Record; - @doc("The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS.") + /** + * The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS. + */ sku?: DiskSku; } -@doc("Disk resource update properties.") +/** + * Disk resource update properties. + */ model DiskUpdateProperties { - @doc("the Operating System type.") + /** + * the Operating System type. + */ osType?: OperatingSystemTypes; - @doc("If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.") + /** + * If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. + */ diskSizeGB?: int32; - @doc("Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.") + /** + * Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. + */ encryptionSettingsCollection?: EncryptionSettingsCollection; - @doc("The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.") + /** + * The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. + */ @projectedName("json", "diskIOPSReadWrite") - diskIopsReadWrite?: int32; + diskIopsReadWrite?: int64; - @doc("The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.") - diskMBpsReadWrite?: int32; + /** + * The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. + */ + diskMBpsReadWrite?: int64; - @doc("The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.") + /** + * The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. + */ @projectedName("json", "diskIOPSReadOnly") - diskIopsReadOnly?: int32; + diskIopsReadOnly?: int64; - @doc("The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.") - diskMBpsReadOnly?: int32; + /** + * The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10. + */ + diskMBpsReadOnly?: int64; - @doc("The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.") + /** + * The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. + */ maxShares?: int32; - @doc("Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.") + /** + * Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. + */ encryption?: Encryption; - @doc("Policy for accessing the disk via network.") + /** + * Policy for accessing the disk via network. + */ networkAccessPolicy?: NetworkAccessPolicy; - @doc("ARM id of the DiskAccess resource for using private endpoints on disks.") + /** + * ARM id of the DiskAccess resource for using private endpoints on disks. + */ diskAccessId?: string; - @doc("Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.") + /** + * Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks. + */ tier?: string; - @doc("Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.") + /** + * Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. + */ burstingEnabled?: boolean; - @doc("Purchase plan information to be added on the OS disk") + /** + * Purchase plan information to be added on the OS disk + */ purchasePlan?: DiskPurchasePlan; - @doc("List of supported capabilities to be added on the OS disk.") + /** + * List of supported capabilities to be added on the OS disk. + */ supportedCapabilities?: SupportedCapabilities; - @doc("Properties of the disk for which update is pending.") + /** + * Properties of the disk for which update is pending. + */ @visibility("read") propertyUpdatesInProgress?: PropertyUpdatesInProgress; - @doc("Indicates the OS on a disk supports hibernation.") + /** + * Indicates the OS on a disk supports hibernation. + */ supportsHibernation?: boolean; - @doc("Policy for controlling export on the disk.") + /** + * Policy for controlling export on the disk. + */ publicNetworkAccess?: PublicNetworkAccess; - @doc("Additional authentication requirements when exporting or uploading to a disk or snapshot.") + /** + * Additional authentication requirements when exporting or uploading to a disk or snapshot. + */ dataAccessAuthMode?: DataAccessAuthMode; - @doc("Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine.") + /** + * Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine. + */ optimizedForFrequentAttach?: boolean; } -@doc("Data used for requesting a SAS.") +/** + * Data used for requesting a SAS. + */ model GrantAccessData { - @doc("The Access Level, accepted values include None, Read, Write.") + /** + * The Access Level, accepted values include None, Read, Write. + */ access: AccessLevel; - @doc("Time duration in seconds until the SAS access expires.") + /** + * Time duration in seconds until the SAS access expires. + */ durationInSeconds: int32; - @doc("Set this flag to true to get additional SAS for VM guest state") + /** + * Set this flag to true to get additional SAS for VM guest state + */ getSecureVMGuestStateSAS?: boolean; - @doc("Used to specify the file format when making request for SAS on a VHDX file format snapshot") + /** + * Used to specify the file format when making request for SAS on a VHDX file format snapshot + */ fileFormat?: FileFormat; } -@doc("A disk access SAS uri.") +/** + * A disk access SAS uri. + */ model AccessUri { - @doc("A SAS uri for accessing a disk.") + /** + * A SAS uri for accessing a disk. + */ @visibility("read") accessSAS?: string; - @doc("A SAS uri for accessing a VM guest state.") + /** + * A SAS uri for accessing a VM guest state. + */ @visibility("read") securityDataAccessSAS?: string; } model DiskAccessProperties { - @doc("A readonly collection of private endpoint connections created on the disk. Currently only one endpoint connection is supported.") + /** + * A readonly collection of private endpoint connections created on the disk. Currently only one endpoint connection is supported. + */ @visibility("read") privateEndpointConnections?: PrivateEndpointConnection[]; - @doc("The disk access resource provisioning state.") + /** + * The disk access resource provisioning state. + */ @visibility("read") provisioningState?: string; - @doc("The time when the disk access was created.") + /** + * The time when the disk access was created. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timeCreated?: utcDateTime; } -@doc("Properties of the PrivateEndpointConnectProperties.") +/** + * Properties of the PrivateEndpointConnectProperties. + */ model PrivateEndpointConnectionProperties { - @doc("The resource of private end point.") + /** + * The resource of private end point. + */ @visibility("read") privateEndpoint?: PrivateEndpoint; - @doc("A collection of information about the state of the connection between DiskAccess and Virtual Network.") + /** + * A collection of information about the state of the connection between DiskAccess and Virtual Network. + */ privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; - @doc("The provisioning state of the private endpoint connection resource.") + /** + * The provisioning state of the private endpoint connection resource. + */ @visibility("read") provisioningState?: PrivateEndpointConnectionProvisioningState; } -@doc("The Private Endpoint resource.") +/** + * The Private Endpoint resource. + */ model PrivateEndpoint { - @doc("The ARM identifier for Private Endpoint") + /** + * The ARM identifier for Private Endpoint + */ @visibility("read") id?: string; } -@doc("A collection of information about the state of the connection between service consumer and provider.") +/** + * A collection of information about the state of the connection between service consumer and provider. + */ model PrivateLinkServiceConnectionState { - @doc("Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.") + /** + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + */ status?: PrivateEndpointServiceConnectionStatus; - @doc("The reason for approval/rejection of the connection.") + /** + * The reason for approval/rejection of the connection. + */ description?: string; - @doc("A message indicating if changes on the service provider require any updates on the consumer.") + /** + * A message indicating if changes on the service provider require any updates on the consumer. + */ actionsRequired?: string; } -@doc("Used for updating a disk access resource.") +/** + * Used for updating a disk access resource. + */ model DiskAccessUpdate { - @doc("Resource tags") + /** + * Resource tags + */ tags?: Record; } -@doc("A list of private link resources") +/** + * A list of private link resources + */ model PrivateLinkResourceListResult { - @doc("Array of private link resources") + /** + * Array of private link resources + */ value?: PrivateLinkResource[]; } -@doc("A private link resource") +/** + * A private link resource + */ model PrivateLinkResource { - @doc("Resource properties.") + /** + * Resource properties. + */ properties?: PrivateLinkResourceProperties; - @doc("private link resource Id") + /** + * private link resource Id + */ @visibility("read") id?: string; - @doc("private link resource name") + /** + * private link resource name + */ @visibility("read") name?: string; - @doc("private link resource type") + /** + * private link resource type + */ @visibility("read") type?: string; } -@doc("Properties of a private link resource.") +/** + * Properties of a private link resource. + */ model PrivateLinkResourceProperties { - @doc("The private link resource group id.") + /** + * The private link resource group id. + */ @visibility("read") groupId?: string; - @doc("The private link resource required member names.") + /** + * The private link resource required member names. + */ @visibility("read") requiredMembers?: string[]; - @doc("The private link resource DNS zone name.") + /** + * The private link resource DNS zone name. + */ requiredZoneNames?: string[]; } -@doc("The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks.") +/** + * The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks. + */ model EncryptionSetIdentity { - @doc("The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys.") + /** + * The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys. + */ type?: DiskEncryptionSetIdentityType; - @doc("The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity") + /** + * The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity + */ @visibility("read") principalId?: string; - @doc("The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity") + /** + * The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity + */ @visibility("read") tenantId?: string; - @doc("The list of user identities associated with the disk encryption set. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.") + /** + * The list of user identities associated with the disk encryption set. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ userAssignedIdentities?: Record; } model EncryptionSetProperties { - @doc("The type of key used to encrypt the data of the disk.") + /** + * The type of key used to encrypt the data of the disk. + */ encryptionType?: DiskEncryptionSetType; - @doc("The key vault key which is currently used by this disk encryption set.") + /** + * The key vault key which is currently used by this disk encryption set. + */ activeKey?: KeyForDiskEncryptionSet; - @doc("A readonly collection of key vault keys previously used by this disk encryption set while a key rotation is in progress. It will be empty if there is no ongoing key rotation.") + /** + * A readonly collection of key vault keys previously used by this disk encryption set while a key rotation is in progress. It will be empty if there is no ongoing key rotation. + */ @visibility("read") previousKeys?: KeyForDiskEncryptionSet[]; - @doc("The disk encryption set provisioning state.") + /** + * The disk encryption set provisioning state. + */ @visibility("read") provisioningState?: string; - @doc("Set this flag to true to enable auto-updating of this disk encryption set to the latest key version.") + /** + * Set this flag to true to enable auto-updating of this disk encryption set to the latest key version. + */ rotationToLatestKeyVersionEnabled?: boolean; - @doc("The time when the active key of this disk encryption set was updated.") + /** + * The time when the active key of this disk encryption set was updated. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastKeyRotationTimestamp?: utcDateTime; - @doc("The error that was encountered during auto-key rotation. If an error is present, then auto-key rotation will not be attempted until the error on this disk encryption set is fixed.") + /** + * The error that was encountered during auto-key rotation. If an error is present, then auto-key rotation will not be attempted until the error on this disk encryption set is fixed. + */ @visibility("read") autoKeyRotationError?: ApiError; - @doc("Multi-tenant application client id to access key vault in a different tenant. Setting the value to 'None' will clear the property.") + /** + * Multi-tenant application client id to access key vault in a different tenant. Setting the value to 'None' will clear the property. + */ federatedClientId?: string; } -@doc("Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots") +/** + * Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots + */ model KeyForDiskEncryptionSet { - @doc("Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption Set subscription.") + /** + * Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption Set subscription. + */ sourceVault?: SourceVault; - @doc("Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of rotationToLatestKeyVersionEnabled value.") + /** + * Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of rotationToLatestKeyVersionEnabled value. + */ keyUrl: string; } -@doc("disk encryption set update resource.") +/** + * disk encryption set update resource. + */ model DiskEncryptionSetUpdate { - @doc("disk encryption set resource update properties.") + /** + * disk encryption set resource update properties. + */ properties?: DiskEncryptionSetUpdateProperties; - @doc("Resource tags") + /** + * Resource tags + */ tags?: Record; - @doc("The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks.") + /** + * The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks. + */ identity?: EncryptionSetIdentity; } -@doc("disk encryption set resource update properties.") +/** + * disk encryption set resource update properties. + */ model DiskEncryptionSetUpdateProperties { - @doc("The type of key used to encrypt the data of the disk.") + /** + * The type of key used to encrypt the data of the disk. + */ encryptionType?: DiskEncryptionSetType; - @doc("Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots") + /** + * Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots + */ activeKey?: KeyForDiskEncryptionSet; - @doc("Set this flag to true to enable auto-updating of this disk encryption set to the latest key version.") + /** + * Set this flag to true to enable auto-updating of this disk encryption set to the latest key version. + */ rotationToLatestKeyVersionEnabled?: boolean; - @doc("Multi-tenant application client id to access key vault in a different tenant. Setting the value to 'None' will clear the property.") + /** + * Multi-tenant application client id to access key vault in a different tenant. Setting the value to 'None' will clear the property. + */ federatedClientId?: string; } -@doc("The List resources which are encrypted with the disk encryption set.") +/** + * The List resources which are encrypted with the disk encryption set. + */ model ResourceUriList is Azure.Core.Page; -@doc("Properties of an incremental disk restore point") +/** + * Properties of an incremental disk restore point + */ model DiskRestorePointProperties { - @doc("The timestamp of restorePoint creation") + /** + * The timestamp of restorePoint creation + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timeCreated?: utcDateTime; - @doc("arm id of source disk or source disk restore point.") + /** + * arm id of source disk or source disk restore point. + */ @visibility("read") sourceResourceId?: string; - @doc("The Operating System type.") + /** + * The Operating System type. + */ @visibility("read") osType?: OperatingSystemTypes; - @doc("The hypervisor generation of the Virtual Machine. Applicable to OS disks only.") + /** + * The hypervisor generation of the Virtual Machine. Applicable to OS disks only. + */ hyperVGeneration?: HyperVGeneration; - @doc("Purchase plan information for the the image from which the OS disk was created.") + /** + * Purchase plan information for the the image from which the OS disk was created. + */ purchasePlan?: DiskPurchasePlan; - @doc("List of supported capabilities for the image from which the OS disk was created.") + /** + * List of supported capabilities for the image from which the OS disk was created. + */ supportedCapabilities?: SupportedCapabilities; - @doc("id of the backing snapshot's MIS family") + /** + * id of the backing snapshot's MIS family + */ @visibility("read") familyId?: string; - @doc("unique incarnation id of the source disk") + /** + * unique incarnation id of the source disk + */ @visibility("read") sourceUniqueId?: string; - @doc("Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.") + /** + * Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. + */ @visibility("read") encryption?: Encryption; - @doc("Indicates the OS on a disk supports hibernation.") + /** + * Indicates the OS on a disk supports hibernation. + */ supportsHibernation?: boolean; - @doc("Policy for accessing the disk via network.") + /** + * Policy for accessing the disk via network. + */ networkAccessPolicy?: NetworkAccessPolicy; - @doc("Policy for controlling export on the disk.") + /** + * Policy for controlling export on the disk. + */ publicNetworkAccess?: PublicNetworkAccess; - @doc("ARM id of the DiskAccess resource for using private endpoints on disks.") + /** + * ARM id of the DiskAccess resource for using private endpoints on disks. + */ diskAccessId?: string; - @doc("Percentage complete for the background copy of disk restore point when source resource is from a different region.") + /** + * Percentage complete for the background copy of disk restore point when source resource is from a different region. + */ completionPercent?: float32; - @doc("Replication state of disk restore point when source resource is from a different region.") + /** + * Replication state of disk restore point when source resource is from a different region. + */ @visibility("read") replicationState?: string; - @doc("Location of source disk or source disk restore point when source resource is from a different region.") + /** + * Location of source disk or source disk restore point when source resource is from a different region. + */ @visibility("read") sourceResourceLocation?: string; - @doc("Contains the security related information for the resource.") + /** + * Contains the security related information for the resource. + */ securityProfile?: DiskSecurityProfile; } -@doc("The ProxyOnly Resource model definition.") +/** + * The ProxyOnly Resource model definition. + */ model ProxyOnlyResource { - @doc("Resource Id") + /** + * Resource Id + */ @visibility("read") id?: string; - @doc("Resource name") + /** + * Resource name + */ @visibility("read") name?: string; - @doc("Resource type") + /** + * Resource type + */ @visibility("read") type?: string; } -@doc("The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot") +/** + * The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot + */ model SnapshotSku { - @doc("The sku name.") + /** + * The sku name. + */ name?: SnapshotStorageAccountTypes; - @doc("The sku tier.") + /** + * The sku tier. + */ @visibility("read") tier?: string; } -@doc("Snapshot resource properties.") +/** + * Snapshot resource properties. + */ model SnapshotProperties { - @doc("The time when the snapshot was created.") + /** + * The time when the snapshot was created. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timeCreated?: utcDateTime; - @doc("The Operating System type.") + /** + * The Operating System type. + */ osType?: OperatingSystemTypes; - @doc("The hypervisor generation of the Virtual Machine. Applicable to OS disks only.") + /** + * The hypervisor generation of the Virtual Machine. Applicable to OS disks only. + */ hyperVGeneration?: HyperVGeneration; - @doc("Purchase plan information for the image from which the source disk for the snapshot was originally created.") + /** + * Purchase plan information for the image from which the source disk for the snapshot was originally created. + */ purchasePlan?: DiskPurchasePlan; - @doc("List of supported capabilities for the image from which the source disk from the snapshot was originally created.") + /** + * List of supported capabilities for the image from which the source disk from the snapshot was originally created. + */ supportedCapabilities?: SupportedCapabilities; - @doc("Disk source information. CreationData information cannot be changed after the disk has been created.") + /** + * Disk source information. CreationData information cannot be changed after the disk has been created. + */ creationData: CreationData; - @doc("If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.") + /** + * If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. + */ diskSizeGB?: int32; - @doc("The size of the disk in bytes. This field is read only.") + /** + * The size of the disk in bytes. This field is read only. + */ @visibility("read") - diskSizeBytes?: int32; + diskSizeBytes?: int64; - @doc("The state of the snapshot.") + /** + * The state of the snapshot. + */ @visibility("read") diskState?: DiskState; - @doc("Unique Guid identifying the resource.") + /** + * Unique Guid identifying the resource. + */ @visibility("read") uniqueId?: string; - @doc("Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.") + /** + * Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. + */ encryptionSettingsCollection?: EncryptionSettingsCollection; - @doc("The disk provisioning state.") + /** + * The disk provisioning state. + */ @visibility("read") provisioningState?: string; - @doc("Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed.") + /** + * Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed. + */ incremental?: boolean; - @doc("Incremental snapshots for a disk share an incremental snapshot family id. The Get Page Range Diff API can only be called on incremental snapshots with the same family id.") + /** + * Incremental snapshots for a disk share an incremental snapshot family id. The Get Page Range Diff API can only be called on incremental snapshots with the same family id. + */ @visibility("read") incrementalSnapshotFamilyId?: string; - @doc("Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.") + /** + * Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. + */ encryption?: Encryption; - @doc("Policy for accessing the disk via network.") + /** + * Policy for accessing the disk via network. + */ networkAccessPolicy?: NetworkAccessPolicy; - @doc("ARM id of the DiskAccess resource for using private endpoints on disks.") + /** + * ARM id of the DiskAccess resource for using private endpoints on disks. + */ diskAccessId?: string; - @doc("Contains the security related information for the resource.") + /** + * Contains the security related information for the resource. + */ securityProfile?: DiskSecurityProfile; - @doc("Indicates the OS on a snapshot supports hibernation.") + /** + * Indicates the OS on a snapshot supports hibernation. + */ supportsHibernation?: boolean; - @doc("Policy for controlling export on the disk.") + /** + * Policy for controlling export on the disk. + */ publicNetworkAccess?: PublicNetworkAccess; - @doc("Percentage complete for the background copy when a resource is created via the CopyStart operation.") + /** + * Percentage complete for the background copy when a resource is created via the CopyStart operation. + */ completionPercent?: float32; - @doc("Indicates the error details if the background copy of a resource created via the CopyStart operation fails.") + /** + * Indicates the error details if the background copy of a resource created via the CopyStart operation fails. + */ copyCompletionError?: CopyCompletionError; - @doc("Additional authentication requirements when exporting or uploading to a disk or snapshot.") + /** + * Additional authentication requirements when exporting or uploading to a disk or snapshot. + */ dataAccessAuthMode?: DataAccessAuthMode; } -@doc("Indicates the error details if the background copy of a resource created via the CopyStart operation fails.") +/** + * Indicates the error details if the background copy of a resource created via the CopyStart operation fails. + */ model CopyCompletionError { - @doc("Indicates the error code if the background copy of a resource created via the CopyStart operation fails.") + /** + * Indicates the error code if the background copy of a resource created via the CopyStart operation fails. + */ errorCode: CopyCompletionErrorReason; - @doc("Indicates the error message if the background copy of a resource created via the CopyStart operation fails.") + /** + * Indicates the error message if the background copy of a resource created via the CopyStart operation fails. + */ errorMessage: string; } -@doc("Snapshot update resource.") +/** + * Snapshot update resource. + */ model SnapshotUpdate { - @doc("Snapshot resource update properties.") + /** + * Snapshot resource update properties. + */ properties?: SnapshotUpdateProperties; - @doc("Resource tags") + /** + * Resource tags + */ tags?: Record; - @doc("The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot") + /** + * The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot + */ sku?: SnapshotSku; } -@doc("Snapshot resource update properties.") +/** + * Snapshot resource update properties. + */ model SnapshotUpdateProperties { - @doc("the Operating System type.") + /** + * the Operating System type. + */ osType?: OperatingSystemTypes; - @doc("If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.") + /** + * If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size. + */ diskSizeGB?: int32; - @doc("Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.") + /** + * Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. + */ encryptionSettingsCollection?: EncryptionSettingsCollection; - @doc("Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.") + /** + * Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys. + */ encryption?: Encryption; - @doc("Policy for accessing the disk via network.") + /** + * Policy for accessing the disk via network. + */ networkAccessPolicy?: NetworkAccessPolicy; - @doc("ARM id of the DiskAccess resource for using private endpoints on disks.") + /** + * ARM id of the DiskAccess resource for using private endpoints on disks. + */ diskAccessId?: string; - @doc("Indicates the OS on a snapshot supports hibernation.") + /** + * Indicates the OS on a snapshot supports hibernation. + */ supportsHibernation?: boolean; - @doc("Policy for controlling export on the disk.") + /** + * Policy for controlling export on the disk. + */ publicNetworkAccess?: PublicNetworkAccess; - @doc("Additional authentication requirements when exporting or uploading to a disk or snapshot.") + /** + * Additional authentication requirements when exporting or uploading to a disk or snapshot. + */ dataAccessAuthMode?: DataAccessAuthMode; - @doc("List of supported capabilities for the image from which the OS disk was created.") + /** + * List of supported capabilities for the image from which the OS disk was created. + */ supportedCapabilities?: SupportedCapabilities; } -@doc("The List Resource Skus operation response.") +/** + * The List Resource Skus operation response. + */ model ResourceSkusResult is Azure.Core.Page; -@doc("Describes scaling information of a SKU.") +/** + * Describes scaling information of a SKU. + */ model ResourceSkuCapacity { - @doc("The minimum capacity.") + /** + * The minimum capacity. + */ @visibility("read") - minimum?: int32; + minimum?: int64; - @doc("The maximum capacity that can be set.") + /** + * The maximum capacity that can be set. + */ @visibility("read") - maximum?: int32; + maximum?: int64; - @doc("The default capacity.") + /** + * The default capacity. + */ @visibility("read") - default?: int32; + default?: int64; - @doc("The scale type applicable to the sku.") + /** + * The scale type applicable to the sku. + */ @visibility("read") scaleType?: ResourceSkuCapacityScaleType; } -@doc("Describes an available Compute SKU Location Information.") +/** + * Describes an available Compute SKU Location Information. + */ model ResourceSkuLocationInfo { - @doc("Location of the SKU") + /** + * Location of the SKU + */ @visibility("read") location?: string; - @doc("List of availability zones where the SKU is supported.") + /** + * List of availability zones where the SKU is supported. + */ @visibility("read") zones?: string[]; - @doc("Details of capabilities available to a SKU in specific zones.") + /** + * Details of capabilities available to a SKU in specific zones. + */ @visibility("read") zoneDetails?: ResourceSkuZoneDetails[]; - @doc("The names of extended locations.") + /** + * The names of extended locations. + */ @visibility("read") extendedLocations?: string[]; - @doc("The type of the extended location.") + /** + * The type of the extended location. + */ @visibility("read") type?: ExtendedLocationType; } -@doc("Describes The zonal capabilities of a SKU.") +/** + * Describes The zonal capabilities of a SKU. + */ model ResourceSkuZoneDetails { - @doc("The set of zones that the SKU is available in with the specified capabilities.") + /** + * The set of zones that the SKU is available in with the specified capabilities. + */ @visibility("read") name?: string[]; - @doc("A list of capabilities that are available for the SKU in the specified list of zones.") + /** + * A list of capabilities that are available for the SKU in the specified list of zones. + */ @visibility("read") capabilities?: ResourceSkuCapabilities[]; } -@doc("Describes The SKU capabilities object.") +/** + * Describes The SKU capabilities object. + */ model ResourceSkuCapabilities { - @doc("An invariant to describe the feature.") + /** + * An invariant to describe the feature. + */ @visibility("read") name?: string; - @doc("An invariant if the feature is measured by quantity.") + /** + * An invariant if the feature is measured by quantity. + */ @visibility("read") value?: string; } -@doc("Describes metadata for retrieving price info.") +/** + * Describes metadata for retrieving price info. + */ model ResourceSkuCosts { - @doc("Used for querying price from commerce.") + /** + * Used for querying price from commerce. + */ @visibility("read") meterID?: string; - @doc("The multiplier is needed to extend the base metered cost.") + /** + * The multiplier is needed to extend the base metered cost. + */ @visibility("read") - quantity?: int32; + quantity?: int64; - @doc("An invariant to show the extended unit.") + /** + * An invariant to show the extended unit. + */ @visibility("read") extendedUnit?: string; } -@doc("Describes scaling information of a SKU.") +/** + * Describes scaling information of a SKU. + */ model ResourceSkuRestrictions { - @doc("The type of restrictions.") + /** + * The type of restrictions. + */ @visibility("read") type?: ResourceSkuRestrictionsType; - @doc("The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.") + /** + * The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + */ @visibility("read") values?: string[]; - @doc("The information about the restriction where the SKU cannot be used.") + /** + * The information about the restriction where the SKU cannot be used. + */ @visibility("read") restrictionInfo?: ResourceSkuRestrictionInfo; - @doc("The reason for restriction.") + /** + * The reason for restriction. + */ @visibility("read") reasonCode?: ResourceSkuRestrictionsReasonCode; } -@doc("Describes an available Compute SKU Restriction Information.") +/** + * Describes an available Compute SKU Restriction Information. + */ model ResourceSkuRestrictionInfo { - @doc("Locations where the SKU is restricted") + /** + * Locations where the SKU is restricted + */ @visibility("read") locations?: string[]; - @doc("List of availability zones where the SKU is restricted.") + /** + * List of availability zones where the SKU is restricted. + */ @visibility("read") zones?: string[]; } -@doc("Describes the properties of a Shared Image Gallery.") +/** + * Describes the properties of a Shared Image Gallery. + */ model GalleryProperties { - @doc("The description of this Shared Image Gallery resource. This property is updatable.") + /** + * The description of this Shared Image Gallery resource. This property is updatable. + */ description?: string; - @doc("Describes the gallery unique name.") + /** + * Describes the gallery unique name. + */ identifier?: GalleryIdentifier; - @doc("The provisioning state, which only appears in the response.") + /** + * The provisioning state, which only appears in the response. + */ @visibility("read") provisioningState?: GalleryProvisioningState; - @doc("Profile for gallery sharing to subscription or tenant") + /** + * Profile for gallery sharing to subscription or tenant + */ sharingProfile?: SharingProfile; - @doc("Contains information about the soft deletion policy of the gallery.") + /** + * Contains information about the soft deletion policy of the gallery. + */ softDeletePolicy?: SoftDeletePolicy; - @doc("Sharing status of current gallery.") + /** + * Sharing status of current gallery. + */ @visibility("read") sharingStatus?: SharingStatus; } -@doc("Describes the gallery unique name.") +/** + * Describes the gallery unique name. + */ model GalleryIdentifier { - @doc("The unique name of the Shared Image Gallery. This name is generated automatically by Azure.") + /** + * The unique name of the Shared Image Gallery. This name is generated automatically by Azure. + */ @visibility("read") uniqueName?: string; } -@doc("Profile for gallery sharing to subscription or tenant") +/** + * Profile for gallery sharing to subscription or tenant + */ model SharingProfile { - @doc("This property allows you to specify the permission of sharing gallery.

    Possible values are:

    **Private**

    **Groups**

    **Community**") + /** + * This property allows you to specify the permission of sharing gallery.

    Possible values are:

    **Private**

    **Groups**

    **Community** + */ permissions?: GallerySharingPermissionTypes; - @doc("A list of sharing profile groups.") + /** + * A list of sharing profile groups. + */ @visibility("read") groups?: SharingProfileGroup[]; - @doc("Information of community gallery if current gallery is shared to community.") + /** + * Information of community gallery if current gallery is shared to community. + */ communityGalleryInfo?: CommunityGalleryInfo; } -@doc("Group of the gallery sharing profile") +/** + * Group of the gallery sharing profile + */ model SharingProfileGroup { - @doc("This property allows you to specify the type of sharing group.

    Possible values are:

    **Subscriptions**

    **AADTenants**") + /** + * This property allows you to specify the type of sharing group.

    Possible values are:

    **Subscriptions**

    **AADTenants** + */ type?: SharingProfileGroupTypes; - @doc("A list of subscription/tenant ids the gallery is aimed to be shared to.") + /** + * A list of subscription/tenant ids the gallery is aimed to be shared to. + */ ids?: string[]; } -@doc("Information of community gallery if current gallery is shared to community") +/** + * Information of community gallery if current gallery is shared to community + */ model CommunityGalleryInfo { - @doc("The link to the publisher website. Visible to all users.") + /** + * The link to the publisher website. Visible to all users. + */ publisherUri?: string; - @doc("Community gallery publisher support email. The email address of the publisher. Visible to all users.") + /** + * Community gallery publisher support email. The email address of the publisher. Visible to all users. + */ publisherContact?: string; - @doc("End-user license agreement for community gallery image.") + /** + * End-user license agreement for community gallery image. + */ eula?: string; - @doc("The prefix of the gallery name that will be displayed publicly. Visible to all users.") + /** + * The prefix of the gallery name that will be displayed publicly. Visible to all users. + */ publicNamePrefix?: string; - @doc("Contains info about whether community gallery sharing is enabled.") + /** + * Contains info about whether community gallery sharing is enabled. + */ @visibility("read") communityGalleryEnabled?: boolean; - @doc("Community gallery public name list.") + /** + * Community gallery public name list. + */ @visibility("read") publicNames?: string[]; } -@doc("Contains information about the soft deletion policy of the gallery.") +/** + * Contains information about the soft deletion policy of the gallery. + */ model SoftDeletePolicy { - @doc("Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time.") + /** + * Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time. + */ isSoftDeleteEnabled?: boolean; } -@doc("Sharing status of current gallery.") +/** + * Sharing status of current gallery. + */ model SharingStatus { - @doc("Aggregated sharing state of current gallery.") + /** + * Aggregated sharing state of current gallery. + */ @visibility("read") aggregatedState?: SharingState; - @doc("Summary of all regional sharing status.") + /** + * Summary of all regional sharing status. + */ summary?: RegionalSharingStatus[]; } -@doc("Gallery regional sharing status") +/** + * Gallery regional sharing status + */ model RegionalSharingStatus { - @doc("Region name") + /** + * Region name + */ region?: string; - @doc("Gallery sharing state in current region") + /** + * Gallery sharing state in current region + */ @visibility("read") state?: SharingState; - @doc("Details of gallery regional sharing failure.") + /** + * Details of gallery regional sharing failure. + */ details?: string; } -@doc("Specifies information about the Shared Image Gallery that you want to update.") +/** + * Specifies information about the Shared Image Gallery that you want to update. + */ model GalleryUpdate extends UpdateResourceDefinition { - @doc("Describes the properties of a Shared Image Gallery.") + /** + * Describes the properties of a Shared Image Gallery. + */ properties?: GalleryProperties; } -@doc("The Update Resource model definition.") +/** + * The Update Resource model definition. + */ model UpdateResourceDefinition { - @doc("Resource Id") + /** + * Resource Id + */ @visibility("read") id?: string; - @doc("Resource name") + /** + * Resource name + */ @visibility("read") name?: string; - @doc("Resource type") + /** + * Resource type + */ @visibility("read") type?: string; - @doc("Resource tags") + /** + * Resource tags + */ tags?: Record; } -@doc("Describes the properties of a gallery image definition.") +/** + * Describes the properties of a gallery image definition. + */ model GalleryImageProperties { - @doc("The description of this gallery image definition resource. This property is updatable.") + /** + * The description of this gallery image definition resource. This property is updatable. + */ description?: string; - @doc("The Eula agreement for the gallery image definition.") + /** + * The Eula agreement for the gallery image definition. + */ eula?: string; - @doc("The privacy statement uri.") + /** + * The privacy statement uri. + */ privacyStatementUri?: string; - @doc("The release note uri.") + /** + * The release note uri. + */ releaseNoteUri?: string; - @doc("This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

    Possible values are:

    **Windows**

    **Linux**") + /** + * This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

    Possible values are:

    **Windows**

    **Linux** + */ osType: OperatingSystemTypes; - @doc("This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'.") + /** + * This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. + */ osState: OperatingSystemStateTypes; - @doc("The hypervisor generation of the Virtual Machine. Applicable to OS disks only.") + /** + * The hypervisor generation of the Virtual Machine. Applicable to OS disks only. + */ hyperVGeneration?: HyperVGeneration; - @doc("The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable.") + /** + * The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endOfLifeDate?: utcDateTime; - @doc("This is the gallery image definition identifier.") + /** + * This is the gallery image definition identifier. + */ identifier: GalleryImageIdentifier; - @doc("The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.") + /** + * The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. + */ recommended?: RecommendedMachineConfiguration; - @doc("Describes the disallowed disk types.") + /** + * Describes the disallowed disk types. + */ disallowed?: Disallowed; - @doc("Describes the gallery image definition purchase plan. This is used by marketplace images.") + /** + * Describes the gallery image definition purchase plan. This is used by marketplace images. + */ purchasePlan?: ImagePurchasePlan; - @doc("The provisioning state, which only appears in the response.") + /** + * The provisioning state, which only appears in the response. + */ @visibility("read") provisioningState?: GalleryProvisioningState; - @doc("A list of gallery image features.") + /** + * A list of gallery image features. + */ features?: GalleryImageFeature[]; - @doc("The architecture of the image. Applicable to OS disks only.") + /** + * The architecture of the image. Applicable to OS disks only. + */ architecture?: Architecture; } -@doc("This is the gallery image definition identifier.") +/** + * This is the gallery image definition identifier. + */ model GalleryImageIdentifier { - @doc("The name of the gallery image definition publisher.") + /** + * The name of the gallery image definition publisher. + */ publisher: string; - @doc("The name of the gallery image definition offer.") + /** + * The name of the gallery image definition offer. + */ offer: string; - @doc("The name of the gallery image definition SKU.") + /** + * The name of the gallery image definition SKU. + */ sku: string; } -@doc("The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.") +/** + * The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. + */ model RecommendedMachineConfiguration { - @doc("Describes the resource range.") + /** + * Describes the resource range. + */ vCPUs?: ResourceRange; - @doc("Describes the resource range.") + /** + * Describes the resource range. + */ memory?: ResourceRange; } -@doc("Describes the resource range.") +/** + * Describes the resource range. + */ model ResourceRange { - @doc("The minimum number of the resource.") + /** + * The minimum number of the resource. + */ min?: int32; - @doc("The maximum number of the resource.") + /** + * The maximum number of the resource. + */ max?: int32; } -@doc("Describes the disallowed disk types.") +/** + * Describes the disallowed disk types. + */ model Disallowed { - @doc("A list of disk types.") + /** + * A list of disk types. + */ diskTypes?: string[]; } -@doc("Describes the gallery image definition purchase plan. This is used by marketplace images.") +/** + * Describes the gallery image definition purchase plan. This is used by marketplace images. + */ model ImagePurchasePlan { - @doc("The plan ID.") + /** + * The plan ID. + */ name?: string; - @doc("The publisher ID.") + /** + * The publisher ID. + */ publisher?: string; - @doc("The product ID.") + /** + * The product ID. + */ product?: string; } -@doc("A feature for gallery image.") +/** + * A feature for gallery image. + */ model GalleryImageFeature { - @doc("The name of the gallery image feature.") + /** + * The name of the gallery image feature. + */ name?: string; - @doc("The value of the gallery image feature.") + /** + * The value of the gallery image feature. + */ value?: string; } -@doc("Specifies information about the gallery image definition that you want to update.") +/** + * Specifies information about the gallery image definition that you want to update. + */ model GalleryImageUpdate extends UpdateResourceDefinition { - @doc("Describes the properties of a gallery image definition.") + /** + * Describes the properties of a gallery image definition. + */ properties?: GalleryImageProperties; } -@doc("Describes the properties of a gallery image version.") +/** + * Describes the properties of a gallery image version. + */ model GalleryImageVersionProperties { - @doc("The publishing profile of a gallery image Version.") + /** + * The publishing profile of a gallery image Version. + */ publishingProfile?: GalleryImageVersionPublishingProfile; - @doc("The provisioning state, which only appears in the response.") + /** + * The provisioning state, which only appears in the response. + */ @visibility("read") provisioningState?: GalleryProvisioningState; - @doc("This is the storage profile of a Gallery Image Version.") + /** + * This is the storage profile of a Gallery Image Version. + */ storageProfile: GalleryImageVersionStorageProfile; - @doc("This is the safety profile of the Gallery Image Version.") + /** + * This is the safety profile of the Gallery Image Version. + */ safetyProfile?: GalleryImageVersionSafetyProfile; - @doc("This is the replication status of the gallery image version.") + /** + * This is the replication status of the gallery image version. + */ @visibility("read") replicationStatus?: ReplicationStatus; } -@doc("The publishing profile of a gallery image Version.") +/** + * The publishing profile of a gallery image Version. + */ model GalleryImageVersionPublishingProfile extends GalleryArtifactPublishingProfileBase {} -@doc("Describes the basic gallery artifact publishing profile.") +/** + * Describes the basic gallery artifact publishing profile. + */ model GalleryArtifactPublishingProfileBase { - @doc("The target regions where the Image Version is going to be replicated to. This property is updatable.") + /** + * The target regions where the Image Version is going to be replicated to. This property is updatable. + */ targetRegions?: TargetRegion[]; - @doc("The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.") + /** + * The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable. + */ replicaCount?: int32; - @doc("If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.") + /** + * If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. + */ excludeFromLatest?: boolean; - @doc("The timestamp for when the gallery image version is published.") + /** + * The timestamp for when the gallery image version is published. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. publishedDate?: utcDateTime; - @doc("The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.") + /** + * The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endOfLifeDate?: utcDateTime; - @doc("Specifies the storage account type to be used to store the image. This property is not updatable.") + /** + * Specifies the storage account type to be used to store the image. This property is not updatable. + */ storageAccountType?: StorageAccountType; - @doc("Optional parameter which specifies the mode to be used for replication. This property is not updatable.") + /** + * Optional parameter which specifies the mode to be used for replication. This property is not updatable. + */ replicationMode?: ReplicationMode; - @doc("The target extended locations where the Image Version is going to be replicated to. This property is updatable.") + /** + * The target extended locations where the Image Version is going to be replicated to. This property is updatable. + */ targetExtendedLocations?: GalleryTargetExtendedLocation[]; } -@doc("Describes the target region information.") +/** + * Describes the target region information. + */ model TargetRegion { - @doc("The name of the region.") + /** + * The name of the region. + */ name: string; - @doc("The number of replicas of the Image Version to be created per region. This property is updatable.") + /** + * The number of replicas of the Image Version to be created per region. This property is updatable. + */ regionalReplicaCount?: int32; - @doc("Specifies the storage account type to be used to store the image. This property is not updatable.") + /** + * Specifies the storage account type to be used to store the image. This property is not updatable. + */ storageAccountType?: StorageAccountType; - @doc("Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.") + /** + * Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. + */ encryption?: EncryptionImages; - @doc("Contains the flag setting to hide an image when users specify version='latest'") + /** + * Contains the flag setting to hide an image when users specify version='latest' + */ excludeFromLatest?: boolean; } -@doc("Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.") +/** + * Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. + */ model EncryptionImages { - @doc("Contains encryption settings for an OS disk image.") + /** + * Contains encryption settings for an OS disk image. + */ osDiskImage?: OSDiskImageEncryption; - @doc("A list of encryption specifications for data disk images.") + /** + * A list of encryption specifications for data disk images. + */ dataDiskImages?: DataDiskImageEncryption[]; } -@doc("Contains encryption settings for an OS disk image.") +/** + * Contains encryption settings for an OS disk image. + */ model OSDiskImageEncryption extends DiskImageEncryption { - @doc("This property specifies the security profile of an OS disk image.") + /** + * This property specifies the security profile of an OS disk image. + */ securityProfile?: OSDiskImageSecurityProfile; } -@doc("Contains security profile for an OS disk image.") +/** + * Contains security profile for an OS disk image. + */ model OSDiskImageSecurityProfile { - @doc("confidential VM encryption types") + /** + * confidential VM encryption types + */ confidentialVMEncryptionType?: ConfidentialVMEncryptionType; - @doc("secure VM disk encryption set id") + /** + * secure VM disk encryption set id + */ secureVMDiskEncryptionSetId?: string; } -@doc("This is the disk image encryption base class.") +/** + * This is the disk image encryption base class. + */ model DiskImageEncryption { - @doc("A relative URI containing the resource ID of the disk encryption set.") + /** + * A relative URI containing the resource ID of the disk encryption set. + */ diskEncryptionSetId?: string; } -@doc("Contains encryption settings for a data disk image.") +/** + * Contains encryption settings for a data disk image. + */ model DataDiskImageEncryption extends DiskImageEncryption { - @doc("This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.") + /** + * This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. + */ lun: int32; } model GalleryTargetExtendedLocation { - @doc("The name of the region.") + /** + * The name of the region. + */ name?: string; - @doc("The name of the extended location.") + /** + * The name of the extended location. + */ extendedLocation?: GalleryExtendedLocation; - @doc("The number of replicas of the Image Version to be created per extended location. This property is updatable.") + /** + * The number of replicas of the Image Version to be created per extended location. This property is updatable. + */ extendedLocationReplicaCount?: int32; - @doc("Specifies the storage account type to be used to store the image. This property is not updatable.") + /** + * Specifies the storage account type to be used to store the image. This property is not updatable. + */ storageAccountType?: EdgeZoneStorageAccountType; - @doc("Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact.") + /** + * Optional. Allows users to provide customer managed keys for encrypting the OS and data disks in the gallery artifact. + */ encryption?: EncryptionImages; } -@doc("The name of the extended location.") +/** + * The name of the extended location. + */ model GalleryExtendedLocation { name?: string; - @doc("It is type of the extended location.") + /** + * It is type of the extended location. + */ type?: GalleryExtendedLocationType; } -@doc("This is the storage profile of a Gallery Image Version.") +/** + * This is the storage profile of a Gallery Image Version. + */ model GalleryImageVersionStorageProfile { - @doc("The source of the gallery artifact version.") + /** + * The source of the gallery artifact version. + */ source?: GalleryArtifactVersionFullSource; - @doc("This is the OS disk image.") + /** + * This is the OS disk image. + */ osDiskImage?: GalleryOSDiskImage; - @doc("A list of data disk images.") + /** + * A list of data disk images. + */ dataDiskImages?: GalleryDataDiskImage[]; } -@doc("The source of the gallery artifact version.") +/** + * The source of the gallery artifact version. + */ model GalleryArtifactVersionFullSource extends GalleryArtifactVersionSource { - @doc("The resource Id of the source Community Gallery Image. Only required when using Community Gallery Image as a source.") + /** + * The resource Id of the source Community Gallery Image. Only required when using Community Gallery Image as a source. + */ communityGalleryImageId?: string; } -@doc("The gallery artifact version source.") +/** + * The gallery artifact version source. + */ model GalleryArtifactVersionSource { - @doc("The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource.") + /** + * The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource. + */ id?: string; } -@doc("This is the OS disk image.") +/** + * This is the OS disk image. + */ model GalleryOSDiskImage extends GalleryDiskImage {} -@doc("This is the disk image base class.") +/** + * This is the disk image base class. + */ model GalleryDiskImage { - @doc("This property indicates the size of the VHD to be created.") + /** + * This property indicates the size of the VHD to be created. + */ @visibility("read") sizeInGB?: int32; - @doc("The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'") + /** + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' + */ hostCaching?: HostCaching; - @doc("The source for the disk image.") + /** + * The source for the disk image. + */ source?: GalleryDiskImageSource; } -@doc("The source for the disk image.") +/** + * The source for the disk image. + */ model GalleryDiskImageSource extends GalleryArtifactVersionSource { - @doc("The uri of the gallery artifact version source. Currently used to specify vhd/blob source.") + /** + * The uri of the gallery artifact version source. Currently used to specify vhd/blob source. + */ uri?: string; - @doc("The Storage Account Id that contains the vhd blob being used as a source for this artifact version.") + /** + * The Storage Account Id that contains the vhd blob being used as a source for this artifact version. + */ storageAccountId?: string; } -@doc("This is the data disk image.") +/** + * This is the data disk image. + */ model GalleryDataDiskImage extends GalleryDiskImage { - @doc("This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.") + /** + * This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. + */ lun: int32; } -@doc("This is the safety profile of the Gallery Image Version.") +/** + * This is the safety profile of the Gallery Image Version. + */ model GalleryImageVersionSafetyProfile extends GalleryArtifactSafetyProfileBase { - @doc("Indicates whether this image has been reported as violating Microsoft's policies.") + /** + * Indicates whether this image has been reported as violating Microsoft's policies. + */ @visibility("read") reportedForPolicyViolation?: boolean; - @doc("A list of Policy Violations that have been reported for this Gallery Image Version.") + /** + * A list of Policy Violations that have been reported for this Gallery Image Version. + */ @visibility("read") policyViolations?: PolicyViolation[]; } -@doc("A policy violation reported against a gallery artifact.") +/** + * A policy violation reported against a gallery artifact. + */ model PolicyViolation { - @doc("Describes the nature of the policy violation.") + /** + * Describes the nature of the policy violation. + */ category?: PolicyViolationCategory; - @doc("Describes specific details about why this policy violation was reported.") + /** + * Describes specific details about why this policy violation was reported. + */ details?: string; } -@doc("This is the safety profile of the Gallery Artifact Version.") +/** + * This is the safety profile of the Gallery Artifact Version. + */ model GalleryArtifactSafetyProfileBase { - @doc("Indicates whether or not removing this Gallery Image Version from replicated regions is allowed.") + /** + * Indicates whether or not removing this Gallery Image Version from replicated regions is allowed. + */ allowDeletionOfReplicatedLocations?: boolean; } -@doc("This is the replication status of the gallery image version.") +/** + * This is the replication status of the gallery image version. + */ model ReplicationStatus { - @doc("This is the aggregated replication status based on all the regional replication status flags.") + /** + * This is the aggregated replication status based on all the regional replication status flags. + */ @visibility("read") aggregatedState?: AggregatedReplicationState; - @doc("This is a summary of replication status for each region.") + /** + * This is a summary of replication status for each region. + */ @visibility("read") summary?: RegionalReplicationStatus[]; } -@doc("This is the regional replication status.") +/** + * This is the regional replication status. + */ model RegionalReplicationStatus { - @doc("The region to which the gallery image version is being replicated to.") + /** + * The region to which the gallery image version is being replicated to. + */ @visibility("read") region?: string; - @doc("This is the regional replication state.") + /** + * This is the regional replication state. + */ @visibility("read") state?: ReplicationState; - @doc("The details of the replication status.") + /** + * The details of the replication status. + */ @visibility("read") details?: string; - @doc("It indicates progress of the replication job.") + /** + * It indicates progress of the replication job. + */ @visibility("read") progress?: int32; } -@doc("Specifies information about the gallery image version that you want to update.") +/** + * Specifies information about the gallery image version that you want to update. + */ model GalleryImageVersionUpdate extends UpdateResourceDefinition { - @doc("Describes the properties of a gallery image version.") + /** + * Describes the properties of a gallery image version. + */ properties?: GalleryImageVersionProperties; } -@doc("Describes the properties of a gallery Application Definition.") +/** + * Describes the properties of a gallery Application Definition. + */ model GalleryApplicationProperties { - @doc("The description of this gallery Application Definition resource. This property is updatable.") + /** + * The description of this gallery Application Definition resource. This property is updatable. + */ description?: string; - @doc("The Eula agreement for the gallery Application Definition.") + /** + * The Eula agreement for the gallery Application Definition. + */ eula?: string; - @doc("The privacy statement uri.") + /** + * The privacy statement uri. + */ privacyStatementUri?: string; - @doc("The release note uri.") + /** + * The release note uri. + */ releaseNoteUri?: string; - @doc("The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable.") + /** + * The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endOfLifeDate?: utcDateTime; - @doc("This property allows you to specify the supported type of the OS that application is built for.

    Possible values are:

    **Windows**

    **Linux**") + /** + * This property allows you to specify the supported type of the OS that application is built for.

    Possible values are:

    **Windows**

    **Linux** + */ supportedOSType: OperatingSystemTypes; - @doc("A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application.") + /** + * A list of custom actions that can be performed with all of the Gallery Application Versions within this Gallery Application. + */ customActions?: GalleryApplicationCustomAction[]; } -@doc("A custom action that can be performed with a Gallery Application Version.") +/** + * A custom action that can be performed with a Gallery Application Version. + */ model GalleryApplicationCustomAction { - @doc("The name of the custom action. Must be unique within the Gallery Application Version.") + /** + * The name of the custom action. Must be unique within the Gallery Application Version. + */ name: string; - @doc("The script to run when executing this custom action.") + /** + * The script to run when executing this custom action. + */ script: string; - @doc("Description to help the users understand what this custom action does.") + /** + * Description to help the users understand what this custom action does. + */ description?: string; - @doc("The parameters that this custom action uses") + /** + * The parameters that this custom action uses + */ parameters?: GalleryApplicationCustomActionParameter[]; } -@doc("The definition of a parameter that can be passed to a custom action of a Gallery Application Version.") +/** + * The definition of a parameter that can be passed to a custom action of a Gallery Application Version. + */ model GalleryApplicationCustomActionParameter { - @doc("The name of the custom action. Must be unique within the Gallery Application Version.") + /** + * The name of the custom action. Must be unique within the Gallery Application Version. + */ name: string; - @doc("Indicates whether this parameter must be passed when running the custom action.") + /** + * Indicates whether this parameter must be passed when running the custom action. + */ required?: boolean; - @doc("Specifies the type of the custom action parameter. Possible values are: String, ConfigurationDataBlob or LogOutputBlob") + /** + * Specifies the type of the custom action parameter. Possible values are: String, ConfigurationDataBlob or LogOutputBlob + */ type?: GalleryApplicationCustomActionParameterType; - @doc("The default value of the parameter. Only applies to string types") + /** + * The default value of the parameter. Only applies to string types + */ defaultValue?: string; - @doc("A description to help users understand what this parameter means") + /** + * A description to help users understand what this parameter means + */ description?: string; } -@doc("Specifies information about the gallery Application Definition that you want to update.") +/** + * Specifies information about the gallery Application Definition that you want to update. + */ model GalleryApplicationUpdate extends UpdateResourceDefinition { - @doc("Describes the properties of a gallery Application Definition.") + /** + * Describes the properties of a gallery Application Definition. + */ properties?: GalleryApplicationProperties; } -@doc("Describes the properties of a gallery image version.") +/** + * Describes the properties of a gallery image version. + */ model GalleryApplicationVersionProperties { - @doc("The publishing profile of a gallery image version.") + /** + * The publishing profile of a gallery image version. + */ publishingProfile: GalleryApplicationVersionPublishingProfile; - @doc("The safety profile of the Gallery Application Version.") + /** + * The safety profile of the Gallery Application Version. + */ safetyProfile?: GalleryApplicationVersionSafetyProfile; - @doc("The provisioning state, which only appears in the response.") + /** + * The provisioning state, which only appears in the response. + */ @visibility("read") provisioningState?: GalleryProvisioningState; - @doc("This is the replication status of the gallery image version.") + /** + * This is the replication status of the gallery image version. + */ @visibility("read") replicationStatus?: ReplicationStatus; } -@doc("The publishing profile of a gallery image version.") +/** + * The publishing profile of a gallery image version. + */ model GalleryApplicationVersionPublishingProfile extends GalleryArtifactPublishingProfileBase { - @doc("The source image from which the Image Version is going to be created.") + /** + * The source image from which the Image Version is going to be created. + */ source: UserArtifactSource; manageActions?: UserArtifactManage; - @doc("Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set.") + /** + * Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set. + */ settings?: UserArtifactSettings; - @doc("Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only.") + /** + * Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. + */ advancedSettings?: Record; - @doc("Optional. Whether or not this application reports health.") + /** + * Optional. Whether or not this application reports health. + */ enableHealthCheck?: boolean; - @doc("A list of custom actions that can be performed with this Gallery Application Version.") + /** + * A list of custom actions that can be performed with this Gallery Application Version. + */ customActions?: GalleryApplicationCustomAction[]; } -@doc("The source image from which the Image Version is going to be created.") +/** + * The source image from which the Image Version is going to be created. + */ model UserArtifactSource { - @doc("Required. The mediaLink of the artifact, must be a readable storage page blob.") + /** + * Required. The mediaLink of the artifact, must be a readable storage page blob. + */ mediaLink: string; - @doc("Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob.") + /** + * Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob. + */ defaultConfigurationLink?: string; } model UserArtifactManage { - @doc("Required. The path and arguments to install the gallery application. This is limited to 4096 characters.") + /** + * Required. The path and arguments to install the gallery application. This is limited to 4096 characters. + */ install: string; - @doc("Required. The path and arguments to remove the gallery application. This is limited to 4096 characters.") + /** + * Required. The path and arguments to remove the gallery application. This is limited to 4096 characters. + */ remove: string; - @doc("Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters.") + /** + * Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters. + */ update?: string; } -@doc("Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set.") +/** + * Additional settings for the VM app that contains the target package and config file name when it is deployed to target VM or VM scale set. + */ model UserArtifactSettings { - @doc("Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name.") + /** + * Optional. The name to assign the downloaded package file on the VM. This is limited to 4096 characters. If not specified, the package file will be named the same as the Gallery Application name. + */ packageFileName?: string; - @doc("Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with \"_config\".") + /** + * Optional. The name to assign the downloaded config file on the VM. This is limited to 4096 characters. If not specified, the config file will be named the Gallery Application name appended with "_config". + */ configFileName?: string; } -@doc("The safety profile of the Gallery Application Version.") +/** + * The safety profile of the Gallery Application Version. + */ model GalleryApplicationVersionSafetyProfile extends GalleryArtifactSafetyProfileBase {} -@doc("Specifies information about the gallery Application Version that you want to update.") +/** + * Specifies information about the gallery Application Version that you want to update. + */ model GalleryApplicationVersionUpdate extends UpdateResourceDefinition { - @doc("Describes the properties of a gallery image version.") + /** + * Describes the properties of a gallery image version. + */ properties?: GalleryApplicationVersionProperties; } -@doc("Specifies information about the gallery sharing profile update.") +/** + * Specifies information about the gallery sharing profile update. + */ model SharingUpdate { - @doc("This property allows you to specify the operation type of gallery sharing update.

    Possible values are:

    **Add**

    **Remove**

    **Reset**") + /** + * This property allows you to specify the operation type of gallery sharing update.

    Possible values are:

    **Add**

    **Remove**

    **Reset** + */ operationType: SharingUpdateOperationTypes; - @doc("A list of sharing profile groups.") + /** + * A list of sharing profile groups. + */ groups?: SharingProfileGroup[]; } -@doc("Base information about the shared gallery resource in pir.") +/** + * Base information about the shared gallery resource in pir. + */ model PirSharedGalleryResource extends PirResource { - @doc("The identifier information of shared gallery.") + /** + * The identifier information of shared gallery. + */ identifier?: SharedGalleryIdentifier; } -@doc("The identifier information of shared gallery.") +/** + * The identifier information of shared gallery. + */ model SharedGalleryIdentifier { - @doc("The unique id of this shared gallery.") + /** + * The unique id of this shared gallery. + */ uniqueId?: string; } -@doc("The Resource model definition.") +/** + * The Resource model definition. + */ model PirResource { - @doc("Resource name") + /** + * Resource name + */ @visibility("read") name?: string; - @doc("Resource location") + /** + * Resource location + */ @visibility("read") location?: string; } -@doc("Describes the properties of a gallery image definition.") +/** + * Describes the properties of a gallery image definition. + */ model SharedGalleryImageProperties { - @doc("This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

    Possible values are:

    **Windows**

    **Linux**") + /** + * This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

    Possible values are:

    **Windows**

    **Linux** + */ osType: OperatingSystemTypes; - @doc("This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'.") + /** + * This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. + */ osState: OperatingSystemStateTypes; - @doc("The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable.") + /** + * The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endOfLifeDate?: utcDateTime; - @doc("This is the gallery image definition identifier.") + /** + * This is the gallery image definition identifier. + */ identifier: GalleryImageIdentifier; - @doc("The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.") + /** + * The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. + */ recommended?: RecommendedMachineConfiguration; - @doc("Describes the disallowed disk types.") + /** + * Describes the disallowed disk types. + */ disallowed?: Disallowed; - @doc("The hypervisor generation of the Virtual Machine. Applicable to OS disks only.") + /** + * The hypervisor generation of the Virtual Machine. Applicable to OS disks only. + */ hyperVGeneration?: HyperVGeneration; - @doc("A list of gallery image features.") + /** + * A list of gallery image features. + */ features?: GalleryImageFeature[]; - @doc("Describes the gallery image definition purchase plan. This is used by marketplace images.") + /** + * Describes the gallery image definition purchase plan. This is used by marketplace images. + */ purchasePlan?: ImagePurchasePlan; - @doc("The architecture of the image. Applicable to OS disks only.") + /** + * The architecture of the image. Applicable to OS disks only. + */ architecture?: Architecture; - @doc("Privacy statement uri for the current community gallery image.") + /** + * Privacy statement uri for the current community gallery image. + */ privacyStatementUri?: string; - @doc("End-user license agreement for the current community gallery image.") + /** + * End-user license agreement for the current community gallery image. + */ eula?: string; } -@doc("Describes the properties of a gallery image version.") +/** + * Describes the properties of a gallery image version. + */ model SharedGalleryImageVersionProperties { - @doc("The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable.") + /** + * The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. publishedDate?: utcDateTime; - @doc("The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable.") + /** + * The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endOfLifeDate?: utcDateTime; - @doc("If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.") + /** + * If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. + */ excludeFromLatest?: boolean; - @doc("Describes the storage profile of the image version.") + /** + * Describes the storage profile of the image version. + */ storageProfile?: SharedGalleryImageVersionStorageProfile; } -@doc("This is the storage profile of a Gallery Image Version.") +/** + * This is the storage profile of a Gallery Image Version. + */ model SharedGalleryImageVersionStorageProfile { - @doc("This is the OS disk image.") + /** + * This is the OS disk image. + */ osDiskImage?: SharedGalleryOSDiskImage; - @doc("A list of data disk images.") + /** + * A list of data disk images. + */ dataDiskImages?: SharedGalleryDataDiskImage[]; } -@doc("This is the OS disk image.") +/** + * This is the OS disk image. + */ model SharedGalleryOSDiskImage extends SharedGalleryDiskImage {} -@doc("This is the disk image base class.") +/** + * This is the disk image base class. + */ model SharedGalleryDiskImage { - @doc("This property indicates the size of the VHD to be created.") + /** + * This property indicates the size of the VHD to be created. + */ @visibility("read") diskSizeGB?: int32; - @doc("The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'") + /** + * The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite' + */ hostCaching?: SharedGalleryHostCaching; } -@doc("This is the data disk image.") +/** + * This is the data disk image. + */ model SharedGalleryDataDiskImage extends SharedGalleryDiskImage { - @doc("This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.") + /** + * This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine. + */ lun: int32; } -@doc("Base information about the community gallery resource in pir.") +/** + * Base information about the community gallery resource in pir. + */ model PirCommunityGalleryResource { - @doc("Resource name") + /** + * Resource name + */ @visibility("read") name?: string; - @doc("Resource location") + /** + * Resource location + */ @visibility("read") location?: string; - @doc("Resource type") + /** + * Resource type + */ @visibility("read") type?: string; - @doc("The identifier information of community gallery.") + /** + * The identifier information of community gallery. + */ identifier?: CommunityGalleryIdentifier; } -@doc("The identifier information of community gallery.") +/** + * The identifier information of community gallery. + */ model CommunityGalleryIdentifier { - @doc("The unique id of this community gallery.") + /** + * The unique id of this community gallery. + */ uniqueId?: string; } -@doc("Describes the properties of a gallery image definition.") +/** + * Describes the properties of a gallery image definition. + */ model CommunityGalleryImageProperties { - @doc("This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

    Possible values are:

    **Windows**

    **Linux**") + /** + * This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.

    Possible values are:

    **Windows**

    **Linux** + */ osType: OperatingSystemTypes; - @doc("This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'.") + /** + * This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. + */ osState: OperatingSystemStateTypes; - @doc("The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable.") + /** + * The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endOfLifeDate?: utcDateTime; - @doc("This is the community gallery image definition identifier.") + /** + * This is the community gallery image definition identifier. + */ identifier: CommunityGalleryImageIdentifier; - @doc("The properties describe the recommended machine configuration for this Image Definition. These properties are updatable.") + /** + * The properties describe the recommended machine configuration for this Image Definition. These properties are updatable. + */ recommended?: RecommendedMachineConfiguration; - @doc("Describes the disallowed disk types.") + /** + * Describes the disallowed disk types. + */ disallowed?: Disallowed; - @doc("The hypervisor generation of the Virtual Machine. Applicable to OS disks only.") + /** + * The hypervisor generation of the Virtual Machine. Applicable to OS disks only. + */ hyperVGeneration?: HyperVGeneration; - @doc("A list of gallery image features.") + /** + * A list of gallery image features. + */ features?: GalleryImageFeature[]; - @doc("Describes the gallery image definition purchase plan. This is used by marketplace images.") + /** + * Describes the gallery image definition purchase plan. This is used by marketplace images. + */ purchasePlan?: ImagePurchasePlan; - @doc("The architecture of the image. Applicable to OS disks only.") + /** + * The architecture of the image. Applicable to OS disks only. + */ architecture?: Architecture; - @doc("Privacy statement uri for the current community gallery image.") + /** + * Privacy statement uri for the current community gallery image. + */ privacyStatementUri?: string; - @doc("End-user license agreement for the current community gallery image.") + /** + * End-user license agreement for the current community gallery image. + */ eula?: string; } -@doc("This is the community gallery image definition identifier.") +/** + * This is the community gallery image definition identifier. + */ model CommunityGalleryImageIdentifier { - @doc("The name of the gallery image definition publisher.") + /** + * The name of the gallery image definition publisher. + */ publisher?: string; - @doc("The name of the gallery image definition offer.") + /** + * The name of the gallery image definition offer. + */ offer?: string; - @doc("The name of the gallery image definition SKU.") + /** + * The name of the gallery image definition SKU. + */ sku?: string; } -@doc("Describes the properties of a gallery image version.") +/** + * Describes the properties of a gallery image version. + */ model CommunityGalleryImageVersionProperties { - @doc("The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable.") + /** + * The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. publishedDate?: utcDateTime; - @doc("The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable.") + /** + * The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endOfLifeDate?: utcDateTime; - @doc("If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.") + /** + * If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version. + */ excludeFromLatest?: boolean; - @doc("Describes the storage profile of the image version.") + /** + * Describes the storage profile of the image version. + */ storageProfile?: SharedGalleryImageVersionStorageProfile; } -@doc("The role instance SKU.") +/** + * The role instance SKU. + */ model InstanceSku { - @doc("The sku name.") + /** + * The sku name. + */ @visibility("read") name?: string; - @doc("The tier of the cloud service role instance.") + /** + * The tier of the cloud service role instance. + */ @visibility("read") tier?: string; } -@doc("Role instance properties.") +/** + * Role instance properties. + */ model RoleInstanceProperties { - @doc("Describes the network profile for the role instance.") + /** + * Describes the network profile for the role instance. + */ networkProfile?: RoleInstanceNetworkProfile; - @doc("The instance view of the role instance.") + /** + * The instance view of the role instance. + */ instanceView?: RoleInstanceInstanceView; } -@doc("Describes the network profile for the role instance.") +/** + * Describes the network profile for the role instance. + */ model RoleInstanceNetworkProfile { - @doc("Specifies the list of resource Ids for the network interfaces associated with the role instance.") + /** + * Specifies the list of resource Ids for the network interfaces associated with the role instance. + */ @visibility("read") networkInterfaces?: SubResource[]; } -@doc("The instance view of the role instance.") +/** + * The instance view of the role instance. + */ model RoleInstanceInstanceView { - @doc("The Update Domain.") + /** + * The Update Domain. + */ @visibility("read") platformUpdateDomain?: int32; - @doc("The Fault Domain.") + /** + * The Fault Domain. + */ @visibility("read") platformFaultDomain?: int32; - @doc("Specifies a unique identifier generated internally for the cloud service associated with this role instance.

    NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details.") + /** + * Specifies a unique identifier generated internally for the cloud service associated with this role instance.

    NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details. + */ @visibility("read") privateId?: string; @@ -6802,275 +10669,417 @@ model RoleInstanceInstanceView { statuses?: ResourceInstanceViewStatus[]; } -@doc("Instance view status.") +/** + * Instance view status. + */ model ResourceInstanceViewStatus { - @doc("The status code.") + /** + * The status code. + */ @visibility("read") code?: string; - @doc("The short localizable label for the status.") + /** + * The short localizable label for the status. + */ @visibility("read") displayStatus?: string; - @doc("The detailed status message, including for alerts and error messages.") + /** + * The detailed status message, including for alerts and error messages. + */ @visibility("read") message?: string; - @doc("The time of the status.") + /** + * The time of the status. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. time?: utcDateTime; - @doc("The level code.") + /** + * The level code. + */ level?: StatusLevelTypes; } -@doc("Describes the cloud service role sku.") +/** + * Describes the cloud service role sku. + */ model CloudServiceRoleSku { - @doc("The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete and recreate the cloud service or move back to the old sku.") + /** + * The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete and recreate the cloud service or move back to the old sku. + */ name?: string; - @doc("Specifies the tier of the cloud service. Possible Values are

    **Standard**

    **Basic**") + /** + * Specifies the tier of the cloud service. Possible Values are

    **Standard**

    **Basic** + */ tier?: string; - @doc("Specifies the number of role instances in the cloud service.") - capacity?: int32; + /** + * Specifies the number of role instances in the cloud service. + */ + capacity?: int64; } -@doc("The cloud service role properties.") +/** + * The cloud service role properties. + */ model CloudServiceRoleProperties { - @doc("Specifies the ID which uniquely identifies a cloud service role.") + /** + * Specifies the ID which uniquely identifies a cloud service role. + */ @visibility("read") uniqueId?: string; } -@doc("Cloud service properties") +/** + * Cloud service properties + */ model CloudServiceProperties { - @doc(""" -Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. + /** +* Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. This is a write-only property and is not returned in GET calls. -""") +*/ packageUrl?: string; - @doc("Specifies the XML service configuration (.cscfg) for the cloud service.") + /** + * Specifies the XML service configuration (.cscfg) for the cloud service. + */ configuration?: string; - @doc(""" -Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. + /** +* Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. This is a write-only property and is not returned in GET calls. -""") +*/ configurationUrl?: string; - @doc(""" -(Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`. + /** +* (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`. If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff. -""") +*/ startCloudService?: boolean; - @doc(""" -(Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively. + /** +* (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively. The default value is `false`. -""") +*/ allowModelOverride?: boolean; - @doc(""" -Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. + /** +* Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. Possible Values are

    **Auto**

    **Manual**

    **Simultaneous**

    If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. -""") +*/ upgradeMode?: CloudServiceUpgradeMode; - @doc("Describes the role profile for the cloud service.") + /** + * Describes the role profile for the cloud service. + */ roleProfile?: CloudServiceRoleProfile; - @doc("Describes the OS profile for the cloud service.") + /** + * Describes the OS profile for the cloud service. + */ osProfile?: CloudServiceOsProfile; - @doc("Network Profile for the cloud service.") + /** + * Network Profile for the cloud service. + */ networkProfile?: CloudServiceNetworkProfile; - @doc("Describes a cloud service extension profile.") + /** + * Describes a cloud service extension profile. + */ extensionProfile?: CloudServiceExtensionProfile; - @doc("The provisioning state, which only appears in the response.") + /** + * The provisioning state, which only appears in the response. + */ @visibility("read") provisioningState?: string; - @doc("The unique identifier for the cloud service.") + /** + * The unique identifier for the cloud service. + */ @visibility("read") uniqueId?: string; } -@doc("Describes the role profile for the cloud service.") +/** + * Describes the role profile for the cloud service. + */ model CloudServiceRoleProfile { - @doc("List of roles for the cloud service.") + /** + * List of roles for the cloud service. + */ roles?: CloudServiceRoleProfileProperties[]; } -@doc("Describes the role properties.") +/** + * Describes the role properties. + */ model CloudServiceRoleProfileProperties { - @doc("Resource name.") + /** + * Resource name. + */ name?: string; - @doc("Describes the cloud service role sku.") + /** + * Describes the cloud service role sku. + */ sku?: CloudServiceRoleSku; } -@doc("Describes the OS profile for the cloud service.") +/** + * Describes the OS profile for the cloud service. + */ model CloudServiceOsProfile { - @doc("Specifies set of certificates that should be installed onto the role instances.") + /** + * Specifies set of certificates that should be installed onto the role instances. + */ secrets?: CloudServiceVaultSecretGroup[]; } -@doc("Describes a set of certificates which are all in the same Key Vault.") +/** + * Describes a set of certificates which are all in the same Key Vault. + */ model CloudServiceVaultSecretGroup { - @doc("The relative URL of the Key Vault containing all of the certificates in VaultCertificates.") + /** + * The relative URL of the Key Vault containing all of the certificates in VaultCertificates. + */ sourceVault?: SubResource; - @doc("The list of key vault references in SourceVault which contain certificates.") + /** + * The list of key vault references in SourceVault which contain certificates. + */ vaultCertificates?: CloudServiceVaultCertificate[]; } -@doc("Describes a single certificate reference in a Key Vault, and where the certificate should reside on the role instance.") +/** + * Describes a single certificate reference in a Key Vault, and where the certificate should reside on the role instance. + */ model CloudServiceVaultCertificate { - @doc("This is the URL of a certificate that has been uploaded to Key Vault as a secret.") + /** + * This is the URL of a certificate that has been uploaded to Key Vault as a secret. + */ certificateUrl?: string; } -@doc("Network Profile for the cloud service.") +/** + * Network Profile for the cloud service. + */ model CloudServiceNetworkProfile { - @doc("List of Load balancer configurations. Cloud service can have up to two load balancer configurations, corresponding to a Public Load Balancer and an Internal Load Balancer.") + /** + * List of Load balancer configurations. Cloud service can have up to two load balancer configurations, corresponding to a Public Load Balancer and an Internal Load Balancer. + */ loadBalancerConfigurations?: LoadBalancerConfiguration[]; - @doc(""" -Slot type for the cloud service. + /** +* Slot type for the cloud service. Possible values are

    **Production**

    **Staging**

    If not specified, the default value is Production. -""") +*/ slotType?: CloudServiceSlotType; - @doc("The id reference of the cloud service containing the target IP with which the subject cloud service can perform a swap. This property cannot be updated once it is set. The swappable cloud service referred by this id must be present otherwise an error will be thrown.") + /** + * The id reference of the cloud service containing the target IP with which the subject cloud service can perform a swap. This property cannot be updated once it is set. The swappable cloud service referred by this id must be present otherwise an error will be thrown. + */ swappableCloudService?: SubResource; } -@doc("Describes the load balancer configuration.") +/** + * Describes the load balancer configuration. + */ model LoadBalancerConfiguration { - @doc("Resource Id") + /** + * Resource Id + */ id?: string; - @doc("The name of the Load balancer") + /** + * The name of the Load balancer + */ name: string; - @doc("Properties of the load balancer configuration.") + /** + * Properties of the load balancer configuration. + */ properties: LoadBalancerConfigurationProperties; } -@doc("Describes the properties of the load balancer configuration.") +/** + * Describes the properties of the load balancer configuration. + */ model LoadBalancerConfigurationProperties { - @doc("Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration.") + /** + * Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration. + */ frontendIpConfigurations: LoadBalancerFrontendIpConfiguration[]; } -@doc("Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration.") +/** + * Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration. + */ model LoadBalancerFrontendIpConfiguration { - @doc("The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource.") + /** + * The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. + */ name: string; - @doc("Properties of load balancer frontend ip configuration.") + /** + * Properties of load balancer frontend ip configuration. + */ properties: LoadBalancerFrontendIpConfigurationProperties; } -@doc("Describes a cloud service IP Configuration") +/** + * Describes a cloud service IP Configuration + */ model LoadBalancerFrontendIpConfigurationProperties { - @doc("The reference to the public ip address resource.") + /** + * The reference to the public ip address resource. + */ publicIPAddress?: SubResource; - @doc("The reference to the virtual network subnet resource.") + /** + * The reference to the virtual network subnet resource. + */ subnet?: SubResource; - @doc("The virtual network private IP address of the IP configuration.") + /** + * The virtual network private IP address of the IP configuration. + */ privateIPAddress?: string; } -@doc("Describes a cloud service extension profile.") +/** + * Describes a cloud service extension profile. + */ model CloudServiceExtensionProfile { - @doc("List of extensions for the cloud service.") + /** + * List of extensions for the cloud service. + */ extensions?: Extension[]; } -@doc("Describes a cloud service Extension.") +/** + * Describes a cloud service Extension. + */ model Extension { - @doc("The name of the extension.") + /** + * The name of the extension. + */ name?: string; - @doc("Extension Properties.") + /** + * Extension Properties. + */ properties?: CloudServiceExtensionProperties; } -@doc("Extension Properties.") +/** + * Extension Properties. + */ model CloudServiceExtensionProperties { - @doc("The name of the extension handler publisher.") + /** + * The name of the extension handler publisher. + */ publisher?: string; - @doc("Specifies the type of the extension.") + /** + * Specifies the type of the extension. + */ type?: string; - @doc("Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance.") + /** + * Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance. + */ typeHandlerVersion?: string; - @doc("Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available.") + /** + * Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available. + */ autoUpgradeMinorVersion?: boolean; - @doc("Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension.") + /** + * Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension. + */ settings?: Record; - @doc("Protected settings for the extension which are encrypted before sent to the role instance.") + /** + * Protected settings for the extension which are encrypted before sent to the role instance. + */ protectedSettings?: Record; - @doc("Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance.") + /** + * Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance. + */ protectedSettingsFromKeyVault?: CloudServiceVaultAndSecretReference; - @doc(""" -Tag to force apply the provided public and protected settings. + /** +* Tag to force apply the provided public and protected settings. Changing the tag value allows for re-running the extension without changing any of the public or protected settings. If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler. If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and it is up to handler implementation whether to re-run it or not -""") +*/ forceUpdateTag?: string; - @doc("The provisioning state, which only appears in the response.") + /** + * The provisioning state, which only appears in the response. + */ @visibility("read") provisioningState?: string; - @doc("Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service.") + /** + * Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service. + */ rolesAppliedTo?: string[]; } -@doc("Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance.") +/** + * Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance. + */ model CloudServiceVaultAndSecretReference { - @doc("The ARM Resource ID of the Key Vault") + /** + * The ARM Resource ID of the Key Vault + */ sourceVault?: SubResource; - @doc("Secret URL which contains the protected settings of the extension") + /** + * Secret URL which contains the protected settings of the extension + */ secretUrl?: string; } model CloudServiceUpdate { - @doc("Resource tags") + /** + * Resource tags + */ tags?: Record; } -@doc("InstanceView of CloudService as a whole") +/** + * InstanceView of CloudService as a whole + */ model CloudServiceInstanceView { - @doc("Instance view statuses.") + /** + * Instance view statuses. + */ roleInstance?: InstanceViewStatusesSummary; - @doc("The version of the SDK that was used to generate the package for the cloud service.") + /** + * The version of the SDK that was used to generate the package for the cloud service. + */ @visibility("read") sdkVersion?: string; - @doc("Specifies a list of unique identifiers generated internally for the cloud service.

    NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details.") + /** + * Specifies a list of unique identifiers generated internally for the cloud service.

    NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details. + */ @visibility("read") privateIds?: string[]; @@ -7078,122 +11087,190 @@ model CloudServiceInstanceView { statuses?: ResourceInstanceViewStatus[]; } -@doc("Instance view statuses.") +/** + * Instance view statuses. + */ model InstanceViewStatusesSummary { - @doc("The summary.") + /** + * The summary. + */ @visibility("read") statusesSummary?: StatusCodeCount[]; } -@doc("The status code and count of the cloud service instance view statuses") +/** + * The status code and count of the cloud service instance view statuses + */ model StatusCodeCount { - @doc("The instance view status code") + /** + * The instance view status code + */ @visibility("read") code?: string; - @doc("Number of instances having this status code") + /** + * Number of instances having this status code + */ @visibility("read") count?: int32; } -@doc("Specifies a list of role instances from the cloud service.") +/** + * Specifies a list of role instances from the cloud service. + */ model RoleInstances { - @doc("List of cloud service role instance names. Value of '*' will signify all role instances of the cloud service.") + /** + * List of cloud service role instance names. Value of '*' will signify all role instances of the cloud service. + */ roleInstances: string[]; } -@doc("Defines an update domain for the cloud service.") +/** + * Defines an update domain for the cloud service. + */ model UpdateDomain { - @doc("Resource Id") + /** + * Resource Id + */ @visibility("read") id?: string; - @doc("Resource Name") + /** + * Resource Name + */ @visibility("read") name?: string; } -@doc("The list operation result.") +/** + * The list operation result. + */ model UpdateDomainListResult is Azure.Core.Page; -@doc("OS version properties.") +/** + * OS version properties. + */ model OSVersionProperties { - @doc("The family of this OS version.") + /** + * The family of this OS version. + */ @visibility("read") family?: string; - @doc("The family label of this OS version.") + /** + * The family label of this OS version. + */ @visibility("read") familyLabel?: string; - @doc("The OS version.") + /** + * The OS version. + */ @visibility("read") version?: string; - @doc("The OS version label.") + /** + * The OS version label. + */ @visibility("read") label?: string; - @doc("Specifies whether this is the default OS version for its family.") + /** + * Specifies whether this is the default OS version for its family. + */ @visibility("read") isDefault?: boolean; - @doc("Specifies whether this OS version is active.") + /** + * Specifies whether this OS version is active. + */ @visibility("read") isActive?: boolean; } -@doc("OS family properties.") +/** + * OS family properties. + */ model OSFamilyProperties { - @doc("The OS family name.") + /** + * The OS family name. + */ @visibility("read") name?: string; - @doc("The OS family label.") + /** + * The OS family label. + */ @visibility("read") label?: string; - @doc("List of OS versions belonging to this family.") + /** + * List of OS versions belonging to this family. + */ @visibility("read") versions?: OSVersionPropertiesBase[]; } -@doc("Configuration view of an OS version.") +/** + * Configuration view of an OS version. + */ model OSVersionPropertiesBase { - @doc("The OS version.") + /** + * The OS version. + */ @visibility("read") version?: string; - @doc("The OS version label.") + /** + * The OS version label. + */ @visibility("read") label?: string; - @doc("Specifies whether this is the default OS version for its family.") + /** + * Specifies whether this is the default OS version for its family. + */ @visibility("read") isDefault?: boolean; - @doc("Specifies whether this OS version is active.") + /** + * Specifies whether this OS version is active. + */ @visibility("read") isActive?: boolean; } -@doc("The source image from which the Image Version is going to be created.") +/** + * The source image from which the Image Version is going to be created. + */ model GalleryArtifactSource { - @doc("The managed artifact.") + /** + * The managed artifact. + */ managedImage: ManagedArtifact; } -@doc("The managed artifact.") +/** + * The managed artifact. + */ model ManagedArtifact { - @doc("The managed artifact id.") + /** + * The managed artifact id. + */ id: string; } -@doc("The gallery image version with latest version in a particular region.") +/** + * The gallery image version with latest version in a particular region. + */ model LatestGalleryImageVersion { - @doc("The name of the latest version in the region.") + /** + * The name of the latest version in the region. + */ latestVersionName?: string; - @doc("region of the Gallery Image Version.") + /** + * region of the Gallery Image Version. + */ location?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp index 4a282b4819..503adc9526 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp @@ -10,17 +10,23 @@ using Azure.ResourceManager; namespace Microsoft.Compute; interface UsageOperations { - @doc("Gets, for the specified location, the current compute resource usage information as well as the limits for compute resources under the subscription.") + /** + * Gets, for the specified location, the current compute resource usage information as well as the limits for compute resources under the subscription. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The location for which resource usage is queried.") + /** + * The location for which resource usage is queried. + */ @pattern("^[-\\w\\._]+$") @path location: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, @@ -29,17 +35,23 @@ interface UsageOperations { } interface VirtualMachineSizesOperations { - @doc("This API is deprecated. Use [Resources Skus](https://docs.microsoft.com/rest/api/compute/resourceskus/list)") + /** + * This API is deprecated. Use [Resources Skus](https://docs.microsoft.com/rest/api/compute/resourceskus/list) + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The location upon which virtual-machine-sizes is queried.") + /** + * The location upon which virtual-machine-sizes is queried. + */ @pattern("^[-\\w\\._]+$") @path location: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, @@ -48,60 +60,86 @@ interface VirtualMachineSizesOperations { } interface VirtualMachineImagesOperations { - @doc("Gets a virtual machine image.") + /** + * Gets a virtual machine image. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The name of a supported Azure region.") + /** + * The name of a supported Azure region. + */ @path location: string; - @doc("A valid image publisher.") + /** + * A valid image publisher. + */ @path publisherName: string; - @doc("A valid image publisher offer.") + /** + * A valid image publisher offer. + */ @path offer: string; - @doc("A valid image SKU.") + /** + * A valid image SKU. + */ @path skus: string; - @doc("A valid image SKU version.") + /** + * A valid image SKU version. + */ @path version: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, VirtualMachineImage >; - @doc("Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU.") + /** + * Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The name of a supported Azure region.") + /** + * The name of a supported Azure region. + */ @path location: string; - @doc("A valid image publisher.") + /** + * A valid image publisher. + */ @path publisherName: string; - @doc("A valid image publisher offer.") + /** + * A valid image publisher offer. + */ @path offer: string; - @doc("A valid image SKU.") + /** + * A valid image SKU. + */ @path skus: string; - @doc("The expand expression to apply on the operation.") + /** + * The expand expression to apply on the operation. + */ @query("$expand") $expand?: string; @@ -111,87 +149,121 @@ interface VirtualMachineImagesOperations { @query("$orderby") $orderby?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Gets a list of virtual machine image offers for the specified location and publisher.") + /** + * Gets a list of virtual machine image offers for the specified location and publisher. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers") @get - ListOffers is Azure.Core.Foundations.Operation< + listOffers is Azure.Core.Foundations.Operation< { - @doc("The name of a supported Azure region.") + /** + * The name of a supported Azure region. + */ @path location: string; - @doc("A valid image publisher.") + /** + * A valid image publisher. + */ @path publisherName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Gets a list of virtual machine image publishers for the specified Azure location.") + /** + * Gets a list of virtual machine image publishers for the specified Azure location. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers") @get - ListPublishers is Azure.Core.Foundations.Operation< + listPublishers is Azure.Core.Foundations.Operation< { - @doc("The name of a supported Azure region.") + /** + * The name of a supported Azure region. + */ @path location: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Gets a list of virtual machine image SKUs for the specified location, publisher, and offer.") + /** + * Gets a list of virtual machine image SKUs for the specified location, publisher, and offer. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus") @get - ListSkus is Azure.Core.Foundations.Operation< + listSkus is Azure.Core.Foundations.Operation< { - @doc("The name of a supported Azure region.") + /** + * The name of a supported Azure region. + */ @path location: string; - @doc("A valid image publisher.") + /** + * A valid image publisher. + */ @path publisherName: string; - @doc("A valid image publisher offer.") + /** + * A valid image publisher offer. + */ @path offer: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Gets a list of all virtual machine image versions for the specified edge zone") + /** + * Gets a list of all virtual machine image versions for the specified edge zone + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/vmimages") @get - ListByEdgeZone is Azure.Core.Foundations.Operation< + listByEdgeZone is Azure.Core.Foundations.Operation< { - @doc("The name of a supported Azure region.") + /** + * The name of a supported Azure region. + */ @path location: string; - @doc("The name of the edge zone.") + /** + * The name of the edge zone. + */ @path edgeZone: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, @@ -200,152 +272,218 @@ interface VirtualMachineImagesOperations { } interface VirtualMachineImagesEdgeZoneOperations { - @doc("Gets a virtual machine image in an edge zone.") + /** + * Gets a virtual machine image in an edge zone. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The name of a supported Azure region.") + /** + * The name of a supported Azure region. + */ @path location: string; - @doc("The name of the edge zone.") + /** + * The name of the edge zone. + */ @path edgeZone: string; - @doc("A valid image publisher.") + /** + * A valid image publisher. + */ @path publisherName: string; - @doc("A valid image publisher offer.") + /** + * A valid image publisher offer. + */ @path offer: string; - @doc("A valid image SKU.") + /** + * A valid image SKU. + */ @path skus: string; - @doc("A valid image SKU version.") + /** + * A valid image SKU version. + */ @path version: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, VirtualMachineImage >; - @doc("Gets a list of all virtual machine image versions for the specified location, edge zone, publisher, offer, and SKU.") + /** + * Gets a list of all virtual machine image versions for the specified location, edge zone, publisher, offer, and SKU. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The name of a supported Azure region.") + /** + * The name of a supported Azure region. + */ @path location: string; - @doc("The name of the edge zone.") + /** + * The name of the edge zone. + */ @path edgeZone: string; - @doc("A valid image publisher.") + /** + * A valid image publisher. + */ @path publisherName: string; - @doc("A valid image publisher offer.") + /** + * A valid image publisher offer. + */ @path offer: string; - @doc("A valid image SKU.") + /** + * A valid image SKU. + */ @path skus: string; - @doc("The expand expression to apply on the operation.") + /** + * The expand expression to apply on the operation. + */ @query("$expand") $expand?: string; - @doc("An integer value specifying the number of images to return that matches supplied values.") + /** + * An integer value specifying the number of images to return that matches supplied values. + */ @query("$top") $top?: int32; - @doc("Specifies the order of the results returned. Formatted as an OData query.") + /** + * Specifies the order of the results returned. Formatted as an OData query. + */ @query("$orderby") $orderby?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Gets a list of virtual machine image offers for the specified location, edge zone and publisher.") + /** + * Gets a list of virtual machine image offers for the specified location, edge zone and publisher. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers") @get - ListOffers is Azure.Core.Foundations.Operation< + listOffers is Azure.Core.Foundations.Operation< { - @doc("The name of a supported Azure region.") + /** + * The name of a supported Azure region. + */ @path location: string; - @doc("The name of the edge zone.") + /** + * The name of the edge zone. + */ @path edgeZone: string; - @doc("A valid image publisher.") + /** + * A valid image publisher. + */ @path publisherName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Gets a list of virtual machine image publishers for the specified Azure location and edge zone.") + /** + * Gets a list of virtual machine image publishers for the specified Azure location and edge zone. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers") @get - ListPublishers is Azure.Core.Foundations.Operation< + listPublishers is Azure.Core.Foundations.Operation< { - @doc("The name of a supported Azure region.") + /** + * The name of a supported Azure region. + */ @path location: string; - @doc("The name of the edge zone.") + /** + * The name of the edge zone. + */ @path edgeZone: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, void >; - @doc("Gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and offer.") + /** + * Gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and offer. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus") @get - ListSkus is Azure.Core.Foundations.Operation< + listSkus is Azure.Core.Foundations.Operation< { - @doc("The name of a supported Azure region.") + /** + * The name of a supported Azure region. + */ @path location: string; - @doc("The name of the edge zone.") + /** + * The name of the edge zone. + */ @path edgeZone: string; - @doc("A valid image publisher.") + /** + * A valid image publisher. + */ @path publisherName: string; - @doc("A valid image publisher offer.") + /** + * A valid image publisher offer. + */ @path offer: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, @@ -354,12 +492,16 @@ interface VirtualMachineImagesEdgeZoneOperations { } interface VirtualMachineExtensionImagesOperations { - @doc("Gets a list of virtual machine extension image versions.") + /** + * Gets a list of virtual machine extension image versions. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions") @get - ListVersions is Azure.Core.Foundations.Operation< + listVersions is Azure.Core.Foundations.Operation< { - @doc("The name of a supported Azure region.") + /** + * The name of a supported Azure region. + */ @path location: string; @@ -369,7 +511,9 @@ interface VirtualMachineExtensionImagesOperations { @path type: string; - @doc("The filter to apply on the operation.") + /** + * The filter to apply on the operation. + */ @query("$filter") $filter?: string; @@ -379,7 +523,9 @@ interface VirtualMachineExtensionImagesOperations { @query("$orderby") $orderby?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; }, @@ -388,42 +534,58 @@ interface VirtualMachineExtensionImagesOperations { } interface LogAnalyticsOperations { - @doc("Export logs that show Api requests made by this subscription in the given time window to show throttling activities.") + /** + * Export logs that show Api requests made by this subscription in the given time window to show throttling activities. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval") @post - ExportRequestRateByInterval is Azure.Core.Foundations.Operation< + exportRequestRateByInterval is Azure.Core.Foundations.Operation< { - @doc("The location upon which virtual-machine-sizes is queried.") + /** + * The location upon which virtual-machine-sizes is queried. + */ @pattern("^[-\\w\\._]+$") @path location: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("Parameters supplied to the LogAnalytics getRequestRateByInterval Api.") + /** + * Parameters supplied to the LogAnalytics getRequestRateByInterval Api. + */ @body parameters: RequestRateByIntervalInput; }, LogAnalyticsOperationResult | void >; - @doc("Export logs that show total throttled Api requests for this subscription in the given time window.") + /** + * Export logs that show total throttled Api requests for this subscription in the given time window. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests") @post - ExportThrottledRequests is Azure.Core.Foundations.Operation< + exportThrottledRequests is Azure.Core.Foundations.Operation< { - @doc("The location upon which virtual-machine-sizes is queried.") + /** + * The location upon which virtual-machine-sizes is queried. + */ @pattern("^[-\\w\\._]+$") @path location: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("Parameters supplied to the LogAnalytics getThrottledRequests Api.") + /** + * Parameters supplied to the LogAnalytics getThrottledRequests Api. + */ @body parameters: ThrottledRequestsInput; }, @@ -432,172 +594,248 @@ interface LogAnalyticsOperations { } interface VirtualMachineScaleSetVMRunCommandsOperations { - @doc("The operation to create or update the VMSS VM run command.") + /** + * The operation to create or update the VMSS VM run command. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("The instance ID of the virtual machine.") + /** + * The instance ID of the virtual machine. + */ @path instanceId: string; - @doc("The name of the virtual machine run command.") + /** + * The name of the virtual machine run command. + */ @path runCommandName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("Parameters supplied to the Create Virtual Machine RunCommand operation.") + /** + * Parameters supplied to the Create Virtual Machine RunCommand operation. + */ @body runCommand: VirtualMachineRunCommand; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/json, text/json"; }, VirtualMachineRunCommand >; - @doc("The operation to update the VMSS VM run command.") + /** + * The operation to update the VMSS VM run command. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") @patch - Update is Azure.Core.Foundations.Operation< + update is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("The instance ID of the virtual machine.") + /** + * The instance ID of the virtual machine. + */ @path instanceId: string; - @doc("The name of the virtual machine run command.") + /** + * The name of the virtual machine run command. + */ @path runCommandName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("Parameters supplied to the Update Virtual Machine RunCommand operation.") + /** + * Parameters supplied to the Update Virtual Machine RunCommand operation. + */ @body runCommand: VirtualMachineRunCommandUpdate; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/json, text/json"; }, VirtualMachineRunCommand >; - @doc("The operation to delete the VMSS VM run command.") + /** + * The operation to delete the VMSS VM run command. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("The instance ID of the virtual machine.") + /** + * The instance ID of the virtual machine. + */ @path instanceId: string; - @doc("The name of the virtual machine run command.") + /** + * The name of the virtual machine run command. + */ @path runCommandName: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/json, text/json"; }, void >; - @doc("The operation to get the VMSS VM run command.") + /** + * The operation to get the VMSS VM run command. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("The instance ID of the virtual machine.") + /** + * The instance ID of the virtual machine. + */ @path instanceId: string; - @doc("The name of the virtual machine run command.") + /** + * The name of the virtual machine run command. + */ @path runCommandName: string; - @doc("The expand expression to apply on the operation.") + /** + * The expand expression to apply on the operation. + */ @query("$expand") $expand?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/json, text/json"; }, VirtualMachineRunCommand >; - @doc("The operation to get all run commands of an instance in Virtual Machine Scaleset.") + /** + * The operation to get all run commands of an instance in Virtual Machine Scaleset. + */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the VM scale set.") + /** + * The name of the VM scale set. + */ @path vmScaleSetName: string; - @doc("The instance ID of the virtual machine.") + /** + * The instance ID of the virtual machine. + */ @path instanceId: string; - @doc("The expand expression to apply on the operation.") + /** + * The expand expression to apply on the operation. + */ @query("$expand") $expand?: string; - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/json, text/json"; }, @@ -606,20 +844,28 @@ interface VirtualMachineScaleSetVMRunCommandsOperations { } interface ResourceSkusOperations { - @doc("Gets the list of Microsoft.Compute SKUs available for your Subscription.") + /** + * Gets the list of Microsoft.Compute SKUs available for your Subscription. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + /** + * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + */ @path subscriptionId: string; - @doc("The filter to apply on the operation. Only **location** filter is supported currently.") + /** + * The filter to apply on the operation. Only **location** filter is supported currently. + */ @query("$filter") $filter?: string; - @doc("To Include Extended Locations information or not in the response.") + /** + * To Include Extended Locations information or not in the response. + */ @query("includeExtendedLocations") includeExtendedLocations?: string; }, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/tspconfig.yaml index 691f3c1b0c..2faa332586 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/tspconfig.yaml @@ -2,6 +2,7 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp index a4678459a7..81ad8acebf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp @@ -12,59 +12,80 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.Dns; -@doc("Describes a DNS record set (a collection of DNS records with the same name and type).") +/** + * Describes a DNS record set (a collection of DNS records with the same name and type). + */ @parentResource(DnsZone) model DnsRecord is ProxyResource { - @doc("The name of the record set, relative to the name of the zone.") + /** + * The name of the record set, relative to the name of the zone. + */ @path @key("relativeRecordSetName") @segment("A") name: string; - @doc("The etag of the record set.") + /** + * The etag of the record set. + */ etag?: string; } @armResourceOperations interface DnsRecords { + /** + * Gets a record set. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets a record set.") @operationId("RecordSets_Get") get is ArmResourceRead< DnsRecord, { ...BaseParameters; - @doc("The type of DNS record in this record set.") + /** + * The type of DNS record in this record set. + */ @path recordType: RecordType; } >; + /** + * Creates or updates a record set within a DNS zone. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or updates a record set within a DNS zone.") @operationId("RecordSets_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< DnsRecord, { ...BaseParameters; - @doc("The type of DNS record in this record set. Record sets of type SOA can be updated but not created (they are created when the DNS zone is created).") + /** + * The type of DNS record in this record set. Record sets of type SOA can be updated but not created (they are created when the DNS zone is created). + */ @path recordType: RecordType; - @doc("The etag of the record set. Omit this value to always overwrite the current record set. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.") + /** + * The etag of the record set. Omit this value to always overwrite the current record set. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes. + */ @header IfMatch?: string; - @doc("Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will be ignored.") + /** + * Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will be ignored. + */ @header IfNoneMatch?: string; } >; + /** + * Updates a record set within a DNS zone. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates a record set within a DNS zone.") + @parameterVisibility("read") @operationId("RecordSets_Update") update is ArmCustomPatchSync< DnsRecord, @@ -72,53 +93,91 @@ interface DnsRecords { { ...BaseParameters; - @doc("The type of DNS record in this record set.") + /** + * The type of DNS record in this record set. + */ @path recordType: RecordType; - @doc("The etag of the record set. Omit this value to always overwrite the current record set. Specify the last-seen etag value to prevent accidentally overwriting concurrent changes.") + /** + * The etag of the record set. Omit this value to always overwrite the current record set. Specify the last-seen etag value to prevent accidentally overwriting concurrent changes. + */ @header IfMatch?: string; } >; + /** + * Deletes a record set from a DNS zone. This operation cannot be undone. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes a record set from a DNS zone. This operation cannot be undone.") @operationId("RecordSets_Delete") delete is ArmResourceDeleteSync< DnsRecord, { ...BaseParameters; - @doc("The type of DNS record in this record set. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).") + /** + * The type of DNS record in this record set. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted). + */ @path recordType: RecordType; - @doc("The etag of the record set. Omit this value to always delete the current record set. Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.") + /** + * The etag of the record set. Omit this value to always delete the current record set. Specify the last-seen etag value to prevent accidentally deleting any concurrent changes. + */ @header IfMatch?: string; } >; + /** + * Lists the record sets of a specified type in a DNS zone. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists the record sets of a specified type in a DNS zone.") @operationId("RecordSets_ListByType") listByType is ArmResourceListByParent< DnsRecord, { ...BaseParameters; - @doc("The type of record sets to enumerate.") + /** + * The type of record sets to enumerate. + */ @path recordType: RecordType; - @doc("The maximum number of record sets to return. If not specified, returns up to 100 record sets.") + /** + * The maximum number of record sets to return. If not specified, returns up to 100 record sets. + */ @query("$top") $top?: int32; - @doc("The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with .") + /** + * The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with . + */ @query("$recordsetnamesuffix") $recordsetnamesuffix?: string; } >; } + +@@projectedName(DnsRecords.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(DnsRecords.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(DnsRecords.createOrUpdate::parameters.resource, + "Parameters supplied to the CreateOrUpdate operation." +); +@@projectedName(DnsRecords.update::parameters.properties, "json", "parameters"); +@@extension(DnsRecords.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(DnsRecords.update::parameters.properties, + "Parameters supplied to the Update operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp index f00db75762..d63dfdbc06 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp @@ -11,45 +11,62 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.Dns; -@doc("Describes a DNS zone.") +/** + * Describes a DNS zone. + */ model DnsZone is TrackedResource { - @doc("The name of the DNS zone (without a terminating dot).") + /** + * The name of the DNS zone (without a terminating dot). + */ @path @key("zoneName") @segment("dnsZones") name: string; - @doc("The etag of the zone.") + /** + * The etag of the zone. + */ etag?: string; } @armResourceOperations interface DnsZones { + /** + * Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone.") @operationId("Zones_Get") get is ArmResourceRead; + /** + * Creates or updates a DNS zone. Does not modify DNS records within the zone. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or updates a DNS zone. Does not modify DNS records within the zone.") @operationId("Zones_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< DnsZone, { ...BaseParameters; - @doc("The etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.") + /** + * The etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes. + */ @header IfMatch?: string; - @doc("Set to '*' to allow a new DNS zone to be created, but to prevent updating an existing zone. Other values will be ignored.") + /** + * Set to '*' to allow a new DNS zone to be created, but to prevent updating an existing zone. Other values will be ignored. + */ @header IfNoneMatch?: string; } >; + /** + * Updates a DNS zone. Does not modify DNS records within the zone. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates a DNS zone. Does not modify DNS records within the zone.") + @parameterVisibility("read") @operationId("Zones_Update") update is ArmCustomPatchSync< DnsZone, @@ -57,73 +74,117 @@ interface DnsZones { { ...BaseParameters; - @doc("The etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.") + /** + * The etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes. + */ @header IfMatch?: string; } >; + /** + * Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone.") @operationId("Zones_Delete") delete is ArmResourceDeleteAsync< DnsZone, { ...BaseParameters; - @doc("The etag of the DNS zone. Omit this value to always delete the current zone. Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.") + /** + * The etag of the DNS zone. Omit this value to always delete the current zone. Specify the last-seen etag value to prevent accidentally deleting any concurrent changes. + */ @header IfMatch?: string; } >; + /** + * Lists the DNS zones within a resource group. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists the DNS zones within a resource group.") @operationId("Zones_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent< DnsZone, { ...BaseParameters; - @doc("The maximum number of record sets to return. If not specified, returns up to 100 record sets.") + /** + * The maximum number of record sets to return. If not specified, returns up to 100 record sets. + */ @query("$top") $top?: int32; } >; + /** + * Lists the DNS zones in all resource groups in a subscription. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists the DNS zones in all resource groups in a subscription.") @operationId("Zones_List") list is ArmListBySubscription; + /** + * Lists all record sets in a DNS zone. + */ + // FIXME: RecordSets_ListByDnsZone could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("RecordSets_ListByDnsZone") - @doc("Lists all record sets in a DNS zone.") - // FIXME: RecordSets_ListByDnsZone could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/recordsets") @get - ListByDnsZone is Azure.Core.Foundations.Operation< + listByDnsZone is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group.") + /** + * The name of the resource group. + */ @path resourceGroupName: string; - @doc("The name of the DNS zone (without a terminating dot).") + /** + * The name of the DNS zone (without a terminating dot). + */ @path zoneName: string; - @doc("The maximum number of record sets to return. If not specified, returns up to 100 record sets.") + /** + * The maximum number of record sets to return. If not specified, returns up to 100 record sets. + */ @query("$top") $top?: int32; - @doc("The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with .") + /** + * The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with . + */ @query("$recordsetnamesuffix") $recordsetnamesuffix?: string; - @doc("Specifies the Azure subscription ID, which uniquely identifies the Microsoft Azure subscription.") + /** + * Specifies the Azure subscription ID, which uniquely identifies the Microsoft Azure subscription. + */ @path subscriptionId: string; }, ResourceListResult >; } + +@@projectedName(DnsZones.createOrUpdate::parameters.resource, + "json", + "parameters" +); +@@extension(DnsZones.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(DnsZones.createOrUpdate::parameters.resource, + "Parameters supplied to the CreateOrUpdate operation." +); +@@projectedName(DnsZones.update::parameters.properties, "json", "parameters"); +@@extension(DnsZones.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(DnsZones.update::parameters.properties, + "Parameters supplied to the Update operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_A_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_A_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordsetWithAliasTargetResource.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_A_Recordset_With_Alias_Target_Resource.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordsetWithAliasTargetResource.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_A_Recordset_With_Alias_Target_Resource.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateAaaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Aaaa_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateAaaaRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Aaaa_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Caa_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCaaRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Caa_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCnameRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Cname_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCnameRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Cname_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateMxRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Mx_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateMxRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Mx_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateNsRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Ns_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateNsRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Ns_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreatePtrRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Ptr_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreatePtrRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Ptr_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSoaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Soa_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSoaRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Soa_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSrvRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Srv_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSrvRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Srv_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateTxtRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Txt_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateTxtRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_Create_Txt_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteARecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_A_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteARecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_A_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteAaaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Aaaa_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteAaaaRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Aaaa_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Caa_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCaaRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Caa_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCnameRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Cname_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCnameRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Cname_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteMxRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Mx_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteMxRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Mx_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteNsRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Ns_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteNsRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Ns_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeletePtrRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Ptr_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeletePtrRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Ptr_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteSrvRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Srv_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteSrvRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Srv_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteTxtRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Txt_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteTxtRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_Delete_Txt_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetARecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_A_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetARecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_A_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetAaaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Aaaa_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetAaaaRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Aaaa_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Caa_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCaaRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Caa_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCnameRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Cname_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCnameRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Cname_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetMxRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Mx_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetMxRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Mx_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetNsRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Ns_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetNsRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Ns_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetPtrRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Ptr_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetPtrRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Ptr_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSoaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Soa_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSoaRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Soa_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSrvRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Srv_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSrvRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Srv_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetTxtRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Txt_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetTxtRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_Get_Txt_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListARecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_A_Recordsets.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListARecordsets.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_A_Recordsets.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListAaaaRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Aaaa_Recordsets.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListAaaaRecordsets.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Aaaa_Recordsets.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCaaRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Caa_Recordsets.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCaaRecordsets.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Caa_Recordsets.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCnameRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Cname_Recordsets.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCnameRecordsets.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Cname_Recordsets.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListMxRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Mx_Recordsets.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListMxRecordsets.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Mx_Recordsets.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListNsRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Ns_Recordsets.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListNsRecordsets.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Ns_Recordsets.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListPtrRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Ptr_Recordsets.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListPtrRecordsets.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Ptr_Recordsets.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSoaRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Soa_Recordsets.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSoaRecordsets.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Soa_Recordsets.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSrvRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Srv_Recordsets.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSrvRecordsets.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Srv_Recordsets.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListTxtRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Txt_Recordsets.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListTxtRecordsets.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_List_Txt_Recordsets.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchARecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_A_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchARecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_A_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchAaaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Aaaa_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchAaaaRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Aaaa_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Caa_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCaaRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Caa_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCnameRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Cname_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCnameRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Cname_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchMxRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Mx_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchMxRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Mx_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchNsRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Ns_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchNsRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Ns_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchPtrRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Ptr_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchPtrRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Ptr_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSoaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Soa_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSoaRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Soa_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSrvRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Srv_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSrvRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Srv_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchTxtRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Txt_Recordset.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchTxtRecordset.json rename to packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_Patch_Txt_Recordset.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/main.tsp index da2a15bf60..1ab6585491 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/main.tsp @@ -22,18 +22,24 @@ using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; +/** + * The DNS Management Client. + */ @armProviderNamespace @service({ title: "DnsManagementClient", }) @versioned(Versions) -@doc("The DNS Management Client.") namespace Azure.ResourceManager.Dns; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { + /** + * The 2018-05-01 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2018-05-01 API version.") v2018_05_01: "2018-05-01", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp index 34398ee09a..7214c6bb61 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp @@ -27,299 +27,473 @@ enum RecordType { TXT, } -@doc("The type of this DNS zone (Public or Private).") +/** + * The type of this DNS zone (Public or Private). + */ @fixed enum DnsZoneType { Public, Private, } -@doc("Represents the properties of the records in the record set.") +/** + * Represents the properties of the records in the record set. + */ model RecordSetProperties { - @doc("The metadata attached to the record set.") + /** + * The metadata attached to the record set. + */ metadata?: Record; - @doc("The TTL (time-to-live) of the records in the record set.") + /** + * The TTL (time-to-live) of the records in the record set. + */ @projectedName("json", "TTL") - ttlInSeconds?: int32; + ttlInSeconds?: int64; - @doc("Fully qualified domain name of the record set.") + /** + * Fully qualified domain name of the record set. + */ @visibility("read") fqdn?: string; - @doc("provisioning State of the record set.") + /** + * provisioning State of the record set. + */ @visibility("read") provisioningState?: string; - @doc("A reference to an azure resource from where the dns resource value is taken.") + /** + * A reference to an azure resource from where the dns resource value is taken. + */ targetResource?: SubResource; - @doc("The list of A records in the record set.") + /** + * The list of A records in the record set. + */ @projectedName("json", "ARecords") aRecords?: ARecord[]; - @doc("The list of AAAA records in the record set.") + /** + * The list of AAAA records in the record set. + */ @projectedName("json", "AAAARecords") aaaaRecords?: AaaaRecord[]; - @doc("The list of MX records in the record set.") + /** + * The list of MX records in the record set. + */ MXRecords?: MxRecord[]; - @doc("The list of NS records in the record set.") + /** + * The list of NS records in the record set. + */ NSRecords?: NsRecord[]; - @doc("The list of PTR records in the record set.") + /** + * The list of PTR records in the record set. + */ @projectedName("json", "PTRRecords") ptrRecords?: PtrRecord[]; - @doc("The list of SRV records in the record set.") + /** + * The list of SRV records in the record set. + */ @projectedName("json", "SRVRecords") srvRecords?: SrvRecord[]; - @doc("The list of TXT records in the record set.") + /** + * The list of TXT records in the record set. + */ @projectedName("json", "TXTRecords") txtRecords?: TxtRecord[]; - @doc("The CNAME record in the record set.") + /** + * The CNAME record in the record set. + */ @projectedName("json", "CNAMERecord") cnameRecord?: CnameRecord; - @doc("The SOA record in the record set.") + /** + * The SOA record in the record set. + */ @projectedName("json", "SOARecord") soaRecord?: SoaRecord; - @doc("The list of CAA records in the record set.") + /** + * The list of CAA records in the record set. + */ caaRecords?: CaaRecord[]; } -@doc("A reference to a another resource") +/** + * A reference to a another resource + */ model SubResource { - @doc("Resource Id.") + /** + * Resource Id. + */ id?: string; } -@doc("An A record.") +/** + * An A record. + */ model ARecord { - @doc("The IPv4 address of this A record.") + /** + * The IPv4 address of this A record. + */ ipv4Address?: string; } -@doc("An AAAA record.") +/** + * An AAAA record. + */ model AaaaRecord { - @doc("The IPv6 address of this AAAA record.") + /** + * The IPv6 address of this AAAA record. + */ ipv6Address?: string; } -@doc("An MX record.") +/** + * An MX record. + */ model MxRecord { - @doc("The preference value for this MX record.") + /** + * The preference value for this MX record. + */ preference?: int32; - @doc("The domain name of the mail host for this MX record.") + /** + * The domain name of the mail host for this MX record. + */ exchange?: string; } -@doc("An NS record.") +/** + * An NS record. + */ model NsRecord { - @doc("The name server name for this NS record.") + /** + * The name server name for this NS record. + */ @projectedName("json", "nsdname") dnsNSDomainName?: string; } -@doc("A PTR record.") +/** + * A PTR record. + */ model PtrRecord { - @doc("The PTR target domain name for this PTR record.") + /** + * The PTR target domain name for this PTR record. + */ @projectedName("json", "ptrdname") dnsPtrDomainName?: string; } -@doc("An SRV record.") +/** + * An SRV record. + */ model SrvRecord { - @doc("The priority value for this SRV record.") + /** + * The priority value for this SRV record. + */ priority?: int32; - @doc("The weight value for this SRV record.") + /** + * The weight value for this SRV record. + */ weight?: int32; - @doc("The port value for this SRV record.") + /** + * The port value for this SRV record. + */ port?: int32; - @doc("The target domain name for this SRV record.") + /** + * The target domain name for this SRV record. + */ target?: string; } -@doc("A TXT record.") +/** + * A TXT record. + */ model TxtRecord { - @doc("The text value of this TXT record.") + /** + * The text value of this TXT record. + */ @projectedName("json", "value") values?: string[]; } -@doc("A CNAME record.") +/** + * A CNAME record. + */ model CnameRecord { - @doc("The canonical name for this CNAME record.") + /** + * The canonical name for this CNAME record. + */ cname?: string; } -@doc("An SOA record.") +/** + * An SOA record. + */ model SoaRecord { - @doc("The domain name of the authoritative name server for this SOA record.") + /** + * The domain name of the authoritative name server for this SOA record. + */ host?: string; - @doc("The email contact for this SOA record.") + /** + * The email contact for this SOA record. + */ email?: string; - @doc("The serial number for this SOA record.") - serialNumber?: int32; + /** + * The serial number for this SOA record. + */ + serialNumber?: int64; - @doc("The refresh value for this SOA record.") + /** + * The refresh value for this SOA record. + */ @projectedName("json", "refreshTime") - refreshTimeInSeconds?: int32; + refreshTimeInSeconds?: int64; - @doc("The retry time for this SOA record.") + /** + * The retry time for this SOA record. + */ @projectedName("json", "retryTime") - retryTimeInSeconds?: int32; + retryTimeInSeconds?: int64; - @doc("The expire time for this SOA record.") + /** + * The expire time for this SOA record. + */ @projectedName("json", "expireTime") - expireTimeInSeconds?: int32; + expireTimeInSeconds?: int64; - @doc("The minimum value for this SOA record. By convention this is used to determine the negative caching duration.") + /** + * The minimum value for this SOA record. By convention this is used to determine the negative caching duration. + */ @projectedName("json", "minimumTTL") - minimumTtlInSeconds?: int32; + minimumTtlInSeconds?: int64; } -@doc("A CAA record.") +/** + * A CAA record. + */ model CaaRecord { - @doc("The flags for this CAA record as an integer between 0 and 255.") + /** + * The flags for this CAA record as an integer between 0 and 255. + */ flags?: int32; - @doc("The tag for this CAA record.") + /** + * The tag for this CAA record. + */ tag?: string; - @doc("The value for this CAA record.") + /** + * The value for this CAA record. + */ value?: string; } -@doc("An error response from the service.") +/** + * An error response from the service. + */ @error model CloudError { - @doc("Cloud error body.") + /** + * Cloud error body. + */ error?: CloudErrorBody; } -@doc("An error response from the service.") +/** + * An error response from the service. + */ model CloudErrorBody { - @doc("An identifier for the error. Codes are invariant and are intended to be consumed programmatically.") + /** + * An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + */ code?: string; - @doc("A message describing the error, intended to be suitable for display in a user interface.") + /** + * A message describing the error, intended to be suitable for display in a user interface. + */ message?: string; - @doc("The target of the particular error. For example, the name of the property in error.") + /** + * The target of the particular error. For example, the name of the property in error. + */ target?: string; - @doc("A list of additional details about the error.") + /** + * A list of additional details about the error. + */ details?: CloudErrorBody[]; } -@doc("Represents the properties of the zone.") +/** + * Represents the properties of the zone. + */ model ZoneProperties { - @doc("The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.") + /** + * The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. + */ @visibility("read") @projectedName("json", "maxNumberOfRecordSets") - maxNumberOfRecords?: int32; + maxNumberOfRecords?: int64; - @doc("The maximum number of records per record set that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.") + /** + * The maximum number of records per record set that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. + */ @visibility("read") @projectedName("json", "maxNumberOfRecordsPerRecordSet") - maxNumberOfRecordsPerRecord?: int32; + maxNumberOfRecordsPerRecord?: int64; - @doc("The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.") + /** + * The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. + */ @visibility("read") @projectedName("json", "numberOfRecordSets") - numberOfRecords?: int32; + numberOfRecords?: int64; - @doc("The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored.") + /** + * The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored. + */ @visibility("read") nameServers?: string[]; - @doc("The type of this DNS zone (Public or Private).") - zoneType?: DnsZoneType; + /** + * The type of this DNS zone (Public or Private). + */ + zoneType?: DnsZoneType = DnsZoneType.Public; - @doc("A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private.") + /** + * A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private. + */ registrationVirtualNetworks?: SubResource[]; - @doc("A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private.") + /** + * A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private. + */ resolutionVirtualNetworks?: SubResource[]; } -@doc("Common properties of an Azure Resource Manager resource") +/** + * Common properties of an Azure Resource Manager resource + */ model Resource { - @doc("Resource ID.") + /** + * Resource ID. + */ @visibility("read") id?: string; - @doc("Resource name.") + /** + * Resource name. + */ @visibility("read") name?: string; - @doc("Resource type.") + /** + * Resource type. + */ @visibility("read") type?: string; - @doc("Resource location.") + /** + * Resource location. + */ @visibility("read", "create") // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key location: string; - @doc("Resource tags.") + /** + * Resource tags. + */ tags?: Record; } -@doc("Describes a request to update a DNS zone.") +/** + * Describes a request to update a DNS zone. + */ model ZoneUpdateOptions { - @doc("Resource tags.") + /** + * Resource tags. + */ tags?: Record; } -@doc("Represents the properties of the Dns Resource Reference Request.") +/** + * Represents the properties of the Dns Resource Reference Request. + */ model DnsResourceReferenceRequest { - @doc("The properties of the Resource Reference Request.") + /** + * The properties of the Resource Reference Request. + */ properties?: DnsResourceReferenceRequestProperties; } -@doc("Represents the properties of the Dns Resource Reference Request.") +/** + * Represents the properties of the Dns Resource Reference Request. + */ model DnsResourceReferenceRequestProperties { - @doc("A list of references to azure resources for which referencing dns records need to be queried.") + /** + * A list of references to azure resources for which referencing dns records need to be queried. + */ targetResources?: SubResource[]; } -@doc("Represents the properties of the Dns Resource Reference Result.") +/** + * Represents the properties of the Dns Resource Reference Result. + */ model DnsResourceReferenceResult { - @doc("The result of dns resource reference request. Returns a list of dns resource references for each of the azure resource in the request.") + /** + * The result of dns resource reference request. Returns a list of dns resource references for each of the azure resource in the request. + */ properties?: DnsResourceReferenceResultProperties; } -@doc("The result of dns resource reference request. Returns a list of dns resource references for each of the azure resource in the request.") +/** + * The result of dns resource reference request. Returns a list of dns resource references for each of the azure resource in the request. + */ model DnsResourceReferenceResultProperties { - @doc("The result of dns resource reference request. A list of dns resource references for each of the azure resource in the request") + /** + * The result of dns resource reference request. A list of dns resource references for each of the azure resource in the request + */ dnsResourceReferences?: DnsResourceReference[]; } -@doc("Represents a single Azure resource and its referencing DNS records.") +/** + * Represents a single Azure resource and its referencing DNS records. + */ model DnsResourceReference { - @doc("A list of dns Records ") + /** + * A list of dns Records + */ dnsResources?: SubResource[]; - @doc("A reference to an azure resource from where the dns resource value is taken.") + /** + * A reference to an azure resource from where the dns resource value is taken. + */ targetResource?: SubResource; } -@doc("Parameters supplied to update a record set.") +/** + * Parameters supplied to update a record set. + */ model RecordSetUpdateParameters { - @doc("Specifies information about the record set being updated.") + /** + * Specifies information about the record set being updated. + */ @projectedName("json", "RecordSet") recordSet?: DnsRecord; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp index 12d713a36f..f563c86d36 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp @@ -10,16 +10,22 @@ using Azure.ResourceManager; namespace Azure.ResourceManager.Dns; interface DnsResourceReferenceOperations { - @doc("Returns the DNS records specified by the referencing targetResourceIds.") + /** + * Returns the DNS records specified by the referencing targetResourceIds. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Network/getDnsResourceReference") @post - GetByTargetResources is Azure.Core.Foundations.Operation< + getByTargetResources is Azure.Core.Foundations.Operation< { - @doc("Specifies the Azure subscription ID, which uniquely identifies the Microsoft Azure subscription.") + /** + * Specifies the Azure subscription ID, which uniquely identifies the Microsoft Azure subscription. + */ @path subscriptionId: string; - @doc("Properties for dns resource reference request.") + /** + * Properties for dns resource reference request. + */ @body parameters: DnsResourceReferenceRequest; }, diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml index 475477bfc3..2ef6b3f7f9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml @@ -2,6 +2,7 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/dns.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp index 3a172ce406..31e48d0867 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp @@ -15,7 +15,9 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(BatchEndpointTrackedResource) model BatchDeploymentTrackedResource is TrackedResource { - @doc("The identifier for the Batch deployments.") + /** + * The identifier for the Batch deployments. + */ @path @key("deploymentName") @segment("deployments") @@ -28,26 +30,35 @@ model BatchDeploymentTrackedResource is TrackedResource { @armResourceOperations interface BatchDeploymentTrackedResources { + /** + * Gets a batch inference deployment by id. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets a batch inference deployment by id.") @operationId("BatchDeployments_Get") get is ArmResourceRead; + /** + * Creates/updates a batch inference deployment (asynchronous). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates/updates a batch inference deployment (asynchronous).") @operationId("BatchDeployments_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Update a batch inference deployment (asynchronous). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update a batch inference deployment (asynchronous).") + @parameterVisibility("read") @operationId("BatchDeployments_Update") update is ArmCustomPatchAsync< BatchDeploymentTrackedResource, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties >; + /** + * Delete Batch Inference deployment (asynchronous). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete Batch Inference deployment (asynchronous).") @operationId("BatchDeployments_Delete") delete is ArmResourceDeleteAsync< BatchDeploymentTrackedResource, @@ -55,25 +66,56 @@ interface BatchDeploymentTrackedResources { ArmLroLocationHeader >; + /** + * Lists Batch inference deployments in the workspace. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists Batch inference deployments in the workspace.") @operationId("BatchDeployments_List") list is ArmResourceListByParent< BatchDeploymentTrackedResource, { ...BaseParameters; - @doc("Ordering of list.") + /** + * Ordering of list. + */ @query("$orderBy") $orderBy?: string; - @doc("Top of list.") + /** + * Top of list. + */ @query("$top") $top?: int32; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; } >; } + +@@projectedName(BatchDeploymentTrackedResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(BatchDeploymentTrackedResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(BatchDeploymentTrackedResources.createOrUpdate::parameters.resource, + "Batch inference deployment definition object." +); +@@projectedName(BatchDeploymentTrackedResources.update::parameters.properties, + "json", + "body" +); +@@extension(BatchDeploymentTrackedResources.update::parameters.properties, + "x-ms-client-name", + "body" +); +@@doc(BatchDeploymentTrackedResources.update::parameters.properties, + "Batch inference deployment definition object." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp index 423f98e30b..7af6f0a97c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp @@ -15,7 +15,9 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(Workspace) model BatchEndpointTrackedResource is TrackedResource { - @doc("Name for the Batch Endpoint.") + /** + * Name for the Batch Endpoint. + */ @path @key("endpointName") @segment("batchEndpoints") @@ -28,26 +30,35 @@ model BatchEndpointTrackedResource is TrackedResource { @armResourceOperations interface BatchEndpointTrackedResources { + /** + * Gets a batch inference endpoint by name. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets a batch inference endpoint by name.") @operationId("BatchEndpoints_Get") get is ArmResourceRead; + /** + * Creates a batch inference endpoint (asynchronous). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates a batch inference endpoint (asynchronous).") @operationId("BatchEndpoints_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Update a batch inference endpoint (asynchronous). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update a batch inference endpoint (asynchronous).") + @parameterVisibility("read") @operationId("BatchEndpoints_Update") update is ArmCustomPatchAsync< BatchEndpointTrackedResource, PartialMinimalTrackedResourceWithIdentity >; + /** + * Delete Batch Inference Endpoint (asynchronous). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete Batch Inference Endpoint (asynchronous).") @operationId("BatchEndpoints_Delete") delete is ArmResourceDeleteAsync< BatchEndpointTrackedResource, @@ -55,26 +66,34 @@ interface BatchEndpointTrackedResources { ArmLroLocationHeader >; + /** + * Lists Batch inference endpoint in the workspace. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists Batch inference endpoint in the workspace.") @operationId("BatchEndpoints_List") list is ArmResourceListByParent< BatchEndpointTrackedResource, { ...BaseParameters; - @doc("Number of endpoints to be retrieved in a page of results.") + /** + * Number of endpoints to be retrieved in a page of results. + */ @query("count") count?: int32; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; } >; + /** + * Lists batch Inference Endpoint keys. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists batch Inference Endpoint keys.") @operationId("BatchEndpoints_ListKeys") listKeys is ArmResourceActionSync< BatchEndpointTrackedResource, @@ -82,3 +101,26 @@ interface BatchEndpointTrackedResources { EndpointAuthKeys >; } + +@@projectedName(BatchEndpointTrackedResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(BatchEndpointTrackedResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(BatchEndpointTrackedResources.createOrUpdate::parameters.resource, + "Batch inference endpoint definition object." +); +@@projectedName(BatchEndpointTrackedResources.update::parameters.properties, + "json", + "body" +); +@@extension(BatchEndpointTrackedResources.update::parameters.properties, + "x-ms-client-name", + "body" +); +@@doc(BatchEndpointTrackedResources.update::parameters.properties, + "Mutable batch inference endpoint definition object." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp index d08bf377ef..d0c546bc33 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(Registry) model CodeContainerResource is ProxyResource { - @doc("Container name.") + /** + * Container name. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path @key("codeName") @@ -25,18 +29,24 @@ model CodeContainerResource is ProxyResource { @armResourceOperations interface CodeContainerResources { + /** + * Get Code container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get Code container.") @operationId("RegistryCodeContainers_Get") get is ArmResourceRead; + /** + * Create or update Code container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or update Code container.") @operationId("RegistryCodeContainers_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Delete Code container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete Code container.") @operationId("RegistryCodeContainers_Delete") delete is ArmResourceDeleteAsync< CodeContainerResource, @@ -44,17 +54,33 @@ interface CodeContainerResources { ArmLroLocationHeader >; + /** + * List containers. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List containers.") @operationId("RegistryCodeContainers_List") list is ArmResourceListByParent< CodeContainerResource, { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; } >; } + +@@projectedName(CodeContainerResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(CodeContainerResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(CodeContainerResources.createOrUpdate::parameters.resource, + "Container entity to create or update." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp index fa1245c953..735b38dd67 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(CodeContainerResource) model CodeVersionResource is ProxyResource { - @doc("Version identifier.") + /** + * Version identifier. + */ @path @key("version") @segment("versions") @@ -24,18 +28,24 @@ model CodeVersionResource is ProxyResource { @armResourceOperations interface CodeVersionResources { + /** + * Get version. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get version.") @operationId("RegistryCodeVersions_Get") get is ArmResourceRead; + /** + * Create or update version. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or update version.") @operationId("RegistryCodeVersions_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Delete version. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete version.") @operationId("RegistryCodeVersions_Delete") delete is ArmResourceDeleteAsync< CodeVersionResource, @@ -43,30 +53,40 @@ interface CodeVersionResources { ArmLroLocationHeader >; + /** + * List versions. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List versions.") @operationId("RegistryCodeVersions_List") list is ArmResourceListByParent< CodeVersionResource, { ...BaseParameters; - @doc("Ordering of list.") + /** + * Ordering of list. + */ @query("$orderBy") $orderBy?: string; - @doc("Maximum number of records to return.") + /** + * Maximum number of records to return. + */ @query("$top") $top?: int32; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; } >; + /** + * Generate a storage location and credential for the client to upload a code asset to. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Generate a storage location and credential for the client to upload a code asset to.") @operationId("RegistryCodeVersions_CreateOrGetStartPendingUpload") createOrGetStartPendingUpload is ArmResourceActionSync< CodeVersionResource, @@ -74,3 +94,18 @@ interface CodeVersionResources { PendingUploadResponseDto >; } + +@@projectedName(CodeVersionResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(CodeVersionResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(CodeVersionResources.createOrUpdate::parameters.resource, + "Version entity to create or update." +); +@@doc(CodeVersionResources.createOrGetStartPendingUpload::parameters.body, + "Pending upload request object" +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp index 36164c6aec..1c71ccb37b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(Registry) model ComponentContainerResource is ProxyResource { - @doc("Container name.") + /** + * Container name. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path @key("componentName") @@ -25,18 +29,24 @@ model ComponentContainerResource is ProxyResource { @armResourceOperations interface ComponentContainerResources { + /** + * Get container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get container.") @operationId("RegistryComponentContainers_Get") get is ArmResourceRead; + /** + * Create or update container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or update container.") @operationId("RegistryComponentContainers_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Delete container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete container.") @operationId("RegistryComponentContainers_Delete") delete is ArmResourceDeleteAsync< ComponentContainerResource, @@ -44,17 +54,33 @@ interface ComponentContainerResources { ArmLroLocationHeader >; + /** + * List containers. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List containers.") @operationId("RegistryComponentContainers_List") list is ArmResourceListByParent< ComponentContainerResource, { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; } >; } + +@@projectedName(ComponentContainerResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(ComponentContainerResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(ComponentContainerResources.createOrUpdate::parameters.resource, + "Container entity to create or update." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp index a96638c436..0f48a104fd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(ComponentContainerResource) model ComponentVersionResource is ProxyResource { - @doc("Version identifier.") + /** + * Version identifier. + */ @path @key("version") @segment("versions") @@ -24,18 +28,24 @@ model ComponentVersionResource is ProxyResource { @armResourceOperations interface ComponentVersionResources { + /** + * Get version. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get version.") @operationId("RegistryComponentVersions_Get") get is ArmResourceRead; + /** + * Create or update version. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or update version.") @operationId("RegistryComponentVersions_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Delete version. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete version.") @operationId("RegistryComponentVersions_Delete") delete is ArmResourceDeleteAsync< ComponentVersionResource, @@ -43,29 +53,51 @@ interface ComponentVersionResources { ArmLroLocationHeader >; + /** + * List versions. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List versions.") @operationId("RegistryComponentVersions_List") list is ArmResourceListByParent< ComponentVersionResource, { ...BaseParameters; - @doc("Ordering of list.") + /** + * Ordering of list. + */ @query("$orderBy") $orderBy?: string; - @doc("Maximum number of records to return.") + /** + * Maximum number of records to return. + */ @query("$top") $top?: int32; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Component stage.") + /** + * Component stage. + */ @query("stage") stage?: string; } >; } + +@@projectedName(ComponentVersionResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(ComponentVersionResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(ComponentVersionResources.createOrUpdate::parameters.resource, + "Version entity to create or update." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp index 389dc49412..b56277fc11 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp @@ -5,116 +5,150 @@ import "@typespec/rest"; import "./models.tsp"; import "./Workspace.tsp"; + using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; + namespace Azure.ResourceManager.MachineLearning; // FIXME: ComputeResource has no properties property -@doc("Machine Learning compute object wrapped into ARM resource envelope.") +/** +* Machine Learning compute object wrapped into ARM resource envelope. +*/ @parentResource(Workspace) model ComputeResource is TrackedResource<{}> { - @doc("Name of the Azure Machine Learning compute.") - @path - @key("computeName") - @segment("computes") - name: string; - - ...Azure.ResourceManager.ManagedServiceIdentity; - ...Azure.ResourceManager.ResourceSku; +/** +* Name of the Azure Machine Learning compute. +*/ +@path +@key("computeName") +@segment("computes") +"name": string; + +...Azure.ResourceManager.ManagedServiceIdentity + +...Azure.ResourceManager.ResourceSku } + + @armResourceOperations interface ComputeResources { - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them.") - @operationId("Compute_Get") - get is ArmResourceRead; - - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet.") - @operationId("Compute_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; - - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation.") - @operationId("Compute_Update") - update is ArmCustomPatchAsync; - - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes specified Machine Learning compute.") - @operationId("Compute_Delete") - delete is ArmResourceDeleteAsync< - ComputeResource, - { - ...BaseParameters; - - @doc("Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'.") - @query("underlyingResourceAction") - underlyingResourceAction: UnderlyingResourceAction; - } - >; - - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets computes in specified workspace.") - @operationId("Compute_List") - list is ArmResourceListByParent< - ComputeResource, - { - ...BaseParameters; - - @doc("Continuation token for pagination.") - @query("$skip") - $skip?: string; - } - >; - - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the custom services list. The list of custom services provided shall be overwritten") - @operationId("Compute_UpdateCustomServices") - updateCustomServices is ArmResourceActionSync< - ComputeResource, - CustomService[], - void - >; - - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get the details (e.g IP address, port etc) of all the compute nodes in the compute.") - @operationId("Compute_ListNodes") - listNodes is ArmResourceActionSync< - ComputeResource, - void, - AmlComputeNodesInformation - >; - - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets secrets related to Machine Learning compute (storage keys, service credentials, etc).") - @operationId("Compute_ListKeys") - listKeys is ArmResourceActionSync; - - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Posts a start action to a compute instance") - @operationId("Compute_Start") - start is ArmResourceActionNoResponseContentAsync; - - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Posts a stop action to a compute instance") - @operationId("Compute_Stop") - stop is ArmResourceActionNoResponseContentAsync; - - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Posts a restart action to a compute instance") - @operationId("Compute_Restart") - restart is ArmResourceActionNoResponseContentAsync; - - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates the idle shutdown setting of a compute instance.") - @operationId("Compute_UpdateIdleShutdownSetting") - updateIdleShutdownSetting is ArmResourceActionSync< - ComputeResource, - IdleShutdownSetting, - void - >; +/** +* Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them. +*/ +@operationId("Compute_Get") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +get is ArmResourceRead + +/** +* Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet. +*/ +@operationId("Compute_CreateOrUpdate") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +createOrUpdate is ArmResourceCreateOrReplaceAsync + +/** +* Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. +*/ +@parameterVisibility("read") +@operationId("Compute_Update") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +update is ArmCustomPatchAsync + +/** +* Deletes specified Machine Learning compute. +*/ +@operationId("Compute_Delete") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +delete is ArmResourceDeleteAsync, + /** +* Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. +*/ +@query("underlyingResourceAction") +"underlyingResourceAction": UnderlyingResourceAction + }> + +/** +* Gets computes in specified workspace. +*/ +@operationId("Compute_List") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +list is ArmResourceListByParent, + /** +* Continuation token for pagination. +*/ +@query("$skip") +"$skip"?: string + }> + +/** +* Updates the custom services list. The list of custom services provided shall be overwritten +*/ +@operationId("Compute_UpdateCustomServices") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +updateCustomServices is ArmResourceActionSync + +/** +* Get the details (e.g IP address, port etc) of all the compute nodes in the compute. +*/ +@operationId("Compute_ListNodes") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +listNodes is ArmResourceActionSync + +/** +* Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). +*/ +@operationId("Compute_ListKeys") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +listKeys is ArmResourceActionSync + +/** +* Posts a start action to a compute instance +*/ +@operationId("Compute_Start") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +start is ArmResourceActionNoResponseContentAsync + +/** +* Posts a stop action to a compute instance +*/ +@operationId("Compute_Stop") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +stop is ArmResourceActionNoResponseContentAsync + +/** +* Posts a restart action to a compute instance +*/ +@operationId("Compute_Restart") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +restart is ArmResourceActionNoResponseContentAsync + +/** +* Updates the idle shutdown setting of a compute instance. +*/ +@operationId("Compute_UpdateIdleShutdownSetting") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +updateIdleShutdownSetting is ArmResourceActionSync + } + + + +@@projectedName(ComputeResources.createOrUpdate::parameters.resource, "json", "parameters"); +@@extension(ComputeResources.createOrUpdate::parameters.resource, "x-ms-client-name", "parameters"); +@@doc(ComputeResources.createOrUpdate::parameters.resource, "Payload with Machine Learning compute definition."); +@@projectedName(ComputeResources.update::parameters.properties, "json", "parameters"); +@@extension(ComputeResources.update::parameters.properties, "x-ms-client-name", "parameters"); +@@doc(ComputeResources.update::parameters.properties, "Additional parameters for cluster update."); +@@projectedName(ComputeResources.updateCustomServices::parameters.body, "json", "customServices"); +@@extension(ComputeResources.updateCustomServices::parameters.body, "x-ms-client-name", "customServices"); +@@doc(ComputeResources.updateCustomServices::parameters.body, "New list of Custom Services."); +@@projectedName(ComputeResources.updateIdleShutdownSetting::parameters.body, "json", "parameters"); +@@extension(ComputeResources.updateIdleShutdownSetting::parameters.body, "x-ms-client-name", "parameters"); +@@doc(ComputeResources.updateIdleShutdownSetting::parameters.body, "The object for updating idle shutdown setting of specified ComputeInstance."); \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp index 7cad46b631..0e8588af88 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(Registry) model DataContainerResource is ProxyResource { - @doc("Container name.") + /** + * Container name. + */ @path @key("name") @segment("data") @@ -24,18 +28,24 @@ model DataContainerResource is ProxyResource { @armResourceOperations interface DataContainerResources { + /** + * Get container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get container.") @operationId("RegistryDataContainers_Get") get is ArmResourceRead; + /** + * Create or update container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or update container.") @operationId("RegistryDataContainers_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Delete container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete container.") @operationId("RegistryDataContainers_Delete") delete is ArmResourceDeleteAsync< DataContainerResource, @@ -43,21 +53,39 @@ interface DataContainerResources { ArmLroLocationHeader >; + /** + * List Data containers. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List Data containers.") @operationId("RegistryDataContainers_List") list is ArmResourceListByParent< DataContainerResource, { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("View type for including/excluding (for example) archived entities.") + /** + * View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; } >; } + +@@projectedName(DataContainerResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(DataContainerResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(DataContainerResources.createOrUpdate::parameters.resource, + "Container entity to create or update." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp index f5ea79aa59..1bcd590148 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(DataContainerResource) model DataVersionBaseResource is ProxyResource { - @doc("Version identifier.") + /** + * Version identifier. + */ @path @key("version") @segment("versions") @@ -24,18 +28,24 @@ model DataVersionBaseResource is ProxyResource { @armResourceOperations interface DataVersionBaseResources { + /** + * Get version. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get version.") @operationId("RegistryDataVersions_Get") get is ArmResourceRead; + /** + * Create or update version. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or update version.") @operationId("RegistryDataVersions_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Delete version. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete version.") @operationId("RegistryDataVersions_Delete") delete is ArmResourceDeleteAsync< DataVersionBaseResource, @@ -43,41 +53,53 @@ interface DataVersionBaseResources { ArmLroLocationHeader >; + /** + * List data versions in the data container + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List data versions in the data container") @operationId("RegistryDataVersions_List") list is ArmResourceListByParent< DataVersionBaseResource, { ...BaseParameters; - @doc("Please choose OrderBy value from ['createdtime', 'modifiedtime']") + /** + * Please choose OrderBy value from ['createdtime', 'modifiedtime'] + */ @query("$orderBy") $orderBy?: string; - @doc(""" -Top count of results, top count cannot be greater than the page size. + /** +* Top count of results, top count cannot be greater than the page size. If topCount > page size, results with be default page size count will be returned -""") +*/ @query("$top") $top?: int32; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + /** + * Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + */ @query("$tags") $tags?: string; - @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + /** + * [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; } >; + /** + * Generate a storage location and credential for the client to upload a data asset to. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Generate a storage location and credential for the client to upload a data asset to.") @operationId("RegistryDataVersions_CreateOrGetStartPendingUpload") createOrGetStartPendingUpload is ArmResourceActionSync< DataVersionBaseResource, @@ -85,3 +107,18 @@ Top count of results, top count cannot be greater than the page size. PendingUploadResponseDto >; } + +@@projectedName(DataVersionBaseResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(DataVersionBaseResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(DataVersionBaseResources.createOrUpdate::parameters.resource, + "Version entity to create or update." +); +@@doc(DataVersionBaseResources.createOrGetStartPendingUpload::parameters.body, + "Pending upload request object" +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp index a3d5623fc7..ceb9473059 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(Workspace) model DatastoreResource is ProxyResource { - @doc("Datastore name.") + /** + * Datastore name. + */ @path @key("name") @segment("datastores") @@ -24,73 +28,99 @@ model DatastoreResource is ProxyResource { @armResourceOperations interface DatastoreResources { + /** + * Get datastore. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get datastore.") @operationId("Datastores_Get") get is ArmResourceRead; + /** + * Create or update datastore. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or update datastore.") @operationId("Datastores_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< DatastoreResource, { ...BaseParameters; - @doc("Flag to skip validation.") + /** + * Flag to skip validation. + */ @query("skipValidation") skipValidation?: boolean; } >; + /** + * Delete datastore. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete datastore.") @operationId("Datastores_Delete") delete is ArmResourceDeleteSync; + /** + * List datastores. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List datastores.") @operationId("Datastores_List") list is ArmResourceListByParent< DatastoreResource, { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Maximum number of results to return.") + /** + * Maximum number of results to return. + */ @query("count") count?: int32 = 30; - @doc("Filter down to the workspace default datastore.") + /** + * Filter down to the workspace default datastore. + */ @query("isDefault") isDefault?: boolean; - @doc("Names of datastores to return.") + /** + * Names of datastores to return. + */ @query({ name: "names", format: "csv", }) names?: string[]; - @doc("Text to search for in the datastore names.") + /** + * Text to search for in the datastore names. + */ @query("searchText") searchText?: string; - @doc("Order by property (createdtime | modifiedtime | name).") + /** + * Order by property (createdtime | modifiedtime | name). + */ @query("orderBy") orderBy?: string; - @doc("Order by property in ascending order.") + /** + * Order by property in ascending order. + */ @query("orderByAsc") orderByAsc?: boolean; } >; + /** + * Get datastore secrets. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get datastore secrets.") @operationId("Datastores_ListSecrets") listSecrets is ArmResourceActionSync< DatastoreResource, @@ -98,3 +128,15 @@ interface DatastoreResources { DatastoreSecrets >; } + +@@projectedName(DatastoreResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(DatastoreResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(DatastoreResources.createOrUpdate::parameters.resource, + "Datastore entity to create or update." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp index 37466020e3..13a78534d8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(Registry) model EnvironmentContainerResource is ProxyResource { - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path @key("environmentName") @@ -25,18 +29,24 @@ model EnvironmentContainerResource is ProxyResource { @armResourceOperations interface EnvironmentContainerResources { + /** + * Get container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get container.") @operationId("RegistryEnvironmentContainers_Get") get is ArmResourceRead; + /** + * Create or update container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or update container.") @operationId("RegistryEnvironmentContainers_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Delete container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete container.") @operationId("RegistryEnvironmentContainers_Delete") delete is ArmResourceDeleteAsync< EnvironmentContainerResource, @@ -44,21 +54,39 @@ interface EnvironmentContainerResources { ArmLroLocationHeader >; + /** + * List environment containers. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List environment containers.") @operationId("RegistryEnvironmentContainers_List") list is ArmResourceListByParent< EnvironmentContainerResource, { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("View type for including/excluding (for example) archived entities.") + /** + * View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; } >; } + +@@projectedName(EnvironmentContainerResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(EnvironmentContainerResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(EnvironmentContainerResources.createOrUpdate::parameters.resource, + "Container entity to create or update." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp index ce9e982412..990e52e015 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(EnvironmentContainerResource) model EnvironmentVersionResource is ProxyResource { - @doc("Version identifier. This is case-sensitive.") + /** + * Version identifier. This is case-sensitive. + */ @path @key("version") @segment("versions") @@ -24,18 +28,24 @@ model EnvironmentVersionResource is ProxyResource { @armResourceOperations interface EnvironmentVersionResources { + /** + * Get version. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get version.") @operationId("RegistryEnvironmentVersions_Get") get is ArmResourceRead; + /** + * Create or update version. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or update version.") @operationId("RegistryEnvironmentVersions_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Delete version. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete version.") @operationId("RegistryEnvironmentVersions_Delete") delete is ArmResourceDeleteAsync< EnvironmentVersionResource, @@ -43,33 +53,57 @@ interface EnvironmentVersionResources { ArmLroLocationHeader >; + /** + * List versions. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List versions.") @operationId("RegistryEnvironmentVersions_List") list is ArmResourceListByParent< EnvironmentVersionResource, { ...BaseParameters; - @doc("Ordering of list.") + /** + * Ordering of list. + */ @query("$orderBy") $orderBy?: string; - @doc("Maximum number of records to return.") + /** + * Maximum number of records to return. + */ @query("$top") $top?: int32; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("View type for including/excluding (for example) archived entities.") + /** + * View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; - @doc("Stage for including/excluding (for example) archived entities. Takes priority over listViewType") + /** + * Stage for including/excluding (for example) archived entities. Takes priority over listViewType + */ @query("stage") stage?: string; } >; } + +@@projectedName(EnvironmentVersionResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(EnvironmentVersionResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(EnvironmentVersionResources.createOrUpdate::parameters.resource, + "Version entity to create or update." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp index 17901e3e49..d7f719dea3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(FeaturesetVersion) model Feature is ProxyResource { - @doc("Feature Name. This is case-sensitive.") + /** + * Feature Name. This is case-sensitive. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path @key("featureName") @@ -25,24 +29,36 @@ model Feature is ProxyResource { @armResourceOperations interface Features { - @doc("Get feature.") + /** + * Get feature. + */ get is ArmResourceRead; - @doc("List Features.") + /** + * List Features. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Features_List") list is ArmResourceListByParent< Feature, { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + /** + * Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + */ @query("tags") tags?: string; - @doc("Description of the featureset.") + /** + * Description of the featureset. + */ @query("description") description?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp index b488344b90..62f2c0d3a5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(Workspace) model FeaturesetContainer is ProxyResource { - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path @key("name") @segment("featuresets") @@ -24,48 +28,82 @@ model FeaturesetContainer is ProxyResource { @armResourceOperations interface FeaturesetContainers { - @doc("Get container.") + /** + * Get container. + */ getEntity is ArmResourceRead; - @doc("Create or update container.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Create or update container. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Delete container.") + /** + * Delete container. + */ delete is ArmResourceDeleteAsync< FeaturesetContainer, BaseParameters, ArmLroLocationHeader >; - @doc("List featurestore entity containers.") + /** + * List featurestore entity containers. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("FeaturesetContainers_List") list is ArmResourceListByParent< FeaturesetContainer, { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + /** + * Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + */ @query("tags") tags?: string; - @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + /** + * [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; - @doc("page size") + /** + * page size + */ @query("pageSize") pageSize?: int32 = 20; - @doc("description for the feature set") + /** + * description for the feature set + */ @query("description") description?: string; - @doc("createdBy user name") + /** + * createdBy user name + */ @query("createdBy") createdBy?: string; } >; } + +@@projectedName(FeaturesetContainers.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(FeaturesetContainers.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(FeaturesetContainers.createOrUpdate::parameters.resource, + "Container entity to create or update." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp index 3d818c1811..66b344ba09 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(FeaturesetContainer) model FeaturesetVersion is ProxyResource { - @doc("Version identifier. This is case-sensitive.") + /** + * Version identifier. This is case-sensitive. + */ @path @key("version") @segment("versions") @@ -24,60 +28,88 @@ model FeaturesetVersion is ProxyResource { @armResourceOperations interface FeaturesetVersions { - @doc("Get version.") + /** + * Get version. + */ get is ArmResourceRead; - @doc("Create or update version.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Create or update version. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Delete version.") + /** + * Delete version. + */ delete is ArmResourceDeleteAsync< FeaturesetVersion, BaseParameters, ArmLroLocationHeader >; - @doc("List versions.") + /** + * List versions. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("FeaturesetVersions_List") list is ArmResourceListByParent< FeaturesetVersion, { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + /** + * Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + */ @query("tags") tags?: string; - @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + /** + * [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; - @doc("page size") + /** + * page size + */ @query("pageSize") pageSize?: int32 = 20; - @doc("name for the featureset version") + /** + * name for the featureset version + */ @query("versionName") versionName?: string; - @doc("description for the feature set version") + /** + * description for the feature set version + */ @query("description") description?: string; - @doc("createdBy user name") + /** + * createdBy user name + */ @query("createdBy") createdBy?: string; - @doc("Specifies the featurestore stage") + /** + * Specifies the featurestore stage + */ @query("stage") stage?: string; } >; - @doc("Backfill.") + /** + * Backfill. + */ backfill is ArmResourceActionAsync< FeaturesetVersion, FeaturesetVersionBackfillRequest, @@ -86,7 +118,9 @@ interface FeaturesetVersions { ArmLroLocationHeader >; - @doc("List materialization Jobs.") + /** + * List materialization Jobs. + */ listMaterializationJobs is ArmResourceActionSync< FeaturesetVersion, void, @@ -94,21 +128,44 @@ interface FeaturesetVersions { { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + /** + * Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + */ @query("filters") filters?: string; - @doc("Start time of the feature window to filter materialization jobs.") + /** + * Start time of the feature window to filter materialization jobs. + */ @query("featureWindowStart") featureWindowStart?: string; - @doc("End time of the feature window to filter materialization jobs.") + /** + * End time of the feature window to filter materialization jobs. + */ @query("featureWindowEnd") featureWindowEnd?: string; } >; } + +@@projectedName(FeaturesetVersions.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(FeaturesetVersions.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(FeaturesetVersions.createOrUpdate::parameters.resource, + "Version entity to create or update." +); +@@doc(FeaturesetVersions.backfill::parameters.body, + "Feature set version backfill request entity." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp index d869cda01d..672143b041 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(Workspace) model FeaturestoreEntityContainer is ProxyResource { - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path @key("name") @segment("featurestoreEntities") @@ -25,48 +29,82 @@ model FeaturestoreEntityContainer @armResourceOperations interface FeaturestoreEntityContainers { - @doc("Get container.") + /** + * Get container. + */ getEntity is ArmResourceRead; - @doc("Create or update container.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Create or update container. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Delete container.") + /** + * Delete container. + */ delete is ArmResourceDeleteAsync< FeaturestoreEntityContainer, BaseParameters, ArmLroLocationHeader >; - @doc("List featurestore entity containers.") + /** + * List featurestore entity containers. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("FeaturestoreEntityContainers_List") list is ArmResourceListByParent< FeaturestoreEntityContainer, { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + /** + * Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + */ @query("tags") tags?: string; - @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + /** + * [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; - @doc("page size") + /** + * page size + */ @query("pageSize") pageSize?: int32 = 20; - @doc("description for the featurestore entity") + /** + * description for the featurestore entity + */ @query("description") description?: string; - @doc("createdBy user name") + /** + * createdBy user name + */ @query("createdBy") createdBy?: string; } >; } + +@@projectedName(FeaturestoreEntityContainers.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(FeaturestoreEntityContainers.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(FeaturestoreEntityContainers.createOrUpdate::parameters.resource, + "Container entity to create or update." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp index 8f39a997a9..cca65eac79 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(FeaturestoreEntityContainer) model FeaturestoreEntityVersion is ProxyResource { - @doc("Version identifier. This is case-sensitive.") + /** + * Version identifier. This is case-sensitive. + */ @path @key("version") @segment("versions") @@ -25,56 +29,94 @@ model FeaturestoreEntityVersion @armResourceOperations interface FeaturestoreEntityVersions { - @doc("Get version.") + /** + * Get version. + */ get is ArmResourceRead; - @doc("Create or update version.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Create or update version. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Delete version.") + /** + * Delete version. + */ delete is ArmResourceDeleteAsync< FeaturestoreEntityVersion, BaseParameters, ArmLroLocationHeader >; - @doc("List versions.") + /** + * List versions. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("FeaturestoreEntityVersions_List") list is ArmResourceListByParent< FeaturestoreEntityVersion, { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + /** + * Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + */ @query("tags") tags?: string; - @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + /** + * [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; - @doc("page size") + /** + * page size + */ @query("pageSize") pageSize?: int32 = 20; - @doc("name for the featurestore entity version") + /** + * name for the featurestore entity version + */ @query("versionName") versionName?: string; - @doc("description for the feature entity version") + /** + * description for the feature entity version + */ @query("description") description?: string; - @doc("createdBy user name") + /** + * createdBy user name + */ @query("createdBy") createdBy?: string; - @doc("Specifies the featurestore stage") + /** + * Specifies the featurestore stage + */ @query("stage") stage?: string; } >; } + +@@projectedName(FeaturestoreEntityVersions.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(FeaturestoreEntityVersions.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(FeaturestoreEntityVersions.createOrUpdate::parameters.resource, + "Version entity to create or update." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp index b049ad67b3..5673dfb985 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(Workspace) model JobBaseResource is ProxyResource { - @doc("The name and identifier for the Job. This is case-sensitive.") + /** + * The name and identifier for the Job. This is case-sensitive. + */ @path @key("id") @segment("jobs") @@ -24,23 +28,32 @@ model JobBaseResource is ProxyResource { @armResourceOperations interface JobBaseResources { + /** + * Gets a Job by name/id. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets a Job by name/id.") @operationId("Jobs_Get") get is ArmResourceRead; + /** + * Creates and executes a Job. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates and executes a Job.") @operationId("Jobs_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync; + /** + * Updates a Job. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Updates a Job.") + @parameterVisibility("read") @operationId("Jobs_Update") update is ArmCustomPatchSync; + /** + * Deletes a Job (asynchronous). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes a Job (asynchronous).") @operationId("Jobs_Delete") delete is ArmResourceDeleteAsync< JobBaseResource, @@ -48,46 +61,64 @@ interface JobBaseResources { ArmLroLocationHeader >; + /** + * Lists Jobs in the workspace. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists Jobs in the workspace.") @operationId("Jobs_List") list is ArmResourceListByParent< JobBaseResource, { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Type of job to be returned.") + /** + * Type of job to be returned. + */ @query("jobType") jobType?: string; - @doc("Jobs returned will have this tag key.") + /** + * Jobs returned will have this tag key. + */ @query("tag") tag?: string; - @doc("View type for including/excluding (for example) archived entities.") + /** + * View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; - @doc("Asset name the job's named output is registered with") + /** + * Asset name the job's named output is registered with + */ @query("assetName") assetName?: string; - @doc("Indicator whether the job is scheduled job.") + /** + * Indicator whether the job is scheduled job. + */ @query("scheduled") scheduled?: boolean; - @doc("The scheduled id for listing the job triggered from") + /** + * The scheduled id for listing the job triggered from + */ @query("scheduleId") scheduleId?: string; } >; + /** + * Cancels a Job (asynchronous). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Cancels a Job (asynchronous).") @operationId("Jobs_Cancel") cancel is ArmResourceActionAsync< JobBaseResource, @@ -97,3 +128,23 @@ interface JobBaseResources { ArmLroLocationHeader >; } + +@@projectedName(JobBaseResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(JobBaseResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(JobBaseResources.createOrUpdate::parameters.resource, + "Job definition object." +); +@@projectedName(JobBaseResources.update::parameters.properties, "json", "body"); +@@extension(JobBaseResources.update::parameters.properties, + "x-ms-client-name", + "body" +); +@@doc(JobBaseResources.update::parameters.properties, + "Job definition to apply during the operation." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp index 330a821ee4..4eb0a095f9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(Workspace) model LabelingJob is ProxyResource { - @doc("The name and identifier for the LabelingJob.") + /** + * The name and identifier for the LabelingJob. + */ @path @key("id") @segment("labelingJobs") @@ -24,45 +28,65 @@ model LabelingJob is ProxyResource { @armResourceOperations interface LabelingJobs { - @doc("Gets a labeling job by name/id.") + /** + * Gets a labeling job by name/id. + */ get is ArmResourceRead< LabelingJob, { ...BaseParameters; - @doc("Boolean value to indicate whether to include JobInstructions in response.") + /** + * Boolean value to indicate whether to include JobInstructions in response. + */ @query("includeJobInstructions") includeJobInstructions?: boolean; - @doc("Boolean value to indicate Whether to include LabelCategories in response.") + /** + * Boolean value to indicate Whether to include LabelCategories in response. + */ @query("includeLabelCategories") includeLabelCategories?: boolean; } >; - @doc("Creates or updates a labeling job (asynchronous).") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Creates or updates a labeling job (asynchronous). + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Delete a labeling job.") + /** + * Delete a labeling job. + */ delete is ArmResourceDeleteSync; - @doc("Lists labeling jobs in the workspace.") + /** + * Lists labeling jobs in the workspace. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("LabelingJobs_List") list is ArmResourceListByParent< LabelingJob, { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Number of labeling jobs to return.") + /** + * Number of labeling jobs to return. + */ @query("$top") $top?: int32; } >; - @doc("Export labels from a labeling job (asynchronous).") + /** + * Export labels from a labeling job (asynchronous). + */ exportLabels is ArmResourceActionAsync< LabelingJob, ExportSummary, @@ -71,10 +95,14 @@ interface LabelingJobs { ArmLroLocationHeader >; - @doc("Pause a labeling job.") + /** + * Pause a labeling job. + */ pause is ArmResourceActionSync; - @doc("Resume a labeling job (asynchronous).") + /** + * Resume a labeling job (asynchronous). + */ resume is ArmResourceActionAsync< LabelingJob, void, @@ -83,3 +111,16 @@ interface LabelingJobs { ArmLroLocationHeader >; } + +@@projectedName(LabelingJobs.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(LabelingJobs.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(LabelingJobs.createOrUpdate::parameters.resource, + "LabelingJob definition object." +); +@@doc(LabelingJobs.exportLabels::parameters.body, "The export summary."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp index e0868af4cb..4d1727952c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(Registry) model ModelContainerResource is ProxyResource { - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path @key("modelName") @@ -25,18 +29,24 @@ model ModelContainerResource is ProxyResource { @armResourceOperations interface ModelContainerResources { + /** + * Get container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get container.") @operationId("RegistryModelContainers_Get") get is ArmResourceRead; + /** + * Create or update model container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or update model container.") @operationId("RegistryModelContainers_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Delete container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete container.") @operationId("RegistryModelContainers_Delete") delete is ArmResourceDeleteAsync< ModelContainerResource, @@ -44,21 +54,39 @@ interface ModelContainerResources { ArmLroLocationHeader >; + /** + * List model containers. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List model containers.") @operationId("RegistryModelContainers_List") list is ArmResourceListByParent< ModelContainerResource, { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("View type for including/excluding (for example) archived entities.") + /** + * View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; } >; } + +@@projectedName(ModelContainerResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(ModelContainerResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(ModelContainerResources.createOrUpdate::parameters.resource, + "Container entity to create or update." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp index 17d1d81392..e0756a85a2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(ModelContainerResource) model ModelVersionResource is ProxyResource { - @doc("Version identifier. This is case-sensitive.") + /** + * Version identifier. This is case-sensitive. + */ @path @key("version") @segment("versions") @@ -24,18 +28,24 @@ model ModelVersionResource is ProxyResource { @armResourceOperations interface ModelVersionResources { + /** + * Get version. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get version.") @operationId("RegistryModelVersions_Get") get is ArmResourceRead; + /** + * Create or update version. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or update version.") @operationId("RegistryModelVersions_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Delete version. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete version.") @operationId("RegistryModelVersions_Delete") delete is ArmResourceDeleteAsync< ModelVersionResource, @@ -43,46 +53,64 @@ interface ModelVersionResources { ArmLroLocationHeader >; + /** + * List versions. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List versions.") @operationId("RegistryModelVersions_List") list is ArmResourceListByParent< ModelVersionResource, { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Ordering of list.") + /** + * Ordering of list. + */ @query("$orderBy") $orderBy?: string; - @doc("Maximum number of records to return.") + /** + * Maximum number of records to return. + */ @query("$top") $top?: int32; - @doc("Model description.") + /** + * Model description. + */ @query("description") description?: string; - @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + /** + * Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + */ @query("tags") tags?: string; - @doc("Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2") + /** + * Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2 + */ @query("properties") properties?: string; - @doc("View type for including/excluding (for example) archived entities.") + /** + * View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; } >; + /** + * Model Version Package operation. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Model Version Package operation.") @operationId("RegistryModelVersions_Package") package is ArmResourceActionAsync< ModelVersionResource, @@ -92,8 +120,10 @@ interface ModelVersionResources { ArmLroLocationHeader >; + /** + * Generate a storage location and credential for the client to upload a model asset to. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Generate a storage location and credential for the client to upload a model asset to.") @operationId("RegistryModelVersions_CreateOrGetStartPendingUpload") createOrGetStartPendingUpload is ArmResourceActionSync< ModelVersionResource, @@ -101,3 +131,21 @@ interface ModelVersionResources { PendingUploadResponseDto >; } + +@@projectedName(ModelVersionResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(ModelVersionResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(ModelVersionResources.createOrUpdate::parameters.resource, + "Version entity to create or update." +); +@@doc(ModelVersionResources.package::parameters.body, + "Package operation request body." +); +@@doc(ModelVersionResources.createOrGetStartPendingUpload::parameters.body, + "Pending upload request object" +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp index b0ca858ce3..195481324a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp @@ -15,7 +15,9 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(OnlineEndpointTrackedResource) model OnlineDeploymentTrackedResource is TrackedResource { - @doc("Inference Endpoint Deployment name.") + /** + * Inference Endpoint Deployment name. + */ @path @key("deploymentName") @segment("deployments") @@ -28,26 +30,35 @@ model OnlineDeploymentTrackedResource is TrackedResource { @armResourceOperations interface OnlineDeploymentTrackedResources { + /** + * Get Inference Deployment Deployment. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get Inference Deployment Deployment.") @operationId("OnlineDeployments_Get") get is ArmResourceRead; + /** + * Create or update Inference Endpoint Deployment (asynchronous). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or update Inference Endpoint Deployment (asynchronous).") @operationId("OnlineDeployments_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Update Online Deployment (asynchronous). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update Online Deployment (asynchronous).") + @parameterVisibility("read") @operationId("OnlineDeployments_Update") update is ArmCustomPatchAsync< OnlineDeploymentTrackedResource, PartialMinimalTrackedResourceWithSku >; + /** + * Delete Inference Endpoint Deployment (asynchronous). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete Inference Endpoint Deployment (asynchronous).") @operationId("OnlineDeployments_Delete") delete is ArmResourceDeleteAsync< OnlineDeploymentTrackedResource, @@ -55,30 +66,40 @@ interface OnlineDeploymentTrackedResources { ArmLroLocationHeader >; + /** + * List Inference Endpoint Deployments. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List Inference Endpoint Deployments.") @operationId("OnlineDeployments_List") list is ArmResourceListByParent< OnlineDeploymentTrackedResource, { ...BaseParameters; - @doc("Ordering of list.") + /** + * Ordering of list. + */ @query("$orderBy") $orderBy?: string; - @doc("Top of list.") + /** + * Top of list. + */ @query("$top") $top?: int32; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; } >; + /** + * Polls an Endpoint operation. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Polls an Endpoint operation.") @operationId("OnlineDeployments_GetLogs") getLogs is ArmResourceActionSync< OnlineDeploymentTrackedResource, @@ -86,47 +107,89 @@ interface OnlineDeploymentTrackedResources { DeploymentLogs >; + /** + * List Inference Endpoint Deployment Skus. + */ + // FIXME: OnlineDeployments_ListSkus could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("OnlineDeployments_ListSkus") @summary("List Inference Endpoint Deployment Skus.") - @doc("List Inference Endpoint Deployment Skus.") - // FIXME: OnlineDeployments_ListSkus could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus") @get - ListSkus is Azure.Core.Foundations.Operation< + listSkus is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Inference endpoint name.") + /** + * Inference endpoint name. + */ @path endpointName: string; - @doc("Inference Endpoint Deployment name.") + /** + * Inference Endpoint Deployment name. + */ @path deploymentName: string; - @doc("Number of Skus to be retrieved in a page of results.") + /** + * Number of Skus to be retrieved in a page of results. + */ @query("count") count?: int32; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; }, SkuResourceArmPaginatedResult >; } + +@@projectedName(OnlineDeploymentTrackedResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(OnlineDeploymentTrackedResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(OnlineDeploymentTrackedResources.createOrUpdate::parameters.resource, + "Inference Endpoint entity to apply during operation." +); +@@projectedName(OnlineDeploymentTrackedResources.update::parameters.properties, + "json", + "body" +); +@@extension(OnlineDeploymentTrackedResources.update::parameters.properties, + "x-ms-client-name", + "body" +); +@@doc(OnlineDeploymentTrackedResources.update::parameters.properties, + "Online Endpoint entity to apply during operation." +); +@@doc(OnlineDeploymentTrackedResources.getLogs::parameters.body, + "The request containing parameters for retrieving logs." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp index 240759640a..3ee301e7f2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp @@ -15,7 +15,9 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(Workspace) model OnlineEndpointTrackedResource is TrackedResource { - @doc("Online Endpoint name.") + /** + * Online Endpoint name. + */ @path @key("endpointName") @segment("onlineEndpoints") @@ -28,26 +30,35 @@ model OnlineEndpointTrackedResource is TrackedResource { @armResourceOperations interface OnlineEndpointTrackedResources { + /** + * Get Online Endpoint. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get Online Endpoint.") @operationId("OnlineEndpoints_Get") get is ArmResourceRead; + /** + * Create or update Online Endpoint (asynchronous). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or update Online Endpoint (asynchronous).") @operationId("OnlineEndpoints_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + /** + * Update Online Endpoint (asynchronous). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update Online Endpoint (asynchronous).") + @parameterVisibility("read") @operationId("OnlineEndpoints_Update") update is ArmCustomPatchAsync< OnlineEndpointTrackedResource, PartialMinimalTrackedResourceWithIdentity >; + /** + * Delete Online Endpoint (asynchronous). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete Online Endpoint (asynchronous).") @operationId("OnlineEndpoints_Delete") delete is ArmResourceDeleteAsync< OnlineEndpointTrackedResource, @@ -55,46 +66,64 @@ interface OnlineEndpointTrackedResources { ArmLroLocationHeader >; + /** + * List Online Endpoints. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List Online Endpoints.") @operationId("OnlineEndpoints_List") list is ArmResourceListByParent< OnlineEndpointTrackedResource, { ...BaseParameters; - @doc("Name of the endpoint.") + /** + * Name of the endpoint. + */ @query("name") name?: string; - @doc("Number of endpoints to be retrieved in a page of results.") + /** + * Number of endpoints to be retrieved in a page of results. + */ @query("count") count?: int32; - @doc("EndpointComputeType to be filtered by.") + /** + * EndpointComputeType to be filtered by. + */ @query("computeType") computeType?: EndpointComputeType; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("A set of tags with which to filter the returned models. It is a comma separated string of tags key or tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 .") + /** + * A set of tags with which to filter the returned models. It is a comma separated string of tags key or tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + */ @query("tags") tags?: string; - @doc("A set of properties with which to filter the returned models. It is a comma separated string of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 .") + /** + * A set of properties with which to filter the returned models. It is a comma separated string of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + */ @query("properties") properties?: string; - @doc("The option to order the response.") + /** + * The option to order the response. + */ @query("orderBy") orderBy?: OrderString; } >; + /** + * List EndpointAuthKeys for an Endpoint using Key-based authentication. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List EndpointAuthKeys for an Endpoint using Key-based authentication.") @operationId("OnlineEndpoints_ListKeys") listKeys is ArmResourceActionSync< OnlineEndpointTrackedResource, @@ -102,8 +131,10 @@ interface OnlineEndpointTrackedResources { EndpointAuthKeys >; + /** + * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous).") @operationId("OnlineEndpoints_RegenerateKeys") regenerateKeys is ArmResourceActionAsync< OnlineEndpointTrackedResource, @@ -113,8 +144,10 @@ interface OnlineEndpointTrackedResources { ArmLroLocationHeader >; + /** + * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Retrieve a valid AML token for an Endpoint using AMLToken-based authentication.") @operationId("OnlineEndpoints_GetToken") getToken is ArmResourceActionSync< OnlineEndpointTrackedResource, @@ -122,3 +155,29 @@ interface OnlineEndpointTrackedResources { EndpointAuthToken >; } + +@@projectedName(OnlineEndpointTrackedResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(OnlineEndpointTrackedResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(OnlineEndpointTrackedResources.createOrUpdate::parameters.resource, + "Online Endpoint entity to apply during operation." +); +@@projectedName(OnlineEndpointTrackedResources.update::parameters.properties, + "json", + "body" +); +@@extension(OnlineEndpointTrackedResources.update::parameters.properties, + "x-ms-client-name", + "body" +); +@@doc(OnlineEndpointTrackedResources.update::parameters.properties, + "Online Endpoint entity to apply during operation." +); +@@doc(OnlineEndpointTrackedResources.regenerateKeys::parameters.body, + "RegenerateKeys request ." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp index 20c250eaff..ae272577f3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Outbound Rule Basic Resource for the managed network of a machine learning workspace.") +/** + * Outbound Rule Basic Resource for the managed network of a machine learning workspace. + */ @parentResource(Workspace) model OutboundRuleBasicResource is ProxyResource { - @doc("Name of the workspace managed network outbound rule") + /** + * Name of the workspace managed network outbound rule + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path @key("ruleName") @@ -25,27 +29,47 @@ model OutboundRuleBasicResource is ProxyResource { @armResourceOperations interface OutboundRuleBasicResources { + /** + * Gets an outbound rule from the managed network of a machine learning workspace. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets an outbound rule from the managed network of a machine learning workspace.") @operationId("ManagedNetworkSettingsRule_Get") get is ArmResourceRead; + /** + * Creates or updates an outbound rule in the managed network of a machine learning workspace. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or updates an outbound rule in the managed network of a machine learning workspace.") @operationId("ManagedNetworkSettingsRule_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< OutboundRuleBasicResource, BaseParameters, ArmLroLocationHeader >; + /** + * Deletes an outbound rule from the managed network of a machine learning workspace. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes an outbound rule from the managed network of a machine learning workspace.") @operationId("ManagedNetworkSettingsRule_Delete") delete is ArmResourceDeleteAsync; + /** + * Lists the managed network outbound rules for a machine learning workspace. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists the managed network outbound rules for a machine learning workspace.") @operationId("ManagedNetworkSettingsRule_List") list is ArmResourceListByParent; } + +@@projectedName(OutboundRuleBasicResources.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(OutboundRuleBasicResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(OutboundRuleBasicResources.createOrUpdate::parameters.resource, + "Outbound Rule to be created or updated in the managed network of a machine learning workspace." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp index b2bf3862fb..b3ba781135 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("The Private Endpoint Connection resource.") +/** + * The Private Endpoint Connection resource. + */ @parentResource(Workspace) model PrivateEndpointConnection is TrackedResource { - @doc("NRP Private Endpoint Connection Name") + /** + * NRP Private Endpoint Connection Name + */ @path @key("privateEndpointConnectionName") @segment("privateEndpointConnections") @@ -28,18 +32,38 @@ model PrivateEndpointConnection @armResourceOperations interface PrivateEndpointConnections { - @doc("Called by end-users to get a PE connection.") + /** + * Called by end-users to get a PE connection. + */ get is ArmResourceRead; - @doc(""" -Called by end-users to approve or reject a PE connection. + /** +* Called by end-users to approve or reject a PE connection. This method must validate and forward the call to NRP. -""") +*/ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Called by end-users to delete a PE connection.") + /** + * Called by end-users to delete a PE connection. + */ delete is ArmResourceDeleteSync; - @doc("Called by end-users to get all PE connections.") + /** + * Called by end-users to get all PE connections. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateEndpointConnections_List") list is ArmResourceListByParent; } + +@@projectedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, + "json", + "body" +); +@@extension(PrivateEndpointConnections.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(PrivateEndpointConnections.createOrUpdate::parameters.resource, + "PrivateEndpointConnection object" +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp index 004cb1e443..a69b53cffe 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp @@ -13,7 +13,9 @@ using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; model Registry is TrackedResource { - @doc("Name of Azure Machine Learning registry. This is case-insensitive") + /** + * Name of Azure Machine Learning registry. This is case-insensitive + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{2,32}$") @path @key("registryName") @@ -27,33 +29,50 @@ model Registry is TrackedResource { @armResourceOperations interface Registries { - @doc("Get registry") + /** + * Get registry + */ get is ArmResourceRead; - @doc("Create or update registry") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + /** + * Create or update registry + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync< Registry, BaseParameters, ArmAsyncOperationHeader >; - @doc("Update tags") + /** + * Update tags + */ + @parameterVisibility("read") update is ArmCustomPatchSync; - @doc("Delete registry") + /** + * Delete registry + */ delete is ArmResourceDeleteAsync< Registry, BaseParameters, ArmLroLocationHeader >; - @doc("List registries") + /** + * List registries + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Registries_List") list is ArmResourceListByParent; - @doc("List registries by subscription") + /** + * List registries by subscription + */ listBySubscription is ArmListBySubscription; - @doc("Remove regions from registry") + /** + * Remove regions from registry + */ removeRegions is ArmResourceActionAsync< Registry, Registry, @@ -62,3 +81,23 @@ interface Registries { ArmLroLocationHeader >; } + +@@projectedName(Registries.createOrUpdate::parameters.resource, "json", "body"); +@@extension(Registries.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(Registries.createOrUpdate::parameters.resource, + "Details required to create the registry." +); +@@projectedName(Registries.update::parameters.properties, "json", "body"); +@@extension(Registries.update::parameters.properties, + "x-ms-client-name", + "body" +); +@@doc(Registries.update::parameters.properties, + "Details required to create the registry." +); +@@doc(Registries.removeRegions::parameters.body, + "Details required to create the registry." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp index 29df360256..14a3113117 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -@doc("Azure Resource Manager resource envelope.") +/** + * Azure Resource Manager resource envelope. + */ @parentResource(Workspace) model Schedule is ProxyResource { - @doc("Schedule name.") + /** + * Schedule name. + */ @path @key("name") @segment("schedules") @@ -24,32 +28,53 @@ model Schedule is ProxyResource { @armResourceOperations interface Schedules { - @doc("Get schedule.") + /** + * Get schedule. + */ get is ArmResourceRead; - @doc("Create or update schedule.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + /** + * Create or update schedule. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; - @doc("Delete schedule.") + /** + * Delete schedule. + */ delete is ArmResourceDeleteAsync< Schedule, BaseParameters, ArmLroLocationHeader >; - @doc("List schedules in specified workspace.") + /** + * List schedules in specified workspace. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Schedules_List") list is ArmResourceListByParent< Schedule, { ...BaseParameters; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Status filter for schedule.") + /** + * Status filter for schedule. + */ @query("listViewType") listViewType?: ScheduleListViewType; } >; } + +@@projectedName(Schedules.createOrUpdate::parameters.resource, "json", "body"); +@@extension(Schedules.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(Schedules.createOrUpdate::parameters.resource, "Schedule definition."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp index 2608367d4c..81a47678e9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp @@ -4,225 +4,240 @@ import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; + using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; + namespace Azure.ResourceManager.MachineLearning; -@doc("An object that represents a machine learning workspace.") +/** +* An object that represents a machine learning workspace. +*/ model Workspace is TrackedResource { - @doc("Name of Azure Machine Learning workspace.") - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - @key("workspaceName") - @segment("workspaces") - name: string; - - ...Azure.ResourceManager.ManagedServiceIdentity; - ...Azure.ResourceManager.ResourceSku; - ...Azure.ResourceManager.ResourceKind; +/** +* Name of Azure Machine Learning workspace. +*/ +@pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") +@path +@key("workspaceName") +@segment("workspaces") +"name": string; + +...Azure.ResourceManager.ManagedServiceIdentity + +...Azure.ResourceManager.ResourceSku + +...Azure.ResourceManager.ResourceKind } + + @armResourceOperations interface Workspaces { - @doc("Gets the properties of the specified machine learning workspace.") - get is ArmResourceRead; - - @doc("Creates or updates a workspace with the specified parameters.") - createOrUpdate is ArmResourceCreateOrUpdateAsync< - Workspace, - BaseParameters, - ArmLroLocationHeader - >; - - @doc("Updates a machine learning workspace with the specified parameters.") - update is ArmCustomPatchAsync; - - @doc("Deletes a machine learning workspace.") - delete is ArmResourceDeleteAsync< - Workspace, - { - ...BaseParameters; - - @doc("Flag to indicate delete is a purge request.") - @query("forceToPurge") - forceToPurge?: boolean; - } - >; - - @doc("Lists all the available machine learning workspaces under the specified resource group.") - listByResourceGroup is ArmResourceListByParent< - Workspace, - { - ...BaseParameters; - - @doc("Continuation token for pagination.") - @query("$skip") - $skip?: string; - - @doc("Kind of workspace.") - @query("kind") - kind?: string; - } - >; - - @doc("Lists all the available machine learning workspaces under the specified subscription.") - listBySubscription is ArmListBySubscription; - - @doc("Diagnose workspace setup issue.") - diagnose is ArmResourceActionAsync< - Workspace, - DiagnoseWorkspaceParameters, - DiagnoseResponseResult, - BaseParameters, - ArmLroLocationHeader - >; - - @doc("Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry.") - listKeys is ArmResourceActionSync; - - @doc("Get Azure Machine Learning Workspace notebook access token") - listNotebookAccessToken is ArmResourceActionSync< - Workspace, - void, - NotebookAccessTokenResult - >; - - @doc("Lists keys of Azure Machine Learning Workspaces notebook.") - listNotebookKeys is ArmResourceActionSync< - Workspace, - void, - ListNotebookKeysResult - >; - - @doc("Lists keys of Azure Machine Learning Workspace's storage account.") - listStorageAccountKeys is ArmResourceActionSync< - Workspace, - void, - ListStorageAccountKeysResult - >; - - @doc("Prepare Azure Machine Learning Workspace's notebook resource") - prepareNotebook is ArmResourceActionAsync< - Workspace, - void, - NotebookResourceInfo, - BaseParameters, - ArmLroLocationHeader - >; - - @doc("Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and password for container registry") - resyncKeys is ArmResourceActionAsync< - Workspace, - void, - void, - BaseParameters, - ArmLroLocationHeader - >; - - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Provisions the managed network of a machine learning workspace.") - @operationId("ManagedNetworkProvisions_ProvisionManagedNetwork") - provisionManagedNetwork is ArmResourceActionAsync< - Workspace, - ManagedNetworkProvisionOptions, - ManagedNetworkProvisionStatus, - BaseParameters, - ArmLroLocationHeader - >; - - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("WorkspaceFeatures_List") - @doc("Lists all enabled features for a workspace") - // FIXME: WorkspaceFeatures_List could not be converted to a resource operation - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features") - @get - List is Azure.Core.Foundations.Operation< - { - @doc("The ID of the target subscription.") - @minLength(1) - @path - subscriptionId: string; - - @doc("The name of the resource group. The name is case insensitive.") - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - @doc("Name of Azure Machine Learning workspace.") - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - }, - ListAmlUserFeatureResult - >; - - @summary("Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically.") - @doc("Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically.") - // FIXME: Workspaces_ListOutboundNetworkDependenciesEndpoints could not be converted to a resource operation - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") - @get - ListOutboundNetworkDependenciesEndpoints is Azure.Core.Foundations.Operation< - { - @doc("The ID of the target subscription.") - @minLength(1) - @path - subscriptionId: string; - - @doc("The name of the resource group. The name is case insensitive.") - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - @doc("Name of Azure Machine Learning workspace.") - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - }, - ExternalFqdnResponse - >; - - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PrivateLinkResources_List") - @summary(""" -Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. +/** +* Gets the properties of the specified machine learning workspace. +*/ +get is ArmResourceRead + +/** +* Creates or updates a workspace with the specified parameters. +*/ +createOrUpdate is ArmResourceCreateOrReplaceAsync,ArmLroLocationHeader> + +/** +* Updates a machine learning workspace with the specified parameters. +*/ +@parameterVisibility("read") +update is ArmCustomPatchAsync + +/** +* Deletes a machine learning workspace. +*/ +delete is ArmResourceDeleteAsync, + /** +* Flag to indicate delete is a purge request. +*/ +@query("forceToPurge") +"forceToPurge"?: boolean + }> + +/** +* Lists all the available machine learning workspaces under the specified resource group. +*/ +@operationId("Workspaces_ListByResourceGroup") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +listByResourceGroup is ArmResourceListByParent, + /** +* Continuation token for pagination. +*/ +@query("$skip") +"$skip"?: string +/** +* Kind of workspace. +*/ +@query("kind") +"kind"?: string + }> + +/** +* Lists all the available machine learning workspaces under the specified subscription. +*/ +listBySubscription is ArmListBySubscription + +/** +* Diagnose workspace setup issue. +*/ +diagnose is ArmResourceActionAsync,ArmLroLocationHeader> + +/** +* Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. +*/ +listKeys is ArmResourceActionSync + +/** +* Get Azure Machine Learning Workspace notebook access token +*/ +listNotebookAccessToken is ArmResourceActionSync + +/** +* Lists keys of Azure Machine Learning Workspaces notebook. +*/ +listNotebookKeys is ArmResourceActionSync + +/** +* Lists keys of Azure Machine Learning Workspace's storage account. +*/ +listStorageAccountKeys is ArmResourceActionSync + +/** +* Prepare Azure Machine Learning Workspace's notebook resource +*/ +prepareNotebook is ArmResourceActionAsync,ArmLroLocationHeader> + +/** +* Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and password for container registry +*/ +resyncKeys is ArmResourceActionAsync,ArmLroLocationHeader> + +/** +* Provisions the managed network of a machine learning workspace. +*/ +@operationId("ManagedNetworkProvisions_ProvisionManagedNetwork") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +provisionManagedNetwork is ArmResourceActionAsync,ArmLroLocationHeader> + +@operationId("WorkspaceFeatures_List") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +/** +* Lists all enabled features for a workspace +*/ +// FIXME: WorkspaceFeatures_List could not be converted to a resource operation +@route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features") +@get op `list` is Azure.Core.Foundations.Operation<{/** +* The ID of the target subscription. +*/ +@minLength(1) +@path +"subscriptionId": string +/** +* The name of the resource group. The name is case insensitive. +*/ +@maxLength(90) +@minLength(1) +@path +"resourceGroupName": string +/** +* Name of Azure Machine Learning workspace. +*/ +@pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") +@path +"workspaceName": string}, ListAmlUserFeatureResult>; + + + + +@summary("Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically.") +/** +* Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. +*/ +// FIXME: Workspaces_ListOutboundNetworkDependenciesEndpoints could not be converted to a resource operation +@route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") +@get op `listOutboundNetworkDependenciesEndpoints` is Azure.Core.Foundations.Operation<{/** +* The ID of the target subscription. +*/ +@minLength(1) +@path +"subscriptionId": string +/** +* The name of the resource group. The name is case insensitive. +*/ +@maxLength(90) +@minLength(1) +@path +"resourceGroupName": string +/** +* Name of Azure Machine Learning workspace. +*/ +@pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") +@path +"workspaceName": string}, ExternalFqdnResponse>; + + + + +@operationId("PrivateLinkResources_List") +#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" +@summary("Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. Each "private link resource" is a connection endpoint (IP address) to the resource. Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. -Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". -""") - @doc(""" -Called by Client (Portal, CLI, etc) to get available \"private link resources\" for the workspace. -Each \"private link resource\" is a connection endpoint (IP address) to the resource. +Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds".") +/** +* Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. +Each "private link resource" is a connection endpoint (IP address) to the resource. Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. -Defined in the \"[NRP] Private Endpoint Design\" doc, topic \"GET API for GroupIds\". -""") - // FIXME: PrivateLinkResources_List could not be converted to a resource operation - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") - @get - List is Azure.Core.Foundations.Operation< - { - @doc("The ID of the target subscription.") - @minLength(1) - @path - subscriptionId: string; - - @doc("The name of the resource group. The name is case insensitive.") - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - @doc("Name of Azure Machine Learning workspace.") - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - }, - PrivateLinkResourceListResult - >; +Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". +*/ +// FIXME: PrivateLinkResources_List could not be converted to a resource operation +@route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") +@get op `list` is Azure.Core.Foundations.Operation<{/** +* The ID of the target subscription. +*/ +@minLength(1) +@path +"subscriptionId": string +/** +* The name of the resource group. The name is case insensitive. +*/ +@maxLength(90) +@minLength(1) +@path +"resourceGroupName": string +/** +* Name of Azure Machine Learning workspace. +*/ +@pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") +@path +"workspaceName": string}, PrivateLinkResourceListResult>; + + + + } + + + +@@projectedName(Workspaces.createOrUpdate::parameters.resource, "json", "body"); +@@extension(Workspaces.createOrUpdate::parameters.resource, "x-ms-client-name", "body"); +@@doc(Workspaces.createOrUpdate::parameters.resource, "The parameters for creating or updating a machine learning workspace."); +@@projectedName(Workspaces.update::parameters.properties, "json", "body"); +@@extension(Workspaces.update::parameters.properties, "x-ms-client-name", "body"); +@@doc(Workspaces.update::parameters.properties, "The parameters for updating a machine learning workspace."); +@@doc(Workspaces.diagnose::parameters.body, "The parameter of diagnosing workspace health"); +@@doc(Workspaces.provisionManagedNetwork::parameters.body, "Managed Network Provisioning Options for a machine learning workspace."); \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp index 356fc3f1aa..7076a790b1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp @@ -16,7 +16,9 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(Workspace) model WorkspaceConnectionPropertiesV2BasicResource is ProxyResource { - @doc("Friendly name of the workspace connection") + /** + * Friendly name of the workspace connection + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path @key("connectionName") @@ -26,49 +28,66 @@ model WorkspaceConnectionPropertiesV2BasicResource @armResourceOperations interface WorkspaceConnectionPropertiesV2BasicResources { + /** + * Lists machine learning workspaces connections by name. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists machine learning workspaces connections by name.") @operationId("WorkspaceConnections_Get") get is ArmResourceRead; + /** + * Create or update machine learning workspaces connections under the specified workspace. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create or update machine learning workspaces connections under the specified workspace.") @operationId("WorkspaceConnections_Create") create is ArmResourceCreateOrReplaceSync; + /** + * Update machine learning workspaces connections under the specified workspace. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update machine learning workspaces connections under the specified workspace.") + @parameterVisibility("read") @operationId("WorkspaceConnections_Update") update is ArmCustomPatchSync< WorkspaceConnectionPropertiesV2BasicResource, WorkspaceConnectionUpdateParameter >; + /** + * Delete machine learning workspaces connections by name. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete machine learning workspaces connections by name.") @operationId("WorkspaceConnections_Delete") delete is ArmResourceDeleteSync; + /** + * Lists all the available machine learning workspaces connections under the specified workspace. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Lists all the available machine learning workspaces connections under the specified workspace.") @operationId("WorkspaceConnections_List") list is ArmResourceListByParent< WorkspaceConnectionPropertiesV2BasicResource, { ...BaseParameters; - @doc("Target of the workspace connection.") + /** + * Target of the workspace connection. + */ @query("target") target?: string; - @doc("Category of the workspace connection.") + /** + * Category of the workspace connection. + */ @query("category") category?: string; } >; + /** + * List all the secrets of a machine learning workspaces connections. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List all the secrets of a machine learning workspaces connections.") @operationId("WorkspaceConnections_ListSecrets") listSecrets is ArmResourceActionSync< WorkspaceConnectionPropertiesV2BasicResource, @@ -76,3 +95,26 @@ interface WorkspaceConnectionPropertiesV2BasicResources { WorkspaceConnectionPropertiesV2BasicResource >; } + +@@projectedName(WorkspaceConnectionPropertiesV2BasicResources.create::parameters.resource, + "json", + "body" +); +@@extension(WorkspaceConnectionPropertiesV2BasicResources.create::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(WorkspaceConnectionPropertiesV2BasicResources.create::parameters.resource, + "The object for creating or updating a new workspace connection" +); +@@projectedName(WorkspaceConnectionPropertiesV2BasicResources.update::parameters.properties, + "json", + "body" +); +@@extension(WorkspaceConnectionPropertiesV2BasicResources.update::parameters.properties, + "x-ms-client-name", + "body" +); +@@doc(WorkspaceConnectionPropertiesV2BasicResources.update::parameters.properties, + "Parameters for workspace connection update." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_AttachAKubernetesCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Attach_A_Kubernetes_Compute.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_AttachAKubernetesCompute.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Attach_A_Kubernetes_Compute.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAAmlCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Create_A_Aml_Compute.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAAmlCompute.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Create_A_Aml_Compute.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateADataFactoryCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Create_A_Data_Factory_Compute.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateADataFactoryCompute.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Create_A_Data_Factory_Compute.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnAksCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Create_An_Aks_Compute.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnAksCompute.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Create_An_Aks_Compute.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Create_An_Compute_Instance_Compute.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceCompute.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Create_An_Compute_Instance_Compute.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithMinimalInputs.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Create_An_Compute_Instance_Compute_With_Minimal_Inputs.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithMinimalInputs.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Create_An_Compute_Instance_Compute_With_Minimal_Inputs.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithSchedules.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Create_An_Compute_Instance_Compute_With_Schedules.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithSchedules.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Create_An_Compute_Instance_Compute_With_Schedules.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAAmlCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Update_A_Aml_Compute.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAAmlCompute.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Update_A_Aml_Compute.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAnAksCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Update_An_Aks_Compute.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAnAksCompute.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_Update_An_Aks_Compute.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAksCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_Get_A_Aks_Compute.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAksCompute.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_Get_A_Aks_Compute.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAmlCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_Get_A_Aml_Compute.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAmlCompute.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_Get_A_Aml_Compute.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAKubernetesCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_Get_A_Kubernetes_Compute.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAKubernetesCompute.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_Get_A_Kubernetes_Compute.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAnComputeInstance.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_Get_An_Compute_Instance.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAnComputeInstance.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_Get_An_Compute_Instance.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureBlobWAccountKey.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_Create_Or_Update_Datastore_Azure_Blob_W_Account_Key.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureBlobWAccountKey.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_Create_Or_Update_Datastore_Azure_Blob_W_Account_Key.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_Create_Or_Update_Datastore_Azure_Data_Lake_Gen1_W_Service_Principal.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_Create_Or_Update_Datastore_Azure_Data_Lake_Gen1_W_Service_Principal.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_Create_Or_Update_Datastore_Azure_Data_Lake_Gen2_W_Service_Principal.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_Create_Or_Update_Datastore_Azure_Data_Lake_Gen2_W_Service_Principal.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKey.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_Create_Or_Update_Datastore_Azure_File_Store_W_Account_Key.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKey.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_Create_Or_Update_Datastore_Azure_File_Store_W_Account_Key.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateAutoMlJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_Create_Or_Update_Auto_Ml_Job.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateAutoMlJob.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_Create_Or_Update_Auto_Ml_Job.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateCommandJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_Create_Or_Update_Command_Job.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateCommandJob.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_Create_Or_Update_Command_Job.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdatePipelineJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_Create_Or_Update_Pipeline_Job.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdatePipelineJob.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_Create_Or_Update_Pipeline_Job.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateSweepJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_Create_Or_Update_Sweep_Job.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateSweepJob.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_Create_Or_Update_Sweep_Job.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetAutoMlJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_Get_Auto_Ml_Job.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetAutoMlJob.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_Get_Auto_Ml_Job.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetCommandJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_Get_Command_Job.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetCommandJob.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_Get_Command_Job.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetPipelineJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_Get_Pipeline_Job.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetPipelineJob.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_Get_Pipeline_Job.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetSweepJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_Get_Sweep_Job.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetSweepJob.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_Get_Sweep_Job.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListAutoMlJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_List_Auto_Ml_Job.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListAutoMlJob.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_List_Auto_Ml_Job.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListCommandJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_List_Command_Job.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListCommandJob.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_List_Command_Job.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListPipelineJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_List_Pipeline_Job.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListPipelineJob.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_List_Pipeline_Job.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListSweepJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_List_Sweep_Job.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListSweepJob.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_List_Sweep_Job.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_Create_Or_Update_Kubernetes_Online_Deployment.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_Create_Or_Update_Kubernetes_Online_Deployment.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateManagedOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_Create_Or_Update_Managed_Online_Deployment.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateManagedOnlineDeployment.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_Create_Or_Update_Managed_Online_Deployment.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetKubernetesOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_Get_Kubernetes_Online_Deployment.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetKubernetesOnlineDeployment.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_Get_Kubernetes_Online_Deployment.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetManagedOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_Get_Managed_Online_Deployment.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetManagedOnlineDeployment.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_Get_Managed_Online_Deployment.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListKubernetesOnlineDeploymentSkus.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_List_Kubernetes_Online_Deployment_Skus.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListKubernetesOnlineDeploymentSkus.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_List_Kubernetes_Online_Deployment_Skus.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListManagedOnlineDeploymentSkus.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_List_Managed_Online_Deployment_Skus.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListManagedOnlineDeploymentSkus.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_List_Managed_Online_Deployment_Skus.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateKubernetesOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_Update_Kubernetes_Online_Deployment.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateKubernetesOnlineDeployment.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_Update_Kubernetes_Online_Deployment.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateManagedOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_Update_Managed_Online_Deployment.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateManagedOnlineDeployment.json rename to packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_Update_Managed_Online_Deployment.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp index 09216f9f5d..1e51b080d5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp @@ -50,19 +50,25 @@ using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; +/** + * These APIs allow end users to operate on Azure Machine Learning Workspace resources. + */ @armProviderNamespace @service({ title: "Azure Machine Learning Services", }) @versioned(Versions) @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) -@doc("These APIs allow end users to operate on Azure Machine Learning Workspace resources.") namespace Azure.ResourceManager.MachineLearning; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { + /** + * The 2023-06-01-preview API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2023-06-01-preview API version.") v2023_06_01_preview: "2023-06-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp index 2416b05726..40a499f6e0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp @@ -3,7128 +3,9214 @@ import "@typespec/http"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; + using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; -namespace Azure.ResourceManager.MachineLearning; - -interface Operations extends Azure.ResourceManager.Operations {} -@doc("An enum describing the unit of usage measurement.") -enum UsageUnit { - Count, -} +namespace Azure.ResourceManager.MachineLearning; -@doc("Three lettered code specifying the currency of the VM price. Example: USD") -enum BillingCurrency { - USD, -} +interface Operations extends Azure.ResourceManager.Operations {} + +/** +* An enum describing the unit of usage measurement. +*/ + enum UsageUnit { + "Count" + } + +/** +* Three lettered code specifying the currency of the VM price. Example: USD +*/ + enum BillingCurrency { + "USD" + } + +/** +* The unit of time measurement for the specified VM price. Example: OneHour +*/ + enum UnitOfMeasure { + "OneHour" + } + +/** +* Operating system type used by the VM. +*/ + enum VMPriceOSType { + "Linux", "Windows" + } + +/** +* The type of the VM. +*/ + enum VMTier { + "Standard", "LowPriority", "Spot" + } + +/** +* An enum describing the unit of quota measurement. +*/ + enum QuotaUnit { + "Count" + } + +/** +* Status of update workspace quota. +*/ + enum Status { + "Undefined", "Success", "Failure", "InvalidQuotaBelowClusterMinimum", "InvalidQuotaExceedsSubscriptionLimit", "InvalidVMFamilyName", "OperationNotSupportedForSku", "OperationNotEnabledForRegion" + } + +/** +* Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). +*/ + enum ManagedServiceIdentityType { + "None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned" + } + +/** +* The type of compute +*/ + enum ComputeType { + "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark" + } + +/** +* The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. +*/ + enum ProvisioningState { + "Unknown", "Updating", "Creating", "Deleting", "Succeeded", "Failed", "Canceled" + } + + + enum UnderlyingResourceAction { + "Delete", "Detach" + } + +/** +* Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images +*/ + enum ImageType { + "docker", "azureml" + } + +/** +* Type of the Environment Variable. Possible values are: local - For local variable +*/ + enum EnvironmentVariableType { + "local" + } + +/** +* Protocol over which communication will happen over this endpoint +*/ + enum Protocol { + "tcp", "udp", "http" + } + +/** +* Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe +*/ + enum VolumeDefinitionType { + "bind", "volume", "tmpfs", "npipe" + } + +/** +* State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. +*/ + enum NodeState { + "idle", "running", "preparing", "unusable", "leaving", "preempted" + } + +/** +* Provisioning state of registry asset. +*/ + enum AssetProvisioningState { + "Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting" + } + + + enum AutoDeleteCondition { + "CreatedGreaterThan", "LastAccessedGreaterThan" + } + +/** +* Type of storage to use for the pending upload location +*/ + enum PendingUploadType { + "None", "TemporaryBlobReference" + } + +/** +* Enum to determine the PendingUpload credentials type. +*/ + enum PendingUploadCredentialType { + "SAS" + } + + + enum ListViewType { + "ActiveOnly", "ArchivedOnly", "All" + } + +/** +* Enum to determine the type of data. +*/ + enum DataType { + "uri_file", "uri_folder", "mltable" + } + +/** +* Protection level associated with the Intellectual Property. +*/ + enum ProtectionLevel { + /** +* All means Intellectual Property is fully protected. +*/"All", /** +* None means it is not an Intellectual Property. +*/"None" + } + +/** +* AutoRebuild setting for the derived image +*/ + enum AutoRebuildSetting { + "Disabled", "OnBaseImageUpdate" + } + +/** +* Environment type is either user created or curated by Azure ML service +*/ + enum EnvironmentType { + "Curated", "UserCreated" + } + +/** +* The type of operating system. +*/ + enum OperatingSystemType { + "Linux", "Windows" + } + +/** +* Base environment type. +*/ + enum BaseEnvironmentSourceType { + "EnvironmentAsset" + } + +/** +* Inferencing server type for various targets. +*/ + enum InferencingServerType { + "AzureMLOnline", "AzureMLBatch", "Triton", "Custom" + } + +/** +* Type of the inputs. +*/ + enum PackageInputType { + "UriFile", "UriFolder" + } + +/** +* Mounting type of the model or the inputs +*/ + enum PackageInputDeliveryMode { + "Copy", "Download" + } + +/** +* Input path type for package inputs. +*/ + enum InputPathType { + "Url", "PathId", "PathVersion" + } + +/** +* Package build state returned in package response. +*/ + enum PackageBuildState { + "NotStarted", "Running", "Succeeded", "Failed" + } + +/** +* State of endpoint provisioning. +*/ + enum EndpointProvisioningState { + "Creating", "Deleting", "Succeeded", "Failed", "Updating", "Canceled" + } + +/** +* Enum to determine endpoint authentication mode. +*/ + enum EndpointAuthMode { + "AMLToken", "Key", "AADToken" + } + +/** +* The enumerated property types for batch deployments. +*/ + enum BatchDeploymentConfigurationType { + "Model", "PipelineComponent" + } + +/** +* Log verbosity for batch inferencing. +Increasing verbosity order for logging is : Warning, Info and Debug. +The default value is Info. +*/ + enum BatchLoggingLevel { + "Info", "Warning", "Debug" + } + +/** +* Enum to determine which reference method to use for an asset. +*/ + enum ReferenceType { + "Id", "DataPath", "OutputPath" + } + +/** +* Enum to determine how batch inferencing will handle output +*/ + enum BatchOutputAction { + "SummaryOnly", "AppendRow" + } + +/** +* Possible values for DeploymentProvisioningState. +*/ + enum DeploymentProvisioningState { + "Creating", "Deleting", "Scaling", "Updating", "Succeeded", "Failed", "Canceled" + } + +/** +* Enum to determine the datastore credentials type. +*/ + enum CredentialsType { + "AccountKey", "Certificate", "None", "Sas", "ServicePrincipal", "KerberosKeytab", "KerberosPassword" + } + +/** +* Enum to determine the datastore contents type. +*/ + enum DatastoreType { + "AzureBlob", "AzureDataLakeGen1", "AzureDataLakeGen2", "AzureFile", "Hdfs", "OneLake" + } + +/** +* Enum to determine the datastore secrets type. +*/ + enum SecretsType { + "AccountKey", "Certificate", "Sas", "ServicePrincipal", "KerberosPassword", "KerberosKeytab" + } + + + enum FeatureDataType { + "String", "Integer", "Long", "Float", "Double", "Binary", "Datetime", "Boolean" + } + +/** +* Enum to determine the email notification type. +*/ + enum EmailNotificationEnableType { + "JobCompleted", "JobFailed", "JobCancelled" + } + +/** +* Enum to determine the webhook callback service type. +*/ + enum WebhookType { + "AzureDevOps" + } + +/** +* Enum to describe the frequency of a recurrence schedule +*/ + enum RecurrenceFrequency { + /** +* Minute frequency +*/"Minute", /** +* Hour frequency +*/"Hour", /** +* Day frequency +*/"Day", /** +* Week frequency +*/"Week", /** +* Month frequency +*/"Month" + } + +/** +* Enum of weekday +*/ + enum WeekDay { + /** +* Monday weekday +*/"Monday", /** +* Tuesday weekday +*/"Tuesday", /** +* Wednesday weekday +*/"Wednesday", /** +* Thursday weekday +*/"Thursday", /** +* Friday weekday +*/"Friday", /** +* Saturday weekday +*/"Saturday", /** +* Sunday weekday +*/"Sunday" + } + + + enum TriggerType { + "Recurrence", "Cron" + } + + + enum MaterializationStoreType { + "None", "Online", "Offline", "OnlineAndOffline" + } + +/** +* The status of a job. +*/ + enum JobStatus { + /** +* Run hasn't started yet. +*/"NotStarted", /** +* Run has started. The user has a run ID. +*/"Starting", /** +* (Not used currently) It will be used if ES is creating the compute target. +*/"Provisioning", /** +* The run environment is being prepared. +*/"Preparing", /** +* The job is queued in the compute target. For example, in BatchAI the job is in queued state, while waiting for all required nodes to be ready. +*/"Queued", /** +* The job started to run in the compute target. +*/"Running", /** +* Job is completed in the target. It is in output collection state now. +*/"Finalizing", /** +* Cancellation has been requested for the job. +*/"CancelRequested", /** +* Job completed successfully. This reflects that both the job itself and output collection states completed successfully +*/"Completed", /** +* Job failed. +*/"Failed", /** +* Following cancellation request, the job is now successfully canceled. +*/"Canceled", /** +* When heartbeat is enabled, if the run isn't updating any information to RunHistory then the run goes to NotResponding state. +NotResponding is the only state that is exempt from strict transition orders. A run can go from NotResponding to any of the previous states. +*/"NotResponding", /** +* The job is paused by users. Some adjustment to labeling jobs can be made only in paused state. +*/"Paused", /** +* Default job status if not mapped to all other statuses +*/"Unknown", /** +* The job is in a scheduled state. Job is not in any active state. +*/"Scheduled" + } + + + enum FeaturestoreJobType { + "RecurrentMaterialization", "BackfillMaterialization" + } + +/** +* Enum to determine identity framework. +*/ + enum IdentityConfigurationType { + "Managed", "AMLToken", "UserIdentity" + } + +/** +* Enum to determine the type of job. +*/ + enum JobType { + "AutoML", "Command", "Labeling", "Sweep", "Pipeline", "Spark" + } + +/** +* The enumerated types for the nodes value +*/ + enum NodesValueType { + "All", "Custom" + } + +/** +* Whether IncrementalDataRefresh is enabled +*/ + enum IncrementalDataRefresh { + "Enabled", "Disabled" + } + +/** +* Whether multiSelect is enabled +*/ + enum MultiSelect { + "Enabled", "Disabled" + } + +/** +* Media type of data asset. +*/ + enum MediaType { + "Image", "Text" + } + + + enum MLAssistConfigurationType { + "Enabled", "Disabled" + } + +/** +* Enum to determine the job provisioning state. +*/ + enum JobProvisioningState { + "Succeeded", "Failed", "Canceled", "InProgress" + } + + + enum StatusMessageLevel { + "Error", "Information", "Warning" + } + +/** +* The format of exported labels. +*/ + enum ExportFormatType { + "Dataset", "Coco", "CSV" + } + +/** +* Enum to determine endpoint compute type. +*/ + enum EndpointComputeType { + "Managed", "Kubernetes", "AzureMLCompute" + } + + + enum OrderString { + "CreatedAtDesc", "CreatedAtAsc", "UpdatedAtDesc", "UpdatedAtAsc" + } + +/** +* Enum to determine whether PublicNetworkAccess is Enabled or Disabled. +*/ + enum PublicNetworkAccessType { + "Enabled", "Disabled" + } + + + enum DataCollectionMode { + "Enabled", "Disabled" + } + + + enum RollingRateType { + "Year", "Month", "Day", "Hour", "Minute" + } + +/** +* Enum to determine whether PublicNetworkAccess is Enabled or Disabled for egress of a deployment. +*/ + enum EgressPublicNetworkAccessType { + "Enabled", "Disabled" + } + + + enum ScaleType { + "Default", "TargetUtilization" + } + +/** +* The type of container to retrieve logs from. +*/ + enum ContainerType { + /** +* The container used to download models and score script. +*/"StorageInitializer", /** +* The container used to serve user's request. +*/"InferenceServer", /** +* The container used to collect payload and custom logging when mdc is enabled. +*/"ModelDataCollector" + } + +/** +* Node scaling setting for the compute sku. +*/ + enum SkuScaleType { + /** +* Automatically scales node count. +*/"Automatic", /** +* Node count scaled upon user request. +*/"Manual", /** +* Fixed set of nodes. +*/"None" + } + + + enum KeyType { + "Primary", "Secondary" + } + + + enum ScheduleListViewType { + "EnabledOnly", "DisabledOnly", "All" + } + + + enum ScheduleActionType { + "CreateJob", "InvokeBatchEndpoint", "ImportData", "CreateMonitor" + } + + + enum ScheduleProvisioningStatus { + "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled" + } + +/** +* Connection status of the service consumer with the service provider +*/ + enum EndpointServiceConnectionStatus { + "Approved", "Pending", "Rejected", "Disconnected", "Timeout" + } + +/** +* Indicates whether or not the encryption is enabled for the workspace. +*/ + enum EncryptionStatus { + "Enabled", "Disabled" + } + +/** +* Isolation mode for the managed network of a machine learning workspace. +*/ + enum IsolationMode { + "Disabled", "AllowInternetOutbound", "AllowOnlyApprovedOutbound" + } + +/** +* Category of a managed network Outbound Rule of a machine learning workspace. +*/ + enum RuleCategory { + "Required", "Recommended", "UserDefined" + } + +/** +* Type of a managed network Outbound Rule of a machine learning workspace. +*/ + enum RuleStatus { + "Inactive", "Active" + } + +/** +* Type of a managed network Outbound Rule of a machine learning workspace. +*/ + enum RuleType { + "FQDN", "PrivateEndpoint", "ServiceTag" + } + +/** +* Status for the managed network of a machine learning workspace. +*/ + enum ManagedNetworkStatus { + "Inactive", "Active" + } + +/** +* The current provisioning state. +*/ + enum PrivateEndpointConnectionProvisioningState { + "Succeeded", "Creating", "Deleting", "Failed" + } + +/** +* Authentication type of the connection target +*/ + enum ConnectionAuthType { + "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS", "ServicePrincipal", "AccessKey", "ApiKey", "CustomKeys" + } + +/** +* Category of the connection +*/ + enum ConnectionCategory { + "PythonFeed", "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2", "Redis", "ApiKey", "AzureOpenAI", "CognitiveSearch", "CognitiveService", "CustomKeys" + } + +/** +* Level of workspace setup error +*/ + enum DiagnoseResultLevel { + "Warning", "Error", "Information" + } + +/** +* Intended usage of the cluster +*/ + enum ClusterPurpose { + "FastProd", "DenseProd", "DevTest" + } + +/** +* Enable or disable ssl for scoring +*/ + enum SslConfigStatus { + "Disabled", "Enabled", "Auto" + } + +/** +* Load Balancer Type +*/ + enum LoadBalancerType { + "PublicIp", "InternalLoadBalancer" + } + +/** +* Compute OS Type +*/ + enum OsType { + "Linux", "Windows" + } + +/** +* Virtual Machine priority +*/ + enum VmPriority { + "Dedicated", "LowPriority" + } + +/** +* State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. +*/ + enum RemoteLoginPortPublicAccess { + "Enabled", "Disabled", "NotSpecified" + } + +/** +* Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. +*/ + enum AllocationState { + "Steady", "Resizing" + } + +/** +* Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role. +*/ + enum ApplicationSharingPolicy { + "Personal", "Shared" + } + +/** +* Indicates whether mlflow autologger is enabled for notebooks. +*/ + enum MlflowAutologger { + "Enabled", "Disabled" + } + +/** +* State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable. +*/ + enum SshPublicAccess { + "Enabled", "Disabled" + } + +/** +* Current state of an ComputeInstance. +*/ + enum ComputeInstanceState { + "Creating", "CreateFailed", "Deleting", "Running", "Restarting", "JobRunning", "SettingUp", "SetupFailed", "Starting", "Stopped", "Stopping", "UserSettingUp", "UserSetupFailed", "Unknown", "Unusable" + } + +/** +* The Compute Instance Authorization type. Available values are personal (default). +*/ + enum ComputeInstanceAuthorizationType { + "personal" + } + +/** +* Name of the last operation. +*/ + enum OperationName { + "Create", "Start", "Stop", "Restart", "Reimage", "Delete" + } + +/** +* Operation status. +*/ + enum OperationStatus { + "InProgress", "Succeeded", "CreateFailed", "StartFailed", "StopFailed", "RestartFailed", "ReimageFailed", "DeleteFailed" + } + +/** +* Trigger of operation. +*/ + enum OperationTrigger { + "User", "Schedule", "IdleShutdown" + } + +/** +* The current deployment state of schedule. +*/ + enum ProvisioningStatus { + "Completed", "Provisioning", "Failed" + } + +/** +* Is the schedule enabled or disabled? +*/ + enum ScheduleStatus { + "Enabled", "Disabled" + } + +/** +* [Required] The compute power action. +*/ + enum ComputePowerAction { + "Start", "Stop" + } + +/** +* The current deployment state of schedule. +*/ + enum ScheduleProvisioningState { + "Completed", "Provisioning", "Failed" + } + +/** +* Auto save settings. +*/ + enum Autosave { + "None", "Local", "Remote" + } + +/** +* network of this container. +*/ + enum Network { + "Bridge", "Host" + } + +/** +* Caching type of Data Disk. +*/ + enum Caching { + "None", "ReadOnly", "ReadWrite" + } + +/** +* type of this storage account. +*/ + enum StorageAccountType { + "Standard_LRS", "Premium_LRS" + } + +/** +* Data source type. +*/ + enum SourceType { + "Dataset", "Datastore", "URI" + } + +/** +* Mount Action. +*/ + enum MountAction { + "Mount", "Unmount" + } + +/** +* Mount state. +*/ + enum MountState { + "MountRequested", "Mounted", "MountFailed", "UnmountRequested", "UnmountFailed", "Unmounted" + } + + + enum MonitoringFeatureFilterType { + /** +* Includes all features. +*/"AllFeatures", /** +* Only includes the top contributing features, measured by feature attribution. +*/"TopNByAttribution", /** +* Includes a user-defined subset of features. +*/"FeatureSubset" + } + +/** +* Monitor compute identity type enum. +*/ + enum MonitorComputeIdentityType { + /** +* Authenticates through user's AML token. +*/"AmlToken", /** +* Authenticates through a user-provided managed identity. +*/"ManagedIdentity" + } + +/** +* Enum to determine the input data delivery mode. +*/ + enum InputDeliveryMode { + "ReadOnlyMount", "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload" + } + +/** +* Output data delivery mode enums. +*/ + enum OutputDeliveryMode { + "ReadWriteMount", "Upload", "Direct" + } + +/** +* Enum to determine forecast horizon selection mode. +*/ + enum ForecastHorizonMode { + /** +* Forecast horizon to be determined automatically. +*/"Auto", /** +* Use the custom forecast horizon. +*/"Custom" + } + +/** +* Enum to determine the Job Output Type. +*/ + enum JobOutputType { + "uri_file", "uri_folder", "mltable", "custom_model", "mlflow_model", "triton_model" + } + +/** +* Enum to determine the job tier. +*/ + enum JobTier { + "Null", "Spot", "Basic", "Standard", "Premium" + } + +/** +* Enum for setting log verbosity. +*/ + enum LogVerbosity { + /** +* No logs emitted. +*/"NotSet", /** +* Debug and above log statements logged. +*/"Debug", /** +* Info and above log statements logged. +*/"Info", /** +* Warning and above log statements logged. +*/"Warning", /** +* Error and above log statements logged. +*/"Error", /** +* Only critical statements logged. +*/"Critical" + } + +/** +* AutoMLJob Task type. +*/ + enum TaskType { + /** +* Classification in machine learning and statistics is a supervised learning approach in which +the computer program learns from the data given to it and make new observations or classifications. +*/"Classification", /** +* Regression means to predict the value using the input data. Regression models are used to predict a continuous value. +*/"Regression", /** +* Forecasting is a special kind of regression task that deals with time-series data and creates forecasting model +that can be used to predict the near future values based on the inputs. +*/"Forecasting", /** +* Image Classification. Multi-class image classification is used when an image is classified with only a single label +from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. +*/"ImageClassification", /** +* Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels +from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. +*/"ImageClassificationMultilabel", /** +* Image Object Detection. Object detection is used to identify objects in an image and locate each object with a +bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. +*/"ImageObjectDetection", /** +* Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, +drawing a polygon around each object in the image. +*/"ImageInstanceSegmentation", /** +* Text classification (also known as text tagging or text categorization) is the process of sorting texts into categories. +Categories are mutually exclusive. +*/"TextClassification", /** +* Multilabel classification task assigns each sample to a group (zero or more) of target labels. +*/"TextClassificationMultilabel", /** +* Text Named Entity Recognition a.k.a. TextNER. +Named Entity Recognition (NER) is the ability to take free-form text and identify the occurrences of entities such as people, locations, organizations, and more. +*/"TextNER" + } + +/** +* Enum to determine the Job Input Type. +*/ + enum JobInputType { + "literal", "uri_file", "uri_folder", "mltable", "custom_model", "mlflow_model", "triton_model" + } + +/** +* Determines how N-Cross validations value is determined. +*/ + enum NCrossValidationsMode { + /** +* Determine N-Cross validations value automatically. Supported only for 'Forecasting' AutoML task. +*/"Auto", /** +* Use custom N-Cross validations value. +*/"Custom" + } + +/** +* Forecasting seasonality mode. +*/ + enum SeasonalityMode { + /** +* Seasonality to be determined automatically. +*/"Auto", /** +* Use the custom seasonality value. +*/"Custom" + } + +/** +* Target lags selection modes. +*/ + enum TargetLagsMode { + /** +* Target lags to be determined automatically. +*/"Auto", /** +* Use the custom target lags. +*/"Custom" + } + +/** +* Target rolling windows size mode. +*/ + enum TargetRollingWindowSizeMode { + /** +* Determine rolling windows size automatically. +*/"Auto", /** +* Use the specified rolling window size. +*/"Custom" + } + +/** +* Enum to determine the state of mlflow autologger. +*/ + enum MLFlowAutologgerState { + "Enabled", "Disabled" + } + + + enum MonitoringAlertNotificationType { + /** +* Settings for Azure Monitor based alerting. +*/"AzureMonitor", /** +* Settings for AML email notifications. +*/"Email" + } + + + enum ServiceDataAccessAuthIdentity { + /** +* Do not use any identity for service data access. +*/"None", /** +* Use the system assigned managed identity of the Workspace to authenticate service data access. +*/"WorkspaceSystemAssignedIdentity", /** +* Use the user assigned managed identity of the Workspace to authenticate service data access. +*/"WorkspaceUserAssignedIdentity" + } + + + enum EarlyTerminationPolicyType { + "Bandit", "MedianStopping", "TruncationSelection" + } + + + enum SamplingAlgorithmType { + "Grid", "Random", "Bayesian" + } + + + enum CategoricalDataDriftMetric { + /** +* The Jensen Shannon Distance (JSD) metric. +*/"JensenShannonDistance", /** +* The Population Stability Index (PSI) metric. +*/"PopulationStabilityIndex", /** +* The Pearsons Chi Squared Test metric. +*/"PearsonsChiSquaredTest" + } + + + enum MonitoringFeatureDataType { + /** +* Used for features of numerical data type. +*/"Numerical", /** +* Used for features of categorical data type. +*/"Categorical" + } + + + enum CategoricalDataQualityMetric { + /** +* Calculates the rate of null values. +*/"NullValueRate", /** +* Calculates the rate of data type errors. +*/"DataTypeErrorRate", /** +* Calculates the rate values are out of bounds. +*/"OutOfBoundsRate" + } + + + enum CategoricalPredictionDriftMetric { + /** +* The Jensen Shannon Distance (JSD) metric. +*/"JensenShannonDistance", /** +* The Population Stability Index (PSI) metric. +*/"PopulationStabilityIndex", /** +* The Pearsons Chi Squared Test metric. +*/"PearsonsChiSquaredTest" + } + +/** +* Primary metrics for classification tasks. +*/ + enum ClassificationPrimaryMetrics { + /** +* AUC is the Area under the curve. +This metric represents arithmetic mean of the score for each class, +weighted by the number of true instances in each class. +*/"AUCWeighted", /** +* Accuracy is the ratio of predictions that exactly match the true class labels. +*/"Accuracy", /** +* Normalized macro recall is recall macro-averaged and normalized, so that random +performance has a score of 0, and perfect performance has a score of 1. +*/"NormMacroRecall", /** +* The arithmetic mean of the average precision score for each class, weighted by +the number of true instances in each class. +*/"AveragePrecisionScoreWeighted", /** +* The arithmetic mean of precision for each class, weighted by number of true instances in each class. +*/"PrecisionScoreWeighted" + } + +/** +* Enum for all classification models supported by AutoML. +*/ + enum ClassificationModels { + /** +* Logistic regression is a fundamental classification technique. +It belongs to the group of linear classifiers and is somewhat similar to polynomial and linear regression. +Logistic regression is fast and relatively uncomplicated, and it's convenient for you to interpret the results. +Although it's essentially a method for binary classification, it can also be applied to multiclass problems. +*/"LogisticRegression", /** +* SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications +to find the model parameters that correspond to the best fit between predicted and actual outputs. +*/"SGD", /** +* The multinomial Naive Bayes classifier is suitable for classification with discrete features (e.g., word counts for text classification). +The multinomial distribution normally requires integer feature counts. However, in practice, fractional counts such as tf-idf may also work. +*/"MultinomialNaiveBayes", /** +* Naive Bayes classifier for multivariate Bernoulli models. +*/"BernoulliNaiveBayes", /** +* A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. +After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. +*/"SVM", /** +* A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. +After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. +Linear SVM performs best when input data is linear, i.e., data can be easily classified by drawing the straight line between classified values on a plotted graph. +*/"LinearSVM", /** +* K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints +which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. +*/"KNN", /** +* Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. +The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. +*/"DecisionTree", /** +* Random forest is a supervised learning algorithm. +The "forest" it builds, is an ensemble of decision trees, usually trained with the bagging method. +The general idea of the bagging method is that a combination of learning models increases the overall result. +*/"RandomForest", /** +* Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm. +*/"ExtremeRandomTrees", /** +* LightGBM is a gradient boosting framework that uses tree based learning algorithms. +*/"LightGBM", /** +* The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution. +*/"GradientBoosting", /** +* XGBoost: Extreme Gradient Boosting Algorithm. This algorithm is used for structured data where target column values can be divided into distinct class values. +*/"XGBoostClassifier" + } + +/** +* The meta-learner is a model trained on the output of the individual heterogeneous models. +Default meta-learners are LogisticRegression for classification tasks (or LogisticRegressionCV if cross-validation is enabled) and ElasticNet for regression/forecasting tasks (or ElasticNetCV if cross-validation is enabled). +This parameter can be one of the following strings: LogisticRegression, LogisticRegressionCV, LightGBMClassifier, ElasticNet, ElasticNetCV, LightGBMRegressor, or LinearRegression +*/ + enum StackMetaLearnerType { + "None", /** +* Default meta-learners are LogisticRegression for classification tasks. +*/"LogisticRegression", /** +* Default meta-learners are LogisticRegression for classification task when CV is on. +*/"LogisticRegressionCV", "LightGBMClassifier", /** +* Default meta-learners are LogisticRegression for regression task. +*/"ElasticNet", /** +* Default meta-learners are LogisticRegression for regression task when CV is on. +*/"ElasticNetCV", "LightGBMRegressor", "LinearRegression" + } + +/** +* Training mode dictates whether to use distributed training or not +*/ + enum TrainingMode { + /** +* Auto mode +*/"Auto", /** +* Distributed training mode +*/"Distributed", /** +* Non distributed training mode +*/"NonDistributed" + } + +/** +* Enum for all classification models supported by AutoML. +*/ + enum BlockedTransformers { + /** +* Target encoding for text data. +*/"TextTargetEncoder", /** +* Ohe hot encoding creates a binary feature transformation. +*/"OneHotEncoder", /** +* Target encoding for categorical data. +*/"CatTargetEncoder", /** +* Tf-Idf stands for, term-frequency times inverse document-frequency. This is a common term weighting scheme for identifying information from documents. +*/"TfIdf", /** +* Weight of Evidence encoding is a technique used to encode categorical variables. It uses the natural log of the P(1)/P(0) to create weights. +*/"WoETargetEncoder", /** +* Label encoder converts labels/categorical variables in a numerical form. +*/"LabelEncoder", /** +* Word embedding helps represents words or phrases as a vector, or a series of numbers. +*/"WordEmbedding", /** +* Naive Bayes is a classified that is used for classification of discrete features that are categorically distributed. +*/"NaiveBayes", /** +* Count Vectorizer converts a collection of text documents to a matrix of token counts. +*/"CountVectorizer", /** +* Hashing One Hot Encoder can turn categorical variables into a limited number of new features. This is often used for high-cardinality categorical features. +*/"HashOneHotEncoder" + } + +/** +* Featurization mode - determines data featurization mode. +*/ + enum FeaturizationMode { + /** +* Auto mode, system performs featurization without any custom featurization inputs. +*/"Auto", /** +* Custom featurization. +*/"Custom", /** +* Featurization off. 'Forecasting' task cannot use this value. +*/"Off" + } + + + enum ClassificationModelPerformanceMetric { + /** +* Calculates the accuracy of the model predictions. +*/"Accuracy", /** +* Calculates the precision of the model predictions. +*/"Precision", /** +* Calculates the recall of the model predictions. +*/"Recall" + } + + + enum MonitoringModelType { + /** +* A model trained for classification tasks. +*/"Classification", /** +* A model trained for regressions tasks. +*/"Regression" + } + +/** +* Enum to determine the job distribution type. +*/ + enum DistributionType { + "PyTorch", "TensorFlow", "Mpi", "Ray" + } + + + enum JobLimitsType { + "Command", "Sweep" + } + +/** +* Monitor compute type enum. +*/ + enum MonitorComputeType { + /** +* Serverless Spark compute. +*/"ServerlessSpark" + } + +/** +* Model task type enum. +*/ + enum ModelTaskType { + "Classification", "Regression", "QuestionAnswering" + } + + + enum MonitoringNotificationMode { + /** +* Disabled notifications will not produce emails/metrics leveraged for alerting. +*/"Disabled", /** +* Enabled notification will produce emails/metrics leveraged for alerting. +*/"Enabled" + } + + + enum MonitoringSignalType { + /** +* Tracks model input data distribution change, comparing against training data or past production data. +*/"DataDrift", /** +* Tracks prediction result data distribution change, comparing against validation/test label data or past production data. +*/"PredictionDrift", /** +* Tracks model input data integrity. +*/"DataQuality", /** +* Tracks feature importance change in production, comparing against feature importance at training time. +*/"FeatureAttributionDrift", /** +* Tracks a custom signal provided by users. +*/"Custom", /** +* Tracks model performance based on ground truth data. +*/"ModelPerformance", /** +* Tracks the safety and quality of generated content. +*/"GenerationSafetyQuality", /** +* Tracks the token usage of generative endpoints. +*/"GenerationTokenStatistics" + } + +/** +* Monitoring input data type enum. +*/ + enum MonitoringInputDataType { + /** +* An input data with a fixed window size. +*/"Static", /** +* An input data which trailing relatively to the monitor's current run. +*/"Trailing", /** +* An input data with tabular format which doesn't require preprocessing. +*/"Fixed" + } + +/** +* Enum to determine the type of data. +*/ + enum DataImportSourceType { + "database", "file_system" + } + + + enum FeatureAttributionMetric { + /** +* The Normalized Discounted Cumulative Gain metric. +*/"NormalizedDiscountedCumulativeGain" + } + +/** +* Flag for generating lags for the numeric features. +*/ + enum FeatureLags { + /** +* No feature lags generated. +*/"None", /** +* System auto-generates feature lags. +*/"Auto" + } + +/** +* The parameter defining how if AutoML should handle short time series. +*/ + enum ShortSeriesHandlingConfiguration { + /** +* Represents no/null value. +*/"None", /** +* Short series will be padded if there are no long series, otherwise short series will be dropped. +*/"Auto", /** +* All the short series will be padded. +*/"Pad", /** +* All the short series will be dropped. +*/"Drop" + } + +/** +* Target aggregate function. +*/ + enum TargetAggregationFunction { + /** +* Represent no value set. +*/"None", "Sum", "Max", "Min", "Mean" + } + +/** +* Configure STL Decomposition of the time-series target column. +*/ + enum UseStl { + /** +* No stl decomposition. +*/"None", "Season", "SeasonTrend" + } + +/** +* Primary metrics for Forecasting task. +*/ + enum ForecastingPrimaryMetrics { + /** +* The Spearman's rank coefficient of correlation is a non-parametric measure of rank correlation. +*/"SpearmanCorrelation", /** +* The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales. +*/"NormalizedRootMeanSquaredError", /** +* The R2 score is one of the performance evaluation measures for forecasting-based machine learning models. +*/"R2Score", /** +* The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales. +*/"NormalizedMeanAbsoluteError" + } + +/** +* Enum for all forecasting models supported by AutoML. +*/ + enum ForecastingModels { + /** +* Auto-Autoregressive Integrated Moving Average (ARIMA) model uses time-series data and statistical analysis to interpret the data and make future predictions. +This model aims to explain data by using time series data on its past values and uses linear regression to make predictions. +*/"AutoArima", /** +* Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. +It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet is robust to missing data and shifts in the trend, and typically handles outliers well. +*/"Prophet", /** +* The Naive forecasting model makes predictions by carrying forward the latest target value for each time-series in the training data. +*/"Naive", /** +* The Seasonal Naive forecasting model makes predictions by carrying forward the latest season of target values for each time-series in the training data. +*/"SeasonalNaive", /** +* The Average forecasting model makes predictions by carrying forward the average of the target values for each time-series in the training data. +*/"Average", /** +* The Seasonal Average forecasting model makes predictions by carrying forward the average value of the latest season of data for each time-series in the training data. +*/"SeasonalAverage", /** +* Exponential smoothing is a time series forecasting method for univariate data that can be extended to support data with a systematic trend or seasonal component. +*/"ExponentialSmoothing", /** +* An Autoregressive Integrated Moving Average with Explanatory Variable (ARIMAX) model can be viewed as a multiple regression model with one or more autoregressive (AR) terms and/or one or more moving average (MA) terms. +This method is suitable for forecasting when data is stationary/non stationary, and multivariate with any type of data pattern, i.e., level/trend /seasonality/cyclicity. +*/"Arimax", /** +* TCNForecaster: Temporal Convolutional Networks Forecaster. //TODO: Ask forecasting team for brief intro. +*/"TCNForecaster", /** +* Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions. +*/"ElasticNet", /** +* The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution. +*/"GradientBoosting", /** +* Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. +The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. +*/"DecisionTree", /** +* K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints +which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. +*/"KNN", /** +* Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer. +*/"LassoLars", /** +* SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications +to find the model parameters that correspond to the best fit between predicted and actual outputs. +It's an inexact but powerful technique. +*/"SGD", /** +* Random forest is a supervised learning algorithm. +The "forest" it builds, is an ensemble of decision trees, usually trained with the bagging method. +The general idea of the bagging method is that a combination of learning models increases the overall result. +*/"RandomForest", /** +* Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm. +*/"ExtremeRandomTrees", /** +* LightGBM is a gradient boosting framework that uses tree based learning algorithms. +*/"LightGBM", /** +* XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners. +*/"XGBoostRegressor" + } + +/** +* Generation safety quality metric enum. +*/ + enum GenerationSafetyQualityMetric { + "AcceptableGroundednessScorePerInstance", "AggregatedGroundednessPassRate", "AcceptableCoherenceScorePerInstance", "AggregatedCoherencePassRate", "AcceptableFluencyScorePerInstance", "AggregatedFluencyPassRate", "AcceptableSimilarityScorePerInstance", "AggregatedSimilarityPassRate", "AcceptableRelevanceScorePerInstance", "AggregatedRelevancePassRate" + } + +/** +* Generation token statistics metric enum. +*/ + enum GenerationTokenStatisticsMetric { + "TotalTokenCount", "TotalTokenCountPerGroup" + } + +/** +* Learning rate scheduler enum. +*/ + enum LearningRateScheduler { + /** +* No learning rate scheduler selected. +*/"None", /** +* Cosine Annealing With Warmup. +*/"WarmupCosine", /** +* Step learning rate scheduler. +*/"Step" + } + +/** +* Stochastic optimizer for image models. +*/ + enum StochasticOptimizer { + /** +* No optimizer selected. +*/"None", /** +* Stochastic Gradient Descent optimizer. +*/"Sgd", /** +* Adam is algorithm the optimizes stochastic objective functions based on adaptive estimates of moments +*/"Adam", /** +* AdamW is a variant of the optimizer Adam that has an improved implementation of weight decay. +*/"Adamw" + } + +/** +* Primary metrics for classification multilabel tasks. +*/ + enum ClassificationMultilabelPrimaryMetrics { + /** +* AUC is the Area under the curve. +This metric represents arithmetic mean of the score for each class, +weighted by the number of true instances in each class. +*/"AUCWeighted", /** +* Accuracy is the ratio of predictions that exactly match the true class labels. +*/"Accuracy", /** +* Normalized macro recall is recall macro-averaged and normalized, so that random +performance has a score of 0, and perfect performance has a score of 1. +*/"NormMacroRecall", /** +* The arithmetic mean of the average precision score for each class, weighted by +the number of true instances in each class. +*/"AveragePrecisionScoreWeighted", /** +* The arithmetic mean of precision for each class, weighted by number of true instances in each class. +*/"PrecisionScoreWeighted", /** +* Intersection Over Union. Intersection of predictions divided by union of predictions. +*/"IOU" + } + +/** +* Primary metrics for InstanceSegmentation tasks. +*/ + enum InstanceSegmentationPrimaryMetrics { + /** +* Mean Average Precision (MAP) is the average of AP (Average Precision). +AP is calculated for each class and averaged to get the MAP. +*/"MeanAveragePrecision" + } + + + enum LogTrainingMetrics { + /** +* Enable compute and log training metrics. +*/"Enable", /** +* Disable compute and log training metrics. +*/"Disable" + } + + + enum LogValidationLoss { + /** +* Enable compute and log validation metrics. +*/"Enable", /** +* Disable compute and log validation metrics. +*/"Disable" + } + +/** +* Image model size. +*/ + enum ModelSize { + /** +* No value selected. +*/"None", /** +* Small size. +*/"Small", /** +* Medium size. +*/"Medium", /** +* Large size. +*/"Large", /** +* Extra large size. +*/"ExtraLarge" + } + +/** +* Metric computation method to use for validation metrics in image tasks. +*/ + enum ValidationMetricType { + /** +* No metric. +*/"None", /** +* Coco metric. +*/"Coco", /** +* Voc metric. +*/"Voc", /** +* CocoVoc metric. +*/"CocoVoc" + } + +/** +* Primary metrics for Image ObjectDetection task. +*/ + enum ObjectDetectionPrimaryMetrics { + /** +* Mean Average Precision (MAP) is the average of AP (Average Precision). +AP is calculated for each class and averaged to get the MAP. +*/"MeanAveragePrecision" + } + +/** +* Annotation type of image data. +*/ + enum ImageAnnotationType { + "Classification", "BoundingBox", "InstanceSegmentation" + } + +/** +* Annotation type of text data. +*/ + enum TextAnnotationType { + "Classification", "NamedEntityRecognition" + } + +/** +* Enum to determine OneLake artifact type. +*/ + enum OneLakeArtifactType { + "LakeHouse" + } + +/** +* Enum of learning rate schedulers that aligns with those supported by HF +*/ + enum NlpLearningRateScheduler { + /** +* No learning rate schedule. +*/"None", /** +* Linear warmup and decay. +*/"Linear", /** +* Linear warmup then cosine decay. +*/"Cosine", /** +* Linear warmup, cosine decay, then restart to initial LR. +*/"CosineWithRestarts", /** +* Increase linearly then polynomially decay. +*/"Polynomial", /** +* Constant learning rate. +*/"Constant", /** +* Linear warmup followed by constant value. +*/"ConstantWithWarmup" + } + + + enum NumericalDataDriftMetric { + /** +* The Jensen Shannon Distance (JSD) metric. +*/"JensenShannonDistance", /** +* The Population Stability Index (PSI) metric. +*/"PopulationStabilityIndex", /** +* The Normalized Wasserstein Distance metric. +*/"NormalizedWassersteinDistance", /** +* The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric. +*/"TwoSampleKolmogorovSmirnovTest" + } + + + enum NumericalDataQualityMetric { + /** +* Calculates the rate of null values. +*/"NullValueRate", /** +* Calculates the rate of data type errors. +*/"DataTypeErrorRate", /** +* Calculates the rate values are out of bounds. +*/"OutOfBoundsRate" + } + + + enum NumericalPredictionDriftMetric { + /** +* The Jensen Shannon Distance (JSD) metric. +*/"JensenShannonDistance", /** +* The Population Stability Index (PSI) metric. +*/"PopulationStabilityIndex", /** +* The Normalized Wasserstein Distance metric. +*/"NormalizedWassersteinDistance", /** +* The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric. +*/"TwoSampleKolmogorovSmirnovTest" + } + +/** +* Defines supported metric goals for hyperparameter tuning +*/ + enum Goal { + "Minimize", "Maximize" + } + +/** +* The specific type of random algorithm +*/ + enum RandomSamplingAlgorithmRule { + "Random", "Sobol" + } + +/** +* Primary metrics for Regression task. +*/ + enum RegressionPrimaryMetrics { + /** +* The Spearman's rank coefficient of correlation is a nonparametric measure of rank correlation. +*/"SpearmanCorrelation", /** +* The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales. +*/"NormalizedRootMeanSquaredError", /** +* The R2 score is one of the performance evaluation measures for forecasting-based machine learning models. +*/"R2Score", /** +* The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales. +*/"NormalizedMeanAbsoluteError" + } + +/** +* Enum for all Regression models supported by AutoML. +*/ + enum RegressionModels { + /** +* Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions. +*/"ElasticNet", /** +* The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution. +*/"GradientBoosting", /** +* Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. +The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. +*/"DecisionTree", /** +* K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints +which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. +*/"KNN", /** +* Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer. +*/"LassoLars", /** +* SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications +to find the model parameters that correspond to the best fit between predicted and actual outputs. +It's an inexact but powerful technique. +*/"SGD", /** +* Random forest is a supervised learning algorithm. +The "forest" it builds, is an ensemble of decision trees, usually trained with the bagging method. +The general idea of the bagging method is that a combination of learning models increases the overall result. +*/"RandomForest", /** +* Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm. +*/"ExtremeRandomTrees", /** +* LightGBM is a gradient boosting framework that uses tree based learning algorithms. +*/"LightGBM", /** +* XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners. +*/"XGBoostRegressor" + } -@doc("The unit of time measurement for the specified VM price. Example: OneHour") -enum UnitOfMeasure { - OneHour, -} -@doc("Operating system type used by the VM.") -enum VMPriceOSType { - Linux, - Windows, -} + enum RegressionModelPerformanceMetric { + /** +* The Mean Absolute Error (MAE) metric. +*/"MeanAbsoluteError", /** +* The Root Mean Squared Error (RMSE) metric. +*/"RootMeanSquaredError", /** +* The Mean Squared Error (MSE) metric. +*/"MeanSquaredError" + } -@doc("The type of the VM.") -enum VMTier { - Standard, - LowPriority, - Spot, -} -@doc("An enum describing the unit of quota measurement.") -enum QuotaUnit { - Count, -} + enum SparkJobEntryType { + "SparkJobPythonEntry", "SparkJobScalaEntry" + } -@doc("Status of update workspace quota.") -enum Status { - Undefined, - Success, - Failure, - InvalidQuotaBelowClusterMinimum, - InvalidQuotaExceedsSubscriptionLimit, - InvalidVMFamilyName, - OperationNotSupportedForSku, - OperationNotEnabledForRegion, -} +/** +* The action enum for networking rule. +*/ + enum RuleAction { + "Allow", "Deny" + } -@doc("Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).") -enum ManagedServiceIdentityType { - None, - SystemAssigned, - UserAssigned, - `SystemAssigned,UserAssigned`, -} -@doc("The type of identity that created the resource.") -enum CreatedByType { - User, - Application, - ManagedIdentity, - Key, -} -@doc("The type of compute") -enum ComputeType { - AKS, - Kubernetes, - AmlCompute, - ComputeInstance, - DataFactory, - VirtualMachine, - HDInsight, - Databricks, - DataLakeAnalytics, - SynapseSpark, -} -@doc("The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed.") -enum ProvisioningState { - Unknown, - Updating, - Creating, - Deleting, - Succeeded, - Failed, - Canceled, +/** +* The List Usages operation response. +*/ +model ListUsagesResult is Azure.Core.Page { } -enum UnderlyingResourceAction { - Delete, - Detach, +/** +* Describes AML Resource Usage. +*/ +model Usage { +/** +* Specifies the resource ID. +*/ +@visibility("read") +"id"?: string; +/** +* Region of the AML workspace in the id. +*/ +@visibility("read") +"amlWorkspaceLocation"?: string; +/** +* Specifies the resource type. +*/ +@visibility("read") +"type"?: string; +/** +* An enum describing the unit of usage measurement. +*/ +@visibility("read") +"unit"?: UsageUnit; +/** +* The current usage of the resource. +*/ +@visibility("read") +"currentValue"?: int64; +/** +* The maximum permitted usage of the resource. +*/ +@visibility("read") +"limit"?: int64; +/** +* The name of the type of usage. +*/ +@visibility("read") +"name"?: UsageName; +} + +/** +* The Usage Names. +*/ +model UsageName { +/** +* The name of the resource. +*/ +@visibility("read") +"value"?: string; +/** +* The localized name of the resource. +*/ +@visibility("read") +"localizedValue"?: string; +} + +/** +* The List Virtual Machine size operation response. +*/ +model VirtualMachineSizeListResult { +/** +* The list of virtual machine sizes supported by AmlCompute. +*/ +"value"?: VirtualMachineSize[]; } -@doc("Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images") -enum ImageType { - docker, - azureml, +/** +* Describes the properties of a VM size. +*/ +model VirtualMachineSize { +/** +* The name of the virtual machine size. +*/ +@visibility("read") +"name"?: string; +/** +* The family name of the virtual machine size. +*/ +@visibility("read") +"family"?: string; +/** +* The number of vCPUs supported by the virtual machine size. +*/ +@visibility("read") +"vCPUs"?: int32; +/** +* The number of gPUs supported by the virtual machine size. +*/ +@visibility("read") +"gpus"?: int32; +/** +* The OS VHD disk size, in MB, allowed by the virtual machine size. +*/ +@visibility("read") +"osVhdSizeMB"?: int32; +/** +* The resource volume size, in MB, allowed by the virtual machine size. +*/ +@visibility("read") +"maxResourceVolumeMB"?: int32; +/** +* The amount of memory, in GB, supported by the virtual machine size. +*/ +@visibility("read") +"memoryGB"?: float64; +/** +* Specifies if the virtual machine size supports low priority VMs. +*/ +@visibility("read") +"lowPriorityCapable"?: boolean; +/** +* Specifies if the virtual machine size supports premium IO. +*/ +@visibility("read") +"premiumIO"?: boolean; +/** +* The estimated price information for using a VM. +*/ +"estimatedVMPrices"?: EstimatedVMPrices; +/** +* Specifies the compute types supported by the virtual machine size. +*/ +"supportedComputeTypes"?: string[]; +} + +/** +* The estimated price info for using a VM. +*/ +model EstimatedVMPrices { +/** +* Three lettered code specifying the currency of the VM price. Example: USD +*/ +"billingCurrency": BillingCurrency; +/** +* The unit of time measurement for the specified VM price. Example: OneHour +*/ +"unitOfMeasure": UnitOfMeasure; +/** +* The list of estimated prices for using a VM of a particular OS type, tier, etc. +*/ +"values": EstimatedVMPrice[]; +} + +/** +* The estimated price info for using a VM of a particular OS type, tier, etc. +*/ +model EstimatedVMPrice { +/** +* The price charged for using the VM. +*/ +"retailPrice": float64; +/** +* Operating system type used by the VM. +*/ +"osType": VMPriceOSType; +/** +* The type of the VM. +*/ +"vmTier": VMTier; +} + +/** +* Quota update parameters. +*/ +model QuotaUpdateParameters { +/** +* The list for update quota. +*/ +"value"?: QuotaBaseProperties[]; +/** +* Region of workspace quota to be updated. +*/ +"location"?: string; +} + +/** +* The properties for Quota update or retrieval. +*/ +model QuotaBaseProperties { +/** +* Specifies the resource ID. +*/ +"id"?: string; +/** +* Specifies the resource type. +*/ +"type"?: string; +/** +* The maximum permitted quota of the resource. +*/ +"limit"?: int64; +/** +* An enum describing the unit of quota measurement. +*/ +"unit"?: QuotaUnit; +} + +/** +* The result of update workspace quota. +*/ +model UpdateWorkspaceQuotasResult { +/** +* The list of workspace quota update result. +*/ +@visibility("read") +"value"?: UpdateWorkspaceQuotas[]; +/** +* The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page of Workspace Quota update result. +*/ +@visibility("read") +"nextLink"?: string; +} + +/** +* The properties for update Quota response. +*/ +model UpdateWorkspaceQuotas { +/** +* Specifies the resource ID. +*/ +@visibility("read") +"id"?: string; +/** +* Specifies the resource type. +*/ +@visibility("read") +"type"?: string; +/** +* The maximum permitted quota of the resource. +*/ +"limit"?: int64; +/** +* An enum describing the unit of quota measurement. +*/ +@visibility("read") +"unit"?: QuotaUnit; +/** +* Status of update workspace quota. +*/ +"status"?: Status; +} + +/** +* The List WorkspaceQuotasByVMFamily operation response. +*/ +model ListWorkspaceQuotas is Azure.Core.Page { +} + +/** +* The quota assigned to a resource. +*/ +model ResourceQuota { +/** +* Specifies the resource ID. +*/ +@visibility("read") +"id"?: string; +/** +* Region of the AML workspace in the id. +*/ +@visibility("read") +"amlWorkspaceLocation"?: string; +/** +* Specifies the resource type. +*/ +@visibility("read") +"type"?: string; +/** +* Name of the resource. +*/ +@visibility("read") +"name"?: ResourceName; +/** +* The maximum permitted quota of the resource. +*/ +@visibility("read") +"limit"?: int64; +/** +* An enum describing the unit of quota measurement. +*/ +@visibility("read") +"unit"?: QuotaUnit; +} + +/** +* The Resource Name. +*/ +model ResourceName { +/** +* The name of the resource. +*/ +@visibility("read") +"value"?: string; +/** +* The localized name of the resource. +*/ +@visibility("read") +"localizedValue"?: string; +} + +/** +* The resource model definition representing SKU +*/ +model Sku { +/** +* The name of the SKU. Ex - P3. It is typically a letter+number code +*/ +"name": string; +/** +* This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. +*/ +"tier"?: SkuTier; +/** +* The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. +*/ +"size"?: string; +/** +* If the service has different generations of hardware, for the same SKU, then that can be captured here. +*/ +"family"?: string; +/** +* If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. +*/ +"capacity"?: int32; +} + +/** +* Common fields that are returned in the response for all Azure Resource Manager resources +*/ +model Resource { +/** +* Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} +*/ +@visibility("read") +"id"?: string; +/** +* The name of the resource +*/ +@visibility("read") +"name"?: string; +/** +* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" +*/ +@visibility("read") +"type"?: string; +/** +* Azure Resource Manager metadata containing createdBy and modifiedBy information. +*/ +@visibility("read") +"systemData"?: SystemData; } -@doc("Type of the Environment Variable. Possible values are: local - For local variable") -enum EnvironmentVariableType { - local, -} -@doc("Protocol over which communication will happen over this endpoint") -enum Protocol { - tcp, - udp, - http, +model ComputeResourceSchema { +/** +* Compute properties +*/ +"properties"?: Compute; } -@doc("Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe") -enum VolumeDefinitionType { - bind, - volume, - tmpfs, - npipe, +/** +* Machine Learning compute object. +*/ +@discriminator("computeType") +model Compute { +/** +* Location for the underlying compute +*/ +@visibility("read", "create") +"computeLocation"?: string; +/** +* The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. +*/ +@visibility("read") +"provisioningState"?: ProvisioningState; +/** +* The description of the Machine Learning compute. +*/ +"description"?: string; +/** +* The time at which the compute was created. +*/ +@visibility("read") +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"createdOn"?: utcDateTime; +/** +* The time at which the compute was last modified. +*/ +@visibility("read") +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"modifiedOn"?: utcDateTime; +/** +* ARM resource id of the underlying compute +*/ +"resourceId"?: string; +/** +* Errors during provisioning +*/ +@visibility("read") +"provisioningErrors"?: ErrorResponse[]; +/** +* Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. +*/ +@visibility("read") +"isAttachedCompute"?: boolean; +/** +* Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. +*/ +@visibility("read", "create") +"disableLocalAuth"?: boolean; +} + +/** +* AmlCompute update parameters. +*/ +model ClusterUpdateParameters { +/** +* The properties of the amlCompute. +*/ +"properties"?: ClusterUpdateProperties; } -@doc("State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted.") -enum NodeState { - idle, - running, - preparing, - unusable, - leaving, - preempted, +/** +* The properties of a amlCompute that need to be updated. +*/ +model ClusterUpdateProperties { +/** +* Properties of ClusterUpdate +*/ +"properties"?: ScaleSettingsInformation; } -@doc("Provisioning state of registry asset.") -enum AssetProvisioningState { - Succeeded, - Failed, - Canceled, - Creating, - Updating, - Deleting, +/** +* Desired scale settings for the amlCompute. +*/ +model ScaleSettingsInformation { +/** +* scale settings for AML Compute +*/ +"scaleSettings"?: ScaleSettings; } -enum AutoDeleteCondition { - CreatedGreaterThan, - LastAccessedGreaterThan, +/** +* scale settings for AML Compute +*/ +model ScaleSettings { +/** +* Max number of nodes to use +*/ +"maxNodeCount": int32; +/** +* Min number of nodes to use +*/ +"minNodeCount"?: int32; +/** +* Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format. +*/ +"nodeIdleTimeBeforeScaleDown"?: duration; +} + +/** +* Specifies the custom service configuration +*/ +model CustomService extends Record { +/** +* Name of the Custom Service +*/ +"name"?: string; +/** +* Describes the Image Specifications +*/ +"image"?: Image; +/** +* Environment Variable for the container +*/ +"environmentVariables"?: Record; +/** +* Describes the docker settings for the image +*/ +"docker"?: Docker; +/** +* Configuring the endpoints for the container +*/ +"endpoints"?: Endpoint[]; +/** +* Configuring the volumes for the container +*/ +"volumes"?: VolumeDefinition[]; } -@doc("Type of storage to use for the pending upload location") -enum PendingUploadType { - None, - TemporaryBlobReference, -} -@doc("Enum to determine the PendingUpload credentials type.") -enum PendingUploadCredentialType { - SAS, +model Image extends Record { +/** +* Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images +*/ +"type"?: ImageType = ImageType.docker; +/** +* Image reference URL +*/ +"reference"?: string; } -enum ListViewType { - ActiveOnly, - ArchivedOnly, - All, -} -@doc("Enum to determine the type of data.") -enum DataType { - uri_file, - uri_folder, - mltable, +model EnvironmentVariable extends Record { +/** +* Type of the Environment Variable. Possible values are: local - For local variable +*/ +"type"?: EnvironmentVariableType = EnvironmentVariableType.local; +/** +* Value of the Environment variable +*/ +"value"?: string; } -@doc("Protection level associated with the Intellectual Property.") -enum ProtectionLevel { - @doc("All means Intellectual Property is fully protected.") All, - @doc("None means it is not an Intellectual Property.") None, -} -@doc("AutoRebuild setting for the derived image") -enum AutoRebuildSetting { - Disabled, - OnBaseImageUpdate, +model Docker extends Record { +/** +* Indicate whether container shall run in privileged or non-privileged mode. +*/ +"privileged"?: boolean; } -@doc("Environment type is either user created or curated by Azure ML service") -enum EnvironmentType { - Curated, - UserCreated, -} -@doc("The type of operating system.") -enum OperatingSystemType { - Linux, - Windows, +model Endpoint { +/** +* Protocol over which communication will happen over this endpoint +*/ +"protocol"?: Protocol = Protocol.tcp; +/** +* Name of the Endpoint +*/ +"name"?: string; +/** +* Application port inside the container. +*/ +"target"?: int32; +/** +* Port over which the application is exposed from container. +*/ +"published"?: int32; +/** +* Host IP over which the application is exposed from the container +*/ +"hostIp"?: string; } -@doc("Base environment type.") -enum BaseEnvironmentSourceType { - EnvironmentAsset, -} -@doc("Inferencing server type for various targets.") -enum InferencingServerType { - AzureMLOnline, - AzureMLBatch, - Triton, - Custom, +model VolumeDefinition { +/** +* Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe +*/ +"type"?: VolumeDefinitionType = VolumeDefinitionType.bind; +/** +* Indicate whether to mount volume as readOnly. Default value for this is false. +*/ +"readOnly"?: boolean; +/** +* Source of the mount. For bind mounts this is the host path. +*/ +"source"?: string; +/** +* Target of the mount. For bind mounts this is the path in the container. +*/ +"target"?: string; +/** +* Consistency of the volume +*/ +"consistency"?: string; +/** +* Bind Options of the mount +*/ +"bind"?: BindOptions; +/** +* Volume Options of the mount +*/ +"volume"?: VolumeOptions; +/** +* tmpfs option of the mount +*/ +"tmpfs"?: TmpfsOptions; } -@doc("Type of the inputs.") -enum PackageInputType { - UriFile, - UriFolder, -} -@doc("Mounting type of the model or the inputs") -enum PackageInputDeliveryMode { - Copy, - Download, +model BindOptions { +/** +* Type of Bind Option +*/ +"propagation"?: string; +/** +* Indicate whether to create host path. +*/ +"createHostPath"?: boolean; +/** +* Mention the selinux options. +*/ +"selinux"?: string; } -@doc("Input path type for package inputs.") -enum InputPathType { - Url, - PathId, - PathVersion, -} -@doc("Package build state returned in package response.") -enum PackageBuildState { - NotStarted, - Running, - Succeeded, - Failed, +model VolumeOptions { +/** +* Indicate whether volume is nocopy +*/ +"nocopy"?: boolean; } -@doc("State of endpoint provisioning.") -enum EndpointProvisioningState { - Creating, - Deleting, - Succeeded, - Failed, - Updating, - Canceled, -} -@doc("Enum to determine endpoint authentication mode.") -enum EndpointAuthMode { - AMLToken, - Key, - AADToken, +model TmpfsOptions { +/** +* Mention the Tmpfs size +*/ +"size"?: int32; } -@doc("The enumerated property types for batch deployments.") -enum BatchDeploymentConfigurationType { - Model, - PipelineComponent, +/** +* Result of AmlCompute Nodes +*/ +@pagedResult +model AmlComputeNodesInformation { +/** +* The collection of returned AmlCompute nodes details. +*/ +@visibility("read") +@items +"nodes"?: AmlComputeNodeInformation[]; +/** +* The continuation token. +*/ +@visibility("read") +@nextLink +"nextLink"?: string; +} + +/** +* Compute node information related to a AmlCompute. +*/ +model AmlComputeNodeInformation { +/** +* ID of the compute node. +*/ +@visibility("read") +"nodeId"?: string; +/** +* Private IP address of the compute node. +*/ +@visibility("read") +"privateIpAddress"?: string; +/** +* Public IP address of the compute node. +*/ +@visibility("read") +"publicIpAddress"?: string; +/** +* SSH port number of the node. +*/ +@visibility("read") +"port"?: int32; +/** +* State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. +*/ +@visibility("read") +"nodeState"?: NodeState; +/** +* ID of the Experiment running on the node, if any else null. +*/ +@visibility("read") +"runId"?: string; +} + +/** +* Secrets related to a Machine Learning compute. Might differ for every type of compute. +*/ +@discriminator("computeType") +model ComputeSecrets { } -@doc(""" -Log verbosity for batch inferencing. -Increasing verbosity order for logging is : Warning, Info and Debug. -The default value is Info. -""") -enum BatchLoggingLevel { - Info, - Warning, - Debug, -} - -@doc("Enum to determine which reference method to use for an asset.") -enum ReferenceType { - Id, - DataPath, - OutputPath, -} - -@doc("Enum to determine how batch inferencing will handle output") -enum BatchOutputAction { - SummaryOnly, - AppendRow, -} - -@doc("Possible values for DeploymentProvisioningState.") -enum DeploymentProvisioningState { - Creating, - Deleting, - Scaling, - Updating, - Succeeded, - Failed, - Canceled, -} - -@doc("Enum to determine the datastore credentials type.") -enum CredentialsType { - AccountKey, - Certificate, - None, - Sas, - ServicePrincipal, - KerberosKeytab, - KerberosPassword, -} - -@doc("Enum to determine the datastore contents type.") -enum DatastoreType { - AzureBlob, - AzureDataLakeGen1, - AzureDataLakeGen2, - AzureFile, - Hdfs, - OneLake, -} - -@doc("Enum to determine the datastore secrets type.") -enum SecretsType { - AccountKey, - Certificate, - Sas, - ServicePrincipal, - KerberosPassword, - KerberosKeytab, -} - -enum FeatureDataType { - String, - Integer, - Long, - Float, - Double, - Binary, - Datetime, - Boolean, -} - -@doc("Enum to determine the email notification type.") -enum EmailNotificationEnableType { - JobCompleted, - JobFailed, - JobCancelled, -} - -@doc("Enum to determine the webhook callback service type.") -enum WebhookType { - AzureDevOps, -} - -@doc("Enum to describe the frequency of a recurrence schedule") -enum RecurrenceFrequency { - @doc("Minute frequency") Minute, - @doc("Hour frequency") Hour, - @doc("Day frequency") Day, - @doc("Week frequency") Week, - @doc("Month frequency") Month, -} - -@doc("Enum of weekday") -enum WeekDay { - @doc("Monday weekday") Monday, - @doc("Tuesday weekday") Tuesday, - @doc("Wednesday weekday") Wednesday, - @doc("Thursday weekday") Thursday, - @doc("Friday weekday") Friday, - @doc("Saturday weekday") Saturday, - @doc("Sunday weekday") Sunday, -} - -enum TriggerType { - Recurrence, - Cron, -} - -enum MaterializationStoreType { - None, - Online, - Offline, - OnlineAndOffline, -} - -@doc("The status of a job.") -enum JobStatus { - @doc("Run hasn't started yet.") NotStarted, - @doc("Run has started. The user has a run ID.") Starting, - @doc("(Not used currently) It will be used if ES is creating the compute target.") - Provisioning, - @doc("The run environment is being prepared.") Preparing, - @doc("The job is queued in the compute target. For example, in BatchAI the job is in queued state, while waiting for all required nodes to be ready.") - Queued, - @doc("The job started to run in the compute target.") Running, - @doc("Job is completed in the target. It is in output collection state now.") - Finalizing, - @doc("Cancellation has been requested for the job.") CancelRequested, - @doc("Job completed successfully. This reflects that both the job itself and output collection states completed successfully") - Completed, - @doc("Job failed.") Failed, - @doc("Following cancellation request, the job is now successfully canceled.") - Canceled, - @doc(""" -When heartbeat is enabled, if the run isn't updating any information to RunHistory then the run goes to NotResponding state. -NotResponding is the only state that is exempt from strict transition orders. A run can go from NotResponding to any of the previous states. -""") - NotResponding, - @doc("The job is paused by users. Some adjustment to labeling jobs can be made only in paused state.") - Paused, - @doc("Default job status if not mapped to all other statuses") Unknown, - @doc("The job is in a scheduled state. Job is not in any active state.") - Scheduled, +/** +* Stops compute instance after user defined period of inactivity. +*/ +model IdleShutdownSetting { +/** +* Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. +*/ +"idleTimeBeforeShutdown"?: string; } -enum FeaturestoreJobType { - RecurrentMaterialization, - BackfillMaterialization, +/** +* Container for code asset versions. +*/ +model CodeContainer extends AssetContainer { +/** +* Provisioning state for the code container. +*/ +@visibility("read") +"provisioningState"?: AssetProvisioningState; } -@doc("Enum to determine identity framework.") -enum IdentityConfigurationType { - Managed, - AMLToken, - UserIdentity, -} -@doc("Enum to determine the type of job.") -enum JobType { - AutoML, - Command, - Labeling, - Sweep, - Pipeline, - Spark, +model AssetContainer extends ResourceBase { +/** +* Is the asset archived? +*/ +@visibility("read", "create", "update") +"isArchived"?: boolean; +/** +* The latest version inside this container. +*/ +@visibility("read") +"latestVersion"?: string; +/** +* The next auto incremental version +*/ +@visibility("read") +"nextVersion"?: string; } -@doc("The enumerated types for the nodes value") -enum NodesValueType { - All, - Custom, -} -@doc("Whether IncrementalDataRefresh is enabled") -enum IncrementalDataRefresh { - Enabled, - Disabled, +model ResourceBase { +/** +* The asset description text. +*/ +"description"?: string; +/** +* The asset property dictionary. +*/ +"properties"?: Record; +/** +* Tag dictionary. Tags can be added, removed, and updated. +*/ +"tags"?: Record; +} + +/** +* Code asset version details. +*/ +model CodeVersion extends AssetBase { +/** +* Uri where code is located +*/ +"codeUri"?: string; +/** +* Provisioning state for the code version. +*/ +@visibility("read") +"provisioningState"?: AssetProvisioningState; } -@doc("Whether multiSelect is enabled") -enum MultiSelect { - Enabled, - Disabled, -} -@doc("Media type of data asset.") -enum MediaType { - Image, - Text, +model AssetBase extends ResourceBase { +/** +* Specifies the lifecycle setting of managed data asset. +*/ +@visibility("read", "create", "update") +"autoDeleteSetting"?: AutoDeleteSetting; +/** +* If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous +*/ +@visibility("read", "create") +"isAnonymous"?: boolean; +/** +* Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived +*/ +@visibility("read", "create", "update") +"isArchived"?: boolean; } -enum MLAssistConfigurationType { - Enabled, - Disabled, -} -@doc("Enum to determine the job provisioning state.") -enum JobProvisioningState { - Succeeded, - Failed, - Canceled, - InProgress, +model AutoDeleteSetting { +/** +* When to check if an asset is expired +*/ +@visibility("read", "create", "update") +"condition"?: AutoDeleteCondition; +/** +* Expiration condition value. +*/ +@visibility("read", "create", "update") +"value"?: string; } -enum StatusMessageLevel { - Error, - Information, - Warning, -} -@doc("The format of exported labels.") -enum ExportFormatType { - Dataset, - Coco, - CSV, +model PendingUploadRequestDto { +/** +* If PendingUploadId = null then random guid will be used. +*/ +"pendingUploadId"?: string; +/** +* TemporaryBlobReference is the only supported type +*/ +"pendingUploadType"?: PendingUploadType; } -@doc("Enum to determine endpoint compute type.") -enum EndpointComputeType { - Managed, - Kubernetes, - AzureMLCompute, -} -enum OrderString { - CreatedAtDesc, - CreatedAtAsc, - UpdatedAtDesc, - UpdatedAtAsc, +model PendingUploadResponseDto { +/** +* Container level read, write, list SAS +*/ +"blobReferenceForConsumption"?: BlobReferenceForConsumptionDto; +/** +* ID for this upload request +*/ +"pendingUploadId"?: string; +/** +* TemporaryBlobReference is the only supported type +*/ +"pendingUploadType"?: PendingUploadType; } -@doc("Enum to determine whether PublicNetworkAccess is Enabled or Disabled.") -enum PublicNetworkAccessType { - Enabled, - Disabled, -} -enum DataCollectionMode { - Enabled, - Disabled, +model BlobReferenceForConsumptionDto { +/** +* Blob URI path for client to upload data. +Example: https://blob.windows.core.net/Container/Path +*/ +"blobUri"?: url; +/** +* Credential info to access storage account +*/ +"credential"?: PendingUploadCredentialDto; +/** +* Arm ID of the storage account to use +*/ +"storageAccountArmId"?: string; } -enum RollingRateType { - Year, - Month, - Day, - Hour, - Minute, -} -@doc("Enum to determine whether PublicNetworkAccess is Enabled or Disabled for egress of a deployment.") -enum EgressPublicNetworkAccessType { - Enabled, - Disabled, +@discriminator("credentialType") +model PendingUploadCredentialDto { } -enum ScaleType { - Default, - TargetUtilization, +/** +* Component container definition. + +*/ +model ComponentContainer extends AssetContainer { +/** +* Provisioning state for the component container. +*/ +@visibility("read") +"provisioningState"?: AssetProvisioningState; } -@doc("The type of container to retrieve logs from.") -enum ContainerType { - @doc("The container used to download models and score script.") - StorageInitializer, - @doc("The container used to serve user's request.") InferenceServer, - @doc("The container used to collect payload and custom logging when mdc is enabled.") - ModelDataCollector, +/** +* Definition of a component version: defines resources that span component types. +*/ +model ComponentVersion extends AssetBase { +/** +* Defines Component definition details. + +*/ +@visibility("read", "create") +"componentSpec"?: Record; +/** +* Provisioning state for the component version. +*/ +@visibility("read") +"provisioningState"?: AssetProvisioningState; +/** +* Stage in the component lifecycle +*/ +"stage"?: string; +} + +/** +* Container for data asset versions. +*/ +model DataContainer extends AssetContainer { +/** +* [Required] Specifies the type of data. +*/ +@visibility("read", "create") +"dataType": DataType; } -@doc("Node scaling setting for the compute sku.") -enum SkuScaleType { - @doc("Automatically scales node count.") Automatic, - @doc("Node count scaled upon user request.") Manual, - @doc("Fixed set of nodes.") None, +/** +* Data version base definition +*/ +@discriminator("dataType") +model DataVersionBase extends AssetBase { +/** +* [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"dataUri": string; +/** +* Intellectual Property details. Used if data is an Intellectual Property. +*/ +@visibility("read", "create") +"intellectualProperty"?: IntellectualProperty; +/** +* Stage in the data lifecycle assigned to this data asset +*/ +"stage"?: string; +} + +/** +* Intellectual Property details for a resource. +*/ +model IntellectualProperty { +/** +* Protection level of the Intellectual Property. +*/ +"protectionLevel"?: ProtectionLevel; +/** +* [Required] Publisher of the Intellectual Property. Must be the same as Registry publisher name. +*/ +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"publisher": string; +} + +/** +* Container for environment specification versions. +*/ +model EnvironmentContainer extends AssetContainer { +/** +* Provisioning state for the environment container. +*/ +@visibility("read") +"provisioningState"?: AssetProvisioningState; } -enum KeyType { - Primary, - Secondary, +/** +* Environment version details. +*/ +model EnvironmentVersion extends AssetBase { +/** +* Defines if image needs to be rebuilt based on base image changes. +*/ +@visibility("read", "create") +"autoRebuild"?: AutoRebuildSetting; +/** +* Configuration settings for Docker build context. +*/ +@visibility("read", "create") +"build"?: BuildContext; +/** +* Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and C/C++ packages. + +*/ +@visibility("read", "create") +"condaFile"?: string; +/** +* Environment type is either user managed or curated by the Azure ML service + +*/ +@visibility("read") +"environmentType"?: EnvironmentType; +/** +* Name of the image that will be used for the environment. + +*/ +@visibility("read", "create") +"image"?: string; +/** +* Defines configuration specific to inference. +*/ +@visibility("read", "create") +"inferenceConfig"?: InferenceContainerProperties; +/** +* Intellectual Property details. Used if environment is an Intellectual Property. +*/ +@visibility("read", "create") +"intellectualProperty"?: IntellectualProperty; +/** +* The OS type of the environment. +*/ +@visibility("read", "create") +"osType"?: OperatingSystemType; +/** +* Provisioning state for the environment version. +*/ +@visibility("read") +"provisioningState"?: AssetProvisioningState; +/** +* Stage in the environment lifecycle assigned to this environment +*/ +"stage"?: string; +} + +/** +* Configuration settings for Docker build context +*/ +model BuildContext { +/** +* [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. + +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"contextUri": string; +/** +* Path to the Dockerfile in the build context. + +*/ +@visibility("read", "create") +"dockerfilePath"?: string = "Dockerfile"; } -enum ScheduleListViewType { - EnabledOnly, - DisabledOnly, - All, -} -enum ScheduleActionType { - CreateJob, - InvokeBatchEndpoint, - ImportData, - CreateMonitor, +model InferenceContainerProperties { +/** +* The route to check the liveness of the inference server container. +*/ +"livenessRoute"?: Route; +/** +* The route to check the readiness of the inference server container. +*/ +"readinessRoute"?: Route; +/** +* The port to send the scoring requests to, within the inference server container. +*/ +"scoringRoute"?: Route; } -enum ScheduleProvisioningStatus { - Creating, - Updating, - Deleting, - Succeeded, - Failed, - Canceled, -} -@doc("Connection status of the service consumer with the service provider") -enum EndpointServiceConnectionStatus { - Approved, - Pending, - Rejected, - Disconnected, - Timeout, +model Route { +/** +* [Required] The path for the route. +*/ +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"path": string; +/** +* [Required] The port for the route. +*/ +"port": int32; } -@doc("Indicates whether or not the encryption is enabled for the workspace.") -enum EncryptionStatus { - Enabled, - Disabled, -} -@doc("Isolation mode for the managed network of a machine learning workspace.") -enum IsolationMode { - Disabled, - AllowInternetOutbound, - AllowOnlyApprovedOutbound, +model ModelContainer extends AssetContainer { +/** +* Provisioning state for the model container. +*/ +@visibility("read") +"provisioningState"?: AssetProvisioningState; } -@doc("Category of a managed network Outbound Rule of a machine learning workspace.") -enum RuleCategory { - Required, - Recommended, - UserDefined, +/** +* Model asset version details. +*/ +model ModelVersion extends AssetBase { +/** +* Mapping of model flavors to their properties. +*/ +"flavors"?: Record; +/** +* Intellectual Property details. Used if model is an Intellectual Property. +*/ +@visibility("read", "create") +"intellectualProperty"?: IntellectualProperty; +/** +* Name of the training job which produced this model +*/ +"jobName"?: string; +/** +* The storage format for this entity. Used for NCD. +*/ +"modelType"?: string; +/** +* The URI path to the model contents. +*/ +"modelUri"?: string; +/** +* Provisioning state for the model version. +*/ +@visibility("read") +"provisioningState"?: AssetProvisioningState; +/** +* Stage in the model lifecycle assigned to this model +*/ +"stage"?: string; } -@doc("Type of a managed network Outbound Rule of a machine learning workspace.") -enum RuleStatus { - Inactive, - Active, -} -@doc("Type of a managed network Outbound Rule of a machine learning workspace.") -enum RuleType { - FQDN, - PrivateEndpoint, - ServiceTag, +model FlavorData { +/** +* Model flavor-specific data. +*/ +"data"?: Record; } -@doc("Status for the managed network of a machine learning workspace.") -enum ManagedNetworkStatus { - Inactive, - Active, +/** +* Model package operation request properties. +*/ +model PackageRequest { +/** +* Base environment to start with. +*/ +@visibility("read", "create") +"baseEnvironmentSource"?: BaseEnvironmentSource; +/** +* Collection of environment variables. +*/ +@visibility("read", "create") +"environmentVariables"?: Record; +/** +* [Required] Inferencing server configurations. +*/ +@visibility("read", "create") +"inferencingServer": InferencingServer; +/** +* Collection of inputs. +*/ +@visibility("read", "create") +"inputs"?: ModelPackageInput[]; +/** +* Model configuration including the mount mode. +*/ +@visibility("read", "create") +"modelConfiguration"?: ModelConfiguration; +/** +* Tag dictionary. Tags can be added, removed, and updated. +*/ +@visibility("read", "create") +"tags"?: Record; +/** +* [Required] Arm ID of the target environment to be created by package operation. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"targetEnvironmentId": string; } -@doc("The current provisioning state.") -enum PrivateEndpointConnectionProvisioningState { - Succeeded, - Creating, - Deleting, - Failed, -} -@doc("Authentication type of the connection target") -enum ConnectionAuthType { - PAT, - ManagedIdentity, - UsernamePassword, - None, - SAS, - ServicePrincipal, - AccessKey, - ApiKey, - CustomKeys, +@discriminator("baseEnvironmentSourceType") +model BaseEnvironmentSource { } -@doc("Category of the connection") -enum ConnectionCategory { - PythonFeed, - ContainerRegistry, - Git, - S3, - Snowflake, - AzureSqlDb, - AzureSynapseAnalytics, - AzureMySqlDb, - AzurePostgresDb, - ADLSGen2, - Redis, - ApiKey, - AzureOpenAI, - CognitiveSearch, - CognitiveService, - CustomKeys, -} -@doc("Level of workspace setup error") -enum DiagnoseResultLevel { - Warning, - Error, - Information, +@discriminator("serverType") +model InferencingServer { } -@doc("Intended usage of the cluster") -enum ClusterPurpose { - FastProd, - DenseProd, - DevTest, -} - -@doc("Enable or disable ssl for scoring") -enum SslConfigStatus { - Disabled, - Enabled, - Auto, -} - -@doc("Load Balancer Type") -enum LoadBalancerType { - PublicIp, - InternalLoadBalancer, -} - -@doc("Compute OS Type") -enum OsType { - Linux, - Windows, -} - -@doc("Virtual Machine priority") -enum VmPriority { - Dedicated, - LowPriority, +/** +* Model package input options. +*/ +model ModelPackageInput { +/** +* [Required] Type of the input included in the target image. +*/ +"inputType": PackageInputType; +/** +* Input delivery mode of the input. +*/ +"mode"?: PackageInputDeliveryMode; +/** +* Relative mount path of the input in the target image. +*/ +"mountPath"?: string; +/** +* [Required] Location of the input. +*/ +"path": PackageInputPathBase; } -@doc("State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled.") -enum RemoteLoginPortPublicAccess { - Enabled, - Disabled, - NotSpecified, -} - -@doc("Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute.") -enum AllocationState { - Steady, - Resizing, -} -@doc("Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role.") -enum ApplicationSharingPolicy { - Personal, - Shared, +@discriminator("inputPathType") +model PackageInputPathBase { } -@doc("Indicates whether mlflow autologger is enabled for notebooks.") -enum MlflowAutologger { - Enabled, - Disabled, +/** +* Model configuration options. +*/ +model ModelConfiguration { +/** +* Input delivery mode for the model. +*/ +"mode"?: PackageInputDeliveryMode; +/** +* Relative mounting path of the model in the target image. +*/ +"mountPath"?: string; +} + +/** +* Package response returned after async package operation completes successfully. +*/ +model PackageResponse { +/** +* Base environment to start with. +*/ +@visibility("read") +"baseEnvironmentSource"?: BaseEnvironmentSource; +/** +* Build id of the image build operation. +*/ +@visibility("read") +"buildId"?: string; +/** +* Build state of the image build operation. +*/ +@visibility("read") +"buildState"?: PackageBuildState; +/** +* Collection of environment variables. +*/ +@visibility("read") +"environmentVariables"?: Record; +/** +* Inferencing server configurations. +*/ +@visibility("read") +"inferencingServer"?: InferencingServer; +/** +* Collection of inputs. +*/ +@visibility("read") +"inputs"?: ModelPackageInput[]; +/** +* Log url of the image build operation. +*/ +@visibility("read") +"logUrl"?: string; +/** +* Model configuration including the mount mode. +*/ +@visibility("read") +"modelConfiguration"?: ModelConfiguration; +/** +* Tag dictionary. Tags can be added, removed, and updated. +*/ +@visibility("read") +"tags"?: Record; +/** +* Asset ID of the target environment created by package operation. +*/ +@visibility("read") +"targetEnvironmentId"?: string; +} + +/** +* Batch endpoint configuration. +*/ +model BatchEndpoint extends EndpointPropertiesBase { +/** +* Default values for Batch Endpoint. +*/ +"defaults"?: BatchEndpointDefaults; +/** +* Provisioning state for the endpoint. +*/ +@visibility("read") +"provisioningState"?: EndpointProvisioningState; +} + +/** +* Batch endpoint default values +*/ +model BatchEndpointDefaults { +/** +* Name of the deployment that will be default for the endpoint. +This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. +*/ +"deploymentName"?: string; } -@doc("State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable.") -enum SshPublicAccess { - Enabled, - Disabled, +/** +* Inference Endpoint base definition +*/ +model EndpointPropertiesBase { +/** +* [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. +*/ +"authMode": EndpointAuthMode; +/** +* Description of the inference endpoint. +*/ +"description"?: string; +/** +* EndpointAuthKeys to set initially on an Endpoint. +This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. +*/ +@visibility("create") +"keys"?: EndpointAuthKeys; +/** +* Property dictionary. Properties can be added, but not removed or altered. +*/ +"properties"?: Record; +/** +* Endpoint URI. +*/ +@visibility("read") +"scoringUri"?: url; +/** +* Endpoint Swagger URI. +*/ +@visibility("read") +"swaggerUri"?: url; +} + +/** +* Keys for endpoint authentication. +*/ +model EndpointAuthKeys { +/** +* The primary key. +*/ +@visibility("read", "create") +"primaryKey"?: string; +/** +* The secondary key. +*/ +@visibility("read", "create") +"secondaryKey"?: string; +} + +/** +* Strictly used in update requests. +*/ +model PartialMinimalTrackedResourceWithIdentity extends PartialMinimalTrackedResource { +/** +* Managed service identity (system assigned and/or user assigned identities) +*/ +"identity"?: PartialManagedServiceIdentity; +} + +/** +* Managed service identity (system assigned and/or user assigned identities) +*/ +model PartialManagedServiceIdentity { +/** +* Managed service identity (system assigned and/or user assigned identities) +*/ +"type"?: ManagedServiceIdentityType; +/** +* The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. +*/ +"userAssignedIdentities"?: Record>; +} + +/** +* Strictly used in update requests. +*/ +model PartialMinimalTrackedResource { +/** +* Resource tags. +*/ +"tags"?: Record; } -@doc("Current state of an ComputeInstance.") -enum ComputeInstanceState { - Creating, - CreateFailed, - Deleting, - Running, - Restarting, - JobRunning, - SettingUp, - SetupFailed, - Starting, - Stopped, - Stopping, - UserSettingUp, - UserSetupFailed, - Unknown, - Unusable, +/** +* Batch inference settings per deployment. +*/ +model BatchDeployment extends EndpointDeploymentPropertiesBase { +/** +* Compute target for batch inference operation. +*/ +"compute"?: string; +/** +* Properties relevant to different deployment types. +*/ +"deploymentConfiguration"?: BatchDeploymentConfiguration; +/** +* Error threshold, if the error count for the entire input goes above this value, +the batch inference will be aborted. Range is [-1, int.MaxValue]. +For FileDataset, this value is the count of file failures. +For TabularDataset, this value is the count of record failures. +If set to -1 (the lower bound), all failures during batch inference will be ignored. +*/ +"errorThreshold"?: int32 = -1; +/** +* Logging level for batch inference operation. +*/ +"loggingLevel"?: BatchLoggingLevel; +/** +* Indicates maximum number of parallelism per instance. +*/ +"maxConcurrencyPerInstance"?: int32 = 1; +/** +* Size of the mini-batch passed to each batch invocation. +For FileDataset, this is the number of files per mini-batch. +For TabularDataset, this is the size of the records in bytes, per mini-batch. +*/ +"miniBatchSize"?: int64 = 10; +/** +* Reference to the model asset for the endpoint deployment. +*/ +"model"?: AssetReferenceBase; +/** +* Indicates how the output will be organized. +*/ +"outputAction"?: BatchOutputAction; +/** +* Customized output file name for append_row output action. +*/ +"outputFileName"?: string = "predictions.csv"; +/** +* Provisioning state for the endpoint deployment. +*/ +@visibility("read") +"provisioningState"?: DeploymentProvisioningState; +/** +* Indicates compute configuration for the job. +If not provided, will default to the defaults defined in ResourceConfiguration. +*/ +"resources"?: DeploymentResourceConfiguration; +/** +* Retry Settings for the batch inference operation. +If not provided, will default to the defaults defined in BatchRetrySettings. +*/ +"retrySettings"?: BatchRetrySettings; } -@doc("The Compute Instance Authorization type. Available values are personal (default).") -enum ComputeInstanceAuthorizationType { - personal, +/** +* Properties relevant to different deployment types. +*/ +@discriminator("deploymentConfigurationType") +model BatchDeploymentConfiguration { } -@doc("Name of the last operation.") -enum OperationName { - Create, - Start, - Stop, - Restart, - Reimage, - Delete, +/** +* Base definition for asset references. +*/ +@discriminator("referenceType") +model AssetReferenceBase { } -@doc("Operation status.") -enum OperationStatus { - InProgress, - Succeeded, - CreateFailed, - StartFailed, - StopFailed, - RestartFailed, - ReimageFailed, - DeleteFailed, -} -@doc("Trigger of operation.") -enum OperationTrigger { - User, - Schedule, - IdleShutdown, +model DeploymentResourceConfiguration extends ResourceConfiguration { } -@doc("The current deployment state of schedule.") -enum ProvisioningStatus { - Completed, - Provisioning, - Failed, -} -@doc("Is the schedule enabled or disabled?") -enum ScheduleStatus { - Enabled, - Disabled, +model ResourceConfiguration { +/** +* Optional number of instances or nodes used by the compute target. +*/ +@visibility("read", "create") +"instanceCount"?: int32 = 1; +/** +* Optional type of VM used as supported by the compute target. +*/ +@visibility("read", "create") +"instanceType"?: string; +/** +* Locations where the job can run. +*/ +@visibility("read", "create") +"locations"?: string[]; +/** +* Optional max allowed number of instances or nodes to be used by the compute target. +For use with elastic training, currently supported by PyTorch distribution type only. +*/ +@visibility("read", "create") +"maxInstanceCount"?: int32; +/** +* Additional properties bag. +*/ +@visibility("read", "create") +"properties"?: Record>; +} + +/** +* Retry settings for a batch inference operation. +*/ +model BatchRetrySettings { +/** +* Maximum retry count for a mini-batch +*/ +"maxRetries"?: int32 = 3; +/** +* Invocation timeout for a mini-batch, in ISO 8601 format. +*/ +"timeout"?: duration = duration.PT30S; +} + +/** +* Base definition for endpoint deployment. +*/ +model EndpointDeploymentPropertiesBase { +/** +* Code configuration for the endpoint deployment. +*/ +"codeConfiguration"?: CodeConfiguration; +/** +* Description of the endpoint deployment. +*/ +"description"?: string; +/** +* ARM resource ID of the environment specification for the endpoint deployment. +*/ +"environmentId"?: string; +/** +* Environment variables configuration for the deployment. +*/ +"environmentVariables"?: Record; +/** +* Property dictionary. Properties can be added, but not removed or altered. +*/ +"properties"?: Record; +} + +/** +* Configuration for a scoring code asset. +*/ +model CodeConfiguration { +/** +* ARM resource ID of the code asset. +*/ +@visibility("read", "create") +"codeId"?: string; +/** +* [Required] The script to execute on startup. eg. "score.py" +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"scoringScript": string; +} + +/** +* Strictly used in update requests. +*/ +model PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties { +/** +* Additional attributes of the entity. +*/ +"properties"?: PartialBatchDeployment; +/** +* Resource tags. +*/ +"tags"?: Record; +} + +/** +* Mutable batch inference settings per deployment. +*/ +model PartialBatchDeployment { +/** +* Description of the endpoint deployment. +*/ +"description"?: string; } -@doc("[Required] The compute power action.") -enum ComputePowerAction { - Start, - Stop, +/** +* Base definition for datastore contents configuration. +*/ +@discriminator("datastoreType") +model Datastore extends ResourceBase { +/** +* [Required] Account credentials. +*/ +"credentials": DatastoreCredentials; +/** +* Intellectual Property details. +*/ +@visibility("read", "create") +"intellectualProperty"?: IntellectualProperty; +/** +* Readonly property to indicate if datastore is the workspace default datastore +*/ +@visibility("read") +"isDefault"?: boolean; +} + +/** +* Base definition for datastore credentials. +*/ +@discriminator("credentialsType") +model DatastoreCredentials { } -@doc("The current deployment state of schedule.") -enum ScheduleProvisioningState { - Completed, - Provisioning, - Failed, +/** +* Base definition for datastore secrets. +*/ +@discriminator("secretsType") +model DatastoreSecrets { } -@doc("Auto save settings.") -enum Autosave { - None, - Local, - Remote, +/** +* Dto object representing feature set +*/ +model FeaturesetContainerProperties extends AssetContainer { +/** +* Provisioning state for the featureset container. +*/ +@visibility("read") +"provisioningState"?: AssetProvisioningState; } -@doc("network of this container.") -enum Network { - Bridge, - Host, +/** +* Dto object representing feature +*/ +model FeatureProperties extends ResourceBase { +/** +* Specifies type +*/ +"dataType"?: FeatureDataType; +/** +* Specifies name +*/ +"featureName"?: string; +} + +/** +* Dto object representing feature set version +*/ +model FeaturesetVersionProperties extends AssetBase { +/** +* Specifies list of entities +*/ +"entities"?: string[]; +/** +* Specifies the materialization settings +*/ +"materializationSettings"?: MaterializationSettings; +/** +* Provisioning state for the featureset version container. +*/ +@visibility("read") +"provisioningState"?: AssetProvisioningState; +/** +* Specifies the feature spec details +*/ +"specification"?: FeaturesetSpecification; +/** +* Specifies the asset stage +*/ +"stage"?: string; } -@doc("Caching type of Data Disk.") -enum Caching { - None, - ReadOnly, - ReadWrite, -} -@doc("type of this storage account.") -enum StorageAccountType { - Standard_LRS, - Premium_LRS, +model MaterializationSettings { +/** +* Specifies the notification details +*/ +"notification"?: NotificationSetting; +/** +* Specifies the compute resource settings +*/ +"resource"?: MaterializationComputeResource; +/** +* Specifies the schedule details +*/ +"schedule"?: RecurrenceTrigger; +/** +* Specifies the spark compute settings +*/ +"sparkConfiguration"?: Record; +/** +* Specifies the stores to which materialization should happen +*/ +"storeType"?: MaterializationStoreType; +} + +/** +* Configuration for notification. +*/ +model NotificationSetting { +/** +* Send email notification to user on specified notification type +*/ +@visibility("read", "create") +"emailOn"?: EmailNotificationEnableType[]; +/** +* This is the email recipient list which has a limitation of 499 characters in total concat with comma separator +*/ +@visibility("read", "create") +"emails"?: string[]; +/** +* Send webhook callback to a service. Key is a user-provided name for the webhook. +*/ +@visibility("read", "create", "update") +"webhooks"?: Record; +} + +/** +* Webhook base +*/ +@discriminator("webhookType") +model Webhook { +/** +* Send callback on a specified notification event +*/ +@visibility("read", "create") +"eventType"?: string; } -@doc("Data source type.") -enum SourceType { - Dataset, - Datastore, - URI, +/** +* Dto object representing compute resource +*/ +model MaterializationComputeResource { +/** +* Specifies the instance type +*/ +"instanceType"?: string; } -@doc("Mount Action.") -enum MountAction { - Mount, - Unmount, -} -@doc("Mount state.") -enum MountState { - MountRequested, - Mounted, - MountFailed, - UnmountRequested, - UnmountFailed, - Unmounted, +model RecurrenceTrigger extends TriggerBase { +/** +* [Required] The frequency to trigger schedule. +*/ +"frequency": RecurrenceFrequency; +/** +* [Required] Specifies schedule interval in conjunction with frequency +*/ +"interval": int32; +/** +* The recurrence schedule. +*/ +"schedule"?: RecurrenceSchedule; +/** +* [Required] +*/ +"triggerType": "Recurrence"; } -enum MonitoringFeatureFilterType { - @doc("Includes all features.") AllFeatures, - @doc("Only includes the top contributing features, measured by feature attribution.") - TopNByAttribution, - @doc("Includes a user-defined subset of features.") FeatureSubset, -} -@doc("Monitor compute identity type enum.") -enum MonitorComputeIdentityType { - @doc("Authenticates through user's AML token.") AmlToken, - @doc("Authenticates through a user-provided managed identity.") - ManagedIdentity, +model RecurrenceSchedule { +/** +* [Required] List of hours for the schedule. +*/ +"hours": int32[]; +/** +* [Required] List of minutes for the schedule. +*/ +"minutes": int32[]; +/** +* List of month days for the schedule +*/ +"monthDays"?: int32[]; +/** +* List of days for the schedule. +*/ +"weekDays"?: WeekDay[]; } -@doc("Enum to determine the input data delivery mode.") -enum InputDeliveryMode { - ReadOnlyMount, - ReadWriteMount, - Download, - Direct, - EvalMount, - EvalDownload, -} -@doc("Output data delivery mode enums.") -enum OutputDeliveryMode { - ReadWriteMount, - Upload, - Direct, +@discriminator("triggerType") +model TriggerBase { +/** +* Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. +Recommented format would be "2022-06-01T00:00:01" +If not present, the schedule will run indefinitely +*/ +"endTime"?: string; +/** +* Specifies start time of schedule in ISO 8601 format, but without a UTC offset. +*/ +"startTime"?: string; +/** +* Specifies time zone in which the schedule runs. +TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 +*/ +"timeZone"?: string = "UTC"; } -@doc("Enum to determine forecast horizon selection mode.") -enum ForecastHorizonMode { - @doc("Forecast horizon to be determined automatically.") Auto, - @doc("Use the custom forecast horizon.") Custom, +/** +* Dto object representing specification +*/ +model FeaturesetSpecification { +/** +* Specifies the spec path +*/ +"path"?: string; } -@doc("Enum to determine the Job Output Type.") -enum JobOutputType { - uri_file, - uri_folder, - mltable, - custom_model, - mlflow_model, - triton_model, +/** +* Request payload for creating a backfill request for a given feature set version +*/ +model FeaturesetVersionBackfillRequest { +/** +* Specifies description +*/ +"description"?: string; +/** +* Specifies description +*/ +"displayName"?: string; +/** +* Specifies the backfill feature window to be materialized +*/ +"featureWindow"?: FeatureWindow; +/** +* Specifies the compute resource settings +*/ +"resource"?: MaterializationComputeResource; +/** +* Specifies the spark compute settings +*/ +"sparkConfiguration"?: Record; +/** +* Specifies the tags +*/ +"tags"?: Record; +} + +/** +* Specifies the feature window +*/ +model FeatureWindow { +/** +* Specifies the feature window end time +*/ +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"featureWindowEnd"?: utcDateTime; +/** +* Specifies the feature window start time +*/ +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"featureWindowStart"?: utcDateTime; +} + +/** +* Dto object representing the feature set job +*/ +model FeaturesetJob { +/** +* Specifies the created date +*/ +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"createdDate"?: utcDateTime; +/** +* Specifies the display name +*/ +"displayName"?: string; +/** +* Specifies the duration +*/ +"duration"?: duration; +/** +* Specifies the experiment id +*/ +"experimentId"?: string; +/** +* Specifies the backfill feature window to be materialized +*/ +"featureWindow"?: FeatureWindow; +/** +* Specifies the job id +*/ +"jobId"?: string; +/** +* Specifies the job status +*/ +"status"?: JobStatus; +/** +* Specifies the tags if any +*/ +"tags"?: Record; +/** +* Specifies the feature store job type +*/ +"type"?: FeaturestoreJobType; +} + +/** +* A paginated list of FeaturesetJob entities. +*/ +model FeaturesetJobArmPaginatedResult is Azure.Core.Page { +} + +/** +* Dto object representing feature entity +*/ +model FeaturestoreEntityContainerProperties extends AssetContainer { +/** +* Provisioning state for the featurestore entity container. +*/ +@visibility("read") +"provisioningState"?: AssetProvisioningState; } -@doc("Enum to determine the job tier.") -enum JobTier { - Null, - Spot, - Basic, - Standard, - Premium, +/** +* Dto object representing feature entity version +*/ +model FeaturestoreEntityVersionProperties extends AssetBase { +/** +* Specifies index columns +*/ +"indexColumns"?: IndexColumn[]; +/** +* Provisioning state for the featurestore entity version. +*/ +@visibility("read") +"provisioningState"?: AssetProvisioningState; +/** +* Specifies the asset stage +*/ +"stage"?: string; +} + +/** +* Dto object representing index column +*/ +model IndexColumn { +/** +* Specifies the column name +*/ +"columnName"?: string; +/** +* Specifies the data type +*/ +"dataType"?: FeatureDataType; +} + +/** +* Base definition for a job. +*/ +@discriminator("jobType") +model JobBase extends ResourceBase { +/** +* ARM resource ID of the component resource. +*/ +@visibility("read", "create") +"componentId"?: string; +/** +* ARM resource ID of the compute resource. +*/ +@visibility("read", "create") +"computeId"?: string; +/** +* Display name of job. +*/ +@visibility("read", "create") +"displayName"?: string; +/** +* The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. +*/ +@visibility("read", "create") +"experimentName"?: string = "Default"; +/** +* Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. +Defaults to AmlToken if null. +*/ +@visibility("read", "create") +"identity"?: IdentityConfiguration; +/** +* Is the asset archived? +*/ +@visibility("read", "create", "update") +"isArchived"?: boolean; +/** +* Notification setting for the job +*/ +@visibility("read", "create", "update") +"notificationSetting"?: NotificationSetting; +/** +* Configuration for secrets to be made available during runtime. +*/ +@visibility("read", "create") +"secretsConfiguration"?: Record; +/** +* List of JobEndpoints. +For local jobs, a job endpoint will have an endpoint value of FileStreamObject. +*/ +"services"?: Record; +/** +* Status of the job. +*/ +@visibility("read") +"status"?: JobStatus; +} + +/** +* Base definition for identity configuration. +*/ +@discriminator("identityType") +model IdentityConfiguration { } -@doc("Enum for setting log verbosity.") -enum LogVerbosity { - @doc("No logs emitted.") NotSet, - @doc("Debug and above log statements logged.") Debug, - @doc("Info and above log statements logged.") Info, - @doc("Warning and above log statements logged.") Warning, - @doc("Error and above log statements logged.") Error, - @doc("Only critical statements logged.") Critical, +/** +* Secret Configuration definition. +*/ +model SecretConfiguration { +/** +* Secret Uri. +Sample Uri : https://myvault.vault.azure.net/secrets/mysecretname/secretversion +*/ +@visibility("read", "create") +"uri"?: string; +/** +* Name of secret in workspace key vault. +*/ +@visibility("read", "create") +"workspaceSecretName"?: string; +} + +/** +* Job endpoint definition +*/ +model JobService { +/** +* Url for endpoint. +*/ +@visibility("read", "create") +"endpoint"?: string; +/** +* Any error in the service. +*/ +@visibility("read") +"errorMessage"?: string; +/** +* Endpoint type. +*/ +@visibility("read", "create") +"jobServiceType"?: string; +/** +* Nodes that user would like to start the service on. +If Nodes is not set or set to null, the service will only be started on leader node. +*/ +"nodes"?: Nodes; +/** +* Port for endpoint set by user. +*/ +@visibility("read", "create") +"port"?: int32; +/** +* Additional properties to set on the endpoint. +*/ +"properties"?: Record; +/** +* Status of endpoint. +*/ +@visibility("read") +"status"?: string; +} + +/** +* Abstract Nodes definition +*/ +@discriminator("nodesValueType") +model Nodes { } -@doc("AutoMLJob Task type.") -enum TaskType { - @doc(""" -Classification in machine learning and statistics is a supervised learning approach in which -the computer program learns from the data given to it and make new observations or classifications. -""") - Classification, - @doc("Regression means to predict the value using the input data. Regression models are used to predict a continuous value.") - Regression, - @doc(""" -Forecasting is a special kind of regression task that deals with time-series data and creates forecasting model -that can be used to predict the near future values based on the inputs. -""") - Forecasting, - @doc(""" -Image Classification. Multi-class image classification is used when an image is classified with only a single label -from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. -""") - ImageClassification, - @doc(""" -Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels -from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. -""") - ImageClassificationMultilabel, - @doc(""" -Image Object Detection. Object detection is used to identify objects in an image and locate each object with a -bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. -""") - ImageObjectDetection, - @doc(""" -Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, -drawing a polygon around each object in the image. -""") - ImageInstanceSegmentation, - @doc(""" -Text classification (also known as text tagging or text categorization) is the process of sorting texts into categories. -Categories are mutually exclusive. -""") - TextClassification, - @doc("Multilabel classification task assigns each sample to a group (zero or more) of target labels.") - TextClassificationMultilabel, - @doc(""" -Text Named Entity Recognition a.k.a. TextNER. -Named Entity Recognition (NER) is the ability to take free-form text and identify the occurrences of entities such as people, locations, organizations, and more. -""") - TextNER, +/** +* Azure Resource Manager resource envelope strictly used in update requests. +*/ +model PartialJobBasePartialResource { +/** +* Additional attributes of the entity. +*/ +"properties"?: PartialJobBase; } -@doc("Enum to determine the Job Input Type.") -enum JobInputType { - literal, - uri_file, - uri_folder, - mltable, - custom_model, - mlflow_model, - triton_model, +/** +* Mutable base definition for a job. +*/ +model PartialJobBase { +/** +* Mutable notification setting for the job +*/ +"notificationSetting"?: PartialNotificationSetting; } -@doc("Determines how N-Cross validations value is determined.") -enum NCrossValidationsMode { - @doc("Determine N-Cross validations value automatically. Supported only for 'Forecasting' AutoML task.") - Auto, - @doc("Use custom N-Cross validations value.") Custom, +/** +* Mutable configuration for notification. +*/ +model PartialNotificationSetting { +/** +* Send webhook callback to a service. Key is a user-provided name for the webhook. +*/ +"webhooks"?: Record; } -@doc("Forecasting seasonality mode.") -enum SeasonalityMode { - @doc("Seasonality to be determined automatically.") Auto, - @doc("Use the custom seasonality value.") Custom, +/** +* Labeling job definition +*/ +model LabelingJobProperties extends JobBase { +/** +* Created time of the job in UTC timezone. +*/ +@visibility("read") +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"createdDateTime"?: utcDateTime; +/** +* Configuration of data used in the job. +*/ +@visibility("read", "create") +"dataConfiguration"?: LabelingDataConfiguration; +/** +* Labeling instructions of the job. +*/ +@visibility("read", "create", "update") +"jobInstructions"?: LabelingJobInstructions; +/** +* Label categories of the job. +*/ +@visibility("read", "create", "update") +"labelCategories"?: Record; +/** +* Media type specific properties in the job. +*/ +@visibility("read", "create") +"labelingJobMediaProperties"?: LabelingJobMediaProperties; +/** +* Configuration of MLAssist feature in the job. +*/ +@visibility("read", "create") +"mlAssistConfiguration"?: MLAssistConfiguration; +/** +* Progress metrics of the job. +*/ +@visibility("read") +"progressMetrics"?: ProgressMetrics; +/** +* Internal id of the job(Previously called project). +*/ +@visibility("read") +"projectId"?: string; +/** +* Specifies the labeling job provisioning state. +*/ +@visibility("read") +"provisioningState"?: JobProvisioningState; +/** +* Status messages of the job. +*/ +@visibility("read") +"statusMessages"?: StatusMessage[]; +/** +* [Required] Specifies the type of job. +*/ +"jobType": "Labeling"; +} + +/** +* Labeling data configuration definition +*/ +model LabelingDataConfiguration { +/** +* Resource Id of the data asset to perform labeling. +*/ +@visibility("read", "create") +"dataId"?: string; +/** +* Indicates whether to enable incremental data refresh. +*/ +@visibility("read", "create", "update") +"incrementalDataRefresh"?: IncrementalDataRefresh; +} + +/** +* Instructions for labeling job +*/ +model LabelingJobInstructions { +/** +* The link to a page with detailed labeling instructions for labelers. +*/ +@visibility("read", "create", "update") +"uri"?: string; } -@doc("Target lags selection modes.") -enum TargetLagsMode { - @doc("Target lags to be determined automatically.") Auto, - @doc("Use the custom target lags.") Custom, +/** +* Label category definition +*/ +model LabelCategory { +/** +* Dictionary of label classes in this category. +*/ +@visibility("read", "create", "update") +"classes"?: Record; +/** +* Display name of the label category. +*/ +@visibility("read", "create") +"displayName"?: string; +/** +* Indicates whether it is allowed to select multiple classes in this category. +*/ +@visibility("read", "create", "update") +"multiSelect"?: MultiSelect; +} + +/** +* Label class definition +*/ +model LabelClass { +/** +* Display name of the label class. +*/ +@visibility("read", "create") +"displayName"?: string; +/** +* Dictionary of subclasses of the label class. +*/ +@visibility("read", "create", "update") +"subclasses"?: Record; +} + +/** +* Properties of a labeling job +*/ +@discriminator("mediaType") +model LabelingJobMediaProperties { } -@doc("Target rolling windows size mode.") -enum TargetRollingWindowSizeMode { - @doc("Determine rolling windows size automatically.") Auto, - @doc("Use the specified rolling window size.") Custom, +/** +* Labeling MLAssist configuration definition +*/ +@discriminator("mlAssist") +model MLAssistConfiguration { } -@doc("Enum to determine the state of mlflow autologger.") -enum MLFlowAutologgerState { - Enabled, - Disabled, +/** +* Progress metrics definition +*/ +model ProgressMetrics { +/** +* The completed datapoint count. +*/ +@visibility("read") +"completedDatapointCount"?: int64; +/** +* The time of last successful incremental data refresh in UTC. +*/ +@visibility("read") +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"incrementalDataLastRefreshDateTime"?: utcDateTime; +/** +* The skipped datapoint count. +*/ +@visibility("read") +"skippedDatapointCount"?: int64; +/** +* The total datapoint count. +*/ +@visibility("read") +"totalDatapointCount"?: int64; +} + +/** +* Active message associated with project +*/ +model StatusMessage { +/** +* Service-defined message code. +*/ +@visibility("read") +"code"?: string; +/** +* Time in UTC at which the message was created. +*/ +@visibility("read") +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"createdDateTime"?: utcDateTime; +/** +* Severity level of message. +*/ +@visibility("read") +"level"?: StatusMessageLevel; +/** +* A human-readable representation of the message code. +*/ +@visibility("read") +"message"?: string; } -enum MonitoringAlertNotificationType { - @doc("Settings for Azure Monitor based alerting.") AzureMonitor, - @doc("Settings for AML email notifications.") Email, -} -enum ServiceDataAccessAuthIdentity { - @doc("Do not use any identity for service data access.") None, - @doc("Use the system assigned managed identity of the Workspace to authenticate service data access.") - WorkspaceSystemAssignedIdentity, - @doc("Use the user assigned managed identity of the Workspace to authenticate service data access.") - WorkspaceUserAssignedIdentity, +@discriminator("format") +model ExportSummary { +/** +* The time when the export was completed. +*/ +@visibility("read") +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"endDateTime"?: utcDateTime; +/** +* The total number of labeled datapoints exported. +*/ +@visibility("read") +"exportedRowCount"?: int64; +/** +* Name and identifier of the job containing exported labels. +*/ +@visibility("read") +"labelingJobId"?: string; +/** +* The time when the export was requested. +*/ +@visibility("read") +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"startDateTime"?: utcDateTime; +} + +/** +* Online endpoint configuration +*/ +model OnlineEndpoint extends EndpointPropertiesBase { +/** +* ARM resource ID of the compute if it exists. +optional +*/ +"compute"?: string; +/** +* Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50. +*/ +"mirrorTraffic"?: Record; +/** +* Provisioning state for the endpoint. +*/ +@visibility("read") +"provisioningState"?: EndpointProvisioningState; +/** +* Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. +*/ +"publicNetworkAccess"?: PublicNetworkAccessType; +/** +* Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. +*/ +"traffic"?: Record; } -enum EarlyTerminationPolicyType { - Bandit, - MedianStopping, - TruncationSelection, -} -enum SamplingAlgorithmType { - Grid, - Random, - Bayesian, +@discriminator("endpointComputeType") +model OnlineDeployment extends EndpointDeploymentPropertiesBase { +/** +* If true, enables Application Insights logging. +*/ +"appInsightsEnabled"?: boolean; +/** +* The mdc configuration, we disable mdc when it's null. +*/ +"dataCollector"?: DataCollector; +/** +* If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. +*/ +"egressPublicNetworkAccess"?: EgressPublicNetworkAccessType; +/** +* Compute instance type. +*/ +@visibility("read", "create") +"instanceType"?: string; +/** +* Liveness probe monitors the health of the container regularly. +*/ +"livenessProbe"?: ProbeSettings; +/** +* The URI path to the model. +*/ +"model"?: string; +/** +* The path to mount the model in custom container. +*/ +"modelMountPath"?: string; +/** +* Provisioning state for the endpoint deployment. +*/ +@visibility("read") +"provisioningState"?: DeploymentProvisioningState; +/** +* Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. +*/ +"readinessProbe"?: ProbeSettings; +/** +* Request settings for the deployment. +*/ +"requestSettings"?: OnlineRequestSettings; +/** +* Scale settings for the deployment. +If it is null or not provided, +it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment +and to DefaultScaleSettings for ManagedOnlineDeployment. +*/ +"scaleSettings"?: OnlineScaleSettings; } -enum CategoricalDataDriftMetric { - @doc("The Jensen Shannon Distance (JSD) metric.") JensenShannonDistance, - @doc("The Population Stability Index (PSI) metric.") PopulationStabilityIndex, - @doc("The Pearsons Chi Squared Test metric.") PearsonsChiSquaredTest, -} -enum MonitoringFeatureDataType { - @doc("Used for features of numerical data type.") Numerical, - @doc("Used for features of categorical data type.") Categorical, +model DataCollector { +/** +* [Required] The collection configuration. Each collection has it own configuration to collect model data and the name of collection can be arbitrary string. +Model data collector can be used for either payload logging or custom logging or both of them. Collection request and response are reserved for payload logging, others are for custom logging. +*/ +"collections": Record; +/** +* The request logging configuration for mdc, it includes advanced logging settings for all collections. It's optional. +*/ +"requestLogging"?: RequestLogging; +/** +* When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of them in a single blob file. +If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. +If it's day, all data will be collected in blob path /yyyy/MM/dd/. +The other benefit of rolling path is that model monitoring ui is able to select a time range of data very quickly. +*/ +"rollingRate"?: RollingRateType; } -enum CategoricalDataQualityMetric { - @doc("Calculates the rate of null values.") NullValueRate, - @doc("Calculates the rate of data type errors.") DataTypeErrorRate, - @doc("Calculates the rate values are out of bounds.") OutOfBoundsRate, -} -enum CategoricalPredictionDriftMetric { - @doc("The Jensen Shannon Distance (JSD) metric.") JensenShannonDistance, - @doc("The Population Stability Index (PSI) metric.") PopulationStabilityIndex, - @doc("The Pearsons Chi Squared Test metric.") PearsonsChiSquaredTest, +model Collection { +/** +* The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint identity to auth. +*/ +"clientId"?: string; +/** +* Enable or disable data collection. +*/ +"dataCollectionMode"?: DataCollectionMode; +/** +* The data asset arm resource id. Client side will ensure data asset is pointing to the blob storage, and backend will collect data to the blob storage. +*/ +"dataId"?: string; +/** +* The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. +*/ +"samplingRate"?: float64 = 1; } -@doc("Primary metrics for classification tasks.") -enum ClassificationPrimaryMetrics { - @doc(""" -AUC is the Area under the curve. -This metric represents arithmetic mean of the score for each class, -weighted by the number of true instances in each class. -""") - AUCWeighted, - @doc("Accuracy is the ratio of predictions that exactly match the true class labels.") - Accuracy, - @doc(""" -Normalized macro recall is recall macro-averaged and normalized, so that random -performance has a score of 0, and perfect performance has a score of 1. -""") - NormMacroRecall, - @doc(""" -The arithmetic mean of the average precision score for each class, weighted by -the number of true instances in each class. -""") - AveragePrecisionScoreWeighted, - @doc("The arithmetic mean of precision for each class, weighted by number of true instances in each class.") - PrecisionScoreWeighted, -} -@doc("Enum for all classification models supported by AutoML.") -enum ClassificationModels { - @doc(""" -Logistic regression is a fundamental classification technique. -It belongs to the group of linear classifiers and is somewhat similar to polynomial and linear regression. -Logistic regression is fast and relatively uncomplicated, and it's convenient for you to interpret the results. -Although it's essentially a method for binary classification, it can also be applied to multiclass problems. -""") - LogisticRegression, - @doc(""" -SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications -to find the model parameters that correspond to the best fit between predicted and actual outputs. -""") - SGD, - @doc(""" -The multinomial Naive Bayes classifier is suitable for classification with discrete features (e.g., word counts for text classification). -The multinomial distribution normally requires integer feature counts. However, in practice, fractional counts such as tf-idf may also work. -""") - MultinomialNaiveBayes, - @doc("Naive Bayes classifier for multivariate Bernoulli models.") - BernoulliNaiveBayes, - @doc(""" -A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. -After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. -""") - SVM, - @doc(""" -A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. -After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. -Linear SVM performs best when input data is linear, i.e., data can be easily classified by drawing the straight line between classified values on a plotted graph. -""") - LinearSVM, - @doc(""" -K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints -which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. -""") - KNN, - @doc(""" -Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. -The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. -""") - DecisionTree, - @doc(""" -Random forest is a supervised learning algorithm. -The \"forest\" it builds, is an ensemble of decision trees, usually trained with the bagging method. -The general idea of the bagging method is that a combination of learning models increases the overall result. -""") - RandomForest, - @doc("Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm.") - ExtremeRandomTrees, - @doc("LightGBM is a gradient boosting framework that uses tree based learning algorithms.") - LightGBM, - @doc("The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution.") - GradientBoosting, - @doc("XGBoost: Extreme Gradient Boosting Algorithm. This algorithm is used for structured data where target column values can be divided into distinct class values.") - XGBoostClassifier, -} - -@doc(""" -The meta-learner is a model trained on the output of the individual heterogeneous models. -Default meta-learners are LogisticRegression for classification tasks (or LogisticRegressionCV if cross-validation is enabled) and ElasticNet for regression/forecasting tasks (or ElasticNetCV if cross-validation is enabled). -This parameter can be one of the following strings: LogisticRegression, LogisticRegressionCV, LightGBMClassifier, ElasticNet, ElasticNetCV, LightGBMRegressor, or LinearRegression -""") -enum StackMetaLearnerType { - None, - @doc("Default meta-learners are LogisticRegression for classification tasks.") - LogisticRegression, - @doc("Default meta-learners are LogisticRegression for classification task when CV is on.") - LogisticRegressionCV, - LightGBMClassifier, - @doc("Default meta-learners are LogisticRegression for regression task.") - ElasticNet, - @doc("Default meta-learners are LogisticRegression for regression task when CV is on.") - ElasticNetCV, - LightGBMRegressor, - LinearRegression, -} - -@doc("Training mode dictates whether to use distributed training or not") -enum TrainingMode { - @doc("Auto mode") Auto, - @doc("Distributed training mode") Distributed, - @doc("Non distributed training mode") NonDistributed, -} - -@doc("Enum for all classification models supported by AutoML.") -enum BlockedTransformers { - @doc("Target encoding for text data.") TextTargetEncoder, - @doc("Ohe hot encoding creates a binary feature transformation.") - OneHotEncoder, - @doc("Target encoding for categorical data.") CatTargetEncoder, - @doc("Tf-Idf stands for, term-frequency times inverse document-frequency. This is a common term weighting scheme for identifying information from documents.") - TfIdf, - @doc("Weight of Evidence encoding is a technique used to encode categorical variables. It uses the natural log of the P(1)/P(0) to create weights.") - WoETargetEncoder, - @doc("Label encoder converts labels/categorical variables in a numerical form.") - LabelEncoder, - @doc("Word embedding helps represents words or phrases as a vector, or a series of numbers.") - WordEmbedding, - @doc("Naive Bayes is a classified that is used for classification of discrete features that are categorically distributed.") - NaiveBayes, - @doc("Count Vectorizer converts a collection of text documents to a matrix of token counts.") - CountVectorizer, - @doc("Hashing One Hot Encoder can turn categorical variables into a limited number of new features. This is often used for high-cardinality categorical features.") - HashOneHotEncoder, -} - -@doc("Featurization mode - determines data featurization mode.") -enum FeaturizationMode { - @doc("Auto mode, system performs featurization without any custom featurization inputs.") - Auto, - @doc("Custom featurization.") Custom, - @doc("Featurization off. 'Forecasting' task cannot use this value.") Off, -} - -enum ClassificationModelPerformanceMetric { - @doc("Calculates the accuracy of the model predictions.") Accuracy, - @doc("Calculates the precision of the model predictions.") Precision, - @doc("Calculates the recall of the model predictions.") Recall, -} - -enum MonitoringModelType { - @doc("A model trained for classification tasks.") Classification, - @doc("A model trained for regressions tasks.") Regression, -} - -@doc("Enum to determine the job distribution type.") -enum DistributionType { - PyTorch, - TensorFlow, - Mpi, - Ray, -} - -enum JobLimitsType { - Command, - Sweep, -} - -@doc("Monitor compute type enum.") -enum MonitorComputeType { - @doc("Serverless Spark compute.") ServerlessSpark, -} - -@doc("Model task type enum.") -enum ModelTaskType { - Classification, - Regression, - QuestionAnswering, -} - -enum MonitoringNotificationMode { - @doc("Disabled notifications will not produce emails/metrics leveraged for alerting.") - Disabled, - @doc("Enabled notification will produce emails/metrics leveraged for alerting.") - Enabled, -} - -enum MonitoringSignalType { - @doc("Tracks model input data distribution change, comparing against training data or past production data.") - DataDrift, - @doc("Tracks prediction result data distribution change, comparing against validation/test label data or past production data.") - PredictionDrift, - @doc("Tracks model input data integrity.") DataQuality, - @doc("Tracks feature importance change in production, comparing against feature importance at training time.") - FeatureAttributionDrift, - @doc("Tracks a custom signal provided by users.") Custom, - @doc("Tracks model performance based on ground truth data.") ModelPerformance, - @doc("Tracks the safety and quality of generated content.") - GenerationSafetyQuality, - @doc("Tracks the token usage of generative endpoints.") - GenerationTokenStatistics, -} - -@doc("Monitoring input data type enum.") -enum MonitoringInputDataType { - @doc("An input data with a fixed window size.") Static, - @doc("An input data which trailing relatively to the monitor's current run.") - Trailing, - @doc("An input data with tabular format which doesn't require preprocessing.") - Fixed, -} - -@doc("Enum to determine the type of data.") -enum DataImportSourceType { - database, - file_system, -} - -enum FeatureAttributionMetric { - @doc("The Normalized Discounted Cumulative Gain metric.") - NormalizedDiscountedCumulativeGain, -} - -@doc("Flag for generating lags for the numeric features.") -enum FeatureLags { - @doc("No feature lags generated.") None, - @doc("System auto-generates feature lags.") Auto, +model RequestLogging { +/** +* For payload logging, we only collect payload by default. If customers also want to collect the specified headers, they can set them in captureHeaders so that backend will collect those headers along with payload. +*/ +"captureHeaders"?: string[]; } -@doc("The parameter defining how if AutoML should handle short time series.") -enum ShortSeriesHandlingConfiguration { - @doc("Represents no/null value.") None, - @doc("Short series will be padded if there are no long series, otherwise short series will be dropped.") - Auto, - @doc("All the short series will be padded.") Pad, - @doc("All the short series will be dropped.") Drop, +/** +* Deployment container liveness/readiness probe configuration. +*/ +model ProbeSettings { +/** +* The number of failures to allow before returning an unhealthy status. +*/ +"failureThreshold"?: int32 = 30; +/** +* The delay before the first probe in ISO 8601 format. +*/ +"initialDelay"?: duration; +/** +* The length of time between probes in ISO 8601 format. +*/ +"period"?: duration = duration.PT10S; +/** +* The number of successful probes before returning a healthy status. +*/ +"successThreshold"?: int32 = 1; +/** +* The probe timeout in ISO 8601 format. +*/ +"timeout"?: duration = duration.PT2S; +} + +/** +* Online deployment scoring requests configuration. +*/ +model OnlineRequestSettings { +/** +* The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. +*/ +"maxConcurrentRequestsPerInstance"?: int32 = 1; +/** +* The maximum amount of time a request will stay in the queue in ISO 8601 format. +Defaults to 500ms. +*/ +"maxQueueWait"?: duration = duration.PT0.5S; +/** +* The scoring timeout in ISO 8601 format. +Defaults to 5000ms. +*/ +"requestTimeout"?: duration = duration.PT5S; } -@doc("Target aggregate function.") -enum TargetAggregationFunction { - @doc("Represent no value set.") None, - Sum, - Max, - Min, - Mean, +/** +* Online deployment scaling configuration. +*/ +@discriminator("scaleType") +model OnlineScaleSettings { } -@doc("Configure STL Decomposition of the time-series target column.") -enum UseStl { - @doc("No stl decomposition.") None, - Season, - SeasonTrend, +/** +* Strictly used in update requests. +*/ +model PartialMinimalTrackedResourceWithSku extends PartialMinimalTrackedResource { +/** +* Sku details required for ARM contract for Autoscaling. +*/ +"sku"?: PartialSku; } -@doc("Primary metrics for Forecasting task.") -enum ForecastingPrimaryMetrics { - @doc("The Spearman's rank coefficient of correlation is a non-parametric measure of rank correlation.") - SpearmanCorrelation, - @doc("The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales.") - NormalizedRootMeanSquaredError, - @doc("The R2 score is one of the performance evaluation measures for forecasting-based machine learning models.") - R2Score, - @doc("The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales.") - NormalizedMeanAbsoluteError, +/** +* Common SKU definition. +*/ +model PartialSku { +/** +* If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. +*/ +"capacity"?: int32; +/** +* If the service has different generations of hardware, for the same SKU, then that can be captured here. +*/ +"family"?: string; +/** +* The name of the SKU. Ex - P3. It is typically a letter+number code. +*/ +"name"?: string; +/** +* The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. +*/ +"size"?: string; +/** +* This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. +*/ +"tier"?: SkuTier; } -@doc("Enum for all forecasting models supported by AutoML.") -enum ForecastingModels { - @doc(""" -Auto-Autoregressive Integrated Moving Average (ARIMA) model uses time-series data and statistical analysis to interpret the data and make future predictions. -This model aims to explain data by using time series data on its past values and uses linear regression to make predictions. -""") - AutoArima, - @doc(""" -Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. -It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet is robust to missing data and shifts in the trend, and typically handles outliers well. -""") - Prophet, - @doc("The Naive forecasting model makes predictions by carrying forward the latest target value for each time-series in the training data.") - Naive, - @doc("The Seasonal Naive forecasting model makes predictions by carrying forward the latest season of target values for each time-series in the training data.") - SeasonalNaive, - @doc("The Average forecasting model makes predictions by carrying forward the average of the target values for each time-series in the training data.") - Average, - @doc("The Seasonal Average forecasting model makes predictions by carrying forward the average value of the latest season of data for each time-series in the training data.") - SeasonalAverage, - @doc("Exponential smoothing is a time series forecasting method for univariate data that can be extended to support data with a systematic trend or seasonal component.") - ExponentialSmoothing, - @doc(""" -An Autoregressive Integrated Moving Average with Explanatory Variable (ARIMAX) model can be viewed as a multiple regression model with one or more autoregressive (AR) terms and/or one or more moving average (MA) terms. -This method is suitable for forecasting when data is stationary/non stationary, and multivariate with any type of data pattern, i.e., level/trend /seasonality/cyclicity. -""") - Arimax, - @doc("TCNForecaster: Temporal Convolutional Networks Forecaster. //TODO: Ask forecasting team for brief intro.") - TCNForecaster, - @doc("Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions.") - ElasticNet, - @doc("The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution.") - GradientBoosting, - @doc(""" -Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. -The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. -""") - DecisionTree, - @doc(""" -K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints -which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. -""") - KNN, - @doc("Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer.") - LassoLars, - @doc(""" -SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications -to find the model parameters that correspond to the best fit between predicted and actual outputs. -It's an inexact but powerful technique. -""") - SGD, - @doc(""" -Random forest is a supervised learning algorithm. -The \"forest\" it builds, is an ensemble of decision trees, usually trained with the bagging method. -The general idea of the bagging method is that a combination of learning models increases the overall result. -""") - RandomForest, - @doc("Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm.") - ExtremeRandomTrees, - @doc("LightGBM is a gradient boosting framework that uses tree based learning algorithms.") - LightGBM, - @doc("XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners.") - XGBoostRegressor, -} - -@doc("Generation safety quality metric enum.") -enum GenerationSafetyQualityMetric { - AcceptableGroundednessScorePerInstance, - AggregatedGroundednessPassRate, - AcceptableCoherenceScorePerInstance, - AggregatedCoherencePassRate, - AcceptableFluencyScorePerInstance, - AggregatedFluencyPassRate, - AcceptableSimilarityScorePerInstance, - AggregatedSimilarityPassRate, - AcceptableRelevanceScorePerInstance, - AggregatedRelevancePassRate, -} - -@doc("Generation token statistics metric enum.") -enum GenerationTokenStatisticsMetric { - TotalTokenCount, - TotalTokenCountPerGroup, -} - -@doc("Learning rate scheduler enum.") -enum LearningRateScheduler { - @doc("No learning rate scheduler selected.") None, - @doc("Cosine Annealing With Warmup.") WarmupCosine, - @doc("Step learning rate scheduler.") Step, -} - -@doc("Stochastic optimizer for image models.") -enum StochasticOptimizer { - @doc("No optimizer selected.") None, - @doc("Stochastic Gradient Descent optimizer.") Sgd, - @doc("Adam is algorithm the optimizes stochastic objective functions based on adaptive estimates of moments") - Adam, - @doc("AdamW is a variant of the optimizer Adam that has an improved implementation of weight decay.") - Adamw, -} - -@doc("Primary metrics for classification multilabel tasks.") -enum ClassificationMultilabelPrimaryMetrics { - @doc(""" -AUC is the Area under the curve. -This metric represents arithmetic mean of the score for each class, -weighted by the number of true instances in each class. -""") - AUCWeighted, - @doc("Accuracy is the ratio of predictions that exactly match the true class labels.") - Accuracy, - @doc(""" -Normalized macro recall is recall macro-averaged and normalized, so that random -performance has a score of 0, and perfect performance has a score of 1. -""") - NormMacroRecall, - @doc(""" -The arithmetic mean of the average precision score for each class, weighted by -the number of true instances in each class. -""") - AveragePrecisionScoreWeighted, - @doc("The arithmetic mean of precision for each class, weighted by number of true instances in each class.") - PrecisionScoreWeighted, - @doc("Intersection Over Union. Intersection of predictions divided by union of predictions.") - IOU, -} - -@doc("Primary metrics for InstanceSegmentation tasks.") -enum InstanceSegmentationPrimaryMetrics { - @doc(""" -Mean Average Precision (MAP) is the average of AP (Average Precision). -AP is calculated for each class and averaged to get the MAP. -""") - MeanAveragePrecision, -} -enum LogTrainingMetrics { - @doc("Enable compute and log training metrics.") Enable, - @doc("Disable compute and log training metrics.") Disable, +model DeploymentLogsRequest { +/** +* The type of container to retrieve logs from. +*/ +"containerType"?: ContainerType; +/** +* The maximum number of lines to tail. +*/ +"tail"?: int32; } -enum LogValidationLoss { - @doc("Enable compute and log validation metrics.") Enable, - @doc("Disable compute and log validation metrics.") Disable, -} -@doc("Image model size.") -enum ModelSize { - @doc("No value selected.") None, - @doc("Small size.") Small, - @doc("Medium size.") Medium, - @doc("Large size.") Large, - @doc("Extra large size.") ExtraLarge, +model DeploymentLogs { +/** +* The retrieved online deployment logs. +*/ +"content"?: string; } -@doc("Metric computation method to use for validation metrics in image tasks.") -enum ValidationMetricType { - @doc("No metric.") None, - @doc("Coco metric.") Coco, - @doc("Voc metric.") Voc, - @doc("CocoVoc metric.") CocoVoc, +/** +* A paginated list of SkuResource entities. +*/ +model SkuResourceArmPaginatedResult is Azure.Core.Page { } -@doc("Primary metrics for Image ObjectDetection task.") -enum ObjectDetectionPrimaryMetrics { - @doc(""" -Mean Average Precision (MAP) is the average of AP (Average Precision). -AP is calculated for each class and averaged to get the MAP. -""") - MeanAveragePrecision, +/** +* Fulfills ARM Contract requirement to list all available SKUS for a resource. +*/ +model SkuResource { +/** +* Gets or sets the Sku Capacity. +*/ +"capacity"?: SkuCapacity; +/** +* The resource type name. +*/ +@visibility("read") +"resourceType"?: string; +/** +* Gets or sets the Sku. +*/ +"sku"?: SkuSetting; +} + +/** +* SKU capacity information +*/ +model SkuCapacity { +/** +* Gets or sets the default capacity. +*/ +"default"?: int32; +/** +* Gets or sets the maximum. +*/ +"maximum"?: int32; +/** +* Gets or sets the minimum. +*/ +"minimum"?: int32; +/** +* Gets or sets the type of the scale. +*/ +"scaleType"?: SkuScaleType; +} + +/** +* SkuSetting fulfills the need for stripped down SKU info in ARM contract. +*/ +model SkuSetting { +/** +* [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. +*/ +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"name": string; +/** +* This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. +*/ +"tier"?: SkuTier; } -@doc("Annotation type of image data.") -enum ImageAnnotationType { - Classification, - BoundingBox, - InstanceSegmentation, -} -@doc("Annotation type of text data.") -enum TextAnnotationType { - Classification, - NamedEntityRecognition, +model RegenerateEndpointKeysRequest { +/** +* [Required] Specification for which type of key to generate. Primary or Secondary. +*/ +"keyType": KeyType; +/** +* The value the key is set to. +*/ +"keyValue"?: string; +} + +/** +* Service Token +*/ +model EndpointAuthToken { +/** +* Access token for endpoint authentication. +*/ +"accessToken"?: string; +/** +* Access token expiry time (UTC). +*/ +"expiryTimeUtc"?: plainTime; +/** +* Refresh access token after time (UTC). +*/ +"refreshAfterTimeUtc"?: plainTime; +/** +* Access token type. +*/ +"tokenType"?: string; +} + +/** +* Base definition of a schedule +*/ +model ScheduleProperties extends ResourceBase { +/** +* [Required] Specifies the action of the schedule +*/ +@visibility("read", "create", "update") +"action": ScheduleActionBase; +/** +* Display name of schedule. +*/ +@visibility("read", "create") +"displayName"?: string; +/** +* Is the schedule enabled? +*/ +@visibility("read", "create", "update") +"isEnabled"?: boolean = true; +/** +* Provisioning state for the schedule. +*/ +@visibility("read") +"provisioningState"?: ScheduleProvisioningStatus; +/** +* [Required] Specifies the trigger details +*/ +@visibility("read", "create", "update") +"trigger": TriggerBase; } -@doc("Enum to determine OneLake artifact type.") -enum OneLakeArtifactType { - LakeHouse, + +@discriminator("actionType") +model ScheduleActionBase { } -@doc("Enum of learning rate schedulers that aligns with those supported by HF") -enum NlpLearningRateScheduler { - @doc("No learning rate schedule.") None, - @doc("Linear warmup and decay.") Linear, - @doc("Linear warmup then cosine decay.") Cosine, - @doc("Linear warmup, cosine decay, then restart to initial LR.") - CosineWithRestarts, - @doc("Increase linearly then polynomially decay.") Polynomial, - @doc("Constant learning rate.") Constant, - @doc("Linear warmup followed by constant value.") ConstantWithWarmup, +/** +* Details of the Registry +*/ +model RegistryProperties { +/** +* Discovery URL for the Registry +*/ +"discoveryUrl"?: string; +/** +* IntellectualPropertyPublisher for the registry +*/ +"intellectualPropertyPublisher"?: string; +/** +* ResourceId of the managed RG if the registry has system created resources +*/ +"managedResourceGroup"?: ArmResourceId; +/** +* MLFlow Registry URI for the Registry +*/ +"mlFlowRegistryUri"?: string; +/** +* Private endpoint connections info used for pending connections in private link portal +*/ +"privateEndpointConnections"?: RegistryPrivateEndpointConnection[]; +/** +* Is the Registry accessible from the internet? +Possible values: "Enabled" or "Disabled" +*/ +"publicNetworkAccess"?: string; +/** +* Details of each region the registry is in +*/ +"regionDetails"?: RegistryRegionArmDetails[]; +} + +/** +* ARM ResourceId of a resource +*/ +model ArmResourceId { +/** +* Arm ResourceId is in the format "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" +or "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" +*/ +"resourceId"?: string; } -enum NumericalDataDriftMetric { - @doc("The Jensen Shannon Distance (JSD) metric.") JensenShannonDistance, - @doc("The Population Stability Index (PSI) metric.") PopulationStabilityIndex, - @doc("The Normalized Wasserstein Distance metric.") - NormalizedWassersteinDistance, - @doc("The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric.") - TwoSampleKolmogorovSmirnovTest, +/** +* Private endpoint connection definition. +*/ +model RegistryPrivateEndpointConnection { +/** +* This is the private endpoint connection name created on SRP +Full resource id: /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.MachineLearningServices/{resourceType}/{resourceName}/privateEndpointConnections/{peConnectionName} +*/ +"id"?: string; +/** +* Same as workspace location. +*/ +@visibility("read", "create") +"location"?: string; +/** +* Properties of the Private Endpoint Connection +*/ +"properties"?: RegistryPrivateEndpointConnectionProperties; +} + +/** +* Properties of the Private Endpoint Connection +*/ +model RegistryPrivateEndpointConnectionProperties { +/** +* The group ids +*/ +"groupIds"?: string[]; +/** +* The PE network resource that is linked to this PE connection. +*/ +"privateEndpoint"?: PrivateEndpointResource; +/** +* The connection state. +*/ +"privateLinkServiceConnectionState"?: RegistryPrivateLinkServiceConnectionState; +/** +* One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's null. +*/ +"provisioningState"?: string; +} + +/** +* The PE network resource that is linked to this PE connection. +*/ +model PrivateEndpointResource extends PrivateEndpoint { +/** +* The subnetId that the private endpoint is connected to. +*/ +"subnetArmId"?: string; } -enum NumericalDataQualityMetric { - @doc("Calculates the rate of null values.") NullValueRate, - @doc("Calculates the rate of data type errors.") DataTypeErrorRate, - @doc("Calculates the rate values are out of bounds.") OutOfBoundsRate, +/** +* The Private Endpoint resource. +*/ +model PrivateEndpoint { +/** +* The ARM identifier for Private Endpoint +*/ +@visibility("read") +"id"?: string; } -enum NumericalPredictionDriftMetric { - @doc("The Jensen Shannon Distance (JSD) metric.") JensenShannonDistance, - @doc("The Population Stability Index (PSI) metric.") PopulationStabilityIndex, - @doc("The Normalized Wasserstein Distance metric.") - NormalizedWassersteinDistance, - @doc("The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric.") - TwoSampleKolmogorovSmirnovTest, +/** +* The connection state. +*/ +model RegistryPrivateLinkServiceConnectionState { +/** +* Some RP chose "None". Other RPs use this for region expansion. +*/ +"actionsRequired"?: string; +/** +* User-defined message that, per NRP doc, may be used for approval-related message. +*/ +"description"?: string; +/** +* Connection status of the service consumer with the service provider +*/ +"status"?: EndpointServiceConnectionStatus; +} + +/** +* Details for each region the registry is in +*/ +model RegistryRegionArmDetails { +/** +* List of ACR accounts +*/ +"acrDetails"?: AcrDetails[]; +/** +* The location where the registry exists +*/ +"location"?: string; +/** +* List of storage accounts +*/ +"storageAccountDetails"?: StorageAccountDetails[]; +} + +/** +* Details of ACR account to be used for the Registry +*/ +model AcrDetails { +/** +* Details of system created ACR account to be used for the Registry +*/ +"systemCreatedAcrAccount"?: SystemCreatedAcrAccount; +/** +* Details of user created ACR account to be used for the Registry. Not supported in most cases and will throw 400 error if provided. +*/ +"userCreatedAcrAccount"?: UserCreatedAcrAccount; } -@doc("Defines supported metric goals for hyperparameter tuning") -enum Goal { - Minimize, - Maximize, + +model SystemCreatedAcrAccount { +/** +* Name of the ACR account +*/ +"acrAccountName"?: string; +/** +* SKU of the ACR account +*/ +"acrAccountSku"?: string; +/** +* This is populated once the ACR account is created. +*/ +"armResourceId"?: ArmResourceId; } -@doc("The specific type of random algorithm") -enum RandomSamplingAlgorithmRule { - Random, - Sobol, + +model UserCreatedAcrAccount { +/** +* ARM ResourceId of a resource +*/ +"armResourceId"?: ArmResourceId; } -@doc("Primary metrics for Regression task.") -enum RegressionPrimaryMetrics { - @doc("The Spearman's rank coefficient of correlation is a nonparametric measure of rank correlation.") - SpearmanCorrelation, - @doc("The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales.") - NormalizedRootMeanSquaredError, - @doc("The R2 score is one of the performance evaluation measures for forecasting-based machine learning models.") - R2Score, - @doc("The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales.") - NormalizedMeanAbsoluteError, +/** +* Details of storage account to be used for the Registry +*/ +model StorageAccountDetails { +/** +* Details of system created storage account to be used for the registry +*/ +"systemCreatedStorageAccount"?: SystemCreatedStorageAccount; +/** +* Details of user created storage account to be used for the registry. Not supported in most cases and will throw 400 error if provided. +*/ +"userCreatedStorageAccount"?: UserCreatedStorageAccount; } -@doc("Enum for all Regression models supported by AutoML.") -enum RegressionModels { - @doc("Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions.") - ElasticNet, - @doc("The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution.") - GradientBoosting, - @doc(""" -Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. -The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. -""") - DecisionTree, - @doc(""" -K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints -which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. -""") - KNN, - @doc("Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer.") - LassoLars, - @doc(""" -SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications -to find the model parameters that correspond to the best fit between predicted and actual outputs. -It's an inexact but powerful technique. -""") - SGD, - @doc(""" -Random forest is a supervised learning algorithm. -The \"forest\" it builds, is an ensemble of decision trees, usually trained with the bagging method. -The general idea of the bagging method is that a combination of learning models increases the overall result. -""") - RandomForest, - @doc("Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm.") - ExtremeRandomTrees, - @doc("LightGBM is a gradient boosting framework that uses tree based learning algorithms.") - LightGBM, - @doc("XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners.") - XGBoostRegressor, + +model SystemCreatedStorageAccount { +/** +* Public blob access allowed +*/ +"allowBlobPublicAccess"?: boolean; +/** +* This is populated once the storage account is created. +*/ +"armResourceId"?: ArmResourceId; +/** +* HNS enabled for storage account +*/ +"storageAccountHnsEnabled"?: boolean; +/** +* Name of the storage account +*/ +"storageAccountName"?: string; +/** +* Allowed values: +"Standard_LRS", +"Standard_GRS", +"Standard_RAGRS", +"Standard_ZRS", +"Standard_GZRS", +"Standard_RAGZRS", +"Premium_LRS", +"Premium_ZRS" +*/ +"storageAccountType"?: string; } -enum RegressionModelPerformanceMetric { - @doc("The Mean Absolute Error (MAE) metric.") MeanAbsoluteError, - @doc("The Root Mean Squared Error (RMSE) metric.") RootMeanSquaredError, - @doc("The Mean Squared Error (MSE) metric.") MeanSquaredError, + +model UserCreatedStorageAccount { +/** +* ARM ResourceId of a resource +*/ +"armResourceId"?: ArmResourceId; } -enum SparkJobEntryType { - SparkJobPythonEntry, - SparkJobScalaEntry, +/** +* Strictly used in update requests. +*/ +model PartialRegistryPartialTrackedResource { +/** +* Managed service identity (system assigned and/or user assigned identities) +*/ +"identity"?: RegistryPartialManagedServiceIdentity; +/** +* Sku details required for ARM contract for Autoscaling. +*/ +"sku"?: PartialSku; +/** +* Resource tags. +*/ +"tags"?: Record; +} + +/** +* Managed service identity (system assigned and/or user assigned identities) +*/ +model RegistryPartialManagedServiceIdentity extends ManagedServiceIdentity { +} + +/** +* The List Aml user feature operation response. +*/ +model ListAmlUserFeatureResult is Azure.Core.Page { +} + +/** +* Features enabled for a workspace +*/ +model AmlUserFeature { +/** +* Specifies the feature ID +*/ +"id"?: string; +/** +* Specifies the feature name +*/ +"displayName"?: string; +/** +* Describes the feature for user experience +*/ +"description"?: string; +} + +/** +* Azure Machine Learning team account REST API operation +*/ +model AmlOperation { +/** +* Gets or sets display name of operation +*/ +"display"?: OperationDisplay; +/** +* Indicates whether the operation applies to data-plane +*/ +"isDataAction"?: boolean; +/** +* Gets or sets operation name: {provider}/{resource}/{operation} +*/ +"name"?: string; +/** +* The intended executor of the operation: user/system +*/ +"origin"?: string; +} + +/** +* The properties of a machine learning workspace. +*/ +model WorkspaceProperties { +/** +* The flag to indicate whether to allow public access when behind VNet. +*/ +"allowPublicAccessWhenBehindVnet"?: boolean; +/** +* ARM id of the application insights associated with this workspace. +*/ +"applicationInsights"?: string; +"associatedWorkspaces"?: string[]; +"containerRegistries"?: string[]; +/** +* ARM id of the container registry associated with this workspace. +*/ +"containerRegistry"?: string; +/** +* The description of this workspace. +*/ +"description"?: string; +/** +* Url for the discovery service to identify regional endpoints for machine learning experimentation services +*/ +"discoveryUrl"?: string; +"enableDataIsolation"?: boolean; +"encryption"?: EncryptionProperty; +"existingWorkspaces"?: string[]; +/** +* Settings for feature store type workspace. +*/ +"featureStoreSettings"?: FeatureStoreSettings; +/** +* The friendly name for this workspace. This name in mutable +*/ +"friendlyName"?: string; +/** +* The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service +*/ +"hbiWorkspace"?: boolean; +"hubResourceId"?: string; +/** +* The compute name for image build +*/ +"imageBuildCompute"?: string; +/** +* ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created +*/ +"keyVault"?: string; +"keyVaults"?: string[]; +/** +* Managed Network settings for a machine learning workspace. +*/ +"managedNetwork"?: ManagedNetworkSettings; +/** +* The URI associated with this workspace that machine learning flow must point at to set up tracking. +*/ +@visibility("read") +"mlFlowTrackingUri"?: string; +/** +* The notebook info of Azure ML workspace. +*/ +@visibility("read") +"notebookInfo"?: NotebookResourceInfo; +/** +* The user assigned identity resource id that represents the workspace identity. +*/ +"primaryUserAssignedIdentity"?: string; +/** +* The list of private endpoint connections in the workspace. +*/ +@visibility("read") +"privateEndpointConnections"?: PrivateEndpointConnection[]; +/** +* Count of private connections in the workspace +*/ +@visibility("read") +"privateLinkCount"?: int32; +/** +* The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. +*/ +@visibility("read") +"provisioningState"?: ProvisioningState; +/** +* Whether requests from Public Network are allowed. +*/ +"publicNetworkAccess"?: PublicNetworkAccessType; +/** +* The service managed resource settings. +*/ +"serviceManagedResourcesSettings"?: ServiceManagedResourcesSettings; +/** +* The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace +*/ +@visibility("read") +"serviceProvisionedResourceGroup"?: string; +/** +* The list of shared private link resources in this workspace. +*/ +"sharedPrivateLinkResources"?: SharedPrivateLinkResource[]; +/** +* Retention time in days after workspace get soft deleted. +*/ +"softDeleteRetentionInDays"?: int32; +/** +* ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created +*/ +"storageAccount"?: string; +"storageAccounts"?: string[]; +/** +* If the storage associated with the workspace has hierarchical namespace(HNS) enabled. +*/ +@visibility("read") +"storageHnsEnabled"?: boolean; +/** +* The auth mode used for accessing the system datastores of the workspace. +*/ +"systemDatastoresAuthMode"?: string; +/** +* The tenant id associated with this workspace. +*/ +@visibility("read") +"tenantId"?: string; +/** +* Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. +*/ +"v1LegacyMode"?: boolean; +/** +* WorkspaceHub's configuration object. +*/ +"workspaceHubConfig"?: WorkspaceHubConfig; +/** +* The immutable id associated with this workspace. +*/ +@visibility("read") +"workspaceId"?: string; } -@doc("The action enum for networking rule.") -enum RuleAction { - Allow, - Deny, + +model EncryptionProperty { +/** +* The byok cosmosdb account that customer brings to store customer's data +with encryption +*/ +"cosmosDbResourceId"?: string; +/** +* Identity to be used with the keyVault +*/ +"identity"?: IdentityForCmk; +/** +* KeyVault details to do the encryption +*/ +"keyVaultProperties": KeyVaultProperties; +/** +* The byok search account that customer brings to store customer's data +with encryption +*/ +"searchAccountResourceId"?: string; +/** +* Indicates whether or not the encryption is enabled for the workspace. +*/ +"status": EncryptionStatus; +/** +* The byok storage account that customer brings to store customer's data +with encryption +*/ +"storageAccountResourceId"?: string; } -@doc("This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.") -@fixed -enum SkuTier { - Free, - Basic, - Standard, - Premium, +/** +* Identity object used for encryption. +*/ +model IdentityForCmk { +/** +* UserAssignedIdentity to be used to fetch the encryption key from keyVault +*/ +"userAssignedIdentity"?: string; } -@doc("The List Usages operation response.") -model ListUsagesResult is Azure.Core.Page; +/** +* Customer Key vault properties. +*/ +model KeyVaultProperties { +/** +* Currently, we support only SystemAssigned MSI. +We need this when we support UserAssignedIdentities +*/ +"identityClientId"?: string; +/** +* KeyVault key identifier to encrypt the data +*/ +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"keyIdentifier": string; +/** +* KeyVault Arm Id that contains the data encryption key +*/ +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"keyVaultArmId": string; +} -@doc("Describes AML Resource Usage.") -model Usage { - @doc("Specifies the resource ID.") - @visibility("read") - id?: string; - @doc("Region of the AML workspace in the id.") - @visibility("read") - amlWorkspaceLocation?: string; +model FeatureStoreSettings { +"computeRuntime"?: ComputeRuntimeDto; +"offlineStoreConnectionName"?: string; +"onlineStoreConnectionName"?: string; +} - @doc("Specifies the resource type.") - @visibility("read") - type?: string; - @doc("An enum describing the unit of usage measurement.") - @visibility("read") - unit?: UsageUnit; +model ComputeRuntimeDto { +"sparkRuntimeVersion"?: string; +} - @doc("The current usage of the resource.") - @visibility("read") - currentValue?: int32; +/** +* Managed Network settings for a machine learning workspace. +*/ +model ManagedNetworkSettings { +/** +* Isolation mode for the managed network of a machine learning workspace. +*/ +"isolationMode"?: IsolationMode; +@visibility("read") +"networkId"?: string; +/** +* Dictionary of +*/ +"outboundRules"?: Record; +/** +* Status of the Provisioning for the managed network of a machine learning workspace. +*/ +"status"?: ManagedNetworkProvisionStatus; +} + +/** +* Outbound Rule for the managed network of a machine learning workspace. +*/ +@discriminator("type") +model OutboundRule { +/** +* Category of a managed network Outbound Rule of a machine learning workspace. +*/ +"category"?: RuleCategory; +/** +* Type of a managed network Outbound Rule of a machine learning workspace. +*/ +"status"?: RuleStatus; +} + +/** +* Status of the Provisioning for the managed network of a machine learning workspace. +*/ +model ManagedNetworkProvisionStatus { +"sparkReady"?: boolean; +/** +* Status for the managed network of a machine learning workspace. +*/ +"status"?: ManagedNetworkStatus; +} - @doc("The maximum permitted usage of the resource.") - @visibility("read") - limit?: int32; - @doc("The name of the type of usage.") - @visibility("read") - name?: UsageName; +model NotebookResourceInfo { +"fqdn"?: string; +"isPrivateLinkEnabled"?: boolean; +/** +* The error that occurs when preparing notebook. +*/ +"notebookPreparationError"?: NotebookPreparationError; +/** +* the data plane resourceId that used to initialize notebook component +*/ +"resourceId"?: string; } -@doc("The Usage Names.") -model UsageName { - @doc("The name of the resource.") - @visibility("read") - value?: string; - @doc("The localized name of the resource.") - @visibility("read") - localizedValue?: string; +model NotebookPreparationError { +"errorMessage"?: string; +"statusCode"?: int32; } -@doc("The List Virtual Machine size operation response.") -model VirtualMachineSizeListResult { - @doc("The list of virtual machine sizes supported by AmlCompute.") - value?: VirtualMachineSize[]; +/** +* Private endpoint connection properties. +*/ +model PrivateEndpointConnectionProperties { +/** +* The Private Endpoint resource. +*/ +"privateEndpoint"?: WorkspacePrivateEndpointResource; +/** +* The connection state. +*/ +"privateLinkServiceConnectionState"?: PrivateLinkServiceConnectionState; +/** +* The current provisioning state. +*/ +@visibility("read") +"provisioningState"?: PrivateEndpointConnectionProvisioningState; +} + +/** +* The Private Endpoint resource. +*/ +model WorkspacePrivateEndpointResource { +/** +* e.g. /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName} +*/ +@visibility("read") +"id"?: string; +/** +* The subnetId that the private endpoint is connected to. +*/ +@visibility("read") +"subnetArmId"?: string; +} + +/** +* A collection of information about the state of the connection between service consumer and provider. +*/ +model PrivateLinkServiceConnectionState { +/** +* Some RP chose "None". Other RPs use this for region expansion. +*/ +"actionsRequired"?: string; +/** +* User-defined message that, per NRP doc, may be used for approval-related message. +*/ +"description"?: string; +/** +* Connection status of the service consumer with the service provider +*/ +"status"?: EndpointServiceConnectionStatus; } -@doc("Describes the properties of a VM size.") -model VirtualMachineSize { - @doc("The name of the virtual machine size.") - @visibility("read") - name?: string; - @doc("The family name of the virtual machine size.") - @visibility("read") - family?: string; +model ServiceManagedResourcesSettings { +"cosmosDb"?: CosmosDbSettings; +} - @doc("The number of vCPUs supported by the virtual machine size.") - @visibility("read") - vCPUs?: int32; - @doc("The number of gPUs supported by the virtual machine size.") - @visibility("read") - gpus?: int32; +model CosmosDbSettings { +"collectionsThroughput"?: int32; +} - @doc("The OS VHD disk size, in MB, allowed by the virtual machine size.") - @visibility("read") - osVhdSizeMB?: int32; - @doc("The resource volume size, in MB, allowed by the virtual machine size.") - @visibility("read") - maxResourceVolumeMB?: int32; +model SharedPrivateLinkResource { +/** +* Unique name of the private link +*/ +"name"?: string; +/** +* Properties of a shared private link resource. +*/ +"properties"?: SharedPrivateLinkResourceProperty; +} + +/** +* Properties of a shared private link resource. +*/ +model SharedPrivateLinkResourceProperty { +/** +* group id of the private link +*/ +"groupId"?: string; +/** +* the resource id that private link links to +*/ +"privateLinkResourceId"?: string; +/** +* Request message +*/ +"requestMessage"?: string; +/** +* Connection status of the service consumer with the service provider +*/ +"status"?: EndpointServiceConnectionStatus; +} + +/** +* WorkspaceHub's configuration object. +*/ +model WorkspaceHubConfig { +"additionalWorkspaceStorageAccounts"?: string[]; +"defaultWorkspaceResourceGroup"?: string; +} - @doc("The amount of memory, in GB, supported by the virtual machine size.") - @visibility("read") - memoryGB?: float32; +/** +* The parameters for updating a machine learning workspace. +*/ +model WorkspaceUpdateParameters { +/** +* Managed service identity (system assigned and/or user assigned identities) +*/ +"identity"?: ManagedServiceIdentity; +/** +* The properties that the machine learning workspace will be updated with. +*/ +"properties"?: WorkspacePropertiesUpdateParameters; +/** +* Optional. This field is required to be implemented by the RP because AML is supporting more than one tier +*/ +"sku"?: Sku; +/** +* The resource tags for the machine learning workspace. +*/ +"tags"?: Record; +} + +/** +* The parameters for updating a machine learning workspace. +*/ +model WorkspacePropertiesUpdateParameters { +/** +* ARM id of the application insights associated with this workspace. +*/ +"applicationInsights"?: string; +/** +* ARM id of the container registry associated with this workspace. +*/ +"containerRegistry"?: string; +/** +* The description of this workspace. +*/ +"description"?: string; +"enableDataIsolation"?: boolean; +"encryption"?: EncryptionUpdateProperties; +/** +* Settings for feature store type workspace. +*/ +"featureStoreSettings"?: FeatureStoreSettings; +/** +* The friendly name for this workspace. This name in mutable +*/ +"friendlyName"?: string; +/** +* The compute name for image build +*/ +"imageBuildCompute"?: string; +/** +* Managed Network settings for a machine learning workspace. +*/ +"managedNetwork"?: ManagedNetworkSettings; +/** +* The user assigned identity resource id that represents the workspace identity. +*/ +"primaryUserAssignedIdentity"?: string; +/** +* Whether requests from Public Network are allowed. +*/ +"publicNetworkAccess"?: PublicNetworkAccessType; +/** +* The service managed resource settings. +*/ +"serviceManagedResourcesSettings"?: ServiceManagedResourcesSettings; +/** +* Retention time in days after workspace get soft deleted. +*/ +"softDeleteRetentionInDays"?: int32; +/** +* Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. +*/ +"v1LegacyMode"?: boolean; +} - @doc("Specifies if the virtual machine size supports low priority VMs.") - @visibility("read") - lowPriorityCapable?: boolean; - @doc("Specifies if the virtual machine size supports premium IO.") - @visibility("read") - premiumIO?: boolean; +model EncryptionUpdateProperties { +"keyVaultProperties": EncryptionKeyVaultUpdateProperties; +} - @doc("The estimated price information for using a VM.") - estimatedVMPrices?: EstimatedVMPrices; - @doc("Specifies the compute types supported by the virtual machine size.") - supportedComputeTypes?: string[]; +model EncryptionKeyVaultUpdateProperties { +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"keyIdentifier": string; } -@doc("The estimated price info for using a VM.") -model EstimatedVMPrices { - @doc("Three lettered code specifying the currency of the VM price. Example: USD") - billingCurrency: BillingCurrency; - - @doc("The unit of time measurement for the specified VM price. Example: OneHour") - unitOfMeasure: UnitOfMeasure; - @doc("The list of estimated prices for using a VM of a particular OS type, tier, etc.") - values: EstimatedVMPrice[]; +@discriminator("authType") +model WorkspaceConnectionPropertiesV2 { +/** +* Category of the connection +*/ +"category"?: ConnectionCategory; +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"expiryTime"?: utcDateTime; +/** +* Any object +*/ +"metadata"?: Record; +"target"?: string; +} + +/** +* The properties that the machine learning workspace connection will be updated with. +*/ +model WorkspaceConnectionUpdateParameter { +/** +* The properties that the machine learning workspace connection will be updated with. +*/ +"properties"?: WorkspaceConnectionPropertiesV2; } -@doc("The estimated price info for using a VM of a particular OS type, tier, etc.") -model EstimatedVMPrice { - @doc("The price charged for using the VM.") - retailPrice: float32; +/** +* Parameters to diagnose a workspace +*/ +model DiagnoseWorkspaceParameters { +"value"?: DiagnoseRequestProperties; +} - @doc("Operating system type used by the VM.") - osType: VMPriceOSType; - @doc("The type of the VM.") - vmTier: VMTier; +model DiagnoseRequestProperties { +/** +* Setting for diagnosing dependent application insights +*/ +"applicationInsights"?: Record; +/** +* Setting for diagnosing dependent container registry +*/ +"containerRegistry"?: Record; +/** +* Setting for diagnosing dns resolution +*/ +"dnsResolution"?: Record; +/** +* Setting for diagnosing dependent key vault +*/ +"keyVault"?: Record; +/** +* Setting for diagnosing network security group +*/ +"nsg"?: Record; +/** +* Setting for diagnosing unclassified category of problems +*/ +"others"?: Record; +/** +* Setting for diagnosing resource lock +*/ +"resourceLock"?: Record; +/** +* Setting for diagnosing dependent storage account +*/ +"storageAccount"?: Record; +/** +* Setting for diagnosing user defined routing +*/ +"udr"?: Record; } -@doc("Quota update parameters.") -model QuotaUpdateParameters { - @doc("The list for update quota.") - value?: QuotaBaseProperties[]; - @doc("Region of workspace quota to be updated.") - location?: string; +model DiagnoseResponseResult { +"value"?: DiagnoseResponseResultValue; } -@doc("The properties for Quota update or retrieval.") -model QuotaBaseProperties { - @doc("Specifies the resource ID.") - id?: string; - @doc("Specifies the resource type.") - type?: string; +model DiagnoseResponseResultValue { +"userDefinedRouteResults"?: DiagnoseResult[]; +"networkSecurityRuleResults"?: DiagnoseResult[]; +"resourceLockResults"?: DiagnoseResult[]; +"dnsResolutionResults"?: DiagnoseResult[]; +"storageAccountResults"?: DiagnoseResult[]; +"keyVaultResults"?: DiagnoseResult[]; +"containerRegistryResults"?: DiagnoseResult[]; +"applicationInsightsResults"?: DiagnoseResult[]; +"otherResults"?: DiagnoseResult[]; +} + +/** +* Result of Diagnose +*/ +model DiagnoseResult { +/** +* Code for workspace setup error +*/ +@visibility("read") +"code"?: string; +/** +* Level of workspace setup error +*/ +@visibility("read") +"level"?: DiagnoseResultLevel; +/** +* Message of workspace setup error +*/ +@visibility("read") +"message"?: string; +} - @doc("The maximum permitted quota of the resource.") - limit?: int32; - @doc("An enum describing the unit of quota measurement.") - unit?: QuotaUnit; +model ListWorkspaceKeysResult { +/** +* The access key of the workspace app insights +*/ +@visibility("read") +"appInsightsInstrumentationKey"?: string; +"containerRegistryCredentials"?: RegistryListCredentialsResult; +"notebookAccessKeys"?: ListNotebookKeysResult; +/** +* The arm Id key of the workspace storage +*/ +@visibility("read") +"userStorageArmId"?: string; +/** +* The access key of the workspace storage +*/ +@visibility("read") +"userStorageKey"?: string; } -@doc("The result of update workspace quota.") -model UpdateWorkspaceQuotasResult { - @doc("The list of workspace quota update result.") - @visibility("read") - value?: UpdateWorkspaceQuotas[]; - @doc("The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page of Workspace Quota update result.") - @visibility("read") - nextLink?: string; +model RegistryListCredentialsResult { +/** +* The location of the workspace ACR +*/ +@visibility("read") +"location"?: string; +"passwords"?: Password[]; +/** +* The username of the workspace ACR +*/ +@visibility("read") +"username"?: string; } -@doc("The properties for update Quota response.") -model UpdateWorkspaceQuotas { - @doc("Specifies the resource ID.") - @visibility("read") - id?: string; - - @doc("Specifies the resource type.") - @visibility("read") - type?: string; - @doc("The maximum permitted quota of the resource.") - limit?: int32; +model Password { +@visibility("read") +"name"?: string; +@visibility("read") +"value"?: string; +} - @doc("An enum describing the unit of quota measurement.") - @visibility("read") - unit?: QuotaUnit; - @doc("Status of update workspace quota.") - status?: Status; +model ListNotebookKeysResult { +/** +* The primary access key of the Notebook +*/ +@visibility("read") +"primaryAccessKey"?: string; +/** +* The secondary access key of the Notebook +*/ +@visibility("read") +"secondaryAccessKey"?: string; } -@doc("The List WorkspaceQuotasByVMFamily operation response.") -model ListWorkspaceQuotas is Azure.Core.Page; -@doc("The quota assigned to a resource.") -model ResourceQuota { - @doc("Specifies the resource ID.") - @visibility("read") - id?: string; +model NotebookAccessTokenResult { +@visibility("read") +"accessToken"?: string; +@visibility("read") +"expiresIn"?: int32; +@visibility("read") +"hostName"?: string; +@visibility("read") +"notebookResourceId"?: string; +@visibility("read") +"publicDns"?: string; +@visibility("read") +"refreshToken"?: string; +@visibility("read") +"scope"?: string; +@visibility("read") +"tokenType"?: string; +} - @doc("Region of the AML workspace in the id.") - @visibility("read") - amlWorkspaceLocation?: string; - @doc("Specifies the resource type.") - @visibility("read") - type?: string; +model ListStorageAccountKeysResult { +/** +* The access key of the storage +*/ +@visibility("read") +"userStorageKey"?: string; +} - @doc("Name of the resource.") - @visibility("read") - name?: ResourceName; - @doc("The maximum permitted quota of the resource.") - @visibility("read") - limit?: int32; +model ExternalFqdnResponse { +"value"?: FqdnEndpointsPropertyBag[]; +} - @doc("An enum describing the unit of quota measurement.") - @visibility("read") - unit?: QuotaUnit; +/** +* Property bag for FQDN endpoints result +*/ +model FqdnEndpointsPropertyBag { +"properties"?: FqdnEndpoints; } -@doc("The Resource Name.") -model ResourceName { - @doc("The name of the resource.") - @visibility("read") - value?: string; - @doc("The localized name of the resource.") - @visibility("read") - localizedValue?: string; +model FqdnEndpoints { +"category"?: string; +"endpoints"?: FqdnEndpoint[]; } -@doc("The resource model definition representing SKU") -model Sku { - @doc("The name of the SKU. Ex - P3. It is typically a letter+number code") - name: string; - - @doc("This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.") - tier?: SkuTier; - @doc("The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ") - size?: string; +model FqdnEndpoint { +"domainName"?: string; +"endpointDetails"?: FqdnEndpointDetail[]; +} - @doc("If the service has different generations of hardware, for the same SKU, then that can be captured here.") - family?: string; - @doc("If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.") - capacity?: int32; +model FqdnEndpointDetail { +"port"?: int32; } -@doc("Common fields that are returned in the response for all Azure Resource Manager resources") -model Resource { - @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") - @visibility("read") - id?: string; - - @doc("The name of the resource") - @visibility("read") - name?: string; +/** +* A list of private link resources +*/ +@pagedResult +model PrivateLinkResourceListResult { +@items +"value"?: PrivateLinkResource[]; +} - @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") - @visibility("read") - type?: string; +/** +* A private link resource +*/ +model PrivateLinkResource extends Resource { +/** +* Managed service identity (system assigned and/or user assigned identities) +*/ +"identity"?: ManagedServiceIdentity; +/** +* Same as workspace location. +*/ +"location"?: string; +/** +* Properties of a private link resource. +*/ +"properties"?: PrivateLinkResourceProperties; +/** +* Optional. This field is required to be implemented by the RP because AML is supporting more than one tier +*/ +"sku"?: Sku; +/** +* Dictionary of +*/ +"tags"?: Record; +} + +/** +* Properties of a private link resource. +*/ +model PrivateLinkResourceProperties { +/** +* The private link resource group id. +*/ +@visibility("read") +"groupId"?: string; +/** +* The private link resource required member names. +*/ +@visibility("read") +"requiredMembers"?: string[]; +/** +* The private link resource Private link DNS zone name. +*/ +"requiredZoneNames"?: string[]; +} + +/** +* Managed Network Provisioning options for managed network of a machine learning workspace. +*/ +model ManagedNetworkProvisionOptions { +"includeSpark"?: boolean; +} - @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") - @visibility("read") - systemData?: SystemData; +/** +* Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. +*/ +model ResourceId { +/** +* The ID of the resource +*/ +"id": string; } -model ComputeResourceSchema { - @doc("Compute properties") - properties?: Compute; +/** +* A Machine Learning compute based on AKS. +*/ +model AKS extends Compute { +...AKSSchema; +/** +* The type of compute +*/ +"computeType": "AKS"; } -@doc("Machine Learning compute object.") -@discriminator("computeType") -model Compute { - @doc("Location for the underlying compute") - @visibility("read", "create") - computeLocation?: string; - @doc("The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed.") - @visibility("read") - provisioningState?: ProvisioningState; +model AKSSchema { +/** +* AKS properties +*/ +"properties"?: AKSSchemaProperties; +} - @doc("The description of the Machine Learning compute.") - description?: string; +/** +* AKS properties +*/ +model AKSSchemaProperties { +/** +* Cluster full qualified domain name +*/ +"clusterFqdn"?: string; +/** +* System services +*/ +@visibility("read") +"systemServices"?: SystemService[]; +/** +* Number of agents +*/ +"agentCount"?: int32; +/** +* Agent virtual machine size +*/ +"agentVmSize"?: string; +/** +* Intended usage of the cluster +*/ +"clusterPurpose"?: ClusterPurpose = ClusterPurpose.FastProd; +/** +* SSL configuration +*/ +"sslConfiguration"?: SslConfiguration; +/** +* AKS networking configuration for vnet +*/ +"aksNetworkingConfiguration"?: AksNetworkingConfiguration; +/** +* Load Balancer Type +*/ +"loadBalancerType"?: LoadBalancerType = LoadBalancerType.PublicIp; +/** +* Load Balancer Subnet +*/ +"loadBalancerSubnet"?: string; +} + +/** +* A system service running on a compute. +*/ +model SystemService { +/** +* The type of this system service. +*/ +@visibility("read") +"systemServiceType"?: string; +/** +* Public IP address +*/ +@visibility("read") +"publicIpAddress"?: string; +/** +* The version for this type. +*/ +@visibility("read") +"version"?: string; +} + +/** +* The ssl configuration for scoring +*/ +model SslConfiguration { +/** +* Enable or disable ssl for scoring +*/ +"status"?: SslConfigStatus; +/** +* Cert data +*/ +"cert"?: string; +/** +* Key data +*/ +"key"?: string; +/** +* CNAME of the cert +*/ +"cname"?: string; +/** +* Leaf domain label of public endpoint +*/ +"leafDomainLabel"?: string; +/** +* Indicates whether to overwrite existing domain label. +*/ +"overwriteExistingDomain"?: boolean; +} + +/** +* Advance configuration for AKS networking +*/ +model AksNetworkingConfiguration { +/** +* Virtual network subnet resource ID the compute nodes belong to +*/ +"subnetId"?: string; +/** +* A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. +*/ +@pattern("^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$") +"serviceCidr"?: string; +/** +* An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. +*/ +@pattern("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$") +"dnsServiceIP"?: string; +/** +* A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range. +*/ +@pattern("^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$") +"dockerBridgeCidr"?: string; +} + +/** +* A Machine Learning compute based on Kubernetes Compute. +*/ +model Kubernetes extends Compute { +...KubernetesSchema; +/** +* The type of compute +*/ +"computeType": "Kubernetes"; +} - @doc("The time at which the compute was created.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - createdOn?: utcDateTime; +/** +* Kubernetes Compute Schema +*/ +model KubernetesSchema { +/** +* Properties of Kubernetes +*/ +"properties"?: KubernetesProperties; +} - @doc("The time at which the compute was last modified.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - modifiedOn?: utcDateTime; +/** +* Kubernetes properties +*/ +model KubernetesProperties { +/** +* Relay connection string. +*/ +"relayConnectionString"?: string; +/** +* ServiceBus connection string. +*/ +"serviceBusConnectionString"?: string; +/** +* Extension principal-id. +*/ +"extensionPrincipalId"?: string; +/** +* Extension instance release train. +*/ +"extensionInstanceReleaseTrain"?: string; +/** +* VC name. +*/ +"vcName"?: string; +/** +* Compute namespace +*/ +"namespace"?: string = "default"; +/** +* Default instance type +*/ +"defaultInstanceType"?: string; +/** +* Instance Type Schema +*/ +"instanceTypes"?: Record; +} + +/** +* Instance type schema. +*/ +model InstanceTypeSchema { +/** +* Node Selector +*/ +"nodeSelector"?: Record; +/** +* Resource requests/limits for this instance type +*/ +"resources"?: InstanceTypeSchemaResources; +} + +/** +* Resource requests/limits for this instance type +*/ +model InstanceTypeSchemaResources { +/** +* Resource requests for this instance type +*/ +"requests"?: Record; +/** +* Resource limits for this instance type +*/ +"limits"?: Record; +} + +/** +* AML Compute properties +*/ +model AmlComputeProperties { +/** +* Compute OS Type +*/ +"osType"?: OsType = OsType.Linux; +/** +* Virtual Machine Size +*/ +"vmSize"?: string; +/** +* Virtual Machine priority +*/ +"vmPriority"?: VmPriority; +/** +* Virtual Machine image for AML Compute - windows only +*/ +"virtualMachineImage"?: VirtualMachineImage; +/** +* Network is isolated or not +*/ +"isolatedNetwork"?: boolean; +/** +* Scale settings for AML Compute +*/ +"scaleSettings"?: ScaleSettings; +/** +* Credentials for an administrator user account that will be created on each compute node. +*/ +"userAccountCredentials"?: UserAccountCredentials; +/** +* Virtual network subnet resource ID the compute nodes belong to. +*/ +"subnet"?: ResourceId; +/** +* State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. +*/ +"remoteLoginPortPublicAccess"?: RemoteLoginPortPublicAccess = RemoteLoginPortPublicAccess.NotSpecified; +/** +* Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. +*/ +@visibility("read") +"allocationState"?: AllocationState; +/** +* The time at which the compute entered its current allocation state. +*/ +@visibility("read") +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"allocationStateTransitionTime"?: utcDateTime; +/** +* Collection of errors encountered by various compute nodes during node setup. +*/ +@visibility("read") +"errors"?: ErrorResponse[]; +/** +* The number of compute nodes currently assigned to the compute. +*/ +@visibility("read") +"currentNodeCount"?: int32; +/** +* The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation. +*/ +@visibility("read") +"targetNodeCount"?: int32; +/** +* Counts of various node states on the compute. +*/ +@visibility("read") +"nodeStateCounts"?: NodeStateCounts; +/** +* Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs. +*/ +"enableNodePublicIp"?: boolean = true; +/** +* A property bag containing additional properties. +*/ +"propertyBag"?: Record; +} + +/** +* Virtual Machine image for Windows AML Compute +*/ +model VirtualMachineImage { +/** +* Virtual Machine image path +*/ +"id": string; +} - @doc("ARM resource id of the underlying compute") - resourceId?: string; +/** +* Settings for user account that gets created on each on the nodes of a compute. +*/ +model UserAccountCredentials { +/** +* Name of the administrator user account which can be used to SSH to nodes. +*/ +"adminUserName": string; +/** +* SSH public key of the administrator user account. +*/ +"adminUserSshPublicKey"?: string; +/** +* Password of the administrator user account. +*/ +"adminUserPassword"?: string; +} + +/** +* Counts of various compute node states on the amlCompute. +*/ +model NodeStateCounts { +/** +* Number of compute nodes in idle state. +*/ +@visibility("read") +"idleNodeCount"?: int32; +/** +* Number of compute nodes which are running jobs. +*/ +@visibility("read") +"runningNodeCount"?: int32; +/** +* Number of compute nodes which are being prepared. +*/ +@visibility("read") +"preparingNodeCount"?: int32; +/** +* Number of compute nodes which are in unusable state. +*/ +@visibility("read") +"unusableNodeCount"?: int32; +/** +* Number of compute nodes which are leaving the amlCompute. +*/ +@visibility("read") +"leavingNodeCount"?: int32; +/** +* Number of compute nodes which are in preempted state. +*/ +@visibility("read") +"preemptedNodeCount"?: int32; +} + +/** +* An Azure Machine Learning compute. +*/ +model AmlCompute extends Compute { +...AmlComputeSchema; +/** +* The type of compute +*/ +"computeType": "AmlCompute"; +} - @doc("Errors during provisioning") - @visibility("read") - provisioningErrors?: ErrorResponse[]; +/** +* Properties(top level) of AmlCompute +*/ +model AmlComputeSchema { +/** +* Properties of AmlCompute +*/ +"properties"?: AmlComputeProperties; +} - @doc("Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.") - @visibility("read") - isAttachedCompute?: boolean; +/** +* Compute Instance properties +*/ +model ComputeInstanceProperties { +/** +* Virtual Machine Size +*/ +"vmSize"?: string; +/** +* Virtual network subnet resource ID the compute nodes belong to. +*/ +"subnet"?: ResourceId; +/** +* Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role. +*/ +"applicationSharingPolicy"?: ApplicationSharingPolicy = ApplicationSharingPolicy.Shared; +/** +* Specifies settings for autologger. +*/ +"autologgerSettings"?: ComputeInstanceAutologgerSettings; +/** +* Specifies policy and settings for SSH access. +*/ +"sshSettings"?: ComputeInstanceSshSettings; +/** +* List of Custom Services added to the compute. +*/ +"customServices"?: CustomService[]; +/** +* Returns metadata about the operating system image for this compute instance. +*/ +@visibility("read") +"osImageMetadata"?: ImageMetadata; +/** +* Describes all connectivity endpoints available for this ComputeInstance. +*/ +@visibility("read") +"connectivityEndpoints"?: ComputeInstanceConnectivityEndpoints; +/** +* Describes available applications and their endpoints on this ComputeInstance. +*/ +@visibility("read") +"applications"?: ComputeInstanceApplication[]; +/** +* Describes information on user who created this ComputeInstance. +*/ +@visibility("read") +"createdBy"?: ComputeInstanceCreatedBy; +/** +* Collection of errors encountered on this ComputeInstance. +*/ +@visibility("read") +"errors"?: ErrorResponse[]; +/** +* The current state of this ComputeInstance. +*/ +@visibility("read") +"state"?: ComputeInstanceState; +/** +* The Compute Instance Authorization type. Available values are personal (default). +*/ +"computeInstanceAuthorizationType"?: ComputeInstanceAuthorizationType = ComputeInstanceAuthorizationType.personal; +/** +* Settings for a personal compute instance. +*/ +"personalComputeInstanceSettings"?: PersonalComputeInstanceSettings; +/** +* Details of customized scripts to execute for setting up the cluster. +*/ +"setupScripts"?: SetupScripts; +/** +* The last operation on ComputeInstance. +*/ +@visibility("read") +"lastOperation"?: ComputeInstanceLastOperation; +/** +* The list of schedules to be applied on the computes. +*/ +"schedules"?: ComputeSchedules; +/** +* Stops compute instance after user defined period of inactivity. Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. +*/ +"idleTimeBeforeShutdown"?: string; +/** +* Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs. +*/ +"enableNodePublicIp"?: boolean = true; +/** +* Describes informations of containers on this ComputeInstance. +*/ +@visibility("read") +"containers"?: ComputeInstanceContainer[]; +/** +* Describes informations of dataDisks on this ComputeInstance. +*/ +@visibility("read") +"dataDisks"?: ComputeInstanceDataDisk[]; +/** +* Describes informations of dataMounts on this ComputeInstance. +*/ +@visibility("read") +"dataMounts"?: ComputeInstanceDataMount[]; +/** +* ComputeInstance version. +*/ +@visibility("read") +"versions"?: ComputeInstanceVersion; +} + +/** +* Specifies settings for autologger. +*/ +model ComputeInstanceAutologgerSettings { +/** +* Indicates whether mlflow autologger is enabled for notebooks. +*/ +"mlflowAutologger"?: MlflowAutologger; +} - @doc("Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication.") - @visibility("read", "create") - disableLocalAuth?: boolean; +/** +* Specifies policy and settings for SSH access. +*/ +model ComputeInstanceSshSettings { +/** +* State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable. +*/ +"sshPublicAccess"?: SshPublicAccess = SshPublicAccess.Disabled; +/** +* Describes the admin user name. +*/ +@visibility("read") +"adminUserName"?: string; +/** +* Describes the port for connecting through SSH. +*/ +@visibility("read") +"sshPort"?: int32; +/** +* Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key pairs. +*/ +"adminPublicKey"?: string; +} + +/** +* Returns metadata about the operating system image for this compute instance. +*/ +model ImageMetadata { +/** +* Specifies the current operating system image version this compute instance is running on. +*/ +"currentImageVersion"?: string; +/** +* Specifies the latest available operating system image version. +*/ +"latestImageVersion"?: string; +/** +* Specifies whether this compute instance is running on the latest operating system image. +*/ +"isLatestOsImageVersion"?: boolean; +} + +/** +* Defines all connectivity endpoints and properties for an ComputeInstance. +*/ +model ComputeInstanceConnectivityEndpoints { +/** +* Public IP Address of this ComputeInstance. +*/ +@visibility("read") +"publicIpAddress"?: string; +/** +* Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed). +*/ +@visibility("read") +"privateIpAddress"?: string; +} + +/** +* Defines an Aml Instance application and its connectivity endpoint URI. +*/ +model ComputeInstanceApplication { +/** +* Name of the ComputeInstance application. +*/ +"displayName"?: string; +/** +* Application' endpoint URI. +*/ +"endpointUri"?: string; +} + +/** +* Describes information on user who created this ComputeInstance. +*/ +model ComputeInstanceCreatedBy { +/** +* Name of the user. +*/ +@visibility("read") +"userName"?: string; +/** +* Uniquely identifies user' Azure Active Directory organization. +*/ +@visibility("read") +"userOrgId"?: string; +/** +* Uniquely identifies the user within his/her organization. +*/ +@visibility("read") +"userId"?: string; +} + +/** +* Settings for a personal compute instance. +*/ +model PersonalComputeInstanceSettings { +/** +* A user explicitly assigned to a personal compute instance. +*/ +"assignedUser"?: AssignedUser; } -@doc("AmlCompute update parameters.") -model ClusterUpdateParameters { - @doc("The properties of the amlCompute.") - properties?: ClusterUpdateProperties; +/** +* A user that can be assigned to a compute instance. +*/ +model AssignedUser { +/** +* User’s AAD Object Id. +*/ +"objectId": string; +/** +* User’s AAD Tenant Id. +*/ +"tenantId": string; +} + +/** +* Details of customized scripts to execute for setting up the cluster. +*/ +model SetupScripts { +/** +* Customized setup scripts +*/ +"scripts"?: ScriptsToExecute; } -@doc("The properties of a amlCompute that need to be updated.") -model ClusterUpdateProperties { - @doc("Properties of ClusterUpdate") - properties?: ScaleSettingsInformation; +/** +* Customized setup scripts +*/ +model ScriptsToExecute { +/** +* Script that's run every time the machine starts. +*/ +"startupScript"?: ScriptReference; +/** +* Script that's run only once during provision of the compute. +*/ +"creationScript"?: ScriptReference; +} + +/** +* Script reference +*/ +model ScriptReference { +/** +* The storage source of the script: inline, workspace. +*/ +"scriptSource"?: string; +/** +* The location of scripts in the mounted volume. +*/ +"scriptData"?: string; +/** +* Optional command line arguments passed to the script to run. +*/ +"scriptArguments"?: string; +/** +* Optional time period passed to timeout command. +*/ +"timeout"?: string; +} + +/** +* The last operation on ComputeInstance. +*/ +model ComputeInstanceLastOperation { +/** +* Name of the last operation. +*/ +"operationName"?: OperationName; +/** +* Time of the last operation. +*/ +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"operationTime"?: utcDateTime; +/** +* Operation status. +*/ +"operationStatus"?: OperationStatus; +/** +* Trigger of operation. +*/ +"operationTrigger"?: OperationTrigger; +} + +/** +* The list of schedules to be applied on the computes +*/ +model ComputeSchedules { +/** +* The list of compute start stop schedules to be applied. +*/ +"computeStartStop"?: ComputeStartStopSchedule[]; } -@doc("Desired scale settings for the amlCompute.") -model ScaleSettingsInformation { - @doc("scale settings for AML Compute") - scaleSettings?: ScaleSettings; +/** +* Compute start stop schedule properties +*/ +model ComputeStartStopSchedule { +/** +* A system assigned id for the schedule. +*/ +@visibility("read") +"id"?: string; +/** +* The current deployment state of schedule. +*/ +@visibility("read") +"provisioningStatus"?: ProvisioningStatus; +/** +* Is the schedule enabled or disabled? +*/ +"status"?: ScheduleStatus; +/** +* [Required] The compute power action. +*/ +"action"?: ComputePowerAction; +/** +* [Required] The schedule trigger type. +*/ +"triggerType"?: TriggerType; +/** +* Required if triggerType is Recurrence. +*/ +"recurrence"?: Recurrence; +/** +* Required if triggerType is Cron. +*/ +"cron"?: Cron; +/** +* [Deprecated] Not used any more. +*/ +"schedule"?: ScheduleBase; +} + +/** +* The workflow trigger recurrence for ComputeStartStop schedule type. +*/ +model Recurrence { +/** +* [Required] The frequency to trigger schedule. +*/ +"frequency"?: RecurrenceFrequency; +/** +* [Required] Specifies schedule interval in conjunction with frequency +*/ +"interval"?: int32; +/** +* The start time in yyyy-MM-ddTHH:mm:ss format. +*/ +"startTime"?: string; +/** +* Specifies time zone in which the schedule runs. +TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 +*/ +"timeZone"?: string = "UTC"; +/** +* [Required] The recurrence schedule. +*/ +"schedule"?: RecurrenceSchedule; } -@doc("scale settings for AML Compute") -model ScaleSettings { - @doc("Max number of nodes to use") - maxNodeCount: int32; +/** +* The workflow trigger cron for ComputeStartStop schedule type. +*/ +model Cron { +/** +* The start time in yyyy-MM-ddTHH:mm:ss format. +*/ +"startTime"?: string; +/** +* Specifies time zone in which the schedule runs. +TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 +*/ +"timeZone"?: string = "UTC"; +/** +* [Required] Specifies cron expression of schedule. +The expression should follow NCronTab format. +*/ +"expression"?: string; +} - @doc("Min number of nodes to use") - minNodeCount?: int32; - @doc("Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format.") - nodeIdleTimeBeforeScaleDown?: duration; +model ScheduleBase { +/** +* A system assigned id for the schedule. +*/ +"id"?: string; +/** +* The current deployment state of schedule. +*/ +"provisioningStatus"?: ScheduleProvisioningState; +/** +* Is the schedule enabled or disabled? +*/ +"status"?: ScheduleStatus; +} + +/** +* Defines an Aml Instance container. +*/ +model ComputeInstanceContainer { +/** +* Name of the ComputeInstance container. +*/ +"name"?: string; +/** +* Auto save settings. +*/ +"autosave"?: Autosave; +/** +* Information of GPU. +*/ +"gpu"?: string; +/** +* network of this container. +*/ +"network"?: Network; +/** +* Environment information of this container. +*/ +"environment"?: ComputeInstanceEnvironmentInfo; +/** +* services of this containers. +*/ +@visibility("read") +"services"?: Record[]; +} + +/** +* Environment information +*/ +model ComputeInstanceEnvironmentInfo { +/** +* name of environment. +*/ +"name"?: string; +/** +* version of environment. +*/ +"version"?: string; +} + +/** +* Defines an Aml Instance DataDisk. +*/ +model ComputeInstanceDataDisk { +/** +* Caching type of Data Disk. +*/ +"caching"?: Caching; +/** +* The initial disk size in gigabytes. +*/ +"diskSizeGB"?: int32; +/** +* The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. +*/ +"lun"?: int32; +/** +* type of this storage account. +*/ +"storageAccountType"?: StorageAccountType = StorageAccountType.Standard_LRS; +} + +/** +* Defines an Aml Instance DataMount. +*/ +model ComputeInstanceDataMount { +/** +* Source of the ComputeInstance data mount. +*/ +"source"?: string; +/** +* Data source type. +*/ +"sourceType"?: SourceType; +/** +* name of the ComputeInstance data mount. +*/ +"mountName"?: string; +/** +* Mount Action. +*/ +"mountAction"?: MountAction; +/** +* who this data mount created by. +*/ +"createdBy"?: string; +/** +* Path of this data mount. +*/ +"mountPath"?: string; +/** +* Mount state. +*/ +"mountState"?: MountState; +/** +* The time when the disk mounted. +*/ +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"mountedOn"?: utcDateTime; +/** +* Error of this data mount. +*/ +"error"?: string; +} + +/** +* Version of computeInstance. +*/ +model ComputeInstanceVersion { +/** +* Runtime of compute instance. +*/ +"runtime"?: string; } -@doc("Specifies the custom service configuration") -model CustomService extends Record { - @doc("Name of the Custom Service") - name?: string; - - @doc("Describes the Image Specifications") - image?: Image; +/** +* An Azure Machine Learning compute instance. +*/ +model ComputeInstance extends Compute { +...ComputeInstanceSchema; +/** +* The type of compute +*/ +"computeType": "ComputeInstance"; +} - @doc("Environment Variable for the container") - environmentVariables?: Record; +/** +* Properties(top level) of ComputeInstance +*/ +model ComputeInstanceSchema { +/** +* Properties of ComputeInstance +*/ +"properties"?: ComputeInstanceProperties; +} - @doc("Describes the docker settings for the image") - docker?: Docker; +/** +* A Machine Learning compute based on Azure Virtual Machines. +*/ +model VirtualMachine extends Compute { +...VirtualMachineSchema; +/** +* The type of compute +*/ +"computeType": "VirtualMachine"; +} - @doc("Configuring the endpoints for the container") - endpoints?: Endpoint[]; - @doc("Configuring the volumes for the container") - volumes?: VolumeDefinition[]; +model VirtualMachineSchema { +"properties"?: VirtualMachineSchemaProperties; } -model Image extends Record { - @doc("Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images") - type?: ImageType; - @doc("Image reference URL") - reference?: string; +model VirtualMachineSchemaProperties { +/** +* Virtual Machine size +*/ +"virtualMachineSize"?: string; +/** +* Port open for ssh connections. +*/ +"sshPort"?: int32; +/** +* Notebook server port open for ssh connections. +*/ +"notebookServerPort"?: int32; +/** +* Public IP address of the virtual machine. +*/ +"address"?: string; +/** +* Admin credentials for virtual machine +*/ +"administratorAccount"?: VirtualMachineSshCredentials; +/** +* Indicates whether this compute will be used for running notebooks. +*/ +"isNotebookInstanceCompute"?: boolean; +} + +/** +* Admin credentials for virtual machine +*/ +model VirtualMachineSshCredentials { +/** +* Username of admin account +*/ +"username"?: string; +/** +* Password of admin account +*/ +"password"?: string; +/** +* Public key data +*/ +"publicKeyData"?: string; +/** +* Private key data +*/ +"privateKeyData"?: string; +} + +/** +* HDInsight compute properties +*/ +model HDInsightProperties { +/** +* Port open for ssh connections on the master node of the cluster. +*/ +"sshPort"?: int32; +/** +* Public IP address of the master node of the cluster. +*/ +"address"?: string; +/** +* Admin credentials for master node of the cluster +*/ +"administratorAccount"?: VirtualMachineSshCredentials; +} + +/** +* A HDInsight compute. +*/ +model HDInsight extends Compute { +...HDInsightSchema; +/** +* The type of compute +*/ +"computeType": "HDInsight"; } -model EnvironmentVariable extends Record { - @doc("Type of the Environment Variable. Possible values are: local - For local variable") - type?: EnvironmentVariableType; - @doc("Value of the Environment variable") - value?: string; +model HDInsightSchema { +/** +* HDInsight compute properties +*/ +"properties"?: HDInsightProperties; } -model Docker extends Record { - @doc("Indicate whether container shall run in privileged or non-privileged mode.") - privileged?: boolean; +/** +* A DataFactory compute. +*/ +model DataFactory extends Compute { +/** +* The type of compute +*/ +"computeType": "DataFactory"; } -model Endpoint { - @doc("Protocol over which communication will happen over this endpoint") - protocol?: Protocol; +/** +* Properties of Databricks +*/ +model DatabricksProperties { +/** +* Databricks access token +*/ +"databricksAccessToken"?: string; +/** +* Workspace Url +*/ +"workspaceUrl"?: string; +} + +/** +* A DataFactory compute. +*/ +model Databricks extends Compute { +...DatabricksSchema; +/** +* The type of compute +*/ +"computeType": "Databricks"; +} - @doc("Name of the Endpoint") - name?: string; - @doc("Application port inside the container.") - target?: int32; +model DatabricksSchema { +/** +* Properties of Databricks +*/ +"properties"?: DatabricksProperties; +} + +/** +* A DataLakeAnalytics compute. +*/ +model DataLakeAnalytics extends Compute { +...DataLakeAnalyticsSchema; +/** +* The type of compute +*/ +"computeType": "DataLakeAnalytics"; +} - @doc("Port over which the application is exposed from container.") - published?: int32; - @doc("Host IP over which the application is exposed from the container") - hostIp?: string; +model DataLakeAnalyticsSchema { +"properties"?: DataLakeAnalyticsSchemaProperties; } -model VolumeDefinition { - @doc("Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe") - type?: VolumeDefinitionType; - @doc("Indicate whether to mount volume as readOnly. Default value for this is false.") - readOnly?: boolean; +model DataLakeAnalyticsSchemaProperties { +/** +* DataLake Store Account Name +*/ +"dataLakeStoreAccountName"?: string; +} - @doc("Source of the mount. For bind mounts this is the host path.") - source?: string; +/** +* A SynapseSpark compute. +*/ +model SynapseSpark extends Compute { +"properties"?: SynapseSparkProperties; +/** +* The type of compute +*/ +"computeType": "SynapseSpark"; +} - @doc("Target of the mount. For bind mounts this is the path in the container.") - target?: string; - @doc("Consistency of the volume") - consistency?: string; +model SynapseSparkProperties { +/** +* Auto scale properties. +*/ +"autoScaleProperties"?: AutoScaleProperties; +/** +* Auto pause properties. +*/ +"autoPauseProperties"?: AutoPauseProperties; +/** +* Spark version. +*/ +"sparkVersion"?: string; +/** +* The number of compute nodes currently assigned to the compute. +*/ +"nodeCount"?: int32; +/** +* Node size. +*/ +"nodeSize"?: string; +/** +* Node size family. +*/ +"nodeSizeFamily"?: string; +/** +* Azure subscription identifier. +*/ +"subscriptionId"?: string; +/** +* Name of the resource group in which workspace is located. +*/ +"resourceGroup"?: string; +/** +* Name of Azure Machine Learning workspace. +*/ +"workspaceName"?: string; +/** +* Pool name. +*/ +"poolName"?: string; +} + +/** +* Auto scale properties +*/ +model AutoScaleProperties { +"minNodeCount"?: int32; +"enabled"?: boolean; +"maxNodeCount"?: int32; +} - @doc("Bind Options of the mount") - bind?: BindOptions; +/** +* Auto pause properties +*/ +model AutoPauseProperties { +"delayInMinutes"?: int32; +"enabled"?: boolean; +} - @doc("Volume Options of the mount") - volume?: VolumeOptions; +/** +* Properties of AksComputeSecrets +*/ +model AksComputeSecretsProperties { +/** +* Content of kubeconfig file that can be used to connect to the Kubernetes cluster. +*/ +"userKubeConfig"?: string; +/** +* Content of kubeconfig file that can be used to connect to the Kubernetes cluster. +*/ +"adminKubeConfig"?: string; +/** +* Image registry pull secret. +*/ +"imagePullSecretName"?: string; +} + +/** +* Secrets related to a Machine Learning compute based on AKS. +*/ +model AksComputeSecrets extends ComputeSecrets { +...AksComputeSecretsProperties; +/** +* The type of compute +*/ +"computeType": "AKS"; +} - @doc("tmpfs option of the mount") - tmpfs?: TmpfsOptions; +/** +* Secrets related to a Machine Learning compute based on AKS. +*/ +model VirtualMachineSecrets extends ComputeSecrets { +...VirtualMachineSecretsSchema; +/** +* The type of compute +*/ +"computeType": "VirtualMachine"; } -model BindOptions { - @doc("Type of Bind Option") - propagation?: string; - @doc("Indicate whether to create host path.") - createHostPath?: boolean; +model VirtualMachineSecretsSchema { +/** +* Admin credentials for virtual machine. +*/ +"administratorAccount"?: VirtualMachineSshCredentials; +} - @doc("Mention the selinux options.") - selinux?: string; +/** +* Properties of Databricks Compute Secrets +*/ +model DatabricksComputeSecretsProperties { +/** +* access token for databricks account. +*/ +"databricksAccessToken"?: string; } -model VolumeOptions { - @doc("Indicate whether volume is nocopy") - nocopy?: boolean; +/** +* Secrets related to a Machine Learning compute based on Databricks. +*/ +model DatabricksComputeSecrets extends ComputeSecrets { +...DatabricksComputeSecretsProperties; +/** +* The type of compute +*/ +"computeType": "Databricks"; } -model TmpfsOptions { - @doc("Mention the Tmpfs size") - size?: int32; +/** +* Account key datastore credentials configuration. +*/ +model AccountKeyDatastoreCredentials extends DatastoreCredentials { +/** +* [Required] Storage account secrets. +*/ +@visibility("create", "update") +"secrets": AccountKeyDatastoreSecrets; +/** +* [Required] Credential type used to authentication with storage. +*/ +"credentialsType": "AccountKey"; +} + +/** +* Datastore account key secrets. +*/ +model AccountKeyDatastoreSecrets extends DatastoreSecrets { +/** +* Storage account key. +*/ +"key"?: string; +/** +* [Required] Credential type used to authentication with storage. +*/ +"secretsType": "AccountKey"; } -@doc("Result of AmlCompute Nodes") -@pagedResult -model AmlComputeNodesInformation { - @doc("The collection of returned AmlCompute nodes details.") - @visibility("read") - @items - nodes?: AmlComputeNodeInformation[]; - @doc("The continuation token.") - @visibility("read") - @nextLink - nextLink?: string; +model AllFeatures extends MonitoringFeatureFilterBase { +/** +* [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. +*/ +"filterType": "AllFeatures"; } -@doc("Compute node information related to a AmlCompute.") -model AmlComputeNodeInformation { - @doc("ID of the compute node.") - @visibility("read") - nodeId?: string; - - @doc("Private IP address of the compute node.") - @visibility("read") - privateIpAddress?: string; - @doc("Public IP address of the compute node.") - @visibility("read") - publicIpAddress?: string; +@discriminator("filterType") +model MonitoringFeatureFilterBase { +} - @doc("SSH port number of the node.") - @visibility("read") - port?: int32; +/** +* All nodes means the service will be running on all of the nodes of the job +*/ +model AllNodes extends Nodes { +/** +* [Required] Type of the Nodes value +*/ +"nodesValueType": "All"; +} - @doc("State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted.") - @visibility("read") - nodeState?: NodeState; +/** +* AML Token identity configuration. +*/ +model AmlToken extends IdentityConfiguration { +/** +* [Required] Specifies the type of identity framework. +*/ +"identityType": "AMLToken"; +} - @doc("ID of the Experiment running on the node, if any else null.") - @visibility("read") - runId?: string; +/** +* AML token compute identity definition. +*/ +model AmlTokenComputeIdentity extends MonitorComputeIdentityBase { +/** +* [Required] Monitor compute identity type enum. +*/ +"computeIdentityType": "AmlToken"; } -@doc("Secrets related to a Machine Learning compute. Might differ for every type of compute.") -@discriminator("computeType") -model ComputeSecrets {} +/** +* Monitor compute identity base definition. +*/ +@discriminator("computeIdentityType") +model MonitorComputeIdentityBase { +} -@doc("Stops compute instance after user defined period of inactivity.") -model IdleShutdownSetting { - @doc("Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days.") - idleTimeBeforeShutdown?: string; +/** +* Asset input type. +*/ +model AssetJobInput { +/** +* Input Asset Delivery Mode. +*/ +@visibility("read", "create") +"mode"?: InputDeliveryMode; +/** +* [Required] Input Asset URI. +*/ +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"uri": string; +} + +/** +* Asset output type. +*/ +model AssetJobOutput { +/** +* Output Asset Name. +*/ +"assetName"?: string; +/** +* Output Asset Version. +*/ +"assetVersion"?: string; +/** +* Auto delete setting of output data asset. +*/ +@visibility("read", "create", "update") +"autoDeleteSetting"?: AutoDeleteSetting; +/** +* Output Asset Delivery Mode. +*/ +@visibility("read", "create") +"mode"?: OutputDeliveryMode; +/** +* Output Asset URI. +*/ +"uri"?: string; +} + +/** +* Forecast horizon determined automatically by system. +*/ +model AutoForecastHorizon extends ForecastHorizon { +/** +* [Required] Set forecast horizon value selection mode. +*/ +"mode": "Auto"; } -@doc("Container for code asset versions.") -model CodeContainer extends AssetContainer { - @doc("Provisioning state for the code container.") - @visibility("read") - provisioningState?: AssetProvisioningState; +/** +* The desired maximum forecast horizon in units of time-series frequency. +*/ +@discriminator("mode") +model ForecastHorizon { } -model AssetContainer extends ResourceBase { - @doc("Is the asset archived?") - @visibility("read", "create", "update") - isArchived?: boolean; +/** +* AutoMLJob class. +Use this class for executing AutoML tasks like Classification/Regression etc. +See TaskType enum for all the tasks supported. +*/ +model AutoMLJob extends JobBase { +/** +* The ARM resource ID of the Environment specification for the job. +This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated environment version when running the job. +*/ +@visibility("read", "create") +"environmentId"?: string; +/** +* Environment variables included in the job. +*/ +@visibility("read", "create") +"environmentVariables"?: Record; +/** +* Mapping of output data bindings used in the job. +*/ +@visibility("read", "create") +"outputs"?: Record; +/** +* Queue settings for the job +*/ +@visibility("read", "create") +"queueSettings"?: QueueSettings; +/** +* Compute Resource configuration for the job. +*/ +@visibility("read", "create") +"resources"?: JobResourceConfiguration; +/** +* [Required] This represents scenario which can be one of Tables/NLP/Image +*/ +"taskDetails": AutoMLVertical; +/** +* [Required] Specifies the type of job. +*/ +"jobType": "AutoML"; +} + +/** +* Job output definition container information on where to find job output/logs. +*/ +@discriminator("jobOutputType") +model JobOutput { +/** +* Description for the output. +*/ +@visibility("read", "create") +"description"?: string; +} - @doc("The latest version inside this container.") - @visibility("read") - latestVersion?: string; - @doc("The next auto incremental version") - @visibility("read") - nextVersion?: string; +model QueueSettings { +/** +* Controls the compute job tier +*/ +@visibility("read", "create") +"jobTier"?: JobTier; +/** +* Controls the priority of the job on a compute. +*/ +@visibility("read", "create") +"priority"?: int32; } -model ResourceBase { - @doc("The asset description text.") - description?: string; - - @doc("The asset property dictionary.") - properties?: Record; - @doc("Tag dictionary. Tags can be added, removed, and updated.") - tags?: Record; +model JobResourceConfiguration extends ResourceConfiguration { +/** +* Extra arguments to pass to the Docker run command. This would override any parameters that have already been set by the system, or in this section. This parameter is only supported for Azure ML compute types. +*/ +@visibility("read", "create") +"dockerArgs"?: string; +/** +* Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes). +*/ +@visibility("read", "create") +@pattern("\\d+[bBkKmMgG]") +"shmSize"?: string = "2g"; +} + +/** +* AutoML vertical class. +Base class for AutoML verticals - TableVertical/ImageVertical/NLPVertical +*/ +@discriminator("taskType") +model AutoMLVertical { +/** +* Log verbosity for the job. +*/ +"logVerbosity"?: LogVerbosity; +/** +* Target column name: This is prediction values column. +Also known as label column name in context of classification tasks. +*/ +"targetColumnName"?: string; +/** +* [Required] Training data input. +*/ +"trainingData": MLTableJobInput; } -@doc("Code asset version details.") -model CodeVersion extends AssetBase { - @doc("Uri where code is located") - codeUri?: string; - @doc("Provisioning state for the code version.") - @visibility("read") - provisioningState?: AssetProvisioningState; +model MLTableJobInput extends JobInput { +...AssetJobInput; +/** +* [Required] Specifies the type of job. +*/ +"jobInputType": "mltable"; } -model AssetBase extends ResourceBase { - @doc("Specifies the lifecycle setting of managed data asset.") - @visibility("read", "create", "update") - autoDeleteSetting?: AutoDeleteSetting; +/** +* Command job definition. +*/ +@discriminator("jobInputType") +model JobInput { +/** +* Description for the input. +*/ +@visibility("read", "create") +"description"?: string; +} - @doc("If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous") - @visibility("read", "create") - isAnonymous?: boolean; +/** +* N-Cross validations determined automatically. +*/ +model AutoNCrossValidations extends NCrossValidations { +/** +* [Required] Mode for determining N-Cross validations. +*/ +"mode": "Auto"; +} - @doc("Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived") - @visibility("read", "create", "update") - isArchived?: boolean; +/** +* N-Cross validations value. +*/ +@discriminator("mode") +model NCrossValidations { } -model AutoDeleteSetting { - @doc("When to check if an asset is expired") - @visibility("read", "create", "update") - condition?: AutoDeleteCondition; - @doc("Expiration condition value.") - @visibility("read", "create", "update") - value?: string; +model AutoSeasonality extends Seasonality { +/** +* [Required] Seasonality mode. +*/ +"mode": "Auto"; } -model PendingUploadRequestDto { - @doc("If PendingUploadId = null then random guid will be used.") - pendingUploadId?: string; - - @doc("TemporaryBlobReference is the only supported type") - pendingUploadType?: PendingUploadType; +/** +* Forecasting seasonality. +*/ +@discriminator("mode") +model Seasonality { } -model PendingUploadResponseDto { - @doc("Container level read, write, list SAS") - blobReferenceForConsumption?: BlobReferenceForConsumptionDto; - @doc("ID for this upload request") - pendingUploadId?: string; +model AutoTargetLags extends TargetLags { +/** +* [Required] Set target lags mode - Auto/Custom +*/ +"mode": "Auto"; +} - @doc("TemporaryBlobReference is the only supported type") - pendingUploadType?: PendingUploadType; +/** +* The number of past periods to lag from the target column. +*/ +@discriminator("mode") +model TargetLags { } -model BlobReferenceForConsumptionDto { - @doc(""" -Blob URI path for client to upload data. -Example: https://blob.windows.core.net/Container/Path -""") - blobUri?: string; +/** +* Target lags rolling window determined automatically. +*/ +model AutoTargetRollingWindowSize extends TargetRollingWindowSize { +/** +* [Required] TargetRollingWindowSiz detection mode. +*/ +"mode": "Auto"; +} - @doc("Credential info to access storage account") - credential?: PendingUploadCredentialDto; +/** +* Forecasting target rolling window size. +*/ +@discriminator("mode") +model TargetRollingWindowSize { +} - @doc("Arm ID of the storage account to use") - storageAccountArmId?: string; +/** +* Settings for Autologger. +*/ +model AutologgerSettings { +/** +* [Required] Indicates whether mlflow autologger is enabled. +*/ +@visibility("read", "create") +"mlflowAutologger": MLFlowAutologgerState; } -@discriminator("credentialType") -model PendingUploadCredentialDto {} -@doc(""" -Component container definition. - -""") -model ComponentContainer extends AssetContainer { - @doc("Provisioning state for the component container.") - @visibility("read") - provisioningState?: AssetProvisioningState; +model AzMonMonitoringAlertNotificationSettings extends MonitoringAlertNotificationSettingsBase { +/** +* [Required] Specifies the type of signal to monitor. +*/ +"alertNotificationType": "AzureMonitor"; } -@doc("Definition of a component version: defines resources that span component types.") -model ComponentVersion extends AssetBase { - @doc(""" -Defines Component definition details. - -""") - @visibility("read", "create") - componentSpec?: Record; - - @doc("Provisioning state for the component version.") - @visibility("read") - provisioningState?: AssetProvisioningState; - @doc("Stage in the component lifecycle") - stage?: string; +@discriminator("alertNotificationType") +model MonitoringAlertNotificationSettingsBase { } -@doc("Container for data asset versions.") -model DataContainer extends AssetContainer { - @doc("[Required] Specifies the type of data.") - @visibility("read", "create") - dataType: DataType; +/** +* Azure Blob datastore configuration. +*/ +model AzureBlobDatastore extends Datastore { +...AzureDatastore; +/** +* Storage account name. +*/ +@visibility("read", "create") +"accountName"?: string; +/** +* Storage account container name. +*/ +@visibility("read", "create") +"containerName"?: string; +/** +* Azure cloud endpoint for the storage account. +*/ +@visibility("read", "create") +"endpoint"?: string; +/** +* Protocol used to communicate with the storage account. +*/ +@visibility("read", "create") +"protocol"?: string; +/** +* Indicates which identity to use to authenticate service data access to customer's storage. +*/ +@visibility("read", "create") +"serviceDataAccessAuthIdentity"?: ServiceDataAccessAuthIdentity; +/** +* [Required] Storage type backing the datastore. +*/ +"datastoreType": "AzureBlob"; +} + +/** +* Base definition for Azure datastore contents configuration. +*/ +model AzureDatastore { +/** +* Azure Resource Group name +*/ +"resourceGroup"?: string; +/** +* Azure Subscription Id +*/ +"subscriptionId"?: string; +} + +/** +* Azure Data Lake Gen1 datastore configuration. +*/ +model AzureDataLakeGen1Datastore extends Datastore { +...AzureDatastore; +/** +* Indicates which identity to use to authenticate service data access to customer's storage. +*/ +@visibility("read", "create") +"serviceDataAccessAuthIdentity"?: ServiceDataAccessAuthIdentity; +/** +* [Required] Azure Data Lake store name. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"storeName": string; +/** +* [Required] Storage type backing the datastore. +*/ +"datastoreType": "AzureDataLakeGen1"; +} + +/** +* Azure Data Lake Gen2 datastore configuration. +*/ +model AzureDataLakeGen2Datastore extends Datastore { +...AzureDatastore; +/** +* [Required] Storage account name. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"accountName": string; +/** +* Azure cloud endpoint for the storage account. +*/ +@visibility("read", "create") +"endpoint"?: string; +/** +* [Required] The name of the Data Lake Gen2 filesystem. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"filesystem": string; +/** +* Protocol used to communicate with the storage account. +*/ +@visibility("read", "create") +"protocol"?: string; +/** +* Indicates which identity to use to authenticate service data access to customer's storage. +*/ +@visibility("read", "create") +"serviceDataAccessAuthIdentity"?: ServiceDataAccessAuthIdentity; +/** +* [Required] Storage type backing the datastore. +*/ +"datastoreType": "AzureDataLakeGen2"; +} + +/** +* Webhook details specific for Azure DevOps +*/ +model AzureDevOpsWebhook extends Webhook { +/** +* [Required] Specifies the type of service to send a callback +*/ +"webhookType": "AzureDevOps"; } -@doc("Data version base definition") -@discriminator("dataType") -model DataVersionBase extends AssetBase { - @doc("[Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - dataUri: string; - - @doc("Intellectual Property details. Used if data is an Intellectual Property.") - @visibility("read", "create") - intellectualProperty?: IntellectualProperty; +/** +* Azure File datastore configuration. +*/ +model AzureFileDatastore extends Datastore { +...AzureDatastore; +/** +* [Required] Storage account name. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"accountName": string; +/** +* Azure cloud endpoint for the storage account. +*/ +@visibility("read", "create") +"endpoint"?: string; +/** +* [Required] The name of the Azure file share that the datastore points to. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"fileShareName": string; +/** +* Protocol used to communicate with the storage account. +*/ +@visibility("read", "create") +"protocol"?: string; +/** +* Indicates which identity to use to authenticate service data access to customer's storage. +*/ +@visibility("read", "create") +"serviceDataAccessAuthIdentity"?: ServiceDataAccessAuthIdentity; +/** +* [Required] Storage type backing the datastore. +*/ +"datastoreType": "AzureFile"; +} + +/** +* Azure ML batch inferencing server configurations. +*/ +model AzureMLBatchInferencingServer extends InferencingServer { +/** +* Code configuration for AML batch inferencing server. +*/ +"codeConfiguration"?: CodeConfiguration; +/** +* [Required] Inferencing server type for various targets. +*/ +"serverType": "AzureMLBatch"; +} + +/** +* Azure ML online inferencing configurations. +*/ +model AzureMLOnlineInferencingServer extends InferencingServer { +/** +* Code configuration for AML inferencing server. +*/ +"codeConfiguration"?: CodeConfiguration; +/** +* [Required] Inferencing server type for various targets. +*/ +"serverType": "AzureMLOnline"; +} + +/** +* Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation +*/ +model BanditPolicy extends EarlyTerminationPolicy { +/** +* Absolute distance allowed from the best performing run. +*/ +"slackAmount"?: float32; +/** +* Ratio of the allowed distance from the best performing run. +*/ +"slackFactor"?: float32; +/** +* [Required] Name of policy configuration +*/ +"policyType": "Bandit"; +} + +/** +* Early termination policies enable canceling poor-performing runs before they complete +*/ +@discriminator("policyType") +model EarlyTerminationPolicy { +/** +* Number of intervals by which to delay the first evaluation. +*/ +"delayEvaluation"?: int32; +/** +* Interval (number of runs) between policy evaluations. +*/ +"evaluationInterval"?: int32; +} + +/** +* Base environment type. +*/ +model BaseEnvironmentId extends BaseEnvironmentSource { +/** +* [Required] Resource id accepting ArmId or AzureMlId. +*/ +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"resourceId": string; +/** +* [Required] Base environment type. +*/ +"baseEnvironmentSourceType": "EnvironmentAsset"; +} + +/** +* Properties for a Batch Pipeline Component Deployment. +*/ +model BatchPipelineComponentDeploymentConfiguration extends BatchDeploymentConfiguration { +/** +* The ARM id of the component to be run. +*/ +"componentId"?: IdAssetReference; +/** +* The description which will be applied to the job. +*/ +"description"?: string; +/** +* Run-time settings for the pipeline job. +*/ +"settings"?: Record; +/** +* The tags which will be applied to the job. +*/ +"tags"?: Record; +/** +* [Required] The type of the deployment +*/ +"deploymentConfigurationType": "PipelineComponent"; +} + +/** +* Reference to an asset via its ARM resource ID. +*/ +model IdAssetReference extends AssetReferenceBase { +/** +* [Required] ARM resource ID of the asset. +*/ +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"assetId": string; +/** +* [Required] Specifies the type of asset reference. +*/ +"referenceType": "Id"; +} + +/** +* Defines a Sampling Algorithm that generates values based on previous values +*/ +model BayesianSamplingAlgorithm extends SamplingAlgorithm { +/** +* [Required] The algorithm used for generating hyperparameter values, along with configuration properties +*/ +"samplingAlgorithmType": "Bayesian"; +} - @doc("Stage in the data lifecycle assigned to this data asset") - stage?: string; +/** +* The Sampling Algorithm used to generate hyperparameter values, along with properties to +configure the algorithm +*/ +@discriminator("samplingAlgorithmType") +model SamplingAlgorithm { } -@doc("Intellectual Property details for a resource.") -model IntellectualProperty { - @doc("Protection level of the Intellectual Property.") - protectionLevel?: ProtectionLevel; - @doc("[Required] Publisher of the Intellectual Property. Must be the same as Registry publisher name.") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - publisher: string; +model CategoricalDataDriftMetricThreshold extends DataDriftMetricThresholdBase { +/** +* [Required] The categorical data drift metric to calculate. +*/ +@visibility("read", "create") +"metric": CategoricalDataDriftMetric; +/** +* [Required] Specifies the data type of the metric threshold. +*/ +"dataType": "Categorical"; } -@doc("Container for environment specification versions.") -model EnvironmentContainer extends AssetContainer { - @doc("Provisioning state for the environment container.") - @visibility("read") - provisioningState?: AssetProvisioningState; -} -@doc("Environment version details.") -model EnvironmentVersion extends AssetBase { - @doc("Defines if image needs to be rebuilt based on base image changes.") - @visibility("read", "create") - autoRebuild?: AutoRebuildSetting; - - @doc("Configuration settings for Docker build context.") - @visibility("read", "create") - build?: BuildContext; - - @doc(""" -Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and C/C++ packages. - -""") - @visibility("read", "create") - condaFile?: string; - - @doc(""" -Environment type is either user managed or curated by the Azure ML service - -""") - @visibility("read") - environmentType?: EnvironmentType; - - @doc(""" -Name of the image that will be used for the environment. - -""") - @visibility("read", "create") - image?: string; - - @doc("Defines configuration specific to inference.") - @visibility("read", "create") - inferenceConfig?: InferenceContainerProperties; - - @doc("Intellectual Property details. Used if environment is an Intellectual Property.") - @visibility("read", "create") - intellectualProperty?: IntellectualProperty; - - @doc("The OS type of the environment.") - @visibility("read", "create") - osType?: OperatingSystemType; - - @doc("Provisioning state for the environment version.") - @visibility("read") - provisioningState?: AssetProvisioningState; - - @doc("Stage in the environment lifecycle assigned to this environment") - stage?: string; -} - -@doc("Configuration settings for Docker build context") -model BuildContext { - @doc(""" -[Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. - -""") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - contextUri: string; - - @doc(""" -Path to the Dockerfile in the build context. - -""") - @visibility("read", "create") - dockerfilePath?: string; +@discriminator("dataType") +model DataDriftMetricThresholdBase { +/** +* The threshold value. If null, a default value will be set depending on the selected metric. +*/ +@visibility("read", "create") +"threshold"?: MonitoringThreshold; } -model InferenceContainerProperties { - @doc("The route to check the liveness of the inference server container.") - livenessRoute?: Route; - - @doc("The route to check the readiness of the inference server container.") - readinessRoute?: Route; - @doc("The port to send the scoring requests to, within the inference server container.") - scoringRoute?: Route; +model MonitoringThreshold { +/** +* The threshold value. If null, the set default is dependent on the metric type. +*/ +@visibility("read", "create") +"value"?: float64; } -model Route { - @doc("[Required] The path for the route.") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - path: string; - @doc("[Required] The port for the route.") - port: int32; +model CategoricalDataQualityMetricThreshold extends DataQualityMetricThresholdBase { +/** +* [Required] The categorical data quality metric to calculate. +*/ +@visibility("read", "create") +"metric": CategoricalDataQualityMetric; +/** +* [Required] Specifies the data type of the metric threshold. +*/ +"dataType": "Categorical"; } -model ModelContainer extends AssetContainer { - @doc("Provisioning state for the model container.") - @visibility("read") - provisioningState?: AssetProvisioningState; -} -@doc("Model asset version details.") -model ModelVersion extends AssetBase { - @doc("Mapping of model flavors to their properties.") - flavors?: Record; +@discriminator("dataType") +model DataQualityMetricThresholdBase { +/** +* The threshold value. If null, a default value will be set depending on the selected metric. +*/ +@visibility("read", "create") +"threshold"?: MonitoringThreshold; +} - @doc("Intellectual Property details. Used if model is an Intellectual Property.") - @visibility("read", "create") - intellectualProperty?: IntellectualProperty; - @doc("Name of the training job which produced this model") - jobName?: string; +model CategoricalPredictionDriftMetricThreshold extends PredictionDriftMetricThresholdBase { +/** +* [Required] The categorical prediction drift metric to calculate. +*/ +@visibility("read", "create") +"metric": CategoricalPredictionDriftMetric; +/** +* [Required] Specifies the data type of the metric threshold. +*/ +"dataType": "Categorical"; +} - @doc("The storage format for this entity. Used for NCD.") - modelType?: string; - @doc("The URI path to the model contents.") - modelUri?: string; +@discriminator("dataType") +model PredictionDriftMetricThresholdBase { +/** +* The threshold value. If null, a default value will be set depending on the selected metric. +*/ +@visibility("read", "create") +"threshold"?: MonitoringThreshold; +} - @doc("Provisioning state for the model version.") - @visibility("read") - provisioningState?: AssetProvisioningState; +/** +* Certificate datastore credentials configuration. +*/ +model CertificateDatastoreCredentials extends DatastoreCredentials { +/** +* Authority URL used for authentication. +*/ +"authorityUrl"?: string; +/** +* [Required] Service principal client ID. +*/ +"clientId": string; +/** +* Resource the service principal has access to. +*/ +"resourceUrl"?: string; +/** +* [Required] Service principal secrets. +*/ +@visibility("create", "update") +"secrets": CertificateDatastoreSecrets; +/** +* [Required] ID of the tenant to which the service principal belongs. +*/ +"tenantId": string; +/** +* [Required] Thumbprint of the certificate used for authentication. +*/ +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"thumbprint": string; +/** +* [Required] Credential type used to authentication with storage. +*/ +"credentialsType": "Certificate"; +} + +/** +* Datastore certificate secrets. +*/ +model CertificateDatastoreSecrets extends DatastoreSecrets { +/** +* Service principal certificate. +*/ +"certificate"?: string; +/** +* [Required] Credential type used to authentication with storage. +*/ +"secretsType": "Certificate"; +} + +/** +* Classification task in AutoML Table vertical. +*/ +model Classification extends AutoMLVertical { +...TableVertical; +/** +* Positive label for binary metrics calculation. +*/ +"positiveLabel"?: string; +/** +* Primary metric for the task. +*/ +"primaryMetric"?: ClassificationPrimaryMetrics; +/** +* Inputs for training phase for an AutoML Job. +*/ +"trainingSettings"?: ClassificationTrainingSettings; +/** +* [Required] Task type for AutoMLJob. +*/ +"taskType": "Classification"; +} + +/** +* Classification Training related configuration. +*/ +model ClassificationTrainingSettings extends TrainingSettings { +/** +* Allowed models for classification task. +*/ +"allowedTrainingAlgorithms"?: ClassificationModels[]; +/** +* Blocked models for classification task. +*/ +"blockedTrainingAlgorithms"?: ClassificationModels[]; +} + +/** +* Training related configuration. +*/ +model TrainingSettings { +/** +* Enable recommendation of DNN models. +*/ +"enableDnnTraining"?: boolean; +/** +* Flag to turn on explainability on best model. +*/ +"enableModelExplainability"?: boolean = true; +/** +* Flag for enabling onnx compatible models. +*/ +"enableOnnxCompatibleModels"?: boolean; +/** +* Enable stack ensemble run. +*/ +"enableStackEnsemble"?: boolean = true; +/** +* Enable voting ensemble run. +*/ +"enableVoteEnsemble"?: boolean = true; +/** +* During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. +Configure this parameter with a higher value than 300 secs, if more time is needed. +*/ +"ensembleModelDownloadTimeout"?: duration = duration.PT5M; +/** +* Stack ensemble settings for stack ensemble run. +*/ +"stackEnsembleSettings"?: StackEnsembleSettings; +/** +* TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future may result in mixed mode or heuristics based mode selection. Default is 'auto'. +If 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. +If 'NonDistributed' then only non distributed algorithms are chosen. +*/ +"trainingMode"?: TrainingMode; +} - @doc("Stage in the model lifecycle assigned to this model") - stage?: string; +/** +* Advances setting to customize StackEnsemble run. +*/ +model StackEnsembleSettings { +/** +* Optional parameters to pass to the initializer of the meta-learner. +*/ +"stackMetaLearnerKWargs"?: Record; +/** +* Specifies the proportion of the training set (when choosing train and validation type of training) to be reserved for training the meta-learner. Default value is 0.2. +*/ +"stackMetaLearnerTrainPercentage"?: float64 = 0.2; +/** +* The meta-learner is a model trained on the output of the individual heterogeneous models. +*/ +"stackMetaLearnerType"?: StackMetaLearnerType; +} + +/** +* Abstract class for AutoML tasks that use table dataset as input - such as Classification/Regression/Forecasting. +*/ +model TableVertical { +/** +* Columns to use for CVSplit data. +*/ +"cvSplitColumnNames"?: string[]; +/** +* Featurization inputs needed for AutoML job. +*/ +"featurizationSettings"?: TableVerticalFeaturizationSettings; +/** +* Model/training parameters that will remain constant throughout training. +*/ +"fixedParameters"?: TableFixedParameters; +/** +* Execution constraints for AutoMLJob. +*/ +"limitSettings"?: TableVerticalLimitSettings; +/** +* Number of cross validation folds to be applied on training dataset +when validation dataset is not provided. +*/ +"nCrossValidations"?: NCrossValidations; +/** +* Search space for sampling different combinations of models and their hyperparameters. +*/ +"searchSpace"?: TableParameterSubspace[]; +/** +* Settings for model sweeping and hyperparameter tuning. +*/ +"sweepSettings"?: TableSweepSettings; +/** +* Test data input. +*/ +"testData"?: MLTableJobInput; +/** +* The fraction of test dataset that needs to be set aside for validation purpose. +Values between (0.0 , 1.0) +Applied when validation dataset is not provided. +*/ +"testDataSize"?: float64; +/** +* Validation data inputs. +*/ +"validationData"?: MLTableJobInput; +/** +* The fraction of training dataset that needs to be set aside for validation purpose. +Values between (0.0 , 1.0) +Applied when validation dataset is not provided. +*/ +"validationDataSize"?: float64; +/** +* The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. +*/ +"weightColumnName"?: string; } -model FlavorData { - @doc("Model flavor-specific data.") - data?: Record; +/** +* Featurization Configuration. +*/ +model TableVerticalFeaturizationSettings extends FeaturizationSettings { +/** +* These transformers shall not be used in featurization. +*/ +"blockedTransformers"?: BlockedTransformers[]; +/** +* Dictionary of column name and its type (int, float, string, datetime etc). +*/ +"columnNameAndTypes"?: Record; +/** +* Determines whether to use Dnn based featurizers for data featurization. +*/ +"enableDnnFeaturization"?: boolean; +/** +* Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of necessary transformation of the data in featurization phase. +If 'Off' is selected then no featurization is done. +If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. +*/ +"mode"?: FeaturizationMode; +/** +* User can specify additional transformers to be used along with the columns to which it would be applied and parameters for the transformer constructor. +*/ +"transformerParams"?: Record; } -@doc("Model package operation request properties.") -model PackageRequest { - @doc("Base environment to start with.") - @visibility("read", "create") - baseEnvironmentSource?: BaseEnvironmentSource; +/** +* Column transformer parameters. +*/ +model ColumnTransformer { +/** +* Fields to apply transformer logic on. +*/ +"fields"?: string[]; +/** +* Different properties to be passed to transformer. +Input expected is dictionary of key,value pairs in JSON format. +*/ +"parameters"?: Record; +} - @doc("Collection of environment variables.") - @visibility("read", "create") - environmentVariables?: Record; +/** +* Featurization Configuration. +*/ +model FeaturizationSettings { +/** +* Dataset language, useful for the text data. +*/ +"datasetLanguage"?: string; +} - @doc("[Required] Inferencing server configurations.") - @visibility("read", "create") - inferencingServer: InferencingServer; +/** +* Fixed training parameters that won't be swept over during AutoML Table training. +*/ +model TableFixedParameters { +/** +* Specify the boosting type, e.g gbdt for XGBoost. +*/ +"booster"?: string; +/** +* Specify the boosting type, e.g gbdt for LightGBM. +*/ +"boostingType"?: string; +/** +* Specify the grow policy, which controls the way new nodes are added to the tree. +*/ +"growPolicy"?: string; +/** +* The learning rate for the training procedure. +*/ +"learningRate"?: float64; +/** +* Specify the Maximum number of discrete bins to bucket continuous features . +*/ +"maxBin"?: int32; +/** +* Specify the max depth to limit the tree depth explicitly. +*/ +"maxDepth"?: int32; +/** +* Specify the max leaves to limit the tree leaves explicitly. +*/ +"maxLeaves"?: int32; +/** +* The minimum number of data per leaf. +*/ +"minDataInLeaf"?: int32; +/** +* Minimum loss reduction required to make a further partition on a leaf node of the tree. +*/ +"minSplitGain"?: float64; +/** +* The name of the model to train. +*/ +"modelName"?: string; +/** +* Specify the number of trees (or rounds) in an model. +*/ +"nEstimators"?: int32; +/** +* Specify the number of leaves. +*/ +"numLeaves"?: int32; +/** +* The name of the preprocessor to use. +*/ +"preprocessorName"?: string; +/** +* L1 regularization term on weights. +*/ +"regAlpha"?: float64; +/** +* L2 regularization term on weights. +*/ +"regLambda"?: float64; +/** +* Subsample ratio of the training instance. +*/ +"subsample"?: float64; +/** +* Frequency of subsample. +*/ +"subsampleFreq"?: float64; +/** +* Specify the tree method. +*/ +"treeMethod"?: string; +/** +* If true, center before scaling the data with StandardScalar. +*/ +"withMean"?: boolean; +/** +* If true, scaling the data with Unit Variance with StandardScalar. +*/ +"withStd"?: boolean; +} + +/** +* Job execution constraints. +*/ +model TableVerticalLimitSettings { +/** +* Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score improvement in last 20 iterations. +*/ +"enableEarlyTermination"?: boolean = true; +/** +* Exit score for the AutoML job. +*/ +"exitScore"?: float64; +/** +* Maximum Concurrent iterations. +*/ +"maxConcurrentTrials"?: int32 = 1; +/** +* Max cores per iteration. +*/ +"maxCoresPerTrial"?: int32 = -1; +/** +* Maximum nodes to use for the experiment. +*/ +"maxNodes"?: int32 = 1; +/** +* Number of iterations. +*/ +"maxTrials"?: int32 = 1000; +/** +* Number of concurrent sweeping runs that user wants to trigger. +*/ +"sweepConcurrentTrials"?: int32; +/** +* Number of sweeping runs that user wants to trigger. +*/ +"sweepTrials"?: int32; +/** +* AutoML job timeout. +*/ +"timeout"?: duration = duration.PT6H; +/** +* Iteration timeout. +*/ +"trialTimeout"?: duration = duration.PT30M; +} - @doc("Collection of inputs.") - @visibility("read", "create") - inputs?: ModelPackageInput[]; - @doc("Model configuration including the mount mode.") - @visibility("read", "create") - modelConfiguration?: ModelConfiguration; +model TableParameterSubspace { +/** +* Specify the boosting type, e.g gbdt for XGBoost. +*/ +"booster"?: string; +/** +* Specify the boosting type, e.g gbdt for LightGBM. +*/ +"boostingType"?: string; +/** +* Specify the grow policy, which controls the way new nodes are added to the tree. +*/ +"growPolicy"?: string; +/** +* The learning rate for the training procedure. +*/ +"learningRate"?: string; +/** +* Specify the Maximum number of discrete bins to bucket continuous features . +*/ +"maxBin"?: string; +/** +* Specify the max depth to limit the tree depth explicitly. +*/ +"maxDepth"?: string; +/** +* Specify the max leaves to limit the tree leaves explicitly. +*/ +"maxLeaves"?: string; +/** +* The minimum number of data per leaf. +*/ +"minDataInLeaf"?: string; +/** +* Minimum loss reduction required to make a further partition on a leaf node of the tree. +*/ +"minSplitGain"?: string; +/** +* The name of the model to train. +*/ +"modelName"?: string; +/** +* Specify the number of trees (or rounds) in an model. +*/ +"nEstimators"?: string; +/** +* Specify the number of leaves. +*/ +"numLeaves"?: string; +/** +* The name of the preprocessor to use. +*/ +"preprocessorName"?: string; +/** +* L1 regularization term on weights. +*/ +"regAlpha"?: string; +/** +* L2 regularization term on weights. +*/ +"regLambda"?: string; +/** +* Subsample ratio of the training instance. +*/ +"subsample"?: string; +/** +* Frequency of subsample +*/ +"subsampleFreq"?: string; +/** +* Specify the tree method. +*/ +"treeMethod"?: string; +/** +* If true, center before scaling the data with StandardScalar. +*/ +"withMean"?: string; +/** +* If true, scaling the data with Unit Variance with StandardScalar. +*/ +"withStd"?: string; +} - @doc("Tag dictionary. Tags can be added, removed, and updated.") - @visibility("read", "create") - tags?: Record; - @doc("[Required] Arm ID of the target environment to be created by package operation.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - targetEnvironmentId: string; +model TableSweepSettings { +/** +* Type of early termination policy for the sweeping job. +*/ +"earlyTermination"?: EarlyTerminationPolicy; +/** +* [Required] Type of sampling algorithm. +*/ +"samplingAlgorithm": SamplingAlgorithmType; } -@discriminator("baseEnvironmentSourceType") -model BaseEnvironmentSource {} -@discriminator("serverType") -model InferencingServer {} +model ClassificationModelPerformanceMetricThreshold extends ModelPerformanceMetricThresholdBase { +/** +* [Required] The classification model performance to calculate. +*/ +@visibility("read", "create") +"metric": ClassificationModelPerformanceMetric; +/** +* [Required] Specifies the data type of the metric threshold. +*/ +"modelType": "Classification"; +} -@doc("Model package input options.") -model ModelPackageInput { - @doc("[Required] Type of the input included in the target image.") - inputType: PackageInputType; - @doc("Input delivery mode of the input.") - mode?: PackageInputDeliveryMode; +@discriminator("modelType") +model ModelPerformanceMetricThresholdBase { +/** +* The threshold value. If null, a default value will be set depending on the selected metric. +*/ +@visibility("read", "create") +"threshold"?: MonitoringThreshold; +} - @doc("Relative mount path of the input in the target image.") - mountPath?: string; - @doc("[Required] Location of the input.") - path: PackageInputPathBase; +model CocoExportSummary extends ExportSummary { +/** +* The container name to which the labels will be exported. +*/ +@visibility("read") +"containerName"?: string; +/** +* The output path where the labels will be exported. +*/ +@visibility("read") +"snapshotPath"?: string; +/** +* [Required] The format of exported labels, also as the discriminator. +*/ +"format": "Coco"; +} + +/** +* Command job definition. +*/ +model CommandJob extends JobBase { +/** +* Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. +*/ +@visibility("read", "create") +"autologgerSettings"?: AutologgerSettings; +/** +* ARM resource ID of the code asset. +*/ +@visibility("read", "create") +"codeId"?: string; +/** +* [Required] The command to execute on startup of the job. eg. "python train.py" +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"command": string; +/** +* Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, Ray, or null. +*/ +@visibility("read", "create") +"distribution"?: DistributionConfiguration; +/** +* [Required] The ARM resource ID of the Environment specification for the job. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"environmentId": string; +/** +* Environment variables included in the job. +*/ +@visibility("read", "create") +"environmentVariables"?: Record; +/** +* Mapping of input data bindings used in the job. +*/ +@visibility("read", "create") +"inputs"?: Record; +/** +* Command Job limit. +*/ +@visibility("read", "create") +"limits"?: CommandJobLimits; +/** +* Mapping of output data bindings used in the job. +*/ +@visibility("read", "create") +"outputs"?: Record; +/** +* Input parameters. +*/ +@visibility("read") +"parameters"?: Record; +/** +* Queue settings for the job +*/ +@visibility("read", "create") +"queueSettings"?: QueueSettings; +/** +* Compute Resource configuration for the job. +*/ +@visibility("read", "create") +"resources"?: JobResourceConfiguration; +/** +* [Required] Specifies the type of job. +*/ +"jobType": "Command"; +} + +/** +* Base definition for job distribution configuration. +*/ +@discriminator("distributionType") +model DistributionConfiguration { } -@discriminator("inputPathType") -model PackageInputPathBase {} +/** +* Command Job limit class. +*/ +model CommandJobLimits extends JobLimits { +/** +* [Required] JobLimit type. +*/ +"jobLimitsType": "Command"; +} -@doc("Model configuration options.") -model ModelConfiguration { - @doc("Input delivery mode for the model.") - mode?: PackageInputDeliveryMode; - @doc("Relative mounting path of the model in the target image.") - mountPath?: string; +@discriminator("jobLimitsType") +model JobLimits { +/** +* The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. +*/ +"timeout"?: duration; } -@doc("Package response returned after async package operation completes successfully.") -model PackageResponse { - @doc("Base environment to start with.") - @visibility("read") - baseEnvironmentSource?: BaseEnvironmentSource; +/** +* Resource requirements for each container instance within an online deployment. +*/ +model ContainerResourceRequirements { +/** +* Container resource limit info: +*/ +"containerResourceLimits"?: ContainerResourceSettings; +/** +* Container resource request info: +*/ +"containerResourceRequests"?: ContainerResourceSettings; +} - @doc("Build id of the image build operation.") - @visibility("read") - buildId?: string; - @doc("Build state of the image build operation.") - @visibility("read") - buildState?: PackageBuildState; +model ContainerResourceSettings { +/** +* Number of vCPUs request/limit for container. More info: +https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +*/ +"cpu"?: string; +/** +* Number of Nvidia GPU cards request/limit for container. More info: +https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +*/ +"gpu"?: string; +/** +* Memory size request/limit for container. More info: +https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +*/ +"memory"?: string; +} - @doc("Collection of environment variables.") - @visibility("read") - environmentVariables?: Record; - @doc("Inferencing server configurations.") - @visibility("read") - inferencingServer?: InferencingServer; +model CreateMonitorAction extends ScheduleActionBase { +/** +* [Required] Defines the monitor. +*/ +@visibility("read", "create") +"monitorDefinition": MonitorDefinition; +/** +* [Required] Specifies the action type of the schedule +*/ +"actionType": "CreateMonitor"; +} - @doc("Collection of inputs.") - @visibility("read") - inputs?: ModelPackageInput[]; - @doc("Log url of the image build operation.") - @visibility("read") - logUrl?: string; +model MonitorDefinition { +/** +* The monitor's notification settings. +*/ +@visibility("read", "create") +"alertNotificationSetting"?: MonitoringAlertNotificationSettingsBase; +/** +* [Required] The ARM resource ID of the compute resource to run the monitoring job on. +*/ +@visibility("read", "create") +"computeConfiguration": MonitorComputeConfigurationBase; +/** +* The ARM resource ID of either the model or deployment targeted by this monitor. +*/ +@visibility("read", "create") +"monitoringTarget"?: MonitoringTarget; +/** +* [Required] The signals to monitor. +*/ +@visibility("read", "create") +"signals": Record; +} + +/** +* Monitor compute configuration base definition. +*/ +@discriminator("computeType") +model MonitorComputeConfigurationBase { +} - @doc("Model configuration including the mount mode.") - @visibility("read") - modelConfiguration?: ModelConfiguration; +/** +* Monitoring target definition. +*/ +model MonitoringTarget { +/** +* The ARM resource ID of either the deployment targeted by this monitor. +*/ +@visibility("read", "create") +"deploymentId"?: string; +/** +* The ARM resource ID of either the model targeted by this monitor. +*/ +@visibility("read", "create") +"modelId"?: string; +/** +* [Required] The machine learning task type of the model. +*/ +@visibility("read", "create") +"taskType": ModelTaskType; +} - @doc("Tag dictionary. Tags can be added, removed, and updated.") - @visibility("read") - tags?: Record; - @doc("Asset ID of the target environment created by package operation.") - @visibility("read") - targetEnvironmentId?: string; +@discriminator("signalType") +model MonitoringSignalBase { +/** +* The current notification mode for this signal. +*/ +@visibility("read", "create") +"mode"?: MonitoringNotificationMode; +/** +* Property dictionary. Properties can be added, but not removed or altered. +*/ +"properties"?: Record; } -@doc("Batch endpoint configuration.") -model BatchEndpoint extends EndpointPropertiesBase { - @doc("Default values for Batch Endpoint.") - defaults?: BatchEndpointDefaults; - @doc("Provisioning state for the endpoint.") - @visibility("read") - provisioningState?: EndpointProvisioningState; +model CronTrigger extends TriggerBase { +/** +* [Required] Specifies cron expression of schedule. +The expression should follow NCronTab format. +*/ +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"expression": string; +/** +* [Required] +*/ +"triggerType": "Cron"; } -@doc("Batch endpoint default values") -model BatchEndpointDefaults { - @doc(""" -Name of the deployment that will be default for the endpoint. -This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. -""") - deploymentName?: string; + +model CsvExportSummary extends ExportSummary { +/** +* The container name to which the labels will be exported. +*/ +@visibility("read") +"containerName"?: string; +/** +* The output path where the labels will be exported. +*/ +@visibility("read") +"snapshotPath"?: string; +/** +* [Required] The format of exported labels, also as the discriminator. +*/ +"format": "CSV"; +} + +/** +* The desired maximum forecast horizon in units of time-series frequency. +*/ +model CustomForecastHorizon extends ForecastHorizon { +/** +* [Required] Forecast horizon value. +*/ +"value": int32; +/** +* [Required] Set forecast horizon value selection mode. +*/ +"mode": "Custom"; +} + +/** +* Custom inference server configurations. +*/ +model CustomInferencingServer extends InferencingServer { +/** +* Inference configuration for custom inferencing. +*/ +"inferenceConfiguration"?: OnlineInferenceConfiguration; +/** +* [Required] Inferencing server type for various targets. +*/ +"serverType": "Custom"; +} + +/** +* Online inference configuration options. +*/ +model OnlineInferenceConfiguration { +/** +* Additional configurations +*/ +"configurations"?: Record; +/** +* Entry script or command to invoke. +*/ +"entryScript"?: string; +/** +* The route to check the liveness of the inference server container. +*/ +"livenessRoute"?: Route; +/** +* The route to check the readiness of the inference server container. +*/ +"readinessRoute"?: Route; +/** +* The port to send the scoring requests to, within the inference server container. +*/ +"scoringRoute"?: Route; } -@doc("Inference Endpoint base definition") -model EndpointPropertiesBase { - @doc("[Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does.") - authMode: EndpointAuthMode; - @doc("Description of the inference endpoint.") - description?: string; +model CustomMetricThreshold { +/** +* [Required] The user-defined metric to calculate. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"metric": string; +/** +* The threshold value. If null, a default value will be set depending on the selected metric. +*/ +@visibility("read", "create") +"threshold"?: MonitoringThreshold; +} - @doc(""" -EndpointAuthKeys to set initially on an Endpoint. -This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. -""") - @visibility("create") - keys?: EndpointAuthKeys; - @doc("Property dictionary. Properties can be added, but not removed or altered.") - properties?: Record; +model CustomModelJobInput extends JobInput { +...AssetJobInput; +/** +* [Required] Specifies the type of job. +*/ +"jobInputType": "custom_model"; +} - @doc("Endpoint URI.") - @visibility("read") - scoringUri?: string; - @doc("Endpoint Swagger URI.") - @visibility("read") - swaggerUri?: string; +model CustomModelJobOutput extends JobOutput { +...AssetJobOutput; +/** +* [Required] Specifies the type of job. +*/ +"jobOutputType": "custom_model"; } -@doc("Keys for endpoint authentication.") -model EndpointAuthKeys { - @doc("The primary key.") - @visibility("read", "create") - primaryKey?: string; - @doc("The secondary key.") - @visibility("read", "create") - secondaryKey?: string; +model CustomMonitoringSignal extends MonitoringSignalBase { +/** +* [Required] ARM resource ID of the component resource used to calculate the custom metrics. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"componentId": string; +/** +* Monitoring assets to take as input. Key is the component input port name, value is the data asset. +*/ +@visibility("read", "create") +"inputAssets"?: Record; +/** +* Extra component parameters to take as input. Key is the component literal input port name, value is the parameter value. +*/ +@visibility("read", "create") +"inputs"?: Record; +/** +* [Required] A list of metrics to calculate and their associated thresholds. +*/ +@visibility("read", "create") +"metricThresholds": CustomMetricThreshold[]; +/** +* [Required] A list of metrics to calculate and their associated thresholds. +*/ +@visibility("read", "create") +"workspaceConnection": MonitoringWorkspaceConnection; +/** +* [Required] Specifies the type of signal to monitor. +*/ +"signalType": "Custom"; +} + +/** +* Monitoring input data base definition. +*/ +@discriminator("inputDataType") +model MonitoringInputDataBase { +/** +* Mapping of column names to special uses. +*/ +@visibility("read", "create") +"columns"?: Record; +/** +* The context metadata of the data source. +*/ +@visibility("read", "create") +"dataContext"?: string; +/** +* [Required] Specifies the type of job. +*/ +@visibility("read", "create") +"jobInputType": JobInputType; +/** +* [Required] Input Asset URI. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"uri": string; +} + +/** +* Monitoring workspace connection definition. +*/ +model MonitoringWorkspaceConnection { +/** +* The properties of a workspace service connection to store as environment variables in the submitted jobs. +Key is workspace connection property path, name is environment variable key. +*/ +@visibility("read", "create") +"environmentVariables"?: Record; +/** +* The properties of a workspace service connection to store as secrets in the submitted jobs. +Key is workspace connection property path, name is secret key. +*/ +@visibility("read", "create") +"secrets"?: Record; } -@doc("Strictly used in update requests.") -model PartialMinimalTrackedResourceWithIdentity - extends PartialMinimalTrackedResource { - @doc("Managed service identity (system assigned and/or user assigned identities)") - identity?: PartialManagedServiceIdentity; +/** +* N-Cross validations are specified by user. +*/ +model CustomNCrossValidations extends NCrossValidations { +/** +* [Required] N-Cross validations value. +*/ +"value": int32; +/** +* [Required] Mode for determining N-Cross validations. +*/ +"mode": "Custom"; } -@doc("Managed service identity (system assigned and/or user assigned identities)") -model PartialManagedServiceIdentity { - @doc("Managed service identity (system assigned and/or user assigned identities)") - type?: ManagedServiceIdentityType; - @doc("The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.") - userAssignedIdentities?: Record>; +model CustomSeasonality extends Seasonality { +/** +* [Required] Seasonality value. +*/ +"value": int32; +/** +* [Required] Seasonality mode. +*/ +"mode": "Custom"; } -@doc("Strictly used in update requests.") -model PartialMinimalTrackedResource { - @doc("Resource tags.") - tags?: Record; -} -@doc("Batch inference settings per deployment.") -model BatchDeployment extends EndpointDeploymentPropertiesBase { - @doc("Compute target for batch inference operation.") - compute?: string; +model CustomTargetLags extends TargetLags { +/** +* [Required] Set target lags values. +*/ +"values": int32[]; +/** +* [Required] Set target lags mode - Auto/Custom +*/ +"mode": "Custom"; +} - @doc("Properties relevant to different deployment types.") - deploymentConfiguration?: BatchDeploymentConfiguration; - @doc(""" -Error threshold, if the error count for the entire input goes above this value, -the batch inference will be aborted. Range is [-1, int.MaxValue]. -For FileDataset, this value is the count of file failures. -For TabularDataset, this value is the count of record failures. -If set to -1 (the lower bound), all failures during batch inference will be ignored. -""") - errorThreshold?: int32; +model CustomTargetRollingWindowSize extends TargetRollingWindowSize { +/** +* [Required] TargetRollingWindowSize value. +*/ +"value": int32; +/** +* [Required] TargetRollingWindowSiz detection mode. +*/ +"mode": "Custom"; +} - @doc("Logging level for batch inference operation.") - loggingLevel?: BatchLoggingLevel; - @doc("Indicates maximum number of parallelism per instance.") - maxConcurrencyPerInstance?: int32; +model DataDriftMonitoringSignal extends MonitoringSignalBase { +/** +* The data segment used for scoping on a subset of the data population. +*/ +@visibility("read", "create") +"dataSegment"?: MonitoringDataSegment; +/** +* A dictionary that maps feature names to their respective data types. +*/ +@visibility("read", "create") +"featureDataTypeOverride"?: Record; +/** +* The feature filter which identifies which feature to calculate drift over. +*/ +@visibility("read", "create") +"features"?: MonitoringFeatureFilterBase; +/** +* [Required] A list of metrics to calculate and their associated thresholds. +*/ +@visibility("read", "create") +"metricThresholds": DataDriftMetricThresholdBase[]; +/** +* [Required] The data which drift will be calculated for. +*/ +@visibility("read", "create") +"productionData": MonitoringInputDataBase; +/** +* [Required] The data to calculate drift against. +*/ +@visibility("read", "create") +"referenceData": MonitoringInputDataBase; +/** +* [Required] Specifies the type of signal to monitor. +*/ +"signalType": "DataDrift"; +} - @doc(""" -Size of the mini-batch passed to each batch invocation. -For FileDataset, this is the number of files per mini-batch. -For TabularDataset, this is the size of the records in bytes, per mini-batch. -""") - miniBatchSize?: int32; - @doc("Reference to the model asset for the endpoint deployment.") - `model`?: AssetReferenceBase; +model MonitoringDataSegment { +/** +* The feature to segment the data on. +*/ +@visibility("read", "create") +"feature"?: string; +/** +* Filters for only the specified values of the given segmented feature. +*/ +@visibility("read", "create") +"values"?: string[]; +} - @doc("Indicates how the output will be organized.") - outputAction?: BatchOutputAction; - @doc("Customized output file name for append_row output action.") - outputFileName?: string; +model DataImport extends DataVersionBase { +/** +* Name of the asset for data import job to create +*/ +"assetName"?: string; +/** +* Source data of the asset to import from +*/ +"source"?: DataImportSource; +/** +* [Required] Specifies the type of data. +*/ +"dataType": "uri_folder"; +} - @doc("Provisioning state for the endpoint deployment.") - @visibility("read") - provisioningState?: DeploymentProvisioningState; - @doc(""" -Indicates compute configuration for the job. -If not provided, will default to the defaults defined in ResourceConfiguration. -""") - resources?: DeploymentResourceConfiguration; +@discriminator("sourceType") +model DataImportSource { +/** +* Workspace connection for data import source storage +*/ +"connection"?: string; +} - @doc(""" -Retry Settings for the batch inference operation. -If not provided, will default to the defaults defined in BatchRetrySettings. -""") - retrySettings?: BatchRetrySettings; +/** +* Reference to an asset via its path in a datastore. +*/ +model DataPathAssetReference extends AssetReferenceBase { +/** +* ARM resource ID of the datastore where the asset is located. +*/ +"datastoreId"?: string; +/** +* The path of the file/directory in the datastore. +*/ +"path"?: string; +/** +* [Required] Specifies the type of asset reference. +*/ +"referenceType": "DataPath"; } -@doc("Properties relevant to different deployment types.") -@discriminator("deploymentConfigurationType") -model BatchDeploymentConfiguration {} - -@doc("Base definition for asset references.") -@discriminator("referenceType") -model AssetReferenceBase {} - -model DeploymentResourceConfiguration extends ResourceConfiguration {} - -model ResourceConfiguration { - @doc("Optional number of instances or nodes used by the compute target.") - @visibility("read", "create") - instanceCount?: int32; - - @doc("Optional type of VM used as supported by the compute target.") - @visibility("read", "create") - instanceType?: string; - - @doc("Locations where the job can run.") - @visibility("read", "create") - locations?: string[]; - - @doc(""" -Optional max allowed number of instances or nodes to be used by the compute target. -For use with elastic training, currently supported by PyTorch distribution type only. -""") - @visibility("read", "create") - maxInstanceCount?: int32; - - @doc("Additional properties bag.") - @visibility("read", "create") - properties?: Record>; -} - -@doc("Retry settings for a batch inference operation.") -model BatchRetrySettings { - @doc("Maximum retry count for a mini-batch") - maxRetries?: int32; - - @doc("Invocation timeout for a mini-batch, in ISO 8601 format.") - timeout?: duration; -} - -@doc("Base definition for endpoint deployment.") -model EndpointDeploymentPropertiesBase { - @doc("Code configuration for the endpoint deployment.") - codeConfiguration?: CodeConfiguration; - - @doc("Description of the endpoint deployment.") - description?: string; - - @doc("ARM resource ID of the environment specification for the endpoint deployment.") - environmentId?: string; - - @doc("Environment variables configuration for the deployment.") - environmentVariables?: Record; - - @doc("Property dictionary. Properties can be added, but not removed or altered.") - properties?: Record; -} - -@doc("Configuration for a scoring code asset.") -model CodeConfiguration { - @doc("ARM resource ID of the code asset.") - @visibility("read", "create") - codeId?: string; - - @doc("[Required] The script to execute on startup. eg. \"score.py\"") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - scoringScript: string; -} - -@doc("Strictly used in update requests.") -model PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties { - @doc("Additional attributes of the entity.") - properties?: PartialBatchDeployment; - - @doc("Resource tags.") - tags?: Record; -} - -@doc("Mutable batch inference settings per deployment.") -model PartialBatchDeployment { - @doc("Description of the endpoint deployment.") - description?: string; -} - -@doc("Base definition for datastore contents configuration.") -@discriminator("datastoreType") -model Datastore extends ResourceBase { - @doc("[Required] Account credentials.") - credentials: DatastoreCredentials; - - @doc("Intellectual Property details.") - @visibility("read", "create") - intellectualProperty?: IntellectualProperty; - - @doc("Readonly property to indicate if datastore is the workspace default datastore") - @visibility("read") - isDefault?: boolean; -} - -@doc("Base definition for datastore credentials.") -@discriminator("credentialsType") -model DatastoreCredentials {} - -@doc("Base definition for datastore secrets.") -@discriminator("secretsType") -model DatastoreSecrets {} - -@doc("Dto object representing feature set") -model FeaturesetContainerProperties extends AssetContainer { - @doc("Provisioning state for the featureset container.") - @visibility("read") - provisioningState?: AssetProvisioningState; -} - -@doc("Dto object representing feature") -model FeatureProperties extends ResourceBase { - @doc("Specifies type") - dataType?: FeatureDataType; - - @doc("Specifies name") - featureName?: string; -} - -@doc("Dto object representing feature set version") -model FeaturesetVersionProperties extends AssetBase { - @doc("Specifies list of entities") - entities?: string[]; - - @doc("Specifies the materialization settings") - materializationSettings?: MaterializationSettings; - - @doc("Provisioning state for the featureset version container.") - @visibility("read") - provisioningState?: AssetProvisioningState; - - @doc("Specifies the feature spec details") - specification?: FeaturesetSpecification; - - @doc("Specifies the asset stage") - stage?: string; -} - -model MaterializationSettings { - @doc("Specifies the notification details") - notification?: NotificationSetting; - - @doc("Specifies the compute resource settings") - resource?: MaterializationComputeResource; - - @doc("Specifies the schedule details") - schedule?: RecurrenceTrigger; - - @doc("Specifies the spark compute settings") - sparkConfiguration?: Record; - - @doc("Specifies the stores to which materialization should happen") - storeType?: MaterializationStoreType; -} - -@doc("Configuration for notification.") -model NotificationSetting { - @doc("Send email notification to user on specified notification type") - @visibility("read", "create") - emailOn?: EmailNotificationEnableType[]; - - @doc("This is the email recipient list which has a limitation of 499 characters in total concat with comma separator") - @visibility("read", "create") - emails?: string[]; - - @doc("Send webhook callback to a service. Key is a user-provided name for the webhook.") - @visibility("read", "create", "update") - webhooks?: Record; -} - -@doc("Webhook base") -@discriminator("webhookType") -model Webhook { - @doc("Send callback on a specified notification event") - @visibility("read", "create") - eventType?: string; -} - -@doc("Dto object representing compute resource") -model MaterializationComputeResource { - @doc("Specifies the instance type") - instanceType?: string; -} - -model RecurrenceTrigger extends TriggerBase { - @doc("[Required] The frequency to trigger schedule.") - frequency: RecurrenceFrequency; - - @doc("[Required] Specifies schedule interval in conjunction with frequency") - interval: int32; - - @doc("The recurrence schedule.") - schedule?: RecurrenceSchedule; - - @doc("[Required] ") - triggerType: "Recurrence"; -} - -model RecurrenceSchedule { - @doc("[Required] List of hours for the schedule.") - hours: int32[]; - - @doc("[Required] List of minutes for the schedule.") - minutes: int32[]; - - @doc("List of month days for the schedule") - monthDays?: int32[]; - - @doc("List of days for the schedule.") - weekDays?: WeekDay[]; -} - -@discriminator("triggerType") -model TriggerBase { - @doc(""" -Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. -Recommented format would be \"2022-06-01T00:00:01\" -If not present, the schedule will run indefinitely -""") - endTime?: string; - - @doc("Specifies start time of schedule in ISO 8601 format, but without a UTC offset.") - startTime?: string; - - @doc(""" -Specifies time zone in which the schedule runs. -TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 -""") - timeZone?: string; -} - -@doc("Dto object representing specification") -model FeaturesetSpecification { - @doc("Specifies the spec path") - path?: string; -} - -@doc("Request payload for creating a backfill request for a given feature set version") -model FeaturesetVersionBackfillRequest { - @doc("Specifies description") - description?: string; - - @doc("Specifies description") - displayName?: string; - - @doc("Specifies the backfill feature window to be materialized") - featureWindow?: FeatureWindow; - - @doc("Specifies the compute resource settings") - resource?: MaterializationComputeResource; - - @doc("Specifies the spark compute settings") - sparkConfiguration?: Record; - - @doc("Specifies the tags") - tags?: Record; -} - -@doc("Specifies the feature window") -model FeatureWindow { - @doc("Specifies the feature window end time") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - featureWindowEnd?: utcDateTime; - - @doc("Specifies the feature window start time") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - featureWindowStart?: utcDateTime; -} - -@doc("Dto object representing the feature set job") -model FeaturesetJob { - @doc("Specifies the created date") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - createdDate?: utcDateTime; - - @doc("Specifies the display name") - displayName?: string; - - @doc("Specifies the duration") - duration?: duration; - - @doc("Specifies the experiment id") - experimentId?: string; - - @doc("Specifies the backfill feature window to be materialized") - featureWindow?: FeatureWindow; - - @doc("Specifies the job id") - jobId?: string; - - @doc("Specifies the job status") - status?: JobStatus; - - @doc("Specifies the tags if any") - tags?: Record; - - @doc("Specifies the feature store job type") - type?: FeaturestoreJobType; -} - -@doc("A paginated list of FeaturesetJob entities.") -model FeaturesetJobArmPaginatedResult is Azure.Core.Page; - -@doc("Dto object representing feature entity") -model FeaturestoreEntityContainerProperties extends AssetContainer { - @doc("Provisioning state for the featurestore entity container.") - @visibility("read") - provisioningState?: AssetProvisioningState; -} - -@doc("Dto object representing feature entity version") -model FeaturestoreEntityVersionProperties extends AssetBase { - @doc("Specifies index columns") - indexColumns?: IndexColumn[]; - - @doc("Provisioning state for the featurestore entity version.") - @visibility("read") - provisioningState?: AssetProvisioningState; - - @doc("Specifies the asset stage") - stage?: string; -} - -@doc("Dto object representing index column") -model IndexColumn { - @doc("Specifies the column name") - columnName?: string; - - @doc("Specifies the data type") - dataType?: FeatureDataType; -} - -@doc("Base definition for a job.") -@discriminator("jobType") -model JobBase extends ResourceBase { - @doc("ARM resource ID of the component resource.") - @visibility("read", "create") - componentId?: string; - - @doc("ARM resource ID of the compute resource.") - @visibility("read", "create") - computeId?: string; - - @doc("Display name of job.") - @visibility("read", "create") - displayName?: string; - - @doc("The name of the experiment the job belongs to. If not set, the job is placed in the \"Default\" experiment.") - @visibility("read", "create") - experimentName?: string; - - @doc(""" -Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. -Defaults to AmlToken if null. -""") - @visibility("read", "create") - identity?: IdentityConfiguration; - - @doc("Is the asset archived?") - @visibility("read", "create", "update") - isArchived?: boolean; - - @doc("Notification setting for the job") - @visibility("read", "create", "update") - notificationSetting?: NotificationSetting; - - @doc("Configuration for secrets to be made available during runtime.") - @visibility("read", "create") - secretsConfiguration?: Record; - - @doc(""" -List of JobEndpoints. -For local jobs, a job endpoint will have an endpoint value of FileStreamObject. -""") - services?: Record; - - @doc("Status of the job.") - @visibility("read") - status?: JobStatus; -} - -@doc("Base definition for identity configuration.") -@discriminator("identityType") -model IdentityConfiguration {} - -@doc("Secret Configuration definition.") -model SecretConfiguration { - @doc(""" -Secret Uri. -Sample Uri : https://myvault.vault.azure.net/secrets/mysecretname/secretversion -""") - @visibility("read", "create") - uri?: string; - - @doc("Name of secret in workspace key vault.") - @visibility("read", "create") - workspaceSecretName?: string; -} - -@doc("Job endpoint definition") -model JobService { - @doc("Url for endpoint.") - @visibility("read", "create") - endpoint?: string; - - @doc("Any error in the service.") - @visibility("read") - errorMessage?: string; - - @doc("Endpoint type.") - @visibility("read", "create") - jobServiceType?: string; - - @doc(""" -Nodes that user would like to start the service on. -If Nodes is not set or set to null, the service will only be started on leader node. -""") - nodes?: Nodes; - - @doc("Port for endpoint set by user.") - @visibility("read", "create") - port?: int32; - - @doc("Additional properties to set on the endpoint.") - properties?: Record; - - @doc("Status of endpoint.") - @visibility("read") - status?: string; -} - -@doc("Abstract Nodes definition") -@discriminator("nodesValueType") -model Nodes {} - -@doc("Azure Resource Manager resource envelope strictly used in update requests.") -model PartialJobBasePartialResource { - @doc("Additional attributes of the entity.") - properties?: PartialJobBase; -} - -@doc("Mutable base definition for a job.") -model PartialJobBase { - @doc("Mutable notification setting for the job") - notificationSetting?: PartialNotificationSetting; -} - -@doc("Mutable configuration for notification.") -model PartialNotificationSetting { - @doc("Send webhook callback to a service. Key is a user-provided name for the webhook.") - webhooks?: Record; -} - -@doc("Labeling job definition") -model LabelingJobProperties extends JobBase { - @doc("Created time of the job in UTC timezone.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - createdDateTime?: utcDateTime; - - @doc("Configuration of data used in the job.") - @visibility("read", "create") - dataConfiguration?: LabelingDataConfiguration; - - @doc("Labeling instructions of the job.") - @visibility("read", "create", "update") - jobInstructions?: LabelingJobInstructions; - - @doc("Label categories of the job.") - @visibility("read", "create", "update") - labelCategories?: Record; - - @doc("Media type specific properties in the job.") - @visibility("read", "create") - labelingJobMediaProperties?: LabelingJobMediaProperties; - - @doc("Configuration of MLAssist feature in the job.") - @visibility("read", "create") - mlAssistConfiguration?: MLAssistConfiguration; - - @doc("Progress metrics of the job.") - @visibility("read") - progressMetrics?: ProgressMetrics; - - @doc("Internal id of the job(Previously called project).") - @visibility("read") - projectId?: string; - - @doc("Specifies the labeling job provisioning state.") - @visibility("read") - provisioningState?: JobProvisioningState; - - @doc("Status messages of the job.") - @visibility("read") - statusMessages?: StatusMessage[]; - - @doc("[Required] Specifies the type of job.") - jobType: "Labeling"; -} - -@doc("Labeling data configuration definition") -model LabelingDataConfiguration { - @doc("Resource Id of the data asset to perform labeling.") - @visibility("read", "create") - dataId?: string; - - @doc("Indicates whether to enable incremental data refresh.") - @visibility("read", "create", "update") - incrementalDataRefresh?: IncrementalDataRefresh; -} - -@doc("Instructions for labeling job") -model LabelingJobInstructions { - @doc("The link to a page with detailed labeling instructions for labelers.") - @visibility("read", "create", "update") - uri?: string; -} - -@doc("Label category definition") -model LabelCategory { - @doc("Dictionary of label classes in this category.") - @visibility("read", "create", "update") - classes?: Record; - - @doc("Display name of the label category.") - @visibility("read", "create") - displayName?: string; - - @doc("Indicates whether it is allowed to select multiple classes in this category.") - @visibility("read", "create", "update") - multiSelect?: MultiSelect; -} - -@doc("Label class definition") -model LabelClass { - @doc("Display name of the label class.") - @visibility("read", "create") - displayName?: string; - - @doc("Dictionary of subclasses of the label class.") - @visibility("read", "create", "update") - subclasses?: Record; -} - -@doc("Properties of a labeling job") -@discriminator("mediaType") -model LabelingJobMediaProperties {} - -@doc("Labeling MLAssist configuration definition") -@discriminator("mlAssist") -model MLAssistConfiguration {} - -@doc("Progress metrics definition") -model ProgressMetrics { - @doc("The completed datapoint count.") - @visibility("read") - completedDatapointCount?: int32; - - @doc("The time of last successful incremental data refresh in UTC.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - incrementalDataLastRefreshDateTime?: utcDateTime; - - @doc("The skipped datapoint count.") - @visibility("read") - skippedDatapointCount?: int32; - - @doc("The total datapoint count.") - @visibility("read") - totalDatapointCount?: int32; -} - -@doc("Active message associated with project") -model StatusMessage { - @doc("Service-defined message code.") - @visibility("read") - code?: string; - - @doc("Time in UTC at which the message was created.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - createdDateTime?: utcDateTime; - - @doc("Severity level of message.") - @visibility("read") - level?: StatusMessageLevel; - - @doc("A human-readable representation of the message code.") - @visibility("read") - message?: string; -} - -@discriminator("format") -model ExportSummary { - @doc("The time when the export was completed.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - endDateTime?: utcDateTime; - - @doc("The total number of labeled datapoints exported.") - @visibility("read") - exportedRowCount?: int32; - - @doc("Name and identifier of the job containing exported labels.") - @visibility("read") - labelingJobId?: string; - - @doc("The time when the export was requested.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - startDateTime?: utcDateTime; -} - -@doc("Online endpoint configuration") -model OnlineEndpoint extends EndpointPropertiesBase { - @doc(""" -ARM resource ID of the compute if it exists. -optional -""") - compute?: string; - - @doc("Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50.") - mirrorTraffic?: Record; - - @doc("Provisioning state for the endpoint.") - @visibility("read") - provisioningState?: EndpointProvisioningState; - - @doc("Set to \"Enabled\" for endpoints that should allow public access when Private Link is enabled.") - publicNetworkAccess?: PublicNetworkAccessType; - - @doc("Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100.") - traffic?: Record; -} - -@discriminator("endpointComputeType") -model OnlineDeployment extends EndpointDeploymentPropertiesBase { - @doc("If true, enables Application Insights logging.") - appInsightsEnabled?: boolean; - - @doc("The mdc configuration, we disable mdc when it's null.") - dataCollector?: DataCollector; - - @doc("If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled.") - egressPublicNetworkAccess?: EgressPublicNetworkAccessType; - - @doc("Compute instance type.") - @visibility("read", "create") - instanceType?: string; - - @doc("Liveness probe monitors the health of the container regularly.") - livenessProbe?: ProbeSettings; - - @doc("The URI path to the model.") - `model`?: string; - - @doc("The path to mount the model in custom container.") - modelMountPath?: string; - - @doc("Provisioning state for the endpoint deployment.") - @visibility("read") - provisioningState?: DeploymentProvisioningState; - - @doc("Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe.") - readinessProbe?: ProbeSettings; - - @doc("Request settings for the deployment.") - requestSettings?: OnlineRequestSettings; - - @doc(""" -Scale settings for the deployment. -If it is null or not provided, -it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment -and to DefaultScaleSettings for ManagedOnlineDeployment. -""") - scaleSettings?: OnlineScaleSettings; -} - -model DataCollector { - @doc(""" -[Required] The collection configuration. Each collection has it own configuration to collect model data and the name of collection can be arbitrary string. -Model data collector can be used for either payload logging or custom logging or both of them. Collection request and response are reserved for payload logging, others are for custom logging. -""") - collections: Record; - - @doc("The request logging configuration for mdc, it includes advanced logging settings for all collections. It's optional.") - requestLogging?: RequestLogging; - - @doc(""" -When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of them in a single blob file. -If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. -If it's day, all data will be collected in blob path /yyyy/MM/dd/. -The other benefit of rolling path is that model monitoring ui is able to select a time range of data very quickly. -""") - rollingRate?: RollingRateType; -} - -model Collection { - @doc("The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint identity to auth.") - clientId?: string; - - @doc("Enable or disable data collection.") - dataCollectionMode?: DataCollectionMode; - - @doc("The data asset arm resource id. Client side will ensure data asset is pointing to the blob storage, and backend will collect data to the blob storage.") - dataId?: string; - - @doc("The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default.") - samplingRate?: float32; -} - -model RequestLogging { - @doc("For payload logging, we only collect payload by default. If customers also want to collect the specified headers, they can set them in captureHeaders so that backend will collect those headers along with payload.") - captureHeaders?: string[]; -} - -@doc("Deployment container liveness/readiness probe configuration.") -model ProbeSettings { - @doc("The number of failures to allow before returning an unhealthy status.") - failureThreshold?: int32; - - @doc("The delay before the first probe in ISO 8601 format.") - initialDelay?: duration; - - @doc("The length of time between probes in ISO 8601 format.") - period?: duration; - - @doc("The number of successful probes before returning a healthy status.") - successThreshold?: int32; - - @doc("The probe timeout in ISO 8601 format.") - timeout?: duration; -} - -@doc("Online deployment scoring requests configuration.") -model OnlineRequestSettings { - @doc("The number of maximum concurrent requests per node allowed per deployment. Defaults to 1.") - maxConcurrentRequestsPerInstance?: int32; - - @doc(""" -The maximum amount of time a request will stay in the queue in ISO 8601 format. -Defaults to 500ms. -""") - maxQueueWait?: duration; - - @doc(""" -The scoring timeout in ISO 8601 format. -Defaults to 5000ms. -""") - requestTimeout?: duration; -} - -@doc("Online deployment scaling configuration.") -@discriminator("scaleType") -model OnlineScaleSettings {} - -@doc("Strictly used in update requests.") -model PartialMinimalTrackedResourceWithSku - extends PartialMinimalTrackedResource { - @doc("Sku details required for ARM contract for Autoscaling.") - sku?: PartialSku; -} - -@doc("Common SKU definition.") -model PartialSku { - @doc("If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.") - capacity?: int32; - - @doc("If the service has different generations of hardware, for the same SKU, then that can be captured here.") - family?: string; - - @doc("The name of the SKU. Ex - P3. It is typically a letter+number code.") - name?: string; - - @doc("The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.") - size?: string; - - @doc("This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.") - tier?: SkuTier; -} - -model DeploymentLogsRequest { - @doc("The type of container to retrieve logs from.") - containerType?: ContainerType; - - @doc("The maximum number of lines to tail.") - tail?: int32; -} - -model DeploymentLogs { - @doc("The retrieved online deployment logs.") - content?: string; -} - -@doc("A paginated list of SkuResource entities.") -model SkuResourceArmPaginatedResult is Azure.Core.Page; - -@doc("Fulfills ARM Contract requirement to list all available SKUS for a resource.") -model SkuResource { - @doc("Gets or sets the Sku Capacity.") - capacity?: SkuCapacity; - - @doc("The resource type name.") - @visibility("read") - resourceType?: string; - - @doc("Gets or sets the Sku.") - sku?: SkuSetting; -} - -@doc("SKU capacity information") -model SkuCapacity { - @doc("Gets or sets the default capacity.") - default?: int32; - - @doc("Gets or sets the maximum.") - maximum?: int32; - - @doc("Gets or sets the minimum.") - minimum?: int32; - - @doc("Gets or sets the type of the scale.") - scaleType?: SkuScaleType; -} - -@doc("SkuSetting fulfills the need for stripped down SKU info in ARM contract.") -model SkuSetting { - @doc("[Required] The name of the SKU. Ex - P3. It is typically a letter+number code.") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - name: string; - - @doc("This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.") - tier?: SkuTier; -} - -model RegenerateEndpointKeysRequest { - @doc("[Required] Specification for which type of key to generate. Primary or Secondary.") - keyType: KeyType; - - @doc("The value the key is set to.") - keyValue?: string; -} - -@doc("Service Token") -model EndpointAuthToken { - @doc("Access token for endpoint authentication.") - accessToken?: string; - - @doc("Access token expiry time (UTC).") - expiryTimeUtc?: plainTime; - - @doc("Refresh access token after time (UTC).") - refreshAfterTimeUtc?: plainTime; - - @doc("Access token type.") - tokenType?: string; -} - -@doc("Base definition of a schedule") -model ScheduleProperties extends ResourceBase { - @doc("[Required] Specifies the action of the schedule") - @visibility("read", "create", "update") - action: ScheduleActionBase; - - @doc("Display name of schedule.") - @visibility("read", "create") - displayName?: string; - - @doc("Is the schedule enabled?") - @visibility("read", "create", "update") - isEnabled?: boolean; - - @doc("Provisioning state for the schedule.") - @visibility("read") - provisioningState?: ScheduleProvisioningStatus; - - @doc("[Required] Specifies the trigger details") - @visibility("read", "create", "update") - trigger: TriggerBase; -} - -@discriminator("actionType") -model ScheduleActionBase {} - -@doc("Details of the Registry") -model RegistryProperties { - @doc("Discovery URL for the Registry") - discoveryUrl?: string; - - @doc("IntellectualPropertyPublisher for the registry") - intellectualPropertyPublisher?: string; - - @doc("ResourceId of the managed RG if the registry has system created resources") - managedResourceGroup?: ArmResourceId; - - @doc("MLFlow Registry URI for the Registry") - mlFlowRegistryUri?: string; - - @doc("Private endpoint connections info used for pending connections in private link portal") - privateEndpointConnections?: RegistryPrivateEndpointConnection[]; - - @doc(""" -Is the Registry accessible from the internet? -Possible values: \"Enabled\" or \"Disabled\" -""") - publicNetworkAccess?: string; - - @doc("Details of each region the registry is in") - regionDetails?: RegistryRegionArmDetails[]; -} - -@doc("ARM ResourceId of a resource") -model ArmResourceId { - @doc(""" -Arm ResourceId is in the format \"/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}\" -or \"/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}\" -""") - resourceId?: string; -} - -@doc("Private endpoint connection definition.") -model RegistryPrivateEndpointConnection { - @doc(""" -This is the private endpoint connection name created on SRP -Full resource id: /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.MachineLearningServices/{resourceType}/{resourceName}/privateEndpointConnections/{peConnectionName} -""") - id?: string; - - @doc("Same as workspace location.") - @visibility("read", "create") - location?: string; - - @doc("Properties of the Private Endpoint Connection") - properties?: RegistryPrivateEndpointConnectionProperties; -} - -@doc("Properties of the Private Endpoint Connection") -model RegistryPrivateEndpointConnectionProperties { - @doc("The group ids") - groupIds?: string[]; - - @doc("The PE network resource that is linked to this PE connection.") - privateEndpoint?: PrivateEndpointResource; - - @doc("The connection state.") - privateLinkServiceConnectionState?: RegistryPrivateLinkServiceConnectionState; - - @doc("One of null, \"Succeeded\", \"Provisioning\", \"Failed\". While not approved, it's null.") - provisioningState?: string; -} - -@doc("The PE network resource that is linked to this PE connection.") -model PrivateEndpointResource extends PrivateEndpoint { - @doc("The subnetId that the private endpoint is connected to.") - subnetArmId?: string; -} - -@doc("The Private Endpoint resource.") -model PrivateEndpoint { - @doc("The ARM identifier for Private Endpoint") - @visibility("read") - id?: string; -} - -@doc("The connection state.") -model RegistryPrivateLinkServiceConnectionState { - @doc("Some RP chose \"None\". Other RPs use this for region expansion.") - actionsRequired?: string; - - @doc("User-defined message that, per NRP doc, may be used for approval-related message.") - description?: string; - - @doc("Connection status of the service consumer with the service provider") - status?: EndpointServiceConnectionStatus; -} - -@doc("Details for each region the registry is in") -model RegistryRegionArmDetails { - @doc("List of ACR accounts") - acrDetails?: AcrDetails[]; - - @doc("The location where the registry exists") - location?: string; - - @doc("List of storage accounts") - storageAccountDetails?: StorageAccountDetails[]; -} - -@doc("Details of ACR account to be used for the Registry") -model AcrDetails { - @doc("Details of system created ACR account to be used for the Registry") - systemCreatedAcrAccount?: SystemCreatedAcrAccount; - - @doc("Details of user created ACR account to be used for the Registry. Not supported in most cases and will throw 400 error if provided.") - userCreatedAcrAccount?: UserCreatedAcrAccount; -} - -model SystemCreatedAcrAccount { - @doc("Name of the ACR account") - acrAccountName?: string; - - @doc("SKU of the ACR account") - acrAccountSku?: string; - - @doc("This is populated once the ACR account is created.") - armResourceId?: ArmResourceId; -} - -model UserCreatedAcrAccount { - @doc("ARM ResourceId of a resource") - armResourceId?: ArmResourceId; -} - -@doc("Details of storage account to be used for the Registry") -model StorageAccountDetails { - @doc("Details of system created storage account to be used for the registry") - systemCreatedStorageAccount?: SystemCreatedStorageAccount; - - @doc("Details of user created storage account to be used for the registry. Not supported in most cases and will throw 400 error if provided.") - userCreatedStorageAccount?: UserCreatedStorageAccount; -} - -model SystemCreatedStorageAccount { - @doc("Public blob access allowed") - allowBlobPublicAccess?: boolean; - - @doc("This is populated once the storage account is created.") - armResourceId?: ArmResourceId; - - @doc("HNS enabled for storage account") - storageAccountHnsEnabled?: boolean; - - @doc("Name of the storage account") - storageAccountName?: string; - - @doc(""" -Allowed values: -\"Standard_LRS\", -\"Standard_GRS\", -\"Standard_RAGRS\", -\"Standard_ZRS\", -\"Standard_GZRS\", -\"Standard_RAGZRS\", -\"Premium_LRS\", -\"Premium_ZRS\" -""") - storageAccountType?: string; -} - -model UserCreatedStorageAccount { - @doc("ARM ResourceId of a resource") - armResourceId?: ArmResourceId; -} - -@doc("Strictly used in update requests.") -model PartialRegistryPartialTrackedResource { - @doc("Managed service identity (system assigned and/or user assigned identities)") - identity?: RegistryPartialManagedServiceIdentity; - - @doc("Sku details required for ARM contract for Autoscaling.") - sku?: PartialSku; - - @doc("Resource tags.") - tags?: Record; -} - -@doc("Managed service identity (system assigned and/or user assigned identities)") -model RegistryPartialManagedServiceIdentity extends ManagedServiceIdentity {} - -@doc("The List Aml user feature operation response.") -model ListAmlUserFeatureResult is Azure.Core.Page; - -@doc("Features enabled for a workspace") -model AmlUserFeature { - @doc("Specifies the feature ID") - id?: string; - - @doc("Specifies the feature name ") - displayName?: string; - - @doc("Describes the feature for user experience") - description?: string; -} - -@doc("Azure Machine Learning team account REST API operation") -model AmlOperation { - @doc("Gets or sets display name of operation") - display?: OperationDisplay; - - @doc("Indicates whether the operation applies to data-plane") - isDataAction?: boolean; - - @doc("Gets or sets operation name: {provider}/{resource}/{operation}") - name?: string; - - @doc("The intended executor of the operation: user/system") - origin?: string; -} - -@doc("The properties of a machine learning workspace.") -model WorkspaceProperties { - @doc("The flag to indicate whether to allow public access when behind VNet.") - allowPublicAccessWhenBehindVnet?: boolean; - - @doc("ARM id of the application insights associated with this workspace.") - applicationInsights?: string; - - associatedWorkspaces?: string[]; - containerRegistries?: string[]; - - @doc("ARM id of the container registry associated with this workspace.") - containerRegistry?: string; - - @doc("The description of this workspace.") - description?: string; - - @doc("Url for the discovery service to identify regional endpoints for machine learning experimentation services") - discoveryUrl?: string; - - enableDataIsolation?: boolean; - encryption?: EncryptionProperty; - existingWorkspaces?: string[]; - - @doc("Settings for feature store type workspace.") - featureStoreSettings?: FeatureStoreSettings; - - @doc("The friendly name for this workspace. This name in mutable") - friendlyName?: string; - - @doc("The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service") - hbiWorkspace?: boolean; - - hubResourceId?: string; - - @doc("The compute name for image build") - imageBuildCompute?: string; - - @doc("ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created") - keyVault?: string; - - keyVaults?: string[]; - - @doc("Managed Network settings for a machine learning workspace.") - managedNetwork?: ManagedNetworkSettings; - - @doc("The URI associated with this workspace that machine learning flow must point at to set up tracking.") - @visibility("read") - mlFlowTrackingUri?: string; - - @doc("The notebook info of Azure ML workspace.") - @visibility("read") - notebookInfo?: NotebookResourceInfo; - - @doc("The user assigned identity resource id that represents the workspace identity.") - primaryUserAssignedIdentity?: string; - - @doc("The list of private endpoint connections in the workspace.") - @visibility("read") - privateEndpointConnections?: PrivateEndpointConnection[]; - - @doc("Count of private connections in the workspace") - @visibility("read") - privateLinkCount?: int32; - - @doc("The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning.") - @visibility("read") - provisioningState?: ProvisioningState; - - @doc("Whether requests from Public Network are allowed.") - publicNetworkAccess?: PublicNetworkAccessType; - - @doc("The service managed resource settings.") - serviceManagedResourcesSettings?: ServiceManagedResourcesSettings; - - @doc("The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace") - @visibility("read") - serviceProvisionedResourceGroup?: string; - - @doc("The list of shared private link resources in this workspace.") - sharedPrivateLinkResources?: SharedPrivateLinkResource[]; - - @doc("Retention time in days after workspace get soft deleted.") - softDeleteRetentionInDays?: int32; - - @doc("ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created") - storageAccount?: string; - - storageAccounts?: string[]; - - @doc("If the storage associated with the workspace has hierarchical namespace(HNS) enabled.") - @visibility("read") - storageHnsEnabled?: boolean; - - @doc("The auth mode used for accessing the system datastores of the workspace.") - systemDatastoresAuthMode?: string; - - @doc("The tenant id associated with this workspace.") - @visibility("read") - tenantId?: string; - - @doc("Enabling v1_legacy_mode may prevent you from using features provided by the v2 API.") - v1LegacyMode?: boolean; - - @doc("WorkspaceHub's configuration object.") - workspaceHubConfig?: WorkspaceHubConfig; - - @doc("The immutable id associated with this workspace.") - @visibility("read") - workspaceId?: string; -} - -model EncryptionProperty { - @doc(""" -The byok cosmosdb account that customer brings to store customer's data -with encryption -""") - cosmosDbResourceId?: string; - - @doc("Identity to be used with the keyVault") - identity?: IdentityForCmk; - - @doc("KeyVault details to do the encryption") - keyVaultProperties: KeyVaultProperties; - - @doc(""" -The byok search account that customer brings to store customer's data -with encryption -""") - searchAccountResourceId?: string; - - @doc("Indicates whether or not the encryption is enabled for the workspace.") - status: EncryptionStatus; - - @doc(""" -The byok storage account that customer brings to store customer's data -with encryption -""") - storageAccountResourceId?: string; -} - -@doc("Identity object used for encryption.") -model IdentityForCmk { - @doc("UserAssignedIdentity to be used to fetch the encryption key from keyVault") - userAssignedIdentity?: string; -} - -@doc("Customer Key vault properties.") -model KeyVaultProperties { - @doc(""" -Currently, we support only SystemAssigned MSI. -We need this when we support UserAssignedIdentities -""") - identityClientId?: string; - - @doc("KeyVault key identifier to encrypt the data") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - keyIdentifier: string; - - @doc("KeyVault Arm Id that contains the data encryption key") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - keyVaultArmId: string; -} - -model FeatureStoreSettings { - computeRuntime?: ComputeRuntimeDto; - offlineStoreConnectionName?: string; - onlineStoreConnectionName?: string; -} - -model ComputeRuntimeDto { - sparkRuntimeVersion?: string; -} - -@doc("Managed Network settings for a machine learning workspace.") -model ManagedNetworkSettings { - @doc("Isolation mode for the managed network of a machine learning workspace.") - isolationMode?: IsolationMode; - - @visibility("read") - networkId?: string; - - @doc("Dictionary of ") - outboundRules?: Record; - - @doc("Status of the Provisioning for the managed network of a machine learning workspace.") - status?: ManagedNetworkProvisionStatus; -} - -@doc("Outbound Rule for the managed network of a machine learning workspace.") -@discriminator("type") -model OutboundRule { - @doc("Category of a managed network Outbound Rule of a machine learning workspace.") - category?: RuleCategory; - - @doc("Type of a managed network Outbound Rule of a machine learning workspace.") - status?: RuleStatus; -} - -@doc("Status of the Provisioning for the managed network of a machine learning workspace.") -model ManagedNetworkProvisionStatus { - sparkReady?: boolean; - - @doc("Status for the managed network of a machine learning workspace.") - status?: ManagedNetworkStatus; -} - -model NotebookResourceInfo { - fqdn?: string; - isPrivateLinkEnabled?: boolean; - - @doc("The error that occurs when preparing notebook.") - notebookPreparationError?: NotebookPreparationError; - - @doc("the data plane resourceId that used to initialize notebook component") - resourceId?: string; -} - -model NotebookPreparationError { - errorMessage?: string; - statusCode?: int32; -} - -@doc("Private endpoint connection properties.") -model PrivateEndpointConnectionProperties { - @doc("The Private Endpoint resource.") - privateEndpoint?: WorkspacePrivateEndpointResource; - - @doc("The connection state.") - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; - - @doc("The current provisioning state.") - @visibility("read") - provisioningState?: PrivateEndpointConnectionProvisioningState; -} - -@doc("The Private Endpoint resource.") -model WorkspacePrivateEndpointResource { - @doc("e.g. /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}") - @visibility("read") - id?: string; - - @doc("The subnetId that the private endpoint is connected to.") - @visibility("read") - subnetArmId?: string; -} - -@doc("A collection of information about the state of the connection between service consumer and provider.") -model PrivateLinkServiceConnectionState { - @doc("Some RP chose \"None\". Other RPs use this for region expansion.") - actionsRequired?: string; - - @doc("User-defined message that, per NRP doc, may be used for approval-related message.") - description?: string; - - @doc("Connection status of the service consumer with the service provider") - status?: EndpointServiceConnectionStatus; -} - -model ServiceManagedResourcesSettings { - cosmosDb?: CosmosDbSettings; -} - -model CosmosDbSettings { - collectionsThroughput?: int32; -} - -model SharedPrivateLinkResource { - @doc("Unique name of the private link") - name?: string; - - @doc("Properties of a shared private link resource.") - properties?: SharedPrivateLinkResourceProperty; -} - -@doc("Properties of a shared private link resource.") -model SharedPrivateLinkResourceProperty { - @doc("group id of the private link") - groupId?: string; - - @doc("the resource id that private link links to") - privateLinkResourceId?: string; - - @doc("Request message") - requestMessage?: string; - - @doc("Connection status of the service consumer with the service provider") - status?: EndpointServiceConnectionStatus; -} - -@doc("WorkspaceHub's configuration object.") -model WorkspaceHubConfig { - additionalWorkspaceStorageAccounts?: string[]; - defaultWorkspaceResourceGroup?: string; -} - -@doc("The parameters for updating a machine learning workspace.") -model WorkspaceUpdateParameters { - @doc("Managed service identity (system assigned and/or user assigned identities)") - identity?: ManagedServiceIdentity; - - @doc("The properties that the machine learning workspace will be updated with.") - properties?: WorkspacePropertiesUpdateParameters; - - @doc("Optional. This field is required to be implemented by the RP because AML is supporting more than one tier") - sku?: Sku; - - @doc("The resource tags for the machine learning workspace.") - tags?: Record; -} - -@doc("The parameters for updating a machine learning workspace.") -model WorkspacePropertiesUpdateParameters { - @doc("ARM id of the application insights associated with this workspace.") - applicationInsights?: string; - - @doc("ARM id of the container registry associated with this workspace.") - containerRegistry?: string; - - @doc("The description of this workspace.") - description?: string; - - enableDataIsolation?: boolean; - encryption?: EncryptionUpdateProperties; - - @doc("Settings for feature store type workspace.") - featureStoreSettings?: FeatureStoreSettings; - - @doc("The friendly name for this workspace. This name in mutable") - friendlyName?: string; - - @doc("The compute name for image build") - imageBuildCompute?: string; - - @doc("Managed Network settings for a machine learning workspace.") - managedNetwork?: ManagedNetworkSettings; - - @doc("The user assigned identity resource id that represents the workspace identity.") - primaryUserAssignedIdentity?: string; - - @doc("Whether requests from Public Network are allowed.") - publicNetworkAccess?: PublicNetworkAccessType; - - @doc("The service managed resource settings.") - serviceManagedResourcesSettings?: ServiceManagedResourcesSettings; - - @doc("Retention time in days after workspace get soft deleted.") - softDeleteRetentionInDays?: int32; - - @doc("Enabling v1_legacy_mode may prevent you from using features provided by the v2 API.") - v1LegacyMode?: boolean; -} - -model EncryptionUpdateProperties { - keyVaultProperties: EncryptionKeyVaultUpdateProperties; -} - -model EncryptionKeyVaultUpdateProperties { - @minLength(1) - @pattern("[a-zA-Z0-9_]") - keyIdentifier: string; -} - -@discriminator("authType") -model WorkspaceConnectionPropertiesV2 { - @doc("Category of the connection") - category?: ConnectionCategory; - - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - expiryTime?: utcDateTime; - - @doc("Any object") - metadata?: Record; - - target?: string; -} - -@doc("The properties that the machine learning workspace connection will be updated with.") -model WorkspaceConnectionUpdateParameter { - @doc("The properties that the machine learning workspace connection will be updated with.") - properties?: WorkspaceConnectionPropertiesV2; -} - -@doc("Parameters to diagnose a workspace") -model DiagnoseWorkspaceParameters { - value?: DiagnoseRequestProperties; -} - -model DiagnoseRequestProperties { - @doc("Setting for diagnosing dependent application insights") - applicationInsights?: Record; - - @doc("Setting for diagnosing dependent container registry") - containerRegistry?: Record; - - @doc("Setting for diagnosing dns resolution") - dnsResolution?: Record; - - @doc("Setting for diagnosing dependent key vault") - keyVault?: Record; - - @doc("Setting for diagnosing network security group") - nsg?: Record; - - @doc("Setting for diagnosing unclassified category of problems") - others?: Record; - - @doc("Setting for diagnosing resource lock") - resourceLock?: Record; - - @doc("Setting for diagnosing dependent storage account") - storageAccount?: Record; - - @doc("Setting for diagnosing user defined routing") - udr?: Record; -} - -model DiagnoseResponseResult { - value?: DiagnoseResponseResultValue; -} - -model DiagnoseResponseResultValue { - userDefinedRouteResults?: DiagnoseResult[]; - networkSecurityRuleResults?: DiagnoseResult[]; - resourceLockResults?: DiagnoseResult[]; - dnsResolutionResults?: DiagnoseResult[]; - storageAccountResults?: DiagnoseResult[]; - keyVaultResults?: DiagnoseResult[]; - containerRegistryResults?: DiagnoseResult[]; - applicationInsightsResults?: DiagnoseResult[]; - otherResults?: DiagnoseResult[]; -} - -@doc("Result of Diagnose") -model DiagnoseResult { - @doc("Code for workspace setup error") - @visibility("read") - code?: string; - - @doc("Level of workspace setup error") - @visibility("read") - level?: DiagnoseResultLevel; - - @doc("Message of workspace setup error") - @visibility("read") - message?: string; -} - -model ListWorkspaceKeysResult { - @doc("The access key of the workspace app insights") - @visibility("read") - appInsightsInstrumentationKey?: string; - - containerRegistryCredentials?: RegistryListCredentialsResult; - notebookAccessKeys?: ListNotebookKeysResult; - - @doc("The arm Id key of the workspace storage") - @visibility("read") - userStorageArmId?: string; - - @doc("The access key of the workspace storage") - @visibility("read") - userStorageKey?: string; -} - -model RegistryListCredentialsResult { - @doc("The location of the workspace ACR") - @visibility("read") - location?: string; - - passwords?: Password[]; - - @doc("The username of the workspace ACR") - @visibility("read") - username?: string; -} - -model Password { - @visibility("read") - name?: string; - - @visibility("read") - value?: string; -} - -model ListNotebookKeysResult { - @doc("The primary access key of the Notebook") - @visibility("read") - primaryAccessKey?: string; - - @doc("The secondary access key of the Notebook") - @visibility("read") - secondaryAccessKey?: string; -} - -model NotebookAccessTokenResult { - @visibility("read") - accessToken?: string; - - @visibility("read") - expiresIn?: int32; - - @visibility("read") - hostName?: string; - - @visibility("read") - notebookResourceId?: string; - - @visibility("read") - publicDns?: string; - - @visibility("read") - refreshToken?: string; - - @visibility("read") - scope?: string; - - @visibility("read") - tokenType?: string; -} - -model ListStorageAccountKeysResult { - @doc("The access key of the storage") - @visibility("read") - userStorageKey?: string; -} - -model ExternalFqdnResponse { - value?: FqdnEndpointsPropertyBag[]; -} - -@doc("Property bag for FQDN endpoints result") -model FqdnEndpointsPropertyBag { - properties?: FqdnEndpoints; -} - -model FqdnEndpoints { - category?: string; - endpoints?: FqdnEndpoint[]; -} - -model FqdnEndpoint { - domainName?: string; - endpointDetails?: FqdnEndpointDetail[]; -} - -model FqdnEndpointDetail { - port?: int32; -} - -@doc("A list of private link resources") -@pagedResult -model PrivateLinkResourceListResult { - @items - value?: PrivateLinkResource[]; -} - -@doc("A private link resource") -model PrivateLinkResource extends Resource { - @doc("Managed service identity (system assigned and/or user assigned identities)") - identity?: ManagedServiceIdentity; - - @doc("Same as workspace location.") - location?: string; - - @doc("Properties of a private link resource.") - properties?: PrivateLinkResourceProperties; - - @doc("Optional. This field is required to be implemented by the RP because AML is supporting more than one tier") - sku?: Sku; - - @doc("Dictionary of ") - tags?: Record; -} - -@doc("Properties of a private link resource.") -model PrivateLinkResourceProperties { - @doc("The private link resource group id.") - @visibility("read") - groupId?: string; - - @doc("The private link resource required member names.") - @visibility("read") - requiredMembers?: string[]; - - @doc("The private link resource Private link DNS zone name.") - requiredZoneNames?: string[]; -} - -@doc("Managed Network Provisioning options for managed network of a machine learning workspace.") -model ManagedNetworkProvisionOptions { - includeSpark?: boolean; -} - -@doc("Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet.") -model ResourceId { - @doc("The ID of the resource") - id: string; -} - -@doc("A Machine Learning compute based on AKS.") -model AKS extends Compute { - ...AKSSchema; - - @doc("The type of compute") - computeType: "AKS"; -} - -model AKSSchema { - @doc("AKS properties") - properties?: AKSSchemaProperties; -} - -@doc("AKS properties") -model AKSSchemaProperties { - @doc("Cluster full qualified domain name") - clusterFqdn?: string; - - @doc("System services") - @visibility("read") - systemServices?: SystemService[]; - - @doc("Number of agents") - agentCount?: int32; - - @doc("Agent virtual machine size") - agentVmSize?: string; - - @doc("Intended usage of the cluster") - clusterPurpose?: ClusterPurpose; - - @doc("SSL configuration") - sslConfiguration?: SslConfiguration; - - @doc("AKS networking configuration for vnet") - aksNetworkingConfiguration?: AksNetworkingConfiguration; - - @doc("Load Balancer Type") - loadBalancerType?: LoadBalancerType; - - @doc("Load Balancer Subnet") - loadBalancerSubnet?: string; -} - -@doc("A system service running on a compute.") -model SystemService { - @doc("The type of this system service.") - @visibility("read") - systemServiceType?: string; - - @doc("Public IP address") - @visibility("read") - publicIpAddress?: string; - - @doc("The version for this type.") - @visibility("read") - version?: string; -} - -@doc("The ssl configuration for scoring") -model SslConfiguration { - @doc("Enable or disable ssl for scoring") - status?: SslConfigStatus; - - @doc("Cert data") - cert?: string; - - @doc("Key data") - key?: string; - - @doc("CNAME of the cert") - cname?: string; - - @doc("Leaf domain label of public endpoint") - leafDomainLabel?: string; - - @doc("Indicates whether to overwrite existing domain label.") - overwriteExistingDomain?: boolean; -} - -@doc("Advance configuration for AKS networking") -model AksNetworkingConfiguration { - @doc("Virtual network subnet resource ID the compute nodes belong to") - subnetId?: string; - - @doc("A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.") - @pattern("^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$") - serviceCidr?: string; - - @doc("An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.") - @pattern("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$") - dnsServiceIP?: string; - - @doc("A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range.") - @pattern("^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$") - dockerBridgeCidr?: string; -} - -@doc("A Machine Learning compute based on Kubernetes Compute.") -model Kubernetes extends Compute { - ...KubernetesSchema; - - @doc("The type of compute") - computeType: "Kubernetes"; -} - -@doc("Kubernetes Compute Schema") -model KubernetesSchema { - @doc("Properties of Kubernetes") - properties?: KubernetesProperties; -} - -@doc("Kubernetes properties") -model KubernetesProperties { - @doc("Relay connection string.") - relayConnectionString?: string; - - @doc("ServiceBus connection string.") - serviceBusConnectionString?: string; - - @doc("Extension principal-id.") - extensionPrincipalId?: string; - - @doc("Extension instance release train.") - extensionInstanceReleaseTrain?: string; - - @doc("VC name.") - vcName?: string; - - @doc("Compute namespace") - `namespace`?: string; - - @doc("Default instance type") - defaultInstanceType?: string; - - @doc("Instance Type Schema") - instanceTypes?: Record; -} - -@doc("Instance type schema.") -model InstanceTypeSchema { - @doc("Node Selector") - nodeSelector?: Record; - - @doc("Resource requests/limits for this instance type") - resources?: InstanceTypeSchemaResources; -} - -@doc("Resource requests/limits for this instance type") -model InstanceTypeSchemaResources { - @doc("Resource requests for this instance type") - requests?: Record; - - @doc("Resource limits for this instance type") - limits?: Record; -} - -@doc("AML Compute properties") -model AmlComputeProperties { - @doc("Compute OS Type") - osType?: OsType; - - @doc("Virtual Machine Size") - vmSize?: string; - - @doc("Virtual Machine priority") - vmPriority?: VmPriority; - - @doc("Virtual Machine image for AML Compute - windows only") - virtualMachineImage?: VirtualMachineImage; - - @doc("Network is isolated or not") - isolatedNetwork?: boolean; - - @doc("Scale settings for AML Compute") - scaleSettings?: ScaleSettings; - - @doc("Credentials for an administrator user account that will be created on each compute node.") - userAccountCredentials?: UserAccountCredentials; - - @doc("Virtual network subnet resource ID the compute nodes belong to.") - subnet?: ResourceId; - - @doc("State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled.") - remoteLoginPortPublicAccess?: RemoteLoginPortPublicAccess; - - @doc("Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute.") - @visibility("read") - allocationState?: AllocationState; - - @doc("The time at which the compute entered its current allocation state.") - @visibility("read") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - allocationStateTransitionTime?: utcDateTime; - - @doc("Collection of errors encountered by various compute nodes during node setup.") - @visibility("read") - errors?: ErrorResponse[]; - - @doc("The number of compute nodes currently assigned to the compute.") - @visibility("read") - currentNodeCount?: int32; - - @doc("The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation.") - @visibility("read") - targetNodeCount?: int32; - - @doc("Counts of various node states on the compute.") - @visibility("read") - nodeStateCounts?: NodeStateCounts; - - @doc("Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs.") - enableNodePublicIp?: boolean; - - @doc("A property bag containing additional properties.") - propertyBag?: Record; -} - -@doc("Virtual Machine image for Windows AML Compute") -model VirtualMachineImage { - @doc("Virtual Machine image path") - id: string; -} - -@doc("Settings for user account that gets created on each on the nodes of a compute.") -model UserAccountCredentials { - @doc("Name of the administrator user account which can be used to SSH to nodes.") - adminUserName: string; - - @doc("SSH public key of the administrator user account.") - adminUserSshPublicKey?: string; - - @doc("Password of the administrator user account.") - adminUserPassword?: string; -} - -@doc("Counts of various compute node states on the amlCompute.") -model NodeStateCounts { - @doc("Number of compute nodes in idle state.") - @visibility("read") - idleNodeCount?: int32; - - @doc("Number of compute nodes which are running jobs.") - @visibility("read") - runningNodeCount?: int32; - - @doc("Number of compute nodes which are being prepared.") - @visibility("read") - preparingNodeCount?: int32; - - @doc("Number of compute nodes which are in unusable state.") - @visibility("read") - unusableNodeCount?: int32; - - @doc("Number of compute nodes which are leaving the amlCompute.") - @visibility("read") - leavingNodeCount?: int32; - - @doc("Number of compute nodes which are in preempted state.") - @visibility("read") - preemptedNodeCount?: int32; -} - -@doc("An Azure Machine Learning compute.") -model AmlCompute extends Compute { - ...AmlComputeSchema; - - @doc("The type of compute") - computeType: "AmlCompute"; -} - -@doc("Properties(top level) of AmlCompute") -model AmlComputeSchema { - @doc("Properties of AmlCompute") - properties?: AmlComputeProperties; -} - -@doc("Compute Instance properties") -model ComputeInstanceProperties { - @doc("Virtual Machine Size") - vmSize?: string; - - @doc("Virtual network subnet resource ID the compute nodes belong to.") - subnet?: ResourceId; - - @doc("Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role.") - applicationSharingPolicy?: ApplicationSharingPolicy; - - @doc("Specifies settings for autologger.") - autologgerSettings?: ComputeInstanceAutologgerSettings; - - @doc("Specifies policy and settings for SSH access.") - sshSettings?: ComputeInstanceSshSettings; - - @doc("List of Custom Services added to the compute.") - customServices?: CustomService[]; - - @doc("Returns metadata about the operating system image for this compute instance.") - @visibility("read") - osImageMetadata?: ImageMetadata; - - @doc("Describes all connectivity endpoints available for this ComputeInstance.") - @visibility("read") - connectivityEndpoints?: ComputeInstanceConnectivityEndpoints; - - @doc("Describes available applications and their endpoints on this ComputeInstance.") - @visibility("read") - applications?: ComputeInstanceApplication[]; - - @doc("Describes information on user who created this ComputeInstance.") - @visibility("read") - createdBy?: ComputeInstanceCreatedBy; - - @doc("Collection of errors encountered on this ComputeInstance.") - @visibility("read") - errors?: ErrorResponse[]; - - @doc("The current state of this ComputeInstance.") - @visibility("read") - state?: ComputeInstanceState; - - @doc("The Compute Instance Authorization type. Available values are personal (default).") - computeInstanceAuthorizationType?: ComputeInstanceAuthorizationType; - - @doc("Settings for a personal compute instance.") - personalComputeInstanceSettings?: PersonalComputeInstanceSettings; - - @doc("Details of customized scripts to execute for setting up the cluster.") - setupScripts?: SetupScripts; - - @doc("The last operation on ComputeInstance.") - @visibility("read") - lastOperation?: ComputeInstanceLastOperation; - - @doc("The list of schedules to be applied on the computes.") - schedules?: ComputeSchedules; - - @doc("Stops compute instance after user defined period of inactivity. Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days.") - idleTimeBeforeShutdown?: string; - - @doc("Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs.") - enableNodePublicIp?: boolean; - - @doc("Describes informations of containers on this ComputeInstance.") - @visibility("read") - containers?: ComputeInstanceContainer[]; - - @doc("Describes informations of dataDisks on this ComputeInstance.") - @visibility("read") - dataDisks?: ComputeInstanceDataDisk[]; - - @doc("Describes informations of dataMounts on this ComputeInstance.") - @visibility("read") - dataMounts?: ComputeInstanceDataMount[]; - - @doc("ComputeInstance version.") - @visibility("read") - versions?: ComputeInstanceVersion; -} - -@doc("Specifies settings for autologger.") -model ComputeInstanceAutologgerSettings { - @doc("Indicates whether mlflow autologger is enabled for notebooks.") - mlflowAutologger?: MlflowAutologger; -} - -@doc("Specifies policy and settings for SSH access.") -model ComputeInstanceSshSettings { - @doc("State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable.") - sshPublicAccess?: SshPublicAccess; - - @doc("Describes the admin user name.") - @visibility("read") - adminUserName?: string; - - @doc("Describes the port for connecting through SSH.") - @visibility("read") - sshPort?: int32; - - @doc("Specifies the SSH rsa public key file as a string. Use \"ssh-keygen -t rsa -b 2048\" to generate your SSH key pairs.") - adminPublicKey?: string; -} - -@doc("Returns metadata about the operating system image for this compute instance.") -model ImageMetadata { - @doc("Specifies the current operating system image version this compute instance is running on.") - currentImageVersion?: string; - - @doc("Specifies the latest available operating system image version.") - latestImageVersion?: string; - - @doc("Specifies whether this compute instance is running on the latest operating system image.") - isLatestOsImageVersion?: boolean; -} - -@doc("Defines all connectivity endpoints and properties for an ComputeInstance.") -model ComputeInstanceConnectivityEndpoints { - @doc("Public IP Address of this ComputeInstance.") - @visibility("read") - publicIpAddress?: string; - - @doc("Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed).") - @visibility("read") - privateIpAddress?: string; -} - -@doc("Defines an Aml Instance application and its connectivity endpoint URI.") -model ComputeInstanceApplication { - @doc("Name of the ComputeInstance application.") - displayName?: string; - - @doc("Application' endpoint URI.") - endpointUri?: string; -} - -@doc("Describes information on user who created this ComputeInstance.") -model ComputeInstanceCreatedBy { - @doc("Name of the user.") - @visibility("read") - userName?: string; - - @doc("Uniquely identifies user' Azure Active Directory organization.") - @visibility("read") - userOrgId?: string; - - @doc("Uniquely identifies the user within his/her organization.") - @visibility("read") - userId?: string; -} - -@doc("Settings for a personal compute instance.") -model PersonalComputeInstanceSettings { - @doc("A user explicitly assigned to a personal compute instance.") - assignedUser?: AssignedUser; -} - -@doc("A user that can be assigned to a compute instance.") -model AssignedUser { - @doc("User’s AAD Object Id.") - objectId: string; - - @doc("User’s AAD Tenant Id.") - tenantId: string; -} - -@doc("Details of customized scripts to execute for setting up the cluster.") -model SetupScripts { - @doc("Customized setup scripts") - scripts?: ScriptsToExecute; -} - -@doc("Customized setup scripts") -model ScriptsToExecute { - @doc("Script that's run every time the machine starts.") - startupScript?: ScriptReference; - - @doc("Script that's run only once during provision of the compute.") - creationScript?: ScriptReference; -} - -@doc("Script reference") -model ScriptReference { - @doc("The storage source of the script: inline, workspace.") - scriptSource?: string; - - @doc("The location of scripts in the mounted volume.") - scriptData?: string; - - @doc("Optional command line arguments passed to the script to run.") - scriptArguments?: string; - - @doc("Optional time period passed to timeout command.") - timeout?: string; -} - -@doc("The last operation on ComputeInstance.") -model ComputeInstanceLastOperation { - @doc("Name of the last operation.") - operationName?: OperationName; - - @doc("Time of the last operation.") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - operationTime?: utcDateTime; - - @doc("Operation status.") - operationStatus?: OperationStatus; - - @doc("Trigger of operation.") - operationTrigger?: OperationTrigger; -} - -@doc("The list of schedules to be applied on the computes") -model ComputeSchedules { - @doc("The list of compute start stop schedules to be applied.") - computeStartStop?: ComputeStartStopSchedule[]; -} - -@doc("Compute start stop schedule properties") -model ComputeStartStopSchedule { - @doc("A system assigned id for the schedule.") - @visibility("read") - id?: string; - - @doc("The current deployment state of schedule.") - @visibility("read") - provisioningStatus?: ProvisioningStatus; - - @doc("Is the schedule enabled or disabled?") - status?: ScheduleStatus; - - @doc("[Required] The compute power action.") - action?: ComputePowerAction; - - @doc("[Required] The schedule trigger type.") - triggerType?: TriggerType; - - @doc("Required if triggerType is Recurrence.") - recurrence?: Recurrence; - - @doc("Required if triggerType is Cron.") - cron?: Cron; - - @doc("[Deprecated] Not used any more.") - schedule?: ScheduleBase; -} - -@doc("The workflow trigger recurrence for ComputeStartStop schedule type.") -model Recurrence { - @doc("[Required] The frequency to trigger schedule.") - frequency?: RecurrenceFrequency; - - @doc("[Required] Specifies schedule interval in conjunction with frequency") - interval?: int32; - - @doc("The start time in yyyy-MM-ddTHH:mm:ss format.") - startTime?: string; - - @doc(""" -Specifies time zone in which the schedule runs. -TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 -""") - timeZone?: string; - - @doc("[Required] The recurrence schedule.") - schedule?: RecurrenceSchedule; -} - -@doc("The workflow trigger cron for ComputeStartStop schedule type.") -model Cron { - @doc("The start time in yyyy-MM-ddTHH:mm:ss format.") - startTime?: string; - - @doc(""" -Specifies time zone in which the schedule runs. -TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 -""") - timeZone?: string; - - @doc(""" -[Required] Specifies cron expression of schedule. -The expression should follow NCronTab format. -""") - expression?: string; -} - -model ScheduleBase { - @doc("A system assigned id for the schedule.") - id?: string; - - @doc("The current deployment state of schedule.") - provisioningStatus?: ScheduleProvisioningState; - - @doc("Is the schedule enabled or disabled?") - status?: ScheduleStatus; -} - -@doc("Defines an Aml Instance container.") -model ComputeInstanceContainer { - @doc("Name of the ComputeInstance container.") - name?: string; - - @doc("Auto save settings.") - autosave?: Autosave; - - @doc("Information of GPU.") - gpu?: string; - - @doc("network of this container.") - network?: Network; - - @doc("Environment information of this container.") - environment?: ComputeInstanceEnvironmentInfo; - - @doc("services of this containers.") - @visibility("read") - services?: Record[]; -} - -@doc("Environment information") -model ComputeInstanceEnvironmentInfo { - @doc("name of environment.") - name?: string; - - @doc("version of environment.") - version?: string; -} - -@doc("Defines an Aml Instance DataDisk.") -model ComputeInstanceDataDisk { - @doc("Caching type of Data Disk.") - caching?: Caching; - - @doc("The initial disk size in gigabytes.") - diskSizeGB?: int32; - - @doc("The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun.") - lun?: int32; - - @doc("type of this storage account.") - storageAccountType?: StorageAccountType; -} - -@doc("Defines an Aml Instance DataMount.") -model ComputeInstanceDataMount { - @doc("Source of the ComputeInstance data mount.") - source?: string; - - @doc("Data source type.") - sourceType?: SourceType; - - @doc("name of the ComputeInstance data mount.") - mountName?: string; - - @doc("Mount Action.") - mountAction?: MountAction; - - @doc("who this data mount created by.") - createdBy?: string; - - @doc("Path of this data mount.") - mountPath?: string; - - @doc("Mount state.") - mountState?: MountState; - - @doc("The time when the disk mounted.") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - mountedOn?: utcDateTime; - - @doc("Error of this data mount.") - error?: string; -} - -@doc("Version of computeInstance.") -model ComputeInstanceVersion { - @doc("Runtime of compute instance.") - runtime?: string; -} - -@doc("An Azure Machine Learning compute instance.") -model ComputeInstance extends Compute { - ...ComputeInstanceSchema; - - @doc("The type of compute") - computeType: "ComputeInstance"; -} - -@doc("Properties(top level) of ComputeInstance") -model ComputeInstanceSchema { - @doc("Properties of ComputeInstance") - properties?: ComputeInstanceProperties; -} - -@doc("A Machine Learning compute based on Azure Virtual Machines.") -model VirtualMachine extends Compute { - ...VirtualMachineSchema; - - @doc("The type of compute") - computeType: "VirtualMachine"; -} - -model VirtualMachineSchema { - properties?: VirtualMachineSchemaProperties; -} - -model VirtualMachineSchemaProperties { - @doc("Virtual Machine size") - virtualMachineSize?: string; - - @doc("Port open for ssh connections.") - sshPort?: int32; - - @doc("Notebook server port open for ssh connections.") - notebookServerPort?: int32; - - @doc("Public IP address of the virtual machine.") - address?: string; - - @doc("Admin credentials for virtual machine") - administratorAccount?: VirtualMachineSshCredentials; - - @doc("Indicates whether this compute will be used for running notebooks.") - isNotebookInstanceCompute?: boolean; -} - -@doc("Admin credentials for virtual machine") -model VirtualMachineSshCredentials { - @doc("Username of admin account") - username?: string; - - @doc("Password of admin account") - password?: string; - - @doc("Public key data") - publicKeyData?: string; - - @doc("Private key data") - privateKeyData?: string; -} - -@doc("HDInsight compute properties") -model HDInsightProperties { - @doc("Port open for ssh connections on the master node of the cluster.") - sshPort?: int32; - - @doc("Public IP address of the master node of the cluster.") - address?: string; - - @doc("Admin credentials for master node of the cluster") - administratorAccount?: VirtualMachineSshCredentials; -} - -@doc("A HDInsight compute.") -model HDInsight extends Compute { - ...HDInsightSchema; - - @doc("The type of compute") - computeType: "HDInsight"; -} - -model HDInsightSchema { - @doc("HDInsight compute properties") - properties?: HDInsightProperties; -} - -@doc("A DataFactory compute.") -model DataFactory extends Compute { - @doc("The type of compute") - computeType: "DataFactory"; -} - -@doc("Properties of Databricks") -model DatabricksProperties { - @doc("Databricks access token") - databricksAccessToken?: string; - - @doc("Workspace Url") - workspaceUrl?: string; -} - -@doc("A DataFactory compute.") -model Databricks extends Compute { - ...DatabricksSchema; - - @doc("The type of compute") - computeType: "Databricks"; -} - -model DatabricksSchema { - @doc("Properties of Databricks") - properties?: DatabricksProperties; -} - -@doc("A DataLakeAnalytics compute.") -model DataLakeAnalytics extends Compute { - ...DataLakeAnalyticsSchema; - - @doc("The type of compute") - computeType: "DataLakeAnalytics"; -} - -model DataLakeAnalyticsSchema { - properties?: DataLakeAnalyticsSchemaProperties; -} - -model DataLakeAnalyticsSchemaProperties { - @doc("DataLake Store Account Name") - dataLakeStoreAccountName?: string; -} - -@doc("A SynapseSpark compute.") -model SynapseSpark extends Compute { - properties?: SynapseSparkProperties; - - @doc("The type of compute") - computeType: "SynapseSpark"; -} - -model SynapseSparkProperties { - @doc("Auto scale properties.") - autoScaleProperties?: AutoScaleProperties; - - @doc("Auto pause properties.") - autoPauseProperties?: AutoPauseProperties; - - @doc("Spark version.") - sparkVersion?: string; - - @doc("The number of compute nodes currently assigned to the compute.") - nodeCount?: int32; - - @doc("Node size.") - nodeSize?: string; - - @doc("Node size family.") - nodeSizeFamily?: string; - - @doc("Azure subscription identifier.") - subscriptionId?: string; - - @doc("Name of the resource group in which workspace is located.") - resourceGroup?: string; - - @doc("Name of Azure Machine Learning workspace.") - workspaceName?: string; - - @doc("Pool name.") - poolName?: string; -} - -@doc("Auto scale properties") -model AutoScaleProperties { - minNodeCount?: int32; - enabled?: boolean; - maxNodeCount?: int32; -} - -@doc("Auto pause properties") -model AutoPauseProperties { - delayInMinutes?: int32; - enabled?: boolean; -} - -@doc("Properties of AksComputeSecrets") -model AksComputeSecretsProperties { - @doc("Content of kubeconfig file that can be used to connect to the Kubernetes cluster.") - userKubeConfig?: string; - - @doc("Content of kubeconfig file that can be used to connect to the Kubernetes cluster.") - adminKubeConfig?: string; - - @doc("Image registry pull secret.") - imagePullSecretName?: string; -} - -@doc("Secrets related to a Machine Learning compute based on AKS.") -model AksComputeSecrets extends ComputeSecrets { - ...AksComputeSecretsProperties; - - @doc("The type of compute") - computeType: "AKS"; -} - -@doc("Secrets related to a Machine Learning compute based on AKS.") -model VirtualMachineSecrets extends ComputeSecrets { - ...VirtualMachineSecretsSchema; - - @doc("The type of compute") - computeType: "VirtualMachine"; -} - -model VirtualMachineSecretsSchema { - @doc("Admin credentials for virtual machine.") - administratorAccount?: VirtualMachineSshCredentials; -} - -@doc("Properties of Databricks Compute Secrets") -model DatabricksComputeSecretsProperties { - @doc("access token for databricks account.") - databricksAccessToken?: string; -} - -@doc("Secrets related to a Machine Learning compute based on Databricks.") -model DatabricksComputeSecrets extends ComputeSecrets { - ...DatabricksComputeSecretsProperties; - - @doc("The type of compute") - computeType: "Databricks"; -} - -@doc("Account key datastore credentials configuration.") -model AccountKeyDatastoreCredentials extends DatastoreCredentials { - @doc("[Required] Storage account secrets.") - @visibility("create", "update") - secrets: AccountKeyDatastoreSecrets; - - @doc("[Required] Credential type used to authentication with storage.") - credentialsType: "AccountKey"; -} - -@doc("Datastore account key secrets.") -model AccountKeyDatastoreSecrets extends DatastoreSecrets { - @doc("Storage account key.") - key?: string; - - @doc("[Required] Credential type used to authentication with storage.") - secretsType: "AccountKey"; -} - -model AllFeatures extends MonitoringFeatureFilterBase { - @doc("[Required] Specifies the feature filter to leverage when selecting features to calculate metrics over.") - filterType: "AllFeatures"; -} - -@discriminator("filterType") -model MonitoringFeatureFilterBase {} - -@doc("All nodes means the service will be running on all of the nodes of the job") -model AllNodes extends Nodes { - @doc("[Required] Type of the Nodes value") - nodesValueType: "All"; -} - -@doc("AML Token identity configuration.") -model AmlToken extends IdentityConfiguration { - @doc("[Required] Specifies the type of identity framework.") - identityType: "AMLToken"; -} - -@doc("AML token compute identity definition.") -model AmlTokenComputeIdentity extends MonitorComputeIdentityBase { - @doc("[Required] Monitor compute identity type enum.") - computeIdentityType: "AmlToken"; -} - -@doc("Monitor compute identity base definition.") -@discriminator("computeIdentityType") -model MonitorComputeIdentityBase {} - -@doc("Asset input type.") -model AssetJobInput { - @doc("Input Asset Delivery Mode.") - @visibility("read", "create") - mode?: InputDeliveryMode; - - @doc("[Required] Input Asset URI.") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - uri: string; -} - -@doc("Asset output type.") -model AssetJobOutput { - @doc("Output Asset Name.") - assetName?: string; - - @doc("Output Asset Version.") - assetVersion?: string; - - @doc("Auto delete setting of output data asset.") - @visibility("read", "create", "update") - autoDeleteSetting?: AutoDeleteSetting; - - @doc("Output Asset Delivery Mode.") - @visibility("read", "create") - mode?: OutputDeliveryMode; - - @doc("Output Asset URI.") - uri?: string; -} - -@doc("Forecast horizon determined automatically by system.") -model AutoForecastHorizon extends ForecastHorizon { - @doc("[Required] Set forecast horizon value selection mode.") - mode: "Auto"; -} - -@doc("The desired maximum forecast horizon in units of time-series frequency.") -@discriminator("mode") -model ForecastHorizon {} - -@doc(""" -AutoMLJob class. -Use this class for executing AutoML tasks like Classification/Regression etc. -See TaskType enum for all the tasks supported. -""") -model AutoMLJob extends JobBase { - @doc(""" -The ARM resource ID of the Environment specification for the job. -This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated environment version when running the job. -""") - @visibility("read", "create") - environmentId?: string; - - @doc("Environment variables included in the job.") - @visibility("read", "create") - environmentVariables?: Record; - - @doc("Mapping of output data bindings used in the job.") - @visibility("read", "create") - outputs?: Record; - - @doc("Queue settings for the job") - @visibility("read", "create") - queueSettings?: QueueSettings; - - @doc("Compute Resource configuration for the job.") - @visibility("read", "create") - resources?: JobResourceConfiguration; - - @doc("[Required] This represents scenario which can be one of Tables/NLP/Image") - taskDetails: AutoMLVertical; - - @doc("[Required] Specifies the type of job.") - jobType: "AutoML"; -} - -@doc("Job output definition container information on where to find job output/logs.") -@discriminator("jobOutputType") -model JobOutput { - @doc("Description for the output.") - @visibility("read", "create") - description?: string; -} - -model QueueSettings { - @doc("Controls the compute job tier") - @visibility("read", "create") - jobTier?: JobTier; - - @doc("Controls the priority of the job on a compute.") - @visibility("read", "create") - priority?: int32; -} - -model JobResourceConfiguration extends ResourceConfiguration { - @doc("Extra arguments to pass to the Docker run command. This would override any parameters that have already been set by the system, or in this section. This parameter is only supported for Azure ML compute types.") - @visibility("read", "create") - dockerArgs?: string; - - @doc("Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes).") - @visibility("read", "create") - @pattern("\\d+[bBkKmMgG]") - shmSize?: string; -} - -@doc(""" -AutoML vertical class. -Base class for AutoML verticals - TableVertical/ImageVertical/NLPVertical -""") -@discriminator("taskType") -model AutoMLVertical { - @doc("Log verbosity for the job.") - logVerbosity?: LogVerbosity; - - @doc(""" -Target column name: This is prediction values column. -Also known as label column name in context of classification tasks. -""") - targetColumnName?: string; - - @doc("[Required] Training data input.") - trainingData: MLTableJobInput; -} - -model MLTableJobInput extends JobInput { - ...AssetJobInput; - - @doc("[Required] Specifies the type of job.") - jobInputType: "mltable"; -} - -@doc("Command job definition.") -@discriminator("jobInputType") -model JobInput { - @doc("Description for the input.") - @visibility("read", "create") - description?: string; -} - -@doc("N-Cross validations determined automatically.") -model AutoNCrossValidations extends NCrossValidations { - @doc("[Required] Mode for determining N-Cross validations.") - mode: "Auto"; -} - -@doc("N-Cross validations value.") -@discriminator("mode") -model NCrossValidations {} - -model AutoSeasonality extends Seasonality { - @doc("[Required] Seasonality mode.") - mode: "Auto"; -} - -@doc("Forecasting seasonality.") -@discriminator("mode") -model Seasonality {} - -model AutoTargetLags extends TargetLags { - @doc("[Required] Set target lags mode - Auto/Custom") - mode: "Auto"; -} - -@doc("The number of past periods to lag from the target column.") -@discriminator("mode") -model TargetLags {} - -@doc("Target lags rolling window determined automatically.") -model AutoTargetRollingWindowSize extends TargetRollingWindowSize { - @doc("[Required] TargetRollingWindowSiz detection mode.") - mode: "Auto"; -} - -@doc("Forecasting target rolling window size.") -@discriminator("mode") -model TargetRollingWindowSize {} - -@doc("Settings for Autologger.") -model AutologgerSettings { - @doc("[Required] Indicates whether mlflow autologger is enabled.") - @visibility("read", "create") - mlflowAutologger: MLFlowAutologgerState; -} - -model AzMonMonitoringAlertNotificationSettings - extends MonitoringAlertNotificationSettingsBase { - @doc("[Required] Specifies the type of signal to monitor.") - alertNotificationType: "AzureMonitor"; -} - -@discriminator("alertNotificationType") -model MonitoringAlertNotificationSettingsBase {} - -@doc("Azure Blob datastore configuration.") -model AzureBlobDatastore extends Datastore { - ...AzureDatastore; - - @doc("Storage account name.") - @visibility("read", "create") - accountName?: string; - - @doc("Storage account container name.") - @visibility("read", "create") - containerName?: string; - - @doc("Azure cloud endpoint for the storage account.") - @visibility("read", "create") - endpoint?: string; - - @doc("Protocol used to communicate with the storage account.") - @visibility("read", "create") - protocol?: string; - - @doc("Indicates which identity to use to authenticate service data access to customer's storage.") - @visibility("read", "create") - serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; - - @doc("[Required] Storage type backing the datastore.") - datastoreType: "AzureBlob"; -} - -@doc("Base definition for Azure datastore contents configuration.") -model AzureDatastore { - @doc("Azure Resource Group name") - resourceGroup?: string; - - @doc("Azure Subscription Id") - subscriptionId?: string; -} - -@doc("Azure Data Lake Gen1 datastore configuration.") -model AzureDataLakeGen1Datastore extends Datastore { - ...AzureDatastore; - - @doc("Indicates which identity to use to authenticate service data access to customer's storage.") - @visibility("read", "create") - serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; - - @doc("[Required] Azure Data Lake store name.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - storeName: string; - - @doc("[Required] Storage type backing the datastore.") - datastoreType: "AzureDataLakeGen1"; -} - -@doc("Azure Data Lake Gen2 datastore configuration.") -model AzureDataLakeGen2Datastore extends Datastore { - ...AzureDatastore; - - @doc("[Required] Storage account name.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - accountName: string; - - @doc("Azure cloud endpoint for the storage account.") - @visibility("read", "create") - endpoint?: string; - - @doc("[Required] The name of the Data Lake Gen2 filesystem.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - filesystem: string; - - @doc("Protocol used to communicate with the storage account.") - @visibility("read", "create") - protocol?: string; - - @doc("Indicates which identity to use to authenticate service data access to customer's storage.") - @visibility("read", "create") - serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; - - @doc("[Required] Storage type backing the datastore.") - datastoreType: "AzureDataLakeGen2"; -} - -@doc("Webhook details specific for Azure DevOps") -model AzureDevOpsWebhook extends Webhook { - @doc("[Required] Specifies the type of service to send a callback") - webhookType: "AzureDevOps"; -} - -@doc("Azure File datastore configuration.") -model AzureFileDatastore extends Datastore { - ...AzureDatastore; - - @doc("[Required] Storage account name.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - accountName: string; - - @doc("Azure cloud endpoint for the storage account.") - @visibility("read", "create") - endpoint?: string; - - @doc("[Required] The name of the Azure file share that the datastore points to.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - fileShareName: string; - - @doc("Protocol used to communicate with the storage account.") - @visibility("read", "create") - protocol?: string; - - @doc("Indicates which identity to use to authenticate service data access to customer's storage.") - @visibility("read", "create") - serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; - - @doc("[Required] Storage type backing the datastore.") - datastoreType: "AzureFile"; -} - -@doc("Azure ML batch inferencing server configurations.") -model AzureMLBatchInferencingServer extends InferencingServer { - @doc("Code configuration for AML batch inferencing server.") - codeConfiguration?: CodeConfiguration; - - @doc("[Required] Inferencing server type for various targets.") - serverType: "AzureMLBatch"; -} - -@doc("Azure ML online inferencing configurations.") -model AzureMLOnlineInferencingServer extends InferencingServer { - @doc("Code configuration for AML inferencing server.") - codeConfiguration?: CodeConfiguration; - - @doc("[Required] Inferencing server type for various targets.") - serverType: "AzureMLOnline"; -} - -@doc("Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation") -model BanditPolicy extends EarlyTerminationPolicy { - @doc("Absolute distance allowed from the best performing run.") - slackAmount?: float32; - - @doc("Ratio of the allowed distance from the best performing run.") - slackFactor?: float32; - - @doc("[Required] Name of policy configuration") - policyType: "Bandit"; -} - -@doc("Early termination policies enable canceling poor-performing runs before they complete") -@discriminator("policyType") -model EarlyTerminationPolicy { - @doc("Number of intervals by which to delay the first evaluation.") - delayEvaluation?: int32; - - @doc("Interval (number of runs) between policy evaluations.") - evaluationInterval?: int32; -} - -@doc("Base environment type.") -model BaseEnvironmentId extends BaseEnvironmentSource { - @doc("[Required] Resource id accepting ArmId or AzureMlId.") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - resourceId: string; - - @doc("[Required] Base environment type.") - baseEnvironmentSourceType: "EnvironmentAsset"; -} - -@doc("Properties for a Batch Pipeline Component Deployment.") -model BatchPipelineComponentDeploymentConfiguration - extends BatchDeploymentConfiguration { - @doc("The ARM id of the component to be run.") - componentId?: IdAssetReference; - - @doc("The description which will be applied to the job.") - description?: string; - - @doc("Run-time settings for the pipeline job.") - settings?: Record; - - @doc("The tags which will be applied to the job.") - tags?: Record; - - @doc("[Required] The type of the deployment") - deploymentConfigurationType: "PipelineComponent"; -} - -@doc("Reference to an asset via its ARM resource ID.") -model IdAssetReference extends AssetReferenceBase { - @doc("[Required] ARM resource ID of the asset.") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - assetId: string; - - @doc("[Required] Specifies the type of asset reference.") - referenceType: "Id"; -} - -@doc("Defines a Sampling Algorithm that generates values based on previous values") -model BayesianSamplingAlgorithm extends SamplingAlgorithm { - @doc("[Required] The algorithm used for generating hyperparameter values, along with configuration properties") - samplingAlgorithmType: "Bayesian"; -} - -@doc(""" -The Sampling Algorithm used to generate hyperparameter values, along with properties to -configure the algorithm -""") -@discriminator("samplingAlgorithmType") -model SamplingAlgorithm {} - -model CategoricalDataDriftMetricThreshold extends DataDriftMetricThresholdBase { - @doc("[Required] The categorical data drift metric to calculate.") - @visibility("read", "create") - metric: CategoricalDataDriftMetric; - - @doc("[Required] Specifies the data type of the metric threshold.") - dataType: "Categorical"; -} - -@discriminator("dataType") -model DataDriftMetricThresholdBase { - @doc("The threshold value. If null, a default value will be set depending on the selected metric.") - @visibility("read", "create") - threshold?: MonitoringThreshold; -} - -model MonitoringThreshold { - @doc("The threshold value. If null, the set default is dependent on the metric type.") - @visibility("read", "create") - value?: float32; -} - -model CategoricalDataQualityMetricThreshold - extends DataQualityMetricThresholdBase { - @doc("[Required] The categorical data quality metric to calculate.") - @visibility("read", "create") - metric: CategoricalDataQualityMetric; - - @doc("[Required] Specifies the data type of the metric threshold.") - dataType: "Categorical"; -} - -@discriminator("dataType") -model DataQualityMetricThresholdBase { - @doc("The threshold value. If null, a default value will be set depending on the selected metric.") - @visibility("read", "create") - threshold?: MonitoringThreshold; -} - -model CategoricalPredictionDriftMetricThreshold - extends PredictionDriftMetricThresholdBase { - @doc("[Required] The categorical prediction drift metric to calculate.") - @visibility("read", "create") - metric: CategoricalPredictionDriftMetric; - - @doc("[Required] Specifies the data type of the metric threshold.") - dataType: "Categorical"; -} - -@discriminator("dataType") -model PredictionDriftMetricThresholdBase { - @doc("The threshold value. If null, a default value will be set depending on the selected metric.") - @visibility("read", "create") - threshold?: MonitoringThreshold; -} - -@doc("Certificate datastore credentials configuration.") -model CertificateDatastoreCredentials extends DatastoreCredentials { - @doc("Authority URL used for authentication.") - authorityUrl?: string; - - @doc("[Required] Service principal client ID.") - clientId: string; - - @doc("Resource the service principal has access to.") - resourceUrl?: string; - - @doc("[Required] Service principal secrets.") - @visibility("create", "update") - secrets: CertificateDatastoreSecrets; - - @doc("[Required] ID of the tenant to which the service principal belongs.") - tenantId: string; - - @doc("[Required] Thumbprint of the certificate used for authentication.") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - thumbprint: string; - - @doc("[Required] Credential type used to authentication with storage.") - credentialsType: "Certificate"; -} - -@doc("Datastore certificate secrets.") -model CertificateDatastoreSecrets extends DatastoreSecrets { - @doc("Service principal certificate.") - certificate?: string; - - @doc("[Required] Credential type used to authentication with storage.") - secretsType: "Certificate"; -} - -@doc("Classification task in AutoML Table vertical.") -model Classification extends AutoMLVertical { - ...TableVertical; - - @doc("Positive label for binary metrics calculation.") - positiveLabel?: string; - - @doc("Primary metric for the task.") - primaryMetric?: ClassificationPrimaryMetrics; - - @doc("Inputs for training phase for an AutoML Job.") - trainingSettings?: ClassificationTrainingSettings; - - @doc("[Required] Task type for AutoMLJob.") - taskType: "Classification"; -} - -@doc("Classification Training related configuration.") -model ClassificationTrainingSettings extends TrainingSettings { - @doc("Allowed models for classification task.") - allowedTrainingAlgorithms?: ClassificationModels[]; - - @doc("Blocked models for classification task.") - blockedTrainingAlgorithms?: ClassificationModels[]; -} - -@doc("Training related configuration.") -model TrainingSettings { - @doc("Enable recommendation of DNN models.") - enableDnnTraining?: boolean; - - @doc("Flag to turn on explainability on best model.") - enableModelExplainability?: boolean; - - @doc("Flag for enabling onnx compatible models.") - enableOnnxCompatibleModels?: boolean; - - @doc("Enable stack ensemble run.") - enableStackEnsemble?: boolean; - - @doc("Enable voting ensemble run.") - enableVoteEnsemble?: boolean; - - @doc(""" -During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. -Configure this parameter with a higher value than 300 secs, if more time is needed. -""") - ensembleModelDownloadTimeout?: duration; - - @doc("Stack ensemble settings for stack ensemble run.") - stackEnsembleSettings?: StackEnsembleSettings; - - @doc(""" -TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future may result in mixed mode or heuristics based mode selection. Default is 'auto'. -If 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. -If 'NonDistributed' then only non distributed algorithms are chosen. -""") - trainingMode?: TrainingMode; -} - -@doc("Advances setting to customize StackEnsemble run.") -model StackEnsembleSettings { - @doc("Optional parameters to pass to the initializer of the meta-learner.") - stackMetaLearnerKWargs?: Record; - - @doc("Specifies the proportion of the training set (when choosing train and validation type of training) to be reserved for training the meta-learner. Default value is 0.2.") - stackMetaLearnerTrainPercentage?: float32; - - @doc("The meta-learner is a model trained on the output of the individual heterogeneous models.") - stackMetaLearnerType?: StackMetaLearnerType; -} - -@doc("Abstract class for AutoML tasks that use table dataset as input - such as Classification/Regression/Forecasting.") -model TableVertical { - @doc("Columns to use for CVSplit data.") - cvSplitColumnNames?: string[]; - - @doc("Featurization inputs needed for AutoML job.") - featurizationSettings?: TableVerticalFeaturizationSettings; - - @doc("Model/training parameters that will remain constant throughout training.") - fixedParameters?: TableFixedParameters; - - @doc("Execution constraints for AutoMLJob.") - limitSettings?: TableVerticalLimitSettings; - - @doc(""" -Number of cross validation folds to be applied on training dataset -when validation dataset is not provided. -""") - nCrossValidations?: NCrossValidations; - - @doc("Search space for sampling different combinations of models and their hyperparameters.") - searchSpace?: TableParameterSubspace[]; - - @doc("Settings for model sweeping and hyperparameter tuning.") - sweepSettings?: TableSweepSettings; - - @doc("Test data input.") - testData?: MLTableJobInput; - - @doc(""" -The fraction of test dataset that needs to be set aside for validation purpose. -Values between (0.0 , 1.0) -Applied when validation dataset is not provided. -""") - testDataSize?: float32; - - @doc("Validation data inputs.") - validationData?: MLTableJobInput; - - @doc(""" -The fraction of training dataset that needs to be set aside for validation purpose. -Values between (0.0 , 1.0) -Applied when validation dataset is not provided. -""") - validationDataSize?: float32; - - @doc("The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down.") - weightColumnName?: string; -} - -@doc("Featurization Configuration.") -model TableVerticalFeaturizationSettings extends FeaturizationSettings { - @doc("These transformers shall not be used in featurization.") - blockedTransformers?: BlockedTransformers[]; - - @doc("Dictionary of column name and its type (int, float, string, datetime etc).") - columnNameAndTypes?: Record; - - @doc("Determines whether to use Dnn based featurizers for data featurization.") - enableDnnFeaturization?: boolean; - - @doc(""" -Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of necessary transformation of the data in featurization phase. -If 'Off' is selected then no featurization is done. -If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. -""") - mode?: FeaturizationMode; - - @doc("User can specify additional transformers to be used along with the columns to which it would be applied and parameters for the transformer constructor.") - transformerParams?: Record; -} - -@doc("Column transformer parameters.") -model ColumnTransformer { - @doc("Fields to apply transformer logic on.") - fields?: string[]; - - @doc(""" -Different properties to be passed to transformer. -Input expected is dictionary of key,value pairs in JSON format. -""") - parameters?: Record; -} - -@doc("Featurization Configuration.") -model FeaturizationSettings { - @doc("Dataset language, useful for the text data.") - datasetLanguage?: string; -} - -@doc("Fixed training parameters that won't be swept over during AutoML Table training.") -model TableFixedParameters { - @doc("Specify the boosting type, e.g gbdt for XGBoost.") - booster?: string; - - @doc("Specify the boosting type, e.g gbdt for LightGBM.") - boostingType?: string; - - @doc("Specify the grow policy, which controls the way new nodes are added to the tree.") - growPolicy?: string; - - @doc("The learning rate for the training procedure.") - learningRate?: float32; - - @doc("Specify the Maximum number of discrete bins to bucket continuous features .") - maxBin?: int32; - - @doc("Specify the max depth to limit the tree depth explicitly.") - maxDepth?: int32; - - @doc("Specify the max leaves to limit the tree leaves explicitly.") - maxLeaves?: int32; - - @doc("The minimum number of data per leaf.") - minDataInLeaf?: int32; - - @doc("Minimum loss reduction required to make a further partition on a leaf node of the tree.") - minSplitGain?: float32; - - @doc("The name of the model to train.") - modelName?: string; - - @doc("Specify the number of trees (or rounds) in an model.") - nEstimators?: int32; - - @doc("Specify the number of leaves.") - numLeaves?: int32; - - @doc("The name of the preprocessor to use.") - preprocessorName?: string; - - @doc("L1 regularization term on weights.") - regAlpha?: float32; - - @doc("L2 regularization term on weights.") - regLambda?: float32; - - @doc("Subsample ratio of the training instance.") - subsample?: float32; - - @doc("Frequency of subsample.") - subsampleFreq?: float32; - - @doc("Specify the tree method.") - treeMethod?: string; - - @doc("If true, center before scaling the data with StandardScalar.") - withMean?: boolean; - - @doc("If true, scaling the data with Unit Variance with StandardScalar.") - withStd?: boolean; -} - -@doc("Job execution constraints.") -model TableVerticalLimitSettings { - @doc("Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score improvement in last 20 iterations.") - enableEarlyTermination?: boolean; - - @doc("Exit score for the AutoML job.") - exitScore?: float32; - - @doc("Maximum Concurrent iterations.") - maxConcurrentTrials?: int32; - - @doc("Max cores per iteration.") - maxCoresPerTrial?: int32; - - @doc("Maximum nodes to use for the experiment.") - maxNodes?: int32; - - @doc("Number of iterations.") - maxTrials?: int32; - - @doc("Number of concurrent sweeping runs that user wants to trigger.") - sweepConcurrentTrials?: int32; - - @doc("Number of sweeping runs that user wants to trigger.") - sweepTrials?: int32; - - @doc("AutoML job timeout.") - timeout?: duration; - - @doc("Iteration timeout.") - trialTimeout?: duration; -} - -model TableParameterSubspace { - @doc("Specify the boosting type, e.g gbdt for XGBoost.") - booster?: string; - - @doc("Specify the boosting type, e.g gbdt for LightGBM.") - boostingType?: string; - - @doc("Specify the grow policy, which controls the way new nodes are added to the tree.") - growPolicy?: string; - - @doc("The learning rate for the training procedure.") - learningRate?: string; - - @doc("Specify the Maximum number of discrete bins to bucket continuous features .") - maxBin?: string; - - @doc("Specify the max depth to limit the tree depth explicitly.") - maxDepth?: string; - - @doc("Specify the max leaves to limit the tree leaves explicitly.") - maxLeaves?: string; - - @doc("The minimum number of data per leaf.") - minDataInLeaf?: string; - - @doc("Minimum loss reduction required to make a further partition on a leaf node of the tree.") - minSplitGain?: string; - - @doc("The name of the model to train.") - modelName?: string; - - @doc("Specify the number of trees (or rounds) in an model.") - nEstimators?: string; - - @doc("Specify the number of leaves.") - numLeaves?: string; - - @doc("The name of the preprocessor to use.") - preprocessorName?: string; - - @doc("L1 regularization term on weights.") - regAlpha?: string; - - @doc("L2 regularization term on weights.") - regLambda?: string; - - @doc("Subsample ratio of the training instance.") - subsample?: string; - - @doc("Frequency of subsample") - subsampleFreq?: string; - - @doc("Specify the tree method.") - treeMethod?: string; - - @doc("If true, center before scaling the data with StandardScalar.") - withMean?: string; - - @doc("If true, scaling the data with Unit Variance with StandardScalar.") - withStd?: string; -} - -model TableSweepSettings { - @doc("Type of early termination policy for the sweeping job.") - earlyTermination?: EarlyTerminationPolicy; - - @doc("[Required] Type of sampling algorithm.") - samplingAlgorithm: SamplingAlgorithmType; -} - -model ClassificationModelPerformanceMetricThreshold - extends ModelPerformanceMetricThresholdBase { - @doc("[Required] The classification model performance to calculate.") - @visibility("read", "create") - metric: ClassificationModelPerformanceMetric; - - @doc("[Required] Specifies the data type of the metric threshold.") - modelType: "Classification"; -} - -@discriminator("modelType") -model ModelPerformanceMetricThresholdBase { - @doc("The threshold value. If null, a default value will be set depending on the selected metric.") - @visibility("read", "create") - threshold?: MonitoringThreshold; -} - -model CocoExportSummary extends ExportSummary { - @doc("The container name to which the labels will be exported.") - @visibility("read") - containerName?: string; - - @doc("The output path where the labels will be exported.") - @visibility("read") - snapshotPath?: string; - - @doc("[Required] The format of exported labels, also as the discriminator.") - format: "Coco"; -} - -@doc("Command job definition.") -model CommandJob extends JobBase { - @doc("Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.") - @visibility("read", "create") - autologgerSettings?: AutologgerSettings; - - @doc("ARM resource ID of the code asset.") - @visibility("read", "create") - codeId?: string; - - @doc("[Required] The command to execute on startup of the job. eg. \"python train.py\"") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - command: string; - - @doc("Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, Ray, or null.") - @visibility("read", "create") - distribution?: DistributionConfiguration; - - @doc("[Required] The ARM resource ID of the Environment specification for the job.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - environmentId: string; - - @doc("Environment variables included in the job.") - @visibility("read", "create") - environmentVariables?: Record; - - @doc("Mapping of input data bindings used in the job.") - @visibility("read", "create") - inputs?: Record; - - @doc("Command Job limit.") - @visibility("read", "create") - limits?: CommandJobLimits; - - @doc("Mapping of output data bindings used in the job.") - @visibility("read", "create") - outputs?: Record; - - @doc("Input parameters.") - @visibility("read") - parameters?: Record; - - @doc("Queue settings for the job") - @visibility("read", "create") - queueSettings?: QueueSettings; - - @doc("Compute Resource configuration for the job.") - @visibility("read", "create") - resources?: JobResourceConfiguration; - - @doc("[Required] Specifies the type of job.") - jobType: "Command"; -} - -@doc("Base definition for job distribution configuration.") -@discriminator("distributionType") -model DistributionConfiguration {} - -@doc("Command Job limit class.") -model CommandJobLimits extends JobLimits { - @doc("[Required] JobLimit type.") - jobLimitsType: "Command"; -} - -@discriminator("jobLimitsType") -model JobLimits { - @doc("The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds.") - timeout?: duration; -} - -@doc("Resource requirements for each container instance within an online deployment.") -model ContainerResourceRequirements { - @doc("Container resource limit info:") - containerResourceLimits?: ContainerResourceSettings; - - @doc("Container resource request info:") - containerResourceRequests?: ContainerResourceSettings; -} - -model ContainerResourceSettings { - @doc(""" -Number of vCPUs request/limit for container. More info: -https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -""") - cpu?: string; - - @doc(""" -Number of Nvidia GPU cards request/limit for container. More info: -https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -""") - gpu?: string; - - @doc(""" -Memory size request/limit for container. More info: -https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -""") - memory?: string; -} - -model CreateMonitorAction extends ScheduleActionBase { - @doc("[Required] Defines the monitor.") - @visibility("read", "create") - monitorDefinition: MonitorDefinition; - - @doc("[Required] Specifies the action type of the schedule") - actionType: "CreateMonitor"; -} - -model MonitorDefinition { - @doc("The monitor's notification settings.") - @visibility("read", "create") - alertNotificationSetting?: MonitoringAlertNotificationSettingsBase; - - @doc("[Required] The ARM resource ID of the compute resource to run the monitoring job on.") - @visibility("read", "create") - computeConfiguration: MonitorComputeConfigurationBase; - - @doc("The ARM resource ID of either the model or deployment targeted by this monitor.") - @visibility("read", "create") - monitoringTarget?: MonitoringTarget; - - @doc("[Required] The signals to monitor.") - @visibility("read", "create") - signals: Record; -} - -@doc("Monitor compute configuration base definition.") -@discriminator("computeType") -model MonitorComputeConfigurationBase {} - -@doc("Monitoring target definition.") -model MonitoringTarget { - @doc("The ARM resource ID of either the deployment targeted by this monitor.") - @visibility("read", "create") - deploymentId?: string; - - @doc("The ARM resource ID of either the model targeted by this monitor.") - @visibility("read", "create") - modelId?: string; - - @doc("[Required] The machine learning task type of the model.") - @visibility("read", "create") - taskType: ModelTaskType; -} - -@discriminator("signalType") -model MonitoringSignalBase { - @doc("The current notification mode for this signal.") - @visibility("read", "create") - mode?: MonitoringNotificationMode; - - @doc("Property dictionary. Properties can be added, but not removed or altered.") - properties?: Record; -} - -model CronTrigger extends TriggerBase { - @doc(""" -[Required] Specifies cron expression of schedule. -The expression should follow NCronTab format. -""") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - expression: string; - - @doc("[Required] ") - triggerType: "Cron"; -} - -model CsvExportSummary extends ExportSummary { - @doc("The container name to which the labels will be exported.") - @visibility("read") - containerName?: string; - - @doc("The output path where the labels will be exported.") - @visibility("read") - snapshotPath?: string; - - @doc("[Required] The format of exported labels, also as the discriminator.") - format: "CSV"; -} - -@doc("The desired maximum forecast horizon in units of time-series frequency.") -model CustomForecastHorizon extends ForecastHorizon { - @doc("[Required] Forecast horizon value.") - value: int32; - - @doc("[Required] Set forecast horizon value selection mode.") - mode: "Custom"; -} - -@doc("Custom inference server configurations.") -model CustomInferencingServer extends InferencingServer { - @doc("Inference configuration for custom inferencing.") - inferenceConfiguration?: OnlineInferenceConfiguration; - - @doc("[Required] Inferencing server type for various targets.") - serverType: "Custom"; -} - -@doc("Online inference configuration options.") -model OnlineInferenceConfiguration { - @doc("Additional configurations") - configurations?: Record; - - @doc("Entry script or command to invoke.") - entryScript?: string; - - @doc("The route to check the liveness of the inference server container.") - livenessRoute?: Route; - - @doc("The route to check the readiness of the inference server container.") - readinessRoute?: Route; - - @doc("The port to send the scoring requests to, within the inference server container.") - scoringRoute?: Route; -} - -model CustomMetricThreshold { - @doc("[Required] The user-defined metric to calculate.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - metric: string; - - @doc("The threshold value. If null, a default value will be set depending on the selected metric.") - @visibility("read", "create") - threshold?: MonitoringThreshold; -} - -model CustomModelJobInput extends JobInput { - ...AssetJobInput; - - @doc("[Required] Specifies the type of job.") - jobInputType: "custom_model"; -} - -model CustomModelJobOutput extends JobOutput { - ...AssetJobOutput; - - @doc("[Required] Specifies the type of job.") - jobOutputType: "custom_model"; -} - -model CustomMonitoringSignal extends MonitoringSignalBase { - @doc("[Required] ARM resource ID of the component resource used to calculate the custom metrics.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - componentId: string; - - @doc("Monitoring assets to take as input. Key is the component input port name, value is the data asset.") - @visibility("read", "create") - inputAssets?: Record; - - @doc("Extra component parameters to take as input. Key is the component literal input port name, value is the parameter value.") - @visibility("read", "create") - inputs?: Record; - - @doc("[Required] A list of metrics to calculate and their associated thresholds.") - @visibility("read", "create") - metricThresholds: CustomMetricThreshold[]; - - @doc("[Required] A list of metrics to calculate and their associated thresholds.") - @visibility("read", "create") - workspaceConnection: MonitoringWorkspaceConnection; - - @doc("[Required] Specifies the type of signal to monitor.") - signalType: "Custom"; -} - -@doc("Monitoring input data base definition.") -@discriminator("inputDataType") -model MonitoringInputDataBase { - @doc("Mapping of column names to special uses.") - @visibility("read", "create") - columns?: Record; - - @doc("The context metadata of the data source.") - @visibility("read", "create") - dataContext?: string; - - @doc("[Required] Specifies the type of job.") - @visibility("read", "create") - jobInputType: JobInputType; - - @doc("[Required] Input Asset URI.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - uri: string; -} - -@doc("Monitoring workspace connection definition.") -model MonitoringWorkspaceConnection { - @doc(""" -The properties of a workspace service connection to store as environment variables in the submitted jobs. -Key is workspace connection property path, name is environment variable key. -""") - @visibility("read", "create") - environmentVariables?: Record; - - @doc(""" -The properties of a workspace service connection to store as secrets in the submitted jobs. -Key is workspace connection property path, name is secret key. -""") - @visibility("read", "create") - secrets?: Record; -} - -@doc("N-Cross validations are specified by user.") -model CustomNCrossValidations extends NCrossValidations { - @doc("[Required] N-Cross validations value.") - value: int32; - - @doc("[Required] Mode for determining N-Cross validations.") - mode: "Custom"; -} - -model CustomSeasonality extends Seasonality { - @doc("[Required] Seasonality value.") - value: int32; - - @doc("[Required] Seasonality mode.") - mode: "Custom"; -} - -model CustomTargetLags extends TargetLags { - @doc("[Required] Set target lags values.") - values: int32[]; - - @doc("[Required] Set target lags mode - Auto/Custom") - mode: "Custom"; -} - -model CustomTargetRollingWindowSize extends TargetRollingWindowSize { - @doc("[Required] TargetRollingWindowSize value.") - value: int32; - - @doc("[Required] TargetRollingWindowSiz detection mode.") - mode: "Custom"; -} - -model DataDriftMonitoringSignal extends MonitoringSignalBase { - @doc("The data segment used for scoping on a subset of the data population.") - @visibility("read", "create") - dataSegment?: MonitoringDataSegment; - - @doc("A dictionary that maps feature names to their respective data types.") - @visibility("read", "create") - featureDataTypeOverride?: Record; - - @doc("The feature filter which identifies which feature to calculate drift over.") - @visibility("read", "create") - features?: MonitoringFeatureFilterBase; - - @doc("[Required] A list of metrics to calculate and their associated thresholds.") - @visibility("read", "create") - metricThresholds: DataDriftMetricThresholdBase[]; - - @doc("[Required] The data which drift will be calculated for.") - @visibility("read", "create") - productionData: MonitoringInputDataBase; - - @doc("[Required] The data to calculate drift against.") - @visibility("read", "create") - referenceData: MonitoringInputDataBase; - - @doc("[Required] Specifies the type of signal to monitor.") - signalType: "DataDrift"; -} - -model MonitoringDataSegment { - @doc("The feature to segment the data on.") - @visibility("read", "create") - feature?: string; - - @doc("Filters for only the specified values of the given segmented feature.") - @visibility("read", "create") - values?: string[]; -} - -model DataImport extends DataVersionBase { - @doc("Name of the asset for data import job to create") - assetName?: string; - - @doc("Source data of the asset to import from") - source?: DataImportSource; - - @doc("[Required] Specifies the type of data.") - dataType: "uri_folder"; -} - -@discriminator("sourceType") -model DataImportSource { - @doc("Workspace connection for data import source storage") - connection?: string; -} - -@doc("Reference to an asset via its path in a datastore.") -model DataPathAssetReference extends AssetReferenceBase { - @doc("ARM resource ID of the datastore where the asset is located.") - datastoreId?: string; - - @doc("The path of the file/directory in the datastore.") - path?: string; - - @doc("[Required] Specifies the type of asset reference.") - referenceType: "DataPath"; -} model DataQualityMonitoringSignal extends MonitoringSignalBase { - @doc("A dictionary that maps feature names to their respective data types.") - @visibility("read", "create") - featureDataTypeOverride?: Record; - - @doc("The features to calculate drift over.") - @visibility("read", "create") - features?: MonitoringFeatureFilterBase; - - @doc("[Required] A list of metrics to calculate and their associated thresholds.") - @visibility("read", "create") - metricThresholds: DataQualityMetricThresholdBase[]; - - @doc("[Required] The data produced by the production service which drift will be calculated for.") - @visibility("read", "create") - productionData: MonitoringInputDataBase; - - @doc("[Required] The data to calculate drift against.") - @visibility("read", "create") - referenceData: MonitoringInputDataBase; - - @doc("[Required] Specifies the type of signal to monitor.") - signalType: "DataQuality"; +/** +* A dictionary that maps feature names to their respective data types. +*/ +@visibility("read", "create") +"featureDataTypeOverride"?: Record; +/** +* The features to calculate drift over. +*/ +@visibility("read", "create") +"features"?: MonitoringFeatureFilterBase; +/** +* [Required] A list of metrics to calculate and their associated thresholds. +*/ +@visibility("read", "create") +"metricThresholds": DataQualityMetricThresholdBase[]; +/** +* [Required] The data produced by the production service which drift will be calculated for. +*/ +@visibility("read", "create") +"productionData": MonitoringInputDataBase; +/** +* [Required] The data to calculate drift against. +*/ +@visibility("read", "create") +"referenceData": MonitoringInputDataBase; +/** +* [Required] Specifies the type of signal to monitor. +*/ +"signalType": "DataQuality"; } -model DatabaseSource extends DataImportSource { - @doc("SQL Query statement for data import Database source") - query?: string; - - @doc("SQL StoredProcedure on data import Database source") - storedProcedure?: string; - - @doc("SQL StoredProcedure parameters") - storedProcedureParams?: Record[]; - @doc("Name of the table on data import Database source") - tableName?: string; - - @doc("[Required] Specifies the type of data.") - sourceType: "database"; +model DatabaseSource extends DataImportSource { +/** +* SQL Query statement for data import Database source +*/ +"query"?: string; +/** +* SQL StoredProcedure on data import Database source +*/ +"storedProcedure"?: string; +/** +* SQL StoredProcedure parameters +*/ +"storedProcedureParams"?: Record[]; +/** +* Name of the table on data import Database source +*/ +"tableName"?: string; +/** +* [Required] Specifies the type of data. +*/ +"sourceType": "database"; } -model DatasetExportSummary extends ExportSummary { - @doc("The unique name of the labeled data asset.") - @visibility("read") - labeledAssetName?: string; - @doc("[Required] The format of exported labels, also as the discriminator.") - format: "Dataset"; +model DatasetExportSummary extends ExportSummary { +/** +* The unique name of the labeled data asset. +*/ +@visibility("read") +"labeledAssetName"?: string; +/** +* [Required] The format of exported labels, also as the discriminator. +*/ +"format": "Dataset"; } + model DefaultScaleSettings extends OnlineScaleSettings { - @doc("[Required] Type of deployment scaling algorithm") - scaleType: "Default"; +/** +* [Required] Type of deployment scaling algorithm +*/ +"scaleType": "Default"; } -model EmailMonitoringAlertNotificationSettings - extends MonitoringAlertNotificationSettingsBase { - @doc("Configuration for notification.") - @visibility("read", "create") - emailNotificationSetting?: NotificationSetting; - @doc("[Required] Specifies the type of signal to monitor.") - alertNotificationType: "Email"; +model EmailMonitoringAlertNotificationSettings extends MonitoringAlertNotificationSettingsBase { +/** +* Configuration for notification. +*/ +@visibility("read", "create") +"emailNotificationSetting"?: NotificationSetting; +/** +* [Required] Specifies the type of signal to monitor. +*/ +"alertNotificationType": "Email"; } -model EndpointScheduleAction extends ScheduleActionBase { - @doc(""" -[Required] Defines Schedule action definition details. - -""") - @visibility("read", "create", "update") - endpointInvocationDefinition: Record; - @doc("[Required] Specifies the action type of the schedule") - actionType: "InvokeBatchEndpoint"; +model EndpointScheduleAction extends ScheduleActionBase { +/** +* [Required] Defines Schedule action definition details. + +*/ +@visibility("read", "create", "update") +"endpointInvocationDefinition": Record; +/** +* [Required] Specifies the action type of the schedule +*/ +"actionType": "InvokeBatchEndpoint"; } -model FeatureAttributionDriftMonitoringSignal extends MonitoringSignalBase { - @doc("[Required] A list of metrics to calculate and their associated thresholds.") - @visibility("read", "create") - metricThreshold: FeatureAttributionMetricThreshold; - - @doc("[Required] The data which drift will be calculated for.") - @visibility("read", "create") - productionData: MonitoringInputDataBase[]; - - @doc("[Required] The data to calculate drift against.") - @visibility("read", "create") - referenceData: MonitoringInputDataBase; - @doc("[Required] Specifies the type of signal to monitor.") - signalType: "FeatureAttributionDrift"; +model FeatureAttributionDriftMonitoringSignal extends MonitoringSignalBase { +/** +* [Required] A list of metrics to calculate and their associated thresholds. +*/ +@visibility("read", "create") +"metricThreshold": FeatureAttributionMetricThreshold; +/** +* [Required] The data which drift will be calculated for. +*/ +@visibility("read", "create") +"productionData": MonitoringInputDataBase[]; +/** +* [Required] The data to calculate drift against. +*/ +@visibility("read", "create") +"referenceData": MonitoringInputDataBase; +/** +* [Required] Specifies the type of signal to monitor. +*/ +"signalType": "FeatureAttributionDrift"; } -model FeatureAttributionMetricThreshold { - @doc("[Required] The feature attribution metric to calculate.") - @visibility("read", "create") - metric: FeatureAttributionMetric; - @doc("The threshold value. If null, a default value will be set depending on the selected metric.") - @visibility("read", "create") - threshold?: MonitoringThreshold; +model FeatureAttributionMetricThreshold { +/** +* [Required] The feature attribution metric to calculate. +*/ +@visibility("read", "create") +"metric": FeatureAttributionMetric; +/** +* The threshold value. If null, a default value will be set depending on the selected metric. +*/ +@visibility("read", "create") +"threshold"?: MonitoringThreshold; } -model FeatureSubset extends MonitoringFeatureFilterBase { - @doc("[Required] The list of features to include.") - @visibility("read", "create") - features: string[]; - @doc("[Required] Specifies the feature filter to leverage when selecting features to calculate metrics over.") - filterType: "FeatureSubset"; +model FeatureSubset extends MonitoringFeatureFilterBase { +/** +* [Required] The list of features to include. +*/ +@visibility("read", "create") +"features": string[]; +/** +* [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. +*/ +"filterType": "FeatureSubset"; } -model FileSystemSource extends DataImportSource { - @doc("Path on data import FileSystem source") - path?: string; - - @doc("[Required] Specifies the type of data.") - sourceType: "file_system"; -} -@doc("Fixed input data definition.") +model FileSystemSource extends DataImportSource { +/** +* Path on data import FileSystem source +*/ +"path"?: string; +/** +* [Required] Specifies the type of data. +*/ +"sourceType": "file_system"; +} + +/** +* Fixed input data definition. +*/ model FixedInputData extends MonitoringInputDataBase { - @doc("[Required] Specifies the type of signal to monitor.") - inputDataType: "Fixed"; +/** +* [Required] Specifies the type of signal to monitor. +*/ +"inputDataType": "Fixed"; } -@doc("Forecasting task in AutoML Table vertical.") +/** +* Forecasting task in AutoML Table vertical. +*/ model Forecasting extends AutoMLVertical { - ...TableVertical; - - @doc("Forecasting task specific inputs.") - forecastingSettings?: ForecastingSettings; - - @doc("Primary metric for forecasting task.") - primaryMetric?: ForecastingPrimaryMetrics; - - @doc("Inputs for training phase for an AutoML Job.") - trainingSettings?: ForecastingTrainingSettings; - - @doc("[Required] Task type for AutoMLJob.") - taskType: "Forecasting"; -} - -@doc("Forecasting specific parameters.") +...TableVertical; +/** +* Forecasting task specific inputs. +*/ +"forecastingSettings"?: ForecastingSettings; +/** +* Primary metric for forecasting task. +*/ +"primaryMetric"?: ForecastingPrimaryMetrics; +/** +* Inputs for training phase for an AutoML Job. +*/ +"trainingSettings"?: ForecastingTrainingSettings; +/** +* [Required] Task type for AutoMLJob. +*/ +"taskType": "Forecasting"; +} + +/** +* Forecasting specific parameters. +*/ model ForecastingSettings { - @doc(""" -Country or region for holidays for forecasting tasks. +/** +* Country or region for holidays for forecasting tasks. These should be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. -""") - countryOrRegionForHolidays?: string; - - @doc(""" -Number of periods between the origin time of one CV fold and the next fold. For +*/ +"countryOrRegionForHolidays"?: string; +/** +* Number of periods between the origin time of one CV fold and the next fold. For example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be three days apart. -""") - cvStepSize?: int32; - - @doc("Flag for generating lags for the numeric features with 'auto' or null.") - featureLags?: FeatureLags; - - @doc(""" -The feature columns that are available for training but unknown at the time of forecast/inference. +*/ +"cvStepSize"?: int32; +/** +* Flag for generating lags for the numeric features with 'auto' or null. +*/ +"featureLags"?: FeatureLags; +/** +* The feature columns that are available for training but unknown at the time of forecast/inference. If features_unknown_at_forecast_time is not set, it is assumed that all the feature columns in the dataset are known at inference time. -""") - featuresUnknownAtForecastTime?: string[]; - - @doc("The desired maximum forecast horizon in units of time-series frequency.") - forecastHorizon?: ForecastHorizon; - - @doc("When forecasting, this parameter represents the period with which the forecast is desired, for example daily, weekly, yearly, etc. The forecast frequency is dataset frequency by default.") - frequency?: string; - - @doc(""" -Set time series seasonality as an integer multiple of the series frequency. +*/ +"featuresUnknownAtForecastTime"?: string[]; +/** +* The desired maximum forecast horizon in units of time-series frequency. +*/ +"forecastHorizon"?: ForecastHorizon; +/** +* When forecasting, this parameter represents the period with which the forecast is desired, for example daily, weekly, yearly, etc. The forecast frequency is dataset frequency by default. +*/ +"frequency"?: string; +/** +* Set time series seasonality as an integer multiple of the series frequency. If seasonality is set to 'auto', it will be inferred. -""") - seasonality?: Seasonality; - - @doc("The parameter defining how if AutoML should handle short time series.") - shortSeriesHandlingConfig?: ShortSeriesHandlingConfiguration; - - @doc(""" -The function to be used to aggregate the time series target column to conform to a user specified frequency. -If the TargetAggregateFunction is set i.e. not 'None', but the freq parameter is not set, the error is raised. The possible target aggregation functions are: \"sum\", \"max\", \"min\" and \"mean\". -""") - targetAggregateFunction?: TargetAggregationFunction; - - @doc("The number of past periods to lag from the target column.") - targetLags?: TargetLags; - - @doc("The number of past periods used to create a rolling window average of the target column.") - targetRollingWindowSize?: TargetRollingWindowSize; - - @doc("The name of the time column. This parameter is required when forecasting to specify the datetime column in the input data used for building the time series and inferring its frequency.") - timeColumnName?: string; - - @doc(""" -The names of columns used to group a timeseries. It can be used to create multiple series. +*/ +"seasonality"?: Seasonality; +/** +* The parameter defining how if AutoML should handle short time series. +*/ +"shortSeriesHandlingConfig"?: ShortSeriesHandlingConfiguration; +/** +* The function to be used to aggregate the time series target column to conform to a user specified frequency. +If the TargetAggregateFunction is set i.e. not 'None', but the freq parameter is not set, the error is raised. The possible target aggregation functions are: "sum", "max", "min" and "mean". +*/ +"targetAggregateFunction"?: TargetAggregationFunction; +/** +* The number of past periods to lag from the target column. +*/ +"targetLags"?: TargetLags; +/** +* The number of past periods used to create a rolling window average of the target column. +*/ +"targetRollingWindowSize"?: TargetRollingWindowSize; +/** +* The name of the time column. This parameter is required when forecasting to specify the datetime column in the input data used for building the time series and inferring its frequency. +*/ +"timeColumnName"?: string; +/** +* The names of columns used to group a timeseries. It can be used to create multiple series. If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type forecasting. -""") - timeSeriesIdColumnNames?: string[]; - - @doc("Configure STL Decomposition of the time-series target column.") - useStl?: UseStl; +*/ +"timeSeriesIdColumnNames"?: string[]; +/** +* Configure STL Decomposition of the time-series target column. +*/ +"useStl"?: UseStl; } -@doc("Forecasting Training related configuration.") +/** +* Forecasting Training related configuration. +*/ model ForecastingTrainingSettings extends TrainingSettings { - @doc("Allowed models for forecasting task.") - allowedTrainingAlgorithms?: ForecastingModels[]; - - @doc("Blocked models for forecasting task.") - blockedTrainingAlgorithms?: ForecastingModels[]; -} - -@doc("Generation safety quality metric threshold definition.") +/** +* Allowed models for forecasting task. +*/ +"allowedTrainingAlgorithms"?: ForecastingModels[]; +/** +* Blocked models for forecasting task. +*/ +"blockedTrainingAlgorithms"?: ForecastingModels[]; +} + +/** +* Generation safety quality metric threshold definition. +*/ model GenerationSafetyQualityMetricThreshold { - @doc("[Required] Gets or sets the feature attribution metric to calculate.") - @visibility("read", "create") - metric: GenerationSafetyQualityMetric; - - @doc(""" -Gets or sets the threshold value. +/** +* [Required] Gets or sets the feature attribution metric to calculate. +*/ +@visibility("read", "create") +"metric": GenerationSafetyQualityMetric; +/** +* Gets or sets the threshold value. If null, a default value will be set depending on the selected metric. -""") - @visibility("read", "create") - threshold?: MonitoringThreshold; +*/ +@visibility("read", "create") +"threshold"?: MonitoringThreshold; } -@doc("Generation safety quality monitoring signal definition.") +/** +* Generation safety quality monitoring signal definition. +*/ model GenerationSafetyQualityMonitoringSignal extends MonitoringSignalBase { - @doc("[Required] Gets or sets the metrics to calculate and the corresponding thresholds.") - @visibility("read", "create") - metricThresholds: GenerationSafetyQualityMetricThreshold[]; - - @doc("Gets or sets the target data for computing metrics.") - @visibility("read", "create") - productionData?: MonitoringInputDataBase[]; - - @doc("[Required] The sample rate of the target data, should be greater than 0 and at most 1.") - @visibility("read", "create") - samplingRate: float32; - - @doc("Gets or sets the workspace connection ID used to connect to the content generation endpoint.") - @visibility("read", "create") - workspaceConnectionId?: string; - - @doc("[Required] Specifies the type of signal to monitor.") - signalType: "GenerationSafetyQuality"; -} - -@doc("Generation token statistics metric threshold definition.") +/** +* [Required] Gets or sets the metrics to calculate and the corresponding thresholds. +*/ +@visibility("read", "create") +"metricThresholds": GenerationSafetyQualityMetricThreshold[]; +/** +* Gets or sets the target data for computing metrics. +*/ +@visibility("read", "create") +"productionData"?: MonitoringInputDataBase[]; +/** +* [Required] The sample rate of the target data, should be greater than 0 and at most 1. +*/ +@visibility("read", "create") +"samplingRate": float64; +/** +* Gets or sets the workspace connection ID used to connect to the content generation endpoint. +*/ +@visibility("read", "create") +"workspaceConnectionId"?: string; +/** +* [Required] Specifies the type of signal to monitor. +*/ +"signalType": "GenerationSafetyQuality"; +} + +/** +* Generation token statistics metric threshold definition. +*/ model GenerationTokenStatisticsMetricThreshold { - @doc("[Required] Gets or sets the feature attribution metric to calculate.") - @visibility("read", "create") - metric: GenerationTokenStatisticsMetric; - - @doc(""" -Gets or sets the threshold value. +/** +* [Required] Gets or sets the feature attribution metric to calculate. +*/ +@visibility("read", "create") +"metric": GenerationTokenStatisticsMetric; +/** +* Gets or sets the threshold value. If null, a default value will be set depending on the selected metric. -""") - @visibility("read", "create") - threshold?: MonitoringThreshold; -} - -@doc("Generation token statistics signal definition.") -model GenerationTokenStatisticsSignal extends MonitoringSignalBase { - @doc("[Required] Gets or sets the metrics to calculate and the corresponding thresholds.") - @visibility("read", "create") - metricThresholds: GenerationTokenStatisticsMetricThreshold[]; - - @doc("Gets or sets the target data for computing metrics.") - @visibility("read", "create") - productionData?: MonitoringInputDataBase; - - @doc("[Required] The sample rate of the target data, should be greater than 0 and at most 1.") - @visibility("read", "create") - samplingRate: float32; - - @doc("[Required] Specifies the type of signal to monitor.") - signalType: "GenerationTokenStatistics"; -} - -@doc("Defines a Sampling Algorithm that exhaustively generates every value combination in the space") -model GridSamplingAlgorithm extends SamplingAlgorithm { - @doc("[Required] The algorithm used for generating hyperparameter values, along with configuration properties") - samplingAlgorithmType: "Grid"; +*/ +@visibility("read", "create") +"threshold"?: MonitoringThreshold; } -model HdfsDatastore extends Datastore { - @doc("The TLS cert of the HDFS server. Needs to be a base64 encoded string. Required if \"Https\" protocol is selected.") - @visibility("read", "create") - hdfsServerCertificate?: string; - - @doc("[Required] IP Address or DNS HostName.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - nameNodeAddress: string; - - @doc("Protocol used to communicate with the storage account (Https/Http).") - @visibility("read", "create") - protocol?: string; - - @doc("[Required] Storage type backing the datastore.") - datastoreType: "Hdfs"; +/** +* Generation token statistics signal definition. +*/ +model GenerationTokenStatisticsSignal extends MonitoringSignalBase { +/** +* [Required] Gets or sets the metrics to calculate and the corresponding thresholds. +*/ +@visibility("read", "create") +"metricThresholds": GenerationTokenStatisticsMetricThreshold[]; +/** +* Gets or sets the target data for computing metrics. +*/ +@visibility("read", "create") +"productionData"?: MonitoringInputDataBase; +/** +* [Required] The sample rate of the target data, should be greater than 0 and at most 1. +*/ +@visibility("read", "create") +"samplingRate": float64; +/** +* [Required] Specifies the type of signal to monitor. +*/ +"signalType": "GenerationTokenStatistics"; +} + +/** +* Defines a Sampling Algorithm that exhaustively generates every value combination in the space +*/ +model GridSamplingAlgorithm extends SamplingAlgorithm { +/** +* [Required] The algorithm used for generating hyperparameter values, along with configuration properties +*/ +"samplingAlgorithmType": "Grid"; } -@doc(""" -Image Classification. Multi-class image classification is used when an image is classified with only a single label + +model HdfsDatastore extends Datastore { +/** +* The TLS cert of the HDFS server. Needs to be a base64 encoded string. Required if "Https" protocol is selected. +*/ +@visibility("read", "create") +"hdfsServerCertificate"?: string; +/** +* [Required] IP Address or DNS HostName. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"nameNodeAddress": string; +/** +* Protocol used to communicate with the storage account (Https/Http). +*/ +@visibility("read", "create") +"protocol"?: string = "http"; +/** +* [Required] Storage type backing the datastore. +*/ +"datastoreType": "Hdfs"; +} + +/** +* Image Classification. Multi-class image classification is used when an image is classified with only a single label from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. -""") +*/ model ImageClassification extends AutoMLVertical { - ...ImageClassificationBase; - - @doc("Primary metric to optimize for this task.") - primaryMetric?: ClassificationPrimaryMetrics; - - @doc("[Required] Task type for AutoMLJob.") - taskType: "ImageClassification"; +...ImageClassificationBase; +/** +* Primary metric to optimize for this task. +*/ +"primaryMetric"?: ClassificationPrimaryMetrics; +/** +* [Required] Task type for AutoMLJob. +*/ +"taskType": "ImageClassification"; } -model ImageClassificationBase extends ImageVertical { - @doc("Settings used for training the model.") - modelSettings?: ImageModelSettingsClassification; - - @doc("Search space for sampling different combinations of models and their hyperparameters.") - searchSpace?: ImageModelDistributionSettingsClassification[]; -} -@doc(""" -Settings used for training the model. +model ImageClassificationBase extends ImageVertical { +/** +* Settings used for training the model. +*/ +"modelSettings"?: ImageModelSettingsClassification; +/** +* Search space for sampling different combinations of models and their hyperparameters. +*/ +"searchSpace"?: ImageModelDistributionSettingsClassification[]; +} + +/** +* Settings used for training the model. For more information on the available settings please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -""") +*/ model ImageModelSettingsClassification extends ImageModelSettings { - @doc("Image crop size that is input to the neural network for the training dataset. Must be a positive integer.") - trainingCropSize?: int32; - - @doc("Image crop size that is input to the neural network for the validation dataset. Must be a positive integer.") - validationCropSize?: int32; - - @doc("Image size to which to resize before cropping for validation dataset. Must be a positive integer.") - validationResizeSize?: int32; - - @doc(""" -Weighted loss. The accepted values are 0 for no weighted loss. +/** +* Image crop size that is input to the neural network for the training dataset. Must be a positive integer. +*/ +"trainingCropSize"?: int32; +/** +* Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. +*/ +"validationCropSize"?: int32; +/** +* Image size to which to resize before cropping for validation dataset. Must be a positive integer. +*/ +"validationResizeSize"?: int32; +/** +* Weighted loss. The accepted values are 0 for no weighted loss. 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. -""") - weightedLoss?: int32; +*/ +"weightedLoss"?: int32; } -@doc(""" -Settings used for training the model. +/** +* Settings used for training the model. For more information on the available settings please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -""") +*/ model ImageModelSettings { - @doc("Settings for advanced scenarios.") - advancedSettings?: string; - - @doc("Enable AMSGrad when optimizer is 'adam' or 'adamw'.") - amsGradient?: boolean; - - @doc("Settings for using Augmentations.") - augmentations?: string; - - @doc("Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].") - beta1?: float32; - - @doc("Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].") - beta2?: float32; - - @doc("Frequency to store model checkpoints. Must be a positive integer.") - checkpointFrequency?: int32; - - @doc("The pretrained checkpoint model for incremental training.") - checkpointModel?: MLFlowModelJobInput; - - @doc("The id of a previous run that has a pretrained checkpoint for incremental training.") - checkpointRunId?: string; - - @doc("Whether to use distributed training.") - distributed?: boolean; - - @doc("Enable early stopping logic during training.") - earlyStopping?: boolean; - - @doc(""" -Minimum number of epochs or validation evaluations to wait before primary metric improvement +/** +* Settings for advanced scenarios. +*/ +"advancedSettings"?: string; +/** +* Enable AMSGrad when optimizer is 'adam' or 'adamw'. +*/ +"amsGradient"?: boolean; +/** +* Settings for using Augmentations. +*/ +"augmentations"?: string; +/** +* Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. +*/ +"beta1"?: float32; +/** +* Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. +*/ +"beta2"?: float32; +/** +* Frequency to store model checkpoints. Must be a positive integer. +*/ +"checkpointFrequency"?: int32; +/** +* The pretrained checkpoint model for incremental training. +*/ +"checkpointModel"?: MLFlowModelJobInput; +/** +* The id of a previous run that has a pretrained checkpoint for incremental training. +*/ +"checkpointRunId"?: string; +/** +* Whether to use distributed training. +*/ +"distributed"?: boolean; +/** +* Enable early stopping logic during training. +*/ +"earlyStopping"?: boolean; +/** +* Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. Must be a positive integer. -""") - earlyStoppingDelay?: int32; - - @doc(""" -Minimum number of epochs or validation evaluations with no primary metric improvement before +*/ +"earlyStoppingDelay"?: int32; +/** +* Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be a positive integer. -""") - earlyStoppingPatience?: int32; - - @doc("Enable normalization when exporting ONNX model.") - enableOnnxNormalization?: boolean; - - @doc("Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.") - evaluationFrequency?: int32; - - @doc(""" -Gradient accumulation means running a configured number of \"GradAccumulationStep\" steps without +*/ +"earlyStoppingPatience"?: int32; +/** +* Enable normalization when exporting ONNX model. +*/ +"enableOnnxNormalization"?: boolean; +/** +* Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. +*/ +"evaluationFrequency"?: int32; +/** +* Gradient accumulation means running a configured number of "GradAccumulationStep" steps without updating the model weights while accumulating the gradients of those steps, and then using the accumulated gradients to compute the weight updates. Must be a positive integer. -""") - gradientAccumulationStep?: int32; - - @doc(""" -Number of layers to freeze for the model. Must be a positive integer. +*/ +"gradientAccumulationStep"?: int32; +/** +* Number of layers to freeze for the model. Must be a positive integer. For instance, passing 2 as value for 'seresnext' means freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -""") - layersToFreeze?: int32; - - @doc("Initial learning rate. Must be a float in the range [0, 1].") - learningRate?: float32; - - @doc("Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'.") - learningRateScheduler?: LearningRateScheduler; - - @doc(""" -Name of the model to use for training. +*/ +"layersToFreeze"?: int32; +/** +* Initial learning rate. Must be a float in the range [0, 1]. +*/ +"learningRate"?: float32; +/** +* Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. +*/ +"learningRateScheduler"?: LearningRateScheduler; +/** +* Name of the model to use for training. For more information on the available models please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -""") - modelName?: string; - - @doc("Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1].") - momentum?: float32; - - @doc("Enable nesterov when optimizer is 'sgd'.") - nesterov?: boolean; - - @doc("Number of training epochs. Must be a positive integer.") - numberOfEpochs?: int32; - - @doc("Number of data loader workers. Must be a non-negative integer.") - numberOfWorkers?: int32; - - @doc("Type of optimizer.") - optimizer?: StochasticOptimizer; - - @doc("Random seed to be used when using deterministic training.") - randomSeed?: int32; - - @doc("Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1].") - stepLRGamma?: float32; - - @doc("Value of step size when learning rate scheduler is 'step'. Must be a positive integer.") - stepLRStepSize?: int32; - - @doc("Training batch size. Must be a positive integer.") - trainingBatchSize?: int32; - - @doc("Validation batch size. Must be a positive integer.") - validationBatchSize?: int32; - - @doc("Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1].") - warmupCosineLRCycles?: float32; - - @doc("Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer.") - warmupCosineLRWarmupEpochs?: int32; - - @doc("Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1].") - weightDecay?: float32; +*/ +"modelName"?: string; +/** +* Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. +*/ +"momentum"?: float32; +/** +* Enable nesterov when optimizer is 'sgd'. +*/ +"nesterov"?: boolean; +/** +* Number of training epochs. Must be a positive integer. +*/ +"numberOfEpochs"?: int32; +/** +* Number of data loader workers. Must be a non-negative integer. +*/ +"numberOfWorkers"?: int32; +/** +* Type of optimizer. +*/ +"optimizer"?: StochasticOptimizer; +/** +* Random seed to be used when using deterministic training. +*/ +"randomSeed"?: int32; +/** +* Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. +*/ +"stepLRGamma"?: float32; +/** +* Value of step size when learning rate scheduler is 'step'. Must be a positive integer. +*/ +"stepLRStepSize"?: int32; +/** +* Training batch size. Must be a positive integer. +*/ +"trainingBatchSize"?: int32; +/** +* Validation batch size. Must be a positive integer. +*/ +"validationBatchSize"?: int32; +/** +* Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. +*/ +"warmupCosineLRCycles"?: float32; +/** +* Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. +*/ +"warmupCosineLRWarmupEpochs"?: int32; +/** +* Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. +*/ +"weightDecay"?: float32; } -model MLFlowModelJobInput extends JobInput { - ...AssetJobInput; - @doc("[Required] Specifies the type of job.") - jobInputType: "mlflow_model"; +model MLFlowModelJobInput extends JobInput { +...AssetJobInput; +/** +* [Required] Specifies the type of job. +*/ +"jobInputType": "mlflow_model"; } -@doc(""" -Distribution expressions to sweep over values of model settings. +/** +* Distribution expressions to sweep over values of model settings. Some examples are: ``` -ModelName = \"choice('seresnext', 'resnest50')\"; -LearningRate = \"uniform(0.001, 0.01)\"; -LayersToFreeze = \"choice(0, 2)\"; +ModelName = "choice('seresnext', 'resnest50')"; +LearningRate = "uniform(0.001, 0.01)"; +LayersToFreeze = "choice(0, 2)"; ``` For more details on how to compose distribution expressions please check the documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters For more information on the available settings please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -""") -model ImageModelDistributionSettingsClassification - extends ImageModelDistributionSettings { - @doc("Image crop size that is input to the neural network for the training dataset. Must be a positive integer.") - trainingCropSize?: string; - - @doc("Image crop size that is input to the neural network for the validation dataset. Must be a positive integer.") - validationCropSize?: string; - - @doc("Image size to which to resize before cropping for validation dataset. Must be a positive integer.") - validationResizeSize?: string; - - @doc(""" -Weighted loss. The accepted values are 0 for no weighted loss. +*/ +model ImageModelDistributionSettingsClassification extends ImageModelDistributionSettings { +/** +* Image crop size that is input to the neural network for the training dataset. Must be a positive integer. +*/ +"trainingCropSize"?: string; +/** +* Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. +*/ +"validationCropSize"?: string; +/** +* Image size to which to resize before cropping for validation dataset. Must be a positive integer. +*/ +"validationResizeSize"?: string; +/** +* Weighted loss. The accepted values are 0 for no weighted loss. 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. -""") - weightedLoss?: string; +*/ +"weightedLoss"?: string; } -@doc(""" -Distribution expressions to sweep over values of model settings. +/** +* Distribution expressions to sweep over values of model settings. Some examples are: ``` -ModelName = \"choice('seresnext', 'resnest50')\"; -LearningRate = \"uniform(0.001, 0.01)\"; -LayersToFreeze = \"choice(0, 2)\"; +ModelName = "choice('seresnext', 'resnest50')"; +LearningRate = "uniform(0.001, 0.01)"; +LayersToFreeze = "choice(0, 2)"; ``` All distributions can be specified as distribution_name(min, max) or choice(val1, val2, ..., valn) where distribution name can be: uniform, quniform, loguniform, etc @@ -7132,1470 +9218,1919 @@ For more details on how to compose distribution expressions please check the doc https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters For more information on the available settings please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -""") +*/ model ImageModelDistributionSettings { - @doc("Enable AMSGrad when optimizer is 'adam' or 'adamw'.") - amsGradient?: string; - - @doc("Settings for using Augmentations.") - augmentations?: string; - - @doc("Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].") - beta1?: string; - - @doc("Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].") - beta2?: string; - - @doc("Whether to use distributer training.") - distributed?: string; - - @doc("Enable early stopping logic during training.") - earlyStopping?: string; - - @doc(""" -Minimum number of epochs or validation evaluations to wait before primary metric improvement +/** +* Enable AMSGrad when optimizer is 'adam' or 'adamw'. +*/ +"amsGradient"?: string; +/** +* Settings for using Augmentations. +*/ +"augmentations"?: string; +/** +* Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. +*/ +"beta1"?: string; +/** +* Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. +*/ +"beta2"?: string; +/** +* Whether to use distributer training. +*/ +"distributed"?: string; +/** +* Enable early stopping logic during training. +*/ +"earlyStopping"?: string; +/** +* Minimum number of epochs or validation evaluations to wait before primary metric improvement is tracked for early stopping. Must be a positive integer. -""") - earlyStoppingDelay?: string; - - @doc(""" -Minimum number of epochs or validation evaluations with no primary metric improvement before +*/ +"earlyStoppingDelay"?: string; +/** +* Minimum number of epochs or validation evaluations with no primary metric improvement before the run is stopped. Must be a positive integer. -""") - earlyStoppingPatience?: string; - - @doc("Enable normalization when exporting ONNX model.") - enableOnnxNormalization?: string; - - @doc("Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.") - evaluationFrequency?: string; - - @doc(""" -Gradient accumulation means running a configured number of \"GradAccumulationStep\" steps without +*/ +"earlyStoppingPatience"?: string; +/** +* Enable normalization when exporting ONNX model. +*/ +"enableOnnxNormalization"?: string; +/** +* Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. +*/ +"evaluationFrequency"?: string; +/** +* Gradient accumulation means running a configured number of "GradAccumulationStep" steps without updating the model weights while accumulating the gradients of those steps, and then using the accumulated gradients to compute the weight updates. Must be a positive integer. -""") - gradientAccumulationStep?: string; - - @doc(""" -Number of layers to freeze for the model. Must be a positive integer. +*/ +"gradientAccumulationStep"?: string; +/** +* Number of layers to freeze for the model. Must be a positive integer. For instance, passing 2 as value for 'seresnext' means freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -""") - layersToFreeze?: string; - - @doc("Initial learning rate. Must be a float in the range [0, 1].") - learningRate?: string; - - @doc("Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'.") - learningRateScheduler?: string; - - @doc(""" -Name of the model to use for training. +*/ +"layersToFreeze"?: string; +/** +* Initial learning rate. Must be a float in the range [0, 1]. +*/ +"learningRate"?: string; +/** +* Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. +*/ +"learningRateScheduler"?: string; +/** +* Name of the model to use for training. For more information on the available models please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -""") - modelName?: string; - - @doc("Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1].") - momentum?: string; - - @doc("Enable nesterov when optimizer is 'sgd'.") - nesterov?: string; - - @doc("Number of training epochs. Must be a positive integer.") - numberOfEpochs?: string; - - @doc("Number of data loader workers. Must be a non-negative integer.") - numberOfWorkers?: string; - - @doc("Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'.") - optimizer?: string; - - @doc("Random seed to be used when using deterministic training.") - randomSeed?: string; - - @doc("Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1].") - stepLRGamma?: string; - - @doc("Value of step size when learning rate scheduler is 'step'. Must be a positive integer.") - stepLRStepSize?: string; - - @doc("Training batch size. Must be a positive integer.") - trainingBatchSize?: string; - - @doc("Validation batch size. Must be a positive integer.") - validationBatchSize?: string; - - @doc("Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1].") - warmupCosineLRCycles?: string; - - @doc("Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer.") - warmupCosineLRWarmupEpochs?: string; - - @doc("Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1].") - weightDecay?: string; -} - -@doc(""" -Abstract class for AutoML tasks that train image (computer vision) models - +*/ +"modelName"?: string; +/** +* Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. +*/ +"momentum"?: string; +/** +* Enable nesterov when optimizer is 'sgd'. +*/ +"nesterov"?: string; +/** +* Number of training epochs. Must be a positive integer. +*/ +"numberOfEpochs"?: string; +/** +* Number of data loader workers. Must be a non-negative integer. +*/ +"numberOfWorkers"?: string; +/** +* Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. +*/ +"optimizer"?: string; +/** +* Random seed to be used when using deterministic training. +*/ +"randomSeed"?: string; +/** +* Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. +*/ +"stepLRGamma"?: string; +/** +* Value of step size when learning rate scheduler is 'step'. Must be a positive integer. +*/ +"stepLRStepSize"?: string; +/** +* Training batch size. Must be a positive integer. +*/ +"trainingBatchSize"?: string; +/** +* Validation batch size. Must be a positive integer. +*/ +"validationBatchSize"?: string; +/** +* Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. +*/ +"warmupCosineLRCycles"?: string; +/** +* Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. +*/ +"warmupCosineLRWarmupEpochs"?: string; +/** +* Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. +*/ +"weightDecay"?: string; +} + +/** +* Abstract class for AutoML tasks that train image (computer vision) models - such as Image Classification / Image Classification Multilabel / Image Object Detection / Image Instance Segmentation. -""") +*/ model ImageVertical { - @doc("[Required] Limit settings for the AutoML job.") - limitSettings: ImageLimitSettings; - - @doc("Model sweeping and hyperparameter sweeping related settings.") - sweepSettings?: ImageSweepSettings; - - @doc("Validation data inputs.") - validationData?: MLTableJobInput; - - @doc(""" -The fraction of training dataset that needs to be set aside for validation purpose. +/** +* [Required] Limit settings for the AutoML job. +*/ +"limitSettings": ImageLimitSettings; +/** +* Model sweeping and hyperparameter sweeping related settings. +*/ +"sweepSettings"?: ImageSweepSettings; +/** +* Validation data inputs. +*/ +"validationData"?: MLTableJobInput; +/** +* The fraction of training dataset that needs to be set aside for validation purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. -""") - validationDataSize?: float32; +*/ +"validationDataSize"?: float64; } -@doc("Limit settings for the AutoML job.") +/** +* Limit settings for the AutoML job. +*/ model ImageLimitSettings { - @doc("Maximum number of concurrent AutoML iterations.") - maxConcurrentTrials?: int32; - - @doc("Maximum number of AutoML iterations.") - maxTrials?: int32; - - @doc("AutoML job timeout.") - timeout?: duration; -} - -@doc("Model sweeping and hyperparameter sweeping related settings.") +/** +* Maximum number of concurrent AutoML iterations. +*/ +"maxConcurrentTrials"?: int32 = 1; +/** +* Maximum number of AutoML iterations. +*/ +"maxTrials"?: int32 = 1; +/** +* AutoML job timeout. +*/ +"timeout"?: duration = duration.P7D; +} + +/** +* Model sweeping and hyperparameter sweeping related settings. +*/ model ImageSweepSettings { - @doc("Type of early termination policy.") - earlyTermination?: EarlyTerminationPolicy; - - @doc("[Required] Type of the hyperparameter sampling algorithms.") - samplingAlgorithm: SamplingAlgorithmType; -} - -@doc(""" -Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels +/** +* Type of early termination policy. +*/ +"earlyTermination"?: EarlyTerminationPolicy; +/** +* [Required] Type of the hyperparameter sampling algorithms. +*/ +"samplingAlgorithm": SamplingAlgorithmType; +} + +/** +* Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. -""") +*/ model ImageClassificationMultilabel extends AutoMLVertical { - ...ImageClassificationBase; - - @doc("Primary metric to optimize for this task.") - primaryMetric?: ClassificationMultilabelPrimaryMetrics; - - @doc("[Required] Task type for AutoMLJob.") - taskType: "ImageClassificationMultilabel"; -} - -@doc(""" -Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, +...ImageClassificationBase; +/** +* Primary metric to optimize for this task. +*/ +"primaryMetric"?: ClassificationMultilabelPrimaryMetrics; +/** +* [Required] Task type for AutoMLJob. +*/ +"taskType": "ImageClassificationMultilabel"; +} + +/** +* Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, drawing a polygon around each object in the image. -""") +*/ model ImageInstanceSegmentation extends AutoMLVertical { - ...ImageObjectDetectionBase; - - @doc("Primary metric to optimize for this task.") - primaryMetric?: InstanceSegmentationPrimaryMetrics; - - @doc("[Required] Task type for AutoMLJob.") - taskType: "ImageInstanceSegmentation"; +...ImageObjectDetectionBase; +/** +* Primary metric to optimize for this task. +*/ +"primaryMetric"?: InstanceSegmentationPrimaryMetrics; +/** +* [Required] Task type for AutoMLJob. +*/ +"taskType": "ImageInstanceSegmentation"; } -model ImageObjectDetectionBase extends ImageVertical { - @doc("Settings used for training the model.") - modelSettings?: ImageModelSettingsObjectDetection; - - @doc("Search space for sampling different combinations of models and their hyperparameters.") - searchSpace?: ImageModelDistributionSettingsObjectDetection[]; -} -@doc(""" -Settings used for training the model. +model ImageObjectDetectionBase extends ImageVertical { +/** +* Settings used for training the model. +*/ +"modelSettings"?: ImageModelSettingsObjectDetection; +/** +* Search space for sampling different combinations of models and their hyperparameters. +*/ +"searchSpace"?: ImageModelDistributionSettingsObjectDetection[]; +} + +/** +* Settings used for training the model. For more information on the available settings please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -""") +*/ model ImageModelSettingsObjectDetection extends ImageModelSettings { - @doc(""" -Maximum number of detections per image, for all classes. Must be a positive integer. +/** +* Maximum number of detections per image, for all classes. Must be a positive integer. Note: This settings is not supported for the 'yolov5' algorithm. -""") - boxDetectionsPerImage?: int32; - - @doc(""" -During inference, only return proposals with a classification score greater than +*/ +"boxDetectionsPerImage"?: int32; +/** +* During inference, only return proposals with a classification score greater than BoxScoreThreshold. Must be a float in the range[0, 1]. -""") - boxScoreThreshold?: float32; - - @doc(""" -Image size for train and validation. Must be a positive integer. +*/ +"boxScoreThreshold"?: float32; +/** +* Image size for train and validation. Must be a positive integer. Note: The training run may get into CUDA OOM if the size is too big. Note: This settings is only supported for the 'yolov5' algorithm. -""") - imageSize?: int32; - - @doc("Enable computing and logging training metrics.") - logTrainingMetrics?: LogTrainingMetrics; - - @doc("Enable computing and logging validation loss.") - logValidationLoss?: LogValidationLoss; - - @doc(""" -Maximum size of the image to be rescaled before feeding it to the backbone. +*/ +"imageSize"?: int32; +/** +* Enable computing and logging training metrics. +*/ +"logTrainingMetrics"?: LogTrainingMetrics; +/** +* Enable computing and logging validation loss. +*/ +"logValidationLoss"?: LogValidationLoss; +/** +* Maximum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not supported for the 'yolov5' algorithm. -""") - maxSize?: int32; - - @doc(""" -Minimum size of the image to be rescaled before feeding it to the backbone. +*/ +"maxSize"?: int32; +/** +* Minimum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not supported for the 'yolov5' algorithm. -""") - minSize?: int32; - - @doc(""" -Model size. Must be 'small', 'medium', 'large', or 'xlarge'. +*/ +"minSize"?: int32; +/** +* Model size. Must be 'small', 'medium', 'large', or 'xlarge'. Note: training run may get into CUDA OOM if the model size is too big. Note: This settings is only supported for the 'yolov5' algorithm. -""") - modelSize?: ModelSize; - - @doc(""" -Enable multi-scale image by varying image size by +/- 50%. +*/ +"modelSize"?: ModelSize; +/** +* Enable multi-scale image by varying image size by +/- 50%. Note: training run may get into CUDA OOM if no sufficient GPU memory. Note: This settings is only supported for the 'yolov5' algorithm. -""") - multiScale?: boolean; - - @doc("IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1].") - nmsIouThreshold?: float32; - - @doc(""" -The grid size to use for tiling each image. Note: TileGridSize must not be +*/ +"multiScale"?: boolean; +/** +* IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1]. +*/ +"nmsIouThreshold"?: float32; +/** +* The grid size to use for tiling each image. Note: TileGridSize must not be None to enable small object detection logic. A string containing two integers in mxn format. Note: This settings is not supported for the 'yolov5' algorithm. -""") - tileGridSize?: string; - - @doc(""" -Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). +*/ +"tileGridSize"?: string; +/** +* Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). Note: This settings is not supported for the 'yolov5' algorithm. -""") - tileOverlapRatio?: float32; - - @doc(""" -The IOU threshold to use to perform NMS while merging predictions from tiles and image. +*/ +"tileOverlapRatio"?: float32; +/** +* The IOU threshold to use to perform NMS while merging predictions from tiles and image. Used in validation/ inference. Must be float in the range [0, 1]. Note: This settings is not supported for the 'yolov5' algorithm. -""") - tilePredictionsNmsThreshold?: float32; - - @doc("IOU threshold to use when computing validation metric. Must be float in the range [0, 1].") - validationIouThreshold?: float32; - - @doc("Metric computation method to use for validation metrics.") - validationMetricType?: ValidationMetricType; -} - -@doc(""" -Distribution expressions to sweep over values of model settings. +*/ +"tilePredictionsNmsThreshold"?: float32; +/** +* IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. +*/ +"validationIouThreshold"?: float32; +/** +* Metric computation method to use for validation metrics. +*/ +"validationMetricType"?: ValidationMetricType; +} + +/** +* Distribution expressions to sweep over values of model settings. Some examples are: ``` -ModelName = \"choice('seresnext', 'resnest50')\"; -LearningRate = \"uniform(0.001, 0.01)\"; -LayersToFreeze = \"choice(0, 2)\"; +ModelName = "choice('seresnext', 'resnest50')"; +LearningRate = "uniform(0.001, 0.01)"; +LayersToFreeze = "choice(0, 2)"; ``` For more details on how to compose distribution expressions please check the documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters For more information on the available settings please visit the official documentation: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -""") -model ImageModelDistributionSettingsObjectDetection - extends ImageModelDistributionSettings { - @doc(""" -Maximum number of detections per image, for all classes. Must be a positive integer. +*/ +model ImageModelDistributionSettingsObjectDetection extends ImageModelDistributionSettings { +/** +* Maximum number of detections per image, for all classes. Must be a positive integer. Note: This settings is not supported for the 'yolov5' algorithm. -""") - boxDetectionsPerImage?: string; - - @doc(""" -During inference, only return proposals with a classification score greater than +*/ +"boxDetectionsPerImage"?: string; +/** +* During inference, only return proposals with a classification score greater than BoxScoreThreshold. Must be a float in the range[0, 1]. -""") - boxScoreThreshold?: string; - - @doc(""" -Image size for train and validation. Must be a positive integer. +*/ +"boxScoreThreshold"?: string; +/** +* Image size for train and validation. Must be a positive integer. Note: The training run may get into CUDA OOM if the size is too big. Note: This settings is only supported for the 'yolov5' algorithm. -""") - imageSize?: string; - - @doc(""" -Maximum size of the image to be rescaled before feeding it to the backbone. +*/ +"imageSize"?: string; +/** +* Maximum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not supported for the 'yolov5' algorithm. -""") - maxSize?: string; - - @doc(""" -Minimum size of the image to be rescaled before feeding it to the backbone. +*/ +"maxSize"?: string; +/** +* Minimum size of the image to be rescaled before feeding it to the backbone. Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not supported for the 'yolov5' algorithm. -""") - minSize?: string; - - @doc(""" -Model size. Must be 'small', 'medium', 'large', or 'xlarge'. +*/ +"minSize"?: string; +/** +* Model size. Must be 'small', 'medium', 'large', or 'xlarge'. Note: training run may get into CUDA OOM if the model size is too big. Note: This settings is only supported for the 'yolov5' algorithm. -""") - modelSize?: string; - - @doc(""" -Enable multi-scale image by varying image size by +/- 50%. +*/ +"modelSize"?: string; +/** +* Enable multi-scale image by varying image size by +/- 50%. Note: training run may get into CUDA OOM if no sufficient GPU memory. Note: This settings is only supported for the 'yolov5' algorithm. -""") - multiScale?: string; - - @doc("IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1].") - nmsIouThreshold?: string; - - @doc(""" -The grid size to use for tiling each image. Note: TileGridSize must not be -None to enable small object detection logic. A string containing two integers in mxn format. -Note: This settings is not supported for the 'yolov5' algorithm. -""") - tileGridSize?: string; - - @doc(""" -Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). -Note: This settings is not supported for the 'yolov5' algorithm. -""") - tileOverlapRatio?: string; - - @doc(""" -The IOU threshold to use to perform NMS while merging predictions from tiles and image. -Used in validation/ inference. Must be float in the range [0, 1]. -Note: This settings is not supported for the 'yolov5' algorithm. -NMS: Non-maximum suppression -""") - tilePredictionsNmsThreshold?: string; - - @doc("IOU threshold to use when computing validation metric. Must be float in the range [0, 1].") - validationIouThreshold?: string; - - @doc("Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'.") - validationMetricType?: string; -} - -@doc(""" -Image Object Detection. Object detection is used to identify objects in an image and locate each object with a -bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. -""") -model ImageObjectDetection extends AutoMLVertical { - ...ImageObjectDetectionBase; - - @doc("Primary metric to optimize for this task.") - primaryMetric?: ObjectDetectionPrimaryMetrics; - - @doc("[Required] Task type for AutoMLJob.") - taskType: "ImageObjectDetection"; -} - -model ImportDataAction extends ScheduleActionBase { - @doc("[Required] Defines Schedule action definition details.") - @visibility("read", "create", "update") - dataImportDefinition: DataImport; - - @doc("[Required] Specifies the action type of the schedule") - actionType: "ImportData"; -} - -model JobScheduleAction extends ScheduleActionBase { - @doc("[Required] Defines Schedule action definition details.") - @visibility("read", "create", "update") - jobDefinition: JobBase; - - @doc("[Required] Specifies the action type of the schedule") - actionType: "CreateJob"; -} - -model KerberosCredentials { - @doc("[Required] IP Address or DNS HostName.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - kerberosKdcAddress: string; - - @doc("[Required] Kerberos Username") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - kerberosPrincipal: string; - - @doc("[Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or service.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - kerberosRealm: string; -} - -model KerberosKeytabCredentials extends DatastoreCredentials { - ...KerberosCredentials; - - @doc("[Required] Keytab secrets.") - @visibility("create", "update") - secrets: KerberosKeytabSecrets; - - @doc("[Required] Credential type used to authentication with storage.") - credentialsType: "KerberosKeytab"; -} - -model KerberosKeytabSecrets extends DatastoreSecrets { - @doc("Kerberos keytab secret.") - kerberosKeytab?: string; - - @doc("[Required] Credential type used to authentication with storage.") - secretsType: "KerberosKeytab"; -} - -model KerberosPasswordCredentials extends DatastoreCredentials { - ...KerberosCredentials; - - @doc("[Required] Kerberos password secrets.") - @visibility("create", "update") - secrets: KerberosPasswordSecrets; - - @doc("[Required] Credential type used to authentication with storage.") - credentialsType: "KerberosPassword"; -} - -model KerberosPasswordSecrets extends DatastoreSecrets { - @doc("Kerberos password secret.") - kerberosPassword?: string; - - @doc("[Required] Credential type used to authentication with storage.") - secretsType: "KerberosPassword"; -} - -@doc("Properties specific to a KubernetesOnlineDeployment.") -model KubernetesOnlineDeployment extends OnlineDeployment { - @doc("The resource requirements for the container (cpu and memory).") - containerResourceRequirements?: ContainerResourceRequirements; - - @doc("[Required] The compute type of the endpoint.") - endpointComputeType: "Kubernetes"; -} - -@doc("Properties of a labeling job for image data") -model LabelingJobImageProperties extends LabelingJobMediaProperties { - @doc("Annotation type of image labeling job.") - @visibility("read", "create") - annotationType?: ImageAnnotationType; - - @doc("[Required] Media type of the job.") - mediaType: "Image"; -} - -@doc("Properties of a labeling job for text data") -model LabelingJobTextProperties extends LabelingJobMediaProperties { - @doc("Annotation type of text labeling job.") - @visibility("read", "create") - annotationType?: TextAnnotationType; - - @doc("[Required] Media type of the job.") - mediaType: "Text"; -} - -model LakeHouseArtifact extends OneLakeArtifact { - @doc("[Required] OneLake artifact type") - artifactType: "LakeHouse"; -} - -@doc("OneLake artifact (data source) configuration.") -@discriminator("artifactType") -model OneLakeArtifact { - @doc("[Required] OneLake artifact name") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - artifactName: string; -} - -@doc("Literal input type.") -model LiteralJobInput extends JobInput { - @doc("[Required] Literal value for the input.") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - value: string; - - @doc("[Required] Specifies the type of job.") - jobInputType: "literal"; -} - -@doc("Labeling MLAssist configuration definition when MLAssist is disabled") -model MLAssistConfigurationDisabled extends MLAssistConfiguration { - @doc("[Required] Indicates whether MLAssist feature is enabled.") - mlAssist: "Disabled"; -} - -@doc("Labeling MLAssist configuration definition when MLAssist is enabled") -model MLAssistConfigurationEnabled extends MLAssistConfiguration { - @doc("[Required] AML compute binding used in inferencing.") - @visibility("read", "create", "update") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - inferencingComputeBinding: string; - - @doc("[Required] AML compute binding used in training.") - @visibility("read", "create", "update") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - trainingComputeBinding: string; - - @doc("[Required] Indicates whether MLAssist feature is enabled.") - mlAssist: "Enabled"; -} - -model MLFlowModelJobOutput extends JobOutput { - ...AssetJobOutput; - - @doc("[Required] Specifies the type of job.") - jobOutputType: "mlflow_model"; -} - -@doc("MLTable data definition") -model MLTableData extends DataVersionBase { - @doc("Uris referenced in the MLTable definition (required for lineage)") - @visibility("read", "create") - referencedUris?: string[]; - - @doc("[Required] Specifies the type of data.") - dataType: "mltable"; -} - -model MLTableJobOutput extends JobOutput { - ...AssetJobOutput; - - @doc("[Required] Specifies the type of job.") - jobOutputType: "mltable"; -} - -@doc("Managed compute identity definition.") -model ManagedComputeIdentity extends MonitorComputeIdentityBase { - @doc("Managed service identity (system assigned and/or user assigned identities)") - identity?: ManagedServiceIdentity; - - @doc("[Required] Monitor compute identity type enum.") - computeIdentityType: "ManagedIdentity"; -} - -@doc("Managed identity configuration.") -model ManagedIdentity extends IdentityConfiguration { - @doc("Specifies a user-assigned identity by client ID. For system-assigned, do not set this field.") - @visibility("read", "create") - clientId?: string; - - @doc("Specifies a user-assigned identity by object ID. For system-assigned, do not set this field.") - @visibility("read", "create") - objectId?: string; - - @doc("Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field.") - @visibility("read", "create") - resourceId?: string; - - @doc("[Required] Specifies the type of identity framework.") - identityType: "Managed"; -} - -@doc("Properties specific to a ManagedOnlineDeployment.") -model ManagedOnlineDeployment extends OnlineDeployment { - @doc("[Required] The compute type of the endpoint.") - endpointComputeType: "Managed"; -} - -@doc("Defines an early termination policy based on running averages of the primary metric of all runs") -model MedianStoppingPolicy extends EarlyTerminationPolicy { - @doc("[Required] Name of policy configuration") - policyType: "MedianStopping"; -} - -@doc("Model performance signal definition.") -model ModelPerformanceSignal extends MonitoringSignalBase { - @doc("The data segment.") - @visibility("read", "create") - dataSegment?: MonitoringDataSegment; - - @doc("[Required] A list of metrics to calculate and their associated thresholds.") - @visibility("read", "create") - metricThreshold: ModelPerformanceMetricThresholdBase; - - @doc("[Required] The data produced by the production service which drift will be calculated for.") - @visibility("read", "create") - productionData: MonitoringInputDataBase[]; - - @doc("[Required] The data to calculate drift against.") - @visibility("read", "create") - referenceData: MonitoringInputDataBase; - - @doc("[Required] Specifies the type of signal to monitor.") - signalType: "ModelPerformance"; -} - -@doc("Monitor serverless spark compute definition.") -model MonitorServerlessSparkCompute extends MonitorComputeConfigurationBase { - @doc("[Required] The identity scheme leveraged to by the spark jobs running on serverless Spark.") - @visibility("read", "create") - computeIdentity: MonitorComputeIdentityBase; - - @doc("[Required] The instance type running the Spark job.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - instanceType: string; - - @doc("[Required] The Spark runtime version.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - runtimeVersion: string; - - @doc("[Required] Specifies the type of signal to monitor.") - computeType: "ServerlessSpark"; -} - -@doc("MPI distribution configuration.") -model Mpi extends DistributionConfiguration { - @doc("Number of processes per MPI node.") - @visibility("read", "create") - processCountPerInstance?: int32; - - @doc("[Required] Specifies the type of distribution framework.") - distributionType: "Mpi"; -} - -@doc("Fixed training parameters that won't be swept over during AutoML NLP training.") -model NlpFixedParameters { - @doc("Number of steps to accumulate gradients over before running a backward pass.") - gradientAccumulationSteps?: int32; - - @doc("The learning rate for the training procedure.") - learningRate?: float32; - - @doc("The type of learning rate schedule to use during the training procedure.") - learningRateScheduler?: NlpLearningRateScheduler; - - @doc("The name of the model to train.") - modelName?: string; - - @doc("Number of training epochs.") - numberOfEpochs?: int32; - - @doc("The batch size for the training procedure.") - trainingBatchSize?: int32; - - @doc("The batch size to be used during evaluation.") - validationBatchSize?: int32; - - @doc("The warmup ratio, used alongside LrSchedulerType.") - warmupRatio?: float32; - - @doc("The weight decay for the training procedure.") - weightDecay?: float32; +*/ +"multiScale"?: string; +/** +* IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1]. +*/ +"nmsIouThreshold"?: string; +/** +* The grid size to use for tiling each image. Note: TileGridSize must not be +None to enable small object detection logic. A string containing two integers in mxn format. +Note: This settings is not supported for the 'yolov5' algorithm. +*/ +"tileGridSize"?: string; +/** +* Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). +Note: This settings is not supported for the 'yolov5' algorithm. +*/ +"tileOverlapRatio"?: string; +/** +* The IOU threshold to use to perform NMS while merging predictions from tiles and image. +Used in validation/ inference. Must be float in the range [0, 1]. +Note: This settings is not supported for the 'yolov5' algorithm. +NMS: Non-maximum suppression +*/ +"tilePredictionsNmsThreshold"?: string; +/** +* IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. +*/ +"validationIouThreshold"?: string; +/** +* Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'. +*/ +"validationMetricType"?: string; +} + +/** +* Image Object Detection. Object detection is used to identify objects in an image and locate each object with a +bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. +*/ +model ImageObjectDetection extends AutoMLVertical { +...ImageObjectDetectionBase; +/** +* Primary metric to optimize for this task. +*/ +"primaryMetric"?: ObjectDetectionPrimaryMetrics; +/** +* [Required] Task type for AutoMLJob. +*/ +"taskType": "ImageObjectDetection"; } -@doc("Stringified search spaces for each parameter. See below examples.") -model NlpParameterSubspace { - @doc("Number of steps to accumulate gradients over before running a backward pass.") - gradientAccumulationSteps?: string; - - @doc("The learning rate for the training procedure.") - learningRate?: string; - - @doc("The type of learning rate schedule to use during the training procedure.") - learningRateScheduler?: string; - - @doc("The name of the model to train.") - modelName?: string; - - @doc("Number of training epochs.") - numberOfEpochs?: string; - - @doc("The batch size for the training procedure.") - trainingBatchSize?: string; - - @doc("The batch size to be used during evaluation.") - validationBatchSize?: string; - - @doc("The warmup ratio, used alongside LrSchedulerType.") - warmupRatio?: string; - @doc("The weight decay for the training procedure.") - weightDecay?: string; +model ImportDataAction extends ScheduleActionBase { +/** +* [Required] Defines Schedule action definition details. +*/ +@visibility("read", "create", "update") +"dataImportDefinition": DataImport; +/** +* [Required] Specifies the action type of the schedule +*/ +"actionType": "ImportData"; } -@doc("Model sweeping and hyperparameter tuning related settings.") -model NlpSweepSettings { - @doc("Type of early termination policy for the sweeping job.") - earlyTermination?: EarlyTerminationPolicy; - @doc("[Required] Type of sampling algorithm.") - samplingAlgorithm: SamplingAlgorithmType; +model JobScheduleAction extends ScheduleActionBase { +/** +* [Required] Defines Schedule action definition details. +*/ +@visibility("read", "create", "update") +"jobDefinition": JobBase; +/** +* [Required] Specifies the action type of the schedule +*/ +"actionType": "CreateJob"; } -@doc(""" -Abstract class for NLP related AutoML tasks. -NLP - Natural Language Processing. -""") -model NlpVertical { - @doc("Featurization inputs needed for AutoML job.") - featurizationSettings?: NlpVerticalFeaturizationSettings; - @doc("Model/training parameters that will remain constant throughout training.") - fixedParameters?: NlpFixedParameters; +model KerberosCredentials { +/** +* [Required] IP Address or DNS HostName. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"kerberosKdcAddress": string; +/** +* [Required] Kerberos Username +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"kerberosPrincipal": string; +/** +* [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or service. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"kerberosRealm": string; +} - @doc("Execution constraints for AutoMLJob.") - limitSettings?: NlpVerticalLimitSettings; - @doc("Search space for sampling different combinations of models and their hyperparameters.") - searchSpace?: NlpParameterSubspace[]; +model KerberosKeytabCredentials extends DatastoreCredentials { +...KerberosCredentials; +/** +* [Required] Keytab secrets. +*/ +@visibility("create", "update") +"secrets": KerberosKeytabSecrets; +/** +* [Required] Credential type used to authentication with storage. +*/ +"credentialsType": "KerberosKeytab"; +} - @doc("Settings for model sweeping and hyperparameter tuning.") - sweepSettings?: NlpSweepSettings; - @doc("Validation data inputs.") - validationData?: MLTableJobInput; +model KerberosKeytabSecrets extends DatastoreSecrets { +/** +* Kerberos keytab secret. +*/ +"kerberosKeytab"?: string; +/** +* [Required] Credential type used to authentication with storage. +*/ +"secretsType": "KerberosKeytab"; } -model NlpVerticalFeaturizationSettings extends FeaturizationSettings {} -@doc("Job execution constraints.") -model NlpVerticalLimitSettings { - @doc("Maximum Concurrent AutoML iterations.") - maxConcurrentTrials?: int32; +model KerberosPasswordCredentials extends DatastoreCredentials { +...KerberosCredentials; +/** +* [Required] Kerberos password secrets. +*/ +@visibility("create", "update") +"secrets": KerberosPasswordSecrets; +/** +* [Required] Credential type used to authentication with storage. +*/ +"credentialsType": "KerberosPassword"; +} - @doc("Maximum nodes to use for the experiment.") - maxNodes?: int32; - @doc("Number of AutoML iterations.") - maxTrials?: int32; +model KerberosPasswordSecrets extends DatastoreSecrets { +/** +* Kerberos password secret. +*/ +"kerberosPassword"?: string; +/** +* [Required] Credential type used to authentication with storage. +*/ +"secretsType": "KerberosPassword"; +} + +/** +* Properties specific to a KubernetesOnlineDeployment. +*/ +model KubernetesOnlineDeployment extends OnlineDeployment { +/** +* The resource requirements for the container (cpu and memory). +*/ +"containerResourceRequirements"?: ContainerResourceRequirements; +/** +* [Required] The compute type of the endpoint. +*/ +"endpointComputeType": "Kubernetes"; +} + +/** +* Properties of a labeling job for image data +*/ +model LabelingJobImageProperties extends LabelingJobMediaProperties { +/** +* Annotation type of image labeling job. +*/ +@visibility("read", "create") +"annotationType"?: ImageAnnotationType; +/** +* [Required] Media type of the job. +*/ +"mediaType": "Image"; +} + +/** +* Properties of a labeling job for text data +*/ +model LabelingJobTextProperties extends LabelingJobMediaProperties { +/** +* Annotation type of text labeling job. +*/ +@visibility("read", "create") +"annotationType"?: TextAnnotationType; +/** +* [Required] Media type of the job. +*/ +"mediaType": "Text"; +} - @doc("AutoML job timeout.") - timeout?: duration; - @doc("Timeout for individual HD trials.") - trialTimeout?: duration; +model LakeHouseArtifact extends OneLakeArtifact { +/** +* [Required] OneLake artifact type +*/ +"artifactType": "LakeHouse"; } -@doc("Empty/none datastore credentials.") -model NoneDatastoreCredentials extends DatastoreCredentials { - @doc("[Required] Credential type used to authentication with storage.") - credentialsType: "None"; +/** +* OneLake artifact (data source) configuration. +*/ +@discriminator("artifactType") +model OneLakeArtifact { +/** +* [Required] OneLake artifact name +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"artifactName": string; +} + +/** +* Literal input type. +*/ +model LiteralJobInput extends JobInput { +/** +* [Required] Literal value for the input. +*/ +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"value": string; +/** +* [Required] Specifies the type of job. +*/ +"jobInputType": "literal"; +} + +/** +* Labeling MLAssist configuration definition when MLAssist is disabled +*/ +model MLAssistConfigurationDisabled extends MLAssistConfiguration { +/** +* [Required] Indicates whether MLAssist feature is enabled. +*/ +"mlAssist": "Disabled"; } -model NumericalDataDriftMetricThreshold extends DataDriftMetricThresholdBase { - @doc("[Required] The numerical data drift metric to calculate.") - metric: NumericalDataDriftMetric; - - @doc("[Required] Specifies the data type of the metric threshold.") - dataType: "Numerical"; +/** +* Labeling MLAssist configuration definition when MLAssist is enabled +*/ +model MLAssistConfigurationEnabled extends MLAssistConfiguration { +/** +* [Required] AML compute binding used in inferencing. +*/ +@visibility("read", "create", "update") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"inferencingComputeBinding": string; +/** +* [Required] AML compute binding used in training. +*/ +@visibility("read", "create", "update") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"trainingComputeBinding": string; +/** +* [Required] Indicates whether MLAssist feature is enabled. +*/ +"mlAssist": "Enabled"; } -model NumericalDataQualityMetricThreshold - extends DataQualityMetricThresholdBase { - @doc("[Required] The numerical data quality metric to calculate.") - @visibility("read", "create") - metric: NumericalDataQualityMetric; - @doc("[Required] Specifies the data type of the metric threshold.") - dataType: "Numerical"; +model MLFlowModelJobOutput extends JobOutput { +...AssetJobOutput; +/** +* [Required] Specifies the type of job. +*/ +"jobOutputType": "mlflow_model"; } -model NumericalPredictionDriftMetricThreshold - extends PredictionDriftMetricThresholdBase { - @doc("[Required] The numerical prediction drift metric to calculate.") - @visibility("read", "create") - metric: NumericalPredictionDriftMetric; - - @doc("[Required] Specifies the data type of the metric threshold.") - dataType: "Numerical"; +/** +* MLTable data definition +*/ +model MLTableData extends DataVersionBase { +/** +* Uris referenced in the MLTable definition (required for lineage) +*/ +@visibility("read", "create") +"referencedUris"?: string[]; +/** +* [Required] Specifies the type of data. +*/ +"dataType": "mltable"; } -@doc("Optimization objective.") -model Objective { - @doc("[Required] Defines supported metric goals for hyperparameter tuning") - goal: Goal; - @doc("[Required] Name of the metric to optimize.") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - primaryMetric: string; +model MLTableJobOutput extends JobOutput { +...AssetJobOutput; +/** +* [Required] Specifies the type of job. +*/ +"jobOutputType": "mltable"; } -@doc("OneLake (Trident) datastore configuration.") -model OneLakeDatastore extends Datastore { - @doc("[Required] OneLake artifact backing the datastore.") - @visibility("read", "create") - artifact: OneLakeArtifact; - - @doc("OneLake endpoint to use for the datastore.") - @visibility("read", "create") - endpoint?: string; - - @doc("[Required] OneLake workspace name.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - oneLakeWorkspaceName: string; - - @doc("Indicates which identity to use to authenticate service data access to customer's storage.") - @visibility("read", "create") - serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; - - @doc("[Required] Storage type backing the datastore.") - datastoreType: "OneLake"; +/** +* Managed compute identity definition. +*/ +model ManagedComputeIdentity extends MonitorComputeIdentityBase { +/** +* Managed service identity (system assigned and/or user assigned identities) +*/ +"identity"?: ManagedServiceIdentity; +/** +* [Required] Monitor compute identity type enum. +*/ +"computeIdentityType": "ManagedIdentity"; +} + +/** +* Managed identity configuration. +*/ +model ManagedIdentity extends IdentityConfiguration { +/** +* Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. +*/ +@visibility("read", "create") +"clientId"?: string; +/** +* Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. +*/ +@visibility("read", "create") +"objectId"?: string; +/** +* Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. +*/ +@visibility("read", "create") +"resourceId"?: string; +/** +* [Required] Specifies the type of identity framework. +*/ +"identityType": "Managed"; +} + +/** +* Properties specific to a ManagedOnlineDeployment. +*/ +model ManagedOnlineDeployment extends OnlineDeployment { +/** +* [Required] The compute type of the endpoint. +*/ +"endpointComputeType": "Managed"; } -@doc("Reference to an asset via its path in a job output.") -model OutputPathAssetReference extends AssetReferenceBase { - @doc("ARM resource ID of the job.") - jobId?: string; - - @doc("The path of the file/directory in the job output.") - path?: string; - - @doc("[Required] Specifies the type of asset reference.") - referenceType: "OutputPath"; +/** +* Defines an early termination policy based on running averages of the primary metric of all runs +*/ +model MedianStoppingPolicy extends EarlyTerminationPolicy { +/** +* [Required] Name of policy configuration +*/ +"policyType": "MedianStopping"; } -@doc("Package input path specified with a resource id.") -model PackageInputPathId extends PackageInputPathBase { - @doc("Input resource id.") - resourceId?: string; - - @doc("[Required] Input path type for package inputs.") - inputPathType: "PathId"; +/** +* Model performance signal definition. +*/ +model ModelPerformanceSignal extends MonitoringSignalBase { +/** +* The data segment. +*/ +@visibility("read", "create") +"dataSegment"?: MonitoringDataSegment; +/** +* [Required] A list of metrics to calculate and their associated thresholds. +*/ +@visibility("read", "create") +"metricThreshold": ModelPerformanceMetricThresholdBase; +/** +* [Required] The data produced by the production service which drift will be calculated for. +*/ +@visibility("read", "create") +"productionData": MonitoringInputDataBase[]; +/** +* [Required] The data to calculate drift against. +*/ +@visibility("read", "create") +"referenceData": MonitoringInputDataBase; +/** +* [Required] Specifies the type of signal to monitor. +*/ +"signalType": "ModelPerformance"; +} + +/** +* Monitor serverless spark compute definition. +*/ +model MonitorServerlessSparkCompute extends MonitorComputeConfigurationBase { +/** +* [Required] The identity scheme leveraged to by the spark jobs running on serverless Spark. +*/ +@visibility("read", "create") +"computeIdentity": MonitorComputeIdentityBase; +/** +* [Required] The instance type running the Spark job. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"instanceType": string; +/** +* [Required] The Spark runtime version. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"runtimeVersion": string; +/** +* [Required] Specifies the type of signal to monitor. +*/ +"computeType": "ServerlessSpark"; +} + +/** +* MPI distribution configuration. +*/ +model Mpi extends DistributionConfiguration { +/** +* Number of processes per MPI node. +*/ +@visibility("read", "create") +"processCountPerInstance"?: int32; +/** +* [Required] Specifies the type of distribution framework. +*/ +"distributionType": "Mpi"; +} + +/** +* Fixed training parameters that won't be swept over during AutoML NLP training. +*/ +model NlpFixedParameters { +/** +* Number of steps to accumulate gradients over before running a backward pass. +*/ +"gradientAccumulationSteps"?: int32; +/** +* The learning rate for the training procedure. +*/ +"learningRate"?: float32; +/** +* The type of learning rate schedule to use during the training procedure. +*/ +"learningRateScheduler"?: NlpLearningRateScheduler; +/** +* The name of the model to train. +*/ +"modelName"?: string; +/** +* Number of training epochs. +*/ +"numberOfEpochs"?: int32; +/** +* The batch size for the training procedure. +*/ +"trainingBatchSize"?: int32; +/** +* The batch size to be used during evaluation. +*/ +"validationBatchSize"?: int32; +/** +* The warmup ratio, used alongside LrSchedulerType. +*/ +"warmupRatio"?: float32; +/** +* The weight decay for the training procedure. +*/ +"weightDecay"?: float32; +} + +/** +* Stringified search spaces for each parameter. See below examples. +*/ +model NlpParameterSubspace { +/** +* Number of steps to accumulate gradients over before running a backward pass. +*/ +"gradientAccumulationSteps"?: string; +/** +* The learning rate for the training procedure. +*/ +"learningRate"?: string; +/** +* The type of learning rate schedule to use during the training procedure. +*/ +"learningRateScheduler"?: string; +/** +* The name of the model to train. +*/ +"modelName"?: string; +/** +* Number of training epochs. +*/ +"numberOfEpochs"?: string; +/** +* The batch size for the training procedure. +*/ +"trainingBatchSize"?: string; +/** +* The batch size to be used during evaluation. +*/ +"validationBatchSize"?: string; +/** +* The warmup ratio, used alongside LrSchedulerType. +*/ +"warmupRatio"?: string; +/** +* The weight decay for the training procedure. +*/ +"weightDecay"?: string; +} + +/** +* Model sweeping and hyperparameter tuning related settings. +*/ +model NlpSweepSettings { +/** +* Type of early termination policy for the sweeping job. +*/ +"earlyTermination"?: EarlyTerminationPolicy; +/** +* [Required] Type of sampling algorithm. +*/ +"samplingAlgorithm": SamplingAlgorithmType; +} + +/** +* Abstract class for NLP related AutoML tasks. +NLP - Natural Language Processing. +*/ +model NlpVertical { +/** +* Featurization inputs needed for AutoML job. +*/ +"featurizationSettings"?: NlpVerticalFeaturizationSettings; +/** +* Model/training parameters that will remain constant throughout training. +*/ +"fixedParameters"?: NlpFixedParameters; +/** +* Execution constraints for AutoMLJob. +*/ +"limitSettings"?: NlpVerticalLimitSettings; +/** +* Search space for sampling different combinations of models and their hyperparameters. +*/ +"searchSpace"?: NlpParameterSubspace[]; +/** +* Settings for model sweeping and hyperparameter tuning. +*/ +"sweepSettings"?: NlpSweepSettings; +/** +* Validation data inputs. +*/ +"validationData"?: MLTableJobInput; +} + + +model NlpVerticalFeaturizationSettings extends FeaturizationSettings { +} + +/** +* Job execution constraints. +*/ +model NlpVerticalLimitSettings { +/** +* Maximum Concurrent AutoML iterations. +*/ +"maxConcurrentTrials"?: int32 = 1; +/** +* Maximum nodes to use for the experiment. +*/ +"maxNodes"?: int32 = 1; +/** +* Number of AutoML iterations. +*/ +"maxTrials"?: int32 = 1; +/** +* AutoML job timeout. +*/ +"timeout"?: duration = duration.P7D; +/** +* Timeout for individual HD trials. +*/ +"trialTimeout"?: duration; +} + +/** +* Empty/none datastore credentials. +*/ +model NoneDatastoreCredentials extends DatastoreCredentials { +/** +* [Required] Credential type used to authentication with storage. +*/ +"credentialsType": "None"; } -@doc("Package input path specified as an url.") -model PackageInputPathUrl extends PackageInputPathBase { - @doc("Input path url.") - url?: string; - - @doc("[Required] Input path type for package inputs.") - inputPathType: "Url"; -} -@doc("Package input path specified with name and version.") +model NumericalDataDriftMetricThreshold extends DataDriftMetricThresholdBase { +/** +* [Required] The numerical data drift metric to calculate. +*/ +"metric": NumericalDataDriftMetric; +/** +* [Required] Specifies the data type of the metric threshold. +*/ +"dataType": "Numerical"; +} + + +model NumericalDataQualityMetricThreshold extends DataQualityMetricThresholdBase { +/** +* [Required] The numerical data quality metric to calculate. +*/ +@visibility("read", "create") +"metric": NumericalDataQualityMetric; +/** +* [Required] Specifies the data type of the metric threshold. +*/ +"dataType": "Numerical"; +} + + +model NumericalPredictionDriftMetricThreshold extends PredictionDriftMetricThresholdBase { +/** +* [Required] The numerical prediction drift metric to calculate. +*/ +@visibility("read", "create") +"metric": NumericalPredictionDriftMetric; +/** +* [Required] Specifies the data type of the metric threshold. +*/ +"dataType": "Numerical"; +} + +/** +* Optimization objective. +*/ +model Objective { +/** +* [Required] Defines supported metric goals for hyperparameter tuning +*/ +"goal": Goal; +/** +* [Required] Name of the metric to optimize. +*/ +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"primaryMetric": string; +} + +/** +* OneLake (Trident) datastore configuration. +*/ +model OneLakeDatastore extends Datastore { +/** +* [Required] OneLake artifact backing the datastore. +*/ +@visibility("read", "create") +"artifact": OneLakeArtifact; +/** +* OneLake endpoint to use for the datastore. +*/ +@visibility("read", "create") +"endpoint"?: string; +/** +* [Required] OneLake workspace name. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"oneLakeWorkspaceName": string; +/** +* Indicates which identity to use to authenticate service data access to customer's storage. +*/ +@visibility("read", "create") +"serviceDataAccessAuthIdentity"?: ServiceDataAccessAuthIdentity; +/** +* [Required] Storage type backing the datastore. +*/ +"datastoreType": "OneLake"; +} + +/** +* Reference to an asset via its path in a job output. +*/ +model OutputPathAssetReference extends AssetReferenceBase { +/** +* ARM resource ID of the job. +*/ +"jobId"?: string; +/** +* The path of the file/directory in the job output. +*/ +"path"?: string; +/** +* [Required] Specifies the type of asset reference. +*/ +"referenceType": "OutputPath"; +} + +/** +* Package input path specified with a resource id. +*/ +model PackageInputPathId extends PackageInputPathBase { +/** +* Input resource id. +*/ +"resourceId"?: string; +/** +* [Required] Input path type for package inputs. +*/ +"inputPathType": "PathId"; +} + +/** +* Package input path specified as an url. +*/ +model PackageInputPathUrl extends PackageInputPathBase { +/** +* Input path url. +*/ +"url"?: string; +/** +* [Required] Input path type for package inputs. +*/ +"inputPathType": "Url"; +} + +/** +* Package input path specified with name and version. +*/ model PackageInputPathVersion extends PackageInputPathBase { - @doc("Input resource name.") - resourceName?: string; - - @doc("Input resource version.") - resourceVersion?: string; - - @doc("[Required] Input path type for package inputs.") - inputPathType: "PathVersion"; -} - -@doc("Pipeline Job definition: defines generic to MFE attributes.") +/** +* Input resource name. +*/ +"resourceName"?: string; +/** +* Input resource version. +*/ +"resourceVersion"?: string; +/** +* [Required] Input path type for package inputs. +*/ +"inputPathType": "PathVersion"; +} + +/** +* Pipeline Job definition: defines generic to MFE attributes. +*/ model PipelineJob extends JobBase { - @doc("Inputs for the pipeline job.") - @visibility("read", "create") - inputs?: Record; - - @doc("Jobs construct the Pipeline Job.") - @visibility("read", "create") - jobs?: Record>; - - @doc("Outputs for the pipeline job") - @visibility("read", "create") - outputs?: Record; - - @doc("Pipeline settings, for things like ContinueRunOnStepFailure etc.") - @visibility("read", "create") - settings?: Record; - - @doc("ARM resource ID of source job.") - @visibility("read", "create") - sourceJobId?: string; - - @doc("[Required] Specifies the type of job.") - jobType: "Pipeline"; +/** +* Inputs for the pipeline job. +*/ +@visibility("read", "create") +"inputs"?: Record; +/** +* Jobs construct the Pipeline Job. +*/ +@visibility("read", "create") +"jobs"?: Record>; +/** +* Outputs for the pipeline job +*/ +@visibility("read", "create") +"outputs"?: Record; +/** +* Pipeline settings, for things like ContinueRunOnStepFailure etc. +*/ +@visibility("read", "create") +"settings"?: Record; +/** +* ARM resource ID of source job. +*/ +@visibility("read", "create") +"sourceJobId"?: string; +/** +* [Required] Specifies the type of job. +*/ +"jobType": "Pipeline"; } -model PredictionDriftMonitoringSignal extends MonitoringSignalBase { - @doc("[Required] A list of metrics to calculate and their associated thresholds.") - @visibility("read", "create") - metricThresholds: PredictionDriftMetricThresholdBase[]; - - @doc("[Required] The type of the model monitored.") - @visibility("read", "create") - modelType: MonitoringModelType; - - @doc("[Required] The data which drift will be calculated for.") - @visibility("read", "create") - productionData: MonitoringInputDataBase; - - @doc("[Required] The data to calculate drift against.") - @visibility("read", "create") - referenceData: MonitoringInputDataBase; - - @doc("[Required] Specifies the type of signal to monitor.") - signalType: "PredictionDrift"; -} -@doc("PyTorch distribution configuration.") +model PredictionDriftMonitoringSignal extends MonitoringSignalBase { +/** +* [Required] A list of metrics to calculate and their associated thresholds. +*/ +@visibility("read", "create") +"metricThresholds": PredictionDriftMetricThresholdBase[]; +/** +* [Required] The type of the model monitored. +*/ +@visibility("read", "create") +"modelType": MonitoringModelType; +/** +* [Required] The data which drift will be calculated for. +*/ +@visibility("read", "create") +"productionData": MonitoringInputDataBase; +/** +* [Required] The data to calculate drift against. +*/ +@visibility("read", "create") +"referenceData": MonitoringInputDataBase; +/** +* [Required] Specifies the type of signal to monitor. +*/ +"signalType": "PredictionDrift"; +} + +/** +* PyTorch distribution configuration. +*/ model PyTorch extends DistributionConfiguration { - @doc("Number of processes per node.") - processCountPerInstance?: int32; - - @doc("[Required] Specifies the type of distribution framework.") - distributionType: "PyTorch"; -} - -@doc("Defines a Sampling Algorithm that generates values randomly") +/** +* Number of processes per node. +*/ +"processCountPerInstance"?: int32; +/** +* [Required] Specifies the type of distribution framework. +*/ +"distributionType": "PyTorch"; +} + +/** +* Defines a Sampling Algorithm that generates values randomly +*/ model RandomSamplingAlgorithm extends SamplingAlgorithm { - @doc("An optional positive number or e in string format to be used as base for log based random sampling") - logbase?: string; - - @doc("The specific type of random algorithm") - rule?: RandomSamplingAlgorithmRule; - - @doc("An optional integer to use as the seed for random number generation") - seed?: int32; - - @doc("[Required] The algorithm used for generating hyperparameter values, along with configuration properties") - samplingAlgorithmType: "Random"; -} - -@doc("Ray distribution configuration.") +/** +* An optional positive number or e in string format to be used as base for log based random sampling +*/ +"logbase"?: string; +/** +* The specific type of random algorithm +*/ +"rule"?: RandomSamplingAlgorithmRule; +/** +* An optional integer to use as the seed for random number generation +*/ +"seed"?: int32; +/** +* [Required] The algorithm used for generating hyperparameter values, along with configuration properties +*/ +"samplingAlgorithmType": "Random"; +} + +/** +* Ray distribution configuration. +*/ model Ray extends DistributionConfiguration { - @doc("The address of Ray head node.") - address?: string; - - @doc("The port to bind the dashboard server to.") - dashboardPort?: int32; - - @doc("Additional arguments passed to ray start in head node.") - headNodeAdditionalArgs?: string; - - @doc("Provide this argument to start the Ray dashboard GUI.") - includeDashboard?: boolean; - - @doc("The port of the head ray process.") - port?: int32; - - @doc("Additional arguments passed to ray start in worker node.") - workerNodeAdditionalArgs?: string; - - @doc("[Required] Specifies the type of distribution framework.") - distributionType: "Ray"; -} - -@doc("Regression task in AutoML Table vertical.") +/** +* The address of Ray head node. +*/ +"address"?: string; +/** +* The port to bind the dashboard server to. +*/ +"dashboardPort"?: int32; +/** +* Additional arguments passed to ray start in head node. +*/ +"headNodeAdditionalArgs"?: string; +/** +* Provide this argument to start the Ray dashboard GUI. +*/ +"includeDashboard"?: boolean; +/** +* The port of the head ray process. +*/ +"port"?: int32; +/** +* Additional arguments passed to ray start in worker node. +*/ +"workerNodeAdditionalArgs"?: string; +/** +* [Required] Specifies the type of distribution framework. +*/ +"distributionType": "Ray"; +} + +/** +* Regression task in AutoML Table vertical. +*/ model Regression extends AutoMLVertical { - ...TableVertical; - - @doc("Primary metric for regression task.") - primaryMetric?: RegressionPrimaryMetrics; - - @doc("Inputs for training phase for an AutoML Job.") - trainingSettings?: RegressionTrainingSettings; - - @doc("[Required] Task type for AutoMLJob.") - taskType: "Regression"; -} - -@doc("Regression Training related configuration.") +...TableVertical; +/** +* Primary metric for regression task. +*/ +"primaryMetric"?: RegressionPrimaryMetrics; +/** +* Inputs for training phase for an AutoML Job. +*/ +"trainingSettings"?: RegressionTrainingSettings; +/** +* [Required] Task type for AutoMLJob. +*/ +"taskType": "Regression"; +} + +/** +* Regression Training related configuration. +*/ model RegressionTrainingSettings extends TrainingSettings { - @doc("Allowed models for regression task.") - allowedTrainingAlgorithms?: RegressionModels[]; - - @doc("Blocked models for regression task.") - blockedTrainingAlgorithms?: RegressionModels[]; +/** +* Allowed models for regression task. +*/ +"allowedTrainingAlgorithms"?: RegressionModels[]; +/** +* Blocked models for regression task. +*/ +"blockedTrainingAlgorithms"?: RegressionModels[]; } -model RegressionModelPerformanceMetricThreshold - extends ModelPerformanceMetricThresholdBase { - @doc("[Required] The regression model performance metric to calculate.") - @visibility("read", "create") - metric: RegressionModelPerformanceMetric; - @doc("[Required] Specifies the data type of the metric threshold.") - modelType: "Regression"; +model RegressionModelPerformanceMetricThreshold extends ModelPerformanceMetricThresholdBase { +/** +* [Required] The regression model performance metric to calculate. +*/ +@visibility("read", "create") +"metric": RegressionModelPerformanceMetric; +/** +* [Required] Specifies the data type of the metric threshold. +*/ +"modelType": "Regression"; } -model SASCredentialDto extends PendingUploadCredentialDto { - @doc("Full SAS Uri, including the storage, container/blob path and SAS token") - sasUri?: string; - - @doc("[Required] Credential type used to authentication with storage.") - credentialType: "SAS"; -} -@doc("SAS datastore credentials configuration.") +model SASCredentialDto extends PendingUploadCredentialDto { +/** +* Full SAS Uri, including the storage, container/blob path and SAS token +*/ +"sasUri"?: url; +/** +* [Required] Credential type used to authentication with storage. +*/ +"credentialType": "SAS"; +} + +/** +* SAS datastore credentials configuration. +*/ model SasDatastoreCredentials extends DatastoreCredentials { - @doc("[Required] Storage container secrets.") - @visibility("create", "update") - secrets: SasDatastoreSecrets; - - @doc("[Required] Credential type used to authentication with storage.") - credentialsType: "Sas"; -} - -@doc("Datastore SAS secrets.") +/** +* [Required] Storage container secrets. +*/ +@visibility("create", "update") +"secrets": SasDatastoreSecrets; +/** +* [Required] Credential type used to authentication with storage. +*/ +"credentialsType": "Sas"; +} + +/** +* Datastore SAS secrets. +*/ model SasDatastoreSecrets extends DatastoreSecrets { - @doc("Storage container SAS token.") - sasToken?: string; - - @doc("[Required] Credential type used to authentication with storage.") - secretsType: "Sas"; -} - -@doc("Service Principal datastore credentials configuration.") +/** +* Storage container SAS token. +*/ +"sasToken"?: string; +/** +* [Required] Credential type used to authentication with storage. +*/ +"secretsType": "Sas"; +} + +/** +* Service Principal datastore credentials configuration. +*/ model ServicePrincipalDatastoreCredentials extends DatastoreCredentials { - @doc("Authority URL used for authentication.") - authorityUrl?: string; - - @doc("[Required] Service principal client ID.") - clientId: string; - - @doc("Resource the service principal has access to.") - resourceUrl?: string; - - @doc("[Required] Service principal secrets.") - @visibility("create", "update") - secrets: ServicePrincipalDatastoreSecrets; - - @doc("[Required] ID of the tenant to which the service principal belongs.") - tenantId: string; - - @doc("[Required] Credential type used to authentication with storage.") - credentialsType: "ServicePrincipal"; -} - -@doc("Datastore Service Principal secrets.") +/** +* Authority URL used for authentication. +*/ +"authorityUrl"?: string; +/** +* [Required] Service principal client ID. +*/ +"clientId": string; +/** +* Resource the service principal has access to. +*/ +"resourceUrl"?: string; +/** +* [Required] Service principal secrets. +*/ +@visibility("create", "update") +"secrets": ServicePrincipalDatastoreSecrets; +/** +* [Required] ID of the tenant to which the service principal belongs. +*/ +"tenantId": string; +/** +* [Required] Credential type used to authentication with storage. +*/ +"credentialsType": "ServicePrincipal"; +} + +/** +* Datastore Service Principal secrets. +*/ model ServicePrincipalDatastoreSecrets extends DatastoreSecrets { - @doc("Service principal secret.") - clientSecret?: string; - - @doc("[Required] Credential type used to authentication with storage.") - secretsType: "ServicePrincipal"; -} - -@doc("Spark job definition.") +/** +* Service principal secret. +*/ +"clientSecret"?: string; +/** +* [Required] Credential type used to authentication with storage. +*/ +"secretsType": "ServicePrincipal"; +} + +/** +* Spark job definition. +*/ model SparkJob extends JobBase { - @doc("Archive files used in the job.") - @visibility("read", "create") - archives?: string[]; - - @doc("Arguments for the job.") - @visibility("read", "create") - args?: string; - - @doc("[Required] ARM resource ID of the code asset.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - codeId: string; - - @doc("Spark configured properties.") - @visibility("read", "create") - conf?: Record; - - @doc("[Required] The entry to execute on startup of the job.") - @visibility("read", "create") - entry: SparkJobEntry; - - @doc("The ARM resource ID of the Environment specification for the job.") - @visibility("read", "create") - environmentId?: string; - - @doc("Files used in the job.") - @visibility("read", "create") - files?: string[]; - - @doc("Mapping of input data bindings used in the job.") - @visibility("read", "create") - inputs?: Record; - - @doc("Jar files used in the job.") - @visibility("read", "create") - jars?: string[]; - - @doc("Mapping of output data bindings used in the job.") - @visibility("read", "create") - outputs?: Record; - - @doc("Python files used in the job.") - @visibility("read", "create") - pyFiles?: string[]; - - @doc("Queue settings for the job") - @visibility("read", "create") - queueSettings?: QueueSettings; - - @doc("Compute Resource configuration for the job.") - @visibility("read", "create") - resources?: SparkResourceConfiguration; - - @doc("[Required] Specifies the type of job.") - jobType: "Spark"; +/** +* Archive files used in the job. +*/ +@visibility("read", "create") +"archives"?: string[]; +/** +* Arguments for the job. +*/ +@visibility("read", "create") +"args"?: string; +/** +* [Required] ARM resource ID of the code asset. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"codeId": string; +/** +* Spark configured properties. +*/ +@visibility("read", "create") +"conf"?: Record; +/** +* [Required] The entry to execute on startup of the job. +*/ +@visibility("read", "create") +"entry": SparkJobEntry; +/** +* The ARM resource ID of the Environment specification for the job. +*/ +@visibility("read", "create") +"environmentId"?: string; +/** +* Files used in the job. +*/ +@visibility("read", "create") +"files"?: string[]; +/** +* Mapping of input data bindings used in the job. +*/ +@visibility("read", "create") +"inputs"?: Record; +/** +* Jar files used in the job. +*/ +@visibility("read", "create") +"jars"?: string[]; +/** +* Mapping of output data bindings used in the job. +*/ +@visibility("read", "create") +"outputs"?: Record; +/** +* Python files used in the job. +*/ +@visibility("read", "create") +"pyFiles"?: string[]; +/** +* Queue settings for the job +*/ +@visibility("read", "create") +"queueSettings"?: QueueSettings; +/** +* Compute Resource configuration for the job. +*/ +@visibility("read", "create") +"resources"?: SparkResourceConfiguration; +/** +* [Required] Specifies the type of job. +*/ +"jobType": "Spark"; +} + +/** +* Spark job entry point definition. +*/ +@discriminator("sparkJobEntryType") +model SparkJobEntry { } -@doc("Spark job entry point definition.") -@discriminator("sparkJobEntryType") -model SparkJobEntry {} model SparkResourceConfiguration { - @doc("Optional type of VM used as supported by the compute target.") - @visibility("read", "create") - instanceType?: string; - - @doc("Version of spark runtime used for the job.") - @visibility("read", "create") - runtimeVersion?: string; +/** +* Optional type of VM used as supported by the compute target. +*/ +@visibility("read", "create") +"instanceType"?: string; +/** +* Version of spark runtime used for the job. +*/ +@visibility("read", "create") +"runtimeVersion"?: string = "3.1"; } -model SparkJobPythonEntry extends SparkJobEntry { - @doc("[Required] Relative python file path for job entry point.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - file: string; - @doc("[Required] Type of the job's entry point.") - sparkJobEntryType: "SparkJobPythonEntry"; +model SparkJobPythonEntry extends SparkJobEntry { +/** +* [Required] Relative python file path for job entry point. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"file": string; +/** +* [Required] Type of the job's entry point. +*/ +"sparkJobEntryType": "SparkJobPythonEntry"; } -model SparkJobScalaEntry extends SparkJobEntry { - @doc("[Required] Scala class name used as entry point.") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - className: string; - - @doc("[Required] Type of the job's entry point.") - sparkJobEntryType: "SparkJobScalaEntry"; -} -@doc("Static input data definition.") +model SparkJobScalaEntry extends SparkJobEntry { +/** +* [Required] Scala class name used as entry point. +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"className": string; +/** +* [Required] Type of the job's entry point. +*/ +"sparkJobEntryType": "SparkJobScalaEntry"; +} + +/** +* Static input data definition. +*/ model StaticInputData extends MonitoringInputDataBase { - @doc("The ARM resource ID of the component resource used to preprocess the data.") - @visibility("read", "create") - preprocessingComponentId?: string; - - @doc("[Required] The end date of the data window.") - @visibility("read", "create") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - windowEnd: utcDateTime; - - @doc("[Required] The start date of the data window.") - @visibility("read", "create") - // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. - windowStart: utcDateTime; - - @doc("[Required] Specifies the type of signal to monitor.") - inputDataType: "Static"; -} - -@doc("Sweep job definition.") +/** +* The ARM resource ID of the component resource used to preprocess the data. +*/ +@visibility("read", "create") +"preprocessingComponentId"?: string; +/** +* [Required] The end date of the data window. +*/ +@visibility("read", "create") +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"windowEnd": utcDateTime; +/** +* [Required] The start date of the data window. +*/ +@visibility("read", "create") +// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. +"windowStart": utcDateTime; +/** +* [Required] Specifies the type of signal to monitor. +*/ +"inputDataType": "Static"; +} + +/** +* Sweep job definition. +*/ model SweepJob extends JobBase { - @doc("Early termination policies enable canceling poor-performing runs before they complete") - earlyTermination?: EarlyTerminationPolicy; - - @doc("Mapping of input data bindings used in the job.") - @visibility("read", "create") - inputs?: Record; - - @doc("Sweep Job limit.") - @visibility("read", "create") - limits?: SweepJobLimits; - - @doc("[Required] Optimization objective.") - objective: Objective; - - @doc("Mapping of output data bindings used in the job.") - @visibility("read", "create") - outputs?: Record; - - @doc("Queue settings for the job") - @visibility("read", "create") - queueSettings?: QueueSettings; - - @doc("[Required] The hyperparameter sampling algorithm") - samplingAlgorithm: SamplingAlgorithm; - - @doc("[Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter") - searchSpace: Record; - - @doc("[Required] Trial component definition.") - trial: TrialComponent; - - @doc("[Required] Specifies the type of job.") - jobType: "Sweep"; -} - -@doc("Sweep Job limit class.") +/** +* Early termination policies enable canceling poor-performing runs before they complete +*/ +"earlyTermination"?: EarlyTerminationPolicy; +/** +* Mapping of input data bindings used in the job. +*/ +@visibility("read", "create") +"inputs"?: Record; +/** +* Sweep Job limit. +*/ +@visibility("read", "create") +"limits"?: SweepJobLimits; +/** +* [Required] Optimization objective. +*/ +"objective": Objective; +/** +* Mapping of output data bindings used in the job. +*/ +@visibility("read", "create") +"outputs"?: Record; +/** +* Queue settings for the job +*/ +@visibility("read", "create") +"queueSettings"?: QueueSettings; +/** +* [Required] The hyperparameter sampling algorithm +*/ +"samplingAlgorithm": SamplingAlgorithm; +/** +* [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter +*/ +"searchSpace": Record; +/** +* [Required] Trial component definition. +*/ +"trial": TrialComponent; +/** +* [Required] Specifies the type of job. +*/ +"jobType": "Sweep"; +} + +/** +* Sweep Job limit class. +*/ model SweepJobLimits extends JobLimits { - @doc("Sweep Job max concurrent trials.") - maxConcurrentTrials?: int32; - - @doc("Sweep Job max total trials.") - maxTotalTrials?: int32; - - @doc("Sweep Job Trial timeout value.") - trialTimeout?: duration; - - @doc("[Required] JobLimit type.") - jobLimitsType: "Sweep"; -} - -@doc("Trial component definition.") +/** +* Sweep Job max concurrent trials. +*/ +"maxConcurrentTrials"?: int32; +/** +* Sweep Job max total trials. +*/ +"maxTotalTrials"?: int32; +/** +* Sweep Job Trial timeout value. +*/ +"trialTimeout"?: duration; +/** +* [Required] JobLimit type. +*/ +"jobLimitsType": "Sweep"; +} + +/** +* Trial component definition. +*/ model TrialComponent { - @doc("ARM resource ID of the code asset.") - @visibility("read", "create") - codeId?: string; - - @doc("[Required] The command to execute on startup of the job. eg. \"python train.py\"") - @visibility("read", "create") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - command: string; - - @doc("Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.") - @visibility("read", "create") - distribution?: DistributionConfiguration; - - @doc("[Required] The ARM resource ID of the Environment specification for the job.") - @minLength(1) - @pattern("[a-zA-Z0-9_]") - environmentId: string; - - @doc("Environment variables included in the job.") - @visibility("read", "create") - environmentVariables?: Record; - - @doc("Compute Resource configuration for the job.") - @visibility("read", "create") - resources?: JobResourceConfiguration; +/** +* ARM resource ID of the code asset. +*/ +@visibility("read", "create") +"codeId"?: string; +/** +* [Required] The command to execute on startup of the job. eg. "python train.py" +*/ +@visibility("read", "create") +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"command": string; +/** +* Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. +*/ +@visibility("read", "create") +"distribution"?: DistributionConfiguration; +/** +* [Required] The ARM resource ID of the Environment specification for the job. +*/ +@minLength(1) +@pattern("[a-zA-Z0-9_]") +"environmentId": string; +/** +* Environment variables included in the job. +*/ +@visibility("read", "create") +"environmentVariables"?: Record; +/** +* Compute Resource configuration for the job. +*/ +@visibility("read", "create") +"resources"?: JobResourceConfiguration; } -model TargetUtilizationScaleSettings extends OnlineScaleSettings { - @doc("The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances.") - maxInstances?: int32; - - @doc("The minimum number of instances to always be present.") - minInstances?: int32; - - @doc("The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds.") - pollingInterval?: duration; - - @doc("Target CPU usage for the autoscaler.") - targetUtilizationPercentage?: int32; - - @doc("[Required] Type of deployment scaling algorithm") - scaleType: "TargetUtilization"; -} -@doc("TensorFlow distribution configuration.") +model TargetUtilizationScaleSettings extends OnlineScaleSettings { +/** +* The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances. +*/ +"maxInstances"?: int32 = 1; +/** +* The minimum number of instances to always be present. +*/ +"minInstances"?: int32 = 1; +/** +* The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds. +*/ +"pollingInterval"?: duration = duration.PT1S; +/** +* Target CPU usage for the autoscaler. +*/ +"targetUtilizationPercentage"?: int32 = 70; +/** +* [Required] Type of deployment scaling algorithm +*/ +"scaleType": "TargetUtilization"; +} + +/** +* TensorFlow distribution configuration. +*/ model TensorFlow extends DistributionConfiguration { - @doc("Number of parameter server tasks.") - @visibility("read", "create") - parameterServerCount?: int32; - - @doc("Number of workers. If not specified, will default to the instance count.") - @visibility("read", "create") - workerCount?: int32; - - @doc("[Required] Specifies the type of distribution framework.") - distributionType: "TensorFlow"; -} - -@doc(""" -Text Classification task in AutoML NLP vertical. +/** +* Number of parameter server tasks. +*/ +@visibility("read", "create") +"parameterServerCount"?: int32; +/** +* Number of workers. If not specified, will default to the instance count. +*/ +@visibility("read", "create") +"workerCount"?: int32; +/** +* [Required] Specifies the type of distribution framework. +*/ +"distributionType": "TensorFlow"; +} + +/** +* Text Classification task in AutoML NLP vertical. NLP - Natural Language Processing. -""") +*/ model TextClassification extends AutoMLVertical { - ...NlpVertical; - - @doc("Primary metric for Text-Classification task.") - primaryMetric?: ClassificationPrimaryMetrics; - - @doc("[Required] Task type for AutoMLJob.") - taskType: "TextClassification"; -} - -@doc(""" -Text Classification Multilabel task in AutoML NLP vertical. +...NlpVertical; +/** +* Primary metric for Text-Classification task. +*/ +"primaryMetric"?: ClassificationPrimaryMetrics; +/** +* [Required] Task type for AutoMLJob. +*/ +"taskType": "TextClassification"; +} + +/** +* Text Classification Multilabel task in AutoML NLP vertical. NLP - Natural Language Processing. -""") +*/ model TextClassificationMultilabel extends AutoMLVertical { - ...NlpVertical; - - @doc(""" -Primary metric for Text-Classification-Multilabel task. +...NlpVertical; +/** +* Primary metric for Text-Classification-Multilabel task. Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. -""") - @visibility("read") - primaryMetric?: ClassificationMultilabelPrimaryMetrics; - - @doc("[Required] Task type for AutoMLJob.") - taskType: "TextClassificationMultilabel"; +*/ +@visibility("read") +"primaryMetric"?: ClassificationMultilabelPrimaryMetrics; +/** +* [Required] Task type for AutoMLJob. +*/ +"taskType": "TextClassificationMultilabel"; } -@doc(""" -Text-NER task in AutoML NLP vertical. +/** +* Text-NER task in AutoML NLP vertical. NER - Named Entity Recognition. NLP - Natural Language Processing. -""") +*/ model TextNer extends AutoMLVertical { - ...NlpVertical; - - @doc(""" -Primary metric for Text-NER task. +...NlpVertical; +/** +* Primary metric for Text-NER task. Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. -""") - @visibility("read") - primaryMetric?: ClassificationPrimaryMetrics; - - @doc("[Required] Task type for AutoMLJob.") - taskType: "TextNER"; +*/ +@visibility("read") +"primaryMetric"?: ClassificationPrimaryMetrics; +/** +* [Required] Task type for AutoMLJob. +*/ +"taskType": "TextNER"; } -model TopNFeaturesByAttribution extends MonitoringFeatureFilterBase { - @doc("The number of top features to include.") - @visibility("read", "create") - top?: int32; - - @doc("[Required] Specifies the feature filter to leverage when selecting features to calculate metrics over.") - filterType: "TopNByAttribution"; -} -@doc("Trailing input data definition.") +model TopNFeaturesByAttribution extends MonitoringFeatureFilterBase { +/** +* The number of top features to include. +*/ +@visibility("read", "create") +"top"?: int32 = 10; +/** +* [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. +*/ +"filterType": "TopNByAttribution"; +} + +/** +* Trailing input data definition. +*/ model TrailingInputData extends MonitoringInputDataBase { - @doc("The ARM resource ID of the component resource used to preprocess the data.") - @visibility("read", "create") - preprocessingComponentId?: string; - - @doc("[Required] The time offset between the end of the data window and the monitor's current run time.") - @visibility("read", "create") - windowOffset: duration; - - @doc("[Required] The size of the trailing data window.") - @visibility("read", "create") - windowSize: duration; - - @doc("[Required] Specifies the type of signal to monitor.") - inputDataType: "Trailing"; -} - -@doc("Triton inferencing server configurations.") +/** +* The ARM resource ID of the component resource used to preprocess the data. +*/ +@visibility("read", "create") +"preprocessingComponentId"?: string; +/** +* [Required] The time offset between the end of the data window and the monitor's current run time. +*/ +@visibility("read", "create") +"windowOffset": duration; +/** +* [Required] The size of the trailing data window. +*/ +@visibility("read", "create") +"windowSize": duration; +/** +* [Required] Specifies the type of signal to monitor. +*/ +"inputDataType": "Trailing"; +} + +/** +* Triton inferencing server configurations. +*/ model TritonInferencingServer extends InferencingServer { - @doc("Inference configuration for Triton.") - inferenceConfiguration?: OnlineInferenceConfiguration; - - @doc("[Required] Inferencing server type for various targets.") - serverType: "Triton"; +/** +* Inference configuration for Triton. +*/ +"inferenceConfiguration"?: OnlineInferenceConfiguration; +/** +* [Required] Inferencing server type for various targets. +*/ +"serverType": "Triton"; } -model TritonModelJobInput extends JobInput { - ...AssetJobInput; - @doc("[Required] Specifies the type of job.") - jobInputType: "triton_model"; +model TritonModelJobInput extends JobInput { +...AssetJobInput; +/** +* [Required] Specifies the type of job. +*/ +"jobInputType": "triton_model"; } -model TritonModelJobOutput extends JobOutput { - ...AssetJobOutput; - @doc("[Required] Specifies the type of job.") - jobOutputType: "triton_model"; +model TritonModelJobOutput extends JobOutput { +...AssetJobOutput; +/** +* [Required] Specifies the type of job. +*/ +"jobOutputType": "triton_model"; } -@doc("Defines an early termination policy that cancels a given percentage of runs at each evaluation interval.") +/** +* Defines an early termination policy that cancels a given percentage of runs at each evaluation interval. +*/ model TruncationSelectionPolicy extends EarlyTerminationPolicy { - @doc("The percentage of runs to cancel at each evaluation interval.") - truncationPercentage?: int32; - - @doc("[Required] Name of policy configuration") - policyType: "TruncationSelection"; -} - -@doc("uri-file data version entity") +/** +* The percentage of runs to cancel at each evaluation interval. +*/ +"truncationPercentage"?: int32; +/** +* [Required] Name of policy configuration +*/ +"policyType": "TruncationSelection"; +} + +/** +* uri-file data version entity +*/ model UriFileDataVersion extends DataVersionBase { - @doc("[Required] Specifies the type of data.") - dataType: "uri_file"; +/** +* [Required] Specifies the type of data. +*/ +"dataType": "uri_file"; } -model UriFileJobInput extends JobInput { - ...AssetJobInput; - @doc("[Required] Specifies the type of job.") - jobInputType: "uri_file"; +model UriFileJobInput extends JobInput { +...AssetJobInput; +/** +* [Required] Specifies the type of job. +*/ +"jobInputType": "uri_file"; } -model UriFileJobOutput extends JobOutput { - ...AssetJobOutput; - @doc("[Required] Specifies the type of job.") - jobOutputType: "uri_file"; +model UriFileJobOutput extends JobOutput { +...AssetJobOutput; +/** +* [Required] Specifies the type of job. +*/ +"jobOutputType": "uri_file"; } -@doc("uri-folder data version entity") +/** +* uri-folder data version entity +*/ model UriFolderDataVersion extends DataVersionBase { - @doc("[Required] Specifies the type of data.") - dataType: "uri_folder"; +/** +* [Required] Specifies the type of data. +*/ +"dataType": "uri_folder"; } -model UriFolderJobInput extends JobInput { - ...AssetJobInput; - @doc("[Required] Specifies the type of job.") - jobInputType: "uri_folder"; +model UriFolderJobInput extends JobInput { +...AssetJobInput; +/** +* [Required] Specifies the type of job. +*/ +"jobInputType": "uri_folder"; } -model UriFolderJobOutput extends JobOutput { - ...AssetJobOutput; - @doc("[Required] Specifies the type of job.") - jobOutputType: "uri_folder"; +model UriFolderJobOutput extends JobOutput { +...AssetJobOutput; +/** +* [Required] Specifies the type of job. +*/ +"jobOutputType": "uri_folder"; } -@doc("User identity configuration.") +/** +* User identity configuration. +*/ model UserIdentity extends IdentityConfiguration { - @doc("[Required] Specifies the type of identity framework.") - identityType: "UserIdentity"; +/** +* [Required] Specifies the type of identity framework. +*/ +"identityType": "UserIdentity"; } -model AccessKeyAuthTypeWorkspaceConnectionProperties - extends WorkspaceConnectionPropertiesV2 { - credentials?: WorkspaceConnectionAccessKey; - @doc("Authentication type of the connection target") - authType: "AccessKey"; +model AccessKeyAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { +"credentials"?: WorkspaceConnectionAccessKey; +/** +* Authentication type of the connection target +*/ +"authType": "AccessKey"; } + model WorkspaceConnectionAccessKey { - accessKeyId?: string; - secretAccessKey?: string; +"accessKeyId"?: string; +"secretAccessKey"?: string; } -@doc(""" -This connection type covers the generic ApiKey auth connection categories, for examples: +/** +* This connection type covers the generic ApiKey auth connection categories, for examples: AzureOpenAI: Category:= AzureOpenAI AuthType:= ApiKey (as type discriminator) @@ -8615,160 +11150,201 @@ CognitiveSearch: Target:= {Endpoint} Use Metadata property bag for ApiType, ApiVersion, Kind and other metadata fields -""") -model ApiKeyAuthWorkspaceConnectionProperties - extends WorkspaceConnectionPropertiesV2 { - @doc("Api key object for workspace connection credential.") - credentials?: WorkspaceConnectionApiKey; - - @doc("Authentication type of the connection target") - authType: "ApiKey"; -} - -@doc("Api key object for workspace connection credential.") +*/ +model ApiKeyAuthWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { +/** +* Api key object for workspace connection credential. +*/ +"credentials"?: WorkspaceConnectionApiKey; +/** +* Authentication type of the connection target +*/ +"authType": "ApiKey"; +} + +/** +* Api key object for workspace connection credential. +*/ model WorkspaceConnectionApiKey { - key?: string; +"key"?: string; } -@doc("Custom Keys credential object") +/** +* Custom Keys credential object +*/ model CustomKeys { - @doc("Dictionary of ") - keys?: Record; +/** +* Dictionary of +*/ +"keys"?: Record; } -@doc(""" -Category:= CustomKeys +/** +* Category:= CustomKeys AuthType:= CustomKeys (as type discriminator) Credentials:= {CustomKeys} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.CustomKeys Target:= {any value} Use Metadata property bag for ApiVersion and other metadata fields -""") -model CustomKeysWorkspaceConnectionProperties - extends WorkspaceConnectionPropertiesV2 { - @doc("Custom Keys credential object") - credentials?: CustomKeys; - - @doc("Authentication type of the connection target") - authType: "CustomKeys"; -} - -@doc("FQDN Outbound Rule for the managed network of a machine learning workspace.") +*/ +model CustomKeysWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { +/** +* Custom Keys credential object +*/ +"credentials"?: CustomKeys; +/** +* Authentication type of the connection target +*/ +"authType": "CustomKeys"; +} + +/** +* FQDN Outbound Rule for the managed network of a machine learning workspace. +*/ model FqdnOutboundRule extends OutboundRule { - destination?: string; - - @doc("Type of a managed network Outbound Rule of a machine learning workspace.") - type: "FQDN"; +"destination"?: string; +/** +* Type of a managed network Outbound Rule of a machine learning workspace. +*/ +"type": "FQDN"; } -model ManagedIdentityAuthTypeWorkspaceConnectionProperties - extends WorkspaceConnectionPropertiesV2 { - credentials?: WorkspaceConnectionManagedIdentity; - @doc("Authentication type of the connection target") - authType: "ManagedIdentity"; +model ManagedIdentityAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { +"credentials"?: WorkspaceConnectionManagedIdentity; +/** +* Authentication type of the connection target +*/ +"authType": "ManagedIdentity"; } + model WorkspaceConnectionManagedIdentity { - clientId?: string; - resourceId?: string; +"clientId"?: string; +"resourceId"?: string; } -model NoneAuthTypeWorkspaceConnectionProperties - extends WorkspaceConnectionPropertiesV2 { - @doc("Authentication type of the connection target") - authType: "None"; + +model NoneAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { +/** +* Authentication type of the connection target +*/ +"authType": "None"; } -model PATAuthTypeWorkspaceConnectionProperties - extends WorkspaceConnectionPropertiesV2 { - credentials?: WorkspaceConnectionPersonalAccessToken; - @doc("Authentication type of the connection target") - authType: "PAT"; +model PATAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { +"credentials"?: WorkspaceConnectionPersonalAccessToken; +/** +* Authentication type of the connection target +*/ +"authType": "PAT"; } + model WorkspaceConnectionPersonalAccessToken { - pat?: string; +"pat"?: string; } -@doc("Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace.") +/** +* Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace. +*/ model PrivateEndpointDestination { - serviceResourceId?: string; - sparkEnabled?: boolean; - - @doc("Type of a managed network Outbound Rule of a machine learning workspace.") - sparkStatus?: RuleStatus; - - subresourceTarget?: string; -} - -@doc("Private Endpoint Outbound Rule for the managed network of a machine learning workspace.") +"serviceResourceId"?: string; +"sparkEnabled"?: boolean; +/** +* Type of a managed network Outbound Rule of a machine learning workspace. +*/ +"sparkStatus"?: RuleStatus; +"subresourceTarget"?: string; +} + +/** +* Private Endpoint Outbound Rule for the managed network of a machine learning workspace. +*/ model PrivateEndpointOutboundRule extends OutboundRule { - @doc("Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace.") - destination?: PrivateEndpointDestination; - - @doc("Type of a managed network Outbound Rule of a machine learning workspace.") - type: "PrivateEndpoint"; +/** +* Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace. +*/ +"destination"?: PrivateEndpointDestination; +/** +* Type of a managed network Outbound Rule of a machine learning workspace. +*/ +"type": "PrivateEndpoint"; } -model SASAuthTypeWorkspaceConnectionProperties - extends WorkspaceConnectionPropertiesV2 { - credentials?: WorkspaceConnectionSharedAccessSignature; - @doc("Authentication type of the connection target") - authType: "SAS"; +model SASAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { +"credentials"?: WorkspaceConnectionSharedAccessSignature; +/** +* Authentication type of the connection target +*/ +"authType": "SAS"; } + model WorkspaceConnectionSharedAccessSignature { - sas?: string; +"sas"?: string; } -model ServicePrincipalAuthTypeWorkspaceConnectionProperties - extends WorkspaceConnectionPropertiesV2 { - credentials?: WorkspaceConnectionServicePrincipal; - @doc("Authentication type of the connection target") - authType: "ServicePrincipal"; +model ServicePrincipalAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { +"credentials"?: WorkspaceConnectionServicePrincipal; +/** +* Authentication type of the connection target +*/ +"authType": "ServicePrincipal"; } + model WorkspaceConnectionServicePrincipal { - clientId?: string; - clientSecret?: string; - tenantId?: string; +"clientId"?: string; +"clientSecret"?: string; +"tenantId"?: string; } -@doc("Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace.") +/** +* Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. +*/ model ServiceTagDestination { - @doc("The action enum for networking rule.") - action?: RuleAction; - - @doc("Optional, if provided, the ServiceTag property will be ignored.") - @visibility("read") - addressPrefixes?: string[]; - - portRanges?: string; - protocol?: string; - serviceTag?: string; -} - -@doc("Service Tag Outbound Rule for the managed network of a machine learning workspace.") +/** +* The action enum for networking rule. +*/ +"action"?: RuleAction; +/** +* Optional, if provided, the ServiceTag property will be ignored. +*/ +@visibility("read") +"addressPrefixes"?: string[]; +"portRanges"?: string; +"protocol"?: string; +"serviceTag"?: string; +} + +/** +* Service Tag Outbound Rule for the managed network of a machine learning workspace. +*/ model ServiceTagOutboundRule extends OutboundRule { - @doc("Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace.") - destination?: ServiceTagDestination; - - @doc("Type of a managed network Outbound Rule of a machine learning workspace.") - type: "ServiceTag"; +/** +* Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. +*/ +"destination"?: ServiceTagDestination; +/** +* Type of a managed network Outbound Rule of a machine learning workspace. +*/ +"type": "ServiceTag"; } -model UsernamePasswordAuthTypeWorkspaceConnectionProperties - extends WorkspaceConnectionPropertiesV2 { - credentials?: WorkspaceConnectionUsernamePassword; - @doc("Authentication type of the connection target") - authType: "UsernamePassword"; +model UsernamePasswordAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { +"credentials"?: WorkspaceConnectionUsernamePassword; +/** +* Authentication type of the connection target +*/ +"authType": "UsernamePassword"; } + model WorkspaceConnectionUsernamePassword { - password?: string; - username?: string; -} +"password"?: string; +"username"?: string; +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp index ebf4ed1742..966892fe5d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp @@ -10,17 +10,23 @@ using Azure.ResourceManager; namespace Azure.ResourceManager.MachineLearning; interface UsagesOperations { - @doc("Gets the current usage information as well as limits for AML resources for given subscription and location.") + /** + * Gets the current usage information as well as limits for AML resources for given subscription and location. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The location for which resource usage is queried.") + /** + * The location for which resource usage is queried. + */ @pattern("^[-\\w\\._]+$") @path location: string; @@ -30,17 +36,23 @@ interface UsagesOperations { } interface VirtualMachineSizesOperations { - @doc("Returns supported VM Sizes in a location") + /** + * Returns supported VM Sizes in a location + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The location upon which virtual-machine-sizes is queried.") + /** + * The location upon which virtual-machine-sizes is queried. + */ @pattern("^[-\\w\\._]+$") @path location: string; - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; @@ -50,39 +62,53 @@ interface VirtualMachineSizesOperations { } interface QuotasOperations { - @doc("Update quota for each VM family in workspace.") + /** + * Update quota for each VM family in workspace. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas") @post - Update is Azure.Core.Foundations.Operation< + update is Azure.Core.Foundations.Operation< { - @doc("The location for update quota is queried.") + /** + * The location for update quota is queried. + */ @pattern("^[-\\w\\._]+$") @path location: string; - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("Quota update parameters.") + /** + * Quota update parameters. + */ @body parameters: QuotaUpdateParameters; }, UpdateWorkspaceQuotasResult >; - @doc("Gets the currently assigned Workspace Quotas based on VMFamily.") + /** + * Gets the currently assigned Workspace Quotas based on VMFamily. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The location for which resource usage is queried.") + /** + * The location for which resource usage is queried. + */ @pattern("^[-\\w\\._]+$") @path location: string; @@ -92,121 +118,163 @@ interface QuotasOperations { } interface CodeContainersOperations { + /** + * List containers. + */ @summary("List containers.") - @doc("List containers.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; }, ResourceListResult >; + /** + * Delete container. + */ @summary("Delete container.") - @doc("Delete container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path name: string; }, void >; + /** + * Get container. + */ @summary("Get container.") - @doc("Get container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path name: string; }, CodeContainerResource >; + /** + * Create or update container. + */ @summary("Create or update container.") - @doc("Create or update container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path name: string; - @doc("Container entity to create or update.") + /** + * Container entity to create or update. + */ @body body: CodeContainerResource; }, @@ -215,190 +283,262 @@ interface CodeContainersOperations { } interface CodeVersionsOperations { + /** + * List versions. + */ @summary("List versions.") - @doc("List versions.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path name: string; - @doc("Ordering of list.") + /** + * Ordering of list. + */ @query("$orderBy") $orderBy?: string; - @doc("Maximum number of records to return.") + /** + * Maximum number of records to return. + */ @query("$top") $top?: int32; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("If specified, return CodeVersion assets with specified content hash value, regardless of name") + /** + * If specified, return CodeVersion assets with specified content hash value, regardless of name + */ @query("hash") hash?: string; - @doc("Hash algorithm version when listing by hash") + /** + * Hash algorithm version when listing by hash + */ @query("hashVersion") hashVersion?: string; }, ResourceListResult >; + /** + * Delete version. + */ @summary("Delete version.") - @doc("Delete version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path name: string; - @doc("Version identifier. This is case-sensitive.") + /** + * Version identifier. This is case-sensitive. + */ @path version: string; }, void >; + /** + * Get version. + */ @summary("Get version.") - @doc("Get version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path name: string; - @doc("Version identifier. This is case-sensitive.") + /** + * Version identifier. This is case-sensitive. + */ @path version: string; }, CodeVersionResource >; + /** + * Create or update version. + */ @summary("Create or update version.") - @doc("Create or update version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path name: string; - @doc("Version identifier. This is case-sensitive.") + /** + * Version identifier. This is case-sensitive. + */ @path version: string; - @doc("Version entity to create or update.") + /** + * Version entity to create or update. + */ @body body: CodeVersionResource; }, CodeVersionResource >; + /** + * Generate a storage location and credential for the client to upload a code asset to. + */ @summary("Generate a storage location and credential for the client to upload a code asset to.") - @doc("Generate a storage location and credential for the client to upload a code asset to.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/startPendingUpload") @post - CreateOrGetStartPendingUpload is Azure.Core.Foundations.Operation< + createOrGetStartPendingUpload is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path name: string; - @doc("Version identifier. This is case-sensitive.") + /** + * Version identifier. This is case-sensitive. + */ @path version: string; - @doc("Pending upload request object") + /** + * Pending upload request object + */ @body body: PendingUploadRequestDto; }, @@ -407,125 +547,169 @@ interface CodeVersionsOperations { } interface ComponentContainersOperations { + /** + * List component containers. + */ @summary("List component containers.") - @doc("List component containers.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("View type for including/excluding (for example) archived entities.") + /** + * View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; }, ResourceListResult >; + /** + * Delete container. + */ @summary("Delete container.") - @doc("Delete container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name.") + /** + * Container name. + */ @path name: string; }, void >; + /** + * Get container. + */ @summary("Get container.") - @doc("Get container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name.") + /** + * Container name. + */ @path name: string; }, ComponentContainerResource >; + /** + * Create or update container. + */ @summary("Create or update container.") - @doc("Create or update container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name.") + /** + * Container name. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path name: string; - @doc("Container entity to create or update.") + /** + * Container entity to create or update. + */ @body body: ComponentContainerResource; }, @@ -534,153 +718,211 @@ interface ComponentContainersOperations { } interface ComponentVersionsOperations { + /** + * List component versions. + */ @summary("List component versions.") - @doc("List component versions.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Component name.") + /** + * Component name. + */ @path name: string; - @doc("Ordering of list.") + /** + * Ordering of list. + */ @query("$orderBy") $orderBy?: string; - @doc("Maximum number of records to return.") + /** + * Maximum number of records to return. + */ @query("$top") $top?: int32; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("View type for including/excluding (for example) archived entities.") + /** + * View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; - @doc("Component stage.") + /** + * Component stage. + */ @query("stage") stage?: string; }, ResourceListResult >; + /** + * Delete version. + */ @summary("Delete version.") - @doc("Delete version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name.") + /** + * Container name. + */ @path name: string; - @doc("Version identifier.") + /** + * Version identifier. + */ @path version: string; }, void >; + /** + * Get version. + */ @summary("Get version.") - @doc("Get version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name.") + /** + * Container name. + */ @path name: string; - @doc("Version identifier.") + /** + * Version identifier. + */ @path version: string; }, ComponentVersionResource >; + /** + * Create or update version. + */ @summary("Create or update version.") - @doc("Create or update version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name.") + /** + * Container name. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path name: string; - @doc("Version identifier.") + /** + * Version identifier. + */ @path version: string; - @doc("Version entity to create or update.") + /** + * Version entity to create or update. + */ @body body: ComponentVersionResource; }, @@ -689,125 +931,169 @@ interface ComponentVersionsOperations { } interface DataContainersOperations { + /** + * List data containers. + */ @summary("List data containers.") - @doc("List data containers.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("View type for including/excluding (for example) archived entities.") + /** + * View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; }, ResourceListResult >; + /** + * Delete container. + */ @summary("Delete container.") - @doc("Delete container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name.") + /** + * Container name. + */ @path name: string; }, void >; + /** + * Get container. + */ @summary("Get container.") - @doc("Get container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name.") + /** + * Container name. + */ @path name: string; }, DataContainerResource >; + /** + * Create or update container. + */ @summary("Create or update container.") - @doc("Create or update container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name.") + /** + * Container name. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path name: string; - @doc("Container entity to create or update.") + /** + * Container entity to create or update. + */ @body body: DataContainerResource; }, @@ -816,160 +1102,218 @@ interface DataContainersOperations { } interface DataVersionsOperations { + /** + * List data versions in the data container + */ @summary("List data versions in the data container") - @doc("List data versions in the data container") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Data container's name") + /** + * Data container's name + */ @path name: string; - @doc("Please choose OrderBy value from ['createdtime', 'modifiedtime']") + /** + * Please choose OrderBy value from ['createdtime', 'modifiedtime'] + */ @query("$orderBy") $orderBy?: string; - @doc(""" -Top count of results, top count cannot be greater than the page size. + /** +* Top count of results, top count cannot be greater than the page size. If topCount > page size, results with be default page size count will be returned -""") +*/ @query("$top") $top?: int32; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + /** + * Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + */ @query("$tags") $tags?: string; - @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + /** + * [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; - @doc("data stage") + /** + * data stage + */ @query("stage") stage?: string; }, ResourceListResult >; + /** + * Delete version. + */ @summary("Delete version.") - @doc("Delete version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name.") + /** + * Container name. + */ @path name: string; - @doc("Version identifier.") + /** + * Version identifier. + */ @path version: string; }, void >; + /** + * Get version. + */ @summary("Get version.") - @doc("Get version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name.") + /** + * Container name. + */ @path name: string; - @doc("Version identifier.") + /** + * Version identifier. + */ @path version: string; }, DataVersionBaseResource >; + /** + * Create or update version. + */ @summary("Create or update version.") - @doc("Create or update version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name.") + /** + * Container name. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path name: string; - @doc("Version identifier.") + /** + * Version identifier. + */ @path version: string; - @doc("Version entity to create or update.") + /** + * Version entity to create or update. + */ @body body: DataVersionBaseResource; }, @@ -978,125 +1322,169 @@ Top count of results, top count cannot be greater than the page size. } interface EnvironmentContainersOperations { + /** + * List environment containers. + */ @summary("List environment containers.") - @doc("List environment containers.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("View type for including/excluding (for example) archived entities.") + /** + * View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; }, ResourceListResult >; + /** + * Delete container. + */ @summary("Delete container.") - @doc("Delete container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path name: string; }, void >; + /** + * Get container. + */ @summary("Get container.") - @doc("Get container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path name: string; }, EnvironmentContainerResource >; + /** + * Create or update container. + */ @summary("Create or update container.") - @doc("Create or update container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path name: string; - @doc("Container entity to create or update.") + /** + * Container entity to create or update. + */ @body body: EnvironmentContainerResource; }, @@ -1105,153 +1493,211 @@ interface EnvironmentContainersOperations { } interface EnvironmentVersionsOperations { + /** + * List versions. + */ @summary("List versions.") - @doc("List versions.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path name: string; - @doc("Ordering of list.") + /** + * Ordering of list. + */ @query("$orderBy") $orderBy?: string; - @doc("Maximum number of records to return.") + /** + * Maximum number of records to return. + */ @query("$top") $top?: int32; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("View type for including/excluding (for example) archived entities.") + /** + * View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; - @doc("Stage for including/excluding (for example) archived entities. Takes priority over listViewType") + /** + * Stage for including/excluding (for example) archived entities. Takes priority over listViewType + */ @query("stage") stage?: string; }, ResourceListResult >; + /** + * Delete version. + */ @summary("Delete version.") - @doc("Delete version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path name: string; - @doc("Version identifier. This is case-sensitive.") + /** + * Version identifier. This is case-sensitive. + */ @path version: string; }, void >; + /** + * Get version. + */ @summary("Get version.") - @doc("Get version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path name: string; - @doc("Version identifier. This is case-sensitive.") + /** + * Version identifier. This is case-sensitive. + */ @path version: string; }, EnvironmentVersionResource >; + /** + * Creates or updates an EnvironmentVersion. + */ @summary("Creates or updates an EnvironmentVersion.") - @doc("Creates or updates an EnvironmentVersion.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Name of EnvironmentVersion. This is case-sensitive.") + /** + * Name of EnvironmentVersion. This is case-sensitive. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path name: string; - @doc("Version of EnvironmentVersion.") + /** + * Version of EnvironmentVersion. + */ @path version: string; - @doc("Definition of EnvironmentVersion.") + /** + * Definition of EnvironmentVersion. + */ @body body: EnvironmentVersionResource; }, @@ -1260,129 +1706,175 @@ interface EnvironmentVersionsOperations { } interface ModelContainersOperations { + /** + * List model containers. + */ @summary("List model containers.") - @doc("List model containers.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Maximum number of results to return.") + /** + * Maximum number of results to return. + */ @query("count") count?: int32; - @doc("View type for including/excluding (for example) archived entities.") + /** + * View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; }, ResourceListResult >; + /** + * Delete container. + */ @summary("Delete container.") - @doc("Delete container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path name: string; }, void >; + /** + * Get container. + */ @summary("Get container.") - @doc("Get container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path name: string; }, ModelContainerResource >; + /** + * Create or update container. + */ @summary("Create or update container.") - @doc("Create or update container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path name: string; - @doc("Container entity to create or update.") + /** + * Container entity to create or update. + */ @body body: ModelContainerResource; }, @@ -1391,215 +1883,299 @@ interface ModelContainersOperations { } interface ModelVersionsOperations { + /** + * List model versions. + */ @summary("List model versions.") - @doc("List model versions.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Model name. This is case-sensitive.") + /** + * Model name. This is case-sensitive. + */ @path name: string; - @doc("Continuation token for pagination.") + /** + * Continuation token for pagination. + */ @query("$skip") $skip?: string; - @doc("Ordering of list.") + /** + * Ordering of list. + */ @query("$orderBy") $orderBy?: string; - @doc("Maximum number of records to return.") + /** + * Maximum number of records to return. + */ @query("$top") $top?: int32; - @doc("Model version.") + /** + * Model version. + */ @query("version") version?: string; - @doc("Model description.") + /** + * Model description. + */ @query("description") description?: string; - @doc("Number of initial results to skip.") + /** + * Number of initial results to skip. + */ @query("offset") offset?: int32; - @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + /** + * Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + */ @query("tags") tags?: string; - @doc("Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2") + /** + * Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2 + */ @query("properties") properties?: string; - @doc("Name of the feed.") + /** + * Name of the feed. + */ @query("feed") feed?: string; - @doc("View type for including/excluding (for example) archived entities.") + /** + * View type for including/excluding (for example) archived entities. + */ @query("listViewType") listViewType?: ListViewType; - @doc("Model stage") + /** + * Model stage + */ @query("stage") stage?: string; }, ResourceListResult >; + /** + * Delete version. + */ @summary("Delete version.") - @doc("Delete version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path name: string; - @doc("Version identifier. This is case-sensitive.") + /** + * Version identifier. This is case-sensitive. + */ @path version: string; }, void >; + /** + * Get version. + */ @summary("Get version.") - @doc("Get version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @path name: string; - @doc("Version identifier. This is case-sensitive.") + /** + * Version identifier. This is case-sensitive. + */ @path version: string; }, ModelVersionResource >; + /** + * Create or update version. + */ @summary("Create or update version.") - @doc("Create or update version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path name: string; - @doc("Version identifier. This is case-sensitive.") + /** + * Version identifier. This is case-sensitive. + */ @path version: string; - @doc("Version entity to create or update.") + /** + * Version entity to create or update. + */ @body body: ModelVersionResource; }, ModelVersionResource >; + /** + * Model Version Package operation. + */ @summary("Model Version Package operation.") - @doc("Model Version Package operation.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/package") @post - Package is Azure.Core.Foundations.Operation< + package is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The name of the resource group. The name is case insensitive.") + /** + * The name of the resource group. The name is case insensitive. + */ @maxLength(90) @minLength(1) @path resourceGroupName: string; - @doc("Name of Azure Machine Learning workspace.") + /** + * Name of Azure Machine Learning workspace. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") @path workspaceName: string; - @doc("Container name. This is case-sensitive.") + /** + * Container name. This is case-sensitive. + */ @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") @path name: string; - @doc("Version identifier. This is case-sensitive.") + /** + * Version identifier. This is case-sensitive. + */ @path version: string; - @doc("Package operation request body.") + /** + * Package operation request body. + */ @body body: PackageRequest; }, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml index 691f3c1b0c..2faa332586 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml @@ -2,6 +2,7 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp index 1c93686250..16627aac36 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp @@ -11,9 +11,13 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.NetworkAnalytics; -@doc("The data product resource.") +/** + * The data product resource. + */ model DataProduct is TrackedResource { - @doc("The data product resource name") + /** + * The data product resource name + */ @maxLength(63) @minLength(3) @pattern("^[a-z][a-z0-9]*$") @@ -27,17 +31,24 @@ model DataProduct is TrackedResource { @armResourceOperations interface DataProducts { - @doc("Retrieve data product resource.") + /** + * Retrieve data product resource. + */ get is ArmResourceRead; - @doc("Create data product resource.") - create is ArmResourceCreateOrUpdateAsync< + /** + * Create data product resource. + */ + create is ArmResourceCreateOrReplaceAsync< DataProduct, BaseParameters, ArmAsyncOperationHeader >; - @doc("Update data product resource.") + /** + * Update data product resource. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync< DataProduct, DataProductUpdate, @@ -45,46 +56,64 @@ interface DataProducts { ArmLroLocationHeader >; - @doc("Delete data product resource.") + /** + * Delete data product resource. + */ delete is ArmResourceDeleteWithoutOkAsync< DataProduct, BaseParameters, ArmLroLocationHeader >; - @doc("List data products by resource group.") + /** + * List data products by resource group. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DataProducts_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; - @doc("List data products by subscription.") + /** + * List data products by subscription. + */ listBySubscription is ArmListBySubscription; - @doc("Assign role to the data product.") + /** + * Assign role to the data product. + */ addUserRole is ArmResourceActionSync< DataProduct, RoleAssignmentCommonProperties, RoleAssignmentDetail >; - @doc("Generate sas token for storage account.") + /** + * Generate sas token for storage account. + */ generateStorageAccountSasToken is ArmResourceActionSync< DataProduct, AccountSas, AccountSasToken >; - @doc("List user roles associated with the data product.") + /** + * List user roles associated with the data product. + */ listRolesAssignments is ArmResourceActionSync< DataProduct, - Record, + AnyObject, ListRoleAssignments >; - @doc("Remove role from the data product.") + /** + * Remove role from the data product. + */ removeUserRole is ArmResourceActionNoContentSync< DataProduct, RoleAssignmentDetail >; - @doc("Initiate key rotation on Data Product.") + /** + * Initiate key rotation on Data Product. + */ rotateKey is ArmResourceActionNoContentSync; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp index 7759d93cbb..cc48526f46 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp @@ -11,7 +11,9 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.NetworkAnalytics; -@doc("The data catalog resource.") +/** + * The data catalog resource. + */ @singleton("default") model DataProductsCatalog is ProxyResource { @key("dataProductsCatalog") @@ -21,12 +23,20 @@ model DataProductsCatalog is ProxyResource { @armResourceOperations interface DataProductsCatalogs { - @doc("Retrieve data type resource.") + /** + * Retrieve data type resource. + */ get is ArmResourceRead; - @doc("List data catalog by subscription.") + /** + * List data catalog by subscription. + */ listBySubscription is ArmListBySubscription; - @doc("List data catalog by resource group.") + /** + * List data catalog by resource group. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DataProductsCatalogs_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp index a861e80f76..b783d56981 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.NetworkAnalytics; -@doc("The data type resource.") +/** + * The data type resource. + */ @parentResource(DataProduct) model DataType is ProxyResource { - @doc("The data type name.") + /** + * The data type name. + */ @maxLength(63) @minLength(3) @pattern("^[a-z][a-z0-9-]*$") @@ -27,17 +31,24 @@ model DataType is ProxyResource { @armResourceOperations interface DataTypes { - @doc("Retrieve data type resource.") + /** + * Retrieve data type resource. + */ get is ArmResourceRead; - @doc("Create data type resource.") - create is ArmResourceCreateOrUpdateAsync< + /** + * Create data type resource. + */ + create is ArmResourceCreateOrReplaceAsync< DataType, BaseParameters, ArmAsyncOperationHeader >; - @doc("Update data type resource.") + /** + * Update data type resource. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync< DataType, DataTypeUpdate, @@ -45,25 +56,35 @@ interface DataTypes { ArmLroLocationHeader >; - @doc("Delete data type resource.") + /** + * Delete data type resource. + */ delete is ArmResourceDeleteWithoutOkAsync< DataType, BaseParameters, ArmLroLocationHeader >; - @doc("List data type by parent resource.") + /** + * List data type by parent resource. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DataTypes_ListByDataProduct") listByDataProduct is ArmResourceListByParent; - @doc("Delete data for data type.") + /** + * Delete data for data type. + */ deleteData is ArmResourceActionNoResponseContentAsync< DataType, - Record, + AnyObject, BaseParameters, ArmLroLocationHeader >; - @doc("Generate sas token for storage container.") + /** + * Generate sas token for storage container. + */ generateStorageContainerSasToken is ArmResourceActionSync< DataType, ContainerSaS, diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_MaximumSet_Gen.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGen.json rename to packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_MaximumSet_Gen.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp index 0d5a7bfb66..0a606533f5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp @@ -13,19 +13,25 @@ using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; +/** + * // FIXME: (missing-service-description) Add service description + */ @armProviderNamespace @service({ title: "Azure Network Analytics resource management API.", }) @versioned(Versions) @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) -@doc("// FIXME: (miissing-service-description) Add service description") namespace Microsoft.NetworkAnalytics; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { + /** + * The 2023-11-15 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2023-11-15 API version.") v2023_11_15: "2023-11-15", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp index 000b481277..fde1643142 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp @@ -11,42 +11,79 @@ namespace Microsoft.NetworkAnalytics; interface Operations extends Azure.ResourceManager.Operations {} -@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") -enum Origin { - user, - system, - `user,system`, -} - -@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") -enum ActionType { - Internal, -} - -@doc("The status of the current operation.") +/** + * The status of the current operation. + */ enum ProvisioningState { - @doc("Represents a succeeded operation.") Succeeded, - @doc("Represents a failed operation.") Failed, - @doc("Represents a canceled operation.") Canceled, - @doc("Represents a pending operation.") Provisioning, - @doc("Represents a pending operation.") Updating, - @doc("Represents an operation under deletion.") Deleting, - @doc("Represents an accepted operation.") Accepted, -} - -@doc("The data type state") + /** + * Represents a succeeded operation. + */ + Succeeded, + + /** + * Represents a failed operation. + */ + Failed, + + /** + * Represents a canceled operation. + */ + Canceled, + + /** + * Represents a pending operation. + */ + Provisioning, + + /** + * Represents a pending operation. + */ + Updating, + + /** + * Represents an operation under deletion. + */ + Deleting, + + /** + * Represents an accepted operation. + */ + Accepted, +} + +/** + * The data type state + */ enum ControlState { - @doc("Field to enable a setting.") Enabled, - @doc("Field to disable a setting.") Disabled, + /** + * Field to enable a setting. + */ + Enabled, + + /** + * Field to disable a setting. + */ + Disabled, } -@doc("Specifies the default action of allow or deny when no other rules match.") +/** + * Specifies the default action of allow or deny when no other rules match. + */ enum DefaultAction { - @doc("Represents allow action.") Allow, - @doc("Represents deny action.") Deny, + /** + * Represents allow action. + */ + Allow, + + /** + * Represents deny action. + */ + Deny, } -@doc("Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).") +/** + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + */ enum ManagedServiceIdentityType { None, SystemAssigned, @@ -54,185 +91,295 @@ enum ManagedServiceIdentityType { `SystemAssigned, UserAssigned`, } -@doc("The type of identity that created the resource.") -enum CreatedByType { - User, - Application, - ManagedIdentity, - Key, -} - -@doc("The data type state") +/** + * The data type state + */ enum DataProductUserRole { - @doc("Field to specify user of type Reader.") Reader, - @doc(""" -Field to specify user of type SensitiveReader. + /** + * Field to specify user of type Reader. + */ + Reader, + + /** +* Field to specify user of type SensitiveReader. This user has privileged access to read sensitive data of a data product. -""") +*/ SensitiveReader, } -@doc("The data type state") +/** + * The data type state + */ enum DataTypeState { - @doc("Field to specify stopped state.") Stopped, - @doc("Field to specify running state.") Running, + /** + * Field to specify stopped state. + */ + Stopped, + + /** + * Field to specify running state. + */ + Running, } -@doc("Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, \"Logging, Metrics\"), or None to bypass none of those traffics.") +/** + * Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics. + */ enum Bypass { - @doc("Represents no bypassing of traffic.") None, - @doc("Represents bypassing logging traffic.") Logging, - @doc("Represents bypassing metrics traffic.") Metrics, - @doc("Represents bypassing azure services traffic.") AzureServices, + /** + * Represents no bypassing of traffic. + */ + None, + + /** + * Represents bypassing logging traffic. + */ + Logging, + + /** + * Represents bypassing metrics traffic. + */ + Metrics, + + /** + * Represents bypassing azure services traffic. + */ + AzureServices, } -@doc("The data product properties.") +/** + * The data product properties. + */ model DataProductProperties { - @doc("The resource GUID property of the data product resource.") + /** + * The resource GUID property of the data product resource. + */ @visibility("read") resourceGuid?: string; - @doc("Latest provisioning state of data product.") + /** + * Latest provisioning state of data product. + */ @visibility("read") provisioningState?: ProvisioningState; - @doc("Data product publisher name.") + /** + * Data product publisher name. + */ @visibility("read", "create") publisher: string; - @doc("Product name of data product.") + /** + * Product name of data product. + */ @visibility("read", "create") product: string; - @doc("Major version of data product.") + /** + * Major version of data product. + */ @visibility("read", "create") majorVersion: string; - @doc("List of name or email associated with data product resource deployment.") + /** + * List of name or email associated with data product resource deployment. + */ @visibility("read", "create", "update") owners?: string[]; - @doc("Flag to enable or disable redundancy for data product.") + /** + * Flag to enable or disable redundancy for data product. + */ @visibility("read", "create") redundancy?: ControlState; - @doc("Purview account url for data product to connect to.") + /** + * Purview account url for data product to connect to. + */ @visibility("read", "create", "update") purviewAccount?: string; - @doc("Purview collection url for data product to connect to.") + /** + * Purview collection url for data product to connect to. + */ @visibility("read", "create", "update") purviewCollection?: string; - @doc("Flag to enable or disable private link for data product resource.") + /** + * Flag to enable or disable private link for data product resource. + */ @visibility("read", "create", "update") privateLinksEnabled?: ControlState; - @doc("Flag to enable or disable public access of data product resource.") + /** + * Flag to enable or disable public access of data product resource. + */ @visibility("read", "create") publicNetworkAccess?: ControlState; - @doc("Flag to enable customer managed key encryption for data product.") + /** + * Flag to enable customer managed key encryption for data product. + */ @visibility("read", "create") customerManagedKeyEncryptionEnabled?: ControlState; - @doc("Customer managed encryption key details for data product.") + /** + * Customer managed encryption key details for data product. + */ @visibility("read", "create") customerEncryptionKey?: EncryptionKeyDetails; - @doc("Network rule set for data product.") + /** + * Network rule set for data product. + */ @visibility("read", "create") networkacls?: DataProductNetworkAcls; - @doc("Managed resource group configuration.") + /** + * Managed resource group configuration. + */ @visibility("create") managedResourceGroupConfiguration?: ManagedResourceGroupConfiguration; - @doc("List of available minor versions of the data product resource.") + /** + * List of available minor versions of the data product resource. + */ @visibility("read") availableMinorVersions?: string[]; - @doc("Current configured minor version of the data product resource.") + /** + * Current configured minor version of the data product resource. + */ @visibility("read", "update") currentMinorVersion?: string; - @doc("Documentation link for the data product based on definition file.") + /** + * Documentation link for the data product based on definition file. + */ @visibility("read") documentation?: string; - @doc("Resource links which exposed to the customer to query the data.") + /** + * Resource links which exposed to the customer to query the data. + */ @visibility("read") consumptionEndpoints?: ConsumptionEndpointsProperties; - @doc("Key vault url.") + /** + * Key vault url. + */ @visibility("read") keyVaultUrl?: string; } -@doc("Encryption key details.") +/** + * Encryption key details. + */ model EncryptionKeyDetails { - @doc("The Uri of the key vault.") + /** + * The Uri of the key vault. + */ keyVaultUri: string; - @doc("The name of the key vault key.") + /** + * The name of the key vault key. + */ keyName: string; - @doc("The version of the key vault key.") + /** + * The version of the key vault key. + */ keyVersion: string; } -@doc("Data Product Network rule set") +/** + * Data Product Network rule set + */ model DataProductNetworkAcls { - @doc("Virtual Network Rule") + /** + * Virtual Network Rule + */ virtualNetworkRule: VirtualNetworkRule[]; - @doc("IP rule with specific IP or IP range in CIDR format.") + /** + * IP rule with specific IP or IP range in CIDR format. + */ ipRules: IPRules[]; - @doc("The list of query ips in the format of CIDR allowed to connect to query/visualization endpoint.") + /** + * The list of query ips in the format of CIDR allowed to connect to query/visualization endpoint. + */ allowedQueryIpRangeList: string[]; - @doc("Default Action") + /** + * Default Action + */ defaultAction: DefaultAction; } -@doc("Virtual Network Rule") +/** + * Virtual Network Rule + */ model VirtualNetworkRule { - @doc("Resource ID of a subnet") + /** + * Resource ID of a subnet + */ id: string; - @doc("The action of virtual network rule.") + /** + * The action of virtual network rule. + */ action?: string; - @doc("Gets the state of virtual network rule.") + /** + * Gets the state of virtual network rule. + */ state?: string; } -@doc("IP rule with specific IP or IP range in CIDR format.") +/** + * IP rule with specific IP or IP range in CIDR format. + */ model IPRules { - @doc("IP Rules Value") + /** + * IP Rules Value + */ value?: string; - @doc("The action of virtual network rule.") + /** + * The action of virtual network rule. + */ action: string; } -@doc("ManagedResourceGroup related properties") +/** + * ManagedResourceGroup related properties + */ model ManagedResourceGroupConfiguration { - @doc("Name of managed resource group") + /** + * Name of managed resource group + */ name: string; - @doc("Managed Resource Group location") + /** + * Managed Resource Group location + */ location: string; } -@doc("Details of Consumption Properties") +/** + * Details of Consumption Properties + */ model ConsumptionEndpointsProperties { - @doc("Ingestion url to upload the data.") + /** + * Ingestion url to upload the data. + */ @visibility("read") ingestionUrl?: string; - @doc("Resource Id of ingestion endpoint.") + /** + * Resource Id of ingestion endpoint. + */ @visibility("read") ingestionResourceId?: ResourceIdentifier<[ { @@ -240,11 +387,15 @@ model ConsumptionEndpointsProperties { } ]>; - @doc("Url to consume file type.") + /** + * Url to consume file type. + */ @visibility("read") fileAccessUrl?: string; - @doc("Resource Id of file access endpoint.") + /** + * Resource Id of file access endpoint. + */ @visibility("read") fileAccessResourceId?: ResourceIdentifier<[ { @@ -252,11 +403,15 @@ model ConsumptionEndpointsProperties { } ]>; - @doc("Url to consume the processed data.") + /** + * Url to consume the processed data. + */ @visibility("read") queryUrl?: string; - @doc("Resource Id of query endpoint.") + /** + * Resource Id of query endpoint. + */ @visibility("read") queryResourceId?: ResourceIdentifier<[ { @@ -265,260 +420,414 @@ model ConsumptionEndpointsProperties { ]>; } -@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + */ model Resource { - @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + */ @visibility("read") id?: string; - @doc("The name of the resource") + /** + * The name of the resource + */ @visibility("read") name?: string; - @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + */ @visibility("read") type?: string; - @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ @visibility("read") systemData?: SystemData; } -@doc("Details for data catalog properties.") +/** + * Details for data catalog properties. + */ model DataProductsCatalogProperties { - @doc("The data catalog provisioning state.") + /** + * The data catalog provisioning state. + */ @visibility("read") provisioningState?: ProvisioningState; - @doc("The data product publisher information.") + /** + * The data product publisher information. + */ publishers: PublisherInformation[]; } -@doc("Details for Publisher Information.") +/** + * Details for Publisher Information. + */ model PublisherInformation { - @doc("Name of the publisher.") + /** + * Name of the publisher. + */ publisherName: string; - @doc("Data product information.") + /** + * Data product information. + */ dataProducts: DataProductInformation[]; } -@doc("Data Product Information") +/** + * Data Product Information + */ model DataProductInformation { - @doc("Name of data product.") + /** + * Name of data product. + */ dataProductName: string; - @doc("Description about data product.") + /** + * Description about data product. + */ description: string; - @doc("Version information of data product.") + /** + * Version information of data product. + */ dataProductVersions: DataProductVersion[]; } -@doc("Data Product Version.") +/** + * Data Product Version. + */ model DataProductVersion { - @doc("Version of data product") + /** + * Version of data product + */ version: string; } -@doc("The type used for update operations of the DataProduct.") +/** + * The type used for update operations of the DataProduct. + */ model DataProductUpdate { - @doc("The managed service identities assigned to this resource.") + /** + * The managed service identities assigned to this resource. + */ identity?: ManagedServiceIdentity; - @doc("Resource tags.") + /** + * Resource tags. + */ tags?: Record; - @doc("The updatable properties of the DataProduct.") + /** + * The updatable properties of the DataProduct. + */ properties?: DataProductUpdateProperties; } -@doc("The updatable properties of the DataProduct.") +/** + * The updatable properties of the DataProduct. + */ model DataProductUpdateProperties { - @doc("List of name or email associated with data product resource deployment.") + /** + * List of name or email associated with data product resource deployment. + */ @visibility("read", "create", "update") owners?: string[]; - @doc("Purview account url for data product to connect to.") + /** + * Purview account url for data product to connect to. + */ @visibility("read", "create", "update") purviewAccount?: string; - @doc("Purview collection url for data product to connect to.") + /** + * Purview collection url for data product to connect to. + */ @visibility("read", "create", "update") purviewCollection?: string; - @doc("Flag to enable or disable private link for data product resource.") + /** + * Flag to enable or disable private link for data product resource. + */ @visibility("read", "create", "update") privateLinksEnabled?: ControlState; - @doc("Current configured minor version of the data product resource.") + /** + * Current configured minor version of the data product resource. + */ @visibility("read", "update") currentMinorVersion?: string; } -@doc("The details for role assignment common properties.") +/** + * The details for role assignment common properties. + */ model RoleAssignmentCommonProperties { - @doc("Role Id of the Built-In Role") + /** + * Role Id of the Built-In Role + */ roleId: string; - @doc("Object ID of the AAD principal or security-group.") + /** + * Object ID of the AAD principal or security-group. + */ principalId: string; - @doc("User name.") + /** + * User name. + */ userName: string; - @doc("Data Type Scope at which the role assignment is created.") + /** + * Data Type Scope at which the role assignment is created. + */ dataTypeScope: string[]; - @doc("Type of the principal Id: User, Group or ServicePrincipal") + /** + * Type of the principal Id: User, Group or ServicePrincipal + */ principalType: string; - @doc("Data Product role to be assigned to a user.") + /** + * Data Product role to be assigned to a user. + */ role: DataProductUserRole; } -@doc("The details for role assignment response.") +/** + * The details for role assignment response. + */ model RoleAssignmentDetail { - @doc("Role Id of the Built-In Role") + /** + * Role Id of the Built-In Role + */ roleId: string; - @doc("Object ID of the AAD principal or security-group.") + /** + * Object ID of the AAD principal or security-group. + */ principalId: string; - @doc("User name.") + /** + * User name. + */ userName: string; - @doc("Data Type Scope at which the role assignment is created.") + /** + * Data Type Scope at which the role assignment is created. + */ dataTypeScope: string[]; - @doc("Type of the principal Id: User, Group or ServicePrincipal") + /** + * Type of the principal Id: User, Group or ServicePrincipal + */ principalType: string; - @doc("Data Product role to be assigned to a user.") + /** + * Data Product role to be assigned to a user. + */ role: DataProductUserRole; - @doc("Id of role assignment request") + /** + * Id of role assignment request + */ roleAssignmentId: string; } -@doc("The data type properties") +/** + * The data type properties + */ model DataTypeProperties { - @doc("Latest provisioning state of data product.") + /** + * Latest provisioning state of data product. + */ @visibility("read") provisioningState?: ProvisioningState; - @doc("State of data type.") + /** + * State of data type. + */ @visibility("read", "create", "update") state?: DataTypeState; - @doc("Reason for the state of data type.") + /** + * Reason for the state of data type. + */ @visibility("read") stateReason?: string; - @doc("Field for storage output retention in days.") + /** + * Field for storage output retention in days. + */ @visibility("read", "create", "update") storageOutputRetention?: int32; - @doc("Field for database cache retention in days.") + /** + * Field for database cache retention in days. + */ @visibility("read", "create", "update") databaseCacheRetention?: int32; - @doc("Field for database data retention in days.") + /** + * Field for database data retention in days. + */ @visibility("read", "create", "update") databaseRetention?: int32; - @doc("Url for data visualization.") + /** + * Url for data visualization. + */ @visibility("read") visualizationUrl?: string; } -@doc("The type used for update operations of the DataType.") +/** + * The type used for update operations of the DataType. + */ model DataTypeUpdate { - @doc("The updatable properties of the DataType.") + /** + * The updatable properties of the DataType. + */ properties?: DataTypeUpdateProperties; } -@doc("The updatable properties of the DataType.") +/** + * The updatable properties of the DataType. + */ model DataTypeUpdateProperties { - @doc("State of data type.") + /** + * State of data type. + */ @visibility("read", "create", "update") state?: DataTypeState; - @doc("Field for storage output retention in days.") + /** + * Field for storage output retention in days. + */ @visibility("read", "create", "update") storageOutputRetention?: int32; - @doc("Field for database cache retention in days.") + /** + * Field for database cache retention in days. + */ @visibility("read", "create", "update") databaseCacheRetention?: int32; - @doc("Field for database data retention in days.") + /** + * Field for database data retention in days. + */ @visibility("read", "create", "update") databaseRetention?: int32; } -@doc("The details for container sas creation.") +/** + * The details for container sas creation. + */ model ContainerSaS { - @doc("Sas token start timestamp.") + /** + * Sas token start timestamp. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTimeStamp: utcDateTime; - @doc("Sas token expiry timestamp.") + /** + * Sas token expiry timestamp. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expiryTimeStamp: utcDateTime; - @doc("Ip Address") + /** + * Ip Address + */ ipAddress: string; } -@doc("Details of storage container account sas token .") +/** + * Details of storage container account sas token . + */ model ContainerSasToken { - @doc("Field to specify storage container sas token.") + /** + * Field to specify storage container sas token. + */ @secret storageContainerSasToken: string; } -@doc("The details for storage account sas creation.") +/** + * The details for storage account sas creation. + */ model AccountSas { - @doc("Sas token start timestamp.") + /** + * Sas token start timestamp. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTimeStamp: utcDateTime; - @doc("Sas token expiry timestamp.") + /** + * Sas token expiry timestamp. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expiryTimeStamp: utcDateTime; - @doc("Ip Address") + /** + * Ip Address + */ ipAddress: string; } -@doc("Details of storage account sas token .") +/** + * Details of storage account sas token . + */ model AccountSasToken { - @doc("Field to specify storage account sas token.") + /** + * Field to specify storage account sas token. + */ @secret storageAccountSasToken: string; } -@doc("list role assignments.") +/** + * list role assignments. + */ model ListRoleAssignments { - @doc("Count of role assignments.") + /** + * Count of role assignments. + */ count: int32; - @doc("list of role assignments") + /** + * list of role assignments + */ roleAssignmentResponse: RoleAssignmentDetail[]; } -@doc("Details for KeyVault.") +/** + * Details for KeyVault. + */ model KeyVaultInfo { - @doc("key vault url.") + /** + * key vault url. + */ keyVaultUrl: string; } -@doc("Resource Access Rules.") +/** + * Resource Access Rules. + */ model ResourceAccessRules { - @doc("The tenant ID of resource.") + /** + * The tenant ID of resource. + */ tenantId: string; - @doc("Resource ID") + /** + * Resource ID + */ resourceId: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/tspconfig.yaml index e8d224c8f5..7ac4d86139 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/tspconfig.yaml @@ -2,6 +2,7 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/networkanalytics.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp index 11f78c415a..f13ad0a83b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp @@ -11,9 +11,13 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.AzurePlaywrightService; -@doc("An account resource") +/** + * An account resource + */ model Account is TrackedResource { - @doc("Name of account") + /** + * Name of account + */ @maxLength(64) @minLength(3) @pattern("^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$") @@ -25,29 +29,44 @@ model Account is TrackedResource { @armResourceOperations interface Accounts { - @doc("Get a Account") + /** + * Get a Account + */ get is ArmResourceRead; - @doc("Create a Account") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + /** + * Create a Account + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync< Account, BaseParameters, ArmAsyncOperationHeader >; - @doc("Update a Account") + /** + * Update a Account + */ + @parameterVisibility("read") update is ArmCustomPatchSync; - @doc("Delete a Account") + /** + * Delete a Account + */ delete is ArmResourceDeleteAsync< Account, BaseParameters, ArmLroLocationHeader >; - @doc("List Account resources by resource group") + /** + * List Account resources by resource group + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Accounts_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; - @doc("List Account resources by subscription ID") + /** + * List Account resources by subscription ID + */ listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp index 8f28cf8d23..d669c542c7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.AzurePlaywrightService; -@doc("A quota resource") +/** + * A quota resource + */ @locationResource model Quota is ProxyResource { - @doc("The quota name.") + /** + * The quota name. + */ @path @key("name") @segment("quotas") @@ -23,9 +27,15 @@ model Quota is ProxyResource { @armResourceOperations interface Quotas { - @doc("Get quota by name.") + /** + * Get quota by name. + */ get is ArmResourceRead; - @doc("List quotas for a given subscription Id.") + /** + * List quotas for a given subscription Id. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Quotas_ListBySubscription") listBySubscription is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp index 5104445bb5..d252d4f616 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp @@ -12,19 +12,25 @@ using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; +/** + * Azure Playwright testing management service + */ @armProviderNamespace @service({ title: "Microsoft AzurePlaywrightService Management API", }) @versioned(Versions) @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) -@doc("Azure Playwright testing management service") namespace Microsoft.AzurePlaywrightService; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { + /** + * The 2023-10-01-preview API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2023-10-01-preview API version.") v2023_10_01_preview: "2023-10-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp index bfbc6f61e5..ee87843950 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp @@ -11,152 +11,231 @@ namespace Microsoft.AzurePlaywrightService; interface Operations extends Azure.ResourceManager.Operations {} -@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") -enum Origin { - user, - system, - `user,system`, -} - -@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") -enum ActionType { - Internal, -} - -@doc("The enablement status of a feature.") +/** + * The enablement status of a feature. + */ enum EnablementStatus { - @doc("The feature is Enabled.") Enabled, - @doc("The feature is Disabled.") Disabled, + /** + * The feature is Enabled. + */ + Enabled, + + /** + * The feature is Disabled. + */ + Disabled, } -@doc("The status of the current operation.") +/** + * The status of the current operation. + */ enum ProvisioningState { - @doc("Resource has been created.") Succeeded, - @doc("Resource creation failed.") Failed, - @doc("Resource creation was canceled.") Canceled, - @doc("Deletion in progress") Deleting, - @doc("Change accepted for processing") Accepted, -} - -@doc("The type of identity that created the resource.") -enum CreatedByType { - User, - Application, - ManagedIdentity, - Key, + /** + * Resource has been created. + */ + Succeeded, + + /** + * Resource creation failed. + */ + Failed, + + /** + * Resource creation was canceled. + */ + Canceled, + + /** + * Deletion in progress + */ + Deleting, + + /** + * Change accepted for processing + */ + Accepted, } -@doc("The free-trial state.") +/** + * The free-trial state. + */ enum FreeTrialState { - @doc("The free-trial is Active.") Active, - @doc("The free-trial is Expired.") Expired, + /** + * The free-trial is Active. + */ + Active, + + /** + * The free-trial is Expired. + */ + Expired, } enum QuotaNames { - @doc("The quota details for scalable execution feature. When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.") + /** + * The quota details for scalable execution feature. When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. + */ ScalableExecution, } -@doc("Account properties") +/** + * Account properties + */ model AccountProperties { - @doc("The Playwright testing dashboard URI for the account resource.") + /** + * The Playwright testing dashboard URI for the account resource. + */ @visibility("read") - dashboardUri?: string; + dashboardUri?: url; - @doc("This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created.") + /** + * This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. + */ regionalAffinity?: EnablementStatus; - @doc("When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.") + /** + * When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. + */ scalableExecution?: EnablementStatus; - @doc("When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting.") + /** + * When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + */ reporting?: EnablementStatus; - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; } -@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + */ model Resource { - @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + */ @visibility("read") id?: string; - @doc("The name of the resource") + /** + * The name of the resource + */ @visibility("read") name?: string; - @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + */ @visibility("read") type?: string; - @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ @visibility("read") systemData?: SystemData; } -@doc("Quota properties") +/** + * Quota properties + */ model QuotaProperties { - @doc("The free-trial quota.") + /** + * The free-trial quota. + */ freeTrial?: FreeTrialProperties; - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; } -@doc("The free-trial properties") +/** + * The free-trial properties + */ model FreeTrialProperties { - @doc("The playwright account id.") + /** + * The playwright account id. + */ @visibility("read") accountId: string; - @doc("The free-trial createdAt utcDateTime.") + /** + * The free-trial createdAt utcDateTime. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdAt: utcDateTime; - @doc("The free-trial expiryAt utcDateTime.") + /** + * The free-trial expiryAt utcDateTime. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expiryAt: utcDateTime; - @doc("The free-trial allocated limit value eg. allocated free minutes.") + /** + * The free-trial allocated limit value eg. allocated free minutes. + */ @visibility("read") allocatedValue: int32; - @doc("The free-trial used value eg. used free minutes.") + /** + * The free-trial used value eg. used free minutes. + */ @visibility("read") usedValue: int32; - @doc("The free-trial percentage used.") + /** + * The free-trial percentage used. + */ @visibility("read") @maxValue(100) - percentageUsed: float32; + percentageUsed: decimal; - @doc("The free-trial state.") + /** + * The free-trial state. + */ @visibility("read") state: FreeTrialState; } -@doc("The type used for update operations of the Account.") +/** + * The type used for update operations of the Account. + */ model AccountUpdate { - @doc("Resource tags.") + /** + * Resource tags. + */ tags?: Record; - @doc("The updatable properties of the Account.") + /** + * The updatable properties of the Account. + */ properties?: AccountUpdateProperties; } -@doc("The updatable properties of the Account.") +/** + * The updatable properties of the Account. + */ model AccountUpdateProperties { - @doc("This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created.") + /** + * This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. + */ regionalAffinity?: EnablementStatus; - @doc("When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.") + /** + * When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. + */ scalableExecution?: EnablementStatus; - @doc("When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting.") + /** + * When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + */ reporting?: EnablementStatus; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/tspconfig.yaml index d9531cebe6..cefe198588 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/tspconfig.yaml @@ -2,6 +2,7 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/playwrighttesting.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp index 86bea2ae80..467da2f313 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.ServiceNetworking; -@doc("Association Subresource of Traffic Controller") +/** + * Association Subresource of Traffic Controller + */ @parentResource(TrafficController) model Association is TrackedResource { - @doc("Name of Association") + /** + * Name of Association + */ @pattern("^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$") @path @key("associationName") @@ -25,27 +29,36 @@ model Association is TrackedResource { @armResourceOperations interface Associations { + /** + * Get a Association + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get a Association") @operationId("AssociationsInterface_Get") get is ArmResourceRead; + /** + * Create a Association + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create a Association") @operationId("AssociationsInterface_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< Association, BaseParameters, ArmAsyncOperationHeader >; + /** + * Update a Association + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update a Association") + @parameterVisibility("read") @operationId("AssociationsInterface_Update") update is ArmCustomPatchSync; + /** + * Delete a Association + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete a Association") @operationId("AssociationsInterface_Delete") delete is ArmResourceDeleteAsync< Association, @@ -53,8 +66,10 @@ interface Associations { ArmLroLocationHeader >; + /** + * List Association resources by TrafficController + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List Association resources by TrafficController") @operationId("AssociationsInterface_ListByTrafficController") listByTrafficController is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp index 24461bd64c..8056e47c02 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.ServiceNetworking; -@doc("Frontend Subresource of Traffic Controller.") +/** + * Frontend Subresource of Traffic Controller. + */ @parentResource(TrafficController) model Frontend is TrackedResource { - @doc("Frontends") + /** + * Frontends + */ @pattern("^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$") @path @key("frontendName") @@ -25,27 +29,36 @@ model Frontend is TrackedResource { @armResourceOperations interface Frontends { + /** + * Get a Frontend + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get a Frontend") @operationId("FrontendsInterface_Get") get is ArmResourceRead; + /** + * Create a Frontend + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create a Frontend") @operationId("FrontendsInterface_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< Frontend, BaseParameters, ArmAsyncOperationHeader >; + /** + * Update a Frontend + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update a Frontend") + @parameterVisibility("read") @operationId("FrontendsInterface_Update") update is ArmCustomPatchSync; + /** + * Delete a Frontend + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete a Frontend") @operationId("FrontendsInterface_Delete") delete is ArmResourceDeleteAsync< Frontend, @@ -53,8 +66,10 @@ interface Frontends { ArmLroLocationHeader >; + /** + * List Frontend resources by TrafficController + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List Frontend resources by TrafficController") @operationId("FrontendsInterface_ListByTrafficController") listByTrafficController is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp index 2aaf3fdbd4..8256a93ebf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp @@ -11,9 +11,13 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.ServiceNetworking; -@doc("Concrete tracked resource types can be created by aliasing this type using a specific property type.") +/** + * Concrete tracked resource types can be created by aliasing this type using a specific property type. + */ model TrafficController is TrackedResource { - @doc("traffic controller name for path") + /** + * traffic controller name for path + */ @pattern("^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$") @path @key("trafficControllerName") @@ -23,27 +27,36 @@ model TrafficController is TrackedResource { @armResourceOperations interface TrafficControllers { + /** + * Get a TrafficController + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Get a TrafficController") @operationId("TrafficControllerInterface_Get") get is ArmResourceRead; + /** + * Create a TrafficController + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Create a TrafficController") @operationId("TrafficControllerInterface_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + createOrUpdate is ArmResourceCreateOrReplaceAsync< TrafficController, BaseParameters, ArmAsyncOperationHeader >; + /** + * Update a TrafficController + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Update a TrafficController") + @parameterVisibility("read") @operationId("TrafficControllerInterface_Update") update is ArmCustomPatchSync; + /** + * Delete a TrafficController + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Delete a TrafficController") @operationId("TrafficControllerInterface_Delete") delete is ArmResourceDeleteAsync< TrafficController, @@ -51,13 +64,17 @@ interface TrafficControllers { ArmLroLocationHeader >; + /** + * List TrafficController resources by resource group + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List TrafficController resources by resource group") @operationId("TrafficControllerInterface_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; + /** + * List TrafficController resources by subscription ID + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List TrafficController resources by subscription ID") @operationId("TrafficControllerInterface_ListBySubscription") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp index f43a83d3c4..b3c2adf3ed 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp @@ -13,19 +13,25 @@ using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; +/** + * Traffic Controller Provider management API. + */ @armProviderNamespace @service({ title: "Traffic Controller Provider management API.", }) @versioned(Versions) @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) -@doc("Traffic Controller Provider management API.") namespace Microsoft.ServiceNetworking; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { + /** + * The 2023-11-01 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2023-11-01 API version.") v2023_11_01: "2023-11-01", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp index 8e6698a47c..037f9b7441 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp @@ -11,18 +11,6 @@ namespace Microsoft.ServiceNetworking; interface Operations extends Azure.ResourceManager.Operations {} -@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") -enum Origin { - user, - system, - `user,system`, -} - -@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") -enum ActionType { - Internal, -} - enum ProvisioningState { Provisioning, Updating, @@ -33,124 +21,182 @@ enum ProvisioningState { Canceled, } -@doc("The type of identity that created the resource.") -enum CreatedByType { - User, - Application, - ManagedIdentity, - Key, -} - enum AssociationType { subnets, } -@doc("Traffic Controller Properties.") +/** + * Traffic Controller Properties. + */ model TrafficControllerProperties { - @doc("Configuration Endpoints.") + /** + * Configuration Endpoints. + */ @visibility("read") configurationEndpoints?: string[]; - @doc("Frontends References List") + /** + * Frontends References List + */ @visibility("read") frontends?: ResourceId[]; - @doc("Associations References List") + /** + * Associations References List + */ @visibility("read") associations?: ResourceId[]; - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; } -@doc("Resource ID definition used by parent to reference child resources.") +/** + * Resource ID definition used by parent to reference child resources. + */ model ResourceId { - @doc("Resource ID of child resource.") + /** + * Resource ID of child resource. + */ id: string; } -@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + */ model Resource { - @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + */ @visibility("read") id?: string; - @doc("The name of the resource") + /** + * The name of the resource + */ @visibility("read") name?: string; - @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + */ @visibility("read") type?: string; - @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ @visibility("read") systemData?: SystemData; } -@doc("The type used for update operations of the TrafficController.") +/** + * The type used for update operations of the TrafficController. + */ model TrafficControllerUpdate { - @doc("Resource tags.") + /** + * Resource tags. + */ tags?: Record; } -@doc("Association Properties.") +/** + * Association Properties. + */ model AssociationProperties { - @doc("Association Type") + /** + * Association Type + */ associationType: AssociationType; - @doc("Association Subnet") + /** + * Association Subnet + */ subnet?: AssociationSubnet; - @doc("Provisioning State of Traffic Controller Association Resource") + /** + * Provisioning State of Traffic Controller Association Resource + */ @visibility("read") provisioningState?: ProvisioningState; } -@doc("Association Subnet.") +/** + * Association Subnet. + */ model AssociationSubnet { - @doc("Association ID.") + /** + * Association ID. + */ id: string; } -@doc("The type used for update operations of the Association.") +/** + * The type used for update operations of the Association. + */ model AssociationUpdate { - @doc("Resource tags.") + /** + * Resource tags. + */ tags?: Record; - @doc("The updatable properties of the Association.") + /** + * The updatable properties of the Association. + */ properties?: AssociationUpdateProperties; } -@doc("The updatable properties of the Association.") +/** + * The updatable properties of the Association. + */ model AssociationUpdateProperties { - @doc("Association Type") + /** + * Association Type + */ associationType?: AssociationType; - @doc("Association Subnet") + /** + * Association Subnet + */ subnet?: AssociationSubnetUpdate; } -@doc("Association Subnet.") +/** + * Association Subnet. + */ model AssociationSubnetUpdate { - @doc("Association ID.") + /** + * Association ID. + */ id?: string; } -@doc("Frontend Properties.") +/** + * Frontend Properties. + */ model FrontendProperties { - @doc("The Fully Qualified Domain Name of the DNS record associated to a Traffic Controller frontend.") + /** + * The Fully Qualified Domain Name of the DNS record associated to a Traffic Controller frontend. + */ @visibility("read") fqdn?: string; - @doc("Provisioning State of Traffic Controller Frontend Resource") + /** + * Provisioning State of Traffic Controller Frontend Resource + */ @visibility("read") provisioningState?: ProvisioningState; } -@doc("The type used for update operations of the Frontend.") +/** + * The type used for update operations of the Frontend. + */ model FrontendUpdate { - @doc("Resource tags.") + /** + * Resource tags. + */ tags?: Record; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/tspconfig.yaml index 4498bece90..189a9e94c6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/tspconfig.yaml @@ -2,6 +2,7 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/TrafficController.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp index 7e495e9eff..42bc32ae16 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp @@ -11,9 +11,13 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; -@doc("An Azure Sphere catalog") +/** + * An Azure Sphere catalog + */ model Catalog is TrackedResource { - @doc("Name of catalog") + /** + * Name of catalog + */ @pattern("^[A-Za-z0-9_-]{1,50}$") @path @key("catalogName") @@ -23,36 +27,55 @@ model Catalog is TrackedResource { @armResourceOperations interface Catalogs { - @doc("Get a Catalog") + /** + * Get a Catalog + */ get is ArmResourceRead; - @doc("Create a Catalog") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + /** + * Create a Catalog + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync< Catalog, BaseParameters, ArmAsyncOperationHeader >; - @doc("Update a Catalog") + /** + * Update a Catalog + */ + @parameterVisibility("read") update is ArmCustomPatchSync; - @doc("Delete a Catalog") + /** + * Delete a Catalog + */ delete is ArmResourceDeleteAsync< Catalog, BaseParameters, ArmLroLocationHeader >; - @doc("List Catalog resources by resource group") + /** + * List Catalog resources by resource group + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Catalogs_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; - @doc("List Catalog resources by subscription ID") + /** + * List Catalog resources by subscription ID + */ listBySubscription is ArmListBySubscription; - @doc("Counts devices in catalog.") + /** + * Counts devices in catalog. + */ countDevices is ArmResourceActionSync; - @doc("Lists deployments for catalog.") + /** + * Lists deployments for catalog. + */ listDeployments is ArmResourceActionSync< Catalog, void, @@ -60,25 +83,35 @@ interface Catalogs { { ...BaseParameters; - @doc("Filter the result list using the given expression") + /** + * Filter the result list using the given expression + */ @query("$filter") filter?: string; - @doc("The number of result items to return.") + /** + * The number of result items to return. + */ @query("$top") top?: int32; - @doc("The number of result items to skip.") + /** + * The number of result items to skip. + */ @query("$skip") skip?: int32; - @doc("The maximum number of result items per page.") + /** + * The maximum number of result items per page. + */ @query("$maxpagesize") maxpagesize?: int32; } >; - @doc("List the device groups for the catalog.") + /** + * List the device groups for the catalog. + */ listDeviceGroups is ArmResourceActionSync< Catalog, ListDeviceGroupsRequest, @@ -86,25 +119,35 @@ interface Catalogs { { ...BaseParameters; - @doc("Filter the result list using the given expression") + /** + * Filter the result list using the given expression + */ @query("$filter") filter?: string; - @doc("The number of result items to return.") + /** + * The number of result items to return. + */ @query("$top") top?: int32; - @doc("The number of result items to skip.") + /** + * The number of result items to skip. + */ @query("$skip") skip?: int32; - @doc("The maximum number of result items per page.") + /** + * The maximum number of result items per page. + */ @query("$maxpagesize") maxpagesize?: int32; } >; - @doc("Lists device insights for catalog.") + /** + * Lists device insights for catalog. + */ listDeviceInsights is ArmResourceActionSync< Catalog, void, @@ -112,25 +155,35 @@ interface Catalogs { { ...BaseParameters; - @doc("Filter the result list using the given expression") + /** + * Filter the result list using the given expression + */ @query("$filter") filter?: string; - @doc("The number of result items to return.") + /** + * The number of result items to return. + */ @query("$top") top?: int32; - @doc("The number of result items to skip.") + /** + * The number of result items to skip. + */ @query("$skip") skip?: int32; - @doc("The maximum number of result items per page.") + /** + * The maximum number of result items per page. + */ @query("$maxpagesize") maxpagesize?: int32; } >; - @doc("Lists devices for catalog.") + /** + * Lists devices for catalog. + */ listDevices is ArmResourceActionSync< Catalog, void, @@ -138,21 +191,41 @@ interface Catalogs { { ...BaseParameters; - @doc("Filter the result list using the given expression") + /** + * Filter the result list using the given expression + */ @query("$filter") filter?: string; - @doc("The number of result items to return.") + /** + * The number of result items to return. + */ @query("$top") top?: int32; - @doc("The number of result items to skip.") + /** + * The number of result items to skip. + */ @query("$skip") skip?: int32; - @doc("The maximum number of result items per page.") + /** + * The maximum number of result items per page. + */ @query("$maxpagesize") maxpagesize?: int32; } >; } + +@@projectedName(Catalogs.listDeviceGroups::parameters.body, + "json", + "listDeviceGroupsRequest" +); +@@extension(Catalogs.listDeviceGroups::parameters.body, + "x-ms-client-name", + "listDeviceGroupsRequest" +); +@@doc(Catalogs.listDeviceGroups::parameters.body, + "List device groups for catalog." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp index e42f42210e..aeb316b0fc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; -@doc("An certificate resource belonging to a catalog resource.") +/** + * An certificate resource belonging to a catalog resource. + */ @parentResource(Catalog) model Certificate is ProxyResource { - @doc("Serial number of the certificate. Use '.default' to get current active certificate.") + /** + * Serial number of the certificate. Use '.default' to get current active certificate. + */ @path @key("serialNumber") @segment("certificates") @@ -24,44 +28,74 @@ model Certificate is ProxyResource { @armResourceOperations interface Certificates { - @doc("Get a Certificate") + /** + * Get a Certificate + */ get is ArmResourceRead; - @doc("List Certificate resources by Catalog") + /** + * List Certificate resources by Catalog + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Certificates_ListByCatalog") listByCatalog is ArmResourceListByParent< Certificate, { ...BaseParameters; - @doc("Filter the result list using the given expression") + /** + * Filter the result list using the given expression + */ @query("$filter") filter?: string; - @doc("The number of result items to return.") + /** + * The number of result items to return. + */ @query("$top") top?: int32; - @doc("The number of result items to skip.") + /** + * The number of result items to skip. + */ @query("$skip") skip?: int32; - @doc("The maximum number of result items per page.") + /** + * The maximum number of result items per page. + */ @query("$maxpagesize") maxpagesize?: int32; } >; - @doc("Retrieves cert chain.") + /** + * Retrieves cert chain. + */ retrieveCertChain is ArmResourceActionSync< Certificate, void, CertificateChainResponse >; - @doc("Gets the proof of possession nonce.") + /** + * Gets the proof of possession nonce. + */ retrieveProofOfPossessionNonce is ArmResourceActionSync< Certificate, ProofOfPossessionNonceRequest, ProofOfPossessionNonceResponse >; } + +@@projectedName(Certificates.retrieveProofOfPossessionNonce::parameters.body, + "json", + "proofOfPossessionNonceRequest" +); +@@extension(Certificates.retrieveProofOfPossessionNonce::parameters.body, + "x-ms-client-name", + "proofOfPossessionNonceRequest" +); +@@doc(Certificates.retrieveProofOfPossessionNonce::parameters.body, + "Proof of possession nonce request body " +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp index 5550a848b5..83b07d01ed 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; -@doc("An deployment resource belonging to a device group resource.") +/** + * An deployment resource belonging to a device group resource. + */ @parentResource(DeviceGroup) model Deployment is ProxyResource { - @doc("Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.") + /** + * Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. + */ @path @key("deploymentName") @segment("deployments") @@ -24,42 +28,60 @@ model Deployment is ProxyResource { @armResourceOperations interface Deployments { - @doc("Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + /** + * Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + */ get is ArmResourceRead; - @doc("Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + /** + * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync< Deployment, BaseParameters, ArmAsyncOperationHeader >; - @doc("Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + /** + * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + */ delete is ArmResourceDeleteAsync< Deployment, BaseParameters, ArmLroLocationHeader >; - @doc("List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + /** + * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Deployments_ListByDeviceGroup") listByDeviceGroup is ArmResourceListByParent< Deployment, { ...BaseParameters; - @doc("Filter the result list using the given expression") + /** + * Filter the result list using the given expression + */ @query("$filter") filter?: string; - @doc("The number of result items to return.") + /** + * The number of result items to return. + */ @query("$top") top?: int32; - @doc("The number of result items to skip.") + /** + * The number of result items to skip. + */ @query("$skip") skip?: int32; - @doc("The maximum number of result items per page.") + /** + * The maximum number of result items per page. + */ @query("$maxpagesize") maxpagesize?: int32; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp index 493c8e138f..627c7fbff2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; -@doc("An device resource belonging to a device group resource.") +/** + * An device resource belonging to a device group resource. + */ @parentResource(DeviceGroup) model Device is ProxyResource { - @doc("Device name") + /** + * Device name + */ @pattern("^[a-zA-Z0-9-]{128}$") @path @key("deviceName") @@ -25,17 +29,24 @@ model Device is ProxyResource { @armResourceOperations interface Devices { - @doc("Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product.") + /** + * Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product. + */ get is ArmResourceRead; - @doc("Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only.") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + /** + * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync< Device, BaseParameters, ArmAsyncOperationHeader >; - @doc("Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level.") + /** + * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync< Device, DeviceUpdate, @@ -43,17 +54,25 @@ interface Devices { ArmLroLocationHeader >; - @doc("Delete a Device") + /** + * Delete a Device + */ delete is ArmResourceDeleteAsync< Device, BaseParameters, ArmLroLocationHeader >; - @doc("List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + /** + * List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Devices_ListByDeviceGroup") listByDeviceGroup is ArmResourceListByParent; - @doc("Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product.") + /** + * Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product. + */ generateCapabilityImage is ArmResourceActionAsync< Device, GenerateCapabilityImageRequest, @@ -62,3 +81,15 @@ interface Devices { ArmLroLocationHeader >; } + +@@projectedName(Devices.generateCapabilityImage::parameters.body, + "json", + "generateDeviceCapabilityRequest" +); +@@extension(Devices.generateCapabilityImage::parameters.body, + "x-ms-client-name", + "generateDeviceCapabilityRequest" +); +@@doc(Devices.generateCapabilityImage::parameters.body, + "Generate capability image request body." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp index 59128d7d7f..621d14c6eb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; -@doc("An device group resource belonging to a product resource.") +/** + * An device group resource belonging to a product resource. + */ @parentResource(Product) model DeviceGroup is ProxyResource { - @doc("Name of device group.") + /** + * Name of device group. + */ @pattern("^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$") @path @key("deviceGroupName") @@ -25,17 +29,24 @@ model DeviceGroup is ProxyResource { @armResourceOperations interface DeviceGroups { - @doc("Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + /** + * Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + */ get is ArmResourceRead; - @doc("Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + /** + * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync< DeviceGroup, BaseParameters, ArmAsyncOperationHeader >; - @doc("Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + /** + * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync< DeviceGroup, DeviceGroupUpdate, @@ -43,38 +54,54 @@ interface DeviceGroups { ArmLroLocationHeader >; - @doc("Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + /** + * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + */ delete is ArmResourceDeleteAsync< DeviceGroup, BaseParameters, ArmLroLocationHeader >; - @doc("List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + /** + * List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DeviceGroups_ListByProduct") listByProduct is ArmResourceListByParent< DeviceGroup, { ...BaseParameters; - @doc("Filter the result list using the given expression") + /** + * Filter the result list using the given expression + */ @query("$filter") filter?: string; - @doc("The number of result items to return.") + /** + * The number of result items to return. + */ @query("$top") top?: int32; - @doc("The number of result items to skip.") + /** + * The number of result items to skip. + */ @query("$skip") skip?: int32; - @doc("The maximum number of result items per page.") + /** + * The maximum number of result items per page. + */ @query("$maxpagesize") maxpagesize?: int32; } >; - @doc("Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk claiming devices to a catalog only.") + /** + * Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk claiming devices to a catalog only. + */ claimDevices is ArmResourceActionNoResponseContentAsync< DeviceGroup, ClaimDevicesRequest, @@ -82,6 +109,20 @@ interface DeviceGroups { ArmLroLocationHeader >; - @doc("Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + /** + * Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. + */ countDevices is ArmResourceActionSync; } + +@@projectedName(DeviceGroups.claimDevices::parameters.body, + "json", + "claimDevicesRequest" +); +@@extension(DeviceGroups.claimDevices::parameters.body, + "x-ms-client-name", + "claimDevicesRequest" +); +@@doc(DeviceGroups.claimDevices::parameters.body, + "Bulk claim devices request body." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp index 936f1d80b4..e1b7d7ef98 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; -@doc("An image resource belonging to a catalog resource.") +/** + * An image resource belonging to a catalog resource. + */ @parentResource(Catalog) model Image is ProxyResource { - @doc("Image name. Use .default for image creation.") + /** + * Image name. Use .default for image creation. + */ @path @key("imageName") @segment("images") @@ -24,42 +28,60 @@ model Image is ProxyResource { @armResourceOperations interface Images { - @doc("Get a Image") + /** + * Get a Image + */ get is ArmResourceRead; - @doc("Create a Image") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + /** + * Create a Image + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync< Image, BaseParameters, ArmAsyncOperationHeader >; - @doc("Delete a Image") + /** + * Delete a Image + */ delete is ArmResourceDeleteAsync< Image, BaseParameters, ArmLroLocationHeader >; - @doc("List Image resources by Catalog") + /** + * List Image resources by Catalog + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Images_ListByCatalog") listByCatalog is ArmResourceListByParent< Image, { ...BaseParameters; - @doc("Filter the result list using the given expression") + /** + * Filter the result list using the given expression + */ @query("$filter") filter?: string; - @doc("The number of result items to return.") + /** + * The number of result items to return. + */ @query("$top") top?: int32; - @doc("The number of result items to skip.") + /** + * The number of result items to skip. + */ @query("$skip") skip?: int32; - @doc("The maximum number of result items per page.") + /** + * The maximum number of result items per page. + */ @query("$maxpagesize") maxpagesize?: int32; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp index e8a338b248..93dc7ec1e5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; -@doc("An product resource belonging to a catalog resource.") +/** + * An product resource belonging to a catalog resource. + */ @parentResource(Catalog) model Product is ProxyResource { - @doc("Name of product.") + /** + * Name of product. + */ @pattern("^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$") @path @key("productName") @@ -25,17 +29,24 @@ model Product is ProxyResource { @armResourceOperations interface Products { - @doc("Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + /** + * Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + */ get is ArmResourceRead; - @doc("Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + /** + * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync< Product, BaseParameters, ArmAsyncOperationHeader >; - @doc("Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + /** + * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + */ + @parameterVisibility("read") update is ArmCustomPatchAsync< Product, ProductUpdate, @@ -43,20 +54,30 @@ interface Products { ArmLroLocationHeader >; - @doc("Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'") + /** + * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name' + */ delete is ArmResourceDeleteAsync< Product, BaseParameters, ArmLroLocationHeader >; - @doc("List Product resources by Catalog") + /** + * List Product resources by Catalog + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Products_ListByCatalog") listByCatalog is ArmResourceListByParent; - @doc("Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + /** + * Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + */ countDevices is ArmResourceActionSync; - @doc("Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + /** + * Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be used for product name. + */ generateDefaultDeviceGroups is ArmResourceActionSync< Product, void, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp index 8af1897a6c..d78e8077ba 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp @@ -17,19 +17,25 @@ using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; +/** + * Azure Sphere resource management API. + */ @armProviderNamespace @service({ title: "Azure Sphere resource management API.", }) @versioned(Versions) @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) -@doc("Azure Sphere resource management API.") namespace Microsoft.AzureSphere; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { + /** + * The 2022-09-01-preview API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2022-09-01-preview API version.") v2022_09_01_preview: "2022-09-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp index 2fa769a4e4..395a733727 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp @@ -12,434 +12,796 @@ namespace Microsoft.AzureSphere; interface Operations extends Azure.ResourceManager.Operations {} -@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") -enum Origin { - user, - system, - `user,system`, -} - -@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") -enum ActionType { - Internal, -} - -@doc("Provisioning state of the resource.") +/** + * Provisioning state of the resource. + */ enum ProvisioningState { - @doc("Resource has been created.") Succeeded, - @doc("Resource creation failed.") Failed, - @doc("Resource creation was canceled.") Canceled, - @doc("The resource is being provisioned") Provisioning, - @doc("The resource is being updated") Updating, - @doc("The resource is being deleted") Deleting, - @doc("The resource create request has been accepted") Accepted, -} - -@doc("The type of identity that created the resource.") -enum CreatedByType { - User, - Application, - ManagedIdentity, - Key, -} - -@doc("Certificate status values.") + /** + * Resource has been created. + */ + Succeeded, + + /** + * Resource creation failed. + */ + Failed, + + /** + * Resource creation was canceled. + */ + Canceled, + + /** + * The resource is being provisioned + */ + Provisioning, + + /** + * The resource is being updated + */ + Updating, + + /** + * The resource is being deleted + */ + Deleting, + + /** + * The resource create request has been accepted + */ + Accepted, +} + +/** + * Certificate status values. + */ enum CertificateStatus { - @doc("Certificate is active") Active, - @doc("Certificate is inactive") Inactive, - @doc("Certificate has expired") Expired, - @doc("Certificate has been revoked") Revoked, -} - -@doc("Regional data boundary values.") + /** + * Certificate is active + */ + Active, + + /** + * Certificate is inactive + */ + Inactive, + + /** + * Certificate has expired + */ + Expired, + + /** + * Certificate has been revoked + */ + Revoked, +} + +/** + * Regional data boundary values. + */ enum RegionalDataBoundary { - @doc("No data boundary") None, - @doc("EU data boundary") EU, + /** + * No data boundary + */ + None, + + /** + * EU data boundary + */ + EU, } -@doc("Image type values.") +/** + * Image type values. + */ enum ImageType { - @doc("Invalid image.") InvalidImageType, - @doc("One Bl image type") OneBl, - @doc("Pluton image type") PlutonRuntime, - @doc("Wifi firmware image type") WifiFirmware, - @doc("Security monitor image type") SecurityMonitor, - @doc("Normal world loader image type") NormalWorldLoader, - @doc("Normal world dtb image type") NormalWorldDtb, - @doc("Normal world kernel image type") NormalWorldKernel, - @doc("Root FS image type") RootFs, - @doc("Services image type") Services, - @doc("Applications image type") Applications, - @doc("FW config image type") FwConfig, - @doc("Boot manifest image type") BootManifest, - @doc("Nwfs image type") Nwfs, - @doc("Trusted key store image type") TrustedKeystore, - @doc("Policy image type") Policy, - @doc("Customer board config image type") CustomerBoardConfig, - @doc("Update certificate store image type") UpdateCertStore, - @doc("Base system update manifest image type") BaseSystemUpdateManifest, - @doc("Firmware update manifest image type") FirmwareUpdateManifest, - @doc("Customer update manifest image type") CustomerUpdateManifest, - @doc("Recovery manifest image type") RecoveryManifest, - @doc("manifest set image type") ManifestSet, - @doc("Other image type") Other, -} - -@doc("OS feed type values.") + /** + * Invalid image. + */ + InvalidImageType, + + /** + * One Bl image type + */ + OneBl, + + /** + * Pluton image type + */ + PlutonRuntime, + + /** + * Wifi firmware image type + */ + WifiFirmware, + + /** + * Security monitor image type + */ + SecurityMonitor, + + /** + * Normal world loader image type + */ + NormalWorldLoader, + + /** + * Normal world dtb image type + */ + NormalWorldDtb, + + /** + * Normal world kernel image type + */ + NormalWorldKernel, + + /** + * Root FS image type + */ + RootFs, + + /** + * Services image type + */ + Services, + + /** + * Applications image type + */ + Applications, + + /** + * FW config image type + */ + FwConfig, + + /** + * Boot manifest image type + */ + BootManifest, + + /** + * Nwfs image type + */ + Nwfs, + + /** + * Trusted key store image type + */ + TrustedKeystore, + + /** + * Policy image type + */ + Policy, + + /** + * Customer board config image type + */ + CustomerBoardConfig, + + /** + * Update certificate store image type + */ + UpdateCertStore, + + /** + * Base system update manifest image type + */ + BaseSystemUpdateManifest, + + /** + * Firmware update manifest image type + */ + FirmwareUpdateManifest, + + /** + * Customer update manifest image type + */ + CustomerUpdateManifest, + + /** + * Recovery manifest image type + */ + RecoveryManifest, + + /** + * manifest set image type + */ + ManifestSet, + + /** + * Other image type + */ + Other, +} + +/** + * OS feed type values. + */ enum OSFeedType { - @doc("Retail OS feed type.") Retail, - @doc("Retail evaluation OS feed type.") RetailEval, + /** + * Retail OS feed type. + */ + Retail, + + /** + * Retail evaluation OS feed type. + */ + RetailEval, } -@doc("Update policy values.") +/** + * Update policy values. + */ enum UpdatePolicy { - @doc("Update all policy.") UpdateAll, - @doc("No update for 3rd party app policy.") No3rdPartyAppUpdates, + /** + * Update all policy. + */ + UpdateAll, + + /** + * No update for 3rd party app policy. + */ + No3rdPartyAppUpdates, } -@doc("Allow crash dumps values.") +/** + * Allow crash dumps values. + */ enum AllowCrashDumpCollection { - @doc("Crash dump collection enabled") Enabled, - @doc("Crash dump collection disabled") Disabled, + /** + * Crash dump collection enabled + */ + Enabled, + + /** + * Crash dump collection disabled + */ + Disabled, } -@doc("Capability image type") +/** + * Capability image type + */ enum CapabilityType { - @doc("Application development capability") ApplicationDevelopment, - @doc("Field servicing capability") FieldServicing, + /** + * Application development capability + */ + ApplicationDevelopment, + + /** + * Field servicing capability + */ + FieldServicing, } -@doc("Catalog properties") +/** + * Catalog properties + */ model CatalogProperties { - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; } -@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + */ model Resource { - @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + */ @visibility("read") id?: string; - @doc("The name of the resource") + /** + * The name of the resource + */ @visibility("read") name?: string; - @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + */ @visibility("read") type?: string; - @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ @visibility("read") systemData?: SystemData; } -@doc("The type used for update operations of the Catalog.") +/** + * The type used for update operations of the Catalog. + */ model CatalogUpdate { - @doc("Resource tags.") + /** + * Resource tags. + */ tags?: Record; } -@doc("The properties of certificate") +/** + * The properties of certificate + */ model CertificateProperties { - @doc("The certificate as a UTF-8 encoded base 64 string.") + /** + * The certificate as a UTF-8 encoded base 64 string. + */ @visibility("read") certificate?: string; - @doc("The certificate status.") + /** + * The certificate status. + */ @visibility("read") status?: CertificateStatus; - @doc("The certificate subject.") + /** + * The certificate subject. + */ @visibility("read") subject?: string; - @doc("The certificate thumbprint.") + /** + * The certificate thumbprint. + */ @visibility("read") thumbprint?: string; - @doc("The certificate expiry date.") + /** + * The certificate expiry date. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expiryUtc?: utcDateTime; - @doc("The certificate not before date.") + /** + * The certificate not before date. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. notBeforeUtc?: utcDateTime; - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; } -@doc("The certificate chain response.") +/** + * The certificate chain response. + */ model CertificateChainResponse { - @doc("The certificate chain.") + /** + * The certificate chain. + */ @visibility("read") certificateChain?: string; } -@doc("Request for the proof of possession nonce") +/** + * Request for the proof of possession nonce + */ model ProofOfPossessionNonceRequest { - @doc("The proof of possession nonce") + /** + * The proof of possession nonce + */ proofOfPossessionNonce: string; } -@doc("Result of the action to generate a proof of possession nonce") +/** + * Result of the action to generate a proof of possession nonce + */ model ProofOfPossessionNonceResponse extends CertificateProperties {} -@doc("Response to the action call for count devices in a catalog.") +/** + * Response to the action call for count devices in a catalog. + */ model CountDeviceResponse extends CountElementsResponse {} -@doc("Response of the count for elements.") +/** + * Response of the count for elements. + */ model CountElementsResponse { - @doc("Number of children resources in parent resource.") + /** + * Number of children resources in parent resource. + */ value: int32; } -@doc("The properties of image") +/** + * The properties of image + */ model ImageProperties { - @doc("Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads.") + /** + * Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads. + */ @visibility("read", "create") image?: string; - @doc("Image ID") + /** + * Image ID + */ @visibility("read", "create") imageId?: string; - @doc("Image name") + /** + * Image name + */ @visibility("read") imageName?: string; - @doc("Regional data boundary for an image") + /** + * Regional data boundary for an image + */ @visibility("read", "create") regionalDataBoundary?: RegionalDataBoundary; - @doc("Location the image") + /** + * Location the image + */ @visibility("read") uri?: string; - @doc("The image description.") + /** + * The image description. + */ @visibility("read") description?: string; - @doc("The image component id.") + /** + * The image component id. + */ @visibility("read") componentId?: string; - @doc("The image type.") + /** + * The image type. + */ @visibility("read") imageType?: ImageType; - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; } -@doc("The properties of deployment") +/** + * The properties of deployment + */ model DeploymentProperties { - @doc("Deployment ID") + /** + * Deployment ID + */ @visibility("read", "create") deploymentId?: string; - @doc("Images deployed") + /** + * Images deployed + */ @visibility("read", "create") deployedImages?: Image[]; - @doc("Deployment date UTC") + /** + * Deployment date UTC + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. deploymentDateUtc?: utcDateTime; - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; } -@doc("Request of the action to list device groups for a catalog.") +/** + * Request of the action to list device groups for a catalog. + */ model ListDeviceGroupsRequest { - @doc("Device Group name.") + /** + * Device Group name. + */ deviceGroupName?: string; } -@doc("The properties of deviceGroup") +/** + * The properties of deviceGroup + */ model DeviceGroupProperties { - @doc("Description of the device group.") + /** + * Description of the device group. + */ description?: string; - @doc("Operating system feed type of the device group.") + /** + * Operating system feed type of the device group. + */ osFeedType?: OSFeedType; - @doc("Update policy of the device group.") + /** + * Update policy of the device group. + */ updatePolicy?: UpdatePolicy; - @doc("Flag to define if the user allows for crash dump collection.") + /** + * Flag to define if the user allows for crash dump collection. + */ allowCrashDumpsCollection?: AllowCrashDumpCollection; - @doc("Regional data boundary for the device group.") + /** + * Regional data boundary for the device group. + */ regionalDataBoundary?: RegionalDataBoundary; - @doc("Deployment status for the device group.") + /** + * Deployment status for the device group. + */ @visibility("read") hasDeployment?: boolean; - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; } -@doc("Paged collection of DeviceInsight items") +/** + * Paged collection of DeviceInsight items + */ model PagedDeviceInsight is Azure.Core.Page; -@doc("Device insight report.") +/** + * Device insight report. + */ model DeviceInsight { - @doc("Device ID") + /** + * Device ID + */ deviceId: string; - @doc("Event description") + /** + * Event description + */ description: string; - @doc("Event start timestamp") + /** + * Event start timestamp + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTimestampUtc: utcDateTime; - @doc("Event end timestamp") + /** + * Event end timestamp + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTimestampUtc: utcDateTime; - @doc("Event category") + /** + * Event category + */ eventCategory: string; - @doc("Event class") + /** + * Event class + */ eventClass: string; - @doc("Event type") + /** + * Event type + */ eventType: string; - @doc("Event count") + /** + * Event count + */ eventCount: int32; } -@doc("The properties of device") +/** + * The properties of device + */ model DeviceProperties { - @doc("Device ID") + /** + * Device ID + */ @visibility("read", "create") deviceId?: string; - @doc("SKU of the chip") + /** + * SKU of the chip + */ @visibility("read") chipSku?: string; - @doc("OS version available for installation when update requested") + /** + * OS version available for installation when update requested + */ @visibility("read") lastAvailableOsVersion?: string; - @doc("OS version running on device when update requested") + /** + * OS version running on device when update requested + */ @visibility("read") lastInstalledOsVersion?: string; - @doc("Time when update requested and new OS version available") + /** + * Time when update requested and new OS version available + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastOsUpdateUtc?: utcDateTime; - @doc("Time when update was last requested") + /** + * Time when update was last requested + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdateRequestUtc?: utcDateTime; - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; } -@doc("The properties of product") +/** + * The properties of product + */ model ProductProperties { - @doc("Description of the product") + /** + * Description of the product + */ description: string; - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; } -@doc("The type used for update operations of the Product.") +/** + * The type used for update operations of the Product. + */ model ProductUpdate { - @doc("The updatable properties of the Product.") + /** + * The updatable properties of the Product. + */ properties?: ProductUpdateProperties; } -@doc("The updatable properties of the Product.") +/** + * The updatable properties of the Product. + */ model ProductUpdateProperties { - @doc("Description of the product") + /** + * Description of the product + */ description?: string; } -@doc("The type used for update operations of the DeviceGroup.") +/** + * The type used for update operations of the DeviceGroup. + */ model DeviceGroupUpdate { - @doc("The updatable properties of the DeviceGroup.") + /** + * The updatable properties of the DeviceGroup. + */ properties?: DeviceGroupUpdateProperties; } -@doc("The updatable properties of the DeviceGroup.") +/** + * The updatable properties of the DeviceGroup. + */ model DeviceGroupUpdateProperties { - @doc("Description of the device group.") + /** + * Description of the device group. + */ description?: string; - @doc("Operating system feed type of the device group.") + /** + * Operating system feed type of the device group. + */ osFeedType?: OSFeedType; - @doc("Update policy of the device group.") + /** + * Update policy of the device group. + */ updatePolicy?: UpdatePolicy; - @doc("Flag to define if the user allows for crash dump collection.") + /** + * Flag to define if the user allows for crash dump collection. + */ allowCrashDumpsCollection?: AllowCrashDumpCollection; - @doc("Regional data boundary for the device group.") + /** + * Regional data boundary for the device group. + */ regionalDataBoundary?: RegionalDataBoundary; } -@doc("Request to the action call to bulk claim devices.") +/** + * Request to the action call to bulk claim devices. + */ model ClaimDevicesRequest { - @doc("Device identifiers of the devices to be claimed.") + /** + * Device identifiers of the devices to be claimed. + */ deviceIdentifiers: string[]; } -@doc("The type used for update operations of the Device.") +/** + * The type used for update operations of the Device. + */ model DeviceUpdate { - @doc("The updatable properties of the Device.") + /** + * The updatable properties of the Device. + */ properties?: DeviceUpdateProperties; } -@doc("The updatable properties of the Device.") +/** + * The updatable properties of the Device. + */ model DeviceUpdateProperties { - @doc("Device group id") + /** + * Device group id + */ deviceGroupId?: string; } -@doc("Request of the action to create a signed device capability image") +/** + * Request of the action to create a signed device capability image + */ model GenerateCapabilityImageRequest { - @doc("List of capabilities to create") + /** + * List of capabilities to create + */ capabilities: CapabilityType[]; } -@doc("Signed device capability image response") +/** + * Signed device capability image response + */ model SignedCapabilityImageResponse { - @doc("The signed device capability image as a UTF-8 encoded base 64 string.") + /** + * The signed device capability image as a UTF-8 encoded base 64 string. + */ @visibility("read") image?: string; } -@doc("The properties of device patch") +/** + * The properties of device patch + */ model DevicePatchProperties { - @doc("Device group id") + /** + * Device group id + */ deviceGroupId: string; } -@doc("Image upload request body.") +/** + * Image upload request body. + */ model ImageUploadRequestBody { - @doc(".") + /** + * . + */ images: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/tspconfig.yaml index 94026eee22..9553504364 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/tspconfig.yaml @@ -2,6 +2,7 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/azuresphere.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp index 6df53af1cd..3ffccc7b24 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("Properties of the blob container, including Id, resource name, resource type, Etag.") +/** + * Properties of the blob container, including Id, resource name, resource type, Etag. + */ @parentResource(BlobServiceProperties) model BlobContainer is ProxyResource { - @doc("The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.") + /** + * The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + */ @maxLength(63) @minLength(3) @path @@ -26,52 +30,79 @@ model BlobContainer is ProxyResource { @armResourceOperations interface BlobContainers { - @doc("Gets properties of a specified container. ") + /** + * Gets properties of a specified container. + */ get is ArmResourceRead; - @doc("Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. ") + /** + * Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. + */ create is ArmResourceCreateOrReplaceSync; - @doc("Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. ") + /** + * Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. + */ + @parameterVisibility("read") update is ArmCustomPatchSync; - @doc("Deletes specified container under its account.") + /** + * Deletes specified container under its account. + */ delete is ArmResourceDeleteSync; - @doc("Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.") + /** + * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BlobContainers_List") list is ArmResourceListByParent< BlobContainer, { ...BaseParameters; - @doc("Optional. Specified maximum number of containers that can be included in the list.") + /** + * Optional. Specified maximum number of containers that can be included in the list. + */ @query("$maxpagesize") $maxpagesize?: string; - @doc("Optional. When specified, only container names starting with the filter will be listed.") + /** + * Optional. When specified, only container names starting with the filter will be listed. + */ @query("$filter") $filter?: string; - @doc("Optional, used to include the properties for soft deleted blob containers.") + /** + * Optional, used to include the properties for soft deleted blob containers. + */ @query("$include") $include?: ListContainersInclude; } >; - @doc("Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request.") + /** + * Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request. + */ setLegalHold is ArmResourceActionSync; - @doc("Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.") + /** + * Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request. + */ clearLegalHold is ArmResourceActionSync; - @doc("The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.") + /** + * The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. + */ lease is ArmResourceActionSync< BlobContainer, LeaseContainerRequest, LeaseContainerResponse >; - @doc("This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container.") + /** + * This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. + */ objectLevelWorm is ArmResourceActionAsync< BlobContainer, void, @@ -80,3 +111,54 @@ interface BlobContainers { ArmLroLocationHeader >; } + +@@projectedName(BlobContainers.create::parameters.resource, + "json", + "blobContainer" +); +@@extension(BlobContainers.create::parameters.resource, + "x-ms-client-name", + "blobContainer" +); +@@doc(BlobContainers.create::parameters.resource, + "Properties of the blob container to create." +); +@@projectedName(BlobContainers.update::parameters.properties, + "json", + "blobContainer" +); +@@extension(BlobContainers.update::parameters.properties, + "x-ms-client-name", + "blobContainer" +); +@@doc(BlobContainers.update::parameters.properties, + "Properties to update for the blob container." +); +@@projectedName(BlobContainers.setLegalHold::parameters.body, + "json", + "LegalHold" +); +@@extension(BlobContainers.setLegalHold::parameters.body, + "x-ms-client-name", + "LegalHold" +); +@@doc(BlobContainers.setLegalHold::parameters.body, + "The LegalHold property that will be set to a blob container." +); +@@projectedName(BlobContainers.clearLegalHold::parameters.body, + "json", + "LegalHold" +); +@@extension(BlobContainers.clearLegalHold::parameters.body, + "x-ms-client-name", + "LegalHold" +); +@@doc(BlobContainers.clearLegalHold::parameters.body, + "The LegalHold property that will be clear from a blob container." +); +@@projectedName(BlobContainers.lease::parameters.body, "json", "parameters"); +@@extension(BlobContainers.lease::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(BlobContainers.lease::parameters.body, "Lease Container request body."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp index 6e95e0e636..1917e72982 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp @@ -12,7 +12,9 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("The storage account blob inventory policy.") +/** + * The storage account blob inventory policy. + */ @singleton("default") @parentResource(StorageAccount) model BlobInventoryPolicy is ProxyResource { @@ -23,15 +25,37 @@ model BlobInventoryPolicy is ProxyResource { @armResourceOperations interface BlobInventoryPolicies { - @doc("Gets the blob inventory policy associated with the specified storage account.") + /** + * Gets the blob inventory policy associated with the specified storage account. + */ get is ArmResourceRead; - @doc("Sets the blob inventory policy to the specified storage account.") + /** + * Sets the blob inventory policy to the specified storage account. + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Deletes the blob inventory policy associated with the specified storage account.") + /** + * Deletes the blob inventory policy associated with the specified storage account. + */ delete is ArmResourceDeleteSync; - @doc("Gets the blob inventory policy associated with the specified storage account.") + /** + * Gets the blob inventory policy associated with the specified storage account. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BlobInventoryPolicies_List") list is ArmResourceListByParent; } + +@@projectedName(BlobInventoryPolicies.createOrUpdate::parameters.resource, + "json", + "properties" +); +@@extension(BlobInventoryPolicies.createOrUpdate::parameters.resource, + "x-ms-client-name", + "properties" +); +@@doc(BlobInventoryPolicies.createOrUpdate::parameters.resource, + "The blob inventory policy set to a storage account." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp index 2848b6cbd9..c503a7472b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp @@ -12,7 +12,9 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("The properties of a storage account’s Blob service.") +/** + * The properties of a storage account’s Blob service. + */ @singleton("default") @parentResource(StorageAccount) model BlobServiceProperties is ProxyResource { @@ -26,18 +28,36 @@ model BlobServiceProperties is ProxyResource { @armResourceOperations @projectedName("client", "BlobServiceProperties") interface BlobServicePropertiesOperationGroup { + /** + * Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.") @operationId("BlobServices_GetServiceProperties") getServiceProperties is ArmResourceRead; + /** + * Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. ") @operationId("BlobServices_SetServiceProperties") setServiceProperties is ArmResourceCreateOrReplaceSync; + /** + * List blob services of storage account. It returns a collection of one object named default. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List blob services of storage account. It returns a collection of one object named default.") @operationId("BlobServices_List") list is ArmResourceListByParent; } + +@@projectedName(BlobServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "json", + "parameters" +); +@@extension(BlobServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(BlobServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "The properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp index 6c449cf914..f5bd38ef8a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp @@ -11,10 +11,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("Deleted storage account") +/** + * Deleted storage account + */ @locationResource model DeletedAccount is ProxyResource { - @doc("Name of the deleted storage account.") + /** + * Name of the deleted storage account. + */ @maxLength(24) @minLength(3) @path @@ -25,9 +29,13 @@ model DeletedAccount is ProxyResource { @armResourceOperations interface DeletedAccounts { - @doc("Get properties of specified deleted account resource.") + /** + * Get properties of specified deleted account resource. + */ get is ArmResourceRead; - @doc("Lists deleted accounts under the subscription.") + /** + * Lists deleted accounts under the subscription. + */ list is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp index 9dabc70a47..3f0f96db33 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("The Encryption Scope resource.") +/** + * The Encryption Scope resource. + */ @parentResource(StorageAccount) model EncryptionScope is ProxyResource { - @doc("The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.") + /** + * The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + */ @maxLength(63) @minLength(3) @path @@ -26,34 +30,74 @@ model EncryptionScope is ProxyResource { @armResourceOperations interface EncryptionScopes { - @doc("Returns the properties for the specified encryption scope.") + /** + * Returns the properties for the specified encryption scope. + */ get is ArmResourceRead; - @doc("Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request.") + /** + * Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request. + */ put is ArmResourceCreateOrReplaceSync; - @doc("Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist.") + /** + * Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist. + */ + @parameterVisibility("read") patch is ArmCustomPatchSync; - @doc("Lists all the encryption scopes available under the specified storage account.") + /** + * Lists all the encryption scopes available under the specified storage account. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("EncryptionScopes_List") list is ArmResourceListByParent< EncryptionScope, { ...BaseParameters; - @doc("Optional, specifies the maximum number of encryption scopes that will be included in the list response.") + /** + * Optional, specifies the maximum number of encryption scopes that will be included in the list response. + */ @maxValue(5000) @minValue(1) @query("$maxpagesize") $maxpagesize?: int32; - @doc("Optional. When specified, only encryption scope names starting with the filter will be listed.") + /** + * Optional. When specified, only encryption scope names starting with the filter will be listed. + */ @query("$filter") $filter?: string; - @doc("Optional, when specified, will list encryption scopes with the specific state. Defaults to All") + /** + * Optional, when specified, will list encryption scopes with the specific state. Defaults to All + */ @query("$include") $include?: ListEncryptionScopesInclude; } >; } + +@@projectedName(EncryptionScopes.put::parameters.resource, + "json", + "encryptionScope" +); +@@extension(EncryptionScopes.put::parameters.resource, + "x-ms-client-name", + "encryptionScope" +); +@@doc(EncryptionScopes.put::parameters.resource, + "Encryption scope properties to be used for the create or update." +); +@@projectedName(EncryptionScopes.patch::parameters.properties, + "json", + "encryptionScope" +); +@@extension(EncryptionScopes.patch::parameters.properties, + "x-ms-client-name", + "encryptionScope" +); +@@doc(EncryptionScopes.patch::parameters.properties, + "Encryption scope properties to be used for the update." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp index 36971e998c..0f49d36639 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp @@ -12,7 +12,9 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("The properties of File services in storage account.") +/** + * The properties of File services in storage account. + */ @singleton("default") @parentResource(StorageAccount) model FileServiceProperties is ProxyResource { @@ -26,18 +28,36 @@ model FileServiceProperties is ProxyResource { @armResourceOperations @projectedName("client", "FileServiceProperties") interface FileServicePropertiesOperationGroup { + /** + * Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules.") @operationId("FileServices_GetServiceProperties") getServiceProperties is ArmResourceRead; + /** + * Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. ") @operationId("FileServices_SetServiceProperties") setServiceProperties is ArmResourceCreateOrReplaceSync; + /** + * List all file services in storage accounts + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List all file services in storage accounts") @operationId("FileServices_List") list is ArmResourceListByParent; } + +@@projectedName(FileServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "json", + "parameters" +); +@@extension(FileServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(FileServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "The properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp index 3a9ee48c75..203531e9f0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("Properties of the file share, including Id, resource name, resource type, Etag.") +/** + * Properties of the file share, including Id, resource name, resource type, Etag. + */ @parentResource(FileServiceProperties) model FileShare is ProxyResource { - @doc("The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.") + /** + * The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. + */ @maxLength(63) @minLength(3) @path @@ -26,77 +30,110 @@ model FileShare is ProxyResource { @armResourceOperations interface FileShares { - @doc("Gets properties of a specified share.") + /** + * Gets properties of a specified share. + */ get is ArmResourceRead< FileShare, { ...BaseParameters; - @doc("Optional, used to expand the properties within share's properties. Valid values are: stats. Should be passed as a string with delimiter ','.") + /** + * Optional, used to expand the properties within share's properties. Valid values are: stats. Should be passed as a string with delimiter ','. + */ @query("$expand") $expand?: string; - @doc("Optional, used to retrieve properties of a snapshot.") + /** + * Optional, used to retrieve properties of a snapshot. + */ @header `x-ms-snapshot`?: string; } >; - @doc("Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. ") + /** + * Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. + */ create is ArmResourceCreateOrReplaceSync< FileShare, { ...BaseParameters; - @doc("Optional, used to expand the properties within share's properties. Valid values are: snapshots. Should be passed as a string with delimiter ','") + /** + * Optional, used to expand the properties within share's properties. Valid values are: snapshots. Should be passed as a string with delimiter ',' + */ @query("$expand") $expand?: string; } >; - @doc("Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. ") + /** + * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. + */ + @parameterVisibility("read") update is ArmCustomPatchSync; - @doc("Deletes specified share under its account.") + /** + * Deletes specified share under its account. + */ delete is ArmResourceDeleteSync< FileShare, { ...BaseParameters; - @doc("Optional, used to delete a snapshot.") + /** + * Optional, used to delete a snapshot. + */ @header `x-ms-snapshot`?: string; - @doc("Optional. Valid values are: snapshots, leased-snapshots, none. The default value is snapshots. For 'snapshots', the file share is deleted including all of its file share snapshots. If the file share contains leased-snapshots, the deletion fails. For 'leased-snapshots', the file share is deleted included all of its file share snapshots (leased/unleased). For 'none', the file share is deleted if it has no share snapshots. If the file share contains any snapshots (leased or unleased), the deletion fails.") + /** + * Optional. Valid values are: snapshots, leased-snapshots, none. The default value is snapshots. For 'snapshots', the file share is deleted including all of its file share snapshots. If the file share contains leased-snapshots, the deletion fails. For 'leased-snapshots', the file share is deleted included all of its file share snapshots (leased/unleased). For 'none', the file share is deleted if it has no share snapshots. If the file share contains any snapshots (leased or unleased), the deletion fails. + */ @query("$include") $include?: string; } >; - @doc("Lists all shares.") + /** + * Lists all shares. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("FileShares_List") list is ArmResourceListByParent< FileShare, { ...BaseParameters; - @doc("Optional. Specified maximum number of shares that can be included in the list.") + /** + * Optional. Specified maximum number of shares that can be included in the list. + */ @query("$maxpagesize") $maxpagesize?: string; - @doc("Optional. When specified, only share names starting with the filter will be listed.") + /** + * Optional. When specified, only share names starting with the filter will be listed. + */ @query("$filter") $filter?: string; - @doc("Optional, used to expand the properties within share's properties. Valid values are: deleted, snapshots. Should be passed as a string with delimiter ','") + /** + * Optional, used to expand the properties within share's properties. Valid values are: deleted, snapshots. Should be passed as a string with delimiter ',' + */ @query("$expand") $expand?: string; } >; - @doc("Restore a file share within a valid retention days if share soft delete is enabled") + /** + * Restore a file share within a valid retention days if share soft delete is enabled + */ restore is ArmResourceActionSync; - @doc("The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.") + /** + * The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. + */ lease is ArmResourceActionSync< FileShare, LeaseShareRequest, @@ -104,9 +141,40 @@ interface FileShares { { ...BaseParameters; - @doc("Optional. Specify the snapshot time to lease a snapshot.") + /** + * Optional. Specify the snapshot time to lease a snapshot. + */ @header `x-ms-snapshot`?: string; } >; } + +@@projectedName(FileShares.create::parameters.resource, "json", "fileShare"); +@@extension(FileShares.create::parameters.resource, + "x-ms-client-name", + "fileShare" +); +@@doc(FileShares.create::parameters.resource, + "Properties of the file share to create." +); +@@projectedName(FileShares.update::parameters.properties, "json", "fileShare"); +@@extension(FileShares.update::parameters.properties, + "x-ms-client-name", + "fileShare" +); +@@doc(FileShares.update::parameters.properties, + "Properties to update for the file share." +); +@@projectedName(FileShares.restore::parameters.body, "json", "deletedShare"); +@@extension(FileShares.restore::parameters.body, + "x-ms-client-name", + "deletedShare" +); +@@doc(FileShares.restore::parameters.body, ""); +@@projectedName(FileShares.lease::parameters.body, "json", "parameters"); +@@extension(FileShares.lease::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(FileShares.lease::parameters.body, "Lease Share request body."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp index 7cf2002c83..350448c709 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp @@ -12,7 +12,9 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag.") +/** + * The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. + */ @singleton("default") @parentResource(BlobContainer) model ImmutabilityPolicy is ProxyResource { @@ -23,50 +25,64 @@ model ImmutabilityPolicy is ProxyResource { @armResourceOperations interface ImmutabilityPolicies { + /** + * Gets the existing immutability policy along with the corresponding ETag in response headers and body. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the existing immutability policy along with the corresponding ETag in response headers and body.") @operationId("BlobContainers_GetImmutabilityPolicy") getImmutabilityPolicy is ArmResourceRead< ImmutabilityPolicy, { ...BaseParameters; - @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") + /** + * The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + */ @header `If-Match`?: string; } >; + /** + * Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.") @operationId("BlobContainers_CreateOrUpdateImmutabilityPolicy") createOrUpdateImmutabilityPolicy is ArmResourceCreateOrReplaceSync< ImmutabilityPolicy, { ...BaseParameters; - @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") + /** + * The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + */ @header `If-Match`?: string; } >; + /** + * Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container.") @operationId("BlobContainers_DeleteImmutabilityPolicy") deleteImmutabilityPolicy is ArmResourceDeleteSync< ImmutabilityPolicy, { ...BaseParameters; - @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") + /** + * The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + */ @header `If-Match`: string; } >; + /** + * Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.") @operationId("BlobContainers_LockImmutabilityPolicy") lockImmutabilityPolicy is ArmResourceActionSync< ImmutabilityPolicy, @@ -75,14 +91,18 @@ interface ImmutabilityPolicies { { ...BaseParameters; - @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") + /** + * The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + */ @header `If-Match`: string; } >; + /** + * Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.") @operationId("BlobContainers_ExtendImmutabilityPolicy") extendImmutabilityPolicy is ArmResourceActionSync< ImmutabilityPolicy, @@ -91,9 +111,34 @@ interface ImmutabilityPolicies { { ...BaseParameters; - @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") + /** + * The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. + */ @header `If-Match`: string; } >; } + +@@projectedName(ImmutabilityPolicies.createOrUpdateImmutabilityPolicy::parameters.resource, + "json", + "parameters" +); +@@extension(ImmutabilityPolicies.createOrUpdateImmutabilityPolicy::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(ImmutabilityPolicies.createOrUpdateImmutabilityPolicy::parameters.resource, + "The ImmutabilityPolicy Properties that will be created or updated to a blob container." +); +@@projectedName(ImmutabilityPolicies.extendImmutabilityPolicy::parameters.body, + "json", + "parameters" +); +@@extension(ImmutabilityPolicies.extendImmutabilityPolicy::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(ImmutabilityPolicies.extendImmutabilityPolicy::parameters.body, + "The ImmutabilityPolicy Properties that will be extended for a blob container." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp index f8d802d842..aecbcb4dbe 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("The local user associated with the storage accounts.") +/** + * The local user associated with the storage accounts. + */ @parentResource(StorageAccount) model LocalUser is ProxyResource { - @doc("The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.") + /** + * The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account. + */ @maxLength(64) @minLength(3) @path @@ -26,25 +30,51 @@ model LocalUser is ProxyResource { @armResourceOperations interface LocalUsers { - @doc("Get the local user of the storage account by username.") + /** + * Get the local user of the storage account by username. + */ get is ArmResourceRead; - @doc("Create or update the properties of a local user associated with the storage account") + /** + * Create or update the properties of a local user associated with the storage account + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Deletes the local user associated with the specified storage account.") + /** + * Deletes the local user associated with the specified storage account. + */ delete is ArmResourceDeleteSync; - @doc("List the local users associated with the storage account.") + /** + * List the local users associated with the storage account. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("LocalUsers_List") list is ArmResourceListByParent; - @doc("List SSH authorized keys and shared key of the local user.") + /** + * List SSH authorized keys and shared key of the local user. + */ listKeys is ArmResourceActionSync; - @doc("Regenerate the local user SSH password.") + /** + * Regenerate the local user SSH password. + */ regeneratePassword is ArmResourceActionSync< LocalUser, void, LocalUserRegeneratePasswordResult >; } + +@@projectedName(LocalUsers.createOrUpdate::parameters.resource, + "json", + "properties" +); +@@extension(LocalUsers.createOrUpdate::parameters.resource, + "x-ms-client-name", + "properties" +); +@@doc(LocalUsers.createOrUpdate::parameters.resource, + "The local user associated with a storage account." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp index 40823cbcc8..607ce99fec 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp @@ -12,7 +12,9 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("The Get Storage Account ManagementPolicies operation response.") +/** + * The Get Storage Account ManagementPolicies operation response. + */ @singleton("default") @parentResource(StorageAccount) model ManagementPolicy is ProxyResource { @@ -23,12 +25,30 @@ model ManagementPolicy is ProxyResource { @armResourceOperations interface ManagementPolicies { - @doc("Gets the managementpolicy associated with the specified storage account.") + /** + * Gets the managementpolicy associated with the specified storage account. + */ get is ArmResourceRead; - @doc("Sets the managementpolicy to the specified storage account.") + /** + * Sets the managementpolicy to the specified storage account. + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Deletes the managementpolicy associated with the specified storage account.") + /** + * Deletes the managementpolicy associated with the specified storage account. + */ delete is ArmResourceDeleteSync; } + +@@projectedName(ManagementPolicies.createOrUpdate::parameters.resource, + "json", + "properties" +); +@@extension(ManagementPolicies.createOrUpdate::parameters.resource, + "x-ms-client-name", + "properties" +); +@@doc(ManagementPolicies.createOrUpdate::parameters.resource, + "The ManagementPolicy set to a storage account." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp index a78d6c77d7..27a719b3e4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("The replication policy between two storage accounts. Multiple rules can be defined in one policy.") +/** + * The replication policy between two storage accounts. Multiple rules can be defined in one policy. + */ @parentResource(StorageAccount) model ObjectReplicationPolicy is ProxyResource { - @doc("For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.") + /** + * For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file. + */ @minLength(1) @path @key("objectReplicationPolicyId") @@ -26,15 +30,37 @@ model ObjectReplicationPolicy @armResourceOperations interface ObjectReplicationPolicies { - @doc("Get the object replication policy of the storage account by policy ID.") + /** + * Get the object replication policy of the storage account by policy ID. + */ get is ArmResourceRead; - @doc("Create or update the object replication policy of the storage account.") + /** + * Create or update the object replication policy of the storage account. + */ createOrUpdate is ArmResourceCreateOrReplaceSync; - @doc("Deletes the object replication policy associated with the specified storage account.") + /** + * Deletes the object replication policy associated with the specified storage account. + */ delete is ArmResourceDeleteSync; - @doc("List the object replication policies associated with the storage account.") + /** + * List the object replication policies associated with the storage account. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ObjectReplicationPolicies_List") list is ArmResourceListByParent; } + +@@projectedName(ObjectReplicationPolicies.createOrUpdate::parameters.resource, + "json", + "properties" +); +@@extension(ObjectReplicationPolicies.createOrUpdate::parameters.resource, + "x-ms-client-name", + "properties" +); +@@doc(ObjectReplicationPolicies.createOrUpdate::parameters.resource, + "The object replication policy set to a storage account. A unique policy ID will be created if absent." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp index 98b1c03ab2..c6b7d476c8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp @@ -12,11 +12,15 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("The Private Endpoint Connection resource.") +/** + * The Private Endpoint Connection resource. + */ @parentResource(StorageAccount) model PrivateEndpointConnection is ProxyResource { - @doc("The name of the private endpoint connection associated with the Azure resource") + /** + * The name of the private endpoint connection associated with the Azure resource + */ @path @key("privateEndpointConnectionName") @segment("privateEndpointConnections") @@ -25,15 +29,37 @@ model PrivateEndpointConnection @armResourceOperations interface PrivateEndpointConnections { - @doc("Gets the specified private endpoint connection associated with the storage account.") + /** + * Gets the specified private endpoint connection associated with the storage account. + */ get is ArmResourceRead; - @doc("Update the state of specified private endpoint connection associated with the storage account.") + /** + * Update the state of specified private endpoint connection associated with the storage account. + */ put is ArmResourceCreateOrReplaceSync; - @doc("Deletes the specified private endpoint connection associated with the storage account.") + /** + * Deletes the specified private endpoint connection associated with the storage account. + */ delete is ArmResourceDeleteSync; - @doc("List all the private endpoint connections associated with the storage account.") + /** + * List all the private endpoint connections associated with the storage account. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateEndpointConnections_List") list is ArmResourceListByParent; } + +@@projectedName(PrivateEndpointConnections.put::parameters.resource, + "json", + "properties" +); +@@extension(PrivateEndpointConnections.put::parameters.resource, + "x-ms-client-name", + "properties" +); +@@doc(PrivateEndpointConnections.put::parameters.resource, + "The private endpoint connection properties." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp index afbb38a879..7fdc65dd27 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp @@ -12,7 +12,9 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("The properties of a storage account’s Queue service.") +/** + * The properties of a storage account’s Queue service. + */ @singleton("default") @parentResource(StorageAccount) model QueueServiceProperties @@ -25,18 +27,36 @@ model QueueServiceProperties @armResourceOperations @projectedName("client", "QueueServiceProperties") interface QueueServicePropertiesOperationGroup { + /** + * Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.") @operationId("QueueServices_GetServiceProperties") getServiceProperties is ArmResourceRead; + /** + * Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. ") @operationId("QueueServices_SetServiceProperties") setServiceProperties is ArmResourceCreateOrReplaceSync; + /** + * List all queue services for the storage account + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List all queue services for the storage account") @operationId("QueueServices_List") list is ArmResourceListByParent; } + +@@projectedName(QueueServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "json", + "parameters" +); +@@extension(QueueServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(QueueServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "The properties of a storage account’s Queue service, only properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules can be specified." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp index 4ce10f0a6b..a1dfcfa9e2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp @@ -11,9 +11,13 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("The storage account.") +/** + * The storage account. + */ model StorageAccount is TrackedResource { - @doc("The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.") + /** + * The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + */ @maxLength(24) @minLength(3) @path @@ -21,7 +25,9 @@ model StorageAccount is TrackedResource { @segment("storageAccounts") name: string; - @doc("The extendedLocation of the resource.") + /** + * The extendedLocation of the resource. + */ extendedLocation?: ExtendedLocation; ...Azure.ResourceManager.ManagedServiceIdentity; @@ -31,34 +37,53 @@ model StorageAccount is TrackedResource { @armResourceOperations interface StorageAccounts { - @doc("Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys.") + /** + * Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys. + */ getProperties is ArmResourceRead< StorageAccount, { ...BaseParameters; - @doc("May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus.") + /** + * May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus. + */ @query("$expand") $expand?: StorageAccountExpand; } >; - @doc("Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.") - create is ArmResourceCreateOrUpdateAsync; + /** + * Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed. + */ + create is ArmResourceCreateOrReplaceAsync; - @doc("The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.") + /** + * The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. + */ + @parameterVisibility("read") update is ArmCustomPatchSync; - @doc("Deletes a storage account in Microsoft Azure.") + /** + * Deletes a storage account in Microsoft Azure. + */ delete is ArmResourceDeleteSync; - @doc("Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.") + /** + * Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("StorageAccounts_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; - @doc("Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.") + /** + * Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this. + */ list is ArmListBySubscription; - @doc("Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.") + /** + * Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account. + */ listKeys is ArmResourceActionSync< StorageAccount, void, @@ -66,21 +91,27 @@ interface StorageAccounts { { ...BaseParameters; - @doc("Specifies type of the key to be listed. Possible value is kerb.") + /** + * Specifies type of the key to be listed. Possible value is kerb. + */ @query("$expand") $expand?: "kerb"; } >; - @doc("Regenerates one of the access keys or Kerberos keys for the specified storage account.") + /** + * Regenerates one of the access keys or Kerberos keys for the specified storage account. + */ regenerateKey is ArmResourceActionSync< StorageAccount, StorageAccountRegenerateKeyParameters, StorageAccountListKeysResult >; + /** + * List SAS credentials of a storage account. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List SAS credentials of a storage account.") @operationId("StorageAccounts_ListAccountSAS") listAccountSAS is ArmResourceActionSync< StorageAccount, @@ -88,8 +119,10 @@ interface StorageAccounts { ListAccountSasResponse >; + /** + * List service SAS credentials of a specific resource. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List service SAS credentials of a specific resource.") @operationId("StorageAccounts_ListServiceSAS") listServiceSAS is ArmResourceActionSync< StorageAccount, @@ -97,7 +130,9 @@ interface StorageAccounts { ListServiceSasResponse >; - @doc("A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance") + /** + * A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance + */ failover is ArmResourceActionAsync< StorageAccount, void, @@ -105,14 +140,18 @@ interface StorageAccounts { { ...BaseParameters; - @doc("The parameter is set to 'Planned' to indicate whether a Planned failover is requested.") + /** + * The parameter is set to 'Planned' to indicate whether a Planned failover is requested. + */ @query("failoverType") failoverType?: "Planned"; }, ArmLroLocationHeader >; - @doc("Live Migration of storage account to enable Hns") + /** + * Live Migration of storage account to enable Hns + */ hierarchicalNamespaceMigration is ArmResourceActionAsync< StorageAccount, void, @@ -120,14 +159,18 @@ interface StorageAccounts { { ...BaseParameters; - @doc("Required. Hierarchical namespace migration type can either be a hierarchical namespace validation request 'HnsOnValidationRequest' or a hydration request 'HnsOnHydrationRequest'. The validation request will validate the migration whereas the hydration request will migrate the account.") + /** + * Required. Hierarchical namespace migration type can either be a hierarchical namespace validation request 'HnsOnValidationRequest' or a hydration request 'HnsOnHydrationRequest'. The validation request will validate the migration whereas the hydration request will migrate the account. + */ @query("requestType") requestType: string; }, ArmLroLocationHeader >; - @doc("Abort live Migration of storage account to enable Hns") + /** + * Abort live Migration of storage account to enable Hns + */ abortHierarchicalNamespaceMigration is ArmResourceActionAsync< StorageAccount, void, @@ -136,7 +179,9 @@ interface StorageAccounts { ArmLroLocationHeader >; - @doc("Restore blobs in the specified blob ranges") + /** + * Restore blobs in the specified blob ranges + */ restoreBlobRanges is ArmResourceActionAsync< StorageAccount, BlobRestoreParameters, @@ -145,34 +190,49 @@ interface StorageAccounts { ArmLroLocationHeader >; - @doc("Revoke user delegation keys.") + /** + * Revoke user delegation keys. + */ revokeUserDelegationKeys is ArmResourceActionSync; - @doc("Checks that the storage account name is valid and is not already in use.") - checkNameAvailability is checkGlobalNameAvailability; + /** + * Checks that the storage account name is valid and is not already in use. + */ + checkNameAvailability is checkGlobalNameAvailability< + StorageAccountCheckNameAvailabilityParameters, + CheckNameAvailabilityResult + >; + /** + * Gets the private link resources that need to be created for a storage account. + */ + // FIXME: PrivateLinkResources_ListByStorageAccount could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("PrivateLinkResources_ListByStorageAccount") - @doc("Gets the private link resources that need to be created for a storage account.") - // FIXME: PrivateLinkResources_ListByStorageAccount could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateLinkResources") @get - ListByStorageAccount is Azure.Core.Foundations.Operation< + listByStorageAccount is Azure.Core.Foundations.Operation< { - @doc("The name of the resource group within the user's subscription. The name is case insensitive.") + /** + * The name of the resource group within the user's subscription. The name is case insensitive. + */ @maxLength(90) @minLength(1) @pattern("^[-\\w\\._\\(\\)]+$") @path resourceGroupName: string; - @doc("The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.") + /** + * The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + */ @maxLength(24) @minLength(3) @path accountName: string; - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; @@ -180,3 +240,70 @@ interface StorageAccounts { PrivateLinkResourceListResult >; } + +@@projectedName(StorageAccounts.create::parameters.resource, + "json", + "parameters" +); +@@extension(StorageAccounts.create::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(StorageAccounts.create::parameters.resource, + "The parameters to provide for the created account." +); +@@projectedName(StorageAccounts.update::parameters.properties, + "json", + "parameters" +); +@@extension(StorageAccounts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(StorageAccounts.update::parameters.properties, + "The parameters to provide for the updated account." +); +@@projectedName(StorageAccounts.regenerateKey::parameters.body, + "json", + "regenerateKey" +); +@@extension(StorageAccounts.regenerateKey::parameters.body, + "x-ms-client-name", + "regenerateKey" +); +@@doc(StorageAccounts.regenerateKey::parameters.body, + "Specifies name of the key which should be regenerated -- key1, key2, kerb1, kerb2." +); +@@projectedName(StorageAccounts.listAccountSAS::parameters.body, + "json", + "parameters" +); +@@extension(StorageAccounts.listAccountSAS::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(StorageAccounts.listAccountSAS::parameters.body, + "The parameters to provide to list SAS credentials for the storage account." +); +@@projectedName(StorageAccounts.listServiceSAS::parameters.body, + "json", + "parameters" +); +@@extension(StorageAccounts.listServiceSAS::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(StorageAccounts.listServiceSAS::parameters.body, + "The parameters to provide to list service SAS credentials." +); +@@projectedName(StorageAccounts.restoreBlobRanges::parameters.body, + "json", + "parameters" +); +@@extension(StorageAccounts.restoreBlobRanges::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(StorageAccounts.restoreBlobRanges::parameters.body, + "The parameters to provide for restore blob ranges." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp index e7ac5dea0d..78b03c72f6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp @@ -15,7 +15,9 @@ namespace Microsoft.Storage; @parentResource(QueueServiceProperties) model StorageQueue is ProxyResource { - @doc("A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.") + /** + * A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters. + */ @maxLength(63) @minLength(3) @pattern("^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$") @@ -27,41 +29,73 @@ model StorageQueue is ProxyResource { @armResourceOperations interface StorageQueues { + /** + * Gets the queue with the specified queue name, under the specified account if it exists. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the queue with the specified queue name, under the specified account if it exists.") @operationId("Queue_Get") get is ArmResourceRead; + /** + * Creates a new queue with the specified queue name, under the specified account. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates a new queue with the specified queue name, under the specified account.") @operationId("Queue_Create") create is ArmResourceCreateOrReplaceSync; + /** + * Creates a new queue with the specified queue name, under the specified account. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates a new queue with the specified queue name, under the specified account.") + @parameterVisibility("read") @operationId("Queue_Update") update is ArmCustomPatchSync; + /** + * Deletes the queue with the specified queue name, under the specified account if it exists. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the queue with the specified queue name, under the specified account if it exists.") @operationId("Queue_Delete") delete is ArmResourceDeleteSync; + /** + * Gets a list of all the queues under the specified storage account + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets a list of all the queues under the specified storage account") @operationId("Queue_List") list is ArmResourceListByParent< StorageQueue, { ...BaseParameters; - @doc("Optional, a maximum number of queues that should be included in a list queue response") + /** + * Optional, a maximum number of queues that should be included in a list queue response + */ @query("$maxpagesize") $maxpagesize?: string; - @doc("Optional, When specified, only the queues with a name starting with the given filter will be listed.") + /** + * Optional, When specified, only the queues with a name starting with the given filter will be listed. + */ @query("$filter") $filter?: string; } >; } + +@@projectedName(StorageQueues.create::parameters.resource, "json", "queue"); +@@extension(StorageQueues.create::parameters.resource, + "x-ms-client-name", + "queue" +); +@@doc(StorageQueues.create::parameters.resource, + "Queue properties and metadata to be created with" +); +@@projectedName(StorageQueues.update::parameters.properties, "json", "queue"); +@@extension(StorageQueues.update::parameters.properties, + "x-ms-client-name", + "queue" +); +@@doc(StorageQueues.update::parameters.properties, + "Queue properties and metadata to be created with" +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp index 871fdcff9f..86d92e02dd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("Properties of the table, including Id, resource name, resource type.") +/** + * Properties of the table, including Id, resource name, resource type. + */ @parentResource(TableServiceProperties) model Table is ProxyResource { - @doc("A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character.") + /** + * A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character. + */ @maxLength(63) @minLength(3) @pattern("^[A-Za-z][A-Za-z0-9]{2,62}$") @@ -27,28 +31,56 @@ model Table is ProxyResource { @armResourceOperations interface Tables { + /** + * Gets the table with the specified table name, under the specified account if it exists. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the table with the specified table name, under the specified account if it exists.") @operationId("Table_Get") get is ArmResourceRead
    ; + /** + * Creates a new table with the specified table name, under the specified account. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates a new table with the specified table name, under the specified account.") @operationId("Table_Create") create is ArmResourceCreateOrReplaceSync
    ; + /** + * Creates a new table with the specified table name, under the specified account. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Creates a new table with the specified table name, under the specified account.") + @parameterVisibility("read") @operationId("Table_Update") update is ArmCustomPatchSync; + /** + * Deletes the table with the specified table name, under the specified account if it exists. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Deletes the table with the specified table name, under the specified account if it exists.") @operationId("Table_Delete") delete is ArmResourceDeleteSync
    ; + /** + * Gets a list of all the tables under the specified storage account + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets a list of all the tables under the specified storage account") @operationId("Table_List") list is ArmResourceListByParent
    ; } + +@@projectedName(Tables.create::parameters.resource, "json", "parameters"); +@@extension(Tables.create::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(Tables.create::parameters.resource, + "The parameters to provide to create a table." +); +@@projectedName(Tables.update::parameters.properties, "json", "parameters"); +@@extension(Tables.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(Tables.update::parameters.properties, + "The parameters to provide to create a table." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp index 99fbd3e7e5..1a7b6d5994 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp @@ -12,7 +12,9 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Storage; -@doc("The properties of a storage account’s Table service.") +/** + * The properties of a storage account’s Table service. + */ @singleton("default") @parentResource(StorageAccount) model TableServiceProperties @@ -25,18 +27,36 @@ model TableServiceProperties @armResourceOperations @projectedName("client", "TableServiceProperties") interface TableServicePropertiesOperationGroup { + /** + * Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.") @operationId("TableServices_GetServiceProperties") getServiceProperties is ArmResourceRead; + /** + * Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. ") @operationId("TableServices_SetServiceProperties") setServiceProperties is ArmResourceCreateOrReplaceSync; + /** + * List all table services for the storage account. + */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @doc("List all table services for the storage account.") @operationId("TableServices_List") list is ArmResourceListByParent; } + +@@projectedName(TableServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "json", + "parameters" +); +@@extension(TableServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(TableServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "The properties of a storage account’s Table service, only properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules can be specified." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicy.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy_With_Allow_Protected_Append_Writes_All.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy_With_Allow_Protected_Append_Writes_All.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithDefaultEncryptionScope.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_Put_Container_With_Default_Encryption_Scope.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithDefaultEncryptionScope.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_Put_Container_With_Default_Encryption_Scope.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithObjectLevelWorm.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_Put_Container_With_Object_Level_Worm.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithObjectLevelWorm.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_Put_Container_With_Object_Level_Worm.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_Put_Containers.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainers.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_Put_Containers.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetBlobContainersGetWithAllowProtectedAppendWritesAll.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_Get_Blob_Containers_Get_With_Allow_Protected_Append_Writes_All.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetBlobContainersGetWithAllowProtectedAppendWritesAll.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_Get_Blob_Containers_Get_With_Allow_Protected_Append_Writes_All.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetContainers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_Get_Containers.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetContainers.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_Get_Containers.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_AcquireALeaseOnAContainer.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_Acquire_A_Lease_On_A_Container.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_AcquireALeaseOnAContainer.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_Acquire_A_Lease_On_A_Container.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_BreakALeaseOnAContainer.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_Break_A_Lease_On_A_Container.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_BreakALeaseOnAContainer.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_Break_A_Lease_On_A_Container.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListContainers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_List_Containers.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListContainers.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_List_Containers.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListDeletedContainers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_List_Deleted_Containers.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListDeletedContainers.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_List_Deleted_Containers.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_Set_Legal_Hold_Containers.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainers.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_Set_Legal_Hold_Containers.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainersWithAllowProtectedAppendWritesAll.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_Set_Legal_Hold_Containers_With_Allow_Protected_Append_Writes_All.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainersWithAllowProtectedAppendWritesAll.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_Set_Legal_Hold_Containers_With_Allow_Protected_Append_Writes_All.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicy.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Hns_Account.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Hns_Account.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Non_Hns_Account.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Non_Hns_Account.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutAllowPermanentDelete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_Blob_Services_Put_Allow_Permanent_Delete.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutAllowPermanentDelete.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_Blob_Services_Put_Allow_Permanent_Delete.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutLastAccessTimeBasedTracking.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_Blob_Services_Put_Last_Access_Time_Based_Tracking.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutLastAccessTimeBasedTracking.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_Blob_Services_Put_Last_Access_Time_Based_Tracking.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_PutBlobServices.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_Put_Blob_Services.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_PutBlobServices.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_Put_Blob_Services.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScope.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScope.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope_With_Infrastructure_Encryption.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope_With_Infrastructure_Encryption.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServices.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_Put_File_Services.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServices.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_Put_File_Services.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSecureSmbFeatures.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_Put_File_Services_Enable_Secure_Smb_Features.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSecureSmbFeatures.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_Put_File_Services_Enable_Secure_Smb_Features.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSmbMultichannel.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_Put_File_Services_Enable_Smb_Multichannel.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSmbMultichannel.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_Put_File_Services_Enable_Smb_Multichannel.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_CreateNfsShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_Create_Nfs_Shares.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_CreateNfsShares.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_Create_Nfs_Shares.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_Put_Shares.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutShares.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_Put_Shares.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutSharesWithAccessTier.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_Put_Shares_With_Access_Tier.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutSharesWithAccessTier.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_Put_Shares_With_Access_Tier.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShareStats.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_Get_Share_Stats.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShareStats.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_Get_Share_Stats.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_Get_Shares.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShares.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_Get_Shares.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_AcquireALeaseOnAShare.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_Acquire_A_Lease_On_A_Share.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_AcquireALeaseOnAShare.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_Acquire_A_Lease_On_A_Share.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_BreakALeaseOnAShare.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_Break_A_Lease_On_A_Share.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_BreakALeaseOnAShare.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_Break_A_Lease_On_A_Share.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListDeletedShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_List_Deleted_Shares.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListDeletedShares.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_List_Deleted_Shares.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShareSnapshots.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_List_Share_Snapshots.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShareSnapshots.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_List_Share_Snapshots.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_List_Shares.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShares.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_List_Shares.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShareAcls.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_Update_Share_Acls.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShareAcls.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_Update_Share_Acls.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_Update_Shares.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShares.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_Update_Shares.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_CreateLocalUser.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_Create_Local_User.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_CreateLocalUser.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_Create_Local_User.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_UpdateLocalUser.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_Update_Local_User.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_UpdateLocalUser.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_Update_Local_User.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicies.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policies.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicies.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policies.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Base_Blob_Days_After_Creation_Actions.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Base_Blob_Days_After_Creation_Actions.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyColdTierActions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Cold_Tier_Actions.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyColdTierActions.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Cold_Tier_Actions.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_For_Block_And_Append_Blobs.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_For_Block_And_Append_Blobs.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyHotTierActions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Hot_Tier_Actions.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyHotTierActions.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Hot_Tier_Actions.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastAccessTimeBasedBlobActions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Access_Time_Based_Blob_Actions.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastAccessTimeBasedBlobActions.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Access_Time_Based_Blob_Actions.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastTierChangeTimeActions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Tier_Change_Time_Actions.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastTierChangeTimeActions.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Tier_Change_Time_Actions.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyWithSnapshotAndVersion.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_With_Snapshot_And_Version.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyWithSnapshotAndVersion.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_With_Snapshot_And_Version.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnDestination.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Destination.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnDestination.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Destination.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnSource.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Source.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnSource.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Source.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnDestination.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Destination.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnDestination.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Destination.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnSource.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Source.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnSource.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Source.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPut.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_Queue_Operation_Put.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPut.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_Queue_Operation_Put.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPutWithMetadata.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_Queue_Operation_Put_With_Metadata.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPutWithMetadata.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_Queue_Operation_Put_With_Metadata.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_NfsV3AccountCreate.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Nfs_V3_Account_Create.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_NfsV3AccountCreate.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Nfs_V3_Account_Create.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreate.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreate.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToAad.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Aad.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToAad.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Aad.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToPrivateLink.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Private_Link.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToPrivateLink.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Private_Link.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDisallowPublicNetworkAccess.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_Disallow_Public_Network_Access.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDisallowPublicNetworkAccess.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_Disallow_Public_Network_Access.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Azure_Dns_Zone.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Azure_Dns_Zone.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToStandard.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Standard.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToStandard.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Standard.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateEnablePublicNetworkAccess.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_Enable_Public_Network_Access.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateEnablePublicNetworkAccess.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_Enable_Public_Network_Access.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreatePremiumBlockBlobStorage.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_Premium_Block_Blob_Storage.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreatePremiumBlockBlobStorage.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_Premium_Block_Blob_Storage.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedEncryptionIdentityWithCmk.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_User_Assigned_Encryption_Identity_With_Cmk.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedEncryptionIdentityWithCmk.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_User_Assigned_Encryption_Identity_With_Cmk.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_User_Assigned_Identity_With_Federated_Identity_Client_Id.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_User_Assigned_Identity_With_Federated_Identity_Client_Id.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateWithImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_With_Immutability_Policy.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateWithImmutabilityPolicy.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_Storage_Account_Create_With_Immutability_Policy.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailover.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_Storage_Account_Failover.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailover.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_Storage_Account_Failover.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailoverPlanned.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_Storage_Account_Failover_Planned.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailoverPlanned.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_Storage_Account_Failover_Planned.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetAsyncSkuConversionStatus.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_Storage_Account_Get_Async_Sku_Conversion_Status.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetAsyncSkuConversionStatus.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_Storage_Account_Get_Async_Sku_Conversion_Status.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_Storage_Account_Get_Properties.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetProperties.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_Storage_Account_Get_Properties.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Enabled.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkEnabled.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Enabled.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkVersionExpirationTime.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Version_Expiration_Time.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkVersionExpirationTime.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Version_Expiration_Time.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKerbKey.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Kerb_Key.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKerbKey.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Kerb_Key.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKey.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Key.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKey.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Key.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableAd.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Enable_Ad.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableAd.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Enable_Ad.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableCmk.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Enable_Cmk.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableCmk.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Enable_Cmk.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Update.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdate.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Update.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateAllowedCopyScopeToAad.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Update_Allowed_Copy_Scope_To_Aad.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateAllowedCopyScopeToAad.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Update_Allowed_Copy_Scope_To_Aad.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateDisablePublicNetworkAccess.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Update_Disable_Public_Network_Access.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateDisablePublicNetworkAccess.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Update_Disable_Public_Network_Access.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedEncryptionIdentityWithCmk.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Update_User_Assigned_Encryption_Identity_With_Cmk.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedEncryptionIdentityWithCmk.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Update_User_Assigned_Encryption_Identity_With_Cmk.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Update_User_Assigned_Identity_With_Federated_Identity_Client_Id.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Update_User_Assigned_Identity_With_Federated_Identity_Client_Id.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateWithImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Update_With_Immutability_Policy.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateWithImmutabilityPolicy.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_Storage_Account_Update_With_Immutability_Policy.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPut.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_Table_Operation_Put.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPut.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_Table_Operation_Put.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPutOrPatchAcls.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_Table_Operation_Put_Or_Patch_Acls.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPutOrPatchAcls.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_Table_Operation_Put_Or_Patch_Acls.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPatch.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_Table_Operation_Patch.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPatch.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_Table_Operation_Patch.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPutOrPatchAcls.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_Table_Operation_Put_Or_Patch_Acls.json similarity index 100% rename from packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPutOrPatchAcls.json rename to packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_Table_Operation_Put_Or_Patch_Acls.json diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp index 8ca5d65a99..7d9bc17e82 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp @@ -28,6 +28,9 @@ using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; +/** + * The Azure Storage Management API. + */ @armProviderNamespace @service({ title: "Azure Storage resource management API.", @@ -35,13 +38,16 @@ using TypeSpec.Versioning; @versioned(Versions) // FIXME: Common type version v1 is not supported for now. // @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v1) -@doc("The Azure Storage Management API.") namespace Microsoft.Storage; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { + /** + * The 2022-09-01 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2022-09-01 API version.") v2022_09_01: "2022-09-01", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp index dfe7bb8ab5..7659b60256 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp @@ -13,7 +13,9 @@ namespace Microsoft.Storage; interface Operations extends Azure.ResourceManager.Operations {} -@doc("The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType.") +/** + * The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType. + */ enum SkuName { Standard_LRS, Standard_GRS, @@ -25,7 +27,9 @@ enum SkuName { Standard_RAGZRS, } -@doc("Indicates the type of storage account.") +/** + * Indicates the type of storage account. + */ enum Kind { Storage, StorageV2, @@ -34,18 +38,24 @@ enum Kind { BlockBlobStorage, } -@doc("The reason for the restriction. As of now this can be \"QuotaId\" or \"NotAvailableForSubscription\". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The \"NotAvailableForSubscription\" is related to capacity at DC.") +/** + * The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The "NotAvailableForSubscription" is related to capacity at DC. + */ enum ReasonCode { QuotaId, NotAvailableForSubscription, } -@doc("The type of extendedLocation.") +/** + * The type of extendedLocation. + */ enum ExtendedLocationTypes { EdgeZone, } -@doc("The identity type.") +/** + * The identity type. + */ enum IdentityType { None, SystemAssigned, @@ -53,36 +63,48 @@ enum IdentityType { `SystemAssigned,UserAssigned`, } -@doc("Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet.") +/** + * Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. + */ enum AllowedCopyScope { PrivateLink, AAD, } -@doc("Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.") +/** + * Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + */ enum PublicNetworkAccess { Enabled, Disabled, } -@doc("The SAS expiration action. Can only be Log.") +/** + * The SAS expiration action. Can only be Log. + */ enum ExpirationAction { Log, } -@doc("Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used.") +/** + * Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used. + */ enum KeyType { Service, Account, } -@doc("The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault") +/** + * The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault + */ enum KeySource { `Microsoft.Storage`, `Microsoft.Keyvault`, } -@doc("Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, \"Logging, Metrics\"), or None to bypass none of those traffics.") +/** + * Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics. + */ enum Bypass { None, Logging, @@ -90,7 +112,9 @@ enum Bypass { AzureServices, } -@doc("Gets the state of virtual network rule.") +/** + * Gets the state of virtual network rule. + */ enum State { Provisioning, Deprovisioning, @@ -99,7 +123,9 @@ enum State { NetworkSourceDeleted, } -@doc("Indicates the directory service used. Note that this enum may be extended in the future.") +/** + * Indicates the directory service used. Note that this enum may be extended in the future. + */ enum DirectoryServiceOptions { None, AADDS, @@ -107,13 +133,17 @@ enum DirectoryServiceOptions { AADKERB, } -@doc("Specifies the Active Directory account type for Azure Storage.") +/** + * Specifies the Active Directory account type for Azure Storage. + */ enum AccountType { User, Computer, } -@doc("Default share permission for users using Kerberos authentication if RBAC role is not assigned.") +/** + * Default share permission for users using Kerberos authentication if RBAC role is not assigned. + */ enum DefaultSharePermission { None, StorageFileDataSmbShareReader, @@ -121,53 +151,69 @@ enum DefaultSharePermission { StorageFileDataSmbShareElevatedContributor, } -@doc("Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled.") +/** + * Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. + */ enum LargeFileSharesState { Disabled, Enabled, } -@doc("Routing Choice defines the kind of network routing opted by the user.") +/** + * Routing Choice defines the kind of network routing opted by the user. + */ enum RoutingChoice { MicrosoftRouting, InternetRouting, } -@doc("Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.") +/** + * Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. + */ enum MinimumTlsVersion { TLS1_0, TLS1_1, TLS1_2, } -@doc("The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted.") +/** + * The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted. + */ enum AccountImmutabilityPolicyState { Unlocked, Locked, Disabled, } -@doc("Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier.") +/** + * Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier. + */ enum DnsEndpointType { Standard, AzureDnsZone, } -@doc("The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable.") +/** + * The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable. + */ enum GeoReplicationStatus { Live, Bootstrap, Unavailable, } -@doc("The private endpoint connection status.") +/** + * The private endpoint connection status. + */ enum PrivateEndpointServiceConnectionStatus { Pending, Approved, Rejected, } -@doc("The current provisioning state.") +/** + * The current provisioning state. + */ enum PrivateEndpointConnectionProvisioningState { Succeeded, Creating, @@ -175,21 +221,27 @@ enum PrivateEndpointConnectionProvisioningState { Failed, } -@doc("The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed.") +/** + * The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed. + */ enum BlobRestoreProgressStatus { InProgress, Complete, Failed, } -@doc("This property indicates the current sku conversion status.") +/** + * This property indicates the current sku conversion status. + */ enum SkuConversionStatus { InProgress, Succeeded, Failed, } -@doc("The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f).") +/** + * The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). + */ enum Services { b, q, @@ -197,14 +249,18 @@ enum Services { f, } -@doc("The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files.") +/** + * The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files. + */ enum SignedResourceTypes { s, c, o, } -@doc("The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p).") +/** + * The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). + */ enum Permissions { r, d, @@ -216,7 +272,9 @@ enum Permissions { p, } -@doc("The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s).") +/** + * The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s). + */ enum SignedResource { b, c, @@ -228,7 +286,9 @@ enum ManagementPolicyName { default, } -@doc("The valid value is Lifecycle") +/** + * The valid value is Lifecycle + */ enum RuleType { Lifecycle, } @@ -237,44 +297,48 @@ enum BlobInventoryPolicyName { default, } -@doc("The valid value is Inventory") +/** + * The valid value is Inventory + */ enum InventoryRuleType { Inventory, } -@doc("This is a required field, it specifies the format for the inventory files.") +/** + * This is a required field, it specifies the format for the inventory files. + */ enum Format { Csv, Parquet, } -@doc("This is a required field. This field is used to schedule an inventory formation.") +/** + * This is a required field. This field is used to schedule an inventory formation. + */ enum Schedule { Daily, Weekly, } -@doc("This is a required field. This field specifies the scope of the inventory created either at the blob or container level.") +/** + * This is a required field. This field specifies the scope of the inventory created either at the blob or container level. + */ enum ObjectType { Blob, Container, } -@doc("The type of identity that created the resource.") -enum CreatedByType { - User, - Application, - ManagedIdentity, - Key, -} - -@doc("The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault.") +/** + * The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault. + */ enum EncryptionScopeSource { `Microsoft.Storage`, `Microsoft.KeyVault`, } -@doc("The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled.") +/** + * The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. + */ enum EncryptionScopeState { Enabled, Disabled, @@ -297,7 +361,9 @@ enum AllowedMethods { PATCH, } -@doc("Name of the policy. The valid value is AccessTimeTracking. This field is currently read only") +/** + * Name of the policy. The valid value is AccessTimeTracking. This field is currently read only + */ enum Name { AccessTimeTracking, } @@ -306,13 +372,17 @@ enum ListContainersInclude { deleted, } -@doc("The lease status of the container.") +/** + * The lease status of the container. + */ enum LeaseStatus { Locked, Unlocked, } -@doc("Lease state of the container.") +/** + * Lease state of the container. + */ enum LeaseState { Available, Leased, @@ -321,32 +391,42 @@ enum LeaseState { Broken, } -@doc("Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.") +/** + * Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased. + */ enum LeaseDuration { Infinite, Fixed, } -@doc("The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.") +/** + * The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. + */ enum ImmutabilityPolicyState { Locked, Unlocked, } -@doc("The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend.") +/** + * The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend. + */ enum ImmutabilityPolicyUpdateType { put, lock, extend, } -@doc("This property denotes the container level immutability to object level immutability migration state.") +/** + * This property denotes the container level immutability to object level immutability migration state. + */ enum MigrationState { InProgress, Completed, } -@doc("Specifies the lease action. Can be one of the available actions.") +/** + * Specifies the lease action. Can be one of the available actions. + */ enum LeaseContainerRequestAction { Acquire, Renew, @@ -355,20 +435,26 @@ enum LeaseContainerRequestAction { Break, } -@doc("The authentication protocol that is used for the file share. Can only be specified when creating a share.") +/** + * The authentication protocol that is used for the file share. Can only be specified when creating a share. + */ enum EnabledProtocols { SMB, NFS, } -@doc("The property is for NFS share only. The default is NoRootSquash.") +/** + * The property is for NFS share only. The default is NoRootSquash. + */ enum RootSquashType { NoRootSquash, RootSquash, AllSquash, } -@doc("Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.") +/** + * Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. + */ enum ShareAccessTier { TransactionOptimized, Hot, @@ -376,7 +462,9 @@ enum ShareAccessTier { Premium, } -@doc("Specifies the lease action. Can be one of the available actions.") +/** + * Specifies the lease action. Can be one of the available actions. + */ enum LeaseShareAction { Acquire, Renew, @@ -385,28 +473,27 @@ enum LeaseShareAction { Break, } -@doc("The SKU tier. This is based on the SKU name.") -@fixed -enum SkuTier { - Standard, - Premium, -} - -@doc("Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false.") +/** + * Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false. + */ @fixed enum Reason { AccountNameInvalid, AlreadyExists, } -@doc("Specifies the default action of allow or deny when no other rules match.") +/** + * Specifies the default action of allow or deny when no other rules match. + */ @fixed enum DefaultAction { Allow, Deny, } -@doc("Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.") +/** + * Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type. + */ @fixed enum AccessTier { Hot, @@ -414,7 +501,9 @@ enum AccessTier { Premium, } -@doc("Gets the status of the storage account at the time the operation was called.") +/** + * Gets the status of the storage account at the time the operation was called. + */ @fixed enum ProvisioningState { Creating, @@ -422,7 +511,9 @@ enum ProvisioningState { Succeeded, } -@doc("Gets the status indicating whether the primary location of the storage account is available or unavailable.") +/** + * Gets the status indicating whether the primary location of the storage account is available or unavailable. + */ @fixed enum AccountStatus { available, @@ -435,14 +526,18 @@ enum StorageAccountExpand { blobRestoreStatus, } -@doc("Permissions for the key -- read-only or full permissions.") +/** + * Permissions for the key -- read-only or full permissions. + */ @fixed enum KeyPermission { Read, Full, } -@doc("Gets the unit of measurement.") +/** + * Gets the unit of measurement. + */ @fixed enum UsageUnit { Count, @@ -453,14 +548,18 @@ enum UsageUnit { BytesPerSecond, } -@doc("The protocol permitted for a request made with the account SAS.") +/** + * The protocol permitted for a request made with the account SAS. + */ @fixed enum HttpProtocol { `https,http`, https, } -@doc("Specifies whether data in the container may be accessed publicly and the level of access.") +/** + * Specifies whether data in the container may be accessed publicly and the level of access. + */ @fixed enum PublicAccess { Container, @@ -468,745 +567,1181 @@ enum PublicAccess { None, } -@doc("Properties of operation, include metric specifications.") +/** + * Properties of operation, include metric specifications. + */ model OperationProperties { - @doc("One property of operation, include metric specifications.") + /** + * One property of operation, include metric specifications. + */ serviceSpecification?: ServiceSpecification; } -@doc("One property of operation, include metric specifications.") +/** + * One property of operation, include metric specifications. + */ model ServiceSpecification { - @doc("Metric specifications of operation.") + /** + * Metric specifications of operation. + */ metricSpecifications?: MetricSpecification[]; } -@doc("Metric specification of operation.") +/** + * Metric specification of operation. + */ model MetricSpecification { - @doc("Name of metric specification.") + /** + * Name of metric specification. + */ name?: string; - @doc("Display name of metric specification.") + /** + * Display name of metric specification. + */ displayName?: string; - @doc("Display description of metric specification.") + /** + * Display description of metric specification. + */ displayDescription?: string; - @doc("Unit could be Bytes or Count.") + /** + * Unit could be Bytes or Count. + */ unit?: string; - @doc("Dimensions of blobs, including blob type and access tier.") + /** + * Dimensions of blobs, including blob type and access tier. + */ dimensions?: Dimension[]; - @doc("Aggregation type could be Average.") + /** + * Aggregation type could be Average. + */ aggregationType?: string; - @doc("The property to decide fill gap with zero or not.") + /** + * The property to decide fill gap with zero or not. + */ fillGapWithZero?: boolean; - @doc("The category this metric specification belong to, could be Capacity.") + /** + * The category this metric specification belong to, could be Capacity. + */ category?: string; - @doc("Account Resource Id.") + /** + * Account Resource Id. + */ resourceIdDimensionNameOverride?: string; } -@doc("Dimension of blobs, possibly be blob type or access tier.") +/** + * Dimension of blobs, possibly be blob type or access tier. + */ model Dimension { - @doc("Display name of dimension.") + /** + * Display name of dimension. + */ name?: string; - @doc("Display name of dimension.") + /** + * Display name of dimension. + */ displayName?: string; } -@doc("The response from the List Storage SKUs operation.") +/** + * The response from the List Storage SKUs operation. + */ @pagedResult model StorageSkuListResult { - @doc("Get the list result of storage SKUs and their properties.") + /** + * Get the list result of storage SKUs and their properties. + */ @visibility("read") @items value?: SkuInformation[]; } -@doc("Storage SKU and its properties") +/** + * Storage SKU and its properties + */ model SkuInformation { - @doc("The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType.") + /** + * The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType. + */ name: SkuName; - @doc("The SKU tier. This is based on the SKU name.") + /** + * The SKU tier. This is based on the SKU name. + */ @visibility("read") tier?: SkuTier; - @doc("The type of the resource, usually it is 'storageAccounts'.") + /** + * The type of the resource, usually it is 'storageAccounts'. + */ @visibility("read") resourceType?: string; - @doc("Indicates the type of storage account.") + /** + * Indicates the type of storage account. + */ @visibility("read") kind?: Kind; - @doc("The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.).") + /** + * The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). + */ @visibility("read") locations?: string[]; - @doc("The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc.") + /** + * The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc. + */ @visibility("read") capabilities?: SKUCapability[]; - @doc("The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.") + /** + * The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + */ restrictions?: Restriction[]; } -@doc("The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc.") +/** + * The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc. + */ model SKUCapability { - @doc("The name of capability, The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc.") + /** + * The name of capability, The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc. + */ @visibility("read") name?: string; - @doc("A string value to indicate states of given capability. Possibly 'true' or 'false'.") + /** + * A string value to indicate states of given capability. Possibly 'true' or 'false'. + */ @visibility("read") value?: string; } -@doc("The restriction because of which SKU cannot be used.") +/** + * The restriction because of which SKU cannot be used. + */ model Restriction { - @doc("The type of restrictions. As of now only possible value for this is location.") + /** + * The type of restrictions. As of now only possible value for this is location. + */ @visibility("read") type?: string; - @doc("The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.") + /** + * The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted. + */ @visibility("read") values?: string[]; - @doc("The reason for the restriction. As of now this can be \"QuotaId\" or \"NotAvailableForSubscription\". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The \"NotAvailableForSubscription\" is related to capacity at DC.") + /** + * The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The "NotAvailableForSubscription" is related to capacity at DC. + */ reasonCode?: ReasonCode; } -@doc("The parameters used to check the availability of the storage account name.") +/** + * The parameters used to check the availability of the storage account name. + */ model StorageAccountCheckNameAvailabilityParameters { - @doc("The storage account name.") + /** + * The storage account name. + */ name: string; - @doc("The type of resource, Microsoft.Storage/storageAccounts") + /** + * The type of resource, Microsoft.Storage/storageAccounts + */ type: "Microsoft.Storage/storageAccounts"; } -@doc("The CheckNameAvailability operation response.") +/** + * The CheckNameAvailability operation response. + */ model CheckNameAvailabilityResult { - @doc("Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used.") + /** + * Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used. + */ @visibility("read") nameAvailable?: boolean; - @doc("Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false.") + /** + * Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false. + */ @visibility("read") reason?: Reason; - @doc("Gets an error message explaining the Reason value in more detail.") + /** + * Gets an error message explaining the Reason value in more detail. + */ @visibility("read") message?: string; } -@doc("The parameters used when creating a storage account.") +/** + * The parameters used when creating a storage account. + */ model StorageAccountCreateParameters { - @doc("Required. Gets or sets the SKU name.") + /** + * Required. Gets or sets the SKU name. + */ sku: Sku; - @doc("Required. Indicates the type of storage account.") + /** + * Required. Indicates the type of storage account. + */ kind: Kind; - @doc("Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed.") + /** + * Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update, the request will succeed. + */ location: string; - @doc("Optional. Set the extended location of the resource. If not set, the storage account will be created in Azure main region. Otherwise it will be created in the specified extended location") + /** + * Optional. Set the extended location of the resource. If not set, the storage account will be created in Azure main region. Otherwise it will be created in the specified extended location + */ extendedLocation?: ExtendedLocation; - @doc("Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters.") + /** + * Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. + */ tags?: Record; - @doc("The identity of the resource.") + /** + * The identity of the resource. + */ identity?: Identity; - @doc("The parameters used to create the storage account.") + /** + * The parameters used to create the storage account. + */ properties?: StorageAccountPropertiesCreateParameters; } -@doc("The SKU of the storage account.") +/** + * The SKU of the storage account. + */ model Sku { - @doc("The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType.") + /** + * The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType. + */ name: SkuName; - @doc("The SKU tier. This is based on the SKU name.") + /** + * The SKU tier. This is based on the SKU name. + */ @visibility("read") tier?: SkuTier; } -@doc("The complex type of the extended location.") +/** + * The complex type of the extended location. + */ model ExtendedLocation { - @doc("The name of the extended location.") + /** + * The name of the extended location. + */ name?: string; - @doc("The type of the extended location.") + /** + * The type of the extended location. + */ type?: ExtendedLocationTypes; } -@doc("Identity for the resource.") +/** + * Identity for the resource. + */ model Identity { - @doc("The principal ID of resource identity.") + /** + * The principal ID of resource identity. + */ @visibility("read") principalId?: string; - @doc("The tenant ID of resource.") + /** + * The tenant ID of resource. + */ @visibility("read") tenantId?: string; - @doc("The identity type.") + /** + * The identity type. + */ type: IdentityType; - @doc("Gets or sets a list of key value pairs that describe the set of User Assigned identities that will be used with this storage account. The key is the ARM resource identifier of the identity. Only 1 User Assigned identity is permitted here.") + /** + * Gets or sets a list of key value pairs that describe the set of User Assigned identities that will be used with this storage account. The key is the ARM resource identifier of the identity. Only 1 User Assigned identity is permitted here. + */ userAssignedIdentities?: Record; } -@doc("The parameters used to create the storage account.") +/** + * The parameters used to create the storage account. + */ model StorageAccountPropertiesCreateParameters { - @doc("Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet.") + /** + * Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. + */ allowedCopyScope?: AllowedCopyScope; - @doc("Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.") + /** + * Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + */ publicNetworkAccess?: PublicNetworkAccess; - @doc("SasPolicy assigned to the storage account.") + /** + * SasPolicy assigned to the storage account. + */ sasPolicy?: SasPolicy; - @doc("KeyPolicy assigned to the storage account.") + /** + * KeyPolicy assigned to the storage account. + */ keyPolicy?: KeyPolicy; - @doc("User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property.") + /** + * User domain assigned to the storage account. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. + */ customDomain?: CustomDomain; - @doc("Encryption settings to be used for server-side encryption for the storage account.") + /** + * Encryption settings to be used for server-side encryption for the storage account. + */ encryption?: Encryption; - @doc("Network rule set") + /** + * Network rule set + */ @projectedName("json", "networkAcls") networkRuleSet?: NetworkRuleSet; - @doc("Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.") + /** + * Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type. + */ accessTier?: AccessTier; - @doc("Provides the identity based authentication settings for Azure Files.") + /** + * Provides the identity based authentication settings for Azure Files. + */ azureFilesIdentityBasedAuthentication?: AzureFilesIdentityBasedAuthentication; - @doc("Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01.") + /** + * Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. + */ @projectedName("json", "supportsHttpsTrafficOnly") enableHttpsTrafficOnly?: boolean; - @doc("Enables Secure File Transfer Protocol, if set to true") + /** + * Enables Secure File Transfer Protocol, if set to true + */ @projectedName("json", "isSftpEnabled") IsSftpEnabled?: boolean; - @doc("Enables local users feature, if set to true") + /** + * Enables local users feature, if set to true + */ @projectedName("json", "isLocalUserEnabled") IsLocalUserEnabled?: boolean; - @doc("Account HierarchicalNamespace enabled if sets to true.") + /** + * Account HierarchicalNamespace enabled if sets to true. + */ @projectedName("json", "isHnsEnabled") IsHnsEnabled?: boolean; - @doc("Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled.") + /** + * Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. + */ largeFileSharesState?: LargeFileSharesState; - @doc("Maintains information about the network routing choice opted by the user for data transfer") + /** + * Maintains information about the network routing choice opted by the user for data transfer + */ routingPreference?: RoutingPreference; - @doc("Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property.") + /** + * Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. + */ allowBlobPublicAccess?: boolean; - @doc("Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.") + /** + * Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. + */ minimumTlsVersion?: MinimumTlsVersion; - @doc("Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true.") + /** + * Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true. + */ allowSharedKeyAccess?: boolean; - @doc("NFS 3.0 protocol support enabled if set to true.") + /** + * NFS 3.0 protocol support enabled if set to true. + */ @projectedName("json", "isNfsV3Enabled") enableNfsV3?: boolean; - @doc("Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property.") + /** + * Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property. + */ allowCrossTenantReplication?: boolean; - @doc("A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property.") + /** + * A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property. + */ defaultToOAuthAuthentication?: boolean; - @doc("The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the new containers in the account by default.") + /** + * The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the new containers in the account by default. + */ immutableStorageWithVersioning?: ImmutableStorageAccount; - @doc("Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier.") + /** + * Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier. + */ dnsEndpointType?: DnsEndpointType; } -@doc("SasPolicy assigned to the storage account.") +/** + * SasPolicy assigned to the storage account. + */ model SasPolicy { - @doc("The SAS expiration period, DD.HH:MM:SS.") + /** + * The SAS expiration period, DD.HH:MM:SS. + */ sasExpirationPeriod: string; - @doc("The SAS expiration action. Can only be Log.") - expirationAction: ExpirationAction; + /** + * The SAS expiration action. Can only be Log. + */ + expirationAction: ExpirationAction = ExpirationAction.Log; } -@doc("KeyPolicy assigned to the storage account.") +/** + * KeyPolicy assigned to the storage account. + */ model KeyPolicy { - @doc("The key expiration period in days.") + /** + * The key expiration period in days. + */ keyExpirationPeriodInDays: int32; } -@doc("The custom domain assigned to this storage account. This can be set via Update.") +/** + * The custom domain assigned to this storage account. This can be set via Update. + */ model CustomDomain { - @doc("Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source.") + /** + * Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source. + */ name: string; - @doc("Indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates.") + /** + * Indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates. + */ useSubDomainName?: boolean; } -@doc("The encryption settings on the storage account.") +/** + * The encryption settings on the storage account. + */ model Encryption { - @doc("List of services which support encryption.") + /** + * List of services which support encryption. + */ services?: EncryptionServices; - @doc("The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault") - keySource?: KeySource; + /** + * The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault + */ + keySource?: KeySource = KeySource.Microsoft.Storage; - @doc("A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest.") + /** + * A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest. + */ requireInfrastructureEncryption?: boolean; - @doc("Properties provided by key vault.") + /** + * Properties provided by key vault. + */ @projectedName("json", "keyvaultproperties") keyVaultProperties?: KeyVaultProperties; - @doc("The identity to be used with service-side encryption at rest.") + /** + * The identity to be used with service-side encryption at rest. + */ @projectedName("json", "identity") encryptionIdentity?: EncryptionIdentity; } -@doc("A list of services that support encryption.") +/** + * A list of services that support encryption. + */ model EncryptionServices { - @doc("The encryption function of the blob storage service.") + /** + * The encryption function of the blob storage service. + */ blob?: EncryptionService; - @doc("The encryption function of the file storage service.") + /** + * The encryption function of the file storage service. + */ file?: EncryptionService; - @doc("The encryption function of the table storage service.") + /** + * The encryption function of the table storage service. + */ table?: EncryptionService; - @doc("The encryption function of the queue storage service.") + /** + * The encryption function of the queue storage service. + */ queue?: EncryptionService; } -@doc("A service that allows server-side encryption to be used.") +/** + * A service that allows server-side encryption to be used. + */ model EncryptionService { - @doc("A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is enabled by default today and cannot be disabled.") + /** + * A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is enabled by default today and cannot be disabled. + */ enabled?: boolean; - @doc("Gets a rough estimate of the date/time when the encryption was last enabled by the user. Data is encrypted at rest by default today and cannot be disabled.") + /** + * Gets a rough estimate of the date/time when the encryption was last enabled by the user. Data is encrypted at rest by default today and cannot be disabled. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastEnabledTime?: utcDateTime; - @doc("Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used.") + /** + * Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used. + */ @visibility("read", "create") keyType?: KeyType; } -@doc("Properties of key vault.") +/** + * Properties of key vault. + */ model KeyVaultProperties { - @doc("The name of KeyVault key.") + /** + * The name of KeyVault key. + */ @projectedName("json", "keyname") keyName?: string; - @doc("The version of KeyVault key.") + /** + * The version of KeyVault key. + */ @projectedName("json", "keyversion") keyVersion?: string; - @doc("The Uri of KeyVault.") + /** + * The Uri of KeyVault. + */ @projectedName("json", "keyvaulturi") keyVaultUri?: string; - @doc("The object identifier of the current versioned Key Vault Key in use.") + /** + * The object identifier of the current versioned Key Vault Key in use. + */ @visibility("read") currentVersionedKeyIdentifier?: string; - @doc("Timestamp of last rotation of the Key Vault Key.") + /** + * Timestamp of last rotation of the Key Vault Key. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastKeyRotationTimestamp?: utcDateTime; - @doc("This is a read only property that represents the expiration time of the current version of the customer managed key used for encryption.") + /** + * This is a read only property that represents the expiration time of the current version of the customer managed key used for encryption. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. currentVersionedKeyExpirationTimestamp?: utcDateTime; } -@doc("Encryption identity for the storage account.") +/** + * Encryption identity for the storage account. + */ model EncryptionIdentity { - @doc("Resource identifier of the UserAssigned identity to be associated with server-side encryption on the storage account.") + /** + * Resource identifier of the UserAssigned identity to be associated with server-side encryption on the storage account. + */ @projectedName("json", "userAssignedIdentity") encryptionUserAssignedIdentity?: string; - @doc("ClientId of the multi-tenant application to be used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys server-side encryption on the storage account.") + /** + * ClientId of the multi-tenant application to be used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys server-side encryption on the storage account. + */ @projectedName("json", "federatedIdentityClientId") encryptionFederatedIdentityClientId?: string; } -@doc("Network rule set") +/** + * Network rule set + */ model NetworkRuleSet { - @doc("Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, \"Logging, Metrics\"), or None to bypass none of those traffics.") - bypass?: Bypass; - - @doc("Sets the resource access rules") + /** + * Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, "Logging, Metrics"), or None to bypass none of those traffics. + */ + bypass?: Bypass = Bypass.AzureServices; + + /** + * Sets the resource access rules + */ resourceAccessRules?: ResourceAccessRule[]; - @doc("Sets the virtual network rules") + /** + * Sets the virtual network rules + */ virtualNetworkRules?: VirtualNetworkRule[]; - @doc("Sets the IP ACL rules") + /** + * Sets the IP ACL rules + */ ipRules?: IPRule[]; - @doc("Specifies the default action of allow or deny when no other rules match.") - defaultAction: DefaultAction; + /** + * Specifies the default action of allow or deny when no other rules match. + */ + defaultAction: DefaultAction = DefaultAction.Allow; } -@doc("Resource Access Rule.") +/** + * Resource Access Rule. + */ model ResourceAccessRule { - @doc("Tenant Id") + /** + * Tenant Id + */ tenantId?: string; - @doc("Resource Id") + /** + * Resource Id + */ resourceId?: string; } -@doc("Virtual Network rule.") +/** + * Virtual Network rule. + */ model VirtualNetworkRule { - @doc("Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.") + /** + * Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + */ @projectedName("json", "id") virtualNetworkResourceId: string; - @doc("The action of virtual network rule.") + /** + * The action of virtual network rule. + */ action?: "Allow"; - @doc("Gets the state of virtual network rule.") + /** + * Gets the state of virtual network rule. + */ state?: State; } -@doc("IP rule with specific IP or IP range in CIDR format.") +/** + * IP rule with specific IP or IP range in CIDR format. + */ model IPRule { - @doc("Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.") + /** + * Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. + */ @projectedName("json", "value") IPAddressOrRange: string; - @doc("The action of IP ACL rule.") + /** + * The action of IP ACL rule. + */ action?: "Allow"; } -@doc("Settings for Azure Files identity based authentication.") +/** + * Settings for Azure Files identity based authentication. + */ model AzureFilesIdentityBasedAuthentication { - @doc("Indicates the directory service used. Note that this enum may be extended in the future.") + /** + * Indicates the directory service used. Note that this enum may be extended in the future. + */ directoryServiceOptions: DirectoryServiceOptions; - @doc("Required if directoryServiceOptions are AD, optional if they are AADKERB.") + /** + * Required if directoryServiceOptions are AD, optional if they are AADKERB. + */ activeDirectoryProperties?: ActiveDirectoryProperties; - @doc("Default share permission for users using Kerberos authentication if RBAC role is not assigned.") + /** + * Default share permission for users using Kerberos authentication if RBAC role is not assigned. + */ defaultSharePermission?: DefaultSharePermission; } -@doc("Settings properties for Active Directory (AD).") +/** + * Settings properties for Active Directory (AD). + */ model ActiveDirectoryProperties { - @doc("Specifies the primary domain that the AD DNS server is authoritative for.") + /** + * Specifies the primary domain that the AD DNS server is authoritative for. + */ domainName: string; - @doc("Specifies the NetBIOS domain name.") + /** + * Specifies the NetBIOS domain name. + */ netBiosDomainName?: string; - @doc("Specifies the Active Directory forest to get.") + /** + * Specifies the Active Directory forest to get. + */ forestName?: string; - @doc("Specifies the domain GUID.") + /** + * Specifies the domain GUID. + */ domainGuid: string; - @doc("Specifies the security identifier (SID).") + /** + * Specifies the security identifier (SID). + */ domainSid?: string; - @doc("Specifies the security identifier (SID) for Azure Storage.") + /** + * Specifies the security identifier (SID) for Azure Storage. + */ azureStorageSid?: string; - @doc("Specifies the Active Directory SAMAccountName for Azure Storage.") + /** + * Specifies the Active Directory SAMAccountName for Azure Storage. + */ samAccountName?: string; - @doc("Specifies the Active Directory account type for Azure Storage.") + /** + * Specifies the Active Directory account type for Azure Storage. + */ accountType?: AccountType; } -@doc("Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user data, the default option is microsoft routing") +/** + * Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user data, the default option is microsoft routing + */ model RoutingPreference { - @doc("Routing Choice defines the kind of network routing opted by the user.") + /** + * Routing Choice defines the kind of network routing opted by the user. + */ routingChoice?: RoutingChoice; - @doc("A boolean flag which indicates whether microsoft routing storage endpoints are to be published") + /** + * A boolean flag which indicates whether microsoft routing storage endpoints are to be published + */ publishMicrosoftEndpoints?: boolean; - @doc("A boolean flag which indicates whether internet routing storage endpoints are to be published") + /** + * A boolean flag which indicates whether internet routing storage endpoints are to be published + */ publishInternetEndpoints?: boolean; } -@doc("This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning.") +/** + * This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning. + */ model ImmutableStorageAccount { - @doc("A boolean flag which enables account-level immutability. All the containers under such an account have object-level immutability enabled by default.") + /** + * A boolean flag which enables account-level immutability. All the containers under such an account have object-level immutability enabled by default. + */ enabled?: boolean; - @doc("Specifies the default account-level immutability policy which is inherited and applied to objects that do not possess an explicit immutability policy at the object level. The object-level immutability policy has higher precedence than the container-level immutability policy, which has a higher precedence than the account-level immutability policy.") + /** + * Specifies the default account-level immutability policy which is inherited and applied to objects that do not possess an explicit immutability policy at the object level. The object-level immutability policy has higher precedence than the container-level immutability policy, which has a higher precedence than the account-level immutability policy. + */ immutabilityPolicy?: AccountImmutabilityPolicyProperties; } -@doc("This defines account-level immutability policy properties.") +/** + * This defines account-level immutability policy properties. + */ model AccountImmutabilityPolicyProperties { - @doc("The immutability period for the blobs in the container since the policy creation, in days.") + /** + * The immutability period for the blobs in the container since the policy creation, in days. + */ @maxValue(146000) @minValue(1) immutabilityPeriodSinceCreationInDays?: int32; - @doc("The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted.") + /** + * The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted. + */ state?: AccountImmutabilityPolicyState; - @doc("This property can only be changed for disabled and unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted.") + /** + * This property can only be changed for disabled and unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. + */ allowProtectedAppendWrites?: boolean; } -@doc("Properties of the storage account.") +/** + * Properties of the storage account. + */ model StorageAccountProperties { - @doc("Gets the status of the storage account at the time the operation was called.") + /** + * Gets the status of the storage account at the time the operation was called. + */ @visibility("read") provisioningState?: ProvisioningState; - @doc("Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint.") + /** + * Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint. + */ @visibility("read") primaryEndpoints?: Endpoints; - @doc("Gets the location of the primary data center for the storage account.") + /** + * Gets the location of the primary data center for the storage account. + */ @visibility("read") primaryLocation?: string; - @doc("Gets the status indicating whether the primary location of the storage account is available or unavailable.") + /** + * Gets the status indicating whether the primary location of the storage account is available or unavailable. + */ @visibility("read") statusOfPrimary?: AccountStatus; - @doc("Gets the timestamp of the most recent instance of a failover to the secondary location. Only the most recent timestamp is retained. This element is not returned if there has never been a failover instance. Only available if the accountType is Standard_GRS or Standard_RAGRS.") + /** + * Gets the timestamp of the most recent instance of a failover to the secondary location. Only the most recent timestamp is retained. This element is not returned if there has never been a failover instance. Only available if the accountType is Standard_GRS or Standard_RAGRS. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastGeoFailoverTime?: utcDateTime; - @doc("Gets the location of the geo-replicated secondary for the storage account. Only available if the accountType is Standard_GRS or Standard_RAGRS.") + /** + * Gets the location of the geo-replicated secondary for the storage account. Only available if the accountType is Standard_GRS or Standard_RAGRS. + */ @visibility("read") secondaryLocation?: string; - @doc("Gets the status indicating whether the secondary location of the storage account is available or unavailable. Only available if the SKU name is Standard_GRS or Standard_RAGRS.") + /** + * Gets the status indicating whether the secondary location of the storage account is available or unavailable. Only available if the SKU name is Standard_GRS or Standard_RAGRS. + */ @visibility("read") statusOfSecondary?: AccountStatus; - @doc("Gets the creation date and time of the storage account in UTC.") + /** + * Gets the creation date and time of the storage account in UTC. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. creationTime?: utcDateTime; - @doc("Gets the custom domain the user assigned to this storage account.") + /** + * Gets the custom domain the user assigned to this storage account. + */ @visibility("read") customDomain?: CustomDomain; - @doc("SasPolicy assigned to the storage account.") + /** + * SasPolicy assigned to the storage account. + */ @visibility("read") sasPolicy?: SasPolicy; - @doc("KeyPolicy assigned to the storage account.") + /** + * KeyPolicy assigned to the storage account. + */ @visibility("read") keyPolicy?: KeyPolicy; - @doc("Storage account keys creation time.") + /** + * Storage account keys creation time. + */ @visibility("read") keyCreationTime?: KeyCreationTime; - @doc("Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the secondary location of the storage account. Only available if the SKU name is Standard_RAGRS.") + /** + * Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the secondary location of the storage account. Only available if the SKU name is Standard_RAGRS. + */ @visibility("read") secondaryEndpoints?: Endpoints; - @doc("Encryption settings to be used for server-side encryption for the storage account.") + /** + * Encryption settings to be used for server-side encryption for the storage account. + */ @visibility("read") encryption?: Encryption; - @doc("Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.") + /** + * Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type. + */ @visibility("read") accessTier?: AccessTier; - @doc("Provides the identity based authentication settings for Azure Files.") + /** + * Provides the identity based authentication settings for Azure Files. + */ azureFilesIdentityBasedAuthentication?: AzureFilesIdentityBasedAuthentication; - @doc("Allows https traffic only to storage service if sets to true.") + /** + * Allows https traffic only to storage service if sets to true. + */ @projectedName("json", "supportsHttpsTrafficOnly") enableHttpsTrafficOnly?: boolean; - @doc("Network rule set") + /** + * Network rule set + */ @visibility("read") @projectedName("json", "networkAcls") networkRuleSet?: NetworkRuleSet; - @doc("Enables Secure File Transfer Protocol, if set to true") + /** + * Enables Secure File Transfer Protocol, if set to true + */ @projectedName("json", "isSftpEnabled") IsSftpEnabled?: boolean; - @doc("Enables local users feature, if set to true") + /** + * Enables local users feature, if set to true + */ @projectedName("json", "isLocalUserEnabled") IsLocalUserEnabled?: boolean; - @doc("Account HierarchicalNamespace enabled if sets to true.") + /** + * Account HierarchicalNamespace enabled if sets to true. + */ @projectedName("json", "isHnsEnabled") IsHnsEnabled?: boolean; - @doc("Geo Replication Stats") + /** + * Geo Replication Stats + */ @visibility("read") geoReplicationStats?: GeoReplicationStats; - @doc("If the failover is in progress, the value will be true, otherwise, it will be null.") + /** + * If the failover is in progress, the value will be true, otherwise, it will be null. + */ @visibility("read") failoverInProgress?: boolean; - @doc("Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled.") + /** + * Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. + */ largeFileSharesState?: LargeFileSharesState; - @doc("List of private endpoint connection associated with the specified storage account") + /** + * List of private endpoint connection associated with the specified storage account + */ @visibility("read") privateEndpointConnections?: PrivateEndpointConnection[]; - @doc("Maintains information about the network routing choice opted by the user for data transfer") + /** + * Maintains information about the network routing choice opted by the user for data transfer + */ routingPreference?: RoutingPreference; - @doc("Blob restore status") + /** + * Blob restore status + */ @visibility("read") blobRestoreStatus?: BlobRestoreStatus; - @doc("Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property.") + /** + * Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. + */ allowBlobPublicAccess?: boolean; - @doc("Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.") + /** + * Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. + */ minimumTlsVersion?: MinimumTlsVersion; - @doc("Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true.") + /** + * Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true. + */ allowSharedKeyAccess?: boolean; - @doc("NFS 3.0 protocol support enabled if set to true.") + /** + * NFS 3.0 protocol support enabled if set to true. + */ @projectedName("json", "isNfsV3Enabled") enableNfsV3?: boolean; - @doc("Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property.") + /** + * Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property. + */ allowCrossTenantReplication?: boolean; - @doc("A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property.") + /** + * A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property. + */ defaultToOAuthAuthentication?: boolean; - @doc("Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.") + /** + * Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + */ publicNetworkAccess?: PublicNetworkAccess; - @doc("The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the containers in the account by default.") + /** + * The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the containers in the account by default. + */ immutableStorageWithVersioning?: ImmutableStorageAccount; - @doc("Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet.") + /** + * Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. + */ allowedCopyScope?: AllowedCopyScope; - @doc("This property is readOnly and is set by server during asynchronous storage account sku conversion operations.") + /** + * This property is readOnly and is set by server during asynchronous storage account sku conversion operations. + */ storageAccountSkuConversionStatus?: StorageAccountSkuConversionStatus; - @doc("Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier.") + /** + * Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier. + */ dnsEndpointType?: DnsEndpointType; } -@doc("The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object.") +/** + * The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object. + */ model Endpoints { - @doc("Gets the blob endpoint.") + /** + * Gets the blob endpoint. + */ @visibility("read") blob?: string; - @doc("Gets the queue endpoint.") + /** + * Gets the queue endpoint. + */ @visibility("read") queue?: string; - @doc("Gets the table endpoint.") + /** + * Gets the table endpoint. + */ @visibility("read") table?: string; - @doc("Gets the file endpoint.") + /** + * Gets the file endpoint. + */ @visibility("read") file?: string; - @doc("Gets the web endpoint.") + /** + * Gets the web endpoint. + */ @visibility("read") web?: string; - @doc("Gets the dfs endpoint.") + /** + * Gets the dfs endpoint. + */ @visibility("read") dfs?: string; - @doc("Gets the microsoft routing storage endpoints.") + /** + * Gets the microsoft routing storage endpoints. + */ microsoftEndpoints?: StorageAccountMicrosoftEndpoints; - @doc("Gets the internet routing storage endpoints") + /** + * Gets the internet routing storage endpoints + */ internetEndpoints?: StorageAccountInternetEndpoints; } -@doc("The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object via a microsoft routing endpoint.") +/** + * The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object via a microsoft routing endpoint. + */ model StorageAccountMicrosoftEndpoints { - @doc("Gets the blob endpoint.") + /** + * Gets the blob endpoint. + */ @visibility("read") blob?: string; - @doc("Gets the queue endpoint.") + /** + * Gets the queue endpoint. + */ @visibility("read") queue?: string; - @doc("Gets the table endpoint.") + /** + * Gets the table endpoint. + */ @visibility("read") table?: string; - @doc("Gets the file endpoint.") + /** + * Gets the file endpoint. + */ @visibility("read") file?: string; - @doc("Gets the web endpoint.") + /** + * Gets the web endpoint. + */ @visibility("read") web?: string; - @doc("Gets the dfs endpoint.") + /** + * Gets the dfs endpoint. + */ @visibility("read") dfs?: string; } -@doc("The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via a internet routing endpoint.") +/** + * The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via a internet routing endpoint. + */ model StorageAccountInternetEndpoints { - @doc("Gets the blob endpoint.") + /** + * Gets the blob endpoint. + */ @visibility("read") blob?: string; - @doc("Gets the file endpoint.") + /** + * Gets the file endpoint. + */ @visibility("read") file?: string; - @doc("Gets the web endpoint.") + /** + * Gets the web endpoint. + */ @visibility("read") web?: string; - @doc("Gets the dfs endpoint.") + /** + * Gets the dfs endpoint. + */ @visibility("read") dfs?: string; } -@doc("Storage account keys creation time.") +/** + * Storage account keys creation time. + */ model KeyCreationTime { // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. key1?: utcDateTime; @@ -1215,1495 +1750,2363 @@ model KeyCreationTime { key2?: utcDateTime; } -@doc("Statistics related to replication for storage account's Blob, Table, Queue and File services. It is only available when geo-redundant replication is enabled for the storage account.") +/** + * Statistics related to replication for storage account's Blob, Table, Queue and File services. It is only available when geo-redundant replication is enabled for the storage account. + */ model GeoReplicationStats { - @doc("The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable.") + /** + * The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable. + */ @visibility("read") status?: GeoReplicationStatus; - @doc("All primary writes preceding this UTC date/time value are guaranteed to be available for read operations. Primary writes following this point in time may or may not be available for reads. Element may be default value if value of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap.") + /** + * All primary writes preceding this UTC date/time value are guaranteed to be available for read operations. Primary writes following this point in time may or may not be available for reads. Element may be default value if value of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastSyncTime?: utcDateTime; - @doc("A boolean flag which indicates whether or not account failover is supported for the account.") + /** + * A boolean flag which indicates whether or not account failover is supported for the account. + */ @visibility("read") canFailover?: boolean; } -@doc("Properties of the PrivateEndpointConnectProperties.") +/** + * Properties of the PrivateEndpointConnectProperties. + */ model PrivateEndpointConnectionProperties { - @doc("The resource of private end point.") + /** + * The resource of private end point. + */ privateEndpoint?: PrivateEndpoint; - @doc("A collection of information about the state of the connection between service consumer and provider.") + /** + * A collection of information about the state of the connection between service consumer and provider. + */ privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; - @doc("The provisioning state of the private endpoint connection resource.") + /** + * The provisioning state of the private endpoint connection resource. + */ @visibility("read") provisioningState?: PrivateEndpointConnectionProvisioningState; } -@doc("The Private Endpoint resource.") +/** + * The Private Endpoint resource. + */ model PrivateEndpoint { - @doc("The ARM identifier for Private Endpoint") + /** + * The ARM identifier for Private Endpoint + */ @visibility("read") id?: string; } -@doc("A collection of information about the state of the connection between service consumer and provider.") +/** + * A collection of information about the state of the connection between service consumer and provider. + */ model PrivateLinkServiceConnectionState { - @doc("Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.") + /** + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + */ status?: PrivateEndpointServiceConnectionStatus; - @doc("The reason for approval/rejection of the connection.") + /** + * The reason for approval/rejection of the connection. + */ description?: string; - @doc("A message indicating if changes on the service provider require any updates on the consumer.") + /** + * A message indicating if changes on the service provider require any updates on the consumer. + */ actionRequired?: string; } -@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + */ model Resource { - @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + */ @visibility("read") id?: string; - @doc("The name of the resource") + /** + * The name of the resource + */ @visibility("read") name?: string; - @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + */ @visibility("read") type?: string; } -@doc("Blob restore status.") +/** + * Blob restore status. + */ model BlobRestoreStatus { - @doc("The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed.") + /** + * The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed. + */ @visibility("read") status?: BlobRestoreProgressStatus; - @doc("Failure reason when blob restore is failed.") + /** + * Failure reason when blob restore is failed. + */ @visibility("read") failureReason?: string; - @doc("Id for tracking blob restore request.") + /** + * Id for tracking blob restore request. + */ @visibility("read") restoreId?: string; - @doc("Blob restore request parameters.") + /** + * Blob restore request parameters. + */ @visibility("read") parameters?: BlobRestoreParameters; } -@doc("Blob restore parameters") +/** + * Blob restore parameters + */ model BlobRestoreParameters { - @doc("Restore blob to the specified time.") + /** + * Restore blob to the specified time. + */ @projectedName("json", "timetoRestore") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timeToRestore: utcDateTime; - @doc("Blob ranges to restore.") + /** + * Blob ranges to restore. + */ blobRanges: BlobRestoreRange[]; } -@doc("Blob range") +/** + * Blob range + */ model BlobRestoreRange { - @doc("Blob start range. This is inclusive. Empty means account start.") + /** + * Blob start range. This is inclusive. Empty means account start. + */ startRange: string; - @doc("Blob end range. This is exclusive. Empty means account end.") + /** + * Blob end range. This is exclusive. Empty means account end. + */ endRange: string; } -@doc("This defines the sku conversion status object for asynchronous sku conversions.") +/** + * This defines the sku conversion status object for asynchronous sku conversions. + */ model StorageAccountSkuConversionStatus { - @doc("This property indicates the current sku conversion status.") + /** + * This property indicates the current sku conversion status. + */ @visibility("read") skuConversionStatus?: SkuConversionStatus; - @doc("This property represents the target sku name to which the account sku is being converted asynchronously.") + /** + * This property represents the target sku name to which the account sku is being converted asynchronously. + */ targetSkuName?: SkuName; - @doc("This property represents the sku conversion start time.") + /** + * This property represents the sku conversion start time. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime?: utcDateTime; - @doc("This property represents the sku conversion end time.") + /** + * This property represents the sku conversion end time. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime?: utcDateTime; } -@doc("The parameters that can be provided when updating the storage account properties.") +/** + * The parameters that can be provided when updating the storage account properties. + */ model StorageAccountUpdateParameters { - @doc("Gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of those SKU names be updated to any other value.") + /** + * Gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of those SKU names be updated to any other value. + */ sku?: Sku; - @doc("Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters.") + /** + * Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. + */ tags?: Record; - @doc("The identity of the resource.") + /** + * The identity of the resource. + */ identity?: Identity; - @doc("The parameters used when updating a storage account.") + /** + * The parameters used when updating a storage account. + */ properties?: StorageAccountPropertiesUpdateParameters; - @doc("Optional. Indicates the type of storage account. Currently only StorageV2 value supported by server.") + /** + * Optional. Indicates the type of storage account. Currently only StorageV2 value supported by server. + */ kind?: Kind; } -@doc("The parameters used when updating a storage account.") +/** + * The parameters used when updating a storage account. + */ model StorageAccountPropertiesUpdateParameters { - @doc("Custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property.") + /** + * Custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property. + */ customDomain?: CustomDomain; - @doc("Not applicable. Azure Storage encryption at rest is enabled by default for all storage accounts and cannot be disabled.") + /** + * Not applicable. Azure Storage encryption at rest is enabled by default for all storage accounts and cannot be disabled. + */ encryption?: Encryption; - @doc("SasPolicy assigned to the storage account.") + /** + * SasPolicy assigned to the storage account. + */ sasPolicy?: SasPolicy; - @doc("KeyPolicy assigned to the storage account.") + /** + * KeyPolicy assigned to the storage account. + */ keyPolicy?: KeyPolicy; - @doc("Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.") + /** + * Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type. + */ accessTier?: AccessTier; - @doc("Provides the identity based authentication settings for Azure Files.") + /** + * Provides the identity based authentication settings for Azure Files. + */ azureFilesIdentityBasedAuthentication?: AzureFilesIdentityBasedAuthentication; - @doc("Allows https traffic only to storage service if sets to true.") + /** + * Allows https traffic only to storage service if sets to true. + */ @projectedName("json", "supportsHttpsTrafficOnly") enableHttpsTrafficOnly?: boolean; - @doc("Enables Secure File Transfer Protocol, if set to true") + /** + * Enables Secure File Transfer Protocol, if set to true + */ @projectedName("json", "isSftpEnabled") IsSftpEnabled?: boolean; - @doc("Enables local users feature, if set to true") + /** + * Enables local users feature, if set to true + */ @projectedName("json", "isLocalUserEnabled") IsLocalUserEnabled?: boolean; - @doc("Network rule set") + /** + * Network rule set + */ @projectedName("json", "networkAcls") networkRuleSet?: NetworkRuleSet; - @doc("Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled.") + /** + * Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled. + */ largeFileSharesState?: LargeFileSharesState; - @doc("Maintains information about the network routing choice opted by the user for data transfer") + /** + * Maintains information about the network routing choice opted by the user for data transfer + */ routingPreference?: RoutingPreference; - @doc("Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property.") + /** + * Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property. + */ allowBlobPublicAccess?: boolean; - @doc("Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.") + /** + * Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property. + */ minimumTlsVersion?: MinimumTlsVersion; - @doc("Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true.") + /** + * Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true. + */ allowSharedKeyAccess?: boolean; - @doc("Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property.") + /** + * Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property. + */ allowCrossTenantReplication?: boolean; - @doc("A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property.") + /** + * A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property. + */ defaultToOAuthAuthentication?: boolean; - @doc("Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.") + /** + * Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. + */ publicNetworkAccess?: PublicNetworkAccess; - @doc("The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the containers in the account by default.") + /** + * The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the containers in the account by default. + */ immutableStorageWithVersioning?: ImmutableStorageAccount; - @doc("Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet.") + /** + * Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. + */ allowedCopyScope?: AllowedCopyScope; - @doc("Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier.") + /** + * Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier. + */ dnsEndpointType?: DnsEndpointType; } -@doc("Attributes of a deleted storage account.") +/** + * Attributes of a deleted storage account. + */ model DeletedAccountProperties { - @doc("Full resource id of the original storage account.") + /** + * Full resource id of the original storage account. + */ @visibility("read") storageAccountResourceId?: string; - @doc("Location of the deleted account.") + /** + * Location of the deleted account. + */ @visibility("read") location?: string; - @doc("Can be used to attempt recovering this deleted account via PutStorageAccount API.") + /** + * Can be used to attempt recovering this deleted account via PutStorageAccount API. + */ @visibility("read") restoreReference?: string; - @doc("Creation time of the deleted account.") + /** + * Creation time of the deleted account. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. creationTime?: utcDateTime; - @doc("Deletion time of the deleted account.") + /** + * Deletion time of the deleted account. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. deletionTime?: utcDateTime; } -@doc("Error response body contract.") +/** + * Error response body contract. + */ model ErrorResponseBody { - @doc("An identifier for the error. Codes are invariant and are intended to be consumed programmatically.") + /** + * An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + */ code?: string; - @doc("A message describing the error, intended to be suitable for display in a user interface.") + /** + * A message describing the error, intended to be suitable for display in a user interface. + */ message?: string; } -@doc("The response from the ListKeys operation.") +/** + * The response from the ListKeys operation. + */ @pagedResult model StorageAccountListKeysResult { - @doc("Gets the list of storage account keys and their properties for the specified storage account.") + /** + * Gets the list of storage account keys and their properties for the specified storage account. + */ @visibility("read") @items keys?: StorageAccountKey[]; } -@doc("An access key for the storage account.") +/** + * An access key for the storage account. + */ model StorageAccountKey { - @doc("Name of the key.") + /** + * Name of the key. + */ @visibility("read") keyName?: string; - @doc("Base 64-encoded value of the key.") + /** + * Base 64-encoded value of the key. + */ @visibility("read") value?: string; - @doc("Permissions for the key -- read-only or full permissions.") + /** + * Permissions for the key -- read-only or full permissions. + */ @visibility("read") permissions?: KeyPermission; - @doc("Creation time of the key, in round trip date format.") + /** + * Creation time of the key, in round trip date format. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. creationTime?: utcDateTime; } -@doc("The parameters used to regenerate the storage account key.") +/** + * The parameters used to regenerate the storage account key. + */ model StorageAccountRegenerateKeyParameters { - @doc("The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2.") + /** + * The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2. + */ keyName: string; } -@doc("The response from the List Usages operation.") +/** + * The response from the List Usages operation. + */ @pagedResult model UsageListResult { - @doc("Gets or sets the list of Storage Resource Usages.") + /** + * Gets or sets the list of Storage Resource Usages. + */ @items value?: Usage[]; } -@doc("Describes Storage Resource Usage.") +/** + * Describes Storage Resource Usage. + */ model Usage { - @doc("Gets the unit of measurement.") + /** + * Gets the unit of measurement. + */ @visibility("read") unit?: UsageUnit; - @doc("Gets the current count of the allocated resources in the subscription.") + /** + * Gets the current count of the allocated resources in the subscription. + */ @visibility("read") currentValue?: int32; - @doc("Gets the maximum count of the resources that can be allocated in the subscription.") + /** + * Gets the maximum count of the resources that can be allocated in the subscription. + */ @visibility("read") limit?: int32; - @doc("Gets the name of the type of usage.") + /** + * Gets the name of the type of usage. + */ @visibility("read") name?: UsageName; } -@doc("The usage names that can be used; currently limited to StorageAccount.") +/** + * The usage names that can be used; currently limited to StorageAccount. + */ model UsageName { - @doc("Gets a string describing the resource name.") + /** + * Gets a string describing the resource name. + */ @visibility("read") value?: string; - @doc("Gets a localized string describing the resource name.") + /** + * Gets a localized string describing the resource name. + */ @visibility("read") localizedValue?: string; } -@doc("The parameters to list SAS credentials of a storage account.") +/** + * The parameters to list SAS credentials of a storage account. + */ model AccountSasParameters { - @doc("The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f).") + /** + * The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). + */ @projectedName("json", "signedServices") services: Services; - @doc("The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files.") + /** + * The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files. + */ @projectedName("json", "signedResourceTypes") resourceTypes: SignedResourceTypes; - @doc("The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p).") + /** + * The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). + */ @projectedName("json", "signedPermission") permissions: Permissions; - @doc("An IP address or a range of IP addresses from which to accept requests.") + /** + * An IP address or a range of IP addresses from which to accept requests. + */ @projectedName("json", "signedIp") IPAddressOrRange?: string; - @doc("The protocol permitted for a request made with the account SAS.") + /** + * The protocol permitted for a request made with the account SAS. + */ @projectedName("json", "signedProtocol") protocols?: HttpProtocol; - @doc("The time at which the SAS becomes valid.") + /** + * The time at which the SAS becomes valid. + */ @projectedName("json", "signedStart") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. sharedAccessStartTime?: utcDateTime; - @doc("The time at which the shared access signature becomes invalid.") + /** + * The time at which the shared access signature becomes invalid. + */ @projectedName("json", "signedExpiry") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. sharedAccessExpiryTime: utcDateTime; - @doc("The key to sign the account SAS token with.") + /** + * The key to sign the account SAS token with. + */ keyToSign?: string; } -@doc("The List SAS credentials operation response.") +/** + * The List SAS credentials operation response. + */ model ListAccountSasResponse { - @doc("List SAS credentials of storage account.") + /** + * List SAS credentials of storage account. + */ @visibility("read") accountSasToken?: string; } -@doc("The parameters to list service SAS credentials of a specific resource.") +/** + * The parameters to list service SAS credentials of a specific resource. + */ model ServiceSasParameters { - @doc("The canonical path to the signed resource.") + /** + * The canonical path to the signed resource. + */ canonicalizedResource: string; - @doc("The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s).") + /** + * The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s). + */ @projectedName("json", "signedResource") resource?: SignedResource; - @doc("The signed permissions for the service SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p).") + /** + * The signed permissions for the service SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). + */ @projectedName("json", "signedPermission") permissions?: Permissions; - @doc("An IP address or a range of IP addresses from which to accept requests.") + /** + * An IP address or a range of IP addresses from which to accept requests. + */ @projectedName("json", "signedIp") IPAddressOrRange?: string; - @doc("The protocol permitted for a request made with the account SAS.") + /** + * The protocol permitted for a request made with the account SAS. + */ @projectedName("json", "signedProtocol") protocols?: HttpProtocol; - @doc("The time at which the SAS becomes valid.") + /** + * The time at which the SAS becomes valid. + */ @projectedName("json", "signedStart") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. sharedAccessStartTime?: utcDateTime; - @doc("The time at which the shared access signature becomes invalid.") + /** + * The time at which the shared access signature becomes invalid. + */ @projectedName("json", "signedExpiry") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. sharedAccessExpiryTime?: utcDateTime; - @doc("A unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or table.") + /** + * A unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or table. + */ @maxLength(64) @projectedName("json", "signedIdentifier") identifier?: string; - @doc("The start of partition key.") + /** + * The start of partition key. + */ @projectedName("json", "startPk") partitionKeyStart?: string; - @doc("The end of partition key.") + /** + * The end of partition key. + */ @projectedName("json", "endPk") partitionKeyEnd?: string; - @doc("The start of row key.") + /** + * The start of row key. + */ @projectedName("json", "startRk") rowKeyStart?: string; - @doc("The end of row key.") + /** + * The end of row key. + */ @projectedName("json", "endRk") rowKeyEnd?: string; - @doc("The key to sign the account SAS token with.") + /** + * The key to sign the account SAS token with. + */ keyToSign?: string; - @doc("The response header override for cache control.") + /** + * The response header override for cache control. + */ @projectedName("json", "rscc") cacheControl?: string; - @doc("The response header override for content disposition.") + /** + * The response header override for content disposition. + */ @projectedName("json", "rscd") contentDisposition?: string; - @doc("The response header override for content encoding.") + /** + * The response header override for content encoding. + */ @projectedName("json", "rsce") contentEncoding?: string; - @doc("The response header override for content language.") + /** + * The response header override for content language. + */ @projectedName("json", "rscl") contentLanguage?: string; - @doc("The response header override for content type.") + /** + * The response header override for content type. + */ @projectedName("json", "rsct") contentType?: string; } -@doc("The List service SAS credentials operation response.") +/** + * The List service SAS credentials operation response. + */ model ListServiceSasResponse { - @doc("List service SAS credentials of specific resource.") + /** + * List service SAS credentials of specific resource. + */ @visibility("read") serviceSasToken?: string; } -@doc("The Storage Account ManagementPolicy properties.") +/** + * The Storage Account ManagementPolicy properties. + */ model ManagementPolicyProperties { - @doc("Returns the date and time the ManagementPolicies was last modified.") + /** + * Returns the date and time the ManagementPolicies was last modified. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedTime?: utcDateTime; - @doc("The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.") + /** + * The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + */ policy: ManagementPolicySchema; } -@doc("The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.") +/** + * The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + */ model ManagementPolicySchema { - @doc("The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.") + /** + * The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. + */ rules: ManagementPolicyRule[]; } -@doc("An object that wraps the Lifecycle rule. Each rule is uniquely defined by name.") +/** + * An object that wraps the Lifecycle rule. Each rule is uniquely defined by name. + */ model ManagementPolicyRule { - @doc("Rule is enabled if set to true.") + /** + * Rule is enabled if set to true. + */ enabled?: boolean; - @doc("A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.") + /** + * A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy. + */ name: string; - @doc("The valid value is Lifecycle") + /** + * The valid value is Lifecycle + */ type: RuleType; - @doc("An object that defines the Lifecycle rule.") + /** + * An object that defines the Lifecycle rule. + */ definition: ManagementPolicyDefinition; } -@doc("An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set.") +/** + * An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set. + */ model ManagementPolicyDefinition { - @doc("An object that defines the action set.") + /** + * An object that defines the action set. + */ actions: ManagementPolicyAction; - @doc("An object that defines the filter set.") + /** + * An object that defines the filter set. + */ filters?: ManagementPolicyFilter; } -@doc("Actions are applied to the filtered blobs when the execution condition is met.") +/** + * Actions are applied to the filtered blobs when the execution condition is met. + */ model ManagementPolicyAction { - @doc("The management policy action for base blob") + /** + * The management policy action for base blob + */ baseBlob?: ManagementPolicyBaseBlob; - @doc("The management policy action for snapshot") + /** + * The management policy action for snapshot + */ snapshot?: ManagementPolicySnapShot; - @doc("The management policy action for version") + /** + * The management policy action for version + */ version?: ManagementPolicyVersion; } -@doc("Management policy action for base blob.") +/** + * Management policy action for base blob. + */ model ManagementPolicyBaseBlob { - @doc("The function to tier blobs to cool storage.") + /** + * The function to tier blobs to cool storage. + */ tierToCool?: DateAfterModification; - @doc("The function to tier blobs to archive storage.") + /** + * The function to tier blobs to archive storage. + */ tierToArchive?: DateAfterModification; - @doc("The function to tier blobs to cold storage.") + /** + * The function to tier blobs to cold storage. + */ tierToCold?: DateAfterModification; - @doc("The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts") + /** + * The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts + */ tierToHot?: DateAfterModification; - @doc("The function to delete the blob") + /** + * The function to delete the blob + */ delete?: DateAfterModification; - @doc("This property enables auto tiering of a blob from cool to hot on a blob access. This property requires tierToCool.daysAfterLastAccessTimeGreaterThan.") + /** + * This property enables auto tiering of a blob from cool to hot on a blob access. This property requires tierToCool.daysAfterLastAccessTimeGreaterThan. + */ enableAutoTierToHotFromCool?: boolean; } -@doc("Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The daysAfterLastTierChangeGreaterThan property is only applicable for tierToArchive actions which requires daysAfterModificationGreaterThan to be set, also it cannot be used in conjunction with daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan.") +/** + * Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The daysAfterLastTierChangeGreaterThan property is only applicable for tierToArchive actions which requires daysAfterModificationGreaterThan to be set, also it cannot be used in conjunction with daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan. + */ model DateAfterModification { - @doc("Value indicating the age in days after last modification") + /** + * Value indicating the age in days after last modification + */ daysAfterModificationGreaterThan?: float32; - @doc("Value indicating the age in days after last blob access. This property can only be used in conjunction with last access time tracking policy") + /** + * Value indicating the age in days after last blob access. This property can only be used in conjunction with last access time tracking policy + */ daysAfterLastAccessTimeGreaterThan?: float32; - @doc("Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions and requires daysAfterModificationGreaterThan to be set for baseBlobs based actions. The blob will be archived if both the conditions are satisfied.") + /** + * Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions and requires daysAfterModificationGreaterThan to be set for baseBlobs based actions. The blob will be archived if both the conditions are satisfied. + */ daysAfterLastTierChangeGreaterThan?: float32; - @doc("Value indicating the age in days after blob creation.") + /** + * Value indicating the age in days after blob creation. + */ daysAfterCreationGreaterThan?: float32; } -@doc("Management policy action for snapshot.") +/** + * Management policy action for snapshot. + */ model ManagementPolicySnapShot { - @doc("The function to tier blob snapshot to cool storage.") + /** + * The function to tier blob snapshot to cool storage. + */ tierToCool?: DateAfterCreation; - @doc("The function to tier blob snapshot to archive storage.") + /** + * The function to tier blob snapshot to archive storage. + */ tierToArchive?: DateAfterCreation; - @doc("The function to tier blobs to cold storage.") + /** + * The function to tier blobs to cold storage. + */ tierToCold?: DateAfterCreation; - @doc("The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts") + /** + * The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts + */ tierToHot?: DateAfterCreation; - @doc("The function to delete the blob snapshot") + /** + * The function to delete the blob snapshot + */ delete?: DateAfterCreation; } -@doc("Object to define snapshot and version action conditions.") +/** + * Object to define snapshot and version action conditions. + */ model DateAfterCreation { - @doc("Value indicating the age in days after creation") + /** + * Value indicating the age in days after creation + */ daysAfterCreationGreaterThan: float32; - @doc("Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions and requires daysAfterCreationGreaterThan to be set for snapshots and blob version based actions. The blob will be archived if both the conditions are satisfied.") + /** + * Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions and requires daysAfterCreationGreaterThan to be set for snapshots and blob version based actions. The blob will be archived if both the conditions are satisfied. + */ daysAfterLastTierChangeGreaterThan?: float32; } -@doc("Management policy action for blob version.") +/** + * Management policy action for blob version. + */ model ManagementPolicyVersion { - @doc("The function to tier blob version to cool storage.") + /** + * The function to tier blob version to cool storage. + */ tierToCool?: DateAfterCreation; - @doc("The function to tier blob version to archive storage.") + /** + * The function to tier blob version to archive storage. + */ tierToArchive?: DateAfterCreation; - @doc("The function to tier blobs to cold storage.") + /** + * The function to tier blobs to cold storage. + */ tierToCold?: DateAfterCreation; - @doc("The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts") + /** + * The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts + */ tierToHot?: DateAfterCreation; - @doc("The function to delete the blob version") + /** + * The function to delete the blob version + */ delete?: DateAfterCreation; } -@doc("Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical AND is performed on all filters. ") +/** + * Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical AND is performed on all filters. + */ model ManagementPolicyFilter { - @doc("An array of strings for prefixes to be match.") + /** + * An array of strings for prefixes to be match. + */ prefixMatch?: string[]; - @doc("An array of predefined enum values. Currently blockBlob supports all tiering and delete actions. Only delete actions are supported for appendBlob.") + /** + * An array of predefined enum values. Currently blockBlob supports all tiering and delete actions. Only delete actions are supported for appendBlob. + */ blobTypes: string[]; - @doc("An array of blob index tag based filters, there can be at most 10 tag filters") + /** + * An array of blob index tag based filters, there can be at most 10 tag filters + */ blobIndexMatch?: TagFilter[]; } -@doc("Blob index tag based filtering for blob objects") +/** + * Blob index tag based filtering for blob objects + */ model TagFilter { - @doc("This is the filter tag name, it can have 1 - 128 characters") + /** + * This is the filter tag name, it can have 1 - 128 characters + */ @maxLength(128) @minLength(1) name: string; - @doc("This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) is currently supported") + /** + * This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) is currently supported + */ `op`: string; - @doc("This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters") + /** + * This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters + */ @maxLength(256) value: string; } -@doc("The storage account blob inventory policy properties.") +/** + * The storage account blob inventory policy properties. + */ model BlobInventoryPolicyProperties { - @doc("Returns the last modified date and time of the blob inventory policy.") + /** + * Returns the last modified date and time of the blob inventory policy. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedTime?: utcDateTime; - @doc("The storage account blob inventory policy object. It is composed of policy rules.") + /** + * The storage account blob inventory policy object. It is composed of policy rules. + */ policy: BlobInventoryPolicySchema; } -@doc("The storage account blob inventory policy rules.") +/** + * The storage account blob inventory policy rules. + */ model BlobInventoryPolicySchema { - @doc("Policy is enabled if set to true.") + /** + * Policy is enabled if set to true. + */ enabled: boolean; - @doc("Deprecated Property from API version 2021-04-01 onwards, the required destination container name must be specified at the rule level 'policy.rule.destination'") + /** + * Deprecated Property from API version 2021-04-01 onwards, the required destination container name must be specified at the rule level 'policy.rule.destination' + */ @visibility("read") destination?: string; - @doc("The valid value is Inventory") + /** + * The valid value is Inventory + */ type: InventoryRuleType; - @doc("The storage account blob inventory policy rules. The rule is applied when it is enabled.") + /** + * The storage account blob inventory policy rules. The rule is applied when it is enabled. + */ rules: BlobInventoryPolicyRule[]; } -@doc("An object that wraps the blob inventory rule. Each rule is uniquely defined by name.") +/** + * An object that wraps the blob inventory rule. Each rule is uniquely defined by name. + */ model BlobInventoryPolicyRule { - @doc("Rule is enabled when set to true.") + /** + * Rule is enabled when set to true. + */ enabled: boolean; - @doc("A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy.") + /** + * A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy. + */ name: string; - @doc("Container name where blob inventory files are stored. Must be pre-created.") + /** + * Container name where blob inventory files are stored. Must be pre-created. + */ destination: string; - @doc("An object that defines the blob inventory policy rule.") + /** + * An object that defines the blob inventory policy rule. + */ definition: BlobInventoryPolicyDefinition; } -@doc("An object that defines the blob inventory rule.") +/** + * An object that defines the blob inventory rule. + */ model BlobInventoryPolicyDefinition { - @doc("An object that defines the filter set.") + /** + * An object that defines the filter set. + */ filters?: BlobInventoryPolicyFilter; - @doc("This is a required field, it specifies the format for the inventory files.") + /** + * This is a required field, it specifies the format for the inventory files. + */ format: Format; - @doc("This is a required field. This field is used to schedule an inventory formation.") + /** + * This is a required field. This field is used to schedule an inventory formation. + */ schedule: Schedule; - @doc("This is a required field. This field specifies the scope of the inventory created either at the blob or container level.") + /** + * This is a required field. This field specifies the scope of the inventory created either at the blob or container level. + */ objectType: ObjectType; - @doc("This is a required field. This field specifies the fields and properties of the object to be included in the inventory. The Schema field value 'Name' is always required. The valid values for this field for the 'Blob' definition.objectType include 'Name, Creation-Time, Last-Modified, Content-Length, Content-MD5, BlobType, AccessTier, AccessTierChangeTime, AccessTierInferred, Tags, Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, Snapshot, VersionId, IsCurrentVersion, Metadata, LastAccessTime, Tags, Etag, ContentType, ContentEncoding, ContentLanguage, ContentCRC64, CacheControl, ContentDisposition, LeaseStatus, LeaseState, LeaseDuration, ServerEncrypted, Deleted, DeletionId, DeletedTime, RemainingRetentionDays, ImmutabilityPolicyUntilDate, ImmutabilityPolicyMode, LegalHold, CopyId, CopyStatus, CopySource, CopyProgress, CopyCompletionTime, CopyStatusDescription, CustomerProvidedKeySha256, RehydratePriority, ArchiveStatus, XmsBlobSequenceNumber, EncryptionScope, IncrementalCopy, TagCount'. For Blob object type schema field value 'DeletedTime' is applicable only for Hns enabled accounts. The valid values for 'Container' definition.objectType include 'Name, Last-Modified, Metadata, LeaseStatus, LeaseState, LeaseDuration, PublicAccess, HasImmutabilityPolicy, HasLegalHold, Etag, DefaultEncryptionScope, DenyEncryptionScopeOverride, ImmutableStorageWithVersioningEnabled, Deleted, Version, DeletedTime, RemainingRetentionDays'. Schema field values 'Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, DeletionId' are valid only for Hns enabled accounts.Schema field values 'Tags, TagCount' are only valid for Non-Hns accounts.") + /** + * This is a required field. This field specifies the fields and properties of the object to be included in the inventory. The Schema field value 'Name' is always required. The valid values for this field for the 'Blob' definition.objectType include 'Name, Creation-Time, Last-Modified, Content-Length, Content-MD5, BlobType, AccessTier, AccessTierChangeTime, AccessTierInferred, Tags, Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, Snapshot, VersionId, IsCurrentVersion, Metadata, LastAccessTime, Tags, Etag, ContentType, ContentEncoding, ContentLanguage, ContentCRC64, CacheControl, ContentDisposition, LeaseStatus, LeaseState, LeaseDuration, ServerEncrypted, Deleted, DeletionId, DeletedTime, RemainingRetentionDays, ImmutabilityPolicyUntilDate, ImmutabilityPolicyMode, LegalHold, CopyId, CopyStatus, CopySource, CopyProgress, CopyCompletionTime, CopyStatusDescription, CustomerProvidedKeySha256, RehydratePriority, ArchiveStatus, XmsBlobSequenceNumber, EncryptionScope, IncrementalCopy, TagCount'. For Blob object type schema field value 'DeletedTime' is applicable only for Hns enabled accounts. The valid values for 'Container' definition.objectType include 'Name, Last-Modified, Metadata, LeaseStatus, LeaseState, LeaseDuration, PublicAccess, HasImmutabilityPolicy, HasLegalHold, Etag, DefaultEncryptionScope, DenyEncryptionScopeOverride, ImmutableStorageWithVersioningEnabled, Deleted, Version, DeletedTime, RemainingRetentionDays'. Schema field values 'Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, DeletionId' are valid only for Hns enabled accounts.Schema field values 'Tags, TagCount' are only valid for Non-Hns accounts. + */ schemaFields: string[]; } -@doc("An object that defines the blob inventory rule filter conditions. For 'Blob' definition.objectType all filter properties are applicable, 'blobTypes' is required and others are optional. For 'Container' definition.objectType only prefixMatch is applicable and is optional.") +/** + * An object that defines the blob inventory rule filter conditions. For 'Blob' definition.objectType all filter properties are applicable, 'blobTypes' is required and others are optional. For 'Container' definition.objectType only prefixMatch is applicable and is optional. + */ model BlobInventoryPolicyFilter { - @doc("An array of strings with maximum 10 blob prefixes to be included in the inventory.") + /** + * An array of strings with maximum 10 blob prefixes to be included in the inventory. + */ prefixMatch?: string[]; - @doc("An array of strings with maximum 10 blob prefixes to be excluded from the inventory.") + /** + * An array of strings with maximum 10 blob prefixes to be excluded from the inventory. + */ excludePrefix?: string[]; - @doc("An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs. This field is required when definition.objectType property is set to 'Blob'.") + /** + * An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs. This field is required when definition.objectType property is set to 'Blob'. + */ blobTypes?: string[]; - @doc("Includes blob versions in blob inventory when value is set to true. The definition.schemaFields values 'VersionId and IsCurrentVersion' are required if this property is set to true, else they must be excluded.") + /** + * Includes blob versions in blob inventory when value is set to true. The definition.schemaFields values 'VersionId and IsCurrentVersion' are required if this property is set to true, else they must be excluded. + */ includeBlobVersions?: boolean; - @doc("Includes blob snapshots in blob inventory when value is set to true. The definition.schemaFields value 'Snapshot' is required if this property is set to true, else it must be excluded.") + /** + * Includes blob snapshots in blob inventory when value is set to true. The definition.schemaFields value 'Snapshot' is required if this property is set to true, else it must be excluded. + */ includeSnapshots?: boolean; - @doc("For 'Container' definition.objectType the definition.schemaFields must include 'Deleted, Version, DeletedTime and RemainingRetentionDays'. For 'Blob' definition.objectType and HNS enabled storage accounts the definition.schemaFields must include 'DeletionId, Deleted, DeletedTime and RemainingRetentionDays' and for Hns disabled accounts the definition.schemaFields must include 'Deleted and RemainingRetentionDays', else it must be excluded.") + /** + * For 'Container' definition.objectType the definition.schemaFields must include 'Deleted, Version, DeletedTime and RemainingRetentionDays'. For 'Blob' definition.objectType and HNS enabled storage accounts the definition.schemaFields must include 'DeletionId, Deleted, DeletedTime and RemainingRetentionDays' and for Hns disabled accounts the definition.schemaFields must include 'Deleted and RemainingRetentionDays', else it must be excluded. + */ includeDeleted?: boolean; } -@doc("An error response from the Storage service.") +/** + * An error response from the Storage service. + */ @error model CloudError { - @doc("An error response from the Storage service.") + /** + * An error response from the Storage service. + */ error?: CloudErrorBody; } -@doc("An error response from the Storage service.") +/** + * An error response from the Storage service. + */ model CloudErrorBody { - @doc("An identifier for the error. Codes are invariant and are intended to be consumed programmatically.") + /** + * An identifier for the error. Codes are invariant and are intended to be consumed programmatically. + */ code?: string; - @doc("A message describing the error, intended to be suitable for display in a user interface.") + /** + * A message describing the error, intended to be suitable for display in a user interface. + */ message?: string; - @doc("The target of the particular error. For example, the name of the property in error.") + /** + * The target of the particular error. For example, the name of the property in error. + */ target?: string; - @doc("A list of additional details about the error.") + /** + * A list of additional details about the error. + */ details?: CloudErrorBody[]; } -@doc("A list of private link resources") +/** + * A list of private link resources + */ model PrivateLinkResourceListResult { - @doc("Array of private link resources") + /** + * Array of private link resources + */ value?: PrivateLinkResource[]; } -@doc("A private link resource") +/** + * A private link resource + */ model PrivateLinkResource extends Resource { - @doc("Resource properties.") + /** + * Resource properties. + */ properties?: PrivateLinkResourceProperties; } -@doc("Properties of a private link resource.") +/** + * Properties of a private link resource. + */ model PrivateLinkResourceProperties { - @doc("The private link resource group id.") + /** + * The private link resource group id. + */ @visibility("read") groupId?: string; - @doc("The private link resource required member names.") + /** + * The private link resource required member names. + */ @visibility("read") requiredMembers?: string[]; - @doc("The private link resource Private link DNS zone name.") + /** + * The private link resource Private link DNS zone name. + */ requiredZoneNames?: string[]; } -@doc("The Storage Account ObjectReplicationPolicy properties.") +/** + * The Storage Account ObjectReplicationPolicy properties. + */ model ObjectReplicationPolicyProperties { - @doc("A unique id for object replication policy.") + /** + * A unique id for object replication policy. + */ @visibility("read") policyId?: string; - @doc("Indicates when the policy is enabled on the source account.") + /** + * Indicates when the policy is enabled on the source account. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. enabledTime?: utcDateTime; - @doc("Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false.") + /** + * Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false. + */ sourceAccount: string; - @doc("Required. Destination account name. It should be full resource id if allowCrossTenantReplication set to false.") + /** + * Required. Destination account name. It should be full resource id if allowCrossTenantReplication set to false. + */ destinationAccount: string; - @doc("The storage account object replication rules.") + /** + * The storage account object replication rules. + */ rules?: ObjectReplicationPolicyRule[]; } -@doc("The replication policy rule between two containers.") +/** + * The replication policy rule between two containers. + */ model ObjectReplicationPolicyRule { - @doc("Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.") + /** + * Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account. + */ ruleId?: string; - @doc("Required. Source container name.") + /** + * Required. Source container name. + */ sourceContainer: string; - @doc("Required. Destination container name.") + /** + * Required. Destination container name. + */ destinationContainer: string; - @doc("Optional. An object that defines the filter set.") + /** + * Optional. An object that defines the filter set. + */ filters?: ObjectReplicationPolicyFilter; } -@doc("Filters limit replication to a subset of blobs within the storage account. A logical OR is performed on values in the filter. If multiple filters are defined, a logical AND is performed on all filters.") +/** + * Filters limit replication to a subset of blobs within the storage account. A logical OR is performed on values in the filter. If multiple filters are defined, a logical AND is performed on all filters. + */ model ObjectReplicationPolicyFilter { - @doc("Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.") + /** + * Optional. Filters the results to replicate only blobs whose names begin with the specified prefix. + */ prefixMatch?: string[]; - @doc("Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z") + /** + * Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z + */ minCreationTime?: string; } -@doc("The Storage Account Local User properties.") +/** + * The Storage Account Local User properties. + */ model LocalUserProperties { - @doc("The permission scopes of the local user.") + /** + * The permission scopes of the local user. + */ permissionScopes?: PermissionScope[]; - @doc("Optional, local user home directory.") + /** + * Optional, local user home directory. + */ homeDirectory?: string; - @doc("Optional, local user ssh authorized keys for SFTP.") + /** + * Optional, local user ssh authorized keys for SFTP. + */ sshAuthorizedKeys?: SshPublicKey[]; - @doc("A unique Security Identifier that is generated by the server.") + /** + * A unique Security Identifier that is generated by the server. + */ @visibility("read") sid?: string; - @doc("Indicates whether shared key exists. Set it to false to remove existing shared key.") + /** + * Indicates whether shared key exists. Set it to false to remove existing shared key. + */ hasSharedKey?: boolean; - @doc("Indicates whether ssh key exists. Set it to false to remove existing SSH key.") + /** + * Indicates whether ssh key exists. Set it to false to remove existing SSH key. + */ hasSshKey?: boolean; - @doc("Indicates whether ssh password exists. Set it to false to remove existing SSH password.") + /** + * Indicates whether ssh password exists. Set it to false to remove existing SSH password. + */ hasSshPassword?: boolean; } model PermissionScope { - @doc("The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), and Create (c).") + /** + * The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), and Create (c). + */ permissions: string; - @doc("The service used by the local user, e.g. blob, file.") + /** + * The service used by the local user, e.g. blob, file. + */ service: string; - @doc("The name of resource, normally the container name or the file share name, used by the local user.") + /** + * The name of resource, normally the container name or the file share name, used by the local user. + */ resourceName: string; } model SshPublicKey { - @doc("Optional. It is used to store the function/usage of the key") + /** + * Optional. It is used to store the function/usage of the key + */ description?: string; - @doc("Ssh public key base64 encoded. The format should be: ' ', e.g. ssh-rsa AAAABBBB") + /** + * Ssh public key base64 encoded. The format should be: ' ', e.g. ssh-rsa AAAABBBB + */ key?: string; } -@doc("The Storage Account Local User keys.") +/** + * The Storage Account Local User keys. + */ model LocalUserKeys { - @doc("Optional, local user ssh authorized keys for SFTP.") + /** + * Optional, local user ssh authorized keys for SFTP. + */ sshAuthorizedKeys?: SshPublicKey[]; - @doc("Auto generated by the server for SMB authentication.") + /** + * Auto generated by the server for SMB authentication. + */ @visibility("read") sharedKey?: string; } -@doc("The secrets of Storage Account Local User.") +/** + * The secrets of Storage Account Local User. + */ model LocalUserRegeneratePasswordResult { - @doc("Auto generated password by the server for SSH authentication if hasSshPassword is set to true on the creation of local user.") + /** + * Auto generated password by the server for SSH authentication if hasSshPassword is set to true on the creation of local user. + */ @visibility("read") sshPassword?: string; } -@doc("Properties of the encryption scope.") +/** + * Properties of the encryption scope. + */ model EncryptionScopeProperties { - @doc("The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault.") + /** + * The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault. + */ source?: EncryptionScopeSource; - @doc("The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled.") + /** + * The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled. + */ state?: EncryptionScopeState; - @doc("Gets the creation date and time of the encryption scope in UTC.") + /** + * Gets the creation date and time of the encryption scope in UTC. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. creationTime?: utcDateTime; - @doc("Gets the last modification date and time of the encryption scope in UTC.") + /** + * Gets the last modification date and time of the encryption scope in UTC. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedTime?: utcDateTime; - @doc("The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'.") + /** + * The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'. + */ keyVaultProperties?: EncryptionScopeKeyVaultProperties; - @doc("A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest.") + /** + * A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest. + */ requireInfrastructureEncryption?: boolean; } -@doc("The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'.") +/** + * The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'. + */ model EncryptionScopeKeyVaultProperties { - @doc("The object identifier for a key vault key object. When applied, the encryption scope will use the key referenced by the identifier to enable customer-managed key support on this encryption scope.") + /** + * The object identifier for a key vault key object. When applied, the encryption scope will use the key referenced by the identifier to enable customer-managed key support on this encryption scope. + */ keyUri?: string; - @doc("The object identifier of the current versioned Key Vault Key in use.") + /** + * The object identifier of the current versioned Key Vault Key in use. + */ @visibility("read") currentVersionedKeyIdentifier?: string; - @doc("Timestamp of last rotation of the Key Vault Key.") + /** + * Timestamp of last rotation of the Key Vault Key. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastKeyRotationTimestamp?: utcDateTime; } -@doc("The properties of a storage account’s Blob service.") +/** + * The properties of a storage account’s Blob service. + */ model BlobServicePropertiesProperties { - @doc("Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service.") + /** + * Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service. + */ cors?: CorsRules; - @doc("DefaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions.") + /** + * DefaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions. + */ defaultServiceVersion?: string; - @doc("The blob service properties for blob soft delete.") + /** + * The blob service properties for blob soft delete. + */ deleteRetentionPolicy?: DeleteRetentionPolicy; - @doc("Versioning is enabled if set to true.") + /** + * Versioning is enabled if set to true. + */ isVersioningEnabled?: boolean; - @doc("Deprecated in favor of isVersioningEnabled property.") + /** + * Deprecated in favor of isVersioningEnabled property. + */ automaticSnapshotPolicyEnabled?: boolean; - @doc("The blob service properties for change feed events.") + /** + * The blob service properties for change feed events. + */ changeFeed?: ChangeFeed; - @doc("The blob service properties for blob restore policy.") + /** + * The blob service properties for blob restore policy. + */ restorePolicy?: RestorePolicyProperties; - @doc("The blob service properties for container soft delete.") + /** + * The blob service properties for container soft delete. + */ containerDeleteRetentionPolicy?: DeleteRetentionPolicy; - @doc("The blob service property to configure last access time based tracking policy.") + /** + * The blob service property to configure last access time based tracking policy. + */ lastAccessTimeTrackingPolicy?: LastAccessTimeTrackingPolicy; } -@doc("Sets the CORS rules. You can include up to five CorsRule elements in the request. ") +/** + * Sets the CORS rules. You can include up to five CorsRule elements in the request. + */ model CorsRules { - @doc("The List of CORS rules. You can include up to five CorsRule elements in the request. ") + /** + * The List of CORS rules. You can include up to five CorsRule elements in the request. + */ corsRules?: CorsRule[]; } -@doc("Specifies a CORS rule for the Blob service.") +/** + * Specifies a CORS rule for the Blob service. + */ model CorsRule { - @doc("Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or \"*\" to allow all domains") + /** + * Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains + */ allowedOrigins: string[]; - @doc("Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin.") + /** + * Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin. + */ allowedMethods: AllowedMethods[]; - @doc("Required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response.") + /** + * Required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response. + */ maxAgeInSeconds: int32; - @doc("Required if CorsRule element is present. A list of response headers to expose to CORS clients.") + /** + * Required if CorsRule element is present. A list of response headers to expose to CORS clients. + */ exposedHeaders: string[]; - @doc("Required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request.") + /** + * Required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request. + */ allowedHeaders: string[]; } -@doc("The service properties for soft delete.") +/** + * The service properties for soft delete. + */ model DeleteRetentionPolicy { - @doc("Indicates whether DeleteRetentionPolicy is enabled.") + /** + * Indicates whether DeleteRetentionPolicy is enabled. + */ enabled?: boolean; - @doc("Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365.") + /** + * Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365. + */ @maxValue(365) @minValue(1) days?: int32; - @doc("This property when set to true allows deletion of the soft deleted blob versions and snapshots. This property cannot be used blob restore policy. This property only applies to blob service and does not apply to containers or file share.") + /** + * This property when set to true allows deletion of the soft deleted blob versions and snapshots. This property cannot be used blob restore policy. This property only applies to blob service and does not apply to containers or file share. + */ allowPermanentDelete?: boolean; } -@doc("The blob service properties for change feed events.") +/** + * The blob service properties for change feed events. + */ model ChangeFeed { - @doc("Indicates whether change feed event logging is enabled for the Blob service.") + /** + * Indicates whether change feed event logging is enabled for the Blob service. + */ enabled?: boolean; - @doc("Indicates the duration of changeFeed retention in days. Minimum value is 1 day and maximum value is 146000 days (400 years). A null value indicates an infinite retention of the change feed.") + /** + * Indicates the duration of changeFeed retention in days. Minimum value is 1 day and maximum value is 146000 days (400 years). A null value indicates an infinite retention of the change feed. + */ @maxValue(146000) @minValue(1) retentionInDays?: int32; } -@doc("The blob service properties for blob restore policy") +/** + * The blob service properties for blob restore policy + */ model RestorePolicyProperties { - @doc("Blob restore is enabled if set to true.") + /** + * Blob restore is enabled if set to true. + */ enabled: boolean; - @doc("how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days.") + /** + * how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days. + */ @maxValue(365) @minValue(1) days?: int32; - @doc("Deprecated in favor of minRestoreTime property.") + /** + * Deprecated in favor of minRestoreTime property. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastEnabledTime?: utcDateTime; - @doc("Returns the minimum date and time that the restore can be started.") + /** + * Returns the minimum date and time that the restore can be started. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. minRestoreTime?: utcDateTime; } -@doc("The blob service properties for Last access time based tracking policy.") +/** + * The blob service properties for Last access time based tracking policy. + */ model LastAccessTimeTrackingPolicy { - @doc("When set to true last access time based tracking is enabled.") + /** + * When set to true last access time based tracking is enabled. + */ enable: boolean; - @doc("Name of the policy. The valid value is AccessTimeTracking. This field is currently read only") + /** + * Name of the policy. The valid value is AccessTimeTracking. This field is currently read only + */ name?: Name; - @doc("The field specifies blob object tracking granularity in days, typically how often the blob object should be tracked.This field is currently read only with value as 1") + /** + * The field specifies blob object tracking granularity in days, typically how often the blob object should be tracked.This field is currently read only with value as 1 + */ trackingGranularityInDays?: int32; - @doc("An array of predefined supported blob types. Only blockBlob is the supported value. This field is currently read only") + /** + * An array of predefined supported blob types. Only blockBlob is the supported value. This field is currently read only + */ blobType?: string[]; } -@doc("The properties of a container.") +/** + * The properties of a container. + */ model ContainerProperties { - @doc("The version of the deleted blob container.") + /** + * The version of the deleted blob container. + */ @visibility("read") version?: string; - @doc("Indicates whether the blob container was deleted.") + /** + * Indicates whether the blob container was deleted. + */ @visibility("read") deleted?: boolean; - @doc("Blob container deletion time.") + /** + * Blob container deletion time. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. deletedTime?: utcDateTime; - @doc("Remaining retention days for soft deleted blob container.") + /** + * Remaining retention days for soft deleted blob container. + */ @visibility("read") remainingRetentionDays?: int32; - @doc("Default the container to use specified encryption scope for all writes.") + /** + * Default the container to use specified encryption scope for all writes. + */ defaultEncryptionScope?: string; - @doc("Block override of encryption scope from the container default.") + /** + * Block override of encryption scope from the container default. + */ denyEncryptionScopeOverride?: boolean; - @doc("Specifies whether data in the container may be accessed publicly and the level of access.") + /** + * Specifies whether data in the container may be accessed publicly and the level of access. + */ publicAccess?: PublicAccess; - @doc("Returns the date and time the container was last modified.") + /** + * Returns the date and time the container was last modified. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedTime?: utcDateTime; - @doc("The lease status of the container.") + /** + * The lease status of the container. + */ @visibility("read") leaseStatus?: LeaseStatus; - @doc("Lease state of the container.") + /** + * Lease state of the container. + */ @visibility("read") leaseState?: LeaseState; - @doc("Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.") + /** + * Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased. + */ @visibility("read") leaseDuration?: LeaseDuration; - @doc("A name-value pair to associate with the container as metadata.") + /** + * A name-value pair to associate with the container as metadata. + */ metadata?: Record; - @doc("The ImmutabilityPolicy property of the container.") + /** + * The ImmutabilityPolicy property of the container. + */ @visibility("read") immutabilityPolicy?: ImmutabilityPolicyProperties; - @doc("The LegalHold property of the container.") + /** + * The LegalHold property of the container. + */ @visibility("read") legalHold?: LegalHoldProperties; - @doc("The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.") + /** + * The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. + */ @visibility("read") hasLegalHold?: boolean; - @doc("The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container.") + /** + * The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container. + */ @visibility("read") hasImmutabilityPolicy?: boolean; - @doc("The object level immutability property of the container. The property is immutable and can only be set to true at the container creation time. Existing containers must undergo a migration process.") + /** + * The object level immutability property of the container. The property is immutable and can only be set to true at the container creation time. Existing containers must undergo a migration process. + */ immutableStorageWithVersioning?: ImmutableStorageWithVersioning; - @doc("Enable NFSv3 root squash on blob container.") + /** + * Enable NFSv3 root squash on blob container. + */ enableNfsV3RootSquash?: boolean; - @doc("Enable NFSv3 all squash on blob container.") + /** + * Enable NFSv3 all squash on blob container. + */ enableNfsV3AllSquash?: boolean; } -@doc("The properties of an ImmutabilityPolicy of a blob container.") +/** + * The properties of an ImmutabilityPolicy of a blob container. + */ model ImmutabilityPolicyProperties { - @doc("The properties of an ImmutabilityPolicy of a blob container.") + /** + * The properties of an ImmutabilityPolicy of a blob container. + */ properties?: ImmutabilityPolicyProperty; - @doc("ImmutabilityPolicy Etag.") + /** + * ImmutabilityPolicy Etag. + */ @visibility("read") etag?: string; - @doc("The ImmutabilityPolicy update history of the blob container.") + /** + * The ImmutabilityPolicy update history of the blob container. + */ @visibility("read") updateHistory?: UpdateHistoryProperty[]; } -@doc("The properties of an ImmutabilityPolicy of a blob container.") +/** + * The properties of an ImmutabilityPolicy of a blob container. + */ model ImmutabilityPolicyProperty { - @doc("The immutability period for the blobs in the container since the policy creation, in days.") + /** + * The immutability period for the blobs in the container since the policy creation, in days. + */ immutabilityPeriodSinceCreationInDays?: int32; - @doc("The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.") + /** + * The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. + */ @visibility("read") state?: ImmutabilityPolicyState; - @doc("This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.") + /** + * This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. + */ allowProtectedAppendWrites?: boolean; - @doc("This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive.") + /** + * This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive. + */ allowProtectedAppendWritesAll?: boolean; } -@doc("An update history of the ImmutabilityPolicy of a blob container.") +/** + * An update history of the ImmutabilityPolicy of a blob container. + */ model UpdateHistoryProperty { - @doc("The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend.") + /** + * The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend. + */ @visibility("read") update?: ImmutabilityPolicyUpdateType; - @doc("The immutability period for the blobs in the container since the policy creation, in days.") + /** + * The immutability period for the blobs in the container since the policy creation, in days. + */ @visibility("read") immutabilityPeriodSinceCreationInDays?: int32; - @doc("Returns the date and time the ImmutabilityPolicy was updated.") + /** + * Returns the date and time the ImmutabilityPolicy was updated. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timestamp?: utcDateTime; - @doc("Returns the Object ID of the user who updated the ImmutabilityPolicy.") + /** + * Returns the Object ID of the user who updated the ImmutabilityPolicy. + */ @visibility("read") objectIdentifier?: string; - @doc("Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy.") + /** + * Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy. + */ @visibility("read") tenantId?: string; - @doc("Returns the User Principal Name of the user who updated the ImmutabilityPolicy.") + /** + * Returns the User Principal Name of the user who updated the ImmutabilityPolicy. + */ @visibility("read") upn?: string; - @doc("This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API.") + /** + * This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. + */ allowProtectedAppendWrites?: boolean; - @doc("This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive.") + /** + * This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive. + */ allowProtectedAppendWritesAll?: boolean; } -@doc("The LegalHold property of a blob container.") +/** + * The LegalHold property of a blob container. + */ model LegalHoldProperties { - @doc("The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.") + /** + * The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. + */ @visibility("read") hasLegalHold?: boolean; - @doc("The list of LegalHold tags of a blob container.") + /** + * The list of LegalHold tags of a blob container. + */ tags?: TagProperty[]; - @doc("Protected append blob writes history.") + /** + * Protected append blob writes history. + */ protectedAppendWritesHistory?: ProtectedAppendWritesHistory; } -@doc("A tag of the LegalHold of a blob container.") +/** + * A tag of the LegalHold of a blob container. + */ model TagProperty { - @doc("The tag value.") + /** + * The tag value. + */ @visibility("read") tag?: string; - @doc("Returns the date and time the tag was added.") + /** + * Returns the date and time the tag was added. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timestamp?: utcDateTime; - @doc("Returns the Object ID of the user who added the tag.") + /** + * Returns the Object ID of the user who added the tag. + */ @visibility("read") objectIdentifier?: string; - @doc("Returns the Tenant ID that issued the token for the user who added the tag.") + /** + * Returns the Tenant ID that issued the token for the user who added the tag. + */ @visibility("read") tenantId?: string; - @doc("Returns the User Principal Name of the user who added the tag.") + /** + * Returns the User Principal Name of the user who added the tag. + */ @visibility("read") upn?: string; } -@doc("Protected append writes history setting for the blob container with Legal holds.") +/** + * Protected append writes history setting for the blob container with Legal holds. + */ model ProtectedAppendWritesHistory { - @doc("When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted.") + /** + * When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. + */ allowProtectedAppendWritesAll?: boolean; - @doc("Returns the date and time the tag was added.") + /** + * Returns the date and time the tag was added. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timestamp?: utcDateTime; } -@doc("Object level immutability properties of the container.") +/** + * Object level immutability properties of the container. + */ model ImmutableStorageWithVersioning { - @doc("This is an immutable property, when set to true it enables object level immutability at the container level.") + /** + * This is an immutable property, when set to true it enables object level immutability at the container level. + */ enabled?: boolean; - @doc("Returns the date and time the object level immutability was enabled.") + /** + * Returns the date and time the object level immutability was enabled. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timeStamp?: utcDateTime; - @doc("This property denotes the container level immutability to object level immutability migration state.") + /** + * This property denotes the container level immutability to object level immutability migration state. + */ @visibility("read") migrationState?: MigrationState; } -@doc("The resource model definition for an Azure Resource Manager resource with an etag.") +/** + * The resource model definition for an Azure Resource Manager resource with an etag. + */ model AzureEntityResource extends Resource { - @doc("Resource Etag.") + /** + * Resource Etag. + */ @visibility("read") etag?: string; } -@doc("The LegalHold property of a blob container.") +/** + * The LegalHold property of a blob container. + */ model LegalHold { - @doc("The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.") + /** + * The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account. + */ @visibility("read") hasLegalHold?: boolean; - @doc("Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.") + /** + * Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP. + */ tags: string[]; - @doc("When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted.") + /** + * When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. + */ allowProtectedAppendWritesAll?: boolean; } -@doc("Lease Container request schema.") +/** + * Lease Container request schema. + */ model LeaseContainerRequest { - @doc("Specifies the lease action. Can be one of the available actions.") + /** + * Specifies the lease action. Can be one of the available actions. + */ action: LeaseContainerRequestAction; - @doc("Identifies the lease. Can be specified in any valid GUID string format.") + /** + * Identifies the lease. Can be specified in any valid GUID string format. + */ leaseId?: string; - @doc("Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60.") + /** + * Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. + */ breakPeriod?: int32; - @doc("Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires.") + /** + * Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. + */ leaseDuration?: int32; - @doc("Optional for acquire, required for change. Proposed lease ID, in a GUID string format.") + /** + * Optional for acquire, required for change. Proposed lease ID, in a GUID string format. + */ proposedLeaseId?: string; } -@doc("Lease Container response schema.") +/** + * Lease Container response schema. + */ model LeaseContainerResponse { - @doc("Returned unique lease ID that must be included with any request to delete the container, or to renew, change, or release the lease.") + /** + * Returned unique lease ID that must be included with any request to delete the container, or to renew, change, or release the lease. + */ leaseId?: string; - @doc("Approximate time remaining in the lease period, in seconds.") + /** + * Approximate time remaining in the lease period, in seconds. + */ leaseTimeSeconds?: string; } -@doc("The properties of File services in storage account.") +/** + * The properties of File services in storage account. + */ model FileServicePropertiesProperties { - @doc("Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service.") + /** + * Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service. + */ cors?: CorsRules; - @doc("The file service properties for share soft delete.") + /** + * The file service properties for share soft delete. + */ shareDeleteRetentionPolicy?: DeleteRetentionPolicy; - @doc("Protocol settings for file service") + /** + * Protocol settings for file service + */ protocolSettings?: ProtocolSettings; } -@doc("Protocol settings for file service") +/** + * Protocol settings for file service + */ model ProtocolSettings { - @doc("Setting for SMB protocol") + /** + * Setting for SMB protocol + */ smb?: SmbSetting; } -@doc("Setting for SMB protocol") +/** + * Setting for SMB protocol + */ model SmbSetting { - @doc("Multichannel setting. Applies to Premium FileStorage only.") + /** + * Multichannel setting. Applies to Premium FileStorage only. + */ multichannel?: Multichannel; - @doc("SMB protocol versions supported by server. Valid values are SMB2.1, SMB3.0, SMB3.1.1. Should be passed as a string with delimiter ';'.") + /** + * SMB protocol versions supported by server. Valid values are SMB2.1, SMB3.0, SMB3.1.1. Should be passed as a string with delimiter ';'. + */ versions?: string; - @doc("SMB authentication methods supported by server. Valid values are NTLMv2, Kerberos. Should be passed as a string with delimiter ';'.") + /** + * SMB authentication methods supported by server. Valid values are NTLMv2, Kerberos. Should be passed as a string with delimiter ';'. + */ authenticationMethods?: string; - @doc("Kerberos ticket encryption supported by server. Valid values are RC4-HMAC, AES-256. Should be passed as a string with delimiter ';'") + /** + * Kerberos ticket encryption supported by server. Valid values are RC4-HMAC, AES-256. Should be passed as a string with delimiter ';' + */ kerberosTicketEncryption?: string; - @doc("SMB channel encryption supported by server. Valid values are AES-128-CCM, AES-128-GCM, AES-256-GCM. Should be passed as a string with delimiter ';'.") + /** + * SMB channel encryption supported by server. Valid values are AES-128-CCM, AES-128-GCM, AES-256-GCM. Should be passed as a string with delimiter ';'. + */ channelEncryption?: string; } -@doc("Multichannel setting. Applies to Premium FileStorage only.") +/** + * Multichannel setting. Applies to Premium FileStorage only. + */ model Multichannel { - @doc("Indicates whether multichannel is enabled") + /** + * Indicates whether multichannel is enabled + */ enabled?: boolean; } -@doc("The properties of the file share.") +/** + * The properties of the file share. + */ model FileShareProperties { - @doc("Returns the date and time the share was last modified.") + /** + * Returns the date and time the share was last modified. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedTime?: utcDateTime; - @doc("A name-value pair to associate with the share as metadata.") + /** + * A name-value pair to associate with the share as metadata. + */ metadata?: Record; - @doc("The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.") + /** + * The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. + */ @maxValue(102400) @minValue(1) shareQuota?: int32; - @doc("The authentication protocol that is used for the file share. Can only be specified when creating a share.") + /** + * The authentication protocol that is used for the file share. Can only be specified when creating a share. + */ @visibility("read", "create") enabledProtocols?: EnabledProtocols; - @doc("The property is for NFS share only. The default is NoRootSquash.") + /** + * The property is for NFS share only. The default is NoRootSquash. + */ rootSquash?: RootSquashType; - @doc("The version of the share.") + /** + * The version of the share. + */ @visibility("read") version?: string; - @doc("Indicates whether the share was deleted.") + /** + * Indicates whether the share was deleted. + */ @visibility("read") deleted?: boolean; - @doc("The deleted time if the share was deleted.") + /** + * The deleted time if the share was deleted. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. deletedTime?: utcDateTime; - @doc("Remaining retention days for share that was soft deleted.") + /** + * Remaining retention days for share that was soft deleted. + */ @visibility("read") remainingRetentionDays?: int32; - @doc("Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.") + /** + * Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. + */ accessTier?: ShareAccessTier; - @doc("Indicates the last modification time for share access tier.") + /** + * Indicates the last modification time for share access tier. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. accessTierChangeTime?: utcDateTime; - @doc("Indicates if there is a pending transition for access tier.") + /** + * Indicates if there is a pending transition for access tier. + */ @visibility("read") accessTierStatus?: string; - @doc("The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files.") + /** + * The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files. + */ @visibility("read") - shareUsageBytes?: int32; + shareUsageBytes?: int64; - @doc("The lease status of the share.") + /** + * The lease status of the share. + */ @visibility("read") leaseStatus?: LeaseStatus; - @doc("Lease state of the share.") + /** + * Lease state of the share. + */ @visibility("read") leaseState?: LeaseState; - @doc("Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased.") + /** + * Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased. + */ @visibility("read") leaseDuration?: LeaseDuration; - @doc("List of stored access policies specified on the share.") + /** + * List of stored access policies specified on the share. + */ signedIdentifiers?: SignedIdentifier[]; - @doc("Creation time of share snapshot returned in the response of list shares with expand param \"snapshots\".") + /** + * Creation time of share snapshot returned in the response of list shares with expand param "snapshots". + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. snapshotTime?: utcDateTime; } model SignedIdentifier { - @doc("An unique identifier of the stored access policy.") + /** + * An unique identifier of the stored access policy. + */ id?: string; - @doc("Access policy") + /** + * Access policy + */ accessPolicy?: AccessPolicy; } model AccessPolicy { - @doc("Start time of the access policy") + /** + * Start time of the access policy + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime?: utcDateTime; - @doc("Expiry time of the access policy") + /** + * Expiry time of the access policy + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expiryTime?: utcDateTime; - @doc("List of abbreviated permissions.") + /** + * List of abbreviated permissions. + */ permission?: string; } -@doc("The deleted share to be restored.") +/** + * The deleted share to be restored. + */ model DeletedShare { - @doc("Required. Identify the name of the deleted share that will be restored.") + /** + * Required. Identify the name of the deleted share that will be restored. + */ deletedShareName: string; - @doc("Required. Identify the version of the deleted share that will be restored.") + /** + * Required. Identify the version of the deleted share that will be restored. + */ deletedShareVersion: string; } -@doc("Lease Share request schema.") +/** + * Lease Share request schema. + */ model LeaseShareRequest { - @doc("Specifies the lease action. Can be one of the available actions.") + /** + * Specifies the lease action. Can be one of the available actions. + */ action: LeaseShareAction; - @doc("Identifies the lease. Can be specified in any valid GUID string format.") + /** + * Identifies the lease. Can be specified in any valid GUID string format. + */ leaseId?: string; - @doc("Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60.") + /** + * Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60. + */ breakPeriod?: int32; - @doc("Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires.") + /** + * Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires. + */ leaseDuration?: int32; - @doc("Optional for acquire, required for change. Proposed lease ID, in a GUID string format.") + /** + * Optional for acquire, required for change. Proposed lease ID, in a GUID string format. + */ proposedLeaseId?: string; } -@doc("Lease Share response schema.") +/** + * Lease Share response schema. + */ model LeaseShareResponse { - @doc("Returned unique lease ID that must be included with any request to delete the share, or to renew, change, or release the lease.") + /** + * Returned unique lease ID that must be included with any request to delete the share, or to renew, change, or release the lease. + */ leaseId?: string; - @doc("Approximate time remaining in the lease period, in seconds.") + /** + * Approximate time remaining in the lease period, in seconds. + */ leaseTimeSeconds?: string; } -@doc("The properties of a storage account’s Queue service.") +/** + * The properties of a storage account’s Queue service. + */ model QueueServicePropertiesProperties { - @doc("Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Queue service.") + /** + * Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Queue service. + */ cors?: CorsRules; } model QueueProperties { - @doc("A name-value pair that represents queue metadata.") + /** + * A name-value pair that represents queue metadata. + */ metadata?: Record; - @doc("Integer indicating an approximate number of messages in the queue. This number is not lower than the actual number of messages in the queue, but could be higher.") + /** + * Integer indicating an approximate number of messages in the queue. This number is not lower than the actual number of messages in the queue, but could be higher. + */ @visibility("read") approximateMessageCount?: int32; } -@doc("The properties of a storage account’s Table service.") +/** + * The properties of a storage account’s Table service. + */ model TableServicePropertiesProperties { - @doc("Specifies CORS rules for the Table service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Table service.") + /** + * Specifies CORS rules for the Table service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Table service. + */ cors?: CorsRules; } model TableProperties { - @doc("Table name under the specified account") + /** + * Table name under the specified account + */ @visibility("read") tableName?: string; - @doc("List of stored access policies specified on the table.") + /** + * List of stored access policies specified on the table. + */ signedIdentifiers?: TableSignedIdentifier[]; } -@doc("Object to set Table Access Policy.") +/** + * Object to set Table Access Policy. + */ model TableSignedIdentifier { - @doc("unique-64-character-value of the stored access policy.") + /** + * unique-64-character-value of the stored access policy. + */ id: string; - @doc("Access policy") + /** + * Access policy + */ accessPolicy?: TableAccessPolicy; } -@doc("Table Access Policy Properties Object.") +/** + * Table Access Policy Properties Object. + */ model TableAccessPolicy { - @doc("Start time of the access policy") + /** + * Start time of the access policy + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime?: utcDateTime; - @doc("Expiry time of the access policy") + /** + * Expiry time of the access policy + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expiryTime?: utcDateTime; - @doc("Required. List of abbreviated permissions. Supported permission values include 'r','a','u','d'") + /** + * Required. List of abbreviated permissions. Supported permission values include 'r','a','u','d' + */ permission: string; } -@doc("The blob container properties be listed out.") +/** + * The blob container properties be listed out. + */ model ListContainerItem extends AzureEntityResource { - @doc("The blob container properties be listed out.") + /** + * The blob container properties be listed out. + */ properties?: ContainerProperties; } -@doc("The file share properties be listed out.") +/** + * The file share properties be listed out. + */ model FileShareItem extends AzureEntityResource { - @doc("The file share properties be listed out.") + /** + * The file share properties be listed out. + */ properties?: FileShareProperties; } model ListQueue extends Resource { - @doc("List Queue resource properties.") + /** + * List Queue resource properties. + */ @projectedName("json", "properties") queueProperties?: ListQueueProperties; } model ListQueueProperties { - @doc("A name-value pair that represents queue metadata.") + /** + * A name-value pair that represents queue metadata. + */ metadata?: Record; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp index 3e80a78bdf..df8e7c9091 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp @@ -10,12 +10,16 @@ using Azure.ResourceManager; namespace Microsoft.Storage; interface SkusOperations { - @doc("Lists the available SKUs supported by Microsoft.Storage for given subscription.") + /** + * Lists the available SKUs supported by Microsoft.Storage for given subscription. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/skus") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; @@ -25,17 +29,23 @@ interface SkusOperations { } interface UsagesOperations { - @doc("Gets the current usage count and the limit for the resources of the location under the subscription.") + /** + * Gets the current usage count and the limit for the resources of the location under the subscription. + */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages") @get - ListByLocation is Azure.Core.Foundations.Operation< + listByLocation is Azure.Core.Foundations.Operation< { - @doc("The ID of the target subscription.") + /** + * The ID of the target subscription. + */ @minLength(1) @path subscriptionId: string; - @doc("The location of the Azure Storage resource.") + /** + * The location of the Azure Storage resource. + */ @path location: string; }, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/tspconfig.yaml index 691f3c1b0c..2faa332586 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/tspconfig.yaml @@ -2,6 +2,7 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp index a9f84093aa..a39940c1b1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp @@ -12,10 +12,14 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Test; -@doc("A Test resource") +/** + * A Test resource + */ @parentResource(Employee) model DictProperty is TrackedResource> { - @doc("Name of resource") + /** + * Name of resource + */ @pattern("^[a-zA-Z0-9-]{3,24}$") @path @key("name") @@ -25,9 +29,15 @@ model DictProperty is TrackedResource> { @armResourceOperations interface DictProperties { - @doc("Get a Resource.") + /** + * Get a Resource. + */ get is ArmResourceRead; - @doc("List resources by resource group") + /** + * List resources by resource group + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DictProperties_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp index b5e091fb0d..2708de6554 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp @@ -11,9 +11,13 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Test; -@doc("A Test resource") +/** + * A Test resource + */ model Employee is TrackedResource { - @doc("Name of employee") + /** + * Name of employee + */ @pattern("^[a-zA-Z0-9-]{3,24}$") @path @key("employeeName") @@ -23,25 +27,40 @@ model Employee is TrackedResource { @armResourceOperations interface Employees { - @doc("Get a Employee") + /** + * Get a Employee + */ get is ArmResourceRead; - @doc("Create a Employee") - createOrUpdate is ArmResourceCreateOrUpdateAsync< + /** + * Create a Employee + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync< Employee, BaseParameters, ArmAsyncOperationHeader >; - @doc("Update a Employee") + /** + * Update a Employee + */ + @parameterVisibility("read") update is ArmCustomPatchSync; - @doc("Delete a Employee") + /** + * Delete a Employee + */ delete is ArmResourceDeleteSync; - @doc("List Employee resources by resource group") + /** + * List Employee resources by resource group + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Employees_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; - @doc("List Employee resources by subscription ID") + /** + * List Employee resources by subscription ID + */ listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp index d43b05622c..7e635da101 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp @@ -12,7 +12,9 @@ using TypeSpec.Http; using TypeSpec.OpenAPI; namespace Microsoft.Test; -@doc("A Test resource") +/** + * A Test resource + */ @singleton("default") @parentResource(Employee) model Enroll is TrackedResource { @@ -23,6 +25,8 @@ model Enroll is TrackedResource { @armResourceOperations interface Enrolls { - @doc("Get a Enroll.") + /** + * Get a Enroll. + */ get is ArmResourceRead; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp index c343b56788..903c1d05ca 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp @@ -13,18 +13,24 @@ using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; using TypeSpec.Versioning; +/** + * For test. + */ @armProviderNamespace @service({ title: "Azure Test resource management API.", }) @versioned(Versions) -@doc("For test.") namespace Microsoft.Test; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { + /** + * The 2023-10-12 API version. + */ @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) - @doc("The 2023-10-12 API version.") v2023_10_12: "2023-10-12", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp index d6ce0dd694..150a375fb7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp @@ -11,98 +11,147 @@ namespace Microsoft.Test; interface Operations extends Azure.ResourceManager.Operations {} -@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") -enum Origin { - user, - system, - `user,system`, -} - -@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") -enum ActionType { - Internal, -} - -@doc("The provisioning state of a resource.") +/** + * The provisioning state of a resource. + */ enum ProvisioningState { - @doc("Resource has been created.") Succeeded, - @doc("Resource creation failed.") Failed, - @doc("Resource creation was canceled.") Canceled, - @doc("The resource is being provisioned") Provisioning, - @doc("The resource is updating") Updating, - @doc("The resource is being deleted") Deleting, - @doc("The resource create request has been accepted") Accepted, -} - -@doc("The type of identity that created the resource.") -enum CreatedByType { - User, - Application, - ManagedIdentity, - Key, + /** + * Resource has been created. + */ + Succeeded, + + /** + * Resource creation failed. + */ + Failed, + + /** + * Resource creation was canceled. + */ + Canceled, + + /** + * The resource is being provisioned + */ + Provisioning, + + /** + * The resource is updating + */ + Updating, + + /** + * The resource is being deleted + */ + Deleting, + + /** + * The resource create request has been accepted + */ + Accepted, } -@doc("Employee properties") +/** + * Employee properties + */ model EmployeeProperties { - @doc("Age of employee") + /** + * Age of employee + */ age?: int32; - @doc("City of employee") + /** + * City of employee + */ city?: string; - @doc("Profile of employee") + /** + * Profile of employee + */ profile?: bytes; - @doc("The status of the last operation.") + /** + * The status of the last operation. + */ @visibility("read") provisioningState?: ProvisioningState; } -@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + */ model Resource { - @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + */ @visibility("read") id?: string; - @doc("The name of the resource") + /** + * The name of the resource + */ @visibility("read") name?: string; - @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + */ @visibility("read") type?: string; - @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ @visibility("read") systemData?: SystemData; } -@doc("The type used for update operations of the Employee.") +/** + * The type used for update operations of the Employee. + */ model EmployeeUpdate { - @doc("Resource tags.") + /** + * Resource tags. + */ tags?: Record; - @doc("The updatable properties of the Employee.") + /** + * The updatable properties of the Employee. + */ properties?: EmployeeUpdateProperties; } -@doc("The updatable properties of the Employee.") +/** + * The updatable properties of the Employee. + */ model EmployeeUpdateProperties { - @doc("Age of employee") + /** + * Age of employee + */ age?: int32; - @doc("City of employee") + /** + * City of employee + */ city?: string; - @doc("Profile of employee") + /** + * Profile of employee + */ profile?: bytes; } -@doc("Enroll properties") +/** + * Enroll properties + */ model EnrollProperties { - @doc("Country of employee") + /** + * Country of employee + */ country?: int32; - @doc("City of employee") + /** + * City of employee + */ city?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/tspconfig.yaml index 691f3c1b0c..2faa332586 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/tspconfig.yaml @@ -2,6 +2,7 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + use-read-only-status-schema: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp index e5066a7b78..f85f69d014 100644 --- a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp @@ -13,11 +13,17 @@ using TypeSpec.Http; batchUrl: string } ) -@doc("A client for issuing REST requests to the Azure Batch service.") +/** +* A client for issuing REST requests to the Azure Batch service. +*/ namespace Azure.Batch; -@doc("The available API versions.") +/** +* The available API versions. +*/ enum Versions { -@doc("The 2022-01-01.15.0 API version.") +/** +* The 2022-01-01.15.0 API version. +*/ v2022_01_01.15.0: "2022-01-01.15.0", } \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp index e54a815a15..d59c2e94b8 100644 --- a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp @@ -8,816 +8,1086 @@ using Azure.Core; namespace Azure.Batch; -@doc("The type of operating system (e.g. Windows or Linux) of the Image.") +/** + * The type of operating system (e.g. Windows or Linux) of the Image. + */ @fixed enum OSType { - @doc("The Linux operating system.") linux, - @doc("The Windows operating system.") windows, + /** + * The Linux operating system. + */ + linux, + + /** + * The Windows operating system. + */ + windows, } -@doc(""" -Whether the Azure Batch service actively verifies that the Image is compatible -with the associated Compute Node agent SKU. -""") +/** + * Whether the Azure Batch service actively verifies that the Image is compatible + * with the associated Compute Node agent SKU. + */ @fixed enum VerificationType { - @doc(""" -The Image is guaranteed to be compatible with the associated Compute Node agent -SKU and all Batch features have been confirmed to work as expected. -""") + /** + * The Image is guaranteed to be compatible with the associated Compute Node agent + * SKU and all Batch features have been confirmed to work as expected. + */ verified, - @doc(""" -The associated Compute Node agent SKU should have binary compatibility with the -Image, but specific functionality has not been verified. -""") + + /** + * The associated Compute Node agent SKU should have binary compatibility with the + * Image, but specific functionality has not been verified. + */ unverified, } -@doc("The state of the Certificate.") +/** + * The state of the Certificate. + */ @fixed enum CertificateState { - @doc("The Certificate is available for use in Pools.") active, - @doc(""" -The user has requested that the Certificate be deleted, but the delete -operation has not yet completed. You may not reference the Certificate when -creating or updating Pools. -""") + /** + * The Certificate is available for use in Pools. + */ + active, + + /** + * The user has requested that the Certificate be deleted, but the delete + * operation has not yet completed. You may not reference the Certificate when + * creating or updating Pools. + */ deleting, - @doc(""" -The user requested that the Certificate be deleted, but there are Pools that -still have references to the Certificate, or it is still installed on one or -more Nodes. (The latter can occur if the Certificate has been removed from the -Pool, but the Compute Node has not yet restarted. Compute Nodes refresh their -Certificates only when they restart.) You may use the cancel Certificate delete -operation to cancel the delete, or the delete Certificate operation to retry -the delete. -""") + + /** + * The user requested that the Certificate be deleted, but there are Pools that + * still have references to the Certificate, or it is still installed on one or + * more Nodes. (The latter can occur if the Certificate has been removed from the + * Pool, but the Compute Node has not yet restarted. Compute Nodes refresh their + * Certificates only when they restart.) You may use the cancel Certificate delete + * operation to cancel the delete, or the delete Certificate operation to retry + * the delete. + */ deleteFailed: "deletefailed", } -@doc("The format of the Certificate data.") +/** + * The format of the Certificate data. + */ @fixed enum CertificateFormat { - @doc("The Certificate is a PFX (PKCS#12) formatted Certificate or Certificate chain.") + /** + * The Certificate is a PFX (PKCS#12) formatted Certificate or Certificate chain. + */ pfx, - @doc("The Certificate is a base64-encoded X.509 Certificate.") cer, + + /** + * The Certificate is a base64-encoded X.509 Certificate. + */ + cer, } -@doc("The state of the Job Schedule.") +/** + * The state of the Job Schedule. + */ @fixed enum JobScheduleState { - @doc("The Job Schedule is active and will create Jobs as per its schedule.") + /** + * The Job Schedule is active and will create Jobs as per its schedule. + */ active, - @doc(""" -The Job Schedule has terminated, either by reaching its end time or by the user -terminating it explicitly. -""") + + /** + * The Job Schedule has terminated, either by reaching its end time or by the user + * terminating it explicitly. + */ completed, - @doc(""" -The user has disabled the Job Schedule. The scheduler will not initiate any new -Jobs will on this schedule, but any existing active Job will continue to run. -""") + + /** + * The user has disabled the Job Schedule. The scheduler will not initiate any new + * Jobs will on this schedule, but any existing active Job will continue to run. + */ disabled, - @doc(""" -The Job Schedule has no more work to do, or has been explicitly terminated by -the user, but the termination operation is still in progress. The scheduler -will not initiate any new Jobs for this Job Schedule, nor is any existing Job -active. -""") + + /** + * The Job Schedule has no more work to do, or has been explicitly terminated by + * the user, but the termination operation is still in progress. The scheduler + * will not initiate any new Jobs for this Job Schedule, nor is any existing Job + * active. + */ terminating, - @doc(""" -The user has requested that the Job Schedule be deleted, but the delete -operation is still in progress. The scheduler will not initiate any new Jobs -for this Job Schedule, and will delete any existing Jobs and Tasks under the -Job Schedule, including any active Job. The Job Schedule will be deleted when -all Jobs and Tasks under the Job Schedule have been deleted. -""") + + /** + * The user has requested that the Job Schedule be deleted, but the delete + * operation is still in progress. The scheduler will not initiate any new Jobs + * for this Job Schedule, and will delete any existing Jobs and Tasks under the + * Job Schedule, including any active Job. The Job Schedule will be deleted when + * all Jobs and Tasks under the Job Schedule have been deleted. + */ deleting, } -@doc(""" -The action the Batch service should take when all Tasks in the Job are in the -completed state. -""") +/** + * The action the Batch service should take when all Tasks in the Job are in the + * completed state. + */ @fixed enum OnAllTasksComplete { - @doc(""" -Do nothing. The Job remains active unless terminated or disabled by some other -means. -""") + /** + * Do nothing. The Job remains active unless terminated or disabled by some other + * means. + */ noAction: "noaction", - @doc("Terminate the Job. The Job's terminateReason is set to 'AllTasksComplete'.") + + /** + * Terminate the Job. The Job's terminateReason is set to 'AllTasksComplete'. + */ terminateJob: "terminatejob", } -@doc(""" -A Task is considered to have failed if has a failureInfo. A failureInfo is set -if the Task completes with a non-zero exit code after exhausting its retry -count, or if there was an error starting the Task, for example due to a -resource file download error. The default is noaction. -""") +/** + * A Task is considered to have failed if has a failureInfo. A failureInfo is set + * if the Task completes with a non-zero exit code after exhausting its retry + * count, or if there was an error starting the Task, for example due to a + * resource file download error. The default is noaction. + */ @fixed enum OnTaskFailure { - @doc(""" -Do nothing. The Job remains active unless terminated or disabled by some other -means. -""") + /** + * Do nothing. The Job remains active unless terminated or disabled by some other + * means. + */ noAction: "noaction", - @doc(""" -Take the action associated with the Task exit condition in the Task's -exitConditions collection. (This may still result in no action being taken, if -that is what the Task specifies.) -""") + + /** + * Take the action associated with the Task exit condition in the Task's + * exitConditions collection. (This may still result in no action being taken, if + * that is what the Task specifies.) + */ performExitOptionsJobAction: "performexitoptionsjobaction", } -@doc("The default is 'taskWorkingDirectory'.") +/** + * The default is 'taskWorkingDirectory'. + */ @fixed enum ContainerWorkingDirectory { - @doc(""" -Use the standard Batch service Task working directory, which will contain the -Task Resource Files populated by Batch. -""") + /** + * Use the standard Batch service Task working directory, which will contain the + * Task Resource Files populated by Batch. + */ taskWorkingDirectory, - @doc(""" -Use the working directory defined in the container Image. Beware that this -directory will not contain the Resource Files downloaded by Batch. -""") + + /** + * Use the working directory defined in the container Image. Beware that this + * directory will not contain the Resource Files downloaded by Batch. + */ containerImageDefault, } -@doc(""" -The conditions under which a Task output file or set of files should be -uploaded. -""") +/** + * The conditions under which a Task output file or set of files should be + * uploaded. + */ @fixed enum OutputFileUploadCondition { - @doc("Upload the file(s) only after the Task process exits with an exit code of 0.") + /** + * Upload the file(s) only after the Task process exits with an exit code of 0. + */ taskSuccess: "tasksuccess", - @doc("Upload the file(s) only after the Task process exits with a nonzero exit code.") + + /** + * Upload the file(s) only after the Task process exits with a nonzero exit code. + */ taskFailure: "taskfailure", - @doc(""" -Upload the file(s) after the Task process exits, no matter what the exit code -was. -""") + + /** + * Upload the file(s) after the Task process exits, no matter what the exit code + * was. + */ taskCompletion: "taskcompletion", } -@doc(""" -The default value is pool. If the pool is running Windows a value of Task -should be specified if stricter isolation between tasks is required. For -example, if the task mutates the registry in a way which could impact other -tasks, or if certificates have been specified on the pool which should not be -accessible by normal tasks but should be accessible by StartTasks. -""") +/** + * The default value is pool. If the pool is running Windows a value of Task + * should be specified if stricter isolation between tasks is required. For + * example, if the task mutates the registry in a way which could impact other + * tasks, or if certificates have been specified on the pool which should not be + * accessible by normal tasks but should be accessible by StartTasks. + */ @fixed enum AutoUserScope { - @doc("Specifies that the service should create a new user for the Task.") + /** + * Specifies that the service should create a new user for the Task. + */ task, - @doc(""" -Specifies that the Task runs as the common auto user Account which is created -on every Compute Node in a Pool. -""") + + /** + * Specifies that the Task runs as the common auto user Account which is created + * on every Compute Node in a Pool. + */ pool, } -@doc("The elevation level of the user.") +/** + * The elevation level of the user. + */ @fixed enum ElevationLevel { - @doc("The user is a standard user without elevated access.") + /** + * The user is a standard user without elevated access. + */ nonAdmin: "nonadmin", - @doc(""" -The user is a user with elevated access and operates with full Administrator -permissions. -""") + + /** + * The user is a user with elevated access and operates with full Administrator + * permissions. + */ admin, } -@doc(""" -The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule -are assigned to Pools. -""") +/** + * The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule + * are assigned to Pools. + */ @fixed enum PoolLifetimeOption { - @doc(""" -The Pool exists for the lifetime of the Job Schedule. The Batch Service creates -the Pool when it creates the first Job on the schedule. You may apply this -option only to Job Schedules, not to Jobs. -""") + /** + * The Pool exists for the lifetime of the Job Schedule. The Batch Service creates + * the Pool when it creates the first Job on the schedule. You may apply this + * option only to Job Schedules, not to Jobs. + */ jobSchedule: "jobschedule", - @doc(""" -The Pool exists for the lifetime of the Job to which it is dedicated. The Batch -service creates the Pool when it creates the Job. If the 'job' option is -applied to a Job Schedule, the Batch service creates a new auto Pool for every -Job created on the schedule. -""") + + /** + * The Pool exists for the lifetime of the Job to which it is dedicated. The Batch + * service creates the Pool when it creates the Job. If the 'job' option is + * applied to a Job Schedule, the Batch service creates a new auto Pool for every + * Job created on the schedule. + */ job, } -@doc(""" -The default value for caching is none. For information about the caching -options see: -https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. -""") +/** + * The default value for caching is none. For information about the caching + * options see: + * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. + */ @fixed enum CachingType { - @doc("The caching mode for the disk is not enabled.") none, - @doc("The caching mode for the disk is read only.") readOnly: "readonly", - @doc("The caching mode for the disk is read and write.") + /** + * The caching mode for the disk is not enabled. + */ + none, + + /** + * The caching mode for the disk is read only. + */ + readOnly: "readonly", + + /** + * The caching mode for the disk is read and write. + */ readWrite: "readwrite", } -@doc("The storage Account type for use in creating data disks.") +/** + * The storage Account type for use in creating data disks. + */ @fixed enum StorageAccountType { - @doc("The data disk should use standard locally redundant storage.") + /** + * The data disk should use standard locally redundant storage. + */ StandardLRS: "standard_lrs", - @doc("The data disk should use premium locally redundant storage.") + + /** + * The data disk should use premium locally redundant storage. + */ PremiumLRS: "premium_lrs", } -@doc("A disk to encrypt.") +/** + * A disk to encrypt. + */ @fixed enum DiskEncryptionTarget { - @doc("The OS Disk on the compute node is encrypted.") OsDisk: "osdisk", - @doc(""" -The temporary disk on the compute node is encrypted. On Linux this encryption -applies to other partitions (such as those on mounted data disks) when -encryption occurs at boot time. -""") + /** + * The OS Disk on the compute node is encrypted. + */ + OsDisk: "osdisk", + + /** + * The temporary disk on the compute node is encrypted. On Linux this encryption + * applies to other partitions (such as those on mounted data disks) when + * encryption occurs at boot time. + */ TemporaryDisk: "temporarydisk", } -@doc("The default value is regional.") +/** + * The default value is regional. + */ @fixed enum NodePlacementPolicyType { - @doc("All nodes in the pool will be allocated in the same region.") regional, - @doc(""" -Nodes in the pool will be spread across different availability zones with best -effort balancing. -""") + /** + * All nodes in the pool will be allocated in the same region. + */ + regional, + + /** + * Nodes in the pool will be spread across different availability zones with best + * effort balancing. + */ zonal, } -@doc("If not specified, the default is spread.") +/** + * If not specified, the default is spread. + */ @fixed enum ComputeNodeFillType { - @doc("Tasks should be assigned evenly across all Compute Nodes in the Pool.") + /** + * Tasks should be assigned evenly across all Compute Nodes in the Pool. + */ spread, - @doc(""" -As many Tasks as possible (taskSlotsPerNode) should be assigned to each Compute -Node in the Pool before any Tasks are assigned to the next Compute Node in the -Pool. -""") + + /** + * As many Tasks as possible (taskSlotsPerNode) should be assigned to each Compute + * Node in the Pool before any Tasks are assigned to the next Compute Node in the + * Pool. + */ pack, } -@doc("The scope of dynamic vnet assignment.") +/** + * The scope of dynamic vnet assignment. + */ @fixed enum DynamicVNetAssignmentScope { - @doc("No dynamic VNet assignment is enabled.") none, - @doc("Dynamic VNet assignment is done per-job.") job, + /** + * No dynamic VNet assignment is enabled. + */ + none, + + /** + * Dynamic VNet assignment is done per-job. + */ + job, } -@doc("The protocol of the endpoint.") +/** + * The protocol of the endpoint. + */ @fixed enum InboundEndpointProtocol { - @doc("Use TCP for the endpoint.") tcp, - @doc("Use UDP for the endpoint.") udp, + /** + * Use TCP for the endpoint. + */ + tcp, + + /** + * Use UDP for the endpoint. + */ + udp, } -@doc("The action that should be taken for a specified IP address, subnet range or tag.") +/** + * The action that should be taken for a specified IP address, subnet range or tag. + */ @fixed enum NetworkSecurityGroupRuleAccess { - @doc("Allow access.") allow, - @doc("Deny access.") deny, + /** + * Allow access. + */ + allow, + + /** + * Deny access. + */ + deny, } -@doc("The provisioning type for Public IP Addresses for the Pool.") +/** + * The provisioning type for Public IP Addresses for the Pool. + */ @fixed enum IPAddressProvisioningType { - @doc(""" -A public IP will be created and managed by Batch. There may be multiple public -IPs depending on the size of the Pool. -""") + /** + * A public IP will be created and managed by Batch. There may be multiple public + * IPs depending on the size of the Pool. + */ batchManaged: "batchmanaged", - @doc(""" -Public IPs are provided by the user and will be used to provision the Compute -Nodes. -""") + + /** + * Public IPs are provided by the user and will be used to provision the Compute + * Nodes. + */ userManaged: "usermanaged", - @doc("No public IP Address will be created.") + + /** + * No public IP Address will be created. + */ noPublicIPAddresses: "nopublicipaddresses", } -@doc(""" -The default value is currentuser. This property is applicable only for Pools -configured with Windows Compute Nodes (that is, created with -cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows -Image reference). For Linux Compute Nodes, the Certificates are stored in a -directory inside the Task working directory and an environment variable -AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. -For Certificates with visibility of 'remoteUser', a 'certs' directory is -created in the user's home directory (e.g., /home/{user-name}/certs) and -Certificates are placed in that directory. -""") +/** + * The default value is currentuser. This property is applicable only for Pools + * configured with Windows Compute Nodes (that is, created with + * cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows + * Image reference). For Linux Compute Nodes, the Certificates are stored in a + * directory inside the Task working directory and an environment variable + * AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. + * For Certificates with visibility of 'remoteUser', a 'certs' directory is + * created in the user's home directory (e.g., /home/{user-name}/certs) and + * Certificates are placed in that directory. + */ @fixed enum CertificateStoreLocation { - @doc("Certificates should be installed to the CurrentUser Certificate store.") + /** + * Certificates should be installed to the CurrentUser Certificate store. + */ currentUser: "currentuser", - @doc("Certificates should be installed to the LocalMachine Certificate store.") + + /** + * Certificates should be installed to the LocalMachine Certificate store. + */ localMachine: "localmachine", } @fixed enum CertificateVisibility { - @doc(""" -The Certificate should be visible to the user account under which the StartTask -is run. Note that if AutoUser Scope is Pool for both the StartTask and a Task, -this certificate will be visible to the Task as well. -""") + /** + * The Certificate should be visible to the user account under which the StartTask + * is run. Note that if AutoUser Scope is Pool for both the StartTask and a Task, + * this certificate will be visible to the Task as well. + */ startTask: "starttask", - @doc(""" -The Certificate should be visible to the user accounts under which Job Tasks -are run. -""") + + /** + * The Certificate should be visible to the user accounts under which Job Tasks + * are run. + */ task, - @doc(""" -The Certificate should be visible to the user accounts under which users -remotely access the Compute Node. -""") + + /** + * The Certificate should be visible to the user accounts under which users + * remotely access the Compute Node. + */ remoteUser: "remoteuser", } -@doc(""" -The default value for VirtualMachineConfiguration Pools is 'batch' and for -CloudServiceConfiguration Pools is 'interactive'. -""") +/** + * The default value for VirtualMachineConfiguration Pools is 'batch' and for + * CloudServiceConfiguration Pools is 'interactive'. + */ @fixed enum LoginMode { - @doc(""" -The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended -for long running parallel processes. -""") + /** + * The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended + * for long running parallel processes. + */ batch, - @doc(""" -The LOGON32_LOGON_INTERACTIVE Win32 login mode. UAC is enabled on Windows -VirtualMachineConfiguration Pools. If this option is used with an elevated user -identity in a Windows VirtualMachineConfiguration Pool, the user session will -not be elevated unless the application executed by the Task command line is -configured to always require administrative privilege or to always require -maximum privilege. -""") + + /** + * The LOGON32_LOGON_INTERACTIVE Win32 login mode. UAC is enabled on Windows + * VirtualMachineConfiguration Pools. If this option is used with an elevated user + * identity in a Windows VirtualMachineConfiguration Pool, the user session will + * not be elevated unless the application executed by the Task command line is + * configured to always require administrative privilege or to always require + * maximum privilege. + */ interactive, } -@doc("The state of the Job.") +/** + * The state of the Job. + */ @fixed enum JobState { - @doc("The Job is available to have Tasks scheduled.") active, - @doc(""" -A user has requested that the Job be disabled, but the disable operation is -still in progress (for example, waiting for Tasks to terminate). -""") + /** + * The Job is available to have Tasks scheduled. + */ + active, + + /** + * A user has requested that the Job be disabled, but the disable operation is + * still in progress (for example, waiting for Tasks to terminate). + */ disabling, - @doc(""" -A user has disabled the Job. No Tasks are running, and no new Tasks will be -scheduled. -""") + + /** + * A user has disabled the Job. No Tasks are running, and no new Tasks will be + * scheduled. + */ disabled, - @doc(""" -A user has requested that the Job be enabled, but the enable operation is still -in progress. -""") + + /** + * A user has requested that the Job be enabled, but the enable operation is still + * in progress. + */ enabling, - @doc(""" -The Job is about to complete, either because a Job Manager Task has completed -or because the user has terminated the Job, but the terminate operation is -still in progress (for example, because Job Release Tasks are running). -""") + + /** + * The Job is about to complete, either because a Job Manager Task has completed + * or because the user has terminated the Job, but the terminate operation is + * still in progress (for example, because Job Release Tasks are running). + */ terminating, - @doc(""" -All Tasks have terminated, and the system will not accept any more Tasks or any -further changes to the Job. -""") + + /** + * All Tasks have terminated, and the system will not accept any more Tasks or any + * further changes to the Job. + */ completed, - @doc(""" -A user has requested that the Job be deleted, but the delete operation is still -in progress (for example, because the system is still terminating running -Tasks). -""") + + /** + * A user has requested that the Job be deleted, but the delete operation is still + * in progress (for example, because the system is still terminating running + * Tasks). + */ deleting, } -@doc("The category of the error.") +/** + * The category of the error. + */ @fixed enum ErrorCategory { - @doc("The error is due to a user issue, such as misconfiguration.") + /** + * The error is due to a user issue, such as misconfiguration. + */ userError: "usererror", - @doc("The error is due to an internal server issue.") + + /** + * The error is due to an internal server issue. + */ serverError: "servererror", } -@doc("What to do with active Tasks associated with the Job.") +/** + * What to do with active Tasks associated with the Job. + */ @fixed enum DisableJobOption { - @doc(""" -Terminate running Tasks and requeue them. The Tasks will run again when the Job -is enabled. -""") + /** + * Terminate running Tasks and requeue them. The Tasks will run again when the Job + * is enabled. + */ requeue, - @doc(""" -Terminate running Tasks. The Tasks will be completed with failureInfo -indicating that they were terminated, and will not run again. -""") + + /** + * Terminate running Tasks. The Tasks will be completed with failureInfo + * indicating that they were terminated, and will not run again. + */ terminate, - @doc("Allow currently running Tasks to complete.") wait, + + /** + * Allow currently running Tasks to complete. + */ + wait, } -@doc("The current state of the Job Preparation Task on the Compute Node.") +/** + * The current state of the Job Preparation Task on the Compute Node. + */ @fixed enum JobPreparationTaskState { - @doc("The Task is currently running (including retrying).") running, - @doc(""" -The Task has exited with exit code 0, or the Task has exhausted its retry -limit, or the Batch service was unable to start the Task due to Task -preparation errors (such as resource file download failures). -""") + /** + * The Task is currently running (including retrying). + */ + running, + + /** + * The Task has exited with exit code 0, or the Task has exhausted its retry + * limit, or the Batch service was unable to start the Task due to Task + * preparation errors (such as resource file download failures). + */ completed, } -@doc("The result of Task execution.") +/** + * The result of Task execution. + */ @fixed enum TaskExecutionResult { - @doc("The Task ran successfully.") success, - @doc(""" -There was an error during processing of the Task. The failure may have occurred -before the Task process was launched, while the Task process was executing, or -after the Task process exited. -""") + /** + * The Task ran successfully. + */ + success, + + /** + * There was an error during processing of the Task. The failure may have occurred + * before the Task process was launched, while the Task process was executing, or + * after the Task process exited. + */ failure, } -@doc("The current state of the Job Release Task on the Compute Node.") +/** + * The current state of the Job Release Task on the Compute Node. + */ @fixed enum JobReleaseTaskState { - @doc("The Task is currently running (including retrying).") running, - @doc(""" -The Task has exited with exit code 0, or the Task has exhausted its retry -limit, or the Batch service was unable to start the Task due to Task -preparation errors (such as resource file download failures). -""") + /** + * The Task is currently running (including retrying). + */ + running, + + /** + * The Task has exited with exit code 0, or the Task has exhausted its retry + * limit, or the Batch service was unable to start the Task due to Task + * preparation errors (such as resource file download failures). + */ completed, } -@doc("The current state of the Pool.") +/** + * The current state of the Pool. + */ @fixed enum PoolState { - @doc("The Pool is available to run Tasks subject to the availability of Compute Nodes.") + /** + * The Pool is available to run Tasks subject to the availability of Compute Nodes. + */ active, - @doc(""" -The user has requested that the Pool be deleted, but the delete operation has -not yet completed. -""") + + /** + * The user has requested that the Pool be deleted, but the delete operation has + * not yet completed. + */ deleting, } -@doc("Whether the Pool is resizing.") +/** + * Whether the Pool is resizing. + */ @fixed enum AllocationState { - @doc(""" -The Pool is not resizing. There are no changes to the number of Compute Nodes -in the Pool in progress. A Pool enters this state when it is created and when -no operations are being performed on the Pool to change the number of Compute -Nodes. -""") + /** + * The Pool is not resizing. There are no changes to the number of Compute Nodes + * in the Pool in progress. A Pool enters this state when it is created and when + * no operations are being performed on the Pool to change the number of Compute + * Nodes. + */ steady, - @doc(""" -The Pool is resizing; that is, Compute Nodes are being added to or removed from -the Pool. -""") + + /** + * The Pool is resizing; that is, Compute Nodes are being added to or removed from + * the Pool. + */ resizing, - @doc(""" -The Pool was resizing, but the user has requested that the resize be stopped, -but the stop request has not yet been completed. -""") + + /** + * The Pool was resizing, but the user has requested that the resize be stopped, + * but the stop request has not yet been completed. + */ stopping, } -@doc(""" -The list of user identities associated with the Batch pool. The user identity -dictionary key references will be ARM resource ids in the form: -'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. -""") +/** + * The list of user identities associated with the Batch pool. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ @fixed enum PoolIdentityType { - @doc("Batch pool has user assigned identities with it.") UserAssigned, - @doc(""" -Batch pool has no identity associated with it. Setting `None` in update pool -will remove existing identities. -""") + /** + * Batch pool has user assigned identities with it. + */ + UserAssigned, + + /** + * Batch pool has no identity associated with it. Setting `None` in update pool + * will remove existing identities. + */ None, } -@doc("The default value is requeue.") +/** + * The default value is requeue. + */ @fixed enum ComputeNodeDeallocationOption { - @doc(""" -Terminate running Task processes and requeue the Tasks. The Tasks will run -again when a Compute Node is available. Remove Compute Nodes as soon as Tasks -have been terminated. -""") + /** + * Terminate running Task processes and requeue the Tasks. The Tasks will run + * again when a Compute Node is available. Remove Compute Nodes as soon as Tasks + * have been terminated. + */ requeue, - @doc(""" -Terminate running Tasks. The Tasks will be completed with failureInfo -indicating that they were terminated, and will not run again. Remove Compute -Nodes as soon as Tasks have been terminated. -""") + + /** + * Terminate running Tasks. The Tasks will be completed with failureInfo + * indicating that they were terminated, and will not run again. Remove Compute + * Nodes as soon as Tasks have been terminated. + */ terminate, - @doc(""" -Allow currently running Tasks to complete. Schedule no new Tasks while waiting. -Remove Compute Nodes when all Tasks have completed. -""") + + /** + * Allow currently running Tasks to complete. Schedule no new Tasks while waiting. + * Remove Compute Nodes when all Tasks have completed. + */ taskCompletion: "taskcompletion", - @doc(""" -Allow currently running Tasks to complete, then wait for all Task data -retention periods to expire. Schedule no new Tasks while waiting. Remove -Compute Nodes when all Task retention periods have expired. -""") + + /** + * Allow currently running Tasks to complete, then wait for all Task data + * retention periods to expire. Schedule no new Tasks while waiting. Remove + * Compute Nodes when all Task retention periods have expired. + */ retainedData: "retaineddata", } -@doc(""" -The default is none for exit code 0 and terminate for all other exit -conditions. If the Job's onTaskFailed property is noaction, then specifying -this property returns an error and the add Task request fails with an invalid -property value error; if you are calling the REST API directly, the HTTP status -code is 400 (Bad Request). -""") +/** + * The default is none for exit code 0 and terminate for all other exit + * conditions. If the Job's onTaskFailed property is noaction, then specifying + * this property returns an error and the add Task request fails with an invalid + * property value error; if you are calling the REST API directly, the HTTP status + * code is 400 (Bad Request). + */ @fixed enum JobAction { - @doc("Take no action.") none, - @doc(""" -Disable the Job. This is equivalent to calling the disable Job API, with a -disableTasks value of requeue. -""") + /** + * Take no action. + */ + none, + + /** + * Disable the Job. This is equivalent to calling the disable Job API, with a + * disableTasks value of requeue. + */ disable, - @doc(""" -Terminate the Job. The terminateReason in the Job's executionInfo is set to -\"TaskFailed\". -""") + + /** + * Terminate the Job. The terminateReason in the Job's executionInfo is set to + * "TaskFailed". + */ terminate, } -@doc(""" -Possible values are 'satisfy' (allowing dependent tasks to progress) and -'block' (dependent tasks continue to wait). Batch does not yet support -cancellation of dependent tasks. -""") +/** + * Possible values are 'satisfy' (allowing dependent tasks to progress) and + * 'block' (dependent tasks continue to wait). Batch does not yet support + * cancellation of dependent tasks. + */ @fixed enum DependencyAction { - @doc(""" -Satisfy tasks waiting on this task; once all dependencies are satisfied, the -task will be scheduled to run. -""") + /** + * Satisfy tasks waiting on this task; once all dependencies are satisfied, the + * task will be scheduled to run. + */ satisfy, - @doc("Blocks tasks waiting on this task, preventing them from being scheduled.") + + /** + * Blocks tasks waiting on this task, preventing them from being scheduled. + */ block, } -@doc("The state of the Task.") +/** + * The state of the Task. + */ @fixed enum TaskState { - @doc(""" -The Task is queued and able to run, but is not currently assigned to a Compute -Node. A Task enters this state when it is created, when it is enabled after -being disabled, or when it is awaiting a retry after a failed run. -""") + /** + * The Task is queued and able to run, but is not currently assigned to a Compute + * Node. A Task enters this state when it is created, when it is enabled after + * being disabled, or when it is awaiting a retry after a failed run. + */ active, - @doc(""" -The Task has been assigned to a Compute Node, but is waiting for a required Job -Preparation Task to complete on the Compute Node. If the Job Preparation Task -succeeds, the Task will move to running. If the Job Preparation Task fails, the -Task will return to active and will be eligible to be assigned to a different -Compute Node. -""") + + /** + * The Task has been assigned to a Compute Node, but is waiting for a required Job + * Preparation Task to complete on the Compute Node. If the Job Preparation Task + * succeeds, the Task will move to running. If the Job Preparation Task fails, the + * Task will return to active and will be eligible to be assigned to a different + * Compute Node. + */ preparing, - @doc(""" -The Task is running on a Compute Node. This includes task-level preparation -such as downloading resource files or deploying Packages specified on the Task -- it does not necessarily mean that the Task command line has started -executing. -""") + + /** + * The Task is running on a Compute Node. This includes task-level preparation + * such as downloading resource files or deploying Packages specified on the Task + * - it does not necessarily mean that the Task command line has started + * executing. + */ running, - @doc(""" -The Task is no longer eligible to run, usually because the Task has finished -successfully, or the Task has finished unsuccessfully and has exhausted its -retry limit. A Task is also marked as completed if an error occurred launching -the Task, or when the Task has been terminated. -""") + + /** + * The Task is no longer eligible to run, usually because the Task has finished + * successfully, or the Task has finished unsuccessfully and has exhausted its + * retry limit. A Task is also marked as completed if an error occurred launching + * the Task, or when the Task has been terminated. + */ completed, } -@doc("The status of the add Task request.") +/** + * The status of the add Task request. + */ @fixed enum TaskAddStatus { - @doc("The Task was added successfully.") success, - @doc(""" -The Task failed to add due to a client error and should not be retried without -modifying the request as appropriate. -""") + /** + * The Task was added successfully. + */ + success, + + /** + * The Task failed to add due to a client error and should not be retried without + * modifying the request as appropriate. + */ clientError: "clienterror", - @doc(""" -Task failed to add due to a server error and can be retried without -modification. -""") + + /** + * Task failed to add due to a server error and can be retried without + * modification. + */ serverError: "servererror", } -@doc("The state of the subtask.") +/** + * The state of the subtask. + */ @fixed enum SubtaskState { - @doc(""" -The Task has been assigned to a Compute Node, but is waiting for a required Job -Preparation Task to complete on the Compute Node. If the Job Preparation Task -succeeds, the Task will move to running. If the Job Preparation Task fails, the -Task will return to active and will be eligible to be assigned to a different -Compute Node. -""") + /** + * The Task has been assigned to a Compute Node, but is waiting for a required Job + * Preparation Task to complete on the Compute Node. If the Job Preparation Task + * succeeds, the Task will move to running. If the Job Preparation Task fails, the + * Task will return to active and will be eligible to be assigned to a different + * Compute Node. + */ preparing, - @doc(""" -The Task is running on a Compute Node. This includes task-level preparation -such as downloading resource files or deploying Packages specified on the Task -- it does not necessarily mean that the Task command line has started -executing. -""") + + /** + * The Task is running on a Compute Node. This includes task-level preparation + * such as downloading resource files or deploying Packages specified on the Task + * - it does not necessarily mean that the Task command line has started + * executing. + */ running, - @doc(""" -The Task is no longer eligible to run, usually because the Task has finished -successfully, or the Task has finished unsuccessfully and has exhausted its -retry limit. A Task is also marked as completed if an error occurred launching -the Task, or when the Task has been terminated. -""") + + /** + * The Task is no longer eligible to run, usually because the Task has finished + * successfully, or the Task has finished unsuccessfully and has exhausted its + * retry limit. A Task is also marked as completed if an error occurred launching + * the Task, or when the Task has been terminated. + */ completed, } -@doc(""" -The Spot/Low-priority Compute Node has been preempted. Tasks which were running -on the Compute Node when it was preempted will be rescheduled when another -Compute Node becomes available. -""") +/** + * The Spot/Low-priority Compute Node has been preempted. Tasks which were running + * on the Compute Node when it was preempted will be rescheduled when another + * Compute Node becomes available. + */ @fixed enum ComputeNodeState { - @doc("The Compute Node is not currently running a Task.") idle, - @doc("The Compute Node is rebooting.") rebooting, - @doc("The Compute Node is reimaging.") reimaging, - @doc("The Compute Node is running one or more Tasks (other than a StartTask).") + /** + * The Compute Node is not currently running a Task. + */ + idle, + + /** + * The Compute Node is rebooting. + */ + rebooting, + + /** + * The Compute Node is reimaging. + */ + reimaging, + + /** + * The Compute Node is running one or more Tasks (other than a StartTask). + */ running, - @doc("The Compute Node cannot be used for Task execution due to errors.") + + /** + * The Compute Node cannot be used for Task execution due to errors. + */ unusable, - @doc(""" -The Batch service has obtained the underlying virtual machine from Azure -Compute, but it has not yet started to join the Pool. -""") + + /** + * The Batch service has obtained the underlying virtual machine from Azure + * Compute, but it has not yet started to join the Pool. + */ creating, - @doc("The Batch service is starting on the underlying virtual machine.") + + /** + * The Batch service is starting on the underlying virtual machine. + */ starting, - @doc(""" -The StartTask has started running on the Compute Node, but waitForSuccess is -set and the StartTask has not yet completed. -""") + + /** + * The StartTask has started running on the Compute Node, but waitForSuccess is + * set and the StartTask has not yet completed. + */ waitingForStartTask: "waitingforstarttask", - @doc(""" -The StartTask has failed on the Compute Node (and exhausted all retries), and -waitForSuccess is set. The Compute Node is not usable for running Tasks. -""") + + /** + * The StartTask has failed on the Compute Node (and exhausted all retries), and + * waitForSuccess is set. The Compute Node is not usable for running Tasks. + */ startTaskFailed: "starttaskfailed", - @doc(""" -The Batch service has lost contact with the Compute Node, and does not know its -true state. -""") + + /** + * The Batch service has lost contact with the Compute Node, and does not know its + * true state. + */ `unknown`, - @doc(""" -The Compute Node is leaving the Pool, either because the user explicitly -removed it or because the Pool is resizing or autoscaling down. -""") + + /** + * The Compute Node is leaving the Pool, either because the user explicitly + * removed it or because the Pool is resizing or autoscaling down. + */ leavingPool: "leavingpool", - @doc(""" -The Compute Node is not currently running a Task, and scheduling of new Tasks -to the Compute Node is disabled. -""") + + /** + * The Compute Node is not currently running a Task, and scheduling of new Tasks + * to the Compute Node is disabled. + */ offline, - @doc(""" -The Spot/Low-priority Compute Node has been preempted. Tasks which were running -on the Compute Node when it was preempted will be rescheduled when another -Compute Node becomes available. -""") + + /** + * The Spot/Low-priority Compute Node has been preempted. Tasks which were running + * on the Compute Node when it was preempted will be rescheduled when another + * Compute Node becomes available. + */ preempted, } -@doc("Whether the Compute Node is available for Task scheduling.") +/** + * Whether the Compute Node is available for Task scheduling. + */ @fixed enum SchedulingState { - @doc("Tasks can be scheduled on the Compute Node.") enabled, - @doc(""" -No new Tasks will be scheduled on the Compute Node. Tasks already running on -the Compute Node may still run to completion. All Compute Nodes start with -scheduling enabled. -""") + /** + * Tasks can be scheduled on the Compute Node. + */ + enabled, + + /** + * No new Tasks will be scheduled on the Compute Node. Tasks already running on + * the Compute Node may still run to completion. All Compute Nodes start with + * scheduling enabled. + */ disabled, } -@doc("The state of the StartTask on the Compute Node.") +/** + * The state of the StartTask on the Compute Node. + */ @fixed enum StartTaskState { - @doc("The StartTask is currently running.") running, - @doc(""" -The StartTask has exited with exit code 0, or the StartTask has failed and the -retry limit has reached, or the StartTask process did not run due to Task -preparation errors (such as resource file download failures). -""") + /** + * The StartTask is currently running. + */ + running, + + /** + * The StartTask has exited with exit code 0, or the StartTask has failed and the + * retry limit has reached, or the StartTask process did not run due to Task + * preparation errors (such as resource file download failures). + */ completed, } -@doc("The default value is requeue.") +/** + * The default value is requeue. + */ @fixed enum ComputeNodeRebootOption { - @doc(""" -Terminate running Task processes and requeue the Tasks. The Tasks will run -again when a Compute Node is available. Restart the Compute Node as soon as -Tasks have been terminated. -""") + /** + * Terminate running Task processes and requeue the Tasks. The Tasks will run + * again when a Compute Node is available. Restart the Compute Node as soon as + * Tasks have been terminated. + */ requeue, - @doc(""" -Terminate running Tasks. The Tasks will be completed with failureInfo -indicating that they were terminated, and will not run again. Restart the -Compute Node as soon as Tasks have been terminated. -""") + + /** + * Terminate running Tasks. The Tasks will be completed with failureInfo + * indicating that they were terminated, and will not run again. Restart the + * Compute Node as soon as Tasks have been terminated. + */ terminate, - @doc(""" -Allow currently running Tasks to complete. Schedule no new Tasks while waiting. -Restart the Compute Node when all Tasks have completed. -""") + + /** + * Allow currently running Tasks to complete. Schedule no new Tasks while waiting. + * Restart the Compute Node when all Tasks have completed. + */ taskCompletion: "taskcompletion", - @doc(""" -Allow currently running Tasks to complete, then wait for all Task data -retention periods to expire. Schedule no new Tasks while waiting. Restart the -Compute Node when all Task retention periods have expired. -""") + + /** + * Allow currently running Tasks to complete, then wait for all Task data + * retention periods to expire. Schedule no new Tasks while waiting. Restart the + * Compute Node when all Task retention periods have expired. + */ retainedData: "retaineddata", } -@doc("The default value is requeue.") +/** + * The default value is requeue. + */ @fixed enum ComputeNodeReimageOption { - @doc(""" -Terminate running Task processes and requeue the Tasks. The Tasks will run -again when a Compute Node is available. Reimage the Compute Node as soon as -Tasks have been terminated. -""") + /** + * Terminate running Task processes and requeue the Tasks. The Tasks will run + * again when a Compute Node is available. Reimage the Compute Node as soon as + * Tasks have been terminated. + */ requeue, - @doc(""" -Terminate running Tasks. The Tasks will be completed with failureInfo -indicating that they were terminated, and will not run again. Reimage the -Compute Node as soon as Tasks have been terminated. -""") + + /** + * Terminate running Tasks. The Tasks will be completed with failureInfo + * indicating that they were terminated, and will not run again. Reimage the + * Compute Node as soon as Tasks have been terminated. + */ terminate, - @doc(""" -Allow currently running Tasks to complete. Schedule no new Tasks while waiting. -Reimage the Compute Node when all Tasks have completed. -""") + + /** + * Allow currently running Tasks to complete. Schedule no new Tasks while waiting. + * Reimage the Compute Node when all Tasks have completed. + */ taskCompletion: "taskcompletion", - @doc(""" -Allow currently running Tasks to complete, then wait for all Task data -retention periods to expire. Schedule no new Tasks while waiting. Reimage the -Compute Node when all Task retention periods have expired. -""") + + /** + * Allow currently running Tasks to complete, then wait for all Task data + * retention periods to expire. Schedule no new Tasks while waiting. Reimage the + * Compute Node when all Task retention periods have expired. + */ retainedData: "retaineddata", } -@doc("The default value is requeue.") +/** + * The default value is requeue. + */ @fixed enum DisableComputeNodeSchedulingOption { - @doc(""" -Terminate running Task processes and requeue the Tasks. The Tasks may run again -on other Compute Nodes, or when Task scheduling is re-enabled on this Compute -Node. Enter offline state as soon as Tasks have been terminated. -""") + /** + * Terminate running Task processes and requeue the Tasks. The Tasks may run again + * on other Compute Nodes, or when Task scheduling is re-enabled on this Compute + * Node. Enter offline state as soon as Tasks have been terminated. + */ requeue, - @doc(""" -Terminate running Tasks. The Tasks will be completed with failureInfo -indicating that they were terminated, and will not run again. Enter offline -state as soon as Tasks have been terminated. -""") + + /** + * Terminate running Tasks. The Tasks will be completed with failureInfo + * indicating that they were terminated, and will not run again. Enter offline + * state as soon as Tasks have been terminated. + */ terminate, - @doc(""" -Allow currently running Tasks to complete. Schedule no new Tasks while waiting. -Enter offline state when all Tasks have completed. -""") + + /** + * Allow currently running Tasks to complete. Schedule no new Tasks while waiting. + * Enter offline state when all Tasks have completed. + */ taskCompletion: "taskcompletion", } -@doc("Level code.") +/** + * Level code. + */ @fixed enum StatusLevelTypes { Error, @@ -825,4765 +1095,5713 @@ enum StatusLevelTypes { Warning, } -@doc("The result of listing the applications available in an Account.") +/** + * The result of listing the applications available in an Account. + */ @pagedResult model ApplicationListResult { - @doc("The list of applications available in the Account.") + /** + * The list of applications available in the Account. + */ @items value?: Application[]; - @doc("The URL to get the next set of results.") + /** + * The URL to get the next set of results. + */ @nextLink @projectedName("json", "odata.nextLink") odataNextLink?: string; } -@doc("Contains information about an application in an Azure Batch Account.") +/** + * Contains information about an application in an Azure Batch Account. + */ @resource("applications") model Application { - @doc("A string that uniquely identifies the application within the Account.") + /** + * A string that uniquely identifies the application within the Account. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key id: string; - @doc("The display name for the application.") + /** + * The display name for the application. + */ displayName: string; - @doc("The list of available versions of the application.") + /** + * The list of available versions of the application. + */ versions: string[]; } -@doc("An error response received from the Azure Batch service.") +/** + * An error response received from the Azure Batch service. + */ @error model BatchError { - @doc(""" -An identifier for the error. Codes are invariant and are intended to be -consumed programmatically. -""") + /** + * An identifier for the error. Codes are invariant and are intended to be + * consumed programmatically. + */ code?: string; - @doc("An error message received in an Azure Batch error response.") + /** + * An error message received in an Azure Batch error response. + */ message?: ErrorMessage; - @doc("A collection of key-value pairs containing additional details about the error.") + /** + * A collection of key-value pairs containing additional details about the error. + */ values?: BatchErrorDetail[]; } -@doc("An error message received in an Azure Batch error response.") +/** + * An error message received in an Azure Batch error response. + */ model ErrorMessage { - @doc("The language code of the error message") + /** + * The language code of the error message + */ lang?: string; - @doc("The text of the message.") + /** + * The text of the message. + */ value?: string; } -@doc("An item of additional information included in an Azure Batch error response.") +/** + * An item of additional information included in an Azure Batch error response. + */ model BatchErrorDetail { - @doc("An identifier specifying the meaning of the Value property.") + /** + * An identifier specifying the meaning of the Value property. + */ key?: string; - @doc("The additional information included with the error response.") + /** + * The additional information included with the error response. + */ value?: string; } -@doc("The result of a listing the usage metrics for an Account.") +/** + * The result of a listing the usage metrics for an Account. + */ @pagedResult model PoolListUsageMetricsResult { - @doc("The Pool usage metrics data.") + /** + * The Pool usage metrics data. + */ @items value?: PoolUsageMetrics[]; - @doc("The URL to get the next set of results.") + /** + * The URL to get the next set of results. + */ @nextLink @projectedName("json", "odata.nextLink") odataNextLink?: string; } -@doc("Usage metrics for a Pool across an aggregation interval.") +/** + * Usage metrics for a Pool across an aggregation interval. + */ @resource("poolusagemetrics") model PoolUsageMetrics { - @doc("The ID of the Pool whose metrics are aggregated in this entry.") + /** + * The ID of the Pool whose metrics are aggregated in this entry. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key poolId: string; - @doc("The start time of the aggregation interval covered by this entry.") + /** + * The start time of the aggregation interval covered by this entry. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime: utcDateTime; - @doc("The end time of the aggregation interval covered by this entry.") + /** + * The end time of the aggregation interval covered by this entry. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime: utcDateTime; - @doc(""" -For information about available sizes of virtual machines in Pools, see Choose -a VM size for Compute Nodes in an Azure Batch Pool -(https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). -""") + /** + * For information about available sizes of virtual machines in Pools, see Choose + * a VM size for Compute Nodes in an Azure Batch Pool + * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + */ vmSize: string; - @doc("The total core hours used in the Pool during this aggregation interval.") - totalCoreHours: float32; + /** + * The total core hours used in the Pool during this aggregation interval. + */ + totalCoreHours: float64; } -@doc("The result of listing the supported Virtual Machine Images.") +/** + * The result of listing the supported Virtual Machine Images. + */ @pagedResult model AccountListSupportedImagesResult { - @doc("The list of supported Virtual Machine Images.") + /** + * The list of supported Virtual Machine Images. + */ @items value?: ImageInformation[]; - @doc("The URL to get the next set of results.") + /** + * The URL to get the next set of results. + */ @nextLink @projectedName("json", "odata.nextLink") odataNextLink?: string; } -@doc(""" -A reference to the Azure Virtual Machines Marketplace Image and additional -information about the Image. -""") +/** + * A reference to the Azure Virtual Machines Marketplace Image and additional + * information about the Image. + */ @resource("supportedimages") model ImageInformation { - @doc("The ID of the Compute Node agent SKU which the Image supports.") + /** + * The ID of the Compute Node agent SKU which the Image supports. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key nodeAgentSKUId: string; - @doc(""" -A reference to an Azure Virtual Machines Marketplace Image or a Shared Image -Gallery Image. To get the list of all Azure Marketplace Image references -verified by Azure Batch, see the 'List Supported Images' operation. -""") + /** + * A reference to an Azure Virtual Machines Marketplace Image or a Shared Image + * Gallery Image. To get the list of all Azure Marketplace Image references + * verified by Azure Batch, see the 'List Supported Images' operation. + */ imageReference: ImageReference; - @doc("The type of operating system (e.g. Windows or Linux) of the Image.") + /** + * The type of operating system (e.g. Windows or Linux) of the Image. + */ osType: OSType; - @doc(""" -Not every capability of the Image is listed. Capabilities in this list are -considered of special interest and are generally related to integration with -other features in the Azure Batch service. -""") + /** + * Not every capability of the Image is listed. Capabilities in this list are + * considered of special interest and are generally related to integration with + * other features in the Azure Batch service. + */ capabilities?: string[]; - @doc(""" -The time when the Azure Batch service will stop accepting create Pool requests -for the Image. -""") + /** + * The time when the Azure Batch service will stop accepting create Pool requests + * for the Image. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. batchSupportEndOfLife?: utcDateTime; - @doc(""" -Whether the Azure Batch service actively verifies that the Image is compatible -with the associated Compute Node agent SKU. -""") + /** + * Whether the Azure Batch service actively verifies that the Image is compatible + * with the associated Compute Node agent SKU. + */ verificationType: VerificationType; } -@doc(""" -A reference to an Azure Virtual Machines Marketplace Image or a Shared Image -Gallery Image. To get the list of all Azure Marketplace Image references -verified by Azure Batch, see the 'List Supported Images' operation. -""") +/** + * A reference to an Azure Virtual Machines Marketplace Image or a Shared Image + * Gallery Image. To get the list of all Azure Marketplace Image references + * verified by Azure Batch, see the 'List Supported Images' operation. + */ model ImageReference { - @doc("For example, Canonical or MicrosoftWindowsServer.") + /** + * For example, Canonical or MicrosoftWindowsServer. + */ publisher?: string; - @doc("For example, UbuntuServer or WindowsServer.") + /** + * For example, UbuntuServer or WindowsServer. + */ offer?: string; - @doc("For example, 18.04-LTS or 2019-Datacenter.") + /** + * For example, 18.04-LTS or 2019-Datacenter. + */ sku?: string; - @doc(""" -A value of 'latest' can be specified to select the latest version of an Image. -If omitted, the default is 'latest'. -""") + /** + * A value of 'latest' can be specified to select the latest version of an Image. + * If omitted, the default is 'latest'. + */ version?: string; - @doc(""" -This property is mutually exclusive with other ImageReference properties. The -Shared Image Gallery Image must have replicas in the same region and must be in -the same subscription as the Azure Batch account. If the image version is not -specified in the imageId, the latest version will be used. For information -about the firewall settings for the Batch Compute Node agent to communicate -with the Batch service see -https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. -""") + /** + * This property is mutually exclusive with other ImageReference properties. The + * Shared Image Gallery Image must have replicas in the same region and must be in + * the same subscription as the Azure Batch account. If the image version is not + * specified in the imageId, the latest version will be used. For information + * about the firewall settings for the Batch Compute Node agent to communicate + * with the Batch service see + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + */ virtualMachineImageId?: string; - @doc(""" -The specific version of the platform image or marketplace image used to create -the node. This read-only field differs from 'version' only if the value -specified for 'version' when the pool was created was 'latest'. -""") + /** + * The specific version of the platform image or marketplace image used to create + * the node. This read-only field differs from 'version' only if the value + * specified for 'version' when the pool was created was 'latest'. + */ @visibility("read") exactVersion?: string; } -@doc("The result of listing the Compute Node counts in the Account.") +/** + * The result of listing the Compute Node counts in the Account. + */ @pagedResult model PoolNodeCountsListResult { - @doc("A list of Compute Node counts by Pool.") + /** + * A list of Compute Node counts by Pool. + */ @items value?: PoolNodeCounts[]; - @doc("The URL to get the next set of results.") + /** + * The URL to get the next set of results. + */ @nextLink @projectedName("json", "odata.nextLink") odataNextLink?: string; } -@doc("The number of Compute Nodes in each state for a Pool.") +/** + * The number of Compute Nodes in each state for a Pool. + */ @resource("nodecounts") model PoolNodeCounts { - @doc("The ID of the Pool.") + /** + * The ID of the Pool. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key poolId: string; - @doc("The number of Compute Nodes in each Compute Node state.") + /** + * The number of Compute Nodes in each Compute Node state. + */ dedicated?: NodeCounts; - @doc("The number of Compute Nodes in each Compute Node state.") + /** + * The number of Compute Nodes in each Compute Node state. + */ lowPriority?: NodeCounts; } -@doc("The number of Compute Nodes in each Compute Node state.") +/** + * The number of Compute Nodes in each Compute Node state. + */ model NodeCounts { - @doc("The number of Compute Nodes in the creating state.") + /** + * The number of Compute Nodes in the creating state. + */ creating: int32; - @doc("The number of Compute Nodes in the idle state.") + /** + * The number of Compute Nodes in the idle state. + */ idle: int32; - @doc("The number of Compute Nodes in the offline state.") + /** + * The number of Compute Nodes in the offline state. + */ offline: int32; - @doc("The number of Compute Nodes in the preempted state.") + /** + * The number of Compute Nodes in the preempted state. + */ preempted: int32; - @doc("The count of Compute Nodes in the rebooting state.") + /** + * The count of Compute Nodes in the rebooting state. + */ rebooting: int32; - @doc("The number of Compute Nodes in the reimaging state.") + /** + * The number of Compute Nodes in the reimaging state. + */ reimaging: int32; - @doc("The number of Compute Nodes in the running state.") + /** + * The number of Compute Nodes in the running state. + */ running: int32; - @doc("The number of Compute Nodes in the starting state.") + /** + * The number of Compute Nodes in the starting state. + */ starting: int32; - @doc("The number of Compute Nodes in the startTaskFailed state.") + /** + * The number of Compute Nodes in the startTaskFailed state. + */ startTaskFailed: int32; - @doc("The number of Compute Nodes in the leavingPool state.") + /** + * The number of Compute Nodes in the leavingPool state. + */ leavingPool: int32; - @doc("The number of Compute Nodes in the unknown state.") + /** + * The number of Compute Nodes in the unknown state. + */ `unknown`: int32; - @doc("The number of Compute Nodes in the unusable state.") + /** + * The number of Compute Nodes in the unusable state. + */ unusable: int32; - @doc("The number of Compute Nodes in the waitingForStartTask state.") + /** + * The number of Compute Nodes in the waitingForStartTask state. + */ waitingForStartTask: int32; - @doc("The total number of Compute Nodes.") + /** + * The total number of Compute Nodes. + */ total: int32; } -@doc("Contains utilization and resource usage statistics for the lifetime of a Pool.") +/** + * Contains utilization and resource usage statistics for the lifetime of a Pool. + */ model PoolStatistics { - @doc("The URL for the statistics.") + /** + * The URL for the statistics. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key url: string; - @doc("The start time of the time range covered by the statistics.") + /** + * The start time of the time range covered by the statistics. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime: utcDateTime; - @doc(""" -The time at which the statistics were last updated. All statistics are limited -to the range between startTime and lastUpdateTime. -""") + /** + * The time at which the statistics were last updated. All statistics are limited + * to the range between startTime and lastUpdateTime. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdateTime: utcDateTime; - @doc("Statistics related to Pool usage information.") + /** + * Statistics related to Pool usage information. + */ usageStats?: UsageStatistics; - @doc("Statistics related to resource consumption by Compute Nodes in a Pool.") + /** + * Statistics related to resource consumption by Compute Nodes in a Pool. + */ resourceStats?: ResourceStatistics; } -@doc("Statistics related to Pool usage information.") +/** + * Statistics related to Pool usage information. + */ model UsageStatistics { - @doc("The start time of the time range covered by the statistics.") + /** + * The start time of the time range covered by the statistics. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime: utcDateTime; - @doc(""" -The time at which the statistics were last updated. All statistics are limited -to the range between startTime and lastUpdateTime. -""") + /** + * The time at which the statistics were last updated. All statistics are limited + * to the range between startTime and lastUpdateTime. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdateTime: utcDateTime; - @doc(""" -The aggregated wall-clock time of the dedicated Compute Node cores being part -of the Pool. -""") + /** + * The aggregated wall-clock time of the dedicated Compute Node cores being part + * of the Pool. + */ dedicatedCoreTime: duration; } -@doc("Statistics related to resource consumption by Compute Nodes in a Pool.") +/** + * Statistics related to resource consumption by Compute Nodes in a Pool. + */ model ResourceStatistics { - @doc("The start time of the time range covered by the statistics.") + /** + * The start time of the time range covered by the statistics. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime: utcDateTime; - @doc(""" -The time at which the statistics were last updated. All statistics are limited -to the range between startTime and lastUpdateTime. -""") + /** + * The time at which the statistics were last updated. All statistics are limited + * to the range between startTime and lastUpdateTime. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdateTime: utcDateTime; - @doc(""" -The average CPU usage across all Compute Nodes in the Pool (percentage per -node). -""") - avgCPUPercentage: float32; - - @doc("The average memory usage in GiB across all Compute Nodes in the Pool.") - avgMemoryGiB: float32; - - @doc("The peak memory usage in GiB across all Compute Nodes in the Pool.") - peakMemoryGiB: float32; - - @doc("The average used disk space in GiB across all Compute Nodes in the Pool.") - avgDiskGiB: float32; - - @doc("The peak used disk space in GiB across all Compute Nodes in the Pool.") - peakDiskGiB: float32; - - @doc("The total number of disk read operations across all Compute Nodes in the Pool.") - diskReadIOps: int32; - - @doc("The total number of disk write operations across all Compute Nodes in the Pool.") - diskWriteIOps: int32; - - @doc(""" -The total amount of data in GiB of disk reads across all Compute Nodes in the -Pool. -""") - diskReadGiB: float32; - - @doc(""" -The total amount of data in GiB of disk writes across all Compute Nodes in the -Pool. -""") - diskWriteGiB: float32; - - @doc(""" -The total amount of data in GiB of network reads across all Compute Nodes in -the Pool. -""") - networkReadGiB: float32; - - @doc(""" -The total amount of data in GiB of network writes across all Compute Nodes in -the Pool. -""") - networkWriteGiB: float32; -} - -@doc("Resource usage statistics for a Job.") + /** + * The average CPU usage across all Compute Nodes in the Pool (percentage per + * node). + */ + avgCPUPercentage: float64; + + /** + * The average memory usage in GiB across all Compute Nodes in the Pool. + */ + avgMemoryGiB: float64; + + /** + * The peak memory usage in GiB across all Compute Nodes in the Pool. + */ + peakMemoryGiB: float64; + + /** + * The average used disk space in GiB across all Compute Nodes in the Pool. + */ + avgDiskGiB: float64; + + /** + * The peak used disk space in GiB across all Compute Nodes in the Pool. + */ + peakDiskGiB: float64; + + /** + * The total number of disk read operations across all Compute Nodes in the Pool. + */ + diskReadIOps: int64; + + /** + * The total number of disk write operations across all Compute Nodes in the Pool. + */ + diskWriteIOps: int64; + + /** + * The total amount of data in GiB of disk reads across all Compute Nodes in the + * Pool. + */ + diskReadGiB: float64; + + /** + * The total amount of data in GiB of disk writes across all Compute Nodes in the + * Pool. + */ + diskWriteGiB: float64; + + /** + * The total amount of data in GiB of network reads across all Compute Nodes in + * the Pool. + */ + networkReadGiB: float64; + + /** + * The total amount of data in GiB of network writes across all Compute Nodes in + * the Pool. + */ + networkWriteGiB: float64; +} + +/** + * Resource usage statistics for a Job. + */ model JobStatistics { - @doc("The URL of the statistics.") + /** + * The URL of the statistics. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key url: string; - @doc("The start time of the time range covered by the statistics.") + /** + * The start time of the time range covered by the statistics. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime: utcDateTime; - @doc(""" -The time at which the statistics were last updated. All statistics are limited -to the range between startTime and lastUpdateTime. -""") + /** + * The time at which the statistics were last updated. All statistics are limited + * to the range between startTime and lastUpdateTime. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdateTime: utcDateTime; - @doc(""" -The total user mode CPU time (summed across all cores and all Compute Nodes) -consumed by all Tasks in the Job. -""") + /** + * The total user mode CPU time (summed across all cores and all Compute Nodes) + * consumed by all Tasks in the Job. + */ userCPUTime: duration; - @doc(""" -The total kernel mode CPU time (summed across all cores and all Compute Nodes) -consumed by all Tasks in the Job. -""") + /** + * The total kernel mode CPU time (summed across all cores and all Compute Nodes) + * consumed by all Tasks in the Job. + */ kernelCPUTime: duration; - @doc(""" - The wall clock time is the elapsed time from when the Task started running on -a Compute Node to when it finished (or to the last time the statistics were -updated, if the Task had not finished by then). If a Task was retried, this -includes the wall clock time of all the Task retries. -""") + /** + * The wall clock time is the elapsed time from when the Task started running on + * a Compute Node to when it finished (or to the last time the statistics were + * updated, if the Task had not finished by then). If a Task was retried, this + * includes the wall clock time of all the Task retries. + */ wallClockTime: duration; - @doc("The total number of disk read operations made by all Tasks in the Job.") - readIOps: int32; - - @doc("The total number of disk write operations made by all Tasks in the Job.") - writeIOps: int32; - - @doc("The total amount of data in GiB read from disk by all Tasks in the Job.") - readIOGiB: float32; - - @doc("The total amount of data in GiB written to disk by all Tasks in the Job.") - writeIOGiB: float32; - - @doc("A Task completes successfully if it returns exit code 0.") - numSucceededTasks: int32; - - @doc(""" -A Task fails if it exhausts its maximum retry count without returning exit code -0. -""") - numFailedTasks: int32; - - @doc(""" -The total number of retries on all the Tasks in the Job during the given time -range. -""") - numTaskRetries: int32; - - @doc(""" -The wait time for a Task is defined as the elapsed time between the creation of -the Task and the start of Task execution. (If the Task is retried due to -failures, the wait time is the time to the most recent Task execution.) This -value is only reported in the Account lifetime statistics; it is not included -in the Job statistics. -""") + /** + * The total number of disk read operations made by all Tasks in the Job. + */ + readIOps: int64; + + /** + * The total number of disk write operations made by all Tasks in the Job. + */ + writeIOps: int64; + + /** + * The total amount of data in GiB read from disk by all Tasks in the Job. + */ + readIOGiB: float64; + + /** + * The total amount of data in GiB written to disk by all Tasks in the Job. + */ + writeIOGiB: float64; + + /** + * A Task completes successfully if it returns exit code 0. + */ + numSucceededTasks: int64; + + /** + * A Task fails if it exhausts its maximum retry count without returning exit code + * 0. + */ + numFailedTasks: int64; + + /** + * The total number of retries on all the Tasks in the Job during the given time + * range. + */ + numTaskRetries: int64; + + /** + * The wait time for a Task is defined as the elapsed time between the creation of + * the Task and the start of Task execution. (If the Task is retried due to + * failures, the wait time is the time to the most recent Task execution.) This + * value is only reported in the Account lifetime statistics; it is not included + * in the Job statistics. + */ waitTime: duration; } -@doc(""" -A Certificate that can be installed on Compute Nodes and can be used to -authenticate operations on the machine. -""") +/** + * A Certificate that can be installed on Compute Nodes and can be used to + * authenticate operations on the machine. + */ model Certificate { - @doc(""" -The X.509 thumbprint of the Certificate. This is a sequence of up to 40 hex -digits. -""") + /** + * The X.509 thumbprint of the Certificate. This is a sequence of up to 40 hex + * digits. + */ @visibility("read", "create") thumbprint?: string; - @doc("The algorithm used to derive the thumbprint.") + /** + * The algorithm used to derive the thumbprint. + */ @visibility("read", "create") thumbprintAlgorithm?: string; - @doc("The URL of the Certificate.") + /** + * The URL of the Certificate. + */ @visibility("read") url?: string; - @doc("The state of the Certificate.") + /** + * The state of the Certificate. + */ @visibility("read") state?: CertificateState; - @doc("The time at which the Certificate entered its current state.") + /** + * The time at which the Certificate entered its current state. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. stateTransitionTime?: utcDateTime; - @doc("This property is not set if the Certificate is in its initial active state.") + /** + * This property is not set if the Certificate is in its initial active state. + */ @visibility("read") previousState?: CertificateState; - @doc("This property is not set if the Certificate is in its initial Active state.") + /** + * This property is not set if the Certificate is in its initial Active state. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. previousStateTransitionTime?: utcDateTime; - @doc("The public part of the Certificate as a base-64 encoded .cer file.") + /** + * The public part of the Certificate as a base-64 encoded .cer file. + */ @visibility("read") publicData?: string; - @doc("This property is set only if the Certificate is in the DeleteFailed state.") + /** + * This property is set only if the Certificate is in the DeleteFailed state. + */ @visibility("read") deleteCertificateError?: DeleteCertificateError; - @doc("The base64-encoded contents of the Certificate. The maximum size is 10KB.") + /** + * The base64-encoded contents of the Certificate. The maximum size is 10KB. + */ @visibility("create") data?: string; - @doc("The format of the Certificate data.") + /** + * The format of the Certificate data. + */ @visibility("create") certificateFormat?: CertificateFormat; - @doc("This must be omitted if the Certificate format is cer.") + /** + * This must be omitted if the Certificate format is cer. + */ @visibility("create") password?: string; } -@doc("An error encountered by the Batch service when deleting a Certificate.") +/** + * An error encountered by the Batch service when deleting a Certificate. + */ model DeleteCertificateError { - @doc(""" -An identifier for the Certificate deletion error. Codes are invariant and are -intended to be consumed programmatically. -""") + /** + * An identifier for the Certificate deletion error. Codes are invariant and are + * intended to be consumed programmatically. + */ code?: string; - @doc(""" -A message describing the Certificate deletion error, intended to be suitable -for display in a user interface. -""") + /** + * A message describing the Certificate deletion error, intended to be suitable + * for display in a user interface. + */ message?: string; - @doc(""" -This list includes details such as the active Pools and Compute Nodes -referencing this Certificate. However, if a large number of resources reference -the Certificate, the list contains only about the first hundred. -""") + /** + * This list includes details such as the active Pools and Compute Nodes + * referencing this Certificate. However, if a large number of resources reference + * the Certificate, the list contains only about the first hundred. + */ values?: NameValuePair[]; } -@doc("Represents a name-value pair.") +/** + * Represents a name-value pair. + */ model NameValuePair { - @doc("The name in the name-value pair.") + /** + * The name in the name-value pair. + */ name?: string; - @doc("The value in the name-value pair.") + /** + * The value in the name-value pair. + */ value?: string; } -@doc("The result of listing the Certificates in the Account.") +/** + * The result of listing the Certificates in the Account. + */ @pagedResult model CertificateListResult { - @doc("The list of Certificates.") + /** + * The list of Certificates. + */ @items value?: Certificate[]; - @doc("The URL to get the next set of results.") + /** + * The URL to get the next set of results. + */ @nextLink @projectedName("json", "odata.nextLink") odataNextLink?: string; } -@doc(""" -The result of listing the files on a Compute Node, or the files associated with -a Task on a Compute Node. -""") +/** + * The result of listing the files on a Compute Node, or the files associated with + * a Task on a Compute Node. + */ @pagedResult model NodeFileListResult { - @doc("The list of files.") + /** + * The list of files. + */ @items value?: NodeFile[]; - @doc("The URL to get the next set of results.") + /** + * The URL to get the next set of results. + */ @nextLink @projectedName("json", "odata.nextLink") odataNextLink?: string; } -@doc("Information about a file or directory on a Compute Node.") +/** + * Information about a file or directory on a Compute Node. + */ model NodeFile { - @doc("The file path.") + /** + * The file path. + */ name?: string; - @doc("The URL of the file.") + /** + * The URL of the file. + */ url?: string; - @doc("Whether the object represents a directory.") + /** + * Whether the object represents a directory. + */ isDirectory?: boolean; - @doc("The properties of a file on a Compute Node.") + /** + * The properties of a file on a Compute Node. + */ properties?: FileProperties; } -@doc("The properties of a file on a Compute Node.") +/** + * The properties of a file on a Compute Node. + */ model FileProperties { - @doc("The creation time is not returned for files on Linux Compute Nodes.") + /** + * The creation time is not returned for files on Linux Compute Nodes. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. creationTime?: utcDateTime; - @doc("The time at which the file was last modified.") + /** + * The time at which the file was last modified. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModified: utcDateTime; - @doc("The length of the file.") - contentLength: int32; + /** + * The length of the file. + */ + contentLength: int64; - @doc("The content type of the file.") + /** + * The content type of the file. + */ contentType?: string; - @doc("The file mode is returned only for files on Linux Compute Nodes.") + /** + * The file mode is returned only for files on Linux Compute Nodes. + */ fileMode?: string; } -@doc(""" -A Job Schedule that allows recurring Jobs by specifying when to run Jobs and a -specification used to create each Job. -""") +/** + * A Job Schedule that allows recurring Jobs by specifying when to run Jobs and a + * specification used to create each Job. + */ model BatchJobSchedule { - @doc("A string that uniquely identifies the schedule within the Account.") + /** + * A string that uniquely identifies the schedule within the Account. + */ @visibility("read", "create") id?: string; - @doc("The display name for the schedule.") + /** + * The display name for the schedule. + */ @visibility("read", "create") displayName?: string; - @doc("The URL of the Job Schedule.") + /** + * The URL of the Job Schedule. + */ @visibility("read") url?: string; - @doc(""" -This is an opaque string. You can use it to detect whether the Job Schedule has -changed between requests. In particular, you can be pass the ETag with an -Update Job Schedule request to specify that your changes should take effect -only if nobody else has modified the schedule in the meantime. -""") + /** + * This is an opaque string. You can use it to detect whether the Job Schedule has + * changed between requests. In particular, you can be pass the ETag with an + * Update Job Schedule request to specify that your changes should take effect + * only if nobody else has modified the schedule in the meantime. + */ @visibility("read") eTag?: string; - @doc(""" -This is the last time at which the schedule level data, such as the Job -specification or recurrence information, changed. It does not factor in -job-level changes such as new Jobs being created or Jobs changing state. -""") + /** + * This is the last time at which the schedule level data, such as the Job + * specification or recurrence information, changed. It does not factor in + * job-level changes such as new Jobs being created or Jobs changing state. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModified?: utcDateTime; - @doc("The creation time of the Job Schedule.") + /** + * The creation time of the Job Schedule. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. creationTime?: utcDateTime; - @doc("The state of the Job Schedule.") + /** + * The state of the Job Schedule. + */ @visibility("read") state?: JobScheduleState; - @doc("The time at which the Job Schedule entered the current state.") + /** + * The time at which the Job Schedule entered the current state. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. stateTransitionTime?: utcDateTime; - @doc("This property is not present if the Job Schedule is in its initial active state.") + /** + * This property is not present if the Job Schedule is in its initial active state. + */ @visibility("read") previousState?: JobScheduleState; - @doc("This property is not present if the Job Schedule is in its initial active state.") + /** + * This property is not present if the Job Schedule is in its initial active state. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. previousStateTransitionTime?: utcDateTime; - @doc(""" -All times are fixed respective to UTC and are not impacted by daylight saving -time. -""") + /** + * All times are fixed respective to UTC and are not impacted by daylight saving + * time. + */ schedule?: Schedule; - @doc("Specifies details of the Jobs to be created on a schedule.") + /** + * Specifies details of the Jobs to be created on a schedule. + */ jobSpecification?: JobSpecification; - @doc(""" -Contains information about Jobs that have been and will be run under a Job -Schedule. -""") + /** + * Contains information about Jobs that have been and will be run under a Job + * Schedule. + */ @visibility("read") executionInfo?: JobScheduleExecutionInformation; - @doc(""" -The Batch service does not assign any meaning to metadata; it is solely for the -use of user code. -""") + /** + * The Batch service does not assign any meaning to metadata; it is solely for the + * use of user code. + */ metadata?: MetadataItem[]; - @doc("Resource usage statistics for a Job Schedule.") + /** + * Resource usage statistics for a Job Schedule. + */ @visibility("read") stats?: JobScheduleStatistics; } -@doc(""" -The schedule according to which Jobs will be created. All times are fixed -respective to UTC and are not impacted by daylight saving time. -""") +/** + * The schedule according to which Jobs will be created. All times are fixed + * respective to UTC and are not impacted by daylight saving time. + */ model Schedule { - @doc(""" -If you do not specify a doNotRunUntil time, the schedule becomes ready to -create Jobs immediately. -""") + /** + * If you do not specify a doNotRunUntil time, the schedule becomes ready to + * create Jobs immediately. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. doNotRunUntil?: utcDateTime; - @doc(""" -If you do not specify a doNotRunAfter time, and you are creating a recurring -Job Schedule, the Job Schedule will remain active until you explicitly -terminate it. -""") + /** + * If you do not specify a doNotRunAfter time, and you are creating a recurring + * Job Schedule, the Job Schedule will remain active until you explicitly + * terminate it. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. doNotRunAfter?: utcDateTime; - @doc(""" -If a Job is not created within the startWindow interval, then the 'opportunity' -is lost; no Job will be created until the next recurrence of the schedule. If -the schedule is recurring, and the startWindow is longer than the recurrence -interval, then this is equivalent to an infinite startWindow, because the Job -that is 'due' in one recurrenceInterval is not carried forward into the next -recurrence interval. The default is infinite. The minimum value is 1 minute. If -you specify a lower value, the Batch service rejects the schedule with an -error; if you are calling the REST API directly, the HTTP status code is 400 -(Bad Request). -""") + /** + * If a Job is not created within the startWindow interval, then the 'opportunity' + * is lost; no Job will be created until the next recurrence of the schedule. If + * the schedule is recurring, and the startWindow is longer than the recurrence + * interval, then this is equivalent to an infinite startWindow, because the Job + * that is 'due' in one recurrenceInterval is not carried forward into the next + * recurrence interval. The default is infinite. The minimum value is 1 minute. If + * you specify a lower value, the Batch service rejects the schedule with an + * error; if you are calling the REST API directly, the HTTP status code is 400 + * (Bad Request). + */ startWindow?: duration; - @doc(""" -Because a Job Schedule can have at most one active Job under it at any given -time, if it is time to create a new Job under a Job Schedule, but the previous -Job is still running, the Batch service will not create the new Job until the -previous Job finishes. If the previous Job does not finish within the -startWindow period of the new recurrenceInterval, then no new Job will be -scheduled for that interval. For recurring Jobs, you should normally specify a -jobManagerTask in the jobSpecification. If you do not use jobManagerTask, you -will need an external process to monitor when Jobs are created, add Tasks to -the Jobs and terminate the Jobs ready for the next recurrence. The default is -that the schedule does not recur: one Job is created, within the startWindow -after the doNotRunUntil time, and the schedule is complete as soon as that Job -finishes. The minimum value is 1 minute. If you specify a lower value, the -Batch service rejects the schedule with an error; if you are calling the REST -API directly, the HTTP status code is 400 (Bad Request). -""") + /** + * Because a Job Schedule can have at most one active Job under it at any given + * time, if it is time to create a new Job under a Job Schedule, but the previous + * Job is still running, the Batch service will not create the new Job until the + * previous Job finishes. If the previous Job does not finish within the + * startWindow period of the new recurrenceInterval, then no new Job will be + * scheduled for that interval. For recurring Jobs, you should normally specify a + * jobManagerTask in the jobSpecification. If you do not use jobManagerTask, you + * will need an external process to monitor when Jobs are created, add Tasks to + * the Jobs and terminate the Jobs ready for the next recurrence. The default is + * that the schedule does not recur: one Job is created, within the startWindow + * after the doNotRunUntil time, and the schedule is complete as soon as that Job + * finishes. The minimum value is 1 minute. If you specify a lower value, the + * Batch service rejects the schedule with an error; if you are calling the REST + * API directly, the HTTP status code is 400 (Bad Request). + */ recurrenceInterval?: duration; } -@doc("Specifies details of the Jobs to be created on a schedule.") +/** + * Specifies details of the Jobs to be created on a schedule. + */ model JobSpecification { - @doc(""" -Priority values can range from -1000 to 1000, with -1000 being the lowest -priority and 1000 being the highest priority. The default value is 0. This -priority is used as the default for all Jobs under the Job Schedule. You can -update a Job's priority after it has been created using by using the update Job -API. -""") + /** + * Priority values can range from -1000 to 1000, with -1000 being the lowest + * priority and 1000 being the highest priority. The default value is 0. This + * priority is used as the default for all Jobs under the Job Schedule. You can + * update a Job's priority after it has been created using by using the update Job + * API. + */ priority?: int32; - @doc(""" -If the value is set to True, other high priority jobs submitted to the system -will take precedence and will be able requeue tasks from this job. You can -update a job's allowTaskPreemption after it has been created using the update -job API. -""") + /** + * If the value is set to True, other high priority jobs submitted to the system + * will take precedence and will be able requeue tasks from this job. You can + * update a job's allowTaskPreemption after it has been created using the update + * job API. + */ allowTaskPreemption?: boolean; - @doc(""" -The value of maxParallelTasks must be -1 or greater than 0 if specified. If not -specified, the default value is -1, which means there's no limit to the number -of tasks that can be run at once. You can update a job's maxParallelTasks after -it has been created using the update job API. -""") - maxParallelTasks?: int32; - - @doc(""" -The name need not be unique and can contain any Unicode characters up to a -maximum length of 1024. -""") + /** + * The value of maxParallelTasks must be -1 or greater than 0 if specified. If not + * specified, the default value is -1, which means there's no limit to the number + * of tasks that can be run at once. You can update a job's maxParallelTasks after + * it has been created using the update job API. + */ + maxParallelTasks?: int32 = -1; + + /** + * The name need not be unique and can contain any Unicode characters up to a + * maximum length of 1024. + */ displayName?: string; - @doc(""" -Whether Tasks in the Job can define dependencies on each other. The default is -false. -""") + /** + * Whether Tasks in the Job can define dependencies on each other. The default is + * false. + */ usesTaskDependencies?: boolean; - @doc(""" -Note that if a Job contains no Tasks, then all Tasks are considered complete. -This option is therefore most commonly used with a Job Manager task; if you -want to use automatic Job termination without a Job Manager, you should -initially set onAllTasksComplete to noaction and update the Job properties to -set onAllTasksComplete to terminatejob once you have finished adding Tasks. The -default is noaction. -""") + /** + * Note that if a Job contains no Tasks, then all Tasks are considered complete. + * This option is therefore most commonly used with a Job Manager task; if you + * want to use automatic Job termination without a Job Manager, you should + * initially set onAllTasksComplete to noaction and update the Job properties to + * set onAllTasksComplete to terminatejob once you have finished adding Tasks. The + * default is noaction. + */ onAllTasksComplete?: OnAllTasksComplete; - @doc("The default is noaction.") + /** + * The default is noaction. + */ onTaskFailure?: OnTaskFailure; - @doc("The network configuration for the Job.") + /** + * The network configuration for the Job. + */ networkConfiguration?: JobNetworkConfiguration; - @doc("The execution constraints for a Job.") + /** + * The execution constraints for a Job. + */ constraints?: JobConstraints; - @doc(""" -If the Job does not specify a Job Manager Task, the user must explicitly add -Tasks to the Job using the Task API. If the Job does specify a Job Manager -Task, the Batch service creates the Job Manager Task when the Job is created, -and will try to schedule the Job Manager Task before scheduling other Tasks in -the Job. -""") + /** + * If the Job does not specify a Job Manager Task, the user must explicitly add + * Tasks to the Job using the Task API. If the Job does specify a Job Manager + * Task, the Batch service creates the Job Manager Task when the Job is created, + * and will try to schedule the Job Manager Task before scheduling other Tasks in + * the Job. + */ jobManagerTask?: JobManagerTask; - @doc(""" -If a Job has a Job Preparation Task, the Batch service will run the Job -Preparation Task on a Node before starting any Tasks of that Job on that -Compute Node. -""") + /** + * If a Job has a Job Preparation Task, the Batch service will run the Job + * Preparation Task on a Node before starting any Tasks of that Job on that + * Compute Node. + */ jobPreparationTask?: JobPreparationTask; - @doc(""" -The primary purpose of the Job Release Task is to undo changes to Nodes made by -the Job Preparation Task. Example activities include deleting local files, or -shutting down services that were started as part of Job preparation. A Job -Release Task cannot be specified without also specifying a Job Preparation Task -for the Job. The Batch service runs the Job Release Task on the Compute Nodes -that have run the Job Preparation Task. -""") + /** + * The primary purpose of the Job Release Task is to undo changes to Nodes made by + * the Job Preparation Task. Example activities include deleting local files, or + * shutting down services that were started as part of Job preparation. A Job + * Release Task cannot be specified without also specifying a Job Preparation Task + * for the Job. The Batch service runs the Job Release Task on the Compute Nodes + * that have run the Job Preparation Task. + */ jobReleaseTask?: JobReleaseTask; - @doc(""" -Individual Tasks can override an environment setting specified here by -specifying the same setting name with a different value. -""") + /** + * Individual Tasks can override an environment setting specified here by + * specifying the same setting name with a different value. + */ commonEnvironmentSettings?: EnvironmentSetting[]; - @doc("Specifies how a Job should be assigned to a Pool.") + /** + * Specifies how a Job should be assigned to a Pool. + */ poolInfo: PoolInformation; - @doc(""" -The Batch service does not assign any meaning to metadata; it is solely for the -use of user code. -""") + /** + * The Batch service does not assign any meaning to metadata; it is solely for the + * use of user code. + */ metadata?: MetadataItem[]; } -@doc("The network configuration for the Job.") +/** + * The network configuration for the Job. + */ model JobNetworkConfiguration { - @doc(""" -The virtual network must be in the same region and subscription as the Azure -Batch Account. The specified subnet should have enough free IP addresses to -accommodate the number of Compute Nodes which will run Tasks from the Job. This -can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' -service principal must have the 'Classic Virtual Machine Contributor' -Role-Based Access Control (RBAC) role for the specified VNet so that Azure -Batch service can schedule Tasks on the Nodes. This can be verified by checking -if the specified VNet has any associated Network Security Groups (NSG). If -communication to the Nodes in the specified subnet is denied by an NSG, then -the Batch service will set the state of the Compute Nodes to unusable. This is -of the form -/subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. -If the specified VNet has any associated Network Security Groups (NSG), then a -few reserved system ports must be enabled for inbound communication from the -Azure Batch service. For Pools created with a Virtual Machine configuration, -enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for -Windows. Port 443 is also required to be open for outbound connections for -communications to Azure Storage. For more details see: -https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration -""") + /** + * The virtual network must be in the same region and subscription as the Azure + * Batch Account. The specified subnet should have enough free IP addresses to + * accommodate the number of Compute Nodes which will run Tasks from the Job. This + * can be up to the number of Compute Nodes in the Pool. The 'MicrosoftAzureBatch' + * service principal must have the 'Classic Virtual Machine Contributor' + * Role-Based Access Control (RBAC) role for the specified VNet so that Azure + * Batch service can schedule Tasks on the Nodes. This can be verified by checking + * if the specified VNet has any associated Network Security Groups (NSG). If + * communication to the Nodes in the specified subnet is denied by an NSG, then + * the Batch service will set the state of the Compute Nodes to unusable. This is + * of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{subnet}. + * If the specified VNet has any associated Network Security Groups (NSG), then a + * few reserved system ports must be enabled for inbound communication from the + * Azure Batch service. For Pools created with a Virtual Machine configuration, + * enable ports 29876 and 29877, as well as port 22 for Linux and port 3389 for + * Windows. Port 443 is also required to be open for outbound connections for + * communications to Azure Storage. For more details see: + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration + */ subnetId: string; } -@doc("The execution constraints for a Job.") +/** + * The execution constraints for a Job. + */ model JobConstraints { - @doc(""" -If the Job does not complete within the time limit, the Batch service -terminates it and any Tasks that are still running. In this case, the -termination reason will be MaxWallClockTimeExpiry. If this property is not -specified, there is no time limit on how long the Job may run. -""") + /** + * If the Job does not complete within the time limit, the Batch service + * terminates it and any Tasks that are still running. In this case, the + * termination reason will be MaxWallClockTimeExpiry. If this property is not + * specified, there is no time limit on how long the Job may run. + */ maxWallClockTime?: duration; - @doc(""" -Note that this value specifically controls the number of retries. The Batch -service will try each Task once, and may then retry up to this limit. For -example, if the maximum retry count is 3, Batch tries a Task up to 4 times (one -initial try and 3 retries). If the maximum retry count is 0, the Batch service -does not retry Tasks. If the maximum retry count is -1, the Batch service -retries the Task without limit, however this is not recommended for a start -task or any task. The default value is 0 (no retries) -""") + /** + * Note that this value specifically controls the number of retries. The Batch + * service will try each Task once, and may then retry up to this limit. For + * example, if the maximum retry count is 3, Batch tries a Task up to 4 times (one + * initial try and 3 retries). If the maximum retry count is 0, the Batch service + * does not retry Tasks. If the maximum retry count is -1, the Batch service + * retries the Task without limit, however this is not recommended for a start + * task or any task. The default value is 0 (no retries) + */ maxTaskRetryCount?: int32; } -@doc(""" -The Job Manager Task is automatically started when the Job is created. The -Batch service tries to schedule the Job Manager Task before any other Tasks in -the Job. When shrinking a Pool, the Batch service tries to preserve Nodes where -Job Manager Tasks are running for as long as possible (that is, Compute Nodes -running 'normal' Tasks are removed before Compute Nodes running Job Manager -Tasks). When a Job Manager Task fails and needs to be restarted, the system -tries to schedule it at the highest priority. If there are no idle Compute -Nodes available, the system may terminate one of the running Tasks in the Pool -and return it to the queue in order to make room for the Job Manager Task to -restart. Note that a Job Manager Task in one Job does not have priority over -Tasks in other Jobs. Across Jobs, only Job level priorities are observed. For -example, if a Job Manager in a priority 0 Job needs to be restarted, it will -not displace Tasks of a priority 1 Job. Batch will retry Tasks when a recovery -operation is triggered on a Node. Examples of recovery operations include (but -are not limited to) when an unhealthy Node is rebooted or a Compute Node -disappeared due to host failure. Retries due to recovery operations are -independent of and are not counted against the maxTaskRetryCount. Even if the -maxTaskRetryCount is 0, an internal retry due to a recovery operation may -occur. Because of this, all Tasks should be idempotent. This means Tasks need -to tolerate being interrupted and restarted without causing any corruption or -duplicate data. The best practice for long running Tasks is to use some form of -checkpointing. -""") +/** + * The Job Manager Task is automatically started when the Job is created. The + * Batch service tries to schedule the Job Manager Task before any other Tasks in + * the Job. When shrinking a Pool, the Batch service tries to preserve Nodes where + * Job Manager Tasks are running for as long as possible (that is, Compute Nodes + * running 'normal' Tasks are removed before Compute Nodes running Job Manager + * Tasks). When a Job Manager Task fails and needs to be restarted, the system + * tries to schedule it at the highest priority. If there are no idle Compute + * Nodes available, the system may terminate one of the running Tasks in the Pool + * and return it to the queue in order to make room for the Job Manager Task to + * restart. Note that a Job Manager Task in one Job does not have priority over + * Tasks in other Jobs. Across Jobs, only Job level priorities are observed. For + * example, if a Job Manager in a priority 0 Job needs to be restarted, it will + * not displace Tasks of a priority 1 Job. Batch will retry Tasks when a recovery + * operation is triggered on a Node. Examples of recovery operations include (but + * are not limited to) when an unhealthy Node is rebooted or a Compute Node + * disappeared due to host failure. Retries due to recovery operations are + * independent of and are not counted against the maxTaskRetryCount. Even if the + * maxTaskRetryCount is 0, an internal retry due to a recovery operation may + * occur. Because of this, all Tasks should be idempotent. This means Tasks need + * to tolerate being interrupted and restarted without causing any corruption or + * duplicate data. The best practice for long running Tasks is to use some form of + * checkpointing. + */ model JobManagerTask { - @doc(""" -The ID can contain any combination of alphanumeric characters including hyphens -and underscores and cannot contain more than 64 characters. -""") + /** + * The ID can contain any combination of alphanumeric characters including hyphens + * and underscores and cannot contain more than 64 characters. + */ id: string; - @doc(""" -It need not be unique and can contain any Unicode characters up to a maximum -length of 1024. -""") + /** + * It need not be unique and can contain any Unicode characters up to a maximum + * length of 1024. + */ displayName?: string; - @doc(""" -The command line does not run under a shell, and therefore cannot take -advantage of shell features such as environment variable expansion. If you want -to take advantage of such features, you should invoke the shell in the command -line, for example using \"cmd /c MyCommand\" in Windows or \"/bin/sh -c -MyCommand\" in Linux. If the command line refers to file paths, it should use a -relative path (relative to the Task working directory), or use the Batch -provided environment variable -(https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). -""") + /** + * The command line does not run under a shell, and therefore cannot take + * advantage of shell features such as environment variable expansion. If you want + * to take advantage of such features, you should invoke the shell in the command + * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" + * in Linux. If the command line refers to file paths, it should use a relative + * path (relative to the Task working directory), or use the Batch provided + * environment variable + * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + */ commandLine: string; - @doc(""" -If the Pool that will run this Task has containerConfiguration set, this must -be set as well. If the Pool that will run this Task doesn't have -containerConfiguration set, this must not be set. When this is specified, all -directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure -Batch directories on the node) are mapped into the container, all Task -environment variables are mapped into the container, and the Task command line -is executed in the container. Files produced in the container outside of -AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that -Batch file APIs will not be able to access those files. -""") + /** + * If the Pool that will run this Task has containerConfiguration set, this must + * be set as well. If the Pool that will run this Task doesn't have + * containerConfiguration set, this must not be set. When this is specified, all + * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure + * Batch directories on the node) are mapped into the container, all Task + * environment variables are mapped into the container, and the Task command line + * is executed in the container. Files produced in the container outside of + * AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that + * Batch file APIs will not be able to access those files. + */ containerSettings?: TaskContainerSettings; - @doc(""" -Files listed under this element are located in the Task's working directory. -There is a maximum size for the list of resource files. When the max size is -exceeded, the request will fail and the response error code will be -RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be -reduced in size. This can be achieved using .zip files, Application Packages, -or Docker Containers. -""") + /** + * Files listed under this element are located in the Task's working directory. + * There is a maximum size for the list of resource files. When the max size is + * exceeded, the request will fail and the response error code will be + * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be + * reduced in size. This can be achieved using .zip files, Application Packages, + * or Docker Containers. + */ resourceFiles?: ResourceFile[]; - @doc(""" -For multi-instance Tasks, the files will only be uploaded from the Compute Node -on which the primary Task is executed. -""") + /** + * For multi-instance Tasks, the files will only be uploaded from the Compute Node + * on which the primary Task is executed. + */ outputFiles?: OutputFile[]; - @doc("A list of environment variable settings for the Job Manager Task.") + /** + * A list of environment variable settings for the Job Manager Task. + */ environmentSettings?: EnvironmentSetting[]; - @doc("Execution constraints to apply to a Task.") + /** + * Execution constraints to apply to a Task. + */ constraints?: TaskConstraints; - @doc(""" -The default is 1. A Task can only be scheduled to run on a compute node if the -node has enough free scheduling slots available. For multi-instance Tasks, this -property is not supported and must not be specified. -""") + /** + * The default is 1. A Task can only be scheduled to run on a compute node if the + * node has enough free scheduling slots available. For multi-instance Tasks, this + * property is not supported and must not be specified. + */ requiredSlots?: int32; - @doc(""" -If true, when the Job Manager Task completes, the Batch service marks the Job -as complete. If any Tasks are still running at this time (other than Job -Release), those Tasks are terminated. If false, the completion of the Job -Manager Task does not affect the Job status. In this case, you should either -use the onAllTasksComplete attribute to terminate the Job, or have a client or -user terminate the Job explicitly. An example of this is if the Job Manager -creates a set of Tasks but then takes no further role in their execution. The -default value is true. If you are using the onAllTasksComplete and -onTaskFailure attributes to control Job lifetime, and using the Job Manager -Task only to create the Tasks for the Job (not to monitor progress), then it is -important to set killJobOnCompletion to false. -""") + /** + * If true, when the Job Manager Task completes, the Batch service marks the Job + * as complete. If any Tasks are still running at this time (other than Job + * Release), those Tasks are terminated. If false, the completion of the Job + * Manager Task does not affect the Job status. In this case, you should either + * use the onAllTasksComplete attribute to terminate the Job, or have a client or + * user terminate the Job explicitly. An example of this is if the Job Manager + * creates a set of Tasks but then takes no further role in their execution. The + * default value is true. If you are using the onAllTasksComplete and + * onTaskFailure attributes to control Job lifetime, and using the Job Manager + * Task only to create the Tasks for the Job (not to monitor progress), then it is + * important to set killJobOnCompletion to false. + */ killJobOnCompletion?: boolean; - @doc("If omitted, the Task runs as a non-administrative user unique to the Task.") + /** + * If omitted, the Task runs as a non-administrative user unique to the Task. + */ userIdentity?: UserIdentity; - @doc(""" -If true, no other Tasks will run on the same Node for as long as the Job -Manager is running. If false, other Tasks can run simultaneously with the Job -Manager on a Compute Node. The Job Manager Task counts normally against the -Compute Node's concurrent Task limit, so this is only relevant if the Compute -Node allows multiple concurrent Tasks. The default value is true. -""") + /** + * If true, no other Tasks will run on the same Node for as long as the Job + * Manager is running. If false, other Tasks can run simultaneously with the Job + * Manager on a Compute Node. The Job Manager Task counts normally against the + * Compute Node's concurrent Task limit, so this is only relevant if the Compute + * Node allows multiple concurrent Tasks. The default value is true. + */ runExclusive?: boolean; - @doc(""" -Application Packages are downloaded and deployed to a shared directory, not the -Task working directory. Therefore, if a referenced Application Package is -already on the Compute Node, and is up to date, then it is not re-downloaded; -the existing copy on the Compute Node is used. If a referenced Application -Package cannot be installed, for example because the package has been deleted -or because download failed, the Task fails. -""") + /** + * Application Packages are downloaded and deployed to a shared directory, not the + * Task working directory. Therefore, if a referenced Application Package is + * already on the Compute Node, and is up to date, then it is not re-downloaded; + * the existing copy on the Compute Node is used. If a referenced Application + * Package cannot be installed, for example because the package has been deleted + * or because download failed, the Task fails. + */ applicationPackageReferences?: ApplicationPackageReference[]; - @doc(""" -If this property is set, the Batch service provides the Task with an -authentication token which can be used to authenticate Batch service operations -without requiring an Account access key. The token is provided via the -AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the -Task can carry out using the token depend on the settings. For example, a Task -can request Job permissions in order to add other Tasks to the Job, or check -the status of the Job or of other Tasks under the Job. -""") + /** + * If this property is set, the Batch service provides the Task with an + * authentication token which can be used to authenticate Batch service operations + * without requiring an Account access key. The token is provided via the + * AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the + * Task can carry out using the token depend on the settings. For example, a Task + * can request Job permissions in order to add other Tasks to the Job, or check + * the status of the Job or of other Tasks under the Job. + */ authenticationTokenSettings?: AuthenticationTokenSettings; - @doc("The default value is true.") + /** + * The default value is true. + */ allowLowPriorityNode?: boolean; } -@doc("The container settings for a Task.") +/** + * The container settings for a Task. + */ model TaskContainerSettings { - @doc(""" -These additional options are supplied as arguments to the \"docker create\" -command, in addition to those controlled by the Batch Service. -""") + /** + * These additional options are supplied as arguments to the "docker create" + * command, in addition to those controlled by the Batch Service. + */ containerRunOptions?: string; - @doc(""" -This is the full Image reference, as would be specified to \"docker pull\". If -no tag is provided as part of the Image name, the tag \":latest\" is used as a -default. -""") + /** + * This is the full Image reference, as would be specified to "docker pull". If no + * tag is provided as part of the Image name, the tag ":latest" is used as a + * default. + */ imageName: string; - @doc("This setting can be omitted if was already provided at Pool creation.") + /** + * This setting can be omitted if was already provided at Pool creation. + */ registry?: ContainerRegistry; - @doc("The default is 'taskWorkingDirectory'.") + /** + * The default is 'taskWorkingDirectory'. + */ workingDirectory?: ContainerWorkingDirectory; } -@doc("A private container registry.") +/** + * A private container registry. + */ model ContainerRegistry { - @doc("The user name to log into the registry server.") + /** + * The user name to log into the registry server. + */ @projectedName("json", "username") userName?: string; - @doc("The password to log into the registry server.") + /** + * The password to log into the registry server. + */ password?: string; - @doc("If omitted, the default is \"docker.io\".") + /** + * If omitted, the default is "docker.io". + */ registryServer?: string; - @doc(""" -The reference to a user assigned identity associated with the Batch pool which -a compute node will use. -""") + /** + * The reference to a user assigned identity associated with the Batch pool which + * a compute node will use. + */ identityReference?: ComputeNodeIdentityReference; } -@doc(""" -The reference to a user assigned identity associated with the Batch pool which -a compute node will use. -""") +/** + * The reference to a user assigned identity associated with the Batch pool which + * a compute node will use. + */ model ComputeNodeIdentityReference { - @doc("The ARM resource id of the user assigned identity.") + /** + * The ARM resource id of the user assigned identity. + */ resourceId?: string; } -@doc("A single file or multiple files to be downloaded to a Compute Node.") +/** + * A single file or multiple files to be downloaded to a Compute Node. + */ model ResourceFile { - @doc(""" -The autoStorageContainerName, storageContainerUrl and httpUrl properties are -mutually exclusive and one of them must be specified. -""") + /** + * The autoStorageContainerName, storageContainerUrl and httpUrl properties are + * mutually exclusive and one of them must be specified. + */ autoStorageContainerName?: string; - @doc(""" -The autoStorageContainerName, storageContainerUrl and httpUrl properties are -mutually exclusive and one of them must be specified. This URL must be readable -and listable from compute nodes. There are three ways to get such a URL for a -container in Azure storage: include a Shared Access Signature (SAS) granting -read and list permissions on the container, use a managed identity with read -and list permissions, or set the ACL for the container to allow public access. -""") + /** + * The autoStorageContainerName, storageContainerUrl and httpUrl properties are + * mutually exclusive and one of them must be specified. This URL must be readable + * and listable from compute nodes. There are three ways to get such a URL for a + * container in Azure storage: include a Shared Access Signature (SAS) granting + * read and list permissions on the container, use a managed identity with read + * and list permissions, or set the ACL for the container to allow public access. + */ storageContainerUrl?: string; - @doc(""" -The autoStorageContainerName, storageContainerUrl and httpUrl properties are -mutually exclusive and one of them must be specified. If the URL points to -Azure Blob Storage, it must be readable from compute nodes. There are three -ways to get such a URL for a blob in Azure storage: include a Shared Access -Signature (SAS) granting read permissions on the blob, use a managed identity -with read permission, or set the ACL for the blob or its container to allow -public access. -""") + /** + * The autoStorageContainerName, storageContainerUrl and httpUrl properties are + * mutually exclusive and one of them must be specified. If the URL points to + * Azure Blob Storage, it must be readable from compute nodes. There are three + * ways to get such a URL for a blob in Azure storage: include a Shared Access + * Signature (SAS) granting read permissions on the blob, use a managed identity + * with read permission, or set the ACL for the blob or its container to allow + * public access. + */ httpUrl?: string; - @doc(""" -The property is valid only when autoStorageContainerName or storageContainerUrl -is used. This prefix can be a partial filename or a subdirectory. If a prefix -is not specified, all the files in the container will be downloaded. -""") + /** + * The property is valid only when autoStorageContainerName or storageContainerUrl + * is used. This prefix can be a partial filename or a subdirectory. If a prefix + * is not specified, all the files in the container will be downloaded. + */ blobPrefix?: string; - @doc(""" -If the httpUrl property is specified, the filePath is required and describes -the path which the file will be downloaded to, including the filename. -Otherwise, if the autoStorageContainerName or storageContainerUrl property is -specified, filePath is optional and is the directory to download the files to. -In the case where filePath is used as a directory, any directory structure -already associated with the input data will be retained in full and appended to -the specified filePath directory. The specified relative path cannot break out -of the Task's working directory (for example by using '..'). -""") + /** + * If the httpUrl property is specified, the filePath is required and describes + * the path which the file will be downloaded to, including the filename. + * Otherwise, if the autoStorageContainerName or storageContainerUrl property is + * specified, filePath is optional and is the directory to download the files to. + * In the case where filePath is used as a directory, any directory structure + * already associated with the input data will be retained in full and appended to + * the specified filePath directory. The specified relative path cannot break out + * of the Task's working directory (for example by using '..'). + */ filePath?: string; - @doc(""" -This property applies only to files being downloaded to Linux Compute Nodes. It -will be ignored if it is specified for a resourceFile which will be downloaded -to a Windows Compute Node. If this property is not specified for a Linux -Compute Node, then a default value of 0770 is applied to the file. -""") + /** + * This property applies only to files being downloaded to Linux Compute Nodes. It + * will be ignored if it is specified for a resourceFile which will be downloaded + * to a Windows Compute Node. If this property is not specified for a Linux + * Compute Node, then a default value of 0770 is applied to the file. + */ fileMode?: string; - @doc(""" -The reference to a user assigned identity associated with the Batch pool which -a compute node will use. -""") + /** + * The reference to a user assigned identity associated with the Batch pool which + * a compute node will use. + */ identityReference?: ComputeNodeIdentityReference; } -@doc(""" -On every file uploads, Batch service writes two log files to the compute node, -'fileuploadout.txt' and 'fileuploaderr.txt'. These log files are used to learn -more about a specific failure. -""") +/** + * On every file uploads, Batch service writes two log files to the compute node, + * 'fileuploadout.txt' and 'fileuploaderr.txt'. These log files are used to learn + * more about a specific failure. + */ model OutputFile { - @doc(""" -Both relative and absolute paths are supported. Relative paths are relative to -the Task working directory. The following wildcards are supported: * matches 0 -or more characters (for example pattern abc* would match abc or abcdef), ** -matches any directory, ? matches any single character, [abc] matches one -character in the brackets, and [a-c] matches one character in the range. -Brackets can include a negation to match any character not specified (for -example [!abc] matches any character but a, b, or c). If a file name starts -with \".\" it is ignored by default but may be matched by specifying it -explicitly (for example *.gif will not match .a.gif, but .*.gif will). A simple -example: **\\*.txt matches any file that does not start in '.' and ends with -.txt in the Task working directory or any subdirectory. If the filename -contains a wildcard character it can be escaped using brackets (for example -abc[*] would match a file named abc*). Note that both \\ and / are treated as -directory separators on Windows, but only / is on Linux. Environment variables -(%var% on Windows or $var on Linux) are expanded prior to the pattern being -applied. -""") + /** + * Both relative and absolute paths are supported. Relative paths are relative to + * the Task working directory. The following wildcards are supported: * matches 0 + * or more characters (for example pattern abc* would match abc or abcdef), ** + * matches any directory, ? matches any single character, [abc] matches one + * character in the brackets, and [a-c] matches one character in the range. + * Brackets can include a negation to match any character not specified (for + * example [!abc] matches any character but a, b, or c). If a file name starts + * with "." it is ignored by default but may be matched by specifying it + * explicitly (for example *.gif will not match .a.gif, but .*.gif will). A simple + * example: **\*.txt matches any file that does not start in '.' and ends with + * .txt in the Task working directory or any subdirectory. If the filename + * contains a wildcard character it can be escaped using brackets (for example + * abc[*] would match a file named abc*). Note that both \ and / are treated as + * directory separators on Windows, but only / is on Linux. Environment variables + * (%var% on Windows or $var on Linux) are expanded prior to the pattern being + * applied. + */ filePattern: string; - @doc("The destination to which a file should be uploaded.") + /** + * The destination to which a file should be uploaded. + */ destination: OutputFileDestination; - @doc(""" -Details about an output file upload operation, including under what conditions -to perform the upload. -""") + /** + * Details about an output file upload operation, including under what conditions + * to perform the upload. + */ uploadOptions: OutputFileUploadOptions; } -@doc("The destination to which a file should be uploaded.") +/** + * The destination to which a file should be uploaded. + */ model OutputFileDestination { - @doc("Specifies a file upload destination within an Azure blob storage container.") + /** + * Specifies a file upload destination within an Azure blob storage container. + */ container?: OutputFileBlobContainerDestination; } -@doc("Specifies a file upload destination within an Azure blob storage container.") +/** + * Specifies a file upload destination within an Azure blob storage container. + */ model OutputFileBlobContainerDestination { - @doc(""" -If filePattern refers to a specific file (i.e. contains no wildcards), then -path is the name of the blob to which to upload that file. If filePattern -contains one or more wildcards (and therefore may match multiple files), then -path is the name of the blob virtual directory (which is prepended to each blob -name) to which to upload the file(s). If omitted, file(s) are uploaded to the -root of the container with a blob name matching their file name. -""") + /** + * If filePattern refers to a specific file (i.e. contains no wildcards), then + * path is the name of the blob to which to upload that file. If filePattern + * contains one or more wildcards (and therefore may match multiple files), then + * path is the name of the blob virtual directory (which is prepended to each blob + * name) to which to upload the file(s). If omitted, file(s) are uploaded to the + * root of the container with a blob name matching their file name. + */ path?: string; - @doc(""" -If not using a managed identity, the URL must include a Shared Access Signature -(SAS) granting write permissions to the container. -""") + /** + * If not using a managed identity, the URL must include a Shared Access Signature + * (SAS) granting write permissions to the container. + */ containerUrl: string; - @doc("The identity must have write access to the Azure Blob Storage container") + /** + * The identity must have write access to the Azure Blob Storage container + */ identityReference?: ComputeNodeIdentityReference; - @doc(""" -These headers will be specified when uploading files to Azure Storage. For more -information, see [Request Headers (All Blob -Types)](https://docs.microsoft.com/rest/api/storageservices/put-blob#request-headers-all-blob-types). -""") + /** + * These headers will be specified when uploading files to Azure Storage. For more + * information, see [Request Headers (All Blob + * Types)](https://docs.microsoft.com/rest/api/storageservices/put-blob#request-headers-all-blob-types). + */ uploadHeaders?: HttpHeader[]; } -@doc("An HTTP header name-value pair") +/** + * An HTTP header name-value pair + */ model HttpHeader { - @doc("The case-insensitive name of the header to be used while uploading output files") + /** + * The case-insensitive name of the header to be used while uploading output files + */ name: string; - @doc("The value of the header to be used while uploading output files") + /** + * The value of the header to be used while uploading output files + */ value?: string; } -@doc(""" -Details about an output file upload operation, including under what conditions -to perform the upload. -""") +/** + * Details about an output file upload operation, including under what conditions + * to perform the upload. + */ model OutputFileUploadOptions { - @doc("The default is taskcompletion.") + /** + * The default is taskcompletion. + */ uploadCondition: OutputFileUploadCondition; } -@doc("An environment variable to be set on a Task process.") +/** + * An environment variable to be set on a Task process. + */ model EnvironmentSetting { - @doc("The name of the environment variable.") + /** + * The name of the environment variable. + */ name: string; - @doc("The value of the environment variable.") + /** + * The value of the environment variable. + */ value?: string; } -@doc("Execution constraints to apply to a Task.") +/** + * Execution constraints to apply to a Task. + */ model TaskConstraints { - @doc("If this is not specified, there is no time limit on how long the Task may run.") + /** + * If this is not specified, there is no time limit on how long the Task may run. + */ maxWallClockTime?: duration; - @doc(""" -The default is 7 days, i.e. the Task directory will be retained for 7 days -unless the Compute Node is removed or the Job is deleted. -""") + /** + * The default is 7 days, i.e. the Task directory will be retained for 7 days + * unless the Compute Node is removed or the Job is deleted. + */ retentionTime?: duration; - @doc(""" -Note that this value specifically controls the number of retries for the Task -executable due to a nonzero exit code. The Batch service will try the Task -once, and may then retry up to this limit. For example, if the maximum retry -count is 3, Batch tries the Task up to 4 times (one initial try and 3 retries). -If the maximum retry count is 0, the Batch service does not retry the Task -after the first attempt. If the maximum retry count is -1, the Batch service -retries the Task without limit, however this is not recommended for a start -task or any task. The default value is 0 (no retries) -""") + /** + * Note that this value specifically controls the number of retries for the Task + * executable due to a nonzero exit code. The Batch service will try the Task + * once, and may then retry up to this limit. For example, if the maximum retry + * count is 3, Batch tries the Task up to 4 times (one initial try and 3 retries). + * If the maximum retry count is 0, the Batch service does not retry the Task + * after the first attempt. If the maximum retry count is -1, the Batch service + * retries the Task without limit, however this is not recommended for a start + * task or any task. The default value is 0 (no retries) + */ maxTaskRetryCount?: int32; } -@doc("Specify either the userName or autoUser property, but not both.") +/** + * Specify either the userName or autoUser property, but not both. + */ model UserIdentity { - @doc(""" -The userName and autoUser properties are mutually exclusive; you must specify -one but not both. -""") + /** + * The userName and autoUser properties are mutually exclusive; you must specify + * one but not both. + */ @projectedName("json", "username") userName?: string; - @doc(""" -The userName and autoUser properties are mutually exclusive; you must specify -one but not both. -""") + /** + * The userName and autoUser properties are mutually exclusive; you must specify + * one but not both. + */ autoUser?: AutoUserSpecification; } -@doc(""" -Specifies the parameters for the auto user that runs a Task on the Batch -service. -""") +/** + * Specifies the parameters for the auto user that runs a Task on the Batch + * service. + */ model AutoUserSpecification { - @doc(""" -The default value is pool. If the pool is running Windows a value of Task -should be specified if stricter isolation between tasks is required. For -example, if the task mutates the registry in a way which could impact other -tasks, or if certificates have been specified on the pool which should not be -accessible by normal tasks but should be accessible by StartTasks. -""") + /** + * The default value is pool. If the pool is running Windows a value of Task + * should be specified if stricter isolation between tasks is required. For + * example, if the task mutates the registry in a way which could impact other + * tasks, or if certificates have been specified on the pool which should not be + * accessible by normal tasks but should be accessible by StartTasks. + */ scope?: AutoUserScope; - @doc("The default value is nonAdmin.") + /** + * The default value is nonAdmin. + */ elevationLevel?: ElevationLevel; } -@doc("A reference to an Package to be deployed to Compute Nodes.") +/** + * A reference to an Package to be deployed to Compute Nodes. + */ model ApplicationPackageReference { - @doc("The ID of the application to deploy.") + /** + * The ID of the application to deploy. + */ applicationId: string; - @doc(""" -If this is omitted on a Pool, and no default version is specified for this -application, the request fails with the error code -InvalidApplicationPackageReferences and HTTP status code 409. If this is -omitted on a Task, and no default version is specified for this application, -the Task fails with a pre-processing error. -""") + /** + * If this is omitted on a Pool, and no default version is specified for this + * application, the request fails with the error code + * InvalidApplicationPackageReferences and HTTP status code 409. If this is + * omitted on a Task, and no default version is specified for this application, + * the Task fails with a pre-processing error. + */ version?: string; } -@doc(""" -The settings for an authentication token that the Task can use to perform Batch -service operations. -""") +/** + * The settings for an authentication token that the Task can use to perform Batch + * service operations. + */ model AuthenticationTokenSettings { - @doc(""" -The authentication token grants access to a limited set of Batch service -operations. Currently the only supported value for the access property is -'job', which grants access to all operations related to the Job which contains -the Task. -""") + /** + * The authentication token grants access to a limited set of Batch service + * operations. Currently the only supported value for the access property is + * 'job', which grants access to all operations related to the Job which contains + * the Task. + */ access?: "job"[]; } -@doc(""" -You can use Job Preparation to prepare a Node to run Tasks for the Job. -Activities commonly performed in Job Preparation include: Downloading common -resource files used by all the Tasks in the Job. The Job Preparation Task can -download these common resource files to the shared location on the Node. -(AZ_BATCH_NODE_ROOT_DIR\\shared), or starting a local service on the Node so -that all Tasks of that Job can communicate with it. If the Job Preparation Task -fails (that is, exhausts its retry count before exiting with exit code 0), -Batch will not run Tasks of this Job on the Node. The Compute Node remains -ineligible to run Tasks of this Job until it is reimaged. The Compute Node -remains active and can be used for other Jobs. The Job Preparation Task can run -multiple times on the same Node. Therefore, you should write the Job -Preparation Task to handle re-execution. If the Node is rebooted, the Job -Preparation Task is run again on the Compute Node before scheduling any other -Task of the Job, if rerunOnNodeRebootAfterSuccess is true or if the Job -Preparation Task did not previously complete. If the Node is reimaged, the Job -Preparation Task is run again before scheduling any Task of the Job. Batch will -retry Tasks when a recovery operation is triggered on a Node. Examples of -recovery operations include (but are not limited to) when an unhealthy Node is -rebooted or a Compute Node disappeared due to host failure. Retries due to -recovery operations are independent of and are not counted against the -maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due to -a recovery operation may occur. Because of this, all Tasks should be -idempotent. This means Tasks need to tolerate being interrupted and restarted -without causing any corruption or duplicate data. The best practice for long -running Tasks is to use some form of checkpointing. -""") +/** + * You can use Job Preparation to prepare a Node to run Tasks for the Job. + * Activities commonly performed in Job Preparation include: Downloading common + * resource files used by all the Tasks in the Job. The Job Preparation Task can + * download these common resource files to the shared location on the Node. + * (AZ_BATCH_NODE_ROOT_DIR\shared), or starting a local service on the Node so + * that all Tasks of that Job can communicate with it. If the Job Preparation Task + * fails (that is, exhausts its retry count before exiting with exit code 0), + * Batch will not run Tasks of this Job on the Node. The Compute Node remains + * ineligible to run Tasks of this Job until it is reimaged. The Compute Node + * remains active and can be used for other Jobs. The Job Preparation Task can run + * multiple times on the same Node. Therefore, you should write the Job + * Preparation Task to handle re-execution. If the Node is rebooted, the Job + * Preparation Task is run again on the Compute Node before scheduling any other + * Task of the Job, if rerunOnNodeRebootAfterSuccess is true or if the Job + * Preparation Task did not previously complete. If the Node is reimaged, the Job + * Preparation Task is run again before scheduling any Task of the Job. Batch will + * retry Tasks when a recovery operation is triggered on a Node. Examples of + * recovery operations include (but are not limited to) when an unhealthy Node is + * rebooted or a Compute Node disappeared due to host failure. Retries due to + * recovery operations are independent of and are not counted against the + * maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal retry due to + * a recovery operation may occur. Because of this, all Tasks should be + * idempotent. This means Tasks need to tolerate being interrupted and restarted + * without causing any corruption or duplicate data. The best practice for long + * running Tasks is to use some form of checkpointing. + */ model JobPreparationTask { - @doc(""" -The ID can contain any combination of alphanumeric characters including hyphens -and underscores and cannot contain more than 64 characters. If you do not -specify this property, the Batch service assigns a default value of -'jobpreparation'. No other Task in the Job can have the same ID as the Job -Preparation Task. If you try to submit a Task with the same id, the Batch -service rejects the request with error code TaskIdSameAsJobPreparationTask; if -you are calling the REST API directly, the HTTP status code is 409 (Conflict). -""") + /** + * The ID can contain any combination of alphanumeric characters including hyphens + * and underscores and cannot contain more than 64 characters. If you do not + * specify this property, the Batch service assigns a default value of + * 'jobpreparation'. No other Task in the Job can have the same ID as the Job + * Preparation Task. If you try to submit a Task with the same id, the Batch + * service rejects the request with error code TaskIdSameAsJobPreparationTask; if + * you are calling the REST API directly, the HTTP status code is 409 (Conflict). + */ id?: string; - @doc(""" -The command line does not run under a shell, and therefore cannot take -advantage of shell features such as environment variable expansion. If you want -to take advantage of such features, you should invoke the shell in the command -line, for example using \"cmd /c MyCommand\" in Windows or \"/bin/sh -c -MyCommand\" in Linux. If the command line refers to file paths, it should use a -relative path (relative to the Task working directory), or use the Batch -provided environment variable -(https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). -""") + /** + * The command line does not run under a shell, and therefore cannot take + * advantage of shell features such as environment variable expansion. If you want + * to take advantage of such features, you should invoke the shell in the command + * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" + * in Linux. If the command line refers to file paths, it should use a relative + * path (relative to the Task working directory), or use the Batch provided + * environment variable + * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + */ commandLine: string; - @doc(""" -When this is specified, all directories recursively below the -AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are -mapped into the container, all Task environment variables are mapped into the -container, and the Task command line is executed in the container. Files -produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be -reflected to the host disk, meaning that Batch file APIs will not be able to -access those files. -""") + /** + * When this is specified, all directories recursively below the + * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are + * mapped into the container, all Task environment variables are mapped into the + * container, and the Task command line is executed in the container. Files + * produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be + * reflected to the host disk, meaning that Batch file APIs will not be able to + * access those files. + */ containerSettings?: TaskContainerSettings; - @doc(""" -Files listed under this element are located in the Task's working directory. -There is a maximum size for the list of resource files. When the max size is -exceeded, the request will fail and the response error code will be -RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be -reduced in size. This can be achieved using .zip files, Application Packages, -or Docker Containers. -""") + /** + * Files listed under this element are located in the Task's working directory. + * There is a maximum size for the list of resource files. When the max size is + * exceeded, the request will fail and the response error code will be + * RequestEntityTooLarge. If this occurs, the collection of ResourceFiles must be + * reduced in size. This can be achieved using .zip files, Application Packages, + * or Docker Containers. + */ resourceFiles?: ResourceFile[]; - @doc("A list of environment variable settings for the Job Preparation Task.") + /** + * A list of environment variable settings for the Job Preparation Task. + */ environmentSettings?: EnvironmentSetting[]; - @doc("Execution constraints to apply to a Task.") + /** + * Execution constraints to apply to a Task. + */ constraints?: TaskConstraints; - @doc(""" -If true and the Job Preparation Task fails on a Node, the Batch service retries -the Job Preparation Task up to its maximum retry count (as specified in the -constraints element). If the Task has still not completed successfully after -all retries, then the Batch service will not schedule Tasks of the Job to the -Node. The Node remains active and eligible to run Tasks of other Jobs. If -false, the Batch service will not wait for the Job Preparation Task to -complete. In this case, other Tasks of the Job can start executing on the -Compute Node while the Job Preparation Task is still running; and even if the -Job Preparation Task fails, new Tasks will continue to be scheduled on the -Compute Node. The default value is true. -""") + /** + * If true and the Job Preparation Task fails on a Node, the Batch service retries + * the Job Preparation Task up to its maximum retry count (as specified in the + * constraints element). If the Task has still not completed successfully after + * all retries, then the Batch service will not schedule Tasks of the Job to the + * Node. The Node remains active and eligible to run Tasks of other Jobs. If + * false, the Batch service will not wait for the Job Preparation Task to + * complete. In this case, other Tasks of the Job can start executing on the + * Compute Node while the Job Preparation Task is still running; and even if the + * Job Preparation Task fails, new Tasks will continue to be scheduled on the + * Compute Node. The default value is true. + */ waitForSuccess?: boolean; - @doc(""" -If omitted, the Task runs as a non-administrative user unique to the Task on -Windows Compute Nodes, or a non-administrative user unique to the Pool on Linux -Compute Nodes. -""") + /** + * If omitted, the Task runs as a non-administrative user unique to the Task on + * Windows Compute Nodes, or a non-administrative user unique to the Pool on Linux + * Compute Nodes. + */ userIdentity?: UserIdentity; - @doc(""" -The Job Preparation Task is always rerun if a Compute Node is reimaged, or if -the Job Preparation Task did not complete (e.g. because the reboot occurred -while the Task was running). Therefore, you should always write a Job -Preparation Task to be idempotent and to behave correctly if run multiple -times. The default value is true. -""") + /** + * The Job Preparation Task is always rerun if a Compute Node is reimaged, or if + * the Job Preparation Task did not complete (e.g. because the reboot occurred + * while the Task was running). Therefore, you should always write a Job + * Preparation Task to be idempotent and to behave correctly if run multiple + * times. The default value is true. + */ rerunOnNodeRebootAfterSuccess?: boolean; } -@doc(""" -The Job Release Task runs when the Job ends, because of one of the following: -The user calls the Terminate Job API, or the Delete Job API while the Job is -still active, the Job's maximum wall clock time constraint is reached, and the -Job is still active, or the Job's Job Manager Task completed, and the Job is -configured to terminate when the Job Manager completes. The Job Release Task -runs on each Node where Tasks of the Job have run and the Job Preparation Task -ran and completed. If you reimage a Node after it has run the Job Preparation -Task, and the Job ends without any further Tasks of the Job running on that -Node (and hence the Job Preparation Task does not re-run), then the Job Release -Task does not run on that Compute Node. If a Node reboots while the Job Release -Task is still running, the Job Release Task runs again when the Compute Node -starts up. The Job is not marked as complete until all Job Release Tasks have -completed. The Job Release Task runs in the background. It does not occupy a -scheduling slot; that is, it does not count towards the taskSlotsPerNode limit -specified on the Pool. -""") +/** + * The Job Release Task runs when the Job ends, because of one of the following: + * The user calls the Terminate Job API, or the Delete Job API while the Job is + * still active, the Job's maximum wall clock time constraint is reached, and the + * Job is still active, or the Job's Job Manager Task completed, and the Job is + * configured to terminate when the Job Manager completes. The Job Release Task + * runs on each Node where Tasks of the Job have run and the Job Preparation Task + * ran and completed. If you reimage a Node after it has run the Job Preparation + * Task, and the Job ends without any further Tasks of the Job running on that + * Node (and hence the Job Preparation Task does not re-run), then the Job Release + * Task does not run on that Compute Node. If a Node reboots while the Job Release + * Task is still running, the Job Release Task runs again when the Compute Node + * starts up. The Job is not marked as complete until all Job Release Tasks have + * completed. The Job Release Task runs in the background. It does not occupy a + * scheduling slot; that is, it does not count towards the taskSlotsPerNode limit + * specified on the Pool. + */ model JobReleaseTask { - @doc(""" -The ID can contain any combination of alphanumeric characters including hyphens -and underscores and cannot contain more than 64 characters. If you do not -specify this property, the Batch service assigns a default value of -'jobrelease'. No other Task in the Job can have the same ID as the Job Release -Task. If you try to submit a Task with the same id, the Batch service rejects -the request with error code TaskIdSameAsJobReleaseTask; if you are calling the -REST API directly, the HTTP status code is 409 (Conflict). -""") + /** + * The ID can contain any combination of alphanumeric characters including hyphens + * and underscores and cannot contain more than 64 characters. If you do not + * specify this property, the Batch service assigns a default value of + * 'jobrelease'. No other Task in the Job can have the same ID as the Job Release + * Task. If you try to submit a Task with the same id, the Batch service rejects + * the request with error code TaskIdSameAsJobReleaseTask; if you are calling the + * REST API directly, the HTTP status code is 409 (Conflict). + */ id?: string; - @doc(""" -The command line does not run under a shell, and therefore cannot take -advantage of shell features such as environment variable expansion. If you want -to take advantage of such features, you should invoke the shell in the command -line, for example using \"cmd /c MyCommand\" in Windows or \"/bin/sh -c -MyCommand\" in Linux. If the command line refers to file paths, it should use a -relative path (relative to the Task working directory), or use the Batch -provided environment variable -(https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). -""") + /** + * The command line does not run under a shell, and therefore cannot take + * advantage of shell features such as environment variable expansion. If you want + * to take advantage of such features, you should invoke the shell in the command + * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" + * in Linux. If the command line refers to file paths, it should use a relative + * path (relative to the Task working directory), or use the Batch provided + * environment variable + * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + */ commandLine: string; - @doc(""" -When this is specified, all directories recursively below the -AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are -mapped into the container, all Task environment variables are mapped into the -container, and the Task command line is executed in the container. Files -produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be -reflected to the host disk, meaning that Batch file APIs will not be able to -access those files. -""") + /** + * When this is specified, all directories recursively below the + * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are + * mapped into the container, all Task environment variables are mapped into the + * container, and the Task command line is executed in the container. Files + * produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be + * reflected to the host disk, meaning that Batch file APIs will not be able to + * access those files. + */ containerSettings?: TaskContainerSettings; - @doc("Files listed under this element are located in the Task's working directory.") + /** + * Files listed under this element are located in the Task's working directory. + */ resourceFiles?: ResourceFile[]; - @doc("A list of environment variable settings for the Job Release Task.") + /** + * A list of environment variable settings for the Job Release Task. + */ environmentSettings?: EnvironmentSetting[]; - @doc(""" -The maximum elapsed time that the Job Release Task may run on a given Compute -Node, measured from the time the Task starts. If the Task does not complete -within the time limit, the Batch service terminates it. The default value is 15 -minutes. You may not specify a timeout longer than 15 minutes. If you do, the -Batch service rejects it with an error; if you are calling the REST API -directly, the HTTP status code is 400 (Bad Request). -""") + /** + * The maximum elapsed time that the Job Release Task may run on a given Compute + * Node, measured from the time the Task starts. If the Task does not complete + * within the time limit, the Batch service terminates it. The default value is 15 + * minutes. You may not specify a timeout longer than 15 minutes. If you do, the + * Batch service rejects it with an error; if you are calling the REST API + * directly, the HTTP status code is 400 (Bad Request). + */ maxWallClockTime?: duration; - @doc(""" -The default is 7 days, i.e. the Task directory will be retained for 7 days -unless the Compute Node is removed or the Job is deleted. -""") + /** + * The default is 7 days, i.e. the Task directory will be retained for 7 days + * unless the Compute Node is removed or the Job is deleted. + */ retentionTime?: duration; - @doc("If omitted, the Task runs as a non-administrative user unique to the Task.") + /** + * If omitted, the Task runs as a non-administrative user unique to the Task. + */ userIdentity?: UserIdentity; } -@doc("Specifies how a Job should be assigned to a Pool.") +/** + * Specifies how a Job should be assigned to a Pool. + */ model PoolInformation { - @doc(""" -You must ensure that the Pool referenced by this property exists. If the Pool -does not exist at the time the Batch service tries to schedule a Job, no Tasks -for the Job will run until you create a Pool with that id. Note that the Batch -service will not reject the Job request; it will simply not run Tasks until the -Pool exists. You must specify either the Pool ID or the auto Pool -specification, but not both. -""") + /** + * You must ensure that the Pool referenced by this property exists. If the Pool + * does not exist at the time the Batch service tries to schedule a Job, no Tasks + * for the Job will run until you create a Pool with that id. Note that the Batch + * service will not reject the Job request; it will simply not run Tasks until the + * Pool exists. You must specify either the Pool ID or the auto Pool + * specification, but not both. + */ poolId?: string; - @doc(""" -If auto Pool creation fails, the Batch service moves the Job to a completed -state, and the Pool creation error is set in the Job's scheduling error -property. The Batch service manages the lifetime (both creation and, unless -keepAlive is specified, deletion) of the auto Pool. Any user actions that -affect the lifetime of the auto Pool while the Job is active will result in -unexpected behavior. You must specify either the Pool ID or the auto Pool -specification, but not both. -""") + /** + * If auto Pool creation fails, the Batch service moves the Job to a completed + * state, and the Pool creation error is set in the Job's scheduling error + * property. The Batch service manages the lifetime (both creation and, unless + * keepAlive is specified, deletion) of the auto Pool. Any user actions that + * affect the lifetime of the auto Pool while the Job is active will result in + * unexpected behavior. You must specify either the Pool ID or the auto Pool + * specification, but not both. + */ autoPoolSpecification?: AutoPoolSpecification; } -@doc(""" -Specifies characteristics for a temporary 'auto pool'. The Batch service will -create this auto Pool when the Job is submitted. -""") +/** + * Specifies characteristics for a temporary 'auto pool'. The Batch service will + * create this auto Pool when the Job is submitted. + */ model AutoPoolSpecification { - @doc(""" -The Batch service assigns each auto Pool a unique identifier on creation. To -distinguish between Pools created for different purposes, you can specify this -element to add a prefix to the ID that is assigned. The prefix can be up to 20 -characters long. -""") + /** + * The Batch service assigns each auto Pool a unique identifier on creation. To + * distinguish between Pools created for different purposes, you can specify this + * element to add a prefix to the ID that is assigned. The prefix can be up to 20 + * characters long. + */ autoPoolIdPrefix?: string; - @doc(""" -The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule -are assigned to Pools. -""") + /** + * The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule + * are assigned to Pools. + */ poolLifetimeOption: PoolLifetimeOption; - @doc(""" -If false, the Batch service deletes the Pool once its lifetime (as determined -by the poolLifetimeOption setting) expires; that is, when the Job or Job -Schedule completes. If true, the Batch service does not delete the Pool -automatically. It is up to the user to delete auto Pools created with this -option. -""") + /** + * If false, the Batch service deletes the Pool once its lifetime (as determined + * by the poolLifetimeOption setting) expires; that is, when the Job or Job + * Schedule completes. If true, the Batch service does not delete the Pool + * automatically. It is up to the user to delete auto Pools created with this + * option. + */ keepAlive?: boolean; - @doc("Specification for creating a new Pool.") + /** + * Specification for creating a new Pool. + */ pool?: PoolSpecification; } -@doc("Specification for creating a new Pool.") +/** + * Specification for creating a new Pool. + */ model PoolSpecification { - @doc(""" -The display name need not be unique and can contain any Unicode characters up -to a maximum length of 1024. -""") + /** + * The display name need not be unique and can contain any Unicode characters up + * to a maximum length of 1024. + */ displayName?: string; - @doc(""" -For information about available sizes of virtual machines in Pools, see Choose -a VM size for Compute Nodes in an Azure Batch Pool -(https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). -""") + /** + * For information about available sizes of virtual machines in Pools, see Choose + * a VM size for Compute Nodes in an Azure Batch Pool + * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + */ vmSize: string; - @doc(""" -This property must be specified if the Pool needs to be created with Azure PaaS -VMs. This property and virtualMachineConfiguration are mutually exclusive and -one of the properties must be specified. If neither is specified then the Batch -service returns an error; if you are calling the REST API directly, the HTTP -status code is 400 (Bad Request). This property cannot be specified if the -Batch Account was created with its poolAllocationMode property set to -'UserSubscription'. -""") + /** + * This property must be specified if the Pool needs to be created with Azure PaaS + * VMs. This property and virtualMachineConfiguration are mutually exclusive and + * one of the properties must be specified. If neither is specified then the Batch + * service returns an error; if you are calling the REST API directly, the HTTP + * status code is 400 (Bad Request). This property cannot be specified if the + * Batch Account was created with its poolAllocationMode property set to + * 'UserSubscription'. + */ cloudServiceConfiguration?: CloudServiceConfiguration; - @doc(""" -This property must be specified if the Pool needs to be created with Azure IaaS -VMs. This property and cloudServiceConfiguration are mutually exclusive and one -of the properties must be specified. If neither is specified then the Batch -service returns an error; if you are calling the REST API directly, the HTTP -status code is 400 (Bad Request). -""") + /** + * This property must be specified if the Pool needs to be created with Azure IaaS + * VMs. This property and cloudServiceConfiguration are mutually exclusive and one + * of the properties must be specified. If neither is specified then the Batch + * service returns an error; if you are calling the REST API directly, the HTTP + * status code is 400 (Bad Request). + */ virtualMachineConfiguration?: VirtualMachineConfiguration; - @doc(""" -The default value is 1. The maximum value is the smaller of 4 times the number -of cores of the vmSize of the pool or 256. -""") + /** + * The default value is 1. The maximum value is the smaller of 4 times the number + * of cores of the vmSize of the pool or 256. + */ taskSlotsPerNode?: int32; - @doc("If not specified, the default is spread.") + /** + * If not specified, the default is spread. + */ taskSchedulingPolicy?: TaskSchedulingPolicy; - @doc(""" -This timeout applies only to manual scaling; it has no effect when -enableAutoScale is set to true. The default value is 15 minutes. The minimum -value is 5 minutes. If you specify a value less than 5 minutes, the Batch -service rejects the request with an error; if you are calling the REST API -directly, the HTTP status code is 400 (Bad Request). -""") + /** + * This timeout applies only to manual scaling; it has no effect when + * enableAutoScale is set to true. The default value is 15 minutes. The minimum + * value is 5 minutes. If you specify a value less than 5 minutes, the Batch + * service rejects the request with an error; if you are calling the REST API + * directly, the HTTP status code is 400 (Bad Request). + */ resizeTimeout?: duration; - @doc(""" -This property must not be specified if enableAutoScale is set to true. If -enableAutoScale is set to false, then you must set either targetDedicatedNodes, -targetLowPriorityNodes, or both. -""") + /** + * This property must not be specified if enableAutoScale is set to true. If + * enableAutoScale is set to false, then you must set either targetDedicatedNodes, + * targetLowPriorityNodes, or both. + */ targetDedicatedNodes?: int32; - @doc(""" -This property must not be specified if enableAutoScale is set to true. If -enableAutoScale is set to false, then you must set either targetDedicatedNodes, -targetLowPriorityNodes, or both. -""") + /** + * This property must not be specified if enableAutoScale is set to true. If + * enableAutoScale is set to false, then you must set either targetDedicatedNodes, + * targetLowPriorityNodes, or both. + */ targetLowPriorityNodes?: int32; - @doc(""" -If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must -be specified. If true, the autoScaleFormula element is required. The Pool -automatically resizes according to the formula. The default value is false. -""") + /** + * If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must + * be specified. If true, the autoScaleFormula element is required. The Pool + * automatically resizes according to the formula. The default value is false. + */ enableAutoScale?: boolean; - @doc(""" -This property must not be specified if enableAutoScale is set to false. It is -required if enableAutoScale is set to true. The formula is checked for validity -before the Pool is created. If the formula is not valid, the Batch service -rejects the request with detailed error information. -""") + /** + * This property must not be specified if enableAutoScale is set to false. It is + * required if enableAutoScale is set to true. The formula is checked for validity + * before the Pool is created. If the formula is not valid, the Batch service + * rejects the request with detailed error information. + */ autoScaleFormula?: string; - @doc(""" -The default value is 15 minutes. The minimum and maximum value are 5 minutes -and 168 hours respectively. If you specify a value less than 5 minutes or -greater than 168 hours, the Batch service rejects the request with an invalid -property value error; if you are calling the REST API directly, the HTTP status -code is 400 (Bad Request). -""") + /** + * The default value is 15 minutes. The minimum and maximum value are 5 minutes + * and 168 hours respectively. If you specify a value less than 5 minutes or + * greater than 168 hours, the Batch service rejects the request with an invalid + * property value error; if you are calling the REST API directly, the HTTP status + * code is 400 (Bad Request). + */ autoScaleEvaluationInterval?: duration; - @doc(""" -Enabling inter-node communication limits the maximum size of the Pool due to -deployment restrictions on the Compute Nodes of the Pool. This may result in -the Pool not reaching its desired size. The default value is false. -""") + /** + * Enabling inter-node communication limits the maximum size of the Pool due to + * deployment restrictions on the Compute Nodes of the Pool. This may result in + * the Pool not reaching its desired size. The default value is false. + */ enableInterNodeCommunication?: boolean; - @doc("The network configuration for a Pool.") + /** + * The network configuration for a Pool. + */ networkConfiguration?: NetworkConfiguration; - @doc(""" -Batch will retry Tasks when a recovery operation is triggered on a Node. -Examples of recovery operations include (but are not limited to) when an -unhealthy Node is rebooted or a Compute Node disappeared due to host failure. -Retries due to recovery operations are independent of and are not counted -against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal -retry due to a recovery operation may occur. Because of this, all Tasks should -be idempotent. This means Tasks need to tolerate being interrupted and -restarted without causing any corruption or duplicate data. The best practice -for long running Tasks is to use some form of checkpointing. In some cases the -StartTask may be re-run even though the Compute Node was not rebooted. Special -care should be taken to avoid StartTasks which create breakaway process or -install/launch services from the StartTask working directory, as this will -block Batch from being able to re-run the StartTask. -""") + /** + * Batch will retry Tasks when a recovery operation is triggered on a Node. + * Examples of recovery operations include (but are not limited to) when an + * unhealthy Node is rebooted or a Compute Node disappeared due to host failure. + * Retries due to recovery operations are independent of and are not counted + * against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal + * retry due to a recovery operation may occur. Because of this, all Tasks should + * be idempotent. This means Tasks need to tolerate being interrupted and + * restarted without causing any corruption or duplicate data. The best practice + * for long running Tasks is to use some form of checkpointing. In some cases the + * StartTask may be re-run even though the Compute Node was not rebooted. Special + * care should be taken to avoid StartTasks which create breakaway process or + * install/launch services from the StartTask working directory, as this will + * block Batch from being able to re-run the StartTask. + */ startTask?: StartTask; - @doc(""" -For Windows Nodes, the Batch service installs the Certificates to the specified -Certificate store and location. For Linux Compute Nodes, the Certificates are -stored in a directory inside the Task working directory and an environment -variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this -location. For Certificates with visibility of 'remoteUser', a 'certs' directory -is created in the user's home directory (e.g., /home/{user-name}/certs) and -Certificates are placed in that directory. -""") + /** + * For Windows Nodes, the Batch service installs the Certificates to the specified + * Certificate store and location. For Linux Compute Nodes, the Certificates are + * stored in a directory inside the Task working directory and an environment + * variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this + * location. For Certificates with visibility of 'remoteUser', a 'certs' directory + * is created in the user's home directory (e.g., /home/{user-name}/certs) and + * Certificates are placed in that directory. + */ certificateReferences?: CertificateReference[]; - @doc(""" -Changes to Package references affect all new Nodes joining the Pool, but do not -affect Compute Nodes that are already in the Pool until they are rebooted or -reimaged. There is a maximum of 10 Package references on any given Pool. -""") + /** + * Changes to Package references affect all new Nodes joining the Pool, but do not + * affect Compute Nodes that are already in the Pool until they are rebooted or + * reimaged. There is a maximum of 10 Package references on any given Pool. + */ applicationPackageReferences?: ApplicationPackageReference[]; - @doc(""" -The list of application licenses must be a subset of available Batch service -application licenses. If a license is requested which is not supported, Pool -creation will fail. The permitted licenses available on the Pool are 'maya', -'vray', '3dsmax', 'arnold'. An additional charge applies for each application -license added to the Pool. -""") + /** + * The list of application licenses must be a subset of available Batch service + * application licenses. If a license is requested which is not supported, Pool + * creation will fail. The permitted licenses available on the Pool are 'maya', + * 'vray', '3dsmax', 'arnold'. An additional charge applies for each application + * license added to the Pool. + */ applicationLicenses?: string[]; - @doc("The list of user Accounts to be created on each Compute Node in the Pool.") + /** + * The list of user Accounts to be created on each Compute Node in the Pool. + */ userAccounts?: UserAccount[]; - @doc(""" -The Batch service does not assign any meaning to metadata; it is solely for the -use of user code. -""") + /** + * The Batch service does not assign any meaning to metadata; it is solely for the + * use of user code. + */ metadata?: MetadataItem[]; - @doc("This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.") + /** + * This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + */ mountConfiguration?: MountConfiguration[]; } -@doc(""" -The configuration for Compute Nodes in a Pool based on the Azure Cloud Services -platform. -""") +/** + * The configuration for Compute Nodes in a Pool based on the Azure Cloud Services + * platform. + */ model CloudServiceConfiguration { - @doc(""" -Possible values are: + /** +* Possible values are: 2 - OS Family 2, equivalent to Windows Server 2008 R2 -SP1. +* SP1. 3 - OS Family 3, equivalent to Windows Server 2012. 4 - OS Family 4, -equivalent to Windows Server 2012 R2. +* equivalent to Windows Server 2012 R2. 5 - OS Family 5, equivalent to Windows -Server 2016. +* Server 2016. 6 - OS Family 6, equivalent to Windows Server 2019. For more -information, see Azure Guest OS Releases -(https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). -""") +* information, see Azure Guest OS Releases +* (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). +*/ osFamily: string; - @doc(""" -The default value is * which specifies the latest operating system version for -the specified OS family. -""") + /** + * The default value is * which specifies the latest operating system version for + * the specified OS family. + */ osVersion?: string; } -@doc(""" -The configuration for Compute Nodes in a Pool based on the Azure Virtual -Machines infrastructure. -""") +/** + * The configuration for Compute Nodes in a Pool based on the Azure Virtual + * Machines infrastructure. + */ model VirtualMachineConfiguration { - @doc(""" -A reference to an Azure Virtual Machines Marketplace Image or a Shared Image -Gallery Image. To get the list of all Azure Marketplace Image references -verified by Azure Batch, see the 'List Supported Images' operation. -""") + /** + * A reference to an Azure Virtual Machines Marketplace Image or a Shared Image + * Gallery Image. To get the list of all Azure Marketplace Image references + * verified by Azure Batch, see the 'List Supported Images' operation. + */ imageReference: ImageReference; - @doc(""" -The Batch Compute Node agent is a program that runs on each Compute Node in the -Pool, and provides the command-and-control interface between the Compute Node -and the Batch service. There are different implementations of the Compute Node -agent, known as SKUs, for different operating systems. You must specify a -Compute Node agent SKU which matches the selected Image reference. To get the -list of supported Compute Node agent SKUs along with their list of verified -Image references, see the 'List supported Compute Node agent SKUs' operation. -""") + /** + * The Batch Compute Node agent is a program that runs on each Compute Node in the + * Pool, and provides the command-and-control interface between the Compute Node + * and the Batch service. There are different implementations of the Compute Node + * agent, known as SKUs, for different operating systems. You must specify a + * Compute Node agent SKU which matches the selected Image reference. To get the + * list of supported Compute Node agent SKUs along with their list of verified + * Image references, see the 'List supported Compute Node agent SKUs' operation. + */ nodeAgentSKUId: string; - @doc(""" -This property must not be specified if the imageReference property specifies a -Linux OS Image. -""") + /** + * This property must not be specified if the imageReference property specifies a + * Linux OS Image. + */ windowsConfiguration?: WindowsConfiguration; - @doc(""" -This property must be specified if the Compute Nodes in the Pool need to have -empty data disks attached to them. This cannot be updated. Each Compute Node -gets its own disk (the disk is not a file share). Existing disks cannot be -attached, each attached disk is empty. When the Compute Node is removed from -the Pool, the disk and all data associated with it is also deleted. The disk is -not formatted after being attached, it must be formatted before use - for more -information see -https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux -and -https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. -""") + /** + * This property must be specified if the Compute Nodes in the Pool need to have + * empty data disks attached to them. This cannot be updated. Each Compute Node + * gets its own disk (the disk is not a file share). Existing disks cannot be + * attached, each attached disk is empty. When the Compute Node is removed from + * the Pool, the disk and all data associated with it is also deleted. The disk is + * not formatted after being attached, it must be formatted before use - for more + * information see + * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/classic/attach-disk#initialize-a-new-data-disk-in-linux + * and + * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#add-an-empty-data-disk-to-a-virtual-machine. + */ dataDisks?: DataDisk[]; - @doc(""" -This only applies to Images that contain the Windows operating system, and -should only be used when you hold valid on-premises licenses for the Compute -Nodes which will be deployed. If omitted, no on-premises licensing discount is -applied. Values are: + /** +* This only applies to Images that contain the Windows operating system, and +* should only be used when you hold valid on-premises licenses for the Compute +* Nodes which will be deployed. If omitted, no on-premises licensing discount is +* applied. Values are: Windows_Server - The on-premises license is for Windows -Server. +* Server. Windows_Client - The on-premises license is for Windows Client. -""") +*/ licenseType?: string; - @doc(""" -If specified, setup is performed on each Compute Node in the Pool to allow -Tasks to run in containers. All regular Tasks and Job manager Tasks run on this -Pool must specify the containerSettings property, and all other Tasks may -specify it. -""") + /** + * If specified, setup is performed on each Compute Node in the Pool to allow + * Tasks to run in containers. All regular Tasks and Job manager Tasks run on this + * Pool must specify the containerSettings property, and all other Tasks may + * specify it. + */ containerConfiguration?: ContainerConfiguration; - @doc(""" -If specified, encryption is performed on each node in the pool during node -provisioning. -""") + /** + * If specified, encryption is performed on each node in the pool during node + * provisioning. + */ diskEncryptionConfiguration?: DiskEncryptionConfiguration; - @doc(""" -This configuration will specify rules on how nodes in the pool will be -physically allocated. -""") + /** + * This configuration will specify rules on how nodes in the pool will be + * physically allocated. + */ nodePlacementConfiguration?: NodePlacementConfiguration; - @doc(""" -If specified, the extensions mentioned in this configuration will be installed -on each node. -""") + /** + * If specified, the extensions mentioned in this configuration will be installed + * on each node. + */ extensions?: VMExtension[]; - @doc("Settings for the operating system disk of the compute node (VM).") + /** + * Settings for the operating system disk of the compute node (VM). + */ osDisk?: OSDisk; } -@doc("Windows operating system settings to apply to the virtual machine.") +/** + * Windows operating system settings to apply to the virtual machine. + */ model WindowsConfiguration { - @doc("If omitted, the default value is true.") + /** + * If omitted, the default value is true. + */ enableAutomaticUpdates?: boolean; } -@doc(""" -Settings which will be used by the data disks associated to Compute Nodes in -the Pool. When using attached data disks, you need to mount and format the -disks from within a VM to use them. -""") +/** + * Settings which will be used by the data disks associated to Compute Nodes in + * the Pool. When using attached data disks, you need to mount and format the + * disks from within a VM to use them. + */ model DataDisk { - @doc(""" -The lun is used to uniquely identify each data disk. If attaching multiple -disks, each should have a distinct lun. The value must be between 0 and 63, -inclusive. -""") + /** + * The lun is used to uniquely identify each data disk. If attaching multiple + * disks, each should have a distinct lun. The value must be between 0 and 63, + * inclusive. + */ lun: int32; - @doc(""" -The default value for caching is readwrite. For information about the caching -options see: -https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. -""") + /** + * The default value for caching is readwrite. For information about the caching + * options see: + * https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. + */ caching?: CachingType; - @doc("The initial disk size in gigabytes.") + /** + * The initial disk size in gigabytes. + */ diskSizeGB: int32; - @doc("If omitted, the default is \"standard_lrs\".") + /** + * If omitted, the default is "standard_lrs". + */ storageAccountType?: StorageAccountType; } -@doc("The configuration for container-enabled Pools.") +/** + * The configuration for container-enabled Pools. + */ model ContainerConfiguration { - @doc("The container technology to be used.") + /** + * The container technology to be used. + */ type: "dockerCompatible"; - @doc(""" -This is the full Image reference, as would be specified to \"docker pull\". An -Image will be sourced from the default Docker registry unless the Image is -fully qualified with an alternative registry. -""") + /** + * This is the full Image reference, as would be specified to "docker pull". An + * Image will be sourced from the default Docker registry unless the Image is + * fully qualified with an alternative registry. + */ containerImageNames?: string[]; - @doc(""" -If any Images must be downloaded from a private registry which requires -credentials, then those credentials must be provided here. -""") + /** + * If any Images must be downloaded from a private registry which requires + * credentials, then those credentials must be provided here. + */ containerRegistries?: ContainerRegistry[]; } -@doc(""" -The disk encryption configuration applied on compute nodes in the pool. Disk -encryption configuration is not supported on Linux pool created with Shared -Image Gallery Image. -""") +/** + * The disk encryption configuration applied on compute nodes in the pool. Disk + * encryption configuration is not supported on Linux pool created with Shared + * Image Gallery Image. + */ model DiskEncryptionConfiguration { - @doc(""" -If omitted, no disks on the compute nodes in the pool will be encrypted. On -Linux pool, only \"TemporaryDisk\" is supported; on Windows pool, \"OsDisk\" -and \"TemporaryDisk\" must be specified. -""") + /** + * If omitted, no disks on the compute nodes in the pool will be encrypted. On + * Linux pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and + * "TemporaryDisk" must be specified. + */ targets?: DiskEncryptionTarget[]; } -@doc(""" -For regional placement, nodes in the pool will be allocated in the same region. -For zonal placement, nodes in the pool will be spread across different zones -with best effort balancing. -""") +/** + * For regional placement, nodes in the pool will be allocated in the same region. + * For zonal placement, nodes in the pool will be spread across different zones + * with best effort balancing. + */ model NodePlacementConfiguration { - @doc(""" -Allocation policy used by Batch Service to provision the nodes. If not -specified, Batch will use the regional policy. -""") + /** + * Allocation policy used by Batch Service to provision the nodes. If not + * specified, Batch will use the regional policy. + */ policy?: NodePlacementPolicyType; } -@doc("The configuration for virtual machine extensions.") +/** + * The configuration for virtual machine extensions. + */ model VMExtension { - @doc("The name of the virtual machine extension.") + /** + * The name of the virtual machine extension. + */ name: string; - @doc("The name of the extension handler publisher.") + /** + * The name of the extension handler publisher. + */ publisher: string; - @doc("The type of the extension.") + /** + * The type of the extension. + */ type: string; - @doc("The version of script handler.") + /** + * The version of script handler. + */ typeHandlerVersion?: string; - @doc(""" -Indicates whether the extension should use a newer minor version if one is -available at deployment time. Once deployed, however, the extension will not -upgrade minor versions unless redeployed, even with this property set to true. -""") + /** + * Indicates whether the extension should use a newer minor version if one is + * available at deployment time. Once deployed, however, the extension will not + * upgrade minor versions unless redeployed, even with this property set to true. + */ autoUpgradeMinorVersion?: boolean; - @doc("JSON formatted public settings for the extension.") + /** + * JSON formatted public settings for the extension. + */ settings?: Record; - @doc(""" -The extension can contain either protectedSettings or -protectedSettingsFromKeyVault or no protected settings at all. -""") + /** + * The extension can contain either protectedSettings or + * protectedSettingsFromKeyVault or no protected settings at all. + */ protectedSettings?: Record; - @doc(""" -Collection of extension names after which this extension needs to be -provisioned. -""") + /** + * Collection of extension names after which this extension needs to be + * provisioned. + */ provisionAfterExtensions?: string[]; } -@doc("Settings for the operating system disk of the compute node (VM).") +/** + * Settings for the operating system disk of the compute node (VM). + */ model OSDisk { - @doc(""" -Specifies the ephemeral Disk Settings for the operating system disk used by the -compute node (VM). -""") + /** + * Specifies the ephemeral Disk Settings for the operating system disk used by the + * compute node (VM). + */ ephemeralOSDiskSettings?: DiffDiskSettings; } -@doc(""" -Specifies the ephemeral Disk Settings for the operating system disk used by the -compute node (VM). -""") +/** + * Specifies the ephemeral Disk Settings for the operating system disk used by the + * compute node (VM). + */ model DiffDiskSettings { - @doc(""" -This property can be used by user in the request to choose the location e.g., -cache disk space for Ephemeral OS disk provisioning. For more information on -Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size -requirements for Windows VMs at -https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements -and Linux VMs at -https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. -""") + /** + * This property can be used by user in the request to choose the location e.g., + * cache disk space for Ephemeral OS disk provisioning. For more information on + * Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size + * requirements for Windows VMs at + * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements + * and Linux VMs at + * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. + */ placement?: "CacheDisk"; } -@doc("Specifies how Tasks should be distributed across Compute Nodes.") +/** + * Specifies how Tasks should be distributed across Compute Nodes. + */ model TaskSchedulingPolicy { - @doc("If not specified, the default is spread.") + /** + * If not specified, the default is spread. + */ nodeFillType: ComputeNodeFillType; } -@doc("The network configuration for a Pool.") +/** + * The network configuration for a Pool. + */ model NetworkConfiguration { - @doc(""" -The virtual network must be in the same region and subscription as the Azure -Batch Account. The specified subnet should have enough free IP addresses to -accommodate the number of Compute Nodes in the Pool. If the subnet doesn't have -enough free IP addresses, the Pool will partially allocate Nodes and a resize -error will occur. The 'MicrosoftAzureBatch' service principal must have the -'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for -the specified VNet. The specified subnet must allow communication from the -Azure Batch service to be able to schedule Tasks on the Nodes. This can be -verified by checking if the specified VNet has any associated Network Security -Groups (NSG). If communication to the Nodes in the specified subnet is denied -by an NSG, then the Batch service will set the state of the Compute Nodes to -unusable. For Pools created with virtualMachineConfiguration only ARM virtual -networks ('Microsoft.Network/virtualNetworks') are supported, but for Pools -created with cloudServiceConfiguration both ARM and classic virtual networks -are supported. If the specified VNet has any associated Network Security Groups -(NSG), then a few reserved system ports must be enabled for inbound -communication. For Pools created with a virtual machine configuration, enable -ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. -For Pools created with a cloud service configuration, enable ports 10100, -20100, and 30100. Also enable outbound connections to Azure Storage on port -443. For more details see: -https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration -""") + /** + * The virtual network must be in the same region and subscription as the Azure + * Batch Account. The specified subnet should have enough free IP addresses to + * accommodate the number of Compute Nodes in the Pool. If the subnet doesn't have + * enough free IP addresses, the Pool will partially allocate Nodes and a resize + * error will occur. The 'MicrosoftAzureBatch' service principal must have the + * 'Classic Virtual Machine Contributor' Role-Based Access Control (RBAC) role for + * the specified VNet. The specified subnet must allow communication from the + * Azure Batch service to be able to schedule Tasks on the Nodes. This can be + * verified by checking if the specified VNet has any associated Network Security + * Groups (NSG). If communication to the Nodes in the specified subnet is denied + * by an NSG, then the Batch service will set the state of the Compute Nodes to + * unusable. For Pools created with virtualMachineConfiguration only ARM virtual + * networks ('Microsoft.Network/virtualNetworks') are supported, but for Pools + * created with cloudServiceConfiguration both ARM and classic virtual networks + * are supported. If the specified VNet has any associated Network Security Groups + * (NSG), then a few reserved system ports must be enabled for inbound + * communication. For Pools created with a virtual machine configuration, enable + * ports 29876 and 29877, as well as port 22 for Linux and port 3389 for Windows. + * For Pools created with a cloud service configuration, enable ports 10100, + * 20100, and 30100. Also enable outbound connections to Azure Storage on port + * 443. For more details see: + * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration + */ subnetId?: string; - @doc("The scope of dynamic vnet assignment.") + /** + * The scope of dynamic vnet assignment. + */ dynamicVNetAssignmentScope?: DynamicVNetAssignmentScope; - @doc(""" -Pool endpoint configuration is only supported on Pools with the -virtualMachineConfiguration property. -""") + /** + * Pool endpoint configuration is only supported on Pools with the + * virtualMachineConfiguration property. + */ endpointConfiguration?: PoolEndpointConfiguration; - @doc(""" -Public IP configuration property is only supported on Pools with the -virtualMachineConfiguration property. -""") + /** + * Public IP configuration property is only supported on Pools with the + * virtualMachineConfiguration property. + */ publicIPAddressConfiguration?: PublicIPAddressConfiguration; } -@doc("The endpoint configuration for a Pool.") +/** + * The endpoint configuration for a Pool. + */ model PoolEndpointConfiguration { - @doc(""" -The maximum number of inbound NAT Pools per Batch Pool is 5. If the maximum -number of inbound NAT Pools is exceeded the request fails with HTTP status code -400. This cannot be specified if the IPAddressProvisioningType is -NoPublicIPAddresses. -""") + /** + * The maximum number of inbound NAT Pools per Batch Pool is 5. If the maximum + * number of inbound NAT Pools is exceeded the request fails with HTTP status code + * 400. This cannot be specified if the IPAddressProvisioningType is + * NoPublicIPAddresses. + */ inboundNATPools: InboundNATPool[]; } -@doc(""" -A inbound NAT Pool that can be used to address specific ports on Compute Nodes -in a Batch Pool externally. -""") +/** + * A inbound NAT Pool that can be used to address specific ports on Compute Nodes + * in a Batch Pool externally. + */ model InboundNATPool { - @doc(""" -The name must be unique within a Batch Pool, can contain letters, numbers, -underscores, periods, and hyphens. Names must start with a letter or number, -must end with a letter, number, or underscore, and cannot exceed 77 characters. - If any invalid values are provided the request fails with HTTP status code -400. -""") + /** + * The name must be unique within a Batch Pool, can contain letters, numbers, + * underscores, periods, and hyphens. Names must start with a letter or number, + * must end with a letter, number, or underscore, and cannot exceed 77 characters. + * If any invalid values are provided the request fails with HTTP status code + * 400. + */ name: string; - @doc("The protocol of the endpoint.") + /** + * The protocol of the endpoint. + */ protocol: InboundEndpointProtocol; - @doc(""" -This must be unique within a Batch Pool. Acceptable values are between 1 and -65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any -reserved values are provided the request fails with HTTP status code 400. -""") + /** + * This must be unique within a Batch Pool. Acceptable values are between 1 and + * 65535 except for 22, 3389, 29876 and 29877 as these are reserved. If any + * reserved values are provided the request fails with HTTP status code 400. + */ backendPort: int32; - @doc(""" -Acceptable values range between 1 and 65534 except ports from 50000 to 55000 -which are reserved. All ranges within a Pool must be distinct and cannot -overlap. Each range must contain at least 40 ports. If any reserved or -overlapping values are provided the request fails with HTTP status code 400. -""") + /** + * Acceptable values range between 1 and 65534 except ports from 50000 to 55000 + * which are reserved. All ranges within a Pool must be distinct and cannot + * overlap. Each range must contain at least 40 ports. If any reserved or + * overlapping values are provided the request fails with HTTP status code 400. + */ frontendPortRangeStart: int32; - @doc(""" -Acceptable values range between 1 and 65534 except ports from 50000 to 55000 -which are reserved by the Batch service. All ranges within a Pool must be -distinct and cannot overlap. Each range must contain at least 40 ports. If any -reserved or overlapping values are provided the request fails with HTTP status -code 400. -""") + /** + * Acceptable values range between 1 and 65534 except ports from 50000 to 55000 + * which are reserved by the Batch service. All ranges within a Pool must be + * distinct and cannot overlap. Each range must contain at least 40 ports. If any + * reserved or overlapping values are provided the request fails with HTTP status + * code 400. + */ frontendPortRangeEnd: int32; - @doc(""" -The maximum number of rules that can be specified across all the endpoints on a -Batch Pool is 25. If no network security group rules are specified, a default -rule will be created to allow inbound access to the specified backendPort. If -the maximum number of network security group rules is exceeded the request -fails with HTTP status code 400. -""") + /** + * The maximum number of rules that can be specified across all the endpoints on a + * Batch Pool is 25. If no network security group rules are specified, a default + * rule will be created to allow inbound access to the specified backendPort. If + * the maximum number of network security group rules is exceeded the request + * fails with HTTP status code 400. + */ networkSecurityGroupRules?: NetworkSecurityGroupRule[]; } -@doc("A network security group rule to apply to an inbound endpoint.") +/** + * A network security group rule to apply to an inbound endpoint. + */ model NetworkSecurityGroupRule { - @doc(""" -Priorities within a Pool must be unique and are evaluated in order of priority. -The lower the number the higher the priority. For example, rules could be -specified with order numbers of 150, 250, and 350. The rule with the order -number of 150 takes precedence over the rule that has an order of 250. Allowed -priorities are 150 to 4096. If any reserved or duplicate values are provided -the request fails with HTTP status code 400. -""") + /** + * Priorities within a Pool must be unique and are evaluated in order of priority. + * The lower the number the higher the priority. For example, rules could be + * specified with order numbers of 150, 250, and 350. The rule with the order + * number of 150 takes precedence over the rule that has an order of 250. Allowed + * priorities are 150 to 4096. If any reserved or duplicate values are provided + * the request fails with HTTP status code 400. + */ priority: int32; - @doc("The action that should be taken for a specified IP address, subnet range or tag.") + /** + * The action that should be taken for a specified IP address, subnet range or tag. + */ access: NetworkSecurityGroupRuleAccess; - @doc(""" -Valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. -192.168.1.0/24), default tag, or * (for all addresses). If any other values -are provided the request fails with HTTP status code 400. -""") + /** + * Valid values are a single IP address (i.e. 10.10.10.10), IP subnet (i.e. + * 192.168.1.0/24), default tag, or * (for all addresses). If any other values + * are provided the request fails with HTTP status code 400. + */ sourceAddressPrefix: string; - @doc(""" -Valid values are '*' (for all ports 0 - 65535), a specific port (i.e. 22), or a -port range (i.e. 100-200). The ports must be in the range of 0 to 65535. Each -entry in this collection must not overlap any other entry (either a range or an -individual port). If any other values are provided the request fails with HTTP -status code 400. The default value is '*'. -""") + /** + * Valid values are '*' (for all ports 0 - 65535), a specific port (i.e. 22), or a + * port range (i.e. 100-200). The ports must be in the range of 0 to 65535. Each + * entry in this collection must not overlap any other entry (either a range or an + * individual port). If any other values are provided the request fails with HTTP + * status code 400. The default value is '*'. + */ sourcePortRanges?: string[]; } -@doc("The public IP Address configuration of the networking configuration of a Pool.") +/** + * The public IP Address configuration of the networking configuration of a Pool. + */ model PublicIPAddressConfiguration { - @doc("The default value is BatchManaged.") + /** + * The default value is BatchManaged. + */ provision?: IPAddressProvisioningType; - @doc(""" -The number of IPs specified here limits the maximum size of the Pool - 100 -dedicated nodes or 100 Spot/Low-priority nodes can be allocated for each public -IP. For example, a pool needing 250 dedicated VMs would need at least 3 public -IPs specified. Each element of this collection is of the form: -/subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. -""") + /** + * The number of IPs specified here limits the maximum size of the Pool - 100 + * dedicated nodes or 100 Spot/Low-priority nodes can be allocated for each public + * IP. For example, a pool needing 250 dedicated VMs would need at least 3 public + * IPs specified. Each element of this collection is of the form: + * /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. + */ ipAddressIds?: string[]; } -@doc(""" -Batch will retry Tasks when a recovery operation is triggered on a Node. -Examples of recovery operations include (but are not limited to) when an -unhealthy Node is rebooted or a Compute Node disappeared due to host failure. -Retries due to recovery operations are independent of and are not counted -against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal -retry due to a recovery operation may occur. Because of this, all Tasks should -be idempotent. This means Tasks need to tolerate being interrupted and -restarted without causing any corruption or duplicate data. The best practice -for long running Tasks is to use some form of checkpointing. In some cases the -StartTask may be re-run even though the Compute Node was not rebooted. Special -care should be taken to avoid StartTasks which create breakaway process or -install/launch services from the StartTask working directory, as this will -block Batch from being able to re-run the StartTask. -""") +/** + * Batch will retry Tasks when a recovery operation is triggered on a Node. + * Examples of recovery operations include (but are not limited to) when an + * unhealthy Node is rebooted or a Compute Node disappeared due to host failure. + * Retries due to recovery operations are independent of and are not counted + * against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal + * retry due to a recovery operation may occur. Because of this, all Tasks should + * be idempotent. This means Tasks need to tolerate being interrupted and + * restarted without causing any corruption or duplicate data. The best practice + * for long running Tasks is to use some form of checkpointing. In some cases the + * StartTask may be re-run even though the Compute Node was not rebooted. Special + * care should be taken to avoid StartTasks which create breakaway process or + * install/launch services from the StartTask working directory, as this will + * block Batch from being able to re-run the StartTask. + */ model StartTask { - @doc(""" -The command line does not run under a shell, and therefore cannot take -advantage of shell features such as environment variable expansion. If you want -to take advantage of such features, you should invoke the shell in the command -line, for example using \"cmd /c MyCommand\" in Windows or \"/bin/sh -c -MyCommand\" in Linux. If the command line refers to file paths, it should use a -relative path (relative to the Task working directory), or use the Batch -provided environment variable -(https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). -""") + /** + * The command line does not run under a shell, and therefore cannot take + * advantage of shell features such as environment variable expansion. If you want + * to take advantage of such features, you should invoke the shell in the command + * line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" + * in Linux. If the command line refers to file paths, it should use a relative + * path (relative to the Task working directory), or use the Batch provided + * environment variable + * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + */ commandLine: string; - @doc(""" -When this is specified, all directories recursively below the -AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are -mapped into the container, all Task environment variables are mapped into the -container, and the Task command line is executed in the container. Files -produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be -reflected to the host disk, meaning that Batch file APIs will not be able to -access those files. -""") + /** + * When this is specified, all directories recursively below the + * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are + * mapped into the container, all Task environment variables are mapped into the + * container, and the Task command line is executed in the container. Files + * produced in the container outside of AZ_BATCH_NODE_ROOT_DIR might not be + * reflected to the host disk, meaning that Batch file APIs will not be able to + * access those files. + */ containerSettings?: TaskContainerSettings; - @doc("Files listed under this element are located in the Task's working directory.") + /** + * Files listed under this element are located in the Task's working directory. + */ resourceFiles?: ResourceFile[]; - @doc("A list of environment variable settings for the StartTask.") + /** + * A list of environment variable settings for the StartTask. + */ environmentSettings?: EnvironmentSetting[]; - @doc("If omitted, the Task runs as a non-administrative user unique to the Task.") + /** + * If omitted, the Task runs as a non-administrative user unique to the Task. + */ userIdentity?: UserIdentity; - @doc(""" -The Batch service retries a Task if its exit code is nonzero. Note that this -value specifically controls the number of retries. The Batch service will try -the Task once, and may then retry up to this limit. For example, if the maximum -retry count is 3, Batch tries the Task up to 4 times (one initial try and 3 -retries). If the maximum retry count is 0, the Batch service does not retry the -Task. If the maximum retry count is -1, the Batch service retries the Task -without limit, however this is not recommended for a start task or any task. -The default value is 0 (no retries) -""") + /** + * The Batch service retries a Task if its exit code is nonzero. Note that this + * value specifically controls the number of retries. The Batch service will try + * the Task once, and may then retry up to this limit. For example, if the maximum + * retry count is 3, Batch tries the Task up to 4 times (one initial try and 3 + * retries). If the maximum retry count is 0, the Batch service does not retry the + * Task. If the maximum retry count is -1, the Batch service retries the Task + * without limit, however this is not recommended for a start task or any task. + * The default value is 0 (no retries) + */ maxTaskRetryCount?: int32; - @doc(""" -If true and the StartTask fails on a Node, the Batch service retries the -StartTask up to its maximum retry count (maxTaskRetryCount). If the Task has -still not completed successfully after all retries, then the Batch service -marks the Node unusable, and will not schedule Tasks to it. This condition can -be detected via the Compute Node state and failure info details. If false, the -Batch service will not wait for the StartTask to complete. In this case, other -Tasks can start executing on the Compute Node while the StartTask is still -running; and even if the StartTask fails, new Tasks will continue to be -scheduled on the Compute Node. The default is true. -""") + /** + * If true and the StartTask fails on a Node, the Batch service retries the + * StartTask up to its maximum retry count (maxTaskRetryCount). If the Task has + * still not completed successfully after all retries, then the Batch service + * marks the Node unusable, and will not schedule Tasks to it. This condition can + * be detected via the Compute Node state and failure info details. If false, the + * Batch service will not wait for the StartTask to complete. In this case, other + * Tasks can start executing on the Compute Node while the StartTask is still + * running; and even if the StartTask fails, new Tasks will continue to be + * scheduled on the Compute Node. The default is true. + */ waitForSuccess?: boolean; } -@doc("A reference to a Certificate to be installed on Compute Nodes in a Pool.") +/** + * A reference to a Certificate to be installed on Compute Nodes in a Pool. + */ model CertificateReference { - @doc("The thumbprint of the Certificate.") + /** + * The thumbprint of the Certificate. + */ thumbprint: string; - @doc("The algorithm with which the thumbprint is associated. This must be sha1.") + /** + * The algorithm with which the thumbprint is associated. This must be sha1. + */ thumbprintAlgorithm: string; - @doc(""" -The default value is currentuser. This property is applicable only for Pools -configured with Windows Compute Nodes (that is, created with -cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows -Image reference). For Linux Compute Nodes, the Certificates are stored in a -directory inside the Task working directory and an environment variable -AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. -For Certificates with visibility of 'remoteUser', a 'certs' directory is -created in the user's home directory (e.g., /home/{user-name}/certs) and -Certificates are placed in that directory. -""") + /** + * The default value is currentuser. This property is applicable only for Pools + * configured with Windows Compute Nodes (that is, created with + * cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows + * Image reference). For Linux Compute Nodes, the Certificates are stored in a + * directory inside the Task working directory and an environment variable + * AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. + * For Certificates with visibility of 'remoteUser', a 'certs' directory is + * created in the user's home directory (e.g., /home/{user-name}/certs) and + * Certificates are placed in that directory. + */ storeLocation?: CertificateStoreLocation; - @doc(""" -This property is applicable only for Pools configured with Windows Compute -Nodes (that is, created with cloudServiceConfiguration, or with -virtualMachineConfiguration using a Windows Image reference). Common store -names include: My, Root, CA, Trust, Disallowed, TrustedPeople, -TrustedPublisher, AuthRoot, AddressBook, but any custom store name can also be -used. The default value is My. -""") + /** + * This property is applicable only for Pools configured with Windows Compute + * Nodes (that is, created with cloudServiceConfiguration, or with + * virtualMachineConfiguration using a Windows Image reference). Common store + * names include: My, Root, CA, Trust, Disallowed, TrustedPeople, + * TrustedPublisher, AuthRoot, AddressBook, but any custom store name can also be + * used. The default value is My. + */ storeName?: string; - @doc(""" -You can specify more than one visibility in this collection. The default is all -Accounts. -""") + /** + * You can specify more than one visibility in this collection. The default is all + * Accounts. + */ visibility?: CertificateVisibility[]; } -@doc(""" -Properties used to create a user used to execute Tasks on an Azure Batch -Compute Node. -""") +/** + * Properties used to create a user used to execute Tasks on an Azure Batch + * Compute Node. + */ model UserAccount { - @doc("The name of the user Account.") + /** + * The name of the user Account. + */ name: string; - @doc("The password for the user Account.") + /** + * The password for the user Account. + */ password: string; - @doc("The default value is nonAdmin.") + /** + * The default value is nonAdmin. + */ elevationLevel?: ElevationLevel; - @doc(""" -This property is ignored if specified on a Windows Pool. If not specified, the -user is created with the default options. -""") + /** + * This property is ignored if specified on a Windows Pool. If not specified, the + * user is created with the default options. + */ linuxUserConfiguration?: LinuxUserConfiguration; - @doc(""" -This property can only be specified if the user is on a Windows Pool. If not -specified and on a Windows Pool, the user is created with the default options. -""") + /** + * This property can only be specified if the user is on a Windows Pool. If not + * specified and on a Windows Pool, the user is created with the default options. + */ windowsUserConfiguration?: WindowsUserConfiguration; } -@doc("Properties used to create a user Account on a Linux Compute Node.") +/** + * Properties used to create a user Account on a Linux Compute Node. + */ model LinuxUserConfiguration { - @doc(""" -The uid and gid properties must be specified together or not at all. If not -specified the underlying operating system picks the uid. -""") + /** + * The uid and gid properties must be specified together or not at all. If not + * specified the underlying operating system picks the uid. + */ uid?: int32; - @doc(""" -The uid and gid properties must be specified together or not at all. If not -specified the underlying operating system picks the gid. -""") + /** + * The uid and gid properties must be specified together or not at all. If not + * specified the underlying operating system picks the gid. + */ gid?: int32; - @doc(""" -The private key must not be password protected. The private key is used to -automatically configure asymmetric-key based authentication for SSH between -Compute Nodes in a Linux Pool when the Pool's enableInterNodeCommunication -property is true (it is ignored if enableInterNodeCommunication is false). It -does this by placing the key pair into the user's .ssh directory. If not -specified, password-less SSH is not configured between Compute Nodes (no -modification of the user's .ssh directory is done). -""") + /** + * The private key must not be password protected. The private key is used to + * automatically configure asymmetric-key based authentication for SSH between + * Compute Nodes in a Linux Pool when the Pool's enableInterNodeCommunication + * property is true (it is ignored if enableInterNodeCommunication is false). It + * does this by placing the key pair into the user's .ssh directory. If not + * specified, password-less SSH is not configured between Compute Nodes (no + * modification of the user's .ssh directory is done). + */ sshPrivateKey?: string; } -@doc("Properties used to create a user Account on a Windows Compute Node.") +/** + * Properties used to create a user Account on a Windows Compute Node. + */ model WindowsUserConfiguration { - @doc(""" -The default value for VirtualMachineConfiguration Pools is 'batch' and for -CloudServiceConfiguration Pools is 'interactive'. -""") + /** + * The default value for VirtualMachineConfiguration Pools is 'batch' and for + * CloudServiceConfiguration Pools is 'interactive'. + */ loginMode?: LoginMode; } -@doc(""" -The Batch service does not assign any meaning to this metadata; it is solely -for the use of user code. -""") +/** + * The Batch service does not assign any meaning to this metadata; it is solely + * for the use of user code. + */ model MetadataItem { - @doc("The name of the metadata item.") + /** + * The name of the metadata item. + */ name: string; - @doc("The value of the metadata item.") + /** + * The value of the metadata item. + */ value: string; } -@doc("The file system to mount on each node.") +/** + * The file system to mount on each node. + */ model MountConfiguration { - @doc("This property is mutually exclusive with all other properties.") + /** + * This property is mutually exclusive with all other properties. + */ azureBlobFileSystemConfiguration?: AzureBlobFileSystemConfiguration; - @doc("This property is mutually exclusive with all other properties.") + /** + * This property is mutually exclusive with all other properties. + */ nfsMountConfiguration?: NFSMountConfiguration; - @doc("This property is mutually exclusive with all other properties.") + /** + * This property is mutually exclusive with all other properties. + */ cifsMountConfiguration?: CifsMountConfiguration; - @doc("This property is mutually exclusive with all other properties.") + /** + * This property is mutually exclusive with all other properties. + */ azureFileShareConfiguration?: AzureFileShareConfiguration; } -@doc("Information used to connect to an Azure Storage Container using Blobfuse.") +/** + * Information used to connect to an Azure Storage Container using Blobfuse. + */ model AzureBlobFileSystemConfiguration { - @doc("The Azure Storage Account name.") + /** + * The Azure Storage Account name. + */ accountName: string; - @doc("The Azure Blob Storage Container name.") + /** + * The Azure Blob Storage Container name. + */ containerName: string; - @doc(""" -This property is mutually exclusive with both sasKey and identity; exactly one -must be specified. -""") + /** + * This property is mutually exclusive with both sasKey and identity; exactly one + * must be specified. + */ accountKey?: string; - @doc(""" -This property is mutually exclusive with both accountKey and identity; exactly -one must be specified. -""") + /** + * This property is mutually exclusive with both accountKey and identity; exactly + * one must be specified. + */ sasKey?: string; - @doc("These are 'net use' options in Windows and 'mount' options in Linux.") + /** + * These are 'net use' options in Windows and 'mount' options in Linux. + */ blobfuseOptions?: string; - @doc(""" -All file systems are mounted relative to the Batch mounts directory, accessible -via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. -""") + /** + * All file systems are mounted relative to the Batch mounts directory, accessible + * via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + */ relativeMountPath: string; - @doc(""" -This property is mutually exclusive with both accountKey and sasKey; exactly -one must be specified. -""") + /** + * This property is mutually exclusive with both accountKey and sasKey; exactly + * one must be specified. + */ identityReference?: ComputeNodeIdentityReference; } -@doc("Information used to connect to an NFS file system.") +/** + * Information used to connect to an NFS file system. + */ model NFSMountConfiguration { - @doc("The URI of the file system to mount.") + /** + * The URI of the file system to mount. + */ source: string; - @doc(""" -All file systems are mounted relative to the Batch mounts directory, accessible -via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. -""") + /** + * All file systems are mounted relative to the Batch mounts directory, accessible + * via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + */ relativeMountPath: string; - @doc("These are 'net use' options in Windows and 'mount' options in Linux.") + /** + * These are 'net use' options in Windows and 'mount' options in Linux. + */ mountOptions?: string; } -@doc("Information used to connect to a CIFS file system.") +/** + * Information used to connect to a CIFS file system. + */ model CifsMountConfiguration { - @doc("The user to use for authentication against the CIFS file system.") + /** + * The user to use for authentication against the CIFS file system. + */ username: string; - @doc("The URI of the file system to mount.") + /** + * The URI of the file system to mount. + */ source: string; - @doc(""" -All file systems are mounted relative to the Batch mounts directory, accessible -via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. -""") + /** + * All file systems are mounted relative to the Batch mounts directory, accessible + * via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + */ relativeMountPath: string; - @doc("These are 'net use' options in Windows and 'mount' options in Linux.") + /** + * These are 'net use' options in Windows and 'mount' options in Linux. + */ mountOptions?: string; - @doc("The password to use for authentication against the CIFS file system.") + /** + * The password to use for authentication against the CIFS file system. + */ password: string; } -@doc("Information used to connect to an Azure Fileshare.") +/** + * Information used to connect to an Azure Fileshare. + */ model AzureFileShareConfiguration { - @doc("The Azure Storage account name.") + /** + * The Azure Storage account name. + */ accountName: string; - @doc("This is of the form 'https://{account}.file.core.windows.net/'.") + /** + * This is of the form 'https://{account}.file.core.windows.net/'. + */ azureFileUrl: string; - @doc("The Azure Storage account key.") + /** + * The Azure Storage account key. + */ accountKey: string; - @doc(""" -All file systems are mounted relative to the Batch mounts directory, accessible -via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. -""") + /** + * All file systems are mounted relative to the Batch mounts directory, accessible + * via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + */ relativeMountPath: string; - @doc("These are 'net use' options in Windows and 'mount' options in Linux.") + /** + * These are 'net use' options in Windows and 'mount' options in Linux. + */ mountOptions?: string; } -@doc(""" -Contains information about Jobs that have been and will be run under a Job -Schedule. -""") +/** + * Contains information about Jobs that have been and will be run under a Job + * Schedule. + */ model JobScheduleExecutionInformation { - @doc(""" -This property is meaningful only if the schedule is in the active state when -the time comes around. For example, if the schedule is disabled, no Job will be -created at nextRunTime unless the Job is enabled before then. -""") + /** + * This property is meaningful only if the schedule is in the active state when + * the time comes around. For example, if the schedule is disabled, no Job will be + * created at nextRunTime unless the Job is enabled before then. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. nextRunTime?: utcDateTime; - @doc(""" -This property is present only if the at least one Job has run under the -schedule. -""") + /** + * This property is present only if the at least one Job has run under the + * schedule. + */ recentJob?: RecentJob; - @doc("This property is set only if the Job Schedule is in the completed state.") + /** + * This property is set only if the Job Schedule is in the completed state. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime?: utcDateTime; } -@doc("Information about the most recent Job to run under the Job Schedule.") +/** + * Information about the most recent Job to run under the Job Schedule. + */ model RecentJob { - @doc("The ID of the Job.") + /** + * The ID of the Job. + */ id?: string; - @doc("The URL of the Job.") + /** + * The URL of the Job. + */ url?: string; } -@doc("Resource usage statistics for a Job Schedule.") +/** + * Resource usage statistics for a Job Schedule. + */ model JobScheduleStatistics { - @doc("The URL of the statistics.") + /** + * The URL of the statistics. + */ url: string; - @doc("The start time of the time range covered by the statistics.") + /** + * The start time of the time range covered by the statistics. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime: utcDateTime; - @doc(""" -The time at which the statistics were last updated. All statistics are limited -to the range between startTime and lastUpdateTime. -""") + /** + * The time at which the statistics were last updated. All statistics are limited + * to the range between startTime and lastUpdateTime. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdateTime: utcDateTime; - @doc(""" -The total user mode CPU time (summed across all cores and all Compute Nodes) -consumed by all Tasks in all Jobs created under the schedule. -""") + /** + * The total user mode CPU time (summed across all cores and all Compute Nodes) + * consumed by all Tasks in all Jobs created under the schedule. + */ userCPUTime: duration; - @doc(""" -The total kernel mode CPU time (summed across all cores and all Compute Nodes) -consumed by all Tasks in all Jobs created under the schedule. -""") + /** + * The total kernel mode CPU time (summed across all cores and all Compute Nodes) + * consumed by all Tasks in all Jobs created under the schedule. + */ kernelCPUTime: duration; - @doc(""" -The wall clock time is the elapsed time from when the Task started running on a -Compute Node to when it finished (or to the last time the statistics were -updated, if the Task had not finished by then). If a Task was retried, this -includes the wall clock time of all the Task retries. -""") + /** + * The wall clock time is the elapsed time from when the Task started running on a + * Compute Node to when it finished (or to the last time the statistics were + * updated, if the Task had not finished by then). If a Task was retried, this + * includes the wall clock time of all the Task retries. + */ wallClockTime: duration; - @doc(""" -The total number of disk read operations made by all Tasks in all Jobs created -under the schedule. -""") - readIOps: int32; - - @doc(""" -The total number of disk write operations made by all Tasks in all Jobs created -under the schedule. -""") - writeIOps: int32; - - @doc(""" -The total gibibytes read from disk by all Tasks in all Jobs created under the -schedule. -""") - readIOGiB: float32; - - @doc(""" -The total gibibytes written to disk by all Tasks in all Jobs created under the -schedule. -""") - writeIOGiB: float32; - - @doc(""" -The total number of Tasks successfully completed during the given time range in -Jobs created under the schedule. A Task completes successfully if it returns -exit code 0. -""") - numSucceededTasks: int32; - - @doc(""" -The total number of Tasks that failed during the given time range in Jobs -created under the schedule. A Task fails if it exhausts its maximum retry count -without returning exit code 0. -""") - numFailedTasks: int32; - - @doc(""" -The total number of retries during the given time range on all Tasks in all -Jobs created under the schedule. -""") - numTaskRetries: int32; - - @doc(""" -This value is only reported in the Account lifetime statistics; it is not -included in the Job statistics. -""") + /** + * The total number of disk read operations made by all Tasks in all Jobs created + * under the schedule. + */ + readIOps: int64; + + /** + * The total number of disk write operations made by all Tasks in all Jobs created + * under the schedule. + */ + writeIOps: int64; + + /** + * The total gibibytes read from disk by all Tasks in all Jobs created under the + * schedule. + */ + readIOGiB: float64; + + /** + * The total gibibytes written to disk by all Tasks in all Jobs created under the + * schedule. + */ + writeIOGiB: float64; + + /** + * The total number of Tasks successfully completed during the given time range in + * Jobs created under the schedule. A Task completes successfully if it returns + * exit code 0. + */ + numSucceededTasks: int64; + + /** + * The total number of Tasks that failed during the given time range in Jobs + * created under the schedule. A Task fails if it exhausts its maximum retry count + * without returning exit code 0. + */ + numFailedTasks: int64; + + /** + * The total number of retries during the given time range on all Tasks in all + * Jobs created under the schedule. + */ + numTaskRetries: int64; + + /** + * This value is only reported in the Account lifetime statistics; it is not + * included in the Job statistics. + */ waitTime: duration; } -@doc("The set of changes to be made to a Job Schedule.") +/** + * The set of changes to be made to a Job Schedule. + */ model BatchJobScheduleUpdate { - @doc(""" -All times are fixed respective to UTC and are not impacted by daylight saving -time. If you do not specify this element, the existing schedule is left -unchanged. -""") + /** + * All times are fixed respective to UTC and are not impacted by daylight saving + * time. If you do not specify this element, the existing schedule is left + * unchanged. + */ schedule?: Schedule; - @doc(""" -Updates affect only Jobs that are started after the update has taken place. Any -currently active Job continues with the older specification. -""") + /** + * Updates affect only Jobs that are started after the update has taken place. Any + * currently active Job continues with the older specification. + */ jobSpecification?: JobSpecification; - @doc("If you do not specify this element, existing metadata is left unchanged.") + /** + * If you do not specify this element, existing metadata is left unchanged. + */ metadata?: MetadataItem[]; } -@doc("The result of listing the Job Schedules in an Account.") +/** + * The result of listing the Job Schedules in an Account. + */ @pagedResult model BatchJobScheduleListResult { - @doc("The list of Job Schedules.") + /** + * The list of Job Schedules. + */ @items value?: BatchJobSchedule[]; - @doc("The URL to get the next set of results.") + /** + * The URL to get the next set of results. + */ @nextLink @projectedName("json", "odata.nextLink") odataNextLink?: string; } -@doc("An Azure Batch Job.") +/** + * An Azure Batch Job. + */ model BatchJob { - @doc(""" -The ID is case-preserving and case-insensitive (that is, you may not have two -IDs within an Account that differ only by case). -""") + /** + * The ID is case-preserving and case-insensitive (that is, you may not have two + * IDs within an Account that differ only by case). + */ @visibility("read", "create") id?: string; - @doc("The display name for the Job.") + /** + * The display name for the Job. + */ @visibility("read", "create") displayName?: string; - @doc(""" -Whether Tasks in the Job can define dependencies on each other. The default is -false. -""") + /** + * Whether Tasks in the Job can define dependencies on each other. The default is + * false. + */ @visibility("read", "create") usesTaskDependencies?: boolean; - @doc("The URL of the Job.") + /** + * The URL of the Job. + */ @visibility("read") url?: string; - @doc(""" -This is an opaque string. You can use it to detect whether the Job has changed -between requests. In particular, you can be pass the ETag when updating a Job -to specify that your changes should take effect only if nobody else has -modified the Job in the meantime. -""") + /** + * This is an opaque string. You can use it to detect whether the Job has changed + * between requests. In particular, you can be pass the ETag when updating a Job + * to specify that your changes should take effect only if nobody else has + * modified the Job in the meantime. + */ @visibility("read") eTag?: string; - @doc(""" -This is the last time at which the Job level data, such as the Job state or -priority, changed. It does not factor in task-level changes such as adding new -Tasks or Tasks changing state. -""") + /** + * This is the last time at which the Job level data, such as the Job state or + * priority, changed. It does not factor in task-level changes such as adding new + * Tasks or Tasks changing state. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModified?: utcDateTime; - @doc("The creation time of the Job.") + /** + * The creation time of the Job. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. creationTime?: utcDateTime; - @doc("The state of the Job.") + /** + * The state of the Job. + */ @visibility("read") state?: JobState; - @doc("The time at which the Job entered its current state.") + /** + * The time at which the Job entered its current state. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. stateTransitionTime?: utcDateTime; - @doc("This property is not set if the Job is in its initial Active state.") + /** + * This property is not set if the Job is in its initial Active state. + */ @visibility("read") previousState?: JobState; - @doc("This property is not set if the Job is in its initial Active state.") + /** + * This property is not set if the Job is in its initial Active state. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. previousStateTransitionTime?: utcDateTime; - @doc(""" -Priority values can range from -1000 to 1000, with -1000 being the lowest -priority and 1000 being the highest priority. The default value is 0. -""") + /** + * Priority values can range from -1000 to 1000, with -1000 being the lowest + * priority and 1000 being the highest priority. The default value is 0. + */ priority?: int32; - @doc(""" -If the value is set to True, other high priority jobs submitted to the system -will take precedence and will be able requeue tasks from this job. You can -update a job's allowTaskPreemption after it has been created using the update -job API. -""") + /** + * If the value is set to True, other high priority jobs submitted to the system + * will take precedence and will be able requeue tasks from this job. You can + * update a job's allowTaskPreemption after it has been created using the update + * job API. + */ allowTaskPreemption?: boolean; - @doc(""" -The value of maxParallelTasks must be -1 or greater than 0 if specified. If not -specified, the default value is -1, which means there's no limit to the number -of tasks that can be run at once. You can update a job's maxParallelTasks after -it has been created using the update job API. -""") - maxParallelTasks?: int32; - - @doc("The execution constraints for a Job.") + /** + * The value of maxParallelTasks must be -1 or greater than 0 if specified. If not + * specified, the default value is -1, which means there's no limit to the number + * of tasks that can be run at once. You can update a job's maxParallelTasks after + * it has been created using the update job API. + */ + maxParallelTasks?: int32 = -1; + + /** + * The execution constraints for a Job. + */ constraints?: JobConstraints; - @doc(""" -The Job Manager Task is automatically started when the Job is created. The -Batch service tries to schedule the Job Manager Task before any other Tasks in -the Job. When shrinking a Pool, the Batch service tries to preserve Nodes where -Job Manager Tasks are running for as long as possible (that is, Compute Nodes -running 'normal' Tasks are removed before Compute Nodes running Job Manager -Tasks). When a Job Manager Task fails and needs to be restarted, the system -tries to schedule it at the highest priority. If there are no idle Compute -Nodes available, the system may terminate one of the running Tasks in the Pool -and return it to the queue in order to make room for the Job Manager Task to -restart. Note that a Job Manager Task in one Job does not have priority over -Tasks in other Jobs. Across Jobs, only Job level priorities are observed. For -example, if a Job Manager in a priority 0 Job needs to be restarted, it will -not displace Tasks of a priority 1 Job. Batch will retry Tasks when a recovery -operation is triggered on a Node. Examples of recovery operations include (but -are not limited to) when an unhealthy Node is rebooted or a Compute Node -disappeared due to host failure. Retries due to recovery operations are -independent of and are not counted against the maxTaskRetryCount. Even if the -maxTaskRetryCount is 0, an internal retry due to a recovery operation may -occur. Because of this, all Tasks should be idempotent. This means Tasks need -to tolerate being interrupted and restarted without causing any corruption or -duplicate data. The best practice for long running Tasks is to use some form of -checkpointing. -""") + /** + * The Job Manager Task is automatically started when the Job is created. The + * Batch service tries to schedule the Job Manager Task before any other Tasks in + * the Job. When shrinking a Pool, the Batch service tries to preserve Nodes where + * Job Manager Tasks are running for as long as possible (that is, Compute Nodes + * running 'normal' Tasks are removed before Compute Nodes running Job Manager + * Tasks). When a Job Manager Task fails and needs to be restarted, the system + * tries to schedule it at the highest priority. If there are no idle Compute + * Nodes available, the system may terminate one of the running Tasks in the Pool + * and return it to the queue in order to make room for the Job Manager Task to + * restart. Note that a Job Manager Task in one Job does not have priority over + * Tasks in other Jobs. Across Jobs, only Job level priorities are observed. For + * example, if a Job Manager in a priority 0 Job needs to be restarted, it will + * not displace Tasks of a priority 1 Job. Batch will retry Tasks when a recovery + * operation is triggered on a Node. Examples of recovery operations include (but + * are not limited to) when an unhealthy Node is rebooted or a Compute Node + * disappeared due to host failure. Retries due to recovery operations are + * independent of and are not counted against the maxTaskRetryCount. Even if the + * maxTaskRetryCount is 0, an internal retry due to a recovery operation may + * occur. Because of this, all Tasks should be idempotent. This means Tasks need + * to tolerate being interrupted and restarted without causing any corruption or + * duplicate data. The best practice for long running Tasks is to use some form of + * checkpointing. + */ @visibility("read", "create") jobManagerTask?: JobManagerTask; - @doc(""" -The Job Preparation Task is a special Task run on each Compute Node before any -other Task of the Job. -""") + /** + * The Job Preparation Task is a special Task run on each Compute Node before any + * other Task of the Job. + */ @visibility("read", "create") jobPreparationTask?: JobPreparationTask; - @doc(""" -The Job Release Task is a special Task run at the end of the Job on each -Compute Node that has run any other Task of the Job. -""") + /** + * The Job Release Task is a special Task run at the end of the Job on each + * Compute Node that has run any other Task of the Job. + */ @visibility("read", "create") jobReleaseTask?: JobReleaseTask; - @doc(""" -Individual Tasks can override an environment setting specified here by -specifying the same setting name with a different value. -""") + /** + * Individual Tasks can override an environment setting specified here by + * specifying the same setting name with a different value. + */ @visibility("read", "create") commonEnvironmentSettings?: EnvironmentSetting[]; - @doc("Specifies how a Job should be assigned to a Pool.") + /** + * Specifies how a Job should be assigned to a Pool. + */ poolInfo?: PoolInformation; - @doc("The default is noaction.") + /** + * The default is noaction. + */ onAllTasksComplete?: OnAllTasksComplete; - @doc(""" -A Task is considered to have failed if has a failureInfo. A failureInfo is set -if the Task completes with a non-zero exit code after exhausting its retry -count, or if there was an error starting the Task, for example due to a -resource file download error. The default is noaction. -""") + /** + * A Task is considered to have failed if has a failureInfo. A failureInfo is set + * if the Task completes with a non-zero exit code after exhausting its retry + * count, or if there was an error starting the Task, for example due to a + * resource file download error. The default is noaction. + */ @visibility("read", "create") onTaskFailure?: OnTaskFailure; - @doc("The network configuration for the Job.") + /** + * The network configuration for the Job. + */ @visibility("read", "create") networkConfiguration?: JobNetworkConfiguration; - @doc(""" -The Batch service does not assign any meaning to metadata; it is solely for the -use of user code. -""") + /** + * The Batch service does not assign any meaning to metadata; it is solely for the + * use of user code. + */ metadata?: MetadataItem[]; - @doc("Contains information about the execution of a Job in the Azure Batch service.") + /** + * Contains information about the execution of a Job in the Azure Batch service. + */ @visibility("read") executionInfo?: JobExecutionInformation; - @doc(""" -This property is populated only if the CloudJob was retrieved with an expand -clause including the 'stats' attribute; otherwise it is null. The statistics -may not be immediately available. The Batch service performs periodic roll-up -of statistics. The typical delay is about 30 minutes. -""") + /** + * This property is populated only if the CloudJob was retrieved with an expand + * clause including the 'stats' attribute; otherwise it is null. The statistics + * may not be immediately available. The Batch service performs periodic roll-up + * of statistics. The typical delay is about 30 minutes. + */ @visibility("read") stats?: JobStatistics; } -@doc("Contains information about the execution of a Job in the Azure Batch service.") +/** + * Contains information about the execution of a Job in the Azure Batch service. + */ model JobExecutionInformation { - @doc("This is the time at which the Job was created.") + /** + * This is the time at which the Job was created. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime: utcDateTime; - @doc("This property is set only if the Job is in the completed state.") + /** + * This property is set only if the Job is in the completed state. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime?: utcDateTime; - @doc(""" -This element contains the actual Pool where the Job is assigned. When you get -Job details from the service, they also contain a poolInfo element, which -contains the Pool configuration data from when the Job was added or updated. -That poolInfo element may also contain a poolId element. If it does, the two -IDs are the same. If it does not, it means the Job ran on an auto Pool, and -this property contains the ID of that auto Pool. -""") + /** + * This element contains the actual Pool where the Job is assigned. When you get + * Job details from the service, they also contain a poolInfo element, which + * contains the Pool configuration data from when the Job was added or updated. + * That poolInfo element may also contain a poolId element. If it does, the two + * IDs are the same. If it does not, it means the Job ran on an auto Pool, and + * this property contains the ID of that auto Pool. + */ poolId?: string; - @doc("This property is not set if there was no error starting the Job.") + /** + * This property is not set if there was no error starting the Job. + */ schedulingError?: JobSchedulingError; - @doc(""" -This property is set only if the Job is in the completed state. If the Batch -service terminates the Job, it sets the reason as follows: JMComplete - the Job -Manager Task completed, and killJobOnCompletion was set to true. -MaxWallClockTimeExpiry - the Job reached its maxWallClockTime constraint. -TerminateJobSchedule - the Job ran as part of a schedule, and the schedule -terminated. AllTasksComplete - the Job's onAllTasksComplete attribute is set to -terminatejob, and all Tasks in the Job are complete. TaskFailed - the Job's -onTaskFailure attribute is set to performExitOptionsJobAction, and a Task in -the Job failed with an exit condition that specified a jobAction of -terminatejob. Any other string is a user-defined reason specified in a call to -the 'Terminate a Job' operation. -""") + /** + * This property is set only if the Job is in the completed state. If the Batch + * service terminates the Job, it sets the reason as follows: JMComplete - the Job + * Manager Task completed, and killJobOnCompletion was set to true. + * MaxWallClockTimeExpiry - the Job reached its maxWallClockTime constraint. + * TerminateJobSchedule - the Job ran as part of a schedule, and the schedule + * terminated. AllTasksComplete - the Job's onAllTasksComplete attribute is set to + * terminatejob, and all Tasks in the Job are complete. TaskFailed - the Job's + * onTaskFailure attribute is set to performExitOptionsJobAction, and a Task in + * the Job failed with an exit condition that specified a jobAction of + * terminatejob. Any other string is a user-defined reason specified in a call to + * the 'Terminate a Job' operation. + */ terminateReason?: string; } -@doc("An error encountered by the Batch service when scheduling a Job.") +/** + * An error encountered by the Batch service when scheduling a Job. + */ model JobSchedulingError { - @doc("The category of the error.") + /** + * The category of the error. + */ category: ErrorCategory; - @doc(""" -An identifier for the Job scheduling error. Codes are invariant and are -intended to be consumed programmatically. -""") + /** + * An identifier for the Job scheduling error. Codes are invariant and are + * intended to be consumed programmatically. + */ code?: string; - @doc(""" -A message describing the Job scheduling error, intended to be suitable for -display in a user interface. -""") + /** + * A message describing the Job scheduling error, intended to be suitable for + * display in a user interface. + */ message?: string; - @doc("A list of additional error details related to the scheduling error.") + /** + * A list of additional error details related to the scheduling error. + */ details?: NameValuePair[]; } -@doc("The set of changes to be made to a Job.") +/** + * The set of changes to be made to a Job. + */ model BatchJobUpdate { - @doc(""" -Priority values can range from -1000 to 1000, with -1000 being the lowest -priority and 1000 being the highest priority. If omitted, the priority of the -Job is left unchanged. -""") + /** + * Priority values can range from -1000 to 1000, with -1000 being the lowest + * priority and 1000 being the highest priority. If omitted, the priority of the + * Job is left unchanged. + */ priority?: int32; - @doc(""" -The value of maxParallelTasks must be -1 or greater than 0 if specified. If not -specified, the default value is -1, which means there's no limit to the number -of tasks that can be run at once. You can update a job's maxParallelTasks after -it has been created using the update job API. -""") + /** + * The value of maxParallelTasks must be -1 or greater than 0 if specified. If not + * specified, the default value is -1, which means there's no limit to the number + * of tasks that can be run at once. You can update a job's maxParallelTasks after + * it has been created using the update job API. + */ maxParallelTasks?: int32; - @doc(""" -If the value is set to True, other high priority jobs submitted to the system -will take precedence and will be able requeue tasks from this job. You can -update a job's allowTaskPreemption after it has been created using the update -job API. -""") + /** + * If the value is set to True, other high priority jobs submitted to the system + * will take precedence and will be able requeue tasks from this job. You can + * update a job's allowTaskPreemption after it has been created using the update + * job API. + */ allowTaskPreemption?: boolean; - @doc(""" -If omitted, the completion behavior is left unchanged. You may not change the -value from terminatejob to noaction - that is, once you have engaged automatic -Job termination, you cannot turn it off again. If you try to do this, the -request fails with an 'invalid property value' error response; if you are -calling the REST API directly, the HTTP status code is 400 (Bad Request). -""") + /** + * If omitted, the completion behavior is left unchanged. You may not change the + * value from terminatejob to noaction - that is, once you have engaged automatic + * Job termination, you cannot turn it off again. If you try to do this, the + * request fails with an 'invalid property value' error response; if you are + * calling the REST API directly, the HTTP status code is 400 (Bad Request). + */ onAllTasksComplete?: OnAllTasksComplete; - @doc("If omitted, the existing execution constraints are left unchanged.") + /** + * If omitted, the existing execution constraints are left unchanged. + */ constraints?: JobConstraints; - @doc(""" -You may change the Pool for a Job only when the Job is disabled. The Patch Job -call will fail if you include the poolInfo element and the Job is not disabled. -If you specify an autoPoolSpecification in the poolInfo, only the keepAlive -property of the autoPoolSpecification can be updated, and then only if the -autoPoolSpecification has a poolLifetimeOption of Job (other job properties can -be updated as normal). If omitted, the Job continues to run on its current -Pool. -""") + /** + * You may change the Pool for a Job only when the Job is disabled. The Patch Job + * call will fail if you include the poolInfo element and the Job is not disabled. + * If you specify an autoPoolSpecification in the poolInfo, only the keepAlive + * property of the autoPoolSpecification can be updated, and then only if the + * autoPoolSpecification has a poolLifetimeOption of Job (other job properties can + * be updated as normal). If omitted, the Job continues to run on its current + * Pool. + */ poolInfo?: PoolInformation; - @doc("If omitted, the existing Job metadata is left unchanged.") + /** + * If omitted, the existing Job metadata is left unchanged. + */ metadata?: MetadataItem[]; } -@doc("Options when disabling a Job.") +/** + * Options when disabling a Job. + */ model BatchJobDisableParameters { - @doc("What to do with active Tasks associated with the Job.") + /** + * What to do with active Tasks associated with the Job. + */ disableTasks: DisableJobOption; } -@doc("Options when terminating a Job.") +/** + * Options when terminating a Job. + */ model BatchJobTerminateParameters { - @doc(""" -The text you want to appear as the Job's TerminateReason. The default is -'UserTerminate'. -""") + /** + * The text you want to appear as the Job's TerminateReason. The default is + * 'UserTerminate'. + */ terminateReason?: string; } -@doc("The result of listing the Jobs in an Account.") +/** + * The result of listing the Jobs in an Account. + */ @pagedResult model BatchJobListResult { - @doc("The list of Jobs.") + /** + * The list of Jobs. + */ @items value?: BatchJob[]; - @doc("The URL to get the next set of results.") + /** + * The URL to get the next set of results. + */ @nextLink @projectedName("json", "odata.nextLink") odataNextLink?: string; } -@doc(""" -The result of listing the status of the Job Preparation and Job Release Tasks -for a Job. -""") +/** + * The result of listing the status of the Job Preparation and Job Release Tasks + * for a Job. + */ @pagedResult model BatchJobListPreparationAndReleaseTaskStatusResult { - @doc("A list of Job Preparation and Job Release Task execution information.") + /** + * A list of Job Preparation and Job Release Task execution information. + */ @items value?: JobPreparationAndReleaseTaskExecutionInformation[]; - @doc("The URL to get the next set of results.") + /** + * The URL to get the next set of results. + */ @nextLink @projectedName("json", "odata.nextLink") odataNextLink?: string; } -@doc("The status of the Job Preparation and Job Release Tasks on a Compute Node.") +/** + * The status of the Job Preparation and Job Release Tasks on a Compute Node. + */ model JobPreparationAndReleaseTaskExecutionInformation { - @doc("The ID of the Pool containing the Compute Node to which this entry refers.") + /** + * The ID of the Pool containing the Compute Node to which this entry refers. + */ poolId?: string; - @doc("The ID of the Compute Node to which this entry refers.") + /** + * The ID of the Compute Node to which this entry refers. + */ nodeId?: string; - @doc("The URL of the Compute Node to which this entry refers.") + /** + * The URL of the Compute Node to which this entry refers. + */ nodeUrl?: string; - @doc(""" -Contains information about the execution of a Job Preparation Task on a Compute -Node. -""") + /** + * Contains information about the execution of a Job Preparation Task on a Compute + * Node. + */ jobPreparationTaskExecutionInfo?: JobPreparationTaskExecutionInformation; - @doc("This property is set only if the Job Release Task has run on the Compute Node.") + /** + * This property is set only if the Job Release Task has run on the Compute Node. + */ jobReleaseTaskExecutionInfo?: JobReleaseTaskExecutionInformation; } -@doc(""" -Contains information about the execution of a Job Preparation Task on a Compute -Node. -""") +/** + * Contains information about the execution of a Job Preparation Task on a Compute + * Node. + */ model JobPreparationTaskExecutionInformation { - @doc(""" -If the Task has been restarted or retried, this is the most recent time at -which the Task started running. -""") + /** + * If the Task has been restarted or retried, this is the most recent time at + * which the Task started running. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime: utcDateTime; - @doc("This property is set only if the Task is in the Completed state.") + /** + * This property is set only if the Task is in the Completed state. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime?: utcDateTime; - @doc("The current state of the Job Preparation Task on the Compute Node.") + /** + * The current state of the Job Preparation Task on the Compute Node. + */ state: JobPreparationTaskState; - @doc(""" -The root directory of the Job Preparation Task on the Compute Node. You can use -this path to retrieve files created by the Task, such as log files. -""") + /** + * The root directory of the Job Preparation Task on the Compute Node. You can use + * this path to retrieve files created by the Task, such as log files. + */ taskRootDirectory?: string; - @doc("The URL to the root directory of the Job Preparation Task on the Compute Node.") + /** + * The URL to the root directory of the Job Preparation Task on the Compute Node. + */ taskRootDirectoryUrl?: string; - @doc(""" -This parameter is returned only if the Task is in the completed state. The exit -code for a process reflects the specific convention implemented by the -application developer for that process. If you use the exit code value to make -decisions in your code, be sure that you know the exit code convention used by -the application process. Note that the exit code may also be generated by the -Compute Node operating system, such as when a process is forcibly terminated. -""") + /** + * This parameter is returned only if the Task is in the completed state. The exit + * code for a process reflects the specific convention implemented by the + * application developer for that process. If you use the exit code value to make + * decisions in your code, be sure that you know the exit code convention used by + * the application process. Note that the exit code may also be generated by the + * Compute Node operating system, such as when a process is forcibly terminated. + */ exitCode?: int32; - @doc("This property is set only if the Task runs in a container context.") + /** + * This property is set only if the Task runs in a container context. + */ containerInfo?: TaskContainerExecutionInformation; - @doc(""" -This property is set only if the Task is in the completed state and encountered -a failure. -""") + /** + * This property is set only if the Task is in the completed state and encountered + * a failure. + */ failureInfo?: TaskFailureInformation; - @doc(""" -Task application failures (non-zero exit code) are retried, pre-processing -errors (the Task could not be run) and file upload errors are not retried. The -Batch service will retry the Task up to the limit specified by the constraints. -""") + /** + * Task application failures (non-zero exit code) are retried, pre-processing + * errors (the Task could not be run) and file upload errors are not retried. The + * Batch service will retry the Task up to the limit specified by the constraints. + */ retryCount: int32; - @doc(""" -This property is set only if the Task was retried (i.e. retryCount is nonzero). -If present, this is typically the same as startTime, but may be different if -the Task has been restarted for reasons other than retry; for example, if the -Compute Node was rebooted during a retry, then the startTime is updated but the -lastRetryTime is not. -""") + /** + * This property is set only if the Task was retried (i.e. retryCount is nonzero). + * If present, this is typically the same as startTime, but may be different if + * the Task has been restarted for reasons other than retry; for example, if the + * Compute Node was rebooted during a retry, then the startTime is updated but the + * lastRetryTime is not. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastRetryTime?: utcDateTime; - @doc(""" -If the value is 'failed', then the details of the failure can be found in the -failureInfo property. -""") + /** + * If the value is 'failed', then the details of the failure can be found in the + * failureInfo property. + */ result?: TaskExecutionResult; } -@doc("Contains information about the container which a Task is executing.") +/** + * Contains information about the container which a Task is executing. + */ model TaskContainerExecutionInformation { - @doc("The ID of the container.") + /** + * The ID of the container. + */ containerId?: string; - @doc(""" -This is the state of the container according to the Docker service. It is -equivalent to the status field returned by \"docker inspect\". -""") + /** + * This is the state of the container according to the Docker service. It is + * equivalent to the status field returned by "docker inspect". + */ state?: string; - @doc(""" -This is the detailed error string from the Docker service, if available. It is -equivalent to the error field returned by \"docker inspect\". -""") + /** + * This is the detailed error string from the Docker service, if available. It is + * equivalent to the error field returned by "docker inspect". + */ error?: string; } -@doc("Information about a Task failure.") +/** + * Information about a Task failure. + */ model TaskFailureInformation { - @doc("The category of the error.") + /** + * The category of the error. + */ category: ErrorCategory; - @doc(""" -An identifier for the Task error. Codes are invariant and are intended to be -consumed programmatically. -""") + /** + * An identifier for the Task error. Codes are invariant and are intended to be + * consumed programmatically. + */ code?: string; - @doc(""" -A message describing the Task error, intended to be suitable for display in a -user interface. -""") + /** + * A message describing the Task error, intended to be suitable for display in a + * user interface. + */ message?: string; - @doc("A list of additional details related to the error.") + /** + * A list of additional details related to the error. + */ details?: NameValuePair[]; } -@doc(""" -Contains information about the execution of a Job Release Task on a Compute -Node. -""") +/** + * Contains information about the execution of a Job Release Task on a Compute + * Node. + */ model JobReleaseTaskExecutionInformation { - @doc(""" -If the Task has been restarted or retried, this is the most recent time at -which the Task started running. -""") + /** + * If the Task has been restarted or retried, this is the most recent time at + * which the Task started running. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime: utcDateTime; - @doc("This property is set only if the Task is in the Completed state.") + /** + * This property is set only if the Task is in the Completed state. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime?: utcDateTime; - @doc("The current state of the Job Release Task on the Compute Node.") + /** + * The current state of the Job Release Task on the Compute Node. + */ state: JobReleaseTaskState; - @doc(""" -The root directory of the Job Release Task on the Compute Node. You can use -this path to retrieve files created by the Task, such as log files. -""") + /** + * The root directory of the Job Release Task on the Compute Node. You can use + * this path to retrieve files created by the Task, such as log files. + */ taskRootDirectory?: string; - @doc("The URL to the root directory of the Job Release Task on the Compute Node.") + /** + * The URL to the root directory of the Job Release Task on the Compute Node. + */ taskRootDirectoryUrl?: string; - @doc(""" -This parameter is returned only if the Task is in the completed state. The exit -code for a process reflects the specific convention implemented by the -application developer for that process. If you use the exit code value to make -decisions in your code, be sure that you know the exit code convention used by -the application process. Note that the exit code may also be generated by the -Compute Node operating system, such as when a process is forcibly terminated. -""") + /** + * This parameter is returned only if the Task is in the completed state. The exit + * code for a process reflects the specific convention implemented by the + * application developer for that process. If you use the exit code value to make + * decisions in your code, be sure that you know the exit code convention used by + * the application process. Note that the exit code may also be generated by the + * Compute Node operating system, such as when a process is forcibly terminated. + */ exitCode?: int32; - @doc("This property is set only if the Task runs in a container context.") + /** + * This property is set only if the Task runs in a container context. + */ containerInfo?: TaskContainerExecutionInformation; - @doc(""" -This property is set only if the Task is in the completed state and encountered -a failure. -""") + /** + * This property is set only if the Task is in the completed state and encountered + * a failure. + */ failureInfo?: TaskFailureInformation; - @doc(""" -If the value is 'failed', then the details of the failure can be found in the -failureInfo property. -""") + /** + * If the value is 'failed', then the details of the failure can be found in the + * failureInfo property. + */ result?: TaskExecutionResult; } -@doc("The Task and TaskSlot counts for a Job.") +/** + * The Task and TaskSlot counts for a Job. + */ model TaskCountsResult { - @doc("The Task counts for a Job.") + /** + * The Task counts for a Job. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key taskCounts: TaskCounts; - @doc("The TaskSlot counts for a Job.") + /** + * The TaskSlot counts for a Job. + */ taskSlotCounts: TaskSlotCounts; } -@doc("The Task counts for a Job.") +/** + * The Task counts for a Job. + */ model TaskCounts { - @doc("The number of Tasks in the active state.") + /** + * The number of Tasks in the active state. + */ active: int32; - @doc("The number of Tasks in the running or preparing state.") + /** + * The number of Tasks in the running or preparing state. + */ running: int32; - @doc("The number of Tasks in the completed state.") + /** + * The number of Tasks in the completed state. + */ completed: int32; - @doc(""" -The number of Tasks which succeeded. A Task succeeds if its result (found in -the executionInfo property) is 'success'. -""") + /** + * The number of Tasks which succeeded. A Task succeeds if its result (found in + * the executionInfo property) is 'success'. + */ succeeded: int32; - @doc(""" -The number of Tasks which failed. A Task fails if its result (found in the -executionInfo property) is 'failure'. -""") + /** + * The number of Tasks which failed. A Task fails if its result (found in the + * executionInfo property) is 'failure'. + */ failed: int32; } -@doc("The TaskSlot counts for a Job.") +/** + * The TaskSlot counts for a Job. + */ model TaskSlotCounts { - @doc("The number of TaskSlots for active Tasks.") + /** + * The number of TaskSlots for active Tasks. + */ active: int32; - @doc("The number of TaskSlots for running Tasks.") + /** + * The number of TaskSlots for running Tasks. + */ running: int32; - @doc("The number of TaskSlots for completed Tasks.") + /** + * The number of TaskSlots for completed Tasks. + */ completed: int32; - @doc("The number of TaskSlots for succeeded Tasks.") + /** + * The number of TaskSlots for succeeded Tasks. + */ succeeded: int32; - @doc("The number of TaskSlots for failed Tasks.") + /** + * The number of TaskSlots for failed Tasks. + */ failed: int32; } -@doc("A Pool in the Azure Batch service.") +/** + * A Pool in the Azure Batch service. + */ model BatchPool { - @doc(""" -The ID can contain any combination of alphanumeric characters including hyphens -and underscores, and cannot contain more than 64 characters. The ID is -case-preserving and case-insensitive (that is, you may not have two IDs within -an Account that differ only by case). -""") + /** + * The ID can contain any combination of alphanumeric characters including hyphens + * and underscores, and cannot contain more than 64 characters. The ID is + * case-preserving and case-insensitive (that is, you may not have two IDs within + * an Account that differ only by case). + */ @visibility("read", "create") id?: string; - @doc(""" -The display name need not be unique and can contain any Unicode characters up -to a maximum length of 1024. -""") + /** + * The display name need not be unique and can contain any Unicode characters up + * to a maximum length of 1024. + */ @visibility("read", "create") displayName?: string; - @doc("The URL of the Pool.") + /** + * The URL of the Pool. + */ @visibility("read") url?: string; - @doc(""" -This is an opaque string. You can use it to detect whether the Pool has changed -between requests. In particular, you can be pass the ETag when updating a Pool -to specify that your changes should take effect only if nobody else has -modified the Pool in the meantime. -""") + /** + * This is an opaque string. You can use it to detect whether the Pool has changed + * between requests. In particular, you can be pass the ETag when updating a Pool + * to specify that your changes should take effect only if nobody else has + * modified the Pool in the meantime. + */ @visibility("read") eTag?: string; - @doc(""" -This is the last time at which the Pool level data, such as the -targetDedicatedNodes or enableAutoscale settings, changed. It does not factor -in node-level changes such as a Compute Node changing state. -""") + /** + * This is the last time at which the Pool level data, such as the + * targetDedicatedNodes or enableAutoscale settings, changed. It does not factor + * in node-level changes such as a Compute Node changing state. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModified?: utcDateTime; - @doc("The creation time of the Pool.") + /** + * The creation time of the Pool. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. creationTime?: utcDateTime; - @doc("The current state of the Pool.") + /** + * The current state of the Pool. + */ @visibility("read") state?: PoolState; - @doc("The time at which the Pool entered its current state.") + /** + * The time at which the Pool entered its current state. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. stateTransitionTime?: utcDateTime; - @doc("Whether the Pool is resizing.") + /** + * Whether the Pool is resizing. + */ @visibility("read") allocationState?: AllocationState; - @doc("The time at which the Pool entered its current allocation state.") + /** + * The time at which the Pool entered its current allocation state. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. allocationStateTransitionTime?: utcDateTime; - @doc(""" -For information about available sizes of virtual machines in Pools, see Choose -a VM size for Compute Nodes in an Azure Batch Pool -(https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). -""") + /** + * For information about available sizes of virtual machines in Pools, see Choose + * a VM size for Compute Nodes in an Azure Batch Pool + * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + */ @visibility("read", "create") vmSize?: string; - @doc(""" -This property and virtualMachineConfiguration are mutually exclusive and one of -the properties must be specified. This property cannot be specified if the -Batch Account was created with its poolAllocationMode property set to -'UserSubscription'. -""") + /** + * This property and virtualMachineConfiguration are mutually exclusive and one of + * the properties must be specified. This property cannot be specified if the + * Batch Account was created with its poolAllocationMode property set to + * 'UserSubscription'. + */ @visibility("read", "create") cloudServiceConfiguration?: CloudServiceConfiguration; - @doc(""" -This property and cloudServiceConfiguration are mutually exclusive and one of -the properties must be specified. -""") + /** + * This property and cloudServiceConfiguration are mutually exclusive and one of + * the properties must be specified. + */ @visibility("read", "create") virtualMachineConfiguration?: VirtualMachineConfiguration; - @doc(""" -This is the timeout for the most recent resize operation. (The initial sizing -when the Pool is created counts as a resize.) The default value is 15 minutes. -""") + /** + * This is the timeout for the most recent resize operation. (The initial sizing + * when the Pool is created counts as a resize.) The default value is 15 minutes. + */ @visibility("read", "create") resizeTimeout?: duration; - @doc(""" -This property is set only if one or more errors occurred during the last Pool -resize, and only when the Pool allocationState is Steady. -""") + /** + * This property is set only if one or more errors occurred during the last Pool + * resize, and only when the Pool allocationState is Steady. + */ @visibility("read") resizeErrors?: ResizeError[]; - @doc("The number of dedicated Compute Nodes currently in the Pool.") + /** + * The number of dedicated Compute Nodes currently in the Pool. + */ @visibility("read") currentDedicatedNodes?: int32; - @doc(""" -Spot/Low-priority Compute Nodes which have been preempted are included in this -count. -""") + /** + * Spot/Low-priority Compute Nodes which have been preempted are included in this + * count. + */ @visibility("read") currentLowPriorityNodes?: int32; - @doc("The desired number of dedicated Compute Nodes in the Pool.") + /** + * The desired number of dedicated Compute Nodes in the Pool. + */ @visibility("read", "create") targetDedicatedNodes?: int32; - @doc("The desired number of Spot/Low-priority Compute Nodes in the Pool.") + /** + * The desired number of Spot/Low-priority Compute Nodes in the Pool. + */ @visibility("read", "create") targetLowPriorityNodes?: int32; - @doc(""" -If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must -be specified. If true, the autoScaleFormula property is required and the Pool -automatically resizes according to the formula. The default value is false. -""") + /** + * If false, at least one of targetDedicatedNodes and targetLowPriorityNodes must + * be specified. If true, the autoScaleFormula property is required and the Pool + * automatically resizes according to the formula. The default value is false. + */ @visibility("read", "create") enableAutoScale?: boolean; - @doc(""" -This property is set only if the Pool automatically scales, i.e. -enableAutoScale is true. -""") + /** + * This property is set only if the Pool automatically scales, i.e. + * enableAutoScale is true. + */ @visibility("read", "create") autoScaleFormula?: string; - @doc(""" -This property is set only if the Pool automatically scales, i.e. -enableAutoScale is true. -""") + /** + * This property is set only if the Pool automatically scales, i.e. + * enableAutoScale is true. + */ @visibility("read", "create") autoScaleEvaluationInterval?: duration; - @doc(""" -This property is set only if the Pool automatically scales, i.e. -enableAutoScale is true. -""") + /** + * This property is set only if the Pool automatically scales, i.e. + * enableAutoScale is true. + */ @visibility("read") autoScaleRun?: AutoScaleRun; - @doc(""" -This imposes restrictions on which Compute Nodes can be assigned to the Pool. -Specifying this value can reduce the chance of the requested number of Compute -Nodes to be allocated in the Pool. -""") + /** + * This imposes restrictions on which Compute Nodes can be assigned to the Pool. + * Specifying this value can reduce the chance of the requested number of Compute + * Nodes to be allocated in the Pool. + */ @visibility("read", "create") enableInterNodeCommunication?: boolean; - @doc("The network configuration for a Pool.") + /** + * The network configuration for a Pool. + */ @visibility("read", "create") networkConfiguration?: NetworkConfiguration; - @doc(""" -Batch will retry Tasks when a recovery operation is triggered on a Node. -Examples of recovery operations include (but are not limited to) when an -unhealthy Node is rebooted or a Compute Node disappeared due to host failure. -Retries due to recovery operations are independent of and are not counted -against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal -retry due to a recovery operation may occur. Because of this, all Tasks should -be idempotent. This means Tasks need to tolerate being interrupted and -restarted without causing any corruption or duplicate data. The best practice -for long running Tasks is to use some form of checkpointing. In some cases the -StartTask may be re-run even though the Compute Node was not rebooted. Special -care should be taken to avoid StartTasks which create breakaway process or -install/launch services from the StartTask working directory, as this will -block Batch from being able to re-run the StartTask. -""") + /** + * Batch will retry Tasks when a recovery operation is triggered on a Node. + * Examples of recovery operations include (but are not limited to) when an + * unhealthy Node is rebooted or a Compute Node disappeared due to host failure. + * Retries due to recovery operations are independent of and are not counted + * against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal + * retry due to a recovery operation may occur. Because of this, all Tasks should + * be idempotent. This means Tasks need to tolerate being interrupted and + * restarted without causing any corruption or duplicate data. The best practice + * for long running Tasks is to use some form of checkpointing. In some cases the + * StartTask may be re-run even though the Compute Node was not rebooted. Special + * care should be taken to avoid StartTasks which create breakaway process or + * install/launch services from the StartTask working directory, as this will + * block Batch from being able to re-run the StartTask. + */ startTask?: StartTask; - @doc(""" -For Windows Nodes, the Batch service installs the Certificates to the specified -Certificate store and location. For Linux Compute Nodes, the Certificates are -stored in a directory inside the Task working directory and an environment -variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this -location. For Certificates with visibility of 'remoteUser', a 'certs' directory -is created in the user's home directory (e.g., /home/{user-name}/certs) and -Certificates are placed in that directory. -""") + /** + * For Windows Nodes, the Batch service installs the Certificates to the specified + * Certificate store and location. For Linux Compute Nodes, the Certificates are + * stored in a directory inside the Task working directory and an environment + * variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this + * location. For Certificates with visibility of 'remoteUser', a 'certs' directory + * is created in the user's home directory (e.g., /home/{user-name}/certs) and + * Certificates are placed in that directory. + */ certificateReferences?: CertificateReference[]; - @doc(""" -Changes to Package references affect all new Nodes joining the Pool, but do not -affect Compute Nodes that are already in the Pool until they are rebooted or -reimaged. There is a maximum of 10 Package references on any given Pool. -""") + /** + * Changes to Package references affect all new Nodes joining the Pool, but do not + * affect Compute Nodes that are already in the Pool until they are rebooted or + * reimaged. There is a maximum of 10 Package references on any given Pool. + */ applicationPackageReferences?: ApplicationPackageReference[]; - @doc(""" -The list of application licenses must be a subset of available Batch service -application licenses. If a license is requested which is not supported, Pool -creation will fail. -""") + /** + * The list of application licenses must be a subset of available Batch service + * application licenses. If a license is requested which is not supported, Pool + * creation will fail. + */ @visibility("read", "create") applicationLicenses?: string[]; - @doc(""" -The default value is 1. The maximum value is the smaller of 4 times the number -of cores of the vmSize of the pool or 256. -""") + /** + * The default value is 1. The maximum value is the smaller of 4 times the number + * of cores of the vmSize of the pool or 256. + */ @visibility("read", "create") taskSlotsPerNode?: int32; - @doc("If not specified, the default is spread.") + /** + * If not specified, the default is spread. + */ @visibility("read", "create") taskSchedulingPolicy?: TaskSchedulingPolicy; - @doc("The list of user Accounts to be created on each Compute Node in the Pool.") + /** + * The list of user Accounts to be created on each Compute Node in the Pool. + */ @visibility("read", "create") userAccounts?: UserAccount[]; - @doc("A list of name-value pairs associated with the Pool as metadata.") + /** + * A list of name-value pairs associated with the Pool as metadata. + */ metadata?: MetadataItem[]; - @doc(""" -This property is populated only if the CloudPool was retrieved with an expand -clause including the 'stats' attribute; otherwise it is null. The statistics -may not be immediately available. The Batch service performs periodic roll-up -of statistics. The typical delay is about 30 minutes. -""") + /** + * This property is populated only if the CloudPool was retrieved with an expand + * clause including the 'stats' attribute; otherwise it is null. The statistics + * may not be immediately available. The Batch service performs periodic roll-up + * of statistics. The typical delay is about 30 minutes. + */ @visibility("read") stats?: PoolStatistics; - @doc("This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.") + /** + * This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + */ @visibility("read", "create") mountConfiguration?: MountConfiguration[]; - @doc(""" -The list of user identities associated with the Batch pool. The user identity -dictionary key references will be ARM resource ids in the form: -'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. -""") + /** + * The list of user identities associated with the Batch pool. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ @visibility("read") identity?: BatchPoolIdentity; } -@doc("An error that occurred when resizing a Pool.") +/** + * An error that occurred when resizing a Pool. + */ model ResizeError { - @doc(""" -An identifier for the Pool resize error. Codes are invariant and are intended -to be consumed programmatically. -""") + /** + * An identifier for the Pool resize error. Codes are invariant and are intended + * to be consumed programmatically. + */ code?: string; - @doc(""" -A message describing the Pool resize error, intended to be suitable for display -in a user interface. -""") + /** + * A message describing the Pool resize error, intended to be suitable for display + * in a user interface. + */ message?: string; - @doc("A list of additional error details related to the Pool resize error.") + /** + * A list of additional error details related to the Pool resize error. + */ values?: NameValuePair[]; } -@doc("The results and errors from an execution of a Pool autoscale formula.") +/** + * The results and errors from an execution of a Pool autoscale formula. + */ model AutoScaleRun { - @doc("The time at which the autoscale formula was last evaluated.") + /** + * The time at which the autoscale formula was last evaluated. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timestamp: utcDateTime; - @doc(""" -Each variable value is returned in the form $variable=value, and variables are -separated by semicolons. -""") + /** + * Each variable value is returned in the form $variable=value, and variables are + * separated by semicolons. + */ results?: string; - @doc("An error that occurred when executing or evaluating a Pool autoscale formula.") + /** + * An error that occurred when executing or evaluating a Pool autoscale formula. + */ error?: AutoScaleRunError; } -@doc("An error that occurred when executing or evaluating a Pool autoscale formula.") +/** + * An error that occurred when executing or evaluating a Pool autoscale formula. + */ model AutoScaleRunError { - @doc(""" -An identifier for the autoscale error. Codes are invariant and are intended to -be consumed programmatically. -""") + /** + * An identifier for the autoscale error. Codes are invariant and are intended to + * be consumed programmatically. + */ code?: string; - @doc(""" -A message describing the autoscale error, intended to be suitable for display -in a user interface. -""") + /** + * A message describing the autoscale error, intended to be suitable for display + * in a user interface. + */ message?: string; - @doc("A list of additional error details related to the autoscale error.") + /** + * A list of additional error details related to the autoscale error. + */ values?: NameValuePair[]; } -@doc("The identity of the Batch pool, if configured.") +/** + * The identity of the Batch pool, if configured. + */ model BatchPoolIdentity { - @doc(""" -The list of user identities associated with the Batch pool. The user identity -dictionary key references will be ARM resource ids in the form: -'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. -""") + /** + * The list of user identities associated with the Batch pool. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ type: PoolIdentityType; - @doc(""" -The user identity dictionary key references will be ARM resource ids in the -form: -'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. -""") + /** + * The user identity dictionary key references will be ARM resource ids in the + * form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ userAssignedIdentities?: UserAssignedIdentity[]; } -@doc("The user assigned Identity") +/** + * The user assigned Identity + */ model UserAssignedIdentity { - @doc("The ARM resource id of the user assigned identity") + /** + * The ARM resource id of the user assigned identity + */ resourceId: string; - @doc("The client id of the user assigned identity.") + /** + * The client id of the user assigned identity. + */ @visibility("read") clientId?: string; - @doc("The principal id of the user assigned identity.") + /** + * The principal id of the user assigned identity. + */ @visibility("read") principalId?: string; } -@doc("The result of listing the Pools in an Account.") +/** + * The result of listing the Pools in an Account. + */ @pagedResult model BatchPoolListResult { - @doc("The list of Pools.") + /** + * The list of Pools. + */ @items value?: BatchPool[]; - @doc("The URL to get the next set of results.") + /** + * The URL to get the next set of results. + */ @nextLink @projectedName("json", "odata.nextLink") odataNextLink?: string; } -@doc("The set of changes to be made to a Pool.") +/** + * The set of changes to be made to a Pool. + */ model BatchPoolUpdate { - @doc(""" -If this element is present, it overwrites any existing StartTask. If omitted, -any existing StartTask is left unchanged. -""") + /** + * If this element is present, it overwrites any existing StartTask. If omitted, + * any existing StartTask is left unchanged. + */ startTask?: StartTask; - @doc(""" -If this element is present, it replaces any existing Certificate references -configured on the Pool. If omitted, any existing Certificate references are -left unchanged. For Windows Nodes, the Batch service installs the Certificates -to the specified Certificate store and location. For Linux Compute Nodes, the -Certificates are stored in a directory inside the Task working directory and an -environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query -for this location. For Certificates with visibility of 'remoteUser', a 'certs' -directory is created in the user's home directory (e.g., -/home/{user-name}/certs) and Certificates are placed in that directory. -""") + /** + * If this element is present, it replaces any existing Certificate references + * configured on the Pool. If omitted, any existing Certificate references are + * left unchanged. For Windows Nodes, the Batch service installs the Certificates + * to the specified Certificate store and location. For Linux Compute Nodes, the + * Certificates are stored in a directory inside the Task working directory and an + * environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query + * for this location. For Certificates with visibility of 'remoteUser', a 'certs' + * directory is created in the user's home directory (e.g., + * /home/{user-name}/certs) and Certificates are placed in that directory. + */ certificateReferences?: CertificateReference[]; - @doc(""" -Changes to Package references affect all new Nodes joining the Pool, but do not -affect Compute Nodes that are already in the Pool until they are rebooted or -reimaged. If this element is present, it replaces any existing Package -references. If you specify an empty collection, then all Package references are -removed from the Pool. If omitted, any existing Package references are left -unchanged. -""") + /** + * Changes to Package references affect all new Nodes joining the Pool, but do not + * affect Compute Nodes that are already in the Pool until they are rebooted or + * reimaged. If this element is present, it replaces any existing Package + * references. If you specify an empty collection, then all Package references are + * removed from the Pool. If omitted, any existing Package references are left + * unchanged. + */ applicationPackageReferences?: ApplicationPackageReference[]; - @doc(""" -If this element is present, it replaces any existing metadata configured on the -Pool. If you specify an empty collection, any metadata is removed from the -Pool. If omitted, any existing metadata is left unchanged. -""") + /** + * If this element is present, it replaces any existing metadata configured on the + * Pool. If you specify an empty collection, any metadata is removed from the + * Pool. If omitted, any existing metadata is left unchanged. + */ metadata?: MetadataItem[]; } -@doc("Options for enabling automatic scaling on a Pool.") +/** + * Options for enabling automatic scaling on a Pool. + */ model BatchPoolEnableAutoScaleParameters { - @doc(""" -The formula is checked for validity before it is applied to the Pool. If the -formula is not valid, the Batch service rejects the request with detailed error -information. For more information about specifying this formula, see -Automatically scale Compute Nodes in an Azure Batch Pool -(https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). -""") + /** + * The formula is checked for validity before it is applied to the Pool. If the + * formula is not valid, the Batch service rejects the request with detailed error + * information. For more information about specifying this formula, see + * Automatically scale Compute Nodes in an Azure Batch Pool + * (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). + */ autoScaleFormula?: string; - @doc(""" -The default value is 15 minutes. The minimum and maximum value are 5 minutes -and 168 hours respectively. If you specify a value less than 5 minutes or -greater than 168 hours, the Batch service rejects the request with an invalid -property value error; if you are calling the REST API directly, the HTTP status -code is 400 (Bad Request). If you specify a new interval, then the existing -autoscale evaluation schedule will be stopped and a new autoscale evaluation -schedule will be started, with its starting time being the time when this -request was issued. -""") + /** + * The default value is 15 minutes. The minimum and maximum value are 5 minutes + * and 168 hours respectively. If you specify a value less than 5 minutes or + * greater than 168 hours, the Batch service rejects the request with an invalid + * property value error; if you are calling the REST API directly, the HTTP status + * code is 400 (Bad Request). If you specify a new interval, then the existing + * autoscale evaluation schedule will be stopped and a new autoscale evaluation + * schedule will be started, with its starting time being the time when this + * request was issued. + */ autoScaleEvaluationInterval?: duration; } -@doc("Options for evaluating an automatic scaling formula on a Pool.") +/** + * Options for evaluating an automatic scaling formula on a Pool. + */ model BatchPoolEvaluateAutoScaleParameters { - @doc(""" -The formula is validated and its results calculated, but it is not applied to -the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a -Pool'. For more information about specifying this formula, see Automatically -scale Compute Nodes in an Azure Batch Pool -(https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). -""") + /** + * The formula is validated and its results calculated, but it is not applied to + * the Pool. To apply the formula to the Pool, 'Enable automatic scaling on a + * Pool'. For more information about specifying this formula, see Automatically + * scale Compute Nodes in an Azure Batch Pool + * (https://azure.microsoft.com/en-us/documentation/articles/batch-automatic-scaling). + */ autoScaleFormula: string; } -@doc("Options for changing the size of a Pool.") +/** + * Options for changing the size of a Pool. + */ model BatchPoolResizeParameters { - @doc("The desired number of dedicated Compute Nodes in the Pool.") + /** + * The desired number of dedicated Compute Nodes in the Pool. + */ targetDedicatedNodes?: int32; - @doc("The desired number of Spot/Low-priority Compute Nodes in the Pool.") + /** + * The desired number of Spot/Low-priority Compute Nodes in the Pool. + */ targetLowPriorityNodes?: int32; - @doc(""" -The default value is 15 minutes. The minimum value is 5 minutes. If you specify -a value less than 5 minutes, the Batch service returns an error; if you are -calling the REST API directly, the HTTP status code is 400 (Bad Request). -""") + /** + * The default value is 15 minutes. The minimum value is 5 minutes. If you specify + * a value less than 5 minutes, the Batch service returns an error; if you are + * calling the REST API directly, the HTTP status code is 400 (Bad Request). + */ resizeTimeout?: duration; - @doc("The default value is requeue.") + /** + * The default value is requeue. + */ nodeDeallocationOption?: ComputeNodeDeallocationOption; } -@doc("Options for removing Compute Nodes from a Pool.") +/** + * Options for removing Compute Nodes from a Pool. + */ model NodeRemoveParameters { - @doc("A maximum of 100 nodes may be removed per request.") + /** + * A maximum of 100 nodes may be removed per request. + */ nodeList: string[]; - @doc(""" -The default value is 15 minutes. The minimum value is 5 minutes. If you specify -a value less than 5 minutes, the Batch service returns an error; if you are -calling the REST API directly, the HTTP status code is 400 (Bad Request). -""") + /** + * The default value is 15 minutes. The minimum value is 5 minutes. If you specify + * a value less than 5 minutes, the Batch service returns an error; if you are + * calling the REST API directly, the HTTP status code is 400 (Bad Request). + */ resizeTimeout?: duration; - @doc("The default value is requeue.") + /** + * The default value is requeue. + */ nodeDeallocationOption?: ComputeNodeDeallocationOption; } -@doc(""" -Batch will retry Tasks when a recovery operation is triggered on a Node. -Examples of recovery operations include (but are not limited to) when an -unhealthy Node is rebooted or a Compute Node disappeared due to host failure. -Retries due to recovery operations are independent of and are not counted -against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal -retry due to a recovery operation may occur. Because of this, all Tasks should -be idempotent. This means Tasks need to tolerate being interrupted and -restarted without causing any corruption or duplicate data. The best practice -for long running Tasks is to use some form of checkpointing. -""") +/** + * Batch will retry Tasks when a recovery operation is triggered on a Node. + * Examples of recovery operations include (but are not limited to) when an + * unhealthy Node is rebooted or a Compute Node disappeared due to host failure. + * Retries due to recovery operations are independent of and are not counted + * against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal + * retry due to a recovery operation may occur. Because of this, all Tasks should + * be idempotent. This means Tasks need to tolerate being interrupted and + * restarted without causing any corruption or duplicate data. The best practice + * for long running Tasks is to use some form of checkpointing. + */ model BatchTask { - @doc(""" -The ID can contain any combination of alphanumeric characters including hyphens -and underscores, and cannot contain more than 64 characters. -""") + /** + * The ID can contain any combination of alphanumeric characters including hyphens + * and underscores, and cannot contain more than 64 characters. + */ @visibility("read", "create") id?: string; - @doc(""" -The display name need not be unique and can contain any Unicode characters up -to a maximum length of 1024. -""") + /** + * The display name need not be unique and can contain any Unicode characters up + * to a maximum length of 1024. + */ @visibility("read", "create") displayName?: string; - @doc("The URL of the Task.") + /** + * The URL of the Task. + */ @visibility("read") url?: string; - @doc(""" -This is an opaque string. You can use it to detect whether the Task has changed -between requests. In particular, you can be pass the ETag when updating a Task -to specify that your changes should take effect only if nobody else has -modified the Task in the meantime. -""") + /** + * This is an opaque string. You can use it to detect whether the Task has changed + * between requests. In particular, you can be pass the ETag when updating a Task + * to specify that your changes should take effect only if nobody else has + * modified the Task in the meantime. + */ @visibility("read") eTag?: string; - @doc("The last modified time of the Task.") + /** + * The last modified time of the Task. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModified?: utcDateTime; - @doc("The creation time of the Task.") + /** + * The creation time of the Task. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. creationTime?: utcDateTime; - @doc("How the Batch service should respond when the Task completes.") + /** + * How the Batch service should respond when the Task completes. + */ @visibility("read", "create") exitConditions?: ExitConditions; - @doc("The state of the Task.") + /** + * The state of the Task. + */ @visibility("read") state?: TaskState; - @doc("The time at which the Task entered its current state.") + /** + * The time at which the Task entered its current state. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. stateTransitionTime?: utcDateTime; - @doc("This property is not set if the Task is in its initial Active state.") + /** + * This property is not set if the Task is in its initial Active state. + */ @visibility("read") previousState?: TaskState; - @doc("This property is not set if the Task is in its initial Active state.") + /** + * This property is not set if the Task is in its initial Active state. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. previousStateTransitionTime?: utcDateTime; - @doc(""" -For multi-instance Tasks, the command line is executed as the primary Task, -after the primary Task and all subtasks have finished executing the -coordination command line. The command line does not run under a shell, and -therefore cannot take advantage of shell features such as environment variable -expansion. If you want to take advantage of such features, you should invoke -the shell in the command line, for example using \"cmd /c MyCommand\" in -Windows or \"/bin/sh -c MyCommand\" in Linux. If the command line refers to -file paths, it should use a relative path (relative to the Task working -directory), or use the Batch provided environment variable -(https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). -""") + /** + * For multi-instance Tasks, the command line is executed as the primary Task, + * after the primary Task and all subtasks have finished executing the + * coordination command line. The command line does not run under a shell, and + * therefore cannot take advantage of shell features such as environment variable + * expansion. If you want to take advantage of such features, you should invoke + * the shell in the command line, for example using "cmd /c MyCommand" in Windows + * or "/bin/sh -c MyCommand" in Linux. If the command line refers to file paths, + * it should use a relative path (relative to the Task working directory), or use + * the Batch provided environment variable + * (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). + */ @visibility("read", "create") commandLine?: string; - @doc(""" -If the Pool that will run this Task has containerConfiguration set, this must -be set as well. If the Pool that will run this Task doesn't have -containerConfiguration set, this must not be set. When this is specified, all -directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure -Batch directories on the node) are mapped into the container, all Task -environment variables are mapped into the container, and the Task command line -is executed in the container. Files produced in the container outside of -AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that -Batch file APIs will not be able to access those files. -""") + /** + * If the Pool that will run this Task has containerConfiguration set, this must + * be set as well. If the Pool that will run this Task doesn't have + * containerConfiguration set, this must not be set. When this is specified, all + * directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure + * Batch directories on the node) are mapped into the container, all Task + * environment variables are mapped into the container, and the Task command line + * is executed in the container. Files produced in the container outside of + * AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, meaning that + * Batch file APIs will not be able to access those files. + */ @visibility("read", "create") containerSettings?: TaskContainerSettings; - @doc(""" -For multi-instance Tasks, the resource files will only be downloaded to the -Compute Node on which the primary Task is executed. There is a maximum size for -the list of resource files. When the max size is exceeded, the request will -fail and the response error code will be RequestEntityTooLarge. If this occurs, -the collection of ResourceFiles must be reduced in size. This can be achieved -using .zip files, Application Packages, or Docker Containers. -""") + /** + * For multi-instance Tasks, the resource files will only be downloaded to the + * Compute Node on which the primary Task is executed. There is a maximum size for + * the list of resource files. When the max size is exceeded, the request will + * fail and the response error code will be RequestEntityTooLarge. If this occurs, + * the collection of ResourceFiles must be reduced in size. This can be achieved + * using .zip files, Application Packages, or Docker Containers. + */ @visibility("read", "create") resourceFiles?: ResourceFile[]; - @doc(""" -For multi-instance Tasks, the files will only be uploaded from the Compute Node -on which the primary Task is executed. -""") + /** + * For multi-instance Tasks, the files will only be uploaded from the Compute Node + * on which the primary Task is executed. + */ @visibility("read", "create") outputFiles?: OutputFile[]; - @doc("A list of environment variable settings for the Task.") + /** + * A list of environment variable settings for the Task. + */ @visibility("read", "create") environmentSettings?: EnvironmentSetting[]; - @doc(""" -A locality hint that can be used by the Batch service to select a Compute Node -on which to start a Task. -""") + /** + * A locality hint that can be used by the Batch service to select a Compute Node + * on which to start a Task. + */ @visibility("read", "create") affinityInfo?: AffinityInformation; - @doc("Execution constraints to apply to a Task.") + /** + * Execution constraints to apply to a Task. + */ constraints?: TaskConstraints; - @doc(""" -The default is 1. A Task can only be scheduled to run on a compute node if the -node has enough free scheduling slots available. For multi-instance Tasks, this -must be 1. -""") + /** + * The default is 1. A Task can only be scheduled to run on a compute node if the + * node has enough free scheduling slots available. For multi-instance Tasks, this + * must be 1. + */ @visibility("read", "create") requiredSlots?: int32; - @doc("If omitted, the Task runs as a non-administrative user unique to the Task.") + /** + * If omitted, the Task runs as a non-administrative user unique to the Task. + */ @visibility("read", "create") userIdentity?: UserIdentity; - @doc("Information about the execution of a Task.") + /** + * Information about the execution of a Task. + */ @visibility("read") executionInfo?: TaskExecutionInformation; - @doc("Information about the Compute Node on which a Task ran.") + /** + * Information about the Compute Node on which a Task ran. + */ @visibility("read") nodeInfo?: ComputeNodeInformation; - @doc(""" -Multi-instance Tasks are commonly used to support MPI Tasks. In the MPI case, -if any of the subtasks fail (for example due to exiting with a non-zero exit -code) the entire multi-instance Task fails. The multi-instance Task is then -terminated and retried, up to its retry limit. -""") + /** + * Multi-instance Tasks are commonly used to support MPI Tasks. In the MPI case, + * if any of the subtasks fail (for example due to exiting with a non-zero exit + * code) the entire multi-instance Task fails. The multi-instance Task is then + * terminated and retried, up to its retry limit. + */ @visibility("read", "create") multiInstanceSettings?: MultiInstanceSettings; - @doc("Resource usage statistics for a Task.") + /** + * Resource usage statistics for a Task. + */ @visibility("read") stats?: TaskStatistics; - @doc(""" -This Task will not be scheduled until all Tasks that it depends on have -completed successfully. If any of those Tasks fail and exhaust their retry -counts, this Task will never be scheduled. -""") + /** + * This Task will not be scheduled until all Tasks that it depends on have + * completed successfully. If any of those Tasks fail and exhaust their retry + * counts, this Task will never be scheduled. + */ @visibility("read", "create") dependsOn?: TaskDependencies; - @doc(""" -Application packages are downloaded and deployed to a shared directory, not the -Task working directory. Therefore, if a referenced package is already on the -Node, and is up to date, then it is not re-downloaded; the existing copy on the -Compute Node is used. If a referenced Package cannot be installed, for example -because the package has been deleted or because download failed, the Task -fails. -""") + /** + * Application packages are downloaded and deployed to a shared directory, not the + * Task working directory. Therefore, if a referenced package is already on the + * Node, and is up to date, then it is not re-downloaded; the existing copy on the + * Compute Node is used. If a referenced Package cannot be installed, for example + * because the package has been deleted or because download failed, the Task + * fails. + */ @visibility("read", "create") applicationPackageReferences?: ApplicationPackageReference[]; - @doc(""" -If this property is set, the Batch service provides the Task with an -authentication token which can be used to authenticate Batch service operations -without requiring an Account access key. The token is provided via the -AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the -Task can carry out using the token depend on the settings. For example, a Task -can request Job permissions in order to add other Tasks to the Job, or check -the status of the Job or of other Tasks under the Job. -""") + /** + * If this property is set, the Batch service provides the Task with an + * authentication token which can be used to authenticate Batch service operations + * without requiring an Account access key. The token is provided via the + * AZ_BATCH_AUTHENTICATION_TOKEN environment variable. The operations that the + * Task can carry out using the token depend on the settings. For example, a Task + * can request Job permissions in order to add other Tasks to the Job, or check + * the status of the Job or of other Tasks under the Job. + */ @visibility("read", "create") authenticationTokenSettings?: AuthenticationTokenSettings; } -@doc("Specifies how the Batch service should respond when the Task completes.") +/** + * Specifies how the Batch service should respond when the Task completes. + */ model ExitConditions { - @doc(""" -A list of individual Task exit codes and how the Batch service should respond -to them. -""") + /** + * A list of individual Task exit codes and how the Batch service should respond + * to them. + */ exitCodes?: ExitCodeMapping[]; - @doc(""" -A list of Task exit code ranges and how the Batch service should respond to -them. -""") + /** + * A list of Task exit code ranges and how the Batch service should respond to + * them. + */ exitCodeRanges?: ExitCodeRangeMapping[]; - @doc("Specifies how the Batch service responds to a particular exit condition.") + /** + * Specifies how the Batch service responds to a particular exit condition. + */ preProcessingError?: ExitOptions; - @doc(""" -If the Task exited with an exit code that was specified via exitCodes or -exitCodeRanges, and then encountered a file upload error, then the action -specified by the exit code takes precedence. -""") + /** + * If the Task exited with an exit code that was specified via exitCodes or + * exitCodeRanges, and then encountered a file upload error, then the action + * specified by the exit code takes precedence. + */ fileUploadError?: ExitOptions; - @doc(""" -This value is used if the Task exits with any nonzero exit code not listed in -the exitCodes or exitCodeRanges collection, with a pre-processing error if the -preProcessingError property is not present, or with a file upload error if the -fileUploadError property is not present. If you want non-default behavior on -exit code 0, you must list it explicitly using the exitCodes or exitCodeRanges -collection. -""") + /** + * This value is used if the Task exits with any nonzero exit code not listed in + * the exitCodes or exitCodeRanges collection, with a pre-processing error if the + * preProcessingError property is not present, or with a file upload error if the + * fileUploadError property is not present. If you want non-default behavior on + * exit code 0, you must list it explicitly using the exitCodes or exitCodeRanges + * collection. + */ default?: ExitOptions; } -@doc(""" -How the Batch service should respond if a Task exits with a particular exit -code. -""") +/** + * How the Batch service should respond if a Task exits with a particular exit + * code. + */ model ExitCodeMapping { - @doc("A process exit code.") + /** + * A process exit code. + */ code: int32; - @doc("Specifies how the Batch service responds to a particular exit condition.") + /** + * Specifies how the Batch service responds to a particular exit condition. + */ exitOptions: ExitOptions; } -@doc("Specifies how the Batch service responds to a particular exit condition.") +/** + * Specifies how the Batch service responds to a particular exit condition. + */ model ExitOptions { - @doc(""" -The default is none for exit code 0 and terminate for all other exit -conditions. If the Job's onTaskFailed property is noaction, then specifying -this property returns an error and the add Task request fails with an invalid -property value error; if you are calling the REST API directly, the HTTP status -code is 400 (Bad Request). -""") + /** + * The default is none for exit code 0 and terminate for all other exit + * conditions. If the Job's onTaskFailed property is noaction, then specifying + * this property returns an error and the add Task request fails with an invalid + * property value error; if you are calling the REST API directly, the HTTP status + * code is 400 (Bad Request). + */ jobAction?: JobAction; - @doc(""" -Possible values are 'satisfy' (allowing dependent tasks to progress) and -'block' (dependent tasks continue to wait). Batch does not yet support -cancellation of dependent tasks. -""") + /** + * Possible values are 'satisfy' (allowing dependent tasks to progress) and + * 'block' (dependent tasks continue to wait). Batch does not yet support + * cancellation of dependent tasks. + */ dependencyAction?: DependencyAction; } -@doc(""" -A range of exit codes and how the Batch service should respond to exit codes -within that range. -""") +/** + * A range of exit codes and how the Batch service should respond to exit codes + * within that range. + */ model ExitCodeRangeMapping { - @doc("The first exit code in the range.") + /** + * The first exit code in the range. + */ start: int32; - @doc("The last exit code in the range.") + /** + * The last exit code in the range. + */ end: int32; - @doc("Specifies how the Batch service responds to a particular exit condition.") + /** + * Specifies how the Batch service responds to a particular exit condition. + */ exitOptions: ExitOptions; } -@doc(""" -A locality hint that can be used by the Batch service to select a Compute Node -on which to start a Task. -""") +/** + * A locality hint that can be used by the Batch service to select a Compute Node + * on which to start a Task. + */ model AffinityInformation { - @doc(""" -You can pass the affinityId of a Node to indicate that this Task needs to run -on that Compute Node. Note that this is just a soft affinity. If the target -Compute Node is busy or unavailable at the time the Task is scheduled, then the -Task will be scheduled elsewhere. -""") + /** + * You can pass the affinityId of a Node to indicate that this Task needs to run + * on that Compute Node. Note that this is just a soft affinity. If the target + * Compute Node is busy or unavailable at the time the Task is scheduled, then the + * Task will be scheduled elsewhere. + */ affinityId: string; } -@doc("Information about the execution of a Task.") +/** + * Information about the execution of a Task. + */ model TaskExecutionInformation { - @doc(""" -'Running' corresponds to the running state, so if the Task specifies resource -files or Packages, then the start time reflects the time at which the Task -started downloading or deploying these. If the Task has been restarted or -retried, this is the most recent time at which the Task started running. This -property is present only for Tasks that are in the running or completed state. -""") + /** + * 'Running' corresponds to the running state, so if the Task specifies resource + * files or Packages, then the start time reflects the time at which the Task + * started downloading or deploying these. If the Task has been restarted or + * retried, this is the most recent time at which the Task started running. This + * property is present only for Tasks that are in the running or completed state. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime?: utcDateTime; - @doc("This property is set only if the Task is in the Completed state.") + /** + * This property is set only if the Task is in the Completed state. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime?: utcDateTime; - @doc(""" -This property is set only if the Task is in the completed state. In general, -the exit code for a process reflects the specific convention implemented by the -application developer for that process. If you use the exit code value to make -decisions in your code, be sure that you know the exit code convention used by -the application process. However, if the Batch service terminates the Task (due -to timeout, or user termination via the API) you may see an operating -system-defined exit code. -""") + /** + * This property is set only if the Task is in the completed state. In general, + * the exit code for a process reflects the specific convention implemented by the + * application developer for that process. If you use the exit code value to make + * decisions in your code, be sure that you know the exit code convention used by + * the application process. However, if the Batch service terminates the Task (due + * to timeout, or user termination via the API) you may see an operating + * system-defined exit code. + */ exitCode?: int32; - @doc("This property is set only if the Task runs in a container context.") + /** + * This property is set only if the Task runs in a container context. + */ containerInfo?: TaskContainerExecutionInformation; - @doc(""" -This property is set only if the Task is in the completed state and encountered -a failure. -""") + /** + * This property is set only if the Task is in the completed state and encountered + * a failure. + */ failureInfo?: TaskFailureInformation; - @doc(""" -Task application failures (non-zero exit code) are retried, pre-processing -errors (the Task could not be run) and file upload errors are not retried. The -Batch service will retry the Task up to the limit specified by the constraints. -""") + /** + * Task application failures (non-zero exit code) are retried, pre-processing + * errors (the Task could not be run) and file upload errors are not retried. The + * Batch service will retry the Task up to the limit specified by the constraints. + */ retryCount: int32; - @doc(""" -This element is present only if the Task was retried (i.e. retryCount is -nonzero). If present, this is typically the same as startTime, but may be -different if the Task has been restarted for reasons other than retry; for -example, if the Compute Node was rebooted during a retry, then the startTime is -updated but the lastRetryTime is not. -""") + /** + * This element is present only if the Task was retried (i.e. retryCount is + * nonzero). If present, this is typically the same as startTime, but may be + * different if the Task has been restarted for reasons other than retry; for + * example, if the Compute Node was rebooted during a retry, then the startTime is + * updated but the lastRetryTime is not. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastRetryTime?: utcDateTime; - @doc(""" -When the user removes Compute Nodes from a Pool (by resizing/shrinking the -pool) or when the Job is being disabled, the user can specify that running -Tasks on the Compute Nodes be requeued for execution. This count tracks how -many times the Task has been requeued for these reasons. -""") + /** + * When the user removes Compute Nodes from a Pool (by resizing/shrinking the + * pool) or when the Job is being disabled, the user can specify that running + * Tasks on the Compute Nodes be requeued for execution. This count tracks how + * many times the Task has been requeued for these reasons. + */ requeueCount: int32; - @doc("This property is set only if the requeueCount is nonzero.") + /** + * This property is set only if the requeueCount is nonzero. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastRequeueTime?: utcDateTime; - @doc(""" -If the value is 'failed', then the details of the failure can be found in the -failureInfo property. -""") + /** + * If the value is 'failed', then the details of the failure can be found in the + * failureInfo property. + */ result?: TaskExecutionResult; } -@doc("Information about the Compute Node on which a Task ran.") +/** + * Information about the Compute Node on which a Task ran. + */ model ComputeNodeInformation { - @doc(""" -An identifier for the Node on which the Task ran, which can be passed when -adding a Task to request that the Task be scheduled on this Compute Node. -""") + /** + * An identifier for the Node on which the Task ran, which can be passed when + * adding a Task to request that the Task be scheduled on this Compute Node. + */ affinityId?: string; - @doc("The URL of the Compute Node on which the Task ran. ") + /** + * The URL of the Compute Node on which the Task ran. + */ nodeUrl?: string; - @doc("The ID of the Pool on which the Task ran.") + /** + * The ID of the Pool on which the Task ran. + */ poolId?: string; - @doc("The ID of the Compute Node on which the Task ran.") + /** + * The ID of the Compute Node on which the Task ran. + */ nodeId?: string; - @doc("The root directory of the Task on the Compute Node.") + /** + * The root directory of the Task on the Compute Node. + */ taskRootDirectory?: string; - @doc("The URL to the root directory of the Task on the Compute Node.") + /** + * The URL to the root directory of the Task on the Compute Node. + */ taskRootDirectoryUrl?: string; } -@doc(""" -Multi-instance Tasks are commonly used to support MPI Tasks. In the MPI case, -if any of the subtasks fail (for example due to exiting with a non-zero exit -code) the entire multi-instance Task fails. The multi-instance Task is then -terminated and retried, up to its retry limit. -""") +/** + * Multi-instance Tasks are commonly used to support MPI Tasks. In the MPI case, + * if any of the subtasks fail (for example due to exiting with a non-zero exit + * code) the entire multi-instance Task fails. The multi-instance Task is then + * terminated and retried, up to its retry limit. + */ model MultiInstanceSettings { - @doc("If omitted, the default is 1.") + /** + * If omitted, the default is 1. + */ numberOfInstances?: int32; - @doc(""" -A typical coordination command line launches a background service and verifies -that the service is ready to process inter-node messages. -""") + /** + * A typical coordination command line launches a background service and verifies + * that the service is ready to process inter-node messages. + */ coordinationCommandLine: string; - @doc(""" -The difference between common resource files and Task resource files is that -common resource files are downloaded for all subtasks including the primary, -whereas Task resource files are downloaded only for the primary. Also note that -these resource files are not downloaded to the Task working directory, but -instead are downloaded to the Task root directory (one directory above the -working directory). There is a maximum size for the list of resource files. -When the max size is exceeded, the request will fail and the response error -code will be RequestEntityTooLarge. If this occurs, the collection of -ResourceFiles must be reduced in size. This can be achieved using .zip files, -Application Packages, or Docker Containers. -""") + /** + * The difference between common resource files and Task resource files is that + * common resource files are downloaded for all subtasks including the primary, + * whereas Task resource files are downloaded only for the primary. Also note that + * these resource files are not downloaded to the Task working directory, but + * instead are downloaded to the Task root directory (one directory above the + * working directory). There is a maximum size for the list of resource files. + * When the max size is exceeded, the request will fail and the response error + * code will be RequestEntityTooLarge. If this occurs, the collection of + * ResourceFiles must be reduced in size. This can be achieved using .zip files, + * Application Packages, or Docker Containers. + */ commonResourceFiles?: ResourceFile[]; } -@doc("Resource usage statistics for a Task.") +/** + * Resource usage statistics for a Task. + */ model TaskStatistics { - @doc("The URL of the statistics.") + /** + * The URL of the statistics. + */ url: string; - @doc("The start time of the time range covered by the statistics.") + /** + * The start time of the time range covered by the statistics. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime: utcDateTime; - @doc(""" -The time at which the statistics were last updated. All statistics are limited -to the range between startTime and lastUpdateTime. -""") + /** + * The time at which the statistics were last updated. All statistics are limited + * to the range between startTime and lastUpdateTime. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdateTime: utcDateTime; - @doc(""" -The total user mode CPU time (summed across all cores and all Compute Nodes) -consumed by the Task. -""") + /** + * The total user mode CPU time (summed across all cores and all Compute Nodes) + * consumed by the Task. + */ userCPUTime: duration; - @doc(""" -The total kernel mode CPU time (summed across all cores and all Compute Nodes) -consumed by the Task. -""") + /** + * The total kernel mode CPU time (summed across all cores and all Compute Nodes) + * consumed by the Task. + */ kernelCPUTime: duration; - @doc(""" -The wall clock time is the elapsed time from when the Task started running on a -Compute Node to when it finished (or to the last time the statistics were -updated, if the Task had not finished by then). If the Task was retried, this -includes the wall clock time of all the Task retries. -""") + /** + * The wall clock time is the elapsed time from when the Task started running on a + * Compute Node to when it finished (or to the last time the statistics were + * updated, if the Task had not finished by then). If the Task was retried, this + * includes the wall clock time of all the Task retries. + */ wallClockTime: duration; - @doc("The total number of disk read operations made by the Task.") - readIOps: int32; - - @doc("The total number of disk write operations made by the Task.") - writeIOps: int32; - - @doc("The total gibibytes read from disk by the Task.") - readIOGiB: float32; - - @doc("The total gibibytes written to disk by the Task.") - writeIOGiB: float32; - - @doc(""" -The total wait time of the Task. The wait time for a Task is defined as the -elapsed time between the creation of the Task and the start of Task execution. -(If the Task is retried due to failures, the wait time is the time to the most -recent Task execution.) -""") + /** + * The total number of disk read operations made by the Task. + */ + readIOps: int64; + + /** + * The total number of disk write operations made by the Task. + */ + writeIOps: int64; + + /** + * The total gibibytes read from disk by the Task. + */ + readIOGiB: float64; + + /** + * The total gibibytes written to disk by the Task. + */ + writeIOGiB: float64; + + /** + * The total wait time of the Task. The wait time for a Task is defined as the + * elapsed time between the creation of the Task and the start of Task execution. + * (If the Task is retried due to failures, the wait time is the time to the most + * recent Task execution.) + */ waitTime: duration; } -@doc(""" -Specifies any dependencies of a Task. Any Task that is explicitly specified or -within a dependency range must complete before the dependant Task will be -scheduled. -""") +/** + * Specifies any dependencies of a Task. Any Task that is explicitly specified or + * within a dependency range must complete before the dependant Task will be + * scheduled. + */ model TaskDependencies { - @doc(""" -The taskIds collection is limited to 64000 characters total (i.e. the combined -length of all Task IDs). If the taskIds collection exceeds the maximum length, -the Add Task request fails with error code TaskDependencyListTooLong. In this -case consider using Task ID ranges instead. -""") + /** + * The taskIds collection is limited to 64000 characters total (i.e. the combined + * length of all Task IDs). If the taskIds collection exceeds the maximum length, + * the Add Task request fails with error code TaskDependencyListTooLong. In this + * case consider using Task ID ranges instead. + */ taskIds?: string[]; - @doc(""" -The list of Task ID ranges that this Task depends on. All Tasks in all ranges -must complete successfully before the dependent Task can be scheduled. -""") + /** + * The list of Task ID ranges that this Task depends on. All Tasks in all ranges + * must complete successfully before the dependent Task can be scheduled. + */ taskIdRanges?: TaskIdRange[]; } -@doc(""" -The start and end of the range are inclusive. For example, if a range has start -9 and end 12, then it represents Tasks '9', '10', '11' and '12'. -""") +/** + * The start and end of the range are inclusive. For example, if a range has start + * 9 and end 12, then it represents Tasks '9', '10', '11' and '12'. + */ model TaskIdRange { - @doc("The first Task ID in the range.") + /** + * The first Task ID in the range. + */ start: int32; - @doc("The last Task ID in the range.") + /** + * The last Task ID in the range. + */ end: int32; } -@doc("The result of listing the Tasks in a Job.") +/** + * The result of listing the Tasks in a Job. + */ @pagedResult model BatchTaskListResult { - @doc("The list of Tasks.") + /** + * The list of Tasks. + */ @items value?: BatchTask[]; - @doc("The URL to get the next set of results.") + /** + * The URL to get the next set of results. + */ @nextLink @projectedName("json", "odata.nextLink") odataNextLink?: string; } -@doc("A collection of Azure Batch Tasks to add.") +/** + * A collection of Azure Batch Tasks to add. + */ model BatchTaskCollection { - @doc(""" -The total serialized size of this collection must be less than 1MB. If it is -greater than 1MB (for example if each Task has 100's of resource files or -environment variables), the request will fail with code 'RequestBodyTooLarge' -and should be retried again with fewer Tasks. -""") + /** + * The total serialized size of this collection must be less than 1MB. If it is + * greater than 1MB (for example if each Task has 100's of resource files or + * environment variables), the request will fail with code 'RequestBodyTooLarge' + * and should be retried again with fewer Tasks. + */ value: BatchTask[]; } -@doc("The result of adding a collection of Tasks to a Job.") +/** + * The result of adding a collection of Tasks to a Job. + */ model TaskAddCollectionResult { - @doc("The results of the add Task collection operation.") + /** + * The results of the add Task collection operation. + */ value?: TaskAddResult[]; } -@doc("Result for a single Task added as part of an add Task collection operation.") +/** + * Result for a single Task added as part of an add Task collection operation. + */ model TaskAddResult { - @doc("The status of the add Task request.") + /** + * The status of the add Task request. + */ status: TaskAddStatus; - @doc("The ID of the Task for which this is the result.") + /** + * The ID of the Task for which this is the result. + */ taskId: string; - @doc(""" -You can use this to detect whether the Task has changed between requests. In -particular, you can be pass the ETag with an Update Task request to specify -that your changes should take effect only if nobody else has modified the Job -in the meantime. -""") + /** + * You can use this to detect whether the Task has changed between requests. In + * particular, you can be pass the ETag with an Update Task request to specify + * that your changes should take effect only if nobody else has modified the Job + * in the meantime. + */ eTag?: string; - @doc("The last modified time of the Task.") + /** + * The last modified time of the Task. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModified?: utcDateTime; - @doc("The URL of the Task, if the Task was successfully added.") + /** + * The URL of the Task, if the Task was successfully added. + */ location?: string; - @doc("An error response received from the Azure Batch service.") + /** + * An error response received from the Azure Batch service. + */ error?: BatchError; } -@doc("The result of listing the subtasks of a Task.") +/** + * The result of listing the subtasks of a Task. + */ model BatchTaskListSubtasksResult { - @doc("The list of subtasks.") + /** + * The list of subtasks. + */ value?: SubtaskInformation[]; } -@doc("Information about an Azure Batch subtask.") +/** + * Information about an Azure Batch subtask. + */ model SubtaskInformation { - @doc("The ID of the subtask.") + /** + * The ID of the subtask. + */ id?: int32; - @doc("Information about the Compute Node on which a Task ran.") + /** + * Information about the Compute Node on which a Task ran. + */ nodeInfo?: ComputeNodeInformation; - @doc(""" -The time at which the subtask started running. If the subtask has been -restarted or retried, this is the most recent time at which the subtask started -running. -""") + /** + * The time at which the subtask started running. If the subtask has been + * restarted or retried, this is the most recent time at which the subtask started + * running. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime?: utcDateTime; - @doc("This property is set only if the subtask is in the Completed state.") + /** + * This property is set only if the subtask is in the Completed state. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime?: utcDateTime; - @doc(""" -This property is set only if the subtask is in the completed state. In general, -the exit code for a process reflects the specific convention implemented by the -application developer for that process. If you use the exit code value to make -decisions in your code, be sure that you know the exit code convention used by -the application process. However, if the Batch service terminates the subtask -(due to timeout, or user termination via the API) you may see an operating -system-defined exit code. -""") + /** + * This property is set only if the subtask is in the completed state. In general, + * the exit code for a process reflects the specific convention implemented by the + * application developer for that process. If you use the exit code value to make + * decisions in your code, be sure that you know the exit code convention used by + * the application process. However, if the Batch service terminates the subtask + * (due to timeout, or user termination via the API) you may see an operating + * system-defined exit code. + */ exitCode?: int32; - @doc("This property is set only if the Task runs in a container context.") + /** + * This property is set only if the Task runs in a container context. + */ containerInfo?: TaskContainerExecutionInformation; - @doc(""" -This property is set only if the Task is in the completed state and encountered -a failure. -""") + /** + * This property is set only if the Task is in the completed state and encountered + * a failure. + */ failureInfo?: TaskFailureInformation; - @doc("The state of the subtask.") + /** + * The state of the subtask. + */ state?: SubtaskState; - @doc("The time at which the subtask entered its current state.") + /** + * The time at which the subtask entered its current state. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. stateTransitionTime?: utcDateTime; - @doc("This property is not set if the subtask is in its initial running state.") + /** + * This property is not set if the subtask is in its initial running state. + */ previousState?: SubtaskState; - @doc("This property is not set if the subtask is in its initial running state.") + /** + * This property is not set if the subtask is in its initial running state. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. previousStateTransitionTime?: utcDateTime; - @doc(""" -If the value is 'failed', then the details of the failure can be found in the -failureInfo property. -""") + /** + * If the value is 'failed', then the details of the failure can be found in the + * failureInfo property. + */ result?: TaskExecutionResult; } -@doc("A user Account for RDP or SSH access on a Compute Node.") +/** + * A user Account for RDP or SSH access on a Compute Node. + */ model ComputeNodeUser { - @doc("The user name of the Account.") + /** + * The user name of the Account. + */ name: string; - @doc("The default value is false.") + /** + * The default value is false. + */ isAdmin?: boolean; - @doc(""" -If omitted, the default is 1 day from the current time. For Linux Compute -Nodes, the expiryTime has a precision up to a day. -""") + /** + * If omitted, the default is 1 day from the current time. For Linux Compute + * Nodes, the expiryTime has a precision up to a day. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expiryTime?: utcDateTime; - @doc(""" -The password is required for Windows Compute Nodes (those created with -'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' -using a Windows Image reference). For Linux Compute Nodes, the password can -optionally be specified along with the sshPublicKey property. -""") + /** + * The password is required for Windows Compute Nodes (those created with + * 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' + * using a Windows Image reference). For Linux Compute Nodes, the password can + * optionally be specified along with the sshPublicKey property. + */ password?: string; - @doc(""" -The public key should be compatible with OpenSSH encoding and should be base 64 -encoded. This property can be specified only for Linux Compute Nodes. If this -is specified for a Windows Compute Node, then the Batch service rejects the -request; if you are calling the REST API directly, the HTTP status code is 400 -(Bad Request). -""") + /** + * The public key should be compatible with OpenSSH encoding and should be base 64 + * encoded. This property can be specified only for Linux Compute Nodes. If this + * is specified for a Windows Compute Node, then the Batch service rejects the + * request; if you are calling the REST API directly, the HTTP status code is 400 + * (Bad Request). + */ sshPublicKey?: string; } -@doc("The set of changes to be made to a user Account on a Compute Node.") +/** + * The set of changes to be made to a user Account on a Compute Node. + */ model NodeUpdateUserParameters { - @doc(""" -The password is required for Windows Compute Nodes (those created with -'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' -using a Windows Image reference). For Linux Compute Nodes, the password can -optionally be specified along with the sshPublicKey property. If omitted, any -existing password is removed. -""") + /** + * The password is required for Windows Compute Nodes (those created with + * 'cloudServiceConfiguration', or created with 'virtualMachineConfiguration' + * using a Windows Image reference). For Linux Compute Nodes, the password can + * optionally be specified along with the sshPublicKey property. If omitted, any + * existing password is removed. + */ password?: string; - @doc(""" -If omitted, the default is 1 day from the current time. For Linux Compute -Nodes, the expiryTime has a precision up to a day. -""") + /** + * If omitted, the default is 1 day from the current time. For Linux Compute + * Nodes, the expiryTime has a precision up to a day. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expiryTime?: utcDateTime; - @doc(""" -The public key should be compatible with OpenSSH encoding and should be base 64 -encoded. This property can be specified only for Linux Compute Nodes. If this -is specified for a Windows Compute Node, then the Batch service rejects the -request; if you are calling the REST API directly, the HTTP status code is 400 -(Bad Request). If omitted, any existing SSH public key is removed. -""") + /** + * The public key should be compatible with OpenSSH encoding and should be base 64 + * encoded. This property can be specified only for Linux Compute Nodes. If this + * is specified for a Windows Compute Node, then the Batch service rejects the + * request; if you are calling the REST API directly, the HTTP status code is 400 + * (Bad Request). If omitted, any existing SSH public key is removed. + */ sshPublicKey?: string; } -@doc("A Compute Node in the Batch service.") +/** + * A Compute Node in the Batch service. + */ model ComputeNode { - @doc(""" -Every Compute Node that is added to a Pool is assigned a unique ID. Whenever a -Compute Node is removed from a Pool, all of its local files are deleted, and -the ID is reclaimed and could be reused for new Compute Nodes. -""") + /** + * Every Compute Node that is added to a Pool is assigned a unique ID. Whenever a + * Compute Node is removed from a Pool, all of its local files are deleted, and + * the ID is reclaimed and could be reused for new Compute Nodes. + */ id?: string; - @doc("The URL of the Compute Node.") + /** + * The URL of the Compute Node. + */ url?: string; - @doc(""" -The Spot/Low-priority Compute Node has been preempted. Tasks which were running -on the Compute Node when it was preempted will be rescheduled when another -Compute Node becomes available. -""") + /** + * The Spot/Low-priority Compute Node has been preempted. Tasks which were running + * on the Compute Node when it was preempted will be rescheduled when another + * Compute Node becomes available. + */ state?: ComputeNodeState; - @doc("Whether the Compute Node is available for Task scheduling.") + /** + * Whether the Compute Node is available for Task scheduling. + */ schedulingState?: SchedulingState; - @doc("The time at which the Compute Node entered its current state.") + /** + * The time at which the Compute Node entered its current state. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. stateTransitionTime?: utcDateTime; - @doc("This property may not be present if the Compute Node state is unusable.") + /** + * This property may not be present if the Compute Node state is unusable. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastBootTime?: utcDateTime; - @doc(""" -This is the time when the Compute Node was initially allocated and doesn't -change once set. It is not updated when the Compute Node is service healed or -preempted. -""") + /** + * This is the time when the Compute Node was initially allocated and doesn't + * change once set. It is not updated when the Compute Node is service healed or + * preempted. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. allocationTime?: utcDateTime; - @doc(""" -Every Compute Node that is added to a Pool is assigned a unique IP address. -Whenever a Compute Node is removed from a Pool, all of its local files are -deleted, and the IP address is reclaimed and could be reused for new Compute -Nodes. -""") + /** + * Every Compute Node that is added to a Pool is assigned a unique IP address. + * Whenever a Compute Node is removed from a Pool, all of its local files are + * deleted, and the IP address is reclaimed and could be reused for new Compute + * Nodes. + */ ipAddress?: string; - @doc(""" -Note that this is just a soft affinity. If the target Compute Node is busy or -unavailable at the time the Task is scheduled, then the Task will be scheduled -elsewhere. -""") + /** + * Note that this is just a soft affinity. If the target Compute Node is busy or + * unavailable at the time the Task is scheduled, then the Task will be scheduled + * elsewhere. + */ affinityId?: string; - @doc(""" -For information about available sizes of virtual machines in Pools, see Choose -a VM size for Compute Nodes in an Azure Batch Pool -(https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). -""") + /** + * For information about available sizes of virtual machines in Pools, see Choose + * a VM size for Compute Nodes in an Azure Batch Pool + * (https://docs.microsoft.com/azure/batch/batch-pool-vm-sizes). + */ vmSize?: string; - @doc(""" -The total number of Job Tasks completed on the Compute Node. This includes Job -Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start -Tasks. -""") + /** + * The total number of Job Tasks completed on the Compute Node. This includes Job + * Manager Tasks and normal Tasks, but not Job Preparation, Job Release or Start + * Tasks. + */ totalTasksRun?: int32; - @doc(""" -The total number of currently running Job Tasks on the Compute Node. This -includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job -Release or Start Tasks. -""") + /** + * The total number of currently running Job Tasks on the Compute Node. This + * includes Job Manager Tasks and normal Tasks, but not Job Preparation, Job + * Release or Start Tasks. + */ runningTasksCount?: int32; - @doc(""" -The total number of scheduling slots used by currently running Job Tasks on the -Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job -Preparation, Job Release or Start Tasks. -""") + /** + * The total number of scheduling slots used by currently running Job Tasks on the + * Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job + * Preparation, Job Release or Start Tasks. + */ runningTaskSlotsCount?: int32; - @doc(""" -The total number of Job Tasks which completed successfully (with exitCode 0) on -the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job -Preparation, Job Release or Start Tasks. -""") + /** + * The total number of Job Tasks which completed successfully (with exitCode 0) on + * the Compute Node. This includes Job Manager Tasks and normal Tasks, but not Job + * Preparation, Job Release or Start Tasks. + */ totalTasksSucceeded?: int32; - @doc(""" -This property is present only if at least one Task has run on this Compute Node -since it was assigned to the Pool. -""") + /** + * This property is present only if at least one Task has run on this Compute Node + * since it was assigned to the Pool. + */ recentTasks?: TaskInformation[]; - @doc(""" -Batch will retry Tasks when a recovery operation is triggered on a Node. -Examples of recovery operations include (but are not limited to) when an -unhealthy Node is rebooted or a Compute Node disappeared due to host failure. -Retries due to recovery operations are independent of and are not counted -against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal -retry due to a recovery operation may occur. Because of this, all Tasks should -be idempotent. This means Tasks need to tolerate being interrupted and -restarted without causing any corruption or duplicate data. The best practice -for long running Tasks is to use some form of checkpointing. In some cases the -StartTask may be re-run even though the Compute Node was not rebooted. Special -care should be taken to avoid StartTasks which create breakaway process or -install/launch services from the StartTask working directory, as this will -block Batch from being able to re-run the StartTask. -""") + /** + * Batch will retry Tasks when a recovery operation is triggered on a Node. + * Examples of recovery operations include (but are not limited to) when an + * unhealthy Node is rebooted or a Compute Node disappeared due to host failure. + * Retries due to recovery operations are independent of and are not counted + * against the maxTaskRetryCount. Even if the maxTaskRetryCount is 0, an internal + * retry due to a recovery operation may occur. Because of this, all Tasks should + * be idempotent. This means Tasks need to tolerate being interrupted and + * restarted without causing any corruption or duplicate data. The best practice + * for long running Tasks is to use some form of checkpointing. In some cases the + * StartTask may be re-run even though the Compute Node was not rebooted. Special + * care should be taken to avoid StartTasks which create breakaway process or + * install/launch services from the StartTask working directory, as this will + * block Batch from being able to re-run the StartTask. + */ startTask?: StartTask; - @doc("Information about a StartTask running on a Compute Node.") + /** + * Information about a StartTask running on a Compute Node. + */ startTaskInfo?: StartTaskInformation; - @doc(""" -For Windows Nodes, the Batch service installs the Certificates to the specified -Certificate store and location. For Linux Compute Nodes, the Certificates are -stored in a directory inside the Task working directory and an environment -variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this -location. For Certificates with visibility of 'remoteUser', a 'certs' directory -is created in the user's home directory (e.g., /home/{user-name}/certs) and -Certificates are placed in that directory. -""") + /** + * For Windows Nodes, the Batch service installs the Certificates to the specified + * Certificate store and location. For Linux Compute Nodes, the Certificates are + * stored in a directory inside the Task working directory and an environment + * variable AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this + * location. For Certificates with visibility of 'remoteUser', a 'certs' directory + * is created in the user's home directory (e.g., /home/{user-name}/certs) and + * Certificates are placed in that directory. + */ certificateReferences?: CertificateReference[]; - @doc("The list of errors that are currently being encountered by the Compute Node.") + /** + * The list of errors that are currently being encountered by the Compute Node. + */ errors?: ComputeNodeError[]; - @doc(""" -Whether this Compute Node is a dedicated Compute Node. If false, the Compute -Node is a Spot/Low-priority Compute Node. -""") + /** + * Whether this Compute Node is a dedicated Compute Node. If false, the Compute + * Node is a Spot/Low-priority Compute Node. + */ isDedicated?: boolean; - @doc("The endpoint configuration for the Compute Node.") + /** + * The endpoint configuration for the Compute Node. + */ endpointConfiguration?: ComputeNodeEndpointConfiguration; - @doc(""" -The Batch Compute Node agent is a program that runs on each Compute Node in the -Pool and provides Batch capability on the Compute Node. -""") + /** + * The Batch Compute Node agent is a program that runs on each Compute Node in the + * Pool and provides Batch capability on the Compute Node. + */ nodeAgentInfo?: NodeAgentInformation; - @doc("Info about the current state of the virtual machine.") + /** + * Info about the current state of the virtual machine. + */ virtualMachineInfo?: VirtualMachineInfo; } -@doc("Information about a Task running on a Compute Node.") +/** + * Information about a Task running on a Compute Node. + */ model TaskInformation { - @doc("The URL of the Task.") + /** + * The URL of the Task. + */ taskUrl?: string; - @doc("The ID of the Job to which the Task belongs.") + /** + * The ID of the Job to which the Task belongs. + */ jobId?: string; - @doc("The ID of the Task.") + /** + * The ID of the Task. + */ taskId?: string; - @doc("The ID of the subtask if the Task is a multi-instance Task.") + /** + * The ID of the subtask if the Task is a multi-instance Task. + */ subtaskId?: int32; - @doc("The state of the Task.") + /** + * The state of the Task. + */ taskState: TaskState; - @doc("Information about the execution of a Task.") + /** + * Information about the execution of a Task. + */ executionInfo?: TaskExecutionInformation; } -@doc("Information about a StartTask running on a Compute Node.") +/** + * Information about a StartTask running on a Compute Node. + */ model StartTaskInformation { - @doc("The state of the StartTask on the Compute Node.") + /** + * The state of the StartTask on the Compute Node. + */ state: StartTaskState; - @doc(""" -This value is reset every time the Task is restarted or retried (that is, this -is the most recent time at which the StartTask started running). -""") + /** + * This value is reset every time the Task is restarted or retried (that is, this + * is the most recent time at which the StartTask started running). + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime: utcDateTime; - @doc(""" -This is the end time of the most recent run of the StartTask, if that run has -completed (even if that run failed and a retry is pending). This element is not -present if the StartTask is currently running. -""") + /** + * This is the end time of the most recent run of the StartTask, if that run has + * completed (even if that run failed and a retry is pending). This element is not + * present if the StartTask is currently running. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime?: utcDateTime; - @doc(""" -This property is set only if the StartTask is in the completed state. In -general, the exit code for a process reflects the specific convention -implemented by the application developer for that process. If you use the exit -code value to make decisions in your code, be sure that you know the exit code -convention used by the application process. However, if the Batch service -terminates the StartTask (due to timeout, or user termination via the API) you -may see an operating system-defined exit code. -""") + /** + * This property is set only if the StartTask is in the completed state. In + * general, the exit code for a process reflects the specific convention + * implemented by the application developer for that process. If you use the exit + * code value to make decisions in your code, be sure that you know the exit code + * convention used by the application process. However, if the Batch service + * terminates the StartTask (due to timeout, or user termination via the API) you + * may see an operating system-defined exit code. + */ exitCode?: int32; - @doc("This property is set only if the Task runs in a container context.") + /** + * This property is set only if the Task runs in a container context. + */ containerInfo?: TaskContainerExecutionInformation; - @doc(""" -This property is set only if the Task is in the completed state and encountered -a failure. -""") + /** + * This property is set only if the Task is in the completed state and encountered + * a failure. + */ failureInfo?: TaskFailureInformation; - @doc(""" -Task application failures (non-zero exit code) are retried, pre-processing -errors (the Task could not be run) and file upload errors are not retried. The -Batch service will retry the Task up to the limit specified by the constraints. -""") + /** + * Task application failures (non-zero exit code) are retried, pre-processing + * errors (the Task could not be run) and file upload errors are not retried. The + * Batch service will retry the Task up to the limit specified by the constraints. + */ retryCount: int32; - @doc(""" -This element is present only if the Task was retried (i.e. retryCount is -nonzero). If present, this is typically the same as startTime, but may be -different if the Task has been restarted for reasons other than retry; for -example, if the Compute Node was rebooted during a retry, then the startTime is -updated but the lastRetryTime is not. -""") + /** + * This element is present only if the Task was retried (i.e. retryCount is + * nonzero). If present, this is typically the same as startTime, but may be + * different if the Task has been restarted for reasons other than retry; for + * example, if the Compute Node was rebooted during a retry, then the startTime is + * updated but the lastRetryTime is not. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastRetryTime?: utcDateTime; - @doc(""" -If the value is 'failed', then the details of the failure can be found in the -failureInfo property. -""") + /** + * If the value is 'failed', then the details of the failure can be found in the + * failureInfo property. + */ result?: TaskExecutionResult; } -@doc("An error encountered by a Compute Node.") +/** + * An error encountered by a Compute Node. + */ model ComputeNodeError { - @doc(""" -An identifier for the Compute Node error. Codes are invariant and are intended -to be consumed programmatically. -""") + /** + * An identifier for the Compute Node error. Codes are invariant and are intended + * to be consumed programmatically. + */ code?: string; - @doc(""" -A message describing the Compute Node error, intended to be suitable for -display in a user interface. -""") + /** + * A message describing the Compute Node error, intended to be suitable for + * display in a user interface. + */ message?: string; - @doc("The list of additional error details related to the Compute Node error.") + /** + * The list of additional error details related to the Compute Node error. + */ errorDetails?: NameValuePair[]; } -@doc("The endpoint configuration for the Compute Node.") +/** + * The endpoint configuration for the Compute Node. + */ model ComputeNodeEndpointConfiguration { - @doc("The list of inbound endpoints that are accessible on the Compute Node.") + /** + * The list of inbound endpoints that are accessible on the Compute Node. + */ inboundEndpoints: InboundEndpoint[]; } -@doc("An inbound endpoint on a Compute Node.") +/** + * An inbound endpoint on a Compute Node. + */ model InboundEndpoint { - @doc("The name of the endpoint.") + /** + * The name of the endpoint. + */ name: string; - @doc("The protocol of the endpoint.") + /** + * The protocol of the endpoint. + */ protocol: InboundEndpointProtocol; - @doc("The public IP address of the Compute Node.") + /** + * The public IP address of the Compute Node. + */ publicIPAddress: string; - @doc("The public fully qualified domain name for the Compute Node.") + /** + * The public fully qualified domain name for the Compute Node. + */ @projectedName("json", "publicFQDN") publicFqdn: string; - @doc("The public port number of the endpoint.") + /** + * The public port number of the endpoint. + */ frontendPort: int32; - @doc("The backend port number of the endpoint.") + /** + * The backend port number of the endpoint. + */ backendPort: int32; } -@doc(""" -The Batch Compute Node agent is a program that runs on each Compute Node in the -Pool and provides Batch capability on the Compute Node. -""") +/** + * The Batch Compute Node agent is a program that runs on each Compute Node in the + * Pool and provides Batch capability on the Compute Node. + */ model NodeAgentInformation { - @doc(""" -This version number can be checked against the Compute Node agent release notes -located at -https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md. -""") + /** + * This version number can be checked against the Compute Node agent release notes + * located at + * https://github.com/Azure/Batch/blob/master/changelogs/nodeagent/CHANGELOG.md. + */ version: string; - @doc(""" -This is the most recent time that the Compute Node agent was updated to a new -version. -""") + /** + * This is the most recent time that the Compute Node agent was updated to a new + * version. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdateTime: utcDateTime; } -@doc("Info about the current state of the virtual machine.") +/** + * Info about the current state of the virtual machine. + */ model VirtualMachineInfo { - @doc(""" -A reference to an Azure Virtual Machines Marketplace Image or a Shared Image -Gallery Image. To get the list of all Azure Marketplace Image references -verified by Azure Batch, see the 'List Supported Images' operation. -""") + /** + * A reference to an Azure Virtual Machines Marketplace Image or a Shared Image + * Gallery Image. To get the list of all Azure Marketplace Image references + * verified by Azure Batch, see the 'List Supported Images' operation. + */ imageReference?: ImageReference; } -@doc("Options for rebooting a Compute Node.") +/** + * Options for rebooting a Compute Node. + */ model NodeRebootParameters { - @doc("The default value is requeue.") + /** + * The default value is requeue. + */ nodeRebootOption?: ComputeNodeRebootOption; } -@doc("Options for reimaging a Compute Node.") +/** + * Options for reimaging a Compute Node. + */ model NodeReimageParameters { - @doc("The default value is requeue.") + /** + * The default value is requeue. + */ nodeReimageOption?: ComputeNodeReimageOption; } -@doc("Options for disabling scheduling on a Compute Node.") +/** + * Options for disabling scheduling on a Compute Node. + */ model NodeDisableSchedulingParameters { - @doc("The default value is requeue.") + /** + * The default value is requeue. + */ nodeDisableSchedulingOption?: DisableComputeNodeSchedulingOption; } -@doc("The remote login settings for a Compute Node.") +/** + * The remote login settings for a Compute Node. + */ model ComputeNodeGetRemoteLoginSettingsResult { - @doc("The IP address used for remote login to the Compute Node.") + /** + * The IP address used for remote login to the Compute Node. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key remoteLoginIPAddress: string; - @doc("The port used for remote login to the Compute Node.") + /** + * The port used for remote login to the Compute Node. + */ remoteLoginPort: int32; } -@doc("The Azure Batch service log files upload configuration for a Compute Node.") +/** + * The Azure Batch service log files upload configuration for a Compute Node. + */ model UploadBatchServiceLogsConfiguration { - @doc(""" -If a user assigned managed identity is not being used, the URL must include a -Shared Access Signature (SAS) granting write permissions to the container. The -SAS duration must allow enough time for the upload to finish. The start time -for SAS is optional and recommended to not be specified. -""") + /** + * If a user assigned managed identity is not being used, the URL must include a + * Shared Access Signature (SAS) granting write permissions to the container. The + * SAS duration must allow enough time for the upload to finish. The start time + * for SAS is optional and recommended to not be specified. + */ containerUrl: string; - @doc(""" -Any log file containing a log message in the time range will be uploaded. This -means that the operation might retrieve more logs than have been requested -since the entire log file is always uploaded, but the operation should not -retrieve fewer logs than have been requested. -""") + /** + * Any log file containing a log message in the time range will be uploaded. This + * means that the operation might retrieve more logs than have been requested + * since the entire log file is always uploaded, but the operation should not + * retrieve fewer logs than have been requested. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startTime: utcDateTime; - @doc(""" -Any log file containing a log message in the time range will be uploaded. This -means that the operation might retrieve more logs than have been requested -since the entire log file is always uploaded, but the operation should not -retrieve fewer logs than have been requested. If omitted, the default is to -upload all logs available after the startTime. -""") + /** + * Any log file containing a log message in the time range will be uploaded. This + * means that the operation might retrieve more logs than have been requested + * since the entire log file is always uploaded, but the operation should not + * retrieve fewer logs than have been requested. If omitted, the default is to + * upload all logs available after the startTime. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endTime?: utcDateTime; - @doc("The identity must have write access to the Azure Blob Storage container.") + /** + * The identity must have write access to the Azure Blob Storage container. + */ identityReference?: ComputeNodeIdentityReference; } -@doc("The result of uploading Batch service log files from a specific Compute Node.") +/** + * The result of uploading Batch service log files from a specific Compute Node. + */ @resource("pools/{poolId}/nodes/{nodeId}/uploadbatchservicelogs") model UploadBatchServiceLogsResult { - @doc(""" -The virtual directory name is part of the blob name for each log file uploaded, -and it is built based poolId, nodeId and a unique identifier. -""") + /** + * The virtual directory name is part of the blob name for each log file uploaded, + * and it is built based poolId, nodeId and a unique identifier. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key virtualDirectoryName: string; - @doc("The number of log files which will be uploaded.") + /** + * The number of log files which will be uploaded. + */ numberOfFilesUploaded: int32; } -@doc("The result of listing the Compute Nodes in a Pool.") +/** + * The result of listing the Compute Nodes in a Pool. + */ @pagedResult model ComputeNodeListResult { - @doc("The list of Compute Nodes.") + /** + * The list of Compute Nodes. + */ @items value?: ComputeNode[]; - @doc("The URL to get the next set of results.") + /** + * The URL to get the next set of results. + */ @nextLink @projectedName("json", "odata.nextLink") odataNextLink?: string; } -@doc("The configuration for virtual machine extension instance view.") +/** + * The configuration for virtual machine extension instance view. + */ model NodeVMExtension { - @doc("The provisioning state of the virtual machine extension.") + /** + * The provisioning state of the virtual machine extension. + */ provisioningState?: string; - @doc("The configuration for virtual machine extensions.") + /** + * The configuration for virtual machine extensions. + */ vmExtension?: VMExtension; - @doc("The vm extension instance view.") + /** + * The vm extension instance view. + */ instanceView?: VMExtensionInstanceView; } -@doc("The vm extension instance view.") +/** + * The vm extension instance view. + */ model VMExtensionInstanceView { - @doc("The name of the vm extension instance view.") + /** + * The name of the vm extension instance view. + */ name?: string; - @doc("The resource status information.") + /** + * The resource status information. + */ statuses?: InstanceViewStatus[]; - @doc("The resource status information.") + /** + * The resource status information. + */ subStatuses?: InstanceViewStatus[]; } -@doc("The instance view status.") +/** + * The instance view status. + */ model InstanceViewStatus { - @doc("The status code.") + /** + * The status code. + */ code?: string; - @doc("The localized label for the status.") + /** + * The localized label for the status. + */ displayStatus?: string; - @doc("Level code.") + /** + * Level code. + */ level?: StatusLevelTypes; - @doc("The detailed status message.") + /** + * The detailed status message. + */ message?: string; - @doc("The time of the status.") + /** + * The time of the status. + */ time?: string; } -@doc("The result of listing the Compute Node extensions in a Node.") +/** + * The result of listing the Compute Node extensions in a Node. + */ @pagedResult model NodeVMExtensionList { - @doc("The list of Compute Node extensions.") + /** + * The list of Compute Node extensions. + */ @items value?: NodeVMExtension[]; - @doc("The URL to get the next set of results.") + /** + * The URL to get the next set of results. + */ @nextLink @projectedName("json", "odata.nextLink") odataNextLink?: string; diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/routes.tsp index e812d68ecc..7e0ea8b70b 100644 --- a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/routes.tsp @@ -8,91 +8,95 @@ using TypeSpec.Http; namespace Azure.Batch; interface ApplicationOperations { + /** + * This operation returns only Applications and versions that are available for + * use on Compute Nodes; that is, that can be used in an Package reference. For + * administrator information about applications and versions that are not yet + * available to Compute Nodes, use the Azure portal or the Azure Resource Manager + * API. + */ @summary("Lists all of the applications available in the specified Account.") - @doc(""" -This operation returns only Applications and versions that are available for -use on Compute Nodes; that is, that can be used in an Package reference. For -administrator information about applications and versions that are not yet -available to Compute Nodes, use the Azure portal or the Azure Resource Manager -API. -""") - List is Azure.Core.ResourceList< + list is Azure.Core.ResourceList< Application, { parameters: { - @doc(""" -The maximum number of items to return in the response. A maximum of 1000 -applications can be returned. -""") + /** + * The maximum number of items to return in the response. A maximum of 1000 + * applications can be returned. + */ @maxValue(1000) @minValue(1) @query("maxresults") maxResults?: int32 = 1000; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }; } >; + /** + * This operation returns only Applications and versions that are available for + * use on Compute Nodes; that is, that can be used in an Package reference. For + * administrator information about Applications and versions that are not yet + * available to Compute Nodes, use the Azure portal or the Azure Resource Manager + * API. + */ @summary("Gets information about the specified Application.") - @doc(""" -This operation returns only Applications and versions that are available for -use on Compute Nodes; that is, that can be used in an Package reference. For -administrator information about Applications and versions that are not yet -available to Compute Nodes, use the Azure portal or the Azure Resource Manager -API. -""") - Get is Azure.Core.ResourceRead< + get is Azure.Core.ResourceRead< Application, { parameters: { - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }; @@ -101,986 +105,1068 @@ directly. } interface PoolOperations { + /** + * If you do not specify a $filter clause including a poolId, the response + * includes all Pools that existed in the Account in the time range of the + * returned aggregation intervals. If you do not specify a $filter clause + * including a startTime or endTime these filters default to the start and end + * times of the last aggregation interval currently available; that is, only the + * last aggregation interval is returned. + */ @summary(""" Lists the usage metrics, aggregated by Pool across individual time intervals, for the specified Account. """) - @doc(""" -If you do not specify a $filter clause including a poolId, the response -includes all Pools that existed in the Account in the time range of the -returned aggregation intervals. If you do not specify a $filter clause -including a startTime or endTime these filters default to the start and end -times of the last aggregation interval currently available; that is, only the -last aggregation interval is returned. -""") - ListUsageMetrics is Azure.Core.ResourceList< + listUsageMetrics is Azure.Core.ResourceList< PoolUsageMetrics, { parameters: { - @doc(""" -The earliest time from which to include metrics. This must be at least two and -a half hours before the current time. If not specified this defaults to the -start time of the last aggregation interval currently available. -""") + /** + * The earliest time from which to include metrics. This must be at least two and + * a half hours before the current time. If not specified this defaults to the + * start time of the last aggregation interval currently available. + */ @query("starttime") startTime?: utcDateTime; - @doc(""" -The latest time from which to include metrics. This must be at least two hours -before the current time. If not specified this defaults to the end time of the -last aggregation interval currently available. -""") + /** + * The latest time from which to include metrics. This must be at least two hours + * before the current time. If not specified this defaults to the end time of the + * last aggregation interval currently available. + */ @query("endtime") endTime?: utcDateTime; - @doc(""" -An OData $filter clause. For more information on constructing this filter, see -https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. -""") + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-account-usage-metrics. + */ @query("$filter") $filter?: string; - @doc(""" -The maximum number of items to return in the response. A maximum of 1000 -results will be returned. -""") + /** + * The maximum number of items to return in the response. A maximum of 1000 + * results will be returned. + */ @maxValue(1000) @minValue(1) @query("maxresults") maxResults?: int32 = 1000; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }; } >; + /** + * Statistics are aggregated across all Pools that have ever existed in the + * Account, from Account creation to the last update time of the statistics. The + * statistics may not be immediately available. The Batch service performs + * periodic roll-up of statistics. The typical delay is about 30 minutes. + */ @summary("Gets lifetime summary statistics for all of the Pools in the specified Account.") - @doc(""" -Statistics are aggregated across all Pools that have ever existed in the -Account, from Account creation to the last update time of the statistics. The -statistics may not be immediately available. The Batch service performs -periodic roll-up of statistics. The typical delay is about 30 minutes. -""") @route("/lifetimepoolstats") @get - GetAllLifetimeStatistics is Azure.Core.Foundations.Operation< + getAllLifetimeStatistics is Azure.Core.Foundations.Operation< { - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, PoolStatistics >; + /** + * When naming Pools, avoid including sensitive information such as user names or + * secret project names. This information may appear in telemetry logs accessible + * to Microsoft Support engineers. + */ @summary("Adds a Pool to the specified Account.") - @doc(""" -When naming Pools, avoid including sensitive information such as user names or -secret project names. This information may appear in telemetry logs accessible -to Microsoft Support engineers. -""") @route("/pools") @post - Add is Azure.Core.Foundations.Operation< + add is Azure.Core.Foundations.Operation< { - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc("The Pool to be added.") + /** + * The Pool to be added. + */ @body pool: BatchPool; }, void >; + /** + * Lists all of the Pools in the specified Account. + */ @summary("Lists all of the Pools in the specified Account.") - @doc("Lists all of the Pools in the specified Account.") @route("/pools") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc(""" -An OData $filter clause. For more information on constructing this filter, see -https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools. -""") + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-pools. + */ @query("$filter") $filter?: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc("An OData $expand clause.") + /** + * An OData $expand clause. + */ @query("$expand") $expand?: string; - @doc(""" -The maximum number of items to return in the response. A maximum of 1000 Pools -can be returned. -""") + /** + * The maximum number of items to return in the response. A maximum of 1000 Pools + * can be returned. + */ @maxValue(1000) @minValue(1) @query("maxresults") maxResults?: int32 = 1000; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, BatchPoolListResult >; + /** + * When you request that a Pool be deleted, the following actions occur: the Pool + * state is set to deleting; any ongoing resize operation on the Pool are stopped; + * the Batch service starts resizing the Pool to zero Compute Nodes; any Tasks + * running on existing Compute Nodes are terminated and requeued (as if a resize + * Pool operation had been requested with the default requeue option); finally, + * the Pool is removed from the system. Because running Tasks are requeued, the + * user can rerun these Tasks by updating their Job to target a different Pool. + * The Tasks can then run on the new Pool. If you want to override the requeue + * behavior, then you should call resize Pool explicitly to shrink the Pool to + * zero size before deleting the Pool. If you call an Update, Patch or Delete API + * on a Pool in the deleting state, it will fail with HTTP status code 409 with + * error code PoolBeingDeleted. + */ @summary("Deletes a Pool from the specified Account.") - @doc(""" -When you request that a Pool be deleted, the following actions occur: the Pool -state is set to deleting; any ongoing resize operation on the Pool are stopped; -the Batch service starts resizing the Pool to zero Compute Nodes; any Tasks -running on existing Compute Nodes are terminated and requeued (as if a resize -Pool operation had been requested with the default requeue option); finally, -the Pool is removed from the system. Because running Tasks are requeued, the -user can rerun these Tasks by updating their Job to target a different Pool. -The Tasks can then run on the new Pool. If you want to override the requeue -behavior, then you should call resize Pool explicitly to shrink the Pool to -zero size before deleting the Pool. If you call an Update, Patch or Delete API -on a Pool in the deleting state, it will fail with HTTP status code 409 with -error code PoolBeingDeleted. -""") @route("/pools/{poolId}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool to delete.") + /** + * The ID of the Pool to delete. + */ @path poolId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, void >; - @doc("Gets basic properties of a Pool.") + /** + * Gets basic properties of a Pool. + */ @route("/pools/{poolId}") @head - Exists is Azure.Core.Foundations.Operation< + exists is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool to get.") + /** + * The ID of the Pool to get. + */ @path poolId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, void >; - @doc("Gets information about the specified Pool.") + /** + * Gets information about the specified Pool. + */ @route("/pools/{poolId}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool to get.") + /** + * The ID of the Pool to get. + */ @path poolId: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc("An OData $expand clause.") + /** + * An OData $expand clause. + */ @query("$expand") $expand?: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, BatchPool >; + /** + * This only replaces the Pool properties specified in the request. For example, + * if the Pool has a StartTask associated with it, and a request does not specify + * a StartTask element, then the Pool keeps the existing StartTask. + */ @summary("Updates the properties of the specified Pool.") - @doc(""" -This only replaces the Pool properties specified in the request. For example, -if the Pool has a StartTask associated with it, and a request does not specify -a StartTask element, then the Pool keeps the existing StartTask. -""") @route("/pools/{poolId}") @patch - Patch is Azure.Core.Foundations.Operation< + patch is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool to update.") + /** + * The ID of the Pool to update. + */ @path poolId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body poolUpdate: BatchPoolUpdate; }, void >; + /** + * Disables automatic scaling for a Pool. + */ @summary("Disables automatic scaling for a Pool.") - @doc("Disables automatic scaling for a Pool.") @route("/pools/{poolId}/disableautoscale") @post - DisableAutoScale is Azure.Core.Foundations.Operation< + disableAutoScale is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool on which to disable automatic scaling.") + /** + * The ID of the Pool on which to disable automatic scaling. + */ @path poolId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, void >; + /** + * You cannot enable automatic scaling on a Pool if a resize operation is in + * progress on the Pool. If automatic scaling of the Pool is currently disabled, + * you must specify a valid autoscale formula as part of the request. If automatic + * scaling of the Pool is already enabled, you may specify a new autoscale formula + * and/or a new evaluation interval. You cannot call this API for the same Pool + * more than once every 30 seconds. + */ @summary("Enables automatic scaling for a Pool.") - @doc(""" -You cannot enable automatic scaling on a Pool if a resize operation is in -progress on the Pool. If automatic scaling of the Pool is currently disabled, -you must specify a valid autoscale formula as part of the request. If automatic -scaling of the Pool is already enabled, you may specify a new autoscale formula -and/or a new evaluation interval. You cannot call this API for the same Pool -more than once every 30 seconds. -""") @route("/pools/{poolId}/enableautoscale") @post - EnableAutoScale is Azure.Core.Foundations.Operation< + enableAutoScale is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool on which to enable automatic scaling.") + /** + * The ID of the Pool on which to enable automatic scaling. + */ @path poolId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body parameters: BatchPoolEnableAutoScaleParameters; }, void >; + /** + * This API is primarily for validating an autoscale formula, as it simply returns + * the result without applying the formula to the Pool. The Pool must have auto + * scaling enabled in order to evaluate a formula. + */ @summary("Gets the result of evaluating an automatic scaling formula on the Pool.") - @doc(""" -This API is primarily for validating an autoscale formula, as it simply returns -the result without applying the formula to the Pool. The Pool must have auto -scaling enabled in order to evaluate a formula. -""") @route("/pools/{poolId}/evaluateautoscale") @post - EvaluateAutoScale is Azure.Core.Foundations.Operation< + evaluateAutoScale is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool on which to evaluate the automatic scaling formula.") + /** + * The ID of the Pool on which to evaluate the automatic scaling formula. + */ @path poolId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body parameters: BatchPoolEvaluateAutoScaleParameters; }, AutoScaleRun >; + /** + * You can only resize a Pool when its allocation state is steady. If the Pool is + * already resizing, the request fails with status code 409. When you resize a + * Pool, the Pool's allocation state changes from steady to resizing. You cannot + * resize Pools which are configured for automatic scaling. If you try to do this, + * the Batch service returns an error 409. If you resize a Pool downwards, the + * Batch service chooses which Compute Nodes to remove. To remove specific Compute + * Nodes, use the Pool remove Compute Nodes API instead. + */ @summary("Changes the number of Compute Nodes that are assigned to a Pool.") - @doc(""" -You can only resize a Pool when its allocation state is steady. If the Pool is -already resizing, the request fails with status code 409. When you resize a -Pool, the Pool's allocation state changes from steady to resizing. You cannot -resize Pools which are configured for automatic scaling. If you try to do this, -the Batch service returns an error 409. If you resize a Pool downwards, the -Batch service chooses which Compute Nodes to remove. To remove specific Compute -Nodes, use the Pool remove Compute Nodes API instead. -""") @route("/pools/{poolId}/resize") @post - Resize is Azure.Core.Foundations.Operation< + resize is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool to resize.") + /** + * The ID of the Pool to resize. + */ @path poolId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body parameters: BatchPoolResizeParameters; }, void >; + /** + * This does not restore the Pool to its previous state before the resize + * operation: it only stops any further changes being made, and the Pool maintains + * its current state. After stopping, the Pool stabilizes at the number of Compute + * Nodes it was at when the stop operation was done. During the stop operation, + * the Pool allocation state changes first to stopping and then to steady. A + * resize operation need not be an explicit resize Pool request; this API can also + * be used to halt the initial sizing of the Pool when it is created. + */ @summary("Stops an ongoing resize operation on the Pool.") - @doc(""" -This does not restore the Pool to its previous state before the resize -operation: it only stops any further changes being made, and the Pool maintains -its current state. After stopping, the Pool stabilizes at the number of Compute -Nodes it was at when the stop operation was done. During the stop operation, -the Pool allocation state changes first to stopping and then to steady. A -resize operation need not be an explicit resize Pool request; this API can also -be used to halt the initial sizing of the Pool when it is created. -""") @route("/pools/{poolId}/stopresize") @post - StopResize is Azure.Core.Foundations.Operation< + stopResize is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool whose resizing you want to stop.") + /** + * The ID of the Pool whose resizing you want to stop. + */ @path poolId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, void >; + /** + * This fully replaces all the updatable properties of the Pool. For example, if + * the Pool has a StartTask associated with it and if StartTask is not specified + * with this request, then the Batch service will remove the existing StartTask. + */ @summary("Updates the properties of the specified Pool.") - @doc(""" -This fully replaces all the updatable properties of the Pool. For example, if -the Pool has a StartTask associated with it and if StartTask is not specified -with this request, then the Batch service will remove the existing StartTask. -""") @route("/pools/{poolId}/updateproperties") @post - UpdateProperties is Azure.Core.Foundations.Operation< + updateProperties is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool to update.") + /** + * The ID of the Pool to update. + */ @path poolId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body poolUpdatePropertiesParameter: BatchPool; }, void >; + /** + * This operation can only run when the allocation state of the Pool is steady. + * When this operation runs, the allocation state changes from steady to resizing. + * Each request may remove up to 100 nodes. + */ @summary("Removes Compute Nodes from the specified Pool.") - @doc(""" -This operation can only run when the allocation state of the Pool is steady. -When this operation runs, the allocation state changes from steady to resizing. -Each request may remove up to 100 nodes. -""") @route("/pools/{poolId}/removenodes") @post - RemoveNodes is Azure.Core.Foundations.Operation< + removeNodes is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool from which you want to remove Compute Nodes.") + /** + * The ID of the Pool from which you want to remove Compute Nodes. + */ @path poolId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body parameters: NodeRemoveParameters; }, @@ -1089,102 +1175,110 @@ not been modified since the specified time. } interface AccountOperations { + /** + * Lists all Virtual Machine Images supported by the Azure Batch service. + */ @summary("Lists all Virtual Machine Images supported by the Azure Batch service.") - @doc("Lists all Virtual Machine Images supported by the Azure Batch service.") - ListSupportedImages is Azure.Core.ResourceList< + listSupportedImages is Azure.Core.ResourceList< ImageInformation, { parameters: { - @doc(""" -An OData $filter clause. For more information on constructing this filter, see -https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. -""") + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-support-images. + */ @query("$filter") $filter?: string; - @doc(""" -The maximum number of items to return in the response. A maximum of 1000 -results will be returned. -""") + /** + * The maximum number of items to return in the response. A maximum of 1000 + * results will be returned. + */ @maxValue(1000) @minValue(1) @query("maxresults") maxResults?: int32 = 1000; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }; } >; - @doc(""" -Gets the number of Compute Nodes in each state, grouped by Pool. Note that the -numbers returned may not always be up to date. If you need exact node counts, -use a list query. -""") - ListPoolNodeCounts is Azure.Core.ResourceList< + /** + * Gets the number of Compute Nodes in each state, grouped by Pool. Note that the + * numbers returned may not always be up to date. If you need exact node counts, + * use a list query. + */ + listPoolNodeCounts is Azure.Core.ResourceList< PoolNodeCounts, { parameters: { - @doc(""" -An OData $filter clause. For more information on constructing this filter, see -https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch. -""") + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch. + */ @query("$filter") $filter?: string; - @doc("The maximum number of items to return in the response.") + /** + * The maximum number of items to return in the response. + */ @maxValue(10) @minValue(1) @query("maxresults") maxResults?: int32 = 10; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }; @@ -1193,885 +1287,961 @@ directly. } interface JobOperations { + /** + * Statistics are aggregated across all Jobs that have ever existed in the + * Account, from Account creation to the last update time of the statistics. The + * statistics may not be immediately available. The Batch service performs + * periodic roll-up of statistics. The typical delay is about 30 minutes. + */ @summary("Gets lifetime summary statistics for all of the Jobs in the specified Account.") - @doc(""" -Statistics are aggregated across all Jobs that have ever existed in the -Account, from Account creation to the last update time of the statistics. The -statistics may not be immediately available. The Batch service performs -periodic roll-up of statistics. The typical delay is about 30 minutes. -""") @route("/lifetimejobstats") @get - GetAllLifetimeStatistics is Azure.Core.Foundations.Operation< + getAllLifetimeStatistics is Azure.Core.Foundations.Operation< { - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, JobStatistics >; + /** + * Deleting a Job also deletes all Tasks that are part of that Job, and all Job + * statistics. This also overrides the retention period for Task data; that is, if + * the Job contains Tasks which are still retained on Compute Nodes, the Batch + * services deletes those Tasks' working directories and all their contents. When + * a Delete Job request is received, the Batch service sets the Job to the + * deleting state. All update operations on a Job that is in deleting state will + * fail with status code 409 (Conflict), with additional information indicating + * that the Job is being deleted. + */ @summary("Deletes a Job.") - @doc(""" -Deleting a Job also deletes all Tasks that are part of that Job, and all Job -statistics. This also overrides the retention period for Task data; that is, if -the Job contains Tasks which are still retained on Compute Nodes, the Batch -services deletes those Tasks' working directories and all their contents. When -a Delete Job request is received, the Batch service sets the Job to the -deleting state. All update operations on a Job that is in deleting state will -fail with status code 409 (Conflict), with additional information indicating -that the Job is being deleted. -""") @route("/jobs/{jobId}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job to delete.") + /** + * The ID of the Job to delete. + */ @path jobId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, void >; + /** + * Gets information about the specified Job. + */ @summary("Gets information about the specified Job.") - @doc("Gets information about the specified Job.") @route("/jobs/{jobId}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job.") + /** + * The ID of the Job. + */ @path jobId: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc("An OData $expand clause.") + /** + * An OData $expand clause. + */ @query("$expand") $expand?: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, BatchJob >; + /** + * This replaces only the Job properties specified in the request. For example, if + * the Job has constraints, and a request does not specify the constraints + * element, then the Job keeps the existing constraints. + */ @summary("Updates the properties of the specified Job.") - @doc(""" -This replaces only the Job properties specified in the request. For example, if -the Job has constraints, and a request does not specify the constraints -element, then the Job keeps the existing constraints. -""") @route("/jobs/{jobId}") @patch - Patch is Azure.Core.Foundations.Operation< + patch is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job whose properties you want to update.") + /** + * The ID of the Job whose properties you want to update. + */ @path jobId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body jobUpdate: BatchJobUpdate; }, void >; + /** + * This fully replaces all the updatable properties of the Job. For example, if + * the Job has constraints associated with it and if constraints is not specified + * with this request, then the Batch service will remove the existing constraints. + */ @summary("Updates the properties of the specified Job.") - @doc(""" -This fully replaces all the updatable properties of the Job. For example, if -the Job has constraints associated with it and if constraints is not specified -with this request, then the Batch service will remove the existing constraints. -""") @route("/jobs/{jobId}") @put - Update is Azure.Core.Foundations.Operation< + update is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job whose properties you want to update.") + /** + * The ID of the Job whose properties you want to update. + */ @path jobId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body job: BatchJob; }, void >; + /** + * The Batch Service immediately moves the Job to the disabling state. Batch then + * uses the disableTasks parameter to determine what to do with the currently + * running Tasks of the Job. The Job remains in the disabling state until the + * disable operation is completed and all Tasks have been dealt with according to + * the disableTasks option; the Job then moves to the disabled state. No new Tasks + * are started under the Job until it moves back to active state. If you try to + * disable a Job that is in any state other than active, disabling, or disabled, + * the request fails with status code 409. + */ @summary("Disables the specified Job, preventing new Tasks from running.") - @doc(""" -The Batch Service immediately moves the Job to the disabling state. Batch then -uses the disableTasks parameter to determine what to do with the currently -running Tasks of the Job. The Job remains in the disabling state until the -disable operation is completed and all Tasks have been dealt with according to -the disableTasks option; the Job then moves to the disabled state. No new Tasks -are started under the Job until it moves back to active state. If you try to -disable a Job that is in any state other than active, disabling, or disabled, -the request fails with status code 409. -""") @route("/jobs/{jobId}/disable") @post - Disable is Azure.Core.Foundations.Operation< + disable is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job to disable.") + /** + * The ID of the Job to disable. + */ @path jobId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body parameters: BatchJobDisableParameters; }, void >; + /** + * When you call this API, the Batch service sets a disabled Job to the enabling + * state. After the this operation is completed, the Job moves to the active + * state, and scheduling of new Tasks under the Job resumes. The Batch service + * does not allow a Task to remain in the active state for more than 180 days. + * Therefore, if you enable a Job containing active Tasks which were added more + * than 180 days ago, those Tasks will not run. + */ @summary("Enables the specified Job, allowing new Tasks to run.") - @doc(""" -When you call this API, the Batch service sets a disabled Job to the enabling -state. After the this operation is completed, the Job moves to the active -state, and scheduling of new Tasks under the Job resumes. The Batch service -does not allow a Task to remain in the active state for more than 180 days. -Therefore, if you enable a Job containing active Tasks which were added more -than 180 days ago, those Tasks will not run. -""") @route("/jobs/{jobId}/enable") @post - Enable is Azure.Core.Foundations.Operation< + enable is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job to enable.") + /** + * The ID of the Job to enable. + */ @path jobId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, void >; + /** + * When a Terminate Job request is received, the Batch service sets the Job to the + * terminating state. The Batch service then terminates any running Tasks + * associated with the Job and runs any required Job release Tasks. Then the Job + * moves into the completed state. If there are any Tasks in the Job in the active + * state, they will remain in the active state. Once a Job is terminated, new + * Tasks cannot be added and any remaining active Tasks will not be scheduled. + */ @summary("Terminates the specified Job, marking it as completed.") - @doc(""" -When a Terminate Job request is received, the Batch service sets the Job to the -terminating state. The Batch service then terminates any running Tasks -associated with the Job and runs any required Job release Tasks. Then the Job -moves into the completed state. If there are any Tasks in the Job in the active -state, they will remain in the active state. Once a Job is terminated, new -Tasks cannot be added and any remaining active Tasks will not be scheduled. -""") @route("/jobs/{jobId}/terminate") @post - Terminate is Azure.Core.Foundations.Operation< + terminate is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job to terminate.") + /** + * The ID of the Job to terminate. + */ @path jobId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body parameters?: BatchJobTerminateParameters; }, void >; + /** + * The Batch service supports two ways to control the work done as part of a Job. + * In the first approach, the user specifies a Job Manager Task. The Batch service + * launches this Task when it is ready to start the Job. The Job Manager Task + * controls all other Tasks that run under this Job, by using the Task APIs. In + * the second approach, the user directly controls the execution of Tasks under an + * active Job, by using the Task APIs. Also note: when naming Jobs, avoid + * including sensitive information such as user names or secret project names. + * This information may appear in telemetry logs accessible to Microsoft Support + * engineers. + */ @summary("Adds a Job to the specified Account.") - @doc(""" -The Batch service supports two ways to control the work done as part of a Job. -In the first approach, the user specifies a Job Manager Task. The Batch service -launches this Task when it is ready to start the Job. The Job Manager Task -controls all other Tasks that run under this Job, by using the Task APIs. In -the second approach, the user directly controls the execution of Tasks under an -active Job, by using the Task APIs. Also note: when naming Jobs, avoid -including sensitive information such as user names or secret project names. -This information may appear in telemetry logs accessible to Microsoft Support -engineers. -""") @route("/jobs") @post - Add is Azure.Core.Foundations.Operation< + add is Azure.Core.Foundations.Operation< { - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc("The Job to be added.") + /** + * The Job to be added. + */ @body job: BatchJob; }, void >; + /** + * Lists all of the Jobs in the specified Account. + */ @summary("Lists all of the Jobs in the specified Account.") - @doc("Lists all of the Jobs in the specified Account.") @route("/jobs") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc(""" -An OData $filter clause. For more information on constructing this filter, see -https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs. -""") + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs. + */ @query("$filter") $filter?: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc("An OData $expand clause.") + /** + * An OData $expand clause. + */ @query("$expand") $expand?: string; - @doc(""" -The maximum number of items to return in the response. A maximum of 1000 Jobs -can be returned. -""") + /** + * The maximum number of items to return in the response. A maximum of 1000 Jobs + * can be returned. + */ @maxValue(1000) @minValue(1) @query("maxresults") maxResults?: int32 = 1000; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, BatchJobListResult >; + /** + * Lists the Jobs that have been created under the specified Job Schedule. + */ @summary("Lists the Jobs that have been created under the specified Job Schedule.") - @doc("Lists the Jobs that have been created under the specified Job Schedule.") @route("/jobschedules/{jobScheduleId}/jobs") @get - ListFromJobSchedule is Azure.Core.Foundations.Operation< + listFromJobSchedule is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job Schedule from which you want to get a list of Jobs.") + /** + * The ID of the Job Schedule from which you want to get a list of Jobs. + */ @path jobScheduleId: string; - @doc(""" -An OData $filter clause. For more information on constructing this filter, see -https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. -""") + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-jobs-in-a-job-schedule. + */ @query("$filter") $filter?: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc("An OData $expand clause.") + /** + * An OData $expand clause. + */ @query("$expand") $expand?: string; - @doc(""" -The maximum number of items to return in the response. A maximum of 1000 Jobs -can be returned. -""") + /** + * The maximum number of items to return in the response. A maximum of 1000 Jobs + * can be returned. + */ @maxValue(1000) @minValue(1) @query("maxresults") maxResults?: int32 = 1000; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, BatchJobListResult >; + /** + * This API returns the Job Preparation and Job Release Task status on all Compute + * Nodes that have run the Job Preparation or Job Release Task. This includes + * Compute Nodes which have since been removed from the Pool. If this API is + * invoked on a Job which has no Job Preparation or Job Release Task, the Batch + * service returns HTTP status code 409 (Conflict) with an error code of + * JobPreparationTaskNotSpecified. + */ @summary(""" Lists the execution status of the Job Preparation and Job Release Task for the specified Job across the Compute Nodes where the Job has run. -""") - @doc(""" -This API returns the Job Preparation and Job Release Task status on all Compute -Nodes that have run the Job Preparation or Job Release Task. This includes -Compute Nodes which have since been removed from the Pool. If this API is -invoked on a Job which has no Job Preparation or Job Release Task, the Batch -service returns HTTP status code 409 (Conflict) with an error code of -JobPreparationTaskNotSpecified. """) @route("/jobs/{jobId}/jobpreparationandreleasetaskstatus") @get - ListPreparationAndReleaseTaskStatus is Azure.Core.Foundations.Operation< + listPreparationAndReleaseTaskStatus is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job.") + /** + * The ID of the Job. + */ @path jobId: string; - @doc(""" -An OData $filter clause. For more information on constructing this filter, see -https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. -""") + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-preparation-and-release-status. + */ @query("$filter") $filter?: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc(""" -The maximum number of items to return in the response. A maximum of 1000 Tasks -can be returned. -""") + /** + * The maximum number of items to return in the response. A maximum of 1000 Tasks + * can be returned. + */ @maxValue(1000) @minValue(1) @query("maxresults") maxResults?: int32 = 1000; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, BatchJobListPreparationAndReleaseTaskStatusResult >; + /** + * Task counts provide a count of the Tasks by active, running or completed Task + * state, and a count of Tasks which succeeded or failed. Tasks in the preparing + * state are counted as running. Note that the numbers returned may not always be + * up to date. If you need exact task counts, use a list query. + */ @summary("Gets the Task counts for the specified Job.") - @doc(""" -Task counts provide a count of the Tasks by active, running or completed Task -state, and a count of Tasks which succeeded or failed. Tasks in the preparing -state are counted as running. Note that the numbers returned may not always be -up to date. If you need exact task counts, use a list query. -""") @route("/jobs/{jobId}/taskcounts") @get - GetTaskCounts is Azure.Core.Foundations.Operation< + getTaskCounts is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job.") + /** + * The ID of the Job. + */ @path jobId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, @@ -2080,244 +2250,278 @@ directly. } interface CertificateOperations { + /** + * Adds a Certificate to the specified Account. + */ @summary("Adds a Certificate to the specified Account.") - @doc("Adds a Certificate to the specified Account.") @route("/certificates") @post - Add is Azure.Core.Foundations.Operation< + add is Azure.Core.Foundations.Operation< { - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc("The Certificate to be added.") + /** + * The Certificate to be added. + */ @body certificate: Certificate; }, void >; + /** + * Lists all of the Certificates that have been added to the specified Account. + */ @summary("Lists all of the Certificates that have been added to the specified Account.") - @doc("Lists all of the Certificates that have been added to the specified Account.") @route("/certificates") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc(""" -An OData $filter clause. For more information on constructing this filter, see -https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-certificates. -""") + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-certificates. + */ @query("$filter") $filter?: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc(""" -The maximum number of items to return in the response. A maximum of 1000 -Certificates can be returned. -""") + /** + * The maximum number of items to return in the response. A maximum of 1000 + * Certificates can be returned. + */ @maxValue(1000) @minValue(1) @query("maxresults") maxResults?: int32 = 1000; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, CertificateListResult >; + /** + * If you try to delete a Certificate that is being used by a Pool or Compute + * Node, the status of the Certificate changes to deleteFailed. If you decide that + * you want to continue using the Certificate, you can use this operation to set + * the status of the Certificate back to active. If you intend to delete the + * Certificate, you do not need to run this operation after the deletion failed. + * You must make sure that the Certificate is not being used by any resources, and + * then you can try again to delete the Certificate. + */ @summary("Cancels a failed deletion of a Certificate from the specified Account.") - @doc(""" -If you try to delete a Certificate that is being used by a Pool or Compute -Node, the status of the Certificate changes to deleteFailed. If you decide that -you want to continue using the Certificate, you can use this operation to set -the status of the Certificate back to active. If you intend to delete the -Certificate, you do not need to run this operation after the deletion failed. -You must make sure that the Certificate is not being used by any resources, and -then you can try again to delete the Certificate. -""") @route("/certificates(thumbprintAlgorithm={thumbprintAlgorithm},thumbprint={thumbprint})/canceldelete") @post - CancelDeletion is Azure.Core.Foundations.Operation< + cancelDeletion is Azure.Core.Foundations.Operation< { - @doc("The algorithm used to derive the thumbprint parameter. This must be sha1.") + /** + * The algorithm used to derive the thumbprint parameter. This must be sha1. + */ @path thumbprintAlgorithm: string; - @doc("The thumbprint of the Certificate being deleted.") + /** + * The thumbprint of the Certificate being deleted. + */ @path thumbprint: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, void >; + /** + * You cannot delete a Certificate if a resource (Pool or Compute Node) is using + * it. Before you can delete a Certificate, you must therefore make sure that the + * Certificate is not associated with any existing Pools, the Certificate is not + * installed on any Nodes (even if you remove a Certificate from a Pool, it is not + * removed from existing Compute Nodes in that Pool until they restart), and no + * running Tasks depend on the Certificate. If you try to delete a Certificate + * that is in use, the deletion fails. The Certificate status changes to + * deleteFailed. You can use Cancel Delete Certificate to set the status back to + * active if you decide that you want to continue using the Certificate. + */ @summary("Deletes a Certificate from the specified Account.") - @doc(""" -You cannot delete a Certificate if a resource (Pool or Compute Node) is using -it. Before you can delete a Certificate, you must therefore make sure that the -Certificate is not associated with any existing Pools, the Certificate is not -installed on any Nodes (even if you remove a Certificate from a Pool, it is not -removed from existing Compute Nodes in that Pool until they restart), and no -running Tasks depend on the Certificate. If you try to delete a Certificate -that is in use, the deletion fails. The Certificate status changes to -deleteFailed. You can use Cancel Delete Certificate to set the status back to -active if you decide that you want to continue using the Certificate. -""") @route("/certificates(thumbprintAlgorithm={thumbprintAlgorithm},thumbprint={thumbprint})") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The algorithm used to derive the thumbprint parameter. This must be sha1.") + /** + * The algorithm used to derive the thumbprint parameter. This must be sha1. + */ @path thumbprintAlgorithm: string; - @doc("The thumbprint of the Certificate to be deleted.") + /** + * The thumbprint of the Certificate to be deleted. + */ @path thumbprint: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, void >; - @doc("Gets information about the specified Certificate.") + /** + * Gets information about the specified Certificate. + */ @route("/certificates(thumbprintAlgorithm={thumbprintAlgorithm},thumbprint={thumbprint})") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The algorithm used to derive the thumbprint parameter. This must be sha1.") + /** + * The algorithm used to derive the thumbprint parameter. This must be sha1. + */ @path thumbprintAlgorithm: string; - @doc("The thumbprint of the Certificate to get.") + /** + * The thumbprint of the Certificate to get. + */ @path thumbprint: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, @@ -2326,511 +2530,593 @@ directly. } interface FileOperations { + /** + * Deletes the specified Task file from the Compute Node where the Task ran. + */ @summary("Deletes the specified Task file from the Compute Node where the Task ran.") - @doc("Deletes the specified Task file from the Compute Node where the Task ran.") @route("/jobs/{jobId}/tasks/{taskId}/files/{filePath}") @delete - DeleteFromTask is Azure.Core.Foundations.Operation< + deleteFromTask is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job that contains the Task.") + /** + * The ID of the Job that contains the Task. + */ @path jobId: string; - @doc("The ID of the Task whose file you want to delete.") + /** + * The ID of the Task whose file you want to delete. + */ @path taskId: string; - @doc("The path to the Task file or directory that you want to delete.") + /** + * The path to the Task file or directory that you want to delete. + */ @path filePath: string; - @doc(""" -Whether to delete children of a directory. If the filePath parameter represents -a directory instead of a file, you can set recursive to true to delete the -directory and all of the files and subdirectories in it. If recursive is false -then the directory must be empty or deletion will fail. -""") + /** + * Whether to delete children of a directory. If the filePath parameter represents + * a directory instead of a file, you can set recursive to true to delete the + * directory and all of the files and subdirectories in it. If recursive is false + * then the directory must be empty or deletion will fail. + */ @query("recursive") recursive?: boolean; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, void >; - @doc("Returns the content of the specified Task file.") + /** + * Returns the content of the specified Task file. + */ @route("/jobs/{jobId}/tasks/{taskId}/files/{filePath}") @get - GetFromTask is Azure.Core.Foundations.Operation< + getFromTask is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job that contains the Task.") + /** + * The ID of the Job that contains the Task. + */ @path jobId: string; - @doc("The ID of the Task whose file you want to retrieve.") + /** + * The ID of the Task whose file you want to retrieve. + */ @path taskId: string; - @doc("The path to the Task file that you want to get the content of.") + /** + * The path to the Task file that you want to get the content of. + */ @path filePath: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -The byte range to be retrieved. The default is to retrieve the entire file. The -format is bytes=startRange-endRange. -""") + /** + * The byte range to be retrieved. The default is to retrieve the entire file. The + * format is bytes=startRange-endRange. + */ @header `ocp-range`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/json, application/octet-stream"; }, void >; - @doc("Gets the properties of the specified Task file.") + /** + * Gets the properties of the specified Task file. + */ @route("/jobs/{jobId}/tasks/{taskId}/files/{filePath}") @head - GetPropertiesFromTask is Azure.Core.Foundations.Operation< + getPropertiesFromTask is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job that contains the Task.") + /** + * The ID of the Job that contains the Task. + */ @path jobId: string; - @doc("The ID of the Task whose file you want to get the properties of.") + /** + * The ID of the Task whose file you want to get the properties of. + */ @path taskId: string; - @doc("The path to the Task file that you want to get the properties of.") + /** + * The path to the Task file that you want to get the properties of. + */ @path filePath: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, void >; + /** + * Deletes the specified file from the Compute Node. + */ @summary("Deletes the specified file from the Compute Node.") - @doc("Deletes the specified file from the Compute Node.") @route("/pools/{poolId}/nodes/{nodeId}/files/{filePath}") @delete - DeleteFromComputeNode is Azure.Core.Foundations.Operation< + deleteFromComputeNode is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains the Compute Node.") + /** + * The ID of the Pool that contains the Compute Node. + */ @path poolId: string; - @doc("The ID of the Compute Node from which you want to delete the file.") + /** + * The ID of the Compute Node from which you want to delete the file. + */ @path nodeId: string; - @doc("The path to the file or directory that you want to delete.") + /** + * The path to the file or directory that you want to delete. + */ @path filePath: string; - @doc(""" -Whether to delete children of a directory. If the filePath parameter represents -a directory instead of a file, you can set recursive to true to delete the -directory and all of the files and subdirectories in it. If recursive is false -then the directory must be empty or deletion will fail. -""") + /** + * Whether to delete children of a directory. If the filePath parameter represents + * a directory instead of a file, you can set recursive to true to delete the + * directory and all of the files and subdirectories in it. If recursive is false + * then the directory must be empty or deletion will fail. + */ @query("recursive") recursive?: boolean; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, void >; - @doc("Returns the content of the specified Compute Node file.") + /** + * Returns the content of the specified Compute Node file. + */ @route("/pools/{poolId}/nodes/{nodeId}/files/{filePath}") @get - GetFromComputeNode is Azure.Core.Foundations.Operation< + getFromComputeNode is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains the Compute Node.") + /** + * The ID of the Pool that contains the Compute Node. + */ @path poolId: string; - @doc("The ID of the Compute Node that contains the file.") + /** + * The ID of the Compute Node that contains the file. + */ @path nodeId: string; - @doc("The path to the Compute Node file that you want to get the content of.") + /** + * The path to the Compute Node file that you want to get the content of. + */ @path filePath: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -The byte range to be retrieved. The default is to retrieve the entire file. The -format is bytes=startRange-endRange. -""") + /** + * The byte range to be retrieved. The default is to retrieve the entire file. The + * format is bytes=startRange-endRange. + */ @header `ocp-range`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/json, application/octet-stream"; }, void >; - @doc("Gets the properties of the specified Compute Node file.") + /** + * Gets the properties of the specified Compute Node file. + */ @route("/pools/{poolId}/nodes/{nodeId}/files/{filePath}") @head - GetPropertiesFromComputeNode is Azure.Core.Foundations.Operation< + getPropertiesFromComputeNode is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains the Compute Node.") + /** + * The ID of the Pool that contains the Compute Node. + */ @path poolId: string; - @doc("The ID of the Compute Node that contains the file.") + /** + * The ID of the Compute Node that contains the file. + */ @path nodeId: string; - @doc("The path to the Compute Node file that you want to get the properties of.") + /** + * The path to the Compute Node file that you want to get the properties of. + */ @path filePath: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, void >; + /** + * Lists the files in a Task's directory on its Compute Node. + */ @summary("Lists the files in a Task's directory on its Compute Node.") - @doc("Lists the files in a Task's directory on its Compute Node.") @route("/jobs/{jobId}/tasks/{taskId}/files") @get - ListFromTask is Azure.Core.Foundations.Operation< + listFromTask is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job that contains the Task.") + /** + * The ID of the Job that contains the Task. + */ @path jobId: string; - @doc("The ID of the Task whose files you want to list.") + /** + * The ID of the Task whose files you want to list. + */ @path taskId: string; - @doc(""" -An OData $filter clause. For more information on constructing this filter, see -https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-task-files. -""") + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-task-files. + */ @query("$filter") $filter?: string; - @doc(""" -Whether to list children of the Task directory. This parameter can be used in -combination with the filter parameter to list specific type of files. -""") + /** + * Whether to list children of the Task directory. This parameter can be used in + * combination with the filter parameter to list specific type of files. + */ @query("recursive") recursive?: boolean; - @doc(""" -The maximum number of items to return in the response. A maximum of 1000 files -can be returned. -""") + /** + * The maximum number of items to return in the response. A maximum of 1000 files + * can be returned. + */ @maxValue(1000) @minValue(1) @query("maxresults") maxResults?: int32 = 1000; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, NodeFileListResult >; + /** + * Lists all of the files in Task directories on the specified Compute Node. + */ @summary("Lists all of the files in Task directories on the specified Compute Node.") - @doc("Lists all of the files in Task directories on the specified Compute Node.") @route("/pools/{poolId}/nodes/{nodeId}/files") @get - ListFromComputeNode is Azure.Core.Foundations.Operation< + listFromComputeNode is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains the Compute Node.") + /** + * The ID of the Pool that contains the Compute Node. + */ @path poolId: string; - @doc("The ID of the Compute Node whose files you want to list.") + /** + * The ID of the Compute Node whose files you want to list. + */ @path nodeId: string; - @doc(""" -An OData $filter clause. For more information on constructing this filter, see -https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. -""") + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-compute-node-files. + */ @query("$filter") $filter?: string; - @doc("Whether to list children of a directory.") + /** + * Whether to list children of a directory. + */ @query("recursive") recursive?: boolean; - @doc(""" -The maximum number of items to return in the response. A maximum of 1000 files -can be returned. -""") + /** + * The maximum number of items to return in the response. A maximum of 1000 files + * can be returned. + */ @maxValue(1000) @minValue(1) @query("maxresults") maxResults?: int32 = 1000; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, @@ -2839,699 +3125,763 @@ directly. } interface JobScheduleOperations { + /** + * Checks the specified Job Schedule exists. + */ @summary("Checks the specified Job Schedule exists.") - @doc("Checks the specified Job Schedule exists.") @route("/jobschedules/{jobScheduleId}") @head - Exists is Azure.Core.Foundations.Operation< + exists is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job Schedule which you want to check.") + /** + * The ID of the Job Schedule which you want to check. + */ @path jobScheduleId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, void >; + /** + * When you delete a Job Schedule, this also deletes all Jobs and Tasks under that + * schedule. When Tasks are deleted, all the files in their working directories on + * the Compute Nodes are also deleted (the retention period is ignored). The Job + * Schedule statistics are no longer accessible once the Job Schedule is deleted, + * though they are still counted towards Account lifetime statistics. + */ @summary("Deletes a Job Schedule from the specified Account.") - @doc(""" -When you delete a Job Schedule, this also deletes all Jobs and Tasks under that -schedule. When Tasks are deleted, all the files in their working directories on -the Compute Nodes are also deleted (the retention period is ignored). The Job -Schedule statistics are no longer accessible once the Job Schedule is deleted, -though they are still counted towards Account lifetime statistics. -""") @route("/jobschedules/{jobScheduleId}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job Schedule to delete.") + /** + * The ID of the Job Schedule to delete. + */ @path jobScheduleId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, void >; - @doc("Gets information about the specified Job Schedule.") + /** + * Gets information about the specified Job Schedule. + */ @route("/jobschedules/{jobScheduleId}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job Schedule to get.") + /** + * The ID of the Job Schedule to get. + */ @path jobScheduleId: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc("An OData $expand clause.") + /** + * An OData $expand clause. + */ @query("$expand") $expand?: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, BatchJobSchedule >; + /** + * This replaces only the Job Schedule properties specified in the request. For + * example, if the schedule property is not specified with this request, then the + * Batch service will keep the existing schedule. Changes to a Job Schedule only + * impact Jobs created by the schedule after the update has taken place; currently + * running Jobs are unaffected. + */ @summary("Updates the properties of the specified Job Schedule.") - @doc(""" -This replaces only the Job Schedule properties specified in the request. For -example, if the schedule property is not specified with this request, then the -Batch service will keep the existing schedule. Changes to a Job Schedule only -impact Jobs created by the schedule after the update has taken place; currently -running Jobs are unaffected. -""") @route("/jobschedules/{jobScheduleId}") @patch - Patch is Azure.Core.Foundations.Operation< + patch is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job Schedule to update.") + /** + * The ID of the Job Schedule to update. + */ @path jobScheduleId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body jobScheduleUpdate: BatchJobScheduleUpdate; }, void >; + /** + * This fully replaces all the updatable properties of the Job Schedule. For + * example, if the schedule property is not specified with this request, then the + * Batch service will remove the existing schedule. Changes to a Job Schedule only + * impact Jobs created by the schedule after the update has taken place; currently + * running Jobs are unaffected. + */ @summary("Updates the properties of the specified Job Schedule.") - @doc(""" -This fully replaces all the updatable properties of the Job Schedule. For -example, if the schedule property is not specified with this request, then the -Batch service will remove the existing schedule. Changes to a Job Schedule only -impact Jobs created by the schedule after the update has taken place; currently -running Jobs are unaffected. -""") @route("/jobschedules/{jobScheduleId}") @put - Update is Azure.Core.Foundations.Operation< + update is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job Schedule to update.") + /** + * The ID of the Job Schedule to update. + */ @path jobScheduleId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body jobSchedule: BatchJobSchedule; }, void >; + /** + * No new Jobs will be created until the Job Schedule is enabled again. + */ @summary("Disables a Job Schedule.") - @doc("No new Jobs will be created until the Job Schedule is enabled again.") @route("/jobschedules/{jobScheduleId}/disable") @post - Disable is Azure.Core.Foundations.Operation< + disable is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job Schedule to disable.") + /** + * The ID of the Job Schedule to disable. + */ @path jobScheduleId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, void >; + /** + * Enables a Job Schedule. + */ @summary("Enables a Job Schedule.") - @doc("Enables a Job Schedule.") @route("/jobschedules/{jobScheduleId}/enable") @post - Enable is Azure.Core.Foundations.Operation< + enable is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job Schedule to enable.") + /** + * The ID of the Job Schedule to enable. + */ @path jobScheduleId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, void >; + /** + * Terminates a Job Schedule. + */ @summary("Terminates a Job Schedule.") - @doc("Terminates a Job Schedule.") @route("/jobschedules/{jobScheduleId}/terminate") @post - Terminate is Azure.Core.Foundations.Operation< + terminate is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job Schedule to terminates.") + /** + * The ID of the Job Schedule to terminates. + */ @path jobScheduleId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, void >; + /** + * Adds a Job Schedule to the specified Account. + */ @summary("Adds a Job Schedule to the specified Account.") - @doc("Adds a Job Schedule to the specified Account.") @route("/jobschedules") @post - Add is Azure.Core.Foundations.Operation< + add is Azure.Core.Foundations.Operation< { - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc("The Job Schedule to be added.") + /** + * The Job Schedule to be added. + */ @body jobSchedule: BatchJobSchedule; }, void >; + /** + * Lists all of the Job Schedules in the specified Account. + */ @summary("Lists all of the Job Schedules in the specified Account.") - @doc("Lists all of the Job Schedules in the specified Account.") @route("/jobschedules") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc(""" -An OData $filter clause. For more information on constructing this filter, see -https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. -""") + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-job-schedules. + */ @query("$filter") $filter?: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc("An OData $expand clause.") + /** + * An OData $expand clause. + */ @query("$expand") $expand?: string; - @doc(""" -The maximum number of items to return in the response. A maximum of 1000 Job -Schedules can be returned. -""") + /** + * The maximum number of items to return in the response. A maximum of 1000 Job + * Schedules can be returned. + */ @maxValue(1000) @minValue(1) @query("maxresults") maxResults?: int32 = 1000; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, @@ -3540,633 +3890,701 @@ directly. } interface TaskOperations { + /** + * The maximum lifetime of a Task from addition to completion is 180 days. If a + * Task has not completed within 180 days of being added it will be terminated by + * the Batch service and left in whatever state it was in at that time. + */ @summary("Adds a Task to the specified Job.") - @doc(""" -The maximum lifetime of a Task from addition to completion is 180 days. If a -Task has not completed within 180 days of being added it will be terminated by -the Batch service and left in whatever state it was in at that time. -""") @route("/jobs/{jobId}/tasks") @post - Add is Azure.Core.Foundations.Operation< + add is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job to which the Task is to be added.") + /** + * The ID of the Job to which the Task is to be added. + */ @path jobId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc("The Task to be added.") + /** + * The Task to be added. + */ @body task: BatchTask; }, void >; + /** + * For multi-instance Tasks, information such as affinityId, executionInfo and + * nodeInfo refer to the primary Task. Use the list subtasks API to retrieve + * information about subtasks. + */ @summary("Lists all of the Tasks that are associated with the specified Job.") - @doc(""" -For multi-instance Tasks, information such as affinityId, executionInfo and -nodeInfo refer to the primary Task. Use the list subtasks API to retrieve -information about subtasks. -""") @route("/jobs/{jobId}/tasks") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job.") + /** + * The ID of the Job. + */ @path jobId: string; - @doc(""" -An OData $filter clause. For more information on constructing this filter, see -https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-tasks. -""") + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-tasks. + */ @query("$filter") $filter?: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc("An OData $expand clause.") + /** + * An OData $expand clause. + */ @query("$expand") $expand?: string; - @doc(""" -The maximum number of items to return in the response. A maximum of 1000 Tasks -can be returned. -""") + /** + * The maximum number of items to return in the response. A maximum of 1000 Tasks + * can be returned. + */ @maxValue(1000) @minValue(1) @query("maxresults") maxResults?: int32 = 1000; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, BatchTaskListResult >; + /** + * Note that each Task must have a unique ID. The Batch service may not return the + * results for each Task in the same order the Tasks were submitted in this + * request. If the server times out or the connection is closed during the + * request, the request may have been partially or fully processed, or not at all. + * In such cases, the user should re-issue the request. Note that it is up to the + * user to correctly handle failures when re-issuing a request. For example, you + * should use the same Task IDs during a retry so that if the prior operation + * succeeded, the retry will not create extra Tasks unexpectedly. If the response + * contains any Tasks which failed to add, a client can retry the request. In a + * retry, it is most efficient to resubmit only Tasks that failed to add, and to + * omit Tasks that were successfully added on the first attempt. The maximum + * lifetime of a Task from addition to completion is 180 days. If a Task has not + * completed within 180 days of being added it will be terminated by the Batch + * service and left in whatever state it was in at that time. + */ @summary("Adds a collection of Tasks to the specified Job.") - @doc(""" -Note that each Task must have a unique ID. The Batch service may not return the -results for each Task in the same order the Tasks were submitted in this -request. If the server times out or the connection is closed during the -request, the request may have been partially or fully processed, or not at all. -In such cases, the user should re-issue the request. Note that it is up to the -user to correctly handle failures when re-issuing a request. For example, you -should use the same Task IDs during a retry so that if the prior operation -succeeded, the retry will not create extra Tasks unexpectedly. If the response -contains any Tasks which failed to add, a client can retry the request. In a -retry, it is most efficient to resubmit only Tasks that failed to add, and to -omit Tasks that were successfully added on the first attempt. The maximum -lifetime of a Task from addition to completion is 180 days. If a Task has not -completed within 180 days of being added it will be terminated by the Batch -service and left in whatever state it was in at that time. -""") @route("/jobs/{jobId}/addtaskcollection") @post - AddCollection is Azure.Core.Foundations.Operation< + addCollection is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job to which the Task collection is to be added.") + /** + * The ID of the Job to which the Task collection is to be added. + */ @path jobId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc("The Tasks to be added.") + /** + * The Tasks to be added. + */ @body taskCollection: BatchTaskCollection; }, TaskAddCollectionResult >; + /** + * When a Task is deleted, all of the files in its directory on the Compute Node + * where it ran are also deleted (regardless of the retention time). For + * multi-instance Tasks, the delete Task operation applies synchronously to the + * primary task; subtasks and their files are then deleted asynchronously in the + * background. + */ @summary("Deletes a Task from the specified Job.") - @doc(""" -When a Task is deleted, all of the files in its directory on the Compute Node -where it ran are also deleted (regardless of the retention time). For -multi-instance Tasks, the delete Task operation applies synchronously to the -primary task; subtasks and their files are then deleted asynchronously in the -background. -""") @route("/jobs/{jobId}/tasks/{taskId}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job from which to delete the Task.") + /** + * The ID of the Job from which to delete the Task. + */ @path jobId: string; - @doc("The ID of the Task to delete.") + /** + * The ID of the Task to delete. + */ @path taskId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, void >; + /** + * For multi-instance Tasks, information such as affinityId, executionInfo and + * nodeInfo refer to the primary Task. Use the list subtasks API to retrieve + * information about subtasks. + */ @summary("Gets information about the specified Task.") - @doc(""" -For multi-instance Tasks, information such as affinityId, executionInfo and -nodeInfo refer to the primary Task. Use the list subtasks API to retrieve -information about subtasks. -""") @route("/jobs/{jobId}/tasks/{taskId}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job that contains the Task.") + /** + * The ID of the Job that contains the Task. + */ @path jobId: string; - @doc("The ID of the Task to get information about.") + /** + * The ID of the Task to get information about. + */ @path taskId: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc("An OData $expand clause.") + /** + * An OData $expand clause. + */ @query("$expand") $expand?: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, BatchTask >; - @doc("Updates the properties of the specified Task.") + /** + * Updates the properties of the specified Task. + */ @route("/jobs/{jobId}/tasks/{taskId}") @put - Update is Azure.Core.Foundations.Operation< + update is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job containing the Task.") + /** + * The ID of the Job containing the Task. + */ @path jobId: string; - @doc("The ID of the Task to update.") + /** + * The ID of the Task to update. + */ @path taskId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body task: BatchTask; }, void >; + /** + * If the Task is not a multi-instance Task then this returns an empty collection. + */ @summary(""" Lists all of the subtasks that are associated with the specified multi-instance Task. """) - @doc("If the Task is not a multi-instance Task then this returns an empty collection.") @route("/jobs/{jobId}/tasks/{taskId}/subtasksinfo") @get - ListSubtasks is Azure.Core.Foundations.Operation< + listSubtasks is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job.") + /** + * The ID of the Job. + */ @path jobId: string; - @doc("The ID of the Task.") + /** + * The ID of the Task. + */ @path taskId: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, BatchTaskListSubtasksResult >; + /** + * When the Task has been terminated, it moves to the completed state. For + * multi-instance Tasks, the terminate Task operation applies synchronously to the + * primary task; subtasks are then terminated asynchronously in the background. + */ @summary("Terminates the specified Task.") - @doc(""" -When the Task has been terminated, it moves to the completed state. For -multi-instance Tasks, the terminate Task operation applies synchronously to the -primary task; subtasks are then terminated asynchronously in the background. -""") @route("/jobs/{jobId}/tasks/{taskId}/terminate") @post - Terminate is Azure.Core.Foundations.Operation< + terminate is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job containing the Task.") + /** + * The ID of the Job containing the Task. + */ @path jobId: string; - @doc("The ID of the Task to terminate.") + /** + * The ID of the Task to terminate. + */ @path taskId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, void >; + /** + * Reactivation makes a Task eligible to be retried again up to its maximum retry + * count. The Task's state is changed to active. As the Task is no longer in the + * completed state, any previous exit code or failure information is no longer + * available after reactivation. Each time a Task is reactivated, its retry count + * is reset to 0. Reactivation will fail for Tasks that are not completed or that + * previously completed successfully (with an exit code of 0). Additionally, it + * will fail if the Job has completed (or is terminating or deleting). + */ @summary(""" Reactivates a Task, allowing it to run again even if its retry count has been exhausted. -""") - @doc(""" -Reactivation makes a Task eligible to be retried again up to its maximum retry -count. The Task's state is changed to active. As the Task is no longer in the -completed state, any previous exit code or failure information is no longer -available after reactivation. Each time a Task is reactivated, its retry count -is reset to 0. Reactivation will fail for Tasks that are not completed or that -previously completed successfully (with an exit code of 0). Additionally, it -will fail if the Job has completed (or is terminating or deleting). """) @route("/jobs/{jobId}/tasks/{taskId}/reactivate") @post - Reactivate is Azure.Core.Foundations.Operation< + reactivate is Azure.Core.Foundations.Operation< { - @doc("The ID of the Job containing the Task.") + /** + * The ID of the Job containing the Task. + */ @path jobId: string; - @doc("The ID of the Task to reactivate.") + /** + * The ID of the Task to reactivate. + */ @path taskId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service exactly matches the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service exactly matches the value specified by the client. + */ @header `If-Match`?: string; - @doc(""" -An ETag value associated with the version of the resource known to the client. -The operation will be performed only if the resource's current ETag on the -service does not match the value specified by the client. -""") + /** + * An ETag value associated with the version of the resource known to the client. + * The operation will be performed only if the resource's current ETag on the + * service does not match the value specified by the client. + */ @header `If-None-Match`?: string; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * been modified since the specified time. + */ @header `If-Modified-Since`?: utcDateTime; - @doc(""" -A timestamp indicating the last modified time of the resource known to the -client. The operation will be performed only if the resource on the service has -not been modified since the specified time. -""") + /** + * A timestamp indicating the last modified time of the resource known to the + * client. The operation will be performed only if the resource on the service has + * not been modified since the specified time. + */ @header `If-Unmodified-Since`?: utcDateTime; }, @@ -4175,606 +4593,696 @@ not been modified since the specified time. } interface ComputeNodeOperations { + /** + * You can add a user Account to a Compute Node only when it is in the idle or + * running state. + */ @summary("Adds a user Account to the specified Compute Node.") - @doc(""" -You can add a user Account to a Compute Node only when it is in the idle or -running state. -""") @route("/pools/{poolId}/nodes/{nodeId}/users") @post - AddUser is Azure.Core.Foundations.Operation< + addUser is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains the Compute Node.") + /** + * The ID of the Pool that contains the Compute Node. + */ @path poolId: string; - @doc("The ID of the machine on which you want to create a user Account.") + /** + * The ID of the machine on which you want to create a user Account. + */ @path nodeId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc("The user Account to be created.") + /** + * The user Account to be created. + */ @body user: ComputeNodeUser; }, void >; + /** + * You can delete a user Account to a Compute Node only when it is in the idle or + * running state. + */ @summary("Deletes a user Account from the specified Compute Node.") - @doc(""" -You can delete a user Account to a Compute Node only when it is in the idle or -running state. -""") @route("/pools/{poolId}/nodes/{nodeId}/users/{userName}") @delete - DeleteUser is Azure.Core.Foundations.Operation< + deleteUser is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains the Compute Node.") + /** + * The ID of the Pool that contains the Compute Node. + */ @path poolId: string; - @doc("The ID of the machine on which you want to delete a user Account.") + /** + * The ID of the machine on which you want to delete a user Account. + */ @path nodeId: string; - @doc("The name of the user Account to delete.") + /** + * The name of the user Account to delete. + */ @path userName: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, void >; + /** + * This operation replaces of all the updatable properties of the Account. For + * example, if the expiryTime element is not specified, the current value is + * replaced with the default value, not left unmodified. You can update a user + * Account on a Compute Node only when it is in the idle or running state. + */ @summary(""" Updates the password and expiration time of a user Account on the specified Compute Node. -""") - @doc(""" -This operation replaces of all the updatable properties of the Account. For -example, if the expiryTime element is not specified, the current value is -replaced with the default value, not left unmodified. You can update a user -Account on a Compute Node only when it is in the idle or running state. """) @route("/pools/{poolId}/nodes/{nodeId}/users/{userName}") @put - UpdateUser is Azure.Core.Foundations.Operation< + updateUser is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains the Compute Node.") + /** + * The ID of the Pool that contains the Compute Node. + */ @path poolId: string; - @doc("The ID of the machine on which you want to update a user Account.") + /** + * The ID of the machine on which you want to update a user Account. + */ @path nodeId: string; - @doc("The name of the user Account to update.") + /** + * The name of the user Account to update. + */ @path userName: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body parameters: NodeUpdateUserParameters; }, void >; + /** + * Gets information about the specified Compute Node. + */ @summary("Gets information about the specified Compute Node.") - @doc("Gets information about the specified Compute Node.") @route("/pools/{poolId}/nodes/{nodeId}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains the Compute Node.") + /** + * The ID of the Pool that contains the Compute Node. + */ @path poolId: string; - @doc("The ID of the Compute Node that you want to get information about.") + /** + * The ID of the Compute Node that you want to get information about. + */ @path nodeId: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, ComputeNode >; + /** + * You can restart a Compute Node only if it is in an idle or running state. + */ @summary("Restarts the specified Compute Node.") - @doc("You can restart a Compute Node only if it is in an idle or running state.") @route("/pools/{poolId}/nodes/{nodeId}/reboot") @post - Reboot is Azure.Core.Foundations.Operation< + reboot is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains the Compute Node.") + /** + * The ID of the Pool that contains the Compute Node. + */ @path poolId: string; - @doc("The ID of the Compute Node that you want to restart.") + /** + * The ID of the Compute Node that you want to restart. + */ @path nodeId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body parameters?: NodeRebootParameters; }, void >; + /** + * You can reinstall the operating system on a Compute Node only if it is in an + * idle or running state. This API can be invoked only on Pools created with the + * cloud service configuration property. + */ @summary("Reinstalls the operating system on the specified Compute Node.") - @doc(""" -You can reinstall the operating system on a Compute Node only if it is in an -idle or running state. This API can be invoked only on Pools created with the -cloud service configuration property. -""") @route("/pools/{poolId}/nodes/{nodeId}/reimage") @post - Reimage is Azure.Core.Foundations.Operation< + reimage is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains the Compute Node.") + /** + * The ID of the Pool that contains the Compute Node. + */ @path poolId: string; - @doc("The ID of the Compute Node that you want to restart.") + /** + * The ID of the Compute Node that you want to restart. + */ @path nodeId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body parameters?: NodeReimageParameters; }, void >; + /** + * You can disable Task scheduling on a Compute Node only if its current + * scheduling state is enabled. + */ @summary("Disables Task scheduling on the specified Compute Node.") - @doc(""" -You can disable Task scheduling on a Compute Node only if its current -scheduling state is enabled. -""") @route("/pools/{poolId}/nodes/{nodeId}/disablescheduling") @post - DisableScheduling is Azure.Core.Foundations.Operation< + disableScheduling is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains the Compute Node.") + /** + * The ID of the Pool that contains the Compute Node. + */ @path poolId: string; - @doc("The ID of the Compute Node on which you want to disable Task scheduling.") + /** + * The ID of the Compute Node on which you want to disable Task scheduling. + */ @path nodeId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc("The parameters for the request.") + /** + * The parameters for the request. + */ @body parameters?: NodeDisableSchedulingParameters; }, void >; + /** + * You can enable Task scheduling on a Compute Node only if its current scheduling + * state is disabled + */ @summary("Enables Task scheduling on the specified Compute Node.") - @doc(""" -You can enable Task scheduling on a Compute Node only if its current scheduling -state is disabled -""") @route("/pools/{poolId}/nodes/{nodeId}/enablescheduling") @post - EnableScheduling is Azure.Core.Foundations.Operation< + enableScheduling is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains the Compute Node.") + /** + * The ID of the Pool that contains the Compute Node. + */ @path poolId: string; - @doc("The ID of the Compute Node on which you want to enable Task scheduling.") + /** + * The ID of the Compute Node on which you want to enable Task scheduling. + */ @path nodeId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, void >; + /** + * Before you can remotely login to a Compute Node using the remote login + * settings, you must create a user Account on the Compute Node. This API can be + * invoked only on Pools created with the virtual machine configuration property. + * For Pools created with a cloud service configuration, see the GetRemoteDesktop + * API. + */ @summary("Gets the settings required for remote login to a Compute Node.") - @doc(""" -Before you can remotely login to a Compute Node using the remote login -settings, you must create a user Account on the Compute Node. This API can be -invoked only on Pools created with the virtual machine configuration property. -For Pools created with a cloud service configuration, see the GetRemoteDesktop -API. -""") @route("/pools/{poolId}/nodes/{nodeId}/remoteloginsettings") @get - GetRemoteLoginSettings is Azure.Core.Foundations.Operation< + getRemoteLoginSettings is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains the Compute Node.") + /** + * The ID of the Pool that contains the Compute Node. + */ @path poolId: string; - @doc("The ID of the Compute Node for which to obtain the remote login settings.") + /** + * The ID of the Compute Node for which to obtain the remote login settings. + */ @path nodeId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, ComputeNodeGetRemoteLoginSettingsResult >; + /** + * Before you can access a Compute Node by using the RDP file, you must create a + * user Account on the Compute Node. This API can only be invoked on Pools created + * with a cloud service configuration. For Pools created with a virtual machine + * configuration, see the GetRemoteLoginSettings API. + */ @summary("Gets the Remote Desktop Protocol file for the specified Compute Node.") - @doc(""" -Before you can access a Compute Node by using the RDP file, you must create a -user Account on the Compute Node. This API can only be invoked on Pools created -with a cloud service configuration. For Pools created with a virtual machine -configuration, see the GetRemoteLoginSettings API. -""") @route("/pools/{poolId}/nodes/{nodeId}/rdp") @get - GetRemoteDesktop is Azure.Core.Foundations.Operation< + getRemoteDesktop is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains the Compute Node.") + /** + * The ID of the Pool that contains the Compute Node. + */ @path poolId: string; - @doc(""" -The ID of the Compute Node for which you want to get the Remote Desktop -Protocol file. -""") + /** + * The ID of the Compute Node for which you want to get the Remote Desktop + * Protocol file. + */ @path nodeId: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/json, application/octet-stream"; }, void >; + /** + * This is for gathering Azure Batch service log files in an automated fashion + * from Compute Nodes if you are experiencing an error and wish to escalate to + * Azure support. The Azure Batch service log files should be shared with Azure + * support to aid in debugging issues with the Batch service. + */ @summary(""" Upload Azure Batch service log files from the specified Compute Node to Azure Blob Storage. """) - @doc(""" -This is for gathering Azure Batch service log files in an automated fashion -from Compute Nodes if you are experiencing an error and wish to escalate to -Azure support. The Azure Batch service log files should be shared with Azure -support to aid in debugging issues with the Batch service. -""") - UploadBatchServiceLogs is Azure.Core.ResourceCreateWithServiceProvidedName< + uploadBatchServiceLogs is Azure.Core.ResourceCreateWithServiceProvidedName< UploadBatchServiceLogsResult, { parameters: { - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }; } >; + /** + * Lists the Compute Nodes in the specified Pool. + */ @summary("Lists the Compute Nodes in the specified Pool.") - @doc("Lists the Compute Nodes in the specified Pool.") @route("/pools/{poolId}/nodes") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool from which you want to list Compute Nodes.") + /** + * The ID of the Pool from which you want to list Compute Nodes. + */ @path poolId: string; - @doc(""" -An OData $filter clause. For more information on constructing this filter, see -https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. -""") + /** + * An OData $filter clause. For more information on constructing this filter, see + * https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-nodes-in-a-pool. + */ @query("$filter") $filter?: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc(""" -The maximum number of items to return in the response. A maximum of 1000 -Compute Nodes can be returned. -""") + /** + * The maximum number of items to return in the response. A maximum of 1000 + * Compute Nodes can be returned. + */ @maxValue(1000) @minValue(1) @query("maxresults") maxResults?: int32 = 1000; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, @@ -4783,110 +5291,130 @@ directly. } interface ComputeNodeExtensionOperations { + /** + * Gets information about the specified Compute Node Extension. + */ @summary("Gets information about the specified Compute Node Extension.") - @doc("Gets information about the specified Compute Node Extension.") @route("/pools/{poolId}/nodes/{nodeId}/extensions/{extensionName}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains the Compute Node.") + /** + * The ID of the Pool that contains the Compute Node. + */ @path poolId: string; - @doc("The ID of the Compute Node that contains the extensions.") + /** + * The ID of the Compute Node that contains the extensions. + */ @path nodeId: string; - @doc(""" -The name of the of the Compute Node Extension that you want to get information -about. -""") + /** + * The name of the of the Compute Node Extension that you want to get information + * about. + */ @path extensionName: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, NodeVMExtension >; + /** + * Lists the Compute Nodes Extensions in the specified Pool. + */ @summary("Lists the Compute Nodes Extensions in the specified Pool.") - @doc("Lists the Compute Nodes Extensions in the specified Pool.") @route("/pools/{poolId}/nodes/{nodeId}/extensions") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The ID of the Pool that contains Compute Node.") + /** + * The ID of the Pool that contains Compute Node. + */ @path poolId: string; - @doc("The ID of the Compute Node that you want to list extensions.") + /** + * The ID of the Compute Node that you want to list extensions. + */ @path nodeId: string; - @doc("An OData $select clause.") + /** + * An OData $select clause. + */ @query("$select") $select?: string; - @doc(""" -The maximum number of items to return in the response. A maximum of 1000 -Compute Nodes can be returned. -""") + /** + * The maximum number of items to return in the response. A maximum of 1000 + * Compute Nodes can be returned. + */ @maxValue(1000) @minValue(1) @query("maxresults") maxResults?: int32 = 1000; - @doc(""" -The maximum time that the server can spend processing the request, in seconds. -The default is 30 seconds. -""") + /** + * The maximum time that the server can spend processing the request, in seconds. + * The default is 30 seconds. + */ @query("timeout") timeout?: int32 = 30; - @doc(""" -The caller-generated request identity, in the form of a GUID with no decoration -such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. -""") + /** + * The caller-generated request identity, in the form of a GUID with no decoration + * such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0. + */ @header `client-request-id`?: string; - @doc("Whether the server should return the client-request-id in the response.") + /** + * Whether the server should return the client-request-id in the response. + */ @header `return-client-request-id`?: boolean; - @doc(""" -The time the request was issued. Client libraries typically set this to the -current system clock time; set it explicitly if you are calling the REST API -directly. -""") + /** + * The time the request was issued. Client libraries typically set this to the + * current system clock time; set it explicitly if you are calling the REST API + * directly. + */ @header `ocp-date`?: utcDateTime; }, diff --git a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp index 53f9865cb2..1039f02026 100644 --- a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp @@ -4,6 +4,9 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +/** + * Test Infrastructure for AutoRest + */ @service({ title: "AutoRest Complex Test Service", }) @@ -15,11 +18,14 @@ using TypeSpec.Http; $host: string, } ) -@doc("Test Infrastructure for AutoRest") namespace AutoRestComplexTestService; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { - @doc("The 2016-02-29 API version.") + /** + * The 2016-02-29 API version. + */ v2016_02_29: "2016-02-29", } diff --git a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp index 8ec0f9b6f6..667b67a1a1 100644 --- a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp @@ -17,23 +17,35 @@ enum MyKind { Kind1, } -@doc("Colors possible") +/** + * Colors possible + */ enum GoblinSharkColor { pink, gray, brown, - @doc("Uppercase RED") upperRed: "RED", - @doc("Lowercase RED") lowerRed: "red", + + /** + * Uppercase RED + */ + upperRed: "RED", + + /** + * Lowercase RED + */ + lowerRed: "red", } model Basic { - @doc("Basic Id") + /** + * Basic Id + */ id?: int32; - @doc(""" -Name property with a very long description that does not fit on a single line -and a line break. -""") + /** + * Name property with a very long description that does not fit on a single line + * and a line break. + */ name?: string; color?: CmykColors; @@ -51,8 +63,8 @@ model IntWrapper { } model LongWrapper { - field1?: int32; - field2?: int32; + field1?: int64; + field2?: int64; } model FloatWrapper { @@ -61,13 +73,13 @@ model FloatWrapper { } model DoubleWrapper { - field1?: float32; + field1?: float64; @projectedName( "json", "field_56_zeros_after_the_dot_and_negative_zero_before_dot_and_this_is_a_long_field_name_on_purpose" ) - field56ZerosAfterTheDotAndNegativeZeroBeforeDotAndThisIsALongFieldNameOnPurpose?: float32; + field56ZerosAfterTheDotAndNegativeZeroBeforeDotAndThisIsALongFieldNameOnPurpose?: float64; } model BooleanWrapper { @@ -118,7 +130,9 @@ model ArrayWrapper { } model DictionaryWrapper { - @doc("Dictionary of ") + /** + * Dictionary of + */ defaultProgram?: Record; } @@ -217,8 +231,10 @@ model Sawshark extends Shark { model Goblinshark extends Shark { jawsize?: int32; - @doc("Colors possible") - color?: GoblinSharkColor; + /** + * Colors possible + */ + color?: GoblinSharkColor = GoblinSharkColor.gray; fishtype: "goblin"; } diff --git a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/routes.tsp index e975735022..b7bf261185 100644 --- a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/routes.tsp @@ -8,119 +8,165 @@ using TypeSpec.Http; namespace AutoRestComplexTestService; interface basicOperations { - @doc("Get complex type {id: 2, name: 'abc', color: 'YELLOW'}") + /** + * Get complex type {id: 2, name: 'abc', color: 'YELLOW'} + */ @route("/complex/basic/valid") @get getValid is Azure.Core.Foundations.Operation<{}, Basic>; - @doc("Please put {id: 2, name: 'abc', color: 'Magenta'}") + /** + * Please put {id: 2, name: 'abc', color: 'Magenta'} + */ @route("/complex/basic/valid") @put putValid is Azure.Core.Foundations.Operation; - @doc("Get a basic complex type that is invalid for the local strong type") + /** + * Get a basic complex type that is invalid for the local strong type + */ @route("/complex/basic/invalid") @get getInvalid is Azure.Core.Foundations.Operation<{}, Basic>; - @doc("Get a basic complex type that is empty") + /** + * Get a basic complex type that is empty + */ @route("/complex/basic/empty") @get getEmpty is Azure.Core.Foundations.Operation<{}, Basic>; - @doc("Get a basic complex type whose properties are null") + /** + * Get a basic complex type whose properties are null + */ @route("/complex/basic/null") @get getNull is Azure.Core.Foundations.Operation<{}, Basic>; - @doc("Get a basic complex type while the server doesn't provide a response payload") + /** + * Get a basic complex type while the server doesn't provide a response payload + */ @route("/complex/basic/notprovided") @get getNotProvided is Azure.Core.Foundations.Operation<{}, Basic>; } interface primitiveOperations { - @doc("Get complex types with integer properties") + /** + * Get complex types with integer properties + */ @route("/complex/primitive/integer") @get getInt is Azure.Core.Foundations.Operation<{}, IntWrapper>; - @doc("Put complex types with integer properties") + /** + * Put complex types with integer properties + */ @route("/complex/primitive/integer") @put putInt is Azure.Core.Foundations.Operation; - @doc("Get complex types with long properties") + /** + * Get complex types with long properties + */ @route("/complex/primitive/long") @get getLong is Azure.Core.Foundations.Operation<{}, LongWrapper>; - @doc("Put complex types with long properties") + /** + * Put complex types with long properties + */ @route("/complex/primitive/long") @put putLong is Azure.Core.Foundations.Operation; - @doc("Get complex types with float properties") + /** + * Get complex types with float properties + */ @route("/complex/primitive/float") @get getFloat is Azure.Core.Foundations.Operation<{}, FloatWrapper>; - @doc("Put complex types with float properties") + /** + * Put complex types with float properties + */ @route("/complex/primitive/float") @put putFloat is Azure.Core.Foundations.Operation; - @doc("Get complex types with double properties") + /** + * Get complex types with double properties + */ @route("/complex/primitive/double") @get getDouble is Azure.Core.Foundations.Operation<{}, DoubleWrapper>; - @doc("Put complex types with double properties") + /** + * Put complex types with double properties + */ @route("/complex/primitive/double") @put putDouble is Azure.Core.Foundations.Operation; - @doc("Get complex types with bool properties") + /** + * Get complex types with bool properties + */ @route("/complex/primitive/bool") @get getBool is Azure.Core.Foundations.Operation<{}, BooleanWrapper>; - @doc("Put complex types with bool properties") + /** + * Put complex types with bool properties + */ @route("/complex/primitive/bool") @put putBool is Azure.Core.Foundations.Operation; - @doc("Get complex types with string properties") + /** + * Get complex types with string properties + */ @route("/complex/primitive/string") @get getString is Azure.Core.Foundations.Operation<{}, StringWrapper>; - @doc("Put complex types with string properties") + /** + * Put complex types with string properties + */ @route("/complex/primitive/string") @put putString is Azure.Core.Foundations.Operation; - @doc("Get complex types with date properties") + /** + * Get complex types with date properties + */ @route("/complex/primitive/date") @get getDate is Azure.Core.Foundations.Operation<{}, DateWrapper>; - @doc("Put complex types with date properties") + /** + * Put complex types with date properties + */ @route("/complex/primitive/date") @put putDate is Azure.Core.Foundations.Operation; - @doc("Get complex types with datetime properties") + /** + * Get complex types with datetime properties + */ @route("/complex/primitive/datetime") @get getDateTime is Azure.Core.Foundations.Operation<{}, DatetimeWrapper>; - @doc("Put complex types with datetime properties") + /** + * Put complex types with datetime properties + */ @route("/complex/primitive/datetime") @put putDateTime is Azure.Core.Foundations.Operation; - @doc("Get complex types with datetimeRfc1123 properties") + /** + * Get complex types with datetimeRfc1123 properties + */ @route("/complex/primitive/datetimerfc1123") @get getDateTimeRfc1123 is Azure.Core.Foundations.Operation< @@ -128,7 +174,9 @@ interface primitiveOperations { Datetimerfc1123Wrapper >; - @doc("Put complex types with datetimeRfc1123 properties") + /** + * Put complex types with datetimeRfc1123 properties + */ @route("/complex/primitive/datetimerfc1123") @put putDateTimeRfc1123 is Azure.Core.Foundations.Operation< @@ -136,125 +184,161 @@ interface primitiveOperations { void >; - @doc("Get complex types with duration properties") + /** + * Get complex types with duration properties + */ @route("/complex/primitive/duration") @get getDuration is Azure.Core.Foundations.Operation<{}, DurationWrapper>; - @doc("Put complex types with duration properties") + /** + * Put complex types with duration properties + */ @route("/complex/primitive/duration") @put putDuration is Azure.Core.Foundations.Operation; - @doc("Get complex types with byte properties") + /** + * Get complex types with byte properties + */ @route("/complex/primitive/byte") @get getByte is Azure.Core.Foundations.Operation<{}, ByteWrapper>; - @doc("Put complex types with byte properties") + /** + * Put complex types with byte properties + */ @route("/complex/primitive/byte") @put putByte is Azure.Core.Foundations.Operation; } interface arrayOperations { - @doc("Get complex types with array property") + /** + * Get complex types with array property + */ @route("/complex/array/valid") @get getValid is Azure.Core.Foundations.Operation<{}, ArrayWrapper>; - @doc("Put complex types with array property") + /** + * Put complex types with array property + */ @route("/complex/array/valid") @put putValid is Azure.Core.Foundations.Operation; - @doc("Get complex types with array property which is empty") + /** + * Get complex types with array property which is empty + */ @route("/complex/array/empty") @get getEmpty is Azure.Core.Foundations.Operation<{}, ArrayWrapper>; - @doc("Put complex types with array property which is empty") + /** + * Put complex types with array property which is empty + */ @route("/complex/array/empty") @put putEmpty is Azure.Core.Foundations.Operation; - @doc(""" -Get complex types with array property while server doesn't provide a response -payload -""") + /** + * Get complex types with array property while server doesn't provide a response + * payload + */ @route("/complex/array/notprovided") @get getNotProvided is Azure.Core.Foundations.Operation<{}, ArrayWrapper>; } interface dictionaryOperations { - @doc("Get complex types with dictionary property") + /** + * Get complex types with dictionary property + */ @route("/complex/dictionary/typed/valid") @get getValid is Azure.Core.Foundations.Operation<{}, DictionaryWrapper>; - @doc("Put complex types with dictionary property") + /** + * Put complex types with dictionary property + */ @route("/complex/dictionary/typed/valid") @put putValid is Azure.Core.Foundations.Operation; - @doc("Get complex types with dictionary property which is empty") + /** + * Get complex types with dictionary property which is empty + */ @route("/complex/dictionary/typed/empty") @get getEmpty is Azure.Core.Foundations.Operation<{}, DictionaryWrapper>; - @doc("Put complex types with dictionary property which is empty") + /** + * Put complex types with dictionary property which is empty + */ @route("/complex/dictionary/typed/empty") @put putEmpty is Azure.Core.Foundations.Operation; - @doc("Get complex types with dictionary property which is null") + /** + * Get complex types with dictionary property which is null + */ @route("/complex/dictionary/typed/null") @get getNull is Azure.Core.Foundations.Operation<{}, DictionaryWrapper>; - @doc(""" -Get complex types with dictionary property while server doesn't provide a -response payload -""") + /** + * Get complex types with dictionary property while server doesn't provide a + * response payload + */ @route("/complex/dictionary/typed/notprovided") @get getNotProvided is Azure.Core.Foundations.Operation<{}, DictionaryWrapper>; } interface inheritanceOperations { - @doc("Get complex types that extend others") + /** + * Get complex types that extend others + */ @route("/complex/inheritance/valid") @get getValid is Azure.Core.Foundations.Operation<{}, Siamese>; - @doc("Put complex types that extend others") + /** + * Put complex types that extend others + */ @route("/complex/inheritance/valid") @put putValid is Azure.Core.Foundations.Operation; } interface polymorphismOperations { - @doc("Get complex types that are polymorphic") + /** + * Get complex types that are polymorphic + */ @route("/complex/polymorphism/valid") @get getValid is Azure.Core.Foundations.Operation<{}, Fish>; - @doc("Put complex types that are polymorphic") + /** + * Put complex types that are polymorphic + */ @route("/complex/polymorphism/valid") @put putValid is Azure.Core.Foundations.Operation; - @doc("Get complex types that are polymorphic, JSON key contains a dot") + /** + * Get complex types that are polymorphic, JSON key contains a dot + */ @route("/complex/polymorphism/dotsyntax") @get getDotSyntax is Azure.Core.Foundations.Operation<{}, DotFish>; - @doc(""" -Get complex object composing a polymorphic scalar property and array property -with polymorphic element type, with discriminator specified. Deserialization -must NOT fail and use the discriminator type specified on the wire. -""") + /** + * Get complex object composing a polymorphic scalar property and array property + * with polymorphic element type, with discriminator specified. Deserialization + * must NOT fail and use the discriminator type specified on the wire. + */ @route("/complex/polymorphism/composedWithDiscriminator") @get getComposedWithDiscriminator is Azure.Core.Foundations.Operation< @@ -262,11 +346,11 @@ must NOT fail and use the discriminator type specified on the wire. DotFishMarket >; - @doc(""" -Get complex object composing a polymorphic scalar property and array property -with polymorphic element type, without discriminator specified on wire. -Deserialization must NOT fail and use the explicit type of the property. -""") + /** + * Get complex object composing a polymorphic scalar property and array property + * with polymorphic element type, without discriminator specified on wire. + * Deserialization must NOT fail and use the explicit type of the property. + */ @route("/complex/polymorphism/composedWithoutDiscriminator") @get getComposedWithoutDiscriminator is Azure.Core.Foundations.Operation< @@ -274,55 +358,65 @@ Deserialization must NOT fail and use the explicit type of the property. DotFishMarket >; - @doc(""" -Get complex types that are polymorphic, but not at the root of the hierarchy; -also have additional properties -""") + /** + * Get complex types that are polymorphic, but not at the root of the hierarchy; + * also have additional properties + */ @route("/complex/polymorphism/complicated") @get getComplicated is Azure.Core.Foundations.Operation<{}, Salmon>; - @doc(""" -Put complex types that are polymorphic, but not at the root of the hierarchy; -also have additional properties -""") + /** + * Put complex types that are polymorphic, but not at the root of the hierarchy; + * also have additional properties + */ @route("/complex/polymorphism/complicated") @put putComplicated is Azure.Core.Foundations.Operation; - @doc("Put complex types that are polymorphic, omitting the discriminator") + /** + * Put complex types that are polymorphic, omitting the discriminator + */ @route("/complex/polymorphism/missingdiscriminator") @put putMissingDiscriminator is Azure.Core.Foundations.Operation; - @doc(""" -Put complex types that are polymorphic, attempting to omit required 'birthday' -field - the request should not be allowed from the client -""") + /** + * Put complex types that are polymorphic, attempting to omit required 'birthday' + * field - the request should not be allowed from the client + */ @route("/complex/polymorphism/missingrequired/invalid") @put putValidMissingRequired is Azure.Core.Foundations.Operation; } interface polymorphicrecursiveOperations { - @doc("Get complex types that are polymorphic and have recursive references") + /** + * Get complex types that are polymorphic and have recursive references + */ @route("/complex/polymorphicrecursive/valid") @get getValid is Azure.Core.Foundations.Operation<{}, Fish>; - @doc("Put complex types that are polymorphic and have recursive references") + /** + * Put complex types that are polymorphic and have recursive references + */ @route("/complex/polymorphicrecursive/valid") @put putValid is Azure.Core.Foundations.Operation; } interface readonlypropertyOperations { - @doc("Get complex types that have readonly properties") + /** + * Get complex types that have readonly properties + */ @route("/complex/readonlyproperty/valid") @get getValid is Azure.Core.Foundations.Operation<{}, ReadonlyObj>; - @doc("Put complex types that have readonly properties") + /** + * Put complex types that have readonly properties + */ @route("/complex/readonlyproperty/valid") @put putValid is Azure.Core.Foundations.Operation; diff --git a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp index 475c207f76..2e3264f473 100644 --- a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp @@ -4,6 +4,9 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +/** + * Some cool documentation. + */ @service({ title: "Complex Model Client", }) @@ -15,11 +18,14 @@ using TypeSpec.Http; $host: string, } ) -@doc("Some cool documentation.") namespace ComplexModelClient; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { - @doc("The 2014-04-01-preview API version.") + /** + * The 2014-04-01-preview API version. + */ v2014_04_01_preview: "2014-04-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/models.tsp index c68a188f07..1d5b53f127 100644 --- a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/models.tsp @@ -7,31 +7,43 @@ using TypeSpec.Http; namespace ComplexModelClient; model CatalogArray { - @doc("Array of products") + /** + * Array of products + */ productArray?: Product[]; } -@doc("The product documentation.") +/** + * The product documentation. + */ model Product { - @doc(""" -Unique identifier representing a specific product for a given latitude & -longitude. For example, uberX in San Francisco will have a different product_id -than uberX in Los Angeles. -""") + /** + * Unique identifier representing a specific product for a given latitude & + * longitude. For example, uberX in San Francisco will have a different product_id + * than uberX in Los Angeles. + */ @projectedName("json", "product_id") productId?: string; - @doc("Description of product.") + /** + * Description of product. + */ description?: string; - @doc("Display name of product.") + /** + * Display name of product. + */ @projectedName("json", "display_name") displayName?: string; - @doc("Capacity of product. For example, 4 people.") - capacity?: string; + /** + * Capacity of product. For example, 4 people. + */ + capacity?: string = "100"; - @doc("Image URL representing the product.") + /** + * Image URL representing the product. + */ image?: string; } @@ -42,16 +54,22 @@ model Error { } model CatalogDictionaryOfArray { - @doc("Dictionary of Array of product") + /** + * Dictionary of Array of product + */ productDictionaryOfArray?: Record; } model CatalogDictionary { - @doc("Dictionary of products") + /** + * Dictionary of products + */ productDictionary?: Record; } model CatalogArrayOfDictionary { - @doc("Array of dictionary of products") + /** + * Array of dictionary of products + */ productArrayOfDictionary?: Record[]; } diff --git a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/routes.tsp index 96c866e11d..75ed84b409 100644 --- a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/routes.tsp @@ -7,63 +7,83 @@ using TypeSpec.Http; namespace ComplexModelClient; +/** + * The Products endpoint returns information about the Uber products offered at a + * given location. The response includes the display name and other details about + * each product, and lists the products in the proper display order. + */ @summary("Product Types") -@doc(""" -The Products endpoint returns information about the Uber products offered at a -given location. The response includes the display name and other details about -each product, and lists the products in the proper display order. -""") @route("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/Microsoft.Cache/Redis") @get op list is Azure.Core.Foundations.Operation< { - @doc("Subscription ID.") + /** + * Subscription ID. + */ @path subscriptionId: "123456"; - @doc("Resource Group ID.") + /** + * Resource Group ID. + */ @path resourceGroupName: string; }, CatalogArray >; +/** + * Resets products. + */ @summary("Create products") -@doc("Resets products.") @route("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/Microsoft.Cache/Redis") @post op create is Azure.Core.Foundations.Operation< { - @doc("Subscription ID.") + /** + * Subscription ID. + */ @path subscriptionId: string; - @doc("Resource Group ID.") + /** + * Resource Group ID. + */ @path resourceGroupName: string; - @doc("body Parameter") + /** + * body Parameter + */ @body bodyParameter: CatalogDictionaryOfArray; }, CatalogDictionary >; +/** + * Resets products. + */ @summary("Update products") -@doc("Resets products.") @route("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/Microsoft.Cache/Redis") @put op update is Azure.Core.Foundations.Operation< { - @doc("Subscription ID.") + /** + * Subscription ID. + */ @path subscriptionId: string; - @doc("Resource Group ID.") + /** + * Resource Group ID. + */ @path resourceGroupName: string; - @doc("body Parameter") + /** + * body Parameter + */ @body bodyParameter: CatalogArrayOfDictionary; }, diff --git a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp index 3170808c3b..a52199ca64 100644 --- a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp @@ -4,6 +4,10 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +/** + * The ConfidentialLedgerClient writes and retrieves ledger entries against the + * Confidential Ledger service. + */ @service({ title: "Microsoft Cognitive Language Service - Analyze Text Authoring", }) @@ -15,14 +19,14 @@ using TypeSpec.Http; ledgerEndpoint: string, } ) -@doc(""" -The ConfidentialLedgerClient writes and retrieves ledger entries against the -Confidential Ledger service. -""") namespace Azure.Language.Authoring; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { - @doc("The 2022-05-13 API version.") + /** + * The 2022-05-13 API version. + */ v2022_05_13: "2022-05-13", } diff --git a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/models.tsp index 8101be0b57..ab3df89c5d 100644 --- a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/models.tsp @@ -8,117 +8,171 @@ using Azure.Core; namespace Azure.Language.Authoring; -@doc("State of a ledger query.") +/** + * State of a ledger query. + */ enum ConfidentialLedgerQueryState { Loading, Ready, } -@doc("Represents the state of the transaction.") +/** + * Represents the state of the transaction. + */ enum TransactionState { Committed, Pending, } -@doc("Represents an assignable role.") +/** + * Represents an assignable role. + */ enum ConfidentialLedgerUserRoleName { Administrator, Contributor, Reader, } -@doc("The governance script for the application.") +/** + * The governance script for the application. + */ model Constitution { - @doc("SHA256 digest of the constitution script.") + /** + * SHA256 digest of the constitution script. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key digest: string; - @doc("Contents of the constitution.") + /** + * Contents of the constitution. + */ script: string; } -@doc("An error response from Confidential Ledger.") +/** + * An error response from Confidential Ledger. + */ @error model ConfidentialLedgerError { - @doc("An error response from Confidential Ledger.") + /** + * An error response from Confidential Ledger. + */ @visibility("read") error?: ConfidentialLedgerErrorBody; } -@doc("An error response from Confidential Ledger.") +/** + * An error response from Confidential Ledger. + */ model ConfidentialLedgerErrorBody { - @doc("The error code.") + /** + * The error code. + */ @visibility("read") code?: string; - @doc("The error message.") + /** + * The error message. + */ @visibility("read") message?: string; } -@doc("List of members in the consortium.") +/** + * List of members in the consortium. + */ @pagedResult model Consortium { @items members: ConsortiumMember[]; - @doc("Path from which to retrieve the next page of results.") + /** + * Path from which to retrieve the next page of results. + */ @nextLink nextLink?: string; } -@doc("Describes a member of the consortium.") +/** + * Describes a member of the consortium. + */ @resource("app/governance/members") model ConsortiumMember { - @doc("PEM-encoded certificate associated with the member.") + /** + * PEM-encoded certificate associated with the member. + */ certificate: string; - @doc("Identifier assigned to the member.") + /** + * Identifier assigned to the member. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key id: string; } -@doc("Information about the enclaves running the Confidential Ledger.") +/** + * Information about the enclaves running the Confidential Ledger. + */ @resource("app/enclaveQuotes") model ConfidentialLedgerEnclaves { - @doc("Id of the Confidential Ledger node responding to the request.") + /** + * Id of the Confidential Ledger node responding to the request. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key currentNodeId: string; - @doc("Dictionary of enclave quotes, indexed by node id.") + /** + * Dictionary of enclave quotes, indexed by node id. + */ enclaveQuotes: Record; } -@doc("Contains the enclave quote.") +/** + * Contains the enclave quote. + */ model EnclaveQuote { - @doc("ID assigned to this node.") + /** + * ID assigned to this node. + */ nodeId: string; - @doc("MRENCLAVE value of the code running in the enclave.") + /** + * MRENCLAVE value of the code running in the enclave. + */ mrenclave?: string; - @doc("Version of the quote presented.") + /** + * Version of the quote presented. + */ quoteVersion: string; - @doc("Raw SGX quote, parsable by tools like Open Enclave's oeverify.") + /** + * Raw SGX quote, parsable by tools like Open Enclave's oeverify. + */ raw: string; } -@doc("Paginated collections returned in response to a query.") +/** + * Paginated collections returned in response to a query. + */ @pagedResult model PagedCollections { @items collections: Collection[]; - @doc("Path from which to retrieve the next page of results.") + /** + * Path from which to retrieve the next page of results. + */ @nextLink nextLink?: string; } -@doc("Identifier for collections.") +/** + * Identifier for collections. + */ @resource("app/collections") model Collection { // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @@ -126,24 +180,36 @@ model Collection { collectionId: string; } -@doc("Paginated ledger entries returned in response to a query.") +/** + * Paginated ledger entries returned in response to a query. + */ @pagedResult model PagedLedgerEntries { - @doc("State of a ledger query.") + /** + * State of a ledger query. + */ state: ConfidentialLedgerQueryState; - @doc("Path from which to retrieve the next page of results.") + /** + * Path from which to retrieve the next page of results. + */ @nextLink nextLink?: string; - @doc("Array of ledger entries.") + /** + * Array of ledger entries. + */ @items entries: LedgerEntry[]; } -@doc("An entry in the ledger.") +/** + * An entry in the ledger. + */ model LedgerEntry { - @doc("Contents of the ledger entry.") + /** + * Contents of the ledger entry. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key contents: string; @@ -151,18 +217,18 @@ model LedgerEntry { @visibility("read") collectionId?: string; - @doc(""" -A unique identifier for the state of the ledger. If returned as part of a -LedgerEntry, it indicates the state from which the entry was read. -""") + /** + * A unique identifier for the state of the ledger. If returned as part of a + * LedgerEntry, it indicates the state from which the entry was read. + */ @visibility("read") transactionId?: string; } -@doc(""" -Returned as a result of a write to the Confidential Ledger, the transaction id -in the response indicates when the write will become durable. -""") +/** + * Returned as a result of a write to the Confidential Ledger, the transaction id + * in the response indicates when the write will become durable. + */ @resource("app/transactions") model LedgerWriteResult { // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @@ -170,35 +236,41 @@ model LedgerWriteResult { collectionId: string; } -@doc(""" -The result of querying for a ledger entry from an older transaction id. The -ledger entry is available in the response only if the returned state is Ready. -""") +/** + * The result of querying for a ledger entry from an older transaction id. The + * ledger entry is available in the response only if the returned state is Ready. + */ model LedgerQueryResult { - @doc("State of a ledger query.") + /** + * State of a ledger query. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key state: ConfidentialLedgerQueryState; - @doc(""" -The ledger entry found as a result of the query. This is only available if the -query is in Ready state. -""") + /** + * The ledger entry found as a result of the query. This is only available if the + * query is in Ready state. + */ entry?: LedgerEntry; } -@doc("A receipt certifying the transaction at the specified id.") +/** + * A receipt certifying the transaction at the specified id. + */ @resource("app/transactions/{transactionId}/receipt") model TransactionReceipt { receipt?: ReceiptContents; - @doc("State of a ledger query.") + /** + * State of a ledger query. + */ state: ConfidentialLedgerQueryState; - @doc(""" -A unique identifier for the state of the ledger. If returned as part of a -LedgerEntry, it indicates the state from which the entry was read. -""") + /** + * A unique identifier for the state of the ledger. If returned as part of a + * LedgerEntry, it indicates the state from which the entry was read. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key transactionId: string; @@ -226,47 +298,63 @@ model ReceiptElement { right?: string; } -@doc("Response returned to a query for the transaction status") +/** + * Response returned to a query for the transaction status + */ @resource("app/transactions/{transactionId}/status") model TransactionStatus { - @doc("Represents the state of the transaction.") + /** + * Represents the state of the transaction. + */ state: TransactionState; - @doc(""" -A unique identifier for the state of the ledger. If returned as part of a -LedgerEntry, it indicates the state from which the entry was read. -""") + /** + * A unique identifier for the state of the ledger. If returned as part of a + * LedgerEntry, it indicates the state from which the entry was read. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key transactionId: string; } -@doc("Details about a Confidential Ledger user.") +/** + * Details about a Confidential Ledger user. + */ model LedgerUser { - @doc("Represents an assignable role.") + /** + * Represents an assignable role. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key assignedRole: ConfidentialLedgerUserRoleName; - @doc(""" -Identifier for the user. This must either be an AAD object id or a certificate -fingerprint. -""") + /** + * Identifier for the user. This must either be an AAD object id or a certificate + * fingerprint. + */ @visibility("read") userId?: string; } -@doc("An item in the Merkle proof.") +/** + * An item in the Merkle proof. + */ model MerkleProofElement { left?: string; right?: string; } -@doc("Object for assigning a role to a user.") +/** + * Object for assigning a role to a user. + */ model RoleAssignment { - @doc("Represents an assignable role.") + /** + * Represents an assignable role. + */ roleName: ConfidentialLedgerUserRoleName; - @doc("Description of the role.") + /** + * Description of the role. + */ description?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/routes.tsp index 720d893d76..b8b6b8b9df 100644 --- a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/routes.tsp @@ -7,151 +7,191 @@ using TypeSpec.Http; namespace Azure.Language.Authoring; +/** + * The constitution is a script that assesses and applies proposals from + * consortium members. + */ @summary("Gets the constitution used for governance.") -@doc(""" -The constitution is a script that assesses and applies proposals from -consortium members. -""") @route("/app/governance/constitution") @get -op GetConstitution is Azure.Core.Foundations.Operation<{}, Constitution>; +op getConstitution is Azure.Core.Foundations.Operation<{}, Constitution>; +/** + * Consortium members can manage the Confidential Ledger. + */ @summary("Lists the consortium members.") -@doc("Consortium members can manage the Confidential Ledger.") -op ListConsortiumMembers is Azure.Core.ResourceList; +op listConsortiumMembers is Azure.Core.ResourceList; +/** + * A quote is an SGX enclave measurement that can be used to verify the validity + * of a node and its enclave. + */ @summary("Gets quotes for all nodes of the Confidential Ledger.") -@doc(""" -A quote is an SGX enclave measurement that can be used to verify the validity -of a node and its enclave. -""") -op GetEnclaveQuotes is Azure.Core.ResourceRead; +op getEnclaveQuotes is Azure.Core.ResourceRead; +/** + * Collection ids are user-created collections of ledger entries + */ @summary("Retrieves a list of collection ids present in the Confidential Ledger") -@doc("Collection ids are user-created collections of ledger entries") -op ListCollections is Azure.Core.ResourceList; +op listCollections is Azure.Core.ResourceList; +/** + * A collection id may optionally be specified. Only entries in the specified (or + * default) collection will be returned. + */ @summary("Gets ledger entries from a collection corresponding to a range.") -@doc(""" -A collection id may optionally be specified. Only entries in the specified (or -default) collection will be returned. -""") @route("/app/transactions") @get -op ListLedgerEntries is Azure.Core.Foundations.Operation< +op listLedgerEntries is Azure.Core.Foundations.Operation< { - @doc("The collection id.") + /** + * The collection id. + */ @query("collectionId") collectionId?: string; - @doc("Specify the first transaction ID in a range.") + /** + * Specify the first transaction ID in a range. + */ @query("fromTransactionId") fromTransactionId?: string; - @doc("Specify the last transaction ID in a range.") + /** + * Specify the last transaction ID in a range. + */ @query("toTransactionId") toTransactionId?: string; }, PagedLedgerEntries >; +/** + * A collection id may optionally be specified. + */ @summary("Writes a ledger entry.") -@doc("A collection id may optionally be specified.") -op CreateLedgerEntry is Azure.Core.ResourceCreateWithServiceProvidedName< +op createLedgerEntry is Azure.Core.ResourceCreateWithServiceProvidedName< LedgerWriteResult, { parameters: { - @doc("The collection id.") + /** + * The collection id. + */ @query("collectionId") collectionId?: string; }; } >; +/** + * To return older ledger entries, the relevant sections of the ledger must be + * read from disk and validated. To prevent blocking within the enclave, the + * response will indicate whether the entry is ready and part of the response, or + * if the loading is still ongoing. + */ @summary(""" Gets the ledger entry at the specified transaction id. A collection id may optionally be specified to indicate the collection from which to fetch the value. """) -@doc(""" -To return older ledger entries, the relevant sections of the ledger must be -read from disk and validated. To prevent blocking within the enclave, the -response will indicate whether the entry is ready and part of the response, or -if the loading is still ongoing. -""") @route("/app/transactions/{transactionId}") @get -op GetLedgerEntry is Azure.Core.Foundations.Operation< +op getLedgerEntry is Azure.Core.Foundations.Operation< { - @doc("The collection id.") + /** + * The collection id. + */ @query("collectionId") collectionId?: string; - @doc("Identifies a write transaction.") + /** + * Identifies a write transaction. + */ @path transactionId: string; }, LedgerQueryResult >; +/** + * Gets a receipt certifying ledger contents at a particular transaction id. + */ @summary("Gets a receipt certifying ledger contents at a particular transaction id.") -@doc("Gets a receipt certifying ledger contents at a particular transaction id.") -op GetReceipt is Azure.Core.ResourceRead; +op getReceipt is Azure.Core.ResourceRead; +/** + * Gets the status of an entry identified by a transaction id. + */ @summary("Gets the status of an entry identified by a transaction id.") -@doc("Gets the status of an entry identified by a transaction id.") -op GetTransactionStatus is Azure.Core.ResourceRead; +op getTransactionStatus is Azure.Core.ResourceRead; +/** + * A collection id may optionally be specified. + */ @summary("Gets the current value available in the ledger.") -@doc("A collection id may optionally be specified.") @route("/app/transactions/current") @get -op GetCurrentLedgerEntry is Azure.Core.Foundations.Operation< +op getCurrentLedgerEntry is Azure.Core.Foundations.Operation< { - @doc("The collection id.") + /** + * The collection id. + */ @query("collectionId") collectionId?: string; }, LedgerEntry >; +/** + * Deletes a user from the Confidential Ledger. + */ @summary("Deletes a user from the Confidential Ledger.") -@doc("Deletes a user from the Confidential Ledger.") @route("/app/users/{userId}") @delete -op DeleteUser is Azure.Core.Foundations.Operation< +op deleteUser is Azure.Core.Foundations.Operation< { - @doc("The user id, either an AAD object ID or certificate fingerprint.") + /** + * The user id, either an AAD object ID or certificate fingerprint. + */ @path userId: string; }, void >; +/** + * Gets a user. + */ @summary("Gets a user.") -@doc("Gets a user.") @route("/app/users/{userId}") @get -op GetUser is Azure.Core.Foundations.Operation< +op getUser is Azure.Core.Foundations.Operation< { - @doc("The user id, either an AAD object ID or certificate fingerprint.") + /** + * The user id, either an AAD object ID or certificate fingerprint. + */ @path userId: string; }, LedgerUser >; +/** + * A JSON merge patch is applied for existing users + */ @summary("Adds a user or updates a user's fields.") -@doc("A JSON merge patch is applied for existing users") @route("/app/users/{userId}") @patch -op CreateOrUpdateUser is Azure.Core.Foundations.Operation< +op createOrUpdateUser is Azure.Core.Foundations.Operation< { - @doc("The user id, either an AAD object ID or certificate fingerprint.") + /** + * The user id, either an AAD object ID or certificate fingerprint. + */ @path userId: string; - @doc("Details about a Confidential Ledger user.") + /** + * Details about a Confidential Ledger user. + */ @body userDetails: LedgerUser; }, diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp index 2fc600be68..0934d3de4e 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp @@ -13,14 +13,18 @@ using TypeSpec.Http; vaultBaseUrl: string } ) -@doc(""" -The key vault client performs cryptographic key operations and vault operations -against the Key Vault service. -""") +/** +* The key vault client performs cryptographic key operations and vault operations +* against the Key Vault service. +*/ namespace Azure.Keyvault; -@doc("The available API versions.") +/** +* The available API versions. +*/ enum Versions { -@doc("The 7.4-preview.1 API version.") +/** +* The 7.4-preview.1 API version. +*/ v7.4_preview.1: "7.4-preview.1", } \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp index 634ecd206b..9b8b9e4173 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp @@ -8,99 +8,152 @@ using Azure.Core; namespace Azure.Keyvault; -@doc(""" -Reflects the deletion recovery level currently in effect for certificates in -the current vault. If it contains 'Purgeable', the certificate can be -permanently deleted by a privileged user; otherwise, only the system can purge -the certificate, at the end of the retention interval. -""") +/** + * Reflects the deletion recovery level currently in effect for certificates in + * the current vault. If it contains 'Purgeable', the certificate can be + * permanently deleted by a privileged user; otherwise, only the system can purge + * the certificate, at the end of the retention interval. + */ enum DeletionRecoveryLevel { - @doc(""" -Denotes a vault state in which deletion is an irreversible operation, without -the possibility for recovery. This level corresponds to no protection being -available against a Delete operation; the data is irretrievably lost upon -accepting a Delete operation at the entity level or higher (vault, resource -group, subscription etc.) -""") + /** + * Denotes a vault state in which deletion is an irreversible operation, without + * the possibility for recovery. This level corresponds to no protection being + * available against a Delete operation; the data is irretrievably lost upon + * accepting a Delete operation at the entity level or higher (vault, resource + * group, subscription etc.) + */ Purgeable, - @doc(""" -Denotes a vault state in which deletion is recoverable, and which also permits -immediate and permanent deletion (i.e. purge). This level guarantees the -recoverability of the deleted entity during the retention interval (90 days), -unless a Purge operation is requested, or the subscription is cancelled. System -wil permanently delete it after 90 days, if not recovered -""") + + /** + * Denotes a vault state in which deletion is recoverable, and which also permits + * immediate and permanent deletion (i.e. purge). This level guarantees the + * recoverability of the deleted entity during the retention interval (90 days), + * unless a Purge operation is requested, or the subscription is cancelled. System + * wil permanently delete it after 90 days, if not recovered + */ `Recoverable+Purgeable`, - @doc(""" -Denotes a vault state in which deletion is recoverable without the possibility -for immediate and permanent deletion (i.e. purge). This level guarantees the -recoverability of the deleted entity during the retention interval(90 days) and -while the subscription is still available. System wil permanently delete it -after 90 days, if not recovered -""") + + /** + * Denotes a vault state in which deletion is recoverable without the possibility + * for immediate and permanent deletion (i.e. purge). This level guarantees the + * recoverability of the deleted entity during the retention interval(90 days) and + * while the subscription is still available. System wil permanently delete it + * after 90 days, if not recovered + */ Recoverable, - @doc(""" -Denotes a vault and subscription state in which deletion is recoverable within -retention interval (90 days), immediate and permanent deletion (i.e. purge) is -not permitted, and in which the subscription itself cannot be permanently -canceled. System wil permanently delete it after 90 days, if not recovered -""") + + /** + * Denotes a vault and subscription state in which deletion is recoverable within + * retention interval (90 days), immediate and permanent deletion (i.e. purge) is + * not permitted, and in which the subscription itself cannot be permanently + * canceled. System wil permanently delete it after 90 days, if not recovered + */ `Recoverable+ProtectedSubscription`, - @doc(""" -Denotes a vault state in which deletion is recoverable, and which also permits -immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays -< 90). This level guarantees the recoverability of the deleted entity during -the retention interval, unless a Purge operation is requested, or the -subscription is cancelled. -""") + + /** + * Denotes a vault state in which deletion is recoverable, and which also permits + * immediate and permanent deletion (i.e. purge when 7<= SoftDeleteRetentionInDays + * < 90). This level guarantees the recoverability of the deleted entity during + * the retention interval, unless a Purge operation is requested, or the + * subscription is cancelled. + */ `CustomizedRecoverable+Purgeable`, - @doc(""" -Denotes a vault state in which deletion is recoverable without the possibility -for immediate and permanent deletion (i.e. purge when 7<= -SoftDeleteRetentionInDays < 90).This level guarantees the recoverability of the -deleted entity during the retention interval and while the subscription is -still available. -""") + + /** + * Denotes a vault state in which deletion is recoverable without the possibility + * for immediate and permanent deletion (i.e. purge when 7<= + * SoftDeleteRetentionInDays < 90).This level guarantees the recoverability of the + * deleted entity during the retention interval and while the subscription is + * still available. + */ CustomizedRecoverable, - @doc(""" -Denotes a vault and subscription state in which deletion is recoverable, -immediate and permanent deletion (i.e. purge) is not permitted, and in which -the subscription itself cannot be permanently canceled when 7<= -SoftDeleteRetentionInDays < 90. This level guarantees the recoverability of the -deleted entity during the retention interval, and also reflects the fact that -the subscription itself cannot be cancelled. -""") + + /** + * Denotes a vault and subscription state in which deletion is recoverable, + * immediate and permanent deletion (i.e. purge) is not permitted, and in which + * the subscription itself cannot be permanently canceled when 7<= + * SoftDeleteRetentionInDays < 90. This level guarantees the recoverability of the + * deleted entity during the retention interval, and also reflects the fact that + * the subscription itself cannot be cancelled. + */ `CustomizedRecoverable+ProtectedSubscription`, } -@doc(""" -JsonWebKey Key Type (kty), as defined in -https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. -""") +/** + * JsonWebKey Key Type (kty), as defined in + * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. + */ enum JsonWebKeyType { - @doc("Elliptic Curve.") EC, - @doc("Elliptic Curve with a private key which is stored in the HSM.") + /** + * Elliptic Curve. + */ + EC, + + /** + * Elliptic Curve with a private key which is stored in the HSM. + */ `EC-HSM`, - @doc("RSA (https://tools.ietf.org/html/rfc3447)") RSA, - @doc("RSA with a private key which is stored in the HSM.") `RSA-HSM`, - @doc("Octet sequence (used to represent symmetric keys)") oct, - @doc("Octet sequence (used to represent symmetric keys) which is stored the HSM.") + + /** + * RSA (https://tools.ietf.org/html/rfc3447) + */ + RSA, + + /** + * RSA with a private key which is stored in the HSM. + */ + `RSA-HSM`, + + /** + * Octet sequence (used to represent symmetric keys) + */ + oct, + + /** + * Octet sequence (used to represent symmetric keys) which is stored the HSM. + */ `oct-HSM`, - @doc("Octet key pair (https://tools.ietf.org/html/rfc8037)") OKP, - @doc(""" -Octet key pair (https://tools.ietf.org/html/rfc8037) with a private key which -is stored in the HSM. -""") + + /** + * Octet key pair (https://tools.ietf.org/html/rfc8037) + */ + OKP, + + /** + * Octet key pair (https://tools.ietf.org/html/rfc8037) with a private key which + * is stored in the HSM. + */ `OKP-HSM`, } -@doc("Elliptic curve name. For valid values, see JsonWebKeyCurveName.") +/** + * Elliptic curve name. For valid values, see JsonWebKeyCurveName. + */ enum JsonWebKeyCurveName { - @doc("The NIST P-256 elliptic curve, AKA SECG curve SECP256R1.") `P-256`, - @doc("The NIST P-384 elliptic curve, AKA SECG curve SECP384R1.") `P-384`, - @doc("The NIST P-521 elliptic curve, AKA SECG curve SECP521R1.") `P-521`, - @doc("The SECG SECP256K1 elliptic curve.") `P-256K`, - @doc("The Ed25519 Edwards curve.") Ed25519, + /** + * The NIST P-256 elliptic curve, AKA SECG curve SECP256R1. + */ + `P-256`, + + /** + * The NIST P-384 elliptic curve, AKA SECG curve SECP384R1. + */ + `P-384`, + + /** + * The NIST P-521 elliptic curve, AKA SECG curve SECP521R1. + */ + `P-521`, + + /** + * The SECG SECP256K1 elliptic curve. + */ + `P-256K`, + + /** + * The Ed25519 Edwards curve. + */ + Ed25519, } enum KeyUsageType { @@ -115,7 +168,9 @@ enum KeyUsageType { decipherOnly, } -@doc("JSON web key operations. For more information, see JsonWebKeyOperation.") +/** + * JSON web key operations. For more information, see JsonWebKeyOperation. + */ enum JsonWebKeyOperation { encrypt, decrypt, @@ -127,7 +182,9 @@ enum JsonWebKeyOperation { export, } -@doc("algorithm identifier") +/** + * algorithm identifier + */ enum JsonWebKeyEncryptionAlgorithm { `RSA-OAEP`, `RSA-OAEP-256`, @@ -146,177 +203,322 @@ enum JsonWebKeyEncryptionAlgorithm { A256CBCPAD, } -@doc(""" -The signing/verification algorithm identifier. For more information on possible -algorithm types, see JsonWebKeySignatureAlgorithm. -""") +/** + * The signing/verification algorithm identifier. For more information on possible + * algorithm types, see JsonWebKeySignatureAlgorithm. + */ enum JsonWebKeySignatureAlgorithm { - @doc(""" -RSASSA-PSS using SHA-256 and MGF1 with SHA-256, as described in -https://tools.ietf.org/html/rfc7518 -""") + /** + * RSASSA-PSS using SHA-256 and MGF1 with SHA-256, as described in + * https://tools.ietf.org/html/rfc7518 + */ PS256, - @doc(""" -RSASSA-PSS using SHA-384 and MGF1 with SHA-384, as described in -https://tools.ietf.org/html/rfc7518 -""") + + /** + * RSASSA-PSS using SHA-384 and MGF1 with SHA-384, as described in + * https://tools.ietf.org/html/rfc7518 + */ PS384, - @doc(""" -RSASSA-PSS using SHA-512 and MGF1 with SHA-512, as described in -https://tools.ietf.org/html/rfc7518 -""") + + /** + * RSASSA-PSS using SHA-512 and MGF1 with SHA-512, as described in + * https://tools.ietf.org/html/rfc7518 + */ PS512, - @doc(""" -RSASSA-PKCS1-v1_5 using SHA-256, as described in -https://tools.ietf.org/html/rfc7518 -""") + + /** + * RSASSA-PKCS1-v1_5 using SHA-256, as described in + * https://tools.ietf.org/html/rfc7518 + */ RS256, - @doc(""" -RSASSA-PKCS1-v1_5 using SHA-384, as described in -https://tools.ietf.org/html/rfc7518 -""") + + /** + * RSASSA-PKCS1-v1_5 using SHA-384, as described in + * https://tools.ietf.org/html/rfc7518 + */ RS384, - @doc(""" -RSASSA-PKCS1-v1_5 using SHA-512, as described in -https://tools.ietf.org/html/rfc7518 -""") + + /** + * RSASSA-PKCS1-v1_5 using SHA-512, as described in + * https://tools.ietf.org/html/rfc7518 + */ RS512, - @doc("Reserved") RSNULL, - @doc(""" -ECDSA using P-256 and SHA-256, as described in -https://tools.ietf.org/html/rfc7518. -""") + + /** + * Reserved + */ + RSNULL, + + /** + * ECDSA using P-256 and SHA-256, as described in + * https://tools.ietf.org/html/rfc7518. + */ ES256, - @doc(""" -ECDSA using P-384 and SHA-384, as described in -https://tools.ietf.org/html/rfc7518 -""") + + /** + * ECDSA using P-384 and SHA-384, as described in + * https://tools.ietf.org/html/rfc7518 + */ ES384, - @doc(""" -ECDSA using P-521 and SHA-512, as described in -https://tools.ietf.org/html/rfc7518 -""") + + /** + * ECDSA using P-521 and SHA-512, as described in + * https://tools.ietf.org/html/rfc7518 + */ ES512, - @doc(""" -ECDSA using P-256K and SHA-256, as described in -https://tools.ietf.org/html/rfc7518 -""") + + /** + * ECDSA using P-256K and SHA-256, as described in + * https://tools.ietf.org/html/rfc7518 + */ ES256K, - @doc(""" -Edwards-Curve Digital Signature Algorithm, as described in -https://tools.ietf.org/html/rfc8032. -""") + + /** + * Edwards-Curve Digital Signature Algorithm, as described in + * https://tools.ietf.org/html/rfc8032. + */ EdDSA, } -@doc("The encryption algorithm to use to protected the exported key material") +/** + * The encryption algorithm to use to protected the exported key material + */ enum KeyEncryptionAlgorithm { CKM_RSA_AES_KEY_WRAP, RSA_AES_KEY_WRAP_256, RSA_AES_KEY_WRAP_384, } -@doc("The role definition type.") +/** + * The role definition type. + */ enum RoleDefinitionType { `Microsoft.Authorization/roleDefinitions`, } -@doc("The role type.") +/** + * The role type. + */ enum RoleType { - @doc("Built in role.") BuiltInRole: "AKVBuiltInRole", - @doc("Custom role.") CustomRole, + /** + * Built in role. + */ + BuiltInRole: "AKVBuiltInRole", + + /** + * Custom role. + */ + CustomRole, } -@doc("Supported permissions for data actions.") +/** + * Supported permissions for data actions. + */ enum DataAction { - @doc("Read HSM key metadata.") + /** + * Read HSM key metadata. + */ ReadHsmKey: "Microsoft.KeyVault/managedHsm/keys/read/action", - @doc("Update an HSM key.") + + /** + * Update an HSM key. + */ WriteHsmKey: "Microsoft.KeyVault/managedHsm/keys/write/action", - @doc("Read deleted HSM key.") + + /** + * Read deleted HSM key. + */ ReadDeletedHsmKey: "Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action", - @doc("Recover deleted HSM key.") + + /** + * Recover deleted HSM key. + */ RecoverDeletedHsmKey: "Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action", - @doc("Backup HSM keys.") + + /** + * Backup HSM keys. + */ BackupHsmKeys: "Microsoft.KeyVault/managedHsm/keys/backup/action", - @doc("Restore HSM keys.") + + /** + * Restore HSM keys. + */ RestoreHsmKeys: "Microsoft.KeyVault/managedHsm/keys/restore/action", - @doc("Delete role assignment.") + + /** + * Delete role assignment. + */ DeleteRoleAssignment: "Microsoft.KeyVault/managedHsm/roleAssignments/delete/action", - @doc("Get role assignment.") + + /** + * Get role assignment. + */ GetRoleAssignment: "Microsoft.KeyVault/managedHsm/roleAssignments/read/action", - @doc("Create or update role assignment.") + + /** + * Create or update role assignment. + */ WriteRoleAssignment: "Microsoft.KeyVault/managedHsm/roleAssignments/write/action", - @doc("Get role definition.") + + /** + * Get role definition. + */ ReadRoleDefinition: "Microsoft.KeyVault/managedHsm/roleDefinitions/read/action", - @doc("Create or update role definition.") + + /** + * Create or update role definition. + */ WriteRoleDefinition: "Microsoft.KeyVault/managedHsm/roleDefinitions/write/action", - @doc("Delete role definition.") + + /** + * Delete role definition. + */ DeleteRoleDefinition: "Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action", - @doc("Encrypt using an HSM key.") + + /** + * Encrypt using an HSM key. + */ EncryptHsmKey: "Microsoft.KeyVault/managedHsm/keys/encrypt/action", - @doc("Decrypt using an HSM key.") + + /** + * Decrypt using an HSM key. + */ DecryptHsmKey: "Microsoft.KeyVault/managedHsm/keys/decrypt/action", - @doc("Wrap using an HSM key.") + + /** + * Wrap using an HSM key. + */ WrapHsmKey: "Microsoft.KeyVault/managedHsm/keys/wrap/action", - @doc("Unwrap using an HSM key.") + + /** + * Unwrap using an HSM key. + */ UnwrapHsmKey: "Microsoft.KeyVault/managedHsm/keys/unwrap/action", - @doc("Sign using an HSM key.") + + /** + * Sign using an HSM key. + */ SignHsmKey: "Microsoft.KeyVault/managedHsm/keys/sign/action", - @doc("Verify using an HSM key.") + + /** + * Verify using an HSM key. + */ VerifyHsmKey: "Microsoft.KeyVault/managedHsm/keys/verify/action", - @doc("Create an HSM key.") + + /** + * Create an HSM key. + */ CreateHsmKey: "Microsoft.KeyVault/managedHsm/keys/create", - @doc("Delete an HSM key.") + + /** + * Delete an HSM key. + */ DeleteHsmKey: "Microsoft.KeyVault/managedHsm/keys/delete", - @doc("Export an HSM key.") + + /** + * Export an HSM key. + */ ExportHsmKey: "Microsoft.KeyVault/managedHsm/keys/export/action", - @doc("Release an HSM key using Secure Key Release.") + + /** + * Release an HSM key using Secure Key Release. + */ ReleaseKey: "Microsoft.KeyVault/managedHsm/keys/release/action", - @doc("Import an HSM key.") + + /** + * Import an HSM key. + */ ImportHsmKey: "Microsoft.KeyVault/managedHsm/keys/import/action", - @doc("Purge a deleted HSM key.") + + /** + * Purge a deleted HSM key. + */ PurgeDeletedHsmKey: "Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete", - @doc("Download an HSM security domain.") + + /** + * Download an HSM security domain. + */ DownloadHsmSecurityDomain: "Microsoft.KeyVault/managedHsm/securitydomain/download/action", - @doc("Check status of HSM security domain download.") + + /** + * Check status of HSM security domain download. + */ DownloadHsmSecurityDomainStatus: "Microsoft.KeyVault/managedHsm/securitydomain/download/read", - @doc("Upload an HSM security domain.") + + /** + * Upload an HSM security domain. + */ UploadHsmSecurityDomain: "Microsoft.KeyVault/managedHsm/securitydomain/upload/action", - @doc("Check the status of the HSM security domain exchange file.") + + /** + * Check the status of the HSM security domain exchange file. + */ ReadHsmSecurityDomainStatus: "Microsoft.KeyVault/managedHsm/securitydomain/upload/read", - @doc("Download an HSM security domain transfer key.") + + /** + * Download an HSM security domain transfer key. + */ ReadHsmSecurityDomainTransferKey: "Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read", - @doc("Start an HSM backup.") + + /** + * Start an HSM backup. + */ StartHsmBackup: "Microsoft.KeyVault/managedHsm/backup/start/action", - @doc("Start an HSM restore.") + + /** + * Start an HSM restore. + */ StartHsmRestore: "Microsoft.KeyVault/managedHsm/restore/start/action", - @doc("Read an HSM backup status.") + + /** + * Read an HSM backup status. + */ ReadHsmBackupStatus: "Microsoft.KeyVault/managedHsm/backup/status/action", - @doc("Read an HSM restore status.") + + /** + * Read an HSM restore status. + */ ReadHsmRestoreStatus: "Microsoft.KeyVault/managedHsm/restore/status/action", - @doc("Generate random numbers.") + + /** + * Generate random numbers. + */ RandomNumbersGenerate: "Microsoft.KeyVault/managedHsm/rng/action", } -@doc("The role scope.") +/** + * The role scope. + */ enum RoleScope { - @doc("Global scope") Global: "/", - @doc("Keys scope") Keys: "/keys", + /** + * Global scope + */ + Global: "/", + + /** + * Keys scope + */ + Keys: "/keys", } -@doc("The type specifier of the value.") +/** + * The type specifier of the value. + */ enum SettingTypeEnum { boolean, } -@doc("The type of SAS token the SAS definition will create.") +/** + * The type of SAS token the SAS definition will create. + */ enum SasTokenType { account, service, } -@doc("The type of the action.") +/** + * The type of the action. + */ @fixed enum ActionType { EmailContacts, @@ -325,7 +527,9 @@ enum ActionType { notify, } -@doc("operation status") +/** + * operation status + */ @fixed enum OperationStatus { Success, @@ -334,57 +538,89 @@ enum OperationStatus { } model SASTokenParameter { - @doc("Azure Blob storage container Uri") + /** + * Azure Blob storage container Uri + */ storageResourceUri: string; - @doc("The SAS token pointing to an Azure Blob storage container") + /** + * The SAS token pointing to an Azure Blob storage container + */ token: string; } -@doc("Full backup operation") +/** + * Full backup operation + */ model FullBackupOperation { - @doc("Status of the backup operation.") + /** + * Status of the backup operation. + */ status?: string; - @doc("The status details of backup operation.") + /** + * The status details of backup operation. + */ statusDetails?: string; - @doc("Error encountered, if any, during the full backup operation.") + /** + * Error encountered, if any, during the full backup operation. + */ error?: Error; - @doc("The start time of the backup operation in UTC") + /** + * The start time of the backup operation in UTC + */ startTime?: plainTime; - @doc("The end time of the backup operation in UTC") + /** + * The end time of the backup operation in UTC + */ endTime?: plainTime; - @doc("Identifier for the full backup operation.") + /** + * Identifier for the full backup operation. + */ jobId?: string; - @doc("The Azure blob storage container Uri which contains the full backup") + /** + * The Azure blob storage container Uri which contains the full backup + */ azureStorageBlobContainerUri?: string; } -@doc("The key vault server error.") +/** + * The key vault server error. + */ model Error { - @doc("The error code.") + /** + * The error code. + */ @visibility("read") code?: string; - @doc("The error message.") + /** + * The error message. + */ @visibility("read") message?: string; - @doc("The key vault server error.") + /** + * The key vault server error. + */ @visibility("read") @projectedName("json", "innererror") innerError?: Error; } -@doc("The key vault error exception.") +/** + * The key vault error exception. + */ @error model KeyVaultError { - @doc("The key vault server error.") + /** + * The key vault server error. + */ @visibility("read") error?: Error; } @@ -392,901 +628,1315 @@ model KeyVaultError { model RestoreOperationParameters { sasTokenParameters: SASTokenParameter; - @doc("The Folder name of the blob where the previous successful full backup was stored") + /** + * The Folder name of the blob where the previous successful full backup was stored + */ folderToRestore: string; } -@doc("Restore operation") +/** + * Restore operation + */ model RestoreOperation { - @doc("Status of the restore operation.") + /** + * Status of the restore operation. + */ status?: string; - @doc("The status details of restore operation.") + /** + * The status details of restore operation. + */ statusDetails?: string; - @doc("Error encountered, if any, during the restore operation.") + /** + * Error encountered, if any, during the restore operation. + */ error?: Error; - @doc("Identifier for the restore operation.") + /** + * Identifier for the restore operation. + */ jobId?: string; - @doc("The start time of the restore operation") + /** + * The start time of the restore operation + */ startTime?: plainTime; - @doc("The end time of the restore operation") + /** + * The end time of the restore operation + */ endTime?: plainTime; } model SelectiveKeyRestoreOperationParameters { sasTokenParameters: SASTokenParameter; - @doc("The Folder name of the blob where the previous successful full backup was stored") + /** + * The Folder name of the blob where the previous successful full backup was stored + */ folder: string; } -@doc("Selective Key Restore operation") +/** + * Selective Key Restore operation + */ model SelectiveKeyRestoreOperation { - @doc("Status of the restore operation.") + /** + * Status of the restore operation. + */ status?: string; - @doc("The status details of restore operation.") + /** + * The status details of restore operation. + */ statusDetails?: string; - @doc("Error encountered, if any, during the selective key restore operation.") + /** + * Error encountered, if any, during the selective key restore operation. + */ error?: Error; - @doc("Identifier for the selective key restore operation.") + /** + * Identifier for the selective key restore operation. + */ jobId?: string; - @doc("The start time of the restore operation") + /** + * The start time of the restore operation + */ startTime?: plainTime; - @doc("The end time of the restore operation") + /** + * The end time of the restore operation + */ endTime?: plainTime; } -@doc("The certificate list result.") +/** + * The certificate list result. + */ model CertificateListResult is Azure.Core.Page; -@doc("The certificate item containing certificate metadata.") +/** + * The certificate item containing certificate metadata. + */ model CertificateItem { - @doc("Certificate identifier.") + /** + * Certificate identifier. + */ id?: string; - @doc("The certificate management attributes.") + /** + * The certificate management attributes. + */ attributes?: CertificateAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; - @doc("Thumbprint of the certificate.") + /** + * Thumbprint of the certificate. + */ @projectedName("json", "x5t") x509Thumbprint?: bytes; } -@doc("The certificate management attributes.") +/** + * The certificate management attributes. + */ model CertificateAttributes extends Attributes { - @doc(""" -softDelete data retention days. Value should be >=7 and <=90 when softDelete -enabled, otherwise 0. -""") + /** + * softDelete data retention days. Value should be >=7 and <=90 when softDelete + * enabled, otherwise 0. + */ @visibility("read") recoverableDays?: int32; - @doc(""" -Reflects the deletion recovery level currently in effect for certificates in -the current vault. If it contains 'Purgeable', the certificate can be -permanently deleted by a privileged user; otherwise, only the system can purge -the certificate, at the end of the retention interval. -""") + /** + * Reflects the deletion recovery level currently in effect for certificates in + * the current vault. If it contains 'Purgeable', the certificate can be + * permanently deleted by a privileged user; otherwise, only the system can purge + * the certificate, at the end of the retention interval. + */ @visibility("read") recoveryLevel?: DeletionRecoveryLevel; } -@doc("The object attributes managed by the KeyVault service.") +/** + * The object attributes managed by the KeyVault service. + */ model Attributes { - @doc("Determines whether the object is enabled.") + /** + * Determines whether the object is enabled. + */ enabled?: boolean; - @doc("Not before date in UTC.") + /** + * Not before date in UTC. + */ @projectedName("json", "nbf") notBefore?: plainTime; - @doc("Expiry date in UTC.") + /** + * Expiry date in UTC. + */ @projectedName("json", "exp") expires?: plainTime; - @doc("Creation time in UTC.") + /** + * Creation time in UTC. + */ @visibility("read") created?: plainTime; - @doc("Last updated time in UTC.") + /** + * Last updated time in UTC. + */ @visibility("read") updated?: plainTime; } -@doc(""" -A Deleted Certificate consisting of its previous id, attributes and its tags, -as well as information on when it will be purged. -""") +/** + * A Deleted Certificate consisting of its previous id, attributes and its tags, + * as well as information on when it will be purged. + */ model DeletedCertificateBundle extends CertificateBundle { - @doc(""" -The url of the recovery object, used to identify and recover the deleted -certificate. -""") + /** + * The url of the recovery object, used to identify and recover the deleted + * certificate. + */ recoveryId?: string; - @doc("The time when the certificate is scheduled to be purged, in UTC") + /** + * The time when the certificate is scheduled to be purged, in UTC + */ @visibility("read") scheduledPurgeDate?: plainTime; - @doc("The time when the certificate was deleted, in UTC") + /** + * The time when the certificate was deleted, in UTC + */ @visibility("read") deletedDate?: plainTime; } -@doc("A certificate bundle consists of a certificate (X509) plus its attributes.") +/** + * A certificate bundle consists of a certificate (X509) plus its attributes. + */ model CertificateBundle { - @doc("The certificate id.") + /** + * The certificate id. + */ @visibility("read") id?: string; - @doc("The key id.") + /** + * The key id. + */ @visibility("read") kid?: string; - @doc("The secret id.") + /** + * The secret id. + */ @visibility("read") sid?: string; - @doc("Thumbprint of the certificate.") + /** + * Thumbprint of the certificate. + */ @visibility("read") @projectedName("json", "x5t") x509Thumbprint?: bytes; - @doc("The management policy.") + /** + * The management policy. + */ @visibility("read") policy?: CertificatePolicy; - @doc("CER contents of x509 certificate.") + /** + * CER contents of x509 certificate. + */ cer?: bytes; - @doc(""" -The content type of the secret. eg. 'application/x-pem-file' or -'application/x-pkcs12', -""") + /** + * The content type of the secret. eg. 'application/x-pem-file' or + * 'application/x-pkcs12', + */ contentType?: string; - @doc("The certificate attributes.") + /** + * The certificate attributes. + */ attributes?: CertificateAttributes; - @doc("Application specific metadata in the form of key-value pairs") + /** + * Application specific metadata in the form of key-value pairs + */ tags?: Record; } -@doc("Management policy for a certificate.") +/** + * Management policy for a certificate. + */ model CertificatePolicy { - @doc("The certificate id.") + /** + * The certificate id. + */ @visibility("read") id?: string; - @doc("Properties of the key backing a certificate.") + /** + * Properties of the key backing a certificate. + */ @projectedName("json", "key_props") keyProperties?: KeyProperties; - @doc("Properties of the secret backing a certificate.") + /** + * Properties of the secret backing a certificate. + */ @projectedName("json", "secret_props") secretProperties?: SecretProperties; - @doc("Properties of the X509 component of a certificate.") + /** + * Properties of the X509 component of a certificate. + */ @projectedName("json", "x509_props") x509CertificateProperties?: X509CertificateProperties; - @doc("Actions that will be performed by Key Vault over the lifetime of a certificate.") + /** + * Actions that will be performed by Key Vault over the lifetime of a certificate. + */ @projectedName("json", "lifetime_actions") lifetimeActions?: LifetimeAction[]; - @doc("Parameters for the issuer of the X509 component of a certificate.") + /** + * Parameters for the issuer of the X509 component of a certificate. + */ @projectedName("json", "issuer") issuerParameters?: IssuerParameters; - @doc("The certificate attributes.") + /** + * The certificate attributes. + */ attributes?: CertificateAttributes; } -@doc("Properties of the key pair backing a certificate.") +/** + * Properties of the key pair backing a certificate. + */ model KeyProperties { - @doc(""" -Indicates if the private key can be exported. Release policy must be provided -when creating the first version of an exportable key. -""") + /** + * Indicates if the private key can be exported. Release policy must be provided + * when creating the first version of an exportable key. + */ exportable?: boolean; - @doc("The type of key pair to be used for the certificate.") + /** + * The type of key pair to be used for the certificate. + */ @projectedName("json", "kty") keyType?: JsonWebKeyType; - @doc("The key size in bits. For example: 2048, 3072, or 4096 for RSA.") + /** + * The key size in bits. For example: 2048, 3072, or 4096 for RSA. + */ @projectedName("json", "key_size") keySize?: int32; - @doc("Indicates if the same key pair will be used on certificate renewal.") + /** + * Indicates if the same key pair will be used on certificate renewal. + */ @projectedName("json", "reuse_key") reuseKey?: boolean; - @doc("Elliptic curve name. For valid values, see JsonWebKeyCurveName.") + /** + * Elliptic curve name. For valid values, see JsonWebKeyCurveName. + */ @projectedName("json", "crv") curve?: JsonWebKeyCurveName; } -@doc("Properties of the key backing a certificate.") +/** + * Properties of the key backing a certificate. + */ model SecretProperties { - @doc("The media type (MIME type).") + /** + * The media type (MIME type). + */ contentType?: string; } -@doc("Properties of the X509 component of a certificate.") +/** + * Properties of the X509 component of a certificate. + */ model X509CertificateProperties { - @doc("The subject name. Should be a valid X509 distinguished Name.") + /** + * The subject name. Should be a valid X509 distinguished Name. + */ subject?: string; - @doc("The enhanced key usage.") + /** + * The enhanced key usage. + */ ekus?: string[]; - @doc("The subject alternative names.") + /** + * The subject alternative names. + */ @projectedName("json", "sans") subjectAlternativeNames?: SubjectAlternativeNames; - @doc("Defines how the certificate's key may be used.") + /** + * Defines how the certificate's key may be used. + */ @projectedName("json", "key_usage") keyUsage?: KeyUsageType[]; - @doc("The duration that the certificate is valid in months.") + /** + * The duration that the certificate is valid in months. + */ @projectedName("json", "validity_months") validityInMonths?: int32; } -@doc("The subject alternate names of a X509 object.") +/** + * The subject alternate names of a X509 object. + */ model SubjectAlternativeNames { - @doc("Email addresses.") + /** + * Email addresses. + */ emails?: string[]; - @doc("Domain names.") + /** + * Domain names. + */ @projectedName("json", "dns_names") dnsNames?: string[]; - @doc("User principal names.") + /** + * User principal names. + */ upns?: string[]; } -@doc(""" -Action and its trigger that will be performed by Key Vault over the lifetime of -a certificate. -""") +/** + * Action and its trigger that will be performed by Key Vault over the lifetime of + * a certificate. + */ model LifetimeAction { - @doc("The condition that will execute the action.") + /** + * The condition that will execute the action. + */ trigger?: Trigger; - @doc("The action that will be executed.") + /** + * The action that will be executed. + */ action?: Action; } -@doc("A condition to be satisfied for an action to be executed.") +/** + * A condition to be satisfied for an action to be executed. + */ model Trigger { - @doc("Percentage of lifetime at which to trigger. Value should be between 1 and 99.") + /** + * Percentage of lifetime at which to trigger. Value should be between 1 and 99. + */ @maxValue(99) @minValue(1) @projectedName("json", "lifetime_percentage") lifetimePercentage?: int32; - @doc(""" -Days before expiry to attempt renewal. Value should be between 1 and -validity_in_months multiplied by 27. If validity_in_months is 36, then value -should be between 1 and 972 (36 * 27). -""") + /** + * Days before expiry to attempt renewal. Value should be between 1 and + * validity_in_months multiplied by 27. If validity_in_months is 36, then value + * should be between 1 and 972 (36 * 27). + */ @projectedName("json", "days_before_expiry") daysBeforeExpiry?: int32; } -@doc("The action that will be executed.") +/** + * The action that will be executed. + */ model Action { - @doc("The type of the action.") + /** + * The type of the action. + */ @projectedName("json", "action_type") actionType?: ActionType; } -@doc("Parameters for the issuer of the X509 component of a certificate.") +/** + * Parameters for the issuer of the X509 component of a certificate. + */ model IssuerParameters { - @doc(""" -Name of the referenced issuer object or reserved names; for example, 'Self' or -'Unknown'. -""") + /** + * Name of the referenced issuer object or reserved names; for example, 'Self' or + * 'Unknown'. + */ name?: string; - @doc(""" -Certificate type as supported by the provider (optional); for example 'OV-SSL', -'EV-SSL' -""") + /** + * Certificate type as supported by the provider (optional); for example 'OV-SSL', + * 'EV-SSL' + */ @projectedName("json", "cty") certificateType?: string; - @doc(""" -Indicates if the certificates generated under this policy should be published -to certificate transparency logs. -""") + /** + * Indicates if the certificates generated under this policy should be published + * to certificate transparency logs. + */ @projectedName("json", "cert_transparency") certificateTransparency?: boolean; } -@doc("The contacts for the vault certificates.") +/** + * The contacts for the vault certificates. + */ model Contacts { - @doc("Identifier for the contacts collection.") + /** + * Identifier for the contacts collection. + */ @visibility("read") id?: string; - @doc("The contact list for the vault certificates.") + /** + * The contact list for the vault certificates. + */ @projectedName("json", "contacts") contactList?: Contact[]; } -@doc("The contact information for the vault certificates.") +/** + * The contact information for the vault certificates. + */ model Contact { - @doc("Email address.") + /** + * Email address. + */ @projectedName("json", "email") emailAddress?: string; - @doc("Name.") + /** + * Name. + */ name?: string; - @doc("Phone number.") + /** + * Phone number. + */ phone?: string; } -@doc("The certificate issuer list result.") +/** + * The certificate issuer list result. + */ model CertificateIssuerListResult is Azure.Core.Page; -@doc("The certificate issuer item containing certificate issuer metadata.") +/** + * The certificate issuer item containing certificate issuer metadata. + */ model CertificateIssuerItem { - @doc("Certificate Identifier.") + /** + * Certificate Identifier. + */ id?: string; - @doc("The issuer provider.") + /** + * The issuer provider. + */ provider?: string; } -@doc("The certificate issuer set parameters.") +/** + * The certificate issuer set parameters. + */ model CertificateIssuerSetParameters { - @doc("The issuer provider.") + /** + * The issuer provider. + */ provider: string; - @doc("The credentials to be used for the issuer.") + /** + * The credentials to be used for the issuer. + */ credentials?: IssuerCredentials; - @doc("Details of the organization as provided to the issuer.") + /** + * Details of the organization as provided to the issuer. + */ @projectedName("json", "org_details") organizationDetails?: OrganizationDetails; - @doc("Attributes of the issuer object.") + /** + * Attributes of the issuer object. + */ attributes?: IssuerAttributes; } -@doc("The credentials to be used for the certificate issuer.") +/** + * The credentials to be used for the certificate issuer. + */ model IssuerCredentials { - @doc("The user name/account name/account id.") + /** + * The user name/account name/account id. + */ @projectedName("json", "account_id") accountId?: string; - @doc("The password/secret/account key.") + /** + * The password/secret/account key. + */ @projectedName("json", "pwd") password?: string; } -@doc("Details of the organization of the certificate issuer.") +/** + * Details of the organization of the certificate issuer. + */ model OrganizationDetails { - @doc("Id of the organization.") + /** + * Id of the organization. + */ id?: string; - @doc("Details of the organization administrator.") + /** + * Details of the organization administrator. + */ @projectedName("json", "admin_details") adminDetails?: AdministratorDetails[]; } -@doc("Details of the organization administrator of the certificate issuer.") +/** + * Details of the organization administrator of the certificate issuer. + */ model AdministratorDetails { - @doc("First name.") + /** + * First name. + */ @projectedName("json", "first_name") firstName?: string; - @doc("Last name.") + /** + * Last name. + */ @projectedName("json", "last_name") lastName?: string; - @doc("Email address.") + /** + * Email address. + */ @projectedName("json", "email") emailAddress?: string; - @doc("Phone number.") + /** + * Phone number. + */ phone?: string; } -@doc("The attributes of an issuer managed by the Key Vault service.") +/** + * The attributes of an issuer managed by the Key Vault service. + */ model IssuerAttributes { - @doc("Determines whether the issuer is enabled.") + /** + * Determines whether the issuer is enabled. + */ enabled?: boolean; - @doc("Creation time in UTC.") + /** + * Creation time in UTC. + */ @visibility("read") created?: plainTime; - @doc("Last updated time in UTC.") + /** + * Last updated time in UTC. + */ @visibility("read") updated?: plainTime; } -@doc("The issuer for Key Vault certificate.") +/** + * The issuer for Key Vault certificate. + */ model IssuerBundle { - @doc("Identifier for the issuer object.") + /** + * Identifier for the issuer object. + */ @visibility("read") id?: string; - @doc("The issuer provider.") + /** + * The issuer provider. + */ provider?: string; - @doc("The credentials to be used for the issuer.") + /** + * The credentials to be used for the issuer. + */ credentials?: IssuerCredentials; - @doc("Details of the organization as provided to the issuer.") + /** + * Details of the organization as provided to the issuer. + */ @projectedName("json", "org_details") organizationDetails?: OrganizationDetails; - @doc("Attributes of the issuer object.") + /** + * Attributes of the issuer object. + */ attributes?: IssuerAttributes; } -@doc("The certificate issuer update parameters.") +/** + * The certificate issuer update parameters. + */ model CertificateIssuerUpdateParameters { - @doc("The issuer provider.") + /** + * The issuer provider. + */ provider?: string; - @doc("The credentials to be used for the issuer.") + /** + * The credentials to be used for the issuer. + */ credentials?: IssuerCredentials; - @doc("Details of the organization as provided to the issuer.") + /** + * Details of the organization as provided to the issuer. + */ @projectedName("json", "org_details") organizationDetails?: OrganizationDetails; - @doc("Attributes of the issuer object.") + /** + * Attributes of the issuer object. + */ attributes?: IssuerAttributes; } -@doc("The certificate create parameters.") +/** + * The certificate create parameters. + */ model CertificateCreateParameters { - @doc("The management policy for the certificate.") + /** + * The management policy for the certificate. + */ @projectedName("json", "policy") certificatePolicy?: CertificatePolicy; - @doc("The attributes of the certificate (optional).") + /** + * The attributes of the certificate (optional). + */ @projectedName("json", "attributes") certificateAttributes?: CertificateAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; } -@doc("A certificate operation is returned in case of asynchronous requests.") +/** + * A certificate operation is returned in case of asynchronous requests. + */ model CertificateOperation { - @doc("The certificate id.") + /** + * The certificate id. + */ @visibility("read") id?: string; - @doc("Parameters for the issuer of the X509 component of a certificate.") + /** + * Parameters for the issuer of the X509 component of a certificate. + */ @projectedName("json", "issuer") issuerParameters?: IssuerParameters; - @doc(""" -The certificate signing request (CSR) that is being used in the certificate -operation. -""") + /** + * The certificate signing request (CSR) that is being used in the certificate + * operation. + */ csr?: bytes; - @doc("Indicates if cancellation was requested on the certificate operation.") + /** + * Indicates if cancellation was requested on the certificate operation. + */ @projectedName("json", "cancellation_requested") cancellationRequested?: boolean; - @doc("Status of the certificate operation.") + /** + * Status of the certificate operation. + */ status?: string; - @doc("The status details of the certificate operation.") + /** + * The status details of the certificate operation. + */ @projectedName("json", "status_details") statusDetails?: string; - @doc("Error encountered, if any, during the certificate operation.") + /** + * Error encountered, if any, during the certificate operation. + */ error?: Error; - @doc("Location which contains the result of the certificate operation.") + /** + * Location which contains the result of the certificate operation. + */ target?: string; - @doc("Identifier for the certificate operation.") + /** + * Identifier for the certificate operation. + */ @projectedName("json", "request_id") requestId?: string; } -@doc("The certificate import parameters.") +/** + * The certificate import parameters. + */ model CertificateImportParameters { - @doc(""" -Base64 encoded representation of the certificate object to import. This -certificate needs to contain the private key. -""") + /** + * Base64 encoded representation of the certificate object to import. This + * certificate needs to contain the private key. + */ @projectedName("json", "value") base64EncodedCertificate: string; - @doc(""" -If the private key in base64EncodedCertificate is encrypted, the password used -for encryption. -""") + /** + * If the private key in base64EncodedCertificate is encrypted, the password used + * for encryption. + */ @projectedName("json", "pwd") password?: string; - @doc("The management policy for the certificate.") + /** + * The management policy for the certificate. + */ @projectedName("json", "policy") certificatePolicy?: CertificatePolicy; - @doc("The attributes of the certificate (optional).") + /** + * The attributes of the certificate (optional). + */ @projectedName("json", "attributes") certificateAttributes?: CertificateAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; } -@doc("The certificate update parameters.") +/** + * The certificate update parameters. + */ model CertificateUpdateParameters { - @doc("The management policy for the certificate.") + /** + * The management policy for the certificate. + */ @projectedName("json", "policy") certificatePolicy?: CertificatePolicy; - @doc("The attributes of the certificate (optional).") + /** + * The attributes of the certificate (optional). + */ @projectedName("json", "attributes") certificateAttributes?: CertificateAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; } -@doc("The certificate operation update parameters.") +/** + * The certificate operation update parameters. + */ model CertificateOperationUpdateParameter { - @doc("Indicates if cancellation was requested on the certificate operation.") + /** + * Indicates if cancellation was requested on the certificate operation. + */ @projectedName("json", "cancellation_requested") cancellationRequested: boolean; } -@doc("The certificate merge parameters") +/** + * The certificate merge parameters + */ model CertificateMergeParameters { - @doc("The certificate or the certificate chain to merge.") + /** + * The certificate or the certificate chain to merge. + */ @projectedName("json", "x5c") x509Certificates: bytes[]; - @doc("The attributes of the certificate (optional).") + /** + * The attributes of the certificate (optional). + */ @projectedName("json", "attributes") certificateAttributes?: CertificateAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; } -@doc("The backup certificate result, containing the backup blob.") +/** + * The backup certificate result, containing the backup blob. + */ model BackupCertificateResult { - @doc("The backup blob containing the backed up certificate.") + /** + * The backup blob containing the backed up certificate. + */ @visibility("read") value?: bytes; } -@doc("The certificate restore parameters.") +/** + * The certificate restore parameters. + */ model CertificateRestoreParameters { - @doc("The backup blob associated with a certificate bundle.") + /** + * The backup blob associated with a certificate bundle. + */ @projectedName("json", "value") certificateBundleBackup: bytes; } -@doc("A list of certificates that have been deleted in this vault.") +/** + * A list of certificates that have been deleted in this vault. + */ model DeletedCertificateListResult is Azure.Core.Page; -@doc("The deleted certificate item containing metadata about the deleted certificate.") +/** + * The deleted certificate item containing metadata about the deleted certificate. + */ model DeletedCertificateItem extends CertificateItem { - @doc(""" -The url of the recovery object, used to identify and recover the deleted -certificate. -""") + /** + * The url of the recovery object, used to identify and recover the deleted + * certificate. + */ recoveryId?: string; - @doc("The time when the certificate is scheduled to be purged, in UTC") + /** + * The time when the certificate is scheduled to be purged, in UTC + */ @visibility("read") scheduledPurgeDate?: plainTime; - @doc("The time when the certificate was deleted, in UTC") + /** + * The time when the certificate was deleted, in UTC + */ @visibility("read") deletedDate?: plainTime; } -@doc("The key create parameters.") +/** + * The key create parameters. + */ model KeyCreateParameters { - @doc("The type of key to create. For valid values, see JsonWebKeyType.") + /** + * The type of key to create. For valid values, see JsonWebKeyType. + */ kty: JsonWebKeyType; - @doc("The key size in bits. For example: 2048, 3072, or 4096 for RSA.") + /** + * The key size in bits. For example: 2048, 3072, or 4096 for RSA. + */ @projectedName("json", "key_size") keySize?: int32; - @doc("The public exponent for a RSA key.") + /** + * The public exponent for a RSA key. + */ @projectedName("json", "public_exponent") publicExponent?: int32; @projectedName("json", "key_ops") keyOps?: JsonWebKeyOperation[]; - @doc("The attributes of a key managed by the key vault service.") + /** + * The attributes of a key managed by the key vault service. + */ @projectedName("json", "attributes") keyAttributes?: KeyAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; - @doc("Elliptic curve name. For valid values, see JsonWebKeyCurveName.") + /** + * Elliptic curve name. For valid values, see JsonWebKeyCurveName. + */ @projectedName("json", "crv") curve?: JsonWebKeyCurveName; - @doc("The policy rules under which the key can be exported.") + /** + * The policy rules under which the key can be exported. + */ @projectedName("json", "release_policy") releasePolicy?: KeyReleasePolicy; } -@doc("The attributes of a key managed by the key vault service.") +/** + * The attributes of a key managed by the key vault service. + */ model KeyAttributes extends Attributes { - @doc(""" -softDelete data retention days. Value should be >=7 and <=90 when softDelete -enabled, otherwise 0. -""") + /** + * softDelete data retention days. Value should be >=7 and <=90 when softDelete + * enabled, otherwise 0. + */ @visibility("read") recoverableDays?: int32; - @doc(""" -Reflects the deletion recovery level currently in effect for keys in the -current vault. If it contains 'Purgeable' the key can be permanently deleted by -a privileged user; otherwise, only the system can purge the key, at the end of -the retention interval. -""") + /** + * Reflects the deletion recovery level currently in effect for keys in the + * current vault. If it contains 'Purgeable' the key can be permanently deleted by + * a privileged user; otherwise, only the system can purge the key, at the end of + * the retention interval. + */ @visibility("read") recoveryLevel?: DeletionRecoveryLevel; - @doc(""" -Indicates if the private key can be exported. Release policy must be provided -when creating the first version of an exportable key. -""") + /** + * Indicates if the private key can be exported. Release policy must be provided + * when creating the first version of an exportable key. + */ exportable?: boolean; } -@doc("The policy rules under which the key can be exported.") +/** + * The policy rules under which the key can be exported. + */ model KeyReleasePolicy { - @doc("Content type and version of key release policy") - contentType?: string; - - @doc(""" -Defines the mutability state of the policy. Once marked immutable, this flag -cannot be reset and the policy cannot be changed under any circumstances. -""") + /** + * Content type and version of key release policy + */ + contentType?: string = "application/json; charset=utf-8"; + + /** + * Defines the mutability state of the policy. Once marked immutable, this flag + * cannot be reset and the policy cannot be changed under any circumstances. + */ immutable?: boolean; - @doc(""" -Blob encoding the policy rules under which the key can be released. Blob must -be base64 URL encoded. -""") + /** + * Blob encoding the policy rules under which the key can be released. Blob must + * be base64 URL encoded. + */ @projectedName("json", "data") encodedPolicy?: bytes; } -@doc("A KeyBundle consisting of a WebKey plus its attributes.") +/** + * A KeyBundle consisting of a WebKey plus its attributes. + */ model KeyBundle { - @doc("The Json web key.") + /** + * The Json web key. + */ key?: JsonWebKey; - @doc("The key management attributes.") + /** + * The key management attributes. + */ attributes?: KeyAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; - @doc(""" -True if the key's lifetime is managed by key vault. If this is a key backing a -certificate, then managed will be true. -""") + /** + * True if the key's lifetime is managed by key vault. If this is a key backing a + * certificate, then managed will be true. + */ @visibility("read") managed?: boolean; - @doc("The policy rules under which the key can be exported.") + /** + * The policy rules under which the key can be exported. + */ @projectedName("json", "release_policy") releasePolicy?: KeyReleasePolicy; } -@doc("As of http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18") +/** + * As of http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18 + */ model JsonWebKey { - @doc("Key identifier.") + /** + * Key identifier. + */ kid?: string; - @doc(""" -JsonWebKey Key Type (kty), as defined in -https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. -""") + /** + * JsonWebKey Key Type (kty), as defined in + * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. + */ kty?: JsonWebKeyType; @projectedName("json", "key_ops") keyOps?: string[]; - @doc("RSA modulus.") + /** + * RSA modulus. + */ n?: bytes; - @doc("RSA public exponent.") + /** + * RSA public exponent. + */ e?: bytes; - @doc("RSA private exponent, or the D component of an EC or OKP private key.") + /** + * RSA private exponent, or the D component of an EC or OKP private key. + */ d?: bytes; - @doc("RSA private key parameter.") + /** + * RSA private key parameter. + */ @projectedName("json", "dp") DP?: bytes; - @doc("RSA private key parameter.") + /** + * RSA private key parameter. + */ @projectedName("json", "dq") DQ?: bytes; - @doc("RSA private key parameter.") + /** + * RSA private key parameter. + */ @projectedName("json", "qi") QI?: bytes; - @doc("RSA secret prime.") + /** + * RSA secret prime. + */ p?: bytes; - @doc("RSA secret prime, with p < q.") + /** + * RSA secret prime, with p < q. + */ q?: bytes; - @doc("Symmetric key.") + /** + * Symmetric key. + */ k?: bytes; - @doc("Protected Key, used with 'Bring Your Own Key'.") + /** + * Protected Key, used with 'Bring Your Own Key'. + */ @projectedName("json", "key_hsm") t?: bytes; - @doc("Elliptic curve name. For valid values, see JsonWebKeyCurveName.") + /** + * Elliptic curve name. For valid values, see JsonWebKeyCurveName. + */ crv?: JsonWebKeyCurveName; - @doc("X component of an EC or OKP public key.") + /** + * X component of an EC or OKP public key. + */ x?: bytes; - @doc("Y component of an EC public key.") + /** + * Y component of an EC public key. + */ y?: bytes; } -@doc("The key import parameters.") +/** + * The key import parameters. + */ model KeyImportParameters { - @doc("Whether to import as a hardware key (HSM) or software key.") + /** + * Whether to import as a hardware key (HSM) or software key. + */ @projectedName("json", "Hsm") hsm?: boolean; - @doc("The Json web key") + /** + * The Json web key + */ key: JsonWebKey; - @doc("The key management attributes.") + /** + * The key management attributes. + */ @projectedName("json", "attributes") keyAttributes?: KeyAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; - @doc("The policy rules under which the key can be exported.") + /** + * The policy rules under which the key can be exported. + */ @projectedName("json", "release_policy") releasePolicy?: KeyReleasePolicy; } -@doc("A DeletedKeyBundle consisting of a WebKey plus its Attributes and deletion info") +/** + * A DeletedKeyBundle consisting of a WebKey plus its Attributes and deletion info + */ model DeletedKeyBundle extends KeyBundle { - @doc("The url of the recovery object, used to identify and recover the deleted key.") + /** + * The url of the recovery object, used to identify and recover the deleted key. + */ recoveryId?: string; - @doc("The time when the key is scheduled to be purged, in UTC") + /** + * The time when the key is scheduled to be purged, in UTC + */ @visibility("read") scheduledPurgeDate?: plainTime; - @doc("The time when the key was deleted, in UTC") + /** + * The time when the key was deleted, in UTC + */ @visibility("read") deletedDate?: plainTime; } -@doc("The key update parameters.") +/** + * The key update parameters. + */ model KeyUpdateParameters { - @doc(""" -Json web key operations. For more information on possible key operations, see -JsonWebKeyOperation. -""") + /** + * Json web key operations. For more information on possible key operations, see + * JsonWebKeyOperation. + */ @projectedName("json", "key_ops") keyOps?: JsonWebKeyOperation[]; - @doc("The attributes of a key managed by the key vault service.") + /** + * The attributes of a key managed by the key vault service. + */ @projectedName("json", "attributes") keyAttributes?: KeyAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; - @doc("The policy rules under which the key can be exported.") + /** + * The policy rules under which the key can be exported. + */ @projectedName("json", "release_policy") releasePolicy?: KeyReleasePolicy; } -@doc("The key list result.") +/** + * The key list result. + */ model KeyListResult is Azure.Core.Page; -@doc("The key item containing key metadata.") +/** + * The key item containing key metadata. + */ model KeyItem { - @doc("Key identifier.") + /** + * Key identifier. + */ kid?: string; - @doc("The key management attributes.") + /** + * The key management attributes. + */ attributes?: KeyAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; - @doc(""" -True if the key's lifetime is managed by key vault. If this is a key backing a -certificate, then managed will be true. -""") + /** + * True if the key's lifetime is managed by key vault. If this is a key backing a + * certificate, then managed will be true. + */ @visibility("read") managed?: boolean; } -@doc("The backup key result, containing the backup blob.") +/** + * The backup key result, containing the backup blob. + */ model BackupKeyResult { - @doc("The backup blob containing the backed up key.") + /** + * The backup blob containing the backed up key. + */ @visibility("read") value?: bytes; } -@doc("The key restore parameters.") +/** + * The key restore parameters. + */ model KeyRestoreParameters { - @doc("The backup blob associated with a key bundle.") + /** + * The backup blob associated with a key bundle. + */ @projectedName("json", "value") keyBundleBackup: bytes; } -@doc("The key operations parameters.") +/** + * The key operations parameters. + */ model KeyOperationsParameters { - @doc("algorithm identifier") + /** + * algorithm identifier + */ @projectedName("json", "alg") algorithm: JsonWebKeyEncryptionAlgorithm; value: bytes; - @doc(""" -Cryptographically random, non-repeating initialization vector for symmetric -algorithms. -""") + /** + * Cryptographically random, non-repeating initialization vector for symmetric + * algorithms. + */ iv?: bytes; - @doc(""" -Additional data to authenticate but not encrypt/decrypt when using -authenticated crypto algorithms. -""") + /** + * Additional data to authenticate but not encrypt/decrypt when using + * authenticated crypto algorithms. + */ aad?: bytes; - @doc(""" -The tag to authenticate when performing decryption with an authenticated -algorithm. -""") + /** + * The tag to authenticate when performing decryption with an authenticated + * algorithm. + */ tag?: bytes; } -@doc("The key operation result.") +/** + * The key operation result. + */ model KeyOperationResult { - @doc("Key identifier") + /** + * Key identifier + */ @visibility("read") kid?: string; @@ -1306,439 +1956,633 @@ model KeyOperationResult { additionalAuthenticatedData?: bytes; } -@doc("The key operations parameters.") +/** + * The key operations parameters. + */ model KeySignParameters { - @doc(""" -The signing/verification algorithm identifier. For more information on possible -algorithm types, see JsonWebKeySignatureAlgorithm. -""") + /** + * The signing/verification algorithm identifier. For more information on possible + * algorithm types, see JsonWebKeySignatureAlgorithm. + */ @projectedName("json", "alg") algorithm: JsonWebKeySignatureAlgorithm; value: bytes; } -@doc("The key verify parameters.") +/** + * The key verify parameters. + */ model KeyVerifyParameters { - @doc(""" -The signing/verification algorithm. For more information on possible algorithm -types, see JsonWebKeySignatureAlgorithm. -""") + /** + * The signing/verification algorithm. For more information on possible algorithm + * types, see JsonWebKeySignatureAlgorithm. + */ @projectedName("json", "alg") algorithm: JsonWebKeySignatureAlgorithm; - @doc("The digest used for signing.") + /** + * The digest used for signing. + */ digest: bytes; - @doc("The signature to be verified.") + /** + * The signature to be verified. + */ @projectedName("json", "value") signature: bytes; } -@doc("The key verify result.") +/** + * The key verify result. + */ model KeyVerifyResult { - @doc("True if the signature is verified, otherwise false.") + /** + * True if the signature is verified, otherwise false. + */ @visibility("read") value?: boolean; } -@doc("The release key parameters.") +/** + * The release key parameters. + */ model KeyReleaseParameters { - @doc("The attestation assertion for the target of the key release.") + /** + * The attestation assertion for the target of the key release. + */ @minLength(1) @projectedName("json", "target") targetAttestationToken: string; - @doc("A client provided nonce for freshness.") + /** + * A client provided nonce for freshness. + */ nonce?: string; - @doc("The encryption algorithm to use to protected the exported key material") + /** + * The encryption algorithm to use to protected the exported key material + */ enc?: KeyEncryptionAlgorithm; } -@doc("The release result, containing the released key.") +/** + * The release result, containing the released key. + */ model KeyReleaseResult { - @doc("A signed object containing the released key.") + /** + * A signed object containing the released key. + */ @visibility("read") value?: string; } -@doc("A list of keys that have been deleted in this vault.") +/** + * A list of keys that have been deleted in this vault. + */ model DeletedKeyListResult is Azure.Core.Page; -@doc(""" -The deleted key item containing the deleted key metadata and information about -deletion. -""") +/** + * The deleted key item containing the deleted key metadata and information about + * deletion. + */ model DeletedKeyItem extends KeyItem { - @doc("The url of the recovery object, used to identify and recover the deleted key.") + /** + * The url of the recovery object, used to identify and recover the deleted key. + */ recoveryId?: string; - @doc("The time when the key is scheduled to be purged, in UTC") + /** + * The time when the key is scheduled to be purged, in UTC + */ @visibility("read") scheduledPurgeDate?: plainTime; - @doc("The time when the key was deleted, in UTC") + /** + * The time when the key was deleted, in UTC + */ @visibility("read") deletedDate?: plainTime; } -@doc("Management policy for a key.") +/** + * Management policy for a key. + */ model KeyRotationPolicy { - @doc("The key policy id.") + /** + * The key policy id. + */ @visibility("read") id?: string; - @doc(""" -Actions that will be performed by Key Vault over the lifetime of a key. For -preview, lifetimeActions can only have two items at maximum: one for rotate, -one for notify. Notification time would be default to 30 days before expiry and -it is not configurable. -""") + /** + * Actions that will be performed by Key Vault over the lifetime of a key. For + * preview, lifetimeActions can only have two items at maximum: one for rotate, + * one for notify. Notification time would be default to 30 days before expiry and + * it is not configurable. + */ lifetimeActions?: LifetimeActions[]; - @doc("The key rotation policy attributes.") + /** + * The key rotation policy attributes. + */ attributes?: KeyRotationPolicyAttributes; } -@doc(""" -Action and its trigger that will be performed by Key Vault over the lifetime of -a key. -""") +/** + * Action and its trigger that will be performed by Key Vault over the lifetime of + * a key. + */ model LifetimeActions { - @doc("The condition that will execute the action.") + /** + * The condition that will execute the action. + */ trigger?: LifetimeActionsTrigger; - @doc("The action that will be executed.") + /** + * The action that will be executed. + */ action?: LifetimeActionsType; } -@doc("A condition to be satisfied for an action to be executed.") +/** + * A condition to be satisfied for an action to be executed. + */ model LifetimeActionsTrigger { - @doc(""" -Time after creation to attempt to rotate. It only applies to rotate. It will be -in ISO 8601 duration format. Example: 90 days : \"P90D\" -""") + /** + * Time after creation to attempt to rotate. It only applies to rotate. It will be + * in ISO 8601 duration format. Example: 90 days : "P90D" + */ timeAfterCreate?: string; - @doc(""" -Time before expiry to attempt to rotate or notify. It will be in ISO 8601 -duration format. Example: 90 days : \"P90D\" -""") + /** + * Time before expiry to attempt to rotate or notify. It will be in ISO 8601 + * duration format. Example: 90 days : "P90D" + */ timeBeforeExpiry?: string; } -@doc("The action that will be executed.") +/** + * The action that will be executed. + */ model LifetimeActionsType { - @doc("The type of the action.") + /** + * The type of the action. + */ type?: ActionType; } -@doc("The key rotation policy attributes.") +/** + * The key rotation policy attributes. + */ model KeyRotationPolicyAttributes { - @doc(""" -The expiryTime will be applied on the new key version. It should be at least 28 -days. It will be in ISO 8601 Format. Examples: 90 days: P90D, 3 months: P3M, 48 -hours: PT48H, 1 year and 10 days: P1Y10D -""") + /** + * The expiryTime will be applied on the new key version. It should be at least 28 + * days. It will be in ISO 8601 Format. Examples: 90 days: P90D, 3 months: P3M, 48 + * hours: PT48H, 1 year and 10 days: P1Y10D + */ expiryTime?: string; - @doc("The key rotation policy created time in UTC.") + /** + * The key rotation policy created time in UTC. + */ @visibility("read") created?: plainTime; - @doc("The key rotation policy's last updated time in UTC.") + /** + * The key rotation policy's last updated time in UTC. + */ @visibility("read") updated?: plainTime; } -@doc("The get random bytes request object.") +/** + * The get random bytes request object. + */ model GetRandomBytesRequest { - @doc("The requested number of random bytes.") + /** + * The requested number of random bytes. + */ @maxValue(128) @minValue(1) count: int32; } -@doc("The get random bytes response object containing the bytes.") +/** + * The get random bytes response object containing the bytes. + */ model RandomBytes { - @doc("The bytes encoded as a base64url string.") + /** + * The bytes encoded as a base64url string. + */ value: bytes; } -@doc("Role definition.") +/** + * Role definition. + */ model RoleDefinition { - @doc("The role definition ID.") + /** + * The role definition ID. + */ @visibility("read") id?: string; - @doc("The role definition name.") + /** + * The role definition name. + */ @visibility("read") name?: string; - @doc("The role definition type.") + /** + * The role definition type. + */ @visibility("read") type?: RoleDefinitionType; - @doc("Role definition properties.") + /** + * Role definition properties. + */ properties?: RoleDefinitionProperties; } -@doc("Role definition properties.") +/** + * Role definition properties. + */ model RoleDefinitionProperties { - @doc("The role name.") + /** + * The role name. + */ roleName?: string; - @doc("The role definition description.") + /** + * The role definition description. + */ description?: string; - @doc("The role type.") + /** + * The role type. + */ @projectedName("json", "type") roleType?: RoleType; - @doc("Role definition permissions.") + /** + * Role definition permissions. + */ permissions?: Permission[]; - @doc("Role definition assignable scopes.") + /** + * Role definition assignable scopes. + */ assignableScopes?: RoleScope[]; } -@doc("Role definition permissions.") +/** + * Role definition permissions. + */ model Permission { - @doc("Action permissions that are granted.") + /** + * Action permissions that are granted. + */ actions?: string[]; - @doc(""" -Action permissions that are excluded but not denied. They may be granted by -other role definitions assigned to a principal. -""") + /** + * Action permissions that are excluded but not denied. They may be granted by + * other role definitions assigned to a principal. + */ notActions?: string[]; - @doc("Data action permissions that are granted.") + /** + * Data action permissions that are granted. + */ dataActions?: DataAction[]; - @doc(""" -Data action permissions that are excluded but not denied. They may be granted -by other role definitions assigned to a principal. -""") + /** + * Data action permissions that are excluded but not denied. They may be granted + * by other role definitions assigned to a principal. + */ notDataActions?: DataAction[]; } -@doc("Role definition create parameters.") +/** + * Role definition create parameters. + */ model RoleDefinitionCreateParameters { - @doc("Role definition properties.") + /** + * Role definition properties. + */ properties: RoleDefinitionProperties; } -@doc("Role definition list operation result.") +/** + * Role definition list operation result. + */ model RoleDefinitionListResult is Azure.Core.Page; -@doc("Role Assignments") +/** + * Role Assignments + */ model RoleAssignment { - @doc("The role assignment ID.") + /** + * The role assignment ID. + */ @visibility("read") id?: string; - @doc("The role assignment name.") + /** + * The role assignment name. + */ @visibility("read") name?: string; - @doc("The role assignment type.") + /** + * The role assignment type. + */ @visibility("read") type?: string; - @doc("Role assignment properties.") + /** + * Role assignment properties. + */ properties?: RoleAssignmentPropertiesWithScope; } -@doc("Role assignment properties with scope.") +/** + * Role assignment properties with scope. + */ model RoleAssignmentPropertiesWithScope { - @doc("The role scope.") + /** + * The role scope. + */ scope?: RoleScope; - @doc("The role definition ID.") + /** + * The role definition ID. + */ roleDefinitionId?: string; - @doc("The principal ID.") + /** + * The principal ID. + */ principalId?: string; } -@doc("Role assignment create parameters.") +/** + * Role assignment create parameters. + */ model RoleAssignmentCreateParameters { - @doc("Role assignment properties.") + /** + * Role assignment properties. + */ properties: RoleAssignmentProperties; } -@doc("Role assignment properties.") +/** + * Role assignment properties. + */ model RoleAssignmentProperties { - @doc("The role definition ID used in the role assignment.") + /** + * The role definition ID used in the role assignment. + */ roleDefinitionId: string; - @doc(""" -The principal ID assigned to the role. This maps to the ID inside the Active -Directory. It can point to a user, service principal, or security group. -""") + /** + * The principal ID assigned to the role. This maps to the ID inside the Active + * Directory. It can point to a user, service principal, or security group. + */ principalId: string; } -@doc("Role assignment list operation result.") +/** + * Role assignment list operation result. + */ model RoleAssignmentListResult is Azure.Core.Page; -@doc("The secret set parameters.") +/** + * The secret set parameters. + */ model SecretSetParameters { - @doc("The value of the secret.") + /** + * The value of the secret. + */ value: string; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; - @doc("Type of the secret value such as a password.") + /** + * Type of the secret value such as a password. + */ contentType?: string; - @doc("The secret management attributes.") + /** + * The secret management attributes. + */ @projectedName("json", "attributes") secretAttributes?: SecretAttributes; } -@doc("The secret management attributes.") +/** + * The secret management attributes. + */ model SecretAttributes extends Attributes { - @doc(""" -softDelete data retention days. Value should be >=7 and <=90 when softDelete -enabled, otherwise 0. -""") + /** + * softDelete data retention days. Value should be >=7 and <=90 when softDelete + * enabled, otherwise 0. + */ @visibility("read") recoverableDays?: int32; - @doc(""" -Reflects the deletion recovery level currently in effect for secrets in the -current vault. If it contains 'Purgeable', the secret can be permanently -deleted by a privileged user; otherwise, only the system can purge the secret, -at the end of the retention interval. -""") + /** + * Reflects the deletion recovery level currently in effect for secrets in the + * current vault. If it contains 'Purgeable', the secret can be permanently + * deleted by a privileged user; otherwise, only the system can purge the secret, + * at the end of the retention interval. + */ @visibility("read") recoveryLevel?: DeletionRecoveryLevel; } -@doc("A secret consisting of a value, id and its attributes.") +/** + * A secret consisting of a value, id and its attributes. + */ model SecretBundle { - @doc("The secret value.") + /** + * The secret value. + */ value?: string; - @doc("The secret id.") + /** + * The secret id. + */ id?: string; - @doc("The content type of the secret.") + /** + * The content type of the secret. + */ contentType?: string; - @doc("The secret management attributes.") + /** + * The secret management attributes. + */ attributes?: SecretAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; - @doc(""" -If this is a secret backing a KV certificate, then this field specifies the -corresponding key backing the KV certificate. -""") + /** + * If this is a secret backing a KV certificate, then this field specifies the + * corresponding key backing the KV certificate. + */ @visibility("read") kid?: string; - @doc(""" -True if the secret's lifetime is managed by key vault. If this is a secret -backing a certificate, then managed will be true. -""") + /** + * True if the secret's lifetime is managed by key vault. If this is a secret + * backing a certificate, then managed will be true. + */ @visibility("read") managed?: boolean; } -@doc(""" -A Deleted Secret consisting of its previous id, attributes and its tags, as -well as information on when it will be purged. -""") +/** + * A Deleted Secret consisting of its previous id, attributes and its tags, as + * well as information on when it will be purged. + */ model DeletedSecretBundle extends SecretBundle { - @doc("The url of the recovery object, used to identify and recover the deleted secret.") + /** + * The url of the recovery object, used to identify and recover the deleted secret. + */ recoveryId?: string; - @doc("The time when the secret is scheduled to be purged, in UTC") + /** + * The time when the secret is scheduled to be purged, in UTC + */ @visibility("read") scheduledPurgeDate?: plainTime; - @doc("The time when the secret was deleted, in UTC") + /** + * The time when the secret was deleted, in UTC + */ @visibility("read") deletedDate?: plainTime; } -@doc("The secret update parameters.") +/** + * The secret update parameters. + */ model SecretUpdateParameters { - @doc("Type of the secret value such as a password.") + /** + * Type of the secret value such as a password. + */ contentType?: string; - @doc("The secret management attributes.") + /** + * The secret management attributes. + */ @projectedName("json", "attributes") secretAttributes?: SecretAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; } -@doc("The secret list result.") +/** + * The secret list result. + */ model SecretListResult is Azure.Core.Page; -@doc("The secret item containing secret metadata.") +/** + * The secret item containing secret metadata. + */ model SecretItem { - @doc("Secret identifier.") + /** + * Secret identifier. + */ id?: string; - @doc("The secret management attributes.") + /** + * The secret management attributes. + */ attributes?: SecretAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; - @doc("Type of the secret value such as a password.") + /** + * Type of the secret value such as a password. + */ contentType?: string; - @doc(""" -True if the secret's lifetime is managed by key vault. If this is a key backing -a certificate, then managed will be true. -""") + /** + * True if the secret's lifetime is managed by key vault. If this is a key backing + * a certificate, then managed will be true. + */ @visibility("read") managed?: boolean; } -@doc("The deleted secret list result") +/** + * The deleted secret list result + */ model DeletedSecretListResult is Azure.Core.Page; -@doc("The deleted secret item containing metadata about the deleted secret.") +/** + * The deleted secret item containing metadata about the deleted secret. + */ model DeletedSecretItem extends SecretItem { - @doc("The url of the recovery object, used to identify and recover the deleted secret.") + /** + * The url of the recovery object, used to identify and recover the deleted secret. + */ recoveryId?: string; - @doc("The time when the secret is scheduled to be purged, in UTC") + /** + * The time when the secret is scheduled to be purged, in UTC + */ @visibility("read") scheduledPurgeDate?: plainTime; - @doc("The time when the secret was deleted, in UTC") + /** + * The time when the secret was deleted, in UTC + */ @visibility("read") deletedDate?: plainTime; } -@doc("The backup secret result, containing the backup blob.") +/** + * The backup secret result, containing the backup blob. + */ model BackupSecretResult { - @doc("The backup blob containing the backed up secret.") + /** + * The backup blob containing the backed up secret. + */ @visibility("read") value?: bytes; } -@doc("The secret restore parameters.") +/** + * The secret restore parameters. + */ model SecretRestoreParameters { - @doc("The backup blob associated with a secret bundle.") + /** + * The backup blob associated with a secret bundle. + */ @projectedName("json", "value") secretBundleBackup: bytes; } model SecurityDomainOperationStatus { - @doc("operation status") + /** + * operation status + */ status?: OperationStatus; @projectedName("json", "status_details") @@ -1746,502 +2590,700 @@ model SecurityDomainOperationStatus { } model CertificateInfoObject { - @doc("Certificates needed from customer") + /** + * Certificates needed from customer + */ certificates: SecurityDomainJsonWebKey[]; - @doc(""" -Customer to specify the number of certificates (minimum 2 and maximum 10) to -restore Security Domain -""") + /** + * Customer to specify the number of certificates (minimum 2 and maximum 10) to + * restore Security Domain + */ @maxValue(10) @minValue(2) - required?: int32; + required?: int32 = 2; } model SecurityDomainJsonWebKey { - @doc("Key identifier.") + /** + * Key identifier. + */ kid: string; - @doc(""" -JsonWebKey Key Type (kty), as defined in -https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. For -Security Domain this value must be RSA. -""") + /** + * JsonWebKey Key Type (kty), as defined in + * https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. For + * Security Domain this value must be RSA. + */ kty: string; @projectedName("json", "key_ops") keyOps: string[]; - @doc("RSA modulus.") + /** + * RSA modulus. + */ n: string; - @doc("RSA public exponent.") + /** + * RSA public exponent. + */ e: string; - @doc("X509 certificate chain parameter") + /** + * X509 certificate chain parameter + */ @projectedName("json", "x5c") x5C: string[]; - @doc("Public Key Use Parameter. This is optional and if present must be enc.") + /** + * Public Key Use Parameter. This is optional and if present must be enc. + */ use?: string; - @doc("X509 certificate SHA1 thumbprint. This is optional.") + /** + * X509 certificate SHA1 thumbprint. This is optional. + */ @projectedName("json", "x5t") x5T?: string; - @doc("X509 certificate SHA256 thumbprint.") + /** + * X509 certificate SHA256 thumbprint. + */ @projectedName("json", "x5t#S256") x5TS256: string; - @doc("Algorithm intended for use with the key.") + /** + * Algorithm intended for use with the key. + */ alg: string; } -@doc("The Security Domain.") +/** + * The Security Domain. + */ model SecurityDomainObject { - @doc("The Security Domain.") + /** + * The Security Domain. + */ value: string; } model TransferKey { - @doc("Specifies the format of the transfer key") + /** + * Specifies the format of the transfer key + */ @projectedName("json", "key_format") - keyFormat?: string; + keyFormat?: string = "jwk"; - @doc("Specifies the transfer key in JWK format") + /** + * Specifies the transfer key in JWK format + */ @projectedName("json", "transfer_key") transferKey: SecurityDomainJsonWebKey; } -@doc("The update settings request object.") +/** + * The update settings request object. + */ model UpdateSettingsRequest { - @doc("The value of the pool setting.") + /** + * The value of the pool setting. + */ value: string; } model Setting { - @doc("The account setting to be updated") + /** + * The account setting to be updated + */ name: string; - @doc("The value of the pool setting.") + /** + * The value of the pool setting. + */ value: string; - @doc("The type specifier of the value.") + /** + * The type specifier of the value. + */ type?: SettingTypeEnum; } -@doc("The settings list result.") +/** + * The settings list result. + */ model SettingsListResult { - @doc(""" -A response message containing a list of account settings with their associated -value. -""") + /** + * A response message containing a list of account settings with their associated + * value. + */ @visibility("read") value?: Setting[]; } -@doc("The storage accounts list result.") +/** + * The storage accounts list result. + */ model StorageListResult is Azure.Core.Page; -@doc("The storage account item containing storage account metadata.") +/** + * The storage account item containing storage account metadata. + */ model StorageAccountItem { - @doc("Storage identifier.") + /** + * Storage identifier. + */ @visibility("read") id?: string; - @doc("Storage account resource Id.") + /** + * Storage account resource Id. + */ @visibility("read") resourceId?: string; - @doc("The storage account management attributes.") + /** + * The storage account management attributes. + */ @visibility("read") attributes?: StorageAccountAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ @visibility("read") tags?: Record; } -@doc("The storage account management attributes.") +/** + * The storage account management attributes. + */ model StorageAccountAttributes { - @doc("the enabled state of the object.") + /** + * the enabled state of the object. + */ enabled?: boolean; - @doc("Creation time in UTC.") + /** + * Creation time in UTC. + */ @visibility("read") created?: plainTime; - @doc("Last updated time in UTC.") + /** + * Last updated time in UTC. + */ @visibility("read") updated?: plainTime; - @doc(""" -softDelete data retention days. Value should be >=7 and <=90 when softDelete -enabled, otherwise 0. -""") + /** + * softDelete data retention days. Value should be >=7 and <=90 when softDelete + * enabled, otherwise 0. + */ @visibility("read") recoverableDays?: int32; - @doc(""" -Reflects the deletion recovery level currently in effect for storage accounts -in the current vault. If it contains 'Purgeable' the storage account can be -permanently deleted by a privileged user; otherwise, only the system can purge -the storage account, at the end of the retention interval. -""") + /** + * Reflects the deletion recovery level currently in effect for storage accounts + * in the current vault. If it contains 'Purgeable' the storage account can be + * permanently deleted by a privileged user; otherwise, only the system can purge + * the storage account, at the end of the retention interval. + */ @visibility("read") recoveryLevel?: DeletionRecoveryLevel; } -@doc("The deleted storage account list result") +/** + * The deleted storage account list result + */ model DeletedStorageListResult is Azure.Core.Page; -@doc(""" -The deleted storage account item containing metadata about the deleted storage -account. -""") +/** + * The deleted storage account item containing metadata about the deleted storage + * account. + */ model DeletedStorageAccountItem extends StorageAccountItem { - @doc(""" -The url of the recovery object, used to identify and recover the deleted -storage account. -""") + /** + * The url of the recovery object, used to identify and recover the deleted + * storage account. + */ recoveryId?: string; - @doc("The time when the storage account is scheduled to be purged, in UTC") + /** + * The time when the storage account is scheduled to be purged, in UTC + */ @visibility("read") scheduledPurgeDate?: plainTime; - @doc("The time when the storage account was deleted, in UTC") + /** + * The time when the storage account was deleted, in UTC + */ @visibility("read") deletedDate?: plainTime; } -@doc(""" -A deleted storage account bundle consisting of its previous id, attributes and -its tags, as well as information on when it will be purged. -""") +/** + * A deleted storage account bundle consisting of its previous id, attributes and + * its tags, as well as information on when it will be purged. + */ model DeletedStorageBundle extends StorageBundle { - @doc(""" -The url of the recovery object, used to identify and recover the deleted -storage account. -""") + /** + * The url of the recovery object, used to identify and recover the deleted + * storage account. + */ recoveryId?: string; - @doc("The time when the storage account is scheduled to be purged, in UTC") + /** + * The time when the storage account is scheduled to be purged, in UTC + */ @visibility("read") scheduledPurgeDate?: plainTime; - @doc("The time when the storage account was deleted, in UTC") + /** + * The time when the storage account was deleted, in UTC + */ @visibility("read") deletedDate?: plainTime; } -@doc(""" -A Storage account bundle consists of key vault storage account details plus its -attributes. -""") +/** + * A Storage account bundle consists of key vault storage account details plus its + * attributes. + */ model StorageBundle { - @doc("The storage account id.") + /** + * The storage account id. + */ @visibility("read") id?: string; - @doc("The storage account resource id.") + /** + * The storage account resource id. + */ @visibility("read") resourceId?: string; - @doc("The current active storage account key name.") + /** + * The current active storage account key name. + */ @visibility("read") activeKeyName?: string; - @doc("whether keyvault should manage the storage account for the user.") + /** + * whether keyvault should manage the storage account for the user. + */ @visibility("read") autoRegenerateKey?: boolean; - @doc("The key regeneration time duration specified in ISO-8601 format.") + /** + * The key regeneration time duration specified in ISO-8601 format. + */ @visibility("read") regenerationPeriod?: string; - @doc("The storage account attributes.") + /** + * The storage account attributes. + */ @visibility("read") attributes?: StorageAccountAttributes; - @doc("Application specific metadata in the form of key-value pairs") + /** + * Application specific metadata in the form of key-value pairs + */ @visibility("read") tags?: Record; } -@doc("The backup storage result, containing the backup blob.") +/** + * The backup storage result, containing the backup blob. + */ model BackupStorageResult { - @doc("The backup blob containing the backed up storage account.") + /** + * The backup blob containing the backed up storage account. + */ @visibility("read") value?: bytes; } -@doc("The secret restore parameters.") +/** + * The secret restore parameters. + */ model StorageRestoreParameters { - @doc("The backup blob associated with a storage account.") + /** + * The backup blob associated with a storage account. + */ @projectedName("json", "value") storageBundleBackup: bytes; } -@doc("The storage account create parameters.") +/** + * The storage account create parameters. + */ model StorageAccountCreateParameters { - @doc("Storage account resource id.") + /** + * Storage account resource id. + */ resourceId: string; - @doc("Current active storage account key name.") + /** + * Current active storage account key name. + */ activeKeyName: string; - @doc("whether keyvault should manage the storage account for the user.") + /** + * whether keyvault should manage the storage account for the user. + */ autoRegenerateKey: boolean; - @doc("The key regeneration time duration specified in ISO-8601 format.") + /** + * The key regeneration time duration specified in ISO-8601 format. + */ regenerationPeriod?: string; - @doc("The attributes of the storage account.") + /** + * The attributes of the storage account. + */ @projectedName("json", "attributes") storageAccountAttributes?: StorageAccountAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; } -@doc("The storage account update parameters.") +/** + * The storage account update parameters. + */ model StorageAccountUpdateParameters { - @doc("The current active storage account key name.") + /** + * The current active storage account key name. + */ activeKeyName?: string; - @doc("whether keyvault should manage the storage account for the user.") + /** + * whether keyvault should manage the storage account for the user. + */ autoRegenerateKey?: boolean; - @doc("The key regeneration time duration specified in ISO-8601 format.") + /** + * The key regeneration time duration specified in ISO-8601 format. + */ regenerationPeriod?: string; - @doc("The attributes of the storage account.") + /** + * The attributes of the storage account. + */ @projectedName("json", "attributes") storageAccountAttributes?: StorageAccountAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; } -@doc("The storage account key regenerate parameters.") +/** + * The storage account key regenerate parameters. + */ model StorageAccountRegenerteKeyParameters { - @doc("The storage account key name.") + /** + * The storage account key name. + */ keyName: string; } -@doc("The storage account SAS definition list result.") +/** + * The storage account SAS definition list result. + */ model SasDefinitionListResult is Azure.Core.Page; -@doc("The SAS definition item containing storage SAS definition metadata.") +/** + * The SAS definition item containing storage SAS definition metadata. + */ model SasDefinitionItem { - @doc("The storage SAS identifier.") + /** + * The storage SAS identifier. + */ @visibility("read") id?: string; - @doc("The storage account SAS definition secret id.") + /** + * The storage account SAS definition secret id. + */ @visibility("read") @projectedName("json", "sid") secretId?: string; - @doc("The SAS definition management attributes.") + /** + * The SAS definition management attributes. + */ @visibility("read") attributes?: SasDefinitionAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ @visibility("read") tags?: Record; } -@doc("The SAS definition management attributes.") +/** + * The SAS definition management attributes. + */ model SasDefinitionAttributes { - @doc("the enabled state of the object.") + /** + * the enabled state of the object. + */ enabled?: boolean; - @doc("Creation time in UTC.") + /** + * Creation time in UTC. + */ @visibility("read") created?: plainTime; - @doc("Last updated time in UTC.") + /** + * Last updated time in UTC. + */ @visibility("read") updated?: plainTime; - @doc(""" -softDelete data retention days. Value should be >=7 and <=90 when softDelete -enabled, otherwise 0. -""") + /** + * softDelete data retention days. Value should be >=7 and <=90 when softDelete + * enabled, otherwise 0. + */ @visibility("read") recoverableDays?: int32; - @doc(""" -Reflects the deletion recovery level currently in effect for SAS definitions in -the current vault. If it contains 'Purgeable' the SAS definition can be -permanently deleted by a privileged user; otherwise, only the system can purge -the SAS definition, at the end of the retention interval. -""") + /** + * Reflects the deletion recovery level currently in effect for SAS definitions in + * the current vault. If it contains 'Purgeable' the SAS definition can be + * permanently deleted by a privileged user; otherwise, only the system can purge + * the SAS definition, at the end of the retention interval. + */ @visibility("read") recoveryLevel?: DeletionRecoveryLevel; } -@doc("The deleted SAS definition list result") +/** + * The deleted SAS definition list result + */ model DeletedSasDefinitionListResult is Azure.Core.Page; -@doc(""" -The deleted SAS definition item containing metadata about the deleted SAS -definition. -""") +/** + * The deleted SAS definition item containing metadata about the deleted SAS + * definition. + */ model DeletedSasDefinitionItem extends SasDefinitionItem { - @doc(""" -The url of the recovery object, used to identify and recover the deleted SAS -definition. -""") + /** + * The url of the recovery object, used to identify and recover the deleted SAS + * definition. + */ recoveryId?: string; - @doc("The time when the SAS definition is scheduled to be purged, in UTC") + /** + * The time when the SAS definition is scheduled to be purged, in UTC + */ @visibility("read") scheduledPurgeDate?: plainTime; - @doc("The time when the SAS definition was deleted, in UTC") + /** + * The time when the SAS definition was deleted, in UTC + */ @visibility("read") deletedDate?: plainTime; } -@doc(""" -A deleted SAS definition bundle consisting of its previous id, attributes and -its tags, as well as information on when it will be purged. -""") +/** + * A deleted SAS definition bundle consisting of its previous id, attributes and + * its tags, as well as information on when it will be purged. + */ model DeletedSasDefinitionBundle extends SasDefinitionBundle { - @doc(""" -The url of the recovery object, used to identify and recover the deleted SAS -definition. -""") + /** + * The url of the recovery object, used to identify and recover the deleted SAS + * definition. + */ recoveryId?: string; - @doc("The time when the SAS definition is scheduled to be purged, in UTC") + /** + * The time when the SAS definition is scheduled to be purged, in UTC + */ @visibility("read") scheduledPurgeDate?: plainTime; - @doc("The time when the SAS definition was deleted, in UTC") + /** + * The time when the SAS definition was deleted, in UTC + */ @visibility("read") deletedDate?: plainTime; } -@doc(""" -A SAS definition bundle consists of key vault SAS definition details plus its -attributes. -""") +/** + * A SAS definition bundle consists of key vault SAS definition details plus its + * attributes. + */ model SasDefinitionBundle { - @doc("The SAS definition id.") + /** + * The SAS definition id. + */ @visibility("read") id?: string; - @doc("Storage account SAS definition secret id.") + /** + * Storage account SAS definition secret id. + */ @visibility("read") @projectedName("json", "sid") secretId?: string; - @doc(""" -The SAS definition token template signed with an arbitrary key. Tokens created -according to the SAS definition will have the same properties as the template. -""") + /** + * The SAS definition token template signed with an arbitrary key. Tokens created + * according to the SAS definition will have the same properties as the template. + */ @visibility("read") templateUri?: string; - @doc("The type of SAS token the SAS definition will create.") + /** + * The type of SAS token the SAS definition will create. + */ @visibility("read") sasType?: SasTokenType; - @doc("The validity period of SAS tokens created according to the SAS definition.") + /** + * The validity period of SAS tokens created according to the SAS definition. + */ @visibility("read") validityPeriod?: string; - @doc("The SAS definition attributes.") + /** + * The SAS definition attributes. + */ @visibility("read") attributes?: SasDefinitionAttributes; - @doc("Application specific metadata in the form of key-value pairs") + /** + * Application specific metadata in the form of key-value pairs + */ @visibility("read") tags?: Record; } -@doc("The SAS definition create parameters.") +/** + * The SAS definition create parameters. + */ model SasDefinitionCreateParameters { - @doc(""" -The SAS definition token template signed with an arbitrary key. Tokens created -according to the SAS definition will have the same properties as the template. -""") + /** + * The SAS definition token template signed with an arbitrary key. Tokens created + * according to the SAS definition will have the same properties as the template. + */ templateUri: string; - @doc("The type of SAS token the SAS definition will create.") + /** + * The type of SAS token the SAS definition will create. + */ sasType: SasTokenType; - @doc("The validity period of SAS tokens created according to the SAS definition.") + /** + * The validity period of SAS tokens created according to the SAS definition. + */ validityPeriod: string; - @doc("The attributes of the SAS definition.") + /** + * The attributes of the SAS definition. + */ @projectedName("json", "attributes") sasDefinitionAttributes?: SasDefinitionAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; } -@doc("The SAS definition update parameters.") +/** + * The SAS definition update parameters. + */ model SasDefinitionUpdateParameters { - @doc(""" -The SAS definition token template signed with an arbitrary key. Tokens created -according to the SAS definition will have the same properties as the template. -""") + /** + * The SAS definition token template signed with an arbitrary key. Tokens created + * according to the SAS definition will have the same properties as the template. + */ templateUri?: string; - @doc("The type of SAS token the SAS definition will create.") + /** + * The type of SAS token the SAS definition will create. + */ sasType?: SasTokenType; - @doc("The validity period of SAS tokens created according to the SAS definition.") + /** + * The validity period of SAS tokens created according to the SAS definition. + */ validityPeriod?: string; - @doc("The attributes of the SAS definition.") + /** + * The attributes of the SAS definition. + */ @projectedName("json", "attributes") sasDefinitionAttributes?: SasDefinitionAttributes; - @doc("Application specific metadata in the form of key-value pairs.") + /** + * Application specific metadata in the form of key-value pairs. + */ tags?: Record; } -@doc("The pending certificate signing request result.") +/** + * The pending certificate signing request result. + */ model PendingCertificateSigningRequestResult { - @doc("The pending certificate signing request as Base64 encoded string.") + /** + * The pending certificate signing request as Base64 encoded string. + */ @visibility("read") value?: string; } -@doc("The export key parameters.") +/** + * The export key parameters. + */ model KeyExportParameters { - @doc(""" -The export key encryption Json web key. This key MUST be a RSA key that -supports encryption. -""") + /** + * The export key encryption Json web key. This key MUST be a RSA key that + * supports encryption. + */ wrappingKey?: JsonWebKey; - @doc(""" -The export key encryption key identifier. This key MUST be a RSA key that -supports encryption. -""") + /** + * The export key encryption key identifier. This key MUST be a RSA key that + * supports encryption. + */ wrappingKid?: string; - @doc("The encryption algorithm to use to protected the exported key material") + /** + * The encryption algorithm to use to protected the exported key material + */ enc?: KeyEncryptionAlgorithm; } -@doc("Role Assignments filter") +/** + * Role Assignments filter + */ model RoleAssignmentFilter { - @doc("Returns role assignment of the specific principal.") + /** + * Returns role assignment of the specific principal. + */ principalId?: string; } -@doc("Role Definitions filter") +/** + * Role Definitions filter + */ model RoleDefinitionFilter { - @doc("Returns role definition with the specific name.") + /** + * Returns role definition with the specific name. + */ roleName?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp index baa6366ece..0df71a6de3 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp @@ -7,163 +7,175 @@ using TypeSpec.Http; namespace Azure.Keyvault; -@doc(""" -Creates a full backup using a user-provided SAS token to an Azure blob storage -container. -""") +/** + * Creates a full backup using a user-provided SAS token to an Azure blob storage + * container. + */ @route("/backup") @post -op FullBackup is Azure.Core.Foundations.Operation< +op fullBackup is Azure.Core.Foundations.Operation< SASTokenParameter, FullBackupOperation >; -@doc("Returns the status of full backup operation") +/** + * Returns the status of full backup operation + */ @route("/backup/{jobId}/pending") @get -op FullBackupStatus is Azure.Core.Foundations.Operation< +op fullBackupStatus is Azure.Core.Foundations.Operation< { - @doc("The id returned as part of the backup request") + /** + * The id returned as part of the backup request + */ @path jobId: string; }, FullBackupOperation >; -@doc(""" -Restores all key materials using the SAS token pointing to a previously stored -Azure Blob storage backup folder -""") +/** + * Restores all key materials using the SAS token pointing to a previously stored + * Azure Blob storage backup folder + */ @route("/restore") @put -op FullRestoreOperation is Azure.Core.Foundations.Operation< +op fullRestoreOperation is Azure.Core.Foundations.Operation< RestoreOperationParameters, RestoreOperation >; -@doc("Returns the status of restore operation") +/** + * Returns the status of restore operation + */ @route("/restore/{jobId}/pending") @get -op RestoreStatus is Azure.Core.Foundations.Operation< +op restoreStatus is Azure.Core.Foundations.Operation< { - @doc("The Job Id returned part of the restore operation") + /** + * The Job Id returned part of the restore operation + */ @path jobId: string; }, RestoreOperation >; -@doc(""" -Restores all key versions of a given key using user supplied SAS token pointing -to a previously stored Azure Blob storage backup folder -""") -// FIXME: (name-collision-error) There is a potential collision with Operation, Parameter and Response names. -// Problematic names: [SelectiveKeyRestoreOperation] +/** + * Restores all key versions of a given key using user supplied SAS token pointing + * to a previously stored Azure Blob storage backup folder + */ @route("/keys/{keyName}/restore") @put -op SelectiveKeyRestoreOperation is Azure.Core.Foundations.Operation< +op selectiveKeyRestoreOperation is Azure.Core.Foundations.Operation< { - @doc("The name of the key to be restored from the user supplied backup") + /** + * The name of the key to be restored from the user supplied backup + */ @path keyName: string; - @doc(""" -The Azure blob SAS token pointing to a folder where the previous successful -full backup was stored -""") + /** + * The Azure blob SAS token pointing to a folder where the previous successful + * full backup was stored + */ @body restoreBlobDetails?: SelectiveKeyRestoreOperationParameters; }, SelectiveKeyRestoreOperation >; +/** + * The GetCertificates operation returns the set of certificates resources in the + * specified key vault. This operation requires the certificates/list permission. + */ @summary("List certificates in a specified key vault") -@doc(""" -The GetCertificates operation returns the set of certificates resources in the -specified key vault. This operation requires the certificates/list permission. -""") @route("/certificates") @get -op GetCertificates is Azure.Core.Foundations.Operation< +op getCertificates is Azure.Core.Foundations.Operation< { - @doc(""" -Maximum number of results to return in a page. If not specified the service -will return up to 25 results. -""") + /** + * Maximum number of results to return in a page. If not specified the service + * will return up to 25 results. + */ @maxValue(25) @minValue(1) @query("maxresults") maxresults?: int32; - @doc("Specifies whether to include certificates which are not completely provisioned.") + /** + * Specifies whether to include certificates which are not completely provisioned. + */ @query("includePending") includePending?: boolean; }, CertificateListResult >; +/** + * Deletes all versions of a certificate object along with its associated policy. + * Delete certificate cannot be used to remove individual versions of a + * certificate object. This operation requires the certificates/delete permission. + */ @summary("Deletes a certificate from a specified key vault.") -@doc(""" -Deletes all versions of a certificate object along with its associated policy. -Delete certificate cannot be used to remove individual versions of a -certificate object. This operation requires the certificates/delete permission. -""") @route("/certificates/{certificate-name}") @delete -op DeleteCertificate is Azure.Core.Foundations.Operation< +op deleteCertificate is Azure.Core.Foundations.Operation< { - @doc("The name of the certificate.") + /** + * The name of the certificate. + */ @path `certificate-name`: string; }, DeletedCertificateBundle >; +/** + * Sets the certificate contacts for the specified key vault. This operation + * requires the certificates/managecontacts permission. + */ @summary("Sets the certificate contacts for the specified key vault.") -@doc(""" -Sets the certificate contacts for the specified key vault. This operation -requires the certificates/managecontacts permission. -""") @route("/certificates/contacts") @put -op SetCertificateContacts is Azure.Core.Foundations.Operation< +op setCertificateContacts is Azure.Core.Foundations.Operation< Contacts, Contacts >; +/** + * The GetCertificateContacts operation returns the set of certificate contact + * resources in the specified key vault. This operation requires the + * certificates/managecontacts permission. + */ @summary("Lists the certificate contacts for a specified key vault.") -@doc(""" -The GetCertificateContacts operation returns the set of certificate contact -resources in the specified key vault. This operation requires the -certificates/managecontacts permission. -""") @route("/certificates/contacts") @get -op GetCertificateContacts is Azure.Core.Foundations.Operation<{}, Contacts>; +op getCertificateContacts is Azure.Core.Foundations.Operation<{}, Contacts>; +/** + * Deletes the certificate contacts for a specified key vault certificate. This + * operation requires the certificates/managecontacts permission. + */ @summary("Deletes the certificate contacts for a specified key vault.") -@doc(""" -Deletes the certificate contacts for a specified key vault certificate. This -operation requires the certificates/managecontacts permission. -""") @route("/certificates/contacts") @delete -op DeleteCertificateContacts is Azure.Core.Foundations.Operation<{}, Contacts>; +op deleteCertificateContacts is Azure.Core.Foundations.Operation<{}, Contacts>; +/** + * The GetCertificateIssuers operation returns the set of certificate issuer + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. + */ @summary("List certificate issuers for a specified key vault.") -@doc(""" -The GetCertificateIssuers operation returns the set of certificate issuer -resources in the specified key vault. This operation requires the -certificates/manageissuers/getissuers permission. -""") @route("/certificates/issuers") @get -op GetCertificateIssuers is Azure.Core.Foundations.Operation< +op getCertificateIssuers is Azure.Core.Foundations.Operation< { - @doc(""" -Maximum number of results to return in a page. If not specified the service -will return up to 25 results. -""") + /** + * Maximum number of results to return in a page. If not specified the service + * will return up to 25 results. + */ @maxValue(25) @minValue(1) @query("maxresults") @@ -172,156 +184,172 @@ will return up to 25 results. CertificateIssuerListResult >; +/** + * The SetCertificateIssuer operation adds or updates the specified certificate + * issuer. This operation requires the certificates/setissuers permission. + */ @summary("Sets the specified certificate issuer.") -@doc(""" -The SetCertificateIssuer operation adds or updates the specified certificate -issuer. This operation requires the certificates/setissuers permission. -""") @route("/certificates/issuers/{issuer-name}") @put -op SetCertificateIssuer is Azure.Core.Foundations.Operation< +op setCertificateIssuer is Azure.Core.Foundations.Operation< { - @doc(""" -The name of the issuer. The value you provide may be copied globally for the -purpose of running the service. The value provided should not include -personally identifiable or sensitive information. -""") + /** + * The name of the issuer. The value you provide may be copied globally for the + * purpose of running the service. The value provided should not include + * personally identifiable or sensitive information. + */ @path `issuer-name`: string; - @doc("Certificate issuer set parameter.") + /** + * Certificate issuer set parameter. + */ @body parameter: CertificateIssuerSetParameters; }, IssuerBundle >; +/** + * The UpdateCertificateIssuer operation performs an update on the specified + * certificate issuer entity. This operation requires the certificates/setissuers + * permission. + */ @summary("Updates the specified certificate issuer.") -@doc(""" -The UpdateCertificateIssuer operation performs an update on the specified -certificate issuer entity. This operation requires the certificates/setissuers -permission. -""") @route("/certificates/issuers/{issuer-name}") @patch -op UpdateCertificateIssuer is Azure.Core.Foundations.Operation< +op updateCertificateIssuer is Azure.Core.Foundations.Operation< { - @doc("The name of the issuer.") + /** + * The name of the issuer. + */ @path `issuer-name`: string; - @doc("Certificate issuer update parameter.") + /** + * Certificate issuer update parameter. + */ @body parameter: CertificateIssuerUpdateParameters; }, IssuerBundle >; +/** + * The GetCertificateIssuer operation returns the specified certificate issuer + * resources in the specified key vault. This operation requires the + * certificates/manageissuers/getissuers permission. + */ @summary("Lists the specified certificate issuer.") -@doc(""" -The GetCertificateIssuer operation returns the specified certificate issuer -resources in the specified key vault. This operation requires the -certificates/manageissuers/getissuers permission. -""") @route("/certificates/issuers/{issuer-name}") @get -op GetCertificateIssuer is Azure.Core.Foundations.Operation< +op getCertificateIssuer is Azure.Core.Foundations.Operation< { - @doc("The name of the issuer.") + /** + * The name of the issuer. + */ @path `issuer-name`: string; }, IssuerBundle >; +/** + * The DeleteCertificateIssuer operation permanently removes the specified + * certificate issuer from the vault. This operation requires the + * certificates/manageissuers/deleteissuers permission. + */ @summary("Deletes the specified certificate issuer.") -@doc(""" -The DeleteCertificateIssuer operation permanently removes the specified -certificate issuer from the vault. This operation requires the -certificates/manageissuers/deleteissuers permission. -""") @route("/certificates/issuers/{issuer-name}") @delete -op DeleteCertificateIssuer is Azure.Core.Foundations.Operation< +op deleteCertificateIssuer is Azure.Core.Foundations.Operation< { - @doc("The name of the issuer.") + /** + * The name of the issuer. + */ @path `issuer-name`: string; }, IssuerBundle >; +/** + * If this is the first version, the certificate resource is created. This + * operation requires the certificates/create permission. + */ @summary("Creates a new certificate.") -@doc(""" -If this is the first version, the certificate resource is created. This -operation requires the certificates/create permission. -""") @route("/certificates/{certificate-name}/create") @post -op CreateCertificate is Azure.Core.Foundations.Operation< +op createCertificate is Azure.Core.Foundations.Operation< { - @doc(""" -The name of the certificate. The value you provide may be copied globally for -the purpose of running the service. The value provided should not include -personally identifiable or sensitive information. -""") + /** + * The name of the certificate. The value you provide may be copied globally for + * the purpose of running the service. The value provided should not include + * personally identifiable or sensitive information. + */ @pattern("^[0-9a-zA-Z-]+$") @path `certificate-name`: string; - @doc("The parameters to create a certificate.") + /** + * The parameters to create a certificate. + */ @body parameters: CertificateCreateParameters; }, CertificateOperation >; +/** + * Imports an existing valid certificate, containing a private key, into Azure Key + * Vault. This operation requires the certificates/import permission. The + * certificate to be imported can be in either PFX or PEM format. If the + * certificate is in PEM format the PEM file must contain the key as well as x509 + * certificates. Key Vault will only accept a key in PKCS#8 format. + */ @summary("Imports a certificate into a specified key vault.") -@doc(""" -Imports an existing valid certificate, containing a private key, into Azure Key -Vault. This operation requires the certificates/import permission. The -certificate to be imported can be in either PFX or PEM format. If the -certificate is in PEM format the PEM file must contain the key as well as x509 -certificates. Key Vault will only accept a key in PKCS#8 format. -""") @route("/certificates/{certificate-name}/import") @post -op ImportCertificate is Azure.Core.Foundations.Operation< +op importCertificate is Azure.Core.Foundations.Operation< { - @doc(""" -The name of the certificate. The value you provide may be copied globally for -the purpose of running the service. The value provided should not include -personally identifiable or sensitive information. -""") + /** + * The name of the certificate. The value you provide may be copied globally for + * the purpose of running the service. The value provided should not include + * personally identifiable or sensitive information. + */ @pattern("^[0-9a-zA-Z-]+$") @path `certificate-name`: string; - @doc("The parameters to import the certificate.") + /** + * The parameters to import the certificate. + */ @body parameters: CertificateImportParameters; }, CertificateBundle >; +/** + * The GetCertificateVersions operation returns the versions of a certificate in + * the specified key vault. This operation requires the certificates/list + * permission. + */ @summary("List the versions of a certificate.") -@doc(""" -The GetCertificateVersions operation returns the versions of a certificate in -the specified key vault. This operation requires the certificates/list -permission. -""") @route("/certificates/{certificate-name}/versions") @get -op GetCertificateVersions is Azure.Core.Foundations.Operation< +op getCertificateVersions is Azure.Core.Foundations.Operation< { - @doc("The name of the certificate.") + /** + * The name of the certificate. + */ @path `certificate-name`: string; - @doc(""" -Maximum number of results to return in a page. If not specified the service -will return up to 25 results. -""") + /** + * Maximum number of results to return in a page. If not specified the service + * will return up to 25 results. + */ @maxValue(25) @minValue(1) @query("maxresults") @@ -330,332 +358,370 @@ will return up to 25 results. CertificateListResult >; +/** + * The GetCertificatePolicy operation returns the specified certificate policy + * resources in the specified key vault. This operation requires the + * certificates/get permission. + */ @summary("Lists the policy for a certificate.") -@doc(""" -The GetCertificatePolicy operation returns the specified certificate policy -resources in the specified key vault. This operation requires the -certificates/get permission. -""") @route("/certificates/{certificate-name}/policy") @get -op GetCertificatePolicy is Azure.Core.Foundations.Operation< +op getCertificatePolicy is Azure.Core.Foundations.Operation< { - @doc("The name of the certificate in a given key vault.") + /** + * The name of the certificate in a given key vault. + */ @path `certificate-name`: string; }, CertificatePolicy >; +/** + * Set specified members in the certificate policy. Leave others as null. This + * operation requires the certificates/update permission. + */ @summary("Updates the policy for a certificate.") -@doc(""" -Set specified members in the certificate policy. Leave others as null. This -operation requires the certificates/update permission. -""") @route("/certificates/{certificate-name}/policy") @patch -op UpdateCertificatePolicy is Azure.Core.Foundations.Operation< +op updateCertificatePolicy is Azure.Core.Foundations.Operation< { - @doc("The name of the certificate in the given vault.") + /** + * The name of the certificate in the given vault. + */ @path `certificate-name`: string; - @doc("The policy for the certificate.") + /** + * The policy for the certificate. + */ @body certificatePolicy: CertificatePolicy; }, CertificatePolicy >; +/** + * The UpdateCertificate operation applies the specified update on the given + * certificate; the only elements updated are the certificate's attributes. This + * operation requires the certificates/update permission. + */ @summary("Updates the specified attributes associated with the given certificate.") -@doc(""" -The UpdateCertificate operation applies the specified update on the given -certificate; the only elements updated are the certificate's attributes. This -operation requires the certificates/update permission. -""") @route("/certificates/{certificate-name}/{certificate-version}") @patch -op UpdateCertificate is Azure.Core.Foundations.Operation< +op updateCertificate is Azure.Core.Foundations.Operation< { - @doc("The name of the certificate in the given key vault.") + /** + * The name of the certificate in the given key vault. + */ @path `certificate-name`: string; - @doc("The version of the certificate.") + /** + * The version of the certificate. + */ @path `certificate-version`: string; - @doc("The parameters for certificate update.") + /** + * The parameters for certificate update. + */ @body parameters: CertificateUpdateParameters; }, CertificateBundle >; +/** + * Gets information about a specific certificate. This operation requires the + * certificates/get permission. + */ @summary("Gets information about a certificate.") -@doc(""" -Gets information about a specific certificate. This operation requires the -certificates/get permission. -""") @route("/certificates/{certificate-name}/{certificate-version}") @get -op GetCertificate is Azure.Core.Foundations.Operation< +op getCertificate is Azure.Core.Foundations.Operation< { - @doc("The name of the certificate in the given vault.") + /** + * The name of the certificate in the given vault. + */ @path `certificate-name`: string; - @doc(""" -The version of the certificate. This URI fragment is optional. If not -specified, the latest version of the certificate is returned. -""") + /** + * The version of the certificate. This URI fragment is optional. If not + * specified, the latest version of the certificate is returned. + */ @path `certificate-version`: string; }, CertificateBundle >; +/** + * Updates a certificate creation operation that is already in progress. This + * operation requires the certificates/update permission. + */ @summary("Updates a certificate operation.") -@doc(""" -Updates a certificate creation operation that is already in progress. This -operation requires the certificates/update permission. -""") @route("/certificates/{certificate-name}/pending") @patch -op UpdateCertificateOperation is Azure.Core.Foundations.Operation< +op updateCertificateOperation is Azure.Core.Foundations.Operation< { - @doc("The name of the certificate.") + /** + * The name of the certificate. + */ @path `certificate-name`: string; - @doc("The certificate operation response.") + /** + * The certificate operation response. + */ @body certificateOperation: CertificateOperationUpdateParameter; }, CertificateOperation >; +/** + * Gets the creation operation associated with a specified certificate. This + * operation requires the certificates/get permission. + */ @summary("Gets the creation operation of a certificate.") -@doc(""" -Gets the creation operation associated with a specified certificate. This -operation requires the certificates/get permission. -""") @route("/certificates/{certificate-name}/pending") @get -op GetCertificateOperation is Azure.Core.Foundations.Operation< +op getCertificateOperation is Azure.Core.Foundations.Operation< { - @doc("The name of the certificate.") + /** + * The name of the certificate. + */ @path `certificate-name`: string; }, CertificateOperation >; +/** + * Deletes the creation operation for a specified certificate that is in the + * process of being created. The certificate is no longer created. This operation + * requires the certificates/update permission. + */ @summary("Deletes the creation operation for a specific certificate.") -@doc(""" -Deletes the creation operation for a specified certificate that is in the -process of being created. The certificate is no longer created. This operation -requires the certificates/update permission. -""") @route("/certificates/{certificate-name}/pending") @delete -op DeleteCertificateOperation is Azure.Core.Foundations.Operation< +op deleteCertificateOperation is Azure.Core.Foundations.Operation< { - @doc("The name of the certificate.") + /** + * The name of the certificate. + */ @path `certificate-name`: string; }, CertificateOperation >; +/** + * The MergeCertificate operation performs the merging of a certificate or + * certificate chain with a key pair currently available in the service. This + * operation requires the certificates/create permission. + */ @summary(""" Merges a certificate or a certificate chain with a key pair existing on the server. """) -@doc(""" -The MergeCertificate operation performs the merging of a certificate or -certificate chain with a key pair currently available in the service. This -operation requires the certificates/create permission. -""") @route("/certificates/{certificate-name}/pending/merge") @post -op MergeCertificate is Azure.Core.Foundations.Operation< +op mergeCertificate is Azure.Core.Foundations.Operation< { - @doc("The name of the certificate.") + /** + * The name of the certificate. + */ @path `certificate-name`: string; - @doc("The parameters to merge certificate.") + /** + * The parameters to merge certificate. + */ @body parameters: CertificateMergeParameters; }, CertificateBundle >; +/** + * Requests that a backup of the specified certificate be downloaded to the + * client. All versions of the certificate will be downloaded. This operation + * requires the certificates/backup permission. + */ @summary("Backs up the specified certificate.") -@doc(""" -Requests that a backup of the specified certificate be downloaded to the -client. All versions of the certificate will be downloaded. This operation -requires the certificates/backup permission. -""") @route("/certificates/{certificate-name}/backup") @post -op BackupCertificate is Azure.Core.Foundations.Operation< +op backupCertificate is Azure.Core.Foundations.Operation< { - @doc("The name of the certificate.") + /** + * The name of the certificate. + */ @path `certificate-name`: string; }, BackupCertificateResult >; +/** + * Restores a backed up certificate, and all its versions, to a vault. This + * operation requires the certificates/restore permission. + */ @summary("Restores a backed up certificate to a vault.") -@doc(""" -Restores a backed up certificate, and all its versions, to a vault. This -operation requires the certificates/restore permission. -""") @route("/certificates/restore") @post -op RestoreCertificate is Azure.Core.Foundations.Operation< +op restoreCertificate is Azure.Core.Foundations.Operation< CertificateRestoreParameters, CertificateBundle >; +/** + * The GetDeletedCertificates operation retrieves the certificates in the current + * vault which are in a deleted state and ready for recovery or purging. This + * operation includes deletion-specific information. This operation requires the + * certificates/get/list permission. This operation can only be enabled on + * soft-delete enabled vaults. + */ @summary(""" Lists the deleted certificates in the specified vault currently available for recovery. """) -@doc(""" -The GetDeletedCertificates operation retrieves the certificates in the current -vault which are in a deleted state and ready for recovery or purging. This -operation includes deletion-specific information. This operation requires the -certificates/get/list permission. This operation can only be enabled on -soft-delete enabled vaults. -""") @route("/deletedcertificates") @get -op GetDeletedCertificates is Azure.Core.Foundations.Operation< +op getDeletedCertificates is Azure.Core.Foundations.Operation< { - @doc(""" -Maximum number of results to return in a page. If not specified the service -will return up to 25 results. -""") + /** + * Maximum number of results to return in a page. If not specified the service + * will return up to 25 results. + */ @maxValue(25) @minValue(1) @query("maxresults") maxresults?: int32; - @doc("Specifies whether to include certificates which are not completely provisioned.") + /** + * Specifies whether to include certificates which are not completely provisioned. + */ @query("includePending") includePending?: boolean; }, DeletedCertificateListResult >; +/** + * The GetDeletedCertificate operation retrieves the deleted certificate + * information plus its attributes, such as retention interval, scheduled + * permanent deletion and the current deletion recovery level. This operation + * requires the certificates/get permission. + */ @summary("Retrieves information about the specified deleted certificate.") -@doc(""" -The GetDeletedCertificate operation retrieves the deleted certificate -information plus its attributes, such as retention interval, scheduled -permanent deletion and the current deletion recovery level. This operation -requires the certificates/get permission. -""") @route("/deletedcertificates/{certificate-name}") @get -op GetDeletedCertificate is Azure.Core.Foundations.Operation< +op getDeletedCertificate is Azure.Core.Foundations.Operation< { - @doc("The name of the certificate") + /** + * The name of the certificate + */ @path `certificate-name`: string; }, DeletedCertificateBundle >; +/** + * The PurgeDeletedCertificate operation performs an irreversible deletion of the + * specified certificate, without possibility for recovery. The operation is not + * available if the recovery level does not specify 'Purgeable'. This operation + * requires the certificate/purge permission. + */ @summary("Permanently deletes the specified deleted certificate.") -@doc(""" -The PurgeDeletedCertificate operation performs an irreversible deletion of the -specified certificate, without possibility for recovery. The operation is not -available if the recovery level does not specify 'Purgeable'. This operation -requires the certificate/purge permission. -""") @route("/deletedcertificates/{certificate-name}") @delete -op PurgeDeletedCertificate is Azure.Core.Foundations.Operation< +op purgeDeletedCertificate is Azure.Core.Foundations.Operation< { - @doc("The name of the certificate") + /** + * The name of the certificate + */ @path `certificate-name`: string; }, void >; +/** + * The RecoverDeletedCertificate operation performs the reversal of the Delete + * operation. The operation is applicable in vaults enabled for soft-delete, and + * must be issued during the retention interval (available in the deleted + * certificate's attributes). This operation requires the certificates/recover + * permission. + */ @summary(""" Recovers the deleted certificate back to its current version under /certificates. """) -@doc(""" -The RecoverDeletedCertificate operation performs the reversal of the Delete -operation. The operation is applicable in vaults enabled for soft-delete, and -must be issued during the retention interval (available in the deleted -certificate's attributes). This operation requires the certificates/recover -permission. -""") @route("/deletedcertificates/{certificate-name}/recover") @post -op RecoverDeletedCertificate is Azure.Core.Foundations.Operation< +op recoverDeletedCertificate is Azure.Core.Foundations.Operation< { - @doc("The name of the deleted certificate") + /** + * The name of the deleted certificate + */ @path `certificate-name`: string; }, CertificateBundle >; +/** + * The create key operation can be used to create any key type in Azure Key Vault. + * If the named key already exists, Azure Key Vault creates a new version of the + * key. It requires the keys/create permission. + */ @summary(""" Creates a new key, stores it, then returns key parameters and attributes to the client. """) -@doc(""" -The create key operation can be used to create any key type in Azure Key Vault. -If the named key already exists, Azure Key Vault creates a new version of the -key. It requires the keys/create permission. -""") @route("/keys/{key-name}/create") @post -op CreateKey is Azure.Core.Foundations.Operation< - { - @doc(""" -The name for the new key. The system will generate the version name for the new -key. The value you provide may be copied globally for the purpose of running -the service. The value provided should not include personally identifiable or -sensitive information. -""") +op createKey is Azure.Core.Foundations.Operation< + { + /** + * The name for the new key. The system will generate the version name for the new + * key. The value you provide may be copied globally for the purpose of running + * the service. The value provided should not include personally identifiable or + * sensitive information. + */ @pattern("^[0-9a-zA-Z-]+$") @path `key-name`: string; - @doc("The parameters to create a key.") + /** + * The parameters to create a key. + */ @body parameters: KeyCreateParameters; }, KeyBundle >; +/** + * The operation will rotate the key based on the key policy. It requires the + * keys/rotate permission. + */ @summary(""" Creates a new key version, stores it, then returns key parameters, attributes and policy to the client. """) -@doc(""" -The operation will rotate the key based on the key policy. It requires the -keys/rotate permission. -""") @route("/keys/{key-name}/rotate") @post -op RotateKey is Azure.Core.Foundations.Operation< +op rotateKey is Azure.Core.Foundations.Operation< { - @doc(""" -The name of key to be rotated. The system will generate a new version in the -specified key. -""") + /** + * The name of key to be rotated. The system will generate a new version in the + * specified key. + */ @pattern("^[0-9a-zA-Z-]+$") @path `key-name`: string; @@ -663,123 +729,137 @@ specified key. KeyBundle >; +/** + * The import key operation may be used to import any key type into an Azure Key + * Vault. If the named key already exists, Azure Key Vault creates a new version + * of the key. This operation requires the keys/import permission. + */ @summary(""" Imports an externally created key, stores it, and returns key parameters and attributes to the client. """) -@doc(""" -The import key operation may be used to import any key type into an Azure Key -Vault. If the named key already exists, Azure Key Vault creates a new version -of the key. This operation requires the keys/import permission. -""") @route("/keys/{key-name}") @put -op ImportKey is Azure.Core.Foundations.Operation< +op importKey is Azure.Core.Foundations.Operation< { - @doc(""" -Name for the imported key. The value you provide may be copied globally for the -purpose of running the service. The value provided should not include -personally identifiable or sensitive information. -""") + /** + * Name for the imported key. The value you provide may be copied globally for the + * purpose of running the service. The value provided should not include + * personally identifiable or sensitive information. + */ @pattern("^[0-9a-zA-Z-]+$") @path `key-name`: string; - @doc("The parameters to import a key.") + /** + * The parameters to import a key. + */ @body parameters: KeyImportParameters; }, KeyBundle >; +/** + * The delete key operation cannot be used to remove individual versions of a key. + * This operation removes the cryptographic material associated with the key, + * which means the key is not usable for Sign/Verify, Wrap/Unwrap or + * Encrypt/Decrypt operations. This operation requires the keys/delete permission. + */ @summary("Deletes a key of any type from storage in Azure Key Vault.") -@doc(""" -The delete key operation cannot be used to remove individual versions of a key. -This operation removes the cryptographic material associated with the key, -which means the key is not usable for Sign/Verify, Wrap/Unwrap or -Encrypt/Decrypt operations. This operation requires the keys/delete permission. -""") @route("/keys/{key-name}") @delete -op DeleteKey is Azure.Core.Foundations.Operation< +op deleteKey is Azure.Core.Foundations.Operation< { - @doc("The name of the key to delete.") + /** + * The name of the key to delete. + */ @path `key-name`: string; }, DeletedKeyBundle >; +/** + * In order to perform this operation, the key must already exist in the Key + * Vault. Note: The cryptographic material of a key itself cannot be changed. This + * operation requires the keys/update permission. + */ @summary(""" The update key operation changes specified attributes of a stored key and can be applied to any key type and key version stored in Azure Key Vault. """) -@doc(""" -In order to perform this operation, the key must already exist in the Key -Vault. Note: The cryptographic material of a key itself cannot be changed. This -operation requires the keys/update permission. -""") @route("/keys/{key-name}/{key-version}") @patch -op UpdateKey is Azure.Core.Foundations.Operation< +op updateKey is Azure.Core.Foundations.Operation< { - @doc("The name of key to update.") + /** + * The name of key to update. + */ @path `key-name`: string; - @doc("The version of the key to update.") + /** + * The version of the key to update. + */ @path `key-version`: string; - @doc("The parameters of the key to update.") + /** + * The parameters of the key to update. + */ @body parameters: KeyUpdateParameters; }, KeyBundle >; +/** + * The get key operation is applicable to all key types. If the requested key is + * symmetric, then no key material is released in the response. This operation + * requires the keys/get permission. + */ @summary("Gets the public part of a stored key.") -@doc(""" -The get key operation is applicable to all key types. If the requested key is -symmetric, then no key material is released in the response. This operation -requires the keys/get permission. -""") @route("/keys/{key-name}/{key-version}") @get -op GetKey is Azure.Core.Foundations.Operation< +op getKey is Azure.Core.Foundations.Operation< { - @doc("The name of the key to get.") + /** + * The name of the key to get. + */ @path `key-name`: string; - @doc(""" -Adding the version parameter retrieves a specific version of a key. This URI -fragment is optional. If not specified, the latest version of the key is -returned. -""") + /** + * Adding the version parameter retrieves a specific version of a key. This URI + * fragment is optional. If not specified, the latest version of the key is + * returned. + */ @path `key-version`: string; }, KeyBundle >; +/** + * The full key identifier, attributes, and tags are provided in the response. + * This operation requires the keys/list permission. + */ @summary("Retrieves a list of individual key versions with the same key name.") -@doc(""" -The full key identifier, attributes, and tags are provided in the response. -This operation requires the keys/list permission. -""") @route("/keys/{key-name}/versions") @get -op GetKeyVersions is Azure.Core.Foundations.Operation< +op getKeyVersions is Azure.Core.Foundations.Operation< { - @doc("The name of the key.") + /** + * The name of the key. + */ @path `key-name`: string; - @doc(""" -Maximum number of results to return in a page. If not specified the service -will return up to 25 results. -""") + /** + * Maximum number of results to return in a page. If not specified the service + * will return up to 25 results. + */ @maxValue(25) @minValue(1) @query("maxresults") @@ -788,22 +868,22 @@ will return up to 25 results. KeyListResult >; +/** + * Retrieves a list of the keys in the Key Vault as JSON Web Key structures that + * contain the public part of a stored key. The LIST operation is applicable to + * all key types, however only the base key identifier, attributes, and tags are + * provided in the response. Individual versions of a key are not listed in the + * response. This operation requires the keys/list permission. + */ @summary("List keys in the specified vault.") -@doc(""" -Retrieves a list of the keys in the Key Vault as JSON Web Key structures that -contain the public part of a stored key. The LIST operation is applicable to -all key types, however only the base key identifier, attributes, and tags are -provided in the response. Individual versions of a key are not listed in the -response. This operation requires the keys/list permission. -""") @route("/keys") @get -op GetKeys is Azure.Core.Foundations.Operation< +op getKeys is Azure.Core.Foundations.Operation< { - @doc(""" -Maximum number of results to return in a page. If not specified the service -will return up to 25 results. -""") + /** + * Maximum number of results to return in a page. If not specified the service + * will return up to 25 results. + */ @maxValue(25) @minValue(1) @query("maxresults") @@ -812,275 +892,319 @@ will return up to 25 results. KeyListResult >; +/** + * The Key Backup operation exports a key from Azure Key Vault in a protected + * form. Note that this operation does NOT return key material in a form that can + * be used outside the Azure Key Vault system, the returned key material is either + * protected to a Azure Key Vault HSM or to Azure Key Vault itself. The intent of + * this operation is to allow a client to GENERATE a key in one Azure Key Vault + * instance, BACKUP the key, and then RESTORE it into another Azure Key Vault + * instance. The BACKUP operation may be used to export, in protected form, any + * key type from Azure Key Vault. Individual versions of a key cannot be backed + * up. BACKUP / RESTORE can be performed within geographical boundaries only; + * meaning that a BACKUP from one geographical area cannot be restored to another + * geographical area. For example, a backup from the US geographical area cannot + * be restored in an EU geographical area. This operation requires the key/backup + * permission. + */ @summary("Requests that a backup of the specified key be downloaded to the client.") -@doc(""" -The Key Backup operation exports a key from Azure Key Vault in a protected -form. Note that this operation does NOT return key material in a form that can -be used outside the Azure Key Vault system, the returned key material is either -protected to a Azure Key Vault HSM or to Azure Key Vault itself. The intent of -this operation is to allow a client to GENERATE a key in one Azure Key Vault -instance, BACKUP the key, and then RESTORE it into another Azure Key Vault -instance. The BACKUP operation may be used to export, in protected form, any -key type from Azure Key Vault. Individual versions of a key cannot be backed -up. BACKUP / RESTORE can be performed within geographical boundaries only; -meaning that a BACKUP from one geographical area cannot be restored to another -geographical area. For example, a backup from the US geographical area cannot -be restored in an EU geographical area. This operation requires the key/backup -permission. -""") @route("/keys/{key-name}/backup") @post -op BackupKey is Azure.Core.Foundations.Operation< +op backupKey is Azure.Core.Foundations.Operation< { - @doc("The name of the key.") + /** + * The name of the key. + */ @path `key-name`: string; }, BackupKeyResult >; +/** + * Imports a previously backed up key into Azure Key Vault, restoring the key, its + * key identifier, attributes and access control policies. The RESTORE operation + * may be used to import a previously backed up key. Individual versions of a key + * cannot be restored. The key is restored in its entirety with the same key name + * as it had when it was backed up. If the key name is not available in the target + * Key Vault, the RESTORE operation will be rejected. While the key name is + * retained during restore, the final key identifier will change if the key is + * restored to a different vault. Restore will restore all versions and preserve + * version identifiers. The RESTORE operation is subject to security constraints: + * The target Key Vault must be owned by the same Microsoft Azure Subscription as + * the source Key Vault The user must have RESTORE permission in the target Key + * Vault. This operation requires the keys/restore permission. + */ @summary("Restores a backed up key to a vault.") -@doc(""" -Imports a previously backed up key into Azure Key Vault, restoring the key, its -key identifier, attributes and access control policies. The RESTORE operation -may be used to import a previously backed up key. Individual versions of a key -cannot be restored. The key is restored in its entirety with the same key name -as it had when it was backed up. If the key name is not available in the target -Key Vault, the RESTORE operation will be rejected. While the key name is -retained during restore, the final key identifier will change if the key is -restored to a different vault. Restore will restore all versions and preserve -version identifiers. The RESTORE operation is subject to security constraints: -The target Key Vault must be owned by the same Microsoft Azure Subscription as -the source Key Vault The user must have RESTORE permission in the target Key -Vault. This operation requires the keys/restore permission. -""") @route("/keys/restore") @post -op RestoreKey is Azure.Core.Foundations.Operation< +op restoreKey is Azure.Core.Foundations.Operation< KeyRestoreParameters, KeyBundle >; +/** + * The ENCRYPT operation encrypts an arbitrary sequence of bytes using an + * encryption key that is stored in Azure Key Vault. Note that the ENCRYPT + * operation only supports a single block of data, the size of which is dependent + * on the target key and the encryption algorithm to be used. The ENCRYPT + * operation is only strictly necessary for symmetric keys stored in Azure Key + * Vault since protection with an asymmetric key can be performed using public + * portion of the key. This operation is supported for asymmetric keys as a + * convenience for callers that have a key-reference but do not have access to the + * public key material. This operation requires the keys/encrypt permission. + */ @summary(""" Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault. """) -@doc(""" -The ENCRYPT operation encrypts an arbitrary sequence of bytes using an -encryption key that is stored in Azure Key Vault. Note that the ENCRYPT -operation only supports a single block of data, the size of which is dependent -on the target key and the encryption algorithm to be used. The ENCRYPT -operation is only strictly necessary for symmetric keys stored in Azure Key -Vault since protection with an asymmetric key can be performed using public -portion of the key. This operation is supported for asymmetric keys as a -convenience for callers that have a key-reference but do not have access to the -public key material. This operation requires the keys/encrypt permission. -""") @route("/keys/{key-name}/{key-version}/encrypt") @post op encrypt is Azure.Core.Foundations.Operation< { - @doc("The name of the key.") + /** + * The name of the key. + */ @path `key-name`: string; - @doc("The version of the key.") + /** + * The version of the key. + */ @path `key-version`: string; - @doc("The parameters for the encryption operation.") + /** + * The parameters for the encryption operation. + */ @body parameters: KeyOperationsParameters; }, KeyOperationResult >; +/** + * The DECRYPT operation decrypts a well-formed block of ciphertext using the + * target encryption key and specified algorithm. This operation is the reverse of + * the ENCRYPT operation; only a single block of data may be decrypted, the size + * of this block is dependent on the target key and the algorithm to be used. The + * DECRYPT operation applies to asymmetric and symmetric keys stored in Azure Key + * Vault since it uses the private portion of the key. This operation requires the + * keys/decrypt permission. Microsoft recommends not to use CBC algorithms for + * decryption without first ensuring the integrity of the ciphertext using an + * HMAC, for example. See + * https://docs.microsoft.com/dotnet/standard/security/vulnerabilities-cbc-mode + * for more information. + */ @summary("Decrypts a single block of encrypted data.") -@doc(""" -The DECRYPT operation decrypts a well-formed block of ciphertext using the -target encryption key and specified algorithm. This operation is the reverse of -the ENCRYPT operation; only a single block of data may be decrypted, the size -of this block is dependent on the target key and the algorithm to be used. The -DECRYPT operation applies to asymmetric and symmetric keys stored in Azure Key -Vault since it uses the private portion of the key. This operation requires the -keys/decrypt permission. Microsoft recommends not to use CBC algorithms for -decryption without first ensuring the integrity of the ciphertext using an -HMAC, for example. See -https://docs.microsoft.com/dotnet/standard/security/vulnerabilities-cbc-mode -for more information. -""") @route("/keys/{key-name}/{key-version}/decrypt") @post op decrypt is Azure.Core.Foundations.Operation< { - @doc("The name of the key.") + /** + * The name of the key. + */ @path `key-name`: string; - @doc("The version of the key.") + /** + * The version of the key. + */ @path `key-version`: string; - @doc("The parameters for the decryption operation.") + /** + * The parameters for the decryption operation. + */ @body parameters: KeyOperationsParameters; }, KeyOperationResult >; +/** + * The SIGN operation is applicable to asymmetric and symmetric keys stored in + * Azure Key Vault since this operation uses the private portion of the key. This + * operation requires the keys/sign permission. + */ @summary("Creates a signature from a digest using the specified key.") -@doc(""" -The SIGN operation is applicable to asymmetric and symmetric keys stored in -Azure Key Vault since this operation uses the private portion of the key. This -operation requires the keys/sign permission. -""") @route("/keys/{key-name}/{key-version}/sign") @post op sign is Azure.Core.Foundations.Operation< { - @doc("The name of the key.") + /** + * The name of the key. + */ @path `key-name`: string; - @doc("The version of the key.") + /** + * The version of the key. + */ @path `key-version`: string; - @doc("The parameters for the signing operation.") + /** + * The parameters for the signing operation. + */ @body parameters: KeySignParameters; }, KeyOperationResult >; +/** + * The VERIFY operation is applicable to symmetric keys stored in Azure Key Vault. + * VERIFY is not strictly necessary for asymmetric keys stored in Azure Key Vault + * since signature verification can be performed using the public portion of the + * key but this operation is supported as a convenience for callers that only have + * a key-reference and not the public portion of the key. This operation requires + * the keys/verify permission. + */ @summary("Verifies a signature using a specified key.") -@doc(""" -The VERIFY operation is applicable to symmetric keys stored in Azure Key Vault. -VERIFY is not strictly necessary for asymmetric keys stored in Azure Key Vault -since signature verification can be performed using the public portion of the -key but this operation is supported as a convenience for callers that only have -a key-reference and not the public portion of the key. This operation requires -the keys/verify permission. -""") @route("/keys/{key-name}/{key-version}/verify") @post op verify is Azure.Core.Foundations.Operation< { - @doc("The name of the key.") + /** + * The name of the key. + */ @path `key-name`: string; - @doc("The version of the key.") + /** + * The version of the key. + */ @path `key-version`: string; - @doc("The parameters for verify operations.") + /** + * The parameters for verify operations. + */ @body parameters: KeyVerifyParameters; }, KeyVerifyResult >; +/** + * The WRAP operation supports encryption of a symmetric key using a key + * encryption key that has previously been stored in an Azure Key Vault. The WRAP + * operation is only strictly necessary for symmetric keys stored in Azure Key + * Vault since protection with an asymmetric key can be performed using the public + * portion of the key. This operation is supported for asymmetric keys as a + * convenience for callers that have a key-reference but do not have access to the + * public key material. This operation requires the keys/wrapKey permission. + */ @summary("Wraps a symmetric key using a specified key.") -@doc(""" -The WRAP operation supports encryption of a symmetric key using a key -encryption key that has previously been stored in an Azure Key Vault. The WRAP -operation is only strictly necessary for symmetric keys stored in Azure Key -Vault since protection with an asymmetric key can be performed using the public -portion of the key. This operation is supported for asymmetric keys as a -convenience for callers that have a key-reference but do not have access to the -public key material. This operation requires the keys/wrapKey permission. -""") @route("/keys/{key-name}/{key-version}/wrapkey") @post op wrapKey is Azure.Core.Foundations.Operation< { - @doc("The name of the key.") + /** + * The name of the key. + */ @path `key-name`: string; - @doc("The version of the key.") + /** + * The version of the key. + */ @path `key-version`: string; - @doc("The parameters for wrap operation.") + /** + * The parameters for wrap operation. + */ @body parameters: KeyOperationsParameters; }, KeyOperationResult >; +/** + * The UNWRAP operation supports decryption of a symmetric key using the target + * key encryption key. This operation is the reverse of the WRAP operation. The + * UNWRAP operation applies to asymmetric and symmetric keys stored in Azure Key + * Vault since it uses the private portion of the key. This operation requires the + * keys/unwrapKey permission. + */ @summary(""" Unwraps a symmetric key using the specified key that was initially used for wrapping that key. """) -@doc(""" -The UNWRAP operation supports decryption of a symmetric key using the target -key encryption key. This operation is the reverse of the WRAP operation. The -UNWRAP operation applies to asymmetric and symmetric keys stored in Azure Key -Vault since it uses the private portion of the key. This operation requires the -keys/unwrapKey permission. -""") @route("/keys/{key-name}/{key-version}/unwrapkey") @post op unwrapKey is Azure.Core.Foundations.Operation< { - @doc("The name of the key.") + /** + * The name of the key. + */ @path `key-name`: string; - @doc("The version of the key.") + /** + * The version of the key. + */ @path `key-version`: string; - @doc("The parameters for the key operation.") + /** + * The parameters for the key operation. + */ @body parameters: KeyOperationsParameters; }, KeyOperationResult >; +/** + * The release key operation is applicable to all key types. The target key must + * be marked exportable. This operation requires the keys/release permission. + */ @summary("Releases a key.") -@doc(""" -The release key operation is applicable to all key types. The target key must -be marked exportable. This operation requires the keys/release permission. -""") @route("/keys/{key-name}/{key-version}/release") @post op release is Azure.Core.Foundations.Operation< { - @doc("The name of the key to get.") + /** + * The name of the key to get. + */ @path `key-name`: string; - @doc("Adding the version parameter retrieves a specific version of a key.") + /** + * Adding the version parameter retrieves a specific version of a key. + */ @path `key-version`: string; - @doc("The parameters for the key release operation.") + /** + * The parameters for the key release operation. + */ @body parameters: KeyReleaseParameters; }, KeyReleaseResult >; +/** + * Retrieves a list of the keys in the Key Vault as JSON Web Key structures that + * contain the public part of a deleted key. This operation includes + * deletion-specific information. The Get Deleted Keys operation is applicable for + * vaults enabled for soft-delete. While the operation can be invoked on any + * vault, it will return an error if invoked on a non soft-delete enabled vault. + * This operation requires the keys/list permission. + */ @summary("Lists the deleted keys in the specified vault.") -@doc(""" -Retrieves a list of the keys in the Key Vault as JSON Web Key structures that -contain the public part of a deleted key. This operation includes -deletion-specific information. The Get Deleted Keys operation is applicable for -vaults enabled for soft-delete. While the operation can be invoked on any -vault, it will return an error if invoked on a non soft-delete enabled vault. -This operation requires the keys/list permission. -""") @route("/deletedkeys") @get -op GetDeletedKeys is Azure.Core.Foundations.Operation< +op getDeletedKeys is Azure.Core.Foundations.Operation< { - @doc(""" -Maximum number of results to return in a page. If not specified the service -will return up to 25 results. -""") + /** + * Maximum number of results to return in a page. If not specified the service + * will return up to 25 results. + */ @maxValue(25) @minValue(1) @query("maxresults") @@ -1089,213 +1213,239 @@ will return up to 25 results. DeletedKeyListResult >; +/** + * The Get Deleted Key operation is applicable for soft-delete enabled vaults. + * While the operation can be invoked on any vault, it will return an error if + * invoked on a non soft-delete enabled vault. This operation requires the + * keys/get permission. + */ @summary("Gets the public part of a deleted key.") -@doc(""" -The Get Deleted Key operation is applicable for soft-delete enabled vaults. -While the operation can be invoked on any vault, it will return an error if -invoked on a non soft-delete enabled vault. This operation requires the -keys/get permission. -""") @route("/deletedkeys/{key-name}") @get -op GetDeletedKey is Azure.Core.Foundations.Operation< +op getDeletedKey is Azure.Core.Foundations.Operation< { - @doc("The name of the key.") + /** + * The name of the key. + */ @path `key-name`: string; }, DeletedKeyBundle >; +/** + * The Purge Deleted Key operation is applicable for soft-delete enabled vaults. + * While the operation can be invoked on any vault, it will return an error if + * invoked on a non soft-delete enabled vault. This operation requires the + * keys/purge permission. + */ @summary("Permanently deletes the specified key.") -@doc(""" -The Purge Deleted Key operation is applicable for soft-delete enabled vaults. -While the operation can be invoked on any vault, it will return an error if -invoked on a non soft-delete enabled vault. This operation requires the -keys/purge permission. -""") @route("/deletedkeys/{key-name}") @delete -op PurgeDeletedKey is Azure.Core.Foundations.Operation< +op purgeDeletedKey is Azure.Core.Foundations.Operation< { - @doc("The name of the key") + /** + * The name of the key + */ @path `key-name`: string; }, void >; +/** + * The Recover Deleted Key operation is applicable for deleted keys in soft-delete + * enabled vaults. It recovers the deleted key back to its latest version under + * /keys. An attempt to recover an non-deleted key will return an error. Consider + * this the inverse of the delete operation on soft-delete enabled vaults. This + * operation requires the keys/recover permission. + */ @summary("Recovers the deleted key to its latest version.") -@doc(""" -The Recover Deleted Key operation is applicable for deleted keys in soft-delete -enabled vaults. It recovers the deleted key back to its latest version under -/keys. An attempt to recover an non-deleted key will return an error. Consider -this the inverse of the delete operation on soft-delete enabled vaults. This -operation requires the keys/recover permission. -""") @route("/deletedkeys/{key-name}/recover") @post -op RecoverDeletedKey is Azure.Core.Foundations.Operation< +op recoverDeletedKey is Azure.Core.Foundations.Operation< { - @doc("The name of the deleted key.") + /** + * The name of the deleted key. + */ @path `key-name`: string; }, KeyBundle >; +/** + * The GetKeyRotationPolicy operation returns the specified key policy resources + * in the specified key vault. This operation requires the keys/get permission. + */ @summary("Lists the policy for a key.") -@doc(""" -The GetKeyRotationPolicy operation returns the specified key policy resources -in the specified key vault. This operation requires the keys/get permission. -""") @route("/keys/{key-name}/rotationpolicy") @get -op GetKeyRotationPolicy is Azure.Core.Foundations.Operation< +op getKeyRotationPolicy is Azure.Core.Foundations.Operation< { - @doc("The name of the key in a given key vault.") + /** + * The name of the key in a given key vault. + */ @path `key-name`: string; }, KeyRotationPolicy >; +/** + * Set specified members in the key policy. Leave others as undefined. This + * operation requires the keys/update permission. + */ @summary("Updates the rotation policy for a key.") -@doc(""" -Set specified members in the key policy. Leave others as undefined. This -operation requires the keys/update permission. -""") @route("/keys/{key-name}/rotationpolicy") @put -op UpdateKeyRotationPolicy is Azure.Core.Foundations.Operation< +op updateKeyRotationPolicy is Azure.Core.Foundations.Operation< { - @doc("The name of the key in the given vault.") + /** + * The name of the key in the given vault. + */ @path `key-name`: string; - @doc("The policy for the key.") + /** + * The policy for the key. + */ @body keyRotationPolicy: KeyRotationPolicy; }, KeyRotationPolicy >; +/** + * Get the requested number of bytes containing random values from a managed HSM. + */ @summary("Get the requested number of bytes containing random values.") -@doc("Get the requested number of bytes containing random values from a managed HSM.") @route("/rng") @post -op GetRandomBytes is Azure.Core.Foundations.Operation< +op getRandomBytes is Azure.Core.Foundations.Operation< GetRandomBytesRequest, RandomBytes >; +/** + * The SET operation adds a secret to the Azure Key Vault. If the named secret + * already exists, Azure Key Vault creates a new version of that secret. This + * operation requires the secrets/set permission. + */ @summary("Sets a secret in a specified key vault.") -@doc(""" - The SET operation adds a secret to the Azure Key Vault. If the named secret -already exists, Azure Key Vault creates a new version of that secret. This -operation requires the secrets/set permission. -""") @route("/secrets/{secret-name}") @put -op SetSecret is Azure.Core.Foundations.Operation< +op setSecret is Azure.Core.Foundations.Operation< { - @doc(""" -The name of the secret. The value you provide may be copied globally for the -purpose of running the service. The value provided should not include -personally identifiable or sensitive information. -""") + /** + * The name of the secret. The value you provide may be copied globally for the + * purpose of running the service. The value provided should not include + * personally identifiable or sensitive information. + */ @pattern("^[0-9a-zA-Z-]+$") @path `secret-name`: string; - @doc("The parameters for setting the secret.") + /** + * The parameters for setting the secret. + */ @body parameters: SecretSetParameters; }, SecretBundle >; +/** + * The DELETE operation applies to any secret stored in Azure Key Vault. DELETE + * cannot be applied to an individual version of a secret. This operation requires + * the secrets/delete permission. + */ @summary("Deletes a secret from a specified key vault.") -@doc(""" -The DELETE operation applies to any secret stored in Azure Key Vault. DELETE -cannot be applied to an individual version of a secret. This operation requires -the secrets/delete permission. -""") @route("/secrets/{secret-name}") @delete -op DeleteSecret is Azure.Core.Foundations.Operation< +op deleteSecret is Azure.Core.Foundations.Operation< { - @doc("The name of the secret.") + /** + * The name of the secret. + */ @path `secret-name`: string; }, DeletedSecretBundle >; +/** + * The UPDATE operation changes specified attributes of an existing stored secret. + * Attributes that are not specified in the request are left unchanged. The value + * of a secret itself cannot be changed. This operation requires the secrets/set + * permission. + */ @summary("Updates the attributes associated with a specified secret in a given key vault.") -@doc(""" -The UPDATE operation changes specified attributes of an existing stored secret. -Attributes that are not specified in the request are left unchanged. The value -of a secret itself cannot be changed. This operation requires the secrets/set -permission. -""") @route("/secrets/{secret-name}/{secret-version}") @patch -op UpdateSecret is Azure.Core.Foundations.Operation< +op updateSecret is Azure.Core.Foundations.Operation< { - @doc("The name of the secret.") + /** + * The name of the secret. + */ @path `secret-name`: string; - @doc("The version of the secret.") + /** + * The version of the secret. + */ @path `secret-version`: string; - @doc("The parameters for update secret operation.") + /** + * The parameters for update secret operation. + */ @body parameters: SecretUpdateParameters; }, SecretBundle >; +/** + * The GET operation is applicable to any secret stored in Azure Key Vault. This + * operation requires the secrets/get permission. + */ @summary("Get a specified secret from a given key vault.") -@doc(""" -The GET operation is applicable to any secret stored in Azure Key Vault. This -operation requires the secrets/get permission. -""") @route("/secrets/{secret-name}/{secret-version}") @get -op GetSecret is Azure.Core.Foundations.Operation< +op getSecret is Azure.Core.Foundations.Operation< { - @doc("The name of the secret.") + /** + * The name of the secret. + */ @path `secret-name`: string; - @doc(""" -The version of the secret. This URI fragment is optional. If not specified, the -latest version of the secret is returned. -""") + /** + * The version of the secret. This URI fragment is optional. If not specified, the + * latest version of the secret is returned. + */ @path `secret-version`: string; }, SecretBundle >; +/** + * The Get Secrets operation is applicable to the entire vault. However, only the + * base secret identifier and its attributes are provided in the response. + * Individual secret versions are not listed in the response. This operation + * requires the secrets/list permission. + */ @summary("List secrets in a specified key vault.") -@doc(""" -The Get Secrets operation is applicable to the entire vault. However, only the -base secret identifier and its attributes are provided in the response. -Individual secret versions are not listed in the response. This operation -requires the secrets/list permission. -""") @route("/secrets") @get -op GetSecrets is Azure.Core.Foundations.Operation< +op getSecrets is Azure.Core.Foundations.Operation< { - @doc(""" -Maximum number of results to return in a page. If not specified, the service -will return up to 25 results. -""") + /** + * Maximum number of results to return in a page. If not specified, the service + * will return up to 25 results. + */ @maxValue(25) @minValue(1) @query("maxresults") @@ -1304,24 +1454,26 @@ will return up to 25 results. SecretListResult >; +/** + * The full secret identifier and attributes are provided in the response. No + * values are returned for the secrets. This operations requires the secrets/list + * permission. + */ @summary("List all versions of the specified secret.") -@doc(""" -The full secret identifier and attributes are provided in the response. No -values are returned for the secrets. This operations requires the secrets/list -permission. -""") @route("/secrets/{secret-name}/versions") @get -op GetSecretVersions is Azure.Core.Foundations.Operation< +op getSecretVersions is Azure.Core.Foundations.Operation< { - @doc("The name of the secret.") + /** + * The name of the secret. + */ @path `secret-name`: string; - @doc(""" -Maximum number of results to return in a page. If not specified, the service -will return up to 25 results. -""") + /** + * Maximum number of results to return in a page. If not specified, the service + * will return up to 25 results. + */ @maxValue(25) @minValue(1) @query("maxresults") @@ -1330,20 +1482,20 @@ will return up to 25 results. SecretListResult >; +/** + * The Get Deleted Secrets operation returns the secrets that have been deleted + * for a vault enabled for soft-delete. This operation requires the secrets/list + * permission. + */ @summary("Lists deleted secrets for the specified vault.") -@doc(""" -The Get Deleted Secrets operation returns the secrets that have been deleted -for a vault enabled for soft-delete. This operation requires the secrets/list -permission. -""") @route("/deletedsecrets") @get -op GetDeletedSecrets is Azure.Core.Foundations.Operation< +op getDeletedSecrets is Azure.Core.Foundations.Operation< { - @doc(""" -Maximum number of results to return in a page. If not specified the service -will return up to 25 results. -""") + /** + * Maximum number of results to return in a page. If not specified the service + * will return up to 25 results. + */ @maxValue(25) @minValue(1) @query("maxresults") @@ -1352,136 +1504,156 @@ will return up to 25 results. DeletedSecretListResult >; +/** + * The Get Deleted Secret operation returns the specified deleted secret along + * with its attributes. This operation requires the secrets/get permission. + */ @summary("Gets the specified deleted secret.") -@doc(""" -The Get Deleted Secret operation returns the specified deleted secret along -with its attributes. This operation requires the secrets/get permission. -""") @route("/deletedsecrets/{secret-name}") @get -op GetDeletedSecret is Azure.Core.Foundations.Operation< +op getDeletedSecret is Azure.Core.Foundations.Operation< { - @doc("The name of the secret.") + /** + * The name of the secret. + */ @path `secret-name`: string; }, DeletedSecretBundle >; +/** + * The purge deleted secret operation removes the secret permanently, without the + * possibility of recovery. This operation can only be enabled on a soft-delete + * enabled vault. This operation requires the secrets/purge permission. + */ @summary("Permanently deletes the specified secret.") -@doc(""" -The purge deleted secret operation removes the secret permanently, without the -possibility of recovery. This operation can only be enabled on a soft-delete -enabled vault. This operation requires the secrets/purge permission. -""") @route("/deletedsecrets/{secret-name}") @delete -op PurgeDeletedSecret is Azure.Core.Foundations.Operation< +op purgeDeletedSecret is Azure.Core.Foundations.Operation< { - @doc("The name of the secret.") + /** + * The name of the secret. + */ @path `secret-name`: string; }, void >; +/** + * Recovers the deleted secret in the specified vault. This operation can only be + * performed on a soft-delete enabled vault. This operation requires the + * secrets/recover permission. + */ @summary("Recovers the deleted secret to the latest version.") -@doc(""" -Recovers the deleted secret in the specified vault. This operation can only be -performed on a soft-delete enabled vault. This operation requires the -secrets/recover permission. -""") @route("/deletedsecrets/{secret-name}/recover") @post -op RecoverDeletedSecret is Azure.Core.Foundations.Operation< +op recoverDeletedSecret is Azure.Core.Foundations.Operation< { - @doc("The name of the deleted secret.") + /** + * The name of the deleted secret. + */ @path `secret-name`: string; }, SecretBundle >; +/** + * Requests that a backup of the specified secret be downloaded to the client. All + * versions of the secret will be downloaded. This operation requires the + * secrets/backup permission. + */ @summary("Backs up the specified secret.") -@doc(""" -Requests that a backup of the specified secret be downloaded to the client. All -versions of the secret will be downloaded. This operation requires the -secrets/backup permission. -""") @route("/secrets/{secret-name}/backup") @post -op BackupSecret is Azure.Core.Foundations.Operation< +op backupSecret is Azure.Core.Foundations.Operation< { - @doc("The name of the secret.") + /** + * The name of the secret. + */ @path `secret-name`: string; }, BackupSecretResult >; +/** + * Restores a backed up secret, and all its versions, to a vault. This operation + * requires the secrets/restore permission. + */ @summary("Restores a backed up secret to a vault.") -@doc(""" -Restores a backed up secret, and all its versions, to a vault. This operation -requires the secrets/restore permission. -""") @route("/secrets/restore") @post -op RestoreSecret is Azure.Core.Foundations.Operation< +op restoreSecret is Azure.Core.Foundations.Operation< SecretRestoreParameters, SecretBundle >; +/** + * Description of the pool setting to be updated + */ @summary(""" Updates key vault account setting, stores it, then returns the setting name and value to the client. """) -@doc("Description of the pool setting to be updated") @route("/settings/{setting-name}") @patch -op UpdateSettings is Azure.Core.Foundations.Operation< +op updateSettings is Azure.Core.Foundations.Operation< { - @doc("The name of the account setting. Must be a valid settings option.") + /** + * The name of the account setting. Must be a valid settings option. + */ @path `setting-name`: string; - @doc("The parameters to update an account setting.") + /** + * The parameters to update an account setting. + */ @body parameters: UpdateSettingsRequest; }, Setting >; +/** + * Retrieves the value of a specified, value account setting. + */ @summary("Get specified account setting value.") -@doc("Retrieves the value of a specified, value account setting.") @route("/settings/{setting-name}") @get -op GetSettingValue is Azure.Core.Foundations.Operation< +op getSettingValue is Azure.Core.Foundations.Operation< { - @doc("The name of the account setting. Must be a valid settings option.") + /** + * The name of the account setting. Must be a valid settings option. + */ @path `setting-name`: string; }, Setting >; +/** + * Retrieves a list of all the available account settings that can be configured. + */ @summary("List account settings.") -@doc("Retrieves a list of all the available account settings that can be configured.") @route("/settings") @get -op GetSettings is Azure.Core.Foundations.Operation<{}, SettingsListResult>; +op getSettings is Azure.Core.Foundations.Operation<{}, SettingsListResult>; -@doc(""" -List storage accounts managed by the specified key vault. This operation -requires the storage/list permission. -""") +/** + * List storage accounts managed by the specified key vault. This operation + * requires the storage/list permission. + */ @route("/storage") @get -op GetStorageAccounts is Azure.Core.Foundations.Operation< +op getStorageAccounts is Azure.Core.Foundations.Operation< { - @doc(""" -Maximum number of results to return in a page. If not specified the service -will return up to 25 results. -""") + /** + * Maximum number of results to return in a page. If not specified the service + * will return up to 25 results. + */ @maxValue(25) @minValue(1) @query("maxresults") @@ -1490,20 +1662,20 @@ will return up to 25 results. StorageListResult >; +/** + * The Get Deleted Storage Accounts operation returns the storage accounts that + * have been deleted for a vault enabled for soft-delete. This operation requires + * the storage/list permission. + */ @summary("Lists deleted storage accounts for the specified vault.") -@doc(""" -The Get Deleted Storage Accounts operation returns the storage accounts that -have been deleted for a vault enabled for soft-delete. This operation requires -the storage/list permission. -""") @route("/deletedstorage") @get -op GetDeletedStorageAccounts is Azure.Core.Foundations.Operation< +op getDeletedStorageAccounts is Azure.Core.Foundations.Operation< { - @doc(""" -Maximum number of results to return in a page. If not specified the service -will return up to 25 results. -""") + /** + * Maximum number of results to return in a page. If not specified the service + * will return up to 25 results. + */ @maxValue(25) @minValue(1) @query("maxresults") @@ -1512,17 +1684,19 @@ will return up to 25 results. DeletedStorageListResult >; +/** + * The Get Deleted Storage Account operation returns the specified deleted storage + * account along with its attributes. This operation requires the storage/get + * permission. + */ @summary("Gets the specified deleted storage account.") -@doc(""" -The Get Deleted Storage Account operation returns the specified deleted storage -account along with its attributes. This operation requires the storage/get -permission. -""") @route("/deletedstorage/{storage-account-name}") @get -op GetDeletedStorageAccount is Azure.Core.Foundations.Operation< +op getDeletedStorageAccount is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @@ -1530,18 +1704,20 @@ op GetDeletedStorageAccount is Azure.Core.Foundations.Operation< DeletedStorageBundle >; +/** + * The purge deleted storage account operation removes the secret permanently, + * without the possibility of recovery. This operation can only be performed on a + * soft-delete enabled vault. This operation requires the storage/purge + * permission. + */ @summary("Permanently deletes the specified storage account.") -@doc(""" -The purge deleted storage account operation removes the secret permanently, -without the possibility of recovery. This operation can only be performed on a -soft-delete enabled vault. This operation requires the storage/purge -permission. -""") @route("/deletedstorage/{storage-account-name}") @delete -op PurgeDeletedStorageAccount is Azure.Core.Foundations.Operation< +op purgeDeletedStorageAccount is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @@ -1549,17 +1725,19 @@ op PurgeDeletedStorageAccount is Azure.Core.Foundations.Operation< void >; +/** + * Recovers the deleted storage account in the specified vault. This operation can + * only be performed on a soft-delete enabled vault. This operation requires the + * storage/recover permission. + */ @summary("Recovers the deleted storage account.") -@doc(""" -Recovers the deleted storage account in the specified vault. This operation can -only be performed on a soft-delete enabled vault. This operation requires the -storage/recover permission. -""") @route("/deletedstorage/{storage-account-name}/recover") @post -op RecoverDeletedStorageAccount is Azure.Core.Foundations.Operation< +op recoverDeletedStorageAccount is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @@ -1567,43 +1745,47 @@ op RecoverDeletedStorageAccount is Azure.Core.Foundations.Operation< StorageBundle >; +/** + * Requests that a backup of the specified storage account be downloaded to the + * client. This operation requires the storage/backup permission. + */ @summary("Backs up the specified storage account.") -@doc(""" -Requests that a backup of the specified storage account be downloaded to the -client. This operation requires the storage/backup permission. -""") @route("/storage/{storage-account-name}/backup") @post -op BackupStorageAccount is Azure.Core.Foundations.Operation< +op backupStorageAccount is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @path `storage-account-name`: string; }, BackupStorageResult >; +/** + * Restores a backed up storage account to a vault. This operation requires the + * storage/restore permission. + */ @summary("Restores a backed up storage account to a vault.") -@doc(""" -Restores a backed up storage account to a vault. This operation requires the -storage/restore permission. -""") @route("/storage/restore") @post -op RestoreStorageAccount is Azure.Core.Foundations.Operation< +op restoreStorageAccount is Azure.Core.Foundations.Operation< StorageRestoreParameters, StorageBundle >; -@doc(""" -Deletes a storage account. This operation requires the storage/delete -permission. -""") +/** + * Deletes a storage account. This operation requires the storage/delete + * permission. + */ @route("/storage/{storage-account-name}") @delete -op DeleteStorageAccount is Azure.Core.Foundations.Operation< +op deleteStorageAccount is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @@ -1611,15 +1793,17 @@ op DeleteStorageAccount is Azure.Core.Foundations.Operation< DeletedStorageBundle >; -@doc(""" -Gets information about a specified storage account. This operation requires the -storage/get permission. -""") +/** + * Gets information about a specified storage account. This operation requires the + * storage/get permission. + */ @route("/storage/{storage-account-name}") @get -op GetStorageAccount is Azure.Core.Foundations.Operation< +op getStorageAccount is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; @@ -1627,87 +1811,99 @@ op GetStorageAccount is Azure.Core.Foundations.Operation< StorageBundle >; -@doc(""" -Creates or updates a new storage account. This operation requires the -storage/set permission. -""") +/** + * Creates or updates a new storage account. This operation requires the + * storage/set permission. + */ @route("/storage/{storage-account-name}") @put -op SetStorageAccount is Azure.Core.Foundations.Operation< +op setStorageAccount is Azure.Core.Foundations.Operation< { - @doc(""" -The name of the storage account. The value you provide may be copied globally -for the purpose of running the service. The value provided should not include -personally identifiable or sensitive information. -""") + /** + * The name of the storage account. The value you provide may be copied globally + * for the purpose of running the service. The value provided should not include + * personally identifiable or sensitive information. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; - @doc("The parameters to create a storage account.") + /** + * The parameters to create a storage account. + */ @body parameters: StorageAccountCreateParameters; }, StorageBundle >; -@doc(""" -Updates the specified attributes associated with the given storage account. -This operation requires the storage/set/update permission. -""") +/** + * Updates the specified attributes associated with the given storage account. + * This operation requires the storage/set/update permission. + */ @route("/storage/{storage-account-name}") @patch -op UpdateStorageAccount is Azure.Core.Foundations.Operation< +op updateStorageAccount is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; - @doc("The parameters to update a storage account.") + /** + * The parameters to update a storage account. + */ @body parameters: StorageAccountUpdateParameters; }, StorageBundle >; -@doc(""" -Regenerates the specified key value for the given storage account. This -operation requires the storage/regeneratekey permission. -""") +/** + * Regenerates the specified key value for the given storage account. This + * operation requires the storage/regeneratekey permission. + */ @route("/storage/{storage-account-name}/regeneratekey") @post -op RegenerateStorageAccountKey is Azure.Core.Foundations.Operation< +op regenerateStorageAccountKey is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; - @doc("The parameters to regenerate storage account key.") + /** + * The parameters to regenerate storage account key. + */ @body parameters: StorageAccountRegenerteKeyParameters; }, StorageBundle >; -@doc(""" -List storage SAS definitions for the given storage account. This operation -requires the storage/listsas permission. -""") +/** + * List storage SAS definitions for the given storage account. This operation + * requires the storage/listsas permission. + */ @route("/storage/{storage-account-name}/sas") @get -op GetSasDefinitions is Azure.Core.Foundations.Operation< +op getSasDefinitions is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; - @doc(""" -Maximum number of results to return in a page. If not specified the service -will return up to 25 results. -""") + /** + * Maximum number of results to return in a page. If not specified the service + * will return up to 25 results. + */ @maxValue(25) @minValue(1) @query("maxresults") @@ -1716,25 +1912,27 @@ will return up to 25 results. SasDefinitionListResult >; +/** + * The Get Deleted Sas Definitions operation returns the SAS definitions that have + * been deleted for a vault enabled for soft-delete. This operation requires the + * storage/listsas permission. + */ @summary("Lists deleted SAS definitions for the specified vault and storage account.") -@doc(""" -The Get Deleted Sas Definitions operation returns the SAS definitions that have -been deleted for a vault enabled for soft-delete. This operation requires the -storage/listsas permission. -""") @route("/deletedstorage/{storage-account-name}/sas") @get -op GetDeletedSasDefinitions is Azure.Core.Foundations.Operation< +op getDeletedSasDefinitions is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; - @doc(""" -Maximum number of results to return in a page. If not specified the service -will return up to 25 results. -""") + /** + * Maximum number of results to return in a page. If not specified the service + * will return up to 25 results. + */ @maxValue(25) @minValue(1) @query("maxresults") @@ -1743,22 +1941,26 @@ will return up to 25 results. DeletedSasDefinitionListResult >; +/** + * The Get Deleted SAS Definition operation returns the specified deleted SAS + * definition along with its attributes. This operation requires the + * storage/getsas permission. + */ @summary("Gets the specified deleted sas definition.") -@doc(""" -The Get Deleted SAS Definition operation returns the specified deleted SAS -definition along with its attributes. This operation requires the -storage/getsas permission. -""") @route("/deletedstorage/{storage-account-name}/sas/{sas-definition-name}") @get -op GetDeletedSasDefinition is Azure.Core.Foundations.Operation< +op getDeletedSasDefinition is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; - @doc("The name of the SAS definition.") + /** + * The name of the SAS definition. + */ @pattern("^[0-9a-zA-Z]+$") @path `sas-definition-name`: string; @@ -1766,22 +1968,26 @@ op GetDeletedSasDefinition is Azure.Core.Foundations.Operation< DeletedSasDefinitionBundle >; +/** + * Recovers the deleted SAS definition for the specified storage account. This + * operation can only be performed on a soft-delete enabled vault. This operation + * requires the storage/recover permission. + */ @summary("Recovers the deleted SAS definition.") -@doc(""" -Recovers the deleted SAS definition for the specified storage account. This -operation can only be performed on a soft-delete enabled vault. This operation -requires the storage/recover permission. -""") @route("/deletedstorage/{storage-account-name}/sas/{sas-definition-name}/recover") @post -op RecoverDeletedSasDefinition is Azure.Core.Foundations.Operation< +op recoverDeletedSasDefinition is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; - @doc("The name of the SAS definition.") + /** + * The name of the SAS definition. + */ @pattern("^[0-9a-zA-Z]+$") @path `sas-definition-name`: string; @@ -1789,20 +1995,24 @@ op RecoverDeletedSasDefinition is Azure.Core.Foundations.Operation< SasDefinitionBundle >; -@doc(""" -Deletes a SAS definition from a specified storage account. This operation -requires the storage/deletesas permission. -""") +/** + * Deletes a SAS definition from a specified storage account. This operation + * requires the storage/deletesas permission. + */ @route("/storage/{storage-account-name}/sas/{sas-definition-name}") @delete -op DeleteSasDefinition is Azure.Core.Foundations.Operation< +op deleteSasDefinition is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; - @doc("The name of the SAS definition.") + /** + * The name of the SAS definition. + */ @pattern("^[0-9a-zA-Z]+$") @path `sas-definition-name`: string; @@ -1810,20 +2020,24 @@ op DeleteSasDefinition is Azure.Core.Foundations.Operation< DeletedSasDefinitionBundle >; -@doc(""" -Gets information about a SAS definition for the specified storage account. This -operation requires the storage/getsas permission. -""") +/** + * Gets information about a SAS definition for the specified storage account. This + * operation requires the storage/getsas permission. + */ @route("/storage/{storage-account-name}/sas/{sas-definition-name}") @get -op GetSasDefinition is Azure.Core.Foundations.Operation< +op getSasDefinition is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; - @doc("The name of the SAS definition.") + /** + * The name of the SAS definition. + */ @pattern("^[0-9a-zA-Z]+$") @path `sas-definition-name`: string; @@ -1831,54 +2045,64 @@ op GetSasDefinition is Azure.Core.Foundations.Operation< SasDefinitionBundle >; -@doc(""" -Creates or updates a new SAS definition for the specified storage account. This -operation requires the storage/setsas permission. -""") +/** + * Creates or updates a new SAS definition for the specified storage account. This + * operation requires the storage/setsas permission. + */ @route("/storage/{storage-account-name}/sas/{sas-definition-name}") @put -op SetSasDefinition is Azure.Core.Foundations.Operation< +op setSasDefinition is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; - @doc(""" -The name of the SAS definition. The value you provide may be copied globally -for the purpose of running the service. The value provided should not include -personally identifiable or sensitive information. -""") + /** + * The name of the SAS definition. The value you provide may be copied globally + * for the purpose of running the service. The value provided should not include + * personally identifiable or sensitive information. + */ @pattern("^[0-9a-zA-Z]+$") @path `sas-definition-name`: string; - @doc("The parameters to create a SAS definition.") + /** + * The parameters to create a SAS definition. + */ @body parameters: SasDefinitionCreateParameters; }, SasDefinitionBundle >; -@doc(""" -Updates the specified attributes associated with the given SAS definition. This -operation requires the storage/setsas permission. -""") +/** + * Updates the specified attributes associated with the given SAS definition. This + * operation requires the storage/setsas permission. + */ @route("/storage/{storage-account-name}/sas/{sas-definition-name}") @patch -op UpdateSasDefinition is Azure.Core.Foundations.Operation< +op updateSasDefinition is Azure.Core.Foundations.Operation< { - @doc("The name of the storage account.") + /** + * The name of the storage account. + */ @pattern("^[0-9a-zA-Z]+$") @path `storage-account-name`: string; - @doc("The name of the SAS definition.") + /** + * The name of the SAS definition. + */ @pattern("^[0-9a-zA-Z]+$") @path `sas-definition-name`: string; - @doc("The parameters to update a SAS definition.") + /** + * The parameters to update a SAS definition. + */ @body parameters: SasDefinitionUpdateParameters; }, @@ -1886,74 +2110,96 @@ op UpdateSasDefinition is Azure.Core.Foundations.Operation< >; interface RoleDefinitionsOperations { - @doc("Deletes a custom role definition.") + /** + * Deletes a custom role definition. + */ @route("/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The scope of the role definition to delete. Managed HSM only supports '/'.") + /** + * The scope of the role definition to delete. Managed HSM only supports '/'. + */ @path scope: string; - @doc("The name (GUID) of the role definition to delete.") + /** + * The name (GUID) of the role definition to delete. + */ @path roleDefinitionName: string; }, RoleDefinition >; - @doc("Creates or updates a custom role definition.") + /** + * Creates or updates a custom role definition. + */ @route("/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}") @put - CreateOrUpdate is Azure.Core.Foundations.Operation< + createOrUpdate is Azure.Core.Foundations.Operation< { - @doc(""" -The scope of the role definition to create or update. Managed HSM only supports -'/'. -""") + /** + * The scope of the role definition to create or update. Managed HSM only supports + * '/'. + */ @path scope: string; - @doc("The name of the role definition to create or update. It can be any valid GUID.") + /** + * The name of the role definition to create or update. It can be any valid GUID. + */ @path roleDefinitionName: string; - @doc("Parameters for the role definition.") + /** + * Parameters for the role definition. + */ @body parameters: RoleDefinitionCreateParameters; }, RoleDefinition >; - @doc("Get the specified role definition.") + /** + * Get the specified role definition. + */ @route("/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The scope of the role definition to get. Managed HSM only supports '/'.") + /** + * The scope of the role definition to get. Managed HSM only supports '/'. + */ @path scope: string; - @doc("The name of the role definition to get.") + /** + * The name of the role definition to get. + */ @path roleDefinitionName: string; }, RoleDefinition >; - @doc("Get all role definitions that are applicable at scope and above.") + /** + * Get all role definitions that are applicable at scope and above. + */ @route("/{scope}/providers/Microsoft.Authorization/roleDefinitions") @get - List is Azure.Core.Foundations.Operation< + list is Azure.Core.Foundations.Operation< { - @doc("The scope of the role definition.") + /** + * The scope of the role definition. + */ @path scope: string; - @doc(""" -The filter to apply on the operation. Use atScopeAndBelow filter to search -below the given scope as well. -""") + /** + * The filter to apply on the operation. Use atScopeAndBelow filter to search + * below the given scope as well. + */ @query("$filter") $filter?: string; }, @@ -1962,72 +2208,96 @@ below the given scope as well. } interface RoleAssignmentsOperations { - @doc("Deletes a role assignment.") + /** + * Deletes a role assignment. + */ @route("/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}") @delete - Delete is Azure.Core.Foundations.Operation< + delete is Azure.Core.Foundations.Operation< { - @doc("The scope of the role assignment to delete.") + /** + * The scope of the role assignment to delete. + */ @path scope: string; - @doc("The name of the role assignment to delete.") + /** + * The name of the role assignment to delete. + */ @path roleAssignmentName: string; }, RoleAssignment >; - @doc("Creates a role assignment.") + /** + * Creates a role assignment. + */ @route("/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}") @put - Create is Azure.Core.Foundations.Operation< + create is Azure.Core.Foundations.Operation< { - @doc("The scope of the role assignment to create.") + /** + * The scope of the role assignment to create. + */ @path scope: string; - @doc("The name of the role assignment to create. It can be any valid GUID.") + /** + * The name of the role assignment to create. It can be any valid GUID. + */ @path roleAssignmentName: string; - @doc("Parameters for the role assignment.") + /** + * Parameters for the role assignment. + */ @body parameters: RoleAssignmentCreateParameters; }, RoleAssignment >; - @doc("Get the specified role assignment.") + /** + * Get the specified role assignment. + */ @route("/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}") @get - Get is Azure.Core.Foundations.Operation< + get is Azure.Core.Foundations.Operation< { - @doc("The scope of the role assignment.") + /** + * The scope of the role assignment. + */ @path scope: string; - @doc("The name of the role assignment to get.") + /** + * The name of the role assignment to get. + */ @path roleAssignmentName: string; }, RoleAssignment >; - @doc("Gets role assignments for a scope.") + /** + * Gets role assignments for a scope. + */ @route("/{scope}/providers/Microsoft.Authorization/roleAssignments") @get - ListForScope is Azure.Core.Foundations.Operation< + listForScope is Azure.Core.Foundations.Operation< { - @doc("The scope of the role assignments.") + /** + * The scope of the role assignments. + */ @path scope: string; - @doc(""" -The filter to apply on the operation. Use $filter=atScope() to return all role -assignments at or above the scope. Use $filter=principalId eq {id} to return -all role assignments at, above or below the scope for the specified principal. -""") + /** + * The filter to apply on the operation. Use $filter=atScope() to return all role + * assignments at or above the scope. Use $filter=principalId eq {id} to return + * all role assignments at, above or below the scope for the specified principal. + */ @query("$filter") $filter?: string; }, @@ -2036,44 +2306,50 @@ all role assignments at, above or below the scope for the specified principal. } interface HSMSecurityDomainOperations { - @doc("Retrieves the Security Domain download operation status") + /** + * Retrieves the Security Domain download operation status + */ @route("/securitydomain/download/pending") @get - DownloadPending is Azure.Core.Foundations.Operation< + downloadPending is Azure.Core.Foundations.Operation< {}, SecurityDomainOperationStatus >; - @doc(""" -Retrieves the Security Domain from the managed HSM. Calling this endpoint can -be used to activate a provisioned managed HSM resource. -""") + /** + * Retrieves the Security Domain from the managed HSM. Calling this endpoint can + * be used to activate a provisioned managed HSM resource. + */ @route("/securitydomain/download") @post - Download is Azure.Core.Foundations.Operation< + download is Azure.Core.Foundations.Operation< CertificateInfoObject, SecurityDomainObject >; - @doc("Retrieve Security Domain transfer key") - // FIXME: (name-collision-error) There is a potential collision with Operation, Parameter and Response names. - // Problematic names: [TransferKey] + /** + * Retrieve Security Domain transfer key + */ @route("/securitydomain/upload") @get - TransferKey is Azure.Core.Foundations.Operation<{}, TransferKey>; + transferKey is Azure.Core.Foundations.Operation<{}, TransferKey>; - @doc("Restore the provided Security Domain.") + /** + * Restore the provided Security Domain. + */ @route("/securitydomain/upload") @post - Upload is Azure.Core.Foundations.Operation< + upload is Azure.Core.Foundations.Operation< SecurityDomainObject, SecurityDomainOperationStatus | void >; - @doc("Get Security Domain upload operation status") + /** + * Get Security Domain upload operation status + */ @route("/securitydomain/upload/pending") @get - UploadPending is Azure.Core.Foundations.Operation< + uploadPending is Azure.Core.Foundations.Operation< {}, SecurityDomainOperationStatus >; diff --git a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp index 5ec17b8388..770c7bdfac 100644 --- a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp @@ -4,6 +4,10 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +/** + * These APIs allow end users to create, view and run load tests using Azure Load + * Test Service. + */ @service({ title: "Load Testing Service", }) @@ -15,14 +19,14 @@ using TypeSpec.Http; Endpoint: string, } ) -@doc(""" -These APIs allow end users to create, view and run load tests using Azure Load -Test Service. -""") namespace Azure.LoadTesting; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { - @doc("The 2022-11-01 API version.") + /** + * The 2022-11-01 API version. + */ v2022_11_01: "2022-11-01", } diff --git a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/models.tsp index 7250f5dcb8..7744f80eca 100644 --- a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/models.tsp @@ -7,928 +7,1597 @@ using TypeSpec.Http; namespace Azure.LoadTesting; -@doc("The client metric on which the criteria should be applied.") +/** + * The client metric on which the criteria should be applied. + */ enum PFMetrics { - @doc("Pass fail criteria for response time metric") response_time_ms, - @doc("Pass fail criteria for response time metric") latency, - @doc("Pass fail criteria for error metric") error, - @doc("Pass fail criteria for total requests") requests, - @doc("Pass fail criteria for request rate.") requests_per_sec, -} - -@doc(""" -The aggregation function to be applied on the client metric. Allowed functions -- ‘percentage’ - for error metric , ‘avg’, ‘p50’, ‘p90’, ‘p95’, ‘p99’, ‘min’, -‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, -‘count’ - for requests -""") + /** + * Pass fail criteria for response time metric + */ + response_time_ms, + + /** + * Pass fail criteria for response time metric + */ + latency, + + /** + * Pass fail criteria for error metric + */ + error, + + /** + * Pass fail criteria for total requests + */ + requests, + + /** + * Pass fail criteria for request rate. + */ + requests_per_sec, +} + +/** + * The aggregation function to be applied on the client metric. Allowed functions + * - ‘percentage’ - for error metric , ‘avg’, ‘p50’, ‘p90’, ‘p95’, ‘p99’, ‘min’, + * ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, + * ‘count’ - for requests + */ enum PFAgFunc { - @doc("Criteria applies for count value") count, - @doc("Criteria applies for given percentage value") percentage, - @doc("Criteria applies for avg value") avg, - @doc("Criteria applies for 50th percentile value") p50, - @doc("Criteria applies for 90th percentile value") p90, - @doc("Criteria applies for 95th percentile value") p95, - @doc("Criteria applies for 99th percentile value") p99, - @doc("Criteria applies for minimum value") min, - @doc("Criteria applies for maximum value") max, -} - -@doc("Action taken after the threshold is met. Default is ‘continue’.") + /** + * Criteria applies for count value + */ + count, + + /** + * Criteria applies for given percentage value + */ + percentage, + + /** + * Criteria applies for avg value + */ + avg, + + /** + * Criteria applies for 50th percentile value + */ + p50, + + /** + * Criteria applies for 90th percentile value + */ + p90, + + /** + * Criteria applies for 95th percentile value + */ + p95, + + /** + * Criteria applies for 99th percentile value + */ + p99, + + /** + * Criteria applies for minimum value + */ + min, + + /** + * Criteria applies for maximum value + */ + max, +} + +/** + * Action taken after the threshold is met. Default is ‘continue’. + */ enum PFAction { - @doc("Test will continue to run even if pass fail metric criteria metric gets failed") + /** + * Test will continue to run even if pass fail metric criteria metric gets failed + */ continue, - @doc("Test run will stop if pass fail criteria metric is not passed.") stop, + + /** + * Test run will stop if pass fail criteria metric is not passed. + */ + stop, } -@doc("Outcome of the test run.") +/** + * Outcome of the test run. + */ enum PFResult { - @doc("Given pass fail criteria metric has passed.") passed, - @doc("Given pass fail criteria metric couldn't determine.") undetermined, - @doc("Given pass fail criteria metric has failed.") failed, + /** + * Given pass fail criteria metric has passed. + */ + passed, + + /** + * Given pass fail criteria metric couldn't determine. + */ + undetermined, + + /** + * Given pass fail criteria metric has failed. + */ + failed, } -@doc("Type of secret") +/** + * Type of secret + */ enum SecretType { - @doc("If the secret is stored in an Azure Key Vault") AKV_SECRET_URI, - @doc("If the Plain text secret value provided") SECRET_VALUE, + /** + * If the secret is stored in an Azure Key Vault + */ + AKV_SECRET_URI, + + /** + * If the Plain text secret value provided + */ + SECRET_VALUE, } -@doc("Type of certificate") +/** + * Type of certificate + */ enum CertificateType { - @doc("If the certificate is stored in an Azure Key Vault") AKV_CERT_URI, + /** + * If the certificate is stored in an Azure Key Vault + */ + AKV_CERT_URI, } -@doc("File type") +/** + * File type + */ enum FileType { - @doc("If file is jmx script") JMX_FILE, - @doc("If file is user properties") USER_PROPERTIES, - @doc("If file is not any of other supported type") ADDITIONAL_ARTIFACTS, + /** + * If file is jmx script + */ + JMX_FILE, + + /** + * If file is user properties + */ + USER_PROPERTIES, + + /** + * If file is not any of other supported type + */ + ADDITIONAL_ARTIFACTS, } -@doc("Validation status of the file") +/** + * Validation status of the file + */ enum FileStatus { - @doc("File is not validated.") NOT_VALIDATED, - @doc("File is validated.") VALIDATION_SUCCESS, - @doc("File validation is failed.") VALIDATION_FAILURE, - @doc("File validation is in progress.") VALIDATION_INITIATED, - @doc("Validation is not required.") VALIDATION_NOT_REQUIRED, + /** + * File is not validated. + */ + NOT_VALIDATED, + + /** + * File is validated. + */ + VALIDATION_SUCCESS, + + /** + * File validation is failed. + */ + VALIDATION_FAILURE, + + /** + * File validation is in progress. + */ + VALIDATION_INITIATED, + + /** + * Validation is not required. + */ + VALIDATION_NOT_REQUIRED, } -@doc("Test result for pass/Fail criteria used during the test run.") +/** + * Test result for pass/Fail criteria used during the test run. + */ enum PFTestResult { - @doc("Pass/fail criteria has passed.") PASSED, - @doc("Pass/fail criteria is not applicable.") NOT_APPLICABLE, - @doc("Pass/fail criteria has failed.") FAILED, + /** + * Pass/fail criteria has passed. + */ + PASSED, + + /** + * Pass/fail criteria is not applicable. + */ + NOT_APPLICABLE, + + /** + * Pass/fail criteria has failed. + */ + FAILED, } -@doc("The test run status.") +/** + * The test run status. + */ enum Status { - @doc("Test run request is accepted") ACCEPTED, - @doc("Test run is not yet started.") NOTSTARTED, - @doc("Test run is getting provision") PROVISIONING, - @doc("Test run is provisioned") PROVISIONED, - @doc("Test run is getting configure") CONFIGURING, - @doc("Test run configuration is done") CONFIGURED, - @doc("Test run has started executing") EXECUTING, - @doc("Test run has been executed") EXECUTED, - @doc("Test run is getting deprovision") DEPROVISIONING, - @doc("Test run request is deprovisioned") DEPROVISIONED, - @doc("Test run request is finished") DONE, - @doc("Test run request is getting cancelled") CANCELLING, - @doc("Test run request is cancelled") CANCELLED, - @doc("Test run request is failed") FAILED, - @doc("Test run JMX file is validated") VALIDATION_SUCCESS, - @doc("Test run JMX file validation is failed") VALIDATION_FAILURE, -} - -@doc("The primary aggregation type value defining how to use the values for display.") + /** + * Test run request is accepted + */ + ACCEPTED, + + /** + * Test run is not yet started. + */ + NOTSTARTED, + + /** + * Test run is getting provision + */ + PROVISIONING, + + /** + * Test run is provisioned + */ + PROVISIONED, + + /** + * Test run is getting configure + */ + CONFIGURING, + + /** + * Test run configuration is done + */ + CONFIGURED, + + /** + * Test run has started executing + */ + EXECUTING, + + /** + * Test run has been executed + */ + EXECUTED, + + /** + * Test run is getting deprovision + */ + DEPROVISIONING, + + /** + * Test run request is deprovisioned + */ + DEPROVISIONED, + + /** + * Test run request is finished + */ + DONE, + + /** + * Test run request is getting cancelled + */ + CANCELLING, + + /** + * Test run request is cancelled + */ + CANCELLED, + + /** + * Test run request is failed + */ + FAILED, + + /** + * Test run JMX file is validated + */ + VALIDATION_SUCCESS, + + /** + * Test run JMX file validation is failed + */ + VALIDATION_FAILURE, +} + +/** + * The primary aggregation type value defining how to use the values for display. + */ enum AggregationType { - @doc("Average value") Average, - @doc("Total count") Count, - @doc("Aggregation will be average in this case") None, - @doc("Total sum") Total, - @doc("90th percentile") Percentile90, - @doc("95th percentile") Percentile95, - @doc("99th percentile") Percentile99, + /** + * Average value + */ + Average, + + /** + * Total count + */ + Count, + + /** + * Aggregation will be average in this case + */ + None, + + /** + * Total sum + */ + Total, + + /** + * 90th percentile + */ + Percentile90, + + /** + * 95th percentile + */ + Percentile95, + + /** + * 99th percentile + */ + Percentile99, } -@doc("The unit of the metric.") +/** + * The unit of the metric. + */ enum MetricUnit { - @doc("No unit specified") NotSpecified, - @doc("Percentage") Percent, - @doc("Value count") Count, - @doc("Seconds") Seconds, - @doc("Milliseconds") Milliseconds, - @doc("Bytes") Bytes, - @doc("Bytes per second") BytesPerSecond, - @doc("Count per second") CountPerSecond, -} - -@doc(""" -The time grain specifies the aggregation interval for the metric. Expressed as -a duration 'PT1M', 'PT1H', etc. -""") + /** + * No unit specified + */ + NotSpecified, + + /** + * Percentage + */ + Percent, + + /** + * Value count + */ + Count, + + /** + * Seconds + */ + Seconds, + + /** + * Milliseconds + */ + Milliseconds, + + /** + * Bytes + */ + Bytes, + + /** + * Bytes per second + */ + BytesPerSecond, + + /** + * Count per second + */ + CountPerSecond, +} + +/** + * The time grain specifies the aggregation interval for the metric. Expressed as + * a duration 'PT1M', 'PT1H', etc. + */ enum TimeGrain { - @doc("5 seconds, available only if test run duration is less than 10 minutes") + /** + * 5 seconds, available only if test run duration is less than 10 minutes + */ PT5S, - @doc("10 seconds, available only if test run duration is less than 10 minutes") + + /** + * 10 seconds, available only if test run duration is less than 10 minutes + */ PT10S, - @doc("1 minute") PT1M, - @doc("5 minutes, available only if test run duration is greater than 1 minute") + + /** + * 1 minute + */ + PT1M, + + /** + * 5 minutes, available only if test run duration is greater than 1 minute + */ PT5M, - @doc("1 hour, available only if test run duration is greater than 1 minute") + + /** + * 1 hour, available only if test run duration is greater than 1 minute + */ PT1H, } enum Interval { - @doc("5 seconds, available only if test run duration is less than 10 minutes") + /** + * 5 seconds, available only if test run duration is less than 10 minutes + */ PT5S, - @doc("10 seconds, available only if test run duration is less than 10 minutes") + + /** + * 10 seconds, available only if test run duration is less than 10 minutes + */ PT10S, - @doc("1 minute") PT1M, - @doc("5 minutes, available only if test run duration is greater than 1 minute") + + /** + * 1 minute + */ + PT1M, + + /** + * 5 minutes, available only if test run duration is greater than 1 minute + */ PT5M, - @doc("1 hour, available only if test run duration is greater than 1 minute") + + /** + * 1 hour, available only if test run duration is greater than 1 minute + */ PT1H, } -@doc("Load test model") +/** + * Load test model + */ model Test { - @doc("Pass fail criteria for a test.") + /** + * Pass fail criteria for a test. + */ passFailCriteria?: PassFailCriteria; - @doc(""" -Secrets can be stored in an Azure Key Vault or any other secret store. If the -secret is stored in an Azure Key Vault, the value should be the secret -identifier and the type should be AKV_SECRET_URI. If the secret is stored -elsewhere, the secret value should be provided directly and the type should be -SECRET_VALUE. -""") + /** + * Secrets can be stored in an Azure Key Vault or any other secret store. If the + * secret is stored in an Azure Key Vault, the value should be the secret + * identifier and the type should be AKV_SECRET_URI. If the secret is stored + * elsewhere, the secret value should be provided directly and the type should be + * SECRET_VALUE. + */ secrets?: Record; - @doc("Certificates metadata") + /** + * Certificates metadata + */ certificate?: CertificateMetadata; - @doc("Environment variables which are defined as a set of pairs.") + /** + * Environment variables which are defined as a set of pairs. + */ environmentVariables?: Record; - @doc("The load test configuration.") + /** + * The load test configuration. + */ loadTestConfiguration?: LoadTestConfiguration; - @doc("The input artifacts for the test.") + /** + * The input artifacts for the test. + */ @visibility("read") inputArtifacts?: TestInputArtifacts; - @doc("Unique test name as identifier.") + /** + * Unique test name as identifier. + */ @visibility("read") @maxLength(50) @minLength(2) testId?: string; - @doc("The test description.") + /** + * The test description. + */ @maxLength(100) description?: string; - @doc("Display name of a test.") + /** + * Display name of a test. + */ @maxLength(50) @minLength(2) displayName?: string; - @doc("Subnet ID on which the load test instances should run.") + /** + * Subnet ID on which the load test instances should run. + */ subnetId?: string; - @doc("Type of the managed identity referencing the Key vault.") + /** + * Type of the managed identity referencing the Key vault. + */ keyvaultReferenceIdentityType?: string; - @doc("Resource Id of the managed identity referencing the Key vault.") + /** + * Resource Id of the managed identity referencing the Key vault. + */ keyvaultReferenceIdentityId?: string; - @doc("The creation datetime(ISO 8601 literal format).") + /** + * The creation datetime(ISO 8601 literal format). + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDateTime?: utcDateTime; - @doc("The user that created.") + /** + * The user that created. + */ @visibility("read") createdBy?: string; - @doc("The last Modified datetime(ISO 8601 literal format).") + /** + * The last Modified datetime(ISO 8601 literal format). + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedDateTime?: utcDateTime; - @doc("The user that last modified.") + /** + * The user that last modified. + */ @visibility("read") lastModifiedBy?: string; } -@doc("Pass fail criteria for a test.") +/** + * Pass fail criteria for a test. + */ model PassFailCriteria { - @doc("Map of id and pass fail metrics { id : pass fail metrics }.") + /** + * Map of id and pass fail metrics { id : pass fail metrics }. + */ passFailMetrics?: Record; } -@doc("Pass fail metric") +/** + * Pass fail metric + */ model PassFailMetric { - @doc("The client metric on which the criteria should be applied.") + /** + * The client metric on which the criteria should be applied. + */ clientMetric?: PFMetrics; - @doc(""" -The aggregation function to be applied on the client metric. Allowed functions -- ‘percentage’ - for error metric , ‘avg’, ‘p50’, ‘p90’, ‘p95’, ‘p99’, ‘min’, -‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, -‘count’ - for requests -""") + /** + * The aggregation function to be applied on the client metric. Allowed functions + * - ‘percentage’ - for error metric , ‘avg’, ‘p50’, ‘p90’, ‘p95’, ‘p99’, ‘min’, + * ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, + * ‘count’ - for requests + */ aggregate?: PFAgFunc; - @doc("The comparison operator. Supported types ‘>’, ‘<’ ") + /** + * The comparison operator. Supported types ‘>’, ‘<’ + */ condition?: string; - @doc("Request name for which the Pass fail criteria has to be applied ") + /** + * Request name for which the Pass fail criteria has to be applied + */ requestName?: string; - @doc(""" -The value to compare with the client metric. Allowed values - ‘error : [0.0 , -100.0] unit- % ’, response_time_ms and latency : any integer value unit- ms. -""") - value?: float32; + /** + * The value to compare with the client metric. Allowed values - ‘error : [0.0 , + * 100.0] unit- % ’, response_time_ms and latency : any integer value unit- ms. + */ + value?: float64; - @doc("Action taken after the threshold is met. Default is ‘continue’.") - action?: PFAction; + /** + * Action taken after the threshold is met. Default is ‘continue’. + */ + action?: PFAction = PFAction.continue; - @doc("The actual value of the client metric for the test run.") + /** + * The actual value of the client metric for the test run. + */ @visibility("read") - actualValue?: float32; + actualValue?: float64; - @doc("Outcome of the test run.") + /** + * Outcome of the test run. + */ @visibility("read") result?: PFResult; } -@doc("Secret") +/** + * Secret + */ model Secret { - @doc("The value of the secret for the respective type") + /** + * The value of the secret for the respective type + */ value?: string; - @doc("Type of secret") + /** + * Type of secret + */ type?: SecretType; } -@doc("Certificates metadata") +/** + * Certificates metadata + */ model CertificateMetadata { - @doc("The value of the certificate for respective type") + /** + * The value of the certificate for respective type + */ value?: string; - @doc("Type of certificate") + /** + * Type of certificate + */ type?: CertificateType; - @doc("Name of the certificate.") + /** + * Name of the certificate. + */ name?: string; } -@doc("The load test configuration.") +/** + * The load test configuration. + */ model LoadTestConfiguration { - @doc(""" -The number of engine instances to execute load test. Supported values are in -range of 1-45. Required for creating a new test. -""") + /** + * The number of engine instances to execute load test. Supported values are in + * range of 1-45. Required for creating a new test. + */ engineInstances?: int32; - @doc(""" -If false, Azure Load Testing copies and processes your input files unmodified -across all test engine instances. If true, Azure Load Testing splits the CSV -input data evenly across all engine instances. If you provide multiple CSV -files, each file will be split evenly. -""") + /** + * If false, Azure Load Testing copies and processes your input files unmodified + * across all test engine instances. If true, Azure Load Testing splits the CSV + * input data evenly across all engine instances. If you provide multiple CSV + * files, each file will be split evenly. + */ splitAllCSVs?: boolean; - @doc(""" -If true, optionalLoadTestConfig is required and JMX script for the load test is -not required to upload. -""") + /** + * If true, optionalLoadTestConfig is required and JMX script for the load test is + * not required to upload. + */ quickStartTest?: boolean; - @doc("Optional load test config") + /** + * Optional load test config + */ optionalLoadTestConfig?: OptionalLoadTestConfig; } -@doc("Optional load test config") +/** + * Optional load test config + */ model OptionalLoadTestConfig { - @doc(""" -Test URL. Provide the complete HTTP URL. For example, -http://contoso-app.azurewebsites.net/login -""") + /** + * Test URL. Provide the complete HTTP URL. For example, + * http://contoso-app.azurewebsites.net/login + */ endpointUrl?: string; - @doc("No of concurrent virtual users") + /** + * No of concurrent virtual users + */ virtualUsers?: int32; - @doc("Ramp up time") + /** + * Ramp up time + */ rampUpTime?: int32; - @doc("Test run duration") + /** + * Test run duration + */ duration?: int32; } -@doc("The input artifacts for the test.") +/** + * The input artifacts for the test. + */ model TestInputArtifacts { - @doc("File info") + /** + * File info + */ configFileInfo?: FileInfo; - @doc("File info") + /** + * File info + */ testScriptFileInfo?: FileInfo; - @doc("File info") + /** + * File info + */ userPropFileInfo?: FileInfo; - @doc("File info") + /** + * File info + */ inputArtifactsZipFileInfo?: FileInfo; - @doc("Additional supported files for the test run") + /** + * Additional supported files for the test run + */ @visibility("read") additionalFileInfo?: FileInfo[]; } -@doc("File info") +/** + * File info + */ model FileInfo { - @doc("File URL.") + /** + * File URL. + */ url?: string; - @doc("Name of the file.") + /** + * Name of the file. + */ fileName?: string; - @doc("File type") + /** + * File type + */ fileType?: FileType; - @doc("Expiry time of the file (ISO 8601 literal format)") + /** + * Expiry time of the file (ISO 8601 literal format) + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expireDateTime?: utcDateTime; - @doc("Validation status of the file") + /** + * Validation status of the file + */ validationStatus?: FileStatus; - @doc("Validation failure error details") + /** + * Validation failure error details + */ validationFailureDetails?: string; } -@doc("The definition of an error object.") +/** + * The definition of an error object. + */ @error model ErrorResponseBody { - @doc("Error from a REST request.") + /** + * Error from a REST request. + */ error: Error; } -@doc("Error from a REST request.") +/** + * Error from a REST request. + */ model Error { - @doc("The error code.") + /** + * The error code. + */ code: string; - @doc("The error message.") + /** + * The error message. + */ message: string; - @doc("The error target.") + /** + * The error target. + */ target?: string; - @doc("Additional details and inner errors.") + /** + * Additional details and inner errors. + */ details?: Error[]; } -@doc("Collection of tests") +/** + * Collection of tests + */ model TestsList is Azure.Core.Page; -@doc("Collection of files.") +/** + * Collection of files. + */ model FileInfoList is Azure.Core.Page; -@doc("Test app component") +/** + * Test app component + */ model TestAppComponents { - @doc(""" -Azure resource collection { resource id (fully qualified resource Id e.g -subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) -: resource object } -""") + /** + * Azure resource collection { resource id (fully qualified resource Id e.g + * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) + * : resource object } + */ components: Record; - @doc("Test identifier") + /** + * Test identifier + */ @visibility("read") testId?: string; - @doc("The creation datetime(ISO 8601 literal format).") + /** + * The creation datetime(ISO 8601 literal format). + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDateTime?: utcDateTime; - @doc("The user that created.") + /** + * The user that created. + */ @visibility("read") createdBy?: string; - @doc("The last Modified datetime(ISO 8601 literal format).") + /** + * The last Modified datetime(ISO 8601 literal format). + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedDateTime?: utcDateTime; - @doc("The user that last modified.") + /** + * The user that last modified. + */ @visibility("read") lastModifiedBy?: string; } -@doc(""" -An Azure resource object (Refer azure generic resource model : -https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id#genericresource) -""") +/** + * An Azure resource object (Refer azure generic resource model : + * https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id#genericresource) + */ model AppComponent { - @doc(""" -fully qualified resource Id e.g -subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} -""") + /** + * fully qualified resource Id e.g + * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} + */ @visibility("read") resourceId?: string; - @doc("Azure resource name, required while creating the app component.") + /** + * Azure resource name, required while creating the app component. + */ resourceName?: string; - @doc("Azure resource type, required while creating the app component.") + /** + * Azure resource type, required while creating the app component. + */ resourceType?: string; - @doc("Azure resource display name") + /** + * Azure resource display name + */ displayName?: string; - @doc("Resource group name of the Azure resource") + /** + * Resource group name of the Azure resource + */ @visibility("read") resourceGroup?: string; - @doc("Subscription Id of the Azure resource") + /** + * Subscription Id of the Azure resource + */ @visibility("read") subscriptionId?: string; - @doc("Kind of Azure resource type") + /** + * Kind of Azure resource type + */ kind?: string; } -@doc("Test server metrics configuration") +/** + * Test server metrics configuration + */ model TestServerMetricConfig { - @doc("Test identifier") + /** + * Test identifier + */ @visibility("read") testId?: string; - @doc(""" -Azure resource metrics collection {metric id : metrics object} (Refer : -https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition -for metric id). -""") + /** + * Azure resource metrics collection {metric id : metrics object} (Refer : + * https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition + * for metric id). + */ metrics?: Record; - @doc("The creation datetime(ISO 8601 literal format).") + /** + * The creation datetime(ISO 8601 literal format). + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDateTime?: utcDateTime; - @doc("The user that created.") + /** + * The user that created. + */ @visibility("read") createdBy?: string; - @doc("The last Modified datetime(ISO 8601 literal format).") + /** + * The last Modified datetime(ISO 8601 literal format). + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedDateTime?: utcDateTime; - @doc("The user that last modified.") + /** + * The user that last modified. + */ @visibility("read") lastModifiedBy?: string; } -@doc(""" -Associated metric definition for particular metrics of the azure resource ( -Refer : -https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition). -""") +/** + * Associated metric definition for particular metrics of the azure resource ( + * Refer : + * https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition). + */ model ResourceMetric { - @doc("Unique name for metric.") + /** + * Unique name for metric. + */ @visibility("read") id?: string; - @doc("Azure resource id.") + /** + * Azure resource id. + */ resourceId: string; - @doc("Metric name space.") + /** + * Metric name space. + */ metricNamespace: string; - @doc("Metric description.") + /** + * Metric description. + */ displayDescription?: string; - @doc("The invariant value of metric name") + /** + * The invariant value of metric name + */ name: string; - @doc("Metric aggregation.") + /** + * Metric aggregation. + */ aggregation: string; - @doc("Metric unit.") + /** + * Metric unit. + */ unit?: string; - @doc("Azure resource type.") + /** + * Azure resource type. + */ resourceType: string; } -@doc("Load test run model") +/** + * Load test run model + */ model TestRun { - @doc("Pass fail criteria for a test.") + /** + * Pass fail criteria for a test. + */ passFailCriteria?: PassFailCriteria; - @doc(""" -Secrets can be stored in an Azure Key Vault or any other secret store. If the -secret is stored in an Azure Key Vault, the value should be the secret -identifier and the type should be AKV_SECRET_URI. If the secret is stored -elsewhere, the secret value should be provided directly and the type should be -SECRET_VALUE. -""") + /** + * Secrets can be stored in an Azure Key Vault or any other secret store. If the + * secret is stored in an Azure Key Vault, the value should be the secret + * identifier and the type should be AKV_SECRET_URI. If the secret is stored + * elsewhere, the secret value should be provided directly and the type should be + * SECRET_VALUE. + */ secrets?: Record; - @doc("Certificates metadata") + /** + * Certificates metadata + */ certificate?: CertificateMetadata; - @doc("Environment variables which are defined as a set of pairs.") + /** + * Environment variables which are defined as a set of pairs. + */ environmentVariables?: Record; - @doc("Error details if there is any failure in load test run") + /** + * Error details if there is any failure in load test run + */ @visibility("read") errorDetails?: ErrorDetails[]; - @doc("Test run statistics.") + /** + * Test run statistics. + */ @visibility("read") testRunStatistics?: Record; - @doc("The load test configuration.") + /** + * The load test configuration. + */ loadTestConfiguration?: LoadTestConfiguration; - @doc("Collection of test run artifacts") + /** + * Collection of test run artifacts + */ @visibility("read") testArtifacts?: TestRunArtifacts; - @doc("Test result for pass/Fail criteria used during the test run.") + /** + * Test result for pass/Fail criteria used during the test run. + */ @visibility("read") testResult?: PFTestResult; - @doc("Number of virtual users, for which test has been run.") + /** + * Number of virtual users, for which test has been run. + */ @visibility("read") virtualUsers?: int32; - @doc("Unique test run name as identifier") + /** + * Unique test run name as identifier + */ @visibility("read") testRunId?: string; - @doc("Display name of a testRun.") + /** + * Display name of a testRun. + */ @maxLength(50) @minLength(2) displayName?: string; - @doc("Associated test Id.") + /** + * Associated test Id. + */ @maxLength(50) @minLength(2) testId?: string; - @doc("The test run description.") + /** + * The test run description. + */ @maxLength(100) description?: string; - @doc("The test run status.") + /** + * The test run status. + */ @visibility("read") status?: Status; - @doc("The test run start DateTime(ISO 8601 literal format).") + /** + * The test run start DateTime(ISO 8601 literal format). + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startDateTime?: utcDateTime; - @doc("The test run end DateTime(ISO 8601 literal format).") + /** + * The test run end DateTime(ISO 8601 literal format). + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endDateTime?: utcDateTime; - @doc("Test run initiated time.") + /** + * Test run initiated time. + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. executedDateTime?: utcDateTime; - @doc("Portal url.") + /** + * Portal url. + */ @visibility("read") portalUrl?: string; - @doc("Test run duration in milliseconds.") + /** + * Test run duration in milliseconds. + */ @visibility("read") - duration?: int32; + duration?: int64; - @doc("Subnet ID on which the load test instances should run.") + /** + * Subnet ID on which the load test instances should run. + */ @visibility("read") subnetId?: string; - @doc("The creation datetime(ISO 8601 literal format).") + /** + * The creation datetime(ISO 8601 literal format). + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDateTime?: utcDateTime; - @doc("The user that created.") + /** + * The user that created. + */ @visibility("read") createdBy?: string; - @doc("The last Modified datetime(ISO 8601 literal format).") + /** + * The last Modified datetime(ISO 8601 literal format). + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedDateTime?: utcDateTime; - @doc("The user that last modified.") + /** + * The user that last modified. + */ @visibility("read") lastModifiedBy?: string; } -@doc("Error details if there is any failure in load test run") +/** + * Error details if there is any failure in load test run + */ model ErrorDetails { - @doc("Error details in case test run was not successfully run.") + /** + * Error details in case test run was not successfully run. + */ @visibility("read") message?: string; } -@doc("Test run statistics.") +/** + * Test run statistics. + */ model TestRunStatistics { - @doc("Transaction name.") + /** + * Transaction name. + */ @visibility("read") transaction?: string; - @doc("Sampler count.") + /** + * Sampler count. + */ @visibility("read") - sampleCount?: float32; + sampleCount?: float64; - @doc("Error count.") + /** + * Error count. + */ @visibility("read") - errorCount?: float32; + errorCount?: float64; - @doc("Error percentage.") + /** + * Error percentage. + */ @visibility("read") - errorPct?: float32; + errorPct?: float64; - @doc("Mean response time.") + /** + * Mean response time. + */ @visibility("read") - meanResTime?: float32; + meanResTime?: float64; - @doc("Median response time.") + /** + * Median response time. + */ @visibility("read") - medianResTime?: float32; + medianResTime?: float64; - @doc("Max response time.") + /** + * Max response time. + */ @visibility("read") - maxResTime?: float32; + maxResTime?: float64; - @doc("Minimum response time.") + /** + * Minimum response time. + */ @visibility("read") - minResTime?: float32; + minResTime?: float64; - @doc("90 percentile response time.") + /** + * 90 percentile response time. + */ @visibility("read") - pct1ResTime?: float32; + pct1ResTime?: float64; - @doc("95 percentile response time.") + /** + * 95 percentile response time. + */ @visibility("read") - pct2ResTime?: float32; + pct2ResTime?: float64; - @doc("99 percentile response time.") + /** + * 99 percentile response time. + */ @visibility("read") - pct3ResTime?: float32; + pct3ResTime?: float64; - @doc("Throughput.") + /** + * Throughput. + */ @visibility("read") - throughput?: float32; + throughput?: float64; - @doc("Received network bytes.") + /** + * Received network bytes. + */ @visibility("read") - receivedKBytesPerSec?: float32; + receivedKBytesPerSec?: float64; - @doc("Send network bytes.") + /** + * Send network bytes. + */ @visibility("read") - sentKBytesPerSec?: float32; + sentKBytesPerSec?: float64; } -@doc("Collection of test run artifacts") +/** + * Collection of test run artifacts + */ model TestRunArtifacts { - @doc("The input artifacts for the test run.") + /** + * The input artifacts for the test run. + */ @visibility("read") inputArtifacts?: TestRunInputArtifacts; - @doc("The output artifacts for the test run.") + /** + * The output artifacts for the test run. + */ outputArtifacts?: TestRunOutputArtifacts; } -@doc("The input artifacts for the test run.") +/** + * The input artifacts for the test run. + */ model TestRunInputArtifacts { - @doc("File info") + /** + * File info + */ configFileInfo?: FileInfo; - @doc("File info") + /** + * File info + */ testScriptFileInfo?: FileInfo; - @doc("File info") + /** + * File info + */ userPropFileInfo?: FileInfo; - @doc("File info") + /** + * File info + */ inputArtifactsZipFileInfo?: FileInfo; - @doc("Additional supported files for the test run") + /** + * Additional supported files for the test run + */ @visibility("read") additionalFileInfo?: FileInfo[]; } -@doc("The output artifacts for the test run.") +/** + * The output artifacts for the test run. + */ model TestRunOutputArtifacts { - @doc("File info") + /** + * File info + */ resultFileInfo?: FileInfo; - @doc("File info") + /** + * File info + */ logsFileInfo?: FileInfo; } -@doc("Collection of test runs") +/** + * Collection of test runs + */ model TestRunsList is Azure.Core.Page; -@doc("Represents collection of metric namespaces.") +/** + * Represents collection of metric namespaces. + */ model MetricNamespaceCollection { - @doc("The values for the metric namespaces.") + /** + * The values for the metric namespaces. + */ value: MetricNamespace[]; } -@doc("Metric namespace class specifies the metadata for a metric namespace.") +/** + * Metric namespace class specifies the metadata for a metric namespace. + */ model MetricNamespace { - @doc("The namespace description.") + /** + * The namespace description. + */ description?: string; - @doc("The metric namespace name.") + /** + * The metric namespace name. + */ name?: string; } -@doc("Represents collection of metric definitions.") +/** + * Represents collection of metric definitions. + */ model MetricDefinitionCollection { - @doc("the values for the metric definitions.") + /** + * the values for the metric definitions. + */ value: MetricDefinition[]; } -@doc("Metric definition") +/** + * Metric definition + */ model MetricDefinition { - @doc("List of dimensions") + /** + * List of dimensions + */ dimensions?: NameAndDesc[]; - @doc("The metric description") + /** + * The metric description + */ description?: string; - @doc("The metric name") + /** + * The metric name + */ name?: string; - @doc("The namespace the metric belongs to.") + /** + * The namespace the metric belongs to. + */ `namespace`?: string; - @doc("The primary aggregation type value defining how to use the values for display.") + /** + * The primary aggregation type value defining how to use the values for display. + */ primaryAggregationType?: AggregationType; - @doc("The collection of what all aggregation types are supported.") + /** + * The collection of what all aggregation types are supported. + */ supportedAggregationTypes?: string[]; - @doc("The unit of the metric.") + /** + * The unit of the metric. + */ unit?: MetricUnit; - @doc(""" -Metric availability specifies the time grain (aggregation interval or -frequency). -""") + /** + * Metric availability specifies the time grain (aggregation interval or + * frequency). + */ metricAvailabilities?: MetricAvailability[]; } -@doc("The name and description") +/** + * The name and description + */ model NameAndDesc { - @doc("The description") + /** + * The description + */ description?: string; - @doc("The name") + /** + * The name + */ name?: string; } -@doc("Metric availability specifies the time grain (aggregation interval or frequency)") +/** + * Metric availability specifies the time grain (aggregation interval or frequency) + */ model MetricAvailability { - @doc(""" -The time grain specifies the aggregation interval for the metric. Expressed as -a duration 'PT1M', 'PT1H', etc. -""") + /** + * The time grain specifies the aggregation interval for the metric. Expressed as + * a duration 'PT1M', 'PT1H', etc. + */ timeGrain?: TimeGrain; } -@doc("Filters to fetch the set of metric") +/** + * Filters to fetch the set of metric + */ model MetricRequestPayload { - @doc(""" -Get metrics for specific dimension values. Example: Metric contains dimension -like SamplerName, Error. To retrieve all the time series data where SamplerName -is equals to HTTPRequest1 or HTTPRequest2, the DimensionFilter value will be -{\"SamplerName\", [\"HTTPRequest1\", \"HTTPRequest2\"} -""") + /** + * Get metrics for specific dimension values. Example: Metric contains dimension + * like SamplerName, Error. To retrieve all the time series data where SamplerName + * is equals to HTTPRequest1 or HTTPRequest2, the DimensionFilter value will be + * {"SamplerName", ["HTTPRequest1", "HTTPRequest2"} + */ filters?: DimensionFilter[]; } -@doc("Dimension name and values to filter") +/** + * Dimension name and values to filter + */ model DimensionFilter { - @doc("The dimension name") + /** + * The dimension name + */ name?: string; - @doc("The dimension values. Maximum values can be 20.") + /** + * The dimension values. Maximum values can be 20. + */ values?: string[]; } -@doc("The response to a metrics query.") +/** + * The response to a metrics query. + */ model Metrics is Azure.Core.Page; -@doc("The time series returned when a data query is performed.") +/** + * The time series returned when a data query is performed. + */ model TimeSeriesElement { - @doc("An array of data points representing the metric values.") + /** + * An array of data points representing the metric values. + */ data?: MetricValue[]; - @doc("The dimension values ") + /** + * The dimension values + */ dimensionValues?: DimensionValue[]; } -@doc("Represents a metric value.") +/** + * Represents a metric value. + */ model MetricValue { - @doc("The timestamp for the metric value in ISO 8601 format.") + /** + * The timestamp for the metric value in ISO 8601 format. + */ timestamp?: string; - @doc("The metric value.") - value?: float32; + /** + * The metric value. + */ + value?: float64; } -@doc("Represents a metric dimension value.") +/** + * Represents a metric dimension value. + */ model DimensionValue { - @doc("The name of the dimension.") + /** + * The name of the dimension. + */ name?: string; - @doc("The value of the dimension.") + /** + * The value of the dimension. + */ value?: string; } -@doc("Metrics dimension values.") +/** + * Metrics dimension values. + */ model DimensionValueList is Azure.Core.Page; -@doc("Test run app component") +/** + * Test run app component + */ model TestRunAppComponents { - @doc(""" -Azure resource collection { resource id (fully qualified resource Id e.g -subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) -: resource object } -""") + /** + * Azure resource collection { resource id (fully qualified resource Id e.g + * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) + * : resource object } + */ components: Record; - @doc("Test run identifier") + /** + * Test run identifier + */ @visibility("read") testRunId?: string; - @doc("The creation datetime(ISO 8601 literal format).") + /** + * The creation datetime(ISO 8601 literal format). + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDateTime?: utcDateTime; - @doc("The user that created.") + /** + * The user that created. + */ @visibility("read") createdBy?: string; - @doc("The last Modified datetime(ISO 8601 literal format).") + /** + * The last Modified datetime(ISO 8601 literal format). + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedDateTime?: utcDateTime; - @doc("The user that last modified.") + /** + * The user that last modified. + */ @visibility("read") lastModifiedBy?: string; } -@doc("Test run server metrics configuration") +/** + * Test run server metrics configuration + */ model TestRunServerMetricConfig { - @doc("Test run identifier") + /** + * Test run identifier + */ @visibility("read") testRunId?: string; - @doc(""" -Azure resource metrics collection {metric id : metrics object} (Refer : -https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition -for metric id). -""") + /** + * Azure resource metrics collection {metric id : metrics object} (Refer : + * https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition + * for metric id). + */ metrics?: Record; - @doc("The creation datetime(ISO 8601 literal format).") + /** + * The creation datetime(ISO 8601 literal format). + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDateTime?: utcDateTime; - @doc("The user that created.") + /** + * The user that created. + */ @visibility("read") createdBy?: string; - @doc("The last Modified datetime(ISO 8601 literal format).") + /** + * The last Modified datetime(ISO 8601 literal format). + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedDateTime?: utcDateTime; - @doc("The user that last modified.") + /** + * The user that last modified. + */ @visibility("read") lastModifiedBy?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/routes.tsp index bb37c2137e..60d6e49145 100644 --- a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/routes.tsp @@ -8,39 +8,45 @@ using TypeSpec.Http; namespace Azure.LoadTesting; interface LoadTestAdministrationOperations { + /** + * Create a new test or update an existing test. + */ @summary("Create a new test or update an existing test.") - @doc("Create a new test or update an existing test.") @route("/tests/{testId}") @patch - CreateOrUpdateTest is Azure.Core.Foundations.Operation< + createOrUpdateTest is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @path testId: string; - @doc("Load test model") + /** + * Load test model + */ @body body: Test; }, Test >; + /** + * Delete a test by its name. + */ @summary("Delete a test by its name.") - @doc("Delete a test by its name.") @route("/tests/{testId}") @delete - DeleteTest is Azure.Core.Foundations.Operation< + deleteTest is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @@ -50,16 +56,18 @@ numeric, underscore or hyphen characters. void >; + /** + * Get load test details by test name + */ @summary("Get load test details by test name") - @doc("Get load test details by test name") @route("/tests/{testId}") @get - GetTest is Azure.Core.Foundations.Operation< + getTest is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @@ -69,149 +77,167 @@ numeric, underscore or hyphen characters. Test >; + /** + * Get all load tests by the fully qualified resource Id e.g + * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. + */ @summary(""" Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. -""") - @doc(""" -Get all load tests by the fully qualified resource Id e.g -subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. """) @route("/tests") @get - ListTests is Azure.Core.Foundations.Operation< + listTests is Azure.Core.Foundations.Operation< { - @doc(""" -Sort on the supported fields in (field asc/desc) format. eg: -lastModifiedDateTime asc. Supported fields - lastModifiedDateTime -""") + /** + * Sort on the supported fields in (field asc/desc) format. eg: + * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime + */ @query("orderby") orderby?: string; - @doc(""" -Prefix based, case sensitive search on searchable fields - displayName, -createdBy. For example, to search for a test, with display name is Login Test, -the search parameter can be Login. -""") + /** + * Prefix based, case sensitive search on searchable fields - displayName, + * createdBy. For example, to search for a test, with display name is Login Test, + * the search parameter can be Login. + */ @query("search") search?: string; - @doc(""" -Start DateTime(ISO 8601 literal format) of the last updated time range to -filter tests. -""") + /** + * Start DateTime(ISO 8601 literal format) of the last updated time range to + * filter tests. + */ @query("lastModifiedStartTime") lastModifiedStartTime?: utcDateTime; - @doc(""" -End DateTime(ISO 8601 literal format) of the last updated time range to filter -tests. -""") + /** + * End DateTime(ISO 8601 literal format) of the last updated time range to filter + * tests. + */ @query("lastModifiedEndTime") lastModifiedEndTime?: utcDateTime; - @doc("Number of results in response.") + /** + * Number of results in response. + */ @query("maxpagesize") maxpagesize?: int32 = 50; }, TestsList >; + /** + * Upload input file for a given test name. File size can't be more than 50 MB. + * Existing file with same name for the given test will be overwritten. File + * should be provided in the request body as application/octet-stream. + */ @summary(""" Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as application/octet-stream. -""") - @doc(""" -Upload input file for a given test name. File size can't be more than 50 MB. -Existing file with same name for the given test will be overwritten. File -should be provided in the request body as application/octet-stream. """) @route("/tests/{testId}/files/{fileName}") @put - UploadTestFile is Azure.Core.Foundations.Operation< + uploadTestFile is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @path testId: string; - @doc("Unique name for test file with file extension like : App.jmx") + /** + * Unique name for test file with file extension like : App.jmx + */ @path fileName: string; - @doc("File type") + /** + * File type + */ @query("fileType") fileType?: FileType; - @doc("The file content as application/octet-stream.") + /** + * The file content as application/octet-stream. + */ @body body: bytes; }, FileInfo >; + /** + * Get test file by the file name. + */ @summary("Get test file by the file name.") - @doc("Get test file by the file name.") @route("/tests/{testId}/files/{fileName}") @get - GetTestFile is Azure.Core.Foundations.Operation< + getTestFile is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @path testId: string; - @doc("File name with file extension like app.jmx") + /** + * File name with file extension like app.jmx + */ @path fileName: string; }, FileInfo >; + /** + * Delete file by the file name for a test + */ @summary("Delete file by the file name for a test") - @doc("Delete file by the file name for a test") @route("/tests/{testId}/files/{fileName}") @delete - DeleteTestFile is Azure.Core.Foundations.Operation< + deleteTestFile is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @path testId: string; - @doc("File name with file extension like app.jmx") + /** + * File name with file extension like app.jmx + */ @path fileName: string; }, void >; + /** + * Get all test files. + */ @summary("Get all test files.") - @doc("Get all test files.") @route("/tests/{testId}/files") @get - ListTestFiles is Azure.Core.Foundations.Operation< + listTestFiles is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @@ -221,39 +247,45 @@ numeric, underscore or hyphen characters. FileInfoList >; + /** + * Associate an app component (collection of azure resources) to a test + */ @summary("Associate an app component (collection of azure resources) to a test") - @doc("Associate an app component (collection of azure resources) to a test") @route("/tests/{testId}/app-components") @patch - CreateOrUpdateAppComponents is Azure.Core.Foundations.Operation< + createOrUpdateAppComponents is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @path testId: string; - @doc("App Component model.") + /** + * App Component model. + */ @body body: TestAppComponents; }, TestAppComponents >; + /** + * Get associated app component (collection of azure resources) for the given test. + */ @summary("Get associated app component (collection of azure resources) for the given test.") - @doc("Get associated app component (collection of azure resources) for the given test.") @route("/tests/{testId}/app-components") @get - GetAppComponents is Azure.Core.Foundations.Operation< + getAppComponents is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @@ -263,39 +295,45 @@ numeric, underscore or hyphen characters. TestAppComponents >; + /** + * Configure server metrics for a test + */ @summary("Configure server metrics for a test") - @doc("Configure server metrics for a test") @route("/tests/{testId}/server-metrics-config") @patch - CreateOrUpdateServerMetricsConfig is Azure.Core.Foundations.Operation< + createOrUpdateServerMetricsConfig is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @path testId: string; - @doc("Server metric configuration model.") + /** + * Server metric configuration model. + */ @body body: TestServerMetricConfig; }, TestServerMetricConfig >; + /** + * List server metrics configuration for the given test. + */ @summary("List server metrics configuration for the given test.") - @doc("List server metrics configuration for the given test.") @route("/tests/{testId}/server-metrics-config") @get - GetServerMetricsConfig is Azure.Core.Foundations.Operation< + getServerMetricsConfig is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @@ -307,48 +345,54 @@ numeric, underscore or hyphen characters. } interface LoadTestRunOperations { + /** + * Create and start a new test run with the given name. + */ @summary("Create and start a new test run with the given name.") - @doc("Create and start a new test run with the given name.") @route("/test-runs/{testRunId}") @patch - CreateOrUpdateTestRun is Azure.Core.Foundations.Operation< + createOrUpdateTestRun is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test run, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @path testRunId: string; - @doc(""" -Existing test run identifier that should be rerun, if this is provided, the -test will run with the JMX file, configuration and app components from the -existing test run. You can override the configuration values for new test run -in the request body. -""") + /** + * Existing test run identifier that should be rerun, if this is provided, the + * test will run with the JMX file, configuration and app components from the + * existing test run. You can override the configuration values for new test run + * in the request body. + */ @query("oldTestRunId") oldTestRunId?: string; - @doc("Load test run model") + /** + * Load test run model + */ @body body: TestRun; }, TestRun >; + /** + * Get test run details by name. + */ @summary("Get test run details by name.") - @doc("Get test run details by name.") @route("/test-runs/{testRunId}") @get - GetTestRun is Azure.Core.Foundations.Operation< + getTestRun is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test run, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @@ -358,16 +402,18 @@ numeric, underscore or hyphen characters. TestRun >; + /** + * Delete a test run by its name. + */ @summary("Delete a test run by its name.") - @doc("Delete a test run by its name.") @route("/test-runs/{testRunId}") @delete - DeleteTestRun is Azure.Core.Foundations.Operation< + deleteTestRun is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test run, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @@ -377,83 +423,101 @@ numeric, underscore or hyphen characters. void >; + /** + * Get test run file by file name. + */ @summary("Get test run file by file name.") - @doc("Get test run file by file name.") @route("/test-runs/{testRunId}/files/{fileName}") @get - GetTestRunFile is Azure.Core.Foundations.Operation< + getTestRunFile is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test run, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @path testRunId: string; - @doc("Test run file name with file extension") + /** + * Test run file name with file extension + */ @path fileName: string; }, FileInfo >; + /** + * Get all test runs with given filters + */ @summary("Get all test runs with given filters") - @doc("Get all test runs with given filters") @route("/test-runs") @get - ListTestRuns is Azure.Core.Foundations.Operation< + listTestRuns is Azure.Core.Foundations.Operation< { - @doc(""" -Sort on the supported fields in (field asc/desc) format. eg: executedDateTime -asc. Supported fields - executedDateTime -""") + /** + * Sort on the supported fields in (field asc/desc) format. eg: executedDateTime + * asc. Supported fields - executedDateTime + */ @query("orderby") orderby?: string; - @doc(""" -Prefix based, case sensitive search on searchable fields - description, -executedUser. For example, to search for a test run, with description 500 VUs, -the search parameter can be 500. -""") + /** + * Prefix based, case sensitive search on searchable fields - description, + * executedUser. For example, to search for a test run, with description 500 VUs, + * the search parameter can be 500. + */ @query("search") search?: string; - @doc("Unique name of an existing load test.") + /** + * Unique name of an existing load test. + */ @query("testId") testId?: string; - @doc("Start DateTime(ISO 8601 literal format) of test-run execution time filter range.") + /** + * Start DateTime(ISO 8601 literal format) of test-run execution time filter range. + */ @query("executionFrom") executionFrom?: utcDateTime; - @doc("End DateTime(ISO 8601 literal format) of test-run execution time filter range.") + /** + * End DateTime(ISO 8601 literal format) of test-run execution time filter range. + */ @query("executionTo") executionTo?: utcDateTime; - @doc("Comma separated list of test run status.") + /** + * Comma separated list of test run status. + */ @query("status") status?: string; - @doc("Number of results in response.") + /** + * Number of results in response. + */ @query("maxpagesize") maxpagesize?: int32 = 50; }, TestRunsList >; + /** + * Stop test run by name. + */ @summary("Stop test run by name.") - @doc("Stop test run by name.") @route("/test-runs/{testRunId}:stop") @post - StopTestRun is Azure.Core.Foundations.Operation< + stopTestRun is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test run, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @@ -463,16 +527,18 @@ numeric, underscore or hyphen characters. TestRun >; + /** + * List the metric namespaces for a load test run. + */ @summary("List the metric namespaces for a load test run.") - @doc("List the metric namespaces for a load test run.") @route("/test-runs/{testRunId}/metric-namespaces") @get - ListMetricNamespaces is Azure.Core.Foundations.Operation< + listMetricNamespaces is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test run, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @@ -482,142 +548,170 @@ numeric, underscore or hyphen characters. MetricNamespaceCollection >; + /** + * List the metric definitions for a load test run. + */ @summary("List the metric definitions for a load test run.") - @doc("List the metric definitions for a load test run.") @route("/test-runs/{testRunId}/metric-definitions") @get - ListMetricDefinitions is Azure.Core.Foundations.Operation< + listMetricDefinitions is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test run, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @path testRunId: string; - @doc("Metric namespace to query metric definitions for.") + /** + * Metric namespace to query metric definitions for. + */ @query("metricNamespace") metricNamespace: string; }, MetricDefinitionCollection >; + /** + * List the metric values for a load test run. + */ @summary("List the metric values for a load test run.") - @doc("List the metric values for a load test run.") @route("/test-runs/{testRunId}/metrics") @post - ListMetrics is Azure.Core.Foundations.Operation< + listMetrics is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test run, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @path testRunId: string; - @doc("The aggregation") + /** + * The aggregation + */ @query("aggregation") aggregation?: string; - @doc("The interval (i.e. timegrain) of the query.") + /** + * The interval (i.e. timegrain) of the query. + */ @query("interval") interval?: Interval; - @doc("Metric name") + /** + * Metric name + */ @query("metricname") metricname: string; - @doc("Metric namespace to query metric definitions for.") + /** + * Metric namespace to query metric definitions for. + */ @query("metricNamespace") metricNamespace: string; - @doc(""" -The timespan of the query. It is a string with the following format -'startDateTime_ISO/endDateTime_ISO'. -""") + /** + * The timespan of the query. It is a string with the following format + * 'startDateTime_ISO/endDateTime_ISO'. + */ @query("timespan") timespan: string; - @doc("Metric dimension filter ") + /** + * Metric dimension filter + */ @body body?: MetricRequestPayload; }, Metrics >; + /** + * List the dimension values for the given metric dimension name. + */ @summary("List the dimension values for the given metric dimension name.") - @doc("List the dimension values for the given metric dimension name.") - ListMetricDimensionValues is Azure.Core.ResourceList< + listMetricDimensionValues is Azure.Core.ResourceList< string, { parameters: { - @doc("The interval (i.e. timegrain) of the query.") + /** + * The interval (i.e. timegrain) of the query. + */ @query("interval") interval?: Interval; - @doc("Metric name") + /** + * Metric name + */ @query("metricname") metricname: string; - @doc("Metric namespace to query metric definitions for.") + /** + * Metric namespace to query metric definitions for. + */ @query("metricNamespace") metricNamespace: string; - @doc(""" -The timespan of the query. It is a string with the following format -'startDateTime_ISO/endDateTime_ISO'. -""") + /** + * The timespan of the query. It is a string with the following format + * 'startDateTime_ISO/endDateTime_ISO'. + */ @query("timespan") timespan: string; }; } >; + /** + * Associate an app component (collection of azure resources) to a test run + */ @summary("Associate an app component (collection of azure resources) to a test run") - @doc("Associate an app component (collection of azure resources) to a test run") @route("/test-runs/{testRunId}/app-components") @patch - CreateOrUpdateAppComponents is Azure.Core.Foundations.Operation< + createOrUpdateAppComponents is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test run, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @path testRunId: string; - @doc("App Component model.") + /** + * App Component model. + */ @body body: TestRunAppComponents; }, TestRunAppComponents >; + /** + * Get associated app component (collection of azure resources) for the given test + * run. + */ @summary(""" Get associated app component (collection of azure resources) for the given test run. -""") - @doc(""" -Get associated app component (collection of azure resources) for the given test -run. """) @route("/test-runs/{testRunId}/app-components") @get - GetAppComponents is Azure.Core.Foundations.Operation< + getAppComponents is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test run, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @@ -627,39 +721,45 @@ numeric, underscore or hyphen characters. TestRunAppComponents >; + /** + * Configure server metrics for a test run + */ @summary("Configure server metrics for a test run") - @doc("Configure server metrics for a test run") @route("/test-runs/{testRunId}/server-metrics-config") @patch - CreateOrUpdateServerMetricsConfig is Azure.Core.Foundations.Operation< + createOrUpdateServerMetricsConfig is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test run, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") @path testRunId: string; - @doc("Server metric configuration model.") + /** + * Server metric configuration model. + */ @body body: TestRunServerMetricConfig; }, TestRunServerMetricConfig >; + /** + * List server metrics configuration for the given test run. + */ @summary("List server metrics configuration for the given test run.") - @doc("List server metrics configuration for the given test run.") @route("/test-runs/{testRunId}/server-metrics-config") @get - GetServerMetricsConfig is Azure.Core.Foundations.Operation< + getServerMetricsConfig is Azure.Core.Foundations.Operation< { - @doc(""" -Unique name for the load test run, must contain only lower-case alphabetic, -numeric, underscore or hyphen characters. -""") + /** + * Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + */ @maxLength(50) @minLength(2) @pattern("^[a-z0-9_-]*$") diff --git a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp index 0aa97bc4cb..f8e0ea2989 100644 --- a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp @@ -4,6 +4,10 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +/** + * The Notification Hubs client performs operations to register and query devices, + * and send notifications + */ @service({ title: "NotificationHubsClient", }) @@ -15,14 +19,14 @@ using TypeSpec.Http; namespaceBaseUrl: string, } ) -@doc(""" -The Notification Hubs client performs operations to register and query devices, -and send notifications -""") namespace NotificationHubsClient; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { - @doc("The 2020-06-01 API version.") + /** + * The 2020-06-01 API version. + */ v2020_06_01: "2020-06-01", } diff --git a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp index 987d254576..59e8c27c1a 100644 --- a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp @@ -35,7 +35,9 @@ enum RegistrationEntryModelXmlnsM { `http://schemas.microsoft.com/ado/2007/08/dataservices/metadata`, } -@doc("PNS Platform for the installation") +/** + * PNS Platform for the installation + */ enum PlatformType { apns, wns, @@ -101,12 +103,19 @@ enum ApiVersionType { `2020-06`, } -@doc("Content type for upload") +/** + * Content type for upload + */ @fixed enum ContentType { - @doc("Content Type 'application/json;charset=utf-8'") + /** + * Content Type 'application/json;charset=utf-8' + */ `application/json;charset=utf-8`, - @doc("Content Type 'application/xml;charset=utf-8'") + + /** + * Content Type 'application/xml;charset=utf-8' + */ `application/xml;charset=utf-8`, } @@ -193,73 +202,101 @@ model RegistrationEntryModel { @resource("{hubName}/installations/{installationId}") model InstallationModel { - @doc("Installation Unique Identifier") + /** + * Installation Unique Identifier + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key installationId: string; - @doc("The user ID for the installation") + /** + * The user ID for the installation + */ userId?: string; - @doc("The date when the installation was made inactivate by the PNS.") + /** + * The date when the installation was made inactivate by the PNS. + */ @visibility("read") lastActiveOn?: string; - @doc("Date in W3C format of last update to this installation.") + /** + * Date in W3C format of last update to this installation. + */ @visibility("read") lastUpdate?: string; - @doc("PNS Platform for the installation") + /** + * PNS Platform for the installation + */ platform: PlatformType; - @doc("The unique device handle for the PNS.") + /** + * The unique device handle for the PNS. + */ pushChannel: string; - @doc("This is true if the PNS expired the channel.") + /** + * This is true if the PNS expired the channel. + */ @visibility("read") expiredPushChannel?: boolean; - @doc("The tags for the installation for targeting") + /** + * The tags for the installation for targeting + */ tags?: string[]; - @doc("Set of named templates associated with the installation.") + /** + * Set of named templates associated with the installation. + */ templates?: Record; - @doc(""" -Set of secondary tiles associated with the installation. Applies only to the -'wns' platform. -""") + /** + * Set of secondary tiles associated with the installation. Applies only to the + * 'wns' platform. + */ secondaryTiles?: Record; } model InstallationTemplateModel { - @doc("Template for the body of the notification.") + /** + * Template for the body of the notification. + */ body: string; - @doc(""" -Set of named headers associated with the template. Header values can contain -template parameters. -""") + /** + * Set of named headers associated with the template. Header values can contain + * template parameters. + */ headers?: Record; - @doc("Template expression evaluating in W3D date format.") + /** + * Template expression evaluating in W3D date format. + */ expiry?: string; - @doc("The tags for the installation for targeting") + /** + * The tags for the installation for targeting + */ tags?: string[]; } model InstallationSecondaryTileModel { - @doc("ChannelUri for the secondary tile. Applies only to the 'wns' platform.") + /** + * ChannelUri for the secondary tile. Applies only to the 'wns' platform. + */ pushChannel: string; - @doc("The tags for the installation for targeting") + /** + * The tags for the installation for targeting + */ tags?: string[]; - @doc(""" -Set of named templates associated with the secondary tile. Applies only to the -'wns' platform. -""") + /** + * Set of named templates associated with the secondary tile. Applies only to the + * 'wns' platform. + */ templates?: Record; } diff --git a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/routes.tsp index 707ebe33a8..2d6c18cad3 100644 --- a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/routes.tsp @@ -7,520 +7,734 @@ using TypeSpec.Http; namespace NotificationHubsClient; -@doc("Deletes a notification hub.") +/** + * Deletes a notification hub. + */ @route("/{hubName}") @delete -op DeleteNotificationHub is Azure.Core.Foundations.Operation< +op deleteNotificationHub is Azure.Core.Foundations.Operation< { - @doc("Notification Hub Name") + /** + * Notification Hub Name + */ @path hubName: string; - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; }, void >; -@doc("Retrieves information about a notification hub.") +/** + * Retrieves information about a notification hub. + */ @route("/{hubName}") @get -op GetNotificationHub is Azure.Core.Foundations.Operation< +op getNotificationHub is Azure.Core.Foundations.Operation< { - @doc("Notification Hub Name") + /** + * Notification Hub Name + */ @path hubName: string; - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/atom+xml;type=entry;charset=utf-8"; }, NotificationHubEntryModel | void >; -@doc("Create or update a notification hub.") +/** + * Create or update a notification hub. + */ @route("/{hubName}") @put -op CreateOrUpdateNotificationHub is Azure.Core.Foundations.Operation< +op createOrUpdateNotificationHub is Azure.Core.Foundations.Operation< { - @doc("Notification Hub Name") + /** + * Notification Hub Name + */ @path hubName: string; - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; - @doc("ETag as returned by creation, update, and retrieval, or * (overwrite).") + /** + * ETag as returned by creation, update, and retrieval, or * (overwrite). + */ @header `If-Match`?: string; @body body: NotificationHubEntryModel; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/atom+xml;type=entry;charset=utf-8"; }, NotificationHubEntryModel | void >; -@doc("Retrieves all registrations with a specific tag.") +/** + * Retrieves all registrations with a specific tag. + */ @route("/{hubName}/tags/{tag}/registrations") @get -op GetRegistrationsByTag is Azure.Core.Foundations.Operation< +op getRegistrationsByTag is Azure.Core.Foundations.Operation< { - @doc("Notification Hub Name") + /** + * Notification Hub Name + */ @path hubName: string; - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; - @doc("The path for the tag to query") + /** + * The path for the tag to query + */ @path tag: string; - @doc(""" -Contains the token to continue the enumeration of registrations, in case there -are more. -""") + /** + * Contains the token to continue the enumeration of registrations, in case there + * are more. + */ @query("ContinuationToken") ContinuationToken?: string; - @doc("OData top parameter") + /** + * OData top parameter + */ @query("$top") $top?: string; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/atom+xml;type=entry;charset=utf-8"; }, void >; -@doc("Create a registration ID") +/** + * Create a registration ID + */ @route("/{hubName}/registrationIDs") @post -op CreateRegistrationId is Azure.Core.Foundations.Operation< +op createRegistrationId is Azure.Core.Foundations.Operation< { - @doc("Notification Hub Name") + /** + * Notification Hub Name + */ @path hubName: string; - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; }, void >; -@doc("Get registrations by the specified criteria") +/** + * Get registrations by the specified criteria + */ @route("/{hubName}/registrations") @get -op GetRegistrations is Azure.Core.Foundations.Operation< +op getRegistrations is Azure.Core.Foundations.Operation< { - @doc("Notification Hub Name") + /** + * Notification Hub Name + */ @path hubName: string; - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; - @doc(""" -Contains the token to continue the enumeration of registrations, in case there -are more. -""") + /** + * Contains the token to continue the enumeration of registrations, in case there + * are more. + */ @query("ContinuationToken") ContinuationToken?: string; - @doc("OData filter parameter") + /** + * OData filter parameter + */ @query("$filter") $filter?: string; - @doc("OData top parameter") + /** + * OData top parameter + */ @query("$top") $top?: string; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/atom+xml;type=entry;charset=utf-8"; }, void >; -@doc("Creates a registration") +/** + * Creates a registration + */ @route("/{hubName}/registrations") @post -op CreateRegistration is Azure.Core.Foundations.Operation< +op createRegistration is Azure.Core.Foundations.Operation< { - @doc("Notification Hub Name") + /** + * Notification Hub Name + */ @path hubName: string; - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/atom+xml;type=entry;charset=utf-8"; }, RegistrationEntryModel | void >; -@doc("Deletes a registration") +/** + * Deletes a registration + */ @route("/{hubName}/registrations/{registrationId}") @delete -op DeleteRegistration is Azure.Core.Foundations.Operation< +op deleteRegistration is Azure.Core.Foundations.Operation< { - @doc("Notification Hub Name") + /** + * Notification Hub Name + */ @path hubName: string; - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Registration ID parameter") + /** + * Registration ID parameter + */ @path registrationId: string; - @doc("ETag as returned by creation, update, and retrieval, or * (overwrite).") + /** + * ETag as returned by creation, update, and retrieval, or * (overwrite). + */ @header `If-Match`?: string; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; }, void >; -@doc("Get a registration by registration ID") +/** + * Get a registration by registration ID + */ @route("/{hubName}/registrations/{registrationId}") @get -op GetRegistration is Azure.Core.Foundations.Operation< +op getRegistration is Azure.Core.Foundations.Operation< { - @doc("Notification Hub Name") + /** + * Notification Hub Name + */ @path hubName: string; - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Registration ID parameter") + /** + * Registration ID parameter + */ @path registrationId: string; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/atom+xml;type=entry;charset=utf-8"; }, RegistrationEntryModel | void >; -@doc("Create or update a registration") +/** + * Create or update a registration + */ @route("/{hubName}/registrations/{registrationId}") @put -op CreateOrUpdateRegistration is Azure.Core.Foundations.Operation< +op createOrUpdateRegistration is Azure.Core.Foundations.Operation< { - @doc("Notification Hub Name") + /** + * Notification Hub Name + */ @path hubName: string; - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Registration ID parameter") + /** + * Registration ID parameter + */ @path registrationId: string; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; @body body: RegistrationEntryModel; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/atom+xml;type=entry;charset=utf-8"; }, RegistrationEntryModel | void >; +/** + * Delete an installation by ID + */ @summary("Delete Installation") -@doc("Delete an installation by ID") @route("/{hubName}/installations/{installationId}") @delete -op DeleteInstallation is Azure.Core.Foundations.Operation< +op deleteInstallation is Azure.Core.Foundations.Operation< { - @doc("Notification Hub Name") + /** + * Notification Hub Name + */ @path hubName: string; - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Installation ID parameter") + /** + * Installation ID parameter + */ @path installationId: string; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; }, void >; -@doc("Get an Installation by Installation ID") -op GetInstallation is Azure.Core.ResourceRead< +/** + * Get an Installation by Installation ID + */ +op getInstallation is Azure.Core.ResourceRead< InstallationModel, { parameters: { - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; }; } >; -@doc(""" -Azure Notification Hubs supports partial updates to an installation using the -JSON-Patch standard in [RFC6902](https://tools.ietf.org/html/rfc6902). -""") -op PatchInstallation is Azure.Core.ResourceCreateOrUpdate< +/** + * Azure Notification Hubs supports partial updates to an installation using the + * JSON-Patch standard in [RFC6902](https://tools.ietf.org/html/rfc6902). + */ +op patchInstallation is Azure.Core.ResourceCreateOrUpdate< InstallationModel, { parameters: { - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; }; } >; -@doc("Creates or overwrites an installation.") -op CreateOrUpdateInstallation is Azure.Core.ResourceCreateOrReplace< +/** + * Creates or overwrites an installation. + */ +op createOrUpdateInstallation is Azure.Core.ResourceCreateOrReplace< InstallationModel, { parameters: { - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; }; } >; -@doc("Sends a notification to the specified targets.") +/** + * Sends a notification to the specified targets. + */ @route("/{hubName}/messages") @post -op SendMessage is Azure.Core.Foundations.Operation< +op sendMessage is Azure.Core.Foundations.Operation< { - @doc("Notification Hub Name") + /** + * Notification Hub Name + */ @path hubName: string; - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; - @doc("Device handle for the PNS") + /** + * Device handle for the PNS + */ @header `ServiceBusNotification-DeviceHandle`?: string; - @doc("Platform type for the notification") + /** + * Platform type for the notification + */ @header `ServiceBusNotification-Format`: FormatParameterType; - @doc("Notification message tags for targeting") + /** + * Notification message tags for targeting + */ @header `ServiceBusNotification-Tags`?: string; - @doc("Direct Send") + /** + * Direct Send + */ @query("direct") direct?: boolean; - @doc("The apns-topic header") + /** + * The apns-topic header + */ @header `apns-topic`?: string; - @doc("The apns-priority header") + /** + * The apns-priority header + */ @header `apns-priority`?: string; - @doc("The apns-push-type header") + /** + * The apns-push-type header + */ @header `apns-push-type`?: string; - @doc(" X-WNS-Cache-Policy header parameter") + /** + * X-WNS-Cache-Policy header parameter + */ @header `X-WNS-Cache-Policy`?: string; - @doc("X-WNS-PRIORITY header parameter") + /** + * X-WNS-PRIORITY header parameter + */ @header `X-WNS-PRIORITY`?: string; - @doc("X-WNS-RequestForStatus header parameter") + /** + * X-WNS-RequestForStatus header parameter + */ @header `X-WNS-RequestForStatus`?: string; - @doc("X-WNS-Tag header parameter") + /** + * X-WNS-Tag header parameter + */ @header `X-WNS-Tag`?: string; - @doc("X-WNS-TTL header parameter") + /** + * X-WNS-TTL header parameter + */ @header `X-WNS-TTL`?: string; - @doc("X-WNS-Type header parameter") + /** + * X-WNS-Type header parameter + */ @header `X-WNS-Type`?: string; - @doc("Upload file type") + /** + * Upload file type + */ @header `content-type`: ContentType; - @doc("The notification message body") + /** + * The notification message body + */ @body body: string; }, void >; -@doc("Sends a notification to the specified targets.") +/** + * Sends a notification to the specified targets. + */ @route("/{hubName}/messages") @post -op SendMessage is Azure.Core.Foundations.Operation< +op sendMessage is Azure.Core.Foundations.Operation< { - @doc("Notification Hub Name") + /** + * Notification Hub Name + */ @path hubName: string; - @doc("API Version") + /** + * API Version + */ @header `x-ms-version`: MSApiVersionType; - @doc("Authorization Header value") + /** + * Authorization Header value + */ @header Authorization: string; - @doc("Device handle for the PNS") + /** + * Device handle for the PNS + */ @header `ServiceBusNotification-DeviceHandle`?: string; - @doc("Platform type for the notification") + /** + * Platform type for the notification + */ @header `ServiceBusNotification-Format`: FormatParameterType; - @doc("Notification message tags for targeting") + /** + * Notification message tags for targeting + */ @header `ServiceBusNotification-Tags`?: string; - @doc("Direct Send") + /** + * Direct Send + */ @query("direct") direct?: boolean; - @doc("The apns-topic header") + /** + * The apns-topic header + */ @header `apns-topic`?: string; - @doc("The apns-priority header") + /** + * The apns-priority header + */ @header `apns-priority`?: string; - @doc("The apns-push-type header") + /** + * The apns-push-type header + */ @header `apns-push-type`?: string; - @doc(" X-WNS-Cache-Policy header parameter") + /** + * X-WNS-Cache-Policy header parameter + */ @header `X-WNS-Cache-Policy`?: string; - @doc("X-WNS-PRIORITY header parameter") + /** + * X-WNS-PRIORITY header parameter + */ @header `X-WNS-PRIORITY`?: string; - @doc("X-WNS-RequestForStatus header parameter") + /** + * X-WNS-RequestForStatus header parameter + */ @header `X-WNS-RequestForStatus`?: string; - @doc("X-WNS-Tag header parameter") + /** + * X-WNS-Tag header parameter + */ @header `X-WNS-Tag`?: string; - @doc("X-WNS-TTL header parameter") + /** + * X-WNS-TTL header parameter + */ @header `X-WNS-TTL`?: string; - @doc("X-WNS-Type header parameter") + /** + * X-WNS-Type header parameter + */ @header `X-WNS-Type`?: string; - @doc("Upload file type") + /** + * Upload file type + */ @header `content-type`: ContentType; - @doc("The notification message body") + /** + * The notification message body + */ @body body: string; }, diff --git a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp index ed3b6b8d22..5377d86ee3 100644 --- a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp @@ -4,6 +4,9 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +/** + * Azure OpenAI APIs for completions and search + */ @service({ title: "OpenAI", }) @@ -15,11 +18,14 @@ using TypeSpec.Http; endpoint: string, } ) -@doc("Azure OpenAI APIs for completions and search") namespace Azure.AI.OpenAI; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { - @doc("The 2022-06-01-preview API version.") + /** + * The 2022-06-01-preview API version. + */ v2022_06_01_preview: "2022-06-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp index 5967415342..c09d6345fb 100644 --- a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp @@ -7,137 +7,149 @@ using TypeSpec.Http; namespace Azure.AI.OpenAI; model Paths1Vtxb06DeploymentsDeploymentIdCompletionsPostRequestbodyContentApplicationJsonSchema { - @doc(""" -An optional prompt to complete from, encoded as a string, a list of strings, or -a list of token lists. Defaults to <|endoftext|>. The prompt to complete from. -If you would like to provide multiple prompts, use the POST variant of this -method. Note that <|endoftext|> is the document separator that the model sees -during training, so if a prompt is not specified the model will generate as if -from the beginning of a new document. Maximum allowed size of string list is -2048. -""") + /** + * An optional prompt to complete from, encoded as a string, a list of strings, or + * a list of token lists. Defaults to <|endoftext|>. The prompt to complete from. + * If you would like to provide multiple prompts, use the POST variant of this + * method. Note that <|endoftext|> is the document separator that the model sees + * during training, so if a prompt is not specified the model will generate as if + * from the beginning of a new document. Maximum allowed size of string list is + * 2048. + */ prompt?: PostContentSchemaPrompt; - @doc("The maximum number of tokens to generate. Has minimum of 0.") + /** + * The maximum number of tokens to generate. Has minimum of 0. + */ @projectedName("json", "max_tokens") - maxTokens?: int32; + maxTokens?: int32 = 16; - @doc(""" -What sampling temperature to use. Higher values means the model will take more -risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones -with a well-defined answer. + /** +* What sampling temperature to use. Higher values means the model will take more +* risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones +* with a well-defined answer. We generally recommend using this or `top_p` but -not both. +* not both. Minimum of 0 and maximum of 2 allowed. -""") - temperature?: float32; +*/ + temperature?: float32 = 1; - @doc(""" -An alternative to sampling with temperature, called nucleus sampling, where the -model considers the results of the tokens with top_p probability mass. So 0.1 -means only the tokens comprising the top 10% probability mass are -considered. + /** +* An alternative to sampling with temperature, called nucleus sampling, where the +* model considers the results of the tokens with top_p probability mass. So 0.1 +* means only the tokens comprising the top 10% probability mass are +* considered. We generally recommend using this or `temperature` but not -both. +* both. Minimum of 0 and maximum of 1 allowed. -""") +*/ @projectedName("json", "top_p") - topP?: float32; - - @doc(""" -Defaults to null. Modify the likelihood of specified tokens appearing in the -completion. Accepts a json object that maps tokens (specified by their token ID -in the GPT tokenizer) to an associated bias value from -100 to 100. You can use -this tokenizer tool (which works for both GPT-2 and GPT-3) to convert text to -token IDs. Mathematically, the bias is added to the logits generated by the -model prior to sampling. The exact effect will vary per model, but values -between -1 and 1 should decrease or increase likelihood of selection; values -like -100 or 100 should result in a ban or exclusive selection of the relevant -token. As an example, you can pass {\"50256\" : -100} to prevent the -<|endoftext|> token from being generated. -""") + topP?: float32 = 1; + + /** + * Defaults to null. Modify the likelihood of specified tokens appearing in the + * completion. Accepts a json object that maps tokens (specified by their token ID + * in the GPT tokenizer) to an associated bias value from -100 to 100. You can use + * this tokenizer tool (which works for both GPT-2 and GPT-3) to convert text to + * token IDs. Mathematically, the bias is added to the logits generated by the + * model prior to sampling. The exact effect will vary per model, but values + * between -1 and 1 should decrease or increase likelihood of selection; values + * like -100 or 100 should result in a ban or exclusive selection of the relevant + * token. As an example, you can pass {"50256" : -100} to prevent the + * <|endoftext|> token from being generated. + */ @projectedName("json", "logit_bias") logitBias?: Record; - @doc("The ID of the end-user, for use in tracking and rate-limiting.") + /** + * The ID of the end-user, for use in tracking and rate-limiting. + */ user?: string; - @doc(""" -How many snippets to generate for each prompt. Minimum of 1 and maximum of 128 -allowed. -""") - n?: int32; + /** + * How many snippets to generate for each prompt. Minimum of 1 and maximum of 128 + * allowed. + */ + n?: int32 = 1; - @doc(""" -Whether to enable streaming for this endpoint. If set, tokens will be sent as -server-sent events as they become available. -""") + /** + * Whether to enable streaming for this endpoint. If set, tokens will be sent as + * server-sent events as they become available. + */ stream?: boolean; - @doc(""" -Include the log probabilities on the `logprobs` most likely tokens, as well the -chosen tokens. So for example, if `logprobs` is 10, the API will return a list -of the 10 most likely tokens. If `logprobs` is 0, only the chosen tokens will -have logprobs returned. Minimum of 0 and maximum of 100 allowed. -""") + /** + * Include the log probabilities on the `logprobs` most likely tokens, as well the + * chosen tokens. So for example, if `logprobs` is 10, the API will return a list + * of the 10 most likely tokens. If `logprobs` is 0, only the chosen tokens will + * have logprobs returned. Minimum of 0 and maximum of 100 allowed. + */ logprobs?: int32; - @doc("The name of the model to use") + /** + * The name of the model to use + */ `model`?: string; - @doc("Echo back the prompt in addition to the completion") + /** + * Echo back the prompt in addition to the completion + */ echo?: boolean; - @doc("A sequence which indicates the end of the current document.") + /** + * A sequence which indicates the end of the current document. + */ stop?: PostContentSchemaStop; @projectedName("json", "completion_config") completionConfig?: string; - @doc(""" -can be used to disable any server-side caching, 0=no cache, 1=prompt prefix -enabled, 2=full cache -""") + /** + * can be used to disable any server-side caching, 0=no cache, 1=prompt prefix + * enabled, 2=full cache + */ @projectedName("json", "cache_level") cacheLevel?: int32; - @doc(""" -How much to penalize new tokens based on their existing frequency in the text -so far. Decreases the model's likelihood to repeat the same line verbatim. Has -minimum of -2 and maximum of 2. -""") + /** + * How much to penalize new tokens based on their existing frequency in the text + * so far. Decreases the model's likelihood to repeat the same line verbatim. Has + * minimum of -2 and maximum of 2. + */ @projectedName("json", "presence_penalty") presencePenalty?: float32; - @doc(""" -How much to penalize new tokens based on whether they appear in the text so -far. Increases the model's likelihood to talk about new topics. -""") + /** + * How much to penalize new tokens based on whether they appear in the text so + * far. Increases the model's likelihood to talk about new topics. + */ @projectedName("json", "frequency_penalty") frequencyPenalty?: float32; - @doc(""" -How many generations to create server side, and display only the best. Will not -stream intermediate progress if best_of > 1. Has maximum value of 128. -""") + /** + * How many generations to create server side, and display only the best. Will not + * stream intermediate progress if best_of > 1. Has maximum value of 128. + */ @projectedName("json", "best_of") bestOf?: int32; } -@doc(""" -An optional prompt to complete from, encoded as a string, a list of strings, or -a list of token lists. Defaults to <|endoftext|>. The prompt to complete from. -If you would like to provide multiple prompts, use the POST variant of this -method. Note that <|endoftext|> is the document separator that the model sees -during training, so if a prompt is not specified the model will generate as if -from the beginning of a new document. Maximum allowed size of string list is -2048. -""") +/** + * An optional prompt to complete from, encoded as a string, a list of strings, or + * a list of token lists. Defaults to <|endoftext|>. The prompt to complete from. + * If you would like to provide multiple prompts, use the POST variant of this + * method. Note that <|endoftext|> is the document separator that the model sees + * during training, so if a prompt is not specified the model will generate as if + * from the beginning of a new document. Maximum allowed size of string list is + * 2048. + */ model PostContentSchemaPrompt {} -@doc("A sequence which indicates the end of the current document.") +/** + * A sequence which indicates the end of the current document. + */ model PostContentSchemaStop {} model PathsMaorw9DeploymentsDeploymentIdCompletionsPostResponses200ContentApplicationJsonSchema { @@ -184,25 +196,31 @@ model ErrorResponseError { model Paths13PiqocDeploymentsDeploymentIdEmbeddingsPostRequestbodyContentApplicationJsonSchema extends Record { - @doc(""" -An input to embed, encoded as a string, a list of strings, or a list of token -lists -""") + /** + * An input to embed, encoded as a string, a list of strings, or a list of token + * lists + */ input: PostContentSchemaInput; - @doc("The ID of the end-user, for use in tracking and rate-limiting.") + /** + * The ID of the end-user, for use in tracking and rate-limiting. + */ user?: string; - @doc("input type of embedding search to use") + /** + * input type of embedding search to use + */ @projectedName("json", "input_type") inputType?: string; - @doc("ID of the model to use") + /** + * ID of the model to use + */ `model`?: string; } -@doc(""" -An input to embed, encoded as a string, a list of strings, or a list of token -lists -""") +/** + * An input to embed, encoded as a string, a list of strings, or a list of token + * lists + */ model PostContentSchemaInput {} diff --git a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/routes.tsp index e67ed83f2a..7605fe09b4 100644 --- a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/routes.tsp @@ -8,8 +8,10 @@ using TypeSpec.Http; namespace Azure.AI.OpenAI; interface completionsOperations { + /** + * Create a completion from a chosen model + */ @summary("Create a completion from a chosen model") - @doc("Create a completion from a chosen model") @route("/deployments/{deployment-id}/completions") @post create is Azure.Core.Foundations.Operation< @@ -25,13 +27,17 @@ interface completionsOperations { } interface embeddingsOperations { + /** + * Return the embeddings for a given prompt. + */ @summary("Return the embeddings for a given prompt.") - @doc("Return the embeddings for a given prompt.") @route("/deployments/{deployment-id}/embeddings") @post create is Azure.Core.Foundations.Operation< { - @doc("deployment id of the model which was deployed") + /** + * deployment id of the model which was deployed + */ @path `deployment-id`: string; diff --git a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp index ac952c6c97..c62e228834 100644 --- a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp @@ -13,11 +13,17 @@ using TypeSpec.Http; $host: string } ) -@doc("Long-running Operation for AutoRest") +/** +* Long-running Operation for AutoRest +*/ namespace AutoRestPagingTestService; -@doc("The available API versions.") +/** +* The available API versions. +*/ enum Versions { -@doc("The 1.0.0 API version.") +/** +* The 1.0.0 API version. +*/ v1.0.0: "1.0.0", } \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp index 40a4ef87d6..122307deb4 100644 --- a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp @@ -8,7 +8,9 @@ using Azure.Core; namespace AutoRestPagingTestService; -@doc("The status of the request") +/** + * The status of the request + */ enum OperationResultStatus { Succeeded, Failed, @@ -64,6 +66,8 @@ model ProductResultValueWithXMSClientName { } model OperationResult { - @doc("The status of the request") + /** + * The status of the request + */ status?: OperationResultStatus; } diff --git a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/routes.tsp index 57dc3267a9..ab57a56153 100644 --- a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/routes.tsp @@ -8,7 +8,9 @@ using TypeSpec.Http; namespace AutoRestPagingTestService; interface PagingOperations { - @doc("A paging operation that must return result of the default 'value' node.") + /** + * A paging operation that must return result of the default 'value' node. + */ @route("/paging/noitemname") @get getNoItemNamePages is Azure.Core.Foundations.Operation< @@ -16,7 +18,9 @@ interface PagingOperations { ProductResultValue >; - @doc("A paging operation that must ignore any kind of nextLink, and stop after page 1.") + /** + * A paging operation that must ignore any kind of nextLink, and stop after page 1. + */ @route("/paging/nullnextlink") @get getNullNextLinkNamePages is Azure.Core.Foundations.Operation< @@ -24,15 +28,17 @@ interface PagingOperations { ProductResult >; - @doc("A paging operation that finishes on the first call without a nextlink") + /** + * A paging operation that finishes on the first call without a nextlink + */ @route("/paging/single") @get getSinglePages is Azure.Core.Foundations.Operation<{}, ProductResult>; - @doc(""" -A paging operation whose first response's items list is empty, but still -returns a next link. Second (and final) call, will give you an items list of 1. -""") + /** + * A paging operation whose first response's items list is empty, but still + * returns a next link. Second (and final) call, will give you an items list of 1. + */ @route("/paging/firstResponseEmpty/1") @get firstResponseEmpty is Azure.Core.Foundations.Operation< @@ -40,7 +46,9 @@ returns a next link. Second (and final) call, will give you an items list of 1. ProductResultValue >; - @doc("A paging operation that includes a nextLink that has 10 pages") + /** + * A paging operation that includes a nextLink that has 10 pages + */ @route("/paging/multiple") @get getMultiplePages is Azure.Core.Foundations.Operation< @@ -48,87 +56,101 @@ returns a next link. Second (and final) call, will give you an items list of 1. @header `client-request-id`?: string; - @doc("Sets the maximum number of items to return in the response.") + /** + * Sets the maximum number of items to return in the response. + */ @header maxresults?: int32; - @doc(""" -Sets the maximum time that the server can spend processing the request, in -seconds. The default is 30 seconds. -""") + /** + * Sets the maximum time that the server can spend processing the request, in + * seconds. The default is 30 seconds. + */ @header timeout?: int32 = 30; }, ProductResult >; - @doc(""" -A paging operation that includes a next operation. It has a different query -parameter from it's next operation nextOperationWithQueryParams. Returns a -ProductResult -""") + /** + * A paging operation that includes a next operation. It has a different query + * parameter from it's next operation nextOperationWithQueryParams. Returns a + * ProductResult + */ @route("/paging/multiple/getWithQueryParams") @get getWithQueryParams is Azure.Core.Foundations.Operation< { - @doc("A required integer query parameter. Put in value '100' to pass test.") + /** + * A required integer query parameter. Put in value '100' to pass test. + */ @query("requiredQueryParameter") requiredQueryParameter: int32; - @doc(""" -A constant. Must be True and will be passed as a query parameter to -nextOperationWithQueryParams -""") + /** + * A constant. Must be True and will be passed as a query parameter to + * nextOperationWithQueryParams + */ @query("queryConstant") queryConstant: true; }, ProductResult >; - @doc(""" -Define `filter` as a query param for all calls. However, the returned next link -will also include the `filter` as part of it. Make sure you don't end up -duplicating the `filter` param in the url sent. -""") + /** + * Define `filter` as a query param for all calls. However, the returned next link + * will also include the `filter` as part of it. Make sure you don't end up + * duplicating the `filter` param in the url sent. + */ @route("/paging/multiple/duplicateParams/1") @get duplicateParams is Azure.Core.Foundations.Operation< { - @doc("OData filter options. Pass in 'foo'") + /** + * OData filter options. Pass in 'foo' + */ @query("$filter") $filter?: string; }, ProductResult >; - @doc("Paging with max page size. We don't want to ") + /** + * Paging with max page size. We don't want to + */ @route("/paging/maxPageSize") @get pageWithMaxPageSize is Azure.Core.Foundations.Operation< { - @doc("Max page size query param. Don't send") + /** + * Max page size query param. Don't send + */ @query("$maxpagesize") $maxpagesize?: "5"; }, ProductResult >; - @doc(""" -Next operation for getWithQueryParams. Pass in next=True to pass test. Returns -a ProductResult -""") + /** + * Next operation for getWithQueryParams. Pass in next=True to pass test. Returns + * a ProductResult + */ @route("/paging/multiple/nextOperationWithQueryParams") @get nextOperationWithQueryParams is Azure.Core.Foundations.Operation< { - @doc("A constant. Must be True") + /** + * A constant. Must be True + */ @query("queryConstant") queryConstant: true; }, ProductResult >; - @doc("A paging operation that includes a nextLink in odata format that has 10 pages") + /** + * A paging operation that includes a nextLink in odata format that has 10 pages + */ @route("/paging/multiple/odata") @get getOdataMultiplePages is Azure.Core.Foundations.Operation< @@ -136,21 +158,25 @@ a ProductResult @header `client-request-id`?: string; - @doc("Sets the maximum number of items to return in the response.") + /** + * Sets the maximum number of items to return in the response. + */ @header maxresults?: int32; - @doc(""" -Sets the maximum time that the server can spend processing the request, in -seconds. The default is 30 seconds. -""") + /** + * Sets the maximum time that the server can spend processing the request, in + * seconds. The default is 30 seconds. + */ @header timeout?: int32 = 30; }, OdataProductResult >; - @doc("A paging operation that includes a nextLink that has 10 pages") + /** + * A paging operation that includes a nextLink that has 10 pages + */ @route("/paging/multiple/withpath/{offset}") @get getMultiplePagesWithOffset is Azure.Core.Foundations.Operation< @@ -158,28 +184,32 @@ seconds. The default is 30 seconds. @header `client-request-id`?: string; - @doc("Sets the maximum number of items to return in the response.") + /** + * Sets the maximum number of items to return in the response. + */ @header maxresults?: int32; - @doc("Offset of return value") + /** + * Offset of return value + */ @path offset: int32; - @doc(""" -Sets the maximum time that the server can spend processing the request, in -seconds. The default is 30 seconds. -""") + /** + * Sets the maximum time that the server can spend processing the request, in + * seconds. The default is 30 seconds. + */ @header timeout?: int32 = 30; }, ProductResult >; - @doc(""" -A paging operation that fails on the first call with 500 and then retries and -then get a response including a nextLink that has 10 pages -""") + /** + * A paging operation that fails on the first call with 500 and then retries and + * then get a response including a nextLink that has 10 pages + */ @route("/paging/multiple/retryfirst") @get getMultiplePagesRetryFirst is Azure.Core.Foundations.Operation< @@ -187,11 +217,11 @@ then get a response including a nextLink that has 10 pages ProductResult >; - @doc(""" -A paging operation that includes a nextLink that has 10 pages, of which the 2nd -call fails first with 500. The client should retry and finish all 10 pages -eventually. -""") + /** + * A paging operation that includes a nextLink that has 10 pages, of which the 2nd + * call fails first with 500. The client should retry and finish all 10 pages + * eventually. + */ @route("/paging/multiple/retrysecond") @get getMultiplePagesRetrySecond is Azure.Core.Foundations.Operation< @@ -199,12 +229,16 @@ eventually. ProductResult >; - @doc("A paging operation that receives a 400 on the first call") + /** + * A paging operation that receives a 400 on the first call + */ @route("/paging/single/failure") @get getSinglePagesFailure is Azure.Core.Foundations.Operation<{}, ProductResult>; - @doc("A paging operation that receives a 400 on the second call") + /** + * A paging operation that receives a 400 on the second call + */ @route("/paging/multiple/failure") @get getMultiplePagesFailure is Azure.Core.Foundations.Operation< @@ -212,7 +246,9 @@ eventually. ProductResult >; - @doc("A paging operation that receives an invalid nextLink") + /** + * A paging operation that receives an invalid nextLink + */ @route("/paging/multiple/failureuri") @get getMultiplePagesFailureUri is Azure.Core.Foundations.Operation< @@ -220,124 +256,154 @@ eventually. ProductResult >; - @doc("A paging operation that doesn't return a full URL, just a fragment") + /** + * A paging operation that doesn't return a full URL, just a fragment + */ @route("/paging/multiple/fragment/{tenant}") @get getMultiplePagesFragmentNextLink is Azure.Core.Foundations.Operation< { - @doc("Sets the api version to use.") + /** + * Sets the api version to use. + */ @query("api_version") api_version: string; - @doc("Sets the tenant to use.") + /** + * Sets the tenant to use. + */ @path tenant: string; }, OdataProductResult >; - @doc(""" -A paging operation that doesn't return a full URL, just a fragment with -parameters grouped -""") + /** + * A paging operation that doesn't return a full URL, just a fragment with + * parameters grouped + */ @route("/paging/multiple/fragmentwithgrouping/{tenant}") @get getMultiplePagesFragmentWithGroupingNextLink is Azure.Core.Foundations.Operation< { - @doc("Sets the api version to use.") + /** + * Sets the api version to use. + */ @query("api_version") api_version: string; - @doc("Sets the tenant to use.") + /** + * Sets the tenant to use. + */ @path tenant: string; }, OdataProductResult >; - @doc("A long-running paging operation that includes a nextLink that has 10 pages") + /** + * A long-running paging operation that includes a nextLink that has 10 pages + */ @route("/paging/multiple/lro") @post - GetMultiplePagesLRO is Azure.Core.Foundations.Operation< + getMultiplePagesLRO is Azure.Core.Foundations.Operation< { @header `client-request-id`?: string; - @doc("Sets the maximum number of items to return in the response.") + /** + * Sets the maximum number of items to return in the response. + */ @header maxresults?: int32; - @doc(""" -Sets the maximum time that the server can spend processing the request, in -seconds. The default is 30 seconds. -""") + /** + * Sets the maximum time that the server can spend processing the request, in + * seconds. The default is 30 seconds. + */ @header timeout?: int32 = 30; }, ProductResult >; - @doc(""" -A paging operation with api version. When calling the next link, you want to -append your client's api version to the next link -""") + /** + * A paging operation with api version. When calling the next link, you want to + * append your client's api version to the next link + */ @route("/paging/apiVersion/append/1") @get appendApiVersion is Azure.Core.Foundations.Operation<{}, ProductResult>; - @doc(""" -A paging operation with api version. When calling the next link, you want to -reformat it and override the returned api version with your client's api -version -""") + /** + * A paging operation with api version. When calling the next link, you want to + * reformat it and override the returned api version with your client's api + * version + */ @route("/paging/apiVersion/replace/1") @get replaceApiVersion is Azure.Core.Foundations.Operation<{}, ProductResult>; - @doc("A paging operation that doesn't return a full URL, just a fragment") + /** + * A paging operation that doesn't return a full URL, just a fragment + */ @route("/paging/multiple/fragment/{tenant}/{nextLink}") @get nextFragment is Azure.Core.Foundations.Operation< { - @doc("Sets the api version to use.") + /** + * Sets the api version to use. + */ @query("api_version") api_version: string; - @doc("Sets the tenant to use.") + /** + * Sets the tenant to use. + */ @path tenant: string; - @doc("Next link for list operation.") + /** + * Next link for list operation. + */ @path nextLink: string; }, OdataProductResult >; - @doc("A paging operation that doesn't return a full URL, just a fragment") + /** + * A paging operation that doesn't return a full URL, just a fragment + */ @route("/paging/multiple/fragmentwithgrouping/{tenant}/{nextLink}") @get nextFragmentWithGrouping is Azure.Core.Foundations.Operation< { - @doc("Sets the api version to use.") + /** + * Sets the api version to use. + */ @query("api_version") api_version: string; - @doc("Sets the tenant to use.") + /** + * Sets the tenant to use. + */ @path tenant: string; - @doc("Next link for list operation.") + /** + * Next link for list operation. + */ @path nextLink: string; }, OdataProductResult >; - @doc(""" -A paging operation that returns a paging model whose item name is is overriden -by x-ms-client-name 'indexes'. -""") + /** + * A paging operation that returns a paging model whose item name is is overriden + * by x-ms-client-name 'indexes'. + */ @route("/paging/itemNameWithXMSClientName") @get getPagingModelWithItemNameWithXMSClientName is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp index 27b7cddfe2..aa1817fe39 100644 --- a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp @@ -4,6 +4,14 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +/** + * The language service API is a suite of natural language processing (NLP) skills + * built with best-in-class Microsoft machine learning algorithms. The API can be + * used to analyze unstructured text for tasks such as sentiment analysis, key + * phrase extraction, language detection and question answering. Further + * documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview. + */ @service({ title: "QnA Maker", }) @@ -15,18 +23,14 @@ using TypeSpec.Http; Endpoint: string, } ) -@doc(""" -The language service API is a suite of natural language processing (NLP) skills -built with best-in-class Microsoft machine learning algorithms. The API can be -used to analyze unstructured text for tasks such as sentiment analysis, key -phrase extraction, language detection and question answering. Further -documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview. -""") namespace Azure.Language.QnAMaker; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { - @doc("The 2022-07-01-preview API version.") + /** + * The 2022-07-01-preview API version. + */ v2022_07_01_preview: "2022-07-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp index cecc5cc1c6..a8a2a8e809 100644 --- a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp @@ -6,19 +6,32 @@ using TypeSpec.Http; namespace Azure.Language.QnAMaker; -@doc("Type of ranker to be used.") +/** + * Type of ranker to be used. + */ enum RankerKind { - @doc("Question only ranker.") QuestionOnly, - @doc("Default ranker.") Default, + /** + * Question only ranker. + */ + QuestionOnly, + + /** + * Default ranker. + */ + Default, } -@doc("Set to 'OR' or 'AND' for using corresponding logical operation.") +/** + * Set to 'OR' or 'AND' for using corresponding logical operation. + */ enum LogicalOperationKind { AND, OR, } -@doc("Human-readable error code.") +/** + * Human-readable error code. + */ enum ErrorCode { InvalidRequest, InvalidArgument, @@ -40,7 +53,9 @@ enum ErrorCode { Warning, } -@doc("Human-readable error code.") +/** + * Human-readable error code. + */ enum InnerErrorCode { InvalidRequest, InvalidParameterValue, @@ -58,331 +73,475 @@ enum InnerErrorCode { InvalidCountryHint, } -@doc(""" -Specifies the method used to interpret string offsets. Defaults to Text -Elements (Graphemes) according to Unicode v8.0.0. For additional information -see https://aka.ms/text-analytics-offsets. -""") +/** + * Specifies the method used to interpret string offsets. Defaults to Text + * Elements (Graphemes) according to Unicode v8.0.0. For additional information + * see https://aka.ms/text-analytics-offsets. + */ enum StringIndexType { - @doc(""" -Returned offset and length values will correspond to TextElements (Graphemes -and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this -option if your application is written in .Net Framework or .Net Core and you -will be using StringInfo. -""") + /** + * Returned offset and length values will correspond to TextElements (Graphemes + * and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this + * option if your application is written in .Net Framework or .Net Core and you + * will be using StringInfo. + */ TextElements_v8, - @doc(""" -Returned offset and length values will correspond to Unicode code points. Use -this option if your application is written in a language that support Unicode, -for example Python. -""") + + /** + * Returned offset and length values will correspond to Unicode code points. Use + * this option if your application is written in a language that support Unicode, + * for example Python. + */ UnicodeCodePoint, - @doc(""" -Returned offset and length values will correspond to UTF-16 code units. Use -this option if your application is written in a language that support Unicode, -for example Java, JavaScript. -""") + + /** + * Returned offset and length values will correspond to UTF-16 code units. Use + * this option if your application is written in a language that support Unicode, + * for example Java, JavaScript. + */ Utf16CodeUnit, } -@doc("Parameters to query a knowledge base.") +/** + * Parameters to query a knowledge base. + */ model AnswersOptions { - @doc(""" -Exact QnA ID to fetch from the knowledge base, this field takes priority over -question. -""") + /** + * Exact QnA ID to fetch from the knowledge base, this field takes priority over + * question. + */ qnaId?: int32; - @doc("User question to query against the knowledge base.") + /** + * User question to query against the knowledge base. + */ question?: string; - @doc("Max number of answers to be returned for the question.") + /** + * Max number of answers to be returned for the question. + */ top?: int32; - @doc("Unique identifier for the user.") + /** + * Unique identifier for the user. + */ userId?: string; - @doc("Minimum threshold score for answers, value ranges from 0 to 1.") + /** + * Minimum threshold score for answers, value ranges from 0 to 1. + */ @maxValue(1) @projectedName("json", "confidenceScoreThreshold") - confidenceThreshold?: float32; + confidenceThreshold?: float64; - @doc("Context object with previous QnA's information.") + /** + * Context object with previous QnA's information. + */ @projectedName("json", "context") answerContext?: KnowledgeBaseAnswerContext; - @doc("Type of ranker to be used.") + /** + * Type of ranker to be used. + */ @projectedName("json", "rankerType") rankerKind?: RankerKind; - @doc("Filter QnAs based on given metadata list and knowledge base sources.") + /** + * Filter QnAs based on given metadata list and knowledge base sources. + */ filters?: QueryFilters; - @doc("To configure Answer span prediction feature.") + /** + * To configure Answer span prediction feature. + */ @projectedName("json", "answerSpanRequest") shortAnswerOptions?: ShortAnswerOptions; - @doc("(Optional) Flag to enable Query over Unstructured Sources.") + /** + * (Optional) Flag to enable Query over Unstructured Sources. + */ includeUnstructuredSources?: boolean; } -@doc("Context object with previous QnA's information.") +/** + * Context object with previous QnA's information. + */ model KnowledgeBaseAnswerContext { - @doc("Previous turn top answer result QnA ID.") + /** + * Previous turn top answer result QnA ID. + */ previousQnaId: int32; - @doc("Previous user query.") + /** + * Previous user query. + */ @projectedName("json", "previousUserQuery") previousQuestion?: string; } -@doc("filters over knowledge base.") +/** + * filters over knowledge base. + */ model QueryFilters { - @doc("Find QnAs that are associated with the given list of metadata.") + /** + * Find QnAs that are associated with the given list of metadata. + */ metadataFilter?: MetadataFilter; - @doc(""" -Find QnAs that are associated with any of the given list of sources in -knowledge base. -""") + /** + * Find QnAs that are associated with any of the given list of sources in + * knowledge base. + */ sourceFilter?: string[]; - @doc("Logical operation used to join metadata filter with source filter.") + /** + * Logical operation used to join metadata filter with source filter. + */ logicalOperation?: LogicalOperationKind; } -@doc("Find QnAs that are associated with the given list of metadata.") +/** + * Find QnAs that are associated with the given list of metadata. + */ model MetadataFilter { metadata?: MetadataRecord[]; - @doc("Operation used to join metadata filters.") + /** + * Operation used to join metadata filters. + */ logicalOperation?: LogicalOperationKind; } -@doc("Object to provide the key value pair for each metadata.") +/** + * Object to provide the key value pair for each metadata. + */ model MetadataRecord { - @doc("Metadata Key from Metadata dictionary used in the QnA.") + /** + * Metadata Key from Metadata dictionary used in the QnA. + */ key: string; - @doc("Metadata Value from Metadata dictionary used in the QnA.") + /** + * Metadata Value from Metadata dictionary used in the QnA. + */ value: string; } -@doc("To configure Answer span prediction feature.") +/** + * To configure Answer span prediction feature. + */ model ShortAnswerOptions { - @doc("Enable or disable Answer Span prediction.") + /** + * Enable or disable Answer Span prediction. + */ enable: true; - @doc(""" -Minimum threshold score required to include an answer span, value ranges from 0 -to 1. -""") + /** + * Minimum threshold score required to include an answer span, value ranges from 0 + * to 1. + */ @maxValue(1) @projectedName("json", "confidenceScoreThreshold") - confidenceThreshold?: float32; + confidenceThreshold?: float64; - @doc("Number of Top answers to be considered for span prediction from 1 to 10.") + /** + * Number of Top answers to be considered for span prediction from 1 to 10. + */ @maxValue(10) @minValue(1) @projectedName("json", "topAnswersWithSpan") top?: int32; } -@doc("Represents List of Question Answers.") +/** + * Represents List of Question Answers. + */ model AnswersResult { - @doc("Represents Answer Result list.") + /** + * Represents Answer Result list. + */ answers?: KnowledgeBaseAnswer[]; } -@doc("Represents knowledge base answer.") +/** + * Represents knowledge base answer. + */ model KnowledgeBaseAnswer { - @doc("List of questions associated with the answer.") + /** + * List of questions associated with the answer. + */ questions?: string[]; - @doc("Answer text.") + /** + * Answer text. + */ answer?: string; - @doc("Answer confidence score, value ranges from 0 to 1.") + /** + * Answer confidence score, value ranges from 0 to 1. + */ @maxValue(1) @projectedName("json", "confidenceScore") - confidence?: float32; + confidence?: float64; - @doc("ID of the QnA result.") + /** + * ID of the QnA result. + */ @projectedName("json", "id") qnaId?: int32; - @doc("Source of QnA result.") + /** + * Source of QnA result. + */ source?: string; - @doc(""" -Metadata associated with the answer, useful to categorize or filter question -answers. -""") + /** + * Metadata associated with the answer, useful to categorize or filter question + * answers. + */ metadata?: Record; - @doc("Dialog associated with Answer.") + /** + * Dialog associated with Answer. + */ dialog?: KnowledgeBaseAnswerDialog; - @doc("Answer span object of QnA with respect to user's question.") + /** + * Answer span object of QnA with respect to user's question. + */ @projectedName("json", "answerSpan") shortAnswer?: AnswerSpan; } -@doc("Dialog associated with Answer.") +/** + * Dialog associated with Answer. + */ model KnowledgeBaseAnswerDialog { - @doc(""" -To mark if a prompt is relevant only with a previous question or not. If true, -do not include this QnA as search result for queries without context; -otherwise, if false, ignores context and includes this QnA in search result. -""") + /** + * To mark if a prompt is relevant only with a previous question or not. If true, + * do not include this QnA as search result for queries without context; + * otherwise, if false, ignores context and includes this QnA in search result. + */ isContextOnly?: boolean; - @doc("List of prompts associated with the answer.") + /** + * List of prompts associated with the answer. + */ prompts?: KnowledgeBaseAnswerPrompt[]; } -@doc("Prompt for an answer.") +/** + * Prompt for an answer. + */ model KnowledgeBaseAnswerPrompt { - @doc("Index of the prompt - used in ordering of the prompts.") + /** + * Index of the prompt - used in ordering of the prompts. + */ displayOrder?: int32; - @doc("QnA ID corresponding to the prompt.") + /** + * QnA ID corresponding to the prompt. + */ qnaId?: int32; - @doc("Text displayed to represent a follow up question prompt.") + /** + * Text displayed to represent a follow up question prompt. + */ @maxLength(200) displayText?: string; } -@doc("Answer span object of QnA.") +/** + * Answer span object of QnA. + */ model AnswerSpan { - @doc("Predicted text of answer span.") + /** + * Predicted text of answer span. + */ text?: string; - @doc("Predicted score of answer span, value ranges from 0 to 1.") + /** + * Predicted score of answer span, value ranges from 0 to 1. + */ @maxValue(1) @projectedName("json", "confidenceScore") - confidence?: float32; + confidence?: float64; - @doc("The answer span offset from the start of answer.") + /** + * The answer span offset from the start of answer. + */ offset?: int32; - @doc("The length of the answer span.") + /** + * The length of the answer span. + */ length?: int32; } -@doc("Error response.") +/** + * Error response. + */ @error model ErrorResponse { - @doc("The error object.") + /** + * The error object. + */ error: Error; } -@doc("The error object.") +/** + * The error object. + */ model Error extends Record { - @doc("One of a server-defined set of error codes.") + /** + * One of a server-defined set of error codes. + */ code: ErrorCode; - @doc("A human-readable representation of the error.") + /** + * A human-readable representation of the error. + */ message: string; - @doc("The target of the error.") + /** + * The target of the error. + */ target?: string; - @doc("An array of details about specific errors that led to this reported error.") + /** + * An array of details about specific errors that led to this reported error. + */ details?: Error[]; - @doc(""" -An object containing more specific information than the current object about -the error. -""") + /** + * An object containing more specific information than the current object about + * the error. + */ innererror?: InnerErrorModel; } -@doc(""" -An object containing more specific information about the error. As per -Microsoft One API guidelines - -https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. -""") +/** + * An object containing more specific information about the error. As per + * Microsoft One API guidelines - + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + */ model InnerErrorModel { - @doc("One of a server-defined set of error codes.") + /** + * One of a server-defined set of error codes. + */ code: InnerErrorCode; - @doc("Error message.") + /** + * Error message. + */ message: string; - @doc("Error details.") + /** + * Error details. + */ details?: Record; - @doc("Error target.") + /** + * Error target. + */ target?: string; - @doc(""" -An object containing more specific information than the current object about -the error. -""") + /** + * An object containing more specific information than the current object about + * the error. + */ innererror?: InnerErrorModel; } -@doc("The question and text record parameters to answer.") +/** + * The question and text record parameters to answer. + */ model AnswersFromTextOptions { - @doc("User question to query against the given text records.") + /** + * User question to query against the given text records. + */ question: string; - @doc("Text records to be searched for given question.") + /** + * Text records to be searched for given question. + */ @projectedName("json", "records") textDocuments: TextDocument[]; - @doc(""" -Language of the text records. This is BCP-47 representation of a language. For -example, use \"en\" for English; \"es\" for Spanish etc. If not set, use \"en\" -for English as default. -""") + /** + * Language of the text records. This is BCP-47 representation of a language. For + * example, use "en" for English; "es" for Spanish etc. If not set, use "en" for + * English as default. + */ language?: string; - @doc(""" -Specifies the method used to interpret string offsets. Defaults to Text -Elements (Graphemes) according to Unicode v8.0.0. For additional information -see https://aka.ms/text-analytics-offsets. -""") - stringIndexType?: StringIndexType; + /** + * Specifies the method used to interpret string offsets. Defaults to Text + * Elements (Graphemes) according to Unicode v8.0.0. For additional information + * see https://aka.ms/text-analytics-offsets. + */ + stringIndexType?: StringIndexType = StringIndexType.TextElements_v8; } -@doc("Represent input text record to be queried.") +/** + * Represent input text record to be queried. + */ model TextDocument { - @doc("Unique identifier for the text record.") + /** + * Unique identifier for the text record. + */ id: string; - @doc("Text contents of the record.") + /** + * Text contents of the record. + */ text: string; } -@doc("Represents the answer results.") +/** + * Represents the answer results. + */ model AnswersFromTextResult { - @doc("Represents the answer results.") + /** + * Represents the answer results. + */ answers?: TextAnswer[]; } -@doc("Represents answer result.") +/** + * Represents answer result. + */ model TextAnswer { - @doc("Answer.") + /** + * Answer. + */ answer?: string; - @doc("answer confidence score, value ranges from 0 to 1.") + /** + * answer confidence score, value ranges from 0 to 1. + */ @maxValue(1) @projectedName("json", "confidenceScore") - confidence?: float32; + confidence?: float64; - @doc("record ID.") + /** + * record ID. + */ id?: string; - @doc("Answer span object with respect to user's question.") + /** + * Answer span object with respect to user's question. + */ @projectedName("json", "answerSpan") shortAnswer?: AnswerSpan; - @doc("The sentence offset from the start of the document.") + /** + * The sentence offset from the start of the document. + */ offset?: int32; - @doc("The length of the sentence.") + /** + * The length of the sentence. + */ length?: int32; } diff --git a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/routes.tsp index 953be70dc4..0bc2ec0f0d 100644 --- a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/routes.tsp @@ -8,32 +8,42 @@ using TypeSpec.Http; namespace Azure.Language.QnAMaker; interface QuestionAnsweringOperations { + /** + * Answers the specified question using your knowledge base. + */ @summary("Answers the specified question using your knowledge base.") - @doc("Answers the specified question using your knowledge base.") @route("/:query-knowledgebases") @post - GetAnswers is Azure.Core.Foundations.Operation< + getAnswers is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @query("projectName") projectName: string; - @doc("The name of the specific deployment of the project to use.") + /** + * The name of the specific deployment of the project to use. + */ @query("deploymentName") deploymentName: string; - @doc("Post body of the request.") + /** + * Post body of the request. + */ @body knowledgeBaseQueryOptions: AnswersOptions; }, AnswersResult >; + /** + * Answers the specified question using the provided text in the body. + */ @summary("Answers the specified question using the provided text in the body.") - @doc("Answers the specified question using the provided text in the body.") @route("/:query-text") @post - GetAnswersFromText is Azure.Core.Foundations.Operation< + getAnswersFromText is Azure.Core.Foundations.Operation< AnswersFromTextOptions, AnswersFromTextResult >; diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp index 374dfef5ea..d9ee4d0c6d 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp @@ -4,6 +4,14 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +/** + * The language service API is a suite of natural language processing (NLP) skills + * built with best-in-class Microsoft machine learning algorithms. The API can be + * used to analyze unstructured text for tasks such as sentiment analysis, key + * phrase extraction, language detection and question answering. Further + * documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview. + */ @service({ title: "Microsoft Cognitive Language Service - Question Answering - Authoring", }) @@ -15,18 +23,14 @@ using TypeSpec.Http; Endpoint: string, } ) -@doc(""" -The language service API is a suite of natural language processing (NLP) skills -built with best-in-class Microsoft machine learning algorithms. The API can be -used to analyze unstructured text for tasks such as sentiment analysis, key -phrase extraction, language detection and question answering. Further -documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview. -""") namespace MicrosoftCognitiveLanguageServiceQuestionAnsweringAuthoring; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { - @doc("The 2023-04-01 API version.") + /** + * The 2023-04-01 API version. + */ v2023_04_01: "2023-04-01", } diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp index a3edfc665a..9c0d340a75 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp @@ -7,7 +7,9 @@ using TypeSpec.Http; namespace MicrosoftCognitiveLanguageServiceQuestionAnsweringAuthoring; -@doc("Human-readable error code.") +/** + * Human-readable error code. + */ enum ErrorCode { InvalidRequest, InvalidArgument, @@ -29,7 +31,9 @@ enum ErrorCode { Warning, } -@doc("Human-readable error code.") +/** + * Human-readable error code. + */ enum InnerErrorCode { InvalidRequest, InvalidParameterValue, @@ -47,7 +51,9 @@ enum InnerErrorCode { InvalidCountryHint, } -@doc("Job Status.") +/** + * Job Status. + */ enum JobStatus { notStarted, running, @@ -59,16 +65,21 @@ enum JobStatus { } enum Format { - @doc("Export or Import QnA assets in JSON format.") json, - @doc(""" -Export or Import knowledge base replica including all assets and metadata in -Excel format. -""") + /** + * Export or Import QnA assets in JSON format. + */ + json, + + /** + * Export or Import knowledge base replica including all assets and metadata in + * Excel format. + */ tsv, - @doc(""" -Export or Import knowledge base replica including all assets and metadata in -Tsv format. -""") + + /** + * Export or Import knowledge base replica including all assets and metadata in + * Tsv format. + */ excel, } @@ -77,149 +88,209 @@ enum AssetKind { synonyms, } -@doc("Supported source types.") +/** + * Supported source types. + */ enum SourceKind { file, url, } -@doc("Content structure type for sources.") +/** + * Content structure type for sources. + */ enum SourceContentStructureKind { unstructured, } -@doc("Update operation type for assets.") +/** + * Update operation type for assets. + */ enum UpdateOperationKind { add, delete, replace, } -@doc("Collection of projects metadata and global settings.") +/** + * Collection of projects metadata and global settings. + */ model ProjectsMetadata is Azure.Core.Page; -@doc("Represents the project.") +/** + * Represents the project. + */ model ProjectMetadata { - @doc("Name of the project.") + /** + * Name of the project. + */ projectName?: string; - @doc("Description of the project.") + /** + * Description of the project. + */ description?: string; - @doc(""" -Language of the text records. This is BCP-47 representation of a language. For -example, use \"en\" for English; \"es\" for Spanish etc. If not set, use \"en\" -for English as default. -""") + /** + * Language of the text records. This is BCP-47 representation of a language. For + * example, use "en" for English; "es" for Spanish etc. If not set, use "en" for + * English as default. + */ language?: string; - @doc("Resource enabled for multiple languages across projects or not.") + /** + * Resource enabled for multiple languages across projects or not. + */ multilingualResource?: boolean; - @doc("Configurable settings of the Project.") + /** + * Configurable settings of the Project. + */ settings?: ProjectSettings; - @doc("Project creation date-time.") + /** + * Project creation date-time. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDateTime?: utcDateTime; - @doc("Represents the project last modified date-time.") + /** + * Represents the project last modified date-time. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastModifiedDateTime?: utcDateTime; - @doc("Represents the project last deployment date-time.") + /** + * Represents the project last deployment date-time. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastDeployedDateTime?: utcDateTime; } -@doc("Configurable settings of the Project.") +/** + * Configurable settings of the Project. + */ model ProjectSettings { - @doc("Default Answer response when no good match is found in the knowledge base.") + /** + * Default Answer response when no good match is found in the knowledge base. + */ defaultAnswer?: string; } -@doc("Error response.") +/** + * Error response. + */ @error model ErrorResponse { - @doc("The error object.") + /** + * The error object. + */ error: Error; } -@doc("The error object.") +/** + * The error object. + */ model Error extends Record { - @doc("One of a server-defined set of error codes.") + /** + * One of a server-defined set of error codes. + */ code: ErrorCode; - @doc("A human-readable representation of the error.") + /** + * A human-readable representation of the error. + */ message: string; - @doc("The target of the error.") + /** + * The target of the error. + */ target?: string; - @doc("An array of details about specific errors that led to this reported error.") + /** + * An array of details about specific errors that led to this reported error. + */ details?: Error[]; - @doc(""" -An object containing more specific information than the current object about -the error. -""") + /** + * An object containing more specific information than the current object about + * the error. + */ innererror?: InnerErrorModel; } -@doc(""" -An object containing more specific information about the error. As per -Microsoft One API guidelines - -https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. -""") +/** + * An object containing more specific information about the error. As per + * Microsoft One API guidelines - + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + */ model InnerErrorModel { - @doc("One of a server-defined set of error codes.") + /** + * One of a server-defined set of error codes. + */ code: InnerErrorCode; - @doc("Error message.") + /** + * Error message. + */ message: string; - @doc("Error details.") + /** + * Error details. + */ details?: Record; - @doc("Error target.") + /** + * Error target. + */ target?: string; - @doc(""" -An object containing more specific information than the current object about -the error. -""") + /** + * An object containing more specific information than the current object about + * the error. + */ innererror?: InnerErrorModel; } -@doc("Parameters needed to create the project.") +/** + * Parameters needed to create the project. + */ model CreateProjectOptions { - @doc("Description of the project.") + /** + * Description of the project. + */ description?: string; - @doc(""" -Language of the text records. This is BCP-47 representation of a language. For -example, use \"en\" for English; \"es\" for Spanish etc. If not set, use \"en\" -for English as default. -""") + /** + * Language of the text records. This is BCP-47 representation of a language. For + * example, use "en" for English; "es" for Spanish etc. If not set, use "en" for + * English as default. + */ language: string; - @doc(""" -Set to true to enable creating knowledgebases in different languages for the -same resource. -""") + /** + * Set to true to enable creating knowledgebases in different languages for the + * same resource. + */ multilingualResource?: boolean; - @doc("Configurable settings of the Project.") + /** + * Configurable settings of the Project. + */ settings?: ProjectSettings; } -@doc("Job state represents the job metadata and any errors.") +/** + * Job state represents the job metadata and any errors. + */ model JobState { ...JobMetadata; ...Errors; } -@doc("Represents the job metadata.") +/** + * Represents the job metadata. + */ model JobMetadata { // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDateTime: utcDateTime; @@ -234,270 +305,400 @@ model JobMetadata { // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdatedDateTime: utcDateTime; - @doc("Job Status.") + /** + * Job Status. + */ status: JobStatus; } -@doc("Collection of Error types.") +/** + * Collection of Error types. + */ model Errors { errors?: Error[]; } -@doc("Export job status, project metadata, and assets.") +/** + * Export job status, project metadata, and assets. + */ model ExportJobState { ...JobState; ...ExportJobResultUrl; } -@doc("URL to download the result of the Export Job.") +/** + * URL to download the result of the Export Job. + */ model ExportJobResultUrl { - @doc("URL to download the result of the Export Job.") + /** + * URL to download the result of the Export Job. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key resultUrl: string; } -@doc("Project assets the needs to be imported.") +/** + * Project assets the needs to be imported. + */ model ImportJobOptions { - @doc("Parameters needed to create the project.") + /** + * Parameters needed to create the project. + */ metadata?: CreateProjectOptions; - @doc("All assets for this project.") + /** + * All assets for this project. + */ assets?: Assets; - @doc("Import data File URI.") + /** + * Import data File URI. + */ fileUri?: string; } -@doc("All assets for this project.") +/** + * All assets for this project. + */ model Assets { - @doc("Collection of synonyms.") + /** + * Collection of synonyms. + */ synonyms?: WordAlterations[]; - @doc("List of QnA records to import.") + /** + * List of QnA records to import. + */ qnas?: ImportQnaRecord[]; } -@doc("Collection of word alterations.") +/** + * Collection of word alterations. + */ model WordAlterations { - @doc("Collection of word alterations.") + /** + * Collection of word alterations. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key alterations: string[]; } -@doc("Import QnA Record.") +/** + * Import QnA Record. + */ model ImportQnaRecord { ...RetrieveQnaRecord; ...SourceDisplayNameParameter; } -@doc("QnA Record with last updated date-time.") +/** + * QnA Record with last updated date-time. + */ model RetrieveQnaRecord { ...QnaRecord; ...LastUpdatedDateTimeParameter; } -@doc("QnA record.") +/** + * QnA record. + */ model QnaRecord { - @doc("Unique ID for the QnA.") + /** + * Unique ID for the QnA. + */ id?: int32; - @doc("Answer text.") + /** + * Answer text. + */ @maxLength(25000) @minLength(1) answer?: string; - @doc(""" -Source from which QnA was indexed e.g. -https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs . -""") + /** + * Source from which QnA was indexed e.g. + * https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs . + */ @maxLength(300) source?: string; - @doc("List of questions associated with the answer.") + /** + * List of questions associated with the answer. + */ questions?: string[]; - @doc(""" -Metadata associated with the answer, useful to categorize or filter question -answers. -""") + /** + * Metadata associated with the answer, useful to categorize or filter question + * answers. + */ metadata?: Record; - @doc("Context of a QnA.") + /** + * Context of a QnA. + */ dialog?: QnaDialog; - @doc("List of Active Learning suggestions for the QnA.") + /** + * List of Active Learning suggestions for the QnA. + */ activeLearningSuggestions?: SuggestedQuestionsCluster[]; } -@doc("Dialog associated with QnA Record.") +/** + * Dialog associated with QnA Record. + */ model QnaDialog { - @doc(""" -To mark if a prompt is relevant only with a previous question or not. If true, -do not include this QnA as answer for queries without context; otherwise, -ignores context and includes this QnA in answers. -""") + /** + * To mark if a prompt is relevant only with a previous question or not. If true, + * do not include this QnA as answer for queries without context; otherwise, + * ignores context and includes this QnA in answers. + */ isContextOnly?: boolean; - @doc("List of prompts associated with the answer.") + /** + * List of prompts associated with the answer. + */ prompts?: QnaPrompt[]; } -@doc("Prompt for an answer.") +/** + * Prompt for an answer. + */ model QnaPrompt { - @doc("Index of the prompt. It is used for ordering of the prompts.") + /** + * Index of the prompt. It is used for ordering of the prompts. + */ displayOrder?: int32; - @doc("ID of the QnA corresponding to the prompt.") + /** + * ID of the QnA corresponding to the prompt. + */ qnaId?: int32; - @doc("QnA record. Either QnAId or QnA record needs to be present in a Prompt.") + /** + * QnA record. Either QnAId or QnA record needs to be present in a Prompt. + */ qna?: QnaRecord; - @doc("Text displayed to represent a follow up question prompt.") + /** + * Text displayed to represent a follow up question prompt. + */ @maxLength(200) displayText?: string; } -@doc("Active Learning suggested questions cluster details.") +/** + * Active Learning suggested questions cluster details. + */ model SuggestedQuestionsCluster { - @doc(""" -Question chosen as the head of suggested questions cluster by Active Learning -clustering algorithm. -""") + /** + * Question chosen as the head of suggested questions cluster by Active Learning + * clustering algorithm. + */ clusterHead?: string; - @doc("List of all suggested questions for the QnA.") + /** + * List of all suggested questions for the QnA. + */ suggestedQuestions?: SuggestedQuestion[]; } -@doc("Question suggested by the Active Learning feature.") +/** + * Question suggested by the Active Learning feature. + */ model SuggestedQuestion { - @doc("Question suggested by the Active Learning feature.") + /** + * Question suggested by the Active Learning feature. + */ question?: string; - @doc("The number of times the question was suggested explicitly by the user.") + /** + * The number of times the question was suggested explicitly by the user. + */ userSuggestedCount?: int32; - @doc(""" -The number of times the question was suggested automatically by the Active -Learning algorithm. -""") + /** + * The number of times the question was suggested automatically by the Active + * Learning algorithm. + */ autoSuggestedCount?: int32; } -@doc("Last updated date-time parameter.") +/** + * Last updated date-time parameter. + */ model LastUpdatedDateTimeParameter { - @doc("Date-time when the QnA was last updated.") + /** + * Date-time when the QnA was last updated. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdatedDateTime?: utcDateTime; } model SourceDisplayNameParameter { - @doc("Friendly name of the Source.") + /** + * Friendly name of the Source. + */ @maxLength(200) @minLength(1) sourceDisplayName?: string; } -@doc("All deployments of a project.") +/** + * All deployments of a project. + */ model ProjectDeployments is Azure.Core.Page; -@doc("Project deployment details.") +/** + * Project deployment details. + */ model ProjectDeployment { - @doc("Name of the deployment.") + /** + * Name of the deployment. + */ deploymentName?: string; - @doc("Represents the project last deployment date-time.") + /** + * Represents the project last deployment date-time. + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastDeployedDateTime?: utcDateTime; } -@doc("All synonym assets for this project.") +/** + * All synonym assets for this project. + */ model SynonymAssets is Azure.Core.Page; -@doc("All QnA sources for the project.") +/** + * All QnA sources for the project. + */ model QnaSources is Azure.Core.Page; -@doc("Custom source record with last updated date-time.") +/** + * Custom source record with last updated date-time. + */ model QnaSourceRecord { ...QnaSourceMetadata; ...LastUpdatedDateTimeParameter; } -@doc("Input source file or url details.") +/** + * Input source file or url details. + */ model QnaSourceMetadata { - @doc("Friendly name of the Source.") + /** + * Friendly name of the Source. + */ @maxLength(200) @minLength(1) displayName?: string; - @doc(""" -Unique source identifier. Name of the file if it's a 'file' source; otherwise, -the complete URL if it's a 'url' source. -""") + /** + * Unique source identifier. Name of the file if it's a 'file' source; otherwise, + * the complete URL if it's a 'url' source. + */ // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one @key source: string; - @doc("URI location for the file or url.") - sourceUri: string; + /** + * URI location for the file or url. + */ + sourceUri: url; - @doc("Supported source types.") + /** + * Supported source types. + */ sourceKind: SourceKind; - @doc("Content structure type for sources.") + /** + * Content structure type for sources. + */ contentStructureKind?: SourceContentStructureKind; } -@doc("Source to be updated.") +/** + * Source to be updated. + */ model UpdateSourceRecord { - @doc("Update operation type for assets.") + /** + * Update operation type for assets. + */ `op`: UpdateOperationKind; - @doc("Update source record.") + /** + * Update source record. + */ value: UpdateQnaSourceRecord; } -@doc("Update source record.") +/** + * Update source record. + */ model UpdateQnaSourceRecord { ...QnaSourceMetadata; ...RefreshSourceOptions; } -@doc("Boolean flag used to refresh data from the Source.") +/** + * Boolean flag used to refresh data from the Source. + */ model RefreshSourceOptions { - @doc("Boolean flag used to refresh data from the Source.") + /** + * Boolean flag used to refresh data from the Source. + */ refresh?: boolean; } -@doc("All QnA assets for the project.") +/** + * All QnA assets for the project. + */ model QnaAssets is Azure.Core.Page; -@doc("QnA record to be updated.") +/** + * QnA record to be updated. + */ model UpdateQnaRecord { - @doc("Update operation type for assets.") + /** + * Update operation type for assets. + */ `op`: UpdateOperationKind; - @doc("QnA record.") + /** + * QnA record. + */ value: QnaRecord; } -@doc("Feedback for Active Learning.") +/** + * Feedback for Active Learning. + */ model ActiveLearningFeedback { - @doc("A list of Feedback Records for Active Learning.") + /** + * A list of Feedback Records for Active Learning. + */ records?: FeedbackRecord[]; } -@doc("Feedback Record for Active Learning.") +/** + * Feedback Record for Active Learning. + */ model FeedbackRecord { - @doc("Unique identifier of the user.") + /** + * Unique identifier of the user. + */ userId?: string; - @doc("User suggested question for the QnA.") + /** + * User suggested question for the QnA. + */ userQuestion?: string; - @doc("Unique ID of the QnA.") + /** + * Unique ID of the QnA. + */ qnaId?: int32; } diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp index 3df4e93955..9a1e34dc6b 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp @@ -8,34 +8,46 @@ using TypeSpec.Http; namespace MicrosoftCognitiveLanguageServiceQuestionAnsweringAuthoring; interface QuestionAnsweringProjectsOperations { + /** + * Gets all projects for a user. + */ @summary("Gets all projects for a user.") - @doc("Gets all projects for a user.") @route("/authoring/query-knowledgebases/projects") @get - ListProjects is Azure.Core.Foundations.Operation< + listProjects is Azure.Core.Foundations.Operation< { - @doc("The maximum number of resources to return from the collection.") + /** + * The maximum number of resources to return from the collection. + */ @query("top") top?: int32; - @doc("An offset into the collection of the first resource to be returned.") + /** + * An offset into the collection of the first resource to be returned. + */ @query("skip") skip?: int32; - @doc("The maximum number of resources to include in a single response.") + /** + * The maximum number of resources to include in a single response. + */ @query("maxpagesize") maxpagesize?: int32; }, ProjectsMetadata >; + /** + * Get the requested project metadata. + */ @summary("Get the requested project metadata.") - @doc("Get the requested project metadata.") @route("/authoring/query-knowledgebases/projects/{projectName}") @get - GetProjectDetails is Azure.Core.Foundations.Operation< + getProjectDetails is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; @@ -43,31 +55,41 @@ interface QuestionAnsweringProjectsOperations { ProjectMetadata >; + /** + * Create or update a project. + */ @summary("Create or update a project.") - @doc("Create or update a project.") @route("/authoring/query-knowledgebases/projects/{projectName}") @patch - CreateProject is Azure.Core.Foundations.Operation< + createProject is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("Parameters needed to create the project.") + /** + * Parameters needed to create the project. + */ @body body: CreateProjectOptions; }, ProjectMetadata >; + /** + * Delete the project. + */ @summary("Delete the project.") - @doc("Delete the project.") @route("/authoring/query-knowledgebases/projects/{projectName}") @delete - DeleteProject is Azure.Core.Foundations.Operation< + deleteProject is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; @@ -75,359 +97,483 @@ interface QuestionAnsweringProjectsOperations { void >; + /** + * Gets the status of a Project delete job. + */ @summary("Gets the status of a Project delete job.") - @doc("Gets the status of a Project delete job.") @route("/authoring/query-knowledgebases/projects/deletion-jobs/{jobId}") @get - GetDeleteStatus is Azure.Core.Foundations.Operation< + getDeleteStatus is Azure.Core.Foundations.Operation< { - @doc("Job ID.") + /** + * Job ID. + */ @path jobId: string; }, JobState >; + /** + * Export project metadata and assets. + */ @summary("Export project metadata and assets.") - @doc("Export project metadata and assets.") @route("/authoring/query-knowledgebases/projects/{projectName}/:export") @post - Export is Azure.Core.Foundations.Operation< + export is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("Knowledge base Import or Export format.") + /** + * Knowledge base Import or Export format. + */ @query("format") format?: Format = Format.json; - @doc("Kind of the asset of the project.") + /** + * Kind of the asset of the project. + */ @query("assetKind") assetKind?: AssetKind; }, ExportJobState | void >; + /** + * Gets the status of an Export job, once job completes, returns the project + * metadata, and assets. + */ @summary(""" Gets the status of an Export job, once job completes, returns the project metadata, and assets. -""") - @doc(""" -Gets the status of an Export job, once job completes, returns the project -metadata, and assets. """) @route("/authoring/query-knowledgebases/projects/{projectName}/export/jobs/{jobId}") @get - GetExportStatus is Azure.Core.Foundations.Operation< + getExportStatus is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("Job ID.") + /** + * Job ID. + */ @path jobId: string; }, ExportJobState >; + /** + * Import project assets. + */ @summary("Import project assets.") - @doc("Import project assets.") @route("/authoring/query-knowledgebases/projects/{projectName}/:import") @post - Import is Azure.Core.Foundations.Operation< + `import` is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("Knowledge base Import or Export format.") + /** + * Knowledge base Import or Export format. + */ @query("format") format?: Format = Format.json; - @doc("Kind of the asset of the project.") + /** + * Kind of the asset of the project. + */ @query("assetKind") assetKind?: AssetKind; - @doc("Project assets the needs to be imported.") + /** + * Project assets the needs to be imported. + */ @body body?: ImportJobOptions; }, void >; + /** + * Gets the status of an Import job. + */ @summary("Gets the status of an Import job.") - @doc("Gets the status of an Import job.") @route("/authoring/query-knowledgebases/projects/{projectName}/import/jobs/{jobId}") @get - GetImportStatus is Azure.Core.Foundations.Operation< + getImportStatus is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("Job ID.") + /** + * Job ID. + */ @path jobId: string; }, JobState >; + /** + * Deploy project to production. + */ @summary("Deploy project to production.") - @doc("Deploy project to production.") @route("/authoring/query-knowledgebases/projects/{projectName}/deployments/{deploymentName}") @put - DeployProject is Azure.Core.Foundations.Operation< + deployProject is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The name of the specific deployment of the project to use.") + /** + * The name of the specific deployment of the project to use. + */ @path deploymentName: string; }, void >; + /** + * Gets the status of a Deploy job. + */ @summary("Gets the status of a Deploy job.") - @doc("Gets the status of a Deploy job.") @route("/authoring/query-knowledgebases/projects/{projectName}/deployments/{deploymentName}/jobs/{jobId}") @get - GetDeployStatus is Azure.Core.Foundations.Operation< + getDeployStatus is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The name of the specific deployment of the project to use.") + /** + * The name of the specific deployment of the project to use. + */ @path deploymentName: string; - @doc("Job ID.") + /** + * Job ID. + */ @path jobId: string; }, JobState >; + /** + * List all deployments of a project. + */ @summary("List all deployments of a project.") - @doc("List all deployments of a project.") @route("/authoring/query-knowledgebases/projects/{projectName}/deployments") @get - ListDeployments is Azure.Core.Foundations.Operation< + listDeployments is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The maximum number of resources to return from the collection.") + /** + * The maximum number of resources to return from the collection. + */ @query("top") top?: int32; - @doc("An offset into the collection of the first resource to be returned.") + /** + * An offset into the collection of the first resource to be returned. + */ @query("skip") skip?: int32; - @doc("The maximum number of resources to include in a single response.") + /** + * The maximum number of resources to include in a single response. + */ @query("maxpagesize") maxpagesize?: int32; }, ProjectDeployments >; + /** + * Gets all the synonyms of a project. + */ @summary("Gets all the synonyms of a project.") - @doc("Gets all the synonyms of a project.") @route("/authoring/query-knowledgebases/projects/{projectName}/synonyms") @get - GetSynonyms is Azure.Core.Foundations.Operation< + getSynonyms is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The maximum number of resources to return from the collection.") + /** + * The maximum number of resources to return from the collection. + */ @query("top") top?: int32; - @doc("An offset into the collection of the first resource to be returned.") + /** + * An offset into the collection of the first resource to be returned. + */ @query("skip") skip?: int32; - @doc("The maximum number of resources to include in a single response.") + /** + * The maximum number of resources to include in a single response. + */ @query("maxpagesize") maxpagesize?: int32; }, SynonymAssets >; + /** + * Updates all the synonyms of a project. + */ @summary("Updates all the synonyms of a project.") - @doc("Updates all the synonyms of a project.") @route("/authoring/query-knowledgebases/projects/{projectName}/synonyms") @put - UpdateSynonyms is Azure.Core.Foundations.Operation< + updateSynonyms is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("All the synonyms of a project.") + /** + * All the synonyms of a project. + */ @body body: SynonymAssets; }, void >; + /** + * Gets all the sources of a project. + */ @summary("Gets all the sources of a project.") - @doc("Gets all the sources of a project.") @route("/authoring/query-knowledgebases/projects/{projectName}/sources") @get - GetSources is Azure.Core.Foundations.Operation< + getSources is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("The maximum number of resources to return from the collection.") + /** + * The maximum number of resources to return from the collection. + */ @query("top") top?: int32; - @doc("An offset into the collection of the first resource to be returned.") + /** + * An offset into the collection of the first resource to be returned. + */ @query("skip") skip?: int32; - @doc("The maximum number of resources to include in a single response.") + /** + * The maximum number of resources to include in a single response. + */ @query("maxpagesize") maxpagesize?: int32; }, QnaSources >; + /** + * Updates the sources of a project. + */ @summary("Updates the sources of a project.") - @doc("Updates the sources of a project.") @route("/authoring/query-knowledgebases/projects/{projectName}/sources") @patch - UpdateSources is Azure.Core.Foundations.Operation< + updateSources is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("Update sources parameters of a project.") + /** + * Update sources parameters of a project. + */ @body body: UpdateSourceRecord[]; }, void >; + /** + * Gets the status of update sources job. + */ @summary("Gets the status of update sources job.") - @doc("Gets the status of update sources job.") @route("/authoring/query-knowledgebases/projects/{projectName}/sources/jobs/{jobId}") @get - GetUpdateSourcesStatus is Azure.Core.Foundations.Operation< + getUpdateSourcesStatus is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("Job ID.") + /** + * Job ID. + */ @path jobId: string; }, JobState >; + /** + * Gets all the QnAs of a project. + */ @summary("Gets all the QnAs of a project.") - @doc("Gets all the QnAs of a project.") @route("/authoring/query-knowledgebases/projects/{projectName}/qnas") @get - GetQnas is Azure.Core.Foundations.Operation< + getQnas is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("Source of the QnA.") + /** + * Source of the QnA. + */ @query("source") source?: string; - @doc("The maximum number of resources to return from the collection.") + /** + * The maximum number of resources to return from the collection. + */ @query("top") top?: int32; - @doc("An offset into the collection of the first resource to be returned.") + /** + * An offset into the collection of the first resource to be returned. + */ @query("skip") skip?: int32; - @doc("The maximum number of resources to include in a single response.") + /** + * The maximum number of resources to include in a single response. + */ @query("maxpagesize") maxpagesize?: int32; }, QnaAssets >; + /** + * Updates the QnAs of a project. + */ @summary("Updates the QnAs of a project.") - @doc("Updates the QnAs of a project.") @route("/authoring/query-knowledgebases/projects/{projectName}/qnas") @patch - UpdateQnas is Azure.Core.Foundations.Operation< + updateQnas is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("Update QnAs parameters of a project.") + /** + * Update QnAs parameters of a project. + */ @body body: UpdateQnaRecord[]; }, void >; + /** + * Gets the status of update QnAs job. + */ @summary("Gets the status of update QnAs job.") - @doc("Gets the status of update QnAs job.") @route("/authoring/query-knowledgebases/projects/{projectName}/qnas/jobs/{jobId}") @get - GetUpdateQnasStatus is Azure.Core.Foundations.Operation< + getUpdateQnasStatus is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("Job ID.") + /** + * Job ID. + */ @path jobId: string; }, JobState >; + /** + * Update Active Learning feedback. + */ @summary("Update Active Learning feedback.") - @doc("Update Active Learning feedback.") @route("/authoring/query-knowledgebases/projects/{projectName}/feedback") @post - AddFeedback is Azure.Core.Foundations.Operation< + addFeedback is Azure.Core.Foundations.Operation< { - @doc("The name of the project to use.") + /** + * The name of the project to use. + */ @maxLength(100) @path projectName: string; - @doc("Feedback for Active Learning.") + /** + * Feedback for Active Learning. + */ @body body: ActiveLearningFeedback; }, diff --git a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/main.tsp index 669b63fb90..617ac840ce 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/main.tsp @@ -4,6 +4,9 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +/** + * An API for QnAMaker runtime + */ @service({ title: "QnAMaker Runtime Client", }) @@ -14,5 +17,4 @@ using TypeSpec.Http; RuntimeEndpoint: string, } ) -@doc("An API for QnAMaker runtime") namespace QnAMakerRuntimeClient; diff --git a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp index 8d6391c095..bc2dbe048c 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp @@ -6,13 +6,17 @@ using TypeSpec.Http; namespace QnAMakerRuntimeClient; -@doc("Optional field. Set to OR for using OR as Operation for Strict Filters.") +/** + * Optional field. Set to OR for using OR as Operation for Strict Filters. + */ enum StrictFiltersCompoundOperationType { AND, OR, } -@doc("Human readable error code.") +/** + * Human readable error code. + */ enum ErrorCodeType { BadArgument, Forbidden, @@ -30,239 +34,347 @@ enum ErrorCodeType { ExtractionFailure, } -@doc("POST body schema to query the knowledgebase.") +/** + * POST body schema to query the knowledgebase. + */ model QueryDTO { - @doc(""" -Exact qnaId to fetch from the knowledgebase, this field takes priority over -question. -""") + /** + * Exact qnaId to fetch from the knowledgebase, this field takes priority over + * question. + */ qnaId?: string; - @doc("User question to query against the knowledge base.") + /** + * User question to query against the knowledge base. + */ question?: string; - @doc("Max number of answers to be returned for the question.") + /** + * Max number of answers to be returned for the question. + */ top?: int32; - @doc(""" -Unique identifier for the user. Optional parameter for telemetry. For more -information, refer Analytics and Telemetry. -""") + /** + * Unique identifier for the user. Optional parameter for telemetry. For more + * information, refer Analytics and Telemetry. + */ userId?: string; - @doc("Query against the test index.") + /** + * Query against the test index. + */ isTest?: boolean; - @doc("Threshold for answers returned based on score.") + /** + * Threshold for answers returned based on score. + */ scoreThreshold?: float32; - @doc("Context object with previous QnA's information.") + /** + * Context object with previous QnA's information. + */ context?: QueryDTOContext; - @doc("Optional field. Set to 'QuestionOnly' for using a question only Ranker.") + /** + * Optional field. Set to 'QuestionOnly' for using a question only Ranker. + */ rankerType?: string; - @doc("Find only answers that contain these metadata.") + /** + * Find only answers that contain these metadata. + */ strictFilters?: MetadataDTO[]; - @doc("Optional field. Set to OR for using OR as Operation for Strict Filters.") + /** + * Optional field. Set to OR for using OR as Operation for Strict Filters. + */ strictFiltersCompoundOperationType?: StrictFiltersCompoundOperationType; } -@doc("Context object with previous QnA's information.") +/** + * Context object with previous QnA's information. + */ model QueryDTOContext extends QueryContextDTO {} -@doc("Context object with previous QnA's information.") +/** + * Context object with previous QnA's information. + */ model QueryContextDTO { - @doc("Previous QnA Id - qnaId of the top result.") + /** + * Previous QnA Id - qnaId of the top result. + */ previousQnaId?: string; - @doc("Previous user query.") + /** + * Previous user query. + */ previousUserQuery?: string; } -@doc("Name - value pair of metadata.") +/** + * Name - value pair of metadata. + */ model MetadataDTO { - @doc("Metadata name.") + /** + * Metadata name. + */ @maxLength(100) @minLength(1) name: string; - @doc("Metadata value.") + /** + * Metadata value. + */ @maxLength(500) @minLength(1) value: string; } -@doc("Represents List of Question Answers.") +/** + * Represents List of Question Answers. + */ model QnASearchResultList { - @doc("Represents Search Result list.") + /** + * Represents Search Result list. + */ answers?: QnASearchResult[]; } -@doc("Represents Search Result.") +/** + * Represents Search Result. + */ model QnASearchResult { - @doc("List of questions.") + /** + * List of questions. + */ questions?: string[]; - @doc("Answer.") + /** + * Answer. + */ answer?: string; - @doc("Search result score.") + /** + * Search result score. + */ score?: float32; - @doc("Id of the QnA result.") + /** + * Id of the QnA result. + */ id?: int32; - @doc("Source of QnA result.") + /** + * Source of QnA result. + */ source?: string; - @doc("List of metadata.") + /** + * List of metadata. + */ metadata?: MetadataDTO[]; - @doc("Context object of the QnA") + /** + * Context object of the QnA + */ context?: QnASearchResultContext; } -@doc("Context object of the QnA") +/** + * Context object of the QnA + */ model QnASearchResultContext extends ContextDTO {} -@doc("Context associated with Qna.") +/** + * Context associated with Qna. + */ model ContextDTO { - @doc(""" -To mark if a prompt is relevant only with a previous question or not. + /** +* To mark if a prompt is relevant only with a previous question or not. true - Do -not include this QnA as search result for queries without context +* not include this QnA as search result for queries without context false - -ignores context and includes this QnA in search result -""") +* ignores context and includes this QnA in search result +*/ isContextOnly?: boolean; - @doc("List of prompts associated with the answer.") + /** + * List of prompts associated with the answer. + */ prompts?: PromptDTO[]; } -@doc("Prompt for an answer.") +/** + * Prompt for an answer. + */ model PromptDTO { - @doc("Index of the prompt - used in ordering of the prompts") + /** + * Index of the prompt - used in ordering of the prompts + */ displayOrder?: int32; - @doc(""" -Qna id corresponding to the prompt - if QnaId is present, QnADTO object is -ignored. -""") + /** + * Qna id corresponding to the prompt - if QnaId is present, QnADTO object is + * ignored. + */ qnaId?: int32; - @doc("QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object") + /** + * QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object + */ qna?: PromptDTOQna; - @doc("Text displayed to represent a follow up question prompt") + /** + * Text displayed to represent a follow up question prompt + */ @maxLength(200) displayText?: string; } -@doc("QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object") +/** + * QnADTO - Either QnaId or QnADTO needs to be present in a PromptDTO object + */ model PromptDTOQna extends QnAdto {} -@doc("Q-A object.") +/** + * Q-A object. + */ model QnAdto { - @doc("Unique id for the Q-A.") + /** + * Unique id for the Q-A. + */ id?: int32; - @doc("Answer text") + /** + * Answer text + */ @maxLength(25000) @minLength(1) answer: string; - @doc(""" -Source from which Q-A was indexed. eg. -https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs -""") + /** + * Source from which Q-A was indexed. eg. + * https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/FAQs + */ @maxLength(300) source?: string; - @doc("List of questions associated with the answer.") + /** + * List of questions associated with the answer. + */ questions: string[]; - @doc("List of metadata associated with the answer.") + /** + * List of metadata associated with the answer. + */ metadata?: MetadataDTO[]; - @doc("Context of a QnA") + /** + * Context of a QnA + */ context?: QnAdtoContext; } -@doc("Context of a QnA") +/** + * Context of a QnA + */ model QnAdtoContext extends ContextDTO {} -@doc(""" -Error response. As per Microsoft One API guidelines - -https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. -""") +/** + * Error response. As per Microsoft One API guidelines - + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + */ @error model ErrorResponse { - @doc("The error object.") + /** + * The error object. + */ error?: ErrorResponseError; } -@doc("The error object.") +/** + * The error object. + */ model ErrorResponseError extends Error {} -@doc(""" -The error object. As per Microsoft One API guidelines - -https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. -""") +/** + * The error object. As per Microsoft One API guidelines - + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + */ model Error { - @doc("One of a server-defined set of error codes.") + /** + * One of a server-defined set of error codes. + */ code: ErrorCodeType; - @doc("A human-readable representation of the error.") + /** + * A human-readable representation of the error. + */ message?: string; - @doc("The target of the error.") + /** + * The target of the error. + */ target?: string; - @doc("An array of details about specific errors that led to this reported error.") + /** + * An array of details about specific errors that led to this reported error. + */ details?: Error[]; - @doc(""" -An object containing more specific information than the current object about -the error. -""") + /** + * An object containing more specific information than the current object about + * the error. + */ innerError?: InnerErrorModel; } -@doc(""" -An object containing more specific information about the error. As per -Microsoft One API guidelines - -https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. -""") +/** + * An object containing more specific information about the error. As per + * Microsoft One API guidelines - + * https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. + */ model InnerErrorModel { - @doc("A more specific error code than was provided by the containing error.") + /** + * A more specific error code than was provided by the containing error. + */ code?: string; - @doc(""" -An object containing more specific information than the current object about -the error. -""") + /** + * An object containing more specific information than the current object about + * the error. + */ innerError?: InnerErrorModel; } -@doc("Active learning feedback records.") +/** + * Active learning feedback records. + */ model FeedbackRecordsDTO { - @doc("List of feedback records.") + /** + * List of feedback records. + */ feedbackRecords?: FeedbackRecordDTO[]; } -@doc("Active learning feedback record.") +/** + * Active learning feedback record. + */ model FeedbackRecordDTO { - @doc("Unique identifier for the user.") + /** + * Unique identifier for the user. + */ userId?: string; - @doc("The suggested question being provided as feedback.") + /** + * The suggested question being provided as feedback. + */ @maxLength(1000) userQuestion?: string; - @doc("The qnaId for which the suggested question is provided as feedback.") + /** + * The qnaId for which the suggested question is provided as feedback. + */ qnaId?: int32; } diff --git a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/routes.tsp index 368e6fd409..b2a3851af1 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/routes.tsp @@ -8,34 +8,46 @@ using TypeSpec.Http; namespace QnAMakerRuntimeClient; interface RuntimeOperations { + /** + * GenerateAnswer call to query the knowledgebase. + */ @summary("GenerateAnswer call to query the knowledgebase.") - @doc("GenerateAnswer call to query the knowledgebase.") @route("/knowledgebases/{kbId}/generateAnswer") @post - GenerateAnswer is Azure.Core.Foundations.Operation< + generateAnswer is Azure.Core.Foundations.Operation< { - @doc("Knowledgebase id.") + /** + * Knowledgebase id. + */ @path kbId: string; - @doc("Post body of the request.") + /** + * Post body of the request. + */ @body generateAnswerPayload: QueryDTO; }, QnASearchResultList >; + /** + * Train call to add suggestions to the knowledgebase. + */ @summary("Train call to add suggestions to the knowledgebase.") - @doc("Train call to add suggestions to the knowledgebase.") @route("/knowledgebases/{kbId}/train") @post - Train is Azure.Core.Foundations.Operation< + train is Azure.Core.Foundations.Operation< { - @doc("Knowledgebase id.") + /** + * Knowledgebase id. + */ @path kbId: string; - @doc("Post body of the request.") + /** + * Post body of the request. + */ @body trainPayload: FeedbackRecordsDTO; }, diff --git a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp index a3a21efaa9..30d7a44806 100644 --- a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp @@ -4,6 +4,10 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +/** + * Azure Schema Registry is as a central schema repository, with support for + * versioning, management, compatibility checking, and RBAC. + */ @service({ title: "Azure Schema Registry", }) @@ -15,14 +19,14 @@ using TypeSpec.Http; endpoint: string, } ) -@doc(""" -Azure Schema Registry is as a central schema repository, with support for -versioning, management, compatibility checking, and RBAC. -""") namespace AzureSchemaRegistry; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { - @doc("The 2021-10 API version.") + /** + * The 2021-10 API version. + */ v2021_10: "2021-10", } diff --git a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/models.tsp index b3eb4a6e66..0413b84d08 100644 --- a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/models.tsp @@ -6,42 +6,64 @@ using TypeSpec.Http; namespace AzureSchemaRegistry; -@doc("Array received from the registry containing the list of schema groups.") +/** + * Array received from the registry containing the list of schema groups. + */ model SchemaGroups { - @doc("Array of schema groups.") + /** + * Array of schema groups. + */ schemaGroups?: string[]; } -@doc("An error response returned from Azure Schema Registry service.") +/** + * An error response returned from Azure Schema Registry service. + */ @error model Error { - @doc("Error response returned from Azure Schema Registry service.") + /** + * Error response returned from Azure Schema Registry service. + */ error: ErrorDetail; } -@doc("Error response returned from Azure Schema Registry service.") +/** + * Error response returned from Azure Schema Registry service. + */ model ErrorDetail { - @doc("Type of error.") + /** + * Type of error. + */ code: string; - @doc("Brief description of error.") + /** + * Brief description of error. + */ message: string; - @doc("Error message details to help user understand/debug failure.") + /** + * Error message details to help user understand/debug failure. + */ details?: ErrorDetail[]; } -@doc(""" -Array received from the registry containing the list of versions for specific -schema. -""") +/** + * Array received from the registry containing the list of versions for specific + * schema. + */ model SchemaVersions { - @doc("Array of schema groups.") + /** + * Array of schema groups. + */ schemaVersions?: int32[]; } -@doc("Object received from the registry containing schema identifiers.") +/** + * Object received from the registry containing schema identifiers. + */ model SchemaId { - @doc("Schema ID that uniquely identifies a schema in the registry namespace.") + /** + * Schema ID that uniquely identifies a schema in the registry namespace. + */ id?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/routes.tsp index 6f3870b6d9..06a5565822 100644 --- a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/routes.tsp @@ -8,49 +8,59 @@ using TypeSpec.Http; namespace AzureSchemaRegistry; interface SchemaGroupsOperations { + /** + * Gets the list of schema groups user is authorized to access. + */ @summary("Get list of schema groups.") - @doc("Gets the list of schema groups user is authorized to access.") @route("/$schemaGroups") @get - List is Azure.Core.Foundations.Operation<{}, SchemaGroups>; + list is Azure.Core.Foundations.Operation<{}, SchemaGroups>; } interface SchemaOperations { + /** + * Gets a registered schema by its unique ID. Azure Schema Registry guarantees + * that ID is unique within a namespace. Operation response type is based on + * serialization of schema requested. + */ @summary("Get a registered schema by its unique ID reference.") - @doc(""" -Gets a registered schema by its unique ID. Azure Schema Registry guarantees -that ID is unique within a namespace. Operation response type is based on -serialization of schema requested. -""") @route("/$schemaGroups/$schemas/{id}") @get - GetById is Azure.Core.Foundations.Operation< + getById is Azure.Core.Foundations.Operation< { - @doc("References specific schema in registry namespace.") + /** + * References specific schema in registry namespace. + */ @path id: string; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/json; serialization=Avro"; }, void >; + /** + * Gets the list of all versions of one schema. + */ @summary("Get list schema versions.") - @doc("Gets the list of all versions of one schema.") @route("/$schemaGroups/{groupName}/schemas/{schemaName}/versions") @get - GetVersions is Azure.Core.Foundations.Operation< + getVersions is Azure.Core.Foundations.Operation< { - @doc(""" -Schema group under which schema is registered. Group's serialization type -should match the serialization type specified in the request. -""") + /** + * Schema group under which schema is registered. Group's serialization type + * should match the serialization type specified in the request. + */ @path groupName: string; - @doc("Name of schema.") + /** + * Name of schema. + */ @maxLength(50) @pattern("^[A-Za-z0-9][^\\\\/$:]*$") @path @@ -59,86 +69,100 @@ should match the serialization type specified in the request. SchemaVersions >; + /** + * Gets one specific version of one schema. + */ @summary("Get specific schema versions.") - @doc("Gets one specific version of one schema.") @route("/$schemaGroups/{groupName}/schemas/{schemaName}/versions/{schemaVersion}") @get - GetSchemaVersion is Azure.Core.Foundations.Operation< + getSchemaVersion is Azure.Core.Foundations.Operation< { - @doc(""" -Schema group under which schema is registered. Group's serialization type -should match the serialization type specified in the request. -""") + /** + * Schema group under which schema is registered. Group's serialization type + * should match the serialization type specified in the request. + */ @path groupName: string; - @doc("Name of schema.") + /** + * Name of schema. + */ @maxLength(50) @pattern("^[A-Za-z0-9][^\\\\/$:]*$") @path schemaName: string; - @doc("Version number of specific schema.") + /** + * Version number of specific schema. + */ @path schemaVersion: int32; }, void >; + /** + * Gets the ID referencing an existing schema within the specified schema group, + * as matched by schema content comparison. + */ @summary("Get ID for existing schema.") - @doc(""" -Gets the ID referencing an existing schema within the specified schema group, -as matched by schema content comparison. -""") @route("/$schemaGroups/{groupName}/schemas/{schemaName}:get-id") @post - QueryIdByContent is Azure.Core.Foundations.Operation< + queryIdByContent is Azure.Core.Foundations.Operation< { - @doc(""" -Schema group under which schema is registered. Group's serialization type -should match the serialization type specified in the request. -""") + /** + * Schema group under which schema is registered. Group's serialization type + * should match the serialization type specified in the request. + */ @path groupName: string; - @doc("Name of schema.") + /** + * Name of schema. + */ @maxLength(50) @pattern("^[A-Za-z0-9][^\\\\/$:]*$") @path schemaName: string; - @doc("String representation (UTF-8) of the registered schema.") + /** + * String representation (UTF-8) of the registered schema. + */ @body schemaContent: bytes; }, void >; - @summary("Register new schema") - @doc(""" -Register new schema. If schema of specified name does not exist in specified -group, schema is created at version 1. If schema of specified name exists -already in specified group, schema is created at latest version + 1. + /** +* Register new schema. If schema of specified name does not exist in specified +* group, schema is created at version 1. If schema of specified name exists +* already in specified group, schema is created at latest version + 1. -""") +*/ + @summary("Register new schema") @route("/$schemaGroups/{groupName}/schemas/{schemaName}") @put - Register is Azure.Core.Foundations.Operation< + register is Azure.Core.Foundations.Operation< { - @doc(""" -Schema group under which schema should be registered. Group's serialization -type should match the serialization type specified in the request. -""") + /** + * Schema group under which schema should be registered. Group's serialization + * type should match the serialization type specified in the request. + */ @path groupName: string; - @doc("Name of schema.") + /** + * Name of schema. + */ @maxLength(50) @pattern("^[A-Za-z0-9][^\\\\/$:]*$") @path schemaName: string; - @doc("String representation (UTF-8) of the schema being registered.") + /** + * String representation (UTF-8) of the schema being registered. + */ @body schemaContent: bytes; }, diff --git a/packages/extensions/openapi-to-typespec/test/url/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/url/tsp-output/main.tsp index adf2dae02f..160c8b3d3a 100644 --- a/packages/extensions/openapi-to-typespec/test/url/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/url/tsp-output/main.tsp @@ -4,6 +4,9 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +/** + * Test Infrastructure for AutoRest + */ @service({ title: "AutoRest Url Test Service", }) @@ -14,5 +17,4 @@ using TypeSpec.Http; $host: string, } ) -@doc("Test Infrastructure for AutoRest") namespace AutoRestUrlTestService; diff --git a/packages/extensions/openapi-to-typespec/test/url/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/url/tsp-output/routes.tsp index ad101a5150..b980fac684 100644 --- a/packages/extensions/openapi-to-typespec/test/url/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/url/tsp-output/routes.tsp @@ -8,340 +8,438 @@ using TypeSpec.Http; namespace AutoRestUrlTestService; interface pathsOperations { - @doc("Get true Boolean value on path") + /** + * Get true Boolean value on path + */ @route("/paths/bool/true/{boolPath}") @get getBooleanTrue is Azure.Core.Foundations.Operation< { - @doc("true boolean value") + /** + * true boolean value + */ @path boolPath: true; }, void >; - @doc("Get false Boolean value on path") + /** + * Get false Boolean value on path + */ @route("/paths/bool/false/{boolPath}") @get getBooleanFalse is Azure.Core.Foundations.Operation< { - @doc("false boolean value") + /** + * false boolean value + */ @path boolPath: false; }, void >; - @doc("Get '1000000' integer value") + /** + * Get '1000000' integer value + */ @route("/paths/int/1000000/{intPath}") @get getIntOneMillion is Azure.Core.Foundations.Operation< { - @doc("'1000000' integer value") + /** + * '1000000' integer value + */ @path intPath: 1000000; }, void >; - @doc("Get '-1000000' integer value") + /** + * Get '-1000000' integer value + */ @route("/paths/int/-1000000/{intPath}") @get getIntNegativeOneMillion is Azure.Core.Foundations.Operation< { - @doc("'-1000000' integer value") + /** + * '-1000000' integer value + */ @path intPath: -1000000; }, void >; - @doc("Get '10000000000' 64 bit integer value") + /** + * Get '10000000000' 64 bit integer value + */ @route("/paths/long/10000000000/{longPath}") @get getTenBillion is Azure.Core.Foundations.Operation< { - @doc("'10000000000' 64 bit integer value") + /** + * '10000000000' 64 bit integer value + */ @path longPath: 10000000000; }, void >; - @doc("Get '-10000000000' 64 bit integer value") + /** + * Get '-10000000000' 64 bit integer value + */ @route("/paths/long/-10000000000/{longPath}") @get getNegativeTenBillion is Azure.Core.Foundations.Operation< { - @doc("'-10000000000' 64 bit integer value") + /** + * '-10000000000' 64 bit integer value + */ @path longPath: -10000000000; }, void >; - @doc("Get '1.034E+20' numeric value") + /** + * Get '1.034E+20' numeric value + */ @route("/paths/float/1.034E+20/{floatPath}") @get floatScientificPositive is Azure.Core.Foundations.Operation< { - @doc("'1.034E+20'numeric value") + /** + * '1.034E+20'numeric value + */ @path floatPath: 103400000000000000000; }, void >; - @doc("Get '-1.034E-20' numeric value") + /** + * Get '-1.034E-20' numeric value + */ @route("/paths/float/-1.034E-20/{floatPath}") @get floatScientificNegative is Azure.Core.Foundations.Operation< { - @doc("'-1.034E-20'numeric value") + /** + * '-1.034E-20'numeric value + */ @path floatPath: -1.034e-20; }, void >; - @doc("Get '9999999.999' numeric value") + /** + * Get '9999999.999' numeric value + */ @route("/paths/double/9999999.999/{doublePath}") @get doubleDecimalPositive is Azure.Core.Foundations.Operation< { - @doc("'9999999.999'numeric value") + /** + * '9999999.999'numeric value + */ @path doublePath: 9999999.999; }, void >; - @doc("Get '-9999999.999' numeric value") + /** + * Get '-9999999.999' numeric value + */ @route("/paths/double/-9999999.999/{doublePath}") @get doubleDecimalNegative is Azure.Core.Foundations.Operation< { - @doc("'-9999999.999'numeric value") + /** + * '-9999999.999'numeric value + */ @path doublePath: -9999999.999; }, void >; - @doc("Get '啊齄丂狛狜隣郎隣兀﨩' multi-byte string value") + /** + * Get '啊齄丂狛狜隣郎隣兀﨩' multi-byte string value + */ @route("/paths/string/unicode/{stringPath}") @get stringUnicode is Azure.Core.Foundations.Operation< { - @doc("'啊齄丂狛狜隣郎隣兀﨩'multi-byte string value") + /** + * '啊齄丂狛狜隣郎隣兀﨩'multi-byte string value + */ @path stringPath: "啊齄丂狛狜隣郎隣兀﨩"; }, void >; - @doc("Get 'begin!*'();:@ &=+$,/?#[]end") + /** + * Get 'begin!*'();:@ &=+$,/?#[]end + */ @route("/paths/string/begin%21%2A%27%28%29%3B%3A%40%20%26%3D%2B%24%2C%2F%3F%23%5B%5Dend/{stringPath}") @get stringUrlEncoded is Azure.Core.Foundations.Operation< { - @doc("'begin!*'();:@ &=+$,/?#[]end' url encoded string value") + /** + * 'begin!*'();:@ &=+$,/?#[]end' url encoded string value + */ @path stringPath: "begin!*'();:@ &=+$,/?#[]end"; }, void >; + /** + * https://tools.ietf.org/html/rfc3986#appendix-A 'path' accept any 'pchar' not + * encoded + */ @summary("Get 'begin!*'();:@&=+$,end") - @doc(""" -https://tools.ietf.org/html/rfc3986#appendix-A 'path' accept any 'pchar' not -encoded -""") @route("/paths/string/begin!*'();:@&=+$,end/{stringPath}") @get stringUrlNonEncoded is Azure.Core.Foundations.Operation< { - @doc("'begin!*'();:@&=+$,end' url encoded string value") + /** + * 'begin!*'();:@&=+$,end' url encoded string value + */ @path stringPath: "begin!*'();:@&=+$,end"; }, void >; - @doc("Get ''") + /** + * Get '' + */ @route("/paths/string/empty/{stringPath}") @get stringEmpty is Azure.Core.Foundations.Operation< { - @doc("'' string value") + /** + * '' string value + */ @path stringPath: ""; }, void >; - @doc("Get null (should throw)") + /** + * Get null (should throw) + */ @route("/paths/string/null/{stringPath}") @get stringNull is Azure.Core.Foundations.Operation< { - @doc("null string value") + /** + * null string value + */ @path stringPath: string; }, void >; - @doc("Get using uri with 'green color' in path parameter") + /** + * Get using uri with 'green color' in path parameter + */ @route("/paths/enum/green%20color/{enumPath}") @get enumValid is Azure.Core.Foundations.Operation< { - @doc("send the value green") + /** + * send the value green + */ @path enumPath: UriColor; }, void >; - @doc("Get null (should throw on the client before the request is sent on wire)") + /** + * Get null (should throw on the client before the request is sent on wire) + */ @route("/paths/string/null/{enumPath}") @get enumNull is Azure.Core.Foundations.Operation< { - @doc("send null should throw") + /** + * send null should throw + */ @path enumPath: UriColor; }, void >; - @doc("Get '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array") + /** + * Get '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array + */ @route("/paths/byte/multibyte/{bytePath}") @get byteMultiByte is Azure.Core.Foundations.Operation< { - @doc("'啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array") + /** + * '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array + */ @path bytePath: bytes; }, void >; - @doc("Get '' as byte array") + /** + * Get '' as byte array + */ @route("/paths/byte/empty/{bytePath}") @get byteEmpty is Azure.Core.Foundations.Operation< { - @doc("'' as byte array") + /** + * '' as byte array + */ @path bytePath: ""; }, void >; - @doc("Get null as byte array (should throw)") + /** + * Get null as byte array (should throw) + */ @route("/paths/byte/null/{bytePath}") @get byteNull is Azure.Core.Foundations.Operation< { - @doc("null as byte array (should throw)") + /** + * null as byte array (should throw) + */ @path bytePath: bytes; }, void >; - @doc("Get '2012-01-01' as date") + /** + * Get '2012-01-01' as date + */ @route("/paths/date/2012-01-01/{datePath}") @get - DateValid is Azure.Core.Foundations.Operation< + dateValid is Azure.Core.Foundations.Operation< { - @doc("'2012-01-01' as date") + /** + * '2012-01-01' as date + */ @path datePath: "2012-01-01"; }, void >; - @doc(""" -Get null as date - this should throw or be unusable on the client side, -depending on date representation -""") + /** + * Get null as date - this should throw or be unusable on the client side, + * depending on date representation + */ @route("/paths/date/null/{datePath}") @get - DateNull is Azure.Core.Foundations.Operation< + dateNull is Azure.Core.Foundations.Operation< { - @doc("null as date (should throw)") + /** + * null as date (should throw) + */ @path datePath: plainDate; }, void >; - @doc("Get '2012-01-01T01:01:01Z' as date-time") + /** + * Get '2012-01-01T01:01:01Z' as date-time + */ @route("/paths/datetime/2012-01-01T01%3A01%3A01Z/{dateTimePath}") @get - DateTimeValid is Azure.Core.Foundations.Operation< + dateTimeValid is Azure.Core.Foundations.Operation< { - @doc("'2012-01-01T01:01:01Z' as date-time") + /** + * '2012-01-01T01:01:01Z' as date-time + */ @path dateTimePath: "2012-01-01T01:01:01Z"; }, void >; - @doc(""" -Get null as date-time, should be disallowed or throw depending on -representation of date-time -""") + /** + * Get null as date-time, should be disallowed or throw depending on + * representation of date-time + */ @route("/paths/datetime/null/{dateTimePath}") @get - DateTimeNull is Azure.Core.Foundations.Operation< + dateTimeNull is Azure.Core.Foundations.Operation< { - @doc("null as date-time") + /** + * null as date-time + */ @path dateTimePath: utcDateTime; }, void >; - @doc("Get 'lorem' encoded value as 'bG9yZW0' (base64url)") + /** + * Get 'lorem' encoded value as 'bG9yZW0' (base64url) + */ @route("/paths/string/bG9yZW0/{base64UrlPath}") @get base64Url is Azure.Core.Foundations.Operation< { - @doc("base64url encoded value") + /** + * base64url encoded value + */ @path base64UrlPath: bytes; }, void >; - @doc(""" -Get an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] -using the csv-array format -""") + /** + * Get an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] + * using the csv-array format + */ @route("/paths/array/ArrayPath1%2cbegin%21%2A%27%28%29%3B%3A%40%20%26%3D%2B%24%2C%2F%3F%23%5B%5Dend%2c%2c/{arrayPath}") @get - ArrayCsvInPath is Azure.Core.Foundations.Operation< + arrayCsvInPath is Azure.Core.Foundations.Operation< { - @doc(""" -an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] -using the csv-array format -""") + /** + * an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] + * using the csv-array format + */ @path arrayPath: string[]; }, void >; - @doc("Get the date 2016-04-13 encoded value as '1460505600' (Unix time)") + /** + * Get the date 2016-04-13 encoded value as '1460505600' (Unix time) + */ @route("/paths/int/1460505600/{unixTimeUrlPath}") @get unixTimeUrl is Azure.Core.Foundations.Operation< { - @doc("Unix time encoded value") + /** + * Unix time encoded value + */ @path unixTimeUrlPath: plainTime; }, @@ -350,354 +448,466 @@ using the csv-array format } interface queriesOperations { - @doc("Get true Boolean value on path") + /** + * Get true Boolean value on path + */ @route("/queries/bool/true") @get getBooleanTrue is Azure.Core.Foundations.Operation< { - @doc("true boolean value") + /** + * true boolean value + */ @query("boolQuery") boolQuery: true; }, void >; - @doc("Get false Boolean value on path") + /** + * Get false Boolean value on path + */ @route("/queries/bool/false") @get getBooleanFalse is Azure.Core.Foundations.Operation< { - @doc("false boolean value") + /** + * false boolean value + */ @query("boolQuery") boolQuery: false; }, void >; - @doc("Get null Boolean value on query (query string should be absent)") + /** + * Get null Boolean value on query (query string should be absent) + */ @route("/queries/bool/null") @get getBooleanNull is Azure.Core.Foundations.Operation< { - @doc("null boolean value") + /** + * null boolean value + */ @query("boolQuery") boolQuery?: boolean; }, void >; - @doc("Get '1000000' integer value") + /** + * Get '1000000' integer value + */ @route("/queries/int/1000000") @get getIntOneMillion is Azure.Core.Foundations.Operation< { - @doc("'1000000' integer value") + /** + * '1000000' integer value + */ @query("intQuery") intQuery: 1000000; }, void >; - @doc("Get '-1000000' integer value") + /** + * Get '-1000000' integer value + */ @route("/queries/int/-1000000") @get getIntNegativeOneMillion is Azure.Core.Foundations.Operation< { - @doc("'-1000000' integer value") + /** + * '-1000000' integer value + */ @query("intQuery") intQuery: -1000000; }, void >; - @doc("Get null integer value (no query parameter)") + /** + * Get null integer value (no query parameter) + */ @route("/queries/int/null") @get getIntNull is Azure.Core.Foundations.Operation< { - @doc("null integer value") + /** + * null integer value + */ @query("intQuery") intQuery?: int32; }, void >; - @doc("Get '10000000000' 64 bit integer value") + /** + * Get '10000000000' 64 bit integer value + */ @route("/queries/long/10000000000") @get getTenBillion is Azure.Core.Foundations.Operation< { - @doc("'10000000000' 64 bit integer value") + /** + * '10000000000' 64 bit integer value + */ @query("longQuery") longQuery: 10000000000; }, void >; - @doc("Get '-10000000000' 64 bit integer value") + /** + * Get '-10000000000' 64 bit integer value + */ @route("/queries/long/-10000000000") @get getNegativeTenBillion is Azure.Core.Foundations.Operation< { - @doc("'-10000000000' 64 bit integer value") + /** + * '-10000000000' 64 bit integer value + */ @query("longQuery") longQuery: -10000000000; }, void >; - @doc("Get 'null 64 bit integer value (no query param in uri)") + /** + * Get 'null 64 bit integer value (no query param in uri) + */ @route("/queries/long/null") @get getLongNull is Azure.Core.Foundations.Operation< { - @doc("null 64 bit integer value") + /** + * null 64 bit integer value + */ @query("longQuery") - longQuery?: int32; + longQuery?: int64; }, void >; - @doc("Get '1.034E+20' numeric value") + /** + * Get '1.034E+20' numeric value + */ @route("/queries/float/1.034E+20") @get floatScientificPositive is Azure.Core.Foundations.Operation< { - @doc("'1.034E+20'numeric value") + /** + * '1.034E+20'numeric value + */ @query("floatQuery") floatQuery: 103400000000000000000; }, void >; - @doc("Get '-1.034E-20' numeric value") + /** + * Get '-1.034E-20' numeric value + */ @route("/queries/float/-1.034E-20") @get floatScientificNegative is Azure.Core.Foundations.Operation< { - @doc("'-1.034E-20'numeric value") + /** + * '-1.034E-20'numeric value + */ @query("floatQuery") floatQuery: -1.034e-20; }, void >; - @doc("Get null numeric value (no query parameter)") + /** + * Get null numeric value (no query parameter) + */ @route("/queries/float/null") @get floatNull is Azure.Core.Foundations.Operation< { - @doc("null numeric value") + /** + * null numeric value + */ @query("floatQuery") floatQuery?: float32; }, void >; - @doc("Get '9999999.999' numeric value") + /** + * Get '9999999.999' numeric value + */ @route("/queries/double/9999999.999") @get doubleDecimalPositive is Azure.Core.Foundations.Operation< { - @doc("'9999999.999'numeric value") + /** + * '9999999.999'numeric value + */ @query("doubleQuery") doubleQuery: 9999999.999; }, void >; - @doc("Get '-9999999.999' numeric value") + /** + * Get '-9999999.999' numeric value + */ @route("/queries/double/-9999999.999") @get doubleDecimalNegative is Azure.Core.Foundations.Operation< { - @doc("'-9999999.999'numeric value") + /** + * '-9999999.999'numeric value + */ @query("doubleQuery") doubleQuery: -9999999.999; }, void >; - @doc("Get null numeric value (no query parameter)") + /** + * Get null numeric value (no query parameter) + */ @route("/queries/double/null") @get doubleNull is Azure.Core.Foundations.Operation< { - @doc("null numeric value") + /** + * null numeric value + */ @query("doubleQuery") - doubleQuery?: float32; + doubleQuery?: float64; }, void >; - @doc("Get '啊齄丂狛狜隣郎隣兀﨩' multi-byte string value") + /** + * Get '啊齄丂狛狜隣郎隣兀﨩' multi-byte string value + */ @route("/queries/string/unicode/") @get stringUnicode is Azure.Core.Foundations.Operation< { - @doc("'啊齄丂狛狜隣郎隣兀﨩'multi-byte string value") + /** + * '啊齄丂狛狜隣郎隣兀﨩'multi-byte string value + */ @query("stringQuery") stringQuery: "啊齄丂狛狜隣郎隣兀﨩"; }, void >; - @doc("Get 'begin!*'();:@ &=+$,/?#[]end") + /** + * Get 'begin!*'();:@ &=+$,/?#[]end + */ @route("/queries/string/begin%21%2A%27%28%29%3B%3A%40%20%26%3D%2B%24%2C%2F%3F%23%5B%5Dend") @get stringUrlEncoded is Azure.Core.Foundations.Operation< { - @doc("'begin!*'();:@ &=+$,/?#[]end' url encoded string value") + /** + * 'begin!*'();:@ &=+$,/?#[]end' url encoded string value + */ @query("stringQuery") stringQuery: "begin!*'();:@ &=+$,/?#[]end"; }, void >; - @doc("Get ''") + /** + * Get '' + */ @route("/queries/string/empty") @get stringEmpty is Azure.Core.Foundations.Operation< { - @doc("'' string value") + /** + * '' string value + */ @query("stringQuery") stringQuery: ""; }, void >; - @doc("Get null (no query parameter in url)") + /** + * Get null (no query parameter in url) + */ @route("/queries/string/null") @get stringNull is Azure.Core.Foundations.Operation< { - @doc("null string value") + /** + * null string value + */ @query("stringQuery") stringQuery?: string; }, void >; - @doc("Get using uri with query parameter 'green color'") + /** + * Get using uri with query parameter 'green color' + */ @route("/queries/enum/green%20color") @get enumValid is Azure.Core.Foundations.Operation< { - @doc("'green color' enum value") + /** + * 'green color' enum value + */ @query("enumQuery") enumQuery?: UriColor; }, void >; - @doc("Get null (no query parameter in url)") + /** + * Get null (no query parameter in url) + */ @route("/queries/enum/null") @get enumNull is Azure.Core.Foundations.Operation< { - @doc("null string value") + /** + * null string value + */ @query("enumQuery") enumQuery?: UriColor; }, void >; - @doc("Get '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array") + /** + * Get '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array + */ @route("/queries/byte/multibyte") @get byteMultiByte is Azure.Core.Foundations.Operation< { - @doc("'啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array") + /** + * '啊齄丂狛狜隣郎隣兀﨩' multibyte value as utf-8 encoded byte array + */ @query("byteQuery") byteQuery?: bytes; }, void >; - @doc("Get '' as byte array") + /** + * Get '' as byte array + */ @route("/queries/byte/empty") @get byteEmpty is Azure.Core.Foundations.Operation< { - @doc("'' as byte array") + /** + * '' as byte array + */ @query("byteQuery") byteQuery: ""; }, void >; - @doc("Get null as byte array (no query parameters in uri)") + /** + * Get null as byte array (no query parameters in uri) + */ @route("/queries/byte/null") @get byteNull is Azure.Core.Foundations.Operation< { - @doc("null as byte array (no query parameters in uri)") + /** + * null as byte array (no query parameters in uri) + */ @query("byteQuery") byteQuery?: bytes; }, void >; - @doc("Get '2012-01-01' as date") + /** + * Get '2012-01-01' as date + */ @route("/queries/date/2012-01-01") @get - DateValid is Azure.Core.Foundations.Operation< + dateValid is Azure.Core.Foundations.Operation< { - @doc("'2012-01-01' as date") + /** + * '2012-01-01' as date + */ @query("dateQuery") dateQuery: "2012-01-01"; }, void >; - @doc("Get null as date - this should result in no query parameters in uri") + /** + * Get null as date - this should result in no query parameters in uri + */ @route("/queries/date/null") @get - DateNull is Azure.Core.Foundations.Operation< + dateNull is Azure.Core.Foundations.Operation< { - @doc("null as date (no query parameters in uri)") + /** + * null as date (no query parameters in uri) + */ @query("dateQuery") dateQuery?: plainDate; }, void >; - @doc("Get '2012-01-01T01:01:01Z' as date-time") + /** + * Get '2012-01-01T01:01:01Z' as date-time + */ @route("/queries/datetime/2012-01-01T01%3A01%3A01Z") @get - DateTimeValid is Azure.Core.Foundations.Operation< + dateTimeValid is Azure.Core.Foundations.Operation< { - @doc("'2012-01-01T01:01:01Z' as date-time") + /** + * '2012-01-01T01:01:01Z' as date-time + */ @query("dateTimeQuery") dateTimeQuery: "2012-01-01T01:01:01Z"; }, void >; - @doc("Get null as date-time, should result in no query parameters in uri") + /** + * Get null as date-time, should result in no query parameters in uri + */ @route("/queries/datetime/null") @get - DateTimeNull is Azure.Core.Foundations.Operation< + dateTimeNull is Azure.Core.Foundations.Operation< { - @doc("null as date-time (no query parameters)") + /** + * null as date-time (no query parameters) + */ @query("dateTimeQuery") dateTimeQuery?: utcDateTime; }, void >; - @doc(""" -Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, -''] using the csv-array format -""") + /** + * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, + * ''] using the csv-array format + */ @route("/queries/array/csv/string/valid") @get - ArrayStringCsvValid is Azure.Core.Foundations.Operation< + arrayStringCsvValid is Azure.Core.Foundations.Operation< { - @doc(""" -an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] -using the csv-array format -""") + /** + * an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] + * using the csv-array format + */ @query({ name: "arrayQuery", format: "csv", @@ -707,12 +917,16 @@ using the csv-array format void >; - @doc("Get a null array of string using the csv-array format") + /** + * Get a null array of string using the csv-array format + */ @route("/queries/array/csv/string/null") @get - ArrayStringCsvNull is Azure.Core.Foundations.Operation< + arrayStringCsvNull is Azure.Core.Foundations.Operation< { - @doc("a null array of string using the csv-array format") + /** + * a null array of string using the csv-array format + */ @query({ name: "arrayQuery", format: "csv", @@ -722,12 +936,16 @@ using the csv-array format void >; - @doc("Get an empty array [] of string using the csv-array format") + /** + * Get an empty array [] of string using the csv-array format + */ @route("/queries/array/csv/string/empty") @get - ArrayStringCsvEmpty is Azure.Core.Foundations.Operation< + arrayStringCsvEmpty is Azure.Core.Foundations.Operation< { - @doc("an empty array [] of string using the csv-array format") + /** + * an empty array [] of string using the csv-array format + */ @query({ name: "arrayQuery", format: "csv", @@ -737,15 +955,17 @@ using the csv-array format void >; - @doc(""" -Array query has no defined collection format, should default to csv. Pass in -['hello', 'nihao', 'bonjour'] for the 'arrayQuery' parameter to the service -""") + /** + * Array query has no defined collection format, should default to csv. Pass in + * ['hello', 'nihao', 'bonjour'] for the 'arrayQuery' parameter to the service + */ @route("/queries/array/none/string/empty") @get - ArrayStringNoCollectionFormatEmpty is Azure.Core.Foundations.Operation< + arrayStringNoCollectionFormatEmpty is Azure.Core.Foundations.Operation< { - @doc("Array-typed query parameter. Pass in ['hello', 'nihao', 'bonjour'].") + /** + * Array-typed query parameter. Pass in ['hello', 'nihao', 'bonjour']. + */ @query({ name: "arrayQuery", format: "csv", @@ -755,18 +975,18 @@ Array query has no defined collection format, should default to csv. Pass in void >; - @doc(""" -Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, -''] using the ssv-array format -""") + /** + * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, + * ''] using the ssv-array format + */ @route("/queries/array/ssv/string/valid") @get - ArrayStringSsvValid is Azure.Core.Foundations.Operation< + arrayStringSsvValid is Azure.Core.Foundations.Operation< { - @doc(""" -an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] -using the ssv-array format -""") + /** + * an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] + * using the ssv-array format + */ @query({ name: "arrayQuery", format: "ssv", @@ -776,18 +996,18 @@ using the ssv-array format void >; - @doc(""" -Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, -''] using the tsv-array format -""") + /** + * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, + * ''] using the tsv-array format + */ @route("/queries/array/tsv/string/valid") @get - ArrayStringTsvValid is Azure.Core.Foundations.Operation< + arrayStringTsvValid is Azure.Core.Foundations.Operation< { - @doc(""" -an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] -using the tsv-array format -""") + /** + * an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] + * using the tsv-array format + */ @query({ name: "arrayQuery", format: "tsv", @@ -797,18 +1017,18 @@ using the tsv-array format void >; - @doc(""" -Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, -''] using the pipes-array format -""") + /** + * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, + * ''] using the pipes-array format + */ @route("/queries/array/pipes/string/valid") @get - ArrayStringPipesValid is Azure.Core.Foundations.Operation< + arrayStringPipesValid is Azure.Core.Foundations.Operation< { - @doc(""" -an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] -using the pipes-array format -""") + /** + * an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] + * using the pipes-array format + */ @query({ name: "arrayQuery", format: "pipes", @@ -820,148 +1040,196 @@ using the pipes-array format } interface pathItemsOperations { - @doc(""" -send globalStringPath='globalStringPath', -pathItemStringPath='pathItemStringPath', localStringPath='localStringPath', -globalStringQuery='globalStringQuery', -pathItemStringQuery='pathItemStringQuery', localStringQuery='localStringQuery' -""") + /** + * send globalStringPath='globalStringPath', + * pathItemStringPath='pathItemStringPath', localStringPath='localStringPath', + * globalStringQuery='globalStringQuery', + * pathItemStringQuery='pathItemStringQuery', localStringQuery='localStringQuery' + */ @route("/pathitem/nullable/globalStringPath/{globalStringPath}/pathItemStringPath/{pathItemStringPath}/localStringPath/{localStringPath}/globalStringQuery/pathItemStringQuery/localStringQuery") @get getAllWithValues is Azure.Core.Foundations.Operation< { - @doc("A string value 'pathItemStringPath' that appears in the path") + /** + * A string value 'pathItemStringPath' that appears in the path + */ @path pathItemStringPath: string; - @doc("A string value 'pathItemStringQuery' that appears as a query parameter") + /** + * A string value 'pathItemStringQuery' that appears as a query parameter + */ @query("pathItemStringQuery") pathItemStringQuery?: string; - @doc("A string value 'globalItemStringPath' that appears in the path") + /** + * A string value 'globalItemStringPath' that appears in the path + */ @path globalStringPath: string; - @doc("should contain value null") + /** + * should contain value null + */ @query("globalStringQuery") globalStringQuery?: string; - @doc("should contain value 'localStringPath'") + /** + * should contain value 'localStringPath' + */ @path localStringPath: string; - @doc("should contain value 'localStringQuery'") + /** + * should contain value 'localStringQuery' + */ @query("localStringQuery") localStringQuery?: string; }, void >; - @doc(""" -send globalStringPath='globalStringPath', -pathItemStringPath='pathItemStringPath', localStringPath='localStringPath', -globalStringQuery=null, pathItemStringQuery='pathItemStringQuery', -localStringQuery='localStringQuery' -""") + /** + * send globalStringPath='globalStringPath', + * pathItemStringPath='pathItemStringPath', localStringPath='localStringPath', + * globalStringQuery=null, pathItemStringQuery='pathItemStringQuery', + * localStringQuery='localStringQuery' + */ @route("/pathitem/nullable/globalStringPath/{globalStringPath}/pathItemStringPath/{pathItemStringPath}/localStringPath/{localStringPath}/null/pathItemStringQuery/localStringQuery") @get getGlobalQueryNull is Azure.Core.Foundations.Operation< { - @doc("A string value 'pathItemStringPath' that appears in the path") + /** + * A string value 'pathItemStringPath' that appears in the path + */ @path pathItemStringPath: string; - @doc("A string value 'pathItemStringQuery' that appears as a query parameter") + /** + * A string value 'pathItemStringQuery' that appears as a query parameter + */ @query("pathItemStringQuery") pathItemStringQuery?: string; - @doc("A string value 'globalItemStringPath' that appears in the path") + /** + * A string value 'globalItemStringPath' that appears in the path + */ @path globalStringPath: string; - @doc("should contain value null") + /** + * should contain value null + */ @query("globalStringQuery") globalStringQuery?: string; - @doc("should contain value 'localStringPath'") + /** + * should contain value 'localStringPath' + */ @path localStringPath: string; - @doc("should contain value 'localStringQuery'") + /** + * should contain value 'localStringQuery' + */ @query("localStringQuery") localStringQuery?: string; }, void >; - @doc(""" -send globalStringPath=globalStringPath, -pathItemStringPath='pathItemStringPath', localStringPath='localStringPath', -globalStringQuery=null, pathItemStringQuery='pathItemStringQuery', -localStringQuery=null -""") + /** + * send globalStringPath=globalStringPath, + * pathItemStringPath='pathItemStringPath', localStringPath='localStringPath', + * globalStringQuery=null, pathItemStringQuery='pathItemStringQuery', + * localStringQuery=null + */ @route("/pathitem/nullable/globalStringPath/{globalStringPath}/pathItemStringPath/{pathItemStringPath}/localStringPath/{localStringPath}/null/pathItemStringQuery/null") @get getGlobalAndLocalQueryNull is Azure.Core.Foundations.Operation< { - @doc("A string value 'pathItemStringPath' that appears in the path") + /** + * A string value 'pathItemStringPath' that appears in the path + */ @path pathItemStringPath: string; - @doc("A string value 'pathItemStringQuery' that appears as a query parameter") + /** + * A string value 'pathItemStringQuery' that appears as a query parameter + */ @query("pathItemStringQuery") pathItemStringQuery?: string; - @doc("A string value 'globalItemStringPath' that appears in the path") + /** + * A string value 'globalItemStringPath' that appears in the path + */ @path globalStringPath: string; - @doc("should contain value null") + /** + * should contain value null + */ @query("globalStringQuery") globalStringQuery?: string; - @doc("should contain value 'localStringPath'") + /** + * should contain value 'localStringPath' + */ @path localStringPath: string; - @doc("should contain null value") + /** + * should contain null value + */ @query("localStringQuery") localStringQuery?: string; }, void >; - @doc(""" -send globalStringPath='globalStringPath', -pathItemStringPath='pathItemStringPath', localStringPath='localStringPath', -globalStringQuery='globalStringQuery', pathItemStringQuery=null, -localStringQuery=null -""") + /** + * send globalStringPath='globalStringPath', + * pathItemStringPath='pathItemStringPath', localStringPath='localStringPath', + * globalStringQuery='globalStringQuery', pathItemStringQuery=null, + * localStringQuery=null + */ @route("/pathitem/nullable/globalStringPath/{globalStringPath}/pathItemStringPath/{pathItemStringPath}/localStringPath/{localStringPath}/globalStringQuery/null/null") @get getLocalPathItemQueryNull is Azure.Core.Foundations.Operation< { - @doc("A string value 'pathItemStringPath' that appears in the path") + /** + * A string value 'pathItemStringPath' that appears in the path + */ @path pathItemStringPath: string; - @doc("should contain value null") + /** + * should contain value null + */ @query("pathItemStringQuery") pathItemStringQuery?: string; - @doc("A string value 'globalItemStringPath' that appears in the path") + /** + * A string value 'globalItemStringPath' that appears in the path + */ @path globalStringPath: string; - @doc("should contain value null") + /** + * should contain value null + */ @query("globalStringQuery") globalStringQuery?: string; - @doc("should contain value 'localStringPath'") + /** + * should contain value 'localStringPath' + */ @path localStringPath: string; - @doc("should contain value null") + /** + * should contain value null + */ @query("localStringQuery") localStringQuery?: string; }, diff --git a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp index 98adb3564b..bfc7a9156c 100644 --- a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp @@ -4,22 +4,28 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +/** + * // FIXME: (missing-service-description) Add service description + */ @service({ title: "Azure Web PubSub Service REST API", }) @versioned(Versions) @server( "{endpoint}", - "// FIXME: (miissing-service-description) Add service description", + "// FIXME: (missing-service-description) Add service description", { endpoint: string, } ) -@doc("// FIXME: (miissing-service-description) Add service description") namespace AzureWebPubSubServiceRESTAPI; -@doc("The available API versions.") +/** + * The available API versions. + */ enum Versions { - @doc("The 2023-07-01 API version.") + /** + * The 2023-07-01 API version. + */ v2023_07_01: "2023-07-01", } diff --git a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp index f489190525..c0d396baac 100644 --- a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp @@ -13,59 +13,100 @@ enum WebPubSubPermission { joinLeaveGroup, } -@doc("Content type for upload") +/** + * Content type for upload + */ @fixed enum ContentType { - @doc("Content Type 'application/json'") `application/json`, - @doc("Content Type 'application/octet-stream'") `application/octet-stream`, - @doc("Content Type 'text/plain'") `text/plain`, + /** + * Content Type 'application/json' + */ + `application/json`, + + /** + * Content Type 'application/octet-stream' + */ + `application/octet-stream`, + + /** + * Content Type 'text/plain' + */ + `text/plain`, } -@doc("The request object containing targets groups and a connection filter") +/** + * The request object containing targets groups and a connection filter + */ model AddToGroupsRequest { - @doc("A list of groups which target connections will be added into") + /** + * A list of groups which target connections will be added into + */ groups?: string[]; - @doc("An OData filter which target connections satisfy") + /** + * An OData filter which target connections satisfy + */ filter?: string; } -@doc("The error object.") +/** + * The error object. + */ @error model ErrorDetail { - @doc("One of a server-defined set of error codes.") + /** + * One of a server-defined set of error codes. + */ code?: string; - @doc("A human-readable representation of the error.") + /** + * A human-readable representation of the error. + */ message?: string; - @doc("The target of the error.") + /** + * The target of the error. + */ target?: string; - @doc("An array of details about specific errors that led to this reported error.") + /** + * An array of details about specific errors that led to this reported error. + */ details?: ErrorDetail[]; inner?: InnerError; } model InnerError { - @doc("A more specific error code than was provided by the containing error.") + /** + * A more specific error code than was provided by the containing error. + */ code?: string; inner?: InnerError; } -@doc("The response object containing the token for the client") +/** + * The response object containing the token for the client + */ model ClientTokenResponse { - @doc("The token value for the WebSocket client to connect to the service") + /** + * The token value for the WebSocket client to connect to the service + */ token: string; } -@doc("The request object containing targets groups and a connection filter") +/** + * The request object containing targets groups and a connection filter + */ model RemoveFromGroupsRequest { - @doc("A list of groups which target connections will be removed from") + /** + * A list of groups which target connections will be removed from + */ groups?: string[]; - @doc("An OData filter which target connections satisfy") + /** + * An OData filter which target connections satisfy + */ filter?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/routes.tsp index 1785bd9f5c..a500ab8e9b 100644 --- a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/routes.tsp @@ -8,219 +8,265 @@ using TypeSpec.Http; namespace AzureWebPubSubServiceRESTAPI; interface HealthApiOperations { + /** + * Get service health status. + */ @summary("Get service health status.") - @doc("Get service health status.") @route("/api/health") @head - GetServiceStatus is Azure.Core.Foundations.Operation<{}, void>; + getServiceStatus is Azure.Core.Foundations.Operation<{}, void>; } interface WebPubSubOperations { + /** + * Add filtered connections to multiple groups. + */ @summary("Add filtered connections to multiple groups.") - @doc("Add filtered connections to multiple groups.") @route("/api/hubs/{hub}/:addToGroups") @post - AddConnectionsToGroups is Azure.Core.Foundations.Operation< + addConnectionsToGroups is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("Target groups and connection filter.") + /** + * Target groups and connection filter. + */ @body groupsToAdd: AddToGroupsRequest; }, void >; + /** + * Close the connections in the hub. + */ @summary("Close the connections in the hub.") - @doc("Close the connections in the hub.") @route("/api/hubs/{hub}/:closeConnections") @post - CloseAllConnections is Azure.Core.Foundations.Operation< + closeAllConnections is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("Exclude these connectionIds when closing the connections in the hub.") + /** + * Exclude these connectionIds when closing the connections in the hub. + */ @query({ name: "excluded", format: "multi", }) excluded?: string[]; - @doc("The reason closing the client connection.") + /** + * The reason closing the client connection. + */ @query("reason") reason?: string; }, void >; + /** + * Generate token for the client to connect Azure Web PubSub service. + */ @summary("Generate token for the client to connect Azure Web PubSub service.") - @doc("Generate token for the client to connect Azure Web PubSub service.") @route("/api/hubs/{hub}/:generateToken") @post - GenerateClientToken is Azure.Core.Foundations.Operation< + generateClientToken is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("User Id.") + /** + * User Id. + */ @query("userId") userId?: string; - @doc("Roles that the connection with the generated token will have.") + /** + * Roles that the connection with the generated token will have. + */ @query({ name: "role", format: "multi", }) role?: string[]; - @doc("The expire time of the generated token.") + /** + * The expire time of the generated token. + */ @minValue(1) @query("minutesToExpire") minutesToExpire?: int32 = 60; - @doc("Groups that the connection will join when it connects.") + /** + * Groups that the connection will join when it connects. + */ @query({ name: "group", format: "multi", }) group?: string[]; - @doc("Accept header") + /** + * Accept header + */ @header accept: "application/json, text/json"; }, ClientTokenResponse >; + /** + * Remove filtered connections from multiple groups. + */ @summary("Remove filtered connections from multiple groups.") - @doc("Remove filtered connections from multiple groups.") @route("/api/hubs/{hub}/:removeFromGroups") @post - RemoveConnectionsFromGroups is Azure.Core.Foundations.Operation< + removeConnectionsFromGroups is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("Target groups and connection filter.") + /** + * Target groups and connection filter. + */ @body groupsToRemove: RemoveFromGroupsRequest; }, void >; + /** + * Broadcast content inside request body to all the connected client connections. + */ @summary("Broadcast content inside request body to all the connected client connections.") - @doc("Broadcast content inside request body to all the connected client connections.") @route("/api/hubs/{hub}/:send") @post - SendToAll is Azure.Core.Foundations.Operation< + sendToAll is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("Excluded connection Ids.") + /** + * Excluded connection Ids. + */ @query({ name: "excluded", format: "multi", }) excluded?: string[]; - @doc(""" -Following OData filter syntax to filter out the subscribers receiving the -messages. -""") + /** + * Following OData filter syntax to filter out the subscribers receiving the + * messages. + */ @query("filter") filter?: string; - @doc(""" -The time-to-live (TTL) value in seconds for messages sent to the service. 0 is -the default value, which means the message never expires. 300 is the maximum -value. If this parameter is non-zero, messages that are not consumed by the -client within the specified TTL will be dropped by the service. This parameter -can help when the client's bandwidth is limited. -""") + /** + * The time-to-live (TTL) value in seconds for messages sent to the service. 0 is + * the default value, which means the message never expires. 300 is the maximum + * value. If this parameter is non-zero, messages that are not consumed by the + * client within the specified TTL will be dropped by the service. This parameter + * can help when the client's bandwidth is limited. + */ @maxValue(300) @query("messageTtlSeconds") messageTtlSeconds?: int32; - @doc("Upload file type") + /** + * Upload file type + */ @header `content-type`: ContentType; - @doc("The payload body.") + /** + * The payload body. + */ @body message: bytes; }, void >; + /** + * Close the client connection. + */ @summary("Close the client connection.") - @doc("Close the client connection.") @route("/api/hubs/{hub}/connections/{connectionId}") @delete - CloseConnection is Azure.Core.Foundations.Operation< + closeConnection is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("Target connection Id.") + /** + * Target connection Id. + */ @minLength(1) @path connectionId: string; - @doc("The reason closing the client connection.") + /** + * The reason closing the client connection. + */ @query("reason") reason?: string; }, void >; + /** + * Check if the connection with the given connectionId exists. + */ @summary("Check if the connection with the given connectionId exists.") - @doc("Check if the connection with the given connectionId exists.") @route("/api/hubs/{hub}/connections/{connectionId}") @head - ConnectionExists is Azure.Core.Foundations.Operation< + connectionExists is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("The connection Id.") + /** + * The connection Id. + */ @minLength(1) @path connectionId: string; @@ -228,62 +274,74 @@ alpha-numeric characters or underscore. void >; + /** + * Send content inside request body to the specific connection. + */ @summary("Send content inside request body to the specific connection.") - @doc("Send content inside request body to the specific connection.") @route("/api/hubs/{hub}/connections/{connectionId}/:send") @post - SendToConnection is Azure.Core.Foundations.Operation< + sendToConnection is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("The connection Id.") + /** + * The connection Id. + */ @minLength(1) @path connectionId: string; - @doc(""" -The time-to-live (TTL) value in seconds for messages sent to the service. 0 is -the default value, which means the message never expires. 300 is the maximum -value. If this parameter is non-zero, messages that are not consumed by the -client within the specified TTL will be dropped by the service. This parameter -can help when the client's bandwidth is limited. -""") + /** + * The time-to-live (TTL) value in seconds for messages sent to the service. 0 is + * the default value, which means the message never expires. 300 is the maximum + * value. If this parameter is non-zero, messages that are not consumed by the + * client within the specified TTL will be dropped by the service. This parameter + * can help when the client's bandwidth is limited. + */ @maxValue(300) @query("messageTtlSeconds") messageTtlSeconds?: int32; - @doc("Upload file type") + /** + * Upload file type + */ @header `content-type`: ContentType; - @doc("The payload body.") + /** + * The payload body. + */ @body message: bytes; }, void >; + /** + * Remove a connection from all groups. + */ @summary("Remove a connection from all groups.") - @doc("Remove a connection from all groups.") @route("/api/hubs/{hub}/connections/{connectionId}/groups") @delete - RemoveConnectionFromAllGroups is Azure.Core.Foundations.Operation< + removeConnectionFromAllGroups is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("Target connection Id.") + /** + * Target connection Id. + */ @minLength(1) @path connectionId: string; @@ -291,21 +349,25 @@ alpha-numeric characters or underscore. void >; + /** + * Check if there are any client connections inside the given group + */ @summary("Check if there are any client connections inside the given group") - @doc("Check if there are any client connections inside the given group") @route("/api/hubs/{hub}/groups/{group}") @head - GroupExists is Azure.Core.Foundations.Operation< + groupExists is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("Target group name, which length should be greater than 0 and less than 1025.") + /** + * Target group name, which length should be greater than 0 and less than 1025. + */ @maxLength(1024) @minLength(1) @pattern("^(?!\\s+$).+$") @@ -315,120 +377,144 @@ alpha-numeric characters or underscore. void >; + /** + * Close connections in the specific group. + */ @summary("Close connections in the specific group.") - @doc("Close connections in the specific group.") @route("/api/hubs/{hub}/groups/{group}/:closeConnections") @post - CloseGroupConnections is Azure.Core.Foundations.Operation< + closeGroupConnections is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("Target group name, which length should be greater than 0 and less than 1025.") + /** + * Target group name, which length should be greater than 0 and less than 1025. + */ @maxLength(1024) @minLength(1) @pattern("^(?!\\s+$).+$") @path group: string; - @doc("Exclude these connectionIds when closing the connections in the group.") + /** + * Exclude these connectionIds when closing the connections in the group. + */ @query({ name: "excluded", format: "multi", }) excluded?: string[]; - @doc("The reason closing the client connection.") + /** + * The reason closing the client connection. + */ @query("reason") reason?: string; }, void >; + /** + * Send content inside request body to a group of connections. + */ @summary("Send content inside request body to a group of connections.") - @doc("Send content inside request body to a group of connections.") @route("/api/hubs/{hub}/groups/{group}/:send") @post - SendToGroup is Azure.Core.Foundations.Operation< + sendToGroup is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("Target group name, which length should be greater than 0 and less than 1025.") + /** + * Target group name, which length should be greater than 0 and less than 1025. + */ @maxLength(1024) @minLength(1) @pattern("^(?!\\s+$).+$") @path group: string; - @doc("Excluded connection Ids") + /** + * Excluded connection Ids + */ @query({ name: "excluded", format: "multi", }) excluded?: string[]; - @doc(""" -Following OData filter syntax to filter out the subscribers receiving the -messages. -""") + /** + * Following OData filter syntax to filter out the subscribers receiving the + * messages. + */ @query("filter") filter?: string; - @doc(""" -The time-to-live (TTL) value in seconds for messages sent to the service. 0 is -the default value, which means the message never expires. 300 is the maximum -value. If this parameter is non-zero, messages that are not consumed by the -client within the specified TTL will be dropped by the service. This parameter -can help when the client's bandwidth is limited. -""") + /** + * The time-to-live (TTL) value in seconds for messages sent to the service. 0 is + * the default value, which means the message never expires. 300 is the maximum + * value. If this parameter is non-zero, messages that are not consumed by the + * client within the specified TTL will be dropped by the service. This parameter + * can help when the client's bandwidth is limited. + */ @maxValue(300) @query("messageTtlSeconds") messageTtlSeconds?: int32; - @doc("Upload file type") + /** + * Upload file type + */ @header `content-type`: ContentType; - @doc("The payload body.") + /** + * The payload body. + */ @body message: bytes; }, void >; + /** + * Remove a connection from the target group. + */ @summary("Remove a connection from the target group.") - @doc("Remove a connection from the target group.") @route("/api/hubs/{hub}/groups/{group}/connections/{connectionId}") @delete - RemoveConnectionFromGroup is Azure.Core.Foundations.Operation< + removeConnectionFromGroup is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("Target group name, which length should be greater than 0 and less than 1025.") + /** + * Target group name, which length should be greater than 0 and less than 1025. + */ @maxLength(1024) @minLength(1) @pattern("^(?!\\s+$).+$") @path group: string; - @doc("Target connection Id.") + /** + * Target connection Id. + */ @minLength(1) @path connectionId: string; @@ -436,28 +522,34 @@ alpha-numeric characters or underscore. void >; + /** + * Add a connection to the target group. + */ @summary("Add a connection to the target group.") - @doc("Add a connection to the target group.") @route("/api/hubs/{hub}/groups/{group}/connections/{connectionId}") @put - AddConnectionToGroup is Azure.Core.Foundations.Operation< + addConnectionToGroup is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("Target group name, which length should be greater than 0 and less than 1025.") + /** + * Target group name, which length should be greater than 0 and less than 1025. + */ @maxLength(1024) @minLength(1) @pattern("^(?!\\s+$).+$") @path group: string; - @doc("Target connection Id") + /** + * Target connection Id + */ @minLength(1) @path connectionId: string; @@ -465,123 +557,145 @@ alpha-numeric characters or underscore. void >; + /** + * Revoke permission for the connection. + */ @summary("Revoke permission for the connection.") - @doc("Revoke permission for the connection.") @route("/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}") @delete - RevokePermission is Azure.Core.Foundations.Operation< + revokePermission is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("The permission: current supported actions are joinLeaveGroup and sendToGroup.") + /** + * The permission: current supported actions are joinLeaveGroup and sendToGroup. + */ @path permission: WebPubSubPermission; - @doc("Target connection Id.") + /** + * Target connection Id. + */ @minLength(1) @path connectionId: string; - @doc(""" -The meaning of the target depends on the specific permission. For -joinLeaveGroup and sendToGroup, targetName is a required parameter standing for -the group name. -""") + /** + * The meaning of the target depends on the specific permission. For + * joinLeaveGroup and sendToGroup, targetName is a required parameter standing for + * the group name. + */ @query("targetName") targetName?: string; }, void >; + /** + * Check if a connection has permission to the specified action. + */ @summary("Check if a connection has permission to the specified action.") - @doc("Check if a connection has permission to the specified action.") @route("/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}") @head - CheckPermission is Azure.Core.Foundations.Operation< + checkPermission is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("The permission: current supported actions are joinLeaveGroup and sendToGroup.") + /** + * The permission: current supported actions are joinLeaveGroup and sendToGroup. + */ @path permission: WebPubSubPermission; - @doc("Target connection Id.") + /** + * Target connection Id. + */ @minLength(1) @path connectionId: string; - @doc(""" -The meaning of the target depends on the specific permission. For -joinLeaveGroup and sendToGroup, targetName is a required parameter standing for -the group name. -""") + /** + * The meaning of the target depends on the specific permission. For + * joinLeaveGroup and sendToGroup, targetName is a required parameter standing for + * the group name. + */ @query("targetName") targetName?: string; }, void >; + /** + * Grant permission to the connection. + */ @summary("Grant permission to the connection.") - @doc("Grant permission to the connection.") @route("/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}") @put - GrantPermission is Azure.Core.Foundations.Operation< + grantPermission is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("The permission: current supported actions are joinLeaveGroup and sendToGroup.") + /** + * The permission: current supported actions are joinLeaveGroup and sendToGroup. + */ @path permission: WebPubSubPermission; - @doc("Target connection Id.") + /** + * Target connection Id. + */ @minLength(1) @path connectionId: string; - @doc(""" -The meaning of the target depends on the specific permission. For -joinLeaveGroup and sendToGroup, targetName is a required parameter standing for -the group name. -""") + /** + * The meaning of the target depends on the specific permission. For + * joinLeaveGroup and sendToGroup, targetName is a required parameter standing for + * the group name. + */ @query("targetName") targetName?: string; }, void >; + /** + * Check if there are any client connections connected for the given user. + */ @summary("Check if there are any client connections connected for the given user.") - @doc("Check if there are any client connections connected for the given user.") @route("/api/hubs/{hub}/users/{userId}") @head - UserExists is Azure.Core.Foundations.Operation< + userExists is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("Target user Id.") + /** + * Target user Id. + */ @minLength(1) @path userId: string; @@ -589,102 +703,122 @@ alpha-numeric characters or underscore. void >; + /** + * Close connections for the specific user. + */ @summary("Close connections for the specific user.") - @doc("Close connections for the specific user.") @route("/api/hubs/{hub}/users/{userId}/:closeConnections") @post - CloseUserConnections is Azure.Core.Foundations.Operation< + closeUserConnections is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("The user Id.") + /** + * The user Id. + */ @minLength(1) @path userId: string; - @doc("Exclude these connectionIds when closing the connections for the user.") + /** + * Exclude these connectionIds when closing the connections for the user. + */ @query({ name: "excluded", format: "multi", }) excluded?: string[]; - @doc("The reason closing the client connection.") + /** + * The reason closing the client connection. + */ @query("reason") reason?: string; }, void >; + /** + * Send content inside request body to the specific user. + */ @summary("Send content inside request body to the specific user.") - @doc("Send content inside request body to the specific user.") @route("/api/hubs/{hub}/users/{userId}/:send") @post - SendToUser is Azure.Core.Foundations.Operation< + sendToUser is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("The user Id.") + /** + * The user Id. + */ @minLength(1) @path userId: string; - @doc(""" -Following OData filter syntax to filter out the subscribers receiving the -messages. -""") + /** + * Following OData filter syntax to filter out the subscribers receiving the + * messages. + */ @query("filter") filter?: string; - @doc(""" -The time-to-live (TTL) value in seconds for messages sent to the service. 0 is -the default value, which means the message never expires. 300 is the maximum -value. If this parameter is non-zero, messages that are not consumed by the -client within the specified TTL will be dropped by the service. This parameter -can help when the client's bandwidth is limited. -""") + /** + * The time-to-live (TTL) value in seconds for messages sent to the service. 0 is + * the default value, which means the message never expires. 300 is the maximum + * value. If this parameter is non-zero, messages that are not consumed by the + * client within the specified TTL will be dropped by the service. This parameter + * can help when the client's bandwidth is limited. + */ @maxValue(300) @query("messageTtlSeconds") messageTtlSeconds?: int32; - @doc("Upload file type") + /** + * Upload file type + */ @header `content-type`: ContentType; - @doc("The payload body.") + /** + * The payload body. + */ @body message: bytes; }, void >; + /** + * Remove a user from all groups. + */ @summary("Remove a user from all groups.") - @doc("Remove a user from all groups.") @route("/api/hubs/{hub}/users/{userId}/groups") @delete - RemoveUserFromAllGroups is Azure.Core.Foundations.Operation< + removeUserFromAllGroups is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("Target user Id.") + /** + * Target user Id. + */ @minLength(1) @path userId: string; @@ -692,28 +826,34 @@ alpha-numeric characters or underscore. void >; + /** + * Remove a user from the target group. + */ @summary("Remove a user from the target group.") - @doc("Remove a user from the target group.") @route("/api/hubs/{hub}/users/{userId}/groups/{group}") @delete - RemoveUserFromGroup is Azure.Core.Foundations.Operation< + removeUserFromGroup is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("Target group name, which length should be greater than 0 and less than 1025.") + /** + * Target group name, which length should be greater than 0 and less than 1025. + */ @maxLength(1024) @minLength(1) @pattern("^(?!\\s+$).+$") @path group: string; - @doc("Target user Id.") + /** + * Target user Id. + */ @minLength(1) @path userId: string; @@ -721,28 +861,34 @@ alpha-numeric characters or underscore. void >; + /** + * Add a user to the target group. + */ @summary("Add a user to the target group.") - @doc("Add a user to the target group.") @route("/api/hubs/{hub}/users/{userId}/groups/{group}") @put - AddUserToGroup is Azure.Core.Foundations.Operation< + addUserToGroup is Azure.Core.Foundations.Operation< { - @doc(""" -Target hub name, which should start with alphabetic characters and only contain -alpha-numeric characters or underscore. -""") + /** + * Target hub name, which should start with alphabetic characters and only contain + * alpha-numeric characters or underscore. + */ @pattern("^[A-Za-z][A-Za-z0-9_`,.[\\]]{0,127}$") @path hub: string; - @doc("Target group name, which length should be greater than 0 and less than 1025.") + /** + * Target group name, which length should be greater than 0 and less than 1025. + */ @maxLength(1024) @minLength(1) @pattern("^(?!\\s+$).+$") @path group: string; - @doc("Target user Id.") + /** + * Target user Id. + */ @minLength(1) @path userId: string; From 27490ae88bf6a56906b21361890421b08b262e0c Mon Sep 17 00:00:00 2001 From: Jose Manuel Heredia Hidalgo Date: Tue, 23 Jan 2024 11:42:15 -0600 Subject: [PATCH 12/33] Use Auth shcemes (#4863) Fixes #4791 --------- Co-authored-by: Jose Manuel Heredia Hidalgo --- .../auth_schemes_2024-01-18-03-46.json | 10 ++++ .../generate/generate-service-information.ts | 30 +++++++++- .../openapi-to-typespec/src/interfaces.ts | 19 +++++++ .../transform-service-information.ts | 57 ++++++++++++++++++- .../test/analyzeText/tsp-output/main.tsp | 1 + .../test/anomalyDetector/tsp-output/main.tsp | 1 + .../test/arm-agrifood/tsp-output/main.tsp | 1 + .../arm-analysisservices/tsp-output/main.tsp | 1 + .../arm-apimanagement/tsp-output/main.tsp | 1 + .../arm-authorization/tsp-output/main.tsp | 1 + .../tsp-output/main.tsp | 1 + .../test/arm-compute/tsp-output/main.tsp | 1 + .../tsp-output/main.tsp | 1 + .../arm-networkanalytics/tsp-output/main.tsp | 1 + .../arm-playwrighttesting/tsp-output/main.tsp | 1 + .../arm-servicenetworking/tsp-output/main.tsp | 1 + .../test/arm-sphere/tsp-output/main.tsp | 1 + .../test/arm-storage/tsp-output/main.tsp | 1 + .../test/arm-test/tsp-output/main.tsp | 1 + .../test/batch/tsp-output/main.tsp | 1 + .../test/loadTest/tsp-output/main.tsp | 1 + .../test/openAI/tsp-output/main.tsp | 3 + .../test/qna/tsp-output/main.tsp | 6 ++ .../test/qnaAuthoring/tsp-output/main.tsp | 6 ++ .../test/qnaRuntime/tsp-output/main.tsp | 1 + 25 files changed, 146 insertions(+), 3 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/auth_schemes_2024-01-18-03-46.json diff --git a/common/changes/@autorest/openapi-to-typespec/auth_schemes_2024-01-18-03-46.json b/common/changes/@autorest/openapi-to-typespec/auth_schemes_2024-01-18-03-46.json new file mode 100644 index 0000000000..2030593717 --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/auth_schemes_2024-01-18-03-46.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Support Auth", + "type": "minor" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts index 80073defbc..a8b3c7463c 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts @@ -1,4 +1,4 @@ -import { TypespecProgram, EndpointParameter } from "../interfaces"; +import { TypespecProgram, EndpointParameter, Auth } from "../interfaces"; import { getOptions } from "../options"; import { generateDocs } from "../utils/docs"; import { getNamespace } from "../utils/namespace"; @@ -13,6 +13,7 @@ export function generateServiceInformation(program: TypespecProgram) { definitions.push(`@armProviderNamespace`); } + generateUseAuth(serviceInformation.authentication, definitions); definitions.push(`@service({ title: "${serviceInformation.name}" })`); @@ -91,3 +92,30 @@ function getEndpointParameters(endpoint: string) { return params; } + +function generateUseAuth(authDefinitions: Auth[] | undefined, statements: string[]): void { + if (!authDefinitions) { + return; + } + + const authFlows: string[] = []; + + for (const auth of authDefinitions) { + if (auth.kind === "AadOauth2Auth") { + const scopes = `[${auth.scopes.map((s) => `"${s}"`).join()}]`; + authFlows.push(`AadOauth2Auth<${scopes}>`); + } + + if (auth.kind === "ApiKeyAuth") { + authFlows.push(`ApiKeyAuth`); + } + } + + if (!authFlows.length) { + return; + } + + statements.push(`@useAuth(${authFlows.join(" | ")})`); + + return; +} diff --git a/packages/extensions/openapi-to-typespec/src/interfaces.ts b/packages/extensions/openapi-to-typespec/src/interfaces.ts index 99f2f934a3..3b65494ad4 100644 --- a/packages/extensions/openapi-to-typespec/src/interfaces.ts +++ b/packages/extensions/openapi-to-typespec/src/interfaces.ts @@ -63,6 +63,24 @@ export interface TypespecResource { response: TypespecDataType; } +export interface AadOauth2AuthFlow { + kind: "AadOauth2Auth"; + scopes: string[]; +} + +export interface AadTokenAuthFlow { + kind: "AadTokenAuthFlow"; + scopes: string[]; +} + +export interface ApiKeyAuthentication { + kind: "ApiKeyAuth"; + location: "header" | "query" | "cookie"; + name: string; +} + +export type Auth = ApiKeyAuthentication | AadOauth2AuthFlow | AadTokenAuthFlow; + export interface ServiceInformation extends WithDoc { name: string; versions?: string[]; @@ -70,6 +88,7 @@ export interface ServiceInformation extends WithDoc { endpointParameters?: EndpointParameter[]; produces?: string[]; consumes?: string[]; + authentication?: Auth[]; armCommonTypeVersion?: string; } diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts index dd1d3abffd..db0aba0c6d 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts @@ -1,6 +1,14 @@ -import { CodeModel, ImplementationLocation, ParameterLocation } from "@autorest/codemodel"; +import { + CodeModel, + ImplementationLocation, + KeySecurityScheme, + OAuth2SecurityScheme, + ParameterLocation, + SecurityScheme, + codeModelSchema, +} from "@autorest/codemodel"; import { getArmCommonTypeVersion } from "../autorest-session"; -import { EndpointParameter, ServiceInformation } from "../interfaces"; +import { AadOauth2AuthFlow, ApiKeyAuthentication, Auth, EndpointParameter, ServiceInformation } from "../interfaces"; import { getOptions } from "../options"; import { getFirstEndpoint } from "../utils/get-endpoint"; import { isConstantSchema } from "../utils/schemas"; @@ -14,9 +22,54 @@ export function transformServiceInformation(model: CodeModel): ServiceInformatio endpointParameters: transformEndpointParameters(model), versions: getApiVersions(model), armCommonTypeVersion: isArm ? getArmCommonTypeVersion() : undefined, + authentication: getAuth(model), }; } +function getAuth(model: CodeModel): Auth[] | undefined { + if (!model.security.schemes?.length) { + return undefined; + } + + const distinctSchemes = getDistinctAuthSchemes(model); + const auths: Auth[] = []; + for (const scheme of distinctSchemes) { + if (isAadOauth2Auth(scheme)) { + const aadOauth: AadOauth2AuthFlow = { + kind: "AadOauth2Auth", + scopes: scheme.scopes, + }; + + auths.push(aadOauth); + } + + if (isKeyAuth(scheme)) { + const azureApiKeyAuthentication: ApiKeyAuthentication = { + kind: "ApiKeyAuth", + location: scheme.in, + name: scheme.name, + }; + + auths.push(azureApiKeyAuthentication); + } + } + + return auths; +} + +function getDistinctAuthSchemes(model: CodeModel): SecurityScheme[] { + const distinct = Array.from(new Set(model.security.schemes?.map((s) => JSON.stringify(s)) ?? [])); + return distinct.map((s) => JSON.parse(s)); +} + +function isAadOauth2Auth(scheme: SecurityScheme): scheme is OAuth2SecurityScheme { + return scheme.type === "OAuth2"; +} + +function isKeyAuth(scheme: SecurityScheme): scheme is KeySecurityScheme { + return scheme.type === "Key"; +} + export function transformEndpointParameters(model: CodeModel): EndpointParameter[] { const globalParameters = (model.globalParameters ?? []).filter( (p) => p.implementation === "Client" && p.protocol?.http?.in === "uri", diff --git a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp index 6f7a6a666a..f31ff42e94 100644 --- a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp @@ -12,6 +12,7 @@ using TypeSpec.Http; * documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/language-service/overview. */ +@useAuth(ApiKeyAuth) @service({ title: "Microsoft Cognitive Language Service - Analyze Text Authoring", }) diff --git a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/main.tsp index 53a386f128..4fdd110072 100644 --- a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/main.tsp @@ -22,6 +22,7 @@ using TypeSpec.Http; * a set of time series. By using anomaly detector service, business customers can * discover incidents and establish a logic flow for root cause analysis. */ +@useAuth(ApiKeyAuth) @service({ title: "Anomaly Detector Client", }) diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp index b308e0123d..3a0a12898f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp @@ -23,6 +23,7 @@ using TypeSpec.Versioning; * APIs documentation for Microsoft Azure Data Manager for Agriculture Service. */ @armProviderNamespace +@useAuth(AadOauth2Auth<["user_impersonation"]>) @service({ title: "Azure AgFoodPlatform RP Service", }) diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp index 26d471907f..7b05960d4a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp @@ -15,6 +15,7 @@ using TypeSpec.Versioning; * The Azure Analysis Services Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Analysis Services servers */ @armProviderNamespace +@useAuth(AadOauth2Auth<["user_impersonation"]>) @service({ title: "AzureAnalysisServices", }) diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp index 99ec8ded33..d8e87ba19c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp @@ -64,6 +64,7 @@ using TypeSpec.Versioning; * ApiManagement Client */ @armProviderNamespace +@useAuth(AadOauth2Auth<["user_impersonation"]>) @service({ title: "ApiManagementClient", }) diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp index 6c72b9d04e..0fa7e521ef 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp @@ -27,6 +27,7 @@ using TypeSpec.Versioning; * Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure Active Directory users. */ @armProviderNamespace +@useAuth(AadOauth2Auth<["user_impersonation"]>) @service({ title: "AuthorizationManagementClient", }) diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp index 58d44b714d..587d7d2d78 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp @@ -20,6 +20,7 @@ using TypeSpec.Versioning; * The azure integration spaces resource provider. */ @armProviderNamespace +@useAuth(AadOauth2Auth<["user_impersonation"]>) @service({ title: "Azure Integration Spaces resource management API.", }) diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp index d13258ca92..9f6c5d46d5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp @@ -57,6 +57,7 @@ using TypeSpec.Versioning; * Compute Client */ @armProviderNamespace +@useAuth(AadOauth2Auth<["user_impersonation"]>) @service({ title: "Azure Compute resource management API.", }) diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp index 1e51b080d5..c7da7ea6de 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp @@ -54,6 +54,7 @@ using TypeSpec.Versioning; * These APIs allow end users to operate on Azure Machine Learning Workspace resources. */ @armProviderNamespace +@useAuth(AadOauth2Auth<["user_impersonation"]>) @service({ title: "Azure Machine Learning Services", }) diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp index 0a606533f5..e7dd49393a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp @@ -17,6 +17,7 @@ using TypeSpec.Versioning; * // FIXME: (missing-service-description) Add service description */ @armProviderNamespace +@useAuth(AadOauth2Auth<["user_impersonation"]>) @service({ title: "Azure Network Analytics resource management API.", }) diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp index d252d4f616..6f7f5efd87 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp @@ -16,6 +16,7 @@ using TypeSpec.Versioning; * Azure Playwright testing management service */ @armProviderNamespace +@useAuth(AadOauth2Auth<["user_impersonation"]>) @service({ title: "Microsoft AzurePlaywrightService Management API", }) diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp index b3c2adf3ed..e3195e5791 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp @@ -17,6 +17,7 @@ using TypeSpec.Versioning; * Traffic Controller Provider management API. */ @armProviderNamespace +@useAuth(AadOauth2Auth<["user_impersonation"]>) @service({ title: "Traffic Controller Provider management API.", }) diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp index d78e8077ba..313504cb6c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp @@ -21,6 +21,7 @@ using TypeSpec.Versioning; * Azure Sphere resource management API. */ @armProviderNamespace +@useAuth(AadOauth2Auth<["user_impersonation"]>) @service({ title: "Azure Sphere resource management API.", }) diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp index 7d9bc17e82..111ebb568a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp @@ -32,6 +32,7 @@ using TypeSpec.Versioning; * The Azure Storage Management API. */ @armProviderNamespace +@useAuth(AadOauth2Auth<["user_impersonation"]>) @service({ title: "Azure Storage resource management API.", }) diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp index 903c1d05ca..f16ff051d8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp @@ -17,6 +17,7 @@ using TypeSpec.Versioning; * For test. */ @armProviderNamespace +@useAuth(AadOauth2Auth<["user_impersonation"]>) @service({ title: "Azure Test resource management API.", }) diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp index f85f69d014..c7a2dc94fd 100644 --- a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp @@ -4,6 +4,7 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +@useAuth(AadOauth2Auth<["user_impersonation"]> | ApiKeyAuth) @service({ title: "Azure Batch Service" }) diff --git a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp index 770c7bdfac..1d395c6a5e 100644 --- a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp @@ -8,6 +8,7 @@ using TypeSpec.Http; * These APIs allow end users to create, view and run load tests using Azure Load * Test Service. */ +@useAuth(AadOauth2Auth<["https://cnt-prod.loadtesting.azure.com/.default"]>) @service({ title: "Load Testing Service", }) diff --git a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp index 5377d86ee3..55f529b7d9 100644 --- a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp @@ -7,6 +7,9 @@ using TypeSpec.Http; /** * Azure OpenAI APIs for completions and search */ +@useAuth( + AadOauth2Auth<["api.read"]> | ApiKeyAuth +) @service({ title: "OpenAI", }) diff --git a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp index aa1817fe39..33c7cc3973 100644 --- a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp @@ -12,6 +12,12 @@ using TypeSpec.Http; * documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview. */ +@useAuth( + AadOauth2Auth<["https://cognitiveservices.azure.com/.default"]> | ApiKeyAuth< + ApiKeyLocation.header, + "Ocp-Apim-Subscription-Key" + > +) @service({ title: "QnA Maker", }) diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp index d9ee4d0c6d..b0f8901363 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp @@ -12,6 +12,12 @@ using TypeSpec.Http; * documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview. */ +@useAuth( + AadOauth2Auth<["https://cognitiveservices.azure.com/.default"]> | ApiKeyAuth< + ApiKeyLocation.header, + "Ocp-Apim-Subscription-Key" + > +) @service({ title: "Microsoft Cognitive Language Service - Question Answering - Authoring", }) diff --git a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/main.tsp index 617ac840ce..7dd3e6822d 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/main.tsp @@ -7,6 +7,7 @@ using TypeSpec.Http; /** * An API for QnAMaker runtime */ +@useAuth(ApiKeyAuth) @service({ title: "QnAMaker Runtime Client", }) From 4e0feaf308db23589247d4ac487285495657d525 Mon Sep 17 00:00:00 2001 From: Jose Manuel Heredia Hidalgo Date: Thu, 25 Jan 2024 10:51:29 -0600 Subject: [PATCH 13/33] Update tspconfig for data-plane (#4869) Update data-plane tspconfig to comply with the azure-rest-spec repo requirements fixes #4787 4787 --- .../update_config_2024-01-23-17-46.json | 10 +++++ .../src/emiters/emit-typespec-config.ts | 40 ++++++++++++------- .../openapi-to-typespec/src/main.ts | 2 +- .../analyzeText/tsp-output/tspconfig.yaml | 7 ++++ .../anomalyDetector/tsp-output/tspconfig.yaml | 7 ++++ .../test/batch/tsp-output/tspconfig.yaml | 7 ++++ .../bodyComplex/tsp-output/tspconfig.yaml | 7 ++++ .../complexObject/tsp-output/tspconfig.yaml | 7 ++++ .../tsp-output/tspconfig.yaml | 7 ++++ .../test/keyvault/tsp-output/tspconfig.yaml | 7 ++++ .../test/loadTest/tsp-output/tspconfig.yaml | 7 ++++ .../test/nh/tsp-output/tspconfig.yaml | 7 ++++ .../test/openAI/tsp-output/tspconfig.yaml | 7 ++++ .../test/pagination/tsp-output/tspconfig.yaml | 7 ++++ .../test/qna/tsp-output/tspconfig.yaml | 7 ++++ .../qnaAuthoring/tsp-output/tspconfig.yaml | 7 ++++ .../test/qnaRuntime/tsp-output/tspconfig.yaml | 7 ++++ .../schemaRegistry/tsp-output/tspconfig.yaml | 7 ++++ .../test/url/tsp-output/tspconfig.yaml | 7 ++++ .../test/webpubsub/tsp-output/tspconfig.yaml | 7 ++++ 20 files changed, 155 insertions(+), 16 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/update_config_2024-01-23-17-46.json diff --git a/common/changes/@autorest/openapi-to-typespec/update_config_2024-01-23-17-46.json b/common/changes/@autorest/openapi-to-typespec/update_config_2024-01-23-17-46.json new file mode 100644 index 0000000000..59bb86c114 --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/update_config_2024-01-23-17-46.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Improve data-plane tspconfig", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts index d51f92e61a..f89e847534 100644 --- a/packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts @@ -1,24 +1,34 @@ +import { pascalCase } from "@azure-tools/codegen"; +import { TypespecProgram } from "interfaces"; import { getSession } from "../autorest-session"; import { getOptions } from "../options"; import { formatFile } from "../utils/format"; -export async function emitTypespecConfig(filePath: string): Promise { +export async function emitTypespecConfig(filePath: string, programDetails: TypespecProgram): Promise { const session = getSession(); const { isArm } = getOptions(); - let content = `emit: - - "@azure-tools/typespec-autorest" - # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code - # "@azure-tools/typespec-python": - # "basic-setup-py": true - # "package-version": - # "package-name": - # "output-path": - # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code - # "@azure-tools/typespec-java": true - # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code - # "@azure-tools/typespec-csharp": true - # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code - # "@azure-tools/typespec-ts": true + let content = ` + emit: + - "@azure-tools/typespec-autorest" + + options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" + # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code + # "@azure-tools/typespec-python": + # "basic-setup-py": true + # "package-version": + # "package-name": + # "output-path": + # Uncomment this line and add "@azure-tools/typespec-java" to your package.json to generate Java code + # "@azure-tools/typespec-java": true + # Uncomment this line and add "@azure-tools/typespec-csharp" to your package.json to generate C# code + # "@azure-tools/typespec-csharp": true + # Uncomment this line and add "@azure-tools/typespec-ts" to your package.json to generate Typescript code + # "@azure-tools/typespec-ts": true `; if (isArm) { diff --git a/packages/extensions/openapi-to-typespec/src/main.ts b/packages/extensions/openapi-to-typespec/src/main.ts index be6dbc0bd7..06b4acdf5b 100644 --- a/packages/extensions/openapi-to-typespec/src/main.ts +++ b/packages/extensions/openapi-to-typespec/src/main.ts @@ -35,7 +35,7 @@ export async function processConverter(host: AutorestExtensionHost) { await emitRoutes(getFilePath(session, "routes.tsp"), programDetails); await emitMain(getFilePath(session, "main.tsp"), programDetails); await emitPackage(getFilePath(session, "package.json"), programDetails); - await emitTypespecConfig(getFilePath(session, "tspconfig.yaml")); + await emitTypespecConfig(getFilePath(session, "tspconfig.yaml"), programDetails); } function getOutuptDirectory(session: Session) { diff --git a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/url/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/url/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/url/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/url/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true diff --git a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/tspconfig.yaml index fb405fa449..ca5603dc70 100644 --- a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/tspconfig.yaml @@ -1,5 +1,12 @@ emit: - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "data-plane" + emitter-output-dir: "{project-root}/.." + examples-directory: "{project-root}/examples" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" # Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code # "@azure-tools/typespec-python": # "basic-setup-py": true From 1579900a2a5a9a276ada518eb621d481fe168507 Mon Sep 17 00:00:00 2001 From: Chenjie Shi Date: Thu, 1 Feb 2024 21:46:31 +0800 Subject: [PATCH 14/33] Add feature to converter (#4868) 1. support flatten 2. support custom resource, fix #4861 3. fix doc multi-line issue 4. fix naming escape issue 5. fix duration default value problem --- ...dd-feature-converter_2024-02-01-08-01.json | 10 + common/config/rush/pnpm-lock.yaml | 331 +- .../extensions/openapi-to-typespec/README.md | 4 +- .../openapi-to-typespec/convert.ps1 | 4 +- .../openapi-to-typespec/package.json | 22 +- .../src/generate/generate-arm-resource.ts | 73 +- .../src/generate/generate-parameter.ts | 3 +- .../openapi-to-typespec/src/interfaces.ts | 4 + .../openapi-to-typespec/src/main.ts | 2 +- .../src/transforms/transform-arm-resources.ts | 138 +- .../src/transforms/transform-object.ts | 8 +- .../src/transforms/transform-operations.ts | 2 +- .../src/utils/decorators.ts | 9 + .../openapi-to-typespec/src/utils/docs.ts | 26 +- .../openapi-to-typespec/src/utils/imports.ts | 33 +- .../src/utils/model-generation.ts | 3 +- .../src/utils/resource-discovery.ts | 43 +- .../openapi-to-typespec/src/utils/values.ts | 18 +- .../arm-agrifood/tsp-output/DataConnector.tsp | 19 +- .../tsp-output/DataManagerForAgriculture.tsp | 26 +- .../DataManagerForAgricultureExtension.tsp | 22 +- .../DataManagerForAgricultureSolution.tsp | 22 +- .../arm-agrifood/tsp-output/Extension.tsp | 19 +- .../tsp-output/PrivateEndpointConnection.tsp | 22 +- .../tsp-output/PrivateLinkResource.tsp | 15 +- .../test/arm-agrifood/tsp-output/Solution.tsp | 25 +- .../test/arm-agrifood/tsp-output/models.tsp | 34 +- .../arm-alertsmanagement/tsp-output/Alert.tsp | 13 +- .../tsp-output/AlertProcessingRule.tsp | 15 +- .../tsp-output/SmartGroup.tsp | 13 +- .../tsp-output/models.tsp | 3 + .../tsp-output/AnalysisServicesServer.tsp | 13 +- .../tsp-output/models.tsp | 34 + .../tsp-output/AccessInformationContract.tsp | 16 +- .../tsp-output/ApiContract.tsp | 16 +- .../ApiManagementServiceResource.tsp | 41 +- .../tsp-output/ApiReleaseContract.tsp | 13 +- .../tsp-output/ApiVersionSetContract.tsp | 15 +- .../AuthorizationServerContract.tsp | 16 +- .../tsp-output/BackendContract.tsp | 13 +- .../tsp-output/CacheContract.tsp | 13 +- .../tsp-output/CertificateContract.tsp | 15 +- .../tsp-output/DeletedServiceContract.tsp | 22 +- .../tsp-output/DiagnosticContract.tsp | 13 +- .../tsp-output/EmailTemplateContract.tsp | 15 +- .../GatewayCertificateAuthorityContract.tsp | 16 +- .../tsp-output/GatewayContract.tsp | 13 +- .../GatewayHostnameConfigurationContract.tsp | 16 +- .../tsp-output/GlobalSchemaContract.tsp | 18 +- .../tsp-output/GroupContract.tsp | 13 +- .../tsp-output/IdentityProviderContract.tsp | 16 +- .../tsp-output/IssueAttachmentContract.tsp | 16 +- .../tsp-output/IssueCommentContract.tsp | 15 +- .../tsp-output/IssueContract.tsp | 13 +- .../tsp-output/LoggerContract.tsp | 13 +- .../tsp-output/NamedValueContract.tsp | 23 +- .../tsp-output/NotificationContract.tsp | 15 +- .../OpenidConnectProviderContract.tsp | 16 +- .../tsp-output/OperationContract.tsp | 13 +- .../tsp-output/PolicyContract.tsp | 13 +- .../tsp-output/PortalDelegationSettings.tsp | 16 +- .../tsp-output/PortalRevisionContract.tsp | 41 +- .../tsp-output/PortalSigninSettings.tsp | 15 +- .../tsp-output/PortalSignupSettings.tsp | 15 +- .../tsp-output/PrivateEndpointConnection.tsp | 16 +- .../tsp-output/PrivateLinkResource.tsp | 15 +- .../tsp-output/ProductContract.tsp | 13 +- .../tsp-output/SchemaContract.tsp | 16 +- .../tsp-output/SubscriptionContract.tsp | 23 +- .../tsp-output/TagContract.tsp | 13 +- .../tsp-output/TagDescriptionContract.tsp | 16 +- .../tsp-output/TenantSettingsContract.tsp | 16 +- .../tsp-output/UserContract.tsp | 13 +- .../arm-apimanagement/tsp-output/models.tsp | 194 +- .../tsp-output/DenyAssignment.tsp | 13 +- .../tsp-output/ProviderOperationsMetadata.tsp | 1 + .../tsp-output/RoleAssignment.tsp | 13 +- .../tsp-output/RoleAssignmentSchedule.tsp | 16 +- .../RoleAssignmentScheduleInstance.tsp | 16 +- .../RoleAssignmentScheduleRequest.tsp | 16 +- .../tsp-output/RoleDefinition.tsp | 13 +- .../tsp-output/RoleEligibilitySchedule.tsp | 16 +- .../RoleEligibilityScheduleInstance.tsp | 16 +- .../RoleEligibilityScheduleRequest.tsp | 16 +- .../tsp-output/RoleManagementPolicy.tsp | 16 +- .../RoleManagementPolicyAssignment.tsp | 16 +- .../arm-authorization/tsp-output/models.tsp | 16 + .../tsp-output/Application.tsp | 1 + .../tsp-output/BusinessProcess.tsp | 1 + .../tsp-output/BusinessProcessVersion.tsp | 1 + .../tsp-output/InfrastructureResource.tsp | 1 + .../tsp-output/Space.tsp | 1 + .../tsp-output/models.tsp | 8 + .../tsp-output/AvailabilitySet.tsp | 17 +- .../tsp-output/CapacityReservation.tsp | 17 +- .../tsp-output/CapacityReservationGroup.tsp | 13 +- .../arm-compute/tsp-output/CloudService.tsp | 40 +- .../tsp-output/CloudServiceRole.tsp | 35 +- .../tsp-output/CommunityGallery.tsp | 10 +- .../tsp-output/CommunityGalleryImage.tsp | 12 +- .../CommunityGalleryImageVersion.tsp | 13 +- .../arm-compute/tsp-output/DedicatedHost.tsp | 17 +- .../tsp-output/DedicatedHostGroup.tsp | 12 +- .../test/arm-compute/tsp-output/Disk.tsp | 40 +- .../arm-compute/tsp-output/DiskAccess.tsp | 9 +- .../tsp-output/DiskEncryptionSet.tsp | 14 +- .../tsp-output/DiskRestorePoint.tsp | 18 +- .../test/arm-compute/tsp-output/Gallery.tsp | 12 +- .../tsp-output/GalleryApplication.tsp | 12 +- .../tsp-output/GalleryApplicationVersion.tsp | 13 +- .../arm-compute/tsp-output/GalleryImage.tsp | 12 +- .../tsp-output/GalleryImageVersion.tsp | 12 +- .../test/arm-compute/tsp-output/Image.tsp | 12 +- .../test/arm-compute/tsp-output/OSFamily.tsp | 30 +- .../test/arm-compute/tsp-output/OSVersion.tsp | 30 +- .../tsp-output/PrivateEndpointConnection.tsp | 25 +- .../tsp-output/ProximityPlacementGroup.tsp | 13 +- .../arm-compute/tsp-output/RestorePoint.tsp | 12 +- .../tsp-output/RestorePointCollection.tsp | 13 +- .../arm-compute/tsp-output/RoleInstance.tsp | 41 +- .../tsp-output/RollingUpgradeStatusInfo.tsp | 13 +- .../arm-compute/tsp-output/SharedGallery.tsp | 10 +- .../tsp-output/SharedGalleryImage.tsp | 12 +- .../tsp-output/SharedGalleryImageVersion.tsp | 13 +- .../test/arm-compute/tsp-output/Snapshot.tsp | 40 +- .../tsp-output/SshPublicKeyResource.tsp | 12 +- .../arm-compute/tsp-output/VirtualMachine.tsp | 39 +- .../tsp-output/VirtualMachineExtension.tsp | 13 +- .../VirtualMachineExtensionImage.tsp | 13 +- .../tsp-output/VirtualMachineRunCommand.tsp | 13 +- .../tsp-output/VirtualMachineScaleSet.tsp | 33 +- .../VirtualMachineScaleSetExtension.tsp | 19 +- .../tsp-output/VirtualMachineScaleSetVM.tsp | 34 +- .../VirtualMachineScaleSetVMExtension.tsp | 25 +- .../test/arm-compute/tsp-output/models.tsp | 216 +- .../test/arm-dns/tsp-output/DnsRecord.tsp | 24 +- .../test/arm-dns/tsp-output/DnsZone.tsp | 12 +- .../test/arm-dns/tsp-output/models.tsp | 4 + .../BatchDeploymentTrackedResource.tsp | 25 +- .../BatchEndpointTrackedResource.tsp | 25 +- .../tsp-output/CodeContainerResource.tsp | 19 +- .../tsp-output/CodeVersionResource.tsp | 19 +- .../tsp-output/ComponentContainerResource.tsp | 19 +- .../tsp-output/ComponentVersionResource.tsp | 19 +- .../tsp-output/ComputeResource.tsp | 29 +- .../tsp-output/DataContainerResource.tsp | 19 +- .../tsp-output/DataVersionBaseResource.tsp | 25 +- .../tsp-output/DatastoreResource.tsp | 13 +- .../EnvironmentContainerResource.tsp | 19 +- .../tsp-output/EnvironmentVersionResource.tsp | 19 +- .../tsp-output/Feature.tsp | 13 +- .../tsp-output/FeaturesetContainer.tsp | 21 +- .../tsp-output/FeaturesetVersion.tsp | 23 +- .../FeaturestoreEntityContainer.tsp | 22 +- .../tsp-output/FeaturestoreEntityVersion.tsp | 22 +- .../tsp-output/JobBaseResource.tsp | 27 +- .../tsp-output/LabelingJob.tsp | 25 +- .../tsp-output/ModelContainerResource.tsp | 19 +- .../tsp-output/ModelVersionResource.tsp | 23 +- .../OnlineDeploymentTrackedResource.tsp | 25 +- .../OnlineEndpointTrackedResource.tsp | 29 +- .../tsp-output/OutboundRuleBasicResource.tsp | 19 +- .../tsp-output/PrivateEndpointConnection.tsp | 22 +- .../tsp-output/Registry.tsp | 39 +- .../tsp-output/Schedule.tsp | 19 +- .../tsp-output/Workspace.tsp | 501 +- ...aceConnectionPropertiesV2BasicResource.tsp | 13 +- .../tsp-output/models.tsp | 20882 +++++++++------- .../tsp-output/routes.tsp | 6 +- .../tsp-output/DataProduct.tsp | 20 +- .../tsp-output/DataProductsCatalog.tsp | 1 + .../tsp-output/DataType.tsp | 27 +- .../tsp-output/models.tsp | 10 +- .../tsp-output/Account.tsp | 13 +- .../tsp-output/Quota.tsp | 1 + .../tsp-output/models.tsp | 3 + .../tsp-output/Association.tsp | 13 +- .../tsp-output/Frontend.tsp | 13 +- .../tsp-output/TrafficController.tsp | 13 +- .../tsp-output/models.tsp | 3 + .../test/arm-sphere/tsp-output/Catalog.tsp | 13 +- .../arm-sphere/tsp-output/Certificate.tsp | 1 + .../test/arm-sphere/tsp-output/Deployment.tsp | 13 +- .../test/arm-sphere/tsp-output/Device.tsp | 24 +- .../arm-sphere/tsp-output/DeviceGroup.tsp | 24 +- .../test/arm-sphere/tsp-output/Image.tsp | 13 +- .../test/arm-sphere/tsp-output/Product.tsp | 20 +- .../test/arm-sphere/tsp-output/models.tsp | 5 + .../arm-storage/tsp-output/BlobContainer.tsp | 21 +- .../tsp-output/BlobInventoryPolicy.tsp | 15 +- .../tsp-output/BlobServiceProperties.tsp | 15 +- .../arm-storage/tsp-output/DeletedAccount.tsp | 13 +- .../tsp-output/EncryptionScope.tsp | 13 +- .../tsp-output/FileServiceProperties.tsp | 15 +- .../test/arm-storage/tsp-output/FileShare.tsp | 13 +- .../tsp-output/ImmutabilityPolicy.tsp | 13 +- .../test/arm-storage/tsp-output/LocalUser.tsp | 13 +- .../tsp-output/ManagementPolicy.tsp | 13 +- .../tsp-output/ObjectReplicationPolicy.tsp | 16 +- .../tsp-output/PrivateEndpointConnection.tsp | 16 +- .../tsp-output/QueueServiceProperties.tsp | 16 +- .../arm-storage/tsp-output/StorageAccount.tsp | 34 +- .../arm-storage/tsp-output/StorageQueue.tsp | 13 +- .../test/arm-storage/tsp-output/Table.tsp | 13 +- .../tsp-output/TableServiceProperties.tsp | 16 +- .../test/arm-storage/tsp-output/models.tsp | 11 +- .../test/arm-test/tsp-output/DictProperty.tsp | 1 + .../test/arm-test/tsp-output/Employee.tsp | 7 +- .../test/arm-test/tsp-output/Enroll.tsp | 1 + .../test/arm-test/tsp-output/main.tsp | 1 + .../test/arm-test/tsp-output/models.tsp | 3 + .../test/batch/tsp-output/models.tsp | 40 +- .../test/bodyComplex/tsp-output/models.tsp | 4 + .../test/keyvault/tsp-output/models.tsp | 3 + .../test/keyvault/tsp-output/routes.tsp | 27 + .../test/openAI/tsp-output/models.tsp | 59 +- .../test/qnaRuntime/tsp-output/models.tsp | 10 +- .../test/schemaRegistry/tsp-output/routes.tsp | 10 +- 218 files changed, 14826 insertions(+), 10982 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/add-feature-converter_2024-02-01-08-01.json diff --git a/common/changes/@autorest/openapi-to-typespec/add-feature-converter_2024-02-01-08-01.json b/common/changes/@autorest/openapi-to-typespec/add-feature-converter_2024-02-01-08-01.json new file mode 100644 index 0000000000..aaba975ebd --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/add-feature-converter_2024-02-01-08-01.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Add support for custom resource, enhance doc conversion and fix default value issue", + "type": "minor" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 4eb9ea1f6b..b53509a3f6 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -15,14 +15,14 @@ dependencies: specifier: ~3.0.0 version: 3.0.255 '@azure-tools/typespec-autorest': - specifier: ^0.37.2 - version: 0.37.2(@azure-tools/typespec-azure-core@0.37.2)(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.51.0)(@typespec/versioning@0.51.0) + specifier: ^0.38.0 + version: 0.38.0(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0) '@azure-tools/typespec-azure-core': - specifier: ^0.37.2 - version: 0.37.2(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/rest@0.51.0) + specifier: ^0.38.0 + version: 0.38.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/rest@0.52.0) '@azure-tools/typespec-azure-resource-manager': - specifier: ^0.37.1 - version: 0.37.1(@azure-tools/typespec-autorest@0.37.2)(@azure-tools/typespec-azure-core@0.37.2)(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.51.0)(@typespec/versioning@0.51.0) + specifier: ^0.38.0 + version: 0.38.0(@azure-tools/typespec-autorest@0.38.0)(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0) '@azure-tools/uri': specifier: ~3.1.1 version: 3.1.1 @@ -165,26 +165,26 @@ dependencies: specifier: ^6.11.0 version: 6.11.0(eslint@8.53.0)(typescript@5.2.2) '@typespec/compiler': - specifier: ^0.51.0 - version: 0.51.0 + specifier: ^0.52.0 + version: 0.52.0 '@typespec/http': - specifier: ^0.51.0 - version: 0.51.0(@typespec/compiler@0.51.0) + specifier: ^0.52.0 + version: 0.52.0(@typespec/compiler@0.52.0) '@typespec/openapi': - specifier: ^0.50.0 - version: 0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) + specifier: ^0.52.0 + version: 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) '@typespec/openapi3': - specifier: ^0.50.0 - version: 0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/versioning@0.51.0) + specifier: ^0.52.0 + version: 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/versioning@0.52.0) '@typespec/prettier-plugin-typespec': - specifier: ^0.51.0 - version: 0.51.0 + specifier: ^0.52.0 + version: 0.52.0 '@typespec/rest': - specifier: ^0.51.0 - version: 0.51.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) + specifier: ^0.52.0 + version: 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) '@typespec/versioning': - specifier: ^0.51.0 - version: 0.51.0(@typespec/compiler@0.51.0) + specifier: ^0.52.0 + version: 0.52.0(@typespec/compiler@0.52.0) ajv: specifier: ^8.6.0 version: 8.12.0 @@ -393,57 +393,57 @@ packages: engines: {node: '>=10.12.0'} dev: false - /@azure-tools/typespec-autorest@0.37.2(@azure-tools/typespec-azure-core@0.37.2)(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.51.0)(@typespec/versioning@0.51.0): - resolution: {integrity: sha512-iLNF2tdIET0qVmZ+7LMXGLj9tDI0I8pfDq12kSLQryAp6NzOn6hMz73gUEgIE1Gj6KE4YrQXfHf/F4kNfHpWeA==} + /@azure-tools/typespec-autorest@0.38.0(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0): + resolution: {integrity: sha512-lBxuAtmE9kCeafSqwsiAp1sjVTEl4PdxxLq22zbQag2/ISLjVAXCae62+qULzqpY7pbDU03f/4tjvf4W7EPwXQ==} engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-azure-core': ~0.37.1 - '@typespec/compiler': ~0.51.0 - '@typespec/http': ~0.51.0 - '@typespec/openapi': ~0.51.0 - '@typespec/rest': ~0.51.0 - '@typespec/versioning': ~0.51.0 - dependencies: - '@azure-tools/typespec-azure-core': 0.37.2(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/rest@0.51.0) - '@typespec/compiler': 0.51.0 - '@typespec/http': 0.51.0(@typespec/compiler@0.51.0) - '@typespec/openapi': 0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) - '@typespec/rest': 0.51.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) - '@typespec/versioning': 0.51.0(@typespec/compiler@0.51.0) - dev: false - - /@azure-tools/typespec-azure-core@0.37.2(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/rest@0.51.0): - resolution: {integrity: sha512-/503w3jnRnStowsI7etaDynwQcz7ecNqhFKZErBYGbKVZKoEwJIr5d59m52sjJs8cmr2336es6jw2n2TdfotrA==} + '@azure-tools/typespec-azure-core': ~0.38.0 + '@typespec/compiler': ~0.52.0 + '@typespec/http': ~0.52.0 + '@typespec/openapi': ~0.52.0 + '@typespec/rest': ~0.52.0 + '@typespec/versioning': ~0.52.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.38.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/rest@0.52.0) + '@typespec/compiler': 0.52.0 + '@typespec/http': 0.52.0(@typespec/compiler@0.52.0) + '@typespec/openapi': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) + '@typespec/rest': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) + '@typespec/versioning': 0.52.0(@typespec/compiler@0.52.0) + dev: false + + /@azure-tools/typespec-azure-core@0.38.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/rest@0.52.0): + resolution: {integrity: sha512-ASM+njC2lpzPykzw2OicWIaAOH+OBe3bVMrufEnINBjlr7owAtudvjrTLLWmAVMBciL/YOF579KdyjxTbaxJ5A==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.51.0 - '@typespec/http': ~0.51.0 - '@typespec/rest': ~0.51.0 + '@typespec/compiler': ~0.52.0 + '@typespec/http': ~0.52.0 + '@typespec/rest': ~0.52.0 dependencies: - '@typespec/compiler': 0.51.0 - '@typespec/http': 0.51.0(@typespec/compiler@0.51.0) - '@typespec/rest': 0.51.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) + '@typespec/compiler': 0.52.0 + '@typespec/http': 0.52.0(@typespec/compiler@0.52.0) + '@typespec/rest': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) dev: false - /@azure-tools/typespec-azure-resource-manager@0.37.1(@azure-tools/typespec-autorest@0.37.2)(@azure-tools/typespec-azure-core@0.37.2)(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.51.0)(@typespec/versioning@0.51.0): - resolution: {integrity: sha512-1RyFLJeS4lWVne/djKmPHix4UYJIO7o59n0SDlGrK8jx8k6nK4mu9LgSiwyufvBXBwVJ++dO10qRbBngJJquUg==} + /@azure-tools/typespec-azure-resource-manager@0.38.0(@azure-tools/typespec-autorest@0.38.0)(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0): + resolution: {integrity: sha512-jWMwIzT5WCokIW0IOTi/yqc5UsO47Mw+k9CGBwSmggYug/hmDELz+AfNyL/0T+rM2eF+5R/IrMKFI4Hq/OE9vQ==} engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-autorest': ~0.37.2 - '@azure-tools/typespec-azure-core': ~0.37.2 - '@typespec/compiler': ~0.51.0 - '@typespec/http': ~0.51.0 - '@typespec/openapi': ~0.51.0 - '@typespec/rest': ~0.51.0 - '@typespec/versioning': ~0.51.0 - dependencies: - '@azure-tools/typespec-autorest': 0.37.2(@azure-tools/typespec-azure-core@0.37.2)(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.51.0)(@typespec/versioning@0.51.0) - '@azure-tools/typespec-azure-core': 0.37.2(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/rest@0.51.0) - '@typespec/compiler': 0.51.0 - '@typespec/http': 0.51.0(@typespec/compiler@0.51.0) - '@typespec/openapi': 0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) - '@typespec/rest': 0.51.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) - '@typespec/versioning': 0.51.0(@typespec/compiler@0.51.0) + '@azure-tools/typespec-autorest': ~0.38.0 + '@azure-tools/typespec-azure-core': ~0.38.0 + '@typespec/compiler': ~0.52.0 + '@typespec/http': ~0.52.0 + '@typespec/openapi': ~0.52.0 + '@typespec/rest': ~0.52.0 + '@typespec/versioning': ~0.52.0 + dependencies: + '@azure-tools/typespec-autorest': 0.38.0(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0) + '@azure-tools/typespec-azure-core': 0.38.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/rest@0.52.0) + '@typespec/compiler': 0.52.0 + '@typespec/http': 0.52.0(@typespec/compiler@0.52.0) + '@typespec/openapi': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) + '@typespec/rest': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) + '@typespec/versioning': 0.52.0(@typespec/compiler@0.52.0) dev: false /@azure-tools/uri@3.1.1: @@ -480,6 +480,14 @@ packages: chalk: 2.4.2 dev: false + /@babel/code-frame@7.23.5: + resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.23.4 + chalk: 2.4.2 + dev: false + /@babel/compat-data@7.23.3: resolution: {integrity: sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==} engines: {node: '>=6.9.0'} @@ -624,6 +632,15 @@ packages: js-tokens: 4.0.0 dev: false + /@babel/highlight@7.23.4: + resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.22.20 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: false + /@babel/parser@7.23.3: resolution: {integrity: sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==} engines: {node: '>=6.0.0'} @@ -1273,6 +1290,11 @@ packages: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: false + /@sindresorhus/merge-streams@1.0.0: + resolution: {integrity: sha512-rUV5WyJrJLoloD4NDN1V1+LDMDWOa4OTsT4yYJwQNpTU6FWxkxHpL7eu4w+DmiH8x/EAM1otkPE1+LaspIbplw==} + engines: {node: '>=18'} + dev: false + /@sinonjs/commons@3.0.0: resolution: {integrity: sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==} dependencies: @@ -1750,18 +1772,18 @@ packages: eslint-visitor-keys: 3.4.3 dev: false - /@typespec/compiler@0.51.0: - resolution: {integrity: sha512-eGxQG27ovSkmuAyUpYhQzTfENmMV1w/Zm1binmAT/gUF56SE+XGCg8pLaBNlDgRbcGDJaziiop7uBMDbsuBDyg==} + /@typespec/compiler@0.52.0: + resolution: {integrity: sha512-36cZ5RWxRjL4SUe41KjPh3j3RQibpUoOzHcSllQJ3ByTSZdXv1zckMHLiRfaAbTXUADSAn2GMs4ZO3s8GdOGIQ==} engines: {node: '>=18.0.0'} hasBin: true dependencies: - '@babel/code-frame': 7.22.13 + '@babel/code-frame': 7.23.5 ajv: 8.12.0 - change-case: 4.1.2 - globby: 13.2.2 + change-case: 5.3.0 + globby: 14.0.0 mustache: 4.2.0 picocolors: 1.0.0 - prettier: 3.1.0 + prettier: 3.1.1 prompts: 2.4.2 semver: 7.5.4 vscode-languageserver: 9.0.1 @@ -1770,66 +1792,66 @@ packages: yargs: 17.7.2 dev: false - /@typespec/http@0.51.0(@typespec/compiler@0.51.0): - resolution: {integrity: sha512-9YtcIPzUP0ELf/ZFBfhgLCPIyERn+DrYJTtEtaWkcO+qEkdFxO5eahwgh1FPuS6iJrW6pUPBuAfGDOAH1+N/PQ==} + /@typespec/http@0.52.0(@typespec/compiler@0.52.0): + resolution: {integrity: sha512-8UluHzYV3zZFSRuKYeQombaJzYMAq8lcM7ysOY6zxmagRxv/L2LAG5iMu7iSrM48I7PR+WVhXSonRA0xhHctfw==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.51.0 + '@typespec/compiler': ~0.52.0 dependencies: - '@typespec/compiler': 0.51.0 + '@typespec/compiler': 0.52.0 dev: false - /@typespec/openapi3@0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/versioning@0.51.0): - resolution: {integrity: sha512-R3YOEpRZoABrTrglLClesknhsl1AqXRt0lzZLttATal6w4V0XTGFsc3gyD0muoUTy1e1vPfQixpUTY2CHFqIQA==} + /@typespec/openapi3@0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/versioning@0.52.0): + resolution: {integrity: sha512-PPhNdpKQD2iHJemOaRUhnaeFWa4ApW4HtcZI+jrg4hyNSIwDYxL0OwwRohKjRUKM98iacpXvEh+5rKtkPiY2Qw==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.50.0 - '@typespec/http': ~0.50.0 - '@typespec/openapi': ~0.50.0 - '@typespec/versioning': ~0.50.0 - dependencies: - '@typespec/compiler': 0.51.0 - '@typespec/http': 0.51.0(@typespec/compiler@0.51.0) - '@typespec/openapi': 0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) - '@typespec/versioning': 0.51.0(@typespec/compiler@0.51.0) + '@typespec/compiler': ~0.52.0 + '@typespec/http': ~0.52.0 + '@typespec/openapi': ~0.52.0 + '@typespec/versioning': ~0.52.0 + dependencies: + '@typespec/compiler': 0.52.0 + '@typespec/http': 0.52.0(@typespec/compiler@0.52.0) + '@typespec/openapi': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) + '@typespec/versioning': 0.52.0(@typespec/compiler@0.52.0) yaml: 2.3.4 dev: false - /@typespec/openapi@0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0): - resolution: {integrity: sha512-aOg3y4XxRl6bI/DR+OR1GFZD+1s9ygH0Z8jarHc3wSNnh4gLmAZ8RYmPFPzwULhvck/EYw+P9R0kcYpX8iC+Lw==} + /@typespec/openapi@0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0): + resolution: {integrity: sha512-2Otnu9glehxvp6TU7NOHEniBDDKufV03XTmeVGgGEmu/j+cveAMg8lA1/O0RBpS2oHGsCFnMEuPcR8M1c0LI+Q==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.50.0 - '@typespec/http': ~0.50.0 + '@typespec/compiler': ~0.52.0 + '@typespec/http': ~0.52.0 dependencies: - '@typespec/compiler': 0.51.0 - '@typespec/http': 0.51.0(@typespec/compiler@0.51.0) + '@typespec/compiler': 0.52.0 + '@typespec/http': 0.52.0(@typespec/compiler@0.52.0) dev: false - /@typespec/prettier-plugin-typespec@0.51.0: - resolution: {integrity: sha512-byj0Xw+lg6LDa8duSC1iEhGCwOxb1yr4A7/KNL/JzFKPSRgUD4WePba8wxZEeMcRR2LeWlIIm8zxpWG97jkk8g==} + /@typespec/prettier-plugin-typespec@0.52.0: + resolution: {integrity: sha512-6l4LylxfCVvAdbCiqFqJwPYyRkzV+TjZ/gQsOPqNlqxTDsMq61A6QT01BSftocJWRTFdSXP4Z3r2LP9E8FoNrg==} dependencies: - prettier: 3.1.0 + prettier: 3.1.1 dev: false - /@typespec/rest@0.51.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0): - resolution: {integrity: sha512-swigbWjdewmKg+DtHj/a2r8jyX810JYkcIcVHkqdnkCq6TqlyNP0VSSUM39BmXmkCHMUumlSm2cOMieESRfNlg==} + /@typespec/rest@0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0): + resolution: {integrity: sha512-dLsY0fS60IVaAt4eCRcvEqorX/miPVV33du3dETTYYmbHtfEbvBKgTj/m6OH4noey7oaihlvLz5kYyLv8Am7zA==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.51.0 - '@typespec/http': ~0.51.0 + '@typespec/compiler': ~0.52.0 + '@typespec/http': ~0.52.0 dependencies: - '@typespec/compiler': 0.51.0 - '@typespec/http': 0.51.0(@typespec/compiler@0.51.0) + '@typespec/compiler': 0.52.0 + '@typespec/http': 0.52.0(@typespec/compiler@0.52.0) dev: false - /@typespec/versioning@0.51.0(@typespec/compiler@0.51.0): - resolution: {integrity: sha512-eja0epBhtmJRO+Jq0Zdb2eRcSTsU+uq/X0xgD5SM+KB97nxFtaRkOJYd59QBN+XysvkcfVRrLOGJjzcpNMa0cw==} + /@typespec/versioning@0.52.0(@typespec/compiler@0.52.0): + resolution: {integrity: sha512-Vr4WHaZiDOxJqRp8/u6X0R45E+rFKEprYmSZX0o5bzetj0cVjOIEbQZvDJCif1Uz0S3K0KKfqf/kYmdYWMJ7Dw==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.51.0 + '@typespec/compiler': ~0.52.0 dependencies: - '@typespec/compiler': 0.51.0 + '@typespec/compiler': 0.52.0 dev: false /@ungap/structured-clone@1.2.0: @@ -2685,6 +2707,10 @@ packages: resolution: {integrity: sha512-tH6YZXViaeC2/Mnt8m4gSmbZfNorC2rhwCX2bXw8SYZWr8ljCPB7iA+1TLG9t7yroWBFauc63LlOZ1gucMVCWw==} dev: false + /change-case@5.3.0: + resolution: {integrity: sha512-Eykca0fGS/xYlx2fG5NqnGSnsWauhSGiSXYhB1kO6E909GUfo8S54u4UZNS7lMJmgZumZ2SUpWaoLgAcfQRICg==} + dev: false + /change-case@5.4.0: resolution: {integrity: sha512-11YRFf0f4pI+ROHUfq64WivyrcNSrZjdDt2qgVxvAObtj/Pwnu5uAKObHRbN9uAhaDFkvkqcKVEl8Dxnmx+N7w==} dev: false @@ -4255,6 +4281,18 @@ packages: slash: 4.0.0 dev: false + /globby@14.0.0: + resolution: {integrity: sha512-/1WM/LNHRAOH9lZta77uGbq0dAEQM+XjNesWwhlERDVenqothRbnzTrL3/LrIoEPPjeUHC3vrS6TwoyxeHs7MQ==} + engines: {node: '>=18'} + dependencies: + '@sindresorhus/merge-streams': 1.0.0 + fast-glob: 3.3.2 + ignore: 5.2.4 + path-type: 5.0.0 + slash: 5.1.0 + unicorn-magic: 0.1.0 + dev: false + /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: @@ -6635,6 +6673,11 @@ packages: engines: {node: '>=8'} dev: false + /path-type@5.0.0: + resolution: {integrity: sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==} + engines: {node: '>=12'} + dev: false + /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: false @@ -6709,6 +6752,12 @@ packages: hasBin: true dev: false + /prettier@3.1.1: + resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==} + engines: {node: '>=14'} + hasBin: true + dev: false + /pretty-format@26.6.2: resolution: {integrity: sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==} engines: {node: '>= 10'} @@ -7281,6 +7330,11 @@ packages: engines: {node: '>=12'} dev: false + /slash@5.1.0: + resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} + engines: {node: '>=14.16'} + dev: false + /smart-buffer@4.2.0: resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} engines: {node: '>= 6.0.0', npm: '>= 3.0.0'} @@ -8129,6 +8183,11 @@ packages: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} dev: false + /unicorn-magic@0.1.0: + resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} + engines: {node: '>=18'} + dev: false + /union-value@1.0.1: resolution: {integrity: sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==} engines: {node: '>=0.10.0'} @@ -8652,7 +8711,7 @@ packages: dev: false file:projects/autorest.tgz(ts-node@10.9.1): - resolution: {integrity: sha512-SvV+cy1y4sDq7SBRVLMMEHxwEenXbnqh2epuL4w/JPstJeAkkSZHZ+zEr7NPa/gKlMcpHLvJAKZclQ7Wxr/Gqw==, tarball: file:projects/autorest.tgz} + resolution: {integrity: sha512-IVX851LfnNuOOa9ogcw5VrtP6DCEU6SGwdbWohC8SPyIc+NvkDHMNPn4YEVQFKboieTbliTRogzKi1Lqupu/kA==, tarball: file:projects/autorest.tgz} id: file:projects/autorest.tgz name: '@rush-temp/autorest' version: 0.0.0 @@ -8710,7 +8769,7 @@ packages: dev: false file:projects/cadl.tgz(ts-node@10.9.1)(webpack-cli@5.1.4)(webpack@5.89.0): - resolution: {integrity: sha512-av7i43qPFgwFiE7GHT5KJPa4d0FHlFTbx/y04efEF/83afKlgZ5HVMrFi7N/+lYpm1lHBMPZ0aPn4gK6m23EsQ==, tarball: file:projects/cadl.tgz} + resolution: {integrity: sha512-GO2iRP6pv3OR2QwYUE+tb7TP6nC+o6bv5ErnrT1vleUz33DH9Kz1Jb9obYFl+4GgtXAaT0fSvCUNgm3pA5ej+A==, tarball: file:projects/cadl.tgz} id: file:projects/cadl.tgz name: '@rush-temp/cadl' version: 0.0.0 @@ -8756,7 +8815,7 @@ packages: dev: false file:projects/codegen.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-3C8weoCa1kCOKeoOVrLzpSZo5dzm6rUBu6GpSekpssx7TPkHZP/9D2Zk7gaMX3IdLiJe9UHH8mMtNEUZM07QMQ==, tarball: file:projects/codegen.tgz} + resolution: {integrity: sha512-VovTenml5aFvdxVxeubTWgNxH95b97qPKSJfccqCog+K5N1MLKQ8OyLfHBIj1we1u2OWAwsUVfDAJDBRsZvCmQ==, tarball: file:projects/codegen.tgz} id: file:projects/codegen.tgz name: '@rush-temp/codegen' version: 0.0.0 @@ -8796,7 +8855,7 @@ packages: dev: false file:projects/codemodel.tgz(jest@29.7.0)(prettier@3.1.0): - resolution: {integrity: sha512-XU/8wU9Jo2eyvIFEVi22uh9YHNGK2X69RZ3fhSsdx9e6Ccp2ajm3QX++m7rV8b1FthMVeIn3FHFGIC7miuT2/Q==, tarball: file:projects/codemodel.tgz} + resolution: {integrity: sha512-eciCOrz1bsEKinYsI0hZwEsNX/tZZSbOwiI6BGzznOoVjf7gZ/bE9IhoVnRz6rQ192Qtrkz0IzsoAmCHNZQ1cw==, tarball: file:projects/codemodel.tgz} id: file:projects/codemodel.tgz name: '@rush-temp/codemodel' version: 0.0.0 @@ -8828,7 +8887,7 @@ packages: dev: false file:projects/common.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-dr0VbBpkYbGLe+5tnqwXZcU37okgm1NFocwBAyMKuwD8M7QRNEBSw+CWz04fKcO6bFUc4QZHbNQyM9RiDZs8pg==, tarball: file:projects/common.tgz} + resolution: {integrity: sha512-Dr5MV/1kdgzhxptcFbe1cla9YfQKIIPgZ+KjDwrrSlUGr8B4449Bq++2So07dJMQANDoyXjEPYVWoMAUB3YndA==, tarball: file:projects/common.tgz} id: file:projects/common.tgz name: '@rush-temp/common' version: 0.0.0 @@ -8861,7 +8920,7 @@ packages: dev: false file:projects/compare.tgz(prettier@3.1.0): - resolution: {integrity: sha512-TdSUwopQGGjakA2XILTfCpdkmPjMt0tg/U2uHdTsRPS3cBco9dE42Lzg2fQWuqo8kpP54tIAQ38w2mIg9IYiLw==, tarball: file:projects/compare.tgz} + resolution: {integrity: sha512-+V9SrJtEo0ilGKK7vr0UsFzAxl0GfRPB+MxBS8dl9KkR0/YTOIOgbY2nKDXPxsG5vkaFZ71hgDAwAbdqVOxhWg==, tarball: file:projects/compare.tgz} id: file:projects/compare.tgz name: '@rush-temp/compare' version: 0.0.0 @@ -8907,7 +8966,7 @@ packages: dev: false file:projects/configuration.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-QIvRtuY4X8HzqQc5WSZSnxTEMte4WOqY5CcI2VgvRWeuj9X/BpUwCvUJG7qQc7FhQ/KUlTLC4Qqfsy3DzD+/gA==, tarball: file:projects/configuration.tgz} + resolution: {integrity: sha512-refACiofNn9MEmuxOHQ+FlnM1QVGK7jt1n0cTpoK3vUp9A865OmlIPq6GPuSRw6WqGD1vJFX4IS+ng7+fJwGIA==, tarball: file:projects/configuration.tgz} id: file:projects/configuration.tgz name: '@rush-temp/configuration' version: 0.0.0 @@ -8948,7 +9007,7 @@ packages: dev: false file:projects/core.tgz(ts-node@10.9.1): - resolution: {integrity: sha512-aMmjUxmr7vDPP8vbV0AuWwuyWlv3LFEFe9bDTsoSfQXouygxRsG18vzVWtEXqxLcA2DLLQof9fmHoFR4/IWBrQ==, tarball: file:projects/core.tgz} + resolution: {integrity: sha512-eYt9hPHj/gnuPH1z8V/POm8I7Qk5f3sPhKQSrtz0vDmpXFeBmOQjku6UizVNGdIsjYAYmKM6sxOsjRdHRYv5aA==, tarball: file:projects/core.tgz} id: file:projects/core.tgz name: '@rush-temp/core' version: 0.0.0 @@ -9013,7 +9072,7 @@ packages: dev: false file:projects/datastore.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-6/wu2bBUSvArdPUcvguk4iP5weUXdYt6po8oTByiu4MOKai2WH6T2elniSQVeNa8i0nspiwRrrKZfBA1LRYNfw==, tarball: file:projects/datastore.tgz} + resolution: {integrity: sha512-rw9TMnec+y4rClT4qX7eiU/MnaDL4sxvFHk5dFVa3n0W2aK8BSvOKfnYezMGXEQ6AcBwC1b3jOIQyGGl/y7LHg==, tarball: file:projects/datastore.tgz} id: file:projects/datastore.tgz name: '@rush-temp/datastore' version: 0.0.0 @@ -9054,7 +9113,7 @@ packages: dev: false file:projects/deduplication.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-OeYQ73RhcmGwZbW6Ctnuh+q4vIjgRR2880FOuFYSGSAia3/ROZGlAzQqZrHn2/vsOcYXRWZHXy/84HCRcSsIww==, tarball: file:projects/deduplication.tgz} + resolution: {integrity: sha512-v0Qz78yfJ+q4XeJE/VJp9JDKvIjRt264L4SrYTs+m85UIFpBl4XoP7sSUOk5yuTSeJlaEbaAQ5WRwJcnT+Q8vw==, tarball: file:projects/deduplication.tgz} id: file:projects/deduplication.tgz name: '@rush-temp/deduplication' version: 0.0.0 @@ -9088,7 +9147,7 @@ packages: dev: false file:projects/extension-base.tgz(jest@29.7.0)(prettier@3.1.0): - resolution: {integrity: sha512-tooRuR6QsOAqpII/MvkKbICjhyRxKFNPhT1y05CG5wlgrqTrwok6sYt0M6bGb73apeC0n7MZbPpWvSR7kQKdrQ==, tarball: file:projects/extension-base.tgz} + resolution: {integrity: sha512-MBEh+961tu6edrkkdRYUrNtAngts+uuekG3CzzYbIpmsTup2RzIk57euiWSh8zA0d3375iPVMwuHd6m6ORcaxA==, tarball: file:projects/extension-base.tgz} id: file:projects/extension-base.tgz name: '@rush-temp/extension-base' version: 0.0.0 @@ -9116,7 +9175,7 @@ packages: dev: false file:projects/extension.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-YXVy7zorVQE5y0/DwaZobVpgJKsMg8FN2/17G/IXxFH8qzEmEoC6gJPE26mf10HTI0noSGV3NCWCSyzsReEb7w==, tarball: file:projects/extension.tgz} + resolution: {integrity: sha512-BtX8trhAIukgMnSIDC0Ou3fn3IKV9dNyF4oVHAqvudItaLrJSLRfzg6wxyXabSFFSRrohWNSx3ZdnNRgJsRSWw==, tarball: file:projects/extension.tgz} id: file:projects/extension.tgz name: '@rush-temp/extension' version: 0.0.0 @@ -9161,7 +9220,7 @@ packages: dev: false file:projects/fixer.tgz(ts-node@10.9.1): - resolution: {integrity: sha512-ZyqP7Gub1FyIjYmv7IBtE8jOfK/dp5fTUcRo5WjMCldnLJlqLvZrteccdnVqeKd+TRi3PDnanrW1k6z+CekfQw==, tarball: file:projects/fixer.tgz} + resolution: {integrity: sha512-hgI1LGdKk3LtK5qtwPy1GcbgVQyo6jHY/+eKB7lgrg0YQHQtbOOx66NJcV9CYLuYl5eWEwHcI94wnGOy7ehkGA==, tarball: file:projects/fixer.tgz} id: file:projects/fixer.tgz name: '@rush-temp/fixer' version: 0.0.0 @@ -9205,7 +9264,7 @@ packages: dev: false file:projects/json.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-TWVpPxmRslYdAtw0qUukBOH0VgsqWuIxh7p1KWAysUa5kQ1OhGT8XqG5+ADb70+RgXFbHGYYN9iqjOAapp4QMw==, tarball: file:projects/json.tgz} + resolution: {integrity: sha512-8ePBJH0KNMHYtw84tnP/BDhe2srShAUkXkcow/UjMU5FbaGBouPvLYlYzqA2ZDDYIlsKDEEKxQu594xORCCFYw==, tarball: file:projects/json.tgz} id: file:projects/json.tgz name: '@rush-temp/json' version: 0.0.0 @@ -9234,7 +9293,7 @@ packages: dev: false file:projects/jsonschema.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-w+3HeMxVDFR0oXDmQegTFnxPoC15xfB20qKeGDyhs10ODDeBw3P5+sdokfFu/n/jzUWtyB71vrwaUOzxhr/fbA==, tarball: file:projects/jsonschema.tgz} + resolution: {integrity: sha512-TlSf9AgX2HVChk9Rc4GyUIPrZrOyrE91SPpFJlYKkK4FASq6oAEstJvpL/+GRBL8KRP2aY2JWQ8AyYEDbEDG0Q==, tarball: file:projects/jsonschema.tgz} id: file:projects/jsonschema.tgz name: '@rush-temp/jsonschema' version: 0.0.0 @@ -9263,7 +9322,7 @@ packages: dev: false file:projects/modelerfour.tgz(ts-node@10.9.1): - resolution: {integrity: sha512-6jJDUoekbhc7cEhjyadfzwunHkiOCehYPZh/QEEuOzzTJSixWUIle6ejSyptngSe8uxSsVpDJ/4QSTj6UvFoPw==, tarball: file:projects/modelerfour.tgz} + resolution: {integrity: sha512-yqvv8uLcXaCtMnHap9s3Ks9ozN6NLDmS8EzHhCP5XgKAQCnQoBuX2J64Kkt5WRdtuvIEJqDtx8kX/qKapZeQWg==, tarball: file:projects/modelerfour.tgz} id: file:projects/modelerfour.tgz name: '@rush-temp/modelerfour' version: 0.0.0 @@ -9314,7 +9373,7 @@ packages: dev: false file:projects/oai2-to-oai3.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-EmqXeZJWuoXi6p1c9Flme9Km7H1ISlOOEX1rMEhn/G14Fxe2BJujI8iheV/3eN7CyqwhdBr3Zko2CY77132LDQ==, tarball: file:projects/oai2-to-oai3.tgz} + resolution: {integrity: sha512-429l1k8VRbB/Qk1N0kCG+c70ZG5B2ixgF3RQCrm1dF6T0946z327MpAITNIfL0qtD5vC0jW3hzBasXPaMXc7Mw==, tarball: file:projects/oai2-to-oai3.tgz} id: file:projects/oai2-to-oai3.tgz name: '@rush-temp/oai2-to-oai3' version: 0.0.0 @@ -9351,14 +9410,14 @@ packages: dev: false file:projects/openapi-to-typespec.tgz(jest@29.7.0): - resolution: {integrity: sha512-zAj7zkO6vCcOuJPYLE8z93z4EqthmE0ByOjCnhOSutRmbgrMC357Rocf0KoOefoFJcA+IqIy3kIHBRPj/F7PVw==, tarball: file:projects/openapi-to-typespec.tgz} + resolution: {integrity: sha512-KvfNMg+QS2PURPUPNr32nxEeDtcKBbiOIitXRN55kRdADozPRn83lfm8IBi6OTDajBw5nfv6UOWT163f0jfqcw==, tarball: file:projects/openapi-to-typespec.tgz} id: file:projects/openapi-to-typespec.tgz name: '@rush-temp/openapi-to-typespec' version: 0.0.0 dependencies: - '@azure-tools/typespec-autorest': 0.37.2(@azure-tools/typespec-azure-core@0.37.2)(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.51.0)(@typespec/versioning@0.51.0) - '@azure-tools/typespec-azure-core': 0.37.2(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/rest@0.51.0) - '@azure-tools/typespec-azure-resource-manager': 0.37.1(@azure-tools/typespec-autorest@0.37.2)(@azure-tools/typespec-azure-core@0.37.2)(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/rest@0.51.0)(@typespec/versioning@0.51.0) + '@azure-tools/typespec-autorest': 0.38.0(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0) + '@azure-tools/typespec-azure-core': 0.38.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/rest@0.52.0) + '@azure-tools/typespec-azure-resource-manager': 0.38.0(@azure-tools/typespec-autorest@0.38.0)(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0) '@types/fs-extra': 9.0.13 '@types/lodash': 4.14.201 '@types/node': 20.9.0 @@ -9367,13 +9426,13 @@ packages: '@types/webpack': 5.28.5(webpack-cli@5.1.4) '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) - '@typespec/compiler': 0.51.0 - '@typespec/http': 0.51.0(@typespec/compiler@0.51.0) - '@typespec/openapi': 0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) - '@typespec/openapi3': 0.50.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0)(@typespec/openapi@0.50.0)(@typespec/versioning@0.51.0) - '@typespec/prettier-plugin-typespec': 0.51.0 - '@typespec/rest': 0.51.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) - '@typespec/versioning': 0.51.0(@typespec/compiler@0.51.0) + '@typespec/compiler': 0.52.0 + '@typespec/http': 0.52.0(@typespec/compiler@0.52.0) + '@typespec/openapi': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) + '@typespec/openapi3': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/versioning@0.52.0) + '@typespec/prettier-plugin-typespec': 0.52.0 + '@typespec/rest': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) + '@typespec/versioning': 0.52.0(@typespec/compiler@0.52.0) chalk: 4.1.2 change-case: 5.0.2 change-case-all: 2.1.0 @@ -9408,7 +9467,7 @@ packages: dev: false file:projects/openapi.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-jeOfewor/wxa+HdeUSgWjhsV4FbhMs9QX8uxqJxh7KZvTBxcvw1XhQkrriRoSEXnBXmHDuAvxKG6gEImlL6c7w==, tarball: file:projects/openapi.tgz} + resolution: {integrity: sha512-HE2/rfH9QyCccaXSR+AEAe/wGVAe/l37tqzQYSU1sFWE+u4MkZA1p7IoBgXOit6m8qOi9HGYFbm4TlpkPLKUrQ==, tarball: file:projects/openapi.tgz} id: file:projects/openapi.tgz name: '@rush-temp/openapi' version: 0.0.0 @@ -9437,13 +9496,13 @@ packages: dev: false file:projects/schemas.tgz: - resolution: {integrity: sha512-R4SNYE56Q0TOMYcT8gSTZIInxE9vVJH1k54SR8Ksvg8HNkzG+Pko1NIxb8zpWFB74VEmx3TDaruHnodgJjUrvQ==, tarball: file:projects/schemas.tgz} + resolution: {integrity: sha512-aeHJHwq6RJNeECiY4g86CukjYKRNg8eHFoxQVmU/aCtNct/TMpfrAc19FVV4JyuNRKtXdFrVNjO2hUJxZXQSQA==, tarball: file:projects/schemas.tgz} name: '@rush-temp/schemas' version: 0.0.0 dev: false file:projects/system-requirements.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-z9xJ+0SQtAhIFr9wve8giTZZxNxdWfI6JxRdXLqEpRLZHHakvBWugiaIe/sfMbYBz+2tFyvHVmI1g6MqA5w1EA==, tarball: file:projects/system-requirements.tgz} + resolution: {integrity: sha512-2/b/vgr/a7FOjk7eTBfvo9o+w4QywiBeIgIHzYhVYTJcy5Huxm1ce0sNnId9Bay+/MrR8aw3lvRDlPUrWdbJUQ==, tarball: file:projects/system-requirements.tgz} id: file:projects/system-requirements.tgz name: '@rush-temp/system-requirements' version: 0.0.0 @@ -9478,7 +9537,7 @@ packages: dev: false file:projects/test-public-packages.tgz(prettier@3.1.0): - resolution: {integrity: sha512-Rn+gH1k+oRn0DDXoRdjqMkiECwfd/KS8aExh8AEAcn3NUKXZlnHbMX//5WYnKgvyH2nRIr02Q0dCui6cxIviNQ==, tarball: file:projects/test-public-packages.tgz} + resolution: {integrity: sha512-ToosHldq4gjvV7xkx1oaD/rVcFWYokbdUgfd6vA3Uzx38HO4HaKY0wqNROzocyDrqwT6IWTMPMo2YATka/49vg==, tarball: file:projects/test-public-packages.tgz} id: file:projects/test-public-packages.tgz name: '@rush-temp/test-public-packages' version: 0.0.0 @@ -9499,7 +9558,7 @@ packages: dev: false file:projects/test-utils.tgz(@types/node@20.9.0)(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-PjGDVMkoTdQpgj3j0MSrYPkMoilJ3rXaramucEQu/DXD2iUlUqLbATiDxEeOeeJcbyChAWoj8U/ZPV0UG3JdZg==, tarball: file:projects/test-utils.tgz} + resolution: {integrity: sha512-tit5MjyO3D/0svfHHHE79slcHCUmLc+cyL2DJ+jLP/LFZ1FCDGzyNhW04+fJbCd0LIM05efwORznprhNtesO9A==, tarball: file:projects/test-utils.tgz} id: file:projects/test-utils.tgz name: '@rush-temp/test-utils' version: 0.0.0 @@ -9526,7 +9585,7 @@ packages: dev: false file:projects/yaml.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-BKdiJVcGwcy3siN8gBZEoV3uGhFsHHp2cz7xx1bhy7yUgO8mU1utB0CClwHw575UMrMfxJ/2/tOwWZZ6YRzNVA==, tarball: file:projects/yaml.tgz} + resolution: {integrity: sha512-H8/9GzwHHWTFw9aj6TqJWA8Hnb0a2ZwNMDALfKiPxzqK8qkqA7ddM9XXKwrK9Vn4Hfry5Lf80q59WoI5KkzaJw==, tarball: file:projects/yaml.tgz} id: file:projects/yaml.tgz name: '@rush-temp/yaml' version: 0.0.0 diff --git a/packages/extensions/openapi-to-typespec/README.md b/packages/extensions/openapi-to-typespec/README.md index 8e19453638..cdb1ddd62d 100644 --- a/packages/extensions/openapi-to-typespec/README.md +++ b/packages/extensions/openapi-to-typespec/README.md @@ -23,9 +23,9 @@ tsproject.yaml - Contains configuration for the TypeSpec compiler package.json - Configuration of the TypeSpec project ```yaml -version: 3.6.6 +version: 3.10.1 use-extension: - "@autorest/modelerfour": "^4.23.5" + "@autorest/modelerfour": "^4.27.0" modelerfour: # this runs a pre-namer step to clean up names diff --git a/packages/extensions/openapi-to-typespec/convert.ps1 b/packages/extensions/openapi-to-typespec/convert.ps1 index 49824a8c79..528dbf7587 100644 --- a/packages/extensions/openapi-to-typespec/convert.ps1 +++ b/packages/extensions/openapi-to-typespec/convert.ps1 @@ -28,7 +28,7 @@ param( function GenerateMetadata () { Write-Host "##Generating metadata with csharp codegen in $outputFolder with $csharpCodegen" - $cmd = "autorest --csharp --isAzureSpec --isArm --max-memory-size=8192 --use=`"$csharpCodegen`" --output-folder=$outputFolder --mgmt-debug.only-generate-metadata --azure-arm --skip-csproj $swaggerConfigFile" + $cmd = "autorest --version=3.10.1 --csharp --isAzureSpec --isArm --max-memory-size=8192 --use=`"$csharpCodegen`" --output-folder=$outputFolder --mgmt-debug.only-generate-metadata --azure-arm --skip-csproj $swaggerConfigFile" Write-Host "$cmd" Invoke-Expression $cmd if ($LASTEXITCODE) { exit $LASTEXITCODE } @@ -42,7 +42,7 @@ function GenerateMetadata () function DoConvert () { Write-Host "##Converting from swagger to tsp with in $outputFolder with $converterCodegen" - $cmd = "autorest --openapi-to-typespec --isAzureSpec --isArm --use=`"$converterCodegen`" --output-folder=$outputFolder --src-path=tsp-output $swaggerConfigFile" + $cmd = "autorest --version=3.10.1 --openapi-to-typespec --isAzureSpec --isArm --use=`"$converterCodegen`" --output-folder=$outputFolder $swaggerConfigFile" Write-Host "$cmd" Invoke-Expression $cmd if ($LASTEXITCODE) { exit $LASTEXITCODE } diff --git a/packages/extensions/openapi-to-typespec/package.json b/packages/extensions/openapi-to-typespec/package.json index 76bff5fbbf..a268ce1973 100644 --- a/packages/extensions/openapi-to-typespec/package.json +++ b/packages/extensions/openapi-to-typespec/package.json @@ -41,16 +41,16 @@ "@azure-tools/codegen": "~2.10.0", "@autorest/extension-base": "~3.6.0", "@autorest/codemodel": "~4.20.0", - "@typespec/compiler": "^0.51.0", - "@typespec/rest": "^0.51.0", - "@typespec/http": "^0.51.0", - "@typespec/versioning": "^0.51.0", - "@typespec/prettier-plugin-typespec": "^0.51.0", - "@azure-tools/typespec-azure-core": "^0.37.2", - "@azure-tools/typespec-autorest": "^0.37.2", - "@azure-tools/typespec-azure-resource-manager": "^0.37.1", - "@typespec/openapi": "^0.50.0", - "@typespec/openapi3": "^0.50.0", + "@typespec/compiler": "^0.52.0", + "@typespec/rest": "^0.52.0", + "@typespec/http": "^0.52.0", + "@typespec/versioning": "^0.52.0", + "@typespec/prettier-plugin-typespec": "^0.52.0", + "@azure-tools/typespec-azure-core": "^0.38.0", + "@azure-tools/typespec-autorest": "^0.38.0", + "@azure-tools/typespec-azure-resource-manager": "^0.38.0", + "@typespec/openapi": "^0.52.0", + "@typespec/openapi3": "^0.52.0", "prettier": "~3.1.0", "lodash": "~4.17.20", "pluralize": "^8.0.0", @@ -67,7 +67,7 @@ "fs-extra": "^10.1.0", "@types/fs-extra": "^9.0.13", "chalk": "^4.1.0", - "@azure-tools/typespec-autorest": "^0.37.2", + "@azure-tools/typespec-autorest": "^0.38.0", "webpack-cli": "~5.1.4", "webpack": "~5.89.0", "@typescript-eslint/eslint-plugin": "^6.11.0", diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts index 065db8b558..0f70257abf 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts @@ -2,6 +2,7 @@ import { Case } from "change-case-all"; import { TypespecOperation, TspArmResource } from "interfaces"; import _ from "lodash"; import pluralize from "pluralize"; +import { getArmCommonTypeVersion } from "../autorest-session"; import { replaceGeneratedResourceObject } from "../transforms/transform-arm-resources"; import { generateDecorators } from "../utils/decorators"; import { generateDocs } from "../utils/docs"; @@ -9,6 +10,26 @@ import { getModelPropertiesDeclarations } from "../utils/model-generation"; import { generateOperation } from "./generate-operations"; export function generateArmResource(resource: TspArmResource): string { + const definitions: string[] = []; + + definitions.push(generateArmResourceModel(resource)); + + definitions.push("\n"); + + definitions.push(generateArmResourceOperation(resource)); + + definitions.push("\n"); + + for (const o of resource.resourceOperations) { + for (const d of o.augmentedDecorators ?? []) { + definitions.push(`${d}`); + } + } + + return definitions.join("\n"); +} + +function generateArmResourceModel(resource: TspArmResource): string { let definitions: string[] = []; for (const fixme of resource.fixMe ?? []) { @@ -25,28 +46,54 @@ export function generateArmResource(resource: TspArmResource): string { definitions.push(`@parentResource(${resource.resourceParent.name})`); } - definitions.push(`model ${resource.name} is ${resource.resourceKind}<${resource.propertiesModelName}> {`); + if ( + getArmCommonTypeVersion() && + !resource.propertiesPropertyRequired && + resource.propertiesPropertyVisibility.length === 2 && + resource.propertiesPropertyVisibility.includes("read") && + resource.propertiesPropertyVisibility.includes("create") + ) { + definitions.push(`model ${resource.name} is ${resource.resourceKind}<${resource.propertiesModelName}> {`); - definitions = [...definitions, ...getModelPropertiesDeclarations(resource.properties)]; + definitions = [...definitions, ...getModelPropertiesDeclarations(resource.properties)]; + } else { + definitions.push( + `#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility"`, + ); + definitions.push( + `#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility"`, + ); + definitions.push(`@includeInapplicableMetadataInPayload(false)`); - for (const p of resource.optionalStandardProperties) { - definitions.push(`\n...${p}`); - } + if (!getArmCommonTypeVersion()) { + if (resource.baseModelName) { + definitions.push(`model ${resource.name} extends ${resource.baseModelName} {`); + } else { + definitions.push(`model ${resource.name} {`); + } + } else { + definitions.push(`@Azure.ResourceManager.Private.armResourceInternal(${resource.propertiesModelName})`); + definitions.push(`model ${resource.name} extends ${resource.resourceKind}Base {`); + } - definitions.push("}\n"); + definitions = [...definitions, ...getModelPropertiesDeclarations(resource.properties)]; - definitions.push("\n"); + const propertyDoc = generateDocs({ doc: resource.propertiesPropertyDescription }); + propertyDoc && definitions.push(propertyDoc); - definitions.push(generateArmResourceOperation(resource)); + definitions.push(`@extension("x-ms-client-flatten", true)`); + if (resource.propertiesPropertyVisibility.length > 0) { + definitions.push(`@visibility("${resource.propertiesPropertyVisibility.join(",")}")`); + } - definitions.push("\n"); + definitions.push(`properties${resource.propertiesPropertyRequired ? "" : "?"}: ${resource.propertiesModelName}`); + } - for (const o of resource.resourceOperations) { - for (const d of o.augmentedDecorators ?? []) { - definitions.push(`${d}`); - } + for (const p of resource.optionalStandardProperties) { + definitions.push(`\n...${p}`); } + definitions.push("}\n"); return definitions.join("\n"); } diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts index 494c906ece..82489d2e5a 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts @@ -1,7 +1,6 @@ import { TypespecParameter } from "../interfaces"; import { generateDecorators } from "../utils/decorators"; import { generateDocs } from "../utils/docs"; -import { transformDefaultValue } from "../utils/values"; export function generateParameter(parameter: TypespecParameter): string { const definitions: string[] = []; @@ -12,7 +11,7 @@ export function generateParameter(parameter: TypespecParameter): string { decorators && definitions.push(decorators); let defaultValue = ""; if (parameter.defaultValue) { - defaultValue = ` = ${transformDefaultValue(parameter.type, parameter.defaultValue)}`; + defaultValue = ` = ${parameter.defaultValue}`; } definitions.push(`"${parameter.name}"${parameter.isOptional ? "?" : ""}: ${parameter.type}${defaultValue}`); diff --git a/packages/extensions/openapi-to-typespec/src/interfaces.ts b/packages/extensions/openapi-to-typespec/src/interfaces.ts index 3b65494ad4..782c02e696 100644 --- a/packages/extensions/openapi-to-typespec/src/interfaces.ts +++ b/packages/extensions/openapi-to-typespec/src/interfaces.ts @@ -240,8 +240,12 @@ export interface TspArmResourceExistsOperation extends TspArmResourceOperationBa export interface TspArmResource extends TypespecObject { resourceKind: ArmResourceKind; propertiesModelName: string; + propertiesPropertyRequired: boolean; + propertiesPropertyVisibility: string[]; + propertiesPropertyDescription: string; resourceParent?: TspArmResource; resourceOperations: TspArmResourceOperation[]; normalOperations: TypespecOperation[]; optionalStandardProperties: string[]; + baseModelName?: string; } diff --git a/packages/extensions/openapi-to-typespec/src/main.ts b/packages/extensions/openapi-to-typespec/src/main.ts index 06b4acdf5b..a579fce5ab 100644 --- a/packages/extensions/openapi-to-typespec/src/main.ts +++ b/packages/extensions/openapi-to-typespec/src/main.ts @@ -63,7 +63,7 @@ export async function processDetector(host: AutorestExtensionHost) { for (const v of Object.values(session.model.components.schemas)) { if (v["x-ms-metadata"]?.originalLocations) { for (const p of v["x-ms-metadata"].originalLocations) { - const result = p.match(/\/specification\/common-types\/resource-management\/(v\d)\//); + const result = p.match(/\/common-types\/resource-management\/(v\d)\//); if (result) { setArmCommonTypeVersion(result[1]); return; diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts index aa93a9efcb..476cb76019 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts @@ -1,7 +1,7 @@ import { Operation, Parameter, Response, SchemaResponse, SchemaType } from "@autorest/codemodel"; import _ from "lodash"; import pluralize, { singular } from "pluralize"; -import { getSession } from "../autorest-session"; +import { getArmCommonTypeVersion, getSession } from "../autorest-session"; import { generateParameter } from "../generate/generate-parameter"; import { ArmResourceKind, @@ -68,11 +68,19 @@ export function transformTspArmResource(schema: ArmResourceSchema): TspArmResour addGeneratedResourceObjectIfNotExits(schema.language.default.name, schema.language.default.name); - const propertiesModelSchema = schema.properties?.find((p) => p.serializedName === "properties")?.schema; + const propertiesModel = schema.properties?.find((p) => p.serializedName === "properties"); + const propertiesModelSchema = propertiesModel?.schema; let propertiesModelName = propertiesModelSchema?.language.default.name; + let propertiesPropertyRequired = false; + let propertiesPropertyVisibility = ["read", "create"]; + let propertiesPropertyDescription = ""; if (propertiesModelSchema?.type === SchemaType.Dictionary) { propertiesModelName = "Record"; + } else if (propertiesModelSchema?.type === SchemaType.Object) { + propertiesPropertyRequired = propertiesModel?.required ?? false; + propertiesPropertyVisibility = propertiesModel?.extensions?.["x-ms-mutability"] ?? []; + propertiesPropertyDescription = propertiesModel?.language.default.description ?? ""; } // TODO: deal with resources that has no properties property @@ -83,39 +91,46 @@ export function transformTspArmResource(schema: ArmResourceSchema): TspArmResour const operations = getTspOperations(schema); + let baseModelName = undefined; + if (!getArmCommonTypeVersion()) { + const immediateParents = schema.parents?.immediate ?? []; + + baseModelName = immediateParents + .filter((p) => p.language.default.name !== schema.language.default.name) + .map((p) => p.language.default.name)[0]; + } + + const decorators = buildResourceDecorators(schema); + if (!getArmCommonTypeVersion() && schema.resourceMetadata.IsExtensionResource) { + decorators.push({ name: "extensionResource" }); + } + return { fixMe, resourceKind: getResourceKind(schema), kind: "object", - properties: [buildKeyProperty(schema), ...getOtherProperties(schema)], + properties: [buildKeyProperty(schema), ...getOtherProperties(schema, !getArmCommonTypeVersion())], name: schema.resourceMetadata.SwaggerModelName, parents: [], resourceParent: getParentResource(schema), propertiesModelName, + propertiesPropertyRequired, + propertiesPropertyVisibility, + propertiesPropertyDescription, doc: schema.language.default.description, - decorators: buildResourceDecorators(schema), + decorators, resourceOperations: operations[0], normalOperations: operations[1], - optionalStandardProperties: getResourceOptionalStandardProperties(schema), + optionalStandardProperties: getArmCommonTypeVersion() ? getResourceOptionalStandardProperties(schema) : [], + baseModelName, }; } -function getOtherProperties(schema: ArmResourceSchema): TypespecObjectProperty[] { - const knownProperties = [ - "properties", - "id", - "name", - "type", - "systemData", - "location", - "tags", - "identity", - "sku", - "eTag", - "plan", - "kind", - "managedBy", - ]; +function getOtherProperties(schema: ArmResourceSchema, noCommonTypes: boolean): TypespecObjectProperty[] { + const knownProperties = ["properties", "name"]; + if (!noCommonTypes) { + knownProperties.push(...["id", "type", "systemData", "location", "tags", "identity", "sku", "eTag", "plan"]); + } const otherProperties: TypespecObjectProperty[] = []; for (const property of schema.properties ?? []) { if (!knownProperties.includes(property.serializedName)) { @@ -157,16 +172,6 @@ function getResourceOptionalStandardProperties(schema: ArmResourceSchema): strin optionalStandardProperties.push("Azure.ResourceManager.ResourcePlan"); } - if (schema.properties?.find((p) => p.serializedName === "kind")) { - // TODO: handle non-standard property - optionalStandardProperties.push("Azure.ResourceManager.ResourceKind"); - } - - if (schema.properties?.find((p) => p.serializedName === "managedBy")) { - // TODO: handle non-standard property - optionalStandardProperties.push("Azure.ResourceManager.ManagedBy"); - } - return optionalStandardProperties; } @@ -213,23 +218,6 @@ function convertResourceExistsOperation(resourceMetadata: ArmResource): TspArmRe return []; } -function getLROHeader(swaggerOperation: Operation): string | undefined { - if (!swaggerOperation.extensions?.["x-ms-long-running-operation"]) { - return undefined; - } - let lroHeader = undefined; - const finalStateVia = swaggerOperation.extensions?.["x-ms-long-running-operation-options"]?.["final-state-via"]; - if (finalStateVia === "azure-async-operation") { - lroHeader = "ArmAsyncOperationHeader"; - } else if (finalStateVia === "location") { - lroHeader = "ArmLroLocationHeader"; - // TODO: deal with final-state-schema - } else { - // TODO: not sure how to deal with original-uri and operation-location - } - return lroHeader; -} - function getTSPOperationGroupName(resourceName: string): string { const operationGroupName = pluralize(resourceName); if (operationGroupName === resourceName) { @@ -248,33 +236,26 @@ function convertResourceCreateOrReplaceOperation( const swaggerOperation = operations[operation.OperationID]; const bodyParam = swaggerOperation.requests?.[0].parameters?.find((p) => p.protocol.http?.in === "body"); const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; - const lroHeader = getLROHeader(swaggerOperation); const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); const templateParameters = [resourceMetadata.SwaggerModelName]; if (baseParameters) { templateParameters.push(baseParameters); } - if (lroHeader) { - if (!baseParameters) { - templateParameters.push(`BaseParameters<${resourceMetadata.SwaggerModelName}>`); - } - templateParameters.push(lroHeader); - } const tspOperationGroupName = getTSPOperationGroupName(resourceMetadata.SwaggerModelName); const operationName = getOperationName(operation.OperationID); const augmentedDecorators = []; if (bodyParam) { if (bodyParam.language.default.name !== "resource") { augmentedDecorators.push( - `@@projectedName(${tspOperationGroupName}.${operationName}::parameters.resource, "json", "${bodyParam.language.default.name}");`, + `@@projectedName(${tspOperationGroupName}.\`${operationName}\`::parameters.resource, "json", "${bodyParam.language.default.name}");`, ); augmentedDecorators.push( - `@@extension(${tspOperationGroupName}.${operationName}::parameters.resource, "x-ms-client-name", "${bodyParam.language.default.name}");`, + `@@extension(${tspOperationGroupName}.\`${operationName}\`::parameters.resource, "x-ms-client-name", "${bodyParam.language.default.name}");`, ); } if (bodyParam.language.default.description !== "Resource create parameters.") { augmentedDecorators.push( - `@@doc(${tspOperationGroupName}.${operationName}::parameters.resource, "${bodyParam.language.default.description}");`, + `@@doc(${tspOperationGroupName}.\`${operationName}\`::parameters.resource, "${bodyParam.language.default.description}");`, ); } } @@ -305,7 +286,6 @@ function convertResourceUpdateOperation( ) { const swaggerOperation = operations[operation.OperationID]; const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; - const lroHeader = getLROHeader(swaggerOperation); const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); const bodyParam = swaggerOperation.requests?.[0].parameters?.find((p) => p.protocol.http?.in === "body"); const fixMe: string[] = []; @@ -325,15 +305,15 @@ function convertResourceUpdateOperation( const operationName = getOperationName(operation.OperationID); if (bodyParam.language.default.name !== "properties") { augmentedDecorators.push( - `@@projectedName(${tspOperationGroupName}.${operationName}::parameters.properties, "json", "${bodyParam.language.default.name}");`, + `@@projectedName(${tspOperationGroupName}.\`${operationName}\`::parameters.properties, "json", "${bodyParam.language.default.name}");`, ); augmentedDecorators.push( - `@@extension(${tspOperationGroupName}.${operationName}::parameters.properties, "x-ms-client-name", "${bodyParam.language.default.name}");`, + `@@extension(${tspOperationGroupName}.\`${operationName}\`::parameters.properties, "x-ms-client-name", "${bodyParam.language.default.name}");`, ); } if (bodyParam.language.default.description !== "The resource properties to be updated.") { augmentedDecorators.push( - `@@doc(${tspOperationGroupName}.${operationName}::parameters.properties, "${bodyParam.language.default.description}");`, + `@@doc(${tspOperationGroupName}.\`${operationName}\`::parameters.properties, "${bodyParam.language.default.description}");`, ); } } else { @@ -343,12 +323,6 @@ function convertResourceUpdateOperation( if (baseParameters) { templateParameters.push(baseParameters); } - if (lroHeader) { - if (!baseParameters) { - templateParameters.push(`BaseParameters<${resourceMetadata.SwaggerModelName}>`); - } - templateParameters.push(lroHeader); - } return [ { fixMe, @@ -376,19 +350,12 @@ function convertResourceDeleteOperation( const operation = resourceMetadata.DeleteOperations[0]; const swaggerOperation = operations[operation.OperationID]; const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; - const lroHeader = getLROHeader(swaggerOperation); const okResponse = swaggerOperation?.responses?.filter((o) => o.protocol.http?.statusCodes.includes("200"))?.[0]; const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); const templateParameters = [resourceMetadata.SwaggerModelName]; if (baseParameters) { templateParameters.push(baseParameters); } - if (lroHeader) { - if (!baseParameters) { - templateParameters.push(`BaseParameters<${resourceMetadata.SwaggerModelName}>`); - } - templateParameters.push(lroHeader); - } return [ { doc: operation.Description, @@ -527,7 +494,6 @@ function convertResourceActionOperations( const swaggerOperation = operations[operation.OperationID]; const bodyParam = swaggerOperation.requests?.[0].parameters?.find((p) => p.protocol.http?.in === "body"); const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; - const lroHeader = getLROHeader(swaggerOperation); const okResponse = swaggerOperation?.responses?.filter( (o) => o.protocol.http?.statusCodes.includes("200"), )?.[0]; @@ -555,12 +521,6 @@ function convertResourceActionOperations( if (baseParameters) { templateParameters.push(baseParameters); } - if (lroHeader) { - if (!baseParameters) { - templateParameters.push(`BaseParameters<${resourceMetadata.SwaggerModelName}>`); - } - templateParameters.push(lroHeader); - } const tspOperationGroupName = getTSPOperationGroupName(resourceMetadata.SwaggerModelName); const operationName = getOperationName(operation.OperationID); @@ -568,15 +528,15 @@ function convertResourceActionOperations( if (bodyParam) { if (bodyParam.language.default.name !== "body") { augmentedDecorators.push( - `@@projectedName(${tspOperationGroupName}.${operationName}::parameters.body, "json", "${bodyParam.language.default.name}");`, + `@@projectedName(${tspOperationGroupName}.\`${operationName}\`::parameters.body, "json", "${bodyParam.language.default.name}");`, ); augmentedDecorators.push( - `@@extension(${tspOperationGroupName}.${operationName}::parameters.body, "x-ms-client-name", "${bodyParam.language.default.name}");`, + `@@extension(${tspOperationGroupName}.\`${operationName}\`::parameters.body, "x-ms-client-name", "${bodyParam.language.default.name}");`, ); } if (bodyParam.language.default.description !== "The content of the action request") { augmentedDecorators.push( - `@@doc(${tspOperationGroupName}.${operationName}::parameters.body, "${bodyParam.language.default.description}");`, + `@@doc(${tspOperationGroupName}.\`${operationName}\`::parameters.body, "${bodyParam.language.default.description}");`, ); } } @@ -747,8 +707,8 @@ function buildOperationBaseParameters(operation: Operation, resource: ArmResourc params.push(generateParameter(parameter)); } return `{ - ...BaseParameters<${resource.SwaggerModelName}>, - ${params.join("\n")} + ...BaseParameters<${resource.SwaggerModelName}>; + ${params.join(";\n")} }`; } } @@ -847,6 +807,10 @@ function buildKeyProperty(schema: ArmResourceSchema): TypespecObjectProperty { name: "segment", arguments: [schema.resourceMetadata.ResourceKeySegment], }, + { + name: "visibility", + arguments: ["read"], + }, ); // remove @path decorator for key parameter diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts index 0da3faba15..0250bbea93 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts @@ -127,22 +127,24 @@ export function transformObjectProperty(propertySchema: Property, codeModel: Cod isOptional: propertySchema.required !== true, type: visited.name, decorators: getPropertyDecorators(propertySchema), - defaultValue: getDefaultValue(propertySchema.schema), + defaultValue: getDefaultValue(visited.name, propertySchema.schema), }; } const logger = getLogger("getDiscriminatorProperty"); logger.info(`Transforming property ${propertySchema.language.default.name} of type ${propertySchema.schema.type}`); + + const type = getTypespecType(propertySchema.schema, codeModel); return { kind: "property", doc, name, isOptional: propertySchema.required !== true, - type: getTypespecType(propertySchema.schema, codeModel), + type, decorators: getPropertyDecorators(propertySchema), fixMe: getFixme(propertySchema, codeModel), - defaultValue: getDefaultValue(propertySchema.schema), + defaultValue: getDefaultValue(type, propertySchema.schema), }; } diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts index 54d888a024..5db4a4057a 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts @@ -178,7 +178,7 @@ export function transformParameter(parameter: Parameter, codeModel: CodeModel): location: transformParameterLocation(parameter), decorators: getPropertyDecorators(parameter), serializedName: parameter.language.default.serializedName ?? parameter.language.default.name, - defaultValue: getDefaultValue(parameter.schema), + defaultValue: getDefaultValue(visited.name, parameter.schema), }; } diff --git a/packages/extensions/openapi-to-typespec/src/utils/decorators.ts b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts index 91c1f82a31..ed9257c144 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/decorators.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts @@ -137,6 +137,15 @@ export function getPropertyDecorators(element: Property | Parameter): TypespecDe }); } + if (element.extensions?.["x-ms-client-flatten"]) { + decorators.push({ + name: "extension", + arguments: [{ value: `"x-ms-client-flatten"` }, { value: "true" }], + module: "@typespec/openapi", + namespace: "TypeSpec.OpenAPI", + }); + } + return decorators; } diff --git a/packages/extensions/openapi-to-typespec/src/utils/docs.ts b/packages/extensions/openapi-to-typespec/src/utils/docs.ts index 1f8c2b1317..6ca73c2176 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/docs.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/docs.ts @@ -32,7 +32,7 @@ function lineWrap(doc: string | string[]): string[] { const { isArm } = getOptions(); const maxLength = isArm ? Number.POSITIVE_INFINITY : 80; - let docString = Array.isArray(doc) ? doc.join("") : doc; + let docString = Array.isArray(doc) ? doc.join("\n") : doc; docString = docString.replace(/\r\n/g, "\n"); docString = docString.replace(/\r/g, "\n"); @@ -40,21 +40,21 @@ function lineWrap(doc: string | string[]): string[] { return [docString]; } + const oriLines = docString.split("\n"); const lines: string[] = []; - const words = docString.split(" "); - let line = ``; - for (const word of words) { - if (word === "\n") { - lines.push(line.substring(0, line.length - 1)); - line = ""; - } else if (word.length + 1 > maxLength - line.length) { - lines.push(line.substring(0, line.length - 1)); - line = `${word} `; - } else { - line = `${line}${word} `; + for (const oriLine of oriLines) { + const words = oriLine.split(" "); + let line = ``; + for (const word of words) { + if (word.length + 1 > maxLength - line.length) { + lines.push(line.substring(0, line.length - 1)); + line = `${word} `; + } else { + line = `${line}${word} `; + } } + lines.push(`${line.substring(0, line.length - 1)}`); } - lines.push(`${line.substring(0, line.length - 1)}`); return lines; } diff --git a/packages/extensions/openapi-to-typespec/src/utils/imports.ts b/packages/extensions/openapi-to-typespec/src/utils/imports.ts index eef7ada6a3..f2aa87e622 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/imports.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/imports.ts @@ -44,17 +44,36 @@ export function getModelsImports(program: TypespecProgram) { } export function getRoutesImports(_program: TypespecProgram) { - const imports: Imports = { - modules: [`import "@azure-tools/typespec-azure-core";`, `import "@typespec/rest";`, `import "./models.tsp";`], - namespaces: [`using TypeSpec.Rest;`, `using TypeSpec.Http;`], - }; + const modules = new Set(); + const namespaces = new Set(); + + modules.add(`import "@azure-tools/typespec-azure-core";`); + modules.add(`import "@typespec/rest";`); + modules.add(`import "./models.tsp";`); + + namespaces.add(`using TypeSpec.Rest;`); + namespaces.add(`using TypeSpec.Http;`); const { isArm } = getOptions(); if (isArm) { - imports.modules.push(`import "@azure-tools/typespec-azure-resource-manager";`); - imports.namespaces.push("using Azure.ResourceManager;"); + modules.add(`import "@azure-tools/typespec-azure-resource-manager";`); + namespaces.add("using Azure.ResourceManager;"); } - return imports; + for (const og of _program.operationGroups) { + for (const operation of og.operations) { + for (const param of operation.parameters) { + for (const decorator of param.decorators ?? []) { + decorator.module && modules.add(`import "${decorator.module}";`); + decorator.namespace && namespaces.add(`using ${decorator.namespace};`); + } + } + } + } + + return { + modules: [...modules], + namespaces: [...namespaces], + }; } diff --git a/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts b/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts index 34d47e7b5a..1554182234 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts @@ -1,7 +1,6 @@ import { TypespecObjectProperty } from "../interfaces"; import { generateDecorators } from "./decorators"; import { generateDocs } from "./docs"; -import { transformDefaultValue } from "./values"; export function getModelPropertiesDeclarations(properties: TypespecObjectProperty[]): string[] { const definitions: string[] = []; @@ -13,7 +12,7 @@ export function getModelPropertiesDeclarations(properties: TypespecObjectPropert property.fixMe && property.fixMe.length && definitions.push(property.fixMe.join("\n")); let defaultValue = ""; if (property.defaultValue) { - defaultValue = ` = ${transformDefaultValue(property.type, property.defaultValue)}`; + defaultValue = ` = ${property.defaultValue}`; } definitions.push(`"${property.name}"${getOptionalOperator(property)}: ${property.type}${defaultValue};`); } diff --git a/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts b/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts index a2f468f34f..1340bfe292 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts @@ -1,7 +1,7 @@ import { readFileSync } from "fs"; import { join } from "path"; import { CodeModel, ObjectSchema, Operation, SchemaResponse } from "@autorest/codemodel"; -import { getSession } from "../autorest-session"; +import { getArmCommonTypeVersion, getSession } from "../autorest-session"; import { TypespecObject, TspArmResource, TypespecEnum } from "../interfaces"; import { isGeneratedResourceObject } from "../transforms/transform-arm-resources"; export interface _ArmResourceOperation { @@ -156,17 +156,7 @@ export function isResourceSchema(schema: ObjectSchema): schema is ArmResourceSch } const _ArmCoreTypes = [ - "TrackedResource", - "ProxyResource", - "ExtensionResource", "ResourceProvisioningState", - "ManagedServiceIdentity", - "ManagedSystemAssignedIdentity", - "EntityTag", - "ResourceKind", - "ResourcePlan", - "ResourceSku", - "ManagedBy", "OperationListResult", "Origin", "OperationDisplay", @@ -174,15 +164,29 @@ const _ArmCoreTypes = [ "ErrorDetail", "ErrorAdditionalInfo", "SystemData", - "ManagedIdentityProperties", - "ManagedSystemIdentityProperties", - "UserAssignedIdentity", "Operation", "ErrorResponse", ]; +const _ArmCoreCustomTypes = [ + "TrackedResource", + "ProxyResource", + "ExtensionResource", + "ManagedServiceIdentity", + "ManagedIdentityProperties", + "UserAssignedIdentity", + "ManagedSystemAssignedIdentity", + "ManagedSystemIdentityProperties", + "EntityTag", + "ResourcePlan", + "ResourceSku", +]; + export function filterArmModels(codeModel: CodeModel, objects: TypespecObject[]): TypespecObject[] { const filtered = [..._ArmCoreTypes]; + if (getArmCommonTypeVersion()) { + filtered.push(..._ArmCoreCustomTypes); + } for (const operationGroup of codeModel.operationGroups) { for (const operation of operationGroup.operations) { if (operation.requests?.[0].protocol?.http?.path.match(/^\/providers\/[^/]+\/operations$/)) { @@ -201,15 +205,18 @@ const _ArmCoreEnums = [ "CreatedByType", "Origin", "ActionType", - "ManagedIdentityType", - "ManagedSystemIdentityType", - "SkuTier", "CheckNameAvailabilityRequest", "CheckNameAvailabilityReason", ]; +const _ArmCoreCustomEnums = ["ManagedIdentityType", "ManagedSystemIdentityType", "SkuTier"]; + export function filterArmEnums(enums: TypespecEnum[]): TypespecEnum[] { - return enums.filter((e) => !_ArmCoreEnums.includes(e.name)); + const filtered = [..._ArmCoreEnums]; + if (getArmCommonTypeVersion()) { + filtered.push(..._ArmCoreCustomEnums); + } + return enums.filter((e) => !filtered.includes(e.name)); } export function isTspArmResource(schema: TypespecObject): schema is TspArmResource { diff --git a/packages/extensions/openapi-to-typespec/src/utils/values.ts b/packages/extensions/openapi-to-typespec/src/utils/values.ts index 2bc59c3a39..71d3d71310 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/values.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/values.ts @@ -1,5 +1,5 @@ import { Schema } from "@autorest/codemodel"; -import { isChoiceSchema } from "./schemas"; +import { isChoiceSchema, isSealedChoiceSchema } from "./schemas"; export function transformValue(value: string | number | boolean) { if (typeof value === "string") { @@ -9,25 +9,17 @@ export function transformValue(value: string | number | boolean) { return value; } -export function transformDefaultValue(type: string, value: string | number | boolean) { - if (["string", "int32", "int64", "float32", "float64", "boolean"].includes(type)) { - return transformValue(value); - } else { - return `${type}.${value}`; - } -} - -export function getDefaultValue(schema: Schema) { +export function getDefaultValue(type: string, schema: Schema) { if (schema.defaultValue === undefined) { return undefined; } - if (isChoiceSchema(schema)) { + if (isChoiceSchema(schema) || isSealedChoiceSchema(schema)) { for (const choice of schema.choices) { if (schema.defaultValue === choice.value.toString()) { - return choice.language.default.name; + return `${type}.\`${choice.language.default.name}\``; } } } else { - return schema.defaultValue; + return transformValue(schema.defaultValue); } } diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp index 8ff2e717b1..8f0ba5db8b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.AgFoodPlatform; /** * DataConnector Model. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(DataManagerForAgriculture) -model DataConnector is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(DataConnectorProperties) +model DataConnector extends ProxyResourceBase { /** * Connector name. */ @@ -25,8 +29,15 @@ model DataConnector is ProxyResource { @path @key("dataConnectorName") @segment("dataConnectors") + @visibility("read") name: string; + /** + * DataConnector Properties. + */ + @extension("x-ms-client-flatten", true) + properties: DataConnectorProperties; + ...Azure.ResourceManager.EntityTag; } @@ -58,9 +69,9 @@ interface DataConnectors { ...BaseParameters; /** -* Maximum number of items needed (inclusive). -Minimum = 10, Maximum = 1000, Default value = 50. -*/ + * Maximum number of items needed (inclusive). + * Minimum = 10, Maximum = 1000, Default value = 50. + */ @maxValue(1000) @minValue(10) @query("$maxPageSize") diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp index f05a57117a..065df482bb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp @@ -14,8 +14,13 @@ namespace Azure.ResourceManager.AgFoodPlatform; /** * Data Manager For Agriculture ARM Resource. */ -model DataManagerForAgriculture - is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + DataManagerForAgricultureProperties +) +model DataManagerForAgriculture extends TrackedResourceBase { /** * DataManagerForAgriculture resource name. */ @@ -25,8 +30,15 @@ model DataManagerForAgriculture @path @key("dataManagerForAgricultureResourceName") @segment("farmBeats") + @visibility("read") name: string; + /** + * Data Manager For Agriculture ARM Resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: DataManagerForAgricultureProperties; + ...Azure.ResourceManager.ManagedServiceIdentity; } @@ -54,9 +66,7 @@ interface DataManagerForAgricultures { @operationId("DataManagerForAgricultureResources_Update") update is ArmCustomPatchAsync< DataManagerForAgriculture, - DataManagerForAgricultureUpdateRequestModel, - BaseParameters, - ArmLroLocationHeader + DataManagerForAgricultureUpdateRequestModel >; /** @@ -77,9 +87,9 @@ interface DataManagerForAgricultures { ...BaseParameters; /** -* Maximum number of items needed (inclusive). -Minimum = 10, Maximum = 1000, Default value = 50. -*/ + * Maximum number of items needed (inclusive). + * Minimum = 10, Maximum = 1000, Default value = 50. + */ @maxValue(1000) @minValue(10) @query("$maxPageSize") diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp index 42d7a79494..44795aa88b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp @@ -14,9 +14,14 @@ namespace Azure.ResourceManager.AgFoodPlatform; /** * DataManagerForAgriculture extension resource. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @tenantResource -model DataManagerForAgricultureExtension - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + DataManagerForAgricultureExtensionProperties +) +model DataManagerForAgricultureExtension extends ProxyResourceBase { /** * dataManagerForAgricultureExtensionId to be queried. */ @@ -24,7 +29,14 @@ model DataManagerForAgricultureExtension @path @key("dataManagerForAgricultureExtensionId") @segment("farmBeatsExtensionDefinitions") + @visibility("read") name: string; + + /** + * DataManagerForAgricultureExtension properties. + */ + @extension("x-ms-client-flatten", true) + properties?: DataManagerForAgricultureExtensionProperties; } @armResourceOperations @@ -81,9 +93,9 @@ interface DataManagerForAgricultureExtensions { publisherIds?: string[]; /** -* Maximum number of items needed (inclusive). -Minimum = 10, Maximum = 1000, Default value = 50. -*/ + * Maximum number of items needed (inclusive). + * Minimum = 10, Maximum = 1000, Default value = 50. + */ @maxValue(1000) @minValue(10) @query("$maxPageSize") diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp index 3b76a1856a..87eceb795a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp @@ -14,9 +14,14 @@ namespace Azure.ResourceManager.AgFoodPlatform; /** * DataManagerForAgriculture solution resource. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @tenantResource -model DataManagerForAgricultureSolution - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + DataManagerForAgricultureSolutionProperties +) +model DataManagerForAgricultureSolution extends ProxyResourceBase { /** * dataManagerForAgricultureSolutionId to be queried. */ @@ -24,7 +29,14 @@ model DataManagerForAgricultureSolution @path @key("dataManagerForAgricultureSolutionId") @segment("farmBeatsSolutionDefinitions") + @visibility("read") name: string; + + /** + * DataManagerForAgricultureSolution properties. + */ + @extension("x-ms-client-flatten", true) + properties?: DataManagerForAgricultureSolutionProperties; } @armResourceOperations @@ -65,9 +77,9 @@ interface DataManagerForAgricultureSolutions { farmBeatsSolutionNames?: string[]; /** -* Maximum number of items needed (inclusive). -Minimum = 10, Maximum = 1000, Default value = 50. -*/ + * Maximum number of items needed (inclusive). + * Minimum = 10, Maximum = 1000, Default value = 50. + */ @maxValue(1000) @minValue(10) @query("$maxPageSize") diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp index a7907185e8..2161f75caf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp @@ -15,16 +15,27 @@ namespace Azure.ResourceManager.AgFoodPlatform; /** * Extension resource. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(DataManagerForAgriculture) -model Extension is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ExtensionProperties) +model Extension extends ProxyResourceBase { /** * Id of extension resource. */ @path @key("extensionId") @segment("extensions") + @visibility("read") name: string; + /** + * Extension resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: ExtensionProperties; + ...Azure.ResourceManager.EntityTag; } @@ -74,9 +85,9 @@ interface Extensions { extensionCategories?: string[]; /** -* Maximum number of items needed (inclusive). -Minimum = 10, Maximum = 1000, Default value = 50. -*/ + * Maximum number of items needed (inclusive). + * Minimum = 10, Maximum = 1000, Default value = 50. + */ @maxValue(1000) @minValue(10) @query("$maxPageSize") diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp index 28d142cc81..1adb39b3b9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp @@ -15,16 +15,28 @@ namespace Azure.ResourceManager.AgFoodPlatform; /** * The private endpoint connection resource. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(DataManagerForAgriculture) -model PrivateEndpointConnection - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PrivateEndpointConnectionProperties +) +model PrivateEndpointConnection extends ProxyResourceBase { /** * Private endpoint connection name. */ @path @key("privateEndpointConnectionName") @segment("privateEndpointConnections") + @visibility("read") name: string; + + /** + * Resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PrivateEndpointConnectionProperties; } @armResourceOperations @@ -42,11 +54,7 @@ interface PrivateEndpointConnections { /** * Delete Private endpoint connection request. */ - delete is ArmResourceDeleteAsync< - PrivateEndpointConnection, - BaseParameters, - ArmAsyncOperationHeader - >; + delete is ArmResourceDeleteAsync; /** * Get list of Private endpoint connections. diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp index 0eced48f09..0960a3f712 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp @@ -15,15 +15,28 @@ namespace Azure.ResourceManager.AgFoodPlatform; /** * A private link resource. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(DataManagerForAgriculture) -model PrivateLinkResource is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PrivateLinkResourceProperties +) +model PrivateLinkResource extends ProxyResourceBase { /** * Sub resource name. */ @path @key("subResourceName") @segment("privateLinkResources") + @visibility("read") name: string; + + /** + * Resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PrivateLinkResourceProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp index 80e24afe0a..d07230b64b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.AgFoodPlatform; /** * Solution resource. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(DataManagerForAgriculture) -model Solution is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(SolutionProperties) +model Solution extends ProxyResourceBase { /** * SolutionId for Data Manager For Agriculture Resource. */ @@ -24,8 +28,15 @@ model Solution is ProxyResource { @path @key("solutionId") @segment("solutions") + @visibility("read") name: string; + /** + * Solution resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: SolutionProperties; + ...Azure.ResourceManager.EntityTag; } @@ -84,9 +95,9 @@ interface Solutions { names?: string[]; /** -* Filters on key-value pairs within the Properties object. -eg. "{testKey} eq {testValue}". -*/ + * Filters on key-value pairs within the Properties object. + * eg. "{testKey} eq {testValue}". + */ @query({ name: "propertyFilters", format: "multi", @@ -127,9 +138,9 @@ eg. "{testKey} eq {testValue}". maxLastModifiedDateTime?: utcDateTime; /** -* Maximum number of items needed (inclusive). -Minimum = 10, Maximum = 1000, Default value = 50. -*/ + * Maximum number of items needed (inclusive). + * Minimum = 10, Maximum = 1000, Default value = 50. + */ @maxValue(1000) @minValue(10) @query("$maxPageSize") diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp index bdc088890e..43b587ee75 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp @@ -211,11 +211,11 @@ model DataManagerForAgricultureExtensionProperties { extensionApiDocsLink?: string; /** -* Detailed information which shows summary of requested data. -Used in descriptive get extension metadata call. -Information for weather category per api included are apisSupported, -customParameters, PlatformParameters and Units supported. -*/ + * Detailed information which shows summary of requested data. + * Used in descriptive get extension metadata call. + * Information for weather category per api included are apisSupported, + * customParameters, PlatformParameters and Units supported. + */ @visibility("read") detailedInformation?: DetailedInformation[]; } @@ -457,9 +457,9 @@ model DataManagerForAgricultureUpdateProperties { } /** -* Arm async operation class. -Ref: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/async-operations. -*/ + * Arm async operation class. + * Ref: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/async-operations. + */ model ArmAsyncOperation { /** * Status of the async operation. @@ -467,16 +467,16 @@ model ArmAsyncOperation { status?: string; /** -* Arm async operation error class. -Ref: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#azure-asyncoperation-resource-format. -*/ + * Arm async operation error class. + * Ref: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#azure-asyncoperation-resource-format. + */ error?: ArmAsyncOperationError; } /** -* Arm async operation error class. -Ref: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#azure-asyncoperation-resource-format. -*/ + * Arm async operation error class. + * Ref: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#azure-asyncoperation-resource-format. + */ model ArmAsyncOperationError { /** * Status of the async operation. @@ -651,9 +651,9 @@ model DataManagerForAgricultureSolutionProperties { partnerTenantId?: string; /** -* Gets scope of the Data manager For Agriculture data access that's required for processing solution request to partner. -Example: For gdd they might need weatherScope and satelliteScope. -*/ + * Gets scope of the Data manager For Agriculture data access that's required for processing solution request to partner. + * Example: For gdd they might need weatherScope and satelliteScope. + */ @visibility("read") dataAccessScopes?: string[]; diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp index da6ee6d304..65b10d288c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp @@ -14,15 +14,26 @@ namespace Azure.ResourceManager.AlertsManagement; /** * An alert created in alert management service. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource -model Alert is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(AlertProperties) +model Alert extends ProxyResourceBase { /** * Unique ID of an alert instance. */ @path @key("alertId") @segment("alerts") + @visibility("read") name: string; + + /** + * Alert property bag + */ + @extension("x-ms-client-flatten", true) + properties?: AlertProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp index b9f9335f1e..ba47f33b73 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp @@ -14,14 +14,27 @@ namespace Azure.ResourceManager.AlertsManagement; /** * Alert processing rule object containing target scopes, conditions and scheduling logic. */ -model AlertProcessingRule is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + AlertProcessingRuleProperties +) +model AlertProcessingRule extends TrackedResourceBase { /** * The name of the alert processing rule that needs to be fetched. */ @path @key("alertProcessingRuleName") @segment("actionRules") + @visibility("read") name: string; + + /** + * Alert processing rule properties. + */ + @extension("x-ms-client-flatten", true) + properties?: AlertProcessingRuleProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp index 8f8b0396db..4b9f78857b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp @@ -14,15 +14,26 @@ namespace Azure.ResourceManager.AlertsManagement; /** * Set of related alerts grouped together smartly by AMS. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource -model SmartGroup is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(SmartGroupProperties) +model SmartGroup extends ProxyResourceBase { /** * Smart group unique id. */ @path @key("smartGroupId") @segment("smartGroups") + @visibility("read") name: string; + + /** + * Properties of smart group. + */ + @extension("x-ms-client-flatten", true) + properties?: SmartGroupProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp index 7ea8f71dd1..b151032ea2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp @@ -1,11 +1,13 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; +import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; +using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -384,6 +386,7 @@ model PatchObject { /** * Properties supported by patch operation. */ + @extension("x-ms-client-flatten", true) properties?: PatchProperties; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp index 86b002378d..310c1a6969 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp @@ -14,8 +14,10 @@ namespace Azure.ResourceManager.Analysis; /** * Represents an instance of an Analysis Services resource. */ -model AnalysisServicesServer - is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model AnalysisServicesServer extends Resource { /** * The name of the Analysis Services server. It must be a minimum of 3 characters, and a maximum of 63. */ @@ -25,7 +27,14 @@ model AnalysisServicesServer @path @key("serverName") @segment("servers") + @visibility("read") name: string; + + /** + * Properties of the provision operation request. + */ + @extension("x-ms-client-flatten", true) + properties?: AnalysisServicesServerProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp index fc0d9b7554..d18e8b1814 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp @@ -1,11 +1,13 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; +import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; +using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -49,6 +51,15 @@ enum ProvisioningState { Scaling, } +/** + * The name of the Azure pricing tier to which the SKU applies. + */ +enum SkuTier { + Development, + Basic, + Standard, +} + /** * The managed mode of the server (0 = not managed, 1 = managed). */ @@ -103,6 +114,28 @@ model AnalysisServicesServerProperties sku?: ResourceSku; } +/** + * Represents the SKU name and Azure pricing tier for Analysis Services resource. + */ +model ResourceSku { + /** + * Name of the SKU level. + */ + name: string; + + /** + * The name of the Azure pricing tier to which the SKU applies. + */ + tier?: SkuTier; + + /** + * The number of instances in the read only query pool. + */ + @maxValue(8) + @minValue(1) + capacity?: int32 = 1; +} + /** * An object that represents a set of mutable Analysis Services resource properties. */ @@ -268,6 +301,7 @@ model AnalysisServicesServerUpdateParameters { /** * Properties of the provision operation request. */ + @extension("x-ms-client-flatten", true) properties?: AnalysisServicesServerMutableProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp index 14e8877290..19a78dd981 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp @@ -15,16 +15,28 @@ namespace Azure.ResourceManager.ApiManagement; /** * Tenant Settings. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model AccessInformationContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + AccessInformationContractProperties +) +model AccessInformationContract extends ProxyResourceBase { /** * The identifier of the Access configuration. */ @path @key("accessName") @segment("tenant") + @visibility("read") name: AccessIdName; + + /** + * AccessInformation entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: AccessInformationContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp index 1cfb896170..9cb90c3960 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * API details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model ApiContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ApiContractProperties) +model ApiContract extends ProxyResourceBase { /** * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. */ @@ -26,7 +30,14 @@ model ApiContract is ProxyResource { @path @key("apiId") @segment("apis") + @visibility("read") name: string; + + /** + * API entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: ApiContractProperties; } @armResourceOperations @@ -63,8 +74,7 @@ interface ApiContracts { */ @header `If-Match`?: string; - }, - ArmLroLocationHeader + } >; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp index cbdafdda99..54bff98315 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp @@ -14,8 +14,13 @@ namespace Azure.ResourceManager.ApiManagement; /** * A single API Management service resource in List or Get response. */ -model ApiManagementServiceResource - is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + ApiManagementServiceProperties +) +model ApiManagementServiceResource extends TrackedResourceBase { /** * The name of the API Management service. */ @@ -25,6 +30,7 @@ model ApiManagementServiceResource @path @key("serviceName") @segment("service") + @visibility("read") name: string; /** @@ -38,6 +44,12 @@ model ApiManagementServiceResource */ zones?: string[]; + /** + * Properties of the API Management service. + */ + @extension("x-ms-client-flatten", true) + properties: ApiManagementServiceProperties; + ...Azure.ResourceManager.ManagedServiceIdentity; ...Azure.ResourceManager.ResourceSku; } @@ -98,9 +110,7 @@ interface ApiManagementServiceResources { performConnectivityCheckAsync is ArmResourceActionAsync< ApiManagementServiceResource, ConnectivityCheckRequest, - ConnectivityCheckResponse, - BaseParameters, - ArmLroLocationHeader + ConnectivityCheckResponse >; /** @@ -111,9 +121,7 @@ interface ApiManagementServiceResources { restore is ArmResourceActionAsync< ApiManagementServiceResource, ApiManagementServiceBackupRestoreParameters, - ApiManagementServiceResource, - BaseParameters, - ArmLroLocationHeader + ApiManagementServiceResource >; /** @@ -124,9 +132,7 @@ interface ApiManagementServiceResources { backup is ArmResourceActionAsync< ApiManagementServiceResource, ApiManagementServiceBackupRestoreParameters, - ApiManagementServiceResource, - BaseParameters, - ArmLroLocationHeader + ApiManagementServiceResource >; /** @@ -148,9 +154,7 @@ interface ApiManagementServiceResources { applyNetworkConfigurationUpdates is ArmResourceActionAsync< ApiManagementServiceResource, ApiManagementServiceApplyNetworkConfigurationParameters, - ApiManagementServiceResource, - BaseParameters, - ArmLroLocationHeader + ApiManagementServiceResource >; /** @@ -170,8 +174,7 @@ interface ApiManagementServiceResources { */ @path configurationName: ConfigurationIdName; - }, - ArmLroLocationHeader + } >; /** @@ -191,8 +194,7 @@ interface ApiManagementServiceResources { */ @path configurationName: ConfigurationIdName; - }, - ArmLroLocationHeader + } >; /** @@ -212,8 +214,7 @@ interface ApiManagementServiceResources { */ @path configurationName: ConfigurationIdName; - }, - ArmLroLocationHeader + } >; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp index 6f234d3374..9d1bc1c02e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * ApiRelease details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -model ApiReleaseContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ApiReleaseContractProperties) +model ApiReleaseContract extends ProxyResourceBase { /** * Release identifier within an API. Must be unique in the current API Management service instance. */ @@ -26,7 +30,14 @@ model ApiReleaseContract is ProxyResource { @path @key("releaseId") @segment("releases") + @visibility("read") name: string; + + /** + * ApiRelease entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: ApiReleaseContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp index 1177a136e9..ba145d4adb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp @@ -15,8 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * API Version Set Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model ApiVersionSetContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + ApiVersionSetContractProperties +) +model ApiVersionSetContract extends ProxyResourceBase { /** * Api Version Set identifier. Must be unique in the current API Management service instance. */ @@ -26,7 +32,14 @@ model ApiVersionSetContract is ProxyResource { @path @key("versionSetId") @segment("apiVersionSets") + @visibility("read") name: string; + + /** + * API VersionSet contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: ApiVersionSetContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp index 33be0cc46d..66e46debc5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * External OAuth authorization server settings. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model AuthorizationServerContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + AuthorizationServerContractProperties +) +model AuthorizationServerContract extends ProxyResourceBase { /** * Identifier of the authorization server. */ @@ -27,7 +32,14 @@ model AuthorizationServerContract @path @key("authsid") @segment("authorizationServers") + @visibility("read") name: string; + + /** + * Properties of the External OAuth authorization server Contract. + */ + @extension("x-ms-client-flatten", true) + properties?: AuthorizationServerContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp index 279d8242e9..a4b9186389 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Backend details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model BackendContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(BackendContractProperties) +model BackendContract extends ProxyResourceBase { /** * Identifier of the Backend entity. Must be unique in the current API Management service instance. */ @@ -25,7 +29,14 @@ model BackendContract is ProxyResource { @path @key("backendId") @segment("backends") + @visibility("read") name: string; + + /** + * Backend entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: BackendContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp index b19c8027b7..209e2fe1b1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Cache details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model CacheContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(CacheContractProperties) +model CacheContract extends ProxyResourceBase { /** * Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). */ @@ -26,7 +30,14 @@ model CacheContract is ProxyResource { @path @key("cacheId") @segment("caches") + @visibility("read") name: string; + + /** + * Cache properties details. + */ + @extension("x-ms-client-flatten", true) + properties?: CacheContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp index e52a4fd6be..4944ab4a5d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp @@ -15,8 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Certificate details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model CertificateContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + CertificateContractProperties +) +model CertificateContract extends ProxyResourceBase { /** * Identifier of the certificate entity. Must be unique in the current API Management service instance. */ @@ -26,7 +32,14 @@ model CertificateContract is ProxyResource { @path @key("certificateId") @segment("certificates") + @visibility("read") name: string; + + /** + * Certificate properties details. + */ + @extension("x-ms-client-flatten", true) + properties?: CertificateContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp index e9dae2b4c6..a4622feb7b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp @@ -14,9 +14,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Deleted API Management Service information. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @locationResource -model DeletedServiceContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + DeletedServiceContractProperties +) +model DeletedServiceContract extends ProxyResourceBase { /** * The name of the API Management service. */ @@ -26,7 +31,14 @@ model DeletedServiceContract @path @key("serviceName") @segment("deletedservices") + @visibility("read") name: string; + + /** + * Deleted API Management Service details. + */ + @extension("x-ms-client-flatten", true) + properties?: DeletedServiceContractProperties; } @armResourceOperations @@ -43,11 +55,7 @@ interface DeletedServiceContracts { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("DeletedServices_Purge") - purge is ArmResourceDeleteAsync< - DeletedServiceContract, - BaseParameters, - ArmLroLocationHeader - >; + purge is ArmResourceDeleteAsync; /** * Lists all soft-deleted services available for undelete for the given subscription. diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp index 51dbcb5d9a..c3ac673e15 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Diagnostic details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -model DiagnosticContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(DiagnosticContractProperties) +model DiagnosticContract extends ProxyResourceBase { /** * Diagnostic identifier. Must be unique in the current API Management service instance. */ @@ -26,7 +30,14 @@ model DiagnosticContract is ProxyResource { @path @key("diagnosticId") @segment("diagnostics") + @visibility("read") name: string; + + /** + * Diagnostic entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: DiagnosticContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp index 4ccf7714fb..72c7b8cbb9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp @@ -15,15 +15,28 @@ namespace Azure.ResourceManager.ApiManagement; /** * Email Template details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model EmailTemplateContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + EmailTemplateContractProperties +) +model EmailTemplateContract extends ProxyResourceBase { /** * Email Template Name Identifier. */ @path @key("templateName") @segment("templates") + @visibility("read") name: TemplateName; + + /** + * Email Template entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: EmailTemplateContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp index d6b69628fd..2e075622d4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Gateway certificate authority details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(GatewayContract) -model GatewayCertificateAuthorityContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + GatewayCertificateAuthorityContractProperties +) +model GatewayCertificateAuthorityContract extends ProxyResourceBase { /** * Identifier of the certificate entity. Must be unique in the current API Management service instance. */ @@ -27,7 +32,14 @@ model GatewayCertificateAuthorityContract @path @key("certificateId") @segment("certificateAuthorities") + @visibility("read") name: string; + + /** + * Gateway certificate authority details. + */ + @extension("x-ms-client-flatten", true) + properties?: GatewayCertificateAuthorityContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp index dfb707ff58..c8463e0957 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Gateway details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model GatewayContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(GatewayContractProperties) +model GatewayContract extends ProxyResourceBase { /** * Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed' */ @@ -25,7 +29,14 @@ model GatewayContract is ProxyResource { @path @key("gatewayId") @segment("gateways") + @visibility("read") name: string; + + /** + * Gateway details. + */ + @extension("x-ms-client-flatten", true) + properties?: GatewayContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp index bf7a3da940..b863d06c95 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Gateway hostname configuration details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(GatewayContract) -model GatewayHostnameConfigurationContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + GatewayHostnameConfigurationContractProperties +) +model GatewayHostnameConfigurationContract extends ProxyResourceBase { /** * Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. */ @@ -26,7 +31,14 @@ model GatewayHostnameConfigurationContract @path @key("hcId") @segment("hostnameConfigurations") + @visibility("read") name: string; + + /** + * Gateway hostname configuration details. + */ + @extension("x-ms-client-flatten", true) + properties?: GatewayHostnameConfigurationContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp index 9c57195305..74c467c31d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp @@ -15,8 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Global Schema Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model GlobalSchemaContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + GlobalSchemaContractProperties +) +model GlobalSchemaContract extends ProxyResourceBase { /** * Schema id identifier. Must be unique in the current API Management service instance. */ @@ -25,7 +31,14 @@ model GlobalSchemaContract is ProxyResource { @path @key("schemaId") @segment("schemas") + @visibility("read") name: string; + + /** + * Properties of the Global Schema. + */ + @extension("x-ms-client-flatten", true) + properties?: GlobalSchemaContractProperties; } @armResourceOperations @@ -65,8 +78,7 @@ interface GlobalSchemaContracts { */ @header `If-Match`?: string; - }, - ArmLroLocationHeader + } >; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp index 46d19d8e97..978d40a813 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model GroupContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(GroupContractProperties) +model GroupContract extends ProxyResourceBase { /** * Group identifier. Must be unique in the current API Management service instance. */ @@ -25,7 +29,14 @@ model GroupContract is ProxyResource { @path @key("groupId") @segment("groups") + @visibility("read") name: string; + + /** + * Group entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: GroupContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp index a80172d529..77027dc801 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp @@ -15,16 +15,28 @@ namespace Azure.ResourceManager.ApiManagement; /** * Identity Provider details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model IdentityProviderContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + IdentityProviderContractProperties +) +model IdentityProviderContract extends ProxyResourceBase { /** * Identity Provider Type identifier. */ @path @key("identityProviderName") @segment("identityProviders") + @visibility("read") name: IdentityProviderType; + + /** + * Identity Provider contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: IdentityProviderContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp index 49ff2cd938..6522ff4ec2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Issue Attachment Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(IssueContract) -model IssueAttachmentContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + IssueAttachmentContractProperties +) +model IssueAttachmentContract extends ProxyResourceBase { /** * Attachment identifier within an Issue. Must be unique in the current Issue. */ @@ -27,7 +32,14 @@ model IssueAttachmentContract @path @key("attachmentId") @segment("attachments") + @visibility("read") name: string; + + /** + * Properties of the Issue Attachment. + */ + @extension("x-ms-client-flatten", true) + properties?: IssueAttachmentContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp index 725154e842..5e41901229 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp @@ -15,8 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Issue Comment Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(IssueContract) -model IssueCommentContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + IssueCommentContractProperties +) +model IssueCommentContract extends ProxyResourceBase { /** * Comment identifier within an Issue. Must be unique in the current Issue. */ @@ -26,7 +32,14 @@ model IssueCommentContract is ProxyResource { @path @key("commentId") @segment("comments") + @visibility("read") name: string; + + /** + * Properties of the Issue Comment. + */ + @extension("x-ms-client-flatten", true) + properties?: IssueCommentContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp index 5627603a21..f0cef8a4a2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Issue Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -model IssueContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(IssueContractProperties) +model IssueContract extends ProxyResourceBase { /** * Issue identifier. Must be unique in the current API Management service instance. */ @@ -26,7 +30,14 @@ model IssueContract is ProxyResource { @path @key("issueId") @segment("issues") + @visibility("read") name: string; + + /** + * Properties of the Issue. + */ + @extension("x-ms-client-flatten", true) + properties?: IssueContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp index 189109dcdd..f8e643f9bf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Logger details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model LoggerContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(LoggerContractProperties) +model LoggerContract extends ProxyResourceBase { /** * Logger identifier. Must be unique in the API Management service instance. */ @@ -25,7 +29,14 @@ model LoggerContract is ProxyResource { @path @key("loggerId") @segment("loggers") + @visibility("read") name: string; + + /** + * Logger entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: LoggerContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp index 7b80bc5da1..9747cc628e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * NamedValue details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model NamedValueContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(NamedValueContractProperties) +model NamedValueContract extends ProxyResourceBase { /** * Identifier of the NamedValue. */ @@ -25,7 +29,14 @@ model NamedValueContract is ProxyResource { @path @key("namedValueId") @segment("namedValues") + @visibility("read") name: string; + + /** + * NamedValue entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: NamedValueContractProperties; } @armResourceOperations @@ -65,8 +76,7 @@ interface NamedValueContracts { */ @header `If-Match`?: string; - }, - ArmLroLocationHeader + } >; /** @@ -86,8 +96,7 @@ interface NamedValueContracts { */ @header `If-Match`: string; - }, - ArmLroLocationHeader + } >; /** @@ -164,9 +173,7 @@ interface NamedValueContracts { refreshSecret is ArmResourceActionAsync< NamedValueContract, void, - NamedValueContract, - BaseParameters, - ArmLroLocationHeader + NamedValueContract >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp index 1ad7cc2673..a6487ce105 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp @@ -15,15 +15,28 @@ namespace Azure.ResourceManager.ApiManagement; /** * Notification details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model NotificationContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + NotificationContractProperties +) +model NotificationContract extends ProxyResourceBase { /** * Notification Name Identifier. */ @path @key("notificationName") @segment("notifications") + @visibility("read") name: NotificationName; + + /** + * Notification entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: NotificationContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp index fc9be52235..925f366d0b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * OpenId Connect Provider details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model OpenidConnectProviderContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + OpenidConnectProviderContractProperties +) +model OpenidConnectProviderContract extends ProxyResourceBase { /** * Identifier of the OpenID Connect Provider. */ @@ -26,7 +31,14 @@ model OpenidConnectProviderContract @path @key("opid") @segment("openidConnectProviders") + @visibility("read") name: string; + + /** + * OpenId Connect Provider contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: OpenidConnectProviderContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp index 27df861358..cf7df95123 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * API Operation details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -model OperationContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(OperationContractProperties) +model OperationContract extends ProxyResourceBase { /** * Operation identifier within an API. Must be unique in the current API Management service instance. */ @@ -25,7 +29,14 @@ model OperationContract is ProxyResource { @path @key("operationId") @segment("operations") + @visibility("read") name: string; + + /** + * Properties of the Operation Contract. + */ + @extension("x-ms-client-flatten", true) + properties?: OperationContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp index 86b7cfc181..84ee247673 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp @@ -15,15 +15,26 @@ namespace Azure.ResourceManager.ApiManagement; /** * Policy Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(OperationContract) -model PolicyContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(PolicyContractProperties) +model PolicyContract extends ProxyResourceBase { /** * The identifier of the Policy. */ @path @key("policyId") @segment("policies") + @visibility("read") name: PolicyIdName; + + /** + * Properties of the Policy. + */ + @extension("x-ms-client-flatten", true) + properties?: PolicyContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp index d301de8754..81908a6ecd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp @@ -15,13 +15,25 @@ namespace Azure.ResourceManager.ApiManagement; /** * Delegation settings for a developer portal. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("delegation") @parentResource(ApiManagementServiceResource) -model PortalDelegationSettings - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PortalDelegationSettingsProperties +) +model PortalDelegationSettings extends ProxyResourceBase { @key("portalsetting") @segment("portalsettings") + @visibility("read") name: string; + + /** + * Delegation settings contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PortalDelegationSettingsProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp index c833e5214b..152e5f39f0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Portal Revision's contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model PortalRevisionContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PortalRevisionContractProperties +) +model PortalRevisionContract extends ProxyResourceBase { /** * Portal revision identifier. Must be unique in the current API Management service instance. */ @@ -26,7 +31,14 @@ model PortalRevisionContract @path @key("portalRevisionId") @segment("portalRevisions") + @visibility("read") name: string; + + /** + * Properties of the portal revisions. + */ + @extension("x-ms-client-flatten", true) + properties?: PortalRevisionContractProperties; } @armResourceOperations @@ -56,11 +68,7 @@ interface PortalRevisionContracts { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("PortalRevision_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrReplaceAsync< - PortalRevisionContract, - BaseParameters, - ArmLroLocationHeader - >; + createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Updates the description of specified portal revision or makes it current. @@ -79,8 +87,7 @@ interface PortalRevisionContracts { */ @header `If-Match`: string; - }, - ArmLroLocationHeader + } >; /** @@ -94,14 +101,14 @@ interface PortalRevisionContracts { ...BaseParameters; /** -* | Field | Supported operators | Supported functions | -|-------------|------------------------|-----------------------------------| - -|name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| -|description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| -|isCurrent | eq, ne | | - -*/ + * | Field | Supported operators | Supported functions | + * |-------------|------------------------|-----------------------------------| + * + * |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| + * |description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith| + * |isCurrent | eq, ne | | + * + */ @query("$filter") $filter?: string; diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp index 7dd6637c05..f132fd68a1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp @@ -15,12 +15,25 @@ namespace Azure.ResourceManager.ApiManagement; /** * Sign-In settings for the Developer Portal. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("signin") @parentResource(ApiManagementServiceResource) -model PortalSigninSettings is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PortalSigninSettingProperties +) +model PortalSigninSettings extends ProxyResourceBase { @key("portalsetting") @segment("portalsettings") + @visibility("read") name: string; + + /** + * Sign-in settings contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PortalSigninSettingProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp index 88192aed4a..c4b1831747 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp @@ -15,12 +15,25 @@ namespace Azure.ResourceManager.ApiManagement; /** * Sign-Up settings for a developer portal. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("signup") @parentResource(ApiManagementServiceResource) -model PortalSignupSettings is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PortalSignupSettingsProperties +) +model PortalSignupSettings extends ProxyResourceBase { @key("portalsetting") @segment("portalsettings") + @visibility("read") name: string; + + /** + * Sign-up settings contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PortalSignupSettingsProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp index 26ef9995df..8667fc2e4f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp @@ -15,16 +15,28 @@ namespace Azure.ResourceManager.ApiManagement; /** * The Private Endpoint Connection resource. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model PrivateEndpointConnection - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PrivateEndpointConnectionProperties +) +model PrivateEndpointConnection extends ProxyResourceBase { /** * Name of the private endpoint connection. */ @path @key("privateEndpointConnectionName") @segment("privateEndpointConnections") + @visibility("read") name: string; + + /** + * Resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PrivateEndpointConnectionProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp index 3c59ce3bf9..3e41c2f853 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp @@ -15,15 +15,28 @@ namespace Azure.ResourceManager.ApiManagement; /** * A private link resource */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model PrivateLinkResource is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PrivateLinkResourceProperties +) +model PrivateLinkResource extends ProxyResourceBase { /** * Name of the private link resource. */ @path @key("privateLinkSubResourceName") @segment("privateLinkResources") + @visibility("read") name: string; + + /** + * Resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PrivateLinkResourceProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp index c2d289403c..f594361e49 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Product details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model ProductContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ProductContractProperties) +model ProductContract extends ProxyResourceBase { /** * Product identifier. Must be unique in the current API Management service instance. */ @@ -25,7 +29,14 @@ model ProductContract is ProxyResource { @path @key("productId") @segment("products") + @visibility("read") name: string; + + /** + * Product entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: ProductContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp index 2910dbe74e..3b6b372449 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * API Schema Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -model SchemaContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(SchemaContractProperties) +model SchemaContract extends ProxyResourceBase { /** * Schema id identifier. Must be unique in the current API Management service instance. */ @@ -25,7 +29,14 @@ model SchemaContract is ProxyResource { @path @key("schemaId") @segment("schemas") + @visibility("read") name: string; + + /** + * Properties of the API Schema. + */ + @extension("x-ms-client-flatten", true) + properties?: SchemaContractProperties; } @armResourceOperations @@ -65,8 +76,7 @@ interface SchemaContracts { */ @header `If-Match`?: string; - }, - ArmLroLocationHeader + } >; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp index c077bbe1e3..d8a6466aca 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp @@ -15,15 +15,28 @@ namespace Azure.ResourceManager.ApiManagement; /** * Subscription details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model SubscriptionContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + SubscriptionContractProperties +) +model SubscriptionContract extends ProxyResourceBase { /** * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ @path @key("subscriptionId") @segment("subscriptions") + @visibility("read") name: string; + + /** + * Subscription contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: SubscriptionContractProperties; } @armResourceOperations @@ -60,8 +73,8 @@ interface SubscriptionContracts { /** * Notify change in Subscription State. - * - If false, do not send any email notification for change of state of subscription - * - If true, send email notification of change of state of subscription + * - If false, do not send any email notification for change of state of subscription + * - If true, send email notification of change of state of subscription */ @query("notify") notify?: boolean; @@ -94,8 +107,8 @@ interface SubscriptionContracts { /** * Notify change in Subscription State. - * - If false, do not send any email notification for change of state of subscription - * - If true, send email notification of change of state of subscription + * - If false, do not send any email notification for change of state of subscription + * - If true, send email notification of change of state of subscription */ @query("notify") notify?: boolean; diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp index 2d73270eef..854ec1a34f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Tag Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(OperationContract) -model TagContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(TagContractProperties) +model TagContract extends ProxyResourceBase { /** * Tag identifier. Must be unique in the current API Management service instance. */ @@ -26,7 +30,14 @@ model TagContract is ProxyResource { @path @key("tagId") @segment("tags") + @visibility("read") name: string; + + /** + * Tag entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: TagContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp index f0fe09be22..a2bd6ed73f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -model TagDescriptionContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + TagDescriptionContractProperties +) +model TagDescriptionContract extends ProxyResourceBase { /** * Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. */ @@ -27,7 +32,14 @@ model TagDescriptionContract @path @key("tagDescriptionId") @segment("tagDescriptions") + @visibility("read") name: string; + + /** + * TagDescription entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: TagDescriptionContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp index a9f6427e78..ceb430debf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp @@ -15,16 +15,28 @@ namespace Azure.ResourceManager.ApiManagement; /** * Tenant Settings. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model TenantSettingsContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + TenantSettingsContractProperties +) +model TenantSettingsContract extends ProxyResourceBase { /** * The identifier of the settings. */ @path @key("settingsType") @segment("settings") + @visibility("read") name: SettingsTypeName; + + /** + * TenantSettings entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: TenantSettingsContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp index 40c6ef0f23..eb4f0bfddf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * User details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model UserContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(UserContractProperties) +model UserContract extends ProxyResourceBase { /** * User identifier. Must be unique in the current API Management service instance. */ @@ -25,7 +29,14 @@ model UserContract is ProxyResource { @path @key("userId") @segment("users") + @visibility("read") name: string; + + /** + * User entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: UserContractProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp index 3f0d5bd972..8b9cbbf6e5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp @@ -1,11 +1,13 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; +import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; +using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -106,10 +108,10 @@ enum ContentFormat { /** * Type of API to create. - * * `http` creates a REST API - * * `soap` creates a SOAP pass-through API - * * `websocket` creates websocket API - * * `graphql` creates GraphQL API. + * * `http` creates a REST API + * * `soap` creates a SOAP pass-through API + * * `websocket` creates websocket API + * * `graphql` creates GraphQL API. */ enum SoapApiType { /** @@ -1318,6 +1320,7 @@ model ApiCreateOrUpdateParameter { /** * API entity create of update properties. */ + @extension("x-ms-client-flatten", true) properties?: ApiCreateOrUpdateProperties; } @@ -1342,10 +1345,10 @@ model ApiCreateOrUpdateProperties extends ApiContractProperties { /** * Type of API to create. - * * `http` creates a REST API - * * `soap` creates a SOAP pass-through API - * * `websocket` creates websocket API - * * `graphql` creates GraphQL API. + * * `http` creates a REST API + * * `soap` creates a SOAP pass-through API + * * `websocket` creates websocket API + * * `graphql` creates GraphQL API. */ @projectedName("json", "apiType") soapApiType?: SoapApiType; @@ -1373,6 +1376,7 @@ model ApiUpdateContract { /** * Properties of the API entity that can be updated. */ + @extension("x-ms-client-flatten", true) properties?: ApiContractUpdateProperties; } @@ -1720,6 +1724,7 @@ model OperationUpdateContract { /** * Properties of the API Operation entity that can be updated. */ + @extension("x-ms-client-flatten", true) properties?: OperationUpdateContractProperties; } @@ -1836,6 +1841,7 @@ model SchemaContractProperties { /** * Create or update Properties of the API Schema Document. */ + @extension("x-ms-client-flatten", true) document?: SchemaDocumentProperties; } @@ -2048,6 +2054,7 @@ model IssueUpdateContract { /** * Issue entity Update contract properties. */ + @extension("x-ms-client-flatten", true) properties?: IssueUpdateContractProperties; } @@ -2157,6 +2164,7 @@ model TagDescriptionCreateParameters { /** * Properties supplied to Create TagDescription operation. */ + @extension("x-ms-client-flatten", true) properties?: TagDescriptionBaseProperties; } @@ -2397,6 +2405,7 @@ model ApiVersionSetUpdateParameters { /** * Parameters to update or create an API Version Set Contract. */ + @extension("x-ms-client-flatten", true) properties?: ApiVersionSetUpdateParametersProperties; } @@ -2534,6 +2543,7 @@ model AuthorizationServerUpdateContract extends Resource { /** * Properties of the External OAuth authorization server update Contract. */ + @extension("x-ms-client-flatten", true) properties?: AuthorizationServerUpdateContractProperties; } @@ -2811,6 +2821,7 @@ model BackendUpdateParameters { /** * Backend entity update contract properties. */ + @extension("x-ms-client-flatten", true) properties?: BackendUpdateParameterProperties; } @@ -2838,6 +2849,7 @@ model BackendReconnectContract extends Resource { /** * Reconnect request properties. */ + @extension("x-ms-client-flatten", true) properties?: BackendReconnectProperties; } @@ -2888,6 +2900,7 @@ model CacheUpdateParameters { /** * Cache update properties details. */ + @extension("x-ms-client-flatten", true) properties?: CacheUpdateProperties; } @@ -2936,9 +2949,9 @@ model CertificateContractProperties { thumbprint: string; /** -* Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * Expiration date of the certificate. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expirationDate: utcDateTime; @@ -2973,9 +2986,9 @@ model KeyVaultLastAccessStatusContractProperties { message?: string; /** -* Last time secret was accessed. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * Last time secret was accessed. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timeStampUtc?: utcDateTime; } @@ -3002,6 +3015,7 @@ model CertificateCreateOrUpdateParameters { /** * Certificate create or update properties details. */ + @extension("x-ms-client-flatten", true) properties?: CertificateCreateOrUpdateProperties; } @@ -3260,6 +3274,7 @@ model ContentTypeContract extends Resource { /** * Properties of the content type. */ + @extension("x-ms-client-flatten", true) properties?: ContentTypeContractProperties; } @@ -3302,6 +3317,7 @@ model ContentItemContract extends Resource { /** * Properties of the content item. */ + @extension("x-ms-client-flatten", true) properties?: Record; } @@ -3818,6 +3834,7 @@ model RemotePrivateEndpointConnectionWrapper { /** * Resource properties. */ + @extension("x-ms-client-flatten", true) properties?: PrivateEndpointConnectionWrapperProperties; } @@ -3898,11 +3915,11 @@ model ApiManagementServiceIdentity { tenantId?: string; /** -* The list of user identities associated with the resource. The user identity -dictionary key references will be ARM resource ids in the form: -'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. -*/ + * The list of user identities associated with the resource. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ userAssignedIdentities?: Record; } @@ -3953,6 +3970,7 @@ model ApiManagementServiceUpdateParameters extends ApimResource { /** * Properties of the API Management service. */ + @extension("x-ms-client-flatten", true) properties?: ApiManagementServiceUpdateProperties; /** @@ -4132,6 +4150,7 @@ model EmailTemplateUpdateParameters { /** * Email Template Update contract properties. */ + @extension("x-ms-client-flatten", true) properties?: EmailTemplateUpdateParameterProperties; } @@ -4248,9 +4267,9 @@ model GatewayTokenRequestContract { keyType: KeyType; /** -* The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expiry: utcDateTime; } @@ -4319,6 +4338,7 @@ model AssociationContract extends Resource { /** * Association entity contract properties. */ + @extension("x-ms-client-flatten", true) properties?: AssociationContractProperties; } @@ -4383,6 +4403,7 @@ model GroupCreateParameters { /** * Properties supplied to Create Group operation. */ + @extension("x-ms-client-flatten", true) properties?: GroupCreateParametersProperties; } @@ -4420,6 +4441,7 @@ model GroupUpdateParameters { /** * Group entity update contract properties. */ + @extension("x-ms-client-flatten", true) properties?: GroupUpdateParametersProperties; } @@ -4483,9 +4505,9 @@ model UserContractProperties extends UserEntityBaseParameters { email?: string; /** -* Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * Date of user registration. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. registrationDate?: utcDateTime; @@ -4609,6 +4631,7 @@ model IdentityProviderCreateContract extends Resource { /** * Identity Provider contract properties. */ + @extension("x-ms-client-flatten", true) properties?: IdentityProviderCreateContractProperties; } @@ -4637,6 +4660,7 @@ model IdentityProviderUpdateParameters { /** * Identity Provider update properties. */ + @extension("x-ms-client-flatten", true) properties?: IdentityProviderUpdateProperties; } @@ -4683,9 +4707,9 @@ model LoggerContractProperties { description?: string; /** -* The name and SendRule connection string of the event hub for azureEventHub logger. -Instrumentation key for applicationInsights logger. -*/ + * The name and SendRule connection string of the event hub for azureEventHub logger. + * Instrumentation key for applicationInsights logger. + */ credentials?: Record; /** @@ -4706,6 +4730,7 @@ model LoggerUpdateContract { /** * Logger entity update contract properties. */ + @extension("x-ms-client-flatten", true) properties?: LoggerUpdateParameters; } @@ -4781,6 +4806,7 @@ model NamedValueCreateContract extends Resource { /** * NamedValue entity contract properties for PUT operation. */ + @extension("x-ms-client-flatten", true) properties?: NamedValueCreateContractProperties; } @@ -4816,6 +4842,7 @@ model NamedValueUpdateParameters { /** * NamedValue entity Update contract properties. */ + @extension("x-ms-client-flatten", true) properties?: NamedValueUpdateParameterProperties; } @@ -4909,16 +4936,16 @@ model ConnectivityStatusContract { error?: string; /** -* The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * The date when the resource connectivity status was last updated. This status should be updated every 15 minutes. If this status has not been updated, then it means that the service has lost network connectivity to the resource, from inside the Virtual Network.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastUpdated: utcDateTime; /** -* The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * The date when the resource connectivity status last Changed from success to failure or vice-versa. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastStatusChange: utcDateTime; @@ -4997,6 +5024,7 @@ model RecipientUserContract extends Resource { /** * Recipient User entity contract properties. */ + @extension("x-ms-client-flatten", true) properties?: RecipientUsersContractProperties; } @@ -5037,6 +5065,7 @@ model RecipientEmailContract extends Resource { /** * Recipient Email contract properties. */ + @extension("x-ms-client-flatten", true) properties?: RecipientEmailContractProperties; } @@ -5088,6 +5117,7 @@ model OpenidConnectProviderUpdateContract { /** * OpenId Connect Provider Update contract properties. */ + @extension("x-ms-client-flatten", true) properties?: OpenidConnectProviderUpdateContractProperties; } @@ -5207,6 +5237,7 @@ model PolicyDescriptionContract extends Resource { /** * Policy description contract properties. */ + @extension("x-ms-client-flatten", true) properties?: PolicyDescriptionContractProperties; } @@ -5274,6 +5305,7 @@ model PortalSettingsContract extends Resource { /** * Portal Settings contract properties. */ + @extension("x-ms-client-flatten", true) properties?: PortalSettingsContractProperties; } @@ -5500,6 +5532,7 @@ model ProductUpdateParameters { /** * Product entity Update contract properties. */ + @extension("x-ms-client-flatten", true) properties?: ProductUpdateProperties; } @@ -5565,38 +5598,38 @@ model SubscriptionContractProperties { state: SubscriptionState; /** -* Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * Subscription creation date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ @visibility("read") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. createdDate?: utcDateTime; /** -* Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * Subscription activation date. The setting is for audit purposes only and the subscription is not automatically activated. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. startDate?: utcDateTime; /** -* Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expirationDate?: utcDateTime; /** -* Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endDate?: utcDateTime; /** -* Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * Upcoming subscription expiration notification date. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. notificationDate?: utcDateTime; @@ -5665,16 +5698,16 @@ model QuotaCounterContract { periodKey: string; /** -* The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * The date of the start of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. periodStartTime: utcDateTime; /** -* The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * The date of the end of Counter Period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. periodEndTime: utcDateTime; @@ -5706,6 +5739,7 @@ model QuotaCounterValueUpdateContract { /** * Quota counter value details. */ + @extension("x-ms-client-flatten", true) properties?: QuotaCounterValueContractProperties; } @@ -5760,9 +5794,9 @@ model ReportRecordContract { name?: string; /** -* Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timestamp?: utcDateTime; @@ -6026,6 +6060,7 @@ model GlobalSchemaContractProperties { /** * Global Schema document object for json-based schema formats(e.g. json schema). */ + @extension("x-ms-client-flatten", true) document?: Record; } @@ -6283,6 +6318,7 @@ model SubscriptionCreateParameters { /** * Subscription contract properties. */ + @extension("x-ms-client-flatten", true) properties?: SubscriptionCreateParameterProperties; } @@ -6339,6 +6375,7 @@ model SubscriptionUpdateParameters { /** * Subscription Update contract properties. */ + @extension("x-ms-client-flatten", true) properties?: SubscriptionUpdateParameterProperties; } @@ -6423,6 +6460,7 @@ model TagCreateUpdateParameters { /** * Properties supplied to Create Tag operation. */ + @extension("x-ms-client-flatten", true) properties?: TagContractProperties; } @@ -6453,6 +6491,7 @@ model AccessInformationCreateParameters { /** * Tenant access information update parameter properties. */ + @extension("x-ms-client-flatten", true) properties?: AccessInformationCreateParameterProperties; } @@ -6488,6 +6527,7 @@ model AccessInformationUpdateParameters { /** * Tenant access information update parameter properties. */ + @extension("x-ms-client-flatten", true) properties?: AccessInformationUpdateParameterProperties; } @@ -6538,6 +6578,7 @@ model DeployConfigurationParameters { /** * Deploy Configuration Parameter contract properties. */ + @extension("x-ms-client-flatten", true) properties?: DeployConfigurationParameterProperties; } @@ -6563,6 +6604,7 @@ model OperationResultContract extends Resource { /** * Properties of the Operation Contract. */ + @extension("x-ms-client-flatten", true) properties?: OperationResultContractProperties; } @@ -6581,16 +6623,16 @@ model OperationResultContractProperties { status?: AsyncOperationStatus; /** -* Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. started?: utcDateTime; /** -* Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. updated?: utcDateTime; @@ -6638,6 +6680,7 @@ model SaveConfigurationParameter { /** * Properties of the Save Configuration Parameters. */ + @extension("x-ms-client-flatten", true) properties?: SaveConfigurationParameterProperties; } @@ -6663,6 +6706,7 @@ model TenantConfigurationSyncStateContract extends Resource { /** * Properties returned Tenant Configuration Sync State check. */ + @extension("x-ms-client-flatten", true) properties?: TenantConfigurationSyncStateContractProperties; } @@ -6696,16 +6740,16 @@ model TenantConfigurationSyncStateContractProperties { isGitEnabled?: boolean; /** -* The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * The date of the latest synchronization. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. syncDate?: utcDateTime; /** -* The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * The date of the latest configuration change. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. configurationChangeDate?: utcDateTime; @@ -6722,6 +6766,7 @@ model UserCreateParameters { /** * User entity create contract properties. */ + @extension("x-ms-client-flatten", true) properties?: UserCreateParameterProperties; } @@ -6773,6 +6818,7 @@ model UserUpdateParameters { /** * User entity update contract properties. */ + @extension("x-ms-client-flatten", true) properties?: UserUpdateParametersProperties; } @@ -6834,6 +6880,7 @@ model UserTokenParameters { /** * User Token Parameter contract properties. */ + @extension("x-ms-client-flatten", true) properties?: UserTokenParameterProperties; } @@ -6847,9 +6894,9 @@ model UserTokenParameterProperties { keyType: KeyType; /** -* The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - -*/ + * The Expiry time of the Token. Maximum token expiry time is set to 30 days. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + * + */ // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. expiry: utcDateTime; } @@ -6898,5 +6945,6 @@ model QuotaCounterValueContract { /** * Quota counter Value Properties. */ + @extension("x-ms-client-flatten", true) value?: QuotaCounterValueContractProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp index f0f7dfc7fe..0e73dc843d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp @@ -14,14 +14,25 @@ namespace Azure.ResourceManager.Authorization; /** * Deny Assignment */ -model DenyAssignment is ExtensionResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(DenyAssignmentProperties) +model DenyAssignment extends ExtensionResourceBase { /** * The ID of the deny assignment to get. */ @path @key("denyAssignmentId") @segment("denyAssignments") + @visibility("read") name: string; + + /** + * Deny assignment properties. + */ + @extension("x-ms-client-flatten", true) + properties?: DenyAssignmentProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp index 116e7c0a2f..c934dddd69 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp @@ -23,6 +23,7 @@ model ProviderOperationsMetadata is ProxyResource<{}> { @path @key("resourceProviderNamespace") @segment("providerOperations") + @visibility("read") name: string; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp index 105ca7cfd1..b2a56efe33 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp @@ -14,14 +14,25 @@ namespace Azure.ResourceManager.Authorization; /** * Role Assignments */ -model RoleAssignment is ExtensionResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(RoleAssignmentProperties) +model RoleAssignment extends ExtensionResourceBase { /** * The name of the role assignment. It can be any valid GUID. */ @path @key("roleAssignmentName") @segment("roleAssignments") + @visibility("read") name: string; + + /** + * Role assignment properties. + */ + @extension("x-ms-client-flatten", true) + properties?: RoleAssignmentProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp index 239aff5399..6db8a1a7e6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp @@ -14,15 +14,27 @@ namespace Azure.ResourceManager.Authorization; /** * Role Assignment schedule */ -model RoleAssignmentSchedule - is ExtensionResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + RoleAssignmentScheduleProperties +) +model RoleAssignmentSchedule extends ExtensionResourceBase { /** * The name (guid) of the role assignment schedule to get. */ @path @key("roleAssignmentScheduleName") @segment("roleAssignmentSchedules") + @visibility("read") name: string; + + /** + * Role assignment schedule properties. + */ + @extension("x-ms-client-flatten", true) + properties?: RoleAssignmentScheduleProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp index 26074c4ef9..3f41777be4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp @@ -14,15 +14,27 @@ namespace Azure.ResourceManager.Authorization; /** * Information about current or upcoming role assignment schedule instance */ -model RoleAssignmentScheduleInstance - is ExtensionResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + RoleAssignmentScheduleInstanceProperties +) +model RoleAssignmentScheduleInstance extends ExtensionResourceBase { /** * The name (hash of schedule name + time) of the role assignment schedule to get. */ @path @key("roleAssignmentScheduleInstanceName") @segment("roleAssignmentScheduleInstances") + @visibility("read") name: string; + + /** + * Role assignment schedule instance properties. + */ + @extension("x-ms-client-flatten", true) + properties?: RoleAssignmentScheduleInstanceProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp index abf49e0053..f2fcfc4048 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp @@ -14,15 +14,27 @@ namespace Azure.ResourceManager.Authorization; /** * Role Assignment schedule request */ -model RoleAssignmentScheduleRequest - is ExtensionResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + RoleAssignmentScheduleRequestProperties +) +model RoleAssignmentScheduleRequest extends ExtensionResourceBase { /** * The name (guid) of the role assignment schedule request to get. */ @path @key("roleAssignmentScheduleRequestName") @segment("roleAssignmentScheduleRequests") + @visibility("read") name: string; + + /** + * Role assignment schedule request properties. + */ + @extension("x-ms-client-flatten", true) + properties?: RoleAssignmentScheduleRequestProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp index 40dd77375a..a49f81cf15 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp @@ -14,14 +14,25 @@ namespace Azure.ResourceManager.Authorization; /** * Role definition. */ -model RoleDefinition is ExtensionResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(RoleDefinitionProperties) +model RoleDefinition extends ExtensionResourceBase { /** * The ID of the role definition. */ @path @key("roleDefinitionId") @segment("roleDefinitions") + @visibility("read") name: string; + + /** + * Role definition properties. + */ + @extension("x-ms-client-flatten", true) + properties?: RoleDefinitionProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp index 50f08b1e85..80bd6eb075 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp @@ -14,15 +14,27 @@ namespace Azure.ResourceManager.Authorization; /** * Role eligibility schedule */ -model RoleEligibilitySchedule - is ExtensionResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + RoleEligibilityScheduleProperties +) +model RoleEligibilitySchedule extends ExtensionResourceBase { /** * The name (guid) of the role eligibility schedule to get. */ @path @key("roleEligibilityScheduleName") @segment("roleEligibilitySchedules") + @visibility("read") name: string; + + /** + * role eligibility schedule properties. + */ + @extension("x-ms-client-flatten", true) + properties?: RoleEligibilityScheduleProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp index 4ebbe055f2..0f25e74260 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp @@ -14,15 +14,27 @@ namespace Azure.ResourceManager.Authorization; /** * Information about current or upcoming role eligibility schedule instance */ -model RoleEligibilityScheduleInstance - is ExtensionResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + RoleEligibilityScheduleInstanceProperties +) +model RoleEligibilityScheduleInstance extends ExtensionResourceBase { /** * The name (hash of schedule name + time) of the role eligibility schedule to get. */ @path @key("roleEligibilityScheduleInstanceName") @segment("roleEligibilityScheduleInstances") + @visibility("read") name: string; + + /** + * Role eligibility schedule instance properties. + */ + @extension("x-ms-client-flatten", true) + properties?: RoleEligibilityScheduleInstanceProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp index cdddd7a094..d86f42e278 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp @@ -14,15 +14,27 @@ namespace Azure.ResourceManager.Authorization; /** * Role Eligibility schedule request */ -model RoleEligibilityScheduleRequest - is ExtensionResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + RoleEligibilityScheduleRequestProperties +) +model RoleEligibilityScheduleRequest extends ExtensionResourceBase { /** * The name (guid) of the role eligibility schedule request to get. */ @path @key("roleEligibilityScheduleRequestName") @segment("roleEligibilityScheduleRequests") + @visibility("read") name: string; + + /** + * Role eligibility schedule request properties. + */ + @extension("x-ms-client-flatten", true) + properties?: RoleEligibilityScheduleRequestProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp index ed8b2da580..68231176aa 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp @@ -14,15 +14,27 @@ namespace Azure.ResourceManager.Authorization; /** * Role management policy */ -model RoleManagementPolicy - is ExtensionResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + RoleManagementPolicyProperties +) +model RoleManagementPolicy extends ExtensionResourceBase { /** * The name (guid) of the role management policy to get. */ @path @key("roleManagementPolicyName") @segment("roleManagementPolicies") + @visibility("read") name: string; + + /** + * Role management policy properties. + */ + @extension("x-ms-client-flatten", true) + properties?: RoleManagementPolicyProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp index e7771c656c..f2eba157ce 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp @@ -14,15 +14,27 @@ namespace Azure.ResourceManager.Authorization; /** * Role management policy */ -model RoleManagementPolicyAssignment - is ExtensionResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + RoleManagementPolicyAssignmentProperties +) +model RoleManagementPolicyAssignment extends ExtensionResourceBase { /** * The name of format {guid_guid} the role management policy assignment to get. */ @path @key("roleManagementPolicyAssignmentName") @segment("roleManagementPolicyAssignments") + @visibility("read") name: string; + + /** + * Role management policy properties. + */ + @extension("x-ms-client-flatten", true) + properties?: RoleManagementPolicyAssignmentProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp index 47053a7b71..86d9b74c85 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp @@ -1,10 +1,12 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; +import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -207,6 +209,7 @@ model ClassicAdministrator { /** * Properties for the classic administrator. */ + @extension("x-ms-client-flatten", true) properties?: ClassicAdministratorProperties; } @@ -378,6 +381,7 @@ model ProviderOperation { /** * The operation properties. */ + @extension("x-ms-client-flatten", true) properties?: Record; /** @@ -465,6 +469,7 @@ model RoleAssignmentCreateParameters { /** * Role assignment properties. */ + @extension("x-ms-client-flatten", true) properties: RoleAssignmentProperties; } @@ -677,16 +682,19 @@ model ExpandedProperties { /** * Details of the resource scope */ + @extension("x-ms-client-flatten", true) scope?: ExpandedPropertiesScope; /** * Details of role definition */ + @extension("x-ms-client-flatten", true) roleDefinition?: ExpandedPropertiesRoleDefinition; /** * Details of the principal */ + @extension("x-ms-client-flatten", true) principal?: ExpandedPropertiesPrincipal; } @@ -913,6 +921,7 @@ model RoleAssignmentScheduleRequestProperties { /** * Schedule info of the role assignment schedule */ + @extension("x-ms-client-flatten", true) scheduleInfo?: RoleAssignmentScheduleRequestPropertiesScheduleInfo; /** @@ -973,6 +982,7 @@ model RoleAssignmentScheduleRequestPropertiesScheduleInfo { /** * Expiration of the role assignment schedule */ + @extension("x-ms-client-flatten", true) expiration?: RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration; } @@ -1211,6 +1221,7 @@ model RoleEligibilityScheduleRequestProperties { /** * Schedule info of the role eligibility schedule */ + @extension("x-ms-client-flatten", true) scheduleInfo?: RoleEligibilityScheduleRequestPropertiesScheduleInfo; /** @@ -1276,6 +1287,7 @@ model RoleEligibilityScheduleRequestPropertiesScheduleInfo { /** * Expiration of the role eligibility schedule */ + @extension("x-ms-client-flatten", true) expiration?: RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration; } @@ -1430,6 +1442,7 @@ model PolicyProperties { * Details of the resource scope */ @visibility("read") + @extension("x-ms-client-flatten", true) scope?: PolicyPropertiesScope; } @@ -1495,16 +1508,19 @@ model PolicyAssignmentProperties { /** * Details of the resource scope */ + @extension("x-ms-client-flatten", true) scope?: PolicyAssignmentPropertiesScope; /** * Details of role definition */ + @extension("x-ms-client-flatten", true) roleDefinition?: PolicyAssignmentPropertiesRoleDefinition; /** * Details of the policy */ + @extension("x-ms-client-flatten", true) policy?: PolicyAssignmentPropertiesPolicy; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp index 81e3a525ba..ac6a65988d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp @@ -24,6 +24,7 @@ model Application is TrackedResource { @path @key("applicationName") @segment("applications") + @visibility("read") name: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp index e20a4a888b..1ce9d54810 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp @@ -24,6 +24,7 @@ model BusinessProcess is ProxyResource { @path @key("businessProcessName") @segment("businessProcesses") + @visibility("read") name: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp index a25bbd3e5f..5fd1bd3c7e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp @@ -23,6 +23,7 @@ model BusinessProcessVersion is ProxyResource { @path @key("businessProcessVersion") @segment("versions") + @visibility("read") name: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp index 5bf23772d1..30c7712aad 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp @@ -25,6 +25,7 @@ model InfrastructureResource @path @key("infrastructureResourceName") @segment("infrastructureResources") + @visibility("read") name: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp index 584980654e..839ca404f0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp @@ -22,6 +22,7 @@ model Space is TrackedResource { @path @key("spaceName") @segment("spaces") + @visibility("read") name: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp index 6988e8f80f..e164a83d74 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp @@ -1,10 +1,12 @@ import "@typespec/rest"; import "@typespec/http"; +import "@typespec/openapi"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -94,6 +96,7 @@ model SpaceUpdate { /** * The updatable properties of the Space. */ + @extension("x-ms-client-flatten", true) properties?: SpaceUpdateProperties; } @@ -165,6 +168,7 @@ model ApplicationUpdate { /** * The updatable properties of the Application. */ + @extension("x-ms-client-flatten", true) properties?: ApplicationUpdateProperties; } @@ -297,6 +301,7 @@ model BusinessProcessUpdate { /** * The updatable properties of the BusinessProcess. */ + @extension("x-ms-client-flatten", true) properties?: BusinessProcessUpdateProperties; } @@ -524,6 +529,7 @@ model ApplicationResource extends ProxyResource { * The resource-specific properties for this resource. */ @visibility("read", "create") + @extension("x-ms-client-flatten", true) properties?: ApplicationResourceProperties; } @@ -560,6 +566,7 @@ model ApplicationResourceUpdate { /** * The updatable properties of the ApplicationResource. */ + @extension("x-ms-client-flatten", true) properties?: ApplicationResourceUpdateProperties; } @@ -626,6 +633,7 @@ model InfrastructureResourceUpdate { /** * The updatable properties of the InfrastructureResource. */ + @extension("x-ms-client-flatten", true) properties?: InfrastructureResourceUpdateProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp index e4234809ba..851302b83b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp @@ -14,16 +14,29 @@ namespace Microsoft.Compute; /** * Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to an availability set at creation time. An existing VM cannot be added to an availability set. */ -model AvailabilitySet is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model AvailabilitySet extends Resource { /** * The name of the availability set. */ @path @key("availabilitySetName") @segment("availabilitySets") + @visibility("read") name: string; - ...Azure.ResourceManager.ResourceSku; + /** + * Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'. + */ + sku?: Sku; + + /** + * The instance view of a resource. + */ + @extension("x-ms-client-flatten", true) + properties?: AvailabilitySetProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp index bde32139a6..857a233823 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp @@ -15,22 +15,35 @@ namespace Microsoft.Compute; /** * Specifies information about the capacity reservation. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(CapacityReservationGroup) -model CapacityReservation is TrackedResource { +@includeInapplicableMetadataInPayload(false) +model CapacityReservation extends Resource { /** * The name of the capacity reservation. */ @path @key("capacityReservationName") @segment("capacityReservations") + @visibility("read") name: string; + /** + * SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values. + */ + sku: Sku; + /** * Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone. */ zones?: string[]; - ...Azure.ResourceManager.ResourceSku; + /** + * Properties of the Capacity reservation. + */ + @extension("x-ms-client-flatten", true) + properties?: CapacityReservationProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp index 132b561517..25169263ca 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp @@ -14,20 +14,29 @@ namespace Microsoft.Compute; /** * Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently, a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group. */ -model CapacityReservationGroup - is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model CapacityReservationGroup extends Resource { /** * The name of the capacity reservation group. */ @path @key("capacityReservationGroupName") @segment("capacityReservationGroups") + @visibility("read") name: string; /** * Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones. */ zones?: string[]; + + /** + * capacity reservation group Properties. + */ + @extension("x-ms-client-flatten", true) + properties?: CapacityReservationGroupProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp index 8b8d7d05fc..5943f746c2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp @@ -14,19 +14,57 @@ namespace Microsoft.Compute; /** * Describes the cloud service. */ -model CloudService is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model CloudService { /** * Name of the cloud service. */ @path @key("cloudServiceName") @segment("cloudServices") + @visibility("read") name: string; + /** + * Resource Id. + */ + @visibility("read") + id?: string; + + /** + * Resource type. + */ + @visibility("read") + type?: string; + + /** + * Resource location. + */ + location: string; + + /** + * Resource tags. + */ + tags?: Record; + + /** + * Metadata pertaining to creation and last modification of the resource. + */ + @visibility("read") + systemData?: SystemData; + /** * List of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned. This field is optional. */ zones?: string[]; + + /** + * Cloud service properties + */ + @extension("x-ms-client-flatten", true) + properties?: CloudServiceProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp index 1b65080bfe..a2394ac1b6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp @@ -15,17 +15,48 @@ namespace Microsoft.Compute; /** * Describes a role of the cloud service. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(CloudService) -model CloudServiceRole is ProxyResource { +@includeInapplicableMetadataInPayload(false) +model CloudServiceRole { /** * Name of the role. */ @path @key("roleName") @segment("roles") + @visibility("read") name: string; - ...Azure.ResourceManager.ResourceSku; + /** + * Resource id + */ + @visibility("read") + id?: string; + + /** + * Resource type + */ + @visibility("read") + type?: string; + + /** + * Resource location + */ + @visibility("read") + location?: string; + + /** + * Describes the cloud service role sku. + */ + sku?: CloudServiceRoleSku; + + /** + * The cloud service role properties. + */ + @extension("x-ms-client-flatten", true) + properties?: CloudServiceRoleProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp index 57285a5f84..4d43ee887f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp @@ -15,15 +15,23 @@ namespace Microsoft.Compute; /** * Specifies information about the Community Gallery that you want to create or update. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @locationResource -model CommunityGallery is ProxyResource<{}> { +@includeInapplicableMetadataInPayload(false) +model CommunityGallery extends PirCommunityGalleryResource { /** * The public name of the community gallery. */ @path @key("publicGalleryName") @segment("communityGalleries") + @visibility("read") name: string; + + @extension("x-ms-client-flatten", true) + @visibility("read,create") + properties?: {}; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp index 5f07e5f79d..0ce0a57531 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp @@ -15,15 +15,25 @@ namespace Microsoft.Compute; /** * Specifies information about the gallery image definition that you want to create or update. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(CommunityGallery) -model CommunityGalleryImage is ProxyResource { +@includeInapplicableMetadataInPayload(false) +model CommunityGalleryImage extends PirCommunityGalleryResource { /** * The name of the community gallery image definition. */ @path @key("galleryImageName") @segment("images") + @visibility("read") name: string; + + /** + * Describes the properties of a gallery image definition. + */ + @extension("x-ms-client-flatten", true) + properties?: CommunityGalleryImageProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp index 52ae8c392b..fac5981be4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp @@ -15,16 +15,25 @@ namespace Microsoft.Compute; /** * Specifies information about the gallery image version that you want to create or update. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(CommunityGalleryImage) -model CommunityGalleryImageVersion - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +model CommunityGalleryImageVersion extends PirCommunityGalleryResource { /** * The name of the community gallery image version. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. */ @path @key("galleryImageVersionName") @segment("versions") + @visibility("read") name: string; + + /** + * Describes the properties of a gallery image version. + */ + @extension("x-ms-client-flatten", true) + properties?: CommunityGalleryImageVersionProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp index 7b0ce845d0..bd8d7548d0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp @@ -15,17 +15,30 @@ namespace Microsoft.Compute; /** * Specifies information about the Dedicated host. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(DedicatedHostGroup) -model DedicatedHost is TrackedResource { +@includeInapplicableMetadataInPayload(false) +model DedicatedHost extends Resource { /** * The name of the dedicated host. */ @path @key("hostName") @segment("hosts") + @visibility("read") name: string; - ...Azure.ResourceManager.ResourceSku; + /** + * SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute SKUs for a list of possible values. + */ + sku: Sku; + + /** + * Properties of the dedicated host. + */ + @extension("x-ms-client-flatten", true) + properties?: DedicatedHostProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp index 6fa6bf2f83..c5d13636a7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp @@ -14,19 +14,29 @@ namespace Microsoft.Compute; /** * Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group. */ -model DedicatedHostGroup is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model DedicatedHostGroup extends Resource { /** * The name of the dedicated host group. */ @path @key("hostGroupName") @segment("hostGroups") + @visibility("read") name: string; /** * Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. */ zones?: string[]; + + /** + * Dedicated Host Group Properties. + */ + @extension("x-ms-client-flatten", true) + properties?: DedicatedHostGroupProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp index ab32627b1b..ea7381353d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp @@ -14,21 +14,36 @@ namespace Microsoft.Compute; /** * Disk resource. */ -model Disk is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model Disk extends Resource { /** * The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. */ @path @key("diskName") @segment("disks") + @visibility("read") name: string; + /** + * A relative URI containing the ID of the VM that has the disk attached. + */ + @visibility("read") + managedBy?: string; + /** * List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs. */ @visibility("read") managedByExtended?: string[]; + /** + * The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS. + */ + sku?: DiskSku; + /** * The Logical zone list for Disk. */ @@ -39,8 +54,11 @@ model Disk is TrackedResource { */ extendedLocation?: ExtendedLocation; - ...Azure.ResourceManager.ResourceSku; - ...Azure.ResourceManager.ManagedBy; + /** + * Disk resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: DiskProperties; } @armResourceOperations @@ -81,24 +99,12 @@ interface Disks { /** * Grants access to a disk. */ - grantAccess is ArmResourceActionAsync< - Disk, - GrantAccessData, - AccessUri, - BaseParameters, - ArmLroLocationHeader - >; + grantAccess is ArmResourceActionAsync; /** * Revokes access to a disk. */ - revokeAccess is ArmResourceActionAsync< - Disk, - void, - void, - BaseParameters, - ArmLroLocationHeader - >; + revokeAccess is ArmResourceActionAsync; } @@projectedName(Disks.createOrUpdate::parameters.resource, "json", "disk"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp index 18f786ff8f..0e0836d56f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp @@ -14,19 +14,26 @@ namespace Microsoft.Compute; /** * disk access resource. */ -model DiskAccess is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model DiskAccess extends Resource { /** * The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. */ @path @key("diskAccessName") @segment("diskAccesses") + @visibility("read") name: string; /** * The extended location where the disk access will be created. Extended location cannot be changed. */ extendedLocation?: ExtendedLocation; + + @extension("x-ms-client-flatten", true) + properties?: DiskAccessProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp index 59a71ac9fe..2f6572abcb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp @@ -14,16 +14,26 @@ namespace Microsoft.Compute; /** * disk encryption set resource. */ -model DiskEncryptionSet is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model DiskEncryptionSet extends Resource { /** * The name of the disk encryption set that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. */ @path @key("diskEncryptionSetName") @segment("diskEncryptionSets") + @visibility("read") name: string; - ...Azure.ResourceManager.ManagedServiceIdentity; + /** + * The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks. + */ + identity?: EncryptionSetIdentity; + + @extension("x-ms-client-flatten", true) + properties?: EncryptionSetProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp index 1bb02acc2c..9a0872c0c0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp @@ -15,15 +15,25 @@ namespace Microsoft.Compute; /** * Properties of disk restore point */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(RestorePoint) -model DiskRestorePoint is ProxyResource { +@includeInapplicableMetadataInPayload(false) +model DiskRestorePoint extends ProxyOnlyResource { /** * The name of the disk restore point created. */ @path @key("diskRestorePointName") @segment("diskRestorePoints") + @visibility("read") name: string; + + /** + * Properties of an incremental disk restore point + */ + @extension("x-ms-client-flatten", true) + properties?: DiskRestorePointProperties; } @armResourceOperations @@ -81,8 +91,7 @@ interface DiskRestorePoints { */ @path restorePointCollectionName: string; - }, - ArmLroLocationHeader + } >; /** @@ -102,8 +111,7 @@ interface DiskRestorePoints { */ @path restorePointCollectionName: string; - }, - ArmLroLocationHeader + } >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp index 20a8aa57a3..29e958e03d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp @@ -14,14 +14,24 @@ namespace Microsoft.Compute; /** * Specifies information about the Shared Image Gallery that you want to create or update. */ -model Gallery is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model Gallery extends Resource { /** * The name of the Shared Image Gallery. */ @path @key("galleryName") @segment("galleries") + @visibility("read") name: string; + + /** + * Describes the properties of a Shared Image Gallery. + */ + @extension("x-ms-client-flatten", true) + properties?: GalleryProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp index 3a104b525e..96ad81277c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp @@ -15,15 +15,25 @@ namespace Microsoft.Compute; /** * Specifies information about the gallery Application Definition that you want to create or update. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Gallery) -model GalleryApplication is TrackedResource { +@includeInapplicableMetadataInPayload(false) +model GalleryApplication extends Resource { /** * The name of the gallery Application Definition to be retrieved. */ @path @key("galleryApplicationName") @segment("applications") + @visibility("read") name: string; + + /** + * Describes the properties of a gallery Application Definition. + */ + @extension("x-ms-client-flatten", true) + properties?: GalleryApplicationProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp index 088c23e825..9ff8ff1727 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp @@ -15,16 +15,25 @@ namespace Microsoft.Compute; /** * Specifies information about the gallery Application Version that you want to create or update. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(GalleryApplication) -model GalleryApplicationVersion - is TrackedResource { +@includeInapplicableMetadataInPayload(false) +model GalleryApplicationVersion extends Resource { /** * The name of the gallery Application Version to be retrieved. */ @path @key("galleryApplicationVersionName") @segment("versions") + @visibility("read") name: string; + + /** + * Describes the properties of a gallery image version. + */ + @extension("x-ms-client-flatten", true) + properties?: GalleryApplicationVersionProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp index 377de5eb32..b2c497576f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp @@ -15,15 +15,25 @@ namespace Microsoft.Compute; /** * Specifies information about the gallery image definition that you want to create or update. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Gallery) -model GalleryImage is TrackedResource { +@includeInapplicableMetadataInPayload(false) +model GalleryImage extends Resource { /** * The name of the gallery image definition to be retrieved. */ @path @key("galleryImageName") @segment("images") + @visibility("read") name: string; + + /** + * Describes the properties of a gallery image definition. + */ + @extension("x-ms-client-flatten", true) + properties?: GalleryImageProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp index c1d035be2a..d7522f0a50 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp @@ -15,15 +15,25 @@ namespace Microsoft.Compute; /** * Specifies information about the gallery image version that you want to create or update. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(GalleryImage) -model GalleryImageVersion is TrackedResource { +@includeInapplicableMetadataInPayload(false) +model GalleryImageVersion extends Resource { /** * The name of the gallery image version to be retrieved. */ @path @key("galleryImageVersionName") @segment("versions") + @visibility("read") name: string; + + /** + * Describes the properties of a gallery image version. + */ + @extension("x-ms-client-flatten", true) + properties?: GalleryImageVersionProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp index 4a8e5e9d8e..a4cdd37c33 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp @@ -14,19 +14,29 @@ namespace Microsoft.Compute; /** * The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. */ -model Image is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model Image extends Resource { /** * The name of the image. */ @path @key("imageName") @segment("images") + @visibility("read") name: string; /** * The extended location of the Image. */ extendedLocation?: ExtendedLocation; + + /** + * Describes the properties of an Image. + */ + @extension("x-ms-client-flatten", true) + properties?: ImageProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp index 4cc3790bc8..c46e160188 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp @@ -14,15 +14,43 @@ namespace Microsoft.Compute; /** * Describes a cloud service OS family. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @locationResource -model OSFamily is ProxyResource { +@includeInapplicableMetadataInPayload(false) +model OSFamily { /** * Name of the OS family. */ @path @key("osFamilyName") @segment("cloudServiceOsFamilies") + @visibility("read") name: string; + + /** + * Resource Id. + */ + @visibility("read") + id?: string; + + /** + * Resource type. + */ + @visibility("read") + type?: string; + + /** + * Resource location. + */ + @visibility("read") + location?: string; + + /** + * OS family properties. + */ + @extension("x-ms-client-flatten", true) + properties?: OSFamilyProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp index ae8057eef6..24cca92c40 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp @@ -14,15 +14,43 @@ namespace Microsoft.Compute; /** * Describes a cloud service OS version. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @locationResource -model OSVersion is ProxyResource { +@includeInapplicableMetadataInPayload(false) +model OSVersion { /** * Name of the OS version. */ @path @key("osVersionName") @segment("cloudServiceOsVersions") + @visibility("read") name: string; + + /** + * Resource Id. + */ + @visibility("read") + id?: string; + + /** + * Resource type. + */ + @visibility("read") + type?: string; + + /** + * Resource location. + */ + @visibility("read") + location?: string; + + /** + * OS version properties. + */ + @extension("x-ms-client-flatten", true) + properties?: OSVersionProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp index 65566a99c8..8520dce449 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp @@ -15,16 +15,37 @@ namespace Microsoft.Compute; /** * The Private Endpoint Connection resource. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(DiskAccess) -model PrivateEndpointConnection - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +model PrivateEndpointConnection { /** * The name of the private endpoint connection. */ @path @key("privateEndpointConnectionName") @segment("privateEndpointConnections") + @visibility("read") name: string; + + /** + * private endpoint connection Id + */ + @visibility("read") + id?: string; + + /** + * private endpoint connection type + */ + @visibility("read") + type?: string; + + /** + * Resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PrivateEndpointConnectionProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp index 527127609e..3020d274ec 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp @@ -14,20 +14,29 @@ namespace Microsoft.Compute; /** * Specifies information about the proximity placement group. */ -model ProximityPlacementGroup - is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model ProximityPlacementGroup extends Resource { /** * The name of the proximity placement group. */ @path @key("proximityPlacementGroupName") @segment("proximityPlacementGroups") + @visibility("read") name: string; /** * Specifies the Availability Zone where virtual machine, virtual machine scale set or availability set associated with the proximity placement group can be created. */ zones?: string[]; + + /** + * Describes the properties of a Proximity Placement Group. + */ + @extension("x-ms-client-flatten", true) + properties?: ProximityPlacementGroupProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp index 5c2bf7504c..a00ed5621b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp @@ -15,15 +15,25 @@ namespace Microsoft.Compute; /** * Restore Point details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(RestorePointCollection) -model RestorePoint is ProxyResource { +@includeInapplicableMetadataInPayload(false) +model RestorePoint extends ProxyResource { /** * The name of the restore point. */ @path @key("restorePointName") @segment("restorePoints") + @visibility("read") name: string; + + /** + * The restore point properties. + */ + @extension("x-ms-client-flatten", true) + properties?: RestorePointProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp index 2d686c821b..af42336a17 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp @@ -14,15 +14,24 @@ namespace Microsoft.Compute; /** * Create or update Restore Point collection parameters. */ -model RestorePointCollection - is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model RestorePointCollection extends Resource { /** * The name of the restore point collection. */ @path @key("restorePointCollectionName") @segment("restorePointCollections") + @visibility("read") name: string; + + /** + * The restore point collection properties. + */ + @extension("x-ms-client-flatten", true) + properties?: RestorePointCollectionProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp index b79e880681..bd9ad1a232 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp @@ -15,17 +15,54 @@ namespace Microsoft.Compute; /** * Describes the cloud service role instance. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(CloudService) -model RoleInstance is ProxyResource { +@includeInapplicableMetadataInPayload(false) +model RoleInstance { /** * Name of the role instance. */ @path @key("roleInstanceName") @segment("roleInstances") + @visibility("read") name: string; - ...Azure.ResourceManager.ResourceSku; + /** + * Resource Id + */ + @visibility("read") + id?: string; + + /** + * Resource Type. + */ + @visibility("read") + type?: string; + + /** + * Resource Location. + */ + @visibility("read") + location?: string; + + /** + * Resource tags. + */ + @visibility("read") + tags?: Record; + + /** + * The role instance SKU. + */ + sku?: InstanceSku; + + /** + * Role instance properties. + */ + @extension("x-ms-client-flatten", true) + properties?: RoleInstanceProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp index 8f1505d238..6609fab595 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp @@ -15,13 +15,22 @@ namespace Microsoft.Compute; /** * The status of the latest virtual machine scale set rolling upgrade. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("latest") @parentResource(VirtualMachineScaleSet) -model RollingUpgradeStatusInfo - is TrackedResource { +@includeInapplicableMetadataInPayload(false) +model RollingUpgradeStatusInfo extends Resource { @key("rollingUpgrade") @segment("rollingUpgrades") + @visibility("read") name: string; + + /** + * The status of the latest virtual machine scale set rolling upgrade. + */ + @extension("x-ms-client-flatten", true) + properties?: RollingUpgradeStatusInfoProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp index c09315ae89..fac3c71774 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp @@ -15,15 +15,23 @@ namespace Microsoft.Compute; /** * Specifies information about the Shared Gallery that you want to create or update. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @locationResource -model SharedGallery is ProxyResource<{}> { +@includeInapplicableMetadataInPayload(false) +model SharedGallery extends PirSharedGalleryResource { /** * The unique name of the Shared Gallery. */ @path @key("galleryUniqueName") @segment("sharedGalleries") + @visibility("read") name: string; + + @extension("x-ms-client-flatten", true) + @visibility("read,create") + properties?: {}; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp index a01a4f0d40..ca0e7ee317 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp @@ -15,15 +15,25 @@ namespace Microsoft.Compute; /** * Specifies information about the gallery image definition that you want to create or update. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(SharedGallery) -model SharedGalleryImage is ProxyResource { +@includeInapplicableMetadataInPayload(false) +model SharedGalleryImage extends PirSharedGalleryResource { /** * The name of the Shared Gallery Image Definition from which the Image Versions are to be listed. */ @path @key("galleryImageName") @segment("images") + @visibility("read") name: string; + + /** + * Describes the properties of a gallery image definition. + */ + @extension("x-ms-client-flatten", true) + properties?: SharedGalleryImageProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp index dd9984814a..2697efa070 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp @@ -15,16 +15,25 @@ namespace Microsoft.Compute; /** * Specifies information about the gallery image version that you want to create or update. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(SharedGalleryImage) -model SharedGalleryImageVersion - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +model SharedGalleryImageVersion extends PirSharedGalleryResource { /** * The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. */ @path @key("galleryImageVersionName") @segment("versions") + @visibility("read") name: string; + + /** + * Describes the properties of a gallery image version. + */ + @extension("x-ms-client-flatten", true) + properties?: SharedGalleryImageVersionProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp index 6955468869..4d2f7c9f73 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp @@ -14,22 +14,40 @@ namespace Microsoft.Compute; /** * Snapshot resource. */ -model Snapshot is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model Snapshot extends Resource { /** * The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters. */ @path @key("snapshotName") @segment("snapshots") + @visibility("read") name: string; + /** + * Unused. Always Null. + */ + @visibility("read") + managedBy?: string; + + /** + * The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot + */ + sku?: SnapshotSku; + /** * The extended location where the snapshot will be created. Extended location cannot be changed. */ extendedLocation?: ExtendedLocation; - ...Azure.ResourceManager.ResourceSku; - ...Azure.ResourceManager.ManagedBy; + /** + * Snapshot resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: SnapshotProperties; } @armResourceOperations @@ -70,24 +88,12 @@ interface Snapshots { /** * Grants access to a snapshot. */ - grantAccess is ArmResourceActionAsync< - Snapshot, - GrantAccessData, - AccessUri, - BaseParameters, - ArmLroLocationHeader - >; + grantAccess is ArmResourceActionAsync; /** * Revokes access to a snapshot. */ - revokeAccess is ArmResourceActionAsync< - Snapshot, - void, - void, - BaseParameters, - ArmLroLocationHeader - >; + revokeAccess is ArmResourceActionAsync; } @@projectedName(Snapshots.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp index 0e24a35131..17d75b3219 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp @@ -14,14 +14,24 @@ namespace Microsoft.Compute; /** * Specifies information about the SSH public key. */ -model SshPublicKeyResource is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model SshPublicKeyResource extends Resource { /** * The name of the SSH public key. */ @path @key("sshPublicKeyName") @segment("sshPublicKeys") + @visibility("read") name: string; + + /** + * Properties of the SSH public key. + */ + @extension("x-ms-client-flatten", true) + properties?: SshPublicKeyResourceProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp index cd713592a6..87ce75fa0e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp @@ -14,21 +14,35 @@ namespace Microsoft.Compute; /** * Describes a Virtual Machine. */ -model VirtualMachine is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model VirtualMachine extends Resource { /** * The name of the virtual machine. */ @path @key("vmName") @segment("virtualMachines") + @visibility("read") name: string; + /** + * Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. + */ + plan?: Plan; + /** * The virtual machine child extension resources. */ @visibility("read") resources?: VirtualMachineExtension[]; + /** + * The identity of the virtual machine, if configured. + */ + identity?: VirtualMachineIdentity; + /** * The virtual machine zones. */ @@ -39,8 +53,11 @@ model VirtualMachine is TrackedResource { */ extendedLocation?: ExtendedLocation; - ...Azure.ResourceManager.ManagedServiceIdentity; - ...Azure.ResourceManager.ResourcePlan; + /** + * Describes the properties of a Virtual Machine. + */ + @extension("x-ms-client-flatten", true) + properties?: VirtualMachineProperties; } @armResourceOperations @@ -141,9 +158,7 @@ interface VirtualMachines { capture is ArmResourceActionAsync< VirtualMachine, VirtualMachineCaptureParameters, - VirtualMachineCaptureResult, - BaseParameters, - ArmLroLocationHeader + VirtualMachineCaptureResult >; /** @@ -255,9 +270,7 @@ interface VirtualMachines { assessPatches is ArmResourceActionAsync< VirtualMachine, void, - VirtualMachineAssessPatchesResult, - BaseParameters, - ArmLroLocationHeader + VirtualMachineAssessPatchesResult >; /** @@ -266,9 +279,7 @@ interface VirtualMachines { installPatches is ArmResourceActionAsync< VirtualMachine, VirtualMachineInstallPatchesParameters, - VirtualMachineInstallPatchesResult, - BaseParameters, - ArmLroLocationHeader + VirtualMachineInstallPatchesResult >; /** @@ -277,9 +288,7 @@ interface VirtualMachines { runCommand is ArmResourceActionAsync< VirtualMachine, RunCommandInput, - RunCommandResult, - BaseParameters, - ArmLroLocationHeader + RunCommandResult >; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp index 7e76e7d45c..acb27a3404 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp @@ -15,16 +15,25 @@ namespace Microsoft.Compute; /** * Describes a Virtual Machine Extension. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(VirtualMachine) -model VirtualMachineExtension - is TrackedResource { +@includeInapplicableMetadataInPayload(false) +model VirtualMachineExtension extends ResourceWithOptionalLocation { /** * The name of the virtual machine extension. */ @path @key("vmExtensionName") @segment("extensions") + @visibility("read") name: string; + + /** + * Describes the properties of a Virtual Machine Extension. + */ + @extension("x-ms-client-flatten", true) + properties?: VirtualMachineExtensionProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp index 98051e915e..77cf4dd86c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp @@ -14,13 +14,22 @@ namespace Microsoft.Compute; /** * Describes a Virtual Machine Extension Image. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @locationResource -model VirtualMachineExtensionImage - is TrackedResource { +@includeInapplicableMetadataInPayload(false) +model VirtualMachineExtensionImage extends Resource { @path @key("version") @segment("versions") + @visibility("read") name: string; + + /** + * Describes the properties of a Virtual Machine Extension Image. + */ + @extension("x-ms-client-flatten", true) + properties?: VirtualMachineExtensionImageProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp index a0a4757fc0..5281bd7008 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp @@ -15,16 +15,25 @@ namespace Microsoft.Compute; /** * Describes a Virtual Machine run command. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(VirtualMachine) -model VirtualMachineRunCommand - is TrackedResource { +@includeInapplicableMetadataInPayload(false) +model VirtualMachineRunCommand extends Resource { /** * The name of the virtual machine run command. */ @path @key("runCommandName") @segment("runCommands") + @visibility("read") name: string; + + /** + * Describes the properties of a Virtual Machine run command. + */ + @extension("x-ms-client-flatten", true) + properties?: VirtualMachineRunCommandProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp index 11c9877d99..481e3d1f3d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp @@ -14,16 +14,34 @@ namespace Microsoft.Compute; /** * Describes a Virtual Machine Scale Set. */ -model VirtualMachineScaleSet - is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model VirtualMachineScaleSet extends Resource { /** * The name of the VM scale set. */ @path @key("vmScaleSetName") @segment("virtualMachineScaleSets") + @visibility("read") name: string; + /** + * The virtual machine scale set sku. + */ + sku?: Sku; + + /** + * Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. + */ + plan?: Plan; + + /** + * The identity of the virtual machine scale set, if configured. + */ + identity?: VirtualMachineScaleSetIdentity; + /** * The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set */ @@ -34,9 +52,11 @@ model VirtualMachineScaleSet */ extendedLocation?: ExtendedLocation; - ...Azure.ResourceManager.ManagedServiceIdentity; - ...Azure.ResourceManager.ResourceSku; - ...Azure.ResourceManager.ResourcePlan; + /** + * Describes the properties of a Virtual Machine Scale Set. + */ + @extension("x-ms-client-flatten", true) + properties?: VirtualMachineScaleSetProperties; } @armResourceOperations @@ -272,8 +292,7 @@ interface VirtualMachineScaleSets { */ @path vmScaleSetName: string; - }, - ArmLroLocationHeader + } >; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp index 49eacbc1a8..b7c84ac0cc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp @@ -15,16 +15,31 @@ namespace Microsoft.Compute; /** * Describes a Virtual Machine Scale Set Extension. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(VirtualMachineScaleSet) -model VirtualMachineScaleSetExtension - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +model VirtualMachineScaleSetExtension extends SubResourceReadOnly { /** * The name of the VM scale set extension. */ @path @key("vmssExtensionName") @segment("extensions") + @visibility("read") name: string; + + /** + * Resource type + */ + @visibility("read") + type?: string; + + /** + * Describes the properties of a Virtual Machine Scale Set Extension. + */ + @extension("x-ms-client-flatten", true) + properties?: VirtualMachineScaleSetExtensionProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp index 9354cf5bfb..ae943c1f5f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp @@ -15,15 +15,18 @@ namespace Microsoft.Compute; /** * Describes a virtual machine scale set virtual machine. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(VirtualMachineScaleSet) -model VirtualMachineScaleSetVM - is TrackedResource { +@includeInapplicableMetadataInPayload(false) +model VirtualMachineScaleSetVM extends Resource { /** * The instance ID of the virtual machine. */ @path @key("instanceId") @segment("virtualMachines") + @visibility("read") name: string; /** @@ -32,6 +35,17 @@ model VirtualMachineScaleSetVM @visibility("read") instanceId?: string; + /** + * The virtual machine SKU. + */ + @visibility("read") + sku?: Sku; + + /** + * Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. + */ + plan?: Plan; + /** * The virtual machine child extension resources. */ @@ -44,9 +58,16 @@ model VirtualMachineScaleSetVM @visibility("read") zones?: string[]; - ...Azure.ResourceManager.ManagedServiceIdentity; - ...Azure.ResourceManager.ResourceSku; - ...Azure.ResourceManager.ResourcePlan; + /** + * The identity of the virtual machine, if configured. + */ + identity?: VirtualMachineIdentity; + + /** + * Describes the properties of a virtual machine scale set virtual machine. + */ + @extension("x-ms-client-flatten", true) + properties?: VirtualMachineScaleSetVMProperties; } @armResourceOperations @@ -375,8 +396,7 @@ interface VirtualMachineScaleSetVMS { */ @path vmScaleSetName: string; - }, - ArmLroLocationHeader + } >; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp index c9af7a012b..272a8b3e43 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp @@ -15,16 +15,37 @@ namespace Microsoft.Compute; /** * Describes a VMSS VM Extension. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(VirtualMachineScaleSetVM) -model VirtualMachineScaleSetVMExtension - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +model VirtualMachineScaleSetVMExtension extends SubResourceReadOnly { /** * The name of the virtual machine extension. */ @path @key("vmExtensionName") @segment("extensions") + @visibility("read") name: string; + + /** + * Resource type + */ + @visibility("read") + type?: string; + + /** + * The location of the extension. + */ + @visibility("read", "create") + location?: string; + + /** + * Describes the properties of a Virtual Machine Extension. + */ + @extension("x-ms-client-flatten", true) + properties?: VirtualMachineExtensionProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp index ef1fc5c320..a34c2d4697 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp @@ -1,11 +1,13 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; +import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; +using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -1205,10 +1207,10 @@ enum SharedGalleryHostCaching { } /** -* Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. -Possible Values are

    **Auto**

    **Manual**

    **Simultaneous**

    -If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. -*/ + * Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. + * Possible Values are

    **Auto**

    **Manual**

    **Simultaneous**

    + * If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. + */ enum CloudServiceUpgradeMode { Auto, Manual, @@ -1216,10 +1218,10 @@ enum CloudServiceUpgradeMode { } /** -* Slot type for the cloud service. -Possible values are

    **Production**

    **Staging**

    -If not specified, the default value is Production. -*/ + * Slot type for the cloud service. + * Possible values are

    **Production**

    **Staging**

    + * If not specified, the default value is Production. + */ enum CloudServiceSlotType { Production, Staging, @@ -1465,6 +1467,7 @@ model ComputeOperationValue { /** * Describes the properties of a Compute Operation Value Display. */ + @extension("x-ms-client-flatten", true) display?: ComputeOperationValueDisplay; } @@ -2607,6 +2610,7 @@ model VirtualMachineScaleSetNetworkConfiguration { /** * Describes a virtual machine scale set network profile's IP configuration. */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetNetworkConfigurationProperties; } @@ -2692,6 +2696,7 @@ model VirtualMachineScaleSetIPConfiguration { /** * Describes a virtual machine scale set network profile's IP configuration properties. */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetIPConfigurationProperties; } @@ -2752,6 +2757,7 @@ model VirtualMachineScaleSetPublicIPAddressConfiguration { /** * Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetPublicIPAddressConfigurationProperties; /** @@ -3487,6 +3493,7 @@ model VirtualMachineScaleSetUpdate extends UpdateResource { /** * Describes the properties of a Virtual Machine Scale Set. */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetUpdateProperties; /** @@ -3734,6 +3741,7 @@ model VirtualMachineScaleSetUpdateNetworkConfiguration { /** * Describes a virtual machine scale set updatable network profile's IP configuration.Use this object for updating network profile's IP Configuration. */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetUpdateNetworkConfigurationProperties; } @@ -3809,6 +3817,7 @@ model VirtualMachineScaleSetUpdateIPConfiguration { /** * Describes a virtual machine scale set network profile's IP configuration properties. */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetUpdateIPConfigurationProperties; } @@ -3869,6 +3878,7 @@ model VirtualMachineScaleSetUpdatePublicIPAddressConfiguration { /** * Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties; } @@ -4036,6 +4046,7 @@ model VirtualMachineScaleSetExtensionUpdate extends SubResourceReadOnly { /** * Describes the properties of a Virtual Machine Scale Set Extension. */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetExtensionProperties; } @@ -4414,6 +4425,7 @@ model VirtualMachineScaleSetVMExtensionUpdate extends SubResourceReadOnly { /** * Describes the properties of a Virtual Machine Extension. */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachineExtensionUpdateProperties; } @@ -5114,6 +5126,7 @@ model NetworkInterfaceReference extends SubResource { /** * Describes a network interface reference properties. */ + @extension("x-ms-client-flatten", true) properties?: NetworkInterfaceReferenceProperties; } @@ -5144,6 +5157,7 @@ model VirtualMachineNetworkInterfaceConfiguration { /** * Describes a virtual machine network profile's IP configuration. */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachineNetworkInterfaceConfigurationProperties; } @@ -5231,6 +5245,7 @@ model VirtualMachineNetworkInterfaceIPConfiguration { /** * Describes a virtual machine network interface IP configuration properties. */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachineNetworkInterfaceIPConfigurationProperties; } @@ -5286,6 +5301,7 @@ model VirtualMachinePublicIPAddressConfiguration { /** * Describes a virtual machines IP Configuration's PublicIPAddress configuration */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachinePublicIPAddressConfigurationProperties; /** @@ -5440,6 +5456,7 @@ model VirtualMachineExtensionUpdate extends UpdateResource { /** * Describes the properties of a Virtual Machine Extension. */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachineExtensionUpdateProperties; } @@ -5881,6 +5898,7 @@ model VirtualMachineUpdate extends UpdateResource { /** * Describes the properties of a Virtual Machine. */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachineProperties; /** @@ -6222,6 +6240,7 @@ model VirtualMachineImage extends VirtualMachineImageResource { /** * Describes the properties of a Virtual Machine Image. */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachineImageProperties; } @@ -6492,6 +6511,7 @@ model AvailabilitySetUpdate extends UpdateResource { /** * The instance view of a resource. */ + @extension("x-ms-client-flatten", true) properties?: AvailabilitySetProperties; /** @@ -6674,6 +6694,7 @@ model DedicatedHostGroupUpdate extends UpdateResource { /** * Dedicated Host Group Properties. */ + @extension("x-ms-client-flatten", true) properties?: DedicatedHostGroupProperties; /** @@ -6747,6 +6768,7 @@ model DedicatedHostUpdate extends UpdateResource { /** * Properties of the dedicated host. */ + @extension("x-ms-client-flatten", true) properties?: DedicatedHostProperties; /** @@ -6784,6 +6806,7 @@ model SshPublicKeyUpdateResource extends UpdateResource { /** * Properties of the SSH public key. */ + @extension("x-ms-client-flatten", true) properties?: SshPublicKeyResourceProperties; } @@ -6925,6 +6948,7 @@ model ImageUpdate extends UpdateResource { /** * Describes the properties of an Image. */ + @extension("x-ms-client-flatten", true) properties?: ImageProperties; } @@ -7266,6 +7290,29 @@ model DiskRestorePointReplicationStatus { completionPercent?: int32; } +/** + * The resource model definition for an Azure Resource Manager proxy resource. It will not have tags and a location + */ +model ProxyResource { + /** + * Resource Id + */ + @visibility("read") + id?: string; + + /** + * Resource name + */ + @visibility("read") + name?: string; + + /** + * Resource type + */ + @visibility("read") + type?: string; +} + /** * Update Restore Point collection parameters. */ @@ -7273,6 +7320,7 @@ model RestorePointCollectionUpdate extends UpdateResource { /** * The restore point collection properties. */ + @extension("x-ms-client-flatten", true) properties?: RestorePointCollectionProperties; } @@ -7358,6 +7406,7 @@ model CapacityReservationGroupUpdate extends UpdateResource { /** * capacity reservation group Properties. */ + @extension("x-ms-client-flatten", true) properties?: CapacityReservationGroupProperties; } @@ -7417,6 +7466,7 @@ model CapacityReservationUpdate extends UpdateResource { /** * Properties of the Capacity reservation. */ + @extension("x-ms-client-flatten", true) properties?: CapacityReservationProperties; /** @@ -7793,6 +7843,7 @@ model VirtualMachineRunCommandUpdate extends UpdateResource { /** * Describes the properties of a Virtual Machine run command. */ + @extension("x-ms-client-flatten", true) properties?: VirtualMachineRunCommandProperties; } @@ -8258,6 +8309,7 @@ model DiskUpdate { /** * Disk resource update properties. */ + @extension("x-ms-client-flatten", true) properties?: DiskUpdateProperties; /** @@ -8522,6 +8574,7 @@ model PrivateLinkResource { /** * Resource properties. */ + @extension("x-ms-client-flatten", true) properties?: PrivateLinkResourceProperties; /** @@ -8661,6 +8714,7 @@ model DiskEncryptionSetUpdate { /** * disk encryption set resource update properties. */ + @extension("x-ms-client-flatten", true) properties?: DiskEncryptionSetUpdateProperties; /** @@ -8991,6 +9045,7 @@ model SnapshotUpdate { /** * Snapshot resource update properties. */ + @extension("x-ms-client-flatten", true) properties?: SnapshotUpdateProperties; /** @@ -9064,6 +9119,89 @@ model SnapshotUpdateProperties { */ model ResourceSkusResult is Azure.Core.Page; +/** + * Describes an available Compute SKU. + */ +model ResourceSku { + /** + * The type of resource the SKU applies to. + */ + @visibility("read") + resourceType?: string; + + /** + * The name of SKU. + */ + @visibility("read") + name?: string; + + /** + * Specifies the tier of virtual machines in a scale set.

    Possible Values:

    **Standard**

    **Basic** + */ + @visibility("read") + tier?: string; + + /** + * The Size of the SKU. + */ + @visibility("read") + size?: string; + + /** + * The Family of this particular SKU. + */ + @visibility("read") + family?: string; + + /** + * The Kind of resources that are supported in this SKU. + */ + @visibility("read") + kind?: string; + + /** + * Specifies the number of virtual machines in the scale set. + */ + @visibility("read") + capacity?: ResourceSkuCapacity; + + /** + * The set of locations that the SKU is available. + */ + @visibility("read") + locations?: string[]; + + /** + * A list of locations and availability zones in those locations where the SKU is available. + */ + @visibility("read") + locationInfo?: ResourceSkuLocationInfo[]; + + /** + * The api versions that support this SKU. + */ + @visibility("read") + apiVersions?: string[]; + + /** + * Metadata for retrieving price info. + */ + @visibility("read") + costs?: ResourceSkuCosts[]; + + /** + * A name value pair to describe the capability. + */ + @visibility("read") + capabilities?: ResourceSkuCapabilities[]; + + /** + * The restrictions because of which SKU cannot be used. This is empty if there are no restrictions. + */ + @visibility("read") + restrictions?: ResourceSkuRestrictions[]; +} + /** * Describes scaling information of a SKU. */ @@ -9406,6 +9544,7 @@ model GalleryUpdate extends UpdateResourceDefinition { /** * Describes the properties of a Shared Image Gallery. */ + @extension("x-ms-client-flatten", true) properties?: GalleryProperties; } @@ -9621,6 +9760,7 @@ model GalleryImageUpdate extends UpdateResourceDefinition { /** * Describes the properties of a gallery image definition. */ + @extension("x-ms-client-flatten", true) properties?: GalleryImageProperties; } @@ -10026,6 +10166,7 @@ model GalleryImageVersionUpdate extends UpdateResourceDefinition { /** * Describes the properties of a gallery image version. */ + @extension("x-ms-client-flatten", true) properties?: GalleryImageVersionProperties; } @@ -10132,6 +10273,7 @@ model GalleryApplicationUpdate extends UpdateResourceDefinition { /** * Describes the properties of a gallery Application Definition. */ + @extension("x-ms-client-flatten", true) properties?: GalleryApplicationProperties; } @@ -10255,6 +10397,7 @@ model GalleryApplicationVersionUpdate extends UpdateResourceDefinition { /** * Describes the properties of a gallery image version. */ + @extension("x-ms-client-flatten", true) properties?: GalleryApplicationVersionProperties; } @@ -10280,6 +10423,7 @@ model PirSharedGalleryResource extends PirResource { /** * The identifier information of shared gallery. */ + @extension("x-ms-client-flatten", true) identifier?: SharedGalleryIdentifier; } @@ -10474,6 +10618,7 @@ model PirCommunityGalleryResource { /** * The identifier information of community gallery. */ + @extension("x-ms-client-flatten", true) identifier?: CommunityGalleryIdentifier; } @@ -10740,9 +10885,9 @@ model CloudServiceRoleProperties { */ model CloudServiceProperties { /** -* Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. -This is a write-only property and is not returned in GET calls. -*/ + * Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. + * This is a write-only property and is not returned in GET calls. + */ packageUrl?: string; /** @@ -10751,28 +10896,28 @@ This is a write-only property and is not returned in GET calls. configuration?: string; /** -* Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. -This is a write-only property and is not returned in GET calls. -*/ + * Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. + * This is a write-only property and is not returned in GET calls. + */ configurationUrl?: string; /** -* (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`. -If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff. -*/ + * (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`. + * If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff. + */ startCloudService?: boolean; /** -* (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively. -The default value is `false`. -*/ + * (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively. + * The default value is `false`. + */ allowModelOverride?: boolean; /** -* Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. -Possible Values are

    **Auto**

    **Manual**

    **Simultaneous**

    -If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. -*/ + * Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. + * Possible Values are

    **Auto**

    **Manual**

    **Simultaneous**

    + * If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. + */ upgradeMode?: CloudServiceUpgradeMode; /** @@ -10878,10 +11023,10 @@ model CloudServiceNetworkProfile { loadBalancerConfigurations?: LoadBalancerConfiguration[]; /** -* Slot type for the cloud service. -Possible values are

    **Production**

    **Staging**

    -If not specified, the default value is Production. -*/ + * Slot type for the cloud service. + * Possible values are

    **Production**

    **Staging**

    + * If not specified, the default value is Production. + */ slotType?: CloudServiceSlotType; /** @@ -10907,6 +11052,7 @@ model LoadBalancerConfiguration { /** * Properties of the load balancer configuration. */ + @extension("x-ms-client-flatten", true) properties: LoadBalancerConfigurationProperties; } @@ -10932,6 +11078,7 @@ model LoadBalancerFrontendIpConfiguration { /** * Properties of load balancer frontend ip configuration. */ + @extension("x-ms-client-flatten", true) properties: LoadBalancerFrontendIpConfigurationProperties; } @@ -10977,6 +11124,7 @@ model Extension { /** * Extension Properties. */ + @extension("x-ms-client-flatten", true) properties?: CloudServiceExtensionProperties; } @@ -11020,12 +11168,12 @@ model CloudServiceExtensionProperties { protectedSettingsFromKeyVault?: CloudServiceVaultAndSecretReference; /** -* Tag to force apply the provided public and protected settings. -Changing the tag value allows for re-running the extension without changing any of the public or protected settings. -If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler. -If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and -it is up to handler implementation whether to re-run it or not -*/ + * Tag to force apply the provided public and protected settings. + * Changing the tag value allows for re-running the extension without changing any of the public or protected settings. + * If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler. + * If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and + * it is up to handler implementation whether to re-run it or not + */ forceUpdateTag?: string; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp index 81ad8acebf..e3219eaee3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp @@ -15,20 +15,42 @@ namespace Azure.ResourceManager.Dns; /** * Describes a DNS record set (a collection of DNS records with the same name and type). */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(DnsZone) -model DnsRecord is ProxyResource { +@includeInapplicableMetadataInPayload(false) +model DnsRecord { /** * The name of the record set, relative to the name of the zone. */ @path @key("relativeRecordSetName") @segment("A") + @visibility("read") name: string; + /** + * The ID of the record set. + */ + @visibility("read") + id?: string; + + /** + * The type of the record set. + */ + @visibility("read") + type?: string; + /** * The etag of the record set. */ etag?: string; + + /** + * The properties of the record set. + */ + @extension("x-ms-client-flatten", true) + properties?: RecordSetProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp index d63dfdbc06..f554d884eb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp @@ -14,19 +14,29 @@ namespace Azure.ResourceManager.Dns; /** * Describes a DNS zone. */ -model DnsZone is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model DnsZone extends Resource { /** * The name of the DNS zone (without a terminating dot). */ @path @key("zoneName") @segment("dnsZones") + @visibility("read") name: string; /** * The etag of the zone. */ etag?: string; + + /** + * The properties of the zone. + */ + @extension("x-ms-client-flatten", true) + properties?: ZoneProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp index 7214c6bb61..f56e26c313 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp @@ -1,11 +1,13 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; +import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; +using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -439,6 +441,7 @@ model DnsResourceReferenceRequest { /** * The properties of the Resource Reference Request. */ + @extension("x-ms-client-flatten", true) properties?: DnsResourceReferenceRequestProperties; } @@ -459,6 +462,7 @@ model DnsResourceReferenceResult { /** * The result of dns resource reference request. Returns a list of dns resource references for each of the azure resource in the request. */ + @extension("x-ms-client-flatten", true) properties?: DnsResourceReferenceResultProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp index 31e48d0867..270af3956f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp @@ -13,19 +13,34 @@ using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(BatchEndpointTrackedResource) -model BatchDeploymentTrackedResource is TrackedResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(BatchDeployment) +model BatchDeploymentTrackedResource extends TrackedResourceBase { /** * The identifier for the Batch deployments. */ @path @key("deploymentName") @segment("deployments") + @visibility("read") name: string; + /** + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + */ + kind?: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: BatchDeployment; + ...Azure.ResourceManager.ManagedServiceIdentity; ...Azure.ResourceManager.ResourceSku; - ...Azure.ResourceManager.ResourceKind; } @armResourceOperations @@ -60,11 +75,7 @@ interface BatchDeploymentTrackedResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("BatchDeployments_Delete") - delete is ArmResourceDeleteAsync< - BatchDeploymentTrackedResource, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * Lists Batch inference deployments in the workspace. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp index 7af6f0a97c..74f3eebf3d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp @@ -13,19 +13,34 @@ using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Workspace) -model BatchEndpointTrackedResource is TrackedResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(BatchEndpoint) +model BatchEndpointTrackedResource extends TrackedResourceBase { /** * Name for the Batch Endpoint. */ @path @key("endpointName") @segment("batchEndpoints") + @visibility("read") name: string; + /** + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + */ + kind?: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: BatchEndpoint; + ...Azure.ResourceManager.ManagedServiceIdentity; ...Azure.ResourceManager.ResourceSku; - ...Azure.ResourceManager.ResourceKind; } @armResourceOperations @@ -60,11 +75,7 @@ interface BatchEndpointTrackedResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("BatchEndpoints_Delete") - delete is ArmResourceDeleteAsync< - BatchEndpointTrackedResource, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * Lists Batch inference endpoint in the workspace. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp index d0c546bc33..6a40a83ecf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Registry) -model CodeContainerResource is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(CodeContainer) +model CodeContainerResource extends ProxyResourceBase { /** * Container name. */ @@ -24,7 +28,14 @@ model CodeContainerResource is ProxyResource { @path @key("codeName") @segment("codes") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: CodeContainer; } @armResourceOperations @@ -48,11 +59,7 @@ interface CodeContainerResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("RegistryCodeContainers_Delete") - delete is ArmResourceDeleteAsync< - CodeContainerResource, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List containers. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp index 735b38dd67..406340dd74 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp @@ -15,15 +15,26 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(CodeContainerResource) -model CodeVersionResource is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(CodeVersion) +model CodeVersionResource extends ProxyResourceBase { /** * Version identifier. */ @path @key("version") @segment("versions") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: CodeVersion; } @armResourceOperations @@ -47,11 +58,7 @@ interface CodeVersionResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("RegistryCodeVersions_Delete") - delete is ArmResourceDeleteAsync< - CodeVersionResource, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List versions. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp index 1c71ccb37b..8b0f1e311a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Registry) -model ComponentContainerResource is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ComponentContainer) +model ComponentContainerResource extends ProxyResourceBase { /** * Container name. */ @@ -24,7 +28,14 @@ model ComponentContainerResource is ProxyResource { @path @key("componentName") @segment("components") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: ComponentContainer; } @armResourceOperations @@ -48,11 +59,7 @@ interface ComponentContainerResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("RegistryComponentContainers_Delete") - delete is ArmResourceDeleteAsync< - ComponentContainerResource, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List containers. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp index 0f48a104fd..cd13182de5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp @@ -15,15 +15,26 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ComponentContainerResource) -model ComponentVersionResource is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ComponentVersion) +model ComponentVersionResource extends ProxyResourceBase { /** * Version identifier. */ @path @key("version") @segment("versions") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: ComponentVersion; } @armResourceOperations @@ -47,11 +58,7 @@ interface ComponentVersionResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("RegistryComponentVersions_Delete") - delete is ArmResourceDeleteAsync< - ComponentVersionResource, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List versions. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp index b56277fc11..97b6caf98f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp @@ -26,6 +26,7 @@ model ComputeResource is TrackedResource<{}> { @path @key("computeName") @segment("computes") +@visibility("read") "name": string; ...Azure.ResourceManager.ManagedServiceIdentity @@ -65,7 +66,7 @@ update is ArmCustomPatchAsync @operationId("Compute_Delete") #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" delete is ArmResourceDeleteAsync, + ...BaseParameters; /** * Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. */ @@ -79,7 +80,7 @@ delete is ArmResourceDeleteAsync, + ...BaseParameters; /** * Continuation token for pagination. */ @@ -140,15 +141,15 @@ updateIdleShutdownSetting is ArmResourceActionSync { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(DataContainer) +model DataContainerResource extends ProxyResourceBase { /** * Container name. */ @path @key("name") @segment("data") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: DataContainer; } @armResourceOperations @@ -47,11 +58,7 @@ interface DataContainerResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("RegistryDataContainers_Delete") - delete is ArmResourceDeleteAsync< - DataContainerResource, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List Data containers. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp index 1bcd590148..3be87cb025 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp @@ -15,15 +15,26 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(DataContainerResource) -model DataVersionBaseResource is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(DataVersionBase) +model DataVersionBaseResource extends ProxyResourceBase { /** * Version identifier. */ @path @key("version") @segment("versions") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: DataVersionBase; } @armResourceOperations @@ -47,11 +58,7 @@ interface DataVersionBaseResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("RegistryDataVersions_Delete") - delete is ArmResourceDeleteAsync< - DataVersionBaseResource, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List data versions in the data container @@ -70,9 +77,9 @@ interface DataVersionBaseResources { $orderBy?: string; /** -* Top count of results, top count cannot be greater than the page size. - If topCount > page size, results with be default page size count will be returned -*/ + * Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned + */ @query("$top") $top?: int32; diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp index ceb9473059..e08a0a8415 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp @@ -15,15 +15,26 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Workspace) -model DatastoreResource is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(Datastore) +model DatastoreResource extends ProxyResourceBase { /** * Datastore name. */ @path @key("name") @segment("datastores") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: Datastore; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp index 13a78534d8..656ea14f8d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Registry) -model EnvironmentContainerResource is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(EnvironmentContainer) +model EnvironmentContainerResource extends ProxyResourceBase { /** * Container name. This is case-sensitive. */ @@ -24,7 +28,14 @@ model EnvironmentContainerResource is ProxyResource { @path @key("environmentName") @segment("environments") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: EnvironmentContainer; } @armResourceOperations @@ -48,11 +59,7 @@ interface EnvironmentContainerResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("RegistryEnvironmentContainers_Delete") - delete is ArmResourceDeleteAsync< - EnvironmentContainerResource, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List environment containers. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp index 990e52e015..4833f3898c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp @@ -15,15 +15,26 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(EnvironmentContainerResource) -model EnvironmentVersionResource is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(EnvironmentVersion) +model EnvironmentVersionResource extends ProxyResourceBase { /** * Version identifier. This is case-sensitive. */ @path @key("version") @segment("versions") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: EnvironmentVersion; } @armResourceOperations @@ -47,11 +58,7 @@ interface EnvironmentVersionResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("RegistryEnvironmentVersions_Delete") - delete is ArmResourceDeleteAsync< - EnvironmentVersionResource, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List versions. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp index d7f719dea3..d7ee11e46c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(FeaturesetVersion) -model Feature is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(FeatureProperties) +model Feature extends ProxyResourceBase { /** * Feature Name. This is case-sensitive. */ @@ -24,7 +28,14 @@ model Feature is ProxyResource { @path @key("featureName") @segment("features") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: FeatureProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp index 62f2c0d3a5..04ecaead48 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp @@ -15,15 +15,28 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Workspace) -model FeaturesetContainer is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + FeaturesetContainerProperties +) +model FeaturesetContainer extends ProxyResourceBase { /** * Container name. This is case-sensitive. */ @path @key("name") @segment("featuresets") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: FeaturesetContainerProperties; } @armResourceOperations @@ -41,11 +54,7 @@ interface FeaturesetContainers { /** * Delete container. */ - delete is ArmResourceDeleteAsync< - FeaturesetContainer, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List featurestore entity containers. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp index 66b344ba09..781c924c03 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp @@ -15,15 +15,26 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(FeaturesetContainer) -model FeaturesetVersion is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(FeaturesetVersionProperties) +model FeaturesetVersion extends ProxyResourceBase { /** * Version identifier. This is case-sensitive. */ @path @key("version") @segment("versions") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: FeaturesetVersionProperties; } @armResourceOperations @@ -41,11 +52,7 @@ interface FeaturesetVersions { /** * Delete version. */ - delete is ArmResourceDeleteAsync< - FeaturesetVersion, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List versions. @@ -113,9 +120,7 @@ interface FeaturesetVersions { backfill is ArmResourceActionAsync< FeaturesetVersion, FeaturesetVersionBackfillRequest, - FeaturesetJob, - BaseParameters, - ArmLroLocationHeader + FeaturesetJob >; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp index 672143b041..5d5c2b8bfa 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp @@ -15,16 +15,28 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Workspace) -model FeaturestoreEntityContainer - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + FeaturestoreEntityContainerProperties +) +model FeaturestoreEntityContainer extends ProxyResourceBase { /** * Container name. This is case-sensitive. */ @path @key("name") @segment("featurestoreEntities") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: FeaturestoreEntityContainerProperties; } @armResourceOperations @@ -42,11 +54,7 @@ interface FeaturestoreEntityContainers { /** * Delete container. */ - delete is ArmResourceDeleteAsync< - FeaturestoreEntityContainer, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List featurestore entity containers. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp index cca65eac79..1f67d74689 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp @@ -15,16 +15,28 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(FeaturestoreEntityContainer) -model FeaturestoreEntityVersion - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + FeaturestoreEntityVersionProperties +) +model FeaturestoreEntityVersion extends ProxyResourceBase { /** * Version identifier. This is case-sensitive. */ @path @key("version") @segment("versions") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: FeaturestoreEntityVersionProperties; } @armResourceOperations @@ -42,11 +54,7 @@ interface FeaturestoreEntityVersions { /** * Delete version. */ - delete is ArmResourceDeleteAsync< - FeaturestoreEntityVersion, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List versions. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp index 5673dfb985..1887c80796 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp @@ -15,15 +15,26 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Workspace) -model JobBaseResource is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(JobBase) +model JobBaseResource extends ProxyResourceBase { /** * The name and identifier for the Job. This is case-sensitive. */ @path @key("id") @segment("jobs") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: JobBase; } @armResourceOperations @@ -55,11 +66,7 @@ interface JobBaseResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("Jobs_Delete") - delete is ArmResourceDeleteAsync< - JobBaseResource, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * Lists Jobs in the workspace. @@ -120,13 +127,7 @@ interface JobBaseResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("Jobs_Cancel") - cancel is ArmResourceActionAsync< - JobBaseResource, - void, - void, - BaseParameters, - ArmLroLocationHeader - >; + cancel is ArmResourceActionAsync; } @@projectedName(JobBaseResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp index 4eb0a095f9..ccaf32be80 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp @@ -15,15 +15,26 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Workspace) -model LabelingJob is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(LabelingJobProperties) +model LabelingJob extends ProxyResourceBase { /** * The name and identifier for the LabelingJob. */ @path @key("id") @segment("labelingJobs") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: LabelingJobProperties; } @armResourceOperations @@ -90,9 +101,7 @@ interface LabelingJobs { exportLabels is ArmResourceActionAsync< LabelingJob, ExportSummary, - ExportSummary, - BaseParameters, - ArmLroLocationHeader + ExportSummary >; /** @@ -103,13 +112,7 @@ interface LabelingJobs { /** * Resume a labeling job (asynchronous). */ - resume is ArmResourceActionAsync< - LabelingJob, - void, - void, - BaseParameters, - ArmLroLocationHeader - >; + resume is ArmResourceActionAsync; } @@projectedName(LabelingJobs.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp index 4d1727952c..31ab0481ee 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Registry) -model ModelContainerResource is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ModelContainer) +model ModelContainerResource extends ProxyResourceBase { /** * Container name. This is case-sensitive. */ @@ -24,7 +28,14 @@ model ModelContainerResource is ProxyResource { @path @key("modelName") @segment("models") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: ModelContainer; } @armResourceOperations @@ -48,11 +59,7 @@ interface ModelContainerResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("RegistryModelContainers_Delete") - delete is ArmResourceDeleteAsync< - ModelContainerResource, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List model containers. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp index e0756a85a2..2209edf122 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp @@ -15,15 +15,26 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ModelContainerResource) -model ModelVersionResource is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ModelVersion) +model ModelVersionResource extends ProxyResourceBase { /** * Version identifier. This is case-sensitive. */ @path @key("version") @segment("versions") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: ModelVersion; } @armResourceOperations @@ -47,11 +58,7 @@ interface ModelVersionResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("RegistryModelVersions_Delete") - delete is ArmResourceDeleteAsync< - ModelVersionResource, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List versions. @@ -115,9 +122,7 @@ interface ModelVersionResources { package is ArmResourceActionAsync< ModelVersionResource, PackageRequest, - PackageResponse, - BaseParameters, - ArmLroLocationHeader + PackageResponse >; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp index 195481324a..23b99d02bc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp @@ -13,19 +13,34 @@ using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(OnlineEndpointTrackedResource) -model OnlineDeploymentTrackedResource is TrackedResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(OnlineDeployment) +model OnlineDeploymentTrackedResource extends TrackedResourceBase { /** * Inference Endpoint Deployment name. */ @path @key("deploymentName") @segment("deployments") + @visibility("read") name: string; + /** + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + */ + kind?: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: OnlineDeployment; + ...Azure.ResourceManager.ManagedServiceIdentity; ...Azure.ResourceManager.ResourceSku; - ...Azure.ResourceManager.ResourceKind; } @armResourceOperations @@ -60,11 +75,7 @@ interface OnlineDeploymentTrackedResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("OnlineDeployments_Delete") - delete is ArmResourceDeleteAsync< - OnlineDeploymentTrackedResource, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List Inference Endpoint Deployments. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp index 3ee301e7f2..7f482cb703 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp @@ -13,19 +13,34 @@ using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Workspace) -model OnlineEndpointTrackedResource is TrackedResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(OnlineEndpoint) +model OnlineEndpointTrackedResource extends TrackedResourceBase { /** * Online Endpoint name. */ @path @key("endpointName") @segment("onlineEndpoints") + @visibility("read") name: string; + /** + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + */ + kind?: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: OnlineEndpoint; + ...Azure.ResourceManager.ManagedServiceIdentity; ...Azure.ResourceManager.ResourceSku; - ...Azure.ResourceManager.ResourceKind; } @armResourceOperations @@ -60,11 +75,7 @@ interface OnlineEndpointTrackedResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("OnlineEndpoints_Delete") - delete is ArmResourceDeleteAsync< - OnlineEndpointTrackedResource, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List Online Endpoints. @@ -139,9 +150,7 @@ interface OnlineEndpointTrackedResources { regenerateKeys is ArmResourceActionAsync< OnlineEndpointTrackedResource, RegenerateEndpointKeysRequest, - void, - BaseParameters, - ArmLroLocationHeader + void >; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp index ae272577f3..826237baea 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.MachineLearning; /** * Outbound Rule Basic Resource for the managed network of a machine learning workspace. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Workspace) -model OutboundRuleBasicResource is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(OutboundRule) +model OutboundRuleBasicResource extends ProxyResourceBase { /** * Name of the workspace managed network outbound rule */ @@ -24,7 +28,14 @@ model OutboundRuleBasicResource is ProxyResource { @path @key("ruleName") @segment("outboundRules") + @visibility("read") name: string; + + /** + * Outbound Rule for the managed network of a machine learning workspace. + */ + @extension("x-ms-client-flatten", true) + properties: OutboundRule; } @armResourceOperations @@ -41,11 +52,7 @@ interface OutboundRuleBasicResources { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("ManagedNetworkSettingsRule_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrReplaceAsync< - OutboundRuleBasicResource, - BaseParameters, - ArmLroLocationHeader - >; + createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Deletes an outbound rule from the managed network of a machine learning workspace. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp index b3ba781135..63881ac5f5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp @@ -15,17 +15,29 @@ namespace Azure.ResourceManager.MachineLearning; /** * The Private Endpoint Connection resource. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Workspace) -model PrivateEndpointConnection - is TrackedResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PrivateEndpointConnectionProperties +) +model PrivateEndpointConnection extends TrackedResourceBase { /** * NRP Private Endpoint Connection Name */ @path @key("privateEndpointConnectionName") @segment("privateEndpointConnections") + @visibility("read") name: string; + /** + * Private endpoint connection properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PrivateEndpointConnectionProperties; + ...Azure.ResourceManager.ManagedServiceIdentity; ...Azure.ResourceManager.ResourceSku; } @@ -38,9 +50,9 @@ interface PrivateEndpointConnections { get is ArmResourceRead; /** -* Called by end-users to approve or reject a PE connection. -This method must validate and forward the call to NRP. -*/ + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. + */ createOrUpdate is ArmResourceCreateOrReplaceSync; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp index a69b53cffe..10d26f91f9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp @@ -12,7 +12,11 @@ using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; -model Registry is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(RegistryProperties) +model Registry extends TrackedResourceBase { /** * Name of Azure Machine Learning registry. This is case-insensitive */ @@ -20,11 +24,22 @@ model Registry is TrackedResource { @path @key("registryName") @segment("registries") + @visibility("read") name: string; + /** + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + */ + kind?: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: RegistryProperties; + ...Azure.ResourceManager.ManagedServiceIdentity; ...Azure.ResourceManager.ResourceSku; - ...Azure.ResourceManager.ResourceKind; } @armResourceOperations @@ -37,11 +52,7 @@ interface Registries { /** * Create or update registry */ - createOrUpdate is ArmResourceCreateOrReplaceAsync< - Registry, - BaseParameters, - ArmAsyncOperationHeader - >; + createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Update tags @@ -52,11 +63,7 @@ interface Registries { /** * Delete registry */ - delete is ArmResourceDeleteAsync< - Registry, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List registries @@ -73,13 +80,7 @@ interface Registries { /** * Remove regions from registry */ - removeRegions is ArmResourceActionAsync< - Registry, - Registry, - Registry, - BaseParameters, - ArmLroLocationHeader - >; + removeRegions is ArmResourceActionAsync; } @@projectedName(Registries.createOrUpdate::parameters.resource, "json", "body"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp index 14a3113117..bc17696b7d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp @@ -15,15 +15,26 @@ namespace Azure.ResourceManager.MachineLearning; /** * Azure Resource Manager resource envelope. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Workspace) -model Schedule is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ScheduleProperties) +model Schedule extends ProxyResourceBase { /** * Schedule name. */ @path @key("name") @segment("schedules") + @visibility("read") name: string; + + /** + * [Required] Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: ScheduleProperties; } @armResourceOperations @@ -41,11 +52,7 @@ interface Schedules { /** * Delete schedule. */ - delete is ArmResourceDeleteAsync< - Schedule, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List schedules in specified workspace. diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp index 81a47678e9..f5bc11ed87 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp @@ -4,240 +4,307 @@ import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; - using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; - namespace Azure.ResourceManager.MachineLearning; /** -* An object that represents a machine learning workspace. -*/ -model Workspace is TrackedResource { -/** -* Name of Azure Machine Learning workspace. -*/ -@pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") -@path -@key("workspaceName") -@segment("workspaces") -"name": string; - -...Azure.ResourceManager.ManagedServiceIdentity - -...Azure.ResourceManager.ResourceSku - -...Azure.ResourceManager.ResourceKind + * An object that represents a machine learning workspace. + */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(WorkspaceProperties) +model Workspace extends TrackedResourceBase { + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + @key("workspaceName") + @segment("workspaces") + @visibility("read") + name: string; + + kind?: string; + + /** + * Additional attributes of the entity. + */ + @extension("x-ms-client-flatten", true) + properties: WorkspaceProperties; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; } - - @armResourceOperations interface Workspaces { -/** -* Gets the properties of the specified machine learning workspace. -*/ -get is ArmResourceRead - -/** -* Creates or updates a workspace with the specified parameters. -*/ -createOrUpdate is ArmResourceCreateOrReplaceAsync,ArmLroLocationHeader> - -/** -* Updates a machine learning workspace with the specified parameters. -*/ -@parameterVisibility("read") -update is ArmCustomPatchAsync - -/** -* Deletes a machine learning workspace. -*/ -delete is ArmResourceDeleteAsync, - /** -* Flag to indicate delete is a purge request. -*/ -@query("forceToPurge") -"forceToPurge"?: boolean - }> - -/** -* Lists all the available machine learning workspaces under the specified resource group. -*/ -@operationId("Workspaces_ListByResourceGroup") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -listByResourceGroup is ArmResourceListByParent, - /** -* Continuation token for pagination. -*/ -@query("$skip") -"$skip"?: string -/** -* Kind of workspace. -*/ -@query("kind") -"kind"?: string - }> - -/** -* Lists all the available machine learning workspaces under the specified subscription. -*/ -listBySubscription is ArmListBySubscription - -/** -* Diagnose workspace setup issue. -*/ -diagnose is ArmResourceActionAsync,ArmLroLocationHeader> - -/** -* Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. -*/ -listKeys is ArmResourceActionSync - -/** -* Get Azure Machine Learning Workspace notebook access token -*/ -listNotebookAccessToken is ArmResourceActionSync - -/** -* Lists keys of Azure Machine Learning Workspaces notebook. -*/ -listNotebookKeys is ArmResourceActionSync - -/** -* Lists keys of Azure Machine Learning Workspace's storage account. -*/ -listStorageAccountKeys is ArmResourceActionSync - -/** -* Prepare Azure Machine Learning Workspace's notebook resource -*/ -prepareNotebook is ArmResourceActionAsync,ArmLroLocationHeader> - -/** -* Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and password for container registry -*/ -resyncKeys is ArmResourceActionAsync,ArmLroLocationHeader> - -/** -* Provisions the managed network of a machine learning workspace. -*/ -@operationId("ManagedNetworkProvisions_ProvisionManagedNetwork") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -provisionManagedNetwork is ArmResourceActionAsync,ArmLroLocationHeader> - -@operationId("WorkspaceFeatures_List") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -/** -* Lists all enabled features for a workspace -*/ -// FIXME: WorkspaceFeatures_List could not be converted to a resource operation -@route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features") -@get op `list` is Azure.Core.Foundations.Operation<{/** -* The ID of the target subscription. -*/ -@minLength(1) -@path -"subscriptionId": string -/** -* The name of the resource group. The name is case insensitive. -*/ -@maxLength(90) -@minLength(1) -@path -"resourceGroupName": string -/** -* Name of Azure Machine Learning workspace. -*/ -@pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") -@path -"workspaceName": string}, ListAmlUserFeatureResult>; - - - - -@summary("Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically.") -/** -* Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. -*/ -// FIXME: Workspaces_ListOutboundNetworkDependenciesEndpoints could not be converted to a resource operation -@route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") -@get op `listOutboundNetworkDependenciesEndpoints` is Azure.Core.Foundations.Operation<{/** -* The ID of the target subscription. -*/ -@minLength(1) -@path -"subscriptionId": string -/** -* The name of the resource group. The name is case insensitive. -*/ -@maxLength(90) -@minLength(1) -@path -"resourceGroupName": string -/** -* Name of Azure Machine Learning workspace. -*/ -@pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") -@path -"workspaceName": string}, ExternalFqdnResponse>; - - - - -@operationId("PrivateLinkResources_List") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -@summary("Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. -Each "private link resource" is a connection endpoint (IP address) to the resource. -Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. -Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. -Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds".") -/** -* Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + /** + * Gets the properties of the specified machine learning workspace. + */ + get is ArmResourceRead; + + /** + * Creates or updates a workspace with the specified parameters. + */ + createOrUpdate is ArmResourceCreateOrReplaceAsync; + + /** + * Updates a machine learning workspace with the specified parameters. + */ + @parameterVisibility("read") + update is ArmCustomPatchAsync; + + /** + * Deletes a machine learning workspace. + */ + delete is ArmResourceDeleteAsync< + Workspace, + { + ...BaseParameters; + + /** + * Flag to indicate delete is a purge request. + */ + @query("forceToPurge") + forceToPurge?: boolean; + } + >; + + /** + * Lists all the available machine learning workspaces under the specified resource group. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Workspaces_ListByResourceGroup") + listByResourceGroup is ArmResourceListByParent< + Workspace, + { + ...BaseParameters; + + /** + * Continuation token for pagination. + */ + @query("$skip") + $skip?: string; + + /** + * Kind of workspace. + */ + @query("kind") + kind?: string; + } + >; + + /** + * Lists all the available machine learning workspaces under the specified subscription. + */ + listBySubscription is ArmListBySubscription; + + /** + * Diagnose workspace setup issue. + */ + diagnose is ArmResourceActionAsync< + Workspace, + DiagnoseWorkspaceParameters, + DiagnoseResponseResult + >; + + /** + * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. + */ + listKeys is ArmResourceActionSync; + + /** + * Get Azure Machine Learning Workspace notebook access token + */ + listNotebookAccessToken is ArmResourceActionSync< + Workspace, + void, + NotebookAccessTokenResult + >; + + /** + * Lists keys of Azure Machine Learning Workspaces notebook. + */ + listNotebookKeys is ArmResourceActionSync< + Workspace, + void, + ListNotebookKeysResult + >; + + /** + * Lists keys of Azure Machine Learning Workspace's storage account. + */ + listStorageAccountKeys is ArmResourceActionSync< + Workspace, + void, + ListStorageAccountKeysResult + >; + + /** + * Prepare Azure Machine Learning Workspace's notebook resource + */ + prepareNotebook is ArmResourceActionAsync< + Workspace, + void, + NotebookResourceInfo + >; + + /** + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and password for container registry + */ + resyncKeys is ArmResourceActionAsync; + + /** + * Provisions the managed network of a machine learning workspace. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ManagedNetworkProvisions_ProvisionManagedNetwork") + provisionManagedNetwork is ArmResourceActionAsync< + Workspace, + ManagedNetworkProvisionOptions, + ManagedNetworkProvisionStatus + >; + + /** + * Lists all enabled features for a workspace + */ + // FIXME: WorkspaceFeatures_List could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("WorkspaceFeatures_List") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features") + @get + list is Azure.Core.Foundations.Operation< + { + /** + * The ID of the target subscription. + */ + @minLength(1) + @path + subscriptionId: string; + + /** + * The name of the resource group. The name is case insensitive. + */ + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + }, + ListAmlUserFeatureResult + >; + + /** + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + */ + // FIXME: Workspaces_ListOutboundNetworkDependenciesEndpoints could not be converted to a resource operation + @summary("Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") + @get + listOutboundNetworkDependenciesEndpoints is Azure.Core.Foundations.Operation< + { + /** + * The ID of the target subscription. + */ + @minLength(1) + @path + subscriptionId: string; + + /** + * The name of the resource group. The name is case insensitive. + */ + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + }, + ExternalFqdnResponse + >; + + /** + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + */ + // FIXME: PrivateLinkResources_List could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateLinkResources_List") + @summary(""" +Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. Each "private link resource" is a connection endpoint (IP address) to the resource. Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". -*/ -// FIXME: PrivateLinkResources_List could not be converted to a resource operation -@route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") -@get op `list` is Azure.Core.Foundations.Operation<{/** -* The ID of the target subscription. -*/ -@minLength(1) -@path -"subscriptionId": string -/** -* The name of the resource group. The name is case insensitive. -*/ -@maxLength(90) -@minLength(1) -@path -"resourceGroupName": string -/** -* Name of Azure Machine Learning workspace. -*/ -@pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") -@path -"workspaceName": string}, PrivateLinkResourceListResult>; - - - - +""") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") + @get + list is Azure.Core.Foundations.Operation< + { + /** + * The ID of the target subscription. + */ + @minLength(1) + @path + subscriptionId: string; + + /** + * The name of the resource group. The name is case insensitive. + */ + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + }, + PrivateLinkResourceListResult + >; } - - @@projectedName(Workspaces.createOrUpdate::parameters.resource, "json", "body"); -@@extension(Workspaces.createOrUpdate::parameters.resource, "x-ms-client-name", "body"); -@@doc(Workspaces.createOrUpdate::parameters.resource, "The parameters for creating or updating a machine learning workspace."); +@@extension(Workspaces.createOrUpdate::parameters.resource, + "x-ms-client-name", + "body" +); +@@doc(Workspaces.createOrUpdate::parameters.resource, + "The parameters for creating or updating a machine learning workspace." +); @@projectedName(Workspaces.update::parameters.properties, "json", "body"); -@@extension(Workspaces.update::parameters.properties, "x-ms-client-name", "body"); -@@doc(Workspaces.update::parameters.properties, "The parameters for updating a machine learning workspace."); -@@doc(Workspaces.diagnose::parameters.body, "The parameter of diagnosing workspace health"); -@@doc(Workspaces.provisionManagedNetwork::parameters.body, "Managed Network Provisioning Options for a machine learning workspace."); \ No newline at end of file +@@extension(Workspaces.update::parameters.properties, + "x-ms-client-name", + "body" +); +@@doc(Workspaces.update::parameters.properties, + "The parameters for updating a machine learning workspace." +); +@@doc(Workspaces.diagnose::parameters.body, + "The parameter of diagnosing workspace health" +); +@@doc(Workspaces.provisionManagedNetwork::parameters.body, + "Managed Network Provisioning Options for a machine learning workspace." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp index 7076a790b1..81312833b9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp @@ -13,9 +13,14 @@ using TypeSpec.OpenAPI; namespace Azure.ResourceManager.MachineLearning; +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(Workspace) -model WorkspaceConnectionPropertiesV2BasicResource - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + WorkspaceConnectionPropertiesV2 +) +model WorkspaceConnectionPropertiesV2BasicResource extends ProxyResourceBase { /** * Friendly name of the workspace connection */ @@ -23,7 +28,11 @@ model WorkspaceConnectionPropertiesV2BasicResource @path @key("connectionName") @segment("connections") + @visibility("read") name: string; + + @extension("x-ms-client-flatten", true) + properties: WorkspaceConnectionPropertiesV2; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp index 40a499f6e0..234ef7b6c0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp @@ -1,11350 +1,13152 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; +import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; - using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.OpenAPI; using Azure.Core; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; - namespace Azure.ResourceManager.MachineLearning; -interface Operations extends Azure.ResourceManager.Operations {} +interface Operations extends Azure.ResourceManager.Operations {} /** -* An enum describing the unit of usage measurement. -*/ - enum UsageUnit { - "Count" - } + * An enum describing the unit of usage measurement. + */ +enum UsageUnit { + Count, +} /** -* Three lettered code specifying the currency of the VM price. Example: USD -*/ - enum BillingCurrency { - "USD" - } + * Three lettered code specifying the currency of the VM price. Example: USD + */ +enum BillingCurrency { + USD, +} /** -* The unit of time measurement for the specified VM price. Example: OneHour -*/ - enum UnitOfMeasure { - "OneHour" - } + * The unit of time measurement for the specified VM price. Example: OneHour + */ +enum UnitOfMeasure { + OneHour, +} /** -* Operating system type used by the VM. -*/ - enum VMPriceOSType { - "Linux", "Windows" - } + * Operating system type used by the VM. + */ +enum VMPriceOSType { + Linux, + Windows, +} /** -* The type of the VM. -*/ - enum VMTier { - "Standard", "LowPriority", "Spot" - } + * The type of the VM. + */ +enum VMTier { + Standard, + LowPriority, + Spot, +} /** -* An enum describing the unit of quota measurement. -*/ - enum QuotaUnit { - "Count" - } + * An enum describing the unit of quota measurement. + */ +enum QuotaUnit { + Count, +} /** -* Status of update workspace quota. -*/ - enum Status { - "Undefined", "Success", "Failure", "InvalidQuotaBelowClusterMinimum", "InvalidQuotaExceedsSubscriptionLimit", "InvalidVMFamilyName", "OperationNotSupportedForSku", "OperationNotEnabledForRegion" - } + * Status of update workspace quota. + */ +enum Status { + Undefined, + Success, + Failure, + InvalidQuotaBelowClusterMinimum, + InvalidQuotaExceedsSubscriptionLimit, + InvalidVMFamilyName, + OperationNotSupportedForSku, + OperationNotEnabledForRegion, +} /** -* Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). -*/ - enum ManagedServiceIdentityType { - "None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned" - } + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + */ +enum ManagedServiceIdentityType { + None, + SystemAssigned, + UserAssigned, + `SystemAssigned,UserAssigned`, +} /** -* The type of compute -*/ - enum ComputeType { - "AKS", "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", "VirtualMachine", "HDInsight", "Databricks", "DataLakeAnalytics", "SynapseSpark" - } + * The type of compute + */ +enum ComputeType { + AKS, + Kubernetes, + AmlCompute, + ComputeInstance, + DataFactory, + VirtualMachine, + HDInsight, + Databricks, + DataLakeAnalytics, + SynapseSpark, +} /** -* The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. -*/ - enum ProvisioningState { - "Unknown", "Updating", "Creating", "Deleting", "Succeeded", "Failed", "Canceled" - } - + * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + */ +enum ProvisioningState { + Unknown, + Updating, + Creating, + Deleting, + Succeeded, + Failed, + Canceled, +} - enum UnderlyingResourceAction { - "Delete", "Detach" - } +enum UnderlyingResourceAction { + Delete, + Detach, +} /** -* Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images -*/ - enum ImageType { - "docker", "azureml" - } + * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images + */ +enum ImageType { + docker, + azureml, +} /** -* Type of the Environment Variable. Possible values are: local - For local variable -*/ - enum EnvironmentVariableType { - "local" - } + * Type of the Environment Variable. Possible values are: local - For local variable + */ +enum EnvironmentVariableType { + local, +} /** -* Protocol over which communication will happen over this endpoint -*/ - enum Protocol { - "tcp", "udp", "http" - } + * Protocol over which communication will happen over this endpoint + */ +enum Protocol { + tcp, + udp, + http, +} /** -* Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe -*/ - enum VolumeDefinitionType { - "bind", "volume", "tmpfs", "npipe" - } + * Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe + */ +enum VolumeDefinitionType { + bind, + volume, + tmpfs, + npipe, +} /** -* State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. -*/ - enum NodeState { - "idle", "running", "preparing", "unusable", "leaving", "preempted" - } + * State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. + */ +enum NodeState { + idle, + running, + preparing, + unusable, + leaving, + preempted, +} /** -* Provisioning state of registry asset. -*/ - enum AssetProvisioningState { - "Succeeded", "Failed", "Canceled", "Creating", "Updating", "Deleting" - } - + * Provisioning state of registry asset. + */ +enum AssetProvisioningState { + Succeeded, + Failed, + Canceled, + Creating, + Updating, + Deleting, +} - enum AutoDeleteCondition { - "CreatedGreaterThan", "LastAccessedGreaterThan" - } +enum AutoDeleteCondition { + CreatedGreaterThan, + LastAccessedGreaterThan, +} /** -* Type of storage to use for the pending upload location -*/ - enum PendingUploadType { - "None", "TemporaryBlobReference" - } + * Type of storage to use for the pending upload location + */ +enum PendingUploadType { + None, + TemporaryBlobReference, +} /** -* Enum to determine the PendingUpload credentials type. -*/ - enum PendingUploadCredentialType { - "SAS" - } - + * Enum to determine the PendingUpload credentials type. + */ +enum PendingUploadCredentialType { + SAS, +} - enum ListViewType { - "ActiveOnly", "ArchivedOnly", "All" - } +enum ListViewType { + ActiveOnly, + ArchivedOnly, + All, +} /** -* Enum to determine the type of data. -*/ - enum DataType { - "uri_file", "uri_folder", "mltable" - } + * Enum to determine the type of data. + */ +enum DataType { + uri_file, + uri_folder, + mltable, +} /** -* Protection level associated with the Intellectual Property. -*/ - enum ProtectionLevel { - /** -* All means Intellectual Property is fully protected. -*/"All", /** -* None means it is not an Intellectual Property. -*/"None" - } + * Protection level associated with the Intellectual Property. + */ +enum ProtectionLevel { + /** + * All means Intellectual Property is fully protected. + */ + All, -/** -* AutoRebuild setting for the derived image -*/ - enum AutoRebuildSetting { - "Disabled", "OnBaseImageUpdate" - } + /** + * None means it is not an Intellectual Property. + */ + None, +} /** -* Environment type is either user created or curated by Azure ML service -*/ - enum EnvironmentType { - "Curated", "UserCreated" - } + * AutoRebuild setting for the derived image + */ +enum AutoRebuildSetting { + Disabled, + OnBaseImageUpdate, +} /** -* The type of operating system. -*/ - enum OperatingSystemType { - "Linux", "Windows" - } + * Environment type is either user created or curated by Azure ML service + */ +enum EnvironmentType { + Curated, + UserCreated, +} /** -* Base environment type. -*/ - enum BaseEnvironmentSourceType { - "EnvironmentAsset" - } + * The type of operating system. + */ +enum OperatingSystemType { + Linux, + Windows, +} /** -* Inferencing server type for various targets. -*/ - enum InferencingServerType { - "AzureMLOnline", "AzureMLBatch", "Triton", "Custom" - } + * Base environment type. + */ +enum BaseEnvironmentSourceType { + EnvironmentAsset, +} /** -* Type of the inputs. -*/ - enum PackageInputType { - "UriFile", "UriFolder" - } + * Inferencing server type for various targets. + */ +enum InferencingServerType { + AzureMLOnline, + AzureMLBatch, + Triton, + Custom, +} /** -* Mounting type of the model or the inputs -*/ - enum PackageInputDeliveryMode { - "Copy", "Download" - } + * Type of the inputs. + */ +enum PackageInputType { + UriFile, + UriFolder, +} /** -* Input path type for package inputs. -*/ - enum InputPathType { - "Url", "PathId", "PathVersion" - } + * Mounting type of the model or the inputs + */ +enum PackageInputDeliveryMode { + Copy, + Download, +} /** -* Package build state returned in package response. -*/ - enum PackageBuildState { - "NotStarted", "Running", "Succeeded", "Failed" - } + * Input path type for package inputs. + */ +enum InputPathType { + Url, + PathId, + PathVersion, +} /** -* State of endpoint provisioning. -*/ - enum EndpointProvisioningState { - "Creating", "Deleting", "Succeeded", "Failed", "Updating", "Canceled" - } + * Package build state returned in package response. + */ +enum PackageBuildState { + NotStarted, + Running, + Succeeded, + Failed, +} /** -* Enum to determine endpoint authentication mode. -*/ - enum EndpointAuthMode { - "AMLToken", "Key", "AADToken" - } + * State of endpoint provisioning. + */ +enum EndpointProvisioningState { + Creating, + Deleting, + Succeeded, + Failed, + Updating, + Canceled, +} /** -* The enumerated property types for batch deployments. -*/ - enum BatchDeploymentConfigurationType { - "Model", "PipelineComponent" - } + * Enum to determine endpoint authentication mode. + */ +enum EndpointAuthMode { + AMLToken, + Key, + AADToken, +} /** -* Log verbosity for batch inferencing. -Increasing verbosity order for logging is : Warning, Info and Debug. -The default value is Info. -*/ - enum BatchLoggingLevel { - "Info", "Warning", "Debug" - } + * The enumerated property types for batch deployments. + */ +enum BatchDeploymentConfigurationType { + Model, + PipelineComponent, +} /** -* Enum to determine which reference method to use for an asset. -*/ - enum ReferenceType { - "Id", "DataPath", "OutputPath" - } + * Log verbosity for batch inferencing. + * Increasing verbosity order for logging is : Warning, Info and Debug. + * The default value is Info. + */ +enum BatchLoggingLevel { + Info, + Warning, + Debug, +} /** -* Enum to determine how batch inferencing will handle output -*/ - enum BatchOutputAction { - "SummaryOnly", "AppendRow" - } + * Enum to determine which reference method to use for an asset. + */ +enum ReferenceType { + Id, + DataPath, + OutputPath, +} /** -* Possible values for DeploymentProvisioningState. -*/ - enum DeploymentProvisioningState { - "Creating", "Deleting", "Scaling", "Updating", "Succeeded", "Failed", "Canceled" - } - -/** -* Enum to determine the datastore credentials type. -*/ - enum CredentialsType { - "AccountKey", "Certificate", "None", "Sas", "ServicePrincipal", "KerberosKeytab", "KerberosPassword" - } - -/** -* Enum to determine the datastore contents type. -*/ - enum DatastoreType { - "AzureBlob", "AzureDataLakeGen1", "AzureDataLakeGen2", "AzureFile", "Hdfs", "OneLake" - } - -/** -* Enum to determine the datastore secrets type. -*/ - enum SecretsType { - "AccountKey", "Certificate", "Sas", "ServicePrincipal", "KerberosPassword", "KerberosKeytab" - } - - - enum FeatureDataType { - "String", "Integer", "Long", "Float", "Double", "Binary", "Datetime", "Boolean" - } - -/** -* Enum to determine the email notification type. -*/ - enum EmailNotificationEnableType { - "JobCompleted", "JobFailed", "JobCancelled" - } - -/** -* Enum to determine the webhook callback service type. -*/ - enum WebhookType { - "AzureDevOps" - } - -/** -* Enum to describe the frequency of a recurrence schedule -*/ - enum RecurrenceFrequency { - /** -* Minute frequency -*/"Minute", /** -* Hour frequency -*/"Hour", /** -* Day frequency -*/"Day", /** -* Week frequency -*/"Week", /** -* Month frequency -*/"Month" - } - -/** -* Enum of weekday -*/ - enum WeekDay { - /** -* Monday weekday -*/"Monday", /** -* Tuesday weekday -*/"Tuesday", /** -* Wednesday weekday -*/"Wednesday", /** -* Thursday weekday -*/"Thursday", /** -* Friday weekday -*/"Friday", /** -* Saturday weekday -*/"Saturday", /** -* Sunday weekday -*/"Sunday" - } - - - enum TriggerType { - "Recurrence", "Cron" - } - - - enum MaterializationStoreType { - "None", "Online", "Offline", "OnlineAndOffline" - } - -/** -* The status of a job. -*/ - enum JobStatus { - /** -* Run hasn't started yet. -*/"NotStarted", /** -* Run has started. The user has a run ID. -*/"Starting", /** -* (Not used currently) It will be used if ES is creating the compute target. -*/"Provisioning", /** -* The run environment is being prepared. -*/"Preparing", /** -* The job is queued in the compute target. For example, in BatchAI the job is in queued state, while waiting for all required nodes to be ready. -*/"Queued", /** -* The job started to run in the compute target. -*/"Running", /** -* Job is completed in the target. It is in output collection state now. -*/"Finalizing", /** -* Cancellation has been requested for the job. -*/"CancelRequested", /** -* Job completed successfully. This reflects that both the job itself and output collection states completed successfully -*/"Completed", /** -* Job failed. -*/"Failed", /** -* Following cancellation request, the job is now successfully canceled. -*/"Canceled", /** -* When heartbeat is enabled, if the run isn't updating any information to RunHistory then the run goes to NotResponding state. -NotResponding is the only state that is exempt from strict transition orders. A run can go from NotResponding to any of the previous states. -*/"NotResponding", /** -* The job is paused by users. Some adjustment to labeling jobs can be made only in paused state. -*/"Paused", /** -* Default job status if not mapped to all other statuses -*/"Unknown", /** -* The job is in a scheduled state. Job is not in any active state. -*/"Scheduled" - } - - - enum FeaturestoreJobType { - "RecurrentMaterialization", "BackfillMaterialization" - } - -/** -* Enum to determine identity framework. -*/ - enum IdentityConfigurationType { - "Managed", "AMLToken", "UserIdentity" - } - -/** -* Enum to determine the type of job. -*/ - enum JobType { - "AutoML", "Command", "Labeling", "Sweep", "Pipeline", "Spark" - } - -/** -* The enumerated types for the nodes value -*/ - enum NodesValueType { - "All", "Custom" - } - -/** -* Whether IncrementalDataRefresh is enabled -*/ - enum IncrementalDataRefresh { - "Enabled", "Disabled" - } - -/** -* Whether multiSelect is enabled -*/ - enum MultiSelect { - "Enabled", "Disabled" - } - -/** -* Media type of data asset. -*/ - enum MediaType { - "Image", "Text" - } - - - enum MLAssistConfigurationType { - "Enabled", "Disabled" - } + * Enum to determine how batch inferencing will handle output + */ +enum BatchOutputAction { + SummaryOnly, + AppendRow, +} /** -* Enum to determine the job provisioning state. -*/ - enum JobProvisioningState { - "Succeeded", "Failed", "Canceled", "InProgress" - } - + * Possible values for DeploymentProvisioningState. + */ +enum DeploymentProvisioningState { + Creating, + Deleting, + Scaling, + Updating, + Succeeded, + Failed, + Canceled, +} - enum StatusMessageLevel { - "Error", "Information", "Warning" - } +/** + * Enum to determine the datastore credentials type. + */ +enum CredentialsType { + AccountKey, + Certificate, + None, + Sas, + ServicePrincipal, + KerberosKeytab, + KerberosPassword, +} /** -* The format of exported labels. -*/ - enum ExportFormatType { - "Dataset", "Coco", "CSV" - } + * Enum to determine the datastore contents type. + */ +enum DatastoreType { + AzureBlob, + AzureDataLakeGen1, + AzureDataLakeGen2, + AzureFile, + Hdfs, + OneLake, +} /** -* Enum to determine endpoint compute type. -*/ - enum EndpointComputeType { - "Managed", "Kubernetes", "AzureMLCompute" - } + * Enum to determine the datastore secrets type. + */ +enum SecretsType { + AccountKey, + Certificate, + Sas, + ServicePrincipal, + KerberosPassword, + KerberosKeytab, +} +enum FeatureDataType { + String, + Integer, + Long, + Float, + Double, + Binary, + Datetime, + Boolean, +} - enum OrderString { - "CreatedAtDesc", "CreatedAtAsc", "UpdatedAtDesc", "UpdatedAtAsc" - } +/** + * Enum to determine the email notification type. + */ +enum EmailNotificationEnableType { + JobCompleted, + JobFailed, + JobCancelled, +} /** -* Enum to determine whether PublicNetworkAccess is Enabled or Disabled. -*/ - enum PublicNetworkAccessType { - "Enabled", "Disabled" - } + * Enum to determine the webhook callback service type. + */ +enum WebhookType { + AzureDevOps, +} +/** + * Enum to describe the frequency of a recurrence schedule + */ +enum RecurrenceFrequency { + /** + * Minute frequency + */ + Minute, - enum DataCollectionMode { - "Enabled", "Disabled" - } + /** + * Hour frequency + */ + Hour, + /** + * Day frequency + */ + Day, + + /** + * Week frequency + */ + Week, + + /** + * Month frequency + */ + Month, +} + +/** + * Enum of weekday + */ +enum WeekDay { + /** + * Monday weekday + */ + Monday, + + /** + * Tuesday weekday + */ + Tuesday, + + /** + * Wednesday weekday + */ + Wednesday, + + /** + * Thursday weekday + */ + Thursday, + + /** + * Friday weekday + */ + Friday, + + /** + * Saturday weekday + */ + Saturday, + + /** + * Sunday weekday + */ + Sunday, +} - enum RollingRateType { - "Year", "Month", "Day", "Hour", "Minute" - } +enum TriggerType { + Recurrence, + Cron, +} + +enum MaterializationStoreType { + None, + Online, + Offline, + OnlineAndOffline, +} /** -* Enum to determine whether PublicNetworkAccess is Enabled or Disabled for egress of a deployment. -*/ - enum EgressPublicNetworkAccessType { - "Enabled", "Disabled" - } + * The status of a job. + */ +enum JobStatus { + /** + * Run hasn't started yet. + */ + NotStarted, + /** + * Run has started. The user has a run ID. + */ + Starting, + + /** + * (Not used currently) It will be used if ES is creating the compute target. + */ + Provisioning, + + /** + * The run environment is being prepared. + */ + Preparing, - enum ScaleType { - "Default", "TargetUtilization" - } + /** + * The job is queued in the compute target. For example, in BatchAI the job is in queued state, while waiting for all required nodes to be ready. + */ + Queued, -/** -* The type of container to retrieve logs from. -*/ - enum ContainerType { - /** -* The container used to download models and score script. -*/"StorageInitializer", /** -* The container used to serve user's request. -*/"InferenceServer", /** -* The container used to collect payload and custom logging when mdc is enabled. -*/"ModelDataCollector" - } + /** + * The job started to run in the compute target. + */ + Running, -/** -* Node scaling setting for the compute sku. -*/ - enum SkuScaleType { - /** -* Automatically scales node count. -*/"Automatic", /** -* Node count scaled upon user request. -*/"Manual", /** -* Fixed set of nodes. -*/"None" - } + /** + * Job is completed in the target. It is in output collection state now. + */ + Finalizing, + /** + * Cancellation has been requested for the job. + */ + CancelRequested, - enum KeyType { - "Primary", "Secondary" - } + /** + * Job completed successfully. This reflects that both the job itself and output collection states completed successfully + */ + Completed, + /** + * Job failed. + */ + Failed, - enum ScheduleListViewType { - "EnabledOnly", "DisabledOnly", "All" - } + /** + * Following cancellation request, the job is now successfully canceled. + */ + Canceled, + /** + * When heartbeat is enabled, if the run isn't updating any information to RunHistory then the run goes to NotResponding state. + * NotResponding is the only state that is exempt from strict transition orders. A run can go from NotResponding to any of the previous states. + */ + NotResponding, - enum ScheduleActionType { - "CreateJob", "InvokeBatchEndpoint", "ImportData", "CreateMonitor" - } + /** + * The job is paused by users. Some adjustment to labeling jobs can be made only in paused state. + */ + Paused, + /** + * Default job status if not mapped to all other statuses + */ + Unknown, - enum ScheduleProvisioningStatus { - "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled" - } + /** + * The job is in a scheduled state. Job is not in any active state. + */ + Scheduled, +} -/** -* Connection status of the service consumer with the service provider -*/ - enum EndpointServiceConnectionStatus { - "Approved", "Pending", "Rejected", "Disconnected", "Timeout" - } +enum FeaturestoreJobType { + RecurrentMaterialization, + BackfillMaterialization, +} /** -* Indicates whether or not the encryption is enabled for the workspace. -*/ - enum EncryptionStatus { - "Enabled", "Disabled" - } + * Enum to determine identity framework. + */ +enum IdentityConfigurationType { + Managed, + AMLToken, + UserIdentity, +} /** -* Isolation mode for the managed network of a machine learning workspace. -*/ - enum IsolationMode { - "Disabled", "AllowInternetOutbound", "AllowOnlyApprovedOutbound" - } + * Enum to determine the type of job. + */ +enum JobType { + AutoML, + Command, + Labeling, + Sweep, + Pipeline, + Spark, +} /** -* Category of a managed network Outbound Rule of a machine learning workspace. -*/ - enum RuleCategory { - "Required", "Recommended", "UserDefined" - } + * The enumerated types for the nodes value + */ +enum NodesValueType { + All, + Custom, +} /** -* Type of a managed network Outbound Rule of a machine learning workspace. -*/ - enum RuleStatus { - "Inactive", "Active" - } + * Whether IncrementalDataRefresh is enabled + */ +enum IncrementalDataRefresh { + Enabled, + Disabled, +} /** -* Type of a managed network Outbound Rule of a machine learning workspace. -*/ - enum RuleType { - "FQDN", "PrivateEndpoint", "ServiceTag" - } + * Whether multiSelect is enabled + */ +enum MultiSelect { + Enabled, + Disabled, +} /** -* Status for the managed network of a machine learning workspace. -*/ - enum ManagedNetworkStatus { - "Inactive", "Active" - } + * Media type of data asset. + */ +enum MediaType { + Image, + Text, +} -/** -* The current provisioning state. -*/ - enum PrivateEndpointConnectionProvisioningState { - "Succeeded", "Creating", "Deleting", "Failed" - } +enum MLAssistConfigurationType { + Enabled, + Disabled, +} /** -* Authentication type of the connection target -*/ - enum ConnectionAuthType { - "PAT", "ManagedIdentity", "UsernamePassword", "None", "SAS", "ServicePrincipal", "AccessKey", "ApiKey", "CustomKeys" - } + * Enum to determine the job provisioning state. + */ +enum JobProvisioningState { + Succeeded, + Failed, + Canceled, + InProgress, +} -/** -* Category of the connection -*/ - enum ConnectionCategory { - "PythonFeed", "ContainerRegistry", "Git", "S3", "Snowflake", "AzureSqlDb", "AzureSynapseAnalytics", "AzureMySqlDb", "AzurePostgresDb", "ADLSGen2", "Redis", "ApiKey", "AzureOpenAI", "CognitiveSearch", "CognitiveService", "CustomKeys" - } +enum StatusMessageLevel { + Error, + Information, + Warning, +} /** -* Level of workspace setup error -*/ - enum DiagnoseResultLevel { - "Warning", "Error", "Information" - } + * The format of exported labels. + */ +enum ExportFormatType { + Dataset, + Coco, + CSV, +} /** -* Intended usage of the cluster -*/ - enum ClusterPurpose { - "FastProd", "DenseProd", "DevTest" - } + * Enum to determine endpoint compute type. + */ +enum EndpointComputeType { + Managed, + Kubernetes, + AzureMLCompute, +} -/** -* Enable or disable ssl for scoring -*/ - enum SslConfigStatus { - "Disabled", "Enabled", "Auto" - } +enum OrderString { + CreatedAtDesc, + CreatedAtAsc, + UpdatedAtDesc, + UpdatedAtAsc, +} /** -* Load Balancer Type -*/ - enum LoadBalancerType { - "PublicIp", "InternalLoadBalancer" - } + * Enum to determine whether PublicNetworkAccess is Enabled or Disabled. + */ +enum PublicNetworkAccessType { + Enabled, + Disabled, +} -/** -* Compute OS Type -*/ - enum OsType { - "Linux", "Windows" - } +enum DataCollectionMode { + Enabled, + Disabled, +} -/** -* Virtual Machine priority -*/ - enum VmPriority { - "Dedicated", "LowPriority" - } +enum RollingRateType { + Year, + Month, + Day, + Hour, + Minute, +} /** -* State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. -*/ - enum RemoteLoginPortPublicAccess { - "Enabled", "Disabled", "NotSpecified" - } + * Enum to determine whether PublicNetworkAccess is Enabled or Disabled for egress of a deployment. + */ +enum EgressPublicNetworkAccessType { + Enabled, + Disabled, +} -/** -* Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. -*/ - enum AllocationState { - "Steady", "Resizing" - } +enum ScaleType { + Default, + TargetUtilization, +} /** -* Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role. -*/ - enum ApplicationSharingPolicy { - "Personal", "Shared" - } + * The type of container to retrieve logs from. + */ +enum ContainerType { + /** + * The container used to download models and score script. + */ + StorageInitializer, -/** -* Indicates whether mlflow autologger is enabled for notebooks. -*/ - enum MlflowAutologger { - "Enabled", "Disabled" - } + /** + * The container used to serve user's request. + */ + InferenceServer, -/** -* State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable. -*/ - enum SshPublicAccess { - "Enabled", "Disabled" - } + /** + * The container used to collect payload and custom logging when mdc is enabled. + */ + ModelDataCollector, +} /** -* Current state of an ComputeInstance. -*/ - enum ComputeInstanceState { - "Creating", "CreateFailed", "Deleting", "Running", "Restarting", "JobRunning", "SettingUp", "SetupFailed", "Starting", "Stopped", "Stopping", "UserSettingUp", "UserSetupFailed", "Unknown", "Unusable" - } + * Node scaling setting for the compute sku. + */ +enum SkuScaleType { + /** + * Automatically scales node count. + */ + Automatic, -/** -* The Compute Instance Authorization type. Available values are personal (default). -*/ - enum ComputeInstanceAuthorizationType { - "personal" - } + /** + * Node count scaled upon user request. + */ + Manual, -/** -* Name of the last operation. -*/ - enum OperationName { - "Create", "Start", "Stop", "Restart", "Reimage", "Delete" - } + /** + * Fixed set of nodes. + */ + None, +} -/** -* Operation status. -*/ - enum OperationStatus { - "InProgress", "Succeeded", "CreateFailed", "StartFailed", "StopFailed", "RestartFailed", "ReimageFailed", "DeleteFailed" - } +enum KeyType { + Primary, + Secondary, +} -/** -* Trigger of operation. -*/ - enum OperationTrigger { - "User", "Schedule", "IdleShutdown" - } +enum ScheduleListViewType { + EnabledOnly, + DisabledOnly, + All, +} -/** -* The current deployment state of schedule. -*/ - enum ProvisioningStatus { - "Completed", "Provisioning", "Failed" - } +enum ScheduleActionType { + CreateJob, + InvokeBatchEndpoint, + ImportData, + CreateMonitor, +} -/** -* Is the schedule enabled or disabled? -*/ - enum ScheduleStatus { - "Enabled", "Disabled" - } +enum ScheduleProvisioningStatus { + Creating, + Updating, + Deleting, + Succeeded, + Failed, + Canceled, +} /** -* [Required] The compute power action. -*/ - enum ComputePowerAction { - "Start", "Stop" - } + * Connection status of the service consumer with the service provider + */ +enum EndpointServiceConnectionStatus { + Approved, + Pending, + Rejected, + Disconnected, + Timeout, +} /** -* The current deployment state of schedule. -*/ - enum ScheduleProvisioningState { - "Completed", "Provisioning", "Failed" - } + * Indicates whether or not the encryption is enabled for the workspace. + */ +enum EncryptionStatus { + Enabled, + Disabled, +} /** -* Auto save settings. -*/ - enum Autosave { - "None", "Local", "Remote" - } + * Isolation mode for the managed network of a machine learning workspace. + */ +enum IsolationMode { + Disabled, + AllowInternetOutbound, + AllowOnlyApprovedOutbound, +} /** -* network of this container. -*/ - enum Network { - "Bridge", "Host" - } + * Category of a managed network Outbound Rule of a machine learning workspace. + */ +enum RuleCategory { + Required, + Recommended, + UserDefined, +} /** -* Caching type of Data Disk. -*/ - enum Caching { - "None", "ReadOnly", "ReadWrite" - } + * Type of a managed network Outbound Rule of a machine learning workspace. + */ +enum RuleStatus { + Inactive, + Active, +} /** -* type of this storage account. -*/ - enum StorageAccountType { - "Standard_LRS", "Premium_LRS" - } + * Type of a managed network Outbound Rule of a machine learning workspace. + */ +enum RuleType { + FQDN, + PrivateEndpoint, + ServiceTag, +} /** -* Data source type. -*/ - enum SourceType { - "Dataset", "Datastore", "URI" - } + * Status for the managed network of a machine learning workspace. + */ +enum ManagedNetworkStatus { + Inactive, + Active, +} /** -* Mount Action. -*/ - enum MountAction { - "Mount", "Unmount" - } - -/** -* Mount state. -*/ - enum MountState { - "MountRequested", "Mounted", "MountFailed", "UnmountRequested", "UnmountFailed", "Unmounted" - } - - - enum MonitoringFeatureFilterType { - /** -* Includes all features. -*/"AllFeatures", /** -* Only includes the top contributing features, measured by feature attribution. -*/"TopNByAttribution", /** -* Includes a user-defined subset of features. -*/"FeatureSubset" - } - -/** -* Monitor compute identity type enum. -*/ - enum MonitorComputeIdentityType { - /** -* Authenticates through user's AML token. -*/"AmlToken", /** -* Authenticates through a user-provided managed identity. -*/"ManagedIdentity" - } - -/** -* Enum to determine the input data delivery mode. -*/ - enum InputDeliveryMode { - "ReadOnlyMount", "ReadWriteMount", "Download", "Direct", "EvalMount", "EvalDownload" - } - -/** -* Output data delivery mode enums. -*/ - enum OutputDeliveryMode { - "ReadWriteMount", "Upload", "Direct" - } - -/** -* Enum to determine forecast horizon selection mode. -*/ - enum ForecastHorizonMode { - /** -* Forecast horizon to be determined automatically. -*/"Auto", /** -* Use the custom forecast horizon. -*/"Custom" - } - -/** -* Enum to determine the Job Output Type. -*/ - enum JobOutputType { - "uri_file", "uri_folder", "mltable", "custom_model", "mlflow_model", "triton_model" - } - -/** -* Enum to determine the job tier. -*/ - enum JobTier { - "Null", "Spot", "Basic", "Standard", "Premium" - } - -/** -* Enum for setting log verbosity. -*/ - enum LogVerbosity { - /** -* No logs emitted. -*/"NotSet", /** -* Debug and above log statements logged. -*/"Debug", /** -* Info and above log statements logged. -*/"Info", /** -* Warning and above log statements logged. -*/"Warning", /** -* Error and above log statements logged. -*/"Error", /** -* Only critical statements logged. -*/"Critical" - } - -/** -* AutoMLJob Task type. -*/ - enum TaskType { - /** -* Classification in machine learning and statistics is a supervised learning approach in which -the computer program learns from the data given to it and make new observations or classifications. -*/"Classification", /** -* Regression means to predict the value using the input data. Regression models are used to predict a continuous value. -*/"Regression", /** -* Forecasting is a special kind of regression task that deals with time-series data and creates forecasting model -that can be used to predict the near future values based on the inputs. -*/"Forecasting", /** -* Image Classification. Multi-class image classification is used when an image is classified with only a single label -from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. -*/"ImageClassification", /** -* Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels -from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. -*/"ImageClassificationMultilabel", /** -* Image Object Detection. Object detection is used to identify objects in an image and locate each object with a -bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. -*/"ImageObjectDetection", /** -* Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, -drawing a polygon around each object in the image. -*/"ImageInstanceSegmentation", /** -* Text classification (also known as text tagging or text categorization) is the process of sorting texts into categories. -Categories are mutually exclusive. -*/"TextClassification", /** -* Multilabel classification task assigns each sample to a group (zero or more) of target labels. -*/"TextClassificationMultilabel", /** -* Text Named Entity Recognition a.k.a. TextNER. -Named Entity Recognition (NER) is the ability to take free-form text and identify the occurrences of entities such as people, locations, organizations, and more. -*/"TextNER" - } - -/** -* Enum to determine the Job Input Type. -*/ - enum JobInputType { - "literal", "uri_file", "uri_folder", "mltable", "custom_model", "mlflow_model", "triton_model" - } - -/** -* Determines how N-Cross validations value is determined. -*/ - enum NCrossValidationsMode { - /** -* Determine N-Cross validations value automatically. Supported only for 'Forecasting' AutoML task. -*/"Auto", /** -* Use custom N-Cross validations value. -*/"Custom" - } - -/** -* Forecasting seasonality mode. -*/ - enum SeasonalityMode { - /** -* Seasonality to be determined automatically. -*/"Auto", /** -* Use the custom seasonality value. -*/"Custom" - } - -/** -* Target lags selection modes. -*/ - enum TargetLagsMode { - /** -* Target lags to be determined automatically. -*/"Auto", /** -* Use the custom target lags. -*/"Custom" - } - -/** -* Target rolling windows size mode. -*/ - enum TargetRollingWindowSizeMode { - /** -* Determine rolling windows size automatically. -*/"Auto", /** -* Use the specified rolling window size. -*/"Custom" - } - -/** -* Enum to determine the state of mlflow autologger. -*/ - enum MLFlowAutologgerState { - "Enabled", "Disabled" - } - - - enum MonitoringAlertNotificationType { - /** -* Settings for Azure Monitor based alerting. -*/"AzureMonitor", /** -* Settings for AML email notifications. -*/"Email" - } - - - enum ServiceDataAccessAuthIdentity { - /** -* Do not use any identity for service data access. -*/"None", /** -* Use the system assigned managed identity of the Workspace to authenticate service data access. -*/"WorkspaceSystemAssignedIdentity", /** -* Use the user assigned managed identity of the Workspace to authenticate service data access. -*/"WorkspaceUserAssignedIdentity" - } - - - enum EarlyTerminationPolicyType { - "Bandit", "MedianStopping", "TruncationSelection" - } - - - enum SamplingAlgorithmType { - "Grid", "Random", "Bayesian" - } - - - enum CategoricalDataDriftMetric { - /** -* The Jensen Shannon Distance (JSD) metric. -*/"JensenShannonDistance", /** -* The Population Stability Index (PSI) metric. -*/"PopulationStabilityIndex", /** -* The Pearsons Chi Squared Test metric. -*/"PearsonsChiSquaredTest" - } - - - enum MonitoringFeatureDataType { - /** -* Used for features of numerical data type. -*/"Numerical", /** -* Used for features of categorical data type. -*/"Categorical" - } - - - enum CategoricalDataQualityMetric { - /** -* Calculates the rate of null values. -*/"NullValueRate", /** -* Calculates the rate of data type errors. -*/"DataTypeErrorRate", /** -* Calculates the rate values are out of bounds. -*/"OutOfBoundsRate" - } - - - enum CategoricalPredictionDriftMetric { - /** -* The Jensen Shannon Distance (JSD) metric. -*/"JensenShannonDistance", /** -* The Population Stability Index (PSI) metric. -*/"PopulationStabilityIndex", /** -* The Pearsons Chi Squared Test metric. -*/"PearsonsChiSquaredTest" - } - -/** -* Primary metrics for classification tasks. -*/ - enum ClassificationPrimaryMetrics { - /** -* AUC is the Area under the curve. -This metric represents arithmetic mean of the score for each class, -weighted by the number of true instances in each class. -*/"AUCWeighted", /** -* Accuracy is the ratio of predictions that exactly match the true class labels. -*/"Accuracy", /** -* Normalized macro recall is recall macro-averaged and normalized, so that random -performance has a score of 0, and perfect performance has a score of 1. -*/"NormMacroRecall", /** -* The arithmetic mean of the average precision score for each class, weighted by -the number of true instances in each class. -*/"AveragePrecisionScoreWeighted", /** -* The arithmetic mean of precision for each class, weighted by number of true instances in each class. -*/"PrecisionScoreWeighted" - } - -/** -* Enum for all classification models supported by AutoML. -*/ - enum ClassificationModels { - /** -* Logistic regression is a fundamental classification technique. -It belongs to the group of linear classifiers and is somewhat similar to polynomial and linear regression. -Logistic regression is fast and relatively uncomplicated, and it's convenient for you to interpret the results. -Although it's essentially a method for binary classification, it can also be applied to multiclass problems. -*/"LogisticRegression", /** -* SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications -to find the model parameters that correspond to the best fit between predicted and actual outputs. -*/"SGD", /** -* The multinomial Naive Bayes classifier is suitable for classification with discrete features (e.g., word counts for text classification). -The multinomial distribution normally requires integer feature counts. However, in practice, fractional counts such as tf-idf may also work. -*/"MultinomialNaiveBayes", /** -* Naive Bayes classifier for multivariate Bernoulli models. -*/"BernoulliNaiveBayes", /** -* A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. -After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. -*/"SVM", /** -* A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. -After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. -Linear SVM performs best when input data is linear, i.e., data can be easily classified by drawing the straight line between classified values on a plotted graph. -*/"LinearSVM", /** -* K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints -which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. -*/"KNN", /** -* Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. -The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. -*/"DecisionTree", /** -* Random forest is a supervised learning algorithm. -The "forest" it builds, is an ensemble of decision trees, usually trained with the bagging method. -The general idea of the bagging method is that a combination of learning models increases the overall result. -*/"RandomForest", /** -* Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm. -*/"ExtremeRandomTrees", /** -* LightGBM is a gradient boosting framework that uses tree based learning algorithms. -*/"LightGBM", /** -* The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution. -*/"GradientBoosting", /** -* XGBoost: Extreme Gradient Boosting Algorithm. This algorithm is used for structured data where target column values can be divided into distinct class values. -*/"XGBoostClassifier" - } - -/** -* The meta-learner is a model trained on the output of the individual heterogeneous models. -Default meta-learners are LogisticRegression for classification tasks (or LogisticRegressionCV if cross-validation is enabled) and ElasticNet for regression/forecasting tasks (or ElasticNetCV if cross-validation is enabled). -This parameter can be one of the following strings: LogisticRegression, LogisticRegressionCV, LightGBMClassifier, ElasticNet, ElasticNetCV, LightGBMRegressor, or LinearRegression -*/ - enum StackMetaLearnerType { - "None", /** -* Default meta-learners are LogisticRegression for classification tasks. -*/"LogisticRegression", /** -* Default meta-learners are LogisticRegression for classification task when CV is on. -*/"LogisticRegressionCV", "LightGBMClassifier", /** -* Default meta-learners are LogisticRegression for regression task. -*/"ElasticNet", /** -* Default meta-learners are LogisticRegression for regression task when CV is on. -*/"ElasticNetCV", "LightGBMRegressor", "LinearRegression" - } - -/** -* Training mode dictates whether to use distributed training or not -*/ - enum TrainingMode { - /** -* Auto mode -*/"Auto", /** -* Distributed training mode -*/"Distributed", /** -* Non distributed training mode -*/"NonDistributed" - } - -/** -* Enum for all classification models supported by AutoML. -*/ - enum BlockedTransformers { - /** -* Target encoding for text data. -*/"TextTargetEncoder", /** -* Ohe hot encoding creates a binary feature transformation. -*/"OneHotEncoder", /** -* Target encoding for categorical data. -*/"CatTargetEncoder", /** -* Tf-Idf stands for, term-frequency times inverse document-frequency. This is a common term weighting scheme for identifying information from documents. -*/"TfIdf", /** -* Weight of Evidence encoding is a technique used to encode categorical variables. It uses the natural log of the P(1)/P(0) to create weights. -*/"WoETargetEncoder", /** -* Label encoder converts labels/categorical variables in a numerical form. -*/"LabelEncoder", /** -* Word embedding helps represents words or phrases as a vector, or a series of numbers. -*/"WordEmbedding", /** -* Naive Bayes is a classified that is used for classification of discrete features that are categorically distributed. -*/"NaiveBayes", /** -* Count Vectorizer converts a collection of text documents to a matrix of token counts. -*/"CountVectorizer", /** -* Hashing One Hot Encoder can turn categorical variables into a limited number of new features. This is often used for high-cardinality categorical features. -*/"HashOneHotEncoder" - } - -/** -* Featurization mode - determines data featurization mode. -*/ - enum FeaturizationMode { - /** -* Auto mode, system performs featurization without any custom featurization inputs. -*/"Auto", /** -* Custom featurization. -*/"Custom", /** -* Featurization off. 'Forecasting' task cannot use this value. -*/"Off" - } - - - enum ClassificationModelPerformanceMetric { - /** -* Calculates the accuracy of the model predictions. -*/"Accuracy", /** -* Calculates the precision of the model predictions. -*/"Precision", /** -* Calculates the recall of the model predictions. -*/"Recall" - } - - - enum MonitoringModelType { - /** -* A model trained for classification tasks. -*/"Classification", /** -* A model trained for regressions tasks. -*/"Regression" - } - -/** -* Enum to determine the job distribution type. -*/ - enum DistributionType { - "PyTorch", "TensorFlow", "Mpi", "Ray" - } - - - enum JobLimitsType { - "Command", "Sweep" - } - -/** -* Monitor compute type enum. -*/ - enum MonitorComputeType { - /** -* Serverless Spark compute. -*/"ServerlessSpark" - } - -/** -* Model task type enum. -*/ - enum ModelTaskType { - "Classification", "Regression", "QuestionAnswering" - } - - - enum MonitoringNotificationMode { - /** -* Disabled notifications will not produce emails/metrics leveraged for alerting. -*/"Disabled", /** -* Enabled notification will produce emails/metrics leveraged for alerting. -*/"Enabled" - } - - - enum MonitoringSignalType { - /** -* Tracks model input data distribution change, comparing against training data or past production data. -*/"DataDrift", /** -* Tracks prediction result data distribution change, comparing against validation/test label data or past production data. -*/"PredictionDrift", /** -* Tracks model input data integrity. -*/"DataQuality", /** -* Tracks feature importance change in production, comparing against feature importance at training time. -*/"FeatureAttributionDrift", /** -* Tracks a custom signal provided by users. -*/"Custom", /** -* Tracks model performance based on ground truth data. -*/"ModelPerformance", /** -* Tracks the safety and quality of generated content. -*/"GenerationSafetyQuality", /** -* Tracks the token usage of generative endpoints. -*/"GenerationTokenStatistics" - } - -/** -* Monitoring input data type enum. -*/ - enum MonitoringInputDataType { - /** -* An input data with a fixed window size. -*/"Static", /** -* An input data which trailing relatively to the monitor's current run. -*/"Trailing", /** -* An input data with tabular format which doesn't require preprocessing. -*/"Fixed" - } - -/** -* Enum to determine the type of data. -*/ - enum DataImportSourceType { - "database", "file_system" - } - - - enum FeatureAttributionMetric { - /** -* The Normalized Discounted Cumulative Gain metric. -*/"NormalizedDiscountedCumulativeGain" - } - -/** -* Flag for generating lags for the numeric features. -*/ - enum FeatureLags { - /** -* No feature lags generated. -*/"None", /** -* System auto-generates feature lags. -*/"Auto" - } - -/** -* The parameter defining how if AutoML should handle short time series. -*/ - enum ShortSeriesHandlingConfiguration { - /** -* Represents no/null value. -*/"None", /** -* Short series will be padded if there are no long series, otherwise short series will be dropped. -*/"Auto", /** -* All the short series will be padded. -*/"Pad", /** -* All the short series will be dropped. -*/"Drop" - } - -/** -* Target aggregate function. -*/ - enum TargetAggregationFunction { - /** -* Represent no value set. -*/"None", "Sum", "Max", "Min", "Mean" - } - -/** -* Configure STL Decomposition of the time-series target column. -*/ - enum UseStl { - /** -* No stl decomposition. -*/"None", "Season", "SeasonTrend" - } - -/** -* Primary metrics for Forecasting task. -*/ - enum ForecastingPrimaryMetrics { - /** -* The Spearman's rank coefficient of correlation is a non-parametric measure of rank correlation. -*/"SpearmanCorrelation", /** -* The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales. -*/"NormalizedRootMeanSquaredError", /** -* The R2 score is one of the performance evaluation measures for forecasting-based machine learning models. -*/"R2Score", /** -* The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales. -*/"NormalizedMeanAbsoluteError" - } - -/** -* Enum for all forecasting models supported by AutoML. -*/ - enum ForecastingModels { - /** -* Auto-Autoregressive Integrated Moving Average (ARIMA) model uses time-series data and statistical analysis to interpret the data and make future predictions. -This model aims to explain data by using time series data on its past values and uses linear regression to make predictions. -*/"AutoArima", /** -* Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. -It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet is robust to missing data and shifts in the trend, and typically handles outliers well. -*/"Prophet", /** -* The Naive forecasting model makes predictions by carrying forward the latest target value for each time-series in the training data. -*/"Naive", /** -* The Seasonal Naive forecasting model makes predictions by carrying forward the latest season of target values for each time-series in the training data. -*/"SeasonalNaive", /** -* The Average forecasting model makes predictions by carrying forward the average of the target values for each time-series in the training data. -*/"Average", /** -* The Seasonal Average forecasting model makes predictions by carrying forward the average value of the latest season of data for each time-series in the training data. -*/"SeasonalAverage", /** -* Exponential smoothing is a time series forecasting method for univariate data that can be extended to support data with a systematic trend or seasonal component. -*/"ExponentialSmoothing", /** -* An Autoregressive Integrated Moving Average with Explanatory Variable (ARIMAX) model can be viewed as a multiple regression model with one or more autoregressive (AR) terms and/or one or more moving average (MA) terms. -This method is suitable for forecasting when data is stationary/non stationary, and multivariate with any type of data pattern, i.e., level/trend /seasonality/cyclicity. -*/"Arimax", /** -* TCNForecaster: Temporal Convolutional Networks Forecaster. //TODO: Ask forecasting team for brief intro. -*/"TCNForecaster", /** -* Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions. -*/"ElasticNet", /** -* The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution. -*/"GradientBoosting", /** -* Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. -The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. -*/"DecisionTree", /** -* K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints -which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. -*/"KNN", /** -* Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer. -*/"LassoLars", /** -* SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications -to find the model parameters that correspond to the best fit between predicted and actual outputs. -It's an inexact but powerful technique. -*/"SGD", /** -* Random forest is a supervised learning algorithm. -The "forest" it builds, is an ensemble of decision trees, usually trained with the bagging method. -The general idea of the bagging method is that a combination of learning models increases the overall result. -*/"RandomForest", /** -* Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm. -*/"ExtremeRandomTrees", /** -* LightGBM is a gradient boosting framework that uses tree based learning algorithms. -*/"LightGBM", /** -* XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners. -*/"XGBoostRegressor" - } - -/** -* Generation safety quality metric enum. -*/ - enum GenerationSafetyQualityMetric { - "AcceptableGroundednessScorePerInstance", "AggregatedGroundednessPassRate", "AcceptableCoherenceScorePerInstance", "AggregatedCoherencePassRate", "AcceptableFluencyScorePerInstance", "AggregatedFluencyPassRate", "AcceptableSimilarityScorePerInstance", "AggregatedSimilarityPassRate", "AcceptableRelevanceScorePerInstance", "AggregatedRelevancePassRate" - } - -/** -* Generation token statistics metric enum. -*/ - enum GenerationTokenStatisticsMetric { - "TotalTokenCount", "TotalTokenCountPerGroup" - } - -/** -* Learning rate scheduler enum. -*/ - enum LearningRateScheduler { - /** -* No learning rate scheduler selected. -*/"None", /** -* Cosine Annealing With Warmup. -*/"WarmupCosine", /** -* Step learning rate scheduler. -*/"Step" - } - -/** -* Stochastic optimizer for image models. -*/ - enum StochasticOptimizer { - /** -* No optimizer selected. -*/"None", /** -* Stochastic Gradient Descent optimizer. -*/"Sgd", /** -* Adam is algorithm the optimizes stochastic objective functions based on adaptive estimates of moments -*/"Adam", /** -* AdamW is a variant of the optimizer Adam that has an improved implementation of weight decay. -*/"Adamw" - } - -/** -* Primary metrics for classification multilabel tasks. -*/ - enum ClassificationMultilabelPrimaryMetrics { - /** -* AUC is the Area under the curve. -This metric represents arithmetic mean of the score for each class, -weighted by the number of true instances in each class. -*/"AUCWeighted", /** -* Accuracy is the ratio of predictions that exactly match the true class labels. -*/"Accuracy", /** -* Normalized macro recall is recall macro-averaged and normalized, so that random -performance has a score of 0, and perfect performance has a score of 1. -*/"NormMacroRecall", /** -* The arithmetic mean of the average precision score for each class, weighted by -the number of true instances in each class. -*/"AveragePrecisionScoreWeighted", /** -* The arithmetic mean of precision for each class, weighted by number of true instances in each class. -*/"PrecisionScoreWeighted", /** -* Intersection Over Union. Intersection of predictions divided by union of predictions. -*/"IOU" - } - -/** -* Primary metrics for InstanceSegmentation tasks. -*/ - enum InstanceSegmentationPrimaryMetrics { - /** -* Mean Average Precision (MAP) is the average of AP (Average Precision). -AP is calculated for each class and averaged to get the MAP. -*/"MeanAveragePrecision" - } - - - enum LogTrainingMetrics { - /** -* Enable compute and log training metrics. -*/"Enable", /** -* Disable compute and log training metrics. -*/"Disable" - } - - - enum LogValidationLoss { - /** -* Enable compute and log validation metrics. -*/"Enable", /** -* Disable compute and log validation metrics. -*/"Disable" - } - -/** -* Image model size. -*/ - enum ModelSize { - /** -* No value selected. -*/"None", /** -* Small size. -*/"Small", /** -* Medium size. -*/"Medium", /** -* Large size. -*/"Large", /** -* Extra large size. -*/"ExtraLarge" - } - -/** -* Metric computation method to use for validation metrics in image tasks. -*/ - enum ValidationMetricType { - /** -* No metric. -*/"None", /** -* Coco metric. -*/"Coco", /** -* Voc metric. -*/"Voc", /** -* CocoVoc metric. -*/"CocoVoc" - } - -/** -* Primary metrics for Image ObjectDetection task. -*/ - enum ObjectDetectionPrimaryMetrics { - /** -* Mean Average Precision (MAP) is the average of AP (Average Precision). -AP is calculated for each class and averaged to get the MAP. -*/"MeanAveragePrecision" - } - -/** -* Annotation type of image data. -*/ - enum ImageAnnotationType { - "Classification", "BoundingBox", "InstanceSegmentation" - } - -/** -* Annotation type of text data. -*/ - enum TextAnnotationType { - "Classification", "NamedEntityRecognition" - } - -/** -* Enum to determine OneLake artifact type. -*/ - enum OneLakeArtifactType { - "LakeHouse" - } - -/** -* Enum of learning rate schedulers that aligns with those supported by HF -*/ - enum NlpLearningRateScheduler { - /** -* No learning rate schedule. -*/"None", /** -* Linear warmup and decay. -*/"Linear", /** -* Linear warmup then cosine decay. -*/"Cosine", /** -* Linear warmup, cosine decay, then restart to initial LR. -*/"CosineWithRestarts", /** -* Increase linearly then polynomially decay. -*/"Polynomial", /** -* Constant learning rate. -*/"Constant", /** -* Linear warmup followed by constant value. -*/"ConstantWithWarmup" - } - - - enum NumericalDataDriftMetric { - /** -* The Jensen Shannon Distance (JSD) metric. -*/"JensenShannonDistance", /** -* The Population Stability Index (PSI) metric. -*/"PopulationStabilityIndex", /** -* The Normalized Wasserstein Distance metric. -*/"NormalizedWassersteinDistance", /** -* The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric. -*/"TwoSampleKolmogorovSmirnovTest" - } - - - enum NumericalDataQualityMetric { - /** -* Calculates the rate of null values. -*/"NullValueRate", /** -* Calculates the rate of data type errors. -*/"DataTypeErrorRate", /** -* Calculates the rate values are out of bounds. -*/"OutOfBoundsRate" - } - - - enum NumericalPredictionDriftMetric { - /** -* The Jensen Shannon Distance (JSD) metric. -*/"JensenShannonDistance", /** -* The Population Stability Index (PSI) metric. -*/"PopulationStabilityIndex", /** -* The Normalized Wasserstein Distance metric. -*/"NormalizedWassersteinDistance", /** -* The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric. -*/"TwoSampleKolmogorovSmirnovTest" - } - -/** -* Defines supported metric goals for hyperparameter tuning -*/ - enum Goal { - "Minimize", "Maximize" - } - -/** -* The specific type of random algorithm -*/ - enum RandomSamplingAlgorithmRule { - "Random", "Sobol" - } - -/** -* Primary metrics for Regression task. -*/ - enum RegressionPrimaryMetrics { - /** -* The Spearman's rank coefficient of correlation is a nonparametric measure of rank correlation. -*/"SpearmanCorrelation", /** -* The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales. -*/"NormalizedRootMeanSquaredError", /** -* The R2 score is one of the performance evaluation measures for forecasting-based machine learning models. -*/"R2Score", /** -* The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales. -*/"NormalizedMeanAbsoluteError" - } - -/** -* Enum for all Regression models supported by AutoML. -*/ - enum RegressionModels { - /** -* Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions. -*/"ElasticNet", /** -* The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution. -*/"GradientBoosting", /** -* Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. -The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. -*/"DecisionTree", /** -* K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints -which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. -*/"KNN", /** -* Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer. -*/"LassoLars", /** -* SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications -to find the model parameters that correspond to the best fit between predicted and actual outputs. -It's an inexact but powerful technique. -*/"SGD", /** -* Random forest is a supervised learning algorithm. -The "forest" it builds, is an ensemble of decision trees, usually trained with the bagging method. -The general idea of the bagging method is that a combination of learning models increases the overall result. -*/"RandomForest", /** -* Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm. -*/"ExtremeRandomTrees", /** -* LightGBM is a gradient boosting framework that uses tree based learning algorithms. -*/"LightGBM", /** -* XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners. -*/"XGBoostRegressor" - } - - - enum RegressionModelPerformanceMetric { - /** -* The Mean Absolute Error (MAE) metric. -*/"MeanAbsoluteError", /** -* The Root Mean Squared Error (RMSE) metric. -*/"RootMeanSquaredError", /** -* The Mean Squared Error (MSE) metric. -*/"MeanSquaredError" - } - - - enum SparkJobEntryType { - "SparkJobPythonEntry", "SparkJobScalaEntry" - } - -/** -* The action enum for networking rule. -*/ - enum RuleAction { - "Allow", "Deny" - } - - - - -/** -* The List Usages operation response. -*/ -model ListUsagesResult is Azure.Core.Page { -} - -/** -* Describes AML Resource Usage. -*/ -model Usage { -/** -* Specifies the resource ID. -*/ -@visibility("read") -"id"?: string; -/** -* Region of the AML workspace in the id. -*/ -@visibility("read") -"amlWorkspaceLocation"?: string; -/** -* Specifies the resource type. -*/ -@visibility("read") -"type"?: string; -/** -* An enum describing the unit of usage measurement. -*/ -@visibility("read") -"unit"?: UsageUnit; -/** -* The current usage of the resource. -*/ -@visibility("read") -"currentValue"?: int64; -/** -* The maximum permitted usage of the resource. -*/ -@visibility("read") -"limit"?: int64; -/** -* The name of the type of usage. -*/ -@visibility("read") -"name"?: UsageName; + * The current provisioning state. + */ +enum PrivateEndpointConnectionProvisioningState { + Succeeded, + Creating, + Deleting, + Failed, } /** -* The Usage Names. -*/ -model UsageName { -/** -* The name of the resource. -*/ -@visibility("read") -"value"?: string; -/** -* The localized name of the resource. -*/ -@visibility("read") -"localizedValue"?: string; + * Authentication type of the connection target + */ +enum ConnectionAuthType { + PAT, + ManagedIdentity, + UsernamePassword, + None, + SAS, + ServicePrincipal, + AccessKey, + ApiKey, + CustomKeys, } /** -* The List Virtual Machine size operation response. -*/ -model VirtualMachineSizeListResult { -/** -* The list of virtual machine sizes supported by AmlCompute. -*/ -"value"?: VirtualMachineSize[]; + * Category of the connection + */ +enum ConnectionCategory { + PythonFeed, + ContainerRegistry, + Git, + S3, + Snowflake, + AzureSqlDb, + AzureSynapseAnalytics, + AzureMySqlDb, + AzurePostgresDb, + ADLSGen2, + Redis, + ApiKey, + AzureOpenAI, + CognitiveSearch, + CognitiveService, + CustomKeys, } /** -* Describes the properties of a VM size. -*/ -model VirtualMachineSize { -/** -* The name of the virtual machine size. -*/ -@visibility("read") -"name"?: string; -/** -* The family name of the virtual machine size. -*/ -@visibility("read") -"family"?: string; -/** -* The number of vCPUs supported by the virtual machine size. -*/ -@visibility("read") -"vCPUs"?: int32; -/** -* The number of gPUs supported by the virtual machine size. -*/ -@visibility("read") -"gpus"?: int32; -/** -* The OS VHD disk size, in MB, allowed by the virtual machine size. -*/ -@visibility("read") -"osVhdSizeMB"?: int32; -/** -* The resource volume size, in MB, allowed by the virtual machine size. -*/ -@visibility("read") -"maxResourceVolumeMB"?: int32; -/** -* The amount of memory, in GB, supported by the virtual machine size. -*/ -@visibility("read") -"memoryGB"?: float64; -/** -* Specifies if the virtual machine size supports low priority VMs. -*/ -@visibility("read") -"lowPriorityCapable"?: boolean; -/** -* Specifies if the virtual machine size supports premium IO. -*/ -@visibility("read") -"premiumIO"?: boolean; -/** -* The estimated price information for using a VM. -*/ -"estimatedVMPrices"?: EstimatedVMPrices; -/** -* Specifies the compute types supported by the virtual machine size. -*/ -"supportedComputeTypes"?: string[]; + * Level of workspace setup error + */ +enum DiagnoseResultLevel { + Warning, + Error, + Information, } /** -* The estimated price info for using a VM. -*/ -model EstimatedVMPrices { -/** -* Three lettered code specifying the currency of the VM price. Example: USD -*/ -"billingCurrency": BillingCurrency; -/** -* The unit of time measurement for the specified VM price. Example: OneHour -*/ -"unitOfMeasure": UnitOfMeasure; -/** -* The list of estimated prices for using a VM of a particular OS type, tier, etc. -*/ -"values": EstimatedVMPrice[]; + * Intended usage of the cluster + */ +enum ClusterPurpose { + FastProd, + DenseProd, + DevTest, } /** -* The estimated price info for using a VM of a particular OS type, tier, etc. -*/ -model EstimatedVMPrice { -/** -* The price charged for using the VM. -*/ -"retailPrice": float64; -/** -* Operating system type used by the VM. -*/ -"osType": VMPriceOSType; -/** -* The type of the VM. -*/ -"vmTier": VMTier; + * Enable or disable ssl for scoring + */ +enum SslConfigStatus { + Disabled, + Enabled, + Auto, } /** -* Quota update parameters. -*/ -model QuotaUpdateParameters { -/** -* The list for update quota. -*/ -"value"?: QuotaBaseProperties[]; -/** -* Region of workspace quota to be updated. -*/ -"location"?: string; + * Load Balancer Type + */ +enum LoadBalancerType { + PublicIp, + InternalLoadBalancer, } /** -* The properties for Quota update or retrieval. -*/ -model QuotaBaseProperties { -/** -* Specifies the resource ID. -*/ -"id"?: string; -/** -* Specifies the resource type. -*/ -"type"?: string; -/** -* The maximum permitted quota of the resource. -*/ -"limit"?: int64; -/** -* An enum describing the unit of quota measurement. -*/ -"unit"?: QuotaUnit; + * Compute OS Type + */ +enum OsType { + Linux, + Windows, } /** -* The result of update workspace quota. -*/ -model UpdateWorkspaceQuotasResult { -/** -* The list of workspace quota update result. -*/ -@visibility("read") -"value"?: UpdateWorkspaceQuotas[]; -/** -* The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page of Workspace Quota update result. -*/ -@visibility("read") -"nextLink"?: string; + * Virtual Machine priority + */ +enum VmPriority { + Dedicated, + LowPriority, } /** -* The properties for update Quota response. -*/ -model UpdateWorkspaceQuotas { -/** -* Specifies the resource ID. -*/ -@visibility("read") -"id"?: string; -/** -* Specifies the resource type. -*/ -@visibility("read") -"type"?: string; -/** -* The maximum permitted quota of the resource. -*/ -"limit"?: int64; -/** -* An enum describing the unit of quota measurement. -*/ -@visibility("read") -"unit"?: QuotaUnit; -/** -* Status of update workspace quota. -*/ -"status"?: Status; + * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. + */ +enum RemoteLoginPortPublicAccess { + Enabled, + Disabled, + NotSpecified, } /** -* The List WorkspaceQuotasByVMFamily operation response. -*/ -model ListWorkspaceQuotas is Azure.Core.Page { + * Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. + */ +enum AllocationState { + Steady, + Resizing, } /** -* The quota assigned to a resource. -*/ -model ResourceQuota { -/** -* Specifies the resource ID. -*/ -@visibility("read") -"id"?: string; -/** -* Region of the AML workspace in the id. -*/ -@visibility("read") -"amlWorkspaceLocation"?: string; -/** -* Specifies the resource type. -*/ -@visibility("read") -"type"?: string; -/** -* Name of the resource. -*/ -@visibility("read") -"name"?: ResourceName; -/** -* The maximum permitted quota of the resource. -*/ -@visibility("read") -"limit"?: int64; -/** -* An enum describing the unit of quota measurement. -*/ -@visibility("read") -"unit"?: QuotaUnit; + * Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role. + */ +enum ApplicationSharingPolicy { + Personal, + Shared, } /** -* The Resource Name. -*/ -model ResourceName { -/** -* The name of the resource. -*/ -@visibility("read") -"value"?: string; -/** -* The localized name of the resource. -*/ -@visibility("read") -"localizedValue"?: string; + * Indicates whether mlflow autologger is enabled for notebooks. + */ +enum MlflowAutologger { + Enabled, + Disabled, } /** -* The resource model definition representing SKU -*/ -model Sku { -/** -* The name of the SKU. Ex - P3. It is typically a letter+number code -*/ -"name": string; -/** -* This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. -*/ -"tier"?: SkuTier; -/** -* The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. -*/ -"size"?: string; -/** -* If the service has different generations of hardware, for the same SKU, then that can be captured here. -*/ -"family"?: string; -/** -* If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. -*/ -"capacity"?: int32; + * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable. + */ +enum SshPublicAccess { + Enabled, + Disabled, } /** -* Common fields that are returned in the response for all Azure Resource Manager resources -*/ -model Resource { -/** -* Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} -*/ -@visibility("read") -"id"?: string; -/** -* The name of the resource -*/ -@visibility("read") -"name"?: string; -/** -* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" -*/ -@visibility("read") -"type"?: string; -/** -* Azure Resource Manager metadata containing createdBy and modifiedBy information. -*/ -@visibility("read") -"systemData"?: SystemData; + * Current state of an ComputeInstance. + */ +enum ComputeInstanceState { + Creating, + CreateFailed, + Deleting, + Running, + Restarting, + JobRunning, + SettingUp, + SetupFailed, + Starting, + Stopped, + Stopping, + UserSettingUp, + UserSetupFailed, + Unknown, + Unusable, } - -model ComputeResourceSchema { /** -* Compute properties -*/ -"properties"?: Compute; + * The Compute Instance Authorization type. Available values are personal (default). + */ +enum ComputeInstanceAuthorizationType { + personal, } /** -* Machine Learning compute object. -*/ -@discriminator("computeType") -model Compute { -/** -* Location for the underlying compute -*/ -@visibility("read", "create") -"computeLocation"?: string; -/** -* The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. -*/ -@visibility("read") -"provisioningState"?: ProvisioningState; -/** -* The description of the Machine Learning compute. -*/ -"description"?: string; -/** -* The time at which the compute was created. -*/ -@visibility("read") -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"createdOn"?: utcDateTime; -/** -* The time at which the compute was last modified. -*/ -@visibility("read") -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"modifiedOn"?: utcDateTime; -/** -* ARM resource id of the underlying compute -*/ -"resourceId"?: string; -/** -* Errors during provisioning -*/ -@visibility("read") -"provisioningErrors"?: ErrorResponse[]; -/** -* Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. -*/ -@visibility("read") -"isAttachedCompute"?: boolean; -/** -* Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. -*/ -@visibility("read", "create") -"disableLocalAuth"?: boolean; + * Name of the last operation. + */ +enum OperationName { + Create, + Start, + Stop, + Restart, + Reimage, + Delete, } /** -* AmlCompute update parameters. -*/ -model ClusterUpdateParameters { -/** -* The properties of the amlCompute. -*/ -"properties"?: ClusterUpdateProperties; + * Operation status. + */ +enum OperationStatus { + InProgress, + Succeeded, + CreateFailed, + StartFailed, + StopFailed, + RestartFailed, + ReimageFailed, + DeleteFailed, } /** -* The properties of a amlCompute that need to be updated. -*/ -model ClusterUpdateProperties { -/** -* Properties of ClusterUpdate -*/ -"properties"?: ScaleSettingsInformation; + * Trigger of operation. + */ +enum OperationTrigger { + User, + Schedule, + IdleShutdown, } /** -* Desired scale settings for the amlCompute. -*/ -model ScaleSettingsInformation { -/** -* scale settings for AML Compute -*/ -"scaleSettings"?: ScaleSettings; + * The current deployment state of schedule. + */ +enum ProvisioningStatus { + Completed, + Provisioning, + Failed, } /** -* scale settings for AML Compute -*/ -model ScaleSettings { -/** -* Max number of nodes to use -*/ -"maxNodeCount": int32; -/** -* Min number of nodes to use -*/ -"minNodeCount"?: int32; -/** -* Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format. -*/ -"nodeIdleTimeBeforeScaleDown"?: duration; + * Is the schedule enabled or disabled? + */ +enum ScheduleStatus { + Enabled, + Disabled, } /** -* Specifies the custom service configuration -*/ -model CustomService extends Record { -/** -* Name of the Custom Service -*/ -"name"?: string; -/** -* Describes the Image Specifications -*/ -"image"?: Image; -/** -* Environment Variable for the container -*/ -"environmentVariables"?: Record; -/** -* Describes the docker settings for the image -*/ -"docker"?: Docker; -/** -* Configuring the endpoints for the container -*/ -"endpoints"?: Endpoint[]; -/** -* Configuring the volumes for the container -*/ -"volumes"?: VolumeDefinition[]; + * [Required] The compute power action. + */ +enum ComputePowerAction { + Start, + Stop, } - -model Image extends Record { /** -* Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images -*/ -"type"?: ImageType = ImageType.docker; -/** -* Image reference URL -*/ -"reference"?: string; + * The current deployment state of schedule. + */ +enum ScheduleProvisioningState { + Completed, + Provisioning, + Failed, } - -model EnvironmentVariable extends Record { -/** -* Type of the Environment Variable. Possible values are: local - For local variable -*/ -"type"?: EnvironmentVariableType = EnvironmentVariableType.local; /** -* Value of the Environment variable -*/ -"value"?: string; + * Auto save settings. + */ +enum Autosave { + None, + Local, + Remote, } - -model Docker extends Record { /** -* Indicate whether container shall run in privileged or non-privileged mode. -*/ -"privileged"?: boolean; + * network of this container. + */ +enum Network { + Bridge, + Host, } - -model Endpoint { -/** -* Protocol over which communication will happen over this endpoint -*/ -"protocol"?: Protocol = Protocol.tcp; -/** -* Name of the Endpoint -*/ -"name"?: string; -/** -* Application port inside the container. -*/ -"target"?: int32; -/** -* Port over which the application is exposed from container. -*/ -"published"?: int32; /** -* Host IP over which the application is exposed from the container -*/ -"hostIp"?: string; + * Caching type of Data Disk. + */ +enum Caching { + None, + ReadOnly, + ReadWrite, } - -model VolumeDefinition { -/** -* Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe -*/ -"type"?: VolumeDefinitionType = VolumeDefinitionType.bind; -/** -* Indicate whether to mount volume as readOnly. Default value for this is false. -*/ -"readOnly"?: boolean; -/** -* Source of the mount. For bind mounts this is the host path. -*/ -"source"?: string; -/** -* Target of the mount. For bind mounts this is the path in the container. -*/ -"target"?: string; -/** -* Consistency of the volume -*/ -"consistency"?: string; -/** -* Bind Options of the mount -*/ -"bind"?: BindOptions; /** -* Volume Options of the mount -*/ -"volume"?: VolumeOptions; -/** -* tmpfs option of the mount -*/ -"tmpfs"?: TmpfsOptions; + * type of this storage account. + */ +enum StorageAccountType { + Standard_LRS, + Premium_LRS, } - -model BindOptions { -/** -* Type of Bind Option -*/ -"propagation"?: string; /** -* Indicate whether to create host path. -*/ -"createHostPath"?: boolean; -/** -* Mention the selinux options. -*/ -"selinux"?: string; + * Data source type. + */ +enum SourceType { + Dataset, + Datastore, + URI, } +/** + * Mount Action. + */ +enum MountAction { + Mount, + Unmount, +} -model VolumeOptions { /** -* Indicate whether volume is nocopy -*/ -"nocopy"?: boolean; + * Mount state. + */ +enum MountState { + MountRequested, + Mounted, + MountFailed, + UnmountRequested, + UnmountFailed, + Unmounted, } +enum MonitoringFeatureFilterType { + /** + * Includes all features. + */ + AllFeatures, -model TmpfsOptions { -/** -* Mention the Tmpfs size -*/ -"size"?: int32; + /** + * Only includes the top contributing features, measured by feature attribution. + */ + TopNByAttribution, + + /** + * Includes a user-defined subset of features. + */ + FeatureSubset, } /** -* Result of AmlCompute Nodes -*/ -@pagedResult -model AmlComputeNodesInformation { -/** -* The collection of returned AmlCompute nodes details. -*/ -@visibility("read") -@items -"nodes"?: AmlComputeNodeInformation[]; -/** -* The continuation token. -*/ -@visibility("read") -@nextLink -"nextLink"?: string; + * Monitor compute identity type enum. + */ +enum MonitorComputeIdentityType { + /** + * Authenticates through user's AML token. + */ + AmlToken, + + /** + * Authenticates through a user-provided managed identity. + */ + ManagedIdentity, } /** -* Compute node information related to a AmlCompute. -*/ -model AmlComputeNodeInformation { -/** -* ID of the compute node. -*/ -@visibility("read") -"nodeId"?: string; -/** -* Private IP address of the compute node. -*/ -@visibility("read") -"privateIpAddress"?: string; -/** -* Public IP address of the compute node. -*/ -@visibility("read") -"publicIpAddress"?: string; -/** -* SSH port number of the node. -*/ -@visibility("read") -"port"?: int32; -/** -* State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. -*/ -@visibility("read") -"nodeState"?: NodeState; -/** -* ID of the Experiment running on the node, if any else null. -*/ -@visibility("read") -"runId"?: string; + * Enum to determine the input data delivery mode. + */ +enum InputDeliveryMode { + ReadOnlyMount, + ReadWriteMount, + Download, + Direct, + EvalMount, + EvalDownload, } /** -* Secrets related to a Machine Learning compute. Might differ for every type of compute. -*/ -@discriminator("computeType") -model ComputeSecrets { + * Output data delivery mode enums. + */ +enum OutputDeliveryMode { + ReadWriteMount, + Upload, + Direct, } /** -* Stops compute instance after user defined period of inactivity. -*/ -model IdleShutdownSetting { -/** -* Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. -*/ -"idleTimeBeforeShutdown"?: string; + * Enum to determine forecast horizon selection mode. + */ +enum ForecastHorizonMode { + /** + * Forecast horizon to be determined automatically. + */ + Auto, + + /** + * Use the custom forecast horizon. + */ + Custom, } /** -* Container for code asset versions. -*/ -model CodeContainer extends AssetContainer { -/** -* Provisioning state for the code container. -*/ -@visibility("read") -"provisioningState"?: AssetProvisioningState; + * Enum to determine the Job Output Type. + */ +enum JobOutputType { + uri_file, + uri_folder, + mltable, + custom_model, + mlflow_model, + triton_model, +} + +/** + * Enum to determine the job tier. + */ +enum JobTier { + Null, + Spot, + Basic, + Standard, + Premium, +} + +/** + * Enum for setting log verbosity. + */ +enum LogVerbosity { + /** + * No logs emitted. + */ + NotSet, + + /** + * Debug and above log statements logged. + */ + Debug, + + /** + * Info and above log statements logged. + */ + Info, + + /** + * Warning and above log statements logged. + */ + Warning, + + /** + * Error and above log statements logged. + */ + Error, + + /** + * Only critical statements logged. + */ + Critical, +} + +/** + * AutoMLJob Task type. + */ +enum TaskType { + /** + * Classification in machine learning and statistics is a supervised learning approach in which + * the computer program learns from the data given to it and make new observations or classifications. + */ + Classification, + + /** + * Regression means to predict the value using the input data. Regression models are used to predict a continuous value. + */ + Regression, + + /** + * Forecasting is a special kind of regression task that deals with time-series data and creates forecasting model + * that can be used to predict the near future values based on the inputs. + */ + Forecasting, + + /** + * Image Classification. Multi-class image classification is used when an image is classified with only a single label + * from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. + */ + ImageClassification, + + /** + * Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels + * from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. + */ + ImageClassificationMultilabel, + + /** + * Image Object Detection. Object detection is used to identify objects in an image and locate each object with a + * bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. + */ + ImageObjectDetection, + + /** + * Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, + * drawing a polygon around each object in the image. + */ + ImageInstanceSegmentation, + + /** + * Text classification (also known as text tagging or text categorization) is the process of sorting texts into categories. + * Categories are mutually exclusive. + */ + TextClassification, + + /** + * Multilabel classification task assigns each sample to a group (zero or more) of target labels. + */ + TextClassificationMultilabel, + + /** + * Text Named Entity Recognition a.k.a. TextNER. + * Named Entity Recognition (NER) is the ability to take free-form text and identify the occurrences of entities such as people, locations, organizations, and more. + */ + TextNER, +} + +/** + * Enum to determine the Job Input Type. + */ +enum JobInputType { + literal, + uri_file, + uri_folder, + mltable, + custom_model, + mlflow_model, + triton_model, +} + +/** + * Determines how N-Cross validations value is determined. + */ +enum NCrossValidationsMode { + /** + * Determine N-Cross validations value automatically. Supported only for 'Forecasting' AutoML task. + */ + Auto, + + /** + * Use custom N-Cross validations value. + */ + Custom, +} + +/** + * Forecasting seasonality mode. + */ +enum SeasonalityMode { + /** + * Seasonality to be determined automatically. + */ + Auto, + + /** + * Use the custom seasonality value. + */ + Custom, +} + +/** + * Target lags selection modes. + */ +enum TargetLagsMode { + /** + * Target lags to be determined automatically. + */ + Auto, + + /** + * Use the custom target lags. + */ + Custom, } +/** + * Target rolling windows size mode. + */ +enum TargetRollingWindowSizeMode { + /** + * Determine rolling windows size automatically. + */ + Auto, -model AssetContainer extends ResourceBase { -/** -* Is the asset archived? -*/ -@visibility("read", "create", "update") -"isArchived"?: boolean; -/** -* The latest version inside this container. -*/ -@visibility("read") -"latestVersion"?: string; -/** -* The next auto incremental version -*/ -@visibility("read") -"nextVersion"?: string; + /** + * Use the specified rolling window size. + */ + Custom, } - -model ResourceBase { /** -* The asset description text. -*/ -"description"?: string; -/** -* The asset property dictionary. -*/ -"properties"?: Record; -/** -* Tag dictionary. Tags can be added, removed, and updated. -*/ -"tags"?: Record; + * Enum to determine the state of mlflow autologger. + */ +enum MLFlowAutologgerState { + Enabled, + Disabled, } -/** -* Code asset version details. -*/ -model CodeVersion extends AssetBase { -/** -* Uri where code is located -*/ -"codeUri"?: string; -/** -* Provisioning state for the code version. -*/ -@visibility("read") -"provisioningState"?: AssetProvisioningState; +enum MonitoringAlertNotificationType { + /** + * Settings for Azure Monitor based alerting. + */ + AzureMonitor, + + /** + * Settings for AML email notifications. + */ + Email, } +enum ServiceDataAccessAuthIdentity { + /** + * Do not use any identity for service data access. + */ + None, -model AssetBase extends ResourceBase { -/** -* Specifies the lifecycle setting of managed data asset. -*/ -@visibility("read", "create", "update") -"autoDeleteSetting"?: AutoDeleteSetting; -/** -* If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous -*/ -@visibility("read", "create") -"isAnonymous"?: boolean; -/** -* Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived -*/ -@visibility("read", "create", "update") -"isArchived"?: boolean; + /** + * Use the system assigned managed identity of the Workspace to authenticate service data access. + */ + WorkspaceSystemAssignedIdentity, + + /** + * Use the user assigned managed identity of the Workspace to authenticate service data access. + */ + WorkspaceUserAssignedIdentity, } +enum EarlyTerminationPolicyType { + Bandit, + MedianStopping, + TruncationSelection, +} + +enum SamplingAlgorithmType { + Grid, + Random, + Bayesian, +} + +enum CategoricalDataDriftMetric { + /** + * The Jensen Shannon Distance (JSD) metric. + */ + JensenShannonDistance, + + /** + * The Population Stability Index (PSI) metric. + */ + PopulationStabilityIndex, + + /** + * The Pearsons Chi Squared Test metric. + */ + PearsonsChiSquaredTest, +} + +enum MonitoringFeatureDataType { + /** + * Used for features of numerical data type. + */ + Numerical, + + /** + * Used for features of categorical data type. + */ + Categorical, +} + +enum CategoricalDataQualityMetric { + /** + * Calculates the rate of null values. + */ + NullValueRate, + + /** + * Calculates the rate of data type errors. + */ + DataTypeErrorRate, + + /** + * Calculates the rate values are out of bounds. + */ + OutOfBoundsRate, +} + +enum CategoricalPredictionDriftMetric { + /** + * The Jensen Shannon Distance (JSD) metric. + */ + JensenShannonDistance, + + /** + * The Population Stability Index (PSI) metric. + */ + PopulationStabilityIndex, + + /** + * The Pearsons Chi Squared Test metric. + */ + PearsonsChiSquaredTest, +} + +/** + * Primary metrics for classification tasks. + */ +enum ClassificationPrimaryMetrics { + /** + * AUC is the Area under the curve. + * This metric represents arithmetic mean of the score for each class, + * weighted by the number of true instances in each class. + */ + AUCWeighted, + + /** + * Accuracy is the ratio of predictions that exactly match the true class labels. + */ + Accuracy, + + /** + * Normalized macro recall is recall macro-averaged and normalized, so that random + * performance has a score of 0, and perfect performance has a score of 1. + */ + NormMacroRecall, + + /** + * The arithmetic mean of the average precision score for each class, weighted by + * the number of true instances in each class. + */ + AveragePrecisionScoreWeighted, + + /** + * The arithmetic mean of precision for each class, weighted by number of true instances in each class. + */ + PrecisionScoreWeighted, +} + +/** + * Enum for all classification models supported by AutoML. + */ +enum ClassificationModels { + /** + * Logistic regression is a fundamental classification technique. + * It belongs to the group of linear classifiers and is somewhat similar to polynomial and linear regression. + * Logistic regression is fast and relatively uncomplicated, and it's convenient for you to interpret the results. + * Although it's essentially a method for binary classification, it can also be applied to multiclass problems. + */ + LogisticRegression, + + /** + * SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications + * to find the model parameters that correspond to the best fit between predicted and actual outputs. + */ + SGD, + + /** + * The multinomial Naive Bayes classifier is suitable for classification with discrete features (e.g., word counts for text classification). + * The multinomial distribution normally requires integer feature counts. However, in practice, fractional counts such as tf-idf may also work. + */ + MultinomialNaiveBayes, + + /** + * Naive Bayes classifier for multivariate Bernoulli models. + */ + BernoulliNaiveBayes, + + /** + * A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. + * After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. + */ + SVM, + + /** + * A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. + * After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. + * Linear SVM performs best when input data is linear, i.e., data can be easily classified by drawing the straight line between classified values on a plotted graph. + */ + LinearSVM, + + /** + * K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints + * which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. + */ + KNN, + + /** + * Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. + * The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. + */ + DecisionTree, + + /** + * Random forest is a supervised learning algorithm. + * The "forest" it builds, is an ensemble of decision trees, usually trained with the bagging method. + * The general idea of the bagging method is that a combination of learning models increases the overall result. + */ + RandomForest, + + /** + * Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm. + */ + ExtremeRandomTrees, + + /** + * LightGBM is a gradient boosting framework that uses tree based learning algorithms. + */ + LightGBM, + + /** + * The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution. + */ + GradientBoosting, + + /** + * XGBoost: Extreme Gradient Boosting Algorithm. This algorithm is used for structured data where target column values can be divided into distinct class values. + */ + XGBoostClassifier, +} + +/** + * The meta-learner is a model trained on the output of the individual heterogeneous models. + * Default meta-learners are LogisticRegression for classification tasks (or LogisticRegressionCV if cross-validation is enabled) and ElasticNet for regression/forecasting tasks (or ElasticNetCV if cross-validation is enabled). + * This parameter can be one of the following strings: LogisticRegression, LogisticRegressionCV, LightGBMClassifier, ElasticNet, ElasticNetCV, LightGBMRegressor, or LinearRegression + */ +enum StackMetaLearnerType { + None, + + /** + * Default meta-learners are LogisticRegression for classification tasks. + */ + LogisticRegression, + + /** + * Default meta-learners are LogisticRegression for classification task when CV is on. + */ + LogisticRegressionCV, + + LightGBMClassifier, + + /** + * Default meta-learners are LogisticRegression for regression task. + */ + ElasticNet, + + /** + * Default meta-learners are LogisticRegression for regression task when CV is on. + */ + ElasticNetCV, + + LightGBMRegressor, + LinearRegression, +} + +/** + * Training mode dictates whether to use distributed training or not + */ +enum TrainingMode { + /** + * Auto mode + */ + Auto, + + /** + * Distributed training mode + */ + Distributed, + + /** + * Non distributed training mode + */ + NonDistributed, +} + +/** + * Enum for all classification models supported by AutoML. + */ +enum BlockedTransformers { + /** + * Target encoding for text data. + */ + TextTargetEncoder, + + /** + * Ohe hot encoding creates a binary feature transformation. + */ + OneHotEncoder, + + /** + * Target encoding for categorical data. + */ + CatTargetEncoder, + + /** + * Tf-Idf stands for, term-frequency times inverse document-frequency. This is a common term weighting scheme for identifying information from documents. + */ + TfIdf, + + /** + * Weight of Evidence encoding is a technique used to encode categorical variables. It uses the natural log of the P(1)/P(0) to create weights. + */ + WoETargetEncoder, + + /** + * Label encoder converts labels/categorical variables in a numerical form. + */ + LabelEncoder, + + /** + * Word embedding helps represents words or phrases as a vector, or a series of numbers. + */ + WordEmbedding, + + /** + * Naive Bayes is a classified that is used for classification of discrete features that are categorically distributed. + */ + NaiveBayes, + + /** + * Count Vectorizer converts a collection of text documents to a matrix of token counts. + */ + CountVectorizer, + + /** + * Hashing One Hot Encoder can turn categorical variables into a limited number of new features. This is often used for high-cardinality categorical features. + */ + HashOneHotEncoder, +} -model AutoDeleteSetting { -/** -* When to check if an asset is expired -*/ -@visibility("read", "create", "update") -"condition"?: AutoDeleteCondition; /** -* Expiration condition value. -*/ -@visibility("read", "create", "update") -"value"?: string; + * Featurization mode - determines data featurization mode. + */ +enum FeaturizationMode { + /** + * Auto mode, system performs featurization without any custom featurization inputs. + */ + Auto, + + /** + * Custom featurization. + */ + Custom, + + /** + * Featurization off. 'Forecasting' task cannot use this value. + */ + Off, } +enum ClassificationModelPerformanceMetric { + /** + * Calculates the accuracy of the model predictions. + */ + Accuracy, + + /** + * Calculates the precision of the model predictions. + */ + Precision, + + /** + * Calculates the recall of the model predictions. + */ + Recall, +} -model PendingUploadRequestDto { -/** -* If PendingUploadId = null then random guid will be used. -*/ -"pendingUploadId"?: string; -/** -* TemporaryBlobReference is the only supported type -*/ -"pendingUploadType"?: PendingUploadType; +enum MonitoringModelType { + /** + * A model trained for classification tasks. + */ + Classification, + + /** + * A model trained for regressions tasks. + */ + Regression, +} + +/** + * Enum to determine the job distribution type. + */ +enum DistributionType { + PyTorch, + TensorFlow, + Mpi, + Ray, } +enum JobLimitsType { + Command, + Sweep, +} -model PendingUploadResponseDto { /** -* Container level read, write, list SAS -*/ -"blobReferenceForConsumption"?: BlobReferenceForConsumptionDto; -/** -* ID for this upload request -*/ -"pendingUploadId"?: string; + * Monitor compute type enum. + */ +enum MonitorComputeType { + /** + * Serverless Spark compute. + */ + ServerlessSpark, +} + /** -* TemporaryBlobReference is the only supported type -*/ -"pendingUploadType"?: PendingUploadType; + * Model task type enum. + */ +enum ModelTaskType { + Classification, + Regression, + QuestionAnswering, } +enum MonitoringNotificationMode { + /** + * Disabled notifications will not produce emails/metrics leveraged for alerting. + */ + Disabled, -model BlobReferenceForConsumptionDto { -/** -* Blob URI path for client to upload data. -Example: https://blob.windows.core.net/Container/Path -*/ -"blobUri"?: url; -/** -* Credential info to access storage account -*/ -"credential"?: PendingUploadCredentialDto; -/** -* Arm ID of the storage account to use -*/ -"storageAccountArmId"?: string; + /** + * Enabled notification will produce emails/metrics leveraged for alerting. + */ + Enabled, } +enum MonitoringSignalType { + /** + * Tracks model input data distribution change, comparing against training data or past production data. + */ + DataDrift, -@discriminator("credentialType") -model PendingUploadCredentialDto { + /** + * Tracks prediction result data distribution change, comparing against validation/test label data or past production data. + */ + PredictionDrift, + + /** + * Tracks model input data integrity. + */ + DataQuality, + + /** + * Tracks feature importance change in production, comparing against feature importance at training time. + */ + FeatureAttributionDrift, + + /** + * Tracks a custom signal provided by users. + */ + Custom, + + /** + * Tracks model performance based on ground truth data. + */ + ModelPerformance, + + /** + * Tracks the safety and quality of generated content. + */ + GenerationSafetyQuality, + + /** + * Tracks the token usage of generative endpoints. + */ + GenerationTokenStatistics, } /** -* Component container definition. - -*/ -model ComponentContainer extends AssetContainer { -/** -* Provisioning state for the component container. -*/ -@visibility("read") -"provisioningState"?: AssetProvisioningState; + * Monitoring input data type enum. + */ +enum MonitoringInputDataType { + /** + * An input data with a fixed window size. + */ + Static, + + /** + * An input data which trailing relatively to the monitor's current run. + */ + Trailing, + + /** + * An input data with tabular format which doesn't require preprocessing. + */ + Fixed, } /** -* Definition of a component version: defines resources that span component types. -*/ -model ComponentVersion extends AssetBase { -/** -* Defines Component definition details. - -*/ -@visibility("read", "create") -"componentSpec"?: Record; -/** -* Provisioning state for the component version. -*/ -@visibility("read") -"provisioningState"?: AssetProvisioningState; -/** -* Stage in the component lifecycle -*/ -"stage"?: string; + * Enum to determine the type of data. + */ +enum DataImportSourceType { + database, + file_system, } -/** -* Container for data asset versions. -*/ -model DataContainer extends AssetContainer { -/** -* [Required] Specifies the type of data. -*/ -@visibility("read", "create") -"dataType": DataType; +enum FeatureAttributionMetric { + /** + * The Normalized Discounted Cumulative Gain metric. + */ + NormalizedDiscountedCumulativeGain, } /** -* Data version base definition -*/ -@discriminator("dataType") -model DataVersionBase extends AssetBase { -/** -* [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"dataUri": string; -/** -* Intellectual Property details. Used if data is an Intellectual Property. -*/ -@visibility("read", "create") -"intellectualProperty"?: IntellectualProperty; -/** -* Stage in the data lifecycle assigned to this data asset -*/ -"stage"?: string; + * Flag for generating lags for the numeric features. + */ +enum FeatureLags { + /** + * No feature lags generated. + */ + None, + + /** + * System auto-generates feature lags. + */ + Auto, } /** -* Intellectual Property details for a resource. -*/ -model IntellectualProperty { -/** -* Protection level of the Intellectual Property. -*/ -"protectionLevel"?: ProtectionLevel; -/** -* [Required] Publisher of the Intellectual Property. Must be the same as Registry publisher name. -*/ -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"publisher": string; + * The parameter defining how if AutoML should handle short time series. + */ +enum ShortSeriesHandlingConfiguration { + /** + * Represents no/null value. + */ + None, + + /** + * Short series will be padded if there are no long series, otherwise short series will be dropped. + */ + Auto, + + /** + * All the short series will be padded. + */ + Pad, + + /** + * All the short series will be dropped. + */ + Drop, +} + +/** + * Target aggregate function. + */ +enum TargetAggregationFunction { + /** + * Represent no value set. + */ + None, + + Sum, + Max, + Min, + Mean, +} + +/** + * Configure STL Decomposition of the time-series target column. + */ +enum UseStl { + /** + * No stl decomposition. + */ + None, + + Season, + SeasonTrend, +} + +/** + * Primary metrics for Forecasting task. + */ +enum ForecastingPrimaryMetrics { + /** + * The Spearman's rank coefficient of correlation is a non-parametric measure of rank correlation. + */ + SpearmanCorrelation, + + /** + * The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales. + */ + NormalizedRootMeanSquaredError, + + /** + * The R2 score is one of the performance evaluation measures for forecasting-based machine learning models. + */ + R2Score, + + /** + * The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales. + */ + NormalizedMeanAbsoluteError, +} + +/** + * Enum for all forecasting models supported by AutoML. + */ +enum ForecastingModels { + /** + * Auto-Autoregressive Integrated Moving Average (ARIMA) model uses time-series data and statistical analysis to interpret the data and make future predictions. + * This model aims to explain data by using time series data on its past values and uses linear regression to make predictions. + */ + AutoArima, + + /** + * Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. + * It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet is robust to missing data and shifts in the trend, and typically handles outliers well. + */ + Prophet, + + /** + * The Naive forecasting model makes predictions by carrying forward the latest target value for each time-series in the training data. + */ + Naive, + + /** + * The Seasonal Naive forecasting model makes predictions by carrying forward the latest season of target values for each time-series in the training data. + */ + SeasonalNaive, + + /** + * The Average forecasting model makes predictions by carrying forward the average of the target values for each time-series in the training data. + */ + Average, + + /** + * The Seasonal Average forecasting model makes predictions by carrying forward the average value of the latest season of data for each time-series in the training data. + */ + SeasonalAverage, + + /** + * Exponential smoothing is a time series forecasting method for univariate data that can be extended to support data with a systematic trend or seasonal component. + */ + ExponentialSmoothing, + + /** + * An Autoregressive Integrated Moving Average with Explanatory Variable (ARIMAX) model can be viewed as a multiple regression model with one or more autoregressive (AR) terms and/or one or more moving average (MA) terms. + * This method is suitable for forecasting when data is stationary/non stationary, and multivariate with any type of data pattern, i.e., level/trend /seasonality/cyclicity. + */ + Arimax, + + /** + * TCNForecaster: Temporal Convolutional Networks Forecaster. //TODO: Ask forecasting team for brief intro. + */ + TCNForecaster, + + /** + * Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions. + */ + ElasticNet, + + /** + * The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution. + */ + GradientBoosting, + + /** + * Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. + * The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. + */ + DecisionTree, + + /** + * K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints + * which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. + */ + KNN, + + /** + * Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer. + */ + LassoLars, + + /** + * SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications + * to find the model parameters that correspond to the best fit between predicted and actual outputs. + * It's an inexact but powerful technique. + */ + SGD, + + /** + * Random forest is a supervised learning algorithm. + * The "forest" it builds, is an ensemble of decision trees, usually trained with the bagging method. + * The general idea of the bagging method is that a combination of learning models increases the overall result. + */ + RandomForest, + + /** + * Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm. + */ + ExtremeRandomTrees, + + /** + * LightGBM is a gradient boosting framework that uses tree based learning algorithms. + */ + LightGBM, + + /** + * XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners. + */ + XGBoostRegressor, +} + +/** + * Generation safety quality metric enum. + */ +enum GenerationSafetyQualityMetric { + AcceptableGroundednessScorePerInstance, + AggregatedGroundednessPassRate, + AcceptableCoherenceScorePerInstance, + AggregatedCoherencePassRate, + AcceptableFluencyScorePerInstance, + AggregatedFluencyPassRate, + AcceptableSimilarityScorePerInstance, + AggregatedSimilarityPassRate, + AcceptableRelevanceScorePerInstance, + AggregatedRelevancePassRate, +} + +/** + * Generation token statistics metric enum. + */ +enum GenerationTokenStatisticsMetric { + TotalTokenCount, + TotalTokenCountPerGroup, +} + +/** + * Learning rate scheduler enum. + */ +enum LearningRateScheduler { + /** + * No learning rate scheduler selected. + */ + None, + + /** + * Cosine Annealing With Warmup. + */ + WarmupCosine, + + /** + * Step learning rate scheduler. + */ + Step, +} + +/** + * Stochastic optimizer for image models. + */ +enum StochasticOptimizer { + /** + * No optimizer selected. + */ + None, + + /** + * Stochastic Gradient Descent optimizer. + */ + Sgd, + + /** + * Adam is algorithm the optimizes stochastic objective functions based on adaptive estimates of moments + */ + Adam, + + /** + * AdamW is a variant of the optimizer Adam that has an improved implementation of weight decay. + */ + Adamw, +} + +/** + * Primary metrics for classification multilabel tasks. + */ +enum ClassificationMultilabelPrimaryMetrics { + /** + * AUC is the Area under the curve. + * This metric represents arithmetic mean of the score for each class, + * weighted by the number of true instances in each class. + */ + AUCWeighted, + + /** + * Accuracy is the ratio of predictions that exactly match the true class labels. + */ + Accuracy, + + /** + * Normalized macro recall is recall macro-averaged and normalized, so that random + * performance has a score of 0, and perfect performance has a score of 1. + */ + NormMacroRecall, + + /** + * The arithmetic mean of the average precision score for each class, weighted by + * the number of true instances in each class. + */ + AveragePrecisionScoreWeighted, + + /** + * The arithmetic mean of precision for each class, weighted by number of true instances in each class. + */ + PrecisionScoreWeighted, + + /** + * Intersection Over Union. Intersection of predictions divided by union of predictions. + */ + IOU, +} + +/** + * Primary metrics for InstanceSegmentation tasks. + */ +enum InstanceSegmentationPrimaryMetrics { + /** + * Mean Average Precision (MAP) is the average of AP (Average Precision). + * AP is calculated for each class and averaged to get the MAP. + */ + MeanAveragePrecision, +} + +enum LogTrainingMetrics { + /** + * Enable compute and log training metrics. + */ + Enable, + + /** + * Disable compute and log training metrics. + */ + Disable, } -/** -* Container for environment specification versions. -*/ -model EnvironmentContainer extends AssetContainer { -/** -* Provisioning state for the environment container. -*/ -@visibility("read") -"provisioningState"?: AssetProvisioningState; +enum LogValidationLoss { + /** + * Enable compute and log validation metrics. + */ + Enable, + + /** + * Disable compute and log validation metrics. + */ + Disable, } /** -* Environment version details. -*/ -model EnvironmentVersion extends AssetBase { -/** -* Defines if image needs to be rebuilt based on base image changes. -*/ -@visibility("read", "create") -"autoRebuild"?: AutoRebuildSetting; -/** -* Configuration settings for Docker build context. -*/ -@visibility("read", "create") -"build"?: BuildContext; -/** -* Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and C/C++ packages. - -*/ -@visibility("read", "create") -"condaFile"?: string; -/** -* Environment type is either user managed or curated by the Azure ML service - -*/ -@visibility("read") -"environmentType"?: EnvironmentType; -/** -* Name of the image that will be used for the environment. - -*/ -@visibility("read", "create") -"image"?: string; -/** -* Defines configuration specific to inference. -*/ -@visibility("read", "create") -"inferenceConfig"?: InferenceContainerProperties; -/** -* Intellectual Property details. Used if environment is an Intellectual Property. -*/ -@visibility("read", "create") -"intellectualProperty"?: IntellectualProperty; -/** -* The OS type of the environment. -*/ -@visibility("read", "create") -"osType"?: OperatingSystemType; -/** -* Provisioning state for the environment version. -*/ -@visibility("read") -"provisioningState"?: AssetProvisioningState; -/** -* Stage in the environment lifecycle assigned to this environment -*/ -"stage"?: string; -} - -/** -* Configuration settings for Docker build context -*/ -model BuildContext { -/** -* [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. - -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"contextUri": string; -/** -* Path to the Dockerfile in the build context. - -*/ -@visibility("read", "create") -"dockerfilePath"?: string = "Dockerfile"; -} + * Image model size. + */ +enum ModelSize { + /** + * No value selected. + */ + None, + /** + * Small size. + */ + Small, -model InferenceContainerProperties { -/** -* The route to check the liveness of the inference server container. -*/ -"livenessRoute"?: Route; -/** -* The route to check the readiness of the inference server container. -*/ -"readinessRoute"?: Route; -/** -* The port to send the scoring requests to, within the inference server container. -*/ -"scoringRoute"?: Route; -} + /** + * Medium size. + */ + Medium, + /** + * Large size. + */ + Large, + + /** + * Extra large size. + */ + ExtraLarge, +} -model Route { -/** -* [Required] The path for the route. -*/ -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"path": string; /** -* [Required] The port for the route. -*/ -"port": int32; -} + * Metric computation method to use for validation metrics in image tasks. + */ +enum ValidationMetricType { + /** + * No metric. + */ + None, + /** + * Coco metric. + */ + Coco, -model ModelContainer extends AssetContainer { -/** -* Provisioning state for the model container. -*/ -@visibility("read") -"provisioningState"?: AssetProvisioningState; + /** + * Voc metric. + */ + Voc, + + /** + * CocoVoc metric. + */ + CocoVoc, } /** -* Model asset version details. -*/ -model ModelVersion extends AssetBase { -/** -* Mapping of model flavors to their properties. -*/ -"flavors"?: Record; -/** -* Intellectual Property details. Used if model is an Intellectual Property. -*/ -@visibility("read", "create") -"intellectualProperty"?: IntellectualProperty; -/** -* Name of the training job which produced this model -*/ -"jobName"?: string; -/** -* The storage format for this entity. Used for NCD. -*/ -"modelType"?: string; -/** -* The URI path to the model contents. -*/ -"modelUri"?: string; -/** -* Provisioning state for the model version. -*/ -@visibility("read") -"provisioningState"?: AssetProvisioningState; -/** -* Stage in the model lifecycle assigned to this model -*/ -"stage"?: string; + * Primary metrics for Image ObjectDetection task. + */ +enum ObjectDetectionPrimaryMetrics { + /** + * Mean Average Precision (MAP) is the average of AP (Average Precision). + * AP is calculated for each class and averaged to get the MAP. + */ + MeanAveragePrecision, } +/** + * Annotation type of image data. + */ +enum ImageAnnotationType { + Classification, + BoundingBox, + InstanceSegmentation, +} -model FlavorData { /** -* Model flavor-specific data. -*/ -"data"?: Record; + * Annotation type of text data. + */ +enum TextAnnotationType { + Classification, + NamedEntityRecognition, } /** -* Model package operation request properties. -*/ -model PackageRequest { -/** -* Base environment to start with. -*/ -@visibility("read", "create") -"baseEnvironmentSource"?: BaseEnvironmentSource; -/** -* Collection of environment variables. -*/ -@visibility("read", "create") -"environmentVariables"?: Record; -/** -* [Required] Inferencing server configurations. -*/ -@visibility("read", "create") -"inferencingServer": InferencingServer; -/** -* Collection of inputs. -*/ -@visibility("read", "create") -"inputs"?: ModelPackageInput[]; -/** -* Model configuration including the mount mode. -*/ -@visibility("read", "create") -"modelConfiguration"?: ModelConfiguration; -/** -* Tag dictionary. Tags can be added, removed, and updated. -*/ -@visibility("read", "create") -"tags"?: Record; + * Enum to determine OneLake artifact type. + */ +enum OneLakeArtifactType { + LakeHouse, +} + /** -* [Required] Arm ID of the target environment to be created by package operation. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"targetEnvironmentId": string; + * Enum of learning rate schedulers that aligns with those supported by HF + */ +enum NlpLearningRateScheduler { + /** + * No learning rate schedule. + */ + None, + + /** + * Linear warmup and decay. + */ + Linear, + + /** + * Linear warmup then cosine decay. + */ + Cosine, + + /** + * Linear warmup, cosine decay, then restart to initial LR. + */ + CosineWithRestarts, + + /** + * Increase linearly then polynomially decay. + */ + Polynomial, + + /** + * Constant learning rate. + */ + Constant, + + /** + * Linear warmup followed by constant value. + */ + ConstantWithWarmup, } +enum NumericalDataDriftMetric { + /** + * The Jensen Shannon Distance (JSD) metric. + */ + JensenShannonDistance, -@discriminator("baseEnvironmentSourceType") -model BaseEnvironmentSource { + /** + * The Population Stability Index (PSI) metric. + */ + PopulationStabilityIndex, + + /** + * The Normalized Wasserstein Distance metric. + */ + NormalizedWassersteinDistance, + + /** + * The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric. + */ + TwoSampleKolmogorovSmirnovTest, } +enum NumericalDataQualityMetric { + /** + * Calculates the rate of null values. + */ + NullValueRate, -@discriminator("serverType") -model InferencingServer { + /** + * Calculates the rate of data type errors. + */ + DataTypeErrorRate, + + /** + * Calculates the rate values are out of bounds. + */ + OutOfBoundsRate, +} + +enum NumericalPredictionDriftMetric { + /** + * The Jensen Shannon Distance (JSD) metric. + */ + JensenShannonDistance, + + /** + * The Population Stability Index (PSI) metric. + */ + PopulationStabilityIndex, + + /** + * The Normalized Wasserstein Distance metric. + */ + NormalizedWassersteinDistance, + + /** + * The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric. + */ + TwoSampleKolmogorovSmirnovTest, +} + +/** + * Defines supported metric goals for hyperparameter tuning + */ +enum Goal { + Minimize, + Maximize, +} + +/** + * The specific type of random algorithm + */ +enum RandomSamplingAlgorithmRule { + Random, + Sobol, +} + +/** + * Primary metrics for Regression task. + */ +enum RegressionPrimaryMetrics { + /** + * The Spearman's rank coefficient of correlation is a nonparametric measure of rank correlation. + */ + SpearmanCorrelation, + + /** + * The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales. + */ + NormalizedRootMeanSquaredError, + + /** + * The R2 score is one of the performance evaluation measures for forecasting-based machine learning models. + */ + R2Score, + + /** + * The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales. + */ + NormalizedMeanAbsoluteError, } /** -* Model package input options. -*/ -model ModelPackageInput { -/** -* [Required] Type of the input included in the target image. -*/ -"inputType": PackageInputType; -/** -* Input delivery mode of the input. -*/ -"mode"?: PackageInputDeliveryMode; -/** -* Relative mount path of the input in the target image. -*/ -"mountPath"?: string; -/** -* [Required] Location of the input. -*/ -"path": PackageInputPathBase; + * Enum for all Regression models supported by AutoML. + */ +enum RegressionModels { + /** + * Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions. + */ + ElasticNet, + + /** + * The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution. + */ + GradientBoosting, + + /** + * Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. + * The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. + */ + DecisionTree, + + /** + * K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints + * which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. + */ + KNN, + + /** + * Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer. + */ + LassoLars, + + /** + * SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications + * to find the model parameters that correspond to the best fit between predicted and actual outputs. + * It's an inexact but powerful technique. + */ + SGD, + + /** + * Random forest is a supervised learning algorithm. + * The "forest" it builds, is an ensemble of decision trees, usually trained with the bagging method. + * The general idea of the bagging method is that a combination of learning models increases the overall result. + */ + RandomForest, + + /** + * Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm. + */ + ExtremeRandomTrees, + + /** + * LightGBM is a gradient boosting framework that uses tree based learning algorithms. + */ + LightGBM, + + /** + * XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners. + */ + XGBoostRegressor, } +enum RegressionModelPerformanceMetric { + /** + * The Mean Absolute Error (MAE) metric. + */ + MeanAbsoluteError, -@discriminator("inputPathType") -model PackageInputPathBase { + /** + * The Root Mean Squared Error (RMSE) metric. + */ + RootMeanSquaredError, + + /** + * The Mean Squared Error (MSE) metric. + */ + MeanSquaredError, +} + +enum SparkJobEntryType { + SparkJobPythonEntry, + SparkJobScalaEntry, } /** -* Model configuration options. -*/ -model ModelConfiguration { -/** -* Input delivery mode for the model. -*/ -"mode"?: PackageInputDeliveryMode; -/** -* Relative mounting path of the model in the target image. -*/ -"mountPath"?: string; + * The action enum for networking rule. + */ +enum RuleAction { + Allow, + Deny, } /** -* Package response returned after async package operation completes successfully. -*/ -model PackageResponse { -/** -* Base environment to start with. -*/ -@visibility("read") -"baseEnvironmentSource"?: BaseEnvironmentSource; -/** -* Build id of the image build operation. -*/ -@visibility("read") -"buildId"?: string; -/** -* Build state of the image build operation. -*/ -@visibility("read") -"buildState"?: PackageBuildState; -/** -* Collection of environment variables. -*/ -@visibility("read") -"environmentVariables"?: Record; -/** -* Inferencing server configurations. -*/ -@visibility("read") -"inferencingServer"?: InferencingServer; -/** -* Collection of inputs. -*/ -@visibility("read") -"inputs"?: ModelPackageInput[]; -/** -* Log url of the image build operation. -*/ -@visibility("read") -"logUrl"?: string; -/** -* Model configuration including the mount mode. -*/ -@visibility("read") -"modelConfiguration"?: ModelConfiguration; -/** -* Tag dictionary. Tags can be added, removed, and updated. -*/ -@visibility("read") -"tags"?: Record; + * The List Usages operation response. + */ +model ListUsagesResult is Azure.Core.Page; + /** -* Asset ID of the target environment created by package operation. -*/ -@visibility("read") -"targetEnvironmentId"?: string; + * Describes AML Resource Usage. + */ +model Usage { + /** + * Specifies the resource ID. + */ + @visibility("read") + id?: string; + + /** + * Region of the AML workspace in the id. + */ + @visibility("read") + amlWorkspaceLocation?: string; + + /** + * Specifies the resource type. + */ + @visibility("read") + type?: string; + + /** + * An enum describing the unit of usage measurement. + */ + @visibility("read") + unit?: UsageUnit; + + /** + * The current usage of the resource. + */ + @visibility("read") + currentValue?: int64; + + /** + * The maximum permitted usage of the resource. + */ + @visibility("read") + limit?: int64; + + /** + * The name of the type of usage. + */ + @visibility("read") + name?: UsageName; +} + +/** + * The Usage Names. + */ +model UsageName { + /** + * The name of the resource. + */ + @visibility("read") + value?: string; + + /** + * The localized name of the resource. + */ + @visibility("read") + localizedValue?: string; } /** -* Batch endpoint configuration. -*/ -model BatchEndpoint extends EndpointPropertiesBase { -/** -* Default values for Batch Endpoint. -*/ -"defaults"?: BatchEndpointDefaults; -/** -* Provisioning state for the endpoint. -*/ -@visibility("read") -"provisioningState"?: EndpointProvisioningState; + * The List Virtual Machine size operation response. + */ +model VirtualMachineSizeListResult { + /** + * The list of virtual machine sizes supported by AmlCompute. + */ + value?: VirtualMachineSize[]; } /** -* Batch endpoint default values -*/ -model BatchEndpointDefaults { -/** -* Name of the deployment that will be default for the endpoint. -This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. -*/ -"deploymentName"?: string; + * Describes the properties of a VM size. + */ +model VirtualMachineSize { + /** + * The name of the virtual machine size. + */ + @visibility("read") + name?: string; + + /** + * The family name of the virtual machine size. + */ + @visibility("read") + family?: string; + + /** + * The number of vCPUs supported by the virtual machine size. + */ + @visibility("read") + vCPUs?: int32; + + /** + * The number of gPUs supported by the virtual machine size. + */ + @visibility("read") + gpus?: int32; + + /** + * The OS VHD disk size, in MB, allowed by the virtual machine size. + */ + @visibility("read") + osVhdSizeMB?: int32; + + /** + * The resource volume size, in MB, allowed by the virtual machine size. + */ + @visibility("read") + maxResourceVolumeMB?: int32; + + /** + * The amount of memory, in GB, supported by the virtual machine size. + */ + @visibility("read") + memoryGB?: float64; + + /** + * Specifies if the virtual machine size supports low priority VMs. + */ + @visibility("read") + lowPriorityCapable?: boolean; + + /** + * Specifies if the virtual machine size supports premium IO. + */ + @visibility("read") + premiumIO?: boolean; + + /** + * The estimated price information for using a VM. + */ + estimatedVMPrices?: EstimatedVMPrices; + + /** + * Specifies the compute types supported by the virtual machine size. + */ + supportedComputeTypes?: string[]; +} + +/** + * The estimated price info for using a VM. + */ +model EstimatedVMPrices { + /** + * Three lettered code specifying the currency of the VM price. Example: USD + */ + billingCurrency: BillingCurrency; + + /** + * The unit of time measurement for the specified VM price. Example: OneHour + */ + unitOfMeasure: UnitOfMeasure; + + /** + * The list of estimated prices for using a VM of a particular OS type, tier, etc. + */ + values: EstimatedVMPrice[]; } /** -* Inference Endpoint base definition -*/ -model EndpointPropertiesBase { -/** -* [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. -*/ -"authMode": EndpointAuthMode; -/** -* Description of the inference endpoint. -*/ -"description"?: string; -/** -* EndpointAuthKeys to set initially on an Endpoint. -This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. -*/ -@visibility("create") -"keys"?: EndpointAuthKeys; -/** -* Property dictionary. Properties can be added, but not removed or altered. -*/ -"properties"?: Record; -/** -* Endpoint URI. -*/ -@visibility("read") -"scoringUri"?: url; -/** -* Endpoint Swagger URI. -*/ -@visibility("read") -"swaggerUri"?: url; + * The estimated price info for using a VM of a particular OS type, tier, etc. + */ +model EstimatedVMPrice { + /** + * The price charged for using the VM. + */ + retailPrice: float64; + + /** + * Operating system type used by the VM. + */ + osType: VMPriceOSType; + + /** + * The type of the VM. + */ + vmTier: VMTier; } /** -* Keys for endpoint authentication. -*/ -model EndpointAuthKeys { -/** -* The primary key. -*/ -@visibility("read", "create") -"primaryKey"?: string; -/** -* The secondary key. -*/ -@visibility("read", "create") -"secondaryKey"?: string; + * Quota update parameters. + */ +model QuotaUpdateParameters { + /** + * The list for update quota. + */ + value?: QuotaBaseProperties[]; + + /** + * Region of workspace quota to be updated. + */ + location?: string; } /** -* Strictly used in update requests. -*/ -model PartialMinimalTrackedResourceWithIdentity extends PartialMinimalTrackedResource { -/** -* Managed service identity (system assigned and/or user assigned identities) -*/ -"identity"?: PartialManagedServiceIdentity; + * The properties for Quota update or retrieval. + */ +model QuotaBaseProperties { + /** + * Specifies the resource ID. + */ + id?: string; + + /** + * Specifies the resource type. + */ + type?: string; + + /** + * The maximum permitted quota of the resource. + */ + limit?: int64; + + /** + * An enum describing the unit of quota measurement. + */ + unit?: QuotaUnit; } /** -* Managed service identity (system assigned and/or user assigned identities) -*/ -model PartialManagedServiceIdentity { -/** -* Managed service identity (system assigned and/or user assigned identities) -*/ -"type"?: ManagedServiceIdentityType; -/** -* The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. -*/ -"userAssignedIdentities"?: Record>; + * The result of update workspace quota. + */ +model UpdateWorkspaceQuotasResult { + /** + * The list of workspace quota update result. + */ + @visibility("read") + value?: UpdateWorkspaceQuotas[]; + + /** + * The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page of Workspace Quota update result. + */ + @visibility("read") + nextLink?: string; } /** -* Strictly used in update requests. -*/ -model PartialMinimalTrackedResource { -/** -* Resource tags. -*/ -"tags"?: Record; + * The properties for update Quota response. + */ +model UpdateWorkspaceQuotas { + /** + * Specifies the resource ID. + */ + @visibility("read") + id?: string; + + /** + * Specifies the resource type. + */ + @visibility("read") + type?: string; + + /** + * The maximum permitted quota of the resource. + */ + limit?: int64; + + /** + * An enum describing the unit of quota measurement. + */ + @visibility("read") + unit?: QuotaUnit; + + /** + * Status of update workspace quota. + */ + status?: Status; } /** -* Batch inference settings per deployment. -*/ -model BatchDeployment extends EndpointDeploymentPropertiesBase { -/** -* Compute target for batch inference operation. -*/ -"compute"?: string; -/** -* Properties relevant to different deployment types. -*/ -"deploymentConfiguration"?: BatchDeploymentConfiguration; -/** -* Error threshold, if the error count for the entire input goes above this value, -the batch inference will be aborted. Range is [-1, int.MaxValue]. -For FileDataset, this value is the count of file failures. -For TabularDataset, this value is the count of record failures. -If set to -1 (the lower bound), all failures during batch inference will be ignored. -*/ -"errorThreshold"?: int32 = -1; -/** -* Logging level for batch inference operation. -*/ -"loggingLevel"?: BatchLoggingLevel; -/** -* Indicates maximum number of parallelism per instance. -*/ -"maxConcurrencyPerInstance"?: int32 = 1; -/** -* Size of the mini-batch passed to each batch invocation. -For FileDataset, this is the number of files per mini-batch. -For TabularDataset, this is the size of the records in bytes, per mini-batch. -*/ -"miniBatchSize"?: int64 = 10; -/** -* Reference to the model asset for the endpoint deployment. -*/ -"model"?: AssetReferenceBase; -/** -* Indicates how the output will be organized. -*/ -"outputAction"?: BatchOutputAction; -/** -* Customized output file name for append_row output action. -*/ -"outputFileName"?: string = "predictions.csv"; -/** -* Provisioning state for the endpoint deployment. -*/ -@visibility("read") -"provisioningState"?: DeploymentProvisioningState; -/** -* Indicates compute configuration for the job. -If not provided, will default to the defaults defined in ResourceConfiguration. -*/ -"resources"?: DeploymentResourceConfiguration; -/** -* Retry Settings for the batch inference operation. -If not provided, will default to the defaults defined in BatchRetrySettings. -*/ -"retrySettings"?: BatchRetrySettings; -} + * The List WorkspaceQuotasByVMFamily operation response. + */ +model ListWorkspaceQuotas is Azure.Core.Page; /** -* Properties relevant to different deployment types. -*/ -@discriminator("deploymentConfigurationType") -model BatchDeploymentConfiguration { + * The quota assigned to a resource. + */ +model ResourceQuota { + /** + * Specifies the resource ID. + */ + @visibility("read") + id?: string; + + /** + * Region of the AML workspace in the id. + */ + @visibility("read") + amlWorkspaceLocation?: string; + + /** + * Specifies the resource type. + */ + @visibility("read") + type?: string; + + /** + * Name of the resource. + */ + @visibility("read") + name?: ResourceName; + + /** + * The maximum permitted quota of the resource. + */ + @visibility("read") + limit?: int64; + + /** + * An enum describing the unit of quota measurement. + */ + @visibility("read") + unit?: QuotaUnit; +} + +/** + * The Resource Name. + */ +model ResourceName { + /** + * The name of the resource. + */ + @visibility("read") + value?: string; + + /** + * The localized name of the resource. + */ + @visibility("read") + localizedValue?: string; } /** -* Base definition for asset references. -*/ -@discriminator("referenceType") -model AssetReferenceBase { -} + * The resource model definition representing SKU + */ +model Sku { + /** + * The name of the SKU. Ex - P3. It is typically a letter+number code + */ + name: string; + /** + * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + */ + tier?: SkuTier; -model DeploymentResourceConfiguration extends ResourceConfiguration { -} + /** + * The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + */ + size?: string; + /** + * If the service has different generations of hardware, for the same SKU, then that can be captured here. + */ + family?: string; -model ResourceConfiguration { -/** -* Optional number of instances or nodes used by the compute target. -*/ -@visibility("read", "create") -"instanceCount"?: int32 = 1; -/** -* Optional type of VM used as supported by the compute target. -*/ -@visibility("read", "create") -"instanceType"?: string; -/** -* Locations where the job can run. -*/ -@visibility("read", "create") -"locations"?: string[]; -/** -* Optional max allowed number of instances or nodes to be used by the compute target. -For use with elastic training, currently supported by PyTorch distribution type only. -*/ -@visibility("read", "create") -"maxInstanceCount"?: int32; -/** -* Additional properties bag. -*/ -@visibility("read", "create") -"properties"?: Record>; + /** + * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. + */ + capacity?: int32; } /** -* Retry settings for a batch inference operation. -*/ -model BatchRetrySettings { -/** -* Maximum retry count for a mini-batch -*/ -"maxRetries"?: int32 = 3; -/** -* Invocation timeout for a mini-batch, in ISO 8601 format. -*/ -"timeout"?: duration = duration.PT30S; + * Common fields that are returned in the response for all Azure Resource Manager resources + */ +model Resource { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + */ + @visibility("read") + id?: string; + + /** + * The name of the resource + */ + @visibility("read") + name?: string; + + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + */ + @visibility("read") + type?: string; + + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @visibility("read") + systemData?: SystemData; } -/** -* Base definition for endpoint deployment. -*/ -model EndpointDeploymentPropertiesBase { -/** -* Code configuration for the endpoint deployment. -*/ -"codeConfiguration"?: CodeConfiguration; -/** -* Description of the endpoint deployment. -*/ -"description"?: string; -/** -* ARM resource ID of the environment specification for the endpoint deployment. -*/ -"environmentId"?: string; -/** -* Environment variables configuration for the deployment. -*/ -"environmentVariables"?: Record; -/** -* Property dictionary. Properties can be added, but not removed or altered. -*/ -"properties"?: Record; +model ComputeResourceSchema { + /** + * Compute properties + */ + properties?: Compute; } /** -* Configuration for a scoring code asset. -*/ -model CodeConfiguration { -/** -* ARM resource ID of the code asset. -*/ -@visibility("read", "create") -"codeId"?: string; + * Machine Learning compute object. + */ +@discriminator("computeType") +model Compute { + /** + * Location for the underlying compute + */ + @visibility("read", "create") + computeLocation?: string; + + /** + * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + */ + @visibility("read") + provisioningState?: ProvisioningState; + + /** + * The description of the Machine Learning compute. + */ + description?: string; + + /** + * The time at which the compute was created. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + /** + * The time at which the compute was last modified. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + modifiedOn?: utcDateTime; + + /** + * ARM resource id of the underlying compute + */ + resourceId?: string; + + /** + * Errors during provisioning + */ + @visibility("read") + provisioningErrors?: ErrorResponse[]; + + /** + * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + */ + @visibility("read") + isAttachedCompute?: boolean; + + /** + * Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + */ + @visibility("read", "create") + disableLocalAuth?: boolean; +} + +/** + * AmlCompute update parameters. + */ +model ClusterUpdateParameters { + /** + * The properties of the amlCompute. + */ + @extension("x-ms-client-flatten", true) + properties?: ClusterUpdateProperties; +} + /** -* [Required] The script to execute on startup. eg. "score.py" -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"scoringScript": string; + * The properties of a amlCompute that need to be updated. + */ +model ClusterUpdateProperties { + /** + * Properties of ClusterUpdate + */ + properties?: ScaleSettingsInformation; } /** -* Strictly used in update requests. -*/ -model PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties { -/** -* Additional attributes of the entity. -*/ -"properties"?: PartialBatchDeployment; -/** -* Resource tags. -*/ -"tags"?: Record; + * Desired scale settings for the amlCompute. + */ +model ScaleSettingsInformation { + /** + * scale settings for AML Compute + */ + scaleSettings?: ScaleSettings; } /** -* Mutable batch inference settings per deployment. -*/ -model PartialBatchDeployment { -/** -* Description of the endpoint deployment. -*/ -"description"?: string; + * scale settings for AML Compute + */ +model ScaleSettings { + /** + * Max number of nodes to use + */ + maxNodeCount: int32; + + /** + * Min number of nodes to use + */ + minNodeCount?: int32; + + /** + * Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format. + */ + nodeIdleTimeBeforeScaleDown?: duration; } /** -* Base definition for datastore contents configuration. -*/ -@discriminator("datastoreType") -model Datastore extends ResourceBase { + * Specifies the custom service configuration + */ +model CustomService extends Record { + /** + * Name of the Custom Service + */ + name?: string; + + /** + * Describes the Image Specifications + */ + image?: Image; + + /** + * Environment Variable for the container + */ + environmentVariables?: Record; + + /** + * Describes the docker settings for the image + */ + docker?: Docker; + + /** + * Configuring the endpoints for the container + */ + endpoints?: Endpoint[]; + + /** + * Configuring the volumes for the container + */ + volumes?: VolumeDefinition[]; +} + +model Image extends Record { + /** + * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images + */ + type?: ImageType = ImageType.docker; + + /** + * Image reference URL + */ + reference?: string; +} + +model EnvironmentVariable extends Record { + /** + * Type of the Environment Variable. Possible values are: local - For local variable + */ + type?: EnvironmentVariableType = EnvironmentVariableType.local; + + /** + * Value of the Environment variable + */ + value?: string; +} + +model Docker extends Record { + /** + * Indicate whether container shall run in privileged or non-privileged mode. + */ + privileged?: boolean; +} + +model Endpoint { + /** + * Protocol over which communication will happen over this endpoint + */ + protocol?: Protocol = Protocol.tcp; + + /** + * Name of the Endpoint + */ + name?: string; + + /** + * Application port inside the container. + */ + target?: int32; + + /** + * Port over which the application is exposed from container. + */ + published?: int32; + + /** + * Host IP over which the application is exposed from the container + */ + hostIp?: string; +} + +model VolumeDefinition { + /** + * Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe + */ + type?: VolumeDefinitionType = VolumeDefinitionType.bind; + + /** + * Indicate whether to mount volume as readOnly. Default value for this is false. + */ + readOnly?: boolean; + + /** + * Source of the mount. For bind mounts this is the host path. + */ + source?: string; + + /** + * Target of the mount. For bind mounts this is the path in the container. + */ + target?: string; + + /** + * Consistency of the volume + */ + consistency?: string; + + /** + * Bind Options of the mount + */ + bind?: BindOptions; + + /** + * Volume Options of the mount + */ + volume?: VolumeOptions; + + /** + * tmpfs option of the mount + */ + tmpfs?: TmpfsOptions; +} + +model BindOptions { + /** + * Type of Bind Option + */ + propagation?: string; + + /** + * Indicate whether to create host path. + */ + createHostPath?: boolean; + + /** + * Mention the selinux options. + */ + selinux?: string; +} + +model VolumeOptions { + /** + * Indicate whether volume is nocopy + */ + nocopy?: boolean; +} + +model TmpfsOptions { + /** + * Mention the Tmpfs size + */ + size?: int32; +} + /** -* [Required] Account credentials. -*/ -"credentials": DatastoreCredentials; + * Result of AmlCompute Nodes + */ +@pagedResult +model AmlComputeNodesInformation { + /** + * The collection of returned AmlCompute nodes details. + */ + @visibility("read") + @items + nodes?: AmlComputeNodeInformation[]; + + /** + * The continuation token. + */ + @visibility("read") + @nextLink + nextLink?: string; +} + /** -* Intellectual Property details. -*/ -@visibility("read", "create") -"intellectualProperty"?: IntellectualProperty; + * Compute node information related to a AmlCompute. + */ +model AmlComputeNodeInformation { + /** + * ID of the compute node. + */ + @visibility("read") + nodeId?: string; + + /** + * Private IP address of the compute node. + */ + @visibility("read") + privateIpAddress?: string; + + /** + * Public IP address of the compute node. + */ + @visibility("read") + publicIpAddress?: string; + + /** + * SSH port number of the node. + */ + @visibility("read") + port?: int32; + + /** + * State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. + */ + @visibility("read") + nodeState?: NodeState; + + /** + * ID of the Experiment running on the node, if any else null. + */ + @visibility("read") + runId?: string; +} + +/** + * Secrets related to a Machine Learning compute. Might differ for every type of compute. + */ +@discriminator("computeType") +model ComputeSecrets {} + /** -* Readonly property to indicate if datastore is the workspace default datastore -*/ -@visibility("read") -"isDefault"?: boolean; + * Stops compute instance after user defined period of inactivity. + */ +model IdleShutdownSetting { + /** + * Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + */ + idleTimeBeforeShutdown?: string; } /** -* Base definition for datastore credentials. -*/ -@discriminator("credentialsType") -model DatastoreCredentials { + * Container for code asset versions. + */ +model CodeContainer extends AssetContainer { + /** + * Provisioning state for the code container. + */ + @visibility("read") + provisioningState?: AssetProvisioningState; } -/** -* Base definition for datastore secrets. -*/ -@discriminator("secretsType") -model DatastoreSecrets { +model AssetContainer extends ResourceBase { + /** + * Is the asset archived? + */ + @visibility("read", "create", "update") + isArchived?: boolean; + + /** + * The latest version inside this container. + */ + @visibility("read") + latestVersion?: string; + + /** + * The next auto incremental version + */ + @visibility("read") + nextVersion?: string; +} + +model ResourceBase { + /** + * The asset description text. + */ + description?: string; + + /** + * The asset property dictionary. + */ + properties?: Record; + + /** + * Tag dictionary. Tags can be added, removed, and updated. + */ + tags?: Record; } /** -* Dto object representing feature set -*/ -model FeaturesetContainerProperties extends AssetContainer { + * Code asset version details. + */ +model CodeVersion extends AssetBase { + /** + * Uri where code is located + */ + codeUri?: string; + + /** + * Provisioning state for the code version. + */ + @visibility("read") + provisioningState?: AssetProvisioningState; +} + +model AssetBase extends ResourceBase { + /** + * Specifies the lifecycle setting of managed data asset. + */ + @visibility("read", "create", "update") + autoDeleteSetting?: AutoDeleteSetting; + + /** + * If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous + */ + @visibility("read", "create") + isAnonymous?: boolean; + + /** + * Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived + */ + @visibility("read", "create", "update") + isArchived?: boolean; +} + +model AutoDeleteSetting { + /** + * When to check if an asset is expired + */ + @visibility("read", "create", "update") + condition?: AutoDeleteCondition; + + /** + * Expiration condition value. + */ + @visibility("read", "create", "update") + value?: string; +} + +model PendingUploadRequestDto { + /** + * If PendingUploadId = null then random guid will be used. + */ + pendingUploadId?: string; + + /** + * TemporaryBlobReference is the only supported type + */ + pendingUploadType?: PendingUploadType; +} + +model PendingUploadResponseDto { + /** + * Container level read, write, list SAS + */ + blobReferenceForConsumption?: BlobReferenceForConsumptionDto; + + /** + * ID for this upload request + */ + pendingUploadId?: string; + + /** + * TemporaryBlobReference is the only supported type + */ + pendingUploadType?: PendingUploadType; +} + +model BlobReferenceForConsumptionDto { + /** + * Blob URI path for client to upload data. + * Example: https://blob.windows.core.net/Container/Path + */ + blobUri?: url; + + /** + * Credential info to access storage account + */ + credential?: PendingUploadCredentialDto; + + /** + * Arm ID of the storage account to use + */ + storageAccountArmId?: string; +} + +@discriminator("credentialType") +model PendingUploadCredentialDto {} + /** -* Provisioning state for the featureset container. -*/ -@visibility("read") -"provisioningState"?: AssetProvisioningState; + * Component container definition. + * + */ +model ComponentContainer extends AssetContainer { + /** + * Provisioning state for the component container. + */ + @visibility("read") + provisioningState?: AssetProvisioningState; } /** -* Dto object representing feature -*/ -model FeatureProperties extends ResourceBase { + * Definition of a component version: defines resources that span component types. + */ +model ComponentVersion extends AssetBase { + /** + * Defines Component definition details. + * + */ + @visibility("read", "create") + componentSpec?: Record; + + /** + * Provisioning state for the component version. + */ + @visibility("read") + provisioningState?: AssetProvisioningState; + + /** + * Stage in the component lifecycle + */ + stage?: string; +} + /** -* Specifies type -*/ -"dataType"?: FeatureDataType; + * Container for data asset versions. + */ +model DataContainer extends AssetContainer { + /** + * [Required] Specifies the type of data. + */ + @visibility("read", "create") + dataType: DataType; +} + /** -* Specifies name -*/ -"featureName"?: string; + * Data version base definition + */ +@discriminator("dataType") +model DataVersionBase extends AssetBase { + /** + * [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330 + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + dataUri: string; + + /** + * Intellectual Property details. Used if data is an Intellectual Property. + */ + @visibility("read", "create") + intellectualProperty?: IntellectualProperty; + + /** + * Stage in the data lifecycle assigned to this data asset + */ + stage?: string; } /** -* Dto object representing feature set version -*/ -model FeaturesetVersionProperties extends AssetBase { + * Intellectual Property details for a resource. + */ +model IntellectualProperty { + /** + * Protection level of the Intellectual Property. + */ + protectionLevel?: ProtectionLevel; + + /** + * [Required] Publisher of the Intellectual Property. Must be the same as Registry publisher name. + */ + @minLength(1) + @pattern("[a-zA-Z0-9_]") + publisher: string; +} + /** -* Specifies list of entities -*/ -"entities"?: string[]; + * Container for environment specification versions. + */ +model EnvironmentContainer extends AssetContainer { + /** + * Provisioning state for the environment container. + */ + @visibility("read") + provisioningState?: AssetProvisioningState; +} + /** -* Specifies the materialization settings -*/ -"materializationSettings"?: MaterializationSettings; + * Environment version details. + */ +model EnvironmentVersion extends AssetBase { + /** + * Defines if image needs to be rebuilt based on base image changes. + */ + @visibility("read", "create") + autoRebuild?: AutoRebuildSetting; + + /** + * Configuration settings for Docker build context. + */ + @visibility("read", "create") + build?: BuildContext; + + /** + * Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and C/C++ packages. + * + */ + @visibility("read", "create") + condaFile?: string; + + /** + * Environment type is either user managed or curated by the Azure ML service + * + */ + @visibility("read") + environmentType?: EnvironmentType; + + /** + * Name of the image that will be used for the environment. + * + */ + @visibility("read", "create") + image?: string; + + /** + * Defines configuration specific to inference. + */ + @visibility("read", "create") + inferenceConfig?: InferenceContainerProperties; + + /** + * Intellectual Property details. Used if environment is an Intellectual Property. + */ + @visibility("read", "create") + intellectualProperty?: IntellectualProperty; + + /** + * The OS type of the environment. + */ + @visibility("read", "create") + osType?: OperatingSystemType; + + /** + * Provisioning state for the environment version. + */ + @visibility("read") + provisioningState?: AssetProvisioningState; + + /** + * Stage in the environment lifecycle assigned to this environment + */ + stage?: string; +} + +/** + * Configuration settings for Docker build context + */ +model BuildContext { + /** + * [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. + * + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + contextUri: string; + + /** + * Path to the Dockerfile in the build context. + * + */ + @visibility("read", "create") + dockerfilePath?: string = "Dockerfile"; +} + +model InferenceContainerProperties { + /** + * The route to check the liveness of the inference server container. + */ + livenessRoute?: Route; + + /** + * The route to check the readiness of the inference server container. + */ + readinessRoute?: Route; + + /** + * The port to send the scoring requests to, within the inference server container. + */ + scoringRoute?: Route; +} + +model Route { + /** + * [Required] The path for the route. + */ + @minLength(1) + @pattern("[a-zA-Z0-9_]") + path: string; + + /** + * [Required] The port for the route. + */ + port: int32; +} + +model ModelContainer extends AssetContainer { + /** + * Provisioning state for the model container. + */ + @visibility("read") + provisioningState?: AssetProvisioningState; +} + /** -* Provisioning state for the featureset version container. -*/ -@visibility("read") -"provisioningState"?: AssetProvisioningState; + * Model asset version details. + */ +model ModelVersion extends AssetBase { + /** + * Mapping of model flavors to their properties. + */ + flavors?: Record; + + /** + * Intellectual Property details. Used if model is an Intellectual Property. + */ + @visibility("read", "create") + intellectualProperty?: IntellectualProperty; + + /** + * Name of the training job which produced this model + */ + jobName?: string; + + /** + * The storage format for this entity. Used for NCD. + */ + modelType?: string; + + /** + * The URI path to the model contents. + */ + modelUri?: string; + + /** + * Provisioning state for the model version. + */ + @visibility("read") + provisioningState?: AssetProvisioningState; + + /** + * Stage in the model lifecycle assigned to this model + */ + stage?: string; +} + +model FlavorData { + /** + * Model flavor-specific data. + */ + data?: Record; +} + /** -* Specifies the feature spec details -*/ -"specification"?: FeaturesetSpecification; + * Model package operation request properties. + */ +model PackageRequest { + /** + * Base environment to start with. + */ + @visibility("read", "create") + baseEnvironmentSource?: BaseEnvironmentSource; + + /** + * Collection of environment variables. + */ + @visibility("read", "create") + environmentVariables?: Record; + + /** + * [Required] Inferencing server configurations. + */ + @visibility("read", "create") + inferencingServer: InferencingServer; + + /** + * Collection of inputs. + */ + @visibility("read", "create") + inputs?: ModelPackageInput[]; + + /** + * Model configuration including the mount mode. + */ + @visibility("read", "create") + modelConfiguration?: ModelConfiguration; + + /** + * Tag dictionary. Tags can be added, removed, and updated. + */ + @visibility("read", "create") + tags?: Record; + + /** + * [Required] Arm ID of the target environment to be created by package operation. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + targetEnvironmentId: string; +} + +@discriminator("baseEnvironmentSourceType") +model BaseEnvironmentSource {} + +@discriminator("serverType") +model InferencingServer {} + /** -* Specifies the asset stage -*/ -"stage"?: string; + * Model package input options. + */ +model ModelPackageInput { + /** + * [Required] Type of the input included in the target image. + */ + inputType: PackageInputType; + + /** + * Input delivery mode of the input. + */ + mode?: PackageInputDeliveryMode; + + /** + * Relative mount path of the input in the target image. + */ + mountPath?: string; + + /** + * [Required] Location of the input. + */ + path: PackageInputPathBase; } +@discriminator("inputPathType") +model PackageInputPathBase {} -model MaterializationSettings { /** -* Specifies the notification details -*/ -"notification"?: NotificationSetting; + * Model configuration options. + */ +model ModelConfiguration { + /** + * Input delivery mode for the model. + */ + mode?: PackageInputDeliveryMode; + + /** + * Relative mounting path of the model in the target image. + */ + mountPath?: string; +} + /** -* Specifies the compute resource settings -*/ -"resource"?: MaterializationComputeResource; + * Package response returned after async package operation completes successfully. + */ +model PackageResponse { + /** + * Base environment to start with. + */ + @visibility("read") + baseEnvironmentSource?: BaseEnvironmentSource; + + /** + * Build id of the image build operation. + */ + @visibility("read") + buildId?: string; + + /** + * Build state of the image build operation. + */ + @visibility("read") + buildState?: PackageBuildState; + + /** + * Collection of environment variables. + */ + @visibility("read") + environmentVariables?: Record; + + /** + * Inferencing server configurations. + */ + @visibility("read") + inferencingServer?: InferencingServer; + + /** + * Collection of inputs. + */ + @visibility("read") + inputs?: ModelPackageInput[]; + + /** + * Log url of the image build operation. + */ + @visibility("read") + logUrl?: string; + + /** + * Model configuration including the mount mode. + */ + @visibility("read") + modelConfiguration?: ModelConfiguration; + + /** + * Tag dictionary. Tags can be added, removed, and updated. + */ + @visibility("read") + tags?: Record; + + /** + * Asset ID of the target environment created by package operation. + */ + @visibility("read") + targetEnvironmentId?: string; +} + +/** + * Batch endpoint configuration. + */ +model BatchEndpoint extends EndpointPropertiesBase { + /** + * Default values for Batch Endpoint. + */ + defaults?: BatchEndpointDefaults; + + /** + * Provisioning state for the endpoint. + */ + @visibility("read") + provisioningState?: EndpointProvisioningState; +} + /** -* Specifies the schedule details -*/ -"schedule"?: RecurrenceTrigger; + * Batch endpoint default values + */ +model BatchEndpointDefaults { + /** + * Name of the deployment that will be default for the endpoint. + * This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. + */ + deploymentName?: string; +} + /** -* Specifies the spark compute settings -*/ -"sparkConfiguration"?: Record; + * Inference Endpoint base definition + */ +model EndpointPropertiesBase { + /** + * [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + */ + authMode: EndpointAuthMode; + + /** + * Description of the inference endpoint. + */ + description?: string; + + /** + * EndpointAuthKeys to set initially on an Endpoint. + * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. + */ + @visibility("create") + keys?: EndpointAuthKeys; + + /** + * Property dictionary. Properties can be added, but not removed or altered. + */ + properties?: Record; + + /** + * Endpoint URI. + */ + @visibility("read") + scoringUri?: url; + + /** + * Endpoint Swagger URI. + */ + @visibility("read") + swaggerUri?: url; +} + +/** + * Keys for endpoint authentication. + */ +model EndpointAuthKeys { + /** + * The primary key. + */ + @visibility("read", "create") + primaryKey?: string; + + /** + * The secondary key. + */ + @visibility("read", "create") + secondaryKey?: string; +} + /** -* Specifies the stores to which materialization should happen -*/ -"storeType"?: MaterializationStoreType; + * Strictly used in update requests. + */ +model PartialMinimalTrackedResourceWithIdentity + extends PartialMinimalTrackedResource { + /** + * Managed service identity (system assigned and/or user assigned identities) + */ + identity?: PartialManagedServiceIdentity; } /** -* Configuration for notification. -*/ -model NotificationSetting { + * Managed service identity (system assigned and/or user assigned identities) + */ +model PartialManagedServiceIdentity { + /** + * Managed service identity (system assigned and/or user assigned identities) + */ + type?: ManagedServiceIdentityType; + + /** + * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. + */ + userAssignedIdentities?: Record>; +} + /** -* Send email notification to user on specified notification type -*/ -@visibility("read", "create") -"emailOn"?: EmailNotificationEnableType[]; + * Strictly used in update requests. + */ +model PartialMinimalTrackedResource { + /** + * Resource tags. + */ + tags?: Record; +} + /** -* This is the email recipient list which has a limitation of 499 characters in total concat with comma separator -*/ -@visibility("read", "create") -"emails"?: string[]; + * Batch inference settings per deployment. + */ +model BatchDeployment extends EndpointDeploymentPropertiesBase { + /** + * Compute target for batch inference operation. + */ + compute?: string; + + /** + * Properties relevant to different deployment types. + */ + deploymentConfiguration?: BatchDeploymentConfiguration; + + /** + * Error threshold, if the error count for the entire input goes above this value, + * the batch inference will be aborted. Range is [-1, int.MaxValue]. + * For FileDataset, this value is the count of file failures. + * For TabularDataset, this value is the count of record failures. + * If set to -1 (the lower bound), all failures during batch inference will be ignored. + */ + errorThreshold?: int32 = -1; + + /** + * Logging level for batch inference operation. + */ + loggingLevel?: BatchLoggingLevel; + + /** + * Indicates maximum number of parallelism per instance. + */ + maxConcurrencyPerInstance?: int32 = 1; + + /** + * Size of the mini-batch passed to each batch invocation. + * For FileDataset, this is the number of files per mini-batch. + * For TabularDataset, this is the size of the records in bytes, per mini-batch. + */ + miniBatchSize?: int64 = 10; + + /** + * Reference to the model asset for the endpoint deployment. + */ + `model`?: AssetReferenceBase; + + /** + * Indicates how the output will be organized. + */ + outputAction?: BatchOutputAction; + + /** + * Customized output file name for append_row output action. + */ + outputFileName?: string = "predictions.csv"; + + /** + * Provisioning state for the endpoint deployment. + */ + @visibility("read") + provisioningState?: DeploymentProvisioningState; + + /** + * Indicates compute configuration for the job. + * If not provided, will default to the defaults defined in ResourceConfiguration. + */ + resources?: DeploymentResourceConfiguration; + + /** + * Retry Settings for the batch inference operation. + * If not provided, will default to the defaults defined in BatchRetrySettings. + */ + retrySettings?: BatchRetrySettings; +} + +/** + * Properties relevant to different deployment types. + */ +@discriminator("deploymentConfigurationType") +model BatchDeploymentConfiguration {} + /** -* Send webhook callback to a service. Key is a user-provided name for the webhook. -*/ -@visibility("read", "create", "update") -"webhooks"?: Record; + * Base definition for asset references. + */ +@discriminator("referenceType") +model AssetReferenceBase {} + +model DeploymentResourceConfiguration extends ResourceConfiguration {} + +model ResourceConfiguration { + /** + * Optional number of instances or nodes used by the compute target. + */ + @visibility("read", "create") + instanceCount?: int32 = 1; + + /** + * Optional type of VM used as supported by the compute target. + */ + @visibility("read", "create") + instanceType?: string; + + /** + * Locations where the job can run. + */ + @visibility("read", "create") + locations?: string[]; + + /** + * Optional max allowed number of instances or nodes to be used by the compute target. + * For use with elastic training, currently supported by PyTorch distribution type only. + */ + @visibility("read", "create") + maxInstanceCount?: int32; + + /** + * Additional properties bag. + */ + @visibility("read", "create") + properties?: Record>; +} + +/** + * Retry settings for a batch inference operation. + */ +model BatchRetrySettings { + /** + * Maximum retry count for a mini-batch + */ + maxRetries?: int32 = 3; + + /** + * Invocation timeout for a mini-batch, in ISO 8601 format. + */ + timeout?: duration = "PT30S"; } /** -* Webhook base -*/ -@discriminator("webhookType") -model Webhook { -/** -* Send callback on a specified notification event -*/ -@visibility("read", "create") -"eventType"?: string; + * Base definition for endpoint deployment. + */ +model EndpointDeploymentPropertiesBase { + /** + * Code configuration for the endpoint deployment. + */ + codeConfiguration?: CodeConfiguration; + + /** + * Description of the endpoint deployment. + */ + description?: string; + + /** + * ARM resource ID of the environment specification for the endpoint deployment. + */ + environmentId?: string; + + /** + * Environment variables configuration for the deployment. + */ + environmentVariables?: Record; + + /** + * Property dictionary. Properties can be added, but not removed or altered. + */ + properties?: Record; } /** -* Dto object representing compute resource -*/ -model MaterializationComputeResource { + * Configuration for a scoring code asset. + */ +model CodeConfiguration { + /** + * ARM resource ID of the code asset. + */ + @visibility("read", "create") + codeId?: string; + + /** + * [Required] The script to execute on startup. eg. "score.py" + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + scoringScript: string; +} + /** -* Specifies the instance type -*/ -"instanceType"?: string; + * Strictly used in update requests. + */ +model PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties { + /** + * Additional attributes of the entity. + */ + properties?: PartialBatchDeployment; + + /** + * Resource tags. + */ + tags?: Record; } +/** + * Mutable batch inference settings per deployment. + */ +model PartialBatchDeployment { + /** + * Description of the endpoint deployment. + */ + description?: string; +} -model RecurrenceTrigger extends TriggerBase { /** -* [Required] The frequency to trigger schedule. -*/ -"frequency": RecurrenceFrequency; + * Base definition for datastore contents configuration. + */ +@discriminator("datastoreType") +model Datastore extends ResourceBase { + /** + * [Required] Account credentials. + */ + credentials: DatastoreCredentials; + + /** + * Intellectual Property details. + */ + @visibility("read", "create") + intellectualProperty?: IntellectualProperty; + + /** + * Readonly property to indicate if datastore is the workspace default datastore + */ + @visibility("read") + isDefault?: boolean; +} + /** -* [Required] Specifies schedule interval in conjunction with frequency -*/ -"interval": int32; + * Base definition for datastore credentials. + */ +@discriminator("credentialsType") +model DatastoreCredentials {} + /** -* The recurrence schedule. -*/ -"schedule"?: RecurrenceSchedule; + * Base definition for datastore secrets. + */ +@discriminator("secretsType") +model DatastoreSecrets {} + /** -* [Required] -*/ -"triggerType": "Recurrence"; + * Dto object representing feature set + */ +model FeaturesetContainerProperties extends AssetContainer { + /** + * Provisioning state for the featureset container. + */ + @visibility("read") + provisioningState?: AssetProvisioningState; } +/** + * Dto object representing feature + */ +model FeatureProperties extends ResourceBase { + /** + * Specifies type + */ + dataType?: FeatureDataType; + + /** + * Specifies name + */ + featureName?: string; +} -model RecurrenceSchedule { /** -* [Required] List of hours for the schedule. -*/ -"hours": int32[]; + * Dto object representing feature set version + */ +model FeaturesetVersionProperties extends AssetBase { + /** + * Specifies list of entities + */ + entities?: string[]; + + /** + * Specifies the materialization settings + */ + materializationSettings?: MaterializationSettings; + + /** + * Provisioning state for the featureset version container. + */ + @visibility("read") + provisioningState?: AssetProvisioningState; + + /** + * Specifies the feature spec details + */ + specification?: FeaturesetSpecification; + + /** + * Specifies the asset stage + */ + stage?: string; +} + +model MaterializationSettings { + /** + * Specifies the notification details + */ + notification?: NotificationSetting; + + /** + * Specifies the compute resource settings + */ + resource?: MaterializationComputeResource; + + /** + * Specifies the schedule details + */ + schedule?: RecurrenceTrigger; + + /** + * Specifies the spark compute settings + */ + sparkConfiguration?: Record; + + /** + * Specifies the stores to which materialization should happen + */ + storeType?: MaterializationStoreType; +} + /** -* [Required] List of minutes for the schedule. -*/ -"minutes": int32[]; + * Configuration for notification. + */ +model NotificationSetting { + /** + * Send email notification to user on specified notification type + */ + @visibility("read", "create") + emailOn?: EmailNotificationEnableType[]; + + /** + * This is the email recipient list which has a limitation of 499 characters in total concat with comma separator + */ + @visibility("read", "create") + emails?: string[]; + + /** + * Send webhook callback to a service. Key is a user-provided name for the webhook. + */ + @visibility("read", "create", "update") + webhooks?: Record; +} + /** -* List of month days for the schedule -*/ -"monthDays"?: int32[]; + * Webhook base + */ +@discriminator("webhookType") +model Webhook { + /** + * Send callback on a specified notification event + */ + @visibility("read", "create") + eventType?: string; +} + /** -* List of days for the schedule. -*/ -"weekDays"?: WeekDay[]; + * Dto object representing compute resource + */ +model MaterializationComputeResource { + /** + * Specifies the instance type + */ + instanceType?: string; } +model RecurrenceTrigger extends TriggerBase { + /** + * [Required] The frequency to trigger schedule. + */ + frequency: RecurrenceFrequency; + + /** + * [Required] Specifies schedule interval in conjunction with frequency + */ + interval: int32; + + /** + * The recurrence schedule. + */ + schedule?: RecurrenceSchedule; + + /** + * [Required] + */ + triggerType: "Recurrence"; +} + +model RecurrenceSchedule { + /** + * [Required] List of hours for the schedule. + */ + hours: int32[]; + + /** + * [Required] List of minutes for the schedule. + */ + minutes: int32[]; + + /** + * List of month days for the schedule + */ + monthDays?: int32[]; + + /** + * List of days for the schedule. + */ + weekDays?: WeekDay[]; +} @discriminator("triggerType") model TriggerBase { -/** -* Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. -Recommented format would be "2022-06-01T00:00:01" -If not present, the schedule will run indefinitely -*/ -"endTime"?: string; -/** -* Specifies start time of schedule in ISO 8601 format, but without a UTC offset. -*/ -"startTime"?: string; -/** -* Specifies time zone in which the schedule runs. -TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 -*/ -"timeZone"?: string = "UTC"; + /** + * Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. + * Recommented format would be "2022-06-01T00:00:01" + * If not present, the schedule will run indefinitely + */ + endTime?: string; + + /** + * Specifies start time of schedule in ISO 8601 format, but without a UTC offset. + */ + startTime?: string; + + /** + * Specifies time zone in which the schedule runs. + * TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 + */ + timeZone?: string = "UTC"; } /** -* Dto object representing specification -*/ + * Dto object representing specification + */ model FeaturesetSpecification { -/** -* Specifies the spec path -*/ -"path"?: string; + /** + * Specifies the spec path + */ + path?: string; } /** -* Request payload for creating a backfill request for a given feature set version -*/ + * Request payload for creating a backfill request for a given feature set version + */ model FeaturesetVersionBackfillRequest { -/** -* Specifies description -*/ -"description"?: string; -/** -* Specifies description -*/ -"displayName"?: string; -/** -* Specifies the backfill feature window to be materialized -*/ -"featureWindow"?: FeatureWindow; -/** -* Specifies the compute resource settings -*/ -"resource"?: MaterializationComputeResource; -/** -* Specifies the spark compute settings -*/ -"sparkConfiguration"?: Record; -/** -* Specifies the tags -*/ -"tags"?: Record; + /** + * Specifies description + */ + description?: string; + + /** + * Specifies description + */ + displayName?: string; + + /** + * Specifies the backfill feature window to be materialized + */ + featureWindow?: FeatureWindow; + + /** + * Specifies the compute resource settings + */ + resource?: MaterializationComputeResource; + + /** + * Specifies the spark compute settings + */ + sparkConfiguration?: Record; + + /** + * Specifies the tags + */ + tags?: Record; } /** -* Specifies the feature window -*/ + * Specifies the feature window + */ model FeatureWindow { -/** -* Specifies the feature window end time -*/ -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"featureWindowEnd"?: utcDateTime; -/** -* Specifies the feature window start time -*/ -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"featureWindowStart"?: utcDateTime; + /** + * Specifies the feature window end time + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + featureWindowEnd?: utcDateTime; + + /** + * Specifies the feature window start time + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + featureWindowStart?: utcDateTime; } /** -* Dto object representing the feature set job -*/ + * Dto object representing the feature set job + */ model FeaturesetJob { -/** -* Specifies the created date -*/ -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"createdDate"?: utcDateTime; -/** -* Specifies the display name -*/ -"displayName"?: string; -/** -* Specifies the duration -*/ -"duration"?: duration; -/** -* Specifies the experiment id -*/ -"experimentId"?: string; -/** -* Specifies the backfill feature window to be materialized -*/ -"featureWindow"?: FeatureWindow; -/** -* Specifies the job id -*/ -"jobId"?: string; -/** -* Specifies the job status -*/ -"status"?: JobStatus; -/** -* Specifies the tags if any -*/ -"tags"?: Record; -/** -* Specifies the feature store job type -*/ -"type"?: FeaturestoreJobType; + /** + * Specifies the created date + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDate?: utcDateTime; + + /** + * Specifies the display name + */ + displayName?: string; + + /** + * Specifies the duration + */ + duration?: duration; + + /** + * Specifies the experiment id + */ + experimentId?: string; + + /** + * Specifies the backfill feature window to be materialized + */ + featureWindow?: FeatureWindow; + + /** + * Specifies the job id + */ + jobId?: string; + + /** + * Specifies the job status + */ + status?: JobStatus; + + /** + * Specifies the tags if any + */ + tags?: Record; + + /** + * Specifies the feature store job type + */ + type?: FeaturestoreJobType; } /** -* A paginated list of FeaturesetJob entities. -*/ -model FeaturesetJobArmPaginatedResult is Azure.Core.Page { -} + * A paginated list of FeaturesetJob entities. + */ +model FeaturesetJobArmPaginatedResult is Azure.Core.Page; /** -* Dto object representing feature entity -*/ + * Dto object representing feature entity + */ model FeaturestoreEntityContainerProperties extends AssetContainer { -/** -* Provisioning state for the featurestore entity container. -*/ -@visibility("read") -"provisioningState"?: AssetProvisioningState; + /** + * Provisioning state for the featurestore entity container. + */ + @visibility("read") + provisioningState?: AssetProvisioningState; } /** -* Dto object representing feature entity version -*/ + * Dto object representing feature entity version + */ model FeaturestoreEntityVersionProperties extends AssetBase { -/** -* Specifies index columns -*/ -"indexColumns"?: IndexColumn[]; -/** -* Provisioning state for the featurestore entity version. -*/ -@visibility("read") -"provisioningState"?: AssetProvisioningState; -/** -* Specifies the asset stage -*/ -"stage"?: string; + /** + * Specifies index columns + */ + indexColumns?: IndexColumn[]; + + /** + * Provisioning state for the featurestore entity version. + */ + @visibility("read") + provisioningState?: AssetProvisioningState; + + /** + * Specifies the asset stage + */ + stage?: string; } /** -* Dto object representing index column -*/ + * Dto object representing index column + */ model IndexColumn { -/** -* Specifies the column name -*/ -"columnName"?: string; -/** -* Specifies the data type -*/ -"dataType"?: FeatureDataType; + /** + * Specifies the column name + */ + columnName?: string; + + /** + * Specifies the data type + */ + dataType?: FeatureDataType; } /** -* Base definition for a job. -*/ + * Base definition for a job. + */ @discriminator("jobType") model JobBase extends ResourceBase { -/** -* ARM resource ID of the component resource. -*/ -@visibility("read", "create") -"componentId"?: string; -/** -* ARM resource ID of the compute resource. -*/ -@visibility("read", "create") -"computeId"?: string; -/** -* Display name of job. -*/ -@visibility("read", "create") -"displayName"?: string; -/** -* The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. -*/ -@visibility("read", "create") -"experimentName"?: string = "Default"; -/** -* Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. -Defaults to AmlToken if null. -*/ -@visibility("read", "create") -"identity"?: IdentityConfiguration; -/** -* Is the asset archived? -*/ -@visibility("read", "create", "update") -"isArchived"?: boolean; -/** -* Notification setting for the job -*/ -@visibility("read", "create", "update") -"notificationSetting"?: NotificationSetting; -/** -* Configuration for secrets to be made available during runtime. -*/ -@visibility("read", "create") -"secretsConfiguration"?: Record; -/** -* List of JobEndpoints. -For local jobs, a job endpoint will have an endpoint value of FileStreamObject. -*/ -"services"?: Record; -/** -* Status of the job. -*/ -@visibility("read") -"status"?: JobStatus; -} - -/** -* Base definition for identity configuration. -*/ + /** + * ARM resource ID of the component resource. + */ + @visibility("read", "create") + componentId?: string; + + /** + * ARM resource ID of the compute resource. + */ + @visibility("read", "create") + computeId?: string; + + /** + * Display name of job. + */ + @visibility("read", "create") + displayName?: string; + + /** + * The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + */ + @visibility("read", "create") + experimentName?: string = "Default"; + + /** + * Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + * Defaults to AmlToken if null. + */ + @visibility("read", "create") + identity?: IdentityConfiguration; + + /** + * Is the asset archived? + */ + @visibility("read", "create", "update") + isArchived?: boolean; + + /** + * Notification setting for the job + */ + @visibility("read", "create", "update") + notificationSetting?: NotificationSetting; + + /** + * Configuration for secrets to be made available during runtime. + */ + @visibility("read", "create") + secretsConfiguration?: Record; + + /** + * List of JobEndpoints. + * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + */ + services?: Record; + + /** + * Status of the job. + */ + @visibility("read") + status?: JobStatus; +} + +/** + * Base definition for identity configuration. + */ @discriminator("identityType") -model IdentityConfiguration { -} +model IdentityConfiguration {} /** -* Secret Configuration definition. -*/ + * Secret Configuration definition. + */ model SecretConfiguration { -/** -* Secret Uri. -Sample Uri : https://myvault.vault.azure.net/secrets/mysecretname/secretversion -*/ -@visibility("read", "create") -"uri"?: string; -/** -* Name of secret in workspace key vault. -*/ -@visibility("read", "create") -"workspaceSecretName"?: string; -} + /** + * Secret Uri. + * Sample Uri : https://myvault.vault.azure.net/secrets/mysecretname/secretversion + */ + @visibility("read", "create") + uri?: string; -/** -* Job endpoint definition -*/ -model JobService { -/** -* Url for endpoint. -*/ -@visibility("read", "create") -"endpoint"?: string; -/** -* Any error in the service. -*/ -@visibility("read") -"errorMessage"?: string; -/** -* Endpoint type. -*/ -@visibility("read", "create") -"jobServiceType"?: string; -/** -* Nodes that user would like to start the service on. -If Nodes is not set or set to null, the service will only be started on leader node. -*/ -"nodes"?: Nodes; -/** -* Port for endpoint set by user. -*/ -@visibility("read", "create") -"port"?: int32; -/** -* Additional properties to set on the endpoint. -*/ -"properties"?: Record; -/** -* Status of endpoint. -*/ -@visibility("read") -"status"?: string; + /** + * Name of secret in workspace key vault. + */ + @visibility("read", "create") + workspaceSecretName?: string; } /** -* Abstract Nodes definition -*/ + * Job endpoint definition + */ +model JobService { + /** + * Url for endpoint. + */ + @visibility("read", "create") + endpoint?: string; + + /** + * Any error in the service. + */ + @visibility("read") + errorMessage?: string; + + /** + * Endpoint type. + */ + @visibility("read", "create") + jobServiceType?: string; + + /** + * Nodes that user would like to start the service on. + * If Nodes is not set or set to null, the service will only be started on leader node. + */ + nodes?: Nodes; + + /** + * Port for endpoint set by user. + */ + @visibility("read", "create") + port?: int32; + + /** + * Additional properties to set on the endpoint. + */ + properties?: Record; + + /** + * Status of endpoint. + */ + @visibility("read") + status?: string; +} + +/** + * Abstract Nodes definition + */ @discriminator("nodesValueType") -model Nodes { -} +model Nodes {} /** -* Azure Resource Manager resource envelope strictly used in update requests. -*/ + * Azure Resource Manager resource envelope strictly used in update requests. + */ model PartialJobBasePartialResource { -/** -* Additional attributes of the entity. -*/ -"properties"?: PartialJobBase; + /** + * Additional attributes of the entity. + */ + properties?: PartialJobBase; } /** -* Mutable base definition for a job. -*/ + * Mutable base definition for a job. + */ model PartialJobBase { -/** -* Mutable notification setting for the job -*/ -"notificationSetting"?: PartialNotificationSetting; + /** + * Mutable notification setting for the job + */ + notificationSetting?: PartialNotificationSetting; } /** -* Mutable configuration for notification. -*/ + * Mutable configuration for notification. + */ model PartialNotificationSetting { -/** -* Send webhook callback to a service. Key is a user-provided name for the webhook. -*/ -"webhooks"?: Record; + /** + * Send webhook callback to a service. Key is a user-provided name for the webhook. + */ + webhooks?: Record; } /** -* Labeling job definition -*/ + * Labeling job definition + */ model LabelingJobProperties extends JobBase { -/** -* Created time of the job in UTC timezone. -*/ -@visibility("read") -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"createdDateTime"?: utcDateTime; -/** -* Configuration of data used in the job. -*/ -@visibility("read", "create") -"dataConfiguration"?: LabelingDataConfiguration; -/** -* Labeling instructions of the job. -*/ -@visibility("read", "create", "update") -"jobInstructions"?: LabelingJobInstructions; -/** -* Label categories of the job. -*/ -@visibility("read", "create", "update") -"labelCategories"?: Record; -/** -* Media type specific properties in the job. -*/ -@visibility("read", "create") -"labelingJobMediaProperties"?: LabelingJobMediaProperties; -/** -* Configuration of MLAssist feature in the job. -*/ -@visibility("read", "create") -"mlAssistConfiguration"?: MLAssistConfiguration; -/** -* Progress metrics of the job. -*/ -@visibility("read") -"progressMetrics"?: ProgressMetrics; -/** -* Internal id of the job(Previously called project). -*/ -@visibility("read") -"projectId"?: string; -/** -* Specifies the labeling job provisioning state. -*/ -@visibility("read") -"provisioningState"?: JobProvisioningState; -/** -* Status messages of the job. -*/ -@visibility("read") -"statusMessages"?: StatusMessage[]; -/** -* [Required] Specifies the type of job. -*/ -"jobType": "Labeling"; -} - -/** -* Labeling data configuration definition -*/ + /** + * Created time of the job in UTC timezone. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDateTime?: utcDateTime; + + /** + * Configuration of data used in the job. + */ + @visibility("read", "create") + dataConfiguration?: LabelingDataConfiguration; + + /** + * Labeling instructions of the job. + */ + @visibility("read", "create", "update") + jobInstructions?: LabelingJobInstructions; + + /** + * Label categories of the job. + */ + @visibility("read", "create", "update") + labelCategories?: Record; + + /** + * Media type specific properties in the job. + */ + @visibility("read", "create") + labelingJobMediaProperties?: LabelingJobMediaProperties; + + /** + * Configuration of MLAssist feature in the job. + */ + @visibility("read", "create") + mlAssistConfiguration?: MLAssistConfiguration; + + /** + * Progress metrics of the job. + */ + @visibility("read") + progressMetrics?: ProgressMetrics; + + /** + * Internal id of the job(Previously called project). + */ + @visibility("read") + projectId?: string; + + /** + * Specifies the labeling job provisioning state. + */ + @visibility("read") + provisioningState?: JobProvisioningState; + + /** + * Status messages of the job. + */ + @visibility("read") + statusMessages?: StatusMessage[]; + + /** + * [Required] Specifies the type of job. + */ + jobType: "Labeling"; +} + +/** + * Labeling data configuration definition + */ model LabelingDataConfiguration { -/** -* Resource Id of the data asset to perform labeling. -*/ -@visibility("read", "create") -"dataId"?: string; -/** -* Indicates whether to enable incremental data refresh. -*/ -@visibility("read", "create", "update") -"incrementalDataRefresh"?: IncrementalDataRefresh; + /** + * Resource Id of the data asset to perform labeling. + */ + @visibility("read", "create") + dataId?: string; + + /** + * Indicates whether to enable incremental data refresh. + */ + @visibility("read", "create", "update") + incrementalDataRefresh?: IncrementalDataRefresh; } /** -* Instructions for labeling job -*/ + * Instructions for labeling job + */ model LabelingJobInstructions { -/** -* The link to a page with detailed labeling instructions for labelers. -*/ -@visibility("read", "create", "update") -"uri"?: string; + /** + * The link to a page with detailed labeling instructions for labelers. + */ + @visibility("read", "create", "update") + uri?: string; } /** -* Label category definition -*/ + * Label category definition + */ model LabelCategory { -/** -* Dictionary of label classes in this category. -*/ -@visibility("read", "create", "update") -"classes"?: Record; -/** -* Display name of the label category. -*/ -@visibility("read", "create") -"displayName"?: string; -/** -* Indicates whether it is allowed to select multiple classes in this category. -*/ -@visibility("read", "create", "update") -"multiSelect"?: MultiSelect; + /** + * Dictionary of label classes in this category. + */ + @visibility("read", "create", "update") + classes?: Record; + + /** + * Display name of the label category. + */ + @visibility("read", "create") + displayName?: string; + + /** + * Indicates whether it is allowed to select multiple classes in this category. + */ + @visibility("read", "create", "update") + multiSelect?: MultiSelect; } /** -* Label class definition -*/ + * Label class definition + */ model LabelClass { -/** -* Display name of the label class. -*/ -@visibility("read", "create") -"displayName"?: string; -/** -* Dictionary of subclasses of the label class. -*/ -@visibility("read", "create", "update") -"subclasses"?: Record; + /** + * Display name of the label class. + */ + @visibility("read", "create") + displayName?: string; + + /** + * Dictionary of subclasses of the label class. + */ + @visibility("read", "create", "update") + subclasses?: Record; } /** -* Properties of a labeling job -*/ + * Properties of a labeling job + */ @discriminator("mediaType") -model LabelingJobMediaProperties { -} +model LabelingJobMediaProperties {} /** -* Labeling MLAssist configuration definition -*/ + * Labeling MLAssist configuration definition + */ @discriminator("mlAssist") -model MLAssistConfiguration { -} +model MLAssistConfiguration {} /** -* Progress metrics definition -*/ + * Progress metrics definition + */ model ProgressMetrics { -/** -* The completed datapoint count. -*/ -@visibility("read") -"completedDatapointCount"?: int64; -/** -* The time of last successful incremental data refresh in UTC. -*/ -@visibility("read") -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"incrementalDataLastRefreshDateTime"?: utcDateTime; -/** -* The skipped datapoint count. -*/ -@visibility("read") -"skippedDatapointCount"?: int64; -/** -* The total datapoint count. -*/ -@visibility("read") -"totalDatapointCount"?: int64; -} - -/** -* Active message associated with project -*/ + /** + * The completed datapoint count. + */ + @visibility("read") + completedDatapointCount?: int64; + + /** + * The time of last successful incremental data refresh in UTC. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + incrementalDataLastRefreshDateTime?: utcDateTime; + + /** + * The skipped datapoint count. + */ + @visibility("read") + skippedDatapointCount?: int64; + + /** + * The total datapoint count. + */ + @visibility("read") + totalDatapointCount?: int64; +} + +/** + * Active message associated with project + */ model StatusMessage { -/** -* Service-defined message code. -*/ -@visibility("read") -"code"?: string; -/** -* Time in UTC at which the message was created. -*/ -@visibility("read") -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"createdDateTime"?: utcDateTime; -/** -* Severity level of message. -*/ -@visibility("read") -"level"?: StatusMessageLevel; -/** -* A human-readable representation of the message code. -*/ -@visibility("read") -"message"?: string; + /** + * Service-defined message code. + */ + @visibility("read") + code?: string; + + /** + * Time in UTC at which the message was created. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDateTime?: utcDateTime; + + /** + * Severity level of message. + */ + @visibility("read") + level?: StatusMessageLevel; + + /** + * A human-readable representation of the message code. + */ + @visibility("read") + message?: string; } - @discriminator("format") model ExportSummary { -/** -* The time when the export was completed. -*/ -@visibility("read") -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"endDateTime"?: utcDateTime; -/** -* The total number of labeled datapoints exported. -*/ -@visibility("read") -"exportedRowCount"?: int64; -/** -* Name and identifier of the job containing exported labels. -*/ -@visibility("read") -"labelingJobId"?: string; -/** -* The time when the export was requested. -*/ -@visibility("read") -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"startDateTime"?: utcDateTime; -} - -/** -* Online endpoint configuration -*/ + /** + * The time when the export was completed. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + /** + * The total number of labeled datapoints exported. + */ + @visibility("read") + exportedRowCount?: int64; + + /** + * Name and identifier of the job containing exported labels. + */ + @visibility("read") + labelingJobId?: string; + + /** + * The time when the export was requested. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; +} + +/** + * Online endpoint configuration + */ model OnlineEndpoint extends EndpointPropertiesBase { -/** -* ARM resource ID of the compute if it exists. -optional -*/ -"compute"?: string; -/** -* Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50. -*/ -"mirrorTraffic"?: Record; -/** -* Provisioning state for the endpoint. -*/ -@visibility("read") -"provisioningState"?: EndpointProvisioningState; -/** -* Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. -*/ -"publicNetworkAccess"?: PublicNetworkAccessType; -/** -* Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. -*/ -"traffic"?: Record; + /** + * ARM resource ID of the compute if it exists. + * optional + */ + compute?: string; + + /** + * Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50. + */ + mirrorTraffic?: Record; + + /** + * Provisioning state for the endpoint. + */ + @visibility("read") + provisioningState?: EndpointProvisioningState; + + /** + * Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. + */ + publicNetworkAccess?: PublicNetworkAccessType; + + /** + * Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. + */ + traffic?: Record; } - @discriminator("endpointComputeType") model OnlineDeployment extends EndpointDeploymentPropertiesBase { -/** -* If true, enables Application Insights logging. -*/ -"appInsightsEnabled"?: boolean; -/** -* The mdc configuration, we disable mdc when it's null. -*/ -"dataCollector"?: DataCollector; -/** -* If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. -*/ -"egressPublicNetworkAccess"?: EgressPublicNetworkAccessType; -/** -* Compute instance type. -*/ -@visibility("read", "create") -"instanceType"?: string; -/** -* Liveness probe monitors the health of the container regularly. -*/ -"livenessProbe"?: ProbeSettings; -/** -* The URI path to the model. -*/ -"model"?: string; -/** -* The path to mount the model in custom container. -*/ -"modelMountPath"?: string; -/** -* Provisioning state for the endpoint deployment. -*/ -@visibility("read") -"provisioningState"?: DeploymentProvisioningState; -/** -* Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. -*/ -"readinessProbe"?: ProbeSettings; -/** -* Request settings for the deployment. -*/ -"requestSettings"?: OnlineRequestSettings; -/** -* Scale settings for the deployment. -If it is null or not provided, -it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment -and to DefaultScaleSettings for ManagedOnlineDeployment. -*/ -"scaleSettings"?: OnlineScaleSettings; + /** + * If true, enables Application Insights logging. + */ + appInsightsEnabled?: boolean; + + /** + * The mdc configuration, we disable mdc when it's null. + */ + dataCollector?: DataCollector; + + /** + * If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + */ + egressPublicNetworkAccess?: EgressPublicNetworkAccessType; + + /** + * Compute instance type. + */ + @visibility("read", "create") + instanceType?: string; + + /** + * Liveness probe monitors the health of the container regularly. + */ + livenessProbe?: ProbeSettings; + + /** + * The URI path to the model. + */ + `model`?: string; + + /** + * The path to mount the model in custom container. + */ + modelMountPath?: string; + + /** + * Provisioning state for the endpoint deployment. + */ + @visibility("read") + provisioningState?: DeploymentProvisioningState; + + /** + * Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. + */ + readinessProbe?: ProbeSettings; + + /** + * Request settings for the deployment. + */ + requestSettings?: OnlineRequestSettings; + + /** + * Scale settings for the deployment. + * If it is null or not provided, + * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + * and to DefaultScaleSettings for ManagedOnlineDeployment. + */ + scaleSettings?: OnlineScaleSettings; } - model DataCollector { -/** -* [Required] The collection configuration. Each collection has it own configuration to collect model data and the name of collection can be arbitrary string. -Model data collector can be used for either payload logging or custom logging or both of them. Collection request and response are reserved for payload logging, others are for custom logging. -*/ -"collections": Record; -/** -* The request logging configuration for mdc, it includes advanced logging settings for all collections. It's optional. -*/ -"requestLogging"?: RequestLogging; -/** -* When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of them in a single blob file. -If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. -If it's day, all data will be collected in blob path /yyyy/MM/dd/. -The other benefit of rolling path is that model monitoring ui is able to select a time range of data very quickly. -*/ -"rollingRate"?: RollingRateType; + /** + * [Required] The collection configuration. Each collection has it own configuration to collect model data and the name of collection can be arbitrary string. + * Model data collector can be used for either payload logging or custom logging or both of them. Collection request and response are reserved for payload logging, others are for custom logging. + */ + collections: Record; + + /** + * The request logging configuration for mdc, it includes advanced logging settings for all collections. It's optional. + */ + requestLogging?: RequestLogging; + + /** + * When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of them in a single blob file. + * If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. + * If it's day, all data will be collected in blob path /yyyy/MM/dd/. + * The other benefit of rolling path is that model monitoring ui is able to select a time range of data very quickly. + */ + rollingRate?: RollingRateType; } - model Collection { -/** -* The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint identity to auth. -*/ -"clientId"?: string; -/** -* Enable or disable data collection. -*/ -"dataCollectionMode"?: DataCollectionMode; -/** -* The data asset arm resource id. Client side will ensure data asset is pointing to the blob storage, and backend will collect data to the blob storage. -*/ -"dataId"?: string; -/** -* The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. -*/ -"samplingRate"?: float64 = 1; -} + /** + * The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint identity to auth. + */ + clientId?: string; + + /** + * Enable or disable data collection. + */ + dataCollectionMode?: DataCollectionMode; + + /** + * The data asset arm resource id. Client side will ensure data asset is pointing to the blob storage, and backend will collect data to the blob storage. + */ + dataId?: string; + /** + * The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. + */ + samplingRate?: float64 = 1; +} model RequestLogging { -/** -* For payload logging, we only collect payload by default. If customers also want to collect the specified headers, they can set them in captureHeaders so that backend will collect those headers along with payload. -*/ -"captureHeaders"?: string[]; + /** + * For payload logging, we only collect payload by default. If customers also want to collect the specified headers, they can set them in captureHeaders so that backend will collect those headers along with payload. + */ + captureHeaders?: string[]; } /** -* Deployment container liveness/readiness probe configuration. -*/ + * Deployment container liveness/readiness probe configuration. + */ model ProbeSettings { -/** -* The number of failures to allow before returning an unhealthy status. -*/ -"failureThreshold"?: int32 = 30; -/** -* The delay before the first probe in ISO 8601 format. -*/ -"initialDelay"?: duration; -/** -* The length of time between probes in ISO 8601 format. -*/ -"period"?: duration = duration.PT10S; -/** -* The number of successful probes before returning a healthy status. -*/ -"successThreshold"?: int32 = 1; -/** -* The probe timeout in ISO 8601 format. -*/ -"timeout"?: duration = duration.PT2S; + /** + * The number of failures to allow before returning an unhealthy status. + */ + failureThreshold?: int32 = 30; + + /** + * The delay before the first probe in ISO 8601 format. + */ + initialDelay?: duration; + + /** + * The length of time between probes in ISO 8601 format. + */ + period?: duration = "PT10S"; + + /** + * The number of successful probes before returning a healthy status. + */ + successThreshold?: int32 = 1; + + /** + * The probe timeout in ISO 8601 format. + */ + timeout?: duration = "PT2S"; } /** -* Online deployment scoring requests configuration. -*/ + * Online deployment scoring requests configuration. + */ model OnlineRequestSettings { -/** -* The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. -*/ -"maxConcurrentRequestsPerInstance"?: int32 = 1; -/** -* The maximum amount of time a request will stay in the queue in ISO 8601 format. -Defaults to 500ms. -*/ -"maxQueueWait"?: duration = duration.PT0.5S; -/** -* The scoring timeout in ISO 8601 format. -Defaults to 5000ms. -*/ -"requestTimeout"?: duration = duration.PT5S; + /** + * The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. + */ + maxConcurrentRequestsPerInstance?: int32 = 1; + + /** + * The maximum amount of time a request will stay in the queue in ISO 8601 format. + * Defaults to 500ms. + */ + maxQueueWait?: duration = "PT0.5S"; + + /** + * The scoring timeout in ISO 8601 format. + * Defaults to 5000ms. + */ + requestTimeout?: duration = "PT5S"; } /** -* Online deployment scaling configuration. -*/ + * Online deployment scaling configuration. + */ @discriminator("scaleType") -model OnlineScaleSettings { -} +model OnlineScaleSettings {} /** -* Strictly used in update requests. -*/ -model PartialMinimalTrackedResourceWithSku extends PartialMinimalTrackedResource { -/** -* Sku details required for ARM contract for Autoscaling. -*/ -"sku"?: PartialSku; + * Strictly used in update requests. + */ +model PartialMinimalTrackedResourceWithSku + extends PartialMinimalTrackedResource { + /** + * Sku details required for ARM contract for Autoscaling. + */ + sku?: PartialSku; } /** -* Common SKU definition. -*/ + * Common SKU definition. + */ model PartialSku { -/** -* If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. -*/ -"capacity"?: int32; -/** -* If the service has different generations of hardware, for the same SKU, then that can be captured here. -*/ -"family"?: string; -/** -* The name of the SKU. Ex - P3. It is typically a letter+number code. -*/ -"name"?: string; -/** -* The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. -*/ -"size"?: string; -/** -* This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. -*/ -"tier"?: SkuTier; -} + /** + * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. + */ + capacity?: int32; + /** + * If the service has different generations of hardware, for the same SKU, then that can be captured here. + */ + family?: string; -model DeploymentLogsRequest { -/** -* The type of container to retrieve logs from. -*/ -"containerType"?: ContainerType; -/** -* The maximum number of lines to tail. -*/ -"tail"?: int32; + /** + * The name of the SKU. Ex - P3. It is typically a letter+number code. + */ + name?: string; + + /** + * The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + */ + size?: string; + + /** + * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + */ + tier?: SkuTier; } +model DeploymentLogsRequest { + /** + * The type of container to retrieve logs from. + */ + containerType?: ContainerType; + + /** + * The maximum number of lines to tail. + */ + tail?: int32; +} model DeploymentLogs { -/** -* The retrieved online deployment logs. -*/ -"content"?: string; + /** + * The retrieved online deployment logs. + */ + content?: string; } /** -* A paginated list of SkuResource entities. -*/ -model SkuResourceArmPaginatedResult is Azure.Core.Page { -} + * A paginated list of SkuResource entities. + */ +model SkuResourceArmPaginatedResult is Azure.Core.Page; /** -* Fulfills ARM Contract requirement to list all available SKUS for a resource. -*/ + * Fulfills ARM Contract requirement to list all available SKUS for a resource. + */ model SkuResource { -/** -* Gets or sets the Sku Capacity. -*/ -"capacity"?: SkuCapacity; -/** -* The resource type name. -*/ -@visibility("read") -"resourceType"?: string; -/** -* Gets or sets the Sku. -*/ -"sku"?: SkuSetting; + /** + * Gets or sets the Sku Capacity. + */ + capacity?: SkuCapacity; + + /** + * The resource type name. + */ + @visibility("read") + resourceType?: string; + + /** + * Gets or sets the Sku. + */ + sku?: SkuSetting; } /** -* SKU capacity information -*/ + * SKU capacity information + */ model SkuCapacity { -/** -* Gets or sets the default capacity. -*/ -"default"?: int32; -/** -* Gets or sets the maximum. -*/ -"maximum"?: int32; -/** -* Gets or sets the minimum. -*/ -"minimum"?: int32; -/** -* Gets or sets the type of the scale. -*/ -"scaleType"?: SkuScaleType; + /** + * Gets or sets the default capacity. + */ + default?: int32; + + /** + * Gets or sets the maximum. + */ + maximum?: int32; + + /** + * Gets or sets the minimum. + */ + minimum?: int32; + + /** + * Gets or sets the type of the scale. + */ + scaleType?: SkuScaleType; } /** -* SkuSetting fulfills the need for stripped down SKU info in ARM contract. -*/ + * SkuSetting fulfills the need for stripped down SKU info in ARM contract. + */ model SkuSetting { -/** -* [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. -*/ -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"name": string; -/** -* This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. -*/ -"tier"?: SkuTier; -} + /** + * [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. + */ + @minLength(1) + @pattern("[a-zA-Z0-9_]") + name: string; + /** + * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + */ + tier?: SkuTier; +} model RegenerateEndpointKeysRequest { -/** -* [Required] Specification for which type of key to generate. Primary or Secondary. -*/ -"keyType": KeyType; -/** -* The value the key is set to. -*/ -"keyValue"?: string; + /** + * [Required] Specification for which type of key to generate. Primary or Secondary. + */ + keyType: KeyType; + + /** + * The value the key is set to. + */ + keyValue?: string; } /** -* Service Token -*/ + * Service Token + */ model EndpointAuthToken { -/** -* Access token for endpoint authentication. -*/ -"accessToken"?: string; -/** -* Access token expiry time (UTC). -*/ -"expiryTimeUtc"?: plainTime; -/** -* Refresh access token after time (UTC). -*/ -"refreshAfterTimeUtc"?: plainTime; -/** -* Access token type. -*/ -"tokenType"?: string; + /** + * Access token for endpoint authentication. + */ + accessToken?: string; + + /** + * Access token expiry time (UTC). + */ + expiryTimeUtc?: plainTime; + + /** + * Refresh access token after time (UTC). + */ + refreshAfterTimeUtc?: plainTime; + + /** + * Access token type. + */ + tokenType?: string; } /** -* Base definition of a schedule -*/ + * Base definition of a schedule + */ model ScheduleProperties extends ResourceBase { -/** -* [Required] Specifies the action of the schedule -*/ -@visibility("read", "create", "update") -"action": ScheduleActionBase; -/** -* Display name of schedule. -*/ -@visibility("read", "create") -"displayName"?: string; -/** -* Is the schedule enabled? -*/ -@visibility("read", "create", "update") -"isEnabled"?: boolean = true; -/** -* Provisioning state for the schedule. -*/ -@visibility("read") -"provisioningState"?: ScheduleProvisioningStatus; -/** -* [Required] Specifies the trigger details -*/ -@visibility("read", "create", "update") -"trigger": TriggerBase; + /** + * [Required] Specifies the action of the schedule + */ + @visibility("read", "create", "update") + action: ScheduleActionBase; + + /** + * Display name of schedule. + */ + @visibility("read", "create") + displayName?: string; + + /** + * Is the schedule enabled? + */ + @visibility("read", "create", "update") + isEnabled?: boolean = true; + + /** + * Provisioning state for the schedule. + */ + @visibility("read") + provisioningState?: ScheduleProvisioningStatus; + + /** + * [Required] Specifies the trigger details + */ + @visibility("read", "create", "update") + trigger: TriggerBase; } - @discriminator("actionType") -model ScheduleActionBase { -} +model ScheduleActionBase {} /** -* Details of the Registry -*/ + * Details of the Registry + */ model RegistryProperties { -/** -* Discovery URL for the Registry -*/ -"discoveryUrl"?: string; -/** -* IntellectualPropertyPublisher for the registry -*/ -"intellectualPropertyPublisher"?: string; -/** -* ResourceId of the managed RG if the registry has system created resources -*/ -"managedResourceGroup"?: ArmResourceId; -/** -* MLFlow Registry URI for the Registry -*/ -"mlFlowRegistryUri"?: string; -/** -* Private endpoint connections info used for pending connections in private link portal -*/ -"privateEndpointConnections"?: RegistryPrivateEndpointConnection[]; -/** -* Is the Registry accessible from the internet? -Possible values: "Enabled" or "Disabled" -*/ -"publicNetworkAccess"?: string; -/** -* Details of each region the registry is in -*/ -"regionDetails"?: RegistryRegionArmDetails[]; -} - -/** -* ARM ResourceId of a resource -*/ + /** + * Discovery URL for the Registry + */ + discoveryUrl?: string; + + /** + * IntellectualPropertyPublisher for the registry + */ + intellectualPropertyPublisher?: string; + + /** + * ResourceId of the managed RG if the registry has system created resources + */ + managedResourceGroup?: ArmResourceId; + + /** + * MLFlow Registry URI for the Registry + */ + mlFlowRegistryUri?: string; + + /** + * Private endpoint connections info used for pending connections in private link portal + */ + privateEndpointConnections?: RegistryPrivateEndpointConnection[]; + + /** + * Is the Registry accessible from the internet? + * Possible values: "Enabled" or "Disabled" + */ + publicNetworkAccess?: string; + + /** + * Details of each region the registry is in + */ + regionDetails?: RegistryRegionArmDetails[]; +} + +/** + * ARM ResourceId of a resource + */ model ArmResourceId { -/** -* Arm ResourceId is in the format "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" -or "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" -*/ -"resourceId"?: string; + /** + * Arm ResourceId is in the format "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}" + * or "/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}" + */ + resourceId?: string; } /** -* Private endpoint connection definition. -*/ + * Private endpoint connection definition. + */ model RegistryPrivateEndpointConnection { -/** -* This is the private endpoint connection name created on SRP -Full resource id: /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.MachineLearningServices/{resourceType}/{resourceName}/privateEndpointConnections/{peConnectionName} -*/ -"id"?: string; -/** -* Same as workspace location. -*/ -@visibility("read", "create") -"location"?: string; -/** -* Properties of the Private Endpoint Connection -*/ -"properties"?: RegistryPrivateEndpointConnectionProperties; + /** + * This is the private endpoint connection name created on SRP + * Full resource id: /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.MachineLearningServices/{resourceType}/{resourceName}/privateEndpointConnections/{peConnectionName} + */ + id?: string; + + /** + * Same as workspace location. + */ + @visibility("read", "create") + location?: string; + + /** + * Properties of the Private Endpoint Connection + */ + @extension("x-ms-client-flatten", true) + properties?: RegistryPrivateEndpointConnectionProperties; } /** -* Properties of the Private Endpoint Connection -*/ + * Properties of the Private Endpoint Connection + */ model RegistryPrivateEndpointConnectionProperties { -/** -* The group ids -*/ -"groupIds"?: string[]; -/** -* The PE network resource that is linked to this PE connection. -*/ -"privateEndpoint"?: PrivateEndpointResource; -/** -* The connection state. -*/ -"privateLinkServiceConnectionState"?: RegistryPrivateLinkServiceConnectionState; -/** -* One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's null. -*/ -"provisioningState"?: string; + /** + * The group ids + */ + groupIds?: string[]; + + /** + * The PE network resource that is linked to this PE connection. + */ + privateEndpoint?: PrivateEndpointResource; + + /** + * The connection state. + */ + privateLinkServiceConnectionState?: RegistryPrivateLinkServiceConnectionState; + + /** + * One of null, "Succeeded", "Provisioning", "Failed". While not approved, it's null. + */ + provisioningState?: string; } /** -* The PE network resource that is linked to this PE connection. -*/ + * The PE network resource that is linked to this PE connection. + */ model PrivateEndpointResource extends PrivateEndpoint { -/** -* The subnetId that the private endpoint is connected to. -*/ -"subnetArmId"?: string; + /** + * The subnetId that the private endpoint is connected to. + */ + subnetArmId?: string; } /** -* The Private Endpoint resource. -*/ + * The Private Endpoint resource. + */ model PrivateEndpoint { -/** -* The ARM identifier for Private Endpoint -*/ -@visibility("read") -"id"?: string; + /** + * The ARM identifier for Private Endpoint + */ + @visibility("read") + id?: string; } /** -* The connection state. -*/ + * The connection state. + */ model RegistryPrivateLinkServiceConnectionState { -/** -* Some RP chose "None". Other RPs use this for region expansion. -*/ -"actionsRequired"?: string; -/** -* User-defined message that, per NRP doc, may be used for approval-related message. -*/ -"description"?: string; -/** -* Connection status of the service consumer with the service provider -*/ -"status"?: EndpointServiceConnectionStatus; + /** + * Some RP chose "None". Other RPs use this for region expansion. + */ + actionsRequired?: string; + + /** + * User-defined message that, per NRP doc, may be used for approval-related message. + */ + description?: string; + + /** + * Connection status of the service consumer with the service provider + */ + status?: EndpointServiceConnectionStatus; } /** -* Details for each region the registry is in -*/ + * Details for each region the registry is in + */ model RegistryRegionArmDetails { -/** -* List of ACR accounts -*/ -"acrDetails"?: AcrDetails[]; -/** -* The location where the registry exists -*/ -"location"?: string; -/** -* List of storage accounts -*/ -"storageAccountDetails"?: StorageAccountDetails[]; + /** + * List of ACR accounts + */ + acrDetails?: AcrDetails[]; + + /** + * The location where the registry exists + */ + location?: string; + + /** + * List of storage accounts + */ + storageAccountDetails?: StorageAccountDetails[]; } /** -* Details of ACR account to be used for the Registry -*/ + * Details of ACR account to be used for the Registry + */ model AcrDetails { -/** -* Details of system created ACR account to be used for the Registry -*/ -"systemCreatedAcrAccount"?: SystemCreatedAcrAccount; -/** -* Details of user created ACR account to be used for the Registry. Not supported in most cases and will throw 400 error if provided. -*/ -"userCreatedAcrAccount"?: UserCreatedAcrAccount; -} + /** + * Details of system created ACR account to be used for the Registry + */ + systemCreatedAcrAccount?: SystemCreatedAcrAccount; + /** + * Details of user created ACR account to be used for the Registry. Not supported in most cases and will throw 400 error if provided. + */ + userCreatedAcrAccount?: UserCreatedAcrAccount; +} model SystemCreatedAcrAccount { -/** -* Name of the ACR account -*/ -"acrAccountName"?: string; -/** -* SKU of the ACR account -*/ -"acrAccountSku"?: string; -/** -* This is populated once the ACR account is created. -*/ -"armResourceId"?: ArmResourceId; -} + /** + * Name of the ACR account + */ + acrAccountName?: string; + /** + * SKU of the ACR account + */ + acrAccountSku?: string; -model UserCreatedAcrAccount { -/** -* ARM ResourceId of a resource -*/ -"armResourceId"?: ArmResourceId; + /** + * This is populated once the ACR account is created. + */ + armResourceId?: ArmResourceId; } -/** -* Details of storage account to be used for the Registry -*/ -model StorageAccountDetails { -/** -* Details of system created storage account to be used for the registry -*/ -"systemCreatedStorageAccount"?: SystemCreatedStorageAccount; -/** -* Details of user created storage account to be used for the registry. Not supported in most cases and will throw 400 error if provided. -*/ -"userCreatedStorageAccount"?: UserCreatedStorageAccount; +model UserCreatedAcrAccount { + /** + * ARM ResourceId of a resource + */ + armResourceId?: ArmResourceId; } - -model SystemCreatedStorageAccount { -/** -* Public blob access allowed -*/ -"allowBlobPublicAccess"?: boolean; /** -* This is populated once the storage account is created. -*/ -"armResourceId"?: ArmResourceId; -/** -* HNS enabled for storage account -*/ -"storageAccountHnsEnabled"?: boolean; -/** -* Name of the storage account -*/ -"storageAccountName"?: string; -/** -* Allowed values: -"Standard_LRS", -"Standard_GRS", -"Standard_RAGRS", -"Standard_ZRS", -"Standard_GZRS", -"Standard_RAGZRS", -"Premium_LRS", -"Premium_ZRS" -*/ -"storageAccountType"?: string; + * Details of storage account to be used for the Registry + */ +model StorageAccountDetails { + /** + * Details of system created storage account to be used for the registry + */ + systemCreatedStorageAccount?: SystemCreatedStorageAccount; + + /** + * Details of user created storage account to be used for the registry. Not supported in most cases and will throw 400 error if provided. + */ + userCreatedStorageAccount?: UserCreatedStorageAccount; } +model SystemCreatedStorageAccount { + /** + * Public blob access allowed + */ + allowBlobPublicAccess?: boolean; + + /** + * This is populated once the storage account is created. + */ + armResourceId?: ArmResourceId; + + /** + * HNS enabled for storage account + */ + storageAccountHnsEnabled?: boolean; + + /** + * Name of the storage account + */ + storageAccountName?: string; + + /** + * Allowed values: + * "Standard_LRS", + * "Standard_GRS", + * "Standard_RAGRS", + * "Standard_ZRS", + * "Standard_GZRS", + * "Standard_RAGZRS", + * "Premium_LRS", + * "Premium_ZRS" + */ + storageAccountType?: string; +} model UserCreatedStorageAccount { -/** -* ARM ResourceId of a resource -*/ -"armResourceId"?: ArmResourceId; + /** + * ARM ResourceId of a resource + */ + armResourceId?: ArmResourceId; } /** -* Strictly used in update requests. -*/ + * Strictly used in update requests. + */ model PartialRegistryPartialTrackedResource { -/** -* Managed service identity (system assigned and/or user assigned identities) -*/ -"identity"?: RegistryPartialManagedServiceIdentity; -/** -* Sku details required for ARM contract for Autoscaling. -*/ -"sku"?: PartialSku; -/** -* Resource tags. -*/ -"tags"?: Record; + /** + * Managed service identity (system assigned and/or user assigned identities) + */ + identity?: RegistryPartialManagedServiceIdentity; + + /** + * Sku details required for ARM contract for Autoscaling. + */ + sku?: PartialSku; + + /** + * Resource tags. + */ + tags?: Record; } /** -* Managed service identity (system assigned and/or user assigned identities) -*/ -model RegistryPartialManagedServiceIdentity extends ManagedServiceIdentity { -} + * Managed service identity (system assigned and/or user assigned identities) + */ +model RegistryPartialManagedServiceIdentity extends ManagedServiceIdentity {} /** -* The List Aml user feature operation response. -*/ -model ListAmlUserFeatureResult is Azure.Core.Page { -} + * The List Aml user feature operation response. + */ +model ListAmlUserFeatureResult is Azure.Core.Page; /** -* Features enabled for a workspace -*/ + * Features enabled for a workspace + */ model AmlUserFeature { -/** -* Specifies the feature ID -*/ -"id"?: string; -/** -* Specifies the feature name -*/ -"displayName"?: string; -/** -* Describes the feature for user experience -*/ -"description"?: string; + /** + * Specifies the feature ID + */ + id?: string; + + /** + * Specifies the feature name + */ + displayName?: string; + + /** + * Describes the feature for user experience + */ + description?: string; } /** -* Azure Machine Learning team account REST API operation -*/ + * Azure Machine Learning team account REST API operation + */ model AmlOperation { -/** -* Gets or sets display name of operation -*/ -"display"?: OperationDisplay; -/** -* Indicates whether the operation applies to data-plane -*/ -"isDataAction"?: boolean; -/** -* Gets or sets operation name: {provider}/{resource}/{operation} -*/ -"name"?: string; -/** -* The intended executor of the operation: user/system -*/ -"origin"?: string; + /** + * Gets or sets display name of operation + */ + display?: OperationDisplay; + + /** + * Indicates whether the operation applies to data-plane + */ + isDataAction?: boolean; + + /** + * Gets or sets operation name: {provider}/{resource}/{operation} + */ + name?: string; + + /** + * The intended executor of the operation: user/system + */ + origin?: string; } /** -* The properties of a machine learning workspace. -*/ + * The properties of a machine learning workspace. + */ model WorkspaceProperties { -/** -* The flag to indicate whether to allow public access when behind VNet. -*/ -"allowPublicAccessWhenBehindVnet"?: boolean; -/** -* ARM id of the application insights associated with this workspace. -*/ -"applicationInsights"?: string; -"associatedWorkspaces"?: string[]; -"containerRegistries"?: string[]; -/** -* ARM id of the container registry associated with this workspace. -*/ -"containerRegistry"?: string; -/** -* The description of this workspace. -*/ -"description"?: string; -/** -* Url for the discovery service to identify regional endpoints for machine learning experimentation services -*/ -"discoveryUrl"?: string; -"enableDataIsolation"?: boolean; -"encryption"?: EncryptionProperty; -"existingWorkspaces"?: string[]; -/** -* Settings for feature store type workspace. -*/ -"featureStoreSettings"?: FeatureStoreSettings; -/** -* The friendly name for this workspace. This name in mutable -*/ -"friendlyName"?: string; -/** -* The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service -*/ -"hbiWorkspace"?: boolean; -"hubResourceId"?: string; -/** -* The compute name for image build -*/ -"imageBuildCompute"?: string; -/** -* ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created -*/ -"keyVault"?: string; -"keyVaults"?: string[]; -/** -* Managed Network settings for a machine learning workspace. -*/ -"managedNetwork"?: ManagedNetworkSettings; -/** -* The URI associated with this workspace that machine learning flow must point at to set up tracking. -*/ -@visibility("read") -"mlFlowTrackingUri"?: string; -/** -* The notebook info of Azure ML workspace. -*/ -@visibility("read") -"notebookInfo"?: NotebookResourceInfo; -/** -* The user assigned identity resource id that represents the workspace identity. -*/ -"primaryUserAssignedIdentity"?: string; -/** -* The list of private endpoint connections in the workspace. -*/ -@visibility("read") -"privateEndpointConnections"?: PrivateEndpointConnection[]; -/** -* Count of private connections in the workspace -*/ -@visibility("read") -"privateLinkCount"?: int32; -/** -* The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. -*/ -@visibility("read") -"provisioningState"?: ProvisioningState; -/** -* Whether requests from Public Network are allowed. -*/ -"publicNetworkAccess"?: PublicNetworkAccessType; -/** -* The service managed resource settings. -*/ -"serviceManagedResourcesSettings"?: ServiceManagedResourcesSettings; -/** -* The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace -*/ -@visibility("read") -"serviceProvisionedResourceGroup"?: string; -/** -* The list of shared private link resources in this workspace. -*/ -"sharedPrivateLinkResources"?: SharedPrivateLinkResource[]; -/** -* Retention time in days after workspace get soft deleted. -*/ -"softDeleteRetentionInDays"?: int32; -/** -* ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created -*/ -"storageAccount"?: string; -"storageAccounts"?: string[]; -/** -* If the storage associated with the workspace has hierarchical namespace(HNS) enabled. -*/ -@visibility("read") -"storageHnsEnabled"?: boolean; -/** -* The auth mode used for accessing the system datastores of the workspace. -*/ -"systemDatastoresAuthMode"?: string; -/** -* The tenant id associated with this workspace. -*/ -@visibility("read") -"tenantId"?: string; -/** -* Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. -*/ -"v1LegacyMode"?: boolean; -/** -* WorkspaceHub's configuration object. -*/ -"workspaceHubConfig"?: WorkspaceHubConfig; -/** -* The immutable id associated with this workspace. -*/ -@visibility("read") -"workspaceId"?: string; + /** + * The flag to indicate whether to allow public access when behind VNet. + */ + allowPublicAccessWhenBehindVnet?: boolean; + + /** + * ARM id of the application insights associated with this workspace. + */ + applicationInsights?: string; + + associatedWorkspaces?: string[]; + containerRegistries?: string[]; + + /** + * ARM id of the container registry associated with this workspace. + */ + containerRegistry?: string; + + /** + * The description of this workspace. + */ + description?: string; + + /** + * Url for the discovery service to identify regional endpoints for machine learning experimentation services + */ + discoveryUrl?: string; + + enableDataIsolation?: boolean; + encryption?: EncryptionProperty; + existingWorkspaces?: string[]; + + /** + * Settings for feature store type workspace. + */ + featureStoreSettings?: FeatureStoreSettings; + + /** + * The friendly name for this workspace. This name in mutable + */ + friendlyName?: string; + + /** + * The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service + */ + hbiWorkspace?: boolean; + + hubResourceId?: string; + + /** + * The compute name for image build + */ + imageBuildCompute?: string; + + /** + * ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created + */ + keyVault?: string; + + keyVaults?: string[]; + + /** + * Managed Network settings for a machine learning workspace. + */ + managedNetwork?: ManagedNetworkSettings; + + /** + * The URI associated with this workspace that machine learning flow must point at to set up tracking. + */ + @visibility("read") + mlFlowTrackingUri?: string; + + /** + * The notebook info of Azure ML workspace. + */ + @visibility("read") + notebookInfo?: NotebookResourceInfo; + + /** + * The user assigned identity resource id that represents the workspace identity. + */ + primaryUserAssignedIdentity?: string; + + /** + * The list of private endpoint connections in the workspace. + */ + @visibility("read") + privateEndpointConnections?: PrivateEndpointConnection[]; + + /** + * Count of private connections in the workspace + */ + @visibility("read") + privateLinkCount?: int32; + + /** + * The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. + */ + @visibility("read") + provisioningState?: ProvisioningState; + + /** + * Whether requests from Public Network are allowed. + */ + publicNetworkAccess?: PublicNetworkAccessType; + + /** + * The service managed resource settings. + */ + serviceManagedResourcesSettings?: ServiceManagedResourcesSettings; + + /** + * The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace + */ + @visibility("read") + serviceProvisionedResourceGroup?: string; + + /** + * The list of shared private link resources in this workspace. + */ + sharedPrivateLinkResources?: SharedPrivateLinkResource[]; + + /** + * Retention time in days after workspace get soft deleted. + */ + softDeleteRetentionInDays?: int32; + + /** + * ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created + */ + storageAccount?: string; + + storageAccounts?: string[]; + + /** + * If the storage associated with the workspace has hierarchical namespace(HNS) enabled. + */ + @visibility("read") + storageHnsEnabled?: boolean; + + /** + * The auth mode used for accessing the system datastores of the workspace. + */ + systemDatastoresAuthMode?: string; + + /** + * The tenant id associated with this workspace. + */ + @visibility("read") + tenantId?: string; + + /** + * Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + */ + v1LegacyMode?: boolean; + + /** + * WorkspaceHub's configuration object. + */ + workspaceHubConfig?: WorkspaceHubConfig; + + /** + * The immutable id associated with this workspace. + */ + @visibility("read") + workspaceId?: string; } - model EncryptionProperty { -/** -* The byok cosmosdb account that customer brings to store customer's data -with encryption -*/ -"cosmosDbResourceId"?: string; -/** -* Identity to be used with the keyVault -*/ -"identity"?: IdentityForCmk; -/** -* KeyVault details to do the encryption -*/ -"keyVaultProperties": KeyVaultProperties; -/** -* The byok search account that customer brings to store customer's data -with encryption -*/ -"searchAccountResourceId"?: string; -/** -* Indicates whether or not the encryption is enabled for the workspace. -*/ -"status": EncryptionStatus; -/** -* The byok storage account that customer brings to store customer's data -with encryption -*/ -"storageAccountResourceId"?: string; -} - -/** -* Identity object used for encryption. -*/ + /** + * The byok cosmosdb account that customer brings to store customer's data + * with encryption + */ + cosmosDbResourceId?: string; + + /** + * Identity to be used with the keyVault + */ + identity?: IdentityForCmk; + + /** + * KeyVault details to do the encryption + */ + keyVaultProperties: KeyVaultProperties; + + /** + * The byok search account that customer brings to store customer's data + * with encryption + */ + searchAccountResourceId?: string; + + /** + * Indicates whether or not the encryption is enabled for the workspace. + */ + status: EncryptionStatus; + + /** + * The byok storage account that customer brings to store customer's data + * with encryption + */ + storageAccountResourceId?: string; +} + +/** + * Identity object used for encryption. + */ model IdentityForCmk { -/** -* UserAssignedIdentity to be used to fetch the encryption key from keyVault -*/ -"userAssignedIdentity"?: string; + /** + * UserAssignedIdentity to be used to fetch the encryption key from keyVault + */ + userAssignedIdentity?: string; } /** -* Customer Key vault properties. -*/ + * Customer Key vault properties. + */ model KeyVaultProperties { -/** -* Currently, we support only SystemAssigned MSI. -We need this when we support UserAssignedIdentities -*/ -"identityClientId"?: string; -/** -* KeyVault key identifier to encrypt the data -*/ -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"keyIdentifier": string; -/** -* KeyVault Arm Id that contains the data encryption key -*/ -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"keyVaultArmId": string; + /** + * Currently, we support only SystemAssigned MSI. + * We need this when we support UserAssignedIdentities + */ + identityClientId?: string; + + /** + * KeyVault key identifier to encrypt the data + */ + @minLength(1) + @pattern("[a-zA-Z0-9_]") + keyIdentifier: string; + + /** + * KeyVault Arm Id that contains the data encryption key + */ + @minLength(1) + @pattern("[a-zA-Z0-9_]") + keyVaultArmId: string; } - model FeatureStoreSettings { -"computeRuntime"?: ComputeRuntimeDto; -"offlineStoreConnectionName"?: string; -"onlineStoreConnectionName"?: string; + computeRuntime?: ComputeRuntimeDto; + offlineStoreConnectionName?: string; + onlineStoreConnectionName?: string; } - model ComputeRuntimeDto { -"sparkRuntimeVersion"?: string; + sparkRuntimeVersion?: string; } /** -* Managed Network settings for a machine learning workspace. -*/ + * Managed Network settings for a machine learning workspace. + */ model ManagedNetworkSettings { -/** -* Isolation mode for the managed network of a machine learning workspace. -*/ -"isolationMode"?: IsolationMode; -@visibility("read") -"networkId"?: string; -/** -* Dictionary of -*/ -"outboundRules"?: Record; -/** -* Status of the Provisioning for the managed network of a machine learning workspace. -*/ -"status"?: ManagedNetworkProvisionStatus; + /** + * Isolation mode for the managed network of a machine learning workspace. + */ + isolationMode?: IsolationMode; + + @visibility("read") + networkId?: string; + + /** + * Dictionary of + */ + outboundRules?: Record; + + /** + * Status of the Provisioning for the managed network of a machine learning workspace. + */ + status?: ManagedNetworkProvisionStatus; } /** -* Outbound Rule for the managed network of a machine learning workspace. -*/ + * Outbound Rule for the managed network of a machine learning workspace. + */ @discriminator("type") model OutboundRule { -/** -* Category of a managed network Outbound Rule of a machine learning workspace. -*/ -"category"?: RuleCategory; -/** -* Type of a managed network Outbound Rule of a machine learning workspace. -*/ -"status"?: RuleStatus; + /** + * Category of a managed network Outbound Rule of a machine learning workspace. + */ + category?: RuleCategory; + + /** + * Type of a managed network Outbound Rule of a machine learning workspace. + */ + status?: RuleStatus; } /** -* Status of the Provisioning for the managed network of a machine learning workspace. -*/ + * Status of the Provisioning for the managed network of a machine learning workspace. + */ model ManagedNetworkProvisionStatus { -"sparkReady"?: boolean; -/** -* Status for the managed network of a machine learning workspace. -*/ -"status"?: ManagedNetworkStatus; -} + sparkReady?: boolean; + /** + * Status for the managed network of a machine learning workspace. + */ + status?: ManagedNetworkStatus; +} model NotebookResourceInfo { -"fqdn"?: string; -"isPrivateLinkEnabled"?: boolean; -/** -* The error that occurs when preparing notebook. -*/ -"notebookPreparationError"?: NotebookPreparationError; -/** -* the data plane resourceId that used to initialize notebook component -*/ -"resourceId"?: string; -} + fqdn?: string; + isPrivateLinkEnabled?: boolean; + + /** + * The error that occurs when preparing notebook. + */ + notebookPreparationError?: NotebookPreparationError; + /** + * the data plane resourceId that used to initialize notebook component + */ + resourceId?: string; +} model NotebookPreparationError { -"errorMessage"?: string; -"statusCode"?: int32; + errorMessage?: string; + statusCode?: int32; } /** -* Private endpoint connection properties. -*/ + * Private endpoint connection properties. + */ model PrivateEndpointConnectionProperties { -/** -* The Private Endpoint resource. -*/ -"privateEndpoint"?: WorkspacePrivateEndpointResource; -/** -* The connection state. -*/ -"privateLinkServiceConnectionState"?: PrivateLinkServiceConnectionState; -/** -* The current provisioning state. -*/ -@visibility("read") -"provisioningState"?: PrivateEndpointConnectionProvisioningState; + /** + * The Private Endpoint resource. + */ + privateEndpoint?: WorkspacePrivateEndpointResource; + + /** + * The connection state. + */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + + /** + * The current provisioning state. + */ + @visibility("read") + provisioningState?: PrivateEndpointConnectionProvisioningState; } /** -* The Private Endpoint resource. -*/ + * The Private Endpoint resource. + */ model WorkspacePrivateEndpointResource { -/** -* e.g. /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName} -*/ -@visibility("read") -"id"?: string; -/** -* The subnetId that the private endpoint is connected to. -*/ -@visibility("read") -"subnetArmId"?: string; + /** + * e.g. /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName} + */ + @visibility("read") + id?: string; + + /** + * The subnetId that the private endpoint is connected to. + */ + @visibility("read") + subnetArmId?: string; } /** -* A collection of information about the state of the connection between service consumer and provider. -*/ + * A collection of information about the state of the connection between service consumer and provider. + */ model PrivateLinkServiceConnectionState { -/** -* Some RP chose "None". Other RPs use this for region expansion. -*/ -"actionsRequired"?: string; -/** -* User-defined message that, per NRP doc, may be used for approval-related message. -*/ -"description"?: string; -/** -* Connection status of the service consumer with the service provider -*/ -"status"?: EndpointServiceConnectionStatus; -} + /** + * Some RP chose "None". Other RPs use this for region expansion. + */ + actionsRequired?: string; + /** + * User-defined message that, per NRP doc, may be used for approval-related message. + */ + description?: string; -model ServiceManagedResourcesSettings { -"cosmosDb"?: CosmosDbSettings; + /** + * Connection status of the service consumer with the service provider + */ + status?: EndpointServiceConnectionStatus; } +model ServiceManagedResourcesSettings { + cosmosDb?: CosmosDbSettings; +} model CosmosDbSettings { -"collectionsThroughput"?: int32; + collectionsThroughput?: int32; } - model SharedPrivateLinkResource { -/** -* Unique name of the private link -*/ -"name"?: string; -/** -* Properties of a shared private link resource. -*/ -"properties"?: SharedPrivateLinkResourceProperty; + /** + * Unique name of the private link + */ + name?: string; + + /** + * Properties of a shared private link resource. + */ + @extension("x-ms-client-flatten", true) + properties?: SharedPrivateLinkResourceProperty; } /** -* Properties of a shared private link resource. -*/ + * Properties of a shared private link resource. + */ model SharedPrivateLinkResourceProperty { -/** -* group id of the private link -*/ -"groupId"?: string; -/** -* the resource id that private link links to -*/ -"privateLinkResourceId"?: string; -/** -* Request message -*/ -"requestMessage"?: string; -/** -* Connection status of the service consumer with the service provider -*/ -"status"?: EndpointServiceConnectionStatus; + /** + * group id of the private link + */ + groupId?: string; + + /** + * the resource id that private link links to + */ + privateLinkResourceId?: string; + + /** + * Request message + */ + requestMessage?: string; + + /** + * Connection status of the service consumer with the service provider + */ + status?: EndpointServiceConnectionStatus; } /** -* WorkspaceHub's configuration object. -*/ + * WorkspaceHub's configuration object. + */ model WorkspaceHubConfig { -"additionalWorkspaceStorageAccounts"?: string[]; -"defaultWorkspaceResourceGroup"?: string; + additionalWorkspaceStorageAccounts?: string[]; + defaultWorkspaceResourceGroup?: string; } /** -* The parameters for updating a machine learning workspace. -*/ + * The parameters for updating a machine learning workspace. + */ model WorkspaceUpdateParameters { -/** -* Managed service identity (system assigned and/or user assigned identities) -*/ -"identity"?: ManagedServiceIdentity; -/** -* The properties that the machine learning workspace will be updated with. -*/ -"properties"?: WorkspacePropertiesUpdateParameters; -/** -* Optional. This field is required to be implemented by the RP because AML is supporting more than one tier -*/ -"sku"?: Sku; -/** -* The resource tags for the machine learning workspace. -*/ -"tags"?: Record; + /** + * Managed service identity (system assigned and/or user assigned identities) + */ + identity?: ManagedServiceIdentity; + + /** + * The properties that the machine learning workspace will be updated with. + */ + @extension("x-ms-client-flatten", true) + properties?: WorkspacePropertiesUpdateParameters; + + /** + * Optional. This field is required to be implemented by the RP because AML is supporting more than one tier + */ + sku?: Sku; + + /** + * The resource tags for the machine learning workspace. + */ + tags?: Record; } /** -* The parameters for updating a machine learning workspace. -*/ + * The parameters for updating a machine learning workspace. + */ model WorkspacePropertiesUpdateParameters { -/** -* ARM id of the application insights associated with this workspace. -*/ -"applicationInsights"?: string; -/** -* ARM id of the container registry associated with this workspace. -*/ -"containerRegistry"?: string; -/** -* The description of this workspace. -*/ -"description"?: string; -"enableDataIsolation"?: boolean; -"encryption"?: EncryptionUpdateProperties; -/** -* Settings for feature store type workspace. -*/ -"featureStoreSettings"?: FeatureStoreSettings; -/** -* The friendly name for this workspace. This name in mutable -*/ -"friendlyName"?: string; -/** -* The compute name for image build -*/ -"imageBuildCompute"?: string; -/** -* Managed Network settings for a machine learning workspace. -*/ -"managedNetwork"?: ManagedNetworkSettings; -/** -* The user assigned identity resource id that represents the workspace identity. -*/ -"primaryUserAssignedIdentity"?: string; -/** -* Whether requests from Public Network are allowed. -*/ -"publicNetworkAccess"?: PublicNetworkAccessType; -/** -* The service managed resource settings. -*/ -"serviceManagedResourcesSettings"?: ServiceManagedResourcesSettings; -/** -* Retention time in days after workspace get soft deleted. -*/ -"softDeleteRetentionInDays"?: int32; -/** -* Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. -*/ -"v1LegacyMode"?: boolean; + /** + * ARM id of the application insights associated with this workspace. + */ + applicationInsights?: string; + + /** + * ARM id of the container registry associated with this workspace. + */ + containerRegistry?: string; + + /** + * The description of this workspace. + */ + description?: string; + + enableDataIsolation?: boolean; + encryption?: EncryptionUpdateProperties; + + /** + * Settings for feature store type workspace. + */ + featureStoreSettings?: FeatureStoreSettings; + + /** + * The friendly name for this workspace. This name in mutable + */ + friendlyName?: string; + + /** + * The compute name for image build + */ + imageBuildCompute?: string; + + /** + * Managed Network settings for a machine learning workspace. + */ + managedNetwork?: ManagedNetworkSettings; + + /** + * The user assigned identity resource id that represents the workspace identity. + */ + primaryUserAssignedIdentity?: string; + + /** + * Whether requests from Public Network are allowed. + */ + publicNetworkAccess?: PublicNetworkAccessType; + + /** + * The service managed resource settings. + */ + serviceManagedResourcesSettings?: ServiceManagedResourcesSettings; + + /** + * Retention time in days after workspace get soft deleted. + */ + softDeleteRetentionInDays?: int32; + + /** + * Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + */ + v1LegacyMode?: boolean; } - model EncryptionUpdateProperties { -"keyVaultProperties": EncryptionKeyVaultUpdateProperties; + keyVaultProperties: EncryptionKeyVaultUpdateProperties; } - model EncryptionKeyVaultUpdateProperties { -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"keyIdentifier": string; + @minLength(1) + @pattern("[a-zA-Z0-9_]") + keyIdentifier: string; } - @discriminator("authType") model WorkspaceConnectionPropertiesV2 { -/** -* Category of the connection -*/ -"category"?: ConnectionCategory; -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"expiryTime"?: utcDateTime; -/** -* Any object -*/ -"metadata"?: Record; -"target"?: string; + /** + * Category of the connection + */ + category?: ConnectionCategory; + + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expiryTime?: utcDateTime; + + /** + * Any object + */ + metadata?: Record; + + target?: string; } /** -* The properties that the machine learning workspace connection will be updated with. -*/ + * The properties that the machine learning workspace connection will be updated with. + */ model WorkspaceConnectionUpdateParameter { -/** -* The properties that the machine learning workspace connection will be updated with. -*/ -"properties"?: WorkspaceConnectionPropertiesV2; + /** + * The properties that the machine learning workspace connection will be updated with. + */ + properties?: WorkspaceConnectionPropertiesV2; } /** -* Parameters to diagnose a workspace -*/ + * Parameters to diagnose a workspace + */ model DiagnoseWorkspaceParameters { -"value"?: DiagnoseRequestProperties; + value?: DiagnoseRequestProperties; } - model DiagnoseRequestProperties { -/** -* Setting for diagnosing dependent application insights -*/ -"applicationInsights"?: Record; -/** -* Setting for diagnosing dependent container registry -*/ -"containerRegistry"?: Record; -/** -* Setting for diagnosing dns resolution -*/ -"dnsResolution"?: Record; -/** -* Setting for diagnosing dependent key vault -*/ -"keyVault"?: Record; -/** -* Setting for diagnosing network security group -*/ -"nsg"?: Record; -/** -* Setting for diagnosing unclassified category of problems -*/ -"others"?: Record; -/** -* Setting for diagnosing resource lock -*/ -"resourceLock"?: Record; -/** -* Setting for diagnosing dependent storage account -*/ -"storageAccount"?: Record; -/** -* Setting for diagnosing user defined routing -*/ -"udr"?: Record; + /** + * Setting for diagnosing dependent application insights + */ + applicationInsights?: Record; + + /** + * Setting for diagnosing dependent container registry + */ + containerRegistry?: Record; + + /** + * Setting for diagnosing dns resolution + */ + dnsResolution?: Record; + + /** + * Setting for diagnosing dependent key vault + */ + keyVault?: Record; + + /** + * Setting for diagnosing network security group + */ + nsg?: Record; + + /** + * Setting for diagnosing unclassified category of problems + */ + others?: Record; + + /** + * Setting for diagnosing resource lock + */ + resourceLock?: Record; + + /** + * Setting for diagnosing dependent storage account + */ + storageAccount?: Record; + + /** + * Setting for diagnosing user defined routing + */ + udr?: Record; } - model DiagnoseResponseResult { -"value"?: DiagnoseResponseResultValue; + value?: DiagnoseResponseResultValue; } - model DiagnoseResponseResultValue { -"userDefinedRouteResults"?: DiagnoseResult[]; -"networkSecurityRuleResults"?: DiagnoseResult[]; -"resourceLockResults"?: DiagnoseResult[]; -"dnsResolutionResults"?: DiagnoseResult[]; -"storageAccountResults"?: DiagnoseResult[]; -"keyVaultResults"?: DiagnoseResult[]; -"containerRegistryResults"?: DiagnoseResult[]; -"applicationInsightsResults"?: DiagnoseResult[]; -"otherResults"?: DiagnoseResult[]; + userDefinedRouteResults?: DiagnoseResult[]; + networkSecurityRuleResults?: DiagnoseResult[]; + resourceLockResults?: DiagnoseResult[]; + dnsResolutionResults?: DiagnoseResult[]; + storageAccountResults?: DiagnoseResult[]; + keyVaultResults?: DiagnoseResult[]; + containerRegistryResults?: DiagnoseResult[]; + applicationInsightsResults?: DiagnoseResult[]; + otherResults?: DiagnoseResult[]; } /** -* Result of Diagnose -*/ + * Result of Diagnose + */ model DiagnoseResult { -/** -* Code for workspace setup error -*/ -@visibility("read") -"code"?: string; -/** -* Level of workspace setup error -*/ -@visibility("read") -"level"?: DiagnoseResultLevel; -/** -* Message of workspace setup error -*/ -@visibility("read") -"message"?: string; -} + /** + * Code for workspace setup error + */ + @visibility("read") + code?: string; + /** + * Level of workspace setup error + */ + @visibility("read") + level?: DiagnoseResultLevel; -model ListWorkspaceKeysResult { -/** -* The access key of the workspace app insights -*/ -@visibility("read") -"appInsightsInstrumentationKey"?: string; -"containerRegistryCredentials"?: RegistryListCredentialsResult; -"notebookAccessKeys"?: ListNotebookKeysResult; -/** -* The arm Id key of the workspace storage -*/ -@visibility("read") -"userStorageArmId"?: string; -/** -* The access key of the workspace storage -*/ -@visibility("read") -"userStorageKey"?: string; + /** + * Message of workspace setup error + */ + @visibility("read") + message?: string; } +model ListWorkspaceKeysResult { + /** + * The access key of the workspace app insights + */ + @visibility("read") + appInsightsInstrumentationKey?: string; + + containerRegistryCredentials?: RegistryListCredentialsResult; + notebookAccessKeys?: ListNotebookKeysResult; -model RegistryListCredentialsResult { -/** -* The location of the workspace ACR -*/ -@visibility("read") -"location"?: string; -"passwords"?: Password[]; -/** -* The username of the workspace ACR -*/ -@visibility("read") -"username"?: string; + /** + * The arm Id key of the workspace storage + */ + @visibility("read") + userStorageArmId?: string; + + /** + * The access key of the workspace storage + */ + @visibility("read") + userStorageKey?: string; } +model RegistryListCredentialsResult { + /** + * The location of the workspace ACR + */ + @visibility("read") + location?: string; + + passwords?: Password[]; -model Password { -@visibility("read") -"name"?: string; -@visibility("read") -"value"?: string; + /** + * The username of the workspace ACR + */ + @visibility("read") + username?: string; } +model Password { + @visibility("read") + name?: string; -model ListNotebookKeysResult { -/** -* The primary access key of the Notebook -*/ -@visibility("read") -"primaryAccessKey"?: string; -/** -* The secondary access key of the Notebook -*/ -@visibility("read") -"secondaryAccessKey"?: string; + @visibility("read") + value?: string; } +model ListNotebookKeysResult { + /** + * The primary access key of the Notebook + */ + @visibility("read") + primaryAccessKey?: string; -model NotebookAccessTokenResult { -@visibility("read") -"accessToken"?: string; -@visibility("read") -"expiresIn"?: int32; -@visibility("read") -"hostName"?: string; -@visibility("read") -"notebookResourceId"?: string; -@visibility("read") -"publicDns"?: string; -@visibility("read") -"refreshToken"?: string; -@visibility("read") -"scope"?: string; -@visibility("read") -"tokenType"?: string; + /** + * The secondary access key of the Notebook + */ + @visibility("read") + secondaryAccessKey?: string; } +model NotebookAccessTokenResult { + @visibility("read") + accessToken?: string; -model ListStorageAccountKeysResult { -/** -* The access key of the storage -*/ -@visibility("read") -"userStorageKey"?: string; + @visibility("read") + expiresIn?: int32; + + @visibility("read") + hostName?: string; + + @visibility("read") + notebookResourceId?: string; + + @visibility("read") + publicDns?: string; + + @visibility("read") + refreshToken?: string; + + @visibility("read") + scope?: string; + + @visibility("read") + tokenType?: string; } +model ListStorageAccountKeysResult { + /** + * The access key of the storage + */ + @visibility("read") + userStorageKey?: string; +} model ExternalFqdnResponse { -"value"?: FqdnEndpointsPropertyBag[]; + value?: FqdnEndpointsPropertyBag[]; } /** -* Property bag for FQDN endpoints result -*/ + * Property bag for FQDN endpoints result + */ model FqdnEndpointsPropertyBag { -"properties"?: FqdnEndpoints; + properties?: FqdnEndpoints; } - model FqdnEndpoints { -"category"?: string; -"endpoints"?: FqdnEndpoint[]; + category?: string; + endpoints?: FqdnEndpoint[]; } - model FqdnEndpoint { -"domainName"?: string; -"endpointDetails"?: FqdnEndpointDetail[]; + domainName?: string; + endpointDetails?: FqdnEndpointDetail[]; } - model FqdnEndpointDetail { -"port"?: int32; + port?: int32; } /** -* A list of private link resources -*/ + * A list of private link resources + */ @pagedResult model PrivateLinkResourceListResult { -@items -"value"?: PrivateLinkResource[]; + @items + value?: PrivateLinkResource[]; } /** -* A private link resource -*/ + * A private link resource + */ model PrivateLinkResource extends Resource { -/** -* Managed service identity (system assigned and/or user assigned identities) -*/ -"identity"?: ManagedServiceIdentity; -/** -* Same as workspace location. -*/ -"location"?: string; -/** -* Properties of a private link resource. -*/ -"properties"?: PrivateLinkResourceProperties; -/** -* Optional. This field is required to be implemented by the RP because AML is supporting more than one tier -*/ -"sku"?: Sku; -/** -* Dictionary of -*/ -"tags"?: Record; + /** + * Managed service identity (system assigned and/or user assigned identities) + */ + identity?: ManagedServiceIdentity; + + /** + * Same as workspace location. + */ + location?: string; + + /** + * Properties of a private link resource. + */ + @extension("x-ms-client-flatten", true) + properties?: PrivateLinkResourceProperties; + + /** + * Optional. This field is required to be implemented by the RP because AML is supporting more than one tier + */ + sku?: Sku; + + /** + * Dictionary of + */ + tags?: Record; } /** -* Properties of a private link resource. -*/ + * Properties of a private link resource. + */ model PrivateLinkResourceProperties { -/** -* The private link resource group id. -*/ -@visibility("read") -"groupId"?: string; -/** -* The private link resource required member names. -*/ -@visibility("read") -"requiredMembers"?: string[]; -/** -* The private link resource Private link DNS zone name. -*/ -"requiredZoneNames"?: string[]; + /** + * The private link resource group id. + */ + @visibility("read") + groupId?: string; + + /** + * The private link resource required member names. + */ + @visibility("read") + requiredMembers?: string[]; + + /** + * The private link resource Private link DNS zone name. + */ + requiredZoneNames?: string[]; } /** -* Managed Network Provisioning options for managed network of a machine learning workspace. -*/ + * Managed Network Provisioning options for managed network of a machine learning workspace. + */ model ManagedNetworkProvisionOptions { -"includeSpark"?: boolean; + includeSpark?: boolean; } /** -* Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. -*/ + * Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. + */ model ResourceId { -/** -* The ID of the resource -*/ -"id": string; + /** + * The ID of the resource + */ + id: string; } /** -* A Machine Learning compute based on AKS. -*/ + * A Machine Learning compute based on AKS. + */ model AKS extends Compute { -...AKSSchema; -/** -* The type of compute -*/ -"computeType": "AKS"; -} + ...AKSSchema; + /** + * The type of compute + */ + computeType: "AKS"; +} model AKSSchema { -/** -* AKS properties -*/ -"properties"?: AKSSchemaProperties; + /** + * AKS properties + */ + properties?: AKSSchemaProperties; } /** -* AKS properties -*/ + * AKS properties + */ model AKSSchemaProperties { -/** -* Cluster full qualified domain name -*/ -"clusterFqdn"?: string; -/** -* System services -*/ -@visibility("read") -"systemServices"?: SystemService[]; -/** -* Number of agents -*/ -"agentCount"?: int32; -/** -* Agent virtual machine size -*/ -"agentVmSize"?: string; -/** -* Intended usage of the cluster -*/ -"clusterPurpose"?: ClusterPurpose = ClusterPurpose.FastProd; -/** -* SSL configuration -*/ -"sslConfiguration"?: SslConfiguration; -/** -* AKS networking configuration for vnet -*/ -"aksNetworkingConfiguration"?: AksNetworkingConfiguration; -/** -* Load Balancer Type -*/ -"loadBalancerType"?: LoadBalancerType = LoadBalancerType.PublicIp; -/** -* Load Balancer Subnet -*/ -"loadBalancerSubnet"?: string; -} - -/** -* A system service running on a compute. -*/ + /** + * Cluster full qualified domain name + */ + clusterFqdn?: string; + + /** + * System services + */ + @visibility("read") + systemServices?: SystemService[]; + + /** + * Number of agents + */ + agentCount?: int32; + + /** + * Agent virtual machine size + */ + agentVmSize?: string; + + /** + * Intended usage of the cluster + */ + clusterPurpose?: ClusterPurpose = ClusterPurpose.FastProd; + + /** + * SSL configuration + */ + sslConfiguration?: SslConfiguration; + + /** + * AKS networking configuration for vnet + */ + aksNetworkingConfiguration?: AksNetworkingConfiguration; + + /** + * Load Balancer Type + */ + loadBalancerType?: LoadBalancerType = LoadBalancerType.PublicIp; + + /** + * Load Balancer Subnet + */ + loadBalancerSubnet?: string; +} + +/** + * A system service running on a compute. + */ model SystemService { -/** -* The type of this system service. -*/ -@visibility("read") -"systemServiceType"?: string; -/** -* Public IP address -*/ -@visibility("read") -"publicIpAddress"?: string; -/** -* The version for this type. -*/ -@visibility("read") -"version"?: string; + /** + * The type of this system service. + */ + @visibility("read") + systemServiceType?: string; + + /** + * Public IP address + */ + @visibility("read") + publicIpAddress?: string; + + /** + * The version for this type. + */ + @visibility("read") + version?: string; } /** -* The ssl configuration for scoring -*/ + * The ssl configuration for scoring + */ model SslConfiguration { -/** -* Enable or disable ssl for scoring -*/ -"status"?: SslConfigStatus; -/** -* Cert data -*/ -"cert"?: string; -/** -* Key data -*/ -"key"?: string; -/** -* CNAME of the cert -*/ -"cname"?: string; -/** -* Leaf domain label of public endpoint -*/ -"leafDomainLabel"?: string; -/** -* Indicates whether to overwrite existing domain label. -*/ -"overwriteExistingDomain"?: boolean; + /** + * Enable or disable ssl for scoring + */ + status?: SslConfigStatus; + + /** + * Cert data + */ + cert?: string; + + /** + * Key data + */ + key?: string; + + /** + * CNAME of the cert + */ + cname?: string; + + /** + * Leaf domain label of public endpoint + */ + leafDomainLabel?: string; + + /** + * Indicates whether to overwrite existing domain label. + */ + overwriteExistingDomain?: boolean; } /** -* Advance configuration for AKS networking -*/ + * Advance configuration for AKS networking + */ model AksNetworkingConfiguration { -/** -* Virtual network subnet resource ID the compute nodes belong to -*/ -"subnetId"?: string; -/** -* A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. -*/ -@pattern("^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$") -"serviceCidr"?: string; -/** -* An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. -*/ -@pattern("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$") -"dnsServiceIP"?: string; -/** -* A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range. -*/ -@pattern("^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$") -"dockerBridgeCidr"?: string; -} + /** + * Virtual network subnet resource ID the compute nodes belong to + */ + subnetId?: string; -/** -* A Machine Learning compute based on Kubernetes Compute. -*/ -model Kubernetes extends Compute { -...KubernetesSchema; -/** -* The type of compute -*/ -"computeType": "Kubernetes"; -} + /** + * A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. + */ + @pattern("^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$") + serviceCidr?: string; -/** -* Kubernetes Compute Schema -*/ -model KubernetesSchema { -/** -* Properties of Kubernetes -*/ -"properties"?: KubernetesProperties; -} + /** + * An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. + */ + @pattern("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$") + dnsServiceIP?: string; -/** -* Kubernetes properties -*/ -model KubernetesProperties { -/** -* Relay connection string. -*/ -"relayConnectionString"?: string; -/** -* ServiceBus connection string. -*/ -"serviceBusConnectionString"?: string; -/** -* Extension principal-id. -*/ -"extensionPrincipalId"?: string; -/** -* Extension instance release train. -*/ -"extensionInstanceReleaseTrain"?: string; -/** -* VC name. -*/ -"vcName"?: string; -/** -* Compute namespace -*/ -"namespace"?: string = "default"; -/** -* Default instance type -*/ -"defaultInstanceType"?: string; -/** -* Instance Type Schema -*/ -"instanceTypes"?: Record; + /** + * A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range. + */ + @pattern("^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$") + dockerBridgeCidr?: string; } /** -* Instance type schema. -*/ -model InstanceTypeSchema { -/** -* Node Selector -*/ -"nodeSelector"?: Record; -/** -* Resource requests/limits for this instance type -*/ -"resources"?: InstanceTypeSchemaResources; -} + * A Machine Learning compute based on Kubernetes Compute. + */ +model Kubernetes extends Compute { + ...KubernetesSchema; -/** -* Resource requests/limits for this instance type -*/ -model InstanceTypeSchemaResources { -/** -* Resource requests for this instance type -*/ -"requests"?: Record; -/** -* Resource limits for this instance type -*/ -"limits"?: Record; + /** + * The type of compute + */ + computeType: "Kubernetes"; } /** -* AML Compute properties -*/ -model AmlComputeProperties { -/** -* Compute OS Type -*/ -"osType"?: OsType = OsType.Linux; -/** -* Virtual Machine Size -*/ -"vmSize"?: string; -/** -* Virtual Machine priority -*/ -"vmPriority"?: VmPriority; -/** -* Virtual Machine image for AML Compute - windows only -*/ -"virtualMachineImage"?: VirtualMachineImage; -/** -* Network is isolated or not -*/ -"isolatedNetwork"?: boolean; -/** -* Scale settings for AML Compute -*/ -"scaleSettings"?: ScaleSettings; -/** -* Credentials for an administrator user account that will be created on each compute node. -*/ -"userAccountCredentials"?: UserAccountCredentials; -/** -* Virtual network subnet resource ID the compute nodes belong to. -*/ -"subnet"?: ResourceId; -/** -* State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. -*/ -"remoteLoginPortPublicAccess"?: RemoteLoginPortPublicAccess = RemoteLoginPortPublicAccess.NotSpecified; -/** -* Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. -*/ -@visibility("read") -"allocationState"?: AllocationState; -/** -* The time at which the compute entered its current allocation state. -*/ -@visibility("read") -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"allocationStateTransitionTime"?: utcDateTime; -/** -* Collection of errors encountered by various compute nodes during node setup. -*/ -@visibility("read") -"errors"?: ErrorResponse[]; -/** -* The number of compute nodes currently assigned to the compute. -*/ -@visibility("read") -"currentNodeCount"?: int32; -/** -* The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation. -*/ -@visibility("read") -"targetNodeCount"?: int32; -/** -* Counts of various node states on the compute. -*/ -@visibility("read") -"nodeStateCounts"?: NodeStateCounts; + * Kubernetes Compute Schema + */ +model KubernetesSchema { + /** + * Properties of Kubernetes + */ + properties?: KubernetesProperties; +} + /** -* Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs. -*/ -"enableNodePublicIp"?: boolean = true; + * Kubernetes properties + */ +model KubernetesProperties { + /** + * Relay connection string. + */ + relayConnectionString?: string; + + /** + * ServiceBus connection string. + */ + serviceBusConnectionString?: string; + + /** + * Extension principal-id. + */ + extensionPrincipalId?: string; + + /** + * Extension instance release train. + */ + extensionInstanceReleaseTrain?: string; + + /** + * VC name. + */ + vcName?: string; + + /** + * Compute namespace + */ + `namespace`?: string = "default"; + + /** + * Default instance type + */ + defaultInstanceType?: string; + + /** + * Instance Type Schema + */ + instanceTypes?: Record; +} + +/** + * Instance type schema. + */ +model InstanceTypeSchema { + /** + * Node Selector + */ + nodeSelector?: Record; + + /** + * Resource requests/limits for this instance type + */ + resources?: InstanceTypeSchemaResources; +} + /** -* A property bag containing additional properties. -*/ -"propertyBag"?: Record; + * Resource requests/limits for this instance type + */ +model InstanceTypeSchemaResources { + /** + * Resource requests for this instance type + */ + requests?: Record; + + /** + * Resource limits for this instance type + */ + limits?: Record; } /** -* Virtual Machine image for Windows AML Compute -*/ + * AML Compute properties + */ +model AmlComputeProperties { + /** + * Compute OS Type + */ + osType?: OsType = OsType.Linux; + + /** + * Virtual Machine Size + */ + vmSize?: string; + + /** + * Virtual Machine priority + */ + vmPriority?: VmPriority; + + /** + * Virtual Machine image for AML Compute - windows only + */ + virtualMachineImage?: VirtualMachineImage; + + /** + * Network is isolated or not + */ + isolatedNetwork?: boolean; + + /** + * Scale settings for AML Compute + */ + scaleSettings?: ScaleSettings; + + /** + * Credentials for an administrator user account that will be created on each compute node. + */ + userAccountCredentials?: UserAccountCredentials; + + /** + * Virtual network subnet resource ID the compute nodes belong to. + */ + subnet?: ResourceId; + + /** + * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. + */ + remoteLoginPortPublicAccess?: RemoteLoginPortPublicAccess = RemoteLoginPortPublicAccess.NotSpecified; + + /** + * Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. + */ + @visibility("read") + allocationState?: AllocationState; + + /** + * The time at which the compute entered its current allocation state. + */ + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + allocationStateTransitionTime?: utcDateTime; + + /** + * Collection of errors encountered by various compute nodes during node setup. + */ + @visibility("read") + errors?: ErrorResponse[]; + + /** + * The number of compute nodes currently assigned to the compute. + */ + @visibility("read") + currentNodeCount?: int32; + + /** + * The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation. + */ + @visibility("read") + targetNodeCount?: int32; + + /** + * Counts of various node states on the compute. + */ + @visibility("read") + nodeStateCounts?: NodeStateCounts; + + /** + * Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs. + */ + enableNodePublicIp?: boolean = true; + + /** + * A property bag containing additional properties. + */ + propertyBag?: Record; +} + +/** + * Virtual Machine image for Windows AML Compute + */ model VirtualMachineImage { -/** -* Virtual Machine image path -*/ -"id": string; + /** + * Virtual Machine image path + */ + id: string; } /** -* Settings for user account that gets created on each on the nodes of a compute. -*/ + * Settings for user account that gets created on each on the nodes of a compute. + */ model UserAccountCredentials { -/** -* Name of the administrator user account which can be used to SSH to nodes. -*/ -"adminUserName": string; -/** -* SSH public key of the administrator user account. -*/ -"adminUserSshPublicKey"?: string; -/** -* Password of the administrator user account. -*/ -"adminUserPassword"?: string; -} + /** + * Name of the administrator user account which can be used to SSH to nodes. + */ + adminUserName: string; -/** -* Counts of various compute node states on the amlCompute. -*/ -model NodeStateCounts { -/** -* Number of compute nodes in idle state. -*/ -@visibility("read") -"idleNodeCount"?: int32; -/** -* Number of compute nodes which are running jobs. -*/ -@visibility("read") -"runningNodeCount"?: int32; -/** -* Number of compute nodes which are being prepared. -*/ -@visibility("read") -"preparingNodeCount"?: int32; -/** -* Number of compute nodes which are in unusable state. -*/ -@visibility("read") -"unusableNodeCount"?: int32; -/** -* Number of compute nodes which are leaving the amlCompute. -*/ -@visibility("read") -"leavingNodeCount"?: int32; -/** -* Number of compute nodes which are in preempted state. -*/ -@visibility("read") -"preemptedNodeCount"?: int32; + /** + * SSH public key of the administrator user account. + */ + adminUserSshPublicKey?: string; + + /** + * Password of the administrator user account. + */ + adminUserPassword?: string; } /** -* An Azure Machine Learning compute. -*/ + * Counts of various compute node states on the amlCompute. + */ +model NodeStateCounts { + /** + * Number of compute nodes in idle state. + */ + @visibility("read") + idleNodeCount?: int32; + + /** + * Number of compute nodes which are running jobs. + */ + @visibility("read") + runningNodeCount?: int32; + + /** + * Number of compute nodes which are being prepared. + */ + @visibility("read") + preparingNodeCount?: int32; + + /** + * Number of compute nodes which are in unusable state. + */ + @visibility("read") + unusableNodeCount?: int32; + + /** + * Number of compute nodes which are leaving the amlCompute. + */ + @visibility("read") + leavingNodeCount?: int32; + + /** + * Number of compute nodes which are in preempted state. + */ + @visibility("read") + preemptedNodeCount?: int32; +} + +/** + * An Azure Machine Learning compute. + */ model AmlCompute extends Compute { -...AmlComputeSchema; -/** -* The type of compute -*/ -"computeType": "AmlCompute"; + ...AmlComputeSchema; + + /** + * The type of compute + */ + computeType: "AmlCompute"; } /** -* Properties(top level) of AmlCompute -*/ + * Properties(top level) of AmlCompute + */ model AmlComputeSchema { -/** -* Properties of AmlCompute -*/ -"properties"?: AmlComputeProperties; + /** + * Properties of AmlCompute + */ + properties?: AmlComputeProperties; } /** -* Compute Instance properties -*/ + * Compute Instance properties + */ model ComputeInstanceProperties { -/** -* Virtual Machine Size -*/ -"vmSize"?: string; -/** -* Virtual network subnet resource ID the compute nodes belong to. -*/ -"subnet"?: ResourceId; -/** -* Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role. -*/ -"applicationSharingPolicy"?: ApplicationSharingPolicy = ApplicationSharingPolicy.Shared; -/** -* Specifies settings for autologger. -*/ -"autologgerSettings"?: ComputeInstanceAutologgerSettings; -/** -* Specifies policy and settings for SSH access. -*/ -"sshSettings"?: ComputeInstanceSshSettings; -/** -* List of Custom Services added to the compute. -*/ -"customServices"?: CustomService[]; -/** -* Returns metadata about the operating system image for this compute instance. -*/ -@visibility("read") -"osImageMetadata"?: ImageMetadata; -/** -* Describes all connectivity endpoints available for this ComputeInstance. -*/ -@visibility("read") -"connectivityEndpoints"?: ComputeInstanceConnectivityEndpoints; -/** -* Describes available applications and their endpoints on this ComputeInstance. -*/ -@visibility("read") -"applications"?: ComputeInstanceApplication[]; -/** -* Describes information on user who created this ComputeInstance. -*/ -@visibility("read") -"createdBy"?: ComputeInstanceCreatedBy; -/** -* Collection of errors encountered on this ComputeInstance. -*/ -@visibility("read") -"errors"?: ErrorResponse[]; -/** -* The current state of this ComputeInstance. -*/ -@visibility("read") -"state"?: ComputeInstanceState; -/** -* The Compute Instance Authorization type. Available values are personal (default). -*/ -"computeInstanceAuthorizationType"?: ComputeInstanceAuthorizationType = ComputeInstanceAuthorizationType.personal; -/** -* Settings for a personal compute instance. -*/ -"personalComputeInstanceSettings"?: PersonalComputeInstanceSettings; -/** -* Details of customized scripts to execute for setting up the cluster. -*/ -"setupScripts"?: SetupScripts; -/** -* The last operation on ComputeInstance. -*/ -@visibility("read") -"lastOperation"?: ComputeInstanceLastOperation; -/** -* The list of schedules to be applied on the computes. -*/ -"schedules"?: ComputeSchedules; -/** -* Stops compute instance after user defined period of inactivity. Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. -*/ -"idleTimeBeforeShutdown"?: string; -/** -* Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs. -*/ -"enableNodePublicIp"?: boolean = true; -/** -* Describes informations of containers on this ComputeInstance. -*/ -@visibility("read") -"containers"?: ComputeInstanceContainer[]; -/** -* Describes informations of dataDisks on this ComputeInstance. -*/ -@visibility("read") -"dataDisks"?: ComputeInstanceDataDisk[]; -/** -* Describes informations of dataMounts on this ComputeInstance. -*/ -@visibility("read") -"dataMounts"?: ComputeInstanceDataMount[]; -/** -* ComputeInstance version. -*/ -@visibility("read") -"versions"?: ComputeInstanceVersion; -} - -/** -* Specifies settings for autologger. -*/ + /** + * Virtual Machine Size + */ + vmSize?: string; + + /** + * Virtual network subnet resource ID the compute nodes belong to. + */ + subnet?: ResourceId; + + /** + * Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role. + */ + applicationSharingPolicy?: ApplicationSharingPolicy = ApplicationSharingPolicy.Shared; + + /** + * Specifies settings for autologger. + */ + autologgerSettings?: ComputeInstanceAutologgerSettings; + + /** + * Specifies policy and settings for SSH access. + */ + sshSettings?: ComputeInstanceSshSettings; + + /** + * List of Custom Services added to the compute. + */ + customServices?: CustomService[]; + + /** + * Returns metadata about the operating system image for this compute instance. + */ + @visibility("read") + osImageMetadata?: ImageMetadata; + + /** + * Describes all connectivity endpoints available for this ComputeInstance. + */ + @visibility("read") + connectivityEndpoints?: ComputeInstanceConnectivityEndpoints; + + /** + * Describes available applications and their endpoints on this ComputeInstance. + */ + @visibility("read") + applications?: ComputeInstanceApplication[]; + + /** + * Describes information on user who created this ComputeInstance. + */ + @visibility("read") + createdBy?: ComputeInstanceCreatedBy; + + /** + * Collection of errors encountered on this ComputeInstance. + */ + @visibility("read") + errors?: ErrorResponse[]; + + /** + * The current state of this ComputeInstance. + */ + @visibility("read") + state?: ComputeInstanceState; + + /** + * The Compute Instance Authorization type. Available values are personal (default). + */ + computeInstanceAuthorizationType?: ComputeInstanceAuthorizationType = ComputeInstanceAuthorizationType.personal; + + /** + * Settings for a personal compute instance. + */ + personalComputeInstanceSettings?: PersonalComputeInstanceSettings; + + /** + * Details of customized scripts to execute for setting up the cluster. + */ + setupScripts?: SetupScripts; + + /** + * The last operation on ComputeInstance. + */ + @visibility("read") + lastOperation?: ComputeInstanceLastOperation; + + /** + * The list of schedules to be applied on the computes. + */ + schedules?: ComputeSchedules; + + /** + * Stops compute instance after user defined period of inactivity. Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + */ + idleTimeBeforeShutdown?: string; + + /** + * Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs. + */ + enableNodePublicIp?: boolean = true; + + /** + * Describes informations of containers on this ComputeInstance. + */ + @visibility("read") + containers?: ComputeInstanceContainer[]; + + /** + * Describes informations of dataDisks on this ComputeInstance. + */ + @visibility("read") + dataDisks?: ComputeInstanceDataDisk[]; + + /** + * Describes informations of dataMounts on this ComputeInstance. + */ + @visibility("read") + dataMounts?: ComputeInstanceDataMount[]; + + /** + * ComputeInstance version. + */ + @visibility("read") + versions?: ComputeInstanceVersion; +} + +/** + * Specifies settings for autologger. + */ model ComputeInstanceAutologgerSettings { -/** -* Indicates whether mlflow autologger is enabled for notebooks. -*/ -"mlflowAutologger"?: MlflowAutologger; + /** + * Indicates whether mlflow autologger is enabled for notebooks. + */ + mlflowAutologger?: MlflowAutologger; } /** -* Specifies policy and settings for SSH access. -*/ + * Specifies policy and settings for SSH access. + */ model ComputeInstanceSshSettings { -/** -* State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable. -*/ -"sshPublicAccess"?: SshPublicAccess = SshPublicAccess.Disabled; -/** -* Describes the admin user name. -*/ -@visibility("read") -"adminUserName"?: string; -/** -* Describes the port for connecting through SSH. -*/ -@visibility("read") -"sshPort"?: int32; -/** -* Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key pairs. -*/ -"adminPublicKey"?: string; + /** + * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable. + */ + sshPublicAccess?: SshPublicAccess = SshPublicAccess.Disabled; + + /** + * Describes the admin user name. + */ + @visibility("read") + adminUserName?: string; + + /** + * Describes the port for connecting through SSH. + */ + @visibility("read") + sshPort?: int32; + + /** + * Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key pairs. + */ + adminPublicKey?: string; } /** -* Returns metadata about the operating system image for this compute instance. -*/ + * Returns metadata about the operating system image for this compute instance. + */ model ImageMetadata { -/** -* Specifies the current operating system image version this compute instance is running on. -*/ -"currentImageVersion"?: string; -/** -* Specifies the latest available operating system image version. -*/ -"latestImageVersion"?: string; -/** -* Specifies whether this compute instance is running on the latest operating system image. -*/ -"isLatestOsImageVersion"?: boolean; + /** + * Specifies the current operating system image version this compute instance is running on. + */ + currentImageVersion?: string; + + /** + * Specifies the latest available operating system image version. + */ + latestImageVersion?: string; + + /** + * Specifies whether this compute instance is running on the latest operating system image. + */ + isLatestOsImageVersion?: boolean; } /** -* Defines all connectivity endpoints and properties for an ComputeInstance. -*/ + * Defines all connectivity endpoints and properties for an ComputeInstance. + */ model ComputeInstanceConnectivityEndpoints { -/** -* Public IP Address of this ComputeInstance. -*/ -@visibility("read") -"publicIpAddress"?: string; -/** -* Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed). -*/ -@visibility("read") -"privateIpAddress"?: string; + /** + * Public IP Address of this ComputeInstance. + */ + @visibility("read") + publicIpAddress?: string; + + /** + * Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed). + */ + @visibility("read") + privateIpAddress?: string; } /** -* Defines an Aml Instance application and its connectivity endpoint URI. -*/ + * Defines an Aml Instance application and its connectivity endpoint URI. + */ model ComputeInstanceApplication { -/** -* Name of the ComputeInstance application. -*/ -"displayName"?: string; -/** -* Application' endpoint URI. -*/ -"endpointUri"?: string; + /** + * Name of the ComputeInstance application. + */ + displayName?: string; + + /** + * Application' endpoint URI. + */ + endpointUri?: string; } /** -* Describes information on user who created this ComputeInstance. -*/ + * Describes information on user who created this ComputeInstance. + */ model ComputeInstanceCreatedBy { -/** -* Name of the user. -*/ -@visibility("read") -"userName"?: string; -/** -* Uniquely identifies user' Azure Active Directory organization. -*/ -@visibility("read") -"userOrgId"?: string; -/** -* Uniquely identifies the user within his/her organization. -*/ -@visibility("read") -"userId"?: string; + /** + * Name of the user. + */ + @visibility("read") + userName?: string; + + /** + * Uniquely identifies user' Azure Active Directory organization. + */ + @visibility("read") + userOrgId?: string; + + /** + * Uniquely identifies the user within his/her organization. + */ + @visibility("read") + userId?: string; } /** -* Settings for a personal compute instance. -*/ + * Settings for a personal compute instance. + */ model PersonalComputeInstanceSettings { -/** -* A user explicitly assigned to a personal compute instance. -*/ -"assignedUser"?: AssignedUser; + /** + * A user explicitly assigned to a personal compute instance. + */ + assignedUser?: AssignedUser; } /** -* A user that can be assigned to a compute instance. -*/ + * A user that can be assigned to a compute instance. + */ model AssignedUser { -/** -* User’s AAD Object Id. -*/ -"objectId": string; -/** -* User’s AAD Tenant Id. -*/ -"tenantId": string; + /** + * User’s AAD Object Id. + */ + objectId: string; + + /** + * User’s AAD Tenant Id. + */ + tenantId: string; } /** -* Details of customized scripts to execute for setting up the cluster. -*/ + * Details of customized scripts to execute for setting up the cluster. + */ model SetupScripts { -/** -* Customized setup scripts -*/ -"scripts"?: ScriptsToExecute; + /** + * Customized setup scripts + */ + scripts?: ScriptsToExecute; } /** -* Customized setup scripts -*/ + * Customized setup scripts + */ model ScriptsToExecute { -/** -* Script that's run every time the machine starts. -*/ -"startupScript"?: ScriptReference; -/** -* Script that's run only once during provision of the compute. -*/ -"creationScript"?: ScriptReference; + /** + * Script that's run every time the machine starts. + */ + startupScript?: ScriptReference; + + /** + * Script that's run only once during provision of the compute. + */ + creationScript?: ScriptReference; } /** -* Script reference -*/ + * Script reference + */ model ScriptReference { -/** -* The storage source of the script: inline, workspace. -*/ -"scriptSource"?: string; -/** -* The location of scripts in the mounted volume. -*/ -"scriptData"?: string; -/** -* Optional command line arguments passed to the script to run. -*/ -"scriptArguments"?: string; -/** -* Optional time period passed to timeout command. -*/ -"timeout"?: string; + /** + * The storage source of the script: inline, workspace. + */ + scriptSource?: string; + + /** + * The location of scripts in the mounted volume. + */ + scriptData?: string; + + /** + * Optional command line arguments passed to the script to run. + */ + scriptArguments?: string; + + /** + * Optional time period passed to timeout command. + */ + timeout?: string; } /** -* The last operation on ComputeInstance. -*/ + * The last operation on ComputeInstance. + */ model ComputeInstanceLastOperation { -/** -* Name of the last operation. -*/ -"operationName"?: OperationName; -/** -* Time of the last operation. -*/ -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"operationTime"?: utcDateTime; -/** -* Operation status. -*/ -"operationStatus"?: OperationStatus; -/** -* Trigger of operation. -*/ -"operationTrigger"?: OperationTrigger; + /** + * Name of the last operation. + */ + operationName?: OperationName; + + /** + * Time of the last operation. + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + operationTime?: utcDateTime; + + /** + * Operation status. + */ + operationStatus?: OperationStatus; + + /** + * Trigger of operation. + */ + operationTrigger?: OperationTrigger; } /** -* The list of schedules to be applied on the computes -*/ + * The list of schedules to be applied on the computes + */ model ComputeSchedules { -/** -* The list of compute start stop schedules to be applied. -*/ -"computeStartStop"?: ComputeStartStopSchedule[]; + /** + * The list of compute start stop schedules to be applied. + */ + computeStartStop?: ComputeStartStopSchedule[]; } /** -* Compute start stop schedule properties -*/ + * Compute start stop schedule properties + */ model ComputeStartStopSchedule { -/** -* A system assigned id for the schedule. -*/ -@visibility("read") -"id"?: string; -/** -* The current deployment state of schedule. -*/ -@visibility("read") -"provisioningStatus"?: ProvisioningStatus; -/** -* Is the schedule enabled or disabled? -*/ -"status"?: ScheduleStatus; -/** -* [Required] The compute power action. -*/ -"action"?: ComputePowerAction; -/** -* [Required] The schedule trigger type. -*/ -"triggerType"?: TriggerType; -/** -* Required if triggerType is Recurrence. -*/ -"recurrence"?: Recurrence; -/** -* Required if triggerType is Cron. -*/ -"cron"?: Cron; -/** -* [Deprecated] Not used any more. -*/ -"schedule"?: ScheduleBase; -} - -/** -* The workflow trigger recurrence for ComputeStartStop schedule type. -*/ + /** + * A system assigned id for the schedule. + */ + @visibility("read") + id?: string; + + /** + * The current deployment state of schedule. + */ + @visibility("read") + provisioningStatus?: ProvisioningStatus; + + /** + * Is the schedule enabled or disabled? + */ + status?: ScheduleStatus; + + /** + * [Required] The compute power action. + */ + action?: ComputePowerAction; + + /** + * [Required] The schedule trigger type. + */ + triggerType?: TriggerType; + + /** + * Required if triggerType is Recurrence. + */ + recurrence?: Recurrence; + + /** + * Required if triggerType is Cron. + */ + cron?: Cron; + + /** + * [Deprecated] Not used any more. + */ + schedule?: ScheduleBase; +} + +/** + * The workflow trigger recurrence for ComputeStartStop schedule type. + */ model Recurrence { -/** -* [Required] The frequency to trigger schedule. -*/ -"frequency"?: RecurrenceFrequency; -/** -* [Required] Specifies schedule interval in conjunction with frequency -*/ -"interval"?: int32; -/** -* The start time in yyyy-MM-ddTHH:mm:ss format. -*/ -"startTime"?: string; -/** -* Specifies time zone in which the schedule runs. -TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 -*/ -"timeZone"?: string = "UTC"; -/** -* [Required] The recurrence schedule. -*/ -"schedule"?: RecurrenceSchedule; + /** + * [Required] The frequency to trigger schedule. + */ + frequency?: RecurrenceFrequency; + + /** + * [Required] Specifies schedule interval in conjunction with frequency + */ + interval?: int32; + + /** + * The start time in yyyy-MM-ddTHH:mm:ss format. + */ + startTime?: string; + + /** + * Specifies time zone in which the schedule runs. + * TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 + */ + timeZone?: string = "UTC"; + + /** + * [Required] The recurrence schedule. + */ + schedule?: RecurrenceSchedule; } /** -* The workflow trigger cron for ComputeStartStop schedule type. -*/ + * The workflow trigger cron for ComputeStartStop schedule type. + */ model Cron { -/** -* The start time in yyyy-MM-ddTHH:mm:ss format. -*/ -"startTime"?: string; -/** -* Specifies time zone in which the schedule runs. -TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 -*/ -"timeZone"?: string = "UTC"; -/** -* [Required] Specifies cron expression of schedule. -The expression should follow NCronTab format. -*/ -"expression"?: string; -} + /** + * The start time in yyyy-MM-ddTHH:mm:ss format. + */ + startTime?: string; + /** + * Specifies time zone in which the schedule runs. + * TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 + */ + timeZone?: string = "UTC"; + + /** + * [Required] Specifies cron expression of schedule. + * The expression should follow NCronTab format. + */ + expression?: string; +} model ScheduleBase { -/** -* A system assigned id for the schedule. -*/ -"id"?: string; -/** -* The current deployment state of schedule. -*/ -"provisioningStatus"?: ScheduleProvisioningState; -/** -* Is the schedule enabled or disabled? -*/ -"status"?: ScheduleStatus; + /** + * A system assigned id for the schedule. + */ + id?: string; + + /** + * The current deployment state of schedule. + */ + provisioningStatus?: ScheduleProvisioningState; + + /** + * Is the schedule enabled or disabled? + */ + status?: ScheduleStatus; } /** -* Defines an Aml Instance container. -*/ + * Defines an Aml Instance container. + */ model ComputeInstanceContainer { -/** -* Name of the ComputeInstance container. -*/ -"name"?: string; -/** -* Auto save settings. -*/ -"autosave"?: Autosave; -/** -* Information of GPU. -*/ -"gpu"?: string; -/** -* network of this container. -*/ -"network"?: Network; -/** -* Environment information of this container. -*/ -"environment"?: ComputeInstanceEnvironmentInfo; -/** -* services of this containers. -*/ -@visibility("read") -"services"?: Record[]; + /** + * Name of the ComputeInstance container. + */ + name?: string; + + /** + * Auto save settings. + */ + autosave?: Autosave; + + /** + * Information of GPU. + */ + gpu?: string; + + /** + * network of this container. + */ + network?: Network; + + /** + * Environment information of this container. + */ + environment?: ComputeInstanceEnvironmentInfo; + + /** + * services of this containers. + */ + @visibility("read") + services?: Record[]; } /** -* Environment information -*/ + * Environment information + */ model ComputeInstanceEnvironmentInfo { -/** -* name of environment. -*/ -"name"?: string; -/** -* version of environment. -*/ -"version"?: string; + /** + * name of environment. + */ + name?: string; + + /** + * version of environment. + */ + version?: string; } /** -* Defines an Aml Instance DataDisk. -*/ + * Defines an Aml Instance DataDisk. + */ model ComputeInstanceDataDisk { -/** -* Caching type of Data Disk. -*/ -"caching"?: Caching; -/** -* The initial disk size in gigabytes. -*/ -"diskSizeGB"?: int32; -/** -* The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. -*/ -"lun"?: int32; -/** -* type of this storage account. -*/ -"storageAccountType"?: StorageAccountType = StorageAccountType.Standard_LRS; -} + /** + * Caching type of Data Disk. + */ + caching?: Caching; -/** -* Defines an Aml Instance DataMount. -*/ -model ComputeInstanceDataMount { -/** -* Source of the ComputeInstance data mount. -*/ -"source"?: string; -/** -* Data source type. -*/ -"sourceType"?: SourceType; -/** -* name of the ComputeInstance data mount. -*/ -"mountName"?: string; -/** -* Mount Action. -*/ -"mountAction"?: MountAction; -/** -* who this data mount created by. -*/ -"createdBy"?: string; -/** -* Path of this data mount. -*/ -"mountPath"?: string; -/** -* Mount state. -*/ -"mountState"?: MountState; -/** -* The time when the disk mounted. -*/ -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"mountedOn"?: utcDateTime; -/** -* Error of this data mount. -*/ -"error"?: string; + /** + * The initial disk size in gigabytes. + */ + diskSizeGB?: int32; + + /** + * The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. + */ + lun?: int32; + + /** + * type of this storage account. + */ + storageAccountType?: StorageAccountType = StorageAccountType.Standard_LRS; } /** -* Version of computeInstance. -*/ + * Defines an Aml Instance DataMount. + */ +model ComputeInstanceDataMount { + /** + * Source of the ComputeInstance data mount. + */ + source?: string; + + /** + * Data source type. + */ + sourceType?: SourceType; + + /** + * name of the ComputeInstance data mount. + */ + mountName?: string; + + /** + * Mount Action. + */ + mountAction?: MountAction; + + /** + * who this data mount created by. + */ + createdBy?: string; + + /** + * Path of this data mount. + */ + mountPath?: string; + + /** + * Mount state. + */ + mountState?: MountState; + + /** + * The time when the disk mounted. + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + mountedOn?: utcDateTime; + + /** + * Error of this data mount. + */ + error?: string; +} + +/** + * Version of computeInstance. + */ model ComputeInstanceVersion { -/** -* Runtime of compute instance. -*/ -"runtime"?: string; + /** + * Runtime of compute instance. + */ + runtime?: string; } /** -* An Azure Machine Learning compute instance. -*/ + * An Azure Machine Learning compute instance. + */ model ComputeInstance extends Compute { -...ComputeInstanceSchema; -/** -* The type of compute -*/ -"computeType": "ComputeInstance"; + ...ComputeInstanceSchema; + + /** + * The type of compute + */ + computeType: "ComputeInstance"; } /** -* Properties(top level) of ComputeInstance -*/ + * Properties(top level) of ComputeInstance + */ model ComputeInstanceSchema { -/** -* Properties of ComputeInstance -*/ -"properties"?: ComputeInstanceProperties; + /** + * Properties of ComputeInstance + */ + properties?: ComputeInstanceProperties; } /** -* A Machine Learning compute based on Azure Virtual Machines. -*/ + * A Machine Learning compute based on Azure Virtual Machines. + */ model VirtualMachine extends Compute { -...VirtualMachineSchema; -/** -* The type of compute -*/ -"computeType": "VirtualMachine"; -} + ...VirtualMachineSchema; + /** + * The type of compute + */ + computeType: "VirtualMachine"; +} model VirtualMachineSchema { -"properties"?: VirtualMachineSchemaProperties; + properties?: VirtualMachineSchemaProperties; } - model VirtualMachineSchemaProperties { -/** -* Virtual Machine size -*/ -"virtualMachineSize"?: string; -/** -* Port open for ssh connections. -*/ -"sshPort"?: int32; -/** -* Notebook server port open for ssh connections. -*/ -"notebookServerPort"?: int32; -/** -* Public IP address of the virtual machine. -*/ -"address"?: string; -/** -* Admin credentials for virtual machine -*/ -"administratorAccount"?: VirtualMachineSshCredentials; -/** -* Indicates whether this compute will be used for running notebooks. -*/ -"isNotebookInstanceCompute"?: boolean; + /** + * Virtual Machine size + */ + virtualMachineSize?: string; + + /** + * Port open for ssh connections. + */ + sshPort?: int32; + + /** + * Notebook server port open for ssh connections. + */ + notebookServerPort?: int32; + + /** + * Public IP address of the virtual machine. + */ + address?: string; + + /** + * Admin credentials for virtual machine + */ + administratorAccount?: VirtualMachineSshCredentials; + + /** + * Indicates whether this compute will be used for running notebooks. + */ + isNotebookInstanceCompute?: boolean; } /** -* Admin credentials for virtual machine -*/ + * Admin credentials for virtual machine + */ model VirtualMachineSshCredentials { -/** -* Username of admin account -*/ -"username"?: string; -/** -* Password of admin account -*/ -"password"?: string; -/** -* Public key data -*/ -"publicKeyData"?: string; -/** -* Private key data -*/ -"privateKeyData"?: string; + /** + * Username of admin account + */ + username?: string; + + /** + * Password of admin account + */ + password?: string; + + /** + * Public key data + */ + publicKeyData?: string; + + /** + * Private key data + */ + privateKeyData?: string; } /** -* HDInsight compute properties -*/ + * HDInsight compute properties + */ model HDInsightProperties { -/** -* Port open for ssh connections on the master node of the cluster. -*/ -"sshPort"?: int32; -/** -* Public IP address of the master node of the cluster. -*/ -"address"?: string; -/** -* Admin credentials for master node of the cluster -*/ -"administratorAccount"?: VirtualMachineSshCredentials; + /** + * Port open for ssh connections on the master node of the cluster. + */ + sshPort?: int32; + + /** + * Public IP address of the master node of the cluster. + */ + address?: string; + + /** + * Admin credentials for master node of the cluster + */ + administratorAccount?: VirtualMachineSshCredentials; } /** -* A HDInsight compute. -*/ + * A HDInsight compute. + */ model HDInsight extends Compute { -...HDInsightSchema; -/** -* The type of compute -*/ -"computeType": "HDInsight"; -} + ...HDInsightSchema; + /** + * The type of compute + */ + computeType: "HDInsight"; +} model HDInsightSchema { -/** -* HDInsight compute properties -*/ -"properties"?: HDInsightProperties; + /** + * HDInsight compute properties + */ + properties?: HDInsightProperties; } /** -* A DataFactory compute. -*/ + * A DataFactory compute. + */ model DataFactory extends Compute { -/** -* The type of compute -*/ -"computeType": "DataFactory"; + /** + * The type of compute + */ + computeType: "DataFactory"; } /** -* Properties of Databricks -*/ + * Properties of Databricks + */ model DatabricksProperties { -/** -* Databricks access token -*/ -"databricksAccessToken"?: string; -/** -* Workspace Url -*/ -"workspaceUrl"?: string; + /** + * Databricks access token + */ + databricksAccessToken?: string; + + /** + * Workspace Url + */ + workspaceUrl?: string; } /** -* A DataFactory compute. -*/ + * A DataFactory compute. + */ model Databricks extends Compute { -...DatabricksSchema; -/** -* The type of compute -*/ -"computeType": "Databricks"; -} + ...DatabricksSchema; + /** + * The type of compute + */ + computeType: "Databricks"; +} model DatabricksSchema { -/** -* Properties of Databricks -*/ -"properties"?: DatabricksProperties; + /** + * Properties of Databricks + */ + properties?: DatabricksProperties; } /** -* A DataLakeAnalytics compute. -*/ + * A DataLakeAnalytics compute. + */ model DataLakeAnalytics extends Compute { -...DataLakeAnalyticsSchema; -/** -* The type of compute -*/ -"computeType": "DataLakeAnalytics"; -} + ...DataLakeAnalyticsSchema; + /** + * The type of compute + */ + computeType: "DataLakeAnalytics"; +} model DataLakeAnalyticsSchema { -"properties"?: DataLakeAnalyticsSchemaProperties; + properties?: DataLakeAnalyticsSchemaProperties; } - model DataLakeAnalyticsSchemaProperties { -/** -* DataLake Store Account Name -*/ -"dataLakeStoreAccountName"?: string; + /** + * DataLake Store Account Name + */ + dataLakeStoreAccountName?: string; } /** -* A SynapseSpark compute. -*/ + * A SynapseSpark compute. + */ model SynapseSpark extends Compute { -"properties"?: SynapseSparkProperties; -/** -* The type of compute -*/ -"computeType": "SynapseSpark"; -} + properties?: SynapseSparkProperties; - -model SynapseSparkProperties { -/** -* Auto scale properties. -*/ -"autoScaleProperties"?: AutoScaleProperties; -/** -* Auto pause properties. -*/ -"autoPauseProperties"?: AutoPauseProperties; -/** -* Spark version. -*/ -"sparkVersion"?: string; -/** -* The number of compute nodes currently assigned to the compute. -*/ -"nodeCount"?: int32; -/** -* Node size. -*/ -"nodeSize"?: string; -/** -* Node size family. -*/ -"nodeSizeFamily"?: string; -/** -* Azure subscription identifier. -*/ -"subscriptionId"?: string; -/** -* Name of the resource group in which workspace is located. -*/ -"resourceGroup"?: string; -/** -* Name of Azure Machine Learning workspace. -*/ -"workspaceName"?: string; -/** -* Pool name. -*/ -"poolName"?: string; + /** + * The type of compute + */ + computeType: "SynapseSpark"; } -/** -* Auto scale properties -*/ +model SynapseSparkProperties { + /** + * Auto scale properties. + */ + autoScaleProperties?: AutoScaleProperties; + + /** + * Auto pause properties. + */ + autoPauseProperties?: AutoPauseProperties; + + /** + * Spark version. + */ + sparkVersion?: string; + + /** + * The number of compute nodes currently assigned to the compute. + */ + nodeCount?: int32; + + /** + * Node size. + */ + nodeSize?: string; + + /** + * Node size family. + */ + nodeSizeFamily?: string; + + /** + * Azure subscription identifier. + */ + subscriptionId?: string; + + /** + * Name of the resource group in which workspace is located. + */ + resourceGroup?: string; + + /** + * Name of Azure Machine Learning workspace. + */ + workspaceName?: string; + + /** + * Pool name. + */ + poolName?: string; +} + +/** + * Auto scale properties + */ model AutoScaleProperties { -"minNodeCount"?: int32; -"enabled"?: boolean; -"maxNodeCount"?: int32; + minNodeCount?: int32; + enabled?: boolean; + maxNodeCount?: int32; } /** -* Auto pause properties -*/ + * Auto pause properties + */ model AutoPauseProperties { -"delayInMinutes"?: int32; -"enabled"?: boolean; + delayInMinutes?: int32; + enabled?: boolean; } /** -* Properties of AksComputeSecrets -*/ + * Properties of AksComputeSecrets + */ model AksComputeSecretsProperties { -/** -* Content of kubeconfig file that can be used to connect to the Kubernetes cluster. -*/ -"userKubeConfig"?: string; -/** -* Content of kubeconfig file that can be used to connect to the Kubernetes cluster. -*/ -"adminKubeConfig"?: string; -/** -* Image registry pull secret. -*/ -"imagePullSecretName"?: string; + /** + * Content of kubeconfig file that can be used to connect to the Kubernetes cluster. + */ + userKubeConfig?: string; + + /** + * Content of kubeconfig file that can be used to connect to the Kubernetes cluster. + */ + adminKubeConfig?: string; + + /** + * Image registry pull secret. + */ + imagePullSecretName?: string; } /** -* Secrets related to a Machine Learning compute based on AKS. -*/ + * Secrets related to a Machine Learning compute based on AKS. + */ model AksComputeSecrets extends ComputeSecrets { -...AksComputeSecretsProperties; -/** -* The type of compute -*/ -"computeType": "AKS"; + ...AksComputeSecretsProperties; + + /** + * The type of compute + */ + computeType: "AKS"; } /** -* Secrets related to a Machine Learning compute based on AKS. -*/ + * Secrets related to a Machine Learning compute based on AKS. + */ model VirtualMachineSecrets extends ComputeSecrets { -...VirtualMachineSecretsSchema; -/** -* The type of compute -*/ -"computeType": "VirtualMachine"; -} + ...VirtualMachineSecretsSchema; + /** + * The type of compute + */ + computeType: "VirtualMachine"; +} model VirtualMachineSecretsSchema { -/** -* Admin credentials for virtual machine. -*/ -"administratorAccount"?: VirtualMachineSshCredentials; + /** + * Admin credentials for virtual machine. + */ + administratorAccount?: VirtualMachineSshCredentials; } /** -* Properties of Databricks Compute Secrets -*/ + * Properties of Databricks Compute Secrets + */ model DatabricksComputeSecretsProperties { -/** -* access token for databricks account. -*/ -"databricksAccessToken"?: string; + /** + * access token for databricks account. + */ + databricksAccessToken?: string; } /** -* Secrets related to a Machine Learning compute based on Databricks. -*/ + * Secrets related to a Machine Learning compute based on Databricks. + */ model DatabricksComputeSecrets extends ComputeSecrets { -...DatabricksComputeSecretsProperties; -/** -* The type of compute -*/ -"computeType": "Databricks"; + ...DatabricksComputeSecretsProperties; + + /** + * The type of compute + */ + computeType: "Databricks"; } /** -* Account key datastore credentials configuration. -*/ + * Account key datastore credentials configuration. + */ model AccountKeyDatastoreCredentials extends DatastoreCredentials { -/** -* [Required] Storage account secrets. -*/ -@visibility("create", "update") -"secrets": AccountKeyDatastoreSecrets; -/** -* [Required] Credential type used to authentication with storage. -*/ -"credentialsType": "AccountKey"; + /** + * [Required] Storage account secrets. + */ + @visibility("create", "update") + secrets: AccountKeyDatastoreSecrets; + + /** + * [Required] Credential type used to authentication with storage. + */ + credentialsType: "AccountKey"; } /** -* Datastore account key secrets. -*/ + * Datastore account key secrets. + */ model AccountKeyDatastoreSecrets extends DatastoreSecrets { -/** -* Storage account key. -*/ -"key"?: string; -/** -* [Required] Credential type used to authentication with storage. -*/ -"secretsType": "AccountKey"; -} + /** + * Storage account key. + */ + key?: string; + /** + * [Required] Credential type used to authentication with storage. + */ + secretsType: "AccountKey"; +} model AllFeatures extends MonitoringFeatureFilterBase { -/** -* [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. -*/ -"filterType": "AllFeatures"; + /** + * [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. + */ + filterType: "AllFeatures"; } - @discriminator("filterType") -model MonitoringFeatureFilterBase { -} +model MonitoringFeatureFilterBase {} /** -* All nodes means the service will be running on all of the nodes of the job -*/ + * All nodes means the service will be running on all of the nodes of the job + */ model AllNodes extends Nodes { -/** -* [Required] Type of the Nodes value -*/ -"nodesValueType": "All"; + /** + * [Required] Type of the Nodes value + */ + nodesValueType: "All"; } /** -* AML Token identity configuration. -*/ + * AML Token identity configuration. + */ model AmlToken extends IdentityConfiguration { -/** -* [Required] Specifies the type of identity framework. -*/ -"identityType": "AMLToken"; + /** + * [Required] Specifies the type of identity framework. + */ + identityType: "AMLToken"; } /** -* AML token compute identity definition. -*/ + * AML token compute identity definition. + */ model AmlTokenComputeIdentity extends MonitorComputeIdentityBase { -/** -* [Required] Monitor compute identity type enum. -*/ -"computeIdentityType": "AmlToken"; + /** + * [Required] Monitor compute identity type enum. + */ + computeIdentityType: "AmlToken"; } /** -* Monitor compute identity base definition. -*/ + * Monitor compute identity base definition. + */ @discriminator("computeIdentityType") -model MonitorComputeIdentityBase { -} +model MonitorComputeIdentityBase {} /** -* Asset input type. -*/ + * Asset input type. + */ model AssetJobInput { -/** -* Input Asset Delivery Mode. -*/ -@visibility("read", "create") -"mode"?: InputDeliveryMode; -/** -* [Required] Input Asset URI. -*/ -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"uri": string; + /** + * Input Asset Delivery Mode. + */ + @visibility("read", "create") + mode?: InputDeliveryMode; + + /** + * [Required] Input Asset URI. + */ + @minLength(1) + @pattern("[a-zA-Z0-9_]") + uri: string; } /** -* Asset output type. -*/ + * Asset output type. + */ model AssetJobOutput { -/** -* Output Asset Name. -*/ -"assetName"?: string; -/** -* Output Asset Version. -*/ -"assetVersion"?: string; -/** -* Auto delete setting of output data asset. -*/ -@visibility("read", "create", "update") -"autoDeleteSetting"?: AutoDeleteSetting; -/** -* Output Asset Delivery Mode. -*/ -@visibility("read", "create") -"mode"?: OutputDeliveryMode; -/** -* Output Asset URI. -*/ -"uri"?: string; + /** + * Output Asset Name. + */ + assetName?: string; + + /** + * Output Asset Version. + */ + assetVersion?: string; + + /** + * Auto delete setting of output data asset. + */ + @visibility("read", "create", "update") + autoDeleteSetting?: AutoDeleteSetting; + + /** + * Output Asset Delivery Mode. + */ + @visibility("read", "create") + mode?: OutputDeliveryMode; + + /** + * Output Asset URI. + */ + uri?: string; } /** -* Forecast horizon determined automatically by system. -*/ + * Forecast horizon determined automatically by system. + */ model AutoForecastHorizon extends ForecastHorizon { -/** -* [Required] Set forecast horizon value selection mode. -*/ -"mode": "Auto"; + /** + * [Required] Set forecast horizon value selection mode. + */ + mode: "Auto"; } /** -* The desired maximum forecast horizon in units of time-series frequency. -*/ + * The desired maximum forecast horizon in units of time-series frequency. + */ @discriminator("mode") -model ForecastHorizon { -} +model ForecastHorizon {} /** -* AutoMLJob class. -Use this class for executing AutoML tasks like Classification/Regression etc. -See TaskType enum for all the tasks supported. -*/ + * AutoMLJob class. + * Use this class for executing AutoML tasks like Classification/Regression etc. + * See TaskType enum for all the tasks supported. + */ model AutoMLJob extends JobBase { -/** -* The ARM resource ID of the Environment specification for the job. -This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated environment version when running the job. -*/ -@visibility("read", "create") -"environmentId"?: string; -/** -* Environment variables included in the job. -*/ -@visibility("read", "create") -"environmentVariables"?: Record; -/** -* Mapping of output data bindings used in the job. -*/ -@visibility("read", "create") -"outputs"?: Record; -/** -* Queue settings for the job -*/ -@visibility("read", "create") -"queueSettings"?: QueueSettings; -/** -* Compute Resource configuration for the job. -*/ -@visibility("read", "create") -"resources"?: JobResourceConfiguration; -/** -* [Required] This represents scenario which can be one of Tables/NLP/Image -*/ -"taskDetails": AutoMLVertical; -/** -* [Required] Specifies the type of job. -*/ -"jobType": "AutoML"; -} - -/** -* Job output definition container information on where to find job output/logs. -*/ + /** + * The ARM resource ID of the Environment specification for the job. + * This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated environment version when running the job. + */ + @visibility("read", "create") + environmentId?: string; + + /** + * Environment variables included in the job. + */ + @visibility("read", "create") + environmentVariables?: Record; + + /** + * Mapping of output data bindings used in the job. + */ + @visibility("read", "create") + outputs?: Record; + + /** + * Queue settings for the job + */ + @visibility("read", "create") + queueSettings?: QueueSettings; + + /** + * Compute Resource configuration for the job. + */ + @visibility("read", "create") + resources?: JobResourceConfiguration; + + /** + * [Required] This represents scenario which can be one of Tables/NLP/Image + */ + taskDetails: AutoMLVertical; + + /** + * [Required] Specifies the type of job. + */ + jobType: "AutoML"; +} + +/** + * Job output definition container information on where to find job output/logs. + */ @discriminator("jobOutputType") model JobOutput { -/** -* Description for the output. -*/ -@visibility("read", "create") -"description"?: string; + /** + * Description for the output. + */ + @visibility("read", "create") + description?: string; } - model QueueSettings { -/** -* Controls the compute job tier -*/ -@visibility("read", "create") -"jobTier"?: JobTier; -/** -* Controls the priority of the job on a compute. -*/ -@visibility("read", "create") -"priority"?: int32; -} + /** + * Controls the compute job tier + */ + @visibility("read", "create") + jobTier?: JobTier; + /** + * Controls the priority of the job on a compute. + */ + @visibility("read", "create") + priority?: int32; +} model JobResourceConfiguration extends ResourceConfiguration { -/** -* Extra arguments to pass to the Docker run command. This would override any parameters that have already been set by the system, or in this section. This parameter is only supported for Azure ML compute types. -*/ -@visibility("read", "create") -"dockerArgs"?: string; -/** -* Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes). -*/ -@visibility("read", "create") -@pattern("\\d+[bBkKmMgG]") -"shmSize"?: string = "2g"; + /** + * Extra arguments to pass to the Docker run command. This would override any parameters that have already been set by the system, or in this section. This parameter is only supported for Azure ML compute types. + */ + @visibility("read", "create") + dockerArgs?: string; + + /** + * Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes). + */ + @visibility("read", "create") + @pattern("\\d+[bBkKmMgG]") + shmSize?: string = "2g"; } /** -* AutoML vertical class. -Base class for AutoML verticals - TableVertical/ImageVertical/NLPVertical -*/ + * AutoML vertical class. + * Base class for AutoML verticals - TableVertical/ImageVertical/NLPVertical + */ @discriminator("taskType") model AutoMLVertical { -/** -* Log verbosity for the job. -*/ -"logVerbosity"?: LogVerbosity; -/** -* Target column name: This is prediction values column. -Also known as label column name in context of classification tasks. -*/ -"targetColumnName"?: string; -/** -* [Required] Training data input. -*/ -"trainingData": MLTableJobInput; -} + /** + * Log verbosity for the job. + */ + logVerbosity?: LogVerbosity; + + /** + * Target column name: This is prediction values column. + * Also known as label column name in context of classification tasks. + */ + targetColumnName?: string; + /** + * [Required] Training data input. + */ + trainingData: MLTableJobInput; +} model MLTableJobInput extends JobInput { -...AssetJobInput; -/** -* [Required] Specifies the type of job. -*/ -"jobInputType": "mltable"; + ...AssetJobInput; + + /** + * [Required] Specifies the type of job. + */ + jobInputType: "mltable"; } /** -* Command job definition. -*/ + * Command job definition. + */ @discriminator("jobInputType") model JobInput { -/** -* Description for the input. -*/ -@visibility("read", "create") -"description"?: string; + /** + * Description for the input. + */ + @visibility("read", "create") + description?: string; } /** -* N-Cross validations determined automatically. -*/ + * N-Cross validations determined automatically. + */ model AutoNCrossValidations extends NCrossValidations { -/** -* [Required] Mode for determining N-Cross validations. -*/ -"mode": "Auto"; + /** + * [Required] Mode for determining N-Cross validations. + */ + mode: "Auto"; } /** -* N-Cross validations value. -*/ + * N-Cross validations value. + */ @discriminator("mode") -model NCrossValidations { -} - +model NCrossValidations {} model AutoSeasonality extends Seasonality { -/** -* [Required] Seasonality mode. -*/ -"mode": "Auto"; + /** + * [Required] Seasonality mode. + */ + mode: "Auto"; } /** -* Forecasting seasonality. -*/ + * Forecasting seasonality. + */ @discriminator("mode") -model Seasonality { -} - +model Seasonality {} model AutoTargetLags extends TargetLags { -/** -* [Required] Set target lags mode - Auto/Custom -*/ -"mode": "Auto"; + /** + * [Required] Set target lags mode - Auto/Custom + */ + mode: "Auto"; } /** -* The number of past periods to lag from the target column. -*/ + * The number of past periods to lag from the target column. + */ @discriminator("mode") -model TargetLags { -} +model TargetLags {} /** -* Target lags rolling window determined automatically. -*/ + * Target lags rolling window determined automatically. + */ model AutoTargetRollingWindowSize extends TargetRollingWindowSize { -/** -* [Required] TargetRollingWindowSiz detection mode. -*/ -"mode": "Auto"; + /** + * [Required] TargetRollingWindowSiz detection mode. + */ + mode: "Auto"; } /** -* Forecasting target rolling window size. -*/ + * Forecasting target rolling window size. + */ @discriminator("mode") -model TargetRollingWindowSize { -} +model TargetRollingWindowSize {} /** -* Settings for Autologger. -*/ + * Settings for Autologger. + */ model AutologgerSettings { -/** -* [Required] Indicates whether mlflow autologger is enabled. -*/ -@visibility("read", "create") -"mlflowAutologger": MLFlowAutologgerState; + /** + * [Required] Indicates whether mlflow autologger is enabled. + */ + @visibility("read", "create") + mlflowAutologger: MLFlowAutologgerState; } - -model AzMonMonitoringAlertNotificationSettings extends MonitoringAlertNotificationSettingsBase { -/** -* [Required] Specifies the type of signal to monitor. -*/ -"alertNotificationType": "AzureMonitor"; +model AzMonMonitoringAlertNotificationSettings + extends MonitoringAlertNotificationSettingsBase { + /** + * [Required] Specifies the type of signal to monitor. + */ + alertNotificationType: "AzureMonitor"; } - @discriminator("alertNotificationType") -model MonitoringAlertNotificationSettingsBase { -} +model MonitoringAlertNotificationSettingsBase {} /** -* Azure Blob datastore configuration. -*/ + * Azure Blob datastore configuration. + */ model AzureBlobDatastore extends Datastore { -...AzureDatastore; -/** -* Storage account name. -*/ -@visibility("read", "create") -"accountName"?: string; -/** -* Storage account container name. -*/ -@visibility("read", "create") -"containerName"?: string; -/** -* Azure cloud endpoint for the storage account. -*/ -@visibility("read", "create") -"endpoint"?: string; -/** -* Protocol used to communicate with the storage account. -*/ -@visibility("read", "create") -"protocol"?: string; -/** -* Indicates which identity to use to authenticate service data access to customer's storage. -*/ -@visibility("read", "create") -"serviceDataAccessAuthIdentity"?: ServiceDataAccessAuthIdentity; -/** -* [Required] Storage type backing the datastore. -*/ -"datastoreType": "AzureBlob"; -} - -/** -* Base definition for Azure datastore contents configuration. -*/ + ...AzureDatastore; + + /** + * Storage account name. + */ + @visibility("read", "create") + accountName?: string; + + /** + * Storage account container name. + */ + @visibility("read", "create") + containerName?: string; + + /** + * Azure cloud endpoint for the storage account. + */ + @visibility("read", "create") + endpoint?: string; + + /** + * Protocol used to communicate with the storage account. + */ + @visibility("read", "create") + protocol?: string; + + /** + * Indicates which identity to use to authenticate service data access to customer's storage. + */ + @visibility("read", "create") + serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; + + /** + * [Required] Storage type backing the datastore. + */ + datastoreType: "AzureBlob"; +} + +/** + * Base definition for Azure datastore contents configuration. + */ model AzureDatastore { -/** -* Azure Resource Group name -*/ -"resourceGroup"?: string; -/** -* Azure Subscription Id -*/ -"subscriptionId"?: string; + /** + * Azure Resource Group name + */ + resourceGroup?: string; + + /** + * Azure Subscription Id + */ + subscriptionId?: string; } /** -* Azure Data Lake Gen1 datastore configuration. -*/ + * Azure Data Lake Gen1 datastore configuration. + */ model AzureDataLakeGen1Datastore extends Datastore { -...AzureDatastore; -/** -* Indicates which identity to use to authenticate service data access to customer's storage. -*/ -@visibility("read", "create") -"serviceDataAccessAuthIdentity"?: ServiceDataAccessAuthIdentity; -/** -* [Required] Azure Data Lake store name. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"storeName": string; -/** -* [Required] Storage type backing the datastore. -*/ -"datastoreType": "AzureDataLakeGen1"; -} + ...AzureDatastore; -/** -* Azure Data Lake Gen2 datastore configuration. -*/ -model AzureDataLakeGen2Datastore extends Datastore { -...AzureDatastore; -/** -* [Required] Storage account name. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"accountName": string; -/** -* Azure cloud endpoint for the storage account. -*/ -@visibility("read", "create") -"endpoint"?: string; -/** -* [Required] The name of the Data Lake Gen2 filesystem. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"filesystem": string; -/** -* Protocol used to communicate with the storage account. -*/ -@visibility("read", "create") -"protocol"?: string; -/** -* Indicates which identity to use to authenticate service data access to customer's storage. -*/ -@visibility("read", "create") -"serviceDataAccessAuthIdentity"?: ServiceDataAccessAuthIdentity; -/** -* [Required] Storage type backing the datastore. -*/ -"datastoreType": "AzureDataLakeGen2"; + /** + * Indicates which identity to use to authenticate service data access to customer's storage. + */ + @visibility("read", "create") + serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; + + /** + * [Required] Azure Data Lake store name. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + storeName: string; + + /** + * [Required] Storage type backing the datastore. + */ + datastoreType: "AzureDataLakeGen1"; } /** -* Webhook details specific for Azure DevOps -*/ + * Azure Data Lake Gen2 datastore configuration. + */ +model AzureDataLakeGen2Datastore extends Datastore { + ...AzureDatastore; + + /** + * [Required] Storage account name. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + accountName: string; + + /** + * Azure cloud endpoint for the storage account. + */ + @visibility("read", "create") + endpoint?: string; + + /** + * [Required] The name of the Data Lake Gen2 filesystem. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + filesystem: string; + + /** + * Protocol used to communicate with the storage account. + */ + @visibility("read", "create") + protocol?: string; + + /** + * Indicates which identity to use to authenticate service data access to customer's storage. + */ + @visibility("read", "create") + serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; + + /** + * [Required] Storage type backing the datastore. + */ + datastoreType: "AzureDataLakeGen2"; +} + +/** + * Webhook details specific for Azure DevOps + */ model AzureDevOpsWebhook extends Webhook { -/** -* [Required] Specifies the type of service to send a callback -*/ -"webhookType": "AzureDevOps"; + /** + * [Required] Specifies the type of service to send a callback + */ + webhookType: "AzureDevOps"; } /** -* Azure File datastore configuration. -*/ + * Azure File datastore configuration. + */ model AzureFileDatastore extends Datastore { -...AzureDatastore; -/** -* [Required] Storage account name. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"accountName": string; -/** -* Azure cloud endpoint for the storage account. -*/ -@visibility("read", "create") -"endpoint"?: string; -/** -* [Required] The name of the Azure file share that the datastore points to. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"fileShareName": string; -/** -* Protocol used to communicate with the storage account. -*/ -@visibility("read", "create") -"protocol"?: string; -/** -* Indicates which identity to use to authenticate service data access to customer's storage. -*/ -@visibility("read", "create") -"serviceDataAccessAuthIdentity"?: ServiceDataAccessAuthIdentity; -/** -* [Required] Storage type backing the datastore. -*/ -"datastoreType": "AzureFile"; -} - -/** -* Azure ML batch inferencing server configurations. -*/ + ...AzureDatastore; + + /** + * [Required] Storage account name. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + accountName: string; + + /** + * Azure cloud endpoint for the storage account. + */ + @visibility("read", "create") + endpoint?: string; + + /** + * [Required] The name of the Azure file share that the datastore points to. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + fileShareName: string; + + /** + * Protocol used to communicate with the storage account. + */ + @visibility("read", "create") + protocol?: string; + + /** + * Indicates which identity to use to authenticate service data access to customer's storage. + */ + @visibility("read", "create") + serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; + + /** + * [Required] Storage type backing the datastore. + */ + datastoreType: "AzureFile"; +} + +/** + * Azure ML batch inferencing server configurations. + */ model AzureMLBatchInferencingServer extends InferencingServer { -/** -* Code configuration for AML batch inferencing server. -*/ -"codeConfiguration"?: CodeConfiguration; -/** -* [Required] Inferencing server type for various targets. -*/ -"serverType": "AzureMLBatch"; + /** + * Code configuration for AML batch inferencing server. + */ + codeConfiguration?: CodeConfiguration; + + /** + * [Required] Inferencing server type for various targets. + */ + serverType: "AzureMLBatch"; } /** -* Azure ML online inferencing configurations. -*/ + * Azure ML online inferencing configurations. + */ model AzureMLOnlineInferencingServer extends InferencingServer { -/** -* Code configuration for AML inferencing server. -*/ -"codeConfiguration"?: CodeConfiguration; -/** -* [Required] Inferencing server type for various targets. -*/ -"serverType": "AzureMLOnline"; + /** + * Code configuration for AML inferencing server. + */ + codeConfiguration?: CodeConfiguration; + + /** + * [Required] Inferencing server type for various targets. + */ + serverType: "AzureMLOnline"; } /** -* Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation -*/ + * Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation + */ model BanditPolicy extends EarlyTerminationPolicy { -/** -* Absolute distance allowed from the best performing run. -*/ -"slackAmount"?: float32; -/** -* Ratio of the allowed distance from the best performing run. -*/ -"slackFactor"?: float32; -/** -* [Required] Name of policy configuration -*/ -"policyType": "Bandit"; + /** + * Absolute distance allowed from the best performing run. + */ + slackAmount?: float32; + + /** + * Ratio of the allowed distance from the best performing run. + */ + slackFactor?: float32; + + /** + * [Required] Name of policy configuration + */ + policyType: "Bandit"; } /** -* Early termination policies enable canceling poor-performing runs before they complete -*/ + * Early termination policies enable canceling poor-performing runs before they complete + */ @discriminator("policyType") model EarlyTerminationPolicy { -/** -* Number of intervals by which to delay the first evaluation. -*/ -"delayEvaluation"?: int32; -/** -* Interval (number of runs) between policy evaluations. -*/ -"evaluationInterval"?: int32; + /** + * Number of intervals by which to delay the first evaluation. + */ + delayEvaluation?: int32; + + /** + * Interval (number of runs) between policy evaluations. + */ + evaluationInterval?: int32; } /** -* Base environment type. -*/ + * Base environment type. + */ model BaseEnvironmentId extends BaseEnvironmentSource { -/** -* [Required] Resource id accepting ArmId or AzureMlId. -*/ -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"resourceId": string; -/** -* [Required] Base environment type. -*/ -"baseEnvironmentSourceType": "EnvironmentAsset"; + /** + * [Required] Resource id accepting ArmId or AzureMlId. + */ + @minLength(1) + @pattern("[a-zA-Z0-9_]") + resourceId: string; + + /** + * [Required] Base environment type. + */ + baseEnvironmentSourceType: "EnvironmentAsset"; } /** -* Properties for a Batch Pipeline Component Deployment. -*/ -model BatchPipelineComponentDeploymentConfiguration extends BatchDeploymentConfiguration { -/** -* The ARM id of the component to be run. -*/ -"componentId"?: IdAssetReference; -/** -* The description which will be applied to the job. -*/ -"description"?: string; -/** -* Run-time settings for the pipeline job. -*/ -"settings"?: Record; -/** -* The tags which will be applied to the job. -*/ -"tags"?: Record; -/** -* [Required] The type of the deployment -*/ -"deploymentConfigurationType": "PipelineComponent"; + * Properties for a Batch Pipeline Component Deployment. + */ +model BatchPipelineComponentDeploymentConfiguration + extends BatchDeploymentConfiguration { + /** + * The ARM id of the component to be run. + */ + componentId?: IdAssetReference; + + /** + * The description which will be applied to the job. + */ + description?: string; + + /** + * Run-time settings for the pipeline job. + */ + settings?: Record; + + /** + * The tags which will be applied to the job. + */ + tags?: Record; + + /** + * [Required] The type of the deployment + */ + deploymentConfigurationType: "PipelineComponent"; } /** -* Reference to an asset via its ARM resource ID. -*/ + * Reference to an asset via its ARM resource ID. + */ model IdAssetReference extends AssetReferenceBase { -/** -* [Required] ARM resource ID of the asset. -*/ -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"assetId": string; -/** -* [Required] Specifies the type of asset reference. -*/ -"referenceType": "Id"; + /** + * [Required] ARM resource ID of the asset. + */ + @minLength(1) + @pattern("[a-zA-Z0-9_]") + assetId: string; + + /** + * [Required] Specifies the type of asset reference. + */ + referenceType: "Id"; } /** -* Defines a Sampling Algorithm that generates values based on previous values -*/ + * Defines a Sampling Algorithm that generates values based on previous values + */ model BayesianSamplingAlgorithm extends SamplingAlgorithm { -/** -* [Required] The algorithm used for generating hyperparameter values, along with configuration properties -*/ -"samplingAlgorithmType": "Bayesian"; + /** + * [Required] The algorithm used for generating hyperparameter values, along with configuration properties + */ + samplingAlgorithmType: "Bayesian"; } /** -* The Sampling Algorithm used to generate hyperparameter values, along with properties to -configure the algorithm -*/ + * The Sampling Algorithm used to generate hyperparameter values, along with properties to + * configure the algorithm + */ @discriminator("samplingAlgorithmType") -model SamplingAlgorithm { -} - +model SamplingAlgorithm {} model CategoricalDataDriftMetricThreshold extends DataDriftMetricThresholdBase { -/** -* [Required] The categorical data drift metric to calculate. -*/ -@visibility("read", "create") -"metric": CategoricalDataDriftMetric; -/** -* [Required] Specifies the data type of the metric threshold. -*/ -"dataType": "Categorical"; -} + /** + * [Required] The categorical data drift metric to calculate. + */ + @visibility("read", "create") + metric: CategoricalDataDriftMetric; + /** + * [Required] Specifies the data type of the metric threshold. + */ + dataType: "Categorical"; +} @discriminator("dataType") model DataDriftMetricThresholdBase { -/** -* The threshold value. If null, a default value will be set depending on the selected metric. -*/ -@visibility("read", "create") -"threshold"?: MonitoringThreshold; + /** + * The threshold value. If null, a default value will be set depending on the selected metric. + */ + @visibility("read", "create") + threshold?: MonitoringThreshold; } - model MonitoringThreshold { -/** -* The threshold value. If null, the set default is dependent on the metric type. -*/ -@visibility("read", "create") -"value"?: float64; + /** + * The threshold value. If null, the set default is dependent on the metric type. + */ + @visibility("read", "create") + value?: float64; } +model CategoricalDataQualityMetricThreshold + extends DataQualityMetricThresholdBase { + /** + * [Required] The categorical data quality metric to calculate. + */ + @visibility("read", "create") + metric: CategoricalDataQualityMetric; -model CategoricalDataQualityMetricThreshold extends DataQualityMetricThresholdBase { -/** -* [Required] The categorical data quality metric to calculate. -*/ -@visibility("read", "create") -"metric": CategoricalDataQualityMetric; -/** -* [Required] Specifies the data type of the metric threshold. -*/ -"dataType": "Categorical"; + /** + * [Required] Specifies the data type of the metric threshold. + */ + dataType: "Categorical"; } - @discriminator("dataType") model DataQualityMetricThresholdBase { -/** -* The threshold value. If null, a default value will be set depending on the selected metric. -*/ -@visibility("read", "create") -"threshold"?: MonitoringThreshold; + /** + * The threshold value. If null, a default value will be set depending on the selected metric. + */ + @visibility("read", "create") + threshold?: MonitoringThreshold; } +model CategoricalPredictionDriftMetricThreshold + extends PredictionDriftMetricThresholdBase { + /** + * [Required] The categorical prediction drift metric to calculate. + */ + @visibility("read", "create") + metric: CategoricalPredictionDriftMetric; -model CategoricalPredictionDriftMetricThreshold extends PredictionDriftMetricThresholdBase { -/** -* [Required] The categorical prediction drift metric to calculate. -*/ -@visibility("read", "create") -"metric": CategoricalPredictionDriftMetric; -/** -* [Required] Specifies the data type of the metric threshold. -*/ -"dataType": "Categorical"; + /** + * [Required] Specifies the data type of the metric threshold. + */ + dataType: "Categorical"; } - @discriminator("dataType") model PredictionDriftMetricThresholdBase { -/** -* The threshold value. If null, a default value will be set depending on the selected metric. -*/ -@visibility("read", "create") -"threshold"?: MonitoringThreshold; -} - -/** -* Certificate datastore credentials configuration. -*/ -model CertificateDatastoreCredentials extends DatastoreCredentials { -/** -* Authority URL used for authentication. -*/ -"authorityUrl"?: string; -/** -* [Required] Service principal client ID. -*/ -"clientId": string; -/** -* Resource the service principal has access to. -*/ -"resourceUrl"?: string; -/** -* [Required] Service principal secrets. -*/ -@visibility("create", "update") -"secrets": CertificateDatastoreSecrets; -/** -* [Required] ID of the tenant to which the service principal belongs. -*/ -"tenantId": string; -/** -* [Required] Thumbprint of the certificate used for authentication. -*/ -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"thumbprint": string; -/** -* [Required] Credential type used to authentication with storage. -*/ -"credentialsType": "Certificate"; + /** + * The threshold value. If null, a default value will be set depending on the selected metric. + */ + @visibility("read", "create") + threshold?: MonitoringThreshold; } - -/** -* Datastore certificate secrets. -*/ -model CertificateDatastoreSecrets extends DatastoreSecrets { -/** -* Service principal certificate. -*/ -"certificate"?: string; -/** -* [Required] Credential type used to authentication with storage. -*/ -"secretsType": "Certificate"; -} - -/** -* Classification task in AutoML Table vertical. -*/ -model Classification extends AutoMLVertical { -...TableVertical; -/** -* Positive label for binary metrics calculation. -*/ -"positiveLabel"?: string; -/** -* Primary metric for the task. -*/ -"primaryMetric"?: ClassificationPrimaryMetrics; -/** -* Inputs for training phase for an AutoML Job. -*/ -"trainingSettings"?: ClassificationTrainingSettings; -/** -* [Required] Task type for AutoMLJob. -*/ -"taskType": "Classification"; -} - -/** -* Classification Training related configuration. -*/ -model ClassificationTrainingSettings extends TrainingSettings { -/** -* Allowed models for classification task. -*/ -"allowedTrainingAlgorithms"?: ClassificationModels[]; -/** -* Blocked models for classification task. -*/ -"blockedTrainingAlgorithms"?: ClassificationModels[]; -} - -/** -* Training related configuration. -*/ -model TrainingSettings { -/** -* Enable recommendation of DNN models. -*/ -"enableDnnTraining"?: boolean; -/** -* Flag to turn on explainability on best model. -*/ -"enableModelExplainability"?: boolean = true; -/** -* Flag for enabling onnx compatible models. -*/ -"enableOnnxCompatibleModels"?: boolean; -/** -* Enable stack ensemble run. -*/ -"enableStackEnsemble"?: boolean = true; -/** -* Enable voting ensemble run. -*/ -"enableVoteEnsemble"?: boolean = true; -/** -* During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. -Configure this parameter with a higher value than 300 secs, if more time is needed. -*/ -"ensembleModelDownloadTimeout"?: duration = duration.PT5M; -/** -* Stack ensemble settings for stack ensemble run. -*/ -"stackEnsembleSettings"?: StackEnsembleSettings; -/** -* TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future may result in mixed mode or heuristics based mode selection. Default is 'auto'. -If 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. -If 'NonDistributed' then only non distributed algorithms are chosen. -*/ -"trainingMode"?: TrainingMode; -} - -/** -* Advances setting to customize StackEnsemble run. -*/ -model StackEnsembleSettings { -/** -* Optional parameters to pass to the initializer of the meta-learner. -*/ -"stackMetaLearnerKWargs"?: Record; -/** -* Specifies the proportion of the training set (when choosing train and validation type of training) to be reserved for training the meta-learner. Default value is 0.2. -*/ -"stackMetaLearnerTrainPercentage"?: float64 = 0.2; -/** -* The meta-learner is a model trained on the output of the individual heterogeneous models. -*/ -"stackMetaLearnerType"?: StackMetaLearnerType; -} - -/** -* Abstract class for AutoML tasks that use table dataset as input - such as Classification/Regression/Forecasting. -*/ -model TableVertical { -/** -* Columns to use for CVSplit data. -*/ -"cvSplitColumnNames"?: string[]; -/** -* Featurization inputs needed for AutoML job. -*/ -"featurizationSettings"?: TableVerticalFeaturizationSettings; -/** -* Model/training parameters that will remain constant throughout training. -*/ -"fixedParameters"?: TableFixedParameters; -/** -* Execution constraints for AutoMLJob. -*/ -"limitSettings"?: TableVerticalLimitSettings; -/** -* Number of cross validation folds to be applied on training dataset -when validation dataset is not provided. -*/ -"nCrossValidations"?: NCrossValidations; -/** -* Search space for sampling different combinations of models and their hyperparameters. -*/ -"searchSpace"?: TableParameterSubspace[]; -/** -* Settings for model sweeping and hyperparameter tuning. -*/ -"sweepSettings"?: TableSweepSettings; -/** -* Test data input. -*/ -"testData"?: MLTableJobInput; -/** -* The fraction of test dataset that needs to be set aside for validation purpose. -Values between (0.0 , 1.0) -Applied when validation dataset is not provided. -*/ -"testDataSize"?: float64; -/** -* Validation data inputs. -*/ -"validationData"?: MLTableJobInput; -/** -* The fraction of training dataset that needs to be set aside for validation purpose. -Values between (0.0 , 1.0) -Applied when validation dataset is not provided. -*/ -"validationDataSize"?: float64; -/** -* The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. -*/ -"weightColumnName"?: string; -} - -/** -* Featurization Configuration. -*/ -model TableVerticalFeaturizationSettings extends FeaturizationSettings { -/** -* These transformers shall not be used in featurization. -*/ -"blockedTransformers"?: BlockedTransformers[]; -/** -* Dictionary of column name and its type (int, float, string, datetime etc). -*/ -"columnNameAndTypes"?: Record; -/** -* Determines whether to use Dnn based featurizers for data featurization. -*/ -"enableDnnFeaturization"?: boolean; -/** -* Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of necessary transformation of the data in featurization phase. -If 'Off' is selected then no featurization is done. -If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. -*/ -"mode"?: FeaturizationMode; -/** -* User can specify additional transformers to be used along with the columns to which it would be applied and parameters for the transformer constructor. -*/ -"transformerParams"?: Record; -} - -/** -* Column transformer parameters. -*/ -model ColumnTransformer { -/** -* Fields to apply transformer logic on. -*/ -"fields"?: string[]; -/** -* Different properties to be passed to transformer. -Input expected is dictionary of key,value pairs in JSON format. -*/ -"parameters"?: Record; -} - -/** -* Featurization Configuration. -*/ -model FeaturizationSettings { -/** -* Dataset language, useful for the text data. -*/ -"datasetLanguage"?: string; -} - -/** -* Fixed training parameters that won't be swept over during AutoML Table training. -*/ -model TableFixedParameters { -/** -* Specify the boosting type, e.g gbdt for XGBoost. -*/ -"booster"?: string; -/** -* Specify the boosting type, e.g gbdt for LightGBM. -*/ -"boostingType"?: string; -/** -* Specify the grow policy, which controls the way new nodes are added to the tree. -*/ -"growPolicy"?: string; -/** -* The learning rate for the training procedure. -*/ -"learningRate"?: float64; -/** -* Specify the Maximum number of discrete bins to bucket continuous features . -*/ -"maxBin"?: int32; -/** -* Specify the max depth to limit the tree depth explicitly. -*/ -"maxDepth"?: int32; -/** -* Specify the max leaves to limit the tree leaves explicitly. -*/ -"maxLeaves"?: int32; -/** -* The minimum number of data per leaf. -*/ -"minDataInLeaf"?: int32; -/** -* Minimum loss reduction required to make a further partition on a leaf node of the tree. -*/ -"minSplitGain"?: float64; -/** -* The name of the model to train. -*/ -"modelName"?: string; -/** -* Specify the number of trees (or rounds) in an model. -*/ -"nEstimators"?: int32; -/** -* Specify the number of leaves. -*/ -"numLeaves"?: int32; -/** -* The name of the preprocessor to use. -*/ -"preprocessorName"?: string; -/** -* L1 regularization term on weights. -*/ -"regAlpha"?: float64; -/** -* L2 regularization term on weights. -*/ -"regLambda"?: float64; -/** -* Subsample ratio of the training instance. -*/ -"subsample"?: float64; -/** -* Frequency of subsample. -*/ -"subsampleFreq"?: float64; -/** -* Specify the tree method. -*/ -"treeMethod"?: string; -/** -* If true, center before scaling the data with StandardScalar. -*/ -"withMean"?: boolean; -/** -* If true, scaling the data with Unit Variance with StandardScalar. -*/ -"withStd"?: boolean; -} - -/** -* Job execution constraints. -*/ -model TableVerticalLimitSettings { -/** -* Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score improvement in last 20 iterations. -*/ -"enableEarlyTermination"?: boolean = true; -/** -* Exit score for the AutoML job. -*/ -"exitScore"?: float64; -/** -* Maximum Concurrent iterations. -*/ -"maxConcurrentTrials"?: int32 = 1; -/** -* Max cores per iteration. -*/ -"maxCoresPerTrial"?: int32 = -1; -/** -* Maximum nodes to use for the experiment. -*/ -"maxNodes"?: int32 = 1; -/** -* Number of iterations. -*/ -"maxTrials"?: int32 = 1000; -/** -* Number of concurrent sweeping runs that user wants to trigger. -*/ -"sweepConcurrentTrials"?: int32; -/** -* Number of sweeping runs that user wants to trigger. -*/ -"sweepTrials"?: int32; -/** -* AutoML job timeout. -*/ -"timeout"?: duration = duration.PT6H; -/** -* Iteration timeout. -*/ -"trialTimeout"?: duration = duration.PT30M; -} - - -model TableParameterSubspace { -/** -* Specify the boosting type, e.g gbdt for XGBoost. -*/ -"booster"?: string; -/** -* Specify the boosting type, e.g gbdt for LightGBM. -*/ -"boostingType"?: string; -/** -* Specify the grow policy, which controls the way new nodes are added to the tree. -*/ -"growPolicy"?: string; -/** -* The learning rate for the training procedure. -*/ -"learningRate"?: string; -/** -* Specify the Maximum number of discrete bins to bucket continuous features . -*/ -"maxBin"?: string; -/** -* Specify the max depth to limit the tree depth explicitly. -*/ -"maxDepth"?: string; -/** -* Specify the max leaves to limit the tree leaves explicitly. -*/ -"maxLeaves"?: string; -/** -* The minimum number of data per leaf. -*/ -"minDataInLeaf"?: string; -/** -* Minimum loss reduction required to make a further partition on a leaf node of the tree. -*/ -"minSplitGain"?: string; -/** -* The name of the model to train. -*/ -"modelName"?: string; -/** -* Specify the number of trees (or rounds) in an model. -*/ -"nEstimators"?: string; -/** -* Specify the number of leaves. -*/ -"numLeaves"?: string; + /** -* The name of the preprocessor to use. -*/ -"preprocessorName"?: string; + * Certificate datastore credentials configuration. + */ +model CertificateDatastoreCredentials extends DatastoreCredentials { + /** + * Authority URL used for authentication. + */ + authorityUrl?: string; + + /** + * [Required] Service principal client ID. + */ + clientId: string; + + /** + * Resource the service principal has access to. + */ + resourceUrl?: string; + + /** + * [Required] Service principal secrets. + */ + @visibility("create", "update") + secrets: CertificateDatastoreSecrets; + + /** + * [Required] ID of the tenant to which the service principal belongs. + */ + tenantId: string; + + /** + * [Required] Thumbprint of the certificate used for authentication. + */ + @minLength(1) + @pattern("[a-zA-Z0-9_]") + thumbprint: string; + + /** + * [Required] Credential type used to authentication with storage. + */ + credentialsType: "Certificate"; +} + +/** + * Datastore certificate secrets. + */ +model CertificateDatastoreSecrets extends DatastoreSecrets { + /** + * Service principal certificate. + */ + certificate?: string; + + /** + * [Required] Credential type used to authentication with storage. + */ + secretsType: "Certificate"; +} + /** -* L1 regularization term on weights. -*/ -"regAlpha"?: string; + * Classification task in AutoML Table vertical. + */ +model Classification extends AutoMLVertical { + ...TableVertical; + + /** + * Positive label for binary metrics calculation. + */ + positiveLabel?: string; + + /** + * Primary metric for the task. + */ + primaryMetric?: ClassificationPrimaryMetrics; + + /** + * Inputs for training phase for an AutoML Job. + */ + trainingSettings?: ClassificationTrainingSettings; + + /** + * [Required] Task type for AutoMLJob. + */ + taskType: "Classification"; +} + /** -* L2 regularization term on weights. -*/ -"regLambda"?: string; + * Classification Training related configuration. + */ +model ClassificationTrainingSettings extends TrainingSettings { + /** + * Allowed models for classification task. + */ + allowedTrainingAlgorithms?: ClassificationModels[]; + + /** + * Blocked models for classification task. + */ + blockedTrainingAlgorithms?: ClassificationModels[]; +} + /** -* Subsample ratio of the training instance. -*/ -"subsample"?: string; + * Training related configuration. + */ +model TrainingSettings { + /** + * Enable recommendation of DNN models. + */ + enableDnnTraining?: boolean; + + /** + * Flag to turn on explainability on best model. + */ + enableModelExplainability?: boolean = true; + + /** + * Flag for enabling onnx compatible models. + */ + enableOnnxCompatibleModels?: boolean; + + /** + * Enable stack ensemble run. + */ + enableStackEnsemble?: boolean = true; + + /** + * Enable voting ensemble run. + */ + enableVoteEnsemble?: boolean = true; + + /** + * During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. + * Configure this parameter with a higher value than 300 secs, if more time is needed. + */ + ensembleModelDownloadTimeout?: duration = "PT5M"; + + /** + * Stack ensemble settings for stack ensemble run. + */ + stackEnsembleSettings?: StackEnsembleSettings; + + /** + * TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future may result in mixed mode or heuristics based mode selection. Default is 'auto'. + * If 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. + * If 'NonDistributed' then only non distributed algorithms are chosen. + */ + trainingMode?: TrainingMode; +} + +/** + * Advances setting to customize StackEnsemble run. + */ +model StackEnsembleSettings { + /** + * Optional parameters to pass to the initializer of the meta-learner. + */ + stackMetaLearnerKWargs?: Record; + + /** + * Specifies the proportion of the training set (when choosing train and validation type of training) to be reserved for training the meta-learner. Default value is 0.2. + */ + stackMetaLearnerTrainPercentage?: float64 = 0.2; + + /** + * The meta-learner is a model trained on the output of the individual heterogeneous models. + */ + stackMetaLearnerType?: StackMetaLearnerType; +} + /** -* Frequency of subsample -*/ -"subsampleFreq"?: string; + * Abstract class for AutoML tasks that use table dataset as input - such as Classification/Regression/Forecasting. + */ +model TableVertical { + /** + * Columns to use for CVSplit data. + */ + cvSplitColumnNames?: string[]; + + /** + * Featurization inputs needed for AutoML job. + */ + featurizationSettings?: TableVerticalFeaturizationSettings; + + /** + * Model/training parameters that will remain constant throughout training. + */ + fixedParameters?: TableFixedParameters; + + /** + * Execution constraints for AutoMLJob. + */ + limitSettings?: TableVerticalLimitSettings; + + /** + * Number of cross validation folds to be applied on training dataset + * when validation dataset is not provided. + */ + nCrossValidations?: NCrossValidations; + + /** + * Search space for sampling different combinations of models and their hyperparameters. + */ + searchSpace?: TableParameterSubspace[]; + + /** + * Settings for model sweeping and hyperparameter tuning. + */ + sweepSettings?: TableSweepSettings; + + /** + * Test data input. + */ + testData?: MLTableJobInput; + + /** + * The fraction of test dataset that needs to be set aside for validation purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + */ + testDataSize?: float64; + + /** + * Validation data inputs. + */ + validationData?: MLTableJobInput; + + /** + * The fraction of training dataset that needs to be set aside for validation purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + */ + validationDataSize?: float64; + + /** + * The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. + */ + weightColumnName?: string; +} + +/** + * Featurization Configuration. + */ +model TableVerticalFeaturizationSettings extends FeaturizationSettings { + /** + * These transformers shall not be used in featurization. + */ + blockedTransformers?: BlockedTransformers[]; + + /** + * Dictionary of column name and its type (int, float, string, datetime etc). + */ + columnNameAndTypes?: Record; + + /** + * Determines whether to use Dnn based featurizers for data featurization. + */ + enableDnnFeaturization?: boolean; + + /** + * Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of necessary transformation of the data in featurization phase. + * If 'Off' is selected then no featurization is done. + * If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. + */ + mode?: FeaturizationMode; + + /** + * User can specify additional transformers to be used along with the columns to which it would be applied and parameters for the transformer constructor. + */ + transformerParams?: Record; +} + /** -* Specify the tree method. -*/ -"treeMethod"?: string; + * Column transformer parameters. + */ +model ColumnTransformer { + /** + * Fields to apply transformer logic on. + */ + fields?: string[]; + + /** + * Different properties to be passed to transformer. + * Input expected is dictionary of key,value pairs in JSON format. + */ + parameters?: Record; +} + /** -* If true, center before scaling the data with StandardScalar. -*/ -"withMean"?: string; + * Featurization Configuration. + */ +model FeaturizationSettings { + /** + * Dataset language, useful for the text data. + */ + datasetLanguage?: string; +} + /** -* If true, scaling the data with Unit Variance with StandardScalar. -*/ -"withStd"?: string; + * Fixed training parameters that won't be swept over during AutoML Table training. + */ +model TableFixedParameters { + /** + * Specify the boosting type, e.g gbdt for XGBoost. + */ + booster?: string; + + /** + * Specify the boosting type, e.g gbdt for LightGBM. + */ + boostingType?: string; + + /** + * Specify the grow policy, which controls the way new nodes are added to the tree. + */ + growPolicy?: string; + + /** + * The learning rate for the training procedure. + */ + learningRate?: float64; + + /** + * Specify the Maximum number of discrete bins to bucket continuous features . + */ + maxBin?: int32; + + /** + * Specify the max depth to limit the tree depth explicitly. + */ + maxDepth?: int32; + + /** + * Specify the max leaves to limit the tree leaves explicitly. + */ + maxLeaves?: int32; + + /** + * The minimum number of data per leaf. + */ + minDataInLeaf?: int32; + + /** + * Minimum loss reduction required to make a further partition on a leaf node of the tree. + */ + minSplitGain?: float64; + + /** + * The name of the model to train. + */ + modelName?: string; + + /** + * Specify the number of trees (or rounds) in an model. + */ + nEstimators?: int32; + + /** + * Specify the number of leaves. + */ + numLeaves?: int32; + + /** + * The name of the preprocessor to use. + */ + preprocessorName?: string; + + /** + * L1 regularization term on weights. + */ + regAlpha?: float64; + + /** + * L2 regularization term on weights. + */ + regLambda?: float64; + + /** + * Subsample ratio of the training instance. + */ + subsample?: float64; + + /** + * Frequency of subsample. + */ + subsampleFreq?: float64; + + /** + * Specify the tree method. + */ + treeMethod?: string; + + /** + * If true, center before scaling the data with StandardScalar. + */ + withMean?: boolean; + + /** + * If true, scaling the data with Unit Variance with StandardScalar. + */ + withStd?: boolean; +} + +/** + * Job execution constraints. + */ +model TableVerticalLimitSettings { + /** + * Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score improvement in last 20 iterations. + */ + enableEarlyTermination?: boolean = true; + + /** + * Exit score for the AutoML job. + */ + exitScore?: float64; + + /** + * Maximum Concurrent iterations. + */ + maxConcurrentTrials?: int32 = 1; + + /** + * Max cores per iteration. + */ + maxCoresPerTrial?: int32 = -1; + + /** + * Maximum nodes to use for the experiment. + */ + maxNodes?: int32 = 1; + + /** + * Number of iterations. + */ + maxTrials?: int32 = 1000; + + /** + * Number of concurrent sweeping runs that user wants to trigger. + */ + sweepConcurrentTrials?: int32; + + /** + * Number of sweeping runs that user wants to trigger. + */ + sweepTrials?: int32; + + /** + * AutoML job timeout. + */ + timeout?: duration = "PT6H"; + + /** + * Iteration timeout. + */ + trialTimeout?: duration = "PT30M"; } +model TableParameterSubspace { + /** + * Specify the boosting type, e.g gbdt for XGBoost. + */ + booster?: string; + + /** + * Specify the boosting type, e.g gbdt for LightGBM. + */ + boostingType?: string; + + /** + * Specify the grow policy, which controls the way new nodes are added to the tree. + */ + growPolicy?: string; + + /** + * The learning rate for the training procedure. + */ + learningRate?: string; + + /** + * Specify the Maximum number of discrete bins to bucket continuous features . + */ + maxBin?: string; + + /** + * Specify the max depth to limit the tree depth explicitly. + */ + maxDepth?: string; + + /** + * Specify the max leaves to limit the tree leaves explicitly. + */ + maxLeaves?: string; + + /** + * The minimum number of data per leaf. + */ + minDataInLeaf?: string; + + /** + * Minimum loss reduction required to make a further partition on a leaf node of the tree. + */ + minSplitGain?: string; + + /** + * The name of the model to train. + */ + modelName?: string; + + /** + * Specify the number of trees (or rounds) in an model. + */ + nEstimators?: string; + + /** + * Specify the number of leaves. + */ + numLeaves?: string; + + /** + * The name of the preprocessor to use. + */ + preprocessorName?: string; + + /** + * L1 regularization term on weights. + */ + regAlpha?: string; + + /** + * L2 regularization term on weights. + */ + regLambda?: string; + + /** + * Subsample ratio of the training instance. + */ + subsample?: string; + + /** + * Frequency of subsample + */ + subsampleFreq?: string; + + /** + * Specify the tree method. + */ + treeMethod?: string; + + /** + * If true, center before scaling the data with StandardScalar. + */ + withMean?: string; + + /** + * If true, scaling the data with Unit Variance with StandardScalar. + */ + withStd?: string; +} model TableSweepSettings { -/** -* Type of early termination policy for the sweeping job. -*/ -"earlyTermination"?: EarlyTerminationPolicy; -/** -* [Required] Type of sampling algorithm. -*/ -"samplingAlgorithm": SamplingAlgorithmType; + /** + * Type of early termination policy for the sweeping job. + */ + earlyTermination?: EarlyTerminationPolicy; + + /** + * [Required] Type of sampling algorithm. + */ + samplingAlgorithm: SamplingAlgorithmType; } +model ClassificationModelPerformanceMetricThreshold + extends ModelPerformanceMetricThresholdBase { + /** + * [Required] The classification model performance to calculate. + */ + @visibility("read", "create") + metric: ClassificationModelPerformanceMetric; -model ClassificationModelPerformanceMetricThreshold extends ModelPerformanceMetricThresholdBase { -/** -* [Required] The classification model performance to calculate. -*/ -@visibility("read", "create") -"metric": ClassificationModelPerformanceMetric; -/** -* [Required] Specifies the data type of the metric threshold. -*/ -"modelType": "Classification"; + /** + * [Required] Specifies the data type of the metric threshold. + */ + modelType: "Classification"; } - @discriminator("modelType") model ModelPerformanceMetricThresholdBase { -/** -* The threshold value. If null, a default value will be set depending on the selected metric. -*/ -@visibility("read", "create") -"threshold"?: MonitoringThreshold; + /** + * The threshold value. If null, a default value will be set depending on the selected metric. + */ + @visibility("read", "create") + threshold?: MonitoringThreshold; } - model CocoExportSummary extends ExportSummary { -/** -* The container name to which the labels will be exported. -*/ -@visibility("read") -"containerName"?: string; -/** -* The output path where the labels will be exported. -*/ -@visibility("read") -"snapshotPath"?: string; -/** -* [Required] The format of exported labels, also as the discriminator. -*/ -"format": "Coco"; + /** + * The container name to which the labels will be exported. + */ + @visibility("read") + containerName?: string; + + /** + * The output path where the labels will be exported. + */ + @visibility("read") + snapshotPath?: string; + + /** + * [Required] The format of exported labels, also as the discriminator. + */ + format: "Coco"; } /** -* Command job definition. -*/ + * Command job definition. + */ model CommandJob extends JobBase { -/** -* Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. -*/ -@visibility("read", "create") -"autologgerSettings"?: AutologgerSettings; -/** -* ARM resource ID of the code asset. -*/ -@visibility("read", "create") -"codeId"?: string; -/** -* [Required] The command to execute on startup of the job. eg. "python train.py" -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"command": string; -/** -* Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, Ray, or null. -*/ -@visibility("read", "create") -"distribution"?: DistributionConfiguration; -/** -* [Required] The ARM resource ID of the Environment specification for the job. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"environmentId": string; -/** -* Environment variables included in the job. -*/ -@visibility("read", "create") -"environmentVariables"?: Record; -/** -* Mapping of input data bindings used in the job. -*/ -@visibility("read", "create") -"inputs"?: Record; -/** -* Command Job limit. -*/ -@visibility("read", "create") -"limits"?: CommandJobLimits; -/** -* Mapping of output data bindings used in the job. -*/ -@visibility("read", "create") -"outputs"?: Record; -/** -* Input parameters. -*/ -@visibility("read") -"parameters"?: Record; -/** -* Queue settings for the job -*/ -@visibility("read", "create") -"queueSettings"?: QueueSettings; -/** -* Compute Resource configuration for the job. -*/ -@visibility("read", "create") -"resources"?: JobResourceConfiguration; -/** -* [Required] Specifies the type of job. -*/ -"jobType": "Command"; -} - -/** -* Base definition for job distribution configuration. -*/ + /** + * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + */ + @visibility("read", "create") + autologgerSettings?: AutologgerSettings; + + /** + * ARM resource ID of the code asset. + */ + @visibility("read", "create") + codeId?: string; + + /** + * [Required] The command to execute on startup of the job. eg. "python train.py" + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + command: string; + + /** + * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, Ray, or null. + */ + @visibility("read", "create") + distribution?: DistributionConfiguration; + + /** + * [Required] The ARM resource ID of the Environment specification for the job. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + environmentId: string; + + /** + * Environment variables included in the job. + */ + @visibility("read", "create") + environmentVariables?: Record; + + /** + * Mapping of input data bindings used in the job. + */ + @visibility("read", "create") + inputs?: Record; + + /** + * Command Job limit. + */ + @visibility("read", "create") + limits?: CommandJobLimits; + + /** + * Mapping of output data bindings used in the job. + */ + @visibility("read", "create") + outputs?: Record; + + /** + * Input parameters. + */ + @visibility("read") + parameters?: Record; + + /** + * Queue settings for the job + */ + @visibility("read", "create") + queueSettings?: QueueSettings; + + /** + * Compute Resource configuration for the job. + */ + @visibility("read", "create") + resources?: JobResourceConfiguration; + + /** + * [Required] Specifies the type of job. + */ + jobType: "Command"; +} + +/** + * Base definition for job distribution configuration. + */ @discriminator("distributionType") -model DistributionConfiguration { -} +model DistributionConfiguration {} /** -* Command Job limit class. -*/ + * Command Job limit class. + */ model CommandJobLimits extends JobLimits { -/** -* [Required] JobLimit type. -*/ -"jobLimitsType": "Command"; + /** + * [Required] JobLimit type. + */ + jobLimitsType: "Command"; } - @discriminator("jobLimitsType") model JobLimits { -/** -* The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. -*/ -"timeout"?: duration; + /** + * The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. + */ + timeout?: duration; } /** -* Resource requirements for each container instance within an online deployment. -*/ + * Resource requirements for each container instance within an online deployment. + */ model ContainerResourceRequirements { -/** -* Container resource limit info: -*/ -"containerResourceLimits"?: ContainerResourceSettings; -/** -* Container resource request info: -*/ -"containerResourceRequests"?: ContainerResourceSettings; -} + /** + * Container resource limit info: + */ + containerResourceLimits?: ContainerResourceSettings; + /** + * Container resource request info: + */ + containerResourceRequests?: ContainerResourceSettings; +} model ContainerResourceSettings { -/** -* Number of vCPUs request/limit for container. More info: -https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -*/ -"cpu"?: string; -/** -* Number of Nvidia GPU cards request/limit for container. More info: -https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -*/ -"gpu"?: string; -/** -* Memory size request/limit for container. More info: -https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ -*/ -"memory"?: string; -} + /** + * Number of vCPUs request/limit for container. More info: + * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + */ + cpu?: string; + /** + * Number of Nvidia GPU cards request/limit for container. More info: + * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + */ + gpu?: string; -model CreateMonitorAction extends ScheduleActionBase { -/** -* [Required] Defines the monitor. -*/ -@visibility("read", "create") -"monitorDefinition": MonitorDefinition; -/** -* [Required] Specifies the action type of the schedule -*/ -"actionType": "CreateMonitor"; + /** + * Memory size request/limit for container. More info: + * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + */ + memory?: string; } +model CreateMonitorAction extends ScheduleActionBase { + /** + * [Required] Defines the monitor. + */ + @visibility("read", "create") + monitorDefinition: MonitorDefinition; -model MonitorDefinition { -/** -* The monitor's notification settings. -*/ -@visibility("read", "create") -"alertNotificationSetting"?: MonitoringAlertNotificationSettingsBase; -/** -* [Required] The ARM resource ID of the compute resource to run the monitoring job on. -*/ -@visibility("read", "create") -"computeConfiguration": MonitorComputeConfigurationBase; -/** -* The ARM resource ID of either the model or deployment targeted by this monitor. -*/ -@visibility("read", "create") -"monitoringTarget"?: MonitoringTarget; -/** -* [Required] The signals to monitor. -*/ -@visibility("read", "create") -"signals": Record; + /** + * [Required] Specifies the action type of the schedule + */ + actionType: "CreateMonitor"; } -/** -* Monitor compute configuration base definition. -*/ +model MonitorDefinition { + /** + * The monitor's notification settings. + */ + @visibility("read", "create") + alertNotificationSetting?: MonitoringAlertNotificationSettingsBase; + + /** + * [Required] The ARM resource ID of the compute resource to run the monitoring job on. + */ + @visibility("read", "create") + computeConfiguration: MonitorComputeConfigurationBase; + + /** + * The ARM resource ID of either the model or deployment targeted by this monitor. + */ + @visibility("read", "create") + monitoringTarget?: MonitoringTarget; + + /** + * [Required] The signals to monitor. + */ + @visibility("read", "create") + signals: Record; +} + +/** + * Monitor compute configuration base definition. + */ @discriminator("computeType") -model MonitorComputeConfigurationBase { -} +model MonitorComputeConfigurationBase {} /** -* Monitoring target definition. -*/ + * Monitoring target definition. + */ model MonitoringTarget { -/** -* The ARM resource ID of either the deployment targeted by this monitor. -*/ -@visibility("read", "create") -"deploymentId"?: string; -/** -* The ARM resource ID of either the model targeted by this monitor. -*/ -@visibility("read", "create") -"modelId"?: string; -/** -* [Required] The machine learning task type of the model. -*/ -@visibility("read", "create") -"taskType": ModelTaskType; -} + /** + * The ARM resource ID of either the deployment targeted by this monitor. + */ + @visibility("read", "create") + deploymentId?: string; + /** + * The ARM resource ID of either the model targeted by this monitor. + */ + @visibility("read", "create") + modelId?: string; + + /** + * [Required] The machine learning task type of the model. + */ + @visibility("read", "create") + taskType: ModelTaskType; +} @discriminator("signalType") model MonitoringSignalBase { -/** -* The current notification mode for this signal. -*/ -@visibility("read", "create") -"mode"?: MonitoringNotificationMode; -/** -* Property dictionary. Properties can be added, but not removed or altered. -*/ -"properties"?: Record; -} + /** + * The current notification mode for this signal. + */ + @visibility("read", "create") + mode?: MonitoringNotificationMode; + /** + * Property dictionary. Properties can be added, but not removed or altered. + */ + properties?: Record; +} model CronTrigger extends TriggerBase { -/** -* [Required] Specifies cron expression of schedule. -The expression should follow NCronTab format. -*/ -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"expression": string; -/** -* [Required] -*/ -"triggerType": "Cron"; -} + /** + * [Required] Specifies cron expression of schedule. + * The expression should follow NCronTab format. + */ + @minLength(1) + @pattern("[a-zA-Z0-9_]") + expression: string; + /** + * [Required] + */ + triggerType: "Cron"; +} model CsvExportSummary extends ExportSummary { -/** -* The container name to which the labels will be exported. -*/ -@visibility("read") -"containerName"?: string; -/** -* The output path where the labels will be exported. -*/ -@visibility("read") -"snapshotPath"?: string; -/** -* [Required] The format of exported labels, also as the discriminator. -*/ -"format": "CSV"; + /** + * The container name to which the labels will be exported. + */ + @visibility("read") + containerName?: string; + + /** + * The output path where the labels will be exported. + */ + @visibility("read") + snapshotPath?: string; + + /** + * [Required] The format of exported labels, also as the discriminator. + */ + format: "CSV"; } /** -* The desired maximum forecast horizon in units of time-series frequency. -*/ + * The desired maximum forecast horizon in units of time-series frequency. + */ model CustomForecastHorizon extends ForecastHorizon { -/** -* [Required] Forecast horizon value. -*/ -"value": int32; -/** -* [Required] Set forecast horizon value selection mode. -*/ -"mode": "Custom"; + /** + * [Required] Forecast horizon value. + */ + value: int32; + + /** + * [Required] Set forecast horizon value selection mode. + */ + mode: "Custom"; } /** -* Custom inference server configurations. -*/ + * Custom inference server configurations. + */ model CustomInferencingServer extends InferencingServer { -/** -* Inference configuration for custom inferencing. -*/ -"inferenceConfiguration"?: OnlineInferenceConfiguration; -/** -* [Required] Inferencing server type for various targets. -*/ -"serverType": "Custom"; + /** + * Inference configuration for custom inferencing. + */ + inferenceConfiguration?: OnlineInferenceConfiguration; + + /** + * [Required] Inferencing server type for various targets. + */ + serverType: "Custom"; } /** -* Online inference configuration options. -*/ + * Online inference configuration options. + */ model OnlineInferenceConfiguration { -/** -* Additional configurations -*/ -"configurations"?: Record; -/** -* Entry script or command to invoke. -*/ -"entryScript"?: string; -/** -* The route to check the liveness of the inference server container. -*/ -"livenessRoute"?: Route; -/** -* The route to check the readiness of the inference server container. -*/ -"readinessRoute"?: Route; -/** -* The port to send the scoring requests to, within the inference server container. -*/ -"scoringRoute"?: Route; -} + /** + * Additional configurations + */ + configurations?: Record; + /** + * Entry script or command to invoke. + */ + entryScript?: string; -model CustomMetricThreshold { -/** -* [Required] The user-defined metric to calculate. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"metric": string; -/** -* The threshold value. If null, a default value will be set depending on the selected metric. -*/ -@visibility("read", "create") -"threshold"?: MonitoringThreshold; + /** + * The route to check the liveness of the inference server container. + */ + livenessRoute?: Route; + + /** + * The route to check the readiness of the inference server container. + */ + readinessRoute?: Route; + + /** + * The port to send the scoring requests to, within the inference server container. + */ + scoringRoute?: Route; } +model CustomMetricThreshold { + /** + * [Required] The user-defined metric to calculate. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + metric: string; -model CustomModelJobInput extends JobInput { -...AssetJobInput; -/** -* [Required] Specifies the type of job. -*/ -"jobInputType": "custom_model"; + /** + * The threshold value. If null, a default value will be set depending on the selected metric. + */ + @visibility("read", "create") + threshold?: MonitoringThreshold; } +model CustomModelJobInput extends JobInput { + ...AssetJobInput; -model CustomModelJobOutput extends JobOutput { -...AssetJobOutput; -/** -* [Required] Specifies the type of job. -*/ -"jobOutputType": "custom_model"; + /** + * [Required] Specifies the type of job. + */ + jobInputType: "custom_model"; } +model CustomModelJobOutput extends JobOutput { + ...AssetJobOutput; -model CustomMonitoringSignal extends MonitoringSignalBase { -/** -* [Required] ARM resource ID of the component resource used to calculate the custom metrics. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"componentId": string; -/** -* Monitoring assets to take as input. Key is the component input port name, value is the data asset. -*/ -@visibility("read", "create") -"inputAssets"?: Record; -/** -* Extra component parameters to take as input. Key is the component literal input port name, value is the parameter value. -*/ -@visibility("read", "create") -"inputs"?: Record; -/** -* [Required] A list of metrics to calculate and their associated thresholds. -*/ -@visibility("read", "create") -"metricThresholds": CustomMetricThreshold[]; -/** -* [Required] A list of metrics to calculate and their associated thresholds. -*/ -@visibility("read", "create") -"workspaceConnection": MonitoringWorkspaceConnection; -/** -* [Required] Specifies the type of signal to monitor. -*/ -"signalType": "Custom"; + /** + * [Required] Specifies the type of job. + */ + jobOutputType: "custom_model"; } -/** -* Monitoring input data base definition. -*/ +model CustomMonitoringSignal extends MonitoringSignalBase { + /** + * [Required] ARM resource ID of the component resource used to calculate the custom metrics. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + componentId: string; + + /** + * Monitoring assets to take as input. Key is the component input port name, value is the data asset. + */ + @visibility("read", "create") + inputAssets?: Record; + + /** + * Extra component parameters to take as input. Key is the component literal input port name, value is the parameter value. + */ + @visibility("read", "create") + inputs?: Record; + + /** + * [Required] A list of metrics to calculate and their associated thresholds. + */ + @visibility("read", "create") + metricThresholds: CustomMetricThreshold[]; + + /** + * [Required] A list of metrics to calculate and their associated thresholds. + */ + @visibility("read", "create") + workspaceConnection: MonitoringWorkspaceConnection; + + /** + * [Required] Specifies the type of signal to monitor. + */ + signalType: "Custom"; +} + +/** + * Monitoring input data base definition. + */ @discriminator("inputDataType") model MonitoringInputDataBase { -/** -* Mapping of column names to special uses. -*/ -@visibility("read", "create") -"columns"?: Record; -/** -* The context metadata of the data source. -*/ -@visibility("read", "create") -"dataContext"?: string; -/** -* [Required] Specifies the type of job. -*/ -@visibility("read", "create") -"jobInputType": JobInputType; -/** -* [Required] Input Asset URI. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"uri": string; -} - -/** -* Monitoring workspace connection definition. -*/ + /** + * Mapping of column names to special uses. + */ + @visibility("read", "create") + columns?: Record; + + /** + * The context metadata of the data source. + */ + @visibility("read", "create") + dataContext?: string; + + /** + * [Required] Specifies the type of job. + */ + @visibility("read", "create") + jobInputType: JobInputType; + + /** + * [Required] Input Asset URI. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + uri: string; +} + +/** + * Monitoring workspace connection definition. + */ model MonitoringWorkspaceConnection { -/** -* The properties of a workspace service connection to store as environment variables in the submitted jobs. -Key is workspace connection property path, name is environment variable key. -*/ -@visibility("read", "create") -"environmentVariables"?: Record; -/** -* The properties of a workspace service connection to store as secrets in the submitted jobs. -Key is workspace connection property path, name is secret key. -*/ -@visibility("read", "create") -"secrets"?: Record; + /** + * The properties of a workspace service connection to store as environment variables in the submitted jobs. + * Key is workspace connection property path, name is environment variable key. + */ + @visibility("read", "create") + environmentVariables?: Record; + + /** + * The properties of a workspace service connection to store as secrets in the submitted jobs. + * Key is workspace connection property path, name is secret key. + */ + @visibility("read", "create") + secrets?: Record; } /** -* N-Cross validations are specified by user. -*/ + * N-Cross validations are specified by user. + */ model CustomNCrossValidations extends NCrossValidations { -/** -* [Required] N-Cross validations value. -*/ -"value": int32; -/** -* [Required] Mode for determining N-Cross validations. -*/ -"mode": "Custom"; -} + /** + * [Required] N-Cross validations value. + */ + value: int32; + /** + * [Required] Mode for determining N-Cross validations. + */ + mode: "Custom"; +} model CustomSeasonality extends Seasonality { -/** -* [Required] Seasonality value. -*/ -"value": int32; -/** -* [Required] Seasonality mode. -*/ -"mode": "Custom"; -} + /** + * [Required] Seasonality value. + */ + value: int32; + /** + * [Required] Seasonality mode. + */ + mode: "Custom"; +} model CustomTargetLags extends TargetLags { -/** -* [Required] Set target lags values. -*/ -"values": int32[]; -/** -* [Required] Set target lags mode - Auto/Custom -*/ -"mode": "Custom"; -} + /** + * [Required] Set target lags values. + */ + values: int32[]; + /** + * [Required] Set target lags mode - Auto/Custom + */ + mode: "Custom"; +} model CustomTargetRollingWindowSize extends TargetRollingWindowSize { -/** -* [Required] TargetRollingWindowSize value. -*/ -"value": int32; -/** -* [Required] TargetRollingWindowSiz detection mode. -*/ -"mode": "Custom"; -} + /** + * [Required] TargetRollingWindowSize value. + */ + value: int32; + /** + * [Required] TargetRollingWindowSiz detection mode. + */ + mode: "Custom"; +} model DataDriftMonitoringSignal extends MonitoringSignalBase { -/** -* The data segment used for scoping on a subset of the data population. -*/ -@visibility("read", "create") -"dataSegment"?: MonitoringDataSegment; -/** -* A dictionary that maps feature names to their respective data types. -*/ -@visibility("read", "create") -"featureDataTypeOverride"?: Record; -/** -* The feature filter which identifies which feature to calculate drift over. -*/ -@visibility("read", "create") -"features"?: MonitoringFeatureFilterBase; -/** -* [Required] A list of metrics to calculate and their associated thresholds. -*/ -@visibility("read", "create") -"metricThresholds": DataDriftMetricThresholdBase[]; -/** -* [Required] The data which drift will be calculated for. -*/ -@visibility("read", "create") -"productionData": MonitoringInputDataBase; -/** -* [Required] The data to calculate drift against. -*/ -@visibility("read", "create") -"referenceData": MonitoringInputDataBase; -/** -* [Required] Specifies the type of signal to monitor. -*/ -"signalType": "DataDrift"; + /** + * The data segment used for scoping on a subset of the data population. + */ + @visibility("read", "create") + dataSegment?: MonitoringDataSegment; + + /** + * A dictionary that maps feature names to their respective data types. + */ + @visibility("read", "create") + featureDataTypeOverride?: Record; + + /** + * The feature filter which identifies which feature to calculate drift over. + */ + @visibility("read", "create") + features?: MonitoringFeatureFilterBase; + + /** + * [Required] A list of metrics to calculate and their associated thresholds. + */ + @visibility("read", "create") + metricThresholds: DataDriftMetricThresholdBase[]; + + /** + * [Required] The data which drift will be calculated for. + */ + @visibility("read", "create") + productionData: MonitoringInputDataBase; + + /** + * [Required] The data to calculate drift against. + */ + @visibility("read", "create") + referenceData: MonitoringInputDataBase; + + /** + * [Required] Specifies the type of signal to monitor. + */ + signalType: "DataDrift"; } - model MonitoringDataSegment { -/** -* The feature to segment the data on. -*/ -@visibility("read", "create") -"feature"?: string; -/** -* Filters for only the specified values of the given segmented feature. -*/ -@visibility("read", "create") -"values"?: string[]; -} + /** + * The feature to segment the data on. + */ + @visibility("read", "create") + feature?: string; + /** + * Filters for only the specified values of the given segmented feature. + */ + @visibility("read", "create") + values?: string[]; +} model DataImport extends DataVersionBase { -/** -* Name of the asset for data import job to create -*/ -"assetName"?: string; -/** -* Source data of the asset to import from -*/ -"source"?: DataImportSource; -/** -* [Required] Specifies the type of data. -*/ -"dataType": "uri_folder"; -} + /** + * Name of the asset for data import job to create + */ + assetName?: string; + /** + * Source data of the asset to import from + */ + source?: DataImportSource; + + /** + * [Required] Specifies the type of data. + */ + dataType: "uri_folder"; +} @discriminator("sourceType") model DataImportSource { -/** -* Workspace connection for data import source storage -*/ -"connection"?: string; + /** + * Workspace connection for data import source storage + */ + connection?: string; } /** -* Reference to an asset via its path in a datastore. -*/ + * Reference to an asset via its path in a datastore. + */ model DataPathAssetReference extends AssetReferenceBase { -/** -* ARM resource ID of the datastore where the asset is located. -*/ -"datastoreId"?: string; -/** -* The path of the file/directory in the datastore. -*/ -"path"?: string; -/** -* [Required] Specifies the type of asset reference. -*/ -"referenceType": "DataPath"; -} + /** + * ARM resource ID of the datastore where the asset is located. + */ + datastoreId?: string; + /** + * The path of the file/directory in the datastore. + */ + path?: string; -model DataQualityMonitoringSignal extends MonitoringSignalBase { -/** -* A dictionary that maps feature names to their respective data types. -*/ -@visibility("read", "create") -"featureDataTypeOverride"?: Record; -/** -* The features to calculate drift over. -*/ -@visibility("read", "create") -"features"?: MonitoringFeatureFilterBase; -/** -* [Required] A list of metrics to calculate and their associated thresholds. -*/ -@visibility("read", "create") -"metricThresholds": DataQualityMetricThresholdBase[]; -/** -* [Required] The data produced by the production service which drift will be calculated for. -*/ -@visibility("read", "create") -"productionData": MonitoringInputDataBase; -/** -* [Required] The data to calculate drift against. -*/ -@visibility("read", "create") -"referenceData": MonitoringInputDataBase; -/** -* [Required] Specifies the type of signal to monitor. -*/ -"signalType": "DataQuality"; + /** + * [Required] Specifies the type of asset reference. + */ + referenceType: "DataPath"; } +model DataQualityMonitoringSignal extends MonitoringSignalBase { + /** + * A dictionary that maps feature names to their respective data types. + */ + @visibility("read", "create") + featureDataTypeOverride?: Record; + + /** + * The features to calculate drift over. + */ + @visibility("read", "create") + features?: MonitoringFeatureFilterBase; + + /** + * [Required] A list of metrics to calculate and their associated thresholds. + */ + @visibility("read", "create") + metricThresholds: DataQualityMetricThresholdBase[]; + + /** + * [Required] The data produced by the production service which drift will be calculated for. + */ + @visibility("read", "create") + productionData: MonitoringInputDataBase; + + /** + * [Required] The data to calculate drift against. + */ + @visibility("read", "create") + referenceData: MonitoringInputDataBase; + + /** + * [Required] Specifies the type of signal to monitor. + */ + signalType: "DataQuality"; +} model DatabaseSource extends DataImportSource { -/** -* SQL Query statement for data import Database source -*/ -"query"?: string; -/** -* SQL StoredProcedure on data import Database source -*/ -"storedProcedure"?: string; -/** -* SQL StoredProcedure parameters -*/ -"storedProcedureParams"?: Record[]; -/** -* Name of the table on data import Database source -*/ -"tableName"?: string; -/** -* [Required] Specifies the type of data. -*/ -"sourceType": "database"; -} + /** + * SQL Query statement for data import Database source + */ + query?: string; + /** + * SQL StoredProcedure on data import Database source + */ + storedProcedure?: string; -model DatasetExportSummary extends ExportSummary { -/** -* The unique name of the labeled data asset. -*/ -@visibility("read") -"labeledAssetName"?: string; -/** -* [Required] The format of exported labels, also as the discriminator. -*/ -"format": "Dataset"; + /** + * SQL StoredProcedure parameters + */ + storedProcedureParams?: Record[]; + + /** + * Name of the table on data import Database source + */ + tableName?: string; + + /** + * [Required] Specifies the type of data. + */ + sourceType: "database"; } +model DatasetExportSummary extends ExportSummary { + /** + * The unique name of the labeled data asset. + */ + @visibility("read") + labeledAssetName?: string; + + /** + * [Required] The format of exported labels, also as the discriminator. + */ + format: "Dataset"; +} model DefaultScaleSettings extends OnlineScaleSettings { -/** -* [Required] Type of deployment scaling algorithm -*/ -"scaleType": "Default"; + /** + * [Required] Type of deployment scaling algorithm + */ + scaleType: "Default"; } +model EmailMonitoringAlertNotificationSettings + extends MonitoringAlertNotificationSettingsBase { + /** + * Configuration for notification. + */ + @visibility("read", "create") + emailNotificationSetting?: NotificationSetting; -model EmailMonitoringAlertNotificationSettings extends MonitoringAlertNotificationSettingsBase { -/** -* Configuration for notification. -*/ -@visibility("read", "create") -"emailNotificationSetting"?: NotificationSetting; -/** -* [Required] Specifies the type of signal to monitor. -*/ -"alertNotificationType": "Email"; + /** + * [Required] Specifies the type of signal to monitor. + */ + alertNotificationType: "Email"; } - model EndpointScheduleAction extends ScheduleActionBase { -/** -* [Required] Defines Schedule action definition details. - -*/ -@visibility("read", "create", "update") -"endpointInvocationDefinition": Record; -/** -* [Required] Specifies the action type of the schedule -*/ -"actionType": "InvokeBatchEndpoint"; -} + /** + * [Required] Defines Schedule action definition details. + * + */ + @visibility("read", "create", "update") + endpointInvocationDefinition: Record; + /** + * [Required] Specifies the action type of the schedule + */ + actionType: "InvokeBatchEndpoint"; +} model FeatureAttributionDriftMonitoringSignal extends MonitoringSignalBase { -/** -* [Required] A list of metrics to calculate and their associated thresholds. -*/ -@visibility("read", "create") -"metricThreshold": FeatureAttributionMetricThreshold; -/** -* [Required] The data which drift will be calculated for. -*/ -@visibility("read", "create") -"productionData": MonitoringInputDataBase[]; -/** -* [Required] The data to calculate drift against. -*/ -@visibility("read", "create") -"referenceData": MonitoringInputDataBase; -/** -* [Required] Specifies the type of signal to monitor. -*/ -"signalType": "FeatureAttributionDrift"; + /** + * [Required] A list of metrics to calculate and their associated thresholds. + */ + @visibility("read", "create") + metricThreshold: FeatureAttributionMetricThreshold; + + /** + * [Required] The data which drift will be calculated for. + */ + @visibility("read", "create") + productionData: MonitoringInputDataBase[]; + + /** + * [Required] The data to calculate drift against. + */ + @visibility("read", "create") + referenceData: MonitoringInputDataBase; + + /** + * [Required] Specifies the type of signal to monitor. + */ + signalType: "FeatureAttributionDrift"; } - model FeatureAttributionMetricThreshold { -/** -* [Required] The feature attribution metric to calculate. -*/ -@visibility("read", "create") -"metric": FeatureAttributionMetric; -/** -* The threshold value. If null, a default value will be set depending on the selected metric. -*/ -@visibility("read", "create") -"threshold"?: MonitoringThreshold; -} + /** + * [Required] The feature attribution metric to calculate. + */ + @visibility("read", "create") + metric: FeatureAttributionMetric; + /** + * The threshold value. If null, a default value will be set depending on the selected metric. + */ + @visibility("read", "create") + threshold?: MonitoringThreshold; +} model FeatureSubset extends MonitoringFeatureFilterBase { -/** -* [Required] The list of features to include. -*/ -@visibility("read", "create") -"features": string[]; -/** -* [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. -*/ -"filterType": "FeatureSubset"; -} + /** + * [Required] The list of features to include. + */ + @visibility("read", "create") + features: string[]; + /** + * [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. + */ + filterType: "FeatureSubset"; +} model FileSystemSource extends DataImportSource { -/** -* Path on data import FileSystem source -*/ -"path"?: string; -/** -* [Required] Specifies the type of data. -*/ -"sourceType": "file_system"; + /** + * Path on data import FileSystem source + */ + path?: string; + + /** + * [Required] Specifies the type of data. + */ + sourceType: "file_system"; } /** -* Fixed input data definition. -*/ + * Fixed input data definition. + */ model FixedInputData extends MonitoringInputDataBase { -/** -* [Required] Specifies the type of signal to monitor. -*/ -"inputDataType": "Fixed"; + /** + * [Required] Specifies the type of signal to monitor. + */ + inputDataType: "Fixed"; } /** -* Forecasting task in AutoML Table vertical. -*/ + * Forecasting task in AutoML Table vertical. + */ model Forecasting extends AutoMLVertical { -...TableVertical; -/** -* Forecasting task specific inputs. -*/ -"forecastingSettings"?: ForecastingSettings; -/** -* Primary metric for forecasting task. -*/ -"primaryMetric"?: ForecastingPrimaryMetrics; -/** -* Inputs for training phase for an AutoML Job. -*/ -"trainingSettings"?: ForecastingTrainingSettings; -/** -* [Required] Task type for AutoMLJob. -*/ -"taskType": "Forecasting"; -} + ...TableVertical; -/** -* Forecasting specific parameters. -*/ -model ForecastingSettings { -/** -* Country or region for holidays for forecasting tasks. -These should be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. -*/ -"countryOrRegionForHolidays"?: string; -/** -* Number of periods between the origin time of one CV fold and the next fold. For -example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be -three days apart. -*/ -"cvStepSize"?: int32; -/** -* Flag for generating lags for the numeric features with 'auto' or null. -*/ -"featureLags"?: FeatureLags; -/** -* The feature columns that are available for training but unknown at the time of forecast/inference. -If features_unknown_at_forecast_time is not set, it is assumed that all the feature columns in the dataset are known at inference time. -*/ -"featuresUnknownAtForecastTime"?: string[]; -/** -* The desired maximum forecast horizon in units of time-series frequency. -*/ -"forecastHorizon"?: ForecastHorizon; -/** -* When forecasting, this parameter represents the period with which the forecast is desired, for example daily, weekly, yearly, etc. The forecast frequency is dataset frequency by default. -*/ -"frequency"?: string; -/** -* Set time series seasonality as an integer multiple of the series frequency. -If seasonality is set to 'auto', it will be inferred. -*/ -"seasonality"?: Seasonality; -/** -* The parameter defining how if AutoML should handle short time series. -*/ -"shortSeriesHandlingConfig"?: ShortSeriesHandlingConfiguration; -/** -* The function to be used to aggregate the time series target column to conform to a user specified frequency. -If the TargetAggregateFunction is set i.e. not 'None', but the freq parameter is not set, the error is raised. The possible target aggregation functions are: "sum", "max", "min" and "mean". -*/ -"targetAggregateFunction"?: TargetAggregationFunction; -/** -* The number of past periods to lag from the target column. -*/ -"targetLags"?: TargetLags; -/** -* The number of past periods used to create a rolling window average of the target column. -*/ -"targetRollingWindowSize"?: TargetRollingWindowSize; -/** -* The name of the time column. This parameter is required when forecasting to specify the datetime column in the input data used for building the time series and inferring its frequency. -*/ -"timeColumnName"?: string; -/** -* The names of columns used to group a timeseries. It can be used to create multiple series. -If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type forecasting. -*/ -"timeSeriesIdColumnNames"?: string[]; -/** -* Configure STL Decomposition of the time-series target column. -*/ -"useStl"?: UseStl; + /** + * Forecasting task specific inputs. + */ + forecastingSettings?: ForecastingSettings; + + /** + * Primary metric for forecasting task. + */ + primaryMetric?: ForecastingPrimaryMetrics; + + /** + * Inputs for training phase for an AutoML Job. + */ + trainingSettings?: ForecastingTrainingSettings; + + /** + * [Required] Task type for AutoMLJob. + */ + taskType: "Forecasting"; } /** -* Forecasting Training related configuration. -*/ -model ForecastingTrainingSettings extends TrainingSettings { -/** -* Allowed models for forecasting task. -*/ -"allowedTrainingAlgorithms"?: ForecastingModels[]; -/** -* Blocked models for forecasting task. -*/ -"blockedTrainingAlgorithms"?: ForecastingModels[]; + * Forecasting specific parameters. + */ +model ForecastingSettings { + /** + * Country or region for holidays for forecasting tasks. + * These should be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. + */ + countryOrRegionForHolidays?: string; + + /** + * Number of periods between the origin time of one CV fold and the next fold. For + * example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be + * three days apart. + */ + cvStepSize?: int32; + + /** + * Flag for generating lags for the numeric features with 'auto' or null. + */ + featureLags?: FeatureLags; + + /** + * The feature columns that are available for training but unknown at the time of forecast/inference. + * If features_unknown_at_forecast_time is not set, it is assumed that all the feature columns in the dataset are known at inference time. + */ + featuresUnknownAtForecastTime?: string[]; + + /** + * The desired maximum forecast horizon in units of time-series frequency. + */ + forecastHorizon?: ForecastHorizon; + + /** + * When forecasting, this parameter represents the period with which the forecast is desired, for example daily, weekly, yearly, etc. The forecast frequency is dataset frequency by default. + */ + frequency?: string; + + /** + * Set time series seasonality as an integer multiple of the series frequency. + * If seasonality is set to 'auto', it will be inferred. + */ + seasonality?: Seasonality; + + /** + * The parameter defining how if AutoML should handle short time series. + */ + shortSeriesHandlingConfig?: ShortSeriesHandlingConfiguration; + + /** + * The function to be used to aggregate the time series target column to conform to a user specified frequency. + * If the TargetAggregateFunction is set i.e. not 'None', but the freq parameter is not set, the error is raised. The possible target aggregation functions are: "sum", "max", "min" and "mean". + */ + targetAggregateFunction?: TargetAggregationFunction; + + /** + * The number of past periods to lag from the target column. + */ + targetLags?: TargetLags; + + /** + * The number of past periods used to create a rolling window average of the target column. + */ + targetRollingWindowSize?: TargetRollingWindowSize; + + /** + * The name of the time column. This parameter is required when forecasting to specify the datetime column in the input data used for building the time series and inferring its frequency. + */ + timeColumnName?: string; + + /** + * The names of columns used to group a timeseries. It can be used to create multiple series. + * If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type forecasting. + */ + timeSeriesIdColumnNames?: string[]; + + /** + * Configure STL Decomposition of the time-series target column. + */ + useStl?: UseStl; +} + +/** + * Forecasting Training related configuration. + */ +model ForecastingTrainingSettings extends TrainingSettings { + /** + * Allowed models for forecasting task. + */ + allowedTrainingAlgorithms?: ForecastingModels[]; + + /** + * Blocked models for forecasting task. + */ + blockedTrainingAlgorithms?: ForecastingModels[]; } /** -* Generation safety quality metric threshold definition. -*/ + * Generation safety quality metric threshold definition. + */ model GenerationSafetyQualityMetricThreshold { -/** -* [Required] Gets or sets the feature attribution metric to calculate. -*/ -@visibility("read", "create") -"metric": GenerationSafetyQualityMetric; -/** -* Gets or sets the threshold value. -If null, a default value will be set depending on the selected metric. -*/ -@visibility("read", "create") -"threshold"?: MonitoringThreshold; -} + /** + * [Required] Gets or sets the feature attribution metric to calculate. + */ + @visibility("read", "create") + metric: GenerationSafetyQualityMetric; -/** -* Generation safety quality monitoring signal definition. -*/ -model GenerationSafetyQualityMonitoringSignal extends MonitoringSignalBase { -/** -* [Required] Gets or sets the metrics to calculate and the corresponding thresholds. -*/ -@visibility("read", "create") -"metricThresholds": GenerationSafetyQualityMetricThreshold[]; -/** -* Gets or sets the target data for computing metrics. -*/ -@visibility("read", "create") -"productionData"?: MonitoringInputDataBase[]; -/** -* [Required] The sample rate of the target data, should be greater than 0 and at most 1. -*/ -@visibility("read", "create") -"samplingRate": float64; -/** -* Gets or sets the workspace connection ID used to connect to the content generation endpoint. -*/ -@visibility("read", "create") -"workspaceConnectionId"?: string; -/** -* [Required] Specifies the type of signal to monitor. -*/ -"signalType": "GenerationSafetyQuality"; + /** + * Gets or sets the threshold value. + * If null, a default value will be set depending on the selected metric. + */ + @visibility("read", "create") + threshold?: MonitoringThreshold; } /** -* Generation token statistics metric threshold definition. -*/ + * Generation safety quality monitoring signal definition. + */ +model GenerationSafetyQualityMonitoringSignal extends MonitoringSignalBase { + /** + * [Required] Gets or sets the metrics to calculate and the corresponding thresholds. + */ + @visibility("read", "create") + metricThresholds: GenerationSafetyQualityMetricThreshold[]; + + /** + * Gets or sets the target data for computing metrics. + */ + @visibility("read", "create") + productionData?: MonitoringInputDataBase[]; + + /** + * [Required] The sample rate of the target data, should be greater than 0 and at most 1. + */ + @visibility("read", "create") + samplingRate: float64; + + /** + * Gets or sets the workspace connection ID used to connect to the content generation endpoint. + */ + @visibility("read", "create") + workspaceConnectionId?: string; + + /** + * [Required] Specifies the type of signal to monitor. + */ + signalType: "GenerationSafetyQuality"; +} + +/** + * Generation token statistics metric threshold definition. + */ model GenerationTokenStatisticsMetricThreshold { -/** -* [Required] Gets or sets the feature attribution metric to calculate. -*/ -@visibility("read", "create") -"metric": GenerationTokenStatisticsMetric; -/** -* Gets or sets the threshold value. -If null, a default value will be set depending on the selected metric. -*/ -@visibility("read", "create") -"threshold"?: MonitoringThreshold; + /** + * [Required] Gets or sets the feature attribution metric to calculate. + */ + @visibility("read", "create") + metric: GenerationTokenStatisticsMetric; + + /** + * Gets or sets the threshold value. + * If null, a default value will be set depending on the selected metric. + */ + @visibility("read", "create") + threshold?: MonitoringThreshold; } /** -* Generation token statistics signal definition. -*/ + * Generation token statistics signal definition. + */ model GenerationTokenStatisticsSignal extends MonitoringSignalBase { -/** -* [Required] Gets or sets the metrics to calculate and the corresponding thresholds. -*/ -@visibility("read", "create") -"metricThresholds": GenerationTokenStatisticsMetricThreshold[]; -/** -* Gets or sets the target data for computing metrics. -*/ -@visibility("read", "create") -"productionData"?: MonitoringInputDataBase; -/** -* [Required] The sample rate of the target data, should be greater than 0 and at most 1. -*/ -@visibility("read", "create") -"samplingRate": float64; -/** -* [Required] Specifies the type of signal to monitor. -*/ -"signalType": "GenerationTokenStatistics"; + /** + * [Required] Gets or sets the metrics to calculate and the corresponding thresholds. + */ + @visibility("read", "create") + metricThresholds: GenerationTokenStatisticsMetricThreshold[]; + + /** + * Gets or sets the target data for computing metrics. + */ + @visibility("read", "create") + productionData?: MonitoringInputDataBase; + + /** + * [Required] The sample rate of the target data, should be greater than 0 and at most 1. + */ + @visibility("read", "create") + samplingRate: float64; + + /** + * [Required] Specifies the type of signal to monitor. + */ + signalType: "GenerationTokenStatistics"; } /** -* Defines a Sampling Algorithm that exhaustively generates every value combination in the space -*/ + * Defines a Sampling Algorithm that exhaustively generates every value combination in the space + */ model GridSamplingAlgorithm extends SamplingAlgorithm { -/** -* [Required] The algorithm used for generating hyperparameter values, along with configuration properties -*/ -"samplingAlgorithmType": "Grid"; + /** + * [Required] The algorithm used for generating hyperparameter values, along with configuration properties + */ + samplingAlgorithmType: "Grid"; } - model HdfsDatastore extends Datastore { -/** -* The TLS cert of the HDFS server. Needs to be a base64 encoded string. Required if "Https" protocol is selected. -*/ -@visibility("read", "create") -"hdfsServerCertificate"?: string; -/** -* [Required] IP Address or DNS HostName. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"nameNodeAddress": string; -/** -* Protocol used to communicate with the storage account (Https/Http). -*/ -@visibility("read", "create") -"protocol"?: string = "http"; -/** -* [Required] Storage type backing the datastore. -*/ -"datastoreType": "Hdfs"; -} - -/** -* Image Classification. Multi-class image classification is used when an image is classified with only a single label -from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. -*/ + /** + * The TLS cert of the HDFS server. Needs to be a base64 encoded string. Required if "Https" protocol is selected. + */ + @visibility("read", "create") + hdfsServerCertificate?: string; + + /** + * [Required] IP Address or DNS HostName. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + nameNodeAddress: string; + + /** + * Protocol used to communicate with the storage account (Https/Http). + */ + @visibility("read", "create") + protocol?: string = "http"; + + /** + * [Required] Storage type backing the datastore. + */ + datastoreType: "Hdfs"; +} + +/** + * Image Classification. Multi-class image classification is used when an image is classified with only a single label + * from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. + */ model ImageClassification extends AutoMLVertical { -...ImageClassificationBase; -/** -* Primary metric to optimize for this task. -*/ -"primaryMetric"?: ClassificationPrimaryMetrics; -/** -* [Required] Task type for AutoMLJob. -*/ -"taskType": "ImageClassification"; -} + ...ImageClassificationBase; + /** + * Primary metric to optimize for this task. + */ + primaryMetric?: ClassificationPrimaryMetrics; + + /** + * [Required] Task type for AutoMLJob. + */ + taskType: "ImageClassification"; +} model ImageClassificationBase extends ImageVertical { -/** -* Settings used for training the model. -*/ -"modelSettings"?: ImageModelSettingsClassification; -/** -* Search space for sampling different combinations of models and their hyperparameters. -*/ -"searchSpace"?: ImageModelDistributionSettingsClassification[]; + /** + * Settings used for training the model. + */ + modelSettings?: ImageModelSettingsClassification; + + /** + * Search space for sampling different combinations of models and their hyperparameters. + */ + searchSpace?: ImageModelDistributionSettingsClassification[]; } /** -* Settings used for training the model. -For more information on the available settings please visit the official documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -*/ + * Settings used for training the model. + * For more information on the available settings please visit the official documentation: + * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + */ model ImageModelSettingsClassification extends ImageModelSettings { -/** -* Image crop size that is input to the neural network for the training dataset. Must be a positive integer. -*/ -"trainingCropSize"?: int32; -/** -* Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. -*/ -"validationCropSize"?: int32; -/** -* Image size to which to resize before cropping for validation dataset. Must be a positive integer. -*/ -"validationResizeSize"?: int32; -/** -* Weighted loss. The accepted values are 0 for no weighted loss. -1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. -*/ -"weightedLoss"?: int32; + /** + * Image crop size that is input to the neural network for the training dataset. Must be a positive integer. + */ + trainingCropSize?: int32; + + /** + * Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. + */ + validationCropSize?: int32; + + /** + * Image size to which to resize before cropping for validation dataset. Must be a positive integer. + */ + validationResizeSize?: int32; + + /** + * Weighted loss. The accepted values are 0 for no weighted loss. + * 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. + */ + weightedLoss?: int32; } /** -* Settings used for training the model. -For more information on the available settings please visit the official documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -*/ + * Settings used for training the model. + * For more information on the available settings please visit the official documentation: + * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + */ model ImageModelSettings { -/** -* Settings for advanced scenarios. -*/ -"advancedSettings"?: string; -/** -* Enable AMSGrad when optimizer is 'adam' or 'adamw'. -*/ -"amsGradient"?: boolean; -/** -* Settings for using Augmentations. -*/ -"augmentations"?: string; -/** -* Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. -*/ -"beta1"?: float32; -/** -* Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. -*/ -"beta2"?: float32; -/** -* Frequency to store model checkpoints. Must be a positive integer. -*/ -"checkpointFrequency"?: int32; -/** -* The pretrained checkpoint model for incremental training. -*/ -"checkpointModel"?: MLFlowModelJobInput; -/** -* The id of a previous run that has a pretrained checkpoint for incremental training. -*/ -"checkpointRunId"?: string; -/** -* Whether to use distributed training. -*/ -"distributed"?: boolean; -/** -* Enable early stopping logic during training. -*/ -"earlyStopping"?: boolean; -/** -* Minimum number of epochs or validation evaluations to wait before primary metric improvement -is tracked for early stopping. Must be a positive integer. -*/ -"earlyStoppingDelay"?: int32; -/** -* Minimum number of epochs or validation evaluations with no primary metric improvement before -the run is stopped. Must be a positive integer. -*/ -"earlyStoppingPatience"?: int32; -/** -* Enable normalization when exporting ONNX model. -*/ -"enableOnnxNormalization"?: boolean; -/** -* Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. -*/ -"evaluationFrequency"?: int32; -/** -* Gradient accumulation means running a configured number of "GradAccumulationStep" steps without -updating the model weights while accumulating the gradients of those steps, and then using -the accumulated gradients to compute the weight updates. Must be a positive integer. -*/ -"gradientAccumulationStep"?: int32; -/** -* Number of layers to freeze for the model. Must be a positive integer. -For instance, passing 2 as value for 'seresnext' means -freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please -see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -*/ -"layersToFreeze"?: int32; -/** -* Initial learning rate. Must be a float in the range [0, 1]. -*/ -"learningRate"?: float32; -/** -* Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. -*/ -"learningRateScheduler"?: LearningRateScheduler; -/** -* Name of the model to use for training. -For more information on the available models please visit the official documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -*/ -"modelName"?: string; -/** -* Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. -*/ -"momentum"?: float32; -/** -* Enable nesterov when optimizer is 'sgd'. -*/ -"nesterov"?: boolean; -/** -* Number of training epochs. Must be a positive integer. -*/ -"numberOfEpochs"?: int32; -/** -* Number of data loader workers. Must be a non-negative integer. -*/ -"numberOfWorkers"?: int32; -/** -* Type of optimizer. -*/ -"optimizer"?: StochasticOptimizer; -/** -* Random seed to be used when using deterministic training. -*/ -"randomSeed"?: int32; -/** -* Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. -*/ -"stepLRGamma"?: float32; -/** -* Value of step size when learning rate scheduler is 'step'. Must be a positive integer. -*/ -"stepLRStepSize"?: int32; -/** -* Training batch size. Must be a positive integer. -*/ -"trainingBatchSize"?: int32; -/** -* Validation batch size. Must be a positive integer. -*/ -"validationBatchSize"?: int32; -/** -* Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. -*/ -"warmupCosineLRCycles"?: float32; -/** -* Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. -*/ -"warmupCosineLRWarmupEpochs"?: int32; -/** -* Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. -*/ -"weightDecay"?: float32; + /** + * Settings for advanced scenarios. + */ + advancedSettings?: string; + + /** + * Enable AMSGrad when optimizer is 'adam' or 'adamw'. + */ + amsGradient?: boolean; + + /** + * Settings for using Augmentations. + */ + augmentations?: string; + + /** + * Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + */ + beta1?: float32; + + /** + * Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + */ + beta2?: float32; + + /** + * Frequency to store model checkpoints. Must be a positive integer. + */ + checkpointFrequency?: int32; + + /** + * The pretrained checkpoint model for incremental training. + */ + checkpointModel?: MLFlowModelJobInput; + + /** + * The id of a previous run that has a pretrained checkpoint for incremental training. + */ + checkpointRunId?: string; + + /** + * Whether to use distributed training. + */ + distributed?: boolean; + + /** + * Enable early stopping logic during training. + */ + earlyStopping?: boolean; + + /** + * Minimum number of epochs or validation evaluations to wait before primary metric improvement + * is tracked for early stopping. Must be a positive integer. + */ + earlyStoppingDelay?: int32; + + /** + * Minimum number of epochs or validation evaluations with no primary metric improvement before + * the run is stopped. Must be a positive integer. + */ + earlyStoppingPatience?: int32; + + /** + * Enable normalization when exporting ONNX model. + */ + enableOnnxNormalization?: boolean; + + /** + * Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + */ + evaluationFrequency?: int32; + + /** + * Gradient accumulation means running a configured number of "GradAccumulationStep" steps without + * updating the model weights while accumulating the gradients of those steps, and then using + * the accumulated gradients to compute the weight updates. Must be a positive integer. + */ + gradientAccumulationStep?: int32; + + /** + * Number of layers to freeze for the model. Must be a positive integer. + * For instance, passing 2 as value for 'seresnext' means + * freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please + * see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + */ + layersToFreeze?: int32; + + /** + * Initial learning rate. Must be a float in the range [0, 1]. + */ + learningRate?: float32; + + /** + * Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + */ + learningRateScheduler?: LearningRateScheduler; + + /** + * Name of the model to use for training. + * For more information on the available models please visit the official documentation: + * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + */ + modelName?: string; + + /** + * Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + */ + momentum?: float32; + + /** + * Enable nesterov when optimizer is 'sgd'. + */ + nesterov?: boolean; + + /** + * Number of training epochs. Must be a positive integer. + */ + numberOfEpochs?: int32; + + /** + * Number of data loader workers. Must be a non-negative integer. + */ + numberOfWorkers?: int32; + + /** + * Type of optimizer. + */ + optimizer?: StochasticOptimizer; + + /** + * Random seed to be used when using deterministic training. + */ + randomSeed?: int32; + + /** + * Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + */ + stepLRGamma?: float32; + + /** + * Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + */ + stepLRStepSize?: int32; + + /** + * Training batch size. Must be a positive integer. + */ + trainingBatchSize?: int32; + + /** + * Validation batch size. Must be a positive integer. + */ + validationBatchSize?: int32; + + /** + * Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + */ + warmupCosineLRCycles?: float32; + + /** + * Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + */ + warmupCosineLRWarmupEpochs?: int32; + + /** + * Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + */ + weightDecay?: float32; } - model MLFlowModelJobInput extends JobInput { -...AssetJobInput; -/** -* [Required] Specifies the type of job. -*/ -"jobInputType": "mlflow_model"; -} - -/** -* Distribution expressions to sweep over values of model settings. - -Some examples are: -``` -ModelName = "choice('seresnext', 'resnest50')"; -LearningRate = "uniform(0.001, 0.01)"; -LayersToFreeze = "choice(0, 2)"; -``` -For more details on how to compose distribution expressions please check the documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters -For more information on the available settings please visit the official documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -*/ -model ImageModelDistributionSettingsClassification extends ImageModelDistributionSettings { -/** -* Image crop size that is input to the neural network for the training dataset. Must be a positive integer. -*/ -"trainingCropSize"?: string; -/** -* Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. -*/ -"validationCropSize"?: string; -/** -* Image size to which to resize before cropping for validation dataset. Must be a positive integer. -*/ -"validationResizeSize"?: string; -/** -* Weighted loss. The accepted values are 0 for no weighted loss. -1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. -*/ -"weightedLoss"?: string; -} - -/** -* Distribution expressions to sweep over values of model settings. - -Some examples are: -``` -ModelName = "choice('seresnext', 'resnest50')"; -LearningRate = "uniform(0.001, 0.01)"; -LayersToFreeze = "choice(0, 2)"; -``` -All distributions can be specified as distribution_name(min, max) or choice(val1, val2, ..., valn) -where distribution name can be: uniform, quniform, loguniform, etc -For more details on how to compose distribution expressions please check the documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters -For more information on the available settings please visit the official documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -*/ + ...AssetJobInput; + + /** + * [Required] Specifies the type of job. + */ + jobInputType: "mlflow_model"; +} + +/** + * Distribution expressions to sweep over values of model settings. + * + * Some examples are: + * ``` + * ModelName = "choice('seresnext', 'resnest50')"; + * LearningRate = "uniform(0.001, 0.01)"; + * LayersToFreeze = "choice(0, 2)"; + * ``` + * For more details on how to compose distribution expressions please check the documentation: + * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters + * For more information on the available settings please visit the official documentation: + * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + */ +model ImageModelDistributionSettingsClassification + extends ImageModelDistributionSettings { + /** + * Image crop size that is input to the neural network for the training dataset. Must be a positive integer. + */ + trainingCropSize?: string; + + /** + * Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. + */ + validationCropSize?: string; + + /** + * Image size to which to resize before cropping for validation dataset. Must be a positive integer. + */ + validationResizeSize?: string; + + /** + * Weighted loss. The accepted values are 0 for no weighted loss. + * 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. + */ + weightedLoss?: string; +} + +/** + * Distribution expressions to sweep over values of model settings. + * + * Some examples are: + * ``` + * ModelName = "choice('seresnext', 'resnest50')"; + * LearningRate = "uniform(0.001, 0.01)"; + * LayersToFreeze = "choice(0, 2)"; + * ``` + * All distributions can be specified as distribution_name(min, max) or choice(val1, val2, ..., valn) + * where distribution name can be: uniform, quniform, loguniform, etc + * For more details on how to compose distribution expressions please check the documentation: + * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters + * For more information on the available settings please visit the official documentation: + * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + */ model ImageModelDistributionSettings { -/** -* Enable AMSGrad when optimizer is 'adam' or 'adamw'. -*/ -"amsGradient"?: string; -/** -* Settings for using Augmentations. -*/ -"augmentations"?: string; -/** -* Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. -*/ -"beta1"?: string; -/** -* Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. -*/ -"beta2"?: string; -/** -* Whether to use distributer training. -*/ -"distributed"?: string; -/** -* Enable early stopping logic during training. -*/ -"earlyStopping"?: string; -/** -* Minimum number of epochs or validation evaluations to wait before primary metric improvement -is tracked for early stopping. Must be a positive integer. -*/ -"earlyStoppingDelay"?: string; -/** -* Minimum number of epochs or validation evaluations with no primary metric improvement before -the run is stopped. Must be a positive integer. -*/ -"earlyStoppingPatience"?: string; -/** -* Enable normalization when exporting ONNX model. -*/ -"enableOnnxNormalization"?: string; -/** -* Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. -*/ -"evaluationFrequency"?: string; -/** -* Gradient accumulation means running a configured number of "GradAccumulationStep" steps without -updating the model weights while accumulating the gradients of those steps, and then using -the accumulated gradients to compute the weight updates. Must be a positive integer. -*/ -"gradientAccumulationStep"?: string; -/** -* Number of layers to freeze for the model. Must be a positive integer. -For instance, passing 2 as value for 'seresnext' means -freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please -see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -*/ -"layersToFreeze"?: string; -/** -* Initial learning rate. Must be a float in the range [0, 1]. -*/ -"learningRate"?: string; -/** -* Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. -*/ -"learningRateScheduler"?: string; -/** -* Name of the model to use for training. -For more information on the available models please visit the official documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -*/ -"modelName"?: string; -/** -* Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. -*/ -"momentum"?: string; -/** -* Enable nesterov when optimizer is 'sgd'. -*/ -"nesterov"?: string; -/** -* Number of training epochs. Must be a positive integer. -*/ -"numberOfEpochs"?: string; -/** -* Number of data loader workers. Must be a non-negative integer. -*/ -"numberOfWorkers"?: string; -/** -* Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. -*/ -"optimizer"?: string; -/** -* Random seed to be used when using deterministic training. -*/ -"randomSeed"?: string; -/** -* Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. -*/ -"stepLRGamma"?: string; -/** -* Value of step size when learning rate scheduler is 'step'. Must be a positive integer. -*/ -"stepLRStepSize"?: string; -/** -* Training batch size. Must be a positive integer. -*/ -"trainingBatchSize"?: string; -/** -* Validation batch size. Must be a positive integer. -*/ -"validationBatchSize"?: string; -/** -* Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. -*/ -"warmupCosineLRCycles"?: string; -/** -* Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. -*/ -"warmupCosineLRWarmupEpochs"?: string; -/** -* Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. -*/ -"weightDecay"?: string; -} - -/** -* Abstract class for AutoML tasks that train image (computer vision) models - -such as Image Classification / Image Classification Multilabel / Image Object Detection / Image Instance Segmentation. -*/ + /** + * Enable AMSGrad when optimizer is 'adam' or 'adamw'. + */ + amsGradient?: string; + + /** + * Settings for using Augmentations. + */ + augmentations?: string; + + /** + * Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + */ + beta1?: string; + + /** + * Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + */ + beta2?: string; + + /** + * Whether to use distributer training. + */ + distributed?: string; + + /** + * Enable early stopping logic during training. + */ + earlyStopping?: string; + + /** + * Minimum number of epochs or validation evaluations to wait before primary metric improvement + * is tracked for early stopping. Must be a positive integer. + */ + earlyStoppingDelay?: string; + + /** + * Minimum number of epochs or validation evaluations with no primary metric improvement before + * the run is stopped. Must be a positive integer. + */ + earlyStoppingPatience?: string; + + /** + * Enable normalization when exporting ONNX model. + */ + enableOnnxNormalization?: string; + + /** + * Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + */ + evaluationFrequency?: string; + + /** + * Gradient accumulation means running a configured number of "GradAccumulationStep" steps without + * updating the model weights while accumulating the gradients of those steps, and then using + * the accumulated gradients to compute the weight updates. Must be a positive integer. + */ + gradientAccumulationStep?: string; + + /** + * Number of layers to freeze for the model. Must be a positive integer. + * For instance, passing 2 as value for 'seresnext' means + * freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please + * see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + */ + layersToFreeze?: string; + + /** + * Initial learning rate. Must be a float in the range [0, 1]. + */ + learningRate?: string; + + /** + * Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + */ + learningRateScheduler?: string; + + /** + * Name of the model to use for training. + * For more information on the available models please visit the official documentation: + * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + */ + modelName?: string; + + /** + * Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + */ + momentum?: string; + + /** + * Enable nesterov when optimizer is 'sgd'. + */ + nesterov?: string; + + /** + * Number of training epochs. Must be a positive integer. + */ + numberOfEpochs?: string; + + /** + * Number of data loader workers. Must be a non-negative integer. + */ + numberOfWorkers?: string; + + /** + * Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. + */ + optimizer?: string; + + /** + * Random seed to be used when using deterministic training. + */ + randomSeed?: string; + + /** + * Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + */ + stepLRGamma?: string; + + /** + * Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + */ + stepLRStepSize?: string; + + /** + * Training batch size. Must be a positive integer. + */ + trainingBatchSize?: string; + + /** + * Validation batch size. Must be a positive integer. + */ + validationBatchSize?: string; + + /** + * Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + */ + warmupCosineLRCycles?: string; + + /** + * Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + */ + warmupCosineLRWarmupEpochs?: string; + + /** + * Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + */ + weightDecay?: string; +} + +/** + * Abstract class for AutoML tasks that train image (computer vision) models - + * such as Image Classification / Image Classification Multilabel / Image Object Detection / Image Instance Segmentation. + */ model ImageVertical { -/** -* [Required] Limit settings for the AutoML job. -*/ -"limitSettings": ImageLimitSettings; -/** -* Model sweeping and hyperparameter sweeping related settings. -*/ -"sweepSettings"?: ImageSweepSettings; -/** -* Validation data inputs. -*/ -"validationData"?: MLTableJobInput; -/** -* The fraction of training dataset that needs to be set aside for validation purpose. -Values between (0.0 , 1.0) -Applied when validation dataset is not provided. -*/ -"validationDataSize"?: float64; + /** + * [Required] Limit settings for the AutoML job. + */ + limitSettings: ImageLimitSettings; + + /** + * Model sweeping and hyperparameter sweeping related settings. + */ + sweepSettings?: ImageSweepSettings; + + /** + * Validation data inputs. + */ + validationData?: MLTableJobInput; + + /** + * The fraction of training dataset that needs to be set aside for validation purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. + */ + validationDataSize?: float64; } /** -* Limit settings for the AutoML job. -*/ + * Limit settings for the AutoML job. + */ model ImageLimitSettings { -/** -* Maximum number of concurrent AutoML iterations. -*/ -"maxConcurrentTrials"?: int32 = 1; -/** -* Maximum number of AutoML iterations. -*/ -"maxTrials"?: int32 = 1; -/** -* AutoML job timeout. -*/ -"timeout"?: duration = duration.P7D; + /** + * Maximum number of concurrent AutoML iterations. + */ + maxConcurrentTrials?: int32 = 1; + + /** + * Maximum number of AutoML iterations. + */ + maxTrials?: int32 = 1; + + /** + * AutoML job timeout. + */ + timeout?: duration = "P7D"; } /** -* Model sweeping and hyperparameter sweeping related settings. -*/ + * Model sweeping and hyperparameter sweeping related settings. + */ model ImageSweepSettings { -/** -* Type of early termination policy. -*/ -"earlyTermination"?: EarlyTerminationPolicy; -/** -* [Required] Type of the hyperparameter sampling algorithms. -*/ -"samplingAlgorithm": SamplingAlgorithmType; + /** + * Type of early termination policy. + */ + earlyTermination?: EarlyTerminationPolicy; + + /** + * [Required] Type of the hyperparameter sampling algorithms. + */ + samplingAlgorithm: SamplingAlgorithmType; } /** -* Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels -from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. -*/ + * Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels + * from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. + */ model ImageClassificationMultilabel extends AutoMLVertical { -...ImageClassificationBase; -/** -* Primary metric to optimize for this task. -*/ -"primaryMetric"?: ClassificationMultilabelPrimaryMetrics; -/** -* [Required] Task type for AutoMLJob. -*/ -"taskType": "ImageClassificationMultilabel"; + ...ImageClassificationBase; + + /** + * Primary metric to optimize for this task. + */ + primaryMetric?: ClassificationMultilabelPrimaryMetrics; + + /** + * [Required] Task type for AutoMLJob. + */ + taskType: "ImageClassificationMultilabel"; } /** -* Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, -drawing a polygon around each object in the image. -*/ + * Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, + * drawing a polygon around each object in the image. + */ model ImageInstanceSegmentation extends AutoMLVertical { -...ImageObjectDetectionBase; -/** -* Primary metric to optimize for this task. -*/ -"primaryMetric"?: InstanceSegmentationPrimaryMetrics; -/** -* [Required] Task type for AutoMLJob. -*/ -"taskType": "ImageInstanceSegmentation"; -} + ...ImageObjectDetectionBase; + /** + * Primary metric to optimize for this task. + */ + primaryMetric?: InstanceSegmentationPrimaryMetrics; + + /** + * [Required] Task type for AutoMLJob. + */ + taskType: "ImageInstanceSegmentation"; +} model ImageObjectDetectionBase extends ImageVertical { -/** -* Settings used for training the model. -*/ -"modelSettings"?: ImageModelSettingsObjectDetection; -/** -* Search space for sampling different combinations of models and their hyperparameters. -*/ -"searchSpace"?: ImageModelDistributionSettingsObjectDetection[]; + /** + * Settings used for training the model. + */ + modelSettings?: ImageModelSettingsObjectDetection; + + /** + * Search space for sampling different combinations of models and their hyperparameters. + */ + searchSpace?: ImageModelDistributionSettingsObjectDetection[]; } /** -* Settings used for training the model. -For more information on the available settings please visit the official documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -*/ + * Settings used for training the model. + * For more information on the available settings please visit the official documentation: + * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + */ model ImageModelSettingsObjectDetection extends ImageModelSettings { -/** -* Maximum number of detections per image, for all classes. Must be a positive integer. -Note: This settings is not supported for the 'yolov5' algorithm. -*/ -"boxDetectionsPerImage"?: int32; -/** -* During inference, only return proposals with a classification score greater than -BoxScoreThreshold. Must be a float in the range[0, 1]. -*/ -"boxScoreThreshold"?: float32; -/** -* Image size for train and validation. Must be a positive integer. -Note: The training run may get into CUDA OOM if the size is too big. -Note: This settings is only supported for the 'yolov5' algorithm. -*/ -"imageSize"?: int32; -/** -* Enable computing and logging training metrics. -*/ -"logTrainingMetrics"?: LogTrainingMetrics; -/** -* Enable computing and logging validation loss. -*/ -"logValidationLoss"?: LogValidationLoss; -/** -* Maximum size of the image to be rescaled before feeding it to the backbone. -Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. -Note: This settings is not supported for the 'yolov5' algorithm. -*/ -"maxSize"?: int32; -/** -* Minimum size of the image to be rescaled before feeding it to the backbone. -Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. -Note: This settings is not supported for the 'yolov5' algorithm. -*/ -"minSize"?: int32; -/** -* Model size. Must be 'small', 'medium', 'large', or 'xlarge'. -Note: training run may get into CUDA OOM if the model size is too big. -Note: This settings is only supported for the 'yolov5' algorithm. -*/ -"modelSize"?: ModelSize; -/** -* Enable multi-scale image by varying image size by +/- 50%. -Note: training run may get into CUDA OOM if no sufficient GPU memory. -Note: This settings is only supported for the 'yolov5' algorithm. -*/ -"multiScale"?: boolean; -/** -* IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1]. -*/ -"nmsIouThreshold"?: float32; -/** -* The grid size to use for tiling each image. Note: TileGridSize must not be -None to enable small object detection logic. A string containing two integers in mxn format. -Note: This settings is not supported for the 'yolov5' algorithm. -*/ -"tileGridSize"?: string; -/** -* Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). -Note: This settings is not supported for the 'yolov5' algorithm. -*/ -"tileOverlapRatio"?: float32; -/** -* The IOU threshold to use to perform NMS while merging predictions from tiles and image. -Used in validation/ inference. Must be float in the range [0, 1]. -Note: This settings is not supported for the 'yolov5' algorithm. -*/ -"tilePredictionsNmsThreshold"?: float32; -/** -* IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. -*/ -"validationIouThreshold"?: float32; -/** -* Metric computation method to use for validation metrics. -*/ -"validationMetricType"?: ValidationMetricType; -} - -/** -* Distribution expressions to sweep over values of model settings. - -Some examples are: -``` -ModelName = "choice('seresnext', 'resnest50')"; -LearningRate = "uniform(0.001, 0.01)"; -LayersToFreeze = "choice(0, 2)"; -``` -For more details on how to compose distribution expressions please check the documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters -For more information on the available settings please visit the official documentation: -https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. -*/ -model ImageModelDistributionSettingsObjectDetection extends ImageModelDistributionSettings { -/** -* Maximum number of detections per image, for all classes. Must be a positive integer. -Note: This settings is not supported for the 'yolov5' algorithm. -*/ -"boxDetectionsPerImage"?: string; -/** -* During inference, only return proposals with a classification score greater than -BoxScoreThreshold. Must be a float in the range[0, 1]. -*/ -"boxScoreThreshold"?: string; -/** -* Image size for train and validation. Must be a positive integer. -Note: The training run may get into CUDA OOM if the size is too big. -Note: This settings is only supported for the 'yolov5' algorithm. -*/ -"imageSize"?: string; -/** -* Maximum size of the image to be rescaled before feeding it to the backbone. -Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. -Note: This settings is not supported for the 'yolov5' algorithm. -*/ -"maxSize"?: string; -/** -* Minimum size of the image to be rescaled before feeding it to the backbone. -Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. -Note: This settings is not supported for the 'yolov5' algorithm. -*/ -"minSize"?: string; -/** -* Model size. Must be 'small', 'medium', 'large', or 'xlarge'. -Note: training run may get into CUDA OOM if the model size is too big. -Note: This settings is only supported for the 'yolov5' algorithm. -*/ -"modelSize"?: string; -/** -* Enable multi-scale image by varying image size by +/- 50%. -Note: training run may get into CUDA OOM if no sufficient GPU memory. -Note: This settings is only supported for the 'yolov5' algorithm. -*/ -"multiScale"?: string; -/** -* IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1]. -*/ -"nmsIouThreshold"?: string; -/** -* The grid size to use for tiling each image. Note: TileGridSize must not be -None to enable small object detection logic. A string containing two integers in mxn format. -Note: This settings is not supported for the 'yolov5' algorithm. -*/ -"tileGridSize"?: string; -/** -* Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). -Note: This settings is not supported for the 'yolov5' algorithm. -*/ -"tileOverlapRatio"?: string; -/** -* The IOU threshold to use to perform NMS while merging predictions from tiles and image. -Used in validation/ inference. Must be float in the range [0, 1]. -Note: This settings is not supported for the 'yolov5' algorithm. -NMS: Non-maximum suppression -*/ -"tilePredictionsNmsThreshold"?: string; -/** -* IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. -*/ -"validationIouThreshold"?: string; -/** -* Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'. -*/ -"validationMetricType"?: string; -} - -/** -* Image Object Detection. Object detection is used to identify objects in an image and locate each object with a -bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. -*/ + /** + * Maximum number of detections per image, for all classes. Must be a positive integer. + * Note: This settings is not supported for the 'yolov5' algorithm. + */ + boxDetectionsPerImage?: int32; + + /** + * During inference, only return proposals with a classification score greater than + * BoxScoreThreshold. Must be a float in the range[0, 1]. + */ + boxScoreThreshold?: float32; + + /** + * Image size for train and validation. Must be a positive integer. + * Note: The training run may get into CUDA OOM if the size is too big. + * Note: This settings is only supported for the 'yolov5' algorithm. + */ + imageSize?: int32; + + /** + * Enable computing and logging training metrics. + */ + logTrainingMetrics?: LogTrainingMetrics; + + /** + * Enable computing and logging validation loss. + */ + logValidationLoss?: LogValidationLoss; + + /** + * Maximum size of the image to be rescaled before feeding it to the backbone. + * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + * Note: This settings is not supported for the 'yolov5' algorithm. + */ + maxSize?: int32; + + /** + * Minimum size of the image to be rescaled before feeding it to the backbone. + * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + * Note: This settings is not supported for the 'yolov5' algorithm. + */ + minSize?: int32; + + /** + * Model size. Must be 'small', 'medium', 'large', or 'xlarge'. + * Note: training run may get into CUDA OOM if the model size is too big. + * Note: This settings is only supported for the 'yolov5' algorithm. + */ + modelSize?: ModelSize; + + /** + * Enable multi-scale image by varying image size by +/- 50%. + * Note: training run may get into CUDA OOM if no sufficient GPU memory. + * Note: This settings is only supported for the 'yolov5' algorithm. + */ + multiScale?: boolean; + + /** + * IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1]. + */ + nmsIouThreshold?: float32; + + /** + * The grid size to use for tiling each image. Note: TileGridSize must not be + * None to enable small object detection logic. A string containing two integers in mxn format. + * Note: This settings is not supported for the 'yolov5' algorithm. + */ + tileGridSize?: string; + + /** + * Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). + * Note: This settings is not supported for the 'yolov5' algorithm. + */ + tileOverlapRatio?: float32; + + /** + * The IOU threshold to use to perform NMS while merging predictions from tiles and image. + * Used in validation/ inference. Must be float in the range [0, 1]. + * Note: This settings is not supported for the 'yolov5' algorithm. + */ + tilePredictionsNmsThreshold?: float32; + + /** + * IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. + */ + validationIouThreshold?: float32; + + /** + * Metric computation method to use for validation metrics. + */ + validationMetricType?: ValidationMetricType; +} + +/** + * Distribution expressions to sweep over values of model settings. + * + * Some examples are: + * ``` + * ModelName = "choice('seresnext', 'resnest50')"; + * LearningRate = "uniform(0.001, 0.01)"; + * LayersToFreeze = "choice(0, 2)"; + * ``` + * For more details on how to compose distribution expressions please check the documentation: + * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters + * For more information on the available settings please visit the official documentation: + * https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + */ +model ImageModelDistributionSettingsObjectDetection + extends ImageModelDistributionSettings { + /** + * Maximum number of detections per image, for all classes. Must be a positive integer. + * Note: This settings is not supported for the 'yolov5' algorithm. + */ + boxDetectionsPerImage?: string; + + /** + * During inference, only return proposals with a classification score greater than + * BoxScoreThreshold. Must be a float in the range[0, 1]. + */ + boxScoreThreshold?: string; + + /** + * Image size for train and validation. Must be a positive integer. + * Note: The training run may get into CUDA OOM if the size is too big. + * Note: This settings is only supported for the 'yolov5' algorithm. + */ + imageSize?: string; + + /** + * Maximum size of the image to be rescaled before feeding it to the backbone. + * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + * Note: This settings is not supported for the 'yolov5' algorithm. + */ + maxSize?: string; + + /** + * Minimum size of the image to be rescaled before feeding it to the backbone. + * Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. + * Note: This settings is not supported for the 'yolov5' algorithm. + */ + minSize?: string; + + /** + * Model size. Must be 'small', 'medium', 'large', or 'xlarge'. + * Note: training run may get into CUDA OOM if the model size is too big. + * Note: This settings is only supported for the 'yolov5' algorithm. + */ + modelSize?: string; + + /** + * Enable multi-scale image by varying image size by +/- 50%. + * Note: training run may get into CUDA OOM if no sufficient GPU memory. + * Note: This settings is only supported for the 'yolov5' algorithm. + */ + multiScale?: string; + + /** + * IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1]. + */ + nmsIouThreshold?: string; + + /** + * The grid size to use for tiling each image. Note: TileGridSize must not be + * None to enable small object detection logic. A string containing two integers in mxn format. + * Note: This settings is not supported for the 'yolov5' algorithm. + */ + tileGridSize?: string; + + /** + * Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). + * Note: This settings is not supported for the 'yolov5' algorithm. + */ + tileOverlapRatio?: string; + + /** + * The IOU threshold to use to perform NMS while merging predictions from tiles and image. + * Used in validation/ inference. Must be float in the range [0, 1]. + * Note: This settings is not supported for the 'yolov5' algorithm. + * NMS: Non-maximum suppression + */ + tilePredictionsNmsThreshold?: string; + + /** + * IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. + */ + validationIouThreshold?: string; + + /** + * Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'. + */ + validationMetricType?: string; +} + +/** + * Image Object Detection. Object detection is used to identify objects in an image and locate each object with a + * bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. + */ model ImageObjectDetection extends AutoMLVertical { -...ImageObjectDetectionBase; -/** -* Primary metric to optimize for this task. -*/ -"primaryMetric"?: ObjectDetectionPrimaryMetrics; -/** -* [Required] Task type for AutoMLJob. -*/ -"taskType": "ImageObjectDetection"; -} + ...ImageObjectDetectionBase; + /** + * Primary metric to optimize for this task. + */ + primaryMetric?: ObjectDetectionPrimaryMetrics; -model ImportDataAction extends ScheduleActionBase { -/** -* [Required] Defines Schedule action definition details. -*/ -@visibility("read", "create", "update") -"dataImportDefinition": DataImport; -/** -* [Required] Specifies the action type of the schedule -*/ -"actionType": "ImportData"; + /** + * [Required] Task type for AutoMLJob. + */ + taskType: "ImageObjectDetection"; } +model ImportDataAction extends ScheduleActionBase { + /** + * [Required] Defines Schedule action definition details. + */ + @visibility("read", "create", "update") + dataImportDefinition: DataImport; -model JobScheduleAction extends ScheduleActionBase { -/** -* [Required] Defines Schedule action definition details. -*/ -@visibility("read", "create", "update") -"jobDefinition": JobBase; -/** -* [Required] Specifies the action type of the schedule -*/ -"actionType": "CreateJob"; + /** + * [Required] Specifies the action type of the schedule + */ + actionType: "ImportData"; } +model JobScheduleAction extends ScheduleActionBase { + /** + * [Required] Defines Schedule action definition details. + */ + @visibility("read", "create", "update") + jobDefinition: JobBase; -model KerberosCredentials { -/** -* [Required] IP Address or DNS HostName. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"kerberosKdcAddress": string; -/** -* [Required] Kerberos Username -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"kerberosPrincipal": string; -/** -* [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or service. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"kerberosRealm": string; + /** + * [Required] Specifies the action type of the schedule + */ + actionType: "CreateJob"; } +model KerberosCredentials { + /** + * [Required] IP Address or DNS HostName. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + kerberosKdcAddress: string; + + /** + * [Required] Kerberos Username + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + kerberosPrincipal: string; + + /** + * [Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or service. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + kerberosRealm: string; +} model KerberosKeytabCredentials extends DatastoreCredentials { -...KerberosCredentials; -/** -* [Required] Keytab secrets. -*/ -@visibility("create", "update") -"secrets": KerberosKeytabSecrets; -/** -* [Required] Credential type used to authentication with storage. -*/ -"credentialsType": "KerberosKeytab"; -} + ...KerberosCredentials; + /** + * [Required] Keytab secrets. + */ + @visibility("create", "update") + secrets: KerberosKeytabSecrets; -model KerberosKeytabSecrets extends DatastoreSecrets { -/** -* Kerberos keytab secret. -*/ -"kerberosKeytab"?: string; -/** -* [Required] Credential type used to authentication with storage. -*/ -"secretsType": "KerberosKeytab"; + /** + * [Required] Credential type used to authentication with storage. + */ + credentialsType: "KerberosKeytab"; } +model KerberosKeytabSecrets extends DatastoreSecrets { + /** + * Kerberos keytab secret. + */ + kerberosKeytab?: string; -model KerberosPasswordCredentials extends DatastoreCredentials { -...KerberosCredentials; -/** -* [Required] Kerberos password secrets. -*/ -@visibility("create", "update") -"secrets": KerberosPasswordSecrets; -/** -* [Required] Credential type used to authentication with storage. -*/ -"credentialsType": "KerberosPassword"; + /** + * [Required] Credential type used to authentication with storage. + */ + secretsType: "KerberosKeytab"; } +model KerberosPasswordCredentials extends DatastoreCredentials { + ...KerberosCredentials; + + /** + * [Required] Kerberos password secrets. + */ + @visibility("create", "update") + secrets: KerberosPasswordSecrets; + + /** + * [Required] Credential type used to authentication with storage. + */ + credentialsType: "KerberosPassword"; +} model KerberosPasswordSecrets extends DatastoreSecrets { -/** -* Kerberos password secret. -*/ -"kerberosPassword"?: string; -/** -* [Required] Credential type used to authentication with storage. -*/ -"secretsType": "KerberosPassword"; + /** + * Kerberos password secret. + */ + kerberosPassword?: string; + + /** + * [Required] Credential type used to authentication with storage. + */ + secretsType: "KerberosPassword"; } /** -* Properties specific to a KubernetesOnlineDeployment. -*/ + * Properties specific to a KubernetesOnlineDeployment. + */ model KubernetesOnlineDeployment extends OnlineDeployment { -/** -* The resource requirements for the container (cpu and memory). -*/ -"containerResourceRequirements"?: ContainerResourceRequirements; -/** -* [Required] The compute type of the endpoint. -*/ -"endpointComputeType": "Kubernetes"; + /** + * The resource requirements for the container (cpu and memory). + */ + containerResourceRequirements?: ContainerResourceRequirements; + + /** + * [Required] The compute type of the endpoint. + */ + endpointComputeType: "Kubernetes"; } /** -* Properties of a labeling job for image data -*/ + * Properties of a labeling job for image data + */ model LabelingJobImageProperties extends LabelingJobMediaProperties { -/** -* Annotation type of image labeling job. -*/ -@visibility("read", "create") -"annotationType"?: ImageAnnotationType; -/** -* [Required] Media type of the job. -*/ -"mediaType": "Image"; + /** + * Annotation type of image labeling job. + */ + @visibility("read", "create") + annotationType?: ImageAnnotationType; + + /** + * [Required] Media type of the job. + */ + mediaType: "Image"; } /** -* Properties of a labeling job for text data -*/ + * Properties of a labeling job for text data + */ model LabelingJobTextProperties extends LabelingJobMediaProperties { -/** -* Annotation type of text labeling job. -*/ -@visibility("read", "create") -"annotationType"?: TextAnnotationType; -/** -* [Required] Media type of the job. -*/ -"mediaType": "Text"; -} + /** + * Annotation type of text labeling job. + */ + @visibility("read", "create") + annotationType?: TextAnnotationType; + /** + * [Required] Media type of the job. + */ + mediaType: "Text"; +} model LakeHouseArtifact extends OneLakeArtifact { -/** -* [Required] OneLake artifact type -*/ -"artifactType": "LakeHouse"; + /** + * [Required] OneLake artifact type + */ + artifactType: "LakeHouse"; } /** -* OneLake artifact (data source) configuration. -*/ + * OneLake artifact (data source) configuration. + */ @discriminator("artifactType") model OneLakeArtifact { -/** -* [Required] OneLake artifact name -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"artifactName": string; + /** + * [Required] OneLake artifact name + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + artifactName: string; } /** -* Literal input type. -*/ + * Literal input type. + */ model LiteralJobInput extends JobInput { -/** -* [Required] Literal value for the input. -*/ -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"value": string; -/** -* [Required] Specifies the type of job. -*/ -"jobInputType": "literal"; + /** + * [Required] Literal value for the input. + */ + @minLength(1) + @pattern("[a-zA-Z0-9_]") + value: string; + + /** + * [Required] Specifies the type of job. + */ + jobInputType: "literal"; } /** -* Labeling MLAssist configuration definition when MLAssist is disabled -*/ + * Labeling MLAssist configuration definition when MLAssist is disabled + */ model MLAssistConfigurationDisabled extends MLAssistConfiguration { -/** -* [Required] Indicates whether MLAssist feature is enabled. -*/ -"mlAssist": "Disabled"; + /** + * [Required] Indicates whether MLAssist feature is enabled. + */ + mlAssist: "Disabled"; } /** -* Labeling MLAssist configuration definition when MLAssist is enabled -*/ + * Labeling MLAssist configuration definition when MLAssist is enabled + */ model MLAssistConfigurationEnabled extends MLAssistConfiguration { -/** -* [Required] AML compute binding used in inferencing. -*/ -@visibility("read", "create", "update") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"inferencingComputeBinding": string; -/** -* [Required] AML compute binding used in training. -*/ -@visibility("read", "create", "update") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"trainingComputeBinding": string; -/** -* [Required] Indicates whether MLAssist feature is enabled. -*/ -"mlAssist": "Enabled"; + /** + * [Required] AML compute binding used in inferencing. + */ + @visibility("read", "create", "update") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + inferencingComputeBinding: string; + + /** + * [Required] AML compute binding used in training. + */ + @visibility("read", "create", "update") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + trainingComputeBinding: string; + + /** + * [Required] Indicates whether MLAssist feature is enabled. + */ + mlAssist: "Enabled"; } - model MLFlowModelJobOutput extends JobOutput { -...AssetJobOutput; -/** -* [Required] Specifies the type of job. -*/ -"jobOutputType": "mlflow_model"; + ...AssetJobOutput; + + /** + * [Required] Specifies the type of job. + */ + jobOutputType: "mlflow_model"; } /** -* MLTable data definition -*/ + * MLTable data definition + */ model MLTableData extends DataVersionBase { -/** -* Uris referenced in the MLTable definition (required for lineage) -*/ -@visibility("read", "create") -"referencedUris"?: string[]; -/** -* [Required] Specifies the type of data. -*/ -"dataType": "mltable"; -} + /** + * Uris referenced in the MLTable definition (required for lineage) + */ + @visibility("read", "create") + referencedUris?: string[]; + /** + * [Required] Specifies the type of data. + */ + dataType: "mltable"; +} model MLTableJobOutput extends JobOutput { -...AssetJobOutput; -/** -* [Required] Specifies the type of job. -*/ -"jobOutputType": "mltable"; + ...AssetJobOutput; + + /** + * [Required] Specifies the type of job. + */ + jobOutputType: "mltable"; } /** -* Managed compute identity definition. -*/ + * Managed compute identity definition. + */ model ManagedComputeIdentity extends MonitorComputeIdentityBase { -/** -* Managed service identity (system assigned and/or user assigned identities) -*/ -"identity"?: ManagedServiceIdentity; -/** -* [Required] Monitor compute identity type enum. -*/ -"computeIdentityType": "ManagedIdentity"; + /** + * Managed service identity (system assigned and/or user assigned identities) + */ + identity?: ManagedServiceIdentity; + + /** + * [Required] Monitor compute identity type enum. + */ + computeIdentityType: "ManagedIdentity"; } /** -* Managed identity configuration. -*/ + * Managed identity configuration. + */ model ManagedIdentity extends IdentityConfiguration { -/** -* Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. -*/ -@visibility("read", "create") -"clientId"?: string; -/** -* Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. -*/ -@visibility("read", "create") -"objectId"?: string; -/** -* Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. -*/ -@visibility("read", "create") -"resourceId"?: string; -/** -* [Required] Specifies the type of identity framework. -*/ -"identityType": "Managed"; + /** + * Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. + */ + @visibility("read", "create") + clientId?: string; + + /** + * Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. + */ + @visibility("read", "create") + objectId?: string; + + /** + * Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. + */ + @visibility("read", "create") + resourceId?: string; + + /** + * [Required] Specifies the type of identity framework. + */ + identityType: "Managed"; } /** -* Properties specific to a ManagedOnlineDeployment. -*/ + * Properties specific to a ManagedOnlineDeployment. + */ model ManagedOnlineDeployment extends OnlineDeployment { -/** -* [Required] The compute type of the endpoint. -*/ -"endpointComputeType": "Managed"; + /** + * [Required] The compute type of the endpoint. + */ + endpointComputeType: "Managed"; } /** -* Defines an early termination policy based on running averages of the primary metric of all runs -*/ + * Defines an early termination policy based on running averages of the primary metric of all runs + */ model MedianStoppingPolicy extends EarlyTerminationPolicy { -/** -* [Required] Name of policy configuration -*/ -"policyType": "MedianStopping"; + /** + * [Required] Name of policy configuration + */ + policyType: "MedianStopping"; } /** -* Model performance signal definition. -*/ + * Model performance signal definition. + */ model ModelPerformanceSignal extends MonitoringSignalBase { -/** -* The data segment. -*/ -@visibility("read", "create") -"dataSegment"?: MonitoringDataSegment; -/** -* [Required] A list of metrics to calculate and their associated thresholds. -*/ -@visibility("read", "create") -"metricThreshold": ModelPerformanceMetricThresholdBase; -/** -* [Required] The data produced by the production service which drift will be calculated for. -*/ -@visibility("read", "create") -"productionData": MonitoringInputDataBase[]; -/** -* [Required] The data to calculate drift against. -*/ -@visibility("read", "create") -"referenceData": MonitoringInputDataBase; -/** -* [Required] Specifies the type of signal to monitor. -*/ -"signalType": "ModelPerformance"; -} - -/** -* Monitor serverless spark compute definition. -*/ + /** + * The data segment. + */ + @visibility("read", "create") + dataSegment?: MonitoringDataSegment; + + /** + * [Required] A list of metrics to calculate and their associated thresholds. + */ + @visibility("read", "create") + metricThreshold: ModelPerformanceMetricThresholdBase; + + /** + * [Required] The data produced by the production service which drift will be calculated for. + */ + @visibility("read", "create") + productionData: MonitoringInputDataBase[]; + + /** + * [Required] The data to calculate drift against. + */ + @visibility("read", "create") + referenceData: MonitoringInputDataBase; + + /** + * [Required] Specifies the type of signal to monitor. + */ + signalType: "ModelPerformance"; +} + +/** + * Monitor serverless spark compute definition. + */ model MonitorServerlessSparkCompute extends MonitorComputeConfigurationBase { -/** -* [Required] The identity scheme leveraged to by the spark jobs running on serverless Spark. -*/ -@visibility("read", "create") -"computeIdentity": MonitorComputeIdentityBase; -/** -* [Required] The instance type running the Spark job. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"instanceType": string; -/** -* [Required] The Spark runtime version. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"runtimeVersion": string; -/** -* [Required] Specifies the type of signal to monitor. -*/ -"computeType": "ServerlessSpark"; -} - -/** -* MPI distribution configuration. -*/ + /** + * [Required] The identity scheme leveraged to by the spark jobs running on serverless Spark. + */ + @visibility("read", "create") + computeIdentity: MonitorComputeIdentityBase; + + /** + * [Required] The instance type running the Spark job. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + instanceType: string; + + /** + * [Required] The Spark runtime version. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + runtimeVersion: string; + + /** + * [Required] Specifies the type of signal to monitor. + */ + computeType: "ServerlessSpark"; +} + +/** + * MPI distribution configuration. + */ model Mpi extends DistributionConfiguration { -/** -* Number of processes per MPI node. -*/ -@visibility("read", "create") -"processCountPerInstance"?: int32; -/** -* [Required] Specifies the type of distribution framework. -*/ -"distributionType": "Mpi"; -} + /** + * Number of processes per MPI node. + */ + @visibility("read", "create") + processCountPerInstance?: int32; -/** -* Fixed training parameters that won't be swept over during AutoML NLP training. -*/ -model NlpFixedParameters { -/** -* Number of steps to accumulate gradients over before running a backward pass. -*/ -"gradientAccumulationSteps"?: int32; -/** -* The learning rate for the training procedure. -*/ -"learningRate"?: float32; -/** -* The type of learning rate schedule to use during the training procedure. -*/ -"learningRateScheduler"?: NlpLearningRateScheduler; -/** -* The name of the model to train. -*/ -"modelName"?: string; -/** -* Number of training epochs. -*/ -"numberOfEpochs"?: int32; -/** -* The batch size for the training procedure. -*/ -"trainingBatchSize"?: int32; -/** -* The batch size to be used during evaluation. -*/ -"validationBatchSize"?: int32; -/** -* The warmup ratio, used alongside LrSchedulerType. -*/ -"warmupRatio"?: float32; -/** -* The weight decay for the training procedure. -*/ -"weightDecay"?: float32; + /** + * [Required] Specifies the type of distribution framework. + */ + distributionType: "Mpi"; } /** -* Stringified search spaces for each parameter. See below examples. -*/ + * Fixed training parameters that won't be swept over during AutoML NLP training. + */ +model NlpFixedParameters { + /** + * Number of steps to accumulate gradients over before running a backward pass. + */ + gradientAccumulationSteps?: int32; + + /** + * The learning rate for the training procedure. + */ + learningRate?: float32; + + /** + * The type of learning rate schedule to use during the training procedure. + */ + learningRateScheduler?: NlpLearningRateScheduler; + + /** + * The name of the model to train. + */ + modelName?: string; + + /** + * Number of training epochs. + */ + numberOfEpochs?: int32; + + /** + * The batch size for the training procedure. + */ + trainingBatchSize?: int32; + + /** + * The batch size to be used during evaluation. + */ + validationBatchSize?: int32; + + /** + * The warmup ratio, used alongside LrSchedulerType. + */ + warmupRatio?: float32; + + /** + * The weight decay for the training procedure. + */ + weightDecay?: float32; +} + +/** + * Stringified search spaces for each parameter. See below examples. + */ model NlpParameterSubspace { -/** -* Number of steps to accumulate gradients over before running a backward pass. -*/ -"gradientAccumulationSteps"?: string; -/** -* The learning rate for the training procedure. -*/ -"learningRate"?: string; -/** -* The type of learning rate schedule to use during the training procedure. -*/ -"learningRateScheduler"?: string; -/** -* The name of the model to train. -*/ -"modelName"?: string; -/** -* Number of training epochs. -*/ -"numberOfEpochs"?: string; -/** -* The batch size for the training procedure. -*/ -"trainingBatchSize"?: string; -/** -* The batch size to be used during evaluation. -*/ -"validationBatchSize"?: string; -/** -* The warmup ratio, used alongside LrSchedulerType. -*/ -"warmupRatio"?: string; -/** -* The weight decay for the training procedure. -*/ -"weightDecay"?: string; -} - -/** -* Model sweeping and hyperparameter tuning related settings. -*/ + /** + * Number of steps to accumulate gradients over before running a backward pass. + */ + gradientAccumulationSteps?: string; + + /** + * The learning rate for the training procedure. + */ + learningRate?: string; + + /** + * The type of learning rate schedule to use during the training procedure. + */ + learningRateScheduler?: string; + + /** + * The name of the model to train. + */ + modelName?: string; + + /** + * Number of training epochs. + */ + numberOfEpochs?: string; + + /** + * The batch size for the training procedure. + */ + trainingBatchSize?: string; + + /** + * The batch size to be used during evaluation. + */ + validationBatchSize?: string; + + /** + * The warmup ratio, used alongside LrSchedulerType. + */ + warmupRatio?: string; + + /** + * The weight decay for the training procedure. + */ + weightDecay?: string; +} + +/** + * Model sweeping and hyperparameter tuning related settings. + */ model NlpSweepSettings { -/** -* Type of early termination policy for the sweeping job. -*/ -"earlyTermination"?: EarlyTerminationPolicy; -/** -* [Required] Type of sampling algorithm. -*/ -"samplingAlgorithm": SamplingAlgorithmType; + /** + * Type of early termination policy for the sweeping job. + */ + earlyTermination?: EarlyTerminationPolicy; + + /** + * [Required] Type of sampling algorithm. + */ + samplingAlgorithm: SamplingAlgorithmType; } /** -* Abstract class for NLP related AutoML tasks. -NLP - Natural Language Processing. -*/ + * Abstract class for NLP related AutoML tasks. + * NLP - Natural Language Processing. + */ model NlpVertical { -/** -* Featurization inputs needed for AutoML job. -*/ -"featurizationSettings"?: NlpVerticalFeaturizationSettings; -/** -* Model/training parameters that will remain constant throughout training. -*/ -"fixedParameters"?: NlpFixedParameters; -/** -* Execution constraints for AutoMLJob. -*/ -"limitSettings"?: NlpVerticalLimitSettings; -/** -* Search space for sampling different combinations of models and their hyperparameters. -*/ -"searchSpace"?: NlpParameterSubspace[]; -/** -* Settings for model sweeping and hyperparameter tuning. -*/ -"sweepSettings"?: NlpSweepSettings; -/** -* Validation data inputs. -*/ -"validationData"?: MLTableJobInput; -} + /** + * Featurization inputs needed for AutoML job. + */ + featurizationSettings?: NlpVerticalFeaturizationSettings; + /** + * Model/training parameters that will remain constant throughout training. + */ + fixedParameters?: NlpFixedParameters; -model NlpVerticalFeaturizationSettings extends FeaturizationSettings { + /** + * Execution constraints for AutoMLJob. + */ + limitSettings?: NlpVerticalLimitSettings; + + /** + * Search space for sampling different combinations of models and their hyperparameters. + */ + searchSpace?: NlpParameterSubspace[]; + + /** + * Settings for model sweeping and hyperparameter tuning. + */ + sweepSettings?: NlpSweepSettings; + + /** + * Validation data inputs. + */ + validationData?: MLTableJobInput; } +model NlpVerticalFeaturizationSettings extends FeaturizationSettings {} + /** -* Job execution constraints. -*/ + * Job execution constraints. + */ model NlpVerticalLimitSettings { -/** -* Maximum Concurrent AutoML iterations. -*/ -"maxConcurrentTrials"?: int32 = 1; -/** -* Maximum nodes to use for the experiment. -*/ -"maxNodes"?: int32 = 1; -/** -* Number of AutoML iterations. -*/ -"maxTrials"?: int32 = 1; -/** -* AutoML job timeout. -*/ -"timeout"?: duration = duration.P7D; -/** -* Timeout for individual HD trials. -*/ -"trialTimeout"?: duration; + /** + * Maximum Concurrent AutoML iterations. + */ + maxConcurrentTrials?: int32 = 1; + + /** + * Maximum nodes to use for the experiment. + */ + maxNodes?: int32 = 1; + + /** + * Number of AutoML iterations. + */ + maxTrials?: int32 = 1; + + /** + * AutoML job timeout. + */ + timeout?: duration = "P7D"; + + /** + * Timeout for individual HD trials. + */ + trialTimeout?: duration; } /** -* Empty/none datastore credentials. -*/ + * Empty/none datastore credentials. + */ model NoneDatastoreCredentials extends DatastoreCredentials { -/** -* [Required] Credential type used to authentication with storage. -*/ -"credentialsType": "None"; + /** + * [Required] Credential type used to authentication with storage. + */ + credentialsType: "None"; } - model NumericalDataDriftMetricThreshold extends DataDriftMetricThresholdBase { -/** -* [Required] The numerical data drift metric to calculate. -*/ -"metric": NumericalDataDriftMetric; -/** -* [Required] Specifies the data type of the metric threshold. -*/ -"dataType": "Numerical"; + /** + * [Required] The numerical data drift metric to calculate. + */ + metric: NumericalDataDriftMetric; + + /** + * [Required] Specifies the data type of the metric threshold. + */ + dataType: "Numerical"; } +model NumericalDataQualityMetricThreshold + extends DataQualityMetricThresholdBase { + /** + * [Required] The numerical data quality metric to calculate. + */ + @visibility("read", "create") + metric: NumericalDataQualityMetric; -model NumericalDataQualityMetricThreshold extends DataQualityMetricThresholdBase { -/** -* [Required] The numerical data quality metric to calculate. -*/ -@visibility("read", "create") -"metric": NumericalDataQualityMetric; -/** -* [Required] Specifies the data type of the metric threshold. -*/ -"dataType": "Numerical"; + /** + * [Required] Specifies the data type of the metric threshold. + */ + dataType: "Numerical"; } +model NumericalPredictionDriftMetricThreshold + extends PredictionDriftMetricThresholdBase { + /** + * [Required] The numerical prediction drift metric to calculate. + */ + @visibility("read", "create") + metric: NumericalPredictionDriftMetric; -model NumericalPredictionDriftMetricThreshold extends PredictionDriftMetricThresholdBase { -/** -* [Required] The numerical prediction drift metric to calculate. -*/ -@visibility("read", "create") -"metric": NumericalPredictionDriftMetric; -/** -* [Required] Specifies the data type of the metric threshold. -*/ -"dataType": "Numerical"; + /** + * [Required] Specifies the data type of the metric threshold. + */ + dataType: "Numerical"; } /** -* Optimization objective. -*/ + * Optimization objective. + */ model Objective { -/** -* [Required] Defines supported metric goals for hyperparameter tuning -*/ -"goal": Goal; -/** -* [Required] Name of the metric to optimize. -*/ -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"primaryMetric": string; -} + /** + * [Required] Defines supported metric goals for hyperparameter tuning + */ + goal: Goal; -/** -* OneLake (Trident) datastore configuration. -*/ -model OneLakeDatastore extends Datastore { -/** -* [Required] OneLake artifact backing the datastore. -*/ -@visibility("read", "create") -"artifact": OneLakeArtifact; -/** -* OneLake endpoint to use for the datastore. -*/ -@visibility("read", "create") -"endpoint"?: string; -/** -* [Required] OneLake workspace name. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"oneLakeWorkspaceName": string; -/** -* Indicates which identity to use to authenticate service data access to customer's storage. -*/ -@visibility("read", "create") -"serviceDataAccessAuthIdentity"?: ServiceDataAccessAuthIdentity; -/** -* [Required] Storage type backing the datastore. -*/ -"datastoreType": "OneLake"; + /** + * [Required] Name of the metric to optimize. + */ + @minLength(1) + @pattern("[a-zA-Z0-9_]") + primaryMetric: string; } /** -* Reference to an asset via its path in a job output. -*/ + * OneLake (Trident) datastore configuration. + */ +model OneLakeDatastore extends Datastore { + /** + * [Required] OneLake artifact backing the datastore. + */ + @visibility("read", "create") + artifact: OneLakeArtifact; + + /** + * OneLake endpoint to use for the datastore. + */ + @visibility("read", "create") + endpoint?: string; + + /** + * [Required] OneLake workspace name. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + oneLakeWorkspaceName: string; + + /** + * Indicates which identity to use to authenticate service data access to customer's storage. + */ + @visibility("read", "create") + serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; + + /** + * [Required] Storage type backing the datastore. + */ + datastoreType: "OneLake"; +} + +/** + * Reference to an asset via its path in a job output. + */ model OutputPathAssetReference extends AssetReferenceBase { -/** -* ARM resource ID of the job. -*/ -"jobId"?: string; -/** -* The path of the file/directory in the job output. -*/ -"path"?: string; -/** -* [Required] Specifies the type of asset reference. -*/ -"referenceType": "OutputPath"; + /** + * ARM resource ID of the job. + */ + jobId?: string; + + /** + * The path of the file/directory in the job output. + */ + path?: string; + + /** + * [Required] Specifies the type of asset reference. + */ + referenceType: "OutputPath"; } /** -* Package input path specified with a resource id. -*/ + * Package input path specified with a resource id. + */ model PackageInputPathId extends PackageInputPathBase { -/** -* Input resource id. -*/ -"resourceId"?: string; -/** -* [Required] Input path type for package inputs. -*/ -"inputPathType": "PathId"; + /** + * Input resource id. + */ + resourceId?: string; + + /** + * [Required] Input path type for package inputs. + */ + inputPathType: "PathId"; } /** -* Package input path specified as an url. -*/ + * Package input path specified as an url. + */ model PackageInputPathUrl extends PackageInputPathBase { -/** -* Input path url. -*/ -"url"?: string; -/** -* [Required] Input path type for package inputs. -*/ -"inputPathType": "Url"; + /** + * Input path url. + */ + url?: string; + + /** + * [Required] Input path type for package inputs. + */ + inputPathType: "Url"; } /** -* Package input path specified with name and version. -*/ + * Package input path specified with name and version. + */ model PackageInputPathVersion extends PackageInputPathBase { -/** -* Input resource name. -*/ -"resourceName"?: string; -/** -* Input resource version. -*/ -"resourceVersion"?: string; -/** -* [Required] Input path type for package inputs. -*/ -"inputPathType": "PathVersion"; + /** + * Input resource name. + */ + resourceName?: string; + + /** + * Input resource version. + */ + resourceVersion?: string; + + /** + * [Required] Input path type for package inputs. + */ + inputPathType: "PathVersion"; } /** -* Pipeline Job definition: defines generic to MFE attributes. -*/ + * Pipeline Job definition: defines generic to MFE attributes. + */ model PipelineJob extends JobBase { -/** -* Inputs for the pipeline job. -*/ -@visibility("read", "create") -"inputs"?: Record; -/** -* Jobs construct the Pipeline Job. -*/ -@visibility("read", "create") -"jobs"?: Record>; -/** -* Outputs for the pipeline job -*/ -@visibility("read", "create") -"outputs"?: Record; -/** -* Pipeline settings, for things like ContinueRunOnStepFailure etc. -*/ -@visibility("read", "create") -"settings"?: Record; -/** -* ARM resource ID of source job. -*/ -@visibility("read", "create") -"sourceJobId"?: string; -/** -* [Required] Specifies the type of job. -*/ -"jobType": "Pipeline"; + /** + * Inputs for the pipeline job. + */ + @visibility("read", "create") + inputs?: Record; + + /** + * Jobs construct the Pipeline Job. + */ + @visibility("read", "create") + jobs?: Record>; + + /** + * Outputs for the pipeline job + */ + @visibility("read", "create") + outputs?: Record; + + /** + * Pipeline settings, for things like ContinueRunOnStepFailure etc. + */ + @visibility("read", "create") + settings?: Record; + + /** + * ARM resource ID of source job. + */ + @visibility("read", "create") + sourceJobId?: string; + + /** + * [Required] Specifies the type of job. + */ + jobType: "Pipeline"; } - model PredictionDriftMonitoringSignal extends MonitoringSignalBase { -/** -* [Required] A list of metrics to calculate and their associated thresholds. -*/ -@visibility("read", "create") -"metricThresholds": PredictionDriftMetricThresholdBase[]; -/** -* [Required] The type of the model monitored. -*/ -@visibility("read", "create") -"modelType": MonitoringModelType; -/** -* [Required] The data which drift will be calculated for. -*/ -@visibility("read", "create") -"productionData": MonitoringInputDataBase; -/** -* [Required] The data to calculate drift against. -*/ -@visibility("read", "create") -"referenceData": MonitoringInputDataBase; -/** -* [Required] Specifies the type of signal to monitor. -*/ -"signalType": "PredictionDrift"; -} - -/** -* PyTorch distribution configuration. -*/ + /** + * [Required] A list of metrics to calculate and their associated thresholds. + */ + @visibility("read", "create") + metricThresholds: PredictionDriftMetricThresholdBase[]; + + /** + * [Required] The type of the model monitored. + */ + @visibility("read", "create") + modelType: MonitoringModelType; + + /** + * [Required] The data which drift will be calculated for. + */ + @visibility("read", "create") + productionData: MonitoringInputDataBase; + + /** + * [Required] The data to calculate drift against. + */ + @visibility("read", "create") + referenceData: MonitoringInputDataBase; + + /** + * [Required] Specifies the type of signal to monitor. + */ + signalType: "PredictionDrift"; +} + +/** + * PyTorch distribution configuration. + */ model PyTorch extends DistributionConfiguration { -/** -* Number of processes per node. -*/ -"processCountPerInstance"?: int32; -/** -* [Required] Specifies the type of distribution framework. -*/ -"distributionType": "PyTorch"; + /** + * Number of processes per node. + */ + processCountPerInstance?: int32; + + /** + * [Required] Specifies the type of distribution framework. + */ + distributionType: "PyTorch"; } /** -* Defines a Sampling Algorithm that generates values randomly -*/ + * Defines a Sampling Algorithm that generates values randomly + */ model RandomSamplingAlgorithm extends SamplingAlgorithm { -/** -* An optional positive number or e in string format to be used as base for log based random sampling -*/ -"logbase"?: string; -/** -* The specific type of random algorithm -*/ -"rule"?: RandomSamplingAlgorithmRule; -/** -* An optional integer to use as the seed for random number generation -*/ -"seed"?: int32; -/** -* [Required] The algorithm used for generating hyperparameter values, along with configuration properties -*/ -"samplingAlgorithmType": "Random"; + /** + * An optional positive number or e in string format to be used as base for log based random sampling + */ + logbase?: string; + + /** + * The specific type of random algorithm + */ + rule?: RandomSamplingAlgorithmRule; + + /** + * An optional integer to use as the seed for random number generation + */ + seed?: int32; + + /** + * [Required] The algorithm used for generating hyperparameter values, along with configuration properties + */ + samplingAlgorithmType: "Random"; } /** -* Ray distribution configuration. -*/ + * Ray distribution configuration. + */ model Ray extends DistributionConfiguration { -/** -* The address of Ray head node. -*/ -"address"?: string; -/** -* The port to bind the dashboard server to. -*/ -"dashboardPort"?: int32; -/** -* Additional arguments passed to ray start in head node. -*/ -"headNodeAdditionalArgs"?: string; -/** -* Provide this argument to start the Ray dashboard GUI. -*/ -"includeDashboard"?: boolean; -/** -* The port of the head ray process. -*/ -"port"?: int32; -/** -* Additional arguments passed to ray start in worker node. -*/ -"workerNodeAdditionalArgs"?: string; -/** -* [Required] Specifies the type of distribution framework. -*/ -"distributionType": "Ray"; + /** + * The address of Ray head node. + */ + address?: string; + + /** + * The port to bind the dashboard server to. + */ + dashboardPort?: int32; + + /** + * Additional arguments passed to ray start in head node. + */ + headNodeAdditionalArgs?: string; + + /** + * Provide this argument to start the Ray dashboard GUI. + */ + includeDashboard?: boolean; + + /** + * The port of the head ray process. + */ + port?: int32; + + /** + * Additional arguments passed to ray start in worker node. + */ + workerNodeAdditionalArgs?: string; + + /** + * [Required] Specifies the type of distribution framework. + */ + distributionType: "Ray"; } /** -* Regression task in AutoML Table vertical. -*/ + * Regression task in AutoML Table vertical. + */ model Regression extends AutoMLVertical { -...TableVertical; -/** -* Primary metric for regression task. -*/ -"primaryMetric"?: RegressionPrimaryMetrics; -/** -* Inputs for training phase for an AutoML Job. -*/ -"trainingSettings"?: RegressionTrainingSettings; -/** -* [Required] Task type for AutoMLJob. -*/ -"taskType": "Regression"; + ...TableVertical; + + /** + * Primary metric for regression task. + */ + primaryMetric?: RegressionPrimaryMetrics; + + /** + * Inputs for training phase for an AutoML Job. + */ + trainingSettings?: RegressionTrainingSettings; + + /** + * [Required] Task type for AutoMLJob. + */ + taskType: "Regression"; } /** -* Regression Training related configuration. -*/ + * Regression Training related configuration. + */ model RegressionTrainingSettings extends TrainingSettings { -/** -* Allowed models for regression task. -*/ -"allowedTrainingAlgorithms"?: RegressionModels[]; -/** -* Blocked models for regression task. -*/ -"blockedTrainingAlgorithms"?: RegressionModels[]; + /** + * Allowed models for regression task. + */ + allowedTrainingAlgorithms?: RegressionModels[]; + + /** + * Blocked models for regression task. + */ + blockedTrainingAlgorithms?: RegressionModels[]; } +model RegressionModelPerformanceMetricThreshold + extends ModelPerformanceMetricThresholdBase { + /** + * [Required] The regression model performance metric to calculate. + */ + @visibility("read", "create") + metric: RegressionModelPerformanceMetric; -model RegressionModelPerformanceMetricThreshold extends ModelPerformanceMetricThresholdBase { -/** -* [Required] The regression model performance metric to calculate. -*/ -@visibility("read", "create") -"metric": RegressionModelPerformanceMetric; -/** -* [Required] Specifies the data type of the metric threshold. -*/ -"modelType": "Regression"; + /** + * [Required] Specifies the data type of the metric threshold. + */ + modelType: "Regression"; } - model SASCredentialDto extends PendingUploadCredentialDto { -/** -* Full SAS Uri, including the storage, container/blob path and SAS token -*/ -"sasUri"?: url; -/** -* [Required] Credential type used to authentication with storage. -*/ -"credentialType": "SAS"; + /** + * Full SAS Uri, including the storage, container/blob path and SAS token + */ + sasUri?: url; + + /** + * [Required] Credential type used to authentication with storage. + */ + credentialType: "SAS"; } /** -* SAS datastore credentials configuration. -*/ + * SAS datastore credentials configuration. + */ model SasDatastoreCredentials extends DatastoreCredentials { -/** -* [Required] Storage container secrets. -*/ -@visibility("create", "update") -"secrets": SasDatastoreSecrets; -/** -* [Required] Credential type used to authentication with storage. -*/ -"credentialsType": "Sas"; + /** + * [Required] Storage container secrets. + */ + @visibility("create", "update") + secrets: SasDatastoreSecrets; + + /** + * [Required] Credential type used to authentication with storage. + */ + credentialsType: "Sas"; } /** -* Datastore SAS secrets. -*/ + * Datastore SAS secrets. + */ model SasDatastoreSecrets extends DatastoreSecrets { -/** -* Storage container SAS token. -*/ -"sasToken"?: string; -/** -* [Required] Credential type used to authentication with storage. -*/ -"secretsType": "Sas"; + /** + * Storage container SAS token. + */ + sasToken?: string; + + /** + * [Required] Credential type used to authentication with storage. + */ + secretsType: "Sas"; } /** -* Service Principal datastore credentials configuration. -*/ + * Service Principal datastore credentials configuration. + */ model ServicePrincipalDatastoreCredentials extends DatastoreCredentials { -/** -* Authority URL used for authentication. -*/ -"authorityUrl"?: string; -/** -* [Required] Service principal client ID. -*/ -"clientId": string; -/** -* Resource the service principal has access to. -*/ -"resourceUrl"?: string; -/** -* [Required] Service principal secrets. -*/ -@visibility("create", "update") -"secrets": ServicePrincipalDatastoreSecrets; -/** -* [Required] ID of the tenant to which the service principal belongs. -*/ -"tenantId": string; -/** -* [Required] Credential type used to authentication with storage. -*/ -"credentialsType": "ServicePrincipal"; + /** + * Authority URL used for authentication. + */ + authorityUrl?: string; + + /** + * [Required] Service principal client ID. + */ + clientId: string; + + /** + * Resource the service principal has access to. + */ + resourceUrl?: string; + + /** + * [Required] Service principal secrets. + */ + @visibility("create", "update") + secrets: ServicePrincipalDatastoreSecrets; + + /** + * [Required] ID of the tenant to which the service principal belongs. + */ + tenantId: string; + + /** + * [Required] Credential type used to authentication with storage. + */ + credentialsType: "ServicePrincipal"; } /** -* Datastore Service Principal secrets. -*/ + * Datastore Service Principal secrets. + */ model ServicePrincipalDatastoreSecrets extends DatastoreSecrets { -/** -* Service principal secret. -*/ -"clientSecret"?: string; -/** -* [Required] Credential type used to authentication with storage. -*/ -"secretsType": "ServicePrincipal"; + /** + * Service principal secret. + */ + clientSecret?: string; + + /** + * [Required] Credential type used to authentication with storage. + */ + secretsType: "ServicePrincipal"; } /** -* Spark job definition. -*/ + * Spark job definition. + */ model SparkJob extends JobBase { -/** -* Archive files used in the job. -*/ -@visibility("read", "create") -"archives"?: string[]; -/** -* Arguments for the job. -*/ -@visibility("read", "create") -"args"?: string; -/** -* [Required] ARM resource ID of the code asset. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"codeId": string; -/** -* Spark configured properties. -*/ -@visibility("read", "create") -"conf"?: Record; -/** -* [Required] The entry to execute on startup of the job. -*/ -@visibility("read", "create") -"entry": SparkJobEntry; -/** -* The ARM resource ID of the Environment specification for the job. -*/ -@visibility("read", "create") -"environmentId"?: string; -/** -* Files used in the job. -*/ -@visibility("read", "create") -"files"?: string[]; -/** -* Mapping of input data bindings used in the job. -*/ -@visibility("read", "create") -"inputs"?: Record; -/** -* Jar files used in the job. -*/ -@visibility("read", "create") -"jars"?: string[]; -/** -* Mapping of output data bindings used in the job. -*/ -@visibility("read", "create") -"outputs"?: Record; -/** -* Python files used in the job. -*/ -@visibility("read", "create") -"pyFiles"?: string[]; -/** -* Queue settings for the job -*/ -@visibility("read", "create") -"queueSettings"?: QueueSettings; -/** -* Compute Resource configuration for the job. -*/ -@visibility("read", "create") -"resources"?: SparkResourceConfiguration; -/** -* [Required] Specifies the type of job. -*/ -"jobType": "Spark"; -} - -/** -* Spark job entry point definition. -*/ + /** + * Archive files used in the job. + */ + @visibility("read", "create") + archives?: string[]; + + /** + * Arguments for the job. + */ + @visibility("read", "create") + args?: string; + + /** + * [Required] ARM resource ID of the code asset. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + codeId: string; + + /** + * Spark configured properties. + */ + @visibility("read", "create") + conf?: Record; + + /** + * [Required] The entry to execute on startup of the job. + */ + @visibility("read", "create") + entry: SparkJobEntry; + + /** + * The ARM resource ID of the Environment specification for the job. + */ + @visibility("read", "create") + environmentId?: string; + + /** + * Files used in the job. + */ + @visibility("read", "create") + files?: string[]; + + /** + * Mapping of input data bindings used in the job. + */ + @visibility("read", "create") + inputs?: Record; + + /** + * Jar files used in the job. + */ + @visibility("read", "create") + jars?: string[]; + + /** + * Mapping of output data bindings used in the job. + */ + @visibility("read", "create") + outputs?: Record; + + /** + * Python files used in the job. + */ + @visibility("read", "create") + pyFiles?: string[]; + + /** + * Queue settings for the job + */ + @visibility("read", "create") + queueSettings?: QueueSettings; + + /** + * Compute Resource configuration for the job. + */ + @visibility("read", "create") + resources?: SparkResourceConfiguration; + + /** + * [Required] Specifies the type of job. + */ + jobType: "Spark"; +} + +/** + * Spark job entry point definition. + */ @discriminator("sparkJobEntryType") -model SparkJobEntry { -} - +model SparkJobEntry {} model SparkResourceConfiguration { -/** -* Optional type of VM used as supported by the compute target. -*/ -@visibility("read", "create") -"instanceType"?: string; -/** -* Version of spark runtime used for the job. -*/ -@visibility("read", "create") -"runtimeVersion"?: string = "3.1"; -} + /** + * Optional type of VM used as supported by the compute target. + */ + @visibility("read", "create") + instanceType?: string; + /** + * Version of spark runtime used for the job. + */ + @visibility("read", "create") + runtimeVersion?: string = "3.1"; +} model SparkJobPythonEntry extends SparkJobEntry { -/** -* [Required] Relative python file path for job entry point. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"file": string; -/** -* [Required] Type of the job's entry point. -*/ -"sparkJobEntryType": "SparkJobPythonEntry"; -} + /** + * [Required] Relative python file path for job entry point. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + file: string; + /** + * [Required] Type of the job's entry point. + */ + sparkJobEntryType: "SparkJobPythonEntry"; +} model SparkJobScalaEntry extends SparkJobEntry { -/** -* [Required] Scala class name used as entry point. -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"className": string; -/** -* [Required] Type of the job's entry point. -*/ -"sparkJobEntryType": "SparkJobScalaEntry"; -} + /** + * [Required] Scala class name used as entry point. + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + className: string; -/** -* Static input data definition. -*/ -model StaticInputData extends MonitoringInputDataBase { -/** -* The ARM resource ID of the component resource used to preprocess the data. -*/ -@visibility("read", "create") -"preprocessingComponentId"?: string; -/** -* [Required] The end date of the data window. -*/ -@visibility("read", "create") -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"windowEnd": utcDateTime; -/** -* [Required] The start date of the data window. -*/ -@visibility("read", "create") -// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. -"windowStart": utcDateTime; -/** -* [Required] Specifies the type of signal to monitor. -*/ -"inputDataType": "Static"; + /** + * [Required] Type of the job's entry point. + */ + sparkJobEntryType: "SparkJobScalaEntry"; } /** -* Sweep job definition. -*/ + * Static input data definition. + */ +model StaticInputData extends MonitoringInputDataBase { + /** + * The ARM resource ID of the component resource used to preprocess the data. + */ + @visibility("read", "create") + preprocessingComponentId?: string; + + /** + * [Required] The end date of the data window. + */ + @visibility("read", "create") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + windowEnd: utcDateTime; + + /** + * [Required] The start date of the data window. + */ + @visibility("read", "create") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + windowStart: utcDateTime; + + /** + * [Required] Specifies the type of signal to monitor. + */ + inputDataType: "Static"; +} + +/** + * Sweep job definition. + */ model SweepJob extends JobBase { -/** -* Early termination policies enable canceling poor-performing runs before they complete -*/ -"earlyTermination"?: EarlyTerminationPolicy; -/** -* Mapping of input data bindings used in the job. -*/ -@visibility("read", "create") -"inputs"?: Record; -/** -* Sweep Job limit. -*/ -@visibility("read", "create") -"limits"?: SweepJobLimits; -/** -* [Required] Optimization objective. -*/ -"objective": Objective; -/** -* Mapping of output data bindings used in the job. -*/ -@visibility("read", "create") -"outputs"?: Record; -/** -* Queue settings for the job -*/ -@visibility("read", "create") -"queueSettings"?: QueueSettings; -/** -* [Required] The hyperparameter sampling algorithm -*/ -"samplingAlgorithm": SamplingAlgorithm; -/** -* [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter -*/ -"searchSpace": Record; -/** -* [Required] Trial component definition. -*/ -"trial": TrialComponent; -/** -* [Required] Specifies the type of job. -*/ -"jobType": "Sweep"; -} - -/** -* Sweep Job limit class. -*/ + /** + * Early termination policies enable canceling poor-performing runs before they complete + */ + earlyTermination?: EarlyTerminationPolicy; + + /** + * Mapping of input data bindings used in the job. + */ + @visibility("read", "create") + inputs?: Record; + + /** + * Sweep Job limit. + */ + @visibility("read", "create") + limits?: SweepJobLimits; + + /** + * [Required] Optimization objective. + */ + objective: Objective; + + /** + * Mapping of output data bindings used in the job. + */ + @visibility("read", "create") + outputs?: Record; + + /** + * Queue settings for the job + */ + @visibility("read", "create") + queueSettings?: QueueSettings; + + /** + * [Required] The hyperparameter sampling algorithm + */ + samplingAlgorithm: SamplingAlgorithm; + + /** + * [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter + */ + searchSpace: Record; + + /** + * [Required] Trial component definition. + */ + trial: TrialComponent; + + /** + * [Required] Specifies the type of job. + */ + jobType: "Sweep"; +} + +/** + * Sweep Job limit class. + */ model SweepJobLimits extends JobLimits { -/** -* Sweep Job max concurrent trials. -*/ -"maxConcurrentTrials"?: int32; -/** -* Sweep Job max total trials. -*/ -"maxTotalTrials"?: int32; -/** -* Sweep Job Trial timeout value. -*/ -"trialTimeout"?: duration; -/** -* [Required] JobLimit type. -*/ -"jobLimitsType": "Sweep"; + /** + * Sweep Job max concurrent trials. + */ + maxConcurrentTrials?: int32; + + /** + * Sweep Job max total trials. + */ + maxTotalTrials?: int32; + + /** + * Sweep Job Trial timeout value. + */ + trialTimeout?: duration; + + /** + * [Required] JobLimit type. + */ + jobLimitsType: "Sweep"; } /** -* Trial component definition. -*/ + * Trial component definition. + */ model TrialComponent { -/** -* ARM resource ID of the code asset. -*/ -@visibility("read", "create") -"codeId"?: string; -/** -* [Required] The command to execute on startup of the job. eg. "python train.py" -*/ -@visibility("read", "create") -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"command": string; -/** -* Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. -*/ -@visibility("read", "create") -"distribution"?: DistributionConfiguration; -/** -* [Required] The ARM resource ID of the Environment specification for the job. -*/ -@minLength(1) -@pattern("[a-zA-Z0-9_]") -"environmentId": string; -/** -* Environment variables included in the job. -*/ -@visibility("read", "create") -"environmentVariables"?: Record; -/** -* Compute Resource configuration for the job. -*/ -@visibility("read", "create") -"resources"?: JobResourceConfiguration; + /** + * ARM resource ID of the code asset. + */ + @visibility("read", "create") + codeId?: string; + + /** + * [Required] The command to execute on startup of the job. eg. "python train.py" + */ + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + command: string; + + /** + * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + */ + @visibility("read", "create") + distribution?: DistributionConfiguration; + + /** + * [Required] The ARM resource ID of the Environment specification for the job. + */ + @minLength(1) + @pattern("[a-zA-Z0-9_]") + environmentId: string; + + /** + * Environment variables included in the job. + */ + @visibility("read", "create") + environmentVariables?: Record; + + /** + * Compute Resource configuration for the job. + */ + @visibility("read", "create") + resources?: JobResourceConfiguration; } - model TargetUtilizationScaleSettings extends OnlineScaleSettings { -/** -* The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances. -*/ -"maxInstances"?: int32 = 1; -/** -* The minimum number of instances to always be present. -*/ -"minInstances"?: int32 = 1; -/** -* The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds. -*/ -"pollingInterval"?: duration = duration.PT1S; -/** -* Target CPU usage for the autoscaler. -*/ -"targetUtilizationPercentage"?: int32 = 70; -/** -* [Required] Type of deployment scaling algorithm -*/ -"scaleType": "TargetUtilization"; + /** + * The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances. + */ + maxInstances?: int32 = 1; + + /** + * The minimum number of instances to always be present. + */ + minInstances?: int32 = 1; + + /** + * The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds. + */ + pollingInterval?: duration = "PT1S"; + + /** + * Target CPU usage for the autoscaler. + */ + targetUtilizationPercentage?: int32 = 70; + + /** + * [Required] Type of deployment scaling algorithm + */ + scaleType: "TargetUtilization"; } /** -* TensorFlow distribution configuration. -*/ + * TensorFlow distribution configuration. + */ model TensorFlow extends DistributionConfiguration { -/** -* Number of parameter server tasks. -*/ -@visibility("read", "create") -"parameterServerCount"?: int32; -/** -* Number of workers. If not specified, will default to the instance count. -*/ -@visibility("read", "create") -"workerCount"?: int32; -/** -* [Required] Specifies the type of distribution framework. -*/ -"distributionType": "TensorFlow"; + /** + * Number of parameter server tasks. + */ + @visibility("read", "create") + parameterServerCount?: int32; + + /** + * Number of workers. If not specified, will default to the instance count. + */ + @visibility("read", "create") + workerCount?: int32; + + /** + * [Required] Specifies the type of distribution framework. + */ + distributionType: "TensorFlow"; } /** -* Text Classification task in AutoML NLP vertical. -NLP - Natural Language Processing. -*/ + * Text Classification task in AutoML NLP vertical. + * NLP - Natural Language Processing. + */ model TextClassification extends AutoMLVertical { -...NlpVertical; -/** -* Primary metric for Text-Classification task. -*/ -"primaryMetric"?: ClassificationPrimaryMetrics; -/** -* [Required] Task type for AutoMLJob. -*/ -"taskType": "TextClassification"; + ...NlpVertical; + + /** + * Primary metric for Text-Classification task. + */ + primaryMetric?: ClassificationPrimaryMetrics; + + /** + * [Required] Task type for AutoMLJob. + */ + taskType: "TextClassification"; } /** -* Text Classification Multilabel task in AutoML NLP vertical. -NLP - Natural Language Processing. -*/ + * Text Classification Multilabel task in AutoML NLP vertical. + * NLP - Natural Language Processing. + */ model TextClassificationMultilabel extends AutoMLVertical { -...NlpVertical; -/** -* Primary metric for Text-Classification-Multilabel task. -Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. -*/ -@visibility("read") -"primaryMetric"?: ClassificationMultilabelPrimaryMetrics; -/** -* [Required] Task type for AutoMLJob. -*/ -"taskType": "TextClassificationMultilabel"; + ...NlpVertical; + + /** + * Primary metric for Text-Classification-Multilabel task. + * Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. + */ + @visibility("read") + primaryMetric?: ClassificationMultilabelPrimaryMetrics; + + /** + * [Required] Task type for AutoMLJob. + */ + taskType: "TextClassificationMultilabel"; } /** -* Text-NER task in AutoML NLP vertical. -NER - Named Entity Recognition. -NLP - Natural Language Processing. -*/ + * Text-NER task in AutoML NLP vertical. + * NER - Named Entity Recognition. + * NLP - Natural Language Processing. + */ model TextNer extends AutoMLVertical { -...NlpVertical; -/** -* Primary metric for Text-NER task. -Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. -*/ -@visibility("read") -"primaryMetric"?: ClassificationPrimaryMetrics; -/** -* [Required] Task type for AutoMLJob. -*/ -"taskType": "TextNER"; -} + ...NlpVertical; + + /** + * Primary metric for Text-NER task. + * Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. + */ + @visibility("read") + primaryMetric?: ClassificationPrimaryMetrics; + /** + * [Required] Task type for AutoMLJob. + */ + taskType: "TextNER"; +} model TopNFeaturesByAttribution extends MonitoringFeatureFilterBase { -/** -* The number of top features to include. -*/ -@visibility("read", "create") -"top"?: int32 = 10; -/** -* [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. -*/ -"filterType": "TopNByAttribution"; + /** + * The number of top features to include. + */ + @visibility("read", "create") + top?: int32 = 10; + + /** + * [Required] Specifies the feature filter to leverage when selecting features to calculate metrics over. + */ + filterType: "TopNByAttribution"; } /** -* Trailing input data definition. -*/ + * Trailing input data definition. + */ model TrailingInputData extends MonitoringInputDataBase { -/** -* The ARM resource ID of the component resource used to preprocess the data. -*/ -@visibility("read", "create") -"preprocessingComponentId"?: string; -/** -* [Required] The time offset between the end of the data window and the monitor's current run time. -*/ -@visibility("read", "create") -"windowOffset": duration; -/** -* [Required] The size of the trailing data window. -*/ -@visibility("read", "create") -"windowSize": duration; -/** -* [Required] Specifies the type of signal to monitor. -*/ -"inputDataType": "Trailing"; + /** + * The ARM resource ID of the component resource used to preprocess the data. + */ + @visibility("read", "create") + preprocessingComponentId?: string; + + /** + * [Required] The time offset between the end of the data window and the monitor's current run time. + */ + @visibility("read", "create") + windowOffset: duration; + + /** + * [Required] The size of the trailing data window. + */ + @visibility("read", "create") + windowSize: duration; + + /** + * [Required] Specifies the type of signal to monitor. + */ + inputDataType: "Trailing"; } /** -* Triton inferencing server configurations. -*/ + * Triton inferencing server configurations. + */ model TritonInferencingServer extends InferencingServer { -/** -* Inference configuration for Triton. -*/ -"inferenceConfiguration"?: OnlineInferenceConfiguration; -/** -* [Required] Inferencing server type for various targets. -*/ -"serverType": "Triton"; -} + /** + * Inference configuration for Triton. + */ + inferenceConfiguration?: OnlineInferenceConfiguration; + /** + * [Required] Inferencing server type for various targets. + */ + serverType: "Triton"; +} model TritonModelJobInput extends JobInput { -...AssetJobInput; -/** -* [Required] Specifies the type of job. -*/ -"jobInputType": "triton_model"; -} + ...AssetJobInput; + /** + * [Required] Specifies the type of job. + */ + jobInputType: "triton_model"; +} model TritonModelJobOutput extends JobOutput { -...AssetJobOutput; -/** -* [Required] Specifies the type of job. -*/ -"jobOutputType": "triton_model"; + ...AssetJobOutput; + + /** + * [Required] Specifies the type of job. + */ + jobOutputType: "triton_model"; } /** -* Defines an early termination policy that cancels a given percentage of runs at each evaluation interval. -*/ + * Defines an early termination policy that cancels a given percentage of runs at each evaluation interval. + */ model TruncationSelectionPolicy extends EarlyTerminationPolicy { -/** -* The percentage of runs to cancel at each evaluation interval. -*/ -"truncationPercentage"?: int32; -/** -* [Required] Name of policy configuration -*/ -"policyType": "TruncationSelection"; + /** + * The percentage of runs to cancel at each evaluation interval. + */ + truncationPercentage?: int32; + + /** + * [Required] Name of policy configuration + */ + policyType: "TruncationSelection"; } /** -* uri-file data version entity -*/ + * uri-file data version entity + */ model UriFileDataVersion extends DataVersionBase { -/** -* [Required] Specifies the type of data. -*/ -"dataType": "uri_file"; + /** + * [Required] Specifies the type of data. + */ + dataType: "uri_file"; } - model UriFileJobInput extends JobInput { -...AssetJobInput; -/** -* [Required] Specifies the type of job. -*/ -"jobInputType": "uri_file"; -} + ...AssetJobInput; + /** + * [Required] Specifies the type of job. + */ + jobInputType: "uri_file"; +} model UriFileJobOutput extends JobOutput { -...AssetJobOutput; -/** -* [Required] Specifies the type of job. -*/ -"jobOutputType": "uri_file"; + ...AssetJobOutput; + + /** + * [Required] Specifies the type of job. + */ + jobOutputType: "uri_file"; } /** -* uri-folder data version entity -*/ + * uri-folder data version entity + */ model UriFolderDataVersion extends DataVersionBase { -/** -* [Required] Specifies the type of data. -*/ -"dataType": "uri_folder"; + /** + * [Required] Specifies the type of data. + */ + dataType: "uri_folder"; } - model UriFolderJobInput extends JobInput { -...AssetJobInput; -/** -* [Required] Specifies the type of job. -*/ -"jobInputType": "uri_folder"; -} + ...AssetJobInput; + /** + * [Required] Specifies the type of job. + */ + jobInputType: "uri_folder"; +} model UriFolderJobOutput extends JobOutput { -...AssetJobOutput; -/** -* [Required] Specifies the type of job. -*/ -"jobOutputType": "uri_folder"; + ...AssetJobOutput; + + /** + * [Required] Specifies the type of job. + */ + jobOutputType: "uri_folder"; } /** -* User identity configuration. -*/ + * User identity configuration. + */ model UserIdentity extends IdentityConfiguration { -/** -* [Required] Specifies the type of identity framework. -*/ -"identityType": "UserIdentity"; + /** + * [Required] Specifies the type of identity framework. + */ + identityType: "UserIdentity"; } +model AccessKeyAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionAccessKey; -model AccessKeyAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { -"credentials"?: WorkspaceConnectionAccessKey; -/** -* Authentication type of the connection target -*/ -"authType": "AccessKey"; + /** + * Authentication type of the connection target + */ + authType: "AccessKey"; } - model WorkspaceConnectionAccessKey { -"accessKeyId"?: string; -"secretAccessKey"?: string; -} - -/** -* This connection type covers the generic ApiKey auth connection categories, for examples: -AzureOpenAI: - Category:= AzureOpenAI - AuthType:= ApiKey (as type discriminator) - Credentials:= {ApiKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey - Target:= {ApiBase} - -CognitiveService: - Category:= CognitiveService - AuthType:= ApiKey (as type discriminator) - Credentials:= {SubscriptionKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey - Target:= ServiceRegion={serviceRegion} - -CognitiveSearch: - Category:= CognitiveSearch - AuthType:= ApiKey (as type discriminator) - Credentials:= {Key} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey - Target:= {Endpoint} - -Use Metadata property bag for ApiType, ApiVersion, Kind and other metadata fields -*/ -model ApiKeyAuthWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { -/** -* Api key object for workspace connection credential. -*/ -"credentials"?: WorkspaceConnectionApiKey; -/** -* Authentication type of the connection target -*/ -"authType": "ApiKey"; -} - -/** -* Api key object for workspace connection credential. -*/ + accessKeyId?: string; + secretAccessKey?: string; +} + +/** + * This connection type covers the generic ApiKey auth connection categories, for examples: + * AzureOpenAI: + * Category:= AzureOpenAI + * AuthType:= ApiKey (as type discriminator) + * Credentials:= {ApiKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + * Target:= {ApiBase} + * + * CognitiveService: + * Category:= CognitiveService + * AuthType:= ApiKey (as type discriminator) + * Credentials:= {SubscriptionKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + * Target:= ServiceRegion={serviceRegion} + * + * CognitiveSearch: + * Category:= CognitiveSearch + * AuthType:= ApiKey (as type discriminator) + * Credentials:= {Key} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + * Target:= {Endpoint} + * + * Use Metadata property bag for ApiType, ApiVersion, Kind and other metadata fields + */ +model ApiKeyAuthWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + /** + * Api key object for workspace connection credential. + */ + credentials?: WorkspaceConnectionApiKey; + + /** + * Authentication type of the connection target + */ + authType: "ApiKey"; +} + +/** + * Api key object for workspace connection credential. + */ model WorkspaceConnectionApiKey { -"key"?: string; + key?: string; } /** -* Custom Keys credential object -*/ + * Custom Keys credential object + */ model CustomKeys { -/** -* Dictionary of -*/ -"keys"?: Record; + /** + * Dictionary of + */ + keys?: Record; } /** -* Category:= CustomKeys -AuthType:= CustomKeys (as type discriminator) -Credentials:= {CustomKeys} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.CustomKeys -Target:= {any value} -Use Metadata property bag for ApiVersion and other metadata fields -*/ -model CustomKeysWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { -/** -* Custom Keys credential object -*/ -"credentials"?: CustomKeys; -/** -* Authentication type of the connection target -*/ -"authType": "CustomKeys"; + * Category:= CustomKeys + * AuthType:= CustomKeys (as type discriminator) + * Credentials:= {CustomKeys} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.CustomKeys + * Target:= {any value} + * Use Metadata property bag for ApiVersion and other metadata fields + */ +model CustomKeysWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + /** + * Custom Keys credential object + */ + credentials?: CustomKeys; + + /** + * Authentication type of the connection target + */ + authType: "CustomKeys"; } /** -* FQDN Outbound Rule for the managed network of a machine learning workspace. -*/ + * FQDN Outbound Rule for the managed network of a machine learning workspace. + */ model FqdnOutboundRule extends OutboundRule { -"destination"?: string; -/** -* Type of a managed network Outbound Rule of a machine learning workspace. -*/ -"type": "FQDN"; + destination?: string; + + /** + * Type of a managed network Outbound Rule of a machine learning workspace. + */ + type: "FQDN"; } +model ManagedIdentityAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionManagedIdentity; -model ManagedIdentityAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { -"credentials"?: WorkspaceConnectionManagedIdentity; -/** -* Authentication type of the connection target -*/ -"authType": "ManagedIdentity"; + /** + * Authentication type of the connection target + */ + authType: "ManagedIdentity"; } - model WorkspaceConnectionManagedIdentity { -"clientId"?: string; -"resourceId"?: string; + clientId?: string; + resourceId?: string; } - -model NoneAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { -/** -* Authentication type of the connection target -*/ -"authType": "None"; +model NoneAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + /** + * Authentication type of the connection target + */ + authType: "None"; } +model PATAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionPersonalAccessToken; -model PATAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { -"credentials"?: WorkspaceConnectionPersonalAccessToken; -/** -* Authentication type of the connection target -*/ -"authType": "PAT"; + /** + * Authentication type of the connection target + */ + authType: "PAT"; } - model WorkspaceConnectionPersonalAccessToken { -"pat"?: string; + pat?: string; } /** -* Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace. -*/ + * Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace. + */ model PrivateEndpointDestination { -"serviceResourceId"?: string; -"sparkEnabled"?: boolean; -/** -* Type of a managed network Outbound Rule of a machine learning workspace. -*/ -"sparkStatus"?: RuleStatus; -"subresourceTarget"?: string; + serviceResourceId?: string; + sparkEnabled?: boolean; + + /** + * Type of a managed network Outbound Rule of a machine learning workspace. + */ + sparkStatus?: RuleStatus; + + subresourceTarget?: string; } /** -* Private Endpoint Outbound Rule for the managed network of a machine learning workspace. -*/ + * Private Endpoint Outbound Rule for the managed network of a machine learning workspace. + */ model PrivateEndpointOutboundRule extends OutboundRule { -/** -* Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace. -*/ -"destination"?: PrivateEndpointDestination; -/** -* Type of a managed network Outbound Rule of a machine learning workspace. -*/ -"type": "PrivateEndpoint"; + /** + * Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace. + */ + destination?: PrivateEndpointDestination; + + /** + * Type of a managed network Outbound Rule of a machine learning workspace. + */ + type: "PrivateEndpoint"; } +model SASAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionSharedAccessSignature; -model SASAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { -"credentials"?: WorkspaceConnectionSharedAccessSignature; -/** -* Authentication type of the connection target -*/ -"authType": "SAS"; + /** + * Authentication type of the connection target + */ + authType: "SAS"; } - model WorkspaceConnectionSharedAccessSignature { -"sas"?: string; + sas?: string; } +model ServicePrincipalAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionServicePrincipal; -model ServicePrincipalAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { -"credentials"?: WorkspaceConnectionServicePrincipal; -/** -* Authentication type of the connection target -*/ -"authType": "ServicePrincipal"; + /** + * Authentication type of the connection target + */ + authType: "ServicePrincipal"; } - model WorkspaceConnectionServicePrincipal { -"clientId"?: string; -"clientSecret"?: string; -"tenantId"?: string; + clientId?: string; + clientSecret?: string; + tenantId?: string; } /** -* Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. -*/ + * Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. + */ model ServiceTagDestination { -/** -* The action enum for networking rule. -*/ -"action"?: RuleAction; -/** -* Optional, if provided, the ServiceTag property will be ignored. -*/ -@visibility("read") -"addressPrefixes"?: string[]; -"portRanges"?: string; -"protocol"?: string; -"serviceTag"?: string; + /** + * The action enum for networking rule. + */ + action?: RuleAction; + + /** + * Optional, if provided, the ServiceTag property will be ignored. + */ + @visibility("read") + addressPrefixes?: string[]; + + portRanges?: string; + protocol?: string; + serviceTag?: string; } /** -* Service Tag Outbound Rule for the managed network of a machine learning workspace. -*/ + * Service Tag Outbound Rule for the managed network of a machine learning workspace. + */ model ServiceTagOutboundRule extends OutboundRule { -/** -* Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. -*/ -"destination"?: ServiceTagDestination; -/** -* Type of a managed network Outbound Rule of a machine learning workspace. -*/ -"type": "ServiceTag"; + /** + * Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. + */ + destination?: ServiceTagDestination; + + /** + * Type of a managed network Outbound Rule of a machine learning workspace. + */ + type: "ServiceTag"; } +model UsernamePasswordAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionUsernamePassword; -model UsernamePasswordAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { -"credentials"?: WorkspaceConnectionUsernamePassword; -/** -* Authentication type of the connection target -*/ -"authType": "UsernamePassword"; + /** + * Authentication type of the connection target + */ + authType: "UsernamePassword"; } - model WorkspaceConnectionUsernamePassword { -"password"?: string; -"username"?: string; -} \ No newline at end of file + password?: string; + username?: string; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp index 966892fe5d..81dcb18a42 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp @@ -1145,9 +1145,9 @@ interface DataVersionsOperations { $orderBy?: string; /** -* Top count of results, top count cannot be greater than the page size. - If topCount > page size, results with be default page size count will be returned -*/ + * Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned + */ @query("$top") $top?: int32; diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp index 16627aac36..865c70b626 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp @@ -24,6 +24,7 @@ model DataProduct is TrackedResource { @path @key("dataProductName") @segment("dataProducts") + @visibility("read") name: string; ...Azure.ResourceManager.ManagedServiceIdentity; @@ -39,31 +40,18 @@ interface DataProducts { /** * Create data product resource. */ - create is ArmResourceCreateOrReplaceAsync< - DataProduct, - BaseParameters, - ArmAsyncOperationHeader - >; + create is ArmResourceCreateOrReplaceAsync; /** * Update data product resource. */ @parameterVisibility("read") - update is ArmCustomPatchAsync< - DataProduct, - DataProductUpdate, - BaseParameters, - ArmLroLocationHeader - >; + update is ArmCustomPatchAsync; /** * Delete data product resource. */ - delete is ArmResourceDeleteWithoutOkAsync< - DataProduct, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteWithoutOkAsync; /** * List data products by resource group. diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp index cc48526f46..103f23935b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp @@ -18,6 +18,7 @@ namespace Microsoft.NetworkAnalytics; model DataProductsCatalog is ProxyResource { @key("dataProductsCatalog") @segment("dataProductsCatalogs") + @visibility("read") name: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp index b783d56981..4a4cfa6638 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp @@ -26,6 +26,7 @@ model DataType is ProxyResource { @path @key("dataTypeName") @segment("dataTypes") + @visibility("read") name: string; } @@ -39,31 +40,18 @@ interface DataTypes { /** * Create data type resource. */ - create is ArmResourceCreateOrReplaceAsync< - DataType, - BaseParameters, - ArmAsyncOperationHeader - >; + create is ArmResourceCreateOrReplaceAsync; /** * Update data type resource. */ @parameterVisibility("read") - update is ArmCustomPatchAsync< - DataType, - DataTypeUpdate, - BaseParameters, - ArmLroLocationHeader - >; + update is ArmCustomPatchAsync; /** * Delete data type resource. */ - delete is ArmResourceDeleteWithoutOkAsync< - DataType, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteWithoutOkAsync; /** * List data type by parent resource. @@ -75,12 +63,7 @@ interface DataTypes { /** * Delete data for data type. */ - deleteData is ArmResourceActionNoResponseContentAsync< - DataType, - AnyObject, - BaseParameters, - ArmLroLocationHeader - >; + deleteData is ArmResourceActionNoResponseContentAsync; /** * Generate sas token for storage container. diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp index fde1643142..87583bbd63 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp @@ -1,9 +1,11 @@ import "@typespec/rest"; import "@typespec/http"; +import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -101,9 +103,9 @@ enum DataProductUserRole { Reader, /** -* Field to specify user of type SensitiveReader. -This user has privileged access to read sensitive data of a data product. -*/ + * Field to specify user of type SensitiveReader. + * This user has privileged access to read sensitive data of a data product. + */ SensitiveReader, } @@ -527,6 +529,7 @@ model DataProductUpdate { /** * The updatable properties of the DataProduct. */ + @extension("x-ms-client-flatten", true) properties?: DataProductUpdateProperties; } @@ -694,6 +697,7 @@ model DataTypeUpdate { /** * The updatable properties of the DataType. */ + @extension("x-ms-client-flatten", true) properties?: DataTypeUpdateProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp index f13ad0a83b..1d7fd3bddc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp @@ -24,6 +24,7 @@ model Account is TrackedResource { @path @key("name") @segment("accounts") + @visibility("read") name: string; } @@ -37,11 +38,7 @@ interface Accounts { /** * Create a Account */ - createOrUpdate is ArmResourceCreateOrReplaceAsync< - Account, - BaseParameters, - ArmAsyncOperationHeader - >; + createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Update a Account @@ -52,11 +49,7 @@ interface Accounts { /** * Delete a Account */ - delete is ArmResourceDeleteAsync< - Account, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List Account resources by resource group diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp index d669c542c7..edbf81cc89 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp @@ -22,6 +22,7 @@ model Quota is ProxyResource { @path @key("name") @segment("quotas") + @visibility("read") name: QuotaNames; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp index ee87843950..9cbabd80a1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp @@ -1,9 +1,11 @@ import "@typespec/rest"; import "@typespec/http"; +import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -217,6 +219,7 @@ model AccountUpdate { /** * The updatable properties of the Account. */ + @extension("x-ms-client-flatten", true) properties?: AccountUpdateProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp index 467da2f313..85dc34ae18 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp @@ -24,6 +24,7 @@ model Association is TrackedResource { @path @key("associationName") @segment("associations") + @visibility("read") name: string; } @@ -41,11 +42,7 @@ interface Associations { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("AssociationsInterface_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrReplaceAsync< - Association, - BaseParameters, - ArmAsyncOperationHeader - >; + createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Update a Association @@ -60,11 +57,7 @@ interface Associations { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("AssociationsInterface_Delete") - delete is ArmResourceDeleteAsync< - Association, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List Association resources by TrafficController diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp index 8056e47c02..1e98b351f6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp @@ -24,6 +24,7 @@ model Frontend is TrackedResource { @path @key("frontendName") @segment("frontends") + @visibility("read") name: string; } @@ -41,11 +42,7 @@ interface Frontends { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("FrontendsInterface_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrReplaceAsync< - Frontend, - BaseParameters, - ArmAsyncOperationHeader - >; + createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Update a Frontend @@ -60,11 +57,7 @@ interface Frontends { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("FrontendsInterface_Delete") - delete is ArmResourceDeleteAsync< - Frontend, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List Frontend resources by TrafficController diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp index 8256a93ebf..702b4771f7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp @@ -22,6 +22,7 @@ model TrafficController is TrackedResource { @path @key("trafficControllerName") @segment("trafficControllers") + @visibility("read") name: string; } @@ -39,11 +40,7 @@ interface TrafficControllers { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("TrafficControllerInterface_CreateOrUpdate") - createOrUpdate is ArmResourceCreateOrReplaceAsync< - TrafficController, - BaseParameters, - ArmAsyncOperationHeader - >; + createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Update a TrafficController @@ -58,11 +55,7 @@ interface TrafficControllers { */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("TrafficControllerInterface_Delete") - delete is ArmResourceDeleteAsync< - TrafficController, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List TrafficController resources by resource group diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp index 037f9b7441..463fa22e61 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp @@ -1,9 +1,11 @@ import "@typespec/rest"; import "@typespec/http"; +import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -146,6 +148,7 @@ model AssociationUpdate { /** * The updatable properties of the Association. */ + @extension("x-ms-client-flatten", true) properties?: AssociationUpdateProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp index 42bc32ae16..933cbe0cc0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp @@ -22,6 +22,7 @@ model Catalog is TrackedResource { @path @key("catalogName") @segment("catalogs") + @visibility("read") name: string; } @@ -35,11 +36,7 @@ interface Catalogs { /** * Create a Catalog */ - createOrUpdate is ArmResourceCreateOrReplaceAsync< - Catalog, - BaseParameters, - ArmAsyncOperationHeader - >; + createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Update a Catalog @@ -50,11 +47,7 @@ interface Catalogs { /** * Delete a Catalog */ - delete is ArmResourceDeleteAsync< - Catalog, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List Catalog resources by resource group diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp index aeb316b0fc..ba2e754fa9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp @@ -23,6 +23,7 @@ model Certificate is ProxyResource { @path @key("serialNumber") @segment("certificates") + @visibility("read") name: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp index 83b07d01ed..b7e89ebc07 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp @@ -23,6 +23,7 @@ model Deployment is ProxyResource { @path @key("deploymentName") @segment("deployments") + @visibility("read") name: string; } @@ -36,20 +37,12 @@ interface Deployments { /** * Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. */ - createOrUpdate is ArmResourceCreateOrReplaceAsync< - Deployment, - BaseParameters, - ArmAsyncOperationHeader - >; + createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. */ - delete is ArmResourceDeleteAsync< - Deployment, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp index 627c7fbff2..0e2071d363 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp @@ -24,6 +24,7 @@ model Device is ProxyResource { @path @key("deviceName") @segment("devices") + @visibility("read") name: string; } @@ -37,31 +38,18 @@ interface Devices { /** * Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only. */ - createOrUpdate is ArmResourceCreateOrReplaceAsync< - Device, - BaseParameters, - ArmAsyncOperationHeader - >; + createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level. */ @parameterVisibility("read") - update is ArmCustomPatchAsync< - Device, - DeviceUpdate, - BaseParameters, - ArmLroLocationHeader - >; + update is ArmCustomPatchAsync; /** * Delete a Device */ - delete is ArmResourceDeleteAsync< - Device, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. @@ -76,9 +64,7 @@ interface Devices { generateCapabilityImage is ArmResourceActionAsync< Device, GenerateCapabilityImageRequest, - SignedCapabilityImageResponse, - BaseParameters, - ArmLroLocationHeader + SignedCapabilityImageResponse >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp index 621d14c6eb..d461df31bd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp @@ -24,6 +24,7 @@ model DeviceGroup is ProxyResource { @path @key("deviceGroupName") @segment("deviceGroups") + @visibility("read") name: string; } @@ -37,31 +38,18 @@ interface DeviceGroups { /** * Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. */ - createOrUpdate is ArmResourceCreateOrReplaceAsync< - DeviceGroup, - BaseParameters, - ArmAsyncOperationHeader - >; + createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. */ @parameterVisibility("read") - update is ArmCustomPatchAsync< - DeviceGroup, - DeviceGroupUpdate, - BaseParameters, - ArmLroLocationHeader - >; + update is ArmCustomPatchAsync; /** * Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. */ - delete is ArmResourceDeleteAsync< - DeviceGroup, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. @@ -104,9 +92,7 @@ interface DeviceGroups { */ claimDevices is ArmResourceActionNoResponseContentAsync< DeviceGroup, - ClaimDevicesRequest, - BaseParameters, - ArmLroLocationHeader + ClaimDevicesRequest >; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp index e1b7d7ef98..bb67b775a4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp @@ -23,6 +23,7 @@ model Image is ProxyResource { @path @key("imageName") @segment("images") + @visibility("read") name: string; } @@ -36,20 +37,12 @@ interface Images { /** * Create a Image */ - createOrUpdate is ArmResourceCreateOrReplaceAsync< - Image, - BaseParameters, - ArmAsyncOperationHeader - >; + createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Delete a Image */ - delete is ArmResourceDeleteAsync< - Image, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List Image resources by Catalog diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp index 93dc7ec1e5..192d6e805b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp @@ -24,6 +24,7 @@ model Product is ProxyResource { @path @key("productName") @segment("products") + @visibility("read") name: string; } @@ -37,31 +38,18 @@ interface Products { /** * Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. */ - createOrUpdate is ArmResourceCreateOrReplaceAsync< - Product, - BaseParameters, - ArmAsyncOperationHeader - >; + createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. */ @parameterVisibility("read") - update is ArmCustomPatchAsync< - Product, - ProductUpdate, - BaseParameters, - ArmLroLocationHeader - >; + update is ArmCustomPatchAsync; /** * Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name' */ - delete is ArmResourceDeleteAsync< - Product, - BaseParameters, - ArmLroLocationHeader - >; + delete is ArmResourceDeleteAsync; /** * List Product resources by Catalog diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp index 395a733727..8f4c4ef4a8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp @@ -1,10 +1,12 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; +import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -682,6 +684,7 @@ model ProductUpdate { /** * The updatable properties of the Product. */ + @extension("x-ms-client-flatten", true) properties?: ProductUpdateProperties; } @@ -702,6 +705,7 @@ model DeviceGroupUpdate { /** * The updatable properties of the DeviceGroup. */ + @extension("x-ms-client-flatten", true) properties?: DeviceGroupUpdateProperties; } @@ -752,6 +756,7 @@ model DeviceUpdate { /** * The updatable properties of the Device. */ + @extension("x-ms-client-flatten", true) properties?: DeviceUpdateProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp index 3ffccc7b24..f83f478a79 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp @@ -15,8 +15,12 @@ namespace Microsoft.Storage; /** * Properties of the blob container, including Id, resource name, resource type, Etag. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(BlobServiceProperties) -model BlobContainer is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ContainerProperties) +model BlobContainer extends ProxyResourceBase { /** * The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. */ @@ -25,7 +29,14 @@ model BlobContainer is ProxyResource { @path @key("containerName") @segment("containers") + @visibility("read") name: string; + + /** + * Properties of the blob container. + */ + @extension("x-ms-client-flatten", true) + properties?: ContainerProperties; } @armResourceOperations @@ -103,13 +114,7 @@ interface BlobContainers { /** * This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container. */ - objectLevelWorm is ArmResourceActionAsync< - BlobContainer, - void, - void, - BaseParameters, - ArmLroLocationHeader - >; + objectLevelWorm is ArmResourceActionAsync; } @@projectedName(BlobContainers.create::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp index 1917e72982..56651e3853 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp @@ -15,12 +15,25 @@ namespace Microsoft.Storage; /** * The storage account blob inventory policy. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -model BlobInventoryPolicy is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + BlobInventoryPolicyProperties +) +model BlobInventoryPolicy extends ProxyResourceBase { @key("inventoryPolicy") @segment("inventoryPolicies") + @visibility("read") name: string; + + /** + * Returns the storage account blob inventory policy rules. + */ + @extension("x-ms-client-flatten", true) + properties?: BlobInventoryPolicyProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp index c503a7472b..75a2e1b1b9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp @@ -15,13 +15,26 @@ namespace Microsoft.Storage; /** * The properties of a storage account’s Blob service. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -model BlobServiceProperties is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + BlobServicePropertiesProperties +) +model BlobServiceProperties extends ProxyResourceBase { @key("blobService") @segment("blobServices") + @visibility("read") name: string; + /** + * The properties of a storage account’s Blob service. + */ + @extension("x-ms-client-flatten", true) + properties?: BlobServicePropertiesProperties; + ...Azure.ResourceManager.ResourceSku; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp index f5bd38ef8a..6a4f4310ab 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp @@ -14,8 +14,12 @@ namespace Microsoft.Storage; /** * Deleted storage account */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @locationResource -model DeletedAccount is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(DeletedAccountProperties) +model DeletedAccount extends ProxyResourceBase { /** * Name of the deleted storage account. */ @@ -24,7 +28,14 @@ model DeletedAccount is ProxyResource { @path @key("deletedAccountName") @segment("deletedAccounts") + @visibility("read") name: string; + + /** + * Properties of the deleted account. + */ + @extension("x-ms-client-flatten", true) + properties?: DeletedAccountProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp index 3f0f96db33..45ca61bada 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp @@ -15,8 +15,12 @@ namespace Microsoft.Storage; /** * The Encryption Scope resource. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(StorageAccount) -model EncryptionScope is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(EncryptionScopeProperties) +model EncryptionScope extends ProxyResourceBase { /** * The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. */ @@ -25,7 +29,14 @@ model EncryptionScope is ProxyResource { @path @key("encryptionScopeName") @segment("encryptionScopes") + @visibility("read") name: string; + + /** + * Properties of the encryption scope. + */ + @extension("x-ms-client-flatten", true) + properties?: EncryptionScopeProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp index 0f49d36639..cbcd3d5267 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp @@ -15,13 +15,26 @@ namespace Microsoft.Storage; /** * The properties of File services in storage account. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -model FileServiceProperties is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + FileServicePropertiesProperties +) +model FileServiceProperties extends ProxyResourceBase { @key("fileService") @segment("fileServices") + @visibility("read") name: string; + /** + * The properties of File services in storage account. + */ + @extension("x-ms-client-flatten", true) + properties?: FileServicePropertiesProperties; + ...Azure.ResourceManager.ResourceSku; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp index 203531e9f0..f84bff7d78 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp @@ -15,8 +15,12 @@ namespace Microsoft.Storage; /** * Properties of the file share, including Id, resource name, resource type, Etag. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(FileServiceProperties) -model FileShare is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(FileShareProperties) +model FileShare extends ProxyResourceBase { /** * The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. */ @@ -25,7 +29,14 @@ model FileShare is ProxyResource { @path @key("shareName") @segment("shares") + @visibility("read") name: string; + + /** + * Properties of the file share. + */ + @extension("x-ms-client-flatten", true) + properties?: FileShareProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp index 350448c709..506595dd08 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp @@ -15,12 +15,23 @@ namespace Microsoft.Storage; /** * The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(BlobContainer) -model ImmutabilityPolicy is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ImmutabilityPolicyProperty) +model ImmutabilityPolicy extends ProxyResourceBase { @key("immutabilityPolicy") @segment("immutabilityPolicies") + @visibility("read") name: string; + + /** + * The properties of an ImmutabilityPolicy of a blob container. + */ + @extension("x-ms-client-flatten", true) + properties: ImmutabilityPolicyProperty; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp index aecbcb4dbe..310f61b211 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp @@ -15,8 +15,12 @@ namespace Microsoft.Storage; /** * The local user associated with the storage accounts. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(StorageAccount) -model LocalUser is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(LocalUserProperties) +model LocalUser extends ProxyResourceBase { /** * The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account. */ @@ -25,7 +29,14 @@ model LocalUser is ProxyResource { @path @key("username") @segment("localUsers") + @visibility("read") name: string; + + /** + * Storage account local user properties. + */ + @extension("x-ms-client-flatten", true) + properties?: LocalUserProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp index 607ce99fec..6f654b1a67 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp @@ -15,12 +15,23 @@ namespace Microsoft.Storage; /** * The Get Storage Account ManagementPolicies operation response. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -model ManagementPolicy is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ManagementPolicyProperties) +model ManagementPolicy extends ProxyResourceBase { @key("managementPolicy") @segment("managementPolicies") + @visibility("read") name: string; + + /** + * Returns the Storage Account Data Policies Rules. + */ + @extension("x-ms-client-flatten", true) + properties?: ManagementPolicyProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp index 27a719b3e4..ac3d3e150e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp @@ -15,9 +15,14 @@ namespace Microsoft.Storage; /** * The replication policy between two storage accounts. Multiple rules can be defined in one policy. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(StorageAccount) -model ObjectReplicationPolicy - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + ObjectReplicationPolicyProperties +) +model ObjectReplicationPolicy extends ProxyResourceBase { /** * For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file. */ @@ -25,7 +30,14 @@ model ObjectReplicationPolicy @path @key("objectReplicationPolicyId") @segment("objectReplicationPolicies") + @visibility("read") name: string; + + /** + * Returns the Storage Account Object Replication Policy. + */ + @extension("x-ms-client-flatten", true) + properties?: ObjectReplicationPolicyProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp index c6b7d476c8..f0ae704f7f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp @@ -15,16 +15,28 @@ namespace Microsoft.Storage; /** * The Private Endpoint Connection resource. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(StorageAccount) -model PrivateEndpointConnection - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PrivateEndpointConnectionProperties +) +model PrivateEndpointConnection extends ProxyResourceBase { /** * The name of the private endpoint connection associated with the Azure resource */ @path @key("privateEndpointConnectionName") @segment("privateEndpointConnections") + @visibility("read") name: string; + + /** + * Resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PrivateEndpointConnectionProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp index 7fdc65dd27..e8763d8b60 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp @@ -15,13 +15,25 @@ namespace Microsoft.Storage; /** * The properties of a storage account’s Queue service. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -model QueueServiceProperties - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + QueueServicePropertiesProperties +) +model QueueServiceProperties extends ProxyResourceBase { @key("queueService") @segment("queueServices") + @visibility("read") name: string; + + /** + * The properties of a storage account’s Queue service. + */ + @extension("x-ms-client-flatten", true) + properties?: QueueServicePropertiesProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp index a1dfcfa9e2..01209c3796 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp @@ -14,7 +14,11 @@ namespace Microsoft.Storage; /** * The storage account. */ -model StorageAccount is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(StorageAccountProperties) +model StorageAccount extends TrackedResourceBase { /** * The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. */ @@ -23,16 +27,28 @@ model StorageAccount is TrackedResource { @path @key("accountName") @segment("storageAccounts") + @visibility("read") name: string; + /** + * Gets the Kind. + */ + @visibility("read") + kind?: Kind; + /** * The extendedLocation of the resource. */ extendedLocation?: ExtendedLocation; + /** + * Properties of the storage account. + */ + @extension("x-ms-client-flatten", true) + properties?: StorageAccountProperties; + ...Azure.ResourceManager.ManagedServiceIdentity; ...Azure.ResourceManager.ResourceSku; - ...Azure.ResourceManager.ResourceKind; } @armResourceOperations @@ -145,8 +161,7 @@ interface StorageAccounts { */ @query("failoverType") failoverType?: "Planned"; - }, - ArmLroLocationHeader + } >; /** @@ -164,8 +179,7 @@ interface StorageAccounts { */ @query("requestType") requestType: string; - }, - ArmLroLocationHeader + } >; /** @@ -174,9 +188,7 @@ interface StorageAccounts { abortHierarchicalNamespaceMigration is ArmResourceActionAsync< StorageAccount, void, - void, - BaseParameters, - ArmLroLocationHeader + void >; /** @@ -185,9 +197,7 @@ interface StorageAccounts { restoreBlobRanges is ArmResourceActionAsync< StorageAccount, BlobRestoreParameters, - BlobRestoreStatus, - BaseParameters, - ArmLroLocationHeader + BlobRestoreStatus >; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp index 78b03c72f6..b01aa796c1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp @@ -13,8 +13,12 @@ using TypeSpec.OpenAPI; namespace Microsoft.Storage; +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(QueueServiceProperties) -model StorageQueue is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(QueueProperties) +model StorageQueue extends ProxyResourceBase { /** * A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters. */ @@ -24,7 +28,14 @@ model StorageQueue is ProxyResource { @path @key("queueName") @segment("queues") + @visibility("read") name: string; + + /** + * Queue resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: QueueProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp index 86d92e02dd..21c1a4f9d5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp @@ -15,8 +15,12 @@ namespace Microsoft.Storage; /** * Properties of the table, including Id, resource name, resource type. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(TableServiceProperties) -model Table is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(TableProperties) +model Table extends ProxyResourceBase { /** * A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character. */ @@ -26,7 +30,14 @@ model Table is ProxyResource { @path @key("tableName") @segment("tables") + @visibility("read") name: string; + + /** + * Table resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: TableProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp index 1a7b6d5994..b1c0f7514c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp @@ -15,13 +15,25 @@ namespace Microsoft.Storage; /** * The properties of a storage account’s Table service. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -model TableServiceProperties - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + TableServicePropertiesProperties +) +model TableServiceProperties extends ProxyResourceBase { @key("tableService") @segment("tableServices") + @visibility("read") name: string; + + /** + * The properties of a storage account’s Table service. + */ + @extension("x-ms-client-flatten", true) + properties?: TableServicePropertiesProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp index 7659b60256..abfe4e16d1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp @@ -1,11 +1,13 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; +import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; +using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -824,6 +826,7 @@ model StorageAccountCreateParameters { /** * The parameters used to create the storage account. */ + @extension("x-ms-client-flatten", true) properties?: StorageAccountPropertiesCreateParameters; } @@ -1063,7 +1066,7 @@ model Encryption { /** * The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault */ - keySource?: KeySource = KeySource.Microsoft.Storage; + keySource?: KeySource = KeySource.`Microsoft.Storage`; /** * A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest. @@ -1962,6 +1965,7 @@ model StorageAccountUpdateParameters { /** * The parameters used when updating a storage account. */ + @extension("x-ms-client-flatten", true) properties?: StorageAccountPropertiesUpdateParameters; /** @@ -2888,6 +2892,7 @@ model PrivateLinkResource extends Resource { /** * Resource properties. */ + @extension("x-ms-client-flatten", true) properties?: PrivateLinkResourceProperties; } @@ -3451,6 +3456,7 @@ model ImmutabilityPolicyProperties { /** * The properties of an ImmutabilityPolicy of a blob container. */ + @extension("x-ms-client-flatten", true) properties?: ImmutabilityPolicyProperty; /** @@ -4083,6 +4089,7 @@ model ListContainerItem extends AzureEntityResource { /** * The blob container properties be listed out. */ + @extension("x-ms-client-flatten", true) properties?: ContainerProperties; } @@ -4093,6 +4100,7 @@ model FileShareItem extends AzureEntityResource { /** * The file share properties be listed out. */ + @extension("x-ms-client-flatten", true) properties?: FileShareProperties; } @@ -4101,6 +4109,7 @@ model ListQueue extends Resource { * List Queue resource properties. */ @projectedName("json", "properties") + @extension("x-ms-client-flatten", true) queueProperties?: ListQueueProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp index a39940c1b1..93743c3977 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp @@ -24,6 +24,7 @@ model DictProperty is TrackedResource> { @path @key("name") @segment("dictproperties") + @visibility("read") name: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp index 2708de6554..cf3fd24da9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp @@ -22,6 +22,7 @@ model Employee is TrackedResource { @path @key("employeeName") @segment("employees") + @visibility("read") name: string; } @@ -35,11 +36,7 @@ interface Employees { /** * Create a Employee */ - createOrUpdate is ArmResourceCreateOrReplaceAsync< - Employee, - BaseParameters, - ArmAsyncOperationHeader - >; + createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Update a Employee diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp index 7e635da101..411469b307 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp @@ -20,6 +20,7 @@ namespace Microsoft.Test; model Enroll is TrackedResource { @key("enroll") @segment("enrolls") + @visibility("read") name: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp index f16ff051d8..d63d3a20cd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp @@ -22,6 +22,7 @@ using TypeSpec.Versioning; title: "Azure Test resource management API.", }) @versioned(Versions) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) namespace Microsoft.Test; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp index 150a375fb7..908c250d2e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp @@ -1,9 +1,11 @@ import "@typespec/rest"; import "@typespec/http"; +import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -118,6 +120,7 @@ model EmployeeUpdate { /** * The updatable properties of the Employee. */ + @extension("x-ms-client-flatten", true) properties?: EmployeeUpdateProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp index d59c2e94b8..86ecd1fc84 100644 --- a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp @@ -3171,18 +3171,15 @@ model PoolSpecification { */ model CloudServiceConfiguration { /** -* Possible values are: -2 - OS Family 2, equivalent to Windows Server 2008 R2 -* SP1. -3 - OS Family 3, equivalent to Windows Server 2012. -4 - OS Family 4, -* equivalent to Windows Server 2012 R2. -5 - OS Family 5, equivalent to Windows -* Server 2016. -6 - OS Family 6, equivalent to Windows Server 2019. For more -* information, see Azure Guest OS Releases -* (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). -*/ + * Possible values are: + * 2 - OS Family 2, equivalent to Windows Server 2008 R2 SP1. + * 3 - OS Family 3, equivalent to Windows Server 2012. + * 4 - OS Family 4, equivalent to Windows Server 2012 R2. + * 5 - OS Family 5, equivalent to Windows Server 2016. + * 6 - OS Family 6, equivalent to Windows Server 2019. For more information, see + * Azure Guest OS Releases + * (https://azure.microsoft.com/documentation/articles/cloud-services-guestos-update-matrix/#releases). + */ osFamily: string; /** @@ -3236,16 +3233,15 @@ model VirtualMachineConfiguration { dataDisks?: DataDisk[]; /** -* This only applies to Images that contain the Windows operating system, and -* should only be used when you hold valid on-premises licenses for the Compute -* Nodes which will be deployed. If omitted, no on-premises licensing discount is -* applied. Values are: - - Windows_Server - The on-premises license is for Windows -* Server. - Windows_Client - The on-premises license is for Windows Client. - -*/ + * This only applies to Images that contain the Windows operating system, and + * should only be used when you hold valid on-premises licenses for the Compute + * Nodes which will be deployed. If omitted, no on-premises licensing discount is + * applied. Values are: + * + * Windows_Server - The on-premises license is for Windows Server. + * Windows_Client - The on-premises license is for Windows Client. + * + */ licenseType?: string; /** diff --git a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp index 667b67a1a1..6355961f87 100644 --- a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp @@ -1,8 +1,10 @@ import "@typespec/rest"; import "@typespec/http"; +import "@typespec/openapi"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace AutoRestComplexTestService; @@ -199,6 +201,8 @@ model ReadonlyObj { @discriminator("kind") model MyBaseType { propB1?: string; + + @extension("x-ms-client-flatten", true) helper?: MyBaseHelperType; } diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp index 9b8b9e4173..4058b59b3f 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp @@ -1,10 +1,12 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; +import "@typespec/openapi"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; +using TypeSpec.OpenAPI; namespace Azure.Keyvault; @@ -2203,6 +2205,7 @@ model RoleDefinition { /** * Role definition properties. */ + @extension("x-ms-client-flatten", true) properties?: RoleDefinitionProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp index 0df71a6de3..892dd93b17 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp @@ -1,9 +1,11 @@ import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; +import "@typespec/openapi"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.Keyvault; @@ -205,6 +207,7 @@ op setCertificateIssuer is Azure.Core.Foundations.Operation< * Certificate issuer set parameter. */ @body + @extension("x-ms-client-flatten", true) parameter: CertificateIssuerSetParameters; }, IssuerBundle @@ -230,6 +233,7 @@ op updateCertificateIssuer is Azure.Core.Foundations.Operation< * Certificate issuer update parameter. */ @body + @extension("x-ms-client-flatten", true) parameter: CertificateIssuerUpdateParameters; }, IssuerBundle @@ -295,6 +299,7 @@ op createCertificate is Azure.Core.Foundations.Operation< * The parameters to create a certificate. */ @body + @extension("x-ms-client-flatten", true) parameters: CertificateCreateParameters; }, CertificateOperation @@ -325,6 +330,7 @@ op importCertificate is Azure.Core.Foundations.Operation< * The parameters to import the certificate. */ @body + @extension("x-ms-client-flatten", true) parameters: CertificateImportParameters; }, CertificateBundle @@ -427,6 +433,7 @@ op updateCertificate is Azure.Core.Foundations.Operation< * The parameters for certificate update. */ @body + @extension("x-ms-client-flatten", true) parameters: CertificateUpdateParameters; }, CertificateBundle @@ -476,6 +483,7 @@ op updateCertificateOperation is Azure.Core.Foundations.Operation< * The certificate operation response. */ @body + @extension("x-ms-client-flatten", true) certificateOperation: CertificateOperationUpdateParameter; }, CertificateOperation @@ -541,6 +549,7 @@ op mergeCertificate is Azure.Core.Foundations.Operation< * The parameters to merge certificate. */ @body + @extension("x-ms-client-flatten", true) parameters: CertificateMergeParameters; }, CertificateBundle @@ -701,6 +710,7 @@ op createKey is Azure.Core.Foundations.Operation< * The parameters to create a key. */ @body + @extension("x-ms-client-flatten", true) parameters: KeyCreateParameters; }, KeyBundle @@ -755,6 +765,7 @@ op importKey is Azure.Core.Foundations.Operation< * The parameters to import a key. */ @body + @extension("x-ms-client-flatten", true) parameters: KeyImportParameters; }, KeyBundle @@ -809,6 +820,7 @@ op updateKey is Azure.Core.Foundations.Operation< * The parameters of the key to update. */ @body + @extension("x-ms-client-flatten", true) parameters: KeyUpdateParameters; }, KeyBundle @@ -978,6 +990,7 @@ op encrypt is Azure.Core.Foundations.Operation< * The parameters for the encryption operation. */ @body + @extension("x-ms-client-flatten", true) parameters: KeyOperationsParameters; }, KeyOperationResult @@ -1017,6 +1030,7 @@ op decrypt is Azure.Core.Foundations.Operation< * The parameters for the decryption operation. */ @body + @extension("x-ms-client-flatten", true) parameters: KeyOperationsParameters; }, KeyOperationResult @@ -1048,6 +1062,7 @@ op sign is Azure.Core.Foundations.Operation< * The parameters for the signing operation. */ @body + @extension("x-ms-client-flatten", true) parameters: KeySignParameters; }, KeyOperationResult @@ -1082,6 +1097,7 @@ op verify is Azure.Core.Foundations.Operation< * The parameters for verify operations. */ @body + @extension("x-ms-client-flatten", true) parameters: KeyVerifyParameters; }, KeyVerifyResult @@ -1117,6 +1133,7 @@ op wrapKey is Azure.Core.Foundations.Operation< * The parameters for wrap operation. */ @body + @extension("x-ms-client-flatten", true) parameters: KeyOperationsParameters; }, KeyOperationResult @@ -1153,6 +1170,7 @@ op unwrapKey is Azure.Core.Foundations.Operation< * The parameters for the key operation. */ @body + @extension("x-ms-client-flatten", true) parameters: KeyOperationsParameters; }, KeyOperationResult @@ -1183,6 +1201,7 @@ op release is Azure.Core.Foundations.Operation< * The parameters for the key release operation. */ @body + @extension("x-ms-client-flatten", true) parameters: KeyReleaseParameters; }, KeyReleaseResult @@ -1350,6 +1369,7 @@ op setSecret is Azure.Core.Foundations.Operation< * The parameters for setting the secret. */ @body + @extension("x-ms-client-flatten", true) parameters: SecretSetParameters; }, SecretBundle @@ -1401,6 +1421,7 @@ op updateSecret is Azure.Core.Foundations.Operation< * The parameters for update secret operation. */ @body + @extension("x-ms-client-flatten", true) parameters: SecretUpdateParameters; }, SecretBundle @@ -1612,6 +1633,7 @@ op updateSettings is Azure.Core.Foundations.Operation< * The parameters to update an account setting. */ @body + @extension("x-ms-client-flatten", true) parameters: UpdateSettingsRequest; }, Setting @@ -1832,6 +1854,7 @@ op setStorageAccount is Azure.Core.Foundations.Operation< * The parameters to create a storage account. */ @body + @extension("x-ms-client-flatten", true) parameters: StorageAccountCreateParameters; }, StorageBundle @@ -1856,6 +1879,7 @@ op updateStorageAccount is Azure.Core.Foundations.Operation< * The parameters to update a storage account. */ @body + @extension("x-ms-client-flatten", true) parameters: StorageAccountUpdateParameters; }, StorageBundle @@ -1880,6 +1904,7 @@ op regenerateStorageAccountKey is Azure.Core.Foundations.Operation< * The parameters to regenerate storage account key. */ @body + @extension("x-ms-client-flatten", true) parameters: StorageAccountRegenerteKeyParameters; }, StorageBundle @@ -2073,6 +2098,7 @@ op setSasDefinition is Azure.Core.Foundations.Operation< * The parameters to create a SAS definition. */ @body + @extension("x-ms-client-flatten", true) parameters: SasDefinitionCreateParameters; }, SasDefinitionBundle @@ -2104,6 +2130,7 @@ op updateSasDefinition is Azure.Core.Foundations.Operation< * The parameters to update a SAS definition. */ @body + @extension("x-ms-client-flatten", true) parameters: SasDefinitionUpdateParameters; }, SasDefinitionBundle diff --git a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp index c09d6345fb..b109e92892 100644 --- a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp @@ -16,7 +16,7 @@ model Paths1Vtxb06DeploymentsDeploymentIdCompletionsPostRequestbodyContentApplic * from the beginning of a new document. Maximum allowed size of string list is * 2048. */ - prompt?: PostContentSchemaPrompt; + prompt?: unknown; /** * The maximum number of tokens to generate. Has minimum of 0. @@ -25,26 +25,23 @@ model Paths1Vtxb06DeploymentsDeploymentIdCompletionsPostRequestbodyContentApplic maxTokens?: int32 = 16; /** -* What sampling temperature to use. Higher values means the model will take more -* risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones -* with a well-defined answer. -We generally recommend using this or `top_p` but -* not both. -Minimum of 0 and maximum of 2 allowed. - -*/ + * What sampling temperature to use. Higher values means the model will take more + * risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones + * with a well-defined answer. + * We generally recommend using this or `top_p` but not both. + * Minimum of 0 and maximum of 2 allowed. + * + */ temperature?: float32 = 1; /** -* An alternative to sampling with temperature, called nucleus sampling, where the -* model considers the results of the tokens with top_p probability mass. So 0.1 -* means only the tokens comprising the top 10% probability mass are -* considered. -We generally recommend using this or `temperature` but not -* both. -Minimum of 0 and maximum of 1 allowed. - -*/ + * An alternative to sampling with temperature, called nucleus sampling, where the + * model considers the results of the tokens with top_p probability mass. So 0.1 + * means only the tokens comprising the top 10% probability mass are considered. + * We generally recommend using this or `temperature` but not both. + * Minimum of 0 and maximum of 1 allowed. + * + */ @projectedName("json", "top_p") topP?: float32 = 1; @@ -101,7 +98,7 @@ Minimum of 0 and maximum of 1 allowed. /** * A sequence which indicates the end of the current document. */ - stop?: PostContentSchemaStop; + stop?: unknown; @projectedName("json", "completion_config") completionConfig?: string; @@ -136,22 +133,6 @@ Minimum of 0 and maximum of 1 allowed. bestOf?: int32; } -/** - * An optional prompt to complete from, encoded as a string, a list of strings, or - * a list of token lists. Defaults to <|endoftext|>. The prompt to complete from. - * If you would like to provide multiple prompts, use the POST variant of this - * method. Note that <|endoftext|> is the document separator that the model sees - * during training, so if a prompt is not specified the model will generate as if - * from the beginning of a new document. Maximum allowed size of string list is - * 2048. - */ -model PostContentSchemaPrompt {} - -/** - * A sequence which indicates the end of the current document. - */ -model PostContentSchemaStop {} - model PathsMaorw9DeploymentsDeploymentIdCompletionsPostResponses200ContentApplicationJsonSchema { id?: string; object?: string; @@ -200,7 +181,7 @@ model Paths13PiqocDeploymentsDeploymentIdEmbeddingsPostRequestbodyContentApplica * An input to embed, encoded as a string, a list of strings, or a list of token * lists */ - input: PostContentSchemaInput; + input: unknown; /** * The ID of the end-user, for use in tracking and rate-limiting. @@ -218,9 +199,3 @@ model Paths13PiqocDeploymentsDeploymentIdEmbeddingsPostRequestbodyContentApplica */ `model`?: string; } - -/** - * An input to embed, encoded as a string, a list of strings, or a list of token - * lists - */ -model PostContentSchemaInput {} diff --git a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp index bc2dbe048c..bf5c6e676f 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp @@ -191,12 +191,10 @@ model QnASearchResultContext extends ContextDTO {} */ model ContextDTO { /** -* To mark if a prompt is relevant only with a previous question or not. -true - Do -* not include this QnA as search result for queries without context -false - -* ignores context and includes this QnA in search result -*/ + * To mark if a prompt is relevant only with a previous question or not. + * true - Do not include this QnA as search result for queries without context + * false - ignores context and includes this QnA in search result + */ isContextOnly?: boolean; /** diff --git a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/routes.tsp index 06a5565822..33afd327ba 100644 --- a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/routes.tsp @@ -135,11 +135,11 @@ interface SchemaOperations { >; /** -* Register new schema. If schema of specified name does not exist in specified -* group, schema is created at version 1. If schema of specified name exists -* already in specified group, schema is created at latest version + 1. - -*/ + * Register new schema. If schema of specified name does not exist in specified + * group, schema is created at version 1. If schema of specified name exists + * already in specified group, schema is created at latest version + 1. + * + */ @summary("Register new schema") @route("/$schemaGroups/{groupName}/schemas/{schemaName}") @put From 81026f1b0db074fc2ace9191b683b088f9428e48 Mon Sep 17 00:00:00 2001 From: Chenjie Shi Date: Fri, 9 Feb 2024 08:33:44 +0800 Subject: [PATCH 15/33] add features for conversion (#4871) 1. support new flatten decorator and add `client.tsp`: fix https://github.com/Azure/autorest/issues/4850 2. fix doc comment escape issue: fix #4876 3. support new location resource expression: fix: https://github.com/Azure/autorest/issues/4880 --- .../new_tsp_version_2024-02-08-09-41.json | 10 + common/config/rush/pnpm-lock.yaml | 238 +++++++++--------- .../openapi-to-typespec/package.json | 22 +- .../src/emiters/emit-arm-resources.ts | 4 +- .../src/emiters/emit-client.ts | 23 ++ .../src/emiters/emit-models.ts | 4 +- .../src/emiters/emit-routes.ts | 4 +- .../src/emiters/emit-typespec-config.ts | 1 + .../src/generate/generate-arm-resource.ts | 4 + .../src/generate/generate-client.ts | 16 ++ .../generate/generate-service-information.ts | 4 +- .../openapi-to-typespec/src/interfaces.ts | 9 +- .../openapi-to-typespec/src/main.ts | 2 + .../src/transforms/transform-arm-resources.ts | 26 +- .../src/transforms/transform-object.ts | 4 +- .../src/utils/decorators.ts | 39 ++- .../openapi-to-typespec/src/utils/docs.ts | 9 + .../openapi-to-typespec/src/utils/imports.ts | 18 ++ .../src/utils/namespace.ts | 10 +- .../test/analyzeText/tsp-output/client.tsp | 3 + .../anomalyDetector/tsp-output/client.tsp | 3 + .../test/arm-agrifood/tsp-output/client.tsp | 3 + .../arm-agrifood/tsp-output/tspconfig.yaml | 1 + .../tsp-output/client.tsp | 8 + .../tsp-output/models.tsp | 3 - .../tsp-output/tspconfig.yaml | 1 + .../tsp-output/client.tsp | 8 + .../tsp-output/models.tsp | 3 - .../tsp-output/tspconfig.yaml | 1 + .../ApiManagementServiceResource.tsp | 4 +- .../tsp-output/DeletedServiceContract.tsp | 3 +- .../arm-apimanagement/tsp-output/client.tsp | 143 +++++++++++ .../arm-apimanagement/tsp-output/models.tsp | 48 ---- .../tsp-output/tspconfig.yaml | 1 + .../arm-authorization/tsp-output/client.tsp | 45 ++++ .../arm-authorization/tsp-output/models.tsp | 44 +--- .../tsp-output/tspconfig.yaml | 1 + .../tsp-output/client.tsp | 23 ++ .../tsp-output/models.tsp | 8 - .../tsp-output/tspconfig.yaml | 1 + .../tsp-output/CommunityGallery.tsp | 3 +- .../test/arm-compute/tsp-output/OSFamily.tsp | 3 +- .../test/arm-compute/tsp-output/OSVersion.tsp | 3 +- .../arm-compute/tsp-output/SharedGallery.tsp | 3 +- .../VirtualMachineExtensionImage.tsp | 3 +- .../test/arm-compute/tsp-output/client.tsp | 127 ++++++++++ .../test/arm-compute/tsp-output/models.tsp | 54 +--- .../arm-compute/tsp-output/tspconfig.yaml | 1 + .../test/arm-dns/tsp-output/client.tsp | 11 + .../test/arm-dns/tsp-output/models.tsp | 4 - .../test/arm-dns/tsp-output/tspconfig.yaml | 1 + .../tsp-output/client.tsp | 20 ++ .../tsp-output/models.tsp | 7 - .../tsp-output/tspconfig.yaml | 1 + .../tsp-output/client.tsp | 11 + .../tsp-output/models.tsp | 4 - .../tsp-output/tspconfig.yaml | 1 + .../tsp-output/Quota.tsp | 3 +- .../tsp-output/client.tsp | 8 + .../tsp-output/models.tsp | 3 - .../tsp-output/tspconfig.yaml | 1 + .../tsp-output/client.tsp | 8 + .../tsp-output/models.tsp | 3 - .../tsp-output/tspconfig.yaml | 1 + .../test/arm-sphere/tsp-output/client.tsp | 14 ++ .../test/arm-sphere/tsp-output/models.tsp | 5 - .../test/arm-sphere/tsp-output/tspconfig.yaml | 1 + .../arm-storage/tsp-output/DeletedAccount.tsp | 3 +- .../test/arm-storage/tsp-output/client.tsp | 26 ++ .../test/arm-storage/tsp-output/models.tsp | 9 - .../arm-storage/tsp-output/tspconfig.yaml | 1 + .../test/arm-test/swagger/basic.json | 2 +- .../test/arm-test/tsp-output/client.tsp | 8 + .../test/arm-test/tsp-output/models.tsp | 7 +- .../test/arm-test/tsp-output/tspconfig.yaml | 1 + .../test/batch/tsp-output/client.tsp | 3 + .../test/bodyComplex/tsp-output/client.tsp | 8 + .../test/bodyComplex/tsp-output/models.tsp | 4 - .../test/complexObject/tsp-output/client.tsp | 3 + .../confidentialLedger/tsp-output/client.tsp | 3 + .../test/keyvault/tsp-output/client.tsp | 8 + .../test/keyvault/tsp-output/models.tsp | 3 - .../test/keyvault/tsp-output/routes.tsp | 27 -- .../test/loadTest/tsp-output/client.tsp | 3 + .../test/nh/tsp-output/client.tsp | 3 + .../test/openAI/tsp-output/client.tsp | 3 + .../test/pagination/tsp-output/client.tsp | 3 + .../test/qna/tsp-output/client.tsp | 3 + .../test/qnaAuthoring/tsp-output/client.tsp | 3 + .../test/qnaRuntime/tsp-output/client.tsp | 3 + .../test/schemaRegistry/tsp-output/client.tsp | 3 + .../test/url/tsp-output/client.tsp | 3 + .../test/url/tsp-output/routes.tsp | 100 ++++---- .../test/webpubsub/tsp-output/client.tsp | 3 + 94 files changed, 900 insertions(+), 452 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/new_tsp_version_2024-02-08-09-41.json create mode 100644 packages/extensions/openapi-to-typespec/src/emiters/emit-client.ts create mode 100644 packages/extensions/openapi-to-typespec/src/generate/generate-client.ts create mode 100644 packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/batch/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/nh/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/openAI/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/pagination/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/qna/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/url/tsp-output/client.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/client.tsp diff --git a/common/changes/@autorest/openapi-to-typespec/new_tsp_version_2024-02-08-09-41.json b/common/changes/@autorest/openapi-to-typespec/new_tsp_version_2024-02-08-09-41.json new file mode 100644 index 0000000000..deea80300f --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/new_tsp_version_2024-02-08-09-41.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Support new location resource expression, support new flatten decorator and fix doc escape problem.", + "type": "minor" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index b53509a3f6..be26114149 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -15,14 +15,14 @@ dependencies: specifier: ~3.0.0 version: 3.0.255 '@azure-tools/typespec-autorest': - specifier: ^0.38.0 - version: 0.38.0(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0) + specifier: ^0.39.0 + version: 0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) '@azure-tools/typespec-azure-core': - specifier: ^0.38.0 - version: 0.38.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/rest@0.52.0) + specifier: ^0.39.0 + version: 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0) '@azure-tools/typespec-azure-resource-manager': - specifier: ^0.38.0 - version: 0.38.0(@azure-tools/typespec-autorest@0.38.0)(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0) + specifier: ^0.39.0 + version: 0.39.0(@azure-tools/typespec-autorest@0.39.0)(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) '@azure-tools/uri': specifier: ~3.1.1 version: 3.1.1 @@ -165,26 +165,26 @@ dependencies: specifier: ^6.11.0 version: 6.11.0(eslint@8.53.0)(typescript@5.2.2) '@typespec/compiler': - specifier: ^0.52.0 - version: 0.52.0 + specifier: ^0.53.0 + version: 0.53.0 '@typespec/http': - specifier: ^0.52.0 - version: 0.52.0(@typespec/compiler@0.52.0) + specifier: ^0.53.0 + version: 0.53.0(@typespec/compiler@0.53.0) '@typespec/openapi': - specifier: ^0.52.0 - version: 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) + specifier: ^0.53.0 + version: 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) '@typespec/openapi3': - specifier: ^0.52.0 - version: 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/versioning@0.52.0) + specifier: ^0.53.0 + version: 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/versioning@0.53.0) '@typespec/prettier-plugin-typespec': - specifier: ^0.52.0 - version: 0.52.0 + specifier: ^0.53.0 + version: 0.53.0 '@typespec/rest': - specifier: ^0.52.0 - version: 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) + specifier: ^0.53.0 + version: 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) '@typespec/versioning': - specifier: ^0.52.0 - version: 0.52.0(@typespec/compiler@0.52.0) + specifier: ^0.53.0 + version: 0.53.0(@typespec/compiler@0.53.0) ajv: specifier: ^8.6.0 version: 8.12.0 @@ -393,57 +393,58 @@ packages: engines: {node: '>=10.12.0'} dev: false - /@azure-tools/typespec-autorest@0.38.0(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0): - resolution: {integrity: sha512-lBxuAtmE9kCeafSqwsiAp1sjVTEl4PdxxLq22zbQag2/ISLjVAXCae62+qULzqpY7pbDU03f/4tjvf4W7EPwXQ==} + /@azure-tools/typespec-autorest@0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0): + resolution: {integrity: sha512-jfCPzqroiVD0jHPPJX2IpdC7U0Q2yx5QYzucCp1GcOYKbRKNO3vcIEVHArn9rSKbJQR7IKDozEeubMMHINjsnQ==} engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-azure-core': ~0.38.0 - '@typespec/compiler': ~0.52.0 - '@typespec/http': ~0.52.0 - '@typespec/openapi': ~0.52.0 - '@typespec/rest': ~0.52.0 - '@typespec/versioning': ~0.52.0 - dependencies: - '@azure-tools/typespec-azure-core': 0.38.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/rest@0.52.0) - '@typespec/compiler': 0.52.0 - '@typespec/http': 0.52.0(@typespec/compiler@0.52.0) - '@typespec/openapi': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) - '@typespec/rest': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) - '@typespec/versioning': 0.52.0(@typespec/compiler@0.52.0) - dev: false - - /@azure-tools/typespec-azure-core@0.38.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/rest@0.52.0): - resolution: {integrity: sha512-ASM+njC2lpzPykzw2OicWIaAOH+OBe3bVMrufEnINBjlr7owAtudvjrTLLWmAVMBciL/YOF579KdyjxTbaxJ5A==} + '@azure-tools/typespec-azure-core': ~0.39.0 + '@azure-tools/typespec-client-generator-core': ~0.39.0 + '@typespec/compiler': ~0.53.0 + '@typespec/http': ~0.53.0 + '@typespec/openapi': ~0.53.0 + '@typespec/rest': ~0.53.0 + '@typespec/versioning': ~0.53.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0) + '@typespec/compiler': 0.53.0 + '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) + '@typespec/openapi': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) + '@typespec/rest': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) + '@typespec/versioning': 0.53.0(@typespec/compiler@0.53.0) + dev: false + + /@azure-tools/typespec-azure-core@0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0): + resolution: {integrity: sha512-M7CwPdTRUu6jGiEbZg4K/ikUjJxoBJ8ii393dDoxCBhwsYElRm7rCtdzuLJ584gSNZkGtR/1Jd2wl3xRoaCqXg==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.52.0 - '@typespec/http': ~0.52.0 - '@typespec/rest': ~0.52.0 + '@typespec/compiler': ~0.53.0 + '@typespec/http': ~0.53.0 + '@typespec/rest': ~0.53.0 dependencies: - '@typespec/compiler': 0.52.0 - '@typespec/http': 0.52.0(@typespec/compiler@0.52.0) - '@typespec/rest': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) + '@typespec/compiler': 0.53.0 + '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) + '@typespec/rest': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) dev: false - /@azure-tools/typespec-azure-resource-manager@0.38.0(@azure-tools/typespec-autorest@0.38.0)(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0): - resolution: {integrity: sha512-jWMwIzT5WCokIW0IOTi/yqc5UsO47Mw+k9CGBwSmggYug/hmDELz+AfNyL/0T+rM2eF+5R/IrMKFI4Hq/OE9vQ==} + /@azure-tools/typespec-azure-resource-manager@0.39.0(@azure-tools/typespec-autorest@0.39.0)(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0): + resolution: {integrity: sha512-vX7Xxg5lnSxFArVFR7MTLqGJkiYuwaaA6w2q4N735kAgfGe+VFpOF/EqkChGnz4/iqDSDMwT3cr39oV4tmJnPw==} engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-autorest': ~0.38.0 - '@azure-tools/typespec-azure-core': ~0.38.0 - '@typespec/compiler': ~0.52.0 - '@typespec/http': ~0.52.0 - '@typespec/openapi': ~0.52.0 - '@typespec/rest': ~0.52.0 - '@typespec/versioning': ~0.52.0 - dependencies: - '@azure-tools/typespec-autorest': 0.38.0(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0) - '@azure-tools/typespec-azure-core': 0.38.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/rest@0.52.0) - '@typespec/compiler': 0.52.0 - '@typespec/http': 0.52.0(@typespec/compiler@0.52.0) - '@typespec/openapi': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) - '@typespec/rest': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) - '@typespec/versioning': 0.52.0(@typespec/compiler@0.52.0) + '@azure-tools/typespec-autorest': ~0.39.0 + '@azure-tools/typespec-azure-core': ~0.39.0 + '@typespec/compiler': ~0.53.0 + '@typespec/http': ~0.53.0 + '@typespec/openapi': ~0.53.0 + '@typespec/rest': ~0.53.0 + '@typespec/versioning': ~0.53.0 + dependencies: + '@azure-tools/typespec-autorest': 0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) + '@azure-tools/typespec-azure-core': 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0) + '@typespec/compiler': 0.53.0 + '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) + '@typespec/openapi': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) + '@typespec/rest': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) + '@typespec/versioning': 0.53.0(@typespec/compiler@0.53.0) dev: false /@azure-tools/uri@3.1.1: @@ -472,14 +473,6 @@ packages: '@babel/highlight': 7.22.20 dev: false - /@babel/code-frame@7.22.13: - resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.22.20 - chalk: 2.4.2 - dev: false - /@babel/code-frame@7.23.5: resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} engines: {node: '>=6.9.0'} @@ -498,7 +491,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.22.13 + '@babel/code-frame': 7.23.5 '@babel/generator': 7.23.3 '@babel/helper-compilation-targets': 7.22.15 '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.3) @@ -780,7 +773,7 @@ packages: resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.13 + '@babel/code-frame': 7.23.5 '@babel/parser': 7.23.3 '@babel/types': 7.23.3 dev: false @@ -789,7 +782,7 @@ packages: resolution: {integrity: sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.13 + '@babel/code-frame': 7.23.5 '@babel/generator': 7.23.3 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 @@ -1772,8 +1765,8 @@ packages: eslint-visitor-keys: 3.4.3 dev: false - /@typespec/compiler@0.52.0: - resolution: {integrity: sha512-36cZ5RWxRjL4SUe41KjPh3j3RQibpUoOzHcSllQJ3ByTSZdXv1zckMHLiRfaAbTXUADSAn2GMs4ZO3s8GdOGIQ==} + /@typespec/compiler@0.53.0: + resolution: {integrity: sha512-07zb6mXwMX7ps7q+ubwBNb8Vz4ewmqrymAwnWZcl40r2VMsyZIQZM9ZPao87imCA+fWiPOKblIzRB7OVq3XOPg==} engines: {node: '>=18.0.0'} hasBin: true dependencies: @@ -1792,66 +1785,66 @@ packages: yargs: 17.7.2 dev: false - /@typespec/http@0.52.0(@typespec/compiler@0.52.0): - resolution: {integrity: sha512-8UluHzYV3zZFSRuKYeQombaJzYMAq8lcM7ysOY6zxmagRxv/L2LAG5iMu7iSrM48I7PR+WVhXSonRA0xhHctfw==} + /@typespec/http@0.53.0(@typespec/compiler@0.53.0): + resolution: {integrity: sha512-Hdwbxr6KgzmJdULbbcwWaSSrWlduuMuEVUVdlytxyo9K+aoUCcPl0thR5Ez2VRh02/IJl3xG4n5wXgOwWb3amA==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.52.0 + '@typespec/compiler': ~0.53.0 dependencies: - '@typespec/compiler': 0.52.0 + '@typespec/compiler': 0.53.0 dev: false - /@typespec/openapi3@0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/versioning@0.52.0): - resolution: {integrity: sha512-PPhNdpKQD2iHJemOaRUhnaeFWa4ApW4HtcZI+jrg4hyNSIwDYxL0OwwRohKjRUKM98iacpXvEh+5rKtkPiY2Qw==} + /@typespec/openapi3@0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/versioning@0.53.0): + resolution: {integrity: sha512-wcgwYJP/UPwuYlJbCSbhI3+G+RnZaaj5xwUEDD2QPkIhIiwhETyuXaN0ZFTSQWUTmypXt/e21KPUwHO03RpIdA==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.52.0 - '@typespec/http': ~0.52.0 - '@typespec/openapi': ~0.52.0 - '@typespec/versioning': ~0.52.0 - dependencies: - '@typespec/compiler': 0.52.0 - '@typespec/http': 0.52.0(@typespec/compiler@0.52.0) - '@typespec/openapi': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) - '@typespec/versioning': 0.52.0(@typespec/compiler@0.52.0) + '@typespec/compiler': ~0.53.0 + '@typespec/http': ~0.53.0 + '@typespec/openapi': ~0.53.0 + '@typespec/versioning': ~0.53.0 + dependencies: + '@typespec/compiler': 0.53.0 + '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) + '@typespec/openapi': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) + '@typespec/versioning': 0.53.0(@typespec/compiler@0.53.0) yaml: 2.3.4 dev: false - /@typespec/openapi@0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0): - resolution: {integrity: sha512-2Otnu9glehxvp6TU7NOHEniBDDKufV03XTmeVGgGEmu/j+cveAMg8lA1/O0RBpS2oHGsCFnMEuPcR8M1c0LI+Q==} + /@typespec/openapi@0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0): + resolution: {integrity: sha512-FRHb6Wi4Yf1HGm3EnhhXZ0Bw+EIPam6ptxRy7NDRxyMnzHsOphGcv8mDIZk6MPSy8xPasbFNwaRC1TXpxVhQBw==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.52.0 - '@typespec/http': ~0.52.0 + '@typespec/compiler': ~0.53.0 + '@typespec/http': ~0.53.0 dependencies: - '@typespec/compiler': 0.52.0 - '@typespec/http': 0.52.0(@typespec/compiler@0.52.0) + '@typespec/compiler': 0.53.0 + '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) dev: false - /@typespec/prettier-plugin-typespec@0.52.0: - resolution: {integrity: sha512-6l4LylxfCVvAdbCiqFqJwPYyRkzV+TjZ/gQsOPqNlqxTDsMq61A6QT01BSftocJWRTFdSXP4Z3r2LP9E8FoNrg==} + /@typespec/prettier-plugin-typespec@0.53.0: + resolution: {integrity: sha512-ARLKZubDWKafpHavrtBrGtwkmisuBIsZGqpBrZPGQ5NTS8KAWSCAkouZ+HvDZ+S17kP/a3kADJnxgKhQMTmjEA==} dependencies: prettier: 3.1.1 dev: false - /@typespec/rest@0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0): - resolution: {integrity: sha512-dLsY0fS60IVaAt4eCRcvEqorX/miPVV33du3dETTYYmbHtfEbvBKgTj/m6OH4noey7oaihlvLz5kYyLv8Am7zA==} + /@typespec/rest@0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0): + resolution: {integrity: sha512-aA75Ol2pRvUjtRqQvFHmFG52pkeif3m+tboLAT00AekTxOPZ3rqQmlE12ne4QF8KjgHA6denqH4f/XyDoRJOJQ==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.52.0 - '@typespec/http': ~0.52.0 + '@typespec/compiler': ~0.53.0 + '@typespec/http': ~0.53.0 dependencies: - '@typespec/compiler': 0.52.0 - '@typespec/http': 0.52.0(@typespec/compiler@0.52.0) + '@typespec/compiler': 0.53.0 + '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) dev: false - /@typespec/versioning@0.52.0(@typespec/compiler@0.52.0): - resolution: {integrity: sha512-Vr4WHaZiDOxJqRp8/u6X0R45E+rFKEprYmSZX0o5bzetj0cVjOIEbQZvDJCif1Uz0S3K0KKfqf/kYmdYWMJ7Dw==} + /@typespec/versioning@0.53.0(@typespec/compiler@0.53.0): + resolution: {integrity: sha512-nrrLXCWPDrrClAfpCMzQ3YPTbKQmjPC3LSeMjq+wPiMq+1PW95ulOGD4QiCBop+4wKhMCJHnqqSzVauT1LjdvQ==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.52.0 + '@typespec/compiler': ~0.53.0 dependencies: - '@typespec/compiler': 0.52.0 + '@typespec/compiler': 0.53.0 dev: false /@ungap/structured-clone@1.2.0: @@ -5162,7 +5155,7 @@ packages: resolution: {integrity: sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==} engines: {node: '>= 10.14.2'} dependencies: - '@babel/code-frame': 7.22.13 + '@babel/code-frame': 7.23.5 '@jest/types': 26.6.2 '@types/stack-utils': 2.0.3 chalk: 4.1.2 @@ -5177,7 +5170,7 @@ packages: resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.22.13 + '@babel/code-frame': 7.23.5 '@jest/types': 29.6.3 '@types/stack-utils': 2.0.3 chalk: 4.1.2 @@ -6598,7 +6591,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.22.13 + '@babel/code-frame': 7.23.5 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -9410,14 +9403,14 @@ packages: dev: false file:projects/openapi-to-typespec.tgz(jest@29.7.0): - resolution: {integrity: sha512-KvfNMg+QS2PURPUPNr32nxEeDtcKBbiOIitXRN55kRdADozPRn83lfm8IBi6OTDajBw5nfv6UOWT163f0jfqcw==, tarball: file:projects/openapi-to-typespec.tgz} + resolution: {integrity: sha512-iVH6kegt5UtBjQgeWeabDI/24my7TkNLpazOi2HQumK3e4H0EVV5vygE1RPNoq/oFuYqlgV6/n6OmUQRyaM5aQ==, tarball: file:projects/openapi-to-typespec.tgz} id: file:projects/openapi-to-typespec.tgz name: '@rush-temp/openapi-to-typespec' version: 0.0.0 dependencies: - '@azure-tools/typespec-autorest': 0.38.0(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0) - '@azure-tools/typespec-azure-core': 0.38.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/rest@0.52.0) - '@azure-tools/typespec-azure-resource-manager': 0.38.0(@azure-tools/typespec-autorest@0.38.0)(@azure-tools/typespec-azure-core@0.38.0)(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/rest@0.52.0)(@typespec/versioning@0.52.0) + '@azure-tools/typespec-autorest': 0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) + '@azure-tools/typespec-azure-core': 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0) + '@azure-tools/typespec-azure-resource-manager': 0.39.0(@azure-tools/typespec-autorest@0.39.0)(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) '@types/fs-extra': 9.0.13 '@types/lodash': 4.14.201 '@types/node': 20.9.0 @@ -9426,13 +9419,13 @@ packages: '@types/webpack': 5.28.5(webpack-cli@5.1.4) '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) - '@typespec/compiler': 0.52.0 - '@typespec/http': 0.52.0(@typespec/compiler@0.52.0) - '@typespec/openapi': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) - '@typespec/openapi3': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0)(@typespec/openapi@0.52.0)(@typespec/versioning@0.52.0) - '@typespec/prettier-plugin-typespec': 0.52.0 - '@typespec/rest': 0.52.0(@typespec/compiler@0.52.0)(@typespec/http@0.52.0) - '@typespec/versioning': 0.52.0(@typespec/compiler@0.52.0) + '@typespec/compiler': 0.53.0 + '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) + '@typespec/openapi': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) + '@typespec/openapi3': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/versioning@0.53.0) + '@typespec/prettier-plugin-typespec': 0.53.0 + '@typespec/rest': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) + '@typespec/versioning': 0.53.0(@typespec/compiler@0.53.0) chalk: 4.1.2 change-case: 5.0.2 change-case-all: 2.1.0 @@ -9453,6 +9446,7 @@ packages: webpack: 5.89.0(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack@5.89.0) transitivePeerDependencies: + - '@azure-tools/typespec-client-generator-core' - '@swc/core' - '@swc/wasm' - '@types/eslint' diff --git a/packages/extensions/openapi-to-typespec/package.json b/packages/extensions/openapi-to-typespec/package.json index a268ce1973..13fef86712 100644 --- a/packages/extensions/openapi-to-typespec/package.json +++ b/packages/extensions/openapi-to-typespec/package.json @@ -41,16 +41,16 @@ "@azure-tools/codegen": "~2.10.0", "@autorest/extension-base": "~3.6.0", "@autorest/codemodel": "~4.20.0", - "@typespec/compiler": "^0.52.0", - "@typespec/rest": "^0.52.0", - "@typespec/http": "^0.52.0", - "@typespec/versioning": "^0.52.0", - "@typespec/prettier-plugin-typespec": "^0.52.0", - "@azure-tools/typespec-azure-core": "^0.38.0", - "@azure-tools/typespec-autorest": "^0.38.0", - "@azure-tools/typespec-azure-resource-manager": "^0.38.0", - "@typespec/openapi": "^0.52.0", - "@typespec/openapi3": "^0.52.0", + "@typespec/compiler": "^0.53.0", + "@typespec/rest": "^0.53.0", + "@typespec/http": "^0.53.0", + "@typespec/versioning": "^0.53.0", + "@typespec/prettier-plugin-typespec": "^0.53.0", + "@azure-tools/typespec-azure-core": "^0.39.0", + "@azure-tools/typespec-autorest": "^0.39.0", + "@azure-tools/typespec-azure-resource-manager": "^0.39.0", + "@typespec/openapi": "^0.53.0", + "@typespec/openapi3": "^0.53.0", "prettier": "~3.1.0", "lodash": "~4.17.20", "pluralize": "^8.0.0", @@ -67,7 +67,7 @@ "fs-extra": "^10.1.0", "@types/fs-extra": "^9.0.13", "chalk": "^4.1.0", - "@azure-tools/typespec-autorest": "^0.38.0", + "@azure-tools/typespec-autorest": "^0.39.0", "webpack-cli": "~5.1.4", "webpack": "~5.89.0", "@typescript-eslint/eslint-plugin": "^6.11.0", diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts index ecb48369f6..74b5ea176c 100644 --- a/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts @@ -3,7 +3,7 @@ import { getSession } from "../autorest-session"; import { generateArmResource, generateArmResourceExamples } from "../generate/generate-arm-resource"; import { TypespecProgram, TspArmResource } from "../interfaces"; import { formatTypespecFile } from "../utils/format"; -import { getNamespace } from "../utils/namespace"; +import { getNamespaceStatement } from "../utils/namespace"; export async function emitArmResources(program: TypespecProgram, basePath: string) { // Create a file per resource @@ -18,7 +18,7 @@ export async function emitArmResources(program: TypespecProgram, basePath: strin "\n", namespaces.join("\n"), "\n", - getNamespace(program), + getNamespaceStatement(program), generatedResource, ].join("\n"); session.writeFile({ filename: filePath, content: await formatTypespecFile(content, filePath) }); diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-client.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-client.ts new file mode 100644 index 0000000000..a7aa5120c4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-client.ts @@ -0,0 +1,23 @@ +import { getSession } from "../autorest-session"; +import { generateObjectClientDecorator } from "../generate/generate-client"; +import { TypespecProgram } from "../interfaces"; +import { formatTypespecFile } from "../utils/format"; +import { getClientImports } from "../utils/imports"; +import { getNamespace } from "../utils/namespace"; + +export async function emitClient(filePath: string, program: TypespecProgram): Promise { + const content = generateClient(program); + + const session = getSession(); + session.writeFile({ filename: filePath, content: await formatTypespecFile(content, filePath) }); +} + +function generateClient(program: TypespecProgram) { + const { models } = program; + const { modules, namespaces: namespacesSet } = getClientImports(program); + const imports = [...new Set([`import "./main.tsp";`, ...modules])].join("\n"); + + const namespaces = [...new Set([...namespacesSet, `using ${getNamespace(program)};`])].join("\n"); + const objects = models.objects.map(generateObjectClientDecorator).join("\n\n"); + return [imports, "\n", namespaces, "\n", objects].join("\n"); +} diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-models.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-models.ts index c729dafc87..1489258290 100644 --- a/packages/extensions/openapi-to-typespec/src/emiters/emit-models.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-models.ts @@ -5,7 +5,7 @@ import { TypespecEnum, TypespecProgram } from "../interfaces"; import { getOptions } from "../options"; import { formatTypespecFile } from "../utils/format"; import { getModelsImports } from "../utils/imports"; -import { getNamespace } from "../utils/namespace"; +import { getNamespaceStatement } from "../utils/namespace"; export async function emitModels(filePath: string, program: TypespecProgram): Promise { const content = generateModels(program); @@ -32,7 +32,7 @@ function generateModels(program: TypespecProgram) { "\n", namespaces, "\n", - getNamespace(program), + getNamespaceStatement(program), isArm ? "\ninterface Operations extends Azure.ResourceManager.Operations {} \n" : "\n", enums, "\n", diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-routes.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-routes.ts index d8a4b5556d..31a4e7082e 100644 --- a/packages/extensions/openapi-to-typespec/src/emiters/emit-routes.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-routes.ts @@ -3,7 +3,7 @@ import { generateOperationGroup } from "../generate/generate-operations"; import { TypespecProgram } from "../interfaces"; import { formatTypespecFile } from "../utils/format"; import { getRoutesImports } from "../utils/imports"; -import { getNamespace } from "../utils/namespace"; +import { getNamespaceStatement } from "../utils/namespace"; export async function emitRoutes(filePath: string, program: TypespecProgram): Promise { if (program.operationGroups.length === 0) { @@ -19,5 +19,5 @@ function generateRoutes(program: TypespecProgram) { const { modules, namespaces } = getRoutesImports(program); const content = operationGroups.map(generateOperationGroup); - return [...modules, "\n", ...namespaces, "\n", getNamespace(program), "\n", ...content].join("\n"); + return [...modules, "\n", ...namespaces, "\n", getNamespaceStatement(program), "\n", ...content].join("\n"); } diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts index f89e847534..f657addc87 100644 --- a/packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-typespec-config.ts @@ -39,6 +39,7 @@ export async function emitTypespecConfig(filePath: string, programDetails: Types options: '@azure-tools/typespec-autorest': use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/${swaggerName}" diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts index 0f70257abf..76496cf547 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts @@ -46,6 +46,10 @@ function generateArmResourceModel(resource: TspArmResource): string { definitions.push(`@parentResource(${resource.resourceParent.name})`); } + if (resource.locationParent) { + definitions.push(`@parentResource("${resource.locationParent}")`); + } + if ( getArmCommonTypeVersion() && !resource.propertiesPropertyRequired && diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-client.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-client.ts new file mode 100644 index 0000000000..0be75bbf2f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-client.ts @@ -0,0 +1,16 @@ +import { TypespecObject } from "../interfaces"; +import { generateAugmentedDecorators } from "../utils/decorators"; + +export function generateObjectClientDecorator(typespecObject: TypespecObject) { + const definitions: string[] = []; + + for (const property of typespecObject.properties) { + const decorators = generateAugmentedDecorators( + `${typespecObject.name}.${property.name}`, + property.augmentedDecorators, + ); + decorators && definitions.push(decorators); + } + + return definitions.join("\n"); +} diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts index a8b3c7463c..41e3dcbcc5 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts @@ -1,7 +1,7 @@ import { TypespecProgram, EndpointParameter, Auth } from "../interfaces"; import { getOptions } from "../options"; import { generateDocs } from "../utils/docs"; -import { getNamespace } from "../utils/namespace"; +import { getNamespaceStatement } from "../utils/namespace"; const VALID_VERSIONS = ["v3", "v4", "v5"]; @@ -62,7 +62,7 @@ export function generateServiceInformation(program: TypespecProgram) { const serviceDoc = generateDocs(serviceInformation); serviceDoc && definitions.push(serviceDoc); - definitions.push(getNamespace(program)); + definitions.push(getNamespaceStatement(program)); if (serviceInformation.versions) { definitions.push(""); diff --git a/packages/extensions/openapi-to-typespec/src/interfaces.ts b/packages/extensions/openapi-to-typespec/src/interfaces.ts index 782c02e696..2a3c4d6507 100644 --- a/packages/extensions/openapi-to-typespec/src/interfaces.ts +++ b/packages/extensions/openapi-to-typespec/src/interfaces.ts @@ -125,6 +125,11 @@ export interface WithFixMe { fixMe?: string[]; } +export interface WithSuppressDirective { + suppressionCode?: string; + suppressionMessage?: string; +} + export type TypespecParameterLocation = "path" | "query" | "header" | "body"; export interface TypespecParameter extends TypespecDataType { kind: "parameter"; @@ -141,10 +146,11 @@ export interface TypespecObjectProperty extends TypespecDataType { isOptional: boolean; type: string; decorators?: TypespecDecorator[]; + augmentedDecorators?: TypespecDecorator[]; defaultValue?: any; } -export interface TypespecDecorator extends WithFixMe { +export interface TypespecDecorator extends WithFixMe, WithSuppressDirective { name: string; arguments?: (string | number)[] | DecoratorArgument[]; module?: string; @@ -248,4 +254,5 @@ export interface TspArmResource extends TypespecObject { normalOperations: TypespecOperation[]; optionalStandardProperties: string[]; baseModelName?: string; + locationParent?: string; } diff --git a/packages/extensions/openapi-to-typespec/src/main.ts b/packages/extensions/openapi-to-typespec/src/main.ts index a579fce5ab..a46bd6274f 100644 --- a/packages/extensions/openapi-to-typespec/src/main.ts +++ b/packages/extensions/openapi-to-typespec/src/main.ts @@ -7,6 +7,7 @@ import { AutoRestExtension, AutorestExtensionHost, Session, startSession } from import { OpenAPI3Document } from "@azure-tools/openapi"; import { setArmCommonTypeVersion, setSession } from "./autorest-session"; import { emitArmResources } from "./emiters/emit-arm-resources"; +import { emitClient } from "./emiters/emit-client"; import { emitMain } from "./emiters/emit-main"; import { emitModels } from "./emiters/emit-models"; @@ -36,6 +37,7 @@ export async function processConverter(host: AutorestExtensionHost) { await emitMain(getFilePath(session, "main.tsp"), programDetails); await emitPackage(getFilePath(session, "package.json"), programDetails); await emitTypespecConfig(getFilePath(session, "tspconfig.yaml"), programDetails); + await emitClient(getFilePath(session, "client.tsp"), programDetails); } function getOutuptDirectory(session: Session) { diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts index 476cb76019..e3cb2c9187 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts @@ -123,6 +123,7 @@ export function transformTspArmResource(schema: ArmResourceSchema): TspArmResour normalOperations: operations[1], optionalStandardProperties: getArmCommonTypeVersion() ? getResourceOptionalStandardProperties(schema) : [], baseModelName, + locationParent: getLocationParent(schema), }; } @@ -838,16 +839,9 @@ function buildResourceDecorators(schema: ArmResourceSchema): TypespecDecorator[] name: "tenantResource", }); } else if (schema.resourceMetadata.IsSubscriptionResource) { - // TODO: need to change after TSP support location resource for other resource types - if (schema.resourceMetadata.GetOperations[0].Path.includes("/locations/")) { - resourceModelDecorators.push({ - name: "locationResource", - }); - } else { - resourceModelDecorators.push({ - name: "subscriptionResource", - }); - } + resourceModelDecorators.push({ + name: "subscriptionResource", + }); } return resourceModelDecorators; @@ -866,3 +860,15 @@ function getSingletonName(schema: ArmResourceSchema): string { } return key; } + +function getLocationParent(schema: ArmResourceSchema): string | undefined { + if (schema.resourceMetadata.GetOperations[0].Path.includes("/locations/")) { + if (schema.resourceMetadata.IsTenantResource) { + return "TenantLocationResource"; + } else if (schema.resourceMetadata.IsSubscriptionResource) { + return "SubscriptionLocationResource"; + } else if (schema.resourceMetadata.Parents?.[0] === "ResourceGroupResource") { + return "ResourceGroupLocationResource"; + } + } +} diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts index 0250bbea93..cc7d6bd64d 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts @@ -14,7 +14,7 @@ import { get } from "lodash"; import { getDataTypes } from "../data-types"; import { TypespecObject, TypespecObjectProperty } from "../interfaces"; import { addCorePageAlias } from "../utils/alias"; -import { getModelDecorators, getPropertyDecorators } from "../utils/decorators"; +import { getModelDecorators, getPropertyAugmentedDecorators, getPropertyDecorators } from "../utils/decorators"; import { getDiscriminator, getOwnDiscriminator } from "../utils/discriminator"; import { getLogger } from "../utils/logger"; import { @@ -127,6 +127,7 @@ export function transformObjectProperty(propertySchema: Property, codeModel: Cod isOptional: propertySchema.required !== true, type: visited.name, decorators: getPropertyDecorators(propertySchema), + augmentedDecorators: getPropertyAugmentedDecorators(propertySchema), defaultValue: getDefaultValue(visited.name, propertySchema.schema), }; } @@ -143,6 +144,7 @@ export function transformObjectProperty(propertySchema: Property, codeModel: Cod isOptional: propertySchema.required !== true, type, decorators: getPropertyDecorators(propertySchema), + augmentedDecorators: getPropertyAugmentedDecorators(propertySchema), fixMe: getFixme(propertySchema, codeModel), defaultValue: getDefaultValue(type, propertySchema.schema), }; diff --git a/packages/extensions/openapi-to-typespec/src/utils/decorators.ts b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts index ed9257c144..a06d07a50e 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/decorators.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts @@ -137,12 +137,19 @@ export function getPropertyDecorators(element: Property | Parameter): TypespecDe }); } + return decorators; +} + +export function getPropertyAugmentedDecorators(element: Property | Parameter): TypespecDecorator[] { + const decorators: TypespecDecorator[] = []; + if (element.extensions?.["x-ms-client-flatten"]) { decorators.push({ - name: "extension", - arguments: [{ value: `"x-ms-client-flatten"` }, { value: "true" }], - module: "@typespec/openapi", - namespace: "TypeSpec.OpenAPI", + name: "flattenProperty", + module: "@typespec/typespec-client-generator-core", + namespace: "Azure.ClientGenerator.Core", + suppressionCode: "deprecated", + suppressionMessage: "@flattenProperty decorator is not recommended to use.", }); } @@ -239,6 +246,9 @@ export function generateDecorators(decorators: TypespecDecorator[] = []): string if (decorator.fixMe) { definitions.push(decorator.fixMe.join(`\n`)); } + if (decorator.suppressionCode) { + definitions.push(`#suppress "${decorator.suppressionCode}" "${decorator.suppressionMessage}"`); + } if (decorator.arguments) { definitions.push(`@${decorator.name}(${decorator.arguments.map((a) => getArgumentValue(a)).join(", ")})`); } else { @@ -249,6 +259,27 @@ export function generateDecorators(decorators: TypespecDecorator[] = []): string return definitions.join("\n"); } +export function generateAugmentedDecorators(keyName: string, decorators: TypespecDecorator[] = []): string { + const definitions: string[] = []; + for (const decorator of decorators ?? []) { + if (decorator.fixMe) { + definitions.push(decorator.fixMe.join(`\n`)); + } + if (decorator.suppressionCode) { + definitions.push(`#suppress "${decorator.suppressionCode}" "${decorator.suppressionMessage}"`); + } + if (decorator.arguments) { + definitions.push( + `@@${decorator.name}(${keyName}, ${decorator.arguments.map((a) => getArgumentValue(a)).join(", ")})`, + ); + } else { + definitions.push(`@@${decorator.name}(${keyName})`); + } + } + + return definitions.join("\n"); +} + function getArgumentValue(argument: DecoratorArgument | string | number): string { if (typeof argument === "string") { return `"${argument}"`; diff --git a/packages/extensions/openapi-to-typespec/src/utils/docs.ts b/packages/extensions/openapi-to-typespec/src/utils/docs.ts index 6ca73c2176..6cca120209 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/docs.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/docs.ts @@ -12,6 +12,15 @@ export function generateDocs({ doc }: WithDocs): string { const wrapped = lineWrap(doc); + for (let i = 0; i < wrapped.length; i++) { + if (wrapped[i].includes("@") || wrapped[i].includes("*/")) { + if (wrapped.length === 1) { + return `@doc("${wrapped[0].replace(/\\/g, "\\\\").replace(/"/g, '\\"')}")`; + } + return `@doc("""\n${wrapped.join("\n").replace(/\\/g, "\\\\").replace(/"/g, '\\"')}\n""")`; + } + } + return `/**\n* ${wrapped.join("\n* ")}\n*/`; } diff --git a/packages/extensions/openapi-to-typespec/src/utils/imports.ts b/packages/extensions/openapi-to-typespec/src/utils/imports.ts index f2aa87e622..c51c52cd23 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/imports.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/imports.ts @@ -43,6 +43,24 @@ export function getModelsImports(program: TypespecProgram) { }; } +export function getClientImports(program: TypespecProgram) { + const modules = new Set(); + const namespaces = new Set(); + for (const model of program.models.objects) { + for (const property of model.properties) { + for (const decorator of property.augmentedDecorators ?? []) { + decorator.module && modules.add(`import "${decorator.module}";`); + decorator.namespace && namespaces.add(`using ${decorator.namespace};`); + } + } + } + + return { + modules: [...modules], + namespaces: [...namespaces], + }; +} + export function getRoutesImports(_program: TypespecProgram) { const modules = new Set(); const namespaces = new Set(); diff --git a/packages/extensions/openapi-to-typespec/src/utils/namespace.ts b/packages/extensions/openapi-to-typespec/src/utils/namespace.ts index 1723f3d8d9..4a54d18800 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/namespace.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/namespace.ts @@ -1,10 +1,12 @@ import { TypespecProgram } from "../interfaces"; import { getOptions } from "../options"; -export function getNamespace(program: TypespecProgram) { - let { namespace } = getOptions(); +export function getNamespaceStatement(program: TypespecProgram) { + return `namespace ${getNamespace(program)};`; +} - namespace = namespace ?? program.serviceInformation.name.replace(/ /g, "").replace(/-/g, ""); +export function getNamespace(program: TypespecProgram) { + const { namespace } = getOptions(); - return `namespace ${namespace};`; + return namespace ?? program.serviceInformation.name.replace(/ /g, "").replace(/-/g, ""); } diff --git a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/client.tsp new file mode 100644 index 0000000000..351ef61b80 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using Azure.Language.Authoring; diff --git a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/client.tsp new file mode 100644 index 0000000000..bd9016fa17 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using AnomalyDetectorClient; diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/client.tsp new file mode 100644 index 0000000000..4b16e4947c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using Azure.ResourceManager.AgFoodPlatform; diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/tspconfig.yaml index 93e9820d7f..cf72afecdc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/tspconfig.yaml @@ -3,6 +3,7 @@ emit: options: "@azure-tools/typespec-autorest": use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/agfood.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/client.tsp new file mode 100644 index 0000000000..b1676704ea --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/client.tsp @@ -0,0 +1,8 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Azure.ResourceManager.AlertsManagement; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(PatchObject.properties); diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp index b151032ea2..7ea8f71dd1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp @@ -1,13 +1,11 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; -import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; -using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -386,7 +384,6 @@ model PatchObject { /** * Properties supported by patch operation. */ - @extension("x-ms-client-flatten", true) properties?: PatchProperties; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml index 2faa332586..3c7a890db8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml @@ -3,6 +3,7 @@ emit: options: "@azure-tools/typespec-autorest": use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/client.tsp new file mode 100644 index 0000000000..7abe03b4f4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/client.tsp @@ -0,0 +1,8 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Azure.ResourceManager.Analysis; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(AnalysisServicesServerUpdateParameters.properties); diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp index d18e8b1814..f2ffa6e138 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp @@ -1,13 +1,11 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; -import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; -using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -301,7 +299,6 @@ model AnalysisServicesServerUpdateParameters { /** * Properties of the provision operation request. */ - @extension("x-ms-client-flatten", true) properties?: AnalysisServicesServerMutableProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml index 7f5e93e7ef..a1d2b76113 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml @@ -3,6 +3,7 @@ emit: options: "@azure-tools/typespec-autorest": use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/analysisservices.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp index 54bff98315..352a728685 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp @@ -756,9 +756,7 @@ interface ApiManagementServiceResources { @path serviceName: string; - /** - * Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible by "ba" key - */ + @doc("Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key=\"boo\" in the policy, then it’s accessible by \"boo\" counter key. But if it’s defined as counter-key=\"@(\"b\"+\"a\")\" then it will be accessible by \"ba\" key") @path quotaCounterKey: string; diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp index a4622feb7b..60d78184c0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp @@ -16,7 +16,8 @@ namespace Azure.ResourceManager.ApiManagement; */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" -@locationResource +@subscriptionResource +@parentResource("SubscriptionLocationResource") @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal( DeletedServiceContractProperties diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/client.tsp new file mode 100644 index 0000000000..74d62021b8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/client.tsp @@ -0,0 +1,143 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Azure.ResourceManager.ApiManagement; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ApiCreateOrUpdateParameter.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ApiUpdateContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(OperationUpdateContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(SchemaContractProperties.document); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(IssueUpdateContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(TagDescriptionCreateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ApiVersionSetUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(AuthorizationServerUpdateContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(BackendUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(BackendReconnectContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(CacheUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(CertificateCreateOrUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ContentTypeContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ContentItemContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(RemotePrivateEndpointConnectionWrapper.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ApiManagementServiceUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(EmailTemplateUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(AssociationContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(GroupCreateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(GroupUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(IdentityProviderCreateContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(IdentityProviderUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(LoggerUpdateContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(NamedValueCreateContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(NamedValueUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(RecipientUserContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(RecipientEmailContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(OpenidConnectProviderUpdateContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(PolicyDescriptionContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(PortalSettingsContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ProductUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(QuotaCounterValueUpdateContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(GlobalSchemaContractProperties.document); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(SubscriptionCreateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(SubscriptionUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(TagCreateUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(AccessInformationCreateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(AccessInformationUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(DeployConfigurationParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(OperationResultContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(SaveConfigurationParameter.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(TenantConfigurationSyncStateContract.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(UserCreateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(UserUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(UserTokenParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(QuotaCounterValueContract.value); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp index 8b9cbbf6e5..a5914ea526 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp @@ -1,13 +1,11 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; -import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; -using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -1320,7 +1318,6 @@ model ApiCreateOrUpdateParameter { /** * API entity create of update properties. */ - @extension("x-ms-client-flatten", true) properties?: ApiCreateOrUpdateProperties; } @@ -1376,7 +1373,6 @@ model ApiUpdateContract { /** * Properties of the API entity that can be updated. */ - @extension("x-ms-client-flatten", true) properties?: ApiContractUpdateProperties; } @@ -1724,7 +1720,6 @@ model OperationUpdateContract { /** * Properties of the API Operation entity that can be updated. */ - @extension("x-ms-client-flatten", true) properties?: OperationUpdateContractProperties; } @@ -1841,7 +1836,6 @@ model SchemaContractProperties { /** * Create or update Properties of the API Schema Document. */ - @extension("x-ms-client-flatten", true) document?: SchemaDocumentProperties; } @@ -2054,7 +2048,6 @@ model IssueUpdateContract { /** * Issue entity Update contract properties. */ - @extension("x-ms-client-flatten", true) properties?: IssueUpdateContractProperties; } @@ -2164,7 +2157,6 @@ model TagDescriptionCreateParameters { /** * Properties supplied to Create TagDescription operation. */ - @extension("x-ms-client-flatten", true) properties?: TagDescriptionBaseProperties; } @@ -2405,7 +2397,6 @@ model ApiVersionSetUpdateParameters { /** * Parameters to update or create an API Version Set Contract. */ - @extension("x-ms-client-flatten", true) properties?: ApiVersionSetUpdateParametersProperties; } @@ -2543,7 +2534,6 @@ model AuthorizationServerUpdateContract extends Resource { /** * Properties of the External OAuth authorization server update Contract. */ - @extension("x-ms-client-flatten", true) properties?: AuthorizationServerUpdateContractProperties; } @@ -2821,7 +2811,6 @@ model BackendUpdateParameters { /** * Backend entity update contract properties. */ - @extension("x-ms-client-flatten", true) properties?: BackendUpdateParameterProperties; } @@ -2849,7 +2838,6 @@ model BackendReconnectContract extends Resource { /** * Reconnect request properties. */ - @extension("x-ms-client-flatten", true) properties?: BackendReconnectProperties; } @@ -2900,7 +2888,6 @@ model CacheUpdateParameters { /** * Cache update properties details. */ - @extension("x-ms-client-flatten", true) properties?: CacheUpdateProperties; } @@ -3015,7 +3002,6 @@ model CertificateCreateOrUpdateParameters { /** * Certificate create or update properties details. */ - @extension("x-ms-client-flatten", true) properties?: CertificateCreateOrUpdateProperties; } @@ -3274,7 +3260,6 @@ model ContentTypeContract extends Resource { /** * Properties of the content type. */ - @extension("x-ms-client-flatten", true) properties?: ContentTypeContractProperties; } @@ -3317,7 +3302,6 @@ model ContentItemContract extends Resource { /** * Properties of the content item. */ - @extension("x-ms-client-flatten", true) properties?: Record; } @@ -3834,7 +3818,6 @@ model RemotePrivateEndpointConnectionWrapper { /** * Resource properties. */ - @extension("x-ms-client-flatten", true) properties?: PrivateEndpointConnectionWrapperProperties; } @@ -3970,7 +3953,6 @@ model ApiManagementServiceUpdateParameters extends ApimResource { /** * Properties of the API Management service. */ - @extension("x-ms-client-flatten", true) properties?: ApiManagementServiceUpdateProperties; /** @@ -4150,7 +4132,6 @@ model EmailTemplateUpdateParameters { /** * Email Template Update contract properties. */ - @extension("x-ms-client-flatten", true) properties?: EmailTemplateUpdateParameterProperties; } @@ -4338,7 +4319,6 @@ model AssociationContract extends Resource { /** * Association entity contract properties. */ - @extension("x-ms-client-flatten", true) properties?: AssociationContractProperties; } @@ -4403,7 +4383,6 @@ model GroupCreateParameters { /** * Properties supplied to Create Group operation. */ - @extension("x-ms-client-flatten", true) properties?: GroupCreateParametersProperties; } @@ -4441,7 +4420,6 @@ model GroupUpdateParameters { /** * Group entity update contract properties. */ - @extension("x-ms-client-flatten", true) properties?: GroupUpdateParametersProperties; } @@ -4631,7 +4609,6 @@ model IdentityProviderCreateContract extends Resource { /** * Identity Provider contract properties. */ - @extension("x-ms-client-flatten", true) properties?: IdentityProviderCreateContractProperties; } @@ -4660,7 +4637,6 @@ model IdentityProviderUpdateParameters { /** * Identity Provider update properties. */ - @extension("x-ms-client-flatten", true) properties?: IdentityProviderUpdateProperties; } @@ -4730,7 +4706,6 @@ model LoggerUpdateContract { /** * Logger entity update contract properties. */ - @extension("x-ms-client-flatten", true) properties?: LoggerUpdateParameters; } @@ -4806,7 +4781,6 @@ model NamedValueCreateContract extends Resource { /** * NamedValue entity contract properties for PUT operation. */ - @extension("x-ms-client-flatten", true) properties?: NamedValueCreateContractProperties; } @@ -4842,7 +4816,6 @@ model NamedValueUpdateParameters { /** * NamedValue entity Update contract properties. */ - @extension("x-ms-client-flatten", true) properties?: NamedValueUpdateParameterProperties; } @@ -5024,7 +4997,6 @@ model RecipientUserContract extends Resource { /** * Recipient User entity contract properties. */ - @extension("x-ms-client-flatten", true) properties?: RecipientUsersContractProperties; } @@ -5065,7 +5037,6 @@ model RecipientEmailContract extends Resource { /** * Recipient Email contract properties. */ - @extension("x-ms-client-flatten", true) properties?: RecipientEmailContractProperties; } @@ -5117,7 +5088,6 @@ model OpenidConnectProviderUpdateContract { /** * OpenId Connect Provider Update contract properties. */ - @extension("x-ms-client-flatten", true) properties?: OpenidConnectProviderUpdateContractProperties; } @@ -5237,7 +5207,6 @@ model PolicyDescriptionContract extends Resource { /** * Policy description contract properties. */ - @extension("x-ms-client-flatten", true) properties?: PolicyDescriptionContractProperties; } @@ -5305,7 +5274,6 @@ model PortalSettingsContract extends Resource { /** * Portal Settings contract properties. */ - @extension("x-ms-client-flatten", true) properties?: PortalSettingsContractProperties; } @@ -5532,7 +5500,6 @@ model ProductUpdateParameters { /** * Product entity Update contract properties. */ - @extension("x-ms-client-flatten", true) properties?: ProductUpdateProperties; } @@ -5739,7 +5706,6 @@ model QuotaCounterValueUpdateContract { /** * Quota counter value details. */ - @extension("x-ms-client-flatten", true) properties?: QuotaCounterValueContractProperties; } @@ -6060,7 +6026,6 @@ model GlobalSchemaContractProperties { /** * Global Schema document object for json-based schema formats(e.g. json schema). */ - @extension("x-ms-client-flatten", true) document?: Record; } @@ -6318,7 +6283,6 @@ model SubscriptionCreateParameters { /** * Subscription contract properties. */ - @extension("x-ms-client-flatten", true) properties?: SubscriptionCreateParameterProperties; } @@ -6375,7 +6339,6 @@ model SubscriptionUpdateParameters { /** * Subscription Update contract properties. */ - @extension("x-ms-client-flatten", true) properties?: SubscriptionUpdateParameterProperties; } @@ -6460,7 +6423,6 @@ model TagCreateUpdateParameters { /** * Properties supplied to Create Tag operation. */ - @extension("x-ms-client-flatten", true) properties?: TagContractProperties; } @@ -6491,7 +6453,6 @@ model AccessInformationCreateParameters { /** * Tenant access information update parameter properties. */ - @extension("x-ms-client-flatten", true) properties?: AccessInformationCreateParameterProperties; } @@ -6527,7 +6488,6 @@ model AccessInformationUpdateParameters { /** * Tenant access information update parameter properties. */ - @extension("x-ms-client-flatten", true) properties?: AccessInformationUpdateParameterProperties; } @@ -6578,7 +6538,6 @@ model DeployConfigurationParameters { /** * Deploy Configuration Parameter contract properties. */ - @extension("x-ms-client-flatten", true) properties?: DeployConfigurationParameterProperties; } @@ -6604,7 +6563,6 @@ model OperationResultContract extends Resource { /** * Properties of the Operation Contract. */ - @extension("x-ms-client-flatten", true) properties?: OperationResultContractProperties; } @@ -6680,7 +6638,6 @@ model SaveConfigurationParameter { /** * Properties of the Save Configuration Parameters. */ - @extension("x-ms-client-flatten", true) properties?: SaveConfigurationParameterProperties; } @@ -6706,7 +6663,6 @@ model TenantConfigurationSyncStateContract extends Resource { /** * Properties returned Tenant Configuration Sync State check. */ - @extension("x-ms-client-flatten", true) properties?: TenantConfigurationSyncStateContractProperties; } @@ -6766,7 +6722,6 @@ model UserCreateParameters { /** * User entity create contract properties. */ - @extension("x-ms-client-flatten", true) properties?: UserCreateParameterProperties; } @@ -6818,7 +6773,6 @@ model UserUpdateParameters { /** * User entity update contract properties. */ - @extension("x-ms-client-flatten", true) properties?: UserUpdateParametersProperties; } @@ -6880,7 +6834,6 @@ model UserTokenParameters { /** * User Token Parameter contract properties. */ - @extension("x-ms-client-flatten", true) properties?: UserTokenParameterProperties; } @@ -6945,6 +6898,5 @@ model QuotaCounterValueContract { /** * Quota counter Value Properties. */ - @extension("x-ms-client-flatten", true) value?: QuotaCounterValueContractProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/tspconfig.yaml index 2faa332586..3c7a890db8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/tspconfig.yaml @@ -3,6 +3,7 @@ emit: options: "@azure-tools/typespec-autorest": use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/client.tsp new file mode 100644 index 0000000000..c438185ba8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/client.tsp @@ -0,0 +1,45 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Azure.ResourceManager.Authorization; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ClassicAdministrator.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ProviderOperation.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(RoleAssignmentCreateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ExpandedProperties.scope); +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ExpandedProperties.roleDefinition); +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ExpandedProperties.principal); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(RoleAssignmentScheduleRequestProperties.scheduleInfo); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(RoleAssignmentScheduleRequestPropertiesScheduleInfo.expiration +); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(RoleEligibilityScheduleRequestProperties.scheduleInfo); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(RoleEligibilityScheduleRequestPropertiesScheduleInfo.expiration +); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(PolicyProperties.scope); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(PolicyAssignmentProperties.scope); +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(PolicyAssignmentProperties.roleDefinition); +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(PolicyAssignmentProperties.policy); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp index 86d9b74c85..146d316338 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp @@ -1,12 +1,10 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; -import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; -using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -209,7 +207,6 @@ model ClassicAdministrator { /** * Properties for the classic administrator. */ - @extension("x-ms-client-flatten", true) properties?: ClassicAdministratorProperties; } @@ -381,7 +378,6 @@ model ProviderOperation { /** * The operation properties. */ - @extension("x-ms-client-flatten", true) properties?: Record; /** @@ -420,9 +416,7 @@ model RoleAssignmentProperties { */ description?: string; - /** - * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container' - */ + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") condition?: string; /** @@ -469,7 +463,6 @@ model RoleAssignmentCreateParameters { /** * Role assignment properties. */ - @extension("x-ms-client-flatten", true) properties: RoleAssignmentProperties; } @@ -650,9 +643,7 @@ model RoleAssignmentScheduleProperties { // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endDateTime?: utcDateTime; - /** - * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container' - */ + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") condition?: string; /** @@ -682,19 +673,16 @@ model ExpandedProperties { /** * Details of the resource scope */ - @extension("x-ms-client-flatten", true) scope?: ExpandedPropertiesScope; /** * Details of role definition */ - @extension("x-ms-client-flatten", true) roleDefinition?: ExpandedPropertiesRoleDefinition; /** * Details of the principal */ - @extension("x-ms-client-flatten", true) principal?: ExpandedPropertiesPrincipal; } @@ -843,9 +831,7 @@ model RoleAssignmentScheduleInstanceProperties { */ memberType?: RoleManagementScheduleMemberType; - /** - * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container' - */ + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") condition?: string; /** @@ -921,7 +907,6 @@ model RoleAssignmentScheduleRequestProperties { /** * Schedule info of the role assignment schedule */ - @extension("x-ms-client-flatten", true) scheduleInfo?: RoleAssignmentScheduleRequestPropertiesScheduleInfo; /** @@ -939,9 +924,7 @@ model RoleAssignmentScheduleRequestProperties { */ ticketInfo?: RoleAssignmentScheduleRequestPropertiesTicketInfo; - /** - * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container' - */ + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") condition?: string; /** @@ -982,7 +965,6 @@ model RoleAssignmentScheduleRequestPropertiesScheduleInfo { /** * Expiration of the role assignment schedule */ - @extension("x-ms-client-flatten", true) expiration?: RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration; } @@ -1074,9 +1056,7 @@ model RoleEligibilityScheduleProperties { // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. endDateTime?: utcDateTime; - /** - * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container' - */ + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") condition?: string; /** @@ -1153,9 +1133,7 @@ model RoleEligibilityScheduleInstanceProperties { */ memberType?: RoleManagementScheduleMemberType; - /** - * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container' - */ + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") condition?: string; /** @@ -1221,7 +1199,6 @@ model RoleEligibilityScheduleRequestProperties { /** * Schedule info of the role eligibility schedule */ - @extension("x-ms-client-flatten", true) scheduleInfo?: RoleEligibilityScheduleRequestPropertiesScheduleInfo; /** @@ -1244,9 +1221,7 @@ model RoleEligibilityScheduleRequestProperties { */ ticketInfo?: RoleEligibilityScheduleRequestPropertiesTicketInfo; - /** - * The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container' - */ + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") condition?: string; /** @@ -1287,7 +1262,6 @@ model RoleEligibilityScheduleRequestPropertiesScheduleInfo { /** * Expiration of the role eligibility schedule */ - @extension("x-ms-client-flatten", true) expiration?: RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration; } @@ -1442,7 +1416,6 @@ model PolicyProperties { * Details of the resource scope */ @visibility("read") - @extension("x-ms-client-flatten", true) scope?: PolicyPropertiesScope; } @@ -1508,19 +1481,16 @@ model PolicyAssignmentProperties { /** * Details of the resource scope */ - @extension("x-ms-client-flatten", true) scope?: PolicyAssignmentPropertiesScope; /** * Details of role definition */ - @extension("x-ms-client-flatten", true) roleDefinition?: PolicyAssignmentPropertiesRoleDefinition; /** * Details of the policy */ - @extension("x-ms-client-flatten", true) policy?: PolicyAssignmentPropertiesPolicy; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml index 2faa332586..3c7a890db8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml @@ -3,6 +3,7 @@ emit: options: "@azure-tools/typespec-autorest": use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/client.tsp new file mode 100644 index 0000000000..170d41c987 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/client.tsp @@ -0,0 +1,23 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Microsoft.IntegrationSpaces; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(SpaceUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ApplicationUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(BusinessProcessUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ApplicationResource.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ApplicationResourceUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(InfrastructureResourceUpdate.properties); diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp index e164a83d74..6988e8f80f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp @@ -1,12 +1,10 @@ import "@typespec/rest"; import "@typespec/http"; -import "@typespec/openapi"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; -using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -96,7 +94,6 @@ model SpaceUpdate { /** * The updatable properties of the Space. */ - @extension("x-ms-client-flatten", true) properties?: SpaceUpdateProperties; } @@ -168,7 +165,6 @@ model ApplicationUpdate { /** * The updatable properties of the Application. */ - @extension("x-ms-client-flatten", true) properties?: ApplicationUpdateProperties; } @@ -301,7 +297,6 @@ model BusinessProcessUpdate { /** * The updatable properties of the BusinessProcess. */ - @extension("x-ms-client-flatten", true) properties?: BusinessProcessUpdateProperties; } @@ -529,7 +524,6 @@ model ApplicationResource extends ProxyResource { * The resource-specific properties for this resource. */ @visibility("read", "create") - @extension("x-ms-client-flatten", true) properties?: ApplicationResourceProperties; } @@ -566,7 +560,6 @@ model ApplicationResourceUpdate { /** * The updatable properties of the ApplicationResource. */ - @extension("x-ms-client-flatten", true) properties?: ApplicationResourceUpdateProperties; } @@ -633,7 +626,6 @@ model InfrastructureResourceUpdate { /** * The updatable properties of the InfrastructureResource. */ - @extension("x-ms-client-flatten", true) properties?: InfrastructureResourceUpdateProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/tspconfig.yaml index 2faa332586..3c7a890db8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/tspconfig.yaml @@ -3,6 +3,7 @@ emit: options: "@azure-tools/typespec-autorest": use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp index 4d43ee887f..1fe3d6fc73 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp @@ -17,7 +17,8 @@ namespace Microsoft.Compute; */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" -@locationResource +@subscriptionResource +@parentResource("SubscriptionLocationResource") @includeInapplicableMetadataInPayload(false) model CommunityGallery extends PirCommunityGalleryResource { /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp index c46e160188..b8a72054b4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp @@ -16,7 +16,8 @@ namespace Microsoft.Compute; */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" -@locationResource +@subscriptionResource +@parentResource("SubscriptionLocationResource") @includeInapplicableMetadataInPayload(false) model OSFamily { /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp index 24cca92c40..9273981b1f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp @@ -16,7 +16,8 @@ namespace Microsoft.Compute; */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" -@locationResource +@subscriptionResource +@parentResource("SubscriptionLocationResource") @includeInapplicableMetadataInPayload(false) model OSVersion { /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp index fac3c71774..743ed33c60 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp @@ -17,7 +17,8 @@ namespace Microsoft.Compute; */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" -@locationResource +@subscriptionResource +@parentResource("SubscriptionLocationResource") @includeInapplicableMetadataInPayload(false) model SharedGallery extends PirSharedGalleryResource { /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp index 77cf4dd86c..57769b8833 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp @@ -16,7 +16,8 @@ namespace Microsoft.Compute; */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" -@locationResource +@subscriptionResource +@parentResource("SubscriptionLocationResource") @includeInapplicableMetadataInPayload(false) model VirtualMachineExtensionImage extends Resource { @path diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/client.tsp new file mode 100644 index 0000000000..b7f2736294 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/client.tsp @@ -0,0 +1,127 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Microsoft.Compute; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ComputeOperationValue.display); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachineScaleSetNetworkConfiguration.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachineScaleSetIPConfiguration.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachineScaleSetPublicIPAddressConfiguration.properties +); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachineScaleSetUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachineScaleSetUpdateNetworkConfiguration.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachineScaleSetUpdateIPConfiguration.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.properties +); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachineScaleSetExtensionUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachineScaleSetVMExtensionUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(NetworkInterfaceReference.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachineNetworkInterfaceConfiguration.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachineNetworkInterfaceIPConfiguration.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachinePublicIPAddressConfiguration.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachineExtensionUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachineUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachineImage.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(AvailabilitySetUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(DedicatedHostGroupUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(DedicatedHostUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(SshPublicKeyUpdateResource.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ImageUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(RestorePointCollectionUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(CapacityReservationGroupUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(CapacityReservationUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(VirtualMachineRunCommandUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(DiskUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(PrivateLinkResource.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(DiskEncryptionSetUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(SnapshotUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(GalleryUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(GalleryImageUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(GalleryImageVersionUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(GalleryApplicationUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(GalleryApplicationVersionUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(PirSharedGalleryResource.identifier); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(PirCommunityGalleryResource.identifier); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(LoadBalancerConfiguration.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(LoadBalancerFrontendIpConfiguration.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(Extension.properties); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp index a34c2d4697..b7c2f89536 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp @@ -1,13 +1,11 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; -import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; -using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -1467,7 +1465,6 @@ model ComputeOperationValue { /** * Describes the properties of a Compute Operation Value Display. */ - @extension("x-ms-client-flatten", true) display?: ComputeOperationValueDisplay; } @@ -2031,9 +2028,7 @@ model VirtualMachineScaleSetOSProfile { */ adminUsername?: string; - /** - * Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) - */ + @doc("Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\\W_])

    **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)") adminPassword?: string; /** @@ -2610,7 +2605,6 @@ model VirtualMachineScaleSetNetworkConfiguration { /** * Describes a virtual machine scale set network profile's IP configuration. */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetNetworkConfigurationProperties; } @@ -2696,7 +2690,6 @@ model VirtualMachineScaleSetIPConfiguration { /** * Describes a virtual machine scale set network profile's IP configuration properties. */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetIPConfigurationProperties; } @@ -2757,7 +2750,6 @@ model VirtualMachineScaleSetPublicIPAddressConfiguration { /** * Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetPublicIPAddressConfigurationProperties; /** @@ -3493,7 +3485,6 @@ model VirtualMachineScaleSetUpdate extends UpdateResource { /** * Describes the properties of a Virtual Machine Scale Set. */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetUpdateProperties; /** @@ -3741,7 +3732,6 @@ model VirtualMachineScaleSetUpdateNetworkConfiguration { /** * Describes a virtual machine scale set updatable network profile's IP configuration.Use this object for updating network profile's IP Configuration. */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetUpdateNetworkConfigurationProperties; } @@ -3817,7 +3807,6 @@ model VirtualMachineScaleSetUpdateIPConfiguration { /** * Describes a virtual machine scale set network profile's IP configuration properties. */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetUpdateIPConfigurationProperties; } @@ -3878,7 +3867,6 @@ model VirtualMachineScaleSetUpdatePublicIPAddressConfiguration { /** * Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties; } @@ -4046,7 +4034,6 @@ model VirtualMachineScaleSetExtensionUpdate extends SubResourceReadOnly { /** * Describes the properties of a Virtual Machine Scale Set Extension. */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachineScaleSetExtensionProperties; } @@ -4296,9 +4283,7 @@ model VirtualMachineReimageParameters { * Additional parameters for Reimaging Non-Ephemeral Virtual Machine. */ model OSProfileProvisioningData { - /** - * Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) - */ + @doc("Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\\W_])

    **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)") adminPassword?: string; /** @@ -4425,7 +4410,6 @@ model VirtualMachineScaleSetVMExtensionUpdate extends SubResourceReadOnly { /** * Describes the properties of a Virtual Machine Extension. */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachineExtensionUpdateProperties; } @@ -5063,9 +5047,7 @@ model OSProfile { */ adminUsername?: string; - /** - * Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\W_])

    **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection) - */ + @doc("Specifies the password of the administrator account.

    **Minimum-length (Windows):** 8 characters

    **Minimum-length (Linux):** 6 characters

    **Max-length (Windows):** 123 characters

    **Max-length (Linux):** 72 characters

    **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
    Has lower characters
    Has upper characters
    Has a digit
    Has a special character (Regex match [\\W_])

    **Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\", \"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\", \"Password22\", \"iloveyou!\"

    For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)

    For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)") adminPassword?: string; /** @@ -5126,7 +5108,6 @@ model NetworkInterfaceReference extends SubResource { /** * Describes a network interface reference properties. */ - @extension("x-ms-client-flatten", true) properties?: NetworkInterfaceReferenceProperties; } @@ -5157,7 +5138,6 @@ model VirtualMachineNetworkInterfaceConfiguration { /** * Describes a virtual machine network profile's IP configuration. */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachineNetworkInterfaceConfigurationProperties; } @@ -5245,7 +5225,6 @@ model VirtualMachineNetworkInterfaceIPConfiguration { /** * Describes a virtual machine network interface IP configuration properties. */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachineNetworkInterfaceIPConfigurationProperties; } @@ -5301,7 +5280,6 @@ model VirtualMachinePublicIPAddressConfiguration { /** * Describes a virtual machines IP Configuration's PublicIPAddress configuration */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachinePublicIPAddressConfigurationProperties; /** @@ -5456,7 +5434,6 @@ model VirtualMachineExtensionUpdate extends UpdateResource { /** * Describes the properties of a Virtual Machine Extension. */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachineExtensionUpdateProperties; } @@ -5898,7 +5875,6 @@ model VirtualMachineUpdate extends UpdateResource { /** * Describes the properties of a Virtual Machine. */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachineProperties; /** @@ -6240,7 +6216,6 @@ model VirtualMachineImage extends VirtualMachineImageResource { /** * Describes the properties of a Virtual Machine Image. */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachineImageProperties; } @@ -6511,7 +6486,6 @@ model AvailabilitySetUpdate extends UpdateResource { /** * The instance view of a resource. */ - @extension("x-ms-client-flatten", true) properties?: AvailabilitySetProperties; /** @@ -6694,7 +6668,6 @@ model DedicatedHostGroupUpdate extends UpdateResource { /** * Dedicated Host Group Properties. */ - @extension("x-ms-client-flatten", true) properties?: DedicatedHostGroupProperties; /** @@ -6768,7 +6741,6 @@ model DedicatedHostUpdate extends UpdateResource { /** * Properties of the dedicated host. */ - @extension("x-ms-client-flatten", true) properties?: DedicatedHostProperties; /** @@ -6806,7 +6778,6 @@ model SshPublicKeyUpdateResource extends UpdateResource { /** * Properties of the SSH public key. */ - @extension("x-ms-client-flatten", true) properties?: SshPublicKeyResourceProperties; } @@ -6948,7 +6919,6 @@ model ImageUpdate extends UpdateResource { /** * Describes the properties of an Image. */ - @extension("x-ms-client-flatten", true) properties?: ImageProperties; } @@ -7320,7 +7290,6 @@ model RestorePointCollectionUpdate extends UpdateResource { /** * The restore point collection properties. */ - @extension("x-ms-client-flatten", true) properties?: RestorePointCollectionProperties; } @@ -7406,7 +7375,6 @@ model CapacityReservationGroupUpdate extends UpdateResource { /** * capacity reservation group Properties. */ - @extension("x-ms-client-flatten", true) properties?: CapacityReservationGroupProperties; } @@ -7466,7 +7434,6 @@ model CapacityReservationUpdate extends UpdateResource { /** * Properties of the Capacity reservation. */ - @extension("x-ms-client-flatten", true) properties?: CapacityReservationProperties; /** @@ -7843,7 +7810,6 @@ model VirtualMachineRunCommandUpdate extends UpdateResource { /** * Describes the properties of a Virtual Machine run command. */ - @extension("x-ms-client-flatten", true) properties?: VirtualMachineRunCommandProperties; } @@ -8309,7 +8275,6 @@ model DiskUpdate { /** * Disk resource update properties. */ - @extension("x-ms-client-flatten", true) properties?: DiskUpdateProperties; /** @@ -8574,7 +8539,6 @@ model PrivateLinkResource { /** * Resource properties. */ - @extension("x-ms-client-flatten", true) properties?: PrivateLinkResourceProperties; /** @@ -8714,7 +8678,6 @@ model DiskEncryptionSetUpdate { /** * disk encryption set resource update properties. */ - @extension("x-ms-client-flatten", true) properties?: DiskEncryptionSetUpdateProperties; /** @@ -9045,7 +9008,6 @@ model SnapshotUpdate { /** * Snapshot resource update properties. */ - @extension("x-ms-client-flatten", true) properties?: SnapshotUpdateProperties; /** @@ -9544,7 +9506,6 @@ model GalleryUpdate extends UpdateResourceDefinition { /** * Describes the properties of a Shared Image Gallery. */ - @extension("x-ms-client-flatten", true) properties?: GalleryProperties; } @@ -9760,7 +9721,6 @@ model GalleryImageUpdate extends UpdateResourceDefinition { /** * Describes the properties of a gallery image definition. */ - @extension("x-ms-client-flatten", true) properties?: GalleryImageProperties; } @@ -10166,7 +10126,6 @@ model GalleryImageVersionUpdate extends UpdateResourceDefinition { /** * Describes the properties of a gallery image version. */ - @extension("x-ms-client-flatten", true) properties?: GalleryImageVersionProperties; } @@ -10273,7 +10232,6 @@ model GalleryApplicationUpdate extends UpdateResourceDefinition { /** * Describes the properties of a gallery Application Definition. */ - @extension("x-ms-client-flatten", true) properties?: GalleryApplicationProperties; } @@ -10397,7 +10355,6 @@ model GalleryApplicationVersionUpdate extends UpdateResourceDefinition { /** * Describes the properties of a gallery image version. */ - @extension("x-ms-client-flatten", true) properties?: GalleryApplicationVersionProperties; } @@ -10423,7 +10380,6 @@ model PirSharedGalleryResource extends PirResource { /** * The identifier information of shared gallery. */ - @extension("x-ms-client-flatten", true) identifier?: SharedGalleryIdentifier; } @@ -10618,7 +10574,6 @@ model PirCommunityGalleryResource { /** * The identifier information of community gallery. */ - @extension("x-ms-client-flatten", true) identifier?: CommunityGalleryIdentifier; } @@ -11052,7 +11007,6 @@ model LoadBalancerConfiguration { /** * Properties of the load balancer configuration. */ - @extension("x-ms-client-flatten", true) properties: LoadBalancerConfigurationProperties; } @@ -11078,7 +11032,6 @@ model LoadBalancerFrontendIpConfiguration { /** * Properties of load balancer frontend ip configuration. */ - @extension("x-ms-client-flatten", true) properties: LoadBalancerFrontendIpConfigurationProperties; } @@ -11124,7 +11077,6 @@ model Extension { /** * Extension Properties. */ - @extension("x-ms-client-flatten", true) properties?: CloudServiceExtensionProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/tspconfig.yaml index 2faa332586..3c7a890db8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/tspconfig.yaml @@ -3,6 +3,7 @@ emit: options: "@azure-tools/typespec-autorest": use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/client.tsp new file mode 100644 index 0000000000..85d5d93014 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/client.tsp @@ -0,0 +1,11 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Azure.ResourceManager.Dns; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(DnsResourceReferenceRequest.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(DnsResourceReferenceResult.properties); diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp index f56e26c313..7214c6bb61 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp @@ -1,13 +1,11 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; -import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; -using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -441,7 +439,6 @@ model DnsResourceReferenceRequest { /** * The properties of the Resource Reference Request. */ - @extension("x-ms-client-flatten", true) properties?: DnsResourceReferenceRequestProperties; } @@ -462,7 +459,6 @@ model DnsResourceReferenceResult { /** * The result of dns resource reference request. Returns a list of dns resource references for each of the azure resource in the request. */ - @extension("x-ms-client-flatten", true) properties?: DnsResourceReferenceResultProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml index 2ef6b3f7f9..49cc3480b5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml @@ -3,6 +3,7 @@ emit: options: "@azure-tools/typespec-autorest": use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/dns.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/client.tsp new file mode 100644 index 0000000000..450a6bb90d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/client.tsp @@ -0,0 +1,20 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Azure.ResourceManager.MachineLearning; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ClusterUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(RegistryPrivateEndpointConnection.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(SharedPrivateLinkResource.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(WorkspaceUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(PrivateLinkResource.properties); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp index 234ef7b6c0..f5bf9496e1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp @@ -1,12 +1,10 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; -import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; -using TypeSpec.OpenAPI; using Azure.Core; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -3078,7 +3076,6 @@ model ClusterUpdateParameters { /** * The properties of the amlCompute. */ - @extension("x-ms-client-flatten", true) properties?: ClusterUpdateProperties; } @@ -5564,7 +5561,6 @@ model RegistryPrivateEndpointConnection { /** * Properties of the Private Endpoint Connection */ - @extension("x-ms-client-flatten", true) properties?: RegistryPrivateEndpointConnectionProperties; } @@ -6223,7 +6219,6 @@ model SharedPrivateLinkResource { /** * Properties of a shared private link resource. */ - @extension("x-ms-client-flatten", true) properties?: SharedPrivateLinkResourceProperty; } @@ -6272,7 +6267,6 @@ model WorkspaceUpdateParameters { /** * The properties that the machine learning workspace will be updated with. */ - @extension("x-ms-client-flatten", true) properties?: WorkspacePropertiesUpdateParameters; /** @@ -6631,7 +6625,6 @@ model PrivateLinkResource extends Resource { /** * Properties of a private link resource. */ - @extension("x-ms-client-flatten", true) properties?: PrivateLinkResourceProperties; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml index 2faa332586..3c7a890db8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml @@ -3,6 +3,7 @@ emit: options: "@azure-tools/typespec-autorest": use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/client.tsp new file mode 100644 index 0000000000..f99ead8bf2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/client.tsp @@ -0,0 +1,11 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Microsoft.NetworkAnalytics; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(DataProductUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(DataTypeUpdate.properties); diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp index 87583bbd63..cf763e2773 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp @@ -1,11 +1,9 @@ import "@typespec/rest"; import "@typespec/http"; -import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; -using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -529,7 +527,6 @@ model DataProductUpdate { /** * The updatable properties of the DataProduct. */ - @extension("x-ms-client-flatten", true) properties?: DataProductUpdateProperties; } @@ -697,7 +694,6 @@ model DataTypeUpdate { /** * The updatable properties of the DataType. */ - @extension("x-ms-client-flatten", true) properties?: DataTypeUpdateProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/tspconfig.yaml index 7ac4d86139..95a9fd1584 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/tspconfig.yaml @@ -3,6 +3,7 @@ emit: options: "@azure-tools/typespec-autorest": use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/networkanalytics.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp index edbf81cc89..cdcbd4f662 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp @@ -14,7 +14,8 @@ namespace Microsoft.AzurePlaywrightService; /** * A quota resource */ -@locationResource +@subscriptionResource +@parentResource("SubscriptionLocationResource") model Quota is ProxyResource { /** * The quota name. diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/client.tsp new file mode 100644 index 0000000000..af9817897c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/client.tsp @@ -0,0 +1,8 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Microsoft.AzurePlaywrightService; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(AccountUpdate.properties); diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp index 9cbabd80a1..ee87843950 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp @@ -1,11 +1,9 @@ import "@typespec/rest"; import "@typespec/http"; -import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; -using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -219,7 +217,6 @@ model AccountUpdate { /** * The updatable properties of the Account. */ - @extension("x-ms-client-flatten", true) properties?: AccountUpdateProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/tspconfig.yaml index cefe198588..7d187dd2b1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/tspconfig.yaml @@ -3,6 +3,7 @@ emit: options: "@azure-tools/typespec-autorest": use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/playwrighttesting.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/client.tsp new file mode 100644 index 0000000000..395e0902b5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/client.tsp @@ -0,0 +1,8 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Microsoft.ServiceNetworking; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(AssociationUpdate.properties); diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp index 463fa22e61..037f9b7441 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp @@ -1,11 +1,9 @@ import "@typespec/rest"; import "@typespec/http"; -import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; -using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -148,7 +146,6 @@ model AssociationUpdate { /** * The updatable properties of the Association. */ - @extension("x-ms-client-flatten", true) properties?: AssociationUpdateProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/tspconfig.yaml index 189a9e94c6..302742877d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/tspconfig.yaml @@ -3,6 +3,7 @@ emit: options: "@azure-tools/typespec-autorest": use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/TrafficController.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/client.tsp new file mode 100644 index 0000000000..18617fa816 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/client.tsp @@ -0,0 +1,14 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Microsoft.AzureSphere; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ProductUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(DeviceGroupUpdate.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(DeviceUpdate.properties); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp index 8f4c4ef4a8..395a733727 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp @@ -1,12 +1,10 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; -import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; -using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -684,7 +682,6 @@ model ProductUpdate { /** * The updatable properties of the Product. */ - @extension("x-ms-client-flatten", true) properties?: ProductUpdateProperties; } @@ -705,7 +702,6 @@ model DeviceGroupUpdate { /** * The updatable properties of the DeviceGroup. */ - @extension("x-ms-client-flatten", true) properties?: DeviceGroupUpdateProperties; } @@ -756,7 +752,6 @@ model DeviceUpdate { /** * The updatable properties of the Device. */ - @extension("x-ms-client-flatten", true) properties?: DeviceUpdateProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/tspconfig.yaml index 9553504364..330cee0414 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/tspconfig.yaml @@ -3,6 +3,7 @@ emit: options: "@azure-tools/typespec-autorest": use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/azuresphere.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp index 6a4f4310ab..989af38fc7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp @@ -16,7 +16,8 @@ namespace Microsoft.Storage; */ #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" -@locationResource +@subscriptionResource +@parentResource("SubscriptionLocationResource") @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(DeletedAccountProperties) model DeletedAccount extends ProxyResourceBase { diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/client.tsp new file mode 100644 index 0000000000..baf43ba2d2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/client.tsp @@ -0,0 +1,26 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Microsoft.Storage; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(StorageAccountCreateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(StorageAccountUpdateParameters.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(PrivateLinkResource.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ImmutabilityPolicyProperties.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ListContainerItem.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(FileShareItem.properties); + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(ListQueue.queueProperties); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp index abfe4e16d1..13c0238e84 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp @@ -1,13 +1,11 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; -import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; -using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -826,7 +824,6 @@ model StorageAccountCreateParameters { /** * The parameters used to create the storage account. */ - @extension("x-ms-client-flatten", true) properties?: StorageAccountPropertiesCreateParameters; } @@ -1965,7 +1962,6 @@ model StorageAccountUpdateParameters { /** * The parameters used when updating a storage account. */ - @extension("x-ms-client-flatten", true) properties?: StorageAccountPropertiesUpdateParameters; /** @@ -2892,7 +2888,6 @@ model PrivateLinkResource extends Resource { /** * Resource properties. */ - @extension("x-ms-client-flatten", true) properties?: PrivateLinkResourceProperties; } @@ -3456,7 +3451,6 @@ model ImmutabilityPolicyProperties { /** * The properties of an ImmutabilityPolicy of a blob container. */ - @extension("x-ms-client-flatten", true) properties?: ImmutabilityPolicyProperty; /** @@ -4089,7 +4083,6 @@ model ListContainerItem extends AzureEntityResource { /** * The blob container properties be listed out. */ - @extension("x-ms-client-flatten", true) properties?: ContainerProperties; } @@ -4100,7 +4093,6 @@ model FileShareItem extends AzureEntityResource { /** * The file share properties be listed out. */ - @extension("x-ms-client-flatten", true) properties?: FileShareProperties; } @@ -4109,7 +4101,6 @@ model ListQueue extends Resource { * List Queue resource properties. */ @projectedName("json", "properties") - @extension("x-ms-client-flatten", true) queueProperties?: ListQueueProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/tspconfig.yaml index 2faa332586..3c7a890db8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/tspconfig.yaml @@ -3,6 +3,7 @@ emit: options: "@azure-tools/typespec-autorest": use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/swagger/basic.json b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/basic.json index b99280e7ed..9ddb1699a5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/swagger/basic.json +++ b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/basic.json @@ -424,7 +424,7 @@ "description": "The provisioning state of a resource.", "enum": ["Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted"], "x-ms-enum": { - "name": "ProvisioningState", + "name": "ProvisioningStateTest", "modelAsString": true, "values": [ { diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/client.tsp new file mode 100644 index 0000000000..b338942136 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/client.tsp @@ -0,0 +1,8 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Microsoft.Test; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(EmployeeUpdate.properties); diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp index 908c250d2e..c6f1625c0b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp @@ -1,11 +1,9 @@ import "@typespec/rest"; import "@typespec/http"; -import "@typespec/openapi"; import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; -using TypeSpec.OpenAPI; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; @@ -16,7 +14,7 @@ interface Operations extends Azure.ResourceManager.Operations {} /** * The provisioning state of a resource. */ -enum ProvisioningState { +enum ProvisioningStateTest { /** * Resource has been created. */ @@ -76,7 +74,7 @@ model EmployeeProperties { * The status of the last operation. */ @visibility("read") - provisioningState?: ProvisioningState; + provisioningState?: ProvisioningStateTest; } /** @@ -120,7 +118,6 @@ model EmployeeUpdate { /** * The updatable properties of the Employee. */ - @extension("x-ms-client-flatten", true) properties?: EmployeeUpdateProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/tspconfig.yaml index 2faa332586..3c7a890db8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/tspconfig.yaml +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/tspconfig.yaml @@ -3,6 +3,7 @@ emit: options: "@azure-tools/typespec-autorest": use-read-only-status-schema: true + omit-unreachable-types: true emitter-output-dir: "{project-root}/.." azure-resource-provider-folder: "resource-manager" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/client.tsp new file mode 100644 index 0000000000..95d80ffea9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using Azure.Batch; diff --git a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/client.tsp new file mode 100644 index 0000000000..abb83730ee --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/client.tsp @@ -0,0 +1,8 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using AutoRestComplexTestService; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(MyBaseType.helper); diff --git a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp index 6355961f87..667b67a1a1 100644 --- a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp @@ -1,10 +1,8 @@ import "@typespec/rest"; import "@typespec/http"; -import "@typespec/openapi"; using TypeSpec.Rest; using TypeSpec.Http; -using TypeSpec.OpenAPI; namespace AutoRestComplexTestService; @@ -201,8 +199,6 @@ model ReadonlyObj { @discriminator("kind") model MyBaseType { propB1?: string; - - @extension("x-ms-client-flatten", true) helper?: MyBaseHelperType; } diff --git a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/client.tsp new file mode 100644 index 0000000000..bc410fa865 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using ComplexModelClient; diff --git a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/client.tsp new file mode 100644 index 0000000000..351ef61b80 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using Azure.Language.Authoring; diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/client.tsp new file mode 100644 index 0000000000..88be4a3e37 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/client.tsp @@ -0,0 +1,8 @@ +import "./main.tsp"; +import "@typespec/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Azure.Keyvault; + +#suppress "deprecated" "@flattenProperty decorator is not recommended to use." +@@flattenProperty(RoleDefinition.properties); diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp index 4058b59b3f..9b8b9e4173 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp @@ -1,12 +1,10 @@ import "@typespec/rest"; import "@typespec/http"; import "@azure-tools/typespec-azure-core"; -import "@typespec/openapi"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; -using TypeSpec.OpenAPI; namespace Azure.Keyvault; @@ -2205,7 +2203,6 @@ model RoleDefinition { /** * Role definition properties. */ - @extension("x-ms-client-flatten", true) properties?: RoleDefinitionProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp index 892dd93b17..0df71a6de3 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/routes.tsp @@ -1,11 +1,9 @@ import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; -import "@typespec/openapi"; using TypeSpec.Rest; using TypeSpec.Http; -using TypeSpec.OpenAPI; namespace Azure.Keyvault; @@ -207,7 +205,6 @@ op setCertificateIssuer is Azure.Core.Foundations.Operation< * Certificate issuer set parameter. */ @body - @extension("x-ms-client-flatten", true) parameter: CertificateIssuerSetParameters; }, IssuerBundle @@ -233,7 +230,6 @@ op updateCertificateIssuer is Azure.Core.Foundations.Operation< * Certificate issuer update parameter. */ @body - @extension("x-ms-client-flatten", true) parameter: CertificateIssuerUpdateParameters; }, IssuerBundle @@ -299,7 +295,6 @@ op createCertificate is Azure.Core.Foundations.Operation< * The parameters to create a certificate. */ @body - @extension("x-ms-client-flatten", true) parameters: CertificateCreateParameters; }, CertificateOperation @@ -330,7 +325,6 @@ op importCertificate is Azure.Core.Foundations.Operation< * The parameters to import the certificate. */ @body - @extension("x-ms-client-flatten", true) parameters: CertificateImportParameters; }, CertificateBundle @@ -433,7 +427,6 @@ op updateCertificate is Azure.Core.Foundations.Operation< * The parameters for certificate update. */ @body - @extension("x-ms-client-flatten", true) parameters: CertificateUpdateParameters; }, CertificateBundle @@ -483,7 +476,6 @@ op updateCertificateOperation is Azure.Core.Foundations.Operation< * The certificate operation response. */ @body - @extension("x-ms-client-flatten", true) certificateOperation: CertificateOperationUpdateParameter; }, CertificateOperation @@ -549,7 +541,6 @@ op mergeCertificate is Azure.Core.Foundations.Operation< * The parameters to merge certificate. */ @body - @extension("x-ms-client-flatten", true) parameters: CertificateMergeParameters; }, CertificateBundle @@ -710,7 +701,6 @@ op createKey is Azure.Core.Foundations.Operation< * The parameters to create a key. */ @body - @extension("x-ms-client-flatten", true) parameters: KeyCreateParameters; }, KeyBundle @@ -765,7 +755,6 @@ op importKey is Azure.Core.Foundations.Operation< * The parameters to import a key. */ @body - @extension("x-ms-client-flatten", true) parameters: KeyImportParameters; }, KeyBundle @@ -820,7 +809,6 @@ op updateKey is Azure.Core.Foundations.Operation< * The parameters of the key to update. */ @body - @extension("x-ms-client-flatten", true) parameters: KeyUpdateParameters; }, KeyBundle @@ -990,7 +978,6 @@ op encrypt is Azure.Core.Foundations.Operation< * The parameters for the encryption operation. */ @body - @extension("x-ms-client-flatten", true) parameters: KeyOperationsParameters; }, KeyOperationResult @@ -1030,7 +1017,6 @@ op decrypt is Azure.Core.Foundations.Operation< * The parameters for the decryption operation. */ @body - @extension("x-ms-client-flatten", true) parameters: KeyOperationsParameters; }, KeyOperationResult @@ -1062,7 +1048,6 @@ op sign is Azure.Core.Foundations.Operation< * The parameters for the signing operation. */ @body - @extension("x-ms-client-flatten", true) parameters: KeySignParameters; }, KeyOperationResult @@ -1097,7 +1082,6 @@ op verify is Azure.Core.Foundations.Operation< * The parameters for verify operations. */ @body - @extension("x-ms-client-flatten", true) parameters: KeyVerifyParameters; }, KeyVerifyResult @@ -1133,7 +1117,6 @@ op wrapKey is Azure.Core.Foundations.Operation< * The parameters for wrap operation. */ @body - @extension("x-ms-client-flatten", true) parameters: KeyOperationsParameters; }, KeyOperationResult @@ -1170,7 +1153,6 @@ op unwrapKey is Azure.Core.Foundations.Operation< * The parameters for the key operation. */ @body - @extension("x-ms-client-flatten", true) parameters: KeyOperationsParameters; }, KeyOperationResult @@ -1201,7 +1183,6 @@ op release is Azure.Core.Foundations.Operation< * The parameters for the key release operation. */ @body - @extension("x-ms-client-flatten", true) parameters: KeyReleaseParameters; }, KeyReleaseResult @@ -1369,7 +1350,6 @@ op setSecret is Azure.Core.Foundations.Operation< * The parameters for setting the secret. */ @body - @extension("x-ms-client-flatten", true) parameters: SecretSetParameters; }, SecretBundle @@ -1421,7 +1401,6 @@ op updateSecret is Azure.Core.Foundations.Operation< * The parameters for update secret operation. */ @body - @extension("x-ms-client-flatten", true) parameters: SecretUpdateParameters; }, SecretBundle @@ -1633,7 +1612,6 @@ op updateSettings is Azure.Core.Foundations.Operation< * The parameters to update an account setting. */ @body - @extension("x-ms-client-flatten", true) parameters: UpdateSettingsRequest; }, Setting @@ -1854,7 +1832,6 @@ op setStorageAccount is Azure.Core.Foundations.Operation< * The parameters to create a storage account. */ @body - @extension("x-ms-client-flatten", true) parameters: StorageAccountCreateParameters; }, StorageBundle @@ -1879,7 +1856,6 @@ op updateStorageAccount is Azure.Core.Foundations.Operation< * The parameters to update a storage account. */ @body - @extension("x-ms-client-flatten", true) parameters: StorageAccountUpdateParameters; }, StorageBundle @@ -1904,7 +1880,6 @@ op regenerateStorageAccountKey is Azure.Core.Foundations.Operation< * The parameters to regenerate storage account key. */ @body - @extension("x-ms-client-flatten", true) parameters: StorageAccountRegenerteKeyParameters; }, StorageBundle @@ -2098,7 +2073,6 @@ op setSasDefinition is Azure.Core.Foundations.Operation< * The parameters to create a SAS definition. */ @body - @extension("x-ms-client-flatten", true) parameters: SasDefinitionCreateParameters; }, SasDefinitionBundle @@ -2130,7 +2104,6 @@ op updateSasDefinition is Azure.Core.Foundations.Operation< * The parameters to update a SAS definition. */ @body - @extension("x-ms-client-flatten", true) parameters: SasDefinitionUpdateParameters; }, SasDefinitionBundle diff --git a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/client.tsp new file mode 100644 index 0000000000..5bfefd1d01 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using Azure.LoadTesting; diff --git a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/client.tsp new file mode 100644 index 0000000000..c51f3b7efe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using NotificationHubsClient; diff --git a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/client.tsp new file mode 100644 index 0000000000..232662c7b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using Azure.AI.OpenAI; diff --git a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/client.tsp new file mode 100644 index 0000000000..10d4dd4bc2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using AutoRestPagingTestService; diff --git a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/client.tsp new file mode 100644 index 0000000000..5681d148d0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using Azure.Language.QnAMaker; diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/client.tsp new file mode 100644 index 0000000000..dfa3ffa391 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using MicrosoftCognitiveLanguageServiceQuestionAnsweringAuthoring; diff --git a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/client.tsp new file mode 100644 index 0000000000..d8e2a79e58 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using QnAMakerRuntimeClient; diff --git a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/client.tsp new file mode 100644 index 0000000000..5d230eb041 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using AzureSchemaRegistry; diff --git a/packages/extensions/openapi-to-typespec/test/url/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/url/tsp-output/client.tsp new file mode 100644 index 0000000000..7c7e7f3343 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/url/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using AutoRestUrlTestService; diff --git a/packages/extensions/openapi-to-typespec/test/url/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/url/tsp-output/routes.tsp index b980fac684..a09efcb667 100644 --- a/packages/extensions/openapi-to-typespec/test/url/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/url/tsp-output/routes.tsp @@ -184,16 +184,12 @@ interface pathsOperations { void >; - /** - * Get 'begin!*'();:@ &=+$,/?#[]end - */ + @doc("Get 'begin!*'();:@ &=+$,/?#[]end") @route("/paths/string/begin%21%2A%27%28%29%3B%3A%40%20%26%3D%2B%24%2C%2F%3F%23%5B%5Dend/{stringPath}") @get stringUrlEncoded is Azure.Core.Foundations.Operation< { - /** - * 'begin!*'();:@ &=+$,/?#[]end' url encoded string value - */ + @doc("'begin!*'();:@ &=+$,/?#[]end' url encoded string value") @path stringPath: "begin!*'();:@ &=+$,/?#[]end"; }, @@ -209,9 +205,7 @@ interface pathsOperations { @get stringUrlNonEncoded is Azure.Core.Foundations.Operation< { - /** - * 'begin!*'();:@&=+$,end' url encoded string value - */ + @doc("'begin!*'();:@&=+$,end' url encoded string value") @path stringPath: "begin!*'();:@&=+$,end"; }, @@ -412,18 +406,18 @@ interface pathsOperations { void >; - /** - * Get an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] - * using the csv-array format - */ + @doc(""" +Get an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] +using the csv-array format +""") @route("/paths/array/ArrayPath1%2cbegin%21%2A%27%28%29%3B%3A%40%20%26%3D%2B%24%2C%2F%3F%23%5B%5Dend%2c%2c/{arrayPath}") @get arrayCsvInPath is Azure.Core.Foundations.Operation< { - /** - * an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] - * using the csv-array format - */ + @doc(""" +an array of string ['ArrayPath1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] +using the csv-array format +""") @path arrayPath: string[]; }, @@ -704,16 +698,12 @@ interface queriesOperations { void >; - /** - * Get 'begin!*'();:@ &=+$,/?#[]end - */ + @doc("Get 'begin!*'();:@ &=+$,/?#[]end") @route("/queries/string/begin%21%2A%27%28%29%3B%3A%40%20%26%3D%2B%24%2C%2F%3F%23%5B%5Dend") @get stringUrlEncoded is Azure.Core.Foundations.Operation< { - /** - * 'begin!*'();:@ &=+$,/?#[]end' url encoded string value - */ + @doc("'begin!*'();:@ &=+$,/?#[]end' url encoded string value") @query("stringQuery") stringQuery: "begin!*'();:@ &=+$,/?#[]end"; }, @@ -896,18 +886,18 @@ interface queriesOperations { void >; - /** - * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, - * ''] using the csv-array format - */ + @doc(""" +Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, +''] using the csv-array format +""") @route("/queries/array/csv/string/valid") @get arrayStringCsvValid is Azure.Core.Foundations.Operation< { - /** - * an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] - * using the csv-array format - */ + @doc(""" +an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] +using the csv-array format +""") @query({ name: "arrayQuery", format: "csv", @@ -975,18 +965,18 @@ interface queriesOperations { void >; - /** - * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, - * ''] using the ssv-array format - */ + @doc(""" +Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, +''] using the ssv-array format +""") @route("/queries/array/ssv/string/valid") @get arrayStringSsvValid is Azure.Core.Foundations.Operation< { - /** - * an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] - * using the ssv-array format - */ + @doc(""" +an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] +using the ssv-array format +""") @query({ name: "arrayQuery", format: "ssv", @@ -996,18 +986,18 @@ interface queriesOperations { void >; - /** - * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, - * ''] using the tsv-array format - */ + @doc(""" +Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, +''] using the tsv-array format +""") @route("/queries/array/tsv/string/valid") @get arrayStringTsvValid is Azure.Core.Foundations.Operation< { - /** - * an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] - * using the tsv-array format - */ + @doc(""" +an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] +using the tsv-array format +""") @query({ name: "arrayQuery", format: "tsv", @@ -1017,18 +1007,18 @@ interface queriesOperations { void >; - /** - * Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, - * ''] using the pipes-array format - */ + @doc(""" +Get an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, +''] using the pipes-array format +""") @route("/queries/array/pipes/string/valid") @get arrayStringPipesValid is Azure.Core.Foundations.Operation< { - /** - * an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] - * using the pipes-array format - */ + @doc(""" +an array of string ['ArrayQuery1', 'begin!*'();:@ &=+$,/?#[]end' , null, ''] +using the pipes-array format +""") @query({ name: "arrayQuery", format: "pipes", diff --git a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/client.tsp new file mode 100644 index 0000000000..fde21520db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/client.tsp @@ -0,0 +1,3 @@ +import "./main.tsp"; + +using AzureWebPubSubServiceRESTAPI; From 1819fe1d8d01ddf594648f8a41700c422a50a379 Mon Sep 17 00:00:00 2001 From: Gil LaHaye Date: Fri, 16 Feb 2024 07:01:00 -0800 Subject: [PATCH 16/33] Fix typo in autorest-configuration-schema.ts (#4842) description: "Reservered for future use." -> description: "Reserved for future use." --- .../src/configuration-schema/autorest-configuration-schema.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/libs/configuration/src/configuration-schema/autorest-configuration-schema.ts b/packages/libs/configuration/src/configuration-schema/autorest-configuration-schema.ts index 607b8bc2ef..4e4625c699 100644 --- a/packages/libs/configuration/src/configuration-schema/autorest-configuration-schema.ts +++ b/packages/libs/configuration/src/configuration-schema/autorest-configuration-schema.ts @@ -267,7 +267,7 @@ export const AUTOREST_CONFIGURATION_SCHEMA = { profile: { type: "array", category: "core", - description: "Reservered for future use.", + description: "Reserved for future use.", items: { type: "string" }, }, From 1a40a3af0698e124814c47d0ce026db55c39ca45 Mon Sep 17 00:00:00 2001 From: Chenjie Shi Date: Thu, 22 Feb 2024 15:05:44 +0800 Subject: [PATCH 17/33] migrate @projectedName to @encodedName (#4885) resolve: #4884 --- .../projectedName_2024-02-19-02-17.json | 10 + .../src/emiters/emit-client.ts | 24 ++- .../src/generate/generate-arm-resource.ts | 3 +- .../src/generate/generate-client.ts | 14 +- .../openapi-to-typespec/src/interfaces.ts | 4 +- .../src/transforms/transform-arm-resources.ts | 36 ++-- .../src/transforms/transform-object.ts | 6 +- .../src/utils/decorators.ts | 6 +- .../openapi-to-typespec/src/utils/imports.ts | 2 +- .../test/analyzeText/tsp-output/client.tsp | 3 - .../anomalyDetector/tsp-output/client.tsp | 3 - .../arm-agrifood/tsp-output/DataConnector.tsp | 4 +- .../tsp-output/DataManagerForAgriculture.tsp | 8 +- .../arm-agrifood/tsp-output/Extension.tsp | 4 +- .../tsp-output/PrivateEndpointConnection.tsp | 4 +- .../test/arm-agrifood/tsp-output/Solution.tsp | 4 +- .../test/arm-agrifood/tsp-output/client.tsp | 3 - .../arm-alertsmanagement/tsp-output/Alert.tsp | 5 +- .../tsp-output/AlertProcessingRule.tsp | 8 +- .../tsp-output/AnalysisServicesServer.tsp | 8 +- .../tsp-output/AccessInformationContract.tsp | 8 +- .../tsp-output/ApiContract.tsp | 8 +- .../ApiManagementServiceResource.tsp | 36 ++-- .../tsp-output/ApiReleaseContract.tsp | 8 +- .../tsp-output/ApiVersionSetContract.tsp | 8 +- .../AuthorizationServerContract.tsp | 8 +- .../tsp-output/BackendContract.tsp | 12 +- .../tsp-output/CacheContract.tsp | 8 +- .../tsp-output/CertificateContract.tsp | 4 +- .../tsp-output/DiagnosticContract.tsp | 8 +- .../tsp-output/EmailTemplateContract.tsp | 8 +- .../GatewayCertificateAuthorityContract.tsp | 4 +- .../tsp-output/GatewayContract.tsp | 16 +- .../GatewayHostnameConfigurationContract.tsp | 4 +- .../tsp-output/GlobalSchemaContract.tsp | 4 +- .../tsp-output/GroupContract.tsp | 8 +- .../tsp-output/IdentityProviderContract.tsp | 8 +- .../tsp-output/IssueAttachmentContract.tsp | 4 +- .../tsp-output/IssueCommentContract.tsp | 4 +- .../tsp-output/IssueContract.tsp | 8 +- .../tsp-output/LoggerContract.tsp | 8 +- .../tsp-output/NamedValueContract.tsp | 8 +- .../OpenidConnectProviderContract.tsp | 8 +- .../tsp-output/OperationContract.tsp | 8 +- .../tsp-output/PolicyContract.tsp | 4 +- .../tsp-output/PortalDelegationSettings.tsp | 9 +- .../tsp-output/PortalRevisionContract.tsp | 8 +- .../tsp-output/PortalSigninSettings.tsp | 9 +- .../tsp-output/PortalSignupSettings.tsp | 9 +- .../tsp-output/PrivateEndpointConnection.tsp | 4 +- .../tsp-output/ProductContract.tsp | 8 +- .../tsp-output/SchemaContract.tsp | 4 +- .../tsp-output/SubscriptionContract.tsp | 8 +- .../tsp-output/TagDescriptionContract.tsp | 4 +- .../tsp-output/UserContract.tsp | 12 +- .../arm-apimanagement/tsp-output/client.tsp | 8 + .../arm-apimanagement/tsp-output/models.tsp | 36 ++-- .../tsp-output/ProviderOperationsMetadata.tsp | 1 - .../tsp-output/RoleAssignment.tsp | 4 +- .../RoleAssignmentScheduleRequest.tsp | 8 +- .../tsp-output/RoleDefinition.tsp | 4 +- .../RoleEligibilityScheduleRequest.tsp | 8 +- .../tsp-output/RoleManagementPolicy.tsp | 4 +- .../RoleManagementPolicyAssignment.tsp | 4 +- .../arm-authorization/tsp-output/client.tsp | 4 + .../arm-authorization/tsp-output/models.tsp | 46 ++--- .../tsp-output/models.tsp | 2 +- .../tsp-output/AvailabilitySet.tsp | 8 +- .../tsp-output/CapacityReservation.tsp | 8 +- .../tsp-output/CapacityReservationGroup.tsp | 8 +- .../arm-compute/tsp-output/CloudService.tsp | 27 ++- .../arm-compute/tsp-output/DedicatedHost.tsp | 8 +- .../tsp-output/DedicatedHostGroup.tsp | 8 +- .../test/arm-compute/tsp-output/Disk.tsp | 12 +- .../arm-compute/tsp-output/DiskAccess.tsp | 8 +- .../tsp-output/DiskEncryptionSet.tsp | 8 +- .../tsp-output/DiskRestorePoint.tsp | 4 +- .../test/arm-compute/tsp-output/Gallery.tsp | 14 +- .../tsp-output/GalleryApplication.tsp | 8 +- .../tsp-output/GalleryApplicationVersion.tsp | 8 +- .../arm-compute/tsp-output/GalleryImage.tsp | 8 +- .../tsp-output/GalleryImageVersion.tsp | 8 +- .../test/arm-compute/tsp-output/Image.tsp | 9 +- .../tsp-output/PrivateEndpointConnection.tsp | 4 +- .../tsp-output/ProximityPlacementGroup.tsp | 8 +- .../arm-compute/tsp-output/RestorePoint.tsp | 4 +- .../tsp-output/RestorePointCollection.tsp | 8 +- .../test/arm-compute/tsp-output/Snapshot.tsp | 13 +- .../tsp-output/SshPublicKeyResource.tsp | 8 +- .../arm-compute/tsp-output/VirtualMachine.tsp | 26 ++- .../tsp-output/VirtualMachineExtension.tsp | 8 +- .../tsp-output/VirtualMachineRunCommand.tsp | 8 +- .../tsp-output/VirtualMachineScaleSet.tsp | 56 ++--- .../VirtualMachineScaleSetExtension.tsp | 8 +- .../tsp-output/VirtualMachineScaleSetVM.tsp | 12 +- .../VirtualMachineScaleSetVMExtension.tsp | 8 +- .../test/arm-compute/tsp-output/models.tsp | 20 +- .../test/arm-dns/tsp-output/DnsRecord.tsp | 9 +- .../test/arm-dns/tsp-output/DnsZone.tsp | 9 +- .../test/arm-dns/tsp-output/models.tsp | 38 ++-- .../BatchDeploymentTrackedResource.tsp | 8 +- .../BatchEndpointTrackedResource.tsp | 8 +- .../tsp-output/CodeContainerResource.tsp | 4 +- .../tsp-output/CodeVersionResource.tsp | 4 +- .../tsp-output/ComponentContainerResource.tsp | 4 +- .../tsp-output/ComponentVersionResource.tsp | 4 +- .../tsp-output/ComputeResource.tsp | 8 +- .../tsp-output/DataContainerResource.tsp | 4 +- .../tsp-output/DataVersionBaseResource.tsp | 4 +- .../tsp-output/DatastoreResource.tsp | 4 +- .../EnvironmentContainerResource.tsp | 4 +- .../tsp-output/EnvironmentVersionResource.tsp | 4 +- .../tsp-output/FeaturesetContainer.tsp | 4 +- .../tsp-output/FeaturesetVersion.tsp | 4 +- .../FeaturestoreEntityContainer.tsp | 4 +- .../tsp-output/FeaturestoreEntityVersion.tsp | 4 +- .../tsp-output/JobBaseResource.tsp | 9 +- .../tsp-output/LabelingJob.tsp | 4 +- .../tsp-output/ModelContainerResource.tsp | 4 +- .../tsp-output/ModelVersionResource.tsp | 4 +- .../OnlineDeploymentTrackedResource.tsp | 8 +- .../OnlineEndpointTrackedResource.tsp | 8 +- .../tsp-output/OutboundRuleBasicResource.tsp | 4 +- .../tsp-output/PrivateEndpointConnection.tsp | 4 +- .../tsp-output/Registry.tsp | 10 +- .../tsp-output/Schedule.tsp | 5 +- .../tsp-output/Workspace.tsp | 10 +- ...aceConnectionPropertiesV2BasicResource.tsp | 8 +- .../test/arm-sphere/tsp-output/Catalog.tsp | 4 +- .../arm-sphere/tsp-output/Certificate.tsp | 4 +- .../test/arm-sphere/tsp-output/Device.tsp | 4 +- .../arm-sphere/tsp-output/DeviceGroup.tsp | 4 +- .../arm-storage/tsp-output/BlobContainer.tsp | 21 +- .../tsp-output/BlobInventoryPolicy.tsp | 4 +- .../tsp-output/BlobServiceProperties.tsp | 5 +- .../tsp-output/EncryptionScope.tsp | 8 +- .../tsp-output/FileServiceProperties.tsp | 5 +- .../test/arm-storage/tsp-output/FileShare.tsp | 20 +- .../tsp-output/ImmutabilityPolicy.tsp | 8 +- .../test/arm-storage/tsp-output/LocalUser.tsp | 4 +- .../tsp-output/ManagementPolicy.tsp | 4 +- .../tsp-output/ObjectReplicationPolicy.tsp | 4 +- .../tsp-output/PrivateEndpointConnection.tsp | 4 +- .../tsp-output/QueueServiceProperties.tsp | 5 +- .../arm-storage/tsp-output/StorageAccount.tsp | 24 +-- .../arm-storage/tsp-output/StorageQueue.tsp | 10 +- .../test/arm-storage/tsp-output/Table.tsp | 10 +- .../tsp-output/TableServiceProperties.tsp | 5 +- .../test/arm-storage/tsp-output/client.tsp | 8 + .../test/arm-storage/tsp-output/models.tsp | 100 ++++----- .../test/batch/tsp-output/client.tsp | 3 - .../test/batch/tsp-output/models.tsp | 32 +-- .../test/bodyComplex/tsp-output/models.tsp | 10 +- .../test/complexObject/tsp-output/client.tsp | 3 - .../test/complexObject/tsp-output/models.tsp | 4 +- .../confidentialLedger/tsp-output/client.tsp | 3 - .../test/keyvault/tsp-output/models.tsp | 192 +++++++++--------- .../test/loadTest/tsp-output/client.tsp | 3 - .../test/nh/tsp-output/client.tsp | 3 - .../test/nh/tsp-output/models.tsp | 126 ++++++------ .../test/openAI/tsp-output/client.tsp | 3 - .../test/openAI/tsp-output/models.tsp | 26 +-- .../test/pagination/tsp-output/client.tsp | 3 - .../test/pagination/tsp-output/models.tsp | 4 +- .../test/qna/tsp-output/client.tsp | 3 - .../test/qna/tsp-output/models.tsp | 28 +-- .../test/qnaAuthoring/tsp-output/client.tsp | 3 - .../test/qnaRuntime/tsp-output/client.tsp | 3 - .../test/schemaRegistry/tsp-output/client.tsp | 3 - .../test/url/tsp-output/client.tsp | 3 - .../test/webpubsub/tsp-output/client.tsp | 3 - 171 files changed, 972 insertions(+), 884 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/projectedName_2024-02-19-02-17.json delete mode 100644 packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/client.tsp delete mode 100644 packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/client.tsp delete mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/client.tsp delete mode 100644 packages/extensions/openapi-to-typespec/test/batch/tsp-output/client.tsp delete mode 100644 packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/client.tsp delete mode 100644 packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/client.tsp delete mode 100644 packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/client.tsp delete mode 100644 packages/extensions/openapi-to-typespec/test/nh/tsp-output/client.tsp delete mode 100644 packages/extensions/openapi-to-typespec/test/openAI/tsp-output/client.tsp delete mode 100644 packages/extensions/openapi-to-typespec/test/pagination/tsp-output/client.tsp delete mode 100644 packages/extensions/openapi-to-typespec/test/qna/tsp-output/client.tsp delete mode 100644 packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/client.tsp delete mode 100644 packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/client.tsp delete mode 100644 packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/client.tsp delete mode 100644 packages/extensions/openapi-to-typespec/test/url/tsp-output/client.tsp delete mode 100644 packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/client.tsp diff --git a/common/changes/@autorest/openapi-to-typespec/projectedName_2024-02-19-02-17.json b/common/changes/@autorest/openapi-to-typespec/projectedName_2024-02-19-02-17.json new file mode 100644 index 0000000000..87410db5b7 --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/projectedName_2024-02-19-02-17.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "migrate `@projectedName` to `@encodedName`", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-client.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-client.ts index a7aa5120c4..78b17bce01 100644 --- a/packages/extensions/openapi-to-typespec/src/emiters/emit-client.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-client.ts @@ -1,6 +1,7 @@ import { getSession } from "../autorest-session"; -import { generateObjectClientDecorator } from "../generate/generate-client"; +import { generateArmResourceClientDecorator, generateObjectClientDecorator } from "../generate/generate-client"; import { TypespecProgram } from "../interfaces"; +import { getOptions } from "../options"; import { formatTypespecFile } from "../utils/format"; import { getClientImports } from "../utils/imports"; import { getNamespace } from "../utils/namespace"; @@ -8,16 +9,33 @@ import { getNamespace } from "../utils/namespace"; export async function emitClient(filePath: string, program: TypespecProgram): Promise { const content = generateClient(program); + if (content === "") { + return; + } const session = getSession(); session.writeFile({ filename: filePath, content: await formatTypespecFile(content, filePath) }); } function generateClient(program: TypespecProgram) { + const { isArm } = getOptions(); const { models } = program; const { modules, namespaces: namespacesSet } = getClientImports(program); const imports = [...new Set([`import "./main.tsp";`, ...modules])].join("\n"); const namespaces = [...new Set([...namespacesSet, `using ${getNamespace(program)};`])].join("\n"); - const objects = models.objects.map(generateObjectClientDecorator).join("\n\n"); - return [imports, "\n", namespaces, "\n", objects].join("\n"); + const objects = models.objects + .map(generateObjectClientDecorator) + .filter((r) => r !== "") + .join("\n\n"); + + const armResources = isArm + ? models.armResources + .map(generateArmResourceClientDecorator) + .filter((r) => r !== "") + .join("\n\n") + : ""; + if (objects === "" && armResources === "") { + return ""; + } + return [imports, "\n", namespaces, "\n", objects, "\n", armResources].join("\n"); } diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts index 76496cf547..ed330ef2fb 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts @@ -21,7 +21,7 @@ export function generateArmResource(resource: TspArmResource): string { definitions.push("\n"); for (const o of resource.resourceOperations) { - for (const d of o.augmentedDecorators ?? []) { + for (const d of o.customizations ?? []) { definitions.push(`${d}`); } } @@ -107,7 +107,6 @@ function generateArmResourceOperation(resource: TspArmResource): string { definitions.push("@armResourceOperations"); if (resource.name === formalOperationGroupName) { - definitions.push(`@projectedName("client", "${formalOperationGroupName}")`); definitions.push(`interface ${formalOperationGroupName}OperationGroup {`); } else { definitions.push(`interface ${formalOperationGroupName} {`); diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-client.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-client.ts index 0be75bbf2f..c340012081 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-client.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-client.ts @@ -1,4 +1,5 @@ -import { TypespecObject } from "../interfaces"; +import pluralize from "pluralize"; +import { TspArmResource, TypespecObject } from "../interfaces"; import { generateAugmentedDecorators } from "../utils/decorators"; export function generateObjectClientDecorator(typespecObject: TypespecObject) { @@ -7,10 +8,19 @@ export function generateObjectClientDecorator(typespecObject: TypespecObject) { for (const property of typespecObject.properties) { const decorators = generateAugmentedDecorators( `${typespecObject.name}.${property.name}`, - property.augmentedDecorators, + property.clientDecorators, ); decorators && definitions.push(decorators); } return definitions.join("\n"); } + +export function generateArmResourceClientDecorator(resource: TspArmResource): string { + const formalOperationGroupName = pluralize(resource.name); + + if (resource.name === formalOperationGroupName) { + return `@@clientName(${formalOperationGroupName}OperationGroup, "${formalOperationGroupName}")`; + } + return ""; +} diff --git a/packages/extensions/openapi-to-typespec/src/interfaces.ts b/packages/extensions/openapi-to-typespec/src/interfaces.ts index 2a3c4d6507..6131194625 100644 --- a/packages/extensions/openapi-to-typespec/src/interfaces.ts +++ b/packages/extensions/openapi-to-typespec/src/interfaces.ts @@ -146,7 +146,7 @@ export interface TypespecObjectProperty extends TypespecDataType { isOptional: boolean; type: string; decorators?: TypespecDecorator[]; - augmentedDecorators?: TypespecDecorator[]; + clientDecorators?: TypespecDecorator[]; defaultValue?: any; } @@ -202,7 +202,7 @@ export interface TspArmResourceOperationBase extends WithDoc, WithFixMe { decorators?: TypespecDecorator[]; operationId?: string; examples?: Record>; - augmentedDecorators?: string[]; + customizations?: string[]; } export type TspArmResourceOperation = diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts index e3cb2c9187..a3f5e50fd9 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts @@ -244,18 +244,18 @@ function convertResourceCreateOrReplaceOperation( } const tspOperationGroupName = getTSPOperationGroupName(resourceMetadata.SwaggerModelName); const operationName = getOperationName(operation.OperationID); - const augmentedDecorators = []; + const customizations = []; if (bodyParam) { if (bodyParam.language.default.name !== "resource") { - augmentedDecorators.push( - `@@projectedName(${tspOperationGroupName}.\`${operationName}\`::parameters.resource, "json", "${bodyParam.language.default.name}");`, + customizations.push( + `@@encodedName(${tspOperationGroupName}.\`${operationName}\`::parameters.resource, "application/json", "${bodyParam.language.default.name}");`, ); - augmentedDecorators.push( + customizations.push( `@@extension(${tspOperationGroupName}.\`${operationName}\`::parameters.resource, "x-ms-client-name", "${bodyParam.language.default.name}");`, ); } if (bodyParam.language.default.description !== "Resource create parameters.") { - augmentedDecorators.push( + customizations.push( `@@doc(${tspOperationGroupName}.\`${operationName}\`::parameters.resource, "${bodyParam.language.default.description}");`, ); } @@ -268,7 +268,7 @@ function convertResourceCreateOrReplaceOperation( operationId: operation.OperationID, templateParameters: templateParameters, examples: swaggerOperation.extensions?.["x-ms-examples"], - augmentedDecorators, + customizations, }, ]; } @@ -297,7 +297,7 @@ function convertResourceUpdateOperation( } let kind; const templateParameters = [resourceMetadata.SwaggerModelName]; - const augmentedDecorators = []; + const customizations = []; if (bodyParam) { kind = isLongRunning ? "ArmCustomPatchAsync" : "ArmCustomPatchSync"; templateParameters.push(bodyParam.schema.language.default.name); @@ -305,15 +305,15 @@ function convertResourceUpdateOperation( const tspOperationGroupName = getTSPOperationGroupName(resourceMetadata.SwaggerModelName); const operationName = getOperationName(operation.OperationID); if (bodyParam.language.default.name !== "properties") { - augmentedDecorators.push( - `@@projectedName(${tspOperationGroupName}.\`${operationName}\`::parameters.properties, "json", "${bodyParam.language.default.name}");`, + customizations.push( + `@@encodedName(${tspOperationGroupName}.\`${operationName}\`::parameters.properties, "application/json", "${bodyParam.language.default.name}");`, ); - augmentedDecorators.push( + customizations.push( `@@extension(${tspOperationGroupName}.\`${operationName}\`::parameters.properties, "x-ms-client-name", "${bodyParam.language.default.name}");`, ); } if (bodyParam.language.default.description !== "The resource properties to be updated.") { - augmentedDecorators.push( + customizations.push( `@@doc(${tspOperationGroupName}.\`${operationName}\`::parameters.properties, "${bodyParam.language.default.description}");`, ); } @@ -333,7 +333,7 @@ function convertResourceUpdateOperation( operationId: operation.OperationID, templateParameters, examples: swaggerOperation.extensions?.["x-ms-examples"], - augmentedDecorators, + customizations, // To resolve auto-generate update model with proper visibility decorators: [{ name: "parameterVisibility", arguments: ["read"] }], }, @@ -525,18 +525,18 @@ function convertResourceActionOperations( const tspOperationGroupName = getTSPOperationGroupName(resourceMetadata.SwaggerModelName); const operationName = getOperationName(operation.OperationID); - const augmentedDecorators = []; + const customizations = []; if (bodyParam) { if (bodyParam.language.default.name !== "body") { - augmentedDecorators.push( - `@@projectedName(${tspOperationGroupName}.\`${operationName}\`::parameters.body, "json", "${bodyParam.language.default.name}");`, + customizations.push( + `@@encodedName(${tspOperationGroupName}.\`${operationName}\`::parameters.body, "application/json", "${bodyParam.language.default.name}");`, ); - augmentedDecorators.push( + customizations.push( `@@extension(${tspOperationGroupName}.\`${operationName}\`::parameters.body, "x-ms-client-name", "${bodyParam.language.default.name}");`, ); } if (bodyParam.language.default.description !== "The content of the action request") { - augmentedDecorators.push( + customizations.push( `@@doc(${tspOperationGroupName}.\`${operationName}\`::parameters.body, "${bodyParam.language.default.description}");`, ); } @@ -548,7 +548,7 @@ function convertResourceActionOperations( operationId: operation.OperationID, templateParameters, examples: swaggerOperation.extensions?.["x-ms-examples"], - augmentedDecorators, + customizations, }); } } diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts index cc7d6bd64d..6c0b5b5aef 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts @@ -14,7 +14,7 @@ import { get } from "lodash"; import { getDataTypes } from "../data-types"; import { TypespecObject, TypespecObjectProperty } from "../interfaces"; import { addCorePageAlias } from "../utils/alias"; -import { getModelDecorators, getPropertyAugmentedDecorators, getPropertyDecorators } from "../utils/decorators"; +import { getModelDecorators, getPropertyClientDecorators, getPropertyDecorators } from "../utils/decorators"; import { getDiscriminator, getOwnDiscriminator } from "../utils/discriminator"; import { getLogger } from "../utils/logger"; import { @@ -127,7 +127,7 @@ export function transformObjectProperty(propertySchema: Property, codeModel: Cod isOptional: propertySchema.required !== true, type: visited.name, decorators: getPropertyDecorators(propertySchema), - augmentedDecorators: getPropertyAugmentedDecorators(propertySchema), + clientDecorators: getPropertyClientDecorators(propertySchema), defaultValue: getDefaultValue(visited.name, propertySchema.schema), }; } @@ -144,7 +144,7 @@ export function transformObjectProperty(propertySchema: Property, codeModel: Cod isOptional: propertySchema.required !== true, type, decorators: getPropertyDecorators(propertySchema), - augmentedDecorators: getPropertyAugmentedDecorators(propertySchema), + clientDecorators: getPropertyClientDecorators(propertySchema), fixMe: getFixme(propertySchema, codeModel), defaultValue: getDefaultValue(type, propertySchema.schema), }; diff --git a/packages/extensions/openapi-to-typespec/src/utils/decorators.ts b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts index a06d07a50e..fddf1eedba 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/decorators.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts @@ -132,15 +132,15 @@ export function getPropertyDecorators(element: Property | Parameter): TypespecDe if (!isParameter(element) && element.serializedName !== element.language.default.name) { decorators.push({ - name: "projectedName", - arguments: ["json", (element as Property).serializedName], + name: "encodedName", + arguments: ["application/json", (element as Property).serializedName], }); } return decorators; } -export function getPropertyAugmentedDecorators(element: Property | Parameter): TypespecDecorator[] { +export function getPropertyClientDecorators(element: Property | Parameter): TypespecDecorator[] { const decorators: TypespecDecorator[] = []; if (element.extensions?.["x-ms-client-flatten"]) { diff --git a/packages/extensions/openapi-to-typespec/src/utils/imports.ts b/packages/extensions/openapi-to-typespec/src/utils/imports.ts index c51c52cd23..bff41f371e 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/imports.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/imports.ts @@ -48,7 +48,7 @@ export function getClientImports(program: TypespecProgram) { const namespaces = new Set(); for (const model of program.models.objects) { for (const property of model.properties) { - for (const decorator of property.augmentedDecorators ?? []) { + for (const decorator of property.clientDecorators ?? []) { decorator.module && modules.add(`import "${decorator.module}";`); decorator.namespace && namespaces.add(`using ${decorator.namespace};`); } diff --git a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/client.tsp deleted file mode 100644 index 351ef61b80..0000000000 --- a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using Azure.Language.Authoring; diff --git a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/client.tsp deleted file mode 100644 index bd9016fa17..0000000000 --- a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using AnomalyDetectorClient; diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp index 8f0ba5db8b..a70cdc0a50 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp @@ -86,8 +86,8 @@ interface DataConnectors { >; } -@@projectedName(DataConnectors.createOrUpdate::parameters.resource, - "json", +@@encodedName(DataConnectors.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(DataConnectors.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp index 065df482bb..11605b34a4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp @@ -111,8 +111,8 @@ interface DataManagerForAgricultures { listBySubscription is ArmListBySubscription; } -@@projectedName(DataManagerForAgricultures.createOrUpdate::parameters.resource, - "json", +@@encodedName(DataManagerForAgricultures.createOrUpdate::parameters.resource, + "application/json", "request" ); @@extension(DataManagerForAgricultures.createOrUpdate::parameters.resource, @@ -122,8 +122,8 @@ interface DataManagerForAgricultures { @@doc(DataManagerForAgricultures.createOrUpdate::parameters.resource, "Data Manager For Agriculture resource create or update request object." ); -@@projectedName(DataManagerForAgricultures.update::parameters.properties, - "json", +@@encodedName(DataManagerForAgricultures.update::parameters.properties, + "application/json", "request" ); @@extension(DataManagerForAgricultures.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp index 2161f75caf..25b785ac1d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp @@ -102,8 +102,8 @@ interface Extensions { >; } -@@projectedName(Extensions.createOrUpdate::parameters.resource, - "json", +@@encodedName(Extensions.createOrUpdate::parameters.resource, + "application/json", "requestBody" ); @@extension(Extensions.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp index 1adb39b3b9..4362df2db9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp @@ -64,8 +64,8 @@ interface PrivateEndpointConnections { listByResource is ArmResourceListByParent; } -@@projectedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, - "json", +@@encodedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, + "application/json", "request" ); @@extension(PrivateEndpointConnections.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp index d07230b64b..047461bc7f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp @@ -155,8 +155,8 @@ interface Solutions { >; } -@@projectedName(Solutions.createOrUpdate::parameters.resource, - "json", +@@encodedName(Solutions.createOrUpdate::parameters.resource, + "application/json", "requestBody" ); @@extension(Solutions.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/client.tsp deleted file mode 100644 index 4b16e4947c..0000000000 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using Azure.ResourceManager.AgFoodPlatform; diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp index 65b10d288c..bbe5921a26 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp @@ -200,6 +200,9 @@ interface Alerts { >; } -@@projectedName(Alerts.changeState::parameters.body, "json", "comment"); +@@encodedName(Alerts.changeState::parameters.body, + "application/json", + "comment" +); @@extension(Alerts.changeState::parameters.body, "x-ms-client-name", "comment"); @@doc(Alerts.changeState::parameters.body, "reason of change alert state"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp index ba47f33b73..cc4a930fc3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp @@ -73,8 +73,8 @@ interface AlertProcessingRules { listBySubscription is ArmListBySubscription; } -@@projectedName(AlertProcessingRules.createOrUpdate::parameters.resource, - "json", +@@encodedName(AlertProcessingRules.createOrUpdate::parameters.resource, + "application/json", "alertProcessingRule" ); @@extension(AlertProcessingRules.createOrUpdate::parameters.resource, @@ -84,8 +84,8 @@ interface AlertProcessingRules { @@doc(AlertProcessingRules.createOrUpdate::parameters.resource, "Alert processing rule to be created/updated." ); -@@projectedName(AlertProcessingRules.update::parameters.properties, - "json", +@@encodedName(AlertProcessingRules.update::parameters.properties, + "application/json", "alertProcessingRulePatch" ); @@extension(AlertProcessingRules.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp index 310c1a6969..2627e61524 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp @@ -176,8 +176,8 @@ interface AnalysisServicesServers { >; } -@@projectedName(AnalysisServicesServers.create::parameters.resource, - "json", +@@encodedName(AnalysisServicesServers.create::parameters.resource, + "application/json", "serverParameters" ); @@extension(AnalysisServicesServers.create::parameters.resource, @@ -187,8 +187,8 @@ interface AnalysisServicesServers { @@doc(AnalysisServicesServers.create::parameters.resource, "Contains the information used to provision the Analysis Services server." ); -@@projectedName(AnalysisServicesServers.update::parameters.properties, - "json", +@@encodedName(AnalysisServicesServers.update::parameters.properties, + "application/json", "serverUpdateParameters" ); @@extension(AnalysisServicesServers.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp index 19a78dd981..251cc83a38 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp @@ -169,8 +169,8 @@ interface AccessInformationContracts { >; } -@@projectedName(AccessInformationContracts.create::parameters.resource, - "json", +@@encodedName(AccessInformationContracts.create::parameters.resource, + "application/json", "parameters" ); @@extension(AccessInformationContracts.create::parameters.resource, @@ -180,8 +180,8 @@ interface AccessInformationContracts { @@doc(AccessInformationContracts.create::parameters.resource, "Parameters supplied to retrieve the Tenant Access Information." ); -@@projectedName(AccessInformationContracts.update::parameters.properties, - "json", +@@encodedName(AccessInformationContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(AccessInformationContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp index 9cb90c3960..faa3cf4b22 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp @@ -355,8 +355,8 @@ interface ApiContracts { >; } -@@projectedName(ApiContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(ApiContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(ApiContracts.createOrUpdate::parameters.resource, @@ -366,8 +366,8 @@ interface ApiContracts { @@doc(ApiContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@projectedName(ApiContracts.update::parameters.properties, - "json", +@@encodedName(ApiContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(ApiContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp index 352a728685..c606302a52 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp @@ -1371,8 +1371,8 @@ interface ApiManagementServiceResources { >; } -@@projectedName(ApiManagementServiceResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(ApiManagementServiceResources.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(ApiManagementServiceResources.createOrUpdate::parameters.resource, @@ -1382,8 +1382,8 @@ interface ApiManagementServiceResources { @@doc(ApiManagementServiceResources.createOrUpdate::parameters.resource, "Parameters supplied to the CreateOrUpdate API Management service operation." ); -@@projectedName(ApiManagementServiceResources.update::parameters.properties, - "json", +@@encodedName(ApiManagementServiceResources.update::parameters.properties, + "application/json", "parameters" ); @@extension(ApiManagementServiceResources.update::parameters.properties, @@ -1393,8 +1393,8 @@ interface ApiManagementServiceResources { @@doc(ApiManagementServiceResources.update::parameters.properties, "Parameters supplied to the CreateOrUpdate API Management service operation." ); -@@projectedName(ApiManagementServiceResources.performConnectivityCheckAsync::parameters.body, - "json", +@@encodedName(ApiManagementServiceResources.performConnectivityCheckAsync::parameters.body, + "application/json", "connectivityCheckRequestParams" ); @@extension(ApiManagementServiceResources.performConnectivityCheckAsync::parameters.body, @@ -1404,8 +1404,8 @@ interface ApiManagementServiceResources { @@doc(ApiManagementServiceResources.performConnectivityCheckAsync::parameters.body, "Connectivity Check request parameters." ); -@@projectedName(ApiManagementServiceResources.restore::parameters.body, - "json", +@@encodedName(ApiManagementServiceResources.restore::parameters.body, + "application/json", "parameters" ); @@extension(ApiManagementServiceResources.restore::parameters.body, @@ -1415,8 +1415,8 @@ interface ApiManagementServiceResources { @@doc(ApiManagementServiceResources.restore::parameters.body, "Parameters supplied to the Restore API Management service from backup operation." ); -@@projectedName(ApiManagementServiceResources.backup::parameters.body, - "json", +@@encodedName(ApiManagementServiceResources.backup::parameters.body, + "application/json", "parameters" ); @@extension(ApiManagementServiceResources.backup::parameters.body, @@ -1426,8 +1426,8 @@ interface ApiManagementServiceResources { @@doc(ApiManagementServiceResources.backup::parameters.body, "Parameters supplied to the ApiManagementService_Backup operation." ); -@@projectedName(ApiManagementServiceResources.applyNetworkConfigurationUpdates::parameters.body, - "json", +@@encodedName(ApiManagementServiceResources.applyNetworkConfigurationUpdates::parameters.body, + "application/json", "parameters" ); @@extension(ApiManagementServiceResources.applyNetworkConfigurationUpdates::parameters.body, @@ -1437,8 +1437,8 @@ interface ApiManagementServiceResources { @@doc(ApiManagementServiceResources.applyNetworkConfigurationUpdates::parameters.body, "Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region." ); -@@projectedName(ApiManagementServiceResources.deploy::parameters.body, - "json", +@@encodedName(ApiManagementServiceResources.deploy::parameters.body, + "application/json", "parameters" ); @@extension(ApiManagementServiceResources.deploy::parameters.body, @@ -1448,8 +1448,8 @@ interface ApiManagementServiceResources { @@doc(ApiManagementServiceResources.deploy::parameters.body, "Deploy Configuration parameters." ); -@@projectedName(ApiManagementServiceResources.save::parameters.body, - "json", +@@encodedName(ApiManagementServiceResources.save::parameters.body, + "application/json", "parameters" ); @@extension(ApiManagementServiceResources.save::parameters.body, @@ -1459,8 +1459,8 @@ interface ApiManagementServiceResources { @@doc(ApiManagementServiceResources.save::parameters.body, "Save Configuration parameters." ); -@@projectedName(ApiManagementServiceResources.validate::parameters.body, - "json", +@@encodedName(ApiManagementServiceResources.validate::parameters.body, + "application/json", "parameters" ); @@extension(ApiManagementServiceResources.validate::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp index 9d1bc1c02e..9e28f034d4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp @@ -150,8 +150,8 @@ interface ApiReleaseContracts { >; } -@@projectedName(ApiReleaseContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(ApiReleaseContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(ApiReleaseContracts.createOrUpdate::parameters.resource, @@ -161,8 +161,8 @@ interface ApiReleaseContracts { @@doc(ApiReleaseContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@projectedName(ApiReleaseContracts.update::parameters.properties, - "json", +@@encodedName(ApiReleaseContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(ApiReleaseContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp index ba145d4adb..304113e1e3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp @@ -152,8 +152,8 @@ interface ApiVersionSetContracts { >; } -@@projectedName(ApiVersionSetContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(ApiVersionSetContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(ApiVersionSetContracts.createOrUpdate::parameters.resource, @@ -163,8 +163,8 @@ interface ApiVersionSetContracts { @@doc(ApiVersionSetContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@projectedName(ApiVersionSetContracts.update::parameters.properties, - "json", +@@encodedName(ApiVersionSetContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(ApiVersionSetContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp index 66e46debc5..06ead68a81 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp @@ -163,8 +163,8 @@ interface AuthorizationServerContracts { >; } -@@projectedName(AuthorizationServerContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(AuthorizationServerContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(AuthorizationServerContracts.createOrUpdate::parameters.resource, @@ -174,8 +174,8 @@ interface AuthorizationServerContracts { @@doc(AuthorizationServerContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@projectedName(AuthorizationServerContracts.update::parameters.properties, - "json", +@@encodedName(AuthorizationServerContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(AuthorizationServerContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp index a4b9186389..2278cc7eeb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp @@ -159,8 +159,8 @@ interface BackendContracts { >; } -@@projectedName(BackendContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(BackendContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(BackendContracts.createOrUpdate::parameters.resource, @@ -170,8 +170,8 @@ interface BackendContracts { @@doc(BackendContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@projectedName(BackendContracts.update::parameters.properties, - "json", +@@encodedName(BackendContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(BackendContracts.update::parameters.properties, @@ -179,8 +179,8 @@ interface BackendContracts { "parameters" ); @@doc(BackendContracts.update::parameters.properties, "Update parameters."); -@@projectedName(BackendContracts.reconnect::parameters.body, - "json", +@@encodedName(BackendContracts.reconnect::parameters.body, + "application/json", "parameters" ); @@extension(BackendContracts.reconnect::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp index 209e2fe1b1..cd2c5b484a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp @@ -141,8 +141,8 @@ interface CacheContracts { >; } -@@projectedName(CacheContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(CacheContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(CacheContracts.createOrUpdate::parameters.resource, @@ -152,8 +152,8 @@ interface CacheContracts { @@doc(CacheContracts.createOrUpdate::parameters.resource, "Create or Update parameters." ); -@@projectedName(CacheContracts.update::parameters.properties, - "json", +@@encodedName(CacheContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(CacheContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp index 4944ab4a5d..c9282fe490 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp @@ -149,8 +149,8 @@ interface CertificateContracts { >; } -@@projectedName(CertificateContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(CertificateContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(CertificateContracts.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp index c3ac673e15..8027967888 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp @@ -150,8 +150,8 @@ interface DiagnosticContracts { >; } -@@projectedName(DiagnosticContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(DiagnosticContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(DiagnosticContracts.createOrUpdate::parameters.resource, @@ -161,8 +161,8 @@ interface DiagnosticContracts { @@doc(DiagnosticContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@projectedName(DiagnosticContracts.update::parameters.properties, - "json", +@@encodedName(DiagnosticContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(DiagnosticContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp index 72c7b8cbb9..29dbd9b454 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp @@ -149,8 +149,8 @@ interface EmailTemplateContracts { >; } -@@projectedName(EmailTemplateContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(EmailTemplateContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(EmailTemplateContracts.createOrUpdate::parameters.resource, @@ -160,8 +160,8 @@ interface EmailTemplateContracts { @@doc(EmailTemplateContracts.createOrUpdate::parameters.resource, "Email Template update parameters." ); -@@projectedName(EmailTemplateContracts.update::parameters.properties, - "json", +@@encodedName(EmailTemplateContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(EmailTemplateContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp index 2e075622d4..356e09e5c8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp @@ -132,8 +132,8 @@ interface GatewayCertificateAuthorityContracts { >; } -@@projectedName(GatewayCertificateAuthorityContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(GatewayCertificateAuthorityContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(GatewayCertificateAuthorityContracts.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp index c8463e0957..9e5dab370f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp @@ -238,8 +238,8 @@ interface GatewayContracts { >; } -@@projectedName(GatewayContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(GatewayContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(GatewayContracts.createOrUpdate::parameters.resource, @@ -247,8 +247,8 @@ interface GatewayContracts { "parameters" ); @@doc(GatewayContracts.createOrUpdate::parameters.resource, ""); -@@projectedName(GatewayContracts.update::parameters.properties, - "json", +@@encodedName(GatewayContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(GatewayContracts.update::parameters.properties, @@ -256,8 +256,8 @@ interface GatewayContracts { "parameters" ); @@doc(GatewayContracts.update::parameters.properties, ""); -@@projectedName(GatewayContracts.regenerateKey::parameters.body, - "json", +@@encodedName(GatewayContracts.regenerateKey::parameters.body, + "application/json", "parameters" ); @@extension(GatewayContracts.regenerateKey::parameters.body, @@ -265,8 +265,8 @@ interface GatewayContracts { "parameters" ); @@doc(GatewayContracts.regenerateKey::parameters.body, ""); -@@projectedName(GatewayContracts.generateToken::parameters.body, - "json", +@@encodedName(GatewayContracts.generateToken::parameters.body, + "application/json", "parameters" ); @@extension(GatewayContracts.generateToken::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp index b863d06c95..daa553bf4e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp @@ -131,8 +131,8 @@ interface GatewayHostnameConfigurationContracts { >; } -@@projectedName(GatewayHostnameConfigurationContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(GatewayHostnameConfigurationContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(GatewayHostnameConfigurationContracts.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp index 74c467c31d..d137fc79e6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp @@ -131,8 +131,8 @@ interface GlobalSchemaContracts { >; } -@@projectedName(GlobalSchemaContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(GlobalSchemaContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(GlobalSchemaContracts.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp index 978d40a813..ece9f4108f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp @@ -207,8 +207,8 @@ interface GroupContracts { >; } -@@projectedName(GroupContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(GroupContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(GroupContracts.createOrUpdate::parameters.resource, @@ -216,8 +216,8 @@ interface GroupContracts { "parameters" ); @@doc(GroupContracts.createOrUpdate::parameters.resource, "Create parameters."); -@@projectedName(GroupContracts.update::parameters.properties, - "json", +@@encodedName(GroupContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(GroupContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp index 77027dc801..66002fcd65 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp @@ -136,8 +136,8 @@ interface IdentityProviderContracts { >; } -@@projectedName(IdentityProviderContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(IdentityProviderContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(IdentityProviderContracts.createOrUpdate::parameters.resource, @@ -147,8 +147,8 @@ interface IdentityProviderContracts { @@doc(IdentityProviderContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@projectedName(IdentityProviderContracts.update::parameters.properties, - "json", +@@encodedName(IdentityProviderContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(IdentityProviderContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp index 6522ff4ec2..3f65616092 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp @@ -132,8 +132,8 @@ interface IssueAttachmentContracts { >; } -@@projectedName(IssueAttachmentContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(IssueAttachmentContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(IssueAttachmentContracts.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp index 5e41901229..b25aa4a469 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp @@ -132,8 +132,8 @@ interface IssueCommentContracts { >; } -@@projectedName(IssueCommentContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(IssueCommentContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(IssueCommentContracts.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp index f0cef8a4a2..9c7d6dc99d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp @@ -164,8 +164,8 @@ interface IssueContracts { >; } -@@projectedName(IssueContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(IssueContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(IssueContracts.createOrUpdate::parameters.resource, @@ -173,8 +173,8 @@ interface IssueContracts { "parameters" ); @@doc(IssueContracts.createOrUpdate::parameters.resource, "Create parameters."); -@@projectedName(IssueContracts.update::parameters.properties, - "json", +@@encodedName(IssueContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(IssueContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp index f8e643f9bf..0f541ca7af 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp @@ -149,8 +149,8 @@ interface LoggerContracts { >; } -@@projectedName(LoggerContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(LoggerContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(LoggerContracts.createOrUpdate::parameters.resource, @@ -160,8 +160,8 @@ interface LoggerContracts { @@doc(LoggerContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@projectedName(LoggerContracts.update::parameters.properties, - "json", +@@encodedName(LoggerContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(LoggerContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp index 9747cc628e..332cd1c720 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp @@ -177,8 +177,8 @@ interface NamedValueContracts { >; } -@@projectedName(NamedValueContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(NamedValueContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(NamedValueContracts.createOrUpdate::parameters.resource, @@ -188,8 +188,8 @@ interface NamedValueContracts { @@doc(NamedValueContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@projectedName(NamedValueContracts.update::parameters.properties, - "json", +@@encodedName(NamedValueContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(NamedValueContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp index 925f366d0b..4040116438 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp @@ -197,8 +197,8 @@ interface OpenidConnectProviderContracts { >; } -@@projectedName(OpenidConnectProviderContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(OpenidConnectProviderContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(OpenidConnectProviderContracts.createOrUpdate::parameters.resource, @@ -208,8 +208,8 @@ interface OpenidConnectProviderContracts { @@doc(OpenidConnectProviderContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@projectedName(OpenidConnectProviderContracts.update::parameters.properties, - "json", +@@encodedName(OpenidConnectProviderContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(OpenidConnectProviderContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp index cf7df95123..b02b046b40 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp @@ -155,8 +155,8 @@ interface OperationContracts { >; } -@@projectedName(OperationContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(OperationContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(OperationContracts.createOrUpdate::parameters.resource, @@ -166,8 +166,8 @@ interface OperationContracts { @@doc(OperationContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@projectedName(OperationContracts.update::parameters.properties, - "json", +@@encodedName(OperationContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(OperationContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp index 84ee247673..67bcb01ed9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp @@ -114,8 +114,8 @@ interface PolicyContracts { listByOperation is ArmResourceListByParent; } -@@projectedName(PolicyContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(PolicyContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(PolicyContracts.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp index 81908a6ecd..64a99eaa1c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp @@ -37,7 +37,6 @@ model PortalDelegationSettings extends ProxyResourceBase { } @armResourceOperations -@projectedName("client", "PortalDelegationSettings") interface PortalDelegationSettingsOperationGroup { /** * Get Delegation Settings for the Portal. @@ -116,8 +115,8 @@ interface PortalDelegationSettingsOperationGroup { >; } -@@projectedName(PortalDelegationSettingsOperationGroup.createOrUpdate::parameters.resource, - "json", +@@encodedName(PortalDelegationSettingsOperationGroup.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(PortalDelegationSettingsOperationGroup.createOrUpdate::parameters.resource, @@ -127,8 +126,8 @@ interface PortalDelegationSettingsOperationGroup { @@doc(PortalDelegationSettingsOperationGroup.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@projectedName(PortalDelegationSettingsOperationGroup.update::parameters.properties, - "json", +@@encodedName(PortalDelegationSettingsOperationGroup.update::parameters.properties, + "application/json", "parameters" ); @@extension(PortalDelegationSettingsOperationGroup.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp index 152e5f39f0..3744027da1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp @@ -128,8 +128,8 @@ interface PortalRevisionContracts { >; } -@@projectedName(PortalRevisionContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(PortalRevisionContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(PortalRevisionContracts.createOrUpdate::parameters.resource, @@ -137,8 +137,8 @@ interface PortalRevisionContracts { "parameters" ); @@doc(PortalRevisionContracts.createOrUpdate::parameters.resource, ""); -@@projectedName(PortalRevisionContracts.update::parameters.properties, - "json", +@@encodedName(PortalRevisionContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(PortalRevisionContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp index f132fd68a1..00bd38e827 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp @@ -37,7 +37,6 @@ model PortalSigninSettings extends ProxyResourceBase { } @armResourceOperations -@projectedName("client", "PortalSigninSettings") interface PortalSigninSettingsOperationGroup { /** * Get Sign In Settings for the Portal @@ -105,8 +104,8 @@ interface PortalSigninSettingsOperationGroup { listByService is ArmResourceListByParent; } -@@projectedName(PortalSigninSettingsOperationGroup.createOrUpdate::parameters.resource, - "json", +@@encodedName(PortalSigninSettingsOperationGroup.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(PortalSigninSettingsOperationGroup.createOrUpdate::parameters.resource, @@ -116,8 +115,8 @@ interface PortalSigninSettingsOperationGroup { @@doc(PortalSigninSettingsOperationGroup.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@projectedName(PortalSigninSettingsOperationGroup.update::parameters.properties, - "json", +@@encodedName(PortalSigninSettingsOperationGroup.update::parameters.properties, + "application/json", "parameters" ); @@extension(PortalSigninSettingsOperationGroup.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp index c4b1831747..fda6c5b5de 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp @@ -37,7 +37,6 @@ model PortalSignupSettings extends ProxyResourceBase { } @armResourceOperations -@projectedName("client", "PortalSignupSettings") interface PortalSignupSettingsOperationGroup { /** * Get Sign Up Settings for the Portal @@ -105,8 +104,8 @@ interface PortalSignupSettingsOperationGroup { listByService is ArmResourceListByParent; } -@@projectedName(PortalSignupSettingsOperationGroup.createOrUpdate::parameters.resource, - "json", +@@encodedName(PortalSignupSettingsOperationGroup.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(PortalSignupSettingsOperationGroup.createOrUpdate::parameters.resource, @@ -116,8 +115,8 @@ interface PortalSignupSettingsOperationGroup { @@doc(PortalSignupSettingsOperationGroup.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@projectedName(PortalSignupSettingsOperationGroup.update::parameters.properties, - "json", +@@encodedName(PortalSignupSettingsOperationGroup.update::parameters.properties, + "application/json", "parameters" ); @@extension(PortalSignupSettingsOperationGroup.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp index 8667fc2e4f..f8c0de653c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp @@ -70,8 +70,8 @@ interface PrivateEndpointConnections { listByService is ArmResourceListByParent; } -@@projectedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, - "json", +@@encodedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, + "application/json", "privateEndpointConnectionRequest" ); @@extension(PrivateEndpointConnections.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp index f594361e49..30e2357e8e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp @@ -350,8 +350,8 @@ interface ProductContracts { >; } -@@projectedName(ProductContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(ProductContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(ProductContracts.createOrUpdate::parameters.resource, @@ -361,8 +361,8 @@ interface ProductContracts { @@doc(ProductContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@projectedName(ProductContracts.update::parameters.properties, - "json", +@@encodedName(ProductContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(ProductContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp index 3b6b372449..23c934ad6d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp @@ -135,8 +135,8 @@ interface SchemaContracts { >; } -@@projectedName(SchemaContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(SchemaContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(SchemaContracts.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp index d8a6466aca..aa7771a587 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp @@ -208,8 +208,8 @@ interface SubscriptionContracts { >; } -@@projectedName(SubscriptionContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(SubscriptionContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(SubscriptionContracts.createOrUpdate::parameters.resource, @@ -219,8 +219,8 @@ interface SubscriptionContracts { @@doc(SubscriptionContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@projectedName(SubscriptionContracts.update::parameters.properties, - "json", +@@encodedName(SubscriptionContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(SubscriptionContracts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp index a2bd6ed73f..d2a3983192 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp @@ -132,8 +132,8 @@ interface TagDescriptionContracts { >; } -@@projectedName(TagDescriptionContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(TagDescriptionContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(TagDescriptionContracts.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp index eb4f0bfddf..9a178440e5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp @@ -320,8 +320,8 @@ interface UserContracts { >; } -@@projectedName(UserContracts.createOrUpdate::parameters.resource, - "json", +@@encodedName(UserContracts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(UserContracts.createOrUpdate::parameters.resource, @@ -331,8 +331,8 @@ interface UserContracts { @@doc(UserContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@projectedName(UserContracts.update::parameters.properties, - "json", +@@encodedName(UserContracts.update::parameters.properties, + "application/json", "parameters" ); @@extension(UserContracts.update::parameters.properties, @@ -340,8 +340,8 @@ interface UserContracts { "parameters" ); @@doc(UserContracts.update::parameters.properties, "Update parameters."); -@@projectedName(UserContracts.getSharedAccessToken::parameters.body, - "json", +@@encodedName(UserContracts.getSharedAccessToken::parameters.body, + "application/json", "parameters" ); @@extension(UserContracts.getSharedAccessToken::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/client.tsp index 74d62021b8..a6533b63d3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/client.tsp @@ -141,3 +141,11 @@ using Azure.ResourceManager.ApiManagement; #suppress "deprecated" "@flattenProperty decorator is not recommended to use." @@flattenProperty(QuotaCounterValueContract.value); + +@@clientName(PortalSigninSettingsOperationGroup, "PortalSigninSettings"); + +@@clientName(PortalSignupSettingsOperationGroup, "PortalSignupSettings"); + +@@clientName(PortalDelegationSettingsOperationGroup, + "PortalDelegationSettings" +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp index a5914ea526..7d93036c34 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp @@ -1087,7 +1087,7 @@ model ApiEntityBaseContract { /** * Type of API. */ - @projectedName("json", "type") + @encodedName("application/json", "type") apiType?: ApiType; /** @@ -1134,7 +1134,7 @@ model ApiEntityBaseContract { /** * Specifies whether an API or Product subscription is required for accessing the API. */ - @projectedName("json", "subscriptionRequired") + @encodedName("application/json", "subscriptionRequired") IsSubscriptionRequired?: boolean; /** @@ -1347,7 +1347,7 @@ model ApiCreateOrUpdateProperties extends ApiContractProperties { * * `websocket` creates websocket API * * `graphql` creates GraphQL API. */ - @projectedName("json", "apiType") + @encodedName("application/json", "apiType") soapApiType?: SoapApiType; } @@ -1804,13 +1804,13 @@ model ProductEntityBaseParameters { /** * Whether a product subscription is required for accessing APIs included in this product. If true, the product is referred to as "protected" and a valid subscription key is required for a request to an API included in the product to succeed. If false, the product is referred to as "open" and requests to an API included in the product can be made without a subscription key. If property is omitted when creating a new product it's value is assumed to be true. */ - @projectedName("json", "subscriptionRequired") + @encodedName("application/json", "subscriptionRequired") IsSubscriptionRequired?: boolean; /** * whether subscription approval is required. If false, new subscriptions will be approved automatically enabling developers to call the product’s APIs immediately after subscribing. If true, administrators must manually approve the subscription before the developer can any of the product’s APIs. Can be present only if subscriptionRequired property is present and has a value of false. */ - @projectedName("json", "approvalRequired") + @encodedName("application/json", "approvalRequired") IsApprovalRequired?: boolean; /** @@ -2330,7 +2330,7 @@ model ApiExportResult { /** * Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. */ - @projectedName("json", "format") + @encodedName("application/json", "format") exportResultFormat?: ExportResultFormat; /** @@ -2472,7 +2472,7 @@ model AuthorizationServerContractBaseProperties { /** * Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. */ - @projectedName("json", "clientAuthenticationMethod") + @encodedName("application/json", "clientAuthenticationMethod") clientAuthenticationMethods?: ClientAuthenticationMethod[]; /** @@ -2488,7 +2488,7 @@ model AuthorizationServerContractBaseProperties { /** * If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. */ - @projectedName("json", "supportState") + @encodedName("application/json", "supportState") doesSupportState?: boolean; /** @@ -2877,7 +2877,7 @@ model CacheContractProperties { * Original uri of entity in external system cache points to */ @maxLength(2000) - @projectedName("json", "resourceId") + @encodedName("application/json", "resourceId") resourceUri?: string; } @@ -2917,7 +2917,7 @@ model CacheUpdateProperties { * Original uri of entity in external system cache points to */ @maxLength(2000) - @projectedName("json", "resourceId") + @encodedName("application/json", "resourceId") resourceUri?: string; } @@ -3092,7 +3092,7 @@ model ConnectivityCheckRequestProtocolConfiguration { /** * Configuration for HTTP or HTTPS requests. */ - @projectedName("json", "HTTPConfiguration") + @encodedName("application/json", "HTTPConfiguration") httpConfiguration?: ConnectivityCheckRequestProtocolConfigurationHttpConfiguration; } @@ -4556,13 +4556,13 @@ model IdentityProviderBaseParameters { /** * Identity Provider Type identifier. */ - @projectedName("json", "type") + @encodedName("application/json", "type") identityProviderType?: IdentityProviderType; /** * The TenantId to use instead of Common when logging into Active Directory */ - @projectedName("json", "signinTenant") + @encodedName("application/json", "signinTenant") signInTenant?: string; /** @@ -4579,14 +4579,14 @@ model IdentityProviderBaseParameters { * Signup Policy Name. Only applies to AAD B2C Identity Provider. */ @minLength(1) - @projectedName("json", "signupPolicyName") + @encodedName("application/json", "signupPolicyName") signUpPolicyName?: string; /** * Signin Policy Name. Only applies to AAD B2C Identity Provider. */ @minLength(1) - @projectedName("json", "signinPolicyName") + @encodedName("application/json", "signinPolicyName") signInPolicyName?: string; /** @@ -4770,7 +4770,7 @@ model NamedValueEntityBaseParameters { /** * Determines whether the value is a secret and should be encrypted or not. Default value is false. */ - @projectedName("json", "secret") + @encodedName("application/json", "secret") IsSecret?: boolean; } @@ -5294,13 +5294,13 @@ model PortalSettingsContractProperties { /** * Subscriptions delegation settings. */ - @projectedName("json", "subscriptions") + @encodedName("application/json", "subscriptions") IsSubscriptions?: SubscriptionsDelegationSettingsProperties; /** * User registration delegation settings. */ - @projectedName("json", "userRegistration") + @encodedName("application/json", "userRegistration") IsUserRegistration?: RegistrationDelegationSettingsProperties; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp index c934dddd69..074bbbcc8b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp @@ -43,7 +43,6 @@ model ProviderOperationsMetadata is ProxyResource<{}> { } @armResourceOperations -@projectedName("client", "ProviderOperationsMetadata") interface ProviderOperationsMetadataOperationGroup { /** * Gets provider operations metadata for the specified resource provider. diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp index b2a56efe33..82f8ff2a1f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp @@ -105,8 +105,8 @@ interface RoleAssignments { >; } -@@projectedName(RoleAssignments.create::parameters.resource, - "json", +@@encodedName(RoleAssignments.create::parameters.resource, + "application/json", "parameters" ); @@extension(RoleAssignments.create::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp index f2fcfc4048..9bbd5205d7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp @@ -82,8 +82,8 @@ interface RoleAssignmentScheduleRequests { >; } -@@projectedName(RoleAssignmentScheduleRequests.create::parameters.resource, - "json", +@@encodedName(RoleAssignmentScheduleRequests.create::parameters.resource, + "application/json", "parameters" ); @@extension(RoleAssignmentScheduleRequests.create::parameters.resource, @@ -93,8 +93,8 @@ interface RoleAssignmentScheduleRequests { @@doc(RoleAssignmentScheduleRequests.create::parameters.resource, "Parameters for the role assignment schedule request." ); -@@projectedName(RoleAssignmentScheduleRequests.validate::parameters.body, - "json", +@@encodedName(RoleAssignmentScheduleRequests.validate::parameters.body, + "application/json", "parameters" ); @@extension(RoleAssignmentScheduleRequests.validate::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp index a49f81cf15..3f2bb6cc7b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp @@ -71,8 +71,8 @@ interface RoleDefinitions { >; } -@@projectedName(RoleDefinitions.createOrUpdate::parameters.resource, - "json", +@@encodedName(RoleDefinitions.createOrUpdate::parameters.resource, + "application/json", "roleDefinition" ); @@extension(RoleDefinitions.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp index d86f42e278..d78d589b3b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp @@ -82,8 +82,8 @@ interface RoleEligibilityScheduleRequests { >; } -@@projectedName(RoleEligibilityScheduleRequests.create::parameters.resource, - "json", +@@encodedName(RoleEligibilityScheduleRequests.create::parameters.resource, + "application/json", "parameters" ); @@extension(RoleEligibilityScheduleRequests.create::parameters.resource, @@ -93,8 +93,8 @@ interface RoleEligibilityScheduleRequests { @@doc(RoleEligibilityScheduleRequests.create::parameters.resource, "Parameters for the role eligibility schedule request." ); -@@projectedName(RoleEligibilityScheduleRequests.validate::parameters.body, - "json", +@@encodedName(RoleEligibilityScheduleRequests.validate::parameters.body, + "application/json", "parameters" ); @@extension(RoleEligibilityScheduleRequests.validate::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp index 68231176aa..f8ca09ee6e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp @@ -58,8 +58,8 @@ interface RoleManagementPolicies { listForScope is ArmResourceListByParent; } -@@projectedName(RoleManagementPolicies.update::parameters.properties, - "json", +@@encodedName(RoleManagementPolicies.update::parameters.properties, + "application/json", "parameters" ); @@extension(RoleManagementPolicies.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp index f2eba157ce..dd923a5701 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp @@ -57,8 +57,8 @@ interface RoleManagementPolicyAssignments { listForScope is ArmResourceListByParent; } -@@projectedName(RoleManagementPolicyAssignments.create::parameters.resource, - "json", +@@encodedName(RoleManagementPolicyAssignments.create::parameters.resource, + "application/json", "parameters" ); @@extension(RoleManagementPolicyAssignments.create::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/client.tsp index c438185ba8..490902b96c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/client.tsp @@ -43,3 +43,7 @@ using Azure.ResourceManager.Authorization; @@flattenProperty(PolicyAssignmentProperties.roleDefinition); #suppress "deprecated" "@flattenProperty decorator is not recommended to use." @@flattenProperty(PolicyAssignmentProperties.policy); + +@@clientName(ProviderOperationsMetadataOperationGroup, + "ProviderOperationsMetadata" +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp index 146d316338..637adb5eaf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp @@ -322,7 +322,7 @@ model Principal { /** * Type of the principal. */ - @projectedName("json", "type") + @encodedName("application/json", "type") principalType?: PrincipalType; /** @@ -513,7 +513,7 @@ model RoleDefinitionProperties { /** * The role type. */ - @projectedName("json", "type") + @encodedName("application/json", "type") roleType?: RoleType; /** @@ -693,19 +693,19 @@ model ExpandedPropertiesScope { /** * Scope id of the resource */ - @projectedName("json", "id") + @encodedName("application/json", "id") scopeId?: string; /** * Display name of the resource */ - @projectedName("json", "displayName") + @encodedName("application/json", "displayName") scopeDisplayName?: string; /** * Type of the scope. */ - @projectedName("json", "type") + @encodedName("application/json", "type") scopeType?: ScopeType; } @@ -716,19 +716,19 @@ model ExpandedPropertiesRoleDefinition { /** * Id of the role definition */ - @projectedName("json", "id") + @encodedName("application/json", "id") roleDefinitionId?: string; /** * Display name of the role definition */ - @projectedName("json", "displayName") + @encodedName("application/json", "displayName") roleDefinitionDisplayName?: string; /** * The role type. */ - @projectedName("json", "type") + @encodedName("application/json", "type") roleType?: RoleType; } @@ -739,13 +739,13 @@ model ExpandedPropertiesPrincipal { /** * Id of the principal */ - @projectedName("json", "id") + @encodedName("application/json", "id") principalId?: string; /** * Display name of the principal */ - @projectedName("json", "displayName") + @encodedName("application/json", "displayName") principalDisplayName?: string; /** @@ -756,7 +756,7 @@ model ExpandedPropertiesPrincipal { /** * Type of the principal. */ - @projectedName("json", "type") + @encodedName("application/json", "type") principalType?: PrincipalType; } @@ -975,7 +975,7 @@ model RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration { /** * Type of the role assignment schedule expiration */ - @projectedName("json", "type") + @encodedName("application/json", "type") expirationType?: RoleManagementScheduleExpirationType; /** @@ -1272,7 +1272,7 @@ model RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration { /** * Type of the role eligibility schedule expiration */ - @projectedName("json", "type") + @encodedName("application/json", "type") expirationType?: RoleManagementScheduleExpirationType; /** @@ -1426,19 +1426,19 @@ model PolicyPropertiesScope { /** * Scope id of the resource */ - @projectedName("json", "id") + @encodedName("application/json", "id") scopeId?: string; /** * Display name of the resource */ - @projectedName("json", "displayName") + @encodedName("application/json", "displayName") scopeDisplayName?: string; /** * Type of the scope. */ - @projectedName("json", "type") + @encodedName("application/json", "type") scopeType?: ScopeType; } @@ -1501,19 +1501,19 @@ model PolicyAssignmentPropertiesScope { /** * Scope id of the resource */ - @projectedName("json", "id") + @encodedName("application/json", "id") scopeId?: string; /** * Display name of the resource */ - @projectedName("json", "displayName") + @encodedName("application/json", "displayName") scopeDisplayName?: string; /** * Type of the scope. */ - @projectedName("json", "type") + @encodedName("application/json", "type") scopeType?: ScopeType; } @@ -1524,19 +1524,19 @@ model PolicyAssignmentPropertiesRoleDefinition { /** * Id of the role definition */ - @projectedName("json", "id") + @encodedName("application/json", "id") roleDefinitionId?: string; /** * Display name of the role definition */ - @projectedName("json", "displayName") + @encodedName("application/json", "displayName") roleDefinitionDisplayName?: string; /** * The role type. */ - @projectedName("json", "type") + @encodedName("application/json", "type") roleType?: RoleType; } @@ -1547,7 +1547,7 @@ model PolicyAssignmentPropertiesPolicy { /** * Id of the policy */ - @projectedName("json", "id") + @encodedName("application/json", "id") policyId?: string; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp index 6988e8f80f..10b2cacb7a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp @@ -412,7 +412,7 @@ model TrackingProfileDefinition { /** * The tracking definition schema uri. */ - @projectedName("json", "$schema") + @encodedName("application/json", "$schema") schema?: string; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp index 851302b83b..9ef72db398 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp @@ -104,8 +104,8 @@ interface AvailabilitySets { >; } -@@projectedName(AvailabilitySets.createOrUpdate::parameters.resource, - "json", +@@encodedName(AvailabilitySets.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(AvailabilitySets.createOrUpdate::parameters.resource, @@ -115,8 +115,8 @@ interface AvailabilitySets { @@doc(AvailabilitySets.createOrUpdate::parameters.resource, "Parameters supplied to the Create Availability Set operation." ); -@@projectedName(AvailabilitySets.update::parameters.properties, - "json", +@@encodedName(AvailabilitySets.update::parameters.properties, + "application/json", "parameters" ); @@extension(AvailabilitySets.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp index 857a233823..3f41f7eaa8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp @@ -88,8 +88,8 @@ interface CapacityReservations { listByCapacityReservationGroup is ArmResourceListByParent; } -@@projectedName(CapacityReservations.createOrUpdate::parameters.resource, - "json", +@@encodedName(CapacityReservations.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(CapacityReservations.createOrUpdate::parameters.resource, @@ -99,8 +99,8 @@ interface CapacityReservations { @@doc(CapacityReservations.createOrUpdate::parameters.resource, "Parameters supplied to the Create capacity reservation." ); -@@projectedName(CapacityReservations.update::parameters.properties, - "json", +@@encodedName(CapacityReservations.update::parameters.properties, + "application/json", "parameters" ); @@extension(CapacityReservations.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp index 25169263ca..c8cd9aeb7c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp @@ -100,8 +100,8 @@ interface CapacityReservationGroups { listBySubscription is ArmListBySubscription; } -@@projectedName(CapacityReservationGroups.createOrUpdate::parameters.resource, - "json", +@@encodedName(CapacityReservationGroups.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(CapacityReservationGroups.createOrUpdate::parameters.resource, @@ -111,8 +111,8 @@ interface CapacityReservationGroups { @@doc(CapacityReservationGroups.createOrUpdate::parameters.resource, "Parameters supplied to the Create capacity reservation Group." ); -@@projectedName(CapacityReservationGroups.update::parameters.properties, - "json", +@@encodedName(CapacityReservationGroups.update::parameters.properties, + "application/json", "parameters" ); @@extension(CapacityReservationGroups.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp index 5943f746c2..cf589cff8b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp @@ -230,8 +230,8 @@ interface CloudServices { >; } -@@projectedName(CloudServices.createOrUpdate::parameters.resource, - "json", +@@encodedName(CloudServices.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(CloudServices.createOrUpdate::parameters.resource, @@ -241,8 +241,8 @@ interface CloudServices { @@doc(CloudServices.createOrUpdate::parameters.resource, "The cloud service object." ); -@@projectedName(CloudServices.update::parameters.properties, - "json", +@@encodedName(CloudServices.update::parameters.properties, + "application/json", "parameters" ); @@extension(CloudServices.update::parameters.properties, @@ -250,7 +250,10 @@ interface CloudServices { "parameters" ); @@doc(CloudServices.update::parameters.properties, "The cloud service object."); -@@projectedName(CloudServices.restart::parameters.body, "json", "parameters"); +@@encodedName(CloudServices.restart::parameters.body, + "application/json", + "parameters" +); @@extension(CloudServices.restart::parameters.body, "x-ms-client-name", "parameters" @@ -258,7 +261,10 @@ interface CloudServices { @@doc(CloudServices.restart::parameters.body, "List of cloud service role instance names." ); -@@projectedName(CloudServices.reimage::parameters.body, "json", "parameters"); +@@encodedName(CloudServices.reimage::parameters.body, + "application/json", + "parameters" +); @@extension(CloudServices.reimage::parameters.body, "x-ms-client-name", "parameters" @@ -266,7 +272,10 @@ interface CloudServices { @@doc(CloudServices.reimage::parameters.body, "List of cloud service role instance names." ); -@@projectedName(CloudServices.rebuild::parameters.body, "json", "parameters"); +@@encodedName(CloudServices.rebuild::parameters.body, + "application/json", + "parameters" +); @@extension(CloudServices.rebuild::parameters.body, "x-ms-client-name", "parameters" @@ -274,8 +283,8 @@ interface CloudServices { @@doc(CloudServices.rebuild::parameters.body, "List of cloud service role instance names." ); -@@projectedName(CloudServices.deleteInstances::parameters.body, - "json", +@@encodedName(CloudServices.deleteInstances::parameters.body, + "application/json", "parameters" ); @@extension(CloudServices.deleteInstances::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp index bd8d7548d0..753a855369 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp @@ -94,8 +94,8 @@ interface DedicatedHosts { listAvailableSizes is Azure.Core.ResourceList; } -@@projectedName(DedicatedHosts.createOrUpdate::parameters.resource, - "json", +@@encodedName(DedicatedHosts.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(DedicatedHosts.createOrUpdate::parameters.resource, @@ -105,8 +105,8 @@ interface DedicatedHosts { @@doc(DedicatedHosts.createOrUpdate::parameters.resource, "Parameters supplied to the Create Dedicated Host." ); -@@projectedName(DedicatedHosts.update::parameters.properties, - "json", +@@encodedName(DedicatedHosts.update::parameters.properties, + "application/json", "parameters" ); @@extension(DedicatedHosts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp index c5d13636a7..cdd970b426 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp @@ -86,8 +86,8 @@ interface DedicatedHostGroups { listBySubscription is ArmListBySubscription; } -@@projectedName(DedicatedHostGroups.createOrUpdate::parameters.resource, - "json", +@@encodedName(DedicatedHostGroups.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(DedicatedHostGroups.createOrUpdate::parameters.resource, @@ -97,8 +97,8 @@ interface DedicatedHostGroups { @@doc(DedicatedHostGroups.createOrUpdate::parameters.resource, "Parameters supplied to the Create Dedicated Host Group." ); -@@projectedName(DedicatedHostGroups.update::parameters.properties, - "json", +@@encodedName(DedicatedHostGroups.update::parameters.properties, + "application/json", "parameters" ); @@extension(DedicatedHostGroups.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp index ea7381353d..229c5c2c2d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp @@ -107,7 +107,10 @@ interface Disks { revokeAccess is ArmResourceActionAsync; } -@@projectedName(Disks.createOrUpdate::parameters.resource, "json", "disk"); +@@encodedName(Disks.createOrUpdate::parameters.resource, + "application/json", + "disk" +); @@extension(Disks.createOrUpdate::parameters.resource, "x-ms-client-name", "disk" @@ -115,12 +118,15 @@ interface Disks { @@doc(Disks.createOrUpdate::parameters.resource, "Disk object supplied in the body of the Put disk operation." ); -@@projectedName(Disks.update::parameters.properties, "json", "disk"); +@@encodedName(Disks.update::parameters.properties, "application/json", "disk"); @@extension(Disks.update::parameters.properties, "x-ms-client-name", "disk"); @@doc(Disks.update::parameters.properties, "Disk object supplied in the body of the Patch disk operation." ); -@@projectedName(Disks.grantAccess::parameters.body, "json", "grantAccessData"); +@@encodedName(Disks.grantAccess::parameters.body, + "application/json", + "grantAccessData" +); @@extension(Disks.grantAccess::parameters.body, "x-ms-client-name", "grantAccessData" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp index 0e0836d56f..4f1cfe6234 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp @@ -101,8 +101,8 @@ interface DiskAccesses { >; } -@@projectedName(DiskAccesses.createOrUpdate::parameters.resource, - "json", +@@encodedName(DiskAccesses.createOrUpdate::parameters.resource, + "application/json", "diskAccess" ); @@extension(DiskAccesses.createOrUpdate::parameters.resource, @@ -112,8 +112,8 @@ interface DiskAccesses { @@doc(DiskAccesses.createOrUpdate::parameters.resource, "disk access object supplied in the body of the Put disk access operation." ); -@@projectedName(DiskAccesses.update::parameters.properties, - "json", +@@encodedName(DiskAccesses.update::parameters.properties, + "application/json", "diskAccess" ); @@extension(DiskAccesses.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp index 2f6572abcb..13e7412d7f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp @@ -78,8 +78,8 @@ interface DiskEncryptionSets { listAssociatedResources is Azure.Core.ResourceList; } -@@projectedName(DiskEncryptionSets.createOrUpdate::parameters.resource, - "json", +@@encodedName(DiskEncryptionSets.createOrUpdate::parameters.resource, + "application/json", "diskEncryptionSet" ); @@extension(DiskEncryptionSets.createOrUpdate::parameters.resource, @@ -89,8 +89,8 @@ interface DiskEncryptionSets { @@doc(DiskEncryptionSets.createOrUpdate::parameters.resource, "disk encryption set object supplied in the body of the Put disk encryption set operation." ); -@@projectedName(DiskEncryptionSets.update::parameters.properties, - "json", +@@encodedName(DiskEncryptionSets.update::parameters.properties, + "application/json", "diskEncryptionSet" ); @@extension(DiskEncryptionSets.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp index 9a0872c0c0..ac556b9f75 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp @@ -115,8 +115,8 @@ interface DiskRestorePoints { >; } -@@projectedName(DiskRestorePoints.grantAccess::parameters.body, - "json", +@@encodedName(DiskRestorePoints.grantAccess::parameters.body, + "application/json", "grantAccessData" ); @@extension(DiskRestorePoints.grantAccess::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp index 29e958e03d..2e465110fd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp @@ -94,8 +94,8 @@ interface Galleries { update is ArmResourceActionAsync; } -@@projectedName(Galleries.createOrUpdate::parameters.resource, - "json", +@@encodedName(Galleries.createOrUpdate::parameters.resource, + "application/json", "gallery" ); @@extension(Galleries.createOrUpdate::parameters.resource, @@ -105,7 +105,10 @@ interface Galleries { @@doc(Galleries.createOrUpdate::parameters.resource, "Parameters supplied to the create or update Shared Image Gallery operation." ); -@@projectedName(Galleries.update::parameters.properties, "json", "gallery"); +@@encodedName(Galleries.update::parameters.properties, + "application/json", + "gallery" +); @@extension(Galleries.update::parameters.properties, "x-ms-client-name", "gallery" @@ -113,7 +116,10 @@ interface Galleries { @@doc(Galleries.update::parameters.properties, "Parameters supplied to the update Shared Image Gallery operation." ); -@@projectedName(Galleries.update::parameters.body, "json", "sharingUpdate"); +@@encodedName(Galleries.update::parameters.body, + "application/json", + "sharingUpdate" +); @@extension(Galleries.update::parameters.body, "x-ms-client-name", "sharingUpdate" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp index 96ad81277c..53e9211d53 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp @@ -67,8 +67,8 @@ interface GalleryApplications { listByGallery is ArmResourceListByParent; } -@@projectedName(GalleryApplications.createOrUpdate::parameters.resource, - "json", +@@encodedName(GalleryApplications.createOrUpdate::parameters.resource, + "application/json", "galleryApplication" ); @@extension(GalleryApplications.createOrUpdate::parameters.resource, @@ -78,8 +78,8 @@ interface GalleryApplications { @@doc(GalleryApplications.createOrUpdate::parameters.resource, "Parameters supplied to the create or update gallery Application operation." ); -@@projectedName(GalleryApplications.update::parameters.properties, - "json", +@@encodedName(GalleryApplications.update::parameters.properties, + "application/json", "galleryApplication" ); @@extension(GalleryApplications.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp index 9ff8ff1727..8fa0b9ca67 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp @@ -81,8 +81,8 @@ interface GalleryApplicationVersions { listByGalleryApplication is ArmResourceListByParent; } -@@projectedName(GalleryApplicationVersions.createOrUpdate::parameters.resource, - "json", +@@encodedName(GalleryApplicationVersions.createOrUpdate::parameters.resource, + "application/json", "galleryApplicationVersion" ); @@extension(GalleryApplicationVersions.createOrUpdate::parameters.resource, @@ -92,8 +92,8 @@ interface GalleryApplicationVersions { @@doc(GalleryApplicationVersions.createOrUpdate::parameters.resource, "Parameters supplied to the create or update gallery Application Version operation." ); -@@projectedName(GalleryApplicationVersions.update::parameters.properties, - "json", +@@encodedName(GalleryApplicationVersions.update::parameters.properties, + "application/json", "galleryApplicationVersion" ); @@extension(GalleryApplicationVersions.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp index b2c497576f..874ed3c1e3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp @@ -67,8 +67,8 @@ interface GalleryImages { listByGallery is ArmResourceListByParent; } -@@projectedName(GalleryImages.createOrUpdate::parameters.resource, - "json", +@@encodedName(GalleryImages.createOrUpdate::parameters.resource, + "application/json", "galleryImage" ); @@extension(GalleryImages.createOrUpdate::parameters.resource, @@ -78,8 +78,8 @@ interface GalleryImages { @@doc(GalleryImages.createOrUpdate::parameters.resource, "Parameters supplied to the create or update gallery image operation." ); -@@projectedName(GalleryImages.update::parameters.properties, - "json", +@@encodedName(GalleryImages.update::parameters.properties, + "application/json", "galleryImage" ); @@extension(GalleryImages.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp index d7522f0a50..aff2656ca8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp @@ -78,8 +78,8 @@ interface GalleryImageVersions { listByGalleryImage is ArmResourceListByParent; } -@@projectedName(GalleryImageVersions.createOrUpdate::parameters.resource, - "json", +@@encodedName(GalleryImageVersions.createOrUpdate::parameters.resource, + "application/json", "galleryImageVersion" ); @@extension(GalleryImageVersions.createOrUpdate::parameters.resource, @@ -89,8 +89,8 @@ interface GalleryImageVersions { @@doc(GalleryImageVersions.createOrUpdate::parameters.resource, "Parameters supplied to the create or update gallery image version operation." ); -@@projectedName(GalleryImageVersions.update::parameters.properties, - "json", +@@encodedName(GalleryImageVersions.update::parameters.properties, + "application/json", "galleryImageVersion" ); @@extension(GalleryImageVersions.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp index a4cdd37c33..d26977a281 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp @@ -86,8 +86,8 @@ interface Images { list is ArmListBySubscription; } -@@projectedName(Images.createOrUpdate::parameters.resource, - "json", +@@encodedName(Images.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(Images.createOrUpdate::parameters.resource, @@ -97,7 +97,10 @@ interface Images { @@doc(Images.createOrUpdate::parameters.resource, "Parameters supplied to the Create Image operation." ); -@@projectedName(Images.update::parameters.properties, "json", "parameters"); +@@encodedName(Images.update::parameters.properties, + "application/json", + "parameters" +); @@extension(Images.update::parameters.properties, "x-ms-client-name", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp index 8520dce449..cfd4dc89d7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp @@ -79,8 +79,8 @@ interface PrivateEndpointConnections { listPrivateEndpointConnections is ArmResourceListByParent; } -@@projectedName(PrivateEndpointConnections.updateAPrivateEndpointConnection::parameters.resource, - "json", +@@encodedName(PrivateEndpointConnections.updateAPrivateEndpointConnection::parameters.resource, + "application/json", "privateEndpointConnection" ); @@extension(PrivateEndpointConnections.updateAPrivateEndpointConnection::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp index 3020d274ec..2d9450473a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp @@ -89,8 +89,8 @@ interface ProximityPlacementGroups { listBySubscription is ArmListBySubscription; } -@@projectedName(ProximityPlacementGroups.createOrUpdate::parameters.resource, - "json", +@@encodedName(ProximityPlacementGroups.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(ProximityPlacementGroups.createOrUpdate::parameters.resource, @@ -100,8 +100,8 @@ interface ProximityPlacementGroups { @@doc(ProximityPlacementGroups.createOrUpdate::parameters.resource, "Parameters supplied to the Create Proximity Placement Group operation." ); -@@projectedName(ProximityPlacementGroups.update::parameters.properties, - "json", +@@encodedName(ProximityPlacementGroups.update::parameters.properties, + "application/json", "parameters" ); @@extension(ProximityPlacementGroups.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp index a00ed5621b..9af5bc6a3e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp @@ -93,8 +93,8 @@ interface RestorePoints { >; } -@@projectedName(RestorePoints.create::parameters.resource, - "json", +@@encodedName(RestorePoints.create::parameters.resource, + "application/json", "parameters" ); @@extension(RestorePoints.create::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp index af42336a17..5b37ad082a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp @@ -121,8 +121,8 @@ interface RestorePointCollections { listAll is ArmListBySubscription; } -@@projectedName(RestorePointCollections.createOrUpdate::parameters.resource, - "json", +@@encodedName(RestorePointCollections.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(RestorePointCollections.createOrUpdate::parameters.resource, @@ -132,8 +132,8 @@ interface RestorePointCollections { @@doc(RestorePointCollections.createOrUpdate::parameters.resource, "Parameters supplied to the Create or Update restore point collection operation." ); -@@projectedName(RestorePointCollections.update::parameters.properties, - "json", +@@encodedName(RestorePointCollections.update::parameters.properties, + "application/json", "parameters" ); @@extension(RestorePointCollections.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp index 4d2f7c9f73..f6ff9d07c7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp @@ -96,8 +96,8 @@ interface Snapshots { revokeAccess is ArmResourceActionAsync; } -@@projectedName(Snapshots.createOrUpdate::parameters.resource, - "json", +@@encodedName(Snapshots.createOrUpdate::parameters.resource, + "application/json", "snapshot" ); @@extension(Snapshots.createOrUpdate::parameters.resource, @@ -107,7 +107,10 @@ interface Snapshots { @@doc(Snapshots.createOrUpdate::parameters.resource, "Snapshot object supplied in the body of the Put disk operation." ); -@@projectedName(Snapshots.update::parameters.properties, "json", "snapshot"); +@@encodedName(Snapshots.update::parameters.properties, + "application/json", + "snapshot" +); @@extension(Snapshots.update::parameters.properties, "x-ms-client-name", "snapshot" @@ -115,8 +118,8 @@ interface Snapshots { @@doc(Snapshots.update::parameters.properties, "Snapshot object supplied in the body of the Patch snapshot operation." ); -@@projectedName(Snapshots.grantAccess::parameters.body, - "json", +@@encodedName(Snapshots.grantAccess::parameters.body, + "application/json", "grantAccessData" ); @@extension(Snapshots.grantAccess::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp index 17d75b3219..5f08ec3504 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp @@ -94,8 +94,8 @@ interface SshPublicKeyResources { >; } -@@projectedName(SshPublicKeyResources.create::parameters.resource, - "json", +@@encodedName(SshPublicKeyResources.create::parameters.resource, + "application/json", "parameters" ); @@extension(SshPublicKeyResources.create::parameters.resource, @@ -105,8 +105,8 @@ interface SshPublicKeyResources { @@doc(SshPublicKeyResources.create::parameters.resource, "Parameters supplied to create the SSH public key." ); -@@projectedName(SshPublicKeyResources.update::parameters.properties, - "json", +@@encodedName(SshPublicKeyResources.update::parameters.properties, + "application/json", "parameters" ); @@extension(SshPublicKeyResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp index 87ce75fa0e..5093fe6e01 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp @@ -350,8 +350,8 @@ interface VirtualMachines { >; } -@@projectedName(VirtualMachines.createOrUpdate::parameters.resource, - "json", +@@encodedName(VirtualMachines.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(VirtualMachines.createOrUpdate::parameters.resource, @@ -361,8 +361,8 @@ interface VirtualMachines { @@doc(VirtualMachines.createOrUpdate::parameters.resource, "Parameters supplied to the Create Virtual Machine operation." ); -@@projectedName(VirtualMachines.update::parameters.properties, - "json", +@@encodedName(VirtualMachines.update::parameters.properties, + "application/json", "parameters" ); @@extension(VirtualMachines.update::parameters.properties, @@ -372,7 +372,10 @@ interface VirtualMachines { @@doc(VirtualMachines.update::parameters.properties, "Parameters supplied to the Update Virtual Machine operation." ); -@@projectedName(VirtualMachines.capture::parameters.body, "json", "parameters"); +@@encodedName(VirtualMachines.capture::parameters.body, + "application/json", + "parameters" +); @@extension(VirtualMachines.capture::parameters.body, "x-ms-client-name", "parameters" @@ -380,7 +383,10 @@ interface VirtualMachines { @@doc(VirtualMachines.capture::parameters.body, "Parameters supplied to the Capture Virtual Machine operation." ); -@@projectedName(VirtualMachines.reimage::parameters.body, "json", "parameters"); +@@encodedName(VirtualMachines.reimage::parameters.body, + "application/json", + "parameters" +); @@extension(VirtualMachines.reimage::parameters.body, "x-ms-client-name", "parameters" @@ -388,8 +394,8 @@ interface VirtualMachines { @@doc(VirtualMachines.reimage::parameters.body, "Parameters supplied to the Reimage Virtual Machine operation." ); -@@projectedName(VirtualMachines.installPatches::parameters.body, - "json", +@@encodedName(VirtualMachines.installPatches::parameters.body, + "application/json", "installPatchesInput" ); @@extension(VirtualMachines.installPatches::parameters.body, @@ -399,8 +405,8 @@ interface VirtualMachines { @@doc(VirtualMachines.installPatches::parameters.body, "Input for InstallPatches as directly received by the API" ); -@@projectedName(VirtualMachines.runCommand::parameters.body, - "json", +@@encodedName(VirtualMachines.runCommand::parameters.body, + "application/json", "parameters" ); @@extension(VirtualMachines.runCommand::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp index acb27a3404..b7563ad163 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp @@ -92,8 +92,8 @@ interface VirtualMachineExtensions { >; } -@@projectedName(VirtualMachineExtensions.createOrUpdate::parameters.resource, - "json", +@@encodedName(VirtualMachineExtensions.createOrUpdate::parameters.resource, + "application/json", "extensionParameters" ); @@extension(VirtualMachineExtensions.createOrUpdate::parameters.resource, @@ -103,8 +103,8 @@ interface VirtualMachineExtensions { @@doc(VirtualMachineExtensions.createOrUpdate::parameters.resource, "Parameters supplied to the Create Virtual Machine Extension operation." ); -@@projectedName(VirtualMachineExtensions.update::parameters.properties, - "json", +@@encodedName(VirtualMachineExtensions.update::parameters.properties, + "application/json", "extensionParameters" ); @@extension(VirtualMachineExtensions.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp index 5281bd7008..6118c862ed 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp @@ -110,8 +110,8 @@ interface VirtualMachineRunCommands { >; } -@@projectedName(VirtualMachineRunCommands.createOrUpdate::parameters.resource, - "json", +@@encodedName(VirtualMachineRunCommands.createOrUpdate::parameters.resource, + "application/json", "runCommand" ); @@extension(VirtualMachineRunCommands.createOrUpdate::parameters.resource, @@ -121,8 +121,8 @@ interface VirtualMachineRunCommands { @@doc(VirtualMachineRunCommands.createOrUpdate::parameters.resource, "Parameters supplied to the Create Virtual Machine RunCommand operation." ); -@@projectedName(VirtualMachineRunCommands.update::parameters.properties, - "json", +@@encodedName(VirtualMachineRunCommands.update::parameters.properties, + "application/json", "runCommand" ); @@extension(VirtualMachineRunCommands.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp index 481e3d1f3d..6e5a92db8d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp @@ -607,8 +607,8 @@ interface VirtualMachineScaleSets { >; } -@@projectedName(VirtualMachineScaleSets.createOrUpdate::parameters.resource, - "json", +@@encodedName(VirtualMachineScaleSets.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(VirtualMachineScaleSets.createOrUpdate::parameters.resource, @@ -618,8 +618,8 @@ interface VirtualMachineScaleSets { @@doc(VirtualMachineScaleSets.createOrUpdate::parameters.resource, "The scale set object." ); -@@projectedName(VirtualMachineScaleSets.update::parameters.properties, - "json", +@@encodedName(VirtualMachineScaleSets.update::parameters.properties, + "application/json", "parameters" ); @@extension(VirtualMachineScaleSets.update::parameters.properties, @@ -629,8 +629,8 @@ interface VirtualMachineScaleSets { @@doc(VirtualMachineScaleSets.update::parameters.properties, "The scale set object." ); -@@projectedName(VirtualMachineScaleSets.deallocate::parameters.body, - "json", +@@encodedName(VirtualMachineScaleSets.deallocate::parameters.body, + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.deallocate::parameters.body, @@ -640,8 +640,8 @@ interface VirtualMachineScaleSets { @@doc(VirtualMachineScaleSets.deallocate::parameters.body, "A list of virtual machine instance IDs from the VM scale set." ); -@@projectedName(VirtualMachineScaleSets.deleteInstances::parameters.body, - "json", +@@encodedName(VirtualMachineScaleSets.deleteInstances::parameters.body, + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.deleteInstances::parameters.body, @@ -651,8 +651,8 @@ interface VirtualMachineScaleSets { @@doc(VirtualMachineScaleSets.deleteInstances::parameters.body, "A list of virtual machine instance IDs from the VM scale set." ); -@@projectedName(VirtualMachineScaleSets.powerOff::parameters.body, - "json", +@@encodedName(VirtualMachineScaleSets.powerOff::parameters.body, + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.powerOff::parameters.body, @@ -662,8 +662,8 @@ interface VirtualMachineScaleSets { @@doc(VirtualMachineScaleSets.powerOff::parameters.body, "A list of virtual machine instance IDs from the VM scale set." ); -@@projectedName(VirtualMachineScaleSets.restart::parameters.body, - "json", +@@encodedName(VirtualMachineScaleSets.restart::parameters.body, + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.restart::parameters.body, @@ -673,8 +673,8 @@ interface VirtualMachineScaleSets { @@doc(VirtualMachineScaleSets.restart::parameters.body, "A list of virtual machine instance IDs from the VM scale set." ); -@@projectedName(VirtualMachineScaleSets.start::parameters.body, - "json", +@@encodedName(VirtualMachineScaleSets.start::parameters.body, + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.start::parameters.body, @@ -684,8 +684,8 @@ interface VirtualMachineScaleSets { @@doc(VirtualMachineScaleSets.start::parameters.body, "A list of virtual machine instance IDs from the VM scale set." ); -@@projectedName(VirtualMachineScaleSets.redeploy::parameters.body, - "json", +@@encodedName(VirtualMachineScaleSets.redeploy::parameters.body, + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.redeploy::parameters.body, @@ -695,8 +695,8 @@ interface VirtualMachineScaleSets { @@doc(VirtualMachineScaleSets.redeploy::parameters.body, "A list of virtual machine instance IDs from the VM scale set." ); -@@projectedName(VirtualMachineScaleSets.performMaintenance::parameters.body, - "json", +@@encodedName(VirtualMachineScaleSets.performMaintenance::parameters.body, + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.performMaintenance::parameters.body, @@ -706,8 +706,8 @@ interface VirtualMachineScaleSets { @@doc(VirtualMachineScaleSets.performMaintenance::parameters.body, "A list of virtual machine instance IDs from the VM scale set." ); -@@projectedName(VirtualMachineScaleSets.updateInstances::parameters.body, - "json", +@@encodedName(VirtualMachineScaleSets.updateInstances::parameters.body, + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.updateInstances::parameters.body, @@ -717,8 +717,8 @@ interface VirtualMachineScaleSets { @@doc(VirtualMachineScaleSets.updateInstances::parameters.body, "A list of virtual machine instance IDs from the VM scale set." ); -@@projectedName(VirtualMachineScaleSets.reimage::parameters.body, - "json", +@@encodedName(VirtualMachineScaleSets.reimage::parameters.body, + "application/json", "vmScaleSetReimageInput" ); @@extension(VirtualMachineScaleSets.reimage::parameters.body, @@ -728,8 +728,8 @@ interface VirtualMachineScaleSets { @@doc(VirtualMachineScaleSets.reimage::parameters.body, "Parameters for Reimaging VM ScaleSet." ); -@@projectedName(VirtualMachineScaleSets.reimageAll::parameters.body, - "json", +@@encodedName(VirtualMachineScaleSets.reimageAll::parameters.body, + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.reimageAll::parameters.body, @@ -739,8 +739,8 @@ interface VirtualMachineScaleSets { @@doc(VirtualMachineScaleSets.reimageAll::parameters.body, "A list of virtual machine instance IDs from the VM scale set." ); -@@projectedName(VirtualMachineScaleSets.convertToSinglePlacementGroup::parameters.body, - "json", +@@encodedName(VirtualMachineScaleSets.convertToSinglePlacementGroup::parameters.body, + "application/json", "parameters" ); @@extension(VirtualMachineScaleSets.convertToSinglePlacementGroup::parameters.body, @@ -750,8 +750,8 @@ interface VirtualMachineScaleSets { @@doc(VirtualMachineScaleSets.convertToSinglePlacementGroup::parameters.body, "The input object for ConvertToSinglePlacementGroup API." ); -@@projectedName(VirtualMachineScaleSets.setOrchestrationServiceState::parameters.body, - "json", +@@encodedName(VirtualMachineScaleSets.setOrchestrationServiceState::parameters.body, + "application/json", "parameters" ); @@extension(VirtualMachineScaleSets.setOrchestrationServiceState::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp index b7c84ac0cc..1fbe282a7d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp @@ -135,8 +135,8 @@ interface VirtualMachineScaleSetExtensions { >; } -@@projectedName(VirtualMachineScaleSetExtensions.createOrUpdate::parameters.resource, - "json", +@@encodedName(VirtualMachineScaleSetExtensions.createOrUpdate::parameters.resource, + "application/json", "extensionParameters" ); @@extension(VirtualMachineScaleSetExtensions.createOrUpdate::parameters.resource, @@ -146,8 +146,8 @@ interface VirtualMachineScaleSetExtensions { @@doc(VirtualMachineScaleSetExtensions.createOrUpdate::parameters.resource, "Parameters supplied to the Create VM scale set Extension operation." ); -@@projectedName(VirtualMachineScaleSetExtensions.update::parameters.properties, - "json", +@@encodedName(VirtualMachineScaleSetExtensions.update::parameters.properties, + "application/json", "extensionParameters" ); @@extension(VirtualMachineScaleSetExtensions.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp index ae943c1f5f..ce6adc87e5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp @@ -437,8 +437,8 @@ interface VirtualMachineScaleSetVMS { >; } -@@projectedName(VirtualMachineScaleSetVMS.update::parameters.resource, - "json", +@@encodedName(VirtualMachineScaleSetVMS.update::parameters.resource, + "application/json", "parameters" ); @@extension(VirtualMachineScaleSetVMS.update::parameters.resource, @@ -448,8 +448,8 @@ interface VirtualMachineScaleSetVMS { @@doc(VirtualMachineScaleSetVMS.update::parameters.resource, "Parameters supplied to the Update Virtual Machine Scale Sets VM operation." ); -@@projectedName(VirtualMachineScaleSetVMS.reimage::parameters.body, - "json", +@@encodedName(VirtualMachineScaleSetVMS.reimage::parameters.body, + "application/json", "vmScaleSetVMReimageInput" ); @@extension(VirtualMachineScaleSetVMS.reimage::parameters.body, @@ -459,8 +459,8 @@ interface VirtualMachineScaleSetVMS { @@doc(VirtualMachineScaleSetVMS.reimage::parameters.body, "Parameters for the Reimaging Virtual machine in ScaleSet." ); -@@projectedName(VirtualMachineScaleSetVMS.runCommand::parameters.body, - "json", +@@encodedName(VirtualMachineScaleSetVMS.runCommand::parameters.body, + "application/json", "parameters" ); @@extension(VirtualMachineScaleSetVMS.runCommand::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp index 272a8b3e43..81a36cdc51 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp @@ -155,8 +155,8 @@ interface VirtualMachineScaleSetVMExtensions { >; } -@@projectedName(VirtualMachineScaleSetVMExtensions.createOrUpdate::parameters.resource, - "json", +@@encodedName(VirtualMachineScaleSetVMExtensions.createOrUpdate::parameters.resource, + "application/json", "extensionParameters" ); @@extension(VirtualMachineScaleSetVMExtensions.createOrUpdate::parameters.resource, @@ -166,8 +166,8 @@ interface VirtualMachineScaleSetVMExtensions { @@doc(VirtualMachineScaleSetVMExtensions.createOrUpdate::parameters.resource, "Parameters supplied to the Create Virtual Machine Extension operation." ); -@@projectedName(VirtualMachineScaleSetVMExtensions.update::parameters.properties, - "json", +@@encodedName(VirtualMachineScaleSetVMExtensions.update::parameters.properties, + "application/json", "extensionParameters" ); @@extension(VirtualMachineScaleSetVMExtensions.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp index b7c2f89536..8f45dd5d75 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp @@ -2549,7 +2549,7 @@ model VirtualMachineScaleSetDataDisk { /** * Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB. */ - @projectedName("json", "diskIOPSReadWrite") + @encodedName("application/json", "diskIOPSReadWrite") diskIopsReadWrite?: int64; /** @@ -5013,7 +5013,7 @@ model DataDisk { * Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set. */ @visibility("read") - @projectedName("json", "diskIOPSReadWrite") + @encodedName("application/json", "diskIOPSReadWrite") diskIopsReadWrite?: int64; /** @@ -5841,7 +5841,7 @@ model VirtualMachineCaptureResult extends SubResource { * the schema of the captured virtual machine */ @visibility("read") - @projectedName("json", "$schema") + @encodedName("application/json", "$schema") schema?: string; /** @@ -7085,7 +7085,7 @@ model RestorePointSourceVMStorageProfile { /** * Gets the data disks of the VM captured at the time of the restore point creation. */ - @projectedName("json", "dataDisks") + @encodedName("application/json", "dataDisks") dataDiskList?: RestorePointSourceVMDataDisk[]; } @@ -7533,7 +7533,7 @@ model RunCommandDocumentBase { /** * The VM run command schema. */ - @projectedName("json", "$schema") + @encodedName("application/json", "$schema") schema: string; /** @@ -7896,7 +7896,7 @@ model DiskProperties { /** * The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. */ - @projectedName("json", "diskIOPSReadWrite") + @encodedName("application/json", "diskIOPSReadWrite") diskIopsReadWrite?: int64; /** @@ -7907,7 +7907,7 @@ model DiskProperties { /** * The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. */ - @projectedName("json", "diskIOPSReadOnly") + @encodedName("application/json", "diskIOPSReadOnly") diskIopsReadOnly?: int64; /** @@ -8004,7 +8004,7 @@ model DiskProperties { * The UTC time when the ownership state of the disk was last changed i.e., the time the disk was last attached or detached from a VM or the time when the VM to which the disk was attached was deallocated or started. */ @visibility("read") - @projectedName("json", "LastOwnershipUpdateTime") + @encodedName("application/json", "LastOwnershipUpdateTime") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. lastOwnershipUpdateTime?: utcDateTime; } @@ -8310,7 +8310,7 @@ model DiskUpdateProperties { /** * The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. */ - @projectedName("json", "diskIOPSReadWrite") + @encodedName("application/json", "diskIOPSReadWrite") diskIopsReadWrite?: int64; /** @@ -8321,7 +8321,7 @@ model DiskUpdateProperties { /** * The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. */ - @projectedName("json", "diskIOPSReadOnly") + @encodedName("application/json", "diskIOPSReadOnly") diskIopsReadOnly?: int64; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp index e3219eaee3..4a636e7f40 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp @@ -184,8 +184,8 @@ interface DnsRecords { >; } -@@projectedName(DnsRecords.createOrUpdate::parameters.resource, - "json", +@@encodedName(DnsRecords.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(DnsRecords.createOrUpdate::parameters.resource, @@ -195,7 +195,10 @@ interface DnsRecords { @@doc(DnsRecords.createOrUpdate::parameters.resource, "Parameters supplied to the CreateOrUpdate operation." ); -@@projectedName(DnsRecords.update::parameters.properties, "json", "parameters"); +@@encodedName(DnsRecords.update::parameters.properties, + "application/json", + "parameters" +); @@extension(DnsRecords.update::parameters.properties, "x-ms-client-name", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp index f554d884eb..245d3e2ab9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp @@ -179,8 +179,8 @@ interface DnsZones { >; } -@@projectedName(DnsZones.createOrUpdate::parameters.resource, - "json", +@@encodedName(DnsZones.createOrUpdate::parameters.resource, + "application/json", "parameters" ); @@extension(DnsZones.createOrUpdate::parameters.resource, @@ -190,7 +190,10 @@ interface DnsZones { @@doc(DnsZones.createOrUpdate::parameters.resource, "Parameters supplied to the CreateOrUpdate operation." ); -@@projectedName(DnsZones.update::parameters.properties, "json", "parameters"); +@@encodedName(DnsZones.update::parameters.properties, + "application/json", + "parameters" +); @@extension(DnsZones.update::parameters.properties, "x-ms-client-name", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp index 7214c6bb61..d6dcbdbb1e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp @@ -48,7 +48,7 @@ model RecordSetProperties { /** * The TTL (time-to-live) of the records in the record set. */ - @projectedName("json", "TTL") + @encodedName("application/json", "TTL") ttlInSeconds?: int64; /** @@ -71,13 +71,13 @@ model RecordSetProperties { /** * The list of A records in the record set. */ - @projectedName("json", "ARecords") + @encodedName("application/json", "ARecords") aRecords?: ARecord[]; /** * The list of AAAA records in the record set. */ - @projectedName("json", "AAAARecords") + @encodedName("application/json", "AAAARecords") aaaaRecords?: AaaaRecord[]; /** @@ -93,31 +93,31 @@ model RecordSetProperties { /** * The list of PTR records in the record set. */ - @projectedName("json", "PTRRecords") + @encodedName("application/json", "PTRRecords") ptrRecords?: PtrRecord[]; /** * The list of SRV records in the record set. */ - @projectedName("json", "SRVRecords") + @encodedName("application/json", "SRVRecords") srvRecords?: SrvRecord[]; /** * The list of TXT records in the record set. */ - @projectedName("json", "TXTRecords") + @encodedName("application/json", "TXTRecords") txtRecords?: TxtRecord[]; /** * The CNAME record in the record set. */ - @projectedName("json", "CNAMERecord") + @encodedName("application/json", "CNAMERecord") cnameRecord?: CnameRecord; /** * The SOA record in the record set. */ - @projectedName("json", "SOARecord") + @encodedName("application/json", "SOARecord") soaRecord?: SoaRecord; /** @@ -178,7 +178,7 @@ model NsRecord { /** * The name server name for this NS record. */ - @projectedName("json", "nsdname") + @encodedName("application/json", "nsdname") dnsNSDomainName?: string; } @@ -189,7 +189,7 @@ model PtrRecord { /** * The PTR target domain name for this PTR record. */ - @projectedName("json", "ptrdname") + @encodedName("application/json", "ptrdname") dnsPtrDomainName?: string; } @@ -225,7 +225,7 @@ model TxtRecord { /** * The text value of this TXT record. */ - @projectedName("json", "value") + @encodedName("application/json", "value") values?: string[]; } @@ -261,25 +261,25 @@ model SoaRecord { /** * The refresh value for this SOA record. */ - @projectedName("json", "refreshTime") + @encodedName("application/json", "refreshTime") refreshTimeInSeconds?: int64; /** * The retry time for this SOA record. */ - @projectedName("json", "retryTime") + @encodedName("application/json", "retryTime") retryTimeInSeconds?: int64; /** * The expire time for this SOA record. */ - @projectedName("json", "expireTime") + @encodedName("application/json", "expireTime") expireTimeInSeconds?: int64; /** * The minimum value for this SOA record. By convention this is used to determine the negative caching duration. */ - @projectedName("json", "minimumTTL") + @encodedName("application/json", "minimumTTL") minimumTtlInSeconds?: int64; } @@ -347,21 +347,21 @@ model ZoneProperties { * The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. */ @visibility("read") - @projectedName("json", "maxNumberOfRecordSets") + @encodedName("application/json", "maxNumberOfRecordSets") maxNumberOfRecords?: int64; /** * The maximum number of records per record set that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. */ @visibility("read") - @projectedName("json", "maxNumberOfRecordsPerRecordSet") + @encodedName("application/json", "maxNumberOfRecordsPerRecordSet") maxNumberOfRecordsPerRecord?: int64; /** * The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. */ @visibility("read") - @projectedName("json", "numberOfRecordSets") + @encodedName("application/json", "numberOfRecordSets") numberOfRecords?: int64; /** @@ -494,6 +494,6 @@ model RecordSetUpdateParameters { /** * Specifies information about the record set being updated. */ - @projectedName("json", "RecordSet") + @encodedName("application/json", "RecordSet") recordSet?: DnsRecord; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp index 270af3956f..cd4804087d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp @@ -108,8 +108,8 @@ interface BatchDeploymentTrackedResources { >; } -@@projectedName(BatchDeploymentTrackedResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(BatchDeploymentTrackedResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(BatchDeploymentTrackedResources.createOrUpdate::parameters.resource, @@ -119,8 +119,8 @@ interface BatchDeploymentTrackedResources { @@doc(BatchDeploymentTrackedResources.createOrUpdate::parameters.resource, "Batch inference deployment definition object." ); -@@projectedName(BatchDeploymentTrackedResources.update::parameters.properties, - "json", +@@encodedName(BatchDeploymentTrackedResources.update::parameters.properties, + "application/json", "body" ); @@extension(BatchDeploymentTrackedResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp index 74f3eebf3d..0062533304 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp @@ -113,8 +113,8 @@ interface BatchEndpointTrackedResources { >; } -@@projectedName(BatchEndpointTrackedResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(BatchEndpointTrackedResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(BatchEndpointTrackedResources.createOrUpdate::parameters.resource, @@ -124,8 +124,8 @@ interface BatchEndpointTrackedResources { @@doc(BatchEndpointTrackedResources.createOrUpdate::parameters.resource, "Batch inference endpoint definition object." ); -@@projectedName(BatchEndpointTrackedResources.update::parameters.properties, - "json", +@@encodedName(BatchEndpointTrackedResources.update::parameters.properties, + "application/json", "body" ); @@extension(BatchEndpointTrackedResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp index 6a40a83ecf..2e5622b9bd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp @@ -80,8 +80,8 @@ interface CodeContainerResources { >; } -@@projectedName(CodeContainerResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(CodeContainerResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(CodeContainerResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp index 406340dd74..f94d7d5c87 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp @@ -102,8 +102,8 @@ interface CodeVersionResources { >; } -@@projectedName(CodeVersionResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(CodeVersionResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(CodeVersionResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp index 8b0f1e311a..0fca7360a7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp @@ -80,8 +80,8 @@ interface ComponentContainerResources { >; } -@@projectedName(ComponentContainerResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(ComponentContainerResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(ComponentContainerResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp index cd13182de5..8d1fcf6a77 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp @@ -97,8 +97,8 @@ interface ComponentVersionResources { >; } -@@projectedName(ComponentVersionResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(ComponentVersionResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(ComponentVersionResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp index 97b6caf98f..aa5b18dd3e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp @@ -141,15 +141,15 @@ updateIdleShutdownSetting is ArmResourceActionSync; } -@@projectedName(DataContainerResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(DataContainerResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(DataContainerResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp index 3be87cb025..65eebff6b1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp @@ -115,8 +115,8 @@ interface DataVersionBaseResources { >; } -@@projectedName(DataVersionBaseResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(DataVersionBaseResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(DataVersionBaseResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp index e08a0a8415..6a3cd5698e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp @@ -140,8 +140,8 @@ interface DatastoreResources { >; } -@@projectedName(DatastoreResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(DatastoreResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(DatastoreResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp index 656ea14f8d..bcaaa3e8a5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp @@ -86,8 +86,8 @@ interface EnvironmentContainerResources { >; } -@@projectedName(EnvironmentContainerResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(EnvironmentContainerResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(EnvironmentContainerResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp index 4833f3898c..22e5c2d923 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp @@ -103,8 +103,8 @@ interface EnvironmentVersionResources { >; } -@@projectedName(EnvironmentVersionResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(EnvironmentVersionResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(EnvironmentVersionResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp index 04ecaead48..c7b53deaed 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp @@ -105,8 +105,8 @@ interface FeaturesetContainers { >; } -@@projectedName(FeaturesetContainers.createOrUpdate::parameters.resource, - "json", +@@encodedName(FeaturesetContainers.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(FeaturesetContainers.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp index 781c924c03..3adfa7f44e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp @@ -160,8 +160,8 @@ interface FeaturesetVersions { >; } -@@projectedName(FeaturesetVersions.createOrUpdate::parameters.resource, - "json", +@@encodedName(FeaturesetVersions.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(FeaturesetVersions.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp index 5d5c2b8bfa..4711c1e9a3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp @@ -105,8 +105,8 @@ interface FeaturestoreEntityContainers { >; } -@@projectedName(FeaturestoreEntityContainers.createOrUpdate::parameters.resource, - "json", +@@encodedName(FeaturestoreEntityContainers.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(FeaturestoreEntityContainers.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp index 1f67d74689..9984935b9e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp @@ -117,8 +117,8 @@ interface FeaturestoreEntityVersions { >; } -@@projectedName(FeaturestoreEntityVersions.createOrUpdate::parameters.resource, - "json", +@@encodedName(FeaturestoreEntityVersions.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(FeaturestoreEntityVersions.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp index 1887c80796..5e13955d19 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp @@ -130,8 +130,8 @@ interface JobBaseResources { cancel is ArmResourceActionAsync; } -@@projectedName(JobBaseResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(JobBaseResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(JobBaseResources.createOrUpdate::parameters.resource, @@ -141,7 +141,10 @@ interface JobBaseResources { @@doc(JobBaseResources.createOrUpdate::parameters.resource, "Job definition object." ); -@@projectedName(JobBaseResources.update::parameters.properties, "json", "body"); +@@encodedName(JobBaseResources.update::parameters.properties, + "application/json", + "body" +); @@extension(JobBaseResources.update::parameters.properties, "x-ms-client-name", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp index ccaf32be80..8958db8212 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp @@ -115,8 +115,8 @@ interface LabelingJobs { resume is ArmResourceActionAsync; } -@@projectedName(LabelingJobs.createOrUpdate::parameters.resource, - "json", +@@encodedName(LabelingJobs.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(LabelingJobs.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp index 31ab0481ee..12c30ea115 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp @@ -86,8 +86,8 @@ interface ModelContainerResources { >; } -@@projectedName(ModelContainerResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(ModelContainerResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(ModelContainerResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp index 2209edf122..ef3c1aefc7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp @@ -137,8 +137,8 @@ interface ModelVersionResources { >; } -@@projectedName(ModelVersionResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(ModelVersionResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(ModelVersionResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp index 23b99d02bc..cbe509ed5e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp @@ -179,8 +179,8 @@ interface OnlineDeploymentTrackedResources { >; } -@@projectedName(OnlineDeploymentTrackedResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(OnlineDeploymentTrackedResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(OnlineDeploymentTrackedResources.createOrUpdate::parameters.resource, @@ -190,8 +190,8 @@ interface OnlineDeploymentTrackedResources { @@doc(OnlineDeploymentTrackedResources.createOrUpdate::parameters.resource, "Inference Endpoint entity to apply during operation." ); -@@projectedName(OnlineDeploymentTrackedResources.update::parameters.properties, - "json", +@@encodedName(OnlineDeploymentTrackedResources.update::parameters.properties, + "application/json", "body" ); @@extension(OnlineDeploymentTrackedResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp index 7f482cb703..8050a474a3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp @@ -165,8 +165,8 @@ interface OnlineEndpointTrackedResources { >; } -@@projectedName(OnlineEndpointTrackedResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(OnlineEndpointTrackedResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(OnlineEndpointTrackedResources.createOrUpdate::parameters.resource, @@ -176,8 +176,8 @@ interface OnlineEndpointTrackedResources { @@doc(OnlineEndpointTrackedResources.createOrUpdate::parameters.resource, "Online Endpoint entity to apply during operation." ); -@@projectedName(OnlineEndpointTrackedResources.update::parameters.properties, - "json", +@@encodedName(OnlineEndpointTrackedResources.update::parameters.properties, + "application/json", "body" ); @@extension(OnlineEndpointTrackedResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp index 826237baea..c85f93ed8c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp @@ -69,8 +69,8 @@ interface OutboundRuleBasicResources { list is ArmResourceListByParent; } -@@projectedName(OutboundRuleBasicResources.createOrUpdate::parameters.resource, - "json", +@@encodedName(OutboundRuleBasicResources.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(OutboundRuleBasicResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp index 63881ac5f5..4545051a44 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp @@ -68,8 +68,8 @@ interface PrivateEndpointConnections { list is ArmResourceListByParent; } -@@projectedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, - "json", +@@encodedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, + "application/json", "body" ); @@extension(PrivateEndpointConnections.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp index 10d26f91f9..9fbbfede52 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp @@ -83,7 +83,10 @@ interface Registries { removeRegions is ArmResourceActionAsync; } -@@projectedName(Registries.createOrUpdate::parameters.resource, "json", "body"); +@@encodedName(Registries.createOrUpdate::parameters.resource, + "application/json", + "body" +); @@extension(Registries.createOrUpdate::parameters.resource, "x-ms-client-name", "body" @@ -91,7 +94,10 @@ interface Registries { @@doc(Registries.createOrUpdate::parameters.resource, "Details required to create the registry." ); -@@projectedName(Registries.update::parameters.properties, "json", "body"); +@@encodedName(Registries.update::parameters.properties, + "application/json", + "body" +); @@extension(Registries.update::parameters.properties, "x-ms-client-name", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp index bc17696b7d..bd69d98373 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp @@ -79,7 +79,10 @@ interface Schedules { >; } -@@projectedName(Schedules.createOrUpdate::parameters.resource, "json", "body"); +@@encodedName(Schedules.createOrUpdate::parameters.resource, + "application/json", + "body" +); @@extension(Schedules.createOrUpdate::parameters.resource, "x-ms-client-name", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp index f5bc11ed87..2e9467dedc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp @@ -286,7 +286,10 @@ Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds" >; } -@@projectedName(Workspaces.createOrUpdate::parameters.resource, "json", "body"); +@@encodedName(Workspaces.createOrUpdate::parameters.resource, + "application/json", + "body" +); @@extension(Workspaces.createOrUpdate::parameters.resource, "x-ms-client-name", "body" @@ -294,7 +297,10 @@ Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds" @@doc(Workspaces.createOrUpdate::parameters.resource, "The parameters for creating or updating a machine learning workspace." ); -@@projectedName(Workspaces.update::parameters.properties, "json", "body"); +@@encodedName(Workspaces.update::parameters.properties, + "application/json", + "body" +); @@extension(Workspaces.update::parameters.properties, "x-ms-client-name", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp index 81312833b9..b36bfd0758 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp @@ -105,8 +105,8 @@ interface WorkspaceConnectionPropertiesV2BasicResources { >; } -@@projectedName(WorkspaceConnectionPropertiesV2BasicResources.create::parameters.resource, - "json", +@@encodedName(WorkspaceConnectionPropertiesV2BasicResources.create::parameters.resource, + "application/json", "body" ); @@extension(WorkspaceConnectionPropertiesV2BasicResources.create::parameters.resource, @@ -116,8 +116,8 @@ interface WorkspaceConnectionPropertiesV2BasicResources { @@doc(WorkspaceConnectionPropertiesV2BasicResources.create::parameters.resource, "The object for creating or updating a new workspace connection" ); -@@projectedName(WorkspaceConnectionPropertiesV2BasicResources.update::parameters.properties, - "json", +@@encodedName(WorkspaceConnectionPropertiesV2BasicResources.update::parameters.properties, + "application/json", "body" ); @@extension(WorkspaceConnectionPropertiesV2BasicResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp index 933cbe0cc0..7a7a2757a6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp @@ -211,8 +211,8 @@ interface Catalogs { >; } -@@projectedName(Catalogs.listDeviceGroups::parameters.body, - "json", +@@encodedName(Catalogs.listDeviceGroups::parameters.body, + "application/json", "listDeviceGroupsRequest" ); @@extension(Catalogs.listDeviceGroups::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp index ba2e754fa9..916e111d24 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp @@ -89,8 +89,8 @@ interface Certificates { >; } -@@projectedName(Certificates.retrieveProofOfPossessionNonce::parameters.body, - "json", +@@encodedName(Certificates.retrieveProofOfPossessionNonce::parameters.body, + "application/json", "proofOfPossessionNonceRequest" ); @@extension(Certificates.retrieveProofOfPossessionNonce::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp index 0e2071d363..43381f071c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp @@ -68,8 +68,8 @@ interface Devices { >; } -@@projectedName(Devices.generateCapabilityImage::parameters.body, - "json", +@@encodedName(Devices.generateCapabilityImage::parameters.body, + "application/json", "generateDeviceCapabilityRequest" ); @@extension(Devices.generateCapabilityImage::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp index d461df31bd..b1a291d176 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp @@ -101,8 +101,8 @@ interface DeviceGroups { countDevices is ArmResourceActionSync; } -@@projectedName(DeviceGroups.claimDevices::parameters.body, - "json", +@@encodedName(DeviceGroups.claimDevices::parameters.body, + "application/json", "claimDevicesRequest" ); @@extension(DeviceGroups.claimDevices::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp index f83f478a79..e45c7087cd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp @@ -117,8 +117,8 @@ interface BlobContainers { objectLevelWorm is ArmResourceActionAsync; } -@@projectedName(BlobContainers.create::parameters.resource, - "json", +@@encodedName(BlobContainers.create::parameters.resource, + "application/json", "blobContainer" ); @@extension(BlobContainers.create::parameters.resource, @@ -128,8 +128,8 @@ interface BlobContainers { @@doc(BlobContainers.create::parameters.resource, "Properties of the blob container to create." ); -@@projectedName(BlobContainers.update::parameters.properties, - "json", +@@encodedName(BlobContainers.update::parameters.properties, + "application/json", "blobContainer" ); @@extension(BlobContainers.update::parameters.properties, @@ -139,8 +139,8 @@ interface BlobContainers { @@doc(BlobContainers.update::parameters.properties, "Properties to update for the blob container." ); -@@projectedName(BlobContainers.setLegalHold::parameters.body, - "json", +@@encodedName(BlobContainers.setLegalHold::parameters.body, + "application/json", "LegalHold" ); @@extension(BlobContainers.setLegalHold::parameters.body, @@ -150,8 +150,8 @@ interface BlobContainers { @@doc(BlobContainers.setLegalHold::parameters.body, "The LegalHold property that will be set to a blob container." ); -@@projectedName(BlobContainers.clearLegalHold::parameters.body, - "json", +@@encodedName(BlobContainers.clearLegalHold::parameters.body, + "application/json", "LegalHold" ); @@extension(BlobContainers.clearLegalHold::parameters.body, @@ -161,7 +161,10 @@ interface BlobContainers { @@doc(BlobContainers.clearLegalHold::parameters.body, "The LegalHold property that will be clear from a blob container." ); -@@projectedName(BlobContainers.lease::parameters.body, "json", "parameters"); +@@encodedName(BlobContainers.lease::parameters.body, + "application/json", + "parameters" +); @@extension(BlobContainers.lease::parameters.body, "x-ms-client-name", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp index 56651e3853..e3e98e5b3a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp @@ -61,8 +61,8 @@ interface BlobInventoryPolicies { list is ArmResourceListByParent; } -@@projectedName(BlobInventoryPolicies.createOrUpdate::parameters.resource, - "json", +@@encodedName(BlobInventoryPolicies.createOrUpdate::parameters.resource, + "application/json", "properties" ); @@extension(BlobInventoryPolicies.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp index 75a2e1b1b9..e1cfc6817a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp @@ -39,7 +39,6 @@ model BlobServiceProperties extends ProxyResourceBase { } @armResourceOperations -@projectedName("client", "BlobServiceProperties") interface BlobServicePropertiesOperationGroup { /** * Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. @@ -63,8 +62,8 @@ interface BlobServicePropertiesOperationGroup { list is ArmResourceListByParent; } -@@projectedName(BlobServicePropertiesOperationGroup.setServiceProperties::parameters.resource, - "json", +@@encodedName(BlobServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "application/json", "parameters" ); @@extension(BlobServicePropertiesOperationGroup.setServiceProperties::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp index 45ca61bada..e6316e0112 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp @@ -90,8 +90,8 @@ interface EncryptionScopes { >; } -@@projectedName(EncryptionScopes.put::parameters.resource, - "json", +@@encodedName(EncryptionScopes.put::parameters.resource, + "application/json", "encryptionScope" ); @@extension(EncryptionScopes.put::parameters.resource, @@ -101,8 +101,8 @@ interface EncryptionScopes { @@doc(EncryptionScopes.put::parameters.resource, "Encryption scope properties to be used for the create or update." ); -@@projectedName(EncryptionScopes.patch::parameters.properties, - "json", +@@encodedName(EncryptionScopes.patch::parameters.properties, + "application/json", "encryptionScope" ); @@extension(EncryptionScopes.patch::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp index cbcd3d5267..ec2cac71b1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp @@ -39,7 +39,6 @@ model FileServiceProperties extends ProxyResourceBase { } @armResourceOperations -@projectedName("client", "FileServiceProperties") interface FileServicePropertiesOperationGroup { /** * Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. @@ -63,8 +62,8 @@ interface FileServicePropertiesOperationGroup { list is ArmResourceListByParent; } -@@projectedName(FileServicePropertiesOperationGroup.setServiceProperties::parameters.resource, - "json", +@@encodedName(FileServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "application/json", "parameters" ); @@extension(FileServicePropertiesOperationGroup.setServiceProperties::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp index f84bff7d78..f93bcd8a13 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp @@ -161,7 +161,10 @@ interface FileShares { >; } -@@projectedName(FileShares.create::parameters.resource, "json", "fileShare"); +@@encodedName(FileShares.create::parameters.resource, + "application/json", + "fileShare" +); @@extension(FileShares.create::parameters.resource, "x-ms-client-name", "fileShare" @@ -169,7 +172,10 @@ interface FileShares { @@doc(FileShares.create::parameters.resource, "Properties of the file share to create." ); -@@projectedName(FileShares.update::parameters.properties, "json", "fileShare"); +@@encodedName(FileShares.update::parameters.properties, + "application/json", + "fileShare" +); @@extension(FileShares.update::parameters.properties, "x-ms-client-name", "fileShare" @@ -177,13 +183,19 @@ interface FileShares { @@doc(FileShares.update::parameters.properties, "Properties to update for the file share." ); -@@projectedName(FileShares.restore::parameters.body, "json", "deletedShare"); +@@encodedName(FileShares.restore::parameters.body, + "application/json", + "deletedShare" +); @@extension(FileShares.restore::parameters.body, "x-ms-client-name", "deletedShare" ); @@doc(FileShares.restore::parameters.body, ""); -@@projectedName(FileShares.lease::parameters.body, "json", "parameters"); +@@encodedName(FileShares.lease::parameters.body, + "application/json", + "parameters" +); @@extension(FileShares.lease::parameters.body, "x-ms-client-name", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp index 506595dd08..d2683701fc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp @@ -131,8 +131,8 @@ interface ImmutabilityPolicies { >; } -@@projectedName(ImmutabilityPolicies.createOrUpdateImmutabilityPolicy::parameters.resource, - "json", +@@encodedName(ImmutabilityPolicies.createOrUpdateImmutabilityPolicy::parameters.resource, + "application/json", "parameters" ); @@extension(ImmutabilityPolicies.createOrUpdateImmutabilityPolicy::parameters.resource, @@ -142,8 +142,8 @@ interface ImmutabilityPolicies { @@doc(ImmutabilityPolicies.createOrUpdateImmutabilityPolicy::parameters.resource, "The ImmutabilityPolicy Properties that will be created or updated to a blob container." ); -@@projectedName(ImmutabilityPolicies.extendImmutabilityPolicy::parameters.body, - "json", +@@encodedName(ImmutabilityPolicies.extendImmutabilityPolicy::parameters.body, + "application/json", "parameters" ); @@extension(ImmutabilityPolicies.extendImmutabilityPolicy::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp index 310f61b211..27cc3a35ca 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp @@ -78,8 +78,8 @@ interface LocalUsers { >; } -@@projectedName(LocalUsers.createOrUpdate::parameters.resource, - "json", +@@encodedName(LocalUsers.createOrUpdate::parameters.resource, + "application/json", "properties" ); @@extension(LocalUsers.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp index 6f654b1a67..570855af82 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp @@ -52,8 +52,8 @@ interface ManagementPolicies { delete is ArmResourceDeleteSync; } -@@projectedName(ManagementPolicies.createOrUpdate::parameters.resource, - "json", +@@encodedName(ManagementPolicies.createOrUpdate::parameters.resource, + "application/json", "properties" ); @@extension(ManagementPolicies.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp index ac3d3e150e..f2a6a67c9b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp @@ -65,8 +65,8 @@ interface ObjectReplicationPolicies { list is ArmResourceListByParent; } -@@projectedName(ObjectReplicationPolicies.createOrUpdate::parameters.resource, - "json", +@@encodedName(ObjectReplicationPolicies.createOrUpdate::parameters.resource, + "application/json", "properties" ); @@extension(ObjectReplicationPolicies.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp index f0ae704f7f..b03c948554 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp @@ -64,8 +64,8 @@ interface PrivateEndpointConnections { list is ArmResourceListByParent; } -@@projectedName(PrivateEndpointConnections.put::parameters.resource, - "json", +@@encodedName(PrivateEndpointConnections.put::parameters.resource, + "application/json", "properties" ); @@extension(PrivateEndpointConnections.put::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp index e8763d8b60..ed4b8c6d6f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp @@ -37,7 +37,6 @@ model QueueServiceProperties extends ProxyResourceBase { } @armResourceOperations -@projectedName("client", "QueueServiceProperties") interface QueueServicePropertiesOperationGroup { /** * Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. @@ -61,8 +60,8 @@ interface QueueServicePropertiesOperationGroup { list is ArmResourceListByParent; } -@@projectedName(QueueServicePropertiesOperationGroup.setServiceProperties::parameters.resource, - "json", +@@encodedName(QueueServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "application/json", "parameters" ); @@extension(QueueServicePropertiesOperationGroup.setServiceProperties::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp index 01209c3796..26272f12fe 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp @@ -251,8 +251,8 @@ interface StorageAccounts { >; } -@@projectedName(StorageAccounts.create::parameters.resource, - "json", +@@encodedName(StorageAccounts.create::parameters.resource, + "application/json", "parameters" ); @@extension(StorageAccounts.create::parameters.resource, @@ -262,8 +262,8 @@ interface StorageAccounts { @@doc(StorageAccounts.create::parameters.resource, "The parameters to provide for the created account." ); -@@projectedName(StorageAccounts.update::parameters.properties, - "json", +@@encodedName(StorageAccounts.update::parameters.properties, + "application/json", "parameters" ); @@extension(StorageAccounts.update::parameters.properties, @@ -273,8 +273,8 @@ interface StorageAccounts { @@doc(StorageAccounts.update::parameters.properties, "The parameters to provide for the updated account." ); -@@projectedName(StorageAccounts.regenerateKey::parameters.body, - "json", +@@encodedName(StorageAccounts.regenerateKey::parameters.body, + "application/json", "regenerateKey" ); @@extension(StorageAccounts.regenerateKey::parameters.body, @@ -284,8 +284,8 @@ interface StorageAccounts { @@doc(StorageAccounts.regenerateKey::parameters.body, "Specifies name of the key which should be regenerated -- key1, key2, kerb1, kerb2." ); -@@projectedName(StorageAccounts.listAccountSAS::parameters.body, - "json", +@@encodedName(StorageAccounts.listAccountSAS::parameters.body, + "application/json", "parameters" ); @@extension(StorageAccounts.listAccountSAS::parameters.body, @@ -295,8 +295,8 @@ interface StorageAccounts { @@doc(StorageAccounts.listAccountSAS::parameters.body, "The parameters to provide to list SAS credentials for the storage account." ); -@@projectedName(StorageAccounts.listServiceSAS::parameters.body, - "json", +@@encodedName(StorageAccounts.listServiceSAS::parameters.body, + "application/json", "parameters" ); @@extension(StorageAccounts.listServiceSAS::parameters.body, @@ -306,8 +306,8 @@ interface StorageAccounts { @@doc(StorageAccounts.listServiceSAS::parameters.body, "The parameters to provide to list service SAS credentials." ); -@@projectedName(StorageAccounts.restoreBlobRanges::parameters.body, - "json", +@@encodedName(StorageAccounts.restoreBlobRanges::parameters.body, + "application/json", "parameters" ); @@extension(StorageAccounts.restoreBlobRanges::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp index b01aa796c1..eb4b587a9f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp @@ -94,7 +94,10 @@ interface StorageQueues { >; } -@@projectedName(StorageQueues.create::parameters.resource, "json", "queue"); +@@encodedName(StorageQueues.create::parameters.resource, + "application/json", + "queue" +); @@extension(StorageQueues.create::parameters.resource, "x-ms-client-name", "queue" @@ -102,7 +105,10 @@ interface StorageQueues { @@doc(StorageQueues.create::parameters.resource, "Queue properties and metadata to be created with" ); -@@projectedName(StorageQueues.update::parameters.properties, "json", "queue"); +@@encodedName(StorageQueues.update::parameters.properties, + "application/json", + "queue" +); @@extension(StorageQueues.update::parameters.properties, "x-ms-client-name", "queue" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp index 21c1a4f9d5..34e3927a9f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp @@ -79,7 +79,10 @@ interface Tables { list is ArmResourceListByParent
    ; } -@@projectedName(Tables.create::parameters.resource, "json", "parameters"); +@@encodedName(Tables.create::parameters.resource, + "application/json", + "parameters" +); @@extension(Tables.create::parameters.resource, "x-ms-client-name", "parameters" @@ -87,7 +90,10 @@ interface Tables { @@doc(Tables.create::parameters.resource, "The parameters to provide to create a table." ); -@@projectedName(Tables.update::parameters.properties, "json", "parameters"); +@@encodedName(Tables.update::parameters.properties, + "application/json", + "parameters" +); @@extension(Tables.update::parameters.properties, "x-ms-client-name", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp index b1c0f7514c..d891ace999 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp @@ -37,7 +37,6 @@ model TableServiceProperties extends ProxyResourceBase { } @armResourceOperations -@projectedName("client", "TableServiceProperties") interface TableServicePropertiesOperationGroup { /** * Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. @@ -61,8 +60,8 @@ interface TableServicePropertiesOperationGroup { list is ArmResourceListByParent; } -@@projectedName(TableServicePropertiesOperationGroup.setServiceProperties::parameters.resource, - "json", +@@encodedName(TableServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "application/json", "parameters" ); @@extension(TableServicePropertiesOperationGroup.setServiceProperties::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/client.tsp index baf43ba2d2..3c61dda0a8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/client.tsp @@ -24,3 +24,11 @@ using Microsoft.Storage; #suppress "deprecated" "@flattenProperty decorator is not recommended to use." @@flattenProperty(ListQueue.queueProperties); + +@@clientName(BlobServicePropertiesOperationGroup, "BlobServiceProperties"); + +@@clientName(FileServicePropertiesOperationGroup, "FileServiceProperties"); + +@@clientName(QueueServicePropertiesOperationGroup, "QueueServiceProperties"); + +@@clientName(TableServicePropertiesOperationGroup, "TableServiceProperties"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp index 13c0238e84..3244b1ca6e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp @@ -922,7 +922,7 @@ model StorageAccountPropertiesCreateParameters { /** * Network rule set */ - @projectedName("json", "networkAcls") + @encodedName("application/json", "networkAcls") networkRuleSet?: NetworkRuleSet; /** @@ -938,25 +938,25 @@ model StorageAccountPropertiesCreateParameters { /** * Allows https traffic only to storage service if sets to true. The default value is true since API version 2019-04-01. */ - @projectedName("json", "supportsHttpsTrafficOnly") + @encodedName("application/json", "supportsHttpsTrafficOnly") enableHttpsTrafficOnly?: boolean; /** * Enables Secure File Transfer Protocol, if set to true */ - @projectedName("json", "isSftpEnabled") + @encodedName("application/json", "isSftpEnabled") IsSftpEnabled?: boolean; /** * Enables local users feature, if set to true */ - @projectedName("json", "isLocalUserEnabled") + @encodedName("application/json", "isLocalUserEnabled") IsLocalUserEnabled?: boolean; /** * Account HierarchicalNamespace enabled if sets to true. */ - @projectedName("json", "isHnsEnabled") + @encodedName("application/json", "isHnsEnabled") IsHnsEnabled?: boolean; /** @@ -987,7 +987,7 @@ model StorageAccountPropertiesCreateParameters { /** * NFS 3.0 protocol support enabled if set to true. */ - @projectedName("json", "isNfsV3Enabled") + @encodedName("application/json", "isNfsV3Enabled") enableNfsV3?: boolean; /** @@ -1073,13 +1073,13 @@ model Encryption { /** * Properties provided by key vault. */ - @projectedName("json", "keyvaultproperties") + @encodedName("application/json", "keyvaultproperties") keyVaultProperties?: KeyVaultProperties; /** * The identity to be used with service-side encryption at rest. */ - @projectedName("json", "identity") + @encodedName("application/json", "identity") encryptionIdentity?: EncryptionIdentity; } @@ -1138,19 +1138,19 @@ model KeyVaultProperties { /** * The name of KeyVault key. */ - @projectedName("json", "keyname") + @encodedName("application/json", "keyname") keyName?: string; /** * The version of KeyVault key. */ - @projectedName("json", "keyversion") + @encodedName("application/json", "keyversion") keyVersion?: string; /** * The Uri of KeyVault. */ - @projectedName("json", "keyvaulturi") + @encodedName("application/json", "keyvaulturi") keyVaultUri?: string; /** @@ -1181,13 +1181,13 @@ model EncryptionIdentity { /** * Resource identifier of the UserAssigned identity to be associated with server-side encryption on the storage account. */ - @projectedName("json", "userAssignedIdentity") + @encodedName("application/json", "userAssignedIdentity") encryptionUserAssignedIdentity?: string; /** * ClientId of the multi-tenant application to be used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys server-side encryption on the storage account. */ - @projectedName("json", "federatedIdentityClientId") + @encodedName("application/json", "federatedIdentityClientId") encryptionFederatedIdentityClientId?: string; } @@ -1243,7 +1243,7 @@ model VirtualNetworkRule { /** * Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. */ - @projectedName("json", "id") + @encodedName("application/json", "id") virtualNetworkResourceId: string; /** @@ -1264,7 +1264,7 @@ model IPRule { /** * Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed. */ - @projectedName("json", "value") + @encodedName("application/json", "value") IPAddressOrRange: string; /** @@ -1499,32 +1499,32 @@ model StorageAccountProperties { /** * Allows https traffic only to storage service if sets to true. */ - @projectedName("json", "supportsHttpsTrafficOnly") + @encodedName("application/json", "supportsHttpsTrafficOnly") enableHttpsTrafficOnly?: boolean; /** * Network rule set */ @visibility("read") - @projectedName("json", "networkAcls") + @encodedName("application/json", "networkAcls") networkRuleSet?: NetworkRuleSet; /** * Enables Secure File Transfer Protocol, if set to true */ - @projectedName("json", "isSftpEnabled") + @encodedName("application/json", "isSftpEnabled") IsSftpEnabled?: boolean; /** * Enables local users feature, if set to true */ - @projectedName("json", "isLocalUserEnabled") + @encodedName("application/json", "isLocalUserEnabled") IsLocalUserEnabled?: boolean; /** * Account HierarchicalNamespace enabled if sets to true. */ - @projectedName("json", "isHnsEnabled") + @encodedName("application/json", "isHnsEnabled") IsHnsEnabled?: boolean; /** @@ -1579,7 +1579,7 @@ model StorageAccountProperties { /** * NFS 3.0 protocol support enabled if set to true. */ - @projectedName("json", "isNfsV3Enabled") + @encodedName("application/json", "isNfsV3Enabled") enableNfsV3?: boolean; /** @@ -1885,7 +1885,7 @@ model BlobRestoreParameters { /** * Restore blob to the specified time. */ - @projectedName("json", "timetoRestore") + @encodedName("application/json", "timetoRestore") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. timeToRestore: utcDateTime; @@ -2007,25 +2007,25 @@ model StorageAccountPropertiesUpdateParameters { /** * Allows https traffic only to storage service if sets to true. */ - @projectedName("json", "supportsHttpsTrafficOnly") + @encodedName("application/json", "supportsHttpsTrafficOnly") enableHttpsTrafficOnly?: boolean; /** * Enables Secure File Transfer Protocol, if set to true */ - @projectedName("json", "isSftpEnabled") + @encodedName("application/json", "isSftpEnabled") IsSftpEnabled?: boolean; /** * Enables local users feature, if set to true */ - @projectedName("json", "isLocalUserEnabled") + @encodedName("application/json", "isLocalUserEnabled") IsLocalUserEnabled?: boolean; /** * Network rule set */ - @projectedName("json", "networkAcls") + @encodedName("application/json", "networkAcls") networkRuleSet?: NetworkRuleSet; /** @@ -2254,44 +2254,44 @@ model AccountSasParameters { /** * The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f). */ - @projectedName("json", "signedServices") + @encodedName("application/json", "signedServices") services: Services; /** * The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files. */ - @projectedName("json", "signedResourceTypes") + @encodedName("application/json", "signedResourceTypes") resourceTypes: SignedResourceTypes; /** * The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). */ - @projectedName("json", "signedPermission") + @encodedName("application/json", "signedPermission") permissions: Permissions; /** * An IP address or a range of IP addresses from which to accept requests. */ - @projectedName("json", "signedIp") + @encodedName("application/json", "signedIp") IPAddressOrRange?: string; /** * The protocol permitted for a request made with the account SAS. */ - @projectedName("json", "signedProtocol") + @encodedName("application/json", "signedProtocol") protocols?: HttpProtocol; /** * The time at which the SAS becomes valid. */ - @projectedName("json", "signedStart") + @encodedName("application/json", "signedStart") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. sharedAccessStartTime?: utcDateTime; /** * The time at which the shared access signature becomes invalid. */ - @projectedName("json", "signedExpiry") + @encodedName("application/json", "signedExpiry") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. sharedAccessExpiryTime: utcDateTime; @@ -2324,38 +2324,38 @@ model ServiceSasParameters { /** * The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s). */ - @projectedName("json", "signedResource") + @encodedName("application/json", "signedResource") resource?: SignedResource; /** * The signed permissions for the service SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p). */ - @projectedName("json", "signedPermission") + @encodedName("application/json", "signedPermission") permissions?: Permissions; /** * An IP address or a range of IP addresses from which to accept requests. */ - @projectedName("json", "signedIp") + @encodedName("application/json", "signedIp") IPAddressOrRange?: string; /** * The protocol permitted for a request made with the account SAS. */ - @projectedName("json", "signedProtocol") + @encodedName("application/json", "signedProtocol") protocols?: HttpProtocol; /** * The time at which the SAS becomes valid. */ - @projectedName("json", "signedStart") + @encodedName("application/json", "signedStart") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. sharedAccessStartTime?: utcDateTime; /** * The time at which the shared access signature becomes invalid. */ - @projectedName("json", "signedExpiry") + @encodedName("application/json", "signedExpiry") // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. sharedAccessExpiryTime?: utcDateTime; @@ -2363,31 +2363,31 @@ model ServiceSasParameters { * A unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or table. */ @maxLength(64) - @projectedName("json", "signedIdentifier") + @encodedName("application/json", "signedIdentifier") identifier?: string; /** * The start of partition key. */ - @projectedName("json", "startPk") + @encodedName("application/json", "startPk") partitionKeyStart?: string; /** * The end of partition key. */ - @projectedName("json", "endPk") + @encodedName("application/json", "endPk") partitionKeyEnd?: string; /** * The start of row key. */ - @projectedName("json", "startRk") + @encodedName("application/json", "startRk") rowKeyStart?: string; /** * The end of row key. */ - @projectedName("json", "endRk") + @encodedName("application/json", "endRk") rowKeyEnd?: string; /** @@ -2398,31 +2398,31 @@ model ServiceSasParameters { /** * The response header override for cache control. */ - @projectedName("json", "rscc") + @encodedName("application/json", "rscc") cacheControl?: string; /** * The response header override for content disposition. */ - @projectedName("json", "rscd") + @encodedName("application/json", "rscd") contentDisposition?: string; /** * The response header override for content encoding. */ - @projectedName("json", "rsce") + @encodedName("application/json", "rsce") contentEncoding?: string; /** * The response header override for content language. */ - @projectedName("json", "rscl") + @encodedName("application/json", "rscl") contentLanguage?: string; /** * The response header override for content type. */ - @projectedName("json", "rsct") + @encodedName("application/json", "rsct") contentType?: string; } @@ -4100,7 +4100,7 @@ model ListQueue extends Resource { /** * List Queue resource properties. */ - @projectedName("json", "properties") + @encodedName("application/json", "properties") queueProperties?: ListQueueProperties; } diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/client.tsp deleted file mode 100644 index 95d80ffea9..0000000000 --- a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using Azure.Batch; diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp index 86ecd1fc84..34a49a677c 100644 --- a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp @@ -1110,7 +1110,7 @@ model ApplicationListResult { * The URL to get the next set of results. */ @nextLink - @projectedName("json", "odata.nextLink") + @encodedName("application/json", "odata.nextLink") odataNextLink?: string; } @@ -1204,7 +1204,7 @@ model PoolListUsageMetricsResult { * The URL to get the next set of results. */ @nextLink - @projectedName("json", "odata.nextLink") + @encodedName("application/json", "odata.nextLink") odataNextLink?: string; } @@ -1260,7 +1260,7 @@ model AccountListSupportedImagesResult { * The URL to get the next set of results. */ @nextLink - @projectedName("json", "odata.nextLink") + @encodedName("application/json", "odata.nextLink") odataNextLink?: string; } @@ -1372,7 +1372,7 @@ model PoolNodeCountsListResult { * The URL to get the next set of results. */ @nextLink - @projectedName("json", "odata.nextLink") + @encodedName("application/json", "odata.nextLink") odataNextLink?: string; } @@ -1837,7 +1837,7 @@ model CertificateListResult { * The URL to get the next set of results. */ @nextLink - @projectedName("json", "odata.nextLink") + @encodedName("application/json", "odata.nextLink") odataNextLink?: string; } @@ -1857,7 +1857,7 @@ model NodeFileListResult { * The URL to get the next set of results. */ @nextLink - @projectedName("json", "odata.nextLink") + @encodedName("application/json", "odata.nextLink") odataNextLink?: string; } @@ -2423,7 +2423,7 @@ model ContainerRegistry { /** * The user name to log into the registry server. */ - @projectedName("json", "username") + @encodedName("application/json", "username") userName?: string; /** @@ -2677,7 +2677,7 @@ model UserIdentity { * The userName and autoUser properties are mutually exclusive; you must specify * one but not both. */ - @projectedName("json", "username") + @encodedName("application/json", "username") userName?: string; /** @@ -4159,7 +4159,7 @@ model BatchJobScheduleListResult { * The URL to get the next set of results. */ @nextLink - @projectedName("json", "odata.nextLink") + @encodedName("application/json", "odata.nextLink") odataNextLink?: string; } @@ -4534,7 +4534,7 @@ model BatchJobListResult { * The URL to get the next set of results. */ @nextLink - @projectedName("json", "odata.nextLink") + @encodedName("application/json", "odata.nextLink") odataNextLink?: string; } @@ -4554,7 +4554,7 @@ model BatchJobListPreparationAndReleaseTaskStatusResult { * The URL to get the next set of results. */ @nextLink - @projectedName("json", "odata.nextLink") + @encodedName("application/json", "odata.nextLink") odataNextLink?: string; } @@ -5256,7 +5256,7 @@ model BatchPoolListResult { * The URL to get the next set of results. */ @nextLink - @projectedName("json", "odata.nextLink") + @encodedName("application/json", "odata.nextLink") odataNextLink?: string; } @@ -5998,7 +5998,7 @@ model BatchTaskListResult { * The URL to get the next set of results. */ @nextLink - @projectedName("json", "odata.nextLink") + @encodedName("application/json", "odata.nextLink") odataNextLink?: string; } @@ -6546,7 +6546,7 @@ model InboundEndpoint { /** * The public fully qualified domain name for the Compute Node. */ - @projectedName("json", "publicFQDN") + @encodedName("application/json", "publicFQDN") publicFqdn: string; /** @@ -6710,7 +6710,7 @@ model ComputeNodeListResult { * The URL to get the next set of results. */ @nextLink - @projectedName("json", "odata.nextLink") + @encodedName("application/json", "odata.nextLink") odataNextLink?: string; } @@ -6799,6 +6799,6 @@ model NodeVMExtensionList { * The URL to get the next set of results. */ @nextLink - @projectedName("json", "odata.nextLink") + @encodedName("application/json", "odata.nextLink") odataNextLink?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp index 667b67a1a1..211747ad79 100644 --- a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp @@ -75,18 +75,18 @@ model FloatWrapper { model DoubleWrapper { field1?: float64; - @projectedName( - "json", + @encodedName( + "application/json", "field_56_zeros_after_the_dot_and_negative_zero_before_dot_and_this_is_a_long_field_name_on_purpose" ) field56ZerosAfterTheDotAndNegativeZeroBeforeDotAndThisIsALongFieldNameOnPurpose?: float64; } model BooleanWrapper { - @projectedName("json", "field_true") + @encodedName("application/json", "field_true") fieldTrue?: boolean; - @projectedName("json", "field_false") + @encodedName("application/json", "field_false") fieldFalse?: boolean; } @@ -209,7 +209,7 @@ model MyBaseHelperType { model SmartSalmon extends Salmon { ...Record; - @projectedName("json", "college_degree") + @encodedName("application/json", "college_degree") collegeDegree?: string; fishtype: "smart_salmon"; diff --git a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/client.tsp deleted file mode 100644 index bc410fa865..0000000000 --- a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using ComplexModelClient; diff --git a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/models.tsp index 1d5b53f127..64023ad243 100644 --- a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/models.tsp @@ -22,7 +22,7 @@ model Product { * longitude. For example, uberX in San Francisco will have a different product_id * than uberX in Los Angeles. */ - @projectedName("json", "product_id") + @encodedName("application/json", "product_id") productId?: string; /** @@ -33,7 +33,7 @@ model Product { /** * Display name of product. */ - @projectedName("json", "display_name") + @encodedName("application/json", "display_name") displayName?: string; /** diff --git a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/client.tsp deleted file mode 100644 index 351ef61b80..0000000000 --- a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using Azure.Language.Authoring; diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp index 9b8b9e4173..b54acdf782 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp @@ -609,7 +609,7 @@ model Error { * The key vault server error. */ @visibility("read") - @projectedName("json", "innererror") + @encodedName("application/json", "innererror") innerError?: Error; } @@ -740,7 +740,7 @@ model CertificateItem { /** * Thumbprint of the certificate. */ - @projectedName("json", "x5t") + @encodedName("application/json", "x5t") x509Thumbprint?: bytes; } @@ -777,13 +777,13 @@ model Attributes { /** * Not before date in UTC. */ - @projectedName("json", "nbf") + @encodedName("application/json", "nbf") notBefore?: plainTime; /** * Expiry date in UTC. */ - @projectedName("json", "exp") + @encodedName("application/json", "exp") expires?: plainTime; /** @@ -849,7 +849,7 @@ model CertificateBundle { * Thumbprint of the certificate. */ @visibility("read") - @projectedName("json", "x5t") + @encodedName("application/json", "x5t") x509Thumbprint?: bytes; /** @@ -893,31 +893,31 @@ model CertificatePolicy { /** * Properties of the key backing a certificate. */ - @projectedName("json", "key_props") + @encodedName("application/json", "key_props") keyProperties?: KeyProperties; /** * Properties of the secret backing a certificate. */ - @projectedName("json", "secret_props") + @encodedName("application/json", "secret_props") secretProperties?: SecretProperties; /** * Properties of the X509 component of a certificate. */ - @projectedName("json", "x509_props") + @encodedName("application/json", "x509_props") x509CertificateProperties?: X509CertificateProperties; /** * Actions that will be performed by Key Vault over the lifetime of a certificate. */ - @projectedName("json", "lifetime_actions") + @encodedName("application/json", "lifetime_actions") lifetimeActions?: LifetimeAction[]; /** * Parameters for the issuer of the X509 component of a certificate. */ - @projectedName("json", "issuer") + @encodedName("application/json", "issuer") issuerParameters?: IssuerParameters; /** @@ -939,25 +939,25 @@ model KeyProperties { /** * The type of key pair to be used for the certificate. */ - @projectedName("json", "kty") + @encodedName("application/json", "kty") keyType?: JsonWebKeyType; /** * The key size in bits. For example: 2048, 3072, or 4096 for RSA. */ - @projectedName("json", "key_size") + @encodedName("application/json", "key_size") keySize?: int32; /** * Indicates if the same key pair will be used on certificate renewal. */ - @projectedName("json", "reuse_key") + @encodedName("application/json", "reuse_key") reuseKey?: boolean; /** * Elliptic curve name. For valid values, see JsonWebKeyCurveName. */ - @projectedName("json", "crv") + @encodedName("application/json", "crv") curve?: JsonWebKeyCurveName; } @@ -988,19 +988,19 @@ model X509CertificateProperties { /** * The subject alternative names. */ - @projectedName("json", "sans") + @encodedName("application/json", "sans") subjectAlternativeNames?: SubjectAlternativeNames; /** * Defines how the certificate's key may be used. */ - @projectedName("json", "key_usage") + @encodedName("application/json", "key_usage") keyUsage?: KeyUsageType[]; /** * The duration that the certificate is valid in months. */ - @projectedName("json", "validity_months") + @encodedName("application/json", "validity_months") validityInMonths?: int32; } @@ -1016,7 +1016,7 @@ model SubjectAlternativeNames { /** * Domain names. */ - @projectedName("json", "dns_names") + @encodedName("application/json", "dns_names") dnsNames?: string[]; /** @@ -1050,7 +1050,7 @@ model Trigger { */ @maxValue(99) @minValue(1) - @projectedName("json", "lifetime_percentage") + @encodedName("application/json", "lifetime_percentage") lifetimePercentage?: int32; /** @@ -1058,7 +1058,7 @@ model Trigger { * validity_in_months multiplied by 27. If validity_in_months is 36, then value * should be between 1 and 972 (36 * 27). */ - @projectedName("json", "days_before_expiry") + @encodedName("application/json", "days_before_expiry") daysBeforeExpiry?: int32; } @@ -1069,7 +1069,7 @@ model Action { /** * The type of the action. */ - @projectedName("json", "action_type") + @encodedName("application/json", "action_type") actionType?: ActionType; } @@ -1087,14 +1087,14 @@ model IssuerParameters { * Certificate type as supported by the provider (optional); for example 'OV-SSL', * 'EV-SSL' */ - @projectedName("json", "cty") + @encodedName("application/json", "cty") certificateType?: string; /** * Indicates if the certificates generated under this policy should be published * to certificate transparency logs. */ - @projectedName("json", "cert_transparency") + @encodedName("application/json", "cert_transparency") certificateTransparency?: boolean; } @@ -1111,7 +1111,7 @@ model Contacts { /** * The contact list for the vault certificates. */ - @projectedName("json", "contacts") + @encodedName("application/json", "contacts") contactList?: Contact[]; } @@ -1122,7 +1122,7 @@ model Contact { /** * Email address. */ - @projectedName("json", "email") + @encodedName("application/json", "email") emailAddress?: string; /** @@ -1173,7 +1173,7 @@ model CertificateIssuerSetParameters { /** * Details of the organization as provided to the issuer. */ - @projectedName("json", "org_details") + @encodedName("application/json", "org_details") organizationDetails?: OrganizationDetails; /** @@ -1189,13 +1189,13 @@ model IssuerCredentials { /** * The user name/account name/account id. */ - @projectedName("json", "account_id") + @encodedName("application/json", "account_id") accountId?: string; /** * The password/secret/account key. */ - @projectedName("json", "pwd") + @encodedName("application/json", "pwd") password?: string; } @@ -1211,7 +1211,7 @@ model OrganizationDetails { /** * Details of the organization administrator. */ - @projectedName("json", "admin_details") + @encodedName("application/json", "admin_details") adminDetails?: AdministratorDetails[]; } @@ -1222,19 +1222,19 @@ model AdministratorDetails { /** * First name. */ - @projectedName("json", "first_name") + @encodedName("application/json", "first_name") firstName?: string; /** * Last name. */ - @projectedName("json", "last_name") + @encodedName("application/json", "last_name") lastName?: string; /** * Email address. */ - @projectedName("json", "email") + @encodedName("application/json", "email") emailAddress?: string; /** @@ -1288,7 +1288,7 @@ model IssuerBundle { /** * Details of the organization as provided to the issuer. */ - @projectedName("json", "org_details") + @encodedName("application/json", "org_details") organizationDetails?: OrganizationDetails; /** @@ -1314,7 +1314,7 @@ model CertificateIssuerUpdateParameters { /** * Details of the organization as provided to the issuer. */ - @projectedName("json", "org_details") + @encodedName("application/json", "org_details") organizationDetails?: OrganizationDetails; /** @@ -1330,13 +1330,13 @@ model CertificateCreateParameters { /** * The management policy for the certificate. */ - @projectedName("json", "policy") + @encodedName("application/json", "policy") certificatePolicy?: CertificatePolicy; /** * The attributes of the certificate (optional). */ - @projectedName("json", "attributes") + @encodedName("application/json", "attributes") certificateAttributes?: CertificateAttributes; /** @@ -1358,7 +1358,7 @@ model CertificateOperation { /** * Parameters for the issuer of the X509 component of a certificate. */ - @projectedName("json", "issuer") + @encodedName("application/json", "issuer") issuerParameters?: IssuerParameters; /** @@ -1370,7 +1370,7 @@ model CertificateOperation { /** * Indicates if cancellation was requested on the certificate operation. */ - @projectedName("json", "cancellation_requested") + @encodedName("application/json", "cancellation_requested") cancellationRequested?: boolean; /** @@ -1381,7 +1381,7 @@ model CertificateOperation { /** * The status details of the certificate operation. */ - @projectedName("json", "status_details") + @encodedName("application/json", "status_details") statusDetails?: string; /** @@ -1397,7 +1397,7 @@ model CertificateOperation { /** * Identifier for the certificate operation. */ - @projectedName("json", "request_id") + @encodedName("application/json", "request_id") requestId?: string; } @@ -1409,26 +1409,26 @@ model CertificateImportParameters { * Base64 encoded representation of the certificate object to import. This * certificate needs to contain the private key. */ - @projectedName("json", "value") + @encodedName("application/json", "value") base64EncodedCertificate: string; /** * If the private key in base64EncodedCertificate is encrypted, the password used * for encryption. */ - @projectedName("json", "pwd") + @encodedName("application/json", "pwd") password?: string; /** * The management policy for the certificate. */ - @projectedName("json", "policy") + @encodedName("application/json", "policy") certificatePolicy?: CertificatePolicy; /** * The attributes of the certificate (optional). */ - @projectedName("json", "attributes") + @encodedName("application/json", "attributes") certificateAttributes?: CertificateAttributes; /** @@ -1444,13 +1444,13 @@ model CertificateUpdateParameters { /** * The management policy for the certificate. */ - @projectedName("json", "policy") + @encodedName("application/json", "policy") certificatePolicy?: CertificatePolicy; /** * The attributes of the certificate (optional). */ - @projectedName("json", "attributes") + @encodedName("application/json", "attributes") certificateAttributes?: CertificateAttributes; /** @@ -1466,7 +1466,7 @@ model CertificateOperationUpdateParameter { /** * Indicates if cancellation was requested on the certificate operation. */ - @projectedName("json", "cancellation_requested") + @encodedName("application/json", "cancellation_requested") cancellationRequested: boolean; } @@ -1477,13 +1477,13 @@ model CertificateMergeParameters { /** * The certificate or the certificate chain to merge. */ - @projectedName("json", "x5c") + @encodedName("application/json", "x5c") x509Certificates: bytes[]; /** * The attributes of the certificate (optional). */ - @projectedName("json", "attributes") + @encodedName("application/json", "attributes") certificateAttributes?: CertificateAttributes; /** @@ -1510,7 +1510,7 @@ model CertificateRestoreParameters { /** * The backup blob associated with a certificate bundle. */ - @projectedName("json", "value") + @encodedName("application/json", "value") certificateBundleBackup: bytes; } @@ -1554,22 +1554,22 @@ model KeyCreateParameters { /** * The key size in bits. For example: 2048, 3072, or 4096 for RSA. */ - @projectedName("json", "key_size") + @encodedName("application/json", "key_size") keySize?: int32; /** * The public exponent for a RSA key. */ - @projectedName("json", "public_exponent") + @encodedName("application/json", "public_exponent") publicExponent?: int32; - @projectedName("json", "key_ops") + @encodedName("application/json", "key_ops") keyOps?: JsonWebKeyOperation[]; /** * The attributes of a key managed by the key vault service. */ - @projectedName("json", "attributes") + @encodedName("application/json", "attributes") keyAttributes?: KeyAttributes; /** @@ -1580,13 +1580,13 @@ model KeyCreateParameters { /** * Elliptic curve name. For valid values, see JsonWebKeyCurveName. */ - @projectedName("json", "crv") + @encodedName("application/json", "crv") curve?: JsonWebKeyCurveName; /** * The policy rules under which the key can be exported. */ - @projectedName("json", "release_policy") + @encodedName("application/json", "release_policy") releasePolicy?: KeyReleasePolicy; } @@ -1636,7 +1636,7 @@ model KeyReleasePolicy { * Blob encoding the policy rules under which the key can be released. Blob must * be base64 URL encoded. */ - @projectedName("json", "data") + @encodedName("application/json", "data") encodedPolicy?: bytes; } @@ -1669,7 +1669,7 @@ model KeyBundle { /** * The policy rules under which the key can be exported. */ - @projectedName("json", "release_policy") + @encodedName("application/json", "release_policy") releasePolicy?: KeyReleasePolicy; } @@ -1688,7 +1688,7 @@ model JsonWebKey { */ kty?: JsonWebKeyType; - @projectedName("json", "key_ops") + @encodedName("application/json", "key_ops") keyOps?: string[]; /** @@ -1709,19 +1709,19 @@ model JsonWebKey { /** * RSA private key parameter. */ - @projectedName("json", "dp") + @encodedName("application/json", "dp") DP?: bytes; /** * RSA private key parameter. */ - @projectedName("json", "dq") + @encodedName("application/json", "dq") DQ?: bytes; /** * RSA private key parameter. */ - @projectedName("json", "qi") + @encodedName("application/json", "qi") QI?: bytes; /** @@ -1742,7 +1742,7 @@ model JsonWebKey { /** * Protected Key, used with 'Bring Your Own Key'. */ - @projectedName("json", "key_hsm") + @encodedName("application/json", "key_hsm") t?: bytes; /** @@ -1768,7 +1768,7 @@ model KeyImportParameters { /** * Whether to import as a hardware key (HSM) or software key. */ - @projectedName("json", "Hsm") + @encodedName("application/json", "Hsm") hsm?: boolean; /** @@ -1779,7 +1779,7 @@ model KeyImportParameters { /** * The key management attributes. */ - @projectedName("json", "attributes") + @encodedName("application/json", "attributes") keyAttributes?: KeyAttributes; /** @@ -1790,7 +1790,7 @@ model KeyImportParameters { /** * The policy rules under which the key can be exported. */ - @projectedName("json", "release_policy") + @encodedName("application/json", "release_policy") releasePolicy?: KeyReleasePolicy; } @@ -1824,13 +1824,13 @@ model KeyUpdateParameters { * Json web key operations. For more information on possible key operations, see * JsonWebKeyOperation. */ - @projectedName("json", "key_ops") + @encodedName("application/json", "key_ops") keyOps?: JsonWebKeyOperation[]; /** * The attributes of a key managed by the key vault service. */ - @projectedName("json", "attributes") + @encodedName("application/json", "attributes") keyAttributes?: KeyAttributes; /** @@ -1841,7 +1841,7 @@ model KeyUpdateParameters { /** * The policy rules under which the key can be exported. */ - @projectedName("json", "release_policy") + @encodedName("application/json", "release_policy") releasePolicy?: KeyReleasePolicy; } @@ -1895,7 +1895,7 @@ model KeyRestoreParameters { /** * The backup blob associated with a key bundle. */ - @projectedName("json", "value") + @encodedName("application/json", "value") keyBundleBackup: bytes; } @@ -1906,7 +1906,7 @@ model KeyOperationsParameters { /** * algorithm identifier */ - @projectedName("json", "alg") + @encodedName("application/json", "alg") algorithm: JsonWebKeyEncryptionAlgorithm; value: bytes; @@ -1941,18 +1941,18 @@ model KeyOperationResult { kid?: string; @visibility("read") - @projectedName("json", "value") + @encodedName("application/json", "value") result?: bytes; @visibility("read") iv?: bytes; @visibility("read") - @projectedName("json", "tag") + @encodedName("application/json", "tag") authenticationTag?: bytes; @visibility("read") - @projectedName("json", "aad") + @encodedName("application/json", "aad") additionalAuthenticatedData?: bytes; } @@ -1964,7 +1964,7 @@ model KeySignParameters { * The signing/verification algorithm identifier. For more information on possible * algorithm types, see JsonWebKeySignatureAlgorithm. */ - @projectedName("json", "alg") + @encodedName("application/json", "alg") algorithm: JsonWebKeySignatureAlgorithm; value: bytes; @@ -1978,7 +1978,7 @@ model KeyVerifyParameters { * The signing/verification algorithm. For more information on possible algorithm * types, see JsonWebKeySignatureAlgorithm. */ - @projectedName("json", "alg") + @encodedName("application/json", "alg") algorithm: JsonWebKeySignatureAlgorithm; /** @@ -1989,7 +1989,7 @@ model KeyVerifyParameters { /** * The signature to be verified. */ - @projectedName("json", "value") + @encodedName("application/json", "value") signature: bytes; } @@ -2012,7 +2012,7 @@ model KeyReleaseParameters { * The attestation assertion for the target of the key release. */ @minLength(1) - @projectedName("json", "target") + @encodedName("application/json", "target") targetAttestationToken: string; /** @@ -2223,7 +2223,7 @@ model RoleDefinitionProperties { /** * The role type. */ - @projectedName("json", "type") + @encodedName("application/json", "type") roleType?: RoleType; /** @@ -2380,7 +2380,7 @@ model SecretSetParameters { /** * The secret management attributes. */ - @projectedName("json", "attributes") + @encodedName("application/json", "attributes") secretAttributes?: SecretAttributes; } @@ -2484,7 +2484,7 @@ model SecretUpdateParameters { /** * The secret management attributes. */ - @projectedName("json", "attributes") + @encodedName("application/json", "attributes") secretAttributes?: SecretAttributes; /** @@ -2575,7 +2575,7 @@ model SecretRestoreParameters { /** * The backup blob associated with a secret bundle. */ - @projectedName("json", "value") + @encodedName("application/json", "value") secretBundleBackup: bytes; } @@ -2585,7 +2585,7 @@ model SecurityDomainOperationStatus { */ status?: OperationStatus; - @projectedName("json", "status_details") + @encodedName("application/json", "status_details") statusDetails?: string; } @@ -2617,7 +2617,7 @@ model SecurityDomainJsonWebKey { */ kty: string; - @projectedName("json", "key_ops") + @encodedName("application/json", "key_ops") keyOps: string[]; /** @@ -2633,7 +2633,7 @@ model SecurityDomainJsonWebKey { /** * X509 certificate chain parameter */ - @projectedName("json", "x5c") + @encodedName("application/json", "x5c") x5C: string[]; /** @@ -2644,13 +2644,13 @@ model SecurityDomainJsonWebKey { /** * X509 certificate SHA1 thumbprint. This is optional. */ - @projectedName("json", "x5t") + @encodedName("application/json", "x5t") x5T?: string; /** * X509 certificate SHA256 thumbprint. */ - @projectedName("json", "x5t#S256") + @encodedName("application/json", "x5t#S256") x5TS256: string; /** @@ -2673,13 +2673,13 @@ model TransferKey { /** * Specifies the format of the transfer key */ - @projectedName("json", "key_format") + @encodedName("application/json", "key_format") keyFormat?: string = "jwk"; /** * Specifies the transfer key in JWK format */ - @projectedName("json", "transfer_key") + @encodedName("application/json", "transfer_key") transferKey: SecurityDomainJsonWebKey; } @@ -2913,7 +2913,7 @@ model StorageRestoreParameters { /** * The backup blob associated with a storage account. */ - @projectedName("json", "value") + @encodedName("application/json", "value") storageBundleBackup: bytes; } @@ -2944,7 +2944,7 @@ model StorageAccountCreateParameters { /** * The attributes of the storage account. */ - @projectedName("json", "attributes") + @encodedName("application/json", "attributes") storageAccountAttributes?: StorageAccountAttributes; /** @@ -2975,7 +2975,7 @@ model StorageAccountUpdateParameters { /** * The attributes of the storage account. */ - @projectedName("json", "attributes") + @encodedName("application/json", "attributes") storageAccountAttributes?: StorageAccountAttributes; /** @@ -3013,7 +3013,7 @@ model SasDefinitionItem { * The storage account SAS definition secret id. */ @visibility("read") - @projectedName("json", "sid") + @encodedName("application/json", "sid") secretId?: string; /** @@ -3136,7 +3136,7 @@ model SasDefinitionBundle { * Storage account SAS definition secret id. */ @visibility("read") - @projectedName("json", "sid") + @encodedName("application/json", "sid") secretId?: string; /** @@ -3194,7 +3194,7 @@ model SasDefinitionCreateParameters { /** * The attributes of the SAS definition. */ - @projectedName("json", "attributes") + @encodedName("application/json", "attributes") sasDefinitionAttributes?: SasDefinitionAttributes; /** @@ -3226,7 +3226,7 @@ model SasDefinitionUpdateParameters { /** * The attributes of the SAS definition. */ - @projectedName("json", "attributes") + @encodedName("application/json", "attributes") sasDefinitionAttributes?: SasDefinitionAttributes; /** diff --git a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/client.tsp deleted file mode 100644 index 5bfefd1d01..0000000000 --- a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using Azure.LoadTesting; diff --git a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/client.tsp deleted file mode 100644 index c51f3b7efe..0000000000 --- a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using NotificationHubsClient; diff --git a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp index 59e8c27c1a..1bbc823229 100644 --- a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp @@ -126,77 +126,77 @@ model NotificationHubEntryModel { model NotificationHubContentModel { type?: NotificationHubContentModelType; - @projectedName("json", "NotificationHubDescription") + @encodedName("application/json", "NotificationHubDescription") notificationHubDescription?: NotificationHubDescriptionModel; } model NotificationHubDescriptionModel { - @projectedName("json", "xmlns:i") + @encodedName("application/json", "xmlns:i") xmlnsI?: NotificationHubDescriptionModelXmlnsI; - @projectedName("json", "RegistrationTtl") + @encodedName("application/json", "RegistrationTtl") registrationTtl?: string; - @projectedName("json", "Location") + @encodedName("application/json", "Location") location?: string; - @projectedName("json", "ApnsCredential") + @encodedName("application/json", "ApnsCredential") apnsCredential?: PropertyBagModelItem[]; - @projectedName("json", "GcmCredential") + @encodedName("application/json", "GcmCredential") gcmCredential?: PropertyBagModelItem[]; - @projectedName("json", "WnsCredential") + @encodedName("application/json", "WnsCredential") wnsCredential?: PropertyBagModelItem[]; - @projectedName("json", "AuthorizationRules") + @encodedName("application/json", "AuthorizationRules") authorizationRules?: NotificationHubDescriptionModelAuthorizationRulesItem[]; } model PropertyBagModelItem { - @projectedName("json", "Name") + @encodedName("application/json", "Name") name?: string; - @projectedName("json", "Value") + @encodedName("application/json", "Value") value?: string; } model NotificationHubDescriptionModelAuthorizationRulesItem { - @projectedName("json", "i:type") + @encodedName("application/json", "i:type") iType?: NotificationHubDescriptionModelAuthorizationRulesItemIType; - @projectedName("json", "ClaimType") + @encodedName("application/json", "ClaimType") claimType?: NotificationHubDescriptionModelAuthorizationRulesItemClaimType; - @projectedName("json", "ClaimValue") + @encodedName("application/json", "ClaimValue") claimValue?: string; - @projectedName("json", "Rights") + @encodedName("application/json", "Rights") rights?: string[]; - @projectedName("json", "CreatedTime") + @encodedName("application/json", "CreatedTime") createdTime?: string; - @projectedName("json", "ModifiedTime") + @encodedName("application/json", "ModifiedTime") modifiedTime?: string; - @projectedName("json", "KeyName") + @encodedName("application/json", "KeyName") keyName?: string; - @projectedName("json", "PrimaryKey") + @encodedName("application/json", "PrimaryKey") primaryKey?: string; - @projectedName("json", "SecondaryKey") + @encodedName("application/json", "SecondaryKey") secondaryKey?: string; } model RegistrationEntryModel { content?: NotificationHubContentModel; - @projectedName("json", "xmlns:m") + @encodedName("application/json", "xmlns:m") xmlnsM?: RegistrationEntryModelXmlnsM; - @projectedName("json", "m:etag") + @encodedName("application/json", "m:etag") mEtag?: string; } @@ -309,147 +309,147 @@ model InstallationPatchModelItem { model RegistrationContentModel { type?: RegistrationContentModelType; - @projectedName("json", "AppleRegistrationDescription") + @encodedName("application/json", "AppleRegistrationDescription") appleRegistrationDescription?: AppleRegistrationContentModel; - @projectedName("json", "AppleTemplateRegistrationDescription") + @encodedName("application/json", "AppleTemplateRegistrationDescription") appleTemplateRegistrationDescription?: AppleTemplateRegistrationContentModel; - @projectedName("json", "BaiduRegistrationDescription") + @encodedName("application/json", "BaiduRegistrationDescription") baiduRegistrationDescription?: BaiduRegistrationContentModel; - @projectedName("json", "BaiduTemplateRegistrationDescription") + @encodedName("application/json", "BaiduTemplateRegistrationDescription") baiduTemplateRegistrationDescription?: BaiduTemplateRegistrationContentModel; - @projectedName("json", "GcmRegistrationDescription") + @encodedName("application/json", "GcmRegistrationDescription") gcmRegistrationDescription?: GcmRegistrationContentModel; - @projectedName("json", "GcmTemplateRegistrationDescription") + @encodedName("application/json", "GcmTemplateRegistrationDescription") gcmTemplateRegistrationDescription?: GcmTemplateRegistrationContentModel; - @projectedName("json", "WindowsRegistrationDescription") + @encodedName("application/json", "WindowsRegistrationDescription") windowsRegistrationDescription?: WindowsRegistrationContentModel; - @projectedName("json", "WindowsTemplateRegistrationDescription") + @encodedName("application/json", "WindowsTemplateRegistrationDescription") windowsTemplateRegistrationDescription?: WindowsTemplateRegistrationContentModel; } model AppleRegistrationContentModel { - @projectedName("json", "xmlns:i") + @encodedName("application/json", "xmlns:i") xmlnsI?: AppleRegistrationContentModelXmlnsI; - @projectedName("json", "Tags") + @encodedName("application/json", "Tags") tags?: string; - @projectedName("json", "DeviceToken") + @encodedName("application/json", "DeviceToken") deviceToken: string; } model AppleTemplateRegistrationContentModel { - @projectedName("json", "xmlns:i") + @encodedName("application/json", "xmlns:i") xmlnsI?: AppleTemplateRegistrationContentModelXmlnsI; - @projectedName("json", "Tags") + @encodedName("application/json", "Tags") tags?: string; - @projectedName("json", "DeviceToken") + @encodedName("application/json", "DeviceToken") deviceToken: string; - @projectedName("json", "BodyTemplate") + @encodedName("application/json", "BodyTemplate") bodyTemplate: string; - @projectedName("json", "Expiry") + @encodedName("application/json", "Expiry") expiry?: string; } model BaiduRegistrationContentModel { - @projectedName("json", "xmlns:i") + @encodedName("application/json", "xmlns:i") xmlnsI?: BaiduRegistrationContentModelXmlnsI; - @projectedName("json", "Tags") + @encodedName("application/json", "Tags") tags?: string; - @projectedName("json", "BaiduUserId") + @encodedName("application/json", "BaiduUserId") baiduUserId: string; - @projectedName("json", "BaiduChannelId") + @encodedName("application/json", "BaiduChannelId") baiduChannelId: string; } model BaiduTemplateRegistrationContentModel { - @projectedName("json", "xmlns:i") + @encodedName("application/json", "xmlns:i") xmlnsI?: BaiduTemplateRegistrationContentModelXmlnsI; - @projectedName("json", "Tags") + @encodedName("application/json", "Tags") tags?: string; - @projectedName("json", "BaiduUserId") + @encodedName("application/json", "BaiduUserId") baiduUserId: string; - @projectedName("json", "BaiduChannelId") + @encodedName("application/json", "BaiduChannelId") baiduChannelId: string; - @projectedName("json", "BodyTemplate") + @encodedName("application/json", "BodyTemplate") bodyTemplate: string; } model GcmRegistrationContentModel { - @projectedName("json", "xmlns:i") + @encodedName("application/json", "xmlns:i") xmlnsI?: GcmRegistrationContentModelXmlnsI; - @projectedName("json", "Tags") + @encodedName("application/json", "Tags") tags?: string; - @projectedName("json", "GcmRegistrationId") + @encodedName("application/json", "GcmRegistrationId") gcmRegistrationId?: string; } model GcmTemplateRegistrationContentModel { - @projectedName("json", "xmlns:i") + @encodedName("application/json", "xmlns:i") xmlnsI?: GcmTemplateRegistrationContentModelXmlnsI; - @projectedName("json", "Tags") + @encodedName("application/json", "Tags") tags?: string; - @projectedName("json", "GcmRegistrationId") + @encodedName("application/json", "GcmRegistrationId") gcmRegistrationId: string; - @projectedName("json", "BodyTemplate") + @encodedName("application/json", "BodyTemplate") bodyTemplate: string; } model WindowsRegistrationContentModel { - @projectedName("json", "xmlns:i") + @encodedName("application/json", "xmlns:i") xmlnsI?: WindowsRegistrationContentModelXmlnsI; - @projectedName("json", "Tags") + @encodedName("application/json", "Tags") tags?: string; - @projectedName("json", "ChannelUri") + @encodedName("application/json", "ChannelUri") channelUri: string; } model WindowsTemplateRegistrationContentModel { - @projectedName("json", "xmlns:i") + @encodedName("application/json", "xmlns:i") xmlnsI?: WindowsTemplateRegistrationContentModelXmlnsI; - @projectedName("json", "Tags") + @encodedName("application/json", "Tags") tags?: string; - @projectedName("json", "ChannelUri") + @encodedName("application/json", "ChannelUri") channelUri: string; - @projectedName("json", "BodyTemplate") + @encodedName("application/json", "BodyTemplate") bodyTemplate: string; - @projectedName("json", "WnsHeaders") + @encodedName("application/json", "WnsHeaders") wnsHeaders?: WindowsTemplateRegistrationContentModelWnsHeadersItem[]; } model WindowsTemplateRegistrationContentModelWnsHeadersItem { - @projectedName("json", "Header") + @encodedName("application/json", "Header") header?: string; - @projectedName("json", "Value") + @encodedName("application/json", "Value") value?: string; } diff --git a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/client.tsp deleted file mode 100644 index 232662c7b3..0000000000 --- a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using Azure.AI.OpenAI; diff --git a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp index b109e92892..4b7b60795c 100644 --- a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp @@ -21,7 +21,7 @@ model Paths1Vtxb06DeploymentsDeploymentIdCompletionsPostRequestbodyContentApplic /** * The maximum number of tokens to generate. Has minimum of 0. */ - @projectedName("json", "max_tokens") + @encodedName("application/json", "max_tokens") maxTokens?: int32 = 16; /** @@ -42,7 +42,7 @@ model Paths1Vtxb06DeploymentsDeploymentIdCompletionsPostRequestbodyContentApplic * Minimum of 0 and maximum of 1 allowed. * */ - @projectedName("json", "top_p") + @encodedName("application/json", "top_p") topP?: float32 = 1; /** @@ -57,7 +57,7 @@ model Paths1Vtxb06DeploymentsDeploymentIdCompletionsPostRequestbodyContentApplic * token. As an example, you can pass {"50256" : -100} to prevent the * <|endoftext|> token from being generated. */ - @projectedName("json", "logit_bias") + @encodedName("application/json", "logit_bias") logitBias?: Record; /** @@ -100,14 +100,14 @@ model Paths1Vtxb06DeploymentsDeploymentIdCompletionsPostRequestbodyContentApplic */ stop?: unknown; - @projectedName("json", "completion_config") + @encodedName("application/json", "completion_config") completionConfig?: string; /** * can be used to disable any server-side caching, 0=no cache, 1=prompt prefix * enabled, 2=full cache */ - @projectedName("json", "cache_level") + @encodedName("application/json", "cache_level") cacheLevel?: int32; /** @@ -115,21 +115,21 @@ model Paths1Vtxb06DeploymentsDeploymentIdCompletionsPostRequestbodyContentApplic * so far. Decreases the model's likelihood to repeat the same line verbatim. Has * minimum of -2 and maximum of 2. */ - @projectedName("json", "presence_penalty") + @encodedName("application/json", "presence_penalty") presencePenalty?: float32; /** * How much to penalize new tokens based on whether they appear in the text so * far. Increases the model's likelihood to talk about new topics. */ - @projectedName("json", "frequency_penalty") + @encodedName("application/json", "frequency_penalty") frequencyPenalty?: float32; /** * How many generations to create server side, and display only the best. Will not * stream intermediate progress if best_of > 1. Has maximum value of 128. */ - @projectedName("json", "best_of") + @encodedName("application/json", "best_of") bestOf?: int32; } @@ -146,20 +146,20 @@ model Post200ApplicationJsonPropertiesItemsItem { index?: int32; logprobs?: PostResponses200ContentApplicationJsonSchemaChoicesItemLogprobs; - @projectedName("json", "finish_reason") + @encodedName("application/json", "finish_reason") finishReason?: string; } model PostResponses200ContentApplicationJsonSchemaChoicesItemLogprobs { tokens?: string[]; - @projectedName("json", "token_logprobs") + @encodedName("application/json", "token_logprobs") tokenLogprobs?: float32[]; - @projectedName("json", "top_logprobs") + @encodedName("application/json", "top_logprobs") topLogprobs?: Record[]; - @projectedName("json", "text_offset") + @encodedName("application/json", "text_offset") textOffset?: int32[]; } @@ -191,7 +191,7 @@ model Paths13PiqocDeploymentsDeploymentIdEmbeddingsPostRequestbodyContentApplica /** * input type of embedding search to use */ - @projectedName("json", "input_type") + @encodedName("application/json", "input_type") inputType?: string; /** diff --git a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/client.tsp deleted file mode 100644 index 10d4dd4bc2..0000000000 --- a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using AutoRestPagingTestService; diff --git a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp index 122307deb4..82013070c9 100644 --- a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp @@ -51,14 +51,14 @@ model OdataProductResult { values?: Product[]; @nextLink - @projectedName("json", "odata.nextLink") + @encodedName("application/json", "odata.nextLink") odataNextLink?: string; } @pagedResult model ProductResultValueWithXMSClientName { @items - @projectedName("json", "values") + @encodedName("application/json", "values") indexes?: Product[]; @nextLink diff --git a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/client.tsp deleted file mode 100644 index 5681d148d0..0000000000 --- a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using Azure.Language.QnAMaker; diff --git a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp index a8a2a8e809..8eb481aaef 100644 --- a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp @@ -131,19 +131,19 @@ model AnswersOptions { * Minimum threshold score for answers, value ranges from 0 to 1. */ @maxValue(1) - @projectedName("json", "confidenceScoreThreshold") + @encodedName("application/json", "confidenceScoreThreshold") confidenceThreshold?: float64; /** * Context object with previous QnA's information. */ - @projectedName("json", "context") + @encodedName("application/json", "context") answerContext?: KnowledgeBaseAnswerContext; /** * Type of ranker to be used. */ - @projectedName("json", "rankerType") + @encodedName("application/json", "rankerType") rankerKind?: RankerKind; /** @@ -154,7 +154,7 @@ model AnswersOptions { /** * To configure Answer span prediction feature. */ - @projectedName("json", "answerSpanRequest") + @encodedName("application/json", "answerSpanRequest") shortAnswerOptions?: ShortAnswerOptions; /** @@ -175,7 +175,7 @@ model KnowledgeBaseAnswerContext { /** * Previous user query. */ - @projectedName("json", "previousUserQuery") + @encodedName("application/json", "previousUserQuery") previousQuestion?: string; } @@ -241,7 +241,7 @@ model ShortAnswerOptions { * to 1. */ @maxValue(1) - @projectedName("json", "confidenceScoreThreshold") + @encodedName("application/json", "confidenceScoreThreshold") confidenceThreshold?: float64; /** @@ -249,7 +249,7 @@ model ShortAnswerOptions { */ @maxValue(10) @minValue(1) - @projectedName("json", "topAnswersWithSpan") + @encodedName("application/json", "topAnswersWithSpan") top?: int32; } @@ -281,13 +281,13 @@ model KnowledgeBaseAnswer { * Answer confidence score, value ranges from 0 to 1. */ @maxValue(1) - @projectedName("json", "confidenceScore") + @encodedName("application/json", "confidenceScore") confidence?: float64; /** * ID of the QnA result. */ - @projectedName("json", "id") + @encodedName("application/json", "id") qnaId?: int32; /** @@ -309,7 +309,7 @@ model KnowledgeBaseAnswer { /** * Answer span object of QnA with respect to user's question. */ - @projectedName("json", "answerSpan") + @encodedName("application/json", "answerSpan") shortAnswer?: AnswerSpan; } @@ -364,7 +364,7 @@ model AnswerSpan { * Predicted score of answer span, value ranges from 0 to 1. */ @maxValue(1) - @projectedName("json", "confidenceScore") + @encodedName("application/json", "confidenceScore") confidence?: float64; /** @@ -465,7 +465,7 @@ model AnswersFromTextOptions { /** * Text records to be searched for given question. */ - @projectedName("json", "records") + @encodedName("application/json", "records") textDocuments: TextDocument[]; /** @@ -521,7 +521,7 @@ model TextAnswer { * answer confidence score, value ranges from 0 to 1. */ @maxValue(1) - @projectedName("json", "confidenceScore") + @encodedName("application/json", "confidenceScore") confidence?: float64; /** @@ -532,7 +532,7 @@ model TextAnswer { /** * Answer span object with respect to user's question. */ - @projectedName("json", "answerSpan") + @encodedName("application/json", "answerSpan") shortAnswer?: AnswerSpan; /** diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/client.tsp deleted file mode 100644 index dfa3ffa391..0000000000 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using MicrosoftCognitiveLanguageServiceQuestionAnsweringAuthoring; diff --git a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/client.tsp deleted file mode 100644 index d8e2a79e58..0000000000 --- a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using QnAMakerRuntimeClient; diff --git a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/client.tsp deleted file mode 100644 index 5d230eb041..0000000000 --- a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using AzureSchemaRegistry; diff --git a/packages/extensions/openapi-to-typespec/test/url/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/url/tsp-output/client.tsp deleted file mode 100644 index 7c7e7f3343..0000000000 --- a/packages/extensions/openapi-to-typespec/test/url/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using AutoRestUrlTestService; diff --git a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/client.tsp deleted file mode 100644 index fde21520db..0000000000 --- a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/client.tsp +++ /dev/null @@ -1,3 +0,0 @@ -import "./main.tsp"; - -using AzureWebPubSubServiceRESTAPI; From 894d5a84f5916c095b4eb8a96faec21823e2b4ac Mon Sep 17 00:00:00 2001 From: Chenjie Shi Date: Thu, 22 Feb 2024 18:20:18 +0800 Subject: [PATCH 18/33] fix default value of array and remove default value of duration temporarily (#4888) fix: https://github.com/Azure/autorest/issues/4874 --- ...ove_duration_default_2024-02-20-06-08.json | 10 + .../openapi-to-typespec/src/utils/schemas.ts | 4 + .../openapi-to-typespec/src/utils/values.ts | 12 +- .../tsp-output/models.tsp | 22 +- .../test/arm-test/resources.json | 411 ++++++++++-------- .../test/arm-test/swagger/array-default.json | 200 +++++++++ .../openapi-to-typespec/test/arm-test/test.md | 1 + .../test/arm-test/tsp-output/ArrayDefault.tsp | 46 ++ .../test/arm-test/tsp-output/main.tsp | 1 + .../test/arm-test/tsp-output/models.tsp | 10 + 10 files changed, 528 insertions(+), 189 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/remove_duration_default_2024-02-20-06-08.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/swagger/array-default.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/ArrayDefault.tsp diff --git a/common/changes/@autorest/openapi-to-typespec/remove_duration_default_2024-02-20-06-08.json b/common/changes/@autorest/openapi-to-typespec/remove_duration_default_2024-02-20-06-08.json new file mode 100644 index 0000000000..82f8b42ddf --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/remove_duration_default_2024-02-20-06-08.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "fix default value of array and remove default value of duration temporarily", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/src/utils/schemas.ts b/packages/extensions/openapi-to-typespec/src/utils/schemas.ts index 3eff69036b..53e6158acd 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/schemas.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/schemas.ts @@ -51,3 +51,7 @@ export function isAnyObjectSchema(schema: Schema): schema is AnySchema { export function isArmIdSchema(schema: Schema): boolean { return schema.type === SchemaType.ArmId; } + +export function isDurationSchema(schema: Schema): boolean { + return schema.type === SchemaType.Duration; +} diff --git a/packages/extensions/openapi-to-typespec/src/utils/values.ts b/packages/extensions/openapi-to-typespec/src/utils/values.ts index 71d3d71310..1faad4e473 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/values.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/values.ts @@ -1,5 +1,5 @@ import { Schema } from "@autorest/codemodel"; -import { isChoiceSchema, isSealedChoiceSchema } from "./schemas"; +import { isArraySchema, isChoiceSchema, isDurationSchema, isSealedChoiceSchema } from "./schemas"; export function transformValue(value: string | number | boolean) { if (typeof value === "string") { @@ -19,6 +19,16 @@ export function getDefaultValue(type: string, schema: Schema) { return `${type}.\`${choice.language.default.name}\``; } } + } else if (isDurationSchema(schema)) { + // TODO: need to add back default value when TypeSpec supports + return undefined; + } else if (isArraySchema(schema)) { + return `[${schema.defaultValue + .map((v: any) => { + schema.elementType.defaultValue = v; + return getDefaultValue(schema.elementType.type, schema.elementType); + }) + .join(", ")}]`; } else { return transformValue(schema.defaultValue); } diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp index f5bf9496e1..1495cb5198 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp @@ -4200,7 +4200,7 @@ model BatchRetrySettings { /** * Invocation timeout for a mini-batch, in ISO 8601 format. */ - timeout?: duration = "PT30S"; + timeout?: duration; } /** @@ -5246,7 +5246,7 @@ model ProbeSettings { /** * The length of time between probes in ISO 8601 format. */ - period?: duration = "PT10S"; + period?: duration; /** * The number of successful probes before returning a healthy status. @@ -5256,7 +5256,7 @@ model ProbeSettings { /** * The probe timeout in ISO 8601 format. */ - timeout?: duration = "PT2S"; + timeout?: duration; } /** @@ -5272,13 +5272,13 @@ model OnlineRequestSettings { * The maximum amount of time a request will stay in the queue in ISO 8601 format. * Defaults to 500ms. */ - maxQueueWait?: duration = "PT0.5S"; + maxQueueWait?: duration; /** * The scoring timeout in ISO 8601 format. * Defaults to 5000ms. */ - requestTimeout?: duration = "PT5S"; + requestTimeout?: duration; } /** @@ -8981,7 +8981,7 @@ model TrainingSettings { * During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. * Configure this parameter with a higher value than 300 secs, if more time is needed. */ - ensembleModelDownloadTimeout?: duration = "PT5M"; + ensembleModelDownloadTimeout?: duration; /** * Stack ensemble settings for stack ensemble run. @@ -9296,12 +9296,12 @@ model TableVerticalLimitSettings { /** * AutoML job timeout. */ - timeout?: duration = "PT6H"; + timeout?: duration; /** * Iteration timeout. */ - trialTimeout?: duration = "PT30M"; + trialTimeout?: duration; } model TableParameterSubspace { @@ -10996,7 +10996,7 @@ model ImageLimitSettings { /** * AutoML job timeout. */ - timeout?: duration = "P7D"; + timeout?: duration; } /** @@ -11860,7 +11860,7 @@ model NlpVerticalLimitSettings { /** * AutoML job timeout. */ - timeout?: duration = "P7D"; + timeout?: duration; /** * Timeout for individual HD trials. @@ -12649,7 +12649,7 @@ model TargetUtilizationScaleSettings extends OnlineScaleSettings { /** * The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds. */ - pollingInterval?: duration = "PT1S"; + pollingInterval?: duration; /** * Target CPU usage for the autoscaler. diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/resources.json b/packages/extensions/openapi-to-typespec/test/arm-test/resources.json index 9f2a376da5..a0c95f306c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/resources.json +++ b/packages/extensions/openapi-to-typespec/test/arm-test/resources.json @@ -1,181 +1,238 @@ { - "Resources": { - "Employee": { - "Name": "Employee", - "GetOperations": [ - { - "Name": "Get", - "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}", - "Method": "GET", - "OperationID": "Employees_Get", - "IsLongRunning": false, - "PagingMetadata": null, - "Description": "Get a Employee" + "Resources": { + "Employee": { + "Name": "Employee", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}", + "Method": "GET", + "OperationID": "Employees_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Employee" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}", + "Method": "PUT", + "OperationID": "Employees_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a Employee" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}", + "Method": "PATCH", + "OperationID": "Employees_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update a Employee" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}", + "Method": "DELETE", + "OperationID": "Employees_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a Employee" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees", + "Method": "GET", + "OperationID": "Employees_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Employee resources by resource group" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetEmployees", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Test/employees", + "Method": "GET", + "OperationID": "Employees_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Employee resources by subscription ID" + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": [ + "ResourceGroupResource" + ], + "SwaggerModelName": "Employee", + "ResourceType": "Microsoft.Test/employees", + "ResourceKey": "employeeName", + "ResourceKeySegment": "employees", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "Enroll": { + "Name": "Enroll", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/enrolls/default", + "Method": "GET", + "OperationID": "Enrolls_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Enroll." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": [ + "Employee" + ], + "SwaggerModelName": "Enroll", + "ResourceType": "Microsoft.Test/employees/enrolls", + "ResourceKey": "default", + "ResourceKeySegment": "enrolls", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": true + }, + "DictProperty": { + "Name": "DictProperty", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/dictproperties/{name}", + "Method": "GET", + "OperationID": "DictProperties_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Resource." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/dictproperties", + "Method": "GET", + "OperationID": "DictProperties_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List resources by resource group" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": [ + "Employee" + ], + "SwaggerModelName": "DictProperty", + "ResourceType": "Microsoft.Test/employees/dictproperties", + "ResourceKey": "name", + "ResourceKeySegment": "dictproperties", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ArrayDefault": { + "Name": "ArrayDefault", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/arraydefaults/{name}", + "Method": "GET", + "OperationID": "ArrayDefault_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a Resource." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/arraydefaults", + "Method": "GET", + "OperationID": "ArrayDefault_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List resources by resource group" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": [ + "Employee" + ], + "SwaggerModelName": "ArrayDefault", + "ResourceType": "Microsoft.Test/employees/arraydefaults", + "ResourceKey": "name", + "ResourceKeySegment": "arraydefaults", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false } - ], - "CreateOperations": [ - { - "Name": "CreateOrUpdate", - "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}", - "Method": "PUT", - "OperationID": "Employees_CreateOrUpdate", - "IsLongRunning": true, - "PagingMetadata": null, - "Description": "Create a Employee" - } - ], - "UpdateOperations": [ - { - "Name": "Update", - "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}", - "Method": "PATCH", - "OperationID": "Employees_Update", - "IsLongRunning": false, - "PagingMetadata": null, - "Description": "Update a Employee" - } - ], - "DeleteOperations": [ - { - "Name": "Delete", - "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}", - "Method": "DELETE", - "OperationID": "Employees_Delete", - "IsLongRunning": true, - "PagingMetadata": null, - "Description": "Delete a Employee" - } - ], - "ListOperations": [ - { - "Name": "GetAll", - "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees", - "Method": "GET", - "OperationID": "Employees_ListByResourceGroup", - "IsLongRunning": false, - "PagingMetadata": { - "Method": "ListByResourceGroup", - "NextPageMethod": "ListByResourceGroupNextPage", - "ItemName": "value", - "NextLinkName": "nextLink" - }, - "Description": "List Employee resources by resource group" - } - ], - "OperationsFromResourceGroupExtension": [], - "OperationsFromSubscriptionExtension": [ - { - "Name": "GetEmployees", - "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Test/employees", - "Method": "GET", - "OperationID": "Employees_ListBySubscription", - "IsLongRunning": false, - "PagingMetadata": { - "Method": "ListBySubscription", - "NextPageMethod": "ListBySubscriptionNextPage", - "ItemName": "value", - "NextLinkName": "nextLink" - }, - "Description": "List Employee resources by subscription ID" - } - ], - "OperationsFromManagementGroupExtension": [], - "OperationsFromTenantExtension": [], - "OtherOperations": [], - "Parents": ["ResourceGroupResource"], - "SwaggerModelName": "Employee", - "ResourceType": "Microsoft.Test/employees", - "ResourceKey": "employeeName", - "ResourceKeySegment": "employees", - "IsTrackedResource": true, - "IsTenantResource": false, - "IsSubscriptionResource": false, - "IsManagementGroupResource": false, - "IsExtensionResource": false, - "IsSingletonResource": false - }, - "Enroll": { - "Name": "Enroll", - "GetOperations": [ - { - "Name": "Get", - "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/enrolls/default", - "Method": "GET", - "OperationID": "Enrolls_Get", - "IsLongRunning": false, - "PagingMetadata": null, - "Description": "Get a Enroll." - } - ], - "CreateOperations": [], - "UpdateOperations": [], - "DeleteOperations": [], - "ListOperations": [], - "OperationsFromResourceGroupExtension": [], - "OperationsFromSubscriptionExtension": [], - "OperationsFromManagementGroupExtension": [], - "OperationsFromTenantExtension": [], - "OtherOperations": [], - "Parents": ["Employee"], - "SwaggerModelName": "Enroll", - "ResourceType": "Microsoft.Test/employees/enrolls", - "ResourceKey": "default", - "ResourceKeySegment": "enrolls", - "IsTrackedResource": true, - "IsTenantResource": false, - "IsSubscriptionResource": false, - "IsManagementGroupResource": false, - "IsExtensionResource": false, - "IsSingletonResource": true - }, - "DictProperty": { - "Name": "DictProperty", - "GetOperations": [ - { - "Name": "Get", - "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/dictproperties/{name}", - "Method": "GET", - "OperationID": "DictProperties_Get", - "IsLongRunning": false, - "PagingMetadata": null, - "Description": "Get a Resource." - } - ], - "CreateOperations": [], - "UpdateOperations": [], - "DeleteOperations": [], - "ListOperations": [ - { - "Name": "GetAll", - "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/dictproperties", - "Method": "GET", - "OperationID": "DictProperties_ListByResourceGroup", - "IsLongRunning": false, - "PagingMetadata": { - "Method": "ListByResourceGroup", - "NextPageMethod": "ListByResourceGroupNextPage", - "ItemName": "value", - "NextLinkName": "nextLink" - }, - "Description": "List resources by resource group" - } - ], - "OperationsFromResourceGroupExtension": [], - "OperationsFromSubscriptionExtension": [], - "OperationsFromManagementGroupExtension": [], - "OperationsFromTenantExtension": [], - "OtherOperations": [], - "Parents": ["Employee"], - "SwaggerModelName": "DictProperty", - "ResourceType": "Microsoft.Test/employees/dictproperties", - "ResourceKey": "name", - "ResourceKeySegment": "dictproperties", - "IsTrackedResource": true, - "IsTenantResource": false, - "IsSubscriptionResource": false, - "IsManagementGroupResource": false, - "IsExtensionResource": false, - "IsSingletonResource": false } - } } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/swagger/array-default.json b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/array-default.json new file mode 100644 index 0000000000..994218409d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/swagger/array-default.json @@ -0,0 +1,200 @@ +{ + "swagger": "2.0", + "info": { + "title": "TestClient", + "version": "2023-10-12", + "description": "For test." + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "tags": [ + { + "name": "ArrayDefault" + } + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/arraydefaults": { + "get": { + "operationId": "ArrayDefault_ListByResourceGroup", + "tags": [ + "ArrayDefault" + ], + "description": "List resources by resource group", + "parameters": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/ArrayDefaultListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/arraydefaults/{name}": { + "get": { + "operationId": "ArrayDefault_Get", + "tags": [ + "ArrayDefault" + ], + "description": "Get a Resource.", + "parameters": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "./common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + }, + { + "name": "name", + "in": "path", + "description": "Name of resource", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/ArrayDefault" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "ArrayDefault": { + "type": "object", + "description": "A Test resource", + "properties": { + "properties": { + "$ref": "#/definitions/ArrayDefaultProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "./common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "ArrayDefaultListResult": { + "type": "object", + "description": "The response of a resource list operation.", + "properties": { + "value": { + "type": "array", + "description": "The resource items on this page", + "items": { + "$ref": "#/definitions/ArrayDefault" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "ArrayDefaultProperties": { + "type": "object", + "description": "Resource properties", + "properties": { + "array": { + "type": "array", + "description": "Array of strings", + "items": { + "type": "string" + }, + "default": [ + "911", + "933" + ] + } + }, + "additionalProperties": true + } + }, + "parameters": {} +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/test.md b/packages/extensions/openapi-to-typespec/test/arm-test/test.md index f4e2428f06..3153fd8988 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/test.md +++ b/packages/extensions/openapi-to-typespec/test/arm-test/test.md @@ -4,6 +4,7 @@ input-file: - ./swagger/basic.json - ./swagger/singleton.json - ./swagger/dict-properties.json + - ./swagger/array-default.json ``` ```yaml diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/ArrayDefault.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/ArrayDefault.tsp new file mode 100644 index 0000000000..4c0f0178ae --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/ArrayDefault.tsp @@ -0,0 +1,46 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Employee.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Microsoft.Test; +/** + * A Test resource + */ +@parentResource(Employee) +model ArrayDefault is TrackedResource { + /** + * Name of resource + */ + @pattern("^[a-zA-Z0-9-]{3,24}$") + @path + @key("name") + @segment("arraydefaults") + @visibility("read") + name: string; +} + +@armResourceOperations +interface ArrayDefaults { + /** + * Get a Resource. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ArrayDefault_Get") + get is ArmResourceRead; + + /** + * List resources by resource group + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ArrayDefault_ListByResourceGroup") + listByResourceGroup is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp index d63d3a20cd..9d92c74151 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp @@ -6,6 +6,7 @@ import "./models.tsp"; import "./Employee.tsp"; import "./Enroll.tsp"; import "./DictProperty.tsp"; +import "./ArrayDefault.tsp"; using TypeSpec.Rest; using TypeSpec.Http; diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp index c6f1625c0b..3a55eb9a45 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp @@ -155,3 +155,13 @@ model EnrollProperties { */ city?: string; } + +/** + * Resource properties + */ +model ArrayDefaultProperties extends Record { + /** + * Array of strings + */ + array?: string[] = ["911", "933"]; +} From 0a048786f25a8f78b71f7da2249e665db455dfe0 Mon Sep 17 00:00:00 2001 From: Chenjie Shi Date: Fri, 23 Feb 2024 11:27:25 +0800 Subject: [PATCH 19/33] Change to use raw operation for non-resource operations (#4886) resolve: https://github.com/Azure/autorest/issues/4881 --- .../routes_2024-02-19-07-31.json | 10 + .../src/emiters/emit-routes.ts | 12 +- .../src/generate/generate-operations.ts | 16 +- .../src/generate/generate-parameter.ts | 11 + .../test/arm-agrifood/tsp-output/routes.tsp | 60 +- .../arm-alertsmanagement/tsp-output/Alert.tsp | 27 +- .../tsp-output/SmartGroup.tsp | 27 +- .../tsp-output/AnalysisServicesServer.tsp | 43 +- .../tsp-output/ApiContract.tsp | 296 +- .../ApiManagementServiceResource.tsp | 1621 ++++----- .../tsp-output/GatewayContract.tsp | 82 +- .../tsp-output/GroupContract.tsp | 94 +- .../tsp-output/NotificationContract.tsp | 104 +- .../tsp-output/ProductContract.tsp | 282 +- .../tsp-output/UserContract.tsp | 150 +- .../arm-apimanagement/tsp-output/routes.tsp | 3128 +++++++---------- .../tsp-output/DenyAssignment.tsp | 17 +- .../arm-authorization/tsp-output/routes.tsp | 135 +- .../tsp-output/routes.tsp | 444 +-- .../tsp-output/AvailabilitySet.tsp | 30 +- .../arm-compute/tsp-output/CloudService.tsp | 114 +- .../arm-compute/tsp-output/DedicatedHost.tsp | 23 +- .../arm-compute/tsp-output/DiskAccess.tsp | 31 +- .../tsp-output/DiskEncryptionSet.tsp | 14 +- .../arm-compute/tsp-output/RoleInstance.tsp | 100 +- .../arm-compute/tsp-output/VirtualMachine.tsp | 72 +- .../tsp-output/VirtualMachineRunCommand.tsp | 8 +- .../tsp-output/VirtualMachineScaleSet.tsp | 102 +- .../tsp-output/VirtualMachineScaleSetVM.tsp | 46 +- .../test/arm-compute/tsp-output/routes.tsp | 1209 +++---- .../test/arm-dns/tsp-output/DnsZone.tsp | 58 +- .../test/arm-dns/tsp-output/routes.tsp | 26 +- .../OnlineDeploymentTrackedResource.tsp | 86 +- .../tsp-output/Workspace.tsp | 114 +- .../tsp-output/routes.tsp | 3022 +++++++--------- .../arm-storage/tsp-output/StorageAccount.tsp | 38 +- .../test/arm-storage/tsp-output/routes.tsp | 39 +- 37 files changed, 4874 insertions(+), 6817 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/routes_2024-02-19-07-31.json diff --git a/common/changes/@autorest/openapi-to-typespec/routes_2024-02-19-07-31.json b/common/changes/@autorest/openapi-to-typespec/routes_2024-02-19-07-31.json new file mode 100644 index 0000000000..fc0023b245 --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/routes_2024-02-19-07-31.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Change to use raw operation for non-resource operations for ARM", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-routes.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-routes.ts index 31a4e7082e..e1619f942c 100644 --- a/packages/extensions/openapi-to-typespec/src/emiters/emit-routes.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-routes.ts @@ -1,6 +1,7 @@ import { getSession } from "../autorest-session"; import { generateOperationGroup } from "../generate/generate-operations"; import { TypespecProgram } from "../interfaces"; +import { getOptions } from "../options"; import { formatTypespecFile } from "../utils/format"; import { getRoutesImports } from "../utils/imports"; import { getNamespaceStatement } from "../utils/namespace"; @@ -15,9 +16,18 @@ export async function emitRoutes(filePath: string, program: TypespecProgram): Pr } function generateRoutes(program: TypespecProgram) { + const { isArm } = getOptions(); const { operationGroups } = program; const { modules, namespaces } = getRoutesImports(program); const content = operationGroups.map(generateOperationGroup); - return [...modules, "\n", ...namespaces, "\n", getNamespaceStatement(program), "\n", ...content].join("\n"); + const result = [...modules, "\n", ...namespaces, "\n", getNamespaceStatement(program), "\n", ...content].join("\n"); + if (isArm) { + return ( + "// FIXME: Operations in this file are not detected as a resource operation, please confirm the conversion result manually\n\n" + + result + ); + } + + return result; } diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts index 105ed2fb46..411fcee822 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts @@ -1,9 +1,11 @@ import { TypespecOperation, TypespecOperationGroup, TypespecParameter } from "../interfaces"; +import { getOptions } from "../options"; import { replaceGeneratedResourceObject } from "../transforms/transform-arm-resources"; import { generateDocs, generateSummary } from "../utils/docs"; import { generateParameter } from "./generate-parameter"; export function generateOperation(operation: TypespecOperation, operationGroup?: TypespecOperationGroup) { + const { isArm } = getOptions(); const doc = generateDocs(operation); const summary = generateSummary(operation); const { verb, name, route, parameters } = operation; @@ -18,7 +20,15 @@ export function generateOperation(operation: TypespecOperation, operationGroup?: statements.push(fixme); } - if (!operation.resource) { + if (isArm) { + statements.push(`@route("${route}")`); + statements.push( + `@${verb} op \`${name}\`( + ...ApiVersionParameter, + ${params} + ): ArmResponse<${responses.join(" | ")}> | ErrorResponse;\n\n\n`, + ); + } else if (!operation.resource) { const names = [name, ...responses, ...parameters.map((p) => p.name)]; const duplicateNames = findDuplicates(names); generateNameCollisionWarning(duplicateNames, statements); @@ -70,6 +80,7 @@ function generateMultiResponseWarning(responses: string[], statements: string[]) } export function generateParameters(parameters: TypespecParameter[]) { + const { isArm } = getOptions(); if (parameters.length === 0) { return ""; } @@ -84,6 +95,9 @@ export function generateParameters(parameters: TypespecParameter[]) { for (const parameter of parameters) { params.push(generateParameter(parameter)); } + if (isArm) { + return `${params.join(",\n")}`; + } return `{${params.join("\n")}}`; } diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts index 82489d2e5a..0082ea076e 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts @@ -1,8 +1,19 @@ import { TypespecParameter } from "../interfaces"; +import { getOptions } from "../options"; import { generateDecorators } from "../utils/decorators"; import { generateDocs } from "../utils/docs"; +const _ARM_PARAM_REPLACEMENTS: { [key: string]: string } = { + subscriptionId: "...SubscriptionIdParameter", + location: "...LocationResourceParameter", + resourceGroupName: "...ResourceGroupParameter", +}; + export function generateParameter(parameter: TypespecParameter): string { + const { isArm } = getOptions(); + if (isArm && _ARM_PARAM_REPLACEMENTS[parameter.name] !== undefined) { + return _ARM_PARAM_REPLACEMENTS[parameter.name]; + } const definitions: string[] = []; const doc = generateDocs(parameter); definitions.push(doc); diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp index c28523d006..a5621768cd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp @@ -1,3 +1,5 @@ +// FIXME: Operations in this file are not detected as a resource operation, please confirm the conversion result manually + import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; @@ -15,22 +17,16 @@ interface CheckNameAvailabilityOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/checkNameAvailability") @post - checkNameAvailability is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. The value must be an UUID. - */ - @path - subscriptionId: string; + checkNameAvailability( + ...ApiVersionParameter, + ...SubscriptionIdParameter, - /** - * NameAvailabilityRequest object. - */ - @body - nameAvailabilityRequest: CheckNameAvailabilityRequest; - }, - CheckNameAvailabilityResponse - >; + /** + * NameAvailabilityRequest object. + */ + @body + nameAvailabilityRequest: CheckNameAvailabilityRequest, + ): ArmResponse | ErrorResponse; } interface OperationResultsOperations { @@ -39,26 +35,20 @@ interface OperationResultsOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/locations/{locations}/operationResults/{operationResultsId}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. The value must be an UUID. - */ - @path - subscriptionId: string; + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, - /** - * Location. - */ - @path - locations: string; + /** + * Location. + */ + @path + locations: string, - /** - * operationResultsId for a specific location. - */ - @path - operationResultsId: string; - }, - ArmAsyncOperation - >; + /** + * operationResultsId for a specific location. + */ + @path + operationResultsId: string, + ): ArmResponse | ErrorResponse; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp index bbe5921a26..5fa928a665 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp @@ -181,23 +181,16 @@ interface Alerts { // FIXME: Alerts_GetHistory could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history") @get - getHistory is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * Unique ID of an alert instance. - */ - @path - alertId: string; - }, - AlertModification - >; + getHistory( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + + /** + * Unique ID of an alert instance. + */ + @path + alertId: string, + ): ArmResponse | ErrorResponse; } @@encodedName(Alerts.changeState::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp index 4b9f78857b..ede8333742 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp @@ -145,21 +145,14 @@ interface SmartGroups { // FIXME: SmartGroups_GetHistory could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/history") @get - getHistory is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * Smart group unique id. - */ - @path - smartGroupId: string; - }, - SmartGroupModification - >; + getHistory( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + + /** + * Smart group unique id. + */ + @path + smartGroupId: string, + ): ArmResponse | ErrorResponse; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp index 2627e61524..462854f91a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp @@ -146,34 +146,21 @@ interface AnalysisServicesServers { @operationId("Servers_ListSkusForExisting") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/skus") @get - listSkusForExisting is Azure.Core.Foundations.Operation< - { - /** - * The name of the Azure Resource group of which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90. - */ - @maxLength(90) - @minLength(1) - @pattern("^[-\\w\\._\\(\\)]+$") - @path - resourceGroupName: string; - - /** - * The name of the Analysis Services server. It must be at least 3 characters in length, and no more than 63. - */ - @maxLength(63) - @minLength(3) - @pattern("^[a-z][a-z0-9]*$") - @path - serverName: string; - - /** - * A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - SkuEnumerationForExistingResourceResult - >; + listSkusForExisting( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the Analysis Services server. It must be at least 3 characters in length, and no more than 63. + */ + @maxLength(63) + @minLength(3) + @pattern("^[a-z][a-z0-9]*$") + @path + serverName: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } @@encodedName(AnalysisServicesServers.create::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp index faa3cf4b22..dd0052e2ea 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp @@ -172,58 +172,48 @@ interface ApiContracts { @operationId("ApiRevision_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions") @get - listByService is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * API identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @path - apiId: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ApiRevisionListResult - >; + listByService( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * API identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @path + apiId: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists all Products, which the API is part of. @@ -233,58 +223,48 @@ interface ApiContracts { @operationId("ApiProduct_ListByApis") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products") @get - listByApis is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * API identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @path - apiId: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ResourceListResult - >; + listByApis( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * API identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @path + apiId: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + ...SubscriptionIdParameter, + ): ArmResponse> | ErrorResponse; /** * Lists a collection of operations associated with tags. @@ -294,65 +274,55 @@ interface ApiContracts { @operationId("Operation_ListByTags") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags") @get - listByTags is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - apiId: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Include not tagged Operations. - */ - @query("includeNotTaggedOperations") - includeNotTaggedOperations?: boolean; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - TagResourceListResult - >; + listByTags( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + /** + * Include not tagged Operations. + */ + @query("includeNotTaggedOperations") + includeNotTaggedOperations?: boolean, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } @@encodedName(ApiContracts.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp index c606302a52..7aeea30950 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp @@ -235,56 +235,46 @@ interface ApiManagementServiceResources { @operationId("Api_ListByTags") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags") @get - listByTags is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | isCurrent | filter | eq | |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Include not tagged APIs. - */ - @query("includeNotTaggedApis") - includeNotTaggedApis?: boolean; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - TagResourceListResult - >; + listByTags( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | isCurrent | filter | eq | |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + /** + * Include not tagged APIs. + */ + @query("includeNotTaggedApis") + includeNotTaggedApis?: boolean, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. @@ -294,31 +284,21 @@ interface ApiManagementServiceResources { @operationId("ContentType_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes") @get - listByService is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ContentTypeListResult - >; + listByService( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. @@ -328,39 +308,29 @@ interface ApiManagementServiceResources { @operationId("ContentType_Get") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Content type identifier. - */ - @maxLength(80) - @minLength(1) - @path - contentTypeId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ContentTypeContract - >; + get( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Content type identifier. + */ + @maxLength(80) + @minLength(1) + @path + contentTypeId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists developer portal's content items specified by the provided content type. @@ -370,39 +340,29 @@ interface ApiManagementServiceResources { @operationId("ContentItem_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems") @get - listByService is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Content type identifier. - */ - @maxLength(80) - @minLength(1) - @path - contentTypeId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ContentItemListResult - >; + listByService( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Content type identifier. + */ + @maxLength(80) + @minLength(1) + @path + contentTypeId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Returns the developer portal's content item specified by its identifier. @@ -412,47 +372,37 @@ interface ApiManagementServiceResources { @operationId("ContentItem_Get") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Content type identifier. - */ - @maxLength(80) - @minLength(1) - @path - contentTypeId: string; - - /** - * Content item identifier. - */ - @maxLength(80) - @minLength(1) - @path - contentItemId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ContentItemContract - >; + get( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Content type identifier. + */ + @maxLength(80) + @minLength(1) + @path + contentTypeId: string, + + /** + * Content item identifier. + */ + @maxLength(80) + @minLength(1) + @path + contentItemId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets all available SKU for a given API Management service @@ -463,31 +413,21 @@ interface ApiManagementServiceResources { @summary("Gets available SKUs for API Management service") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus") @get - listAvailableServiceSkus is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ResourceSkuResults - >; + listAvailableServiceSkus( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. @@ -497,31 +437,20 @@ interface ApiManagementServiceResources { @operationId("NetworkStatus_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus") @get - listByService is Azure.Core.Foundations.Operation< - { - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - }, - void - >; + listByService( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + ): ArmResponse | ErrorResponse; /** * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. @@ -531,38 +460,27 @@ interface ApiManagementServiceResources { @operationId("NetworkStatus_ListByLocation") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus") @get - listByLocation is Azure.Core.Foundations.Operation< - { - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US. - */ - @minLength(1) - @path - locationName: string; - }, - NetworkStatusContract - >; + listByLocation( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Location in which the API Management service is deployed. This is one of the Azure Regions like West US, East US, South Central US. + */ + @minLength(1) + @path + locationName: string, + ): ArmResponse | ErrorResponse; /** * Gets the network endpoints of all outbound dependencies of a ApiManagement service. @@ -572,31 +490,20 @@ interface ApiManagementServiceResources { @operationId("OutboundNetworkDependenciesEndpoints_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints") @get - listByService is Azure.Core.Foundations.Operation< - { - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - }, - OutboundEnvironmentEndpointList - >; + listByService( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + ): ArmResponse | ErrorResponse; /** * Lists all policy descriptions. @@ -606,37 +513,27 @@ interface ApiManagementServiceResources { @operationId("PolicyDescription_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions") @get - listByService is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Policy scope. - */ - @query("scope") - scope?: PolicyScopeContract; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - PolicyDescriptionListResult - >; + listByService( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Policy scope. + */ + @query("scope") + scope?: PolicyScopeContract, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists a collection of portalsettings defined within a service instance.. @@ -646,31 +543,21 @@ interface ApiManagementServiceResources { @operationId("PortalSettings_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings") @get - listByService is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ResourceListResult - >; + listByService( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + ...SubscriptionIdParameter, + ): ArmResponse> | ErrorResponse; /** * Lists a collection of products associated with tags. @@ -680,56 +567,46 @@ interface ApiManagementServiceResources { @operationId("Product_ListByTags") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags") @get - listByTags is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | substringof, contains, startswith, endswith |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Include not tagged Products. - */ - @query("includeNotTaggedProducts") - includeNotTaggedProducts?: boolean; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - TagResourceListResult - >; + listByTags( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | substringof, contains, startswith, endswith |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + /** + * Include not tagged Products. + */ + @query("includeNotTaggedProducts") + includeNotTaggedProducts?: boolean, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. @@ -739,35 +616,25 @@ interface ApiManagementServiceResources { @operationId("QuotaByCounterKeys_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}") @get - listByService is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - @doc("Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key=\"boo\" in the policy, then it’s accessible by \"boo\" counter key. But if it’s defined as counter-key=\"@(\"b\"+\"a\")\" then it will be accessible by \"ba\" key") - @path - quotaCounterKey: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - QuotaCounterListResult - >; + listByService( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + @doc("Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key=\"boo\" in the policy, then it’s accessible by \"boo\" counter key. But if it’s defined as counter-key=\"@(\"b\"+\"a\")\" then it will be accessible by \"ba\" key") + @path + quotaCounterKey: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. @@ -775,7 +642,33 @@ interface ApiManagementServiceResources { // FIXME: QuotaByPeriodKeys_Get could not be converted to a resource operation #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @operationId("QuotaByPeriodKeys_Get") - get is Azure.Core.ResourceRead; + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}") + @get + get( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + @doc("Quota counter key identifier.This is the result of expression defined in counter-key attribute of the quota-by-key policy.For Example, if you specify counter-key=\"boo\" in the policy, then it’s accessible by \"boo\" counter key. But if it’s defined as counter-key=\"@(\"b\"+\"a\")\" then it will be accessible by \"ba\" key") + @path + quotaCounterKey: string, + + /** + * Quota period key identifier. + */ + @path + quotaPeriodKey: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists all azure regions in which the service exists. @@ -785,31 +678,21 @@ interface ApiManagementServiceResources { @operationId("Region_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions") @get - listByService is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - RegionListResult - >; + listByService( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists report records by API. @@ -819,56 +702,46 @@ interface ApiManagementServiceResources { @operationId("Reports_ListByApi") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi") @get - listByApi is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * The filter to apply on the operation. - */ - @query("$filter") - $filter: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * OData order by query option. - */ - @query("$orderby") - orderBy?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ReportListResult - >; + listByApi( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * The filter to apply on the operation. + */ + @query("$filter") + $filter: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + /** + * OData order by query option. + */ + @query("$orderby") + orderBy?: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists report records by User. @@ -878,56 +751,46 @@ interface ApiManagementServiceResources { @operationId("Reports_ListByUser") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser") @get - listByUser is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | userId | select, filter | eq | |
    | apiRegion | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    - */ - @query("$filter") - $filter: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * OData order by query option. - */ - @query("$orderby") - orderBy?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ReportListResult - >; + listByUser( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | userId | select, filter | eq | |
    | apiRegion | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    + */ + @query("$filter") + $filter: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + /** + * OData order by query option. + */ + @query("$orderby") + orderBy?: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists report records by API Operations. @@ -937,56 +800,46 @@ interface ApiManagementServiceResources { @operationId("Reports_ListByOperation") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation") @get - listByOperation is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | select, filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    - */ - @query("$filter") - $filter: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * OData order by query option. - */ - @query("$orderby") - orderBy?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ReportListResult - >; + listByOperation( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | select, filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    + */ + @query("$filter") + $filter: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + /** + * OData order by query option. + */ + @query("$orderby") + orderBy?: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists report records by Product. @@ -996,56 +849,46 @@ interface ApiManagementServiceResources { @operationId("Reports_ListByProduct") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct") @get - listByProduct is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | select, filter | eq | |
    | subscriptionId | filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    - */ - @query("$filter") - $filter: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * OData order by query option. - */ - @query("$orderby") - orderBy?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ReportListResult - >; + listByProduct( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | select, filter | eq | |
    | subscriptionId | filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    + */ + @query("$filter") + $filter: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + /** + * OData order by query option. + */ + @query("$orderby") + orderBy?: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists report records by geography. @@ -1055,50 +898,40 @@ interface ApiManagementServiceResources { @operationId("Reports_ListByGeo") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo") @get - listByGeo is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | country | select | | |
    | region | select | | |
    | zip | select | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | callCountSuccess | select | | |
    | callCountBlocked | select | | |
    | callCountFailed | select | | |
    | callCountOther | select | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    - */ - @query("$filter") - $filter: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ReportListResult - >; + listByGeo( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | country | select | | |
    | region | select | | |
    | zip | select | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | callCountSuccess | select | | |
    | callCountBlocked | select | | |
    | callCountFailed | select | | |
    | callCountOther | select | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    + */ + @query("$filter") + $filter: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists report records by subscription. @@ -1108,56 +941,46 @@ interface ApiManagementServiceResources { @operationId("Reports_ListBySubscription") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription") @get - listBySubscription is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | apiRegion | filter | eq | |
    | userId | select, filter | eq | |
    | productId | select, filter | eq | |
    | subscriptionId | select, filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    - */ - @query("$filter") - $filter: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * OData order by query option. - */ - @query("$orderby") - orderBy?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ReportListResult - >; + listBySubscription( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | displayName | select, orderBy | | |
    | apiRegion | filter | eq | |
    | userId | select, filter | eq | |
    | productId | select, filter | eq | |
    | subscriptionId | select, filter | eq | |
    | callCountSuccess | select, orderBy | | |
    | callCountBlocked | select, orderBy | | |
    | callCountFailed | select, orderBy | | |
    | callCountOther | select, orderBy | | |
    | callCountTotal | select, orderBy | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select, orderBy | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    + */ + @query("$filter") + $filter: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + /** + * OData order by query option. + */ + @query("$orderby") + orderBy?: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists report records by Time. @@ -1167,62 +990,52 @@ interface ApiManagementServiceResources { @operationId("Reports_ListByTime") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime") @get - listByTime is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter, select | ge, le | |
    | interval | select | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | callCountSuccess | select | | |
    | callCountBlocked | select | | |
    | callCountFailed | select | | |
    | callCountOther | select | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    - */ - @query("$filter") - $filter: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * OData order by query option. - */ - @query("$orderby") - orderBy?: string; - - /** - * By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). - */ - @query("interval") - interval: duration; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ReportListResult - >; + listByTime( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter, select | ge, le | |
    | interval | select | | |
    | apiRegion | filter | eq | |
    | userId | filter | eq | |
    | productId | filter | eq | |
    | subscriptionId | filter | eq | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | callCountSuccess | select | | |
    | callCountBlocked | select | | |
    | callCountFailed | select | | |
    | callCountOther | select | | |
    | bandwidth | select, orderBy | | |
    | cacheHitsCount | select | | |
    | cacheMissCount | select | | |
    | apiTimeAvg | select | | |
    | apiTimeMin | select | | |
    | apiTimeMax | select | | |
    | serviceTimeAvg | select | | |
    | serviceTimeMin | select | | |
    | serviceTimeMax | select | | |
    + */ + @query("$filter") + $filter: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + /** + * OData order by query option. + */ + @query("$orderby") + orderBy?: string, + + /** + * By time interval. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds)). + */ + @query("interval") + interval: duration, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists report records by Request. @@ -1232,50 +1045,40 @@ interface ApiManagementServiceResources { @operationId("Reports_ListByRequest") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest") @get - listByRequest is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | productId | filter | eq | |
    | userId | filter | eq | |
    | apiRegion | filter | eq | |
    | subscriptionId | filter | eq | |
    - */ - @query("$filter") - $filter: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - RequestReportListResult - >; + listByRequest( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | timestamp | filter | ge, le | |
    | apiId | filter | eq | |
    | operationId | filter | eq | |
    | productId | filter | eq | |
    | userId | filter | eq | |
    | apiRegion | filter | eq | |
    | subscriptionId | filter | eq | |
    + */ + @query("$filter") + $filter: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists a collection of resources associated with tags. @@ -1285,50 +1088,40 @@ interface ApiManagementServiceResources { @operationId("TagResource_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources") @get - listByService is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | isCurrent | filter | eq | |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - TagResourceListResult - >; + listByService( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | aid | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiRevision | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | isCurrent | filter | eq | |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets the status of the most recent synchronization between the configuration database and the Git repository. @@ -1338,37 +1131,27 @@ interface ApiManagementServiceResources { @operationId("TenantConfiguration_GetSyncState") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState") @get - getSyncState is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * The identifier of the Git Configuration Operation. - */ - @path - configurationName: ConfigurationIdName; - }, - TenantConfigurationSyncStateContract - >; + getSyncState( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + ...SubscriptionIdParameter, + + /** + * The identifier of the Git Configuration Operation. + */ + @path + configurationName: ConfigurationIdName, + ): ArmResponse | ErrorResponse; } @@encodedName(ApiManagementServiceResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp index 9e5dab370f..5f2499f8a6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp @@ -184,58 +184,48 @@ interface GatewayContracts { @operationId("GatewayApi_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis") @get - listByService is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; + listByService( + ...ApiVersionParameter, + ...ResourceGroupParameter, - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, - /** - * Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed' - */ - @maxLength(80) - @minLength(1) - @path - gatewayId: string; + /** + * Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed' + */ + @maxLength(80) + @minLength(1) + @path + gatewayId: string, - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    - */ - @query("$filter") - $filter?: string; + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ + @query("$filter") + $filter?: string, - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ApiManagementGatewayApiListResult - >; + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } @@encodedName(GatewayContracts.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp index ece9f4108f..2176bd019b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp @@ -153,58 +153,48 @@ interface GroupContracts { @operationId("GroupUser_List") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Group identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - groupId: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | registrationDate | filter | ge, le, eq, ne, gt, lt | |
    | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ApiManagementGroupUserListResult - >; + list( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Group identifier. Must be unique in the current API Management service instance. + */ + @maxLength(256) + @minLength(1) + @path + groupId: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | registrationDate | filter | ge, le, eq, ne, gt, lt | |
    | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } @@encodedName(GroupContracts.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp index a6487ce105..6c242c617c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp @@ -99,37 +99,27 @@ interface NotificationContracts { @operationId("NotificationRecipientUser_ListByNotification") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers") @get - listByNotification is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Notification Name Identifier. - */ - @path - notificationName: NotificationName; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - RecipientUserListResult - >; + listByNotification( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Notification Name Identifier. + */ + @path + notificationName: NotificationName, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets the list of the Notification Recipient Emails subscribed to a notification. @@ -139,35 +129,25 @@ interface NotificationContracts { @operationId("NotificationRecipientEmail_ListByNotification") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails") @get - listByNotification is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Notification Name Identifier. - */ - @path - notificationName: NotificationName; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - RecipientEmailListResult - >; + listByNotification( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Notification Name Identifier. + */ + @path + notificationName: NotificationName, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp index 30e2357e8e..8bc7549d15 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp @@ -174,58 +174,48 @@ interface ProductContracts { @operationId("ProductApi_ListByProduct") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis") @get - listByProduct is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Product identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - productId: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ApiManagementProductApiListResult - >; + listByProduct( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Product identifier. Must be unique in the current API Management service instance. + */ + @maxLength(256) + @minLength(1) + @path + productId: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists the collection of developer groups associated with the specified product. @@ -235,58 +225,48 @@ interface ProductContracts { @operationId("ProductGroup_ListByProduct") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups") @get - listByProduct is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Product identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - productId: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | |
    | displayName | filter | eq, ne | |
    | description | filter | eq, ne | |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ApiManagementProductGroupListResult - >; + listByProduct( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Product identifier. Must be unique in the current API Management service instance. + */ + @maxLength(256) + @minLength(1) + @path + productId: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | |
    | displayName | filter | eq, ne | |
    | description | filter | eq, ne | |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists the collection of subscriptions to the specified product. @@ -296,58 +276,48 @@ interface ProductContracts { @operationId("ProductSubscriptions_List") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Product identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - productId: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | user | expand | | |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ResourceListResult - >; + list( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Product identifier. Must be unique in the current API Management service instance. + */ + @maxLength(256) + @minLength(1) + @path + productId: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | user | expand | | |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + ...SubscriptionIdParameter, + ): ArmResponse> | ErrorResponse; } @@encodedName(ProductContracts.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp index 9a178440e5..1ee0818d0e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp @@ -224,58 +224,48 @@ interface UserContracts { @operationId("UserGroup_List") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * User identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @path - userId: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|------------------------|-----------------------------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ResourceListResult - >; + list( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * User identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @path + userId: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|------------------------|-----------------------------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + ...SubscriptionIdParameter, + ): ArmResponse> | ErrorResponse; /** * List of all user identities. @@ -285,39 +275,29 @@ interface UserContracts { @operationId("UserIdentities_List") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * User identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @path - userId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - UserIdentityListResult - >; + list( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * User identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @path + userId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } @@encodedName(UserContracts.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp index 22751ef70b..bf97eea969 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp @@ -1,3 +1,5 @@ +// FIXME: Operations in this file are not detected as a resource operation, please confirm the conversion result manually + import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; @@ -15,791 +17,631 @@ interface TagOperations { */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags") @get - listByApi is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - apiId: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ResourceListResult - >; + listByApi( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + ...SubscriptionIdParameter, + ): ArmResponse> | ErrorResponse; /** * Gets the entity state version of the tag specified by its identifier. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}") @head - getEntityStateByApi is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - apiId: string; - - /** - * Tag identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - tagId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + getEntityStateByApi( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string, + + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Get tag associated with the API. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}") @get - getByApi is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - apiId: string; - - /** - * Tag identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - tagId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - TagContract - >; + getByApi( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string, + + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Assign tag to the Api. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}") @put - assignToApi is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - apiId: string; - - /** - * Tag identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - tagId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - TagContract - >; + assignToApi( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string, + + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Detach the tag from the Api. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/tags/{tagId}") @delete - detachFromApi is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - apiId: string; - - /** - * Tag identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - tagId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + detachFromApi( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string, + + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists all Tags associated with the Product. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags") @get - listByProduct is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Product identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - productId: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ResourceListResult - >; + listByProduct( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Product identifier. Must be unique in the current API Management service instance. + */ + @maxLength(256) + @minLength(1) + @path + productId: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + ...SubscriptionIdParameter, + ): ArmResponse> | ErrorResponse; /** * Gets the entity state version of the tag specified by its identifier. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}") @head - getEntityStateByProduct is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Product identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - productId: string; - - /** - * Tag identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - tagId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + getEntityStateByProduct( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Product identifier. Must be unique in the current API Management service instance. + */ + @maxLength(256) + @minLength(1) + @path + productId: string, + + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Get tag associated with the Product. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}") @get - getByProduct is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Product identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - productId: string; - - /** - * Tag identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - tagId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - TagContract - >; + getByProduct( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Product identifier. Must be unique in the current API Management service instance. + */ + @maxLength(256) + @minLength(1) + @path + productId: string, + + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Assign tag to the Product. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}") @put - assignToProduct is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Product identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - productId: string; - - /** - * Tag identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - tagId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - TagContract - >; + assignToProduct( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Product identifier. Must be unique in the current API Management service instance. + */ + @maxLength(256) + @minLength(1) + @path + productId: string, + + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Detach the tag from the Product. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/tags/{tagId}") @delete - detachFromProduct is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Product identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - productId: string; - - /** - * Tag identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - tagId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + detachFromProduct( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Product identifier. Must be unique in the current API Management service instance. + */ + @maxLength(256) + @minLength(1) + @path + productId: string, + + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists a collection of tags defined within a service instance. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags") @get - listByService is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Scope like 'apis', 'products' or 'apis/{apiId} - */ - @query("scope") - scope?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ResourceListResult - >; + listByService( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + /** + * Scope like 'apis', 'products' or 'apis/{apiId} + */ + @query("scope") + scope?: string, + + ...SubscriptionIdParameter, + ): ArmResponse> | ErrorResponse; /** * Gets the entity state version of the tag specified by its identifier. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") @head - getEntityState is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Tag identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - tagId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + getEntityState( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets the details of the tag specified by its identifier. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Tag identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - tagId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - TagContract - >; + get( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Creates a tag. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Tag identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - tagId: string; - - /** - * ETag of the Entity. Not required when creating an entity, but required when updating an entity. - */ - @header - `If-Match`?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * Create parameters. - */ - @body - parameters: TagCreateUpdateParameters; - }, - TagContract - >; + createOrUpdate( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string, + + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ + @header + `If-Match`?: string, + + ...SubscriptionIdParameter, + + /** + * Create parameters. + */ + @body + parameters: TagCreateUpdateParameters, + ): ArmResponse | ErrorResponse; /** * Updates the details of the tag specified by its identifier. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") @patch - update is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Tag identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - tagId: string; - - /** - * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - */ - @header - `If-Match`: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * Update parameters. - */ - @body - parameters: TagCreateUpdateParameters; - }, - TagContract - >; + update( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string, + + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ + @header + `If-Match`: string, + + ...SubscriptionIdParameter, + + /** + * Update parameters. + */ + @body + parameters: TagCreateUpdateParameters, + ): ArmResponse | ErrorResponse; /** * Deletes specific tag of the API Management service instance. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tags/{tagId}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Tag identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - tagId: string; - - /** - * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - */ - @header - `If-Match`: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Tag identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + tagId: string, + + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ + @header + `If-Match`: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface ApiPolicyOperations { @@ -808,254 +650,204 @@ interface ApiPolicyOperations { */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies") @get - listByApi is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - apiId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ResourceListResult - >; + listByApi( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string, + + ...SubscriptionIdParameter, + ): ArmResponse> | ErrorResponse; /** * Gets the entity state (Etag) version of the API policy specified by its identifier. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}") @head - getEntityTag is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - apiId: string; - - /** - * The identifier of the Policy. - */ - @path - policyId: PolicyIdName; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + getEntityTag( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string, + + /** + * The identifier of the Policy. + */ + @path + policyId: PolicyIdName, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Get the policy configuration at the API level. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - apiId: string; - - /** - * The identifier of the Policy. - */ - @path - policyId: PolicyIdName; - - /** - * Policy Export Format. - */ - @query("format") - format?: PolicyExportFormat = PolicyExportFormat.xml; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * Accept header - */ - @header - accept: "application/json, application/vnd.ms-azure-apim.policy+xml, application/vnd.ms-azure-apim.policy.raw+xml"; - }, - PolicyContract - >; + get( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string, + + /** + * The identifier of the Policy. + */ + @path + policyId: PolicyIdName, + + /** + * Policy Export Format. + */ + @query("format") + format?: PolicyExportFormat = PolicyExportFormat.xml, + + ...SubscriptionIdParameter, + + /** + * Accept header + */ + @header + accept: "application/json, application/vnd.ms-azure-apim.policy+xml, application/vnd.ms-azure-apim.policy.raw+xml", + ): ArmResponse | ErrorResponse; /** * Creates or updates policy configuration for the API. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - apiId: string; - - /** - * The identifier of the Policy. - */ - @path - policyId: PolicyIdName; - - /** - * ETag of the Entity. Not required when creating an entity, but required when updating an entity. - */ - @header - `If-Match`?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * The policy contents to apply. - */ - @body - parameters: PolicyContract; - }, - PolicyContract - >; + createOrUpdate( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string, + + /** + * The identifier of the Policy. + */ + @path + policyId: PolicyIdName, + + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ + @header + `If-Match`?: string, + + ...SubscriptionIdParameter, + + /** + * The policy contents to apply. + */ + @body + parameters: PolicyContract, + ): ArmResponse | ErrorResponse; /** * Deletes the policy configuration at the Api. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/policies/{policyId}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - apiId: string; - - /** - * The identifier of the Policy. - */ - @path - policyId: PolicyIdName; - - /** - * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - */ - @header - `If-Match`: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string, + + /** + * The identifier of the Policy. + */ + @path + policyId: PolicyIdName, + + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ + @header + `If-Match`: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface ApiExportOperations { @@ -1064,52 +856,42 @@ interface ApiExportOperations { */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - apiId: string; - - /** - * Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes. - */ - @query("format") - format: ExportFormat; - - /** - * Query parameter required to export the API details. - */ - @query("export") - export: ExportApi; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ApiExportResult - >; + get( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. + */ + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + apiId: string, + + /** + * Format in which to export the Api Details to the Storage Blob with Sas Key valid for 5 minutes. + */ + @query("format") + format: ExportFormat, + + /** + * Query parameter required to export the API details. + */ + @query("export") + export: ExportApi, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface DiagnosticOperations { @@ -1118,280 +900,220 @@ interface DiagnosticOperations { */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics") @get - listByService is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ResourceListResult - >; + listByService( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + ...SubscriptionIdParameter, + ): ArmResponse> | ErrorResponse; /** * Gets the entity state (Etag) version of the Diagnostic specified by its identifier. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") @head - getEntityTag is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Diagnostic identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - diagnosticId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + getEntityTag( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Diagnostic identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + diagnosticId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets the details of the Diagnostic specified by its identifier. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Diagnostic identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - diagnosticId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - DiagnosticContract - >; + get( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Diagnostic identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + diagnosticId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Creates a new Diagnostic or updates an existing one. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Diagnostic identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - diagnosticId: string; - - /** - * ETag of the Entity. Not required when creating an entity, but required when updating an entity. - */ - @header - `If-Match`?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * Create parameters. - */ - @body - parameters: DiagnosticContract; - }, - DiagnosticContract - >; + createOrUpdate( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Diagnostic identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + diagnosticId: string, + + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ + @header + `If-Match`?: string, + + ...SubscriptionIdParameter, + + /** + * Create parameters. + */ + @body + parameters: DiagnosticContract, + ): ArmResponse | ErrorResponse; /** * Updates the details of the Diagnostic specified by its identifier. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") @patch - update is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Diagnostic identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - diagnosticId: string; - - /** - * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - */ - @header - `If-Match`: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * Diagnostic Update parameters. - */ - @body - parameters: DiagnosticContract; - }, - DiagnosticContract - >; + update( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Diagnostic identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + diagnosticId: string, + + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ + @header + `If-Match`: string, + + ...SubscriptionIdParameter, + + /** + * Diagnostic Update parameters. + */ + @body + parameters: DiagnosticContract, + ): ArmResponse | ErrorResponse; /** * Deletes the specified Diagnostic. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Diagnostic identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - diagnosticId: string; - - /** - * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - */ - @header - `If-Match`: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Diagnostic identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + diagnosticId: string, + + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ + @header + `If-Match`: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface IssueOperations { @@ -1400,90 +1122,70 @@ interface IssueOperations { */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues") @get - listByService is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ResourceListResult - >; + listByService( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | apiId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | authorName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + ...SubscriptionIdParameter, + ): ArmResponse> | ErrorResponse; /** * Gets API Management issue details */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/issues/{issueId}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Issue identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - issueId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - IssueContract - >; + get( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Issue identifier. Must be unique in the current API Management service instance. + */ + @maxLength(256) + @minLength(1) + @pattern("^[^*#&+:<>?]+$") + @path + issueId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface PolicyOperations { @@ -1492,203 +1194,153 @@ interface PolicyOperations { */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies") @get - listByService is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ResourceListResult - >; + listByService( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + ...SubscriptionIdParameter, + ): ArmResponse> | ErrorResponse; /** * Gets the entity state (Etag) version of the Global policy definition in the Api Management service. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}") @head - getEntityTag is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * The identifier of the Policy. - */ - @path - policyId: PolicyIdName; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + getEntityTag( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * The identifier of the Policy. + */ + @path + policyId: PolicyIdName, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Get the Global policy definition of the Api Management service. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * The identifier of the Policy. - */ - @path - policyId: PolicyIdName; - - /** - * Policy Export Format. - */ - @query("format") - format?: PolicyExportFormat = PolicyExportFormat.xml; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - PolicyContract - >; + get( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * The identifier of the Policy. + */ + @path + policyId: PolicyIdName, + + /** + * Policy Export Format. + */ + @query("format") + format?: PolicyExportFormat = PolicyExportFormat.xml, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Creates or updates the global policy configuration of the Api Management service. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * The identifier of the Policy. - */ - @path - policyId: PolicyIdName; - - /** - * ETag of the Entity. Not required when creating an entity, but required when updating an entity. - */ - @header - `If-Match`?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * The policy contents to apply. - */ - @body - parameters: PolicyContract; - }, - PolicyContract - >; + createOrUpdate( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * The identifier of the Policy. + */ + @path + policyId: PolicyIdName, + + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ + @header + `If-Match`?: string, + + ...SubscriptionIdParameter, + + /** + * The policy contents to apply. + */ + @body + parameters: PolicyContract, + ): ArmResponse | ErrorResponse; /** * Deletes the global policy configuration of the Api Management Service. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policies/{policyId}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * The identifier of the Policy. - */ - @path - policyId: PolicyIdName; - - /** - * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - */ - @header - `If-Match`: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * The identifier of the Policy. + */ + @path + policyId: PolicyIdName, + + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ + @header + `If-Match`: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface ProductPolicyOperations { @@ -1697,243 +1349,193 @@ interface ProductPolicyOperations { */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies") @get - listByProduct is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Product identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - productId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ResourceListResult - >; + listByProduct( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Product identifier. Must be unique in the current API Management service instance. + */ + @maxLength(256) + @minLength(1) + @path + productId: string, + + ...SubscriptionIdParameter, + ): ArmResponse> | ErrorResponse; /** * Get the ETag of the policy configuration at the Product level. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}") @head - getEntityTag is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Product identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - productId: string; - - /** - * The identifier of the Policy. - */ - @path - policyId: PolicyIdName; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + getEntityTag( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Product identifier. Must be unique in the current API Management service instance. + */ + @maxLength(256) + @minLength(1) + @path + productId: string, + + /** + * The identifier of the Policy. + */ + @path + policyId: PolicyIdName, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Get the policy configuration at the Product level. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Product identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - productId: string; - - /** - * The identifier of the Policy. - */ - @path - policyId: PolicyIdName; - - /** - * Policy Export Format. - */ - @query("format") - format?: PolicyExportFormat = PolicyExportFormat.xml; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - PolicyContract - >; + get( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Product identifier. Must be unique in the current API Management service instance. + */ + @maxLength(256) + @minLength(1) + @path + productId: string, + + /** + * The identifier of the Policy. + */ + @path + policyId: PolicyIdName, + + /** + * Policy Export Format. + */ + @query("format") + format?: PolicyExportFormat = PolicyExportFormat.xml, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Creates or updates policy configuration for the Product. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Product identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - productId: string; - - /** - * The identifier of the Policy. - */ - @path - policyId: PolicyIdName; - - /** - * ETag of the Entity. Not required when creating an entity, but required when updating an entity. - */ - @header - `If-Match`?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * The policy contents to apply. - */ - @body - parameters: PolicyContract; - }, - PolicyContract - >; + createOrUpdate( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Product identifier. Must be unique in the current API Management service instance. + */ + @maxLength(256) + @minLength(1) + @path + productId: string, + + /** + * The identifier of the Policy. + */ + @path + policyId: PolicyIdName, + + /** + * ETag of the Entity. Not required when creating an entity, but required when updating an entity. + */ + @header + `If-Match`?: string, + + ...SubscriptionIdParameter, + + /** + * The policy contents to apply. + */ + @body + parameters: PolicyContract, + ): ArmResponse | ErrorResponse; /** * Deletes the policy configuration at the Product. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/policies/{policyId}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * Product identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - productId: string; - - /** - * The identifier of the Policy. - */ - @path - policyId: PolicyIdName; - - /** - * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. - */ - @header - `If-Match`: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * Product identifier. Must be unique in the current API Management service instance. + */ + @maxLength(256) + @minLength(1) + @path + productId: string, + + /** + * The identifier of the Policy. + */ + @path + policyId: PolicyIdName, + + /** + * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + */ + @header + `If-Match`: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface ApiManagementSkusOperations { @@ -1942,16 +1544,10 @@ interface ApiManagementSkusOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/skus") @get - list is Azure.Core.Foundations.Operation< - { - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ApiManagementSkusResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface UserSubscriptionOperations { @@ -1960,103 +1556,83 @@ interface UserSubscriptionOperations { */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * User identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @path - userId: string; - - /** - * | Field | Usage | Supported operators | Supported functions |
    |-------------|------------------------|-----------------------------------|
    |name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    - */ - @query("$filter") - $filter?: string; - - /** - * Number of records to return. - */ - @minValue(1) - @query("$top") - $top?: int32; - - /** - * Number of records to skip. - */ - @query("$skip") - $skip?: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ResourceListResult - >; + list( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * User identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @path + userId: string, + + /** + * | Field | Usage | Supported operators | Supported functions |
    |-------------|------------------------|-----------------------------------|
    |name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    |productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    + */ + @query("$filter") + $filter?: string, + + /** + * Number of records to return. + */ + @minValue(1) + @query("$top") + $top?: int32, + + /** + * Number of records to skip. + */ + @query("$skip") + $skip?: int32, + + ...SubscriptionIdParameter, + ): ArmResponse> | ErrorResponse; /** * Gets the specified Subscription entity associated with a particular user. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/subscriptions/{sid}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - /** - * User identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @path - userId: string; - - /** - * Subscription entity Identifier. The entity represents the association between a user and a product in API Management. - */ - @maxLength(256) - @pattern("^[^*#&+:<>?]+$") - @path - sid: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - SubscriptionContract - >; + get( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the API Management service. + */ + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string, + + /** + * User identifier. Must be unique in the current API Management service instance. + */ + @maxLength(80) + @minLength(1) + @path + userId: string, + + /** + * Subscription entity Identifier. The entity represents the association between a user and a product in API Management. + */ + @maxLength(256) + @pattern("^[^*#&+:<>?]+$") + @path + sid: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp index 0e73dc843d..630c5f9cc0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp @@ -51,21 +51,8 @@ interface DenyAssignments { DenyAssignment, { ...BaseParameters; - - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; + ...SubscriptionIdParameter; + ...ResourceGroupParameter; /** * The namespace of the resource provider. diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp index 5d5d0bcf20..8515ad9d7a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp @@ -1,3 +1,5 @@ +// FIXME: Operations in this file are not detected as a resource operation, please confirm the conversion result manually + import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; @@ -15,17 +17,10 @@ interface ClassicAdministratorsOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/classicAdministrators") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - }, - ClassicAdministratorListResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface GlobalAdministratorOperations { @@ -34,7 +29,7 @@ interface GlobalAdministratorOperations { */ @route("/providers/Microsoft.Authorization/elevateAccess") @post - elevateAccess is Azure.Core.Foundations.Operation<{}, void>; + elevateAccess(...ApiVersionParameter): ArmResponse | ErrorResponse; } interface AzurePermissionsForResourceGroupOperations { @@ -43,25 +38,11 @@ interface AzurePermissionsForResourceGroupOperations { */ @route("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/permissions") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - }, - PermissionGetResult - >; + list( + ...ApiVersionParameter, + ...ResourceGroupParameter, + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface AzurePermissionsForResourceOperations { @@ -70,49 +51,36 @@ interface AzurePermissionsForResourceOperations { */ @route("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/permissions") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; + list( + ...ApiVersionParameter, + ...ResourceGroupParameter, - /** - * The namespace of the resource provider. - */ - @path - resourceProviderNamespace: string; + /** + * The namespace of the resource provider. + */ + @path + resourceProviderNamespace: string, - /** - * The parent resource identity. - */ - @path - parentResourcePath: string; + /** + * The parent resource identity. + */ + @path + parentResourcePath: string, - /** - * The resource type of the resource. - */ - @path - resourceType: string; + /** + * The resource type of the resource. + */ + @path + resourceType: string, - /** - * The name of the resource to get the permissions for. - */ - @path - resourceName: string; + /** + * The name of the resource to get the permissions for. + */ + @path + resourceName: string, - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - }, - PermissionGetResult - >; + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface EligibleChildResourcesOperations { @@ -121,20 +89,19 @@ interface EligibleChildResourcesOperations { */ @route("/{scope}/providers/Microsoft.Authorization/eligibleChildResources") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The scope of the role management policy. - */ - @path - scope: string; + get( + ...ApiVersionParameter, + + /** + * The scope of the role management policy. + */ + @path + scope: string, - /** - * The filter to apply on the operation. Use $filter=resourceType+eq+'Subscription' to filter on only resource of type = 'Subscription'. Use $filter=resourceType+eq+'subscription'+or+resourceType+eq+'resourcegroup' to filter on resource of type = 'Subscription' or 'ResourceGroup' - */ - @query("$filter") - $filter?: string; - }, - EligibleChildResourcesListResult - >; + /** + * The filter to apply on the operation. Use $filter=resourceType+eq+'Subscription' to filter on only resource of type = 'Subscription'. Use $filter=resourceType+eq+'subscription'+or+resourceType+eq+'resourcegroup' to filter on resource of type = 'Subscription' or 'ResourceGroup' + */ + @query("$filter") + $filter?: string, + ): ArmResponse | ErrorResponse; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp index 57df625f4e..3b4f24e80b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp @@ -1,3 +1,5 @@ +// FIXME: Operations in this file are not detected as a resource operation, please confirm the conversion result manually + import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; @@ -15,284 +17,214 @@ interface ApplicationResourcesOperations { */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources") @get - listByApplication is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * The number of result items to return. - */ - @query("top") - top?: int32; - - /** - * The number of result items to skip. - */ - @query("skip") - skip?: int32; - - /** - * The maximum number of result items per page. - */ - @query("maxpagesize") - maxpagesize?: int32; - - /** - * Filter the result list using the given expression. - */ - @query("filter") - filter?: string; - - /** - * Select the specified fields to be included in the response. - */ - @query({ - name: "select", - format: "multi", - }) - select?: string[]; - - /** - * Expand the indicated resources into the response. - */ - @query({ - name: "expand", - format: "multi", - }) - expand?: string[]; - - /** - * Expressions that specify the order of returned results. - */ - @query({ - name: "orderby", - format: "multi", - }) - orderby?: string[]; - - /** - * The name of the space - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - spaceName: string; - - /** - * The name of the Application - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - applicationName: string; - }, - ApplicationResourceListResult - >; + listByApplication( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * The number of result items to return. + */ + @query("top") + top?: int32, + + /** + * The number of result items to skip. + */ + @query("skip") + skip?: int32, + + /** + * The maximum number of result items per page. + */ + @query("maxpagesize") + maxpagesize?: int32, + + /** + * Filter the result list using the given expression. + */ + @query("filter") + filter?: string, + + /** + * Select the specified fields to be included in the response. + */ + @query({ + name: "select", + format: "multi", + }) + select?: string[], + + /** + * Expand the indicated resources into the response. + */ + @query({ + name: "expand", + format: "multi", + }) + expand?: string[], + + /** + * Expressions that specify the order of returned results. + */ + @query({ + name: "orderby", + format: "multi", + }) + orderby?: string[], + + /** + * The name of the space + */ + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + spaceName: string, + + /** + * The name of the Application + */ + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + applicationName: string, + ): ArmResponse | ErrorResponse; /** * Get a ApplicationResource */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * The name of the space - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - spaceName: string; - - /** - * The name of the Application - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - applicationName: string; - - /** - * The name of the application resource. - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - resourceName: string; - }, - ApplicationResource - >; + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * The name of the space + */ + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + spaceName: string, + + /** + * The name of the Application + */ + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + applicationName: string, + + /** + * The name of the application resource. + */ + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + resourceName: string, + ): ArmResponse | ErrorResponse; /** * Create a ApplicationResource */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * The name of the space - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - spaceName: string; - - /** - * The name of the Application - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - applicationName: string; - - /** - * The name of the application resource. - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - resourceName: string; - - /** - * Resource create parameters. - */ - @body - resource: ApplicationResource; - }, - ApplicationResource - >; + createOrUpdate( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * The name of the space + */ + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + spaceName: string, + + /** + * The name of the Application + */ + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + applicationName: string, + + /** + * The name of the application resource. + */ + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + resourceName: string, + + /** + * Resource create parameters. + */ + @body + resource: ApplicationResource, + ): ArmResponse | ErrorResponse; /** * Update a ApplicationResource */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") @patch - patch is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * The name of the space - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - spaceName: string; - - /** - * The name of the Application - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - applicationName: string; - - /** - * The name of the application resource. - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - resourceName: string; - - /** - * The resource properties to be updated. - */ - @body - properties: ApplicationResourceUpdate; - }, - ApplicationResource - >; + patch( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * The name of the space + */ + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + spaceName: string, + + /** + * The name of the Application + */ + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + applicationName: string, + + /** + * The name of the application resource. + */ + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + resourceName: string, + + /** + * The resource properties to be updated. + */ + @body + properties: ApplicationResourceUpdate, + ): ArmResponse | ErrorResponse; /** * Delete a ApplicationResource */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IntegrationSpaces/spaces/{spaceName}/applications/{applicationName}/resources/{resourceName}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * The name of the space - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - spaceName: string; - - /** - * The name of the Application - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - applicationName: string; - - /** - * The name of the application resource. - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - resourceName: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * The name of the space + */ + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + spaceName: string, + + /** + * The name of the Application + */ + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + applicationName: string, + + /** + * The name of the application resource. + */ + @pattern("[a-zA-Z0-9_.()-]{0,79}$") + @path + resourceName: string, + ): ArmResponse | ErrorResponse; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp index 9ef72db398..f089b8d095 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp @@ -80,28 +80,18 @@ interface AvailabilitySets { // FIXME: AvailabilitySets_ListAvailableSizes could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes") @get - listAvailableSizes is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; + listAvailableSizes( + ...ApiVersionParameter, + ...ResourceGroupParameter, - /** - * The name of the availability set. - */ - @path - availabilitySetName: string; + /** + * The name of the availability set. + */ + @path + availabilitySetName: string, - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - VirtualMachineSizeListResult - >; + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } @@encodedName(AvailabilitySets.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp index cf589cff8b..9afc0f144b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp @@ -138,28 +138,18 @@ interface CloudServices { // FIXME: CloudServices_GetInstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/instanceView") @get - getInstanceView is Azure.Core.Foundations.Operation< - { - /** - * Name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * Name of the cloud service. - */ - @path - cloudServiceName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - CloudServiceInstanceView - >; + getInstanceView( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * Name of the cloud service. + */ + @path + cloudServiceName: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets the specified update domain of a cloud service. Use nextLink property in the response to get the next page of update domains. Do this till nextLink is null to fetch all the update domains. @@ -169,34 +159,24 @@ interface CloudServices { @operationId("CloudServicesUpdateDomain_GetUpdateDomain") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}") @get - getUpdateDomain is Azure.Core.Foundations.Operation< - { - /** - * Name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * Name of the cloud service. - */ - @path - cloudServiceName: string; - - /** - * Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - */ - @path - updateDomain: int32; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - UpdateDomain - >; + getUpdateDomain( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * Name of the cloud service. + */ + @path + cloudServiceName: string, + + /** + * Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. + */ + @path + updateDomain: int32, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets a list of all update domains in a cloud service. @@ -206,28 +186,18 @@ interface CloudServices { @operationId("CloudServicesUpdateDomain_ListUpdateDomains") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains") @get - listUpdateDomains is Azure.Core.Foundations.Operation< - { - /** - * Name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * Name of the cloud service. - */ - @path - cloudServiceName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - UpdateDomainListResult - >; + listUpdateDomains( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * Name of the cloud service. + */ + @path + cloudServiceName: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } @@encodedName(CloudServices.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp index 753a855369..0dc0c47178 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp @@ -91,7 +91,28 @@ interface DedicatedHosts { * Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host. */ // FIXME: DedicatedHosts_ListAvailableSizes could not be converted to a resource operation - listAvailableSizes is Azure.Core.ResourceList; + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}/hostSizes") + @get + listAvailableSizes( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the dedicated host group. + */ + @pattern("^[-\\w\\._]+$") + @path + hostGroupName: string, + + /** + * The name of the dedicated host. + */ + @pattern("^[-\\w\\._]+$") + @path + hostName: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } @@encodedName(DedicatedHosts.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp index 4f1cfe6234..6cd0c78c14 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp @@ -77,28 +77,17 @@ interface DiskAccesses { // FIXME: DiskAccesses_GetPrivateLinkResources could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources") @get - getPrivateLinkResources is Azure.Core.Foundations.Operation< - { - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; + getPrivateLinkResources( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - */ - @path - diskAccessName: string; - }, - PrivateLinkResourceListResult - >; + /** + * The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + */ + @path + diskAccessName: string, + ): ArmResponse | ErrorResponse; } @@encodedName(DiskAccesses.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp index 13e7412d7f..622a53ed63 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp @@ -75,7 +75,19 @@ interface DiskEncryptionSets { * Lists all resources that are encrypted with this disk encryption set. */ // FIXME: DiskEncryptionSets_ListAssociatedResources could not be converted to a resource operation - listAssociatedResources is Azure.Core.ResourceList; + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}/associatedResources") + @get + listAssociatedResources( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * The name of the disk encryption set that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + */ + @path + diskEncryptionSetName: string, + ): ArmResponse | ErrorResponse; } @@encodedName(DiskEncryptionSets.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp index bd9ad1a232..baa2e2523d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp @@ -139,34 +139,25 @@ interface RoleInstances { @operationId("CloudServiceRoleInstances_GetInstanceView") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView") @get - getInstanceView is Azure.Core.Foundations.Operation< - { - /** - * Name of the role instance. - */ - @path - roleInstanceName: string; + getInstanceView( + ...ApiVersionParameter, - /** - * Name of the resource group. - */ - @path - resourceGroupName: string; + /** + * Name of the role instance. + */ + @path + roleInstanceName: string, - /** - * Name of the cloud service. - */ - @path - cloudServiceName: string; + ...ResourceGroupParameter, - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - RoleInstanceInstanceView - >; + /** + * Name of the cloud service. + */ + @path + cloudServiceName: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets a remote desktop file for a role instance in a cloud service. @@ -176,38 +167,29 @@ interface RoleInstances { @operationId("CloudServiceRoleInstances_GetRemoteDesktopFile") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile") @get - getRemoteDesktopFile is Azure.Core.Foundations.Operation< - { - /** - * Name of the role instance. - */ - @path - roleInstanceName: string; - - /** - * Name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * Name of the cloud service. - */ - @path - cloudServiceName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * Accept header - */ - @header - accept: "application/x-rdp"; - }, - void - >; + getRemoteDesktopFile( + ...ApiVersionParameter, + + /** + * Name of the role instance. + */ + @path + roleInstanceName: string, + + ...ResourceGroupParameter, + + /** + * Name of the cloud service. + */ + @path + cloudServiceName: string, + + ...SubscriptionIdParameter, + + /** + * Accept header + */ + @header + accept: "application/x-rdp", + ): ArmResponse | ErrorResponse; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp index 5093fe6e01..3d74286e6e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp @@ -137,13 +137,7 @@ interface VirtualMachines { LocationScope, { ...BaseParameters; - - /** - * The location for which virtual machines under the subscription are queried. - */ - @pattern("^[-\\w\\._]+$") - @path - location: string; + ...LocationResourceParameter; } >; @@ -297,28 +291,18 @@ interface VirtualMachines { // FIXME: VirtualMachines_InstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView") @get - instanceView is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; + instanceView( + ...ApiVersionParameter, + ...ResourceGroupParameter, - /** - * The name of the virtual machine. - */ - @path - vmName: string; + /** + * The name of the virtual machine. + */ + @path + vmName: string, - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - VirtualMachineInstanceView - >; + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Lists all available virtual machine sizes to which the specified virtual machine can be resized. @@ -326,28 +310,18 @@ interface VirtualMachines { // FIXME: VirtualMachines_ListAvailableSizes could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes") @get - listAvailableSizes is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the virtual machine. - */ - @path - vmName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - VirtualMachineSizeListResult - >; + listAvailableSizes( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the virtual machine. + */ + @path + vmName: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } @@encodedName(VirtualMachines.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp index 6118c862ed..738ecf6bce 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp @@ -99,13 +99,7 @@ interface VirtualMachineRunCommands { LocationScope, { ...BaseParameters; - - /** - * The location upon which run commands is queried. - */ - @pattern("^[-\\w\\._]+$") - @path - location: string; + ...LocationResourceParameter; } >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp index 6e5a92db8d..0b0ed92da1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp @@ -154,13 +154,7 @@ interface VirtualMachineScaleSets { LocationScope, { ...BaseParameters; - - /** - * The location for which VM scale sets under the subscription are queried. - */ - @pattern("^[-\\w\\._]+$") - @path - location: string; + ...LocationResourceParameter; } >; @@ -523,28 +517,18 @@ interface VirtualMachineScaleSets { // FIXME: VirtualMachineScaleSets_GetInstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView") @get - getInstanceView is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; + getInstanceView( + ...ApiVersionParameter, + ...ResourceGroupParameter, - /** - * The name of the VM scale set. - */ - @path - vmScaleSetName: string; + /** + * The name of the VM scale set. + */ + @path + vmScaleSetName: string, - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - VirtualMachineScaleSetInstanceView - >; + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU. @@ -552,28 +536,18 @@ interface VirtualMachineScaleSets { // FIXME: VirtualMachineScaleSets_ListSkus could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus") @get - listSkus is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; + listSkus( + ...ApiVersionParameter, + ...ResourceGroupParameter, - /** - * The name of the VM scale set. - */ - @path - vmScaleSetName: string; + /** + * The name of the VM scale set. + */ + @path + vmScaleSetName: string, - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - VirtualMachineScaleSetListSkusResult - >; + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets list of OS upgrades on a VM scale set instance. @@ -583,28 +557,18 @@ interface VirtualMachineScaleSets { @operationId("VirtualMachineScaleSets_GetOSUpgradeHistory") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory") @get - getOSUpgradeHistory is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the VM scale set. - */ - @path - vmScaleSetName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - VirtualMachineScaleSetListOSUpgradeHistory - >; + getOSUpgradeHistory( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the VM scale set. + */ + @path + vmScaleSetName: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } @@encodedName(VirtualMachineScaleSets.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp index ce6adc87e5..48e7e669de 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp @@ -407,34 +407,24 @@ interface VirtualMachineScaleSetVMS { @operationId("VirtualMachineScaleSetVMs_GetInstanceView") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/instanceView") @get - getInstanceView is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the VM scale set. - */ - @path - vmScaleSetName: string; - - /** - * The instance ID of the virtual machine. - */ - @path - instanceId: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - VirtualMachineScaleSetVMInstanceView - >; + getInstanceView( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the VM scale set. + */ + @path + vmScaleSetName: string, + + /** + * The instance ID of the virtual machine. + */ + @path + instanceId: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } @@encodedName(VirtualMachineScaleSetVMS.update::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp index 503adc9526..0f39b40a74 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp @@ -1,3 +1,5 @@ +// FIXME: Operations in this file are not detected as a resource operation, please confirm the conversion result manually + import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; @@ -15,23 +17,11 @@ interface UsageOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The location for which resource usage is queried. - */ - @pattern("^[-\\w\\._]+$") - @path - location: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - ListUsagesResult - >; + list( + ...ApiVersionParameter, + ...LocationResourceParameter, + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface VirtualMachineSizesOperations { @@ -40,23 +30,11 @@ interface VirtualMachineSizesOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The location upon which virtual-machine-sizes is queried. - */ - @pattern("^[-\\w\\._]+$") - @path - location: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - VirtualMachineSizeListResult - >; + list( + ...ApiVersionParameter, + ...LocationResourceParameter, + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface VirtualMachineImagesOperations { @@ -65,210 +43,149 @@ interface VirtualMachineImagesOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The name of a supported Azure region. - */ - @path - location: string; - - /** - * A valid image publisher. - */ - @path - publisherName: string; - - /** - * A valid image publisher offer. - */ - @path - offer: string; - - /** - * A valid image SKU. - */ - @path - skus: string; - - /** - * A valid image SKU version. - */ - @path - version: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - VirtualMachineImage - >; + get( + ...ApiVersionParameter, + ...LocationResourceParameter, + + /** + * A valid image publisher. + */ + @path + publisherName: string, + + /** + * A valid image publisher offer. + */ + @path + offer: string, + + /** + * A valid image SKU. + */ + @path + skus: string, + + /** + * A valid image SKU version. + */ + @path + version: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU. */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The name of a supported Azure region. - */ - @path - location: string; - - /** - * A valid image publisher. - */ - @path - publisherName: string; - - /** - * A valid image publisher offer. - */ - @path - offer: string; - - /** - * A valid image SKU. - */ - @path - skus: string; - - /** - * The expand expression to apply on the operation. - */ - @query("$expand") - $expand?: string; - - @query("$top") - $top?: int32; - - @query("$orderby") - $orderby?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + list( + ...ApiVersionParameter, + ...LocationResourceParameter, + + /** + * A valid image publisher. + */ + @path + publisherName: string, + + /** + * A valid image publisher offer. + */ + @path + offer: string, + + /** + * A valid image SKU. + */ + @path + skus: string, + + /** + * The expand expression to apply on the operation. + */ + @query("$expand") + $expand?: string, + + @query("$top") + $top?: int32, + + @query("$orderby") + $orderby?: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets a list of virtual machine image offers for the specified location and publisher. */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers") @get - listOffers is Azure.Core.Foundations.Operation< - { - /** - * The name of a supported Azure region. - */ - @path - location: string; - - /** - * A valid image publisher. - */ - @path - publisherName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + listOffers( + ...ApiVersionParameter, + ...LocationResourceParameter, + + /** + * A valid image publisher. + */ + @path + publisherName: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets a list of virtual machine image publishers for the specified Azure location. */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers") @get - listPublishers is Azure.Core.Foundations.Operation< - { - /** - * The name of a supported Azure region. - */ - @path - location: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + listPublishers( + ...ApiVersionParameter, + ...LocationResourceParameter, + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets a list of virtual machine image SKUs for the specified location, publisher, and offer. */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus") @get - listSkus is Azure.Core.Foundations.Operation< - { - /** - * The name of a supported Azure region. - */ - @path - location: string; - - /** - * A valid image publisher. - */ - @path - publisherName: string; - - /** - * A valid image publisher offer. - */ - @path - offer: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + listSkus( + ...ApiVersionParameter, + ...LocationResourceParameter, + + /** + * A valid image publisher. + */ + @path + publisherName: string, + + /** + * A valid image publisher offer. + */ + @path + offer: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets a list of all virtual machine image versions for the specified edge zone */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/vmimages") @get - listByEdgeZone is Azure.Core.Foundations.Operation< - { - /** - * The name of a supported Azure region. - */ - @path - location: string; - - /** - * The name of the edge zone. - */ - @path - edgeZone: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - VmImagesInEdgeZoneListResult - >; + listByEdgeZone( + ...ApiVersionParameter, + ...LocationResourceParameter, + + /** + * The name of the edge zone. + */ + @path + edgeZone: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface VirtualMachineImagesEdgeZoneOperations { @@ -277,218 +194,168 @@ interface VirtualMachineImagesEdgeZoneOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The name of a supported Azure region. - */ - @path - location: string; - - /** - * The name of the edge zone. - */ - @path - edgeZone: string; - - /** - * A valid image publisher. - */ - @path - publisherName: string; - - /** - * A valid image publisher offer. - */ - @path - offer: string; - - /** - * A valid image SKU. - */ - @path - skus: string; - - /** - * A valid image SKU version. - */ - @path - version: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - VirtualMachineImage - >; + get( + ...ApiVersionParameter, + ...LocationResourceParameter, + + /** + * The name of the edge zone. + */ + @path + edgeZone: string, + + /** + * A valid image publisher. + */ + @path + publisherName: string, + + /** + * A valid image publisher offer. + */ + @path + offer: string, + + /** + * A valid image SKU. + */ + @path + skus: string, + + /** + * A valid image SKU version. + */ + @path + version: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets a list of all virtual machine image versions for the specified location, edge zone, publisher, offer, and SKU. */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The name of a supported Azure region. - */ - @path - location: string; - - /** - * The name of the edge zone. - */ - @path - edgeZone: string; - - /** - * A valid image publisher. - */ - @path - publisherName: string; - - /** - * A valid image publisher offer. - */ - @path - offer: string; - - /** - * A valid image SKU. - */ - @path - skus: string; - - /** - * The expand expression to apply on the operation. - */ - @query("$expand") - $expand?: string; - - /** - * An integer value specifying the number of images to return that matches supplied values. - */ - @query("$top") - $top?: int32; - - /** - * Specifies the order of the results returned. Formatted as an OData query. - */ - @query("$orderby") - $orderby?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + list( + ...ApiVersionParameter, + ...LocationResourceParameter, + + /** + * The name of the edge zone. + */ + @path + edgeZone: string, + + /** + * A valid image publisher. + */ + @path + publisherName: string, + + /** + * A valid image publisher offer. + */ + @path + offer: string, + + /** + * A valid image SKU. + */ + @path + skus: string, + + /** + * The expand expression to apply on the operation. + */ + @query("$expand") + $expand?: string, + + /** + * An integer value specifying the number of images to return that matches supplied values. + */ + @query("$top") + $top?: int32, + + /** + * Specifies the order of the results returned. Formatted as an OData query. + */ + @query("$orderby") + $orderby?: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets a list of virtual machine image offers for the specified location, edge zone and publisher. */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers") @get - listOffers is Azure.Core.Foundations.Operation< - { - /** - * The name of a supported Azure region. - */ - @path - location: string; - - /** - * The name of the edge zone. - */ - @path - edgeZone: string; - - /** - * A valid image publisher. - */ - @path - publisherName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + listOffers( + ...ApiVersionParameter, + ...LocationResourceParameter, + + /** + * The name of the edge zone. + */ + @path + edgeZone: string, + + /** + * A valid image publisher. + */ + @path + publisherName: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets a list of virtual machine image publishers for the specified Azure location and edge zone. */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers") @get - listPublishers is Azure.Core.Foundations.Operation< - { - /** - * The name of a supported Azure region. - */ - @path - location: string; - - /** - * The name of the edge zone. - */ - @path - edgeZone: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + listPublishers( + ...ApiVersionParameter, + ...LocationResourceParameter, + + /** + * The name of the edge zone. + */ + @path + edgeZone: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; /** * Gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and offer. */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus") @get - listSkus is Azure.Core.Foundations.Operation< - { - /** - * The name of a supported Azure region. - */ - @path - location: string; - - /** - * The name of the edge zone. - */ - @path - edgeZone: string; - - /** - * A valid image publisher. - */ - @path - publisherName: string; - - /** - * A valid image publisher offer. - */ - @path - offer: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + listSkus( + ...ApiVersionParameter, + ...LocationResourceParameter, + + /** + * The name of the edge zone. + */ + @path + edgeZone: string, + + /** + * A valid image publisher. + */ + @path + publisherName: string, + + /** + * A valid image publisher offer. + */ + @path + offer: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface VirtualMachineExtensionImagesOperations { @@ -497,40 +364,30 @@ interface VirtualMachineExtensionImagesOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions") @get - listVersions is Azure.Core.Foundations.Operation< - { - /** - * The name of a supported Azure region. - */ - @path - location: string; - - @path - publisherName: string; - - @path - type: string; - - /** - * The filter to apply on the operation. - */ - @query("$filter") - $filter?: string; - - @query("$top") - $top?: int32; - - @query("$orderby") - $orderby?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - }, - void - >; + listVersions( + ...ApiVersionParameter, + ...LocationResourceParameter, + + @path + publisherName: string, + + @path + type: string, + + /** + * The filter to apply on the operation. + */ + @query("$filter") + $filter?: string, + + @query("$top") + $top?: int32, + + @query("$orderby") + $orderby?: string, + + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface LogAnalyticsOperations { @@ -539,58 +396,34 @@ interface LogAnalyticsOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval") @post - exportRequestRateByInterval is Azure.Core.Foundations.Operation< - { - /** - * The location upon which virtual-machine-sizes is queried. - */ - @pattern("^[-\\w\\._]+$") - @path - location: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * Parameters supplied to the LogAnalytics getRequestRateByInterval Api. - */ - @body - parameters: RequestRateByIntervalInput; - }, - LogAnalyticsOperationResult | void - >; + exportRequestRateByInterval( + ...ApiVersionParameter, + ...LocationResourceParameter, + ...SubscriptionIdParameter, + + /** + * Parameters supplied to the LogAnalytics getRequestRateByInterval Api. + */ + @body + parameters: RequestRateByIntervalInput, + ): ArmResponse | ErrorResponse; /** * Export logs that show total throttled Api requests for this subscription in the given time window. */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests") @post - exportThrottledRequests is Azure.Core.Foundations.Operation< - { - /** - * The location upon which virtual-machine-sizes is queried. - */ - @pattern("^[-\\w\\._]+$") - @path - location: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * Parameters supplied to the LogAnalytics getThrottledRequests Api. - */ - @body - parameters: ThrottledRequestsInput; - }, - LogAnalyticsOperationResult | void - >; + exportThrottledRequests( + ...ApiVersionParameter, + ...LocationResourceParameter, + ...SubscriptionIdParameter, + + /** + * Parameters supplied to the LogAnalytics getThrottledRequests Api. + */ + @body + parameters: ThrottledRequestsInput, + ): ArmResponse | ErrorResponse; } interface VirtualMachineScaleSetVMRunCommandsOperations { @@ -599,248 +432,198 @@ interface VirtualMachineScaleSetVMRunCommandsOperations { */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the VM scale set. - */ - @path - vmScaleSetName: string; - - /** - * The instance ID of the virtual machine. - */ - @path - instanceId: string; - - /** - * The name of the virtual machine run command. - */ - @path - runCommandName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * Parameters supplied to the Create Virtual Machine RunCommand operation. - */ - @body - runCommand: VirtualMachineRunCommand; - - /** - * Accept header - */ - @header - accept: "application/json, text/json"; - }, - VirtualMachineRunCommand - >; + createOrUpdate( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the VM scale set. + */ + @path + vmScaleSetName: string, + + /** + * The instance ID of the virtual machine. + */ + @path + instanceId: string, + + /** + * The name of the virtual machine run command. + */ + @path + runCommandName: string, + + ...SubscriptionIdParameter, + + /** + * Parameters supplied to the Create Virtual Machine RunCommand operation. + */ + @body + runCommand: VirtualMachineRunCommand, + + /** + * Accept header + */ + @header + accept: "application/json, text/json", + ): ArmResponse | ErrorResponse; /** * The operation to update the VMSS VM run command. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") @patch - update is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the VM scale set. - */ - @path - vmScaleSetName: string; - - /** - * The instance ID of the virtual machine. - */ - @path - instanceId: string; - - /** - * The name of the virtual machine run command. - */ - @path - runCommandName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * Parameters supplied to the Update Virtual Machine RunCommand operation. - */ - @body - runCommand: VirtualMachineRunCommandUpdate; - - /** - * Accept header - */ - @header - accept: "application/json, text/json"; - }, - VirtualMachineRunCommand - >; + update( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the VM scale set. + */ + @path + vmScaleSetName: string, + + /** + * The instance ID of the virtual machine. + */ + @path + instanceId: string, + + /** + * The name of the virtual machine run command. + */ + @path + runCommandName: string, + + ...SubscriptionIdParameter, + + /** + * Parameters supplied to the Update Virtual Machine RunCommand operation. + */ + @body + runCommand: VirtualMachineRunCommandUpdate, + + /** + * Accept header + */ + @header + accept: "application/json, text/json", + ): ArmResponse | ErrorResponse; /** * The operation to delete the VMSS VM run command. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the VM scale set. - */ - @path - vmScaleSetName: string; - - /** - * The instance ID of the virtual machine. - */ - @path - instanceId: string; - - /** - * The name of the virtual machine run command. - */ - @path - runCommandName: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * Accept header - */ - @header - accept: "application/json, text/json"; - }, - void - >; + delete( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the VM scale set. + */ + @path + vmScaleSetName: string, + + /** + * The instance ID of the virtual machine. + */ + @path + instanceId: string, + + /** + * The name of the virtual machine run command. + */ + @path + runCommandName: string, + + ...SubscriptionIdParameter, + + /** + * Accept header + */ + @header + accept: "application/json, text/json", + ): ArmResponse | ErrorResponse; /** * The operation to get the VMSS VM run command. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the VM scale set. - */ - @path - vmScaleSetName: string; - - /** - * The instance ID of the virtual machine. - */ - @path - instanceId: string; - - /** - * The name of the virtual machine run command. - */ - @path - runCommandName: string; - - /** - * The expand expression to apply on the operation. - */ - @query("$expand") - $expand?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * Accept header - */ - @header - accept: "application/json, text/json"; - }, - VirtualMachineRunCommand - >; + get( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the VM scale set. + */ + @path + vmScaleSetName: string, + + /** + * The instance ID of the virtual machine. + */ + @path + instanceId: string, + + /** + * The name of the virtual machine run command. + */ + @path + runCommandName: string, + + /** + * The expand expression to apply on the operation. + */ + @query("$expand") + $expand?: string, + + ...SubscriptionIdParameter, + + /** + * Accept header + */ + @header + accept: "application/json, text/json", + ): ArmResponse | ErrorResponse; /** * The operation to get all run commands of an instance in Virtual Machine Scaleset. */ @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the VM scale set. - */ - @path - vmScaleSetName: string; - - /** - * The instance ID of the virtual machine. - */ - @path - instanceId: string; - - /** - * The expand expression to apply on the operation. - */ - @query("$expand") - $expand?: string; - - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * Accept header - */ - @header - accept: "application/json, text/json"; - }, - ResourceListResult - >; + list( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the VM scale set. + */ + @path + vmScaleSetName: string, + + /** + * The instance ID of the virtual machine. + */ + @path + instanceId: string, + + /** + * The expand expression to apply on the operation. + */ + @query("$expand") + $expand?: string, + + ...SubscriptionIdParameter, + + /** + * Accept header + */ + @header + accept: "application/json, text/json", + ): ArmResponse> | ErrorResponse; } interface ResourceSkusOperations { @@ -849,26 +632,20 @@ interface ResourceSkusOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus") @get - list is Azure.Core.Foundations.Operation< - { - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - subscriptionId: string; - - /** - * The filter to apply on the operation. Only **location** filter is supported currently. - */ - @query("$filter") - $filter?: string; - - /** - * To Include Extended Locations information or not in the response. - */ - @query("includeExtendedLocations") - includeExtendedLocations?: string; - }, - ResourceSkusResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + + /** + * The filter to apply on the operation. Only **location** filter is supported currently. + */ + @query("$filter") + $filter?: string, + + /** + * To Include Extended Locations information or not in the response. + */ + @query("includeExtendedLocations") + includeExtendedLocations?: string, + ): ArmResponse | ErrorResponse; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp index 245d3e2ab9..fd036f7a42 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp @@ -143,40 +143,30 @@ interface DnsZones { @operationId("RecordSets_ListByDnsZone") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/recordsets") @get - listByDnsZone is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group. - */ - @path - resourceGroupName: string; - - /** - * The name of the DNS zone (without a terminating dot). - */ - @path - zoneName: string; - - /** - * The maximum number of record sets to return. If not specified, returns up to 100 record sets. - */ - @query("$top") - $top?: int32; - - /** - * The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with . - */ - @query("$recordsetnamesuffix") - $recordsetnamesuffix?: string; - - /** - * Specifies the Azure subscription ID, which uniquely identifies the Microsoft Azure subscription. - */ - @path - subscriptionId: string; - }, - ResourceListResult - >; + listByDnsZone( + ...ApiVersionParameter, + ...ResourceGroupParameter, + + /** + * The name of the DNS zone (without a terminating dot). + */ + @path + zoneName: string, + + /** + * The maximum number of record sets to return. If not specified, returns up to 100 record sets. + */ + @query("$top") + $top?: int32, + + /** + * The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with . + */ + @query("$recordsetnamesuffix") + $recordsetnamesuffix?: string, + + ...SubscriptionIdParameter, + ): ArmResponse> | ErrorResponse; } @@encodedName(DnsZones.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp index f563c86d36..d4ca43ba30 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp @@ -1,3 +1,5 @@ +// FIXME: Operations in this file are not detected as a resource operation, please confirm the conversion result manually + import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; @@ -15,20 +17,14 @@ interface DnsResourceReferenceOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Network/getDnsResourceReference") @post - getByTargetResources is Azure.Core.Foundations.Operation< - { - /** - * Specifies the Azure subscription ID, which uniquely identifies the Microsoft Azure subscription. - */ - @path - subscriptionId: string; + getByTargetResources( + ...ApiVersionParameter, + ...SubscriptionIdParameter, - /** - * Properties for dns resource reference request. - */ - @body - parameters: DnsResourceReferenceRequest; - }, - DnsResourceReferenceResult - >; + /** + * Properties for dns resource reference request. + */ + @body + parameters: DnsResourceReferenceRequest, + ): ArmResponse | ErrorResponse; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp index cbe509ed5e..01a6f4e0f9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp @@ -127,56 +127,42 @@ interface OnlineDeploymentTrackedResources { @summary("List Inference Endpoint Deployment Skus.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus") @get - listSkus is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Inference endpoint name. - */ - @path - endpointName: string; - - /** - * Inference Endpoint Deployment name. - */ - @path - deploymentName: string; - - /** - * Number of Skus to be retrieved in a page of results. - */ - @query("count") - count?: int32; - - /** - * Continuation token for pagination. - */ - @query("$skip") - $skip?: string; - }, - SkuResourceArmPaginatedResult - >; + listSkus( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Inference endpoint name. + */ + @path + endpointName: string, + + /** + * Inference Endpoint Deployment name. + */ + @path + deploymentName: string, + + /** + * Number of Skus to be retrieved in a page of results. + */ + @query("count") + count?: int32, + + /** + * Continuation token for pagination. + */ + @query("$skip") + $skip?: string, + ): ArmResponse | ErrorResponse; } @@encodedName(OnlineDeploymentTrackedResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp index 2e9467dedc..7f56f861af 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp @@ -178,32 +178,18 @@ interface Workspaces { @operationId("WorkspaceFeatures_List") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - }, - ListAmlUserFeatureResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + ): ArmResponse | ErrorResponse; /** * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. @@ -212,32 +198,18 @@ interface Workspaces { @summary("Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") @get - listOutboundNetworkDependenciesEndpoints is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - }, - ExternalFqdnResponse - >; + listOutboundNetworkDependenciesEndpoints( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + ): ArmResponse | ErrorResponse; /** * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. @@ -258,32 +230,18 @@ Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds" """) @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - }, - PrivateLinkResourceListResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + ): ArmResponse | ErrorResponse; } @@encodedName(Workspaces.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp index 81dcb18a42..23b807fd58 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp @@ -1,3 +1,5 @@ +// FIXME: Operations in this file are not detected as a resource operation, please confirm the conversion result manually + import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; @@ -15,24 +17,11 @@ interface UsagesOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The location for which resource usage is queried. - */ - @pattern("^[-\\w\\._]+$") - @path - location: string; - }, - ListUsagesResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...LocationResourceParameter, + ): ArmResponse | ErrorResponse; } interface VirtualMachineSizesOperations { @@ -41,24 +30,11 @@ interface VirtualMachineSizesOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The location upon which virtual-machine-sizes is queried. - */ - @pattern("^[-\\w\\._]+$") - @path - location: string; - - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - }, - VirtualMachineSizeListResult - >; + list( + ...ApiVersionParameter, + ...LocationResourceParameter, + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface QuotasOperations { @@ -67,54 +43,28 @@ interface QuotasOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas") @post - update is Azure.Core.Foundations.Operation< - { - /** - * The location for update quota is queried. - */ - @pattern("^[-\\w\\._]+$") - @path - location: string; - - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * Quota update parameters. - */ - @body - parameters: QuotaUpdateParameters; - }, - UpdateWorkspaceQuotasResult - >; + update( + ...ApiVersionParameter, + ...LocationResourceParameter, + ...SubscriptionIdParameter, + + /** + * Quota update parameters. + */ + @body + parameters: QuotaUpdateParameters, + ): ArmResponse | ErrorResponse; /** * Gets the currently assigned Workspace Quotas based on VMFamily. */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The location for which resource usage is queried. - */ - @pattern("^[-\\w\\._]+$") - @path - location: string; - }, - ListWorkspaceQuotas - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...LocationResourceParameter, + ): ArmResponse | ErrorResponse; } interface CodeContainersOperations { @@ -124,38 +74,24 @@ interface CodeContainersOperations { @summary("List containers.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Continuation token for pagination. - */ - @query("$skip") - $skip?: string; - }, - ResourceListResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Continuation token for pagination. + */ + @query("$skip") + $skip?: string, + ): ArmResponse> | ErrorResponse; /** * Delete container. @@ -163,38 +99,24 @@ interface CodeContainersOperations { @summary("Delete container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @path - name: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @path + name: string, + ): ArmResponse | ErrorResponse; /** * Get container. @@ -202,38 +124,24 @@ interface CodeContainersOperations { @summary("Get container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @path - name: string; - }, - CodeContainerResource - >; + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @path + name: string, + ): ArmResponse | ErrorResponse; /** * Create or update container. @@ -241,45 +149,31 @@ interface CodeContainersOperations { @summary("Create or update container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - name: string; - - /** - * Container entity to create or update. - */ - @body - body: CodeContainerResource; - }, - CodeContainerResource - >; + createOrUpdate( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string, + + /** + * Container entity to create or update. + */ + @body + body: CodeContainerResource, + ): ArmResponse | ErrorResponse; } interface CodeVersionsOperations { @@ -289,68 +183,54 @@ interface CodeVersionsOperations { @summary("List versions.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @path - name: string; - - /** - * Ordering of list. - */ - @query("$orderBy") - $orderBy?: string; - - /** - * Maximum number of records to return. - */ - @query("$top") - $top?: int32; - - /** - * Continuation token for pagination. - */ - @query("$skip") - $skip?: string; - - /** - * If specified, return CodeVersion assets with specified content hash value, regardless of name - */ - @query("hash") - hash?: string; - - /** - * Hash algorithm version when listing by hash - */ - @query("hashVersion") - hashVersion?: string; - }, - ResourceListResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @path + name: string, + + /** + * Ordering of list. + */ + @query("$orderBy") + $orderBy?: string, + + /** + * Maximum number of records to return. + */ + @query("$top") + $top?: int32, + + /** + * Continuation token for pagination. + */ + @query("$skip") + $skip?: string, + + /** + * If specified, return CodeVersion assets with specified content hash value, regardless of name + */ + @query("hash") + hash?: string, + + /** + * Hash algorithm version when listing by hash + */ + @query("hashVersion") + hashVersion?: string, + ): ArmResponse> | ErrorResponse; /** * Delete version. @@ -358,44 +238,30 @@ interface CodeVersionsOperations { @summary("Delete version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @path - name: string; - - /** - * Version identifier. This is case-sensitive. - */ - @path - version: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @path + name: string, + + /** + * Version identifier. This is case-sensitive. + */ + @path + version: string, + ): ArmResponse | ErrorResponse; /** * Get version. @@ -403,44 +269,30 @@ interface CodeVersionsOperations { @summary("Get version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @path - name: string; - - /** - * Version identifier. This is case-sensitive. - */ - @path - version: string; - }, - CodeVersionResource - >; + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @path + name: string, + + /** + * Version identifier. This is case-sensitive. + */ + @path + version: string, + ): ArmResponse | ErrorResponse; /** * Create or update version. @@ -448,51 +300,37 @@ interface CodeVersionsOperations { @summary("Create or update version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - name: string; - - /** - * Version identifier. This is case-sensitive. - */ - @path - version: string; - - /** - * Version entity to create or update. - */ - @body - body: CodeVersionResource; - }, - CodeVersionResource - >; + createOrUpdate( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string, + + /** + * Version identifier. This is case-sensitive. + */ + @path + version: string, + + /** + * Version entity to create or update. + */ + @body + body: CodeVersionResource, + ): ArmResponse | ErrorResponse; /** * Generate a storage location and credential for the client to upload a code asset to. @@ -500,50 +338,36 @@ interface CodeVersionsOperations { @summary("Generate a storage location and credential for the client to upload a code asset to.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/startPendingUpload") @post - createOrGetStartPendingUpload is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @path - name: string; - - /** - * Version identifier. This is case-sensitive. - */ - @path - version: string; - - /** - * Pending upload request object - */ - @body - body: PendingUploadRequestDto; - }, - PendingUploadResponseDto - >; + createOrGetStartPendingUpload( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @path + name: string, + + /** + * Version identifier. This is case-sensitive. + */ + @path + version: string, + + /** + * Pending upload request object + */ + @body + body: PendingUploadRequestDto, + ): ArmResponse | ErrorResponse; } interface ComponentContainersOperations { @@ -553,44 +377,30 @@ interface ComponentContainersOperations { @summary("List component containers.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Continuation token for pagination. - */ - @query("$skip") - $skip?: string; - - /** - * View type for including/excluding (for example) archived entities. - */ - @query("listViewType") - listViewType?: ListViewType; - }, - ResourceListResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Continuation token for pagination. + */ + @query("$skip") + $skip?: string, + + /** + * View type for including/excluding (for example) archived entities. + */ + @query("listViewType") + listViewType?: ListViewType, + ): ArmResponse> | ErrorResponse; /** * Delete container. @@ -598,38 +408,24 @@ interface ComponentContainersOperations { @summary("Delete container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. - */ - @path - name: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. + */ + @path + name: string, + ): ArmResponse | ErrorResponse; /** * Get container. @@ -637,38 +433,24 @@ interface ComponentContainersOperations { @summary("Get container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. - */ - @path - name: string; - }, - ComponentContainerResource - >; + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. + */ + @path + name: string, + ): ArmResponse | ErrorResponse; /** * Create or update container. @@ -676,45 +458,31 @@ interface ComponentContainersOperations { @summary("Create or update container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - name: string; - - /** - * Container entity to create or update. - */ - @body - body: ComponentContainerResource; - }, - ComponentContainerResource - >; + createOrUpdate( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string, + + /** + * Container entity to create or update. + */ + @body + body: ComponentContainerResource, + ): ArmResponse | ErrorResponse; } interface ComponentVersionsOperations { @@ -724,68 +492,54 @@ interface ComponentVersionsOperations { @summary("List component versions.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Component name. - */ - @path - name: string; - - /** - * Ordering of list. - */ - @query("$orderBy") - $orderBy?: string; - - /** - * Maximum number of records to return. - */ - @query("$top") - $top?: int32; - - /** - * Continuation token for pagination. - */ - @query("$skip") - $skip?: string; - - /** - * View type for including/excluding (for example) archived entities. - */ - @query("listViewType") - listViewType?: ListViewType; - - /** - * Component stage. - */ - @query("stage") - stage?: string; - }, - ResourceListResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Component name. + */ + @path + name: string, + + /** + * Ordering of list. + */ + @query("$orderBy") + $orderBy?: string, + + /** + * Maximum number of records to return. + */ + @query("$top") + $top?: int32, + + /** + * Continuation token for pagination. + */ + @query("$skip") + $skip?: string, + + /** + * View type for including/excluding (for example) archived entities. + */ + @query("listViewType") + listViewType?: ListViewType, + + /** + * Component stage. + */ + @query("stage") + stage?: string, + ): ArmResponse> | ErrorResponse; /** * Delete version. @@ -793,44 +547,30 @@ interface ComponentVersionsOperations { @summary("Delete version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. - */ - @path - name: string; - - /** - * Version identifier. - */ - @path - version: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. + */ + @path + name: string, + + /** + * Version identifier. + */ + @path + version: string, + ): ArmResponse | ErrorResponse; /** * Get version. @@ -838,44 +578,30 @@ interface ComponentVersionsOperations { @summary("Get version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. - */ - @path - name: string; - - /** - * Version identifier. - */ - @path - version: string; - }, - ComponentVersionResource - >; + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. + */ + @path + name: string, + + /** + * Version identifier. + */ + @path + version: string, + ): ArmResponse | ErrorResponse; /** * Create or update version. @@ -883,51 +609,37 @@ interface ComponentVersionsOperations { @summary("Create or update version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - name: string; - - /** - * Version identifier. - */ - @path - version: string; - - /** - * Version entity to create or update. - */ - @body - body: ComponentVersionResource; - }, - ComponentVersionResource - >; + createOrUpdate( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string, + + /** + * Version identifier. + */ + @path + version: string, + + /** + * Version entity to create or update. + */ + @body + body: ComponentVersionResource, + ): ArmResponse | ErrorResponse; } interface DataContainersOperations { @@ -937,44 +649,30 @@ interface DataContainersOperations { @summary("List data containers.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Continuation token for pagination. - */ - @query("$skip") - $skip?: string; - - /** - * View type for including/excluding (for example) archived entities. - */ - @query("listViewType") - listViewType?: ListViewType; - }, - ResourceListResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Continuation token for pagination. + */ + @query("$skip") + $skip?: string, + + /** + * View type for including/excluding (for example) archived entities. + */ + @query("listViewType") + listViewType?: ListViewType, + ): ArmResponse> | ErrorResponse; /** * Delete container. @@ -982,38 +680,24 @@ interface DataContainersOperations { @summary("Delete container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. - */ - @path - name: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. + */ + @path + name: string, + ): ArmResponse | ErrorResponse; /** * Get container. @@ -1021,38 +705,24 @@ interface DataContainersOperations { @summary("Get container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. - */ - @path - name: string; - }, - DataContainerResource - >; + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. + */ + @path + name: string, + ): ArmResponse | ErrorResponse; /** * Create or update container. @@ -1060,45 +730,31 @@ interface DataContainersOperations { @summary("Create or update container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - name: string; - - /** - * Container entity to create or update. - */ - @body - body: DataContainerResource; - }, - DataContainerResource - >; + createOrUpdate( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string, + + /** + * Container entity to create or update. + */ + @body + body: DataContainerResource, + ): ArmResponse | ErrorResponse; } interface DataVersionsOperations { @@ -1108,75 +764,61 @@ interface DataVersionsOperations { @summary("List data versions in the data container") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Data container's name - */ - @path - name: string; - - /** - * Please choose OrderBy value from ['createdtime', 'modifiedtime'] - */ - @query("$orderBy") - $orderBy?: string; - - /** - * Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned - */ - @query("$top") - $top?: int32; - - /** - * Continuation token for pagination. - */ - @query("$skip") - $skip?: string; - - /** - * Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 - */ - @query("$tags") - $tags?: string; - - /** - * [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. - */ - @query("listViewType") - listViewType?: ListViewType; - - /** - * data stage - */ - @query("stage") - stage?: string; - }, - ResourceListResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Data container's name + */ + @path + name: string, + + /** + * Please choose OrderBy value from ['createdtime', 'modifiedtime'] + */ + @query("$orderBy") + $orderBy?: string, + + /** + * Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned + */ + @query("$top") + $top?: int32, + + /** + * Continuation token for pagination. + */ + @query("$skip") + $skip?: string, + + /** + * Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + */ + @query("$tags") + $tags?: string, + + /** + * [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + */ + @query("listViewType") + listViewType?: ListViewType, + + /** + * data stage + */ + @query("stage") + stage?: string, + ): ArmResponse> | ErrorResponse; /** * Delete version. @@ -1184,44 +826,30 @@ interface DataVersionsOperations { @summary("Delete version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. - */ - @path - name: string; - - /** - * Version identifier. - */ - @path - version: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. + */ + @path + name: string, + + /** + * Version identifier. + */ + @path + version: string, + ): ArmResponse | ErrorResponse; /** * Get version. @@ -1229,44 +857,30 @@ interface DataVersionsOperations { @summary("Get version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. - */ - @path - name: string; - - /** - * Version identifier. - */ - @path - version: string; - }, - DataVersionBaseResource - >; + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. + */ + @path + name: string, + + /** + * Version identifier. + */ + @path + version: string, + ): ArmResponse | ErrorResponse; /** * Create or update version. @@ -1274,51 +888,37 @@ interface DataVersionsOperations { @summary("Create or update version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - name: string; - - /** - * Version identifier. - */ - @path - version: string; - - /** - * Version entity to create or update. - */ - @body - body: DataVersionBaseResource; - }, - DataVersionBaseResource - >; + createOrUpdate( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string, + + /** + * Version identifier. + */ + @path + version: string, + + /** + * Version entity to create or update. + */ + @body + body: DataVersionBaseResource, + ): ArmResponse | ErrorResponse; } interface EnvironmentContainersOperations { @@ -1328,44 +928,30 @@ interface EnvironmentContainersOperations { @summary("List environment containers.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Continuation token for pagination. - */ - @query("$skip") - $skip?: string; - - /** - * View type for including/excluding (for example) archived entities. - */ - @query("listViewType") - listViewType?: ListViewType; - }, - ResourceListResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Continuation token for pagination. + */ + @query("$skip") + $skip?: string, + + /** + * View type for including/excluding (for example) archived entities. + */ + @query("listViewType") + listViewType?: ListViewType, + ): ArmResponse> | ErrorResponse; /** * Delete container. @@ -1373,38 +959,24 @@ interface EnvironmentContainersOperations { @summary("Delete container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @path - name: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @path + name: string, + ): ArmResponse | ErrorResponse; /** * Get container. @@ -1412,38 +984,24 @@ interface EnvironmentContainersOperations { @summary("Get container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @path - name: string; - }, - EnvironmentContainerResource - >; + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @path + name: string, + ): ArmResponse | ErrorResponse; /** * Create or update container. @@ -1451,45 +1009,31 @@ interface EnvironmentContainersOperations { @summary("Create or update container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - name: string; - - /** - * Container entity to create or update. - */ - @body - body: EnvironmentContainerResource; - }, - EnvironmentContainerResource - >; + createOrUpdate( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string, + + /** + * Container entity to create or update. + */ + @body + body: EnvironmentContainerResource, + ): ArmResponse | ErrorResponse; } interface EnvironmentVersionsOperations { @@ -1499,68 +1043,54 @@ interface EnvironmentVersionsOperations { @summary("List versions.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @path - name: string; - - /** - * Ordering of list. - */ - @query("$orderBy") - $orderBy?: string; - - /** - * Maximum number of records to return. - */ - @query("$top") - $top?: int32; - - /** - * Continuation token for pagination. - */ - @query("$skip") - $skip?: string; - - /** - * View type for including/excluding (for example) archived entities. - */ - @query("listViewType") - listViewType?: ListViewType; - - /** - * Stage for including/excluding (for example) archived entities. Takes priority over listViewType - */ - @query("stage") - stage?: string; - }, - ResourceListResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @path + name: string, + + /** + * Ordering of list. + */ + @query("$orderBy") + $orderBy?: string, + + /** + * Maximum number of records to return. + */ + @query("$top") + $top?: int32, + + /** + * Continuation token for pagination. + */ + @query("$skip") + $skip?: string, + + /** + * View type for including/excluding (for example) archived entities. + */ + @query("listViewType") + listViewType?: ListViewType, + + /** + * Stage for including/excluding (for example) archived entities. Takes priority over listViewType + */ + @query("stage") + stage?: string, + ): ArmResponse> | ErrorResponse; /** * Delete version. @@ -1568,44 +1098,30 @@ interface EnvironmentVersionsOperations { @summary("Delete version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @path - name: string; - - /** - * Version identifier. This is case-sensitive. - */ - @path - version: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @path + name: string, + + /** + * Version identifier. This is case-sensitive. + */ + @path + version: string, + ): ArmResponse | ErrorResponse; /** * Get version. @@ -1613,44 +1129,30 @@ interface EnvironmentVersionsOperations { @summary("Get version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @path - name: string; - - /** - * Version identifier. This is case-sensitive. - */ - @path - version: string; - }, - EnvironmentVersionResource - >; + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @path + name: string, + + /** + * Version identifier. This is case-sensitive. + */ + @path + version: string, + ): ArmResponse | ErrorResponse; /** * Creates or updates an EnvironmentVersion. @@ -1658,51 +1160,37 @@ interface EnvironmentVersionsOperations { @summary("Creates or updates an EnvironmentVersion.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Name of EnvironmentVersion. This is case-sensitive. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - name: string; - - /** - * Version of EnvironmentVersion. - */ - @path - version: string; - - /** - * Definition of EnvironmentVersion. - */ - @body - body: EnvironmentVersionResource; - }, - EnvironmentVersionResource - >; + createOrUpdate( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Name of EnvironmentVersion. This is case-sensitive. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string, + + /** + * Version of EnvironmentVersion. + */ + @path + version: string, + + /** + * Definition of EnvironmentVersion. + */ + @body + body: EnvironmentVersionResource, + ): ArmResponse | ErrorResponse; } interface ModelContainersOperations { @@ -1712,50 +1200,36 @@ interface ModelContainersOperations { @summary("List model containers.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Continuation token for pagination. - */ - @query("$skip") - $skip?: string; - - /** - * Maximum number of results to return. - */ - @query("count") - count?: int32; - - /** - * View type for including/excluding (for example) archived entities. - */ - @query("listViewType") - listViewType?: ListViewType; - }, - ResourceListResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Continuation token for pagination. + */ + @query("$skip") + $skip?: string, + + /** + * Maximum number of results to return. + */ + @query("count") + count?: int32, + + /** + * View type for including/excluding (for example) archived entities. + */ + @query("listViewType") + listViewType?: ListViewType, + ): ArmResponse> | ErrorResponse; /** * Delete container. @@ -1763,38 +1237,24 @@ interface ModelContainersOperations { @summary("Delete container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @path - name: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @path + name: string, + ): ArmResponse | ErrorResponse; /** * Get container. @@ -1802,38 +1262,24 @@ interface ModelContainersOperations { @summary("Get container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @path - name: string; - }, - ModelContainerResource - >; + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @path + name: string, + ): ArmResponse | ErrorResponse; /** * Create or update container. @@ -1841,45 +1287,31 @@ interface ModelContainersOperations { @summary("Create or update container.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - name: string; - - /** - * Container entity to create or update. - */ - @body - body: ModelContainerResource; - }, - ModelContainerResource - >; + createOrUpdate( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string, + + /** + * Container entity to create or update. + */ + @body + body: ModelContainerResource, + ): ArmResponse | ErrorResponse; } interface ModelVersionsOperations { @@ -1889,104 +1321,90 @@ interface ModelVersionsOperations { @summary("List model versions.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Model name. This is case-sensitive. - */ - @path - name: string; - - /** - * Continuation token for pagination. - */ - @query("$skip") - $skip?: string; - - /** - * Ordering of list. - */ - @query("$orderBy") - $orderBy?: string; - - /** - * Maximum number of records to return. - */ - @query("$top") - $top?: int32; - - /** - * Model version. - */ - @query("version") - version?: string; - - /** - * Model description. - */ - @query("description") - description?: string; - - /** - * Number of initial results to skip. - */ - @query("offset") - offset?: int32; - - /** - * Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 - */ - @query("tags") - tags?: string; - - /** - * Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2 - */ - @query("properties") - properties?: string; - - /** - * Name of the feed. - */ - @query("feed") - feed?: string; - - /** - * View type for including/excluding (for example) archived entities. - */ - @query("listViewType") - listViewType?: ListViewType; - - /** - * Model stage - */ - @query("stage") - stage?: string; - }, - ResourceListResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Model name. This is case-sensitive. + */ + @path + name: string, + + /** + * Continuation token for pagination. + */ + @query("$skip") + $skip?: string, + + /** + * Ordering of list. + */ + @query("$orderBy") + $orderBy?: string, + + /** + * Maximum number of records to return. + */ + @query("$top") + $top?: int32, + + /** + * Model version. + */ + @query("version") + version?: string, + + /** + * Model description. + */ + @query("description") + description?: string, + + /** + * Number of initial results to skip. + */ + @query("offset") + offset?: int32, + + /** + * Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2 + */ + @query("tags") + tags?: string, + + /** + * Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2 + */ + @query("properties") + properties?: string, + + /** + * Name of the feed. + */ + @query("feed") + feed?: string, + + /** + * View type for including/excluding (for example) archived entities. + */ + @query("listViewType") + listViewType?: ListViewType, + + /** + * Model stage + */ + @query("stage") + stage?: string, + ): ArmResponse> | ErrorResponse; /** * Delete version. @@ -1994,44 +1412,30 @@ interface ModelVersionsOperations { @summary("Delete version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") @delete - delete is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @path - name: string; - - /** - * Version identifier. This is case-sensitive. - */ - @path - version: string; - }, - void - >; + delete( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @path + name: string, + + /** + * Version identifier. This is case-sensitive. + */ + @path + version: string, + ): ArmResponse | ErrorResponse; /** * Get version. @@ -2039,44 +1443,30 @@ interface ModelVersionsOperations { @summary("Get version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") @get - get is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @path - name: string; - - /** - * Version identifier. This is case-sensitive. - */ - @path - version: string; - }, - ModelVersionResource - >; + get( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @path + name: string, + + /** + * Version identifier. This is case-sensitive. + */ + @path + version: string, + ): ArmResponse | ErrorResponse; /** * Create or update version. @@ -2084,51 +1474,37 @@ interface ModelVersionsOperations { @summary("Create or update version.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") @put - createOrUpdate is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - name: string; - - /** - * Version identifier. This is case-sensitive. - */ - @path - version: string; - - /** - * Version entity to create or update. - */ - @body - body: ModelVersionResource; - }, - ModelVersionResource - >; + createOrUpdate( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string, + + /** + * Version identifier. This is case-sensitive. + */ + @path + version: string, + + /** + * Version entity to create or update. + */ + @body + body: ModelVersionResource, + ): ArmResponse | ErrorResponse; /** * Model Version Package operation. @@ -2136,49 +1512,35 @@ interface ModelVersionsOperations { @summary("Model Version Package operation.") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/package") @post - package is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The name of the resource group. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @path - resourceGroupName: string; - - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - workspaceName: string; - - /** - * Container name. This is case-sensitive. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - name: string; - - /** - * Version identifier. This is case-sensitive. - */ - @path - version: string; - - /** - * Package operation request body. - */ - @body - body: PackageRequest; - }, - PackageResponse | void - >; + package( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...ResourceGroupParameter, + + /** + * Name of Azure Machine Learning workspace. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string, + + /** + * Container name. This is case-sensitive. + */ + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string, + + /** + * Version identifier. This is case-sensitive. + */ + @path + version: string, + + /** + * Package operation request body. + */ + @body + body: PackageRequest, + ): ArmResponse | ErrorResponse; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp index 26272f12fe..d2a6b1137b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp @@ -221,34 +221,20 @@ interface StorageAccounts { @operationId("PrivateLinkResources_ListByStorageAccount") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateLinkResources") @get - listByStorageAccount is Azure.Core.Foundations.Operation< - { - /** - * The name of the resource group within the user's subscription. The name is case insensitive. - */ - @maxLength(90) - @minLength(1) - @pattern("^[-\\w\\._\\(\\)]+$") - @path - resourceGroupName: string; + listByStorageAccount( + ...ApiVersionParameter, + ...ResourceGroupParameter, - /** - * The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. - */ - @maxLength(24) - @minLength(3) - @path - accountName: string; + /** + * The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + */ + @maxLength(24) + @minLength(3) + @path + accountName: string, - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - }, - PrivateLinkResourceListResult - >; + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } @@encodedName(StorageAccounts.create::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp index df8e7c9091..b4edd6109e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp @@ -1,3 +1,5 @@ +// FIXME: Operations in this file are not detected as a resource operation, please confirm the conversion result manually + import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; @@ -15,17 +17,10 @@ interface SkusOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/skus") @get - list is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - }, - StorageSkuListResult - >; + list( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ): ArmResponse | ErrorResponse; } interface UsagesOperations { @@ -34,21 +29,9 @@ interface UsagesOperations { */ @route("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages") @get - listByLocation is Azure.Core.Foundations.Operation< - { - /** - * The ID of the target subscription. - */ - @minLength(1) - @path - subscriptionId: string; - - /** - * The location of the Azure Storage resource. - */ - @path - location: string; - }, - UsageListResult - >; + listByLocation( + ...ApiVersionParameter, + ...SubscriptionIdParameter, + ...LocationResourceParameter, + ): ArmResponse | ErrorResponse; } From a445362db30f1dba0504345cfc3e73efbad5cb63 Mon Sep 17 00:00:00 2001 From: Chenjie Shi Date: Fri, 23 Feb 2024 17:14:32 +0800 Subject: [PATCH 20/33] Add a flag to disable conversion feature for backcomp (#4887) fix #4879 need wait for #4885 to be merged first. --- .../flag_2024-02-20-03-49.json | 10 ++ .../src/generate/generate-arm-resource.ts | 18 +- .../openapi-to-typespec/src/interfaces.ts | 1 + .../openapi-to-typespec/src/options.ts | 6 + .../src/transforms/transform-arm-resources.ts | 104 +++++------ .../arm-agrifood/tsp-output/DataConnector.tsp | 2 +- .../tsp-output/DataManagerForAgriculture.tsp | 4 +- .../arm-agrifood/tsp-output/Extension.tsp | 2 +- .../tsp-output/PrivateEndpointConnection.tsp | 2 +- .../test/arm-agrifood/tsp-output/Solution.tsp | 2 +- .../arm-alertsmanagement/tsp-output/Alert.tsp | 19 +- .../tsp-output/AlertProcessingRule.tsp | 32 +--- .../tsp-output/SmartGroup.tsp | 14 +- .../tsp-output/AnalysisServicesServer.tsp | 4 +- .../tsp-output/AccessInformationContract.tsp | 51 +----- .../tsp-output/ApiContract.tsp | 46 +---- .../ApiManagementServiceResource.tsp | 167 +----------------- .../tsp-output/ApiReleaseContract.tsp | 40 +---- .../tsp-output/ApiVersionSetContract.tsp | 42 +---- .../AuthorizationServerContract.tsp | 45 +---- .../tsp-output/BackendContract.tsp | 50 +----- .../tsp-output/CacheContract.tsp | 40 +---- .../tsp-output/CertificateContract.tsp | 34 +--- .../tsp-output/DeletedServiceContract.tsp | 21 +-- .../tsp-output/DiagnosticContract.tsp | 40 +---- .../tsp-output/EmailTemplateContract.tsp | 42 +---- .../GatewayCertificateAuthorityContract.tsp | 33 +--- .../tsp-output/GatewayContract.tsp | 64 +------ .../GatewayHostnameConfigurationContract.tsp | 33 +--- .../tsp-output/GlobalSchemaContract.tsp | 32 +--- .../tsp-output/GroupContract.tsp | 42 +---- .../tsp-output/IdentityProviderContract.tsp | 45 +---- .../tsp-output/IssueAttachmentContract.tsp | 33 +--- .../tsp-output/IssueCommentContract.tsp | 32 +--- .../tsp-output/IssueContract.tsp | 40 +---- .../tsp-output/LoggerContract.tsp | 40 +---- .../tsp-output/NamedValueContract.tsp | 44 +---- .../tsp-output/NotificationContract.tsp | 24 +-- .../OpenidConnectProviderContract.tsp | 43 +---- .../tsp-output/OperationContract.tsp | 40 +---- .../tsp-output/PolicyContract.tsp | 30 +--- .../tsp-output/PortalDelegationSettings.tsp | 43 +---- .../tsp-output/PortalRevisionContract.tsp | 41 +---- .../tsp-output/PortalSigninSettings.tsp | 40 +---- .../tsp-output/PortalSignupSettings.tsp | 40 +---- .../tsp-output/PrivateEndpointConnection.tsp | 31 +--- .../tsp-output/PrivateLinkResource.tsp | 18 +- .../tsp-output/ProductContract.tsp | 46 +---- .../tsp-output/SchemaContract.tsp | 30 +--- .../tsp-output/SubscriptionContract.tsp | 48 +---- .../tsp-output/TagContract.tsp | 22 +-- .../tsp-output/TagDescriptionContract.tsp | 33 +--- .../tsp-output/TenantSettingsContract.tsp | 19 +- .../tsp-output/UserContract.tsp | 58 +----- .../tsp-output/RoleAssignment.tsp | 2 +- .../RoleAssignmentScheduleRequest.tsp | 4 +- .../tsp-output/RoleDefinition.tsp | 2 +- .../RoleEligibilityScheduleRequest.tsp | 4 +- .../tsp-output/RoleManagementPolicy.tsp | 2 +- .../RoleManagementPolicyAssignment.tsp | 2 +- .../tsp-output/Application.tsp | 2 - .../tsp-output/BusinessProcess.tsp | 2 - .../tsp-output/BusinessProcessVersion.tsp | 2 - .../tsp-output/InfrastructureResource.tsp | 2 - .../tsp-output/Space.tsp | 2 - .../tsp-output/AvailabilitySet.tsp | 4 +- .../tsp-output/CapacityReservation.tsp | 4 +- .../tsp-output/CapacityReservationGroup.tsp | 4 +- .../arm-compute/tsp-output/CloudService.tsp | 21 +-- .../arm-compute/tsp-output/DedicatedHost.tsp | 4 +- .../tsp-output/DedicatedHostGroup.tsp | 4 +- .../test/arm-compute/tsp-output/Disk.tsp | 12 +- .../arm-compute/tsp-output/DiskAccess.tsp | 7 +- .../tsp-output/DiskEncryptionSet.tsp | 4 +- .../tsp-output/DiskRestorePoint.tsp | 2 +- .../test/arm-compute/tsp-output/Gallery.tsp | 15 +- .../tsp-output/GalleryApplication.tsp | 4 +- .../tsp-output/GalleryApplicationVersion.tsp | 4 +- .../arm-compute/tsp-output/GalleryImage.tsp | 4 +- .../tsp-output/GalleryImageVersion.tsp | 4 +- .../test/arm-compute/tsp-output/Image.tsp | 10 +- .../tsp-output/PrivateEndpointConnection.tsp | 2 +- .../tsp-output/ProximityPlacementGroup.tsp | 4 +- .../arm-compute/tsp-output/RestorePoint.tsp | 5 +- .../tsp-output/RestorePointCollection.tsp | 4 +- .../test/arm-compute/tsp-output/Snapshot.tsp | 9 +- .../tsp-output/SshPublicKeyResource.tsp | 4 +- .../arm-compute/tsp-output/VirtualMachine.tsp | 18 +- .../tsp-output/VirtualMachineExtension.tsp | 4 +- .../tsp-output/VirtualMachineRunCommand.tsp | 4 +- .../tsp-output/VirtualMachineScaleSet.tsp | 28 +-- .../VirtualMachineScaleSetExtension.tsp | 4 +- .../tsp-output/VirtualMachineScaleSetVM.tsp | 6 +- .../VirtualMachineScaleSetVMExtension.tsp | 4 +- .../test/arm-dns/tsp-output/DnsRecord.tsp | 37 +--- .../test/arm-dns/tsp-output/DnsZone.tsp | 41 +---- .../BatchDeploymentTrackedResource.tsp | 4 +- .../BatchEndpointTrackedResource.tsp | 4 +- .../tsp-output/CodeContainerResource.tsp | 2 +- .../tsp-output/CodeVersionResource.tsp | 2 +- .../tsp-output/ComponentContainerResource.tsp | 2 +- .../tsp-output/ComponentVersionResource.tsp | 2 +- .../tsp-output/ComputeResource.tsp | 8 +- .../tsp-output/DataContainerResource.tsp | 2 +- .../tsp-output/DataVersionBaseResource.tsp | 2 +- .../tsp-output/DatastoreResource.tsp | 2 +- .../EnvironmentContainerResource.tsp | 2 +- .../tsp-output/EnvironmentVersionResource.tsp | 2 +- .../tsp-output/FeaturesetContainer.tsp | 2 +- .../tsp-output/FeaturesetVersion.tsp | 2 +- .../FeaturestoreEntityContainer.tsp | 2 +- .../tsp-output/FeaturestoreEntityVersion.tsp | 2 +- .../tsp-output/JobBaseResource.tsp | 7 +- .../tsp-output/LabelingJob.tsp | 5 +- .../tsp-output/ModelContainerResource.tsp | 2 +- .../tsp-output/ModelVersionResource.tsp | 2 +- .../OnlineDeploymentTrackedResource.tsp | 4 +- .../OnlineEndpointTrackedResource.tsp | 4 +- .../tsp-output/OutboundRuleBasicResource.tsp | 2 +- .../tsp-output/PrivateEndpointConnection.tsp | 2 +- .../tsp-output/Registry.tsp | 10 +- .../tsp-output/Schedule.tsp | 5 +- .../tsp-output/Workspace.tsp | 10 +- ...aceConnectionPropertiesV2BasicResource.tsp | 4 +- .../tsp-output/DataProduct.tsp | 2 - .../tsp-output/DataProductsCatalog.tsp | 2 - .../tsp-output/DataType.tsp | 2 - .../tsp-output/Association.tsp | 10 -- .../tsp-output/Frontend.tsp | 10 -- .../tsp-output/TrafficController.tsp | 12 -- .../test/arm-sphere/tsp-output/Catalog.tsp | 2 +- .../arm-sphere/tsp-output/Certificate.tsp | 2 +- .../test/arm-sphere/tsp-output/Device.tsp | 2 +- .../arm-sphere/tsp-output/DeviceGroup.tsp | 2 +- .../arm-storage/tsp-output/BlobContainer.tsp | 54 +----- .../tsp-output/BlobInventoryPolicy.tsp | 24 +-- .../tsp-output/BlobServiceProperties.tsp | 28 +-- .../arm-storage/tsp-output/DeletedAccount.tsp | 12 +- .../tsp-output/EncryptionScope.tsp | 30 +--- .../tsp-output/FileServiceProperties.tsp | 28 +-- .../test/arm-storage/tsp-output/FileShare.tsp | 46 +---- .../tsp-output/ImmutabilityPolicy.tsp | 38 +--- .../test/arm-storage/tsp-output/LocalUser.tsp | 22 +-- .../tsp-output/ManagementPolicy.tsp | 20 +-- .../tsp-output/ObjectReplicationPolicy.tsp | 25 +-- .../tsp-output/PrivateEndpointConnection.tsp | 25 +-- .../tsp-output/QueueServiceProperties.tsp | 29 +-- .../arm-storage/tsp-output/StorageAccount.tsp | 68 +------ .../arm-storage/tsp-output/StorageQueue.tsp | 38 +--- .../test/arm-storage/tsp-output/Table.tsp | 38 +--- .../tsp-output/TableServiceProperties.tsp | 29 +-- .../test/utils/generate-typespec.ts | 12 +- 152 files changed, 309 insertions(+), 2591 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/flag_2024-02-20-03-49.json diff --git a/common/changes/@autorest/openapi-to-typespec/flag_2024-02-20-03-49.json b/common/changes/@autorest/openapi-to-typespec/flag_2024-02-20-03-49.json new file mode 100644 index 0000000000..9ea72f62cc --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/flag_2024-02-20-03-49.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Add a flag to disable conversion feature for backcomp", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts index ed330ef2fb..16239cd136 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts @@ -3,6 +3,7 @@ import { TypespecOperation, TspArmResource } from "interfaces"; import _ from "lodash"; import pluralize from "pluralize"; import { getArmCommonTypeVersion } from "../autorest-session"; +import { getOptions } from "../options"; import { replaceGeneratedResourceObject } from "../transforms/transform-arm-resources"; import { generateDecorators } from "../utils/decorators"; import { generateDocs } from "../utils/docs"; @@ -30,6 +31,8 @@ export function generateArmResource(resource: TspArmResource): string { } function generateArmResourceModel(resource: TspArmResource): string { + const { isFullCompatible } = getOptions(); + let definitions: string[] = []; for (const fixme of resource.fixMe ?? []) { @@ -51,11 +54,12 @@ function generateArmResourceModel(resource: TspArmResource): string { } if ( - getArmCommonTypeVersion() && - !resource.propertiesPropertyRequired && - resource.propertiesPropertyVisibility.length === 2 && - resource.propertiesPropertyVisibility.includes("read") && - resource.propertiesPropertyVisibility.includes("create") + !isFullCompatible || + (getArmCommonTypeVersion() && + !resource.propertiesPropertyRequired && + resource.propertiesPropertyVisibility.length === 2 && + resource.propertiesPropertyVisibility.includes("read") && + resource.propertiesPropertyVisibility.includes("create")) ) { definitions.push(`model ${resource.name} is ${resource.resourceKind}<${resource.propertiesModelName}> {`); @@ -102,6 +106,8 @@ function generateArmResourceModel(resource: TspArmResource): string { } function generateArmResourceOperation(resource: TspArmResource): string { + const { isFullCompatible } = getOptions(); + const formalOperationGroupName = pluralize(resource.name); const definitions: string[] = []; @@ -120,6 +126,7 @@ function generateArmResourceOperation(resource: TspArmResource): string { const decorators = generateDecorators(operation.decorators); decorators && definitions.push(decorators); if ( + isFullCompatible && operation.operationId && (operation.operationId !== getGeneratedOperationId(formalOperationGroupName, operation.name) || operation.kind === "ArmResourceListByParent") @@ -142,6 +149,7 @@ function generateArmResourceOperation(resource: TspArmResource): string { } for (const operation of resource.normalOperations) { if ( + isFullCompatible && operation.operationId && operation.operationId !== getGeneratedOperationId(formalOperationGroupName, operation.name) ) { diff --git a/packages/extensions/openapi-to-typespec/src/interfaces.ts b/packages/extensions/openapi-to-typespec/src/interfaces.ts index 6131194625..cf3e2b9aad 100644 --- a/packages/extensions/openapi-to-typespec/src/interfaces.ts +++ b/packages/extensions/openapi-to-typespec/src/interfaces.ts @@ -9,6 +9,7 @@ export interface TypespecOptions { namespace?: string; guessResourceKey: boolean; isArm: boolean; + isFullCompatible: boolean; } export interface TypespecChoiceValue extends WithDoc { diff --git a/packages/extensions/openapi-to-typespec/src/options.ts b/packages/extensions/openapi-to-typespec/src/options.ts index 67cd1f84dd..ce8a92ef01 100644 --- a/packages/extensions/openapi-to-typespec/src/options.ts +++ b/packages/extensions/openapi-to-typespec/src/options.ts @@ -20,6 +20,7 @@ export function updateOptions() { namespace: getNamespace(session), guessResourceKey: getGuessResourceKey(session), isArm: getIsArm(session), + isFullCompatible: getIsFullCompatible(session), }; } @@ -40,3 +41,8 @@ export function getIsAzureSpec(session: Session) { export function getNamespace(session: Session) { return session.configuration["namespace"]; } + +export function getIsFullCompatible(session: Session) { + const isFullCompatible = session.configuration["isFullCompatible"] ?? false; + return isFullCompatible !== false; +} diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts index a3f5e50fd9..b8a0437fcb 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts @@ -13,7 +13,7 @@ import { TspArmResourceOperation, isFirstLevelResource, } from "../interfaces"; -import { updateOptions } from "../options"; +import { getOptions, updateOptions } from "../options"; import { ArmResource, ArmResourceSchema, @@ -244,22 +244,13 @@ function convertResourceCreateOrReplaceOperation( } const tspOperationGroupName = getTSPOperationGroupName(resourceMetadata.SwaggerModelName); const operationName = getOperationName(operation.OperationID); - const customizations = []; - if (bodyParam) { - if (bodyParam.language.default.name !== "resource") { - customizations.push( - `@@encodedName(${tspOperationGroupName}.\`${operationName}\`::parameters.resource, "application/json", "${bodyParam.language.default.name}");`, - ); - customizations.push( - `@@extension(${tspOperationGroupName}.\`${operationName}\`::parameters.resource, "x-ms-client-name", "${bodyParam.language.default.name}");`, - ); - } - if (bodyParam.language.default.description !== "Resource create parameters.") { - customizations.push( - `@@doc(${tspOperationGroupName}.\`${operationName}\`::parameters.resource, "${bodyParam.language.default.description}");`, - ); - } - } + const customizations = getCustomizations( + bodyParam, + tspOperationGroupName, + operationName, + "resource", + "Resource create parameters.", + ); return [ { doc: operation.Description, @@ -275,6 +266,34 @@ function convertResourceCreateOrReplaceOperation( return []; } +function getCustomizations( + bodyParam: Parameter | undefined, + tspOperationGroupName: string, + operationName: string, + templateName: string, + templateDoc: string, +) { + const { isFullCompatible } = getOptions(); + + const augmentedDecorators = []; + if (bodyParam) { + if (bodyParam.language.default.name !== templateName && isFullCompatible) { + augmentedDecorators.push( + `@@encodedName(${tspOperationGroupName}.\`${operationName}\`::parameters.${templateName}, "json", "${bodyParam.language.default.name}");`, + ); + augmentedDecorators.push( + `@@extension(${tspOperationGroupName}.\`${operationName}\`::parameters.${templateName}, "x-ms-client-name", "${bodyParam.language.default.name}");`, + ); + } + if (bodyParam.language.default.description !== templateDoc) { + augmentedDecorators.push( + `@@doc(${tspOperationGroupName}.\`${operationName}\`::parameters.${templateName}, "${bodyParam.language.default.description}");`, + ); + } + } + return augmentedDecorators; +} + function convertResourceUpdateOperation( resourceMetadata: ArmResource, operations: Record, @@ -295,28 +314,22 @@ function convertResourceUpdateOperation( "// FIXME: (ArmResourcePatch): ArmResourcePatchSync/ArmResourcePatchAsync should have a body parameter with either properties property or tag property", ); } + + const tspOperationGroupName = getTSPOperationGroupName(resourceMetadata.SwaggerModelName); + const operationName = getOperationName(operation.OperationID); + const customizations = getCustomizations( + bodyParam, + tspOperationGroupName, + operationName, + "properties", + "The resource properties to be updated.", + ); + let kind; const templateParameters = [resourceMetadata.SwaggerModelName]; - const customizations = []; if (bodyParam) { kind = isLongRunning ? "ArmCustomPatchAsync" : "ArmCustomPatchSync"; templateParameters.push(bodyParam.schema.language.default.name); - - const tspOperationGroupName = getTSPOperationGroupName(resourceMetadata.SwaggerModelName); - const operationName = getOperationName(operation.OperationID); - if (bodyParam.language.default.name !== "properties") { - customizations.push( - `@@encodedName(${tspOperationGroupName}.\`${operationName}\`::parameters.properties, "application/json", "${bodyParam.language.default.name}");`, - ); - customizations.push( - `@@extension(${tspOperationGroupName}.\`${operationName}\`::parameters.properties, "x-ms-client-name", "${bodyParam.language.default.name}");`, - ); - } - if (bodyParam.language.default.description !== "The resource properties to be updated.") { - customizations.push( - `@@doc(${tspOperationGroupName}.\`${operationName}\`::parameters.properties, "${bodyParam.language.default.description}");`, - ); - } } else { kind = isLongRunning ? "ArmCustomPatchAsync" : "ArmCustomPatchSync"; templateParameters.push("{}"); @@ -525,22 +538,13 @@ function convertResourceActionOperations( const tspOperationGroupName = getTSPOperationGroupName(resourceMetadata.SwaggerModelName); const operationName = getOperationName(operation.OperationID); - const customizations = []; - if (bodyParam) { - if (bodyParam.language.default.name !== "body") { - customizations.push( - `@@encodedName(${tspOperationGroupName}.\`${operationName}\`::parameters.body, "application/json", "${bodyParam.language.default.name}");`, - ); - customizations.push( - `@@extension(${tspOperationGroupName}.\`${operationName}\`::parameters.body, "x-ms-client-name", "${bodyParam.language.default.name}");`, - ); - } - if (bodyParam.language.default.description !== "The content of the action request") { - customizations.push( - `@@doc(${tspOperationGroupName}.\`${operationName}\`::parameters.body, "${bodyParam.language.default.description}");`, - ); - } - } + const customizations = getCustomizations( + bodyParam, + tspOperationGroupName, + operationName, + "body", + "The content of the action request", + ); converted.push({ doc: operation.Description, kind: kind as any, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp index a70cdc0a50..2e63191f49 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp @@ -87,7 +87,7 @@ interface DataConnectors { } @@encodedName(DataConnectors.createOrUpdate::parameters.resource, - "application/json", + "json", "body" ); @@extension(DataConnectors.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp index 11605b34a4..92e3fcfec2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp @@ -112,7 +112,7 @@ interface DataManagerForAgricultures { } @@encodedName(DataManagerForAgricultures.createOrUpdate::parameters.resource, - "application/json", + "json", "request" ); @@extension(DataManagerForAgricultures.createOrUpdate::parameters.resource, @@ -123,7 +123,7 @@ interface DataManagerForAgricultures { "Data Manager For Agriculture resource create or update request object." ); @@encodedName(DataManagerForAgricultures.update::parameters.properties, - "application/json", + "json", "request" ); @@extension(DataManagerForAgricultures.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp index 25b785ac1d..e96d2037eb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp @@ -103,7 +103,7 @@ interface Extensions { } @@encodedName(Extensions.createOrUpdate::parameters.resource, - "application/json", + "json", "requestBody" ); @@extension(Extensions.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp index 4362df2db9..c791e58643 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp @@ -65,7 +65,7 @@ interface PrivateEndpointConnections { } @@encodedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, - "application/json", + "json", "request" ); @@extension(PrivateEndpointConnections.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp index 047461bc7f..b15ee35b2d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp @@ -156,7 +156,7 @@ interface Solutions { } @@encodedName(Solutions.createOrUpdate::parameters.resource, - "application/json", + "json", "requestBody" ); @@extension(Solutions.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp index 5fa928a665..fe0a557fc9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp @@ -14,12 +14,8 @@ namespace Azure.ResourceManager.AlertsManagement; /** * An alert created in alert management service. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(AlertProperties) -model Alert extends ProxyResourceBase { +model Alert is ProxyResource { /** * Unique ID of an alert instance. */ @@ -28,12 +24,6 @@ model Alert extends ProxyResourceBase { @segment("alerts") @visibility("read") name: string; - - /** - * Alert property bag - */ - @extension("x-ms-client-flatten", true) - properties?: AlertProperties; } @armResourceOperations @@ -46,8 +36,6 @@ interface Alerts { /** * List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Alerts_GetAll") getAll is ArmResourceListByParent< Alert, { @@ -193,9 +181,4 @@ interface Alerts { ): ArmResponse | ErrorResponse; } -@@encodedName(Alerts.changeState::parameters.body, - "application/json", - "comment" -); -@@extension(Alerts.changeState::parameters.body, "x-ms-client-name", "comment"); @@doc(Alerts.changeState::parameters.body, "reason of change alert state"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp index cc4a930fc3..0752fe4392 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp @@ -14,13 +14,7 @@ namespace Azure.ResourceManager.AlertsManagement; /** * Alert processing rule object containing target scopes, conditions and scheduling logic. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - AlertProcessingRuleProperties -) -model AlertProcessingRule extends TrackedResourceBase { +model AlertProcessingRule is TrackedResource { /** * The name of the alert processing rule that needs to be fetched. */ @@ -29,12 +23,6 @@ model AlertProcessingRule extends TrackedResourceBase { @segment("actionRules") @visibility("read") name: string; - - /** - * Alert processing rule properties. - */ - @extension("x-ms-client-flatten", true) - properties?: AlertProcessingRuleProperties; } @armResourceOperations @@ -63,8 +51,6 @@ interface AlertProcessingRules { /** * List all alert processing rules in a resource group. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("AlertProcessingRules_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; /** @@ -73,25 +59,9 @@ interface AlertProcessingRules { listBySubscription is ArmListBySubscription; } -@@encodedName(AlertProcessingRules.createOrUpdate::parameters.resource, - "application/json", - "alertProcessingRule" -); -@@extension(AlertProcessingRules.createOrUpdate::parameters.resource, - "x-ms-client-name", - "alertProcessingRule" -); @@doc(AlertProcessingRules.createOrUpdate::parameters.resource, "Alert processing rule to be created/updated." ); -@@encodedName(AlertProcessingRules.update::parameters.properties, - "application/json", - "alertProcessingRulePatch" -); -@@extension(AlertProcessingRules.update::parameters.properties, - "x-ms-client-name", - "alertProcessingRulePatch" -); @@doc(AlertProcessingRules.update::parameters.properties, "Parameters supplied to the operation." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp index ede8333742..66ca95d675 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp @@ -14,12 +14,8 @@ namespace Azure.ResourceManager.AlertsManagement; /** * Set of related alerts grouped together smartly by AMS. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(SmartGroupProperties) -model SmartGroup extends ProxyResourceBase { +model SmartGroup is ProxyResource { /** * Smart group unique id. */ @@ -28,12 +24,6 @@ model SmartGroup extends ProxyResourceBase { @segment("smartGroups") @visibility("read") name: string; - - /** - * Properties of smart group. - */ - @extension("x-ms-client-flatten", true) - properties?: SmartGroupProperties; } @armResourceOperations @@ -46,8 +36,6 @@ interface SmartGroups { /** * List all the Smart Groups within a specified subscription. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("SmartGroups_GetAll") getAll is ArmResourceListByParent< SmartGroup, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp index 462854f91a..6e8e338b27 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp @@ -164,7 +164,7 @@ interface AnalysisServicesServers { } @@encodedName(AnalysisServicesServers.create::parameters.resource, - "application/json", + "json", "serverParameters" ); @@extension(AnalysisServicesServers.create::parameters.resource, @@ -175,7 +175,7 @@ interface AnalysisServicesServers { "Contains the information used to provision the Analysis Services server." ); @@encodedName(AnalysisServicesServers.update::parameters.properties, - "application/json", + "json", "serverUpdateParameters" ); @@extension(AnalysisServicesServers.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp index 251cc83a38..7b359a309e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp @@ -15,14 +15,9 @@ namespace Azure.ResourceManager.ApiManagement; /** * Tenant Settings. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - AccessInformationContractProperties -) -model AccessInformationContract extends ProxyResourceBase { +model AccessInformationContract + is ProxyResource { /** * The identifier of the Access configuration. */ @@ -31,12 +26,6 @@ model AccessInformationContract extends ProxyResourceBase { @segment("tenant") @visibility("read") name: AccessIdName; - - /** - * AccessInformation entity contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: AccessInformationContractProperties; } @armResourceOperations @@ -44,16 +33,12 @@ interface AccessInformationContracts { /** * Get tenant access information details without secrets. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TenantAccess_Get") get is ArmResourceRead; /** * Tenant access metadata */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("TenantAccess_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< AccessInformationContract, @@ -64,8 +49,6 @@ interface AccessInformationContracts { /** * Update tenant access information details. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TenantAccess_Create") create is ArmResourceCreateOrReplaceSync< AccessInformationContract, { @@ -82,9 +65,7 @@ interface AccessInformationContracts { /** * Update tenant access information details. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("TenantAccess_Update") update is ArmCustomPatchSync< AccessInformationContract, AccessInformationUpdateParameters, @@ -102,8 +83,6 @@ interface AccessInformationContracts { /** * Returns list of access infos - for Git and Management endpoints. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TenantAccess_ListByService") listByService is ArmResourceListByParent< AccessInformationContract, { @@ -120,8 +99,6 @@ interface AccessInformationContracts { /** * Regenerate primary access key */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TenantAccess_RegeneratePrimaryKey") regeneratePrimaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void @@ -130,8 +107,6 @@ interface AccessInformationContracts { /** * Regenerate secondary access key */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TenantAccess_RegenerateSecondaryKey") regenerateSecondaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void @@ -140,8 +115,6 @@ interface AccessInformationContracts { /** * Get tenant access information details. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TenantAccess_ListSecrets") listSecrets is ArmResourceActionSync< AccessInformationContract, void, @@ -151,8 +124,6 @@ interface AccessInformationContracts { /** * Regenerate primary access key for GIT. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TenantAccessGit_RegeneratePrimaryKey") regeneratePrimaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void @@ -161,33 +132,15 @@ interface AccessInformationContracts { /** * Regenerate secondary access key for GIT. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TenantAccessGit_RegenerateSecondaryKey") regenerateSecondaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void >; } -@@encodedName(AccessInformationContracts.create::parameters.resource, - "application/json", - "parameters" -); -@@extension(AccessInformationContracts.create::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(AccessInformationContracts.create::parameters.resource, "Parameters supplied to retrieve the Tenant Access Information." ); -@@encodedName(AccessInformationContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(AccessInformationContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(AccessInformationContracts.update::parameters.properties, "Parameters supplied to retrieve the Tenant Access Information." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp index dd0052e2ea..cea3673015 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * API details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(ApiContractProperties) -model ApiContract extends ProxyResourceBase { +model ApiContract is ProxyResource { /** * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. */ @@ -32,12 +28,6 @@ model ApiContract extends ProxyResourceBase { @segment("apis") @visibility("read") name: string; - - /** - * API entity contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: ApiContractProperties; } @armResourceOperations @@ -45,16 +35,12 @@ interface ApiContracts { /** * Gets the details of the API specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Api_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the API specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("Api_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; @@ -62,8 +48,6 @@ interface ApiContracts { /** * Creates new or updates existing specified API of the API Management service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Api_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync< ApiContract, { @@ -80,9 +64,7 @@ interface ApiContracts { /** * Updates the specified API of the API Management service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("Api_Update") update is ArmCustomPatchSync< ApiContract, ApiUpdateContract, @@ -100,8 +82,6 @@ interface ApiContracts { /** * Deletes the specified API of the API Management service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Api_Delete") delete is ArmResourceDeleteSync< ApiContract, { @@ -124,8 +104,6 @@ interface ApiContracts { /** * Lists all APIs of the API Management service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Api_ListByService") listByService is ArmResourceListByParent< ApiContract, { @@ -168,8 +146,6 @@ interface ApiContracts { * Lists all revisions of an API. */ // FIXME: ApiRevision_ListByService could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiRevision_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions") @get listByService( @@ -219,8 +195,6 @@ interface ApiContracts { * Lists all Products, which the API is part of. */ // FIXME: ApiProduct_ListByApis could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiProduct_ListByApis") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products") @get listByApis( @@ -270,8 +244,6 @@ interface ApiContracts { * Lists a collection of operations associated with tags. */ // FIXME: Operation_ListByTags could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Operation_ListByTags") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags") @get listByTags( @@ -325,25 +297,9 @@ interface ApiContracts { ): ArmResponse | ErrorResponse; } -@@encodedName(ApiContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(ApiContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(ApiContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@encodedName(ApiContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(ApiContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(ApiContracts.update::parameters.properties, "API Update Contract parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp index 7aeea30950..695ec39312 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp @@ -14,13 +14,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * A single API Management service resource in List or Get response. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - ApiManagementServiceProperties -) -model ApiManagementServiceResource extends TrackedResourceBase { +model ApiManagementServiceResource + is TrackedResource { /** * The name of the API Management service. */ @@ -44,12 +39,6 @@ model ApiManagementServiceResource extends TrackedResourceBase { */ zones?: string[]; - /** - * Properties of the API Management service. - */ - @extension("x-ms-client-flatten", true) - properties: ApiManagementServiceProperties; - ...Azure.ResourceManager.ManagedServiceIdentity; ...Azure.ResourceManager.ResourceSku; } @@ -59,23 +48,17 @@ interface ApiManagementServiceResources { /** * Gets an API Management service resource description. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiManagementService_Get") get is ArmResourceRead; /** * Creates or updates an API Management service. This is long running operation and could take several minutes to complete. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiManagementService_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Updates an existing API Management service. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("ApiManagementService_Update") update is ArmCustomPatchAsync< ApiManagementServiceResource, ApiManagementServiceUpdateParameters @@ -84,29 +67,21 @@ interface ApiManagementServiceResources { /** * Deletes an existing API Management service. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiManagementService_Delete") delete is ArmResourceDeleteAsync; /** * List all API Management services within a resource group. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiManagementService_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; /** * Lists all API Management services within an Azure subscription. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiManagementService_List") list is ArmListBySubscription; /** * Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PerformConnectivityCheckAsync") performConnectivityCheckAsync is ArmResourceActionAsync< ApiManagementServiceResource, ConnectivityCheckRequest, @@ -116,8 +91,6 @@ interface ApiManagementServiceResources { /** * Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiManagementService_Restore") restore is ArmResourceActionAsync< ApiManagementServiceResource, ApiManagementServiceBackupRestoreParameters, @@ -127,8 +100,6 @@ interface ApiManagementServiceResources { /** * Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiManagementService_Backup") backup is ArmResourceActionAsync< ApiManagementServiceResource, ApiManagementServiceBackupRestoreParameters, @@ -138,8 +109,6 @@ interface ApiManagementServiceResources { /** * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiManagementService_GetSsoToken") getSsoToken is ArmResourceActionSync< ApiManagementServiceResource, void, @@ -149,8 +118,6 @@ interface ApiManagementServiceResources { /** * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiManagementService_ApplyNetworkConfigurationUpdates") applyNetworkConfigurationUpdates is ArmResourceActionAsync< ApiManagementServiceResource, ApiManagementServiceApplyNetworkConfigurationParameters, @@ -160,8 +127,6 @@ interface ApiManagementServiceResources { /** * This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TenantConfiguration_Deploy") deploy is ArmResourceActionAsync< ApiManagementServiceResource, DeployConfigurationParameters, @@ -180,8 +145,6 @@ interface ApiManagementServiceResources { /** * This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TenantConfiguration_Save") save is ArmResourceActionAsync< ApiManagementServiceResource, SaveConfigurationParameter, @@ -200,8 +163,6 @@ interface ApiManagementServiceResources { /** * This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TenantConfiguration_Validate") validate is ArmResourceActionAsync< ApiManagementServiceResource, DeployConfigurationParameters, @@ -220,8 +181,6 @@ interface ApiManagementServiceResources { /** * Checks availability and correctness of a name for an API Management service. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiManagementService_CheckNameAvailability") checkNameAvailability is checkGlobalNameAvailability< ApiManagementServiceCheckNameAvailabilityParameters, ApiManagementServiceNameAvailabilityResult @@ -231,8 +190,6 @@ interface ApiManagementServiceResources { * Lists a collection of apis associated with tags. */ // FIXME: Api_ListByTags could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Api_ListByTags") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags") @get listByTags( @@ -280,8 +237,6 @@ interface ApiManagementServiceResources { * Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. */ // FIXME: ContentType_ListByService could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ContentType_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes") @get listByService( @@ -304,8 +259,6 @@ interface ApiManagementServiceResources { * Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. */ // FIXME: ContentType_Get could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ContentType_Get") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}") @get get( @@ -336,8 +289,6 @@ interface ApiManagementServiceResources { * Lists developer portal's content items specified by the provided content type. */ // FIXME: ContentItem_ListByService could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ContentItem_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems") @get listByService( @@ -368,8 +319,6 @@ interface ApiManagementServiceResources { * Returns the developer portal's content item specified by its identifier. */ // FIXME: ContentItem_Get could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ContentItem_Get") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}") @get get( @@ -408,8 +357,6 @@ interface ApiManagementServiceResources { * Gets all available SKU for a given API Management service */ // FIXME: ApiManagementServiceSkus_ListAvailableServiceSkus could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiManagementServiceSkus_ListAvailableServiceSkus") @summary("Gets available SKUs for API Management service") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus") @get @@ -433,8 +380,6 @@ interface ApiManagementServiceResources { * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. */ // FIXME: NetworkStatus_ListByService could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("NetworkStatus_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus") @get listByService( @@ -456,8 +401,6 @@ interface ApiManagementServiceResources { * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. */ // FIXME: NetworkStatus_ListByLocation could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("NetworkStatus_ListByLocation") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus") @get listByLocation( @@ -486,8 +429,6 @@ interface ApiManagementServiceResources { * Gets the network endpoints of all outbound dependencies of a ApiManagement service. */ // FIXME: OutboundNetworkDependenciesEndpoints_ListByService could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("OutboundNetworkDependenciesEndpoints_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints") @get listByService( @@ -509,8 +450,6 @@ interface ApiManagementServiceResources { * Lists all policy descriptions. */ // FIXME: PolicyDescription_ListByService could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PolicyDescription_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions") @get listByService( @@ -539,8 +478,6 @@ interface ApiManagementServiceResources { * Lists a collection of portalsettings defined within a service instance.. */ // FIXME: PortalSettings_ListByService could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PortalSettings_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings") @get listByService( @@ -563,8 +500,6 @@ interface ApiManagementServiceResources { * Lists a collection of products associated with tags. */ // FIXME: Product_ListByTags could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Product_ListByTags") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags") @get listByTags( @@ -612,8 +547,6 @@ interface ApiManagementServiceResources { * Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. */ // FIXME: QuotaByCounterKeys_ListByService could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("QuotaByCounterKeys_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}") @get listByService( @@ -640,8 +573,6 @@ interface ApiManagementServiceResources { * Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. */ // FIXME: QuotaByPeriodKeys_Get could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("QuotaByPeriodKeys_Get") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}") @get get( @@ -674,8 +605,6 @@ interface ApiManagementServiceResources { * Lists all azure regions in which the service exists. */ // FIXME: Region_ListByService could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Region_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions") @get listByService( @@ -698,8 +627,6 @@ interface ApiManagementServiceResources { * Lists report records by API. */ // FIXME: Reports_ListByApi could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Reports_ListByApi") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi") @get listByApi( @@ -747,8 +674,6 @@ interface ApiManagementServiceResources { * Lists report records by User. */ // FIXME: Reports_ListByUser could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Reports_ListByUser") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser") @get listByUser( @@ -796,8 +721,6 @@ interface ApiManagementServiceResources { * Lists report records by API Operations. */ // FIXME: Reports_ListByOperation could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Reports_ListByOperation") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation") @get listByOperation( @@ -845,8 +768,6 @@ interface ApiManagementServiceResources { * Lists report records by Product. */ // FIXME: Reports_ListByProduct could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Reports_ListByProduct") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct") @get listByProduct( @@ -894,8 +815,6 @@ interface ApiManagementServiceResources { * Lists report records by geography. */ // FIXME: Reports_ListByGeo could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Reports_ListByGeo") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo") @get listByGeo( @@ -937,8 +856,6 @@ interface ApiManagementServiceResources { * Lists report records by subscription. */ // FIXME: Reports_ListBySubscription could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Reports_ListBySubscription") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription") @get listBySubscription( @@ -986,8 +903,6 @@ interface ApiManagementServiceResources { * Lists report records by Time. */ // FIXME: Reports_ListByTime could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Reports_ListByTime") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime") @get listByTime( @@ -1041,8 +956,6 @@ interface ApiManagementServiceResources { * Lists report records by Request. */ // FIXME: Reports_ListByRequest could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Reports_ListByRequest") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest") @get listByRequest( @@ -1084,8 +997,6 @@ interface ApiManagementServiceResources { * Lists a collection of resources associated with tags. */ // FIXME: TagResource_ListByService could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TagResource_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources") @get listByService( @@ -1127,8 +1038,6 @@ interface ApiManagementServiceResources { * Gets the status of the most recent synchronization between the configuration database and the Git repository. */ // FIXME: TenantConfiguration_GetSyncState could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TenantConfiguration_GetSyncState") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState") @get getSyncState( @@ -1154,102 +1063,30 @@ interface ApiManagementServiceResources { ): ArmResponse | ErrorResponse; } -@@encodedName(ApiManagementServiceResources.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(ApiManagementServiceResources.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(ApiManagementServiceResources.createOrUpdate::parameters.resource, "Parameters supplied to the CreateOrUpdate API Management service operation." ); -@@encodedName(ApiManagementServiceResources.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(ApiManagementServiceResources.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(ApiManagementServiceResources.update::parameters.properties, "Parameters supplied to the CreateOrUpdate API Management service operation." ); -@@encodedName(ApiManagementServiceResources.performConnectivityCheckAsync::parameters.body, - "application/json", - "connectivityCheckRequestParams" -); -@@extension(ApiManagementServiceResources.performConnectivityCheckAsync::parameters.body, - "x-ms-client-name", - "connectivityCheckRequestParams" -); @@doc(ApiManagementServiceResources.performConnectivityCheckAsync::parameters.body, "Connectivity Check request parameters." ); -@@encodedName(ApiManagementServiceResources.restore::parameters.body, - "application/json", - "parameters" -); -@@extension(ApiManagementServiceResources.restore::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(ApiManagementServiceResources.restore::parameters.body, "Parameters supplied to the Restore API Management service from backup operation." ); -@@encodedName(ApiManagementServiceResources.backup::parameters.body, - "application/json", - "parameters" -); -@@extension(ApiManagementServiceResources.backup::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(ApiManagementServiceResources.backup::parameters.body, "Parameters supplied to the ApiManagementService_Backup operation." ); -@@encodedName(ApiManagementServiceResources.applyNetworkConfigurationUpdates::parameters.body, - "application/json", - "parameters" -); -@@extension(ApiManagementServiceResources.applyNetworkConfigurationUpdates::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(ApiManagementServiceResources.applyNetworkConfigurationUpdates::parameters.body, "Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region." ); -@@encodedName(ApiManagementServiceResources.deploy::parameters.body, - "application/json", - "parameters" -); -@@extension(ApiManagementServiceResources.deploy::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(ApiManagementServiceResources.deploy::parameters.body, "Deploy Configuration parameters." ); -@@encodedName(ApiManagementServiceResources.save::parameters.body, - "application/json", - "parameters" -); -@@extension(ApiManagementServiceResources.save::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(ApiManagementServiceResources.save::parameters.body, "Save Configuration parameters." ); -@@encodedName(ApiManagementServiceResources.validate::parameters.body, - "application/json", - "parameters" -); -@@extension(ApiManagementServiceResources.validate::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(ApiManagementServiceResources.validate::parameters.body, "Validate Configuration parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp index 9e28f034d4..3a31c94d26 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * ApiRelease details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(ApiReleaseContractProperties) -model ApiReleaseContract extends ProxyResourceBase { +model ApiReleaseContract is ProxyResource { /** * Release identifier within an API. Must be unique in the current API Management service instance. */ @@ -32,12 +28,6 @@ model ApiReleaseContract extends ProxyResourceBase { @segment("releases") @visibility("read") name: string; - - /** - * ApiRelease entity contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: ApiReleaseContractProperties; } @armResourceOperations @@ -45,16 +35,12 @@ interface ApiReleaseContracts { /** * Returns the details of an API release. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiRelease_Get") get is ArmResourceRead; /** * Returns the etag of an API release. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("ApiRelease_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< ApiReleaseContract, @@ -65,8 +51,6 @@ interface ApiReleaseContracts { /** * Creates a new Release for the API. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiRelease_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< ApiReleaseContract, { @@ -83,9 +67,7 @@ interface ApiReleaseContracts { /** * Updates the details of the release of the API specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("ApiRelease_Update") update is ArmCustomPatchSync< ApiReleaseContract, ApiReleaseContract, @@ -103,8 +85,6 @@ interface ApiReleaseContracts { /** * Deletes the specified release in the API. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiRelease_Delete") delete is ArmResourceDeleteSync< ApiReleaseContract, { @@ -121,8 +101,6 @@ interface ApiReleaseContracts { /** * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiRelease_ListByService") listByService is ArmResourceListByParent< ApiReleaseContract, { @@ -150,25 +128,9 @@ interface ApiReleaseContracts { >; } -@@encodedName(ApiReleaseContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(ApiReleaseContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(ApiReleaseContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@encodedName(ApiReleaseContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(ApiReleaseContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(ApiReleaseContracts.update::parameters.properties, "API Release Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp index 304113e1e3..5efeaa48b6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp @@ -15,14 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * API Version Set Contract details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - ApiVersionSetContractProperties -) -model ApiVersionSetContract extends ProxyResourceBase { +model ApiVersionSetContract is ProxyResource { /** * Api Version Set identifier. Must be unique in the current API Management service instance. */ @@ -34,12 +28,6 @@ model ApiVersionSetContract extends ProxyResourceBase { @segment("apiVersionSets") @visibility("read") name: string; - - /** - * API VersionSet contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: ApiVersionSetContractProperties; } @armResourceOperations @@ -47,16 +35,12 @@ interface ApiVersionSetContracts { /** * Gets the details of the Api Version Set specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiVersionSet_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("ApiVersionSet_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< ApiVersionSetContract, @@ -67,8 +51,6 @@ interface ApiVersionSetContracts { /** * Creates or Updates a Api Version Set. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiVersionSet_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< ApiVersionSetContract, { @@ -85,9 +67,7 @@ interface ApiVersionSetContracts { /** * Updates the details of the Api VersionSet specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("ApiVersionSet_Update") update is ArmCustomPatchSync< ApiVersionSetContract, ApiVersionSetUpdateParameters, @@ -105,8 +85,6 @@ interface ApiVersionSetContracts { /** * Deletes specific Api Version Set. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiVersionSet_Delete") delete is ArmResourceDeleteSync< ApiVersionSetContract, { @@ -123,8 +101,6 @@ interface ApiVersionSetContracts { /** * Lists a collection of API Version Sets in the specified service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiVersionSet_ListByService") listByService is ArmResourceListByParent< ApiVersionSetContract, { @@ -152,25 +128,9 @@ interface ApiVersionSetContracts { >; } -@@encodedName(ApiVersionSetContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(ApiVersionSetContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(ApiVersionSetContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@encodedName(ApiVersionSetContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(ApiVersionSetContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(ApiVersionSetContracts.update::parameters.properties, "Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp index 06ead68a81..9978814678 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp @@ -15,14 +15,9 @@ namespace Azure.ResourceManager.ApiManagement; /** * External OAuth authorization server settings. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - AuthorizationServerContractProperties -) -model AuthorizationServerContract extends ProxyResourceBase { +model AuthorizationServerContract + is ProxyResource { /** * Identifier of the authorization server. */ @@ -34,12 +29,6 @@ model AuthorizationServerContract extends ProxyResourceBase { @segment("authorizationServers") @visibility("read") name: string; - - /** - * Properties of the External OAuth authorization server Contract. - */ - @extension("x-ms-client-flatten", true) - properties?: AuthorizationServerContractProperties; } @armResourceOperations @@ -47,16 +36,12 @@ interface AuthorizationServerContracts { /** * Gets the details of the authorization server specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("AuthorizationServer_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("AuthorizationServer_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< AuthorizationServerContract, @@ -67,8 +52,6 @@ interface AuthorizationServerContracts { /** * Creates new authorization server or updates an existing authorization server. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("AuthorizationServer_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< AuthorizationServerContract, { @@ -85,9 +68,7 @@ interface AuthorizationServerContracts { /** * Updates the details of the authorization server specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("AuthorizationServer_Update") update is ArmCustomPatchSync< AuthorizationServerContract, AuthorizationServerUpdateContract, @@ -105,8 +86,6 @@ interface AuthorizationServerContracts { /** * Deletes specific authorization server instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("AuthorizationServer_Delete") delete is ArmResourceDeleteSync< AuthorizationServerContract, { @@ -123,8 +102,6 @@ interface AuthorizationServerContracts { /** * Lists a collection of authorization servers defined within a service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("AuthorizationServer_ListByService") listByService is ArmResourceListByParent< AuthorizationServerContract, { @@ -154,8 +131,6 @@ interface AuthorizationServerContracts { /** * Gets the client secret details of the authorization server. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("AuthorizationServer_ListSecrets") listSecrets is ArmResourceActionSync< AuthorizationServerContract, void, @@ -163,25 +138,9 @@ interface AuthorizationServerContracts { >; } -@@encodedName(AuthorizationServerContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(AuthorizationServerContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(AuthorizationServerContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@encodedName(AuthorizationServerContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(AuthorizationServerContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(AuthorizationServerContracts.update::parameters.properties, "OAuth2 Server settings Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp index 2278cc7eeb..45e5055104 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Backend details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(BackendContractProperties) -model BackendContract extends ProxyResourceBase { +model BackendContract is ProxyResource { /** * Identifier of the Backend entity. Must be unique in the current API Management service instance. */ @@ -31,12 +27,6 @@ model BackendContract extends ProxyResourceBase { @segment("backends") @visibility("read") name: string; - - /** - * Backend entity contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: BackendContractProperties; } @armResourceOperations @@ -44,16 +34,12 @@ interface BackendContracts { /** * Gets the details of the backend specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Backend_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the backend specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("Backend_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< BackendContract, @@ -64,8 +50,6 @@ interface BackendContracts { /** * Creates or Updates a backend. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Backend_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< BackendContract, { @@ -82,9 +66,7 @@ interface BackendContracts { /** * Updates an existing backend. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("Backend_Update") update is ArmCustomPatchSync< BackendContract, BackendUpdateParameters, @@ -102,8 +84,6 @@ interface BackendContracts { /** * Deletes the specified backend. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Backend_Delete") delete is ArmResourceDeleteSync< BackendContract, { @@ -120,8 +100,6 @@ interface BackendContracts { /** * Lists a collection of backends in the specified service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Backend_ListByService") listByService is ArmResourceListByParent< BackendContract, { @@ -151,42 +129,16 @@ interface BackendContracts { /** * Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Backend_Reconnect") reconnect is ArmResourceActionNoContentSync< BackendContract, BackendReconnectContract >; } -@@encodedName(BackendContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(BackendContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(BackendContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@encodedName(BackendContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(BackendContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(BackendContracts.update::parameters.properties, "Update parameters."); -@@encodedName(BackendContracts.reconnect::parameters.body, - "application/json", - "parameters" -); -@@extension(BackendContracts.reconnect::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(BackendContracts.reconnect::parameters.body, "Reconnect request parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp index cd2c5b484a..ed92edd515 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Cache details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(CacheContractProperties) -model CacheContract extends ProxyResourceBase { +model CacheContract is ProxyResource { /** * Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). */ @@ -32,12 +28,6 @@ model CacheContract extends ProxyResourceBase { @segment("caches") @visibility("read") name: string; - - /** - * Cache properties details. - */ - @extension("x-ms-client-flatten", true) - properties?: CacheContractProperties; } @armResourceOperations @@ -45,16 +35,12 @@ interface CacheContracts { /** * Gets the details of the Cache specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Cache_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the Cache specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("Cache_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; @@ -62,8 +48,6 @@ interface CacheContracts { /** * Creates or updates an External Cache to be used in Api Management instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Cache_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< CacheContract, { @@ -80,9 +64,7 @@ interface CacheContracts { /** * Updates the details of the cache specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("Cache_Update") update is ArmCustomPatchSync< CacheContract, CacheUpdateParameters, @@ -100,8 +82,6 @@ interface CacheContracts { /** * Deletes specific Cache. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Cache_Delete") delete is ArmResourceDeleteSync< CacheContract, { @@ -118,8 +98,6 @@ interface CacheContracts { /** * Lists a collection of all external Caches in the specified service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Cache_ListByService") listByService is ArmResourceListByParent< CacheContract, { @@ -141,23 +119,7 @@ interface CacheContracts { >; } -@@encodedName(CacheContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(CacheContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(CacheContracts.createOrUpdate::parameters.resource, "Create or Update parameters." ); -@@encodedName(CacheContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(CacheContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(CacheContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp index c9282fe490..3ca7066124 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp @@ -15,14 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Certificate details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - CertificateContractProperties -) -model CertificateContract extends ProxyResourceBase { +model CertificateContract is ProxyResource { /** * Identifier of the certificate entity. Must be unique in the current API Management service instance. */ @@ -34,12 +28,6 @@ model CertificateContract extends ProxyResourceBase { @segment("certificates") @visibility("read") name: string; - - /** - * Certificate properties details. - */ - @extension("x-ms-client-flatten", true) - properties?: CertificateContractProperties; } @armResourceOperations @@ -47,16 +35,12 @@ interface CertificateContracts { /** * Gets the details of the certificate specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Certificate_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the certificate specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("Certificate_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< CertificateContract, @@ -67,8 +51,6 @@ interface CertificateContracts { /** * Creates or updates the certificate being used for authentication with the backend. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Certificate_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< CertificateContract, { @@ -85,8 +67,6 @@ interface CertificateContracts { /** * Deletes specific certificate. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Certificate_Delete") delete is ArmResourceDeleteSync< CertificateContract, { @@ -103,8 +83,6 @@ interface CertificateContracts { /** * Lists a collection of all certificates in the specified service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Certificate_ListByService") listByService is ArmResourceListByParent< CertificateContract, { @@ -140,8 +118,6 @@ interface CertificateContracts { /** * From KeyVault, Refresh the certificate being used for authentication with the backend. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Certificate_RefreshSecret") refreshSecret is ArmResourceActionSync< CertificateContract, void, @@ -149,14 +125,6 @@ interface CertificateContracts { >; } -@@encodedName(CertificateContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(CertificateContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(CertificateContracts.createOrUpdate::parameters.resource, "Create or Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp index 60d78184c0..342be45d85 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp @@ -14,15 +14,10 @@ namespace Azure.ResourceManager.ApiManagement; /** * Deleted API Management Service information. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource @parentResource("SubscriptionLocationResource") -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - DeletedServiceContractProperties -) -model DeletedServiceContract extends ProxyResourceBase { +model DeletedServiceContract + is ProxyResource { /** * The name of the API Management service. */ @@ -34,12 +29,6 @@ model DeletedServiceContract extends ProxyResourceBase { @segment("deletedservices") @visibility("read") name: string; - - /** - * Deleted API Management Service details. - */ - @extension("x-ms-client-flatten", true) - properties?: DeletedServiceContractProperties; } @armResourceOperations @@ -47,21 +36,15 @@ interface DeletedServiceContracts { /** * Get soft-deleted Api Management Service by name. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("DeletedServices_GetByName") getByName is ArmResourceRead; /** * Purges Api Management Service (deletes it with no option to undelete). */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("DeletedServices_Purge") purge is ArmResourceDeleteAsync; /** * Lists all soft-deleted services available for undelete for the given subscription. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("DeletedServices_ListBySubscription") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp index 8027967888..5292addc4b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Diagnostic details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(DiagnosticContractProperties) -model DiagnosticContract extends ProxyResourceBase { +model DiagnosticContract is ProxyResource { /** * Diagnostic identifier. Must be unique in the current API Management service instance. */ @@ -32,12 +28,6 @@ model DiagnosticContract extends ProxyResourceBase { @segment("diagnostics") @visibility("read") name: string; - - /** - * Diagnostic entity contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: DiagnosticContractProperties; } @armResourceOperations @@ -45,16 +35,12 @@ interface DiagnosticContracts { /** * Gets the details of the Diagnostic for an API specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiDiagnostic_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("ApiDiagnostic_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< DiagnosticContract, @@ -65,8 +51,6 @@ interface DiagnosticContracts { /** * Creates a new Diagnostic for an API or updates an existing one. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiDiagnostic_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< DiagnosticContract, { @@ -83,9 +67,7 @@ interface DiagnosticContracts { /** * Updates the details of the Diagnostic for an API specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("ApiDiagnostic_Update") update is ArmCustomPatchSync< DiagnosticContract, DiagnosticContract, @@ -103,8 +85,6 @@ interface DiagnosticContracts { /** * Deletes the specified Diagnostic from an API. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiDiagnostic_Delete") delete is ArmResourceDeleteSync< DiagnosticContract, { @@ -121,8 +101,6 @@ interface DiagnosticContracts { /** * Lists all diagnostics of an API. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiDiagnostic_ListByService") listByService is ArmResourceListByParent< DiagnosticContract, { @@ -150,25 +128,9 @@ interface DiagnosticContracts { >; } -@@encodedName(DiagnosticContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(DiagnosticContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(DiagnosticContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@encodedName(DiagnosticContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(DiagnosticContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(DiagnosticContracts.update::parameters.properties, "Diagnostic Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp index 29dbd9b454..ab8f1fe538 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp @@ -15,14 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Email Template details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - EmailTemplateContractProperties -) -model EmailTemplateContract extends ProxyResourceBase { +model EmailTemplateContract is ProxyResource { /** * Email Template Name Identifier. */ @@ -31,12 +25,6 @@ model EmailTemplateContract extends ProxyResourceBase { @segment("templates") @visibility("read") name: TemplateName; - - /** - * Email Template entity contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: EmailTemplateContractProperties; } @armResourceOperations @@ -44,16 +32,12 @@ interface EmailTemplateContracts { /** * Gets the details of the email template specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("EmailTemplate_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the email template specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("EmailTemplate_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< EmailTemplateContract, @@ -64,8 +48,6 @@ interface EmailTemplateContracts { /** * Updates an Email Template. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("EmailTemplate_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< EmailTemplateContract, { @@ -82,9 +64,7 @@ interface EmailTemplateContracts { /** * Updates API Management email template */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("EmailTemplate_Update") update is ArmCustomPatchSync< EmailTemplateContract, EmailTemplateUpdateParameters, @@ -102,8 +82,6 @@ interface EmailTemplateContracts { /** * Reset the Email Template to default template provided by the API Management service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("EmailTemplate_Delete") delete is ArmResourceDeleteSync< EmailTemplateContract, { @@ -120,8 +98,6 @@ interface EmailTemplateContracts { /** * Gets all email templates */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("EmailTemplate_ListByService") listByService is ArmResourceListByParent< EmailTemplateContract, { @@ -149,25 +125,9 @@ interface EmailTemplateContracts { >; } -@@encodedName(EmailTemplateContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(EmailTemplateContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(EmailTemplateContracts.createOrUpdate::parameters.resource, "Email Template update parameters." ); -@@encodedName(EmailTemplateContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(EmailTemplateContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(EmailTemplateContracts.update::parameters.properties, "Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp index 356e09e5c8..71bf092d3f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp @@ -15,14 +15,9 @@ namespace Azure.ResourceManager.ApiManagement; /** * Gateway certificate authority details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(GatewayContract) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - GatewayCertificateAuthorityContractProperties -) -model GatewayCertificateAuthorityContract extends ProxyResourceBase { +model GatewayCertificateAuthorityContract + is ProxyResource { /** * Identifier of the certificate entity. Must be unique in the current API Management service instance. */ @@ -34,12 +29,6 @@ model GatewayCertificateAuthorityContract extends ProxyResourceBase { @segment("certificateAuthorities") @visibility("read") name: string; - - /** - * Gateway certificate authority details. - */ - @extension("x-ms-client-flatten", true) - properties?: GatewayCertificateAuthorityContractProperties; } @armResourceOperations @@ -47,16 +36,12 @@ interface GatewayCertificateAuthorityContracts { /** * Get assigned Gateway Certificate Authority details. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("GatewayCertificateAuthority_Get") get is ArmResourceRead; /** * Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("GatewayCertificateAuthority_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GatewayCertificateAuthorityContract, @@ -67,8 +52,6 @@ interface GatewayCertificateAuthorityContracts { /** * Assign Certificate entity to Gateway entity as Certificate Authority. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("GatewayCertificateAuthority_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayCertificateAuthorityContract, { @@ -85,8 +68,6 @@ interface GatewayCertificateAuthorityContracts { /** * Remove relationship between Certificate Authority and Gateway entity. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("GatewayCertificateAuthority_Delete") delete is ArmResourceDeleteSync< GatewayCertificateAuthorityContract, { @@ -103,8 +84,6 @@ interface GatewayCertificateAuthorityContracts { /** * Lists the collection of Certificate Authorities for the specified Gateway entity. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("GatewayCertificateAuthority_ListByService") listByService is ArmResourceListByParent< GatewayCertificateAuthorityContract, { @@ -132,14 +111,6 @@ interface GatewayCertificateAuthorityContracts { >; } -@@encodedName(GatewayCertificateAuthorityContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(GatewayCertificateAuthorityContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(GatewayCertificateAuthorityContracts.createOrUpdate::parameters.resource, "" ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp index 5f2499f8a6..eb8521f31c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Gateway details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(GatewayContractProperties) -model GatewayContract extends ProxyResourceBase { +model GatewayContract is ProxyResource { /** * Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed' */ @@ -31,12 +27,6 @@ model GatewayContract extends ProxyResourceBase { @segment("gateways") @visibility("read") name: string; - - /** - * Gateway details. - */ - @extension("x-ms-client-flatten", true) - properties?: GatewayContractProperties; } @armResourceOperations @@ -44,16 +34,12 @@ interface GatewayContracts { /** * Gets the details of the Gateway specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Gateway_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the Gateway specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("Gateway_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GatewayContract, @@ -64,8 +50,6 @@ interface GatewayContracts { /** * Creates or updates a Gateway to be used in Api Management instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Gateway_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayContract, { @@ -82,9 +66,7 @@ interface GatewayContracts { /** * Updates the details of the gateway specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("Gateway_Update") update is ArmCustomPatchSync< GatewayContract, GatewayContract, @@ -102,8 +84,6 @@ interface GatewayContracts { /** * Deletes specific Gateway. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Gateway_Delete") delete is ArmResourceDeleteSync< GatewayContract, { @@ -120,8 +100,6 @@ interface GatewayContracts { /** * Lists a collection of gateways registered with service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Gateway_ListByService") listByService is ArmResourceListByParent< GatewayContract, { @@ -151,15 +129,11 @@ interface GatewayContracts { /** * Retrieves gateway keys. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Gateway_ListKeys") listKeys is ArmResourceActionSync; /** * Regenerates specified gateway key invalidating any tokens created with it. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Gateway_RegenerateKey") regenerateKey is ArmResourceActionNoContentSync< GatewayContract, GatewayKeyRegenerationRequestContract @@ -168,8 +142,6 @@ interface GatewayContracts { /** * Gets the Shared Access Authorization Token for the gateway. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Gateway_GenerateToken") generateToken is ArmResourceActionSync< GatewayContract, GatewayTokenRequestContract, @@ -180,8 +152,6 @@ interface GatewayContracts { * Lists a collection of the APIs associated with a gateway. */ // FIXME: GatewayApi_ListByService could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("GatewayApi_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis") @get listByService( @@ -228,39 +198,7 @@ interface GatewayContracts { ): ArmResponse | ErrorResponse; } -@@encodedName(GatewayContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(GatewayContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(GatewayContracts.createOrUpdate::parameters.resource, ""); -@@encodedName(GatewayContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(GatewayContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(GatewayContracts.update::parameters.properties, ""); -@@encodedName(GatewayContracts.regenerateKey::parameters.body, - "application/json", - "parameters" -); -@@extension(GatewayContracts.regenerateKey::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(GatewayContracts.regenerateKey::parameters.body, ""); -@@encodedName(GatewayContracts.generateToken::parameters.body, - "application/json", - "parameters" -); -@@extension(GatewayContracts.generateToken::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(GatewayContracts.generateToken::parameters.body, ""); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp index daa553bf4e..e66daab163 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp @@ -15,14 +15,9 @@ namespace Azure.ResourceManager.ApiManagement; /** * Gateway hostname configuration details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(GatewayContract) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - GatewayHostnameConfigurationContractProperties -) -model GatewayHostnameConfigurationContract extends ProxyResourceBase { +model GatewayHostnameConfigurationContract + is ProxyResource { /** * Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. */ @@ -33,12 +28,6 @@ model GatewayHostnameConfigurationContract extends ProxyResourceBase { @segment("hostnameConfigurations") @visibility("read") name: string; - - /** - * Gateway hostname configuration details. - */ - @extension("x-ms-client-flatten", true) - properties?: GatewayHostnameConfigurationContractProperties; } @armResourceOperations @@ -46,16 +35,12 @@ interface GatewayHostnameConfigurationContracts { /** * Get details of a hostname configuration */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("GatewayHostnameConfiguration_Get") get is ArmResourceRead; /** * Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("GatewayHostnameConfiguration_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GatewayHostnameConfigurationContract, @@ -66,8 +51,6 @@ interface GatewayHostnameConfigurationContracts { /** * Creates of updates hostname configuration for a Gateway. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("GatewayHostnameConfiguration_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayHostnameConfigurationContract, { @@ -84,8 +67,6 @@ interface GatewayHostnameConfigurationContracts { /** * Deletes the specified hostname configuration from the specified Gateway. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("GatewayHostnameConfiguration_Delete") delete is ArmResourceDeleteSync< GatewayHostnameConfigurationContract, { @@ -102,8 +83,6 @@ interface GatewayHostnameConfigurationContracts { /** * Lists the collection of hostname configurations for the specified gateway. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("GatewayHostnameConfiguration_ListByService") listByService is ArmResourceListByParent< GatewayHostnameConfigurationContract, { @@ -131,14 +110,6 @@ interface GatewayHostnameConfigurationContracts { >; } -@@encodedName(GatewayHostnameConfigurationContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(GatewayHostnameConfigurationContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(GatewayHostnameConfigurationContracts.createOrUpdate::parameters.resource, "" ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp index d137fc79e6..d6ac13c225 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp @@ -15,14 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Global Schema Contract details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - GlobalSchemaContractProperties -) -model GlobalSchemaContract extends ProxyResourceBase { +model GlobalSchemaContract is ProxyResource { /** * Schema id identifier. Must be unique in the current API Management service instance. */ @@ -33,12 +27,6 @@ model GlobalSchemaContract extends ProxyResourceBase { @segment("schemas") @visibility("read") name: string; - - /** - * Properties of the Global Schema. - */ - @extension("x-ms-client-flatten", true) - properties?: GlobalSchemaContractProperties; } @armResourceOperations @@ -46,16 +34,12 @@ interface GlobalSchemaContracts { /** * Gets the details of the Schema specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("GlobalSchema_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the Schema specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("GlobalSchema_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GlobalSchemaContract, @@ -66,8 +50,6 @@ interface GlobalSchemaContracts { /** * Creates new or updates existing specified Schema of the API Management service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("GlobalSchema_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync< GlobalSchemaContract, { @@ -84,8 +66,6 @@ interface GlobalSchemaContracts { /** * Deletes specific Schema. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("GlobalSchema_Delete") delete is ArmResourceDeleteSync< GlobalSchemaContract, { @@ -102,8 +82,6 @@ interface GlobalSchemaContracts { /** * Lists a collection of schemas registered with service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("GlobalSchema_ListByService") listByService is ArmResourceListByParent< GlobalSchemaContract, { @@ -131,14 +109,6 @@ interface GlobalSchemaContracts { >; } -@@encodedName(GlobalSchemaContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(GlobalSchemaContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(GlobalSchemaContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp index 2176bd019b..2ff56ff149 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Contract details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(GroupContractProperties) -model GroupContract extends ProxyResourceBase { +model GroupContract is ProxyResource { /** * Group identifier. Must be unique in the current API Management service instance. */ @@ -31,12 +27,6 @@ model GroupContract extends ProxyResourceBase { @segment("groups") @visibility("read") name: string; - - /** - * Group entity contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: GroupContractProperties; } @armResourceOperations @@ -44,16 +34,12 @@ interface GroupContracts { /** * Gets the details of the group specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Group_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the group specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("Group_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; @@ -61,8 +47,6 @@ interface GroupContracts { /** * Creates or Updates a group. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Group_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GroupContract, { @@ -79,9 +63,7 @@ interface GroupContracts { /** * Updates the details of the group specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("Group_Update") update is ArmCustomPatchSync< GroupContract, GroupUpdateParameters, @@ -99,8 +81,6 @@ interface GroupContracts { /** * Deletes specific group of the API Management service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Group_Delete") delete is ArmResourceDeleteSync< GroupContract, { @@ -117,8 +97,6 @@ interface GroupContracts { /** * Lists a collection of groups defined within a service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Group_ListByService") listByService is ArmResourceListByParent< GroupContract, { @@ -149,8 +127,6 @@ interface GroupContracts { * Lists a collection of user entities associated with the group. */ // FIXME: GroupUser_List could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("GroupUser_List") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users") @get list( @@ -197,21 +173,5 @@ interface GroupContracts { ): ArmResponse | ErrorResponse; } -@@encodedName(GroupContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(GroupContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(GroupContracts.createOrUpdate::parameters.resource, "Create parameters."); -@@encodedName(GroupContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(GroupContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(GroupContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp index 66002fcd65..a4a4e31805 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp @@ -15,14 +15,9 @@ namespace Azure.ResourceManager.ApiManagement; /** * Identity Provider details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - IdentityProviderContractProperties -) -model IdentityProviderContract extends ProxyResourceBase { +model IdentityProviderContract + is ProxyResource { /** * Identity Provider Type identifier. */ @@ -31,12 +26,6 @@ model IdentityProviderContract extends ProxyResourceBase { @segment("identityProviders") @visibility("read") name: IdentityProviderType; - - /** - * Identity Provider contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: IdentityProviderContractProperties; } @armResourceOperations @@ -44,16 +33,12 @@ interface IdentityProviderContracts { /** * Gets the configuration details of the identity Provider configured in specified service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("IdentityProvider_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the identityProvider specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("IdentityProvider_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< IdentityProviderContract, @@ -64,8 +49,6 @@ interface IdentityProviderContracts { /** * Creates or Updates the IdentityProvider configuration. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("IdentityProvider_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IdentityProviderContract, { @@ -82,9 +65,7 @@ interface IdentityProviderContracts { /** * Updates an existing IdentityProvider configuration. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("IdentityProvider_Update") update is ArmCustomPatchSync< IdentityProviderContract, IdentityProviderUpdateParameters, @@ -102,8 +83,6 @@ interface IdentityProviderContracts { /** * Deletes the specified identity provider configuration. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("IdentityProvider_Delete") delete is ArmResourceDeleteSync< IdentityProviderContract, { @@ -120,15 +99,11 @@ interface IdentityProviderContracts { /** * Lists a collection of Identity Provider configured in the specified service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("IdentityProvider_ListByService") listByService is ArmResourceListByParent; /** * Gets the client secret details of the Identity Provider. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("IdentityProvider_ListSecrets") listSecrets is ArmResourceActionSync< IdentityProviderContract, void, @@ -136,25 +111,9 @@ interface IdentityProviderContracts { >; } -@@encodedName(IdentityProviderContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(IdentityProviderContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(IdentityProviderContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@encodedName(IdentityProviderContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(IdentityProviderContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(IdentityProviderContracts.update::parameters.properties, "Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp index 3f65616092..f3f70e6ff4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp @@ -15,14 +15,9 @@ namespace Azure.ResourceManager.ApiManagement; /** * Issue Attachment Contract details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(IssueContract) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - IssueAttachmentContractProperties -) -model IssueAttachmentContract extends ProxyResourceBase { +model IssueAttachmentContract + is ProxyResource { /** * Attachment identifier within an Issue. Must be unique in the current Issue. */ @@ -34,12 +29,6 @@ model IssueAttachmentContract extends ProxyResourceBase { @segment("attachments") @visibility("read") name: string; - - /** - * Properties of the Issue Attachment. - */ - @extension("x-ms-client-flatten", true) - properties?: IssueAttachmentContractProperties; } @armResourceOperations @@ -47,16 +36,12 @@ interface IssueAttachmentContracts { /** * Gets the details of the issue Attachment for an API specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiIssueAttachment_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("ApiIssueAttachment_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< IssueAttachmentContract, @@ -67,8 +52,6 @@ interface IssueAttachmentContracts { /** * Creates a new Attachment for the Issue in an API or updates an existing one. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiIssueAttachment_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IssueAttachmentContract, { @@ -85,8 +68,6 @@ interface IssueAttachmentContracts { /** * Deletes the specified comment from an Issue. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiIssueAttachment_Delete") delete is ArmResourceDeleteSync< IssueAttachmentContract, { @@ -103,8 +84,6 @@ interface IssueAttachmentContracts { /** * Lists all attachments for the Issue associated with the specified API. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiIssueAttachment_ListByService") listByService is ArmResourceListByParent< IssueAttachmentContract, { @@ -132,14 +111,6 @@ interface IssueAttachmentContracts { >; } -@@encodedName(IssueAttachmentContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(IssueAttachmentContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(IssueAttachmentContracts.createOrUpdate::parameters.resource, "Create parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp index b25aa4a469..0828649fbd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp @@ -15,14 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Issue Comment Contract details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(IssueContract) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - IssueCommentContractProperties -) -model IssueCommentContract extends ProxyResourceBase { +model IssueCommentContract is ProxyResource { /** * Comment identifier within an Issue. Must be unique in the current Issue. */ @@ -34,12 +28,6 @@ model IssueCommentContract extends ProxyResourceBase { @segment("comments") @visibility("read") name: string; - - /** - * Properties of the Issue Comment. - */ - @extension("x-ms-client-flatten", true) - properties?: IssueCommentContractProperties; } @armResourceOperations @@ -47,16 +35,12 @@ interface IssueCommentContracts { /** * Gets the details of the issue Comment for an API specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiIssueComment_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("ApiIssueComment_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< IssueCommentContract, @@ -67,8 +51,6 @@ interface IssueCommentContracts { /** * Creates a new Comment for the Issue in an API or updates an existing one. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiIssueComment_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IssueCommentContract, { @@ -85,8 +67,6 @@ interface IssueCommentContracts { /** * Deletes the specified comment from an Issue. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiIssueComment_Delete") delete is ArmResourceDeleteSync< IssueCommentContract, { @@ -103,8 +83,6 @@ interface IssueCommentContracts { /** * Lists all comments for the Issue associated with the specified API. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiIssueComment_ListByService") listByService is ArmResourceListByParent< IssueCommentContract, { @@ -132,14 +110,6 @@ interface IssueCommentContracts { >; } -@@encodedName(IssueCommentContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(IssueCommentContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(IssueCommentContracts.createOrUpdate::parameters.resource, "Create parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp index 9c7d6dc99d..000409fed0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Issue Contract details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(IssueContractProperties) -model IssueContract extends ProxyResourceBase { +model IssueContract is ProxyResource { /** * Issue identifier. Must be unique in the current API Management service instance. */ @@ -32,12 +28,6 @@ model IssueContract extends ProxyResourceBase { @segment("issues") @visibility("read") name: string; - - /** - * Properties of the Issue. - */ - @extension("x-ms-client-flatten", true) - properties?: IssueContractProperties; } @armResourceOperations @@ -45,8 +35,6 @@ interface IssueContracts { /** * Gets the details of the Issue for an API specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiIssue_Get") get is ArmResourceRead< IssueContract, { @@ -63,9 +51,7 @@ interface IssueContracts { /** * Gets the entity state (Etag) version of the Issue for an API specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("ApiIssue_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; @@ -73,8 +59,6 @@ interface IssueContracts { /** * Creates a new Issue for an API or updates an existing one. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiIssue_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IssueContract, { @@ -91,9 +75,7 @@ interface IssueContracts { /** * Updates an existing issue for an API. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("ApiIssue_Update") update is ArmCustomPatchSync< IssueContract, IssueUpdateContract, @@ -111,8 +93,6 @@ interface IssueContracts { /** * Deletes the specified Issue from an API. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiIssue_Delete") delete is ArmResourceDeleteSync< IssueContract, { @@ -129,8 +109,6 @@ interface IssueContracts { /** * Lists all issues associated with the specified API. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiIssue_ListByService") listByService is ArmResourceListByParent< IssueContract, { @@ -164,21 +142,5 @@ interface IssueContracts { >; } -@@encodedName(IssueContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(IssueContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(IssueContracts.createOrUpdate::parameters.resource, "Create parameters."); -@@encodedName(IssueContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(IssueContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(IssueContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp index 0f541ca7af..8cbb7b1ef8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Logger details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(LoggerContractProperties) -model LoggerContract extends ProxyResourceBase { +model LoggerContract is ProxyResource { /** * Logger identifier. Must be unique in the API Management service instance. */ @@ -31,12 +27,6 @@ model LoggerContract extends ProxyResourceBase { @segment("loggers") @visibility("read") name: string; - - /** - * Logger entity contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: LoggerContractProperties; } @armResourceOperations @@ -44,16 +34,12 @@ interface LoggerContracts { /** * Gets the details of the logger specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Logger_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the logger specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("Logger_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< LoggerContract, @@ -64,8 +50,6 @@ interface LoggerContracts { /** * Creates or Updates a logger. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Logger_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< LoggerContract, { @@ -82,9 +66,7 @@ interface LoggerContracts { /** * Updates an existing logger. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("Logger_Update") update is ArmCustomPatchSync< LoggerContract, LoggerUpdateContract, @@ -102,8 +84,6 @@ interface LoggerContracts { /** * Deletes the specified logger. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Logger_Delete") delete is ArmResourceDeleteSync< LoggerContract, { @@ -120,8 +100,6 @@ interface LoggerContracts { /** * Lists a collection of loggers in the specified service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Logger_ListByService") listByService is ArmResourceListByParent< LoggerContract, { @@ -149,23 +127,7 @@ interface LoggerContracts { >; } -@@encodedName(LoggerContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(LoggerContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(LoggerContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@encodedName(LoggerContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(LoggerContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(LoggerContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp index 332cd1c720..b8476b1355 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * NamedValue details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(NamedValueContractProperties) -model NamedValueContract extends ProxyResourceBase { +model NamedValueContract is ProxyResource { /** * Identifier of the NamedValue. */ @@ -31,12 +27,6 @@ model NamedValueContract extends ProxyResourceBase { @segment("namedValues") @visibility("read") name: string; - - /** - * NamedValue entity contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: NamedValueContractProperties; } @armResourceOperations @@ -44,16 +34,12 @@ interface NamedValueContracts { /** * Gets the details of the named value specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("NamedValue_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the named value specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("NamedValue_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< NamedValueContract, @@ -64,8 +50,6 @@ interface NamedValueContracts { /** * Creates or updates named value. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("NamedValue_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync< NamedValueContract, { @@ -82,9 +66,7 @@ interface NamedValueContracts { /** * Updates the specific named value. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("NamedValue_Update") update is ArmCustomPatchAsync< NamedValueContract, NamedValueUpdateParameters, @@ -102,8 +84,6 @@ interface NamedValueContracts { /** * Deletes specific named value from the API Management service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("NamedValue_Delete") delete is ArmResourceDeleteSync< NamedValueContract, { @@ -120,8 +100,6 @@ interface NamedValueContracts { /** * Lists a collection of named values defined within a service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("NamedValue_ListByService") listByService is ArmResourceListByParent< NamedValueContract, { @@ -157,8 +135,6 @@ interface NamedValueContracts { /** * Gets the secret of the named value specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("NamedValue_ListValue") listValue is ArmResourceActionSync< NamedValueContract, void, @@ -168,8 +144,6 @@ interface NamedValueContracts { /** * Refresh the secret of the named value specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("NamedValue_RefreshSecret") refreshSecret is ArmResourceActionAsync< NamedValueContract, void, @@ -177,23 +151,7 @@ interface NamedValueContracts { >; } -@@encodedName(NamedValueContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(NamedValueContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(NamedValueContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@encodedName(NamedValueContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(NamedValueContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(NamedValueContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp index 6c242c617c..277a95cef6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp @@ -15,14 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Notification details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - NotificationContractProperties -) -model NotificationContract extends ProxyResourceBase { +model NotificationContract is ProxyResource { /** * Notification Name Identifier. */ @@ -31,12 +25,6 @@ model NotificationContract extends ProxyResourceBase { @segment("notifications") @visibility("read") name: NotificationName; - - /** - * Notification entity contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: NotificationContractProperties; } @armResourceOperations @@ -44,15 +32,11 @@ interface NotificationContracts { /** * Gets the details of the Notification specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Notification_Get") get is ArmResourceRead; /** * Create or Update API Management publisher notification. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Notification_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< NotificationContract, { @@ -69,8 +53,6 @@ interface NotificationContracts { /** * Lists a collection of properties defined within a service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Notification_ListByService") listByService is ArmResourceListByParent< NotificationContract, { @@ -95,8 +77,6 @@ interface NotificationContracts { * Gets the list of the Notification Recipient User subscribed to the notification. */ // FIXME: NotificationRecipientUser_ListByNotification could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("NotificationRecipientUser_ListByNotification") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers") @get listByNotification( @@ -125,8 +105,6 @@ interface NotificationContracts { * Gets the list of the Notification Recipient Emails subscribed to a notification. */ // FIXME: NotificationRecipientEmail_ListByNotification could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("NotificationRecipientEmail_ListByNotification") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails") @get listByNotification( diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp index 4040116438..3b278b8a77 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp @@ -15,14 +15,9 @@ namespace Azure.ResourceManager.ApiManagement; /** * OpenId Connect Provider details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - OpenidConnectProviderContractProperties -) -model OpenidConnectProviderContract extends ProxyResourceBase { +model OpenidConnectProviderContract + is ProxyResource { /** * Identifier of the OpenID Connect Provider. */ @@ -33,12 +28,6 @@ model OpenidConnectProviderContract extends ProxyResourceBase { @segment("openidConnectProviders") @visibility("read") name: string; - - /** - * OpenId Connect Provider contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: OpenidConnectProviderContractProperties; } @armResourceOperations @@ -46,8 +35,6 @@ interface OpenidConnectProviderContracts { /** * Gets specific OpenID Connect Provider without secrets. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("OpenIdConnectProvider_Get") get is ArmResourceRead< OpenidConnectProviderContract, { @@ -66,8 +53,6 @@ interface OpenidConnectProviderContracts { /** * Creates or updates the OpenID Connect Provider. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("OpenIdConnectProvider_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< OpenidConnectProviderContract, { @@ -92,9 +77,7 @@ interface OpenidConnectProviderContracts { /** * Updates the specific OpenID Connect Provider. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("OpenIdConnectProvider_Update") update is ArmCustomPatchSync< OpenidConnectProviderContract, OpenidConnectProviderUpdateContract, @@ -120,8 +103,6 @@ interface OpenidConnectProviderContracts { /** * Deletes specific OpenID Connect Provider of the API Management service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("OpenIdConnectProvider_Delete") delete is ArmResourceDeleteSync< OpenidConnectProviderContract, { @@ -146,8 +127,6 @@ interface OpenidConnectProviderContracts { /** * Lists of all the OpenId Connect Providers. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("OpenIdConnectProvider_ListByService") listByService is ArmResourceListByParent< OpenidConnectProviderContract, { @@ -177,8 +156,6 @@ interface OpenidConnectProviderContracts { /** * Gets the client secret details of the OpenID Connect Provider. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("OpenIdConnectProvider_ListSecrets") listSecrets is ArmResourceActionSync< OpenidConnectProviderContract, void, @@ -197,25 +174,9 @@ interface OpenidConnectProviderContracts { >; } -@@encodedName(OpenidConnectProviderContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(OpenidConnectProviderContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(OpenidConnectProviderContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@encodedName(OpenidConnectProviderContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(OpenidConnectProviderContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(OpenidConnectProviderContracts.update::parameters.properties, "Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp index b02b046b40..c72073ef85 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * API Operation details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(OperationContractProperties) -model OperationContract extends ProxyResourceBase { +model OperationContract is ProxyResource { /** * Operation identifier within an API. Must be unique in the current API Management service instance. */ @@ -31,12 +27,6 @@ model OperationContract extends ProxyResourceBase { @segment("operations") @visibility("read") name: string; - - /** - * Properties of the Operation Contract. - */ - @extension("x-ms-client-flatten", true) - properties?: OperationContractProperties; } @armResourceOperations @@ -44,16 +34,12 @@ interface OperationContracts { /** * Gets the details of the API Operation specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiOperation_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the API operation specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("ApiOperation_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< OperationContract, @@ -64,8 +50,6 @@ interface OperationContracts { /** * Creates a new operation in the API or updates an existing one. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiOperation_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< OperationContract, { @@ -82,9 +66,7 @@ interface OperationContracts { /** * Updates the details of the operation in the API specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("ApiOperation_Update") update is ArmCustomPatchSync< OperationContract, OperationUpdateContract, @@ -102,8 +84,6 @@ interface OperationContracts { /** * Deletes the specified operation in the API. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiOperation_Delete") delete is ArmResourceDeleteSync< OperationContract, { @@ -120,8 +100,6 @@ interface OperationContracts { /** * Lists a collection of the operations for the specified API. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiOperation_ListByApi") listByApi is ArmResourceListByParent< OperationContract, { @@ -155,25 +133,9 @@ interface OperationContracts { >; } -@@encodedName(OperationContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(OperationContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(OperationContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@encodedName(OperationContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(OperationContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(OperationContracts.update::parameters.properties, "API Operation Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp index 67bcb01ed9..362937c23d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Policy Contract details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(OperationContract) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(PolicyContractProperties) -model PolicyContract extends ProxyResourceBase { +model PolicyContract is ProxyResource { /** * The identifier of the Policy. */ @@ -29,12 +25,6 @@ model PolicyContract extends ProxyResourceBase { @segment("policies") @visibility("read") name: PolicyIdName; - - /** - * Properties of the Policy. - */ - @extension("x-ms-client-flatten", true) - properties?: PolicyContractProperties; } @armResourceOperations @@ -42,8 +32,6 @@ interface PolicyContracts { /** * Get the policy configuration at the API Operation level. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiOperationPolicy_Get") get is ArmResourceRead< PolicyContract, { @@ -60,9 +48,7 @@ interface PolicyContracts { /** * Gets the entity state (Etag) version of the API operation policy specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("ApiOperationPolicy_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PolicyContract, @@ -73,8 +59,6 @@ interface PolicyContracts { /** * Creates or updates policy configuration for the API Operation level. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiOperationPolicy_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PolicyContract, { @@ -91,8 +75,6 @@ interface PolicyContracts { /** * Deletes the policy configuration at the Api Operation. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiOperationPolicy_Delete") delete is ArmResourceDeleteSync< PolicyContract, { @@ -109,19 +91,9 @@ interface PolicyContracts { /** * Get the list of policy configuration at the API Operation level. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiOperationPolicy_ListByOperation") listByOperation is ArmResourceListByParent; } -@@encodedName(PolicyContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(PolicyContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(PolicyContracts.createOrUpdate::parameters.resource, "The policy contents to apply." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp index 64a99eaa1c..24f2498cec 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp @@ -15,25 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Delegation settings for a developer portal. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("delegation") @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - PortalDelegationSettingsProperties -) -model PortalDelegationSettings extends ProxyResourceBase { +model PortalDelegationSettings + is ProxyResource { @key("portalsetting") @segment("portalsettings") @visibility("read") name: string; - - /** - * Delegation settings contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: PortalDelegationSettingsProperties; } @armResourceOperations @@ -41,16 +30,12 @@ interface PortalDelegationSettingsOperationGroup { /** * Get Delegation Settings for the Portal. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("DelegationSettings_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the DelegationSettings. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("DelegationSettings_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalDelegationSettings, @@ -61,8 +46,6 @@ interface PortalDelegationSettingsOperationGroup { /** * Create or Update Delegation settings. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("DelegationSettings_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PortalDelegationSettings, { @@ -79,9 +62,7 @@ interface PortalDelegationSettingsOperationGroup { /** * Update Delegation settings. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("DelegationSettings_Update") update is ArmCustomPatchSync< PortalDelegationSettings, PortalDelegationSettings, @@ -99,15 +80,11 @@ interface PortalDelegationSettingsOperationGroup { /** * Lists a collection of portalsettings defined within a service instance.. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PortalSettings_ListByService") listByService is ArmResourceListByParent; /** * Gets the secret validation key of the DelegationSettings. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("DelegationSettings_ListSecrets") listSecrets is ArmResourceActionSync< PortalDelegationSettings, void, @@ -115,25 +92,9 @@ interface PortalDelegationSettingsOperationGroup { >; } -@@encodedName(PortalDelegationSettingsOperationGroup.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(PortalDelegationSettingsOperationGroup.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(PortalDelegationSettingsOperationGroup.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@encodedName(PortalDelegationSettingsOperationGroup.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(PortalDelegationSettingsOperationGroup.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(PortalDelegationSettingsOperationGroup.update::parameters.properties, "Update Delegation settings." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp index 3744027da1..464dc25192 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp @@ -15,14 +15,9 @@ namespace Azure.ResourceManager.ApiManagement; /** * Portal Revision's contract details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - PortalRevisionContractProperties -) -model PortalRevisionContract extends ProxyResourceBase { +model PortalRevisionContract + is ProxyResource { /** * Portal revision identifier. Must be unique in the current API Management service instance. */ @@ -33,12 +28,6 @@ model PortalRevisionContract extends ProxyResourceBase { @segment("portalRevisions") @visibility("read") name: string; - - /** - * Properties of the portal revisions. - */ - @extension("x-ms-client-flatten", true) - properties?: PortalRevisionContractProperties; } @armResourceOperations @@ -46,16 +35,12 @@ interface PortalRevisionContracts { /** * Gets the developer portal's revision specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PortalRevision_Get") get is ArmResourceRead; /** * Gets the developer portal revision specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("PortalRevision_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalRevisionContract, @@ -66,16 +51,12 @@ interface PortalRevisionContracts { /** * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PortalRevision_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Updates the description of specified portal revision or makes it current. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("PortalRevision_Update") update is ArmCustomPatchAsync< PortalRevisionContract, PortalRevisionContract, @@ -93,8 +74,6 @@ interface PortalRevisionContracts { /** * Lists developer portal's revisions. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PortalRevision_ListByService") listByService is ArmResourceListByParent< PortalRevisionContract, { @@ -128,21 +107,5 @@ interface PortalRevisionContracts { >; } -@@encodedName(PortalRevisionContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(PortalRevisionContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(PortalRevisionContracts.createOrUpdate::parameters.resource, ""); -@@encodedName(PortalRevisionContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(PortalRevisionContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(PortalRevisionContracts.update::parameters.properties, ""); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp index 00bd38e827..6d267a073a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp @@ -15,25 +15,13 @@ namespace Azure.ResourceManager.ApiManagement; /** * Sign-In settings for the Developer Portal. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("signin") @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - PortalSigninSettingProperties -) -model PortalSigninSettings extends ProxyResourceBase { +model PortalSigninSettings is ProxyResource { @key("portalsetting") @segment("portalsettings") @visibility("read") name: string; - - /** - * Sign-in settings contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: PortalSigninSettingProperties; } @armResourceOperations @@ -41,16 +29,12 @@ interface PortalSigninSettingsOperationGroup { /** * Get Sign In Settings for the Portal */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("SignInSettings_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the SignInSettings. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("SignInSettings_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalSigninSettings, @@ -61,8 +45,6 @@ interface PortalSigninSettingsOperationGroup { /** * Create or Update Sign-In settings. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("SignInSettings_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PortalSigninSettings, { @@ -79,9 +61,7 @@ interface PortalSigninSettingsOperationGroup { /** * Update Sign-In settings. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("SignInSettings_Update") update is ArmCustomPatchSync< PortalSigninSettings, PortalSigninSettings, @@ -99,30 +79,12 @@ interface PortalSigninSettingsOperationGroup { /** * Lists a collection of portalsettings defined within a service instance.. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PortalSettings_ListByService") listByService is ArmResourceListByParent; } -@@encodedName(PortalSigninSettingsOperationGroup.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(PortalSigninSettingsOperationGroup.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(PortalSigninSettingsOperationGroup.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@encodedName(PortalSigninSettingsOperationGroup.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(PortalSigninSettingsOperationGroup.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(PortalSigninSettingsOperationGroup.update::parameters.properties, "Update Sign-In settings." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp index fda6c5b5de..06a900cb81 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp @@ -15,25 +15,13 @@ namespace Azure.ResourceManager.ApiManagement; /** * Sign-Up settings for a developer portal. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("signup") @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - PortalSignupSettingsProperties -) -model PortalSignupSettings extends ProxyResourceBase { +model PortalSignupSettings is ProxyResource { @key("portalsetting") @segment("portalsettings") @visibility("read") name: string; - - /** - * Sign-up settings contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: PortalSignupSettingsProperties; } @armResourceOperations @@ -41,16 +29,12 @@ interface PortalSignupSettingsOperationGroup { /** * Get Sign Up Settings for the Portal */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("SignUpSettings_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the SignUpSettings. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("SignUpSettings_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalSignupSettings, @@ -61,8 +45,6 @@ interface PortalSignupSettingsOperationGroup { /** * Create or Update Sign-Up settings. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("SignUpSettings_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PortalSignupSettings, { @@ -79,9 +61,7 @@ interface PortalSignupSettingsOperationGroup { /** * Update Sign-Up settings. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("SignUpSettings_Update") update is ArmCustomPatchSync< PortalSignupSettings, PortalSignupSettings, @@ -99,30 +79,12 @@ interface PortalSignupSettingsOperationGroup { /** * Lists a collection of portalsettings defined within a service instance.. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PortalSettings_ListByService") listByService is ArmResourceListByParent; } -@@encodedName(PortalSignupSettingsOperationGroup.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(PortalSignupSettingsOperationGroup.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(PortalSignupSettingsOperationGroup.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@encodedName(PortalSignupSettingsOperationGroup.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(PortalSignupSettingsOperationGroup.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(PortalSignupSettingsOperationGroup.update::parameters.properties, "Update Sign-Up settings." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp index f8c0de653c..41e499fa41 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp @@ -15,14 +15,9 @@ namespace Azure.ResourceManager.ApiManagement; /** * The Private Endpoint Connection resource. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - PrivateEndpointConnectionProperties -) -model PrivateEndpointConnection extends ProxyResourceBase { +model PrivateEndpointConnection + is ProxyResource { /** * Name of the private endpoint connection. */ @@ -31,12 +26,6 @@ model PrivateEndpointConnection extends ProxyResourceBase { @segment("privateEndpointConnections") @visibility("read") name: string; - - /** - * Resource properties. - */ - @extension("x-ms-client-flatten", true) - properties?: PrivateEndpointConnectionProperties; } @armResourceOperations @@ -44,38 +33,22 @@ interface PrivateEndpointConnections { /** * Gets the details of the Private Endpoint Connection specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PrivateEndpointConnection_GetByName") getByName is ArmResourceRead; /** * Creates a new Private Endpoint Connection or updates an existing one. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PrivateEndpointConnection_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Deletes the specified Private Endpoint Connection. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PrivateEndpointConnection_Delete") delete is ArmResourceDeleteAsync; /** * Lists all private endpoint connections of the API Management service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PrivateEndpointConnection_ListByService") listByService is ArmResourceListByParent; } -@@encodedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, - "application/json", - "privateEndpointConnectionRequest" -); -@@extension(PrivateEndpointConnections.createOrUpdate::parameters.resource, - "x-ms-client-name", - "privateEndpointConnectionRequest" -); @@doc(PrivateEndpointConnections.createOrUpdate::parameters.resource, ""); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp index 3e41c2f853..d5f9bf6cd0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp @@ -15,14 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * A private link resource */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - PrivateLinkResourceProperties -) -model PrivateLinkResource extends ProxyResourceBase { +model PrivateLinkResource is ProxyResource { /** * Name of the private link resource. */ @@ -31,12 +25,6 @@ model PrivateLinkResource extends ProxyResourceBase { @segment("privateLinkResources") @visibility("read") name: string; - - /** - * Resource properties. - */ - @extension("x-ms-client-flatten", true) - properties?: PrivateLinkResourceProperties; } @armResourceOperations @@ -44,14 +32,10 @@ interface PrivateLinkResources { /** * Gets the private link resources */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PrivateEndpointConnection_GetPrivateLinkResource") getPrivateLinkResource is ArmResourceRead; /** * Gets the private link resources */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PrivateEndpointConnection_ListPrivateLinkResources") listPrivateLinkResources is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp index 8bc7549d15..37acbe889a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Product details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(ProductContractProperties) -model ProductContract extends ProxyResourceBase { +model ProductContract is ProxyResource { /** * Product identifier. Must be unique in the current API Management service instance. */ @@ -31,12 +27,6 @@ model ProductContract extends ProxyResourceBase { @segment("products") @visibility("read") name: string; - - /** - * Product entity contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: ProductContractProperties; } @armResourceOperations @@ -44,16 +34,12 @@ interface ProductContracts { /** * Gets the details of the product specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Product_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the product specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("Product_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< ProductContract, @@ -64,8 +50,6 @@ interface ProductContracts { /** * Creates or Updates a product. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Product_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< ProductContract, { @@ -82,9 +66,7 @@ interface ProductContracts { /** * Update existing product details. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("Product_Update") update is ArmCustomPatchSync< ProductContract, ProductUpdateParameters, @@ -102,8 +84,6 @@ interface ProductContracts { /** * Delete product. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Product_Delete") delete is ArmResourceDeleteSync< ProductContract, { @@ -126,8 +106,6 @@ interface ProductContracts { /** * Lists a collection of products in the specified service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Product_ListByService") listByService is ArmResourceListByParent< ProductContract, { @@ -170,8 +148,6 @@ interface ProductContracts { * Lists a collection of the APIs associated with a product. */ // FIXME: ProductApi_ListByProduct could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ProductApi_ListByProduct") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis") @get listByProduct( @@ -221,8 +197,6 @@ interface ProductContracts { * Lists the collection of developer groups associated with the specified product. */ // FIXME: ProductGroup_ListByProduct could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ProductGroup_ListByProduct") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups") @get listByProduct( @@ -272,8 +246,6 @@ interface ProductContracts { * Lists the collection of subscriptions to the specified product. */ // FIXME: ProductSubscriptions_List could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ProductSubscriptions_List") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions") @get list( @@ -320,23 +292,7 @@ interface ProductContracts { ): ArmResponse> | ErrorResponse; } -@@encodedName(ProductContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(ProductContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(ProductContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@encodedName(ProductContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(ProductContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(ProductContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp index 23c934ad6d..7a60517261 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * API Schema Contract details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(SchemaContractProperties) -model SchemaContract extends ProxyResourceBase { +model SchemaContract is ProxyResource { /** * Schema id identifier. Must be unique in the current API Management service instance. */ @@ -31,12 +27,6 @@ model SchemaContract extends ProxyResourceBase { @segment("schemas") @visibility("read") name: string; - - /** - * Properties of the API Schema. - */ - @extension("x-ms-client-flatten", true) - properties?: SchemaContractProperties; } @armResourceOperations @@ -44,16 +34,12 @@ interface SchemaContracts { /** * Get the schema configuration at the API level. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiSchema_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the schema specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("ApiSchema_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< SchemaContract, @@ -64,8 +50,6 @@ interface SchemaContracts { /** * Creates or updates schema configuration for the API. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiSchema_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync< SchemaContract, { @@ -82,8 +66,6 @@ interface SchemaContracts { /** * Deletes the schema configuration at the Api. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiSchema_Delete") delete is ArmResourceDeleteSync< SchemaContract, { @@ -106,8 +88,6 @@ interface SchemaContracts { /** * Get the schema configuration at the API level. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiSchema_ListByApi") listByApi is ArmResourceListByParent< SchemaContract, { @@ -135,14 +115,6 @@ interface SchemaContracts { >; } -@@encodedName(SchemaContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(SchemaContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(SchemaContracts.createOrUpdate::parameters.resource, "The schema contents to apply." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp index aa7771a587..892c3cd82d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp @@ -15,14 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Subscription details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - SubscriptionContractProperties -) -model SubscriptionContract extends ProxyResourceBase { +model SubscriptionContract is ProxyResource { /** * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ @@ -31,12 +25,6 @@ model SubscriptionContract extends ProxyResourceBase { @segment("subscriptions") @visibility("read") name: string; - - /** - * Subscription contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: SubscriptionContractProperties; } @armResourceOperations @@ -44,16 +32,12 @@ interface SubscriptionContracts { /** * Gets the specified Subscription entity. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Subscription_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("Subscription_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< SubscriptionContract, @@ -64,8 +48,6 @@ interface SubscriptionContracts { /** * Creates or updates the subscription of specified user to the specified product. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Subscription_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< SubscriptionContract, { @@ -96,9 +78,7 @@ interface SubscriptionContracts { /** * Updates the details of a subscription specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("Subscription_Update") update is ArmCustomPatchSync< SubscriptionContract, SubscriptionUpdateParameters, @@ -130,8 +110,6 @@ interface SubscriptionContracts { /** * Deletes the specified subscription. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Subscription_Delete") delete is ArmResourceDeleteSync< SubscriptionContract, { @@ -148,8 +126,6 @@ interface SubscriptionContracts { /** * Lists all subscriptions of the API Management service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Subscription_List") list is ArmResourceListByParent< SubscriptionContract, { @@ -179,8 +155,6 @@ interface SubscriptionContracts { /** * Regenerates primary key of existing subscription of the API Management service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Subscription_RegeneratePrimaryKey") regeneratePrimaryKey is ArmResourceActionNoContentSync< SubscriptionContract, void @@ -189,8 +163,6 @@ interface SubscriptionContracts { /** * Regenerates secondary key of existing subscription of the API Management service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Subscription_RegenerateSecondaryKey") regenerateSecondaryKey is ArmResourceActionNoContentSync< SubscriptionContract, void @@ -199,8 +171,6 @@ interface SubscriptionContracts { /** * Gets the specified Subscription keys. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Subscription_ListSecrets") listSecrets is ArmResourceActionSync< SubscriptionContract, void, @@ -208,25 +178,9 @@ interface SubscriptionContracts { >; } -@@encodedName(SubscriptionContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(SubscriptionContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(SubscriptionContracts.createOrUpdate::parameters.resource, "Create parameters." ); -@@encodedName(SubscriptionContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(SubscriptionContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(SubscriptionContracts.update::parameters.properties, "Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp index 854ec1a34f..821a4d59ec 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * Tag Contract details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(OperationContract) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(TagContractProperties) -model TagContract extends ProxyResourceBase { +model TagContract is ProxyResource { /** * Tag identifier. Must be unique in the current API Management service instance. */ @@ -32,12 +28,6 @@ model TagContract extends ProxyResourceBase { @segment("tags") @visibility("read") name: string; - - /** - * Tag entity contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: TagContractProperties; } @armResourceOperations @@ -45,16 +35,12 @@ interface TagContracts { /** * Get tag associated with the Operation. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Tag_GetByOperation") getByOperation is ArmResourceRead; /** * Gets the entity state version of the tag specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("Tag_GetEntityStateByOperation") getEntityStateByOperation( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; @@ -62,22 +48,16 @@ interface TagContracts { /** * Assign tag to the Operation. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Tag_AssignToOperation") assignToOperation is ArmResourceCreateOrReplaceSync; /** * Detach the tag from the Operation. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Tag_DetachFromOperation") detachFromOperation is ArmResourceDeleteSync; /** * Lists all Tags associated with the Operation. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Tag_ListByOperation") listByOperation is ArmResourceListByParent< TagContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp index d2a3983192..0d963aa7f2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp @@ -15,14 +15,9 @@ namespace Azure.ResourceManager.ApiManagement; /** * Contract details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - TagDescriptionContractProperties -) -model TagDescriptionContract extends ProxyResourceBase { +model TagDescriptionContract + is ProxyResource { /** * Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. */ @@ -34,12 +29,6 @@ model TagDescriptionContract extends ProxyResourceBase { @segment("tagDescriptions") @visibility("read") name: string; - - /** - * TagDescription entity contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: TagDescriptionContractProperties; } @armResourceOperations @@ -47,16 +36,12 @@ interface TagDescriptionContracts { /** * Get Tag description in scope of API */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiTagDescription_Get") get is ArmResourceRead; /** * Gets the entity state version of the tag specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("ApiTagDescription_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< TagDescriptionContract, @@ -67,8 +52,6 @@ interface TagDescriptionContracts { /** * Create/Update tag description in scope of the Api. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiTagDescription_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< TagDescriptionContract, { @@ -85,8 +68,6 @@ interface TagDescriptionContracts { /** * Delete tag description for the Api. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiTagDescription_Delete") delete is ArmResourceDeleteSync< TagDescriptionContract, { @@ -103,8 +84,6 @@ interface TagDescriptionContracts { /** * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ApiTagDescription_ListByService") listByService is ArmResourceListByParent< TagDescriptionContract, { @@ -132,14 +111,6 @@ interface TagDescriptionContracts { >; } -@@encodedName(TagDescriptionContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(TagDescriptionContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(TagDescriptionContracts.createOrUpdate::parameters.resource, "Create parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp index ceb430debf..091b05f957 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp @@ -15,14 +15,9 @@ namespace Azure.ResourceManager.ApiManagement; /** * Tenant Settings. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - TenantSettingsContractProperties -) -model TenantSettingsContract extends ProxyResourceBase { +model TenantSettingsContract + is ProxyResource { /** * The identifier of the settings. */ @@ -31,12 +26,6 @@ model TenantSettingsContract extends ProxyResourceBase { @segment("settings") @visibility("read") name: SettingsTypeName; - - /** - * TenantSettings entity contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: TenantSettingsContractProperties; } @armResourceOperations @@ -44,15 +33,11 @@ interface TenantSettingsContracts { /** * Get tenant settings. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TenantSettings_Get") get is ArmResourceRead; /** * Public settings. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TenantSettings_ListByService") listByService is ArmResourceListByParent< TenantSettingsContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp index 1ee0818d0e..6bee08993b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp @@ -15,12 +15,8 @@ namespace Azure.ResourceManager.ApiManagement; /** * User details. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(UserContractProperties) -model UserContract extends ProxyResourceBase { +model UserContract is ProxyResource { /** * User identifier. Must be unique in the current API Management service instance. */ @@ -31,12 +27,6 @@ model UserContract extends ProxyResourceBase { @segment("users") @visibility("read") name: string; - - /** - * User entity contract properties. - */ - @extension("x-ms-client-flatten", true) - properties?: UserContractProperties; } @armResourceOperations @@ -44,16 +34,12 @@ interface UserContracts { /** * Gets the details of the user specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("User_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the user specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head - @operationId("User_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; @@ -61,8 +47,6 @@ interface UserContracts { /** * Creates or Updates a user. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("User_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< UserContract, { @@ -85,9 +69,7 @@ interface UserContracts { /** * Updates the details of the user specified by its identifier. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("User_Update") update is ArmCustomPatchSync< UserContract, UserUpdateParameters, @@ -105,8 +87,6 @@ interface UserContracts { /** * Deletes specific user. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("User_Delete") delete is ArmResourceDeleteSync< UserContract, { @@ -141,8 +121,6 @@ interface UserContracts { /** * Lists a collection of registered users in the specified service instance. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("User_ListByService") listByService is ArmResourceListByParent< UserContract, { @@ -178,8 +156,6 @@ interface UserContracts { /** * Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("User_GenerateSsoUrl") generateSsoUrl is ArmResourceActionSync< UserContract, void, @@ -189,8 +165,6 @@ interface UserContracts { /** * Gets the Shared Access Authorization Token for the User. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("User_GetSharedAccessToken") getSharedAccessToken is ArmResourceActionSync< UserContract, UserTokenParameters, @@ -200,8 +174,6 @@ interface UserContracts { /** * Sends confirmation */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("UserConfirmationPassword_Send") send is ArmResourceActionNoContentSync< UserContract, void, @@ -220,8 +192,6 @@ interface UserContracts { * Lists all user groups. */ // FIXME: UserGroup_List could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("UserGroup_List") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups") @get list( @@ -271,8 +241,6 @@ interface UserContracts { * List of all user identities. */ // FIXME: UserIdentities_List could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("UserIdentities_List") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities") @get list( @@ -300,34 +268,10 @@ interface UserContracts { ): ArmResponse | ErrorResponse; } -@@encodedName(UserContracts.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(UserContracts.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(UserContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); -@@encodedName(UserContracts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(UserContracts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(UserContracts.update::parameters.properties, "Update parameters."); -@@encodedName(UserContracts.getSharedAccessToken::parameters.body, - "application/json", - "parameters" -); -@@extension(UserContracts.getSharedAccessToken::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(UserContracts.getSharedAccessToken::parameters.body, "Create Authorization Token parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp index 82f8ff2a1f..f92a0bed9e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp @@ -106,7 +106,7 @@ interface RoleAssignments { } @@encodedName(RoleAssignments.create::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(RoleAssignments.create::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp index 9bbd5205d7..50f17a1b13 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp @@ -83,7 +83,7 @@ interface RoleAssignmentScheduleRequests { } @@encodedName(RoleAssignmentScheduleRequests.create::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(RoleAssignmentScheduleRequests.create::parameters.resource, @@ -94,7 +94,7 @@ interface RoleAssignmentScheduleRequests { "Parameters for the role assignment schedule request." ); @@encodedName(RoleAssignmentScheduleRequests.validate::parameters.body, - "application/json", + "json", "parameters" ); @@extension(RoleAssignmentScheduleRequests.validate::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp index 3f2bb6cc7b..5d6b71781c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp @@ -72,7 +72,7 @@ interface RoleDefinitions { } @@encodedName(RoleDefinitions.createOrUpdate::parameters.resource, - "application/json", + "json", "roleDefinition" ); @@extension(RoleDefinitions.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp index d78d589b3b..7f6edf3fd8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp @@ -83,7 +83,7 @@ interface RoleEligibilityScheduleRequests { } @@encodedName(RoleEligibilityScheduleRequests.create::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(RoleEligibilityScheduleRequests.create::parameters.resource, @@ -94,7 +94,7 @@ interface RoleEligibilityScheduleRequests { "Parameters for the role eligibility schedule request." ); @@encodedName(RoleEligibilityScheduleRequests.validate::parameters.body, - "application/json", + "json", "parameters" ); @@extension(RoleEligibilityScheduleRequests.validate::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp index f8ca09ee6e..a1546b081d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp @@ -59,7 +59,7 @@ interface RoleManagementPolicies { } @@encodedName(RoleManagementPolicies.update::parameters.properties, - "application/json", + "json", "parameters" ); @@extension(RoleManagementPolicies.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp index dd923a5701..fc3a6ce951 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp @@ -58,7 +58,7 @@ interface RoleManagementPolicyAssignments { } @@encodedName(RoleManagementPolicyAssignments.create::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(RoleManagementPolicyAssignments.create::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp index ac6a65988d..16193a8d56 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp @@ -54,8 +54,6 @@ interface Applications { /** * List Application resources by Space */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Applications_ListBySpace") listBySpace is ArmResourceListByParent< Application, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp index 1ce9d54810..12c9f3279f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp @@ -54,8 +54,6 @@ interface BusinessProcesses { /** * List BusinessProcess resources by Application */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("BusinessProcesses_ListByApplication") listByApplication is ArmResourceListByParent< BusinessProcess, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp index 5fd1bd3c7e..e74fbe9172 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp @@ -37,8 +37,6 @@ interface BusinessProcessVersions { /** * List BusinessProcessVersion resources by BusinessProcess */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("BusinessProcessVersions_ListByBusinessProcess") listByBusinessProcess is ArmResourceListByParent< BusinessProcessVersion, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp index 30c7712aad..4fdc5f00e8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp @@ -58,8 +58,6 @@ interface InfrastructureResources { /** * List InfrastructureResource resources by Space */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("InfrastructureResources_ListBySpace") listBySpace is ArmResourceListByParent< InfrastructureResource, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp index 839ca404f0..ffc9feaef4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp @@ -52,8 +52,6 @@ interface Spaces { /** * List Space resources by resource group */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Spaces_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent< Space, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp index f089b8d095..b5c662dff0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp @@ -95,7 +95,7 @@ interface AvailabilitySets { } @@encodedName(AvailabilitySets.createOrUpdate::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(AvailabilitySets.createOrUpdate::parameters.resource, @@ -106,7 +106,7 @@ interface AvailabilitySets { "Parameters supplied to the Create Availability Set operation." ); @@encodedName(AvailabilitySets.update::parameters.properties, - "application/json", + "json", "parameters" ); @@extension(AvailabilitySets.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp index 3f41f7eaa8..fcd47770af 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp @@ -89,7 +89,7 @@ interface CapacityReservations { } @@encodedName(CapacityReservations.createOrUpdate::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(CapacityReservations.createOrUpdate::parameters.resource, @@ -100,7 +100,7 @@ interface CapacityReservations { "Parameters supplied to the Create capacity reservation." ); @@encodedName(CapacityReservations.update::parameters.properties, - "application/json", + "json", "parameters" ); @@extension(CapacityReservations.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp index c8cd9aeb7c..2a26bc5d95 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp @@ -101,7 +101,7 @@ interface CapacityReservationGroups { } @@encodedName(CapacityReservationGroups.createOrUpdate::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(CapacityReservationGroups.createOrUpdate::parameters.resource, @@ -112,7 +112,7 @@ interface CapacityReservationGroups { "Parameters supplied to the Create capacity reservation Group." ); @@encodedName(CapacityReservationGroups.update::parameters.properties, - "application/json", + "json", "parameters" ); @@extension(CapacityReservationGroups.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp index 9afc0f144b..aa70ba689b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp @@ -201,7 +201,7 @@ interface CloudServices { } @@encodedName(CloudServices.createOrUpdate::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(CloudServices.createOrUpdate::parameters.resource, @@ -212,7 +212,7 @@ interface CloudServices { "The cloud service object." ); @@encodedName(CloudServices.update::parameters.properties, - "application/json", + "json", "parameters" ); @@extension(CloudServices.update::parameters.properties, @@ -220,10 +220,7 @@ interface CloudServices { "parameters" ); @@doc(CloudServices.update::parameters.properties, "The cloud service object."); -@@encodedName(CloudServices.restart::parameters.body, - "application/json", - "parameters" -); +@@encodedName(CloudServices.restart::parameters.body, "json", "parameters"); @@extension(CloudServices.restart::parameters.body, "x-ms-client-name", "parameters" @@ -231,10 +228,7 @@ interface CloudServices { @@doc(CloudServices.restart::parameters.body, "List of cloud service role instance names." ); -@@encodedName(CloudServices.reimage::parameters.body, - "application/json", - "parameters" -); +@@encodedName(CloudServices.reimage::parameters.body, "json", "parameters"); @@extension(CloudServices.reimage::parameters.body, "x-ms-client-name", "parameters" @@ -242,10 +236,7 @@ interface CloudServices { @@doc(CloudServices.reimage::parameters.body, "List of cloud service role instance names." ); -@@encodedName(CloudServices.rebuild::parameters.body, - "application/json", - "parameters" -); +@@encodedName(CloudServices.rebuild::parameters.body, "json", "parameters"); @@extension(CloudServices.rebuild::parameters.body, "x-ms-client-name", "parameters" @@ -254,7 +245,7 @@ interface CloudServices { "List of cloud service role instance names." ); @@encodedName(CloudServices.deleteInstances::parameters.body, - "application/json", + "json", "parameters" ); @@extension(CloudServices.deleteInstances::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp index 0dc0c47178..bd674e21b8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp @@ -116,7 +116,7 @@ interface DedicatedHosts { } @@encodedName(DedicatedHosts.createOrUpdate::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(DedicatedHosts.createOrUpdate::parameters.resource, @@ -127,7 +127,7 @@ interface DedicatedHosts { "Parameters supplied to the Create Dedicated Host." ); @@encodedName(DedicatedHosts.update::parameters.properties, - "application/json", + "json", "parameters" ); @@extension(DedicatedHosts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp index cdd970b426..7dc5eb67f6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp @@ -87,7 +87,7 @@ interface DedicatedHostGroups { } @@encodedName(DedicatedHostGroups.createOrUpdate::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(DedicatedHostGroups.createOrUpdate::parameters.resource, @@ -98,7 +98,7 @@ interface DedicatedHostGroups { "Parameters supplied to the Create Dedicated Host Group." ); @@encodedName(DedicatedHostGroups.update::parameters.properties, - "application/json", + "json", "parameters" ); @@extension(DedicatedHostGroups.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp index 229c5c2c2d..d502489de6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp @@ -107,10 +107,7 @@ interface Disks { revokeAccess is ArmResourceActionAsync; } -@@encodedName(Disks.createOrUpdate::parameters.resource, - "application/json", - "disk" -); +@@encodedName(Disks.createOrUpdate::parameters.resource, "json", "disk"); @@extension(Disks.createOrUpdate::parameters.resource, "x-ms-client-name", "disk" @@ -118,15 +115,12 @@ interface Disks { @@doc(Disks.createOrUpdate::parameters.resource, "Disk object supplied in the body of the Put disk operation." ); -@@encodedName(Disks.update::parameters.properties, "application/json", "disk"); +@@encodedName(Disks.update::parameters.properties, "json", "disk"); @@extension(Disks.update::parameters.properties, "x-ms-client-name", "disk"); @@doc(Disks.update::parameters.properties, "Disk object supplied in the body of the Patch disk operation." ); -@@encodedName(Disks.grantAccess::parameters.body, - "application/json", - "grantAccessData" -); +@@encodedName(Disks.grantAccess::parameters.body, "json", "grantAccessData"); @@extension(Disks.grantAccess::parameters.body, "x-ms-client-name", "grantAccessData" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp index 6cd0c78c14..6380e2e994 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp @@ -91,7 +91,7 @@ interface DiskAccesses { } @@encodedName(DiskAccesses.createOrUpdate::parameters.resource, - "application/json", + "json", "diskAccess" ); @@extension(DiskAccesses.createOrUpdate::parameters.resource, @@ -101,10 +101,7 @@ interface DiskAccesses { @@doc(DiskAccesses.createOrUpdate::parameters.resource, "disk access object supplied in the body of the Put disk access operation." ); -@@encodedName(DiskAccesses.update::parameters.properties, - "application/json", - "diskAccess" -); +@@encodedName(DiskAccesses.update::parameters.properties, "json", "diskAccess"); @@extension(DiskAccesses.update::parameters.properties, "x-ms-client-name", "diskAccess" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp index 622a53ed63..91c18c7729 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp @@ -91,7 +91,7 @@ interface DiskEncryptionSets { } @@encodedName(DiskEncryptionSets.createOrUpdate::parameters.resource, - "application/json", + "json", "diskEncryptionSet" ); @@extension(DiskEncryptionSets.createOrUpdate::parameters.resource, @@ -102,7 +102,7 @@ interface DiskEncryptionSets { "disk encryption set object supplied in the body of the Put disk encryption set operation." ); @@encodedName(DiskEncryptionSets.update::parameters.properties, - "application/json", + "json", "diskEncryptionSet" ); @@extension(DiskEncryptionSets.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp index ac556b9f75..693a7f190b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp @@ -116,7 +116,7 @@ interface DiskRestorePoints { } @@encodedName(DiskRestorePoints.grantAccess::parameters.body, - "application/json", + "json", "grantAccessData" ); @@extension(DiskRestorePoints.grantAccess::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp index 2e465110fd..e52099da25 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp @@ -94,10 +94,7 @@ interface Galleries { update is ArmResourceActionAsync; } -@@encodedName(Galleries.createOrUpdate::parameters.resource, - "application/json", - "gallery" -); +@@encodedName(Galleries.createOrUpdate::parameters.resource, "json", "gallery"); @@extension(Galleries.createOrUpdate::parameters.resource, "x-ms-client-name", "gallery" @@ -105,10 +102,7 @@ interface Galleries { @@doc(Galleries.createOrUpdate::parameters.resource, "Parameters supplied to the create or update Shared Image Gallery operation." ); -@@encodedName(Galleries.update::parameters.properties, - "application/json", - "gallery" -); +@@encodedName(Galleries.update::parameters.properties, "json", "gallery"); @@extension(Galleries.update::parameters.properties, "x-ms-client-name", "gallery" @@ -116,10 +110,7 @@ interface Galleries { @@doc(Galleries.update::parameters.properties, "Parameters supplied to the update Shared Image Gallery operation." ); -@@encodedName(Galleries.update::parameters.body, - "application/json", - "sharingUpdate" -); +@@encodedName(Galleries.update::parameters.body, "json", "sharingUpdate"); @@extension(Galleries.update::parameters.body, "x-ms-client-name", "sharingUpdate" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp index 53e9211d53..7e08b8a2f0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp @@ -68,7 +68,7 @@ interface GalleryApplications { } @@encodedName(GalleryApplications.createOrUpdate::parameters.resource, - "application/json", + "json", "galleryApplication" ); @@extension(GalleryApplications.createOrUpdate::parameters.resource, @@ -79,7 +79,7 @@ interface GalleryApplications { "Parameters supplied to the create or update gallery Application operation." ); @@encodedName(GalleryApplications.update::parameters.properties, - "application/json", + "json", "galleryApplication" ); @@extension(GalleryApplications.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp index 8fa0b9ca67..54e18ae54a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp @@ -82,7 +82,7 @@ interface GalleryApplicationVersions { } @@encodedName(GalleryApplicationVersions.createOrUpdate::parameters.resource, - "application/json", + "json", "galleryApplicationVersion" ); @@extension(GalleryApplicationVersions.createOrUpdate::parameters.resource, @@ -93,7 +93,7 @@ interface GalleryApplicationVersions { "Parameters supplied to the create or update gallery Application Version operation." ); @@encodedName(GalleryApplicationVersions.update::parameters.properties, - "application/json", + "json", "galleryApplicationVersion" ); @@extension(GalleryApplicationVersions.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp index 874ed3c1e3..74112e3b3b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp @@ -68,7 +68,7 @@ interface GalleryImages { } @@encodedName(GalleryImages.createOrUpdate::parameters.resource, - "application/json", + "json", "galleryImage" ); @@extension(GalleryImages.createOrUpdate::parameters.resource, @@ -79,7 +79,7 @@ interface GalleryImages { "Parameters supplied to the create or update gallery image operation." ); @@encodedName(GalleryImages.update::parameters.properties, - "application/json", + "json", "galleryImage" ); @@extension(GalleryImages.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp index aff2656ca8..b06141fdc5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp @@ -79,7 +79,7 @@ interface GalleryImageVersions { } @@encodedName(GalleryImageVersions.createOrUpdate::parameters.resource, - "application/json", + "json", "galleryImageVersion" ); @@extension(GalleryImageVersions.createOrUpdate::parameters.resource, @@ -90,7 +90,7 @@ interface GalleryImageVersions { "Parameters supplied to the create or update gallery image version operation." ); @@encodedName(GalleryImageVersions.update::parameters.properties, - "application/json", + "json", "galleryImageVersion" ); @@extension(GalleryImageVersions.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp index d26977a281..8345c184bf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp @@ -86,10 +86,7 @@ interface Images { list is ArmListBySubscription; } -@@encodedName(Images.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); +@@encodedName(Images.createOrUpdate::parameters.resource, "json", "parameters"); @@extension(Images.createOrUpdate::parameters.resource, "x-ms-client-name", "parameters" @@ -97,10 +94,7 @@ interface Images { @@doc(Images.createOrUpdate::parameters.resource, "Parameters supplied to the Create Image operation." ); -@@encodedName(Images.update::parameters.properties, - "application/json", - "parameters" -); +@@encodedName(Images.update::parameters.properties, "json", "parameters"); @@extension(Images.update::parameters.properties, "x-ms-client-name", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp index cfd4dc89d7..fda50e2494 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp @@ -80,7 +80,7 @@ interface PrivateEndpointConnections { } @@encodedName(PrivateEndpointConnections.updateAPrivateEndpointConnection::parameters.resource, - "application/json", + "json", "privateEndpointConnection" ); @@extension(PrivateEndpointConnections.updateAPrivateEndpointConnection::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp index 2d9450473a..c77d9dec38 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp @@ -90,7 +90,7 @@ interface ProximityPlacementGroups { } @@encodedName(ProximityPlacementGroups.createOrUpdate::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(ProximityPlacementGroups.createOrUpdate::parameters.resource, @@ -101,7 +101,7 @@ interface ProximityPlacementGroups { "Parameters supplied to the Create Proximity Placement Group operation." ); @@encodedName(ProximityPlacementGroups.update::parameters.properties, - "application/json", + "json", "parameters" ); @@extension(ProximityPlacementGroups.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp index 9af5bc6a3e..0fa18670f3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp @@ -93,10 +93,7 @@ interface RestorePoints { >; } -@@encodedName(RestorePoints.create::parameters.resource, - "application/json", - "parameters" -); +@@encodedName(RestorePoints.create::parameters.resource, "json", "parameters"); @@extension(RestorePoints.create::parameters.resource, "x-ms-client-name", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp index 5b37ad082a..e9aa52e3ae 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp @@ -122,7 +122,7 @@ interface RestorePointCollections { } @@encodedName(RestorePointCollections.createOrUpdate::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(RestorePointCollections.createOrUpdate::parameters.resource, @@ -133,7 +133,7 @@ interface RestorePointCollections { "Parameters supplied to the Create or Update restore point collection operation." ); @@encodedName(RestorePointCollections.update::parameters.properties, - "application/json", + "json", "parameters" ); @@extension(RestorePointCollections.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp index f6ff9d07c7..b0aea4726d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp @@ -97,7 +97,7 @@ interface Snapshots { } @@encodedName(Snapshots.createOrUpdate::parameters.resource, - "application/json", + "json", "snapshot" ); @@extension(Snapshots.createOrUpdate::parameters.resource, @@ -107,10 +107,7 @@ interface Snapshots { @@doc(Snapshots.createOrUpdate::parameters.resource, "Snapshot object supplied in the body of the Put disk operation." ); -@@encodedName(Snapshots.update::parameters.properties, - "application/json", - "snapshot" -); +@@encodedName(Snapshots.update::parameters.properties, "json", "snapshot"); @@extension(Snapshots.update::parameters.properties, "x-ms-client-name", "snapshot" @@ -119,7 +116,7 @@ interface Snapshots { "Snapshot object supplied in the body of the Patch snapshot operation." ); @@encodedName(Snapshots.grantAccess::parameters.body, - "application/json", + "json", "grantAccessData" ); @@extension(Snapshots.grantAccess::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp index 5f08ec3504..78cbed4e14 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp @@ -95,7 +95,7 @@ interface SshPublicKeyResources { } @@encodedName(SshPublicKeyResources.create::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(SshPublicKeyResources.create::parameters.resource, @@ -106,7 +106,7 @@ interface SshPublicKeyResources { "Parameters supplied to create the SSH public key." ); @@encodedName(SshPublicKeyResources.update::parameters.properties, - "application/json", + "json", "parameters" ); @@extension(SshPublicKeyResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp index 3d74286e6e..b883d0f0c1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp @@ -325,7 +325,7 @@ interface VirtualMachines { } @@encodedName(VirtualMachines.createOrUpdate::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(VirtualMachines.createOrUpdate::parameters.resource, @@ -336,7 +336,7 @@ interface VirtualMachines { "Parameters supplied to the Create Virtual Machine operation." ); @@encodedName(VirtualMachines.update::parameters.properties, - "application/json", + "json", "parameters" ); @@extension(VirtualMachines.update::parameters.properties, @@ -346,10 +346,7 @@ interface VirtualMachines { @@doc(VirtualMachines.update::parameters.properties, "Parameters supplied to the Update Virtual Machine operation." ); -@@encodedName(VirtualMachines.capture::parameters.body, - "application/json", - "parameters" -); +@@encodedName(VirtualMachines.capture::parameters.body, "json", "parameters"); @@extension(VirtualMachines.capture::parameters.body, "x-ms-client-name", "parameters" @@ -357,10 +354,7 @@ interface VirtualMachines { @@doc(VirtualMachines.capture::parameters.body, "Parameters supplied to the Capture Virtual Machine operation." ); -@@encodedName(VirtualMachines.reimage::parameters.body, - "application/json", - "parameters" -); +@@encodedName(VirtualMachines.reimage::parameters.body, "json", "parameters"); @@extension(VirtualMachines.reimage::parameters.body, "x-ms-client-name", "parameters" @@ -369,7 +363,7 @@ interface VirtualMachines { "Parameters supplied to the Reimage Virtual Machine operation." ); @@encodedName(VirtualMachines.installPatches::parameters.body, - "application/json", + "json", "installPatchesInput" ); @@extension(VirtualMachines.installPatches::parameters.body, @@ -380,7 +374,7 @@ interface VirtualMachines { "Input for InstallPatches as directly received by the API" ); @@encodedName(VirtualMachines.runCommand::parameters.body, - "application/json", + "json", "parameters" ); @@extension(VirtualMachines.runCommand::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp index b7563ad163..ff3340804b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp @@ -93,7 +93,7 @@ interface VirtualMachineExtensions { } @@encodedName(VirtualMachineExtensions.createOrUpdate::parameters.resource, - "application/json", + "json", "extensionParameters" ); @@extension(VirtualMachineExtensions.createOrUpdate::parameters.resource, @@ -104,7 +104,7 @@ interface VirtualMachineExtensions { "Parameters supplied to the Create Virtual Machine Extension operation." ); @@encodedName(VirtualMachineExtensions.update::parameters.properties, - "application/json", + "json", "extensionParameters" ); @@extension(VirtualMachineExtensions.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp index 738ecf6bce..9887f4f408 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp @@ -105,7 +105,7 @@ interface VirtualMachineRunCommands { } @@encodedName(VirtualMachineRunCommands.createOrUpdate::parameters.resource, - "application/json", + "json", "runCommand" ); @@extension(VirtualMachineRunCommands.createOrUpdate::parameters.resource, @@ -116,7 +116,7 @@ interface VirtualMachineRunCommands { "Parameters supplied to the Create Virtual Machine RunCommand operation." ); @@encodedName(VirtualMachineRunCommands.update::parameters.properties, - "application/json", + "json", "runCommand" ); @@extension(VirtualMachineRunCommands.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp index 0b0ed92da1..04692f9595 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp @@ -572,7 +572,7 @@ interface VirtualMachineScaleSets { } @@encodedName(VirtualMachineScaleSets.createOrUpdate::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(VirtualMachineScaleSets.createOrUpdate::parameters.resource, @@ -583,7 +583,7 @@ interface VirtualMachineScaleSets { "The scale set object." ); @@encodedName(VirtualMachineScaleSets.update::parameters.properties, - "application/json", + "json", "parameters" ); @@extension(VirtualMachineScaleSets.update::parameters.properties, @@ -594,7 +594,7 @@ interface VirtualMachineScaleSets { "The scale set object." ); @@encodedName(VirtualMachineScaleSets.deallocate::parameters.body, - "application/json", + "json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.deallocate::parameters.body, @@ -605,7 +605,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.deleteInstances::parameters.body, - "application/json", + "json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.deleteInstances::parameters.body, @@ -616,7 +616,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.powerOff::parameters.body, - "application/json", + "json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.powerOff::parameters.body, @@ -627,7 +627,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.restart::parameters.body, - "application/json", + "json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.restart::parameters.body, @@ -638,7 +638,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.start::parameters.body, - "application/json", + "json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.start::parameters.body, @@ -649,7 +649,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.redeploy::parameters.body, - "application/json", + "json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.redeploy::parameters.body, @@ -660,7 +660,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.performMaintenance::parameters.body, - "application/json", + "json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.performMaintenance::parameters.body, @@ -671,7 +671,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.updateInstances::parameters.body, - "application/json", + "json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.updateInstances::parameters.body, @@ -682,7 +682,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.reimage::parameters.body, - "application/json", + "json", "vmScaleSetReimageInput" ); @@extension(VirtualMachineScaleSets.reimage::parameters.body, @@ -693,7 +693,7 @@ interface VirtualMachineScaleSets { "Parameters for Reimaging VM ScaleSet." ); @@encodedName(VirtualMachineScaleSets.reimageAll::parameters.body, - "application/json", + "json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.reimageAll::parameters.body, @@ -704,7 +704,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.convertToSinglePlacementGroup::parameters.body, - "application/json", + "json", "parameters" ); @@extension(VirtualMachineScaleSets.convertToSinglePlacementGroup::parameters.body, @@ -715,7 +715,7 @@ interface VirtualMachineScaleSets { "The input object for ConvertToSinglePlacementGroup API." ); @@encodedName(VirtualMachineScaleSets.setOrchestrationServiceState::parameters.body, - "application/json", + "json", "parameters" ); @@extension(VirtualMachineScaleSets.setOrchestrationServiceState::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp index 1fbe282a7d..88e11515bd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp @@ -136,7 +136,7 @@ interface VirtualMachineScaleSetExtensions { } @@encodedName(VirtualMachineScaleSetExtensions.createOrUpdate::parameters.resource, - "application/json", + "json", "extensionParameters" ); @@extension(VirtualMachineScaleSetExtensions.createOrUpdate::parameters.resource, @@ -147,7 +147,7 @@ interface VirtualMachineScaleSetExtensions { "Parameters supplied to the Create VM scale set Extension operation." ); @@encodedName(VirtualMachineScaleSetExtensions.update::parameters.properties, - "application/json", + "json", "extensionParameters" ); @@extension(VirtualMachineScaleSetExtensions.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp index 48e7e669de..0253b1cf81 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp @@ -428,7 +428,7 @@ interface VirtualMachineScaleSetVMS { } @@encodedName(VirtualMachineScaleSetVMS.update::parameters.resource, - "application/json", + "json", "parameters" ); @@extension(VirtualMachineScaleSetVMS.update::parameters.resource, @@ -439,7 +439,7 @@ interface VirtualMachineScaleSetVMS { "Parameters supplied to the Update Virtual Machine Scale Sets VM operation." ); @@encodedName(VirtualMachineScaleSetVMS.reimage::parameters.body, - "application/json", + "json", "vmScaleSetVMReimageInput" ); @@extension(VirtualMachineScaleSetVMS.reimage::parameters.body, @@ -450,7 +450,7 @@ interface VirtualMachineScaleSetVMS { "Parameters for the Reimaging Virtual machine in ScaleSet." ); @@encodedName(VirtualMachineScaleSetVMS.runCommand::parameters.body, - "application/json", + "json", "parameters" ); @@extension(VirtualMachineScaleSetVMS.runCommand::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp index 81a36cdc51..98321138a7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp @@ -156,7 +156,7 @@ interface VirtualMachineScaleSetVMExtensions { } @@encodedName(VirtualMachineScaleSetVMExtensions.createOrUpdate::parameters.resource, - "application/json", + "json", "extensionParameters" ); @@extension(VirtualMachineScaleSetVMExtensions.createOrUpdate::parameters.resource, @@ -167,7 +167,7 @@ interface VirtualMachineScaleSetVMExtensions { "Parameters supplied to the Create Virtual Machine Extension operation." ); @@encodedName(VirtualMachineScaleSetVMExtensions.update::parameters.properties, - "application/json", + "json", "extensionParameters" ); @@extension(VirtualMachineScaleSetVMExtensions.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp index 4a636e7f40..b2f772089f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp @@ -15,11 +15,8 @@ namespace Azure.ResourceManager.Dns; /** * Describes a DNS record set (a collection of DNS records with the same name and type). */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(DnsZone) -@includeInapplicableMetadataInPayload(false) -model DnsRecord { +model DnsRecord is ProxyResource { /** * The name of the record set, relative to the name of the zone. */ @@ -45,12 +42,6 @@ model DnsRecord { * The etag of the record set. */ etag?: string; - - /** - * The properties of the record set. - */ - @extension("x-ms-client-flatten", true) - properties?: RecordSetProperties; } @armResourceOperations @@ -58,8 +49,6 @@ interface DnsRecords { /** * Gets a record set. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("RecordSets_Get") get is ArmResourceRead< DnsRecord, { @@ -76,8 +65,6 @@ interface DnsRecords { /** * Creates or updates a record set within a DNS zone. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("RecordSets_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< DnsRecord, { @@ -106,9 +93,7 @@ interface DnsRecords { /** * Updates a record set within a DNS zone. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("RecordSets_Update") update is ArmCustomPatchSync< DnsRecord, DnsRecord, @@ -132,8 +117,6 @@ interface DnsRecords { /** * Deletes a record set from a DNS zone. This operation cannot be undone. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("RecordSets_Delete") delete is ArmResourceDeleteSync< DnsRecord, { @@ -156,8 +139,6 @@ interface DnsRecords { /** * Lists the record sets of a specified type in a DNS zone. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("RecordSets_ListByType") listByType is ArmResourceListByParent< DnsRecord, { @@ -184,25 +165,9 @@ interface DnsRecords { >; } -@@encodedName(DnsRecords.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(DnsRecords.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(DnsRecords.createOrUpdate::parameters.resource, "Parameters supplied to the CreateOrUpdate operation." ); -@@encodedName(DnsRecords.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(DnsRecords.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(DnsRecords.update::parameters.properties, "Parameters supplied to the Update operation." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp index fd036f7a42..3976b834f2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp @@ -14,10 +14,7 @@ namespace Azure.ResourceManager.Dns; /** * Describes a DNS zone. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" -@includeInapplicableMetadataInPayload(false) -model DnsZone extends Resource { +model DnsZone is TrackedResource { /** * The name of the DNS zone (without a terminating dot). */ @@ -31,12 +28,6 @@ model DnsZone extends Resource { * The etag of the zone. */ etag?: string; - - /** - * The properties of the zone. - */ - @extension("x-ms-client-flatten", true) - properties?: ZoneProperties; } @armResourceOperations @@ -44,15 +35,11 @@ interface DnsZones { /** * Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Zones_Get") get is ArmResourceRead; /** * Creates or updates a DNS zone. Does not modify DNS records within the zone. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Zones_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< DnsZone, { @@ -75,9 +62,7 @@ interface DnsZones { /** * Updates a DNS zone. Does not modify DNS records within the zone. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("Zones_Update") update is ArmCustomPatchSync< DnsZone, ZoneUpdateOptions, @@ -95,8 +80,6 @@ interface DnsZones { /** * Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Zones_Delete") delete is ArmResourceDeleteAsync< DnsZone, { @@ -113,8 +96,6 @@ interface DnsZones { /** * Lists the DNS zones within a resource group. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Zones_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent< DnsZone, { @@ -131,16 +112,12 @@ interface DnsZones { /** * Lists the DNS zones in all resource groups in a subscription. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Zones_List") list is ArmListBySubscription; /** * Lists all record sets in a DNS zone. */ // FIXME: RecordSets_ListByDnsZone could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("RecordSets_ListByDnsZone") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/recordsets") @get listByDnsZone( @@ -169,25 +146,9 @@ interface DnsZones { ): ArmResponse> | ErrorResponse; } -@@encodedName(DnsZones.createOrUpdate::parameters.resource, - "application/json", - "parameters" -); -@@extension(DnsZones.createOrUpdate::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(DnsZones.createOrUpdate::parameters.resource, "Parameters supplied to the CreateOrUpdate operation." ); -@@encodedName(DnsZones.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(DnsZones.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(DnsZones.update::parameters.properties, "Parameters supplied to the Update operation." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp index cd4804087d..e34181b362 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp @@ -109,7 +109,7 @@ interface BatchDeploymentTrackedResources { } @@encodedName(BatchDeploymentTrackedResources.createOrUpdate::parameters.resource, - "application/json", + "json", "body" ); @@extension(BatchDeploymentTrackedResources.createOrUpdate::parameters.resource, @@ -120,7 +120,7 @@ interface BatchDeploymentTrackedResources { "Batch inference deployment definition object." ); @@encodedName(BatchDeploymentTrackedResources.update::parameters.properties, - "application/json", + "json", "body" ); @@extension(BatchDeploymentTrackedResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp index 0062533304..74a6f2675a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp @@ -114,7 +114,7 @@ interface BatchEndpointTrackedResources { } @@encodedName(BatchEndpointTrackedResources.createOrUpdate::parameters.resource, - "application/json", + "json", "body" ); @@extension(BatchEndpointTrackedResources.createOrUpdate::parameters.resource, @@ -125,7 +125,7 @@ interface BatchEndpointTrackedResources { "Batch inference endpoint definition object." ); @@encodedName(BatchEndpointTrackedResources.update::parameters.properties, - "application/json", + "json", "body" ); @@extension(BatchEndpointTrackedResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp index 2e5622b9bd..ef4925089a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp @@ -81,7 +81,7 @@ interface CodeContainerResources { } @@encodedName(CodeContainerResources.createOrUpdate::parameters.resource, - "application/json", + "json", "body" ); @@extension(CodeContainerResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp index f94d7d5c87..e18958e956 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp @@ -103,7 +103,7 @@ interface CodeVersionResources { } @@encodedName(CodeVersionResources.createOrUpdate::parameters.resource, - "application/json", + "json", "body" ); @@extension(CodeVersionResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp index 0fca7360a7..c0e8610435 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp @@ -81,7 +81,7 @@ interface ComponentContainerResources { } @@encodedName(ComponentContainerResources.createOrUpdate::parameters.resource, - "application/json", + "json", "body" ); @@extension(ComponentContainerResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp index 8d1fcf6a77..81124649cd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp @@ -98,7 +98,7 @@ interface ComponentVersionResources { } @@encodedName(ComponentVersionResources.createOrUpdate::parameters.resource, - "application/json", + "json", "body" ); @@extension(ComponentVersionResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp index aa5b18dd3e..b2a223491d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp @@ -141,15 +141,15 @@ updateIdleShutdownSetting is ArmResourceActionSync; } -@@encodedName(LabelingJobs.createOrUpdate::parameters.resource, - "application/json", - "body" -); +@@encodedName(LabelingJobs.createOrUpdate::parameters.resource, "json", "body"); @@extension(LabelingJobs.createOrUpdate::parameters.resource, "x-ms-client-name", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp index 12c30ea115..55e198e1e1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp @@ -87,7 +87,7 @@ interface ModelContainerResources { } @@encodedName(ModelContainerResources.createOrUpdate::parameters.resource, - "application/json", + "json", "body" ); @@extension(ModelContainerResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp index ef3c1aefc7..08bd9f4807 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp @@ -138,7 +138,7 @@ interface ModelVersionResources { } @@encodedName(ModelVersionResources.createOrUpdate::parameters.resource, - "application/json", + "json", "body" ); @@extension(ModelVersionResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp index 01a6f4e0f9..16e38f5370 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp @@ -166,7 +166,7 @@ interface OnlineDeploymentTrackedResources { } @@encodedName(OnlineDeploymentTrackedResources.createOrUpdate::parameters.resource, - "application/json", + "json", "body" ); @@extension(OnlineDeploymentTrackedResources.createOrUpdate::parameters.resource, @@ -177,7 +177,7 @@ interface OnlineDeploymentTrackedResources { "Inference Endpoint entity to apply during operation." ); @@encodedName(OnlineDeploymentTrackedResources.update::parameters.properties, - "application/json", + "json", "body" ); @@extension(OnlineDeploymentTrackedResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp index 8050a474a3..815ff14267 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp @@ -166,7 +166,7 @@ interface OnlineEndpointTrackedResources { } @@encodedName(OnlineEndpointTrackedResources.createOrUpdate::parameters.resource, - "application/json", + "json", "body" ); @@extension(OnlineEndpointTrackedResources.createOrUpdate::parameters.resource, @@ -177,7 +177,7 @@ interface OnlineEndpointTrackedResources { "Online Endpoint entity to apply during operation." ); @@encodedName(OnlineEndpointTrackedResources.update::parameters.properties, - "application/json", + "json", "body" ); @@extension(OnlineEndpointTrackedResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp index c85f93ed8c..cfede124ae 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp @@ -70,7 +70,7 @@ interface OutboundRuleBasicResources { } @@encodedName(OutboundRuleBasicResources.createOrUpdate::parameters.resource, - "application/json", + "json", "body" ); @@extension(OutboundRuleBasicResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp index 4545051a44..944d3f088a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp @@ -69,7 +69,7 @@ interface PrivateEndpointConnections { } @@encodedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, - "application/json", + "json", "body" ); @@extension(PrivateEndpointConnections.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp index 9fbbfede52..77f489da27 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp @@ -83,10 +83,7 @@ interface Registries { removeRegions is ArmResourceActionAsync; } -@@encodedName(Registries.createOrUpdate::parameters.resource, - "application/json", - "body" -); +@@encodedName(Registries.createOrUpdate::parameters.resource, "json", "body"); @@extension(Registries.createOrUpdate::parameters.resource, "x-ms-client-name", "body" @@ -94,10 +91,7 @@ interface Registries { @@doc(Registries.createOrUpdate::parameters.resource, "Details required to create the registry." ); -@@encodedName(Registries.update::parameters.properties, - "application/json", - "body" -); +@@encodedName(Registries.update::parameters.properties, "json", "body"); @@extension(Registries.update::parameters.properties, "x-ms-client-name", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp index bd69d98373..af12127196 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp @@ -79,10 +79,7 @@ interface Schedules { >; } -@@encodedName(Schedules.createOrUpdate::parameters.resource, - "application/json", - "body" -); +@@encodedName(Schedules.createOrUpdate::parameters.resource, "json", "body"); @@extension(Schedules.createOrUpdate::parameters.resource, "x-ms-client-name", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp index 7f56f861af..0c6edf6d51 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp @@ -244,10 +244,7 @@ Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds" ): ArmResponse | ErrorResponse; } -@@encodedName(Workspaces.createOrUpdate::parameters.resource, - "application/json", - "body" -); +@@encodedName(Workspaces.createOrUpdate::parameters.resource, "json", "body"); @@extension(Workspaces.createOrUpdate::parameters.resource, "x-ms-client-name", "body" @@ -255,10 +252,7 @@ Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds" @@doc(Workspaces.createOrUpdate::parameters.resource, "The parameters for creating or updating a machine learning workspace." ); -@@encodedName(Workspaces.update::parameters.properties, - "application/json", - "body" -); +@@encodedName(Workspaces.update::parameters.properties, "json", "body"); @@extension(Workspaces.update::parameters.properties, "x-ms-client-name", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp index b36bfd0758..23f3cbc398 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp @@ -106,7 +106,7 @@ interface WorkspaceConnectionPropertiesV2BasicResources { } @@encodedName(WorkspaceConnectionPropertiesV2BasicResources.create::parameters.resource, - "application/json", + "json", "body" ); @@extension(WorkspaceConnectionPropertiesV2BasicResources.create::parameters.resource, @@ -117,7 +117,7 @@ interface WorkspaceConnectionPropertiesV2BasicResources { "The object for creating or updating a new workspace connection" ); @@encodedName(WorkspaceConnectionPropertiesV2BasicResources.update::parameters.properties, - "application/json", + "json", "body" ); @@extension(WorkspaceConnectionPropertiesV2BasicResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp index 865c70b626..024c40f17d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp @@ -56,8 +56,6 @@ interface DataProducts { /** * List data products by resource group. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("DataProducts_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp index 103f23935b..0688ab20b4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp @@ -37,7 +37,5 @@ interface DataProductsCatalogs { /** * List data catalog by resource group. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("DataProductsCatalogs_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp index 4a4cfa6638..68d34c50e3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp @@ -56,8 +56,6 @@ interface DataTypes { /** * List data type by parent resource. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("DataTypes_ListByDataProduct") listByDataProduct is ArmResourceListByParent; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp index 85dc34ae18..a6f2d8a978 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp @@ -33,36 +33,26 @@ interface Associations { /** * Get a Association */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("AssociationsInterface_Get") get is ArmResourceRead; /** * Create a Association */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("AssociationsInterface_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Update a Association */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("AssociationsInterface_Update") update is ArmCustomPatchSync; /** * Delete a Association */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("AssociationsInterface_Delete") delete is ArmResourceDeleteAsync; /** * List Association resources by TrafficController */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("AssociationsInterface_ListByTrafficController") listByTrafficController is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp index 1e98b351f6..d10270e601 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp @@ -33,36 +33,26 @@ interface Frontends { /** * Get a Frontend */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("FrontendsInterface_Get") get is ArmResourceRead; /** * Create a Frontend */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("FrontendsInterface_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Update a Frontend */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("FrontendsInterface_Update") update is ArmCustomPatchSync; /** * Delete a Frontend */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("FrontendsInterface_Delete") delete is ArmResourceDeleteAsync; /** * List Frontend resources by TrafficController */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("FrontendsInterface_ListByTrafficController") listByTrafficController is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp index 702b4771f7..d631539212 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp @@ -31,43 +31,31 @@ interface TrafficControllers { /** * Get a TrafficController */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TrafficControllerInterface_Get") get is ArmResourceRead; /** * Create a TrafficController */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TrafficControllerInterface_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Update a TrafficController */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("TrafficControllerInterface_Update") update is ArmCustomPatchSync; /** * Delete a TrafficController */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TrafficControllerInterface_Delete") delete is ArmResourceDeleteAsync; /** * List TrafficController resources by resource group */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TrafficControllerInterface_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; /** * List TrafficController resources by subscription ID */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TrafficControllerInterface_ListBySubscription") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp index 7a7a2757a6..3d0b366dae 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp @@ -212,7 +212,7 @@ interface Catalogs { } @@encodedName(Catalogs.listDeviceGroups::parameters.body, - "application/json", + "json", "listDeviceGroupsRequest" ); @@extension(Catalogs.listDeviceGroups::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp index 916e111d24..33a8111cfe 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp @@ -90,7 +90,7 @@ interface Certificates { } @@encodedName(Certificates.retrieveProofOfPossessionNonce::parameters.body, - "application/json", + "json", "proofOfPossessionNonceRequest" ); @@extension(Certificates.retrieveProofOfPossessionNonce::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp index 43381f071c..060ac44572 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp @@ -69,7 +69,7 @@ interface Devices { } @@encodedName(Devices.generateCapabilityImage::parameters.body, - "application/json", + "json", "generateDeviceCapabilityRequest" ); @@extension(Devices.generateCapabilityImage::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp index b1a291d176..6400e096be 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp @@ -102,7 +102,7 @@ interface DeviceGroups { } @@encodedName(DeviceGroups.claimDevices::parameters.body, - "application/json", + "json", "claimDevicesRequest" ); @@extension(DeviceGroups.claimDevices::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp index e45c7087cd..9fa8d67d65 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp @@ -15,12 +15,8 @@ namespace Microsoft.Storage; /** * Properties of the blob container, including Id, resource name, resource type, Etag. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(BlobServiceProperties) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(ContainerProperties) -model BlobContainer extends ProxyResourceBase { +model BlobContainer is ProxyResource { /** * The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. */ @@ -31,12 +27,6 @@ model BlobContainer extends ProxyResourceBase { @segment("containers") @visibility("read") name: string; - - /** - * Properties of the blob container. - */ - @extension("x-ms-client-flatten", true) - properties?: ContainerProperties; } @armResourceOperations @@ -65,8 +55,6 @@ interface BlobContainers { /** * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("BlobContainers_List") list is ArmResourceListByParent< BlobContainer, { @@ -117,56 +105,16 @@ interface BlobContainers { objectLevelWorm is ArmResourceActionAsync; } -@@encodedName(BlobContainers.create::parameters.resource, - "application/json", - "blobContainer" -); -@@extension(BlobContainers.create::parameters.resource, - "x-ms-client-name", - "blobContainer" -); @@doc(BlobContainers.create::parameters.resource, "Properties of the blob container to create." ); -@@encodedName(BlobContainers.update::parameters.properties, - "application/json", - "blobContainer" -); -@@extension(BlobContainers.update::parameters.properties, - "x-ms-client-name", - "blobContainer" -); @@doc(BlobContainers.update::parameters.properties, "Properties to update for the blob container." ); -@@encodedName(BlobContainers.setLegalHold::parameters.body, - "application/json", - "LegalHold" -); -@@extension(BlobContainers.setLegalHold::parameters.body, - "x-ms-client-name", - "LegalHold" -); @@doc(BlobContainers.setLegalHold::parameters.body, "The LegalHold property that will be set to a blob container." ); -@@encodedName(BlobContainers.clearLegalHold::parameters.body, - "application/json", - "LegalHold" -); -@@extension(BlobContainers.clearLegalHold::parameters.body, - "x-ms-client-name", - "LegalHold" -); @@doc(BlobContainers.clearLegalHold::parameters.body, "The LegalHold property that will be clear from a blob container." ); -@@encodedName(BlobContainers.lease::parameters.body, - "application/json", - "parameters" -); -@@extension(BlobContainers.lease::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(BlobContainers.lease::parameters.body, "Lease Container request body."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp index e3e98e5b3a..845b63483f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp @@ -15,25 +15,13 @@ namespace Microsoft.Storage; /** * The storage account blob inventory policy. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - BlobInventoryPolicyProperties -) -model BlobInventoryPolicy extends ProxyResourceBase { +model BlobInventoryPolicy is ProxyResource { @key("inventoryPolicy") @segment("inventoryPolicies") @visibility("read") name: string; - - /** - * Returns the storage account blob inventory policy rules. - */ - @extension("x-ms-client-flatten", true) - properties?: BlobInventoryPolicyProperties; } @armResourceOperations @@ -56,19 +44,9 @@ interface BlobInventoryPolicies { /** * Gets the blob inventory policy associated with the specified storage account. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("BlobInventoryPolicies_List") list is ArmResourceListByParent; } -@@encodedName(BlobInventoryPolicies.createOrUpdate::parameters.resource, - "application/json", - "properties" -); -@@extension(BlobInventoryPolicies.createOrUpdate::parameters.resource, - "x-ms-client-name", - "properties" -); @@doc(BlobInventoryPolicies.createOrUpdate::parameters.resource, "The blob inventory policy set to a storage account." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp index e1cfc6817a..3a5f53b5c2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp @@ -15,26 +15,14 @@ namespace Microsoft.Storage; /** * The properties of a storage account’s Blob service. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - BlobServicePropertiesProperties -) -model BlobServiceProperties extends ProxyResourceBase { +model BlobServiceProperties is ProxyResource { @key("blobService") @segment("blobServices") @visibility("read") name: string; - /** - * The properties of a storage account’s Blob service. - */ - @extension("x-ms-client-flatten", true) - properties?: BlobServicePropertiesProperties; - ...Azure.ResourceManager.ResourceSku; } @@ -43,33 +31,19 @@ interface BlobServicePropertiesOperationGroup { /** * Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("BlobServices_GetServiceProperties") getServiceProperties is ArmResourceRead; /** * Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("BlobServices_SetServiceProperties") setServiceProperties is ArmResourceCreateOrReplaceSync; /** * List blob services of storage account. It returns a collection of one object named default. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("BlobServices_List") list is ArmResourceListByParent; } -@@encodedName(BlobServicePropertiesOperationGroup.setServiceProperties::parameters.resource, - "application/json", - "parameters" -); -@@extension(BlobServicePropertiesOperationGroup.setServiceProperties::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(BlobServicePropertiesOperationGroup.setServiceProperties::parameters.resource, "The properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp index 989af38fc7..be9b8093ef 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp @@ -14,13 +14,9 @@ namespace Microsoft.Storage; /** * Deleted storage account */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource @parentResource("SubscriptionLocationResource") -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(DeletedAccountProperties) -model DeletedAccount extends ProxyResourceBase { +model DeletedAccount is ProxyResource { /** * Name of the deleted storage account. */ @@ -31,12 +27,6 @@ model DeletedAccount extends ProxyResourceBase { @segment("deletedAccounts") @visibility("read") name: string; - - /** - * Properties of the deleted account. - */ - @extension("x-ms-client-flatten", true) - properties?: DeletedAccountProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp index e6316e0112..0f13a215f4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp @@ -15,12 +15,8 @@ namespace Microsoft.Storage; /** * The Encryption Scope resource. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(StorageAccount) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(EncryptionScopeProperties) -model EncryptionScope extends ProxyResourceBase { +model EncryptionScope is ProxyResource { /** * The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. */ @@ -31,12 +27,6 @@ model EncryptionScope extends ProxyResourceBase { @segment("encryptionScopes") @visibility("read") name: string; - - /** - * Properties of the encryption scope. - */ - @extension("x-ms-client-flatten", true) - properties?: EncryptionScopeProperties; } @armResourceOperations @@ -60,8 +50,6 @@ interface EncryptionScopes { /** * Lists all the encryption scopes available under the specified storage account. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("EncryptionScopes_List") list is ArmResourceListByParent< EncryptionScope, { @@ -90,25 +78,9 @@ interface EncryptionScopes { >; } -@@encodedName(EncryptionScopes.put::parameters.resource, - "application/json", - "encryptionScope" -); -@@extension(EncryptionScopes.put::parameters.resource, - "x-ms-client-name", - "encryptionScope" -); @@doc(EncryptionScopes.put::parameters.resource, "Encryption scope properties to be used for the create or update." ); -@@encodedName(EncryptionScopes.patch::parameters.properties, - "application/json", - "encryptionScope" -); -@@extension(EncryptionScopes.patch::parameters.properties, - "x-ms-client-name", - "encryptionScope" -); @@doc(EncryptionScopes.patch::parameters.properties, "Encryption scope properties to be used for the update." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp index ec2cac71b1..9602eddab8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp @@ -15,26 +15,14 @@ namespace Microsoft.Storage; /** * The properties of File services in storage account. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - FileServicePropertiesProperties -) -model FileServiceProperties extends ProxyResourceBase { +model FileServiceProperties is ProxyResource { @key("fileService") @segment("fileServices") @visibility("read") name: string; - /** - * The properties of File services in storage account. - */ - @extension("x-ms-client-flatten", true) - properties?: FileServicePropertiesProperties; - ...Azure.ResourceManager.ResourceSku; } @@ -43,33 +31,19 @@ interface FileServicePropertiesOperationGroup { /** * Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("FileServices_GetServiceProperties") getServiceProperties is ArmResourceRead; /** * Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("FileServices_SetServiceProperties") setServiceProperties is ArmResourceCreateOrReplaceSync; /** * List all file services in storage accounts */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("FileServices_List") list is ArmResourceListByParent; } -@@encodedName(FileServicePropertiesOperationGroup.setServiceProperties::parameters.resource, - "application/json", - "parameters" -); -@@extension(FileServicePropertiesOperationGroup.setServiceProperties::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(FileServicePropertiesOperationGroup.setServiceProperties::parameters.resource, "The properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp index f93bcd8a13..c6356b8195 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp @@ -15,12 +15,8 @@ namespace Microsoft.Storage; /** * Properties of the file share, including Id, resource name, resource type, Etag. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(FileServiceProperties) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(FileShareProperties) -model FileShare extends ProxyResourceBase { +model FileShare is ProxyResource { /** * The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. */ @@ -31,12 +27,6 @@ model FileShare extends ProxyResourceBase { @segment("shares") @visibility("read") name: string; - - /** - * Properties of the file share. - */ - @extension("x-ms-client-flatten", true) - properties?: FileShareProperties; } @armResourceOperations @@ -110,8 +100,6 @@ interface FileShares { /** * Lists all shares. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("FileShares_List") list is ArmResourceListByParent< FileShare, { @@ -161,43 +149,11 @@ interface FileShares { >; } -@@encodedName(FileShares.create::parameters.resource, - "application/json", - "fileShare" -); -@@extension(FileShares.create::parameters.resource, - "x-ms-client-name", - "fileShare" -); @@doc(FileShares.create::parameters.resource, "Properties of the file share to create." ); -@@encodedName(FileShares.update::parameters.properties, - "application/json", - "fileShare" -); -@@extension(FileShares.update::parameters.properties, - "x-ms-client-name", - "fileShare" -); @@doc(FileShares.update::parameters.properties, "Properties to update for the file share." ); -@@encodedName(FileShares.restore::parameters.body, - "application/json", - "deletedShare" -); -@@extension(FileShares.restore::parameters.body, - "x-ms-client-name", - "deletedShare" -); @@doc(FileShares.restore::parameters.body, ""); -@@encodedName(FileShares.lease::parameters.body, - "application/json", - "parameters" -); -@@extension(FileShares.lease::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(FileShares.lease::parameters.body, "Lease Share request body."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp index d2683701fc..b6344c24f5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp @@ -15,23 +15,13 @@ namespace Microsoft.Storage; /** * The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(BlobContainer) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(ImmutabilityPolicyProperty) -model ImmutabilityPolicy extends ProxyResourceBase { +model ImmutabilityPolicy is ProxyResource { @key("immutabilityPolicy") @segment("immutabilityPolicies") @visibility("read") name: string; - - /** - * The properties of an ImmutabilityPolicy of a blob container. - */ - @extension("x-ms-client-flatten", true) - properties: ImmutabilityPolicyProperty; } @armResourceOperations @@ -39,8 +29,6 @@ interface ImmutabilityPolicies { /** * Gets the existing immutability policy along with the corresponding ETag in response headers and body. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("BlobContainers_GetImmutabilityPolicy") getImmutabilityPolicy is ArmResourceRead< ImmutabilityPolicy, { @@ -57,8 +45,6 @@ interface ImmutabilityPolicies { /** * Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("BlobContainers_CreateOrUpdateImmutabilityPolicy") createOrUpdateImmutabilityPolicy is ArmResourceCreateOrReplaceSync< ImmutabilityPolicy, { @@ -75,8 +61,6 @@ interface ImmutabilityPolicies { /** * Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("BlobContainers_DeleteImmutabilityPolicy") deleteImmutabilityPolicy is ArmResourceDeleteSync< ImmutabilityPolicy, { @@ -93,8 +77,6 @@ interface ImmutabilityPolicies { /** * Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("BlobContainers_LockImmutabilityPolicy") lockImmutabilityPolicy is ArmResourceActionSync< ImmutabilityPolicy, void, @@ -113,8 +95,6 @@ interface ImmutabilityPolicies { /** * Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("BlobContainers_ExtendImmutabilityPolicy") extendImmutabilityPolicy is ArmResourceActionSync< ImmutabilityPolicy, ImmutabilityPolicy, @@ -131,25 +111,9 @@ interface ImmutabilityPolicies { >; } -@@encodedName(ImmutabilityPolicies.createOrUpdateImmutabilityPolicy::parameters.resource, - "application/json", - "parameters" -); -@@extension(ImmutabilityPolicies.createOrUpdateImmutabilityPolicy::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(ImmutabilityPolicies.createOrUpdateImmutabilityPolicy::parameters.resource, "The ImmutabilityPolicy Properties that will be created or updated to a blob container." ); -@@encodedName(ImmutabilityPolicies.extendImmutabilityPolicy::parameters.body, - "application/json", - "parameters" -); -@@extension(ImmutabilityPolicies.extendImmutabilityPolicy::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(ImmutabilityPolicies.extendImmutabilityPolicy::parameters.body, "The ImmutabilityPolicy Properties that will be extended for a blob container." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp index 27cc3a35ca..b70203d3ff 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp @@ -15,12 +15,8 @@ namespace Microsoft.Storage; /** * The local user associated with the storage accounts. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(StorageAccount) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(LocalUserProperties) -model LocalUser extends ProxyResourceBase { +model LocalUser is ProxyResource { /** * The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account. */ @@ -31,12 +27,6 @@ model LocalUser extends ProxyResourceBase { @segment("localUsers") @visibility("read") name: string; - - /** - * Storage account local user properties. - */ - @extension("x-ms-client-flatten", true) - properties?: LocalUserProperties; } @armResourceOperations @@ -59,8 +49,6 @@ interface LocalUsers { /** * List the local users associated with the storage account. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("LocalUsers_List") list is ArmResourceListByParent; /** @@ -78,14 +66,6 @@ interface LocalUsers { >; } -@@encodedName(LocalUsers.createOrUpdate::parameters.resource, - "application/json", - "properties" -); -@@extension(LocalUsers.createOrUpdate::parameters.resource, - "x-ms-client-name", - "properties" -); @@doc(LocalUsers.createOrUpdate::parameters.resource, "The local user associated with a storage account." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp index 570855af82..18931c2b32 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp @@ -15,23 +15,13 @@ namespace Microsoft.Storage; /** * The Get Storage Account ManagementPolicies operation response. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(ManagementPolicyProperties) -model ManagementPolicy extends ProxyResourceBase { +model ManagementPolicy is ProxyResource { @key("managementPolicy") @segment("managementPolicies") @visibility("read") name: string; - - /** - * Returns the Storage Account Data Policies Rules. - */ - @extension("x-ms-client-flatten", true) - properties?: ManagementPolicyProperties; } @armResourceOperations @@ -52,14 +42,6 @@ interface ManagementPolicies { delete is ArmResourceDeleteSync; } -@@encodedName(ManagementPolicies.createOrUpdate::parameters.resource, - "application/json", - "properties" -); -@@extension(ManagementPolicies.createOrUpdate::parameters.resource, - "x-ms-client-name", - "properties" -); @@doc(ManagementPolicies.createOrUpdate::parameters.resource, "The ManagementPolicy set to a storage account." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp index f2a6a67c9b..b3e4e9bde8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp @@ -15,14 +15,9 @@ namespace Microsoft.Storage; /** * The replication policy between two storage accounts. Multiple rules can be defined in one policy. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(StorageAccount) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - ObjectReplicationPolicyProperties -) -model ObjectReplicationPolicy extends ProxyResourceBase { +model ObjectReplicationPolicy + is ProxyResource { /** * For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file. */ @@ -32,12 +27,6 @@ model ObjectReplicationPolicy extends ProxyResourceBase { @segment("objectReplicationPolicies") @visibility("read") name: string; - - /** - * Returns the Storage Account Object Replication Policy. - */ - @extension("x-ms-client-flatten", true) - properties?: ObjectReplicationPolicyProperties; } @armResourceOperations @@ -60,19 +49,9 @@ interface ObjectReplicationPolicies { /** * List the object replication policies associated with the storage account. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ObjectReplicationPolicies_List") list is ArmResourceListByParent; } -@@encodedName(ObjectReplicationPolicies.createOrUpdate::parameters.resource, - "application/json", - "properties" -); -@@extension(ObjectReplicationPolicies.createOrUpdate::parameters.resource, - "x-ms-client-name", - "properties" -); @@doc(ObjectReplicationPolicies.createOrUpdate::parameters.resource, "The object replication policy set to a storage account. A unique policy ID will be created if absent." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp index b03c948554..4fc9779311 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp @@ -15,14 +15,9 @@ namespace Microsoft.Storage; /** * The Private Endpoint Connection resource. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(StorageAccount) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - PrivateEndpointConnectionProperties -) -model PrivateEndpointConnection extends ProxyResourceBase { +model PrivateEndpointConnection + is ProxyResource { /** * The name of the private endpoint connection associated with the Azure resource */ @@ -31,12 +26,6 @@ model PrivateEndpointConnection extends ProxyResourceBase { @segment("privateEndpointConnections") @visibility("read") name: string; - - /** - * Resource properties. - */ - @extension("x-ms-client-flatten", true) - properties?: PrivateEndpointConnectionProperties; } @armResourceOperations @@ -59,19 +48,9 @@ interface PrivateEndpointConnections { /** * List all the private endpoint connections associated with the storage account. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PrivateEndpointConnections_List") list is ArmResourceListByParent; } -@@encodedName(PrivateEndpointConnections.put::parameters.resource, - "application/json", - "properties" -); -@@extension(PrivateEndpointConnections.put::parameters.resource, - "x-ms-client-name", - "properties" -); @@doc(PrivateEndpointConnections.put::parameters.resource, "The private endpoint connection properties." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp index ed4b8c6d6f..590496be39 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp @@ -15,25 +15,14 @@ namespace Microsoft.Storage; /** * The properties of a storage account’s Queue service. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - QueueServicePropertiesProperties -) -model QueueServiceProperties extends ProxyResourceBase { +model QueueServiceProperties + is ProxyResource { @key("queueService") @segment("queueServices") @visibility("read") name: string; - - /** - * The properties of a storage account’s Queue service. - */ - @extension("x-ms-client-flatten", true) - properties?: QueueServicePropertiesProperties; } @armResourceOperations @@ -41,33 +30,19 @@ interface QueueServicePropertiesOperationGroup { /** * Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("QueueServices_GetServiceProperties") getServiceProperties is ArmResourceRead; /** * Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("QueueServices_SetServiceProperties") setServiceProperties is ArmResourceCreateOrReplaceSync; /** * List all queue services for the storage account */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("QueueServices_List") list is ArmResourceListByParent; } -@@encodedName(QueueServicePropertiesOperationGroup.setServiceProperties::parameters.resource, - "application/json", - "parameters" -); -@@extension(QueueServicePropertiesOperationGroup.setServiceProperties::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(QueueServicePropertiesOperationGroup.setServiceProperties::parameters.resource, "The properties of a storage account’s Queue service, only properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules can be specified." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp index d2a6b1137b..773fcd206c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp @@ -14,11 +14,7 @@ namespace Microsoft.Storage; /** * The storage account. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(StorageAccountProperties) -model StorageAccount extends TrackedResourceBase { +model StorageAccount is TrackedResource { /** * The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. */ @@ -41,12 +37,6 @@ model StorageAccount extends TrackedResourceBase { */ extendedLocation?: ExtendedLocation; - /** - * Properties of the storage account. - */ - @extension("x-ms-client-flatten", true) - properties?: StorageAccountProperties; - ...Azure.ResourceManager.ManagedServiceIdentity; ...Azure.ResourceManager.ResourceSku; } @@ -88,8 +78,6 @@ interface StorageAccounts { /** * Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("StorageAccounts_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; /** @@ -127,8 +115,6 @@ interface StorageAccounts { /** * List SAS credentials of a storage account. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("StorageAccounts_ListAccountSAS") listAccountSAS is ArmResourceActionSync< StorageAccount, AccountSasParameters, @@ -138,8 +124,6 @@ interface StorageAccounts { /** * List service SAS credentials of a specific resource. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("StorageAccounts_ListServiceSAS") listServiceSAS is ArmResourceActionSync< StorageAccount, ServiceSasParameters, @@ -217,8 +201,6 @@ interface StorageAccounts { * Gets the private link resources that need to be created for a storage account. */ // FIXME: PrivateLinkResources_ListByStorageAccount could not be converted to a resource operation - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("PrivateLinkResources_ListByStorageAccount") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateLinkResources") @get listByStorageAccount( @@ -237,69 +219,21 @@ interface StorageAccounts { ): ArmResponse | ErrorResponse; } -@@encodedName(StorageAccounts.create::parameters.resource, - "application/json", - "parameters" -); -@@extension(StorageAccounts.create::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(StorageAccounts.create::parameters.resource, "The parameters to provide for the created account." ); -@@encodedName(StorageAccounts.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(StorageAccounts.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(StorageAccounts.update::parameters.properties, "The parameters to provide for the updated account." ); -@@encodedName(StorageAccounts.regenerateKey::parameters.body, - "application/json", - "regenerateKey" -); -@@extension(StorageAccounts.regenerateKey::parameters.body, - "x-ms-client-name", - "regenerateKey" -); @@doc(StorageAccounts.regenerateKey::parameters.body, "Specifies name of the key which should be regenerated -- key1, key2, kerb1, kerb2." ); -@@encodedName(StorageAccounts.listAccountSAS::parameters.body, - "application/json", - "parameters" -); -@@extension(StorageAccounts.listAccountSAS::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(StorageAccounts.listAccountSAS::parameters.body, "The parameters to provide to list SAS credentials for the storage account." ); -@@encodedName(StorageAccounts.listServiceSAS::parameters.body, - "application/json", - "parameters" -); -@@extension(StorageAccounts.listServiceSAS::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(StorageAccounts.listServiceSAS::parameters.body, "The parameters to provide to list service SAS credentials." ); -@@encodedName(StorageAccounts.restoreBlobRanges::parameters.body, - "application/json", - "parameters" -); -@@extension(StorageAccounts.restoreBlobRanges::parameters.body, - "x-ms-client-name", - "parameters" -); @@doc(StorageAccounts.restoreBlobRanges::parameters.body, "The parameters to provide for restore blob ranges." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp index eb4b587a9f..b0217e68df 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp @@ -13,12 +13,8 @@ using TypeSpec.OpenAPI; namespace Microsoft.Storage; -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(QueueServiceProperties) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(QueueProperties) -model StorageQueue extends ProxyResourceBase { +model StorageQueue is ProxyResource { /** * A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters. */ @@ -30,12 +26,6 @@ model StorageQueue extends ProxyResourceBase { @segment("queues") @visibility("read") name: string; - - /** - * Queue resource properties. - */ - @extension("x-ms-client-flatten", true) - properties?: QueueProperties; } @armResourceOperations @@ -43,37 +33,27 @@ interface StorageQueues { /** * Gets the queue with the specified queue name, under the specified account if it exists. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Queue_Get") get is ArmResourceRead; /** * Creates a new queue with the specified queue name, under the specified account. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Queue_Create") create is ArmResourceCreateOrReplaceSync; /** * Creates a new queue with the specified queue name, under the specified account. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("Queue_Update") update is ArmCustomPatchSync; /** * Deletes the queue with the specified queue name, under the specified account if it exists. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Queue_Delete") delete is ArmResourceDeleteSync; /** * Gets a list of all the queues under the specified storage account */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Queue_List") list is ArmResourceListByParent< StorageQueue, { @@ -94,25 +74,9 @@ interface StorageQueues { >; } -@@encodedName(StorageQueues.create::parameters.resource, - "application/json", - "queue" -); -@@extension(StorageQueues.create::parameters.resource, - "x-ms-client-name", - "queue" -); @@doc(StorageQueues.create::parameters.resource, "Queue properties and metadata to be created with" ); -@@encodedName(StorageQueues.update::parameters.properties, - "application/json", - "queue" -); -@@extension(StorageQueues.update::parameters.properties, - "x-ms-client-name", - "queue" -); @@doc(StorageQueues.update::parameters.properties, "Queue properties and metadata to be created with" ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp index 34e3927a9f..83b80a2795 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp @@ -15,12 +15,8 @@ namespace Microsoft.Storage; /** * Properties of the table, including Id, resource name, resource type. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(TableServiceProperties) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal(TableProperties) -model Table extends ProxyResourceBase { +model Table is ProxyResource { /** * A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character. */ @@ -32,12 +28,6 @@ model Table extends ProxyResourceBase { @segment("tables") @visibility("read") name: string; - - /** - * Table resource properties. - */ - @extension("x-ms-client-flatten", true) - properties?: TableProperties; } @armResourceOperations @@ -45,59 +35,33 @@ interface Tables { /** * Gets the table with the specified table name, under the specified account if it exists. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Table_Get") get is ArmResourceRead
    ; /** * Creates a new table with the specified table name, under the specified account. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Table_Create") create is ArmResourceCreateOrReplaceSync
    ; /** * Creates a new table with the specified table name, under the specified account. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") - @operationId("Table_Update") update is ArmCustomPatchSync; /** * Deletes the table with the specified table name, under the specified account if it exists. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Table_Delete") delete is ArmResourceDeleteSync
    ; /** * Gets a list of all the tables under the specified storage account */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Table_List") list is ArmResourceListByParent
    ; } -@@encodedName(Tables.create::parameters.resource, - "application/json", - "parameters" -); -@@extension(Tables.create::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(Tables.create::parameters.resource, "The parameters to provide to create a table." ); -@@encodedName(Tables.update::parameters.properties, - "application/json", - "parameters" -); -@@extension(Tables.update::parameters.properties, - "x-ms-client-name", - "parameters" -); @@doc(Tables.update::parameters.properties, "The parameters to provide to create a table." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp index d891ace999..1a91f59ec3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp @@ -15,25 +15,14 @@ namespace Microsoft.Storage; /** * The properties of a storage account’s Table service. */ -#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" -#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -@includeInapplicableMetadataInPayload(false) -@Azure.ResourceManager.Private.armResourceInternal( - TableServicePropertiesProperties -) -model TableServiceProperties extends ProxyResourceBase { +model TableServiceProperties + is ProxyResource { @key("tableService") @segment("tableServices") @visibility("read") name: string; - - /** - * The properties of a storage account’s Table service. - */ - @extension("x-ms-client-flatten", true) - properties?: TableServicePropertiesProperties; } @armResourceOperations @@ -41,33 +30,19 @@ interface TableServicePropertiesOperationGroup { /** * Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TableServices_GetServiceProperties") getServiceProperties is ArmResourceRead; /** * Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TableServices_SetServiceProperties") setServiceProperties is ArmResourceCreateOrReplaceSync; /** * List all table services for the storage account. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("TableServices_List") list is ArmResourceListByParent; } -@@encodedName(TableServicePropertiesOperationGroup.setServiceProperties::parameters.resource, - "application/json", - "parameters" -); -@@extension(TableServicePropertiesOperationGroup.setServiceProperties::parameters.resource, - "x-ms-client-name", - "parameters" -); @@doc(TableServicePropertiesOperationGroup.setServiceProperties::parameters.resource, "The properties of a storage account’s Table service, only properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules can be specified." ); diff --git a/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts b/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts index 8f24e19f00..015b7b82fc 100644 --- a/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts +++ b/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts @@ -4,7 +4,7 @@ import { readdir } from "fs/promises"; import { join, dirname, extname, resolve } from "path"; import { resolveProject } from "./resolve-root"; -export async function generateTypespec(repoRoot: string, folder: string, debug = false) { +export async function generateTypespec(repoRoot: string, folder: string, debug = false, isFullCompatible = false) { const { path: root } = await resolveProject(__dirname); const path = join(root, "test", folder); const dir = await readdir(path); @@ -21,10 +21,10 @@ export async function generateTypespec(repoRoot: string, folder: string, debug = } const swaggerPath = join(path, firstSwagger); - generate(repoRoot, swaggerPath, debug); + generate(repoRoot, swaggerPath, debug, isFullCompatible); } -function generate(root: string, path: string, debug = false) { +function generate(root: string, path: string, debug = false, isFullCompatible = false) { const extension = extname(path); const inputFile = extension === ".json" ? `--input-file=${path}` : `--require=${path}`; @@ -42,6 +42,7 @@ function generate(root: string, path: string, debug = false) { `--output-folder=${dirname(path)}`, "--src-path=tsp-output", ...(debug ? ["--openapi-to-typespec.debugger"] : []), + ...(isFullCompatible ? ["--openapi-to-typespec.isFullCompatible"] : []), ...(overrideGuess ? ["--guessResourceKey=false"] : ["--guessResourceKey=true"]), ]; const spawn = spawnSync("node", args, { stdio: "inherit" }); @@ -62,9 +63,10 @@ async function main() { ? [folder as string] : (await readdir(join(root, "test"))).filter((d) => d !== "utils"); - for (const folder of folders) { + for (let i = 0; i < folders.length; i++) { + const folder = folders[i]; try { - await generateTypespec(repoRoot, folder, debug); + await generateTypespec(repoRoot, folder, debug, i % 2 === 0); } catch (e) { throw new Error(`Failed to generate ${folder}, error:\n${e}`); } From 6c9655e62e0b6d44c0d2a060b2235eb138e2468b Mon Sep 17 00:00:00 2001 From: Chenjie Shi Date: Tue, 27 Feb 2024 15:29:20 +0800 Subject: [PATCH 21/33] change to use different base parameter for different resource (#4889) fix: https://github.com/Azure/autorest/issues/4872 --- .../fix_wrong_base_parameter_2024-02-20-07-32.json | 10 ++++++++++ .../src/transforms/transform-arm-resources.ts | 11 ++++++++++- .../tsp-output/DataManagerForAgricultureExtension.tsp | 2 +- .../tsp-output/DataManagerForAgricultureSolution.tsp | 2 +- .../test/arm-alertsmanagement/tsp-output/Alert.tsp | 4 ++-- .../arm-alertsmanagement/tsp-output/SmartGroup.tsp | 4 ++-- .../arm-authorization/tsp-output/DenyAssignment.tsp | 2 +- .../tsp-output/ProviderOperationsMetadata.tsp | 4 ++-- .../arm-authorization/tsp-output/RoleAssignment.tsp | 6 +++--- .../tsp-output/RoleAssignmentSchedule.tsp | 2 +- .../tsp-output/RoleAssignmentScheduleInstance.tsp | 2 +- .../tsp-output/RoleAssignmentScheduleRequest.tsp | 2 +- .../arm-authorization/tsp-output/RoleDefinition.tsp | 2 +- .../tsp-output/RoleEligibilitySchedule.tsp | 2 +- .../tsp-output/RoleEligibilityScheduleInstance.tsp | 2 +- .../tsp-output/RoleEligibilityScheduleRequest.tsp | 2 +- .../test/arm-compute/tsp-output/SharedGallery.tsp | 2 +- 17 files changed, 40 insertions(+), 21 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/fix_wrong_base_parameter_2024-02-20-07-32.json diff --git a/common/changes/@autorest/openapi-to-typespec/fix_wrong_base_parameter_2024-02-20-07-32.json b/common/changes/@autorest/openapi-to-typespec/fix_wrong_base_parameter_2024-02-20-07-32.json new file mode 100644 index 0000000000..b17c831b29 --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/fix_wrong_base_parameter_2024-02-20-07-32.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "use different base parameter for different resource", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts index b8a0437fcb..f27c1f72e9 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts @@ -706,13 +706,22 @@ function buildOperationBaseParameters(operation: Operation, resource: ArmResourc } } + let parameterTemplate = `BaseParameters<${resource.SwaggerModelName}>`; + if (resource.IsExtensionResource) { + parameterTemplate = "ExtensionBaseParameters"; + } else if (resource.IsTenantResource) { + parameterTemplate = "TenantBaseParameters"; + } else if (resource.IsSubscriptionResource) { + parameterTemplate = "SubscriptionBaseParameters"; + } + if (otherParameters.length) { const params: string[] = []; for (const parameter of otherParameters) { params.push(generateParameter(parameter)); } return `{ - ...BaseParameters<${resource.SwaggerModelName}>; + ...${parameterTemplate}; ${params.join(";\n")} }`; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp index 44795aa88b..7fb2371d20 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp @@ -54,7 +54,7 @@ interface DataManagerForAgricultureExtensions { list is ArmResourceListByParent< DataManagerForAgricultureExtension, { - ...BaseParameters; + ...TenantBaseParameters; /** * DataManagerForAgricultureExtension ids. diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp index 87eceb795a..f4198451d1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp @@ -56,7 +56,7 @@ interface DataManagerForAgricultureSolutions { list is ArmResourceListByParent< DataManagerForAgricultureSolution, { - ...BaseParameters; + ...TenantBaseParameters; /** * Ids of Data Manager For Agriculture Solutions which the customer requests to fetch. diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp index fe0a557fc9..88b0b78cde 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp @@ -39,7 +39,7 @@ interface Alerts { getAll is ArmResourceListByParent< Alert, { - ...BaseParameters; + ...SubscriptionBaseParameters; /** * Filter by target resource( which is full ARM ID) Default value is select all. @@ -153,7 +153,7 @@ interface Alerts { string, Alert, { - ...BaseParameters; + ...SubscriptionBaseParameters; /** * New state of the alert. diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp index 66ca95d675..b850bb8b16 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp @@ -39,7 +39,7 @@ interface SmartGroups { getAll is ArmResourceListByParent< SmartGroup, { - ...BaseParameters; + ...SubscriptionBaseParameters; /** * Filter by target resource( which is full ARM ID) Default value is select all. @@ -117,7 +117,7 @@ interface SmartGroups { void, SmartGroup, { - ...BaseParameters; + ...SubscriptionBaseParameters; /** * New state of the alert. diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp index 630c5f9cc0..f745a0405b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp @@ -50,7 +50,7 @@ interface DenyAssignments { listForResource is ArmResourceListByParent< DenyAssignment, { - ...BaseParameters; + ...ExtensionBaseParameters; ...SubscriptionIdParameter; ...ResourceGroupParameter; diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp index 074bbbcc8b..fd953a3c2e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp @@ -50,7 +50,7 @@ interface ProviderOperationsMetadataOperationGroup { get is ArmResourceRead< ProviderOperationsMetadata, { - ...BaseParameters; + ...TenantBaseParameters; /** * Specifies whether to expand the values. @@ -68,7 +68,7 @@ interface ProviderOperationsMetadataOperationGroup { list is ArmResourceListByParent< ProviderOperationsMetadata, { - ...BaseParameters; + ...TenantBaseParameters; /** * Specifies whether to expand the values. diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp index f92a0bed9e..c1c5fcd36c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp @@ -43,7 +43,7 @@ interface RoleAssignments { get is ArmResourceRead< RoleAssignment, { - ...BaseParameters; + ...ExtensionBaseParameters; /** * Tenant ID for cross-tenant request @@ -64,7 +64,7 @@ interface RoleAssignments { delete is ArmResourceDeleteSync< RoleAssignment, { - ...BaseParameters; + ...ExtensionBaseParameters; /** * Tenant ID for cross-tenant request @@ -82,7 +82,7 @@ interface RoleAssignments { listForScope is ArmResourceListByParent< RoleAssignment, { - ...BaseParameters; + ...ExtensionBaseParameters; /** * The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp index 6db8a1a7e6..00e5437d20 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp @@ -52,7 +52,7 @@ interface RoleAssignmentSchedules { listForScope is ArmResourceListByParent< RoleAssignmentSchedule, { - ...BaseParameters; + ...ExtensionBaseParameters; /** * The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment schedules for the current user. Use $filter=asTarget() to return all role assignment schedules created for the current user. diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp index 3f41777be4..b3d96fda24 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp @@ -52,7 +52,7 @@ interface RoleAssignmentScheduleInstances { listForScope is ArmResourceListByParent< RoleAssignmentScheduleInstance, { - ...BaseParameters; + ...ExtensionBaseParameters; /** * The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment schedule instances for the user. Use $filter=asTarget() to return all role assignment schedule instances created for the current user. diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp index 50f17a1b13..62e1e1dbe3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp @@ -57,7 +57,7 @@ interface RoleAssignmentScheduleRequests { listForScope is ArmResourceListByParent< RoleAssignmentScheduleRequest, { - ...BaseParameters; + ...ExtensionBaseParameters; /** * The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role assignment schedule requests requested by the current user. Use $filter=asTarget() to return all role assignment schedule requests created for the current user. Use $filter=asApprover() to return all role assignment schedule requests where the current user is an approver. diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp index 5d6b71781c..16a3d1a66b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp @@ -60,7 +60,7 @@ interface RoleDefinitions { list is ArmResourceListByParent< RoleDefinition, { - ...BaseParameters; + ...ExtensionBaseParameters; /** * The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well. diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp index 80bd6eb075..ec3706e532 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp @@ -52,7 +52,7 @@ interface RoleEligibilitySchedules { listForScope is ArmResourceListByParent< RoleEligibilitySchedule, { - ...BaseParameters; + ...ExtensionBaseParameters; /** * The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedules at or above the scope. Use $filter=principalId eq {id} to return all role eligibility schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use $filter=asTarget() to return all role eligibility schedules created for the current user. diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp index 0f25e74260..fa6f33869f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp @@ -52,7 +52,7 @@ interface RoleEligibilityScheduleInstances { listForScope is ArmResourceListByParent< RoleEligibilityScheduleInstance, { - ...BaseParameters; + ...ExtensionBaseParameters; /** * The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use $filter=asTarget() to return all role eligibility schedules created for the current user. diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp index 7f6edf3fd8..443771ecff 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp @@ -57,7 +57,7 @@ interface RoleEligibilityScheduleRequests { listForScope is ArmResourceListByParent< RoleEligibilityScheduleRequest, { - ...BaseParameters; + ...ExtensionBaseParameters; /** * The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role eligibility schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role eligibility schedule requests requested by the current user. Use $filter=asTarget() to return all role eligibility schedule requests created for the current user. Use $filter=asApprover() to return all role eligibility schedule requests where the current user is an approver. diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp index 743ed33c60..1ec8b4917d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp @@ -50,7 +50,7 @@ interface SharedGalleries { list is ArmResourceListByParent< SharedGallery, { - ...BaseParameters; + ...SubscriptionBaseParameters; /** * The query parameter to decide what shared galleries to fetch when doing listing operations. From 04b947f109fd3ae5c34e8916d82e511db61920e5 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 28 Feb 2024 10:01:48 -0800 Subject: [PATCH 22/33] Fix crash with duplicate paths (#4896) fix #4882 too --- .github/workflows/codeql.yml | 76 ++++++++++++------- ...-duplicate-path_2024-02-28-16-43 copy.json | 15 ++++ ...crash-duplicate-path_2024-02-28-16-43.json | 10 +++ packages/extensions/core/src/app.ts | 4 +- packages/libs/deduplication/src/main.ts | 5 +- 5 files changed, 77 insertions(+), 33 deletions(-) create mode 100644 common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43 copy.json create mode 100644 common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43.json diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 8e08852ab7..6f749caff8 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,51 +1,69 @@ -name: "Code scanning - action" +name: "CodeQL" on: push: + branches: ["main", "release/*"] pull_request: + branches: ["main", "release/*"] schedule: - - cron: "0 19 * * 0" + - cron: "30 3 * * 3" jobs: - CodeQL-Build: - # CodeQL runs on ubuntu-latest and windows-latest - runs-on: ubuntu-latest + analyze: + name: Analyze + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners + # Consider using larger runners for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: ["javascript-typescript"] + # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] + # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support steps: - name: Checkout repository - uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - # Override language selection by uncommenting this and choosing your languages - # with: - # languages: go, javascript, csharp, python, cpp, java + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - #- run: | - # make bootstrap - # make release + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" diff --git a/common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43 copy.json b/common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43 copy.json new file mode 100644 index 0000000000..2d5bbc09d2 --- /dev/null +++ b/common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43 copy.json @@ -0,0 +1,15 @@ +{ + "changes": [ + { + "packageName": "@autorest/core", + "comment": "Fix: Crash when deduplication paths", + "type": "patch" + }, + { + "packageName": "@autorest/core", + "comment": "Fix: Crash reporting zero exit code when a plugin report a crash but send invalid exception", + "type": "patch" + } + ], + "packageName": "@autorest/core" +} diff --git a/common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43.json b/common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43.json new file mode 100644 index 0000000000..b24a859a6a --- /dev/null +++ b/common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@azure-tools/deduplication", + "comment": "Fix: Crash when deduplication paths", + "type": "patch" + } + ], + "packageName": "@azure-tools/deduplication" +} \ No newline at end of file diff --git a/packages/extensions/core/src/app.ts b/packages/extensions/core/src/app.ts index bed4996c26..693dd41168 100644 --- a/packages/extensions/core/src/app.ts +++ b/packages/extensions/core/src/app.ts @@ -351,7 +351,9 @@ async function main() { // - doing the inversion (instanceof Error) doesn't reliably work since that seems to return false on Errors marshalled from safeEval if (e instanceof Exception) { logger.log({ level: "error", message: e.message }); - exitCode = e.exitCode; + if (e.exitCode) { + exitCode = e.exitCode; + } } if (e !== false) { logger.log({ level: "error", message: `!${e}` }); diff --git a/packages/libs/deduplication/src/main.ts b/packages/libs/deduplication/src/main.ts index 9c0e6c29ec..3af8f88182 100644 --- a/packages/libs/deduplication/src/main.ts +++ b/packages/libs/deduplication/src/main.ts @@ -192,8 +192,7 @@ export class Deduplicator { let filename = path[xMsMetadata].filename; let originalLocations = path[xMsMetadata].originalLocations; const pathFromMetadata = path[xMsMetadata].path; - let profiles = path[xMsMetadata].profiles; - + let profiles = path[xMsMetadata].profiles ?? {}; // extract path properties excluding metadata const { "x-ms-metadata": metadataCurrent, ...filteredPath } = path; @@ -218,7 +217,7 @@ export class Deduplicator { originalLocations = originalLocations.concat(anotherPath[xMsMetadata].originalLocations); profiles = getMergedProfilesMetadata( profiles, - anotherPath[xMsMetadata].profiles, + anotherPath[xMsMetadata].profiles ?? {}, path[xMsMetadata].path, originalLocations, ); From 8d137ce24e1af96444766688e7cd851767d6543c Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 28 Feb 2024 11:04:14 -0800 Subject: [PATCH 23/33] Bump versions (#4897) --- .../arm-conversion_2023-12-21-09-41.json | 10 ---- ...dd-feature-converter_2024-02-01-08-01.json | 10 ---- .../arm-conversion_2023-10-02-17-10.json | 10 ---- .../auth_schemes_2024-01-18-03-46.json | 10 ---- .../converter_feature_2024-01-16-10-39.json | 10 ---- .../fix_converter_2024-01-08-09-46.json | 10 ---- ...wrong_base_parameter_2024-02-20-07-32.json | 10 ---- .../flag_2024-02-20-03-49.json | 10 ---- .../new_tsp_version_2024-02-08-09-41.json | 10 ---- .../projectedName_2024-02-19-02-17.json | 10 ---- ...ove_duration_default_2024-02-20-06-08.json | 10 ---- .../routes_2024-02-19-07-31.json | 10 ---- .../update_config_2024-01-23-17-46.json | 10 ---- ...-duplicate-path_2024-02-28-16-43 copy.json | 15 ------ ...crash-duplicate-path_2024-02-28-16-43.json | 10 ---- packages/apps/autorest/package.json | 4 +- packages/extensions/core/CHANGELOG.json | 23 +++++++++ packages/extensions/core/CHANGELOG.md | 10 +++- packages/extensions/core/package.json | 6 +-- .../openapi-to-typespec/CHANGELOG.json | 47 +++++++++++++++++++ .../openapi-to-typespec/CHANGELOG.md | 23 ++++++++- .../openapi-to-typespec/package.json | 2 +- packages/libs/configuration/CHANGELOG.json | 12 +++++ packages/libs/configuration/CHANGELOG.md | 9 +++- packages/libs/configuration/package.json | 2 +- packages/libs/deduplication/CHANGELOG.json | 12 +++++ packages/libs/deduplication/CHANGELOG.md | 9 +++- packages/libs/deduplication/package.json | 2 +- .../testing/test-public-packages/package.json | 2 +- 29 files changed, 150 insertions(+), 168 deletions(-) delete mode 100644 common/changes/@autorest/configuration/arm-conversion_2023-12-21-09-41.json delete mode 100644 common/changes/@autorest/openapi-to-typespec/add-feature-converter_2024-02-01-08-01.json delete mode 100644 common/changes/@autorest/openapi-to-typespec/arm-conversion_2023-10-02-17-10.json delete mode 100644 common/changes/@autorest/openapi-to-typespec/auth_schemes_2024-01-18-03-46.json delete mode 100644 common/changes/@autorest/openapi-to-typespec/converter_feature_2024-01-16-10-39.json delete mode 100644 common/changes/@autorest/openapi-to-typespec/fix_converter_2024-01-08-09-46.json delete mode 100644 common/changes/@autorest/openapi-to-typespec/fix_wrong_base_parameter_2024-02-20-07-32.json delete mode 100644 common/changes/@autorest/openapi-to-typespec/flag_2024-02-20-03-49.json delete mode 100644 common/changes/@autorest/openapi-to-typespec/new_tsp_version_2024-02-08-09-41.json delete mode 100644 common/changes/@autorest/openapi-to-typespec/projectedName_2024-02-19-02-17.json delete mode 100644 common/changes/@autorest/openapi-to-typespec/remove_duration_default_2024-02-20-06-08.json delete mode 100644 common/changes/@autorest/openapi-to-typespec/routes_2024-02-19-07-31.json delete mode 100644 common/changes/@autorest/openapi-to-typespec/update_config_2024-01-23-17-46.json delete mode 100644 common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43 copy.json delete mode 100644 common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43.json diff --git a/common/changes/@autorest/configuration/arm-conversion_2023-12-21-09-41.json b/common/changes/@autorest/configuration/arm-conversion_2023-12-21-09-41.json deleted file mode 100644 index e8093c1950..0000000000 --- a/common/changes/@autorest/configuration/arm-conversion_2023-12-21-09-41.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/configuration", - "comment": "rename openapi-to-cadl to openapi-to-typespec", - "type": "patch" - } - ], - "packageName": "@autorest/configuration" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/add-feature-converter_2024-02-01-08-01.json b/common/changes/@autorest/openapi-to-typespec/add-feature-converter_2024-02-01-08-01.json deleted file mode 100644 index aaba975ebd..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/add-feature-converter_2024-02-01-08-01.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Add support for custom resource, enhance doc conversion and fix default value issue", - "type": "minor" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/arm-conversion_2023-10-02-17-10.json b/common/changes/@autorest/openapi-to-typespec/arm-conversion_2023-10-02-17-10.json deleted file mode 100644 index 875e9bbdfe..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/arm-conversion_2023-10-02-17-10.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Initial Support for ARM in OpenAPI to TypeSpec Conversion", - "type": "minor" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} diff --git a/common/changes/@autorest/openapi-to-typespec/auth_schemes_2024-01-18-03-46.json b/common/changes/@autorest/openapi-to-typespec/auth_schemes_2024-01-18-03-46.json deleted file mode 100644 index 2030593717..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/auth_schemes_2024-01-18-03-46.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Support Auth", - "type": "minor" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/converter_feature_2024-01-16-10-39.json b/common/changes/@autorest/openapi-to-typespec/converter_feature_2024-01-16-10-39.json deleted file mode 100644 index 469ff87dda..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/converter_feature_2024-01-16-10-39.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Add feature and fix bug for converter.", - "type": "patch" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/fix_converter_2024-01-08-09-46.json b/common/changes/@autorest/openapi-to-typespec/fix_converter_2024-01-08-09-46.json deleted file mode 100644 index ac5cf8d547..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/fix_converter_2024-01-08-09-46.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Fix validation issues for converter", - "type": "patch" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/fix_wrong_base_parameter_2024-02-20-07-32.json b/common/changes/@autorest/openapi-to-typespec/fix_wrong_base_parameter_2024-02-20-07-32.json deleted file mode 100644 index b17c831b29..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/fix_wrong_base_parameter_2024-02-20-07-32.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "use different base parameter for different resource", - "type": "patch" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/flag_2024-02-20-03-49.json b/common/changes/@autorest/openapi-to-typespec/flag_2024-02-20-03-49.json deleted file mode 100644 index 9ea72f62cc..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/flag_2024-02-20-03-49.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Add a flag to disable conversion feature for backcomp", - "type": "patch" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/new_tsp_version_2024-02-08-09-41.json b/common/changes/@autorest/openapi-to-typespec/new_tsp_version_2024-02-08-09-41.json deleted file mode 100644 index deea80300f..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/new_tsp_version_2024-02-08-09-41.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Support new location resource expression, support new flatten decorator and fix doc escape problem.", - "type": "minor" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/projectedName_2024-02-19-02-17.json b/common/changes/@autorest/openapi-to-typespec/projectedName_2024-02-19-02-17.json deleted file mode 100644 index 87410db5b7..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/projectedName_2024-02-19-02-17.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "migrate `@projectedName` to `@encodedName`", - "type": "patch" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/remove_duration_default_2024-02-20-06-08.json b/common/changes/@autorest/openapi-to-typespec/remove_duration_default_2024-02-20-06-08.json deleted file mode 100644 index 82f8b42ddf..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/remove_duration_default_2024-02-20-06-08.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "fix default value of array and remove default value of duration temporarily", - "type": "patch" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/routes_2024-02-19-07-31.json b/common/changes/@autorest/openapi-to-typespec/routes_2024-02-19-07-31.json deleted file mode 100644 index fc0023b245..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/routes_2024-02-19-07-31.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Change to use raw operation for non-resource operations for ARM", - "type": "patch" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@autorest/openapi-to-typespec/update_config_2024-01-23-17-46.json b/common/changes/@autorest/openapi-to-typespec/update_config_2024-01-23-17-46.json deleted file mode 100644 index 59bb86c114..0000000000 --- a/common/changes/@autorest/openapi-to-typespec/update_config_2024-01-23-17-46.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/openapi-to-typespec", - "comment": "Improve data-plane tspconfig", - "type": "patch" - } - ], - "packageName": "@autorest/openapi-to-typespec" -} \ No newline at end of file diff --git a/common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43 copy.json b/common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43 copy.json deleted file mode 100644 index 2d5bbc09d2..0000000000 --- a/common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43 copy.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "changes": [ - { - "packageName": "@autorest/core", - "comment": "Fix: Crash when deduplication paths", - "type": "patch" - }, - { - "packageName": "@autorest/core", - "comment": "Fix: Crash reporting zero exit code when a plugin report a crash but send invalid exception", - "type": "patch" - } - ], - "packageName": "@autorest/core" -} diff --git a/common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43.json b/common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43.json deleted file mode 100644 index b24a859a6a..0000000000 --- a/common/changes/@azure-tools/deduplication/fix-crash-duplicate-path_2024-02-28-16-43.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@azure-tools/deduplication", - "comment": "Fix: Crash when deduplication paths", - "type": "patch" - } - ], - "packageName": "@azure-tools/deduplication" -} \ No newline at end of file diff --git a/packages/apps/autorest/package.json b/packages/apps/autorest/package.json index d118aadb68..bfaa8ea5f7 100644 --- a/packages/apps/autorest/package.json +++ b/packages/apps/autorest/package.json @@ -43,8 +43,8 @@ }, "typings": "./dist/exports.d.ts", "devDependencies": { - "@autorest/configuration": "~1.12.0", - "@autorest/core": "~3.10.1", + "@autorest/configuration": "~1.12.1", + "@autorest/core": "~3.10.2", "@autorest/common": "~1.6.0", "@azure-tools/async-io": "~3.0.0", "@azure-tools/extension": "~3.7.1", diff --git a/packages/extensions/core/CHANGELOG.json b/packages/extensions/core/CHANGELOG.json index a641f5705c..caf3ae66a4 100644 --- a/packages/extensions/core/CHANGELOG.json +++ b/packages/extensions/core/CHANGELOG.json @@ -1,6 +1,29 @@ { "name": "@autorest/core", "entries": [ + { + "version": "3.10.2", + "tag": "@autorest/core_v3.10.2", + "date": "Wed, 28 Feb 2024 18:02:21 GMT", + "comments": { + "patch": [ + { + "comment": "Fix: Crash when deduplication paths" + }, + { + "comment": "Fix: Crash reporting zero exit code when a plugin report a crash but send invalid exception" + } + ], + "dependency": [ + { + "comment": "Updating dependency \"@autorest/configuration\" from `~1.12.0` to `~1.12.1`" + }, + { + "comment": "Updating dependency \"@azure-tools/deduplication\" from `~3.2.0` to `~3.2.1`" + } + ] + } + }, { "version": "3.10.1", "tag": "@autorest/core_v3.10.1", diff --git a/packages/extensions/core/CHANGELOG.md b/packages/extensions/core/CHANGELOG.md index 22083f6808..6b64278b95 100644 --- a/packages/extensions/core/CHANGELOG.md +++ b/packages/extensions/core/CHANGELOG.md @@ -1,6 +1,14 @@ # Change Log - @autorest/core -This log was last generated on Tue, 28 Nov 2023 19:02:52 GMT and should not be manually modified. +This log was last generated on Wed, 28 Feb 2024 18:02:21 GMT and should not be manually modified. + +## 3.10.2 +Wed, 28 Feb 2024 18:02:21 GMT + +### Patches + +- Fix: Crash when deduplication paths +- Fix: Crash reporting zero exit code when a plugin report a crash but send invalid exception ## 3.10.1 Tue, 28 Nov 2023 19:02:52 GMT diff --git a/packages/extensions/core/package.json b/packages/extensions/core/package.json index e4bcf9d8d3..c854c9af44 100644 --- a/packages/extensions/core/package.json +++ b/packages/extensions/core/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/core", - "version": "3.10.1", + "version": "3.10.2", "description": "AutoRest Core Module", "engines": { "node": ">=12.0.0" @@ -43,13 +43,13 @@ "typings": "./dist/exports.d.ts", "devDependencies": { "@autorest/common": "~1.6.0", - "@autorest/configuration": "~1.12.0", + "@autorest/configuration": "~1.12.1", "@autorest/schemas": "~1.3.5", "@autorest/test-utils": "~0.6.0", "@azure-tools/async-io": "~3.0.0", "@azure-tools/codegen": "~2.10.0", "@azure-tools/datastore": "~4.8.0", - "@azure-tools/deduplication": "~3.2.0", + "@azure-tools/deduplication": "~3.2.1", "@azure-tools/extension": "~3.7.1", "@azure-tools/json": "~1.3.0", "@azure-tools/jsonschema": "~1.3.0", diff --git a/packages/extensions/openapi-to-typespec/CHANGELOG.json b/packages/extensions/openapi-to-typespec/CHANGELOG.json index e7a6eefe52..fdeea585eb 100644 --- a/packages/extensions/openapi-to-typespec/CHANGELOG.json +++ b/packages/extensions/openapi-to-typespec/CHANGELOG.json @@ -1,6 +1,53 @@ { "name": "@autorest/openapi-to-typespec", "entries": [ + { + "version": "0.7.0", + "tag": "@autorest/openapi-to-typespec_v0.7.0", + "date": "Wed, 28 Feb 2024 18:02:21 GMT", + "comments": { + "minor": [ + { + "comment": "Add support for custom resource, enhance doc conversion and fix default value issue" + }, + { + "comment": "Initial Support for ARM in OpenAPI to TypeSpec Conversion" + }, + { + "comment": "Support Auth" + }, + { + "comment": "Support new location resource expression, support new flatten decorator and fix doc escape problem." + } + ], + "patch": [ + { + "comment": "Add feature and fix bug for converter." + }, + { + "comment": "Fix validation issues for converter" + }, + { + "comment": "use different base parameter for different resource" + }, + { + "comment": "Add a flag to disable conversion feature for backcomp" + }, + { + "comment": "migrate `@projectedName` to `@encodedName`" + }, + { + "comment": "fix default value of array and remove default value of duration temporarily" + }, + { + "comment": "Change to use raw operation for non-resource operations for ARM" + }, + { + "comment": "Improve data-plane tspconfig" + } + ] + } + }, { "version": "0.6.0", "tag": "@autorest/openapi-to-cadl_v0.6.0", diff --git a/packages/extensions/openapi-to-typespec/CHANGELOG.md b/packages/extensions/openapi-to-typespec/CHANGELOG.md index 1561580466..6bc706a73f 100644 --- a/packages/extensions/openapi-to-typespec/CHANGELOG.md +++ b/packages/extensions/openapi-to-typespec/CHANGELOG.md @@ -1,6 +1,27 @@ # Change Log - @autorest/openapi-to-typespec -This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. +This log was last generated on Wed, 28 Feb 2024 18:02:21 GMT and should not be manually modified. + +## 0.7.0 +Wed, 28 Feb 2024 18:02:21 GMT + +### Minor changes + +- Add support for custom resource, enhance doc conversion and fix default value issue +- Initial Support for ARM in OpenAPI to TypeSpec Conversion +- Support Auth +- Support new location resource expression, support new flatten decorator and fix doc escape problem. + +### Patches + +- Add feature and fix bug for converter. +- Fix validation issues for converter +- use different base parameter for different resource +- Add a flag to disable conversion feature for backcomp +- migrate `@projectedName` to `@encodedName` +- fix default value of array and remove default value of duration temporarily +- Change to use raw operation for non-resource operations for ARM +- Improve data-plane tspconfig ## 0.6.0 Thu, 16 Nov 2023 16:00:04 GMT diff --git a/packages/extensions/openapi-to-typespec/package.json b/packages/extensions/openapi-to-typespec/package.json index 13fef86712..5ff4049126 100644 --- a/packages/extensions/openapi-to-typespec/package.json +++ b/packages/extensions/openapi-to-typespec/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/openapi-to-typespec", - "version": "0.6.0", + "version": "0.7.0", "description": "Autorest plugin to scaffold a Typespec definition from an OpenAPI document", "main": "dist/main.js", "typings": "dist/main.d.ts", diff --git a/packages/libs/configuration/CHANGELOG.json b/packages/libs/configuration/CHANGELOG.json index eb5e92e185..c59c15e6f0 100644 --- a/packages/libs/configuration/CHANGELOG.json +++ b/packages/libs/configuration/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@autorest/configuration", "entries": [ + { + "version": "1.12.1", + "tag": "@autorest/configuration_v1.12.1", + "date": "Wed, 28 Feb 2024 18:02:21 GMT", + "comments": { + "patch": [ + { + "comment": "rename openapi-to-cadl to openapi-to-typespec" + } + ] + } + }, { "version": "1.12.0", "tag": "@autorest/configuration_v1.12.0", diff --git a/packages/libs/configuration/CHANGELOG.md b/packages/libs/configuration/CHANGELOG.md index 5abe32ffff..e8aa610823 100644 --- a/packages/libs/configuration/CHANGELOG.md +++ b/packages/libs/configuration/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @autorest/configuration -This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. +This log was last generated on Wed, 28 Feb 2024 18:02:21 GMT and should not be manually modified. + +## 1.12.1 +Wed, 28 Feb 2024 18:02:21 GMT + +### Patches + +- rename openapi-to-cadl to openapi-to-typespec ## 1.12.0 Thu, 16 Nov 2023 16:00:04 GMT diff --git a/packages/libs/configuration/package.json b/packages/libs/configuration/package.json index 1d7bbc0920..e467e23e80 100644 --- a/packages/libs/configuration/package.json +++ b/packages/libs/configuration/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/configuration", - "version": "1.12.0", + "version": "1.12.1", "description": "Autorest configuration", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/packages/libs/deduplication/CHANGELOG.json b/packages/libs/deduplication/CHANGELOG.json index 3412149c3d..70417efe64 100644 --- a/packages/libs/deduplication/CHANGELOG.json +++ b/packages/libs/deduplication/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@azure-tools/deduplication", "entries": [ + { + "version": "3.2.1", + "tag": "@azure-tools/deduplication_v3.2.1", + "date": "Wed, 28 Feb 2024 18:02:21 GMT", + "comments": { + "patch": [ + { + "comment": "Fix: Crash when deduplication paths" + } + ] + } + }, { "version": "3.2.0", "tag": "@azure-tools/deduplication_v3.2.0", diff --git a/packages/libs/deduplication/CHANGELOG.md b/packages/libs/deduplication/CHANGELOG.md index b90b174c28..f7cc6ee19a 100644 --- a/packages/libs/deduplication/CHANGELOG.md +++ b/packages/libs/deduplication/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @azure-tools/deduplication -This log was last generated on Thu, 16 Nov 2023 16:00:04 GMT and should not be manually modified. +This log was last generated on Wed, 28 Feb 2024 18:02:21 GMT and should not be manually modified. + +## 3.2.1 +Wed, 28 Feb 2024 18:02:21 GMT + +### Patches + +- Fix: Crash when deduplication paths ## 3.2.0 Thu, 16 Nov 2023 16:00:04 GMT diff --git a/packages/libs/deduplication/package.json b/packages/libs/deduplication/package.json index b34f749de0..d0c7296d05 100644 --- a/packages/libs/deduplication/package.json +++ b/packages/libs/deduplication/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/deduplication", - "version": "3.2.0", + "version": "3.2.1", "description": "Deduplication of elements in OpenAPI 3 documents", "main": "./dist/main.js", "typings": "./dist/main.d.ts", diff --git a/packages/testing/test-public-packages/package.json b/packages/testing/test-public-packages/package.json index f1a7efcfe9..0c593bd76f 100644 --- a/packages/testing/test-public-packages/package.json +++ b/packages/testing/test-public-packages/package.json @@ -30,7 +30,7 @@ }, "homepage": "https://github.com/Azure/autorest#readme", "dependencies": { - "@autorest/core": "~3.10.1", + "@autorest/core": "~3.10.2", "autorest": "~3.7.1", "source-map-support": "^0.5.19" }, From 746b972309c8d8c44a084f37969fe5d65104675a Mon Sep 17 00:00:00 2001 From: Chenjie Shi Date: Tue, 12 Mar 2024 11:26:43 +0800 Subject: [PATCH 24/33] Fix typo (#4904) --- .../openapi-to-typespec/fix_typo_2024-03-11-07-26.json | 10 ++++++++++ .../openapi-to-typespec/src/utils/decorators.ts | 2 +- .../test/arm-alertsmanagement/tsp-output/client.tsp | 2 +- .../test/arm-analysisservices/tsp-output/client.tsp | 2 +- .../test/arm-apimanagement/tsp-output/client.tsp | 2 +- .../test/arm-authorization/tsp-output/client.tsp | 2 +- .../arm-azureintegrationspaces/tsp-output/client.tsp | 2 +- .../test/arm-compute/tsp-output/client.tsp | 2 +- .../test/arm-dns/tsp-output/client.tsp | 2 +- .../arm-machinelearningservices/tsp-output/client.tsp | 2 +- .../test/arm-networkanalytics/tsp-output/client.tsp | 2 +- .../test/arm-playwrighttesting/tsp-output/client.tsp | 2 +- .../test/arm-servicenetworking/tsp-output/client.tsp | 2 +- .../test/arm-sphere/tsp-output/client.tsp | 2 +- .../test/arm-storage/tsp-output/client.tsp | 2 +- .../test/arm-test/tsp-output/client.tsp | 2 +- .../test/bodyComplex/tsp-output/client.tsp | 2 +- .../test/keyvault/tsp-output/client.tsp | 2 +- 18 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/fix_typo_2024-03-11-07-26.json diff --git a/common/changes/@autorest/openapi-to-typespec/fix_typo_2024-03-11-07-26.json b/common/changes/@autorest/openapi-to-typespec/fix_typo_2024-03-11-07-26.json new file mode 100644 index 0000000000..96e9fa0915 --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/fix_typo_2024-03-11-07-26.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "fix wrong client lib import name", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/src/utils/decorators.ts b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts index fddf1eedba..599f5676b5 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/decorators.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts @@ -146,7 +146,7 @@ export function getPropertyClientDecorators(element: Property | Parameter): Type if (element.extensions?.["x-ms-client-flatten"]) { decorators.push({ name: "flattenProperty", - module: "@typespec/typespec-client-generator-core", + module: "@azure-tools/typespec-client-generator-core", namespace: "Azure.ClientGenerator.Core", suppressionCode: "deprecated", suppressionMessage: "@flattenProperty decorator is not recommended to use.", diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/client.tsp index b1676704ea..7757d58d15 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Azure.ResourceManager.AlertsManagement; diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/client.tsp index 7abe03b4f4..f9776e7b5c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Azure.ResourceManager.Analysis; diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/client.tsp index a6533b63d3..8077e058be 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Azure.ResourceManager.ApiManagement; diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/client.tsp index 490902b96c..565ca685c9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Azure.ResourceManager.Authorization; diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/client.tsp index 170d41c987..aa738c8fd0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Microsoft.IntegrationSpaces; diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/client.tsp index b7f2736294..5c39dd94a1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Microsoft.Compute; diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/client.tsp index 85d5d93014..b9af34ef37 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Azure.ResourceManager.Dns; diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/client.tsp index 450a6bb90d..63692ccb9b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Azure.ResourceManager.MachineLearning; diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/client.tsp index f99ead8bf2..0082dd568d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Microsoft.NetworkAnalytics; diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/client.tsp index af9817897c..86fff102a9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Microsoft.AzurePlaywrightService; diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/client.tsp index 395e0902b5..973870e6f3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Microsoft.ServiceNetworking; diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/client.tsp index 18617fa816..fe3642005b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Microsoft.AzureSphere; diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/client.tsp index 3c61dda0a8..8798a5fc0a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Microsoft.Storage; diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/client.tsp index b338942136..16e9c423e2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Microsoft.Test; diff --git a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/client.tsp index abb83730ee..43b9f4f069 100644 --- a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using AutoRestComplexTestService; diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/client.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/client.tsp index 88be4a3e37..d79437e7ae 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/client.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/client.tsp @@ -1,5 +1,5 @@ import "./main.tsp"; -import "@typespec/typespec-client-generator-core"; +import "@azure-tools/typespec-client-generator-core"; using Azure.ClientGenerator.Core; using Azure.Keyvault; From cc5a4dc0005b357da3e1b45a6c4f4351355d7383 Mon Sep 17 00:00:00 2001 From: Chenjie Shi Date: Tue, 19 Mar 2024 15:00:46 +0800 Subject: [PATCH 25/33] lock openapi-to-typespec test config (#4919) fix: https://github.com/Azure/autorest/issues/4913 --- .../openapi-to-typespec/fix_ci_2024-03-18-02-21.json | 10 ++++++++++ .../openapi-to-typespec/test/analyzeText/readme.md | 2 +- .../extensions/openapi-to-typespec/test/batch/batch.md | 2 +- .../openapi-to-typespec/test/confidentialLedger/cl.md | 2 +- .../openapi-to-typespec/test/qnaAuthoring/qna.md | 2 +- .../openapi-to-typespec/test/qnaRuntime/qna.md | 2 +- .../openapi-to-typespec/test/schemaRegistry/readme.md | 2 +- 7 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/fix_ci_2024-03-18-02-21.json diff --git a/common/changes/@autorest/openapi-to-typespec/fix_ci_2024-03-18-02-21.json b/common/changes/@autorest/openapi-to-typespec/fix_ci_2024-03-18-02-21.json new file mode 100644 index 0000000000..7fb3a3c8f7 --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/fix_ci_2024-03-18-02-21.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "lock openapi-to-typespec test config", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/analyzeText/readme.md b/packages/extensions/openapi-to-typespec/test/analyzeText/readme.md index 153ecbc88b..cca8a0261a 100644 --- a/packages/extensions/openapi-to-typespec/test/analyzeText/readme.md +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/readme.md @@ -1,6 +1,6 @@ ```yaml input-file: - - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzetext-authoring.json + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/e5404d3e55f885d2cb8fdbff3fd1a03bcfc6bb4c/specification/cognitiveservices/data-plane/Language/stable/2022-05-01/analyzetext-authoring.json title: Microsoft Cognitive Language Service - Analyze Text Authoring clear-output-folder: false guessResourceKey: true diff --git a/packages/extensions/openapi-to-typespec/test/batch/batch.md b/packages/extensions/openapi-to-typespec/test/batch/batch.md index 6c1fb99cdc..dc180e3db9 100644 --- a/packages/extensions/openapi-to-typespec/test/batch/batch.md +++ b/packages/extensions/openapi-to-typespec/test/batch/batch.md @@ -1,6 +1,6 @@ ```yaml input-file: - - https://github.com/wiboris/azure-rest-api-specs/blob/SwaggerRefactor/specification/batch/data-plane/Microsoft.Batch/stable/2022-12-01/BatchService.json + - https://github.com/wiboris/azure-rest-api-specs/blob/c794859f1c334b1816da249001c4e0b3b116ce5e/specification/batch/data-plane/Microsoft.Batch/stable/2022-12-01/BatchService.json title: Azure Batch Service clear-output-folder: false guessResourceKey: true diff --git a/packages/extensions/openapi-to-typespec/test/confidentialLedger/cl.md b/packages/extensions/openapi-to-typespec/test/confidentialLedger/cl.md index 954bc00717..8202f0b9ef 100644 --- a/packages/extensions/openapi-to-typespec/test/confidentialLedger/cl.md +++ b/packages/extensions/openapi-to-typespec/test/confidentialLedger/cl.md @@ -1,6 +1,6 @@ ```yaml require: - - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/confidentialledger/data-plane/readme.md + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/e5404d3e55f885d2cb8fdbff3fd1a03bcfc6bb4c/specification/confidentialledger/data-plane/readme.md title: Microsoft Cognitive Language Service - Analyze Text Authoring clear-output-folder: false guessResourceKey: true diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/qna.md b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/qna.md index 2e1f4a722f..ce70396e6e 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/qna.md +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/qna.md @@ -1,6 +1,6 @@ ```yaml input-file: - - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/dev/cognitiveservices/data-plane/Language/questionanswering-authoring.json + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/e5404d3e55f885d2cb8fdbff3fd1a03bcfc6bb4c/dev/cognitiveservices/data-plane/Language/questionanswering-authoring.json clear-output-folder: false modelerfour: diff --git a/packages/extensions/openapi-to-typespec/test/qnaRuntime/qna.md b/packages/extensions/openapi-to-typespec/test/qnaRuntime/qna.md index 6748d75fa4..67a3637ff5 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaRuntime/qna.md +++ b/packages/extensions/openapi-to-typespec/test/qnaRuntime/qna.md @@ -1,6 +1,6 @@ ```yaml input-file: - - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/e5404d3e55f885d2cb8fdbff3fd1a03bcfc6bb4c/specification/cognitiveservices/data-plane/QnAMaker/stable/v4.0/QnAMakerRuntime.json clear-output-folder: false modelerfour: lenient-model-deduplication: true diff --git a/packages/extensions/openapi-to-typespec/test/schemaRegistry/readme.md b/packages/extensions/openapi-to-typespec/test/schemaRegistry/readme.md index fc7ba653d0..24c4a85622 100644 --- a/packages/extensions/openapi-to-typespec/test/schemaRegistry/readme.md +++ b/packages/extensions/openapi-to-typespec/test/schemaRegistry/readme.md @@ -1,6 +1,6 @@ ```yaml input-file: - - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/schemaregistry/data-plane/Microsoft.EventHub/stable/2021-10/schemaregistry.json + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/a31ffeca96db3901c77b7dabbb8f224f226e78b9/specification/schemaregistry/data-plane/Microsoft.EventHub/stable/2021-10/schemaregistry.json clear-output-folder: false isAzureSpec: true ``` From 63ffe68961e24ed8aa59a2ca4c16a8019c271e45 Mon Sep 17 00:00:00 2001 From: Rodge Fu Date: Tue, 19 Mar 2024 21:20:34 +0800 Subject: [PATCH 26/33] Inlcude csharp rename decorator when openai-to-typespec generating tsp (#4907) Fixes https://github.com/Azure/autorest.csharp/issues/4236. Generate csharp renaming decorator when openai-to-typespec generating tsp. (include rename of resource, resource.property, model, model.property, enum, enum.member and operation name) related autorest.csharp change can be found at https://github.com/Azure/autorest.csharp/pull/4380 --- .gitignore | 1 + ...pespec-csharp-rename_2024-03-12-05-16.json | 10 ++ .../openapi-to-typespec/convert.ps1 | 16 +-- .../src/emiters/emit-client.ts | 16 ++- .../src/emiters/emit-main.ts | 4 +- .../src/generate/generate-client.ts | 47 +++++- .../openapi-to-typespec/src/interfaces.ts | 6 + .../openapi-to-typespec/src/main.ts | 2 + .../src/pretransforms/rename-pretransform.ts | 136 ++++++++++++++++++ .../src/transforms/transform-arm-resources.ts | 37 ++++- .../src/transforms/transform-choices.ts | 4 +- .../src/transforms/transform-object.ts | 8 +- .../src/transforms/transform-operations.ts | 3 +- .../src/utils/decorators.ts | 45 ++++++ .../openapi-to-typespec/src/utils/imports.ts | 34 ++++- .../src/utils/resource-discovery.ts | 23 +-- 16 files changed, 357 insertions(+), 35 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/openai-to-typespec-csharp-rename_2024-03-12-05-16.json create mode 100644 packages/extensions/openapi-to-typespec/src/pretransforms/rename-pretransform.ts diff --git a/.gitignore b/.gitignore index fab321db21..7a37536a56 100644 --- a/.gitignore +++ b/.gitignore @@ -296,3 +296,4 @@ regression-tests/output # TS incremental build cache *.tsbuildinfo +*.njsproj diff --git a/common/changes/@autorest/openapi-to-typespec/openai-to-typespec-csharp-rename_2024-03-12-05-16.json b/common/changes/@autorest/openapi-to-typespec/openai-to-typespec-csharp-rename_2024-03-12-05-16.json new file mode 100644 index 0000000000..984d48d13d --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/openai-to-typespec-csharp-rename_2024-03-12-05-16.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "support generating csharp rename decorator when converting to tsp", + "type": "minor" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/convert.ps1 b/packages/extensions/openapi-to-typespec/convert.ps1 index 528dbf7587..8e32fbccf3 100644 --- a/packages/extensions/openapi-to-typespec/convert.ps1 +++ b/packages/extensions/openapi-to-typespec/convert.ps1 @@ -10,20 +10,18 @@ #> param( - [Parameter(Mandatory)] - [string] - # Specifies the swagger config file, not the swagger json, but the readme config. + [Parameter(Mandatory = $true, HelpMessage = "Specifies the swagger config file (not the swagger json, but the readme config) or autorest.md file in the azure-sdk-for-net repo if .net related configuration is expected to be included.")] + [string] $swaggerConfigFile, + [Parameter(Mandatory = $false, HelpMessage = "Specified the output folder, deafult to current folder.")] [string] - # Specified the output folder, deafult to current folder. $outputFolder, + [Parameter(Mandatory = $false, HelpMessage = "Specified the csharp codegen, default to https://aka.ms/azsdk/openapi-to-typespec-csharp.")] [string] - # Specified the csharp codegen, default to https://aka.ms/azsdk/openapi-to-typespec-csharp. $csharpCodegen = "https://aka.ms/azsdk/openapi-to-typespec-csharp", + [Parameter(Mandatory = $false, HelpMessage = "Specified the converter codegen, default to https://aka.ms/azsdk/openapi-to-typespec.")] [string] - # Specified the converter codegen, default to https://aka.ms/azsdk/openapi-to-typespec. - $converterCodegen = "." -) + $converterCodegen = ".") function GenerateMetadata () { @@ -42,7 +40,7 @@ function GenerateMetadata () function DoConvert () { Write-Host "##Converting from swagger to tsp with in $outputFolder with $converterCodegen" - $cmd = "autorest --version=3.10.1 --openapi-to-typespec --isAzureSpec --isArm --use=`"$converterCodegen`" --output-folder=$outputFolder $swaggerConfigFile" + $cmd = "autorest --version=3.10.1 --openapi-to-typespec --csharp=false --isAzureSpec --isArm --use=`"$converterCodegen`" --output-folder=$outputFolder $swaggerConfigFile" Write-Host "$cmd" Invoke-Expression $cmd if ($LASTEXITCODE) { exit $LASTEXITCODE } diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-client.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-client.ts index 78b17bce01..36ab539981 100644 --- a/packages/extensions/openapi-to-typespec/src/emiters/emit-client.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-client.ts @@ -1,5 +1,9 @@ import { getSession } from "../autorest-session"; -import { generateArmResourceClientDecorator, generateObjectClientDecorator } from "../generate/generate-client"; +import { + generateArmResourceClientDecorator, + generateEnumClientDecorator, + generateObjectClientDecorator, +} from "../generate/generate-client"; import { TypespecProgram } from "../interfaces"; import { getOptions } from "../options"; import { formatTypespecFile } from "../utils/format"; @@ -34,8 +38,14 @@ function generateClient(program: TypespecProgram) { .filter((r) => r !== "") .join("\n\n") : ""; - if (objects === "" && armResources === "") { + + const enums = models.enums + .map(generateEnumClientDecorator) + .filter((r) => r !== "") + .join("\n\n"); + + if (objects === "" && armResources === "" && enums === "") { return ""; } - return [imports, "\n", namespaces, "\n", objects, "\n", armResources].join("\n"); + return [imports, "\n", namespaces, "\n", objects, "\n", armResources, "\n", enums].join("\n"); } diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-main.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-main.ts index 5706d088e1..8b858c2b08 100644 --- a/packages/extensions/openapi-to-typespec/src/emiters/emit-main.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-main.ts @@ -51,8 +51,8 @@ function getArmResourceImports(program: TypespecProgram): string[] { const resourceMetadata = getArmResourcesMetadata(); const imports: string[] = []; - for (const resource in resourceMetadata) { - imports.push(`import "./${resourceMetadata[resource].SwaggerModelName}.tsp";`); + for (const resource in resourceMetadata.Resources) { + imports.push(`import "./${resourceMetadata.Resources[resource].SwaggerModelName}.tsp";`); } if (program.operationGroups.length > 0) { diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-client.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-client.ts index c340012081..afba783d6c 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-client.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-client.ts @@ -1,10 +1,12 @@ import pluralize from "pluralize"; -import { TspArmResource, TypespecObject } from "../interfaces"; +import { TspArmResource, TypespecObject, TypespecEnum, TypespecOperation } from "../interfaces"; import { generateAugmentedDecorators } from "../utils/decorators"; export function generateObjectClientDecorator(typespecObject: TypespecObject) { const definitions: string[] = []; + definitions.push(generateAugmentedDecorators(typespecObject.name, typespecObject.clientDecorators)); + for (const property of typespecObject.properties) { const decorators = generateAugmentedDecorators( `${typespecObject.name}.${property.name}`, @@ -16,11 +18,50 @@ export function generateObjectClientDecorator(typespecObject: TypespecObject) { return definitions.join("\n"); } +export function generateEnumClientDecorator(typespecEnum: TypespecEnum) { + const definitions: string[] = []; + + definitions.push(generateAugmentedDecorators(typespecEnum.name, typespecEnum.clientDecorators)); + + for (const choice of typespecEnum.members) { + const decorators = generateAugmentedDecorators(`${typespecEnum.name}.${choice.name}`, choice.clientDecorators); + decorators && definitions.push(decorators); + } + + return definitions.join("\n"); +} + +export function generateOperationClientDecorator(operation: TypespecOperation) { + const definitions: string[] = []; + + definitions.push(generateAugmentedDecorators(operation.name, operation.clientDecorators)); + + return definitions.join("\n"); +} + export function generateArmResourceClientDecorator(resource: TspArmResource): string { + const definitions: string[] = []; + const formalOperationGroupName = pluralize(resource.name); + let targetName = formalOperationGroupName; if (resource.name === formalOperationGroupName) { - return `@@clientName(${formalOperationGroupName}OperationGroup, "${formalOperationGroupName}")`; + targetName = `${formalOperationGroupName}OperationGroup}`; + definitions.push(`@@clientName(${formalOperationGroupName}OperationGroup, "${formalOperationGroupName}")`); } - return ""; + + if (resource.clientDecorators && resource.clientDecorators.length > 0) + definitions.push(generateAugmentedDecorators(resource.name, resource.clientDecorators)); + + for (const op of resource.resourceOperations) { + if (op.clientDecorators && op.clientDecorators.length > 0) + definitions.push(generateAugmentedDecorators(`${targetName}.${op.name}`, op.clientDecorators)); + } + + for (const property of resource.properties) { + const decorators = generateAugmentedDecorators(`${targetName}.${property.name}`, property.clientDecorators); + decorators && definitions.push(decorators); + } + + return definitions.join("\n"); } diff --git a/packages/extensions/openapi-to-typespec/src/interfaces.ts b/packages/extensions/openapi-to-typespec/src/interfaces.ts index cf3e2b9aad..c4d5e91b34 100644 --- a/packages/extensions/openapi-to-typespec/src/interfaces.ts +++ b/packages/extensions/openapi-to-typespec/src/interfaces.ts @@ -15,6 +15,7 @@ export interface TypespecOptions { export interface TypespecChoiceValue extends WithDoc { name: string; value: string | number | boolean; + clientDecorators?: TypespecDecorator[]; } export interface WithDoc { @@ -42,6 +43,7 @@ export interface TypespecOperation extends WithDoc, WithSummary, WithFixMe { operationGroupName?: string; operationId?: string; examples?: Record>; + clientDecorators?: TypespecDecorator[]; } export type ResourceKind = @@ -120,6 +122,7 @@ export interface TypespecEnum extends TypespecDataType { members: TypespecChoiceValue[]; isExtensible: boolean; decorators?: TypespecDecorator[]; + clientDecorators?: TypespecDecorator[]; } export interface WithFixMe { @@ -137,6 +140,7 @@ export interface TypespecParameter extends TypespecDataType { isOptional: boolean; type: string; decorators?: TypespecDecorator[]; + clientDecorators?: TypespecDecorator[]; location: TypespecParameterLocation; serializedName: string; defaultValue?: any; @@ -171,6 +175,7 @@ export interface TypespecObject extends TypespecDataType { extendedParents?: string[]; spreadParents?: string[]; decorators?: TypespecDecorator[]; + clientDecorators?: TypespecDecorator[]; alias?: TypespecAlias; } @@ -201,6 +206,7 @@ export interface TspArmResourceOperationBase extends WithDoc, WithFixMe { name: string; templateParameters?: string[]; decorators?: TypespecDecorator[]; + clientDecorators?: TypespecDecorator[]; operationId?: string; examples?: Record>; customizations?: string[]; diff --git a/packages/extensions/openapi-to-typespec/src/main.ts b/packages/extensions/openapi-to-typespec/src/main.ts index a46bd6274f..8b32c5706c 100644 --- a/packages/extensions/openapi-to-typespec/src/main.ts +++ b/packages/extensions/openapi-to-typespec/src/main.ts @@ -17,6 +17,7 @@ import { emitTypespecConfig } from "./emiters/emit-typespec-config"; import { getModel } from "./model"; import { pretransformArmResources } from "./pretransforms/arm-pretransform"; import { pretransformNames } from "./pretransforms/name-pretransform"; +import { pretransformRename } from "./pretransforms/rename-pretransform"; import { markErrorModels } from "./utils/errors"; import { markPagination } from "./utils/paging"; import { markResources } from "./utils/resources"; @@ -27,6 +28,7 @@ export async function processConverter(host: AutorestExtensionHost) { const codeModel = session.model; pretransformNames(codeModel); pretransformArmResources(codeModel); + pretransformRename(codeModel); markPagination(codeModel); markErrorModels(codeModel); markResources(codeModel); diff --git a/packages/extensions/openapi-to-typespec/src/pretransforms/rename-pretransform.ts b/packages/extensions/openapi-to-typespec/src/pretransforms/rename-pretransform.ts new file mode 100644 index 0000000000..2cb9bb01c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/pretransforms/rename-pretransform.ts @@ -0,0 +1,136 @@ +import { + ChoiceSchema, + CodeModel, + ObjectSchema, + SealedChoiceSchema, + Schema, + ChoiceValue, + Property, + Parameter, + SchemaType, + Operation, +} from "@autorest/codemodel"; +import { TypespecDecorator } from "../interfaces"; +import { getOptions } from "../options"; +import { getLogger } from "../utils/logger"; +import { Metadata, getArmResourcesMetadata } from "../utils/resource-discovery"; + +type RenamableSchema = Schema | Property | Parameter | ChoiceValue | Operation; + +const logger = () => getLogger("rename-pretransform"); + +export function pretransformRename(codeModel: CodeModel): void { + const { isArm } = getOptions(); + if (!isArm) { + return; + } + + const metadata = getArmResourcesMetadata(); + + applyRenameMapping(metadata, codeModel); + applyOverrideOperationName(metadata, codeModel); +} + +export function createCSharpNameDecorator(schema: RenamableSchema): TypespecDecorator { + return { + name: "clientName", + module: "@azure-tools/typespec-client-generator-core", + namespace: "Azure.ClientGenerator.Core", + arguments: [schema.language.csharp!.name, "csharp"], + }; +} + +function parseNewCSharpNameAndSetToSchema(schema: RenamableSchema, renameValue: string) { + const newName = parseNewName(renameValue); + setSchemaCSharpName(schema, newName); +} + +function setSchemaCSharpName(schema: RenamableSchema, newName: string) { + if (!schema.language.csharp) + schema.language.csharp = { name: newName, description: schema.language.default.description }; + else schema.language.csharp.name = newName; +} + +function parseNewName(value: string) { + // TODO: format not supported + return value.split("|")[0].trim(); +} + +function applyOverrideOperationName(metadata: Metadata, codeModel: CodeModel) { + for (const opId in metadata.OverrideOperationName) { + const found = codeModel.operationGroups.flatMap((og) => og.operations).find((op) => op.operationId === opId); + if (found) parseNewCSharpNameAndSetToSchema(found, metadata.OverrideOperationName[opId]); + else + logger().warning( + `Can't find operation to rename for OverrideOperationName rule: ${opId}->${metadata.OverrideOperationName[opId]}`, + ); + } +} + +function applyRenameMapping(metadata: Metadata, codeModel: CodeModel) { + for (const key in metadata.RenameMapping) { + const subKeys = key + .split(".") + .map((s) => s.trim()) + .filter((s) => s.length > 0); + if (subKeys.length === 0) continue; + const lowerFirstSubKey = subKeys[0].toLowerCase(); + const value = metadata.RenameMapping[key]; + + const found: Schema | undefined = [ + ...(codeModel.schemas.choices ?? []), + ...(codeModel.schemas.sealedChoices ?? []), + ...(codeModel.schemas.objects ?? []), + ].find((o: Schema) => o.language.default.name.toLowerCase() === lowerFirstSubKey); + + if (!found) { + logger().warning(`Can't find object or enum for RenameMapping rule: ${key} -> ${value}`); + continue; + } + + if (found.type === SchemaType.Choice || found.type == SchemaType.SealedChoice) { + transformEnum(subKeys, value, found as ChoiceSchema | SealedChoiceSchema); + } else if (found.type === SchemaType.Object) { + transformObject(subKeys, value, found as ObjectSchema); + } else { + logger().error(`Unexpected schema type '${found.type}' found with key ${key}`); + } + } +} + +function transformEnum(keys: string[], value: string, target: ChoiceSchema | SealedChoiceSchema) { + if (keys.length === 1) parseNewCSharpNameAndSetToSchema(target, value); + else if (keys.length === 2) { + const lowerMemberValue = keys[1].toLowerCase(); + const found = target.choices.find((c) => c.language.default.name.toLowerCase() === lowerMemberValue); + if (found) parseNewCSharpNameAndSetToSchema(found, value); + else logger().warning(`Can't find enum member for RenameMapping rule: ${keys.join(".")} -> ${value}`); + } else { + logger().error(`Unexpected keys for enum RenameMapping: ${keys.join(".")}`); + } +} + +function transformObject(keys: string[], value: string, target: ObjectSchema) { + if (keys.length === 1) parseNewCSharpNameAndSetToSchema(target, value); + else if (keys.length === 2) { + const lowerPropertyName = keys[1].toLowerCase(); + const found = target.properties?.find((p) => p.language.default.name.toLowerCase() === lowerPropertyName); + if (found) parseNewCSharpNameAndSetToSchema(found, value); + else logger().warning(`Can't find object property for RenameMapping rule: ${keys.join(".")} -> ${value}`); + } else if (keys.length > 2) { + // handle flatten scenario + const lowerPropName = keys.pop()?.toLowerCase(); + let cur = target; + for (let i = 1; i < keys.length && cur; i++) { + const foundProp = cur.properties?.find((p) => p.language.default.name.toLowerCase() === keys[i].toLowerCase()); + cur = foundProp?.schema as ObjectSchema; + } + const foundProp = cur?.properties?.find((p) => p.language.default.name.toLowerCase() === lowerPropName); + if (foundProp) parseNewCSharpNameAndSetToSchema(foundProp, value); + else { + logger().warning(`Can't find object property for RenameMapping rule: ${keys.join(".")} -> ${value}`); + } + } else { + logger().error(`Unexpected keys for object property RenameMapping: ${keys.join(".")}`); + } +} diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts index f27c1f72e9..5d5a23ce2e 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts @@ -14,6 +14,8 @@ import { isFirstLevelResource, } from "../interfaces"; import { getOptions, updateOptions } from "../options"; +import { createCSharpNameDecorator } from "../pretransforms/rename-pretransform"; +import { getOperationClientDecorators } from "../utils/decorators"; import { ArmResource, ArmResourceSchema, @@ -105,6 +107,11 @@ export function transformTspArmResource(schema: ArmResourceSchema): TspArmResour decorators.push({ name: "extensionResource" }); } + const armResourceOperations = operations[0]; + const otherOperations = operations[1]; + + const clientDecorators = buildResourceClientDecorators(schema, armResourceOperations, otherOperations); + return { fixMe, resourceKind: getResourceKind(schema), @@ -119,8 +126,9 @@ export function transformTspArmResource(schema: ArmResourceSchema): TspArmResour propertiesPropertyDescription, doc: schema.language.default.description, decorators, - resourceOperations: operations[0], - normalOperations: operations[1], + clientDecorators, + resourceOperations: armResourceOperations, + normalOperations: otherOperations, optionalStandardProperties: getArmCommonTypeVersion() ? getResourceOptionalStandardProperties(schema) : [], baseModelName, locationParent: getLocationParent(schema), @@ -190,6 +198,7 @@ function convertResourceReadOperation( kind: "ArmResourceRead", name: getOperationName(operation.OperationID), operationId: operation.OperationID, + clientDecorators: getOperationClientDecorators(swaggerOperation), templateParameters: baseParameters ? [resourceMetadata.SwaggerModelName, baseParameters] : [resourceMetadata.SwaggerModelName], @@ -206,6 +215,7 @@ function convertResourceExistsOperation(resourceMetadata: ArmResource): TspArmRe doc: swaggerOperation.language.default.description, kind: "ArmResourceExists", name: swaggerOperation.operationId ? getOperationName(swaggerOperation.operationId) : "exists", + clientDecorators: getOperationClientDecorators(swaggerOperation), operationId: swaggerOperation.operationId, parameters: [ `...ResourceInstanceParameters<${resourceMetadata.SwaggerModelName}, BaseParameters<${resourceMetadata.SwaggerModelName}>>`, @@ -256,6 +266,7 @@ function convertResourceCreateOrReplaceOperation( doc: operation.Description, kind: isLongRunning ? "ArmResourceCreateOrReplaceAsync" : "ArmResourceCreateOrReplaceSync", name: operationName, + clientDecorators: getOperationClientDecorators(swaggerOperation), operationId: operation.OperationID, templateParameters: templateParameters, examples: swaggerOperation.extensions?.["x-ms-examples"], @@ -343,6 +354,7 @@ function convertResourceUpdateOperation( doc: operation.Description, kind: kind as any, name: getOperationName(operation.OperationID), + clientDecorators: getOperationClientDecorators(swaggerOperation), operationId: operation.OperationID, templateParameters, examples: swaggerOperation.extensions?.["x-ms-examples"], @@ -379,6 +391,7 @@ function convertResourceDeleteOperation( : "ArmResourceDeleteWithoutOkAsync" : "ArmResourceDeleteSync", name: getOperationName(operation.OperationID), + clientDecorators: getOperationClientDecorators(swaggerOperation), operationId: operation.OperationID, templateParameters, examples: swaggerOperation.extensions?.["x-ms-examples"], @@ -415,6 +428,7 @@ function convertResourceListOperations( doc: operation.Description, kind: "ArmResourceListByParent", name: getOperationName(operation.OperationID), + clientDecorators: getOperationClientDecorators(swaggerOperation), operationId: operation.OperationID, templateParameters: templateParameters, examples: swaggerOperation.extensions?.["x-ms-examples"], @@ -448,6 +462,7 @@ function convertResourceListOperations( doc: operation.Description, kind: "ArmResourceListAtScope", name: getOperationName(operation.OperationID), + clientDecorators: getOperationClientDecorators(swaggerOperation), operationId: operation.OperationID, templateParameters, examples: swaggerOperation.extensions?.["x-ms-examples"], @@ -457,6 +472,7 @@ function convertResourceListOperations( doc: operation.Description, kind: "ArmListBySubscription", name: getOperationName(operation.OperationID), + clientDecorators: getOperationClientDecorators(swaggerOperation), operationId: operation.OperationID, templateParameters: [resourceMetadata.SwaggerModelName], examples: swaggerOperation.extensions?.["x-ms-examples"], @@ -483,6 +499,7 @@ function convertResourceListOperations( name: swaggerOperation.operationId ? getOperationName(swaggerOperation.operationId) : `listBy${resourceMetadata.Parents[0].replace(/Resource$/, "")}`, + clientDecorators: getOperationClientDecorators(swaggerOperation), operationId: swaggerOperation.operationId, templateParameters: baseParameters ? [resourceMetadata.SwaggerModelName, baseParameters] @@ -549,6 +566,7 @@ function convertResourceActionOperations( doc: operation.Description, kind: kind as any, name: operationName, + clientDecorators: getOperationClientDecorators(swaggerOperation), operationId: operation.OperationID, templateParameters, examples: swaggerOperation.extensions?.["x-ms-examples"], @@ -585,6 +603,7 @@ function convertCheckNameAvailabilityOperations( doc: operation.Description, kind: "checkLocalNameAvailability", name: getOperationName(operation.OperationID), + clientDecorators: getOperationClientDecorators(swaggerOperation), operationId: operation.OperationID, examples: swaggerOperation.extensions?.["x-ms-examples"], templateParameters: [request, response], @@ -594,6 +613,7 @@ function convertCheckNameAvailabilityOperations( doc: operation.Description, kind: "checkGlobalNameAvailability", name: getOperationName(operation.OperationID), + clientDecorators: getOperationClientDecorators(swaggerOperation), operationId: operation.OperationID, examples: swaggerOperation.extensions?.["x-ms-examples"], templateParameters: [request, response], @@ -860,6 +880,19 @@ function buildResourceDecorators(schema: ArmResourceSchema): TypespecDecorator[] return resourceModelDecorators; } +function buildResourceClientDecorators( + schema: ArmResourceSchema, + armResourceOperations: TspArmResourceOperation[], + normalOperations: TypespecOperation[], +): TypespecDecorator[] { + const clientDecorator: TypespecDecorator[] = []; + if (schema.language.csharp?.name) { + clientDecorator.push(createCSharpNameDecorator(schema)); + } + + return clientDecorator; +} + function getSingletonName(schema: ArmResourceSchema): string { const key = schema.resourceMetadata.ResourceKey; const pathLast = schema.resourceMetadata.GetOperations[0].Path.split("/").pop() ?? ""; diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-choices.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-choices.ts index 946f35556c..e94a453900 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-choices.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-choices.ts @@ -1,7 +1,7 @@ import { ChoiceSchema, ChoiceValue, CodeModel, SchemaType, SealedChoiceSchema } from "@autorest/codemodel"; import { getDataTypes } from "../data-types"; import { TypespecChoiceValue, TypespecEnum } from "../interfaces"; -import { getEnumDecorators } from "../utils/decorators"; +import { getEnumChoiceClientDecorators, getEnumClientDecorators, getEnumDecorators } from "../utils/decorators"; import { transformValue } from "../utils/values"; export function transformEnum(schema: SealedChoiceSchema | ChoiceSchema, codeModel: CodeModel): TypespecEnum { @@ -12,6 +12,7 @@ export function transformEnum(schema: SealedChoiceSchema | ChoiceSchema, codeMod if (!typespecEnum) { typespecEnum = { decorators: getEnumDecorators(schema), + clientDecorators: getEnumClientDecorators(schema), doc: schema.language.default.description, kind: "enum", name: schema.language.default.name.replace(/-/g, "_"), @@ -36,6 +37,7 @@ function transformChoiceMember(member: ChoiceValue): TypespecChoiceValue { doc: member.language.default.description, name: member.language.default.name, value: transformValue(member.value), + clientDecorators: getEnumChoiceClientDecorators(member), }; } diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts index 6c0b5b5aef..a02e59a3c7 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts @@ -14,7 +14,12 @@ import { get } from "lodash"; import { getDataTypes } from "../data-types"; import { TypespecObject, TypespecObjectProperty } from "../interfaces"; import { addCorePageAlias } from "../utils/alias"; -import { getModelDecorators, getPropertyClientDecorators, getPropertyDecorators } from "../utils/decorators"; +import { + getModelClientDecorators, + getModelDecorators, + getPropertyClientDecorators, + getPropertyDecorators, +} from "../utils/decorators"; import { getDiscriminator, getOwnDiscriminator } from "../utils/discriminator"; import { getLogger } from "../utils/logger"; import { @@ -89,6 +94,7 @@ export function transformObject(schema: ObjectSchema, codeModel: CodeModel): Typ extendedParents: getExtendedParents(schema), spreadParents: getSpreadParents(schema, codeModel), decorators: getModelDecorators(schema), + clientDecorators: getModelClientDecorators(schema), }; addCorePageAlias(updatedVisited); diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts index 5db4a4057a..6717f1a632 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts @@ -21,7 +21,7 @@ import { } from "../interfaces"; import { transformDataType } from "../model"; import { getOptions } from "../options"; -import { getPropertyDecorators } from "../utils/decorators"; +import { getOperationClientDecorators, getPropertyDecorators } from "../utils/decorators"; import { getLogger } from "../utils/logger"; import { getLanguageMetadata } from "../utils/metadata"; import { isConstantSchema } from "../utils/schemas"; @@ -114,6 +114,7 @@ export function transformRequest(_request: Request, operation: Operation, codeMo doc, summary, parameters, + clientDecorators: getOperationClientDecorators(operation), verb: transformVerb(requests?.[0].protocol), route: transformRoute(requests?.[0].protocol), responses: [...new Set(transformedResponses)], diff --git a/packages/extensions/openapi-to-typespec/src/utils/decorators.ts b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts index 599f5676b5..902b85acf0 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/decorators.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts @@ -1,15 +1,18 @@ import { ChoiceSchema, ObjectSchema, + ChoiceValue, Parameter, Property, Schema, SchemaType, SealedChoiceSchema, SerializationStyle, + Operation, isNumberSchema, } from "@autorest/codemodel"; import { TypespecDecorator, DecoratorArgument } from "../interfaces"; +import { createCSharpNameDecorator } from "../pretransforms/rename-pretransform"; import { getOwnDiscriminator } from "./discriminator"; import { isSealedChoiceSchema, isStringSchema } from "./schemas"; @@ -55,6 +58,15 @@ export function getModelDecorators(model: ObjectSchema): TypespecDecorator[] { return decorators; } +export function getModelClientDecorators(model: ObjectSchema): TypespecDecorator[] { + const decorators: TypespecDecorator[] = []; + + if (model.language.csharp?.name) { + decorators.push(createCSharpNameDecorator(model)); + } + return decorators; +} + export function getPropertyDecorators(element: Property | Parameter): TypespecDecorator[] { const decorators: TypespecDecorator[] = []; @@ -153,6 +165,10 @@ export function getPropertyClientDecorators(element: Property | Parameter): Type }); } + if (element.language.csharp?.name) { + decorators.push(createCSharpNameDecorator(element)); + } + return decorators; } @@ -240,6 +256,35 @@ export function getEnumDecorators(enumeration: SealedChoiceSchema | ChoiceSchema return decorators; } + +export function getEnumClientDecorators(enumeration: SealedChoiceSchema | ChoiceSchema): TypespecDecorator[] { + const decorators: TypespecDecorator[] = []; + + if (enumeration.language.csharp?.name) { + decorators.push(createCSharpNameDecorator(enumeration)); + } + + return decorators; +} + +export function getEnumChoiceClientDecorators(enumChoice: ChoiceValue): TypespecDecorator[] { + const decorators: TypespecDecorator[] = []; + + if (enumChoice.language.csharp?.name) { + decorators.push(createCSharpNameDecorator(enumChoice)); + } + return decorators; +} + +export function getOperationClientDecorators(operation: Operation): TypespecDecorator[] { + const decorators: TypespecDecorator[] = []; + + if (operation.language.csharp?.name) { + decorators.push(createCSharpNameDecorator(operation)); + } + return decorators; +} + export function generateDecorators(decorators: TypespecDecorator[] = []): string { const definitions: string[] = []; for (const decorator of decorators ?? []) { diff --git a/packages/extensions/openapi-to-typespec/src/utils/imports.ts b/packages/extensions/openapi-to-typespec/src/utils/imports.ts index bff41f371e..151490165b 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/imports.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/imports.ts @@ -1,4 +1,4 @@ -import { TypespecProgram } from "../interfaces"; +import { TypespecDecorator, TypespecProgram } from "../interfaces"; import { getOptions } from "../options"; type Imports = { @@ -46,12 +46,36 @@ export function getModelsImports(program: TypespecProgram) { export function getClientImports(program: TypespecProgram) { const modules = new Set(); const namespaces = new Set(); + const addImports = (decs: TypespecDecorator[] | undefined) => { + for (const dec of decs ?? []) { + dec.module && modules.add(`import "${dec.module}";`); + dec.namespace && namespaces.add(`using ${dec.namespace};`); + } + }; for (const model of program.models.objects) { + addImports(model.clientDecorators); for (const property of model.properties) { - for (const decorator of property.clientDecorators ?? []) { - decorator.module && modules.add(`import "${decorator.module}";`); - decorator.namespace && namespaces.add(`using ${decorator.namespace};`); - } + addImports(property.clientDecorators); + } + } + + for (const model of program.models.enums) { + addImports(model.clientDecorators); + for (const choice of model.members) { + addImports(choice.clientDecorators); + } + } + + for (const resource of program.models.armResources) { + addImports(resource.clientDecorators); + for (const property of resource.properties) { + addImports(property.clientDecorators); + } + for (const op of resource.resourceOperations) { + addImports(op.clientDecorators); + } + for (const op of resource.normalOperations) { + addImports(op.clientDecorators); } } diff --git a/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts b/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts index 1340bfe292..4295a63723 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts @@ -21,6 +21,12 @@ export interface _ArmPagingMetadata { NextLinkName: string; } +export interface Metadata { + Resources: Record; + RenameMapping: Record; + OverrideOperationName: Record; +} + export interface ArmResource { Name: string; GetOperations: _ArmResourceOperation[]; @@ -46,7 +52,7 @@ export interface ArmResource { IsSingletonResource: boolean; } -let armResourceCache: Record | undefined; +let metadataCache: Metadata | undefined; export interface OperationWithResourceOperationFlag extends Operation { isResourceOperation?: boolean; @@ -118,19 +124,19 @@ export function getResourceExistOperation(resource: ArmResource): Operation | un } } -export function getArmResourcesMetadata(): Record { - if (armResourceCache) { - return armResourceCache; +export function getArmResourcesMetadata(): Metadata { + if (metadataCache) { + return metadataCache; } const session = getSession(); const outputFolder: string = session.configuration["output-folder"] ?? ""; try { const content = readFileSync(join(outputFolder, "resources.json"), "utf-8"); - const { Resources }: { Resources: Record } = JSON.parse(content); - armResourceCache = Resources; + const metadata: Metadata = JSON.parse(content); + metadataCache = metadata; - return armResourceCache; + return metadataCache; } catch (e) { throw new Error(`Failed to load resources.json from ${outputFolder} \n ${e}`); } @@ -141,7 +147,8 @@ export interface ArmResourceSchema extends ObjectSchema { } export function tagSchemaAsResource(schema: ObjectSchema): void { - const resourcesMetadata = getArmResourcesMetadata(); + const metadata = getArmResourcesMetadata(); + const resourcesMetadata = metadata.Resources; for (const resourceName in resourcesMetadata) { if (resourcesMetadata[resourceName].SwaggerModelName.toLowerCase() === schema.language.default.name.toLowerCase()) { From 977049cf32be72fdb0f84c4450ad73ef87a9b5dd Mon Sep 17 00:00:00 2001 From: Patrick Hallisey Date: Tue, 26 Mar 2024 11:46:55 -0700 Subject: [PATCH 27/33] Use 1es pipeline templates (#4920) Co-authored-by: Scott Beddall (from Dev Box) Co-authored-by: Timothee Guerin --- eng/pipelines/ci.yaml | 144 ++++++++++-------- eng/pipelines/publish-dev.yaml | 42 ++--- eng/pipelines/publish.yaml | 124 ++++++++------- eng/pipelines/templates/1es-redirect.yml | 55 +++++++ .../templates/build-and-push-docker.yaml | 8 +- eng/pipelines/templates/variables/image.yml | 24 +++ 6 files changed, 251 insertions(+), 146 deletions(-) create mode 100644 eng/pipelines/templates/1es-redirect.yml create mode 100644 eng/pipelines/templates/variables/image.yml diff --git a/eng/pipelines/ci.yaml b/eng/pipelines/ci.yaml index fa8ddd39fb..1e9c7e0028 100644 --- a/eng/pipelines/ci.yaml +++ b/eng/pipelines/ci.yaml @@ -6,80 +6,94 @@ trigger: - main -pool: - vmImage: "ubuntu-latest" +extends: + template: /eng/pipelines/templates/1es-redirect.yml + parameters: + stages: + - stage: main + displayName: Main + pool: + name: $(LINUXPOOL) + image: $(LINUXVMIMAGE) + os: linux + jobs: + - job: main + displayName: "Build and Unit test" + steps: + - template: /eng/pipelines/templates/build.yaml -stages: - - stage: main - displayName: Main - jobs: - - job: main - displayName: "Build and Unit test" - steps: - - template: ./templates/build.yaml + - script: npx @microsoft/rush test:ci -v + displayName: Test - - script: npx @microsoft/rush test:ci -v - displayName: Test + - task: PublishCodeCoverageResults@1 + inputs: + codeCoverageTool: Cobertura + summaryFileLocation: $(Build.SourcesDirectory)/packages/**/coverage/cobertura-coverage.xml + reportDirectory: $(Build.SourcesDirectory)/packages/**/coverage - - task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: Cobertura - summaryFileLocation: $(Build.SourcesDirectory)/packages/**/coverage/cobertura-coverage.xml - reportDirectory: $(Build.SourcesDirectory)/packages/**/coverage + - script: npx @microsoft/rush check-format + displayName: Check formatting - - script: npx @microsoft/rush check-format - displayName: Check formatting + - script: npx @microsoft/rush lint -v + displayName: Lint - - script: npx @microsoft/rush lint -v - displayName: Lint + - script: npx @microsoft/rush regen-codemodel + displayName: Regen codemodel schema - - script: npx @microsoft/rush regen-codemodel - displayName: Regen codemodel schema + - script: node ./eng/scripts/check-for-changed-files.js + displayName: Check Git Status For Changed Files - - script: node ./eng/scripts/check-for-changed-files.js - displayName: Check Git Status For Changed Files + - script: | + commitId=$(git rev-parse --short HEAD) + npx @microsoft/rush publish --apply --prerelease-name="ci.$commitId" + displayName: Bump versions - - script: | - commitId=$(git rev-parse --short HEAD) - npx @microsoft/rush publish --apply --prerelease-name="ci.$commitId" - displayName: Bump versions + - script: npx @microsoft/rush publish --publish --pack --include-all + displayName: Pack packages - - script: npx @microsoft/rush publish --publish --pack --include-all - displayName: Pack packages + - task: 1ES.PublishPipelineArtifact@1 + inputs: + targetPath: $(Build.SourcesDirectory)/common/temp/artifacts/packages + artifact: packages + displayName: Publish packages(.tgz) as pipeline artifacts - - publish: $(Build.SourcesDirectory)/common/temp/artifacts/packages - artifact: packages - displayName: Publish packages(.tgz) as pipeline artifacts + - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + - template: /eng/pipelines/templates/create-tryit-comment.yaml + # - job: lintdocs + # displayName: Lint docs + # continueOnError: true + # steps: + # - script: | + # sudo npm install -g markdown-link-check + # find docs -name "*.md" -print0 | xargs -0 -n1 markdown-link-check -c ./markdown-link-check-config.json + # displayName: Find - - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: - - template: ./templates/create-tryit-comment.yaml - # - job: lintdocs - # displayName: Lint docs - # continueOnError: true - # steps: - # - script: | - # sudo npm install -g markdown-link-check - # find docs -name "*.md" -print0 | xargs -0 -n1 markdown-link-check -c ./markdown-link-check-config.json - # displayName: Find + - stage: regressiontests + displayName: Regression Tests + dependsOn: main + pool: + name: $(LINUXPOOL) + image: $(LINUXVMIMAGE) + os: linux + jobs: + - template: /eng/pipelines/templates/regression-tests.yaml + parameters: + name: node18 + nodeVersion: 18.x + - template: /eng/pipelines/templates/regression-tests.yaml + parameters: + name: node20 + nodeVersion: 20.x - - stage: regressiontests - displayName: Regression Tests - dependsOn: main - jobs: - - template: ./templates/regression-tests.yaml - parameters: - name: node18 - nodeVersion: 18.x - - template: ./templates/regression-tests.yaml - parameters: - name: node20 - nodeVersion: 20.x - - - stage: smoketests - displayName: Smoke Tests - dependsOn: main - jobs: - - template: ./templates/smoke-tests.yaml - parameters: - name: node20 - nodeVersion: 20.x + - stage: smoketests + displayName: Smoke Tests + dependsOn: main + pool: + name: $(LINUXPOOL) + image: $(LINUXVMIMAGE) + os: linux + jobs: + - template: /eng/pipelines/templates/smoke-tests.yaml + parameters: + name: node20 + nodeVersion: 20.x diff --git a/eng/pipelines/publish-dev.yaml b/eng/pipelines/publish-dev.yaml index 3e0a8dec54..fdf709337f 100644 --- a/eng/pipelines/publish-dev.yaml +++ b/eng/pipelines/publish-dev.yaml @@ -5,25 +5,29 @@ trigger: none -pool: - vmImage: "ubuntu-latest" +extends: + template: /eng/pipelines/templates/1es-redirect.yml + parameters: + stages: + - stage: npm + pool: + name: $(LINUXPOOL) + image: $(LINUXVMIMAGE) + os: linux + jobs: + - job: dev + displayName: Publish dev + steps: + - template: /eng/pipelines/templates/build.yaml -stages: - - stage: npm - jobs: - - job: dev - displayName: Publish dev - steps: - - template: ./templates/build.yaml + - script: | + commitId=$(git rev-parse --short HEAD) + npx @microsoft/rush publish --apply --prerelease-name="ci.$commitId" + displayName: Bump versions - - script: | - commitId=$(git rev-parse --short HEAD) - npx @microsoft/rush publish --apply --prerelease-name="ci.$commitId" - displayName: Bump versions + - script: npx @microsoft/rush publish --publish --pack --include-all + displayName: Pack packages - - script: npx @microsoft/rush publish --publish --pack --include-all - displayName: Pack packages - - - script: | - npx @microsoft/rush publish --publish --registry https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-tools-feeds/npm/registry --npm-auth-token "$(azure-sdk-devops-npm-token)" --include-all --set-access-level public - displayName: Publish packages + - script: | + npx @microsoft/rush publish --publish --registry https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-tools-feeds/npm/registry --npm-auth-token "$(azure-sdk-devops-npm-token)" --include-all --set-access-level public + displayName: Publish packages diff --git a/eng/pipelines/publish.yaml b/eng/pipelines/publish.yaml index bb8418cd10..fd8c4be832 100644 --- a/eng/pipelines/publish.yaml +++ b/eng/pipelines/publish.yaml @@ -7,66 +7,74 @@ trigger: - main - release/* -pool: - vmImage: "ubuntu-latest" +extends: + template: /eng/pipelines/templates/1es-redirect.yml + parameters: + stages: + - stage: npm + pool: + name: $(LINUXPOOL) + image: $(LINUXVMIMAGE) + os: linux + jobs: + - job: stable + displayName: Publish stable + steps: + - template: /eng/pipelines/templates/build.yaml -stages: - - stage: npm - jobs: - - job: stable - displayName: Publish stable - steps: - - template: ./templates/build.yaml + - script: npx @microsoft/rush publish --publish --pack --include-all + displayName: Pack packages - - script: npx @microsoft/rush publish --publish --pack --include-all - displayName: Pack packages + - script: | + NPM_AUTH_TOKEN="$(azure-sdk-npm-token)" npx @microsoft/rush publish --publish --include-all --set-access-level public + displayName: Publish packages - - script: | - NPM_AUTH_TOKEN="$(azure-sdk-npm-token)" npx @microsoft/rush publish --publish --include-all --set-access-level public - displayName: Publish packages + - job: prerelease + displayName: Publish prerelease + dependsOn: stable # Publish prerelease after to prevent race condition. + steps: + - template: /eng/pipelines/templates/build.yaml - - job: prerelease - displayName: Publish prerelease - dependsOn: stable # Publish prerelease after to prevent race condition. - steps: - - template: ./templates/build.yaml + - script: node ./eng/bump-for-prerelease.js + displayName: Bump version to prerelease targets - - script: node ./eng/bump-for-prerelease.js - displayName: Bump version to prerelease targets - - - script: | - NPM_AUTH_TOKEN="$(azure-sdk-npm-token)" npx @microsoft/rush publish --publish --include-all --set-access-level public --tag next - displayName: Publish packages - - stage: Docker - dependsOn: npm - jobs: - - template: ./templates/build-and-push-docker.yaml - parameters: - name: base - image: azsdkengsys.azurecr.io/azuresdk/autorest - dockerFolder: ./docker/base/ubuntu - readmePath: docker/base/readme.md - - template: ./templates/build-and-push-docker.yaml - parameters: - name: dotnet - image: azsdkengsys.azurecr.io/azuresdk/autorest-dotnet - dockerFolder: ./docker/dotnet/ubuntu - readmePath: docker/dotnet/readme.md - - template: ./templates/build-and-push-docker.yaml - parameters: - name: python - image: azsdkengsys.azurecr.io/azuresdk/autorest-python - dockerFolder: ./docker/python/ubuntu - readmePath: docker/python/readme.md - - template: ./templates/build-and-push-docker.yaml - parameters: - name: java - image: azsdkengsys.azurecr.io/azuresdk/autorest-java - dockerFolder: ./docker/java/ubuntu - readmePath: docker/java/readme.md - - template: ./templates/build-and-push-docker.yaml - parameters: - name: all - image: azsdkengsys.azurecr.io/azuresdk/autorest-all - dockerFolder: ./docker/all/ubuntu - readmePath: docker/all/readme.md + - script: | + NPM_AUTH_TOKEN="$(azure-sdk-npm-token)" npx @microsoft/rush publish --publish --include-all --set-access-level public --tag next + displayName: Publish packages + - stage: Docker + dependsOn: npm + pool: + name: $(LINUXPOOL) + image: $(LINUXVMIMAGE) + os: linux + jobs: + - template: /eng/pipelines/templates/build-and-push-docker.yaml + parameters: + name: base + image: azsdkengsys.azurecr.io/azuresdk/autorest + dockerFolder: ./docker/base/ubuntu + readmePath: docker/base/readme.md + - template: /eng/pipelines/templates/build-and-push-docker.yaml + parameters: + name: dotnet + image: azsdkengsys.azurecr.io/azuresdk/autorest-dotnet + dockerFolder: ./docker/dotnet/ubuntu + readmePath: docker/dotnet/readme.md + - template: /eng/pipelines/templates/build-and-push-docker.yaml + parameters: + name: python + image: azsdkengsys.azurecr.io/azuresdk/autorest-python + dockerFolder: ./docker/python/ubuntu + readmePath: docker/python/readme.md + - template: /eng/pipelines/templates/build-and-push-docker.yaml + parameters: + name: java + image: azsdkengsys.azurecr.io/azuresdk/autorest-java + dockerFolder: ./docker/java/ubuntu + readmePath: docker/java/readme.md + - template: /eng/pipelines/templates/build-and-push-docker.yaml + parameters: + name: all + image: azsdkengsys.azurecr.io/azuresdk/autorest-all + dockerFolder: ./docker/all/ubuntu + readmePath: docker/all/readme.md diff --git a/eng/pipelines/templates/1es-redirect.yml b/eng/pipelines/templates/1es-redirect.yml new file mode 100644 index 0000000000..beb2f1c7c6 --- /dev/null +++ b/eng/pipelines/templates/1es-redirect.yml @@ -0,0 +1,55 @@ +resources: + repositories: + - repository: 1ESPipelineTemplates + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release + +parameters: + - name: stages + type: stageList + default: [] + - name: variables + type: object + default: {} + - name: Use1ESOfficial + type: boolean + default: true + +extends: + ${{ if and(parameters.Use1ESOfficial, eq(variables['System.TeamProject'], 'internal')) }}: + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates + ${{ else }}: + template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates + parameters: + settings: + skipBuildTagsForGitHubPullRequests: true + sdl: + git: + longpaths: true + sourceAnalysisPool: + name: azsdk-pool-mms-win-2022-general + image: azsdk-pool-mms-win-2022-1espt + os: windows + psscriptanalyzer: + compiled: true + break: true + stages: + - ${{ each stage in parameters.stages }}: + - ${{ each pair in stage }}: + ${{ if ne(pair.key, 'variables') }}: + ${{ pair.key }}: ${{ pair.value }} + variables: + - template: /eng/pipelines/templates/variables/image.yml@self + - ${{ each variable in parameters.variables }}: + - ${{ if eq(variable.key, 'template') }}: + - template: ${{ variable.value }} + - ${{ else }}: + - name: ${{ coalesce(variable.key, variable.name) }} + value: ${{ variable.value }} + - ${{ each variable in stage.variables }}: + - ${{ if in(variable.key, 'template', 'group') }}: + - ${{ variable.key }}: ${{ variable.value }} + - ${{ else }}: + - name: ${{ coalesce(variable.key, variable.name) }} + value: ${{ variable.value }} diff --git a/eng/pipelines/templates/build-and-push-docker.yaml b/eng/pipelines/templates/build-and-push-docker.yaml index 1dff0fab3e..3e7934b9ff 100644 --- a/eng/pipelines/templates/build-and-push-docker.yaml +++ b/eng/pipelines/templates/build-and-push-docker.yaml @@ -27,7 +27,7 @@ jobs: docker build -t ${{ parameters.image }} . displayName: Build image workingDirectory: ${{ parameters.dockerFolder }} - - - script: | - docker push ${{ parameters.image }} - displayName: Publish image + templateContext: + outputs: + - output: containerImage + image: ${{ parameters.image }} diff --git a/eng/pipelines/templates/variables/image.yml b/eng/pipelines/templates/variables/image.yml new file mode 100644 index 0000000000..f24cec2a17 --- /dev/null +++ b/eng/pipelines/templates/variables/image.yml @@ -0,0 +1,24 @@ +variables: + - name: LINUXPOOL + value: azsdk-pool-mms-ubuntu-2004-general + - name: WINDOWSPOOL + value: azsdk-pool-mms-win-2022-general + - name: MACPOOL + value: Azure Pipelines + + - name: LINUXVMIMAGE + value: azsdk-pool-mms-ubuntu-2004-1espt + - name: LINUXNEXTVMIMAGE + value: azsdk-pool-mms-ubuntu-2204-1espt + - name: WINDOWSVMIMAGE + value: azsdk-pool-mms-win-2022-1espt + - name: MACVMIMAGE + value: macos-11 + + # Values required for pool.os field in 1es pipeline templates + - name: LINUXOS + value: linux + - name: WINDOWSOS + value: windows + - name: MACOS + value: macOS From a76da0600958fb9335e7b3191df883049d5f18c2 Mon Sep 17 00:00:00 2001 From: Pan Shao <97225342+pshao25@users.noreply.github.com> Date: Wed, 17 Apr 2024 10:24:39 +0800 Subject: [PATCH 28/33] Add command to call tsp compilation for test projects (#4948) This is part of https://github.com/Azure/autorest/issues/4947 We could call `npm run generate swagger {project folder}` to run the compilation. --- .../command4947_2024-04-15-10-14.json | 10 +++ common/config/rush/pnpm-lock.yaml | 79 ++++++++++++------- .../openapi-to-typespec/package.json | 1 + .../test/utils/generate-typespec.ts | 13 ++- 4 files changed, 73 insertions(+), 30 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/command4947_2024-04-15-10-14.json diff --git a/common/changes/@autorest/openapi-to-typespec/command4947_2024-04-15-10-14.json b/common/changes/@autorest/openapi-to-typespec/command4947_2024-04-15-10-14.json new file mode 100644 index 0000000000..1260cc43e1 --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/command4947_2024-04-15-10-14.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Add command to run compilation on test projects", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index be26114149..95ff7c2aee 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -16,13 +16,16 @@ dependencies: version: 3.0.255 '@azure-tools/typespec-autorest': specifier: ^0.39.0 - version: 0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) + version: 0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@azure-tools/typespec-client-generator-core@0.39.1)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) '@azure-tools/typespec-azure-core': specifier: ^0.39.0 version: 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0) '@azure-tools/typespec-azure-resource-manager': specifier: ^0.39.0 version: 0.39.0(@azure-tools/typespec-autorest@0.39.0)(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) + '@azure-tools/typespec-client-generator-core': + specifier: ^0.39.0 + version: 0.39.1(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) '@azure-tools/uri': specifier: ~3.1.1 version: 3.1.1 @@ -393,7 +396,7 @@ packages: engines: {node: '>=10.12.0'} dev: false - /@azure-tools/typespec-autorest@0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0): + /@azure-tools/typespec-autorest@0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@azure-tools/typespec-client-generator-core@0.39.1)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0): resolution: {integrity: sha512-jfCPzqroiVD0jHPPJX2IpdC7U0Q2yx5QYzucCp1GcOYKbRKNO3vcIEVHArn9rSKbJQR7IKDozEeubMMHINjsnQ==} engines: {node: '>=18.0.0'} peerDependencies: @@ -406,6 +409,7 @@ packages: '@typespec/versioning': ~0.53.0 dependencies: '@azure-tools/typespec-azure-core': 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0) + '@azure-tools/typespec-client-generator-core': 0.39.1(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) '@typespec/compiler': 0.53.0 '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) '@typespec/openapi': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) @@ -438,7 +442,7 @@ packages: '@typespec/rest': ~0.53.0 '@typespec/versioning': ~0.53.0 dependencies: - '@azure-tools/typespec-autorest': 0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) + '@azure-tools/typespec-autorest': 0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@azure-tools/typespec-client-generator-core@0.39.1)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) '@azure-tools/typespec-azure-core': 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0) '@typespec/compiler': 0.53.0 '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) @@ -447,6 +451,23 @@ packages: '@typespec/versioning': 0.53.0(@typespec/compiler@0.53.0) dev: false + /@azure-tools/typespec-client-generator-core@0.39.1(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0): + resolution: {integrity: sha512-EV3N6IN1i/hXGqYKNfXx6+2QAyZnG4IpC9RUk6fqwSQDWX7HtMcfdXqlOaK3Rz2H6BUAc9OnH+Trq/uJCl/RgA==} + engines: {node: '>=18.0.0'} + peerDependencies: + '@typespec/compiler': ~0.53.1 + '@typespec/http': ~0.53.0 + '@typespec/rest': ~0.53.0 + '@typespec/versioning': ~0.53.0 + dependencies: + '@typespec/compiler': 0.53.0 + '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) + '@typespec/rest': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) + '@typespec/versioning': 0.53.0(@typespec/compiler@0.53.0) + change-case: 5.3.0 + pluralize: 8.0.0 + dev: false + /@azure-tools/uri@3.1.1: resolution: {integrity: sha512-UgPgD+qVtm4ASYqoTDazjowimrmMGGEQqPnNk9K/8CZdi2oSLtGqX9S1++2+NDaHlq74VyxbcNMKoxgO+2CCUQ==} engines: {node: '>=10.12.0'} @@ -8704,7 +8725,7 @@ packages: dev: false file:projects/autorest.tgz(ts-node@10.9.1): - resolution: {integrity: sha512-IVX851LfnNuOOa9ogcw5VrtP6DCEU6SGwdbWohC8SPyIc+NvkDHMNPn4YEVQFKboieTbliTRogzKi1Lqupu/kA==, tarball: file:projects/autorest.tgz} + resolution: {integrity: sha512-zmT8H4TPYLbIAfpAIuWq2Fl5ElGAw/YDNepBCev66YxQpJQ764g2UyRcfWksA/YxHSIrpCALm0aKJ/t/TbfdNQ==, tarball: file:projects/autorest.tgz} id: file:projects/autorest.tgz name: '@rush-temp/autorest' version: 0.0.0 @@ -8762,7 +8783,7 @@ packages: dev: false file:projects/cadl.tgz(ts-node@10.9.1)(webpack-cli@5.1.4)(webpack@5.89.0): - resolution: {integrity: sha512-GO2iRP6pv3OR2QwYUE+tb7TP6nC+o6bv5ErnrT1vleUz33DH9Kz1Jb9obYFl+4GgtXAaT0fSvCUNgm3pA5ej+A==, tarball: file:projects/cadl.tgz} + resolution: {integrity: sha512-av7i43qPFgwFiE7GHT5KJPa4d0FHlFTbx/y04efEF/83afKlgZ5HVMrFi7N/+lYpm1lHBMPZ0aPn4gK6m23EsQ==, tarball: file:projects/cadl.tgz} id: file:projects/cadl.tgz name: '@rush-temp/cadl' version: 0.0.0 @@ -8808,7 +8829,7 @@ packages: dev: false file:projects/codegen.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-VovTenml5aFvdxVxeubTWgNxH95b97qPKSJfccqCog+K5N1MLKQ8OyLfHBIj1we1u2OWAwsUVfDAJDBRsZvCmQ==, tarball: file:projects/codegen.tgz} + resolution: {integrity: sha512-3C8weoCa1kCOKeoOVrLzpSZo5dzm6rUBu6GpSekpssx7TPkHZP/9D2Zk7gaMX3IdLiJe9UHH8mMtNEUZM07QMQ==, tarball: file:projects/codegen.tgz} id: file:projects/codegen.tgz name: '@rush-temp/codegen' version: 0.0.0 @@ -8848,7 +8869,7 @@ packages: dev: false file:projects/codemodel.tgz(jest@29.7.0)(prettier@3.1.0): - resolution: {integrity: sha512-eciCOrz1bsEKinYsI0hZwEsNX/tZZSbOwiI6BGzznOoVjf7gZ/bE9IhoVnRz6rQ192Qtrkz0IzsoAmCHNZQ1cw==, tarball: file:projects/codemodel.tgz} + resolution: {integrity: sha512-XU/8wU9Jo2eyvIFEVi22uh9YHNGK2X69RZ3fhSsdx9e6Ccp2ajm3QX++m7rV8b1FthMVeIn3FHFGIC7miuT2/Q==, tarball: file:projects/codemodel.tgz} id: file:projects/codemodel.tgz name: '@rush-temp/codemodel' version: 0.0.0 @@ -8880,7 +8901,7 @@ packages: dev: false file:projects/common.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-Dr5MV/1kdgzhxptcFbe1cla9YfQKIIPgZ+KjDwrrSlUGr8B4449Bq++2So07dJMQANDoyXjEPYVWoMAUB3YndA==, tarball: file:projects/common.tgz} + resolution: {integrity: sha512-dr0VbBpkYbGLe+5tnqwXZcU37okgm1NFocwBAyMKuwD8M7QRNEBSw+CWz04fKcO6bFUc4QZHbNQyM9RiDZs8pg==, tarball: file:projects/common.tgz} id: file:projects/common.tgz name: '@rush-temp/common' version: 0.0.0 @@ -8913,7 +8934,7 @@ packages: dev: false file:projects/compare.tgz(prettier@3.1.0): - resolution: {integrity: sha512-+V9SrJtEo0ilGKK7vr0UsFzAxl0GfRPB+MxBS8dl9KkR0/YTOIOgbY2nKDXPxsG5vkaFZ71hgDAwAbdqVOxhWg==, tarball: file:projects/compare.tgz} + resolution: {integrity: sha512-TdSUwopQGGjakA2XILTfCpdkmPjMt0tg/U2uHdTsRPS3cBco9dE42Lzg2fQWuqo8kpP54tIAQ38w2mIg9IYiLw==, tarball: file:projects/compare.tgz} id: file:projects/compare.tgz name: '@rush-temp/compare' version: 0.0.0 @@ -8959,7 +8980,7 @@ packages: dev: false file:projects/configuration.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-refACiofNn9MEmuxOHQ+FlnM1QVGK7jt1n0cTpoK3vUp9A865OmlIPq6GPuSRw6WqGD1vJFX4IS+ng7+fJwGIA==, tarball: file:projects/configuration.tgz} + resolution: {integrity: sha512-QIvRtuY4X8HzqQc5WSZSnxTEMte4WOqY5CcI2VgvRWeuj9X/BpUwCvUJG7qQc7FhQ/KUlTLC4Qqfsy3DzD+/gA==, tarball: file:projects/configuration.tgz} id: file:projects/configuration.tgz name: '@rush-temp/configuration' version: 0.0.0 @@ -9000,7 +9021,7 @@ packages: dev: false file:projects/core.tgz(ts-node@10.9.1): - resolution: {integrity: sha512-eYt9hPHj/gnuPH1z8V/POm8I7Qk5f3sPhKQSrtz0vDmpXFeBmOQjku6UizVNGdIsjYAYmKM6sxOsjRdHRYv5aA==, tarball: file:projects/core.tgz} + resolution: {integrity: sha512-zdm2pbBeVnYjQfB4bYGn+EDY8BISYjyHr1MIPfuq2kjXIdsQIeE0+rX5dBJ22dJWZrbwX8lv77SAsa5wTH5IAg==, tarball: file:projects/core.tgz} id: file:projects/core.tgz name: '@rush-temp/core' version: 0.0.0 @@ -9065,7 +9086,7 @@ packages: dev: false file:projects/datastore.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-rw9TMnec+y4rClT4qX7eiU/MnaDL4sxvFHk5dFVa3n0W2aK8BSvOKfnYezMGXEQ6AcBwC1b3jOIQyGGl/y7LHg==, tarball: file:projects/datastore.tgz} + resolution: {integrity: sha512-6/wu2bBUSvArdPUcvguk4iP5weUXdYt6po8oTByiu4MOKai2WH6T2elniSQVeNa8i0nspiwRrrKZfBA1LRYNfw==, tarball: file:projects/datastore.tgz} id: file:projects/datastore.tgz name: '@rush-temp/datastore' version: 0.0.0 @@ -9106,7 +9127,7 @@ packages: dev: false file:projects/deduplication.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-v0Qz78yfJ+q4XeJE/VJp9JDKvIjRt264L4SrYTs+m85UIFpBl4XoP7sSUOk5yuTSeJlaEbaAQ5WRwJcnT+Q8vw==, tarball: file:projects/deduplication.tgz} + resolution: {integrity: sha512-OeYQ73RhcmGwZbW6Ctnuh+q4vIjgRR2880FOuFYSGSAia3/ROZGlAzQqZrHn2/vsOcYXRWZHXy/84HCRcSsIww==, tarball: file:projects/deduplication.tgz} id: file:projects/deduplication.tgz name: '@rush-temp/deduplication' version: 0.0.0 @@ -9140,7 +9161,7 @@ packages: dev: false file:projects/extension-base.tgz(jest@29.7.0)(prettier@3.1.0): - resolution: {integrity: sha512-MBEh+961tu6edrkkdRYUrNtAngts+uuekG3CzzYbIpmsTup2RzIk57euiWSh8zA0d3375iPVMwuHd6m6ORcaxA==, tarball: file:projects/extension-base.tgz} + resolution: {integrity: sha512-tooRuR6QsOAqpII/MvkKbICjhyRxKFNPhT1y05CG5wlgrqTrwok6sYt0M6bGb73apeC0n7MZbPpWvSR7kQKdrQ==, tarball: file:projects/extension-base.tgz} id: file:projects/extension-base.tgz name: '@rush-temp/extension-base' version: 0.0.0 @@ -9168,7 +9189,7 @@ packages: dev: false file:projects/extension.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-BtX8trhAIukgMnSIDC0Ou3fn3IKV9dNyF4oVHAqvudItaLrJSLRfzg6wxyXabSFFSRrohWNSx3ZdnNRgJsRSWw==, tarball: file:projects/extension.tgz} + resolution: {integrity: sha512-YXVy7zorVQE5y0/DwaZobVpgJKsMg8FN2/17G/IXxFH8qzEmEoC6gJPE26mf10HTI0noSGV3NCWCSyzsReEb7w==, tarball: file:projects/extension.tgz} id: file:projects/extension.tgz name: '@rush-temp/extension' version: 0.0.0 @@ -9213,7 +9234,7 @@ packages: dev: false file:projects/fixer.tgz(ts-node@10.9.1): - resolution: {integrity: sha512-hgI1LGdKk3LtK5qtwPy1GcbgVQyo6jHY/+eKB7lgrg0YQHQtbOOx66NJcV9CYLuYl5eWEwHcI94wnGOy7ehkGA==, tarball: file:projects/fixer.tgz} + resolution: {integrity: sha512-ZyqP7Gub1FyIjYmv7IBtE8jOfK/dp5fTUcRo5WjMCldnLJlqLvZrteccdnVqeKd+TRi3PDnanrW1k6z+CekfQw==, tarball: file:projects/fixer.tgz} id: file:projects/fixer.tgz name: '@rush-temp/fixer' version: 0.0.0 @@ -9257,7 +9278,7 @@ packages: dev: false file:projects/json.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-8ePBJH0KNMHYtw84tnP/BDhe2srShAUkXkcow/UjMU5FbaGBouPvLYlYzqA2ZDDYIlsKDEEKxQu594xORCCFYw==, tarball: file:projects/json.tgz} + resolution: {integrity: sha512-TWVpPxmRslYdAtw0qUukBOH0VgsqWuIxh7p1KWAysUa5kQ1OhGT8XqG5+ADb70+RgXFbHGYYN9iqjOAapp4QMw==, tarball: file:projects/json.tgz} id: file:projects/json.tgz name: '@rush-temp/json' version: 0.0.0 @@ -9286,7 +9307,7 @@ packages: dev: false file:projects/jsonschema.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-TlSf9AgX2HVChk9Rc4GyUIPrZrOyrE91SPpFJlYKkK4FASq6oAEstJvpL/+GRBL8KRP2aY2JWQ8AyYEDbEDG0Q==, tarball: file:projects/jsonschema.tgz} + resolution: {integrity: sha512-w+3HeMxVDFR0oXDmQegTFnxPoC15xfB20qKeGDyhs10ODDeBw3P5+sdokfFu/n/jzUWtyB71vrwaUOzxhr/fbA==, tarball: file:projects/jsonschema.tgz} id: file:projects/jsonschema.tgz name: '@rush-temp/jsonschema' version: 0.0.0 @@ -9315,7 +9336,7 @@ packages: dev: false file:projects/modelerfour.tgz(ts-node@10.9.1): - resolution: {integrity: sha512-yqvv8uLcXaCtMnHap9s3Ks9ozN6NLDmS8EzHhCP5XgKAQCnQoBuX2J64Kkt5WRdtuvIEJqDtx8kX/qKapZeQWg==, tarball: file:projects/modelerfour.tgz} + resolution: {integrity: sha512-6jJDUoekbhc7cEhjyadfzwunHkiOCehYPZh/QEEuOzzTJSixWUIle6ejSyptngSe8uxSsVpDJ/4QSTj6UvFoPw==, tarball: file:projects/modelerfour.tgz} id: file:projects/modelerfour.tgz name: '@rush-temp/modelerfour' version: 0.0.0 @@ -9366,7 +9387,7 @@ packages: dev: false file:projects/oai2-to-oai3.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-429l1k8VRbB/Qk1N0kCG+c70ZG5B2ixgF3RQCrm1dF6T0946z327MpAITNIfL0qtD5vC0jW3hzBasXPaMXc7Mw==, tarball: file:projects/oai2-to-oai3.tgz} + resolution: {integrity: sha512-EmqXeZJWuoXi6p1c9Flme9Km7H1ISlOOEX1rMEhn/G14Fxe2BJujI8iheV/3eN7CyqwhdBr3Zko2CY77132LDQ==, tarball: file:projects/oai2-to-oai3.tgz} id: file:projects/oai2-to-oai3.tgz name: '@rush-temp/oai2-to-oai3' version: 0.0.0 @@ -9403,14 +9424,15 @@ packages: dev: false file:projects/openapi-to-typespec.tgz(jest@29.7.0): - resolution: {integrity: sha512-iVH6kegt5UtBjQgeWeabDI/24my7TkNLpazOi2HQumK3e4H0EVV5vygE1RPNoq/oFuYqlgV6/n6OmUQRyaM5aQ==, tarball: file:projects/openapi-to-typespec.tgz} + resolution: {integrity: sha512-Kyx+8ZG2xUGZAHqW8HRY0eqqm1ChOuTY+KZwhJJfDmoCJf5BWyjyaCCYwpY65+KrWJ5mmWo7IDvbBOOKutA2ww==, tarball: file:projects/openapi-to-typespec.tgz} id: file:projects/openapi-to-typespec.tgz name: '@rush-temp/openapi-to-typespec' version: 0.0.0 dependencies: - '@azure-tools/typespec-autorest': 0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) + '@azure-tools/typespec-autorest': 0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@azure-tools/typespec-client-generator-core@0.39.1)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) '@azure-tools/typespec-azure-core': 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0) '@azure-tools/typespec-azure-resource-manager': 0.39.0(@azure-tools/typespec-autorest@0.39.0)(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) + '@azure-tools/typespec-client-generator-core': 0.39.1(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) '@types/fs-extra': 9.0.13 '@types/lodash': 4.14.201 '@types/node': 20.9.0 @@ -9446,7 +9468,6 @@ packages: webpack: 5.89.0(webpack-cli@5.1.4) webpack-cli: 5.1.4(webpack@5.89.0) transitivePeerDependencies: - - '@azure-tools/typespec-client-generator-core' - '@swc/core' - '@swc/wasm' - '@types/eslint' @@ -9461,7 +9482,7 @@ packages: dev: false file:projects/openapi.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-HE2/rfH9QyCccaXSR+AEAe/wGVAe/l37tqzQYSU1sFWE+u4MkZA1p7IoBgXOit6m8qOi9HGYFbm4TlpkPLKUrQ==, tarball: file:projects/openapi.tgz} + resolution: {integrity: sha512-jeOfewor/wxa+HdeUSgWjhsV4FbhMs9QX8uxqJxh7KZvTBxcvw1XhQkrriRoSEXnBXmHDuAvxKG6gEImlL6c7w==, tarball: file:projects/openapi.tgz} id: file:projects/openapi.tgz name: '@rush-temp/openapi' version: 0.0.0 @@ -9490,13 +9511,13 @@ packages: dev: false file:projects/schemas.tgz: - resolution: {integrity: sha512-aeHJHwq6RJNeECiY4g86CukjYKRNg8eHFoxQVmU/aCtNct/TMpfrAc19FVV4JyuNRKtXdFrVNjO2hUJxZXQSQA==, tarball: file:projects/schemas.tgz} + resolution: {integrity: sha512-R4SNYE56Q0TOMYcT8gSTZIInxE9vVJH1k54SR8Ksvg8HNkzG+Pko1NIxb8zpWFB74VEmx3TDaruHnodgJjUrvQ==, tarball: file:projects/schemas.tgz} name: '@rush-temp/schemas' version: 0.0.0 dev: false file:projects/system-requirements.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-2/b/vgr/a7FOjk7eTBfvo9o+w4QywiBeIgIHzYhVYTJcy5Huxm1ce0sNnId9Bay+/MrR8aw3lvRDlPUrWdbJUQ==, tarball: file:projects/system-requirements.tgz} + resolution: {integrity: sha512-z9xJ+0SQtAhIFr9wve8giTZZxNxdWfI6JxRdXLqEpRLZHHakvBWugiaIe/sfMbYBz+2tFyvHVmI1g6MqA5w1EA==, tarball: file:projects/system-requirements.tgz} id: file:projects/system-requirements.tgz name: '@rush-temp/system-requirements' version: 0.0.0 @@ -9531,7 +9552,7 @@ packages: dev: false file:projects/test-public-packages.tgz(prettier@3.1.0): - resolution: {integrity: sha512-ToosHldq4gjvV7xkx1oaD/rVcFWYokbdUgfd6vA3Uzx38HO4HaKY0wqNROzocyDrqwT6IWTMPMo2YATka/49vg==, tarball: file:projects/test-public-packages.tgz} + resolution: {integrity: sha512-4kAwPf9RR49MJI4A3gfHMTkVAOcI+r5jV9HKcXAQzs0sr5z/XZbsjTT0gOIu2uLz1KvrVZxxmx/5m1scKzFQgg==, tarball: file:projects/test-public-packages.tgz} id: file:projects/test-public-packages.tgz name: '@rush-temp/test-public-packages' version: 0.0.0 @@ -9552,7 +9573,7 @@ packages: dev: false file:projects/test-utils.tgz(@types/node@20.9.0)(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-tit5MjyO3D/0svfHHHE79slcHCUmLc+cyL2DJ+jLP/LFZ1FCDGzyNhW04+fJbCd0LIM05efwORznprhNtesO9A==, tarball: file:projects/test-utils.tgz} + resolution: {integrity: sha512-PjGDVMkoTdQpgj3j0MSrYPkMoilJ3rXaramucEQu/DXD2iUlUqLbATiDxEeOeeJcbyChAWoj8U/ZPV0UG3JdZg==, tarball: file:projects/test-utils.tgz} id: file:projects/test-utils.tgz name: '@rush-temp/test-utils' version: 0.0.0 @@ -9579,7 +9600,7 @@ packages: dev: false file:projects/yaml.tgz(prettier@3.1.0)(ts-node@10.9.1): - resolution: {integrity: sha512-H8/9GzwHHWTFw9aj6TqJWA8Hnb0a2ZwNMDALfKiPxzqK8qkqA7ddM9XXKwrK9Vn4Hfry5Lf80q59WoI5KkzaJw==, tarball: file:projects/yaml.tgz} + resolution: {integrity: sha512-BKdiJVcGwcy3siN8gBZEoV3uGhFsHHp2cz7xx1bhy7yUgO8mU1utB0CClwHw575UMrMfxJ/2/tOwWZZ6YRzNVA==, tarball: file:projects/yaml.tgz} id: file:projects/yaml.tgz name: '@rush-temp/yaml' version: 0.0.0 diff --git a/packages/extensions/openapi-to-typespec/package.json b/packages/extensions/openapi-to-typespec/package.json index 5ff4049126..f113e8ed6a 100644 --- a/packages/extensions/openapi-to-typespec/package.json +++ b/packages/extensions/openapi-to-typespec/package.json @@ -68,6 +68,7 @@ "@types/fs-extra": "^9.0.13", "chalk": "^4.1.0", "@azure-tools/typespec-autorest": "^0.39.0", + "@azure-tools/typespec-client-generator-core": "^0.39.0", "webpack-cli": "~5.1.4", "webpack": "~5.89.0", "@typescript-eslint/eslint-plugin": "^6.11.0", diff --git a/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts b/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts index 015b7b82fc..4dbae6199d 100644 --- a/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts +++ b/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts @@ -1,4 +1,4 @@ -import { spawnSync } from "child_process"; +import { execSync, spawnSync } from "child_process"; import { readFileSync } from "fs"; import { readdir } from "fs/promises"; import { join, dirname, extname, resolve } from "path"; @@ -24,6 +24,13 @@ export async function generateTypespec(repoRoot: string, folder: string, debug = generate(repoRoot, swaggerPath, debug, isFullCompatible); } +export async function generateSwagger(folder: string) { + const { path: root } = await resolveProject(__dirname); + const path = join(root, "test", folder, "tsp-output"); + const command = "tsp compile . --emit=@azure-tools/typespec-autorest"; + execSync(command, { cwd: path, stdio: "inherit" }); +} + function generate(root: string, path: string, debug = false, isFullCompatible = false) { const extension = extname(path); const inputFile = extension === ".json" ? `--input-file=${path}` : `--require=${path}`; @@ -55,6 +62,7 @@ function generate(root: string, path: string, debug = false, isFullCompatible = } async function main() { + const swagger = process.argv[3] === "swagger"; const folder = process.argv[4]; const debug = process.argv[5] === "--debug"; const { path: root } = await resolveProject(__dirname); @@ -67,6 +75,9 @@ async function main() { const folder = folders[i]; try { await generateTypespec(repoRoot, folder, debug, i % 2 === 0); + if (swagger) { + await generateSwagger(folder); + } } catch (e) { throw new Error(`Failed to generate ${folder}, error:\n${e}`); } From 6018eb2b7978abc40a223a534c1a0575a88bdde9 Mon Sep 17 00:00:00 2001 From: Pan Shao <97225342+pshao25@users.noreply.github.com> Date: Fri, 19 Apr 2024 17:30:27 +0800 Subject: [PATCH 29/33] Support api version as path parameter (#4952) Fix #4951 #4949 #4950 And fix some compile error for version name --- .../path4951_2024-04-18-08-15.json | 10 + .../openapi-to-typespec/package.json | 3 +- .../openapi-to-typespec/src/constants.ts | 1 + .../src/emiters/emit-main.ts | 1 + .../generate/generate-service-information.ts | 9 +- .../transform-service-information.ts | 19 +- .../test/analyzeText/tsp-output/main.tsp | 2 + .../swagger-output/swagger.json | 1561 +++++++++++++++++ .../test/anomalyDetector/tsp-output/main.tsp | 15 +- .../test/batch/tsp-output/main.tsp | 43 +- .../test/bodyComplex/tsp-output/main.tsp | 2 + .../test/complexObject/tsp-output/main.tsp | 2 + .../confidentialLedger/tsp-output/main.tsp | 2 + .../test/keyvault/tsp-output/main.tsp | 38 +- .../test/loadTest/tsp-output/main.tsp | 2 + .../test/nh/tsp-output/main.tsp | 32 + .../test/openAI/tsp-output/main.tsp | 2 + .../test/pagination/tsp-output/main.tsp | 36 +- .../test/qna/tsp-output/main.tsp | 2 + .../test/qnaAuthoring/tsp-output/main.tsp | 2 + .../test/qnaRuntime/tsp-output/main.tsp | 1 + .../test/schemaRegistry/tsp-output/main.tsp | 2 + .../test/url/tsp-output/main.tsp | 1 + .../test/utils/generate-typespec.ts | 10 +- .../test/webpubsub/tsp-output/main.tsp | 2 + 25 files changed, 1735 insertions(+), 65 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/path4951_2024-04-18-08-15.json create mode 100644 packages/extensions/openapi-to-typespec/src/constants.ts create mode 100644 packages/extensions/openapi-to-typespec/test/anomalyDetector/swagger-output/swagger.json diff --git a/common/changes/@autorest/openapi-to-typespec/path4951_2024-04-18-08-15.json b/common/changes/@autorest/openapi-to-typespec/path4951_2024-04-18-08-15.json new file mode 100644 index 0000000000..a3dbb5f988 --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/path4951_2024-04-18-08-15.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Support apiversion as path parameter", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/package.json b/packages/extensions/openapi-to-typespec/package.json index f113e8ed6a..f715dee8c2 100644 --- a/packages/extensions/openapi-to-typespec/package.json +++ b/packages/extensions/openapi-to-typespec/package.json @@ -6,8 +6,9 @@ "typings": "dist/main.d.ts", "scripts": { "generate": "ts-node ./test/utils/generate-typespec.ts generate", + "generate:validate": "ts-node ./test/utils/generate-typespec.ts generate swagger", "test": "echo \"Error: no test specified\" && exit 1", - "test:ci": "npm run generate && node ./test/utils/check-clean-tree.js", + "test:ci": "npm run generate:validate && node ./test/utils/check-clean-tree.js", "clean": "rimraf ./dist ./temp", "start": "node --max_old_space_size=4096 ./dist/main.js", "debug": "node --max_old_space_size=4096 --inspect-brk=localhost:9229 ./dist/main.js", diff --git a/packages/extensions/openapi-to-typespec/src/constants.ts b/packages/extensions/openapi-to-typespec/src/constants.ts new file mode 100644 index 0000000000..74969b3181 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/constants.ts @@ -0,0 +1 @@ +export const ApiVersion = "ApiVersion"; diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-main.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-main.ts index 8b858c2b08..d6f12591b2 100644 --- a/packages/extensions/openapi-to-typespec/src/emiters/emit-main.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-main.ts @@ -20,6 +20,7 @@ function getServiceInformation(program: TypespecProgram) { ``, `using TypeSpec.Rest;`, `using TypeSpec.Http;`, + `using TypeSpec.Versioning;`, ]; const content = generateServiceInformation(program); diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts index 41e3dcbcc5..4659eb0e38 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts @@ -1,3 +1,4 @@ +import { ApiVersion } from "../constants"; import { TypespecProgram, EndpointParameter, Auth } from "../interfaces"; import { getOptions } from "../options"; import { generateDocs } from "../utils/docs"; @@ -53,7 +54,7 @@ export function generateServiceInformation(program: TypespecProgram) { for (const param of allParams ?? []) { const doc = generateDocs(param); doc && definitions.push(doc); - definitions.push(`${param.name}: string `); + definitions.push(`${param.name}: ${param.name.startsWith(ApiVersion) ? "Versions" : "string"} `); } } hasParameters && definitions.push("}"); @@ -71,10 +72,12 @@ export function generateServiceInformation(program: TypespecProgram) { for (const version of serviceInformation.versions) { if (isArm) { definitions.push(`@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)`); - definitions.push(`@useDependency(Azure.Core.Versions.v1_0_Preview_1)`); } + definitions.push(`@useDependency(Azure.Core.Versions.v1_0_Preview_1)`); definitions.push(`/**\n* The ${version} API version.\n*/`); - definitions.push(`v${version.replaceAll("-", "_")}: "${version}",`); + definitions.push( + `${version.startsWith("v") ? "" : "v"}${version.replaceAll("-", "_").replaceAll(".", "_")}: "${version}",`, + ); } definitions.push("}"); } diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts index db0aba0c6d..53322f0af8 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts @@ -5,9 +5,9 @@ import { OAuth2SecurityScheme, ParameterLocation, SecurityScheme, - codeModelSchema, } from "@autorest/codemodel"; import { getArmCommonTypeVersion } from "../autorest-session"; +import { ApiVersion } from "../constants"; import { AadOauth2AuthFlow, ApiKeyAuthentication, Auth, EndpointParameter, ServiceInformation } from "../interfaces"; import { getOptions } from "../options"; import { getFirstEndpoint } from "../utils/get-endpoint"; @@ -86,15 +86,16 @@ function getApiVersions(model: CodeModel): string[] | undefined { return undefined; } - const apiVersionParams = (model.schemas.constants ?? []).filter((c) => - c.language.default.name.startsWith("ApiVersion"), - ); - - if (apiVersionParams.length) { - return apiVersionParams.map((c) => c.value.value); - } + const apiVersionParams = (model.schemas.constants ?? []) + .filter((c) => c.language.default.name.startsWith(ApiVersion)) + .map((c) => c.value.value) + .concat( + (model.schemas.choices ?? []) + .filter((c) => c.language.default.name.startsWith(ApiVersion)) + .flatMap((c) => c.choices.map((x) => x.value)), + ); - return undefined; + return apiVersionParams.length > 0 ? apiVersionParams : undefined; } function getEndpointParameter(codeModel: CodeModel) { diff --git a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp index f31ff42e94..66ef63c36b 100644 --- a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp @@ -4,6 +4,7 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; /** * The language service API is a suite of natural language processing (NLP) skills * built with best-in-class Microsoft machine learning algorithms. The API can be @@ -33,5 +34,6 @@ enum Versions { /** * The 2022-05-01 API version. */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) v2022_05_01: "2022-05-01", } diff --git a/packages/extensions/openapi-to-typespec/test/anomalyDetector/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/anomalyDetector/swagger-output/swagger.json new file mode 100644 index 0000000000..10903bcfe5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/anomalyDetector/swagger-output/swagger.json @@ -0,0 +1,1561 @@ +{ + "swagger": "2.0", + "info": { + "title": "Anomaly Detector Client", + "version": "v1.1-preview.1", + "description": "The Anomaly Detector API detects anomalies automatically in time series data.\nIt supports two kinds of mode, one is for stateless using, another is for\nstateful using. In stateless mode, there are three functionalities. Entire\nDetect is for detecting the whole series with model trained by the time series,\nLast Detect is detecting last point with model trained by points before.\nChangePoint Detect is for detecting trend changes in time series. In stateful\nmode, user can store time series, the stored time series will be used for\ndetection anomalies. Under this mode, user can still use the above three\nfunctionalities by only giving a time range without preparing time series in\nclient side. Besides the above three functionalities, stateful model also\nprovide group based detection and labeling service. By leveraging labeling\nservice user can provide labels for each detection result, these labels will be\nused for retuning or regenerating detection models. Inconsistency detection is\na kind of group based detection, this detection will find inconsistency ones in\na set of time series. By using anomaly detector service, business customers can\ndiscover incidents and establish a logic flow for root cause analysis.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "x-ms-parameterized-host": { + "hostTemplate": "{Endpoint}/anomalydetector/{ApiVersion}", + "useSchemePrefix": false, + "parameters": [ + { + "name": "$host", + "in": "path", + "description": "server parameter", + "required": true, + "type": "string" + }, + { + "name": "Endpoint", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "ApiVersion", + "in": "path", + "description": "The available API versions.", + "required": true, + "type": "string", + "enum": [ + "v1.1-preview.1" + ], + "x-ms-enum": { + "name": "Versions", + "modelAsString": true, + "values": [ + { + "name": "v1_1_preview_1", + "value": "v1.1-preview.1", + "description": "The v1.1-preview.1 API version." + } + ] + } + } + ] + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "securityDefinitions": { + "ApiKeyAuth": { + "type": "apiKey", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + } + }, + "tags": [], + "paths": { + "/multivariate/entire/detect/{resultId}/{resultId}": { + "get": { + "operationId": "GetDetectionResult", + "summary": "Get Multivariate Anomaly Detection Result", + "description": "Get multivariate anomaly detection result based on resultId returned by the\nDetectAnomalyAsync api", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "resultId", + "in": "path", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/DetectionResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + } + } + }, + "/multivariate/models": { + "get": { + "operationId": "ListMultivariateModel", + "summary": "List Multivariate Models", + "description": "List models of a subscription", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedModelSnapshot" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + }, + "post": { + "operationId": "TrainMultivariateModel", + "summary": "Train a Multivariate Anomaly Detection Model", + "description": "Create and train a multivariate anomaly detection model. The request must\ninclude a source parameter to indicate an externally accessible Azure storage\nUri (preferably a Shared Access Signature Uri). All time-series used in\ngenerate the model must be zipped into one single file. Each time-series will\nbe in a single CSV file in which the first column is timestamp and the second\ncolumn is value.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ModelInfo" + } + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful. " + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + } + } + }, + "/multivariate/models/{modelId}": { + "delete": { + "operationId": "DeleteMultivariateModel", + "summary": "Delete Multivariate Model", + "description": "Delete an existing multivariate model according to the modelId", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "modelId", + "in": "path", + "description": "Model identifier", + "required": true, + "type": "string" + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful. " + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + } + } + }, + "/multivariate/models/{modelId}/{modelId}": { + "get": { + "operationId": "GetMultivariateModel", + "summary": "Get Multivariate Model", + "description": "Get detailed information of multivariate model, including the training status\nand variables used in the model.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "modelId", + "in": "path", + "description": "Model identifier.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/Model" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + } + } + }, + "/multivariate/models/{modelId}/entire/detect": { + "post": { + "operationId": "DetectAnomaly", + "summary": "Detect Multivariate Anomaly", + "description": "Submit detection multivariate anomaly task with the trained model of modelId,\nthe input schema should be the same with the training request. Thus request\nwill be complete asynchronously and will return a resultId for querying the\ndetection result.The request should be a source link to indicate an externally\naccessible Azure storage Uri (preferably a Shared Access Signature Uri). All\ntime-series used in generate the model must be zipped into one single file.\nEach time-series will be as follows: the first column is timestamp and the\nsecond column is value.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "modelId", + "in": "path", + "description": "Model identifier", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Detect anomaly request", + "required": true, + "schema": { + "$ref": "#/definitions/DetectionRequest" + } + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful. " + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + } + } + }, + "/multivariate/models/{modelId}/last/detect": { + "post": { + "operationId": "LastDetectAnomaly", + "summary": "Detect anomalies in the last a few points of the request body", + "description": "Synchronized API for anomaly detection.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "modelId", + "in": "path", + "description": "Model identifier", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Request for last detection", + "required": true, + "schema": { + "$ref": "#/definitions/LastDetectionRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/LastDetectionResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + } + } + }, + "/timeseries/changepoint/detect": { + "post": { + "operationId": "DetectChangePoint", + "summary": "Detect change point for the entire series", + "description": "Evaluate change point score of every series point", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ChangePointDetectRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/ChangePointDetectResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + } + } + }, + "/timeseries/entire/detect": { + "post": { + "operationId": "DetectEntireSeries", + "summary": "Detect anomalies for the entire series in batch.", + "description": "This operation generates a model with an entire series, each point is detected\nwith the same model. With this method, points before and after a certain point\nare used to determine whether it is an anomaly. The entire detection can give\nuser an overall status of the time series.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DetectRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/EntireDetectResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + } + } + }, + "/timeseries/last/detect": { + "post": { + "operationId": "DetectLastPoint", + "summary": "Detect anomaly status of the latest point in time series.", + "description": "This operation generates a model using points before the latest one. With this\nmethod, only historical points are used to determine whether the target point\nis an anomaly. The latest point detecting operation matches the scenario of\nreal-time monitoring of business metrics.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DetectRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/LastDetectResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + } + } + } + }, + "definitions": { + "AlignMode": { + "type": "string", + "description": "An optional field, indicating how we align different variables to the same\ntime-range. Either Inner or Outer.", + "enum": [ + "Inner", + "Outer" + ], + "x-ms-enum": { + "name": "AlignMode", + "modelAsString": false + } + }, + "AlignPolicy": { + "type": "object", + "description": "An optional field, indicating the manner to align multiple variables.", + "properties": { + "alignMode": { + "$ref": "#/definitions/AlignMode", + "description": "An optional field, indicating how we align different variables to the same\ntime-range. Either Inner or Outer." + }, + "fillNAMethod": { + "$ref": "#/definitions/FillNAMethod", + "description": "An optional field, indicating how missing values will be filled. One of\nPrevious, Subsequent, Linear, Zero, Fixed, and NotFill. Cannot be set to\nNotFill, when the alignMode is Outer." + }, + "paddingValue": { + "type": "number", + "format": "float", + "description": "An optional field. Required when fillNAMethod is Fixed." + } + } + }, + "AnomalyDetectorError": { + "type": "object", + "description": "Error information returned by the API.", + "properties": { + "code": { + "$ref": "#/definitions/AnomalyDetectorErrorCodes", + "description": "The error code." + }, + "message": { + "type": "string", + "description": "A message explaining the error reported by the service." + } + } + }, + "AnomalyDetectorErrorCodes": { + "type": "string", + "description": "The error code.", + "enum": [ + "InvalidCustomInterval", + "BadArgument", + "InvalidGranularity", + "InvalidPeriod", + "InvalidModelArgument", + "InvalidSeries", + "InvalidJsonFormat", + "RequiredGranularity", + "RequiredSeries", + "InvalidImputeMode", + "InvalidImputeFixedValue" + ], + "x-ms-enum": { + "name": "AnomalyDetectorErrorCodes", + "modelAsString": true + } + }, + "AnomalyInterpretation": { + "type": "object", + "properties": { + "variable": { + "type": "string" + }, + "contributionScore": { + "type": "number", + "format": "float" + }, + "correlationChanges": { + "$ref": "#/definitions/CorrelationChanges" + } + } + }, + "AnomalyState": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "description": "timestamp" + }, + "value": { + "$ref": "#/definitions/AnomalyValue" + }, + "errors": { + "type": "array", + "description": "Error message for the current timestamp", + "items": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "timestamp" + ] + }, + "AnomalyValue": { + "type": "object", + "properties": { + "isAnomaly": { + "type": "boolean", + "description": "True if an anomaly is detected at the current timestamp." + }, + "severity": { + "type": "number", + "format": "float", + "description": "Indicates the significance of the anomaly. The higher the severity, the more\nsignificant the anomaly.", + "maximum": 1 + }, + "score": { + "type": "number", + "format": "float", + "description": "Raw score from the model.", + "maximum": 2 + }, + "interpretation": { + "type": "array", + "items": { + "$ref": "#/definitions/AnomalyInterpretation" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "isAnomaly", + "severity", + "score" + ] + }, + "ApiVersion": { + "type": "string", + "description": "Anomaly Detector API version (for example, v1.0).", + "enum": [ + "v1.1-preview.1" + ], + "x-ms-enum": { + "name": "ApiVersion", + "modelAsString": true + } + }, + "Azure.Core.Foundations.Error": { + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + }, + "x-ms-identifiers": [] + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "Azure.Core.Foundations.ErrorResponse": { + "type": "object", + "description": "A response containing error details.", + "properties": { + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] + }, + "Azure.Core.Foundations.InnerError": { + "type": "object", + "description": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "Inner error." + } + } + }, + "ChangePointDetectRequest": { + "type": "object", + "description": "The request of change point detection.", + "properties": { + "series": { + "type": "array", + "description": "Time series data points. Points should be sorted by timestamp in ascending\norder to match the change point detection result.", + "items": { + "$ref": "#/definitions/TimeSeriesPoint" + }, + "x-ms-identifiers": [] + }, + "granularity": { + "$ref": "#/definitions/TimeGranularity", + "description": "Can only be one of yearly, monthly, weekly, daily, hourly, minutely or\nsecondly. Granularity is used for verify whether input series is valid." + }, + "customInterval": { + "type": "integer", + "format": "int32", + "description": "Custom Interval is used to set non-standard time interval, for example, if the\nseries is 5 minutes, request can be set as {\"granularity\":\"minutely\",\n\"customInterval\":5}." + }, + "period": { + "type": "integer", + "format": "int32", + "description": "Optional argument, periodic value of a time series. If the value is null or\ndoes not present, the API will determine the period automatically." + }, + "stableTrendWindow": { + "type": "integer", + "format": "int32", + "description": "Optional argument, advanced model parameter, a default stableTrendWindow will\nbe used in detection." + }, + "threshold": { + "type": "number", + "format": "float", + "description": "Optional argument, advanced model parameter, between 0.0-1.0, the lower the\nvalue is, the larger the trend error will be which means less change point will\nbe accepted." + } + }, + "required": [ + "series", + "granularity" + ] + }, + "ChangePointDetectResponse": { + "type": "object", + "description": "The response of change point detection.", + "properties": { + "period": { + "type": "integer", + "format": "int32", + "description": "Frequency extracted from the series, zero means no recurrent pattern has been\nfound.", + "readOnly": true + }, + "isChangePoint": { + "type": "array", + "description": "isChangePoint contains change point properties for each input point. True means\nan anomaly either negative or positive has been detected. The index of the\narray is consistent with the input series.", + "items": { + "type": "boolean" + } + }, + "confidenceScores": { + "type": "array", + "description": "the change point confidence of each point", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "CorrelationChanges": { + "type": "object", + "properties": { + "changedVariables": { + "type": "array", + "description": "correlated variables", + "items": { + "type": "string" + } + } + } + }, + "DataSchema": { + "type": "string", + "enum": [ + "OneTable", + "MultiTable" + ], + "x-ms-enum": { + "name": "DataSchema", + "modelAsString": false + } + }, + "DetectRequest": { + "type": "object", + "description": "The request of entire or last anomaly detection.", + "properties": { + "series": { + "type": "array", + "description": "Time series data points. Points should be sorted by timestamp in ascending\norder to match the anomaly detection result. If the data is not sorted\ncorrectly or there is duplicated timestamp, the API will not work. In such\ncase, an error message will be returned.", + "items": { + "$ref": "#/definitions/TimeSeriesPoint" + }, + "x-ms-identifiers": [] + }, + "granularity": { + "$ref": "#/definitions/TimeGranularity", + "description": "Optional argument, can be one of yearly, monthly, weekly, daily, hourly,\nminutely, secondly, microsecond or none. If granularity is not present, it will\nbe none by default. If granularity is none, the timestamp property in time\nseries point can be absent." + }, + "customInterval": { + "type": "integer", + "format": "int32", + "description": "Custom Interval is used to set non-standard time interval, for example, if the\nseries is 5 minutes, request can be set as {\"granularity\":\"minutely\",\n\"customInterval\":5}." + }, + "period": { + "type": "integer", + "format": "int32", + "description": "Optional argument, periodic value of a time series. If the value is null or\ndoes not present, the API will determine the period automatically." + }, + "maxAnomalyRatio": { + "type": "number", + "format": "float", + "description": "Optional argument, advanced model parameter, max anomaly ratio in a time series." + }, + "sensitivity": { + "type": "integer", + "format": "int32", + "description": "Optional argument, advanced model parameter, between 0-99, the lower the value\nis, the larger the margin value will be which means less anomalies will be\naccepted." + }, + "imputeMode": { + "$ref": "#/definitions/ImputeMode", + "description": "Used to specify how to deal with missing values in the input series, it's used\nwhen granularity is not \"none\"." + }, + "imputeFixedValue": { + "type": "number", + "format": "float", + "description": "Used to specify the value to fill, it's used when granularity is not \"none\" and\nimputeMode is \"fixed\"." + } + }, + "required": [ + "series" + ] + }, + "DetectionRequest": { + "type": "object", + "description": "Detection request.", + "properties": { + "dataSource": { + "type": "string", + "description": "Source link to the input variables. Each variable should be a csv with two\ncolumns, `timestamp` and `value`. The file name of the variable will be used as\nits name. The variables used in detection should be exactly the same with those\nused in the training phase." + }, + "topContributorCount": { + "type": "integer", + "format": "int32", + "description": "Top contributor count." + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "A required field, indicating the start time of data for detection. Should be\ndate-time." + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "A required field, indicating the end time of data for detection. Should be\ndate-time." + } + }, + "required": [ + "dataSource", + "topContributorCount", + "startTime", + "endTime" + ] + }, + "DetectionResult": { + "type": "object", + "description": "Detection results for the given resultId.", + "properties": { + "resultId": { + "type": "string" + }, + "summary": { + "$ref": "#/definitions/DetectionResultSummary", + "description": "Multivariate anomaly detection status." + }, + "results": { + "type": "array", + "description": "Detection result for each timestamp.", + "items": { + "$ref": "#/definitions/AnomalyState" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "resultId", + "summary", + "results" + ] + }, + "DetectionResultSummary": { + "type": "object", + "description": "Multivariate anomaly detection status.", + "properties": { + "status": { + "$ref": "#/definitions/DetectionStatus", + "description": "Status of detection results. One of CREATED, RUNNING, READY, and FAILED." + }, + "errors": { + "type": "array", + "description": "Error message when detection is failed.", + "items": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-identifiers": [] + }, + "variableStates": { + "type": "array", + "items": { + "$ref": "#/definitions/VariableState" + }, + "x-ms-identifiers": [] + }, + "setupInfo": { + "$ref": "#/definitions/DetectionRequest", + "description": "Detection request." + } + }, + "required": [ + "status", + "setupInfo" + ] + }, + "DetectionStatus": { + "type": "string", + "description": "Status of detection results. One of CREATED, RUNNING, READY, and FAILED.", + "enum": [ + "CREATED", + "RUNNING", + "READY", + "FAILED" + ], + "x-ms-enum": { + "name": "DetectionStatus", + "modelAsString": false + } + }, + "DiagnosticsInfo": { + "type": "object", + "description": "Diagnostics Information for inspecting model/variable states.", + "properties": { + "modelState": { + "$ref": "#/definitions/ModelState" + }, + "variableStates": { + "type": "array", + "items": { + "$ref": "#/definitions/VariableState" + }, + "x-ms-identifiers": [] + } + } + }, + "EntireDetectResponse": { + "type": "object", + "description": "The response of entire anomaly detection.", + "properties": { + "period": { + "type": "integer", + "format": "int32", + "description": "Frequency extracted from the series, zero means no recurrent pattern has been\nfound." + }, + "expectedValues": { + "type": "array", + "description": "ExpectedValues contain expected value for each input point. The index of the\narray is consistent with the input series.", + "items": { + "type": "number", + "format": "float" + } + }, + "upperMargins": { + "type": "array", + "description": "UpperMargins contain upper margin of each input point. UpperMargin is used to\ncalculate upperBoundary, which equals to expectedValue + (100 -\nmarginScale)*upperMargin. Anomalies in response can be filtered by\nupperBoundary and lowerBoundary. By adjusting marginScale value, less\nsignificant anomalies can be filtered in client side. The index of the array is\nconsistent with the input series.", + "items": { + "type": "number", + "format": "float" + } + }, + "lowerMargins": { + "type": "array", + "description": "LowerMargins contain lower margin of each input point. LowerMargin is used to\ncalculate lowerBoundary, which equals to expectedValue - (100 -\nmarginScale)*lowerMargin. Points between the boundary can be marked as normal\nones in client side. The index of the array is consistent with the input\nseries.", + "items": { + "type": "number", + "format": "float" + } + }, + "isAnomaly": { + "type": "array", + "description": "IsAnomaly contains anomaly properties for each input point. True means an\nanomaly either negative or positive has been detected. The index of the array\nis consistent with the input series.", + "items": { + "type": "boolean" + } + }, + "isNegativeAnomaly": { + "type": "array", + "description": "IsNegativeAnomaly contains anomaly status in negative direction for each input\npoint. True means a negative anomaly has been detected. A negative anomaly\nmeans the point is detected as an anomaly and its real value is smaller than\nthe expected one. The index of the array is consistent with the input series.", + "items": { + "type": "boolean" + } + }, + "isPositiveAnomaly": { + "type": "array", + "description": "IsPositiveAnomaly contain anomaly status in positive direction for each input\npoint. True means a positive anomaly has been detected. A positive anomaly\nmeans the point is detected as an anomaly and its real value is larger than the\nexpected one. The index of the array is consistent with the input series.", + "items": { + "type": "boolean" + } + }, + "severity": { + "type": "array", + "description": "The severity score for each input point. The larger the value is, the more\nsever the anomaly is. For normal points, the \"severity\" is always 0.", + "items": { + "type": "number", + "format": "float" + } + } + }, + "required": [ + "period", + "expectedValues", + "upperMargins", + "lowerMargins", + "isAnomaly", + "isNegativeAnomaly", + "isPositiveAnomaly" + ] + }, + "ErrorResponse": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error code." + }, + "message": { + "type": "string", + "description": "The message explaining the error reported by the service." + } + }, + "required": [ + "code", + "message" + ] + }, + "FillNAMethod": { + "type": "string", + "description": "An optional field, indicating how missing values will be filled. One of\nPrevious, Subsequent, Linear, Zero, Fixed, and NotFill. Cannot be set to\nNotFill, when the alignMode is Outer.", + "enum": [ + "Previous", + "Subsequent", + "Linear", + "Zero", + "Fixed", + "NotFill" + ], + "x-ms-enum": { + "name": "FillNAMethod", + "modelAsString": true + } + }, + "ImputeMode": { + "type": "string", + "description": "Define the impute method, can be one of auto, previous, linear, fixed, zero,\nnotFill.", + "enum": [ + "auto", + "previous", + "linear", + "fixed", + "zero", + "notFill" + ], + "x-ms-enum": { + "name": "ImputeMode", + "modelAsString": true + } + }, + "LastDetectResponse": { + "type": "object", + "description": "The response of last anomaly detection.", + "properties": { + "period": { + "type": "integer", + "format": "int32", + "description": "Frequency extracted from the series, zero means no recurrent pattern has been\nfound." + }, + "suggestedWindow": { + "type": "integer", + "format": "int32", + "description": "Suggested input series points needed for detecting the latest point." + }, + "expectedValue": { + "type": "number", + "format": "float", + "description": "Expected value of the latest point." + }, + "upperMargin": { + "type": "number", + "format": "float", + "description": "Upper margin of the latest point. UpperMargin is used to calculate\nupperBoundary, which equals to expectedValue + (100 - marginScale)*upperMargin.\nIf the value of latest point is between upperBoundary and lowerBoundary, it\nshould be treated as normal value. By adjusting marginScale value, anomaly\nstatus of latest point can be changed." + }, + "lowerMargin": { + "type": "number", + "format": "float", + "description": "Lower margin of the latest point. LowerMargin is used to calculate\nlowerBoundary, which equals to expectedValue - (100 - marginScale)*lowerMargin." + }, + "isAnomaly": { + "type": "boolean", + "description": "Anomaly status of the latest point, true means the latest point is an anomaly\neither in negative direction or positive direction." + }, + "isNegativeAnomaly": { + "type": "boolean", + "description": "Anomaly status in negative direction of the latest point. True means the latest\npoint is an anomaly and its real value is smaller than the expected one." + }, + "isPositiveAnomaly": { + "type": "boolean", + "description": "Anomaly status in positive direction of the latest point. True means the latest\npoint is an anomaly and its real value is larger than the expected one." + }, + "severity": { + "type": "number", + "format": "float", + "description": "The severity score for the last input point. The larger the value is, the more\nsever the anomaly is. For normal points, the \"severity\" is always 0." + } + }, + "required": [ + "period", + "suggestedWindow", + "expectedValue", + "upperMargin", + "lowerMargin", + "isAnomaly", + "isNegativeAnomaly", + "isPositiveAnomaly" + ] + }, + "LastDetectionRequest": { + "type": "object", + "properties": { + "variables": { + "type": "array", + "description": "variables", + "items": { + "$ref": "#/definitions/VariableValues" + }, + "x-ms-identifiers": [] + }, + "topContributorCount": { + "type": "integer", + "format": "int32", + "description": "Top contributor count." + } + }, + "required": [ + "variables", + "topContributorCount" + ] + }, + "LastDetectionResult": { + "type": "object", + "properties": { + "variableStates": { + "type": "array", + "items": { + "$ref": "#/definitions/VariableState" + }, + "x-ms-identifiers": [] + }, + "results": { + "type": "array", + "items": { + "$ref": "#/definitions/AnomalyState" + }, + "x-ms-identifiers": [] + } + } + }, + "Model": { + "type": "object", + "description": "Response of getting a model.", + "properties": { + "modelId": { + "type": "string", + "description": "Model identifier." + }, + "createdTime": { + "type": "string", + "format": "date-time", + "description": "Date and time (UTC) when the model was created." + }, + "lastUpdatedTime": { + "type": "string", + "format": "date-time", + "description": "Date and time (UTC) when the model was last updated." + }, + "modelInfo": { + "$ref": "#/definitions/ModelInfo", + "description": "Training result of a model including its status, errors and diagnostics\ninformation." + } + }, + "required": [ + "modelId", + "createdTime", + "lastUpdatedTime" + ] + }, + "ModelInfo": { + "type": "object", + "description": "Training result of a model including its status, errors and diagnostics\ninformation.", + "properties": { + "dataSource": { + "type": "string", + "description": "Source link to the input variables. Each variable should be a csv file with two\ncolumns, `timestamp` and `value`. By default, the file name of the variable\nwill be used as its variable name." + }, + "dataSchema": { + "$ref": "#/definitions/DataSchema" + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "A required field, indicating the start time of training data. Should be\ndate-time." + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "A required field, indicating the end time of training data. Should be date-time." + }, + "displayName": { + "type": "string", + "description": "An optional field. The name of the model whose maximum length is 24.", + "maxLength": 24 + }, + "slidingWindow": { + "type": "integer", + "format": "int32", + "description": "An optional field, indicating how many previous points will be used to compute\nthe anomaly score of the subsequent point." + }, + "alignPolicy": { + "$ref": "#/definitions/AlignPolicy", + "description": "An optional field, indicating the manner to align multiple variables." + }, + "status": { + "$ref": "#/definitions/ModelStatus", + "description": "Model status. One of CREATED, RUNNING, READY, and FAILED." + }, + "errors": { + "type": "array", + "description": "Error messages when failed to create a model.", + "items": { + "$ref": "#/definitions/ErrorResponse" + }, + "x-ms-identifiers": [] + }, + "diagnosticsInfo": { + "$ref": "#/definitions/DiagnosticsInfo", + "description": "Diagnostics Information for inspecting model/variable states." + } + }, + "required": [ + "dataSource", + "startTime", + "endTime" + ] + }, + "ModelList": { + "type": "object", + "description": "Response of listing models.", + "properties": { + "models": { + "type": "array", + "description": "List of models", + "items": { + "$ref": "#/definitions/ModelSnapshot" + }, + "x-ms-identifiers": [] + }, + "currentCount": { + "type": "integer", + "format": "int32", + "description": "Current count of trained multivariate models." + }, + "maxCount": { + "type": "integer", + "format": "int32", + "description": "Max number of models that can be trained for this subscription." + }, + "nextLink": { + "type": "string", + "description": "The link to fetch more models." + } + }, + "required": [ + "models", + "currentCount", + "maxCount" + ] + }, + "ModelSnapshot": { + "type": "object", + "properties": { + "modelId": { + "type": "string", + "description": "Model identifier." + }, + "createdTime": { + "type": "string", + "format": "date-time", + "description": "Date and time (UTC) when the model was created." + }, + "lastUpdatedTime": { + "type": "string", + "format": "date-time", + "description": "Date and time (UTC) when the model was last updated." + }, + "status": { + "$ref": "#/definitions/ModelStatus", + "description": "Model status. One of CREATED, RUNNING, READY, and FAILED." + }, + "displayName": { + "type": "string" + }, + "variablesCount": { + "type": "integer", + "format": "int32", + "description": "Total number of variables." + } + }, + "required": [ + "modelId", + "createdTime", + "lastUpdatedTime", + "status", + "variablesCount" + ] + }, + "ModelState": { + "type": "object", + "properties": { + "epochIds": { + "type": "array", + "description": "Epoch id", + "items": { + "type": "integer", + "format": "int32" + } + }, + "trainLosses": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "validationLosses": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + }, + "latenciesInSeconds": { + "type": "array", + "items": { + "type": "number", + "format": "float" + } + } + } + }, + "ModelStatus": { + "type": "string", + "description": "Model status. One of CREATED, RUNNING, READY, and FAILED.", + "enum": [ + "CREATED", + "RUNNING", + "READY", + "FAILED" + ], + "x-ms-enum": { + "name": "ModelStatus", + "modelAsString": false + } + }, + "PagedModelSnapshot": { + "type": "object", + "description": "Paged collection of ModelSnapshot items", + "properties": { + "value": { + "type": "array", + "description": "The ModelSnapshot items on this page", + "items": { + "$ref": "#/definitions/ModelSnapshot" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "TimeGranularity": { + "type": "string", + "description": "Optional argument, can be one of yearly, monthly, weekly, daily, hourly,\nminutely, secondly, microsecond or none. If granularity is not present, it will\nbe none by default. If granularity is none, the timestamp property in time\nseries point can be absent.", + "enum": [ + "yearly", + "monthly", + "weekly", + "daily", + "hourly", + "minutely", + "secondly", + "microsecond", + "none" + ], + "x-ms-enum": { + "name": "TimeGranularity", + "modelAsString": false, + "values": [ + { + "name": "yearly", + "value": "yearly" + }, + { + "name": "monthly", + "value": "monthly" + }, + { + "name": "weekly", + "value": "weekly" + }, + { + "name": "daily", + "value": "daily" + }, + { + "name": "hourly", + "value": "hourly" + }, + { + "name": "perMinute", + "value": "minutely" + }, + { + "name": "perSecond", + "value": "secondly" + }, + { + "name": "microsecond", + "value": "microsecond" + }, + { + "name": "none", + "value": "none" + } + ] + } + }, + "TimeSeriesPoint": { + "type": "object", + "description": "The definition of input timeseries points.", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Optional argument, timestamp of a data point (ISO8601 format)." + }, + "value": { + "type": "number", + "format": "float", + "description": "The measurement of that point, should be float." + } + }, + "required": [ + "value" + ] + }, + "VariableState": { + "type": "object", + "properties": { + "variable": { + "type": "string", + "description": "Variable name." + }, + "filledNARatio": { + "type": "number", + "format": "float", + "description": "Proportion of NaN values filled of the variable.", + "maximum": 1 + }, + "effectiveCount": { + "type": "integer", + "format": "int32", + "description": "Number of effective points counted." + }, + "firstTimestamp": { + "type": "string", + "format": "date-time", + "description": "First timestamp of the variable." + }, + "lastTimestamp": { + "type": "string", + "format": "date-time", + "description": "Last timestamp of the variable." + } + } + }, + "VariableValues": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "variable name" + }, + "timestamps": { + "type": "array", + "description": "timestamps", + "items": { + "type": "string" + } + }, + "values": { + "type": "array", + "description": "values", + "items": { + "type": "number", + "format": "float" + } + } + }, + "required": [ + "name", + "timestamps", + "values" + ] + }, + "Versions": { + "type": "string", + "description": "The available API versions.", + "enum": [ + "v1.1-preview.1" + ], + "x-ms-enum": { + "name": "Versions", + "modelAsString": true, + "values": [ + { + "name": "v1_1_preview_1", + "value": "v1.1-preview.1", + "description": "The v1.1-preview.1 API version." + } + ] + } + } + }, + "parameters": { + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/main.tsp index 4fdd110072..3a9e12ead0 100644 --- a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/main.tsp @@ -4,6 +4,7 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; /** * The Anomaly Detector API detects anomalies automatically in time series data. * It supports two kinds of mode, one is for stateless using, another is for @@ -26,6 +27,7 @@ using TypeSpec.Http; @service({ title: "Anomaly Detector Client", }) +@versioned(Versions) @server( "{Endpoint}/anomalydetector/{ApiVersion}", "The Anomaly Detector API detects anomalies automatically in time series data. It supports two kinds of mode, one is for stateless using, another is for stateful using. In stateless mode, there are three functionalities. Entire Detect is for detecting the whole series with model trained by the time series, Last Detect is detecting last point with model trained by points before. ChangePoint Detect is for detecting trend changes in time series. In stateful mode, user can store time series, the stored time series will be used for detection anomalies. Under this mode, user can still use the above three functionalities by only giving a time range without preparing time series in client side. Besides the above three functionalities, stateful model also provide group based detection and labeling service. By leveraging labeling service user can provide labels for each detection result, these labels will be used for retuning or regenerating detection models. Inconsistency detection is a kind of group based detection, this detection will find inconsistency ones in a set of time series. By using anomaly detector service, business customers can discover incidents and establish a logic flow for root cause analysis.", @@ -36,7 +38,18 @@ using TypeSpec.Http; $host: string, Endpoint: string, - ApiVersion: string, + ApiVersion: Versions, } ) namespace AnomalyDetectorClient; + +/** + * The available API versions. + */ +enum Versions { + /** + * The v1.1-preview.1 API version. + */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v1_1_preview_1: "v1.1-preview.1", +} diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp index c7a2dc94fd..322485fb01 100644 --- a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp @@ -4,27 +4,36 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; -@useAuth(AadOauth2Auth<["user_impersonation"]> | ApiKeyAuth) +using TypeSpec.Versioning; +/** + * A client for issuing REST requests to the Azure Batch service. + */ +@useAuth( + AadOauth2Auth<["user_impersonation"]> | ApiKeyAuth< + ApiKeyLocation.header, + "Authorization" + > +) @service({ - title: "Azure Batch Service" - }) + title: "Azure Batch Service", +}) @versioned(Versions) -@server("{batchUrl}", "A client for issuing REST requests to the Azure Batch service." -, { -batchUrl: string -} +@server( + "{batchUrl}", + "A client for issuing REST requests to the Azure Batch service.", + { + batchUrl: string, + } ) -/** -* A client for issuing REST requests to the Azure Batch service. -*/ namespace Azure.Batch; /** -* The available API versions. -*/ + * The available API versions. + */ enum Versions { -/** -* The 2022-01-01.15.0 API version. -*/ -v2022_01_01.15.0: "2022-01-01.15.0", -} \ No newline at end of file + /** + * The 2022-01-01.15.0 API version. + */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2022_01_01_15_0: "2022-01-01.15.0", +} diff --git a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp index 1039f02026..780cebd26a 100644 --- a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp @@ -4,6 +4,7 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; /** * Test Infrastructure for AutoRest */ @@ -27,5 +28,6 @@ enum Versions { /** * The 2016-02-29 API version. */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) v2016_02_29: "2016-02-29", } diff --git a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp index 2e3264f473..6e380fa4b5 100644 --- a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp @@ -4,6 +4,7 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; /** * Some cool documentation. */ @@ -27,5 +28,6 @@ enum Versions { /** * The 2014-04-01-preview API version. */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) v2014_04_01_preview: "2014-04-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp index a52199ca64..3cf9416d9b 100644 --- a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp @@ -4,6 +4,7 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; /** * The ConfidentialLedgerClient writes and retrieves ledger entries against the * Confidential Ledger service. @@ -28,5 +29,6 @@ enum Versions { /** * The 2022-05-13 API version. */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) v2022_05_13: "2022-05-13", } diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp index 0934d3de4e..0d8070f8af 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp @@ -4,27 +4,31 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; +/** + * The key vault client performs cryptographic key operations and vault operations + * against the Key Vault service. + */ @service({ - title: "Azure Keyvault Service" - }) + title: "Azure Keyvault Service", +}) @versioned(Versions) -@server("{vaultBaseUrl}", "The key vault client performs cryptographic key operations and vault operations against the Key Vault service." -, { -vaultBaseUrl: string -} +@server( + "{vaultBaseUrl}", + "The key vault client performs cryptographic key operations and vault operations against the Key Vault service.", + { + vaultBaseUrl: string, + } ) -/** -* The key vault client performs cryptographic key operations and vault operations -* against the Key Vault service. -*/ namespace Azure.Keyvault; /** -* The available API versions. -*/ + * The available API versions. + */ enum Versions { -/** -* The 7.4-preview.1 API version. -*/ -v7.4_preview.1: "7.4-preview.1", -} \ No newline at end of file + /** + * The 7.4-preview.1 API version. + */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v7_4_preview_1: "7.4-preview.1", +} diff --git a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp index 1d395c6a5e..97d20ceee6 100644 --- a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp @@ -4,6 +4,7 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; /** * These APIs allow end users to create, view and run load tests using Azure Load * Test Service. @@ -29,5 +30,6 @@ enum Versions { /** * The 2022-11-01 API version. */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) v2022_11_01: "2022-11-01", } diff --git a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp index f8e0ea2989..8c9319245d 100644 --- a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp @@ -4,6 +4,7 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; /** * The Notification Hubs client performs operations to register and query devices, * and send notifications @@ -28,5 +29,36 @@ enum Versions { /** * The 2020-06-01 API version. */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) v2020_06_01: "2020-06-01", + + /** + * The 2015-01 API version. + */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2015_01: "2015-01", + + /** + * The 2015-04 API version. + */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2015_04: "2015-04", + + /** + * The 2015-08 API version. + */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2015_08: "2015-08", + + /** + * The 2016-07 API version. + */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2016_07: "2016-07", + + /** + * The 2020-06 API version. + */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v2020_06: "2020-06", } diff --git a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp index 55f529b7d9..8b48ffde87 100644 --- a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp @@ -4,6 +4,7 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; /** * Azure OpenAI APIs for completions and search */ @@ -30,5 +31,6 @@ enum Versions { /** * The 2022-06-01-preview API version. */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) v2022_06_01_preview: "2022-06-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp index c62e228834..c3ac94dce0 100644 --- a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp @@ -4,26 +4,30 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; +/** + * Long-running Operation for AutoRest + */ @service({ - title: "AutoRest Paging Test Service" - }) + title: "AutoRest Paging Test Service", +}) @versioned(Versions) -@server("{$host}", "Long-running Operation for AutoRest" -, { -$host: string -} +@server( + "{$host}", + "Long-running Operation for AutoRest", + { + $host: string, + } ) -/** -* Long-running Operation for AutoRest -*/ namespace AutoRestPagingTestService; /** -* The available API versions. -*/ + * The available API versions. + */ enum Versions { -/** -* The 1.0.0 API version. -*/ -v1.0.0: "1.0.0", -} \ No newline at end of file + /** + * The 1.0.0 API version. + */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + v1_0_0: "1.0.0", +} diff --git a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp index 33c7cc3973..f410242e3c 100644 --- a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp @@ -4,6 +4,7 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; /** * The language service API is a suite of natural language processing (NLP) skills * built with best-in-class Microsoft machine learning algorithms. The API can be @@ -38,5 +39,6 @@ enum Versions { /** * The 2022-07-01-preview API version. */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) v2022_07_01_preview: "2022-07-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp index b0f8901363..d9d69cd9fd 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp @@ -4,6 +4,7 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; /** * The language service API is a suite of natural language processing (NLP) skills * built with best-in-class Microsoft machine learning algorithms. The API can be @@ -38,5 +39,6 @@ enum Versions { /** * The 2023-04-01 API version. */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) v2023_04_01: "2023-04-01", } diff --git a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/main.tsp index 7dd3e6822d..5598d00c4e 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/main.tsp @@ -4,6 +4,7 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; /** * An API for QnAMaker runtime */ diff --git a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp index 30d7a44806..43df7a1a9f 100644 --- a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp @@ -4,6 +4,7 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; /** * Azure Schema Registry is as a central schema repository, with support for * versioning, management, compatibility checking, and RBAC. @@ -28,5 +29,6 @@ enum Versions { /** * The 2021-10 API version. */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) v2021_10: "2021-10", } diff --git a/packages/extensions/openapi-to-typespec/test/url/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/url/tsp-output/main.tsp index 160c8b3d3a..203d913e32 100644 --- a/packages/extensions/openapi-to-typespec/test/url/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/url/tsp-output/main.tsp @@ -4,6 +4,7 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; /** * Test Infrastructure for AutoRest */ diff --git a/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts b/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts index 4dbae6199d..c98f0aab22 100644 --- a/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts +++ b/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts @@ -24,10 +24,18 @@ export async function generateTypespec(repoRoot: string, folder: string, debug = generate(repoRoot, swaggerPath, debug, isFullCompatible); } +// A list containing all the projects we could compile. After we enable all the projects, we will delete this list. +const whiteList = ["anomalyDetector"]; + export async function generateSwagger(folder: string) { + if (!whiteList.includes(folder)) { + return; + } + const { path: root } = await resolveProject(__dirname); const path = join(root, "test", folder, "tsp-output"); - const command = "tsp compile . --emit=@azure-tools/typespec-autorest"; + const command = + "tsp compile . --emit=@azure-tools/typespec-autorest --option @azure-tools/typespec-autorest.output-file=./swagger-output/swagger.json"; execSync(command, { cwd: path, stdio: "inherit" }); } diff --git a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp index bfc7a9156c..059d80efd9 100644 --- a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp @@ -4,6 +4,7 @@ import "./routes.tsp"; using TypeSpec.Rest; using TypeSpec.Http; +using TypeSpec.Versioning; /** * // FIXME: (missing-service-description) Add service description */ @@ -27,5 +28,6 @@ enum Versions { /** * The 2023-07-01 API version. */ + @useDependency(Azure.Core.Versions.v1_0_Preview_1) v2023_07_01: "2023-07-01", } From 03fc9adaaf469afc5ea9fb9d9b80c39bcecc6636 Mon Sep 17 00:00:00 2001 From: Pan Shao <97225342+pshao25@users.noreply.github.com> Date: Fri, 19 Apr 2024 19:23:47 +0800 Subject: [PATCH 30/33] Change isFullCompatible logic (#4954) 1. Fix #4953 2. Change the logic of isFullCompatible to "only brownfield is full compatible" 3. Add compiler server to vscode setting 4. Enable "arm-agrifood", "arm-sphere", "arm-test" --- .vscode/settings.json | 3 +- .../json4953_2024-04-19-10-05.json | 10 + .../src/transforms/transform-arm-resources.ts | 2 +- .../DataConnectors_CreateOrUpdate.json | 69 + .../examples/DataConnectors_Delete.json | 21 + .../examples/DataConnectors_Get.json | 40 + .../examples/DataConnectors_List.json | 69 + ...taManagerForAgricultureExtensions_Get.json | 245 + ...aManagerForAgricultureExtensions_List.json | 250 + ...orAgricultureResources_CreateOrUpdate.json | 67 + ...ManagerForAgricultureResources_Delete.json | 14 + ...ataManagerForAgricultureResources_Get.json | 36 + ...icultureResources_ListByResourceGroup.json | 40 + ...ricultureResources_ListBySubscription.json | 39 + ...ManagerForAgricultureResources_Update.json | 69 + .../examples/Extensions_CreateOrUpdate.json | 48 + .../examples/Extensions_Delete.json | 15 + .../examples/Extensions_Get.json | 40 + ...sions_ListByDataManagerForAgriculture.json | 39 + ...ateEndpointConnections_CreateOrUpdate.json | 59 + .../PrivateEndpointConnections_Delete.json | 20 + .../PrivateEndpointConnections_Get.json | 39 + ...ateEndpointConnections_ListByResource.json | 50 + .../examples/PrivateLinkResources_Get.json | 37 + .../PrivateLinkResources_ListByResource.json | 32 + .../SolutionsDiscoverability_Get.json | 776 +++ .../SolutionsDiscoverability_List.json | 778 +++ .../examples/Solutions_CreateOrUpdate.json | 80 + .../examples/Solutions_Delete.json | 15 + .../examples/Solutions_Get.json | 41 + .../examples/Solutions_List.json | 44 + .../arm-agrifood/swagger-output/swagger.json | 3081 ++++++++++++ .../arm-agrifood/tsp-output/DataConnector.tsp | 2 +- .../tsp-output/DataManagerForAgriculture.tsp | 4 +- .../arm-agrifood/tsp-output/Extension.tsp | 2 +- .../tsp-output/PrivateEndpointConnection.tsp | 2 +- .../test/arm-agrifood/tsp-output/Solution.tsp | 2 +- .../arm-alertsmanagement/tsp-output/Alert.tsp | 19 +- .../tsp-output/AlertProcessingRule.tsp | 32 +- .../tsp-output/SmartGroup.tsp | 14 +- .../tsp-output/AnalysisServicesServer.tsp | 4 +- .../tsp-output/AccessInformationContract.tsp | 51 +- .../tsp-output/ApiContract.tsp | 46 +- .../ApiManagementServiceResource.tsp | 167 +- .../tsp-output/ApiReleaseContract.tsp | 40 +- .../tsp-output/ApiVersionSetContract.tsp | 42 +- .../AuthorizationServerContract.tsp | 45 +- .../tsp-output/BackendContract.tsp | 50 +- .../tsp-output/CacheContract.tsp | 40 +- .../tsp-output/CertificateContract.tsp | 34 +- .../tsp-output/DeletedServiceContract.tsp | 21 +- .../tsp-output/DiagnosticContract.tsp | 40 +- .../tsp-output/EmailTemplateContract.tsp | 42 +- .../GatewayCertificateAuthorityContract.tsp | 33 +- .../tsp-output/GatewayContract.tsp | 64 +- .../GatewayHostnameConfigurationContract.tsp | 33 +- .../tsp-output/GlobalSchemaContract.tsp | 32 +- .../tsp-output/GroupContract.tsp | 42 +- .../tsp-output/IdentityProviderContract.tsp | 45 +- .../tsp-output/IssueAttachmentContract.tsp | 33 +- .../tsp-output/IssueCommentContract.tsp | 32 +- .../tsp-output/IssueContract.tsp | 40 +- .../tsp-output/LoggerContract.tsp | 40 +- .../tsp-output/NamedValueContract.tsp | 44 +- .../tsp-output/NotificationContract.tsp | 24 +- .../OpenidConnectProviderContract.tsp | 43 +- .../tsp-output/OperationContract.tsp | 40 +- .../tsp-output/PolicyContract.tsp | 30 +- .../tsp-output/PortalDelegationSettings.tsp | 43 +- .../tsp-output/PortalRevisionContract.tsp | 41 +- .../tsp-output/PortalSigninSettings.tsp | 40 +- .../tsp-output/PortalSignupSettings.tsp | 40 +- .../tsp-output/PrivateEndpointConnection.tsp | 31 +- .../tsp-output/PrivateLinkResource.tsp | 18 +- .../tsp-output/ProductContract.tsp | 46 +- .../tsp-output/SchemaContract.tsp | 30 +- .../tsp-output/SubscriptionContract.tsp | 48 +- .../tsp-output/TagContract.tsp | 22 +- .../tsp-output/TagDescriptionContract.tsp | 33 +- .../tsp-output/TenantSettingsContract.tsp | 19 +- .../tsp-output/UserContract.tsp | 58 +- .../tsp-output/RoleAssignment.tsp | 2 +- .../RoleAssignmentScheduleRequest.tsp | 4 +- .../tsp-output/RoleDefinition.tsp | 2 +- .../RoleEligibilityScheduleRequest.tsp | 4 +- .../tsp-output/RoleManagementPolicy.tsp | 2 +- .../RoleManagementPolicyAssignment.tsp | 2 +- .../tsp-output/Application.tsp | 2 + .../tsp-output/BusinessProcess.tsp | 2 + .../tsp-output/BusinessProcessVersion.tsp | 2 + .../tsp-output/InfrastructureResource.tsp | 2 + .../tsp-output/Space.tsp | 2 + .../tsp-output/AvailabilitySet.tsp | 4 +- .../tsp-output/CapacityReservation.tsp | 4 +- .../tsp-output/CapacityReservationGroup.tsp | 4 +- .../arm-compute/tsp-output/CloudService.tsp | 21 +- .../arm-compute/tsp-output/DedicatedHost.tsp | 4 +- .../tsp-output/DedicatedHostGroup.tsp | 4 +- .../test/arm-compute/tsp-output/Disk.tsp | 12 +- .../arm-compute/tsp-output/DiskAccess.tsp | 7 +- .../tsp-output/DiskEncryptionSet.tsp | 4 +- .../tsp-output/DiskRestorePoint.tsp | 2 +- .../test/arm-compute/tsp-output/Gallery.tsp | 15 +- .../tsp-output/GalleryApplication.tsp | 4 +- .../tsp-output/GalleryApplicationVersion.tsp | 4 +- .../arm-compute/tsp-output/GalleryImage.tsp | 4 +- .../tsp-output/GalleryImageVersion.tsp | 4 +- .../test/arm-compute/tsp-output/Image.tsp | 10 +- .../tsp-output/PrivateEndpointConnection.tsp | 2 +- .../tsp-output/ProximityPlacementGroup.tsp | 4 +- .../arm-compute/tsp-output/RestorePoint.tsp | 5 +- .../tsp-output/RestorePointCollection.tsp | 4 +- .../test/arm-compute/tsp-output/Snapshot.tsp | 9 +- .../tsp-output/SshPublicKeyResource.tsp | 4 +- .../arm-compute/tsp-output/VirtualMachine.tsp | 18 +- .../tsp-output/VirtualMachineExtension.tsp | 4 +- .../tsp-output/VirtualMachineRunCommand.tsp | 4 +- .../tsp-output/VirtualMachineScaleSet.tsp | 28 +- .../VirtualMachineScaleSetExtension.tsp | 4 +- .../tsp-output/VirtualMachineScaleSetVM.tsp | 6 +- .../VirtualMachineScaleSetVMExtension.tsp | 4 +- .../test/arm-dns/tsp-output/DnsRecord.tsp | 37 +- .../test/arm-dns/tsp-output/DnsZone.tsp | 41 +- .../BatchDeploymentTrackedResource.tsp | 4 +- .../BatchEndpointTrackedResource.tsp | 4 +- .../tsp-output/CodeContainerResource.tsp | 2 +- .../tsp-output/CodeVersionResource.tsp | 2 +- .../tsp-output/ComponentContainerResource.tsp | 2 +- .../tsp-output/ComponentVersionResource.tsp | 2 +- .../tsp-output/ComputeResource.tsp | 8 +- .../tsp-output/DataContainerResource.tsp | 2 +- .../tsp-output/DataVersionBaseResource.tsp | 2 +- .../tsp-output/DatastoreResource.tsp | 2 +- .../EnvironmentContainerResource.tsp | 2 +- .../tsp-output/EnvironmentVersionResource.tsp | 2 +- .../tsp-output/FeaturesetContainer.tsp | 2 +- .../tsp-output/FeaturesetVersion.tsp | 2 +- .../FeaturestoreEntityContainer.tsp | 2 +- .../tsp-output/FeaturestoreEntityVersion.tsp | 2 +- .../tsp-output/JobBaseResource.tsp | 7 +- .../tsp-output/LabelingJob.tsp | 5 +- .../tsp-output/ModelContainerResource.tsp | 2 +- .../tsp-output/ModelVersionResource.tsp | 2 +- .../OnlineDeploymentTrackedResource.tsp | 4 +- .../OnlineEndpointTrackedResource.tsp | 4 +- .../tsp-output/OutboundRuleBasicResource.tsp | 2 +- .../tsp-output/PrivateEndpointConnection.tsp | 2 +- .../tsp-output/Registry.tsp | 10 +- .../tsp-output/Schedule.tsp | 5 +- .../tsp-output/Workspace.tsp | 10 +- ...aceConnectionPropertiesV2BasicResource.tsp | 4 +- .../tsp-output/Account.tsp | 2 - .../tsp-output/Quota.tsp | 2 - .../examples/Catalogs_CountDevices.json | 18 + .../examples/Catalogs_CreateOrUpdate.json | 34 + .../examples/Catalogs_Delete.json | 24 + .../swagger-output/examples/Catalogs_Get.json | 21 + .../Catalogs_ListByResourceGroup.json | 30 + .../examples/Catalogs_ListBySubscription.json | 29 + .../examples/Catalogs_ListDeployments.json | 27 + .../examples/Catalogs_ListDeviceGroups.json | 32 + .../examples/Catalogs_ListDeviceInsights.json | 40 + .../examples/Catalogs_ListDevices.json | 27 + .../examples/Catalogs_Update.json | 25 + .../examples/Certificates_Get.json | 17 + .../examples/Certificates_ListByCatalog.json | 18 + .../Certificates_RetrieveCertChain.json | 19 + ...icates_RetrieveProofOfPossessionNonce.json | 22 + .../examples/Deployments_CreateOrUpdate.json | 47 + .../examples/Deployments_Delete.json | 27 + .../examples/Deployments_Get.json | 38 + .../Deployments_ListByDeviceGroup.json | 42 + .../examples/DeviceGroups_ClaimDevices.json | 25 + .../examples/DeviceGroups_CountDevices.json | 20 + .../examples/DeviceGroups_CreateOrUpdate.json | 46 + .../examples/DeviceGroups_Delete.json | 26 + .../examples/DeviceGroups_Get.json | 26 + .../examples/DeviceGroups_ListByProduct.json | 30 + .../examples/DeviceGroups_Update.json | 33 + .../examples/Devices_CreateOrUpdate.json | 34 + .../examples/Devices_Delete.json | 27 + .../Devices_GenerateCapabilityImage.json | 32 + .../swagger-output/examples/Devices_Get.json | 29 + .../examples/Devices_ListByDeviceGroup.json | 29 + .../examples/Devices_Update.json | 36 + .../examples/Images_CreateOrUpdate.json | 34 + .../examples/Images_Delete.json | 25 + .../swagger-output/examples/Images_Get.json | 17 + .../examples/Images_ListByCatalog.json | 27 + .../examples/Products_CountDevices.json | 21 + .../examples/Products_CreateOrUpdate.json | 30 + .../examples/Products_Delete.json | 25 + .../Products_GenerateDefaultDeviceGroups.json | 40 + .../swagger-output/examples/Products_Get.json | 23 + .../examples/Products_ListByCatalog.json | 29 + .../examples/Products_Update.json | 30 + .../arm-sphere/swagger-output/swagger.json | 4403 +++++++++++++++++ .../test/arm-sphere/tsp-output/Catalog.tsp | 10 - .../arm-sphere/tsp-output/Certificate.tsp | 10 - .../test/arm-sphere/tsp-output/Deployment.tsp | 2 - .../test/arm-sphere/tsp-output/Device.tsp | 10 - .../arm-sphere/tsp-output/DeviceGroup.tsp | 10 - .../test/arm-sphere/tsp-output/Image.tsp | 2 - .../test/arm-sphere/tsp-output/Product.tsp | 2 - .../arm-storage/tsp-output/BlobContainer.tsp | 54 +- .../tsp-output/BlobInventoryPolicy.tsp | 24 +- .../tsp-output/BlobServiceProperties.tsp | 28 +- .../arm-storage/tsp-output/DeletedAccount.tsp | 12 +- .../tsp-output/EncryptionScope.tsp | 30 +- .../tsp-output/FileServiceProperties.tsp | 28 +- .../test/arm-storage/tsp-output/FileShare.tsp | 46 +- .../tsp-output/ImmutabilityPolicy.tsp | 38 +- .../test/arm-storage/tsp-output/LocalUser.tsp | 22 +- .../tsp-output/ManagementPolicy.tsp | 20 +- .../tsp-output/ObjectReplicationPolicy.tsp | 25 +- .../tsp-output/PrivateEndpointConnection.tsp | 25 +- .../tsp-output/QueueServiceProperties.tsp | 29 +- .../arm-storage/tsp-output/StorageAccount.tsp | 68 +- .../arm-storage/tsp-output/StorageQueue.tsp | 38 +- .../test/arm-storage/tsp-output/Table.tsp | 38 +- .../tsp-output/TableServiceProperties.tsp | 29 +- .../test/arm-test/swagger-output/swagger.json | 901 ++++ .../test/arm-test/tsp-output/ArrayDefault.tsp | 4 - .../test/arm-test/tsp-output/DictProperty.tsp | 2 - .../test/arm-test/tsp-output/Employee.tsp | 2 - .../test/utils/generate-typespec.ts | 23 +- 226 files changed, 15209 insertions(+), 278 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/json4953_2024-04-19-10-05.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureExtensions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureExtensions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_ListByDataManagerForAgriculture.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_ListByResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateLinkResources_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateLinkResources_ListByResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/SolutionsDiscoverability_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/SolutionsDiscoverability_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/swagger.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_CountDevices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDeployments.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDeviceGroups.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDeviceInsights.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDevices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_ListByCatalog.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_RetrieveCertChain.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_RetrieveProofOfPossessionNonce.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_ListByDeviceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_ClaimDevices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_CountDevices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_ListByProduct.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_GenerateCapabilityImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_ListByDeviceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_ListByCatalog.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_CountDevices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_GenerateDefaultDeviceGroups.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_ListByCatalog.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/swagger.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-test/swagger-output/swagger.json diff --git a/.vscode/settings.json b/.vscode/settings.json index cc5e9a45be..6bf2230b81 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -31,5 +31,6 @@ }, "[powershell]": { "editor.defaultFormatter": "ms-vscode.powershell" - } + }, + "typespec.tsp-server.path": "./packages/extensions/openapi-to-typespec/node_modules/@typespec/compiler" } diff --git a/common/changes/@autorest/openapi-to-typespec/json4953_2024-04-19-10-05.json b/common/changes/@autorest/openapi-to-typespec/json4953_2024-04-19-10-05.json new file mode 100644 index 0000000000..ec84f5bb0d --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/json4953_2024-04-19-10-05.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Change isFullCompatible logic", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts index 5d5a23ce2e..22bab3c4ae 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts @@ -290,7 +290,7 @@ function getCustomizations( if (bodyParam) { if (bodyParam.language.default.name !== templateName && isFullCompatible) { augmentedDecorators.push( - `@@encodedName(${tspOperationGroupName}.\`${operationName}\`::parameters.${templateName}, "json", "${bodyParam.language.default.name}");`, + `@@encodedName(${tspOperationGroupName}.\`${operationName}\`::parameters.${templateName}, "application/json", "${bodyParam.language.default.name}");`, ); augmentedDecorators.push( `@@extension(${tspOperationGroupName}.\`${operationName}\`::parameters.${templateName}, "x-ms-client-name", "${bodyParam.language.default.name}");`, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_CreateOrUpdate.json new file mode 100644 index 0000000000..53cdeb0029 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_CreateOrUpdate.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "credentials": { + "apiKey": { + "keyName": "abcApiKey", + "keyVaultUri": "https://testKeyVault.vault.azure.net/", + "keyVersion": "239c0475c7d44f20b0fc27d3fe90a41d" + }, + "kind": "ApiKeyAuthCredentials" + } + } + }, + "dataConnectorName": "WeatherIBM", + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/WeatherIBM", + "properties": { + "credentials": { + "clientId": "string", + "clientSecret": { + "keyName": "string", + "keyVaultUri": "string", + "keyVersion": "string" + }, + "kind": "OAuthClientCredentials" + } + } + } + }, + "201": { + "body": { + "name": "SatelliteSentinelHub", + "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/SatelliteSentinelHub", + "properties": { + "credentials": { + "clientId": "string", + "clientSecret": { + "keyName": "string", + "keyVaultUri": "string", + "keyVersion": "string" + }, + "kind": "OAuthClientCredentials" + } + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:02.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "DataConnectors_CreateOrUpdate", + "title": "DataConnectors_CreateOrUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_Delete.json new file mode 100644 index 0000000000..0c5d8e5f02 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataConnectorName": "SatelliteSentinelHub", + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": {}, + "204": {}, + "400": { + "error": { + "code": "ConnectorConfigurationInvalid", + "message": "Connector name not supported. Supported connectors are 'SatelliteSentinelHub' and 'WeatherIBM'." + } + } + }, + "operationId": "DataConnectors_Delete", + "title": "DataConnectors_Delete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_Get.json new file mode 100644 index 0000000000..83bdaeb1dd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_Get.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataConnectorName": "SatelliteSentinelHub", + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "SatelliteSentinelHub", + "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/SatelliteSentinelHub", + "properties": { + "credentials": { + "clientId": "string", + "clientSecret": { + "keyName": "string", + "keyVaultUri": "string", + "keyVersion": "string" + }, + "kind": "OAuthClientCredentials" + } + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:02.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "DataConnectors_Get", + "title": "DataConnectors_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_List.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_List.json new file mode 100644 index 0000000000..c7d27435f6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataConnectors_List.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataConnectorName": "WeatherIBM", + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "SatelliteSentinelHub", + "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/SatelliteSentinelHub", + "properties": { + "credentials": { + "clientId": "string", + "clientSecret": { + "keyName": "string", + "keyVaultUri": "string", + "keyVersion": "string" + }, + "kind": "OAuthClientCredentials" + } + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:02.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + { + "name": "WeatherIBM", + "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/WeatherIBM", + "properties": { + "credentials": { + "apiKey": { + "keyName": "string", + "keyVaultUri": "string", + "keyVersion": "string" + }, + "kind": "ApiKeyAuthCredentials" + } + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:02.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + } + } + }, + "operationId": "DataConnectors_List", + "title": "DataConnectors_List" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureExtensions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureExtensions_Get.json new file mode 100644 index 0000000000..ada406e640 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureExtensions_Get.json @@ -0,0 +1,245 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureExtensionId": "DTN.ContentServices" + }, + "responses": { + "200": { + "body": { + "name": "DTN.ContentServices", + "type": "Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions/DTN.ContentServices", + "properties": { + "detailedInformation": [ + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetDailyObservations", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "sunrise", + "sunset", + "weatherCode", + "weatherDescription", + "maxTemperature", + "minTemperature", + "avgHeatIndex", + "maxHeatIndex", + "minHeatIndex", + "maxWindChill", + "minWindChill", + "maxFeelsLike", + "minFeelsLike", + "avgFeelsLike", + "maxWindSpeed", + "avgWetBulbGlobeTemp", + "maxWetBulbGlobeTemp", + "minWetBulbGlobeTemp", + "minutesOfSunshine", + "cornHeatUnit", + "evapotranspiration" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "growingDegreeDay", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "windChill", + "windSpeed", + "windDirection" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "hours", + "units", + "precision", + "sector" + ], + "apiName": "GetHourlyObservations", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "weatherCode", + "weatherDescription", + "feelsLike", + "visibilityWeatherCode", + "visibilityWeatherDescription", + "minutesOfSunshine" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "visibility", + "windChill", + "windSpeed", + "windDirection", + "windGust" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetHourlyForecasts", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "weatherCode", + "weatherDescription", + "feelsLike", + "visibilityWeatherCode", + "visibilityWeatherDescription", + "minutesOfSunshine" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "visibility", + "windChill", + "windSpeed", + "windDirection", + "windGust" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetDailyForecasts", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "sunrise", + "sunset", + "weatherCode", + "weatherDescription", + "maxTemperature", + "minTemperature", + "avgHeatIndex", + "maxHeatIndex", + "minHeatIndex", + "maxWindChill", + "minWindChill", + "maxFeelsLike", + "minFeelsLike", + "avgFeelsLike", + "maxWindSpeed", + "avgWetBulbGlobeTemp", + "maxWetBulbGlobeTemp", + "minWetBulbGlobeTemp", + "minutesOfSunshine", + "cornHeatUnit", + "evapotranspiration" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "growingDegreeDay", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "windChill", + "windSpeed", + "windDirection" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + } + ], + "extensionApiDocsLink": "https://cs-docs.dtn.com/api/weather-observations-and-forecasts-rest-api/", + "extensionAuthLink": "https://www.dtn.com/dtn-content-integration/", + "extensionCategory": "Weather", + "farmBeatsExtensionId": "DTN.ContentServices", + "farmBeatsExtensionName": "DTN", + "farmBeatsExtensionVersion": "1.0", + "publisherId": "dtn", + "targetResourceType": "FarmBeats" + }, + "systemData": { + "createdAt": "2021-04-12T15:28:06Z", + "lastModifiedAt": "2021-04-12T15:30:01Z" + } + } + } + }, + "operationId": "DataManagerForAgricultureExtensions_Get", + "title": "DataManagerForAgricultureExtensions_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureExtensions_List.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureExtensions_List.json new file mode 100644 index 0000000000..366be7977e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureExtensions_List.json @@ -0,0 +1,250 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "DTN.ContentServices", + "type": "Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions/DTN.ContentServices", + "properties": { + "detailedInformation": [ + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetDailyObservations", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "sunrise", + "sunset", + "weatherCode", + "weatherDescription", + "maxTemperature", + "minTemperature", + "avgHeatIndex", + "maxHeatIndex", + "minHeatIndex", + "maxWindChill", + "minWindChill", + "maxFeelsLike", + "minFeelsLike", + "avgFeelsLike", + "maxWindSpeed", + "avgWetBulbGlobeTemp", + "maxWetBulbGlobeTemp", + "minWetBulbGlobeTemp", + "minutesOfSunshine", + "cornHeatUnit", + "evapotranspiration" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "growingDegreeDay", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "windChill", + "windSpeed", + "windDirection" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "hours", + "units", + "precision", + "sector" + ], + "apiName": "GetHourlyObservations", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "weatherCode", + "weatherDescription", + "feelsLike", + "visibilityWeatherCode", + "visibilityWeatherDescription", + "minutesOfSunshine" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "visibility", + "windChill", + "windSpeed", + "windDirection", + "windGust" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetHourlyForecasts", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "weatherCode", + "weatherDescription", + "feelsLike", + "visibilityWeatherCode", + "visibilityWeatherDescription", + "minutesOfSunshine" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "visibility", + "windChill", + "windSpeed", + "windDirection", + "windGust" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetDailyForecasts", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "sunrise", + "sunset", + "weatherCode", + "weatherDescription", + "maxTemperature", + "minTemperature", + "avgHeatIndex", + "maxHeatIndex", + "minHeatIndex", + "maxWindChill", + "minWindChill", + "maxFeelsLike", + "minFeelsLike", + "avgFeelsLike", + "maxWindSpeed", + "avgWetBulbGlobeTemp", + "maxWetBulbGlobeTemp", + "minWetBulbGlobeTemp", + "minutesOfSunshine", + "cornHeatUnit", + "evapotranspiration" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "growingDegreeDay", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "windChill", + "windSpeed", + "windDirection" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + } + ], + "extensionApiDocsLink": "https://cs-docs.dtn.com/api/weather-observations-and-forecasts-rest-api/", + "extensionAuthLink": "https://www.dtn.com/dtn-content-integration/", + "extensionCategory": "Weather", + "farmBeatsExtensionId": "DTN.ContentServices", + "farmBeatsExtensionName": "DTN", + "farmBeatsExtensionVersion": "1.0", + "publisherId": "dtn", + "targetResourceType": "FarmBeats" + }, + "systemData": { + "createdAt": "2021-04-12T15:28:06Z", + "lastModifiedAt": "2021-04-12T15:30:01Z" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "DataManagerForAgricultureExtensions_List", + "title": "DataManagerForAgricultureExtensions_List" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_CreateOrUpdate.json new file mode 100644 index 0000000000..9bc813a591 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_CreateOrUpdate.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "request": { + "location": "eastus2", + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "responses": { + "200": { + "body": { + "name": "examples-farmbeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "201": { + "body": { + "name": "examples-farmbeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Failed" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "DataManagerForAgricultureResources_CreateOrUpdate", + "title": "DataManagerForAgricultureResources_CreateOrUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_Delete.json new file mode 100644 index 0000000000..3a533e483d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_Delete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "DataManagerForAgricultureResources_Delete", + "title": "DataManagerForAgricultureResources_Delete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_Get.json new file mode 100644 index 0000000000..4e7b5dabc6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_Get.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmBeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "examples-farmBeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "DataManagerForAgricultureResources_Get", + "title": "DataManagerForAgricultureResources_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_ListByResourceGroup.json new file mode 100644 index 0000000000..df0ca0fe96 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_ListByResourceGroup.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "examples-farmBeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "DataManagerForAgricultureResources_ListByResourceGroup", + "title": "DataManagerForAgricultureResources_ListByResourceGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_ListBySubscription.json new file mode 100644 index 0000000000..2c1703447e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_ListBySubscription.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "examples-farmBeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "DataManagerForAgricultureResources_ListBySubscription", + "title": "DataManagerForAgricultureResources_ListBySubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_Update.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_Update.json new file mode 100644 index 0000000000..9828b76860 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/DataManagerForAgricultureResources_Update.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmBeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "request": { + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "responses": { + "200": { + "body": { + "name": "examples-farmBeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": { + "body": { + "name": "examples-farmBeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "headers": { + "location": "http://azure.async.operation/status" + } + } + }, + "operationId": "DataManagerForAgricultureResources_Update", + "title": "DataManagerForAgricultureResources_Update" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_CreateOrUpdate.json new file mode 100644 index 0000000000..dceaa01cf7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_CreateOrUpdate.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "apiProperties": { + "examples-api": { + "apiFreshnessTimeInMinutes": 3600 + } + }, + "extensionVersion": "1.0" + }, + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "extensionId": "provider.extension", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "201": { + "body": { + "name": "provider.extension", + "type": "Microsoft.AgFoodPlatform/farmBeats/extensions", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-dataManagerForAgricultureResourceName/extensions/provider.extension", + "properties": { + "additionalApiProperties": { + "examples-api": { + "apiFreshnessTimeInMinutes": 3600 + } + }, + "extensionApiDocsLink": "https://docs.provider.com/documentation/extension", + "extensionAuthLink": "https://www.provider.com/extension/", + "extensionCategory": "Weather", + "installedExtensionVersion": "1.0" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:02.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "Extensions_CreateOrUpdate", + "title": "Extensions_CreateOrUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_Delete.json new file mode 100644 index 0000000000..066518e750 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "extensionId": "provider.extension", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Extensions_Delete", + "title": "Extensions_Delete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_Get.json new file mode 100644 index 0000000000..1465cc8516 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_Get.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "extensionId": "provider.extension", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "provider.extension", + "type": "Microsoft.AgFoodPlatform/farmBeats/extensions", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/extensions/provider.extension", + "properties": { + "additionalApiProperties": { + "examples-api": { + "apiFreshnessTimeInMinutes": 3600 + } + }, + "extensionApiDocsLink": "https://docs.provider.com/documentation/extension", + "extensionAuthLink": "https://www.provider.com/extension/", + "extensionCategory": "Weather", + "installedExtensionVersion": "1.0" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "Extensions_Get", + "title": "Extensions_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_ListByDataManagerForAgriculture.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_ListByDataManagerForAgriculture.json new file mode 100644 index 0000000000..99eb18b851 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Extensions_ListByDataManagerForAgriculture.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "provider.extension", + "type": "Microsoft.AgFoodPlatform/farmBeats/extensions", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/extensions/provider.extension", + "properties": { + "extensionApiDocsLink": "https://docs.provider.com/documentation/extension", + "extensionAuthLink": "https://www.provider.com/extension/", + "extensionCategory": "Weather", + "installedExtensionVersion": "1.0" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Extensions_ListByDataManagerForAgriculture", + "title": "Extensions_ListByDataManagerForAgriculture" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_CreateOrUpdate.json new file mode 100644 index 0000000000..665ce7316e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_CreateOrUpdate.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "request": { + "properties": { + "privateLinkServiceConnectionState": { + "description": "Approved by johndoe@contoso.com", + "status": "Approved" + } + } + } + }, + "responses": { + "200": { + "body": { + "name": "privateEndpointConnectionName", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + }, + "400": { + "body": { + "error": { + "code": "ModelValidationFailed", + "message": "Request input validation failed.", + "details": [ + { + "code": "ModelValidationFailed", + "message": "The Payload field is required.", + "target": "Payload" + }, + { + "code": "ModelValidationFailed", + "message": "Error converting value \"InvalidStatus\" to type 'PrivateEndpointState'. Path 'properties.privateLinkServiceConnectionState.status', line 1, position 624. Refer path description for more information.", + "target": "Payload.properties.privateLinkServiceConnectionState.status" + } + ] + } + } + } + }, + "operationId": "PrivateEndpointConnections_CreateOrUpdate", + "title": "PrivateEndpointConnections_CreateOrUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_Delete.json new file mode 100644 index 0000000000..7b06e2de35 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "http://azure.async.operation/status" + } + }, + "204": {} + }, + "operationId": "PrivateEndpointConnections_Delete", + "title": "PrivateEndpointConnections_Delete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_Get.json new file mode 100644 index 0000000000..cf7c434d07 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_Get.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "privateEndpointConnectionName", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + }, + "404": { + "body": { + "error": { + "code": "PrivateEndpointConnectionNotFound", + "message": "Private endpoint connection resource 'privateEndpointConnectionName' for subscriptionId '11111111-2222-3333-4444-555555555555', resource group name 'examples-rg', resource type 'farmBeats' and resource name 'examples-farmbeatsResourceName' not found." + } + } + } + }, + "operationId": "PrivateEndpointConnections_Get", + "title": "PrivateEndpointConnections_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_ListByResource.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_ListByResource.json new file mode 100644 index 0000000000..d2db6ab443 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateEndpointConnections_ListByResource.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "privateEndpointConnectionName", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + }, + { + "name": "privateEndpointConnectionName2", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName2", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName2" + }, + "privateLinkServiceConnectionState": { + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "PrivateEndpointConnections_ListByResource", + "title": "PrivateEndpointConnections_ListByResource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateLinkResources_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateLinkResources_Get.json new file mode 100644 index 0000000000..fb4a1b0bf1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateLinkResources_Get.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subResourceName": "farmbeats", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "farmbeats", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateLinkResources", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "properties": { + "groupId": "farmbeats", + "requiredMembers": [ + "farmbeats" + ], + "requiredZoneNames": [ + "privatelink.farmbeats.azure.net" + ] + } + } + }, + "404": { + "body": { + "error": { + "code": "ResourceNotFound", + "message": "Resource with subscriptionId '11111111-2222-3333-4444-555555555555', resource group 'examples-rg' and resourcename 'examples-farmbeatsResourceName' not found." + } + } + } + }, + "operationId": "PrivateLinkResources_Get", + "title": "PrivateLinkResources_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateLinkResources_ListByResource.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateLinkResources_ListByResource.json new file mode 100644 index 0000000000..c1bcad35f3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/PrivateLinkResources_ListByResource.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "farmbeats", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateLinkResources", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "properties": { + "groupId": "farmbeats", + "requiredMembers": [ + "farmbeats" + ], + "requiredZoneNames": [ + "privatelink.farmbeats.azure.net" + ] + } + } + ] + } + } + }, + "operationId": "PrivateLinkResources_ListByResource", + "title": "PrivateLinkResources_ListByResource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/SolutionsDiscoverability_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/SolutionsDiscoverability_Get.json new file mode 100644 index 0000000000..d0141b0dfc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/SolutionsDiscoverability_Get.json @@ -0,0 +1,776 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureSolutionId": "bayerAgPowered.gdu" + }, + "responses": { + "200": { + "body": { + "name": "bayerAgPowered.gdu", + "type": "Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions", + "id": "/providers/Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions/bayerAgPowered.gdu", + "properties": { + "accessFBApplicationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "accessFBApplicationName": "solution provider 1", + "actionIds": [ + "actionId1" + ], + "dataAccessScopes": [ + "Weather", + "Scenes" + ], + "marketplaceOfferDetails": { + "publisherId": "publisherId", + "saasOfferId": "saasOfferId" + }, + "openApiSpecsDictionary": { + "v1": { + "info": { + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "contact": { + "email": "apiteam@swagger.io" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "termsOfService": "http://swagger.io/terms/", + "title": "Swagger Petstore", + "version": "1.0.6" + }, + "basePath": "/", + "definitions": { + "Error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "ErrorResponse": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "InnerError": { + "type": "object", + "description": "Inner error containing list of errors.\r\nInnerError reference document.", + "additionalProperties": { + "type": "object" + }, + "properties": { + "code": { + "type": "string", + "description": "Specific error code than was provided by the\r\ncontaining error." + } + } + }, + "WeatherDataIngestionJob": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + } + }, + "externalDocs": { + "description": "Find out more about Swagger", + "url": "http://swagger.io" + }, + "host": "addon.azurewebsites.net", + "paths": { + "/v1/resources/{resourceId}": { + "get": { + "operationId": "Weather_GetDataIngestionJobDetails", + "description": "Get weather ingestion job.", + "parameters": [ + { + "name": "resourceId", + "type": "string", + "description": "Id of the job.", + "in": "path", + "required": true + }, + { + "name": "api-version", + "type": "string", + "description": "The requested API version", + "default": "2021-07-31-preview", + "in": "query", + "required": true + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Weather" + ], + "responses": { + "200": { + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Success" + }, + "default": { + "schema": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "description": "Error" + } + } + }, + "put": { + "operationId": "Weather_CreateDataIngestionJob", + "description": "Create a weather data ingestion job.", + "consumes": [ + "application/json" + ], + "parameters": [ + { + "name": "resourceId", + "type": "string", + "description": "Job id supplied by user.", + "in": "path", + "required": true + }, + { + "name": "api-version", + "type": "string", + "description": "The requested API version", + "default": "2021-07-31-preview", + "in": "query", + "required": true + }, + { + "name": "body", + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Job parameters supplied by user.", + "in": "body" + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Weather" + ], + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "responses": { + "202": { + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Success" + }, + "default": { + "schema": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "description": "Error" + } + } + } + } + }, + "schemes": [ + "https" + ], + "swagger": "2.0" + } + }, + "partnerId": "abc", + "partnerTenantId": "556b0c04-d33e-48d0-9f6f-f893c8c77e00", + "roleId": "role1", + "roleName": "roleName1", + "saaSApplicationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "systemData": { + "createdAt": "2022-07-25T10:15:15Z", + "lastModifiedAt": "2022-07-25T10:15:15Z" + } + }, + "headers": {} + } + }, + "operationId": "SolutionsDiscoverability_Get", + "title": "SolutionsDiscoverability_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/SolutionsDiscoverability_List.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/SolutionsDiscoverability_List.json new file mode 100644 index 0000000000..fcd5ae8e73 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/SolutionsDiscoverability_List.json @@ -0,0 +1,778 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "bayerAgPowered.gdu", + "type": "Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions", + "id": "/providers/Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions/bayerAgPowered.gdu", + "properties": { + "accessFBApplicationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "accessFBApplicationName": "solution provider 1", + "actionIds": [ + "actionId1" + ], + "dataAccessScopes": [ + "string" + ], + "marketplaceOfferDetails": { + "publisherId": "publisherId", + "saasOfferId": "saasOfferId" + }, + "openApiSpecsDictionary": { + "v1": { + "info": { + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "contact": { + "email": "apiteam@swagger.io" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "termsOfService": "http://swagger.io/terms/", + "title": "Swagger Petstore", + "version": "1.0.6" + }, + "basePath": "/", + "definitions": { + "Error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "ErrorResponse": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "InnerError": { + "type": "object", + "description": "Inner error containing list of errors.\r\nInnerError reference document.", + "additionalProperties": { + "type": "object" + }, + "properties": { + "code": { + "type": "string", + "description": "Specific error code than was provided by the\r\ncontaining error." + } + } + }, + "WeatherDataIngestionJob": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + } + }, + "externalDocs": { + "description": "Find out more about Swagger", + "url": "http://swagger.io" + }, + "host": "addon.azurewebsites.net", + "paths": { + "/v1/resources/{resourceId}": { + "get": { + "operationId": "Weather_GetDataIngestionJobDetails", + "description": "Get weather ingestion job.", + "parameters": [ + { + "name": "resourceId", + "type": "string", + "description": "Id of the job.", + "in": "path", + "required": true + }, + { + "name": "api-version", + "type": "string", + "description": "The requested API version", + "default": "2021-07-31-preview", + "in": "query", + "required": true + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Weather" + ], + "responses": { + "200": { + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Success" + }, + "default": { + "schema": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "description": "Error" + } + } + }, + "put": { + "operationId": "Weather_CreateDataIngestionJob", + "description": "Create a weather data ingestion job.", + "consumes": [ + "application/json" + ], + "parameters": [ + { + "name": "resourceId", + "type": "string", + "description": "Job id supplied by user.", + "in": "path", + "required": true + }, + { + "name": "api-version", + "type": "string", + "description": "The requested API version", + "default": "2021-07-31-preview", + "in": "query", + "required": true + }, + { + "name": "body", + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Job parameters supplied by user.", + "in": "body" + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Weather" + ], + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "responses": { + "202": { + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Success" + }, + "default": { + "schema": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "description": "Error" + } + } + } + } + }, + "schemes": [ + "https" + ], + "swagger": "2.0" + } + }, + "partnerId": "abc", + "partnerTenantId": "556b0c04-d33e-48d0-9f6f-f893c8c77e00", + "roleId": "role1", + "roleName": "roleName1", + "saaSApplicationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "systemData": { + "createdAt": "2022-07-25T10:15:15Z", + "lastModifiedAt": "2022-07-25T10:15:15Z" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "SolutionsDiscoverability_List", + "title": "SolutionsDiscoverability_List" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_CreateOrUpdate.json new file mode 100644 index 0000000000..a056d6d7d9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_CreateOrUpdate.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "marketplacePublisherId": "publisherId", + "offerId": "offerId", + "planId": "planId", + "roleAssignmentId": "11111111-2222-3333-4444-555555555555", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "termId": "termId" + } + }, + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "solutionId": "abc.partner", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "eTag": "19002383-0000-0700-0000-633572de0000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "properties": { + "marketplacePublisherId": "publisherId", + "offerId": "offerId", + "partnerId": "abc", + "planId": "planId", + "roleAssignmentId": "11111111-2222-3333-4444-555555555555", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "solutionId": "abc.intbugbashfour", + "termId": "termId" + }, + "systemData": { + "createdAt": "2022-09-29T10:26:29Z", + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "eTag": "19002383-0000-0700-0000-633572de0000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "properties": { + "marketplacePublisherId": "publisherId", + "offerId": "offerId", + "partnerId": "abc", + "planId": "planId", + "roleAssignmentId": "11111111-2222-3333-4444-555555555555", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "solutionId": "abc.intbugbashfour", + "termId": "termId" + }, + "systemData": { + "createdAt": "2022-09-29T10:26:29Z", + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Solutions_CreateOrUpdate", + "title": "Solutions_CreateOrUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_Delete.json new file mode 100644 index 0000000000..d670792367 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "solutionId": "provider.solution", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Solutions_Delete", + "title": "Solutions_Delete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_Get.json new file mode 100644 index 0000000000..80d0f6de34 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_Get.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "solutionId": "provider.solution", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "eTag": "19002383-0000-0700-0000-633572de0000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "properties": { + "marketplacePublisherId": "publisherId", + "offerId": "offerId", + "partnerId": "abc", + "planId": "planId", + "roleAssignmentId": "11111111-2222-3333-4444-555555555555", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "solutionId": "abc.intbugbashfour", + "termId": "termId" + }, + "systemData": { + "createdAt": "2022-09-29T10:26:29Z", + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Solutions_Get", + "title": "Solutions_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_List.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_List.json new file mode 100644 index 0000000000..2cba511691 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/examples/Solutions_List.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "eTag": "19002383-0000-0700-0000-633572de0000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "properties": { + "marketplacePublisherId": "publisherId", + "offerId": "offerId", + "partnerId": "abc", + "planId": "planId", + "roleAssignmentId": "11111111-2222-3333-4444-555555555555", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "solutionId": "abc.intbugbashfour", + "termId": "termId" + }, + "systemData": { + "createdAt": "2022-09-29T10:26:29Z", + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Solutions_List", + "title": "Solutions_List" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/swagger.json new file mode 100644 index 0000000000..a416a765d8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/swagger.json @@ -0,0 +1,3081 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure AgFoodPlatform RP Service", + "version": "2023-06-01-preview", + "description": "APIs documentation for Microsoft Azure Data Manager for Agriculture Service.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "AadOauth2Auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "AadOauth2Auth": { + "type": "oauth2", + "description": "The Azure Active Directory OAuth2 Flow", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "DataConnectors" + }, + { + "name": "DataManagerForAgricultures" + }, + { + "name": "DataManagerForAgricultureExtensions" + }, + { + "name": "Extensions" + }, + { + "name": "PrivateEndpointConnections" + }, + { + "name": "PrivateLinkResources" + }, + { + "name": "Solutions" + }, + { + "name": "DataManagerForAgricultureSolutions" + } + ], + "paths": { + "/providers/Azure.ResourceManager.AgFoodPlatform/farmBeatsExtensionDefinitions": { + "get": { + "operationId": "DataManagerForAgricultureExtensions_List", + "tags": [ + "DataManagerForAgricultureExtensions" + ], + "description": "Get list of Data Manager For Agriculture extension.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "farmBeatsExtensionIds", + "in": "query", + "description": "DataManagerForAgricultureExtension ids.", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "farmBeatsExtensionNames", + "in": "query", + "description": "DataManagerForAgriculture extension names.", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "extensionCategories", + "in": "query", + "description": "Extension categories.", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "publisherIds", + "in": "query", + "description": "Publisher ids.", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "$maxPageSize", + "in": "query", + "description": "Maximum number of items needed (inclusive).\nMinimum = 10, Maximum = 1000, Default value = 50.", + "required": false, + "type": "integer", + "format": "int32", + "default": 50, + "minimum": 10, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataManagerForAgricultureExtensionListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataManagerForAgricultureExtensions_List": { + "$ref": "./examples/DataManagerForAgricultureExtensions_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Azure.ResourceManager.AgFoodPlatform/farmBeatsExtensionDefinitions/{dataManagerForAgricultureExtensionId}": { + "get": { + "operationId": "DataManagerForAgricultureExtensions_Get", + "tags": [ + "DataManagerForAgricultureExtensions" + ], + "description": "Get Data Manager For Agriculture extension.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "dataManagerForAgricultureExtensionId", + "in": "path", + "description": "dataManagerForAgricultureExtensionId to be queried.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataManagerForAgricultureExtension" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataManagerForAgricultureExtensions_Get": { + "$ref": "./examples/DataManagerForAgricultureExtensions_Get.json" + } + } + } + }, + "/providers/Azure.ResourceManager.AgFoodPlatform/farmBeatsSolutionDefinitions": { + "get": { + "operationId": "SolutionsDiscoverability_List", + "tags": [ + "DataManagerForAgricultureSolutions" + ], + "description": "Get list of Data Manager For Agriculture solutions.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "farmBeatsSolutionIds", + "in": "query", + "description": "Ids of Data Manager For Agriculture Solutions which the customer requests to fetch.", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "farmBeatsSolutionNames", + "in": "query", + "description": "Names of Data Manager For Agriculture Solutions which the customer requests to fetch.", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "$maxPageSize", + "in": "query", + "description": "Maximum number of items needed (inclusive).\nMinimum = 10, Maximum = 1000, Default value = 50.", + "required": false, + "type": "integer", + "format": "int32", + "default": 50, + "minimum": 10, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataManagerForAgricultureSolutionListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "SolutionsDiscoverability_List": { + "$ref": "./examples/SolutionsDiscoverability_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Azure.ResourceManager.AgFoodPlatform/farmBeatsSolutionDefinitions/{dataManagerForAgricultureSolutionId}": { + "get": { + "operationId": "SolutionsDiscoverability_Get", + "tags": [ + "DataManagerForAgricultureSolutions" + ], + "description": "Get Data Manager For Agriculture solution by id.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "dataManagerForAgricultureSolutionId", + "in": "path", + "description": "dataManagerForAgricultureSolutionId to be queried.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataManagerForAgricultureSolution" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "SolutionsDiscoverability_Get": { + "$ref": "./examples/SolutionsDiscoverability_Get.json" + } + } + } + }, + "/providers/Azure.ResourceManager.AgFoodPlatform/operations": { + "get": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Azure.ResourceManager.AgFoodPlatform/farmBeats": { + "get": { + "operationId": "DataManagerForAgricultureResources_ListBySubscription", + "tags": [ + "DataManagerForAgricultures" + ], + "description": "Lists the DataManagerForAgriculture instances for a subscription.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataManagerForAgricultureListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataManagerForAgricultureResources_ListBySubscription": { + "$ref": "./examples/DataManagerForAgricultureResources_ListBySubscription.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/checkNameAvailability": { + "post": { + "operationId": "CheckNameAvailabilityOperations_CheckNameAvailability", + "description": "Checks the name availability of the resource with requested resource name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "nameAvailabilityRequest", + "in": "body", + "description": "NameAvailabilityRequest object.", + "required": true, + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityRequest" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/locations/{locations}/operationResults/{operationResultsId}": { + "get": { + "operationId": "OperationResultsOperations_Get", + "description": "Get operationResults for a Data Manager For Agriculture resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "locations", + "in": "path", + "description": "Location.", + "required": true, + "type": "string" + }, + { + "name": "operationResultsId", + "in": "path", + "description": "operationResultsId for a specific location.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ArmAsyncOperation" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.AgFoodPlatform/farmBeats": { + "get": { + "operationId": "DataManagerForAgricultureResources_ListByResourceGroup", + "tags": [ + "DataManagerForAgricultures" + ], + "description": "Lists the DataManagerForAgriculture instances for a resource group.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$maxPageSize", + "in": "query", + "description": "Maximum number of items needed (inclusive).\nMinimum = 10, Maximum = 1000, Default value = 50.", + "required": false, + "type": "integer", + "format": "int32", + "default": 50, + "minimum": 10, + "maximum": 1000 + }, + { + "name": "$skipToken", + "in": "query", + "description": "Continuation token for getting next set of results.", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataManagerForAgricultureListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataManagerForAgricultureResources_ListByResourceGroup": { + "$ref": "./examples/DataManagerForAgricultureResources_ListByResourceGroup.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}": { + "get": { + "operationId": "DataManagerForAgricultureResources_Get", + "tags": [ + "DataManagerForAgricultures" + ], + "description": "Get DataManagerForAgriculture resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataManagerForAgriculture" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataManagerForAgricultureResources_Get": { + "$ref": "./examples/DataManagerForAgricultureResources_Get.json" + } + } + }, + "put": { + "operationId": "DataManagerForAgricultureResources_CreateOrUpdate", + "tags": [ + "DataManagerForAgricultures" + ], + "description": "Create or update Data Manager For Agriculture resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + }, + { + "name": "request", + "in": "body", + "description": "Data Manager For Agriculture resource create or update request object.", + "required": true, + "schema": { + "$ref": "#/definitions/DataManagerForAgriculture" + }, + "x-ms-client-name": "request" + } + ], + "responses": { + "200": { + "description": "Resource 'DataManagerForAgriculture' update operation succeeded", + "schema": { + "$ref": "#/definitions/DataManagerForAgriculture" + } + }, + "201": { + "description": "Resource 'DataManagerForAgriculture' create operation succeeded", + "schema": { + "$ref": "#/definitions/DataManagerForAgriculture" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataManagerForAgricultureResources_CreateOrUpdate": { + "$ref": "./examples/DataManagerForAgricultureResources_CreateOrUpdate.json" + } + } + }, + "patch": { + "operationId": "DataManagerForAgricultureResources_Update", + "tags": [ + "DataManagerForAgricultures" + ], + "description": "Update a Data Manager For Agriculture resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + }, + { + "name": "request", + "in": "body", + "description": "Request object.", + "required": true, + "schema": { + "$ref": "#/definitions/DataManagerForAgricultureUpdateRequestModel" + }, + "x-ms-client-name": "request" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataManagerForAgriculture" + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataManagerForAgricultureResources_Update": { + "$ref": "./examples/DataManagerForAgricultureResources_Update.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "DataManagerForAgricultureResources_Delete", + "tags": [ + "DataManagerForAgricultures" + ], + "description": "Delete a Data Manager For Agriculture resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataManagerForAgricultureResources_Delete": { + "$ref": "./examples/DataManagerForAgricultureResources_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/dataConnectors": { + "get": { + "operationId": "DataConnectors_List", + "tags": [ + "DataConnectors" + ], + "description": "Lists the Data Connector Credentials for MADMA instance.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$maxPageSize", + "in": "query", + "description": "Maximum number of items needed (inclusive).\nMinimum = 10, Maximum = 1000, Default value = 50.", + "required": false, + "type": "integer", + "format": "int32", + "default": 50, + "minimum": 10, + "maximum": 1000 + }, + { + "name": "$skipToken", + "in": "query", + "description": "Continuation token for getting next set of results.", + "required": false, + "type": "string" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataConnectorListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataConnectors_List": { + "$ref": "./examples/DataConnectors_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/dataConnectors/{dataConnectorName}": { + "get": { + "operationId": "DataConnectors_Get", + "tags": [ + "DataConnectors" + ], + "description": "Get specific Data Connector resource by DataConnectorName.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + }, + { + "name": "dataConnectorName", + "in": "path", + "description": "Connector name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataConnector" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataConnectors_Get": { + "$ref": "./examples/DataConnectors_Get.json" + } + } + }, + "put": { + "operationId": "DataConnectors_CreateOrUpdate", + "tags": [ + "DataConnectors" + ], + "description": "Create or update Data Connector For MADMA resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + }, + { + "name": "dataConnectorName", + "in": "path", + "description": "Connector name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63 + }, + { + "name": "body", + "in": "body", + "description": "Body must be valid DataConnector request.", + "required": true, + "schema": { + "$ref": "#/definitions/DataConnector" + }, + "x-ms-client-name": "body" + } + ], + "responses": { + "200": { + "description": "Resource 'DataConnector' update operation succeeded", + "schema": { + "$ref": "#/definitions/DataConnector" + } + }, + "201": { + "description": "Resource 'DataConnector' create operation succeeded", + "schema": { + "$ref": "#/definitions/DataConnector" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataConnectors_CreateOrUpdate": { + "$ref": "./examples/DataConnectors_CreateOrUpdate.json" + } + } + }, + "delete": { + "operationId": "DataConnectors_Delete", + "tags": [ + "DataConnectors" + ], + "description": "Delete a Data Connectors with given dataConnector name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + }, + { + "name": "dataConnectorName", + "in": "path", + "description": "Connector name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63 + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataConnectors_Delete": { + "$ref": "./examples/DataConnectors_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/extensions": { + "get": { + "operationId": "Extensions_ListByDataManagerForAgriculture", + "tags": [ + "Extensions" + ], + "description": "Get installed extensions details.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "extensionIds", + "in": "query", + "description": "Installed extension ids.", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "extensionCategories", + "in": "query", + "description": "Installed extension categories.", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "$maxPageSize", + "in": "query", + "description": "Maximum number of items needed (inclusive).\nMinimum = 10, Maximum = 1000, Default value = 50.", + "required": false, + "type": "integer", + "format": "int32", + "default": 50, + "minimum": 10, + "maximum": 1000 + }, + { + "name": "$skipToken", + "in": "query", + "description": "Skip token for getting next set of results.", + "required": false, + "type": "string" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ExtensionListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Extensions_ListByDataManagerForAgriculture": { + "$ref": "./examples/Extensions_ListByDataManagerForAgriculture.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/extensions/{extensionId}": { + "get": { + "operationId": "Extensions_Get", + "tags": [ + "Extensions" + ], + "description": "Get installed extension details by extension id.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + }, + { + "name": "extensionId", + "in": "path", + "description": "Id of extension resource.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Extension" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Extensions_Get": { + "$ref": "./examples/Extensions_Get.json" + } + } + }, + "put": { + "operationId": "Extensions_CreateOrUpdate", + "tags": [ + "Extensions" + ], + "description": "Install or Update extension. Additional Api Properties are merged patch and if the extension is updated to a new version then the obsolete entries will be auto deleted from Additional Api Properties.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + }, + { + "name": "extensionId", + "in": "path", + "description": "Id of extension resource.", + "required": true, + "type": "string" + }, + { + "name": "requestBody", + "in": "body", + "description": "Extension resource request body.", + "required": true, + "schema": { + "$ref": "#/definitions/Extension" + }, + "x-ms-client-name": "requestBody" + } + ], + "responses": { + "200": { + "description": "Resource 'Extension' update operation succeeded", + "schema": { + "$ref": "#/definitions/Extension" + } + }, + "201": { + "description": "Resource 'Extension' create operation succeeded", + "schema": { + "$ref": "#/definitions/Extension" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Extensions_CreateOrUpdate": { + "$ref": "./examples/Extensions_CreateOrUpdate.json" + } + } + }, + "delete": { + "operationId": "Extensions_Delete", + "tags": [ + "Extensions" + ], + "description": "Uninstall extension.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + }, + { + "name": "extensionId", + "in": "path", + "description": "Id of extension resource.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Extensions_Delete": { + "$ref": "./examples/Extensions_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateEndpointConnections": { + "get": { + "operationId": "PrivateEndpointConnections_ListByResource", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Get list of Private endpoint connections.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnectionListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PrivateEndpointConnections_ListByResource": { + "$ref": "./examples/PrivateEndpointConnections_ListByResource.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateEndpointConnections/{privateEndpointConnectionName}": { + "get": { + "operationId": "PrivateEndpointConnections_Get", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Get Private endpoint connection object.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "description": "Private endpoint connection name.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PrivateEndpointConnections_Get": { + "$ref": "./examples/PrivateEndpointConnections_Get.json" + } + } + }, + "put": { + "operationId": "PrivateEndpointConnections_CreateOrUpdate", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Approves or Rejects a Private endpoint connection request.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "description": "Private endpoint connection name.", + "required": true, + "type": "string" + }, + { + "name": "request", + "in": "body", + "description": "Request object.", + "required": true, + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + }, + "x-ms-client-name": "request" + } + ], + "responses": { + "200": { + "description": "Resource 'PrivateEndpointConnection' update operation succeeded", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "201": { + "description": "Resource 'PrivateEndpointConnection' create operation succeeded", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PrivateEndpointConnections_CreateOrUpdate": { + "$ref": "./examples/PrivateEndpointConnections_CreateOrUpdate.json" + } + } + }, + "delete": { + "operationId": "PrivateEndpointConnections_Delete", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Delete Private endpoint connection request.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "description": "Private endpoint connection name.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PrivateEndpointConnections_Delete": { + "$ref": "./examples/PrivateEndpointConnections_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateLinkResources": { + "get": { + "operationId": "PrivateLinkResources_ListByResource", + "tags": [ + "PrivateLinkResources" + ], + "description": "Get list of Private link resources.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PrivateLinkResourceListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PrivateLinkResources_ListByResource": { + "$ref": "./examples/PrivateLinkResources_ListByResource.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/privateLinkResources/{subResourceName}": { + "get": { + "operationId": "PrivateLinkResources_Get", + "tags": [ + "PrivateLinkResources" + ], + "description": "Get Private link resource object.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + }, + { + "name": "subResourceName", + "in": "path", + "description": "Sub resource name.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PrivateLinkResource" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PrivateLinkResources_Get": { + "$ref": "./examples/PrivateLinkResources_Get.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/solutions": { + "get": { + "operationId": "Solutions_List", + "tags": [ + "Solutions" + ], + "description": "Get installed Solutions details.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "solutionIds", + "in": "query", + "description": "Installed Solution ids.", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "ids", + "in": "query", + "description": "Ids of the resource.", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "names", + "in": "query", + "description": "Names of the resource.", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "propertyFilters", + "in": "query", + "description": "Filters on key-value pairs within the Properties object.\neg. \"{testKey} eq {testValue}\".", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "statuses", + "in": "query", + "description": "Statuses of the resource.", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + }, + { + "name": "minCreatedDateTime", + "in": "query", + "description": "Minimum creation date of resource (inclusive).", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "maxCreatedDateTime", + "in": "query", + "description": "Maximum creation date of resource (inclusive).", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "minLastModifiedDateTime", + "in": "query", + "description": "Minimum last modified date of resource (inclusive).", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "maxLastModifiedDateTime", + "in": "query", + "description": "Maximum last modified date of resource (inclusive).", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "$maxPageSize", + "in": "query", + "description": "Maximum number of items needed (inclusive).\nMinimum = 10, Maximum = 1000, Default value = 50.", + "required": false, + "type": "integer", + "format": "int32", + "default": 50, + "minimum": 10, + "maximum": 1000 + }, + { + "name": "$skipToken", + "in": "query", + "description": "Skip token for getting next set of results.", + "required": false, + "type": "string" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/SolutionListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Solutions_List": { + "$ref": "./examples/Solutions_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Azure.ResourceManager.AgFoodPlatform/farmBeats/{dataManagerForAgricultureResourceName}/solutions/{solutionId}": { + "get": { + "operationId": "Solutions_Get", + "tags": [ + "Solutions" + ], + "description": "Get installed Solution details by Solution id.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + }, + { + "name": "solutionId", + "in": "path", + "description": "SolutionId for Data Manager For Agriculture Resource.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Solution" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Solutions_Get": { + "$ref": "./examples/Solutions_Get.json" + } + } + }, + "put": { + "operationId": "Solutions_CreateOrUpdate", + "tags": [ + "Solutions" + ], + "description": "Install Or Update Solution.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + }, + { + "name": "solutionId", + "in": "path", + "description": "SolutionId for Data Manager For Agriculture Resource.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + { + "name": "requestBody", + "in": "body", + "description": "Solution resource request body.", + "required": true, + "schema": { + "$ref": "#/definitions/Solution" + }, + "x-ms-client-name": "requestBody" + } + ], + "responses": { + "200": { + "description": "Resource 'Solution' update operation succeeded", + "schema": { + "$ref": "#/definitions/Solution" + } + }, + "201": { + "description": "Resource 'Solution' create operation succeeded", + "schema": { + "$ref": "#/definitions/Solution" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Solutions_CreateOrUpdate": { + "$ref": "./examples/Solutions_CreateOrUpdate.json" + } + } + }, + "delete": { + "operationId": "Solutions_Delete", + "tags": [ + "Solutions" + ], + "description": "Uninstall Solution.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataManagerForAgricultureResourceName", + "in": "path", + "description": "DataManagerForAgriculture resource name.", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + }, + { + "name": "solutionId", + "in": "path", + "description": "SolutionId for Data Manager For Agriculture Resource.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Solutions_Delete": { + "$ref": "./examples/Solutions_Delete.json" + } + } + } + } + }, + "definitions": { + "ApiKeyAuthCredentials": { + "type": "object", + "description": "ApiKeyAuthCredentials class for ApiKey based Auth.", + "properties": { + "apiKey": { + "$ref": "#/definitions/KeyVaultProperties", + "description": "Properties of the key vault." + } + }, + "required": [ + "apiKey" + ], + "allOf": [ + { + "$ref": "#/definitions/AuthCredentials" + } + ], + "x-ms-discriminator-value": "ApiKeyAuthCredentials" + }, + "ApiProperties": { + "type": "object", + "description": "Api properties.", + "properties": { + "apiFreshnessTimeInMinutes": { + "type": "integer", + "format": "int32", + "description": "Interval in minutes for which the weather data for the api needs to be refreshed.", + "maximum": 10080 + } + } + }, + "ArmAsyncOperation": { + "type": "object", + "description": "Arm async operation class.\nRef: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/async-operations.", + "properties": { + "status": { + "type": "string", + "description": "Status of the async operation." + }, + "error": { + "$ref": "#/definitions/ArmAsyncOperationError", + "description": "Arm async operation error class.\nRef: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#azure-asyncoperation-resource-format." + } + } + }, + "ArmAsyncOperationError": { + "type": "object", + "description": "Arm async operation error class.\nRef: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#azure-asyncoperation-resource-format.", + "properties": { + "code": { + "type": "string", + "description": "Status of the async operation." + }, + "message": { + "type": "string", + "description": "Status of the async operation." + } + } + }, + "AuthCredentials": { + "type": "object", + "description": "AuthCredentials abstract base class for Auth Purpose.", + "properties": { + "kind": { + "type": "string", + "description": "Discriminator property for AuthCredentials." + } + }, + "discriminator": "kind", + "required": [ + "kind" + ] + }, + "Azure.ResourceManager.Foundations.CheckNameAvailabilityReason": { + "type": "string", + "description": "Possible reasons for a name not being available.", + "enum": [ + "Invalid", + "AlreadyExists" + ], + "x-ms-enum": { + "name": "CheckNameAvailabilityReason", + "modelAsString": true, + "values": [ + { + "name": "Invalid", + "value": "Invalid", + "description": "Name is invalid." + }, + { + "name": "AlreadyExists", + "value": "AlreadyExists", + "description": "Name already exists." + } + ] + } + }, + "CheckNameAvailabilityRequest": { + "type": "object", + "description": "The check availability request body.", + "properties": { + "name": { + "type": "string", + "description": "The name of the resource for which availability needs to be checked." + }, + "type": { + "type": "string", + "description": "The resource type." + } + } + }, + "CheckNameAvailabilityResponse": { + "type": "object", + "description": "The check availability result.", + "properties": { + "nameAvailable": { + "type": "boolean", + "description": "Indicates if the resource name is available." + }, + "reason": { + "$ref": "#/definitions/Azure.ResourceManager.Foundations.CheckNameAvailabilityReason", + "description": "The reason why the given name is not available." + }, + "message": { + "type": "string", + "description": "Detailed reason why the given name is available." + } + } + }, + "DataConnector": { + "type": "object", + "description": "DataConnector Model.", + "properties": { + "properties": { + "$ref": "#/definitions/DataConnectorProperties", + "description": "DataConnector Properties.", + "x-ms-client-flatten": true + }, + "eTag": { + "type": "string", + "description": "If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.", + "readOnly": true + } + }, + "required": [ + "properties" + ], + "allOf": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ProxyResource" + } + ] + }, + "DataConnectorListResult": { + "type": "object", + "description": "The response of a DataConnector list operation.", + "properties": { + "value": { + "type": "array", + "description": "The DataConnector items on this page", + "items": { + "$ref": "#/definitions/DataConnector" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "DataConnectorProperties": { + "type": "object", + "description": "DataConnector Properties.", + "properties": { + "credentials": { + "$ref": "#/definitions/AuthCredentials", + "description": "AuthCredentials abstract base class for Auth Purpose." + } + }, + "required": [ + "credentials" + ] + }, + "DataManagerForAgriculture": { + "type": "object", + "description": "Data Manager For Agriculture ARM Resource.", + "properties": { + "properties": { + "$ref": "#/definitions/DataManagerForAgricultureProperties", + "description": "Data Manager For Agriculture ARM Resource properties.", + "x-ms-client-flatten": true + }, + "identity": { + "$ref": "../../common-types/resource-management/v4/managedidentity.json#/definitions/ManagedServiceIdentity", + "description": "The managed service identities assigned to this resource." + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/TrackedResource" + } + ] + }, + "DataManagerForAgricultureExtension": { + "type": "object", + "description": "DataManagerForAgriculture extension resource.", + "properties": { + "properties": { + "$ref": "#/definitions/DataManagerForAgricultureExtensionProperties", + "description": "DataManagerForAgricultureExtension properties.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ProxyResource" + } + ] + }, + "DataManagerForAgricultureExtensionListResult": { + "type": "object", + "description": "The response of a DataManagerForAgricultureExtension list operation.", + "properties": { + "value": { + "type": "array", + "description": "The DataManagerForAgricultureExtension items on this page", + "items": { + "$ref": "#/definitions/DataManagerForAgricultureExtension" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "DataManagerForAgricultureExtensionProperties": { + "type": "object", + "description": "DataManagerForAgricultureExtension properties.", + "properties": { + "targetResourceType": { + "type": "string", + "description": "Target ResourceType of the Data Manager For Agriculture Extension.", + "readOnly": true + }, + "farmBeatsExtensionId": { + "type": "string", + "description": "Data Manager For Agriculture Extension ID.", + "minLength": 2, + "maxLength": 100, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$", + "readOnly": true + }, + "farmBeatsExtensionName": { + "type": "string", + "description": "Data Manager For Agriculture Extension name.", + "minLength": 2, + "maxLength": 100, + "readOnly": true + }, + "farmBeatsExtensionVersion": { + "type": "string", + "description": "Data Manager For Agriculture Extension version.", + "minLength": 2, + "maxLength": 100, + "pattern": "^([1-9]|10).\\d$", + "readOnly": true + }, + "publisherId": { + "type": "string", + "description": "Publisher ID.", + "minLength": 2, + "maxLength": 100, + "readOnly": true + }, + "description": { + "type": "string", + "description": "Textual description.", + "minLength": 2, + "maxLength": 500, + "readOnly": true + }, + "extensionCategory": { + "type": "string", + "description": "Category of the extension. e.g. weather/sensor/satellite.", + "minLength": 2, + "maxLength": 100, + "readOnly": true + }, + "extensionAuthLink": { + "type": "string", + "description": "Data Manager For Agriculture Extension auth link.", + "readOnly": true + }, + "extensionApiDocsLink": { + "type": "string", + "description": "Data Manager For Agriculture Extension api docs link.", + "readOnly": true + }, + "detailedInformation": { + "type": "array", + "description": "Detailed information which shows summary of requested data.\nUsed in descriptive get extension metadata call.\nInformation for weather category per api included are apisSupported,\ncustomParameters, PlatformParameters and Units supported.", + "items": { + "$ref": "#/definitions/DetailedInformation" + }, + "readOnly": true, + "x-ms-identifiers": [] + } + } + }, + "DataManagerForAgricultureListResult": { + "type": "object", + "description": "The response of a DataManagerForAgriculture list operation.", + "properties": { + "value": { + "type": "array", + "description": "The DataManagerForAgriculture items on this page", + "items": { + "$ref": "#/definitions/DataManagerForAgriculture" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "DataManagerForAgricultureProperties": { + "type": "object", + "description": "Data Manager For Agriculture ARM Resource properties.", + "properties": { + "instanceUri": { + "type": "string", + "format": "uri", + "description": "Uri of the Data Manager For Agriculture instance.", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Data Manager For Agriculture instance provisioning state.", + "readOnly": true + }, + "sensorIntegration": { + "$ref": "#/definitions/SensorIntegration", + "description": "Sensor integration request model." + }, + "publicNetworkAccess": { + "$ref": "#/definitions/PublicNetworkAccess", + "description": "Property to allow or block public traffic for an Azure Data Manager For Agriculture resource." + }, + "privateEndpointConnections": { + "type": "array", + "description": "Private endpoints.", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + }, + "readOnly": true + } + } + }, + "DataManagerForAgricultureSolution": { + "type": "object", + "description": "DataManagerForAgriculture solution resource.", + "properties": { + "properties": { + "$ref": "#/definitions/DataManagerForAgricultureSolutionProperties", + "description": "DataManagerForAgricultureSolution properties.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ProxyResource" + } + ] + }, + "DataManagerForAgricultureSolutionListResult": { + "type": "object", + "description": "The response of a DataManagerForAgricultureSolution list operation.", + "properties": { + "value": { + "type": "array", + "description": "The DataManagerForAgricultureSolution items on this page", + "items": { + "$ref": "#/definitions/DataManagerForAgricultureSolution" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "DataManagerForAgricultureSolutionProperties": { + "type": "object", + "description": "DataManagerForAgricultureSolution properties.", + "properties": { + "partnerId": { + "type": "string", + "description": "Solution Partner Id.", + "readOnly": true + }, + "partnerTenantId": { + "type": "string", + "description": "Solution Partner Tenant Id.", + "readOnly": true + }, + "dataAccessScopes": { + "type": "array", + "description": "Gets scope of the Data manager For Agriculture data access that's required for processing solution request to partner.\nExample: For gdd they might need weatherScope and satelliteScope.", + "items": { + "type": "string" + }, + "readOnly": true + }, + "marketplaceOfferDetails": { + "$ref": "#/definitions/MarketplaceOfferDetails" + }, + "openApiSpecsDictionary": { + "type": "object", + "description": "Gets api-version Swagger Document Dictionary to capture all api-versions of swagger exposed by partner to Data Manager For Agriculture.", + "additionalProperties": {}, + "readOnly": true + }, + "accessFBApplicationId": { + "type": "string", + "description": "Application id of the multi tenant application to be used by partner to access Data Manager For Agriculture data.", + "readOnly": true + }, + "saaSApplicationId": { + "type": "string", + "description": "Application id of the SaaS multi tenant application.", + "readOnly": true + }, + "actionIds": { + "type": "array", + "description": "List of ActionIds needed to make the SaaS multi tenant application access relevant fb data.", + "items": { + "type": "string" + }, + "readOnly": true + }, + "roleId": { + "type": "string", + "description": "Role Id of the SaaS multi tenant application to access relevant fb data.", + "readOnly": true + }, + "roleName": { + "type": "string", + "description": "Role Name of the SaaS multi tenant application to access relevant fb data.", + "readOnly": true + }, + "accessFBApplicationName": { + "type": "string", + "description": "Application name of the multi tenant application to be used by partner to access Data Manager For Agriculture Data.", + "readOnly": true + } + } + }, + "DataManagerForAgricultureUpdateProperties": { + "type": "object", + "description": "Data Manager For Agriculture ARM Resource properties.", + "properties": { + "sensorIntegration": { + "$ref": "#/definitions/SensorIntegration", + "description": "Sensor integration request model." + }, + "publicNetworkAccess": { + "$ref": "#/definitions/PublicNetworkAccess", + "description": "Property to allow or block public traffic for an Azure Data Manager For Agriculture resource." + } + } + }, + "DataManagerForAgricultureUpdateRequestModel": { + "type": "object", + "description": "DataManagerForAgriculture update request.", + "properties": { + "location": { + "type": "string", + "description": "Geo-location where the resource lives." + }, + "identity": { + "$ref": "#/definitions/Identity", + "description": "Identity for the resource." + }, + "properties": { + "$ref": "#/definitions/DataManagerForAgricultureUpdateProperties", + "description": "Data Manager For Agriculture ARM Resource properties." + }, + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "DetailedInformation": { + "type": "object", + "description": "Model to capture detailed information for Data Manager For AgricultureExtensions.", + "properties": { + "apiName": { + "type": "string", + "description": "ApiName available for the Data Manager For Agriculture Extension." + }, + "apiDocsLink": { + "type": "string", + "description": "Extension provider's API documentation link." + }, + "apiType": { + "type": "string", + "description": "Type of Api in Extension." + }, + "customParameters": { + "type": "array", + "description": "List of customParameters.", + "items": { + "type": "string" + } + }, + "platformParameters": { + "type": "array", + "description": "List of platformParameters.", + "items": { + "type": "string" + } + }, + "apiDefaultInputParameters": { + "type": "array", + "description": "List of defaultParameters.", + "items": { + "type": "string" + } + }, + "unitsSupported": { + "$ref": "#/definitions/UnitSystemsInfo", + "description": "Unit systems info for the data provider." + }, + "apiInputParameters": { + "type": "array", + "description": "List of apiInputParameters.", + "items": { + "type": "string" + } + } + } + }, + "Extension": { + "type": "object", + "description": "Extension resource.", + "properties": { + "properties": { + "$ref": "#/definitions/ExtensionProperties", + "description": "Extension resource properties.", + "x-ms-client-flatten": true + }, + "eTag": { + "type": "string", + "description": "If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ProxyResource" + } + ] + }, + "ExtensionListResult": { + "type": "object", + "description": "The response of a Extension list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Extension items on this page", + "items": { + "$ref": "#/definitions/Extension" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "ExtensionProperties": { + "type": "object", + "description": "Extension resource properties.", + "properties": { + "extensionId": { + "type": "string", + "description": "Extension Id.", + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$", + "readOnly": true + }, + "extensionCategory": { + "type": "string", + "description": "Extension category. e.g. weather/sensor/satellite.", + "readOnly": true + }, + "installedExtensionVersion": { + "type": "string", + "description": "Installed extension version.", + "pattern": "^([1-9]|10).\\d$", + "readOnly": true + }, + "extensionAuthLink": { + "type": "string", + "description": "Extension auth link.", + "readOnly": true + }, + "extensionApiDocsLink": { + "type": "string", + "description": "Extension api docs link.", + "readOnly": true + }, + "additionalApiProperties": { + "type": "object", + "description": "Additional Api Properties.", + "additionalProperties": { + "$ref": "#/definitions/ApiProperties" + }, + "readOnly": true + } + } + }, + "Identity": { + "type": "object", + "description": "Identity for the resource.", + "properties": { + "principalId": { + "type": "string", + "description": "The principal ID of resource identity. The value must be an UUID.", + "readOnly": true + }, + "tenantId": { + "type": "string", + "description": "The tenant ID of resource. The value must be an UUID.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "The identity type.", + "enum": [ + "SystemAssigned" + ], + "x-ms-enum": { + "modelAsString": false + } + } + } + }, + "KeyVaultProperties": { + "type": "object", + "description": "Properties of the key vault.", + "properties": { + "keyVaultUri": { + "type": "string", + "description": "Uri of the key vault.", + "minLength": 1 + }, + "keyName": { + "type": "string", + "description": "Name of Key Vault key.", + "minLength": 1 + }, + "keyVersion": { + "type": "string", + "description": "Version of Key Vault key.", + "minLength": 1 + } + }, + "required": [ + "keyVaultUri", + "keyName", + "keyVersion" + ] + }, + "MarketplaceOfferDetails": { + "type": "object", + "properties": { + "saasOfferId": { + "type": "string" + }, + "publisherId": { + "type": "string" + } + } + }, + "OAuthClientCredentials": { + "type": "object", + "description": "OAuthClientCredentials for clientId clientSecret auth.", + "properties": { + "clientId": { + "type": "string", + "description": "ClientId associated with the provider.", + "minLength": 1 + }, + "clientSecret": { + "$ref": "#/definitions/KeyVaultProperties", + "description": "Properties of the key vault." + } + }, + "required": [ + "clientId", + "clientSecret" + ], + "allOf": [ + { + "$ref": "#/definitions/AuthCredentials" + } + ], + "x-ms-discriminator-value": "OAuthClientCredentials" + }, + "PrivateEndpoint": { + "type": "object", + "description": "The private endpoint resource.", + "properties": { + "id": { + "type": "string", + "description": "The ARM identifier for private endpoint.", + "readOnly": true + } + } + }, + "PrivateEndpointConnection": { + "type": "object", + "description": "The private endpoint connection resource.", + "properties": { + "properties": { + "$ref": "#/definitions/PrivateEndpointConnectionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ProxyResource" + } + ] + }, + "PrivateEndpointConnectionListResult": { + "type": "object", + "description": "The response of a PrivateEndpointConnection list operation.", + "properties": { + "value": { + "type": "array", + "description": "The PrivateEndpointConnection items on this page", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "PrivateEndpointConnectionProperties": { + "type": "object", + "description": "Properties of the private endpoint connection.", + "properties": { + "groupIds": { + "type": "array", + "description": "The group ids for the private endpoint resource.", + "items": { + "type": "string" + }, + "readOnly": true + }, + "privateEndpoint": { + "$ref": "#/definitions/PrivateEndpoint", + "description": "The private endpoint resource." + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/PrivateLinkServiceConnectionState", + "description": "A collection of information about the state of the connection between service consumer and provider." + }, + "provisioningState": { + "$ref": "#/definitions/PrivateEndpointConnectionProvisioningState", + "description": "The provisioning state of the private endpoint connection resource.", + "readOnly": true + } + }, + "required": [ + "privateLinkServiceConnectionState" + ] + }, + "PrivateEndpointConnectionProvisioningState": { + "type": "string", + "description": "The current provisioning state.", + "enum": [ + "Succeeded", + "Creating", + "Deleting", + "Failed" + ], + "x-ms-enum": { + "name": "PrivateEndpointConnectionProvisioningState", + "modelAsString": true + }, + "readOnly": true + }, + "PrivateEndpointServiceConnectionStatus": { + "type": "string", + "description": "The private endpoint connection status.", + "enum": [ + "Pending", + "Approved", + "Rejected" + ], + "x-ms-enum": { + "name": "PrivateEndpointServiceConnectionStatus", + "modelAsString": true + } + }, + "PrivateLinkResource": { + "type": "object", + "description": "A private link resource.", + "properties": { + "properties": { + "$ref": "#/definitions/PrivateLinkResourceProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ProxyResource" + } + ] + }, + "PrivateLinkResourceListResult": { + "type": "object", + "description": "The response of a PrivateLinkResource list operation.", + "properties": { + "value": { + "type": "array", + "description": "The PrivateLinkResource items on this page", + "items": { + "$ref": "#/definitions/PrivateLinkResource" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "PrivateLinkResourceProperties": { + "type": "object", + "description": "Properties of a private link resource.", + "properties": { + "groupId": { + "type": "string", + "description": "The private link resource group id.", + "readOnly": true + }, + "requiredMembers": { + "type": "array", + "description": "The private link resource required member names.", + "items": { + "type": "string" + }, + "readOnly": true + }, + "requiredZoneNames": { + "type": "array", + "description": "The private link resource private link DNS zone name.", + "items": { + "type": "string" + } + } + } + }, + "PrivateLinkServiceConnectionState": { + "type": "object", + "description": "A collection of information about the state of the connection between service consumer and provider.", + "properties": { + "status": { + "$ref": "#/definitions/PrivateEndpointServiceConnectionStatus", + "description": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service." + }, + "description": { + "type": "string", + "description": "The reason for approval/rejection of the connection." + }, + "actionsRequired": { + "type": "string", + "description": "A message indicating if changes on the service provider require any updates on the consumer." + } + } + }, + "ProvisioningState": { + "type": "string", + "description": "Data Manager For Agriculture instance provisioning state.", + "enum": [ + "Creating", + "Updating", + "Deleting", + "Succeeded", + "Failed", + "Running" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + }, + "readOnly": true + }, + "PublicNetworkAccess": { + "type": "string", + "description": "Property to allow or block public traffic for an Azure Data Manager For Agriculture resource.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "PublicNetworkAccess", + "modelAsString": true + } + }, + "SensorIntegration": { + "type": "object", + "description": "Sensor integration request model.", + "properties": { + "enabled": { + "type": "string", + "description": "Sensor integration enable state." + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Sensor integration instance provisioning state.", + "readOnly": true + }, + "provisioningInfo": { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse", + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)." + } + } + }, + "Solution": { + "type": "object", + "description": "Solution resource.", + "properties": { + "properties": { + "$ref": "#/definitions/SolutionProperties", + "description": "Solution resource properties.", + "x-ms-client-flatten": true + }, + "eTag": { + "type": "string", + "description": "If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v4/types.json#/definitions/ProxyResource" + } + ] + }, + "SolutionListResult": { + "type": "object", + "description": "The response of a Solution list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Solution items on this page", + "items": { + "$ref": "#/definitions/Solution" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "SolutionProperties": { + "type": "object", + "description": "Solution resource properties.", + "properties": { + "partnerId": { + "type": "string", + "description": "Partner Id of the Solution.", + "readOnly": true + }, + "saasSubscriptionId": { + "type": "string", + "description": "SaaS subscriptionId of the installed SaaS application.", + "minLength": 1 + }, + "saasSubscriptionName": { + "type": "string", + "description": "SaaS subscription name of the installed SaaS application.", + "minLength": 1 + }, + "marketplacePublisherId": { + "type": "string", + "description": "SaaS application Marketplace Publisher Id.", + "minLength": 1 + }, + "planId": { + "type": "string", + "description": "SaaS application Plan Id.", + "minLength": 1 + }, + "roleAssignmentId": { + "type": "string", + "description": "Role Assignment Id." + }, + "offerId": { + "type": "string", + "description": "SaaS application Offer Id.", + "minLength": 1 + }, + "termId": { + "type": "string", + "description": "SaaS application Term Id.", + "minLength": 1 + } + }, + "required": [ + "saasSubscriptionId", + "saasSubscriptionName", + "marketplacePublisherId", + "planId", + "offerId", + "termId" + ], + "allOf": [ + { + "type": "object", + "additionalProperties": {} + } + ] + }, + "UnitSystemsInfo": { + "type": "object", + "description": "Unit systems info for the data provider.", + "properties": { + "key": { + "type": "string", + "description": "UnitSystem key sent as part of ProviderInput.", + "minLength": 1, + "maxLength": 100 + }, + "values": { + "type": "array", + "description": "List of unit systems supported by this data provider.", + "items": { + "type": "string" + } + } + }, + "required": [ + "key", + "values" + ] + } + }, + "parameters": {} +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp index 2e63191f49..a70cdc0a50 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp @@ -87,7 +87,7 @@ interface DataConnectors { } @@encodedName(DataConnectors.createOrUpdate::parameters.resource, - "json", + "application/json", "body" ); @@extension(DataConnectors.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp index 92e3fcfec2..11605b34a4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp @@ -112,7 +112,7 @@ interface DataManagerForAgricultures { } @@encodedName(DataManagerForAgricultures.createOrUpdate::parameters.resource, - "json", + "application/json", "request" ); @@extension(DataManagerForAgricultures.createOrUpdate::parameters.resource, @@ -123,7 +123,7 @@ interface DataManagerForAgricultures { "Data Manager For Agriculture resource create or update request object." ); @@encodedName(DataManagerForAgricultures.update::parameters.properties, - "json", + "application/json", "request" ); @@extension(DataManagerForAgricultures.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp index e96d2037eb..25b785ac1d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp @@ -103,7 +103,7 @@ interface Extensions { } @@encodedName(Extensions.createOrUpdate::parameters.resource, - "json", + "application/json", "requestBody" ); @@extension(Extensions.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp index c791e58643..4362df2db9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp @@ -65,7 +65,7 @@ interface PrivateEndpointConnections { } @@encodedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, - "json", + "application/json", "request" ); @@extension(PrivateEndpointConnections.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp index b15ee35b2d..047461bc7f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp @@ -156,7 +156,7 @@ interface Solutions { } @@encodedName(Solutions.createOrUpdate::parameters.resource, - "json", + "application/json", "requestBody" ); @@extension(Solutions.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp index 88b0b78cde..2c21ec30b0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp @@ -14,8 +14,12 @@ namespace Azure.ResourceManager.AlertsManagement; /** * An alert created in alert management service. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource -model Alert is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(AlertProperties) +model Alert extends ProxyResourceBase { /** * Unique ID of an alert instance. */ @@ -24,6 +28,12 @@ model Alert is ProxyResource { @segment("alerts") @visibility("read") name: string; + + /** + * Alert property bag + */ + @extension("x-ms-client-flatten", true) + properties?: AlertProperties; } @armResourceOperations @@ -36,6 +46,8 @@ interface Alerts { /** * List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Alerts_GetAll") getAll is ArmResourceListByParent< Alert, { @@ -181,4 +193,9 @@ interface Alerts { ): ArmResponse | ErrorResponse; } +@@encodedName(Alerts.changeState::parameters.body, + "application/json", + "comment" +); +@@extension(Alerts.changeState::parameters.body, "x-ms-client-name", "comment"); @@doc(Alerts.changeState::parameters.body, "reason of change alert state"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp index 0752fe4392..cc4a930fc3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp @@ -14,7 +14,13 @@ namespace Azure.ResourceManager.AlertsManagement; /** * Alert processing rule object containing target scopes, conditions and scheduling logic. */ -model AlertProcessingRule is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + AlertProcessingRuleProperties +) +model AlertProcessingRule extends TrackedResourceBase { /** * The name of the alert processing rule that needs to be fetched. */ @@ -23,6 +29,12 @@ model AlertProcessingRule is TrackedResource { @segment("actionRules") @visibility("read") name: string; + + /** + * Alert processing rule properties. + */ + @extension("x-ms-client-flatten", true) + properties?: AlertProcessingRuleProperties; } @armResourceOperations @@ -51,6 +63,8 @@ interface AlertProcessingRules { /** * List all alert processing rules in a resource group. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("AlertProcessingRules_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; /** @@ -59,9 +73,25 @@ interface AlertProcessingRules { listBySubscription is ArmListBySubscription; } +@@encodedName(AlertProcessingRules.createOrUpdate::parameters.resource, + "application/json", + "alertProcessingRule" +); +@@extension(AlertProcessingRules.createOrUpdate::parameters.resource, + "x-ms-client-name", + "alertProcessingRule" +); @@doc(AlertProcessingRules.createOrUpdate::parameters.resource, "Alert processing rule to be created/updated." ); +@@encodedName(AlertProcessingRules.update::parameters.properties, + "application/json", + "alertProcessingRulePatch" +); +@@extension(AlertProcessingRules.update::parameters.properties, + "x-ms-client-name", + "alertProcessingRulePatch" +); @@doc(AlertProcessingRules.update::parameters.properties, "Parameters supplied to the operation." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp index b850bb8b16..399a6fb84a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp @@ -14,8 +14,12 @@ namespace Azure.ResourceManager.AlertsManagement; /** * Set of related alerts grouped together smartly by AMS. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource -model SmartGroup is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(SmartGroupProperties) +model SmartGroup extends ProxyResourceBase { /** * Smart group unique id. */ @@ -24,6 +28,12 @@ model SmartGroup is ProxyResource { @segment("smartGroups") @visibility("read") name: string; + + /** + * Properties of smart group. + */ + @extension("x-ms-client-flatten", true) + properties?: SmartGroupProperties; } @armResourceOperations @@ -36,6 +46,8 @@ interface SmartGroups { /** * List all the Smart Groups within a specified subscription. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("SmartGroups_GetAll") getAll is ArmResourceListByParent< SmartGroup, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp index 6e8e338b27..462854f91a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp @@ -164,7 +164,7 @@ interface AnalysisServicesServers { } @@encodedName(AnalysisServicesServers.create::parameters.resource, - "json", + "application/json", "serverParameters" ); @@extension(AnalysisServicesServers.create::parameters.resource, @@ -175,7 +175,7 @@ interface AnalysisServicesServers { "Contains the information used to provision the Analysis Services server." ); @@encodedName(AnalysisServicesServers.update::parameters.properties, - "json", + "application/json", "serverUpdateParameters" ); @@extension(AnalysisServicesServers.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp index 7b359a309e..251cc83a38 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Tenant Settings. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model AccessInformationContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + AccessInformationContractProperties +) +model AccessInformationContract extends ProxyResourceBase { /** * The identifier of the Access configuration. */ @@ -26,6 +31,12 @@ model AccessInformationContract @segment("tenant") @visibility("read") name: AccessIdName; + + /** + * AccessInformation entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: AccessInformationContractProperties; } @armResourceOperations @@ -33,12 +44,16 @@ interface AccessInformationContracts { /** * Get tenant access information details without secrets. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantAccess_Get") get is ArmResourceRead; /** * Tenant access metadata */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("TenantAccess_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< AccessInformationContract, @@ -49,6 +64,8 @@ interface AccessInformationContracts { /** * Update tenant access information details. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantAccess_Create") create is ArmResourceCreateOrReplaceSync< AccessInformationContract, { @@ -65,7 +82,9 @@ interface AccessInformationContracts { /** * Update tenant access information details. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("TenantAccess_Update") update is ArmCustomPatchSync< AccessInformationContract, AccessInformationUpdateParameters, @@ -83,6 +102,8 @@ interface AccessInformationContracts { /** * Returns list of access infos - for Git and Management endpoints. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantAccess_ListByService") listByService is ArmResourceListByParent< AccessInformationContract, { @@ -99,6 +120,8 @@ interface AccessInformationContracts { /** * Regenerate primary access key */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantAccess_RegeneratePrimaryKey") regeneratePrimaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void @@ -107,6 +130,8 @@ interface AccessInformationContracts { /** * Regenerate secondary access key */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantAccess_RegenerateSecondaryKey") regenerateSecondaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void @@ -115,6 +140,8 @@ interface AccessInformationContracts { /** * Get tenant access information details. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantAccess_ListSecrets") listSecrets is ArmResourceActionSync< AccessInformationContract, void, @@ -124,6 +151,8 @@ interface AccessInformationContracts { /** * Regenerate primary access key for GIT. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantAccessGit_RegeneratePrimaryKey") regeneratePrimaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void @@ -132,15 +161,33 @@ interface AccessInformationContracts { /** * Regenerate secondary access key for GIT. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantAccessGit_RegenerateSecondaryKey") regenerateSecondaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void >; } +@@encodedName(AccessInformationContracts.create::parameters.resource, + "application/json", + "parameters" +); +@@extension(AccessInformationContracts.create::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(AccessInformationContracts.create::parameters.resource, "Parameters supplied to retrieve the Tenant Access Information." ); +@@encodedName(AccessInformationContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(AccessInformationContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(AccessInformationContracts.update::parameters.properties, "Parameters supplied to retrieve the Tenant Access Information." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp index cea3673015..dd0052e2ea 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * API details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model ApiContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ApiContractProperties) +model ApiContract extends ProxyResourceBase { /** * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. */ @@ -28,6 +32,12 @@ model ApiContract is ProxyResource { @segment("apis") @visibility("read") name: string; + + /** + * API entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: ApiContractProperties; } @armResourceOperations @@ -35,12 +45,16 @@ interface ApiContracts { /** * Gets the details of the API specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Api_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the API specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("Api_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; @@ -48,6 +62,8 @@ interface ApiContracts { /** * Creates new or updates existing specified API of the API Management service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Api_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync< ApiContract, { @@ -64,7 +80,9 @@ interface ApiContracts { /** * Updates the specified API of the API Management service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("Api_Update") update is ArmCustomPatchSync< ApiContract, ApiUpdateContract, @@ -82,6 +100,8 @@ interface ApiContracts { /** * Deletes the specified API of the API Management service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Api_Delete") delete is ArmResourceDeleteSync< ApiContract, { @@ -104,6 +124,8 @@ interface ApiContracts { /** * Lists all APIs of the API Management service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Api_ListByService") listByService is ArmResourceListByParent< ApiContract, { @@ -146,6 +168,8 @@ interface ApiContracts { * Lists all revisions of an API. */ // FIXME: ApiRevision_ListByService could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiRevision_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions") @get listByService( @@ -195,6 +219,8 @@ interface ApiContracts { * Lists all Products, which the API is part of. */ // FIXME: ApiProduct_ListByApis could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiProduct_ListByApis") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products") @get listByApis( @@ -244,6 +270,8 @@ interface ApiContracts { * Lists a collection of operations associated with tags. */ // FIXME: Operation_ListByTags could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Operation_ListByTags") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags") @get listByTags( @@ -297,9 +325,25 @@ interface ApiContracts { ): ArmResponse | ErrorResponse; } +@@encodedName(ApiContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(ApiContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(ApiContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); +@@encodedName(ApiContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(ApiContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(ApiContracts.update::parameters.properties, "API Update Contract parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp index 695ec39312..7aeea30950 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp @@ -14,8 +14,13 @@ namespace Azure.ResourceManager.ApiManagement; /** * A single API Management service resource in List or Get response. */ -model ApiManagementServiceResource - is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + ApiManagementServiceProperties +) +model ApiManagementServiceResource extends TrackedResourceBase { /** * The name of the API Management service. */ @@ -39,6 +44,12 @@ model ApiManagementServiceResource */ zones?: string[]; + /** + * Properties of the API Management service. + */ + @extension("x-ms-client-flatten", true) + properties: ApiManagementServiceProperties; + ...Azure.ResourceManager.ManagedServiceIdentity; ...Azure.ResourceManager.ResourceSku; } @@ -48,17 +59,23 @@ interface ApiManagementServiceResources { /** * Gets an API Management service resource description. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiManagementService_Get") get is ArmResourceRead; /** * Creates or updates an API Management service. This is long running operation and could take several minutes to complete. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiManagementService_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Updates an existing API Management service. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("ApiManagementService_Update") update is ArmCustomPatchAsync< ApiManagementServiceResource, ApiManagementServiceUpdateParameters @@ -67,21 +84,29 @@ interface ApiManagementServiceResources { /** * Deletes an existing API Management service. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiManagementService_Delete") delete is ArmResourceDeleteAsync; /** * List all API Management services within a resource group. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiManagementService_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; /** * Lists all API Management services within an Azure subscription. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiManagementService_List") list is ArmListBySubscription; /** * Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PerformConnectivityCheckAsync") performConnectivityCheckAsync is ArmResourceActionAsync< ApiManagementServiceResource, ConnectivityCheckRequest, @@ -91,6 +116,8 @@ interface ApiManagementServiceResources { /** * Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiManagementService_Restore") restore is ArmResourceActionAsync< ApiManagementServiceResource, ApiManagementServiceBackupRestoreParameters, @@ -100,6 +127,8 @@ interface ApiManagementServiceResources { /** * Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiManagementService_Backup") backup is ArmResourceActionAsync< ApiManagementServiceResource, ApiManagementServiceBackupRestoreParameters, @@ -109,6 +138,8 @@ interface ApiManagementServiceResources { /** * Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiManagementService_GetSsoToken") getSsoToken is ArmResourceActionSync< ApiManagementServiceResource, void, @@ -118,6 +149,8 @@ interface ApiManagementServiceResources { /** * Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiManagementService_ApplyNetworkConfigurationUpdates") applyNetworkConfigurationUpdates is ArmResourceActionAsync< ApiManagementServiceResource, ApiManagementServiceApplyNetworkConfigurationParameters, @@ -127,6 +160,8 @@ interface ApiManagementServiceResources { /** * This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantConfiguration_Deploy") deploy is ArmResourceActionAsync< ApiManagementServiceResource, DeployConfigurationParameters, @@ -145,6 +180,8 @@ interface ApiManagementServiceResources { /** * This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantConfiguration_Save") save is ArmResourceActionAsync< ApiManagementServiceResource, SaveConfigurationParameter, @@ -163,6 +200,8 @@ interface ApiManagementServiceResources { /** * This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantConfiguration_Validate") validate is ArmResourceActionAsync< ApiManagementServiceResource, DeployConfigurationParameters, @@ -181,6 +220,8 @@ interface ApiManagementServiceResources { /** * Checks availability and correctness of a name for an API Management service. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiManagementService_CheckNameAvailability") checkNameAvailability is checkGlobalNameAvailability< ApiManagementServiceCheckNameAvailabilityParameters, ApiManagementServiceNameAvailabilityResult @@ -190,6 +231,8 @@ interface ApiManagementServiceResources { * Lists a collection of apis associated with tags. */ // FIXME: Api_ListByTags could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Api_ListByTags") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags") @get listByTags( @@ -237,6 +280,8 @@ interface ApiManagementServiceResources { * Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints. */ // FIXME: ContentType_ListByService could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ContentType_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes") @get listByService( @@ -259,6 +304,8 @@ interface ApiManagementServiceResources { * Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints. */ // FIXME: ContentType_Get could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ContentType_Get") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}") @get get( @@ -289,6 +336,8 @@ interface ApiManagementServiceResources { * Lists developer portal's content items specified by the provided content type. */ // FIXME: ContentItem_ListByService could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ContentItem_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems") @get listByService( @@ -319,6 +368,8 @@ interface ApiManagementServiceResources { * Returns the developer portal's content item specified by its identifier. */ // FIXME: ContentItem_Get could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ContentItem_Get") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}") @get get( @@ -357,6 +408,8 @@ interface ApiManagementServiceResources { * Gets all available SKU for a given API Management service */ // FIXME: ApiManagementServiceSkus_ListAvailableServiceSkus could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiManagementServiceSkus_ListAvailableServiceSkus") @summary("Gets available SKUs for API Management service") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus") @get @@ -380,6 +433,8 @@ interface ApiManagementServiceResources { * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. */ // FIXME: NetworkStatus_ListByService could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NetworkStatus_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus") @get listByService( @@ -401,6 +456,8 @@ interface ApiManagementServiceResources { * Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService. */ // FIXME: NetworkStatus_ListByLocation could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NetworkStatus_ListByLocation") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus") @get listByLocation( @@ -429,6 +486,8 @@ interface ApiManagementServiceResources { * Gets the network endpoints of all outbound dependencies of a ApiManagement service. */ // FIXME: OutboundNetworkDependenciesEndpoints_ListByService could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("OutboundNetworkDependenciesEndpoints_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints") @get listByService( @@ -450,6 +509,8 @@ interface ApiManagementServiceResources { * Lists all policy descriptions. */ // FIXME: PolicyDescription_ListByService could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PolicyDescription_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions") @get listByService( @@ -478,6 +539,8 @@ interface ApiManagementServiceResources { * Lists a collection of portalsettings defined within a service instance.. */ // FIXME: PortalSettings_ListByService could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PortalSettings_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings") @get listByService( @@ -500,6 +563,8 @@ interface ApiManagementServiceResources { * Lists a collection of products associated with tags. */ // FIXME: Product_ListByTags could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Product_ListByTags") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags") @get listByTags( @@ -547,6 +612,8 @@ interface ApiManagementServiceResources { * Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. */ // FIXME: QuotaByCounterKeys_ListByService could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("QuotaByCounterKeys_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}") @get listByService( @@ -573,6 +640,8 @@ interface ApiManagementServiceResources { * Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. */ // FIXME: QuotaByPeriodKeys_Get could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("QuotaByPeriodKeys_Get") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}/periods/{quotaPeriodKey}") @get get( @@ -605,6 +674,8 @@ interface ApiManagementServiceResources { * Lists all azure regions in which the service exists. */ // FIXME: Region_ListByService could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Region_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions") @get listByService( @@ -627,6 +698,8 @@ interface ApiManagementServiceResources { * Lists report records by API. */ // FIXME: Reports_ListByApi could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByApi") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi") @get listByApi( @@ -674,6 +747,8 @@ interface ApiManagementServiceResources { * Lists report records by User. */ // FIXME: Reports_ListByUser could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByUser") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser") @get listByUser( @@ -721,6 +796,8 @@ interface ApiManagementServiceResources { * Lists report records by API Operations. */ // FIXME: Reports_ListByOperation could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByOperation") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation") @get listByOperation( @@ -768,6 +845,8 @@ interface ApiManagementServiceResources { * Lists report records by Product. */ // FIXME: Reports_ListByProduct could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByProduct") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct") @get listByProduct( @@ -815,6 +894,8 @@ interface ApiManagementServiceResources { * Lists report records by geography. */ // FIXME: Reports_ListByGeo could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByGeo") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo") @get listByGeo( @@ -856,6 +937,8 @@ interface ApiManagementServiceResources { * Lists report records by subscription. */ // FIXME: Reports_ListBySubscription could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListBySubscription") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription") @get listBySubscription( @@ -903,6 +986,8 @@ interface ApiManagementServiceResources { * Lists report records by Time. */ // FIXME: Reports_ListByTime could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByTime") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime") @get listByTime( @@ -956,6 +1041,8 @@ interface ApiManagementServiceResources { * Lists report records by Request. */ // FIXME: Reports_ListByRequest could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByRequest") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest") @get listByRequest( @@ -997,6 +1084,8 @@ interface ApiManagementServiceResources { * Lists a collection of resources associated with tags. */ // FIXME: TagResource_ListByService could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TagResource_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources") @get listByService( @@ -1038,6 +1127,8 @@ interface ApiManagementServiceResources { * Gets the status of the most recent synchronization between the configuration database and the Git repository. */ // FIXME: TenantConfiguration_GetSyncState could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantConfiguration_GetSyncState") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState") @get getSyncState( @@ -1063,30 +1154,102 @@ interface ApiManagementServiceResources { ): ArmResponse | ErrorResponse; } +@@encodedName(ApiManagementServiceResources.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(ApiManagementServiceResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(ApiManagementServiceResources.createOrUpdate::parameters.resource, "Parameters supplied to the CreateOrUpdate API Management service operation." ); +@@encodedName(ApiManagementServiceResources.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(ApiManagementServiceResources.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(ApiManagementServiceResources.update::parameters.properties, "Parameters supplied to the CreateOrUpdate API Management service operation." ); +@@encodedName(ApiManagementServiceResources.performConnectivityCheckAsync::parameters.body, + "application/json", + "connectivityCheckRequestParams" +); +@@extension(ApiManagementServiceResources.performConnectivityCheckAsync::parameters.body, + "x-ms-client-name", + "connectivityCheckRequestParams" +); @@doc(ApiManagementServiceResources.performConnectivityCheckAsync::parameters.body, "Connectivity Check request parameters." ); +@@encodedName(ApiManagementServiceResources.restore::parameters.body, + "application/json", + "parameters" +); +@@extension(ApiManagementServiceResources.restore::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(ApiManagementServiceResources.restore::parameters.body, "Parameters supplied to the Restore API Management service from backup operation." ); +@@encodedName(ApiManagementServiceResources.backup::parameters.body, + "application/json", + "parameters" +); +@@extension(ApiManagementServiceResources.backup::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(ApiManagementServiceResources.backup::parameters.body, "Parameters supplied to the ApiManagementService_Backup operation." ); +@@encodedName(ApiManagementServiceResources.applyNetworkConfigurationUpdates::parameters.body, + "application/json", + "parameters" +); +@@extension(ApiManagementServiceResources.applyNetworkConfigurationUpdates::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(ApiManagementServiceResources.applyNetworkConfigurationUpdates::parameters.body, "Parameters supplied to the Apply Network Configuration operation. If the parameters are empty, all the regions in which the Api Management service is deployed will be updated sequentially without incurring downtime in the region." ); +@@encodedName(ApiManagementServiceResources.deploy::parameters.body, + "application/json", + "parameters" +); +@@extension(ApiManagementServiceResources.deploy::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(ApiManagementServiceResources.deploy::parameters.body, "Deploy Configuration parameters." ); +@@encodedName(ApiManagementServiceResources.save::parameters.body, + "application/json", + "parameters" +); +@@extension(ApiManagementServiceResources.save::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(ApiManagementServiceResources.save::parameters.body, "Save Configuration parameters." ); +@@encodedName(ApiManagementServiceResources.validate::parameters.body, + "application/json", + "parameters" +); +@@extension(ApiManagementServiceResources.validate::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(ApiManagementServiceResources.validate::parameters.body, "Validate Configuration parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp index 3a31c94d26..9e28f034d4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * ApiRelease details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -model ApiReleaseContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ApiReleaseContractProperties) +model ApiReleaseContract extends ProxyResourceBase { /** * Release identifier within an API. Must be unique in the current API Management service instance. */ @@ -28,6 +32,12 @@ model ApiReleaseContract is ProxyResource { @segment("releases") @visibility("read") name: string; + + /** + * ApiRelease entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: ApiReleaseContractProperties; } @armResourceOperations @@ -35,12 +45,16 @@ interface ApiReleaseContracts { /** * Returns the details of an API release. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiRelease_Get") get is ArmResourceRead; /** * Returns the etag of an API release. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("ApiRelease_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< ApiReleaseContract, @@ -51,6 +65,8 @@ interface ApiReleaseContracts { /** * Creates a new Release for the API. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiRelease_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< ApiReleaseContract, { @@ -67,7 +83,9 @@ interface ApiReleaseContracts { /** * Updates the details of the release of the API specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("ApiRelease_Update") update is ArmCustomPatchSync< ApiReleaseContract, ApiReleaseContract, @@ -85,6 +103,8 @@ interface ApiReleaseContracts { /** * Deletes the specified release in the API. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiRelease_Delete") delete is ArmResourceDeleteSync< ApiReleaseContract, { @@ -101,6 +121,8 @@ interface ApiReleaseContracts { /** * Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiRelease_ListByService") listByService is ArmResourceListByParent< ApiReleaseContract, { @@ -128,9 +150,25 @@ interface ApiReleaseContracts { >; } +@@encodedName(ApiReleaseContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(ApiReleaseContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(ApiReleaseContracts.createOrUpdate::parameters.resource, "Create parameters." ); +@@encodedName(ApiReleaseContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(ApiReleaseContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(ApiReleaseContracts.update::parameters.properties, "API Release Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp index 5efeaa48b6..304113e1e3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp @@ -15,8 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * API Version Set Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model ApiVersionSetContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + ApiVersionSetContractProperties +) +model ApiVersionSetContract extends ProxyResourceBase { /** * Api Version Set identifier. Must be unique in the current API Management service instance. */ @@ -28,6 +34,12 @@ model ApiVersionSetContract is ProxyResource { @segment("apiVersionSets") @visibility("read") name: string; + + /** + * API VersionSet contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: ApiVersionSetContractProperties; } @armResourceOperations @@ -35,12 +47,16 @@ interface ApiVersionSetContracts { /** * Gets the details of the Api Version Set specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiVersionSet_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the Api Version Set specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("ApiVersionSet_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< ApiVersionSetContract, @@ -51,6 +67,8 @@ interface ApiVersionSetContracts { /** * Creates or Updates a Api Version Set. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiVersionSet_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< ApiVersionSetContract, { @@ -67,7 +85,9 @@ interface ApiVersionSetContracts { /** * Updates the details of the Api VersionSet specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("ApiVersionSet_Update") update is ArmCustomPatchSync< ApiVersionSetContract, ApiVersionSetUpdateParameters, @@ -85,6 +105,8 @@ interface ApiVersionSetContracts { /** * Deletes specific Api Version Set. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiVersionSet_Delete") delete is ArmResourceDeleteSync< ApiVersionSetContract, { @@ -101,6 +123,8 @@ interface ApiVersionSetContracts { /** * Lists a collection of API Version Sets in the specified service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiVersionSet_ListByService") listByService is ArmResourceListByParent< ApiVersionSetContract, { @@ -128,9 +152,25 @@ interface ApiVersionSetContracts { >; } +@@encodedName(ApiVersionSetContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(ApiVersionSetContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(ApiVersionSetContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); +@@encodedName(ApiVersionSetContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(ApiVersionSetContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(ApiVersionSetContracts.update::parameters.properties, "Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp index 9978814678..06ead68a81 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * External OAuth authorization server settings. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model AuthorizationServerContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + AuthorizationServerContractProperties +) +model AuthorizationServerContract extends ProxyResourceBase { /** * Identifier of the authorization server. */ @@ -29,6 +34,12 @@ model AuthorizationServerContract @segment("authorizationServers") @visibility("read") name: string; + + /** + * Properties of the External OAuth authorization server Contract. + */ + @extension("x-ms-client-flatten", true) + properties?: AuthorizationServerContractProperties; } @armResourceOperations @@ -36,12 +47,16 @@ interface AuthorizationServerContracts { /** * Gets the details of the authorization server specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("AuthorizationServer_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the authorizationServer specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("AuthorizationServer_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< AuthorizationServerContract, @@ -52,6 +67,8 @@ interface AuthorizationServerContracts { /** * Creates new authorization server or updates an existing authorization server. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("AuthorizationServer_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< AuthorizationServerContract, { @@ -68,7 +85,9 @@ interface AuthorizationServerContracts { /** * Updates the details of the authorization server specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("AuthorizationServer_Update") update is ArmCustomPatchSync< AuthorizationServerContract, AuthorizationServerUpdateContract, @@ -86,6 +105,8 @@ interface AuthorizationServerContracts { /** * Deletes specific authorization server instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("AuthorizationServer_Delete") delete is ArmResourceDeleteSync< AuthorizationServerContract, { @@ -102,6 +123,8 @@ interface AuthorizationServerContracts { /** * Lists a collection of authorization servers defined within a service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("AuthorizationServer_ListByService") listByService is ArmResourceListByParent< AuthorizationServerContract, { @@ -131,6 +154,8 @@ interface AuthorizationServerContracts { /** * Gets the client secret details of the authorization server. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("AuthorizationServer_ListSecrets") listSecrets is ArmResourceActionSync< AuthorizationServerContract, void, @@ -138,9 +163,25 @@ interface AuthorizationServerContracts { >; } +@@encodedName(AuthorizationServerContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(AuthorizationServerContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(AuthorizationServerContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); +@@encodedName(AuthorizationServerContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(AuthorizationServerContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(AuthorizationServerContracts.update::parameters.properties, "OAuth2 Server settings Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp index 45e5055104..2278cc7eeb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Backend details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model BackendContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(BackendContractProperties) +model BackendContract extends ProxyResourceBase { /** * Identifier of the Backend entity. Must be unique in the current API Management service instance. */ @@ -27,6 +31,12 @@ model BackendContract is ProxyResource { @segment("backends") @visibility("read") name: string; + + /** + * Backend entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: BackendContractProperties; } @armResourceOperations @@ -34,12 +44,16 @@ interface BackendContracts { /** * Gets the details of the backend specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Backend_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the backend specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("Backend_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< BackendContract, @@ -50,6 +64,8 @@ interface BackendContracts { /** * Creates or Updates a backend. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Backend_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< BackendContract, { @@ -66,7 +82,9 @@ interface BackendContracts { /** * Updates an existing backend. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("Backend_Update") update is ArmCustomPatchSync< BackendContract, BackendUpdateParameters, @@ -84,6 +102,8 @@ interface BackendContracts { /** * Deletes the specified backend. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Backend_Delete") delete is ArmResourceDeleteSync< BackendContract, { @@ -100,6 +120,8 @@ interface BackendContracts { /** * Lists a collection of backends in the specified service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Backend_ListByService") listByService is ArmResourceListByParent< BackendContract, { @@ -129,16 +151,42 @@ interface BackendContracts { /** * Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Backend_Reconnect") reconnect is ArmResourceActionNoContentSync< BackendContract, BackendReconnectContract >; } +@@encodedName(BackendContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(BackendContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(BackendContracts.createOrUpdate::parameters.resource, "Create parameters." ); +@@encodedName(BackendContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(BackendContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(BackendContracts.update::parameters.properties, "Update parameters."); +@@encodedName(BackendContracts.reconnect::parameters.body, + "application/json", + "parameters" +); +@@extension(BackendContracts.reconnect::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(BackendContracts.reconnect::parameters.body, "Reconnect request parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp index ed92edd515..cd2c5b484a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Cache details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model CacheContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(CacheContractProperties) +model CacheContract extends ProxyResourceBase { /** * Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). */ @@ -28,6 +32,12 @@ model CacheContract is ProxyResource { @segment("caches") @visibility("read") name: string; + + /** + * Cache properties details. + */ + @extension("x-ms-client-flatten", true) + properties?: CacheContractProperties; } @armResourceOperations @@ -35,12 +45,16 @@ interface CacheContracts { /** * Gets the details of the Cache specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Cache_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the Cache specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("Cache_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; @@ -48,6 +62,8 @@ interface CacheContracts { /** * Creates or updates an External Cache to be used in Api Management instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Cache_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< CacheContract, { @@ -64,7 +80,9 @@ interface CacheContracts { /** * Updates the details of the cache specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("Cache_Update") update is ArmCustomPatchSync< CacheContract, CacheUpdateParameters, @@ -82,6 +100,8 @@ interface CacheContracts { /** * Deletes specific Cache. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Cache_Delete") delete is ArmResourceDeleteSync< CacheContract, { @@ -98,6 +118,8 @@ interface CacheContracts { /** * Lists a collection of all external Caches in the specified service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Cache_ListByService") listByService is ArmResourceListByParent< CacheContract, { @@ -119,7 +141,23 @@ interface CacheContracts { >; } +@@encodedName(CacheContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(CacheContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(CacheContracts.createOrUpdate::parameters.resource, "Create or Update parameters." ); +@@encodedName(CacheContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(CacheContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(CacheContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp index 3ca7066124..c9282fe490 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp @@ -15,8 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Certificate details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model CertificateContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + CertificateContractProperties +) +model CertificateContract extends ProxyResourceBase { /** * Identifier of the certificate entity. Must be unique in the current API Management service instance. */ @@ -28,6 +34,12 @@ model CertificateContract is ProxyResource { @segment("certificates") @visibility("read") name: string; + + /** + * Certificate properties details. + */ + @extension("x-ms-client-flatten", true) + properties?: CertificateContractProperties; } @armResourceOperations @@ -35,12 +47,16 @@ interface CertificateContracts { /** * Gets the details of the certificate specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Certificate_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the certificate specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("Certificate_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< CertificateContract, @@ -51,6 +67,8 @@ interface CertificateContracts { /** * Creates or updates the certificate being used for authentication with the backend. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Certificate_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< CertificateContract, { @@ -67,6 +85,8 @@ interface CertificateContracts { /** * Deletes specific certificate. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Certificate_Delete") delete is ArmResourceDeleteSync< CertificateContract, { @@ -83,6 +103,8 @@ interface CertificateContracts { /** * Lists a collection of all certificates in the specified service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Certificate_ListByService") listByService is ArmResourceListByParent< CertificateContract, { @@ -118,6 +140,8 @@ interface CertificateContracts { /** * From KeyVault, Refresh the certificate being used for authentication with the backend. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Certificate_RefreshSecret") refreshSecret is ArmResourceActionSync< CertificateContract, void, @@ -125,6 +149,14 @@ interface CertificateContracts { >; } +@@encodedName(CertificateContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(CertificateContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(CertificateContracts.createOrUpdate::parameters.resource, "Create or Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp index 342be45d85..60d78184c0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp @@ -14,10 +14,15 @@ namespace Azure.ResourceManager.ApiManagement; /** * Deleted API Management Service information. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource @parentResource("SubscriptionLocationResource") -model DeletedServiceContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + DeletedServiceContractProperties +) +model DeletedServiceContract extends ProxyResourceBase { /** * The name of the API Management service. */ @@ -29,6 +34,12 @@ model DeletedServiceContract @segment("deletedservices") @visibility("read") name: string; + + /** + * Deleted API Management Service details. + */ + @extension("x-ms-client-flatten", true) + properties?: DeletedServiceContractProperties; } @armResourceOperations @@ -36,15 +47,21 @@ interface DeletedServiceContracts { /** * Get soft-deleted Api Management Service by name. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DeletedServices_GetByName") getByName is ArmResourceRead; /** * Purges Api Management Service (deletes it with no option to undelete). */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DeletedServices_Purge") purge is ArmResourceDeleteAsync; /** * Lists all soft-deleted services available for undelete for the given subscription. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DeletedServices_ListBySubscription") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp index 5292addc4b..8027967888 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Diagnostic details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -model DiagnosticContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(DiagnosticContractProperties) +model DiagnosticContract extends ProxyResourceBase { /** * Diagnostic identifier. Must be unique in the current API Management service instance. */ @@ -28,6 +32,12 @@ model DiagnosticContract is ProxyResource { @segment("diagnostics") @visibility("read") name: string; + + /** + * Diagnostic entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: DiagnosticContractProperties; } @armResourceOperations @@ -35,12 +45,16 @@ interface DiagnosticContracts { /** * Gets the details of the Diagnostic for an API specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiDiagnostic_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("ApiDiagnostic_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< DiagnosticContract, @@ -51,6 +65,8 @@ interface DiagnosticContracts { /** * Creates a new Diagnostic for an API or updates an existing one. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiDiagnostic_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< DiagnosticContract, { @@ -67,7 +83,9 @@ interface DiagnosticContracts { /** * Updates the details of the Diagnostic for an API specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("ApiDiagnostic_Update") update is ArmCustomPatchSync< DiagnosticContract, DiagnosticContract, @@ -85,6 +103,8 @@ interface DiagnosticContracts { /** * Deletes the specified Diagnostic from an API. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiDiagnostic_Delete") delete is ArmResourceDeleteSync< DiagnosticContract, { @@ -101,6 +121,8 @@ interface DiagnosticContracts { /** * Lists all diagnostics of an API. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiDiagnostic_ListByService") listByService is ArmResourceListByParent< DiagnosticContract, { @@ -128,9 +150,25 @@ interface DiagnosticContracts { >; } +@@encodedName(DiagnosticContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(DiagnosticContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(DiagnosticContracts.createOrUpdate::parameters.resource, "Create parameters." ); +@@encodedName(DiagnosticContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(DiagnosticContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(DiagnosticContracts.update::parameters.properties, "Diagnostic Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp index ab8f1fe538..29dbd9b454 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp @@ -15,8 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Email Template details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model EmailTemplateContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + EmailTemplateContractProperties +) +model EmailTemplateContract extends ProxyResourceBase { /** * Email Template Name Identifier. */ @@ -25,6 +31,12 @@ model EmailTemplateContract is ProxyResource { @segment("templates") @visibility("read") name: TemplateName; + + /** + * Email Template entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: EmailTemplateContractProperties; } @armResourceOperations @@ -32,12 +44,16 @@ interface EmailTemplateContracts { /** * Gets the details of the email template specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("EmailTemplate_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the email template specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("EmailTemplate_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< EmailTemplateContract, @@ -48,6 +64,8 @@ interface EmailTemplateContracts { /** * Updates an Email Template. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("EmailTemplate_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< EmailTemplateContract, { @@ -64,7 +82,9 @@ interface EmailTemplateContracts { /** * Updates API Management email template */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("EmailTemplate_Update") update is ArmCustomPatchSync< EmailTemplateContract, EmailTemplateUpdateParameters, @@ -82,6 +102,8 @@ interface EmailTemplateContracts { /** * Reset the Email Template to default template provided by the API Management service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("EmailTemplate_Delete") delete is ArmResourceDeleteSync< EmailTemplateContract, { @@ -98,6 +120,8 @@ interface EmailTemplateContracts { /** * Gets all email templates */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("EmailTemplate_ListByService") listByService is ArmResourceListByParent< EmailTemplateContract, { @@ -125,9 +149,25 @@ interface EmailTemplateContracts { >; } +@@encodedName(EmailTemplateContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(EmailTemplateContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(EmailTemplateContracts.createOrUpdate::parameters.resource, "Email Template update parameters." ); +@@encodedName(EmailTemplateContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(EmailTemplateContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(EmailTemplateContracts.update::parameters.properties, "Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp index 71bf092d3f..356e09e5c8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Gateway certificate authority details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(GatewayContract) -model GatewayCertificateAuthorityContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + GatewayCertificateAuthorityContractProperties +) +model GatewayCertificateAuthorityContract extends ProxyResourceBase { /** * Identifier of the certificate entity. Must be unique in the current API Management service instance. */ @@ -29,6 +34,12 @@ model GatewayCertificateAuthorityContract @segment("certificateAuthorities") @visibility("read") name: string; + + /** + * Gateway certificate authority details. + */ + @extension("x-ms-client-flatten", true) + properties?: GatewayCertificateAuthorityContractProperties; } @armResourceOperations @@ -36,12 +47,16 @@ interface GatewayCertificateAuthorityContracts { /** * Get assigned Gateway Certificate Authority details. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GatewayCertificateAuthority_Get") get is ArmResourceRead; /** * Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("GatewayCertificateAuthority_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GatewayCertificateAuthorityContract, @@ -52,6 +67,8 @@ interface GatewayCertificateAuthorityContracts { /** * Assign Certificate entity to Gateway entity as Certificate Authority. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GatewayCertificateAuthority_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayCertificateAuthorityContract, { @@ -68,6 +85,8 @@ interface GatewayCertificateAuthorityContracts { /** * Remove relationship between Certificate Authority and Gateway entity. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GatewayCertificateAuthority_Delete") delete is ArmResourceDeleteSync< GatewayCertificateAuthorityContract, { @@ -84,6 +103,8 @@ interface GatewayCertificateAuthorityContracts { /** * Lists the collection of Certificate Authorities for the specified Gateway entity. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GatewayCertificateAuthority_ListByService") listByService is ArmResourceListByParent< GatewayCertificateAuthorityContract, { @@ -111,6 +132,14 @@ interface GatewayCertificateAuthorityContracts { >; } +@@encodedName(GatewayCertificateAuthorityContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(GatewayCertificateAuthorityContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(GatewayCertificateAuthorityContracts.createOrUpdate::parameters.resource, "" ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp index eb8521f31c..5f2499f8a6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Gateway details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model GatewayContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(GatewayContractProperties) +model GatewayContract extends ProxyResourceBase { /** * Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed' */ @@ -27,6 +31,12 @@ model GatewayContract is ProxyResource { @segment("gateways") @visibility("read") name: string; + + /** + * Gateway details. + */ + @extension("x-ms-client-flatten", true) + properties?: GatewayContractProperties; } @armResourceOperations @@ -34,12 +44,16 @@ interface GatewayContracts { /** * Gets the details of the Gateway specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Gateway_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the Gateway specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("Gateway_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GatewayContract, @@ -50,6 +64,8 @@ interface GatewayContracts { /** * Creates or updates a Gateway to be used in Api Management instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Gateway_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayContract, { @@ -66,7 +82,9 @@ interface GatewayContracts { /** * Updates the details of the gateway specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("Gateway_Update") update is ArmCustomPatchSync< GatewayContract, GatewayContract, @@ -84,6 +102,8 @@ interface GatewayContracts { /** * Deletes specific Gateway. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Gateway_Delete") delete is ArmResourceDeleteSync< GatewayContract, { @@ -100,6 +120,8 @@ interface GatewayContracts { /** * Lists a collection of gateways registered with service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Gateway_ListByService") listByService is ArmResourceListByParent< GatewayContract, { @@ -129,11 +151,15 @@ interface GatewayContracts { /** * Retrieves gateway keys. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Gateway_ListKeys") listKeys is ArmResourceActionSync; /** * Regenerates specified gateway key invalidating any tokens created with it. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Gateway_RegenerateKey") regenerateKey is ArmResourceActionNoContentSync< GatewayContract, GatewayKeyRegenerationRequestContract @@ -142,6 +168,8 @@ interface GatewayContracts { /** * Gets the Shared Access Authorization Token for the gateway. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Gateway_GenerateToken") generateToken is ArmResourceActionSync< GatewayContract, GatewayTokenRequestContract, @@ -152,6 +180,8 @@ interface GatewayContracts { * Lists a collection of the APIs associated with a gateway. */ // FIXME: GatewayApi_ListByService could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GatewayApi_ListByService") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis") @get listByService( @@ -198,7 +228,39 @@ interface GatewayContracts { ): ArmResponse | ErrorResponse; } +@@encodedName(GatewayContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(GatewayContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(GatewayContracts.createOrUpdate::parameters.resource, ""); +@@encodedName(GatewayContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(GatewayContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(GatewayContracts.update::parameters.properties, ""); +@@encodedName(GatewayContracts.regenerateKey::parameters.body, + "application/json", + "parameters" +); +@@extension(GatewayContracts.regenerateKey::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(GatewayContracts.regenerateKey::parameters.body, ""); +@@encodedName(GatewayContracts.generateToken::parameters.body, + "application/json", + "parameters" +); +@@extension(GatewayContracts.generateToken::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(GatewayContracts.generateToken::parameters.body, ""); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp index e66daab163..daa553bf4e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Gateway hostname configuration details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(GatewayContract) -model GatewayHostnameConfigurationContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + GatewayHostnameConfigurationContractProperties +) +model GatewayHostnameConfigurationContract extends ProxyResourceBase { /** * Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. */ @@ -28,6 +33,12 @@ model GatewayHostnameConfigurationContract @segment("hostnameConfigurations") @visibility("read") name: string; + + /** + * Gateway hostname configuration details. + */ + @extension("x-ms-client-flatten", true) + properties?: GatewayHostnameConfigurationContractProperties; } @armResourceOperations @@ -35,12 +46,16 @@ interface GatewayHostnameConfigurationContracts { /** * Get details of a hostname configuration */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GatewayHostnameConfiguration_Get") get is ArmResourceRead; /** * Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("GatewayHostnameConfiguration_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GatewayHostnameConfigurationContract, @@ -51,6 +66,8 @@ interface GatewayHostnameConfigurationContracts { /** * Creates of updates hostname configuration for a Gateway. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GatewayHostnameConfiguration_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayHostnameConfigurationContract, { @@ -67,6 +84,8 @@ interface GatewayHostnameConfigurationContracts { /** * Deletes the specified hostname configuration from the specified Gateway. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GatewayHostnameConfiguration_Delete") delete is ArmResourceDeleteSync< GatewayHostnameConfigurationContract, { @@ -83,6 +102,8 @@ interface GatewayHostnameConfigurationContracts { /** * Lists the collection of hostname configurations for the specified gateway. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GatewayHostnameConfiguration_ListByService") listByService is ArmResourceListByParent< GatewayHostnameConfigurationContract, { @@ -110,6 +131,14 @@ interface GatewayHostnameConfigurationContracts { >; } +@@encodedName(GatewayHostnameConfigurationContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(GatewayHostnameConfigurationContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(GatewayHostnameConfigurationContracts.createOrUpdate::parameters.resource, "" ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp index d6ac13c225..d137fc79e6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp @@ -15,8 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Global Schema Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model GlobalSchemaContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + GlobalSchemaContractProperties +) +model GlobalSchemaContract extends ProxyResourceBase { /** * Schema id identifier. Must be unique in the current API Management service instance. */ @@ -27,6 +33,12 @@ model GlobalSchemaContract is ProxyResource { @segment("schemas") @visibility("read") name: string; + + /** + * Properties of the Global Schema. + */ + @extension("x-ms-client-flatten", true) + properties?: GlobalSchemaContractProperties; } @armResourceOperations @@ -34,12 +46,16 @@ interface GlobalSchemaContracts { /** * Gets the details of the Schema specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GlobalSchema_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the Schema specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("GlobalSchema_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GlobalSchemaContract, @@ -50,6 +66,8 @@ interface GlobalSchemaContracts { /** * Creates new or updates existing specified Schema of the API Management service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GlobalSchema_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync< GlobalSchemaContract, { @@ -66,6 +84,8 @@ interface GlobalSchemaContracts { /** * Deletes specific Schema. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GlobalSchema_Delete") delete is ArmResourceDeleteSync< GlobalSchemaContract, { @@ -82,6 +102,8 @@ interface GlobalSchemaContracts { /** * Lists a collection of schemas registered with service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GlobalSchema_ListByService") listByService is ArmResourceListByParent< GlobalSchemaContract, { @@ -109,6 +131,14 @@ interface GlobalSchemaContracts { >; } +@@encodedName(GlobalSchemaContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(GlobalSchemaContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(GlobalSchemaContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp index 2ff56ff149..2176bd019b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model GroupContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(GroupContractProperties) +model GroupContract extends ProxyResourceBase { /** * Group identifier. Must be unique in the current API Management service instance. */ @@ -27,6 +31,12 @@ model GroupContract is ProxyResource { @segment("groups") @visibility("read") name: string; + + /** + * Group entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: GroupContractProperties; } @armResourceOperations @@ -34,12 +44,16 @@ interface GroupContracts { /** * Gets the details of the group specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Group_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the group specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("Group_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; @@ -47,6 +61,8 @@ interface GroupContracts { /** * Creates or Updates a group. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Group_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GroupContract, { @@ -63,7 +79,9 @@ interface GroupContracts { /** * Updates the details of the group specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("Group_Update") update is ArmCustomPatchSync< GroupContract, GroupUpdateParameters, @@ -81,6 +99,8 @@ interface GroupContracts { /** * Deletes specific group of the API Management service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Group_Delete") delete is ArmResourceDeleteSync< GroupContract, { @@ -97,6 +117,8 @@ interface GroupContracts { /** * Lists a collection of groups defined within a service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Group_ListByService") listByService is ArmResourceListByParent< GroupContract, { @@ -127,6 +149,8 @@ interface GroupContracts { * Lists a collection of user entities associated with the group. */ // FIXME: GroupUser_List could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GroupUser_List") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users") @get list( @@ -173,5 +197,21 @@ interface GroupContracts { ): ArmResponse | ErrorResponse; } +@@encodedName(GroupContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(GroupContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(GroupContracts.createOrUpdate::parameters.resource, "Create parameters."); +@@encodedName(GroupContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(GroupContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(GroupContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp index a4a4e31805..66002fcd65 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Identity Provider details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model IdentityProviderContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + IdentityProviderContractProperties +) +model IdentityProviderContract extends ProxyResourceBase { /** * Identity Provider Type identifier. */ @@ -26,6 +31,12 @@ model IdentityProviderContract @segment("identityProviders") @visibility("read") name: IdentityProviderType; + + /** + * Identity Provider contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: IdentityProviderContractProperties; } @armResourceOperations @@ -33,12 +44,16 @@ interface IdentityProviderContracts { /** * Gets the configuration details of the identity Provider configured in specified service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("IdentityProvider_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the identityProvider specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("IdentityProvider_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< IdentityProviderContract, @@ -49,6 +64,8 @@ interface IdentityProviderContracts { /** * Creates or Updates the IdentityProvider configuration. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("IdentityProvider_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IdentityProviderContract, { @@ -65,7 +82,9 @@ interface IdentityProviderContracts { /** * Updates an existing IdentityProvider configuration. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("IdentityProvider_Update") update is ArmCustomPatchSync< IdentityProviderContract, IdentityProviderUpdateParameters, @@ -83,6 +102,8 @@ interface IdentityProviderContracts { /** * Deletes the specified identity provider configuration. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("IdentityProvider_Delete") delete is ArmResourceDeleteSync< IdentityProviderContract, { @@ -99,11 +120,15 @@ interface IdentityProviderContracts { /** * Lists a collection of Identity Provider configured in the specified service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("IdentityProvider_ListByService") listByService is ArmResourceListByParent; /** * Gets the client secret details of the Identity Provider. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("IdentityProvider_ListSecrets") listSecrets is ArmResourceActionSync< IdentityProviderContract, void, @@ -111,9 +136,25 @@ interface IdentityProviderContracts { >; } +@@encodedName(IdentityProviderContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(IdentityProviderContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(IdentityProviderContracts.createOrUpdate::parameters.resource, "Create parameters." ); +@@encodedName(IdentityProviderContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(IdentityProviderContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(IdentityProviderContracts.update::parameters.properties, "Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp index f3f70e6ff4..3f65616092 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Issue Attachment Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(IssueContract) -model IssueAttachmentContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + IssueAttachmentContractProperties +) +model IssueAttachmentContract extends ProxyResourceBase { /** * Attachment identifier within an Issue. Must be unique in the current Issue. */ @@ -29,6 +34,12 @@ model IssueAttachmentContract @segment("attachments") @visibility("read") name: string; + + /** + * Properties of the Issue Attachment. + */ + @extension("x-ms-client-flatten", true) + properties?: IssueAttachmentContractProperties; } @armResourceOperations @@ -36,12 +47,16 @@ interface IssueAttachmentContracts { /** * Gets the details of the issue Attachment for an API specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiIssueAttachment_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("ApiIssueAttachment_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< IssueAttachmentContract, @@ -52,6 +67,8 @@ interface IssueAttachmentContracts { /** * Creates a new Attachment for the Issue in an API or updates an existing one. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiIssueAttachment_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IssueAttachmentContract, { @@ -68,6 +85,8 @@ interface IssueAttachmentContracts { /** * Deletes the specified comment from an Issue. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiIssueAttachment_Delete") delete is ArmResourceDeleteSync< IssueAttachmentContract, { @@ -84,6 +103,8 @@ interface IssueAttachmentContracts { /** * Lists all attachments for the Issue associated with the specified API. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiIssueAttachment_ListByService") listByService is ArmResourceListByParent< IssueAttachmentContract, { @@ -111,6 +132,14 @@ interface IssueAttachmentContracts { >; } +@@encodedName(IssueAttachmentContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(IssueAttachmentContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(IssueAttachmentContracts.createOrUpdate::parameters.resource, "Create parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp index 0828649fbd..b25aa4a469 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp @@ -15,8 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Issue Comment Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(IssueContract) -model IssueCommentContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + IssueCommentContractProperties +) +model IssueCommentContract extends ProxyResourceBase { /** * Comment identifier within an Issue. Must be unique in the current Issue. */ @@ -28,6 +34,12 @@ model IssueCommentContract is ProxyResource { @segment("comments") @visibility("read") name: string; + + /** + * Properties of the Issue Comment. + */ + @extension("x-ms-client-flatten", true) + properties?: IssueCommentContractProperties; } @armResourceOperations @@ -35,12 +47,16 @@ interface IssueCommentContracts { /** * Gets the details of the issue Comment for an API specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiIssueComment_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("ApiIssueComment_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< IssueCommentContract, @@ -51,6 +67,8 @@ interface IssueCommentContracts { /** * Creates a new Comment for the Issue in an API or updates an existing one. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiIssueComment_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IssueCommentContract, { @@ -67,6 +85,8 @@ interface IssueCommentContracts { /** * Deletes the specified comment from an Issue. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiIssueComment_Delete") delete is ArmResourceDeleteSync< IssueCommentContract, { @@ -83,6 +103,8 @@ interface IssueCommentContracts { /** * Lists all comments for the Issue associated with the specified API. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiIssueComment_ListByService") listByService is ArmResourceListByParent< IssueCommentContract, { @@ -110,6 +132,14 @@ interface IssueCommentContracts { >; } +@@encodedName(IssueCommentContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(IssueCommentContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(IssueCommentContracts.createOrUpdate::parameters.resource, "Create parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp index 000409fed0..9c7d6dc99d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Issue Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -model IssueContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(IssueContractProperties) +model IssueContract extends ProxyResourceBase { /** * Issue identifier. Must be unique in the current API Management service instance. */ @@ -28,6 +32,12 @@ model IssueContract is ProxyResource { @segment("issues") @visibility("read") name: string; + + /** + * Properties of the Issue. + */ + @extension("x-ms-client-flatten", true) + properties?: IssueContractProperties; } @armResourceOperations @@ -35,6 +45,8 @@ interface IssueContracts { /** * Gets the details of the Issue for an API specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiIssue_Get") get is ArmResourceRead< IssueContract, { @@ -51,7 +63,9 @@ interface IssueContracts { /** * Gets the entity state (Etag) version of the Issue for an API specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("ApiIssue_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; @@ -59,6 +73,8 @@ interface IssueContracts { /** * Creates a new Issue for an API or updates an existing one. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiIssue_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IssueContract, { @@ -75,7 +91,9 @@ interface IssueContracts { /** * Updates an existing issue for an API. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("ApiIssue_Update") update is ArmCustomPatchSync< IssueContract, IssueUpdateContract, @@ -93,6 +111,8 @@ interface IssueContracts { /** * Deletes the specified Issue from an API. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiIssue_Delete") delete is ArmResourceDeleteSync< IssueContract, { @@ -109,6 +129,8 @@ interface IssueContracts { /** * Lists all issues associated with the specified API. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiIssue_ListByService") listByService is ArmResourceListByParent< IssueContract, { @@ -142,5 +164,21 @@ interface IssueContracts { >; } +@@encodedName(IssueContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(IssueContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(IssueContracts.createOrUpdate::parameters.resource, "Create parameters."); +@@encodedName(IssueContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(IssueContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(IssueContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp index 8cbb7b1ef8..0f541ca7af 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Logger details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model LoggerContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(LoggerContractProperties) +model LoggerContract extends ProxyResourceBase { /** * Logger identifier. Must be unique in the API Management service instance. */ @@ -27,6 +31,12 @@ model LoggerContract is ProxyResource { @segment("loggers") @visibility("read") name: string; + + /** + * Logger entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: LoggerContractProperties; } @armResourceOperations @@ -34,12 +44,16 @@ interface LoggerContracts { /** * Gets the details of the logger specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Logger_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the logger specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("Logger_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< LoggerContract, @@ -50,6 +64,8 @@ interface LoggerContracts { /** * Creates or Updates a logger. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Logger_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< LoggerContract, { @@ -66,7 +82,9 @@ interface LoggerContracts { /** * Updates an existing logger. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("Logger_Update") update is ArmCustomPatchSync< LoggerContract, LoggerUpdateContract, @@ -84,6 +102,8 @@ interface LoggerContracts { /** * Deletes the specified logger. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Logger_Delete") delete is ArmResourceDeleteSync< LoggerContract, { @@ -100,6 +120,8 @@ interface LoggerContracts { /** * Lists a collection of loggers in the specified service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Logger_ListByService") listByService is ArmResourceListByParent< LoggerContract, { @@ -127,7 +149,23 @@ interface LoggerContracts { >; } +@@encodedName(LoggerContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(LoggerContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(LoggerContracts.createOrUpdate::parameters.resource, "Create parameters." ); +@@encodedName(LoggerContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(LoggerContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(LoggerContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp index b8476b1355..332cd1c720 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * NamedValue details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model NamedValueContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(NamedValueContractProperties) +model NamedValueContract extends ProxyResourceBase { /** * Identifier of the NamedValue. */ @@ -27,6 +31,12 @@ model NamedValueContract is ProxyResource { @segment("namedValues") @visibility("read") name: string; + + /** + * NamedValue entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: NamedValueContractProperties; } @armResourceOperations @@ -34,12 +44,16 @@ interface NamedValueContracts { /** * Gets the details of the named value specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NamedValue_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the named value specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("NamedValue_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< NamedValueContract, @@ -50,6 +64,8 @@ interface NamedValueContracts { /** * Creates or updates named value. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NamedValue_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync< NamedValueContract, { @@ -66,7 +82,9 @@ interface NamedValueContracts { /** * Updates the specific named value. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("NamedValue_Update") update is ArmCustomPatchAsync< NamedValueContract, NamedValueUpdateParameters, @@ -84,6 +102,8 @@ interface NamedValueContracts { /** * Deletes specific named value from the API Management service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NamedValue_Delete") delete is ArmResourceDeleteSync< NamedValueContract, { @@ -100,6 +120,8 @@ interface NamedValueContracts { /** * Lists a collection of named values defined within a service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NamedValue_ListByService") listByService is ArmResourceListByParent< NamedValueContract, { @@ -135,6 +157,8 @@ interface NamedValueContracts { /** * Gets the secret of the named value specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NamedValue_ListValue") listValue is ArmResourceActionSync< NamedValueContract, void, @@ -144,6 +168,8 @@ interface NamedValueContracts { /** * Refresh the secret of the named value specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NamedValue_RefreshSecret") refreshSecret is ArmResourceActionAsync< NamedValueContract, void, @@ -151,7 +177,23 @@ interface NamedValueContracts { >; } +@@encodedName(NamedValueContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(NamedValueContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(NamedValueContracts.createOrUpdate::parameters.resource, "Create parameters." ); +@@encodedName(NamedValueContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(NamedValueContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(NamedValueContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp index 277a95cef6..6c242c617c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp @@ -15,8 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Notification details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model NotificationContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + NotificationContractProperties +) +model NotificationContract extends ProxyResourceBase { /** * Notification Name Identifier. */ @@ -25,6 +31,12 @@ model NotificationContract is ProxyResource { @segment("notifications") @visibility("read") name: NotificationName; + + /** + * Notification entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: NotificationContractProperties; } @armResourceOperations @@ -32,11 +44,15 @@ interface NotificationContracts { /** * Gets the details of the Notification specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Notification_Get") get is ArmResourceRead; /** * Create or Update API Management publisher notification. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Notification_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< NotificationContract, { @@ -53,6 +69,8 @@ interface NotificationContracts { /** * Lists a collection of properties defined within a service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Notification_ListByService") listByService is ArmResourceListByParent< NotificationContract, { @@ -77,6 +95,8 @@ interface NotificationContracts { * Gets the list of the Notification Recipient User subscribed to the notification. */ // FIXME: NotificationRecipientUser_ListByNotification could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NotificationRecipientUser_ListByNotification") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers") @get listByNotification( @@ -105,6 +125,8 @@ interface NotificationContracts { * Gets the list of the Notification Recipient Emails subscribed to a notification. */ // FIXME: NotificationRecipientEmail_ListByNotification could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NotificationRecipientEmail_ListByNotification") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails") @get listByNotification( diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp index 3b278b8a77..4040116438 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * OpenId Connect Provider details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model OpenidConnectProviderContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + OpenidConnectProviderContractProperties +) +model OpenidConnectProviderContract extends ProxyResourceBase { /** * Identifier of the OpenID Connect Provider. */ @@ -28,6 +33,12 @@ model OpenidConnectProviderContract @segment("openidConnectProviders") @visibility("read") name: string; + + /** + * OpenId Connect Provider contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: OpenidConnectProviderContractProperties; } @armResourceOperations @@ -35,6 +46,8 @@ interface OpenidConnectProviderContracts { /** * Gets specific OpenID Connect Provider without secrets. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("OpenIdConnectProvider_Get") get is ArmResourceRead< OpenidConnectProviderContract, { @@ -53,6 +66,8 @@ interface OpenidConnectProviderContracts { /** * Creates or updates the OpenID Connect Provider. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("OpenIdConnectProvider_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< OpenidConnectProviderContract, { @@ -77,7 +92,9 @@ interface OpenidConnectProviderContracts { /** * Updates the specific OpenID Connect Provider. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("OpenIdConnectProvider_Update") update is ArmCustomPatchSync< OpenidConnectProviderContract, OpenidConnectProviderUpdateContract, @@ -103,6 +120,8 @@ interface OpenidConnectProviderContracts { /** * Deletes specific OpenID Connect Provider of the API Management service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("OpenIdConnectProvider_Delete") delete is ArmResourceDeleteSync< OpenidConnectProviderContract, { @@ -127,6 +146,8 @@ interface OpenidConnectProviderContracts { /** * Lists of all the OpenId Connect Providers. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("OpenIdConnectProvider_ListByService") listByService is ArmResourceListByParent< OpenidConnectProviderContract, { @@ -156,6 +177,8 @@ interface OpenidConnectProviderContracts { /** * Gets the client secret details of the OpenID Connect Provider. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("OpenIdConnectProvider_ListSecrets") listSecrets is ArmResourceActionSync< OpenidConnectProviderContract, void, @@ -174,9 +197,25 @@ interface OpenidConnectProviderContracts { >; } +@@encodedName(OpenidConnectProviderContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(OpenidConnectProviderContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(OpenidConnectProviderContracts.createOrUpdate::parameters.resource, "Create parameters." ); +@@encodedName(OpenidConnectProviderContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(OpenidConnectProviderContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(OpenidConnectProviderContracts.update::parameters.properties, "Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp index c72073ef85..b02b046b40 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * API Operation details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -model OperationContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(OperationContractProperties) +model OperationContract extends ProxyResourceBase { /** * Operation identifier within an API. Must be unique in the current API Management service instance. */ @@ -27,6 +31,12 @@ model OperationContract is ProxyResource { @segment("operations") @visibility("read") name: string; + + /** + * Properties of the Operation Contract. + */ + @extension("x-ms-client-flatten", true) + properties?: OperationContractProperties; } @armResourceOperations @@ -34,12 +44,16 @@ interface OperationContracts { /** * Gets the details of the API Operation specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiOperation_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the API operation specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("ApiOperation_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< OperationContract, @@ -50,6 +64,8 @@ interface OperationContracts { /** * Creates a new operation in the API or updates an existing one. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiOperation_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< OperationContract, { @@ -66,7 +82,9 @@ interface OperationContracts { /** * Updates the details of the operation in the API specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("ApiOperation_Update") update is ArmCustomPatchSync< OperationContract, OperationUpdateContract, @@ -84,6 +102,8 @@ interface OperationContracts { /** * Deletes the specified operation in the API. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiOperation_Delete") delete is ArmResourceDeleteSync< OperationContract, { @@ -100,6 +120,8 @@ interface OperationContracts { /** * Lists a collection of the operations for the specified API. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiOperation_ListByApi") listByApi is ArmResourceListByParent< OperationContract, { @@ -133,9 +155,25 @@ interface OperationContracts { >; } +@@encodedName(OperationContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(OperationContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(OperationContracts.createOrUpdate::parameters.resource, "Create parameters." ); +@@encodedName(OperationContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(OperationContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(OperationContracts.update::parameters.properties, "API Operation Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp index 362937c23d..67bcb01ed9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Policy Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(OperationContract) -model PolicyContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(PolicyContractProperties) +model PolicyContract extends ProxyResourceBase { /** * The identifier of the Policy. */ @@ -25,6 +29,12 @@ model PolicyContract is ProxyResource { @segment("policies") @visibility("read") name: PolicyIdName; + + /** + * Properties of the Policy. + */ + @extension("x-ms-client-flatten", true) + properties?: PolicyContractProperties; } @armResourceOperations @@ -32,6 +42,8 @@ interface PolicyContracts { /** * Get the policy configuration at the API Operation level. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiOperationPolicy_Get") get is ArmResourceRead< PolicyContract, { @@ -48,7 +60,9 @@ interface PolicyContracts { /** * Gets the entity state (Etag) version of the API operation policy specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("ApiOperationPolicy_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PolicyContract, @@ -59,6 +73,8 @@ interface PolicyContracts { /** * Creates or updates policy configuration for the API Operation level. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiOperationPolicy_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PolicyContract, { @@ -75,6 +91,8 @@ interface PolicyContracts { /** * Deletes the policy configuration at the Api Operation. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiOperationPolicy_Delete") delete is ArmResourceDeleteSync< PolicyContract, { @@ -91,9 +109,19 @@ interface PolicyContracts { /** * Get the list of policy configuration at the API Operation level. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiOperationPolicy_ListByOperation") listByOperation is ArmResourceListByParent; } +@@encodedName(PolicyContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(PolicyContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(PolicyContracts.createOrUpdate::parameters.resource, "The policy contents to apply." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp index 24f2498cec..64a99eaa1c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp @@ -15,14 +15,25 @@ namespace Azure.ResourceManager.ApiManagement; /** * Delegation settings for a developer portal. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("delegation") @parentResource(ApiManagementServiceResource) -model PortalDelegationSettings - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PortalDelegationSettingsProperties +) +model PortalDelegationSettings extends ProxyResourceBase { @key("portalsetting") @segment("portalsettings") @visibility("read") name: string; + + /** + * Delegation settings contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PortalDelegationSettingsProperties; } @armResourceOperations @@ -30,12 +41,16 @@ interface PortalDelegationSettingsOperationGroup { /** * Get Delegation Settings for the Portal. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DelegationSettings_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the DelegationSettings. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("DelegationSettings_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalDelegationSettings, @@ -46,6 +61,8 @@ interface PortalDelegationSettingsOperationGroup { /** * Create or Update Delegation settings. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DelegationSettings_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PortalDelegationSettings, { @@ -62,7 +79,9 @@ interface PortalDelegationSettingsOperationGroup { /** * Update Delegation settings. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("DelegationSettings_Update") update is ArmCustomPatchSync< PortalDelegationSettings, PortalDelegationSettings, @@ -80,11 +99,15 @@ interface PortalDelegationSettingsOperationGroup { /** * Lists a collection of portalsettings defined within a service instance.. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PortalSettings_ListByService") listByService is ArmResourceListByParent; /** * Gets the secret validation key of the DelegationSettings. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("DelegationSettings_ListSecrets") listSecrets is ArmResourceActionSync< PortalDelegationSettings, void, @@ -92,9 +115,25 @@ interface PortalDelegationSettingsOperationGroup { >; } +@@encodedName(PortalDelegationSettingsOperationGroup.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(PortalDelegationSettingsOperationGroup.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(PortalDelegationSettingsOperationGroup.createOrUpdate::parameters.resource, "Create or update parameters." ); +@@encodedName(PortalDelegationSettingsOperationGroup.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(PortalDelegationSettingsOperationGroup.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(PortalDelegationSettingsOperationGroup.update::parameters.properties, "Update Delegation settings." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp index 464dc25192..3744027da1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Portal Revision's contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model PortalRevisionContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PortalRevisionContractProperties +) +model PortalRevisionContract extends ProxyResourceBase { /** * Portal revision identifier. Must be unique in the current API Management service instance. */ @@ -28,6 +33,12 @@ model PortalRevisionContract @segment("portalRevisions") @visibility("read") name: string; + + /** + * Properties of the portal revisions. + */ + @extension("x-ms-client-flatten", true) + properties?: PortalRevisionContractProperties; } @armResourceOperations @@ -35,12 +46,16 @@ interface PortalRevisionContracts { /** * Gets the developer portal's revision specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PortalRevision_Get") get is ArmResourceRead; /** * Gets the developer portal revision specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("PortalRevision_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalRevisionContract, @@ -51,12 +66,16 @@ interface PortalRevisionContracts { /** * Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PortalRevision_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Updates the description of specified portal revision or makes it current. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("PortalRevision_Update") update is ArmCustomPatchAsync< PortalRevisionContract, PortalRevisionContract, @@ -74,6 +93,8 @@ interface PortalRevisionContracts { /** * Lists developer portal's revisions. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PortalRevision_ListByService") listByService is ArmResourceListByParent< PortalRevisionContract, { @@ -107,5 +128,21 @@ interface PortalRevisionContracts { >; } +@@encodedName(PortalRevisionContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(PortalRevisionContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(PortalRevisionContracts.createOrUpdate::parameters.resource, ""); +@@encodedName(PortalRevisionContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(PortalRevisionContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(PortalRevisionContracts.update::parameters.properties, ""); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp index 6d267a073a..00bd38e827 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp @@ -15,13 +15,25 @@ namespace Azure.ResourceManager.ApiManagement; /** * Sign-In settings for the Developer Portal. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("signin") @parentResource(ApiManagementServiceResource) -model PortalSigninSettings is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PortalSigninSettingProperties +) +model PortalSigninSettings extends ProxyResourceBase { @key("portalsetting") @segment("portalsettings") @visibility("read") name: string; + + /** + * Sign-in settings contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PortalSigninSettingProperties; } @armResourceOperations @@ -29,12 +41,16 @@ interface PortalSigninSettingsOperationGroup { /** * Get Sign In Settings for the Portal */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("SignInSettings_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the SignInSettings. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("SignInSettings_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalSigninSettings, @@ -45,6 +61,8 @@ interface PortalSigninSettingsOperationGroup { /** * Create or Update Sign-In settings. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("SignInSettings_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PortalSigninSettings, { @@ -61,7 +79,9 @@ interface PortalSigninSettingsOperationGroup { /** * Update Sign-In settings. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("SignInSettings_Update") update is ArmCustomPatchSync< PortalSigninSettings, PortalSigninSettings, @@ -79,12 +99,30 @@ interface PortalSigninSettingsOperationGroup { /** * Lists a collection of portalsettings defined within a service instance.. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PortalSettings_ListByService") listByService is ArmResourceListByParent; } +@@encodedName(PortalSigninSettingsOperationGroup.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(PortalSigninSettingsOperationGroup.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(PortalSigninSettingsOperationGroup.createOrUpdate::parameters.resource, "Create or update parameters." ); +@@encodedName(PortalSigninSettingsOperationGroup.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(PortalSigninSettingsOperationGroup.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(PortalSigninSettingsOperationGroup.update::parameters.properties, "Update Sign-In settings." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp index 06a900cb81..fda6c5b5de 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp @@ -15,13 +15,25 @@ namespace Azure.ResourceManager.ApiManagement; /** * Sign-Up settings for a developer portal. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("signup") @parentResource(ApiManagementServiceResource) -model PortalSignupSettings is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PortalSignupSettingsProperties +) +model PortalSignupSettings extends ProxyResourceBase { @key("portalsetting") @segment("portalsettings") @visibility("read") name: string; + + /** + * Sign-up settings contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PortalSignupSettingsProperties; } @armResourceOperations @@ -29,12 +41,16 @@ interface PortalSignupSettingsOperationGroup { /** * Get Sign Up Settings for the Portal */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("SignUpSettings_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the SignUpSettings. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("SignUpSettings_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalSignupSettings, @@ -45,6 +61,8 @@ interface PortalSignupSettingsOperationGroup { /** * Create or Update Sign-Up settings. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("SignUpSettings_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PortalSignupSettings, { @@ -61,7 +79,9 @@ interface PortalSignupSettingsOperationGroup { /** * Update Sign-Up settings. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("SignUpSettings_Update") update is ArmCustomPatchSync< PortalSignupSettings, PortalSignupSettings, @@ -79,12 +99,30 @@ interface PortalSignupSettingsOperationGroup { /** * Lists a collection of portalsettings defined within a service instance.. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PortalSettings_ListByService") listByService is ArmResourceListByParent; } +@@encodedName(PortalSignupSettingsOperationGroup.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(PortalSignupSettingsOperationGroup.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(PortalSignupSettingsOperationGroup.createOrUpdate::parameters.resource, "Create or update parameters." ); +@@encodedName(PortalSignupSettingsOperationGroup.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(PortalSignupSettingsOperationGroup.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(PortalSignupSettingsOperationGroup.update::parameters.properties, "Update Sign-Up settings." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp index 41e499fa41..f8c0de653c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * The Private Endpoint Connection resource. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model PrivateEndpointConnection - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PrivateEndpointConnectionProperties +) +model PrivateEndpointConnection extends ProxyResourceBase { /** * Name of the private endpoint connection. */ @@ -26,6 +31,12 @@ model PrivateEndpointConnection @segment("privateEndpointConnections") @visibility("read") name: string; + + /** + * Resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PrivateEndpointConnectionProperties; } @armResourceOperations @@ -33,22 +44,38 @@ interface PrivateEndpointConnections { /** * Gets the details of the Private Endpoint Connection specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateEndpointConnection_GetByName") getByName is ArmResourceRead; /** * Creates a new Private Endpoint Connection or updates an existing one. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateEndpointConnection_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync; /** * Deletes the specified Private Endpoint Connection. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateEndpointConnection_Delete") delete is ArmResourceDeleteAsync; /** * Lists all private endpoint connections of the API Management service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateEndpointConnection_ListByService") listByService is ArmResourceListByParent; } +@@encodedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, + "application/json", + "privateEndpointConnectionRequest" +); +@@extension(PrivateEndpointConnections.createOrUpdate::parameters.resource, + "x-ms-client-name", + "privateEndpointConnectionRequest" +); @@doc(PrivateEndpointConnections.createOrUpdate::parameters.resource, ""); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp index d5f9bf6cd0..3e41c2f853 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp @@ -15,8 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * A private link resource */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model PrivateLinkResource is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PrivateLinkResourceProperties +) +model PrivateLinkResource extends ProxyResourceBase { /** * Name of the private link resource. */ @@ -25,6 +31,12 @@ model PrivateLinkResource is ProxyResource { @segment("privateLinkResources") @visibility("read") name: string; + + /** + * Resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PrivateLinkResourceProperties; } @armResourceOperations @@ -32,10 +44,14 @@ interface PrivateLinkResources { /** * Gets the private link resources */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateEndpointConnection_GetPrivateLinkResource") getPrivateLinkResource is ArmResourceRead; /** * Gets the private link resources */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateEndpointConnection_ListPrivateLinkResources") listPrivateLinkResources is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp index 37acbe889a..8bc7549d15 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Product details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model ProductContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ProductContractProperties) +model ProductContract extends ProxyResourceBase { /** * Product identifier. Must be unique in the current API Management service instance. */ @@ -27,6 +31,12 @@ model ProductContract is ProxyResource { @segment("products") @visibility("read") name: string; + + /** + * Product entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: ProductContractProperties; } @armResourceOperations @@ -34,12 +44,16 @@ interface ProductContracts { /** * Gets the details of the product specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Product_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the product specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("Product_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< ProductContract, @@ -50,6 +64,8 @@ interface ProductContracts { /** * Creates or Updates a product. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Product_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< ProductContract, { @@ -66,7 +82,9 @@ interface ProductContracts { /** * Update existing product details. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("Product_Update") update is ArmCustomPatchSync< ProductContract, ProductUpdateParameters, @@ -84,6 +102,8 @@ interface ProductContracts { /** * Delete product. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Product_Delete") delete is ArmResourceDeleteSync< ProductContract, { @@ -106,6 +126,8 @@ interface ProductContracts { /** * Lists a collection of products in the specified service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Product_ListByService") listByService is ArmResourceListByParent< ProductContract, { @@ -148,6 +170,8 @@ interface ProductContracts { * Lists a collection of the APIs associated with a product. */ // FIXME: ProductApi_ListByProduct could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ProductApi_ListByProduct") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis") @get listByProduct( @@ -197,6 +221,8 @@ interface ProductContracts { * Lists the collection of developer groups associated with the specified product. */ // FIXME: ProductGroup_ListByProduct could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ProductGroup_ListByProduct") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups") @get listByProduct( @@ -246,6 +272,8 @@ interface ProductContracts { * Lists the collection of subscriptions to the specified product. */ // FIXME: ProductSubscriptions_List could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ProductSubscriptions_List") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions") @get list( @@ -292,7 +320,23 @@ interface ProductContracts { ): ArmResponse> | ErrorResponse; } +@@encodedName(ProductContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(ProductContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(ProductContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); +@@encodedName(ProductContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(ProductContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(ProductContracts.update::parameters.properties, "Update parameters."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp index 7a60517261..23c934ad6d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * API Schema Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -model SchemaContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(SchemaContractProperties) +model SchemaContract extends ProxyResourceBase { /** * Schema id identifier. Must be unique in the current API Management service instance. */ @@ -27,6 +31,12 @@ model SchemaContract is ProxyResource { @segment("schemas") @visibility("read") name: string; + + /** + * Properties of the API Schema. + */ + @extension("x-ms-client-flatten", true) + properties?: SchemaContractProperties; } @armResourceOperations @@ -34,12 +44,16 @@ interface SchemaContracts { /** * Get the schema configuration at the API level. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiSchema_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the schema specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("ApiSchema_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< SchemaContract, @@ -50,6 +64,8 @@ interface SchemaContracts { /** * Creates or updates schema configuration for the API. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiSchema_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceAsync< SchemaContract, { @@ -66,6 +82,8 @@ interface SchemaContracts { /** * Deletes the schema configuration at the Api. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiSchema_Delete") delete is ArmResourceDeleteSync< SchemaContract, { @@ -88,6 +106,8 @@ interface SchemaContracts { /** * Get the schema configuration at the API level. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiSchema_ListByApi") listByApi is ArmResourceListByParent< SchemaContract, { @@ -115,6 +135,14 @@ interface SchemaContracts { >; } +@@encodedName(SchemaContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(SchemaContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(SchemaContracts.createOrUpdate::parameters.resource, "The schema contents to apply." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp index 892c3cd82d..aa7771a587 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp @@ -15,8 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Subscription details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model SubscriptionContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + SubscriptionContractProperties +) +model SubscriptionContract extends ProxyResourceBase { /** * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ @@ -25,6 +31,12 @@ model SubscriptionContract is ProxyResource { @segment("subscriptions") @visibility("read") name: string; + + /** + * Subscription contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: SubscriptionContractProperties; } @armResourceOperations @@ -32,12 +44,16 @@ interface SubscriptionContracts { /** * Gets the specified Subscription entity. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Subscription_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("Subscription_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< SubscriptionContract, @@ -48,6 +64,8 @@ interface SubscriptionContracts { /** * Creates or updates the subscription of specified user to the specified product. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Subscription_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< SubscriptionContract, { @@ -78,7 +96,9 @@ interface SubscriptionContracts { /** * Updates the details of a subscription specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("Subscription_Update") update is ArmCustomPatchSync< SubscriptionContract, SubscriptionUpdateParameters, @@ -110,6 +130,8 @@ interface SubscriptionContracts { /** * Deletes the specified subscription. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Subscription_Delete") delete is ArmResourceDeleteSync< SubscriptionContract, { @@ -126,6 +148,8 @@ interface SubscriptionContracts { /** * Lists all subscriptions of the API Management service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Subscription_List") list is ArmResourceListByParent< SubscriptionContract, { @@ -155,6 +179,8 @@ interface SubscriptionContracts { /** * Regenerates primary key of existing subscription of the API Management service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Subscription_RegeneratePrimaryKey") regeneratePrimaryKey is ArmResourceActionNoContentSync< SubscriptionContract, void @@ -163,6 +189,8 @@ interface SubscriptionContracts { /** * Regenerates secondary key of existing subscription of the API Management service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Subscription_RegenerateSecondaryKey") regenerateSecondaryKey is ArmResourceActionNoContentSync< SubscriptionContract, void @@ -171,6 +199,8 @@ interface SubscriptionContracts { /** * Gets the specified Subscription keys. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Subscription_ListSecrets") listSecrets is ArmResourceActionSync< SubscriptionContract, void, @@ -178,9 +208,25 @@ interface SubscriptionContracts { >; } +@@encodedName(SubscriptionContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(SubscriptionContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(SubscriptionContracts.createOrUpdate::parameters.resource, "Create parameters." ); +@@encodedName(SubscriptionContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(SubscriptionContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(SubscriptionContracts.update::parameters.properties, "Update parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp index 821a4d59ec..854ec1a34f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * Tag Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(OperationContract) -model TagContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(TagContractProperties) +model TagContract extends ProxyResourceBase { /** * Tag identifier. Must be unique in the current API Management service instance. */ @@ -28,6 +32,12 @@ model TagContract is ProxyResource { @segment("tags") @visibility("read") name: string; + + /** + * Tag entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: TagContractProperties; } @armResourceOperations @@ -35,12 +45,16 @@ interface TagContracts { /** * Get tag associated with the Operation. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Tag_GetByOperation") getByOperation is ArmResourceRead; /** * Gets the entity state version of the tag specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("Tag_GetEntityStateByOperation") getEntityStateByOperation( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; @@ -48,16 +62,22 @@ interface TagContracts { /** * Assign tag to the Operation. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Tag_AssignToOperation") assignToOperation is ArmResourceCreateOrReplaceSync; /** * Detach the tag from the Operation. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Tag_DetachFromOperation") detachFromOperation is ArmResourceDeleteSync; /** * Lists all Tags associated with the Operation. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Tag_ListByOperation") listByOperation is ArmResourceListByParent< TagContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp index 0d963aa7f2..d2a3983192 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Contract details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiContract) -model TagDescriptionContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + TagDescriptionContractProperties +) +model TagDescriptionContract extends ProxyResourceBase { /** * Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. */ @@ -29,6 +34,12 @@ model TagDescriptionContract @segment("tagDescriptions") @visibility("read") name: string; + + /** + * TagDescription entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: TagDescriptionContractProperties; } @armResourceOperations @@ -36,12 +47,16 @@ interface TagDescriptionContracts { /** * Get Tag description in scope of API */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiTagDescription_Get") get is ArmResourceRead; /** * Gets the entity state version of the tag specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("ApiTagDescription_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< TagDescriptionContract, @@ -52,6 +67,8 @@ interface TagDescriptionContracts { /** * Create/Update tag description in scope of the Api. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiTagDescription_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< TagDescriptionContract, { @@ -68,6 +85,8 @@ interface TagDescriptionContracts { /** * Delete tag description for the Api. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiTagDescription_Delete") delete is ArmResourceDeleteSync< TagDescriptionContract, { @@ -84,6 +103,8 @@ interface TagDescriptionContracts { /** * Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiTagDescription_ListByService") listByService is ArmResourceListByParent< TagDescriptionContract, { @@ -111,6 +132,14 @@ interface TagDescriptionContracts { >; } +@@encodedName(TagDescriptionContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(TagDescriptionContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(TagDescriptionContracts.createOrUpdate::parameters.resource, "Create parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp index 091b05f957..ceb430debf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp @@ -15,9 +15,14 @@ namespace Azure.ResourceManager.ApiManagement; /** * Tenant Settings. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model TenantSettingsContract - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + TenantSettingsContractProperties +) +model TenantSettingsContract extends ProxyResourceBase { /** * The identifier of the settings. */ @@ -26,6 +31,12 @@ model TenantSettingsContract @segment("settings") @visibility("read") name: SettingsTypeName; + + /** + * TenantSettings entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: TenantSettingsContractProperties; } @armResourceOperations @@ -33,11 +44,15 @@ interface TenantSettingsContracts { /** * Get tenant settings. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantSettings_Get") get is ArmResourceRead; /** * Public settings. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantSettings_ListByService") listByService is ArmResourceListByParent< TenantSettingsContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp index 6bee08993b..1ee0818d0e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp @@ -15,8 +15,12 @@ namespace Azure.ResourceManager.ApiManagement; /** * User details. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(ApiManagementServiceResource) -model UserContract is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(UserContractProperties) +model UserContract extends ProxyResourceBase { /** * User identifier. Must be unique in the current API Management service instance. */ @@ -27,6 +31,12 @@ model UserContract is ProxyResource { @segment("users") @visibility("read") name: string; + + /** + * User entity contract properties. + */ + @extension("x-ms-client-flatten", true) + properties?: UserContractProperties; } @armResourceOperations @@ -34,12 +44,16 @@ interface UserContracts { /** * Gets the details of the user specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("User_Get") get is ArmResourceRead; /** * Gets the entity state (Etag) version of the user specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @head + @operationId("User_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; @@ -47,6 +61,8 @@ interface UserContracts { /** * Creates or Updates a user. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("User_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< UserContract, { @@ -69,7 +85,9 @@ interface UserContracts { /** * Updates the details of the user specified by its identifier. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("User_Update") update is ArmCustomPatchSync< UserContract, UserUpdateParameters, @@ -87,6 +105,8 @@ interface UserContracts { /** * Deletes specific user. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("User_Delete") delete is ArmResourceDeleteSync< UserContract, { @@ -121,6 +141,8 @@ interface UserContracts { /** * Lists a collection of registered users in the specified service instance. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("User_ListByService") listByService is ArmResourceListByParent< UserContract, { @@ -156,6 +178,8 @@ interface UserContracts { /** * Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("User_GenerateSsoUrl") generateSsoUrl is ArmResourceActionSync< UserContract, void, @@ -165,6 +189,8 @@ interface UserContracts { /** * Gets the Shared Access Authorization Token for the User. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("User_GetSharedAccessToken") getSharedAccessToken is ArmResourceActionSync< UserContract, UserTokenParameters, @@ -174,6 +200,8 @@ interface UserContracts { /** * Sends confirmation */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("UserConfirmationPassword_Send") send is ArmResourceActionNoContentSync< UserContract, void, @@ -192,6 +220,8 @@ interface UserContracts { * Lists all user groups. */ // FIXME: UserGroup_List could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("UserGroup_List") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups") @get list( @@ -241,6 +271,8 @@ interface UserContracts { * List of all user identities. */ // FIXME: UserIdentities_List could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("UserIdentities_List") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities") @get list( @@ -268,10 +300,34 @@ interface UserContracts { ): ArmResponse | ErrorResponse; } +@@encodedName(UserContracts.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(UserContracts.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(UserContracts.createOrUpdate::parameters.resource, "Create or update parameters." ); +@@encodedName(UserContracts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(UserContracts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(UserContracts.update::parameters.properties, "Update parameters."); +@@encodedName(UserContracts.getSharedAccessToken::parameters.body, + "application/json", + "parameters" +); +@@extension(UserContracts.getSharedAccessToken::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(UserContracts.getSharedAccessToken::parameters.body, "Create Authorization Token parameters." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp index c1c5fcd36c..0d70af62b0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp @@ -106,7 +106,7 @@ interface RoleAssignments { } @@encodedName(RoleAssignments.create::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(RoleAssignments.create::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp index 62e1e1dbe3..bd9c5c9a88 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp @@ -83,7 +83,7 @@ interface RoleAssignmentScheduleRequests { } @@encodedName(RoleAssignmentScheduleRequests.create::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(RoleAssignmentScheduleRequests.create::parameters.resource, @@ -94,7 +94,7 @@ interface RoleAssignmentScheduleRequests { "Parameters for the role assignment schedule request." ); @@encodedName(RoleAssignmentScheduleRequests.validate::parameters.body, - "json", + "application/json", "parameters" ); @@extension(RoleAssignmentScheduleRequests.validate::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp index 16a3d1a66b..c2dbc6cc1c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp @@ -72,7 +72,7 @@ interface RoleDefinitions { } @@encodedName(RoleDefinitions.createOrUpdate::parameters.resource, - "json", + "application/json", "roleDefinition" ); @@extension(RoleDefinitions.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp index 443771ecff..e57c044191 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp @@ -83,7 +83,7 @@ interface RoleEligibilityScheduleRequests { } @@encodedName(RoleEligibilityScheduleRequests.create::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(RoleEligibilityScheduleRequests.create::parameters.resource, @@ -94,7 +94,7 @@ interface RoleEligibilityScheduleRequests { "Parameters for the role eligibility schedule request." ); @@encodedName(RoleEligibilityScheduleRequests.validate::parameters.body, - "json", + "application/json", "parameters" ); @@extension(RoleEligibilityScheduleRequests.validate::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp index a1546b081d..f8ca09ee6e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp @@ -59,7 +59,7 @@ interface RoleManagementPolicies { } @@encodedName(RoleManagementPolicies.update::parameters.properties, - "json", + "application/json", "parameters" ); @@extension(RoleManagementPolicies.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp index fc3a6ce951..dd923a5701 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp @@ -58,7 +58,7 @@ interface RoleManagementPolicyAssignments { } @@encodedName(RoleManagementPolicyAssignments.create::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(RoleManagementPolicyAssignments.create::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp index 16193a8d56..ac6a65988d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp @@ -54,6 +54,8 @@ interface Applications { /** * List Application resources by Space */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Applications_ListBySpace") listBySpace is ArmResourceListByParent< Application, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp index 12c9f3279f..1ce9d54810 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp @@ -54,6 +54,8 @@ interface BusinessProcesses { /** * List BusinessProcess resources by Application */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BusinessProcesses_ListByApplication") listByApplication is ArmResourceListByParent< BusinessProcess, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp index e74fbe9172..5fd1bd3c7e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp @@ -37,6 +37,8 @@ interface BusinessProcessVersions { /** * List BusinessProcessVersion resources by BusinessProcess */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BusinessProcessVersions_ListByBusinessProcess") listByBusinessProcess is ArmResourceListByParent< BusinessProcessVersion, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp index 4fdc5f00e8..30c7712aad 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp @@ -58,6 +58,8 @@ interface InfrastructureResources { /** * List InfrastructureResource resources by Space */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("InfrastructureResources_ListBySpace") listBySpace is ArmResourceListByParent< InfrastructureResource, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp index ffc9feaef4..839ca404f0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp @@ -52,6 +52,8 @@ interface Spaces { /** * List Space resources by resource group */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Spaces_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent< Space, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp index b5c662dff0..f089b8d095 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp @@ -95,7 +95,7 @@ interface AvailabilitySets { } @@encodedName(AvailabilitySets.createOrUpdate::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(AvailabilitySets.createOrUpdate::parameters.resource, @@ -106,7 +106,7 @@ interface AvailabilitySets { "Parameters supplied to the Create Availability Set operation." ); @@encodedName(AvailabilitySets.update::parameters.properties, - "json", + "application/json", "parameters" ); @@extension(AvailabilitySets.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp index fcd47770af..3f41f7eaa8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp @@ -89,7 +89,7 @@ interface CapacityReservations { } @@encodedName(CapacityReservations.createOrUpdate::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(CapacityReservations.createOrUpdate::parameters.resource, @@ -100,7 +100,7 @@ interface CapacityReservations { "Parameters supplied to the Create capacity reservation." ); @@encodedName(CapacityReservations.update::parameters.properties, - "json", + "application/json", "parameters" ); @@extension(CapacityReservations.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp index 2a26bc5d95..c8cd9aeb7c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp @@ -101,7 +101,7 @@ interface CapacityReservationGroups { } @@encodedName(CapacityReservationGroups.createOrUpdate::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(CapacityReservationGroups.createOrUpdate::parameters.resource, @@ -112,7 +112,7 @@ interface CapacityReservationGroups { "Parameters supplied to the Create capacity reservation Group." ); @@encodedName(CapacityReservationGroups.update::parameters.properties, - "json", + "application/json", "parameters" ); @@extension(CapacityReservationGroups.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp index aa70ba689b..9afc0f144b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp @@ -201,7 +201,7 @@ interface CloudServices { } @@encodedName(CloudServices.createOrUpdate::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(CloudServices.createOrUpdate::parameters.resource, @@ -212,7 +212,7 @@ interface CloudServices { "The cloud service object." ); @@encodedName(CloudServices.update::parameters.properties, - "json", + "application/json", "parameters" ); @@extension(CloudServices.update::parameters.properties, @@ -220,7 +220,10 @@ interface CloudServices { "parameters" ); @@doc(CloudServices.update::parameters.properties, "The cloud service object."); -@@encodedName(CloudServices.restart::parameters.body, "json", "parameters"); +@@encodedName(CloudServices.restart::parameters.body, + "application/json", + "parameters" +); @@extension(CloudServices.restart::parameters.body, "x-ms-client-name", "parameters" @@ -228,7 +231,10 @@ interface CloudServices { @@doc(CloudServices.restart::parameters.body, "List of cloud service role instance names." ); -@@encodedName(CloudServices.reimage::parameters.body, "json", "parameters"); +@@encodedName(CloudServices.reimage::parameters.body, + "application/json", + "parameters" +); @@extension(CloudServices.reimage::parameters.body, "x-ms-client-name", "parameters" @@ -236,7 +242,10 @@ interface CloudServices { @@doc(CloudServices.reimage::parameters.body, "List of cloud service role instance names." ); -@@encodedName(CloudServices.rebuild::parameters.body, "json", "parameters"); +@@encodedName(CloudServices.rebuild::parameters.body, + "application/json", + "parameters" +); @@extension(CloudServices.rebuild::parameters.body, "x-ms-client-name", "parameters" @@ -245,7 +254,7 @@ interface CloudServices { "List of cloud service role instance names." ); @@encodedName(CloudServices.deleteInstances::parameters.body, - "json", + "application/json", "parameters" ); @@extension(CloudServices.deleteInstances::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp index bd674e21b8..0dc0c47178 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp @@ -116,7 +116,7 @@ interface DedicatedHosts { } @@encodedName(DedicatedHosts.createOrUpdate::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(DedicatedHosts.createOrUpdate::parameters.resource, @@ -127,7 +127,7 @@ interface DedicatedHosts { "Parameters supplied to the Create Dedicated Host." ); @@encodedName(DedicatedHosts.update::parameters.properties, - "json", + "application/json", "parameters" ); @@extension(DedicatedHosts.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp index 7dc5eb67f6..cdd970b426 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp @@ -87,7 +87,7 @@ interface DedicatedHostGroups { } @@encodedName(DedicatedHostGroups.createOrUpdate::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(DedicatedHostGroups.createOrUpdate::parameters.resource, @@ -98,7 +98,7 @@ interface DedicatedHostGroups { "Parameters supplied to the Create Dedicated Host Group." ); @@encodedName(DedicatedHostGroups.update::parameters.properties, - "json", + "application/json", "parameters" ); @@extension(DedicatedHostGroups.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp index d502489de6..229c5c2c2d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp @@ -107,7 +107,10 @@ interface Disks { revokeAccess is ArmResourceActionAsync; } -@@encodedName(Disks.createOrUpdate::parameters.resource, "json", "disk"); +@@encodedName(Disks.createOrUpdate::parameters.resource, + "application/json", + "disk" +); @@extension(Disks.createOrUpdate::parameters.resource, "x-ms-client-name", "disk" @@ -115,12 +118,15 @@ interface Disks { @@doc(Disks.createOrUpdate::parameters.resource, "Disk object supplied in the body of the Put disk operation." ); -@@encodedName(Disks.update::parameters.properties, "json", "disk"); +@@encodedName(Disks.update::parameters.properties, "application/json", "disk"); @@extension(Disks.update::parameters.properties, "x-ms-client-name", "disk"); @@doc(Disks.update::parameters.properties, "Disk object supplied in the body of the Patch disk operation." ); -@@encodedName(Disks.grantAccess::parameters.body, "json", "grantAccessData"); +@@encodedName(Disks.grantAccess::parameters.body, + "application/json", + "grantAccessData" +); @@extension(Disks.grantAccess::parameters.body, "x-ms-client-name", "grantAccessData" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp index 6380e2e994..6cd0c78c14 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp @@ -91,7 +91,7 @@ interface DiskAccesses { } @@encodedName(DiskAccesses.createOrUpdate::parameters.resource, - "json", + "application/json", "diskAccess" ); @@extension(DiskAccesses.createOrUpdate::parameters.resource, @@ -101,7 +101,10 @@ interface DiskAccesses { @@doc(DiskAccesses.createOrUpdate::parameters.resource, "disk access object supplied in the body of the Put disk access operation." ); -@@encodedName(DiskAccesses.update::parameters.properties, "json", "diskAccess"); +@@encodedName(DiskAccesses.update::parameters.properties, + "application/json", + "diskAccess" +); @@extension(DiskAccesses.update::parameters.properties, "x-ms-client-name", "diskAccess" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp index 91c18c7729..622a53ed63 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp @@ -91,7 +91,7 @@ interface DiskEncryptionSets { } @@encodedName(DiskEncryptionSets.createOrUpdate::parameters.resource, - "json", + "application/json", "diskEncryptionSet" ); @@extension(DiskEncryptionSets.createOrUpdate::parameters.resource, @@ -102,7 +102,7 @@ interface DiskEncryptionSets { "disk encryption set object supplied in the body of the Put disk encryption set operation." ); @@encodedName(DiskEncryptionSets.update::parameters.properties, - "json", + "application/json", "diskEncryptionSet" ); @@extension(DiskEncryptionSets.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp index 693a7f190b..ac556b9f75 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp @@ -116,7 +116,7 @@ interface DiskRestorePoints { } @@encodedName(DiskRestorePoints.grantAccess::parameters.body, - "json", + "application/json", "grantAccessData" ); @@extension(DiskRestorePoints.grantAccess::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp index e52099da25..2e465110fd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp @@ -94,7 +94,10 @@ interface Galleries { update is ArmResourceActionAsync; } -@@encodedName(Galleries.createOrUpdate::parameters.resource, "json", "gallery"); +@@encodedName(Galleries.createOrUpdate::parameters.resource, + "application/json", + "gallery" +); @@extension(Galleries.createOrUpdate::parameters.resource, "x-ms-client-name", "gallery" @@ -102,7 +105,10 @@ interface Galleries { @@doc(Galleries.createOrUpdate::parameters.resource, "Parameters supplied to the create or update Shared Image Gallery operation." ); -@@encodedName(Galleries.update::parameters.properties, "json", "gallery"); +@@encodedName(Galleries.update::parameters.properties, + "application/json", + "gallery" +); @@extension(Galleries.update::parameters.properties, "x-ms-client-name", "gallery" @@ -110,7 +116,10 @@ interface Galleries { @@doc(Galleries.update::parameters.properties, "Parameters supplied to the update Shared Image Gallery operation." ); -@@encodedName(Galleries.update::parameters.body, "json", "sharingUpdate"); +@@encodedName(Galleries.update::parameters.body, + "application/json", + "sharingUpdate" +); @@extension(Galleries.update::parameters.body, "x-ms-client-name", "sharingUpdate" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp index 7e08b8a2f0..53e9211d53 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp @@ -68,7 +68,7 @@ interface GalleryApplications { } @@encodedName(GalleryApplications.createOrUpdate::parameters.resource, - "json", + "application/json", "galleryApplication" ); @@extension(GalleryApplications.createOrUpdate::parameters.resource, @@ -79,7 +79,7 @@ interface GalleryApplications { "Parameters supplied to the create or update gallery Application operation." ); @@encodedName(GalleryApplications.update::parameters.properties, - "json", + "application/json", "galleryApplication" ); @@extension(GalleryApplications.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp index 54e18ae54a..8fa0b9ca67 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp @@ -82,7 +82,7 @@ interface GalleryApplicationVersions { } @@encodedName(GalleryApplicationVersions.createOrUpdate::parameters.resource, - "json", + "application/json", "galleryApplicationVersion" ); @@extension(GalleryApplicationVersions.createOrUpdate::parameters.resource, @@ -93,7 +93,7 @@ interface GalleryApplicationVersions { "Parameters supplied to the create or update gallery Application Version operation." ); @@encodedName(GalleryApplicationVersions.update::parameters.properties, - "json", + "application/json", "galleryApplicationVersion" ); @@extension(GalleryApplicationVersions.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp index 74112e3b3b..874ed3c1e3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp @@ -68,7 +68,7 @@ interface GalleryImages { } @@encodedName(GalleryImages.createOrUpdate::parameters.resource, - "json", + "application/json", "galleryImage" ); @@extension(GalleryImages.createOrUpdate::parameters.resource, @@ -79,7 +79,7 @@ interface GalleryImages { "Parameters supplied to the create or update gallery image operation." ); @@encodedName(GalleryImages.update::parameters.properties, - "json", + "application/json", "galleryImage" ); @@extension(GalleryImages.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp index b06141fdc5..aff2656ca8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp @@ -79,7 +79,7 @@ interface GalleryImageVersions { } @@encodedName(GalleryImageVersions.createOrUpdate::parameters.resource, - "json", + "application/json", "galleryImageVersion" ); @@extension(GalleryImageVersions.createOrUpdate::parameters.resource, @@ -90,7 +90,7 @@ interface GalleryImageVersions { "Parameters supplied to the create or update gallery image version operation." ); @@encodedName(GalleryImageVersions.update::parameters.properties, - "json", + "application/json", "galleryImageVersion" ); @@extension(GalleryImageVersions.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp index 8345c184bf..d26977a281 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp @@ -86,7 +86,10 @@ interface Images { list is ArmListBySubscription; } -@@encodedName(Images.createOrUpdate::parameters.resource, "json", "parameters"); +@@encodedName(Images.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); @@extension(Images.createOrUpdate::parameters.resource, "x-ms-client-name", "parameters" @@ -94,7 +97,10 @@ interface Images { @@doc(Images.createOrUpdate::parameters.resource, "Parameters supplied to the Create Image operation." ); -@@encodedName(Images.update::parameters.properties, "json", "parameters"); +@@encodedName(Images.update::parameters.properties, + "application/json", + "parameters" +); @@extension(Images.update::parameters.properties, "x-ms-client-name", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp index fda50e2494..cfd4dc89d7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp @@ -80,7 +80,7 @@ interface PrivateEndpointConnections { } @@encodedName(PrivateEndpointConnections.updateAPrivateEndpointConnection::parameters.resource, - "json", + "application/json", "privateEndpointConnection" ); @@extension(PrivateEndpointConnections.updateAPrivateEndpointConnection::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp index c77d9dec38..2d9450473a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp @@ -90,7 +90,7 @@ interface ProximityPlacementGroups { } @@encodedName(ProximityPlacementGroups.createOrUpdate::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(ProximityPlacementGroups.createOrUpdate::parameters.resource, @@ -101,7 +101,7 @@ interface ProximityPlacementGroups { "Parameters supplied to the Create Proximity Placement Group operation." ); @@encodedName(ProximityPlacementGroups.update::parameters.properties, - "json", + "application/json", "parameters" ); @@extension(ProximityPlacementGroups.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp index 0fa18670f3..9af5bc6a3e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp @@ -93,7 +93,10 @@ interface RestorePoints { >; } -@@encodedName(RestorePoints.create::parameters.resource, "json", "parameters"); +@@encodedName(RestorePoints.create::parameters.resource, + "application/json", + "parameters" +); @@extension(RestorePoints.create::parameters.resource, "x-ms-client-name", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp index e9aa52e3ae..5b37ad082a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp @@ -122,7 +122,7 @@ interface RestorePointCollections { } @@encodedName(RestorePointCollections.createOrUpdate::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(RestorePointCollections.createOrUpdate::parameters.resource, @@ -133,7 +133,7 @@ interface RestorePointCollections { "Parameters supplied to the Create or Update restore point collection operation." ); @@encodedName(RestorePointCollections.update::parameters.properties, - "json", + "application/json", "parameters" ); @@extension(RestorePointCollections.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp index b0aea4726d..f6ff9d07c7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp @@ -97,7 +97,7 @@ interface Snapshots { } @@encodedName(Snapshots.createOrUpdate::parameters.resource, - "json", + "application/json", "snapshot" ); @@extension(Snapshots.createOrUpdate::parameters.resource, @@ -107,7 +107,10 @@ interface Snapshots { @@doc(Snapshots.createOrUpdate::parameters.resource, "Snapshot object supplied in the body of the Put disk operation." ); -@@encodedName(Snapshots.update::parameters.properties, "json", "snapshot"); +@@encodedName(Snapshots.update::parameters.properties, + "application/json", + "snapshot" +); @@extension(Snapshots.update::parameters.properties, "x-ms-client-name", "snapshot" @@ -116,7 +119,7 @@ interface Snapshots { "Snapshot object supplied in the body of the Patch snapshot operation." ); @@encodedName(Snapshots.grantAccess::parameters.body, - "json", + "application/json", "grantAccessData" ); @@extension(Snapshots.grantAccess::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp index 78cbed4e14..5f08ec3504 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp @@ -95,7 +95,7 @@ interface SshPublicKeyResources { } @@encodedName(SshPublicKeyResources.create::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(SshPublicKeyResources.create::parameters.resource, @@ -106,7 +106,7 @@ interface SshPublicKeyResources { "Parameters supplied to create the SSH public key." ); @@encodedName(SshPublicKeyResources.update::parameters.properties, - "json", + "application/json", "parameters" ); @@extension(SshPublicKeyResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp index b883d0f0c1..3d74286e6e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp @@ -325,7 +325,7 @@ interface VirtualMachines { } @@encodedName(VirtualMachines.createOrUpdate::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(VirtualMachines.createOrUpdate::parameters.resource, @@ -336,7 +336,7 @@ interface VirtualMachines { "Parameters supplied to the Create Virtual Machine operation." ); @@encodedName(VirtualMachines.update::parameters.properties, - "json", + "application/json", "parameters" ); @@extension(VirtualMachines.update::parameters.properties, @@ -346,7 +346,10 @@ interface VirtualMachines { @@doc(VirtualMachines.update::parameters.properties, "Parameters supplied to the Update Virtual Machine operation." ); -@@encodedName(VirtualMachines.capture::parameters.body, "json", "parameters"); +@@encodedName(VirtualMachines.capture::parameters.body, + "application/json", + "parameters" +); @@extension(VirtualMachines.capture::parameters.body, "x-ms-client-name", "parameters" @@ -354,7 +357,10 @@ interface VirtualMachines { @@doc(VirtualMachines.capture::parameters.body, "Parameters supplied to the Capture Virtual Machine operation." ); -@@encodedName(VirtualMachines.reimage::parameters.body, "json", "parameters"); +@@encodedName(VirtualMachines.reimage::parameters.body, + "application/json", + "parameters" +); @@extension(VirtualMachines.reimage::parameters.body, "x-ms-client-name", "parameters" @@ -363,7 +369,7 @@ interface VirtualMachines { "Parameters supplied to the Reimage Virtual Machine operation." ); @@encodedName(VirtualMachines.installPatches::parameters.body, - "json", + "application/json", "installPatchesInput" ); @@extension(VirtualMachines.installPatches::parameters.body, @@ -374,7 +380,7 @@ interface VirtualMachines { "Input for InstallPatches as directly received by the API" ); @@encodedName(VirtualMachines.runCommand::parameters.body, - "json", + "application/json", "parameters" ); @@extension(VirtualMachines.runCommand::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp index ff3340804b..b7563ad163 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp @@ -93,7 +93,7 @@ interface VirtualMachineExtensions { } @@encodedName(VirtualMachineExtensions.createOrUpdate::parameters.resource, - "json", + "application/json", "extensionParameters" ); @@extension(VirtualMachineExtensions.createOrUpdate::parameters.resource, @@ -104,7 +104,7 @@ interface VirtualMachineExtensions { "Parameters supplied to the Create Virtual Machine Extension operation." ); @@encodedName(VirtualMachineExtensions.update::parameters.properties, - "json", + "application/json", "extensionParameters" ); @@extension(VirtualMachineExtensions.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp index 9887f4f408..738ecf6bce 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp @@ -105,7 +105,7 @@ interface VirtualMachineRunCommands { } @@encodedName(VirtualMachineRunCommands.createOrUpdate::parameters.resource, - "json", + "application/json", "runCommand" ); @@extension(VirtualMachineRunCommands.createOrUpdate::parameters.resource, @@ -116,7 +116,7 @@ interface VirtualMachineRunCommands { "Parameters supplied to the Create Virtual Machine RunCommand operation." ); @@encodedName(VirtualMachineRunCommands.update::parameters.properties, - "json", + "application/json", "runCommand" ); @@extension(VirtualMachineRunCommands.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp index 04692f9595..0b0ed92da1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp @@ -572,7 +572,7 @@ interface VirtualMachineScaleSets { } @@encodedName(VirtualMachineScaleSets.createOrUpdate::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(VirtualMachineScaleSets.createOrUpdate::parameters.resource, @@ -583,7 +583,7 @@ interface VirtualMachineScaleSets { "The scale set object." ); @@encodedName(VirtualMachineScaleSets.update::parameters.properties, - "json", + "application/json", "parameters" ); @@extension(VirtualMachineScaleSets.update::parameters.properties, @@ -594,7 +594,7 @@ interface VirtualMachineScaleSets { "The scale set object." ); @@encodedName(VirtualMachineScaleSets.deallocate::parameters.body, - "json", + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.deallocate::parameters.body, @@ -605,7 +605,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.deleteInstances::parameters.body, - "json", + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.deleteInstances::parameters.body, @@ -616,7 +616,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.powerOff::parameters.body, - "json", + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.powerOff::parameters.body, @@ -627,7 +627,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.restart::parameters.body, - "json", + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.restart::parameters.body, @@ -638,7 +638,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.start::parameters.body, - "json", + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.start::parameters.body, @@ -649,7 +649,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.redeploy::parameters.body, - "json", + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.redeploy::parameters.body, @@ -660,7 +660,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.performMaintenance::parameters.body, - "json", + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.performMaintenance::parameters.body, @@ -671,7 +671,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.updateInstances::parameters.body, - "json", + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.updateInstances::parameters.body, @@ -682,7 +682,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.reimage::parameters.body, - "json", + "application/json", "vmScaleSetReimageInput" ); @@extension(VirtualMachineScaleSets.reimage::parameters.body, @@ -693,7 +693,7 @@ interface VirtualMachineScaleSets { "Parameters for Reimaging VM ScaleSet." ); @@encodedName(VirtualMachineScaleSets.reimageAll::parameters.body, - "json", + "application/json", "vmInstanceIDs" ); @@extension(VirtualMachineScaleSets.reimageAll::parameters.body, @@ -704,7 +704,7 @@ interface VirtualMachineScaleSets { "A list of virtual machine instance IDs from the VM scale set." ); @@encodedName(VirtualMachineScaleSets.convertToSinglePlacementGroup::parameters.body, - "json", + "application/json", "parameters" ); @@extension(VirtualMachineScaleSets.convertToSinglePlacementGroup::parameters.body, @@ -715,7 +715,7 @@ interface VirtualMachineScaleSets { "The input object for ConvertToSinglePlacementGroup API." ); @@encodedName(VirtualMachineScaleSets.setOrchestrationServiceState::parameters.body, - "json", + "application/json", "parameters" ); @@extension(VirtualMachineScaleSets.setOrchestrationServiceState::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp index 88e11515bd..1fbe282a7d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp @@ -136,7 +136,7 @@ interface VirtualMachineScaleSetExtensions { } @@encodedName(VirtualMachineScaleSetExtensions.createOrUpdate::parameters.resource, - "json", + "application/json", "extensionParameters" ); @@extension(VirtualMachineScaleSetExtensions.createOrUpdate::parameters.resource, @@ -147,7 +147,7 @@ interface VirtualMachineScaleSetExtensions { "Parameters supplied to the Create VM scale set Extension operation." ); @@encodedName(VirtualMachineScaleSetExtensions.update::parameters.properties, - "json", + "application/json", "extensionParameters" ); @@extension(VirtualMachineScaleSetExtensions.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp index 0253b1cf81..48e7e669de 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp @@ -428,7 +428,7 @@ interface VirtualMachineScaleSetVMS { } @@encodedName(VirtualMachineScaleSetVMS.update::parameters.resource, - "json", + "application/json", "parameters" ); @@extension(VirtualMachineScaleSetVMS.update::parameters.resource, @@ -439,7 +439,7 @@ interface VirtualMachineScaleSetVMS { "Parameters supplied to the Update Virtual Machine Scale Sets VM operation." ); @@encodedName(VirtualMachineScaleSetVMS.reimage::parameters.body, - "json", + "application/json", "vmScaleSetVMReimageInput" ); @@extension(VirtualMachineScaleSetVMS.reimage::parameters.body, @@ -450,7 +450,7 @@ interface VirtualMachineScaleSetVMS { "Parameters for the Reimaging Virtual machine in ScaleSet." ); @@encodedName(VirtualMachineScaleSetVMS.runCommand::parameters.body, - "json", + "application/json", "parameters" ); @@extension(VirtualMachineScaleSetVMS.runCommand::parameters.body, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp index 98321138a7..81a36cdc51 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp @@ -156,7 +156,7 @@ interface VirtualMachineScaleSetVMExtensions { } @@encodedName(VirtualMachineScaleSetVMExtensions.createOrUpdate::parameters.resource, - "json", + "application/json", "extensionParameters" ); @@extension(VirtualMachineScaleSetVMExtensions.createOrUpdate::parameters.resource, @@ -167,7 +167,7 @@ interface VirtualMachineScaleSetVMExtensions { "Parameters supplied to the Create Virtual Machine Extension operation." ); @@encodedName(VirtualMachineScaleSetVMExtensions.update::parameters.properties, - "json", + "application/json", "extensionParameters" ); @@extension(VirtualMachineScaleSetVMExtensions.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp index b2f772089f..4a636e7f40 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp @@ -15,8 +15,11 @@ namespace Azure.ResourceManager.Dns; /** * Describes a DNS record set (a collection of DNS records with the same name and type). */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(DnsZone) -model DnsRecord is ProxyResource { +@includeInapplicableMetadataInPayload(false) +model DnsRecord { /** * The name of the record set, relative to the name of the zone. */ @@ -42,6 +45,12 @@ model DnsRecord is ProxyResource { * The etag of the record set. */ etag?: string; + + /** + * The properties of the record set. + */ + @extension("x-ms-client-flatten", true) + properties?: RecordSetProperties; } @armResourceOperations @@ -49,6 +58,8 @@ interface DnsRecords { /** * Gets a record set. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RecordSets_Get") get is ArmResourceRead< DnsRecord, { @@ -65,6 +76,8 @@ interface DnsRecords { /** * Creates or updates a record set within a DNS zone. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RecordSets_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< DnsRecord, { @@ -93,7 +106,9 @@ interface DnsRecords { /** * Updates a record set within a DNS zone. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("RecordSets_Update") update is ArmCustomPatchSync< DnsRecord, DnsRecord, @@ -117,6 +132,8 @@ interface DnsRecords { /** * Deletes a record set from a DNS zone. This operation cannot be undone. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RecordSets_Delete") delete is ArmResourceDeleteSync< DnsRecord, { @@ -139,6 +156,8 @@ interface DnsRecords { /** * Lists the record sets of a specified type in a DNS zone. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RecordSets_ListByType") listByType is ArmResourceListByParent< DnsRecord, { @@ -165,9 +184,25 @@ interface DnsRecords { >; } +@@encodedName(DnsRecords.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(DnsRecords.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(DnsRecords.createOrUpdate::parameters.resource, "Parameters supplied to the CreateOrUpdate operation." ); +@@encodedName(DnsRecords.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(DnsRecords.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(DnsRecords.update::parameters.properties, "Parameters supplied to the Update operation." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp index 3976b834f2..fd036f7a42 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp @@ -14,7 +14,10 @@ namespace Azure.ResourceManager.Dns; /** * Describes a DNS zone. */ -model DnsZone is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +model DnsZone extends Resource { /** * The name of the DNS zone (without a terminating dot). */ @@ -28,6 +31,12 @@ model DnsZone is TrackedResource { * The etag of the zone. */ etag?: string; + + /** + * The properties of the zone. + */ + @extension("x-ms-client-flatten", true) + properties?: ZoneProperties; } @armResourceOperations @@ -35,11 +44,15 @@ interface DnsZones { /** * Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Zones_Get") get is ArmResourceRead; /** * Creates or updates a DNS zone. Does not modify DNS records within the zone. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Zones_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< DnsZone, { @@ -62,7 +75,9 @@ interface DnsZones { /** * Updates a DNS zone. Does not modify DNS records within the zone. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("Zones_Update") update is ArmCustomPatchSync< DnsZone, ZoneUpdateOptions, @@ -80,6 +95,8 @@ interface DnsZones { /** * Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Zones_Delete") delete is ArmResourceDeleteAsync< DnsZone, { @@ -96,6 +113,8 @@ interface DnsZones { /** * Lists the DNS zones within a resource group. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Zones_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent< DnsZone, { @@ -112,12 +131,16 @@ interface DnsZones { /** * Lists the DNS zones in all resource groups in a subscription. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Zones_List") list is ArmListBySubscription; /** * Lists all record sets in a DNS zone. */ // FIXME: RecordSets_ListByDnsZone could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RecordSets_ListByDnsZone") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/recordsets") @get listByDnsZone( @@ -146,9 +169,25 @@ interface DnsZones { ): ArmResponse> | ErrorResponse; } +@@encodedName(DnsZones.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(DnsZones.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(DnsZones.createOrUpdate::parameters.resource, "Parameters supplied to the CreateOrUpdate operation." ); +@@encodedName(DnsZones.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(DnsZones.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(DnsZones.update::parameters.properties, "Parameters supplied to the Update operation." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp index e34181b362..cd4804087d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp @@ -109,7 +109,7 @@ interface BatchDeploymentTrackedResources { } @@encodedName(BatchDeploymentTrackedResources.createOrUpdate::parameters.resource, - "json", + "application/json", "body" ); @@extension(BatchDeploymentTrackedResources.createOrUpdate::parameters.resource, @@ -120,7 +120,7 @@ interface BatchDeploymentTrackedResources { "Batch inference deployment definition object." ); @@encodedName(BatchDeploymentTrackedResources.update::parameters.properties, - "json", + "application/json", "body" ); @@extension(BatchDeploymentTrackedResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp index 74a6f2675a..0062533304 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp @@ -114,7 +114,7 @@ interface BatchEndpointTrackedResources { } @@encodedName(BatchEndpointTrackedResources.createOrUpdate::parameters.resource, - "json", + "application/json", "body" ); @@extension(BatchEndpointTrackedResources.createOrUpdate::parameters.resource, @@ -125,7 +125,7 @@ interface BatchEndpointTrackedResources { "Batch inference endpoint definition object." ); @@encodedName(BatchEndpointTrackedResources.update::parameters.properties, - "json", + "application/json", "body" ); @@extension(BatchEndpointTrackedResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp index ef4925089a..2e5622b9bd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp @@ -81,7 +81,7 @@ interface CodeContainerResources { } @@encodedName(CodeContainerResources.createOrUpdate::parameters.resource, - "json", + "application/json", "body" ); @@extension(CodeContainerResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp index e18958e956..f94d7d5c87 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp @@ -103,7 +103,7 @@ interface CodeVersionResources { } @@encodedName(CodeVersionResources.createOrUpdate::parameters.resource, - "json", + "application/json", "body" ); @@extension(CodeVersionResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp index c0e8610435..0fca7360a7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp @@ -81,7 +81,7 @@ interface ComponentContainerResources { } @@encodedName(ComponentContainerResources.createOrUpdate::parameters.resource, - "json", + "application/json", "body" ); @@extension(ComponentContainerResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp index 81124649cd..8d1fcf6a77 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp @@ -98,7 +98,7 @@ interface ComponentVersionResources { } @@encodedName(ComponentVersionResources.createOrUpdate::parameters.resource, - "json", + "application/json", "body" ); @@extension(ComponentVersionResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp index b2a223491d..aa5b18dd3e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp @@ -141,15 +141,15 @@ updateIdleShutdownSetting is ArmResourceActionSync; } -@@encodedName(LabelingJobs.createOrUpdate::parameters.resource, "json", "body"); +@@encodedName(LabelingJobs.createOrUpdate::parameters.resource, + "application/json", + "body" +); @@extension(LabelingJobs.createOrUpdate::parameters.resource, "x-ms-client-name", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp index 55e198e1e1..12c30ea115 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp @@ -87,7 +87,7 @@ interface ModelContainerResources { } @@encodedName(ModelContainerResources.createOrUpdate::parameters.resource, - "json", + "application/json", "body" ); @@extension(ModelContainerResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp index 08bd9f4807..ef3c1aefc7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp @@ -138,7 +138,7 @@ interface ModelVersionResources { } @@encodedName(ModelVersionResources.createOrUpdate::parameters.resource, - "json", + "application/json", "body" ); @@extension(ModelVersionResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp index 16e38f5370..01a6f4e0f9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp @@ -166,7 +166,7 @@ interface OnlineDeploymentTrackedResources { } @@encodedName(OnlineDeploymentTrackedResources.createOrUpdate::parameters.resource, - "json", + "application/json", "body" ); @@extension(OnlineDeploymentTrackedResources.createOrUpdate::parameters.resource, @@ -177,7 +177,7 @@ interface OnlineDeploymentTrackedResources { "Inference Endpoint entity to apply during operation." ); @@encodedName(OnlineDeploymentTrackedResources.update::parameters.properties, - "json", + "application/json", "body" ); @@extension(OnlineDeploymentTrackedResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp index 815ff14267..8050a474a3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp @@ -166,7 +166,7 @@ interface OnlineEndpointTrackedResources { } @@encodedName(OnlineEndpointTrackedResources.createOrUpdate::parameters.resource, - "json", + "application/json", "body" ); @@extension(OnlineEndpointTrackedResources.createOrUpdate::parameters.resource, @@ -177,7 +177,7 @@ interface OnlineEndpointTrackedResources { "Online Endpoint entity to apply during operation." ); @@encodedName(OnlineEndpointTrackedResources.update::parameters.properties, - "json", + "application/json", "body" ); @@extension(OnlineEndpointTrackedResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp index cfede124ae..c85f93ed8c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp @@ -70,7 +70,7 @@ interface OutboundRuleBasicResources { } @@encodedName(OutboundRuleBasicResources.createOrUpdate::parameters.resource, - "json", + "application/json", "body" ); @@extension(OutboundRuleBasicResources.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp index 944d3f088a..4545051a44 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp @@ -69,7 +69,7 @@ interface PrivateEndpointConnections { } @@encodedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, - "json", + "application/json", "body" ); @@extension(PrivateEndpointConnections.createOrUpdate::parameters.resource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp index 77f489da27..9fbbfede52 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp @@ -83,7 +83,10 @@ interface Registries { removeRegions is ArmResourceActionAsync; } -@@encodedName(Registries.createOrUpdate::parameters.resource, "json", "body"); +@@encodedName(Registries.createOrUpdate::parameters.resource, + "application/json", + "body" +); @@extension(Registries.createOrUpdate::parameters.resource, "x-ms-client-name", "body" @@ -91,7 +94,10 @@ interface Registries { @@doc(Registries.createOrUpdate::parameters.resource, "Details required to create the registry." ); -@@encodedName(Registries.update::parameters.properties, "json", "body"); +@@encodedName(Registries.update::parameters.properties, + "application/json", + "body" +); @@extension(Registries.update::parameters.properties, "x-ms-client-name", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp index af12127196..bd69d98373 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp @@ -79,7 +79,10 @@ interface Schedules { >; } -@@encodedName(Schedules.createOrUpdate::parameters.resource, "json", "body"); +@@encodedName(Schedules.createOrUpdate::parameters.resource, + "application/json", + "body" +); @@extension(Schedules.createOrUpdate::parameters.resource, "x-ms-client-name", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp index 0c6edf6d51..7f56f861af 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp @@ -244,7 +244,10 @@ Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds" ): ArmResponse | ErrorResponse; } -@@encodedName(Workspaces.createOrUpdate::parameters.resource, "json", "body"); +@@encodedName(Workspaces.createOrUpdate::parameters.resource, + "application/json", + "body" +); @@extension(Workspaces.createOrUpdate::parameters.resource, "x-ms-client-name", "body" @@ -252,7 +255,10 @@ Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds" @@doc(Workspaces.createOrUpdate::parameters.resource, "The parameters for creating or updating a machine learning workspace." ); -@@encodedName(Workspaces.update::parameters.properties, "json", "body"); +@@encodedName(Workspaces.update::parameters.properties, + "application/json", + "body" +); @@extension(Workspaces.update::parameters.properties, "x-ms-client-name", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp index 23f3cbc398..b36bfd0758 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp @@ -106,7 +106,7 @@ interface WorkspaceConnectionPropertiesV2BasicResources { } @@encodedName(WorkspaceConnectionPropertiesV2BasicResources.create::parameters.resource, - "json", + "application/json", "body" ); @@extension(WorkspaceConnectionPropertiesV2BasicResources.create::parameters.resource, @@ -117,7 +117,7 @@ interface WorkspaceConnectionPropertiesV2BasicResources { "The object for creating or updating a new workspace connection" ); @@encodedName(WorkspaceConnectionPropertiesV2BasicResources.update::parameters.properties, - "json", + "application/json", "body" ); @@extension(WorkspaceConnectionPropertiesV2BasicResources.update::parameters.properties, diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp index 1d7fd3bddc..f5c5384b84 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp @@ -54,8 +54,6 @@ interface Accounts { /** * List Account resources by resource group */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Accounts_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp index cdcbd4f662..f95b87943a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp @@ -37,7 +37,5 @@ interface Quotas { /** * List quotas for a given subscription Id. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Quotas_ListBySubscription") listBySubscription is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_CountDevices.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_CountDevices.json new file mode 100644 index 0000000000..8e98c0b30a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_CountDevices.json @@ -0,0 +1,18 @@ +{ + "operationId": "Catalogs_CountDevices", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_CountDevices", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": 3 + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_CreateOrUpdate.json new file mode 100644 index 0000000000..12fbb285cf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_CreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "operationId": "Catalogs_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "location": "global", + "resource": { + "location": "global" + }, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_Delete.json new file mode 100644 index 0000000000..9cf48d1b3a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_Delete.json @@ -0,0 +1,24 @@ +{ + "operationId": "Catalogs_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_Get.json new file mode 100644 index 0000000000..ffff8db7cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_Get.json @@ -0,0 +1,21 @@ +{ + "operationId": "Catalogs_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListByResourceGroup.json new file mode 100644 index 0000000000..f52192cbc0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListByResourceGroup.json @@ -0,0 +1,30 @@ +{ + "operationId": "Catalogs_ListByResourceGroup", + "parameters": { + "api-version": "2022-09-01-preview", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListByResourceGroup", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + }, + { + "name": "MyCatalog2", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog2", + "location": "global" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListBySubscription.json new file mode 100644 index 0000000000..2b1412903d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListBySubscription.json @@ -0,0 +1,29 @@ +{ + "operationId": "Catalogs_ListBySubscription", + "parameters": { + "api-version": "2022-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListBySubscription", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + }, + { + "name": "MyCatalog2", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup2/providers/Microsoft.AzureSphere/catalogs/MyCatalog2", + "location": "global" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDeployments.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDeployments.json new file mode 100644 index 0000000000..d64d0282cb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDeployments.json @@ -0,0 +1,27 @@ +{ + "operationId": "Catalogs_ListDeployments", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListDeployments", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "DeploymentName1111", + "properties": {} + }, + { + "name": "DeploymentName1121", + "properties": {} + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDeviceGroups.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDeviceGroups.json new file mode 100644 index 0000000000..2ab4b6b559 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDeviceGroups.json @@ -0,0 +1,32 @@ +{ + "operationId": "Catalogs_ListDeviceGroups", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "listDeviceGroupsRequest": { + "deviceGroupName": "MyDeviceGroup1" + }, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListDeviceGroups", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyDeviceGroup1", + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1" + }, + { + "name": "MyDeviceGroup2", + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct2/devicegroups/MyDeviceGroup2" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDeviceInsights.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDeviceInsights.json new file mode 100644 index 0000000000..72fe42e06e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDeviceInsights.json @@ -0,0 +1,40 @@ +{ + "operationId": "Catalogs_ListDeviceInsights", + "parameters": { + "$top": 10, + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListDeviceInsights", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "description": "eventDescription1", + "deviceId": "eventIdentifier1", + "endTimestampUtc": "2021-09-30T23:54:21.96Z", + "eventCategory": "eventCategory1", + "eventClass": "eventClass1", + "eventCount": 1, + "eventType": "eventType1", + "startTimestampUtc": "2021-09-30T21:51:39.26Z" + }, + { + "description": "eventDescription2", + "deviceId": "eventIdentifier2", + "endTimestampUtc": "2022-12-07T17:34:12.50Z", + "eventCategory": "eventCategory2", + "eventClass": "eventClass2", + "eventCount": 1, + "eventType": "eventType2", + "startTimestampUtc": "2022-12-06T12:41:39.26Z" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDevices.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDevices.json new file mode 100644 index 0000000000..7f72d39e0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_ListDevices.json @@ -0,0 +1,27 @@ +{ + "operationId": "Catalogs_ListDevices", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListDevices", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "properties": {} + }, + { + "name": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "properties": {} + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_Update.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_Update.json new file mode 100644 index 0000000000..5ecd11ed68 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Catalogs_Update.json @@ -0,0 +1,25 @@ +{ + "operationId": "Catalogs_Update", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "properties": {}, + "resource": { + "location": "global" + }, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_Update", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_Get.json new file mode 100644 index 0000000000..05e8533ac8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_Get.json @@ -0,0 +1,17 @@ +{ + "operationId": "Certificates_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "serialNumber": "default", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Certificates_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": {} + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_ListByCatalog.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_ListByCatalog.json new file mode 100644 index 0000000000..ba01741148 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_ListByCatalog.json @@ -0,0 +1,18 @@ +{ + "operationId": "Certificates_ListByCatalog", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Certificates_ListByCatalog", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_RetrieveCertChain.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_RetrieveCertChain.json new file mode 100644 index 0000000000..07608e0fd6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_RetrieveCertChain.json @@ -0,0 +1,19 @@ +{ + "operationId": "Certificates_RetrieveCertChain", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "serialNumber": "active", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Certificates_RetrieveCertChain", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "certificateChain": "ABynaryRepresentationOfTheRequestedCatalogCertificateChain" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_RetrieveProofOfPossessionNonce.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_RetrieveProofOfPossessionNonce.json new file mode 100644 index 0000000000..d3a73c7b0f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Certificates_RetrieveProofOfPossessionNonce.json @@ -0,0 +1,22 @@ +{ + "operationId": "Certificates_RetrieveProofOfPossessionNonce", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "proofOfPossessionNonceRequest": { + "proofOfPossessionNonce": "proofOfPossessionNonce" + }, + "resourceGroupName": "MyResourceGroup1", + "serialNumber": "active", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Certificates_RetrieveProofOfPossessionNonce", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "certificate": "bXliYXNlNjRzdHJpbmc=" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_CreateOrUpdate.json new file mode 100644 index 0000000000..ef3ca50bbc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_CreateOrUpdate.json @@ -0,0 +1,47 @@ +{ + "operationId": "Deployments_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deploymentName": "MyDeployment1", + "deviceGroupName": "myDeviceGroup1", + "productName": "MyProduct1", + "resource": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Deployments_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyDeployment1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/deviceGroups/MyDeviceGroup1/deployments/MyDeployment1", + "properties": { + "deployedImages": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/MyImage1", + "properties": { + "image": "MyImage", + "imageId": "00000000-0000-0000-0000-000000000000", + "imageType": "InvalidImageType", + "provisioningState": "Succeeded", + "regionalDataBoundary": "None", + "uri": "imageUri" + } + } + ], + "provisioningState": "Succeeded" + } + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "MyDeployment1", + "type": "Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/deployments/MyDeployment1" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_Delete.json new file mode 100644 index 0000000000..85f53cd0d5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_Delete.json @@ -0,0 +1,27 @@ +{ + "operationId": "Deployments_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deploymentName": "MyDeploymentName1", + "deviceGroupName": "DeviceGroupName1", + "productName": "MyProductName1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Deployments_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_Get.json new file mode 100644 index 0000000000..63a1b85466 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_Get.json @@ -0,0 +1,38 @@ +{ + "operationId": "Deployments_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deploymentName": "MyDeployment1", + "deviceGroupName": "myDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Deployments_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyDeployment1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/deviceGroups/MyDeviceGroup1/deployments/MyDeployment1", + "properties": { + "deployedImages": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/MyImage1", + "properties": { + "description": "description", + "componentId": "componentId", + "image": "dGVzdGltYWdl", + "imageType": "ImageType", + "provisioningState": "Succeeded", + "regionalDataBoundary": "None", + "uri": "imageUri" + } + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_ListByDeviceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_ListByDeviceGroup.json new file mode 100644 index 0000000000..ad770c94f6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Deployments_ListByDeviceGroup.json @@ -0,0 +1,42 @@ +{ + "operationId": "Deployments_ListByDeviceGroup", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "myDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Deployments_ListByDeviceGroup", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyDeployment1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/deviceGroups/MyDeviceGroup1/deployments/MyDeployment1", + "properties": { + "deployedImages": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/MyImage1", + "properties": { + "description": "description", + "componentId": "componentId", + "image": "dGVzdGltYWdl", + "imageType": "ImageType", + "provisioningState": "Succeeded", + "regionalDataBoundary": "None", + "uri": "imageUri" + } + } + ], + "deploymentDateUtc": "2022-09-30T21:51:39.2698729Z" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_ClaimDevices.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_ClaimDevices.json new file mode 100644 index 0000000000..4b8d8dc27f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_ClaimDevices.json @@ -0,0 +1,25 @@ +{ + "operationId": "DeviceGroups_ClaimDevices", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "claimDevicesRequest": { + "deviceIdentifiers": [ + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_ClaimDevices", + "responses": { + "202": { + "description": "Resource operation accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_CountDevices.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_CountDevices.json new file mode 100644 index 0000000000..14b1a2758c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_CountDevices.json @@ -0,0 +1,20 @@ +{ + "operationId": "DeviceGroups_CountDevices", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_CountDevices", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": 3 + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_CreateOrUpdate.json new file mode 100644 index 0000000000..3244ad81aa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_CreateOrUpdate.json @@ -0,0 +1,46 @@ +{ + "operationId": "DeviceGroups_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "resource": { + "properties": { + "description": "Description for MyDeviceGroup1", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + }, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "microsoft.AzureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1", + "properties": { + "description": "Description of MyDeviceGroup1", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "MyDeviceId1", + "type": "Microsoft.AzureSphere/catalogs/products/deviceGroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1", + "properties": { + "description": "Description of MyDeviceGroup1", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_Delete.json new file mode 100644 index 0000000000..1c42b931ca --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_Delete.json @@ -0,0 +1,26 @@ +{ + "operationId": "DeviceGroups_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_Get.json new file mode 100644 index 0000000000..9b867336b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_Get.json @@ -0,0 +1,26 @@ +{ + "operationId": "DeviceGroups_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1", + "properties": { + "description": "The description of MyDeviceGroup1", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_ListByProduct.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_ListByProduct.json new file mode 100644 index 0000000000..dc7a9bc1c4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_ListByProduct.json @@ -0,0 +1,30 @@ +{ + "operationId": "DeviceGroups_ListByProduct", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_ListByProduct", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyDeviceGroup1", + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1" + }, + { + "name": "MyDeviceGroup2", + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/Products/MyProduct2/devicegroups/MyDeviceGroup2" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_Update.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_Update.json new file mode 100644 index 0000000000..ae6b769484 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/DeviceGroups_Update.json @@ -0,0 +1,33 @@ +{ + "operationId": "DeviceGroups_Update", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "properties": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_Update", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1", + "properties": { + "description": "The description of MyDeviceGroup1", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_CreateOrUpdate.json new file mode 100644 index 0000000000..0361bfdd14 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_CreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "operationId": "Devices_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "myDeviceGroup1", + "deviceName": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "productName": "MyProduct1", + "resource": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "properties": { + "chipSku": "MyChipSku1" + } + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "Microsoft.AzureSphere/catalogs/products/deviceGroups/devices", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_Delete.json new file mode 100644 index 0000000000..a1f3969be5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_Delete.json @@ -0,0 +1,27 @@ +{ + "operationId": "Devices_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "DeviceGroupName1", + "deviceName": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "productName": "MyProductName1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_GenerateCapabilityImage.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_GenerateCapabilityImage.json new file mode 100644 index 0000000000..c125e98e70 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_GenerateCapabilityImage.json @@ -0,0 +1,32 @@ +{ + "operationId": "Devices_GenerateCapabilityImage", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "myDeviceGroup1", + "deviceName": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "generateDeviceCapabilityRequest": { + "capabilities": [ + "ApplicationDevelopment" + ] + }, + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_GenerateCapabilityImage", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "image": "TheDeviceCapabilityImage" + } + }, + "202": { + "description": "Resource operation accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_Get.json new file mode 100644 index 0000000000..a645c9e293 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_Get.json @@ -0,0 +1,29 @@ +{ + "operationId": "Devices_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "myDeviceGroup1", + "deviceName": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "properties": { + "chipSku": "MyChipSku1", + "lastAvailableOsVersion": "AvailableOsVersion1", + "lastInstalledOsVersion": "InstalledOsVersion1", + "lastOsUpdateUtc": "2022-09-30T23:54:21.96Z", + "lastUpdateRequestUtc": "2022-10-01T23:54:21.96Z" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_ListByDeviceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_ListByDeviceGroup.json new file mode 100644 index 0000000000..fd2f8ca567 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_ListByDeviceGroup.json @@ -0,0 +1,29 @@ +{ + "operationId": "Devices_ListByDeviceGroup", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "myDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_ListByDeviceGroup", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000-0000-0000-0000-000000000001", + "properties": {} + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000-0000-0000-0000-000000000002", + "properties": {} + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_Update.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_Update.json new file mode 100644 index 0000000000..309755fae6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Devices_Update.json @@ -0,0 +1,36 @@ +{ + "operationId": "Devices_Update", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "deviceName": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "productName": "MyProduct1", + "properties": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_Update", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "Microsoft.AzureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1/device/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "properties": { + "chipSku": "MyChipSku1", + "lastAvailableOsVersion": "AvailableOsVersion1", + "lastInstalledOsVersion": "InstalledOsVersion1", + "lastOsUpdateUtc": "2022-10-30T23:54:21.96Z", + "lastUpdateRequestUtc": "2022-10-01T23:54:21.96Z" + } + } + }, + "202": { + "description": "The device update started successfully.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_CreateOrUpdate.json new file mode 100644 index 0000000000..4afa2137a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_CreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "operationId": "Images_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "imageName": "default", + "resource": { + "properties": { + "image": "bXliYXNlNjRzdHJpbmc=" + } + }, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Image_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyProduct1", + "type": "Microsoft.AzureSphere/catalogs/images", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/default" + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "MyProduct1", + "type": "Microsoft.AzureSphere/catalogs/images", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/default" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_Delete.json new file mode 100644 index 0000000000..8457e3ba33 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_Delete.json @@ -0,0 +1,25 @@ +{ + "operationId": "Images_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "imageName": "imageID", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Images_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_Get.json new file mode 100644 index 0000000000..e63b7d375c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_Get.json @@ -0,0 +1,17 @@ +{ + "operationId": "Images_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "imageName": "myImageId", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Images_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": {} + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_ListByCatalog.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_ListByCatalog.json new file mode 100644 index 0000000000..c84863660c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Images_ListByCatalog.json @@ -0,0 +1,27 @@ +{ + "operationId": "Images_ListByCatalog", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Images_ListByCatalog", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyImage1", + "id": "00000000-0000-0000-0000-000000000001" + }, + { + "name": "MyImage2", + "id": "00000000-0000-0000-0000-000000000002" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_CountDevices.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_CountDevices.json new file mode 100644 index 0000000000..74b9469a62 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_CountDevices.json @@ -0,0 +1,21 @@ +{ + "operationId": "Products_CountDevices", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productGroupName": "MyProduct1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_CountDevices", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": 3 + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_CreateOrUpdate.json new file mode 100644 index 0000000000..cde11d3020 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_CreateOrUpdate.json @@ -0,0 +1,30 @@ +{ + "operationId": "Products_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProduct1", + "resource": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyProduct1", + "type": "Microsoft.AzureSphere/catalogs/products", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1" + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "MyProduct1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_Delete.json new file mode 100644 index 0000000000..ce45bfdb5a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_Delete.json @@ -0,0 +1,25 @@ +{ + "operationId": "Products_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProductName1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_GenerateDefaultDeviceGroups.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_GenerateDefaultDeviceGroups.json new file mode 100644 index 0000000000..6c834aff44 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_GenerateDefaultDeviceGroups.json @@ -0,0 +1,40 @@ +{ + "operationId": "Products_GenerateDefaultDeviceGroups", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_GenerateDefaultDeviceGroups", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyDeviceGroup1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1", + "properties": { + "description": "Device group description 1", + "allowCrashDumpsCollection": "Enabled", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + }, + { + "name": "MyDeviceGroup2", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup2", + "properties": { + "description": "Device group description 2", + "allowCrashDumpsCollection": "Enabled", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_Get.json new file mode 100644 index 0000000000..8acc34e547 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_Get.json @@ -0,0 +1,23 @@ +{ + "operationId": "Products_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "microsoft.azureSphere/catalogs/products", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1", + "properties": { + "description": "product description." + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_ListByCatalog.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_ListByCatalog.json new file mode 100644 index 0000000000..2bc3059d09 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_ListByCatalog.json @@ -0,0 +1,29 @@ +{ + "operationId": "Products_ListByCatalog", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_ListByCatalog", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyProduct1", + "type": "Microsoft.AzureSphere/catalogs/products", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1" + }, + { + "name": "MyProduct2", + "type": "Microsoft.AzureSphere/catalogs/products", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct2" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_Update.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_Update.json new file mode 100644 index 0000000000..cd7ea772c3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/examples/Products_Update.json @@ -0,0 +1,30 @@ +{ + "operationId": "Products_Update", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProduct1", + "properties": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_Update", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "microsoft.azureSphere/catalogs/products", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1", + "properties": { + "description": "Product description." + } + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/swagger.json new file mode 100644 index 0000000000..3ed9074a26 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/swagger.json @@ -0,0 +1,4403 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Sphere resource management API.", + "version": "2022-09-01-preview", + "description": "Azure Sphere resource management API.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "AadOauth2Auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "AadOauth2Auth": { + "type": "oauth2", + "description": "The Azure Active Directory OAuth2 Flow", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "Catalogs" + }, + { + "name": "Certificates" + }, + { + "name": "Images" + }, + { + "name": "Products" + }, + { + "name": "DeviceGroups" + }, + { + "name": "Deployments" + }, + { + "name": "Devices" + } + ], + "paths": { + "/providers/Microsoft.AzureSphere/operations": { + "get": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AzureSphere/catalogs": { + "get": { + "operationId": "Catalogs_ListBySubscription", + "tags": [ + "Catalogs" + ], + "description": "List Catalog resources by subscription ID", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/CatalogListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Catalogs_ListBySubscription": { + "$ref": "./examples/Catalogs_ListBySubscription.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs": { + "get": { + "operationId": "Catalogs_ListByResourceGroup", + "tags": [ + "Catalogs" + ], + "description": "List Catalog resources by resource group", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/CatalogListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Catalogs_ListByResourceGroup": { + "$ref": "./examples/Catalogs_ListByResourceGroup.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}": { + "get": { + "operationId": "Catalogs_Get", + "tags": [ + "Catalogs" + ], + "description": "Get a Catalog", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Catalog" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Catalogs_Get": { + "$ref": "./examples/Catalogs_Get.json" + } + } + }, + "put": { + "operationId": "Catalogs_CreateOrUpdate", + "tags": [ + "Catalogs" + ], + "description": "Create a Catalog", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/Catalog" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Catalog' update operation succeeded", + "schema": { + "$ref": "#/definitions/Catalog" + } + }, + "201": { + "description": "Resource 'Catalog' create operation succeeded", + "schema": { + "$ref": "#/definitions/Catalog" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Catalogs_CreateOrUpdate": { + "$ref": "./examples/Catalogs_CreateOrUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Catalogs_Update", + "tags": [ + "Catalogs" + ], + "description": "Update a Catalog", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/CatalogUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Catalog" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Catalogs_Update": { + "$ref": "./examples/Catalogs_Update.json" + } + } + }, + "delete": { + "operationId": "Catalogs_Delete", + "tags": [ + "Catalogs" + ], + "description": "Delete a Catalog", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Catalogs_Delete": { + "$ref": "./examples/Catalogs_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates": { + "get": { + "operationId": "Certificates_ListByCatalog", + "tags": [ + "Certificates" + ], + "description": "List Certificate resources by Catalog", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, + "type": "string", + "x-ms-client-name": "filter" + }, + { + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" + }, + { + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/CertificateListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Certificates_ListByCatalog": { + "$ref": "./examples/Certificates_ListByCatalog.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}": { + "get": { + "operationId": "Certificates_Get", + "tags": [ + "Certificates" + ], + "description": "Get a Certificate", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "serialNumber", + "in": "path", + "description": "Serial number of the certificate. Use '.default' to get current active certificate.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Certificate" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Certificates_Get": { + "$ref": "./examples/Certificates_Get.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveCertChain": { + "post": { + "operationId": "Certificates_RetrieveCertChain", + "tags": [ + "Certificates" + ], + "description": "Retrieves cert chain.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "serialNumber", + "in": "path", + "description": "Serial number of the certificate. Use '.default' to get current active certificate.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/CertificateChainResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Certificates_RetrieveCertChain": { + "$ref": "./examples/Certificates_RetrieveCertChain.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/certificates/{serialNumber}/retrieveProofOfPossessionNonce": { + "post": { + "operationId": "Certificates_RetrieveProofOfPossessionNonce", + "tags": [ + "Certificates" + ], + "description": "Gets the proof of possession nonce.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "serialNumber", + "in": "path", + "description": "Serial number of the certificate. Use '.default' to get current active certificate.", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Proof of possession nonce request body ", + "required": true, + "schema": { + "$ref": "#/definitions/ProofOfPossessionNonceRequest" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ProofOfPossessionNonceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Certificates_RetrieveProofOfPossessionNonce": { + "$ref": "./examples/Certificates_RetrieveProofOfPossessionNonce.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/countDevices": { + "post": { + "operationId": "Catalogs_CountDevices", + "tags": [ + "Catalogs" + ], + "description": "Counts devices in catalog.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/CountDeviceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Catalogs_CountDevices": { + "$ref": "./examples/Catalogs_CountDevices.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images": { + "get": { + "operationId": "Images_ListByCatalog", + "tags": [ + "Images" + ], + "description": "List Image resources by Catalog", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, + "type": "string", + "x-ms-client-name": "filter" + }, + { + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" + }, + { + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ImageListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Images_ListByCatalog": { + "$ref": "./examples/Images_ListByCatalog.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/images/{imageName}": { + "get": { + "operationId": "Images_Get", + "tags": [ + "Images" + ], + "description": "Get a Image", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "imageName", + "in": "path", + "description": "Image name. Use .default for image creation.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Image" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Images_Get": { + "$ref": "./examples/Images_Get.json" + } + } + }, + "put": { + "operationId": "Images_CreateOrUpdate", + "tags": [ + "Images" + ], + "description": "Create a Image", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "imageName", + "in": "path", + "description": "Image name. Use .default for image creation.", + "required": true, + "type": "string" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/Image" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Image' update operation succeeded", + "schema": { + "$ref": "#/definitions/Image" + } + }, + "201": { + "description": "Resource 'Image' create operation succeeded", + "schema": { + "$ref": "#/definitions/Image" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Image_CreateOrUpdate": { + "$ref": "./examples/Images_CreateOrUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "Images_Delete", + "tags": [ + "Images" + ], + "description": "Delete a Image", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "imageName", + "in": "path", + "description": "Image name. Use .default for image creation.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Images_Delete": { + "$ref": "./examples/Images_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeployments": { + "post": { + "operationId": "Catalogs_ListDeployments", + "tags": [ + "Catalogs" + ], + "description": "Lists deployments for catalog.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, + "type": "string", + "x-ms-client-name": "filter" + }, + { + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" + }, + { + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DeploymentListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Catalogs_ListDeployments": { + "$ref": "./examples/Catalogs_ListDeployments.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceGroups": { + "post": { + "operationId": "Catalogs_ListDeviceGroups", + "tags": [ + "Catalogs" + ], + "description": "List the device groups for the catalog.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, + "type": "string", + "x-ms-client-name": "filter" + }, + { + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" + }, + { + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "body", + "in": "body", + "description": "List device groups for catalog.", + "required": true, + "schema": { + "$ref": "#/definitions/ListDeviceGroupsRequest" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DeviceGroupListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Catalogs_ListDeviceGroups": { + "$ref": "./examples/Catalogs_ListDeviceGroups.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDeviceInsights": { + "post": { + "operationId": "Catalogs_ListDeviceInsights", + "tags": [ + "Catalogs" + ], + "description": "Lists device insights for catalog.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, + "type": "string", + "x-ms-client-name": "filter" + }, + { + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" + }, + { + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PagedDeviceInsight" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Catalogs_ListDeviceInsights": { + "$ref": "./examples/Catalogs_ListDeviceInsights.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/listDevices": { + "post": { + "operationId": "Catalogs_ListDevices", + "tags": [ + "Catalogs" + ], + "description": "Lists devices for catalog.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, + "type": "string", + "x-ms-client-name": "filter" + }, + { + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" + }, + { + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DeviceListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Catalogs_ListDevices": { + "$ref": "./examples/Catalogs_ListDevices.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products": { + "get": { + "operationId": "Products_ListByCatalog", + "tags": [ + "Products" + ], + "description": "List Product resources by Catalog", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ProductListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Products_ListByCatalog": { + "$ref": "./examples/Products_ListByCatalog.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}": { + "get": { + "operationId": "Products_Get", + "tags": [ + "Products" + ], + "description": "Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Product" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Products_Get": { + "$ref": "./examples/Products_Get.json" + } + } + }, + "put": { + "operationId": "Products_CreateOrUpdate", + "tags": [ + "Products" + ], + "description": "Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/Product" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Product' update operation succeeded", + "schema": { + "$ref": "#/definitions/Product" + } + }, + "201": { + "description": "Resource 'Product' create operation succeeded", + "schema": { + "$ref": "#/definitions/Product" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Products_CreateOrUpdate": { + "$ref": "./examples/Products_CreateOrUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Products_Update", + "tags": [ + "Products" + ], + "description": "Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/ProductUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Product" + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Products_Update": { + "$ref": "./examples/Products_Update.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "Products_Delete", + "tags": [ + "Products" + ], + "description": "Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Products_Delete": { + "$ref": "./examples/Products_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/countDevices": { + "post": { + "operationId": "Products_CountDevices", + "tags": [ + "Products" + ], + "description": "Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/CountDeviceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Products_CountDevices": { + "$ref": "./examples/Products_CountDevices.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups": { + "get": { + "operationId": "DeviceGroups_ListByProduct", + "tags": [ + "DeviceGroups" + ], + "description": "List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, + "type": "string", + "x-ms-client-name": "filter" + }, + { + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" + }, + { + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DeviceGroupListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeviceGroups_ListByProduct": { + "$ref": "./examples/DeviceGroups_ListByProduct.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}": { + "get": { + "operationId": "DeviceGroups_Get", + "tags": [ + "DeviceGroups" + ], + "description": "Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DeviceGroup" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeviceGroups_Get": { + "$ref": "./examples/DeviceGroups_Get.json" + } + } + }, + "put": { + "operationId": "DeviceGroups_CreateOrUpdate", + "tags": [ + "DeviceGroups" + ], + "description": "Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceGroup" + } + } + ], + "responses": { + "200": { + "description": "Resource 'DeviceGroup' update operation succeeded", + "schema": { + "$ref": "#/definitions/DeviceGroup" + } + }, + "201": { + "description": "Resource 'DeviceGroup' create operation succeeded", + "schema": { + "$ref": "#/definitions/DeviceGroup" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeviceGroups_CreateOrUpdate": { + "$ref": "./examples/DeviceGroups_CreateOrUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "DeviceGroups_Update", + "tags": [ + "DeviceGroups" + ], + "description": "Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceGroupUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DeviceGroup" + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeviceGroups_Update": { + "$ref": "./examples/DeviceGroups_Update.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "DeviceGroups_Delete", + "tags": [ + "DeviceGroups" + ], + "description": "Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeviceGroups_Delete": { + "$ref": "./examples/DeviceGroups_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/claimDevices": { + "post": { + "operationId": "DeviceGroups_ClaimDevices", + "tags": [ + "DeviceGroups" + ], + "description": "Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk claiming devices to a catalog only.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "body", + "in": "body", + "description": "Bulk claim devices request body.", + "required": true, + "schema": { + "$ref": "#/definitions/ClaimDevicesRequest" + } + } + ], + "responses": { + "202": { + "description": "Resource operation accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeviceGroups_ClaimDevices": { + "$ref": "./examples/DeviceGroups_ClaimDevices.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/countDevices": { + "post": { + "operationId": "DeviceGroups_CountDevices", + "tags": [ + "DeviceGroups" + ], + "description": "Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/CountDeviceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeviceGroups_CountDevices": { + "$ref": "./examples/DeviceGroups_CountDevices.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments": { + "get": { + "operationId": "Deployments_ListByDeviceGroup", + "tags": [ + "Deployments" + ], + "description": "List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$filter", + "in": "query", + "description": "Filter the result list using the given expression", + "required": false, + "type": "string", + "x-ms-client-name": "filter" + }, + { + "name": "$top", + "in": "query", + "description": "The number of result items to return.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "top" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of result items to skip.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "skip" + }, + { + "name": "$maxpagesize", + "in": "query", + "description": "The maximum number of result items per page.", + "required": false, + "type": "integer", + "format": "int32", + "x-ms-client-name": "maxpagesize" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DeploymentListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Deployments_ListByDeviceGroup": { + "$ref": "./examples/Deployments_ListByDeviceGroup.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/deployments/{deploymentName}": { + "get": { + "operationId": "Deployments_Get", + "tags": [ + "Deployments" + ], + "description": "Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deploymentName", + "in": "path", + "description": "Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Deployment" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Deployments_Get": { + "$ref": "./examples/Deployments_Get.json" + } + } + }, + "put": { + "operationId": "Deployments_CreateOrUpdate", + "tags": [ + "Deployments" + ], + "description": "Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deploymentName", + "in": "path", + "description": "Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.", + "required": true, + "type": "string" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/Deployment" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Deployment' update operation succeeded", + "schema": { + "$ref": "#/definitions/Deployment" + } + }, + "201": { + "description": "Resource 'Deployment' create operation succeeded", + "schema": { + "$ref": "#/definitions/Deployment" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Deployments_CreateOrUpdate": { + "$ref": "./examples/Deployments_CreateOrUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "Deployments_Delete", + "tags": [ + "Deployments" + ], + "description": "Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deploymentName", + "in": "path", + "description": "Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Deployments_Delete": { + "$ref": "./examples/Deployments_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices": { + "get": { + "operationId": "Devices_ListByDeviceGroup", + "tags": [ + "Devices" + ], + "description": "List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DeviceListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Devices_ListByDeviceGroup": { + "$ref": "./examples/Devices_ListByDeviceGroup.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}": { + "get": { + "operationId": "Devices_Get", + "tags": [ + "Devices" + ], + "description": "Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceName", + "in": "path", + "description": "Device name", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{128}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Device" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Devices_Get": { + "$ref": "./examples/Devices_Get.json" + } + } + }, + "put": { + "operationId": "Devices_CreateOrUpdate", + "tags": [ + "Devices" + ], + "description": "Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceName", + "in": "path", + "description": "Device name", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{128}$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/Device" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Device' update operation succeeded", + "schema": { + "$ref": "#/definitions/Device" + } + }, + "201": { + "description": "Resource 'Device' create operation succeeded", + "schema": { + "$ref": "#/definitions/Device" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Devices_CreateOrUpdate": { + "$ref": "./examples/Devices_CreateOrUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Devices_Update", + "tags": [ + "Devices" + ], + "description": "Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceName", + "in": "path", + "description": "Device name", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{128}$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/DeviceUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Device" + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Devices_Update": { + "$ref": "./examples/Devices_Update.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "Devices_Delete", + "tags": [ + "Devices" + ], + "description": "Delete a Device", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceName", + "in": "path", + "description": "Device name", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{128}$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Devices_Delete": { + "$ref": "./examples/Devices_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/deviceGroups/{deviceGroupName}/devices/{deviceName}/generateCapabilityImage": { + "post": { + "operationId": "Devices_GenerateCapabilityImage", + "tags": [ + "Devices" + ], + "description": "Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceGroupName", + "in": "path", + "description": "Name of device group.", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + }, + { + "name": "deviceName", + "in": "path", + "description": "Device name", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{128}$" + }, + { + "name": "body", + "in": "body", + "description": "Generate capability image request body.", + "required": true, + "schema": { + "$ref": "#/definitions/GenerateCapabilityImageRequest" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/SignedCapabilityImageResponse" + } + }, + "202": { + "description": "Resource operation accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Devices_GenerateCapabilityImage": { + "$ref": "./examples/Devices_GenerateCapabilityImage.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureSphere/catalogs/{catalogName}/products/{productName}/generateDefaultDeviceGroups": { + "post": { + "operationId": "Products_GenerateDefaultDeviceGroups", + "tags": [ + "Products" + ], + "description": "Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be used for product name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "catalogName", + "in": "path", + "description": "Name of catalog", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" + }, + { + "name": "productName", + "in": "path", + "description": "Name of product.", + "required": true, + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DeviceGroupListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Products_GenerateDefaultDeviceGroups": { + "$ref": "./examples/Products_GenerateDefaultDeviceGroups.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "AllowCrashDumpCollection": { + "type": "string", + "description": "Allow crash dumps values.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "AllowCrashDumpCollection", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled", + "description": "Crash dump collection enabled" + }, + { + "name": "Disabled", + "value": "Disabled", + "description": "Crash dump collection disabled" + } + ] + } + }, + "CapabilityType": { + "type": "string", + "description": "Capability image type", + "enum": [ + "ApplicationDevelopment", + "FieldServicing" + ], + "x-ms-enum": { + "name": "CapabilityType", + "modelAsString": true, + "values": [ + { + "name": "ApplicationDevelopment", + "value": "ApplicationDevelopment", + "description": "Application development capability" + }, + { + "name": "FieldServicing", + "value": "FieldServicing", + "description": "Field servicing capability" + } + ] + } + }, + "Catalog": { + "type": "object", + "description": "An Azure Sphere catalog", + "properties": { + "properties": { + "$ref": "#/definitions/CatalogProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "CatalogListResult": { + "type": "object", + "description": "The response of a Catalog list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Catalog items on this page", + "items": { + "$ref": "#/definitions/Catalog" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "CatalogProperties": { + "type": "object", + "description": "Catalog properties", + "properties": { + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + } + }, + "CatalogUpdate": { + "type": "object", + "description": "The type used for update operations of the Catalog.", + "properties": { + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "Certificate": { + "type": "object", + "description": "An certificate resource belonging to a catalog resource.", + "properties": { + "properties": { + "$ref": "#/definitions/CertificateProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "CertificateChainResponse": { + "type": "object", + "description": "The certificate chain response.", + "properties": { + "certificateChain": { + "type": "string", + "description": "The certificate chain.", + "readOnly": true + } + } + }, + "CertificateListResult": { + "type": "object", + "description": "The response of a Certificate list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Certificate items on this page", + "items": { + "$ref": "#/definitions/Certificate" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "CertificateProperties": { + "type": "object", + "description": "The properties of certificate", + "properties": { + "certificate": { + "type": "string", + "description": "The certificate as a UTF-8 encoded base 64 string.", + "readOnly": true + }, + "status": { + "$ref": "#/definitions/CertificateStatus", + "description": "The certificate status.", + "readOnly": true + }, + "subject": { + "type": "string", + "description": "The certificate subject.", + "readOnly": true + }, + "thumbprint": { + "type": "string", + "description": "The certificate thumbprint.", + "readOnly": true + }, + "expiryUtc": { + "type": "string", + "format": "date-time", + "description": "The certificate expiry date.", + "readOnly": true + }, + "notBeforeUtc": { + "type": "string", + "format": "date-time", + "description": "The certificate not before date.", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + } + }, + "CertificateStatus": { + "type": "string", + "description": "Certificate status values.", + "enum": [ + "Active", + "Inactive", + "Expired", + "Revoked" + ], + "x-ms-enum": { + "name": "CertificateStatus", + "modelAsString": true, + "values": [ + { + "name": "Active", + "value": "Active", + "description": "Certificate is active" + }, + { + "name": "Inactive", + "value": "Inactive", + "description": "Certificate is inactive" + }, + { + "name": "Expired", + "value": "Expired", + "description": "Certificate has expired" + }, + { + "name": "Revoked", + "value": "Revoked", + "description": "Certificate has been revoked" + } + ] + } + }, + "ClaimDevicesRequest": { + "type": "object", + "description": "Request to the action call to bulk claim devices.", + "properties": { + "deviceIdentifiers": { + "type": "array", + "description": "Device identifiers of the devices to be claimed.", + "items": { + "type": "string" + } + } + }, + "required": [ + "deviceIdentifiers" + ] + }, + "CountDeviceResponse": { + "type": "object", + "description": "Response to the action call for count devices in a catalog.", + "allOf": [ + { + "$ref": "#/definitions/CountElementsResponse" + } + ] + }, + "CountElementsResponse": { + "type": "object", + "description": "Response of the count for elements.", + "properties": { + "value": { + "type": "integer", + "format": "int32", + "description": "Number of children resources in parent resource." + } + }, + "required": [ + "value" + ] + }, + "Deployment": { + "type": "object", + "description": "An deployment resource belonging to a device group resource.", + "properties": { + "properties": { + "$ref": "#/definitions/DeploymentProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "DeploymentListResult": { + "type": "object", + "description": "The response of a Deployment list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Deployment items on this page", + "items": { + "$ref": "#/definitions/Deployment" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "DeploymentProperties": { + "type": "object", + "description": "The properties of deployment", + "properties": { + "deploymentId": { + "type": "string", + "description": "Deployment ID", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "deployedImages": { + "type": "array", + "description": "Images deployed", + "items": { + "$ref": "#/definitions/Image" + }, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "deploymentDateUtc": { + "type": "string", + "format": "date-time", + "description": "Deployment date UTC", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + } + }, + "Device": { + "type": "object", + "description": "An device resource belonging to a device group resource.", + "properties": { + "properties": { + "$ref": "#/definitions/DeviceProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "DeviceGroup": { + "type": "object", + "description": "An device group resource belonging to a product resource.", + "properties": { + "properties": { + "$ref": "#/definitions/DeviceGroupProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "DeviceGroupListResult": { + "type": "object", + "description": "The response of a DeviceGroup list operation.", + "properties": { + "value": { + "type": "array", + "description": "The DeviceGroup items on this page", + "items": { + "$ref": "#/definitions/DeviceGroup" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "DeviceGroupProperties": { + "type": "object", + "description": "The properties of deviceGroup", + "properties": { + "description": { + "type": "string", + "description": "Description of the device group." + }, + "osFeedType": { + "$ref": "#/definitions/OSFeedType", + "description": "Operating system feed type of the device group." + }, + "updatePolicy": { + "$ref": "#/definitions/UpdatePolicy", + "description": "Update policy of the device group." + }, + "allowCrashDumpsCollection": { + "$ref": "#/definitions/AllowCrashDumpCollection", + "description": "Flag to define if the user allows for crash dump collection." + }, + "regionalDataBoundary": { + "$ref": "#/definitions/RegionalDataBoundary", + "description": "Regional data boundary for the device group." + }, + "hasDeployment": { + "type": "boolean", + "description": "Deployment status for the device group.", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + } + }, + "DeviceGroupUpdate": { + "type": "object", + "description": "The type used for update operations of the DeviceGroup.", + "properties": { + "properties": { + "$ref": "#/definitions/DeviceGroupUpdateProperties", + "description": "The updatable properties of the DeviceGroup." + } + } + }, + "DeviceGroupUpdateProperties": { + "type": "object", + "description": "The updatable properties of the DeviceGroup.", + "properties": { + "description": { + "type": "string", + "description": "Description of the device group." + }, + "osFeedType": { + "$ref": "#/definitions/OSFeedType", + "description": "Operating system feed type of the device group." + }, + "updatePolicy": { + "$ref": "#/definitions/UpdatePolicy", + "description": "Update policy of the device group." + }, + "allowCrashDumpsCollection": { + "$ref": "#/definitions/AllowCrashDumpCollection", + "description": "Flag to define if the user allows for crash dump collection." + }, + "regionalDataBoundary": { + "$ref": "#/definitions/RegionalDataBoundary", + "description": "Regional data boundary for the device group." + } + } + }, + "DeviceInsight": { + "type": "object", + "description": "Device insight report.", + "properties": { + "deviceId": { + "type": "string", + "description": "Device ID" + }, + "description": { + "type": "string", + "description": "Event description" + }, + "startTimestampUtc": { + "type": "string", + "format": "date-time", + "description": "Event start timestamp" + }, + "endTimestampUtc": { + "type": "string", + "format": "date-time", + "description": "Event end timestamp" + }, + "eventCategory": { + "type": "string", + "description": "Event category" + }, + "eventClass": { + "type": "string", + "description": "Event class" + }, + "eventType": { + "type": "string", + "description": "Event type" + }, + "eventCount": { + "type": "integer", + "format": "int32", + "description": "Event count" + } + }, + "required": [ + "deviceId", + "description", + "startTimestampUtc", + "endTimestampUtc", + "eventCategory", + "eventClass", + "eventType", + "eventCount" + ] + }, + "DeviceListResult": { + "type": "object", + "description": "The response of a Device list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Device items on this page", + "items": { + "$ref": "#/definitions/Device" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "DeviceProperties": { + "type": "object", + "description": "The properties of device", + "properties": { + "deviceId": { + "type": "string", + "description": "Device ID", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "chipSku": { + "type": "string", + "description": "SKU of the chip", + "readOnly": true + }, + "lastAvailableOsVersion": { + "type": "string", + "description": "OS version available for installation when update requested", + "readOnly": true + }, + "lastInstalledOsVersion": { + "type": "string", + "description": "OS version running on device when update requested", + "readOnly": true + }, + "lastOsUpdateUtc": { + "type": "string", + "format": "date-time", + "description": "Time when update requested and new OS version available", + "readOnly": true + }, + "lastUpdateRequestUtc": { + "type": "string", + "format": "date-time", + "description": "Time when update was last requested", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + } + }, + "DeviceUpdate": { + "type": "object", + "description": "The type used for update operations of the Device.", + "properties": { + "properties": { + "$ref": "#/definitions/DeviceUpdateProperties", + "description": "The updatable properties of the Device." + } + } + }, + "DeviceUpdateProperties": { + "type": "object", + "description": "The updatable properties of the Device.", + "properties": { + "deviceGroupId": { + "type": "string", + "description": "Device group id" + } + } + }, + "GenerateCapabilityImageRequest": { + "type": "object", + "description": "Request of the action to create a signed device capability image", + "properties": { + "capabilities": { + "type": "array", + "description": "List of capabilities to create", + "items": { + "$ref": "#/definitions/CapabilityType" + } + } + }, + "required": [ + "capabilities" + ] + }, + "Image": { + "type": "object", + "description": "An image resource belonging to a catalog resource.", + "properties": { + "properties": { + "$ref": "#/definitions/ImageProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "ImageListResult": { + "type": "object", + "description": "The response of a Image list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Image items on this page", + "items": { + "$ref": "#/definitions/Image" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "ImageProperties": { + "type": "object", + "description": "The properties of image", + "properties": { + "image": { + "type": "string", + "description": "Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "imageId": { + "type": "string", + "description": "Image ID", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "imageName": { + "type": "string", + "description": "Image name", + "readOnly": true + }, + "regionalDataBoundary": { + "$ref": "#/definitions/RegionalDataBoundary", + "description": "Regional data boundary for an image", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "uri": { + "type": "string", + "description": "Location the image", + "readOnly": true + }, + "description": { + "type": "string", + "description": "The image description.", + "readOnly": true + }, + "componentId": { + "type": "string", + "description": "The image component id.", + "readOnly": true + }, + "imageType": { + "$ref": "#/definitions/ImageType", + "description": "The image type.", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + } + }, + "ImageType": { + "type": "string", + "description": "Image type values.", + "enum": [ + "InvalidImageType", + "OneBl", + "PlutonRuntime", + "WifiFirmware", + "SecurityMonitor", + "NormalWorldLoader", + "NormalWorldDtb", + "NormalWorldKernel", + "RootFs", + "Services", + "Applications", + "FwConfig", + "BootManifest", + "Nwfs", + "TrustedKeystore", + "Policy", + "CustomerBoardConfig", + "UpdateCertStore", + "BaseSystemUpdateManifest", + "FirmwareUpdateManifest", + "CustomerUpdateManifest", + "RecoveryManifest", + "ManifestSet", + "Other" + ], + "x-ms-enum": { + "name": "ImageType", + "modelAsString": true, + "values": [ + { + "name": "InvalidImageType", + "value": "InvalidImageType", + "description": "Invalid image." + }, + { + "name": "OneBl", + "value": "OneBl", + "description": "One Bl image type" + }, + { + "name": "PlutonRuntime", + "value": "PlutonRuntime", + "description": "Pluton image type" + }, + { + "name": "WifiFirmware", + "value": "WifiFirmware", + "description": "Wifi firmware image type" + }, + { + "name": "SecurityMonitor", + "value": "SecurityMonitor", + "description": "Security monitor image type" + }, + { + "name": "NormalWorldLoader", + "value": "NormalWorldLoader", + "description": "Normal world loader image type" + }, + { + "name": "NormalWorldDtb", + "value": "NormalWorldDtb", + "description": "Normal world dtb image type" + }, + { + "name": "NormalWorldKernel", + "value": "NormalWorldKernel", + "description": "Normal world kernel image type" + }, + { + "name": "RootFs", + "value": "RootFs", + "description": "Root FS image type" + }, + { + "name": "Services", + "value": "Services", + "description": "Services image type" + }, + { + "name": "Applications", + "value": "Applications", + "description": "Applications image type" + }, + { + "name": "FwConfig", + "value": "FwConfig", + "description": "FW config image type" + }, + { + "name": "BootManifest", + "value": "BootManifest", + "description": "Boot manifest image type" + }, + { + "name": "Nwfs", + "value": "Nwfs", + "description": "Nwfs image type" + }, + { + "name": "TrustedKeystore", + "value": "TrustedKeystore", + "description": "Trusted key store image type" + }, + { + "name": "Policy", + "value": "Policy", + "description": "Policy image type" + }, + { + "name": "CustomerBoardConfig", + "value": "CustomerBoardConfig", + "description": "Customer board config image type" + }, + { + "name": "UpdateCertStore", + "value": "UpdateCertStore", + "description": "Update certificate store image type" + }, + { + "name": "BaseSystemUpdateManifest", + "value": "BaseSystemUpdateManifest", + "description": "Base system update manifest image type" + }, + { + "name": "FirmwareUpdateManifest", + "value": "FirmwareUpdateManifest", + "description": "Firmware update manifest image type" + }, + { + "name": "CustomerUpdateManifest", + "value": "CustomerUpdateManifest", + "description": "Customer update manifest image type" + }, + { + "name": "RecoveryManifest", + "value": "RecoveryManifest", + "description": "Recovery manifest image type" + }, + { + "name": "ManifestSet", + "value": "ManifestSet", + "description": "manifest set image type" + }, + { + "name": "Other", + "value": "Other", + "description": "Other image type" + } + ] + } + }, + "ListDeviceGroupsRequest": { + "type": "object", + "description": "Request of the action to list device groups for a catalog.", + "properties": { + "deviceGroupName": { + "type": "string", + "description": "Device Group name." + } + } + }, + "OSFeedType": { + "type": "string", + "description": "OS feed type values.", + "enum": [ + "Retail", + "RetailEval" + ], + "x-ms-enum": { + "name": "OSFeedType", + "modelAsString": true, + "values": [ + { + "name": "Retail", + "value": "Retail", + "description": "Retail OS feed type." + }, + { + "name": "RetailEval", + "value": "RetailEval", + "description": "Retail evaluation OS feed type." + } + ] + } + }, + "PagedDeviceInsight": { + "type": "object", + "description": "Paged collection of DeviceInsight items", + "properties": { + "value": { + "type": "array", + "description": "The DeviceInsight items on this page", + "items": { + "$ref": "#/definitions/DeviceInsight" + }, + "x-ms-identifiers": [] + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "Product": { + "type": "object", + "description": "An product resource belonging to a catalog resource.", + "properties": { + "properties": { + "$ref": "#/definitions/ProductProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "ProductListResult": { + "type": "object", + "description": "The response of a Product list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Product items on this page", + "items": { + "$ref": "#/definitions/Product" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "ProductProperties": { + "type": "object", + "description": "The properties of product", + "properties": { + "description": { + "type": "string", + "description": "Description of the product" + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + }, + "required": [ + "description" + ] + }, + "ProductUpdate": { + "type": "object", + "description": "The type used for update operations of the Product.", + "properties": { + "properties": { + "$ref": "#/definitions/ProductUpdateProperties", + "description": "The updatable properties of the Product." + } + } + }, + "ProductUpdateProperties": { + "type": "object", + "description": "The updatable properties of the Product.", + "properties": { + "description": { + "type": "string", + "description": "Description of the product" + } + } + }, + "ProofOfPossessionNonceRequest": { + "type": "object", + "description": "Request for the proof of possession nonce", + "properties": { + "proofOfPossessionNonce": { + "type": "string", + "description": "The proof of possession nonce" + } + }, + "required": [ + "proofOfPossessionNonce" + ] + }, + "ProofOfPossessionNonceResponse": { + "type": "object", + "description": "Result of the action to generate a proof of possession nonce", + "allOf": [ + { + "$ref": "#/definitions/CertificateProperties" + } + ] + }, + "ProvisioningState": { + "type": "string", + "description": "Provisioning state of the resource.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Provisioning", + "Updating", + "Deleting", + "Accepted" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Resource has been created." + }, + { + "name": "Failed", + "value": "Failed", + "description": "Resource creation failed." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Resource creation was canceled." + }, + { + "name": "Provisioning", + "value": "Provisioning", + "description": "The resource is being provisioned" + }, + { + "name": "Updating", + "value": "Updating", + "description": "The resource is being updated" + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "The resource is being deleted" + }, + { + "name": "Accepted", + "value": "Accepted", + "description": "The resource create request has been accepted" + } + ] + }, + "readOnly": true + }, + "RegionalDataBoundary": { + "type": "string", + "description": "Regional data boundary values.", + "enum": [ + "None", + "EU" + ], + "x-ms-enum": { + "name": "RegionalDataBoundary", + "modelAsString": true, + "values": [ + { + "name": "None", + "value": "None", + "description": "No data boundary" + }, + { + "name": "EU", + "value": "EU", + "description": "EU data boundary" + } + ] + } + }, + "SignedCapabilityImageResponse": { + "type": "object", + "description": "Signed device capability image response", + "properties": { + "image": { + "type": "string", + "description": "The signed device capability image as a UTF-8 encoded base 64 string.", + "readOnly": true + } + } + }, + "UpdatePolicy": { + "type": "string", + "description": "Update policy values.", + "enum": [ + "UpdateAll", + "No3rdPartyAppUpdates" + ], + "x-ms-enum": { + "name": "UpdatePolicy", + "modelAsString": true, + "values": [ + { + "name": "UpdateAll", + "value": "UpdateAll", + "description": "Update all policy." + }, + { + "name": "No3rdPartyAppUpdates", + "value": "No3rdPartyAppUpdates", + "description": "No update for 3rd party app policy." + } + ] + } + } + }, + "parameters": {} +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp index 3d0b366dae..4994ceff5e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp @@ -52,8 +52,6 @@ interface Catalogs { /** * List Catalog resources by resource group */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Catalogs_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; /** @@ -211,14 +209,6 @@ interface Catalogs { >; } -@@encodedName(Catalogs.listDeviceGroups::parameters.body, - "json", - "listDeviceGroupsRequest" -); -@@extension(Catalogs.listDeviceGroups::parameters.body, - "x-ms-client-name", - "listDeviceGroupsRequest" -); @@doc(Catalogs.listDeviceGroups::parameters.body, "List device groups for catalog." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp index 33a8111cfe..0baa0724a5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp @@ -37,8 +37,6 @@ interface Certificates { /** * List Certificate resources by Catalog */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Certificates_ListByCatalog") listByCatalog is ArmResourceListByParent< Certificate, { @@ -89,14 +87,6 @@ interface Certificates { >; } -@@encodedName(Certificates.retrieveProofOfPossessionNonce::parameters.body, - "json", - "proofOfPossessionNonceRequest" -); -@@extension(Certificates.retrieveProofOfPossessionNonce::parameters.body, - "x-ms-client-name", - "proofOfPossessionNonceRequest" -); @@doc(Certificates.retrieveProofOfPossessionNonce::parameters.body, "Proof of possession nonce request body " ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp index b7e89ebc07..faee6b4d02 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp @@ -47,8 +47,6 @@ interface Deployments { /** * List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Deployments_ListByDeviceGroup") listByDeviceGroup is ArmResourceListByParent< Deployment, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp index 060ac44572..0565dd4464 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp @@ -54,8 +54,6 @@ interface Devices { /** * List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Devices_ListByDeviceGroup") listByDeviceGroup is ArmResourceListByParent; /** @@ -68,14 +66,6 @@ interface Devices { >; } -@@encodedName(Devices.generateCapabilityImage::parameters.body, - "json", - "generateDeviceCapabilityRequest" -); -@@extension(Devices.generateCapabilityImage::parameters.body, - "x-ms-client-name", - "generateDeviceCapabilityRequest" -); @@doc(Devices.generateCapabilityImage::parameters.body, "Generate capability image request body." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp index 6400e096be..5099c73097 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp @@ -54,8 +54,6 @@ interface DeviceGroups { /** * List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("DeviceGroups_ListByProduct") listByProduct is ArmResourceListByParent< DeviceGroup, { @@ -101,14 +99,6 @@ interface DeviceGroups { countDevices is ArmResourceActionSync; } -@@encodedName(DeviceGroups.claimDevices::parameters.body, - "json", - "claimDevicesRequest" -); -@@extension(DeviceGroups.claimDevices::parameters.body, - "x-ms-client-name", - "claimDevicesRequest" -); @@doc(DeviceGroups.claimDevices::parameters.body, "Bulk claim devices request body." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp index bb67b775a4..39395dd755 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp @@ -47,8 +47,6 @@ interface Images { /** * List Image resources by Catalog */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Images_ListByCatalog") listByCatalog is ArmResourceListByParent< Image, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp index 192d6e805b..467783cf7b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp @@ -54,8 +54,6 @@ interface Products { /** * List Product resources by Catalog */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Products_ListByCatalog") listByCatalog is ArmResourceListByParent; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp index 9fa8d67d65..e45c7087cd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp @@ -15,8 +15,12 @@ namespace Microsoft.Storage; /** * Properties of the blob container, including Id, resource name, resource type, Etag. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(BlobServiceProperties) -model BlobContainer is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ContainerProperties) +model BlobContainer extends ProxyResourceBase { /** * The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. */ @@ -27,6 +31,12 @@ model BlobContainer is ProxyResource { @segment("containers") @visibility("read") name: string; + + /** + * Properties of the blob container. + */ + @extension("x-ms-client-flatten", true) + properties?: ContainerProperties; } @armResourceOperations @@ -55,6 +65,8 @@ interface BlobContainers { /** * Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BlobContainers_List") list is ArmResourceListByParent< BlobContainer, { @@ -105,16 +117,56 @@ interface BlobContainers { objectLevelWorm is ArmResourceActionAsync; } +@@encodedName(BlobContainers.create::parameters.resource, + "application/json", + "blobContainer" +); +@@extension(BlobContainers.create::parameters.resource, + "x-ms-client-name", + "blobContainer" +); @@doc(BlobContainers.create::parameters.resource, "Properties of the blob container to create." ); +@@encodedName(BlobContainers.update::parameters.properties, + "application/json", + "blobContainer" +); +@@extension(BlobContainers.update::parameters.properties, + "x-ms-client-name", + "blobContainer" +); @@doc(BlobContainers.update::parameters.properties, "Properties to update for the blob container." ); +@@encodedName(BlobContainers.setLegalHold::parameters.body, + "application/json", + "LegalHold" +); +@@extension(BlobContainers.setLegalHold::parameters.body, + "x-ms-client-name", + "LegalHold" +); @@doc(BlobContainers.setLegalHold::parameters.body, "The LegalHold property that will be set to a blob container." ); +@@encodedName(BlobContainers.clearLegalHold::parameters.body, + "application/json", + "LegalHold" +); +@@extension(BlobContainers.clearLegalHold::parameters.body, + "x-ms-client-name", + "LegalHold" +); @@doc(BlobContainers.clearLegalHold::parameters.body, "The LegalHold property that will be clear from a blob container." ); +@@encodedName(BlobContainers.lease::parameters.body, + "application/json", + "parameters" +); +@@extension(BlobContainers.lease::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(BlobContainers.lease::parameters.body, "Lease Container request body."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp index 845b63483f..e3e98e5b3a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp @@ -15,13 +15,25 @@ namespace Microsoft.Storage; /** * The storage account blob inventory policy. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -model BlobInventoryPolicy is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + BlobInventoryPolicyProperties +) +model BlobInventoryPolicy extends ProxyResourceBase { @key("inventoryPolicy") @segment("inventoryPolicies") @visibility("read") name: string; + + /** + * Returns the storage account blob inventory policy rules. + */ + @extension("x-ms-client-flatten", true) + properties?: BlobInventoryPolicyProperties; } @armResourceOperations @@ -44,9 +56,19 @@ interface BlobInventoryPolicies { /** * Gets the blob inventory policy associated with the specified storage account. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BlobInventoryPolicies_List") list is ArmResourceListByParent; } +@@encodedName(BlobInventoryPolicies.createOrUpdate::parameters.resource, + "application/json", + "properties" +); +@@extension(BlobInventoryPolicies.createOrUpdate::parameters.resource, + "x-ms-client-name", + "properties" +); @@doc(BlobInventoryPolicies.createOrUpdate::parameters.resource, "The blob inventory policy set to a storage account." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp index 3a5f53b5c2..e1cfc6817a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp @@ -15,14 +15,26 @@ namespace Microsoft.Storage; /** * The properties of a storage account’s Blob service. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -model BlobServiceProperties is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + BlobServicePropertiesProperties +) +model BlobServiceProperties extends ProxyResourceBase { @key("blobService") @segment("blobServices") @visibility("read") name: string; + /** + * The properties of a storage account’s Blob service. + */ + @extension("x-ms-client-flatten", true) + properties?: BlobServicePropertiesProperties; + ...Azure.ResourceManager.ResourceSku; } @@ -31,19 +43,33 @@ interface BlobServicePropertiesOperationGroup { /** * Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BlobServices_GetServiceProperties") getServiceProperties is ArmResourceRead; /** * Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BlobServices_SetServiceProperties") setServiceProperties is ArmResourceCreateOrReplaceSync; /** * List blob services of storage account. It returns a collection of one object named default. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BlobServices_List") list is ArmResourceListByParent; } +@@encodedName(BlobServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "application/json", + "parameters" +); +@@extension(BlobServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(BlobServicePropertiesOperationGroup.setServiceProperties::parameters.resource, "The properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp index be9b8093ef..989af38fc7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp @@ -14,9 +14,13 @@ namespace Microsoft.Storage; /** * Deleted storage account */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource @parentResource("SubscriptionLocationResource") -model DeletedAccount is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(DeletedAccountProperties) +model DeletedAccount extends ProxyResourceBase { /** * Name of the deleted storage account. */ @@ -27,6 +31,12 @@ model DeletedAccount is ProxyResource { @segment("deletedAccounts") @visibility("read") name: string; + + /** + * Properties of the deleted account. + */ + @extension("x-ms-client-flatten", true) + properties?: DeletedAccountProperties; } @armResourceOperations diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp index 0f13a215f4..e6316e0112 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp @@ -15,8 +15,12 @@ namespace Microsoft.Storage; /** * The Encryption Scope resource. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(StorageAccount) -model EncryptionScope is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(EncryptionScopeProperties) +model EncryptionScope extends ProxyResourceBase { /** * The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. */ @@ -27,6 +31,12 @@ model EncryptionScope is ProxyResource { @segment("encryptionScopes") @visibility("read") name: string; + + /** + * Properties of the encryption scope. + */ + @extension("x-ms-client-flatten", true) + properties?: EncryptionScopeProperties; } @armResourceOperations @@ -50,6 +60,8 @@ interface EncryptionScopes { /** * Lists all the encryption scopes available under the specified storage account. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("EncryptionScopes_List") list is ArmResourceListByParent< EncryptionScope, { @@ -78,9 +90,25 @@ interface EncryptionScopes { >; } +@@encodedName(EncryptionScopes.put::parameters.resource, + "application/json", + "encryptionScope" +); +@@extension(EncryptionScopes.put::parameters.resource, + "x-ms-client-name", + "encryptionScope" +); @@doc(EncryptionScopes.put::parameters.resource, "Encryption scope properties to be used for the create or update." ); +@@encodedName(EncryptionScopes.patch::parameters.properties, + "application/json", + "encryptionScope" +); +@@extension(EncryptionScopes.patch::parameters.properties, + "x-ms-client-name", + "encryptionScope" +); @@doc(EncryptionScopes.patch::parameters.properties, "Encryption scope properties to be used for the update." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp index 9602eddab8..ec2cac71b1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp @@ -15,14 +15,26 @@ namespace Microsoft.Storage; /** * The properties of File services in storage account. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -model FileServiceProperties is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + FileServicePropertiesProperties +) +model FileServiceProperties extends ProxyResourceBase { @key("fileService") @segment("fileServices") @visibility("read") name: string; + /** + * The properties of File services in storage account. + */ + @extension("x-ms-client-flatten", true) + properties?: FileServicePropertiesProperties; + ...Azure.ResourceManager.ResourceSku; } @@ -31,19 +43,33 @@ interface FileServicePropertiesOperationGroup { /** * Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("FileServices_GetServiceProperties") getServiceProperties is ArmResourceRead; /** * Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("FileServices_SetServiceProperties") setServiceProperties is ArmResourceCreateOrReplaceSync; /** * List all file services in storage accounts */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("FileServices_List") list is ArmResourceListByParent; } +@@encodedName(FileServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "application/json", + "parameters" +); +@@extension(FileServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(FileServicePropertiesOperationGroup.setServiceProperties::parameters.resource, "The properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp index c6356b8195..f93bcd8a13 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp @@ -15,8 +15,12 @@ namespace Microsoft.Storage; /** * Properties of the file share, including Id, resource name, resource type, Etag. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(FileServiceProperties) -model FileShare is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(FileShareProperties) +model FileShare extends ProxyResourceBase { /** * The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. */ @@ -27,6 +31,12 @@ model FileShare is ProxyResource { @segment("shares") @visibility("read") name: string; + + /** + * Properties of the file share. + */ + @extension("x-ms-client-flatten", true) + properties?: FileShareProperties; } @armResourceOperations @@ -100,6 +110,8 @@ interface FileShares { /** * Lists all shares. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("FileShares_List") list is ArmResourceListByParent< FileShare, { @@ -149,11 +161,43 @@ interface FileShares { >; } +@@encodedName(FileShares.create::parameters.resource, + "application/json", + "fileShare" +); +@@extension(FileShares.create::parameters.resource, + "x-ms-client-name", + "fileShare" +); @@doc(FileShares.create::parameters.resource, "Properties of the file share to create." ); +@@encodedName(FileShares.update::parameters.properties, + "application/json", + "fileShare" +); +@@extension(FileShares.update::parameters.properties, + "x-ms-client-name", + "fileShare" +); @@doc(FileShares.update::parameters.properties, "Properties to update for the file share." ); +@@encodedName(FileShares.restore::parameters.body, + "application/json", + "deletedShare" +); +@@extension(FileShares.restore::parameters.body, + "x-ms-client-name", + "deletedShare" +); @@doc(FileShares.restore::parameters.body, ""); +@@encodedName(FileShares.lease::parameters.body, + "application/json", + "parameters" +); +@@extension(FileShares.lease::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(FileShares.lease::parameters.body, "Lease Share request body."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp index b6344c24f5..d2683701fc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp @@ -15,13 +15,23 @@ namespace Microsoft.Storage; /** * The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(BlobContainer) -model ImmutabilityPolicy is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ImmutabilityPolicyProperty) +model ImmutabilityPolicy extends ProxyResourceBase { @key("immutabilityPolicy") @segment("immutabilityPolicies") @visibility("read") name: string; + + /** + * The properties of an ImmutabilityPolicy of a blob container. + */ + @extension("x-ms-client-flatten", true) + properties: ImmutabilityPolicyProperty; } @armResourceOperations @@ -29,6 +39,8 @@ interface ImmutabilityPolicies { /** * Gets the existing immutability policy along with the corresponding ETag in response headers and body. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BlobContainers_GetImmutabilityPolicy") getImmutabilityPolicy is ArmResourceRead< ImmutabilityPolicy, { @@ -45,6 +57,8 @@ interface ImmutabilityPolicies { /** * Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BlobContainers_CreateOrUpdateImmutabilityPolicy") createOrUpdateImmutabilityPolicy is ArmResourceCreateOrReplaceSync< ImmutabilityPolicy, { @@ -61,6 +75,8 @@ interface ImmutabilityPolicies { /** * Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BlobContainers_DeleteImmutabilityPolicy") deleteImmutabilityPolicy is ArmResourceDeleteSync< ImmutabilityPolicy, { @@ -77,6 +93,8 @@ interface ImmutabilityPolicies { /** * Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BlobContainers_LockImmutabilityPolicy") lockImmutabilityPolicy is ArmResourceActionSync< ImmutabilityPolicy, void, @@ -95,6 +113,8 @@ interface ImmutabilityPolicies { /** * Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("BlobContainers_ExtendImmutabilityPolicy") extendImmutabilityPolicy is ArmResourceActionSync< ImmutabilityPolicy, ImmutabilityPolicy, @@ -111,9 +131,25 @@ interface ImmutabilityPolicies { >; } +@@encodedName(ImmutabilityPolicies.createOrUpdateImmutabilityPolicy::parameters.resource, + "application/json", + "parameters" +); +@@extension(ImmutabilityPolicies.createOrUpdateImmutabilityPolicy::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(ImmutabilityPolicies.createOrUpdateImmutabilityPolicy::parameters.resource, "The ImmutabilityPolicy Properties that will be created or updated to a blob container." ); +@@encodedName(ImmutabilityPolicies.extendImmutabilityPolicy::parameters.body, + "application/json", + "parameters" +); +@@extension(ImmutabilityPolicies.extendImmutabilityPolicy::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(ImmutabilityPolicies.extendImmutabilityPolicy::parameters.body, "The ImmutabilityPolicy Properties that will be extended for a blob container." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp index b70203d3ff..27cc3a35ca 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp @@ -15,8 +15,12 @@ namespace Microsoft.Storage; /** * The local user associated with the storage accounts. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(StorageAccount) -model LocalUser is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(LocalUserProperties) +model LocalUser extends ProxyResourceBase { /** * The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account. */ @@ -27,6 +31,12 @@ model LocalUser is ProxyResource { @segment("localUsers") @visibility("read") name: string; + + /** + * Storage account local user properties. + */ + @extension("x-ms-client-flatten", true) + properties?: LocalUserProperties; } @armResourceOperations @@ -49,6 +59,8 @@ interface LocalUsers { /** * List the local users associated with the storage account. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("LocalUsers_List") list is ArmResourceListByParent; /** @@ -66,6 +78,14 @@ interface LocalUsers { >; } +@@encodedName(LocalUsers.createOrUpdate::parameters.resource, + "application/json", + "properties" +); +@@extension(LocalUsers.createOrUpdate::parameters.resource, + "x-ms-client-name", + "properties" +); @@doc(LocalUsers.createOrUpdate::parameters.resource, "The local user associated with a storage account." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp index 18931c2b32..570855af82 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp @@ -15,13 +15,23 @@ namespace Microsoft.Storage; /** * The Get Storage Account ManagementPolicies operation response. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -model ManagementPolicy is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(ManagementPolicyProperties) +model ManagementPolicy extends ProxyResourceBase { @key("managementPolicy") @segment("managementPolicies") @visibility("read") name: string; + + /** + * Returns the Storage Account Data Policies Rules. + */ + @extension("x-ms-client-flatten", true) + properties?: ManagementPolicyProperties; } @armResourceOperations @@ -42,6 +52,14 @@ interface ManagementPolicies { delete is ArmResourceDeleteSync; } +@@encodedName(ManagementPolicies.createOrUpdate::parameters.resource, + "application/json", + "properties" +); +@@extension(ManagementPolicies.createOrUpdate::parameters.resource, + "x-ms-client-name", + "properties" +); @@doc(ManagementPolicies.createOrUpdate::parameters.resource, "The ManagementPolicy set to a storage account." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp index b3e4e9bde8..f2a6a67c9b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp @@ -15,9 +15,14 @@ namespace Microsoft.Storage; /** * The replication policy between two storage accounts. Multiple rules can be defined in one policy. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(StorageAccount) -model ObjectReplicationPolicy - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + ObjectReplicationPolicyProperties +) +model ObjectReplicationPolicy extends ProxyResourceBase { /** * For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file. */ @@ -27,6 +32,12 @@ model ObjectReplicationPolicy @segment("objectReplicationPolicies") @visibility("read") name: string; + + /** + * Returns the Storage Account Object Replication Policy. + */ + @extension("x-ms-client-flatten", true) + properties?: ObjectReplicationPolicyProperties; } @armResourceOperations @@ -49,9 +60,19 @@ interface ObjectReplicationPolicies { /** * List the object replication policies associated with the storage account. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ObjectReplicationPolicies_List") list is ArmResourceListByParent; } +@@encodedName(ObjectReplicationPolicies.createOrUpdate::parameters.resource, + "application/json", + "properties" +); +@@extension(ObjectReplicationPolicies.createOrUpdate::parameters.resource, + "x-ms-client-name", + "properties" +); @@doc(ObjectReplicationPolicies.createOrUpdate::parameters.resource, "The object replication policy set to a storage account. A unique policy ID will be created if absent." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp index 4fc9779311..b03c948554 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp @@ -15,9 +15,14 @@ namespace Microsoft.Storage; /** * The Private Endpoint Connection resource. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(StorageAccount) -model PrivateEndpointConnection - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + PrivateEndpointConnectionProperties +) +model PrivateEndpointConnection extends ProxyResourceBase { /** * The name of the private endpoint connection associated with the Azure resource */ @@ -26,6 +31,12 @@ model PrivateEndpointConnection @segment("privateEndpointConnections") @visibility("read") name: string; + + /** + * Resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: PrivateEndpointConnectionProperties; } @armResourceOperations @@ -48,9 +59,19 @@ interface PrivateEndpointConnections { /** * List all the private endpoint connections associated with the storage account. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateEndpointConnections_List") list is ArmResourceListByParent; } +@@encodedName(PrivateEndpointConnections.put::parameters.resource, + "application/json", + "properties" +); +@@extension(PrivateEndpointConnections.put::parameters.resource, + "x-ms-client-name", + "properties" +); @@doc(PrivateEndpointConnections.put::parameters.resource, "The private endpoint connection properties." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp index 590496be39..ed4b8c6d6f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp @@ -15,14 +15,25 @@ namespace Microsoft.Storage; /** * The properties of a storage account’s Queue service. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -model QueueServiceProperties - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + QueueServicePropertiesProperties +) +model QueueServiceProperties extends ProxyResourceBase { @key("queueService") @segment("queueServices") @visibility("read") name: string; + + /** + * The properties of a storage account’s Queue service. + */ + @extension("x-ms-client-flatten", true) + properties?: QueueServicePropertiesProperties; } @armResourceOperations @@ -30,19 +41,33 @@ interface QueueServicePropertiesOperationGroup { /** * Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("QueueServices_GetServiceProperties") getServiceProperties is ArmResourceRead; /** * Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("QueueServices_SetServiceProperties") setServiceProperties is ArmResourceCreateOrReplaceSync; /** * List all queue services for the storage account */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("QueueServices_List") list is ArmResourceListByParent; } +@@encodedName(QueueServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "application/json", + "parameters" +); +@@extension(QueueServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(QueueServicePropertiesOperationGroup.setServiceProperties::parameters.resource, "The properties of a storage account’s Queue service, only properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules can be specified." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp index 773fcd206c..d2a6b1137b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp @@ -14,7 +14,11 @@ namespace Microsoft.Storage; /** * The storage account. */ -model StorageAccount is TrackedResource { +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(StorageAccountProperties) +model StorageAccount extends TrackedResourceBase { /** * The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. */ @@ -37,6 +41,12 @@ model StorageAccount is TrackedResource { */ extendedLocation?: ExtendedLocation; + /** + * Properties of the storage account. + */ + @extension("x-ms-client-flatten", true) + properties?: StorageAccountProperties; + ...Azure.ResourceManager.ManagedServiceIdentity; ...Azure.ResourceManager.ResourceSku; } @@ -78,6 +88,8 @@ interface StorageAccounts { /** * Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("StorageAccounts_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; /** @@ -115,6 +127,8 @@ interface StorageAccounts { /** * List SAS credentials of a storage account. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("StorageAccounts_ListAccountSAS") listAccountSAS is ArmResourceActionSync< StorageAccount, AccountSasParameters, @@ -124,6 +138,8 @@ interface StorageAccounts { /** * List service SAS credentials of a specific resource. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("StorageAccounts_ListServiceSAS") listServiceSAS is ArmResourceActionSync< StorageAccount, ServiceSasParameters, @@ -201,6 +217,8 @@ interface StorageAccounts { * Gets the private link resources that need to be created for a storage account. */ // FIXME: PrivateLinkResources_ListByStorageAccount could not be converted to a resource operation + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateLinkResources_ListByStorageAccount") @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateLinkResources") @get listByStorageAccount( @@ -219,21 +237,69 @@ interface StorageAccounts { ): ArmResponse | ErrorResponse; } +@@encodedName(StorageAccounts.create::parameters.resource, + "application/json", + "parameters" +); +@@extension(StorageAccounts.create::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(StorageAccounts.create::parameters.resource, "The parameters to provide for the created account." ); +@@encodedName(StorageAccounts.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(StorageAccounts.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(StorageAccounts.update::parameters.properties, "The parameters to provide for the updated account." ); +@@encodedName(StorageAccounts.regenerateKey::parameters.body, + "application/json", + "regenerateKey" +); +@@extension(StorageAccounts.regenerateKey::parameters.body, + "x-ms-client-name", + "regenerateKey" +); @@doc(StorageAccounts.regenerateKey::parameters.body, "Specifies name of the key which should be regenerated -- key1, key2, kerb1, kerb2." ); +@@encodedName(StorageAccounts.listAccountSAS::parameters.body, + "application/json", + "parameters" +); +@@extension(StorageAccounts.listAccountSAS::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(StorageAccounts.listAccountSAS::parameters.body, "The parameters to provide to list SAS credentials for the storage account." ); +@@encodedName(StorageAccounts.listServiceSAS::parameters.body, + "application/json", + "parameters" +); +@@extension(StorageAccounts.listServiceSAS::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(StorageAccounts.listServiceSAS::parameters.body, "The parameters to provide to list service SAS credentials." ); +@@encodedName(StorageAccounts.restoreBlobRanges::parameters.body, + "application/json", + "parameters" +); +@@extension(StorageAccounts.restoreBlobRanges::parameters.body, + "x-ms-client-name", + "parameters" +); @@doc(StorageAccounts.restoreBlobRanges::parameters.body, "The parameters to provide for restore blob ranges." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp index b0217e68df..eb4b587a9f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp @@ -13,8 +13,12 @@ using TypeSpec.OpenAPI; namespace Microsoft.Storage; +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(QueueServiceProperties) -model StorageQueue is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(QueueProperties) +model StorageQueue extends ProxyResourceBase { /** * A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters. */ @@ -26,6 +30,12 @@ model StorageQueue is ProxyResource { @segment("queues") @visibility("read") name: string; + + /** + * Queue resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: QueueProperties; } @armResourceOperations @@ -33,27 +43,37 @@ interface StorageQueues { /** * Gets the queue with the specified queue name, under the specified account if it exists. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Queue_Get") get is ArmResourceRead; /** * Creates a new queue with the specified queue name, under the specified account. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Queue_Create") create is ArmResourceCreateOrReplaceSync; /** * Creates a new queue with the specified queue name, under the specified account. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("Queue_Update") update is ArmCustomPatchSync; /** * Deletes the queue with the specified queue name, under the specified account if it exists. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Queue_Delete") delete is ArmResourceDeleteSync; /** * Gets a list of all the queues under the specified storage account */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Queue_List") list is ArmResourceListByParent< StorageQueue, { @@ -74,9 +94,25 @@ interface StorageQueues { >; } +@@encodedName(StorageQueues.create::parameters.resource, + "application/json", + "queue" +); +@@extension(StorageQueues.create::parameters.resource, + "x-ms-client-name", + "queue" +); @@doc(StorageQueues.create::parameters.resource, "Queue properties and metadata to be created with" ); +@@encodedName(StorageQueues.update::parameters.properties, + "application/json", + "queue" +); +@@extension(StorageQueues.update::parameters.properties, + "x-ms-client-name", + "queue" +); @@doc(StorageQueues.update::parameters.properties, "Queue properties and metadata to be created with" ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp index 83b80a2795..34e3927a9f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp @@ -15,8 +15,12 @@ namespace Microsoft.Storage; /** * Properties of the table, including Id, resource name, resource type. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @parentResource(TableServiceProperties) -model Table is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal(TableProperties) +model Table extends ProxyResourceBase { /** * A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character. */ @@ -28,6 +32,12 @@ model Table is ProxyResource { @segment("tables") @visibility("read") name: string; + + /** + * Table resource properties. + */ + @extension("x-ms-client-flatten", true) + properties?: TableProperties; } @armResourceOperations @@ -35,33 +45,59 @@ interface Tables { /** * Gets the table with the specified table name, under the specified account if it exists. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Table_Get") get is ArmResourceRead
    ; /** * Creates a new table with the specified table name, under the specified account. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Table_Create") create is ArmResourceCreateOrReplaceSync
    ; /** * Creates a new table with the specified table name, under the specified account. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @parameterVisibility("read") + @operationId("Table_Update") update is ArmCustomPatchSync; /** * Deletes the table with the specified table name, under the specified account if it exists. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Table_Delete") delete is ArmResourceDeleteSync
    ; /** * Gets a list of all the tables under the specified storage account */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Table_List") list is ArmResourceListByParent
    ; } +@@encodedName(Tables.create::parameters.resource, + "application/json", + "parameters" +); +@@extension(Tables.create::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(Tables.create::parameters.resource, "The parameters to provide to create a table." ); +@@encodedName(Tables.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(Tables.update::parameters.properties, + "x-ms-client-name", + "parameters" +); @@doc(Tables.update::parameters.properties, "The parameters to provide to create a table." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp index 1a91f59ec3..d891ace999 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp @@ -15,14 +15,25 @@ namespace Microsoft.Storage; /** * The properties of a storage account’s Table service. */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @singleton("default") @parentResource(StorageAccount) -model TableServiceProperties - is ProxyResource { +@includeInapplicableMetadataInPayload(false) +@Azure.ResourceManager.Private.armResourceInternal( + TableServicePropertiesProperties +) +model TableServiceProperties extends ProxyResourceBase { @key("tableService") @segment("tableServices") @visibility("read") name: string; + + /** + * The properties of a storage account’s Table service. + */ + @extension("x-ms-client-flatten", true) + properties?: TableServicePropertiesProperties; } @armResourceOperations @@ -30,19 +41,33 @@ interface TableServicePropertiesOperationGroup { /** * Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TableServices_GetServiceProperties") getServiceProperties is ArmResourceRead; /** * Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TableServices_SetServiceProperties") setServiceProperties is ArmResourceCreateOrReplaceSync; /** * List all table services for the storage account. */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TableServices_List") list is ArmResourceListByParent; } +@@encodedName(TableServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "application/json", + "parameters" +); +@@extension(TableServicePropertiesOperationGroup.setServiceProperties::parameters.resource, + "x-ms-client-name", + "parameters" +); @@doc(TableServicePropertiesOperationGroup.setServiceProperties::parameters.resource, "The properties of a storage account’s Table service, only properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules can be specified." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-test/swagger-output/swagger.json new file mode 100644 index 0000000000..53aee6556d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-test/swagger-output/swagger.json @@ -0,0 +1,901 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Test resource management API.", + "version": "2023-10-12", + "description": "For test.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "AadOauth2Auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "AadOauth2Auth": { + "type": "oauth2", + "description": "The Azure Active Directory OAuth2 Flow", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "Employees" + }, + { + "name": "Enrolls" + }, + { + "name": "DictProperties" + }, + { + "name": "ArrayDefaults" + } + ], + "paths": { + "/providers/Microsoft.Test/operations": { + "get": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Test/employees": { + "get": { + "operationId": "Employees_ListBySubscription", + "tags": [ + "Employees" + ], + "description": "List Employee resources by subscription ID", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/EmployeeListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees": { + "get": { + "operationId": "Employees_ListByResourceGroup", + "tags": [ + "Employees" + ], + "description": "List Employee resources by resource group", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/EmployeeListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}": { + "get": { + "operationId": "Employees_Get", + "tags": [ + "Employees" + ], + "description": "Get a Employee", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Employee" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "operationId": "Employees_CreateOrUpdate", + "tags": [ + "Employees" + ], + "description": "Create a Employee", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/Employee" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Employee' update operation succeeded", + "schema": { + "$ref": "#/definitions/Employee" + } + }, + "201": { + "description": "Resource 'Employee' create operation succeeded", + "schema": { + "$ref": "#/definitions/Employee" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Employees_Update", + "tags": [ + "Employees" + ], + "description": "Update a Employee", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/EmployeeUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Employee" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "operationId": "Employees_Delete", + "tags": [ + "Employees" + ], + "description": "Delete a Employee", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/arraydefaults": { + "get": { + "operationId": "ArrayDefaults_ListByEmployee", + "tags": [ + "ArrayDefaults" + ], + "description": "List resources by resource group", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ArrayDefaultListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/arraydefaults/{name}": { + "get": { + "operationId": "ArrayDefaults_Get", + "tags": [ + "ArrayDefaults" + ], + "description": "Get a Resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + }, + { + "name": "name", + "in": "path", + "description": "Name of resource", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ArrayDefault" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/dictproperties": { + "get": { + "operationId": "DictProperties_ListByEmployee", + "tags": [ + "DictProperties" + ], + "description": "List resources by resource group", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DictPropertyListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/dictproperties/{name}": { + "get": { + "operationId": "DictProperties_Get", + "tags": [ + "DictProperties" + ], + "description": "Get a Resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + }, + { + "name": "name", + "in": "path", + "description": "Name of resource", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DictProperty" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/employees/{employeeName}/enrolls/default": { + "get": { + "operationId": "Enrolls_Get", + "tags": [ + "Enrolls" + ], + "description": "Get a Enroll.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "employeeName", + "in": "path", + "description": "Name of employee", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-]{3,24}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Enroll" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + } + }, + "definitions": { + "ArrayDefault": { + "type": "object", + "description": "A Test resource", + "properties": { + "properties": { + "$ref": "#/definitions/ArrayDefaultProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "ArrayDefaultListResult": { + "type": "object", + "description": "The response of a ArrayDefault list operation.", + "properties": { + "value": { + "type": "array", + "description": "The ArrayDefault items on this page", + "items": { + "$ref": "#/definitions/ArrayDefault" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "ArrayDefaultProperties": { + "type": "object", + "description": "Resource properties", + "properties": { + "array": { + "type": "array", + "description": "Array of strings", + "default": [ + "911", + "933" + ], + "items": { + "type": "string" + } + } + }, + "allOf": [ + { + "type": "object", + "additionalProperties": {} + } + ] + }, + "DictProperty": { + "type": "object", + "description": "A Test resource", + "properties": { + "properties": { + "type": "object", + "description": "The resource-specific properties for this resource.", + "additionalProperties": {}, + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "DictPropertyListResult": { + "type": "object", + "description": "The response of a DictProperty list operation.", + "properties": { + "value": { + "type": "array", + "description": "The DictProperty items on this page", + "items": { + "$ref": "#/definitions/DictProperty" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "Employee": { + "type": "object", + "description": "A Test resource", + "properties": { + "properties": { + "$ref": "#/definitions/EmployeeProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "EmployeeListResult": { + "type": "object", + "description": "The response of a Employee list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Employee items on this page", + "items": { + "$ref": "#/definitions/Employee" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "EmployeeProperties": { + "type": "object", + "description": "Employee properties", + "properties": { + "age": { + "type": "integer", + "format": "int32", + "description": "Age of employee" + }, + "city": { + "type": "string", + "description": "City of employee" + }, + "profile": { + "type": "string", + "format": "byte", + "description": "Profile of employee" + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningStateTest", + "description": "The status of the last operation.", + "readOnly": true + } + } + }, + "EmployeeUpdate": { + "type": "object", + "description": "The type used for update operations of the Employee.", + "properties": { + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "$ref": "#/definitions/EmployeeUpdateProperties", + "description": "The updatable properties of the Employee." + } + } + }, + "EmployeeUpdateProperties": { + "type": "object", + "description": "The updatable properties of the Employee.", + "properties": { + "age": { + "type": "integer", + "format": "int32", + "description": "Age of employee" + }, + "city": { + "type": "string", + "description": "City of employee" + }, + "profile": { + "type": "string", + "format": "byte", + "description": "Profile of employee" + } + } + }, + "Enroll": { + "type": "object", + "description": "A Test resource", + "properties": { + "properties": { + "$ref": "#/definitions/EnrollProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "name": { + "type": "string", + "readOnly": true + } + }, + "required": [ + "name" + ], + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "EnrollProperties": { + "type": "object", + "description": "Enroll properties", + "properties": { + "country": { + "type": "integer", + "format": "int32", + "description": "Country of employee" + }, + "city": { + "type": "string", + "description": "City of employee" + } + } + }, + "ProvisioningStateTest": { + "type": "string", + "description": "The provisioning state of a resource.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Provisioning", + "Updating", + "Deleting", + "Accepted" + ], + "x-ms-enum": { + "name": "ProvisioningStateTest", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Resource has been created." + }, + { + "name": "Failed", + "value": "Failed", + "description": "Resource creation failed." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Resource creation was canceled." + }, + { + "name": "Provisioning", + "value": "Provisioning", + "description": "The resource is being provisioned" + }, + { + "name": "Updating", + "value": "Updating", + "description": "The resource is updating" + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "The resource is being deleted" + }, + { + "name": "Accepted", + "value": "Accepted", + "description": "The resource create request has been accepted" + } + ] + }, + "readOnly": true + } + }, + "parameters": {} +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/ArrayDefault.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/ArrayDefault.tsp index 4c0f0178ae..bf7f6340cc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/ArrayDefault.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/ArrayDefault.tsp @@ -33,14 +33,10 @@ interface ArrayDefaults { /** * Get a Resource. */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ArrayDefault_Get") get is ArmResourceRead; /** * List resources by resource group */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("ArrayDefault_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp index 93743c3977..b7cfd32fc6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp @@ -38,7 +38,5 @@ interface DictProperties { /** * List resources by resource group */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("DictProperties_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp index cf3fd24da9..3688d04fb8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp @@ -52,8 +52,6 @@ interface Employees { /** * List Employee resources by resource group */ - #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @operationId("Employees_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; /** diff --git a/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts b/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts index c98f0aab22..63babc001b 100644 --- a/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts +++ b/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts @@ -4,7 +4,20 @@ import { readdir } from "fs/promises"; import { join, dirname, extname, resolve } from "path"; import { resolveProject } from "./resolve-root"; -export async function generateTypespec(repoRoot: string, folder: string, debug = false, isFullCompatible = false) { +const brownFieldProjects = [ + "arm-agrifood", + "arm-alertsmanagement", + "arm-analysisservices", + "arm-apimanagement", + "arm-authorization", + "arm-azureintegrationspaces", + "arm-compute", + "arm-dns", + "arm-machinelearningservices", + "arm-storage", +]; + +export async function generateTypespec(repoRoot: string, folder: string, debug = false) { const { path: root } = await resolveProject(__dirname); const path = join(root, "test", folder); const dir = await readdir(path); @@ -21,11 +34,11 @@ export async function generateTypespec(repoRoot: string, folder: string, debug = } const swaggerPath = join(path, firstSwagger); - generate(repoRoot, swaggerPath, debug, isFullCompatible); + generate(repoRoot, swaggerPath, debug, brownFieldProjects.includes(folder)); } // A list containing all the projects we could compile. After we enable all the projects, we will delete this list. -const whiteList = ["anomalyDetector"]; +const whiteList = ["anomalyDetector", "arm-agrifood", "arm-sphere", "arm-test"]; export async function generateSwagger(folder: string) { if (!whiteList.includes(folder)) { @@ -39,6 +52,8 @@ export async function generateSwagger(folder: string) { execSync(command, { cwd: path, stdio: "inherit" }); } +// `isFullCompatible` is mainly used for brownfield projects, where users want to fully honor the definition in the swagger file. +// For greenfield projects, we expect users to set `isFullCompatible` to `false` so that it would follow the arm template definition. function generate(root: string, path: string, debug = false, isFullCompatible = false) { const extension = extname(path); const inputFile = extension === ".json" ? `--input-file=${path}` : `--require=${path}`; @@ -82,7 +97,7 @@ async function main() { for (let i = 0; i < folders.length; i++) { const folder = folders[i]; try { - await generateTypespec(repoRoot, folder, debug, i % 2 === 0); + await generateTypespec(repoRoot, folder, debug); if (swagger) { await generateSwagger(folder); } From 33f10711201a8236f23d02283025d118d9d1e58b Mon Sep 17 00:00:00 2001 From: Pan Shao <97225342+pshao25@users.noreply.github.com> Date: Fri, 26 Apr 2024 10:15:11 +0800 Subject: [PATCH 31/33] Support for anyObject (#4958) Fix #4957 Fix #4959 --------- Co-authored-by: Pan Shao --- .../any4957_2024-04-23-12-07.json | 10 + .../src/generate/generate-arm-resource.ts | 2 +- .../src/transforms/transform-arm-resources.ts | 4 +- .../tsp-output/DeletedServiceContract.tsp | 2 +- .../tsp-output/CommunityGallery.tsp | 2 +- .../test/arm-compute/tsp-output/OSFamily.tsp | 2 +- .../test/arm-compute/tsp-output/OSVersion.tsp | 2 +- .../arm-compute/tsp-output/SharedGallery.tsp | 2 +- .../VirtualMachineExtensionImage.tsp | 2 +- .../tsp-output/ComputeResource.tsp | 306 +- ...d by [MinimumSet] rule_MinimumSet_Gen.json | 16 + ...taProductsCatalogs_Get_MaximumSet_Gen.json | 45 + ...gs_ListByResourceGroup_MaximumSet_Gen.json | 50 + ...gs_ListByResourceGroup_MinimumSet_Gen.json | 20 + ...ogs_ListBySubscription_MaximumSet_Gen.json | 49 + ...ogs_ListBySubscription_MinimumSet_Gen.json | 19 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 35 + ...taProducts_AddUserRole_MaximumSet_Gen.json | 35 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 38 + .../DataProducts_Create_MaximumSet_Gen.json | 252 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 18 + .../DataProducts_Delete_MaximumSet_Gen.json | 18 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 22 + ...StorageAccountSasToken_MaximumSet_Gen.json | 22 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 18 + .../DataProducts_Get_MaximumSet_Gen.json | 102 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 21 + ...ts_ListByResourceGroup_MaximumSet_Gen.json | 106 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 20 + ...cts_ListBySubscription_MaximumSet_Gen.json | 105 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 31 + ...s_ListRolesAssignments_MaximumSet_Gen.json | 31 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 24 + ...roducts_RemoveUserRole_MaximumSet_Gen.json | 24 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 16 + ...DataProducts_RotateKey_MaximumSet_Gen.json | 16 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 23 + .../DataProducts_Update_MaximumSet_Gen.json | 129 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 23 + .../DataTypes_Create_MaximumSet_Gen.json | 73 + .../DataTypes_DeleteData_MaximumSet_Gen.json | 20 + .../DataTypes_DeleteData_MinimumSet_Gen.json | 20 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 19 + .../DataTypes_Delete_MaximumSet_Gen.json | 19 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 23 + ...orageContainerSasToken_MaximumSet_Gen.json | 23 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 18 + .../DataTypes_Get_MaximumSet_Gen.json | 37 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 21 + ...ypes_ListByDataProduct_MaximumSet_Gen.json | 41 + ...d by [MinimumSet] rule_MinimumSet_Gen.json | 22 + .../DataTypes_Update_MaximumSet_Gen.json | 50 + .../swagger-output/swagger.json | 2588 ++++ .../tsp-output/DataProduct.tsp | 2 +- .../tsp-output/DataType.tsp | 5 +- .../examples/Accounts_CreateOrUpdate.json | 76 + .../examples/Accounts_Delete.json | 19 + .../swagger-output/examples/Accounts_Get.json | 38 + .../Accounts_ListByResourceGroup.json | 41 + .../examples/Accounts_ListBySubscription.json | 40 + .../examples/Accounts_Update.json | 47 + .../swagger-output/examples/Quotas_Get.json | 31 + .../swagger-output/swagger.json | 818 ++ .../tsp-output/Quota.tsp | 2 +- .../swagger-output/swagger.json | 1278 ++ .../BlobContainers_ClearLegalHold.json | 27 + ..._Create_Or_Update_Immutability_Policy.json | 34 + ...ith_Allow_Protected_Append_Writes_All.json | 34 + ...ntainer_With_Default_Encryption_Scope.json | 42 + ..._Put_Container_With_Object_Level_Worm.json | 45 + .../BlobContainers_Create_Put_Containers.json | 29 + .../examples/BlobContainers_Delete.json | 16 + ...obContainers_DeleteImmutabilityPolicy.json | 28 + ...obContainers_ExtendImmutabilityPolicy.json | 32 + .../BlobContainers_GetImmutabilityPolicy.json | 28 + ...ith_Allow_Protected_Append_Writes_All.json | 91 + .../BlobContainers_Get_Get_Containers.json | 83 + ..._Lease_Acquire_A_Lease_On_A_Container.json | 26 + ...rs_Lease_Break_A_Lease_On_A_Container.json | 26 + .../BlobContainers_List_List_Containers.json | 48 + ...ntainers_List_List_Deleted_Containers.json | 52 + ...BlobContainers_LockImmutabilityPolicy.json | 27 + .../BlobContainers_ObjectLevelWorm.json | 21 + ...etLegalHold_Set_Legal_Hold_Containers.json | 31 + ...ith_Allow_Protected_Append_Writes_All.json | 33 + .../examples/BlobContainers_Update.json | 37 + ...age_Account_Set_Blob_Inventory_Policy.json | 164 + ...Delete_And_New_Schema_For_Hns_Account.json | 199 + ...te_And_New_Schema_For_Non_Hns_Account.json | 197 + .../BlobInventoryPolicies_Delete.json | 16 + .../examples/BlobInventoryPolicies_Get.json | 67 + .../examples/BlobInventoryPolicies_List.json | 70 + .../BlobServices_GetServiceProperties.json | 98 + .../examples/BlobServices_List.json | 101 + ...b_Services_Put_Allow_Permanent_Delete.json | 39 + ...s_Put_Last_Access_Time_Based_Tracking.json | 43 + ...etServiceProperties_Put_Blob_Services.json | 173 + .../examples/DeletedAccounts_Get.json | 27 + .../examples/DeletedAccounts_List.json | 41 + .../examples/EncryptionScopes_Get.json | 27 + .../examples/EncryptionScopes_List.json | 45 + .../examples/EncryptionScopes_Patch.json | 40 + ..._Storage_Account_Put_Encryption_Scope.json | 41 + ..._Scope_With_Infrastructure_Encryption.json | 47 + .../FileServices_GetServiceProperties.json | 88 + .../examples/FileServices_List.json | 91 + ...etServiceProperties_Put_File_Services.json | 153 + ...e_Services_Enable_Secure_Smb_Features.json | 47 + ...File_Services_Enable_Smb_Multichannel.json | 45 + .../FileShares_Create_Create_Nfs_Shares.json | 39 + .../FileShares_Create_Put_Shares.json | 29 + ...es_Create_Put_Shares_With_Access_Tier.json | 39 + .../examples/FileShares_Delete.json | 16 + .../FileShares_Get_Get_Share_Stats.json | 28 + .../examples/FileShares_Get_Get_Shares.json | 26 + ...ares_Lease_Acquire_A_Lease_On_A_Share.json | 26 + ...Shares_Lease_Break_A_Lease_On_A_Share.json | 26 + .../FileShares_List_List_Deleted_Shares.json | 44 + .../FileShares_List_List_Share_Snapshots.json | 41 + .../examples/FileShares_List_List_Shares.json | 40 + .../examples/FileShares_Restore.json | 19 + .../FileShares_Update_Update_Share_Acls.json | 47 + .../FileShares_Update_Update_Shares.json | 33 + ...sers_CreateOrUpdate_Create_Local_User.json | 67 + ...sers_CreateOrUpdate_Update_Local_User.json | 36 + .../examples/LocalUsers_Delete.json | 16 + .../examples/LocalUsers_Get.json | 40 + .../examples/LocalUsers_List.json | 61 + .../examples/LocalUsers_ListKeys.json | 25 + .../LocalUsers_RegeneratePassword.json | 19 + ...orage_Account_Set_Management_Policies.json | 182 + ...Base_Blob_Days_After_Creation_Actions.json | 92 + ...t_Management_Policy_Cold_Tier_Actions.json | 130 + ...ent_Policy_For_Block_And_Append_Blobs.json | 102 + ...et_Management_Policy_Hot_Tier_Actions.json | 100 + ...y_Last_Access_Time_Based_Blob_Actions.json | 104 + ..._Policy_Last_Tier_Change_Time_Actions.json | 118 + ...ment_Policy_With_Snapshot_And_Version.json | 136 + .../examples/ManagementPolicies_Delete.json | 16 + .../examples/ManagementPolicies_Get.json | 61 + ...ect_Replication_Policy_On_Destination.json | 57 + ...e_Object_Replication_Policy_On_Source.json | 61 + ...ect_Replication_Policy_On_Destination.json | 67 + ...e_Object_Replication_Policy_On_Source.json | 69 + .../ObjectReplicationPolicies_Delete.json | 16 + .../ObjectReplicationPolicies_Get.json | 49 + .../ObjectReplicationPolicies_List.json | 37 + .../PrivateEndpointConnections_Delete.json | 16 + .../PrivateEndpointConnections_Get.json | 32 + .../PrivateEndpointConnections_List.json | 51 + .../PrivateEndpointConnections_Put.json | 40 + ...ateLinkResources_ListByStorageAccount.json | 103 + .../QueueServices_GetServiceProperties.json | 84 + .../examples/QueueServices_List.json | 87 + .../QueueServices_SetServiceProperties.json | 149 + .../Queue_Create_Queue_Operation_Put.json | 22 + ...ate_Queue_Operation_Put_With_Metadata.json | 35 + .../swagger-output/examples/Queue_Delete.json | 15 + .../swagger-output/examples/Queue_Get.json | 27 + .../swagger-output/examples/Queue_List.json | 42 + .../swagger-output/examples/Queue_Update.json | 22 + ...s_AbortHierarchicalNamespaceMigration.json | 18 + ...StorageAccounts_CheckNameAvailability.json | 19 + ...Accounts_Create_Nfs_V3_Account_Create.json | 63 + ...ccounts_Create_Storage_Account_Create.json | 151 + ...ount_Create_Allowed_Copy_Scope_To_Aad.json | 146 + ...te_Allowed_Copy_Scope_To_Private_Link.json | 146 + ...Create_Disallow_Public_Network_Access.json | 150 + ...e_Dns_Endpoint_Type_To_Azure_Dns_Zone.json | 153 + ..._Create_Dns_Endpoint_Type_To_Standard.json | 153 + ...t_Create_Enable_Public_Network_Access.json | 150 + ...unt_Create_Premium_Block_Blob_Storage.json | 91 + ...Assigned_Encryption_Identity_With_Cmk.json | 120 + ...ity_With_Federated_Identity_Client_Id.json | 122 + ...count_Create_With_Immutability_Policy.json | 72 + .../examples/StorageAccounts_Delete.json | 15 + ...nts_Failover_Storage_Account_Failover.json | 19 + ...over_Storage_Account_Failover_Planned.json | 20 + ...count_Get_Async_Sku_Conversion_Status.json | 36 + ...erties_Storage_Account_Get_Properties.json | 103 + ...ge_Account_Get_Properties_Cmk_Enabled.json | 106 + ...roperties_Cmk_Version_Expiration_Time.json | 107 + ...counts_HierarchicalNamespaceMigration.json | 19 + .../examples/StorageAccounts_List.json | 315 + .../StorageAccounts_ListAccountSAS.json | 27 + .../StorageAccounts_ListByResourceGroup.json | 80 + .../examples/StorageAccounts_ListKeys.json | 29 + .../StorageAccounts_ListServiceSAS.json | 24 + ...y_Storage_Account_Regenerate_Kerb_Key.json | 37 + ...ateKey_Storage_Account_Regenerate_Key.json | 32 + .../StorageAccounts_RestoreBlobRanges.json | 66 + ...rageAccounts_RevokeUserDelegationKeys.json | 13 + ...unts_Update_Storage_Account_Enable_Ad.json | 77 + ...nts_Update_Storage_Account_Enable_Cmk.json | 96 + ...ccounts_Update_Storage_Account_Update.json | 154 + ...ount_Update_Allowed_Copy_Scope_To_Aad.json | 151 + ..._Update_Disable_Public_Network_Access.json | 151 + ...Assigned_Encryption_Identity_With_Cmk.json | 118 + ...ity_With_Federated_Identity_Client_Id.json | 120 + ...count_Update_With_Immutability_Policy.json | 52 + .../TableServices_GetServiceProperties.json | 84 + .../examples/TableServices_List.json | 87 + .../TableServices_SetServiceProperties.json | 149 + .../Table_Create_Table_Operation_Put.json | 24 + ...ate_Table_Operation_Put_Or_Patch_Acls.json | 64 + .../swagger-output/examples/Table_Delete.json | 15 + .../swagger-output/examples/Table_Get.json | 24 + .../swagger-output/examples/Table_List.json | 36 + .../Table_Update_Table_Operation_Patch.json | 24 + ...ate_Table_Operation_Put_Or_Patch_Acls.json | 64 + .../arm-storage/swagger-output/swagger.json | 10380 ++++++++++++++++ .../arm-storage/tsp-output/DeletedAccount.tsp | 2 +- .../test/utils/generate-typespec.ts | 11 +- 213 files changed, 26861 insertions(+), 145 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/any4957_2024-04-23-12-07.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_Get_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_AddUserRole_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Create_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Delete_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Get_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListByResourceGroup_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListBySubscription_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListRolesAssignments_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RemoveUserRole_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RotateKey_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Update_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Create_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_DeleteData_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_DeleteData_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Delete_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Get_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_ListByDataProduct_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Update_MaximumSet_Gen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/swagger.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Quotas_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/swagger.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/swagger-output/swagger.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_ClearLegalHold.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy_With_Allow_Protected_Append_Writes_All.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Create_Put_Container_With_Default_Encryption_Scope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Create_Put_Container_With_Object_Level_Worm.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Create_Put_Containers.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_DeleteImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_ExtendImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_GetImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Get_Get_Blob_Containers_Get_With_Allow_Protected_Append_Writes_All.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Get_Get_Containers.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Lease_Acquire_A_Lease_On_A_Container.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Lease_Break_A_Lease_On_A_Container.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_List_List_Containers.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_List_List_Deleted_Containers.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_LockImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_ObjectLevelWorm.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_SetLegalHold_Set_Legal_Hold_Containers.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_SetLegalHold_Set_Legal_Hold_Containers_With_Allow_Protected_Append_Writes_All.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Hns_Account.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Non_Hns_Account.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_GetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_SetServiceProperties_Blob_Services_Put_Allow_Permanent_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_SetServiceProperties_Blob_Services_Put_Last_Access_Time_Based_Tracking.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_SetServiceProperties_Put_Blob_Services.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/DeletedAccounts_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/DeletedAccounts_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Patch.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope_With_Infrastructure_Encryption.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_GetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_SetServiceProperties_Put_File_Services.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_SetServiceProperties_Put_File_Services_Enable_Secure_Smb_Features.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_SetServiceProperties_Put_File_Services_Enable_Smb_Multichannel.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Create_Create_Nfs_Shares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Create_Put_Shares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Create_Put_Shares_With_Access_Tier.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Get_Get_Share_Stats.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Get_Get_Shares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Lease_Acquire_A_Lease_On_A_Share.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Lease_Break_A_Lease_On_A_Share.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_List_List_Deleted_Shares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_List_List_Share_Snapshots.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_List_List_Shares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Restore.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Update_Update_Share_Acls.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Update_Update_Shares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_CreateOrUpdate_Create_Local_User.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_CreateOrUpdate_Update_Local_User.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_RegeneratePassword.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policies.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Base_Blob_Days_After_Creation_Actions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Cold_Tier_Actions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_For_Block_And_Append_Blobs.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Hot_Tier_Actions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Access_Time_Based_Blob_Actions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Tier_Change_Time_Actions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_With_Snapshot_And_Version.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Destination.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Source.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Destination.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Source.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_Put.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateLinkResources_ListByStorageAccount.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/QueueServices_GetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/QueueServices_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/QueueServices_SetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Create_Queue_Operation_Put.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Create_Queue_Operation_Put_With_Metadata.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_AbortHierarchicalNamespaceMigration.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_CheckNameAvailability.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Nfs_V3_Account_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Aad.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Private_Link.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Disallow_Public_Network_Access.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Azure_Dns_Zone.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Standard.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Enable_Public_Network_Access.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Premium_Block_Blob_Storage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_User_Assigned_Encryption_Identity_With_Cmk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_User_Assigned_Identity_With_Federated_Identity_Client_Id.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_With_Immutability_Policy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Failover_Storage_Account_Failover.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Failover_Storage_Account_Failover_Planned.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Async_Sku_Conversion_Status.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Properties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Enabled.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Version_Expiration_Time.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_HierarchicalNamespaceMigration.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListAccountSAS.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListServiceSAS.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Kerb_Key.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Key.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RestoreBlobRanges.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RevokeUserDelegationKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Enable_Ad.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Enable_Cmk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_Allowed_Copy_Scope_To_Aad.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_Disable_Public_Network_Access.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_User_Assigned_Encryption_Identity_With_Cmk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_User_Assigned_Identity_With_Federated_Identity_Client_Id.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_With_Immutability_Policy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/TableServices_GetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/TableServices_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/TableServices_SetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Create_Table_Operation_Put.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Create_Table_Operation_Put_Or_Patch_Acls.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Update_Table_Operation_Patch.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Update_Table_Operation_Put_Or_Patch_Acls.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/swagger.json diff --git a/common/changes/@autorest/openapi-to-typespec/any4957_2024-04-23-12-07.json b/common/changes/@autorest/openapi-to-typespec/any4957_2024-04-23-12-07.json new file mode 100644 index 0000000000..a934557cb4 --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/any4957_2024-04-23-12-07.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Support AnyObject", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts index 16239cd136..0c7bb54d81 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts @@ -50,7 +50,7 @@ function generateArmResourceModel(resource: TspArmResource): string { } if (resource.locationParent) { - definitions.push(`@parentResource("${resource.locationParent}")`); + definitions.push(`@parentResource(${resource.locationParent})`); } if ( diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts index 22bab3c4ae..967ce1b94f 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts @@ -27,7 +27,7 @@ import { isResourceSchema, } from "../utils/resource-discovery"; import { isResponseSchema } from "../utils/schemas"; -import { transformObjectProperty } from "./transform-object"; +import { getTypespecType, transformObjectProperty } from "./transform-object"; import { transformParameter, transformRequest } from "./transform-operations"; const generatedResourceObjects: Map = new Map(); @@ -536,7 +536,7 @@ function convertResourceActionOperations( } } - const request = bodyParam ? bodyParam.schema.language.default.name : "void"; + const request = bodyParam ? getTypespecType(bodyParam.schema, getSession().model) : "void"; const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); let kind; if (!okResponse) { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp index 60d78184c0..643c8bf29b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp @@ -17,7 +17,7 @@ namespace Azure.ResourceManager.ApiManagement; #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource -@parentResource("SubscriptionLocationResource") +@parentResource(SubscriptionLocationResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal( DeletedServiceContractProperties diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp index 1fe3d6fc73..2805d07d67 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp @@ -18,7 +18,7 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource -@parentResource("SubscriptionLocationResource") +@parentResource(SubscriptionLocationResource) @includeInapplicableMetadataInPayload(false) model CommunityGallery extends PirCommunityGalleryResource { /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp index b8a72054b4..e189be72f3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp @@ -17,7 +17,7 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource -@parentResource("SubscriptionLocationResource") +@parentResource(SubscriptionLocationResource) @includeInapplicableMetadataInPayload(false) model OSFamily { /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp index 9273981b1f..ea3c867394 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp @@ -17,7 +17,7 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource -@parentResource("SubscriptionLocationResource") +@parentResource(SubscriptionLocationResource) @includeInapplicableMetadataInPayload(false) model OSVersion { /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp index 1ec8b4917d..c535220ac5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp @@ -18,7 +18,7 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource -@parentResource("SubscriptionLocationResource") +@parentResource(SubscriptionLocationResource) @includeInapplicableMetadataInPayload(false) model SharedGallery extends PirSharedGalleryResource { /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp index 57769b8833..22cca480ab 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp @@ -17,7 +17,7 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource -@parentResource("SubscriptionLocationResource") +@parentResource(SubscriptionLocationResource) @includeInapplicableMetadataInPayload(false) model VirtualMachineExtensionImage extends Resource { @path diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp index aa5b18dd3e..9080809e2f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp @@ -5,151 +5,195 @@ import "@typespec/rest"; import "./models.tsp"; import "./Workspace.tsp"; - using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; - namespace Azure.ResourceManager.MachineLearning; // FIXME: ComputeResource has no properties property /** -* Machine Learning compute object wrapped into ARM resource envelope. -*/ + * Machine Learning compute object wrapped into ARM resource envelope. + */ @parentResource(Workspace) model ComputeResource is TrackedResource<{}> { -/** -* Name of the Azure Machine Learning compute. -*/ -@path -@key("computeName") -@segment("computes") -@visibility("read") -"name": string; - -...Azure.ResourceManager.ManagedServiceIdentity - -...Azure.ResourceManager.ResourceSku + /** + * Name of the Azure Machine Learning compute. + */ + @path + @key("computeName") + @segment("computes") + @visibility("read") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; } - - @armResourceOperations interface ComputeResources { -/** -* Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them. -*/ -@operationId("Compute_Get") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -get is ArmResourceRead - -/** -* Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet. -*/ -@operationId("Compute_CreateOrUpdate") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -createOrUpdate is ArmResourceCreateOrReplaceAsync - -/** -* Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. -*/ -@parameterVisibility("read") -@operationId("Compute_Update") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -update is ArmCustomPatchAsync - -/** -* Deletes specified Machine Learning compute. -*/ -@operationId("Compute_Delete") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -delete is ArmResourceDeleteAsync; - /** -* Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. -*/ -@query("underlyingResourceAction") -"underlyingResourceAction": UnderlyingResourceAction - }> - -/** -* Gets computes in specified workspace. -*/ -@operationId("Compute_List") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -list is ArmResourceListByParent; - /** -* Continuation token for pagination. -*/ -@query("$skip") -"$skip"?: string - }> - -/** -* Updates the custom services list. The list of custom services provided shall be overwritten -*/ -@operationId("Compute_UpdateCustomServices") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -updateCustomServices is ArmResourceActionSync - -/** -* Get the details (e.g IP address, port etc) of all the compute nodes in the compute. -*/ -@operationId("Compute_ListNodes") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -listNodes is ArmResourceActionSync - -/** -* Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). -*/ -@operationId("Compute_ListKeys") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -listKeys is ArmResourceActionSync - -/** -* Posts a start action to a compute instance -*/ -@operationId("Compute_Start") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -start is ArmResourceActionNoResponseContentAsync - -/** -* Posts a stop action to a compute instance -*/ -@operationId("Compute_Stop") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -stop is ArmResourceActionNoResponseContentAsync - -/** -* Posts a restart action to a compute instance -*/ -@operationId("Compute_Restart") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -restart is ArmResourceActionNoResponseContentAsync - -/** -* Updates the idle shutdown setting of a compute instance. -*/ -@operationId("Compute_UpdateIdleShutdownSetting") -#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" -updateIdleShutdownSetting is ArmResourceActionSync - + /** + * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Compute_Get") + get is ArmResourceRead; + + /** + * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Compute_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrReplaceAsync; + + /** + * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @parameterVisibility("read") + @operationId("Compute_Update") + update is ArmCustomPatchAsync; + + /** + * Deletes specified Machine Learning compute. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Compute_Delete") + delete is ArmResourceDeleteAsync< + ComputeResource, + { + ...BaseParameters; + + /** + * Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. + */ + @query("underlyingResourceAction") + underlyingResourceAction: UnderlyingResourceAction; + } + >; + + /** + * Gets computes in specified workspace. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Compute_List") + list is ArmResourceListByParent< + ComputeResource, + { + ...BaseParameters; + + /** + * Continuation token for pagination. + */ + @query("$skip") + $skip?: string; + } + >; + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Compute_UpdateCustomServices") + updateCustomServices is ArmResourceActionSync< + ComputeResource, + CustomService[], + void + >; + + /** + * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Compute_ListNodes") + listNodes is ArmResourceActionSync< + ComputeResource, + void, + AmlComputeNodesInformation + >; + + /** + * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Compute_ListKeys") + listKeys is ArmResourceActionSync; + + /** + * Posts a start action to a compute instance + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Compute_Start") + start is ArmResourceActionNoResponseContentAsync; + + /** + * Posts a stop action to a compute instance + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Compute_Stop") + stop is ArmResourceActionNoResponseContentAsync; + + /** + * Posts a restart action to a compute instance + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Compute_Restart") + restart is ArmResourceActionNoResponseContentAsync; + + /** + * Updates the idle shutdown setting of a compute instance. + */ + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Compute_UpdateIdleShutdownSetting") + updateIdleShutdownSetting is ArmResourceActionSync< + ComputeResource, + IdleShutdownSetting, + void + >; } - - -@@encodedName(ComputeResources.`createOrUpdate`::parameters.resource, "application/json", "parameters"); -@@extension(ComputeResources.`createOrUpdate`::parameters.resource, "x-ms-client-name", "parameters"); -@@doc(ComputeResources.`createOrUpdate`::parameters.resource, "Payload with Machine Learning compute definition."); -@@encodedName(ComputeResources.`update`::parameters.properties, "application/json", "parameters"); -@@extension(ComputeResources.`update`::parameters.properties, "x-ms-client-name", "parameters"); -@@doc(ComputeResources.`update`::parameters.properties, "Additional parameters for cluster update."); -@@encodedName(ComputeResources.`updateCustomServices`::parameters.body, "application/json", "customServices"); -@@extension(ComputeResources.`updateCustomServices`::parameters.body, "x-ms-client-name", "customServices"); -@@doc(ComputeResources.`updateCustomServices`::parameters.body, "New list of Custom Services."); -@@encodedName(ComputeResources.`updateIdleShutdownSetting`::parameters.body, "application/json", "parameters"); -@@extension(ComputeResources.`updateIdleShutdownSetting`::parameters.body, "x-ms-client-name", "parameters"); -@@doc(ComputeResources.`updateIdleShutdownSetting`::parameters.body, "The object for updating idle shutdown setting of specified ComputeInstance."); \ No newline at end of file +@@encodedName(ComputeResources.createOrUpdate::parameters.resource, + "application/json", + "parameters" +); +@@extension(ComputeResources.createOrUpdate::parameters.resource, + "x-ms-client-name", + "parameters" +); +@@doc(ComputeResources.createOrUpdate::parameters.resource, + "Payload with Machine Learning compute definition." +); +@@encodedName(ComputeResources.update::parameters.properties, + "application/json", + "parameters" +); +@@extension(ComputeResources.update::parameters.properties, + "x-ms-client-name", + "parameters" +); +@@doc(ComputeResources.update::parameters.properties, + "Additional parameters for cluster update." +); +@@encodedName(ComputeResources.updateCustomServices::parameters.body, + "application/json", + "customServices" +); +@@extension(ComputeResources.updateCustomServices::parameters.body, + "x-ms-client-name", + "customServices" +); +@@doc(ComputeResources.updateCustomServices::parameters.body, + "New list of Custom Services." +); +@@encodedName(ComputeResources.updateIdleShutdownSetting::parameters.body, + "application/json", + "parameters" +); +@@extension(ComputeResources.updateIdleShutdownSetting::parameters.body, + "x-ms-client-name", + "parameters" +); +@@doc(ComputeResources.updateIdleShutdownSetting::parameters.body, + "The object for updating idle shutdown setting of specified ComputeInstance." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..7ecf733626 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,16 @@ +{ + "operationId": "DataProductsCatalogs_Get", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_Get_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_Get_MaximumSet_Gen.json new file mode 100644 index 0000000000..f19498286d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_Get_MaximumSet_Gen.json @@ -0,0 +1,45 @@ +{ + "operationId": "DataProductsCatalogs_Get", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_Get_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.NetworkAnalytics/dataProductsCatalogs", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", + "properties": { + "provisioningState": "Succeeded", + "publishers": [ + { + "dataProducts": [ + { + "description": "Official data product for Mobile Content Cloud.", + "dataProductName": "MCC", + "dataProductVersions": [ + { + "version": "1.0.0" + } + ] + } + ], + "publisherName": "Microsoft" + } + ] + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json new file mode 100644 index 0000000000..02e8bd1673 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json @@ -0,0 +1,50 @@ +{ + "operationId": "DataProductsCatalogs_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "default", + "type": "Microsoft.NetworkAnalytics/dataProductsCatalogs", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", + "properties": { + "provisioningState": "Succeeded", + "publishers": [ + { + "dataProducts": [ + { + "description": "Official data product for Mobile Content Cloud.", + "dataProductName": "MCC", + "dataProductVersions": [ + { + "version": "1.0.0" + } + ] + } + ], + "publisherName": "Microsoft" + } + ] + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json new file mode 100644 index 0000000000..5c7486f6e4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "operationId": "DataProductsCatalogs_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json new file mode 100644 index 0000000000..0003a9f385 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json @@ -0,0 +1,49 @@ +{ + "operationId": "DataProductsCatalogs_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_ListBySubscription_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "default", + "type": "Microsoft.NetworkAnalytics/dataProductsCatalogs", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", + "properties": { + "provisioningState": "Succeeded", + "publishers": [ + { + "dataProducts": [ + { + "description": "Official data product for Mobile Content Cloud.", + "dataProductName": "MCC", + "dataProductVersions": [ + { + "version": "1.0.0" + } + ] + } + ], + "publisherName": "Microsoft" + } + ] + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json new file mode 100644 index 0000000000..4c2b8e3fa1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "operationId": "DataProductsCatalogs_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_ListBySubscription_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..32984a0046 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,35 @@ +{ + "operationId": "DataProducts_AddUserRole", + "parameters": { + "api-version": "2023-11-15", + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "userName" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "userName" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_AddUserRole_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_AddUserRole_MaximumSet_Gen.json new file mode 100644 index 0000000000..6926baacb1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_AddUserRole_MaximumSet_Gen.json @@ -0,0 +1,35 @@ +{ + "operationId": "DataProducts_AddUserRole", + "parameters": { + "api-version": "2023-11-15", + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_AddUserRole_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..2ea69e94ab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,38 @@ +{ + "operationId": "DataProducts_Create", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resource": { + "location": "eastus", + "properties": { + "majorVersion": "1.0.0", + "product": "MCC", + "publisher": "Microsoft" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + }, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + }, + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Create_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Create_MaximumSet_Gen.json new file mode 100644 index 0000000000..f7b151ed00 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Create_MaximumSet_Gen.json @@ -0,0 +1,252 @@ +{ + "operationId": "DataProducts_Create", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resource": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} + } + }, + "location": "eastus", + "properties": { + "consumptionEndpoints": {}, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + }, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Create_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + }, + "201": { + "body": { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + }, + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..4248e15d2d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "operationId": "DataProducts_Delete", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Delete_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Delete_MaximumSet_Gen.json new file mode 100644 index 0000000000..f63b07ab43 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Delete_MaximumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "operationId": "DataProducts_Delete", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Delete_MaximumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..39abd7936a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "operationId": "DataProducts_GenerateStorageAccountSasToken", + "parameters": { + "api-version": "2023-11-15", + "body": { + "expiryTimeStamp": "2023-08-24T05:35:17.051Z", + "ipAddress": "1.1.1.1", + "startTimeStamp": "2023-08-24T05:35:17.051Z" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "storageAccountSasToken": "storageAccountSasToken" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json new file mode 100644 index 0000000000..52130bf9a7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "operationId": "DataProducts_GenerateStorageAccountSasToken", + "parameters": { + "api-version": "2023-11-15", + "body": { + "expiryTimeStamp": "2023-08-24T05:34:58.151Z", + "ipAddress": "1.1.1.1", + "startTimeStamp": "2023-08-24T05:34:58.151Z" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "storageAccountSasToken": "storageAccountSasToken" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..1a0370845c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "operationId": "DataProducts_Get", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Get_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Get_MaximumSet_Gen.json new file mode 100644 index 0000000000..3576486a01 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Get_MaximumSet_Gen.json @@ -0,0 +1,102 @@ +{ + "operationId": "DataProducts_Get", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Get_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..f6c75a1f84 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "operationId": "DataProducts_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListByResourceGroup_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListByResourceGroup_MaximumSet_Gen.json new file mode 100644 index 0000000000..20ac87c3a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListByResourceGroup_MaximumSet_Gen.json @@ -0,0 +1,106 @@ +{ + "operationId": "DataProducts_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListByResourceGroup_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..789767c921 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "operationId": "DataProducts_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListBySubscription_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListBySubscription_MaximumSet_Gen.json new file mode 100644 index 0000000000..c093d02db4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListBySubscription_MaximumSet_Gen.json @@ -0,0 +1,105 @@ +{ + "operationId": "DataProducts_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListBySubscription_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetworkAnalytics/DataProducts?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..5f896b0f01 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,31 @@ +{ + "operationId": "DataProducts_ListRolesAssignments", + "parameters": { + "api-version": "2023-11-15", + "body": {}, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "count": 1, + "roleAssignmentResponse": [ + { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListRolesAssignments_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListRolesAssignments_MaximumSet_Gen.json new file mode 100644 index 0000000000..aa82e992e6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_ListRolesAssignments_MaximumSet_Gen.json @@ -0,0 +1,31 @@ +{ + "operationId": "DataProducts_ListRolesAssignments", + "parameters": { + "api-version": "2023-11-15", + "body": {}, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListRolesAssignments_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "count": 1, + "roleAssignmentResponse": [ + { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..ec8a03137c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "operationId": "DataProducts_RemoveUserRole", + "parameters": { + "api-version": "2023-11-15", + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RemoveUserRole_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RemoveUserRole_MaximumSet_Gen.json new file mode 100644 index 0000000000..4842556a31 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RemoveUserRole_MaximumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "operationId": "DataProducts_RemoveUserRole", + "parameters": { + "api-version": "2023-11-15", + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_RemoveUserRole_MaximumSet_Gen", + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..cc85062d1d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,16 @@ +{ + "operationId": "DataProducts_RotateKey", + "parameters": { + "api-version": "2023-11-15", + "body": { + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RotateKey_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RotateKey_MaximumSet_Gen.json new file mode 100644 index 0000000000..c47672f0c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_RotateKey_MaximumSet_Gen.json @@ -0,0 +1,16 @@ +{ + "operationId": "DataProducts_RotateKey", + "parameters": { + "api-version": "2023-11-15", + "body": { + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_RotateKey_MaximumSet_Gen", + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..ef1715d60f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "operationId": "DataProducts_Update", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "properties": {}, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "location": "jwlerdaudgxff" + } + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Update_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Update_MaximumSet_Gen.json new file mode 100644 index 0000000000..20fc36725c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataProducts_Update_MaximumSet_Gen.json @@ -0,0 +1,129 @@ +{ + "operationId": "DataProducts_Update", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "properties": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} + } + }, + "properties": { + "currentMinorVersion": "1.0.1", + "owners": [ + "abc@micros.com", + "def@micros.com" + ], + "privateLinksEnabled": "Disabled", + "purviewAccount": "testpurview", + "purviewCollection": "134567890" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + }, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Update_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com", + "def@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..dc1ffed225 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "operationId": "DataTypes_Create", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resource": {}, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": {} + }, + "201": { + "body": {}, + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Create_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Create_MaximumSet_Gen.json new file mode 100644 index 0000000000..12d0d18499 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Create_MaximumSet_Gen.json @@ -0,0 +1,73 @@ +{ + "operationId": "DataTypes_Create", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resource": { + "properties": { + "databaseCacheRetention": 23, + "databaseRetention": 6, + "provisioningState": "Succeeded", + "state": "STARTED", + "storageOutputRetention": 27 + } + }, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Create_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "datatypeName", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "properties": { + "databaseCacheRetention": 23, + "databaseRetention": 6, + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "State Reason", + "storageOutputRetention": 27, + "visualizationUrl": "visualizationUrl" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + }, + "201": { + "body": { + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "properties": { + "databaseCacheRetention": 23, + "databaseRetention": 6, + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "State Reason", + "storageOutputRetention": 27, + "visualizationUrl": "visualizationUrl" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + }, + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_DeleteData_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_DeleteData_MaximumSet_Gen.json new file mode 100644 index 0000000000..11928e44f1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_DeleteData_MaximumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "operationId": "DataTypes_DeleteData", + "parameters": { + "api-version": "2023-11-15", + "body": {}, + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_DeleteData_MaximumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_DeleteData_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_DeleteData_MinimumSet_Gen.json new file mode 100644 index 0000000000..f6ba6d7f3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_DeleteData_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "operationId": "DataTypes_DeleteData", + "parameters": { + "api-version": "2023-11-15", + "body": {}, + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_DeleteData_MinimumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..aa28902546 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "operationId": "DataTypes_Delete", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Delete_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Delete_MaximumSet_Gen.json new file mode 100644 index 0000000000..32ccacb328 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Delete_MaximumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "operationId": "DataTypes_Delete", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Delete_MaximumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..05800b2f8b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "operationId": "DataTypes_GenerateStorageContainerSasToken", + "parameters": { + "api-version": "2023-11-15", + "body": { + "expiryTimeStamp": "2023-08-24T05:35:16.887Z", + "ipAddress": "1.1.1.1", + "startTimeStamp": "2023-08-24T05:35:16.887Z" + }, + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "storageContainerSasToken": "storageContainerSasToken" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json new file mode 100644 index 0000000000..162c8ec470 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "operationId": "DataTypes_GenerateStorageContainerSasToken", + "parameters": { + "api-version": "2023-11-15", + "body": { + "expiryTimeStamp": "2023-08-24T05:34:58.039Z", + "ipAddress": "1.1.1.1", + "startTimeStamp": "2023-08-24T05:34:58.039Z" + }, + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "storageContainerSasToken": "storageContainerSasToken" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..92f277bda0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "operationId": "DataTypes_Get", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Get_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Get_MaximumSet_Gen.json new file mode 100644 index 0000000000..c420e2a626 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Get_MaximumSet_Gen.json @@ -0,0 +1,37 @@ +{ + "operationId": "DataTypes_Get", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Get_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "properties": { + "databaseCacheRetention": 23, + "databaseRetention": 6, + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "state Reason", + "storageOutputRetention": 27, + "visualizationUrl": "visualizationUrl" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..2ead5d9ce9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "operationId": "DataTypes_ListByDataProduct", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_ListByDataProduct_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_ListByDataProduct_MaximumSet_Gen.json new file mode 100644 index 0000000000..8db6542baa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_ListByDataProduct_MaximumSet_Gen.json @@ -0,0 +1,41 @@ +{ + "operationId": "DataTypes_ListByDataProduct", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_ListByDataProduct_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01/dataTypes?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "properties": { + "databaseCacheRetention": 23, + "databaseRetention": 6, + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "state Reason", + "storageOutputRetention": 27, + "visualizationUrl": "visualizationUrl" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json new file mode 100644 index 0000000000..868a1de1ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "operationId": "DataTypes_Update", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "properties": {}, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": {} + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Update_MaximumSet_Gen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Update_MaximumSet_Gen.json new file mode 100644 index 0000000000..4dea0837f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/examples/DataTypes_Update_MaximumSet_Gen.json @@ -0,0 +1,50 @@ +{ + "operationId": "DataTypes_Update", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "properties": { + "properties": { + "databaseCacheRetention": 16, + "databaseRetention": 9, + "state": "STARTED", + "storageOutputRetention": 30 + } + }, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Update_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "properties": { + "databaseCacheRetention": 16, + "databaseRetention": 9, + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "State Reason", + "storageOutputRetention": 30, + "visualizationUrl": "visualizationUrl" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/swagger.json new file mode 100644 index 0000000000..8167c3a7f0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/swagger.json @@ -0,0 +1,2588 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Network Analytics resource management API.", + "version": "2023-11-15", + "description": "// FIXME: (missing-service-description) Add service description", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "AadOauth2Auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "AadOauth2Auth": { + "type": "oauth2", + "description": "The Azure Active Directory OAuth2 Flow", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "DataProducts" + }, + { + "name": "DataProductsCatalogs" + }, + { + "name": "DataTypes" + } + ], + "paths": { + "/providers/Microsoft.NetworkAnalytics/operations": { + "get": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkAnalytics/dataProducts": { + "get": { + "operationId": "DataProducts_ListBySubscription", + "tags": [ + "DataProducts" + ], + "description": "List data products by subscription.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataProductListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataProducts_ListBySubscription_MaximumSet_Gen": { + "$ref": "./examples/DataProducts_ListBySubscription_MaximumSet_Gen.json" + }, + "DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs": { + "get": { + "operationId": "DataProductsCatalogs_ListBySubscription", + "tags": [ + "DataProductsCatalogs" + ], + "description": "List data catalog by subscription.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataProductsCatalogListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataProductsCatalogs_ListBySubscription_MaximumSet_Gen": { + "$ref": "./examples/DataProductsCatalogs_ListBySubscription_MaximumSet_Gen.json" + }, + "DataProductsCatalogs_ListBySubscription_MinimumSet_Gen": { + "$ref": "./examples/DataProductsCatalogs_ListBySubscription_MinimumSet_Gen.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts": { + "get": { + "operationId": "DataProducts_ListByResourceGroup", + "tags": [ + "DataProducts" + ], + "description": "List data products by resource group.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataProductListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataProducts_ListByResourceGroup_MaximumSet_Gen": { + "$ref": "./examples/DataProducts_ListByResourceGroup_MaximumSet_Gen.json" + }, + "DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}": { + "get": { + "operationId": "DataProducts_Get", + "tags": [ + "DataProducts" + ], + "description": "Retrieve data product resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataProduct" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataProducts_Get_MaximumSet_Gen": { + "$ref": "./examples/DataProducts_Get_MaximumSet_Gen.json" + }, + "DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + } + }, + "put": { + "operationId": "DataProducts_Create", + "tags": [ + "DataProducts" + ], + "description": "Create data product resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/DataProduct" + } + } + ], + "responses": { + "200": { + "description": "Resource 'DataProduct' update operation succeeded", + "schema": { + "$ref": "#/definitions/DataProduct" + } + }, + "201": { + "description": "Resource 'DataProduct' create operation succeeded", + "schema": { + "$ref": "#/definitions/DataProduct" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataProducts_Create_MaximumSet_Gen": { + "$ref": "./examples/DataProducts_Create_MaximumSet_Gen.json" + }, + "DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "DataProducts_Update", + "tags": [ + "DataProducts" + ], + "description": "Update data product resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/DataProductUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataProduct" + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataProducts_Update_MaximumSet_Gen": { + "$ref": "./examples/DataProducts_Update_MaximumSet_Gen.json" + }, + "DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "DataProducts_Delete", + "tags": [ + "DataProducts" + ], + "description": "Delete data product resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + } + ], + "responses": { + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataProducts_Delete_MaximumSet_Gen": { + "$ref": "./examples/DataProducts_Delete_MaximumSet_Gen.json" + }, + "DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/addUserRole": { + "post": { + "operationId": "DataProducts_AddUserRole", + "tags": [ + "DataProducts" + ], + "description": "Assign role to the data product.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + }, + { + "name": "body", + "in": "body", + "description": "The content of the action request", + "required": true, + "schema": { + "$ref": "#/definitions/RoleAssignmentCommonProperties" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/RoleAssignmentDetail" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataProducts_AddUserRole_MaximumSet_Gen": { + "$ref": "./examples/DataProducts_AddUserRole_MaximumSet_Gen.json" + }, + "DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes": { + "get": { + "operationId": "DataTypes_ListByDataProduct", + "tags": [ + "DataTypes" + ], + "description": "List data type by parent resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataTypeListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataTypes_ListByDataProduct_MaximumSet_Gen": { + "$ref": "./examples/DataTypes_ListByDataProduct_MaximumSet_Gen.json" + }, + "DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}": { + "get": { + "operationId": "DataTypes_Get", + "tags": [ + "DataTypes" + ], + "description": "Retrieve data type resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + }, + { + "name": "dataTypeName", + "in": "path", + "description": "The data type name.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9-]*$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataType" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataTypes_Get_MaximumSet_Gen": { + "$ref": "./examples/DataTypes_Get_MaximumSet_Gen.json" + }, + "DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + } + }, + "put": { + "operationId": "DataTypes_Create", + "tags": [ + "DataTypes" + ], + "description": "Create data type resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + }, + { + "name": "dataTypeName", + "in": "path", + "description": "The data type name.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9-]*$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/DataType" + } + } + ], + "responses": { + "200": { + "description": "Resource 'DataType' update operation succeeded", + "schema": { + "$ref": "#/definitions/DataType" + } + }, + "201": { + "description": "Resource 'DataType' create operation succeeded", + "schema": { + "$ref": "#/definitions/DataType" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataTypes_Create_MaximumSet_Gen": { + "$ref": "./examples/DataTypes_Create_MaximumSet_Gen.json" + }, + "DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "DataTypes_Update", + "tags": [ + "DataTypes" + ], + "description": "Update data type resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + }, + { + "name": "dataTypeName", + "in": "path", + "description": "The data type name.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9-]*$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/DataTypeUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataType" + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataTypes_Update_MaximumSet_Gen": { + "$ref": "./examples/DataTypes_Update_MaximumSet_Gen.json" + }, + "DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + }, + "delete": { + "operationId": "DataTypes_Delete", + "tags": [ + "DataTypes" + ], + "description": "Delete data type resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + }, + { + "name": "dataTypeName", + "in": "path", + "description": "The data type name.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9-]*$" + } + ], + "responses": { + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataTypes_Delete_MaximumSet_Gen": { + "$ref": "./examples/DataTypes_Delete_MaximumSet_Gen.json" + }, + "DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}/deleteData": { + "post": { + "operationId": "DataTypes_DeleteData", + "tags": [ + "DataTypes" + ], + "description": "Delete data for data type.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + }, + { + "name": "dataTypeName", + "in": "path", + "description": "The data type name.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9-]*$" + }, + { + "name": "body", + "in": "body", + "description": "The content of the action request", + "required": true, + "schema": { + "type": "object", + "additionalProperties": {} + } + } + ], + "responses": { + "202": { + "description": "Resource operation accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataTypes_DeleteData_MaximumSet_Gen": { + "$ref": "./examples/DataTypes_DeleteData_MaximumSet_Gen.json" + }, + "DataTypes_DeleteData_MinimumSet_Gen": { + "$ref": "./examples/DataTypes_DeleteData_MinimumSet_Gen.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/dataTypes/{dataTypeName}/generateStorageContainerSasToken": { + "post": { + "operationId": "DataTypes_GenerateStorageContainerSasToken", + "tags": [ + "DataTypes" + ], + "description": "Generate sas token for storage container.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + }, + { + "name": "dataTypeName", + "in": "path", + "description": "The data type name.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9-]*$" + }, + { + "name": "body", + "in": "body", + "description": "The content of the action request", + "required": true, + "schema": { + "$ref": "#/definitions/ContainerSaS" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ContainerSasToken" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen": { + "$ref": "./examples/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen.json" + }, + "DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/generateStorageAccountSasToken": { + "post": { + "operationId": "DataProducts_GenerateStorageAccountSasToken", + "tags": [ + "DataProducts" + ], + "description": "Generate sas token for storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + }, + { + "name": "body", + "in": "body", + "description": "The content of the action request", + "required": true, + "schema": { + "$ref": "#/definitions/AccountSas" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/AccountSasToken" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen": { + "$ref": "./examples/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen.json" + }, + "DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/listRolesAssignments": { + "post": { + "operationId": "DataProducts_ListRolesAssignments", + "tags": [ + "DataProducts" + ], + "description": "List user roles associated with the data product.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + }, + { + "name": "body", + "in": "body", + "description": "The content of the action request", + "required": true, + "schema": { + "type": "object", + "additionalProperties": {} + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ListRoleAssignments" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataProducts_ListRolesAssignments_MaximumSet_Gen": { + "$ref": "./examples/DataProducts_ListRolesAssignments_MaximumSet_Gen.json" + }, + "DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/removeUserRole": { + "post": { + "operationId": "DataProducts_RemoveUserRole", + "tags": [ + "DataProducts" + ], + "description": "Remove role from the data product.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + }, + { + "name": "body", + "in": "body", + "description": "The content of the action request", + "required": true, + "schema": { + "$ref": "#/definitions/RoleAssignmentDetail" + } + } + ], + "responses": { + "204": { + "description": "Action completed successfully." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataProducts_RemoveUserRole_MaximumSet_Gen": { + "$ref": "./examples/DataProducts_RemoveUserRole_MaximumSet_Gen.json" + }, + "DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/rotateKey": { + "post": { + "operationId": "DataProducts_RotateKey", + "tags": [ + "DataProducts" + ], + "description": "Initiate key rotation on Data Product.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "dataProductName", + "in": "path", + "description": "The data product resource name", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z][a-z0-9]*$" + }, + { + "name": "body", + "in": "body", + "description": "The content of the action request", + "required": true, + "schema": { + "$ref": "#/definitions/KeyVaultInfo" + } + } + ], + "responses": { + "204": { + "description": "Action completed successfully." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataProducts_RotateKey_MaximumSet_Gen": { + "$ref": "./examples/DataProducts_RotateKey_MaximumSet_Gen.json" + }, + "DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs": { + "get": { + "operationId": "DataProductsCatalogs_ListByResourceGroup", + "tags": [ + "DataProductsCatalogs" + ], + "description": "List data catalog by resource group.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataProductsCatalogListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen": { + "$ref": "./examples/DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen.json" + }, + "DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen": { + "$ref": "./examples/DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default": { + "get": { + "operationId": "DataProductsCatalogs_Get", + "tags": [ + "DataProductsCatalogs" + ], + "description": "Retrieve data type resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DataProductsCatalog" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DataProductsCatalogs_Get_MaximumSet_Gen": { + "$ref": "./examples/DataProductsCatalogs_Get_MaximumSet_Gen.json" + }, + "DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen": { + "$ref": "./examples/DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen.json" + } + } + } + } + }, + "definitions": { + "AccountSas": { + "type": "object", + "description": "The details for storage account sas creation.", + "properties": { + "startTimeStamp": { + "type": "string", + "format": "date-time", + "description": "Sas token start timestamp." + }, + "expiryTimeStamp": { + "type": "string", + "format": "date-time", + "description": "Sas token expiry timestamp." + }, + "ipAddress": { + "type": "string", + "description": "Ip Address" + } + }, + "required": [ + "startTimeStamp", + "expiryTimeStamp", + "ipAddress" + ] + }, + "AccountSasToken": { + "type": "object", + "description": "Details of storage account sas token .", + "properties": { + "storageAccountSasToken": { + "type": "string", + "format": "password", + "description": "Field to specify storage account sas token.", + "x-ms-secret": true + } + }, + "required": [ + "storageAccountSasToken" + ] + }, + "Azure.ResourceManager.Foundations.ManagedIdentityProperties": { + "type": "object", + "description": "The properties of the managed service identities assigned to this resource.", + "properties": { + "tenantId": { + "type": "string", + "description": "The Active Directory tenant id of the principal.", + "readOnly": true + }, + "principalId": { + "type": "string", + "description": "The active directory identifier of this principal.", + "readOnly": true + }, + "type": { + "$ref": "#/definitions/Azure.ResourceManager.Foundations.ManagedIdentityType", + "description": "The type of managed identity assigned to this resource." + }, + "userAssignedIdentities": { + "type": "object", + "description": "The identities assigned to this resource by the user.", + "additionalProperties": { + "$ref": "#/definitions/Azure.ResourceManager.Foundations.UserAssignedIdentity" + } + } + }, + "required": [ + "type" + ] + }, + "Azure.ResourceManager.Foundations.ManagedIdentityType": { + "type": "string", + "description": "The kind of managed identity assigned to this resource.", + "enum": [ + "None", + "SystemAssigned", + "UserAssigned", + "SystemAssigned, UserAssigned" + ], + "x-ms-enum": { + "name": "ManagedIdentityType", + "modelAsString": true, + "values": [ + { + "name": "None", + "value": "None", + "description": "No managed identity." + }, + { + "name": "SystemAssigned", + "value": "SystemAssigned", + "description": "System assigned managed identity." + }, + { + "name": "UserAssigned", + "value": "UserAssigned", + "description": "User assigned managed identity." + }, + { + "name": "SystemAndUserAssigned", + "value": "SystemAssigned, UserAssigned", + "description": "System and user assigned managed identity." + } + ] + } + }, + "Azure.ResourceManager.Foundations.UserAssignedIdentity": { + "type": "object", + "description": "A managed identity assigned by the user.", + "properties": { + "clientId": { + "type": "string", + "description": "The active directory client identifier for this principal." + }, + "principalId": { + "type": "string", + "description": "The active directory identifier for this principal." + } + } + }, + "Azure.ResourceManager.ManagedServiceIdentity": { + "type": "object", + "description": "The managed service identities envelope.", + "properties": { + "identity": { + "$ref": "#/definitions/Azure.ResourceManager.Foundations.ManagedIdentityProperties", + "description": "The managed service identities assigned to this resource." + } + } + }, + "ConsumptionEndpointsProperties": { + "type": "object", + "description": "Details of Consumption Properties", + "properties": { + "ingestionUrl": { + "type": "string", + "description": "Ingestion url to upload the data.", + "readOnly": true + }, + "ingestionResourceId": { + "type": "string", + "format": "arm-id", + "description": "Resource Id of ingestion endpoint.", + "readOnly": true, + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Storage/storageAccounts" + } + ] + } + }, + "fileAccessUrl": { + "type": "string", + "description": "Url to consume file type.", + "readOnly": true + }, + "fileAccessResourceId": { + "type": "string", + "format": "arm-id", + "description": "Resource Id of file access endpoint.", + "readOnly": true, + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Storage/storageAccounts" + } + ] + } + }, + "queryUrl": { + "type": "string", + "description": "Url to consume the processed data.", + "readOnly": true + }, + "queryResourceId": { + "type": "string", + "format": "arm-id", + "description": "Resource Id of query endpoint.", + "readOnly": true, + "x-ms-arm-id-details": { + "allowedResources": [ + { + "type": "Microsoft.Kusto/clusters" + } + ] + } + } + } + }, + "ContainerSaS": { + "type": "object", + "description": "The details for container sas creation.", + "properties": { + "startTimeStamp": { + "type": "string", + "format": "date-time", + "description": "Sas token start timestamp." + }, + "expiryTimeStamp": { + "type": "string", + "format": "date-time", + "description": "Sas token expiry timestamp." + }, + "ipAddress": { + "type": "string", + "description": "Ip Address" + } + }, + "required": [ + "startTimeStamp", + "expiryTimeStamp", + "ipAddress" + ] + }, + "ContainerSasToken": { + "type": "object", + "description": "Details of storage container account sas token .", + "properties": { + "storageContainerSasToken": { + "type": "string", + "format": "password", + "description": "Field to specify storage container sas token.", + "x-ms-secret": true + } + }, + "required": [ + "storageContainerSasToken" + ] + }, + "ControlState": { + "type": "string", + "description": "The data type state", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "ControlState", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled", + "description": "Field to enable a setting." + }, + { + "name": "Disabled", + "value": "Disabled", + "description": "Field to disable a setting." + } + ] + } + }, + "DataProduct": { + "type": "object", + "description": "The data product resource.", + "properties": { + "properties": { + "$ref": "#/definitions/DataProductProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "identity": { + "$ref": "#/definitions/Azure.ResourceManager.Foundations.ManagedIdentityProperties", + "description": "The managed service identities assigned to this resource." + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "DataProductInformation": { + "type": "object", + "description": "Data Product Information", + "properties": { + "dataProductName": { + "type": "string", + "description": "Name of data product." + }, + "description": { + "type": "string", + "description": "Description about data product." + }, + "dataProductVersions": { + "type": "array", + "description": "Version information of data product.", + "items": { + "$ref": "#/definitions/DataProductVersion" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "dataProductName", + "description", + "dataProductVersions" + ] + }, + "DataProductListResult": { + "type": "object", + "description": "The response of a DataProduct list operation.", + "properties": { + "value": { + "type": "array", + "description": "The DataProduct items on this page", + "items": { + "$ref": "#/definitions/DataProduct" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "DataProductNetworkAcls": { + "type": "object", + "description": "Data Product Network rule set", + "properties": { + "virtualNetworkRule": { + "type": "array", + "description": "Virtual Network Rule", + "items": { + "$ref": "#/definitions/VirtualNetworkRule" + } + }, + "ipRules": { + "type": "array", + "description": "IP rule with specific IP or IP range in CIDR format.", + "items": { + "$ref": "#/definitions/IPRules" + }, + "x-ms-identifiers": [] + }, + "allowedQueryIpRangeList": { + "type": "array", + "description": "The list of query ips in the format of CIDR allowed to connect to query/visualization endpoint.", + "items": { + "type": "string" + } + }, + "defaultAction": { + "$ref": "#/definitions/DefaultAction", + "description": "Default Action" + } + }, + "required": [ + "virtualNetworkRule", + "ipRules", + "allowedQueryIpRangeList", + "defaultAction" + ] + }, + "DataProductProperties": { + "type": "object", + "description": "The data product properties.", + "properties": { + "resourceGuid": { + "type": "string", + "description": "The resource GUID property of the data product resource.", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Latest provisioning state of data product.", + "readOnly": true + }, + "publisher": { + "type": "string", + "description": "Data product publisher name.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "product": { + "type": "string", + "description": "Product name of data product.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "majorVersion": { + "type": "string", + "description": "Major version of data product.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "owners": { + "type": "array", + "description": "List of name or email associated with data product resource deployment.", + "items": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "redundancy": { + "$ref": "#/definitions/ControlState", + "description": "Flag to enable or disable redundancy for data product.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "purviewAccount": { + "type": "string", + "description": "Purview account url for data product to connect to.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "purviewCollection": { + "type": "string", + "description": "Purview collection url for data product to connect to.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "privateLinksEnabled": { + "$ref": "#/definitions/ControlState", + "description": "Flag to enable or disable private link for data product resource.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "publicNetworkAccess": { + "$ref": "#/definitions/ControlState", + "description": "Flag to enable or disable public access of data product resource.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "customerManagedKeyEncryptionEnabled": { + "$ref": "#/definitions/ControlState", + "description": "Flag to enable customer managed key encryption for data product.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "customerEncryptionKey": { + "$ref": "#/definitions/EncryptionKeyDetails", + "description": "Customer managed encryption key details for data product.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "networkacls": { + "$ref": "#/definitions/DataProductNetworkAcls", + "description": "Network rule set for data product.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "managedResourceGroupConfiguration": { + "$ref": "#/definitions/ManagedResourceGroupConfiguration", + "description": "Managed resource group configuration.", + "x-ms-mutability": [ + "create" + ] + }, + "availableMinorVersions": { + "type": "array", + "description": "List of available minor versions of the data product resource.", + "items": { + "type": "string" + }, + "readOnly": true + }, + "currentMinorVersion": { + "type": "string", + "description": "Current configured minor version of the data product resource.", + "x-ms-mutability": [ + "read", + "update" + ] + }, + "documentation": { + "type": "string", + "description": "Documentation link for the data product based on definition file.", + "readOnly": true + }, + "consumptionEndpoints": { + "$ref": "#/definitions/ConsumptionEndpointsProperties", + "description": "Resource links which exposed to the customer to query the data.", + "readOnly": true + }, + "keyVaultUrl": { + "type": "string", + "description": "Key vault url.", + "readOnly": true + } + }, + "required": [ + "publisher", + "product", + "majorVersion" + ] + }, + "DataProductUpdate": { + "type": "object", + "description": "The type used for update operations of the DataProduct.", + "properties": { + "identity": { + "$ref": "#/definitions/Azure.ResourceManager.ManagedServiceIdentity", + "description": "The managed service identities assigned to this resource." + }, + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "$ref": "#/definitions/DataProductUpdateProperties", + "description": "The updatable properties of the DataProduct." + } + } + }, + "DataProductUpdateProperties": { + "type": "object", + "description": "The updatable properties of the DataProduct.", + "properties": { + "owners": { + "type": "array", + "description": "List of name or email associated with data product resource deployment.", + "items": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "purviewAccount": { + "type": "string", + "description": "Purview account url for data product to connect to.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "purviewCollection": { + "type": "string", + "description": "Purview collection url for data product to connect to.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "privateLinksEnabled": { + "$ref": "#/definitions/ControlState", + "description": "Flag to enable or disable private link for data product resource.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "currentMinorVersion": { + "type": "string", + "description": "Current configured minor version of the data product resource.", + "x-ms-mutability": [ + "read", + "update" + ] + } + } + }, + "DataProductUserRole": { + "type": "string", + "description": "The data type state", + "enum": [ + "Reader", + "SensitiveReader" + ], + "x-ms-enum": { + "name": "DataProductUserRole", + "modelAsString": true, + "values": [ + { + "name": "Reader", + "value": "Reader", + "description": "Field to specify user of type Reader." + }, + { + "name": "SensitiveReader", + "value": "SensitiveReader", + "description": "Field to specify user of type SensitiveReader.\nThis user has privileged access to read sensitive data of a data product." + } + ] + } + }, + "DataProductVersion": { + "type": "object", + "description": "Data Product Version.", + "properties": { + "version": { + "type": "string", + "description": "Version of data product" + } + }, + "required": [ + "version" + ] + }, + "DataProductsCatalog": { + "type": "object", + "description": "The data catalog resource.", + "properties": { + "properties": { + "$ref": "#/definitions/DataProductsCatalogProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + }, + "name": { + "type": "string", + "readOnly": true + } + }, + "required": [ + "name" + ], + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "DataProductsCatalogListResult": { + "type": "object", + "description": "The response of a DataProductsCatalog list operation.", + "properties": { + "value": { + "type": "array", + "description": "The DataProductsCatalog items on this page", + "items": { + "$ref": "#/definitions/DataProductsCatalog" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "DataProductsCatalogProperties": { + "type": "object", + "description": "Details for data catalog properties.", + "properties": { + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The data catalog provisioning state.", + "readOnly": true + }, + "publishers": { + "type": "array", + "description": "The data product publisher information.", + "items": { + "$ref": "#/definitions/PublisherInformation" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "publishers" + ] + }, + "DataType": { + "type": "object", + "description": "The data type resource.", + "properties": { + "properties": { + "$ref": "#/definitions/DataTypeProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "DataTypeListResult": { + "type": "object", + "description": "The response of a DataType list operation.", + "properties": { + "value": { + "type": "array", + "description": "The DataType items on this page", + "items": { + "$ref": "#/definitions/DataType" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "DataTypeProperties": { + "type": "object", + "description": "The data type properties", + "properties": { + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Latest provisioning state of data product.", + "readOnly": true + }, + "state": { + "$ref": "#/definitions/DataTypeState", + "description": "State of data type.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "stateReason": { + "type": "string", + "description": "Reason for the state of data type.", + "readOnly": true + }, + "storageOutputRetention": { + "type": "integer", + "format": "int32", + "description": "Field for storage output retention in days.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "databaseCacheRetention": { + "type": "integer", + "format": "int32", + "description": "Field for database cache retention in days.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "databaseRetention": { + "type": "integer", + "format": "int32", + "description": "Field for database data retention in days.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "visualizationUrl": { + "type": "string", + "description": "Url for data visualization.", + "readOnly": true + } + } + }, + "DataTypeState": { + "type": "string", + "description": "The data type state", + "enum": [ + "Stopped", + "Running" + ], + "x-ms-enum": { + "name": "DataTypeState", + "modelAsString": true, + "values": [ + { + "name": "Stopped", + "value": "Stopped", + "description": "Field to specify stopped state." + }, + { + "name": "Running", + "value": "Running", + "description": "Field to specify running state." + } + ] + } + }, + "DataTypeUpdate": { + "type": "object", + "description": "The type used for update operations of the DataType.", + "properties": { + "properties": { + "$ref": "#/definitions/DataTypeUpdateProperties", + "description": "The updatable properties of the DataType." + } + } + }, + "DataTypeUpdateProperties": { + "type": "object", + "description": "The updatable properties of the DataType.", + "properties": { + "state": { + "$ref": "#/definitions/DataTypeState", + "description": "State of data type.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "storageOutputRetention": { + "type": "integer", + "format": "int32", + "description": "Field for storage output retention in days.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "databaseCacheRetention": { + "type": "integer", + "format": "int32", + "description": "Field for database cache retention in days.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + }, + "databaseRetention": { + "type": "integer", + "format": "int32", + "description": "Field for database data retention in days.", + "x-ms-mutability": [ + "read", + "update", + "create" + ] + } + } + }, + "DefaultAction": { + "type": "string", + "description": "Specifies the default action of allow or deny when no other rules match.", + "enum": [ + "Allow", + "Deny" + ], + "x-ms-enum": { + "name": "DefaultAction", + "modelAsString": true, + "values": [ + { + "name": "Allow", + "value": "Allow", + "description": "Represents allow action." + }, + { + "name": "Deny", + "value": "Deny", + "description": "Represents deny action." + } + ] + } + }, + "EncryptionKeyDetails": { + "type": "object", + "description": "Encryption key details.", + "properties": { + "keyVaultUri": { + "type": "string", + "description": "The Uri of the key vault." + }, + "keyName": { + "type": "string", + "description": "The name of the key vault key." + }, + "keyVersion": { + "type": "string", + "description": "The version of the key vault key." + } + }, + "required": [ + "keyVaultUri", + "keyName", + "keyVersion" + ] + }, + "IPRules": { + "type": "object", + "description": "IP rule with specific IP or IP range in CIDR format.", + "properties": { + "value": { + "type": "string", + "description": "IP Rules Value" + }, + "action": { + "type": "string", + "description": "The action of virtual network rule." + } + }, + "required": [ + "action" + ] + }, + "KeyVaultInfo": { + "type": "object", + "description": "Details for KeyVault.", + "properties": { + "keyVaultUrl": { + "type": "string", + "description": "key vault url." + } + }, + "required": [ + "keyVaultUrl" + ] + }, + "ListRoleAssignments": { + "type": "object", + "description": "list role assignments.", + "properties": { + "count": { + "type": "integer", + "format": "int32", + "description": "Count of role assignments." + }, + "roleAssignmentResponse": { + "type": "array", + "description": "list of role assignments", + "items": { + "$ref": "#/definitions/RoleAssignmentDetail" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "count", + "roleAssignmentResponse" + ] + }, + "ManagedResourceGroupConfiguration": { + "type": "object", + "description": "ManagedResourceGroup related properties", + "properties": { + "name": { + "type": "string", + "description": "Name of managed resource group" + }, + "location": { + "type": "string", + "description": "Managed Resource Group location" + } + }, + "required": [ + "name", + "location" + ] + }, + "ProvisioningState": { + "type": "string", + "description": "The status of the current operation.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Provisioning", + "Updating", + "Deleting", + "Accepted" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Represents a succeeded operation." + }, + { + "name": "Failed", + "value": "Failed", + "description": "Represents a failed operation." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Represents a canceled operation." + }, + { + "name": "Provisioning", + "value": "Provisioning", + "description": "Represents a pending operation." + }, + { + "name": "Updating", + "value": "Updating", + "description": "Represents a pending operation." + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "Represents an operation under deletion." + }, + { + "name": "Accepted", + "value": "Accepted", + "description": "Represents an accepted operation." + } + ] + }, + "readOnly": true + }, + "PublisherInformation": { + "type": "object", + "description": "Details for Publisher Information.", + "properties": { + "publisherName": { + "type": "string", + "description": "Name of the publisher." + }, + "dataProducts": { + "type": "array", + "description": "Data product information.", + "items": { + "$ref": "#/definitions/DataProductInformation" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "publisherName", + "dataProducts" + ] + }, + "RoleAssignmentCommonProperties": { + "type": "object", + "description": "The details for role assignment common properties.", + "properties": { + "roleId": { + "type": "string", + "description": "Role Id of the Built-In Role" + }, + "principalId": { + "type": "string", + "description": "Object ID of the AAD principal or security-group." + }, + "userName": { + "type": "string", + "description": "User name." + }, + "dataTypeScope": { + "type": "array", + "description": "Data Type Scope at which the role assignment is created.", + "items": { + "type": "string" + } + }, + "principalType": { + "type": "string", + "description": "Type of the principal Id: User, Group or ServicePrincipal" + }, + "role": { + "$ref": "#/definitions/DataProductUserRole", + "description": "Data Product role to be assigned to a user." + } + }, + "required": [ + "roleId", + "principalId", + "userName", + "dataTypeScope", + "principalType", + "role" + ] + }, + "RoleAssignmentDetail": { + "type": "object", + "description": "The details for role assignment response.", + "properties": { + "roleId": { + "type": "string", + "description": "Role Id of the Built-In Role" + }, + "principalId": { + "type": "string", + "description": "Object ID of the AAD principal or security-group." + }, + "userName": { + "type": "string", + "description": "User name." + }, + "dataTypeScope": { + "type": "array", + "description": "Data Type Scope at which the role assignment is created.", + "items": { + "type": "string" + } + }, + "principalType": { + "type": "string", + "description": "Type of the principal Id: User, Group or ServicePrincipal" + }, + "role": { + "$ref": "#/definitions/DataProductUserRole", + "description": "Data Product role to be assigned to a user." + }, + "roleAssignmentId": { + "type": "string", + "description": "Id of role assignment request" + } + }, + "required": [ + "roleId", + "principalId", + "userName", + "dataTypeScope", + "principalType", + "role", + "roleAssignmentId" + ] + }, + "VirtualNetworkRule": { + "type": "object", + "description": "Virtual Network Rule", + "properties": { + "id": { + "type": "string", + "description": "Resource ID of a subnet" + }, + "action": { + "type": "string", + "description": "The action of virtual network rule." + }, + "state": { + "type": "string", + "description": "Gets the state of virtual network rule." + } + }, + "required": [ + "id" + ] + } + }, + "parameters": {} +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp index 024c40f17d..8611ab9d95 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp @@ -86,7 +86,7 @@ interface DataProducts { */ listRolesAssignments is ArmResourceActionSync< DataProduct, - AnyObject, + Record, ListRoleAssignments >; diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp index 68d34c50e3..d4333fa8a1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp @@ -61,7 +61,10 @@ interface DataTypes { /** * Delete data for data type. */ - deleteData is ArmResourceActionNoResponseContentAsync; + deleteData is ArmResourceActionNoResponseContentAsync< + DataType, + Record + >; /** * Generate sas token for storage container. diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_CreateOrUpdate.json new file mode 100644 index 0000000000..0527cb1c82 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_CreateOrUpdate.json @@ -0,0 +1,76 @@ +{ + "operationId": "Accounts_CreateOrUpdate", + "parameters": { + "name": "myPlaywrightAccount", + "api-version": "2023-10-01-preview", + "resource": { + "location": "westus", + "properties": { + "regionalAffinity": "Enabled" + }, + "tags": { + "Team": "Dev Exp" + } + }, + "resourceGroupName": "dummyrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_CreateOrUpdate", + "responses": { + "200": { + "body": { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + } + }, + "201": { + "body": { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.PlaywrightTesting/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000/Spring/default?api-version=2023-06-01-preview" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_Delete.json new file mode 100644 index 0000000000..5e69c18b42 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_Delete.json @@ -0,0 +1,19 @@ +{ + "operationId": "Accounts_Delete", + "parameters": { + "name": "myPlaywrightAccount", + "api-version": "2023-10-01-preview", + "resourceGroupName": "dummyrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_Delete", + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.PlaywrightTesting/locations/eastus/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2023-06-01-preview" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_Get.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_Get.json new file mode 100644 index 0000000000..2ded0c48b1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_Get.json @@ -0,0 +1,38 @@ +{ + "operationId": "Accounts_Get", + "parameters": { + "name": "myPlaywrightAccount", + "api-version": "2023-10-01-preview", + "resourceGroupName": "dummyrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_Get", + "responses": { + "200": { + "body": { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_ListByResourceGroup.json new file mode 100644 index 0000000000..7bfc80e402 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_ListByResourceGroup.json @@ -0,0 +1,41 @@ +{ + "operationId": "Accounts_ListByResourceGroup", + "parameters": { + "api-version": "2023-10-01-preview", + "resourceGroupName": "dummyrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_ListByResourceGroup", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_ListBySubscription.json new file mode 100644 index 0000000000..af33e2310b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_ListBySubscription.json @@ -0,0 +1,40 @@ +{ + "operationId": "Accounts_ListBySubscription", + "parameters": { + "api-version": "2023-10-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_ListBySubscription", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_Update.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_Update.json new file mode 100644 index 0000000000..0c2f290ae0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Accounts_Update.json @@ -0,0 +1,47 @@ +{ + "operationId": "Accounts_Update", + "parameters": { + "name": "myPlaywrightAccount", + "api-version": "2023-10-01-preview", + "properties": { + "properties": { + "regionalAffinity": "Enabled" + }, + "tags": { + "Division": "LT", + "Team": "Dev Exp" + } + }, + "resourceGroupName": "dummyrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_Update", + "responses": { + "200": { + "body": { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Quotas_Get.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Quotas_Get.json new file mode 100644 index 0000000000..f4895fbab2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/examples/Quotas_Get.json @@ -0,0 +1,31 @@ +{ + "operationId": "Quotas_Get", + "parameters": { + "name": "ScalableExecution", + "api-version": "2023-10-01-preview", + "location": "eastus", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Quotas_Get", + "responses": { + "200": { + "body": { + "name": "ScalableExecution", + "type": "Microsoft.AzurePlaywrightService/Locations/Quotas", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzurePlaywrightService/locations/eastus/quotas/ScalableExecution", + "properties": { + "freeTrial": { + "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "allocatedValue": 0, + "createdAt": "2023-08-31T10:19:36.081Z", + "expiryAt": "2023-08-31T10:19:36.081Z", + "percentageUsed": 100, + "state": "Active", + "usedValue": 0 + }, + "provisioningState": "Succeeded" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/swagger.json new file mode 100644 index 0000000000..6e8af8fa03 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/swagger-output/swagger.json @@ -0,0 +1,818 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft AzurePlaywrightService Management API", + "version": "2023-10-01-preview", + "description": "Azure Playwright testing management service", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "AadOauth2Auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "AadOauth2Auth": { + "type": "oauth2", + "description": "The Azure Active Directory OAuth2 Flow", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "Accounts" + }, + { + "name": "Quotas" + } + ], + "paths": { + "/providers/Microsoft.AzurePlaywrightService/operations": { + "get": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/accounts": { + "get": { + "operationId": "Accounts_ListBySubscription", + "tags": [ + "Accounts" + ], + "description": "List Account resources by subscription ID", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/AccountListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Accounts_ListBySubscription": { + "$ref": "./examples/Accounts_ListBySubscription.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas": { + "get": { + "operationId": "Quotas_ListByLocation", + "tags": [ + "Quotas" + ], + "description": "List quotas for a given subscription Id.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/LocationParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/QuotaListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name}": { + "get": { + "operationId": "Quotas_Get", + "tags": [ + "Quotas" + ], + "description": "Get quota by name.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/LocationParameter" + }, + { + "name": "name", + "in": "path", + "description": "The quota name.", + "required": true, + "type": "string", + "enum": [ + "ScalableExecution" + ], + "x-ms-enum": { + "name": "QuotaNames", + "modelAsString": true, + "values": [ + { + "name": "ScalableExecution", + "value": "ScalableExecution", + "description": "The quota details for scalable execution feature. When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations." + } + ] + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Quota" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Quotas_Get": { + "$ref": "./examples/Quotas_Get.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts": { + "get": { + "operationId": "Accounts_ListByResourceGroup", + "tags": [ + "Accounts" + ], + "description": "List Account resources by resource group", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/AccountListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Accounts_ListByResourceGroup": { + "$ref": "./examples/Accounts_ListByResourceGroup.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name}": { + "get": { + "operationId": "Accounts_Get", + "tags": [ + "Accounts" + ], + "description": "Get a Account", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of account", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 64, + "pattern": "^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Account" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Accounts_Get": { + "$ref": "./examples/Accounts_Get.json" + } + } + }, + "put": { + "operationId": "Accounts_CreateOrUpdate", + "tags": [ + "Accounts" + ], + "description": "Create a Account", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of account", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 64, + "pattern": "^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/Account" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Account' update operation succeeded", + "schema": { + "$ref": "#/definitions/Account" + } + }, + "201": { + "description": "Resource 'Account' create operation succeeded", + "schema": { + "$ref": "#/definitions/Account" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Accounts_CreateOrUpdate": { + "$ref": "./examples/Accounts_CreateOrUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Accounts_Update", + "tags": [ + "Accounts" + ], + "description": "Update a Account", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of account", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 64, + "pattern": "^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/AccountUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Account" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Accounts_Update": { + "$ref": "./examples/Accounts_Update.json" + } + } + }, + "delete": { + "operationId": "Accounts_Delete", + "tags": [ + "Accounts" + ], + "description": "Delete a Account", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "name", + "in": "path", + "description": "Name of account", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 64, + "pattern": "^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Accounts_Delete": { + "$ref": "./examples/Accounts_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + } + }, + "definitions": { + "Account": { + "type": "object", + "description": "An account resource", + "properties": { + "properties": { + "$ref": "#/definitions/AccountProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "AccountListResult": { + "type": "object", + "description": "The response of a Account list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Account items on this page", + "items": { + "$ref": "#/definitions/Account" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "AccountProperties": { + "type": "object", + "description": "Account properties", + "properties": { + "dashboardUri": { + "type": "string", + "format": "uri", + "description": "The Playwright testing dashboard URI for the account resource.", + "readOnly": true + }, + "regionalAffinity": { + "$ref": "#/definitions/EnablementStatus", + "description": "This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created." + }, + "scalableExecution": { + "$ref": "#/definitions/EnablementStatus", + "description": "When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations." + }, + "reporting": { + "$ref": "#/definitions/EnablementStatus", + "description": "When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting." + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + } + }, + "AccountUpdate": { + "type": "object", + "description": "The type used for update operations of the Account.", + "properties": { + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "$ref": "#/definitions/AccountUpdateProperties", + "description": "The updatable properties of the Account." + } + } + }, + "AccountUpdateProperties": { + "type": "object", + "description": "The updatable properties of the Account.", + "properties": { + "regionalAffinity": { + "$ref": "#/definitions/EnablementStatus", + "description": "This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created." + }, + "scalableExecution": { + "$ref": "#/definitions/EnablementStatus", + "description": "When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations." + }, + "reporting": { + "$ref": "#/definitions/EnablementStatus", + "description": "When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting." + } + } + }, + "EnablementStatus": { + "type": "string", + "description": "The enablement status of a feature.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "EnablementStatus", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled", + "description": "The feature is Enabled." + }, + { + "name": "Disabled", + "value": "Disabled", + "description": "The feature is Disabled." + } + ] + } + }, + "FreeTrialProperties": { + "type": "object", + "description": "The free-trial properties", + "properties": { + "accountId": { + "type": "string", + "description": "The playwright account id.", + "readOnly": true + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The free-trial createdAt utcDateTime.", + "readOnly": true + }, + "expiryAt": { + "type": "string", + "format": "date-time", + "description": "The free-trial expiryAt utcDateTime.", + "readOnly": true + }, + "allocatedValue": { + "type": "integer", + "format": "int32", + "description": "The free-trial allocated limit value eg. allocated free minutes.", + "readOnly": true + }, + "usedValue": { + "type": "integer", + "format": "int32", + "description": "The free-trial used value eg. used free minutes.", + "readOnly": true + }, + "percentageUsed": { + "type": "number", + "format": "decimal", + "description": "The free-trial percentage used.", + "maximum": 100, + "readOnly": true + }, + "state": { + "$ref": "#/definitions/FreeTrialState", + "description": "The free-trial state.", + "readOnly": true + } + }, + "required": [ + "accountId", + "createdAt", + "expiryAt", + "allocatedValue", + "usedValue", + "percentageUsed", + "state" + ] + }, + "FreeTrialState": { + "type": "string", + "description": "The free-trial state.", + "enum": [ + "Active", + "Expired" + ], + "x-ms-enum": { + "name": "FreeTrialState", + "modelAsString": true, + "values": [ + { + "name": "Active", + "value": "Active", + "description": "The free-trial is Active." + }, + { + "name": "Expired", + "value": "Expired", + "description": "The free-trial is Expired." + } + ] + } + }, + "ProvisioningState": { + "type": "string", + "description": "The status of the current operation.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Deleting", + "Accepted" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Resource has been created." + }, + { + "name": "Failed", + "value": "Failed", + "description": "Resource creation failed." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Resource creation was canceled." + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "Deletion in progress" + }, + { + "name": "Accepted", + "value": "Accepted", + "description": "Change accepted for processing" + } + ] + }, + "readOnly": true + }, + "Quota": { + "type": "object", + "description": "A quota resource", + "properties": { + "properties": { + "$ref": "#/definitions/QuotaProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "QuotaListResult": { + "type": "object", + "description": "The response of a Quota list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Quota items on this page", + "items": { + "$ref": "#/definitions/Quota" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "QuotaProperties": { + "type": "object", + "description": "Quota properties", + "properties": { + "freeTrial": { + "$ref": "#/definitions/FreeTrialProperties", + "description": "The free-trial quota." + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + } + } + }, + "parameters": {} +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp index f95b87943a..b3dab533bd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp @@ -15,7 +15,7 @@ namespace Microsoft.AzurePlaywrightService; * A quota resource */ @subscriptionResource -@parentResource("SubscriptionLocationResource") +@parentResource(SubscriptionLocationResource) model Quota is ProxyResource { /** * The quota name. diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/swagger-output/swagger.json new file mode 100644 index 0000000000..49ba37011b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/swagger-output/swagger.json @@ -0,0 +1,1278 @@ +{ + "swagger": "2.0", + "info": { + "title": "Traffic Controller Provider management API.", + "version": "2023-11-01", + "description": "Traffic Controller Provider management API.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "AadOauth2Auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "AadOauth2Auth": { + "type": "oauth2", + "description": "The Azure Active Directory OAuth2 Flow", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "TrafficControllers" + }, + { + "name": "Associations" + }, + { + "name": "Frontends" + } + ], + "paths": { + "/providers/Microsoft.ServiceNetworking/operations": { + "get": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceNetworking/trafficControllers": { + "get": { + "operationId": "TrafficControllers_ListBySubscription", + "tags": [ + "TrafficControllers" + ], + "description": "List TrafficController resources by subscription ID", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/TrafficControllerListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers": { + "get": { + "operationId": "TrafficControllers_ListByResourceGroup", + "tags": [ + "TrafficControllers" + ], + "description": "List TrafficController resources by resource group", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/TrafficControllerListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}": { + "get": { + "operationId": "TrafficControllers_Get", + "tags": [ + "TrafficControllers" + ], + "description": "Get a TrafficController", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "trafficControllerName", + "in": "path", + "description": "traffic controller name for path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/TrafficController" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "operationId": "TrafficControllers_CreateOrUpdate", + "tags": [ + "TrafficControllers" + ], + "description": "Create a TrafficController", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "trafficControllerName", + "in": "path", + "description": "traffic controller name for path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/TrafficController" + } + } + ], + "responses": { + "200": { + "description": "Resource 'TrafficController' update operation succeeded", + "schema": { + "$ref": "#/definitions/TrafficController" + } + }, + "201": { + "description": "Resource 'TrafficController' create operation succeeded", + "schema": { + "$ref": "#/definitions/TrafficController" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "TrafficControllers_Update", + "tags": [ + "TrafficControllers" + ], + "description": "Update a TrafficController", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "trafficControllerName", + "in": "path", + "description": "traffic controller name for path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/TrafficControllerUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/TrafficController" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "operationId": "TrafficControllers_Delete", + "tags": [ + "TrafficControllers" + ], + "description": "Delete a TrafficController", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "trafficControllerName", + "in": "path", + "description": "traffic controller name for path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations": { + "get": { + "operationId": "Associations_ListByTrafficController", + "tags": [ + "Associations" + ], + "description": "List Association resources by TrafficController", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "trafficControllerName", + "in": "path", + "description": "traffic controller name for path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/AssociationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/associations/{associationName}": { + "get": { + "operationId": "Associations_Get", + "tags": [ + "Associations" + ], + "description": "Get a Association", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "trafficControllerName", + "in": "path", + "description": "traffic controller name for path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + }, + { + "name": "associationName", + "in": "path", + "description": "Name of Association", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Association" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "operationId": "Associations_CreateOrUpdate", + "tags": [ + "Associations" + ], + "description": "Create a Association", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "trafficControllerName", + "in": "path", + "description": "traffic controller name for path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + }, + { + "name": "associationName", + "in": "path", + "description": "Name of Association", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/Association" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Association' update operation succeeded", + "schema": { + "$ref": "#/definitions/Association" + } + }, + "201": { + "description": "Resource 'Association' create operation succeeded", + "schema": { + "$ref": "#/definitions/Association" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Associations_Update", + "tags": [ + "Associations" + ], + "description": "Update a Association", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "trafficControllerName", + "in": "path", + "description": "traffic controller name for path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + }, + { + "name": "associationName", + "in": "path", + "description": "Name of Association", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/AssociationUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Association" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "operationId": "Associations_Delete", + "tags": [ + "Associations" + ], + "description": "Delete a Association", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "trafficControllerName", + "in": "path", + "description": "traffic controller name for path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + }, + { + "name": "associationName", + "in": "path", + "description": "Name of Association", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends": { + "get": { + "operationId": "Frontends_ListByTrafficController", + "tags": [ + "Frontends" + ], + "description": "List Frontend resources by TrafficController", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "trafficControllerName", + "in": "path", + "description": "traffic controller name for path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/FrontendListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceNetworking/trafficControllers/{trafficControllerName}/frontends/{frontendName}": { + "get": { + "operationId": "Frontends_Get", + "tags": [ + "Frontends" + ], + "description": "Get a Frontend", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "trafficControllerName", + "in": "path", + "description": "traffic controller name for path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + }, + { + "name": "frontendName", + "in": "path", + "description": "Frontends", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Frontend" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "operationId": "Frontends_CreateOrUpdate", + "tags": [ + "Frontends" + ], + "description": "Create a Frontend", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "trafficControllerName", + "in": "path", + "description": "traffic controller name for path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + }, + { + "name": "frontendName", + "in": "path", + "description": "Frontends", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/Frontend" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Frontend' update operation succeeded", + "schema": { + "$ref": "#/definitions/Frontend" + } + }, + "201": { + "description": "Resource 'Frontend' create operation succeeded", + "schema": { + "$ref": "#/definitions/Frontend" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Frontends_Update", + "tags": [ + "Frontends" + ], + "description": "Update a Frontend", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "trafficControllerName", + "in": "path", + "description": "traffic controller name for path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + }, + { + "name": "frontendName", + "in": "path", + "description": "Frontends", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/FrontendUpdate" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Frontend" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "operationId": "Frontends_Delete", + "tags": [ + "Frontends" + ], + "description": "Delete a Frontend", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "trafficControllerName", + "in": "path", + "description": "traffic controller name for path", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + }, + { + "name": "frontendName", + "in": "path", + "description": "Frontends", + "required": true, + "type": "string", + "pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + } + }, + "definitions": { + "Association": { + "type": "object", + "description": "Association Subresource of Traffic Controller", + "properties": { + "properties": { + "$ref": "#/definitions/AssociationProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "AssociationListResult": { + "type": "object", + "description": "The response of a Association list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Association items on this page", + "items": { + "$ref": "#/definitions/Association" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "AssociationProperties": { + "type": "object", + "description": "Association Properties.", + "properties": { + "associationType": { + "$ref": "#/definitions/AssociationType", + "description": "Association Type" + }, + "subnet": { + "$ref": "#/definitions/AssociationSubnet", + "description": "Association Subnet" + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Provisioning State of Traffic Controller Association Resource", + "readOnly": true + } + }, + "required": [ + "associationType" + ] + }, + "AssociationSubnet": { + "type": "object", + "description": "Association Subnet.", + "properties": { + "id": { + "type": "string", + "description": "Association ID." + } + }, + "required": [ + "id" + ] + }, + "AssociationSubnetUpdate": { + "type": "object", + "description": "Association Subnet.", + "properties": { + "id": { + "type": "string", + "description": "Association ID." + } + } + }, + "AssociationType": { + "type": "string", + "enum": [ + "subnets" + ], + "x-ms-enum": { + "name": "AssociationType", + "modelAsString": true + } + }, + "AssociationUpdate": { + "type": "object", + "description": "The type used for update operations of the Association.", + "properties": { + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "$ref": "#/definitions/AssociationUpdateProperties", + "description": "The updatable properties of the Association." + } + } + }, + "AssociationUpdateProperties": { + "type": "object", + "description": "The updatable properties of the Association.", + "properties": { + "associationType": { + "$ref": "#/definitions/AssociationType", + "description": "Association Type" + }, + "subnet": { + "$ref": "#/definitions/AssociationSubnetUpdate", + "description": "Association Subnet" + } + } + }, + "Frontend": { + "type": "object", + "description": "Frontend Subresource of Traffic Controller.", + "properties": { + "properties": { + "$ref": "#/definitions/FrontendProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "FrontendListResult": { + "type": "object", + "description": "The response of a Frontend list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Frontend items on this page", + "items": { + "$ref": "#/definitions/Frontend" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "FrontendProperties": { + "type": "object", + "description": "Frontend Properties.", + "properties": { + "fqdn": { + "type": "string", + "description": "The Fully Qualified Domain Name of the DNS record associated to a Traffic Controller frontend.", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Provisioning State of Traffic Controller Frontend Resource", + "readOnly": true + } + } + }, + "FrontendUpdate": { + "type": "object", + "description": "The type used for update operations of the Frontend.", + "properties": { + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ProvisioningState": { + "type": "string", + "enum": [ + "Provisioning", + "Updating", + "Deleting", + "Accepted", + "Succeeded", + "Failed", + "Canceled" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + }, + "readOnly": true + }, + "ResourceId": { + "type": "object", + "description": "Resource ID definition used by parent to reference child resources.", + "properties": { + "id": { + "type": "string", + "description": "Resource ID of child resource." + } + }, + "required": [ + "id" + ] + }, + "TrafficController": { + "type": "object", + "description": "Concrete tracked resource types can be created by aliasing this type using a specific property type.", + "properties": { + "properties": { + "$ref": "#/definitions/TrafficControllerProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "TrafficControllerListResult": { + "type": "object", + "description": "The response of a TrafficController list operation.", + "properties": { + "value": { + "type": "array", + "description": "The TrafficController items on this page", + "items": { + "$ref": "#/definitions/TrafficController" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "TrafficControllerProperties": { + "type": "object", + "description": "Traffic Controller Properties.", + "properties": { + "configurationEndpoints": { + "type": "array", + "description": "Configuration Endpoints.", + "items": { + "type": "string" + }, + "readOnly": true + }, + "frontends": { + "type": "array", + "description": "Frontends References List", + "items": { + "$ref": "#/definitions/ResourceId" + }, + "readOnly": true + }, + "associations": { + "type": "array", + "description": "Associations References List", + "items": { + "$ref": "#/definitions/ResourceId" + }, + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + } + }, + "TrafficControllerUpdate": { + "type": "object", + "description": "The type used for update operations of the TrafficController.", + "properties": { + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "parameters": {} +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_ClearLegalHold.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_ClearLegalHold.json new file mode 100644 index 0000000000..c638ce3ac6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_ClearLegalHold.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "LegalHold": { + "tags": [ + "tag1", + "tag2", + "tag3" + ] + }, + "accountName": "sto7280", + "api-version": "2022-09-01", + "containerName": "container8723", + "monitor": "true", + "resourceGroupName": "res4303", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "hasLegalHold": false, + "tags": [] + } + } + }, + "operationId": "BlobContainers_ClearLegalHold", + "title": "ClearLegalHoldContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy.json new file mode 100644 index 0000000000..65599a78ab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "accountName": "sto7069", + "api-version": "2022-09-01", + "containerName": "container6397", + "immutabilityPolicyName": "default", + "monitor": "true", + "parameters": { + "properties": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 3 + } + }, + "resourceGroupName": "res1782", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d59f830cb130e5\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res1782/providers/Microsoft.Storage/storageAccounts/sto7069/blobServices/default/containers/container6397/immutabilityPolicies/default", + "properties": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 3, + "state": "Unlocked" + } + } + } + }, + "operationId": "BlobContainers_CreateOrUpdateImmutabilityPolicy", + "title": "CreateOrUpdateImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy_With_Allow_Protected_Append_Writes_All.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy_With_Allow_Protected_Append_Writes_All.json new file mode 100644 index 0000000000..a55b6a1ae9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy_With_Allow_Protected_Append_Writes_All.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "accountName": "sto7069", + "api-version": "2022-09-01", + "containerName": "container6397", + "immutabilityPolicyName": "default", + "monitor": "true", + "parameters": { + "properties": { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 3 + } + }, + "resourceGroupName": "res1782", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d59f830cb130e5\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res1782/providers/Microsoft.Storage/storageAccounts/sto7069/blobServices/default/containers/container6397/immutabilityPolicies/default", + "properties": { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 3, + "state": "Unlocked" + } + } + } + }, + "operationId": "BlobContainers_CreateOrUpdateImmutabilityPolicy", + "title": "CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Create_Put_Container_With_Default_Encryption_Scope.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Create_Put_Container_With_Default_Encryption_Scope.json new file mode 100644 index 0000000000..a90643cf61 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Create_Put_Container_With_Default_Encryption_Scope.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "blobContainer": { + "properties": { + "defaultEncryptionScope": "encryptionscope185", + "denyEncryptionScopeOverride": true + } + }, + "containerName": "container6185", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "properties": { + "defaultEncryptionScope": "encryptionscope185", + "denyEncryptionScopeOverride": true + } + } + }, + "201": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "properties": { + "defaultEncryptionScope": "encryptionscope185", + "denyEncryptionScopeOverride": true + } + } + } + }, + "operationId": "BlobContainers_Create", + "title": "PutContainerWithDefaultEncryptionScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Create_Put_Container_With_Object_Level_Worm.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Create_Put_Container_With_Object_Level_Worm.json new file mode 100644 index 0000000000..d59b2625c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Create_Put_Container_With_Object_Level_Worm.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "blobContainer": { + "properties": { + "immutableStorageWithVersioning": { + "enabled": true + } + } + }, + "containerName": "container6185", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "properties": { + "immutableStorageWithVersioning": { + "enabled": true + } + } + } + }, + "201": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "properties": { + "immutableStorageWithVersioning": { + "enabled": true + } + } + } + } + }, + "operationId": "BlobContainers_Create", + "title": "PutContainerWithObjectLevelWorm" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Create_Put_Containers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Create_Put_Containers.json new file mode 100644 index 0000000000..d2610bb08d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Create_Put_Containers.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "blobContainer": {}, + "containerName": "container6185", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185" + } + }, + "201": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185" + } + } + }, + "operationId": "BlobContainers_Create", + "title": "PutContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Delete.json new file mode 100644 index 0000000000..0606f341a8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto4506", + "api-version": "2022-09-01", + "containerName": "container9689", + "monitor": "true", + "resourceGroupName": "res4079", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "BlobContainers_Delete", + "title": "DeleteContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_DeleteImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_DeleteImmutabilityPolicy.json new file mode 100644 index 0000000000..d19ff5f137 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_DeleteImmutabilityPolicy.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "If-Match": "\"8d59f81a7fa7be0\"", + "accountName": "sto9621", + "api-version": "2022-09-01", + "containerName": "container4910", + "immutabilityPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res1581", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d59f81a87b40c0\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res1581/providers/Microsoft.Storage/storageAccounts/sto9621/blobServices/default/containers/container4910/immutabilityPolicies/default", + "properties": { + "immutabilityPeriodSinceCreationInDays": 0, + "state": "Unlocked" + } + } + } + }, + "operationId": "BlobContainers_DeleteImmutabilityPolicy", + "title": "DeleteImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_ExtendImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_ExtendImmutabilityPolicy.json new file mode 100644 index 0000000000..f19de1db20 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_ExtendImmutabilityPolicy.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "If-Match": "\"8d59f830d0c3bf9\"", + "accountName": "sto232", + "api-version": "2022-09-01", + "containerName": "container5023", + "monitor": "true", + "parameters": { + "properties": { + "immutabilityPeriodSinceCreationInDays": 100 + } + }, + "resourceGroupName": "res6238", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d57a8b2ff50332\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6238/providers/Microsoft.Storage/storageAccounts/sto232/blobServices/default/containers/container5023/immutabilityPolicies/default", + "properties": { + "immutabilityPeriodSinceCreationInDays": 100, + "state": "Locked" + } + } + } + }, + "operationId": "BlobContainers_ExtendImmutabilityPolicy", + "title": "ExtendImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_GetImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_GetImmutabilityPolicy.json new file mode 100644 index 0000000000..25315997db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_GetImmutabilityPolicy.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "accountName": "sto9177", + "api-version": "2022-09-01", + "containerName": "container3489", + "immutabilityPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res5221", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d59f828e64b75c\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res5221/providers/Microsoft.Storage/storageAccounts/sto9177/blobServices/default/containers/container3489/immutabilityPolicies/default", + "properties": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 5, + "state": "Unlocked" + } + } + } + }, + "operationId": "BlobContainers_GetImmutabilityPolicy", + "title": "GetImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Get_Get_Blob_Containers_Get_With_Allow_Protected_Append_Writes_All.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Get_Get_Blob_Containers_Get_With_Allow_Protected_Append_Writes_All.json new file mode 100644 index 0000000000..5536afa47e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Get_Get_Blob_Containers_Get_With_Allow_Protected_Append_Writes_All.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "accountName": "sto6217", + "api-version": "2022-09-01", + "containerName": "container1634", + "monitor": "true", + "resourceGroupName": "res9871", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container1634", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D592D74CC20EBA\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634", + "properties": { + "hasImmutabilityPolicy": true, + "hasLegalHold": true, + "immutabilityPolicy": { + "etag": "\"8d592d74cb3011a\"", + "properties": { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 100, + "state": "Locked" + }, + "updateHistory": [ + { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 3, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:11.431403Z", + "update": "put" + }, + { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 3, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:13.0907641Z", + "update": "lock" + }, + { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 100, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:14.7097716Z", + "update": "extend" + } + ] + }, + "lastModifiedTime": "2018-03-26T05:06:14Z", + "leaseState": "Available", + "leaseStatus": "Unlocked", + "legalHold": { + "hasLegalHold": true, + "protectedAppendWritesHistory": { + "allowProtectedAppendWritesAll": true, + "timestamp": "2022-09-01T01:58:44.5044483Z" + }, + "tags": [ + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag1", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + }, + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag2", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + }, + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag3", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + } + ] + }, + "publicAccess": "None" + } + } + } + }, + "operationId": "BlobContainers_Get", + "title": "GetBlobContainersGetWithAllowProtectedAppendWritesAll" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Get_Get_Containers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Get_Get_Containers.json new file mode 100644 index 0000000000..11f4fda9ba --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Get_Get_Containers.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "accountName": "sto6217", + "api-version": "2022-09-01", + "containerName": "container1634", + "monitor": "true", + "resourceGroupName": "res9871", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container1634", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D592D74CC20EBA\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634", + "properties": { + "hasImmutabilityPolicy": true, + "hasLegalHold": true, + "immutabilityPolicy": { + "etag": "\"8d592d74cb3011a\"", + "properties": { + "immutabilityPeriodSinceCreationInDays": 100, + "state": "Locked" + }, + "updateHistory": [ + { + "immutabilityPeriodSinceCreationInDays": 3, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:11.431403Z", + "update": "put" + }, + { + "immutabilityPeriodSinceCreationInDays": 3, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:13.0907641Z", + "update": "lock" + }, + { + "immutabilityPeriodSinceCreationInDays": 100, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:14.7097716Z", + "update": "extend" + } + ] + }, + "lastModifiedTime": "2018-03-26T05:06:14Z", + "leaseState": "Available", + "leaseStatus": "Unlocked", + "legalHold": { + "hasLegalHold": true, + "tags": [ + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag1", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + }, + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag2", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + }, + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag3", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + } + ] + }, + "publicAccess": "None" + } + } + } + }, + "operationId": "BlobContainers_Get", + "title": "GetContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Lease_Acquire_A_Lease_On_A_Container.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Lease_Acquire_A_Lease_On_A_Container.json new file mode 100644 index 0000000000..3106c569b5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Lease_Acquire_A_Lease_On_A_Container.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "containerName": "container6185", + "monitor": "true", + "parameters": { + "action": "Acquire", + "breakPeriod": null, + "leaseDuration": -1, + "leaseId": null, + "proposedLeaseId": null + }, + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d" + } + } + }, + "operationId": "BlobContainers_Lease", + "title": "Acquire a lease on a container" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Lease_Break_A_Lease_On_A_Container.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Lease_Break_A_Lease_On_A_Container.json new file mode 100644 index 0000000000..a0c851249b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Lease_Break_A_Lease_On_A_Container.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "containerName": "container6185", + "monitor": "true", + "parameters": { + "action": "Break", + "breakPeriod": null, + "leaseDuration": null, + "leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d", + "proposedLeaseId": null + }, + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "leaseTimeSeconds": "0" + } + } + }, + "operationId": "BlobContainers_Lease", + "title": "Break a lease on a container" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_List_List_Containers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_List_List_Containers.json new file mode 100644 index 0000000000..63b8c941ee --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_List_List_Containers.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers?api-version=2022-09-01&$maxpagesize=2&$skipToken=/sto1590/container5103", + "value": [ + { + "name": "container1644", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D589847D51C7DE\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container1644", + "properties": { + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "lastModifiedTime": "2018-03-14T08:20:47Z", + "leaseState": "Available", + "leaseStatus": "Unlocked", + "publicAccess": "Container" + } + }, + { + "name": "container4052", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container4052", + "properties": { + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "lastModifiedTime": "2018-03-14T08:20:47Z", + "leaseState": "Available", + "leaseStatus": "Unlocked", + "publicAccess": "None" + } + } + ] + } + } + }, + "operationId": "BlobContainers_List", + "title": "ListContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_List_List_Deleted_Containers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_List_List_Deleted_Containers.json new file mode 100644 index 0000000000..b0a7775fb5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_List_List_Deleted_Containers.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "$include": "deleted", + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "container1644", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D589847D51C7DE\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container1644", + "properties": { + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "lastModifiedTime": "2018-03-14T08:20:47Z", + "leaseState": "Available", + "leaseStatus": "Unlocked", + "publicAccess": "Container" + } + }, + { + "name": "container4052", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container4052", + "properties": { + "deleted": true, + "deletedTime": "2019-12-14T08:20:47Z", + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "lastModifiedTime": "2018-03-14T08:20:47Z", + "leaseState": "Expired", + "leaseStatus": "Unlocked", + "publicAccess": "None", + "remainingRetentionDays": 30, + "version": "1234567890" + } + } + ] + } + } + }, + "operationId": "BlobContainers_List", + "title": "ListDeletedContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_LockImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_LockImmutabilityPolicy.json new file mode 100644 index 0000000000..93507534cf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_LockImmutabilityPolicy.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "If-Match": "\"8d59f825b721dd3\"", + "accountName": "sto5009", + "api-version": "2022-09-01", + "containerName": "container1631", + "monitor": "true", + "resourceGroupName": "res2702", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d57a8a5edb084a\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res2702/providers/Microsoft.Storage/storageAccounts/sto5009/blobServices/default/containers/container1631/immutabilityPolicies/default", + "properties": { + "immutabilityPeriodSinceCreationInDays": 3, + "state": "Locked" + } + } + } + }, + "operationId": "BlobContainers_LockImmutabilityPolicy", + "title": "LockImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_ObjectLevelWorm.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_ObjectLevelWorm.json new file mode 100644 index 0000000000..39f5617c04 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_ObjectLevelWorm.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "accountName": "sto7069", + "api-version": "2022-09-01", + "containerName": "container6397", + "immutabilityPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res1782", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://endpoint:port/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/{location}/asyncoperations/{operationid}?monitor=true&api-version=2022-09-01" + } + } + }, + "operationId": "BlobContainers_ObjectLevelWorm", + "title": "VersionLevelWormContainerMigration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_SetLegalHold_Set_Legal_Hold_Containers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_SetLegalHold_Set_Legal_Hold_Containers.json new file mode 100644 index 0000000000..384e5ab194 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_SetLegalHold_Set_Legal_Hold_Containers.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "LegalHold": { + "tags": [ + "tag1", + "tag2", + "tag3" + ] + }, + "accountName": "sto7280", + "api-version": "2022-09-01", + "containerName": "container8723", + "monitor": "true", + "resourceGroupName": "res4303", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "hasLegalHold": true, + "tags": [ + "tag1", + "tag2", + "tag3" + ] + } + } + }, + "operationId": "BlobContainers_SetLegalHold", + "title": "SetLegalHoldContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_SetLegalHold_Set_Legal_Hold_Containers_With_Allow_Protected_Append_Writes_All.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_SetLegalHold_Set_Legal_Hold_Containers_With_Allow_Protected_Append_Writes_All.json new file mode 100644 index 0000000000..0c3cebc312 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_SetLegalHold_Set_Legal_Hold_Containers_With_Allow_Protected_Append_Writes_All.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "LegalHold": { + "allowProtectedAppendWritesAll": true, + "tags": [ + "tag1", + "tag2", + "tag3" + ] + }, + "accountName": "sto7280", + "api-version": "2022-09-01", + "containerName": "container8723", + "monitor": "true", + "resourceGroupName": "res4303", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "allowProtectedAppendWritesAll": true, + "hasLegalHold": true, + "tags": [ + "tag1", + "tag2", + "tag3" + ] + } + } + }, + "operationId": "BlobContainers_SetLegalHold", + "title": "SetLegalHoldContainersWithAllowProtectedAppendWritesAll" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Update.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Update.json new file mode 100644 index 0000000000..1aa042f28e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobContainers_Update.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "blobContainer": { + "properties": { + "metadata": { + "metadata": "true" + }, + "publicAccess": "Container" + } + }, + "containerName": "container6185", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "properties": { + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "metadata": { + "metadata": "true" + }, + "publicAccess": "Container" + } + } + } + }, + "operationId": "BlobContainers_Update", + "title": "UpdateContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy.json new file mode 100644 index 0000000000..b3f356898c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy.json @@ -0,0 +1,164 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "blobInventoryPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Metadata" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultInventoryPolicy", + "type": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default", + "properties": { + "lastModifiedTime": "2020-10-05T02:53:39.0932539Z", + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Metadata" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "BlobInventoryPolicies_CreateOrUpdate", + "title": "StorageAccountSetBlobInventoryPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Hns_Account.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Hns_Account.json new file mode 100644 index 0000000000..1809e23c2e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Hns_Account.json @@ -0,0 +1,199 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "blobInventoryPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeDeleted": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "ContentType", + "ContentEncoding", + "ContentLanguage", + "ContentCRC64", + "CacheControl", + "Metadata", + "DeletionId", + "Deleted", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold", + "Etag", + "DefaultEncryptionScope", + "DenyEncryptionScopeOverride", + "ImmutableStorageWithVersioningEnabled", + "Deleted", + "Version", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultInventoryPolicy", + "type": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default", + "properties": { + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeDeleted": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "ContentType", + "ContentEncoding", + "ContentLanguage", + "ContentCRC64", + "CacheControl", + "Metadata", + "DeletionId", + "Deleted", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold", + "Etag", + "DefaultEncryptionScope", + "DenyEncryptionScopeOverride", + "ImmutableStorageWithVersioningEnabled", + "Deleted", + "Version", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "BlobInventoryPolicies_CreateOrUpdate", + "title": "StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Non_Hns_Account.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Non_Hns_Account.json new file mode 100644 index 0000000000..ea3e4c1d20 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Non_Hns_Account.json @@ -0,0 +1,197 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "blobInventoryPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeDeleted": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Tags", + "ContentType", + "ContentEncoding", + "ContentLanguage", + "ContentCRC64", + "CacheControl", + "Metadata", + "Deleted", + "RemainingRetentionDays" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold", + "Etag", + "DefaultEncryptionScope", + "DenyEncryptionScopeOverride", + "ImmutableStorageWithVersioningEnabled", + "Deleted", + "Version", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultInventoryPolicy", + "type": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default", + "properties": { + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeDeleted": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Tags", + "ContentType", + "ContentEncoding", + "ContentLanguage", + "ContentCRC64", + "CacheControl", + "Metadata", + "Deleted", + "RemainingRetentionDays" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold", + "Etag", + "DefaultEncryptionScope", + "DenyEncryptionScopeOverride", + "ImmutableStorageWithVersioningEnabled", + "Deleted", + "Version", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "BlobInventoryPolicies_CreateOrUpdate", + "title": "StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_Delete.json new file mode 100644 index 0000000000..74b346b837 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "blobInventoryPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "BlobInventoryPolicies_Delete", + "title": "StorageAccountDeleteBlobInventoryPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_Get.json new file mode 100644 index 0000000000..bfce403b0a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_Get.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "blobInventoryPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultInventoryPolicy", + "type": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default", + "properties": { + "lastModifiedTime": "2020-10-05T02:53:39.0932539Z", + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "includeBlobVersions": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Metadata" + ] + }, + "destination": "container1", + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "BlobInventoryPolicies_Get", + "title": "StorageAccountGetBlobInventoryPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_List.json new file mode 100644 index 0000000000..f83ea442d0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobInventoryPolicies_List.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "DefaultInventoryPolicy", + "type": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default", + "properties": { + "lastModifiedTime": "2020-10-05T02:53:39.0932539Z", + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "includeBlobVersions": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Metadata" + ] + }, + "destination": "container1", + "enabled": true + } + ] + } + } + } + ] + } + } + }, + "operationId": "BlobInventoryPolicies_List", + "title": "StorageAccountGetBlobInventoryPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_GetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_GetServiceProperties.json new file mode 100644 index 0000000000..1bdaf78877 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_GetServiceProperties.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "BlobServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "properties": { + "changeFeed": { + "enabled": true, + "retentionInDays": 7 + }, + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x -ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + }, + "defaultServiceVersion": "2017-07-29", + "deleteRetentionPolicy": { + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + } + }, + "operationId": "BlobServices_GetServiceProperties", + "title": "GetBlobServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_List.json new file mode 100644 index 0000000000..cb61fc99a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_List.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "properties": { + "changeFeed": { + "enabled": true, + "retentionInDays": 7 + }, + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x -ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + }, + "defaultServiceVersion": "2017-07-29", + "deleteRetentionPolicy": { + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + ] + } + } + }, + "operationId": "BlobServices_List", + "title": "ListBlobServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_SetServiceProperties_Blob_Services_Put_Allow_Permanent_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_SetServiceProperties_Blob_Services_Put_Allow_Permanent_Delete.json new file mode 100644 index 0000000000..2ee78d0f22 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_SetServiceProperties_Blob_Services_Put_Allow_Permanent_Delete.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "BlobServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "deleteRetentionPolicy": { + "allowPermanentDelete": true, + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "properties": { + "deleteRetentionPolicy": { + "allowPermanentDelete": true, + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + } + } + } + }, + "operationId": "BlobServices_SetServiceProperties", + "title": "BlobServicesPutAllowPermanentDelete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_SetServiceProperties_Blob_Services_Put_Last_Access_Time_Based_Tracking.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_SetServiceProperties_Blob_Services_Put_Last_Access_Time_Based_Tracking.json new file mode 100644 index 0000000000..7adcadf650 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_SetServiceProperties_Blob_Services_Put_Last_Access_Time_Based_Tracking.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "BlobServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "lastAccessTimeTrackingPolicy": { + "name": "AccessTimeTracking", + "blobType": [ + "blockBlob" + ], + "enable": true, + "trackingGranularityInDays": 1 + } + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "properties": { + "lastAccessTimeTrackingPolicy": { + "name": "AccessTimeTracking", + "blobType": [ + "blockBlob" + ], + "enable": true, + "trackingGranularityInDays": 1 + } + } + } + } + }, + "operationId": "BlobServices_SetServiceProperties", + "title": "BlobServicesPutLastAccessTimeBasedTracking" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_SetServiceProperties_Put_Blob_Services.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_SetServiceProperties_Put_Blob_Services.json new file mode 100644 index 0000000000..719ad7be35 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/BlobServices_SetServiceProperties_Put_Blob_Services.json @@ -0,0 +1,173 @@ +{ + "parameters": { + "BlobServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "changeFeed": { + "enabled": true, + "retentionInDays": 7 + }, + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x -ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + }, + "defaultServiceVersion": "2017-07-29", + "deleteRetentionPolicy": { + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "properties": { + "changeFeed": { + "enabled": true, + "retentionInDays": 7 + }, + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x -ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + }, + "defaultServiceVersion": "2017-07-29", + "deleteRetentionPolicy": { + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + } + }, + "operationId": "BlobServices_SetServiceProperties", + "title": "PutBlobServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/DeletedAccounts_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/DeletedAccounts_Get.json new file mode 100644 index 0000000000..1ad68565be --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/DeletedAccounts_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2022-09-01", + "deletedAccountName": "sto1125", + "location": "eastus", + "monitor": "true", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto1125", + "type": "Microsoft.Storage/deletedAccounts", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1125", + "properties": { + "creationTime": "2020-08-17T03:35:37.4588848Z", + "deletionTime": "2020-08-17T04:41:37.3442475Z", + "location": "eastus", + "restoreReference": "sto1125|2020-08-17T03:35:37.4588848Z", + "storageAccountResourceId": "/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1125" + } + } + } + }, + "operationId": "DeletedAccounts_Get", + "title": "DeletedAccountGet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/DeletedAccounts_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/DeletedAccounts_List.json new file mode 100644 index 0000000000..6093d65130 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/DeletedAccounts_List.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2022-09-01", + "monitor": "true", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "sto1125", + "type": "Microsoft.Storage/deletedAccounts", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1125", + "properties": { + "creationTime": "2020-08-17T03:35:37.4588848Z", + "deletionTime": "2020-08-17T04:41:37.3442475Z", + "location": "eastus", + "restoreReference": "sto1125|2020-08-17T03:35:37.4588848Z", + "storageAccountResourceId": "/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1125" + } + }, + { + "name": "sto1126", + "type": "Microsoft.Storage/deletedAccounts", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1126", + "properties": { + "creationTime": "2020-08-19T15:10:21.5902165Z", + "deletionTime": "2020-08-20T06:11:55.1957302Z", + "location": "eastus", + "restoreReference": "sto1126|2020-08-17T03:35:37.4588848Z", + "storageAccountResourceId": "/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1126" + } + } + ] + } + } + }, + "operationId": "DeletedAccounts_List", + "title": "DeletedAccountList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Get.json new file mode 100644 index 0000000000..fe394c421f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "accountName": "{storage-account-name}", + "api-version": "2022-09-01", + "encryptionScopeName": "{encryption-scope-name}", + "monitor": "true", + "resourceGroupName": "resource-group-name", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{encyrption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "source": "Microsoft.Storage", + "state": "Enabled" + } + } + } + }, + "operationId": "EncryptionScopes_Get", + "title": "StorageAccountGetEncryptionScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_List.json new file mode 100644 index 0000000000..5565cb3abf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_List.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "accountName": "{storage-account-name}", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "resource-group-name", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "name": "scope-1", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/scope-1", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "source": "Microsoft.Storage", + "state": "Enabled" + } + }, + { + "name": "scope-2", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/scope-2", + "properties": { + "creationTime": "2018-10-16T04:32:14.3355306Z", + "keyVaultProperties": { + "keyUri": "https://testvault.vault.core.windows.net/keys/key1/863425f1358359c" + }, + "lastModifiedTime": "2018-10-17T06:23:14.4513306Z", + "source": "Microsoft.KeyVault", + "state": "Enabled" + } + } + ] + } + } + }, + "operationId": "EncryptionScopes_List", + "title": "StorageAccountEncryptionScopeList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Patch.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Patch.json new file mode 100644 index 0000000000..7fd74727ed --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Patch.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "accountName": "{storage-account-name}", + "api-version": "2022-09-01", + "encryptionScope": { + "properties": { + "keyVaultProperties": { + "keyUri": "https://testvault.vault.core.windows.net/keys/key1/863425f1358359c" + }, + "source": "Microsoft.KeyVault" + } + }, + "encryptionScopeName": "{encryption-scope-name}", + "monitor": "true", + "resourceGroupName": "resource-group-name", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{encryption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "keyVaultProperties": { + "currentVersionedKeyIdentifier": "https://testvault.vault.core.windows.net/keys/key1/863425f1358359c", + "keyUri": "https://testvault.vault.core.windows.net/keys/key1/863425f1358359c", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "lastModifiedTime": "2018-10-17T06:23:14.4513306Z", + "source": "Microsoft.KeyVault", + "state": "Enabled" + } + } + } + }, + "operationId": "EncryptionScopes_Patch", + "title": "StorageAccountPatchEncryptionScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope.json new file mode 100644 index 0000000000..c874c7e8e4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "accountName": "{storage-account-name}", + "api-version": "2022-09-01", + "encryptionScope": {}, + "encryptionScopeName": "{encryption-scope-name}", + "monitor": "true", + "resourceGroupName": "resource-group-name", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{encryption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "source": "Microsoft.Storage", + "state": "Enabled" + } + } + }, + "201": { + "body": { + "name": "{encryption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "source": "Microsoft.Storage", + "state": "Enabled" + } + } + } + }, + "operationId": "EncryptionScopes_Put", + "title": "StorageAccountPutEncryptionScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope_With_Infrastructure_Encryption.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope_With_Infrastructure_Encryption.json new file mode 100644 index 0000000000..d116b0fae0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope_With_Infrastructure_Encryption.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "accountName": "{storage-account-name}", + "api-version": "2022-09-01", + "encryptionScope": { + "properties": { + "requireInfrastructureEncryption": true + } + }, + "encryptionScopeName": "{encryption-scope-name}", + "monitor": "true", + "resourceGroupName": "resource-group-name", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{encryption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "requireInfrastructureEncryption": true, + "source": "Microsoft.Storage", + "state": "Enabled" + } + } + }, + "201": { + "body": { + "name": "{encryption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "requireInfrastructureEncryption": true, + "source": "Microsoft.Storage", + "state": "Enabled" + } + } + } + }, + "operationId": "EncryptionScopes_Put", + "title": "StorageAccountPutEncryptionScopeWithInfrastructureEncryption" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_GetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_GetServiceProperties.json new file mode 100644 index 0000000000..7a6ee80ee6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_GetServiceProperties.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "FileServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + } + }, + "operationId": "FileServices_GetServiceProperties", + "title": "GetFileServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_List.json new file mode 100644 index 0000000000..b04a8e483c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_List.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + ] + } + } + }, + "operationId": "FileServices_List", + "title": "ListFileServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_SetServiceProperties_Put_File_Services.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_SetServiceProperties_Put_File_Services.json new file mode 100644 index 0000000000..a2e6a26c4e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_SetServiceProperties_Put_File_Services.json @@ -0,0 +1,153 @@ +{ + "parameters": { + "FileServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + } + }, + "operationId": "FileServices_SetServiceProperties", + "title": "PutFileServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_SetServiceProperties_Put_File_Services_Enable_Secure_Smb_Features.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_SetServiceProperties_Put_File_Services_Enable_Secure_Smb_Features.json new file mode 100644 index 0000000000..c7325add77 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_SetServiceProperties_Put_File_Services_Enable_Secure_Smb_Features.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "FileServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "protocolSettings": { + "smb": { + "authenticationMethods": "NTLMv2;Kerberos", + "channelEncryption": "AES-128-CCM;AES-128-GCM;AES-256-GCM", + "kerberosTicketEncryption": "RC4-HMAC;AES-256", + "versions": "SMB2.1;SMB3.0;SMB3.1.1" + } + } + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "properties": { + "protocolSettings": { + "smb": { + "authenticationMethods": "NTLMv2;Kerberos", + "channelEncryption": "AES-128-CCM;AES-128-GCM;AES-256-GCM", + "kerberosTicketEncryption": "RC4-HMAC;AES-256", + "versions": "SMB2.1;SMB3.0;SMB3.1.1" + } + } + }, + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + } + } + } + }, + "operationId": "FileServices_SetServiceProperties", + "title": "PutFileServices_EnableSecureSmbFeatures" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_SetServiceProperties_Put_File_Services_Enable_Smb_Multichannel.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_SetServiceProperties_Put_File_Services_Enable_Smb_Multichannel.json new file mode 100644 index 0000000000..0476733999 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileServices_SetServiceProperties_Put_File_Services_Enable_Smb_Multichannel.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "FileServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "protocolSettings": { + "smb": { + "multichannel": { + "enabled": true + } + } + } + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "properties": { + "protocolSettings": { + "smb": { + "multichannel": { + "enabled": true + } + } + } + }, + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + } + } + } + }, + "operationId": "FileServices_SetServiceProperties", + "title": "PutFileServices_EnableSMBMultichannel" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Create_Create_Nfs_Shares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Create_Create_Nfs_Shares.json new file mode 100644 index 0000000000..b42600491d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Create_Create_Nfs_Shares.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "accountName": "sto666", + "api-version": "2022-09-01", + "fileShare": { + "properties": { + "enabledProtocols": "NFS" + } + }, + "monitor": "true", + "resourceGroupName": "res346", + "shareName": "share1235", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share1235", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235", + "properties": { + "enabledProtocols": "NFS" + } + } + }, + "201": { + "body": { + "name": "share1235", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235", + "properties": { + "enabledProtocols": "NFS" + } + } + } + }, + "operationId": "FileShares_Create", + "title": "Create NFS Shares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Create_Put_Shares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Create_Put_Shares.json new file mode 100644 index 0000000000..bbafca0a7f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Create_Put_Shares.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "fileShare": {}, + "monitor": "true", + "resourceGroupName": "res3376", + "shareName": "share6185", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share6185", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185" + } + }, + "201": { + "body": { + "name": "share6185", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185" + } + } + }, + "operationId": "FileShares_Create", + "title": "PutShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Create_Put_Shares_With_Access_Tier.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Create_Put_Shares_With_Access_Tier.json new file mode 100644 index 0000000000..53e6183cec --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Create_Put_Shares_With_Access_Tier.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "accountName": "sto666", + "api-version": "2022-09-01", + "fileShare": { + "properties": { + "accessTier": "Hot" + } + }, + "monitor": "true", + "resourceGroupName": "res346", + "shareName": "share1235", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share1235", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235", + "properties": { + "accessTier": "Hot" + } + } + }, + "201": { + "body": { + "name": "share1235", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235", + "properties": { + "accessTier": "Hot" + } + } + } + }, + "operationId": "FileShares_Create", + "title": "PutShares with Access Tier" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Delete.json new file mode 100644 index 0000000000..d7a6ea2e0d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto4506", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4079", + "shareName": "share9689", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "FileShares_Delete", + "title": "DeleteShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Get_Get_Share_Stats.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Get_Get_Share_Stats.json new file mode 100644 index 0000000000..e9e9e9779d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Get_Get_Share_Stats.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "$expand": "stats", + "accountName": "sto6217", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9871", + "shareName": "share1634", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share1634", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D592D74CC20EBA\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634", + "properties": { + "lastModifiedTime": "2019-05-26T05:06:14Z", + "shareQuota": 1024, + "shareUsageBytes": 652945 + } + } + } + }, + "operationId": "FileShares_Get", + "title": "GetShareStats" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Get_Get_Shares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Get_Get_Shares.json new file mode 100644 index 0000000000..ff7b406b63 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Get_Get_Shares.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "sto6217", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9871", + "shareName": "share1634", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share1634", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D592D74CC20EBA\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634", + "properties": { + "lastModifiedTime": "2019-05-26T05:06:14Z", + "shareQuota": 1024 + } + } + } + }, + "operationId": "FileShares_Get", + "title": "GetShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Lease_Acquire_A_Lease_On_A_Share.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Lease_Acquire_A_Lease_On_A_Share.json new file mode 100644 index 0000000000..c35eae0f42 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Lease_Acquire_A_Lease_On_A_Share.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "action": "Acquire", + "breakPeriod": null, + "leaseDuration": -1, + "leaseId": null, + "proposedLeaseId": null + }, + "resourceGroupName": "res3376", + "shareName": "share124", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d" + } + } + }, + "operationId": "FileShares_Lease", + "title": "Acquire a lease on a share" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Lease_Break_A_Lease_On_A_Share.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Lease_Break_A_Lease_On_A_Share.json new file mode 100644 index 0000000000..4de3e7cb2c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Lease_Break_A_Lease_On_A_Share.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "action": "Break", + "breakPeriod": null, + "leaseDuration": null, + "leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d", + "proposedLeaseId": null + }, + "resourceGroupName": "res3376", + "shareName": "share12", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "leaseTimeSeconds": "0" + } + } + }, + "operationId": "FileShares_Lease", + "title": "Break a lease on a share" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_List_List_Deleted_Shares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_List_List_Deleted_Shares.json new file mode 100644 index 0000000000..6a18e10c1a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_List_List_Deleted_Shares.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "$expand": "deleted", + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "share1644", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847D51C7DE\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644_1234567890", + "properties": { + "deleted": true, + "deletedTime": "2019-12-14T08:20:47Z", + "lastModifiedTime": "2019-05-14T08:20:47Z", + "remainingRetentionDays": 30, + "shareQuota": 1024, + "version": "1234567890" + } + }, + { + "name": "share4052", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052", + "properties": { + "lastModifiedTime": "2019-05-14T08:20:47Z", + "shareQuota": 1024 + } + } + ] + } + } + }, + "operationId": "FileShares_List", + "title": "ListDeletedShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_List_List_Share_Snapshots.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_List_List_Share_Snapshots.json new file mode 100644 index 0000000000..2dfaa824a3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_List_List_Share_Snapshots.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "$expand": "snapshots", + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "share4052", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052", + "properties": { + "lastModifiedTime": "2020-10-26T05:47:05.0000000Z", + "shareQuota": 1024 + } + }, + { + "name": "share4052", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052", + "properties": { + "lastModifiedTime": "2020-10-26T05:47:05.0000000Z", + "shareQuota": 1024, + "snapshotTime": "2020-10-26T05:48:07.0000000Z" + } + } + ] + } + } + }, + "operationId": "FileShares_List", + "title": "ListShareSnapshots" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_List_List_Shares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_List_List_Shares.json new file mode 100644 index 0000000000..13f1f9ffe7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_List_List_Shares.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares?api-version=2022-09-01&$maxpagesize=2&$skipToken=/sto1590/share5103", + "value": [ + { + "name": "share1644", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847D51C7DE\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644", + "properties": { + "lastModifiedTime": "2019-05-14T08:20:47Z", + "shareQuota": 1024 + } + }, + { + "name": "share4052", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052", + "properties": { + "lastModifiedTime": "2019-05-14T08:20:47Z", + "shareQuota": 1024 + } + } + ] + } + } + }, + "operationId": "FileShares_List", + "title": "ListShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Restore.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Restore.json new file mode 100644 index 0000000000..ed73b3b7d9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Restore.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "deletedShare": { + "deletedShareName": "share1249", + "deletedShareVersion": "1234567890" + }, + "monitor": "true", + "resourceGroupName": "res3376", + "shareName": "share1249", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {} + }, + "operationId": "FileShares_Restore", + "title": "RestoreShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Update_Update_Share_Acls.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Update_Update_Share_Acls.json new file mode 100644 index 0000000000..346853407b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Update_Update_Share_Acls.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "fileShare": { + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2021-05-01T08:49:37.0000000Z", + "permission": "rwd", + "startTime": "2021-04-01T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + } + ] + } + }, + "monitor": "true", + "resourceGroupName": "res3376", + "shareName": "share6185", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share6185", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185", + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2021-05-01T08:49:37.0000000Z", + "permission": "rwd", + "startTime": "2021-04-01T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + } + ] + } + } + } + }, + "operationId": "FileShares_Update", + "title": "UpdateShareAcls" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Update_Update_Shares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Update_Update_Shares.json new file mode 100644 index 0000000000..534fe3b90d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/FileShares_Update_Update_Shares.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "fileShare": { + "properties": { + "metadata": { + "type": "image" + } + } + }, + "monitor": "true", + "resourceGroupName": "res3376", + "shareName": "share6185", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share6185", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185", + "properties": { + "metadata": { + "type": "image" + } + } + } + } + }, + "operationId": "FileShares_Update", + "title": "UpdateShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_CreateOrUpdate_Create_Local_User.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_CreateOrUpdate_Create_Local_User.json new file mode 100644 index 0000000000..7ab6b80679 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_CreateOrUpdate_Create_Local_User.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "properties": { + "properties": { + "hasSshPassword": true, + "homeDirectory": "homedirectory", + "permissionScopes": [ + { + "permissions": "rwd", + "resourceName": "share1", + "service": "file" + }, + { + "permissions": "rw", + "resourceName": "share2", + "service": "file" + } + ], + "sshAuthorizedKeys": [ + { + "description": "key name", + "key": "ssh-rsa keykeykeykeykey=" + } + ] + } + }, + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": { + "body": { + "name": "user1", + "type": "Microsoft.Storage/storageAccounts/localUsers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1", + "properties": { + "homeDirectory": "homedirectory", + "permissionScopes": [ + { + "permissions": "rwd", + "resourceName": "share1", + "service": "file" + }, + { + "permissions": "rw", + "resourceName": "share2", + "service": "file" + } + ], + "sid": "S-1-2-0-125132-153423-36235-1000", + "sshAuthorizedKeys": [ + { + "description": "key name", + "key": "ssh-rsa keykeykeykeykey=" + } + ] + } + } + } + }, + "operationId": "LocalUsers_CreateOrUpdate", + "title": "CreateLocalUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_CreateOrUpdate_Update_Local_User.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_CreateOrUpdate_Update_Local_User.json new file mode 100644 index 0000000000..1ebeb4da39 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_CreateOrUpdate_Update_Local_User.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "properties": { + "properties": { + "hasSharedKey": false, + "hasSshKey": false, + "hasSshPassword": false, + "homeDirectory": "homedirectory2" + } + }, + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": { + "body": { + "name": "user1", + "type": "Microsoft.Storage/storageAccounts/localUsers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1", + "properties": { + "hasSharedKey": false, + "hasSshKey": false, + "hasSshPassword": false, + "homeDirectory": "homedirectory2", + "sid": "S-1-2-0-3528686663-1788730862-2791910117-1000" + } + } + } + }, + "operationId": "LocalUsers_CreateOrUpdate", + "title": "UpdateLocalUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_Delete.json new file mode 100644 index 0000000000..ebd417fa37 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "LocalUsers_Delete", + "title": "DeleteLocalUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_Get.json new file mode 100644 index 0000000000..a82bbd39bc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_Get.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": { + "body": { + "name": "user1", + "type": "Microsoft.Storage/storageAccounts/localUsers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1", + "properties": { + "hasSharedKey": true, + "hasSshKey": true, + "hasSshPassword": true, + "homeDirectory": "homedirectory", + "permissionScopes": [ + { + "permissions": "rwd", + "resourceName": "share1", + "service": "file" + }, + { + "permissions": "rw", + "resourceName": "share2", + "service": "file" + } + ], + "sid": "S-1-2-0-125132-153423-36235-1000" + } + } + } + }, + "operationId": "LocalUsers_Get", + "title": "GetLocalUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_List.json new file mode 100644 index 0000000000..7eb0119d1a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_List.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "user1", + "type": "Microsoft.Storage/storageAccounts/localUsers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1", + "properties": { + "hasSharedKey": true, + "hasSshKey": true, + "hasSshPassword": true, + "homeDirectory": "homedirectory", + "permissionScopes": [ + { + "permissions": "rwd", + "resourceName": "share1", + "service": "file" + }, + { + "permissions": "rw", + "resourceName": "share2", + "service": "file" + } + ], + "sid": "S-1-2-0-125132-153423-36235-1000" + } + }, + { + "name": "user2", + "type": "Microsoft.Storage/storageAccounts/localUsers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/loalUsers/user2", + "properties": { + "hasSharedKey": true, + "hasSshKey": false, + "hasSshPassword": true, + "permissionScopes": [ + { + "permissions": "rw", + "resourceName": "resourcename", + "service": "blob" + } + ], + "sid": "S-1-2-0-533672-235636-66334-1001" + } + } + ] + } + } + }, + "operationId": "LocalUsers_List", + "title": "ListLocalUsers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_ListKeys.json new file mode 100644 index 0000000000..8be916ca3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_ListKeys.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": { + "body": { + "sharedKey": "", + "sshAuthorizedKeys": [ + { + "description": "key name", + "key": "ssh-rsa keykeykeykeykew=" + } + ] + } + } + }, + "operationId": "LocalUsers_ListKeys", + "title": "ListLocalUserKeys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_RegeneratePassword.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_RegeneratePassword.json new file mode 100644 index 0000000000..910f3146fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/LocalUsers_RegeneratePassword.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": { + "body": { + "sshPassword": "" + } + } + }, + "operationId": "LocalUsers_RegeneratePassword", + "title": "RegenerateLocalUserPassword" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policies.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policies.json new file mode 100644 index 0000000000..d9872d51bf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policies.json @@ -0,0 +1,182 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + }, + { + "name": "olcmtest2", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + } + }, + "filters": { + "blobIndexMatch": [ + { + "name": "tag1", + "op": "==", + "value": "val1" + }, + { + "name": "tag2", + "op": "==", + "value": "val2" + } + ], + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer2" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + }, + { + "name": "olcmtest2", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + } + }, + "filters": { + "blobIndexMatch": [ + { + "name": "tag1", + "op": "==", + "value": "val1" + }, + { + "name": "tag2", + "op": "==", + "value": "val2" + } + ], + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer2" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Base_Blob_Days_After_Creation_Actions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Base_Blob_Days_After_Creation_Actions.json new file mode 100644 index 0000000000..15a301f9f1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Base_Blob_Days_After_Creation_Actions.json @@ -0,0 +1,92 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2021-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Cold_Tier_Actions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Cold_Tier_Actions.json new file mode 100644 index 0000000000..5693609745 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Cold_Tier_Actions.json @@ -0,0 +1,130 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCold": { + "daysAfterModificationGreaterThan": 30 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + }, + "tierToCold": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 30 + }, + "tierToCold": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2021-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCold": { + "daysAfterModificationGreaterThan": 30 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + }, + "tierToCold": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 30 + }, + "tierToCold": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicyColdTierActions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_For_Block_And_Append_Blobs.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_For_Block_And_Append_Blobs.json new file mode 100644 index 0000000000..5e4dd9a56a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_For_Block_And_Append_Blobs.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 90 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 90 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 90 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 90 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 90 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 90 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicyForBlockAndAppendBlobs" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Hot_Tier_Actions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Hot_Tier_Actions.json new file mode 100644 index 0000000000..4aa50777af --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Hot_Tier_Actions.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "tierToHot": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "tierToHot": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "tierToHot": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2021-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "tierToHot": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "tierToHot": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "tierToHot": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicyHotTierActions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Access_Time_Based_Blob_Actions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Access_Time_Based_Blob_Actions.json new file mode 100644 index 0000000000..9fbf02daa8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Access_Time_Based_Blob_Actions.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterLastAccessTimeGreaterThan": 1000 + }, + "enableAutoTierToHotFromCool": true, + "tierToArchive": { + "daysAfterLastAccessTimeGreaterThan": 90 + }, + "tierToCool": { + "daysAfterLastAccessTimeGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterLastAccessTimeGreaterThan": 1000 + }, + "enableAutoTierToHotFromCool": true, + "tierToArchive": { + "daysAfterLastAccessTimeGreaterThan": 90 + }, + "tierToCool": { + "daysAfterLastAccessTimeGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Tier_Change_Time_Actions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Tier_Change_Time_Actions.json new file mode 100644 index 0000000000..df907098d1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Tier_Change_Time_Actions.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterLastTierChangeGreaterThan": 120, + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "tierToArchive": { + "daysAfterCreationGreaterThan": 30, + "daysAfterLastTierChangeGreaterThan": 90 + } + }, + "version": { + "tierToArchive": { + "daysAfterCreationGreaterThan": 30, + "daysAfterLastTierChangeGreaterThan": 90 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterLastTierChangeGreaterThan": 120, + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "tierToArchive": { + "daysAfterCreationGreaterThan": 30, + "daysAfterLastTierChangeGreaterThan": 90 + } + }, + "version": { + "tierToArchive": { + "daysAfterCreationGreaterThan": 30, + "daysAfterLastTierChangeGreaterThan": 90 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicy_LastTierChangeTimeActions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_With_Snapshot_And_Version.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_With_Snapshot_And_Version.json new file mode 100644 index 0000000000..458a9e246a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_With_Snapshot_And_Version.json @@ -0,0 +1,136 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicyWithSnapshotAndVersion" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_Delete.json new file mode 100644 index 0000000000..f25c2d4a53 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ManagementPolicies_Delete", + "title": "StorageAccountDeleteManagementPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_Get.json new file mode 100644 index 0000000000..2fe4aaea77 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ManagementPolicies_Get.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T03:01:55.7168089Z", + "policy": { + "rules": [ + { + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_Get", + "title": "StorageAccountGetManagementPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Destination.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Destination.json new file mode 100644 index 0000000000..37c965f6a5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Destination.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "accountName": "dst112", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "default", + "properties": { + "properties": { + "destinationAccount": "dst112", + "rules": [ + { + "destinationContainer": "dcont139", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "sourceContainer": "scont139" + } + ], + "sourceAccount": "src1122" + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "2a20bb73-5717-4635-985a-5d4cf777438f", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/dst112/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "destinationAccount": "dst112", + "policyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "rules": [ + { + "destinationContainer": "destContainer1", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "sourceContainer1" + } + ], + "sourceAccount": "src1122" + } + } + } + }, + "operationId": "ObjectReplicationPolicies_CreateOrUpdate", + "title": "StorageAccountCreateObjectReplicationPolicyOnDestination" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Source.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Source.json new file mode 100644 index 0000000000..380b839ba6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Source.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "accountName": "src1122", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "properties": { + "destinationAccount": "dst112", + "rules": [ + { + "destinationContainer": "dcont139", + "filters": { + "minCreationTime": "2020-02-19T16:05:00Z", + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "scont139" + } + ], + "sourceAccount": "src1122" + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "2a20bb73-5717-4635-985a-5d4cf777438f", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/src1122/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "destinationAccount": "dst112", + "enabledTime": "2019-06-08T03:01:55.7168089Z", + "policyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "rules": [ + { + "destinationContainer": "destContainer1", + "filters": { + "minCreationTime": "2020-02-19T16:05:00Z", + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "sourceContainer1" + } + ], + "sourceAccount": "src1122" + } + } + } + }, + "operationId": "ObjectReplicationPolicies_CreateOrUpdate", + "title": "StorageAccountCreateObjectReplicationPolicyOnSource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Destination.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Destination.json new file mode 100644 index 0000000000..ecefc4cce2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Destination.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "accountName": "dst112", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "properties": { + "destinationAccount": "dst112", + "rules": [ + { + "destinationContainer": "dcont139", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "scont139" + }, + { + "destinationContainer": "dcont179", + "sourceContainer": "scont179" + } + ], + "sourceAccount": "src1122" + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "2a20bb73-5717-4635-985a-5d4cf777438f", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/dst112/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "destinationAccount": "dst112", + "policyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "rules": [ + { + "destinationContainer": "destContainer1", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "sourceContainer1" + }, + { + "destinationContainer": "dcont179", + "ruleId": "cfbb4bc2-8b60-429f-b05a-d1e0942b33b2", + "sourceContainer": "scont179" + } + ], + "sourceAccount": "src1122" + } + } + } + }, + "operationId": "ObjectReplicationPolicies_CreateOrUpdate", + "title": "StorageAccountUpdateObjectReplicationPolicyOnDestination" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Source.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Source.json new file mode 100644 index 0000000000..9106f661b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Source.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "accountName": "src1122", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "properties": { + "destinationAccount": "dst112", + "rules": [ + { + "destinationContainer": "dcont139", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "scont139" + }, + { + "destinationContainer": "dcont179", + "ruleId": "cfbb4bc2-8b60-429f-b05a-d1e0942b33b2", + "sourceContainer": "scont179" + } + ], + "sourceAccount": "src1122" + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "2a20bb73-5717-4635-985a-5d4cf777438f", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/src1122/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "destinationAccount": "dst112", + "enabledTime": "2019-06-08T03:01:55.7168089Z", + "policyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "rules": [ + { + "destinationContainer": "destContainer1", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "sourceContainer1" + }, + { + "destinationContainer": "dcont179", + "ruleId": "cfbb4bc2-8b60-429f-b05a-d1e0942b33b2", + "sourceContainer": "scont179" + } + ], + "sourceAccount": "src1122" + } + } + } + }, + "operationId": "ObjectReplicationPolicies_CreateOrUpdate", + "title": "StorageAccountUpdateObjectReplicationPolicyOnSource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_Delete.json new file mode 100644 index 0000000000..b6a2b64493 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "{objectReplicationPolicy-Id}", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ObjectReplicationPolicies_Delete", + "title": "StorageAccountDeleteObjectReplicationPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_Get.json new file mode 100644 index 0000000000..35b0049b21 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_Get.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "{objectReplicationPolicy-Id}", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{objectReplicationPolicy-Id}", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/objectReplicationPolicies/{objectReplicationPolicy-Id}", + "properties": { + "destinationAccount": "destAccount1", + "enabledTime": "2019-06-08T03:01:55.7168089Z", + "policyId": "{objectReplicationPolicy-Id}", + "rules": [ + { + "destinationContainer": "destContainer1", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "sourceContainer": "sourceContainer1" + }, + { + "destinationContainer": "destContainer1", + "filters": { + "prefixMatch": [ + "blobC", + "blobD" + ] + }, + "sourceContainer": "sourceContainer1" + } + ], + "sourceAccount": "sto2527" + } + } + } + }, + "operationId": "ObjectReplicationPolicies_Get", + "title": "StorageAccountGetObjectReplicationPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_List.json new file mode 100644 index 0000000000..318ef4e4af --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/ObjectReplicationPolicies_List.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "c6c23999-fd4e-433a-bcf9-1db69d27cd8a", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/objectReplicationPolicies/c6c23999-fd4e-433a-bcf9-1db69d27cd8a", + "properties": { + "destinationAccount": "destAccount1", + "sourceAccount": "sto2527" + } + }, + { + "name": "141d23dc-8958-4b48-b6e6-5a40bf1af116", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/objectReplicationPolicies/141d23dc-8958-4b48-b6e6-5a40bf1af116", + "properties": { + "destinationAccount": "destAccount2", + "sourceAccount": "sto2527" + } + } + ] + } + } + }, + "operationId": "ObjectReplicationPolicies_List", + "title": "StorageAccountListObjectReplicationPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_Delete.json new file mode 100644 index 0000000000..417d613056 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "PrivateEndpointConnections_Delete", + "title": "StorageAccountDeletePrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_Get.json new file mode 100644 index 0000000000..cbc22acab0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_Get.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.Storage/storageAccounts/privateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "PrivateEndpointConnections_Get", + "title": "StorageAccountGetPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_List.json new file mode 100644 index 0000000000..48c63c31c9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_List.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.Storage/storageAccounts/privateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + }, + { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.Storage/storageAccounts/privateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest02" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "PrivateEndpointConnections_List", + "title": "StorageAccountListPrivateEndpointConnections" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_Put.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_Put.json new file mode 100644 index 0000000000..c312f1ff28 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateEndpointConnections_Put.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "properties": { + "properties": { + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "status": "Approved" + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.Storage/storageAccounts/privateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "PrivateEndpointConnections_Put", + "title": "StorageAccountPutPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateLinkResources_ListByStorageAccount.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateLinkResources_ListByStorageAccount.json new file mode 100644 index 0000000000..8aaa066b45 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/PrivateLinkResources_ListByStorageAccount.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "blob", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/blob", + "properties": { + "groupId": "blob", + "requiredMembers": [ + "blob" + ], + "requiredZoneNames": [ + "privatelink.blob.core.windows.net" + ] + } + }, + { + "name": "blob_secondary", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/blob_secondary", + "properties": { + "groupId": "blob_secondary", + "requiredMembers": [ + "blob_secondary" + ], + "requiredZoneNames": [ + "privatelink.blob.core.windows.net" + ] + } + }, + { + "name": "table", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/table", + "properties": { + "groupId": "table", + "requiredMembers": [ + "table" + ], + "requiredZoneNames": [ + "privatelink.table.core.windows.net" + ] + } + }, + { + "name": "table_secondary", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/table_secondary", + "properties": { + "groupId": "table_secondary", + "requiredMembers": [ + "table_secondary" + ], + "requiredZoneNames": [ + "privatelink.table.core.windows.net" + ] + } + }, + { + "name": "dfs", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/dfs", + "properties": { + "groupId": "dfs", + "requiredMembers": [ + "dfs" + ], + "requiredZoneNames": [ + "privatelink.dfs.core.windows.net" + ] + } + }, + { + "name": "dfs_secondary", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/dfs_secondary", + "properties": { + "groupId": "dfs_secondary", + "requiredMembers": [ + "dfs_secondary" + ], + "requiredZoneNames": [ + "privatelink.dfs.core.windows.net" + ] + } + } + ] + } + } + }, + "operationId": "PrivateLinkResources_ListByStorageAccount", + "title": "StorageAccountListPrivateLinkResources" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/QueueServices_GetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/QueueServices_GetServiceProperties.json new file mode 100644 index 0000000000..cee806bd5f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/QueueServices_GetServiceProperties.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "queueServiceName": "default", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/queueServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/queueServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + } + }, + "operationId": "QueueServices_GetServiceProperties", + "title": "QueueServicesGet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/QueueServices_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/QueueServices_List.json new file mode 100644 index 0000000000..48b34d2dba --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/QueueServices_List.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/queueServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/queueServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + ] + } + } + }, + "operationId": "QueueServices_List", + "title": "QueueServicesList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/QueueServices_SetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/QueueServices_SetServiceProperties.json new file mode 100644 index 0000000000..f541b0a1ef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/QueueServices_SetServiceProperties.json @@ -0,0 +1,149 @@ +{ + "parameters": { + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + }, + "queueServiceName": "default", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/queueServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/queueServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + } + }, + "operationId": "QueueServices_SetServiceProperties", + "title": "QueueServicesPut" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Create_Queue_Operation_Put.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Create_Queue_Operation_Put.json new file mode 100644 index 0000000000..5d116a0d30 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Create_Queue_Operation_Put.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "queue": {}, + "queueName": "queue6185", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "queue6185", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185" + } + } + }, + "operationId": "Queue_Create", + "title": "QueueOperationPut" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Create_Queue_Operation_Put_With_Metadata.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Create_Queue_Operation_Put_With_Metadata.json new file mode 100644 index 0000000000..62a7b99277 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Create_Queue_Operation_Put_With_Metadata.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "queue": { + "properties": { + "metadata": { + "sample1": "meta1", + "sample2": "meta2" + } + } + }, + "queueName": "queue6185", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "queue6185", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185", + "properties": { + "metadata": { + "sample1": "meta1", + "sample2": "meta2" + } + } + } + } + }, + "operationId": "Queue_Create", + "title": "QueueOperationPutWithMetadata" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Delete.json new file mode 100644 index 0000000000..cec8e4659a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "queueName": "queue6185", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "204": {} + }, + "operationId": "Queue_Delete", + "title": "QueueOperationDelete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Get.json new file mode 100644 index 0000000000..062d4a18d8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "queueName": "queue6185", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "queue6185", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185", + "properties": { + "metadata": { + "sample1": "meta1", + "sample2": "meta2" + } + } + } + } + }, + "operationId": "Queue_Get", + "title": "QueueOperationGet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_List.json new file mode 100644 index 0000000000..6afa17ca58 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_List.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues?api-version=2022-09-01&$maxpagesize=2&$skipToken=/sto328/queue6187", + "value": [ + { + "name": "queue6185", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185", + "properties": { + "metadata": { + "sample1": "meta1", + "sample2": "meta2" + } + } + }, + { + "name": "queue6186", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6186", + "properties": { + "metadata": { + "sample1": "meta1", + "sample2": "meta2" + } + } + } + ] + } + } + }, + "operationId": "Queue_List", + "title": "QueueOperationList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Update.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Update.json new file mode 100644 index 0000000000..cccabeb7ec --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Queue_Update.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "queue": {}, + "queueName": "queue6185", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "queue6185", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185" + } + } + }, + "operationId": "Queue_Update", + "title": "QueueOperationPatch" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_AbortHierarchicalNamespaceMigration.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_AbortHierarchicalNamespaceMigration.json new file mode 100644 index 0000000000..c43fccbae3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_AbortHierarchicalNamespaceMigration.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "accountName": "sto2434", + "api-version": "2022-09-01", + "resourceGroupName": "res4228", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://endpoint:port/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/{location}/asyncoperations/{operationid}?monitor=true&api-version=2022-09-01" + } + } + }, + "operationId": "StorageAccounts_AbortHierarchicalNamespaceMigration", + "title": "StorageAccountAbortHierarchicalNamespaceMigration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_CheckNameAvailability.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_CheckNameAvailability.json new file mode 100644 index 0000000000..2204f5e2a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_CheckNameAvailability.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "accountName": { + "name": "sto3363", + "type": "Microsoft.Storage/storageAccounts" + }, + "api-version": "2022-09-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nameAvailable": true + } + } + }, + "operationId": "StorageAccounts_CheckNameAvailability", + "title": "StorageAccountCheckNameAvailability" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Nfs_V3_Account_Create.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Nfs_V3_Account_Create.json new file mode 100644 index 0000000000..f628c9432c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Nfs_V3_Account_Create.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "kind": "BlockBlobStorage", + "location": "eastus", + "properties": { + "isHnsEnabled": true, + "isNfsV3Enabled": true, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12" + } + ] + }, + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Premium_LRS" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "BlockBlobStorage", + "location": "eastus", + "properties": { + "isHnsEnabled": true, + "isNfsV3Enabled": true, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12" + } + ] + }, + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "NfsV3AccountCreate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create.json new file mode 100644 index 0000000000..dc8fdee9f4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create.json @@ -0,0 +1,151 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "defaultToOAuthAuthentication": false, + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Aad.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Aad.json new file mode 100644 index 0000000000..3e187db0da --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Aad.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "AAD", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "AAD", + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateAllowedCopyScopeToAAD" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Private_Link.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Private_Link.json new file mode 100644 index 0000000000..aece4b54ff --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Private_Link.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "PrivateLink", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "PrivateLink", + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateAllowedCopyScopeToPrivateLink" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Disallow_Public_Network_Access.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Disallow_Public_Network_Access.json new file mode 100644 index 0000000000..7c324e4acb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Disallow_Public_Network_Access.json @@ -0,0 +1,150 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "publicNetworkAccess": "Disabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Disabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateDisallowPublicNetworkAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Azure_Dns_Zone.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Azure_Dns_Zone.json new file mode 100644 index 0000000000..465bea7dd6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Azure_Dns_Zone.json @@ -0,0 +1,153 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "defaultToOAuthAuthentication": false, + "dnsEndpointType": "AzureDnsZone", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "dnsEndpointType": "AzureDnsZone", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.z24.blob.storage.azure.net/", + "dfs": "https://sto4445.z24.dfs.storage.azure.net/", + "file": "https://sto4445.z24.file.storage.azure.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.z24.blob.storage.azure.net/", + "dfs": "https://sto4445-internetrouting.z24.dfs.storage.azure.net/", + "file": "https://sto4445-internetrouting.z24.file.storage.azure.net/", + "web": "https://sto4445-internetrouting.z24.web.storage.azure.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.z24.blob.storage.azure.net/", + "dfs": "https://sto4445-microsoftrouting.z24.dfs.storage.azure.net/", + "file": "https://sto4445-microsoftrouting.z24.file.storage.azure.net/", + "queue": "https://sto4445-microsoftrouting.z24.queue.storage.azure.net/", + "table": "https://sto4445-microsoftrouting.z24.table.storage.azure.net/", + "web": "https://sto4445-microsoftrouting.z24.web.storage.azure.net/" + }, + "queue": "https://sto4445.z24.queue.storage.azure.net/", + "table": "https://sto4445.z24.table.storage.azure.net/", + "web": "https://sto4445.z24.web.storage.azure.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateDnsEndpointTypeToAzureDnsZone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Standard.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Standard.json new file mode 100644 index 0000000000..2d92360768 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Standard.json @@ -0,0 +1,153 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "defaultToOAuthAuthentication": false, + "dnsEndpointType": "Standard", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "dnsEndpointType": "Standard", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateDnsEndpointTypeToStandard" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Enable_Public_Network_Access.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Enable_Public_Network_Access.json new file mode 100644 index 0000000000..75b6f34dc2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Enable_Public_Network_Access.json @@ -0,0 +1,150 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "publicNetworkAccess": "Enabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateEnablePublicNetworkAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Premium_Block_Blob_Storage.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Premium_Block_Blob_Storage.json new file mode 100644 index 0000000000..ebb3c0feac --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_Premium_Block_Blob_Storage.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "kind": "BlockBlobStorage", + "location": "eastus", + "properties": { + "allowSharedKeyAccess": true, + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "minimumTlsVersion": "TLS1_2" + }, + "sku": { + "name": "Premium_LRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "accessTier": "Premium", + "allowBlobPublicAccess": false, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreatePremiumBlockBlobStorage" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_User_Assigned_Encryption_Identity_With_Cmk.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_User_Assigned_Encryption_Identity_With_Cmk.json new file mode 100644 index 0000000000..2ae8f04303 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_User_Assigned_Encryption_Identity_With_Cmk.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {} + } + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + } + }, + "sku": { + "name": "Standard_LRS" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": { + "clientId": "fbaa6278-1ecc-415c-819f-6e2058d3acb5", + "principalId": "8d823284-1060-42a5-9ec4-ed3d831e24d7" + } + } + }, + "kind": "StorageV2", + "location": "eastus", + "properties": { + "accessTier": "Hot", + "creationTime": "2020-12-15T00:43:14.0839093Z", + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + } + } + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "tags": {} + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateUserAssignedEncryptionIdentityWithCMK" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_User_Assigned_Identity_With_Federated_Identity_Client_Id.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_User_Assigned_Identity_With_Federated_Identity_Client_Id.json new file mode 100644 index 0000000000..359bc1b1b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_User_Assigned_Identity_With_Federated_Identity_Client_Id.json @@ -0,0 +1,122 @@ +{ + "parameters": { + "accountName": "sto131918", + "api-version": "2022-09-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {} + } + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "encryption": { + "identity": { + "federatedIdentityClientId": "f83c6b1b-4d34-47e4-bb34-9d83df58b540", + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + } + }, + "sku": { + "name": "Standard_LRS" + } + }, + "resourceGroupName": "res131918", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": { + "clientId": "fbaa6278-1ecc-415c-819f-6e2058d3acb5", + "principalId": "8d823284-1060-42a5-9ec4-ed3d831e24d7" + } + } + }, + "kind": "StorageV2", + "location": "eastus", + "properties": { + "accessTier": "Hot", + "creationTime": "2020-12-15T00:43:14.0839093Z", + "encryption": { + "identity": { + "federatedIdentityClientId": "f83c6b1b-4d34-47e4-bb34-9d83df58b540", + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + } + } + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "tags": {} + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_With_Immutability_Policy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_With_Immutability_Policy.json new file mode 100644 index 0000000000..4a69de864d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Create_Storage_Account_Create_With_Immutability_Policy.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "immutableStorageWithVersioning": { + "enabled": true, + "immutabilityPolicy": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 15, + "state": "Unlocked" + } + } + }, + "sku": { + "name": "Standard_GRS" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T13:25:33.4863236Z", + "immutableStorageWithVersioning": { + "enabled": true, + "immutabilityPolicy": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 15, + "state": "Unlocked" + } + }, + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded" + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateWithImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Delete.json new file mode 100644 index 0000000000..73351c108d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "accountName": "sto2434", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4228", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "StorageAccounts_Delete", + "title": "StorageAccountDelete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Failover_Storage_Account_Failover.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Failover_Storage_Account_Failover.json new file mode 100644 index 0000000000..497d33c22a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Failover_Storage_Account_Failover.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "accountName": "sto2434", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4228", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://endpoint:port/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/{location}/asyncoperations/{operationid}?monitor=true&api-version=2022-09-01" + } + } + }, + "operationId": "StorageAccounts_Failover", + "title": "StorageAccountFailover" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Failover_Storage_Account_Failover_Planned.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Failover_Storage_Account_Failover_Planned.json new file mode 100644 index 0000000000..6ed4911a71 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Failover_Storage_Account_Failover_Planned.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "accountName": "sto2434", + "api-version": "2022-09-01", + "failoverType": "Planned", + "monitor": "true", + "resourceGroupName": "res4228", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://endpoint:port/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/{location}/asyncoperations/{operationid}?monitor=true&api-version=2022-09-01" + } + } + }, + "operationId": "StorageAccounts_Failover", + "title": "StorageAccountFailoverPlanned" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Async_Sku_Conversion_Status.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Async_Sku_Conversion_Status.json new file mode 100644 index 0000000000..f1b47fff92 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Async_Sku_Conversion_Status.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "StorageV2", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "storageAccountSkuConversionStatus": { + "endTime": "2021-09-02T02:53:39.0932539Z", + "skuConversionStatus": "InProgress", + "startTime": "2022-09-01T02:53:39.0932539Z", + "targetSkuName": "Standard_GRS" + } + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + } + }, + "operationId": "StorageAccounts_GetProperties", + "title": "StorageAccountGetAsyncSkuConversionStatus" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Properties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Properties.json new file mode 100644 index 0000000000..2e29a43255 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Properties.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "geoReplicationStats": { + "canFailover": true, + "lastSyncTime": "2018-10-30T00:25:34Z", + "status": "Live" + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_GetProperties", + "title": "StorageAccountGetProperties" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Enabled.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Enabled.json new file mode 100644 index 0000000000..3bfa4418e0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Enabled.json @@ -0,0 +1,106 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "identity": { + "type": "SystemAssigned", + "principalId": "911871cc-ffd1-4fc4-ac11-7a316433ea66", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "geoReplicationStats": { + "canFailover": true, + "lastSyncTime": "2018-10-30T00:25:34Z", + "status": "Live" + }, + "isHnsEnabled": true, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_GetProperties", + "title": "StorageAccountGetPropertiesCMKEnabled" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Version_Expiration_Time.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Version_Expiration_Time.json new file mode 100644 index 0000000000..aa559a8fd9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Version_Expiration_Time.json @@ -0,0 +1,107 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "identity": { + "type": "SystemAssigned", + "principalId": "911871cc-ffd1-4fc4-ac11-7a316433ea66", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyExpirationTimestamp": "2019-12-13T20:36:23.7023290Z", + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "geoReplicationStats": { + "canFailover": true, + "lastSyncTime": "2018-10-30T00:25:34Z", + "status": "Live" + }, + "isHnsEnabled": true, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_GetProperties", + "title": "StorageAccountGetPropertiesCMKVersionExpirationTime" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_HierarchicalNamespaceMigration.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_HierarchicalNamespaceMigration.json new file mode 100644 index 0000000000..986642b311 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_HierarchicalNamespaceMigration.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "accountName": "sto2434", + "api-version": "2022-09-01", + "requestType": "HnsOnValidationRequest", + "resourceGroupName": "res4228", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://endpoint:port/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/{location}/asyncoperations/{operationid}?monitor=true&api-version=2022-09-01" + } + } + }, + "operationId": "StorageAccounts_HierarchicalNamespaceMigration", + "title": "StorageAccountHierarchicalNamespaceMigration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_List.json new file mode 100644 index 0000000000..b605faedcd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_List.json @@ -0,0 +1,315 @@ +{ + "parameters": { + "api-version": "2022-09-01", + "monitor": "true", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "sto1125", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res2627/providers/Microsoft.Storage/storageAccounts/sto1125", + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T13:28:53.4540398Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "primaryEndpoints": { + "blob": "https://sto1125.blob.core.windows.net/", + "dfs": "https://sto1125.dfs.core.windows.net/", + "file": "https://sto1125.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto1125-internetrouting.blob.core.windows.net/", + "dfs": "https://sto1125-internetrouting.dfs.core.windows.net/", + "file": "https://sto1125-internetrouting.file.core.windows.net/", + "web": "https://sto1125-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto1125-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto1125-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto1125-microsoftrouting.file.core.windows.net/", + "queue": "https://sto1125-microsoftrouting.queue.core.windows.net/", + "table": "https://sto1125-microsoftrouting.table.core.windows.net/", + "web": "https://sto1125-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto1125.queue.core.windows.net/", + "table": "https://sto1125.table.core.windows.net/", + "web": "https://sto1125.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto3699", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto3699", + "identity": { + "type": "SystemAssigned", + "principalId": "356d057d-cba5-44dd-8a30-b2e547bc416b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T10:06:30.6093014Z", + "primaryEndpoints": { + "blob": "https://sto3699.blob.core.windows.net/", + "file": "https://sto3699.file.core.windows.net/", + "queue": "https://sto3699.queue.core.windows.net/", + "table": "https://sto3699.table.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "identity": { + "type": "SystemAssigned", + "principalId": "911871cc-ffd1-4fc4-ac11-7a316433ea66", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "geoReplicationStats": { + "canFailover": true, + "lastSyncTime": "2018-10-30T00:25:34Z", + "status": "Live" + }, + "isHnsEnabled": true, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto6637", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto6637", + "identity": { + "type": "SystemAssigned", + "principalId": "911871cc-ffd1-4fc4-ac11-7a316433ea66", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T10:09:39.5625175Z", + "primaryEndpoints": { + "blob": "https://sto6637.blob.core.windows.net/", + "file": "https://sto6637.file.core.windows.net/", + "queue": "https://sto6637.queue.core.windows.net/", + "table": "https://sto6637.table.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto834", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res8186/providers/Microsoft.Storage/storageAccounts/sto834", + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T13:28:20.8686541Z", + "primaryEndpoints": { + "blob": "https://sto834.blob.core.windows.net/", + "file": "https://sto834.file.core.windows.net/", + "queue": "https://sto834.queue.core.windows.net/", + "table": "https://sto834.table.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto9174", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto9174", + "identity": { + "type": "SystemAssigned", + "principalId": "933e3ddf-1802-4a51-9469-18a33b576f88", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T09:46:19.6556989Z", + "primaryEndpoints": { + "blob": "https://sto9174.blob.core.windows.net/", + "file": "https://sto9174.file.core.windows.net/", + "queue": "https://sto9174.queue.core.windows.net/", + "table": "https://sto9174.table.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + ] + } + } + }, + "operationId": "StorageAccounts_List", + "title": "StorageAccountList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListAccountSAS.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListAccountSAS.json new file mode 100644 index 0000000000..cd3c10ab68 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListAccountSAS.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "accountName": "sto8588", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "keyToSign": "key1", + "signedExpiry": "2017-05-24T11:42:03.1567373Z", + "signedPermission": "r", + "signedProtocol": "https,http", + "signedResourceTypes": "s", + "signedServices": "b", + "signedStart": "2017-05-24T10:42:03.1567373Z" + }, + "resourceGroupName": "res7985", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "accountSasToken": "sv=2015-04-05&ss=b&srt=s&sp=r&st=2017-05-24T10%3A42%3A03Z&se=2017-05-24T11%3A42%3A03Z&spr=https,http&sig=Z0I%2BEpM%2BPPlTC8ApfUf%2BcffO2aahMgZim3U0iArqsS0%3D" + } + } + }, + "operationId": "StorageAccounts_ListAccountSAS", + "title": "StorageAccountListAccountSAS" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListByResourceGroup.json new file mode 100644 index 0000000000..ad31885e28 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListByResourceGroup.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "api-version": "2022-09-01", + "resourceGroupName": "res6117", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "sto4036", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6117/providers/Microsoft.Storage/storageAccounts/sto4036", + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T13:24:47.818801Z", + "isHnsEnabled": true, + "primaryEndpoints": { + "blob": "https://sto4036.blob.core.windows.net/", + "dfs": "https://sto4036.dfs.core.windows.net/", + "file": "https://sto4036.file.core.windows.net/", + "queue": "https://sto4036.queue.core.windows.net/", + "table": "https://sto4036.table.core.windows.net/", + "web": "https://sto4036.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto4452", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6117/providers/Microsoft.Storage/storageAccounts/sto4452", + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T13:24:15.7068366Z", + "primaryEndpoints": { + "blob": "https://sto4452.blob.core.windows.net/", + "file": "https://sto4452.file.core.windows.net/", + "queue": "https://sto4452.queue.core.windows.net/", + "table": "https://sto4452.table.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + ] + } + } + }, + "operationId": "StorageAccounts_ListByResourceGroup", + "title": "StorageAccountListByResourceGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListKeys.json new file mode 100644 index 0000000000..29533ec40c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListKeys.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "accountName": "sto2220", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res418", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "keys": [ + { + "keyName": "key1", + "permissions": "Full", + "value": "" + }, + { + "keyName": "key2", + "permissions": "Full", + "value": "" + } + ] + } + } + }, + "operationId": "StorageAccounts_ListKeys", + "title": "StorageAccountListKeys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListServiceSAS.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListServiceSAS.json new file mode 100644 index 0000000000..07ea571eab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_ListServiceSAS.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accountName": "sto1299", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "canonicalizedResource": "/blob/sto1299/music", + "signedExpiry": "2017-05-24T11:32:48.8457197Z", + "signedPermission": "l", + "signedResource": "c" + }, + "resourceGroupName": "res7439", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "serviceSasToken": "sv=2015-04-05&sr=c&se=2017-05-24T11%3A32%3A48Z&sp=l&sig=PoF8yBUGixsjzwroLmw7vG3VbGz4KB2woZC2D4C2oio%3D" + } + } + }, + "operationId": "StorageAccounts_ListServiceSAS", + "title": "StorageAccountListServiceSAS" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Kerb_Key.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Kerb_Key.json new file mode 100644 index 0000000000..d91fd8d0d3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Kerb_Key.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "accountName": "sto3539", + "api-version": "2022-09-01", + "monitor": "true", + "regenerateKey": { + "keyName": "kerb1" + }, + "resourceGroupName": "res4167", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "keys": [ + { + "keyName": "key1", + "permissions": "Full", + "value": "" + }, + { + "keyName": "key2", + "permissions": "Full", + "value": "" + }, + { + "keyName": "kerb1", + "permissions": "Full", + "value": "" + } + ] + } + } + }, + "operationId": "StorageAccounts_RegenerateKey", + "title": "StorageAccountRegenerateKerbKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Key.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Key.json new file mode 100644 index 0000000000..4e5eb91129 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Key.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "accountName": "sto3539", + "api-version": "2022-09-01", + "monitor": "true", + "regenerateKey": { + "keyName": "key2" + }, + "resourceGroupName": "res4167", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "keys": [ + { + "keyName": "key1", + "permissions": "Full", + "value": "" + }, + { + "keyName": "key2", + "permissions": "Full", + "value": "" + } + ] + } + } + }, + "operationId": "StorageAccounts_RegenerateKey", + "title": "StorageAccountRegenerateKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RestoreBlobRanges.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RestoreBlobRanges.json new file mode 100644 index 0000000000..1a114cdafd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RestoreBlobRanges.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "blobRanges": [ + { + "endRange": "container/blobpath2", + "startRange": "container/blobpath1" + }, + { + "endRange": "", + "startRange": "container2/blobpath3" + } + ], + "timeToRestore": "2019-04-20T15:30:00.0000000Z" + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "parameters": { + "blobRanges": [ + { + "endRange": "container/blobpath2", + "startRange": "container/blobpath1" + }, + { + "endRange": "", + "startRange": "container2/blobpath3" + } + ], + "timeToRestore": "2019-04-20T15:30:00.0000000Z" + }, + "restoreId": "{restore_id}", + "status": "Succeeded" + } + }, + "202": { + "body": { + "parameters": { + "blobRanges": [ + { + "endRange": "container/blobpath2", + "startRange": "container/blobpath1" + }, + { + "endRange": "", + "startRange": "container2/blobpath3" + } + ], + "timeToRestore": "2019-04-20T15:30:00.0000000Z" + }, + "restoreId": "{restore_id}", + "status": "InProgress" + }, + "headers": { + "location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2022-09-01" + } + } + }, + "operationId": "StorageAccounts_RestoreBlobRanges", + "title": "BlobRangesRestore" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RevokeUserDelegationKeys.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RevokeUserDelegationKeys.json new file mode 100644 index 0000000000..4193e580a3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_RevokeUserDelegationKeys.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "accountName": "sto3539", + "api-version": "2022-09-01", + "resourceGroupName": "res4167", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {} + }, + "operationId": "StorageAccounts_RevokeUserDelegationKeys", + "title": "StorageAccountRevokeUserDelegationKeys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Enable_Ad.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Enable_Ad.json new file mode 100644 index 0000000000..6d2cf33b7d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Enable_Ad.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "azureFilesIdentityBasedAuthentication": { + "activeDirectoryProperties": { + "accountType": "User", + "azureStorageSid": "S-1-5-21-2400535526-2334094090-2402026252-0012", + "domainGuid": "aebfc118-9fa9-4732-a21f-d98e41a77ae1", + "domainName": "adtest.com", + "domainSid": "S-1-5-21-2400535526-2334094090-2402026252", + "forestName": "adtest.com", + "netBiosDomainName": "adtest.com", + "samAccountName": "sam12498" + }, + "directoryServiceOptions": "AD" + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "azureFilesIdentityBasedAuthentication": { + "activeDirectoryProperties": { + "accountType": "User", + "azureStorageSid": "S-1-5-21-2400535526-2334094090-2402026252-0012", + "domainGuid": "aebfc118-9fa9-4732-a21f-d98e41a77ae1", + "domainName": "adtest.com", + "domainSid": "S-1-5-21-2400535526-2334094090-2402026252", + "forestName": "adtest.com", + "netBiosDomainName": "adtest.com", + "samAccountName": "sam12498" + }, + "directoryServiceOptions": "AD" + }, + "creationTime": "2017-06-01T02:42:41.7633306Z", + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountEnableAD" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Enable_Cmk.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Enable_Cmk.json new file mode 100644 index 0000000000..714ba8e871 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Enable_Cmk.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "encryption": { + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "identity": { + "type": "SystemAssigned", + "principalId": "911871cc-ffd1-4fc4-ac11-7a316433ea66", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountEnableCMK" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update.json new file mode 100644 index 0000000000..96cd93d416 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update.json @@ -0,0 +1,154 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "defaultToOAuthAuthentication": false, + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isLocalUserEnabled": true, + "isSftpEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "defaultAction": "Allow", + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ] + }, + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "isLocalUserEnabled": true, + "isSftpEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_Allowed_Copy_Scope_To_Aad.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_Allowed_Copy_Scope_To_Aad.json new file mode 100644 index 0000000000..826ea584c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_Allowed_Copy_Scope_To_Aad.json @@ -0,0 +1,151 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "AAD", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "defaultAction": "Allow", + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ] + }, + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "AAD", + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdateAllowedCopyScopeToAAD" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_Disable_Public_Network_Access.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_Disable_Public_Network_Access.json new file mode 100644 index 0000000000..8ae576aac0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_Disable_Public_Network_Access.json @@ -0,0 +1,151 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "defaultAction": "Allow", + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ] + }, + "publicNetworkAccess": "Disabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Disabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdateDisablePublicNetworkAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_User_Assigned_Encryption_Identity_With_Cmk.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_User_Assigned_Encryption_Identity_With_Cmk.json new file mode 100644 index 0000000000..778f1fe0ef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_User_Assigned_Encryption_Identity_With_Cmk.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {} + } + }, + "kind": "Storage", + "properties": { + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + } + }, + "sku": { + "name": "Standard_LRS" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": { + "clientId": "fbaa6278-1ecc-415c-819f-6e2058d3acb5", + "principalId": "8d823284-1060-42a5-9ec4-ed3d831e24d7" + } + } + }, + "kind": "StorageV2", + "location": "eastus", + "properties": { + "accessTier": "Hot", + "creationTime": "2020-12-15T00:43:14.0839093Z", + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + } + } + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "tags": {} + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_User_Assigned_Identity_With_Federated_Identity_Client_Id.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_User_Assigned_Identity_With_Federated_Identity_Client_Id.json new file mode 100644 index 0000000000..1e1e636650 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_User_Assigned_Identity_With_Federated_Identity_Client_Id.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "accountName": "sto131918", + "api-version": "2022-09-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {} + } + }, + "kind": "Storage", + "properties": { + "encryption": { + "identity": { + "federatedIdentityClientId": "3109d1c4-a5de-4d84-8832-feabb916a4b6", + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + } + }, + "sku": { + "name": "Standard_LRS" + } + }, + "resourceGroupName": "res131918", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": { + "clientId": "fbaa6278-1ecc-415c-819f-6e2058d3acb5", + "principalId": "8d823284-1060-42a5-9ec4-ed3d831e24d7" + } + } + }, + "kind": "StorageV2", + "location": "eastus", + "properties": { + "accessTier": "Hot", + "creationTime": "2020-12-15T00:43:14.0839093Z", + "encryption": { + "identity": { + "federatedIdentityClientId": "3109d1c4-a5de-4d84-8832-feabb916a4b6", + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + } + } + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "tags": {} + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_With_Immutability_Policy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_With_Immutability_Policy.json new file mode 100644 index 0000000000..dc9393936f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/StorageAccounts_Update_Storage_Account_Update_With_Immutability_Policy.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "immutableStorageWithVersioning": { + "enabled": true, + "immutabilityPolicy": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 15, + "state": "Locked" + } + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "immutableStorageWithVersioning": { + "enabled": true, + "immutabilityPolicy": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 15, + "state": "Locked" + } + } + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdateWithImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/TableServices_GetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/TableServices_GetServiceProperties.json new file mode 100644 index 0000000000..387de65dc1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/TableServices_GetServiceProperties.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}", + "tableServiceName": "default" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/tableServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + } + }, + "operationId": "TableServices_GetServiceProperties", + "title": "TableServicesGet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/TableServices_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/TableServices_List.json new file mode 100644 index 0000000000..4a227a03d8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/TableServices_List.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/tableServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + ] + } + } + }, + "operationId": "TableServices_List", + "title": "TableServicesList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/TableServices_SetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/TableServices_SetServiceProperties.json new file mode 100644 index 0000000000..d77e657aa8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/TableServices_SetServiceProperties.json @@ -0,0 +1,149 @@ +{ + "parameters": { + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}", + "tableServiceName": "default" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/tableServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + } + }, + "operationId": "TableServices_SetServiceProperties", + "title": "TableServicesPut" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Create_Table_Operation_Put.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Create_Table_Operation_Put.json new file mode 100644 index 0000000000..ea06b856bd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Create_Table_Operation_Put.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "200": { + "body": { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "tableName": "table6185" + } + } + } + }, + "operationId": "Table_Create", + "title": "TableOperationPut" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Create_Table_Operation_Put_Or_Patch_Acls.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Create_Table_Operation_Put_Or_Patch_Acls.json new file mode 100644 index 0000000000..0c21d06cee --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Create_Table_Operation_Put_Or_Patch_Acls.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "raud", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + }, + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "rad", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI" + } + ] + } + }, + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "200": { + "body": { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "raud", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + }, + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "rad", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI" + } + ], + "tableName": "table6185" + } + } + } + }, + "operationId": "Table_Create", + "title": "TableOperationPutOrPatchAcls" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Delete.json new file mode 100644 index 0000000000..e642694a02 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "204": {} + }, + "operationId": "Table_Delete", + "title": "TableOperationDelete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Get.json new file mode 100644 index 0000000000..70f9d62e40 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Get.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "200": { + "body": { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "tableName": "table6185" + } + } + } + }, + "operationId": "Table_Get", + "title": "TableOperationGet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_List.json new file mode 100644 index 0000000000..69de240793 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_List.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables?api-version=2022-09-01&NextTableName=1!40!bXl0YWJsZXNoYzU0OAEwMWQ2MTI5ZTJmYjVmODFh", + "value": [ + { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "tableName": "table6185" + } + }, + { + "name": "table6186", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6186", + "properties": { + "tableName": "table6186" + } + } + ] + } + } + }, + "operationId": "Table_List", + "title": "TableOperationList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Update_Table_Operation_Patch.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Update_Table_Operation_Patch.json new file mode 100644 index 0000000000..29f691398b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Update_Table_Operation_Patch.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "200": { + "body": { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "tableName": "table6185" + } + } + } + }, + "operationId": "Table_Update", + "title": "TableOperationPatch" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Update_Table_Operation_Put_Or_Patch_Acls.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Update_Table_Operation_Put_Or_Patch_Acls.json new file mode 100644 index 0000000000..7d3a465aef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/examples/Table_Update_Table_Operation_Put_Or_Patch_Acls.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "raud", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + }, + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "rad", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI" + } + ] + } + }, + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "200": { + "body": { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "raud", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + }, + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "rad", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI" + } + ], + "tableName": "table6185" + } + } + } + }, + "operationId": "Table_Update", + "title": "TableOperationPutOrPatchAcls" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/swagger.json new file mode 100644 index 0000000000..e5f1b0d554 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/swagger.json @@ -0,0 +1,10380 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Storage resource management API.", + "version": "2022-09-01", + "description": "The Azure Storage Management API.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "AadOauth2Auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "AadOauth2Auth": { + "type": "oauth2", + "description": "The Azure Active Directory OAuth2 Flow", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "StorageAccounts" + }, + { + "name": "DeletedAccounts" + }, + { + "name": "ManagementPolicies" + }, + { + "name": "BlobInventoryPolicies" + }, + { + "name": "PrivateEndpointConnections" + }, + { + "name": "ObjectReplicationPolicies" + }, + { + "name": "LocalUsers" + }, + { + "name": "EncryptionScopes" + }, + { + "name": "BlobServicePropertiesOperationGroup" + }, + { + "name": "BlobContainers" + }, + { + "name": "ImmutabilityPolicies" + }, + { + "name": "FileServicePropertiesOperationGroup" + }, + { + "name": "FileShares" + }, + { + "name": "QueueServicePropertiesOperationGroup" + }, + { + "name": "StorageQueues" + }, + { + "name": "TableServicePropertiesOperationGroup" + }, + { + "name": "Tables" + } + ], + "paths": { + "/providers/Microsoft.Storage/operations": { + "get": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability": { + "post": { + "operationId": "StorageAccounts_CheckNameAvailability", + "tags": [ + "StorageAccounts" + ], + "description": "Checks that the storage account name is valid and is not already in use.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "body", + "in": "body", + "description": "The CheckAvailability request", + "required": true, + "schema": { + "$ref": "#/definitions/StorageAccountCheckNameAvailabilityParameters" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountCheckNameAvailability": { + "$ref": "./examples/StorageAccounts_CheckNameAvailability.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/deletedAccounts": { + "get": { + "operationId": "DeletedAccounts_List", + "tags": [ + "DeletedAccounts" + ], + "description": "Lists deleted accounts under the subscription.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/LocationParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DeletedAccountListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeletedAccountList": { + "$ref": "./examples/DeletedAccounts_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/deletedAccounts/{deletedAccountName}": { + "get": { + "operationId": "DeletedAccounts_Get", + "tags": [ + "DeletedAccounts" + ], + "description": "Get properties of specified deleted account resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/LocationParameter" + }, + { + "name": "deletedAccountName", + "in": "path", + "description": "Name of the deleted storage account.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/DeletedAccount" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeletedAccountGet": { + "$ref": "./examples/DeletedAccounts_Get.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/locations/{location}/usages": { + "get": { + "operationId": "UsagesOperations_ListByLocation", + "description": "Gets the current usage count and the limit for the resources of the location under the subscription.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/LocationParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/UsageListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/skus": { + "get": { + "operationId": "SkusOperations_List", + "description": "Lists the available SKUs supported by Microsoft.Storage for given subscription.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/StorageSkuListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts": { + "get": { + "operationId": "StorageAccounts_List", + "tags": [ + "StorageAccounts" + ], + "description": "Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/StorageAccountListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountList": { + "$ref": "./examples/StorageAccounts_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts": { + "get": { + "operationId": "StorageAccounts_ListByResourceGroup", + "tags": [ + "StorageAccounts" + ], + "description": "Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/StorageAccountListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountListByResourceGroup": { + "$ref": "./examples/StorageAccounts_ListByResourceGroup.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}": { + "get": { + "operationId": "StorageAccounts_GetProperties", + "tags": [ + "StorageAccounts" + ], + "description": "Returns the properties for the specified storage account including but not limited to name, SKU name, location, and account status. The ListKeys operation should be used to retrieve storage keys.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus.", + "required": false, + "type": "string", + "enum": [ + "geoReplicationStats", + "blobRestoreStatus" + ], + "x-ms-enum": { + "name": "StorageAccountExpand", + "modelAsString": false + } + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/StorageAccount" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountGetAsyncSkuConversionStatus": { + "$ref": "./examples/StorageAccounts_GetProperties_Storage_Account_Get_Async_Sku_Conversion_Status.json" + }, + "StorageAccountGetProperties": { + "$ref": "./examples/StorageAccounts_GetProperties_Storage_Account_Get_Properties.json" + }, + "StorageAccountGetPropertiesCMKEnabled": { + "$ref": "./examples/StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Enabled.json" + }, + "StorageAccountGetPropertiesCMKVersionExpirationTime": { + "$ref": "./examples/StorageAccounts_GetProperties_Storage_Account_Get_Properties_Cmk_Version_Expiration_Time.json" + } + } + }, + "put": { + "operationId": "StorageAccounts_Create", + "tags": [ + "StorageAccounts" + ], + "description": "Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters to provide for the created account.", + "required": true, + "schema": { + "$ref": "#/definitions/StorageAccount" + }, + "x-ms-client-name": "parameters" + } + ], + "responses": { + "200": { + "description": "Resource 'StorageAccount' update operation succeeded", + "schema": { + "$ref": "#/definitions/StorageAccount" + } + }, + "201": { + "description": "Resource 'StorageAccount' create operation succeeded", + "schema": { + "$ref": "#/definitions/StorageAccount" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "NfsV3AccountCreate": { + "$ref": "./examples/StorageAccounts_Create_Nfs_V3_Account_Create.json" + }, + "StorageAccountCreate": { + "$ref": "./examples/StorageAccounts_Create_Storage_Account_Create.json" + }, + "StorageAccountCreateAllowedCopyScopeToAAD": { + "$ref": "./examples/StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Aad.json" + }, + "StorageAccountCreateAllowedCopyScopeToPrivateLink": { + "$ref": "./examples/StorageAccounts_Create_Storage_Account_Create_Allowed_Copy_Scope_To_Private_Link.json" + }, + "StorageAccountCreateDisallowPublicNetworkAccess": { + "$ref": "./examples/StorageAccounts_Create_Storage_Account_Create_Disallow_Public_Network_Access.json" + }, + "StorageAccountCreateDnsEndpointTypeToAzureDnsZone": { + "$ref": "./examples/StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Azure_Dns_Zone.json" + }, + "StorageAccountCreateDnsEndpointTypeToStandard": { + "$ref": "./examples/StorageAccounts_Create_Storage_Account_Create_Dns_Endpoint_Type_To_Standard.json" + }, + "StorageAccountCreateEnablePublicNetworkAccess": { + "$ref": "./examples/StorageAccounts_Create_Storage_Account_Create_Enable_Public_Network_Access.json" + }, + "StorageAccountCreatePremiumBlockBlobStorage": { + "$ref": "./examples/StorageAccounts_Create_Storage_Account_Create_Premium_Block_Blob_Storage.json" + }, + "StorageAccountCreateUserAssignedEncryptionIdentityWithCMK": { + "$ref": "./examples/StorageAccounts_Create_Storage_Account_Create_User_Assigned_Encryption_Identity_With_Cmk.json" + }, + "StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.": { + "$ref": "./examples/StorageAccounts_Create_Storage_Account_Create_User_Assigned_Identity_With_Federated_Identity_Client_Id.json" + }, + "StorageAccountCreateWithImmutabilityPolicy": { + "$ref": "./examples/StorageAccounts_Create_Storage_Account_Create_With_Immutability_Policy.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "StorageAccounts_Update", + "tags": [ + "StorageAccounts" + ], + "description": "The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters to provide for the updated account.", + "required": true, + "schema": { + "$ref": "#/definitions/StorageAccountUpdateParameters" + }, + "x-ms-client-name": "parameters" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/StorageAccount" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountEnableAD": { + "$ref": "./examples/StorageAccounts_Update_Storage_Account_Enable_Ad.json" + }, + "StorageAccountEnableCMK": { + "$ref": "./examples/StorageAccounts_Update_Storage_Account_Enable_Cmk.json" + }, + "StorageAccountUpdate": { + "$ref": "./examples/StorageAccounts_Update_Storage_Account_Update.json" + }, + "StorageAccountUpdateAllowedCopyScopeToAAD": { + "$ref": "./examples/StorageAccounts_Update_Storage_Account_Update_Allowed_Copy_Scope_To_Aad.json" + }, + "StorageAccountUpdateDisablePublicNetworkAccess": { + "$ref": "./examples/StorageAccounts_Update_Storage_Account_Update_Disable_Public_Network_Access.json" + }, + "StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK": { + "$ref": "./examples/StorageAccounts_Update_Storage_Account_Update_User_Assigned_Encryption_Identity_With_Cmk.json" + }, + "StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId": { + "$ref": "./examples/StorageAccounts_Update_Storage_Account_Update_User_Assigned_Identity_With_Federated_Identity_Client_Id.json" + }, + "StorageAccountUpdateWithImmutabilityPolicy": { + "$ref": "./examples/StorageAccounts_Update_Storage_Account_Update_With_Immutability_Policy.json" + } + } + }, + "delete": { + "operationId": "StorageAccounts_Delete", + "tags": [ + "StorageAccounts" + ], + "description": "Deletes a storage account in Microsoft Azure.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountDelete": { + "$ref": "./examples/StorageAccounts_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/abortHierarchicalNamespaceMigration": { + "post": { + "operationId": "StorageAccounts_AbortHierarchicalNamespaceMigration", + "tags": [ + "StorageAccounts" + ], + "description": "Abort live Migration of storage account to enable Hns", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "202": { + "description": "Resource operation accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Azure operation completed successfully." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountAbortHierarchicalNamespaceMigration": { + "$ref": "./examples/StorageAccounts_AbortHierarchicalNamespaceMigration.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices": { + "get": { + "operationId": "BlobServices_List", + "tags": [ + "BlobServicePropertiesOperationGroup" + ], + "description": "List blob services of storage account. It returns a collection of one object named default.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/BlobServicePropertiesListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ListBlobServices": { + "$ref": "./examples/BlobServices_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default": { + "get": { + "operationId": "BlobServices_GetServiceProperties", + "tags": [ + "BlobServicePropertiesOperationGroup" + ], + "description": "Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/BlobServiceProperties" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "GetBlobServices": { + "$ref": "./examples/BlobServices_GetServiceProperties.json" + } + } + }, + "put": { + "operationId": "BlobServices_SetServiceProperties", + "tags": [ + "BlobServicePropertiesOperationGroup" + ], + "description": "Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "parameters", + "in": "body", + "description": "The properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.", + "required": true, + "schema": { + "$ref": "#/definitions/BlobServiceProperties" + }, + "x-ms-client-name": "parameters" + } + ], + "responses": { + "200": { + "description": "Resource 'BlobServiceProperties' update operation succeeded", + "schema": { + "$ref": "#/definitions/BlobServiceProperties" + } + }, + "201": { + "description": "Resource 'BlobServiceProperties' create operation succeeded", + "schema": { + "$ref": "#/definitions/BlobServiceProperties" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "BlobServicesPutAllowPermanentDelete": { + "$ref": "./examples/BlobServices_SetServiceProperties_Blob_Services_Put_Allow_Permanent_Delete.json" + }, + "BlobServicesPutLastAccessTimeBasedTracking": { + "$ref": "./examples/BlobServices_SetServiceProperties_Blob_Services_Put_Last_Access_Time_Based_Tracking.json" + }, + "PutBlobServices": { + "$ref": "./examples/BlobServices_SetServiceProperties_Put_Blob_Services.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers": { + "get": { + "operationId": "BlobContainers_List", + "tags": [ + "BlobContainers" + ], + "description": "Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$maxpagesize", + "in": "query", + "description": "Optional. Specified maximum number of containers that can be included in the list.", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "Optional. When specified, only container names starting with the filter will be listed.", + "required": false, + "type": "string" + }, + { + "name": "$include", + "in": "query", + "description": "Optional, used to include the properties for soft deleted blob containers.", + "required": false, + "type": "string", + "enum": [ + "deleted" + ], + "x-ms-enum": { + "name": "ListContainersInclude", + "modelAsString": true + } + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/BlobContainerListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ListContainers": { + "$ref": "./examples/BlobContainers_List_List_Containers.json" + }, + "ListDeletedContainers": { + "$ref": "./examples/BlobContainers_List_List_Deleted_Containers.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}": { + "get": { + "operationId": "BlobContainers_Get", + "tags": [ + "BlobContainers" + ], + "description": "Gets properties of a specified container.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/BlobContainer" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "GetBlobContainersGetWithAllowProtectedAppendWritesAll": { + "$ref": "./examples/BlobContainers_Get_Get_Blob_Containers_Get_With_Allow_Protected_Append_Writes_All.json" + }, + "GetContainers": { + "$ref": "./examples/BlobContainers_Get_Get_Containers.json" + } + } + }, + "put": { + "operationId": "BlobContainers_Create", + "tags": [ + "BlobContainers" + ], + "description": "Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "blobContainer", + "in": "body", + "description": "Properties of the blob container to create.", + "required": true, + "schema": { + "$ref": "#/definitions/BlobContainer" + }, + "x-ms-client-name": "blobContainer" + } + ], + "responses": { + "200": { + "description": "Resource 'BlobContainer' update operation succeeded", + "schema": { + "$ref": "#/definitions/BlobContainer" + } + }, + "201": { + "description": "Resource 'BlobContainer' create operation succeeded", + "schema": { + "$ref": "#/definitions/BlobContainer" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PutContainerWithDefaultEncryptionScope": { + "$ref": "./examples/BlobContainers_Create_Put_Container_With_Default_Encryption_Scope.json" + }, + "PutContainerWithObjectLevelWorm": { + "$ref": "./examples/BlobContainers_Create_Put_Container_With_Object_Level_Worm.json" + }, + "PutContainers": { + "$ref": "./examples/BlobContainers_Create_Put_Containers.json" + } + } + }, + "delete": { + "operationId": "BlobContainers_Delete", + "tags": [ + "BlobContainers" + ], + "description": "Deletes specified container under its account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeleteContainers": { + "$ref": "./examples/BlobContainers_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/clearLegalHold": { + "post": { + "operationId": "BlobContainers_ClearLegalHold", + "tags": [ + "BlobContainers" + ], + "description": "Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "LegalHold", + "in": "body", + "description": "The LegalHold property that will be clear from a blob container.", + "required": true, + "schema": { + "$ref": "#/definitions/LegalHold" + }, + "x-ms-client-name": "LegalHold" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/LegalHold" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ClearLegalHoldContainers": { + "$ref": "./examples/BlobContainers_ClearLegalHold.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/containers/{name}": { + "patch": { + "operationId": "BlobContainers_Update", + "tags": [ + "BlobContainers" + ], + "description": "Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "name", + "in": "path", + "description": "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "blobContainer", + "in": "body", + "description": "Properties to update for the blob container.", + "required": true, + "schema": { + "$ref": "#/definitions/BlobContainer" + }, + "x-ms-client-name": "blobContainer" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/BlobContainer" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "UpdateContainers": { + "$ref": "./examples/BlobContainers_Update.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default": { + "get": { + "operationId": "BlobContainers_GetImmutabilityPolicy", + "tags": [ + "ImmutabilityPolicies" + ], + "description": "Gets the existing immutability policy along with the corresponding ETag in response headers and body.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "if-match", + "in": "header", + "description": "The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.", + "required": false, + "type": "string", + "x-ms-client-name": "If-Match" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ImmutabilityPolicy" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "GetImmutabilityPolicy": { + "$ref": "./examples/BlobContainers_GetImmutabilityPolicy.json" + } + } + }, + "put": { + "operationId": "BlobContainers_CreateOrUpdateImmutabilityPolicy", + "tags": [ + "ImmutabilityPolicies" + ], + "description": "Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "if-match", + "in": "header", + "description": "The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.", + "required": false, + "type": "string", + "x-ms-client-name": "If-Match" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "parameters", + "in": "body", + "description": "The ImmutabilityPolicy Properties that will be created or updated to a blob container.", + "required": true, + "schema": { + "$ref": "#/definitions/ImmutabilityPolicy" + }, + "x-ms-client-name": "parameters" + } + ], + "responses": { + "200": { + "description": "Resource 'ImmutabilityPolicy' update operation succeeded", + "schema": { + "$ref": "#/definitions/ImmutabilityPolicy" + } + }, + "201": { + "description": "Resource 'ImmutabilityPolicy' create operation succeeded", + "schema": { + "$ref": "#/definitions/ImmutabilityPolicy" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "CreateOrUpdateImmutabilityPolicy": { + "$ref": "./examples/BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy.json" + }, + "CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll": { + "$ref": "./examples/BlobContainers_CreateOrUpdateImmutabilityPolicy_Create_Or_Update_Immutability_Policy_With_Allow_Protected_Append_Writes_All.json" + } + } + }, + "delete": { + "operationId": "BlobContainers_DeleteImmutabilityPolicy", + "tags": [ + "ImmutabilityPolicies" + ], + "description": "Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "if-match", + "in": "header", + "description": "The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.", + "required": true, + "type": "string", + "x-ms-client-name": "If-Match" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeleteImmutabilityPolicy": { + "$ref": "./examples/BlobContainers_DeleteImmutabilityPolicy.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/extendImmutabilityPolicy": { + "post": { + "operationId": "BlobContainers_ExtendImmutabilityPolicy", + "tags": [ + "ImmutabilityPolicies" + ], + "description": "Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "if-match", + "in": "header", + "description": "The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.", + "required": true, + "type": "string", + "x-ms-client-name": "If-Match" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "parameters", + "in": "body", + "description": "The ImmutabilityPolicy Properties that will be extended for a blob container.", + "required": true, + "schema": { + "$ref": "#/definitions/ImmutabilityPolicy" + }, + "x-ms-client-name": "parameters" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ImmutabilityPolicy" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ExtendImmutabilityPolicy": { + "$ref": "./examples/BlobContainers_ExtendImmutabilityPolicy.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/immutabilityPolicies/default/lockImmutabilityPolicy": { + "post": { + "operationId": "BlobContainers_LockImmutabilityPolicy", + "tags": [ + "ImmutabilityPolicies" + ], + "description": "Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "if-match", + "in": "header", + "description": "The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.", + "required": true, + "type": "string", + "x-ms-client-name": "If-Match" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ImmutabilityPolicy" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "LockImmutabilityPolicy": { + "$ref": "./examples/BlobContainers_LockImmutabilityPolicy.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/lease": { + "post": { + "operationId": "BlobContainers_Lease", + "tags": [ + "BlobContainers" + ], + "description": "The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "parameters", + "in": "body", + "description": "Lease Container request body.", + "required": true, + "schema": { + "$ref": "#/definitions/LeaseContainerRequest" + }, + "x-ms-client-name": "parameters" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/LeaseContainerResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Acquire a lease on a container": { + "$ref": "./examples/BlobContainers_Lease_Acquire_A_Lease_On_A_Container.json" + }, + "Break a lease on a container": { + "$ref": "./examples/BlobContainers_Lease_Break_A_Lease_On_A_Container.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/objectLevelWorm": { + "post": { + "operationId": "BlobContainers_ObjectLevelWorm", + "tags": [ + "BlobContainers" + ], + "description": "This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + } + ], + "responses": { + "202": { + "description": "Resource operation accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Azure operation completed successfully." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "VersionLevelWormContainerMigration": { + "$ref": "./examples/BlobContainers_ObjectLevelWorm.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/setLegalHold": { + "post": { + "operationId": "BlobContainers_SetLegalHold", + "tags": [ + "BlobContainers" + ], + "description": "Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "containerName", + "in": "path", + "description": "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "LegalHold", + "in": "body", + "description": "The LegalHold property that will be set to a blob container.", + "required": true, + "schema": { + "$ref": "#/definitions/LegalHold" + }, + "x-ms-client-name": "LegalHold" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/LegalHold" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "SetLegalHoldContainers": { + "$ref": "./examples/BlobContainers_SetLegalHold_Set_Legal_Hold_Containers.json" + }, + "SetLegalHoldContainersWithAllowProtectedAppendWritesAll": { + "$ref": "./examples/BlobContainers_SetLegalHold_Set_Legal_Hold_Containers_With_Allow_Protected_Append_Writes_All.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes": { + "get": { + "operationId": "EncryptionScopes_List", + "tags": [ + "EncryptionScopes" + ], + "description": "Lists all the encryption scopes available under the specified storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$maxpagesize", + "in": "query", + "description": "Optional, specifies the maximum number of encryption scopes that will be included in the list response.", + "required": false, + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 5000 + }, + { + "name": "$filter", + "in": "query", + "description": "Optional. When specified, only encryption scope names starting with the filter will be listed.", + "required": false, + "type": "string" + }, + { + "name": "$include", + "in": "query", + "description": "Optional, when specified, will list encryption scopes with the specific state. Defaults to All", + "required": false, + "type": "string", + "enum": [ + "All", + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "ListEncryptionScopesInclude", + "modelAsString": true + } + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/EncryptionScopeListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountEncryptionScopeList": { + "$ref": "./examples/EncryptionScopes_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}": { + "get": { + "operationId": "EncryptionScopes_Get", + "tags": [ + "EncryptionScopes" + ], + "description": "Returns the properties for the specified encryption scope.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "encryptionScopeName", + "in": "path", + "description": "The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/EncryptionScope" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountGetEncryptionScope": { + "$ref": "./examples/EncryptionScopes_Get.json" + } + } + }, + "put": { + "operationId": "EncryptionScopes_Put", + "tags": [ + "EncryptionScopes" + ], + "description": "Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "encryptionScopeName", + "in": "path", + "description": "The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "encryptionScope", + "in": "body", + "description": "Encryption scope properties to be used for the create or update.", + "required": true, + "schema": { + "$ref": "#/definitions/EncryptionScope" + }, + "x-ms-client-name": "encryptionScope" + } + ], + "responses": { + "200": { + "description": "Resource 'EncryptionScope' update operation succeeded", + "schema": { + "$ref": "#/definitions/EncryptionScope" + } + }, + "201": { + "description": "Resource 'EncryptionScope' create operation succeeded", + "schema": { + "$ref": "#/definitions/EncryptionScope" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountPutEncryptionScope": { + "$ref": "./examples/EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope.json" + }, + "StorageAccountPutEncryptionScopeWithInfrastructureEncryption": { + "$ref": "./examples/EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope_With_Infrastructure_Encryption.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}/encryptionScopes/{name}": { + "patch": { + "operationId": "EncryptionScopes_Patch", + "tags": [ + "EncryptionScopes" + ], + "description": "Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "encryptionScopeName", + "in": "path", + "description": "The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "name", + "in": "path", + "description": "The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "encryptionScope", + "in": "body", + "description": "Encryption scope properties to be used for the update.", + "required": true, + "schema": { + "$ref": "#/definitions/EncryptionScope" + }, + "x-ms-client-name": "encryptionScope" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/EncryptionScope" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountPatchEncryptionScope": { + "$ref": "./examples/EncryptionScopes_Patch.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/failover": { + "post": { + "operationId": "StorageAccounts_Failover", + "tags": [ + "StorageAccounts" + ], + "description": "A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "failoverType", + "in": "query", + "description": "The parameter is set to 'Planned' to indicate whether a Planned failover is requested.", + "required": false, + "type": "string", + "enum": [ + "Planned" + ], + "x-ms-enum": { + "modelAsString": false + } + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "202": { + "description": "Resource operation accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Azure operation completed successfully." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountFailover": { + "$ref": "./examples/StorageAccounts_Failover_Storage_Account_Failover.json" + }, + "StorageAccountFailoverPlanned": { + "$ref": "./examples/StorageAccounts_Failover_Storage_Account_Failover_Planned.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices": { + "get": { + "operationId": "FileServices_List", + "tags": [ + "FileServicePropertiesOperationGroup" + ], + "description": "List all file services in storage accounts", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/FileServicePropertiesListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ListFileServices": { + "$ref": "./examples/FileServices_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default": { + "get": { + "operationId": "FileServices_GetServiceProperties", + "tags": [ + "FileServicePropertiesOperationGroup" + ], + "description": "Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/FileServiceProperties" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "GetFileServices": { + "$ref": "./examples/FileServices_GetServiceProperties.json" + } + } + }, + "put": { + "operationId": "FileServices_SetServiceProperties", + "tags": [ + "FileServicePropertiesOperationGroup" + ], + "description": "Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "parameters", + "in": "body", + "description": "The properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules.", + "required": true, + "schema": { + "$ref": "#/definitions/FileServiceProperties" + }, + "x-ms-client-name": "parameters" + } + ], + "responses": { + "200": { + "description": "Resource 'FileServiceProperties' update operation succeeded", + "schema": { + "$ref": "#/definitions/FileServiceProperties" + } + }, + "201": { + "description": "Resource 'FileServiceProperties' create operation succeeded", + "schema": { + "$ref": "#/definitions/FileServiceProperties" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PutFileServices": { + "$ref": "./examples/FileServices_SetServiceProperties_Put_File_Services.json" + }, + "PutFileServices_EnableSMBMultichannel": { + "$ref": "./examples/FileServices_SetServiceProperties_Put_File_Services_Enable_Smb_Multichannel.json" + }, + "PutFileServices_EnableSecureSmbFeatures": { + "$ref": "./examples/FileServices_SetServiceProperties_Put_File_Services_Enable_Secure_Smb_Features.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares": { + "get": { + "operationId": "FileShares_List", + "tags": [ + "FileShares" + ], + "description": "Lists all shares.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$maxpagesize", + "in": "query", + "description": "Optional. Specified maximum number of shares that can be included in the list.", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "Optional. When specified, only share names starting with the filter will be listed.", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "in": "query", + "description": "Optional, used to expand the properties within share's properties. Valid values are: deleted, snapshots. Should be passed as a string with delimiter ','", + "required": false, + "type": "string" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/FileShareListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ListDeletedShares": { + "$ref": "./examples/FileShares_List_List_Deleted_Shares.json" + }, + "ListShareSnapshots": { + "$ref": "./examples/FileShares_List_List_Share_Snapshots.json" + }, + "ListShares": { + "$ref": "./examples/FileShares_List_List_Shares.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}": { + "get": { + "operationId": "FileShares_Get", + "tags": [ + "FileShares" + ], + "description": "Gets properties of a specified share.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "Optional, used to expand the properties within share's properties. Valid values are: stats. Should be passed as a string with delimiter ','.", + "required": false, + "type": "string" + }, + { + "name": "x-ms-snapshot", + "in": "header", + "description": "Optional, used to retrieve properties of a snapshot.", + "required": false, + "type": "string" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "shareName", + "in": "path", + "description": "The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/FileShare" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "GetShareStats": { + "$ref": "./examples/FileShares_Get_Get_Share_Stats.json" + }, + "GetShares": { + "$ref": "./examples/FileShares_Get_Get_Shares.json" + } + } + }, + "put": { + "operationId": "FileShares_Create", + "tags": [ + "FileShares" + ], + "description": "Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "Optional, used to expand the properties within share's properties. Valid values are: snapshots. Should be passed as a string with delimiter ','", + "required": false, + "type": "string" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "shareName", + "in": "path", + "description": "The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "fileShare", + "in": "body", + "description": "Properties of the file share to create.", + "required": true, + "schema": { + "$ref": "#/definitions/FileShare" + }, + "x-ms-client-name": "fileShare" + } + ], + "responses": { + "200": { + "description": "Resource 'FileShare' update operation succeeded", + "schema": { + "$ref": "#/definitions/FileShare" + } + }, + "201": { + "description": "Resource 'FileShare' create operation succeeded", + "schema": { + "$ref": "#/definitions/FileShare" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Create NFS Shares": { + "$ref": "./examples/FileShares_Create_Create_Nfs_Shares.json" + }, + "PutShares": { + "$ref": "./examples/FileShares_Create_Put_Shares.json" + }, + "PutShares with Access Tier": { + "$ref": "./examples/FileShares_Create_Put_Shares_With_Access_Tier.json" + } + } + }, + "delete": { + "operationId": "FileShares_Delete", + "tags": [ + "FileShares" + ], + "description": "Deletes specified share under its account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "x-ms-snapshot", + "in": "header", + "description": "Optional, used to delete a snapshot.", + "required": false, + "type": "string" + }, + { + "name": "$include", + "in": "query", + "description": "Optional. Valid values are: snapshots, leased-snapshots, none. The default value is snapshots. For 'snapshots', the file share is deleted including all of its file share snapshots. If the file share contains leased-snapshots, the deletion fails. For 'leased-snapshots', the file share is deleted included all of its file share snapshots (leased/unleased). For 'none', the file share is deleted if it has no share snapshots. If the file share contains any snapshots (leased or unleased), the deletion fails.", + "required": false, + "type": "string" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "shareName", + "in": "path", + "description": "The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeleteShares": { + "$ref": "./examples/FileShares_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}/lease": { + "post": { + "operationId": "FileShares_Lease", + "tags": [ + "FileShares" + ], + "description": "The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "x-ms-snapshot", + "in": "header", + "description": "Optional. Specify the snapshot time to lease a snapshot.", + "required": false, + "type": "string" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "shareName", + "in": "path", + "description": "The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "parameters", + "in": "body", + "description": "Lease Share request body.", + "required": true, + "schema": { + "$ref": "#/definitions/LeaseShareRequest" + }, + "x-ms-client-name": "parameters" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/LeaseShareResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Acquire a lease on a share": { + "$ref": "./examples/FileShares_Lease_Acquire_A_Lease_On_A_Share.json" + }, + "Break a lease on a share": { + "$ref": "./examples/FileShares_Lease_Break_A_Lease_On_A_Share.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}/restore": { + "post": { + "operationId": "FileShares_Restore", + "tags": [ + "FileShares" + ], + "description": "Restore a file share within a valid retention days if share soft delete is enabled", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "shareName", + "in": "path", + "description": "The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "deletedShare", + "in": "body", + "description": "", + "required": true, + "schema": { + "$ref": "#/definitions/DeletedShare" + }, + "x-ms-client-name": "deletedShare" + } + ], + "responses": { + "204": { + "description": "Azure operation completed successfully." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "RestoreShares": { + "$ref": "./examples/FileShares_Restore.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}/shares/{name}": { + "patch": { + "operationId": "FileShares_Update", + "tags": [ + "FileShares" + ], + "description": "Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "shareName", + "in": "path", + "description": "The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "name", + "in": "path", + "description": "The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "fileShare", + "in": "body", + "description": "Properties to update for the file share.", + "required": true, + "schema": { + "$ref": "#/definitions/FileShare" + }, + "x-ms-client-name": "fileShare" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/FileShare" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "UpdateShareAcls": { + "$ref": "./examples/FileShares_Update_Update_Share_Acls.json" + }, + "UpdateShares": { + "$ref": "./examples/FileShares_Update_Update_Shares.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/hierarchicalNamespaceMigration": { + "post": { + "operationId": "StorageAccounts_HierarchicalNamespaceMigration", + "tags": [ + "StorageAccounts" + ], + "description": "Live Migration of storage account to enable Hns", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "requestType", + "in": "query", + "description": "Required. Hierarchical namespace migration type can either be a hierarchical namespace validation request 'HnsOnValidationRequest' or a hydration request 'HnsOnHydrationRequest'. The validation request will validate the migration whereas the hydration request will migrate the account.", + "required": true, + "type": "string" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "202": { + "description": "Resource operation accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Azure operation completed successfully." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountHierarchicalNamespaceMigration": { + "$ref": "./examples/StorageAccounts_HierarchicalNamespaceMigration.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies": { + "get": { + "operationId": "BlobInventoryPolicies_List", + "tags": [ + "BlobInventoryPolicies" + ], + "description": "Gets the blob inventory policy associated with the specified storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/BlobInventoryPolicyListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountGetBlobInventoryPolicy": { + "$ref": "./examples/BlobInventoryPolicies_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/inventoryPolicies/default": { + "get": { + "operationId": "BlobInventoryPolicies_Get", + "tags": [ + "BlobInventoryPolicies" + ], + "description": "Gets the blob inventory policy associated with the specified storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/BlobInventoryPolicy" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountGetBlobInventoryPolicy": { + "$ref": "./examples/BlobInventoryPolicies_Get.json" + } + } + }, + "put": { + "operationId": "BlobInventoryPolicies_CreateOrUpdate", + "tags": [ + "BlobInventoryPolicies" + ], + "description": "Sets the blob inventory policy to the specified storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "properties", + "in": "body", + "description": "The blob inventory policy set to a storage account.", + "required": true, + "schema": { + "$ref": "#/definitions/BlobInventoryPolicy" + }, + "x-ms-client-name": "properties" + } + ], + "responses": { + "200": { + "description": "Resource 'BlobInventoryPolicy' update operation succeeded", + "schema": { + "$ref": "#/definitions/BlobInventoryPolicy" + } + }, + "201": { + "description": "Resource 'BlobInventoryPolicy' create operation succeeded", + "schema": { + "$ref": "#/definitions/BlobInventoryPolicy" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountSetBlobInventoryPolicy": { + "$ref": "./examples/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy.json" + }, + "StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount": { + "$ref": "./examples/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Hns_Account.json" + }, + "StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount": { + "$ref": "./examples/BlobInventoryPolicies_CreateOrUpdate_Storage_Account_Set_Blob_Inventory_Policy_Include_Delete_And_New_Schema_For_Non_Hns_Account.json" + } + } + }, + "delete": { + "operationId": "BlobInventoryPolicies_Delete", + "tags": [ + "BlobInventoryPolicies" + ], + "description": "Deletes the blob inventory policy associated with the specified storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountDeleteBlobInventoryPolicy": { + "$ref": "./examples/BlobInventoryPolicies_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listAccountSAS": { + "post": { + "operationId": "StorageAccounts_ListAccountSAS", + "tags": [ + "StorageAccounts" + ], + "description": "List SAS credentials of a storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters to provide to list SAS credentials for the storage account.", + "required": true, + "schema": { + "$ref": "#/definitions/AccountSasParameters" + }, + "x-ms-client-name": "parameters" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ListAccountSasResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountListAccountSAS": { + "$ref": "./examples/StorageAccounts_ListAccountSAS.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listKeys": { + "post": { + "operationId": "StorageAccounts_ListKeys", + "tags": [ + "StorageAccounts" + ], + "description": "Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$expand", + "in": "query", + "description": "Specifies type of the key to be listed. Possible value is kerb.", + "required": false, + "type": "string", + "enum": [ + "kerb" + ], + "x-ms-enum": { + "modelAsString": false + } + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/StorageAccountListKeysResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountListKeys": { + "$ref": "./examples/StorageAccounts_ListKeys.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/listServiceSAS": { + "post": { + "operationId": "StorageAccounts_ListServiceSAS", + "tags": [ + "StorageAccounts" + ], + "description": "List service SAS credentials of a specific resource.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters to provide to list service SAS credentials.", + "required": true, + "schema": { + "$ref": "#/definitions/ServiceSasParameters" + }, + "x-ms-client-name": "parameters" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ListServiceSasResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountListServiceSAS": { + "$ref": "./examples/StorageAccounts_ListServiceSAS.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers": { + "get": { + "operationId": "LocalUsers_List", + "tags": [ + "LocalUsers" + ], + "description": "List the local users associated with the storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/LocalUserListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ListLocalUsers": { + "$ref": "./examples/LocalUsers_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}": { + "get": { + "operationId": "LocalUsers_Get", + "tags": [ + "LocalUsers" + ], + "description": "Get the local user of the storage account by username.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "username", + "in": "path", + "description": "The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 64 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/LocalUser" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "GetLocalUser": { + "$ref": "./examples/LocalUsers_Get.json" + } + } + }, + "put": { + "operationId": "LocalUsers_CreateOrUpdate", + "tags": [ + "LocalUsers" + ], + "description": "Create or update the properties of a local user associated with the storage account", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "username", + "in": "path", + "description": "The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 64 + }, + { + "name": "properties", + "in": "body", + "description": "The local user associated with a storage account.", + "required": true, + "schema": { + "$ref": "#/definitions/LocalUser" + }, + "x-ms-client-name": "properties" + } + ], + "responses": { + "200": { + "description": "Resource 'LocalUser' update operation succeeded", + "schema": { + "$ref": "#/definitions/LocalUser" + } + }, + "201": { + "description": "Resource 'LocalUser' create operation succeeded", + "schema": { + "$ref": "#/definitions/LocalUser" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "CreateLocalUser": { + "$ref": "./examples/LocalUsers_CreateOrUpdate_Create_Local_User.json" + }, + "UpdateLocalUser": { + "$ref": "./examples/LocalUsers_CreateOrUpdate_Update_Local_User.json" + } + } + }, + "delete": { + "operationId": "LocalUsers_Delete", + "tags": [ + "LocalUsers" + ], + "description": "Deletes the local user associated with the specified storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "username", + "in": "path", + "description": "The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 64 + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeleteLocalUser": { + "$ref": "./examples/LocalUsers_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}/listKeys": { + "post": { + "operationId": "LocalUsers_ListKeys", + "tags": [ + "LocalUsers" + ], + "description": "List SSH authorized keys and shared key of the local user.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "username", + "in": "path", + "description": "The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 64 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/LocalUserKeys" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "ListLocalUserKeys": { + "$ref": "./examples/LocalUsers_ListKeys.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/localUsers/{username}/regeneratePassword": { + "post": { + "operationId": "LocalUsers_RegeneratePassword", + "tags": [ + "LocalUsers" + ], + "description": "Regenerate the local user SSH password.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "username", + "in": "path", + "description": "The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 64 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/LocalUserRegeneratePasswordResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "RegenerateLocalUserPassword": { + "$ref": "./examples/LocalUsers_RegeneratePassword.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/managementPolicies/default": { + "get": { + "operationId": "ManagementPolicies_Get", + "tags": [ + "ManagementPolicies" + ], + "description": "Gets the managementpolicy associated with the specified storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ManagementPolicy" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountGetManagementPolicies": { + "$ref": "./examples/ManagementPolicies_Get.json" + } + } + }, + "put": { + "operationId": "ManagementPolicies_CreateOrUpdate", + "tags": [ + "ManagementPolicies" + ], + "description": "Sets the managementpolicy to the specified storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "properties", + "in": "body", + "description": "The ManagementPolicy set to a storage account.", + "required": true, + "schema": { + "$ref": "#/definitions/ManagementPolicy" + }, + "x-ms-client-name": "properties" + } + ], + "responses": { + "200": { + "description": "Resource 'ManagementPolicy' update operation succeeded", + "schema": { + "$ref": "#/definitions/ManagementPolicy" + } + }, + "201": { + "description": "Resource 'ManagementPolicy' create operation succeeded", + "schema": { + "$ref": "#/definitions/ManagementPolicy" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountSetManagementPolicies": { + "$ref": "./examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policies.json" + }, + "StorageAccountSetManagementPolicyColdTierActions": { + "$ref": "./examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Cold_Tier_Actions.json" + }, + "StorageAccountSetManagementPolicyForBlockAndAppendBlobs": { + "$ref": "./examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_For_Block_And_Append_Blobs.json" + }, + "StorageAccountSetManagementPolicyHotTierActions": { + "$ref": "./examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Hot_Tier_Actions.json" + }, + "StorageAccountSetManagementPolicyWithSnapshotAndVersion": { + "$ref": "./examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_With_Snapshot_And_Version.json" + }, + "StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions": { + "$ref": "./examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Base_Blob_Days_After_Creation_Actions.json" + }, + "StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions": { + "$ref": "./examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Access_Time_Based_Blob_Actions.json" + }, + "StorageAccountSetManagementPolicy_LastTierChangeTimeActions": { + "$ref": "./examples/ManagementPolicies_CreateOrUpdate_Storage_Account_Set_Management_Policy_Last_Tier_Change_Time_Actions.json" + } + } + }, + "delete": { + "operationId": "ManagementPolicies_Delete", + "tags": [ + "ManagementPolicies" + ], + "description": "Deletes the managementpolicy associated with the specified storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountDeleteManagementPolicies": { + "$ref": "./examples/ManagementPolicies_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies": { + "get": { + "operationId": "ObjectReplicationPolicies_List", + "tags": [ + "ObjectReplicationPolicies" + ], + "description": "List the object replication policies associated with the storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ObjectReplicationPolicyListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountListObjectReplicationPolicies": { + "$ref": "./examples/ObjectReplicationPolicies_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/objectReplicationPolicies/{objectReplicationPolicyId}": { + "get": { + "operationId": "ObjectReplicationPolicies_Get", + "tags": [ + "ObjectReplicationPolicies" + ], + "description": "Get the object replication policy of the storage account by policy ID.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "objectReplicationPolicyId", + "in": "path", + "description": "For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.", + "required": true, + "type": "string", + "minLength": 1 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ObjectReplicationPolicy" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountGetObjectReplicationPolicies": { + "$ref": "./examples/ObjectReplicationPolicies_Get.json" + } + } + }, + "put": { + "operationId": "ObjectReplicationPolicies_CreateOrUpdate", + "tags": [ + "ObjectReplicationPolicies" + ], + "description": "Create or update the object replication policy of the storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "objectReplicationPolicyId", + "in": "path", + "description": "For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.", + "required": true, + "type": "string", + "minLength": 1 + }, + { + "name": "properties", + "in": "body", + "description": "The object replication policy set to a storage account. A unique policy ID will be created if absent.", + "required": true, + "schema": { + "$ref": "#/definitions/ObjectReplicationPolicy" + }, + "x-ms-client-name": "properties" + } + ], + "responses": { + "200": { + "description": "Resource 'ObjectReplicationPolicy' update operation succeeded", + "schema": { + "$ref": "#/definitions/ObjectReplicationPolicy" + } + }, + "201": { + "description": "Resource 'ObjectReplicationPolicy' create operation succeeded", + "schema": { + "$ref": "#/definitions/ObjectReplicationPolicy" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountCreateObjectReplicationPolicyOnDestination": { + "$ref": "./examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Destination.json" + }, + "StorageAccountCreateObjectReplicationPolicyOnSource": { + "$ref": "./examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Create_Object_Replication_Policy_On_Source.json" + }, + "StorageAccountUpdateObjectReplicationPolicyOnDestination": { + "$ref": "./examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Destination.json" + }, + "StorageAccountUpdateObjectReplicationPolicyOnSource": { + "$ref": "./examples/ObjectReplicationPolicies_CreateOrUpdate_Storage_Account_Update_Object_Replication_Policy_On_Source.json" + } + } + }, + "delete": { + "operationId": "ObjectReplicationPolicies_Delete", + "tags": [ + "ObjectReplicationPolicies" + ], + "description": "Deletes the object replication policy associated with the specified storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "objectReplicationPolicyId", + "in": "path", + "description": "For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file.", + "required": true, + "type": "string", + "minLength": 1 + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountDeleteObjectReplicationPolicies": { + "$ref": "./examples/ObjectReplicationPolicies_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections": { + "get": { + "operationId": "PrivateEndpointConnections_List", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "List all the private endpoint connections associated with the storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnectionListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountListPrivateEndpointConnections": { + "$ref": "./examples/PrivateEndpointConnections_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}": { + "get": { + "operationId": "PrivateEndpointConnections_Get", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Gets the specified private endpoint connection associated with the storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "description": "The name of the private endpoint connection associated with the Azure resource", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountGetPrivateEndpointConnection": { + "$ref": "./examples/PrivateEndpointConnections_Get.json" + } + } + }, + "put": { + "operationId": "PrivateEndpointConnections_Put", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Update the state of specified private endpoint connection associated with the storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "description": "The name of the private endpoint connection associated with the Azure resource", + "required": true, + "type": "string" + }, + { + "name": "properties", + "in": "body", + "description": "The private endpoint connection properties.", + "required": true, + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + }, + "x-ms-client-name": "properties" + } + ], + "responses": { + "200": { + "description": "Resource 'PrivateEndpointConnection' update operation succeeded", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "201": { + "description": "Resource 'PrivateEndpointConnection' create operation succeeded", + "schema": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountPutPrivateEndpointConnection": { + "$ref": "./examples/PrivateEndpointConnections_Put.json" + } + } + }, + "delete": { + "operationId": "PrivateEndpointConnections_Delete", + "tags": [ + "PrivateEndpointConnections" + ], + "description": "Deletes the specified private endpoint connection associated with the storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "privateEndpointConnectionName", + "in": "path", + "description": "The name of the private endpoint connection associated with the Azure resource", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountDeletePrivateEndpointConnection": { + "$ref": "./examples/PrivateEndpointConnections_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateLinkResources/resourceGroups/{resourceGroupName}/{accountName}/subscriptions/{subscriptionId}": { + "get": { + "operationId": "PrivateLinkResources_ListByStorageAccount", + "tags": [ + "StorageAccounts" + ], + "description": "Gets the private link resources that need to be created for a storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/PrivateLinkResourceListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountListPrivateLinkResources": { + "$ref": "./examples/PrivateLinkResources_ListByStorageAccount.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices": { + "get": { + "operationId": "QueueServices_List", + "tags": [ + "QueueServicePropertiesOperationGroup" + ], + "description": "List all queue services for the storage account", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/QueueServicePropertiesListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "QueueServicesList": { + "$ref": "./examples/QueueServices_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default": { + "get": { + "operationId": "QueueServices_GetServiceProperties", + "tags": [ + "QueueServicePropertiesOperationGroup" + ], + "description": "Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/QueueServiceProperties" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "QueueServicesGet": { + "$ref": "./examples/QueueServices_GetServiceProperties.json" + } + } + }, + "put": { + "operationId": "QueueServices_SetServiceProperties", + "tags": [ + "QueueServicePropertiesOperationGroup" + ], + "description": "Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "parameters", + "in": "body", + "description": "The properties of a storage account’s Queue service, only properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules can be specified.", + "required": true, + "schema": { + "$ref": "#/definitions/QueueServiceProperties" + }, + "x-ms-client-name": "parameters" + } + ], + "responses": { + "200": { + "description": "Resource 'QueueServiceProperties' update operation succeeded", + "schema": { + "$ref": "#/definitions/QueueServiceProperties" + } + }, + "201": { + "description": "Resource 'QueueServiceProperties' create operation succeeded", + "schema": { + "$ref": "#/definitions/QueueServiceProperties" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "QueueServicesPut": { + "$ref": "./examples/QueueServices_SetServiceProperties.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues": { + "get": { + "operationId": "Queue_List", + "tags": [ + "StorageQueues" + ], + "description": "Gets a list of all the queues under the specified storage account", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "$maxpagesize", + "in": "query", + "description": "Optional, a maximum number of queues that should be included in a list queue response", + "required": false, + "type": "string" + }, + { + "name": "$filter", + "in": "query", + "description": "Optional, When specified, only the queues with a name starting with the given filter will be listed.", + "required": false, + "type": "string" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/StorageQueueListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "QueueOperationList": { + "$ref": "./examples/Queue_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}": { + "get": { + "operationId": "Queue_Get", + "tags": [ + "StorageQueues" + ], + "description": "Gets the queue with the specified queue name, under the specified account if it exists.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "queueName", + "in": "path", + "description": "A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/StorageQueue" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "QueueOperationGet": { + "$ref": "./examples/Queue_Get.json" + } + } + }, + "put": { + "operationId": "Queue_Create", + "tags": [ + "StorageQueues" + ], + "description": "Creates a new queue with the specified queue name, under the specified account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "queueName", + "in": "path", + "description": "A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$" + }, + { + "name": "queue", + "in": "body", + "description": "Queue properties and metadata to be created with", + "required": true, + "schema": { + "$ref": "#/definitions/StorageQueue" + }, + "x-ms-client-name": "queue" + } + ], + "responses": { + "200": { + "description": "Resource 'StorageQueue' update operation succeeded", + "schema": { + "$ref": "#/definitions/StorageQueue" + } + }, + "201": { + "description": "Resource 'StorageQueue' create operation succeeded", + "schema": { + "$ref": "#/definitions/StorageQueue" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "QueueOperationPut": { + "$ref": "./examples/Queue_Create_Queue_Operation_Put.json" + }, + "QueueOperationPutWithMetadata": { + "$ref": "./examples/Queue_Create_Queue_Operation_Put_With_Metadata.json" + } + } + }, + "delete": { + "operationId": "Queue_Delete", + "tags": [ + "StorageQueues" + ], + "description": "Deletes the queue with the specified queue name, under the specified account if it exists.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "queueName", + "in": "path", + "description": "A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "QueueOperationDelete": { + "$ref": "./examples/Queue_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}/queues/{name}": { + "patch": { + "operationId": "Queue_Update", + "tags": [ + "StorageQueues" + ], + "description": "Creates a new queue with the specified queue name, under the specified account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "queueName", + "in": "path", + "description": "A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$" + }, + { + "name": "name", + "in": "path", + "description": "A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$" + }, + { + "name": "queue", + "in": "body", + "description": "Queue properties and metadata to be created with", + "required": true, + "schema": { + "$ref": "#/definitions/StorageQueue" + }, + "x-ms-client-name": "queue" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/StorageQueue" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "QueueOperationPatch": { + "$ref": "./examples/Queue_Update.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/regenerateKey": { + "post": { + "operationId": "StorageAccounts_RegenerateKey", + "tags": [ + "StorageAccounts" + ], + "description": "Regenerates one of the access keys or Kerberos keys for the specified storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "regenerateKey", + "in": "body", + "description": "Specifies name of the key which should be regenerated -- key1, key2, kerb1, kerb2.", + "required": true, + "schema": { + "$ref": "#/definitions/StorageAccountRegenerateKeyParameters" + }, + "x-ms-client-name": "regenerateKey" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/StorageAccountListKeysResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountRegenerateKerbKey": { + "$ref": "./examples/StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Kerb_Key.json" + }, + "StorageAccountRegenerateKey": { + "$ref": "./examples/StorageAccounts_RegenerateKey_Storage_Account_Regenerate_Key.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/restoreBlobRanges": { + "post": { + "operationId": "StorageAccounts_RestoreBlobRanges", + "tags": [ + "StorageAccounts" + ], + "description": "Restore blobs in the specified blob ranges", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters to provide for restore blob ranges.", + "required": true, + "schema": { + "$ref": "#/definitions/BlobRestoreParameters" + }, + "x-ms-client-name": "parameters" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/BlobRestoreStatus" + } + }, + "202": { + "description": "Resource operation accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "BlobRangesRestore": { + "$ref": "./examples/StorageAccounts_RestoreBlobRanges.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/revokeUserDelegationKeys": { + "post": { + "operationId": "StorageAccounts_RevokeUserDelegationKeys", + "tags": [ + "StorageAccounts" + ], + "description": "Revoke user delegation keys.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "204": { + "description": "Azure operation completed successfully." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "StorageAccountRevokeUserDelegationKeys": { + "$ref": "./examples/StorageAccounts_RevokeUserDelegationKeys.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices": { + "get": { + "operationId": "TableServices_List", + "tags": [ + "TableServicePropertiesOperationGroup" + ], + "description": "List all table services for the storage account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/TableServicePropertiesListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "TableServicesList": { + "$ref": "./examples/TableServices_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default": { + "get": { + "operationId": "TableServices_GetServiceProperties", + "tags": [ + "TableServicePropertiesOperationGroup" + ], + "description": "Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/TableServiceProperties" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "TableServicesGet": { + "$ref": "./examples/TableServices_GetServiceProperties.json" + } + } + }, + "put": { + "operationId": "TableServices_SetServiceProperties", + "tags": [ + "TableServicePropertiesOperationGroup" + ], + "description": "Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "parameters", + "in": "body", + "description": "The properties of a storage account’s Table service, only properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules can be specified.", + "required": true, + "schema": { + "$ref": "#/definitions/TableServiceProperties" + }, + "x-ms-client-name": "parameters" + } + ], + "responses": { + "200": { + "description": "Resource 'TableServiceProperties' update operation succeeded", + "schema": { + "$ref": "#/definitions/TableServiceProperties" + } + }, + "201": { + "description": "Resource 'TableServiceProperties' create operation succeeded", + "schema": { + "$ref": "#/definitions/TableServiceProperties" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "TableServicesPut": { + "$ref": "./examples/TableServices_SetServiceProperties.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables": { + "get": { + "operationId": "Table_List", + "tags": [ + "Tables" + ], + "description": "Gets a list of all the tables under the specified storage account", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/TableListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "TableOperationList": { + "$ref": "./examples/Table_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}": { + "get": { + "operationId": "Table_Get", + "tags": [ + "Tables" + ], + "description": "Gets the table with the specified table name, under the specified account if it exists.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "tableName", + "in": "path", + "description": "A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[A-Za-z][A-Za-z0-9]{2,62}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Table" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "TableOperationGet": { + "$ref": "./examples/Table_Get.json" + } + } + }, + "put": { + "operationId": "Table_Create", + "tags": [ + "Tables" + ], + "description": "Creates a new table with the specified table name, under the specified account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "tableName", + "in": "path", + "description": "A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[A-Za-z][A-Za-z0-9]{2,62}$" + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters to provide to create a table.", + "required": true, + "schema": { + "$ref": "#/definitions/Table" + }, + "x-ms-client-name": "parameters" + } + ], + "responses": { + "200": { + "description": "Resource 'Table' update operation succeeded", + "schema": { + "$ref": "#/definitions/Table" + } + }, + "201": { + "description": "Resource 'Table' create operation succeeded", + "schema": { + "$ref": "#/definitions/Table" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "TableOperationPut": { + "$ref": "./examples/Table_Create_Table_Operation_Put.json" + }, + "TableOperationPutOrPatchAcls": { + "$ref": "./examples/Table_Create_Table_Operation_Put_Or_Patch_Acls.json" + } + } + }, + "delete": { + "operationId": "Table_Delete", + "tags": [ + "Tables" + ], + "description": "Deletes the table with the specified table name, under the specified account if it exists.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "tableName", + "in": "path", + "description": "A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[A-Za-z][A-Za-z0-9]{2,62}$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "TableOperationDelete": { + "$ref": "./examples/Table_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}/tables/{name}": { + "patch": { + "operationId": "Table_Update", + "tags": [ + "Tables" + ], + "description": "Creates a new table with the specified table name, under the specified account.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "tableName", + "in": "path", + "description": "A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[A-Za-z][A-Za-z0-9]{2,62}$" + }, + { + "name": "name", + "in": "path", + "description": "A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63, + "pattern": "^[A-Za-z][A-Za-z0-9]{2,62}$" + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters to provide to create a table.", + "required": true, + "schema": { + "$ref": "#/definitions/Table" + }, + "x-ms-client-name": "parameters" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Table" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "TableOperationPatch": { + "$ref": "./examples/Table_Update_Table_Operation_Patch.json" + }, + "TableOperationPutOrPatchAcls": { + "$ref": "./examples/Table_Update_Table_Operation_Put_Or_Patch_Acls.json" + } + } + } + } + }, + "definitions": { + "AccessPolicy": { + "type": "object", + "properties": { + "startTime": { + "type": "string", + "format": "date-time", + "description": "Start time of the access policy" + }, + "expiryTime": { + "type": "string", + "format": "date-time", + "description": "Expiry time of the access policy" + }, + "permission": { + "type": "string", + "description": "List of abbreviated permissions." + } + } + }, + "AccessTier": { + "type": "string", + "description": "Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.", + "enum": [ + "Hot", + "Cool", + "Premium" + ], + "x-ms-enum": { + "name": "AccessTier", + "modelAsString": false + } + }, + "AccountImmutabilityPolicyProperties": { + "type": "object", + "description": "This defines account-level immutability policy properties.", + "properties": { + "immutabilityPeriodSinceCreationInDays": { + "type": "integer", + "format": "int32", + "description": "The immutability period for the blobs in the container since the policy creation, in days.", + "minimum": 1, + "maximum": 146000 + }, + "state": { + "$ref": "#/definitions/AccountImmutabilityPolicyState", + "description": "The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted." + }, + "allowProtectedAppendWrites": { + "type": "boolean", + "description": "This property can only be changed for disabled and unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted." + } + } + }, + "AccountImmutabilityPolicyState": { + "type": "string", + "description": "The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted.", + "enum": [ + "Unlocked", + "Locked", + "Disabled" + ], + "x-ms-enum": { + "name": "AccountImmutabilityPolicyState", + "modelAsString": true + } + }, + "AccountSasParameters": { + "type": "object", + "description": "The parameters to list SAS credentials of a storage account.", + "properties": { + "signedServices": { + "$ref": "#/definitions/Services", + "description": "The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f).", + "x-ms-client-name": "services" + }, + "signedResourceTypes": { + "$ref": "#/definitions/SignedResourceTypes", + "description": "The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files.", + "x-ms-client-name": "resourceTypes" + }, + "signedPermission": { + "$ref": "#/definitions/Permissions", + "description": "The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p).", + "x-ms-client-name": "permissions" + }, + "signedIp": { + "type": "string", + "description": "An IP address or a range of IP addresses from which to accept requests.", + "x-ms-client-name": "IPAddressOrRange" + }, + "signedProtocol": { + "$ref": "#/definitions/HttpProtocol", + "description": "The protocol permitted for a request made with the account SAS.", + "x-ms-client-name": "protocols" + }, + "signedStart": { + "type": "string", + "format": "date-time", + "description": "The time at which the SAS becomes valid.", + "x-ms-client-name": "sharedAccessStartTime" + }, + "signedExpiry": { + "type": "string", + "format": "date-time", + "description": "The time at which the shared access signature becomes invalid.", + "x-ms-client-name": "sharedAccessExpiryTime" + }, + "keyToSign": { + "type": "string", + "description": "The key to sign the account SAS token with." + } + }, + "required": [ + "signedServices", + "signedResourceTypes", + "signedPermission", + "signedExpiry" + ] + }, + "AccountStatus": { + "type": "string", + "description": "Gets the status indicating whether the primary location of the storage account is available or unavailable.", + "enum": [ + "available", + "unavailable" + ], + "x-ms-enum": { + "name": "AccountStatus", + "modelAsString": false + } + }, + "AccountType": { + "type": "string", + "description": "Specifies the Active Directory account type for Azure Storage.", + "enum": [ + "User", + "Computer" + ], + "x-ms-enum": { + "name": "AccountType", + "modelAsString": true + } + }, + "ActiveDirectoryProperties": { + "type": "object", + "description": "Settings properties for Active Directory (AD).", + "properties": { + "domainName": { + "type": "string", + "description": "Specifies the primary domain that the AD DNS server is authoritative for." + }, + "netBiosDomainName": { + "type": "string", + "description": "Specifies the NetBIOS domain name." + }, + "forestName": { + "type": "string", + "description": "Specifies the Active Directory forest to get." + }, + "domainGuid": { + "type": "string", + "description": "Specifies the domain GUID." + }, + "domainSid": { + "type": "string", + "description": "Specifies the security identifier (SID)." + }, + "azureStorageSid": { + "type": "string", + "description": "Specifies the security identifier (SID) for Azure Storage." + }, + "samAccountName": { + "type": "string", + "description": "Specifies the Active Directory SAMAccountName for Azure Storage." + }, + "accountType": { + "$ref": "#/definitions/AccountType", + "description": "Specifies the Active Directory account type for Azure Storage." + } + }, + "required": [ + "domainName", + "domainGuid" + ] + }, + "AllowedCopyScope": { + "type": "string", + "description": "Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet.", + "enum": [ + "PrivateLink", + "AAD" + ], + "x-ms-enum": { + "name": "AllowedCopyScope", + "modelAsString": true + } + }, + "AllowedMethods": { + "type": "string", + "enum": [ + "DELETE", + "GET", + "HEAD", + "MERGE", + "POST", + "OPTIONS", + "PUT", + "PATCH" + ], + "x-ms-enum": { + "name": "AllowedMethods", + "modelAsString": true + } + }, + "Azure.ResourceManager.Foundations.SkuTier": { + "type": "string", + "description": "Available service tiers for the SKU.", + "enum": [ + "Free", + "Basic", + "Standard", + "Premium" + ], + "x-ms-enum": { + "name": "SkuTier", + "modelAsString": true, + "values": [ + { + "name": "Free", + "value": "Free", + "description": "The Free service tier." + }, + { + "name": "Basic", + "value": "Basic", + "description": "The Basic service tier." + }, + { + "name": "Standard", + "value": "Standard", + "description": "The Standard service tier." + }, + { + "name": "Premium", + "value": "Premium", + "description": "The Premium service tier." + } + ] + } + }, + "Azure.ResourceManager.Foundations.UserAssignedIdentity": { + "type": "object", + "description": "A managed identity assigned by the user.", + "properties": { + "clientId": { + "type": "string", + "description": "The active directory client identifier for this principal." + }, + "principalId": { + "type": "string", + "description": "The active directory identifier for this principal." + } + } + }, + "AzureEntityResource": { + "type": "object", + "description": "The resource model definition for an Azure Resource Manager resource with an etag.", + "properties": { + "etag": { + "type": "string", + "description": "Resource Etag.", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "AzureFilesIdentityBasedAuthentication": { + "type": "object", + "description": "Settings for Azure Files identity based authentication.", + "properties": { + "directoryServiceOptions": { + "$ref": "#/definitions/DirectoryServiceOptions", + "description": "Indicates the directory service used. Note that this enum may be extended in the future." + }, + "activeDirectoryProperties": { + "$ref": "#/definitions/ActiveDirectoryProperties", + "description": "Required if directoryServiceOptions are AD, optional if they are AADKERB." + }, + "defaultSharePermission": { + "$ref": "#/definitions/DefaultSharePermission", + "description": "Default share permission for users using Kerberos authentication if RBAC role is not assigned." + } + }, + "required": [ + "directoryServiceOptions" + ] + }, + "BlobContainer": { + "type": "object", + "description": "Properties of the blob container, including Id, resource name, resource type, Etag.", + "properties": { + "properties": { + "$ref": "#/definitions/ContainerProperties", + "description": "Properties of the blob container.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "BlobContainerListResult": { + "type": "object", + "description": "The response of a BlobContainer list operation.", + "properties": { + "value": { + "type": "array", + "description": "The BlobContainer items on this page", + "items": { + "$ref": "#/definitions/BlobContainer" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "BlobInventoryPolicy": { + "type": "object", + "description": "The storage account blob inventory policy.", + "properties": { + "name": { + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/BlobInventoryPolicyProperties", + "description": "Returns the storage account blob inventory policy rules.", + "x-ms-client-flatten": true + } + }, + "required": [ + "name" + ], + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "BlobInventoryPolicyDefinition": { + "type": "object", + "description": "An object that defines the blob inventory rule.", + "properties": { + "filters": { + "$ref": "#/definitions/BlobInventoryPolicyFilter", + "description": "An object that defines the filter set." + }, + "format": { + "$ref": "#/definitions/Format", + "description": "This is a required field, it specifies the format for the inventory files." + }, + "schedule": { + "$ref": "#/definitions/Schedule", + "description": "This is a required field. This field is used to schedule an inventory formation." + }, + "objectType": { + "$ref": "#/definitions/ObjectType", + "description": "This is a required field. This field specifies the scope of the inventory created either at the blob or container level." + }, + "schemaFields": { + "type": "array", + "description": "This is a required field. This field specifies the fields and properties of the object to be included in the inventory. The Schema field value 'Name' is always required. The valid values for this field for the 'Blob' definition.objectType include 'Name, Creation-Time, Last-Modified, Content-Length, Content-MD5, BlobType, AccessTier, AccessTierChangeTime, AccessTierInferred, Tags, Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, Snapshot, VersionId, IsCurrentVersion, Metadata, LastAccessTime, Tags, Etag, ContentType, ContentEncoding, ContentLanguage, ContentCRC64, CacheControl, ContentDisposition, LeaseStatus, LeaseState, LeaseDuration, ServerEncrypted, Deleted, DeletionId, DeletedTime, RemainingRetentionDays, ImmutabilityPolicyUntilDate, ImmutabilityPolicyMode, LegalHold, CopyId, CopyStatus, CopySource, CopyProgress, CopyCompletionTime, CopyStatusDescription, CustomerProvidedKeySha256, RehydratePriority, ArchiveStatus, XmsBlobSequenceNumber, EncryptionScope, IncrementalCopy, TagCount'. For Blob object type schema field value 'DeletedTime' is applicable only for Hns enabled accounts. The valid values for 'Container' definition.objectType include 'Name, Last-Modified, Metadata, LeaseStatus, LeaseState, LeaseDuration, PublicAccess, HasImmutabilityPolicy, HasLegalHold, Etag, DefaultEncryptionScope, DenyEncryptionScopeOverride, ImmutableStorageWithVersioningEnabled, Deleted, Version, DeletedTime, RemainingRetentionDays'. Schema field values 'Expiry-Time, hdi_isfolder, Owner, Group, Permissions, Acl, DeletionId' are valid only for Hns enabled accounts.Schema field values 'Tags, TagCount' are only valid for Non-Hns accounts.", + "items": { + "type": "string" + } + } + }, + "required": [ + "format", + "schedule", + "objectType", + "schemaFields" + ] + }, + "BlobInventoryPolicyFilter": { + "type": "object", + "description": "An object that defines the blob inventory rule filter conditions. For 'Blob' definition.objectType all filter properties are applicable, 'blobTypes' is required and others are optional. For 'Container' definition.objectType only prefixMatch is applicable and is optional.", + "properties": { + "prefixMatch": { + "type": "array", + "description": "An array of strings with maximum 10 blob prefixes to be included in the inventory.", + "items": { + "type": "string" + } + }, + "excludePrefix": { + "type": "array", + "description": "An array of strings with maximum 10 blob prefixes to be excluded from the inventory.", + "items": { + "type": "string" + } + }, + "blobTypes": { + "type": "array", + "description": "An array of predefined enum values. Valid values include blockBlob, appendBlob, pageBlob. Hns accounts does not support pageBlobs. This field is required when definition.objectType property is set to 'Blob'.", + "items": { + "type": "string" + } + }, + "includeBlobVersions": { + "type": "boolean", + "description": "Includes blob versions in blob inventory when value is set to true. The definition.schemaFields values 'VersionId and IsCurrentVersion' are required if this property is set to true, else they must be excluded." + }, + "includeSnapshots": { + "type": "boolean", + "description": "Includes blob snapshots in blob inventory when value is set to true. The definition.schemaFields value 'Snapshot' is required if this property is set to true, else it must be excluded." + }, + "includeDeleted": { + "type": "boolean", + "description": "For 'Container' definition.objectType the definition.schemaFields must include 'Deleted, Version, DeletedTime and RemainingRetentionDays'. For 'Blob' definition.objectType and HNS enabled storage accounts the definition.schemaFields must include 'DeletionId, Deleted, DeletedTime and RemainingRetentionDays' and for Hns disabled accounts the definition.schemaFields must include 'Deleted and RemainingRetentionDays', else it must be excluded." + } + } + }, + "BlobInventoryPolicyListResult": { + "type": "object", + "description": "The response of a BlobInventoryPolicy list operation.", + "properties": { + "value": { + "type": "array", + "description": "The BlobInventoryPolicy items on this page", + "items": { + "$ref": "#/definitions/BlobInventoryPolicy" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "BlobInventoryPolicyProperties": { + "type": "object", + "description": "The storage account blob inventory policy properties.", + "properties": { + "lastModifiedTime": { + "type": "string", + "format": "date-time", + "description": "Returns the last modified date and time of the blob inventory policy.", + "readOnly": true + }, + "policy": { + "$ref": "#/definitions/BlobInventoryPolicySchema", + "description": "The storage account blob inventory policy object. It is composed of policy rules." + } + }, + "required": [ + "policy" + ] + }, + "BlobInventoryPolicyRule": { + "type": "object", + "description": "An object that wraps the blob inventory rule. Each rule is uniquely defined by name.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Rule is enabled when set to true." + }, + "name": { + "type": "string", + "description": "A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy." + }, + "destination": { + "type": "string", + "description": "Container name where blob inventory files are stored. Must be pre-created." + }, + "definition": { + "$ref": "#/definitions/BlobInventoryPolicyDefinition", + "description": "An object that defines the blob inventory policy rule." + } + }, + "required": [ + "enabled", + "name", + "destination", + "definition" + ] + }, + "BlobInventoryPolicySchema": { + "type": "object", + "description": "The storage account blob inventory policy rules.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Policy is enabled if set to true." + }, + "destination": { + "type": "string", + "description": "Deprecated Property from API version 2021-04-01 onwards, the required destination container name must be specified at the rule level 'policy.rule.destination'", + "readOnly": true + }, + "type": { + "$ref": "#/definitions/InventoryRuleType", + "description": "The valid value is Inventory" + }, + "rules": { + "type": "array", + "description": "The storage account blob inventory policy rules. The rule is applied when it is enabled.", + "items": { + "$ref": "#/definitions/BlobInventoryPolicyRule" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "enabled", + "type", + "rules" + ] + }, + "BlobRestoreParameters": { + "type": "object", + "description": "Blob restore parameters", + "properties": { + "timetoRestore": { + "type": "string", + "format": "date-time", + "description": "Restore blob to the specified time.", + "x-ms-client-name": "timeToRestore" + }, + "blobRanges": { + "type": "array", + "description": "Blob ranges to restore.", + "items": { + "$ref": "#/definitions/BlobRestoreRange" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "timetoRestore", + "blobRanges" + ] + }, + "BlobRestoreProgressStatus": { + "type": "string", + "description": "The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed.", + "enum": [ + "InProgress", + "Complete", + "Failed" + ], + "x-ms-enum": { + "name": "BlobRestoreProgressStatus", + "modelAsString": true + } + }, + "BlobRestoreRange": { + "type": "object", + "description": "Blob range", + "properties": { + "startRange": { + "type": "string", + "description": "Blob start range. This is inclusive. Empty means account start." + }, + "endRange": { + "type": "string", + "description": "Blob end range. This is exclusive. Empty means account end." + } + }, + "required": [ + "startRange", + "endRange" + ] + }, + "BlobRestoreStatus": { + "type": "object", + "description": "Blob restore status.", + "properties": { + "status": { + "$ref": "#/definitions/BlobRestoreProgressStatus", + "description": "The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed.", + "readOnly": true + }, + "failureReason": { + "type": "string", + "description": "Failure reason when blob restore is failed.", + "readOnly": true + }, + "restoreId": { + "type": "string", + "description": "Id for tracking blob restore request.", + "readOnly": true + }, + "parameters": { + "$ref": "#/definitions/BlobRestoreParameters", + "description": "Blob restore request parameters.", + "readOnly": true + } + } + }, + "BlobServiceProperties": { + "type": "object", + "description": "The properties of a storage account’s Blob service.", + "properties": { + "name": { + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/BlobServicePropertiesProperties", + "description": "The properties of a storage account’s Blob service.", + "x-ms-client-flatten": true + }, + "sku": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/Sku", + "description": "The SKU (Stock Keeping Unit) assigned to this resource." + } + }, + "required": [ + "name" + ], + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "BlobServicePropertiesListResult": { + "type": "object", + "description": "The response of a BlobServiceProperties list operation.", + "properties": { + "value": { + "type": "array", + "description": "The BlobServiceProperties items on this page", + "items": { + "$ref": "#/definitions/BlobServiceProperties" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "BlobServicePropertiesProperties": { + "type": "object", + "description": "The properties of a storage account’s Blob service.", + "properties": { + "cors": { + "$ref": "#/definitions/CorsRules", + "description": "Specifies CORS rules for the Blob service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Blob service." + }, + "defaultServiceVersion": { + "type": "string", + "description": "DefaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions." + }, + "deleteRetentionPolicy": { + "$ref": "#/definitions/DeleteRetentionPolicy", + "description": "The blob service properties for blob soft delete." + }, + "isVersioningEnabled": { + "type": "boolean", + "description": "Versioning is enabled if set to true." + }, + "automaticSnapshotPolicyEnabled": { + "type": "boolean", + "description": "Deprecated in favor of isVersioningEnabled property." + }, + "changeFeed": { + "$ref": "#/definitions/ChangeFeed", + "description": "The blob service properties for change feed events." + }, + "restorePolicy": { + "$ref": "#/definitions/RestorePolicyProperties", + "description": "The blob service properties for blob restore policy." + }, + "containerDeleteRetentionPolicy": { + "$ref": "#/definitions/DeleteRetentionPolicy", + "description": "The blob service properties for container soft delete." + }, + "lastAccessTimeTrackingPolicy": { + "$ref": "#/definitions/LastAccessTimeTrackingPolicy", + "description": "The blob service property to configure last access time based tracking policy." + } + } + }, + "ChangeFeed": { + "type": "object", + "description": "The blob service properties for change feed events.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Indicates whether change feed event logging is enabled for the Blob service." + }, + "retentionInDays": { + "type": "integer", + "format": "int32", + "description": "Indicates the duration of changeFeed retention in days. Minimum value is 1 day and maximum value is 146000 days (400 years). A null value indicates an infinite retention of the change feed.", + "minimum": 1, + "maximum": 146000 + } + } + }, + "CheckNameAvailabilityResult": { + "type": "object", + "description": "The CheckNameAvailability operation response.", + "properties": { + "nameAvailable": { + "type": "boolean", + "description": "Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used.", + "readOnly": true + }, + "reason": { + "$ref": "#/definitions/Reason", + "description": "Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Gets an error message explaining the Reason value in more detail.", + "readOnly": true + } + } + }, + "ContainerProperties": { + "type": "object", + "description": "The properties of a container.", + "properties": { + "version": { + "type": "string", + "description": "The version of the deleted blob container.", + "readOnly": true + }, + "deleted": { + "type": "boolean", + "description": "Indicates whether the blob container was deleted.", + "readOnly": true + }, + "deletedTime": { + "type": "string", + "format": "date-time", + "description": "Blob container deletion time.", + "readOnly": true + }, + "remainingRetentionDays": { + "type": "integer", + "format": "int32", + "description": "Remaining retention days for soft deleted blob container.", + "readOnly": true + }, + "defaultEncryptionScope": { + "type": "string", + "description": "Default the container to use specified encryption scope for all writes." + }, + "denyEncryptionScopeOverride": { + "type": "boolean", + "description": "Block override of encryption scope from the container default." + }, + "publicAccess": { + "$ref": "#/definitions/PublicAccess", + "description": "Specifies whether data in the container may be accessed publicly and the level of access." + }, + "lastModifiedTime": { + "type": "string", + "format": "date-time", + "description": "Returns the date and time the container was last modified.", + "readOnly": true + }, + "leaseStatus": { + "$ref": "#/definitions/LeaseStatus", + "description": "The lease status of the container.", + "readOnly": true + }, + "leaseState": { + "$ref": "#/definitions/LeaseState", + "description": "Lease state of the container.", + "readOnly": true + }, + "leaseDuration": { + "$ref": "#/definitions/LeaseDuration", + "description": "Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.", + "readOnly": true + }, + "metadata": { + "type": "object", + "description": "A name-value pair to associate with the container as metadata.", + "additionalProperties": { + "type": "string" + } + }, + "immutabilityPolicy": { + "$ref": "#/definitions/ImmutabilityPolicyProperties", + "description": "The ImmutabilityPolicy property of the container.", + "readOnly": true + }, + "legalHold": { + "$ref": "#/definitions/LegalHoldProperties", + "description": "The LegalHold property of the container.", + "readOnly": true + }, + "hasLegalHold": { + "type": "boolean", + "description": "The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.", + "readOnly": true + }, + "hasImmutabilityPolicy": { + "type": "boolean", + "description": "The hasImmutabilityPolicy public property is set to true by SRP if ImmutabilityPolicy has been created for this container. The hasImmutabilityPolicy public property is set to false by SRP if ImmutabilityPolicy has not been created for this container.", + "readOnly": true + }, + "immutableStorageWithVersioning": { + "$ref": "#/definitions/ImmutableStorageWithVersioning", + "description": "The object level immutability property of the container. The property is immutable and can only be set to true at the container creation time. Existing containers must undergo a migration process." + }, + "enableNfsV3RootSquash": { + "type": "boolean", + "description": "Enable NFSv3 root squash on blob container." + }, + "enableNfsV3AllSquash": { + "type": "boolean", + "description": "Enable NFSv3 all squash on blob container." + } + } + }, + "CorsRule": { + "type": "object", + "description": "Specifies a CORS rule for the Blob service.", + "properties": { + "allowedOrigins": { + "type": "array", + "description": "Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or \"*\" to allow all domains", + "items": { + "type": "string" + } + }, + "allowedMethods": { + "type": "array", + "description": "Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin.", + "items": { + "$ref": "#/definitions/AllowedMethods" + } + }, + "maxAgeInSeconds": { + "type": "integer", + "format": "int32", + "description": "Required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response." + }, + "exposedHeaders": { + "type": "array", + "description": "Required if CorsRule element is present. A list of response headers to expose to CORS clients.", + "items": { + "type": "string" + } + }, + "allowedHeaders": { + "type": "array", + "description": "Required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request.", + "items": { + "type": "string" + } + } + }, + "required": [ + "allowedOrigins", + "allowedMethods", + "maxAgeInSeconds", + "exposedHeaders", + "allowedHeaders" + ] + }, + "CorsRules": { + "type": "object", + "description": "Sets the CORS rules. You can include up to five CorsRule elements in the request.", + "properties": { + "corsRules": { + "type": "array", + "description": "The List of CORS rules. You can include up to five CorsRule elements in the request.", + "items": { + "$ref": "#/definitions/CorsRule" + }, + "x-ms-identifiers": [] + } + } + }, + "CustomDomain": { + "type": "object", + "description": "The custom domain assigned to this storage account. This can be set via Update.", + "properties": { + "name": { + "type": "string", + "description": "Gets or sets the custom domain name assigned to the storage account. Name is the CNAME source." + }, + "useSubDomainName": { + "type": "boolean", + "description": "Indicates whether indirect CName validation is enabled. Default value is false. This should only be set on updates." + } + }, + "required": [ + "name" + ] + }, + "DateAfterCreation": { + "type": "object", + "description": "Object to define snapshot and version action conditions.", + "properties": { + "daysAfterCreationGreaterThan": { + "type": "number", + "format": "float", + "description": "Value indicating the age in days after creation" + }, + "daysAfterLastTierChangeGreaterThan": { + "type": "number", + "format": "float", + "description": "Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions and requires daysAfterCreationGreaterThan to be set for snapshots and blob version based actions. The blob will be archived if both the conditions are satisfied." + } + }, + "required": [ + "daysAfterCreationGreaterThan" + ] + }, + "DateAfterModification": { + "type": "object", + "description": "Object to define the base blob action conditions. Properties daysAfterModificationGreaterThan, daysAfterLastAccessTimeGreaterThan and daysAfterCreationGreaterThan are mutually exclusive. The daysAfterLastTierChangeGreaterThan property is only applicable for tierToArchive actions which requires daysAfterModificationGreaterThan to be set, also it cannot be used in conjunction with daysAfterLastAccessTimeGreaterThan or daysAfterCreationGreaterThan.", + "properties": { + "daysAfterModificationGreaterThan": { + "type": "number", + "format": "float", + "description": "Value indicating the age in days after last modification" + }, + "daysAfterLastAccessTimeGreaterThan": { + "type": "number", + "format": "float", + "description": "Value indicating the age in days after last blob access. This property can only be used in conjunction with last access time tracking policy" + }, + "daysAfterLastTierChangeGreaterThan": { + "type": "number", + "format": "float", + "description": "Value indicating the age in days after last blob tier change time. This property is only applicable for tierToArchive actions and requires daysAfterModificationGreaterThan to be set for baseBlobs based actions. The blob will be archived if both the conditions are satisfied." + }, + "daysAfterCreationGreaterThan": { + "type": "number", + "format": "float", + "description": "Value indicating the age in days after blob creation." + } + } + }, + "DefaultSharePermission": { + "type": "string", + "description": "Default share permission for users using Kerberos authentication if RBAC role is not assigned.", + "enum": [ + "None", + "StorageFileDataSmbShareReader", + "StorageFileDataSmbShareContributor", + "StorageFileDataSmbShareElevatedContributor" + ], + "x-ms-enum": { + "name": "DefaultSharePermission", + "modelAsString": true + } + }, + "DeleteRetentionPolicy": { + "type": "object", + "description": "The service properties for soft delete.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Indicates whether DeleteRetentionPolicy is enabled." + }, + "days": { + "type": "integer", + "format": "int32", + "description": "Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365.", + "minimum": 1, + "maximum": 365 + }, + "allowPermanentDelete": { + "type": "boolean", + "description": "This property when set to true allows deletion of the soft deleted blob versions and snapshots. This property cannot be used blob restore policy. This property only applies to blob service and does not apply to containers or file share." + } + } + }, + "DeletedAccount": { + "type": "object", + "description": "Deleted storage account", + "properties": { + "properties": { + "$ref": "#/definitions/DeletedAccountProperties", + "description": "Properties of the deleted account.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "DeletedAccountListResult": { + "type": "object", + "description": "The response of a DeletedAccount list operation.", + "properties": { + "value": { + "type": "array", + "description": "The DeletedAccount items on this page", + "items": { + "$ref": "#/definitions/DeletedAccount" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "DeletedAccountProperties": { + "type": "object", + "description": "Attributes of a deleted storage account.", + "properties": { + "storageAccountResourceId": { + "type": "string", + "description": "Full resource id of the original storage account.", + "readOnly": true + }, + "location": { + "type": "string", + "description": "Location of the deleted account.", + "readOnly": true + }, + "restoreReference": { + "type": "string", + "description": "Can be used to attempt recovering this deleted account via PutStorageAccount API.", + "readOnly": true + }, + "creationTime": { + "type": "string", + "format": "date-time", + "description": "Creation time of the deleted account.", + "readOnly": true + }, + "deletionTime": { + "type": "string", + "format": "date-time", + "description": "Deletion time of the deleted account.", + "readOnly": true + } + } + }, + "DeletedShare": { + "type": "object", + "description": "The deleted share to be restored.", + "properties": { + "deletedShareName": { + "type": "string", + "description": "Required. Identify the name of the deleted share that will be restored." + }, + "deletedShareVersion": { + "type": "string", + "description": "Required. Identify the version of the deleted share that will be restored." + } + }, + "required": [ + "deletedShareName", + "deletedShareVersion" + ] + }, + "DirectoryServiceOptions": { + "type": "string", + "description": "Indicates the directory service used. Note that this enum may be extended in the future.", + "enum": [ + "None", + "AADDS", + "AD", + "AADKERB" + ], + "x-ms-enum": { + "name": "DirectoryServiceOptions", + "modelAsString": true + } + }, + "DnsEndpointType": { + "type": "string", + "description": "Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier.", + "enum": [ + "Standard", + "AzureDnsZone" + ], + "x-ms-enum": { + "name": "DnsEndpointType", + "modelAsString": true + } + }, + "EnabledProtocols": { + "type": "string", + "description": "The authentication protocol that is used for the file share. Can only be specified when creating a share.", + "enum": [ + "SMB", + "NFS" + ], + "x-ms-enum": { + "name": "EnabledProtocols", + "modelAsString": true + } + }, + "Encryption": { + "type": "object", + "description": "The encryption settings on the storage account.", + "properties": { + "services": { + "$ref": "#/definitions/EncryptionServices", + "description": "List of services which support encryption." + }, + "keySource": { + "type": "string", + "description": "The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault", + "default": "Microsoft.Storage", + "enum": [ + "Microsoft.Storage", + "Microsoft.Keyvault" + ], + "x-ms-enum": { + "name": "KeySource", + "modelAsString": true + } + }, + "requireInfrastructureEncryption": { + "type": "boolean", + "description": "A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest." + }, + "keyvaultproperties": { + "$ref": "#/definitions/KeyVaultProperties", + "description": "Properties provided by key vault.", + "x-ms-client-name": "keyVaultProperties" + }, + "identity": { + "$ref": "#/definitions/EncryptionIdentity", + "description": "The identity to be used with service-side encryption at rest.", + "x-ms-client-name": "encryptionIdentity" + } + } + }, + "EncryptionIdentity": { + "type": "object", + "description": "Encryption identity for the storage account.", + "properties": { + "userAssignedIdentity": { + "type": "string", + "description": "Resource identifier of the UserAssigned identity to be associated with server-side encryption on the storage account.", + "x-ms-client-name": "encryptionUserAssignedIdentity" + }, + "federatedIdentityClientId": { + "type": "string", + "description": "ClientId of the multi-tenant application to be used in conjunction with the user-assigned identity for cross-tenant customer-managed-keys server-side encryption on the storage account.", + "x-ms-client-name": "encryptionFederatedIdentityClientId" + } + } + }, + "EncryptionScope": { + "type": "object", + "description": "The Encryption Scope resource.", + "properties": { + "properties": { + "$ref": "#/definitions/EncryptionScopeProperties", + "description": "Properties of the encryption scope.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "EncryptionScopeKeyVaultProperties": { + "type": "object", + "description": "The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'.", + "properties": { + "keyUri": { + "type": "string", + "description": "The object identifier for a key vault key object. When applied, the encryption scope will use the key referenced by the identifier to enable customer-managed key support on this encryption scope." + }, + "currentVersionedKeyIdentifier": { + "type": "string", + "description": "The object identifier of the current versioned Key Vault Key in use.", + "readOnly": true + }, + "lastKeyRotationTimestamp": { + "type": "string", + "format": "date-time", + "description": "Timestamp of last rotation of the Key Vault Key.", + "readOnly": true + } + } + }, + "EncryptionScopeListResult": { + "type": "object", + "description": "The response of a EncryptionScope list operation.", + "properties": { + "value": { + "type": "array", + "description": "The EncryptionScope items on this page", + "items": { + "$ref": "#/definitions/EncryptionScope" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "EncryptionScopeProperties": { + "type": "object", + "description": "Properties of the encryption scope.", + "properties": { + "source": { + "$ref": "#/definitions/EncryptionScopeSource", + "description": "The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault." + }, + "state": { + "$ref": "#/definitions/EncryptionScopeState", + "description": "The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled." + }, + "creationTime": { + "type": "string", + "format": "date-time", + "description": "Gets the creation date and time of the encryption scope in UTC.", + "readOnly": true + }, + "lastModifiedTime": { + "type": "string", + "format": "date-time", + "description": "Gets the last modification date and time of the encryption scope in UTC.", + "readOnly": true + }, + "keyVaultProperties": { + "$ref": "#/definitions/EncryptionScopeKeyVaultProperties", + "description": "The key vault properties for the encryption scope. This is a required field if encryption scope 'source' attribute is set to 'Microsoft.KeyVault'." + }, + "requireInfrastructureEncryption": { + "type": "boolean", + "description": "A boolean indicating whether or not the service applies a secondary layer of encryption with platform managed keys for data at rest." + } + } + }, + "EncryptionScopeSource": { + "type": "string", + "description": "The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault.", + "enum": [ + "Microsoft.Storage", + "Microsoft.KeyVault" + ], + "x-ms-enum": { + "name": "EncryptionScopeSource", + "modelAsString": true + } + }, + "EncryptionScopeState": { + "type": "string", + "description": "The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "EncryptionScopeState", + "modelAsString": true + } + }, + "EncryptionService": { + "type": "object", + "description": "A service that allows server-side encryption to be used.", + "properties": { + "enabled": { + "type": "boolean", + "description": "A boolean indicating whether or not the service encrypts the data as it is stored. Encryption at rest is enabled by default today and cannot be disabled." + }, + "lastEnabledTime": { + "type": "string", + "format": "date-time", + "description": "Gets a rough estimate of the date/time when the encryption was last enabled by the user. Data is encrypted at rest by default today and cannot be disabled.", + "readOnly": true + }, + "keyType": { + "$ref": "#/definitions/KeyType", + "description": "Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used.", + "x-ms-mutability": [ + "read", + "create" + ] + } + } + }, + "EncryptionServices": { + "type": "object", + "description": "A list of services that support encryption.", + "properties": { + "blob": { + "$ref": "#/definitions/EncryptionService", + "description": "The encryption function of the blob storage service." + }, + "file": { + "$ref": "#/definitions/EncryptionService", + "description": "The encryption function of the file storage service." + }, + "table": { + "$ref": "#/definitions/EncryptionService", + "description": "The encryption function of the table storage service." + }, + "queue": { + "$ref": "#/definitions/EncryptionService", + "description": "The encryption function of the queue storage service." + } + } + }, + "Endpoints": { + "type": "object", + "description": "The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object.", + "properties": { + "blob": { + "type": "string", + "description": "Gets the blob endpoint.", + "readOnly": true + }, + "queue": { + "type": "string", + "description": "Gets the queue endpoint.", + "readOnly": true + }, + "table": { + "type": "string", + "description": "Gets the table endpoint.", + "readOnly": true + }, + "file": { + "type": "string", + "description": "Gets the file endpoint.", + "readOnly": true + }, + "web": { + "type": "string", + "description": "Gets the web endpoint.", + "readOnly": true + }, + "dfs": { + "type": "string", + "description": "Gets the dfs endpoint.", + "readOnly": true + }, + "microsoftEndpoints": { + "$ref": "#/definitions/StorageAccountMicrosoftEndpoints", + "description": "Gets the microsoft routing storage endpoints." + }, + "internetEndpoints": { + "$ref": "#/definitions/StorageAccountInternetEndpoints", + "description": "Gets the internet routing storage endpoints" + } + } + }, + "ExtendedLocation": { + "type": "object", + "description": "The complex type of the extended location.", + "properties": { + "name": { + "type": "string", + "description": "The name of the extended location." + }, + "type": { + "$ref": "#/definitions/ExtendedLocationTypes", + "description": "The type of the extended location." + } + } + }, + "ExtendedLocationTypes": { + "type": "string", + "description": "The type of extendedLocation.", + "enum": [ + "EdgeZone" + ], + "x-ms-enum": { + "name": "ExtendedLocationTypes", + "modelAsString": true + } + }, + "FileServiceProperties": { + "type": "object", + "description": "The properties of File services in storage account.", + "properties": { + "name": { + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/FileServicePropertiesProperties", + "description": "The properties of File services in storage account.", + "x-ms-client-flatten": true + }, + "sku": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/Sku", + "description": "The SKU (Stock Keeping Unit) assigned to this resource." + } + }, + "required": [ + "name" + ], + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "FileServicePropertiesListResult": { + "type": "object", + "description": "The response of a FileServiceProperties list operation.", + "properties": { + "value": { + "type": "array", + "description": "The FileServiceProperties items on this page", + "items": { + "$ref": "#/definitions/FileServiceProperties" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "FileServicePropertiesProperties": { + "type": "object", + "description": "The properties of File services in storage account.", + "properties": { + "cors": { + "$ref": "#/definitions/CorsRules", + "description": "Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service." + }, + "shareDeleteRetentionPolicy": { + "$ref": "#/definitions/DeleteRetentionPolicy", + "description": "The file service properties for share soft delete." + }, + "protocolSettings": { + "$ref": "#/definitions/ProtocolSettings", + "description": "Protocol settings for file service" + } + } + }, + "FileShare": { + "type": "object", + "description": "Properties of the file share, including Id, resource name, resource type, Etag.", + "properties": { + "properties": { + "$ref": "#/definitions/FileShareProperties", + "description": "Properties of the file share.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "FileShareItem": { + "type": "object", + "description": "The file share properties be listed out.", + "properties": { + "properties": { + "$ref": "#/definitions/FileShareProperties", + "description": "The file share properties be listed out." + } + }, + "allOf": [ + { + "$ref": "#/definitions/AzureEntityResource" + } + ] + }, + "FileShareListResult": { + "type": "object", + "description": "The response of a FileShare list operation.", + "properties": { + "value": { + "type": "array", + "description": "The FileShare items on this page", + "items": { + "$ref": "#/definitions/FileShare" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "FileShareProperties": { + "type": "object", + "description": "The properties of the file share.", + "properties": { + "lastModifiedTime": { + "type": "string", + "format": "date-time", + "description": "Returns the date and time the share was last modified.", + "readOnly": true + }, + "metadata": { + "type": "object", + "description": "A name-value pair to associate with the share as metadata.", + "additionalProperties": { + "type": "string" + } + }, + "shareQuota": { + "type": "integer", + "format": "int32", + "description": "The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400.", + "minimum": 1, + "maximum": 102400 + }, + "enabledProtocols": { + "$ref": "#/definitions/EnabledProtocols", + "description": "The authentication protocol that is used for the file share. Can only be specified when creating a share.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "rootSquash": { + "$ref": "#/definitions/RootSquashType", + "description": "The property is for NFS share only. The default is NoRootSquash." + }, + "version": { + "type": "string", + "description": "The version of the share.", + "readOnly": true + }, + "deleted": { + "type": "boolean", + "description": "Indicates whether the share was deleted.", + "readOnly": true + }, + "deletedTime": { + "type": "string", + "format": "date-time", + "description": "The deleted time if the share was deleted.", + "readOnly": true + }, + "remainingRetentionDays": { + "type": "integer", + "format": "int32", + "description": "Remaining retention days for share that was soft deleted.", + "readOnly": true + }, + "accessTier": { + "$ref": "#/definitions/ShareAccessTier", + "description": "Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium." + }, + "accessTierChangeTime": { + "type": "string", + "format": "date-time", + "description": "Indicates the last modification time for share access tier.", + "readOnly": true + }, + "accessTierStatus": { + "type": "string", + "description": "Indicates if there is a pending transition for access tier.", + "readOnly": true + }, + "shareUsageBytes": { + "type": "integer", + "format": "int64", + "description": "The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files.", + "readOnly": true + }, + "leaseStatus": { + "$ref": "#/definitions/LeaseStatus", + "description": "The lease status of the share.", + "readOnly": true + }, + "leaseState": { + "$ref": "#/definitions/LeaseState", + "description": "Lease state of the share.", + "readOnly": true + }, + "leaseDuration": { + "$ref": "#/definitions/LeaseDuration", + "description": "Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased.", + "readOnly": true + }, + "signedIdentifiers": { + "type": "array", + "description": "List of stored access policies specified on the share.", + "items": { + "$ref": "#/definitions/SignedIdentifier" + } + }, + "snapshotTime": { + "type": "string", + "format": "date-time", + "description": "Creation time of share snapshot returned in the response of list shares with expand param \"snapshots\".", + "readOnly": true + } + } + }, + "Format": { + "type": "string", + "description": "This is a required field, it specifies the format for the inventory files.", + "enum": [ + "Csv", + "Parquet" + ], + "x-ms-enum": { + "name": "Format", + "modelAsString": true + } + }, + "GeoReplicationStats": { + "type": "object", + "description": "Statistics related to replication for storage account's Blob, Table, Queue and File services. It is only available when geo-redundant replication is enabled for the storage account.", + "properties": { + "status": { + "$ref": "#/definitions/GeoReplicationStatus", + "description": "The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable.", + "readOnly": true + }, + "lastSyncTime": { + "type": "string", + "format": "date-time", + "description": "All primary writes preceding this UTC date/time value are guaranteed to be available for read operations. Primary writes following this point in time may or may not be available for reads. Element may be default value if value of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap.", + "readOnly": true + }, + "canFailover": { + "type": "boolean", + "description": "A boolean flag which indicates whether or not account failover is supported for the account.", + "readOnly": true + } + } + }, + "GeoReplicationStatus": { + "type": "string", + "description": "The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable.", + "enum": [ + "Live", + "Bootstrap", + "Unavailable" + ], + "x-ms-enum": { + "name": "GeoReplicationStatus", + "modelAsString": true + } + }, + "HttpProtocol": { + "type": "string", + "description": "The protocol permitted for a request made with the account SAS.", + "enum": [ + "https,http", + "https" + ], + "x-ms-enum": { + "name": "HttpProtocol", + "modelAsString": false + } + }, + "IPRule": { + "type": "object", + "description": "IP rule with specific IP or IP range in CIDR format.", + "properties": { + "value": { + "type": "string", + "description": "Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.", + "x-ms-client-name": "IPAddressOrRange" + }, + "action": { + "type": "string", + "description": "The action of IP ACL rule.", + "enum": [ + "Allow" + ], + "x-ms-enum": { + "modelAsString": false + } + } + }, + "required": [ + "value" + ] + }, + "Identity": { + "type": "object", + "description": "Identity for the resource.", + "properties": { + "principalId": { + "type": "string", + "description": "The principal ID of resource identity.", + "readOnly": true + }, + "tenantId": { + "type": "string", + "description": "The tenant ID of resource.", + "readOnly": true + }, + "type": { + "$ref": "#/definitions/IdentityType", + "description": "The identity type." + }, + "userAssignedIdentities": { + "type": "object", + "description": "Gets or sets a list of key value pairs that describe the set of User Assigned identities that will be used with this storage account. The key is the ARM resource identifier of the identity. Only 1 User Assigned identity is permitted here.", + "additionalProperties": { + "$ref": "#/definitions/Azure.ResourceManager.Foundations.UserAssignedIdentity" + } + } + }, + "required": [ + "type" + ] + }, + "IdentityType": { + "type": "string", + "description": "The identity type.", + "enum": [ + "None", + "SystemAssigned", + "UserAssigned", + "SystemAssigned,UserAssigned" + ], + "x-ms-enum": { + "name": "IdentityType", + "modelAsString": true + } + }, + "ImmutabilityPolicy": { + "type": "object", + "description": "The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag.", + "properties": { + "name": { + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ImmutabilityPolicyProperty", + "description": "The properties of an ImmutabilityPolicy of a blob container.", + "x-ms-client-flatten": true + } + }, + "required": [ + "name", + "properties" + ], + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "ImmutabilityPolicyProperties": { + "type": "object", + "description": "The properties of an ImmutabilityPolicy of a blob container.", + "properties": { + "properties": { + "$ref": "#/definitions/ImmutabilityPolicyProperty", + "description": "The properties of an ImmutabilityPolicy of a blob container." + }, + "etag": { + "type": "string", + "description": "ImmutabilityPolicy Etag.", + "readOnly": true + }, + "updateHistory": { + "type": "array", + "description": "The ImmutabilityPolicy update history of the blob container.", + "items": { + "$ref": "#/definitions/UpdateHistoryProperty" + }, + "readOnly": true, + "x-ms-identifiers": [] + } + } + }, + "ImmutabilityPolicyProperty": { + "type": "object", + "description": "The properties of an ImmutabilityPolicy of a blob container.", + "properties": { + "immutabilityPeriodSinceCreationInDays": { + "type": "integer", + "format": "int32", + "description": "The immutability period for the blobs in the container since the policy creation, in days." + }, + "state": { + "$ref": "#/definitions/ImmutabilityPolicyState", + "description": "The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.", + "readOnly": true + }, + "allowProtectedAppendWrites": { + "type": "boolean", + "description": "This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API." + }, + "allowProtectedAppendWritesAll": { + "type": "boolean", + "description": "This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive." + } + } + }, + "ImmutabilityPolicyState": { + "type": "string", + "description": "The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.", + "enum": [ + "Locked", + "Unlocked" + ], + "x-ms-enum": { + "name": "ImmutabilityPolicyState", + "modelAsString": true + } + }, + "ImmutabilityPolicyUpdateType": { + "type": "string", + "description": "The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend.", + "enum": [ + "put", + "lock", + "extend" + ], + "x-ms-enum": { + "name": "ImmutabilityPolicyUpdateType", + "modelAsString": true + } + }, + "ImmutableStorageAccount": { + "type": "object", + "description": "This property enables and defines account-level immutability. Enabling the feature auto-enables Blob Versioning.", + "properties": { + "enabled": { + "type": "boolean", + "description": "A boolean flag which enables account-level immutability. All the containers under such an account have object-level immutability enabled by default." + }, + "immutabilityPolicy": { + "$ref": "#/definitions/AccountImmutabilityPolicyProperties", + "description": "Specifies the default account-level immutability policy which is inherited and applied to objects that do not possess an explicit immutability policy at the object level. The object-level immutability policy has higher precedence than the container-level immutability policy, which has a higher precedence than the account-level immutability policy." + } + } + }, + "ImmutableStorageWithVersioning": { + "type": "object", + "description": "Object level immutability properties of the container.", + "properties": { + "enabled": { + "type": "boolean", + "description": "This is an immutable property, when set to true it enables object level immutability at the container level." + }, + "timeStamp": { + "type": "string", + "format": "date-time", + "description": "Returns the date and time the object level immutability was enabled.", + "readOnly": true + }, + "migrationState": { + "$ref": "#/definitions/MigrationState", + "description": "This property denotes the container level immutability to object level immutability migration state.", + "readOnly": true + } + } + }, + "InventoryRuleType": { + "type": "string", + "description": "The valid value is Inventory", + "enum": [ + "Inventory" + ], + "x-ms-enum": { + "name": "InventoryRuleType", + "modelAsString": true + } + }, + "KeyCreationTime": { + "type": "object", + "description": "Storage account keys creation time.", + "properties": { + "key1": { + "type": "string", + "format": "date-time" + }, + "key2": { + "type": "string", + "format": "date-time" + } + } + }, + "KeyPermission": { + "type": "string", + "description": "Permissions for the key -- read-only or full permissions.", + "enum": [ + "Read", + "Full" + ], + "x-ms-enum": { + "name": "KeyPermission", + "modelAsString": false + } + }, + "KeyPolicy": { + "type": "object", + "description": "KeyPolicy assigned to the storage account.", + "properties": { + "keyExpirationPeriodInDays": { + "type": "integer", + "format": "int32", + "description": "The key expiration period in days." + } + }, + "required": [ + "keyExpirationPeriodInDays" + ] + }, + "KeyType": { + "type": "string", + "description": "Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used.", + "enum": [ + "Service", + "Account" + ], + "x-ms-enum": { + "name": "KeyType", + "modelAsString": true + } + }, + "KeyVaultProperties": { + "type": "object", + "description": "Properties of key vault.", + "properties": { + "keyname": { + "type": "string", + "description": "The name of KeyVault key.", + "x-ms-client-name": "keyName" + }, + "keyversion": { + "type": "string", + "description": "The version of KeyVault key.", + "x-ms-client-name": "keyVersion" + }, + "keyvaulturi": { + "type": "string", + "description": "The Uri of KeyVault.", + "x-ms-client-name": "keyVaultUri" + }, + "currentVersionedKeyIdentifier": { + "type": "string", + "description": "The object identifier of the current versioned Key Vault Key in use.", + "readOnly": true + }, + "lastKeyRotationTimestamp": { + "type": "string", + "format": "date-time", + "description": "Timestamp of last rotation of the Key Vault Key.", + "readOnly": true + }, + "currentVersionedKeyExpirationTimestamp": { + "type": "string", + "format": "date-time", + "description": "This is a read only property that represents the expiration time of the current version of the customer managed key used for encryption.", + "readOnly": true + } + } + }, + "Kind": { + "type": "string", + "description": "Indicates the type of storage account.", + "enum": [ + "Storage", + "StorageV2", + "BlobStorage", + "FileStorage", + "BlockBlobStorage" + ], + "x-ms-enum": { + "name": "Kind", + "modelAsString": true + } + }, + "LargeFileSharesState": { + "type": "string", + "description": "Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled.", + "enum": [ + "Disabled", + "Enabled" + ], + "x-ms-enum": { + "name": "LargeFileSharesState", + "modelAsString": true + } + }, + "LastAccessTimeTrackingPolicy": { + "type": "object", + "description": "The blob service properties for Last access time based tracking policy.", + "properties": { + "enable": { + "type": "boolean", + "description": "When set to true last access time based tracking is enabled." + }, + "name": { + "$ref": "#/definitions/Name", + "description": "Name of the policy. The valid value is AccessTimeTracking. This field is currently read only" + }, + "trackingGranularityInDays": { + "type": "integer", + "format": "int32", + "description": "The field specifies blob object tracking granularity in days, typically how often the blob object should be tracked.This field is currently read only with value as 1" + }, + "blobType": { + "type": "array", + "description": "An array of predefined supported blob types. Only blockBlob is the supported value. This field is currently read only", + "items": { + "type": "string" + } + } + }, + "required": [ + "enable" + ] + }, + "LeaseContainerRequest": { + "type": "object", + "description": "Lease Container request schema.", + "properties": { + "action": { + "$ref": "#/definitions/LeaseContainerRequestAction", + "description": "Specifies the lease action. Can be one of the available actions." + }, + "leaseId": { + "type": "string", + "description": "Identifies the lease. Can be specified in any valid GUID string format." + }, + "breakPeriod": { + "type": "integer", + "format": "int32", + "description": "Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60." + }, + "leaseDuration": { + "type": "integer", + "format": "int32", + "description": "Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires." + }, + "proposedLeaseId": { + "type": "string", + "description": "Optional for acquire, required for change. Proposed lease ID, in a GUID string format." + } + }, + "required": [ + "action" + ] + }, + "LeaseContainerRequestAction": { + "type": "string", + "description": "Specifies the lease action. Can be one of the available actions.", + "enum": [ + "Acquire", + "Renew", + "Change", + "Release", + "Break" + ], + "x-ms-enum": { + "name": "LeaseContainerRequestAction", + "modelAsString": true + } + }, + "LeaseContainerResponse": { + "type": "object", + "description": "Lease Container response schema.", + "properties": { + "leaseId": { + "type": "string", + "description": "Returned unique lease ID that must be included with any request to delete the container, or to renew, change, or release the lease." + }, + "leaseTimeSeconds": { + "type": "string", + "description": "Approximate time remaining in the lease period, in seconds." + } + } + }, + "LeaseDuration": { + "type": "string", + "description": "Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.", + "enum": [ + "Infinite", + "Fixed" + ], + "x-ms-enum": { + "name": "LeaseDuration", + "modelAsString": true + } + }, + "LeaseShareAction": { + "type": "string", + "description": "Specifies the lease action. Can be one of the available actions.", + "enum": [ + "Acquire", + "Renew", + "Change", + "Release", + "Break" + ], + "x-ms-enum": { + "name": "LeaseShareAction", + "modelAsString": true + } + }, + "LeaseShareRequest": { + "type": "object", + "description": "Lease Share request schema.", + "properties": { + "action": { + "$ref": "#/definitions/LeaseShareAction", + "description": "Specifies the lease action. Can be one of the available actions." + }, + "leaseId": { + "type": "string", + "description": "Identifies the lease. Can be specified in any valid GUID string format." + }, + "breakPeriod": { + "type": "integer", + "format": "int32", + "description": "Optional. For a break action, proposed duration the lease should continue before it is broken, in seconds, between 0 and 60." + }, + "leaseDuration": { + "type": "integer", + "format": "int32", + "description": "Required for acquire. Specifies the duration of the lease, in seconds, or negative one (-1) for a lease that never expires." + }, + "proposedLeaseId": { + "type": "string", + "description": "Optional for acquire, required for change. Proposed lease ID, in a GUID string format." + } + }, + "required": [ + "action" + ] + }, + "LeaseShareResponse": { + "type": "object", + "description": "Lease Share response schema.", + "properties": { + "leaseId": { + "type": "string", + "description": "Returned unique lease ID that must be included with any request to delete the share, or to renew, change, or release the lease." + }, + "leaseTimeSeconds": { + "type": "string", + "description": "Approximate time remaining in the lease period, in seconds." + } + } + }, + "LeaseState": { + "type": "string", + "description": "Lease state of the container.", + "enum": [ + "Available", + "Leased", + "Expired", + "Breaking", + "Broken" + ], + "x-ms-enum": { + "name": "LeaseState", + "modelAsString": true + } + }, + "LeaseStatus": { + "type": "string", + "description": "The lease status of the container.", + "enum": [ + "Locked", + "Unlocked" + ], + "x-ms-enum": { + "name": "LeaseStatus", + "modelAsString": true + } + }, + "LegalHold": { + "type": "object", + "description": "The LegalHold property of a blob container.", + "properties": { + "hasLegalHold": { + "type": "boolean", + "description": "The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.", + "readOnly": true + }, + "tags": { + "type": "array", + "description": "Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case at SRP.", + "items": { + "type": "string" + } + }, + "allowProtectedAppendWritesAll": { + "type": "boolean", + "description": "When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted." + } + }, + "required": [ + "tags" + ] + }, + "LegalHoldProperties": { + "type": "object", + "description": "The LegalHold property of a blob container.", + "properties": { + "hasLegalHold": { + "type": "boolean", + "description": "The hasLegalHold public property is set to true by SRP if there are at least one existing tag. The hasLegalHold public property is set to false by SRP if all existing legal hold tags are cleared out. There can be a maximum of 1000 blob containers with hasLegalHold=true for a given account.", + "readOnly": true + }, + "tags": { + "type": "array", + "description": "The list of LegalHold tags of a blob container.", + "items": { + "$ref": "#/definitions/TagProperty" + }, + "x-ms-identifiers": [] + }, + "protectedAppendWritesHistory": { + "$ref": "#/definitions/ProtectedAppendWritesHistory", + "description": "Protected append blob writes history." + } + } + }, + "ListAccountSasResponse": { + "type": "object", + "description": "The List SAS credentials operation response.", + "properties": { + "accountSasToken": { + "type": "string", + "description": "List SAS credentials of storage account.", + "readOnly": true + } + } + }, + "ListContainerItem": { + "type": "object", + "description": "The blob container properties be listed out.", + "properties": { + "properties": { + "$ref": "#/definitions/ContainerProperties", + "description": "The blob container properties be listed out." + } + }, + "allOf": [ + { + "$ref": "#/definitions/AzureEntityResource" + } + ] + }, + "ListQueue": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/ListQueueProperties", + "description": "List Queue resource properties.", + "x-ms-client-name": "queueProperties" + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "ListQueueProperties": { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "description": "A name-value pair that represents queue metadata.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "ListServiceSasResponse": { + "type": "object", + "description": "The List service SAS credentials operation response.", + "properties": { + "serviceSasToken": { + "type": "string", + "description": "List service SAS credentials of specific resource.", + "readOnly": true + } + } + }, + "LocalUser": { + "type": "object", + "description": "The local user associated with the storage accounts.", + "properties": { + "properties": { + "$ref": "#/definitions/LocalUserProperties", + "description": "Storage account local user properties.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "LocalUserKeys": { + "type": "object", + "description": "The Storage Account Local User keys.", + "properties": { + "sshAuthorizedKeys": { + "type": "array", + "description": "Optional, local user ssh authorized keys for SFTP.", + "items": { + "$ref": "#/definitions/SshPublicKey" + }, + "x-ms-identifiers": [] + }, + "sharedKey": { + "type": "string", + "description": "Auto generated by the server for SMB authentication.", + "readOnly": true + } + } + }, + "LocalUserListResult": { + "type": "object", + "description": "The response of a LocalUser list operation.", + "properties": { + "value": { + "type": "array", + "description": "The LocalUser items on this page", + "items": { + "$ref": "#/definitions/LocalUser" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "LocalUserProperties": { + "type": "object", + "description": "The Storage Account Local User properties.", + "properties": { + "permissionScopes": { + "type": "array", + "description": "The permission scopes of the local user.", + "items": { + "$ref": "#/definitions/PermissionScope" + }, + "x-ms-identifiers": [] + }, + "homeDirectory": { + "type": "string", + "description": "Optional, local user home directory." + }, + "sshAuthorizedKeys": { + "type": "array", + "description": "Optional, local user ssh authorized keys for SFTP.", + "items": { + "$ref": "#/definitions/SshPublicKey" + }, + "x-ms-identifiers": [] + }, + "sid": { + "type": "string", + "description": "A unique Security Identifier that is generated by the server.", + "readOnly": true + }, + "hasSharedKey": { + "type": "boolean", + "description": "Indicates whether shared key exists. Set it to false to remove existing shared key." + }, + "hasSshKey": { + "type": "boolean", + "description": "Indicates whether ssh key exists. Set it to false to remove existing SSH key." + }, + "hasSshPassword": { + "type": "boolean", + "description": "Indicates whether ssh password exists. Set it to false to remove existing SSH password." + } + } + }, + "LocalUserRegeneratePasswordResult": { + "type": "object", + "description": "The secrets of Storage Account Local User.", + "properties": { + "sshPassword": { + "type": "string", + "description": "Auto generated password by the server for SSH authentication if hasSshPassword is set to true on the creation of local user.", + "readOnly": true + } + } + }, + "ManagementPolicy": { + "type": "object", + "description": "The Get Storage Account ManagementPolicies operation response.", + "properties": { + "name": { + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/ManagementPolicyProperties", + "description": "Returns the Storage Account Data Policies Rules.", + "x-ms-client-flatten": true + } + }, + "required": [ + "name" + ], + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "ManagementPolicyAction": { + "type": "object", + "description": "Actions are applied to the filtered blobs when the execution condition is met.", + "properties": { + "baseBlob": { + "$ref": "#/definitions/ManagementPolicyBaseBlob", + "description": "The management policy action for base blob" + }, + "snapshot": { + "$ref": "#/definitions/ManagementPolicySnapShot", + "description": "The management policy action for snapshot" + }, + "version": { + "$ref": "#/definitions/ManagementPolicyVersion", + "description": "The management policy action for version" + } + } + }, + "ManagementPolicyBaseBlob": { + "type": "object", + "description": "Management policy action for base blob.", + "properties": { + "tierToCool": { + "$ref": "#/definitions/DateAfterModification", + "description": "The function to tier blobs to cool storage." + }, + "tierToArchive": { + "$ref": "#/definitions/DateAfterModification", + "description": "The function to tier blobs to archive storage." + }, + "tierToCold": { + "$ref": "#/definitions/DateAfterModification", + "description": "The function to tier blobs to cold storage." + }, + "tierToHot": { + "$ref": "#/definitions/DateAfterModification", + "description": "The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts" + }, + "delete": { + "$ref": "#/definitions/DateAfterModification", + "description": "The function to delete the blob" + }, + "enableAutoTierToHotFromCool": { + "type": "boolean", + "description": "This property enables auto tiering of a blob from cool to hot on a blob access. This property requires tierToCool.daysAfterLastAccessTimeGreaterThan." + } + } + }, + "ManagementPolicyDefinition": { + "type": "object", + "description": "An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set.", + "properties": { + "actions": { + "$ref": "#/definitions/ManagementPolicyAction", + "description": "An object that defines the action set." + }, + "filters": { + "$ref": "#/definitions/ManagementPolicyFilter", + "description": "An object that defines the filter set." + } + }, + "required": [ + "actions" + ] + }, + "ManagementPolicyFilter": { + "type": "object", + "description": "Filters limit rule actions to a subset of blobs within the storage account. If multiple filters are defined, a logical AND is performed on all filters.", + "properties": { + "prefixMatch": { + "type": "array", + "description": "An array of strings for prefixes to be match.", + "items": { + "type": "string" + } + }, + "blobTypes": { + "type": "array", + "description": "An array of predefined enum values. Currently blockBlob supports all tiering and delete actions. Only delete actions are supported for appendBlob.", + "items": { + "type": "string" + } + }, + "blobIndexMatch": { + "type": "array", + "description": "An array of blob index tag based filters, there can be at most 10 tag filters", + "items": { + "$ref": "#/definitions/TagFilter" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "blobTypes" + ] + }, + "ManagementPolicyProperties": { + "type": "object", + "description": "The Storage Account ManagementPolicy properties.", + "properties": { + "lastModifiedTime": { + "type": "string", + "format": "date-time", + "description": "Returns the date and time the ManagementPolicies was last modified.", + "readOnly": true + }, + "policy": { + "$ref": "#/definitions/ManagementPolicySchema", + "description": "The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts." + } + }, + "required": [ + "policy" + ] + }, + "ManagementPolicyRule": { + "type": "object", + "description": "An object that wraps the Lifecycle rule. Each rule is uniquely defined by name.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Rule is enabled if set to true." + }, + "name": { + "type": "string", + "description": "A rule name can contain any combination of alpha numeric characters. Rule name is case-sensitive. It must be unique within a policy." + }, + "type": { + "$ref": "#/definitions/RuleType", + "description": "The valid value is Lifecycle" + }, + "definition": { + "$ref": "#/definitions/ManagementPolicyDefinition", + "description": "An object that defines the Lifecycle rule." + } + }, + "required": [ + "name", + "type", + "definition" + ] + }, + "ManagementPolicySchema": { + "type": "object", + "description": "The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.", + "properties": { + "rules": { + "type": "array", + "description": "The Storage Account ManagementPolicies Rules. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.", + "items": { + "$ref": "#/definitions/ManagementPolicyRule" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "rules" + ] + }, + "ManagementPolicySnapShot": { + "type": "object", + "description": "Management policy action for snapshot.", + "properties": { + "tierToCool": { + "$ref": "#/definitions/DateAfterCreation", + "description": "The function to tier blob snapshot to cool storage." + }, + "tierToArchive": { + "$ref": "#/definitions/DateAfterCreation", + "description": "The function to tier blob snapshot to archive storage." + }, + "tierToCold": { + "$ref": "#/definitions/DateAfterCreation", + "description": "The function to tier blobs to cold storage." + }, + "tierToHot": { + "$ref": "#/definitions/DateAfterCreation", + "description": "The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts" + }, + "delete": { + "$ref": "#/definitions/DateAfterCreation", + "description": "The function to delete the blob snapshot" + } + } + }, + "ManagementPolicyVersion": { + "type": "object", + "description": "Management policy action for blob version.", + "properties": { + "tierToCool": { + "$ref": "#/definitions/DateAfterCreation", + "description": "The function to tier blob version to cool storage." + }, + "tierToArchive": { + "$ref": "#/definitions/DateAfterCreation", + "description": "The function to tier blob version to archive storage." + }, + "tierToCold": { + "$ref": "#/definitions/DateAfterCreation", + "description": "The function to tier blobs to cold storage." + }, + "tierToHot": { + "$ref": "#/definitions/DateAfterCreation", + "description": "The function to tier blobs to hot storage. This action can only be used with Premium Block Blob Storage Accounts" + }, + "delete": { + "$ref": "#/definitions/DateAfterCreation", + "description": "The function to delete the blob version" + } + } + }, + "MigrationState": { + "type": "string", + "description": "This property denotes the container level immutability to object level immutability migration state.", + "enum": [ + "InProgress", + "Completed" + ], + "x-ms-enum": { + "name": "MigrationState", + "modelAsString": true + } + }, + "MinimumTlsVersion": { + "type": "string", + "description": "Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.", + "enum": [ + "TLS1_0", + "TLS1_1", + "TLS1_2" + ], + "x-ms-enum": { + "name": "MinimumTlsVersion", + "modelAsString": true + } + }, + "Multichannel": { + "type": "object", + "description": "Multichannel setting. Applies to Premium FileStorage only.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Indicates whether multichannel is enabled" + } + } + }, + "Name": { + "type": "string", + "description": "Name of the policy. The valid value is AccessTimeTracking. This field is currently read only", + "enum": [ + "AccessTimeTracking" + ], + "x-ms-enum": { + "name": "Name", + "modelAsString": true + } + }, + "NetworkRuleSet": { + "type": "object", + "description": "Network rule set", + "properties": { + "bypass": { + "type": "string", + "description": "Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, \"Logging, Metrics\"), or None to bypass none of those traffics.", + "default": "AzureServices", + "enum": [ + "None", + "Logging", + "Metrics", + "AzureServices" + ], + "x-ms-enum": { + "name": "Bypass", + "modelAsString": true + } + }, + "resourceAccessRules": { + "type": "array", + "description": "Sets the resource access rules", + "items": { + "$ref": "#/definitions/ResourceAccessRule" + }, + "x-ms-identifiers": [] + }, + "virtualNetworkRules": { + "type": "array", + "description": "Sets the virtual network rules", + "items": { + "$ref": "#/definitions/VirtualNetworkRule" + }, + "x-ms-identifiers": [] + }, + "ipRules": { + "type": "array", + "description": "Sets the IP ACL rules", + "items": { + "$ref": "#/definitions/IPRule" + }, + "x-ms-identifiers": [] + }, + "defaultAction": { + "type": "string", + "description": "Specifies the default action of allow or deny when no other rules match.", + "default": "Allow", + "enum": [ + "Allow", + "Deny" + ], + "x-ms-enum": { + "name": "DefaultAction", + "modelAsString": false + } + } + }, + "required": [ + "defaultAction" + ] + }, + "ObjectReplicationPolicy": { + "type": "object", + "description": "The replication policy between two storage accounts. Multiple rules can be defined in one policy.", + "properties": { + "properties": { + "$ref": "#/definitions/ObjectReplicationPolicyProperties", + "description": "Returns the Storage Account Object Replication Policy.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "ObjectReplicationPolicyFilter": { + "type": "object", + "description": "Filters limit replication to a subset of blobs within the storage account. A logical OR is performed on values in the filter. If multiple filters are defined, a logical AND is performed on all filters.", + "properties": { + "prefixMatch": { + "type": "array", + "description": "Optional. Filters the results to replicate only blobs whose names begin with the specified prefix.", + "items": { + "type": "string" + } + }, + "minCreationTime": { + "type": "string", + "description": "Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z" + } + } + }, + "ObjectReplicationPolicyListResult": { + "type": "object", + "description": "The response of a ObjectReplicationPolicy list operation.", + "properties": { + "value": { + "type": "array", + "description": "The ObjectReplicationPolicy items on this page", + "items": { + "$ref": "#/definitions/ObjectReplicationPolicy" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "ObjectReplicationPolicyProperties": { + "type": "object", + "description": "The Storage Account ObjectReplicationPolicy properties.", + "properties": { + "policyId": { + "type": "string", + "description": "A unique id for object replication policy.", + "readOnly": true + }, + "enabledTime": { + "type": "string", + "format": "date-time", + "description": "Indicates when the policy is enabled on the source account.", + "readOnly": true + }, + "sourceAccount": { + "type": "string", + "description": "Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false." + }, + "destinationAccount": { + "type": "string", + "description": "Required. Destination account name. It should be full resource id if allowCrossTenantReplication set to false." + }, + "rules": { + "type": "array", + "description": "The storage account object replication rules.", + "items": { + "$ref": "#/definitions/ObjectReplicationPolicyRule" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "sourceAccount", + "destinationAccount" + ] + }, + "ObjectReplicationPolicyRule": { + "type": "object", + "description": "The replication policy rule between two containers.", + "properties": { + "ruleId": { + "type": "string", + "description": "Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account." + }, + "sourceContainer": { + "type": "string", + "description": "Required. Source container name." + }, + "destinationContainer": { + "type": "string", + "description": "Required. Destination container name." + }, + "filters": { + "$ref": "#/definitions/ObjectReplicationPolicyFilter", + "description": "Optional. An object that defines the filter set." + } + }, + "required": [ + "sourceContainer", + "destinationContainer" + ] + }, + "ObjectType": { + "type": "string", + "description": "This is a required field. This field specifies the scope of the inventory created either at the blob or container level.", + "enum": [ + "Blob", + "Container" + ], + "x-ms-enum": { + "name": "ObjectType", + "modelAsString": true + } + }, + "PermissionScope": { + "type": "object", + "properties": { + "permissions": { + "type": "string", + "description": "The permissions for the local user. Possible values include: Read (r), Write (w), Delete (d), List (l), and Create (c)." + }, + "service": { + "type": "string", + "description": "The service used by the local user, e.g. blob, file." + }, + "resourceName": { + "type": "string", + "description": "The name of resource, normally the container name or the file share name, used by the local user." + } + }, + "required": [ + "permissions", + "service", + "resourceName" + ] + }, + "Permissions": { + "type": "string", + "description": "The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p).", + "enum": [ + "r", + "d", + "w", + "l", + "a", + "c", + "u", + "p" + ], + "x-ms-enum": { + "name": "Permissions", + "modelAsString": true + } + }, + "PrivateEndpoint": { + "type": "object", + "description": "The Private Endpoint resource.", + "properties": { + "id": { + "type": "string", + "description": "The ARM identifier for Private Endpoint", + "readOnly": true + } + } + }, + "PrivateEndpointConnection": { + "type": "object", + "description": "The Private Endpoint Connection resource.", + "properties": { + "properties": { + "$ref": "#/definitions/PrivateEndpointConnectionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "PrivateEndpointConnectionListResult": { + "type": "object", + "description": "The response of a PrivateEndpointConnection list operation.", + "properties": { + "value": { + "type": "array", + "description": "The PrivateEndpointConnection items on this page", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "PrivateEndpointConnectionProperties": { + "type": "object", + "description": "Properties of the PrivateEndpointConnectProperties.", + "properties": { + "privateEndpoint": { + "$ref": "#/definitions/PrivateEndpoint", + "description": "The resource of private end point." + }, + "privateLinkServiceConnectionState": { + "$ref": "#/definitions/PrivateLinkServiceConnectionState", + "description": "A collection of information about the state of the connection between service consumer and provider." + }, + "provisioningState": { + "$ref": "#/definitions/PrivateEndpointConnectionProvisioningState", + "description": "The provisioning state of the private endpoint connection resource.", + "readOnly": true + } + }, + "required": [ + "privateLinkServiceConnectionState" + ] + }, + "PrivateEndpointConnectionProvisioningState": { + "type": "string", + "description": "The current provisioning state.", + "enum": [ + "Succeeded", + "Creating", + "Deleting", + "Failed" + ], + "x-ms-enum": { + "name": "PrivateEndpointConnectionProvisioningState", + "modelAsString": true + }, + "readOnly": true + }, + "PrivateEndpointServiceConnectionStatus": { + "type": "string", + "description": "The private endpoint connection status.", + "enum": [ + "Pending", + "Approved", + "Rejected" + ], + "x-ms-enum": { + "name": "PrivateEndpointServiceConnectionStatus", + "modelAsString": true + } + }, + "PrivateLinkResource": { + "type": "object", + "description": "A private link resource", + "properties": { + "properties": { + "$ref": "#/definitions/PrivateLinkResourceProperties", + "description": "Resource properties." + } + }, + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ] + }, + "PrivateLinkResourceListResult": { + "type": "object", + "description": "A list of private link resources", + "properties": { + "value": { + "type": "array", + "description": "Array of private link resources", + "items": { + "$ref": "#/definitions/PrivateLinkResource" + } + } + } + }, + "PrivateLinkResourceProperties": { + "type": "object", + "description": "Properties of a private link resource.", + "properties": { + "groupId": { + "type": "string", + "description": "The private link resource group id.", + "readOnly": true + }, + "requiredMembers": { + "type": "array", + "description": "The private link resource required member names.", + "items": { + "type": "string" + }, + "readOnly": true + }, + "requiredZoneNames": { + "type": "array", + "description": "The private link resource Private link DNS zone name.", + "items": { + "type": "string" + } + } + } + }, + "PrivateLinkServiceConnectionState": { + "type": "object", + "description": "A collection of information about the state of the connection between service consumer and provider.", + "properties": { + "status": { + "$ref": "#/definitions/PrivateEndpointServiceConnectionStatus", + "description": "Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service." + }, + "description": { + "type": "string", + "description": "The reason for approval/rejection of the connection." + }, + "actionRequired": { + "type": "string", + "description": "A message indicating if changes on the service provider require any updates on the consumer." + } + } + }, + "ProtectedAppendWritesHistory": { + "type": "object", + "description": "Protected append writes history setting for the blob container with Legal holds.", + "properties": { + "allowProtectedAppendWritesAll": { + "type": "boolean", + "description": "When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Returns the date and time the tag was added.", + "readOnly": true + } + } + }, + "ProtocolSettings": { + "type": "object", + "description": "Protocol settings for file service", + "properties": { + "smb": { + "$ref": "#/definitions/SmbSetting", + "description": "Setting for SMB protocol" + } + } + }, + "ProvisioningState": { + "type": "string", + "description": "Gets the status of the storage account at the time the operation was called.", + "enum": [ + "Creating", + "ResolvingDNS", + "Succeeded" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": false + } + }, + "PublicAccess": { + "type": "string", + "description": "Specifies whether data in the container may be accessed publicly and the level of access.", + "enum": [ + "Container", + "Blob", + "None" + ], + "x-ms-enum": { + "name": "PublicAccess", + "modelAsString": false + } + }, + "PublicNetworkAccess": { + "type": "string", + "description": "Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "PublicNetworkAccess", + "modelAsString": true + } + }, + "QueueProperties": { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "description": "A name-value pair that represents queue metadata.", + "additionalProperties": { + "type": "string" + } + }, + "approximateMessageCount": { + "type": "integer", + "format": "int32", + "description": "Integer indicating an approximate number of messages in the queue. This number is not lower than the actual number of messages in the queue, but could be higher.", + "readOnly": true + } + } + }, + "QueueServiceProperties": { + "type": "object", + "description": "The properties of a storage account’s Queue service.", + "properties": { + "name": { + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/QueueServicePropertiesProperties", + "description": "The properties of a storage account’s Queue service.", + "x-ms-client-flatten": true + } + }, + "required": [ + "name" + ], + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "QueueServicePropertiesListResult": { + "type": "object", + "description": "The response of a QueueServiceProperties list operation.", + "properties": { + "value": { + "type": "array", + "description": "The QueueServiceProperties items on this page", + "items": { + "$ref": "#/definitions/QueueServiceProperties" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "QueueServicePropertiesProperties": { + "type": "object", + "description": "The properties of a storage account’s Queue service.", + "properties": { + "cors": { + "$ref": "#/definitions/CorsRules", + "description": "Specifies CORS rules for the Queue service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Queue service." + } + } + }, + "Reason": { + "type": "string", + "description": "Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false.", + "enum": [ + "AccountNameInvalid", + "AlreadyExists" + ], + "x-ms-enum": { + "name": "Reason", + "modelAsString": false + } + }, + "ReasonCode": { + "type": "string", + "description": "The reason for the restriction. As of now this can be \"QuotaId\" or \"NotAvailableForSubscription\". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The \"NotAvailableForSubscription\" is related to capacity at DC.", + "enum": [ + "QuotaId", + "NotAvailableForSubscription" + ], + "x-ms-enum": { + "name": "ReasonCode", + "modelAsString": true + } + }, + "Resource": { + "type": "object", + "description": "Common fields that are returned in the response for all Azure Resource Manager resources", + "properties": { + "id": { + "type": "string", + "description": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the resource", + "readOnly": true + }, + "type": { + "type": "string", + "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "readOnly": true + } + } + }, + "ResourceAccessRule": { + "type": "object", + "description": "Resource Access Rule.", + "properties": { + "tenantId": { + "type": "string", + "description": "Tenant Id" + }, + "resourceId": { + "type": "string", + "description": "Resource Id" + } + } + }, + "RestorePolicyProperties": { + "type": "object", + "description": "The blob service properties for blob restore policy", + "properties": { + "enabled": { + "type": "boolean", + "description": "Blob restore is enabled if set to true." + }, + "days": { + "type": "integer", + "format": "int32", + "description": "how long this blob can be restored. It should be great than zero and less than DeleteRetentionPolicy.days.", + "minimum": 1, + "maximum": 365 + }, + "lastEnabledTime": { + "type": "string", + "format": "date-time", + "description": "Deprecated in favor of minRestoreTime property.", + "readOnly": true + }, + "minRestoreTime": { + "type": "string", + "format": "date-time", + "description": "Returns the minimum date and time that the restore can be started.", + "readOnly": true + } + }, + "required": [ + "enabled" + ] + }, + "Restriction": { + "type": "object", + "description": "The restriction because of which SKU cannot be used.", + "properties": { + "type": { + "type": "string", + "description": "The type of restrictions. As of now only possible value for this is location.", + "readOnly": true + }, + "values": { + "type": "array", + "description": "The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.", + "items": { + "type": "string" + }, + "readOnly": true + }, + "reasonCode": { + "$ref": "#/definitions/ReasonCode", + "description": "The reason for the restriction. As of now this can be \"QuotaId\" or \"NotAvailableForSubscription\". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The \"NotAvailableForSubscription\" is related to capacity at DC." + } + } + }, + "RootSquashType": { + "type": "string", + "description": "The property is for NFS share only. The default is NoRootSquash.", + "enum": [ + "NoRootSquash", + "RootSquash", + "AllSquash" + ], + "x-ms-enum": { + "name": "RootSquashType", + "modelAsString": true + } + }, + "RoutingChoice": { + "type": "string", + "description": "Routing Choice defines the kind of network routing opted by the user.", + "enum": [ + "MicrosoftRouting", + "InternetRouting" + ], + "x-ms-enum": { + "name": "RoutingChoice", + "modelAsString": true + } + }, + "RoutingPreference": { + "type": "object", + "description": "Routing preference defines the type of network, either microsoft or internet routing to be used to deliver the user data, the default option is microsoft routing", + "properties": { + "routingChoice": { + "$ref": "#/definitions/RoutingChoice", + "description": "Routing Choice defines the kind of network routing opted by the user." + }, + "publishMicrosoftEndpoints": { + "type": "boolean", + "description": "A boolean flag which indicates whether microsoft routing storage endpoints are to be published" + }, + "publishInternetEndpoints": { + "type": "boolean", + "description": "A boolean flag which indicates whether internet routing storage endpoints are to be published" + } + } + }, + "RuleType": { + "type": "string", + "description": "The valid value is Lifecycle", + "enum": [ + "Lifecycle" + ], + "x-ms-enum": { + "name": "RuleType", + "modelAsString": true + } + }, + "SKUCapability": { + "type": "object", + "description": "The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc.", + "properties": { + "name": { + "type": "string", + "description": "The name of capability, The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc.", + "readOnly": true + }, + "value": { + "type": "string", + "description": "A string value to indicate states of given capability. Possibly 'true' or 'false'.", + "readOnly": true + } + } + }, + "SasPolicy": { + "type": "object", + "description": "SasPolicy assigned to the storage account.", + "properties": { + "sasExpirationPeriod": { + "type": "string", + "description": "The SAS expiration period, DD.HH:MM:SS." + }, + "expirationAction": { + "type": "string", + "description": "The SAS expiration action. Can only be Log.", + "default": "Log", + "enum": [ + "Log" + ], + "x-ms-enum": { + "name": "ExpirationAction", + "modelAsString": true + } + } + }, + "required": [ + "sasExpirationPeriod", + "expirationAction" + ] + }, + "Schedule": { + "type": "string", + "description": "This is a required field. This field is used to schedule an inventory formation.", + "enum": [ + "Daily", + "Weekly" + ], + "x-ms-enum": { + "name": "Schedule", + "modelAsString": true + } + }, + "ServiceSasParameters": { + "type": "object", + "description": "The parameters to list service SAS credentials of a specific resource.", + "properties": { + "canonicalizedResource": { + "type": "string", + "description": "The canonical path to the signed resource." + }, + "signedResource": { + "$ref": "#/definitions/SignedResource", + "description": "The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s).", + "x-ms-client-name": "resource" + }, + "signedPermission": { + "$ref": "#/definitions/Permissions", + "description": "The signed permissions for the service SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p).", + "x-ms-client-name": "permissions" + }, + "signedIp": { + "type": "string", + "description": "An IP address or a range of IP addresses from which to accept requests.", + "x-ms-client-name": "IPAddressOrRange" + }, + "signedProtocol": { + "$ref": "#/definitions/HttpProtocol", + "description": "The protocol permitted for a request made with the account SAS.", + "x-ms-client-name": "protocols" + }, + "signedStart": { + "type": "string", + "format": "date-time", + "description": "The time at which the SAS becomes valid.", + "x-ms-client-name": "sharedAccessStartTime" + }, + "signedExpiry": { + "type": "string", + "format": "date-time", + "description": "The time at which the shared access signature becomes invalid.", + "x-ms-client-name": "sharedAccessExpiryTime" + }, + "signedIdentifier": { + "type": "string", + "description": "A unique value up to 64 characters in length that correlates to an access policy specified for the container, queue, or table.", + "maxLength": 64, + "x-ms-client-name": "identifier" + }, + "startPk": { + "type": "string", + "description": "The start of partition key.", + "x-ms-client-name": "partitionKeyStart" + }, + "endPk": { + "type": "string", + "description": "The end of partition key.", + "x-ms-client-name": "partitionKeyEnd" + }, + "startRk": { + "type": "string", + "description": "The start of row key.", + "x-ms-client-name": "rowKeyStart" + }, + "endRk": { + "type": "string", + "description": "The end of row key.", + "x-ms-client-name": "rowKeyEnd" + }, + "keyToSign": { + "type": "string", + "description": "The key to sign the account SAS token with." + }, + "rscc": { + "type": "string", + "description": "The response header override for cache control.", + "x-ms-client-name": "cacheControl" + }, + "rscd": { + "type": "string", + "description": "The response header override for content disposition.", + "x-ms-client-name": "contentDisposition" + }, + "rsce": { + "type": "string", + "description": "The response header override for content encoding.", + "x-ms-client-name": "contentEncoding" + }, + "rscl": { + "type": "string", + "description": "The response header override for content language.", + "x-ms-client-name": "contentLanguage" + }, + "rsct": { + "type": "string", + "description": "The response header override for content type.", + "x-ms-client-name": "contentType" + } + }, + "required": [ + "canonicalizedResource" + ] + }, + "Services": { + "type": "string", + "description": "The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f).", + "enum": [ + "b", + "q", + "t", + "f" + ], + "x-ms-enum": { + "name": "Services", + "modelAsString": true + } + }, + "ShareAccessTier": { + "type": "string", + "description": "Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.", + "enum": [ + "TransactionOptimized", + "Hot", + "Cool", + "Premium" + ], + "x-ms-enum": { + "name": "ShareAccessTier", + "modelAsString": true + } + }, + "SignedIdentifier": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "An unique identifier of the stored access policy." + }, + "accessPolicy": { + "$ref": "#/definitions/AccessPolicy", + "description": "Access policy" + } + } + }, + "SignedResource": { + "type": "string", + "description": "The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s).", + "enum": [ + "b", + "c", + "f", + "s" + ], + "x-ms-enum": { + "name": "SignedResource", + "modelAsString": true + } + }, + "SignedResourceTypes": { + "type": "string", + "description": "The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files.", + "enum": [ + "s", + "c", + "o" + ], + "x-ms-enum": { + "name": "SignedResourceTypes", + "modelAsString": true + } + }, + "Sku": { + "type": "object", + "description": "The SKU of the storage account.", + "properties": { + "name": { + "$ref": "#/definitions/SkuName", + "description": "The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType." + }, + "tier": { + "$ref": "#/definitions/Azure.ResourceManager.Foundations.SkuTier", + "description": "The SKU tier. This is based on the SKU name.", + "readOnly": true + } + }, + "required": [ + "name" + ] + }, + "SkuConversionStatus": { + "type": "string", + "description": "This property indicates the current sku conversion status.", + "enum": [ + "InProgress", + "Succeeded", + "Failed" + ], + "x-ms-enum": { + "name": "SkuConversionStatus", + "modelAsString": true + }, + "readOnly": true + }, + "SkuInformation": { + "type": "object", + "description": "Storage SKU and its properties", + "properties": { + "name": { + "$ref": "#/definitions/SkuName", + "description": "The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType." + }, + "tier": { + "$ref": "#/definitions/Azure.ResourceManager.Foundations.SkuTier", + "description": "The SKU tier. This is based on the SKU name.", + "readOnly": true + }, + "resourceType": { + "type": "string", + "description": "The type of the resource, usually it is 'storageAccounts'.", + "readOnly": true + }, + "kind": { + "$ref": "#/definitions/Kind", + "description": "Indicates the type of storage account.", + "readOnly": true + }, + "locations": { + "type": "array", + "description": "The set of locations that the SKU is available. This will be supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.).", + "items": { + "type": "string" + }, + "readOnly": true + }, + "capabilities": { + "type": "array", + "description": "The capability information in the specified SKU, including file encryption, network ACLs, change notification, etc.", + "items": { + "$ref": "#/definitions/SKUCapability" + }, + "readOnly": true, + "x-ms-identifiers": [] + }, + "restrictions": { + "type": "array", + "description": "The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.", + "items": { + "$ref": "#/definitions/Restriction" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "name" + ] + }, + "SkuName": { + "type": "string", + "description": "The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType.", + "enum": [ + "Standard_LRS", + "Standard_GRS", + "Standard_RAGRS", + "Standard_ZRS", + "Premium_LRS", + "Premium_ZRS", + "Standard_GZRS", + "Standard_RAGZRS" + ], + "x-ms-enum": { + "name": "SkuName", + "modelAsString": true + } + }, + "SmbSetting": { + "type": "object", + "description": "Setting for SMB protocol", + "properties": { + "multichannel": { + "$ref": "#/definitions/Multichannel", + "description": "Multichannel setting. Applies to Premium FileStorage only." + }, + "versions": { + "type": "string", + "description": "SMB protocol versions supported by server. Valid values are SMB2.1, SMB3.0, SMB3.1.1. Should be passed as a string with delimiter ';'." + }, + "authenticationMethods": { + "type": "string", + "description": "SMB authentication methods supported by server. Valid values are NTLMv2, Kerberos. Should be passed as a string with delimiter ';'." + }, + "kerberosTicketEncryption": { + "type": "string", + "description": "Kerberos ticket encryption supported by server. Valid values are RC4-HMAC, AES-256. Should be passed as a string with delimiter ';'" + }, + "channelEncryption": { + "type": "string", + "description": "SMB channel encryption supported by server. Valid values are AES-128-CCM, AES-128-GCM, AES-256-GCM. Should be passed as a string with delimiter ';'." + } + } + }, + "SshPublicKey": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Optional. It is used to store the function/usage of the key" + }, + "key": { + "type": "string", + "description": "Ssh public key base64 encoded. The format should be: ' ', e.g. ssh-rsa AAAABBBB" + } + } + }, + "State": { + "type": "string", + "description": "Gets the state of virtual network rule.", + "enum": [ + "Provisioning", + "Deprovisioning", + "Succeeded", + "Failed", + "NetworkSourceDeleted" + ], + "x-ms-enum": { + "name": "State", + "modelAsString": true + }, + "readOnly": true + }, + "StorageAccount": { + "type": "object", + "description": "The storage account.", + "properties": { + "kind": { + "$ref": "#/definitions/Kind", + "description": "Gets the Kind.", + "readOnly": true + }, + "extendedLocation": { + "$ref": "#/definitions/ExtendedLocation", + "description": "The extendedLocation of the resource." + }, + "properties": { + "$ref": "#/definitions/StorageAccountProperties", + "description": "Properties of the storage account.", + "x-ms-client-flatten": true + }, + "identity": { + "$ref": "../../common-types/resource-management/v4/managedidentity.json#/definitions/ManagedServiceIdentity", + "description": "The managed service identities assigned to this resource." + }, + "sku": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/Sku", + "description": "The SKU (Stock Keeping Unit) assigned to this resource." + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "StorageAccountCheckNameAvailabilityParameters": { + "type": "object", + "description": "The parameters used to check the availability of the storage account name.", + "properties": { + "name": { + "type": "string", + "description": "The storage account name." + }, + "type": { + "type": "string", + "description": "The type of resource, Microsoft.Storage/storageAccounts", + "enum": [ + "Microsoft.Storage/storageAccounts" + ], + "x-ms-enum": { + "modelAsString": false + } + } + }, + "required": [ + "name", + "type" + ] + }, + "StorageAccountInternetEndpoints": { + "type": "object", + "description": "The URIs that are used to perform a retrieval of a public blob, file, web or dfs object via a internet routing endpoint.", + "properties": { + "blob": { + "type": "string", + "description": "Gets the blob endpoint.", + "readOnly": true + }, + "file": { + "type": "string", + "description": "Gets the file endpoint.", + "readOnly": true + }, + "web": { + "type": "string", + "description": "Gets the web endpoint.", + "readOnly": true + }, + "dfs": { + "type": "string", + "description": "Gets the dfs endpoint.", + "readOnly": true + } + } + }, + "StorageAccountKey": { + "type": "object", + "description": "An access key for the storage account.", + "properties": { + "keyName": { + "type": "string", + "description": "Name of the key.", + "readOnly": true + }, + "value": { + "type": "string", + "description": "Base 64-encoded value of the key.", + "readOnly": true + }, + "permissions": { + "$ref": "#/definitions/KeyPermission", + "description": "Permissions for the key -- read-only or full permissions.", + "readOnly": true + }, + "creationTime": { + "type": "string", + "format": "date-time", + "description": "Creation time of the key, in round trip date format.", + "readOnly": true + } + } + }, + "StorageAccountListKeysResult": { + "type": "object", + "description": "The response from the ListKeys operation.", + "properties": { + "keys": { + "type": "array", + "description": "Gets the list of storage account keys and their properties for the specified storage account.", + "items": { + "$ref": "#/definitions/StorageAccountKey" + }, + "readOnly": true, + "x-ms-identifiers": [] + } + } + }, + "StorageAccountListResult": { + "type": "object", + "description": "The response of a StorageAccount list operation.", + "properties": { + "value": { + "type": "array", + "description": "The StorageAccount items on this page", + "items": { + "$ref": "#/definitions/StorageAccount" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "StorageAccountMicrosoftEndpoints": { + "type": "object", + "description": "The URIs that are used to perform a retrieval of a public blob, queue, table, web or dfs object via a microsoft routing endpoint.", + "properties": { + "blob": { + "type": "string", + "description": "Gets the blob endpoint.", + "readOnly": true + }, + "queue": { + "type": "string", + "description": "Gets the queue endpoint.", + "readOnly": true + }, + "table": { + "type": "string", + "description": "Gets the table endpoint.", + "readOnly": true + }, + "file": { + "type": "string", + "description": "Gets the file endpoint.", + "readOnly": true + }, + "web": { + "type": "string", + "description": "Gets the web endpoint.", + "readOnly": true + }, + "dfs": { + "type": "string", + "description": "Gets the dfs endpoint.", + "readOnly": true + } + } + }, + "StorageAccountProperties": { + "type": "object", + "description": "Properties of the storage account.", + "properties": { + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Gets the status of the storage account at the time the operation was called.", + "readOnly": true + }, + "primaryEndpoints": { + "$ref": "#/definitions/Endpoints", + "description": "Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object. Note that Standard_ZRS and Premium_LRS accounts only return the blob endpoint.", + "readOnly": true + }, + "primaryLocation": { + "type": "string", + "description": "Gets the location of the primary data center for the storage account.", + "readOnly": true + }, + "statusOfPrimary": { + "$ref": "#/definitions/AccountStatus", + "description": "Gets the status indicating whether the primary location of the storage account is available or unavailable.", + "readOnly": true + }, + "lastGeoFailoverTime": { + "type": "string", + "format": "date-time", + "description": "Gets the timestamp of the most recent instance of a failover to the secondary location. Only the most recent timestamp is retained. This element is not returned if there has never been a failover instance. Only available if the accountType is Standard_GRS or Standard_RAGRS.", + "readOnly": true + }, + "secondaryLocation": { + "type": "string", + "description": "Gets the location of the geo-replicated secondary for the storage account. Only available if the accountType is Standard_GRS or Standard_RAGRS.", + "readOnly": true + }, + "statusOfSecondary": { + "$ref": "#/definitions/AccountStatus", + "description": "Gets the status indicating whether the secondary location of the storage account is available or unavailable. Only available if the SKU name is Standard_GRS or Standard_RAGRS.", + "readOnly": true + }, + "creationTime": { + "type": "string", + "format": "date-time", + "description": "Gets the creation date and time of the storage account in UTC.", + "readOnly": true + }, + "customDomain": { + "$ref": "#/definitions/CustomDomain", + "description": "Gets the custom domain the user assigned to this storage account.", + "readOnly": true + }, + "sasPolicy": { + "$ref": "#/definitions/SasPolicy", + "description": "SasPolicy assigned to the storage account.", + "readOnly": true + }, + "keyPolicy": { + "$ref": "#/definitions/KeyPolicy", + "description": "KeyPolicy assigned to the storage account.", + "readOnly": true + }, + "keyCreationTime": { + "$ref": "#/definitions/KeyCreationTime", + "description": "Storage account keys creation time.", + "readOnly": true + }, + "secondaryEndpoints": { + "$ref": "#/definitions/Endpoints", + "description": "Gets the URLs that are used to perform a retrieval of a public blob, queue, or table object from the secondary location of the storage account. Only available if the SKU name is Standard_RAGRS.", + "readOnly": true + }, + "encryption": { + "$ref": "#/definitions/Encryption", + "description": "Encryption settings to be used for server-side encryption for the storage account.", + "readOnly": true + }, + "accessTier": { + "$ref": "#/definitions/AccessTier", + "description": "Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.", + "readOnly": true + }, + "azureFilesIdentityBasedAuthentication": { + "$ref": "#/definitions/AzureFilesIdentityBasedAuthentication", + "description": "Provides the identity based authentication settings for Azure Files." + }, + "supportsHttpsTrafficOnly": { + "type": "boolean", + "description": "Allows https traffic only to storage service if sets to true.", + "x-ms-client-name": "enableHttpsTrafficOnly" + }, + "networkAcls": { + "$ref": "#/definitions/NetworkRuleSet", + "description": "Network rule set", + "readOnly": true, + "x-ms-client-name": "networkRuleSet" + }, + "isSftpEnabled": { + "type": "boolean", + "description": "Enables Secure File Transfer Protocol, if set to true", + "x-ms-client-name": "IsSftpEnabled" + }, + "isLocalUserEnabled": { + "type": "boolean", + "description": "Enables local users feature, if set to true", + "x-ms-client-name": "IsLocalUserEnabled" + }, + "isHnsEnabled": { + "type": "boolean", + "description": "Account HierarchicalNamespace enabled if sets to true.", + "x-ms-client-name": "IsHnsEnabled" + }, + "geoReplicationStats": { + "$ref": "#/definitions/GeoReplicationStats", + "description": "Geo Replication Stats", + "readOnly": true + }, + "failoverInProgress": { + "type": "boolean", + "description": "If the failover is in progress, the value will be true, otherwise, it will be null.", + "readOnly": true + }, + "largeFileSharesState": { + "$ref": "#/definitions/LargeFileSharesState", + "description": "Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled." + }, + "privateEndpointConnections": { + "type": "array", + "description": "List of private endpoint connection associated with the specified storage account", + "items": { + "$ref": "#/definitions/PrivateEndpointConnection" + }, + "readOnly": true + }, + "routingPreference": { + "$ref": "#/definitions/RoutingPreference", + "description": "Maintains information about the network routing choice opted by the user for data transfer" + }, + "blobRestoreStatus": { + "$ref": "#/definitions/BlobRestoreStatus", + "description": "Blob restore status", + "readOnly": true + }, + "allowBlobPublicAccess": { + "type": "boolean", + "description": "Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property." + }, + "minimumTlsVersion": { + "$ref": "#/definitions/MinimumTlsVersion", + "description": "Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property." + }, + "allowSharedKeyAccess": { + "type": "boolean", + "description": "Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true." + }, + "isNfsV3Enabled": { + "type": "boolean", + "description": "NFS 3.0 protocol support enabled if set to true.", + "x-ms-client-name": "enableNfsV3" + }, + "allowCrossTenantReplication": { + "type": "boolean", + "description": "Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property." + }, + "defaultToOAuthAuthentication": { + "type": "boolean", + "description": "A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property." + }, + "publicNetworkAccess": { + "$ref": "#/definitions/PublicNetworkAccess", + "description": "Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'." + }, + "immutableStorageWithVersioning": { + "$ref": "#/definitions/ImmutableStorageAccount", + "description": "The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the containers in the account by default." + }, + "allowedCopyScope": { + "$ref": "#/definitions/AllowedCopyScope", + "description": "Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet." + }, + "storageAccountSkuConversionStatus": { + "$ref": "#/definitions/StorageAccountSkuConversionStatus", + "description": "This property is readOnly and is set by server during asynchronous storage account sku conversion operations." + }, + "dnsEndpointType": { + "$ref": "#/definitions/DnsEndpointType", + "description": "Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier." + } + } + }, + "StorageAccountPropertiesUpdateParameters": { + "type": "object", + "description": "The parameters used when updating a storage account.", + "properties": { + "customDomain": { + "$ref": "#/definitions/CustomDomain", + "description": "Custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property." + }, + "encryption": { + "$ref": "#/definitions/Encryption", + "description": "Not applicable. Azure Storage encryption at rest is enabled by default for all storage accounts and cannot be disabled." + }, + "sasPolicy": { + "$ref": "#/definitions/SasPolicy", + "description": "SasPolicy assigned to the storage account." + }, + "keyPolicy": { + "$ref": "#/definitions/KeyPolicy", + "description": "KeyPolicy assigned to the storage account." + }, + "accessTier": { + "$ref": "#/definitions/AccessTier", + "description": "Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type." + }, + "azureFilesIdentityBasedAuthentication": { + "$ref": "#/definitions/AzureFilesIdentityBasedAuthentication", + "description": "Provides the identity based authentication settings for Azure Files." + }, + "supportsHttpsTrafficOnly": { + "type": "boolean", + "description": "Allows https traffic only to storage service if sets to true.", + "x-ms-client-name": "enableHttpsTrafficOnly" + }, + "isSftpEnabled": { + "type": "boolean", + "description": "Enables Secure File Transfer Protocol, if set to true", + "x-ms-client-name": "IsSftpEnabled" + }, + "isLocalUserEnabled": { + "type": "boolean", + "description": "Enables local users feature, if set to true", + "x-ms-client-name": "IsLocalUserEnabled" + }, + "networkAcls": { + "$ref": "#/definitions/NetworkRuleSet", + "description": "Network rule set", + "x-ms-client-name": "networkRuleSet" + }, + "largeFileSharesState": { + "$ref": "#/definitions/LargeFileSharesState", + "description": "Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled." + }, + "routingPreference": { + "$ref": "#/definitions/RoutingPreference", + "description": "Maintains information about the network routing choice opted by the user for data transfer" + }, + "allowBlobPublicAccess": { + "type": "boolean", + "description": "Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property." + }, + "minimumTlsVersion": { + "$ref": "#/definitions/MinimumTlsVersion", + "description": "Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property." + }, + "allowSharedKeyAccess": { + "type": "boolean", + "description": "Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true." + }, + "allowCrossTenantReplication": { + "type": "boolean", + "description": "Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property." + }, + "defaultToOAuthAuthentication": { + "type": "boolean", + "description": "A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property." + }, + "publicNetworkAccess": { + "$ref": "#/definitions/PublicNetworkAccess", + "description": "Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'." + }, + "immutableStorageWithVersioning": { + "$ref": "#/definitions/ImmutableStorageAccount", + "description": "The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the containers in the account by default." + }, + "allowedCopyScope": { + "$ref": "#/definitions/AllowedCopyScope", + "description": "Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet." + }, + "dnsEndpointType": { + "$ref": "#/definitions/DnsEndpointType", + "description": "Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier." + } + } + }, + "StorageAccountRegenerateKeyParameters": { + "type": "object", + "description": "The parameters used to regenerate the storage account key.", + "properties": { + "keyName": { + "type": "string", + "description": "The name of storage keys that want to be regenerated, possible values are key1, key2, kerb1, kerb2." + } + }, + "required": [ + "keyName" + ] + }, + "StorageAccountSkuConversionStatus": { + "type": "object", + "description": "This defines the sku conversion status object for asynchronous sku conversions.", + "properties": { + "skuConversionStatus": { + "$ref": "#/definitions/SkuConversionStatus", + "description": "This property indicates the current sku conversion status.", + "readOnly": true + }, + "targetSkuName": { + "$ref": "#/definitions/SkuName", + "description": "This property represents the target sku name to which the account sku is being converted asynchronously." + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "This property represents the sku conversion start time.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "This property represents the sku conversion end time.", + "readOnly": true + } + } + }, + "StorageAccountUpdateParameters": { + "type": "object", + "description": "The parameters that can be provided when updating the storage account properties.", + "properties": { + "sku": { + "$ref": "#/definitions/Sku", + "description": "Gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of those SKU names be updated to any other value." + }, + "tags": { + "type": "object", + "description": "Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters.", + "additionalProperties": { + "type": "string" + } + }, + "identity": { + "$ref": "#/definitions/Identity", + "description": "The identity of the resource." + }, + "properties": { + "$ref": "#/definitions/StorageAccountPropertiesUpdateParameters", + "description": "The parameters used when updating a storage account." + }, + "kind": { + "$ref": "#/definitions/Kind", + "description": "Optional. Indicates the type of storage account. Currently only StorageV2 value supported by server." + } + } + }, + "StorageQueue": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/QueueProperties", + "description": "Queue resource properties.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "StorageQueueListResult": { + "type": "object", + "description": "The response of a StorageQueue list operation.", + "properties": { + "value": { + "type": "array", + "description": "The StorageQueue items on this page", + "items": { + "$ref": "#/definitions/StorageQueue" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "StorageSkuListResult": { + "type": "object", + "description": "The response from the List Storage SKUs operation.", + "properties": { + "value": { + "type": "array", + "description": "Get the list result of storage SKUs and their properties.", + "items": { + "$ref": "#/definitions/SkuInformation" + }, + "readOnly": true, + "x-ms-identifiers": [] + } + } + }, + "Table": { + "type": "object", + "description": "Properties of the table, including Id, resource name, resource type.", + "properties": { + "properties": { + "$ref": "#/definitions/TableProperties", + "description": "Table resource properties.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "TableAccessPolicy": { + "type": "object", + "description": "Table Access Policy Properties Object.", + "properties": { + "startTime": { + "type": "string", + "format": "date-time", + "description": "Start time of the access policy" + }, + "expiryTime": { + "type": "string", + "format": "date-time", + "description": "Expiry time of the access policy" + }, + "permission": { + "type": "string", + "description": "Required. List of abbreviated permissions. Supported permission values include 'r','a','u','d'" + } + }, + "required": [ + "permission" + ] + }, + "TableListResult": { + "type": "object", + "description": "The response of a Table list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Table items on this page", + "items": { + "$ref": "#/definitions/Table" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "TableProperties": { + "type": "object", + "properties": { + "tableName": { + "type": "string", + "description": "Table name under the specified account", + "readOnly": true + }, + "signedIdentifiers": { + "type": "array", + "description": "List of stored access policies specified on the table.", + "items": { + "$ref": "#/definitions/TableSignedIdentifier" + } + } + } + }, + "TableServiceProperties": { + "type": "object", + "description": "The properties of a storage account’s Table service.", + "properties": { + "name": { + "type": "string", + "readOnly": true + }, + "properties": { + "$ref": "#/definitions/TableServicePropertiesProperties", + "description": "The properties of a storage account’s Table service.", + "x-ms-client-flatten": true + } + }, + "required": [ + "name" + ], + "allOf": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "TableServicePropertiesListResult": { + "type": "object", + "description": "The response of a TableServiceProperties list operation.", + "properties": { + "value": { + "type": "array", + "description": "The TableServiceProperties items on this page", + "items": { + "$ref": "#/definitions/TableServiceProperties" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "TableServicePropertiesProperties": { + "type": "object", + "description": "The properties of a storage account’s Table service.", + "properties": { + "cors": { + "$ref": "#/definitions/CorsRules", + "description": "Specifies CORS rules for the Table service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the Table service." + } + } + }, + "TableSignedIdentifier": { + "type": "object", + "description": "Object to set Table Access Policy.", + "properties": { + "id": { + "type": "string", + "description": "unique-64-character-value of the stored access policy." + }, + "accessPolicy": { + "$ref": "#/definitions/TableAccessPolicy", + "description": "Access policy" + } + }, + "required": [ + "id" + ] + }, + "TagFilter": { + "type": "object", + "description": "Blob index tag based filtering for blob objects", + "properties": { + "name": { + "type": "string", + "description": "This is the filter tag name, it can have 1 - 128 characters", + "minLength": 1, + "maxLength": 128 + }, + "op": { + "type": "string", + "description": "This is the comparison operator which is used for object comparison and filtering. Only == (equality operator) is currently supported" + }, + "value": { + "type": "string", + "description": "This is the filter tag value field used for tag based filtering, it can have 0 - 256 characters", + "maxLength": 256 + } + }, + "required": [ + "name", + "op", + "value" + ] + }, + "TagProperty": { + "type": "object", + "description": "A tag of the LegalHold of a blob container.", + "properties": { + "tag": { + "type": "string", + "description": "The tag value.", + "readOnly": true + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Returns the date and time the tag was added.", + "readOnly": true + }, + "objectIdentifier": { + "type": "string", + "description": "Returns the Object ID of the user who added the tag.", + "readOnly": true + }, + "tenantId": { + "type": "string", + "description": "Returns the Tenant ID that issued the token for the user who added the tag.", + "readOnly": true + }, + "upn": { + "type": "string", + "description": "Returns the User Principal Name of the user who added the tag.", + "readOnly": true + } + } + }, + "UpdateHistoryProperty": { + "type": "object", + "description": "An update history of the ImmutabilityPolicy of a blob container.", + "properties": { + "update": { + "$ref": "#/definitions/ImmutabilityPolicyUpdateType", + "description": "The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend.", + "readOnly": true + }, + "immutabilityPeriodSinceCreationInDays": { + "type": "integer", + "format": "int32", + "description": "The immutability period for the blobs in the container since the policy creation, in days.", + "readOnly": true + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Returns the date and time the ImmutabilityPolicy was updated.", + "readOnly": true + }, + "objectIdentifier": { + "type": "string", + "description": "Returns the Object ID of the user who updated the ImmutabilityPolicy.", + "readOnly": true + }, + "tenantId": { + "type": "string", + "description": "Returns the Tenant ID that issued the token for the user who updated the ImmutabilityPolicy.", + "readOnly": true + }, + "upn": { + "type": "string", + "description": "Returns the User Principal Name of the user who updated the ImmutabilityPolicy.", + "readOnly": true + }, + "allowProtectedAppendWrites": { + "type": "boolean", + "description": "This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API." + }, + "allowProtectedAppendWritesAll": { + "type": "boolean", + "description": "This property can only be changed for unlocked time-based retention policies. When enabled, new blocks can be written to both 'Append and Bock Blobs' while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. This property cannot be changed with ExtendImmutabilityPolicy API. The 'allowProtectedAppendWrites' and 'allowProtectedAppendWritesAll' properties are mutually exclusive." + } + } + }, + "Usage": { + "type": "object", + "description": "Describes Storage Resource Usage.", + "properties": { + "unit": { + "$ref": "#/definitions/UsageUnit", + "description": "Gets the unit of measurement.", + "readOnly": true + }, + "currentValue": { + "type": "integer", + "format": "int32", + "description": "Gets the current count of the allocated resources in the subscription.", + "readOnly": true + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "Gets the maximum count of the resources that can be allocated in the subscription.", + "readOnly": true + }, + "name": { + "$ref": "#/definitions/UsageName", + "description": "Gets the name of the type of usage.", + "readOnly": true + } + } + }, + "UsageListResult": { + "type": "object", + "description": "The response from the List Usages operation.", + "properties": { + "value": { + "type": "array", + "description": "Gets or sets the list of Storage Resource Usages.", + "items": { + "$ref": "#/definitions/Usage" + }, + "x-ms-identifiers": [] + } + } + }, + "UsageName": { + "type": "object", + "description": "The usage names that can be used; currently limited to StorageAccount.", + "properties": { + "value": { + "type": "string", + "description": "Gets a string describing the resource name.", + "readOnly": true + }, + "localizedValue": { + "type": "string", + "description": "Gets a localized string describing the resource name.", + "readOnly": true + } + } + }, + "UsageUnit": { + "type": "string", + "description": "Gets the unit of measurement.", + "enum": [ + "Count", + "Bytes", + "Seconds", + "Percent", + "CountsPerSecond", + "BytesPerSecond" + ], + "x-ms-enum": { + "name": "UsageUnit", + "modelAsString": false + } + }, + "VirtualNetworkRule": { + "type": "object", + "description": "Virtual Network rule.", + "properties": { + "id": { + "type": "string", + "description": "Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.", + "x-ms-client-name": "virtualNetworkResourceId" + }, + "action": { + "type": "string", + "description": "The action of virtual network rule.", + "enum": [ + "Allow" + ], + "x-ms-enum": { + "modelAsString": false + } + }, + "state": { + "$ref": "#/definitions/State", + "description": "Gets the state of virtual network rule." + } + }, + "required": [ + "id" + ] + } + }, + "parameters": {} +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp index 989af38fc7..9680f4aa1f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp @@ -17,7 +17,7 @@ namespace Microsoft.Storage; #suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @subscriptionResource -@parentResource("SubscriptionLocationResource") +@parentResource(SubscriptionLocationResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(DeletedAccountProperties) model DeletedAccount extends ProxyResourceBase { diff --git a/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts b/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts index 63babc001b..ecf1e7edc3 100644 --- a/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts +++ b/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts @@ -38,7 +38,16 @@ export async function generateTypespec(repoRoot: string, folder: string, debug = } // A list containing all the projects we could compile. After we enable all the projects, we will delete this list. -const whiteList = ["anomalyDetector", "arm-agrifood", "arm-sphere", "arm-test"]; +const whiteList = [ + "anomalyDetector", + "arm-agrifood", + "arm-networkanalytics", + "arm-playwrighttesting", + "arm-servicenetworking", + "arm-sphere", + "arm-storage", + "arm-test", +]; export async function generateSwagger(folder: string) { if (!whiteList.includes(folder)) { From 1f91e166f3fd83b8b0ecd24fa00b0703c064cdc8 Mon Sep 17 00:00:00 2001 From: Patrick Hallisey Date: Wed, 8 May 2024 13:20:59 -0700 Subject: [PATCH 32/33] Use authenticatedContainerRegistries config for 1es template (#4935) --- eng/pipelines/publish.yaml | 2 ++ eng/pipelines/templates/1es-redirect.yml | 4 ++++ eng/pipelines/templates/build-and-push-docker.yaml | 6 ------ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/publish.yaml b/eng/pipelines/publish.yaml index fd8c4be832..b8b009b15b 100644 --- a/eng/pipelines/publish.yaml +++ b/eng/pipelines/publish.yaml @@ -10,6 +10,8 @@ trigger: extends: template: /eng/pipelines/templates/1es-redirect.yml parameters: + authenticatedContainerRegistries: + - serviceConnection: azsdkengsys stages: - stage: npm pool: diff --git a/eng/pipelines/templates/1es-redirect.yml b/eng/pipelines/templates/1es-redirect.yml index beb2f1c7c6..9e30789be5 100644 --- a/eng/pipelines/templates/1es-redirect.yml +++ b/eng/pipelines/templates/1es-redirect.yml @@ -15,6 +15,9 @@ parameters: - name: Use1ESOfficial type: boolean default: true + - name: authenticatedContainerRegistries + type: object + default: [] extends: ${{ if and(parameters.Use1ESOfficial, eq(variables['System.TeamProject'], 'internal')) }}: @@ -24,6 +27,7 @@ extends: parameters: settings: skipBuildTagsForGitHubPullRequests: true + authenticatedContainerRegistries: ${{ parameters.authenticatedContainerRegistries }} sdl: git: longpaths: true diff --git a/eng/pipelines/templates/build-and-push-docker.yaml b/eng/pipelines/templates/build-and-push-docker.yaml index 3e7934b9ff..8aff7b8d25 100644 --- a/eng/pipelines/templates/build-and-push-docker.yaml +++ b/eng/pipelines/templates/build-and-push-docker.yaml @@ -17,12 +17,6 @@ jobs: inputs: dockerVersion: "17.09.0-ce" - - task: Docker@2 - displayName: Login to ACR - inputs: - command: login - containerRegistry: azsdkengsys - - script: | docker build -t ${{ parameters.image }} . displayName: Build image From 961b09d5a2e9cac956edc90eb64b844777ae7e14 Mon Sep 17 00:00:00 2001 From: Pan Shao <97225342+pshao25@users.noreply.github.com> Date: Fri, 24 May 2024 11:25:01 +0800 Subject: [PATCH 33/33] Upgrade compiler version and fix issues (#4967) 1. Upgrade compiler version to 0.56 2. `TrackedResourceBase` => `Foundations.TrackedResource` (same as others: `XXXResourceBase` => `Foundations.XXXResource`) 3. `Azure.ResourceManager.ManagedServiceIdentity` => `Azure.ResourceManager.ManagedServiceIdentityProperty` (same as others `Azure.ResourceManager.XXX`=> `Azure.ResourceManager.XXXProperty`) 4. `extends Record` => `...Record` 5. `name: string` in resource => `ResourceNameParameter` template 6. `@parameterVisibility("read")` => `@parameterVisibility` 7. `TrackedResource` => `Azure.ResourceManager.TrackedResource` 8. Add suppressions of below syntax to brown field services - ArmResourceDeleteSync - ArmResourceDeleteAsync - property has record type- --- .../upgrade56_2024-05-17-10-48.json | 10 + common/config/rush/pnpm-lock.yaml | 331 ++++++------ .../openapi-to-typespec/package.json | 24 +- .../src/emiters/emit-arm-resources.ts | 1 - .../src/generate/generate-arm-resource.ts | 22 +- .../src/generate/generate-object.ts | 8 +- .../openapi-to-typespec/src/interfaces.ts | 11 +- .../src/transforms/transform-arm-resources.ts | 89 +++- .../src/transforms/transform-object.ts | 56 +- .../openapi-to-typespec/src/utils/docs.ts | 9 + .../openapi-to-typespec/src/utils/imports.ts | 4 +- .../src/utils/model-generation.ts | 11 +- .../src/utils/suppressions.ts | 41 ++ .../src/utils/type-mapping.ts | 12 + .../test/analyzeText/tsp-output/models.tsp | 4 +- .../swagger-output/swagger.json | 29 -- .../arm-agrifood/swagger-output/swagger.json | 23 +- .../arm-agrifood/tsp-output/DataConnector.tsp | 27 +- .../tsp-output/DataManagerForAgriculture.tsp | 32 +- .../DataManagerForAgricultureExtension.tsp | 24 +- .../DataManagerForAgricultureSolution.tsp | 24 +- .../arm-agrifood/tsp-output/Extension.tsp | 23 +- .../tsp-output/PrivateEndpointConnection.tsp | 21 +- .../tsp-output/PrivateLinkResource.tsp | 19 +- .../test/arm-agrifood/tsp-output/Solution.tsp | 24 +- .../test/arm-agrifood/tsp-output/models.tsp | 10 +- .../arm-alertsmanagement/tsp-output/Alert.tsp | 22 +- .../tsp-output/AlertProcessingRule.tsp | 23 +- .../tsp-output/SmartGroup.tsp | 23 +- .../tsp-output/models.tsp | 2 + .../tsp-output/AnalysisServicesServer.tsp | 28 +- .../tsp-output/models.tsp | 2 + .../tsp-output/AccessInformationContract.tsp | 11 +- .../tsp-output/ApiContract.tsp | 36 +- .../ApiManagementServiceResource.tsp | 40 +- .../tsp-output/ApiReleaseContract.tsp | 36 +- .../tsp-output/ApiVersionSetContract.tsp | 36 +- .../AuthorizationServerContract.tsp | 36 +- .../tsp-output/BackendContract.tsp | 35 +- .../tsp-output/CacheContract.tsp | 36 +- .../tsp-output/CertificateContract.tsp | 32 +- .../tsp-output/DeletedServiceContract.tsp | 27 +- .../tsp-output/DiagnosticContract.tsp | 36 +- .../tsp-output/EmailTemplateContract.tsp | 14 +- .../GatewayCertificateAuthorityContract.tsp | 32 +- .../tsp-output/GatewayContract.tsp | 35 +- .../GatewayHostnameConfigurationContract.tsp | 31 +- .../tsp-output/GlobalSchemaContract.tsp | 31 +- .../tsp-output/GroupContract.tsp | 35 +- .../tsp-output/IdentityProviderContract.tsp | 12 +- .../tsp-output/IssueAttachmentContract.tsp | 32 +- .../tsp-output/IssueCommentContract.tsp | 32 +- .../tsp-output/IssueContract.tsp | 38 +- .../tsp-output/LoggerContract.tsp | 34 +- .../tsp-output/NamedValueContract.tsp | 32 +- .../tsp-output/NotificationContract.tsp | 7 +- .../OpenidConnectProviderContract.tsp | 38 +- .../tsp-output/OperationContract.tsp | 35 +- .../tsp-output/PolicyContract.tsp | 10 +- .../tsp-output/PortalDelegationSettings.tsp | 20 +- .../tsp-output/PortalRevisionContract.tsp | 30 +- .../tsp-output/PortalSigninSettings.tsp | 20 +- .../tsp-output/PortalSignupSettings.tsp | 20 +- .../tsp-output/PrivateEndpointConnection.tsp | 23 +- .../tsp-output/PrivateLinkResource.tsp | 19 +- .../tsp-output/ProductContract.tsp | 35 +- .../tsp-output/SchemaContract.tsp | 31 +- .../tsp-output/SubscriptionContract.tsp | 31 +- .../tsp-output/TagContract.tsp | 29 +- .../tsp-output/TagDescriptionContract.tsp | 32 +- .../tsp-output/TenantSettingsContract.tsp | 5 +- .../tsp-output/UserContract.tsp | 37 +- .../arm-apimanagement/tsp-output/models.tsp | 11 + .../tsp-output/DenyAssignment.tsp | 21 +- .../tsp-output/ProviderOperationsMetadata.tsp | 25 +- .../tsp-output/RoleAssignment.tsp | 27 +- .../tsp-output/RoleAssignmentSchedule.tsp | 23 +- .../RoleAssignmentScheduleInstance.tsp | 23 +- .../RoleAssignmentScheduleRequest.tsp | 22 +- .../tsp-output/RoleDefinition.tsp | 21 +- .../tsp-output/RoleEligibilitySchedule.tsp | 23 +- .../RoleEligibilityScheduleInstance.tsp | 23 +- .../RoleEligibilityScheduleRequest.tsp | 22 +- .../tsp-output/RoleManagementPolicy.tsp | 22 +- .../RoleManagementPolicyAssignment.tsp | 20 +- .../tsp-output/Application.tsp | 26 +- .../tsp-output/BusinessProcess.tsp | 26 +- .../tsp-output/BusinessProcessVersion.tsp | 22 +- .../tsp-output/InfrastructureResource.tsp | 27 +- .../tsp-output/Space.tsp | 25 +- .../tsp-output/models.tsp | 15 + .../tsp-output/AvailabilitySet.tsp | 19 +- .../tsp-output/CapacityReservation.tsp | 23 +- .../tsp-output/CapacityReservationGroup.tsp | 25 +- .../arm-compute/tsp-output/CloudService.tsp | 22 +- .../tsp-output/CloudServiceRole.tsp | 17 +- .../tsp-output/CommunityGallery.tsp | 17 +- .../tsp-output/CommunityGalleryImage.tsp | 19 +- .../CommunityGalleryImageVersion.tsp | 19 +- .../arm-compute/tsp-output/DedicatedHost.tsp | 23 +- .../tsp-output/DedicatedHostGroup.tsp | 21 +- .../test/arm-compute/tsp-output/Disk.tsp | 23 +- .../arm-compute/tsp-output/DiskAccess.tsp | 23 +- .../tsp-output/DiskEncryptionSet.tsp | 23 +- .../tsp-output/DiskRestorePoint.tsp | 24 +- .../test/arm-compute/tsp-output/Gallery.tsp | 23 +- .../tsp-output/GalleryApplication.tsp | 23 +- .../tsp-output/GalleryApplicationVersion.tsp | 25 +- .../arm-compute/tsp-output/GalleryImage.tsp | 23 +- .../tsp-output/GalleryImageVersion.tsp | 25 +- .../test/arm-compute/tsp-output/Image.tsp | 23 +- .../test/arm-compute/tsp-output/OSFamily.tsp | 17 +- .../test/arm-compute/tsp-output/OSVersion.tsp | 17 +- .../tsp-output/PrivateEndpointConnection.tsp | 21 +- .../tsp-output/ProximityPlacementGroup.tsp | 23 +- .../arm-compute/tsp-output/RestorePoint.tsp | 25 +- .../tsp-output/RestorePointCollection.tsp | 29 +- .../arm-compute/tsp-output/RoleInstance.tsp | 25 +- .../tsp-output/RollingUpgradeStatusInfo.tsp | 15 +- .../arm-compute/tsp-output/SharedGallery.tsp | 19 +- .../tsp-output/SharedGalleryImage.tsp | 21 +- .../tsp-output/SharedGalleryImageVersion.tsp | 21 +- .../test/arm-compute/tsp-output/Snapshot.tsp | 23 +- .../tsp-output/SshPublicKeyResource.tsp | 19 +- .../arm-compute/tsp-output/VirtualMachine.tsp | 35 +- .../tsp-output/VirtualMachineExtension.tsp | 27 +- .../VirtualMachineExtensionImage.tsp | 14 +- .../tsp-output/VirtualMachineRunCommand.tsp | 29 +- .../tsp-output/VirtualMachineScaleSet.tsp | 65 +-- .../VirtualMachineScaleSetExtension.tsp | 33 +- .../tsp-output/VirtualMachineScaleSetVM.tsp | 49 +- .../VirtualMachineScaleSetVMExtension.tsp | 33 +- .../test/arm-compute/tsp-output/models.tsp | 14 + .../test/arm-dns/tsp-output/DnsRecord.tsp | 31 +- .../test/arm-dns/tsp-output/DnsZone.tsp | 29 +- .../test/arm-dns/tsp-output/models.tsp | 3 + .../BatchDeploymentTrackedResource.tsp | 31 +- .../BatchEndpointTrackedResource.tsp | 29 +- .../tsp-output/CodeContainerResource.tsp | 24 +- .../tsp-output/CodeVersionResource.tsp | 23 +- .../tsp-output/ComponentContainerResource.tsp | 24 +- .../tsp-output/ComponentVersionResource.tsp | 23 +- .../tsp-output/ComputeResource.tsp | 32 +- .../tsp-output/DataContainerResource.tsp | 23 +- .../tsp-output/DataVersionBaseResource.tsp | 23 +- .../tsp-output/DatastoreResource.tsp | 23 +- .../EnvironmentContainerResource.tsp | 26 +- .../tsp-output/EnvironmentVersionResource.tsp | 25 +- .../tsp-output/Feature.tsp | 22 +- .../tsp-output/FeaturesetContainer.tsp | 23 +- .../tsp-output/FeaturesetVersion.tsp | 25 +- .../FeaturestoreEntityContainer.tsp | 25 +- .../tsp-output/FeaturestoreEntityVersion.tsp | 25 +- .../tsp-output/JobBaseResource.tsp | 27 +- .../tsp-output/LabelingJob.tsp | 23 +- .../tsp-output/ModelContainerResource.tsp | 24 +- .../tsp-output/ModelVersionResource.tsp | 23 +- .../OnlineDeploymentTrackedResource.tsp | 31 +- .../OnlineEndpointTrackedResource.tsp | 29 +- .../tsp-output/OutboundRuleBasicResource.tsp | 24 +- .../tsp-output/PrivateEndpointConnection.tsp | 23 +- .../tsp-output/Registry.tsp | 30 +- .../tsp-output/Schedule.tsp | 23 +- .../tsp-output/Workspace.tsp | 33 +- ...aceConnectionPropertiesV2BasicResource.tsp | 27 +- .../tsp-output/models.tsp | 99 +++- .../swagger-output/swagger.json | 83 ++- .../tsp-output/DataProduct.tsp | 30 +- .../tsp-output/DataProductsCatalog.tsp | 16 +- .../tsp-output/DataType.tsp | 26 +- .../tsp-output/models.tsp | 8 +- .../swagger-output/swagger.json | 24 +- .../tsp-output/Association.tsp | 23 +- .../tsp-output/Frontend.tsp | 22 +- .../tsp-output/TrafficController.tsp | 23 +- .../arm-sphere/swagger-output/swagger.json | 88 ++-- .../test/arm-sphere/tsp-output/Catalog.tsp | 29 +- .../arm-sphere/tsp-output/Certificate.tsp | 23 +- .../test/arm-sphere/tsp-output/Deployment.tsp | 23 +- .../test/arm-sphere/tsp-output/Device.tsp | 21 +- .../arm-sphere/tsp-output/DeviceGroup.tsp | 24 +- .../test/arm-sphere/tsp-output/Image.tsp | 21 +- .../test/arm-sphere/tsp-output/Product.tsp | 22 +- .../arm-storage/swagger-output/swagger.json | 484 +++++++----------- .../arm-storage/tsp-output/BlobContainer.tsp | 29 +- .../tsp-output/BlobInventoryPolicy.tsp | 15 +- .../tsp-output/BlobServiceProperties.tsp | 16 +- .../arm-storage/tsp-output/DeletedAccount.tsp | 23 +- .../tsp-output/EncryptionScope.tsp | 28 +- .../tsp-output/FileServiceProperties.tsp | 16 +- .../test/arm-storage/tsp-output/FileShare.tsp | 37 +- .../tsp-output/ImmutabilityPolicy.tsp | 25 +- .../test/arm-storage/tsp-output/LocalUser.tsp | 25 +- .../tsp-output/ManagementPolicy.tsp | 15 +- .../tsp-output/ObjectReplicationPolicy.tsp | 23 +- .../tsp-output/PrivateEndpointConnection.tsp | 21 +- .../tsp-output/QueueServiceProperties.tsp | 14 +- .../arm-storage/tsp-output/StorageAccount.tsp | 39 +- .../arm-storage/tsp-output/StorageQueue.tsp | 30 +- .../test/arm-storage/tsp-output/Table.tsp | 28 +- .../tsp-output/TableServiceProperties.tsp | 14 +- .../test/arm-storage/tsp-output/models.tsp | 7 + .../test/arm-test/swagger-output/swagger.json | 14 +- .../test/arm-test/tsp-output/ArrayDefault.tsp | 21 +- .../test/arm-test/tsp-output/DictProperty.tsp | 20 +- .../test/arm-test/tsp-output/Employee.tsp | 22 +- .../test/arm-test/tsp-output/Enroll.tsp | 15 +- .../test/arm-test/tsp-output/models.tsp | 4 +- .../test/openAI/tsp-output/models.tsp | 5 +- .../test/qna/tsp-output/models.tsp | 4 +- .../test/qnaAuthoring/tsp-output/models.tsp | 4 +- .../test/utils/generate-typespec.ts | 2 + 212 files changed, 3137 insertions(+), 2842 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/upgrade56_2024-05-17-10-48.json create mode 100644 packages/extensions/openapi-to-typespec/src/utils/suppressions.ts create mode 100644 packages/extensions/openapi-to-typespec/src/utils/type-mapping.ts diff --git a/common/changes/@autorest/openapi-to-typespec/upgrade56_2024-05-17-10-48.json b/common/changes/@autorest/openapi-to-typespec/upgrade56_2024-05-17-10-48.json new file mode 100644 index 0000000000..e73700e493 --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/upgrade56_2024-05-17-10-48.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Upgrade compiler to 0.56 and fix issues", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 95ff7c2aee..de7d2f8c70 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -15,17 +15,17 @@ dependencies: specifier: ~3.0.0 version: 3.0.255 '@azure-tools/typespec-autorest': - specifier: ^0.39.0 - version: 0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@azure-tools/typespec-client-generator-core@0.39.1)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) + specifier: ^0.42.0 + version: 0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@azure-tools/typespec-client-generator-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) '@azure-tools/typespec-azure-core': - specifier: ^0.39.0 - version: 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0) + specifier: ^0.42.0 + version: 0.42.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0) '@azure-tools/typespec-azure-resource-manager': - specifier: ^0.39.0 - version: 0.39.0(@azure-tools/typespec-autorest@0.39.0)(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) + specifier: ^0.42.0 + version: 0.42.0(@azure-tools/typespec-autorest@0.42.0)(@azure-tools/typespec-azure-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) '@azure-tools/typespec-client-generator-core': - specifier: ^0.39.0 - version: 0.39.1(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) + specifier: ^0.42.0 + version: 0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) '@azure-tools/uri': specifier: ~3.1.1 version: 3.1.1 @@ -168,26 +168,26 @@ dependencies: specifier: ^6.11.0 version: 6.11.0(eslint@8.53.0)(typescript@5.2.2) '@typespec/compiler': - specifier: ^0.53.0 - version: 0.53.0 + specifier: ^0.56.0 + version: 0.56.0 '@typespec/http': - specifier: ^0.53.0 - version: 0.53.0(@typespec/compiler@0.53.0) + specifier: ^0.56.0 + version: 0.56.0(@typespec/compiler@0.56.0) '@typespec/openapi': - specifier: ^0.53.0 - version: 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) + specifier: ^0.56.0 + version: 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) '@typespec/openapi3': - specifier: ^0.53.0 - version: 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/versioning@0.53.0) + specifier: ^0.56.0 + version: 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/versioning@0.56.0) '@typespec/prettier-plugin-typespec': - specifier: ^0.53.0 - version: 0.53.0 + specifier: ^0.56.0 + version: 0.56.0 '@typespec/rest': - specifier: ^0.53.0 - version: 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) + specifier: ^0.56.0 + version: 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) '@typespec/versioning': - specifier: ^0.53.0 - version: 0.53.0(@typespec/compiler@0.53.0) + specifier: ^0.56.0 + version: 0.56.0(@typespec/compiler@0.56.0) ajv: specifier: ^8.6.0 version: 8.12.0 @@ -396,75 +396,79 @@ packages: engines: {node: '>=10.12.0'} dev: false - /@azure-tools/typespec-autorest@0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@azure-tools/typespec-client-generator-core@0.39.1)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0): - resolution: {integrity: sha512-jfCPzqroiVD0jHPPJX2IpdC7U0Q2yx5QYzucCp1GcOYKbRKNO3vcIEVHArn9rSKbJQR7IKDozEeubMMHINjsnQ==} + /@azure-tools/typespec-autorest@0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@azure-tools/typespec-client-generator-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0): + resolution: {integrity: sha512-3cB5SiIbRDvGXpadnxwqsNhQ4A9pteGTHIpVlKpENpvzIoWU9phe+uBmGJDiQ/9CQPiLk7JncER95XYVOvn/vA==} engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-azure-core': ~0.39.0 - '@azure-tools/typespec-client-generator-core': ~0.39.0 - '@typespec/compiler': ~0.53.0 - '@typespec/http': ~0.53.0 - '@typespec/openapi': ~0.53.0 - '@typespec/rest': ~0.53.0 - '@typespec/versioning': ~0.53.0 - dependencies: - '@azure-tools/typespec-azure-core': 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0) - '@azure-tools/typespec-client-generator-core': 0.39.1(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) - '@typespec/compiler': 0.53.0 - '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) - '@typespec/openapi': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) - '@typespec/rest': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) - '@typespec/versioning': 0.53.0(@typespec/compiler@0.53.0) - dev: false - - /@azure-tools/typespec-azure-core@0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0): - resolution: {integrity: sha512-M7CwPdTRUu6jGiEbZg4K/ikUjJxoBJ8ii393dDoxCBhwsYElRm7rCtdzuLJ584gSNZkGtR/1Jd2wl3xRoaCqXg==} + '@azure-tools/typespec-azure-core': ~0.42.0 + '@azure-tools/typespec-client-generator-core': ~0.42.0 + '@typespec/compiler': ~0.56.0 + '@typespec/http': ~0.56.0 + '@typespec/openapi': ~0.56.0 + '@typespec/rest': ~0.56.0 + '@typespec/versioning': ~0.56.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.42.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0) + '@azure-tools/typespec-client-generator-core': 0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) + '@typespec/compiler': 0.56.0 + '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) + '@typespec/openapi': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) + '@typespec/rest': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) + '@typespec/versioning': 0.56.0(@typespec/compiler@0.56.0) + dev: false + + /@azure-tools/typespec-azure-core@0.42.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0): + resolution: {integrity: sha512-8C96RkgSWtgqsaHRMWCd2iDltFJZTGmFQiTZazZj/uRy0Wn1ikjSriSN8t1puL5SiUPd0BVJP/YXiwAfjfZYDA==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.53.0 - '@typespec/http': ~0.53.0 - '@typespec/rest': ~0.53.0 + '@typespec/compiler': ~0.56.0 + '@typespec/http': ~0.56.0 + '@typespec/rest': ~0.56.0 dependencies: - '@typespec/compiler': 0.53.0 - '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) - '@typespec/rest': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) + '@typespec/compiler': 0.56.0 + '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) + '@typespec/rest': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) dev: false - /@azure-tools/typespec-azure-resource-manager@0.39.0(@azure-tools/typespec-autorest@0.39.0)(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0): - resolution: {integrity: sha512-vX7Xxg5lnSxFArVFR7MTLqGJkiYuwaaA6w2q4N735kAgfGe+VFpOF/EqkChGnz4/iqDSDMwT3cr39oV4tmJnPw==} + /@azure-tools/typespec-azure-resource-manager@0.42.0(@azure-tools/typespec-autorest@0.42.0)(@azure-tools/typespec-azure-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0): + resolution: {integrity: sha512-RCqcrhE1yniAih5vDFOC5K4MpDr9XmG8qBB39G49/KyEKnWOQ3Nwvt/6fXaU42D9X2L6kfEAIz/AdiSJ/H5O6w==} engines: {node: '>=18.0.0'} peerDependencies: - '@azure-tools/typespec-autorest': ~0.39.0 - '@azure-tools/typespec-azure-core': ~0.39.0 - '@typespec/compiler': ~0.53.0 - '@typespec/http': ~0.53.0 - '@typespec/openapi': ~0.53.0 - '@typespec/rest': ~0.53.0 - '@typespec/versioning': ~0.53.0 - dependencies: - '@azure-tools/typespec-autorest': 0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@azure-tools/typespec-client-generator-core@0.39.1)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) - '@azure-tools/typespec-azure-core': 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0) - '@typespec/compiler': 0.53.0 - '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) - '@typespec/openapi': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) - '@typespec/rest': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) - '@typespec/versioning': 0.53.0(@typespec/compiler@0.53.0) - dev: false - - /@azure-tools/typespec-client-generator-core@0.39.1(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0): - resolution: {integrity: sha512-EV3N6IN1i/hXGqYKNfXx6+2QAyZnG4IpC9RUk6fqwSQDWX7HtMcfdXqlOaK3Rz2H6BUAc9OnH+Trq/uJCl/RgA==} + '@azure-tools/typespec-autorest': ~0.42.0 + '@azure-tools/typespec-azure-core': ~0.42.0 + '@typespec/compiler': ~0.56.0 + '@typespec/http': ~0.56.0 + '@typespec/openapi': ~0.56.0 + '@typespec/rest': ~0.56.0 + '@typespec/versioning': ~0.56.0 + dependencies: + '@azure-tools/typespec-autorest': 0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@azure-tools/typespec-client-generator-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) + '@azure-tools/typespec-azure-core': 0.42.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0) + '@typespec/compiler': 0.56.0 + '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) + '@typespec/openapi': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) + '@typespec/rest': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) + '@typespec/versioning': 0.56.0(@typespec/compiler@0.56.0) + change-case: 5.4.4 + pluralize: 8.0.0 + dev: false + + /@azure-tools/typespec-client-generator-core@0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0): + resolution: {integrity: sha512-yjT71LdErZ4/BNwTrfvqCcaZqYhZm/E5/58LibbQ/5xJusaacBjTGe5iRpDi5Xf5ETQ6twFlZ6Y1ovWwgYDZag==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.53.1 - '@typespec/http': ~0.53.0 - '@typespec/rest': ~0.53.0 - '@typespec/versioning': ~0.53.0 - dependencies: - '@typespec/compiler': 0.53.0 - '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) - '@typespec/rest': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) - '@typespec/versioning': 0.53.0(@typespec/compiler@0.53.0) - change-case: 5.3.0 + '@azure-tools/typespec-azure-core': ~0.42.0 + '@typespec/compiler': ~0.56.0 + '@typespec/http': ~0.56.0 + '@typespec/rest': ~0.56.0 + '@typespec/versioning': ~0.56.0 + dependencies: + '@azure-tools/typespec-azure-core': 0.42.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0) + '@typespec/compiler': 0.56.0 + '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) + '@typespec/rest': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) + '@typespec/versioning': 0.56.0(@typespec/compiler@0.56.0) + change-case: 5.4.4 pluralize: 8.0.0 dev: false @@ -491,7 +495,7 @@ packages: resolution: {integrity: sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.22.20 + '@babel/highlight': 7.23.4 dev: false /@babel/code-frame@7.23.5: @@ -502,6 +506,14 @@ packages: chalk: 2.4.2 dev: false + /@babel/code-frame@7.24.2: + resolution: {integrity: sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.24.5 + picocolors: 1.0.0 + dev: false + /@babel/compat-data@7.23.3: resolution: {integrity: sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==} engines: {node: '>=6.9.0'} @@ -621,6 +633,11 @@ packages: engines: {node: '>=6.9.0'} dev: false + /@babel/helper-validator-identifier@7.24.5: + resolution: {integrity: sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==} + engines: {node: '>=6.9.0'} + dev: false + /@babel/helper-validator-option@7.22.15: resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} engines: {node: '>=6.9.0'} @@ -637,8 +654,8 @@ packages: - supports-color dev: false - /@babel/highlight@7.22.20: - resolution: {integrity: sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==} + /@babel/highlight@7.23.4: + resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-validator-identifier': 7.22.20 @@ -646,13 +663,14 @@ packages: js-tokens: 4.0.0 dev: false - /@babel/highlight@7.23.4: - resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} + /@babel/highlight@7.24.5: + resolution: {integrity: sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.5 chalk: 2.4.2 js-tokens: 4.0.0 + picocolors: 1.0.0 dev: false /@babel/parser@7.23.3: @@ -1304,8 +1322,8 @@ packages: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: false - /@sindresorhus/merge-streams@1.0.0: - resolution: {integrity: sha512-rUV5WyJrJLoloD4NDN1V1+LDMDWOa4OTsT4yYJwQNpTU6FWxkxHpL7eu4w+DmiH8x/EAM1otkPE1+LaspIbplw==} + /@sindresorhus/merge-streams@2.3.0: + resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} engines: {node: '>=18'} dev: false @@ -1786,86 +1804,86 @@ packages: eslint-visitor-keys: 3.4.3 dev: false - /@typespec/compiler@0.53.0: - resolution: {integrity: sha512-07zb6mXwMX7ps7q+ubwBNb8Vz4ewmqrymAwnWZcl40r2VMsyZIQZM9ZPao87imCA+fWiPOKblIzRB7OVq3XOPg==} + /@typespec/compiler@0.56.0: + resolution: {integrity: sha512-K+VhXycoeqcoSGtB0/l1XYco4V2qRsCOOwqklVM4Yew7kTcKVfz7CT7a6a2OKWDMNg5iijZtRBoM5YF50XtQug==} engines: {node: '>=18.0.0'} hasBin: true dependencies: - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.24.2 ajv: 8.12.0 - change-case: 5.3.0 - globby: 14.0.0 + change-case: 5.4.4 + globby: 14.0.1 mustache: 4.2.0 picocolors: 1.0.0 - prettier: 3.1.1 + prettier: 3.2.5 prompts: 2.4.2 - semver: 7.5.4 + semver: 7.6.1 vscode-languageserver: 9.0.1 vscode-languageserver-textdocument: 1.0.11 - yaml: 2.3.4 + yaml: 2.4.2 yargs: 17.7.2 dev: false - /@typespec/http@0.53.0(@typespec/compiler@0.53.0): - resolution: {integrity: sha512-Hdwbxr6KgzmJdULbbcwWaSSrWlduuMuEVUVdlytxyo9K+aoUCcPl0thR5Ez2VRh02/IJl3xG4n5wXgOwWb3amA==} + /@typespec/http@0.56.0(@typespec/compiler@0.56.0): + resolution: {integrity: sha512-f/tpHRWev9bnAtNPFkfCU/5SFou9glA/rPDY0m2W5bK6EG1/6/TKKKz5FoKPA4xvc2dQ5vu/ouGLb4i5UzXvWQ==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.53.0 + '@typespec/compiler': ~0.56.0 dependencies: - '@typespec/compiler': 0.53.0 + '@typespec/compiler': 0.56.0 dev: false - /@typespec/openapi3@0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/versioning@0.53.0): - resolution: {integrity: sha512-wcgwYJP/UPwuYlJbCSbhI3+G+RnZaaj5xwUEDD2QPkIhIiwhETyuXaN0ZFTSQWUTmypXt/e21KPUwHO03RpIdA==} + /@typespec/openapi3@0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/versioning@0.56.0): + resolution: {integrity: sha512-55JPUP7dFk4iXn4fNKZEs76j7hAdlWfoMWNPsQPRJCP//KWCtNXfTP+/TTVPVv1L/6HztbXyPV0agKZwyS7gDw==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.53.0 - '@typespec/http': ~0.53.0 - '@typespec/openapi': ~0.53.0 - '@typespec/versioning': ~0.53.0 + '@typespec/compiler': ~0.56.0 + '@typespec/http': ~0.56.0 + '@typespec/openapi': ~0.56.0 + '@typespec/versioning': ~0.56.0 dependencies: - '@typespec/compiler': 0.53.0 - '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) - '@typespec/openapi': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) - '@typespec/versioning': 0.53.0(@typespec/compiler@0.53.0) - yaml: 2.3.4 + '@typespec/compiler': 0.56.0 + '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) + '@typespec/openapi': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) + '@typespec/versioning': 0.56.0(@typespec/compiler@0.56.0) + yaml: 2.4.2 dev: false - /@typespec/openapi@0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0): - resolution: {integrity: sha512-FRHb6Wi4Yf1HGm3EnhhXZ0Bw+EIPam6ptxRy7NDRxyMnzHsOphGcv8mDIZk6MPSy8xPasbFNwaRC1TXpxVhQBw==} + /@typespec/openapi@0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0): + resolution: {integrity: sha512-q8+IHRglXBm3slvonRLSNYN2fX7plbWA+ugIiMJZTeyc3enqfxPqMGA8BCiAFV3kwP0uPPpIXbCSIVhHgkONbA==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.53.0 - '@typespec/http': ~0.53.0 + '@typespec/compiler': ~0.56.0 + '@typespec/http': ~0.56.0 dependencies: - '@typespec/compiler': 0.53.0 - '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) + '@typespec/compiler': 0.56.0 + '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) dev: false - /@typespec/prettier-plugin-typespec@0.53.0: - resolution: {integrity: sha512-ARLKZubDWKafpHavrtBrGtwkmisuBIsZGqpBrZPGQ5NTS8KAWSCAkouZ+HvDZ+S17kP/a3kADJnxgKhQMTmjEA==} + /@typespec/prettier-plugin-typespec@0.56.0: + resolution: {integrity: sha512-W5pnctaqSAfeynys6XZKpJ01MIcEEH6XoCMk8Z0rzXaRRoF0v5lB3w8L7s6kRMmi48P3zd942xvfxHr5H1R/0Q==} dependencies: - prettier: 3.1.1 + prettier: 3.2.5 dev: false - /@typespec/rest@0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0): - resolution: {integrity: sha512-aA75Ol2pRvUjtRqQvFHmFG52pkeif3m+tboLAT00AekTxOPZ3rqQmlE12ne4QF8KjgHA6denqH4f/XyDoRJOJQ==} + /@typespec/rest@0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0): + resolution: {integrity: sha512-8w4WhWDcpEQNW8bB1BHhiBxIQUChDJtyq/n9p2OI/Bm1wncd61y/ZNOtcxmlKq8uB9d+dzHiZdEfqFCR8HF8/Q==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.53.0 - '@typespec/http': ~0.53.0 + '@typespec/compiler': ~0.56.0 + '@typespec/http': ~0.56.0 dependencies: - '@typespec/compiler': 0.53.0 - '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) + '@typespec/compiler': 0.56.0 + '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) dev: false - /@typespec/versioning@0.53.0(@typespec/compiler@0.53.0): - resolution: {integrity: sha512-nrrLXCWPDrrClAfpCMzQ3YPTbKQmjPC3LSeMjq+wPiMq+1PW95ulOGD4QiCBop+4wKhMCJHnqqSzVauT1LjdvQ==} + /@typespec/versioning@0.56.0(@typespec/compiler@0.56.0): + resolution: {integrity: sha512-j7IN9XFyGn3LH6IOJkinEvk9sDncsxiWPULOAe0VQ+D/dtCfLawDMUALnvklMDRKeD1OOUPSCjjUAp9OB0f7YA==} engines: {node: '>=18.0.0'} peerDependencies: - '@typespec/compiler': ~0.53.0 + '@typespec/compiler': ~0.56.0 dependencies: - '@typespec/compiler': 0.53.0 + '@typespec/compiler': 0.56.0 dev: false /@ungap/structured-clone@1.2.0: @@ -2721,14 +2739,14 @@ packages: resolution: {integrity: sha512-tH6YZXViaeC2/Mnt8m4gSmbZfNorC2rhwCX2bXw8SYZWr8ljCPB7iA+1TLG9t7yroWBFauc63LlOZ1gucMVCWw==} dev: false - /change-case@5.3.0: - resolution: {integrity: sha512-Eykca0fGS/xYlx2fG5NqnGSnsWauhSGiSXYhB1kO6E909GUfo8S54u4UZNS7lMJmgZumZ2SUpWaoLgAcfQRICg==} - dev: false - /change-case@5.4.0: resolution: {integrity: sha512-11YRFf0f4pI+ROHUfq64WivyrcNSrZjdDt2qgVxvAObtj/Pwnu5uAKObHRbN9uAhaDFkvkqcKVEl8Dxnmx+N7w==} dev: false + /change-case@5.4.4: + resolution: {integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==} + dev: false + /char-regex@1.0.2: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} @@ -4295,11 +4313,11 @@ packages: slash: 4.0.0 dev: false - /globby@14.0.0: - resolution: {integrity: sha512-/1WM/LNHRAOH9lZta77uGbq0dAEQM+XjNesWwhlERDVenqothRbnzTrL3/LrIoEPPjeUHC3vrS6TwoyxeHs7MQ==} + /globby@14.0.1: + resolution: {integrity: sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==} engines: {node: '>=18'} dependencies: - '@sindresorhus/merge-streams': 1.0.0 + '@sindresorhus/merge-streams': 2.3.0 fast-glob: 3.3.2 ignore: 5.2.4 path-type: 5.0.0 @@ -6766,8 +6784,8 @@ packages: hasBin: true dev: false - /prettier@3.1.1: - resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==} + /prettier@3.2.5: + resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} engines: {node: '>=14'} hasBin: true dev: false @@ -7221,6 +7239,12 @@ packages: lru-cache: 6.0.0 dev: false + /semver@7.6.1: + resolution: {integrity: sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA==} + engines: {node: '>=10'} + hasBin: true + dev: false + /sentence-case@3.0.4: resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==} dependencies: @@ -8653,9 +8677,10 @@ packages: resolution: {integrity: sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==} dev: false - /yaml@2.3.4: - resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} + /yaml@2.4.2: + resolution: {integrity: sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==} engines: {node: '>= 14'} + hasBin: true dev: false /yargs-parser@20.2.9: @@ -9424,15 +9449,15 @@ packages: dev: false file:projects/openapi-to-typespec.tgz(jest@29.7.0): - resolution: {integrity: sha512-Kyx+8ZG2xUGZAHqW8HRY0eqqm1ChOuTY+KZwhJJfDmoCJf5BWyjyaCCYwpY65+KrWJ5mmWo7IDvbBOOKutA2ww==, tarball: file:projects/openapi-to-typespec.tgz} + resolution: {integrity: sha512-jMP5dk+q3YF4vSbDHWpxmaBYQMN0u5ya9VPFaV7+Xz9sHBK4lzICmeo+a+1W9xEqnjhom+BDma3ZMkzfCAwNRg==, tarball: file:projects/openapi-to-typespec.tgz} id: file:projects/openapi-to-typespec.tgz name: '@rush-temp/openapi-to-typespec' version: 0.0.0 dependencies: - '@azure-tools/typespec-autorest': 0.39.0(@azure-tools/typespec-azure-core@0.39.0)(@azure-tools/typespec-client-generator-core@0.39.1)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) - '@azure-tools/typespec-azure-core': 0.39.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0) - '@azure-tools/typespec-azure-resource-manager': 0.39.0(@azure-tools/typespec-autorest@0.39.0)(@azure-tools/typespec-azure-core@0.39.0)(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) - '@azure-tools/typespec-client-generator-core': 0.39.1(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/rest@0.53.0)(@typespec/versioning@0.53.0) + '@azure-tools/typespec-autorest': 0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@azure-tools/typespec-client-generator-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) + '@azure-tools/typespec-azure-core': 0.42.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0) + '@azure-tools/typespec-azure-resource-manager': 0.42.0(@azure-tools/typespec-autorest@0.42.0)(@azure-tools/typespec-azure-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) + '@azure-tools/typespec-client-generator-core': 0.42.0(@azure-tools/typespec-azure-core@0.42.0)(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/rest@0.56.0)(@typespec/versioning@0.56.0) '@types/fs-extra': 9.0.13 '@types/lodash': 4.14.201 '@types/node': 20.9.0 @@ -9441,13 +9466,13 @@ packages: '@types/webpack': 5.28.5(webpack-cli@5.1.4) '@typescript-eslint/eslint-plugin': 6.11.0(@typescript-eslint/parser@6.11.0)(eslint@8.53.0)(typescript@5.2.2) '@typescript-eslint/parser': 6.11.0(eslint@8.53.0)(typescript@5.2.2) - '@typespec/compiler': 0.53.0 - '@typespec/http': 0.53.0(@typespec/compiler@0.53.0) - '@typespec/openapi': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) - '@typespec/openapi3': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0)(@typespec/openapi@0.53.0)(@typespec/versioning@0.53.0) - '@typespec/prettier-plugin-typespec': 0.53.0 - '@typespec/rest': 0.53.0(@typespec/compiler@0.53.0)(@typespec/http@0.53.0) - '@typespec/versioning': 0.53.0(@typespec/compiler@0.53.0) + '@typespec/compiler': 0.56.0 + '@typespec/http': 0.56.0(@typespec/compiler@0.56.0) + '@typespec/openapi': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) + '@typespec/openapi3': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0)(@typespec/openapi@0.56.0)(@typespec/versioning@0.56.0) + '@typespec/prettier-plugin-typespec': 0.56.0 + '@typespec/rest': 0.56.0(@typespec/compiler@0.56.0)(@typespec/http@0.56.0) + '@typespec/versioning': 0.56.0(@typespec/compiler@0.56.0) chalk: 4.1.2 change-case: 5.0.2 change-case-all: 2.1.0 diff --git a/packages/extensions/openapi-to-typespec/package.json b/packages/extensions/openapi-to-typespec/package.json index f715dee8c2..2033d9550b 100644 --- a/packages/extensions/openapi-to-typespec/package.json +++ b/packages/extensions/openapi-to-typespec/package.json @@ -42,16 +42,16 @@ "@azure-tools/codegen": "~2.10.0", "@autorest/extension-base": "~3.6.0", "@autorest/codemodel": "~4.20.0", - "@typespec/compiler": "^0.53.0", - "@typespec/rest": "^0.53.0", - "@typespec/http": "^0.53.0", - "@typespec/versioning": "^0.53.0", - "@typespec/prettier-plugin-typespec": "^0.53.0", - "@azure-tools/typespec-azure-core": "^0.39.0", - "@azure-tools/typespec-autorest": "^0.39.0", - "@azure-tools/typespec-azure-resource-manager": "^0.39.0", - "@typespec/openapi": "^0.53.0", - "@typespec/openapi3": "^0.53.0", + "@typespec/compiler": "^0.56.0", + "@typespec/rest": "^0.56.0", + "@typespec/http": "^0.56.0", + "@typespec/versioning": "^0.56.0", + "@typespec/prettier-plugin-typespec": "^0.56.0", + "@azure-tools/typespec-azure-core": "^0.42.0", + "@azure-tools/typespec-autorest": "^0.42.0", + "@azure-tools/typespec-azure-resource-manager": "^0.42.0", + "@typespec/openapi": "^0.56.0", + "@typespec/openapi3": "^0.56.0", "prettier": "~3.1.0", "lodash": "~4.17.20", "pluralize": "^8.0.0", @@ -68,8 +68,8 @@ "fs-extra": "^10.1.0", "@types/fs-extra": "^9.0.13", "chalk": "^4.1.0", - "@azure-tools/typespec-autorest": "^0.39.0", - "@azure-tools/typespec-client-generator-core": "^0.39.0", + "@azure-tools/typespec-autorest": "^0.42.0", + "@azure-tools/typespec-client-generator-core": "^0.42.0", "webpack-cli": "~5.1.4", "webpack": "~5.89.0", "@typescript-eslint/eslint-plugin": "^6.11.0", diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts index 74b5ea176c..ace7e4bcf1 100644 --- a/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts @@ -49,7 +49,6 @@ export function getResourcesImports(_program: TypespecProgram, armResource: TspA namespaces: [ `using TypeSpec.Rest;`, `using Azure.ResourceManager;`, - `using Azure.ResourceManager.Foundations;`, `using TypeSpec.Http;`, `using TypeSpec.OpenAPI;`, ], diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts index 0c7bb54d81..207db96a36 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts @@ -5,9 +5,10 @@ import pluralize from "pluralize"; import { getArmCommonTypeVersion } from "../autorest-session"; import { getOptions } from "../options"; import { replaceGeneratedResourceObject } from "../transforms/transform-arm-resources"; -import { generateDecorators } from "../utils/decorators"; +import { generateAugmentedDecorators, generateDecorators } from "../utils/decorators"; import { generateDocs } from "../utils/docs"; import { getModelPropertiesDeclarations } from "../utils/model-generation"; +import { generateSuppressions } from "../utils/suppressions"; import { generateOperation } from "./generate-operations"; export function generateArmResource(resource: TspArmResource): string { @@ -21,6 +22,10 @@ export function generateArmResource(resource: TspArmResource): string { definitions.push("\n"); + for (const a of resource.augmentDecorators ?? []) { + definitions.push(generateAugmentedDecorators(a.target!, [a])); + } + for (const o of resource.resourceOperations) { for (const d of o.customizations ?? []) { definitions.push(`${d}`); @@ -61,8 +66,13 @@ function generateArmResourceModel(resource: TspArmResource): string { resource.propertiesPropertyVisibility.includes("read") && resource.propertiesPropertyVisibility.includes("create")) ) { - definitions.push(`model ${resource.name} is ${resource.resourceKind}<${resource.propertiesModelName}> {`); + definitions.push( + `model ${resource.name} is Azure.ResourceManager.${resource.resourceKind}<${resource.propertiesModelName}> {`, + ); + if (resource.keyExpression) { + definitions.push(`${resource.keyExpression}`); + } definitions = [...definitions, ...getModelPropertiesDeclarations(resource.properties)]; } else { definitions.push( @@ -81,9 +91,12 @@ function generateArmResourceModel(resource: TspArmResource): string { } } else { definitions.push(`@Azure.ResourceManager.Private.armResourceInternal(${resource.propertiesModelName})`); - definitions.push(`model ${resource.name} extends ${resource.resourceKind}Base {`); + definitions.push(`model ${resource.name} extends Foundations.${resource.resourceKind} {`); } + if (resource.keyExpression) { + definitions.push(`${resource.keyExpression}`); + } definitions = [...definitions, ...getModelPropertiesDeclarations(resource.properties)]; const propertyDoc = generateDocs({ doc: resource.propertiesPropertyDescription }); @@ -134,6 +147,9 @@ function generateArmResourceOperation(resource: TspArmResource): string { definitions.push(`@operationId("${operation.operationId}")`); definitions.push(`#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility"`); } + if (isFullCompatible && operation.suppressions) { + definitions.push(...generateSuppressions(operation.suppressions)); + } if (operation.kind === "ArmResourceExists") { definitions.push(`op ${operation.name}(${operation.parameters.join(",")}): ${operation.responses.join("|")}`); } else if (operation.templateParameters?.length) { diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-object.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-object.ts index 7bc6c5add3..ed315df97b 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-object.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-object.ts @@ -18,8 +18,6 @@ export function generateObject(typespecObject: TypespecObject) { if (typespecObject.extendedParents?.length) { const firstParent = typespecObject.extendedParents[0]; definitions.push(`model ${typespecObject.name} extends ${firstParent} {`); - } else if (typespecObject.spreadParents && typespecObject.spreadParents.length === 1) { - definitions.push(`model ${typespecObject.name} extends ${typespecObject.spreadParents[0]} {`); } else if (typespecObject.alias) { const { alias, params } = typespecObject.alias; @@ -29,10 +27,8 @@ export function generateObject(typespecObject: TypespecObject) { } if (typespecObject.spreadParents?.length) { - if (typespecObject.extendedParents?.length || typespecObject.spreadParents.length > 1) { - for (const parent of typespecObject.spreadParents) { - definitions.push(`...${parent};`); - } + for (const parent of typespecObject.spreadParents) { + definitions.push(`...${parent};`); } } diff --git a/packages/extensions/openapi-to-typespec/src/interfaces.ts b/packages/extensions/openapi-to-typespec/src/interfaces.ts index c4d5e91b34..c0ef36a57b 100644 --- a/packages/extensions/openapi-to-typespec/src/interfaces.ts +++ b/packages/extensions/openapi-to-typespec/src/interfaces.ts @@ -129,6 +129,10 @@ export interface WithFixMe { fixMe?: string[]; } +export interface WithSuppressDirectives { + suppressions?: WithSuppressDirective[]; +} + export interface WithSuppressDirective { suppressionCode?: string; suppressionMessage?: string; @@ -146,7 +150,7 @@ export interface TypespecParameter extends TypespecDataType { defaultValue?: any; } -export interface TypespecObjectProperty extends TypespecDataType { +export interface TypespecObjectProperty extends TypespecDataType, WithSuppressDirectives { kind: "property"; isOptional: boolean; type: string; @@ -160,6 +164,7 @@ export interface TypespecDecorator extends WithFixMe, WithSuppressDirective { arguments?: (string | number)[] | DecoratorArgument[]; module?: string; namespace?: string; + target?: string; } export interface TypespecAlias { @@ -175,6 +180,7 @@ export interface TypespecObject extends TypespecDataType { extendedParents?: string[]; spreadParents?: string[]; decorators?: TypespecDecorator[]; + augmentDecorators?: TypespecDecorator[]; clientDecorators?: TypespecDecorator[]; alias?: TypespecAlias; } @@ -201,7 +207,7 @@ export function isFirstLevelResource(value: string): value is FirstLevelResource return FIRST_LEVEL_RESOURCE.includes(value as FirstLevelResource); } -export interface TspArmResourceOperationBase extends WithDoc, WithFixMe { +export interface TspArmResourceOperationBase extends WithDoc, WithFixMe, WithSuppressDirectives { kind: string; name: string; templateParameters?: string[]; @@ -252,6 +258,7 @@ export interface TspArmResourceExistsOperation extends TspArmResourceOperationBa export interface TspArmResource extends TypespecObject { resourceKind: ArmResourceKind; + keyExpression: string | undefined; propertiesModelName: string; propertiesPropertyRequired: boolean; propertiesPropertyVisibility: string[]; diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts index 967ce1b94f..aa776db6ec 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts @@ -16,6 +16,7 @@ import { import { getOptions, updateOptions } from "../options"; import { createCSharpNameDecorator } from "../pretransforms/rename-pretransform"; import { getOperationClientDecorators } from "../utils/decorators"; +import { generateDocs, generateDocsContent } from "../utils/docs"; import { ArmResource, ArmResourceSchema, @@ -27,6 +28,11 @@ import { isResourceSchema, } from "../utils/resource-discovery"; import { isResponseSchema } from "../utils/schemas"; +import { + getSuppressionsForArmResourceDeleteAsync, + getSuppressionsForArmResourceDeleteSync, +} from "../utils/suppressions"; +import { getFullyQualifiedName } from "../utils/type-mapping"; import { getTypespecType, transformObjectProperty } from "./transform-object"; import { transformParameter, transformRequest } from "./transform-operations"; @@ -111,12 +117,22 @@ export function transformTspArmResource(schema: ArmResourceSchema): TspArmResour const otherOperations = operations[1]; const clientDecorators = buildResourceClientDecorators(schema, armResourceOperations, otherOperations); + const keyProperty = buildKeyProperty(schema); + const properties = [...getOtherProperties(schema, !getArmCommonTypeVersion())]; + let keyExpression, augmentDecorators; + if (keyProperty.name === "name" && keyProperty.type === "string") { + keyExpression = buildKeyExpression(schema, keyProperty); + augmentDecorators = buildKeyAugmentDecorators(schema, keyProperty); + } else { + properties.unshift(keyProperty); + } return { fixMe, resourceKind: getResourceKind(schema), kind: "object", - properties: [buildKeyProperty(schema), ...getOtherProperties(schema, !getArmCommonTypeVersion())], + properties, + keyExpression, name: schema.resourceMetadata.SwaggerModelName, parents: [], resourceParent: getParentResource(schema), @@ -127,6 +143,7 @@ export function transformTspArmResource(schema: ArmResourceSchema): TspArmResour doc: schema.language.default.description, decorators, clientDecorators, + augmentDecorators, resourceOperations: armResourceOperations, normalOperations: otherOperations, optionalStandardProperties: getArmCommonTypeVersion() ? getResourceOptionalStandardProperties(schema) : [], @@ -156,29 +173,29 @@ function getResourceOptionalStandardProperties(schema: ArmResourceSchema): strin if (msi) { let msiType; if (msi.schema.language.default.name === "ManagedServiceIdentity") { - msiType = "Azure.ResourceManager.ManagedServiceIdentity"; + msiType = "Azure.ResourceManager.ManagedServiceIdentityProperty"; } else if (msi.schema.language.default.name === "SystemAssignedServiceIdentity") { - msiType = "Azure.ResourceManager.ManagedSystemAssignedIdentity"; + msiType = "Azure.ResourceManager.ManagedSystemAssignedIdentityProperty"; } else { // TODO: handle non-standard property - msiType = "Azure.ResourceManager.ManagedServiceIdentity"; + msiType = "Azure.ResourceManager.ManagedServiceIdentityProperty"; } optionalStandardProperties.push(msiType); } if (schema.properties?.find((p) => p.serializedName === "sku")) { // TODO: handle non-standard property - optionalStandardProperties.push("Azure.ResourceManager.ResourceSku"); + optionalStandardProperties.push("Azure.ResourceManager.ResourceSkuProperty"); } if (schema.properties?.find((p) => p.serializedName === "eTag")) { // TODO: handle non-standard property - optionalStandardProperties.push("Azure.ResourceManager.EntityTag"); + optionalStandardProperties.push("Azure.ResourceManager.EntityTagProperty"); } if (schema.properties?.find((p) => p.serializedName === "plan")) { // TODO: handle non-standard property - optionalStandardProperties.push("Azure.ResourceManager.ResourcePlan"); + optionalStandardProperties.push("Azure.ResourceManager.ResourcePlanProperty"); } return optionalStandardProperties; @@ -360,7 +377,7 @@ function convertResourceUpdateOperation( examples: swaggerOperation.extensions?.["x-ms-examples"], customizations, // To resolve auto-generate update model with proper visibility - decorators: [{ name: "parameterVisibility", arguments: ["read"] }], + decorators: [{ name: "parameterVisibility", arguments: [] }], }, ]; } @@ -379,22 +396,30 @@ function convertResourceDeleteOperation( const okResponse = swaggerOperation?.responses?.filter((o) => o.protocol.http?.statusCodes.includes("200"))?.[0]; const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); const templateParameters = [resourceMetadata.SwaggerModelName]; + const kind = isLongRunning + ? okResponse + ? "ArmResourceDeleteAsync" + : "ArmResourceDeleteWithoutOkAsync" + : "ArmResourceDeleteSync"; + const suppressions = + kind === "ArmResourceDeleteAsync" + ? getSuppressionsForArmResourceDeleteAsync() + : kind === "ArmResourceDeleteSync" + ? getSuppressionsForArmResourceDeleteSync() + : undefined; if (baseParameters) { templateParameters.push(baseParameters); } return [ { doc: operation.Description, - kind: isLongRunning - ? okResponse - ? "ArmResourceDeleteAsync" - : "ArmResourceDeleteWithoutOkAsync" - : "ArmResourceDeleteSync", + kind: kind, name: getOperationName(operation.OperationID), clientDecorators: getOperationClientDecorators(swaggerOperation), operationId: operation.OperationID, templateParameters, examples: swaggerOperation.extensions?.["x-ms-examples"], + suppressions: suppressions, }, ]; } @@ -726,13 +751,13 @@ function buildOperationBaseParameters(operation: Operation, resource: ArmResourc } } - let parameterTemplate = `BaseParameters<${resource.SwaggerModelName}>`; + let parameterTemplate = `${getFullyQualifiedName("BaseParameters")}<${resource.SwaggerModelName}>`; if (resource.IsExtensionResource) { - parameterTemplate = "ExtensionBaseParameters"; + parameterTemplate = `${getFullyQualifiedName("ExtensionBaseParameters")}`; } else if (resource.IsTenantResource) { - parameterTemplate = "TenantBaseParameters"; + parameterTemplate = `${getFullyQualifiedName("TenantBaseParameters")}`; } else if (resource.IsSubscriptionResource) { - parameterTemplate = "SubscriptionBaseParameters"; + parameterTemplate = `${getFullyQualifiedName("SubscriptionBaseParameters")}`; } if (otherParameters.length) { @@ -810,6 +835,36 @@ function getSchemaResponseSchemaName(response: Response | undefined): string | u return (response as SchemaResponse).schema.language.default.name; } +function buildKeyExpression(schema: ArmResourceSchema, keyProperty: TypespecObjectProperty): string { + const namePattern = keyProperty.decorators?.find((d) => d.name === "pattern")?.arguments?.[0]; + const keyName = keyProperty.decorators?.find((d) => d.name === "key")?.arguments?.[0]; + const segmentName = keyProperty.decorators?.find((d) => d.name === "segment")?.arguments?.[0]; + return `...ResourceNameParameter< + Resource = ${schema.resourceMetadata.SwaggerModelName} + ${keyName ? `, KeyName = "${keyName}"` : ""} + ${segmentName ? `, SegmentName = "${segmentName}"` : ""}, + NamePattern = ${namePattern ? `"${namePattern}"` : `""`} + >`; +} + +function buildKeyAugmentDecorators( + schema: ArmResourceSchema, + keyProperty: TypespecObjectProperty, +): TypespecDecorator[] | undefined { + return keyProperty.decorators + ?.filter((d) => !["pattern", "key", "segment", "path"].includes(d.name)) + .filter((d) => !(d.name === "visibility" && d.arguments?.[0] === "read")) + .map((d) => { + d.target = `${schema.resourceMetadata.SwaggerModelName}.name`; + return d; + }) + .concat({ + name: "doc", + target: `${schema.resourceMetadata.SwaggerModelName}.name`, + arguments: [generateDocsContent(keyProperty)], + }); +} + function buildKeyProperty(schema: ArmResourceSchema): TypespecObjectProperty { let parameter; if (!schema.resourceMetadata.IsSingletonResource) { diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts index a02e59a3c7..e3a4163a2f 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts @@ -33,6 +33,7 @@ import { isSealedChoiceSchema, isStringSchema, } from "../utils/schemas"; +import { getSuppressionsForRecordProperty } from "../utils/suppressions"; import { getDefaultValue, transformValue } from "../utils/values"; const typespecTypes = new Map([ @@ -85,14 +86,15 @@ export function transformObject(schema: ObjectSchema, codeModel: CodeModel): Typ discriminatorProperty && properties.push(discriminatorProperty); } + const [extendedParents, spreadParents] = getExtendedAndSpreadParents(schema, codeModel); const updatedVisited: TypespecObject = { name, doc, kind: "object", properties, parents: getParents(schema), - extendedParents: getExtendedParents(schema), - spreadParents: getSpreadParents(schema, codeModel), + extendedParents, + spreadParents, decorators: getModelDecorators(schema), clientDecorators: getModelClientDecorators(schema), }; @@ -153,6 +155,7 @@ export function transformObjectProperty(propertySchema: Property, codeModel: Cod clientDecorators: getPropertyClientDecorators(propertySchema), fixMe: getFixme(propertySchema, codeModel), defaultValue: getDefaultValue(type, propertySchema.schema), + suppressions: isDictionarySchema(propertySchema.schema) ? getSuppressionsForRecordProperty() : undefined, }; } @@ -173,37 +176,48 @@ function getParents(schema: ObjectSchema): string[] { .map((p) => p.language.default.name); } -function getExtendedParents(schema: ObjectSchema): string[] { +function getExtendedAndSpreadParents( + schema: ObjectSchema, + codeModel: CodeModel, +): [extendedParents: string[], spreadParents: string[]] { + // If there is a discriminative parent: extendedParents = [this discriminative parent], spreadParents = [all the other parents] + // Else if only one parent which is not dictionary: extendedParents = [this parent], spreadParents = [] + // Else if only one parent which is dictionary: extendedParents = [], spreadParents = [Record] + // Else: extendedParents = [], spreadParents = [all the parents] const immediateParents = schema.parents?.immediate ?? []; - return immediateParents - .filter((p) => p.language.default.name !== schema.language.default.name) - .filter((p) => getOwnDiscriminator(p as ObjectSchema)) - .map((p) => p.language.default.name); -} -function getSpreadParents(schema: ObjectSchema, codeModel: CodeModel): string[] { - const immediateParents = schema.parents?.immediate ?? []; - const spreadingParents = immediateParents - .filter((p) => p.language.default.name !== schema.language.default.name) - .filter((p) => !isDictionarySchema(p)) - .filter((p) => !getOwnDiscriminator(p as ObjectSchema)) - .map((p) => p.language.default.name); + const discriminativeParent = immediateParents.find((p) => getOwnDiscriminator(p as ObjectSchema)); + if (discriminativeParent) { + return [ + [discriminativeParent.language.default.name], + immediateParents + .filter((p) => p !== discriminativeParent) + .map((p) => + isDictionarySchema(p) ? `Record<${getTypespecType(p.elementType, codeModel)}>` : p.language.default.name, + ), + ]; + } - const dictionaryParent = immediateParents.find((p) => isDictionarySchema(p)) as DictionarySchema | undefined; - if (dictionaryParent) { - spreadingParents.push(`Record<${getTypespecType(dictionaryParent.elementType, codeModel)}>`); + if (immediateParents.length === 1 && !isDictionarySchema(immediateParents[0])) { + return [[immediateParents[0].language.default.name], []]; } - return spreadingParents; + + return [ + [], + immediateParents.map((p) => + isDictionarySchema(p) ? `Record<${getTypespecType(p.elementType, codeModel)}>` : p.language.default.name, + ), + ]; } function getArmIdType(schema: Schema): string { const allowedResources = schema.extensions?.["x-ms-arm-id-details"]?.["allowedResources"]; if (allowedResources) { - return `ResourceIdentifier<[${schema.extensions?.["x-ms-arm-id-details"]?.["allowedResources"] + return `Azure.Core.armResourceIdentifier<[${schema.extensions?.["x-ms-arm-id-details"]?.["allowedResources"] .map((r: { [x: string]: string }) => '{type: "' + r["type"] + '";}') .join(",")}]>`; } else { - return "ResourceIdentifier"; + return "Azure.Core.armResourceIdentifier"; } } diff --git a/packages/extensions/openapi-to-typespec/src/utils/docs.ts b/packages/extensions/openapi-to-typespec/src/utils/docs.ts index 6cca120209..9847b0488a 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/docs.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/docs.ts @@ -24,6 +24,15 @@ export function generateDocs({ doc }: WithDocs): string { return `/**\n* ${wrapped.join("\n* ")}\n*/`; } +export function generateDocsContent({ doc }: WithDocs): string { + if (isEmptyDoc(doc)) { + return ``; + } + + const wrapped = lineWrap(doc); + return wrapped.length === 1 ? `${wrapped[0]}` : `""\n${wrapped.join("\n")}\n""`; +} + export function generateSummary({ summary }: WithSummary): string { if (isEmptyDoc(summary)) { return ""; diff --git a/packages/extensions/openapi-to-typespec/src/utils/imports.ts b/packages/extensions/openapi-to-typespec/src/utils/imports.ts index 151490165b..d4ec4d2d91 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/imports.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/imports.ts @@ -1,12 +1,12 @@ import { TypespecDecorator, TypespecProgram } from "../interfaces"; import { getOptions } from "../options"; -type Imports = { +export type Imports = { modules: string[]; namespaces: string[]; }; -export function getModelsImports(program: TypespecProgram) { +export function getModelsImports(program: TypespecProgram): Imports { const modules = new Set(); const namespaces = new Set(); for (const choice of program.models.enums) { diff --git a/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts b/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts index 1554182234..e408fc0ddd 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts @@ -1,8 +1,12 @@ import { TypespecObjectProperty } from "../interfaces"; +import { getOptions } from "../options"; import { generateDecorators } from "./decorators"; import { generateDocs } from "./docs"; +import { generateSuppressions } from "./suppressions"; +import { getFullyQualifiedName } from "./type-mapping"; export function getModelPropertiesDeclarations(properties: TypespecObjectProperty[]): string[] { + const { isFullCompatible } = getOptions(); const definitions: string[] = []; for (const property of properties) { const propertyDoc = generateDocs(property); @@ -14,7 +18,12 @@ export function getModelPropertiesDeclarations(properties: TypespecObjectPropert if (property.defaultValue) { defaultValue = ` = ${property.defaultValue}`; } - definitions.push(`"${property.name}"${getOptionalOperator(property)}: ${property.type}${defaultValue};`); + if (isFullCompatible && property.suppressions) { + definitions.push(...generateSuppressions(property.suppressions)); + } + definitions.push( + `"${property.name}"${getOptionalOperator(property)}: ${getFullyQualifiedName(property.type)}${defaultValue};`, + ); } return definitions; diff --git a/packages/extensions/openapi-to-typespec/src/utils/suppressions.ts b/packages/extensions/openapi-to-typespec/src/utils/suppressions.ts new file mode 100644 index 0000000000..7be897f2d9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/utils/suppressions.ts @@ -0,0 +1,41 @@ +import { WithSuppressDirective } from "../interfaces"; + +export function generateSuppressions(suppressions: WithSuppressDirective[]): string[] { + const definitions: string[] = []; + for (const suppression of suppressions) { + definitions.push(`#suppress "${suppression.suppressionCode}" "${suppression.suppressionMessage}"`); + } + return definitions; +} + +export function getSuppressionsForArmResourceDeleteAsync(): WithSuppressDirective[] { + return [ + { suppressionCode: "deprecated", suppressionMessage: "For backward compatibility" }, + { + suppressionCode: "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes", + suppressionMessage: "For backward compatibility", + }, + { + suppressionCode: "@azure-tools/typespec-azure-core/no-response-body", + suppressionMessage: "For backward compatibility", + }, + ]; +} + +export function getSuppressionsForArmResourceDeleteSync(): WithSuppressDirective[] { + return [ + { + suppressionCode: "@azure-tools/typespec-azure-core/no-response-body", + suppressionMessage: "For backward compatibility", + }, + ]; +} + +export function getSuppressionsForRecordProperty(): WithSuppressDirective[] { + return [ + { + suppressionCode: "@azure-tools/typespec-azure-resource-manager/arm-no-record", + suppressionMessage: "For backward compatibility", + }, + ]; +} diff --git a/packages/extensions/openapi-to-typespec/src/utils/type-mapping.ts b/packages/extensions/openapi-to-typespec/src/utils/type-mapping.ts new file mode 100644 index 0000000000..3c444a4521 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/src/utils/type-mapping.ts @@ -0,0 +1,12 @@ +export function getFullyQualifiedName(type: string, namespace: string | undefined = undefined): string { + switch (type) { + case "ManagedServiceIdentity": + case "TenantBaseParameters": + case "BaseParameters": + case "SubscriptionBaseParameters": + case "ExtensionBaseParameters": + return `${namespace ?? "Azure.ResourceManager.Foundations"}.${type}`; + default: + return type; + } +} diff --git a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp index 7f2f358e74..e4558701f6 100644 --- a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp @@ -202,7 +202,9 @@ model ErrorResponse { /** * The error object. */ -model Error extends Record { +model Error { + ...Record; + /** * One of a server-defined set of error codes. */ diff --git a/packages/extensions/openapi-to-typespec/test/anomalyDetector/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/anomalyDetector/swagger-output/swagger.json index 10903bcfe5..cd545d910c 100644 --- a/packages/extensions/openapi-to-typespec/test/anomalyDetector/swagger-output/swagger.json +++ b/packages/extensions/openapi-to-typespec/test/anomalyDetector/swagger-output/swagger.json @@ -609,17 +609,6 @@ "score" ] }, - "ApiVersion": { - "type": "string", - "description": "Anomaly Detector API version (for example, v1.0).", - "enum": [ - "v1.1-preview.1" - ], - "x-ms-enum": { - "name": "ApiVersion", - "modelAsString": true - } - }, "Azure.Core.Foundations.Error": { "type": "object", "description": "The error object.", @@ -1526,24 +1515,6 @@ "timestamps", "values" ] - }, - "Versions": { - "type": "string", - "description": "The available API versions.", - "enum": [ - "v1.1-preview.1" - ], - "x-ms-enum": { - "name": "Versions", - "modelAsString": true, - "values": [ - { - "name": "v1_1_preview_1", - "value": "v1.1-preview.1", - "description": "The v1.1-preview.1 API version." - } - ] - } } }, "parameters": { diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/swagger.json index a416a765d8..92726ea1dc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/swagger.json +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/swagger-output/swagger.json @@ -678,14 +678,14 @@ "202": { "description": "Resource update request accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -1500,14 +1500,14 @@ "202": { "description": "Resource deletion accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -3046,12 +3046,7 @@ "offerId", "termId" ], - "allOf": [ - { - "type": "object", - "additionalProperties": {} - } - ] + "additionalProperties": {} }, "UnitSystemsInfo": { "type": "object", diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp index a70cdc0a50..d483bc905c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp @@ -7,7 +7,6 @@ import "./DataManagerForAgriculture.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,17 +19,13 @@ namespace Azure.ResourceManager.AgFoodPlatform; @parentResource(DataManagerForAgriculture) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(DataConnectorProperties) -model DataConnector extends ProxyResourceBase { - /** - * Connector name. - */ - @maxLength(63) - @minLength(1) - @path - @key("dataConnectorName") - @segment("dataConnectors") - @visibility("read") - name: string; +model DataConnector extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = DataConnector, + KeyName = "dataConnectorName", + SegmentName = "dataConnectors", + NamePattern = "" + >; /** * DataConnector Properties. @@ -38,7 +33,7 @@ model DataConnector extends ProxyResourceBase { @extension("x-ms-client-flatten", true) properties: DataConnectorProperties; - ...Azure.ResourceManager.EntityTag; + ...Azure.ResourceManager.EntityTagProperty; } @armResourceOperations @@ -56,6 +51,7 @@ interface DataConnectors { /** * Delete a Data Connectors with given dataConnector name. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -66,7 +62,7 @@ interface DataConnectors { list is ArmResourceListByParent< DataConnector, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Maximum number of items needed (inclusive). @@ -86,6 +82,9 @@ interface DataConnectors { >; } +@@maxLength(DataConnector.name, 63); +@@minLength(DataConnector.name, 1); +@@doc(DataConnector.name, "Connector name."); @@encodedName(DataConnectors.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp index 11605b34a4..bfb8e74f39 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,18 +19,13 @@ namespace Azure.ResourceManager.AgFoodPlatform; @Azure.ResourceManager.Private.armResourceInternal( DataManagerForAgricultureProperties ) -model DataManagerForAgriculture extends TrackedResourceBase { - /** - * DataManagerForAgriculture resource name. - */ - @maxLength(63) - @minLength(1) - @pattern("^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$") - @path - @key("dataManagerForAgricultureResourceName") - @segment("farmBeats") - @visibility("read") - name: string; +model DataManagerForAgriculture extends Foundations.TrackedResource { + ...ResourceNameParameter< + Resource = DataManagerForAgriculture, + KeyName = "dataManagerForAgricultureResourceName", + SegmentName = "farmBeats", + NamePattern = "^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" + >; /** * Data Manager For Agriculture ARM Resource properties. @@ -39,7 +33,7 @@ model DataManagerForAgriculture extends TrackedResourceBase { @extension("x-ms-client-flatten", true) properties?: DataManagerForAgricultureProperties; - ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ManagedServiceIdentityProperty; } @armResourceOperations @@ -62,7 +56,7 @@ interface DataManagerForAgricultures { * Update a Data Manager For Agriculture resource. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("DataManagerForAgricultureResources_Update") update is ArmCustomPatchAsync< DataManagerForAgriculture, @@ -73,6 +67,7 @@ interface DataManagerForAgricultures { * Delete a Data Manager For Agriculture resource. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("DataManagerForAgricultureResources_Delete") delete is ArmResourceDeleteSync; @@ -84,7 +79,7 @@ interface DataManagerForAgricultures { listByResourceGroup is ArmResourceListByParent< DataManagerForAgriculture, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Maximum number of items needed (inclusive). @@ -111,6 +106,11 @@ interface DataManagerForAgricultures { listBySubscription is ArmListBySubscription; } +@@maxLength(DataManagerForAgriculture.name, 63); +@@minLength(DataManagerForAgriculture.name, 1); +@@doc(DataManagerForAgriculture.name, + "DataManagerForAgriculture resource name." +); @@encodedName(DataManagerForAgricultures.createOrUpdate::parameters.resource, "application/json", "request" diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp index 7fb2371d20..675c62e990 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -21,16 +20,13 @@ namespace Azure.ResourceManager.AgFoodPlatform; @Azure.ResourceManager.Private.armResourceInternal( DataManagerForAgricultureExtensionProperties ) -model DataManagerForAgricultureExtension extends ProxyResourceBase { - /** - * dataManagerForAgricultureExtensionId to be queried. - */ - @pattern("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$") - @path - @key("dataManagerForAgricultureExtensionId") - @segment("farmBeatsExtensionDefinitions") - @visibility("read") - name: string; +model DataManagerForAgricultureExtension extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = DataManagerForAgricultureExtension, + KeyName = "dataManagerForAgricultureExtensionId", + SegmentName = "farmBeatsExtensionDefinitions", + NamePattern = "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + >; /** * DataManagerForAgricultureExtension properties. @@ -54,7 +50,7 @@ interface DataManagerForAgricultureExtensions { list is ArmResourceListByParent< DataManagerForAgricultureExtension, { - ...TenantBaseParameters; + ...Azure.ResourceManager.Foundations.TenantBaseParameters; /** * DataManagerForAgricultureExtension ids. @@ -103,3 +99,7 @@ interface DataManagerForAgricultureExtensions { } >; } + +@@doc(DataManagerForAgricultureExtension.name, + "dataManagerForAgricultureExtensionId to be queried." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp index f4198451d1..28ff96d3f8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -21,16 +20,13 @@ namespace Azure.ResourceManager.AgFoodPlatform; @Azure.ResourceManager.Private.armResourceInternal( DataManagerForAgricultureSolutionProperties ) -model DataManagerForAgricultureSolution extends ProxyResourceBase { - /** - * dataManagerForAgricultureSolutionId to be queried. - */ - @pattern("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$") - @path - @key("dataManagerForAgricultureSolutionId") - @segment("farmBeatsSolutionDefinitions") - @visibility("read") - name: string; +model DataManagerForAgricultureSolution extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = DataManagerForAgricultureSolution, + KeyName = "dataManagerForAgricultureSolutionId", + SegmentName = "farmBeatsSolutionDefinitions", + NamePattern = "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + >; /** * DataManagerForAgricultureSolution properties. @@ -56,7 +52,7 @@ interface DataManagerForAgricultureSolutions { list is ArmResourceListByParent< DataManagerForAgricultureSolution, { - ...TenantBaseParameters; + ...Azure.ResourceManager.Foundations.TenantBaseParameters; /** * Ids of Data Manager For Agriculture Solutions which the customer requests to fetch. @@ -87,3 +83,7 @@ interface DataManagerForAgricultureSolutions { } >; } + +@@doc(DataManagerForAgricultureSolution.name, + "dataManagerForAgricultureSolutionId to be queried." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp index 25b785ac1d..5f4b073119 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp @@ -7,7 +7,6 @@ import "./DataManagerForAgriculture.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.AgFoodPlatform; @parentResource(DataManagerForAgriculture) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(ExtensionProperties) -model Extension extends ProxyResourceBase { - /** - * Id of extension resource. - */ - @path - @key("extensionId") - @segment("extensions") - @visibility("read") - name: string; +model Extension extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = Extension, + KeyName = "extensionId", + SegmentName = "extensions", + NamePattern = "" + >; /** * Extension resource properties. @@ -36,7 +33,7 @@ model Extension extends ProxyResourceBase { @extension("x-ms-client-flatten", true) properties?: ExtensionProperties; - ...Azure.ResourceManager.EntityTag; + ...Azure.ResourceManager.EntityTagProperty; } @armResourceOperations @@ -54,6 +51,7 @@ interface Extensions { /** * Uninstall extension. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -64,7 +62,7 @@ interface Extensions { listByDataManagerForAgriculture is ArmResourceListByParent< Extension, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Installed extension ids. @@ -102,6 +100,7 @@ interface Extensions { >; } +@@doc(Extension.name, "Id of extension resource."); @@encodedName(Extensions.createOrUpdate::parameters.resource, "application/json", "requestBody" diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp index 4362df2db9..9167476b72 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp @@ -7,7 +7,6 @@ import "./DataManagerForAgriculture.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,15 +21,13 @@ namespace Azure.ResourceManager.AgFoodPlatform; @Azure.ResourceManager.Private.armResourceInternal( PrivateEndpointConnectionProperties ) -model PrivateEndpointConnection extends ProxyResourceBase { - /** - * Private endpoint connection name. - */ - @path - @key("privateEndpointConnectionName") - @segment("privateEndpointConnections") - @visibility("read") - name: string; +model PrivateEndpointConnection extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = PrivateEndpointConnection, + KeyName = "privateEndpointConnectionName", + SegmentName = "privateEndpointConnections", + NamePattern = "" + >; /** * Resource properties. @@ -54,6 +51,9 @@ interface PrivateEndpointConnections { /** * Delete Private endpoint connection request. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -64,6 +64,7 @@ interface PrivateEndpointConnections { listByResource is ArmResourceListByParent; } +@@doc(PrivateEndpointConnection.name, "Private endpoint connection name."); @@encodedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, "application/json", "request" diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp index 0960a3f712..5976779073 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp @@ -7,7 +7,6 @@ import "./DataManagerForAgriculture.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,15 +21,13 @@ namespace Azure.ResourceManager.AgFoodPlatform; @Azure.ResourceManager.Private.armResourceInternal( PrivateLinkResourceProperties ) -model PrivateLinkResource extends ProxyResourceBase { - /** - * Sub resource name. - */ - @path - @key("subResourceName") - @segment("privateLinkResources") - @visibility("read") - name: string; +model PrivateLinkResource extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = PrivateLinkResource, + KeyName = "subResourceName", + SegmentName = "privateLinkResources", + NamePattern = "" + >; /** * Resource properties. @@ -53,3 +50,5 @@ interface PrivateLinkResources { @operationId("PrivateLinkResources_ListByResource") listByResource is ArmResourceListByParent; } + +@@doc(PrivateLinkResource.name, "Sub resource name."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp index 047461bc7f..b40a59cecf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp @@ -7,7 +7,6 @@ import "./DataManagerForAgriculture.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,16 +19,13 @@ namespace Azure.ResourceManager.AgFoodPlatform; @parentResource(DataManagerForAgriculture) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(SolutionProperties) -model Solution extends ProxyResourceBase { - /** - * SolutionId for Data Manager For Agriculture Resource. - */ - @pattern("^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$") - @path - @key("solutionId") - @segment("solutions") - @visibility("read") - name: string; +model Solution extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = Solution, + KeyName = "solutionId", + SegmentName = "solutions", + NamePattern = "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + >; /** * Solution resource properties. @@ -37,7 +33,7 @@ model Solution extends ProxyResourceBase { @extension("x-ms-client-flatten", true) properties?: SolutionProperties; - ...Azure.ResourceManager.EntityTag; + ...Azure.ResourceManager.EntityTagProperty; } @armResourceOperations @@ -55,6 +51,7 @@ interface Solutions { /** * Uninstall Solution. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -65,7 +62,7 @@ interface Solutions { list is ArmResourceListByParent< Solution, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Installed Solution ids. @@ -155,6 +152,7 @@ interface Solutions { >; } +@@doc(Solution.name, "SolutionId for Data Manager For Agriculture Resource."); @@encodedName(Solutions.createOrUpdate::parameters.resource, "application/json", "requestBody" diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp index 43b587ee75..cbe0fd4fd1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp @@ -117,7 +117,7 @@ model Resource { * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" */ @visibility("read") - id?: ResourceIdentifier; + id?: Azure.Core.armResourceIdentifier; /** * The name of the resource @@ -438,6 +438,7 @@ model DataManagerForAgricultureUpdateRequestModel { /** * Resource tags. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -503,6 +504,7 @@ model ExtensionInstallationRequest { /** * Additional Api Properties. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" additionalApiProperties?: Record; } @@ -556,6 +558,7 @@ model ExtensionProperties { /** * Additional Api Properties. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read") additionalApiProperties?: Record; } @@ -585,7 +588,9 @@ model PrivateLinkResourceProperties { /** * Solution resource properties. */ -model SolutionProperties extends Record { +model SolutionProperties { + ...Record; + /** * Partner Id of the Solution. */ @@ -662,6 +667,7 @@ model DataManagerForAgricultureSolutionProperties { /** * Gets api-version Swagger Document Dictionary to capture all api-versions of swagger exposed by partner to Data Manager For Agriculture. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read") openApiSpecsDictionary?: Record; diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp index 2c21ec30b0..ca7c505180 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -19,15 +18,13 @@ namespace Azure.ResourceManager.AlertsManagement; @subscriptionResource @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(AlertProperties) -model Alert extends ProxyResourceBase { - /** - * Unique ID of an alert instance. - */ - @path - @key("alertId") - @segment("alerts") - @visibility("read") - name: string; +model Alert extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = Alert, + KeyName = "alertId", + SegmentName = "alerts", + NamePattern = "" + >; /** * Alert property bag @@ -51,7 +48,7 @@ interface Alerts { getAll is ArmResourceListByParent< Alert, { - ...SubscriptionBaseParameters; + ...Azure.ResourceManager.Foundations.SubscriptionBaseParameters; /** * Filter by target resource( which is full ARM ID) Default value is select all. @@ -165,7 +162,7 @@ interface Alerts { string, Alert, { - ...SubscriptionBaseParameters; + ...Azure.ResourceManager.Foundations.SubscriptionBaseParameters; /** * New state of the alert. @@ -193,6 +190,7 @@ interface Alerts { ): ArmResponse | ErrorResponse; } +@@doc(Alert.name, "Unique ID of an alert instance."); @@encodedName(Alerts.changeState::parameters.body, "application/json", "comment" diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp index cc4a930fc3..db761f9731 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.AlertsManagement; @Azure.ResourceManager.Private.armResourceInternal( AlertProcessingRuleProperties ) -model AlertProcessingRule extends TrackedResourceBase { - /** - * The name of the alert processing rule that needs to be fetched. - */ - @path - @key("alertProcessingRuleName") - @segment("actionRules") - @visibility("read") - name: string; +model AlertProcessingRule extends Foundations.TrackedResource { + ...ResourceNameParameter< + Resource = AlertProcessingRule, + KeyName = "alertProcessingRuleName", + SegmentName = "actionRules", + NamePattern = "" + >; /** * Alert processing rule properties. @@ -52,12 +49,13 @@ interface AlertProcessingRules { /** * Enable, disable, or update tags for an alert processing rule. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync; /** * Delete an alert processing rule. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -73,6 +71,9 @@ interface AlertProcessingRules { listBySubscription is ArmListBySubscription; } +@@doc(AlertProcessingRule.name, + "The name of the alert processing rule that needs to be fetched." +); @@encodedName(AlertProcessingRules.createOrUpdate::parameters.resource, "application/json", "alertProcessingRule" diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp index 399a6fb84a..a8fc56ab34 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -19,15 +18,13 @@ namespace Azure.ResourceManager.AlertsManagement; @subscriptionResource @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(SmartGroupProperties) -model SmartGroup extends ProxyResourceBase { - /** - * Smart group unique id. - */ - @path - @key("smartGroupId") - @segment("smartGroups") - @visibility("read") - name: string; +model SmartGroup extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = SmartGroup, + KeyName = "smartGroupId", + SegmentName = "smartGroups", + NamePattern = "" + >; /** * Properties of smart group. @@ -51,7 +48,7 @@ interface SmartGroups { getAll is ArmResourceListByParent< SmartGroup, { - ...SubscriptionBaseParameters; + ...Azure.ResourceManager.Foundations.SubscriptionBaseParameters; /** * Filter by target resource( which is full ARM ID) Default value is select all. @@ -129,7 +126,7 @@ interface SmartGroups { void, SmartGroup, { - ...SubscriptionBaseParameters; + ...Azure.ResourceManager.Foundations.SubscriptionBaseParameters; /** * New state of the alert. @@ -156,3 +153,5 @@ interface SmartGroups { smartGroupId: string, ): ArmResponse | ErrorResponse; } + +@@doc(SmartGroup.name, "Smart group unique id. "); diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp index 7ea8f71dd1..6b061d75a3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp @@ -315,6 +315,7 @@ model ManagedResource extends Resource { /** * Resource tags */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -389,6 +390,7 @@ model PatchObject { /** * Tags to be updated. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp index 462854f91a..eae07c6604 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,17 +17,12 @@ namespace Azure.ResourceManager.Analysis; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model AnalysisServicesServer extends Resource { - /** - * The name of the Analysis Services server. It must be a minimum of 3 characters, and a maximum of 63. - */ - @maxLength(63) - @minLength(3) - @pattern("^[a-z][a-z0-9]*$") - @path - @key("serverName") - @segment("servers") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = AnalysisServicesServer, + KeyName = "serverName", + SegmentName = "servers", + NamePattern = "^[a-z][a-z0-9]*$" + >; /** * Properties of the provision operation request. @@ -57,7 +51,7 @@ interface AnalysisServicesServers { * Updates the current state of the specified Analysis Services server. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("Servers_Update") update is ArmCustomPatchAsync< AnalysisServicesServer, @@ -68,6 +62,9 @@ interface AnalysisServicesServers { * Deletes the specified Analysis Services server. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Servers_Delete") delete is ArmResourceDeleteAsync; @@ -163,6 +160,11 @@ interface AnalysisServicesServers { ): ArmResponse | ErrorResponse; } +@@maxLength(AnalysisServicesServer.name, 63); +@@minLength(AnalysisServicesServer.name, 3); +@@doc(AnalysisServicesServer.name, + "The name of the Analysis Services server. It must be a minimum of 3 characters, and a maximum of 63." +); @@encodedName(AnalysisServicesServers.create::parameters.resource, "application/json", "serverParameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp index f2ffa6e138..8a277222af 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp @@ -279,6 +279,7 @@ model Resource { /** * Key-value pairs of additional resource provisioning properties. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -294,6 +295,7 @@ model AnalysisServicesServerUpdateParameters { /** * Key-value pairs of additional provisioning properties. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; /** diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp index 251cc83a38..e7bea49a3e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,7 +21,7 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( AccessInformationContractProperties ) -model AccessInformationContract extends ProxyResourceBase { +model AccessInformationContract extends Foundations.ProxyResource { /** * The identifier of the Access configuration. */ @@ -69,7 +68,7 @@ interface AccessInformationContracts { create is ArmResourceCreateOrReplaceSync< AccessInformationContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -83,13 +82,13 @@ interface AccessInformationContracts { * Update tenant access information details. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("TenantAccess_Update") update is ArmCustomPatchSync< AccessInformationContract, AccessInformationUpdateParameters, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -107,7 +106,7 @@ interface AccessInformationContracts { listByService is ArmResourceListByParent< AccessInformationContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Not used diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp index dd0052e2ea..7cd7c75d22 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,18 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiManagementServiceResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(ApiContractProperties) -model ApiContract extends ProxyResourceBase { - /** - * API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - @key("apiId") - @segment("apis") - @visibility("read") - name: string; +model ApiContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = ApiContract, + KeyName = "apiId", + SegmentName = "apis", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * API entity contract properties. @@ -67,7 +61,7 @@ interface ApiContracts { createOrUpdate is ArmResourceCreateOrReplaceAsync< ApiContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -81,13 +75,13 @@ interface ApiContracts { * Updates the specified API of the API Management service instance. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("Api_Update") update is ArmCustomPatchSync< ApiContract, ApiUpdateContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -101,11 +95,12 @@ interface ApiContracts { * Deletes the specified API of the API Management service instance. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Api_Delete") delete is ArmResourceDeleteSync< ApiContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Delete all revisions of the Api. @@ -129,7 +124,7 @@ interface ApiContracts { listByService is ArmResourceListByParent< ApiContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | serviceUrl | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | path | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | isCurrent | filter | eq, ne | |
    @@ -325,6 +320,11 @@ interface ApiContracts { ): ArmResponse | ErrorResponse; } +@@maxLength(ApiContract.name, 256); +@@minLength(ApiContract.name, 1); +@@doc(ApiContract.name, + "API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number." +); @@encodedName(ApiContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp index 7aeea30950..b2d12342cf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,18 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( ApiManagementServiceProperties ) -model ApiManagementServiceResource extends TrackedResourceBase { - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - @key("serviceName") - @segment("service") - @visibility("read") - name: string; +model ApiManagementServiceResource extends Foundations.TrackedResource { + ...ResourceNameParameter< + Resource = ApiManagementServiceResource, + KeyName = "serviceName", + SegmentName = "service", + NamePattern = "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$" + >; /** * ETag of the resource. @@ -50,8 +44,8 @@ model ApiManagementServiceResource extends TrackedResourceBase { @extension("x-ms-client-flatten", true) properties: ApiManagementServiceProperties; - ...Azure.ResourceManager.ManagedServiceIdentity; - ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ManagedServiceIdentityProperty; + ...Azure.ResourceManager.ResourceSkuProperty; } @armResourceOperations @@ -74,7 +68,7 @@ interface ApiManagementServiceResources { * Updates an existing API Management service. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("ApiManagementService_Update") update is ArmCustomPatchAsync< ApiManagementServiceResource, @@ -85,6 +79,9 @@ interface ApiManagementServiceResources { * Deletes an existing API Management service. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("ApiManagementService_Delete") delete is ArmResourceDeleteAsync; @@ -167,7 +164,7 @@ interface ApiManagementServiceResources { DeployConfigurationParameters, OperationResultContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The identifier of the Git Configuration Operation. @@ -187,7 +184,7 @@ interface ApiManagementServiceResources { SaveConfigurationParameter, OperationResultContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The identifier of the Git Configuration Operation. @@ -207,7 +204,7 @@ interface ApiManagementServiceResources { DeployConfigurationParameters, OperationResultContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The identifier of the Git Configuration Operation. @@ -1154,6 +1151,11 @@ interface ApiManagementServiceResources { ): ArmResponse | ErrorResponse; } +@@maxLength(ApiManagementServiceResource.name, 50); +@@minLength(ApiManagementServiceResource.name, 1); +@@doc(ApiManagementServiceResource.name, + "The name of the API Management service." +); @@encodedName(ApiManagementServiceResources.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp index 9e28f034d4..7edfb75f10 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp @@ -7,7 +7,6 @@ import "./ApiContract.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,18 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiContract) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(ApiReleaseContractProperties) -model ApiReleaseContract extends ProxyResourceBase { - /** - * Release identifier within an API. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - @key("releaseId") - @segment("releases") - @visibility("read") - name: string; +model ApiReleaseContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = ApiReleaseContract, + KeyName = "releaseId", + SegmentName = "releases", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * ApiRelease entity contract properties. @@ -70,7 +64,7 @@ interface ApiReleaseContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< ApiReleaseContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -84,13 +78,13 @@ interface ApiReleaseContracts { * Updates the details of the release of the API specified by its identifier. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("ApiRelease_Update") update is ArmCustomPatchSync< ApiReleaseContract, ApiReleaseContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -104,11 +98,12 @@ interface ApiReleaseContracts { * Deletes the specified release in the API. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("ApiRelease_Delete") delete is ArmResourceDeleteSync< ApiReleaseContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -126,7 +121,7 @@ interface ApiReleaseContracts { listByService is ArmResourceListByParent< ApiReleaseContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | notes | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -150,6 +145,11 @@ interface ApiReleaseContracts { >; } +@@maxLength(ApiReleaseContract.name, 80); +@@minLength(ApiReleaseContract.name, 1); +@@doc(ApiReleaseContract.name, + "Release identifier within an API. Must be unique in the current API Management service instance." +); @@encodedName(ApiReleaseContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp index 304113e1e3..0630816237 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,18 +21,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( ApiVersionSetContractProperties ) -model ApiVersionSetContract extends ProxyResourceBase { - /** - * Api Version Set identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - @key("versionSetId") - @segment("apiVersionSets") - @visibility("read") - name: string; +model ApiVersionSetContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = ApiVersionSetContract, + KeyName = "versionSetId", + SegmentName = "apiVersionSets", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * API VersionSet contract properties. @@ -72,7 +66,7 @@ interface ApiVersionSetContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< ApiVersionSetContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -86,13 +80,13 @@ interface ApiVersionSetContracts { * Updates the details of the Api VersionSet specified by its identifier. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("ApiVersionSet_Update") update is ArmCustomPatchSync< ApiVersionSetContract, ApiVersionSetUpdateParameters, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -106,11 +100,12 @@ interface ApiVersionSetContracts { * Deletes specific Api Version Set. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("ApiVersionSet_Delete") delete is ArmResourceDeleteSync< ApiVersionSetContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -128,7 +123,7 @@ interface ApiVersionSetContracts { listByService is ArmResourceListByParent< ApiVersionSetContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    @@ -152,6 +147,11 @@ interface ApiVersionSetContracts { >; } +@@maxLength(ApiVersionSetContract.name, 80); +@@minLength(ApiVersionSetContract.name, 1); +@@doc(ApiVersionSetContract.name, + "Api Version Set identifier. Must be unique in the current API Management service instance." +); @@encodedName(ApiVersionSetContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp index 06ead68a81..ae84bfced6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,18 +21,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( AuthorizationServerContractProperties ) -model AuthorizationServerContract extends ProxyResourceBase { - /** - * Identifier of the authorization server. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - @key("authsid") - @segment("authorizationServers") - @visibility("read") - name: string; +model AuthorizationServerContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = AuthorizationServerContract, + KeyName = "authsid", + SegmentName = "authorizationServers", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * Properties of the External OAuth authorization server Contract. @@ -72,7 +66,7 @@ interface AuthorizationServerContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< AuthorizationServerContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -86,13 +80,13 @@ interface AuthorizationServerContracts { * Updates the details of the authorization server specified by its identifier. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("AuthorizationServer_Update") update is ArmCustomPatchSync< AuthorizationServerContract, AuthorizationServerUpdateContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -106,11 +100,12 @@ interface AuthorizationServerContracts { * Deletes specific authorization server instance. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("AuthorizationServer_Delete") delete is ArmResourceDeleteSync< AuthorizationServerContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -128,7 +123,7 @@ interface AuthorizationServerContracts { listByService is ArmResourceListByParent< AuthorizationServerContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -163,6 +158,11 @@ interface AuthorizationServerContracts { >; } +@@maxLength(AuthorizationServerContract.name, 80); +@@minLength(AuthorizationServerContract.name, 1); +@@doc(AuthorizationServerContract.name, + "Identifier of the authorization server." +); @@encodedName(AuthorizationServerContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp index 2278cc7eeb..dfbbe513e3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,17 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiManagementServiceResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(BackendContractProperties) -model BackendContract extends ProxyResourceBase { - /** - * Identifier of the Backend entity. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @path - @key("backendId") - @segment("backends") - @visibility("read") - name: string; +model BackendContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = BackendContract, + KeyName = "backendId", + SegmentName = "backends", + NamePattern = "" + >; /** * Backend entity contract properties. @@ -69,7 +64,7 @@ interface BackendContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< BackendContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -83,13 +78,13 @@ interface BackendContracts { * Updates an existing backend. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("Backend_Update") update is ArmCustomPatchSync< BackendContract, BackendUpdateParameters, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -103,11 +98,12 @@ interface BackendContracts { * Deletes the specified backend. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Backend_Delete") delete is ArmResourceDeleteSync< BackendContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -125,7 +121,7 @@ interface BackendContracts { listByService is ArmResourceListByParent< BackendContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -159,6 +155,11 @@ interface BackendContracts { >; } +@@maxLength(BackendContract.name, 80); +@@minLength(BackendContract.name, 1); +@@doc(BackendContract.name, + "Identifier of the Backend entity. Must be unique in the current API Management service instance." +); @@encodedName(BackendContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp index cd2c5b484a..d328e54945 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,18 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiManagementServiceResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(CacheContractProperties) -model CacheContract extends ProxyResourceBase { - /** - * Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier). - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - @key("cacheId") - @segment("caches") - @visibility("read") - name: string; +model CacheContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = CacheContract, + KeyName = "cacheId", + SegmentName = "caches", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * Cache properties details. @@ -67,7 +61,7 @@ interface CacheContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< CacheContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -81,13 +75,13 @@ interface CacheContracts { * Updates the details of the cache specified by its identifier. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("Cache_Update") update is ArmCustomPatchSync< CacheContract, CacheUpdateParameters, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -101,11 +95,12 @@ interface CacheContracts { * Deletes specific Cache. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Cache_Delete") delete is ArmResourceDeleteSync< CacheContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -123,7 +118,7 @@ interface CacheContracts { listByService is ArmResourceListByParent< CacheContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Number of records to return. @@ -141,6 +136,11 @@ interface CacheContracts { >; } +@@maxLength(CacheContract.name, 80); +@@minLength(CacheContract.name, 1); +@@doc(CacheContract.name, + "Identifier of the Cache entity. Cache identifier (should be either 'default' or valid Azure region identifier)." +); @@encodedName(CacheContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp index c9282fe490..8af7bf05bc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,18 +21,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( CertificateContractProperties ) -model CertificateContract extends ProxyResourceBase { - /** - * Identifier of the certificate entity. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - @key("certificateId") - @segment("certificates") - @visibility("read") - name: string; +model CertificateContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = CertificateContract, + KeyName = "certificateId", + SegmentName = "certificates", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * Certificate properties details. @@ -72,7 +66,7 @@ interface CertificateContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< CertificateContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -86,11 +80,12 @@ interface CertificateContracts { * Deletes specific certificate. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Certificate_Delete") delete is ArmResourceDeleteSync< CertificateContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -108,7 +103,7 @@ interface CertificateContracts { listByService is ArmResourceListByParent< CertificateContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | expirationDate | filter | ge, le, eq, ne, gt, lt | |
    @@ -149,6 +144,11 @@ interface CertificateContracts { >; } +@@maxLength(CertificateContract.name, 80); +@@minLength(CertificateContract.name, 1); +@@doc(CertificateContract.name, + "Identifier of the certificate entity. Must be unique in the current API Management service instance." +); @@encodedName(CertificateContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp index 643c8bf29b..5daf3b1f0e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,18 +21,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( DeletedServiceContractProperties ) -model DeletedServiceContract extends ProxyResourceBase { - /** - * The name of the API Management service. - */ - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - @key("serviceName") - @segment("deletedservices") - @visibility("read") - name: string; +model DeletedServiceContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = DeletedServiceContract, + KeyName = "serviceName", + SegmentName = "deletedservices", + NamePattern = "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$" + >; /** * Deleted API Management Service details. @@ -55,6 +49,9 @@ interface DeletedServiceContracts { * Purges Api Management Service (deletes it with no option to undelete). */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("DeletedServices_Purge") purge is ArmResourceDeleteAsync; @@ -65,3 +62,7 @@ interface DeletedServiceContracts { @operationId("DeletedServices_ListBySubscription") listBySubscription is ArmListBySubscription; } + +@@maxLength(DeletedServiceContract.name, 50); +@@minLength(DeletedServiceContract.name, 1); +@@doc(DeletedServiceContract.name, "The name of the API Management service."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp index 8027967888..9c34a15640 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp @@ -7,7 +7,6 @@ import "./ApiContract.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,18 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiContract) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(DiagnosticContractProperties) -model DiagnosticContract extends ProxyResourceBase { - /** - * Diagnostic identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - @key("diagnosticId") - @segment("diagnostics") - @visibility("read") - name: string; +model DiagnosticContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = DiagnosticContract, + KeyName = "diagnosticId", + SegmentName = "diagnostics", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * Diagnostic entity contract properties. @@ -70,7 +64,7 @@ interface DiagnosticContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< DiagnosticContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -84,13 +78,13 @@ interface DiagnosticContracts { * Updates the details of the Diagnostic for an API specified by its identifier. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("ApiDiagnostic_Update") update is ArmCustomPatchSync< DiagnosticContract, DiagnosticContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -104,11 +98,12 @@ interface DiagnosticContracts { * Deletes the specified Diagnostic from an API. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("ApiDiagnostic_Delete") delete is ArmResourceDeleteSync< DiagnosticContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -126,7 +121,7 @@ interface DiagnosticContracts { listByService is ArmResourceListByParent< DiagnosticContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -150,6 +145,11 @@ interface DiagnosticContracts { >; } +@@maxLength(DiagnosticContract.name, 80); +@@minLength(DiagnosticContract.name, 1); +@@doc(DiagnosticContract.name, + "Diagnostic identifier. Must be unique in the current API Management service instance." +); @@encodedName(DiagnosticContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp index 29dbd9b454..adc7aad2d4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,7 +21,7 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( EmailTemplateContractProperties ) -model EmailTemplateContract extends ProxyResourceBase { +model EmailTemplateContract extends Foundations.ProxyResource { /** * Email Template Name Identifier. */ @@ -69,7 +68,7 @@ interface EmailTemplateContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< EmailTemplateContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -83,13 +82,13 @@ interface EmailTemplateContracts { * Updates API Management email template */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("EmailTemplate_Update") update is ArmCustomPatchSync< EmailTemplateContract, EmailTemplateUpdateParameters, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -103,11 +102,12 @@ interface EmailTemplateContracts { * Reset the Email Template to default template provided by the API Management service instance. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("EmailTemplate_Delete") delete is ArmResourceDeleteSync< EmailTemplateContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -125,7 +125,7 @@ interface EmailTemplateContracts { listByService is ArmResourceListByParent< EmailTemplateContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp index 356e09e5c8..2cf8dadf5d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp @@ -7,7 +7,6 @@ import "./GatewayContract.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,18 +21,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( GatewayCertificateAuthorityContractProperties ) -model GatewayCertificateAuthorityContract extends ProxyResourceBase { - /** - * Identifier of the certificate entity. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - @key("certificateId") - @segment("certificateAuthorities") - @visibility("read") - name: string; +model GatewayCertificateAuthorityContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = GatewayCertificateAuthorityContract, + KeyName = "certificateId", + SegmentName = "certificateAuthorities", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * Gateway certificate authority details. @@ -72,7 +66,7 @@ interface GatewayCertificateAuthorityContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayCertificateAuthorityContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -86,11 +80,12 @@ interface GatewayCertificateAuthorityContracts { * Remove relationship between Certificate Authority and Gateway entity. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("GatewayCertificateAuthority_Delete") delete is ArmResourceDeleteSync< GatewayCertificateAuthorityContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -108,7 +103,7 @@ interface GatewayCertificateAuthorityContracts { listByService is ArmResourceListByParent< GatewayCertificateAuthorityContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | eq, ne | |
    @@ -132,6 +127,11 @@ interface GatewayCertificateAuthorityContracts { >; } +@@maxLength(GatewayCertificateAuthorityContract.name, 80); +@@minLength(GatewayCertificateAuthorityContract.name, 1); +@@doc(GatewayCertificateAuthorityContract.name, + "Identifier of the certificate entity. Must be unique in the current API Management service instance." +); @@encodedName(GatewayCertificateAuthorityContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp index 5f2499f8a6..f3f1f12742 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,17 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiManagementServiceResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(GatewayContractProperties) -model GatewayContract extends ProxyResourceBase { - /** - * Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed' - */ - @maxLength(80) - @minLength(1) - @path - @key("gatewayId") - @segment("gateways") - @visibility("read") - name: string; +model GatewayContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = GatewayContract, + KeyName = "gatewayId", + SegmentName = "gateways", + NamePattern = "" + >; /** * Gateway details. @@ -69,7 +64,7 @@ interface GatewayContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -83,13 +78,13 @@ interface GatewayContracts { * Updates the details of the gateway specified by its identifier. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("Gateway_Update") update is ArmCustomPatchSync< GatewayContract, GatewayContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -103,11 +98,12 @@ interface GatewayContracts { * Deletes specific Gateway. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Gateway_Delete") delete is ArmResourceDeleteSync< GatewayContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -125,7 +121,7 @@ interface GatewayContracts { listByService is ArmResourceListByParent< GatewayContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | region | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -228,6 +224,11 @@ interface GatewayContracts { ): ArmResponse | ErrorResponse; } +@@maxLength(GatewayContract.name, 80); +@@minLength(GatewayContract.name, 1); +@@doc(GatewayContract.name, + "Gateway entity identifier. Must be unique in the current API Management service instance. Must not have value 'managed'" +); @@encodedName(GatewayContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp index daa553bf4e..cacc8afc21 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp @@ -7,7 +7,6 @@ import "./GatewayContract.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,17 +21,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( GatewayHostnameConfigurationContractProperties ) -model GatewayHostnameConfigurationContract extends ProxyResourceBase { - /** - * Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity. - */ - @maxLength(80) - @minLength(1) - @path - @key("hcId") - @segment("hostnameConfigurations") - @visibility("read") - name: string; +model GatewayHostnameConfigurationContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = GatewayHostnameConfigurationContract, + KeyName = "hcId", + SegmentName = "hostnameConfigurations", + NamePattern = "" + >; /** * Gateway hostname configuration details. @@ -71,7 +66,7 @@ interface GatewayHostnameConfigurationContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayHostnameConfigurationContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -85,11 +80,12 @@ interface GatewayHostnameConfigurationContracts { * Deletes the specified hostname configuration from the specified Gateway. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("GatewayHostnameConfiguration_Delete") delete is ArmResourceDeleteSync< GatewayHostnameConfigurationContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -107,7 +103,7 @@ interface GatewayHostnameConfigurationContracts { listByService is ArmResourceListByParent< GatewayHostnameConfigurationContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | hostname | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -131,6 +127,11 @@ interface GatewayHostnameConfigurationContracts { >; } +@@maxLength(GatewayHostnameConfigurationContract.name, 80); +@@minLength(GatewayHostnameConfigurationContract.name, 1); +@@doc(GatewayHostnameConfigurationContract.name, + "Gateway hostname configuration identifier. Must be unique in the scope of parent Gateway entity." +); @@encodedName(GatewayHostnameConfigurationContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp index d137fc79e6..536bdf6222 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,17 +21,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( GlobalSchemaContractProperties ) -model GlobalSchemaContract extends ProxyResourceBase { - /** - * Schema id identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @path - @key("schemaId") - @segment("schemas") - @visibility("read") - name: string; +model GlobalSchemaContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = GlobalSchemaContract, + KeyName = "schemaId", + SegmentName = "schemas", + NamePattern = "" + >; /** * Properties of the Global Schema. @@ -71,7 +66,7 @@ interface GlobalSchemaContracts { createOrUpdate is ArmResourceCreateOrReplaceAsync< GlobalSchemaContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -85,11 +80,12 @@ interface GlobalSchemaContracts { * Deletes specific Schema. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("GlobalSchema_Delete") delete is ArmResourceDeleteSync< GlobalSchemaContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -107,7 +103,7 @@ interface GlobalSchemaContracts { listByService is ArmResourceListByParent< GlobalSchemaContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -131,6 +127,11 @@ interface GlobalSchemaContracts { >; } +@@maxLength(GlobalSchemaContract.name, 80); +@@minLength(GlobalSchemaContract.name, 1); +@@doc(GlobalSchemaContract.name, + "Schema id identifier. Must be unique in the current API Management service instance." +); @@encodedName(GlobalSchemaContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp index 2176bd019b..f415505e82 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,17 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiManagementServiceResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(GroupContractProperties) -model GroupContract extends ProxyResourceBase { - /** - * Group identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - @key("groupId") - @segment("groups") - @visibility("read") - name: string; +model GroupContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = GroupContract, + KeyName = "groupId", + SegmentName = "groups", + NamePattern = "" + >; /** * Group entity contract properties. @@ -66,7 +61,7 @@ interface GroupContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< GroupContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -80,13 +75,13 @@ interface GroupContracts { * Updates the details of the group specified by its identifier. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("Group_Update") update is ArmCustomPatchSync< GroupContract, GroupUpdateParameters, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -100,11 +95,12 @@ interface GroupContracts { * Deletes specific group of the API Management service instance. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Group_Delete") delete is ArmResourceDeleteSync< GroupContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -122,7 +118,7 @@ interface GroupContracts { listByService is ArmResourceListByParent< GroupContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | externalId | filter | eq | |
    @@ -197,6 +193,11 @@ interface GroupContracts { ): ArmResponse | ErrorResponse; } +@@maxLength(GroupContract.name, 256); +@@minLength(GroupContract.name, 1); +@@doc(GroupContract.name, + "Group identifier. Must be unique in the current API Management service instance." +); @@encodedName(GroupContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp index 66002fcd65..f352e8458e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,7 +21,7 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( IdentityProviderContractProperties ) -model IdentityProviderContract extends ProxyResourceBase { +model IdentityProviderContract extends Foundations.ProxyResource { /** * Identity Provider Type identifier. */ @@ -69,7 +68,7 @@ interface IdentityProviderContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< IdentityProviderContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -83,13 +82,13 @@ interface IdentityProviderContracts { * Updates an existing IdentityProvider configuration. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("IdentityProvider_Update") update is ArmCustomPatchSync< IdentityProviderContract, IdentityProviderUpdateParameters, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -103,11 +102,12 @@ interface IdentityProviderContracts { * Deletes the specified identity provider configuration. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("IdentityProvider_Delete") delete is ArmResourceDeleteSync< IdentityProviderContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp index 3f65616092..1c12ee07e6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp @@ -7,7 +7,6 @@ import "./IssueContract.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,18 +21,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( IssueAttachmentContractProperties ) -model IssueAttachmentContract extends ProxyResourceBase { - /** - * Attachment identifier within an Issue. Must be unique in the current Issue. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - @key("attachmentId") - @segment("attachments") - @visibility("read") - name: string; +model IssueAttachmentContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = IssueAttachmentContract, + KeyName = "attachmentId", + SegmentName = "attachments", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * Properties of the Issue Attachment. @@ -72,7 +66,7 @@ interface IssueAttachmentContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< IssueAttachmentContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -86,11 +80,12 @@ interface IssueAttachmentContracts { * Deletes the specified comment from an Issue. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("ApiIssueAttachment_Delete") delete is ArmResourceDeleteSync< IssueAttachmentContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -108,7 +103,7 @@ interface IssueAttachmentContracts { listByService is ArmResourceListByParent< IssueAttachmentContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -132,6 +127,11 @@ interface IssueAttachmentContracts { >; } +@@maxLength(IssueAttachmentContract.name, 256); +@@minLength(IssueAttachmentContract.name, 1); +@@doc(IssueAttachmentContract.name, + "Attachment identifier within an Issue. Must be unique in the current Issue." +); @@encodedName(IssueAttachmentContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp index b25aa4a469..015f0377e2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp @@ -7,7 +7,6 @@ import "./IssueContract.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,18 +21,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( IssueCommentContractProperties ) -model IssueCommentContract extends ProxyResourceBase { - /** - * Comment identifier within an Issue. Must be unique in the current Issue. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - @key("commentId") - @segment("comments") - @visibility("read") - name: string; +model IssueCommentContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = IssueCommentContract, + KeyName = "commentId", + SegmentName = "comments", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * Properties of the Issue Comment. @@ -72,7 +66,7 @@ interface IssueCommentContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< IssueCommentContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -86,11 +80,12 @@ interface IssueCommentContracts { * Deletes the specified comment from an Issue. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("ApiIssueComment_Delete") delete is ArmResourceDeleteSync< IssueCommentContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -108,7 +103,7 @@ interface IssueCommentContracts { listByService is ArmResourceListByParent< IssueCommentContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -132,6 +127,11 @@ interface IssueCommentContracts { >; } +@@maxLength(IssueCommentContract.name, 256); +@@minLength(IssueCommentContract.name, 1); +@@doc(IssueCommentContract.name, + "Comment identifier within an Issue. Must be unique in the current Issue." +); @@encodedName(IssueCommentContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp index 9c7d6dc99d..d4d8ece51c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp @@ -7,7 +7,6 @@ import "./ApiContract.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,18 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiContract) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(IssueContractProperties) -model IssueContract extends ProxyResourceBase { - /** - * Issue identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - @key("issueId") - @segment("issues") - @visibility("read") - name: string; +model IssueContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = IssueContract, + KeyName = "issueId", + SegmentName = "issues", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * Properties of the Issue. @@ -50,7 +44,7 @@ interface IssueContracts { get is ArmResourceRead< IssueContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Expand the comment attachments. @@ -78,7 +72,7 @@ interface IssueContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< IssueContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -92,13 +86,13 @@ interface IssueContracts { * Updates an existing issue for an API. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("ApiIssue_Update") update is ArmCustomPatchSync< IssueContract, IssueUpdateContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -112,11 +106,12 @@ interface IssueContracts { * Deletes the specified Issue from an API. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("ApiIssue_Delete") delete is ArmResourceDeleteSync< IssueContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -134,7 +129,7 @@ interface IssueContracts { listByService is ArmResourceListByParent< IssueContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    @@ -164,6 +159,11 @@ interface IssueContracts { >; } +@@maxLength(IssueContract.name, 256); +@@minLength(IssueContract.name, 1); +@@doc(IssueContract.name, + "Issue identifier. Must be unique in the current API Management service instance." +); @@encodedName(IssueContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp index 0f541ca7af..ecd6a43b4b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,17 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiManagementServiceResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(LoggerContractProperties) -model LoggerContract extends ProxyResourceBase { - /** - * Logger identifier. Must be unique in the API Management service instance. - */ - @maxLength(256) - @pattern("^[^*#&+:<>?]+$") - @path - @key("loggerId") - @segment("loggers") - @visibility("read") - name: string; +model LoggerContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = LoggerContract, + KeyName = "loggerId", + SegmentName = "loggers", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * Logger entity contract properties. @@ -69,7 +64,7 @@ interface LoggerContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< LoggerContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -83,13 +78,13 @@ interface LoggerContracts { * Updates an existing logger. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("Logger_Update") update is ArmCustomPatchSync< LoggerContract, LoggerUpdateContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -103,11 +98,12 @@ interface LoggerContracts { * Deletes the specified logger. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Logger_Delete") delete is ArmResourceDeleteSync< LoggerContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -125,7 +121,7 @@ interface LoggerContracts { listByService is ArmResourceListByParent< LoggerContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | loggerType | filter | eq | |
    | resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -149,6 +145,10 @@ interface LoggerContracts { >; } +@@maxLength(LoggerContract.name, 256); +@@doc(LoggerContract.name, + "Logger identifier. Must be unique in the API Management service instance." +); @@encodedName(LoggerContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp index 332cd1c720..2c5b81e543 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,17 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiManagementServiceResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(NamedValueContractProperties) -model NamedValueContract extends ProxyResourceBase { - /** - * Identifier of the NamedValue. - */ - @maxLength(256) - @pattern("^[^*#&+:<>?]+$") - @path - @key("namedValueId") - @segment("namedValues") - @visibility("read") - name: string; +model NamedValueContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = NamedValueContract, + KeyName = "namedValueId", + SegmentName = "namedValues", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * NamedValue entity contract properties. @@ -69,7 +64,7 @@ interface NamedValueContracts { createOrUpdate is ArmResourceCreateOrReplaceAsync< NamedValueContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -83,13 +78,13 @@ interface NamedValueContracts { * Updates the specific named value. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("NamedValue_Update") update is ArmCustomPatchAsync< NamedValueContract, NamedValueUpdateParameters, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -103,11 +98,12 @@ interface NamedValueContracts { * Deletes specific named value from the API Management service instance. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("NamedValue_Delete") delete is ArmResourceDeleteSync< NamedValueContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -125,7 +121,7 @@ interface NamedValueContracts { listByService is ArmResourceListByParent< NamedValueContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | tags | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith, any, all |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -177,6 +173,8 @@ interface NamedValueContracts { >; } +@@maxLength(NamedValueContract.name, 256); +@@doc(NamedValueContract.name, "Identifier of the NamedValue."); @@encodedName(NamedValueContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp index 6c242c617c..00da425cc0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,7 +21,7 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( NotificationContractProperties ) -model NotificationContract extends ProxyResourceBase { +model NotificationContract extends Foundations.ProxyResource { /** * Notification Name Identifier. */ @@ -56,7 +55,7 @@ interface NotificationContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< NotificationContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -74,7 +73,7 @@ interface NotificationContracts { listByService is ArmResourceListByParent< NotificationContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Number of records to return. diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp index 4040116438..9893be0ea2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,17 +21,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( OpenidConnectProviderContractProperties ) -model OpenidConnectProviderContract extends ProxyResourceBase { - /** - * Identifier of the OpenID Connect Provider. - */ - @maxLength(256) - @pattern("^[^*#&+:<>?]+$") - @path - @key("opid") - @segment("openidConnectProviders") - @visibility("read") - name: string; +model OpenidConnectProviderContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = OpenidConnectProviderContract, + KeyName = "opid", + SegmentName = "openidConnectProviders", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * OpenId Connect Provider contract properties. @@ -51,7 +46,7 @@ interface OpenidConnectProviderContracts { get is ArmResourceRead< OpenidConnectProviderContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Identifier of the OpenID Connect Provider. @@ -71,7 +66,7 @@ interface OpenidConnectProviderContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< OpenidConnectProviderContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Identifier of the OpenID Connect Provider. @@ -93,13 +88,13 @@ interface OpenidConnectProviderContracts { * Updates the specific OpenID Connect Provider. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("OpenIdConnectProvider_Update") update is ArmCustomPatchSync< OpenidConnectProviderContract, OpenidConnectProviderUpdateContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Identifier of the OpenID Connect Provider. @@ -121,11 +116,12 @@ interface OpenidConnectProviderContracts { * Deletes specific OpenID Connect Provider of the API Management service instance. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("OpenIdConnectProvider_Delete") delete is ArmResourceDeleteSync< OpenidConnectProviderContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Identifier of the OpenID Connect Provider. @@ -151,7 +147,7 @@ interface OpenidConnectProviderContracts { listByService is ArmResourceListByParent< OpenidConnectProviderContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -184,7 +180,7 @@ interface OpenidConnectProviderContracts { void, ClientSecretContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Identifier of the OpenID Connect Provider. @@ -197,6 +193,10 @@ interface OpenidConnectProviderContracts { >; } +@@maxLength(OpenidConnectProviderContract.name, 256); +@@doc(OpenidConnectProviderContract.name, + "Identifier of the OpenID Connect Provider." +); @@encodedName(OpenidConnectProviderContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp index b02b046b40..6f89a32fd3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp @@ -7,7 +7,6 @@ import "./ApiContract.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,17 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiContract) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(OperationContractProperties) -model OperationContract extends ProxyResourceBase { - /** - * Operation identifier within an API. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @path - @key("operationId") - @segment("operations") - @visibility("read") - name: string; +model OperationContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = OperationContract, + KeyName = "operationId", + SegmentName = "operations", + NamePattern = "" + >; /** * Properties of the Operation Contract. @@ -69,7 +64,7 @@ interface OperationContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< OperationContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -83,13 +78,13 @@ interface OperationContracts { * Updates the details of the operation in the API specified by its identifier. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("ApiOperation_Update") update is ArmCustomPatchSync< OperationContract, OperationUpdateContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -103,11 +98,12 @@ interface OperationContracts { * Deletes the specified operation in the API. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("ApiOperation_Delete") delete is ArmResourceDeleteSync< OperationContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -125,7 +121,7 @@ interface OperationContracts { listByApi is ArmResourceListByParent< OperationContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | method | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | urlTemplate | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -155,6 +151,11 @@ interface OperationContracts { >; } +@@maxLength(OperationContract.name, 80); +@@minLength(OperationContract.name, 1); +@@doc(OperationContract.name, + "Operation identifier within an API. Must be unique in the current API Management service instance." +); @@encodedName(OperationContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp index 67bcb01ed9..d8fb72f3e7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp @@ -7,7 +7,6 @@ import "./OperationContract.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,7 +19,7 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(OperationContract) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(PolicyContractProperties) -model PolicyContract extends ProxyResourceBase { +model PolicyContract extends Foundations.ProxyResource { /** * The identifier of the Policy. */ @@ -47,7 +46,7 @@ interface PolicyContracts { get is ArmResourceRead< PolicyContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Policy Export Format. @@ -78,7 +77,7 @@ interface PolicyContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< PolicyContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -92,11 +91,12 @@ interface PolicyContracts { * Deletes the policy configuration at the Api Operation. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("ApiOperationPolicy_Delete") delete is ArmResourceDeleteSync< PolicyContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp index 64a99eaa1c..799879dc2f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -23,11 +22,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( PortalDelegationSettingsProperties ) -model PortalDelegationSettings extends ProxyResourceBase { - @key("portalsetting") - @segment("portalsettings") - @visibility("read") - name: string; +model PortalDelegationSettings extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = PortalDelegationSettings, + KeyName = "portalsetting", + SegmentName = "portalsettings", + NamePattern = "" + >; /** * Delegation settings contract properties. @@ -66,7 +67,7 @@ interface PortalDelegationSettingsOperationGroup { createOrUpdate is ArmResourceCreateOrReplaceSync< PortalDelegationSettings, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -80,13 +81,13 @@ interface PortalDelegationSettingsOperationGroup { * Update Delegation settings. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("DelegationSettings_Update") update is ArmCustomPatchSync< PortalDelegationSettings, PortalDelegationSettings, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -115,6 +116,7 @@ interface PortalDelegationSettingsOperationGroup { >; } +@@doc(PortalDelegationSettings.name, ""); @@encodedName(PortalDelegationSettingsOperationGroup.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp index 3744027da1..e218312687 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,17 +21,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( PortalRevisionContractProperties ) -model PortalRevisionContract extends ProxyResourceBase { - /** - * Portal revision identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - @key("portalRevisionId") - @segment("portalRevisions") - @visibility("read") - name: string; +model PortalRevisionContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = PortalRevisionContract, + KeyName = "portalRevisionId", + SegmentName = "portalRevisions", + NamePattern = "" + >; /** * Properties of the portal revisions. @@ -74,13 +69,13 @@ interface PortalRevisionContracts { * Updates the description of specified portal revision or makes it current. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("PortalRevision_Update") update is ArmCustomPatchAsync< PortalRevisionContract, PortalRevisionContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -98,7 +93,7 @@ interface PortalRevisionContracts { listByService is ArmResourceListByParent< PortalRevisionContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Supported operators | Supported functions | @@ -128,6 +123,11 @@ interface PortalRevisionContracts { >; } +@@maxLength(PortalRevisionContract.name, 256); +@@minLength(PortalRevisionContract.name, 1); +@@doc(PortalRevisionContract.name, + "Portal revision identifier. Must be unique in the current API Management service instance." +); @@encodedName(PortalRevisionContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp index 00bd38e827..9c39ff625c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -23,11 +22,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( PortalSigninSettingProperties ) -model PortalSigninSettings extends ProxyResourceBase { - @key("portalsetting") - @segment("portalsettings") - @visibility("read") - name: string; +model PortalSigninSettings extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = PortalSigninSettings, + KeyName = "portalsetting", + SegmentName = "portalsettings", + NamePattern = "" + >; /** * Sign-in settings contract properties. @@ -66,7 +67,7 @@ interface PortalSigninSettingsOperationGroup { createOrUpdate is ArmResourceCreateOrReplaceSync< PortalSigninSettings, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -80,13 +81,13 @@ interface PortalSigninSettingsOperationGroup { * Update Sign-In settings. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("SignInSettings_Update") update is ArmCustomPatchSync< PortalSigninSettings, PortalSigninSettings, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -104,6 +105,7 @@ interface PortalSigninSettingsOperationGroup { listByService is ArmResourceListByParent; } +@@doc(PortalSigninSettings.name, ""); @@encodedName(PortalSigninSettingsOperationGroup.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp index fda6c5b5de..9680be901a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -23,11 +22,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( PortalSignupSettingsProperties ) -model PortalSignupSettings extends ProxyResourceBase { - @key("portalsetting") - @segment("portalsettings") - @visibility("read") - name: string; +model PortalSignupSettings extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = PortalSignupSettings, + KeyName = "portalsetting", + SegmentName = "portalsettings", + NamePattern = "" + >; /** * Sign-up settings contract properties. @@ -66,7 +67,7 @@ interface PortalSignupSettingsOperationGroup { createOrUpdate is ArmResourceCreateOrReplaceSync< PortalSignupSettings, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -80,13 +81,13 @@ interface PortalSignupSettingsOperationGroup { * Update Sign-Up settings. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("SignUpSettings_Update") update is ArmCustomPatchSync< PortalSignupSettings, PortalSignupSettings, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -104,6 +105,7 @@ interface PortalSignupSettingsOperationGroup { listByService is ArmResourceListByParent; } +@@doc(PortalSignupSettings.name, ""); @@encodedName(PortalSignupSettingsOperationGroup.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp index f8c0de653c..dc9780430a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,15 +21,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( PrivateEndpointConnectionProperties ) -model PrivateEndpointConnection extends ProxyResourceBase { - /** - * Name of the private endpoint connection. - */ - @path - @key("privateEndpointConnectionName") - @segment("privateEndpointConnections") - @visibility("read") - name: string; +model PrivateEndpointConnection extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = PrivateEndpointConnection, + KeyName = "privateEndpointConnectionName", + SegmentName = "privateEndpointConnections", + NamePattern = "" + >; /** * Resource properties. @@ -59,6 +56,9 @@ interface PrivateEndpointConnections { * Deletes the specified Private Endpoint Connection. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("PrivateEndpointConnection_Delete") delete is ArmResourceDeleteAsync; @@ -70,6 +70,9 @@ interface PrivateEndpointConnections { listByService is ArmResourceListByParent; } +@@doc(PrivateEndpointConnection.name, + "Name of the private endpoint connection." +); @@encodedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, "application/json", "privateEndpointConnectionRequest" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp index 3e41c2f853..6a31110895 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,15 +21,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( PrivateLinkResourceProperties ) -model PrivateLinkResource extends ProxyResourceBase { - /** - * Name of the private link resource. - */ - @path - @key("privateLinkSubResourceName") - @segment("privateLinkResources") - @visibility("read") - name: string; +model PrivateLinkResource extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = PrivateLinkResource, + KeyName = "privateLinkSubResourceName", + SegmentName = "privateLinkResources", + NamePattern = "" + >; /** * Resource properties. @@ -55,3 +52,5 @@ interface PrivateLinkResources { @operationId("PrivateEndpointConnection_ListPrivateLinkResources") listPrivateLinkResources is ArmResourceListByParent; } + +@@doc(PrivateLinkResource.name, "Name of the private link resource."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp index 8bc7549d15..db4906865e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,17 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiManagementServiceResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(ProductContractProperties) -model ProductContract extends ProxyResourceBase { - /** - * Product identifier. Must be unique in the current API Management service instance. - */ - @maxLength(256) - @minLength(1) - @path - @key("productId") - @segment("products") - @visibility("read") - name: string; +model ProductContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = ProductContract, + KeyName = "productId", + SegmentName = "products", + NamePattern = "" + >; /** * Product entity contract properties. @@ -69,7 +64,7 @@ interface ProductContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< ProductContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -83,13 +78,13 @@ interface ProductContracts { * Update existing product details. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("Product_Update") update is ArmCustomPatchSync< ProductContract, ProductUpdateParameters, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -103,11 +98,12 @@ interface ProductContracts { * Delete product. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Product_Delete") delete is ArmResourceDeleteSync< ProductContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -131,7 +127,7 @@ interface ProductContracts { listByService is ArmResourceListByParent< ProductContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | terms | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | groups | expand | | |
    @@ -320,6 +316,11 @@ interface ProductContracts { ): ArmResponse> | ErrorResponse; } +@@maxLength(ProductContract.name, 256); +@@minLength(ProductContract.name, 1); +@@doc(ProductContract.name, + "Product identifier. Must be unique in the current API Management service instance." +); @@encodedName(ProductContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp index 23c934ad6d..02f6d2f5e4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp @@ -7,7 +7,6 @@ import "./ApiContract.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,17 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiContract) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(SchemaContractProperties) -model SchemaContract extends ProxyResourceBase { - /** - * Schema id identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @path - @key("schemaId") - @segment("schemas") - @visibility("read") - name: string; +model SchemaContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = SchemaContract, + KeyName = "schemaId", + SegmentName = "schemas", + NamePattern = "" + >; /** * Properties of the API Schema. @@ -69,7 +64,7 @@ interface SchemaContracts { createOrUpdate is ArmResourceCreateOrReplaceAsync< SchemaContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -83,11 +78,12 @@ interface SchemaContracts { * Deletes the schema configuration at the Api. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("ApiSchema_Delete") delete is ArmResourceDeleteSync< SchemaContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * If true removes all references to the schema before deleting it. @@ -111,7 +107,7 @@ interface SchemaContracts { listByApi is ArmResourceListByParent< SchemaContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | contentType | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -135,6 +131,11 @@ interface SchemaContracts { >; } +@@maxLength(SchemaContract.name, 80); +@@minLength(SchemaContract.name, 1); +@@doc(SchemaContract.name, + "Schema id identifier. Must be unique in the current API Management service instance." +); @@encodedName(SchemaContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp index aa7771a587..b89c74132e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,15 +21,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( SubscriptionContractProperties ) -model SubscriptionContract extends ProxyResourceBase { - /** - * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - */ - @path - @key("subscriptionId") - @segment("subscriptions") - @visibility("read") - name: string; +model SubscriptionContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = SubscriptionContract, + KeyName = "subscriptionId", + SegmentName = "subscriptions", + NamePattern = "" + >; /** * Subscription contract properties. @@ -69,7 +66,7 @@ interface SubscriptionContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< SubscriptionContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Notify change in Subscription State. @@ -97,13 +94,13 @@ interface SubscriptionContracts { * Updates the details of a subscription specified by its identifier. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("Subscription_Update") update is ArmCustomPatchSync< SubscriptionContract, SubscriptionUpdateParameters, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Notify change in Subscription State. @@ -131,11 +128,12 @@ interface SubscriptionContracts { * Deletes the specified subscription. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Subscription_Delete") delete is ArmResourceDeleteSync< SubscriptionContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -153,7 +151,7 @@ interface SubscriptionContracts { list is ArmResourceListByParent< SubscriptionContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | stateComment | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | ownerId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | scope | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | userId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | productId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | user | expand | | |
    @@ -208,6 +206,9 @@ interface SubscriptionContracts { >; } +@@doc(SubscriptionContract.name, + "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call." +); @@encodedName(SubscriptionContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp index 854ec1a34f..c1e8e8a40b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp @@ -7,7 +7,6 @@ import "./OperationContract.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,18 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(OperationContract) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(TagContractProperties) -model TagContract extends ProxyResourceBase { - /** - * Tag identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - @key("tagId") - @segment("tags") - @visibility("read") - name: string; +model TagContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = TagContract, + KeyName = "tagId", + SegmentName = "tags", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * Tag entity contract properties. @@ -70,6 +64,7 @@ interface TagContracts { * Detach the tag from the Operation. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Tag_DetachFromOperation") detachFromOperation is ArmResourceDeleteSync; @@ -81,7 +76,7 @@ interface TagContracts { listByOperation is ArmResourceListByParent< TagContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -104,3 +99,9 @@ interface TagContracts { } >; } + +@@maxLength(TagContract.name, 80); +@@minLength(TagContract.name, 1); +@@doc(TagContract.name, + "Tag identifier. Must be unique in the current API Management service instance." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp index d2a3983192..b1d1fd1757 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp @@ -7,7 +7,6 @@ import "./ApiContract.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,18 +21,13 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( TagDescriptionContractProperties ) -model TagDescriptionContract extends ProxyResourceBase { - /** - * Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names. - */ - @maxLength(80) - @minLength(1) - @pattern("^[^*#&+:<>?]+$") - @path - @key("tagDescriptionId") - @segment("tagDescriptions") - @visibility("read") - name: string; +model TagDescriptionContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = TagDescriptionContract, + KeyName = "tagDescriptionId", + SegmentName = "tagDescriptions", + NamePattern = "^[^*#&+:<>?]+$" + >; /** * TagDescription entity contract properties. @@ -72,7 +66,7 @@ interface TagDescriptionContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< TagDescriptionContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. Not required when creating an entity, but required when updating an entity. @@ -86,11 +80,12 @@ interface TagDescriptionContracts { * Delete tag description for the Api. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("ApiTagDescription_Delete") delete is ArmResourceDeleteSync< TagDescriptionContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -108,7 +103,7 @@ interface TagDescriptionContracts { listByService is ArmResourceListByParent< TagDescriptionContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    @@ -132,6 +127,11 @@ interface TagDescriptionContracts { >; } +@@maxLength(TagDescriptionContract.name, 80); +@@minLength(TagDescriptionContract.name, 1); +@@doc(TagDescriptionContract.name, + "Tag description identifier. Used when creating tagDescription for API/Tag association. Based on API and Tag names." +); @@encodedName(TagDescriptionContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp index ceb430debf..12e976f18f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,7 +21,7 @@ namespace Azure.ResourceManager.ApiManagement; @Azure.ResourceManager.Private.armResourceInternal( TenantSettingsContractProperties ) -model TenantSettingsContract extends ProxyResourceBase { +model TenantSettingsContract extends Foundations.ProxyResource { /** * The identifier of the settings. */ @@ -56,7 +55,7 @@ interface TenantSettingsContracts { listByService is ArmResourceListByParent< TenantSettingsContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Not used diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp index 1ee0818d0e..5608cfe1b6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp @@ -7,7 +7,6 @@ import "./ApiManagementServiceResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,17 +19,13 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiManagementServiceResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(UserContractProperties) -model UserContract extends ProxyResourceBase { - /** - * User identifier. Must be unique in the current API Management service instance. - */ - @maxLength(80) - @minLength(1) - @path - @key("userId") - @segment("users") - @visibility("read") - name: string; +model UserContract extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = UserContract, + KeyName = "userId", + SegmentName = "users", + NamePattern = "" + >; /** * User entity contract properties. @@ -66,7 +61,7 @@ interface UserContracts { createOrUpdate is ArmResourceCreateOrReplaceSync< UserContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Send an Email notification to the User. @@ -86,13 +81,13 @@ interface UserContracts { * Updates the details of the user specified by its identifier. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("User_Update") update is ArmCustomPatchSync< UserContract, UserUpdateParameters, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. @@ -106,11 +101,12 @@ interface UserContracts { * Deletes specific user. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("User_Delete") delete is ArmResourceDeleteSync< UserContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Whether to delete user's subscription or not. @@ -146,7 +142,7 @@ interface UserContracts { listByService is ArmResourceListByParent< UserContract, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * | Field | Usage | Supported operators | Supported functions |
    |-------------|-------------|-------------|-------------|
    | name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | state | filter | eq | |
    | registrationDate | filter | ge, le, eq, ne, gt, lt | |
    | note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
    | groups | expand | | |
    @@ -206,7 +202,7 @@ interface UserContracts { UserContract, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Determines the type of application which send the create user request. Default is legacy publisher portal. @@ -300,6 +296,11 @@ interface UserContracts { ): ArmResponse | ErrorResponse; } +@@maxLength(UserContract.name, 80); +@@minLength(UserContract.name, 1); +@@doc(UserContract.name, + "User identifier. Must be unique in the current API Management service instance." +); @@encodedName(UserContracts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp index 7d93036c34..2ed071e60b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp @@ -1605,6 +1605,7 @@ model ParameterContract { /** * Exampled defined for the parameter. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" examples?: Record; } @@ -1685,6 +1686,7 @@ model RepresentationContract { /** * Exampled defined for the representation. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" examples?: Record; } @@ -2735,11 +2737,13 @@ model BackendCredentialsContract { /** * Query Parameter description. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" query?: Record; /** * Header Parameter description. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" header?: Record; /** @@ -3302,6 +3306,7 @@ model ContentItemContract extends Resource { /** * Properties of the content item. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" properties?: Record; } @@ -3539,6 +3544,7 @@ model ApiManagementServiceBaseProperties { /** * Custom properties of the API Management service.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2).
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11` can be used to disable just TLS 1.1 for communications with backends.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10` can be used to disable TLS 1.0 for communications with backends.
    Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2` can be used to enable HTTP2 protocol on an API Management service.
    Not specifying any of these properties on PATCH operation will reset omitted properties' values to their defaults. For all the settings except Http2 the default value is `True` if the service was created on or before April 1st 2018 and `False` otherwise. Http2 setting's default value is `False`.

    You can disable any of next ciphers by using settings `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.[cipher_name]`: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA. For example, `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256`:`false`. The default value is `true` for them. Note: next ciphers can't be disabled since they are required by Azure CloudService internal components: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384 */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" customProperties?: Record; /** @@ -3903,6 +3909,7 @@ model ApiManagementServiceIdentity { * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" userAssignedIdentities?: Record; } @@ -3943,6 +3950,7 @@ model ApimResource { /** * Resource tags. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -4686,6 +4694,7 @@ model LoggerContractProperties { * The name and SendRule connection string of the event hub for azureEventHub logger. * Instrumentation key for applicationInsights logger. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" credentials?: Record; /** @@ -4726,6 +4735,7 @@ model LoggerUpdateParameters { /** * Logger credentials. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" credentials?: Record; /** @@ -6036,6 +6046,7 @@ model TenantSettingsContractProperties { /** * Tenant settings */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" settings?: Record; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp index f745a0405b..5bd163404b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,15 +17,13 @@ namespace Azure.ResourceManager.Authorization; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(DenyAssignmentProperties) -model DenyAssignment extends ExtensionResourceBase { - /** - * The ID of the deny assignment to get. - */ - @path - @key("denyAssignmentId") - @segment("denyAssignments") - @visibility("read") - name: string; +model DenyAssignment extends Foundations.ExtensionResource { + ...ResourceNameParameter< + Resource = DenyAssignment, + KeyName = "denyAssignmentId", + SegmentName = "denyAssignments", + NamePattern = "" + >; /** * Deny assignment properties. @@ -50,7 +47,7 @@ interface DenyAssignments { listForResource is ArmResourceListByParent< DenyAssignment, { - ...ExtensionBaseParameters; + ...Azure.ResourceManager.Foundations.ExtensionBaseParameters; ...SubscriptionIdParameter; ...ResourceGroupParameter; @@ -86,3 +83,5 @@ interface DenyAssignments { } >; } + +@@doc(DenyAssignment.name, "The ID of the deny assignment to get."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp index fd953a3c2e..1cbfca2336 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,15 +15,13 @@ namespace Azure.ResourceManager.Authorization; * Provider Operations metadata */ @tenantResource -model ProviderOperationsMetadata is ProxyResource<{}> { - /** - * The namespace of the resource provider. - */ - @path - @key("resourceProviderNamespace") - @segment("providerOperations") - @visibility("read") - name: string; +model ProviderOperationsMetadata is Azure.ResourceManager.ProxyResource<{}> { + ...ResourceNameParameter< + Resource = ProviderOperationsMetadata, + KeyName = "resourceProviderNamespace", + SegmentName = "providerOperations", + NamePattern = "" + >; /** * The provider display name. @@ -50,7 +47,7 @@ interface ProviderOperationsMetadataOperationGroup { get is ArmResourceRead< ProviderOperationsMetadata, { - ...TenantBaseParameters; + ...Azure.ResourceManager.Foundations.TenantBaseParameters; /** * Specifies whether to expand the values. @@ -68,7 +65,7 @@ interface ProviderOperationsMetadataOperationGroup { list is ArmResourceListByParent< ProviderOperationsMetadata, { - ...TenantBaseParameters; + ...Azure.ResourceManager.Foundations.TenantBaseParameters; /** * Specifies whether to expand the values. @@ -78,3 +75,7 @@ interface ProviderOperationsMetadataOperationGroup { } >; } + +@@doc(ProviderOperationsMetadata.name, + "The namespace of the resource provider." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp index 0d70af62b0..da0d8f87ac 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,15 +17,13 @@ namespace Azure.ResourceManager.Authorization; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(RoleAssignmentProperties) -model RoleAssignment extends ExtensionResourceBase { - /** - * The name of the role assignment. It can be any valid GUID. - */ - @path - @key("roleAssignmentName") - @segment("roleAssignments") - @visibility("read") - name: string; +model RoleAssignment extends Foundations.ExtensionResource { + ...ResourceNameParameter< + Resource = RoleAssignment, + KeyName = "roleAssignmentName", + SegmentName = "roleAssignments", + NamePattern = "" + >; /** * Role assignment properties. @@ -43,7 +40,7 @@ interface RoleAssignments { get is ArmResourceRead< RoleAssignment, { - ...ExtensionBaseParameters; + ...Azure.ResourceManager.Foundations.ExtensionBaseParameters; /** * Tenant ID for cross-tenant request @@ -61,10 +58,11 @@ interface RoleAssignments { /** * Delete a role assignment by scope and name. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync< RoleAssignment, { - ...ExtensionBaseParameters; + ...Azure.ResourceManager.Foundations.ExtensionBaseParameters; /** * Tenant ID for cross-tenant request @@ -82,7 +80,7 @@ interface RoleAssignments { listForScope is ArmResourceListByParent< RoleAssignment, { - ...ExtensionBaseParameters; + ...Azure.ResourceManager.Foundations.ExtensionBaseParameters; /** * The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. @@ -105,6 +103,9 @@ interface RoleAssignments { >; } +@@doc(RoleAssignment.name, + "The name of the role assignment. It can be any valid GUID." +); @@encodedName(RoleAssignments.create::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp index 00e5437d20..e3ee6816e3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.Authorization; @Azure.ResourceManager.Private.armResourceInternal( RoleAssignmentScheduleProperties ) -model RoleAssignmentSchedule extends ExtensionResourceBase { - /** - * The name (guid) of the role assignment schedule to get. - */ - @path - @key("roleAssignmentScheduleName") - @segment("roleAssignmentSchedules") - @visibility("read") - name: string; +model RoleAssignmentSchedule extends Foundations.ExtensionResource { + ...ResourceNameParameter< + Resource = RoleAssignmentSchedule, + KeyName = "roleAssignmentScheduleName", + SegmentName = "roleAssignmentSchedules", + NamePattern = "" + >; /** * Role assignment schedule properties. @@ -52,7 +49,7 @@ interface RoleAssignmentSchedules { listForScope is ArmResourceListByParent< RoleAssignmentSchedule, { - ...ExtensionBaseParameters; + ...Azure.ResourceManager.Foundations.ExtensionBaseParameters; /** * The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment schedules for the current user. Use $filter=asTarget() to return all role assignment schedules created for the current user. @@ -62,3 +59,7 @@ interface RoleAssignmentSchedules { } >; } + +@@doc(RoleAssignmentSchedule.name, + "The name (guid) of the role assignment schedule to get." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp index b3d96fda24..d2af5db6ea 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.Authorization; @Azure.ResourceManager.Private.armResourceInternal( RoleAssignmentScheduleInstanceProperties ) -model RoleAssignmentScheduleInstance extends ExtensionResourceBase { - /** - * The name (hash of schedule name + time) of the role assignment schedule to get. - */ - @path - @key("roleAssignmentScheduleInstanceName") - @segment("roleAssignmentScheduleInstances") - @visibility("read") - name: string; +model RoleAssignmentScheduleInstance extends Foundations.ExtensionResource { + ...ResourceNameParameter< + Resource = RoleAssignmentScheduleInstance, + KeyName = "roleAssignmentScheduleInstanceName", + SegmentName = "roleAssignmentScheduleInstances", + NamePattern = "" + >; /** * Role assignment schedule instance properties. @@ -52,7 +49,7 @@ interface RoleAssignmentScheduleInstances { listForScope is ArmResourceListByParent< RoleAssignmentScheduleInstance, { - ...ExtensionBaseParameters; + ...Azure.ResourceManager.Foundations.ExtensionBaseParameters; /** * The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment schedule instances for the user. Use $filter=asTarget() to return all role assignment schedule instances created for the current user. @@ -62,3 +59,7 @@ interface RoleAssignmentScheduleInstances { } >; } + +@@doc(RoleAssignmentScheduleInstance.name, + "The name (hash of schedule name + time) of the role assignment schedule to get." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp index bd9c5c9a88..9a44f2edf1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.Authorization; @Azure.ResourceManager.Private.armResourceInternal( RoleAssignmentScheduleRequestProperties ) -model RoleAssignmentScheduleRequest extends ExtensionResourceBase { - /** - * The name (guid) of the role assignment schedule request to get. - */ - @path - @key("roleAssignmentScheduleRequestName") - @segment("roleAssignmentScheduleRequests") - @visibility("read") - name: string; +model RoleAssignmentScheduleRequest extends Foundations.ExtensionResource { + ...ResourceNameParameter< + Resource = RoleAssignmentScheduleRequest, + KeyName = "roleAssignmentScheduleRequestName", + SegmentName = "roleAssignmentScheduleRequests", + NamePattern = "" + >; /** * Role assignment schedule request properties. @@ -57,7 +54,7 @@ interface RoleAssignmentScheduleRequests { listForScope is ArmResourceListByParent< RoleAssignmentScheduleRequest, { - ...ExtensionBaseParameters; + ...Azure.ResourceManager.Foundations.ExtensionBaseParameters; /** * The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role assignment schedule requests requested by the current user. Use $filter=asTarget() to return all role assignment schedule requests created for the current user. Use $filter=asApprover() to return all role assignment schedule requests where the current user is an approver. @@ -82,6 +79,9 @@ interface RoleAssignmentScheduleRequests { >; } +@@doc(RoleAssignmentScheduleRequest.name, + "The name (guid) of the role assignment schedule request to get." +); @@encodedName(RoleAssignmentScheduleRequests.create::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp index c2dbc6cc1c..0000adf505 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,15 +17,13 @@ namespace Azure.ResourceManager.Authorization; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(RoleDefinitionProperties) -model RoleDefinition extends ExtensionResourceBase { - /** - * The ID of the role definition. - */ - @path - @key("roleDefinitionId") - @segment("roleDefinitions") - @visibility("read") - name: string; +model RoleDefinition extends Foundations.ExtensionResource { + ...ResourceNameParameter< + Resource = RoleDefinition, + KeyName = "roleDefinitionId", + SegmentName = "roleDefinitions", + NamePattern = "" + >; /** * Role definition properties. @@ -50,6 +47,7 @@ interface RoleDefinitions { /** * Deletes a role definition. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -60,7 +58,7 @@ interface RoleDefinitions { list is ArmResourceListByParent< RoleDefinition, { - ...ExtensionBaseParameters; + ...Azure.ResourceManager.Foundations.ExtensionBaseParameters; /** * The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well. @@ -71,6 +69,7 @@ interface RoleDefinitions { >; } +@@doc(RoleDefinition.name, "The ID of the role definition."); @@encodedName(RoleDefinitions.createOrUpdate::parameters.resource, "application/json", "roleDefinition" diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp index ec3706e532..569254b12e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.Authorization; @Azure.ResourceManager.Private.armResourceInternal( RoleEligibilityScheduleProperties ) -model RoleEligibilitySchedule extends ExtensionResourceBase { - /** - * The name (guid) of the role eligibility schedule to get. - */ - @path - @key("roleEligibilityScheduleName") - @segment("roleEligibilitySchedules") - @visibility("read") - name: string; +model RoleEligibilitySchedule extends Foundations.ExtensionResource { + ...ResourceNameParameter< + Resource = RoleEligibilitySchedule, + KeyName = "roleEligibilityScheduleName", + SegmentName = "roleEligibilitySchedules", + NamePattern = "" + >; /** * role eligibility schedule properties. @@ -52,7 +49,7 @@ interface RoleEligibilitySchedules { listForScope is ArmResourceListByParent< RoleEligibilitySchedule, { - ...ExtensionBaseParameters; + ...Azure.ResourceManager.Foundations.ExtensionBaseParameters; /** * The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedules at or above the scope. Use $filter=principalId eq {id} to return all role eligibility schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use $filter=asTarget() to return all role eligibility schedules created for the current user. @@ -62,3 +59,7 @@ interface RoleEligibilitySchedules { } >; } + +@@doc(RoleEligibilitySchedule.name, + "The name (guid) of the role eligibility schedule to get." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp index fa6f33869f..6839944b9f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.Authorization; @Azure.ResourceManager.Private.armResourceInternal( RoleEligibilityScheduleInstanceProperties ) -model RoleEligibilityScheduleInstance extends ExtensionResourceBase { - /** - * The name (hash of schedule name + time) of the role eligibility schedule to get. - */ - @path - @key("roleEligibilityScheduleInstanceName") - @segment("roleEligibilityScheduleInstances") - @visibility("read") - name: string; +model RoleEligibilityScheduleInstance extends Foundations.ExtensionResource { + ...ResourceNameParameter< + Resource = RoleEligibilityScheduleInstance, + KeyName = "roleEligibilityScheduleInstanceName", + SegmentName = "roleEligibilityScheduleInstances", + NamePattern = "" + >; /** * Role eligibility schedule instance properties. @@ -52,7 +49,7 @@ interface RoleEligibilityScheduleInstances { listForScope is ArmResourceListByParent< RoleEligibilityScheduleInstance, { - ...ExtensionBaseParameters; + ...Azure.ResourceManager.Foundations.ExtensionBaseParameters; /** * The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use $filter=asTarget() to return all role eligibility schedules created for the current user. @@ -62,3 +59,7 @@ interface RoleEligibilityScheduleInstances { } >; } + +@@doc(RoleEligibilityScheduleInstance.name, + "The name (hash of schedule name + time) of the role eligibility schedule to get." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp index e57c044191..068d088b67 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.Authorization; @Azure.ResourceManager.Private.armResourceInternal( RoleEligibilityScheduleRequestProperties ) -model RoleEligibilityScheduleRequest extends ExtensionResourceBase { - /** - * The name (guid) of the role eligibility schedule request to get. - */ - @path - @key("roleEligibilityScheduleRequestName") - @segment("roleEligibilityScheduleRequests") - @visibility("read") - name: string; +model RoleEligibilityScheduleRequest extends Foundations.ExtensionResource { + ...ResourceNameParameter< + Resource = RoleEligibilityScheduleRequest, + KeyName = "roleEligibilityScheduleRequestName", + SegmentName = "roleEligibilityScheduleRequests", + NamePattern = "" + >; /** * Role eligibility schedule request properties. @@ -57,7 +54,7 @@ interface RoleEligibilityScheduleRequests { listForScope is ArmResourceListByParent< RoleEligibilityScheduleRequest, { - ...ExtensionBaseParameters; + ...Azure.ResourceManager.Foundations.ExtensionBaseParameters; /** * The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role eligibility schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role eligibility schedule requests requested by the current user. Use $filter=asTarget() to return all role eligibility schedule requests created for the current user. Use $filter=asApprover() to return all role eligibility schedule requests where the current user is an approver. @@ -82,6 +79,9 @@ interface RoleEligibilityScheduleRequests { >; } +@@doc(RoleEligibilityScheduleRequest.name, + "The name (guid) of the role eligibility schedule request to get." +); @@encodedName(RoleEligibilityScheduleRequests.create::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp index f8ca09ee6e..bae896c1b7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.Authorization; @Azure.ResourceManager.Private.armResourceInternal( RoleManagementPolicyProperties ) -model RoleManagementPolicy extends ExtensionResourceBase { - /** - * The name (guid) of the role management policy to get. - */ - @path - @key("roleManagementPolicyName") - @segment("roleManagementPolicies") - @visibility("read") - name: string; +model RoleManagementPolicy extends Foundations.ExtensionResource { + ...ResourceNameParameter< + Resource = RoleManagementPolicy, + KeyName = "roleManagementPolicyName", + SegmentName = "roleManagementPolicies", + NamePattern = "" + >; /** * Role management policy properties. @@ -47,7 +44,7 @@ interface RoleManagementPolicies { /** * Update a role management policy */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync; /** @@ -58,6 +55,9 @@ interface RoleManagementPolicies { listForScope is ArmResourceListByParent; } +@@doc(RoleManagementPolicy.name, + "The name (guid) of the role management policy to get." +); @@encodedName(RoleManagementPolicies.update::parameters.properties, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp index dd923a5701..630b958c8a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.Authorization; @Azure.ResourceManager.Private.armResourceInternal( RoleManagementPolicyAssignmentProperties ) -model RoleManagementPolicyAssignment extends ExtensionResourceBase { - /** - * The name of format {guid_guid} the role management policy assignment to get. - */ - @path - @key("roleManagementPolicyAssignmentName") - @segment("roleManagementPolicyAssignments") - @visibility("read") - name: string; +model RoleManagementPolicyAssignment extends Foundations.ExtensionResource { + ...ResourceNameParameter< + Resource = RoleManagementPolicyAssignment, + KeyName = "roleManagementPolicyAssignmentName", + SegmentName = "roleManagementPolicyAssignments", + NamePattern = "" + >; /** * Role management policy properties. @@ -57,6 +54,9 @@ interface RoleManagementPolicyAssignments { listForScope is ArmResourceListByParent; } +@@doc(RoleManagementPolicyAssignment.name, + "The name of format {guid_guid} the role management policy assignment to get." +); @@encodedName(RoleManagementPolicyAssignments.create::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp index ac6a65988d..e037ac95f0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp @@ -7,7 +7,6 @@ import "./Space.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,16 +15,14 @@ namespace Microsoft.IntegrationSpaces; * An integration application under space. */ @parentResource(Space) -model Application is TrackedResource { - /** - * The name of the Application - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - @key("applicationName") - @segment("applications") - @visibility("read") - name: string; +model Application + is Azure.ResourceManager.TrackedResource { + ...ResourceNameParameter< + Resource = Application, + KeyName = "applicationName", + SegmentName = "applications", + NamePattern = "[a-zA-Z0-9_.()-]{0,79}$" + >; } @armResourceOperations @@ -43,12 +40,13 @@ interface Applications { /** * Update a Application */ - @parameterVisibility("read") + @parameterVisibility patch is ArmCustomPatchSync; /** * Delete a Application */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -59,7 +57,7 @@ interface Applications { listBySpace is ArmResourceListByParent< Application, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The number of result items to return. @@ -159,3 +157,5 @@ interface Applications { void >; } + +@@doc(Application.name, "The name of the Application"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp index 1ce9d54810..b112495ac1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp @@ -7,7 +7,6 @@ import "./Application.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,16 +15,14 @@ namespace Microsoft.IntegrationSpaces; * A business process under application. */ @parentResource(Application) -model BusinessProcess is ProxyResource { - /** - * The name of the business process - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - @key("businessProcessName") - @segment("businessProcesses") - @visibility("read") - name: string; +model BusinessProcess + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = BusinessProcess, + KeyName = "businessProcessName", + SegmentName = "businessProcesses", + NamePattern = "[a-zA-Z0-9_.()-]{0,79}$" + >; } @armResourceOperations @@ -43,12 +40,13 @@ interface BusinessProcesses { /** * Update a BusinessProcess */ - @parameterVisibility("read") + @parameterVisibility patch is ArmCustomPatchSync; /** * Delete a BusinessProcess */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -59,7 +57,7 @@ interface BusinessProcesses { listByApplication is ArmResourceListByParent< BusinessProcess, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The number of result items to return. @@ -114,3 +112,5 @@ interface BusinessProcesses { } >; } + +@@doc(BusinessProcess.name, "The name of the business process"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp index 5fd1bd3c7e..189ecee162 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp @@ -7,7 +7,6 @@ import "./BusinessProcess.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,15 +15,14 @@ namespace Microsoft.IntegrationSpaces; * A business process version. */ @parentResource(BusinessProcess) -model BusinessProcessVersion is ProxyResource { - /** - * The version of the business process - */ - @path - @key("businessProcessVersion") - @segment("versions") - @visibility("read") - name: string; +model BusinessProcessVersion + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = BusinessProcessVersion, + KeyName = "businessProcessVersion", + SegmentName = "versions", + NamePattern = "" + >; } @armResourceOperations @@ -42,7 +40,7 @@ interface BusinessProcessVersions { listByBusinessProcess is ArmResourceListByParent< BusinessProcessVersion, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The number of result items to return. @@ -97,3 +95,5 @@ interface BusinessProcessVersions { } >; } + +@@doc(BusinessProcessVersion.name, "The version of the business process"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp index 30c7712aad..ae100cd5f0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp @@ -7,7 +7,6 @@ import "./Space.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -17,16 +16,13 @@ namespace Microsoft.IntegrationSpaces; */ @parentResource(Space) model InfrastructureResource - is ProxyResource { - /** - * The name of the infrastructure resource in the space. - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - @key("infrastructureResourceName") - @segment("infrastructureResources") - @visibility("read") - name: string; + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = InfrastructureResource, + KeyName = "infrastructureResourceName", + SegmentName = "infrastructureResources", + NamePattern = "[a-zA-Z0-9_.()-]{0,79}$" + >; } @armResourceOperations @@ -44,7 +40,7 @@ interface InfrastructureResources { /** * Update a InfrastructureResource */ - @parameterVisibility("read") + @parameterVisibility patch is ArmCustomPatchSync< InfrastructureResource, InfrastructureResourceUpdate @@ -53,6 +49,7 @@ interface InfrastructureResources { /** * Delete a InfrastructureResource */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -63,7 +60,7 @@ interface InfrastructureResources { listBySpace is ArmResourceListByParent< InfrastructureResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The number of result items to return. @@ -118,3 +115,7 @@ interface InfrastructureResources { } >; } + +@@doc(InfrastructureResource.name, + "The name of the infrastructure resource in the space." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp index 839ca404f0..3abdd107cd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -14,16 +13,13 @@ namespace Microsoft.IntegrationSpaces; /** * An integration space. */ -model Space is TrackedResource { - /** - * The name of the space - */ - @pattern("[a-zA-Z0-9_.()-]{0,79}$") - @path - @key("spaceName") - @segment("spaces") - @visibility("read") - name: string; +model Space is Azure.ResourceManager.TrackedResource { + ...ResourceNameParameter< + Resource = Space, + KeyName = "spaceName", + SegmentName = "spaces", + NamePattern = "[a-zA-Z0-9_.()-]{0,79}$" + >; } @armResourceOperations @@ -41,12 +37,13 @@ interface Spaces { /** * Update a Space */ - @parameterVisibility("read") + @parameterVisibility patch is ArmCustomPatchSync; /** * Delete a Space */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -57,7 +54,7 @@ interface Spaces { listByResourceGroup is ArmResourceListByParent< Space, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The number of result items to return. @@ -117,3 +114,5 @@ interface Spaces { */ listBySubscription is ArmListBySubscription; } + +@@doc(Space.name, "The name of the space"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp index 10b2cacb7a..22b0e3c2a4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp @@ -89,6 +89,7 @@ model SpaceUpdate { /** * Resource tags. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; /** @@ -125,6 +126,7 @@ model ApplicationProperties { /** * The tracking data stores. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" trackingDataStores: Record; } @@ -160,6 +162,7 @@ model ApplicationUpdate { /** * Resource tags. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; /** @@ -180,6 +183,7 @@ model ApplicationUpdateProperties { /** * The tracking data stores. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" trackingDataStores?: Record; } @@ -222,11 +226,13 @@ model BusinessProcessProperties { /** * The business process stages. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" businessProcessStages?: Record; /** * The business process mapping. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" businessProcessMapping?: Record; } @@ -257,6 +263,7 @@ model BusinessProcessStage { /** * The properties within the properties of the business process stage. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" properties?: Record; /** @@ -327,11 +334,13 @@ model BusinessProcessUpdateProperties { /** * The business process stages. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" businessProcessStages?: Record; /** * The business process mapping. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" businessProcessMapping?: Record; } @@ -392,16 +401,19 @@ model BusinessProcessDevelopmentArtifactProperties { /** * The business process stages. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" businessProcessStages?: Record; /** * The business process mapping. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" businessProcessMapping?: Record; /** * The tracking profile for the business process. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" trackingProfiles?: Record; } @@ -423,6 +435,7 @@ model TrackingProfileDefinition { /** * The tracking definitions. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" trackingDefinitions?: Record; } @@ -453,6 +466,7 @@ model FlowTrackingDefinition { /** * The tracking events. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" events?: Record; } @@ -498,6 +512,7 @@ model TrackingEventDefinition { /** * The properties to be collected for event. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" properties?: Record>; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp index f089b8d095..4d0fe58b98 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model AvailabilitySet extends Resource { - /** - * The name of the availability set. - */ - @path - @key("availabilitySetName") - @segment("availabilitySets") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = AvailabilitySet, + KeyName = "availabilitySetName", + SegmentName = "availabilitySets", + NamePattern = "" + >; /** * Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'. @@ -54,12 +51,13 @@ interface AvailabilitySets { /** * Update an availability set. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync; /** * Delete an availability set. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -94,6 +92,7 @@ interface AvailabilitySets { ): ArmResponse | ErrorResponse; } +@@doc(AvailabilitySet.name, "The name of the availability set."); @@encodedName(AvailabilitySets.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp index 3f41f7eaa8..92cb8200f8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp @@ -7,7 +7,6 @@ import "./CapacityReservationGroup.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(CapacityReservationGroup) @includeInapplicableMetadataInPayload(false) model CapacityReservation extends Resource { - /** - * The name of the capacity reservation. - */ - @path - @key("capacityReservationName") - @segment("capacityReservations") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = CapacityReservation, + KeyName = "capacityReservationName", + SegmentName = "capacityReservations", + NamePattern = "" + >; /** * SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values. @@ -54,7 +51,7 @@ interface CapacityReservations { get is ArmResourceRead< CapacityReservation, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the capacity reservation that is managed by the platform and can change outside of control plane operations. @@ -72,12 +69,15 @@ interface CapacityReservations { /** * The operation to update a capacity reservation. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** * The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -88,6 +88,7 @@ interface CapacityReservations { listByCapacityReservationGroup is ArmResourceListByParent; } +@@doc(CapacityReservation.name, "The name of the capacity reservation."); @@encodedName(CapacityReservations.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp index c8cd9aeb7c..2a49b1a68a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model CapacityReservationGroup extends Resource { - /** - * The name of the capacity reservation group. - */ - @path - @key("capacityReservationGroupName") - @segment("capacityReservationGroups") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = CapacityReservationGroup, + KeyName = "capacityReservationGroupName", + SegmentName = "capacityReservationGroups", + NamePattern = "" + >; /** * Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones. @@ -47,7 +44,7 @@ interface CapacityReservationGroups { get is ArmResourceRead< CapacityReservationGroup, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime properties of a capacity reservation that is managed by the platform and can change outside of control plane operations. @@ -65,7 +62,7 @@ interface CapacityReservationGroups { /** * The operation to update a capacity reservation group. When updating a capacity reservation group, only tags may be modified. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync< CapacityReservationGroup, CapacityReservationGroupUpdate @@ -74,6 +71,7 @@ interface CapacityReservationGroups { /** * The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -84,7 +82,7 @@ interface CapacityReservationGroups { listByResourceGroup is ArmResourceListByParent< CapacityReservationGroup, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The expand expression to apply on the operation. Based on the expand param(s) specified we return Virtual Machine or ScaleSet VM Instance or both resource Ids which are associated to capacity reservation group in the response. @@ -100,6 +98,9 @@ interface CapacityReservationGroups { listBySubscription is ArmListBySubscription; } +@@doc(CapacityReservationGroup.name, + "The name of the capacity reservation group." +); @@encodedName(CapacityReservationGroups.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp index 9afc0f144b..b70b951317 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model CloudService { - /** - * Name of the cloud service. - */ - @path - @key("cloudServiceName") - @segment("cloudServices") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = CloudService, + KeyName = "cloudServiceName", + SegmentName = "cloudServices", + NamePattern = "" + >; /** * Resource Id. @@ -47,6 +44,7 @@ model CloudService { /** * Resource tags. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; /** @@ -82,12 +80,15 @@ interface CloudServices { /** * Update a cloud service. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** * Deletes a cloud service. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -200,6 +201,7 @@ interface CloudServices { ): ArmResponse | ErrorResponse; } +@@doc(CloudService.name, "Name of the cloud service."); @@encodedName(CloudServices.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp index a2394ac1b6..06f22cade4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp @@ -7,7 +7,6 @@ import "./CloudService.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(CloudService) @includeInapplicableMetadataInPayload(false) model CloudServiceRole { - /** - * Name of the role. - */ - @path - @key("roleName") - @segment("roles") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = CloudServiceRole, + KeyName = "roleName", + SegmentName = "roles", + NamePattern = "" + >; /** * Resource id @@ -73,3 +70,5 @@ interface CloudServiceRoles { @operationId("CloudServiceRoles_List") list is ArmResourceListByParent; } + +@@doc(CloudServiceRole.name, "Name of the role."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp index 2805d07d67..62f9f5285e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -21,14 +20,12 @@ namespace Microsoft.Compute; @parentResource(SubscriptionLocationResource) @includeInapplicableMetadataInPayload(false) model CommunityGallery extends PirCommunityGalleryResource { - /** - * The public name of the community gallery. - */ - @path - @key("publicGalleryName") - @segment("communityGalleries") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = CommunityGallery, + KeyName = "publicGalleryName", + SegmentName = "communityGalleries", + NamePattern = "" + >; @extension("x-ms-client-flatten", true) @visibility("read,create") @@ -42,3 +39,5 @@ interface CommunityGalleries { */ get is ArmResourceRead; } + +@@doc(CommunityGallery.name, "The public name of the community gallery."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp index 0ce0a57531..445b8464e8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp @@ -7,7 +7,6 @@ import "./CommunityGallery.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(CommunityGallery) @includeInapplicableMetadataInPayload(false) model CommunityGalleryImage extends PirCommunityGalleryResource { - /** - * The name of the community gallery image definition. - */ - @path - @key("galleryImageName") - @segment("images") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = CommunityGalleryImage, + KeyName = "galleryImageName", + SegmentName = "images", + NamePattern = "" + >; /** * Describes the properties of a gallery image definition. @@ -50,3 +47,7 @@ interface CommunityGalleryImages { @operationId("CommunityGalleryImages_List") list is ArmResourceListByParent; } + +@@doc(CommunityGalleryImage.name, + "The name of the community gallery image definition." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp index fac5981be4..1dab76b035 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp @@ -7,7 +7,6 @@ import "./CommunityGalleryImage.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(CommunityGalleryImage) @includeInapplicableMetadataInPayload(false) model CommunityGalleryImageVersion extends PirCommunityGalleryResource { - /** - * The name of the community gallery image version. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - */ - @path - @key("galleryImageVersionName") - @segment("versions") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = CommunityGalleryImageVersion, + KeyName = "galleryImageVersionName", + SegmentName = "versions", + NamePattern = "" + >; /** * Describes the properties of a gallery image version. @@ -50,3 +47,7 @@ interface CommunityGalleryImageVersions { @operationId("CommunityGalleryImageVersions_List") list is ArmResourceListByParent; } + +@@doc(CommunityGalleryImageVersion.name, + "The name of the community gallery image version. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp index 0dc0c47178..4a0f3a382f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp @@ -7,7 +7,6 @@ import "./DedicatedHostGroup.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(DedicatedHostGroup) @includeInapplicableMetadataInPayload(false) model DedicatedHost extends Resource { - /** - * The name of the dedicated host. - */ - @path - @key("hostName") - @segment("hosts") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = DedicatedHost, + KeyName = "hostName", + SegmentName = "hosts", + NamePattern = "" + >; /** * SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute SKUs for a list of possible values. @@ -49,7 +46,7 @@ interface DedicatedHosts { get is ArmResourceRead< DedicatedHost, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated host. 'UserData' is not supported for dedicated host. @@ -67,12 +64,15 @@ interface DedicatedHosts { /** * Update a dedicated host . */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** * Delete a dedicated host. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -115,6 +115,7 @@ interface DedicatedHosts { ): ArmResponse | ErrorResponse; } +@@doc(DedicatedHost.name, "The name of the dedicated host."); @@encodedName(DedicatedHosts.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp index cdd970b426..a5589e9cba 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model DedicatedHostGroup extends Resource { - /** - * The name of the dedicated host group. - */ - @path - @key("hostGroupName") - @segment("hostGroups") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = DedicatedHostGroup, + KeyName = "hostGroupName", + SegmentName = "hostGroups", + NamePattern = "" + >; /** * Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. @@ -47,7 +44,7 @@ interface DedicatedHostGroups { get is ArmResourceRead< DedicatedHostGroup, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated hosts under the dedicated host group. 'UserData' is not supported for dedicated host group. @@ -65,12 +62,13 @@ interface DedicatedHostGroups { /** * Update an dedicated host group. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync; /** * Delete a dedicated host group. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -86,6 +84,7 @@ interface DedicatedHostGroups { listBySubscription is ArmListBySubscription; } +@@doc(DedicatedHostGroup.name, "The name of the dedicated host group."); @@encodedName(DedicatedHostGroups.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp index 229c5c2c2d..2d1a3d49b9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model Disk extends Resource { - /** - * The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - */ - @path - @key("diskName") - @segment("disks") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = Disk, + KeyName = "diskName", + SegmentName = "disks", + NamePattern = "" + >; /** * A relative URI containing the ID of the VM that has the disk attached. @@ -76,12 +73,15 @@ interface Disks { /** * Updates (patches) a disk. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** * Deletes a disk. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -107,6 +107,9 @@ interface Disks { revokeAccess is ArmResourceActionAsync; } +@@doc(Disk.name, + "The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters." +); @@encodedName(Disks.createOrUpdate::parameters.resource, "application/json", "disk" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp index 6cd0c78c14..7cabeefca6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model DiskAccess extends Resource { - /** - * The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - */ - @path - @key("diskAccessName") - @segment("diskAccesses") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = DiskAccess, + KeyName = "diskAccessName", + SegmentName = "diskAccesses", + NamePattern = "" + >; /** * The extended location where the disk access will be created. Extended location cannot be changed. @@ -51,12 +48,15 @@ interface DiskAccesses { /** * Updates (patches) a disk access resource. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** * Deletes a disk access resource. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -90,6 +90,9 @@ interface DiskAccesses { ): ArmResponse | ErrorResponse; } +@@doc(DiskAccess.name, + "The name of the disk access resource that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters." +); @@encodedName(DiskAccesses.createOrUpdate::parameters.resource, "application/json", "diskAccess" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp index 622a53ed63..4f124857db 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model DiskEncryptionSet extends Resource { - /** - * The name of the disk encryption set that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. - */ - @path - @key("diskEncryptionSetName") - @segment("diskEncryptionSets") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = DiskEncryptionSet, + KeyName = "diskEncryptionSetName", + SegmentName = "diskEncryptionSets", + NamePattern = "" + >; /** * The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks. @@ -51,12 +48,15 @@ interface DiskEncryptionSets { /** * Updates (patches) a disk encryption set. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** * Deletes a disk encryption set. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -90,6 +90,9 @@ interface DiskEncryptionSets { ): ArmResponse | ErrorResponse; } +@@doc(DiskEncryptionSet.name, + "The name of the disk encryption set that is being created. The name can't be changed after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters." +); @@encodedName(DiskEncryptionSets.createOrUpdate::parameters.resource, "application/json", "diskEncryptionSet" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp index ac556b9f75..7d4431f97c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp @@ -7,7 +7,6 @@ import "./RestorePoint.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(RestorePoint) @includeInapplicableMetadataInPayload(false) model DiskRestorePoint extends ProxyOnlyResource { - /** - * The name of the disk restore point created. - */ - @path - @key("diskRestorePointName") - @segment("diskRestorePoints") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = DiskRestorePoint, + KeyName = "diskRestorePointName", + SegmentName = "diskRestorePoints", + NamePattern = "" + >; /** * Properties of an incremental disk restore point @@ -46,7 +43,7 @@ interface DiskRestorePoints { get is ArmResourceRead< DiskRestorePoint, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the restore point collection that the disk restore point belongs. @@ -64,7 +61,7 @@ interface DiskRestorePoints { listByRestorePoint is ArmResourceListByParent< DiskRestorePoint, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the restore point collection that the disk restore point belongs. @@ -84,7 +81,7 @@ interface DiskRestorePoints { GrantAccessData, AccessUri, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the restore point collection that the disk restore point belongs. @@ -104,7 +101,7 @@ interface DiskRestorePoints { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the restore point collection that the disk restore point belongs. @@ -115,6 +112,7 @@ interface DiskRestorePoints { >; } +@@doc(DiskRestorePoint.name, "The name of the disk restore point created."); @@encodedName(DiskRestorePoints.grantAccess::parameters.body, "application/json", "grantAccessData" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp index 2e465110fd..7817ee0fb3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model Gallery extends Resource { - /** - * The name of the Shared Image Gallery. - */ - @path - @key("galleryName") - @segment("galleries") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = Gallery, + KeyName = "galleryName", + SegmentName = "galleries", + NamePattern = "" + >; /** * Describes the properties of a Shared Image Gallery. @@ -42,7 +39,7 @@ interface Galleries { get is ArmResourceRead< Gallery, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The select expression to apply on the operation. @@ -66,12 +63,15 @@ interface Galleries { /** * Update a Shared Image Gallery. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** * Delete a Shared Image Gallery. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -94,6 +94,7 @@ interface Galleries { update is ArmResourceActionAsync; } +@@doc(Gallery.name, "The name of the Shared Image Gallery."); @@encodedName(Galleries.createOrUpdate::parameters.resource, "application/json", "gallery" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp index 53e9211d53..982fa80fd9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp @@ -7,7 +7,6 @@ import "./Gallery.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(Gallery) @includeInapplicableMetadataInPayload(false) model GalleryApplication extends Resource { - /** - * The name of the gallery Application Definition to be retrieved. - */ - @path - @key("galleryApplicationName") - @segment("applications") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = GalleryApplication, + KeyName = "galleryApplicationName", + SegmentName = "applications", + NamePattern = "" + >; /** * Describes the properties of a gallery Application Definition. @@ -51,12 +48,15 @@ interface GalleryApplications { /** * Update a gallery Application Definition. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** * Delete a gallery Application. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -67,6 +67,9 @@ interface GalleryApplications { listByGallery is ArmResourceListByParent; } +@@doc(GalleryApplication.name, + "The name of the gallery Application Definition to be retrieved." +); @@encodedName(GalleryApplications.createOrUpdate::parameters.resource, "application/json", "galleryApplication" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp index 8fa0b9ca67..c01275617b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp @@ -7,7 +7,6 @@ import "./GalleryApplication.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(GalleryApplication) @includeInapplicableMetadataInPayload(false) model GalleryApplicationVersion extends Resource { - /** - * The name of the gallery Application Version to be retrieved. - */ - @path - @key("galleryApplicationVersionName") - @segment("versions") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = GalleryApplicationVersion, + KeyName = "galleryApplicationVersionName", + SegmentName = "versions", + NamePattern = "" + >; /** * Describes the properties of a gallery image version. @@ -44,7 +41,7 @@ interface GalleryApplicationVersions { get is ArmResourceRead< GalleryApplicationVersion, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The expand expression to apply on the operation. @@ -62,7 +59,7 @@ interface GalleryApplicationVersions { /** * Update a gallery Application Version. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync< GalleryApplicationVersion, GalleryApplicationVersionUpdate @@ -71,6 +68,9 @@ interface GalleryApplicationVersions { /** * Delete a gallery Application Version. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -81,6 +81,9 @@ interface GalleryApplicationVersions { listByGalleryApplication is ArmResourceListByParent; } +@@doc(GalleryApplicationVersion.name, + "The name of the gallery Application Version to be retrieved." +); @@encodedName(GalleryApplicationVersions.createOrUpdate::parameters.resource, "application/json", "galleryApplicationVersion" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp index 874ed3c1e3..7bf5c6c00a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp @@ -7,7 +7,6 @@ import "./Gallery.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(Gallery) @includeInapplicableMetadataInPayload(false) model GalleryImage extends Resource { - /** - * The name of the gallery image definition to be retrieved. - */ - @path - @key("galleryImageName") - @segment("images") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = GalleryImage, + KeyName = "galleryImageName", + SegmentName = "images", + NamePattern = "" + >; /** * Describes the properties of a gallery image definition. @@ -51,12 +48,15 @@ interface GalleryImages { /** * Update a gallery image definition. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** * Delete a gallery image. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -67,6 +67,9 @@ interface GalleryImages { listByGallery is ArmResourceListByParent; } +@@doc(GalleryImage.name, + "The name of the gallery image definition to be retrieved." +); @@encodedName(GalleryImages.createOrUpdate::parameters.resource, "application/json", "galleryImage" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp index aff2656ca8..f0c2c5d71e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp @@ -7,7 +7,6 @@ import "./GalleryImage.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(GalleryImage) @includeInapplicableMetadataInPayload(false) model GalleryImageVersion extends Resource { - /** - * The name of the gallery image version to be retrieved. - */ - @path - @key("galleryImageVersionName") - @segment("versions") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = GalleryImageVersion, + KeyName = "galleryImageVersionName", + SegmentName = "versions", + NamePattern = "" + >; /** * Describes the properties of a gallery image version. @@ -44,7 +41,7 @@ interface GalleryImageVersions { get is ArmResourceRead< GalleryImageVersion, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The expand expression to apply on the operation. @@ -62,12 +59,15 @@ interface GalleryImageVersions { /** * Update a gallery image version. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** * Delete a gallery image version. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -78,6 +78,9 @@ interface GalleryImageVersions { listByGalleryImage is ArmResourceListByParent; } +@@doc(GalleryImageVersion.name, + "The name of the gallery image version to be retrieved." +); @@encodedName(GalleryImageVersions.createOrUpdate::parameters.resource, "application/json", "galleryImageVersion" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp index d26977a281..49e9e1c037 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model Image extends Resource { - /** - * The name of the image. - */ - @path - @key("imageName") - @segment("images") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = Image, + KeyName = "imageName", + SegmentName = "images", + NamePattern = "" + >; /** * The extended location of the Image. @@ -47,7 +44,7 @@ interface Images { get is ArmResourceRead< Image, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The expand expression to apply on the operation. @@ -65,12 +62,15 @@ interface Images { /** * Update an image. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** * Deletes an Image. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -86,6 +86,7 @@ interface Images { list is ArmListBySubscription; } +@@doc(Image.name, "The name of the image."); @@encodedName(Images.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp index e189be72f3..3a160028b6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(SubscriptionLocationResource) @includeInapplicableMetadataInPayload(false) model OSFamily { - /** - * Name of the OS family. - */ - @path - @key("osFamilyName") - @segment("cloudServiceOsFamilies") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = OSFamily, + KeyName = "osFamilyName", + SegmentName = "cloudServiceOsFamilies", + NamePattern = "" + >; /** * Resource Id. @@ -70,3 +67,5 @@ interface OSFamilies { @operationId("CloudServiceOperatingSystems_ListOSFamilies") listOSFamilies is ArmResourceListByParent; } + +@@doc(OSFamily.name, "Name of the OS family."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp index ea3c867394..a9ed67810f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(SubscriptionLocationResource) @includeInapplicableMetadataInPayload(false) model OSVersion { - /** - * Name of the OS version. - */ - @path - @key("osVersionName") - @segment("cloudServiceOsVersions") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = OSVersion, + KeyName = "osVersionName", + SegmentName = "cloudServiceOsVersions", + NamePattern = "" + >; /** * Resource Id. @@ -70,3 +67,5 @@ interface OSVersions { @operationId("CloudServiceOperatingSystems_ListOSVersions") listOSVersions is ArmResourceListByParent; } + +@@doc(OSVersion.name, "Name of the OS version."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp index cfd4dc89d7..825860245d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp @@ -7,7 +7,6 @@ import "./DiskAccess.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(DiskAccess) @includeInapplicableMetadataInPayload(false) model PrivateEndpointConnection { - /** - * The name of the private endpoint connection. - */ - @path - @key("privateEndpointConnectionName") - @segment("privateEndpointConnections") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = PrivateEndpointConnection, + KeyName = "privateEndpointConnectionName", + SegmentName = "privateEndpointConnections", + NamePattern = "" + >; /** * private endpoint connection Id @@ -68,6 +65,9 @@ interface PrivateEndpointConnections { * Deletes a private endpoint connection under a disk access resource. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("DiskAccesses_DeleteAPrivateEndpointConnection") deleteAPrivateEndpointConnection is ArmResourceDeleteAsync; @@ -79,6 +79,9 @@ interface PrivateEndpointConnections { listPrivateEndpointConnections is ArmResourceListByParent; } +@@doc(PrivateEndpointConnection.name, + "The name of the private endpoint connection." +); @@encodedName(PrivateEndpointConnections.updateAPrivateEndpointConnection::parameters.resource, "application/json", "privateEndpointConnection" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp index 2d9450473a..3133eb0794 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model ProximityPlacementGroup extends Resource { - /** - * The name of the proximity placement group. - */ - @path - @key("proximityPlacementGroupName") - @segment("proximityPlacementGroups") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = ProximityPlacementGroup, + KeyName = "proximityPlacementGroupName", + SegmentName = "proximityPlacementGroups", + NamePattern = "" + >; /** * Specifies the Availability Zone where virtual machine, virtual machine scale set or availability set associated with the proximity placement group can be created. @@ -47,7 +44,7 @@ interface ProximityPlacementGroups { get is ArmResourceRead< ProximityPlacementGroup, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * includeColocationStatus=true enables fetching the colocation status of all the resources in the proximity placement group. @@ -65,7 +62,7 @@ interface ProximityPlacementGroups { /** * Update a proximity placement group. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync< ProximityPlacementGroup, ProximityPlacementGroupUpdate @@ -74,6 +71,7 @@ interface ProximityPlacementGroups { /** * Delete a proximity placement group. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -89,6 +87,9 @@ interface ProximityPlacementGroups { listBySubscription is ArmListBySubscription; } +@@doc(ProximityPlacementGroup.name, + "The name of the proximity placement group." +); @@encodedName(ProximityPlacementGroups.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp index 9af5bc6a3e..6f3a9e3362 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp @@ -7,7 +7,6 @@ import "./RestorePointCollection.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(RestorePointCollection) @includeInapplicableMetadataInPayload(false) model RestorePoint extends ProxyResource { - /** - * The name of the restore point. - */ - @path - @key("restorePointName") - @segment("restorePoints") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = RestorePoint, + KeyName = "restorePointName", + SegmentName = "restorePoints", + NamePattern = "" + >; /** * The restore point properties. @@ -44,7 +41,7 @@ interface RestorePoints { get is ArmResourceRead< RestorePoint, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the restore point collection. @@ -66,7 +63,7 @@ interface RestorePoints { create is ArmResourceCreateOrReplaceAsync< RestorePoint, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the restore point collection. @@ -79,10 +76,13 @@ interface RestorePoints { /** * The operation to delete the restore point. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync< RestorePoint, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the Restore Point Collection. @@ -93,6 +93,7 @@ interface RestorePoints { >; } +@@doc(RestorePoint.name, "The name of the restore point."); @@encodedName(RestorePoints.create::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp index 5b37ad082a..a28f449913 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model RestorePointCollection extends Resource { - /** - * The name of the restore point collection. - */ - @path - @key("restorePointCollectionName") - @segment("restorePointCollections") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = RestorePointCollection, + KeyName = "restorePointCollectionName", + SegmentName = "restorePointCollections", + NamePattern = "" + >; /** * The restore point collection properties. @@ -42,7 +39,7 @@ interface RestorePointCollections { get is ArmResourceRead< RestorePointCollection, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the restore point collection. @@ -64,7 +61,7 @@ interface RestorePointCollections { createOrUpdate is ArmResourceCreateOrReplaceSync< RestorePointCollection, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the restore point collection. @@ -77,12 +74,12 @@ interface RestorePointCollections { /** * The operation to update the restore point collection. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync< RestorePointCollection, RestorePointCollectionUpdate, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the restore point collection. @@ -95,10 +92,13 @@ interface RestorePointCollections { /** * The operation to delete the restore point collection. This operation will also delete all the contained restore points. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync< RestorePointCollection, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the Restore Point Collection. @@ -121,6 +121,7 @@ interface RestorePointCollections { listAll is ArmListBySubscription; } +@@doc(RestorePointCollection.name, "The name of the restore point collection."); @@encodedName(RestorePointCollections.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp index baa2e2523d..acbcf7ef4b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp @@ -7,7 +7,6 @@ import "./CloudService.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(CloudService) @includeInapplicableMetadataInPayload(false) model RoleInstance { - /** - * Name of the role instance. - */ - @path - @key("roleInstanceName") - @segment("roleInstances") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = RoleInstance, + KeyName = "roleInstanceName", + SegmentName = "roleInstances", + NamePattern = "" + >; /** * Resource Id @@ -50,6 +47,7 @@ model RoleInstance { /** * Resource tags. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read") tags?: Record; @@ -75,7 +73,7 @@ interface RoleInstances { get is ArmResourceRead< RoleInstance, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The expand expression to apply to the operation. 'UserData' is not supported for cloud services. @@ -89,6 +87,9 @@ interface RoleInstances { * Deletes a role instance from a cloud service. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("CloudServiceRoleInstances_Delete") delete is ArmResourceDeleteAsync; @@ -100,7 +101,7 @@ interface RoleInstances { list is ArmResourceListByParent< RoleInstance, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The expand expression to apply to the operation. 'UserData' is not supported for cloud services. @@ -193,3 +194,5 @@ interface RoleInstances { accept: "application/x-rdp", ): ArmResponse | ErrorResponse; } + +@@doc(RoleInstance.name, "Name of the role instance."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp index 6609fab595..385a3f8295 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp @@ -7,7 +7,6 @@ import "./VirtualMachineScaleSet.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -21,10 +20,12 @@ namespace Microsoft.Compute; @parentResource(VirtualMachineScaleSet) @includeInapplicableMetadataInPayload(false) model RollingUpgradeStatusInfo extends Resource { - @key("rollingUpgrade") - @segment("rollingUpgrades") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = RollingUpgradeStatusInfo, + KeyName = "rollingUpgrade", + SegmentName = "rollingUpgrades", + NamePattern = "" + >; /** * The status of the latest virtual machine scale set rolling upgrade. @@ -43,7 +44,7 @@ interface RollingUpgradeStatusInfos { getLatest is ArmResourceRead< RollingUpgradeStatusInfo, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -53,3 +54,5 @@ interface RollingUpgradeStatusInfos { } >; } + +@@doc(RollingUpgradeStatusInfo.name, ""); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp index c535220ac5..bbbf968267 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -21,14 +20,12 @@ namespace Microsoft.Compute; @parentResource(SubscriptionLocationResource) @includeInapplicableMetadataInPayload(false) model SharedGallery extends PirSharedGalleryResource { - /** - * The unique name of the Shared Gallery. - */ - @path - @key("galleryUniqueName") - @segment("sharedGalleries") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = SharedGallery, + KeyName = "galleryUniqueName", + SegmentName = "sharedGalleries", + NamePattern = "" + >; @extension("x-ms-client-flatten", true) @visibility("read,create") @@ -50,7 +47,7 @@ interface SharedGalleries { list is ArmResourceListByParent< SharedGallery, { - ...SubscriptionBaseParameters; + ...Azure.ResourceManager.Foundations.SubscriptionBaseParameters; /** * The query parameter to decide what shared galleries to fetch when doing listing operations. @@ -60,3 +57,5 @@ interface SharedGalleries { } >; } + +@@doc(SharedGallery.name, "The unique name of the Shared Gallery."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp index ca0e7ee317..fb3b34cc3f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp @@ -7,7 +7,6 @@ import "./SharedGallery.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(SharedGallery) @includeInapplicableMetadataInPayload(false) model SharedGalleryImage extends PirSharedGalleryResource { - /** - * The name of the Shared Gallery Image Definition from which the Image Versions are to be listed. - */ - @path - @key("galleryImageName") - @segment("images") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = SharedGalleryImage, + KeyName = "galleryImageName", + SegmentName = "images", + NamePattern = "" + >; /** * Describes the properties of a gallery image definition. @@ -51,7 +48,7 @@ interface SharedGalleryImages { list is ArmResourceListByParent< SharedGalleryImage, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The query parameter to decide what shared galleries to fetch when doing listing operations. @@ -61,3 +58,7 @@ interface SharedGalleryImages { } >; } + +@@doc(SharedGalleryImage.name, + "The name of the Shared Gallery Image Definition from which the Image Versions are to be listed." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp index 2697efa070..e1d5af2fd0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp @@ -7,7 +7,6 @@ import "./SharedGalleryImage.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(SharedGalleryImage) @includeInapplicableMetadataInPayload(false) model SharedGalleryImageVersion extends PirSharedGalleryResource { - /** - * The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .. - */ - @path - @key("galleryImageVersionName") - @segment("versions") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = SharedGalleryImageVersion, + KeyName = "galleryImageVersionName", + SegmentName = "versions", + NamePattern = "" + >; /** * Describes the properties of a gallery image version. @@ -51,7 +48,7 @@ interface SharedGalleryImageVersions { list is ArmResourceListByParent< SharedGalleryImageVersion, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The query parameter to decide what shared galleries to fetch when doing listing operations. @@ -61,3 +58,7 @@ interface SharedGalleryImageVersions { } >; } + +@@doc(SharedGalleryImageVersion.name, + "The name of the gallery image version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: .." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp index f6ff9d07c7..b5d84b9cff 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model Snapshot extends Resource { - /** - * The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters. - */ - @path - @key("snapshotName") - @segment("snapshots") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = Snapshot, + KeyName = "snapshotName", + SegmentName = "snapshots", + NamePattern = "" + >; /** * Unused. Always Null. @@ -65,12 +62,15 @@ interface Snapshots { /** * Updates (patches) a snapshot. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** * Deletes a snapshot. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -96,6 +96,9 @@ interface Snapshots { revokeAccess is ArmResourceActionAsync; } +@@doc(Snapshot.name, + "The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80 characters." +); @@encodedName(Snapshots.createOrUpdate::parameters.resource, "application/json", "snapshot" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp index 5f08ec3504..ccd902cf8f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model SshPublicKeyResource extends Resource { - /** - * The name of the SSH public key. - */ - @path - @key("sshPublicKeyName") - @segment("sshPublicKeys") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = SshPublicKeyResource, + KeyName = "sshPublicKeyName", + SegmentName = "sshPublicKeys", + NamePattern = "" + >; /** * Properties of the SSH public key. @@ -54,7 +51,7 @@ interface SshPublicKeyResources { * Updates a new SSH public key resource. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("SshPublicKeys_Update") update is ArmCustomPatchSync< SshPublicKeyResource, @@ -65,6 +62,7 @@ interface SshPublicKeyResources { * Delete an SSH public key. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("SshPublicKeys_Delete") delete is ArmResourceDeleteSync; @@ -94,6 +92,7 @@ interface SshPublicKeyResources { >; } +@@doc(SshPublicKeyResource.name, "The name of the SSH public key."); @@encodedName(SshPublicKeyResources.create::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp index 3d74286e6e..8a840751de 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model VirtualMachine extends Resource { - /** - * The name of the virtual machine. - */ - @path - @key("vmName") - @segment("virtualMachines") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = VirtualMachine, + KeyName = "vmName", + SegmentName = "virtualMachines", + NamePattern = "" + >; /** * Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. @@ -68,7 +65,7 @@ interface VirtualMachines { get is ArmResourceRead< VirtualMachine, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the virtual machine that is managed by the platform and can change outside of control plane operations. 'UserData' retrieves the UserData property as part of the VM model view that was provided by the user during the VM Create/Update operation. @@ -86,16 +83,19 @@ interface VirtualMachines { /** * The operation to update a virtual machine. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** * The operation to delete a virtual machine. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync< VirtualMachine, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Optional parameter to force delete virtual machines. @@ -113,7 +113,7 @@ interface VirtualMachines { list is ArmResourceListByParent< VirtualMachine, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The system query option to filter VMs returned in the response. Allowed value is 'virtualMachineScaleSet/id' eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}' @@ -136,7 +136,7 @@ interface VirtualMachines { VirtualMachine, LocationScope, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; ...LocationResourceParameter; } >; @@ -168,7 +168,7 @@ interface VirtualMachines { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Optional parameter to hibernate a virtual machine. (Feature in Preview) @@ -191,7 +191,7 @@ interface VirtualMachines { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The parameter to request non-graceful VM shutdown. True value for this flag indicates non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not specified @@ -238,7 +238,7 @@ interface VirtualMachines { void, RetrieveBootDiagnosticsDataResult, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Expiration duration in minutes for the SAS URIs with a value between 1 to 1440 minutes. **Note:** If not specified, SAS URIs will be generated with a default expiration duration of 120 minutes. @@ -324,6 +324,7 @@ interface VirtualMachines { ): ArmResponse | ErrorResponse; } +@@doc(VirtualMachine.name, "The name of the virtual machine."); @@encodedName(VirtualMachines.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp index b7563ad163..0d5d5c8265 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp @@ -7,7 +7,6 @@ import "./VirtualMachine.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(VirtualMachine) @includeInapplicableMetadataInPayload(false) model VirtualMachineExtension extends ResourceWithOptionalLocation { - /** - * The name of the virtual machine extension. - */ - @path - @key("vmExtensionName") - @segment("extensions") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = VirtualMachineExtension, + KeyName = "vmExtensionName", + SegmentName = "extensions", + NamePattern = "" + >; /** * Describes the properties of a Virtual Machine Extension. @@ -44,7 +41,7 @@ interface VirtualMachineExtensions { get is ArmResourceRead< VirtualMachineExtension, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The expand expression to apply on the operation. @@ -62,7 +59,7 @@ interface VirtualMachineExtensions { /** * The operation to update the extension. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync< VirtualMachineExtension, VirtualMachineExtensionUpdate @@ -71,6 +68,9 @@ interface VirtualMachineExtensions { /** * The operation to delete the extension. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -81,7 +81,7 @@ interface VirtualMachineExtensions { list is ArmResourceListByParent< VirtualMachineExtension, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The expand expression to apply on the operation. @@ -92,6 +92,9 @@ interface VirtualMachineExtensions { >; } +@@doc(VirtualMachineExtension.name, + "The name of the virtual machine extension." +); @@encodedName(VirtualMachineExtensions.createOrUpdate::parameters.resource, "application/json", "extensionParameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp index 22cca480ab..9a7d8f7cd0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,11 +19,12 @@ namespace Microsoft.Compute; @parentResource(SubscriptionLocationResource) @includeInapplicableMetadataInPayload(false) model VirtualMachineExtensionImage extends Resource { - @path - @key("version") - @segment("versions") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = VirtualMachineExtensionImage, + KeyName = "version", + SegmentName = "versions", + NamePattern = "" + >; /** * Describes the properties of a Virtual Machine Extension Image. @@ -47,3 +47,5 @@ interface VirtualMachineExtensionImages { @operationId("VirtualMachineExtensionImages_ListTypes") listTypes is ArmResourceListByParent; } + +@@doc(VirtualMachineExtensionImage.name, ""); diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp index 738ecf6bce..a2365897f9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp @@ -7,7 +7,6 @@ import "./VirtualMachine.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(VirtualMachine) @includeInapplicableMetadataInPayload(false) model VirtualMachineRunCommand extends Resource { - /** - * The name of the virtual machine run command. - */ - @path - @key("runCommandName") - @segment("runCommands") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = VirtualMachineRunCommand, + KeyName = "runCommandName", + SegmentName = "runCommands", + NamePattern = "" + >; /** * Describes the properties of a Virtual Machine run command. @@ -44,7 +41,7 @@ interface VirtualMachineRunCommands { getByVirtualMachine is ArmResourceRead< VirtualMachineRunCommand, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The expand expression to apply on the operation. @@ -62,7 +59,7 @@ interface VirtualMachineRunCommands { /** * The operation to update the run command. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync< VirtualMachineRunCommand, VirtualMachineRunCommandUpdate @@ -71,6 +68,9 @@ interface VirtualMachineRunCommands { /** * The operation to delete the run command. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -81,7 +81,7 @@ interface VirtualMachineRunCommands { listByVirtualMachine is ArmResourceListByParent< VirtualMachineRunCommand, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The expand expression to apply on the operation. @@ -98,12 +98,15 @@ interface VirtualMachineRunCommands { VirtualMachineRunCommand, LocationScope, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; ...LocationResourceParameter; } >; } +@@doc(VirtualMachineRunCommand.name, + "The name of the virtual machine run command." +); @@encodedName(VirtualMachineRunCommands.createOrUpdate::parameters.resource, "application/json", "runCommand" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp index 0b0ed92da1..24e35c9ec8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Microsoft.Compute; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model VirtualMachineScaleSet extends Resource { - /** - * The name of the VM scale set. - */ - @path - @key("vmScaleSetName") - @segment("virtualMachineScaleSets") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = VirtualMachineScaleSet, + KeyName = "vmScaleSetName", + SegmentName = "virtualMachineScaleSets", + NamePattern = "" + >; /** * The virtual machine scale set sku. @@ -67,7 +64,7 @@ interface VirtualMachineScaleSets { get is ArmResourceRead< VirtualMachineScaleSet, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -89,7 +86,7 @@ interface VirtualMachineScaleSets { createOrUpdate is ArmResourceCreateOrReplaceAsync< VirtualMachineScaleSet, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set to create or update. @@ -102,12 +99,12 @@ interface VirtualMachineScaleSets { /** * Update a VM scale set. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync< VirtualMachineScaleSet, VirtualMachineScaleSetUpdate, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set to create or update. @@ -120,10 +117,13 @@ interface VirtualMachineScaleSets { /** * Deletes a VM scale set. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync< VirtualMachineScaleSet, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -153,7 +153,7 @@ interface VirtualMachineScaleSets { VirtualMachineScaleSet, LocationScope, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; ...LocationResourceParameter; } >; @@ -171,7 +171,7 @@ interface VirtualMachineScaleSets { VirtualMachineScaleSetVMInstanceIDs, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -195,7 +195,7 @@ interface VirtualMachineScaleSets { VirtualMachineScaleSetVMInstanceRequiredIDs, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -219,7 +219,7 @@ interface VirtualMachineScaleSets { VirtualMachineScaleSetVMInstanceIDs, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -243,7 +243,7 @@ interface VirtualMachineScaleSets { VirtualMachineScaleSetVMInstanceIDs, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -261,7 +261,7 @@ interface VirtualMachineScaleSets { VirtualMachineScaleSetVMInstanceIDs, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -279,7 +279,7 @@ interface VirtualMachineScaleSets { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -297,7 +297,7 @@ interface VirtualMachineScaleSets { VirtualMachineScaleSetVMInstanceIDs, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -315,7 +315,7 @@ interface VirtualMachineScaleSets { VirtualMachineScaleSetVMInstanceIDs, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -333,7 +333,7 @@ interface VirtualMachineScaleSets { VirtualMachineScaleSetVMInstanceRequiredIDs, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -351,7 +351,7 @@ interface VirtualMachineScaleSets { VirtualMachineScaleSetReimageParameters, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -369,7 +369,7 @@ interface VirtualMachineScaleSets { VirtualMachineScaleSetVMInstanceIDs, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -387,7 +387,7 @@ interface VirtualMachineScaleSets { void, RecoveryWalkResponse, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -423,7 +423,7 @@ interface VirtualMachineScaleSets { VMScaleSetConvertToSinglePlacementGroupInput, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the virtual machine scale set to create or update. @@ -441,7 +441,7 @@ interface VirtualMachineScaleSets { OrchestrationServiceStateInput, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the virtual machine scale set to create or update. @@ -461,7 +461,7 @@ interface VirtualMachineScaleSets { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -481,7 +481,7 @@ interface VirtualMachineScaleSets { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -501,7 +501,7 @@ interface VirtualMachineScaleSets { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -571,6 +571,7 @@ interface VirtualMachineScaleSets { ): ArmResponse | ErrorResponse; } +@@doc(VirtualMachineScaleSet.name, "The name of the VM scale set."); @@encodedName(VirtualMachineScaleSets.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp index 1fbe282a7d..8900700d2f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp @@ -7,7 +7,6 @@ import "./VirtualMachineScaleSet.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(VirtualMachineScaleSet) @includeInapplicableMetadataInPayload(false) model VirtualMachineScaleSetExtension extends SubResourceReadOnly { - /** - * The name of the VM scale set extension. - */ - @path - @key("vmssExtensionName") - @segment("extensions") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = VirtualMachineScaleSetExtension, + KeyName = "vmssExtensionName", + SegmentName = "extensions", + NamePattern = "" + >; /** * Resource type @@ -50,7 +47,7 @@ interface VirtualMachineScaleSetExtensions { get is ArmResourceRead< VirtualMachineScaleSetExtension, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set containing the extension. @@ -72,7 +69,7 @@ interface VirtualMachineScaleSetExtensions { createOrUpdate is ArmResourceCreateOrReplaceAsync< VirtualMachineScaleSetExtension, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set where the extension should be create or updated. @@ -85,12 +82,12 @@ interface VirtualMachineScaleSetExtensions { /** * The operation to update an extension. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync< VirtualMachineScaleSetExtension, VirtualMachineScaleSetExtensionUpdate, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set where the extension should be updated. @@ -103,10 +100,13 @@ interface VirtualMachineScaleSetExtensions { /** * The operation to delete the extension. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync< VirtualMachineScaleSetExtension, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set where the extension should be deleted. @@ -124,7 +124,7 @@ interface VirtualMachineScaleSetExtensions { list is ArmResourceListByParent< VirtualMachineScaleSetExtension, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set containing the extension. @@ -135,6 +135,9 @@ interface VirtualMachineScaleSetExtensions { >; } +@@doc(VirtualMachineScaleSetExtension.name, + "The name of the VM scale set extension." +); @@encodedName(VirtualMachineScaleSetExtensions.createOrUpdate::parameters.resource, "application/json", "extensionParameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp index 48e7e669de..fd96c022b3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp @@ -7,7 +7,6 @@ import "./VirtualMachineScaleSet.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(VirtualMachineScaleSet) @includeInapplicableMetadataInPayload(false) model VirtualMachineScaleSetVM extends Resource { - /** - * The instance ID of the virtual machine. - */ - @path - @key("instanceId") - @segment("virtualMachines") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = VirtualMachineScaleSetVM, + KeyName = "instanceId", + SegmentName = "virtualMachines", + NamePattern = "" + >; /** * The virtual machine instance ID. @@ -80,7 +77,7 @@ interface VirtualMachineScaleSetVMS { get is ArmResourceRead< VirtualMachineScaleSetVM, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -104,7 +101,7 @@ interface VirtualMachineScaleSetVMS { update is ArmResourceCreateOrReplaceAsync< VirtualMachineScaleSetVM, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set where the extension should be create or updated. @@ -118,11 +115,14 @@ interface VirtualMachineScaleSetVMS { * Deletes a virtual machine from a VM scale set. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("VirtualMachineScaleSetVMs_Delete") delete is ArmResourceDeleteAsync< VirtualMachineScaleSetVM, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -146,7 +146,7 @@ interface VirtualMachineScaleSetVMS { list is ArmResourceListByParent< VirtualMachineScaleSetVM, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The filter to apply to the operation. Allowed values are 'startswith(instanceView/statuses/code, 'PowerState') eq true', 'properties/latestModelApplied eq true', 'properties/latestModelApplied eq false'. @@ -178,7 +178,7 @@ interface VirtualMachineScaleSetVMS { VirtualMachineScaleSetVMReimageParameters, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -198,7 +198,7 @@ interface VirtualMachineScaleSetVMS { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -218,7 +218,7 @@ interface VirtualMachineScaleSetVMS { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -238,7 +238,7 @@ interface VirtualMachineScaleSetVMS { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -264,7 +264,7 @@ interface VirtualMachineScaleSetVMS { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -284,7 +284,7 @@ interface VirtualMachineScaleSetVMS { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -304,7 +304,7 @@ interface VirtualMachineScaleSetVMS { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -324,7 +324,7 @@ interface VirtualMachineScaleSetVMS { void, RetrieveBootDiagnosticsDataResult, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -350,7 +350,7 @@ interface VirtualMachineScaleSetVMS { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -369,7 +369,7 @@ interface VirtualMachineScaleSetVMS { VirtualMachineScaleSetVM, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -389,7 +389,7 @@ interface VirtualMachineScaleSetVMS { RunCommandInput, RunCommandResult, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -427,6 +427,7 @@ interface VirtualMachineScaleSetVMS { ): ArmResponse | ErrorResponse; } +@@doc(VirtualMachineScaleSetVM.name, "The instance ID of the virtual machine."); @@encodedName(VirtualMachineScaleSetVMS.update::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp index 81a36cdc51..0fd06f4123 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp @@ -7,7 +7,6 @@ import "./VirtualMachineScaleSetVM.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Microsoft.Compute; @parentResource(VirtualMachineScaleSetVM) @includeInapplicableMetadataInPayload(false) model VirtualMachineScaleSetVMExtension extends SubResourceReadOnly { - /** - * The name of the virtual machine extension. - */ - @path - @key("vmExtensionName") - @segment("extensions") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = VirtualMachineScaleSetVMExtension, + KeyName = "vmExtensionName", + SegmentName = "extensions", + NamePattern = "" + >; /** * Resource type @@ -58,7 +55,7 @@ interface VirtualMachineScaleSetVMExtensions { get is ArmResourceRead< VirtualMachineScaleSetVMExtension, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -82,7 +79,7 @@ interface VirtualMachineScaleSetVMExtensions { createOrUpdate is ArmResourceCreateOrReplaceAsync< VirtualMachineScaleSetVMExtension, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -96,13 +93,13 @@ interface VirtualMachineScaleSetVMExtensions { * The operation to update the VMSS VM extension. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("VirtualMachineScaleSetVMExtensions_Update") update is ArmCustomPatchAsync< VirtualMachineScaleSetVMExtension, VirtualMachineScaleSetVMExtensionUpdate, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -116,11 +113,14 @@ interface VirtualMachineScaleSetVMExtensions { * The operation to delete the VMSS VM extension. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("VirtualMachineScaleSetVMExtensions_Delete") delete is ArmResourceDeleteAsync< VirtualMachineScaleSetVMExtension, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -138,7 +138,7 @@ interface VirtualMachineScaleSetVMExtensions { list is ArmResourceListByParent< VirtualMachineScaleSetVMExtension, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The name of the VM scale set. @@ -155,6 +155,9 @@ interface VirtualMachineScaleSetVMExtensions { >; } +@@doc(VirtualMachineScaleSetVMExtension.name, + "The name of the virtual machine extension." +); @@encodedName(VirtualMachineScaleSetVMExtensions.createOrUpdate::parameters.resource, "application/json", "extensionParameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp index 8f45dd5d75..f4276cffcb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp @@ -3315,6 +3315,7 @@ model ResourceWithOptionalLocation { /** * Resource tags */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -3403,6 +3404,7 @@ model VirtualMachineScaleSetIdentity { /** * The list of user identities associated with the virtual machine scale set. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" userAssignedIdentities?: Record; } @@ -3465,6 +3467,7 @@ model Resource { /** * Resource tags */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -3902,6 +3905,7 @@ model UpdateResource { /** * Resource tags */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -5407,6 +5411,7 @@ model VirtualMachineIdentity { /** * The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" userAssignedIdentities?: Record; } @@ -6395,6 +6400,7 @@ model VirtualMachineImageResource extends SubResource { /** * Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; /** @@ -8280,6 +8286,7 @@ model DiskUpdate { /** * Resource tags */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; /** @@ -8519,6 +8526,7 @@ model DiskAccessUpdate { /** * Resource tags */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -8606,6 +8614,7 @@ model EncryptionSetIdentity { /** * The list of user identities associated with the disk encryption set. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" userAssignedIdentities?: Record; } @@ -8683,6 +8692,7 @@ model DiskEncryptionSetUpdate { /** * Resource tags */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; /** @@ -9013,6 +9023,7 @@ model SnapshotUpdate { /** * Resource tags */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; /** @@ -9534,6 +9545,7 @@ model UpdateResourceDefinition { /** * Resource tags */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -10282,6 +10294,7 @@ model GalleryApplicationVersionPublishingProfile /** * Optional. Additional settings to pass to the vm-application-manager extension. For advanced use only. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" advancedSettings?: Record; /** @@ -11159,6 +11172,7 @@ model CloudServiceUpdate { /** * Resource tags */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp index 4a636e7f40..eb90f1780b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp @@ -7,7 +7,6 @@ import "./DnsZone.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,14 +19,12 @@ namespace Azure.ResourceManager.Dns; @parentResource(DnsZone) @includeInapplicableMetadataInPayload(false) model DnsRecord { - /** - * The name of the record set, relative to the name of the zone. - */ - @path - @key("relativeRecordSetName") - @segment("A") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = DnsRecord, + KeyName = "relativeRecordSetName", + SegmentName = "A", + NamePattern = "" + >; /** * The ID of the record set. @@ -63,7 +60,7 @@ interface DnsRecords { get is ArmResourceRead< DnsRecord, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The type of DNS record in this record set. @@ -81,7 +78,7 @@ interface DnsRecords { createOrUpdate is ArmResourceCreateOrReplaceSync< DnsRecord, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The type of DNS record in this record set. Record sets of type SOA can be updated but not created (they are created when the DNS zone is created). @@ -107,13 +104,13 @@ interface DnsRecords { * Updates a record set within a DNS zone. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("RecordSets_Update") update is ArmCustomPatchSync< DnsRecord, DnsRecord, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The type of DNS record in this record set. @@ -133,11 +130,12 @@ interface DnsRecords { * Deletes a record set from a DNS zone. This operation cannot be undone. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("RecordSets_Delete") delete is ArmResourceDeleteSync< DnsRecord, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The type of DNS record in this record set. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted). @@ -161,7 +159,7 @@ interface DnsRecords { listByType is ArmResourceListByParent< DnsRecord, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The type of record sets to enumerate. @@ -184,6 +182,9 @@ interface DnsRecords { >; } +@@doc(DnsRecord.name, + "The name of the record set, relative to the name of the zone." +); @@encodedName(DnsRecords.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp index fd036f7a42..3f6b82d09e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,14 +17,12 @@ namespace Azure.ResourceManager.Dns; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) model DnsZone extends Resource { - /** - * The name of the DNS zone (without a terminating dot). - */ - @path - @key("zoneName") - @segment("dnsZones") - @visibility("read") - name: string; + ...ResourceNameParameter< + Resource = DnsZone, + KeyName = "zoneName", + SegmentName = "dnsZones", + NamePattern = "" + >; /** * The etag of the zone. @@ -56,7 +53,7 @@ interface DnsZones { createOrUpdate is ArmResourceCreateOrReplaceSync< DnsZone, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes. @@ -76,13 +73,13 @@ interface DnsZones { * Updates a DNS zone. Does not modify DNS records within the zone. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("Zones_Update") update is ArmCustomPatchSync< DnsZone, ZoneUpdateOptions, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes. @@ -96,11 +93,14 @@ interface DnsZones { * Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Zones_Delete") delete is ArmResourceDeleteAsync< DnsZone, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The etag of the DNS zone. Omit this value to always delete the current zone. Specify the last-seen etag value to prevent accidentally deleting any concurrent changes. @@ -118,7 +118,7 @@ interface DnsZones { listByResourceGroup is ArmResourceListByParent< DnsZone, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The maximum number of record sets to return. If not specified, returns up to 100 record sets. @@ -169,6 +169,7 @@ interface DnsZones { ): ArmResponse> | ErrorResponse; } +@@doc(DnsZone.name, "The name of the DNS zone (without a terminating dot)."); @@encodedName(DnsZones.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp index d6dcbdbb1e..85502e8d80 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp @@ -43,6 +43,7 @@ model RecordSetProperties { /** * The metadata attached to the record set. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" metadata?: Record; /** @@ -419,6 +420,7 @@ model Resource { /** * Resource tags. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -429,6 +431,7 @@ model ZoneUpdateOptions { /** * Resource tags. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp index cd4804087d..16183906d4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp @@ -7,7 +7,6 @@ import "./BatchEndpointTrackedResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,15 +17,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(BatchEndpointTrackedResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(BatchDeployment) -model BatchDeploymentTrackedResource extends TrackedResourceBase { - /** - * The identifier for the Batch deployments. - */ - @path - @key("deploymentName") - @segment("deployments") - @visibility("read") - name: string; +model BatchDeploymentTrackedResource extends Foundations.TrackedResource { + ...ResourceNameParameter< + Resource = BatchDeploymentTrackedResource, + KeyName = "deploymentName", + SegmentName = "deployments", + NamePattern = "" + >; /** * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. @@ -39,8 +36,8 @@ model BatchDeploymentTrackedResource extends TrackedResourceBase { @extension("x-ms-client-flatten", true) properties: BatchDeployment; - ...Azure.ResourceManager.ManagedServiceIdentity; - ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ManagedServiceIdentityProperty; + ...Azure.ResourceManager.ResourceSkuProperty; } @armResourceOperations @@ -63,7 +60,7 @@ interface BatchDeploymentTrackedResources { * Update a batch inference deployment (asynchronous). */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("BatchDeployments_Update") update is ArmCustomPatchAsync< BatchDeploymentTrackedResource, @@ -74,6 +71,9 @@ interface BatchDeploymentTrackedResources { * Delete Batch Inference deployment (asynchronous). */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("BatchDeployments_Delete") delete is ArmResourceDeleteAsync; @@ -85,7 +85,7 @@ interface BatchDeploymentTrackedResources { list is ArmResourceListByParent< BatchDeploymentTrackedResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Ordering of list. @@ -108,6 +108,9 @@ interface BatchDeploymentTrackedResources { >; } +@@doc(BatchDeploymentTrackedResource.name, + "The identifier for the Batch deployments." +); @@encodedName(BatchDeploymentTrackedResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp index 0062533304..e719fc879c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp @@ -7,7 +7,6 @@ import "./Workspace.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,15 +17,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(Workspace) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(BatchEndpoint) -model BatchEndpointTrackedResource extends TrackedResourceBase { - /** - * Name for the Batch Endpoint. - */ - @path - @key("endpointName") - @segment("batchEndpoints") - @visibility("read") - name: string; +model BatchEndpointTrackedResource extends Foundations.TrackedResource { + ...ResourceNameParameter< + Resource = BatchEndpointTrackedResource, + KeyName = "endpointName", + SegmentName = "batchEndpoints", + NamePattern = "" + >; /** * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. @@ -39,8 +36,8 @@ model BatchEndpointTrackedResource extends TrackedResourceBase { @extension("x-ms-client-flatten", true) properties: BatchEndpoint; - ...Azure.ResourceManager.ManagedServiceIdentity; - ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ManagedServiceIdentityProperty; + ...Azure.ResourceManager.ResourceSkuProperty; } @armResourceOperations @@ -63,7 +60,7 @@ interface BatchEndpointTrackedResources { * Update a batch inference endpoint (asynchronous). */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("BatchEndpoints_Update") update is ArmCustomPatchAsync< BatchEndpointTrackedResource, @@ -74,6 +71,9 @@ interface BatchEndpointTrackedResources { * Delete Batch Inference Endpoint (asynchronous). */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("BatchEndpoints_Delete") delete is ArmResourceDeleteAsync; @@ -85,7 +85,7 @@ interface BatchEndpointTrackedResources { list is ArmResourceListByParent< BatchEndpointTrackedResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Number of endpoints to be retrieved in a page of results. @@ -113,6 +113,7 @@ interface BatchEndpointTrackedResources { >; } +@@doc(BatchEndpointTrackedResource.name, "Name for the Batch Endpoint."); @@encodedName(BatchEndpointTrackedResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp index 2e5622b9bd..27b9b62dcd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp @@ -7,7 +7,6 @@ import "./Registry.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,16 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(Registry) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(CodeContainer) -model CodeContainerResource extends ProxyResourceBase { - /** - * Container name. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - @key("codeName") - @segment("codes") - @visibility("read") - name: string; +model CodeContainerResource extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = CodeContainerResource, + KeyName = "codeName", + SegmentName = "codes", + NamePattern = "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$" + >; /** * [Required] Additional attributes of the entity. @@ -58,6 +54,9 @@ interface CodeContainerResources { * Delete Code container. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("RegistryCodeContainers_Delete") delete is ArmResourceDeleteAsync; @@ -69,7 +68,7 @@ interface CodeContainerResources { list is ArmResourceListByParent< CodeContainerResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -80,6 +79,7 @@ interface CodeContainerResources { >; } +@@doc(CodeContainerResource.name, "Container name."); @@encodedName(CodeContainerResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp index f94d7d5c87..8bcb15bf4c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp @@ -7,7 +7,6 @@ import "./CodeContainerResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(CodeContainerResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(CodeVersion) -model CodeVersionResource extends ProxyResourceBase { - /** - * Version identifier. - */ - @path - @key("version") - @segment("versions") - @visibility("read") - name: string; +model CodeVersionResource extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = CodeVersionResource, + KeyName = "version", + SegmentName = "versions", + NamePattern = "" + >; /** * [Required] Additional attributes of the entity. @@ -57,6 +54,9 @@ interface CodeVersionResources { * Delete version. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("RegistryCodeVersions_Delete") delete is ArmResourceDeleteAsync; @@ -68,7 +68,7 @@ interface CodeVersionResources { list is ArmResourceListByParent< CodeVersionResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Ordering of list. @@ -102,6 +102,7 @@ interface CodeVersionResources { >; } +@@doc(CodeVersionResource.name, "Version identifier."); @@encodedName(CodeVersionResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp index 0fca7360a7..e76a7c4da8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp @@ -7,7 +7,6 @@ import "./Registry.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,16 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(Registry) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(ComponentContainer) -model ComponentContainerResource extends ProxyResourceBase { - /** - * Container name. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - @key("componentName") - @segment("components") - @visibility("read") - name: string; +model ComponentContainerResource extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = ComponentContainerResource, + KeyName = "componentName", + SegmentName = "components", + NamePattern = "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$" + >; /** * [Required] Additional attributes of the entity. @@ -58,6 +54,9 @@ interface ComponentContainerResources { * Delete container. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("RegistryComponentContainers_Delete") delete is ArmResourceDeleteAsync; @@ -69,7 +68,7 @@ interface ComponentContainerResources { list is ArmResourceListByParent< ComponentContainerResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -80,6 +79,7 @@ interface ComponentContainerResources { >; } +@@doc(ComponentContainerResource.name, "Container name."); @@encodedName(ComponentContainerResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp index 8d1fcf6a77..46c791f7d0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp @@ -7,7 +7,6 @@ import "./ComponentContainerResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(ComponentContainerResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(ComponentVersion) -model ComponentVersionResource extends ProxyResourceBase { - /** - * Version identifier. - */ - @path - @key("version") - @segment("versions") - @visibility("read") - name: string; +model ComponentVersionResource extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = ComponentVersionResource, + KeyName = "version", + SegmentName = "versions", + NamePattern = "" + >; /** * [Required] Additional attributes of the entity. @@ -57,6 +54,9 @@ interface ComponentVersionResources { * Delete version. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("RegistryComponentVersions_Delete") delete is ArmResourceDeleteAsync; @@ -68,7 +68,7 @@ interface ComponentVersionResources { list is ArmResourceListByParent< ComponentVersionResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Ordering of list. @@ -97,6 +97,7 @@ interface ComponentVersionResources { >; } +@@doc(ComponentVersionResource.name, "Version identifier."); @@encodedName(ComponentVersionResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp index 9080809e2f..2d8ced64c6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp @@ -7,7 +7,6 @@ import "./Workspace.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -17,18 +16,15 @@ namespace Azure.ResourceManager.MachineLearning; * Machine Learning compute object wrapped into ARM resource envelope. */ @parentResource(Workspace) -model ComputeResource is TrackedResource<{}> { - /** - * Name of the Azure Machine Learning compute. - */ - @path - @key("computeName") - @segment("computes") - @visibility("read") - name: string; - - ...Azure.ResourceManager.ManagedServiceIdentity; - ...Azure.ResourceManager.ResourceSku; +model ComputeResource is Azure.ResourceManager.TrackedResource<{}> { + ...ResourceNameParameter< + Resource = ComputeResource, + KeyName = "computeName", + SegmentName = "computes", + NamePattern = "" + >; + ...Azure.ResourceManager.ManagedServiceIdentityProperty; + ...Azure.ResourceManager.ResourceSkuProperty; } @armResourceOperations @@ -51,7 +47,7 @@ interface ComputeResources { * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("Compute_Update") update is ArmCustomPatchAsync; @@ -59,11 +55,14 @@ interface ComputeResources { * Deletes specified Machine Learning compute. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Compute_Delete") delete is ArmResourceDeleteAsync< ComputeResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. @@ -81,7 +80,7 @@ interface ComputeResources { list is ArmResourceListByParent< ComputeResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -153,6 +152,7 @@ interface ComputeResources { >; } +@@doc(ComputeResource.name, "Name of the Azure Machine Learning compute."); @@encodedName(ComputeResources.createOrUpdate::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp index b10fb1efcd..3a8e21792b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp @@ -7,7 +7,6 @@ import "./Registry.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(Registry) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(DataContainer) -model DataContainerResource extends ProxyResourceBase { - /** - * Container name. - */ - @path - @key("name") - @segment("data") - @visibility("read") - name: string; +model DataContainerResource extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = DataContainerResource, + KeyName = "name", + SegmentName = "data", + NamePattern = "" + >; /** * [Required] Additional attributes of the entity. @@ -57,6 +54,9 @@ interface DataContainerResources { * Delete container. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("RegistryDataContainers_Delete") delete is ArmResourceDeleteAsync; @@ -68,7 +68,7 @@ interface DataContainerResources { list is ArmResourceListByParent< DataContainerResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -85,6 +85,7 @@ interface DataContainerResources { >; } +@@doc(DataContainerResource.name, "Container name."); @@encodedName(DataContainerResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp index 65eebff6b1..9163da2e53 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp @@ -7,7 +7,6 @@ import "./DataContainerResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(DataContainerResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(DataVersionBase) -model DataVersionBaseResource extends ProxyResourceBase { - /** - * Version identifier. - */ - @path - @key("version") - @segment("versions") - @visibility("read") - name: string; +model DataVersionBaseResource extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = DataVersionBaseResource, + KeyName = "version", + SegmentName = "versions", + NamePattern = "" + >; /** * [Required] Additional attributes of the entity. @@ -57,6 +54,9 @@ interface DataVersionBaseResources { * Delete version. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("RegistryDataVersions_Delete") delete is ArmResourceDeleteAsync; @@ -68,7 +68,7 @@ interface DataVersionBaseResources { list is ArmResourceListByParent< DataVersionBaseResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Please choose OrderBy value from ['createdtime', 'modifiedtime'] @@ -115,6 +115,7 @@ interface DataVersionBaseResources { >; } +@@doc(DataVersionBaseResource.name, "Version identifier."); @@encodedName(DataVersionBaseResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp index 6a3cd5698e..0ff28bf21b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp @@ -7,7 +7,6 @@ import "./Workspace.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(Workspace) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(Datastore) -model DatastoreResource extends ProxyResourceBase { - /** - * Datastore name. - */ - @path - @key("name") - @segment("datastores") - @visibility("read") - name: string; +model DatastoreResource extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = DatastoreResource, + KeyName = "name", + SegmentName = "datastores", + NamePattern = "" + >; /** * [Required] Additional attributes of the entity. @@ -54,7 +51,7 @@ interface DatastoreResources { createOrUpdate is ArmResourceCreateOrReplaceSync< DatastoreResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Flag to skip validation. @@ -68,6 +65,7 @@ interface DatastoreResources { * Delete datastore. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Datastores_Delete") delete is ArmResourceDeleteSync; @@ -79,7 +77,7 @@ interface DatastoreResources { list is ArmResourceListByParent< DatastoreResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -140,6 +138,7 @@ interface DatastoreResources { >; } +@@doc(DatastoreResource.name, "Datastore name."); @@encodedName(DatastoreResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp index bcaaa3e8a5..eaeec1318c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp @@ -7,7 +7,6 @@ import "./Registry.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,16 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(Registry) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(EnvironmentContainer) -model EnvironmentContainerResource extends ProxyResourceBase { - /** - * Container name. This is case-sensitive. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - @key("environmentName") - @segment("environments") - @visibility("read") - name: string; +model EnvironmentContainerResource extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = EnvironmentContainerResource, + KeyName = "environmentName", + SegmentName = "environments", + NamePattern = "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$" + >; /** * [Required] Additional attributes of the entity. @@ -58,6 +54,9 @@ interface EnvironmentContainerResources { * Delete container. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("RegistryEnvironmentContainers_Delete") delete is ArmResourceDeleteAsync; @@ -69,7 +68,7 @@ interface EnvironmentContainerResources { list is ArmResourceListByParent< EnvironmentContainerResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -86,6 +85,9 @@ interface EnvironmentContainerResources { >; } +@@doc(EnvironmentContainerResource.name, + "Container name. This is case-sensitive." +); @@encodedName(EnvironmentContainerResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp index 22e5c2d923..97aff6e557 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp @@ -7,7 +7,6 @@ import "./EnvironmentContainerResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(EnvironmentContainerResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(EnvironmentVersion) -model EnvironmentVersionResource extends ProxyResourceBase { - /** - * Version identifier. This is case-sensitive. - */ - @path - @key("version") - @segment("versions") - @visibility("read") - name: string; +model EnvironmentVersionResource extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = EnvironmentVersionResource, + KeyName = "version", + SegmentName = "versions", + NamePattern = "" + >; /** * [Required] Additional attributes of the entity. @@ -57,6 +54,9 @@ interface EnvironmentVersionResources { * Delete version. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("RegistryEnvironmentVersions_Delete") delete is ArmResourceDeleteAsync; @@ -68,7 +68,7 @@ interface EnvironmentVersionResources { list is ArmResourceListByParent< EnvironmentVersionResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Ordering of list. @@ -103,6 +103,9 @@ interface EnvironmentVersionResources { >; } +@@doc(EnvironmentVersionResource.name, + "Version identifier. This is case-sensitive." +); @@encodedName(EnvironmentVersionResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp index d7ee11e46c..0c6a3f8e1b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp @@ -7,7 +7,6 @@ import "./FeaturesetVersion.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,16 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(FeaturesetVersion) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(FeatureProperties) -model Feature extends ProxyResourceBase { - /** - * Feature Name. This is case-sensitive. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - @key("featureName") - @segment("features") - @visibility("read") - name: string; +model Feature extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = Feature, + KeyName = "featureName", + SegmentName = "features", + NamePattern = "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$" + >; /** * [Required] Additional attributes of the entity. @@ -53,7 +49,7 @@ interface Features { list is ArmResourceListByParent< Feature, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -75,3 +71,5 @@ interface Features { } >; } + +@@doc(Feature.name, "Feature Name. This is case-sensitive."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp index c7b53deaed..15816a2eff 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp @@ -7,7 +7,6 @@ import "./Workspace.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,15 +21,13 @@ namespace Azure.ResourceManager.MachineLearning; @Azure.ResourceManager.Private.armResourceInternal( FeaturesetContainerProperties ) -model FeaturesetContainer extends ProxyResourceBase { - /** - * Container name. This is case-sensitive. - */ - @path - @key("name") - @segment("featuresets") - @visibility("read") - name: string; +model FeaturesetContainer extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = FeaturesetContainer, + KeyName = "name", + SegmentName = "featuresets", + NamePattern = "" + >; /** * [Required] Additional attributes of the entity. @@ -54,6 +51,9 @@ interface FeaturesetContainers { /** * Delete container. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -64,7 +64,7 @@ interface FeaturesetContainers { list is ArmResourceListByParent< FeaturesetContainer, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -105,6 +105,7 @@ interface FeaturesetContainers { >; } +@@doc(FeaturesetContainer.name, "Container name. This is case-sensitive."); @@encodedName(FeaturesetContainers.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp index 3adfa7f44e..cf459a40aa 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp @@ -7,7 +7,6 @@ import "./FeaturesetContainer.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(FeaturesetContainer) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(FeaturesetVersionProperties) -model FeaturesetVersion extends ProxyResourceBase { - /** - * Version identifier. This is case-sensitive. - */ - @path - @key("version") - @segment("versions") - @visibility("read") - name: string; +model FeaturesetVersion extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = FeaturesetVersion, + KeyName = "version", + SegmentName = "versions", + NamePattern = "" + >; /** * [Required] Additional attributes of the entity. @@ -52,6 +49,9 @@ interface FeaturesetVersions { /** * Delete version. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -62,7 +62,7 @@ interface FeaturesetVersions { list is ArmResourceListByParent< FeaturesetVersion, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -131,7 +131,7 @@ interface FeaturesetVersions { void, FeaturesetJobArmPaginatedResult, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -160,6 +160,7 @@ interface FeaturesetVersions { >; } +@@doc(FeaturesetVersion.name, "Version identifier. This is case-sensitive."); @@encodedName(FeaturesetVersions.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp index 4711c1e9a3..91e84c517a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp @@ -7,7 +7,6 @@ import "./Workspace.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,15 +21,13 @@ namespace Azure.ResourceManager.MachineLearning; @Azure.ResourceManager.Private.armResourceInternal( FeaturestoreEntityContainerProperties ) -model FeaturestoreEntityContainer extends ProxyResourceBase { - /** - * Container name. This is case-sensitive. - */ - @path - @key("name") - @segment("featurestoreEntities") - @visibility("read") - name: string; +model FeaturestoreEntityContainer extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = FeaturestoreEntityContainer, + KeyName = "name", + SegmentName = "featurestoreEntities", + NamePattern = "" + >; /** * [Required] Additional attributes of the entity. @@ -54,6 +51,9 @@ interface FeaturestoreEntityContainers { /** * Delete container. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -64,7 +64,7 @@ interface FeaturestoreEntityContainers { list is ArmResourceListByParent< FeaturestoreEntityContainer, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -105,6 +105,9 @@ interface FeaturestoreEntityContainers { >; } +@@doc(FeaturestoreEntityContainer.name, + "Container name. This is case-sensitive." +); @@encodedName(FeaturestoreEntityContainers.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp index 9984935b9e..6f8a63066e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp @@ -7,7 +7,6 @@ import "./FeaturestoreEntityContainer.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,15 +21,13 @@ namespace Azure.ResourceManager.MachineLearning; @Azure.ResourceManager.Private.armResourceInternal( FeaturestoreEntityVersionProperties ) -model FeaturestoreEntityVersion extends ProxyResourceBase { - /** - * Version identifier. This is case-sensitive. - */ - @path - @key("version") - @segment("versions") - @visibility("read") - name: string; +model FeaturestoreEntityVersion extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = FeaturestoreEntityVersion, + KeyName = "version", + SegmentName = "versions", + NamePattern = "" + >; /** * [Required] Additional attributes of the entity. @@ -54,6 +51,9 @@ interface FeaturestoreEntityVersions { /** * Delete version. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -64,7 +64,7 @@ interface FeaturestoreEntityVersions { list is ArmResourceListByParent< FeaturestoreEntityVersion, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -117,6 +117,9 @@ interface FeaturestoreEntityVersions { >; } +@@doc(FeaturestoreEntityVersion.name, + "Version identifier. This is case-sensitive." +); @@encodedName(FeaturestoreEntityVersions.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp index 5e13955d19..cbbbe83d63 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp @@ -7,7 +7,6 @@ import "./Workspace.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(Workspace) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(JobBase) -model JobBaseResource extends ProxyResourceBase { - /** - * The name and identifier for the Job. This is case-sensitive. - */ - @path - @key("id") - @segment("jobs") - @visibility("read") - name: string; +model JobBaseResource extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = JobBaseResource, + KeyName = "id", + SegmentName = "jobs", + NamePattern = "" + >; /** * [Required] Additional attributes of the entity. @@ -57,7 +54,7 @@ interface JobBaseResources { * Updates a Job. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("Jobs_Update") update is ArmCustomPatchSync; @@ -65,6 +62,9 @@ interface JobBaseResources { * Deletes a Job (asynchronous). */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Jobs_Delete") delete is ArmResourceDeleteAsync; @@ -76,7 +76,7 @@ interface JobBaseResources { list is ArmResourceListByParent< JobBaseResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -130,6 +130,9 @@ interface JobBaseResources { cancel is ArmResourceActionAsync; } +@@doc(JobBaseResource.name, + "The name and identifier for the Job. This is case-sensitive." +); @@encodedName(JobBaseResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp index 8958db8212..10122c318b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp @@ -7,7 +7,6 @@ import "./Workspace.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(Workspace) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(LabelingJobProperties) -model LabelingJob extends ProxyResourceBase { - /** - * The name and identifier for the LabelingJob. - */ - @path - @key("id") - @segment("labelingJobs") - @visibility("read") - name: string; +model LabelingJob extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = LabelingJob, + KeyName = "id", + SegmentName = "labelingJobs", + NamePattern = "" + >; /** * [Required] Additional attributes of the entity. @@ -45,7 +42,7 @@ interface LabelingJobs { get is ArmResourceRead< LabelingJob, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Boolean value to indicate whether to include JobInstructions in response. @@ -69,6 +66,7 @@ interface LabelingJobs { /** * Delete a labeling job. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -79,7 +77,7 @@ interface LabelingJobs { list is ArmResourceListByParent< LabelingJob, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -115,6 +113,7 @@ interface LabelingJobs { resume is ArmResourceActionAsync; } +@@doc(LabelingJob.name, "The name and identifier for the LabelingJob."); @@encodedName(LabelingJobs.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp index 12c30ea115..f613f042a0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp @@ -7,7 +7,6 @@ import "./Registry.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,16 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(Registry) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(ModelContainer) -model ModelContainerResource extends ProxyResourceBase { - /** - * Container name. This is case-sensitive. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") - @path - @key("modelName") - @segment("models") - @visibility("read") - name: string; +model ModelContainerResource extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = ModelContainerResource, + KeyName = "modelName", + SegmentName = "models", + NamePattern = "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$" + >; /** * [Required] Additional attributes of the entity. @@ -58,6 +54,9 @@ interface ModelContainerResources { * Delete container. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("RegistryModelContainers_Delete") delete is ArmResourceDeleteAsync; @@ -69,7 +68,7 @@ interface ModelContainerResources { list is ArmResourceListByParent< ModelContainerResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -86,6 +85,7 @@ interface ModelContainerResources { >; } +@@doc(ModelContainerResource.name, "Container name. This is case-sensitive."); @@encodedName(ModelContainerResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp index ef3c1aefc7..cdeabddf00 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp @@ -7,7 +7,6 @@ import "./ModelContainerResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(ModelContainerResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(ModelVersion) -model ModelVersionResource extends ProxyResourceBase { - /** - * Version identifier. This is case-sensitive. - */ - @path - @key("version") - @segment("versions") - @visibility("read") - name: string; +model ModelVersionResource extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = ModelVersionResource, + KeyName = "version", + SegmentName = "versions", + NamePattern = "" + >; /** * [Required] Additional attributes of the entity. @@ -57,6 +54,9 @@ interface ModelVersionResources { * Delete version. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("RegistryModelVersions_Delete") delete is ArmResourceDeleteAsync; @@ -68,7 +68,7 @@ interface ModelVersionResources { list is ArmResourceListByParent< ModelVersionResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -137,6 +137,7 @@ interface ModelVersionResources { >; } +@@doc(ModelVersionResource.name, "Version identifier. This is case-sensitive."); @@encodedName(ModelVersionResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp index 01a6f4e0f9..a3fa5ea101 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp @@ -7,7 +7,6 @@ import "./OnlineEndpointTrackedResource.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,15 +17,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(OnlineEndpointTrackedResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(OnlineDeployment) -model OnlineDeploymentTrackedResource extends TrackedResourceBase { - /** - * Inference Endpoint Deployment name. - */ - @path - @key("deploymentName") - @segment("deployments") - @visibility("read") - name: string; +model OnlineDeploymentTrackedResource extends Foundations.TrackedResource { + ...ResourceNameParameter< + Resource = OnlineDeploymentTrackedResource, + KeyName = "deploymentName", + SegmentName = "deployments", + NamePattern = "" + >; /** * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. @@ -39,8 +36,8 @@ model OnlineDeploymentTrackedResource extends TrackedResourceBase { @extension("x-ms-client-flatten", true) properties: OnlineDeployment; - ...Azure.ResourceManager.ManagedServiceIdentity; - ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ManagedServiceIdentityProperty; + ...Azure.ResourceManager.ResourceSkuProperty; } @armResourceOperations @@ -63,7 +60,7 @@ interface OnlineDeploymentTrackedResources { * Update Online Deployment (asynchronous). */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("OnlineDeployments_Update") update is ArmCustomPatchAsync< OnlineDeploymentTrackedResource, @@ -74,6 +71,9 @@ interface OnlineDeploymentTrackedResources { * Delete Inference Endpoint Deployment (asynchronous). */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("OnlineDeployments_Delete") delete is ArmResourceDeleteAsync; @@ -85,7 +85,7 @@ interface OnlineDeploymentTrackedResources { list is ArmResourceListByParent< OnlineDeploymentTrackedResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Ordering of list. @@ -165,6 +165,9 @@ interface OnlineDeploymentTrackedResources { ): ArmResponse | ErrorResponse; } +@@doc(OnlineDeploymentTrackedResource.name, + "Inference Endpoint Deployment name." +); @@encodedName(OnlineDeploymentTrackedResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp index 8050a474a3..6204e55d8a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp @@ -7,7 +7,6 @@ import "./Workspace.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,15 +17,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(Workspace) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(OnlineEndpoint) -model OnlineEndpointTrackedResource extends TrackedResourceBase { - /** - * Online Endpoint name. - */ - @path - @key("endpointName") - @segment("onlineEndpoints") - @visibility("read") - name: string; +model OnlineEndpointTrackedResource extends Foundations.TrackedResource { + ...ResourceNameParameter< + Resource = OnlineEndpointTrackedResource, + KeyName = "endpointName", + SegmentName = "onlineEndpoints", + NamePattern = "" + >; /** * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. @@ -39,8 +36,8 @@ model OnlineEndpointTrackedResource extends TrackedResourceBase { @extension("x-ms-client-flatten", true) properties: OnlineEndpoint; - ...Azure.ResourceManager.ManagedServiceIdentity; - ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ManagedServiceIdentityProperty; + ...Azure.ResourceManager.ResourceSkuProperty; } @armResourceOperations @@ -63,7 +60,7 @@ interface OnlineEndpointTrackedResources { * Update Online Endpoint (asynchronous). */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("OnlineEndpoints_Update") update is ArmCustomPatchAsync< OnlineEndpointTrackedResource, @@ -74,6 +71,9 @@ interface OnlineEndpointTrackedResources { * Delete Online Endpoint (asynchronous). */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("OnlineEndpoints_Delete") delete is ArmResourceDeleteAsync; @@ -85,7 +85,7 @@ interface OnlineEndpointTrackedResources { list is ArmResourceListByParent< OnlineEndpointTrackedResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Name of the endpoint. @@ -165,6 +165,7 @@ interface OnlineEndpointTrackedResources { >; } +@@doc(OnlineEndpointTrackedResource.name, "Online Endpoint name."); @@encodedName(OnlineEndpointTrackedResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp index c85f93ed8c..d32389ce28 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp @@ -7,7 +7,6 @@ import "./Workspace.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,16 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(Workspace) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(OutboundRule) -model OutboundRuleBasicResource extends ProxyResourceBase { - /** - * Name of the workspace managed network outbound rule - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - @key("ruleName") - @segment("outboundRules") - @visibility("read") - name: string; +model OutboundRuleBasicResource extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = OutboundRuleBasicResource, + KeyName = "ruleName", + SegmentName = "outboundRules", + NamePattern = "^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$" + >; /** * Outbound Rule for the managed network of a machine learning workspace. @@ -58,6 +54,9 @@ interface OutboundRuleBasicResources { * Deletes an outbound rule from the managed network of a machine learning workspace. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("ManagedNetworkSettingsRule_Delete") delete is ArmResourceDeleteAsync; @@ -69,6 +68,9 @@ interface OutboundRuleBasicResources { list is ArmResourceListByParent; } +@@doc(OutboundRuleBasicResource.name, + "Name of the workspace managed network outbound rule" +); @@encodedName(OutboundRuleBasicResources.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp index 4545051a44..7a2854f9f3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp @@ -7,7 +7,6 @@ import "./Workspace.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,15 +21,13 @@ namespace Azure.ResourceManager.MachineLearning; @Azure.ResourceManager.Private.armResourceInternal( PrivateEndpointConnectionProperties ) -model PrivateEndpointConnection extends TrackedResourceBase { - /** - * NRP Private Endpoint Connection Name - */ - @path - @key("privateEndpointConnectionName") - @segment("privateEndpointConnections") - @visibility("read") - name: string; +model PrivateEndpointConnection extends Foundations.TrackedResource { + ...ResourceNameParameter< + Resource = PrivateEndpointConnection, + KeyName = "privateEndpointConnectionName", + SegmentName = "privateEndpointConnections", + NamePattern = "" + >; /** * Private endpoint connection properties. @@ -38,8 +35,8 @@ model PrivateEndpointConnection extends TrackedResourceBase { @extension("x-ms-client-flatten", true) properties?: PrivateEndpointConnectionProperties; - ...Azure.ResourceManager.ManagedServiceIdentity; - ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ManagedServiceIdentityProperty; + ...Azure.ResourceManager.ResourceSkuProperty; } @armResourceOperations @@ -58,6 +55,7 @@ interface PrivateEndpointConnections { /** * Called by end-users to delete a PE connection. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -68,6 +66,7 @@ interface PrivateEndpointConnections { list is ArmResourceListByParent; } +@@doc(PrivateEndpointConnection.name, "NRP Private Endpoint Connection Name"); @@encodedName(PrivateEndpointConnections.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp index 9fbbfede52..fbdc7fecd2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,16 +15,13 @@ namespace Azure.ResourceManager.MachineLearning; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(RegistryProperties) -model Registry extends TrackedResourceBase { - /** - * Name of Azure Machine Learning registry. This is case-insensitive - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{2,32}$") - @path - @key("registryName") - @segment("registries") - @visibility("read") - name: string; +model Registry extends Foundations.TrackedResource { + ...ResourceNameParameter< + Resource = Registry, + KeyName = "registryName", + SegmentName = "registries", + NamePattern = "^[a-zA-Z0-9][a-zA-Z0-9\\-_]{2,32}$" + >; /** * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. @@ -38,8 +34,8 @@ model Registry extends TrackedResourceBase { @extension("x-ms-client-flatten", true) properties: RegistryProperties; - ...Azure.ResourceManager.ManagedServiceIdentity; - ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ManagedServiceIdentityProperty; + ...Azure.ResourceManager.ResourceSkuProperty; } @armResourceOperations @@ -57,12 +53,15 @@ interface Registries { /** * Update tags */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync; /** * Delete registry */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -83,6 +82,9 @@ interface Registries { removeRegions is ArmResourceActionAsync; } +@@doc(Registry.name, + "Name of Azure Machine Learning registry. This is case-insensitive" +); @@encodedName(Registries.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp index bd69d98373..0d088e7d72 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp @@ -7,7 +7,6 @@ import "./Workspace.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,15 +19,13 @@ namespace Azure.ResourceManager.MachineLearning; @parentResource(Workspace) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(ScheduleProperties) -model Schedule extends ProxyResourceBase { - /** - * Schedule name. - */ - @path - @key("name") - @segment("schedules") - @visibility("read") - name: string; +model Schedule extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = Schedule, + KeyName = "name", + SegmentName = "schedules", + NamePattern = "" + >; /** * [Required] Additional attributes of the entity. @@ -52,6 +49,9 @@ interface Schedules { /** * Delete schedule. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync; /** @@ -62,7 +62,7 @@ interface Schedules { list is ArmResourceListByParent< Schedule, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -79,6 +79,7 @@ interface Schedules { >; } +@@doc(Schedule.name, "Schedule name."); @@encodedName(Schedules.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp index 7f56f861af..7e8b9ab52a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,17 +17,13 @@ namespace Azure.ResourceManager.MachineLearning; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(WorkspaceProperties) -model Workspace extends TrackedResourceBase { - /** - * Name of Azure Machine Learning workspace. - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - @key("workspaceName") - @segment("workspaces") - @visibility("read") - name: string; - +model Workspace extends Foundations.TrackedResource { + ...ResourceNameParameter< + Resource = Workspace, + KeyName = "workspaceName", + SegmentName = "workspaces", + NamePattern = "^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$" + >; kind?: string; /** @@ -37,8 +32,8 @@ model Workspace extends TrackedResourceBase { @extension("x-ms-client-flatten", true) properties: WorkspaceProperties; - ...Azure.ResourceManager.ManagedServiceIdentity; - ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ManagedServiceIdentityProperty; + ...Azure.ResourceManager.ResourceSkuProperty; } @armResourceOperations @@ -56,16 +51,19 @@ interface Workspaces { /** * Updates a machine learning workspace with the specified parameters. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** * Deletes a machine learning workspace. */ + #suppress "deprecated" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteAsync< Workspace, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Flag to indicate delete is a purge request. @@ -83,7 +81,7 @@ interface Workspaces { listByResourceGroup is ArmResourceListByParent< Workspace, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Continuation token for pagination. @@ -244,6 +242,7 @@ Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds" ): ArmResponse | ErrorResponse; } +@@doc(Workspace.name, "Name of Azure Machine Learning workspace."); @@encodedName(Workspaces.createOrUpdate::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp index b36bfd0758..6d9ad094c9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp @@ -7,7 +7,6 @@ import "./Workspace.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,16 +19,14 @@ namespace Azure.ResourceManager.MachineLearning; @Azure.ResourceManager.Private.armResourceInternal( WorkspaceConnectionPropertiesV2 ) -model WorkspaceConnectionPropertiesV2BasicResource extends ProxyResourceBase { - /** - * Friendly name of the workspace connection - */ - @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") - @path - @key("connectionName") - @segment("connections") - @visibility("read") - name: string; +model WorkspaceConnectionPropertiesV2BasicResource + extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = WorkspaceConnectionPropertiesV2BasicResource, + KeyName = "connectionName", + SegmentName = "connections", + NamePattern = "^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$" + >; @extension("x-ms-client-flatten", true) properties: WorkspaceConnectionPropertiesV2; @@ -55,7 +52,7 @@ interface WorkspaceConnectionPropertiesV2BasicResources { * Update machine learning workspaces connections under the specified workspace. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("WorkspaceConnections_Update") update is ArmCustomPatchSync< WorkspaceConnectionPropertiesV2BasicResource, @@ -66,6 +63,7 @@ interface WorkspaceConnectionPropertiesV2BasicResources { * Delete machine learning workspaces connections by name. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("WorkspaceConnections_Delete") delete is ArmResourceDeleteSync; @@ -77,7 +75,7 @@ interface WorkspaceConnectionPropertiesV2BasicResources { list is ArmResourceListByParent< WorkspaceConnectionPropertiesV2BasicResource, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Target of the workspace connection. @@ -105,6 +103,9 @@ interface WorkspaceConnectionPropertiesV2BasicResources { >; } +@@doc(WorkspaceConnectionPropertiesV2BasicResource.name, + "Friendly name of the workspace connection" +); @@encodedName(WorkspaceConnectionPropertiesV2BasicResources.create::parameters.resource, "application/json", "body" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp index 1495cb5198..e2f2a6cc79 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp @@ -3122,7 +3122,9 @@ model ScaleSettings { /** * Specifies the custom service configuration */ -model CustomService extends Record { +model CustomService { + ...Record; + /** * Name of the Custom Service */ @@ -3136,6 +3138,7 @@ model CustomService extends Record { /** * Environment Variable for the container */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" environmentVariables?: Record; /** @@ -3154,7 +3157,9 @@ model CustomService extends Record { volumes?: VolumeDefinition[]; } -model Image extends Record { +model Image { + ...Record; + /** * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images */ @@ -3166,7 +3171,9 @@ model Image extends Record { reference?: string; } -model EnvironmentVariable extends Record { +model EnvironmentVariable { + ...Record; + /** * Type of the Environment Variable. Possible values are: local - For local variable */ @@ -3178,7 +3185,9 @@ model EnvironmentVariable extends Record { value?: string; } -model Docker extends Record { +model Docker { + ...Record; + /** * Indicate whether container shall run in privileged or non-privileged mode. */ @@ -3402,11 +3411,13 @@ model ResourceBase { /** * The asset property dictionary. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" properties?: Record; /** * Tag dictionary. Tags can be added, removed, and updated. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -3743,6 +3754,7 @@ model ModelVersion extends AssetBase { /** * Mapping of model flavors to their properties. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" flavors?: Record; /** @@ -3782,6 +3794,7 @@ model FlavorData { /** * Model flavor-specific data. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" data?: Record; } @@ -3798,6 +3811,7 @@ model PackageRequest { /** * Collection of environment variables. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") environmentVariables?: Record; @@ -3822,6 +3836,7 @@ model PackageRequest { /** * Tag dictionary. Tags can be added, removed, and updated. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") tags?: Record; @@ -3908,6 +3923,7 @@ model PackageResponse { /** * Collection of environment variables. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read") environmentVariables?: Record; @@ -3938,6 +3954,7 @@ model PackageResponse { /** * Tag dictionary. Tags can be added, removed, and updated. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read") tags?: Record; @@ -3999,6 +4016,7 @@ model EndpointPropertiesBase { /** * Property dictionary. Properties can be added, but not removed or altered. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" properties?: Record; /** @@ -4054,6 +4072,7 @@ model PartialManagedServiceIdentity { /** * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" userAssignedIdentities?: Record>; } @@ -4064,6 +4083,7 @@ model PartialMinimalTrackedResource { /** * Resource tags. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -4184,6 +4204,7 @@ model ResourceConfiguration { /** * Additional properties bag. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") properties?: Record>; } @@ -4225,11 +4246,13 @@ model EndpointDeploymentPropertiesBase { /** * Environment variables configuration for the deployment. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" environmentVariables?: Record; /** * Property dictionary. Properties can be added, but not removed or altered. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" properties?: Record; } @@ -4264,6 +4287,7 @@ model PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties { /** * Resource tags. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -4388,6 +4412,7 @@ model MaterializationSettings { /** * Specifies the spark compute settings */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" sparkConfiguration?: Record; /** @@ -4415,6 +4440,7 @@ model NotificationSetting { /** * Send webhook callback to a service. Key is a user-provided name for the webhook. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create", "update") webhooks?: Record; } @@ -4543,11 +4569,13 @@ model FeaturesetVersionBackfillRequest { /** * Specifies the spark compute settings */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" sparkConfiguration?: Record; /** * Specifies the tags */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -4611,6 +4639,7 @@ model FeaturesetJob { /** * Specifies the tags if any */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; /** @@ -4722,6 +4751,7 @@ model JobBase extends ResourceBase { /** * Configuration for secrets to be made available during runtime. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") secretsConfiguration?: Record; @@ -4729,6 +4759,7 @@ model JobBase extends ResourceBase { * List of JobEndpoints. * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" services?: Record; /** @@ -4799,6 +4830,7 @@ model JobService { /** * Additional properties to set on the endpoint. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" properties?: Record; /** @@ -4841,6 +4873,7 @@ model PartialNotificationSetting { /** * Send webhook callback to a service. Key is a user-provided name for the webhook. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" webhooks?: Record; } @@ -4870,6 +4903,7 @@ model LabelingJobProperties extends JobBase { /** * Label categories of the job. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create", "update") labelCategories?: Record; @@ -4950,6 +4984,7 @@ model LabelCategory { /** * Dictionary of label classes in this category. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create", "update") classes?: Record; @@ -4979,6 +5014,7 @@ model LabelClass { /** * Dictionary of subclasses of the label class. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create", "update") subclasses?: Record; } @@ -5097,6 +5133,7 @@ model OnlineEndpoint extends EndpointPropertiesBase { /** * Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" mirrorTraffic?: Record; /** @@ -5113,6 +5150,7 @@ model OnlineEndpoint extends EndpointPropertiesBase { /** * Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" traffic?: Record; } @@ -5184,6 +5222,7 @@ model DataCollector { * [Required] The collection configuration. Each collection has it own configuration to collect model data and the name of collection can be arbitrary string. * Model data collector can be used for either payload logging or custom logging or both of them. Collection request and response are reserved for payload logging, others are for custom logging. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" collections: Record; /** @@ -5763,6 +5802,7 @@ model PartialRegistryPartialTrackedResource { /** * Resource tags. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -6088,6 +6128,7 @@ model ManagedNetworkSettings { /** * Dictionary of */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" outboundRules?: Record; /** @@ -6262,7 +6303,7 @@ model WorkspaceUpdateParameters { /** * Managed service identity (system assigned and/or user assigned identities) */ - identity?: ManagedServiceIdentity; + identity?: Azure.ResourceManager.Foundations.ManagedServiceIdentity; /** * The properties that the machine learning workspace will be updated with. @@ -6277,6 +6318,7 @@ model WorkspaceUpdateParameters { /** * The resource tags for the machine learning workspace. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -6397,46 +6439,55 @@ model DiagnoseRequestProperties { /** * Setting for diagnosing dependent application insights */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" applicationInsights?: Record; /** * Setting for diagnosing dependent container registry */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" containerRegistry?: Record; /** * Setting for diagnosing dns resolution */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" dnsResolution?: Record; /** * Setting for diagnosing dependent key vault */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" keyVault?: Record; /** * Setting for diagnosing network security group */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" nsg?: Record; /** * Setting for diagnosing unclassified category of problems */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" others?: Record; /** * Setting for diagnosing resource lock */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" resourceLock?: Record; /** * Setting for diagnosing dependent storage account */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" storageAccount?: Record; /** * Setting for diagnosing user defined routing */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" udr?: Record; } @@ -6615,7 +6666,7 @@ model PrivateLinkResource extends Resource { /** * Managed service identity (system assigned and/or user assigned identities) */ - identity?: ManagedServiceIdentity; + identity?: Azure.ResourceManager.Foundations.ManagedServiceIdentity; /** * Same as workspace location. @@ -6635,6 +6686,7 @@ model PrivateLinkResource extends Resource { /** * Dictionary of */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; } @@ -6897,6 +6949,7 @@ model KubernetesProperties { /** * Instance Type Schema */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" instanceTypes?: Record; } @@ -6907,6 +6960,7 @@ model InstanceTypeSchema { /** * Node Selector */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" nodeSelector?: Record; /** @@ -6922,11 +6976,13 @@ model InstanceTypeSchemaResources { /** * Resource requests for this instance type */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" requests?: Record; /** * Resource limits for this instance type */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" limits?: Record; } @@ -8242,12 +8298,14 @@ model AutoMLJob extends JobBase { /** * Environment variables included in the job. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") environmentVariables?: Record; /** * Mapping of output data bindings used in the job. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") outputs?: Record; @@ -8725,11 +8783,13 @@ model BatchPipelineComponentDeploymentConfiguration /** * Run-time settings for the pipeline job. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" settings?: Record; /** * The tags which will be applied to the job. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; /** @@ -9098,6 +9158,7 @@ model TableVerticalFeaturizationSettings extends FeaturizationSettings { /** * Dictionary of column name and its type (int, float, string, datetime etc). */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" columnNameAndTypes?: Record; /** @@ -9115,6 +9176,7 @@ model TableVerticalFeaturizationSettings extends FeaturizationSettings { /** * User can specify additional transformers to be used along with the columns to which it would be applied and parameters for the transformer constructor. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" transformerParams?: Record; } @@ -9501,12 +9563,14 @@ model CommandJob extends JobBase { /** * Environment variables included in the job. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") environmentVariables?: Record; /** * Mapping of input data bindings used in the job. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") inputs?: Record; @@ -9519,6 +9583,7 @@ model CommandJob extends JobBase { /** * Mapping of output data bindings used in the job. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") outputs?: Record; @@ -9640,6 +9705,7 @@ model MonitorDefinition { /** * [Required] The signals to monitor. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") signals: Record; } @@ -9684,6 +9750,7 @@ model MonitoringSignalBase { /** * Property dictionary. Properties can be added, but not removed or altered. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" properties?: Record; } @@ -9758,6 +9825,7 @@ model OnlineInferenceConfiguration { /** * Additional configurations */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" configurations?: Record; /** @@ -9827,12 +9895,14 @@ model CustomMonitoringSignal extends MonitoringSignalBase { /** * Monitoring assets to take as input. Key is the component input port name, value is the data asset. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") inputAssets?: Record; /** * Extra component parameters to take as input. Key is the component literal input port name, value is the parameter value. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") inputs?: Record; @@ -9862,6 +9932,7 @@ model MonitoringInputDataBase { /** * Mapping of column names to special uses. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") columns?: Record; @@ -9894,6 +9965,7 @@ model MonitoringWorkspaceConnection { * The properties of a workspace service connection to store as environment variables in the submitted jobs. * Key is workspace connection property path, name is environment variable key. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") environmentVariables?: Record; @@ -9901,6 +9973,7 @@ model MonitoringWorkspaceConnection { * The properties of a workspace service connection to store as secrets in the submitted jobs. * Key is workspace connection property path, name is secret key. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") secrets?: Record; } @@ -9966,6 +10039,7 @@ model DataDriftMonitoringSignal extends MonitoringSignalBase { /** * A dictionary that maps feature names to their respective data types. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") featureDataTypeOverride?: Record; @@ -10062,6 +10136,7 @@ model DataQualityMonitoringSignal extends MonitoringSignalBase { /** * A dictionary that maps feature names to their respective data types. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") featureDataTypeOverride?: Record; @@ -11547,7 +11622,7 @@ model ManagedComputeIdentity extends MonitorComputeIdentityBase { /** * Managed service identity (system assigned and/or user assigned identities) */ - identity?: ManagedServiceIdentity; + identity?: Azure.ResourceManager.Foundations.ManagedServiceIdentity; /** * [Required] Monitor compute identity type enum. @@ -12048,18 +12123,21 @@ model PipelineJob extends JobBase { /** * Inputs for the pipeline job. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") inputs?: Record; /** * Jobs construct the Pipeline Job. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") jobs?: Record>; /** * Outputs for the pipeline job */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") outputs?: Record; @@ -12364,6 +12442,7 @@ model SparkJob extends JobBase { /** * Spark configured properties. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") conf?: Record; @@ -12388,6 +12467,7 @@ model SparkJob extends JobBase { /** * Mapping of input data bindings used in the job. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") inputs?: Record; @@ -12400,6 +12480,7 @@ model SparkJob extends JobBase { /** * Mapping of output data bindings used in the job. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") outputs?: Record; @@ -12519,6 +12600,7 @@ model SweepJob extends JobBase { /** * Mapping of input data bindings used in the job. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") inputs?: Record; @@ -12536,6 +12618,7 @@ model SweepJob extends JobBase { /** * Mapping of output data bindings used in the job. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") outputs?: Record; @@ -12625,6 +12708,7 @@ model TrialComponent { /** * Environment variables included in the job. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" @visibility("read", "create") environmentVariables?: Record; @@ -12962,6 +13046,7 @@ model CustomKeys { /** * Dictionary of */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" keys?: Record; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/swagger.json index 8167c3a7f0..0ffd66d8cc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/swagger.json +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/swagger-output/swagger.json @@ -387,14 +387,14 @@ "202": { "description": "Resource update request accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -449,14 +449,14 @@ "202": { "description": "Resource deletion accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -803,14 +803,14 @@ "202": { "description": "Resource update request accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -875,14 +875,14 @@ "202": { "description": "Resource deletion accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -962,14 +962,14 @@ "202": { "description": "Resource operation accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -1433,7 +1433,7 @@ "storageAccountSasToken" ] }, - "Azure.ResourceManager.Foundations.ManagedIdentityProperties": { + "Azure.ResourceManager.Foundations.ManagedServiceIdentity": { "type": "object", "description": "The properties of the managed service identities assigned to this resource.", "properties": { @@ -1448,22 +1448,19 @@ "readOnly": true }, "type": { - "$ref": "#/definitions/Azure.ResourceManager.Foundations.ManagedIdentityType", + "$ref": "#/definitions/Azure.ResourceManager.Foundations.ManagedServiceIdentityType", "description": "The type of managed identity assigned to this resource." }, "userAssignedIdentities": { - "type": "object", - "description": "The identities assigned to this resource by the user.", - "additionalProperties": { - "$ref": "#/definitions/Azure.ResourceManager.Foundations.UserAssignedIdentity" - } + "$ref": "#/definitions/Azure.ResourceManager.Foundations.UserAssignedIdentities", + "description": "The identities assigned to this resource by the user." } }, "required": [ "type" ] }, - "Azure.ResourceManager.Foundations.ManagedIdentityType": { + "Azure.ResourceManager.Foundations.ManagedServiceIdentityType": { "type": "string", "description": "The kind of managed identity assigned to this resource.", "enum": [ @@ -1473,7 +1470,7 @@ "SystemAssigned, UserAssigned" ], "x-ms-enum": { - "name": "ManagedIdentityType", + "name": "ManagedServiceIdentityType", "modelAsString": true, "values": [ { @@ -1499,6 +1496,13 @@ ] } }, + "Azure.ResourceManager.Foundations.UserAssignedIdentities": { + "type": "object", + "description": "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.\",", + "additionalProperties": { + "$ref": "#/definitions/Azure.ResourceManager.Foundations.UserAssignedIdentity" + } + }, "Azure.ResourceManager.Foundations.UserAssignedIdentity": { "type": "object", "description": "A managed identity assigned by the user.", @@ -1513,16 +1517,6 @@ } } }, - "Azure.ResourceManager.ManagedServiceIdentity": { - "type": "object", - "description": "The managed service identities envelope.", - "properties": { - "identity": { - "$ref": "#/definitions/Azure.ResourceManager.Foundations.ManagedIdentityProperties", - "description": "The managed service identities assigned to this resource." - } - } - }, "ConsumptionEndpointsProperties": { "type": "object", "description": "Details of Consumption Properties", @@ -1661,7 +1655,7 @@ ] }, "identity": { - "$ref": "#/definitions/Azure.ResourceManager.Foundations.ManagedIdentityProperties", + "$ref": "#/definitions/Azure.ResourceManager.Foundations.ManagedServiceIdentity", "description": "The managed service identities assigned to this resource." } }, @@ -1924,7 +1918,7 @@ "description": "The type used for update operations of the DataProduct.", "properties": { "identity": { - "$ref": "#/definitions/Azure.ResourceManager.ManagedServiceIdentity", + "$ref": "#/definitions/Azure.ResourceManager.Foundations.ManagedServiceIdentity", "description": "The managed service identities assigned to this resource." }, "tags": { @@ -2042,15 +2036,8 @@ "read", "create" ] - }, - "name": { - "type": "string", - "readOnly": true } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp index 8611ab9d95..434f771fed 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -14,20 +13,15 @@ namespace Microsoft.NetworkAnalytics; /** * The data product resource. */ -model DataProduct is TrackedResource { - /** - * The data product resource name - */ - @maxLength(63) - @minLength(3) - @pattern("^[a-z][a-z0-9]*$") - @path - @key("dataProductName") - @segment("dataProducts") - @visibility("read") - name: string; - - ...Azure.ResourceManager.ManagedServiceIdentity; +model DataProduct + is Azure.ResourceManager.TrackedResource { + ...ResourceNameParameter< + Resource = DataProduct, + KeyName = "dataProductName", + SegmentName = "dataProducts", + NamePattern = "^[a-z][a-z0-9]*$" + >; + ...Azure.ResourceManager.ManagedServiceIdentityProperty; } @armResourceOperations @@ -45,7 +39,7 @@ interface DataProducts { /** * Update data product resource. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** @@ -103,3 +97,7 @@ interface DataProducts { */ rotateKey is ArmResourceActionNoContentSync; } + +@@maxLength(DataProduct.name, 63); +@@minLength(DataProduct.name, 3); +@@doc(DataProduct.name, "The data product resource name"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp index 0688ab20b4..daedb003d6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -15,11 +14,14 @@ namespace Microsoft.NetworkAnalytics; * The data catalog resource. */ @singleton("default") -model DataProductsCatalog is ProxyResource { - @key("dataProductsCatalog") - @segment("dataProductsCatalogs") - @visibility("read") - name: string; +model DataProductsCatalog + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = DataProductsCatalog, + KeyName = "dataProductsCatalog", + SegmentName = "dataProductsCatalogs", + NamePattern = "" + >; } @armResourceOperations @@ -39,3 +41,5 @@ interface DataProductsCatalogs { */ listByResourceGroup is ArmResourceListByParent; } + +@@doc(DataProductsCatalog.name, ""); diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp index d4333fa8a1..d2017361f6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp @@ -7,7 +7,6 @@ import "./DataProduct.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,18 +15,13 @@ namespace Microsoft.NetworkAnalytics; * The data type resource. */ @parentResource(DataProduct) -model DataType is ProxyResource { - /** - * The data type name. - */ - @maxLength(63) - @minLength(3) - @pattern("^[a-z][a-z0-9-]*$") - @path - @key("dataTypeName") - @segment("dataTypes") - @visibility("read") - name: string; +model DataType is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = DataType, + KeyName = "dataTypeName", + SegmentName = "dataTypes", + NamePattern = "^[a-z][a-z0-9-]*$" + >; } @armResourceOperations @@ -45,7 +39,7 @@ interface DataTypes { /** * Update data type resource. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** @@ -75,3 +69,7 @@ interface DataTypes { ContainerSasToken >; } + +@@maxLength(DataType.name, 63); +@@minLength(DataType.name, 3); +@@doc(DataType.name, "The data type name."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp index cf763e2773..c4b29940cf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp @@ -381,7 +381,7 @@ model ConsumptionEndpointsProperties { * Resource Id of ingestion endpoint. */ @visibility("read") - ingestionResourceId?: ResourceIdentifier<[ + ingestionResourceId?: Azure.Core.armResourceIdentifier<[ { type: "Microsoft.Storage/storageAccounts"; } @@ -397,7 +397,7 @@ model ConsumptionEndpointsProperties { * Resource Id of file access endpoint. */ @visibility("read") - fileAccessResourceId?: ResourceIdentifier<[ + fileAccessResourceId?: Azure.Core.armResourceIdentifier<[ { type: "Microsoft.Storage/storageAccounts"; } @@ -413,7 +413,7 @@ model ConsumptionEndpointsProperties { * Resource Id of query endpoint. */ @visibility("read") - queryResourceId?: ResourceIdentifier<[ + queryResourceId?: Azure.Core.armResourceIdentifier<[ { type: "Microsoft.Kusto/clusters"; } @@ -517,7 +517,7 @@ model DataProductUpdate { /** * The managed service identities assigned to this resource. */ - identity?: ManagedServiceIdentity; + identity?: Azure.ResourceManager.Foundations.ManagedServiceIdentity; /** * Resource tags. diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/swagger-output/swagger.json index 49ba37011b..341e08f053 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/swagger-output/swagger.json +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/swagger-output/swagger.json @@ -344,14 +344,14 @@ "202": { "description": "Resource deletion accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -636,14 +636,14 @@ "202": { "description": "Resource deletion accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -928,14 +928,14 @@ "202": { "description": "Resource deletion accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp index a6f2d8a978..137687085c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp @@ -7,7 +7,6 @@ import "./TrafficController.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,16 +15,14 @@ namespace Microsoft.ServiceNetworking; * Association Subresource of Traffic Controller */ @parentResource(TrafficController) -model Association is TrackedResource { - /** - * Name of Association - */ - @pattern("^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$") - @path - @key("associationName") - @segment("associations") - @visibility("read") - name: string; +model Association + is Azure.ResourceManager.TrackedResource { + ...ResourceNameParameter< + Resource = Association, + KeyName = "associationName", + SegmentName = "associations", + NamePattern = "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + >; } @armResourceOperations @@ -43,7 +40,7 @@ interface Associations { /** * Update a Association */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync; /** @@ -56,3 +53,5 @@ interface Associations { */ listByTrafficController is ArmResourceListByParent; } + +@@doc(Association.name, "Name of Association"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp index d10270e601..0f02fe4720 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp @@ -7,7 +7,6 @@ import "./TrafficController.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,16 +15,13 @@ namespace Microsoft.ServiceNetworking; * Frontend Subresource of Traffic Controller. */ @parentResource(TrafficController) -model Frontend is TrackedResource { - /** - * Frontends - */ - @pattern("^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$") - @path - @key("frontendName") - @segment("frontends") - @visibility("read") - name: string; +model Frontend is Azure.ResourceManager.TrackedResource { + ...ResourceNameParameter< + Resource = Frontend, + KeyName = "frontendName", + SegmentName = "frontends", + NamePattern = "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + >; } @armResourceOperations @@ -43,7 +39,7 @@ interface Frontends { /** * Update a Frontend */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync; /** @@ -56,3 +52,5 @@ interface Frontends { */ listByTrafficController is ArmResourceListByParent; } + +@@doc(Frontend.name, "Frontends"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp index d631539212..378fc406ee 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -14,16 +13,14 @@ namespace Microsoft.ServiceNetworking; /** * Concrete tracked resource types can be created by aliasing this type using a specific property type. */ -model TrafficController is TrackedResource { - /** - * traffic controller name for path - */ - @pattern("^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$") - @path - @key("trafficControllerName") - @segment("trafficControllers") - @visibility("read") - name: string; +model TrafficController + is Azure.ResourceManager.TrackedResource { + ...ResourceNameParameter< + Resource = TrafficController, + KeyName = "trafficControllerName", + SegmentName = "trafficControllers", + NamePattern = "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$" + >; } @armResourceOperations @@ -41,7 +38,7 @@ interface TrafficControllers { /** * Update a TrafficController */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync; /** @@ -59,3 +56,5 @@ interface TrafficControllers { */ listBySubscription is ArmListBySubscription; } + +@@doc(TrafficController.name, "traffic controller name for path"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/swagger.json index 3ed9074a26..594a134b5c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/swagger.json +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/swagger-output/swagger.json @@ -381,14 +381,14 @@ "202": { "description": "Resource deletion accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -971,14 +971,14 @@ "202": { "description": "Resource deletion accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -1587,14 +1587,14 @@ "202": { "description": "Resource update request accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -1655,14 +1655,14 @@ "202": { "description": "Resource deletion accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -2044,14 +2044,14 @@ "202": { "description": "Resource update request accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -2120,14 +2120,14 @@ "202": { "description": "Resource deletion accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -2207,14 +2207,14 @@ "202": { "description": "Resource operation accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -2618,14 +2618,14 @@ "202": { "description": "Resource deletion accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -2949,14 +2949,14 @@ "202": { "description": "Resource update request accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -3033,14 +3033,14 @@ "202": { "description": "Resource deletion accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -3134,14 +3134,14 @@ "202": { "description": "Resource operation accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp index 4994ceff5e..64176f7a24 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -14,16 +13,13 @@ namespace Microsoft.AzureSphere; /** * An Azure Sphere catalog */ -model Catalog is TrackedResource { - /** - * Name of catalog - */ - @pattern("^[A-Za-z0-9_-]{1,50}$") - @path - @key("catalogName") - @segment("catalogs") - @visibility("read") - name: string; +model Catalog is Azure.ResourceManager.TrackedResource { + ...ResourceNameParameter< + Resource = Catalog, + KeyName = "catalogName", + SegmentName = "catalogs", + NamePattern = "^[A-Za-z0-9_-]{1,50}$" + >; } @armResourceOperations @@ -41,7 +37,7 @@ interface Catalogs { /** * Update a Catalog */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync; /** @@ -72,7 +68,7 @@ interface Catalogs { void, ResourceListResult, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Filter the result list using the given expression @@ -108,7 +104,7 @@ interface Catalogs { ListDeviceGroupsRequest, ResourceListResult, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Filter the result list using the given expression @@ -144,7 +140,7 @@ interface Catalogs { void, PagedDeviceInsight, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Filter the result list using the given expression @@ -180,7 +176,7 @@ interface Catalogs { void, ResourceListResult, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Filter the result list using the given expression @@ -209,6 +205,7 @@ interface Catalogs { >; } +@@doc(Catalog.name, "Name of catalog"); @@doc(Catalogs.listDeviceGroups::parameters.body, "List device groups for catalog." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp index 0baa0724a5..c90d0f307d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp @@ -7,7 +7,6 @@ import "./Catalog.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,15 +15,14 @@ namespace Microsoft.AzureSphere; * An certificate resource belonging to a catalog resource. */ @parentResource(Catalog) -model Certificate is ProxyResource { - /** - * Serial number of the certificate. Use '.default' to get current active certificate. - */ - @path - @key("serialNumber") - @segment("certificates") - @visibility("read") - name: string; +model Certificate + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = Certificate, + KeyName = "serialNumber", + SegmentName = "certificates", + NamePattern = "" + >; } @armResourceOperations @@ -40,7 +38,7 @@ interface Certificates { listByCatalog is ArmResourceListByParent< Certificate, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Filter the result list using the given expression @@ -87,6 +85,9 @@ interface Certificates { >; } +@@doc(Certificate.name, + "Serial number of the certificate. Use '.default' to get current active certificate." +); @@doc(Certificates.retrieveProofOfPossessionNonce::parameters.body, "Proof of possession nonce request body " ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp index faee6b4d02..bf6aed77a0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp @@ -7,7 +7,6 @@ import "./DeviceGroup.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,15 +15,13 @@ namespace Microsoft.AzureSphere; * An deployment resource belonging to a device group resource. */ @parentResource(DeviceGroup) -model Deployment is ProxyResource { - /** - * Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group. - */ - @path - @key("deploymentName") - @segment("deployments") - @visibility("read") - name: string; +model Deployment is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = Deployment, + KeyName = "deploymentName", + SegmentName = "deployments", + NamePattern = "" + >; } @armResourceOperations @@ -50,7 +47,7 @@ interface Deployments { listByDeviceGroup is ArmResourceListByParent< Deployment, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Filter the result list using the given expression @@ -78,3 +75,7 @@ interface Deployments { } >; } + +@@doc(Deployment.name, + "Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group." +); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp index 0565dd4464..7f07c74828 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp @@ -7,7 +7,6 @@ import "./DeviceGroup.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,16 +15,13 @@ namespace Microsoft.AzureSphere; * An device resource belonging to a device group resource. */ @parentResource(DeviceGroup) -model Device is ProxyResource { - /** - * Device name - */ - @pattern("^[a-zA-Z0-9-]{128}$") - @path - @key("deviceName") - @segment("devices") - @visibility("read") - name: string; +model Device is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = Device, + KeyName = "deviceName", + SegmentName = "devices", + NamePattern = "^[a-zA-Z0-9-]{128}$" + >; } @armResourceOperations @@ -43,7 +39,7 @@ interface Devices { /** * Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** @@ -66,6 +62,7 @@ interface Devices { >; } +@@doc(Device.name, "Device name"); @@doc(Devices.generateCapabilityImage::parameters.body, "Generate capability image request body." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp index 5099c73097..cb861df6a9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp @@ -7,7 +7,6 @@ import "./Product.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,16 +15,14 @@ namespace Microsoft.AzureSphere; * An device group resource belonging to a product resource. */ @parentResource(Product) -model DeviceGroup is ProxyResource { - /** - * Name of device group. - */ - @pattern("^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$") - @path - @key("deviceGroupName") - @segment("deviceGroups") - @visibility("read") - name: string; +model DeviceGroup + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = DeviceGroup, + KeyName = "deviceGroupName", + SegmentName = "deviceGroups", + NamePattern = "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" + >; } @armResourceOperations @@ -43,7 +40,7 @@ interface DeviceGroups { /** * Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** @@ -57,7 +54,7 @@ interface DeviceGroups { listByProduct is ArmResourceListByParent< DeviceGroup, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Filter the result list using the given expression @@ -99,6 +96,7 @@ interface DeviceGroups { countDevices is ArmResourceActionSync; } +@@doc(DeviceGroup.name, "Name of device group."); @@doc(DeviceGroups.claimDevices::parameters.body, "Bulk claim devices request body." ); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp index 39395dd755..4e1adb5178 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp @@ -7,7 +7,6 @@ import "./Catalog.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,15 +15,13 @@ namespace Microsoft.AzureSphere; * An image resource belonging to a catalog resource. */ @parentResource(Catalog) -model Image is ProxyResource { - /** - * Image name. Use .default for image creation. - */ - @path - @key("imageName") - @segment("images") - @visibility("read") - name: string; +model Image is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = Image, + KeyName = "imageName", + SegmentName = "images", + NamePattern = "" + >; } @armResourceOperations @@ -50,7 +47,7 @@ interface Images { listByCatalog is ArmResourceListByParent< Image, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Filter the result list using the given expression @@ -78,3 +75,5 @@ interface Images { } >; } + +@@doc(Image.name, "Image name. Use .default for image creation."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp index 467783cf7b..a230c77ee0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp @@ -7,7 +7,6 @@ import "./Catalog.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,16 +15,13 @@ namespace Microsoft.AzureSphere; * An product resource belonging to a catalog resource. */ @parentResource(Catalog) -model Product is ProxyResource { - /** - * Name of product. - */ - @pattern("^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$") - @path - @key("productName") - @segment("products") - @visibility("read") - name: string; +model Product is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = Product, + KeyName = "productName", + SegmentName = "products", + NamePattern = "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" + >; } @armResourceOperations @@ -43,7 +39,7 @@ interface Products { /** * Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchAsync; /** @@ -70,3 +66,5 @@ interface Products { ResourceListResult >; } + +@@doc(Product.name, "Name of product."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/swagger.json index e5f1b0d554..6512d7e4c8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/swagger.json +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/swagger-output/swagger.json @@ -734,14 +734,14 @@ "202": { "description": "Resource operation accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -1151,12 +1151,12 @@ } } }, - "delete": { - "operationId": "BlobContainers_Delete", + "patch": { + "operationId": "BlobContainers_Update", "tags": [ "BlobContainers" ], - "description": "Deletes specified container under its account.", + "description": "Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist.", "parameters": [ { "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -1184,14 +1184,24 @@ "type": "string", "minLength": 3, "maxLength": 63 + }, + { + "name": "blobContainer", + "in": "body", + "description": "Properties to update for the blob container.", + "required": true, + "schema": { + "$ref": "#/definitions/BlobContainer" + }, + "x-ms-client-name": "blobContainer" } ], "responses": { "200": { - "description": "Resource deleted successfully." - }, - "204": { - "description": "Resource does not exist." + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/BlobContainer" + } }, "default": { "description": "An unexpected error response.", @@ -1201,19 +1211,17 @@ } }, "x-ms-examples": { - "DeleteContainers": { - "$ref": "./examples/BlobContainers_Delete.json" + "UpdateContainers": { + "$ref": "./examples/BlobContainers_Update.json" } } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/clearLegalHold": { - "post": { - "operationId": "BlobContainers_ClearLegalHold", + }, + "delete": { + "operationId": "BlobContainers_Delete", "tags": [ "BlobContainers" ], - "description": "Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.", + "description": "Deletes specified container under its account.", "parameters": [ { "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -1241,24 +1249,14 @@ "type": "string", "minLength": 3, "maxLength": 63 - }, - { - "name": "LegalHold", - "in": "body", - "description": "The LegalHold property that will be clear from a blob container.", - "required": true, - "schema": { - "$ref": "#/definitions/LegalHold" - }, - "x-ms-client-name": "LegalHold" } ], "responses": { "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/LegalHold" - } + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." }, "default": { "description": "An unexpected error response.", @@ -1268,19 +1266,19 @@ } }, "x-ms-examples": { - "ClearLegalHoldContainers": { - "$ref": "./examples/BlobContainers_ClearLegalHold.json" + "DeleteContainers": { + "$ref": "./examples/BlobContainers_Delete.json" } } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/containers/{name}": { - "patch": { - "operationId": "BlobContainers_Update", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/clearLegalHold": { + "post": { + "operationId": "BlobContainers_ClearLegalHold", "tags": [ "BlobContainers" ], - "description": "Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist.", + "description": "Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.", "parameters": [ { "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -1310,30 +1308,21 @@ "maxLength": 63 }, { - "name": "name", - "in": "path", - "description": "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 63 - }, - { - "name": "blobContainer", + "name": "LegalHold", "in": "body", - "description": "Properties to update for the blob container.", + "description": "The LegalHold property that will be clear from a blob container.", "required": true, "schema": { - "$ref": "#/definitions/BlobContainer" + "$ref": "#/definitions/LegalHold" }, - "x-ms-client-name": "blobContainer" + "x-ms-client-name": "LegalHold" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/BlobContainer" + "$ref": "#/definitions/LegalHold" } }, "default": { @@ -1344,8 +1333,8 @@ } }, "x-ms-examples": { - "UpdateContainers": { - "$ref": "./examples/BlobContainers_Update.json" + "ClearLegalHoldContainers": { + "$ref": "./examples/BlobContainers_ClearLegalHold.json" } } } @@ -1810,14 +1799,14 @@ "202": { "description": "Resource operation accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -2125,9 +2114,7 @@ "$ref": "./examples/EncryptionScopes_Put_Storage_Account_Put_Encryption_Scope_With_Infrastructure_Encryption.json" } } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/encryptionScopes/{encryptionScopeName}/encryptionScopes/{name}": { + }, "patch": { "operationId": "EncryptionScopes_Patch", "tags": [ @@ -2162,15 +2149,6 @@ "minLength": 3, "maxLength": 63 }, - { - "name": "name", - "in": "path", - "description": "The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 63 - }, { "name": "encryptionScope", "in": "body", @@ -2247,14 +2225,14 @@ "202": { "description": "Resource operation accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -2684,6 +2662,74 @@ } } }, + "patch": { + "operationId": "FileShares_Update", + "tags": [ + "FileShares" + ], + "description": "Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.", + "parameters": [ + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 24 + }, + { + "name": "shareName", + "in": "path", + "description": "The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 63 + }, + { + "name": "fileShare", + "in": "body", + "description": "Properties to update for the file share.", + "required": true, + "schema": { + "$ref": "#/definitions/FileShare" + }, + "x-ms-client-name": "fileShare" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/FileShare" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "UpdateShareAcls": { + "$ref": "./examples/FileShares_Update_Update_Share_Acls.json" + }, + "UpdateShares": { + "$ref": "./examples/FileShares_Update_Update_Shares.json" + } + } + }, "delete": { "operationId": "FileShares_Delete", "tags": [ @@ -2895,85 +2941,6 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}/shares/{name}": { - "patch": { - "operationId": "FileShares_Update", - "tags": [ - "FileShares" - ], - "description": "Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.", - "parameters": [ - { - "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "name": "accountName", - "in": "path", - "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 24 - }, - { - "name": "shareName", - "in": "path", - "description": "The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 63 - }, - { - "name": "name", - "in": "path", - "description": "The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 63 - }, - { - "name": "fileShare", - "in": "body", - "description": "Properties to update for the file share.", - "required": true, - "schema": { - "$ref": "#/definitions/FileShare" - }, - "x-ms-client-name": "fileShare" - } - ], - "responses": { - "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/FileShare" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "UpdateShareAcls": { - "$ref": "./examples/FileShares_Update_Update_Share_Acls.json" - }, - "UpdateShares": { - "$ref": "./examples/FileShares_Update_Update_Shares.json" - } - } - } - }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/hierarchicalNamespaceMigration": { "post": { "operationId": "StorageAccounts_HierarchicalNamespaceMigration", @@ -3012,14 +2979,14 @@ "202": { "description": "Resource operation accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -4836,12 +4803,12 @@ } } }, - "delete": { - "operationId": "Queue_Delete", + "patch": { + "operationId": "Queue_Update", "tags": [ "StorageQueues" ], - "description": "Deletes the queue with the specified queue name, under the specified account if it exists.", + "description": "Creates a new queue with the specified queue name, under the specified account.", "parameters": [ { "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -4870,14 +4837,24 @@ "minLength": 3, "maxLength": 63, "pattern": "^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$" + }, + { + "name": "queue", + "in": "body", + "description": "Queue properties and metadata to be created with", + "required": true, + "schema": { + "$ref": "#/definitions/StorageQueue" + }, + "x-ms-client-name": "queue" } ], "responses": { "200": { - "description": "Resource deleted successfully." - }, - "204": { - "description": "Resource does not exist." + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/StorageQueue" + } }, "default": { "description": "An unexpected error response.", @@ -4887,19 +4864,17 @@ } }, "x-ms-examples": { - "QueueOperationDelete": { - "$ref": "./examples/Queue_Delete.json" + "QueueOperationPatch": { + "$ref": "./examples/Queue_Update.json" } } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/queueServices/default/queues/{queueName}/queues/{name}": { - "patch": { - "operationId": "Queue_Update", + }, + "delete": { + "operationId": "Queue_Delete", "tags": [ "StorageQueues" ], - "description": "Creates a new queue with the specified queue name, under the specified account.", + "description": "Deletes the queue with the specified queue name, under the specified account if it exists.", "parameters": [ { "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -4928,34 +4903,14 @@ "minLength": 3, "maxLength": 63, "pattern": "^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$" - }, - { - "name": "name", - "in": "path", - "description": "A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 63, - "pattern": "^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$" - }, - { - "name": "queue", - "in": "body", - "description": "Queue properties and metadata to be created with", - "required": true, - "schema": { - "$ref": "#/definitions/StorageQueue" - }, - "x-ms-client-name": "queue" } ], "responses": { "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/StorageQueue" - } + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." }, "default": { "description": "An unexpected error response.", @@ -4965,8 +4920,8 @@ } }, "x-ms-examples": { - "QueueOperationPatch": { - "$ref": "./examples/Queue_Update.json" + "QueueOperationDelete": { + "$ref": "./examples/Queue_Delete.json" } } } @@ -5079,14 +5034,14 @@ "202": { "description": "Resource operation accepted.", "headers": { + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + }, "Retry-After": { "type": "integer", "format": "int32", "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." - }, - "Location": { - "type": "string", - "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, @@ -5497,12 +5452,12 @@ } } }, - "delete": { - "operationId": "Table_Delete", + "patch": { + "operationId": "Table_Update", "tags": [ "Tables" ], - "description": "Deletes the table with the specified table name, under the specified account if it exists.", + "description": "Creates a new table with the specified table name, under the specified account.", "parameters": [ { "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -5531,14 +5486,24 @@ "minLength": 3, "maxLength": 63, "pattern": "^[A-Za-z][A-Za-z0-9]{2,62}$" + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters to provide to create a table.", + "required": true, + "schema": { + "$ref": "#/definitions/Table" + }, + "x-ms-client-name": "parameters" } ], "responses": { "200": { - "description": "Resource deleted successfully." - }, - "204": { - "description": "Resource does not exist." + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/Table" + } }, "default": { "description": "An unexpected error response.", @@ -5548,19 +5513,20 @@ } }, "x-ms-examples": { - "TableOperationDelete": { - "$ref": "./examples/Table_Delete.json" + "TableOperationPatch": { + "$ref": "./examples/Table_Update_Table_Operation_Patch.json" + }, + "TableOperationPutOrPatchAcls": { + "$ref": "./examples/Table_Update_Table_Operation_Put_Or_Patch_Acls.json" } } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}/tables/{name}": { - "patch": { - "operationId": "Table_Update", + }, + "delete": { + "operationId": "Table_Delete", "tags": [ "Tables" ], - "description": "Creates a new table with the specified table name, under the specified account.", + "description": "Deletes the table with the specified table name, under the specified account if it exists.", "parameters": [ { "$ref": "../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -5589,34 +5555,14 @@ "minLength": 3, "maxLength": 63, "pattern": "^[A-Za-z][A-Za-z0-9]{2,62}$" - }, - { - "name": "name", - "in": "path", - "description": "A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character.", - "required": true, - "type": "string", - "minLength": 3, - "maxLength": 63, - "pattern": "^[A-Za-z][A-Za-z0-9]{2,62}$" - }, - { - "name": "parameters", - "in": "body", - "description": "The parameters to provide to create a table.", - "required": true, - "schema": { - "$ref": "#/definitions/Table" - }, - "x-ms-client-name": "parameters" } ], "responses": { "200": { - "description": "Azure operation completed successfully.", - "schema": { - "$ref": "#/definitions/Table" - } + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." }, "default": { "description": "An unexpected error response.", @@ -5626,11 +5572,8 @@ } }, "x-ms-examples": { - "TableOperationPatch": { - "$ref": "./examples/Table_Update_Table_Operation_Patch.json" - }, - "TableOperationPutOrPatchAcls": { - "$ref": "./examples/Table_Update_Table_Operation_Put_Or_Patch_Acls.json" + "TableOperationDelete": { + "$ref": "./examples/Table_Delete.json" } } } @@ -5979,19 +5922,12 @@ "type": "object", "description": "The storage account blob inventory policy.", "properties": { - "name": { - "type": "string", - "readOnly": true - }, "properties": { "$ref": "#/definitions/BlobInventoryPolicyProperties", "description": "Returns the storage account blob inventory policy rules.", "x-ms-client-flatten": true } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" @@ -6257,10 +6193,6 @@ "type": "object", "description": "The properties of a storage account’s Blob service.", "properties": { - "name": { - "type": "string", - "readOnly": true - }, "properties": { "$ref": "#/definitions/BlobServicePropertiesProperties", "description": "The properties of a storage account’s Blob service.", @@ -6271,9 +6203,6 @@ "description": "The SKU (Stock Keeping Unit) assigned to this resource." } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" @@ -7052,10 +6981,6 @@ "type": "object", "description": "The properties of File services in storage account.", "properties": { - "name": { - "type": "string", - "readOnly": true - }, "properties": { "$ref": "#/definitions/FileServicePropertiesProperties", "description": "The properties of File services in storage account.", @@ -7066,9 +6991,6 @@ "description": "The SKU (Stock Keeping Unit) assigned to this resource." } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" @@ -7406,10 +7328,6 @@ "type": "object", "description": "The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag.", "properties": { - "name": { - "type": "string", - "readOnly": true - }, "properties": { "$ref": "#/definitions/ImmutabilityPolicyProperty", "description": "The properties of an ImmutabilityPolicy of a blob container.", @@ -7417,7 +7335,6 @@ } }, "required": [ - "name", "properties" ], "allOf": [ @@ -8076,19 +7993,12 @@ "type": "object", "description": "The Get Storage Account ManagementPolicies operation response.", "properties": { - "name": { - "type": "string", - "readOnly": true - }, "properties": { "$ref": "#/definitions/ManagementPolicyProperties", "description": "Returns the Storage Account Data Policies Rules.", "x-ms-client-flatten": true } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" @@ -8838,19 +8748,12 @@ "type": "object", "description": "The properties of a storage account’s Queue service.", "properties": { - "name": { - "type": "string", - "readOnly": true - }, "properties": { "$ref": "#/definitions/QueueServicePropertiesProperties", "description": "The properties of a storage account’s Queue service.", "x-ms-client-flatten": true } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" @@ -10102,19 +10005,12 @@ "type": "object", "description": "The properties of a storage account’s Table service.", "properties": { - "name": { - "type": "string", - "readOnly": true - }, "properties": { "$ref": "#/definitions/TableServicePropertiesProperties", "description": "The properties of a storage account’s Table service.", "x-ms-client-flatten": true } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp index e45c7087cd..85124f2ece 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp @@ -7,7 +7,6 @@ import "./BlobServiceProperties.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,17 +19,13 @@ namespace Microsoft.Storage; @parentResource(BlobServiceProperties) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(ContainerProperties) -model BlobContainer extends ProxyResourceBase { - /** - * The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. - */ - @maxLength(63) - @minLength(3) - @path - @key("containerName") - @segment("containers") - @visibility("read") - name: string; +model BlobContainer extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = BlobContainer, + KeyName = "containerName", + SegmentName = "containers", + NamePattern = "" + >; /** * Properties of the blob container. @@ -54,12 +49,13 @@ interface BlobContainers { /** * Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync; /** * Deletes specified container under its account. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -70,7 +66,7 @@ interface BlobContainers { list is ArmResourceListByParent< BlobContainer, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Optional. Specified maximum number of containers that can be included in the list. @@ -117,6 +113,11 @@ interface BlobContainers { objectLevelWorm is ArmResourceActionAsync; } +@@maxLength(BlobContainer.name, 63); +@@minLength(BlobContainer.name, 3); +@@doc(BlobContainer.name, + "The name of the blob container within the specified storage account. Blob container names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number." +); @@encodedName(BlobContainers.create::parameters.resource, "application/json", "blobContainer" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp index e3e98e5b3a..443d812a44 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp @@ -7,7 +7,6 @@ import "./StorageAccount.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -23,11 +22,13 @@ namespace Microsoft.Storage; @Azure.ResourceManager.Private.armResourceInternal( BlobInventoryPolicyProperties ) -model BlobInventoryPolicy extends ProxyResourceBase { - @key("inventoryPolicy") - @segment("inventoryPolicies") - @visibility("read") - name: string; +model BlobInventoryPolicy extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = BlobInventoryPolicy, + KeyName = "inventoryPolicy", + SegmentName = "inventoryPolicies", + NamePattern = "" + >; /** * Returns the storage account blob inventory policy rules. @@ -51,6 +52,7 @@ interface BlobInventoryPolicies { /** * Deletes the blob inventory policy associated with the specified storage account. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -61,6 +63,7 @@ interface BlobInventoryPolicies { list is ArmResourceListByParent; } +@@doc(BlobInventoryPolicy.name, ""); @@encodedName(BlobInventoryPolicies.createOrUpdate::parameters.resource, "application/json", "properties" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp index e1cfc6817a..a3264ce86c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp @@ -7,7 +7,6 @@ import "./StorageAccount.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -23,11 +22,13 @@ namespace Microsoft.Storage; @Azure.ResourceManager.Private.armResourceInternal( BlobServicePropertiesProperties ) -model BlobServiceProperties extends ProxyResourceBase { - @key("blobService") - @segment("blobServices") - @visibility("read") - name: string; +model BlobServiceProperties extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = BlobServiceProperties, + KeyName = "blobService", + SegmentName = "blobServices", + NamePattern = "" + >; /** * The properties of a storage account’s Blob service. @@ -35,7 +36,7 @@ model BlobServiceProperties extends ProxyResourceBase { @extension("x-ms-client-flatten", true) properties?: BlobServicePropertiesProperties; - ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourceSkuProperty; } @armResourceOperations @@ -62,6 +63,7 @@ interface BlobServicePropertiesOperationGroup { list is ArmResourceListByParent; } +@@doc(BlobServiceProperties.name, ""); @@encodedName(BlobServicePropertiesOperationGroup.setServiceProperties::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp index 9680f4aa1f..b32a49693f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,17 +19,13 @@ namespace Microsoft.Storage; @parentResource(SubscriptionLocationResource) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(DeletedAccountProperties) -model DeletedAccount extends ProxyResourceBase { - /** - * Name of the deleted storage account. - */ - @maxLength(24) - @minLength(3) - @path - @key("deletedAccountName") - @segment("deletedAccounts") - @visibility("read") - name: string; +model DeletedAccount extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = DeletedAccount, + KeyName = "deletedAccountName", + SegmentName = "deletedAccounts", + NamePattern = "" + >; /** * Properties of the deleted account. @@ -51,3 +46,7 @@ interface DeletedAccounts { */ list is ArmListBySubscription; } + +@@maxLength(DeletedAccount.name, 24); +@@minLength(DeletedAccount.name, 3); +@@doc(DeletedAccount.name, "Name of the deleted storage account."); diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp index e6316e0112..2dfb2c6dc5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp @@ -7,7 +7,6 @@ import "./StorageAccount.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,17 +19,13 @@ namespace Microsoft.Storage; @parentResource(StorageAccount) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(EncryptionScopeProperties) -model EncryptionScope extends ProxyResourceBase { - /** - * The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. - */ - @maxLength(63) - @minLength(3) - @path - @key("encryptionScopeName") - @segment("encryptionScopes") - @visibility("read") - name: string; +model EncryptionScope extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = EncryptionScope, + KeyName = "encryptionScopeName", + SegmentName = "encryptionScopes", + NamePattern = "" + >; /** * Properties of the encryption scope. @@ -54,7 +49,7 @@ interface EncryptionScopes { /** * Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist. */ - @parameterVisibility("read") + @parameterVisibility patch is ArmCustomPatchSync; /** @@ -65,7 +60,7 @@ interface EncryptionScopes { list is ArmResourceListByParent< EncryptionScope, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Optional, specifies the maximum number of encryption scopes that will be included in the list response. @@ -90,6 +85,11 @@ interface EncryptionScopes { >; } +@@maxLength(EncryptionScope.name, 63); +@@minLength(EncryptionScope.name, 3); +@@doc(EncryptionScope.name, + "The name of the encryption scope within the specified storage account. Encryption scope names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number." +); @@encodedName(EncryptionScopes.put::parameters.resource, "application/json", "encryptionScope" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp index ec2cac71b1..a62b048f7b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp @@ -7,7 +7,6 @@ import "./StorageAccount.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -23,11 +22,13 @@ namespace Microsoft.Storage; @Azure.ResourceManager.Private.armResourceInternal( FileServicePropertiesProperties ) -model FileServiceProperties extends ProxyResourceBase { - @key("fileService") - @segment("fileServices") - @visibility("read") - name: string; +model FileServiceProperties extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = FileServiceProperties, + KeyName = "fileService", + SegmentName = "fileServices", + NamePattern = "" + >; /** * The properties of File services in storage account. @@ -35,7 +36,7 @@ model FileServiceProperties extends ProxyResourceBase { @extension("x-ms-client-flatten", true) properties?: FileServicePropertiesProperties; - ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourceSkuProperty; } @armResourceOperations @@ -62,6 +63,7 @@ interface FileServicePropertiesOperationGroup { list is ArmResourceListByParent; } +@@doc(FileServiceProperties.name, ""); @@encodedName(FileServicePropertiesOperationGroup.setServiceProperties::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp index f93bcd8a13..390dd5cb56 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp @@ -7,7 +7,6 @@ import "./FileServiceProperties.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,17 +19,13 @@ namespace Microsoft.Storage; @parentResource(FileServiceProperties) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(FileShareProperties) -model FileShare extends ProxyResourceBase { - /** - * The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. - */ - @maxLength(63) - @minLength(3) - @path - @key("shareName") - @segment("shares") - @visibility("read") - name: string; +model FileShare extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = FileShare, + KeyName = "shareName", + SegmentName = "shares", + NamePattern = "" + >; /** * Properties of the file share. @@ -47,7 +42,7 @@ interface FileShares { get is ArmResourceRead< FileShare, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Optional, used to expand the properties within share's properties. Valid values are: stats. Should be passed as a string with delimiter ','. @@ -69,7 +64,7 @@ interface FileShares { create is ArmResourceCreateOrReplaceSync< FileShare, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Optional, used to expand the properties within share's properties. Valid values are: snapshots. Should be passed as a string with delimiter ',' @@ -82,16 +77,17 @@ interface FileShares { /** * Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync; /** * Deletes specified share under its account. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync< FileShare, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Optional, used to delete a snapshot. @@ -115,7 +111,7 @@ interface FileShares { list is ArmResourceListByParent< FileShare, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Optional. Specified maximum number of shares that can be included in the list. @@ -150,7 +146,7 @@ interface FileShares { LeaseShareRequest, LeaseShareResponse, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Optional. Specify the snapshot time to lease a snapshot. @@ -161,6 +157,11 @@ interface FileShares { >; } +@@maxLength(FileShare.name, 63); +@@minLength(FileShare.name, 3); +@@doc(FileShare.name, + "The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number." +); @@encodedName(FileShares.create::parameters.resource, "application/json", "fileShare" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp index d2683701fc..79233ed0df 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp @@ -7,7 +7,6 @@ import "./BlobContainer.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -21,11 +20,13 @@ namespace Microsoft.Storage; @parentResource(BlobContainer) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(ImmutabilityPolicyProperty) -model ImmutabilityPolicy extends ProxyResourceBase { - @key("immutabilityPolicy") - @segment("immutabilityPolicies") - @visibility("read") - name: string; +model ImmutabilityPolicy extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = ImmutabilityPolicy, + KeyName = "immutabilityPolicy", + SegmentName = "immutabilityPolicies", + NamePattern = "" + >; /** * The properties of an ImmutabilityPolicy of a blob container. @@ -44,7 +45,7 @@ interface ImmutabilityPolicies { getImmutabilityPolicy is ArmResourceRead< ImmutabilityPolicy, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. @@ -62,7 +63,7 @@ interface ImmutabilityPolicies { createOrUpdateImmutabilityPolicy is ArmResourceCreateOrReplaceSync< ImmutabilityPolicy, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. @@ -76,11 +77,12 @@ interface ImmutabilityPolicies { * Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("BlobContainers_DeleteImmutabilityPolicy") deleteImmutabilityPolicy is ArmResourceDeleteSync< ImmutabilityPolicy, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. @@ -100,7 +102,7 @@ interface ImmutabilityPolicies { void, ImmutabilityPolicy, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. @@ -120,7 +122,7 @@ interface ImmutabilityPolicies { ImmutabilityPolicy, ImmutabilityPolicy, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The entity state (ETag) version of the immutability policy to update. A value of "*" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied. @@ -131,6 +133,7 @@ interface ImmutabilityPolicies { >; } +@@doc(ImmutabilityPolicy.name, ""); @@encodedName(ImmutabilityPolicies.createOrUpdateImmutabilityPolicy::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp index 27cc3a35ca..9568a5e394 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp @@ -7,7 +7,6 @@ import "./StorageAccount.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,17 +19,13 @@ namespace Microsoft.Storage; @parentResource(StorageAccount) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(LocalUserProperties) -model LocalUser extends ProxyResourceBase { - /** - * The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account. - */ - @maxLength(64) - @minLength(3) - @path - @key("username") - @segment("localUsers") - @visibility("read") - name: string; +model LocalUser extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = LocalUser, + KeyName = "username", + SegmentName = "localUsers", + NamePattern = "" + >; /** * Storage account local user properties. @@ -54,6 +49,7 @@ interface LocalUsers { /** * Deletes the local user associated with the specified storage account. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -78,6 +74,11 @@ interface LocalUsers { >; } +@@maxLength(LocalUser.name, 64); +@@minLength(LocalUser.name, 3); +@@doc(LocalUser.name, + "The name of local user. The username must contain lowercase letters and numbers only. It must be unique only within the storage account." +); @@encodedName(LocalUsers.createOrUpdate::parameters.resource, "application/json", "properties" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp index 570855af82..8252dff72e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp @@ -7,7 +7,6 @@ import "./StorageAccount.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -21,11 +20,13 @@ namespace Microsoft.Storage; @parentResource(StorageAccount) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(ManagementPolicyProperties) -model ManagementPolicy extends ProxyResourceBase { - @key("managementPolicy") - @segment("managementPolicies") - @visibility("read") - name: string; +model ManagementPolicy extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = ManagementPolicy, + KeyName = "managementPolicy", + SegmentName = "managementPolicies", + NamePattern = "" + >; /** * Returns the Storage Account Data Policies Rules. @@ -49,9 +50,11 @@ interface ManagementPolicies { /** * Deletes the managementpolicy associated with the specified storage account. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; } +@@doc(ManagementPolicy.name, ""); @@encodedName(ManagementPolicies.createOrUpdate::parameters.resource, "application/json", "properties" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp index f2a6a67c9b..2ec9409697 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp @@ -7,7 +7,6 @@ import "./StorageAccount.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,16 +21,13 @@ namespace Microsoft.Storage; @Azure.ResourceManager.Private.armResourceInternal( ObjectReplicationPolicyProperties ) -model ObjectReplicationPolicy extends ProxyResourceBase { - /** - * For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file. - */ - @minLength(1) - @path - @key("objectReplicationPolicyId") - @segment("objectReplicationPolicies") - @visibility("read") - name: string; +model ObjectReplicationPolicy extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = ObjectReplicationPolicy, + KeyName = "objectReplicationPolicyId", + SegmentName = "objectReplicationPolicies", + NamePattern = "" + >; /** * Returns the Storage Account Object Replication Policy. @@ -55,6 +51,7 @@ interface ObjectReplicationPolicies { /** * Deletes the object replication policy associated with the specified storage account. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -65,6 +62,10 @@ interface ObjectReplicationPolicies { list is ArmResourceListByParent; } +@@minLength(ObjectReplicationPolicy.name, 1); +@@doc(ObjectReplicationPolicy.name, + "For the destination account, provide the value 'default'. Configure the policy on the destination account first. For the source account, provide the value of the policy ID that is returned when you download the policy that was defined on the destination account. The policy is downloaded as a JSON file." +); @@encodedName(ObjectReplicationPolicies.createOrUpdate::parameters.resource, "application/json", "properties" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp index b03c948554..0210bd0e54 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp @@ -7,7 +7,6 @@ import "./StorageAccount.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -22,15 +21,13 @@ namespace Microsoft.Storage; @Azure.ResourceManager.Private.armResourceInternal( PrivateEndpointConnectionProperties ) -model PrivateEndpointConnection extends ProxyResourceBase { - /** - * The name of the private endpoint connection associated with the Azure resource - */ - @path - @key("privateEndpointConnectionName") - @segment("privateEndpointConnections") - @visibility("read") - name: string; +model PrivateEndpointConnection extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = PrivateEndpointConnection, + KeyName = "privateEndpointConnectionName", + SegmentName = "privateEndpointConnections", + NamePattern = "" + >; /** * Resource properties. @@ -54,6 +51,7 @@ interface PrivateEndpointConnections { /** * Deletes the specified private endpoint connection associated with the storage account. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -64,6 +62,9 @@ interface PrivateEndpointConnections { list is ArmResourceListByParent; } +@@doc(PrivateEndpointConnection.name, + "The name of the private endpoint connection associated with the Azure resource" +); @@encodedName(PrivateEndpointConnections.put::parameters.resource, "application/json", "properties" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp index ed4b8c6d6f..b15ffb2b24 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp @@ -7,7 +7,6 @@ import "./StorageAccount.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -23,11 +22,13 @@ namespace Microsoft.Storage; @Azure.ResourceManager.Private.armResourceInternal( QueueServicePropertiesProperties ) -model QueueServiceProperties extends ProxyResourceBase { - @key("queueService") - @segment("queueServices") - @visibility("read") - name: string; +model QueueServiceProperties extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = QueueServiceProperties, + KeyName = "queueService", + SegmentName = "queueServices", + NamePattern = "" + >; /** * The properties of a storage account’s Queue service. @@ -60,6 +61,7 @@ interface QueueServicePropertiesOperationGroup { list is ArmResourceListByParent; } +@@doc(QueueServiceProperties.name, ""); @@encodedName(QueueServicePropertiesOperationGroup.setServiceProperties::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp index d2a6b1137b..8a4ca2d7b2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,17 +17,13 @@ namespace Microsoft.Storage; #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility" @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(StorageAccountProperties) -model StorageAccount extends TrackedResourceBase { - /** - * The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. - */ - @maxLength(24) - @minLength(3) - @path - @key("accountName") - @segment("storageAccounts") - @visibility("read") - name: string; +model StorageAccount extends Foundations.TrackedResource { + ...ResourceNameParameter< + Resource = StorageAccount, + KeyName = "accountName", + SegmentName = "storageAccounts", + NamePattern = "" + >; /** * Gets the Kind. @@ -47,8 +42,8 @@ model StorageAccount extends TrackedResourceBase { @extension("x-ms-client-flatten", true) properties?: StorageAccountProperties; - ...Azure.ResourceManager.ManagedServiceIdentity; - ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ManagedServiceIdentityProperty; + ...Azure.ResourceManager.ResourceSkuProperty; } @armResourceOperations @@ -59,7 +54,7 @@ interface StorageAccounts { getProperties is ArmResourceRead< StorageAccount, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * May be used to expand the properties within account's properties. By default, data is not included when fetching properties. Currently we only support geoReplicationStats and blobRestoreStatus. @@ -77,12 +72,13 @@ interface StorageAccounts { /** * The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation. */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync; /** * Deletes a storage account in Microsoft Azure. */ + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" delete is ArmResourceDeleteSync; /** @@ -105,7 +101,7 @@ interface StorageAccounts { void, StorageAccountListKeysResult, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Specifies type of the key to be listed. Possible value is kerb. @@ -154,7 +150,7 @@ interface StorageAccounts { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * The parameter is set to 'Planned' to indicate whether a Planned failover is requested. @@ -172,7 +168,7 @@ interface StorageAccounts { void, void, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Required. Hierarchical namespace migration type can either be a hierarchical namespace validation request 'HnsOnValidationRequest' or a hydration request 'HnsOnHydrationRequest'. The validation request will validate the migration whereas the hydration request will migrate the account. @@ -237,6 +233,11 @@ interface StorageAccounts { ): ArmResponse | ErrorResponse; } +@@maxLength(StorageAccount.name, 24); +@@minLength(StorageAccount.name, 3); +@@doc(StorageAccount.name, + "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only." +); @@encodedName(StorageAccounts.create::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp index eb4b587a9f..c7126ade02 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp @@ -7,7 +7,6 @@ import "./QueueServiceProperties.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -18,18 +17,13 @@ namespace Microsoft.Storage; @parentResource(QueueServiceProperties) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(QueueProperties) -model StorageQueue extends ProxyResourceBase { - /** - * A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters. - */ - @maxLength(63) - @minLength(3) - @pattern("^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$") - @path - @key("queueName") - @segment("queues") - @visibility("read") - name: string; +model StorageQueue extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = StorageQueue, + KeyName = "queueName", + SegmentName = "queues", + NamePattern = "^[a-z0-9]([a-z0-9]|(-(?!-))){1,61}[a-z0-9]$" + >; /** * Queue resource properties. @@ -58,7 +52,7 @@ interface StorageQueues { * Creates a new queue with the specified queue name, under the specified account. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("Queue_Update") update is ArmCustomPatchSync; @@ -66,6 +60,7 @@ interface StorageQueues { * Deletes the queue with the specified queue name, under the specified account if it exists. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Queue_Delete") delete is ArmResourceDeleteSync; @@ -77,7 +72,7 @@ interface StorageQueues { list is ArmResourceListByParent< StorageQueue, { - ...BaseParameters; + ...Azure.ResourceManager.Foundations.BaseParameters; /** * Optional, a maximum number of queues that should be included in a list queue response @@ -94,6 +89,11 @@ interface StorageQueues { >; } +@@maxLength(StorageQueue.name, 63); +@@minLength(StorageQueue.name, 3); +@@doc(StorageQueue.name, + "A queue name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of lowercase alphanumeric and dash(-) characters only, it should begin and end with an alphanumeric character and it cannot have two consecutive dash(-) characters." +); @@encodedName(StorageQueues.create::parameters.resource, "application/json", "queue" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp index 34e3927a9f..4f0bae4e95 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp @@ -7,7 +7,6 @@ import "./TableServiceProperties.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -20,18 +19,13 @@ namespace Microsoft.Storage; @parentResource(TableServiceProperties) @includeInapplicableMetadataInPayload(false) @Azure.ResourceManager.Private.armResourceInternal(TableProperties) -model Table extends ProxyResourceBase { - /** - * A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character. - */ - @maxLength(63) - @minLength(3) - @pattern("^[A-Za-z][A-Za-z0-9]{2,62}$") - @path - @key("tableName") - @segment("tables") - @visibility("read") - name: string; +model Table extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = Table, + KeyName = "tableName", + SegmentName = "tables", + NamePattern = "^[A-Za-z][A-Za-z0-9]{2,62}$" + >; /** * Table resource properties. @@ -60,7 +54,7 @@ interface Tables { * Creates a new table with the specified table name, under the specified account. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" - @parameterVisibility("read") + @parameterVisibility @operationId("Table_Update") update is ArmCustomPatchSync; @@ -68,6 +62,7 @@ interface Tables { * Deletes the table with the specified table name, under the specified account if it exists. */ #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/no-response-body" "For backward compatibility" @operationId("Table_Delete") delete is ArmResourceDeleteSync
    ; @@ -79,6 +74,11 @@ interface Tables { list is ArmResourceListByParent
    ; } +@@maxLength(Table.name, 63); +@@minLength(Table.name, 3); +@@doc(Table.name, + "A table name must be unique within a storage account and must be between 3 and 63 characters.The name must comprise of only alphanumeric characters and it cannot begin with a numeric character." +); @@encodedName(Tables.create::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp index d891ace999..af269d3040 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp @@ -7,7 +7,6 @@ import "./StorageAccount.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -23,11 +22,13 @@ namespace Microsoft.Storage; @Azure.ResourceManager.Private.armResourceInternal( TableServicePropertiesProperties ) -model TableServiceProperties extends ProxyResourceBase { - @key("tableService") - @segment("tableServices") - @visibility("read") - name: string; +model TableServiceProperties extends Foundations.ProxyResource { + ...ResourceNameParameter< + Resource = TableServiceProperties, + KeyName = "tableService", + SegmentName = "tableServices", + NamePattern = "" + >; /** * The properties of a storage account’s Table service. @@ -60,6 +61,7 @@ interface TableServicePropertiesOperationGroup { list is ArmResourceListByParent; } +@@doc(TableServiceProperties.name, ""); @@encodedName(TableServicePropertiesOperationGroup.setServiceProperties::parameters.resource, "application/json", "parameters" diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp index 3244b1ca6e..a71abaa302 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp @@ -814,6 +814,7 @@ model StorageAccountCreateParameters { /** * Gets or sets a list of key value pairs that describe the resource. These tags can be used for viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key with a length no greater than 128 characters and a value with a length no greater than 256 characters. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; /** @@ -882,6 +883,7 @@ model Identity { /** * Gets or sets a list of key value pairs that describe the set of User Assigned identities that will be used with this storage account. The key is the ARM resource identifier of the identity. Only 1 User Assigned identity is permitted here. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" userAssignedIdentities?: Record; } @@ -1952,6 +1954,7 @@ model StorageAccountUpdateParameters { /** * Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" tags?: Record; /** @@ -3402,6 +3405,7 @@ model ContainerProperties { /** * A name-value pair to associate with the container as metadata. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" metadata?: Record; /** @@ -3802,6 +3806,7 @@ model FileShareProperties { /** * A name-value pair to associate with the share as metadata. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" metadata?: Record; /** @@ -4007,6 +4012,7 @@ model QueueProperties { /** * A name-value pair that represents queue metadata. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" metadata?: Record; /** @@ -4108,5 +4114,6 @@ model ListQueueProperties { /** * A name-value pair that represents queue metadata. */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "For backward compatibility" metadata?: Record; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/swagger-output/swagger.json b/packages/extensions/openapi-to-typespec/test/arm-test/swagger-output/swagger.json index 53aee6556d..64343b1626 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/swagger-output/swagger.json +++ b/packages/extensions/openapi-to-typespec/test/arm-test/swagger-output/swagger.json @@ -647,12 +647,7 @@ } } }, - "allOf": [ - { - "type": "object", - "additionalProperties": {} - } - ] + "additionalProperties": {} }, "DictProperty": { "type": "object", @@ -811,15 +806,8 @@ "read", "create" ] - }, - "name": { - "type": "string", - "readOnly": true } }, - "required": [ - "name" - ], "allOf": [ { "$ref": "../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/ArrayDefault.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/ArrayDefault.tsp index bf7f6340cc..f400ed0c0f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/ArrayDefault.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/ArrayDefault.tsp @@ -7,7 +7,6 @@ import "./Employee.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,16 +15,14 @@ namespace Microsoft.Test; * A Test resource */ @parentResource(Employee) -model ArrayDefault is TrackedResource { - /** - * Name of resource - */ - @pattern("^[a-zA-Z0-9-]{3,24}$") - @path - @key("name") - @segment("arraydefaults") - @visibility("read") - name: string; +model ArrayDefault + is Azure.ResourceManager.TrackedResource { + ...ResourceNameParameter< + Resource = ArrayDefault, + KeyName = "name", + SegmentName = "arraydefaults", + NamePattern = "^[a-zA-Z0-9-]{3,24}$" + >; } @armResourceOperations @@ -40,3 +37,5 @@ interface ArrayDefaults { */ listByResourceGroup is ArmResourceListByParent; } + +@@doc(ArrayDefault.name, "Name of resource"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp index b7cfd32fc6..0bae3f98dc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp @@ -7,7 +7,6 @@ import "./Employee.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -16,16 +15,13 @@ namespace Microsoft.Test; * A Test resource */ @parentResource(Employee) -model DictProperty is TrackedResource> { - /** - * Name of resource - */ - @pattern("^[a-zA-Z0-9-]{3,24}$") - @path - @key("name") - @segment("dictproperties") - @visibility("read") - name: string; +model DictProperty is Azure.ResourceManager.TrackedResource> { + ...ResourceNameParameter< + Resource = DictProperty, + KeyName = "name", + SegmentName = "dictproperties", + NamePattern = "^[a-zA-Z0-9-]{3,24}$" + >; } @armResourceOperations @@ -40,3 +36,5 @@ interface DictProperties { */ listByResourceGroup is ArmResourceListByParent; } + +@@doc(DictProperty.name, "Name of resource"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp index 3688d04fb8..c092aca3a2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp @@ -6,7 +6,6 @@ import "./models.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -14,16 +13,13 @@ namespace Microsoft.Test; /** * A Test resource */ -model Employee is TrackedResource { - /** - * Name of employee - */ - @pattern("^[a-zA-Z0-9-]{3,24}$") - @path - @key("employeeName") - @segment("employees") - @visibility("read") - name: string; +model Employee is Azure.ResourceManager.TrackedResource { + ...ResourceNameParameter< + Resource = Employee, + KeyName = "employeeName", + SegmentName = "employees", + NamePattern = "^[a-zA-Z0-9-]{3,24}$" + >; } @armResourceOperations @@ -41,7 +37,7 @@ interface Employees { /** * Update a Employee */ - @parameterVisibility("read") + @parameterVisibility update is ArmCustomPatchSync; /** @@ -59,3 +55,5 @@ interface Employees { */ listBySubscription is ArmListBySubscription; } + +@@doc(Employee.name, "Name of employee"); diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp index 411469b307..70abd51ce1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp @@ -7,7 +7,6 @@ import "./Employee.tsp"; using TypeSpec.Rest; using Azure.ResourceManager; -using Azure.ResourceManager.Foundations; using TypeSpec.Http; using TypeSpec.OpenAPI; @@ -17,11 +16,13 @@ namespace Microsoft.Test; */ @singleton("default") @parentResource(Employee) -model Enroll is TrackedResource { - @key("enroll") - @segment("enrolls") - @visibility("read") - name: string; +model Enroll is Azure.ResourceManager.TrackedResource { + ...ResourceNameParameter< + Resource = Enroll, + KeyName = "enroll", + SegmentName = "enrolls", + NamePattern = "" + >; } @armResourceOperations @@ -31,3 +32,5 @@ interface Enrolls { */ get is ArmResourceRead; } + +@@doc(Enroll.name, ""); diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp index 3a55eb9a45..5f7e517d46 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp @@ -159,7 +159,9 @@ model EnrollProperties { /** * Resource properties */ -model ArrayDefaultProperties extends Record { +model ArrayDefaultProperties { + ...Record; + /** * Array of strings */ diff --git a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp index 4b7b60795c..0ae112e243 100644 --- a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/models.tsp @@ -175,8 +175,9 @@ model ErrorResponseError { type?: string; } -model Paths13PiqocDeploymentsDeploymentIdEmbeddingsPostRequestbodyContentApplicationJsonSchema - extends Record { +model Paths13PiqocDeploymentsDeploymentIdEmbeddingsPostRequestbodyContentApplicationJsonSchema { + ...Record; + /** * An input to embed, encoded as a string, a list of strings, or a list of token * lists diff --git a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp index 8eb481aaef..30c7c645a0 100644 --- a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp @@ -392,7 +392,9 @@ model ErrorResponse { /** * The error object. */ -model Error extends Record { +model Error { + ...Record; + /** * One of a server-defined set of error codes. */ diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp index 9c0d340a75..7d5886c417 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp @@ -191,7 +191,9 @@ model ErrorResponse { /** * The error object. */ -model Error extends Record { +model Error { + ...Record; + /** * One of a server-defined set of error codes. */ diff --git a/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts b/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts index ecf1e7edc3..e14134da2c 100644 --- a/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts +++ b/packages/extensions/openapi-to-typespec/test/utils/generate-typespec.ts @@ -105,6 +105,8 @@ async function main() { for (let i = 0; i < folders.length; i++) { const folder = folders[i]; + // https://github.com/Azure/typespec-azure/issues/862 + if (folder === "arm-playwrighttesting") continue; try { await generateTypespec(repoRoot, folder, debug); if (swagger) {